作者 RuoYi

跳转路由高亮相对应的菜单栏

@@ -21,6 +21,7 @@ import Layout from '@/layout' @@ -21,6 +21,7 @@ import Layout from '@/layout'
21 title: 'title' // 设置该路由在侧边栏和面包屑中展示的名字 21 title: 'title' // 设置该路由在侧边栏和面包屑中展示的名字
22 icon: 'svg-name' // 设置该路由的图标,对应路径src/assets/icons/svg 22 icon: 'svg-name' // 设置该路由的图标,对应路径src/assets/icons/svg
23 breadcrumb: false // 如果设置为false,则不会在breadcrumb面包屑中显示 23 breadcrumb: false // 如果设置为false,则不会在breadcrumb面包屑中显示
  24 + activeMenu: '/system/user' // 当路由设置了该属性,则会高亮相对应的侧边栏。
24 } 25 }
25 */ 26 */
26 27
@@ -80,7 +81,7 @@ export const constantRoutes = [ @@ -80,7 +81,7 @@ export const constantRoutes = [
80 ] 81 ]
81 }, 82 },
82 { 83 {
83 - path: '/auth', 84 + path: '/system/user-auth',
84 component: Layout, 85 component: Layout,
85 hidden: true, 86 hidden: true,
86 children: [ 87 children: [
@@ -88,12 +89,12 @@ export const constantRoutes = [ @@ -88,12 +89,12 @@ export const constantRoutes = [
88 path: 'role/:userId(\\d+)', 89 path: 'role/:userId(\\d+)',
89 component: (resolve) => require(['@/views/system/user/authRole'], resolve), 90 component: (resolve) => require(['@/views/system/user/authRole'], resolve),
90 name: 'AuthRole', 91 name: 'AuthRole',
91 - meta: { title: '分配角色'} 92 + meta: { title: '分配角色', activeMenu: '/system/user'}
92 } 93 }
93 ] 94 ]
94 }, 95 },
95 { 96 {
96 - path: '/auth', 97 + path: '/system/role-auth',
97 component: Layout, 98 component: Layout,
98 hidden: true, 99 hidden: true,
99 children: [ 100 children: [
@@ -101,46 +102,46 @@ export const constantRoutes = [ @@ -101,46 +102,46 @@ export const constantRoutes = [
101 path: 'user/:roleId(\\d+)', 102 path: 'user/:roleId(\\d+)',
102 component: (resolve) => require(['@/views/system/role/authUser'], resolve), 103 component: (resolve) => require(['@/views/system/role/authUser'], resolve),
103 name: 'AuthUser', 104 name: 'AuthUser',
104 - meta: { title: '分配用户'} 105 + meta: { title: '分配用户', activeMenu: '/system/role'}
105 } 106 }
106 ] 107 ]
107 }, 108 },
108 { 109 {
109 - path: '/dict', 110 + path: '/system/dict-data',
110 component: Layout, 111 component: Layout,
111 hidden: true, 112 hidden: true,
112 children: [ 113 children: [
113 { 114 {
114 - path: 'type/data/:dictId(\\d+)', 115 + path: 'index/:dictId(\\d+)',
115 component: (resolve) => require(['@/views/system/dict/data'], resolve), 116 component: (resolve) => require(['@/views/system/dict/data'], resolve),
116 name: 'Data', 117 name: 'Data',
117 - meta: { title: '字典数据', icon: '' } 118 + meta: { title: '字典数据', activeMenu: '/system/dict'}
118 } 119 }
119 ] 120 ]
120 }, 121 },
121 { 122 {
122 - path: '/job', 123 + path: '/monitor/job-log',
123 component: Layout, 124 component: Layout,
124 hidden: true, 125 hidden: true,
125 children: [ 126 children: [
126 { 127 {
127 - path: 'log', 128 + path: 'index',
128 component: (resolve) => require(['@/views/monitor/job/log'], resolve), 129 component: (resolve) => require(['@/views/monitor/job/log'], resolve),
129 name: 'JobLog', 130 name: 'JobLog',
130 - meta: { title: '调度日志' } 131 + meta: { title: '调度日志', activeMenu: '/monitor/job'}
131 } 132 }
132 ] 133 ]
133 }, 134 },
134 { 135 {
135 - path: '/gen', 136 + path: '/tool/gen-edit',
136 component: Layout, 137 component: Layout,
137 hidden: true, 138 hidden: true,
138 children: [ 139 children: [
139 { 140 {
140 - path: 'edit/:tableId(\\d+)', 141 + path: 'index/:tableId(\\d+)',
141 component: (resolve) => require(['@/views/tool/gen/editTable'], resolve), 142 component: (resolve) => require(['@/views/tool/gen/editTable'], resolve),
142 name: 'GenEdit', 143 name: 'GenEdit',
143 - meta: { title: '修改生成配置' } 144 + meta: { title: '修改生成配置', activeMenu: '/tool/gen'}
144 } 145 }
145 ] 146 ]
146 } 147 }
@@ -451,7 +451,7 @@ export default { @@ -451,7 +451,7 @@ export default {
451 /** 任务日志列表查询 */ 451 /** 任务日志列表查询 */
452 handleJobLog(row) { 452 handleJobLog(row) {
453 const jobId = row.jobId || 0; 453 const jobId = row.jobId || 0;
454 - this.$router.push({ path: '/job/log', query: { jobId: jobId } }) 454 + this.$router.push({ path: '/monitor/job-log/index', query: { jobId: jobId } })
455 }, 455 },
456 /** 新增按钮操作 */ 456 /** 新增按钮操作 */
457 handleAdd() { 457 handleAdd() {
@@ -118,7 +118,7 @@ @@ -118,7 +118,7 @@
118 <el-table-column label="字典名称" align="center" prop="dictName" :show-overflow-tooltip="true" /> 118 <el-table-column label="字典名称" align="center" prop="dictName" :show-overflow-tooltip="true" />
119 <el-table-column label="字典类型" align="center" :show-overflow-tooltip="true"> 119 <el-table-column label="字典类型" align="center" :show-overflow-tooltip="true">
120 <template slot-scope="scope"> 120 <template slot-scope="scope">
121 - <router-link :to="'/dict/type/data/' + scope.row.dictId" class="link-type"> 121 + <router-link :to="'/system/dict-data/index/' + scope.row.dictId" class="link-type">
122 <span>{{ scope.row.dictType }}</span> 122 <span>{{ scope.row.dictType }}</span>
123 </router-link> 123 </router-link>
124 </template> 124 </template>
@@ -168,7 +168,7 @@ @@ -168,7 +168,7 @@
168 <el-form-item label="角色名称" prop="roleName"> 168 <el-form-item label="角色名称" prop="roleName">
169 <el-input v-model="form.roleName" placeholder="请输入角色名称" /> 169 <el-input v-model="form.roleName" placeholder="请输入角色名称" />
170 </el-form-item> 170 </el-form-item>
171 - <el-form-item label="权限字符" prop="roleKey"> 171 + <el-form-item prop="roleKey">
172 <span slot="label"> 172 <span slot="label">
173 <el-tooltip content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasRole('admin')`)" placement="top"> 173 <el-tooltip content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasRole('admin')`)" placement="top">
174 <i class="el-icon-question"></i> 174 <i class="el-icon-question"></i>
@@ -574,7 +574,7 @@ export default { @@ -574,7 +574,7 @@ export default {
574 /** 分配用户操作 */ 574 /** 分配用户操作 */
575 handleAuthUser: function(row) { 575 handleAuthUser: function(row) {
576 const roleId = row.roleId; 576 const roleId = row.roleId;
577 - this.$router.push("/auth/user/" + roleId); 577 + this.$router.push("/system/role-auth/user/" + roleId);
578 }, 578 },
579 /** 提交按钮 */ 579 /** 提交按钮 */
580 submitForm: function() { 580 submitForm: function() {
@@ -621,7 +621,7 @@ export default { @@ -621,7 +621,7 @@ export default {
621 /** 分配角色操作 */ 621 /** 分配角色操作 */
622 handleAuthRole: function(row) { 622 handleAuthRole: function(row) {
623 const userId = row.userId; 623 const userId = row.userId;
624 - this.$router.push("/auth/role/" + userId); 624 + this.$router.push("/system/user-auth/role/" + userId);
625 }, 625 },
626 /** 提交按钮 */ 626 /** 提交按钮 */
627 submitForm: function() { 627 submitForm: function() {
@@ -319,7 +319,7 @@ export default { @@ -319,7 +319,7 @@ export default {
319 /** 修改按钮操作 */ 319 /** 修改按钮操作 */
320 handleEditTable(row) { 320 handleEditTable(row) {
321 const tableId = row.tableId || this.ids[0]; 321 const tableId = row.tableId || this.ids[0];
322 - this.$router.push("/gen/edit/" + tableId); 322 + this.$router.push("/tool/gen-edit/index/" + tableId);
323 }, 323 },
324 /** 删除按钮操作 */ 324 /** 删除按钮操作 */
325 handleDelete(row) { 325 handleDelete(row) {