瀏覽代碼

子机构校验

Michael Wang 6 年之前
父節點
當前提交
c5aaca84f4
共有 1 個文件被更改,包括 10 次插入0 次删除
  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() {