Commit ba07c9e4 authored by Gakki's avatar Gakki

拓展列表判断

parent 49c652bb
......@@ -31,6 +31,21 @@ export default {
}
})
}
// const result = []
// const routeList = routes[0].children.slice(1)
// let isLoadExtendMenu = this.$cookie.get('customKeyEnable')
// if (routeList && routeList.length > 0) {
// for(let i = 0; i < routeList.length; i++) {
// result.push(routeList[i])
// if (routeList[i].children && routeList[i].children.length > 0 && routeList[i].children.name == 'tbls') {
// // result.push(...route.children)
// console.log(JSON.stringify(routeList[i].children))
// } else {
// console.log(JSON.stringify(routeList[i].children))
// }
// }
// }
return [{path: '/portal-home', name: 'Home', meta: {title: '首页'}}, ...result]
}
},
......
......@@ -56,16 +56,35 @@ export default {
},
mounted(){
let menus=[]
let tempmenu = []
let isLoadExtendMenu = this.$cookie.get('customKeyEnable')
for(let i=0;i<routes.length;i++){
if(!!routes[i].children){
for(let j=0;j<routes[i].children.length;j++){
if(!!routes[i].children[j].meta.menuIcon){
if(!!routes[i].children[j].meta.menuIcon && routes[i].children[j].name == 'systemManagement' && isLoadExtendMenu == 'false'){
let target = routes[i].children[j].children
if(target.length > 0) {
for(let k = 0 ; k < target.length; k++) {
if(target[k].name == 'tbls') {
if(isLoadExtendMenu == 'true') {
tempmenu.push(target[k])
}
} else {
tempmenu.push(target[k])
}
}
}
let lusso = routes[i].children[j]
lusso.children = []
lusso.children = tempmenu
menus.push(lusso)
} else if (!!routes[i].children[j].meta.menuIcon) {
menus.push(routes[i].children[j])
this.menus=menus
}
}
}
}
this.menus=menus
},
methods: {
// 点击菜单,收起其他展开的菜单
......
......@@ -39,9 +39,9 @@ const appRoutes = [
children: [
{ // 系统信息配置
path: '/systemManagement/sysInfoSetting', name: 'sysInfoSetting', component: resolve => require(['@/views/personal/sysInfoSetting'], resolve), //NonResidents,
meta: { title: '系统信息配置', menuPath: true, hideInBread: false, },
children: [
]
meta: { title: '系统信息配置', menuPath: true, menuIcon: 'setting', hideInBread: false, },
// children: [
// ]
},
{ // 拓展信息管理
path: '/systemManagement/tbls', name: 'tbls', component: resolve => require(['@/views/houseData/tbls'], resolve), //Tbls,
......
......@@ -38,7 +38,6 @@ case 'xuhui-prod':
break
case 'huangpu-sit':
BASE_URL = 'http://huangpu.hm.omniview.pro/api', // 徐汇
FANGDI_URL = 'http://962121.fgj.sh.gov.cn/wyweb/shanghaiwuye'
......
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 to comment