From 81645d4387f928f4415044a90f094d37177d580c Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Tue, 30 Mar 2021 15:35:11 +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=E9=80=89=E4=B8=AD=E6=A8=A1=E5=9D=97=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E6=95=B0=E6=8D=AE=EF=BC=8C=E9=BB=98=E8=AE=A4=E6=94=BE?= =?UTF-8?q?=E5=88=B0=E5=BD=93=E5=89=8D=E9=80=89=E6=8B=A9=E7=9A=84=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/business/components/api/automation/ApiAutomation.vue | 4 ++++ .../src/business/components/api/definition/ApiDefinition.vue | 3 +++ 2 files changed, 7 insertions(+) diff --git a/frontend/src/business/components/api/automation/ApiAutomation.vue b/frontend/src/business/components/api/automation/ApiAutomation.vue index 556fa95b77..180b05750b 100644 --- a/frontend/src/business/components/api/automation/ApiAutomation.vue +++ b/frontend/src/business/components/api/automation/ApiAutomation.vue @@ -197,6 +197,10 @@ currentScenario.apiScenarioModuleId = this.nodeTree[0].id; currentScenario.modulePath = this.nodeTree[0].path; } + + if (this.selectNodeIds && this.selectNodeIds.length > 0) { + currentScenario.apiScenarioModuleId = this.selectNodeIds[0]; + } this.tabs.push({label: label, name: name, currentScenario: currentScenario}); } if (tab.name === 'edit') { diff --git a/frontend/src/business/components/api/definition/ApiDefinition.vue b/frontend/src/business/components/api/definition/ApiDefinition.vue index 659458f6cb..3abdc02222 100644 --- a/frontend/src/business/components/api/definition/ApiDefinition.vue +++ b/frontend/src/business/components/api/definition/ApiDefinition.vue @@ -302,6 +302,9 @@ api.moduleId = this.nodeTree[0].id; api.modulePath = this.nodeTree[0].path; } + if (this.selectNodeIds && this.selectNodeIds.length > 0) { + api.moduleId = this.selectNodeIds[0]; + } this.handleTabsEdit(this.$t('api_test.definition.request.title'), e, api); }, handleTabClose() {