From 07f1671ecb496532ad3bd1d42e83f7e635a9a4d5 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Tue, 22 Mar 2022 19:36:47 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9B=B4=E5=A4=9A=E6=93=8D=E4=BD=9C=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E6=8E=A5=E5=8F=A3=E9=80=89=E6=8B=A9=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E4=B8=BA=E7=A9=BA=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/api/automation/scenario/EditApiScenario.vue | 3 +++ .../components/api/definition/components/basis/AddBasisApi.vue | 2 +- .../api/definition/components/complete/EditCompleteHTTPApi.vue | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index 9006320513..5dd58dabd5 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -534,6 +534,9 @@ export default { if (!this.currentScenario.apiScenarioModuleId) { this.currentScenario.apiScenarioModuleId = ""; } + if (this.currentScenario.apiScenarioModuleId === 'default-module') { + this.currentScenario.apiScenarioModuleId = this.moduleOptions[0].id; + } this.debug = false; this.debugLoading = false; if (this.stepFilter) { diff --git a/frontend/src/business/components/api/definition/components/basis/AddBasisApi.vue b/frontend/src/business/components/api/definition/components/basis/AddBasisApi.vue index 14791020af..57585fd94a 100644 --- a/frontend/src/business/components/api/definition/components/basis/AddBasisApi.vue +++ b/frontend/src/business/components/api/definition/components/basis/AddBasisApi.vue @@ -172,7 +172,7 @@ this.httpForm.request.method = this.httpForm.method; this.httpForm.request.path = this.httpForm.path; } - if (this.currentModule != null) { + if (this.currentModule != null && this.currentModule.id) { this.httpForm.modulePath = this.currentModule.method != undefined ? this.currentModule.method : null; this.httpForm.moduleId = this.currentModule.id; } else { diff --git a/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue b/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue index 862d29f571..c8b2a04d86 100644 --- a/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue +++ b/frontend/src/business/components/api/definition/components/complete/EditCompleteHTTPApi.vue @@ -698,6 +698,9 @@ export default { if (!this.basisData.environmentId) { this.basisData.environmentId = ""; } + if (this.basisData.moduleId && this.basisData.moduleId === 'default-module') { + this.basisData.moduleId = this.moduleOptions[0].id; + } this.httpForm = JSON.parse(JSON.stringify(this.basisData)); this.$get('/api/definition/follow/' + this.basisData.id, response => { this.httpForm.follows = response.data;