From 47e6750b243e75a19d747a814f68e6f109b462aa Mon Sep 17 00:00:00 2001 From: fks-yangshouda Date: Tue, 20 Aug 2024 16:09:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=83=BD=E8=80=97=E7=9B=91=E6=B5=8B=E7=94=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E8=AE=BE=E5=A4=87=E6=B7=BB=E5=8A=A0deviceNum?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/view/monitor/energyMonitor/tree/index.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hx-ai-intelligent/src/view/monitor/energyMonitor/tree/index.vue b/hx-ai-intelligent/src/view/monitor/energyMonitor/tree/index.vue index d0bd210..c6ff223 100644 --- a/hx-ai-intelligent/src/view/monitor/energyMonitor/tree/index.vue +++ b/hx-ai-intelligent/src/view/monitor/energyMonitor/tree/index.vue @@ -441,7 +441,7 @@ if (mode.value == '0') { http .post(group.queryDeviceToEnergy, { - deviceName: deviceName.value, + deviceNum: deviceName.value, energyType: selectedValue.value, orgId: orgId.value, // pageNum: 1, @@ -474,10 +474,12 @@ }) .then((res) => { treeData2.value = []; - treeData2.value = formatTreeData(pointName.value ? res.data[0].searchList : res.data); + treeData2.value = formatTreeData(res.data); expandedKeys.value = getAllKeys(treeData2.value); - checkedKeys.value.push(treeData2.value[0].key, treeData2.value[1].key); + if (treeData2.value?.length >= 2) { + checkedKeys.value.push(treeData2.value[0].key, treeData2.value[1].key); + } getSelect(null); }) .finally(() => {