Browse Source

用户菜单只有有admin权限才能修改用户是否启用

wangzhuo 1 year ago
parent
commit
f299d214ac
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/views/system/user.vue

+ 3 - 0
src/views/system/user.vue

@@ -1049,6 +1049,9 @@
       },
       beforeOpen(done, type) {
         if (["edit", "view"].includes(type)) {
+          if (localStorage.getItem('roleName').indexOf('admin') == -1) {
+            this.findObject(this.option.group, "workingStatus").disabled = true;
+          }
           getUser(this.form.id).then(res => {
             this.form = res.data.data;
             if(this.form.hasOwnProperty("deptId")){