diff --git a/frontend/src/business/components/api/head/ApiHeaderMenus.vue b/frontend/src/business/components/api/head/ApiHeaderMenus.vue index fa9af5ac373c1630e757b6addd81d74753990ccc..c3e56f1343b462870908c751299ca06d006ce969 100644 --- a/frontend/src/business/components/api/head/ApiHeaderMenus.vue +++ b/frontend/src/business/components/api/head/ApiHeaderMenus.vue @@ -73,7 +73,7 @@ return '/api/' + item.id; }, router: function (item) { - return {name: 'fucPlan', params: {projectId: item.id, projectName: item.name}} + return {name: 'ApiTestList', params: {projectId: item.id, projectName: item.name}} } }, testRecent: { diff --git a/frontend/src/business/components/api/report/ApiReportList.vue b/frontend/src/business/components/api/report/ApiReportList.vue index 83ae91cd7f8181746736d572e743aac1997ca450..7594d03708d5127f8503ae4104e8bb5cbf2aa562 100644 --- a/frontend/src/business/components/api/report/ApiReportList.vue +++ b/frontend/src/business/components/api/report/ApiReportList.vue @@ -59,11 +59,11 @@ } }, - beforeRouteEnter(to, from, next) { - next(self => { - self.testId = to.params.testId; - self.search(); - }); + watch: { + '$route'(to) { + this.testId = to.params.testId; + this.search(); + } }, methods: { diff --git a/frontend/src/business/components/api/test/ApiTestList.vue b/frontend/src/business/components/api/test/ApiTestList.vue index d5a1079b1ec9449eb18e60458fd4cedd1c014bc2..277f616d5f75114edd5545b145093d27b4c2128e 100644 --- a/frontend/src/business/components/api/test/ApiTestList.vue +++ b/frontend/src/business/components/api/test/ApiTestList.vue @@ -63,11 +63,11 @@ } }, - beforeRouteEnter(to, from, next) { - next(self => { - self.projectId = to.params.projectId; - self.search(); - }); + watch: { + '$route'(to) { + this.projectId = to.params.projectId; + this.search(); + } }, methods: { diff --git a/frontend/src/business/components/common/head/HeaderTopMenus.vue b/frontend/src/business/components/common/head/HeaderTopMenus.vue index 52922e21fd3b461411f64e5777926dac8746fe66..e4b8d1152d345900f69878d100196d018c30ac6e 100644 --- a/frontend/src/business/components/common/head/HeaderTopMenus.vue +++ b/frontend/src/business/components/common/head/HeaderTopMenus.vue @@ -34,7 +34,9 @@ }, watch: { '$route'(to) { - this.activeIndex = to.matched[0].path; + if (to.matched.length > 0) { + this.activeIndex = to.matched[0].path; + } this.handleSelect(this.activeIndex); } },