fix(测试计划): 去掉默认值

This commit is contained in:
xinxin.wu 2024-06-21 14:35:35 +08:00 committed by Craftsman
parent 5bf2f5295a
commit c0f310a2e7
1 changed files with 3 additions and 2 deletions

View File

@ -29,7 +29,8 @@
<CaseLevel :case-level="filterContent.value" />
</template>
<template #caseLevel="{ record }">
<CaseLevel :case-level="record.caseLevel" />
<CaseLevel v-if="record.caseLevel" :case-level="record.caseLevel" />
<span v-else>-</span>
</template>
<template #[FilterSlotNameEnum.CASE_MANAGEMENT_EXECUTE_RESULT]="{ filterContent }">
<ExecuteResult :execute-result="filterContent.value" />
@ -204,7 +205,7 @@
function getCaseLevel(record: TableData) {
if (record.customFields && record.customFields.length) {
const caseItem = record.customFields.find((item: any) => item.fieldName === '用例等级' && item.internal);
return caseItem?.options.find((item: any) => item.value === caseItem?.defaultValue)?.text || 'P0';
return caseItem?.options.find((item: any) => item.value === caseItem?.defaultValue)?.text;
}
return undefined;
}