From 2682a35e4c5b27eb200fc55750f3a0c8872ddbab Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Wed, 1 Mar 2023 14:54:19 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E5=88=97=E8=A1=A8=E7=82=B9=E5=87=BB=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=EF=BC=8Curl=E6=B2=A1=E6=9C=89=E5=8A=A0=E4=B8=8A?= =?UTF-8?q?=E6=A8=A1=E5=9D=97ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frontend/src/business/case/components/TestCaseList.vue | 4 ++++ test-track/frontend/src/business/module/TestCaseNodeTree.vue | 2 ++ 2 files changed, 6 insertions(+) diff --git a/test-track/frontend/src/business/case/components/TestCaseList.vue b/test-track/frontend/src/business/case/components/TestCaseList.vue index 929860a838..f51f1bbb10 100644 --- a/test-track/frontend/src/business/case/components/TestCaseList.vue +++ b/test-track/frontend/src/business/case/components/TestCaseList.vue @@ -549,6 +549,10 @@ export default { watch: { '$route'(to) { if (to.path.indexOf("/track/case/all") >= 0) { + if (to.query.moduleId) { + // 点击模块导致路由变更不刷新,避免刷新两次 + return; + } this.getTemplateField(); let ids = this.$route.params.ids; if (ids) { diff --git a/test-track/frontend/src/business/module/TestCaseNodeTree.vue b/test-track/frontend/src/business/module/TestCaseNodeTree.vue index 9e7c6667d2..b8418c7f6d 100644 --- a/test-track/frontend/src/business/module/TestCaseNodeTree.vue +++ b/test-track/frontend/src/business/module/TestCaseNodeTree.vue @@ -323,6 +323,8 @@ export default { this.currentModule = node.data; this.currentNode = node; + this.$emit("nodeSelectEvent", node, node.data.id === 'root' ? [] : nodeIds, pNodes); + // 刷新模块树 this.nohupReloadTree(node.data.id); },