xsh_1997 12 시간 전
부모
커밋
293f78fd05
1개의 변경된 파일12개의 추가작업 그리고 11개의 파일을 삭제
  1. 12 11
      ruoyi-ui/src/views/system/dept/index.vue

+ 12 - 11
ruoyi-ui/src/views/system/dept/index.vue

@@ -116,12 +116,13 @@
116 116
         <el-row>
117 117
           <el-col :span="24" v-if="form.parentId !== 0">
118 118
             <el-form-item label="上级部门" prop="parentId">
119
+              <!--  @input="onParentIdChange" -->
119 120
               <treeselect
120 121
                 v-model="form.parentId"
121 122
                 :options="deptOptions"
122 123
                 :normalizer="normalizer"
123 124
                 placeholder="选择上级部门"
124
-                @input="onParentIdChange"
125
+              
125 126
               />
126 127
             </el-form-item>
127 128
           </el-col>
@@ -243,20 +244,20 @@ export default {
243 244
     }
244 245
   },
245 246
   created() {
246
-    this.rules.deptName[1].validator = this.validateDeptNameUnique
247
+    // this.rules.deptName[1].validator = this.validateDeptNameUnique
247 248
     this.getList()
248 249
   },
249 250
   methods: {
250 251
     /** 上级部门变更后,重新校验部门名称唯一性 */
251
-    onParentIdChange() {
252
-      if (this.form.deptName) {
253
-        this.$nextTick(() => {
254
-          if (this.$refs.form) {
255
-            this.$refs.form.validateField("deptName")
256
-          }
257
-        })
258
-      }
259
-    },
252
+    // onParentIdChange() {
253
+    //   if (this.form.deptName) {
254
+    //     this.$nextTick(() => {
255
+    //       if (this.$refs.form) {
256
+    //         this.$refs.form.validateField("deptName")
257
+    //       }
258
+    //     })
259
+    //   }
260
+    // },
260 261
     /**
261 262
      * 调用 /system/dept/checkDeptNameUnique
262 263
      * data === true 唯一;false 同名已存在(编辑时排除自身 deptId)