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 @@