Browse Source

子机构校验

Michael Wang 6 years ago
parent
commit
c5aaca84f4
1 changed files with 10 additions and 0 deletions
  1. 10 0
      src/modules/basic/view/user.vue

+ 10 - 0
src/modules/basic/view/user.vue

@@ -636,6 +636,16 @@ export default {
         ];
       } else {
         this.rules.orgId = [];
+        if (this.updateDialog) {
+          this.$refs.updateForm && this.$refs.updateForm.clearValidate("orgId");
+        } else if (this.addingDialog) {
+          this.$refs.addingForm && this.$refs.addingForm.clearValidate("orgId");
+        }
+      }
+      if (this.updateDialog) {
+        this.$refs.updateForm && this.$refs.updateForm.validateField("orgId");
+      } else if (this.addingDialog) {
+        this.$refs.addingForm && this.$refs.addingForm.validateField("orgId");
       }
     },
     rootOrgChanged4Search() {