diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index e9a45c7..a569b88 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -152,32 +152,30 @@ export default { this.handleJump(e.value); return; } - sessionStorage.setItem('topTab', e) - this.$store.dispatch('changeTopTab', e) - console.log(e) - if (e === 'sluice') { + sessionStorage.setItem("topTab", e.value); + this.$store.dispatch("changeTopTab", e.value); + if (e.value === "sluice") { this.$router.replace({ - path: '/sluice/engineeringCondition/sluiceBaseInfo', + path: "/sluice/engineeringCondition/sluiceBaseInfo", query: { - timestamp: new Date().getTime() - } - }) - }else if (e==='dike'){ + timestamp: new Date().getTime(), + }, + }); + } else if (e.value === "dike") { this.$router.replace({ - path: '/dike/engineeringCondition/dikeBaseInfo', + path: "/dike/engineeringCondition/dikeBaseInfo", query: { - timestamp: new Date().getTime() - } - }) - }else { + timestamp: new Date().getTime(), + }, + }); + } else { this.$router.replace({ - path: '/', + path: "/", query: { - timestamp: new Date().getTime() - } - }) + timestamp: new Date().getTime(), + }, + }); } - }, toggleSideBar() { this.$store.dispatch("app/toggleSideBar"); @@ -204,9 +202,11 @@ export default {