fix(缺陷管理): 修复三方平台缺陷默认值创建人展示问题
This commit is contained in:
parent
3497df836f
commit
9684b3eeb6
|
@ -166,7 +166,7 @@
|
|||
};
|
||||
|
||||
if (optionsItem.children) {
|
||||
mappedItem.children = mapOption(optionsItem.children);
|
||||
mappedItem.children = mapOption(optionsItem.children || []);
|
||||
}
|
||||
return mappedItem;
|
||||
});
|
||||
|
@ -186,8 +186,8 @@
|
|||
} else {
|
||||
fieldType = FieldTypeFormRules[currentTypeForm].type;
|
||||
}
|
||||
const options = item?.options;
|
||||
const currentOptions = mapOption(options || []);
|
||||
const options = Array.isArray(item?.options) ? item?.options : [];
|
||||
const currentOptions = mapOption(options);
|
||||
const ruleItem: any = {
|
||||
type: fieldType, // 表单类型
|
||||
field: item.name, // 字段
|
||||
|
@ -279,7 +279,7 @@
|
|||
}
|
||||
|
||||
function getControlFormItems() {
|
||||
const convertedData = formItems.value.map((item: FormItem) => convertItem(item));
|
||||
const convertedData = (formItems.value || []).map((item: FormItem) => convertItem(item));
|
||||
formRuleList.value = convertedData;
|
||||
}
|
||||
|
||||
|
|
|
@ -98,6 +98,7 @@ export function makeCustomFieldsParams(formItem: FormRuleItem[]) {
|
|||
|
||||
// 设置成员默认值
|
||||
export function getDefaultMemberValue(item: DetailCustomField, initOptions: FieldOptions[]) {
|
||||
// 系统模板创建人
|
||||
if ((item.defaultValue as string | string[]).includes('CREATE_USER')) {
|
||||
const optionsIds = initOptions.map((e: any) => e.value);
|
||||
const userId = userStore.id as string;
|
||||
|
@ -106,6 +107,13 @@ export function getDefaultMemberValue(item: DetailCustomField, initOptions: Fiel
|
|||
} else {
|
||||
item.defaultValue = item.type === 'MEMBER' ? '' : [];
|
||||
}
|
||||
// 三方默认创建人
|
||||
} else {
|
||||
const value =
|
||||
item.type === 'MULTIPLE_MEMBER' && item.defaultValue && typeof item.defaultValue === 'string'
|
||||
? JSON.parse(item.defaultValue)
|
||||
: item.defaultValue;
|
||||
item.defaultValue = value;
|
||||
}
|
||||
return item.defaultValue;
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<MsDrawer
|
||||
v-model:visible="showBugDrawer"
|
||||
:mask="true"
|
||||
:title="t('caseManagement.featureCase.createDefect')"
|
||||
:ok-text="t('common.confirm')"
|
||||
:title="t('case.saveContinueText')"
|
||||
:ok-text="t('common.create')"
|
||||
:ok-loading="drawerLoading"
|
||||
:width="850"
|
||||
:mask-closable="true"
|
||||
|
|
Loading…
Reference in New Issue