From fed0ce3e10b87e504fedbd29a0cbc455918cae88 Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Fri, 14 Jun 2024 22:56:19 +0800 Subject: [PATCH] =?UTF-8?q?feat(=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=E6=8A=A5=E5=91=8A=E8=81=94?= =?UTF-8?q?=E8=B0=83(=E4=B8=8D=E5=8C=85=E5=90=AB=E8=81=9A=E5=90=88?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=E6=8A=A5=E5=91=8A=E6=98=8E=E7=BB=86)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/modules/test-plan/report.ts | 9 + frontend/src/api/requrls/test-plan/report.ts | 4 + .../ms-associate-case/apiCaseTable.vue | 7 + .../business/ms-associate-case/apiTable.vue | 7 + .../business/ms-associate-case/caseTable.vue | 7 + .../ms-associate-case/scenarioCaseTable.vue | 7 + .../pure/ms-advance-filter/index.vue | 9 +- frontend/src/config/testPlan.ts | 1 + frontend/src/enums/tableEnum.ts | 2 - frontend/src/models/testPlan/testPlan.ts | 1 + .../src/models/testPlan/testPlanReport.ts | 1 + .../components/bug-detail-drawer.vue | 2 +- .../components/caseDetailDrawer.vue | 2 +- .../taskCenter/component/testPlan.vue | 17 +- .../test-plan/report/component/reportList.vue | 10 +- .../detail/component/apiAndScenarioTable.vue | 38 ++--- .../report/detail/component/bugTable.vue | 8 - .../detail/component/executeAnalysis.vue | 107 ++++++++++++ .../detail/component/featureCaseTable.vue | 8 +- .../report/detail/component/planDetail.vue | 157 ++---------------- .../detail/component/planGroupDetail.vue | 104 ++---------- .../planOrGroupReport.vue} | 16 +- .../detail/component/reportDetailTable.vue | 48 ++++-- .../detail/component/scenarioCaseTable.vue | 153 ----------------- .../report/detail/component/summary.vue | 36 +++- .../report/detail/component/viewReport.vue | 47 ------ .../views/test-plan/report/detail/index.vue | 8 +- frontend/src/views/test-plan/report/utils.ts | 35 ++++ .../testPlan/components/batchMoveOrCopy.vue | 2 +- .../testPlan/components/planTable.vue | 28 +++- .../testPlan/components/scheduledModal.vue | 2 +- .../views/test-plan/testPlan/detail/index.vue | 1 + .../views/test-plan/testPlan/locale/en-US.ts | 1 + .../views/test-plan/testPlan/locale/zh-CN.ts | 1 + 34 files changed, 368 insertions(+), 518 deletions(-) create mode 100644 frontend/src/views/test-plan/report/detail/component/executeAnalysis.vue rename frontend/src/views/test-plan/report/detail/{groupReportIndex.vue => component/planOrGroupReport.vue} (60%) delete mode 100644 frontend/src/views/test-plan/report/detail/component/scenarioCaseTable.vue delete mode 100644 frontend/src/views/test-plan/report/detail/component/viewReport.vue create mode 100644 frontend/src/views/test-plan/report/utils.ts diff --git a/frontend/src/api/modules/test-plan/report.ts b/frontend/src/api/modules/test-plan/report.ts index bc5731e896..b923f39912 100644 --- a/frontend/src/api/modules/test-plan/report.ts +++ b/frontend/src/api/modules/test-plan/report.ts @@ -9,6 +9,7 @@ import { ReportBugItem, UpdateReportDetailParams, } from '@/models/testPlan/report'; +import { PlanReportDetail } from '@/models/testPlan/testPlanReport'; // 报告列表 export function reportList(data: TableQueryParams) { @@ -100,5 +101,13 @@ export function getShareApiPage(data: TableQueryParams) { export function getShareScenarioPage(data: TableQueryParams) { return MSR.post>({ url: reportUrl.ReportShareScenarioUrl, data }); } +// 测试计划-聚合报告-报告明细 +export function getReportDetailPage(data: TableQueryParams) { + return MSR.post>({ url: reportUrl.ReportDetailPageUrl, data }); +} +// 测试计划-聚合报告-报告明细-分享 +export function getReportDetailSharePage(data: TableQueryParams) { + return MSR.post>({ url: reportUrl.ReportDetailSharePageUrl, data }); +} export default {}; diff --git a/frontend/src/api/requrls/test-plan/report.ts b/frontend/src/api/requrls/test-plan/report.ts index a8fa095c7c..64fefbdf91 100644 --- a/frontend/src/api/requrls/test-plan/report.ts +++ b/frontend/src/api/requrls/test-plan/report.ts @@ -36,3 +36,7 @@ export const ReportIndependentScenarioUrl = '/test-plan/report/detail/scenario/c export const ReportShareApiUrl = '/test-plan/report/share/detail/api/case/page'; // 测试计划-独立报告-场景用例-分享 export const ReportShareScenarioUrl = '/test-plan/report/share/detail/scenario/case/page'; +// 测试计划-聚合报告-报告明细 +export const ReportDetailPageUrl = '/test-plan/report/detail/plan/report/page'; +// 测试计划-聚合报告-报告明细-分享 +export const ReportDetailSharePageUrl = '/test-plan/report/share/detail/plan/report/page'; diff --git a/frontend/src/components/business/ms-associate-case/apiCaseTable.vue b/frontend/src/components/business/ms-associate-case/apiCaseTable.vue index 01e1e5bfa3..eaa5ba0bb4 100644 --- a/frontend/src/components/business/ms-associate-case/apiCaseTable.vue +++ b/frontend/src/components/business/ms-associate-case/apiCaseTable.vue @@ -244,6 +244,11 @@ watch( () => () => props.currentProject, () => { + setPagination({ + current: 1, + }); + resetSelector(); + resetFilterParams(); loadCaseList(); } ); @@ -252,6 +257,8 @@ () => props.activeModule, (val) => { if (val) { + resetSelector(); + resetFilterParams(); loadCaseList(); } } diff --git a/frontend/src/components/business/ms-associate-case/apiTable.vue b/frontend/src/components/business/ms-associate-case/apiTable.vue index c1b0330ffe..0787bcaab0 100644 --- a/frontend/src/components/business/ms-associate-case/apiTable.vue +++ b/frontend/src/components/business/ms-associate-case/apiTable.vue @@ -206,6 +206,11 @@ watch( () => [() => props.currentProject, () => props.protocols], () => { + setPagination({ + current: 1, + }); + resetSelector(); + resetFilterParams(); loadApiList(); } ); @@ -225,6 +230,8 @@ () => props.activeModule, (val) => { if (val) { + resetSelector(); + resetFilterParams(); loadApiList(); } } diff --git a/frontend/src/components/business/ms-associate-case/caseTable.vue b/frontend/src/components/business/ms-associate-case/caseTable.vue index 510a4f2626..831008f0f9 100644 --- a/frontend/src/components/business/ms-associate-case/caseTable.vue +++ b/frontend/src/components/business/ms-associate-case/caseTable.vue @@ -283,6 +283,11 @@ () => props.currentProject, (val) => { if (val) { + setPagination({ + current: 1, + }); + resetSelector(); + resetFilterParams(); loadCaseList(); } }, @@ -295,6 +300,8 @@ () => props.activeModule, (val) => { if (val) { + resetSelector(); + resetFilterParams(); loadCaseList(); } } diff --git a/frontend/src/components/business/ms-associate-case/scenarioCaseTable.vue b/frontend/src/components/business/ms-associate-case/scenarioCaseTable.vue index 97370ac134..0fa51abdd4 100644 --- a/frontend/src/components/business/ms-associate-case/scenarioCaseTable.vue +++ b/frontend/src/components/business/ms-associate-case/scenarioCaseTable.vue @@ -243,6 +243,11 @@ () => props.currentProject, (val) => { if (val) { + setPagination({ + current: 1, + }); + resetSelector(); + resetFilterParams(); loadScenarioList(); } }, @@ -255,6 +260,8 @@ () => props.activeModule, (val) => { if (val) { + resetSelector(); + resetFilterParams(); loadScenarioList(); } } diff --git a/frontend/src/components/pure/ms-advance-filter/index.vue b/frontend/src/components/pure/ms-advance-filter/index.vue index 5b04e31d10..96c0eccc01 100644 --- a/frontend/src/components/pure/ms-advance-filter/index.vue +++ b/frontend/src/components/pure/ms-advance-filter/index.vue @@ -45,7 +45,14 @@ --> - + diff --git a/frontend/src/config/testPlan.ts b/frontend/src/config/testPlan.ts index da817c18db..27db0ba8d2 100644 --- a/frontend/src/config/testPlan.ts +++ b/frontend/src/config/testPlan.ts @@ -82,6 +82,7 @@ export const defaultReportDetail: PlanReportDetail = { functionalCount: cloneDeep(defaultCount), apiCaseCount: cloneDeep(defaultCount), apiScenarioCount: cloneDeep(defaultCount), + planCount: 0, }; export const statusConfig: StatusListType[] = [ diff --git a/frontend/src/enums/tableEnum.ts b/frontend/src/enums/tableEnum.ts index 3f56ed1938..e8185e6b80 100644 --- a/frontend/src/enums/tableEnum.ts +++ b/frontend/src/enums/tableEnum.ts @@ -72,8 +72,6 @@ export enum TableKeyEnum { TEST_PLAN_DETAIL_API_CASE = 'testPlanDetailApiCase', TEST_PLAN_DETAIL_API_SCENARIO = 'testPlanDetailApiScenario', TEST_PLAN_REPORT_TABLE = 'testPlanReportTable', - TEST_PLAN_REPORT_DETAIL_BUG = 'testPlanReportDetailBug', - TEST_PLAN_REPORT_DETAIL_FEATURE_CASE = 'testPlanReportDetailFeatureCase', TASK_API_CASE_SYSTEM = 'taskCenterApiCaseSystem', TASK_API_CASE_ORGANIZATION = 'taskCenterApiCaseOrganization', TASK_API_CASE_PROJECT = 'taskCenterApiCaseProject', diff --git a/frontend/src/models/testPlan/testPlan.ts b/frontend/src/models/testPlan/testPlan.ts index 2a1a3e3d9b..e800ebadda 100644 --- a/frontend/src/models/testPlan/testPlan.ts +++ b/frontend/src/models/testPlan/testPlan.ts @@ -147,6 +147,7 @@ export interface FollowPlanParams { export interface TestPlanBaseParams { projectId?: string; testPlanId: string; + triggerMode?: string; } export interface PlanDetailFeatureCaseItem { diff --git a/frontend/src/models/testPlan/testPlanReport.ts b/frontend/src/models/testPlan/testPlanReport.ts index 7abd6d387f..91e76b95a7 100644 --- a/frontend/src/models/testPlan/testPlanReport.ts +++ b/frontend/src/models/testPlan/testPlanReport.ts @@ -21,6 +21,7 @@ export interface PlanReportDetail { functionalCount: countDetail; apiCaseCount: countDetail; // 接口场景用例分析-用例数 apiScenarioCount: countDetail; // 接口场景用例分析-用例数 + planCount: number; } export type AnalysisType = 'FUNCTIONAL' | 'API' | 'SCENARIO'; diff --git a/frontend/src/views/bug-management/components/bug-detail-drawer.vue b/frontend/src/views/bug-management/components/bug-detail-drawer.vue index ecd4712fcc..bb00c9db09 100644 --- a/frontend/src/views/bug-management/components/bug-detail-drawer.vue +++ b/frontend/src/views/bug-management/components/bug-detail-drawer.vue @@ -2,7 +2,7 @@ {{ record.resourceNum }} @@ -37,7 +37,7 @@ v-if="!record.integrated" class="one-line-text max-w-[300px]" :class="[hasJumpPermission ? 'text-[rgb(var(--primary-5))]' : '']" - @click="showDetail()" + @click="showDetail(record.resourceId)" >{{ record.resourceName }} @@ -75,7 +75,7 @@ {{ t('project.taskCenter.viewReport') }} @@ -84,7 +84,7 @@ {{ t('project.taskCenter.viewReport') }} @@ -420,14 +420,17 @@ } } - function viewReport(id: string) { + function viewReport(id: string, type: boolean) { openNewPage(RouteEnum.TEST_PLAN_REPORT_DETAIL, { id, + type: type ? 'GROUP' : 'TEST_PLAN', }); } - function showDetail() { - // TODO + function showDetail(id: string) { + openNewPage(RouteEnum.TEST_PLAN_INDEX_DETAIL, { + id, + }); } function stop(record: any) { diff --git a/frontend/src/views/test-plan/report/component/reportList.vue b/frontend/src/views/test-plan/report/component/reportList.vue index 5f90de1a54..82587b5b67 100644 --- a/frontend/src/views/test-plan/report/component/reportList.vue +++ b/frontend/src/views/test-plan/report/component/reportList.vue @@ -36,7 +36,7 @@
{{ characterLimit(record.name) }}
@@ -56,7 +56,7 @@ @@ -420,19 +420,17 @@ /** * 报告详情 showReportDetail */ - function showReportDetail(id: string) { + function showReportDetail(id: string, type: boolean) { router.push({ name: TestPlanRouteEnum.TEST_PLAN_REPORT_DETAIL, query: { id, + type: type ? 'GROUP' : 'TEST_PLAN', }, }); } onBeforeMount(() => { - if (route.query.id) { - showReportDetail(route.query.id as string); - } initData(); }); diff --git a/frontend/src/views/test-plan/report/detail/component/apiAndScenarioTable.vue b/frontend/src/views/test-plan/report/detail/component/apiAndScenarioTable.vue index 2ea344b511..81a823051b 100644 --- a/frontend/src/views/test-plan/report/detail/component/apiAndScenarioTable.vue +++ b/frontend/src/views/test-plan/report/detail/component/apiAndScenarioTable.vue @@ -6,14 +6,14 @@ - + +