From 2d7d462c57239373d0006861d7dcd6578cd96c40 Mon Sep 17 00:00:00 2001 From: teukkk Date: Tue, 18 Jun 2024 17:33:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E8=AF=A6=E6=83=85-?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A7=84=E5=88=92=E8=A7=86=E5=9B=BE=E4=B8=8B?= =?UTF-8?q?=E6=89=80=E5=B1=9E=E6=A8=A1=E5=9D=97=E4=B8=8D=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1042464 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001042464 --- frontend/src/models/testPlan/testPlan.ts | 3 +++ .../testPlan/detail/apiCase/components/caseTable.vue | 11 ++--------- .../detail/apiScenario/components/scenarioTable.vue | 11 ++--------- .../detail/featureCase/components/caseTable.vue | 9 ++------- 4 files changed, 9 insertions(+), 25 deletions(-) diff --git a/frontend/src/models/testPlan/testPlan.ts b/frontend/src/models/testPlan/testPlan.ts index 85e62d4874..846ac67593 100644 --- a/frontend/src/models/testPlan/testPlan.ts +++ b/frontend/src/models/testPlan/testPlan.ts @@ -156,6 +156,7 @@ export interface PlanDetailFeatureCaseItem { num: string; name: string; moduleId: string; + moduleName: string; versionName: string; createUser: string; createUserName: string; @@ -286,6 +287,7 @@ export interface PlanDetailApiCaseItem { num: number; name: string; moduleId: string; + moduleName: string; createUser: string; createUserName: string; lastExecResult: LastExecuteResults; @@ -340,6 +342,7 @@ export interface PlanDetailApiScenarioItem { environmentId: string; environmentName: string; moduleId: string; + moduleName: string; createUser: string; createUserName: string; lastExecResult: LastExecuteResults; diff --git a/frontend/src/views/test-plan/testPlan/detail/apiCase/components/caseTable.vue b/frontend/src/views/test-plan/testPlan/detail/apiCase/components/caseTable.vue index 3262f1baa5..bc4af4abcc 100644 --- a/frontend/src/views/test-plan/testPlan/detail/apiCase/components/caseTable.vue +++ b/frontend/src/views/test-plan/testPlan/detail/apiCase/components/caseTable.vue @@ -144,7 +144,6 @@ import { FilterSlotNameEnum } from '@/enums/tableFilterEnum'; import { casePriorityOptions, lastReportStatusListOptions } from '@/views/api-test/components/config'; - import { getModules } from '@/views/case-management/caseManagementFeature/components/utils'; const props = defineProps<{ modulesCount: Record; // 模块数量统计对象 @@ -258,7 +257,7 @@ }, { title: 'common.belongModule', - dataIndex: 'moduleId', + dataIndex: 'moduleName', showTooltip: true, width: 200, showDrag: true, @@ -314,13 +313,7 @@ const { propsRes, propsEvent, loadList, setLoadListParams, resetSelector } = useTable( getPlanDetailApiCaseList, - tableProps.value, - (record) => { - return { - ...record, - moduleId: getModules(record.moduleId, props.moduleTree), - }; - } + tableProps.value ); const tableRef = ref>(); diff --git a/frontend/src/views/test-plan/testPlan/detail/apiScenario/components/scenarioTable.vue b/frontend/src/views/test-plan/testPlan/detail/apiScenario/components/scenarioTable.vue index af15b3850f..df984015c0 100644 --- a/frontend/src/views/test-plan/testPlan/detail/apiScenario/components/scenarioTable.vue +++ b/frontend/src/views/test-plan/testPlan/detail/apiScenario/components/scenarioTable.vue @@ -141,7 +141,6 @@ import { FilterSlotNameEnum } from '@/enums/tableFilterEnum'; import { casePriorityOptions, lastReportStatusListOptions } from '@/views/api-test/components/config'; - import { getModules } from '@/views/case-management/caseManagementFeature/components/utils'; const props = defineProps<{ modulesCount: Record; // 模块数量统计对象 @@ -239,7 +238,7 @@ }, { title: 'common.belongModule', - dataIndex: 'moduleId', + dataIndex: 'moduleName', showTooltip: true, width: 200, showDrag: true, @@ -295,13 +294,7 @@ const { propsRes, propsEvent, loadList, setLoadListParams, resetSelector } = useTable( getPlanDetailApiScenarioList, - tableProps.value, - (record) => { - return { - ...record, - moduleId: getModules(record.moduleId, props.moduleTree), - }; - } + tableProps.value ); const tableRef = ref>(); diff --git a/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue b/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue index e9431af01b..4d3d74cc28 100644 --- a/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue +++ b/frontend/src/views/test-plan/testPlan/detail/featureCase/components/caseTable.vue @@ -178,11 +178,7 @@ import { FilterSlotNameEnum } from '@/enums/tableFilterEnum'; import { casePriorityOptions } from '@/views/api-test/components/config'; - import { - executionResultMap, - getCaseLevels, - getModules, - } from '@/views/case-management/caseManagementFeature/components/utils'; + import { executionResultMap, getCaseLevels } from '@/views/case-management/caseManagementFeature/components/utils'; const props = defineProps<{ modulesCount: Record; // 模块数量统计对象 @@ -275,7 +271,7 @@ }, { title: 'common.belongModule', - dataIndex: 'moduleId', + dataIndex: 'moduleName', showTooltip: true, width: 200, showDrag: true, @@ -336,7 +332,6 @@ ...record, lastExecResult: record.lastExecResult ?? LastExecuteResults.PENDING, caseLevel: getCaseLevels(record.customFields), - moduleId: getModules(record.moduleId, props.moduleTree), }; } );