From 87dd88209d7249bca7e0e5554494c8775e5fb7fb Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Thu, 10 Aug 2023 13:46:53 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=BC=BA=E9=99=B7=E7=BB=9F=E8=AE=A1=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E5=A4=9A=E6=AC=A1=E5=88=87=E6=8D=A2=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1028190 --user=宋昌昌 【测试跟踪】首页-测试计划遗留缺陷统计-跳转后页面切换问题 https://www.tapd.cn/55049933/s/1402368 --- .../frontend/src/business/head/TrackHeaderMenus.vue | 3 +++ test-track/frontend/src/business/home/TrackHome.vue | 11 ++++++++--- test-track/frontend/src/business/issue/IssueList.vue | 5 +++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/test-track/frontend/src/business/head/TrackHeaderMenus.vue b/test-track/frontend/src/business/head/TrackHeaderMenus.vue index 3899939d35..512202fd1d 100644 --- a/test-track/frontend/src/business/head/TrackHeaderMenus.vue +++ b/test-track/frontend/src/business/head/TrackHeaderMenus.vue @@ -83,12 +83,15 @@ export default { this.pathName = '/track/plan/all'; } else if (to.path.indexOf("/track/case") >= 0) { this.pathName = '/track/case/all?projectId=' + this.getProjectId(); + } else if (to.path.indexOf("/track/issue") >= 0) { + this.pathName = '/track/issue' } else if(to.path.indexOf("/track/home") >= 0) { // 默认跳转到首页 for (let menu of this.menus) { if (hasPermission(menu.permission)) { // 如果有首页的权限则不处理 if(menu.path.indexOf("/track/home") >= 0) { + this.pathName = menu.path; break; } else { // 否则跳转到第一个有权限的页面 diff --git a/test-track/frontend/src/business/home/TrackHome.vue b/test-track/frontend/src/business/home/TrackHome.vue index 55e3d646ff..400e5472a1 100644 --- a/test-track/frontend/src/business/home/TrackHome.vue +++ b/test-track/frontend/src/business/home/TrackHome.vue @@ -135,9 +135,14 @@ export default { ); break; case "issue": - home = this.$router.resolve( - "/track/issue/" + uuid + "/" + dataType + "/" + selectType - ); + home = this.$router.resolve({ + name: "issueManagement", + params: { + id: uuid, + projectId: dataType, + dataSelectRange: selectType, + } + }); } if (home) { window.open(home.href, "_blank"); diff --git a/test-track/frontend/src/business/issue/IssueList.vue b/test-track/frontend/src/business/issue/IssueList.vue index eac71f03ce..4ff1214c7c 100644 --- a/test-track/frontend/src/business/issue/IssueList.vue +++ b/test-track/frontend/src/business/issue/IssueList.vue @@ -301,7 +301,10 @@ export default { activated() { if (this.$route.params.dataSelectRange) { this.dataSelectRange = this.$route.params.dataSelectRange; + } else { + this.dataSelectRange = ""; } + console.log(this.dataSelectRange); this.loading = true; this.$nextTick(() => { // 解决错位问题 @@ -469,6 +472,8 @@ export default { this.page.condition.unClosedTestPlanIssue = true; } else if (this.dataSelectRange === 'AllRelatedTestPlan') { this.page.condition.allTestPlanIssue = true; + } else { + this.page.condition = {}; } this.page.condition.projectId = this.projectId; this.page.condition.workspaceId = this.workspaceId;