From fbe0796d7d7b0c84ca35f4da6b0e72ef58a62a2e Mon Sep 17 00:00:00 2001 From: fks-yangshouda Date: Mon, 19 Aug 2024 15:45:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=9B=91=E6=8E=A7=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/view/monitor/deviceMonitor/graph/index.vue | 4 +- .../src/view/monitor/deviceMonitor/table/index.vue | 2 +- .../src/view/monitor/deviceMonitor/tree/index.vue | 33 ++++++++++-- .../monitor/energyMonitor/analysisTable/index.vue | 11 ++-- .../monitor/energyMonitor/graphTable/index.vue | 2 +- .../environmentMonitor/aggregateData/index.vue | 59 +++++++++++++++------- .../environmentMonitor/averageData/index.vue | 7 ++- .../environmentMonitor/historyData/index.vue | 15 +++++- .../src/view/monitor/environmentMonitor/index.vue | 17 +++++-- 9 files changed, 113 insertions(+), 37 deletions(-) diff --git a/hx-ai-intelligent/src/view/monitor/deviceMonitor/graph/index.vue b/hx-ai-intelligent/src/view/monitor/deviceMonitor/graph/index.vue index 6eee95e..6b1b1fb 100644 --- a/hx-ai-intelligent/src/view/monitor/deviceMonitor/graph/index.vue +++ b/hx-ai-intelligent/src/view/monitor/deviceMonitor/graph/index.vue @@ -77,7 +77,7 @@ grid: { top: 60, // 上内边距 bottom: 40, // 下内边距 - left: 10, // 左内边距 + left: 50, // 左内边距 right: 60, // 右内边距 containLabel: true, // 自动调整 grid 以适应标签 }, @@ -85,7 +85,7 @@ data: legendList, orient: 'horizontal', top: 30, - right: 130, + right: 55, icon: 'rect', }, tooltip: { diff --git a/hx-ai-intelligent/src/view/monitor/deviceMonitor/table/index.vue b/hx-ai-intelligent/src/view/monitor/deviceMonitor/table/index.vue index f021043..e11c3c7 100644 --- a/hx-ai-intelligent/src/view/monitor/deviceMonitor/table/index.vue +++ b/hx-ai-intelligent/src/view/monitor/deviceMonitor/table/index.vue @@ -4,7 +4,7 @@ :data-source="data" bordered :pagination="false" - style="width: 99%; height: 75%" + style="width: 99%; height: 75%; margin-left: 0.5%" :scroll="{ x: 2000, y: 450 }" /> @@ -124,6 +123,18 @@ http.post(device.queryDeviceTree, { orgId: orgId.value }).then((res) => { treeData1.value = formatTreeData(res.data); + + if (treeData1.value && treeData1.value.length > 0) { + if (treeData1.value[0].children) { + value.value = treeData1.value[0].children[0].value; + changeDeviceType(treeData1.value[0].children[0].value, [ + treeData1.value[0].children[0].title, + ]); + } else { + value.value = treeData1.value[0].value; + changeDeviceType(treeData1.value[0].value, [treeData1.value[0].title]); + } + } }); const formatTreeData = (data: any) => { @@ -207,10 +218,16 @@ throw new Error('pageData is not provided'); } const getDianWeiList = () => { + let deviceIds: any[] = []; if (checkedKeys.value && checkedKeys.value.length > 0) { + checkedKeys.value.forEach((element) => { + if (value.value != element) { + deviceIds.push(element); + } + }); http .post(deviceMonitor.getDevicePointToMonitor, { - deviceIds: checkedKeys.value, + deviceIds: deviceIds, orgId: orgId.value, type: 0, }) @@ -259,9 +276,17 @@ startDate.value = year + '-' + month + '-' + day; endDate.value = year + '-' + month + '-' + day; } + let deviceIds: any[] = []; + if (checkedKeys.value && checkedKeys.value.length > 0) { + checkedKeys.value.forEach((element) => { + if (value.value != element) { + deviceIds.push(element); + } + }); + } http .post(deviceMonitor.getDeviceGraph, { - deviceIds: checkedKeys.value, + deviceIds: deviceIds, devicePointCode: selectedValue.value, endDate: endDate.value, @@ -323,7 +348,7 @@ if (options2.value && options2.value.length > 0) { frequencyValue.value = options2.value[options2.value.length - 1].value; } - changeDeviceType(null, null); + // changeDeviceType(null, null); // getSelect(); }); // 在组件卸载时移除监听器 diff --git a/hx-ai-intelligent/src/view/monitor/energyMonitor/analysisTable/index.vue b/hx-ai-intelligent/src/view/monitor/energyMonitor/analysisTable/index.vue index a591e61..613ba7e 100644 --- a/hx-ai-intelligent/src/view/monitor/energyMonitor/analysisTable/index.vue +++ b/hx-ai-intelligent/src/view/monitor/energyMonitor/analysisTable/index.vue @@ -5,7 +5,8 @@ :data-source="data" bordered :pagination="false" - :row-selection="rowSelection"> + :row-selection="rowSelection" + style="width: 99%; margin-left: 0.5%">