diff --git a/hx-ai-intelligent/src/api/alarmSettings/deviceAlarms.ts b/hx-ai-intelligent/src/api/alarmSettings/deviceAlarms.ts index b659c51..b78f725 100644 --- a/hx-ai-intelligent/src/api/alarmSettings/deviceAlarms.ts +++ b/hx-ai-intelligent/src/api/alarmSettings/deviceAlarms.ts @@ -1,5 +1,9 @@ export enum deviceAlarms { getTableList = '/carbon-smart/api/AlarmEquipment/selectAlarmEquipment', //设备告警分页 - addOrUpNewData = '/carbon-smart/api/AlarmEquipment/creatOrUpdate', //设备告警添加 修海 + addOrUpNewData = '/carbon-smart/api/AlarmEquipment/creatOrUpdate', //设备告警添加 修改 del = '/carbon-smart/api/AlarmEquipment/delete', //设备告警删除 + configGetTableList = '/carbon-smart/api/AlarmEquipmentRule/selectAlarmEquipmentRule', //配置设备告警分页 + configAddOrUpNewData = '/carbon-smart/api/AlarmEquipmentRule/creatOrUpdate', //配置设备告警添加 修改 + configFindById = '/carbon-smart/api/AlarmEquipmentRule/findById', //配置设备告警 查询详情 + configDel = '/carbon-smart/api/AlarmEquipmentRule/delete', //配置设备告警删除 } diff --git a/hx-ai-intelligent/src/api/alarmSettings/energyAlarm.ts b/hx-ai-intelligent/src/api/alarmSettings/energyAlarm.ts new file mode 100644 index 0000000..0ea6ebc --- /dev/null +++ b/hx-ai-intelligent/src/api/alarmSettings/energyAlarm.ts @@ -0,0 +1,9 @@ +export enum energyAlarms { + getTableList = '/carbon-smart/api/AlarmEnergyConsumption/selectAlarmEnergyConsumption', //能耗告警分页 + addOrUpNewData = '/carbon-smart/api/AlarmEnergyConsumption/creatOrUpdate', //能耗告警添加 修改 + del = '/carbon-smart/api/AlarmEnergyConsumption/delete', //能耗删除 + configGetTableList = '/carbon-smart/api/AlarmEquipmentRule/selectAlarmEquipmentRule', //配置设备告警分页 + configAddOrUpNewData = '/carbon-smart/api/AlarmEquipmentRule/creatOrUpdate', //配置设备告警添加 修改 + configFindById = '/carbon-smart/api/AlarmEquipmentRule/findById', //配置设备告警 查询详情 + configDel = '/carbon-smart/api/AlarmEquipmentRule/delete', //配置设备告警删除 +} diff --git a/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts b/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts index eecf57e..8f30f9a 100644 --- a/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts +++ b/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts @@ -11,5 +11,10 @@ export enum carbonEmissionFactorLibrary { } // 碳排管理-碳排统计接口 export enum energyConsumption { + getDicList = '/carbon-smart/client/dict/list', pageList = '/carbon-smart/api/carbon/stats/pageList', + findById = '/carbon-smart/api/carbon/stats/findById', + creat = '/carbon-smart/api/carbon/stats/creat', + update = '/carbon-smart/api/carbon/stats/update', + del = '/carbon-smart/api/carbon/stats/del', } \ No newline at end of file diff --git a/hx-ai-intelligent/src/api/index.ts b/hx-ai-intelligent/src/api/index.ts index 22478b4..9f32029 100644 --- a/hx-ai-intelligent/src/api/index.ts +++ b/hx-ai-intelligent/src/api/index.ts @@ -38,3 +38,46 @@ export const dict = async ({ } return Promise.resolve({ data: { data: get(dictMap, key) } }); }; + +/** + * 获取所有枚举(无需传参) + */ +export const getAllEnum = async ({ + api = `${BASE_URL}/operation/enum/getAllEnum`, + params = {}, + keyField = 'dicKey', + transform = (res: any) => res, +}: dictHttpConfig) => { + const dictMap = JSON.parse(sessionStorage.getItem('dictMap') || '{}') as Object; + const key = get(params, keyField) as keyof typeof dictMap; + + if (!dictMap.hasOwnProperty(key)) { + const res = await http.post(api, params); + const options = get(transform(res), `data.${key}`); + dictMap[key] = options; + sessionStorage.setItem('dictMap', JSON.stringify(dictMap)); + } + return Promise.resolve({ data: { data: get(dictMap, key) } }); +}; + + +/** + * 获取单个枚举(需传参,参数 enumType) + */ +export const getEnum = async ({ + api = `${BASE_URL}/operation/enum/getEnum`, + params = {}, + keyField = 'dicKey', + transform = (res: any) => res, +}: dictHttpConfig) => { + const dictMap = JSON.parse(sessionStorage.getItem('dictMap') || '{}') as Object; + const key = get(params, keyField) as keyof typeof dictMap; + + if (!dictMap.hasOwnProperty(key)) { + const res = await http.post(api, params); + const options = get(transform(res), `data.${key}`); + dictMap[key] = options; + sessionStorage.setItem('dictMap', JSON.stringify(dictMap)); + } + return Promise.resolve({ data: { data: get(dictMap, key) } }); +}; \ No newline at end of file diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue index 31acf84..bf0c008 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue @@ -25,19 +25,339 @@ -
2
-
3
+
+
+
+
+
xxxx
+
+ +
+
+
diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts index 99603a1..77bec08 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/energyAlarmConfig.ts @@ -1,9 +1,7 @@ -import data from '../notificationManagementMock.json'; import { http } from '/nerv-lib/util'; import { NsMessage } from '/nerv-lib/component'; -import { deviceAlarms } from '/@/api/alarmSettings/deviceAlarms'; +import { energyAlarms } from '/@/api/alarmSettings/energyAlarm'; -import { ref } from 'vue'; const tableKeyMap = [ { title: '序号', @@ -31,14 +29,13 @@ const tableKeyMap = [ }, { title: '监测时长', - dataIndex: 'monitor', + dataIndex: 'monitorFrequency', }, { title: '是否启用', dataIndex: 'enableRules', }, ]; -const mockData = ref(data.listData); const doWnload = (url: any) => { const a = document.createElement('a'); document.body.appendChild(a); @@ -51,14 +48,13 @@ const doWnload = (url: any) => { export const energyAlarmConfigs = ( editeEnergyAlarm: any, - mainRefEquipmentAlarm: any, + mainEnergyAlarmConfig: any, energyAlarm: any, configureDeviceAlarms: any, ) => { return { title: '告警规则', - api: deviceAlarms.getTableList, - value: mockData.value, + api: energyAlarms.getTableList, headerActions: [ { label: '新增', @@ -73,7 +69,6 @@ export const energyAlarmConfigs = ( name: 'groupImport', type: 'primary', extra: { - // api: props.postImportApi, // 导入接口名 title: '设备信息', // 弹窗title templateName: 'whiteListUser', // 所使用的文件名称 indexName: '设备id', // 匹配类型字段 @@ -122,9 +117,9 @@ export const energyAlarmConfigs = ( dynamicParams: ['uuid', 'appealType'], confirm: true, handle: (data: any) => { - http.post(deviceAlarms.del, { id: data.id }).then(() => { + http.post(energyAlarms.del, { id: data.id }).then(() => { NsMessage.success('操作成功'); - mainRefEquipmentAlarm.value?.nsTableRef.reload(); + mainEnergyAlarmConfig.value?.nsTableRef.reload(); }); }, }, @@ -139,6 +134,7 @@ export const energyAlarmConfigs = ( component: 'NsSelect', componentProps: { placeholder: '请选择告警优先级', + allowClear: true, options: [ { label: '紧急', @@ -160,6 +156,7 @@ export const energyAlarmConfigs = ( label: '告警标题', component: 'NsInput', componentProps: { + allowClear: true, placeholder: '请输入告警标题关键字', }, }, @@ -168,6 +165,7 @@ export const energyAlarmConfigs = ( label: '错误码', component: 'NsInput', componentProps: { + allowClear: true, placeholder: '请输入告警错误码', }, }, @@ -176,6 +174,7 @@ export const energyAlarmConfigs = ( label: '启用状态', component: 'NsSelect', componentProps: { + allowClear: true, placeholder: '请选择启用状态', options: [ { diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts index 955ecf9..5bcee5e 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts @@ -123,7 +123,7 @@ export const equipmentAlarmTableConfig = ( confirm: true, handle: (data: any) => { http.post(deviceAlarms.del, { id: data.id }).then(() => { - NsMessage.success('操作成功'); + NsMessage.success('告警删除成功'); mainRefEquipmentAlarm.value?.nsTableRef.reload(); }); }, @@ -139,6 +139,7 @@ export const equipmentAlarmTableConfig = ( component: 'NsSelect', componentProps: { placeholder: '请选择告警优先级', + allowClear: true, options: [ { label: '紧急', @@ -160,6 +161,7 @@ export const equipmentAlarmTableConfig = ( label: '告警标题', component: 'NsInput', componentProps: { + allowClear: true, placeholder: '请输入告警标题关键字', }, }, @@ -168,6 +170,7 @@ export const equipmentAlarmTableConfig = ( label: '错误码', component: 'NsInput', componentProps: { + allowClear: true, placeholder: '请输入错误码关键字', }, }, @@ -177,6 +180,7 @@ export const equipmentAlarmTableConfig = ( component: 'NsSelect', componentProps: { placeholder: '请选择启用状态', + allowClear: true, options: [ { label: '启用', diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/notificationManagementConfig.ts b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/notificationManagementConfig.ts index 725e1e3..62bbf63 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/notificationManagementConfig.ts +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/notificationManagementConfig.ts @@ -41,7 +41,7 @@ const tableKeyMap = [ }, ]; const mockData = ref(data.listData); -export const notificationtableConfig = (el) => { +export const notificationtableConfig = (notificationManagements: any) => { return { title: '告警规则', // api: '/carbon_emission/device/getDeviceList', @@ -57,7 +57,7 @@ export const notificationtableConfig = (el) => { name: 'FeedBackDetail', dynamicParams: ['uuid', 'appealType'], handle: (data: any) => { - console.log(data, '联系方式'); + notificationManagements.value.toggle(data); }, }, ], diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue index f2397f7..54cee22 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionFactorLibrary/index.vue @@ -135,7 +135,9 @@ import { log } from 'node:console'; const casData = ref([]); const treeData = ref([]); const userAuthList = ref([]); - const orgId = JSON.parse(sessionStorage.getItem(import.meta.env.VITE_PUBLIC_PATH)).orgId; + const orgId = ref(''); + const result = JSON.parse(sessionStorage.getItem('ORGID')!); + orgId.value = result; const dynamicDisabled = computed(() => { return formRef.value?.validateResult && userAuthList.value?.length; }); @@ -493,7 +495,7 @@ import { log } from 'node:console'; isReload: true, isClearCheck: true, api: carbonEmissionFactorLibrary.del, - dynamicParams: { id: 'id[]' }, + dynamicParams: { ids: 'id[]' }, }, ], columns: [ @@ -573,7 +575,7 @@ import { log } from 'node:console'; { label: '删除', name: 'userDelete', - dynamicParams: 'id', + dynamicParams: { ids: 'id[]' }, confirm: true, isReload: true, api: carbonEmissionFactorLibrary.del, @@ -617,11 +619,27 @@ import { log } from 'node:console'; options: [ { label: 'CO2', - value: 0, + value: 'CO2', }, { label: 'CO2e', - value: 1, + value: 'CO2e', + }, + { + label: 'SF6', + value:'SF6', + }, + { + label: 'CH4', + value: 'CH4', + }, + { + label: 'PFCs', + value: 'PFCs', + }, + { + label: 'HFCs', + value: 'HFCs', }, ], }, diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index copy.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index copy.vue new file mode 100644 index 0000000..c205a2d --- /dev/null +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index copy.vue @@ -0,0 +1,179 @@ + + + + + diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue new file mode 100644 index 0000000..be5bf5b --- /dev/null +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/carbonEmissions/index.vue @@ -0,0 +1,82 @@ + + + + \ No newline at end of file diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts index e12f23a..f5bc524 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/config.ts @@ -7,64 +7,70 @@ export const tableColumns = [ }, { title: '能源种类', - dataIndex: 'money', + dataIndex: 'energyType', }, { title: '计量单位', - className: 'column-money', - dataIndex: 'money', + className: 'unit', + dataIndex: 'unit', }, { title: '全年', - dataIndex: 'address', + dataIndex: 'yearly', }, { title: '1月', - dataIndex: 'address', + dataIndex: 'jan', + // customRender: ({ text, record }) => ({ + // children: text, + // attrs: { + // style: record.janFlag === 1 ? 'color: red' : 'color: blue' + // } + // }) }, { title: '2月', - dataIndex: 'address', + dataIndex: 'feb', }, { title: '3月', - dataIndex: 'address', + dataIndex: 'mar', }, { title: '4月', - dataIndex: 'address', + dataIndex: 'apr', }, { title: '5月', - dataIndex: 'address', + dataIndex: 'may', }, { title: '6月', - dataIndex: 'address', + dataIndex: 'jun', }, { title: '7月', - dataIndex: 'address', + dataIndex: 'jul', }, { title: '8月', - dataIndex: 'address', + dataIndex: 'aug', }, { title: '9月', - dataIndex: 'address', + dataIndex: 'sep', }, { title: '10月', - dataIndex: 'address', + dataIndex: 'oct', }, { title: '11月', - dataIndex: 'address', + dataIndex: 'nov', }, { title: '12月', - dataIndex: 'address', + dataIndex: 'dec', }, { title: '操作', diff --git a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue index f13ffe3..0e88f8d 100644 --- a/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue +++ b/hx-ai-intelligent/src/view/carbonEmissionManage/carbonEmissionStatistics/energyConsumption/index.vue @@ -6,32 +6,35 @@ bordered :pagination="false" :scroll="{ x: 2000 }"> - diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.less b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.less index b9dad0f..dd02f25 100644 --- a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.less +++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.less @@ -4,24 +4,6 @@ // height: 100%; position: relative; // background: linear-gradient(#badaff, #8cabeb, #7095de); - .drawer-box { - width: 30px; - height: 40px; - border-radius: 2px; - position: fixed; - right: 0; - top: 0; - bottom: 0; - margin: auto; - background: rgba(0, 0 ,0 ,0.5); - display: flex; - justify-content: center; - align-items: center; - cursor: pointer; - .drawer-icon { - - } - } // 照明设备功能总容器 .lighting-img-box { position: relative; @@ -88,9 +70,9 @@ background: rgba(80, 236, 244, 0.3); border: 2px solid rgb(80, 236, 244); } - .area-item:hover { - border:2px solid white; - } + // .area-item:hover { + // transform: scale(1.05); + // } .area-item { cursor: pointer; transition: all ease 0.2s; @@ -125,20 +107,21 @@ background: rgba(0, 0, 0, 0.1); } } - .group-shadow { - transition: all ease 0.2s; - } - .group-shadow:hover { - border: 2px solid white; - } + // .group-shadow { + // transition: all ease 0.2s; + // } + // .group-shadow:hover { + // transform: scale(1.05); + // } } } } } +// 总容器与抽屉按钮 .ns-content-main { position: relative; - // 抽屉伸缩按钮 - .drawer-box { + // 抽屉打开按钮 + .drawer-box-in { width: 30px; height: 40px; border-radius: 2px; @@ -152,8 +135,22 @@ justify-content: center; align-items: center; cursor: pointer; - .drawer-icon { - - } } + // 抽屉关闭按钮 + .drawer-box-out { + width: 30px; + height: 40px; + border-radius: 2px; + position: fixed; + right: 496px; + top: 0; + bottom: 0; + margin: auto; + background: rgba(0, 0 ,0 ,0.5); + display: flex; + justify-content: center; + align-items: center; + cursor: pointer; + } + } diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue index d4442e8..7557a9c 100644 --- a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue +++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/indexs.vue @@ -9,73 +9,156 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
- - - - - - - +
-
- +
+ +
+ +
+
+ + + + + + + + + + + +
- \ No newline at end of file diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/light.vue b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/light.vue index d26c745..c9f361a 100644 --- a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/light.vue +++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/light.vue @@ -33,7 +33,7 @@
-
+
@@ -43,9 +43,14 @@ + diff --git a/hx-ai-intelligent/src/view/equipmentControl/lightingManage/treeData.ts b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/treeData.ts new file mode 100644 index 0000000..b764b47 --- /dev/null +++ b/hx-ai-intelligent/src/view/equipmentControl/lightingManage/treeData.ts @@ -0,0 +1,88 @@ +import { ref } from 'vue'; +export const treeData = ref([ + { + label: '站厅', + id: '1', + // 前端遍历后添加,属前端属性 + selected: false, + children: [{ + label: '站厅1区', + id: '1-1', + // 前端属性 + selected: false, + // 后端属性(表示禁用了一个设备) + stop: false, + // 当前的控制模式 + type: 3 + },{ + label: '站厅2区', + id: '1-2', + selected: false, + stop: false, + type: 1 + }] + }, + { + label: '站台', + id: '2', + selected: false, + children: [{ + label: '站台1区', + id: '2-1', + selected: false, + stop: false, + type: 1 + },{ + label: '站台2区', + id: '2-2', + selected: false, + stop: false, + type: 2 + },{ + label: '站台3区', + id: '2-3', + selected: false, + stop: false, + type: 3 + },{ + label: '站台4区', + id: '2-4', + selected: false, + stop: false, + type: 1 + }] + },{ + label: '办公室', + id: '3', + selected: false, + children: [{ + label: '办公室1区', + id: '3-1', + selected: false, + stop: false, + type: 2 + }] + },{ + label: '楼道', + id: '4', + selected: false, + children: [{ + label: '楼道1区', + id: '4-1', + selected: false, + stop: false, + type: 3 + }] + }, +]); + +export const controlType = ref([{ + name: '托管', + type: 1, +},{ + name: 'AI', + type: 2, +},{ + name: '手动', + type: 3, +}]) \ No newline at end of file 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 a3c572f..dda707f 100644 --- a/hx-ai-intelligent/src/view/monitor/deviceMonitor/tree/index.vue +++ b/hx-ai-intelligent/src/view/monitor/deviceMonitor/tree/index.vue @@ -474,6 +474,7 @@ onMounted(() => { getDianWeiList(); changeDeviceType(null, null); + getSelect(); }); return { diff --git a/hx-ai-intelligent/src/view/monitor/energyMonitor/analysisGraph/index.vue b/hx-ai-intelligent/src/view/monitor/energyMonitor/analysisGraph/index.vue new file mode 100644 index 0000000..b3948fa --- /dev/null +++ b/hx-ai-intelligent/src/view/monitor/energyMonitor/analysisGraph/index.vue @@ -0,0 +1,440 @@ + + + + diff --git a/hx-ai-intelligent/src/view/monitor/energyMonitor/analysisTable/index.vue b/hx-ai-intelligent/src/view/monitor/energyMonitor/analysisTable/index.vue new file mode 100644 index 0000000..611c499 --- /dev/null +++ b/hx-ai-intelligent/src/view/monitor/energyMonitor/analysisTable/index.vue @@ -0,0 +1,103 @@ + + + + + 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 9145e02..43fbced 100644 --- a/hx-ai-intelligent/src/view/monitor/energyMonitor/graphGraph/index.vue +++ b/hx-ai-intelligent/src/view/monitor/energyMonitor/graphGraph/index.vue @@ -11,9 +11,16 @@ setup() { let data = ref([]); interface PageData { + // 图表 表格数据 graphTableList: any[]; + // 图表 表格表头 graphTableColumns: any[]; + // 图表 图表数据 graphGraphList: any[]; + // 分析 表格数据 + analysisTableList: any[]; + // 分析 图表数据 + analysisGraphList: any[]; } const pageData = inject('pageData'); diff --git a/hx-ai-intelligent/src/view/monitor/energyMonitor/graphTable/index.vue b/hx-ai-intelligent/src/view/monitor/energyMonitor/graphTable/index.vue index 28d281b..0a4e919 100644 --- a/hx-ai-intelligent/src/view/monitor/energyMonitor/graphTable/index.vue +++ b/hx-ai-intelligent/src/view/monitor/energyMonitor/graphTable/index.vue @@ -13,9 +13,16 @@ let columns = ref([]); interface PageData { + // 图表 表格数据 graphTableList: any[]; + // 图表 表格表头 graphTableColumns: any[]; + // 图表 图表数据 graphGraphList: any[]; + // 分析 表格数据 + analysisTableList: any[]; + // 分析 图表数据 + analysisGraphList: any[]; } const pageData = inject('pageData'); diff --git a/hx-ai-intelligent/src/view/monitor/energyMonitor/index.vue b/hx-ai-intelligent/src/view/monitor/energyMonitor/index.vue index 705aa07..35f5401 100644 --- a/hx-ai-intelligent/src/view/monitor/energyMonitor/index.vue +++ b/hx-ai-intelligent/src/view/monitor/energyMonitor/index.vue @@ -9,9 +9,16 @@ // 创建一个响应式对象 const pageData = reactive({ + // 图表 表格数据 graphTableList: [], + // 图表 表格表头 graphTableColumns: [], + // 图表 图表数据 graphGraphList: [], + // 分析 表格数据 + analysisTableList: [], + // 分析 图表数据 + analysisGraphList: [], }); // 使用 provide 函数来提供这个响应式对象 diff --git a/hx-ai-intelligent/src/view/monitor/energyMonitor/page.vue b/hx-ai-intelligent/src/view/monitor/energyMonitor/page.vue index d4aa62b..3818385 100644 --- a/hx-ai-intelligent/src/view/monitor/energyMonitor/page.vue +++ b/hx-ai-intelligent/src/view/monitor/energyMonitor/page.vue @@ -23,6 +23,10 @@
+
+ + +
@@ -33,12 +37,17 @@ import tree from './tree/index.vue'; import graphGraph from './graphGraph/index.vue'; import environmentTable from './graphTable/index.vue'; + import analysisTable from './analysisTable/index.vue'; + import analysisGraph from './analysisGraph/index.vue'; const iconName = ref('biaoge'); const treeRef = ref(); const graphRef = ref(); + const analysisGraphRef = ref(); + const tableRef = ref(); + const analysisTableRef = ref(); let isGraph = ref(true); const activeKey = ref('1'); @@ -52,6 +61,10 @@ if (graphRef.value) { graphRef.value.downloadChart(); } + } else { + if (analysisGraphRef.value) { + analysisGraphRef.value.downloadChart(); + } } }; diff --git a/hx-ai-intelligent/src/view/monitor/energyMonitor/table/index.vue b/hx-ai-intelligent/src/view/monitor/energyMonitor/table/index.vue deleted file mode 100644 index 31c5825..0000000 --- a/hx-ai-intelligent/src/view/monitor/energyMonitor/table/index.vue +++ /dev/null @@ -1,166 +0,0 @@ - - - - - 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 ffb8614..f6e8062 100644 --- a/hx-ai-intelligent/src/view/monitor/energyMonitor/tree/index.vue +++ b/hx-ai-intelligent/src/view/monitor/energyMonitor/tree/index.vue @@ -15,9 +15,9 @@ v-model:value="mode" @change="changeMode" style="padding-bottom: 10px; width: 100%"> - 设备 + + 设备 + 节点 ([]); const mode = ref('1'); // 能耗类型 - const selectedValue = ref(); + const selectedValue = ref(); // 采集频率 const frequencyValue = ref(); // 时间 @@ -107,6 +107,9 @@ (item.value = item.cnValue), (item.label = item.cnValue); }); options1.value = options.data.data; // 根据返回数据的结构来更新 options1.value + if (options1.value) { + selectedValue.value = options1.value[0].value; + } } catch (error) { console.error('Failed to fetch options:', error); } @@ -130,9 +133,16 @@ ]; }; interface PageData { + // 图表 表格数据 graphTableList: any[]; + // 图表 表格表头 graphTableColumns: any[]; + // 图表 图表数据 graphGraphList: any[]; + // 分析 表格数据 + analysisTableList: any[]; + // 分析 图表数据 + analysisGraphList: any[]; } const pageData = inject('pageData'); if (!pageData) { @@ -141,7 +151,7 @@ // 选择能耗类型 const changeEnergyType = () => { - if (selectedValue.value == '8') { + if (selectedValue.value == '碳排量') { shebei.value = true; mode.value = '2'; } else { @@ -289,6 +299,136 @@ ], }, ]; + pageData.analysisTableList = [ + { + key: '1', + name: 'AC_002(暖通电表)', + position: 'A 相电压', + unit: 'V', + date: '2023-12-01', + }, + { + key: '1', + name: 'AC_002(暖通电表)', + position: 'A 相电压', + unit: 'V', + date: '2023-12-01', + }, + { + key: '2', + name: 'AC_003(照明电表)', + position: 'A 相电压', + unit: 'V', + date: '2023-12-01', + }, + { + key: '2', + name: 'AC_003(照明电表)', + position: 'A 相电压', + unit: 'V', + date: '2023-12-01', + }, + { + key: '3', + name: 'AC_004(给排水电表)', + position: 'A 相电压', + unit: 'V', + date: '2023-12-01', + }, + ]; + pageData.analysisGraphList = [ + { + name: 'AC_002(暖通电表)', + value: -21, + ringValue: 21, + energyType: selectedValue.value, + energyUnit: 'kWh', + unit: 'V', + labelRight: { + position: 'right', + }, + }, + { + name: 'AC_003(照明电表)', + value: 36, + ringValue: 36, + energyType: selectedValue.value, + unit: 'V', + labelRight: { + position: 'insideLeft', + }, + }, + { + name: 'AC_004(给排水电表)', + value: -5, + ringValue: 5, + energyType: selectedValue.value, + unit: 'V', + labelRight: { + position: 'right', + }, + }, + { + name: 'AC_005(给排水电表)', + value: -25, + ringValue: 15, + energyType: selectedValue.value, + unit: 'V', + labelRight: { + position: 'right', + }, + }, + { + name: 'AC_006(给排水电表)', + value: 35, + ringValue: 30, + energyType: selectedValue.value, + unit: 'V', + labelRight: { + position: 'insideLeft', + }, + }, + { + name: 'AC_007(给排水电表)', + value: 15, + ringValue: 18, + energyType: selectedValue.value, + unit: 'V', + labelRight: { + position: 'insideLeft', + }, + }, + { + name: 'AC_008(给排水电表)', + value: -25, + ringValue: 41, + energyType: selectedValue.value, + unit: 'V', + labelRight: { + position: 'right', + }, + }, + { + name: 'AC_009(给排水电表)', + value: -5, + ringValue: 55, + energyType: selectedValue.value, + unit: 'V', + labelRight: { + position: 'right', + }, + }, + { + name: 'AC_0090(给排水电表)', + value: -5, + ringValue: 55, + energyType: selectedValue.value, + unit: 'V', + labelRight: { + position: 'right', + }, + }, + ]; }; const getSelect11 = () => { pageData.graphTableList = [ @@ -561,6 +701,7 @@ onMounted(() => { getOptionsList(); changeMode(); + getSelect(); }); return {