| | |
| | | state.defaultRoutes = constantRoutes.concat(routes)
|
| | | },
|
| | | SET_TOPBAR_ROUTES: (state, routes) => {
|
| | | // 顶部导航菜单默认添加统计报表栏指向首页
|
| | | const index = [{
|
| | | path: 'index',
|
| | | meta: { title: '统计报表', icon: 'dashboard' }
|
| | | }]
|
| | | state.topbarRouters = routes.concat(index);
|
| | | state.topbarRouters = routes
|
| | | },
|
| | | SET_SIDEBAR_ROUTERS: (state, routes) => {
|
| | | state.sidebarRouters = routes
|
| | |
| | | }
|
| | | if (lastRouter) {
|
| | | el.path = lastRouter.path + '/' + el.path
|
| | | if (el.children && el.children.length) {
|
| | | children = children.concat(filterChildren(el.children, el))
|
| | | return
|
| | | }
|
| | | }
|
| | | children = children.concat(el)
|
| | | })
|