fix(测试用例): 修复测试用例功能用例批量编辑成员清空默认选中类型

This commit is contained in:
xinxin.wu 2024-08-13 16:05:53 +08:00 committed by 刘瑞斌
parent 52899f70ce
commit c6111c7d12
1 changed files with 8 additions and 2 deletions

View File

@ -142,14 +142,20 @@
const currentAttrs = totalAttrs.value.filter((item: any) => item.fieldId === form.value.selectedAttrsId);
formRules.value = [];
formRules.value = currentAttrs.map((item: CustomAttributes) => {
let formValue: string | string[] = item.defaultValue;
//
const memberType = ['MEMBER', 'MULTIPLE_MEMBER'];
if (val && formValue.includes('CREATE_USER') && memberType.includes(val)) {
formValue = val === 'MEMBER' ? '' : [];
}
return {
type: val,
name: item.fieldId,
label: 'caseManagement.featureCase.batchUpdate',
value: item.defaultValue,
value: formValue,
options: item.options,
props: {
modelValue: item.defaultValue,
modelValue: formValue,
options: item.options,
disabled: !form.value.selectedAttrsId,
},