diff --git a/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue b/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue index 8e0f786a2c..b2af374138 100644 --- a/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue +++ b/api-test/frontend/src/business/automation/scenario/component/ApiComponent.vue @@ -273,6 +273,13 @@ export default { this.request.projectId = getCurrentProjectID(); } this.request.customizeReq = this.isCustomizeReq; + if (this.request.customizeReq) { + if (this.node.parent && this.node.parent.data && this.node.parent.data.length > 1) { + this.request.projectId = getCurrentProjectID(); + }else { + this.request.projectId = this.node.parent.data.projectId; + } + } if (this.currentScenario) { this.request.currentScenarioId = this.currentScenario.id; } diff --git a/api-test/frontend/src/business/definition/components/request/database/BasisParameters.vue b/api-test/frontend/src/business/definition/components/request/database/BasisParameters.vue index 15d081906b..3b546a12e2 100644 --- a/api-test/frontend/src/business/definition/components/request/database/BasisParameters.vue +++ b/api-test/frontend/src/business/definition/components/request/database/BasisParameters.vue @@ -337,7 +337,7 @@ export default { runTest() {}, itselfEnvironment(environmentId) { let id = this.request.projectId ? this.request.projectId : this.projectId; - getEnvironmentByProjectId(this.projectId).then((response) => { + getEnvironmentByProjectId(id).then((response) => { this.environments = response.data; let targetDataSourceName = undefined; let currentEnvironment = undefined;