浏览代码

提交一下

1
mo 3 年之前
父节点
当前提交
d7736902bc
共有 2 个文件被更改,包括 67 次插入39 次删除
  1. 10 10
      src/layout/components/instructions.vue
  2. 57 29
      src/store/modules/permission.js

+ 10 - 10
src/layout/components/instructions.vue

@@ -1,6 +1,10 @@
 <template>
   <div>
-    <el-button class="instructionBtn" @click="showInstructions" type="danger" plain
+    <el-button
+      class="instructionBtn"
+      @click="showInstructions"
+      type="danger"
+      plain
       >说明书</el-button
     >
     <!-- :w="w" -->
@@ -47,8 +51,6 @@ export default {
     return {
       url: "/html/index.html" + "#g=1&p=新建乐团",
       isShow: false,
-      iframeHeight:
-        document.querySelector("#instructions")?.offsetHeight || "300px",
       w: "",
       y: "",
       docY: "",
@@ -66,10 +68,9 @@ export default {
       this.iframeHeight = Math.abs(e.height);
       setTimeout(() => {
         this.isResizing = false;
-      }, 800);
+      }, 500);
     },
     onResizing(e) {
-      console.log("开始移动");
       this.isResizing = true;
     },
     showInstructions() {
@@ -79,15 +80,14 @@ export default {
   },
   computed: {
     key() {
+      console.log(this.$route);
       this.isShow = false;
       return this.$route.path;
     },
+    iframeHeight() {
+      return document.querySelector("#instructions")?.offsetHeight || "300px";
+    },
   },
-  watch:{
-    key(val){
-      console.log(this.$route)
-    }
-  }
 };
 </script>
 <style lang="scss" scoped>

+ 57 - 29
src/store/modules/permission.js

@@ -116,11 +116,11 @@ function recursionRouter(arr) {
       //     obj.names = item.name
       //   }
       // }
-      console.log(arr)
+
       arr[i].hid == 0 ? obj.hidden = false : obj.hidden = true
       // console.log('高亮标签'+arr[i].parentPermission,'普通路径'+arr[i].path)
       obj.path = arr[i].path;
-      obj.meta = { 'title': arr[i].name, 'icon': arr[i].icon, 'noCache': arr[i].keepAlive, 'activeMenu': arr[i].parentPermission, 'belongTopMenu': arr[i].belongTopMenu }
+      obj.meta = { 'title': arr[i].name, 'icon': arr[i].icon, 'noCache': arr[i].keepAlive, 'activeMenu': arr[i].parentPermission, 'belongTopMenu': arr[i].belongTopMenu,'id':arr[i].id }
       if (arr[i].sysMenus && arr[i].sysMenus.length > 0) {
         obj.children = recursionRouter(arr[i].sysMenus);
       }
@@ -178,6 +178,7 @@ function recursionPermission(arr) {
   })
 }
 function setDetailRoute(accessedRoutes) {
+  console.log(accessedRoutes)
   accessedRoutes.forEach(route => {
     // console.log(route.path)
     if (route.path == '/main') {
@@ -191,7 +192,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '日程安排',
             belongTopMenu: "/main",
-            activeMenu: '/main/main'
+            activeMenu: '/main/main',
+            id:'xx1'
           }
         },
         {
@@ -203,7 +205,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '未在班级学员',
             belongTopMenu: "/main",
-            activeMenu: '/main/main'
+            activeMenu: '/main/main',
+            id:'xx2'
           }
         },
         //
@@ -221,7 +224,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '学员缴费详情',
             belongTopMenu: "/business",
-            activeMenu: '/teamList'
+            activeMenu: '/teamList',
+            id:'xx3'
           }
         },
         {
@@ -233,7 +237,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '乐团详情',
             belongTopMenu: "/business",
-            activeMenu: '/teamList'
+            activeMenu: '/teamList',
+            id:'xx4'
           }
         },
         {
@@ -245,7 +250,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: 'VIP/乐理课申请',
             belongTopMenu: "/business",
-            activeMenu: '/vipManager/vipList'
+            activeMenu: '/vipManager/vipList',
+            id:'xx5'
           }
         },
         {
@@ -257,7 +263,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: 'VIP/乐理课修改',
             belongTopMenu: "/business",
-            activeMenu: '/vipManager/vipList'
+            activeMenu: '/vipManager/vipList',
+            id:'xx6'
           }
         },
         {
@@ -269,7 +276,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: 'vip详情',
             belongTopMenu: "/business",
-            activeMenu: '/vipManager/vipList'
+            activeMenu: '/vipManager/vipList',
+            id:'xx7'
           }
         },
         {
@@ -281,7 +289,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '网管课详情',
             belongTopMenu: "/business",
-            activeMenu: '/accompanyManager/accompany'
+            activeMenu: '/accompanyManager/accompany',
+            id:'xx8'
           }
         },
         {
@@ -293,7 +302,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '评价详情',
             belongTopMenu: "/business",
-            activeMenu: '/commentManager'
+            activeMenu: '/commentManager',
+            id:'xx9'
           }
         },
         {
@@ -305,7 +315,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: 'VIP/乐理课详情',
             belongTopMenu: "/business",
-            activeMenu: '/afterSchoolManager'
+            activeMenu: '/afterSchoolManager',
+            id:'xx10'
           }
         },
         {
@@ -317,7 +328,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '学员详情',
             belongTopMenu: "/business",
-            activeMenu: '/studentManager/studentList'
+            activeMenu: '/studentManager/studentList',
+            id:'xx11'
           }
         },
         {
@@ -329,7 +341,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '老师详情',
             belongTopMenu: "/business",
-            activeMenu: '/teacherManager/teacherList'
+            activeMenu: '/teacherManager/teacherList',
+            id:'xx12'
           }
         },
         {
@@ -341,7 +354,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '老师修改',
             belongTopMenu: "/business",
-            activeMenu: '/teacherManager/teacherList'
+            activeMenu: '/teacherManager/teacherList',
+            id:'xx13'
           }
         },
         {
@@ -353,7 +367,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '问答详情',
             belongTopMenu: "/business",
-            activeMenu: '/otherManager/reaplceMusicPlayer'
+            activeMenu: '/otherManager/reaplceMusicPlayer',
+            id:'xx4'
           }
         },
         // /otherManager/reaplceMusicPlayer /reaplceMusicPlayer/answer
@@ -371,7 +386,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '服务指标(详情)',
             belongTopMenu: "/operateManager",
-            activeMenu: '/serverIndexManager/serverIndexList'
+            activeMenu: '/serverIndexManager/serverIndexList',
+            id:'xx15'
           }
         },
         {
@@ -383,7 +399,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '新建活动方案',
             belongTopMenu: "/operateManager",
-            activeMenu: '/vipActiveManager/vipActiveList'
+            activeMenu: '/vipActiveManager/vipActiveList',
+            id:'xx16'
           }
         },
         {
@@ -395,7 +412,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '添加分部活动',
             belongTopMenu: "/operateManager",
-            activeMenu: '/branchActiveManager/branchActive'
+            activeMenu: '/branchActiveManager/branchActive',
+            id:'xx17'
           }
         },
         {
@@ -407,7 +425,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '修改分部活动',
             belongTopMenu: "/operateManager",
-            activeMenu: '/branchActiveManager/branchActive'
+            activeMenu: '/branchActiveManager/branchActive',
+            id:'xx18'
           }
         },
         {
@@ -419,7 +438,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '添加问卷',
             belongTopMenu: "/operateManager",
-            activeMenu: '/operateManager/setQuestions'
+            activeMenu: '/operateManager/setQuestions',
+            id:'xx19'
           }
         },
         // /operateManager/setQuestions /questionOperation   operateManager
@@ -436,7 +456,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '经营报表详情',
             belongTopMenu: "/financialManager",
-            activeMenu: '/businessStatement'
+            activeMenu: '/businessStatement',
+            id:'xx20'
           }
         },
       ])
@@ -452,7 +473,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '经营报表详情',
             belongTopMenu: "/contentManager",
-            activeMenu: '/contentManager/helpContent'
+            activeMenu: '/contentManager/helpContent',
+            id:'xx21'
           }
         },
         {
@@ -464,7 +486,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '添加&修改内容管理',
             belongTopMenu: "/contentManager",
-            activeMenu: '/contentManager/contentManager'
+            activeMenu: '/contentManager/contentManager',
+            id:'xx22'
           }
         },
       ])
@@ -480,7 +503,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '进货清单',
             belongTopMenu: "/shopManager",
-            activeMenu: '/shopManager'
+            activeMenu: '/shopManager',
+            id:'xx23'
           }
         },
         {
@@ -492,7 +516,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '添加修改商品',
             belongTopMenu: "/shopManager",
-            activeMenu: '/shopManager'
+            activeMenu: '/shopManager',
+            id:'xx24'
           }
         },
       ])
@@ -508,7 +533,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '创建&修改汇付账号',
             belongTopMenu: "/systemManager",
-            activeMenu: '/sysBasics/adapayManager'
+            activeMenu: '/sysBasics/adapayManager',
+            id:'xx25'
           }
         },
         {
@@ -520,7 +546,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '添加&查看时间充值活动',
             belongTopMenu: "/systemManager",
-            activeMenu: '/sysBasics/entryActivities'
+            activeMenu: '/sysBasics/entryActivities',
+            id:'xx26'
           }
         },
         {
@@ -532,7 +559,8 @@ function setDetailRoute(accessedRoutes) {
             noCache: '1',
             title: '添加&修改系统权限',
             belongTopMenu: "/systemManager",
-            activeMenu: '/parameter/adminManager'
+            activeMenu: '/parameter/adminManager',
+            id:'xx27'
           }
         },
         // /parameter/adminManager adminOperation