fix(测试跟踪):用例评审详情页面切换工作空间,页面未刷新

--bug=1026476 --user=王旭 【测试跟踪】在用例评审详情页面切换工作空间后,还是显示的之前的评审内容 https://www.tapd.cn/55049933/s/1376311
This commit is contained in:
WangXu10 2023-05-26 17:21:15 +08:00 committed by fit2-zhao
parent 9e15bd4d85
commit dbec44fa70
1 changed files with 11 additions and 5 deletions

View File

@ -85,11 +85,10 @@ export default {
if (projectId) {
sessionStorage.setItem(PROJECT_ID, projectId);
}
this.$EventBus.$on('projectChange', () => {
if (this.$route.name === 'testCaseReviewView') {
this.$router.push('/track/review/all');
}
});
this.$EventBus.$on('projectChange', this.handleProjectChange);
},
destroyed() {
this.$EventBus.$off('projectChange', this.handleProjectChange);
},
mounted() {
this.initData();
@ -115,6 +114,13 @@ export default {
this.genRedirectParam();
},
methods: {
handleProjectChange() {
if (this.$route.path.indexOf("track/review") > -1) {
this.$nextTick(() => {
this.$router.push('/track/review/all');
});
}
},
handleSelect(key) {
this.activeIndex = key;
},