From 45478e153d549e6ab38cd5db84233017123e0398 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Tue, 15 Jun 2021 10:01:08 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=20=E6=89=B9=E9=87=8F=E6=89=A7=E8=A1=8C=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=BC=B9=E5=87=BA=E4=BB=BB=E5=8A=A1=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/automation/scenario/ApiScenarioList.vue | 6 +++++- frontend/src/business/components/task/TaskCenter.vue | 3 +++ .../track/plan/view/comonents/api/TestPlanApiCaseList.vue | 8 ++++++-- .../plan/view/comonents/api/TestPlanApiScenarioList.vue | 7 ++++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue index 3dbc9dd90d..ca7253177e 100644 --- a/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue +++ b/frontend/src/business/components/api/automation/scenario/ApiScenarioList.vue @@ -175,6 +175,7 @@ :dialog-title="$t('test_track.case.batch_edit_case')"/> + @@ -198,6 +199,7 @@ import {API_SCENARIO_LIST, PROJECT_NAME, WORKSPACE_ID} from "../../../../../comm import EnvironmentSelect from "../../definition/components/environment/EnvironmentSelect"; import BatchMove from "../../../track/case/components/BatchMove"; import MsRunMode from "./common/RunMode"; +import MsTaskCenter from "../../../task/TaskCenter"; import { getCustomTableHeader, getCustomTableWidth, @@ -230,7 +232,8 @@ export default { MsScenarioExtendButtons, MsTestPlanList, MsTableOperatorButton, - MsRunMode + MsRunMode, + MsTaskCenter }, props: { referenced: { @@ -619,6 +622,7 @@ export default { if (this.batchReportId) { this.result.loading = false; this.$success("批量执行成功,请到报告页面查看详情!"); + this.$refs.taskCenter.open(); } }, buildBatchParam(param) { diff --git a/frontend/src/business/components/task/TaskCenter.vue b/frontend/src/business/components/task/TaskCenter.vue index 2f9e165a15..4a8616cbe4 100644 --- a/frontend/src/business/components/task/TaskCenter.vue +++ b/frontend/src/business/components/task/TaskCenter.vue @@ -106,6 +106,9 @@ export default { close() { this.visible = false; }, + open(){ + this.showTaskCenter(); + }, getPercentage(status) { if (status === 'Saved' || status === 'Completed' || status === 'success' || status === 'error') { return 100; diff --git a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiCaseList.vue b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiCaseList.vue index b56b7a8db8..aa8c84d09a 100644 --- a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiCaseList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiCaseList.vue @@ -161,6 +161,7 @@ + @@ -205,7 +206,7 @@ import {Test_Plan_Api_Case} from "@/business/components/common/model/JsonData"; import HeaderLabelOperate from "@/business/components/common/head/HeaderLabelOperate"; import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover"; import MsPlanRunMode from "../../../common/PlanRunMode"; - +import MsTaskCenter from "../../../../../task/TaskCenter"; export default { name: "TestPlanApiCaseList", @@ -228,7 +229,8 @@ export default { MsBottomContainer, ShowMoreBtn, MsTableHeaderSelectPopover, - MsPlanRunMode + MsPlanRunMode, + MsTaskCenter }, data() { return { @@ -624,6 +626,7 @@ export default { let bodyFiles = getBodyUploadFiles(reqObj, this.runData); this.$fileUpload("/api/definition/run", null, bodyFiles, reqObj, response => { this.$message('任务执行中,请稍后刷新查看结果'); + this.$refs.taskCenter.open(); }); } else { testPlan.serializeThreadgroups = false; @@ -643,6 +646,7 @@ export default { let bodyFiles = getBodyUploadFiles(reqObj, this.runData); this.$fileUpload("/api/definition/run", null, bodyFiles, reqObj, response => { this.$message('任务执行中,请稍后刷新查看结果'); + this.$refs.taskCenter.open(); }); } this.search(); diff --git a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue index ee04dc6649..4a47431edf 100644 --- a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue @@ -127,6 +127,7 @@ + @@ -164,6 +165,7 @@ import MsPlanRunMode from "../../../common/PlanRunMode"; import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover"; import PriorityTableItem from "@/business/components/track/common/tableItems/planview/PriorityTableItem"; import {API_SCENARIO_FILTERS} from "@/common/js/table-constants"; +import MsTaskCenter from "../../../../../task/TaskCenter"; export default { name: "MsTestPlanApiScenarioList", @@ -183,7 +185,8 @@ export default { MsTestPlanList, BatchEdit, MsPlanRunMode, - MsTableHeaderSelectPopover + MsTableHeaderSelectPopover, + MsTaskCenter }, props: { referenced: { @@ -350,6 +353,7 @@ export default { }); this.$post("/test/case/review/scenario/case/run", param, response => { this.$message('任务执行中,请稍后刷新查看结果'); + this.$refs.taskCenter.open(); }); } if (this.planId) { @@ -362,6 +366,7 @@ export default { param.triggerMode = "BATCH"; this.$post("/test/plan/scenario/case/run", param, response => { this.$message('任务执行中,请稍后刷新查看结果'); + this.$refs.taskCenter.open(); }); } this.search();