diff --git a/frontend/src/views/case-management/caseReview/caseDetail.vue b/frontend/src/views/case-management/caseReview/caseDetail.vue index 2ad161f8b5..029c18698e 100644 --- a/frontend/src/views/case-management/caseReview/caseDetail.vue +++ b/frontend/src/views/case-management/caseReview/caseDetail.vue @@ -427,6 +427,35 @@ } } const caseDetailLoading = ref(false); + + function getCustomField(customFields: any) { + const multipleExcludes = ['MULTIPLE_SELECT', 'CHECKBOX', 'MULTIPLE_MEMBER']; + const selectExcludes = ['MEMBER', 'RADIO', 'SELECT']; + let selectValue; + // 处理多选项 + if (multipleExcludes.includes(customFields.type) && customFields.defaultValue) { + selectValue = JSON.parse(customFields.defaultValue); + return ( + (customFields.options || []) + .filter((item: any) => selectValue.includes(item.value)) + .map((it: any) => it.text) + .join(',') || '-' + ); + } + if (customFields.type === 'MULTIPLE_INPUT') { + // 处理标签形式 + return JSON.parse(customFields.defaultValue).join(',') || '-'; + } + if (selectExcludes.includes(customFields.type)) { + return ( + (customFields.options || []) + .filter((item: any) => customFields.defaultValue === item.value) + .map((it: any) => it.text) + .join() || '-' + ); + } + return customFields.defaultValue || '-'; + } // 加载用例详情 async function loadCaseDetail() { try { @@ -445,7 +474,7 @@ typeof e.defaultValue === 'string' && e.defaultValue !== '' ? JSON.parse(e.defaultValue) : e.defaultValue; return { label: e.fieldName, - value: Array.isArray(val) ? val.join('、') : val, + value: getCustomField(e), }; } catch (error) { return { @@ -456,7 +485,7 @@ }), { label: t('caseManagement.caseReview.creator'), - value: res.createUser || '', + value: res.createUserName || '', }, { label: t('caseManagement.caseReview.createTime'),