Quellcode durchsuchen

权限复制按钮从配置取

Michael Wang vor 4 Jahren
Ursprung
Commit
8865f9a47d
1 geänderte Dateien mit 7 neuen und 2 gelöschten Zeilen
  1. 7 2
      src/modules/basic/view/user.vue

+ 7 - 2
src/modules/basic/view/user.vue

@@ -91,6 +91,7 @@
             </el-button>
             </el-button>
 
 
             <el-button
             <el-button
+              v-if="rolePrivileges.user_data_rule_setting"
               size="small"
               size="small"
               type="primary"
               type="primary"
               icon="el-icon-plus"
               icon="el-icon-plus"
@@ -1123,12 +1124,16 @@ export default {
     },
     },
     copyPrevillegeDialog() {
     copyPrevillegeDialog() {
       const refIds = this.$refs.table.selection;
       const refIds = this.$refs.table.selection;
-      if (refIds.length === 0 || refIds > 1) {
+      if (refIds.length === 0 || refIds.length > 1) {
         this.$notify({ type: "warning", message: "请先选择一行" });
         this.$notify({ type: "warning", message: "请先选择一行" });
         return;
         return;
       }
       }
       this.selectedUserToCopy = refIds[0];
       this.selectedUserToCopy = refIds[0];
-      this.$refs.copyPrevillegeDialog.openDialog();
+      if (this.showUserDataRuleSetting(this.selectedUserToCopy)) {
+        this.$refs.copyPrevillegeDialog.openDialog();
+      } else {
+        this.$notify({ type: "warning", message: "当前行无权限复制" });
+      }
     },
     },
   },
   },
 };
 };