|
|
@ -17,6 +17,8 @@ import Layout from '@/layout'
|
|
|
|
* redirect: noRedirect // 当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
|
|
|
|
* redirect: noRedirect // 当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
|
|
|
|
* name:'router-name' // 设定路由的名字,一定要填写不然使用<keep-alive>时会出现各种问题
|
|
|
|
* name:'router-name' // 设定路由的名字,一定要填写不然使用<keep-alive>时会出现各种问题
|
|
|
|
* query: '{"id": 1, "name": "ry"}' // 访问路由的默认传递参数
|
|
|
|
* query: '{"id": 1, "name": "ry"}' // 访问路由的默认传递参数
|
|
|
|
|
|
|
|
* roles: ['admin', 'common'] // 访问路由的角色权限
|
|
|
|
|
|
|
|
* permissions: ['a:a:a', 'b:b:b'] // 访问路由的菜单权限
|
|
|
|
* meta : {
|
|
|
|
* meta : {
|
|
|
|
noCache: true // 如果设置为true,则不会被 <keep-alive> 缓存(默认 false)
|
|
|
|
noCache: true // 如果设置为true,则不会被 <keep-alive> 缓存(默认 false)
|
|
|
|
title: 'title' // 设置该路由在侧边栏和面包屑中展示的名字
|
|
|
|
title: 'title' // 设置该路由在侧边栏和面包屑中展示的名字
|
|
|
@ -85,11 +87,16 @@ export const constantRoutes = [
|
|
|
|
meta: { title: '个人中心', icon: 'user' }
|
|
|
|
meta: { title: '个人中心', icon: 'user' }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 动态路由,基于用户权限动态去加载
|
|
|
|
|
|
|
|
export const dynamicRoutes = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
path: '/system/user-auth',
|
|
|
|
path: '/system/user-auth',
|
|
|
|
component: Layout,
|
|
|
|
component: Layout,
|
|
|
|
hidden: true,
|
|
|
|
hidden: true,
|
|
|
|
|
|
|
|
permissions: ['system:user:edit'],
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
path: 'role/:userId(\\d+)',
|
|
|
|
path: 'role/:userId(\\d+)',
|
|
|
@ -103,6 +110,7 @@ export const constantRoutes = [
|
|
|
|
path: '/system/role-auth',
|
|
|
|
path: '/system/role-auth',
|
|
|
|
component: Layout,
|
|
|
|
component: Layout,
|
|
|
|
hidden: true,
|
|
|
|
hidden: true,
|
|
|
|
|
|
|
|
permissions: ['system:role:edit'],
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
path: 'user/:roleId(\\d+)',
|
|
|
|
path: 'user/:roleId(\\d+)',
|
|
|
@ -116,6 +124,7 @@ export const constantRoutes = [
|
|
|
|
path: '/system/dict-data',
|
|
|
|
path: '/system/dict-data',
|
|
|
|
component: Layout,
|
|
|
|
component: Layout,
|
|
|
|
hidden: true,
|
|
|
|
hidden: true,
|
|
|
|
|
|
|
|
permissions: ['system:dict:list'],
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
path: 'index/:dictId(\\d+)',
|
|
|
|
path: 'index/:dictId(\\d+)',
|
|
|
@ -129,6 +138,7 @@ export const constantRoutes = [
|
|
|
|
path: '/monitor/job-log',
|
|
|
|
path: '/monitor/job-log',
|
|
|
|
component: Layout,
|
|
|
|
component: Layout,
|
|
|
|
hidden: true,
|
|
|
|
hidden: true,
|
|
|
|
|
|
|
|
permissions: ['monitor:job:list'],
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
path: 'index',
|
|
|
|
path: 'index',
|
|
|
@ -142,6 +152,7 @@ export const constantRoutes = [
|
|
|
|
path: '/tool/gen-edit',
|
|
|
|
path: '/tool/gen-edit',
|
|
|
|
component: Layout,
|
|
|
|
component: Layout,
|
|
|
|
hidden: true,
|
|
|
|
hidden: true,
|
|
|
|
|
|
|
|
permissions: ['tool:gen:edit'],
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
path: 'index',
|
|
|
|
path: 'index',
|
|
|
|