mirror of https://github.com/veops/cmdb.git
fix(ui):common double menu (#324)
This commit is contained in:
parent
75122f7a40
commit
3e2943b49e
|
@ -38,7 +38,7 @@ async function filterAsyncRouter(routerMap, roles) {
|
||||||
const default_route = ['company_info', 'company_structure', 'company_group']
|
const default_route = ['company_info', 'company_structure', 'company_group']
|
||||||
if (default_route.includes(route.name)) {
|
if (default_route.includes(route.name)) {
|
||||||
filteredRoutes.push(route)
|
filteredRoutes.push(route)
|
||||||
}
|
} else {
|
||||||
await hasPermission(roles.permissions, route).then(async flag => {
|
await hasPermission(roles.permissions, route).then(async flag => {
|
||||||
if (flag) {
|
if (flag) {
|
||||||
if (route.children && route.children.length) {
|
if (route.children && route.children.length) {
|
||||||
|
@ -48,6 +48,7 @@ async function filterAsyncRouter(routerMap, roles) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return filteredRoutes
|
return filteredRoutes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue