Browse Source

权限复制按钮从配置取

Michael Wang 4 năm trước cách đây
mục cha
commit
8865f9a47d
1 tập tin đã thay đổi với 7 bổ sung2 xóa
  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
+              v-if="rolePrivileges.user_data_rule_setting"
               size="small"
               type="primary"
               icon="el-icon-plus"
@@ -1123,12 +1124,16 @@ export default {
     },
     copyPrevillegeDialog() {
       const refIds = this.$refs.table.selection;
-      if (refIds.length === 0 || refIds > 1) {
+      if (refIds.length === 0 || refIds.length > 1) {
         this.$notify({ type: "warning", message: "请先选择一行" });
         return;
       }
       this.selectedUserToCopy = refIds[0];
-      this.$refs.copyPrevillegeDialog.openDialog();
+      if (this.showUserDataRuleSetting(this.selectedUserToCopy)) {
+        this.$refs.copyPrevillegeDialog.openDialog();
+      } else {
+        this.$notify({ type: "warning", message: "当前行无权限复制" });
+      }
     },
   },
 };