From e19d739b1b1eb2c5022bbffab1de5afa89afe1c7 Mon Sep 17 00:00:00 2001
From: feige <feige@qq.com>
Date: 星期五, 14 四月 2023 15:56:01 +0800
Subject: [PATCH] router/index.js里面修改了几个详细页面的权限对应到系统管理的按钮当中了 在对应的index.vue中修改了对应的路由信息 已经全部可以跳转到详情页面了,不管是admin用户还是zhangshu用户

---
 ruoyi-ui/src/permission.js            |    2 +
 ruoyi-ui/src/views/self/show.vue      |   12 +++++-
 ruoyi-ui/package.json                 |    5 +-
 ruoyi-ui/src/views/device/index.vue   |    4 +-
 ruoyi-ui/src/views/bignote/index.vue  |    8 ++--
 ruoyi-ui/src/views/contacts/index.vue |    4 +-
 ruoyi-ui/vue.config.js                |    3 +
 ruoyi-ui/src/router/index.js          |   49 +++++++++++++++++++++---
 ruoyi-ui/src/views/note/index.vue     |    8 ++--
 9 files changed, 71 insertions(+), 24 deletions(-)

diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json
index d3fbe25..452c8f6 100644
--- a/ruoyi-ui/package.json
+++ b/ruoyi-ui/package.json
@@ -48,6 +48,7 @@
     "js-beautify": "1.13.0",
     "js-cookie": "3.0.1",
     "jsencrypt": "3.0.0-rc.1",
+    "node-sass": "^4.14.1",
     "nprogress": "0.2.0",
     "quill": "1.3.7",
     "screenfull": "5.0.2",
@@ -73,8 +74,8 @@
     "eslint-plugin-vue": "7.2.0",
     "lint-staged": "10.5.3",
     "runjs": "4.4.2",
-    "sass": "1.32.13",
-    "sass-loader": "10.1.1",
+    "sass": "^1.62.0",
+    "sass-loader": "^8.0.2",
     "script-ext-html-webpack-plugin": "2.1.5",
     "svg-sprite-loader": "5.1.1",
     "vue-template-compiler": "2.6.12"
diff --git a/ruoyi-ui/src/permission.js b/ruoyi-ui/src/permission.js
index 609d215..97b88b2 100644
--- a/ruoyi-ui/src/permission.js
+++ b/ruoyi-ui/src/permission.js
@@ -26,7 +26,9 @@
           isRelogin.show = false
           store.dispatch('GenerateRoutes').then(accessRoutes => {
             // 鏍规嵁roles鏉冮檺鐢熸垚鍙闂殑璺敱琛�
+            console.log(accessRoutes)
             router.addRoutes(accessRoutes) // 鍔ㄦ�佹坊鍔犲彲璁块棶璺敱琛�
+            console.log(router)
             next({ ...to, replace: true }) // hack鏂规硶 纭繚addRoutes宸插畬鎴�
           })
         }).catch(err => {
diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js
index c696e11..c5e21f4 100644
--- a/ruoyi-ui/src/router/index.js
+++ b/ruoyi-ui/src/router/index.js
@@ -113,37 +113,72 @@
     ]
   },
     {
-    path: '/family/note1',
+    path: '/familymodel/Property',
     component: Layout,
-    permissions: ['family:note:list'],
-
     hidden: true,
+    permissions: ['familymodel:property:info'],
+
+
     children: [
       {
         path: 'propertyInfo/:id(\\d+)',
         component: () => import('@/views/note/propertyInfo'),
         name: 'propertyInfo',
-        meta: { title: '鏌ヨ璇︽儏'}
+        meta: { title: '瀹跺涵璧勪骇鏌ヨ璇︽儏', activeMenu: '/familymodel/zfProperty' }
       }
     ]
   },
 //瀹跺ぇ浜嬭鐨勮鎯�
   {
-    path: '/family1/bignote',
+    path: '/familymodel/bignote',
     component: Layout,
     // permissions: [],
-    permissions: ['family1:bignote:list'],
     hidden: true,
+    permissions: ['familymodel:bignote:list'],
+
     children: [
       {
         path: 'familyeventInfo/:id(\\d+)',
         component: () => import('@/views/bignote/familyeventInfo'),
         name: 'familyeventInfo',
-        meta: { title: '鏌ヨ璇︽儏'}
+        meta: { title: '瀹跺ぇ浜嬭鏌ヨ璇︽儏',activeMenu: '/familymodel/zfEvent'}
       }
     ]
   },
+  //閫氳褰曡鎯�
+    {
+      path: '/familymodel/Contact',
+      component: Layout,
+      // permissions: [],
+      hidden: true,
+      permissions: ['familymodel:contact:info'],
 
+      children: [
+        {
+          path: 'contactsInfo/:id(\\d+)',
+          component: () => import('@/views/contacts/contactsInfo'),
+          name: 'contactsInfo',
+          meta: { title: '閫氳褰曟煡璇㈣鎯�',activeMenu: '/familymodel/zfContact'}
+        }
+      ]
+    },
+//瀹跺涵璁惧
+  {
+    path: '/familymodel/Device',
+    component: Layout,
+    // permissions: [],
+    hidden: true,
+    permissions: ['familymodel:device:info'],
+
+    children: [
+      {
+        path: 'equipmentInfo/:id(\\d+)',
+        component: () => import('@/views/device/equipmentInfo'),
+        name: 'equipmentInfo',
+        meta: { title: '瀹跺涵璁惧鏌ヨ璇︽儏',activeMenu: '/familymodel/zfDevice'}
+      }
+    ]
+  },
   //缂栬緫涓汉淇℃伅
   {
     path: '/self/self',
diff --git a/ruoyi-ui/src/views/bignote/index.vue b/ruoyi-ui/src/views/bignote/index.vue
index 8b977a6..f47dade 100644
--- a/ruoyi-ui/src/views/bignote/index.vue
+++ b/ruoyi-ui/src/views/bignote/index.vue
@@ -141,7 +141,7 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-hasPermi="['system:role:edit']"
+            v-hasPermi="['familymodel:bignote:list']"
           >淇敼</el-button>
           <el-button
             size="mini"
@@ -150,7 +150,7 @@
             @click="handleDelete(scope.row)"
             v-hasPermi="['system:role:remove']"
           >鍒犻櫎</el-button>
-          <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">
+          <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['familymodel:bignote:list']">
             <el-button size="mini" type="text" icon="el-icon-d-arrow-right"  @click="handleCheck(scope.row)">鏌ョ湅璇︽儏</el-button>
 
           </el-dropdown>
@@ -482,7 +482,7 @@
     /** 鏌ョ湅璇︾粏淇℃伅 */
     handleCheck(row){
       const id = row.id;
-      this.$router.push("/family/zfEvent/bignote/familyeventInfo/" + id);
+      this.$router.push("/familymodel/bignote/familyeventInfo/" + id);
     },
     /** 淇敼鎸夐挳鎿嶄綔 */
     handleUpdate(row) {
@@ -490,7 +490,7 @@
       let jd = true
 
       this.$router.push({
-        path:"/family/zfEvent/bignote/familyeventInfo/" + id,
+        path:"/familymodel/bignote/familyeventInfo/" + id,
         query:{
           detail:jd
         }
diff --git a/ruoyi-ui/src/views/contacts/index.vue b/ruoyi-ui/src/views/contacts/index.vue
index 6c73b4f..81b8b04 100644
--- a/ruoyi-ui/src/views/contacts/index.vue
+++ b/ruoyi-ui/src/views/contacts/index.vue
@@ -575,7 +575,7 @@
     /** 鏌ョ湅璇︾粏淇℃伅 */
     handleCheck(row){
       const id = row.id;
-      this.$router.push("/tongxunlu/contacts/contactsInfo/" + id);
+      this.$router.push("/familymodel/Contact/contactsInfo/" + id);
     },
     /** 淇敼鎸夐挳鎿嶄綔 */
     handleUpdate(row) {
@@ -583,7 +583,7 @@
       let jd = true
 
       this.$router.push({
-        path:"/tongxunlu/contacts/contactsInfo/" + id,
+        path:"/familymodel/Contact/contactsInfo/" + id,
         query:{
           detail:jd
         }
diff --git a/ruoyi-ui/src/views/device/index.vue b/ruoyi-ui/src/views/device/index.vue
index 1ef5cc6..5775fc6 100644
--- a/ruoyi-ui/src/views/device/index.vue
+++ b/ruoyi-ui/src/views/device/index.vue
@@ -479,7 +479,7 @@
     /** 鏌ョ湅璇︾粏淇℃伅 */
     handleCheck(row){
       const id = row.id;
-      this.$router.push("/jiatingshebei/device/equipmentInfo/" + id);
+      this.$router.push("/familymodel/Device/equipmentInfo/" + id);
     },
     /** 淇敼鎸夐挳鎿嶄綔 */
     handleUpdate(row) {
@@ -487,7 +487,7 @@
       let jd = true
 
       this.$router.push({
-        path:"/jiatingshebei/device/equipmentInfo/" + id,
+        path:"/familymodel/Device/equipmentInfo/" + id,
         query:{
           detail:jd
         }
diff --git a/ruoyi-ui/src/views/note/index.vue b/ruoyi-ui/src/views/note/index.vue
index d06cf3a..c8e82d5 100644
--- a/ruoyi-ui/src/views/note/index.vue
+++ b/ruoyi-ui/src/views/note/index.vue
@@ -131,7 +131,7 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-hasPermi="['system:role:edit']"
+            v-hasPermi="['familymodel:property:info']"
           >淇敼</el-button>
           <el-button
             size="mini"
@@ -140,7 +140,7 @@
             @click="handleDelete(scope.row)"
             v-hasPermi="['system:role:remove']"
           >鍒犻櫎</el-button>
-          <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">
+          <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['familymodel:property:info']">
             <el-button size="mini" type="text" icon="el-icon-d-arrow-right"  @click="handleCheck(scope.row)">鏌ョ湅璇︽儏</el-button>
 
           </el-dropdown>
@@ -500,7 +500,7 @@
     /** 鏌ョ湅璇︾粏淇℃伅 */
     handleCheck(row){
       const id = row.id;
-      this.$router.push("/family/property/note1/propertyInfo/" + id);
+      this.$router.push("/familymodel/property/propertyInfo/" + id);
     },
     /** 淇敼鎸夐挳鎿嶄綔 */
     handleUpdate(row) {
@@ -508,7 +508,7 @@
       let jd = true
 
       this.$router.push({
-        path:"/family/property/note1/propertyInfo/" + id,
+        path:"/familymodel/property/propertyInfo/" + id,
         query:{
           detail:jd
         }
diff --git a/ruoyi-ui/src/views/self/show.vue b/ruoyi-ui/src/views/self/show.vue
index f28d412..cad6e43 100644
--- a/ruoyi-ui/src/views/self/show.vue
+++ b/ruoyi-ui/src/views/self/show.vue
@@ -1,4 +1,12 @@
 <template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>
+<template>
   <div class="app-container">
     <!--    鍥炲埌椤堕儴-->
     <el-backtop :bottom="150" :right="30">
@@ -922,7 +930,7 @@
 };
 </script>
 
-<style>
+<style scoped>
 /*.uoloadSty {*/
 /*  width:110px;*/
 /*  height:110px;*/
@@ -933,7 +941,7 @@
 /*}*/
 
 .el-icon-top {
-  background: url("src/assets/icons/top.png");
+  background: url("");
 }
 
 
diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js
index 05ddcda..0ba49d3 100644
--- a/ruoyi-ui/vue.config.js
+++ b/ruoyi-ui/vue.config.js
@@ -47,7 +47,8 @@
   css: {
     loaderOptions: {
       sass: {
-        sassOptions: { outputStyle: "expanded" }
+        sassOptions: { outputStyle: "expanded" },
+
       }
     }
   },

--
Gitblit v1.9.1