From 87bb3af12c45a312e087d4d68a009c5143d246c2 Mon Sep 17 00:00:00 2001 From: fanzhuxian Date: Thu, 17 Apr 2025 10:55:01 +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=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test-ui/src/api/performance/index.js | 63 +++ test-ui/src/router/index.js | 28 ++ .../views/test/performance/performance.vue | 135 +++++- .../views/test/performance/performanceAdd.vue | 431 ++++++++++++++++++ .../test/performance/performanceEdit.vue | 431 ++++++++++++++++++ test-ui/src/views/test/performance/report.vue | 9 + test-ui/vue.config.js | 2 +- 7 files changed, 1094 insertions(+), 5 deletions(-) create mode 100644 test-ui/src/api/performance/index.js create mode 100644 test-ui/src/views/test/performance/performanceAdd.vue create mode 100644 test-ui/src/views/test/performance/performanceEdit.vue create mode 100644 test-ui/src/views/test/performance/report.vue diff --git a/test-ui/src/api/performance/index.js b/test-ui/src/api/performance/index.js new file mode 100644 index 0000000..78ad36e --- /dev/null +++ b/test-ui/src/api/performance/index.js @@ -0,0 +1,63 @@ +import request from '@/utils/request' + +// 测试-列表查询 +export function getPerfromanceList(query) { + return request({ + url: '/test/performanceTest/list', + method: 'get', + params: query + }) +} + +// 测试-列表删除 +export function deleteTest(data) { + return request({ + url: '/test/performanceTest/' + data, + method: 'put', + data: data + }) +} + +// 测试-列表新增 +export function addTest(data) { + return request({ + url: '/test/performanceTest/add', + method: 'post', + data: data + }) +} + +// 测试-列表新增并执行 +export function addAndExecuteTest(data) { + return request({ + url: '/test/performanceTest/addAndExecute', + method: 'post', + data: data + }) +} + +// 引用接口自动化场景 +export function getTestCaseList(query) { + return request({ + url: '/test/performanceTest/testCaseList', + method: 'get', + params: query + }) +} + +//测试-编辑 +export function editTest(data) { + return request({ + url: '/test/performanceTest', + method: 'put', + data: data + }) +} +//测试-编辑-保存并执行 +export function editAndExecuteTest(data) { + return request({ + url: '/test/performanceTest/editAndExecute', + method: 'put', + data: data + }) +} \ No newline at end of file diff --git a/test-ui/src/router/index.js b/test-ui/src/router/index.js index 0bad751..a990dc4 100644 --- a/test-ui/src/router/index.js +++ b/test-ui/src/router/index.js @@ -144,6 +144,34 @@ export const constantRoutes = [ } ] }, + { + path: '/performance/add', + component: Layout, + hidden: true, + children: [ + { + path: '', + component: () => import('@/views/test/performance/performanceAdd'), + name: 'performanceAdd', + noCache: true, + meta: { title: '新增测试', activeMenu: '/performance' } + } + ] + }, + { + path: '/performance/edit', + component: Layout, + hidden: true, + children: [ + { + path: '', + component: () => import('@/views/test/performance/performanceEdit'), + 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 b9fb326..c136e76 100644 --- a/test-ui/src/views/test/performance/performance.vue +++ b/test-ui/src/views/test/performance/performance.vue @@ -1,11 +1,138 @@ - - + diff --git a/test-ui/src/views/test/performance/performanceAdd.vue b/test-ui/src/views/test/performance/performanceAdd.vue new file mode 100644 index 0000000..98dc477 --- /dev/null +++ b/test-ui/src/views/test/performance/performanceAdd.vue @@ -0,0 +1,431 @@ + + + + + + diff --git a/test-ui/src/views/test/performance/performanceEdit.vue b/test-ui/src/views/test/performance/performanceEdit.vue new file mode 100644 index 0000000..134639f --- /dev/null +++ b/test-ui/src/views/test/performance/performanceEdit.vue @@ -0,0 +1,431 @@ + + + + + + diff --git a/test-ui/src/views/test/performance/report.vue b/test-ui/src/views/test/performance/report.vue new file mode 100644 index 0000000..03903fc --- /dev/null +++ b/test-ui/src/views/test/performance/report.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/test-ui/vue.config.js b/test-ui/vue.config.js index 363380a..a5d9a52 100644 --- a/test-ui/vue.config.js +++ b/test-ui/vue.config.js @@ -35,7 +35,7 @@ module.exports = { proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { - target: `http://localhost:8080`, + target: `http://ah.qyyh.net:1371/prod-api/`, changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: ''