From 6a5c86541acf750a373bf3cb4b534fc0f6e66ec0 Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期二, 27 七月 2021 11:54:20 +0800 Subject: [PATCH] 跳转路由高亮相对应的菜单栏 --- ruoyi-ui/src/views/system/dict/index.vue | 2 +- ruoyi-ui/src/views/tool/gen/index.vue | 2 +- ruoyi-ui/src/views/system/role/index.vue | 4 ++-- ruoyi-ui/src/views/system/user/index.vue | 2 +- ruoyi-ui/src/router/index.js | 27 ++++++++++++++------------- ruoyi-ui/src/views/monitor/job/index.vue | 2 +- 6 files changed, 20 insertions(+), 19 deletions(-) diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index d0c4b0b..5b3b4fe 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -21,6 +21,7 @@ title: 'title' // 璁剧疆璇ヨ矾鐢卞湪渚ц竟鏍忓拰闈㈠寘灞戜腑灞曠ず鐨勫悕瀛� icon: 'svg-name' // 璁剧疆璇ヨ矾鐢辩殑鍥炬爣锛屽搴旇矾寰剆rc/assets/icons/svg breadcrumb: false // 濡傛灉璁剧疆涓篺alse锛屽垯涓嶄細鍦╞readcrumb闈㈠寘灞戜腑鏄剧ず + activeMenu: '/system/user' // 褰撹矾鐢辫缃簡璇ュ睘鎬э紝鍒欎細楂樹寒鐩稿搴旂殑渚ц竟鏍忋�� } */ @@ -80,7 +81,7 @@ ] }, { - path: '/auth', + path: '/system/user-auth', component: Layout, hidden: true, children: [ @@ -88,12 +89,12 @@ path: 'role/:userId(\\d+)', component: (resolve) => require(['@/views/system/user/authRole'], resolve), name: 'AuthRole', - meta: { title: '鍒嗛厤瑙掕壊'} + meta: { title: '鍒嗛厤瑙掕壊', activeMenu: '/system/user'} } ] }, { - path: '/auth', + path: '/system/role-auth', component: Layout, hidden: true, children: [ @@ -101,46 +102,46 @@ path: 'user/:roleId(\\d+)', component: (resolve) => require(['@/views/system/role/authUser'], resolve), name: 'AuthUser', - meta: { title: '鍒嗛厤鐢ㄦ埛'} + meta: { title: '鍒嗛厤鐢ㄦ埛', activeMenu: '/system/role'} } ] }, { - path: '/dict', + path: '/system/dict-data', component: Layout, hidden: true, children: [ { - path: 'type/data/:dictId(\\d+)', + path: 'index/:dictId(\\d+)', component: (resolve) => require(['@/views/system/dict/data'], resolve), name: 'Data', - meta: { title: '瀛楀吀鏁版嵁', icon: '' } + meta: { title: '瀛楀吀鏁版嵁', activeMenu: '/system/dict'} } ] }, { - path: '/job', + path: '/monitor/job-log', component: Layout, hidden: true, children: [ { - path: 'log', + path: 'index', component: (resolve) => require(['@/views/monitor/job/log'], resolve), name: 'JobLog', - meta: { title: '璋冨害鏃ュ織' } + meta: { title: '璋冨害鏃ュ織', activeMenu: '/monitor/job'} } ] }, { - path: '/gen', + path: '/tool/gen-edit', component: Layout, hidden: true, children: [ { - path: 'edit/:tableId(\\d+)', + path: 'index/:tableId(\\d+)', component: (resolve) => require(['@/views/tool/gen/editTable'], resolve), name: 'GenEdit', - meta: { title: '淇敼鐢熸垚閰嶇疆' } + meta: { title: '淇敼鐢熸垚閰嶇疆', activeMenu: '/tool/gen'} } ] } diff --git a/ruoyi-ui/src/views/monitor/job/index.vue b/ruoyi-ui/src/views/monitor/job/index.vue index f08f238..53cfb32 100644 --- a/ruoyi-ui/src/views/monitor/job/index.vue +++ b/ruoyi-ui/src/views/monitor/job/index.vue @@ -451,7 +451,7 @@ /** 浠诲姟鏃ュ織鍒楄〃鏌ヨ */ handleJobLog(row) { const jobId = row.jobId || 0; - this.$router.push({ path: '/job/log', query: { jobId: jobId } }) + this.$router.push({ path: '/monitor/job-log/index', query: { jobId: jobId } }) }, /** 鏂板鎸夐挳鎿嶄綔 */ handleAdd() { diff --git a/ruoyi-ui/src/views/system/dict/index.vue b/ruoyi-ui/src/views/system/dict/index.vue index 4bf733f..20cf5ce 100644 --- a/ruoyi-ui/src/views/system/dict/index.vue +++ b/ruoyi-ui/src/views/system/dict/index.vue @@ -118,7 +118,7 @@ <el-table-column label="瀛楀吀鍚嶇О" align="center" prop="dictName" :show-overflow-tooltip="true" /> <el-table-column label="瀛楀吀绫诲瀷" align="center" :show-overflow-tooltip="true"> <template slot-scope="scope"> - <router-link :to="'/dict/type/data/' + scope.row.dictId" class="link-type"> + <router-link :to="'/system/dict-data/index/' + scope.row.dictId" class="link-type"> <span>{{ scope.row.dictType }}</span> </router-link> </template> diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue index da4b2ec..27167c9 100644 --- a/ruoyi-ui/src/views/system/role/index.vue +++ b/ruoyi-ui/src/views/system/role/index.vue @@ -168,7 +168,7 @@ <el-form-item label="瑙掕壊鍚嶇О" prop="roleName"> <el-input v-model="form.roleName" placeholder="璇疯緭鍏ヨ鑹插悕绉�" /> </el-form-item> - <el-form-item label="鏉冮檺瀛楃" prop="roleKey"> + <el-form-item prop="roleKey"> <span slot="label"> <el-tooltip content="鎺у埗鍣ㄤ腑瀹氫箟鐨勬潈闄愬瓧绗︼紝濡傦細@PreAuthorize(`@ss.hasRole('admin')`)" placement="top"> <i class="el-icon-question"></i> @@ -574,7 +574,7 @@ /** 鍒嗛厤鐢ㄦ埛鎿嶄綔 */ handleAuthUser: function(row) { const roleId = row.roleId; - this.$router.push("/auth/user/" + roleId); + this.$router.push("/system/role-auth/user/" + roleId); }, /** 鎻愪氦鎸夐挳 */ submitForm: function() { diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index fb8d80a..0fe2536 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -621,7 +621,7 @@ /** 鍒嗛厤瑙掕壊鎿嶄綔 */ handleAuthRole: function(row) { const userId = row.userId; - this.$router.push("/auth/role/" + userId); + this.$router.push("/system/user-auth/role/" + userId); }, /** 鎻愪氦鎸夐挳 */ submitForm: function() { diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/gen/index.vue index 348543e..188b071 100644 --- a/ruoyi-ui/src/views/tool/gen/index.vue +++ b/ruoyi-ui/src/views/tool/gen/index.vue @@ -319,7 +319,7 @@ /** 淇敼鎸夐挳鎿嶄綔 */ handleEditTable(row) { const tableId = row.tableId || this.ids[0]; - this.$router.push("/gen/edit/" + tableId); + this.$router.push("/tool/gen-edit/index/" + tableId); }, /** 鍒犻櫎鎸夐挳鎿嶄綔 */ handleDelete(row) { -- Gitblit v1.9.3