From 4b14f649a972ef93269ae7b6a9e22df8bdbc1b53 Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Mon, 17 Jun 2024 19:50:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E6=8A=A5?= =?UTF-8?q?=E5=91=8Abug&=E6=8A=A5=E5=91=8A=E6=98=8E=E7=BB=86=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E9=97=AE=E9=A2=98&=E7=8A=B6=E6=80=81=E7=AD=89?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ms-minders/testPlanMinder/index.vue | 13 ++- frontend/src/models/testPlan/testPlan.ts | 1 + .../detail/component/executeAnalysis.vue | 8 +- .../detail/component/reportDetailTable.vue | 7 +- .../testPlan/components/actionModal.vue | 7 +- .../testPlan/components/planTable.vue | 109 +++++++++++++----- .../testPlan/components/statusProgress.vue | 5 +- .../views/test-plan/testPlan/locale/en-US.ts | 3 + .../views/test-plan/testPlan/locale/zh-CN.ts | 3 + .../planGroup/createAndUpdatePlanGroup.vue | 2 +- 10 files changed, 119 insertions(+), 39 deletions(-) diff --git a/frontend/src/components/business/ms-minders/testPlanMinder/index.vue b/frontend/src/components/business/ms-minders/testPlanMinder/index.vue index f12eb6c237..4ecc74a8a0 100644 --- a/frontend/src/components/business/ms-minders/testPlanMinder/index.vue +++ b/frontend/src/components/business/ms-minders/testPlanMinder/index.vue @@ -579,11 +579,20 @@ function writeAssociateCases(param: AssociateCaseRequest) { selectedAssociateCasesParams.value = { ...param }; const node: PlanMinderNode = window.minder.getSelectedNode(); + let associateType: string = ''; + // TODO 类型对应的上 但是node保存的时候节点好像不太对 + if (node.data.type === PlanMinderCollectionType.SCENARIO) { + associateType = PlanMinderAssociateType.SCENARIO_CASE; + } else { + associateType = + node.data.type === PlanMinderCollectionType.API && param.associateApiType + ? param.associateApiType + : node.data.type; + } node.data.associateDTOS = [ { ids: param.selectIds, - associateType: - node.data.type === PlanMinderCollectionType.SCENARIO ? PlanMinderAssociateType.SCENARIO_CASE : node.data.type, + associateType, }, ]; caseAssociateVisible.value = false; diff --git a/frontend/src/models/testPlan/testPlan.ts b/frontend/src/models/testPlan/testPlan.ts index 7cf10b233d..a3a1e74eb9 100644 --- a/frontend/src/models/testPlan/testPlan.ts +++ b/frontend/src/models/testPlan/testPlan.ts @@ -37,6 +37,7 @@ export interface AssociateCaseRequest extends BatchApiParams { apiScenarioSelectIds?: string[]; totalCount?: number; testPlanId?: string; + associateApiType?: string; } export type AssociateCaseRequestType = Pick; diff --git a/frontend/src/views/test-plan/report/detail/component/executeAnalysis.vue b/frontend/src/views/test-plan/report/detail/component/executeAnalysis.vue index d89452eeb9..05a220f446 100644 --- a/frontend/src/views/test-plan/report/detail/component/executeAnalysis.vue +++ b/frontend/src/views/test-plan/report/detail/component/executeAnalysis.vue @@ -4,7 +4,7 @@ size="160px" :legend-data="legendData" :options="executeCharOptions" - :request-total="getIndicators(detail.caseTotal) || 0" + :request-total="getIndicators(getTotal) || 0" /> @@ -97,6 +97,12 @@ }) as unknown as LegendData[]; } + const getTotal = computed(() => { + const { executeCount } = props.detail; + const { success, error, fakeError, pending, block } = executeCount; + return success + error + fakeError + pending + block; + }); + watchEffect(() => { if (props.detail) { initExecuteOptions(); diff --git a/frontend/src/views/test-plan/report/detail/component/reportDetailTable.vue b/frontend/src/views/test-plan/report/detail/component/reportDetailTable.vue index 1163b62476..75460959b8 100644 --- a/frontend/src/views/test-plan/report/detail/component/reportDetailTable.vue +++ b/frontend/src/views/test-plan/report/detail/component/reportDetailTable.vue @@ -21,7 +21,7 @@ {{ t('report.detail.testPlanGroup.viewReport') }} - +