forked from github/dataease
Merge pull request #1345 from dataease/pr@v1.5@refactor_disable_report_task
refactor: 定时报告迭代至下版本
This commit is contained in:
commit
4046846a7e
@ -74,7 +74,9 @@ router.beforeEach(async(to, from, next) => {
|
||||
})
|
||||
export const loadMenus = (next, to) => {
|
||||
buildMenus().then(res => {
|
||||
const filterDatas = filterRouter(res.data)
|
||||
const datas = res.data
|
||||
disableSomeMenu(datas)
|
||||
const filterDatas = filterRouter(datas)
|
||||
const asyncRouter = filterAsyncRouter(filterDatas)
|
||||
asyncRouter.push({ path: '*', redirect: '/404', hidden: true })
|
||||
store.dispatch('permission/GenerateRoutes', asyncRouter).then(() => { // 存储路由
|
||||
@ -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是否有效
|
||||
|
Loading…
Reference in New Issue
Block a user