hsshuxian 10 月之前
父節點
當前提交
592d08d122
共有 1 個文件被更改,包括 4 次插入5 次删除
  1. 4 5
      ems-ui/src/views/mgr/charging.vue

+ 4 - 5
ems-ui/src/views/mgr/charging.vue

@@ -576,7 +576,7 @@ export default {
           }
         }
       } catch (error) {
-        console.error('请求数据失败1111111:', error);
+        console.error('请求数据失败123:', error);
       }
     },
 
@@ -598,17 +598,16 @@ export default {
         this.queryParams.areaCode = this.defalutArr.join('/');
         this.$refs['tree'].setCurrentKey(this.defalutArr[this.defalutArr.length - 1]);
         this.$refs['tree'].setCheckedKeys([this.queryParams.areaCode]);
+
       }
       this.meterClsChange(45);
     },
 
     recursion(data, defalutArr) {
+      defalutArr.push(data.id)
       if (data.children && data.children.length) {
-        data.children.forEach((child) => {
-          this.recursion(child, defalutArr);
-        });
+        this.recursion(data.children[0], defalutArr)
       }
-      defalutArr.push(data.id);
     },
     /** 查询区域树结构 */
     async getAreaTreeByTag(tier, tagCode) {