From ec2ac6defe866af26db046cb5b312c29ca5dfca9 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Wed, 21 Sep 2022 17:51:10 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=9C=BA=E6=99=AF=E7=BC=96=E8=BE=91-?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E5=AF=BC=E5=85=A5/=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=AF=BC=E5=85=A5-=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E7=A9=BA=E9=97=B4=E5=90=8E=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E6=A8=A1=E5=9D=97-=E6=A8=A1=E5=9D=97=E6=A0=91=E5=8F=91?= =?UTF-8?q?=E7=94=9F=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001017124 --- .../automation/scenario/ApiScenarioModule.vue | 19 ++++++++++++++++--- .../scenario/api/ScenarioRelevance.vue | 1 + 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/frontend/src/business/components/api/automation/scenario/ApiScenarioModule.vue b/frontend/src/business/components/api/automation/scenario/ApiScenarioModule.vue index f26b3b9f08..6714c01f82 100644 --- a/frontend/src/business/components/api/automation/scenario/ApiScenarioModule.vue +++ b/frontend/src/business/components/api/automation/scenario/ApiScenarioModule.vue @@ -84,6 +84,12 @@ export default { default() { return true; } + }, + selectProjectId: { + type: String, + default() { + return getCurrentProjectID(); + } } }, computed: { @@ -94,7 +100,11 @@ export default { return this.relevanceProjectId ? true : false; }, projectId() { - return getCurrentProjectID(); + if (this.selectProjectId) { + return this.selectProjectId; + } else { + return getCurrentProjectID(); + } } }, data() { @@ -178,15 +188,18 @@ export default { this.$refs.nodeTree.filter(this.condition.filterText); }, list(projectId) { + if (!projectId) { + projectId = this.projectId ? this.projectId : getCurrentProjectID(); + } let url = undefined; if (this.isPlanModel) { url = '/api/automation/module/list/plan/' + this.planId; } else if (this.isRelevanceModel) { url = "/api/automation/module/list/" + this.relevanceProjectId; } else if (this.isTrashData) { - url = "/api/automation/module/trash/list/" + (projectId ? projectId : this.projectId); + url = "/api/automation/module/trash/list/" + projectId; } else { - url = "/api/automation/module/list/" + (projectId ? projectId : this.projectId); + url = "/api/automation/module/list/" + projectId; if (!this.projectId) { return; } diff --git a/frontend/src/business/components/api/automation/scenario/api/ScenarioRelevance.vue b/frontend/src/business/components/api/automation/scenario/api/ScenarioRelevance.vue index d12cd5d553..d2923d857b 100644 --- a/frontend/src/business/components/api/automation/scenario/api/ScenarioRelevance.vue +++ b/frontend/src/business/components/api/automation/scenario/api/ScenarioRelevance.vue @@ -13,6 +13,7 @@ @setModuleOptions="setModuleOptions" @enableTrash="false" :is-read-only="true" + :select-project-id="projectId" ref="nodeTree"/>