From 03144f2a7bf0e6b149fc6b0743021f38b32a3727 Mon Sep 17 00:00:00 2001 From: fanzhuxian <17826840660@139.com> Date: Thu, 17 Apr 2025 17:29:59 +0800 Subject: [PATCH] =?UTF-8?q?add=EF=BC=9A=E6=80=A7=E8=83=BD=E6=B5=8B?= =?UTF-8?q?=E8=AF=95-=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test-ui/src/api/performance/index.js | 8 ++ test-ui/src/api/performance/report.js | 1 + test-ui/src/router/index.js | 14 ++ .../views/test/performance/performance.vue | 2 +- .../views/test/performance/performanceAdd.vue | 1 + .../test/performance/performanceEdit.vue | 19 ++- test-ui/src/views/test/performance/report.vue | 97 +++++++++++++- .../views/test/performance/reportDetail.vue | 126 ++++++++++++++++++ 8 files changed, 258 insertions(+), 10 deletions(-) create mode 100644 test-ui/src/api/performance/report.js create mode 100644 test-ui/src/views/test/performance/reportDetail.vue diff --git a/test-ui/src/api/performance/index.js b/test-ui/src/api/performance/index.js index 78ad36e..797e654 100644 --- a/test-ui/src/api/performance/index.js +++ b/test-ui/src/api/performance/index.js @@ -45,6 +45,14 @@ export function getTestCaseList(query) { }) } +// 测试-详情 +export function getTestDetail(query) { + return request({ + url: 'test/performanceTest/' + query, + method: 'get', + }) +} + //测试-编辑 export function editTest(data) { return request({ diff --git a/test-ui/src/api/performance/report.js b/test-ui/src/api/performance/report.js new file mode 100644 index 0000000..5d1beae --- /dev/null +++ b/test-ui/src/api/performance/report.js @@ -0,0 +1 @@ +import request from '@/utils/request' \ No newline at end of file diff --git a/test-ui/src/router/index.js b/test-ui/src/router/index.js index a990dc4..71fa838 100644 --- a/test-ui/src/router/index.js +++ b/test-ui/src/router/index.js @@ -172,6 +172,20 @@ export const constantRoutes = [ } ] }, + { + path: '/performance/report/detail', + component: Layout, + hidden: true, + children: [ + { + path: '', + component: () => import('@/views/test/performance/reportDetail'), + name: 'performanceAdd', + noCache: true, + meta: { title: '修改测试', activeMenu: '/performance' } + } + ] + }, ] // 动态路由,基于用户权限动态去加载 diff --git a/test-ui/src/views/test/performance/performance.vue b/test-ui/src/views/test/performance/performance.vue index c136e76..5b01972 100644 --- a/test-ui/src/views/test/performance/performance.vue +++ b/test-ui/src/views/test/performance/performance.vue @@ -68,7 +68,7 @@ export default { }, // 编辑 hadleClickEdit(val) { - this.$tab.openPage("修改测试", "/performance/edit", { data: val }); + this.$tab.openPage("修改测试", "/performance/edit", { id: val.id }); }, // 删除 hadleClickDelete(val) { diff --git a/test-ui/src/views/test/performance/performanceAdd.vue b/test-ui/src/views/test/performance/performanceAdd.vue index 98dc477..aedaccc 100644 --- a/test-ui/src/views/test/performance/performanceAdd.vue +++ b/test-ui/src/views/test/performance/performanceAdd.vue @@ -255,6 +255,7 @@ export default { getTestCaseList(this.searchScenen).then(res => { if (res.code === 200) { this.sceneList = res.rows + this.totalScene = res.total } }) }, diff --git a/test-ui/src/views/test/performance/performanceEdit.vue b/test-ui/src/views/test/performance/performanceEdit.vue index 134639f..ff5fd18 100644 --- a/test-ui/src/views/test/performance/performanceEdit.vue +++ b/test-ui/src/views/test/performance/performanceEdit.vue @@ -29,7 +29,11 @@ @click="handleClickLoad">引用接口自动化场景 - + + +