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%">