From 79c56bb97968d8c8bdd901b9220693e90bf7c2de Mon Sep 17 00:00:00 2001 From: fks-yangshouda Date: Tue, 23 Jul 2024 14:42:17 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=AF=B9=E6=8E=A5=E8=83=BD=E8=80=97=E7=9B=91?= =?UTF-8?q?=E6=B5=8B=E6=8E=A5=E5=8F=A3=202.=E5=AF=B9=E6=8E=A5=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E7=9B=91=E6=B5=8B=E6=8E=A5=E5=8F=A3=203.=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=AE=BE=E5=A4=87=E7=9B=91=E6=B5=8B=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E5=BA=8F=E5=8F=B7=E5=88=97=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hx-ai-intelligent/src/api/deviceManage.ts | 1 + hx-ai-intelligent/src/api/monitor.ts | 21 +- .../src/view/monitor/deviceMonitor/table/index.vue | 13 +- .../src/view/monitor/deviceMonitor/tree/index.vue | 229 ++------- .../monitor/energyMonitor/analysisGraph/index.vue | 62 ++- .../monitor/energyMonitor/analysisTable/index.vue | 76 ++- .../monitor/energyMonitor/graphGraph/index.vue | 41 +- .../monitor/energyMonitor/graphTable/index.vue | 48 +- .../src/view/monitor/energyMonitor/page.vue | 4 +- .../src/view/monitor/energyMonitor/tree/index.vue | 564 ++++----------------- .../src/view/monitor/environmentMonitor/index.vue | 4 +- 11 files changed, 347 insertions(+), 716 deletions(-) diff --git a/hx-ai-intelligent/src/api/deviceManage.ts b/hx-ai-intelligent/src/api/deviceManage.ts index 29cfc9e..d4b2fd4 100644 --- a/hx-ai-intelligent/src/api/deviceManage.ts +++ b/hx-ai-intelligent/src/api/deviceManage.ts @@ -28,4 +28,5 @@ export enum group { queryFormula = `${BASE_URL}/deviceGroup/queryFormula`, // 公式查询 dropGroupFilter = `${BASE_URL}/deviceGroup/dropGroupFilter`, // 分组列表查询 dropGroupInfoFilter = `${BASE_URL}/deviceGroup/dropGroupInfoFilter`, // 计算列表查询 + queryDeviceToEnergy = `${BASE_URL}/deviceGroup/queryDeviceToEnergy`, // 能耗监测用查询设备(能耗监测设备树) } diff --git a/hx-ai-intelligent/src/api/monitor.ts b/hx-ai-intelligent/src/api/monitor.ts index 62f5064..35e31ee 100644 --- a/hx-ai-intelligent/src/api/monitor.ts +++ b/hx-ai-intelligent/src/api/monitor.ts @@ -1,13 +1,14 @@ +// 设备监测 export enum deviceMonitor { - // getTableList = '/carbon/emission/factor/queryCarbonFactorPage', - // addNewData = '/carbon/emission/factor/creatOrUpdate', - // editUser = '/carbon-smart/api/user/edit', - // frozen = '/carbon-smart/api/user/frozen', - // resetPwd = '/carbon-smart/api/user/resetPwd', - // del = '/carbon-smart/api/user/del', - // batchDel = '/carbon-smart/api/user/batchDel', - // getCarbonFactorTree = '/carbon/emission/type/getCarbonFactorTree', - // queryDeptTree = '/carbon-smart/api/user/queryDeptTree', - // queryUserPerList = '/carbon-smart/api/user/queryUserPerList', getDeviceGraph = '/carbon-smart/api/monitor/getDeviceGraph', + getDevicePointToMonitor = '/carbon-smart//api/monitor/getDevicePointToMonitor', } + +// 能耗监测 +export enum energyMonitor { + getDeviceOrNodeEnergyGraph = '/carbon-smart/api/monitor/getDeviceOrNodeEnergyGraph', + getDeviceOrNodeEnergyAnalyse = '/carbon-smart/api/monitor/getDeviceOrNodeEnergyAnalyse', +} + +// 环境监测 +export enum environmentMonitor {} 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 60f77cc..efe8cf6 100644 --- a/hx-ai-intelligent/src/view/monitor/deviceMonitor/table/index.vue +++ b/hx-ai-intelligent/src/view/monitor/deviceMonitor/table/index.vue @@ -69,11 +69,18 @@ { title: '序号', customRender: ({ record, index }) => { + debugger; // 自定义单元格内容,这里返回序号 - if (index == 0 || data.value[index - 1].deviceName == record.deviceName) { - return index + 1; + if (index == 0) { + data.value[index].index = 1; + // return 1; + } else if (data.value[index - 1].deviceName == record.deviceName) { + data.value[index].index = data.value[index - 1].index; + // return data.value[index].index; + } else { + data.value[index].index = data.value[index - 1].index + 1; } - return index; + return data.value[index].index; }, customCell: (record, rowIndex) => { if (rowIndex == undefined) { 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 f087745..eeb4944 100644 --- a/hx-ai-intelligent/src/view/monitor/deviceMonitor/tree/index.vue +++ b/hx-ai-intelligent/src/view/monitor/deviceMonitor/tree/index.vue @@ -52,12 +52,13 @@