Quellcode durchsuchen

Merge branch 'master' of http://120.26.64.82:3000/BFFE/SZYGM1.0

zhongxiaoyu vor 2 Jahren
Ursprung
Commit
16ee343477
2 geänderte Dateien mit 29 neuen und 13 gelöschten Zeilen
  1. 15 4
      src/views/userManagement/account/index.vue
  2. 14 9
      src/views/userManagement/role/auth.vue

+ 15 - 4
src/views/userManagement/account/index.vue

@@ -34,8 +34,9 @@
         </el-form-item>
         <el-form-item label="是否启用" :rules="[{required: true,message: '请选择是否启用',trigger: 'change',}]" prop="user_status">
           <el-radio-group v-model="ruleForm.user_status">
-            <el-radio :label="1">启用</el-radio>
-            <el-radio :label="2"> 禁用</el-radio>
+            <el-radio v-if="statusInfo != 1" :label="2">启用</el-radio>
+            <el-radio v-else :label="1">启用</el-radio>
+            <el-radio :label="0"> 禁用</el-radio>
           </el-radio-group>
         </el-form-item>
       </el-form>
@@ -97,6 +98,8 @@ const msgId = ref(null);
 const msgType = ref("all");
 const PageIndex = ref(1);
 const searchInfo = ref("");
+const pwdInfo = ref(null);
+const statusInfo = ref(2);
 //获取用户组
 const getGroup = async () => {
   const { code, returnData } = await Query({
@@ -229,6 +232,8 @@ const btnClick = (index, row, param) => {
   } else if (param == "edit") {
     dT.value = "edit";
     editDialogVisible.value = true;
+    pwdInfo.value = row.user_pwd;
+    statusInfo.value = row.user_status;
     editDialogTitle.value = "编辑账号";
     ruleForm.value = _.cloneDeep(row);
   } else {
@@ -251,17 +256,23 @@ const addApp = () => {
   editDialogVisible.value = true;
   editDialogTitle.value = "新增账号";
   dT.value = "add";
+  statusInfo.value = 2;
   ruleForm.value = {};
 };
 const submitForm = async (formEl: FormInstance | undefined) => {
   if (!formEl) return;
   await formEl.validate((valid, fields) => {
     if (valid) {
-      ruleForm.value.user_pwd = MD5(ruleForm.value.user_pwd);
       if (dT.value == "add") {
+        ruleForm.value.user_pwd = MD5(ruleForm.value.user_pwd);
         dataChange(1, ruleForm.value);
       } else {
-        dataChange(2, ruleForm.value);
+        if (ruleForm.value.user_pwd === pwdInfo.value) {
+          dataChange(2, ruleForm.value);
+        } else {
+          ruleForm.value.user_pwd = MD5(ruleForm.value.user_pwd);
+          dataChange(2, ruleForm.value);
+        }
       }
       editDialogVisible.value = false;
     } else {

+ 14 - 9
src/views/userManagement/role/auth.vue

@@ -22,21 +22,23 @@
       </div>
       <div class="box auth-list">
         <div class="manageTitle">权限树</div>
-        <div class="t30">
-          <el-tree ref="treeRef" highlight-current @check="currentChange" :default-expanded-keys="checkKeys" :data="data" show-checkbox :props="defaultProps" node-key="auth_id" @node-click="handleNodeClick">
-            <template #default="{data}">
-              <span class="custom-tree-node">
-                {{ data.auth_name }}
-              </span>
-              <span v-if="
+        <div class="t30 auth-tree">
+          <el-scrollbar>
+            <el-tree ref="treeRef" highlight-current @check="currentChange" :default-expanded-keys="checkKeys" :data="data" show-checkbox :props="defaultProps" node-key="auth_id" @node-click="handleNodeClick">
+              <template #default="{data}">
+                <span class="custom-tree-node">
+                  {{ data.auth_name }}
+                </span>
+                <span v-if="
               data.edit_col_condition ||
               data.delete_row_condition ||
               data.edit_row_condition ||
               data.new_col_condition ||
               data.query_col_conditon ||
               data.query_row_condition" class="custom-tree-icon"></span>
-            </template>
-          </el-tree>
+              </template>
+            </el-tree>
+          </el-scrollbar>
         </div>
       </div>
       <div class="box auth-list">
@@ -397,6 +399,9 @@ const defaultProps = {
         background-size: 100% 100%;
       }
     }
+    .auth-tree {
+      height: calc(100% - 60px);
+    }
   }
 }
 </style>