diff --git a/src/api/automationApi.js b/src/api/automationApi.js new file mode 100644 index 0000000..b76c818 --- /dev/null +++ b/src/api/automationApi.js @@ -0,0 +1,55 @@ +import request from '@/utils/request' + +/** POST /automation/plan/run — 文档字段为 camelCase */ +export function runAutomationPlan(data) { + return request({ + url: '/automation/plan/run', + method: 'post', + data: data || {} + }) +} + +/** POST /automation/case/run */ +export function runAutomationCase(data) { + return request({ + url: '/automation/case/run', + method: 'post', + data: data || {} + }) +} + +/** GET /automation/execution/list */ +export function getAutomationExecutionList(params) { + return request({ + url: '/automation/execution/list', + method: 'get', + params: params || {} + }) +} + +/** GET /automation/execution/detail */ +export function getAutomationExecutionDetail(executionId) { + return request({ + url: '/automation/execution/detail', + method: 'get', + params: { executionId } + }) +} + +/** GET /automation/execution/case/list */ +export function getAutomationExecutionCaseList(params) { + return request({ + url: '/automation/execution/case/list', + method: 'get', + params: params || {} + }) +} + +/** POST /automation/execution/poll — body 可选 { executionId },不传则轮询所有待执行任务 */ +export function postAutomationExecutionPoll(data) { + return request({ + url: '/automation/execution/poll', + method: 'post', + data: data || {} + }) +} diff --git a/src/api/planApi.js b/src/api/planApi.js index 4db8b5e..0169f1c 100644 --- a/src/api/planApi.js +++ b/src/api/planApi.js @@ -24,13 +24,13 @@ export function updatePlan(projectId, planId, data) { }) } -export function deletePlan(projectId, planId) { +/** POST /plan/delete,body 传 planId */ +export function deletePlan(planId) { return request({ url: '/plan/delete', method: 'post', data: { - project_id: projectId, - id: planId + planId } }) } diff --git a/src/components/Home.vue b/src/components/Home.vue index 7392b08..daa1ad0 100644 --- a/src/components/Home.vue +++ b/src/components/Home.vue @@ -264,6 +264,7 @@ export default { if (command === 'logout') { localStorage.removeItem('authUser') localStorage.removeItem('accessToken') + localStorage.removeItem('refreshToken') localStorage.removeItem('userMenus') this.$store.commit('ClearCurrentUser') this.$message.success('已退出登录') diff --git a/src/components/TestPlatform/Plan/PlanAutomationExecutionList.vue b/src/components/TestPlatform/Plan/PlanAutomationExecutionList.vue new file mode 100644 index 0000000..369c71a --- /dev/null +++ b/src/components/TestPlatform/Plan/PlanAutomationExecutionList.vue @@ -0,0 +1,379 @@ + + + + + diff --git a/src/components/TestPlatform/Plan/PlanAutomationRun.vue b/src/components/TestPlatform/Plan/PlanAutomationRun.vue new file mode 100644 index 0000000..3894071 --- /dev/null +++ b/src/components/TestPlatform/Plan/PlanAutomationRun.vue @@ -0,0 +1,842 @@ + + + + + diff --git a/src/components/TestPlatform/Plan/PlanBuilder.vue b/src/components/TestPlatform/Plan/PlanBuilder.vue index 385e132..9473a92 100644 --- a/src/components/TestPlatform/Plan/PlanBuilder.vue +++ b/src/components/TestPlatform/Plan/PlanBuilder.vue @@ -1,7 +1,7 @@