Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
XieYongHong 2023-07-06 16:50:29 +08:00
commit c4faec62c1
3 changed files with 33 additions and 8 deletions

View File

@ -170,10 +170,8 @@ const queryTypeList = async () => {
if (resp.status === 200) {
const provider = resp.result.map((i: any) => i.provider) || [];
const arr = tab.filter((item: any) => {
const _arr = [...provider, item.type]
return new Set(_arr).size < _arr.length
return item.type.some((i: any) => provider.includes(i))
});
tabs.value = arr;
if(arr.length > 0) {
subscribeNotice();

View File

@ -210,6 +210,7 @@ onUnmounted(() => {
color: #1d2129;
font-weight: 500;
width: 100%;
margin-top: 10px;
}
.person-header-item-info-right-info {
width: 100%;

View File

@ -233,17 +233,43 @@ const jumpStep = async (val: number) => {
if (!formModel.channelConfiguration.templateId) {
onlyMessage('请选择通知模板', 'error');
return;
} else {
//
const resp = await Template.getTemplateDetail(formModel.channelConfiguration.templateId);
if (resp.status === 200) {
variable.value = resp.result?.variableDefinitions || [];
}
}
}
if (val >= 4) {
if (variable.value.length) {
if (_variableDefinitions.value.length) {
const obj = await variableRef.value.onSave();
if (obj) {
handleVariable(obj);
if(variableRef.value) {
const obj = await variableRef.value?.onSave();
if (obj) {
handleVariable(obj);
} else {
onlyMessage('请配置模版变量', 'error');
return;
}
} else {
onlyMessage('请配置模版变量', 'error');
return;
const flag = _variableDefinitions.value.every((item: any) => {
const _value = formModel.channelConfiguration.variables[item.id];
if(!_value) {
return false
}
if(_value.source === 'fixed') {
return _value.value !== undefined
}
if(_value.source === 'upper') {
return _value.upperKey !== undefined
}
return true
})
if(!flag) {
onlyMessage('请配置模版变量', 'error');
return
}
}
} else {
handleVariable({});