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') }} - +