From 42c7246bc80fbce9d1229fbb1c0163dae8edb5d8 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Sun, 23 Apr 2023 15:58:46 +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=E5=9C=BA=E6=99=AF=E5=9B=9E=E6=94=B6=E7=AB=99?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E6=A0=91=E7=BB=9F=E8=AE=A1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1025701 --user=赵勇 【接口测试】场景列表和回收站切换-模块树切换错误 https://www.tapd.cn/55049933/s/1365759 Signed-off-by: fit2-zhao --- .../frontend/src/business/automation/ApiAutomation.vue | 1 + .../business/automation/scenario/ApiScenarioModule.vue | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/api-test/frontend/src/business/automation/ApiAutomation.vue b/api-test/frontend/src/business/automation/ApiAutomation.vue index 01e876a93a..5b7213d9b6 100644 --- a/api-test/frontend/src/business/automation/ApiAutomation.vue +++ b/api-test/frontend/src/business/automation/ApiAutomation.vue @@ -618,6 +618,7 @@ export default { if (targetName === 'trash') { this.selectNodeIds = []; this.trashEnable = false; + this.$refs.nodeTree.list(this.projectId, targetName); } else { let message = ''; this.tabs.forEach((tab) => { diff --git a/api-test/frontend/src/business/automation/scenario/ApiScenarioModule.vue b/api-test/frontend/src/business/automation/scenario/ApiScenarioModule.vue index 6072bbb562..67e4c5f869 100644 --- a/api-test/frontend/src/business/automation/scenario/ApiScenarioModule.vue +++ b/api-test/frontend/src/business/automation/scenario/ApiScenarioModule.vue @@ -195,12 +195,12 @@ export default { filter() { this.$refs.nodeTree.filter(this.condition.filterText); }, - list(projectId) { + list(projectId, targetName) { if (this.isRelevanceModel) { this.result = getModuleByRelevanceProjectId(this.relevanceProjectId).then((response) => { this.setData(response); }); - } else if (this.isTrashData) { + } else if (this.isTrashData && !targetName) { this.result = postModuleByTrash(projectId ? projectId : this.projectId, this.param).then((response) => { this.setData(response); }); @@ -288,7 +288,7 @@ export default { } else { this.$emit('nodeSelectEvent', node, nodeIds, pNodes); } - // this.nohupReloadTree(node.data.id); + // this.nohupReloadTree(node.data.id); }, //后台更新节点数据 nohupReloadTree(selectNodeId) { @@ -351,6 +351,10 @@ export default { }, enableTrash() { this.condition.trashEnable = true; + this.param.trashEnable = true; + this.result = postModuleByTrash(this.projectId, this.param).then((response) => { + this.setData(response); + }); }, removeModuleId(nodeIds) { if (localStorage.getItem('scenarioModule') && localStorage.getItem('scenarioModule') === nodeIds[0]) {