From c9a3d013fe6a2faa19c579ec6b9a0857c9bce3be Mon Sep 17 00:00:00 2001 From: BugKing Date: Fri, 24 Dec 2021 16:14:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E8=B0=83=E8=AF=95=E6=97=B6=E5=85=88=E5=BB=BA=E7=AB=8Bws?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=EF=BC=8C=E9=81=BF=E5=85=8D=E6=8E=A5=E6=94=B6?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E7=BB=93=E6=9E=9C=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/api/automation/scenario/DebugRun.vue | 2 +- .../components/api/definition/components/Run.vue | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/business/components/api/automation/scenario/DebugRun.vue b/frontend/src/business/components/api/automation/scenario/DebugRun.vue index 73809f104a..9954520769 100644 --- a/frontend/src/business/components/api/automation/scenario/DebugRun.vue +++ b/frontend/src/business/components/api/automation/scenario/DebugRun.vue @@ -73,9 +73,9 @@ export default { scenarioId: this.runData.id, testElement: testPlan, projectId: getCurrentProjectID(), environmentMap: strMapToObj(map), environmentType: this.environmentType, environmentGroupId: this.environmentGroupId, environmentJson: JSON.stringify(strMapToObj(map)) }; + this.$emit('runRefresh', {}); saveScenario('/api/automation/run/debug', reqObj, this.runData.hashTree, this, (response) => { this.runId = response.data; - this.$emit('runRefresh', {}); }); }, } diff --git a/frontend/src/business/components/api/definition/components/Run.vue b/frontend/src/business/components/api/definition/components/Run.vue index c221265768..c9716c6443 100644 --- a/frontend/src/business/components/api/definition/components/Run.vue +++ b/frontend/src/business/components/api/definition/components/Run.vue @@ -137,13 +137,13 @@ export default { } else { url = "/api/definition/run"; } + if (this.debug) { + this.debugSocket(); + } else { + this.initWebSocket(); + } this.$fileUpload(url, null, bodyFiles, reqObj, response => { this.requestResult = response.data; - if (this.debug) { - this.debugSocket(); - } else { - this.initWebSocket(); - } this.$emit('autoCheckStatus'); // 执行结束后,自动更新计划状态 }, error => { this.$emit('errorRefresh', {});