From 58c01e13fda0e2766c95477569e601ec8f3c4083 Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Fri, 9 Aug 2024 18:23:02 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3API=E7=94=A8=E4=BE=8B=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E4=BA=A4=E4=BA=92=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/enums/routeEnum.ts | 1 - frontend/src/router/routes/modules/apiTest.ts | 20 - .../api-test/components/executeButton.vue | 2 +- .../components/management/api/index.vue | 8 +- .../management/case/apiCaseDetail.vue | 432 ------------------ .../components/management/case/caseDetail.vue | 144 +++--- .../components/management/case/caseTable.vue | 17 +- .../components/management/index.vue | 2 + 8 files changed, 97 insertions(+), 529 deletions(-) delete mode 100644 frontend/src/views/api-test/management/components/management/case/apiCaseDetail.vue diff --git a/frontend/src/enums/routeEnum.ts b/frontend/src/enums/routeEnum.ts index 66b0573de5..6121fb7a64 100644 --- a/frontend/src/enums/routeEnum.ts +++ b/frontend/src/enums/routeEnum.ts @@ -3,7 +3,6 @@ export enum ApiTestRouteEnum { API_TEST_DEBUG_MANAGEMENT = 'apiTestDebug', API_TEST_MANAGEMENT = 'apiTestManagement', API_TEST_MANAGEMENT_RECYCLE = 'apiTestManagementRecycle', - API_TEST_MANAGEMENT_CASE_DETAIL = 'apiTestManagementCaseDetail', API_TEST_SCENARIO = 'apiTestScenario', API_TEST_SCENARIO_RECYCLE = 'apiTestScenarioRecycle', API_TEST_REPORT = 'apiTestReport', diff --git a/frontend/src/router/routes/modules/apiTest.ts b/frontend/src/router/routes/modules/apiTest.ts index aa0f8c09c2..67e57619f3 100644 --- a/frontend/src/router/routes/modules/apiTest.ts +++ b/frontend/src/router/routes/modules/apiTest.ts @@ -64,26 +64,6 @@ const ApiTest: AppRouteRecordRaw = { ], }, }, - // 接口定义-API-用例-用例列表详情 - { - path: 'caseDetail', - name: ApiTestRouteEnum.API_TEST_MANAGEMENT_CASE_DETAIL, - component: () => import('@/views/api-test/management/components/management/case/apiCaseDetail.vue'), - meta: { - locale: 'case.apiCaseDetail', - roles: ['PROJECT_API_DEFINITION:READ'], - breadcrumbs: [ - { - name: ApiTestRouteEnum.API_TEST_MANAGEMENT, - locale: 'case.apiCaseList', - }, - { - name: ApiTestRouteEnum.API_TEST_MANAGEMENT_CASE_DETAIL, - locale: 'case.apiCaseDetail', - }, - ], - }, - }, { path: 'scenario', name: ApiTestRouteEnum.API_TEST_SCENARIO, diff --git a/frontend/src/views/api-test/components/executeButton.vue b/frontend/src/views/api-test/components/executeButton.vue index 63d69fbb5d..80d4d1b879 100644 --- a/frontend/src/views/api-test/components/executeButton.vue +++ b/frontend/src/views/api-test/components/executeButton.vue @@ -24,7 +24,7 @@ > {{ t('apiTestDebug.serverExec') }} - + {{ t('common.stop') }} diff --git a/frontend/src/views/api-test/management/components/management/api/index.vue b/frontend/src/views/api-test/management/components/management/api/index.vue index 3d288fa589..983c065873 100644 --- a/frontend/src/views/api-test/management/components/management/api/index.vue +++ b/frontend/src/views/api-test/management/components/management/api/index.vue @@ -89,6 +89,7 @@ :offspring-ids="props.offspringIds" :member-options="memberOptions" :height-used="32" + @open-case-tab="openCaseTab" /> (); const userStore = useUserStore(); @@ -278,6 +280,10 @@ errorMessageInfo: {}, }; + function openCaseTab(record: ApiCaseDetail | string) { + emit('openCaseTab', record as ApiCaseDetail); + } + function addApiTab(defaultProps?: Partial) { const id = `definition-${Date.now()}`; const protocol = localStorage.getItem(ProtocolKeyEnum.API_NEW_PROTOCOL); diff --git a/frontend/src/views/api-test/management/components/management/case/apiCaseDetail.vue b/frontend/src/views/api-test/management/components/management/case/apiCaseDetail.vue deleted file mode 100644 index d78a5a03cf..0000000000 --- a/frontend/src/views/api-test/management/components/management/case/apiCaseDetail.vue +++ /dev/null @@ -1,432 +0,0 @@ - - - - - diff --git a/frontend/src/views/api-test/management/components/management/case/caseDetail.vue b/frontend/src/views/api-test/management/components/management/case/caseDetail.vue index daa01a95df..00c77bf05d 100644 --- a/frontend/src/views/api-test/management/components/management/case/caseDetail.vue +++ b/frontend/src/views/api-test/management/components/management/case/caseDetail.vue @@ -1,65 +1,84 @@