Ver Fonte

权限控制

zhuliu há 1 ano atrás
pai
commit
fdd1097b81

+ 1 - 0
src/router/index.js

@@ -546,6 +546,7 @@ const routes = [
         meta: {
           title: '标注库',
           sign: 'indicia',
+          permission:'xiaoshi/annotationLibrary'
         },
         component: () => import('@/views/components/indicia/index.vue'),
       },

+ 1 - 1
src/utils/model/noPermission/index.vue

@@ -38,7 +38,7 @@ export default {
     bottom: 0;
     margin: auto;
     width: 180px;
-    height: 50px;
+    height: 35px;
     z-index: 9999;
     padding: 15px;
     border: none;

+ 2 - 2
src/utils/permissions.js

@@ -17,7 +17,7 @@ export default {
   // },
   //报告权限
   reportPermission(reportId, roles){
-    return true
+    // return true
     if(!reportId){
         return true
     }
@@ -85,7 +85,7 @@ export default {
    * @param {String} str 
    */
   FunPermissions(str){
-    return true
+    // return true
     const user = Store.state.user.userinfo
     if(user.roleType){
       return true

+ 4 - 0
src/views/layout/components/UserBar.vue

@@ -282,6 +282,10 @@ export default {
           this.userinfoDialogVisible = true
           break;
         case 'clientble':
+          if(!this.$permission.FunPermissions('xiaoshi/customerManage')){
+            this.$showPermissionDialog()
+            return false
+          }
           this.clientVisible = true
           this.clientTitle = '客户管理'
           break;