Merge pull request '处理模块之间跳转后,地址栏和二级路由选中的菜单不匹配的问题' (#11) from feature-custom-menus into feature-Alarm-renpy
This commit is contained in:
commit
d575368b48
|
@ -41,7 +41,16 @@ export default {
|
|||
methods: {
|
||||
onMenuSelect({ key }) {
|
||||
const childPath = this.getChildrenPath(this.menuItems.find(menu => menu.name === key))
|
||||
this.$router.push(childPath)
|
||||
if (key == "abnormal-alarm" || key == "istatistics") {
|
||||
const selectedKeys = window.sessionStorage.getItem('currMenu')
|
||||
if (selectedKeys) {
|
||||
this.$router.push(selectedKeys)
|
||||
} else {
|
||||
this.$router.push(childPath)
|
||||
}
|
||||
} else {
|
||||
this.$router.push(childPath)
|
||||
}
|
||||
},
|
||||
getChildrenPath(menuItem) {
|
||||
if (menuItem.children) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user