From 42049e14bdfe4eeeccd9d23f73575410dee7cd5c Mon Sep 17 00:00:00 2001 From: fks-yangshouda Date: Mon, 19 Aug 2024 16:21:45 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=9B=91=E6=8E=A7?= =?UTF-8?q?=E4=B8=AD=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/energyMonitor/tree/index.vue | 29 +++++++++------------- 1 file changed, 12 insertions(+), 17 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 7f77d44..9c8d87f 100644 --- a/hx-ai-intelligent/src/view/monitor/energyMonitor/tree/index.vue +++ b/hx-ai-intelligent/src/view/monitor/energyMonitor/tree/index.vue @@ -6,11 +6,17 @@ 数据点位 + + style="margin-bottom: 10px; width: 100%"> -->
- + Date: Tue, 20 Aug 2024 15:40:49 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=9B=91=E6=8E=A7?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E5=89=8D=E5=8F=B0=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hx-ai-intelligent/src/icon/biaoge1.svg | 8 ++++ hx-ai-intelligent/src/icon/zhexiantu.svg | 8 ++++ .../src/view/monitor/deviceMonitor/graph/index.vue | 31 ++++++++++++ .../src/view/monitor/deviceMonitor/page.vue | 10 ++-- .../src/view/monitor/deviceMonitor/table/index.vue | 1 + .../src/view/monitor/deviceMonitor/tree/index.vue | 25 +++++----- .../monitor/energyMonitor/graphGraph/index.vue | 29 ++++++++++- .../src/view/monitor/energyMonitor/page.vue | 8 ++-- .../src/view/monitor/energyMonitor/tree/index.vue | 1 + .../environmentMonitor/aggregateData/index.vue | 56 ++++++++++++++++++---- .../src/view/monitor/environmentMonitor/index.vue | 6 ++- 11 files changed, 151 insertions(+), 32 deletions(-) create mode 100644 hx-ai-intelligent/src/icon/biaoge1.svg create mode 100644 hx-ai-intelligent/src/icon/zhexiantu.svg diff --git a/hx-ai-intelligent/src/icon/biaoge1.svg b/hx-ai-intelligent/src/icon/biaoge1.svg new file mode 100644 index 0000000..d2840f4 --- /dev/null +++ b/hx-ai-intelligent/src/icon/biaoge1.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/hx-ai-intelligent/src/icon/zhexiantu.svg b/hx-ai-intelligent/src/icon/zhexiantu.svg new file mode 100644 index 0000000..1beacba --- /dev/null +++ b/hx-ai-intelligent/src/icon/zhexiantu.svg @@ -0,0 +1,8 @@ + + + + + + + + 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 6b1b1fb..bce40be 100644 --- a/hx-ai-intelligent/src/view/monitor/deviceMonitor/graph/index.vue +++ b/hx-ai-intelligent/src/view/monitor/deviceMonitor/graph/index.vue @@ -1,5 +1,26 @@ 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 e11c3c7..280a377 100644 --- a/hx-ai-intelligent/src/view/monitor/deviceMonitor/table/index.vue +++ b/hx-ai-intelligent/src/view/monitor/deviceMonitor/table/index.vue @@ -96,6 +96,7 @@ const column: TableColumnType[] = [ { title: '序号', + width: 50, customRender: ({ record, index }) => { // 自定义单元格内容,这里返回序号 if (index == 0) { diff --git a/hx-ai-intelligent/src/view/monitor/deviceMonitor/tree/index.vue b/hx-ai-intelligent/src/view/monitor/deviceMonitor/tree/index.vue index c20cf67..617334e 100644 --- a/hx-ai-intelligent/src/view/monitor/deviceMonitor/tree/index.vue +++ b/hx-ai-intelligent/src/view/monitor/deviceMonitor/tree/index.vue @@ -7,6 +7,7 @@
{ 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]); - } - } + // 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) => { return data.map((item: any) => ({ title: item.code + '.' + item.deviceType, value: item.code, + disabled: item.children.length != 0 ? true : false, children: item.children ? formatTreeData(item.children) : [], })); }; diff --git a/hx-ai-intelligent/src/view/monitor/energyMonitor/graphGraph/index.vue b/hx-ai-intelligent/src/view/monitor/energyMonitor/graphGraph/index.vue index 13dc5ca..bdbe466 100644 --- a/hx-ai-intelligent/src/view/monitor/energyMonitor/graphGraph/index.vue +++ b/hx-ai-intelligent/src/view/monitor/energyMonitor/graphGraph/index.vue @@ -1,5 +1,21 @@ 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 9c8d87f..d0bd210 100644 --- a/hx-ai-intelligent/src/view/monitor/energyMonitor/tree/index.vue +++ b/hx-ai-intelligent/src/view/monitor/energyMonitor/tree/index.vue @@ -40,6 +40,7 @@ v-model:expandedKeys="expandedKeys" v-model:selectedKeys="selectedKeys" v-model:checkedKeys="checkedKeys" + :show-line="{ showLeafIcon: false }" checkable :height="600" style="width: 100%; overflow-y: auto; margin-bottom: 10px; margin-top: 10px" diff --git a/hx-ai-intelligent/src/view/monitor/environmentMonitor/aggregateData/index.vue b/hx-ai-intelligent/src/view/monitor/environmentMonitor/aggregateData/index.vue index 2d17fd6..48e0063 100644 --- a/hx-ai-intelligent/src/view/monitor/environmentMonitor/aggregateData/index.vue +++ b/hx-ai-intelligent/src/view/monitor/environmentMonitor/aggregateData/index.vue @@ -326,10 +326,10 @@ .get(environmentMonitor.queryDeviceArea, { orgId: orgId.value, point: typeValue.value }) .then((res) => { treeData2.value = res.data; - if (treeData2.value && treeData2.value.length > 0) { - quyuvalue.value = [treeData2.value[0].childList[0].id]; - getDeviceHotMap(); - } + // if (treeData2.value && treeData2.value.length > 0) { + // quyuvalue.value = [treeData2.value[0].childList[0].id]; + // getDeviceHotMap(); + // } }); }; @@ -342,12 +342,13 @@ break; } } + let time = timeValue.value.format('YYYY-MM-DD'); http .post(environmentMonitor.getDeviceHotMap, { orgId: orgId.value, environmentType: environmentType, location: quyuvalue.value, // 区域id或者name - time: '2024-07-01', + time: time, timeRate: frequencyValue.value, // 频率 }) @@ -383,7 +384,7 @@ // 获取区域数据 await queryDeviceArea(); - // await getDeviceHotMap(); + getDeviceHotMap(); // let hotData = { // timeList: [ @@ -749,6 +750,33 @@ hotChar.dispose(); } hotChar = echarts.init(hotChartRef.value); + let min = 0; + let max = 100; + if (typeValue.value == 'MFStem') { + // 温度 + min = -20; + max = 40; + } else if (typeValue.value == 'MFSCORAr') { + // CO2浓度 + min = 350; + max = 2000; + } else if (typeValue.value == 'MFSPM') { + // PM2.5 + min = 0; + max = 500; + } else if (typeValue.value == 'MFSwf') { + // 光照度 + min = 0; + max = 10000; + } else if (typeValue.value == 'MFSvf') { + // TVOC + min = 0; + max = 1; + } else if (typeValue.value == 'MFShum') { + //湿度 + min = 0; + max = 100; + } const option = { tooltip: { @@ -772,11 +800,21 @@ splitArea: { show: true, }, + axisLabel: { + formatter: function (value) { + // 每五个字符插入一个换行符 + if (value.length > 5) { + return value.match(/.{1,5}/g).join('\n'); + } + return value; + }, + lineHeight: 20, + }, }, visualMap: { show: false, - min: 0, - max: 30, + min: min, + max: max, // calculable: true, // orient: 'horizontal', // left: 'center', @@ -803,7 +841,7 @@ ], }; - hotChar = echarts.init(hotChartRef.value); + // hotChar = echarts.init(hotChartRef.value); hotChar.setOption(option); } }; diff --git a/hx-ai-intelligent/src/view/monitor/environmentMonitor/index.vue b/hx-ai-intelligent/src/view/monitor/environmentMonitor/index.vue index 805ab8e..9c93cf9 100644 --- a/hx-ai-intelligent/src/view/monitor/environmentMonitor/index.vue +++ b/hx-ai-intelligent/src/view/monitor/environmentMonitor/index.vue @@ -9,7 +9,11 @@ margin-top: 0.5%; padding-left: 1.5%; background: #ffffff; - font-family: 'PingFangSC-Regular', sans-serif; + font-family: 'PingFang SC'; + font-size: 16px; + font-weight: 700; + letter-spacing: 1.33px; + line-height: 21px; "> From 47e6750b243e75a19d747a814f68e6f109b462aa Mon Sep 17 00:00:00 2001 From: fks-yangshouda Date: Tue, 20 Aug 2024 16:09:57 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=83=BD=E8=80=97=E7=9B=91=E6=B5=8B?= =?UTF-8?q?=E7=94=A8=E6=9F=A5=E8=AF=A2=E8=AE=BE=E5=A4=87=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?deviceNum=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 --- hx-ai-intelligent/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(() => {