From 7cd44b8371a7cda40f10a7ff244cddc4b7a680b9 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Fri, 2 Jul 2021 13:29:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=20=E4=BF=AE=E5=A4=8D=E5=9C=BA=E6=99=AF=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E6=97=B6=E4=BC=9A=E8=A7=A6=E5=8F=91=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E6=8F=90=E4=BA=A4=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复场景调试时会触发表单重复提交的问题 --- .../components/api/automation/scenario/DebugRun.vue | 1 + .../api/automation/scenario/EditApiScenario.vue | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend/src/business/components/api/automation/scenario/DebugRun.vue b/frontend/src/business/components/api/automation/scenario/DebugRun.vue index b94ccd5461..630a4a7a3c 100644 --- a/frontend/src/business/components/api/automation/scenario/DebugRun.vue +++ b/frontend/src/business/components/api/automation/scenario/DebugRun.vue @@ -47,6 +47,7 @@ import {saveScenario} from "@/business/components/api/automation/api-automation" saveScenario('/api/automation/run/debug', reqObj, this.runData.hashTree, (response) => { this.runId = response.data; this.$emit('runRefresh', {}); + this.$emit("changeDebugButton"); }); }, } diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index d92cdd4c7d..a16a12698d 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -146,7 +146,7 @@ {{ $t('api_test.request.debug') }} + @click="runDebug" :loading="buttonIsLoading">{{ $t('api_test.request.debug') }} @@ -231,6 +231,7 @@ { + this.buttonIsLoading = true; if (valid) { let definition = JSON.parse(JSON.stringify(this.currentScenario)); definition.hashTree = this.scenarioDefinition; @@ -915,15 +918,21 @@ export default { onSampleError: this.onSampleError, }; this.reportId = getUUID().substring(0, 8); + // this.editScenario().then(() => { // // }) }) }) + }else { + this.buttonIsLoading = false; } }) }, + changeDebugButton(){ + this.buttonIsLoading = false; + }, getEnvironments() { if (this.projectId) { this.$get('/api/environment/list/' + this.projectId, response => {