Prechádzať zdrojové kódy

条件中的机构树查询机构错误

jiawuxian 1 rok pred
rodič
commit
912d5d854f

+ 4 - 3
src/components/orgTree/orgQuerySelector.vue

@@ -155,11 +155,12 @@ export default {
           // debugger
         } else {
           if (this.value) {
-            defaultSelectedNode = this.findNodeInOptions(this.value);
+            defaultSelectedNode = this.findNodeInOptions(arr,this.value);
           }
         }
 
         if (defaultSelectedNode) {
+          
           // console.trace();
           this.$emit("defaultKey", defaultSelectedNode.id);
           this.$emit("defaultOrg", { ...defaultSelectedNode });
@@ -172,7 +173,7 @@ export default {
       // }, 100);
     },
 
-    findNodeInOptions(id) {
+    findNodeInOptions(treeList,id) {
       if (!id) {
         return;
       }
@@ -195,7 +196,7 @@ export default {
         }
       };
 
-      return func(this.treeList);
+      return func(treeList);
     },
     /** 转换机构数据结构 */
     normalizer(node) {