处理web模块左侧菜单递归方法中的问题
This commit is contained in:
parent
27e3dbfb20
commit
714e965ebd
|
@ -110,9 +110,11 @@ export default {
|
||||||
const openKeys = window.sessionStorage.getItem('openKeys')
|
const openKeys = window.sessionStorage.getItem('openKeys')
|
||||||
const selectedKeys = window.sessionStorage.getItem('currMenu')
|
const selectedKeys = window.sessionStorage.getItem('currMenu')
|
||||||
if (selectedKeys) {
|
if (selectedKeys) {
|
||||||
|
this.currSlecteKey=[]
|
||||||
// this.defaultSelectedKeys.push(selectedKeys)
|
// this.defaultSelectedKeys.push(selectedKeys)
|
||||||
this.currSlecteKey.push(selectedKeys)
|
this.currSlecteKey.push(selectedKeys)
|
||||||
} else {
|
} else {
|
||||||
|
this.currSlecteKey=[]
|
||||||
this.initDefaultKeys(this.menus[0])
|
this.initDefaultKeys(this.menus[0])
|
||||||
this.menus.forEach(item => {
|
this.menus.forEach(item => {
|
||||||
if (item.name!=="istatistics-data") {
|
if (item.name!=="istatistics-data") {
|
||||||
|
@ -150,8 +152,8 @@ export default {
|
||||||
this.openKeys.push(data.path)
|
this.openKeys.push(data.path)
|
||||||
// if (data.children) {
|
// if (data.children) {
|
||||||
if (data.name!=="istatistics-StateOfHealth-alerts") {
|
if (data.name!=="istatistics-StateOfHealth-alerts") {
|
||||||
|
|
||||||
data.children.some((f) => {
|
data.children.some((f) => {
|
||||||
|
if (f.name!=="istatistics-met") {
|
||||||
if (f.children) {
|
if (f.children) {
|
||||||
// 第一个节点展开
|
// 第一个节点展开
|
||||||
// this.defaultOpenKeys.push(f.path)
|
// this.defaultOpenKeys.push(f.path)
|
||||||
|
@ -163,6 +165,7 @@ export default {
|
||||||
this.currSlecteKey.push(f.path)
|
this.currSlecteKey.push(f.path)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// } else {
|
// } else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user