提交 0a99b6a3 authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw

refactor: 定时报告迭代至下版本

上级 f6548e7c
...@@ -74,7 +74,9 @@ router.beforeEach(async(to, from, next) => { ...@@ -74,7 +74,9 @@ router.beforeEach(async(to, from, next) => {
}) })
export const loadMenus = (next, to) => { export const loadMenus = (next, to) => {
buildMenus().then(res => { buildMenus().then(res => {
const filterDatas = filterRouter(res.data) const datas = res.data
disableSomeMenu(datas)
const filterDatas = filterRouter(datas)
const asyncRouter = filterAsyncRouter(filterDatas) const asyncRouter = filterAsyncRouter(filterDatas)
asyncRouter.push({ path: '*', redirect: '/404', hidden: true }) asyncRouter.push({ path: '*', redirect: '/404', hidden: true })
store.dispatch('permission/GenerateRoutes', asyncRouter).then(() => { // 存储路由 store.dispatch('permission/GenerateRoutes', asyncRouter).then(() => { // 存储路由
...@@ -87,6 +89,17 @@ export const loadMenus = (next, to) => { ...@@ -87,6 +89,17 @@ export const loadMenus = (next, to) => {
}) })
}) })
} }
const disableSomeMenu = datas => {
datas.forEach(menu => {
if (menu.name === 'system') {
menu.children.forEach(item => {
if (item.name === 'sys-task') {
item.children = [item.children[0]]
}
})
}
})
}
/** /**
* 验证path是否有效 * 验证path是否有效
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论