Przeglądaj źródła

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

RuoYi 4 lat temu
rodzic
commit
0dff71bd4d

+ 14 - 13
ruoyi-ui/src/router/index.js

@@ -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
     ]
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
         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
         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
   }

+ 1 - 1
ruoyi-ui/src/views/monitor/job/index.vue

@@ -448,7 +448,7 @@ export default {
448
     /** 任务日志列表查询 */
448
     /** 任务日志列表查询 */
449
     handleJobLog(row) {
449
     handleJobLog(row) {
450
       const jobId = row.jobId || 0;
450
       const jobId = row.jobId || 0;
451
-      this.$router.push({ path: '/job/log', query: { jobId: jobId } })
451
+      this.$router.push({ path: '/monitor/job-log/index', query: { jobId: jobId } })
452
     },
452
     },
453
     /** 新增按钮操作 */
453
     /** 新增按钮操作 */
454
     handleAdd() {
454
     handleAdd() {

+ 1 - 1
ruoyi-ui/src/views/system/dict/index.vue

@@ -117,7 +117,7 @@
117
       <el-table-column label="字典名称" align="center" prop="dictName" :show-overflow-tooltip="true" />
117
       <el-table-column label="字典名称" align="center" prop="dictName" :show-overflow-tooltip="true" />
118
       <el-table-column label="字典类型" align="center" :show-overflow-tooltip="true">
118
       <el-table-column label="字典类型" align="center" :show-overflow-tooltip="true">
119
         <template slot-scope="scope">
119
         <template slot-scope="scope">
120
-          <router-link :to="'/dict/type/data/' + scope.row.dictId" class="link-type">
120
+          <router-link :to="'/system/dict-data/index/' + scope.row.dictId" class="link-type">
121
             <span>{{ scope.row.dictType }}</span>
121
             <span>{{ scope.row.dictType }}</span>
122
           </router-link>
122
           </router-link>
123
         </template>
123
         </template>

+ 1 - 1
ruoyi-ui/src/views/system/role/index.vue

@@ -571,7 +571,7 @@ export default {
571
     /** 分配用户操作 */
571
     /** 分配用户操作 */
572
     handleAuthUser: function(row) {
572
     handleAuthUser: function(row) {
573
       const roleId = row.roleId;
573
       const roleId = row.roleId;
574
-      this.$router.push("/auth/user/" + roleId);
574
+      this.$router.push("/system/role-auth/user/" + roleId);
575
     },
575
     },
576
     /** 提交按钮 */
576
     /** 提交按钮 */
577
     submitForm: function() {
577
     submitForm: function() {

+ 1 - 1
ruoyi-ui/src/views/system/user/index.vue

@@ -618,7 +618,7 @@ export default {
618
     /** 分配角色操作 */
618
     /** 分配角色操作 */
619
     handleAuthRole: function(row) {
619
     handleAuthRole: function(row) {
620
       const userId = row.userId;
620
       const userId = row.userId;
621
-      this.$router.push("/auth/role/" + userId);
621
+      this.$router.push("/system/user-auth/role/" + userId);
622
     },
622
     },
623
     /** 提交按钮 */
623
     /** 提交按钮 */
624
     submitForm: function() {
624
     submitForm: function() {

+ 1 - 1
ruoyi-ui/src/views/tool/gen/index.vue

@@ -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) {