From 64f6d28441e2036d2f21f9c22c2bc864733f588a Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期日, 25 七月 2021 20:08:55 +0800 Subject: [PATCH] 角色&菜单新增字段属性提示信息 --- ruoyi-ui/src/router/index.js | 73 ++++++++++++++++++++++++++++++------ 1 files changed, 61 insertions(+), 12 deletions(-) diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index a315049..d0c4b0b 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -17,9 +17,9 @@ * redirect: noRedirect // 当设置 noRedirect 的时候该路由在面包屑导航中不可被点击 * name:'router-name' // 设定路由的名字,一定要填写不然使用<keep-alive>时会出现各种问题 * meta : { - roles: ['admin','editor'] // 设置该路由进入的权限,支持多个权限叠加 + noCache: true // 如果设置为true,则不会被 <keep-alive> 缓存(默认 false) title: 'title' // 设置该路由在侧边栏和面包屑中展示的名字 - icon: 'svg-name' // 设置该路由的图标,对应路径src/icons/svg + icon: 'svg-name' // 设置该路由的图标,对应路径src/assets/icons/svg breadcrumb: false // 如果设置为false,则不会在breadcrumb面包屑中显示 } */ @@ -27,18 +27,29 @@ // 公共路由 export const constantRoutes = [ { + path: '/redirect', + component: Layout, + hidden: true, + children: [ + { + path: '/redirect/:path(.*)', + component: (resolve) => require(['@/views/redirect'], resolve) + } + ] + }, + { path: '/login', - component: () => import('@/views/login'), + component: (resolve) => require(['@/views/login'], resolve), hidden: true }, { path: '/404', - component: () => import('@/views/error/404'), + component: (resolve) => require(['@/views/error/404'], resolve), hidden: true }, { path: '/401', - component: () => import('@/views/error/401'), + component: (resolve) => require(['@/views/error/401'], resolve), hidden: true }, { @@ -48,7 +59,7 @@ children: [ { path: 'index', - component: () => import('@/views/index'), + component: (resolve) => require(['@/views/index'], resolve), name: '首页', meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true } } @@ -62,9 +73,35 @@ children: [ { path: 'profile', - component: () => import('@/views/system/user/profile/index'), + component: (resolve) => require(['@/views/system/user/profile/index'], resolve), name: 'Profile', meta: { title: '个人中心', icon: 'user' } + } + ] + }, + { + path: '/auth', + component: Layout, + hidden: true, + children: [ + { + path: 'role/:userId(\\d+)', + component: (resolve) => require(['@/views/system/user/authRole'], resolve), + name: 'AuthRole', + meta: { title: '分配角色'} + } + ] + }, + { + path: '/auth', + component: Layout, + hidden: true, + children: [ + { + path: 'user/:roleId(\\d+)', + component: (resolve) => require(['@/views/system/role/authUser'], resolve), + name: 'AuthUser', + meta: { title: '分配用户'} } ] }, @@ -75,9 +112,22 @@ children: [ { path: 'type/data/:dictId(\\d+)', - component: () => import('@/views/system/dict/data'), + component: (resolve) => require(['@/views/system/dict/data'], resolve), name: 'Data', meta: { title: '字典数据', icon: '' } + } + ] + }, + { + path: '/job', + component: Layout, + hidden: true, + children: [ + { + path: 'log', + component: (resolve) => require(['@/views/monitor/job/log'], resolve), + name: 'JobLog', + meta: { title: '调度日志' } } ] }, @@ -87,14 +137,13 @@ hidden: true, children: [ { - path: 'edit', - component: () => import('@/views/tool/gen/editTable'), + path: 'edit/:tableId(\\d+)', + component: (resolve) => require(['@/views/tool/gen/editTable'], resolve), name: 'GenEdit', meta: { title: '修改生成配置' } } ] - }, - { path: '*', redirect: '/404', hidden: true } + } ] export default new Router({ -- Gitblit v1.9.2