From c5cf44a650b4351006ba1672619dcc02c9c28b23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cyu=E2=80=9D?= <“winebunny@163.com”> Date: Mon, 15 Jul 2024 21:22:06 +0800 Subject: [PATCH] u --- src/views/commonPage/pvTree.vue | 9 +- src/views/commonPage/tree.vue | 6 +- .../pages/CapacityAdjustmentPage/index.vue | 153 ++++++++++++++++-- src/views/pages/homePage/index.vue | 28 +--- 4 files changed, 152 insertions(+), 44 deletions(-) diff --git a/src/views/commonPage/pvTree.vue b/src/views/commonPage/pvTree.vue index acae0d2..ca8c76c 100644 --- a/src/views/commonPage/pvTree.vue +++ b/src/views/commonPage/pvTree.vue @@ -175,13 +175,16 @@ const emits = defineEmits(["update-node-key"]); ////接收父组件的事件, // 点击树节点 // 处理选中target数据,最终得到由高层到底层的数组 -const handleTargetInfo = (data: TreeData, e: any) => { +const handleTargetInfo = (data: TreeData, node: any) => { // targetInfo.resultArr = []; // handleTarget(e); // 利用设备中的信息调用接口 // --------- - //点中第4层 为台区时 去返回id到父组件 并让父组件获取可调资源的相关信息和表格 - // emits("update-node-key", node.key); //获取id,用于二级接口服务返回接口给可调资源列表 + if (node.level === 5) { + //点中第5层 为单个光伏时 去返回id到父组件 并让父组件获取可调资源的相关信息和表格 + emits("update-node-key", node); //获取id,用于二级接口服务返回接口给可调资源列表 + } + // --------- }; const handleTarget = (node: any) => { diff --git a/src/views/commonPage/tree.vue b/src/views/commonPage/tree.vue index 098f863..fae5da3 100644 --- a/src/views/commonPage/tree.vue +++ b/src/views/commonPage/tree.vue @@ -238,12 +238,14 @@ const handleTargetInfo = (data: TreeData, node: any) => { console.log("点击的节点",node); - if (node.level === 4) { + if (node.level === 4||node.level===3) { console.log(node.level,'0000',node.key); console.log("zheshishaya"); //点中第4层 为台区时 去返回id到父组件 并让父组件获取可调资源的相关信息和表格 - emits("update-node-key", node.key); //获取id,用于二级接口服务返回接口给可调资源列表 + // emits("update-node-key", node.key); //获取id,用于二级接口服务返回接口给可调资源列表 + emits("update-node-key", node); //获取id,用于二级接口服务返回接口给可调资源列表 + } }; const handleTarget = (node: any) => { diff --git a/src/views/pages/CapacityAdjustmentPage/index.vue b/src/views/pages/CapacityAdjustmentPage/index.vue index eb9246c..f044280 100644 --- a/src/views/pages/CapacityAdjustmentPage/index.vue +++ b/src/views/pages/CapacityAdjustmentPage/index.vue @@ -67,7 +67,99 @@ />能量调节 -