Commit 18191655 by liuwange1

刷新保持路由

parent 240ebd45
......@@ -172,8 +172,21 @@ export default {
this.initSocket();
this.getAlarmList("");
this.getAlarmMsgByMenu();
this.activeIndexHandler();
},
methods: {
activeIndexHandler() {
let routerName = window.location.hash.replace("#/", "");
if (routerName == "") {
this.activeIndex = 0;
} else {
this.navList.forEach((item, index) => {
if (item.routerName == routerName) {
this.activeIndex = index;
}
});
}
},
// 左侧列表内的告警数量
getAlarmMsgByMenu() {
this.$axios.get("/alarmMsg/msgCountByMenu").then((e) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment