|
@@ -17,6 +17,8 @@ import Layout from '@/layout'
|
|
|
* redirect: noRedirect
|
|
|
* name:'router-name'
|
|
|
* query: '{"id": 1, "name": "ry"}'
|
|
|
+ * roles: ['admin', 'common']
|
|
|
+ * permissions: ['a:a:a', 'b:b:b']
|
|
|
* meta : {
|
|
|
noCache: true
|
|
|
title: 'title'
|
|
@@ -85,11 +87,16 @@ export const constantRoutes = [
|
|
|
meta: { title: '个人中心', icon: 'user' }
|
|
|
}
|
|
|
]
|
|
|
- },
|
|
|
+ }
|
|
|
+]
|
|
|
+
|
|
|
+
|
|
|
+export const dynamicRoutes = [
|
|
|
{
|
|
|
path: '/system/user-auth',
|
|
|
component: Layout,
|
|
|
hidden: true,
|
|
|
+ permissions: ['system:user:edit'],
|
|
|
children: [
|
|
|
{
|
|
|
path: 'role/:userId(\\d+)',
|
|
@@ -103,6 +110,7 @@ export const constantRoutes = [
|
|
|
path: '/system/role-auth',
|
|
|
component: Layout,
|
|
|
hidden: true,
|
|
|
+ permissions: ['system:role:edit'],
|
|
|
children: [
|
|
|
{
|
|
|
path: 'user/:roleId(\\d+)',
|
|
@@ -116,6 +124,7 @@ export const constantRoutes = [
|
|
|
path: '/system/dict-data',
|
|
|
component: Layout,
|
|
|
hidden: true,
|
|
|
+ permissions: ['system:dict:list'],
|
|
|
children: [
|
|
|
{
|
|
|
path: 'index/:dictId(\\d+)',
|
|
@@ -129,6 +138,7 @@ export const constantRoutes = [
|
|
|
path: '/monitor/job-log',
|
|
|
component: Layout,
|
|
|
hidden: true,
|
|
|
+ permissions: ['monitor:job:list'],
|
|
|
children: [
|
|
|
{
|
|
|
path: 'index',
|
|
@@ -142,6 +152,7 @@ export const constantRoutes = [
|
|
|
path: '/tool/gen-edit',
|
|
|
component: Layout,
|
|
|
hidden: true,
|
|
|
+ permissions: ['tool:gen:edit'],
|
|
|
children: [
|
|
|
{
|
|
|
path: 'index',
|