jun.zhang 4 years ago
parent
commit
17c829d1c2
2 changed files with 16 additions and 15 deletions
  1. 10 9
      src/ahrds/components/user/index.vue
  2. 6 6
      src/config/rules.js

+ 10 - 9
src/ahrds/components/user/index.vue

@@ -244,7 +244,7 @@
             </el-row>
             <el-row>
               <el-col :span="12">
-                <el-form-item v-show="add" label="转送单文头" prop="passTitle">
+                <el-form-item label="转送单文头" prop="passTitle">
                   <el-input v-model="ruleForm.passTitle" style="width: 90%" />
                 </el-form-item>
               </el-col>
@@ -282,7 +282,7 @@
             style="margin-left: 5%"
             type="primary"
             @click="submitForm"
-            >{{ add === true ? "确认" : "保存" }}</el-button
+            >{{ add == true ? "确认" : "保存" }}</el-button
           >
         </div>
       </div>
@@ -539,14 +539,14 @@ export default {
     },
     // 验证
     submitForm() {
-      this.$refs.ruleForm.validate((valid) => {
+      this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          this.add === true ? this.addUser() : this.editUser();
+          this.add === true ? this.addUser() : this.editUsers()
         } else {
-          console.log("error submit!!");
-          return false;
+          console.log('error submit!!')
+          return false
         }
-      });
+      })
     },
     // 表单重置
     resetForm(ruleForm) {
@@ -579,9 +579,10 @@ export default {
       });
     },
     // 修改用户
-    editUser() {
+    editUsers() {
+      // debugger
       const form = JSON.parse(JSON.stringify(this.ruleForm));
-      // form.password = md5(this.ruleForm.password);
+         // form.password = md5(this.ruleForm.password);
 
       GetUserApi.editUser(form).then((res) => {
         if (res.errno === 0) {

+ 6 - 6
src/config/rules.js

@@ -255,12 +255,12 @@ const rules = {
       trigger: 'blur',
       message: '请输入您的函件文头'
     }],
-    // 转送单文头
-    passTitle: [{
-      required: true,
-      trigger: 'blur',
-      message: '请输入您的转送单文头'
-    }],
+    // // 转送单文头
+    // passTitle: [{
+    //   required: true,
+    //   trigger: 'blur',
+    //   message: '请输入您的转送单文头'
+    // }],
     // 是否人大机构
     isRenDa: [{
       required: true,