From be16db368908f33787a20ea67233e722b2397c8a Mon Sep 17 00:00:00 2001 From: teukkk Date: Tue, 14 May 2024 11:44:26 +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=E8=AF=A6=E6=83=85-?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E8=AF=A6=E6=83=85=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/config/pathMap.ts | 7 + frontend/src/enums/routeEnum.ts | 1 + frontend/src/locale/zh-CN/common.ts | 2 + frontend/src/models/testPlan/testPlan.ts | 3 +- .../src/router/routes/modules/testPlan.ts | 26 +++ .../featureCase/components/caseTable.vue | 26 ++- .../detail/featureCase/detail/index.vue | 218 ++++++++++++++++++ 7 files changed, 278 insertions(+), 5 deletions(-) create mode 100644 frontend/src/views/test-plan/testPlan/detail/featureCase/detail/index.vue diff --git a/frontend/src/config/pathMap.ts b/frontend/src/config/pathMap.ts index 8fdb0900c9..e461476ac0 100644 --- a/frontend/src/config/pathMap.ts +++ b/frontend/src/config/pathMap.ts @@ -965,6 +965,13 @@ export const pathMap: PathMapItem[] = [ permission: [], level: MENU_LEVEL[2], }, + { + key: 'TEST_PLAN_INDEX_DETAIL_FEATURE_CASE_DETAIL', // 测试计划-测试计划-测试计划详情-功能用例详情 + locale: 'menu.caseManagement.caseManagementCaseDetail', + route: RouteEnum.TEST_PLAN_INDEX_DETAIL_FEATURE_CASE_DETAIL, + permission: [], + level: MENU_LEVEL[2], + }, ], }, { diff --git a/frontend/src/enums/routeEnum.ts b/frontend/src/enums/routeEnum.ts index be03ffee8e..5c5f1380b2 100644 --- a/frontend/src/enums/routeEnum.ts +++ b/frontend/src/enums/routeEnum.ts @@ -62,6 +62,7 @@ export enum TestPlanRouteEnum { TEST_PLAN = 'testPlan', TEST_PLAN_INDEX = 'testPlanIndex', TEST_PLAN_INDEX_DETAIL = 'testPlanIndexDetail', + TEST_PLAN_INDEX_DETAIL_FEATURE_CASE_DETAIL = 'testPlanIndexDetailFeatureCaseDetail', } export enum UITestRouteEnum { diff --git a/frontend/src/locale/zh-CN/common.ts b/frontend/src/locale/zh-CN/common.ts index 1c50880908..53b66f7dd0 100644 --- a/frontend/src/locale/zh-CN/common.ts +++ b/frontend/src/locale/zh-CN/common.ts @@ -171,4 +171,6 @@ export default { 'common.belongModule': '所属模块', 'common.moreSetting': '更多设置', 'common.executionResult': '执行结果', + 'common.detail': '详情', + 'common.baseInfo': '基本信息', }; diff --git a/frontend/src/models/testPlan/testPlan.ts b/frontend/src/models/testPlan/testPlan.ts index 0163f2980e..e5546a38e3 100644 --- a/frontend/src/models/testPlan/testPlan.ts +++ b/frontend/src/models/testPlan/testPlan.ts @@ -1,5 +1,6 @@ import type { customFieldsItem } from '@/models/caseManagement/featureCase'; import type { TableQueryParams } from '@/models/common'; +import { LastExecuteResults } from '@/enums/caseEnum'; import { BatchApiParams } from '../common'; @@ -133,7 +134,7 @@ export interface PlanDetailFeatureCaseItem { versionName: string; createUser: string; createUserName: string; - lastExecResult: string; + lastExecResult: LastExecuteResults; lastExecTime: number; executeUser: string; executeUserName: string; diff --git a/frontend/src/router/routes/modules/testPlan.ts b/frontend/src/router/routes/modules/testPlan.ts index 67ed915dba..bc59f213b2 100644 --- a/frontend/src/router/routes/modules/testPlan.ts +++ b/frontend/src/router/routes/modules/testPlan.ts @@ -47,6 +47,32 @@ const TestPlan: AppRouteRecordRaw = { ], }, }, + // 测试计划-测试计划详情-功能用例详情 + { + path: 'testPlanIndexDetailFeatureCaseDetail', + name: TestPlanRouteEnum.TEST_PLAN_INDEX_DETAIL_FEATURE_CASE_DETAIL, + component: () => import('@/views/test-plan/testPlan/detail/featureCase/detail/index.vue'), + meta: { + locale: 'menu.testPlan.testPlanDetail', + roles: ['PROJECT_TEST_PLAN:READ'], + breadcrumbs: [ + { + name: TestPlanRouteEnum.TEST_PLAN_INDEX, + locale: 'menu.testPlan', + }, + { + name: TestPlanRouteEnum.TEST_PLAN_INDEX_DETAIL, + locale: 'menu.testPlan.testPlanDetail', + isBack: true, + query: ['id'], + }, + { + name: TestPlanRouteEnum.TEST_PLAN_INDEX_DETAIL_FEATURE_CASE_DETAIL, + locale: 'menu.caseManagement.caseManagementCaseDetail', + }, + ], + }, + }, ], }; 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 ccdfa1ade8..3a63c47744 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 @@ -18,7 +18,7 @@