From 10367119077a7af34275683afe1f5474acf3e03c Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Fri, 17 Feb 2023 16:43:48 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E7=BC=96=E8=BE=91=E9=A1=B5?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E9=A1=B9=E7=9B=AE=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1022821 --user=陈建星 【测试跟踪】功能用例,在编辑页面通过左上角的下拉列表切换项目失败 https://www.tapd.cn/55049933/s/1337287 --- .../src/business/case/components/TestCaseEdit.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test-track/frontend/src/business/case/components/TestCaseEdit.vue b/test-track/frontend/src/business/case/components/TestCaseEdit.vue index f2808fe742..258dc0fb06 100644 --- a/test-track/frontend/src/business/case/components/TestCaseEdit.vue +++ b/test-track/frontend/src/business/case/components/TestCaseEdit.vue @@ -682,9 +682,18 @@ export default { }, activated() { - this.loadTestCase(); + if (localStorage.getItem('trackProjectChange')) { + // 如果在编辑页切换项目,则跳转到用例列表 + this.$router.push('/track/case/all'); + } else { + this.loadTestCase(); + } }, created(){ + this.$EventBus.$on('projectChange', () => { + this.projectChange = true; + localStorage.setItem('trackProjectChange', 'true'); + }); this.$EventBus.$on("handleSaveCaseWithEvent", this.handleSaveCaseWithEvent); }, methods: { @@ -709,7 +718,7 @@ export default { this.isLastedVersion = isLastedVersion; }, loadTestCase() { - // 校验路径中的 + // 校验路径中的项目ID this.checkCurrentProject(); let initFuc = this.initEdit;