diff --git a/hx-ai-intelligent/public/asset/file/emissionSource.xlsx b/hx-ai-intelligent/public/asset/file/emissionSource.xlsx new file mode 100644 index 0000000..67e42be Binary files /dev/null and b/hx-ai-intelligent/public/asset/file/emissionSource.xlsx differ diff --git a/hx-ai-intelligent/public/asset/file/energyConsumption.xlsx b/hx-ai-intelligent/public/asset/file/energyConsumption.xlsx new file mode 100644 index 0000000..2687e05 Binary files /dev/null and b/hx-ai-intelligent/public/asset/file/energyConsumption.xlsx differ diff --git a/hx-ai-intelligent/src/api/alarmManagement/alarmOverview.ts b/hx-ai-intelligent/src/api/alarmManagement/alarmOverview.ts index ca7f26f..6871554 100644 --- a/hx-ai-intelligent/src/api/alarmManagement/alarmOverview.ts +++ b/hx-ai-intelligent/src/api/alarmManagement/alarmOverview.ts @@ -1,8 +1,10 @@ +import { BASE_URL } from '../index'; + export enum alarmOverviewApi { - getAlarmEquipment = '/carbon-smart/api/AlarmOverview/alarmEquipment', //设备告警 数量 - getAlarmEnergyConsumption = '/carbon-smart/api/AlarmOverview/alarmEnergyConsumption', //能碳告警 数量 - getAlarmGateway = '/carbon-smart/api/AlarmOverview/alarmGateway', //网关告警 数量 - getPriority = '/carbon-smart/api/AlarmOverview/priority', //优先级 数量 - getProcessProgress = '/carbon-smart/api/AlarmOverview/processProgress', //进度 数量 - getAlarmTrend = '/carbon-smart/api/AlarmOverview/alarmTrend', //30天告警 数量 + getAlarmEquipment = `${BASE_URL}/api/AlarmOverview/alarmEquipment`, //设备告警 数量 + getAlarmEnergyConsumption = `${BASE_URL}/api/AlarmOverview/alarmEnergyConsumption`, //能碳告警 数量 + getAlarmGateway = `${BASE_URL}/api/AlarmOverview/alarmGateway`, //网关告警 数量 + getPriority = `${BASE_URL}/api/AlarmOverview/priority`, //优先级 数量 + getProcessProgress = `${BASE_URL}/api/AlarmOverview/processProgress`, //进度 数量 + getAlarmTrend = `${BASE_URL}/api/AlarmOverview/alarmTrend`, //30天告警 数量 } diff --git a/hx-ai-intelligent/src/api/alarmManagement/alarmSettings/deviceAlarms.ts b/hx-ai-intelligent/src/api/alarmManagement/alarmSettings/deviceAlarms.ts index b78f725..8236915 100644 --- a/hx-ai-intelligent/src/api/alarmManagement/alarmSettings/deviceAlarms.ts +++ b/hx-ai-intelligent/src/api/alarmManagement/alarmSettings/deviceAlarms.ts @@ -1,9 +1,11 @@ +import { BASE_URL } from '../../index'; + export enum deviceAlarms { - getTableList = '/carbon-smart/api/AlarmEquipment/selectAlarmEquipment', //设备告警分页 - 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', //配置设备告警删除 + getTableList = `${BASE_URL}/api/AlarmEquipment/selectAlarmEquipment`, //设备告警分页 + addOrUpNewData = `${BASE_URL}/api/AlarmEquipment/creatOrUpdate`, //设备告警添加 修改 + del = `${BASE_URL}/api/AlarmEquipment/delete`, //设备告警删除 + configGetTableList = `${BASE_URL}/api/AlarmEquipmentRule/selectAlarmEquipmentRule`, //配置设备告警分页 + configAddOrUpNewData = `${BASE_URL}/api/AlarmEquipmentRule/creatOrUpdate`, //配置设备告警添加 修改 + configFindById = `${BASE_URL}/api/AlarmEquipmentRule/findById`, //配置设备告警 查询详情 + configDel = `${BASE_URL}/api/AlarmEquipmentRule/delete`, //配置设备告警删除 } diff --git a/hx-ai-intelligent/src/api/alarmManagement/alarmSettings/energyAlarm.ts b/hx-ai-intelligent/src/api/alarmManagement/alarmSettings/energyAlarm.ts index 88a661d..ae3e0b3 100644 --- a/hx-ai-intelligent/src/api/alarmManagement/alarmSettings/energyAlarm.ts +++ b/hx-ai-intelligent/src/api/alarmManagement/alarmSettings/energyAlarm.ts @@ -1,9 +1,11 @@ +import { BASE_URL } from '../../index'; + 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/AlarmEnergyConsumptionRule/selectAlarmEnergyConsumptionRule', //配置设备告警分页 - configAddOrUpNewData = '/carbon-smart/api/AlarmEnergyConsumptionRule/creatOrUpdate', //配置设备告警添加 修改 - configFindById = '/carbon-smart/api/AlarmEnergyConsumptionRule/findById', //配置设备告警 查询详情 - configDel = '/carbon-smart/api/AlarmEnergyConsumptionRule/delete', //配置设备告警删除 + getTableList = `${BASE_URL}/api/AlarmEnergyConsumption/selectAlarmEnergyConsumption`, //能耗告警分页 + addOrUpNewData = `${BASE_URL}/api/AlarmEnergyConsumption/creatOrUpdate`, //能耗告警添加 修改 + del = `${BASE_URL}/api/AlarmEnergyConsumption/delete`, //能耗删除 + configGetTableList = `${BASE_URL}/api/AlarmEnergyConsumptionRule/selectAlarmEnergyConsumptionRule`, //配置设备告警分页 + configAddOrUpNewData = `${BASE_URL}/api/AlarmEnergyConsumptionRule/creatOrUpdate`, //配置设备告警添加 修改 + configFindById = `${BASE_URL}/api/AlarmEnergyConsumptionRule/findById`, //配置设备告警 查询详情 + configDel = `${BASE_URL}/api/AlarmEnergyConsumptionRule/delete`, //配置设备告警删除 } diff --git a/hx-ai-intelligent/src/api/alarmManagement/alarmSettings/notificationManagements.ts b/hx-ai-intelligent/src/api/alarmManagement/alarmSettings/notificationManagements.ts index 3751491..952b5a0 100644 --- a/hx-ai-intelligent/src/api/alarmManagement/alarmSettings/notificationManagements.ts +++ b/hx-ai-intelligent/src/api/alarmManagement/alarmSettings/notificationManagements.ts @@ -1,5 +1,7 @@ +import { BASE_URL } from '../../index'; + export enum notificationManagementApi { - getTableList = '/carbon-smart/api/AlarmContactInformation/selectAlarmContactInformation', //通知管理分页 - upData = '/carbon-smart/api/AlarmContactInformation/update', //通知管理 修改 - findById = '/carbon-smart/api/AlarmContactInformation/findById', //通知管理 查询详情 + getTableList = `${BASE_URL}/api/AlarmContactInformation/selectAlarmContactInformation`, //通知管理分页 + upData = `${BASE_URL}/api/AlarmContactInformation/update`, //通知管理 修改 + findById = `${BASE_URL}/api/AlarmContactInformation/findById`, //通知管理 查询详情 } diff --git a/hx-ai-intelligent/src/api/alarmManagement/energyAlarm.ts b/hx-ai-intelligent/src/api/alarmManagement/energyAlarm.ts index 2593816..27c755e 100644 --- a/hx-ai-intelligent/src/api/alarmManagement/energyAlarm.ts +++ b/hx-ai-intelligent/src/api/alarmManagement/energyAlarm.ts @@ -1,6 +1,8 @@ +import { BASE_URL } from '../index'; + export enum energyAlarmApi { - getTableList = '/carbon-smart/api/AlarmEnergyConsumptionLog/selectAlarmEnergyConsumptionLog', //能碳告警 列表 - getCodeList = '/carbon-smart/api/AlarmEnergyConsumptionLog/selectErrorCodeList ', //能碳告警 列表 - getSelectAlarmEnergyConsumptionLogStatusProcess = '/carbon-smart/api/AlarmEnergyConsumptionLogStatusProcess/selectAlarmEnergyConsumptionLogStatusProcess', //能碳告警 状态 没有创建工单log接口 - noCreatOrUpdateLog = '/carbon-smart/api/AlarmEnergyConsumptionLogStatusProcess/creatOrUpdate', //能碳告警 状态 没有创建工单 添加 修改状态log + getTableList = `${BASE_URL}/api/AlarmEnergyConsumptionLog/selectAlarmEnergyConsumptionLog`, //能碳告警 列表 + getCodeList = `${BASE_URL}/api/AlarmEnergyConsumptionLog/selectErrorCodeList `, //能碳告警 列表 + getSelectAlarmEnergyConsumptionLogStatusProcess = `${BASE_URL}/api/AlarmEnergyConsumptionLogStatusProcess/selectAlarmEnergyConsumptionLogStatusProcess`, //能碳告警 状态 没有创建工单log接口 + noCreatOrUpdateLog = `${BASE_URL}/api/AlarmEnergyConsumptionLogStatusProcess/creatOrUpdate`, //能碳告警 状态 没有创建工单 添加 修改状态log } diff --git a/hx-ai-intelligent/src/api/alarmManagement/equipmentAlarm.ts b/hx-ai-intelligent/src/api/alarmManagement/equipmentAlarm.ts index ef657b4..8505e34 100644 --- a/hx-ai-intelligent/src/api/alarmManagement/equipmentAlarm.ts +++ b/hx-ai-intelligent/src/api/alarmManagement/equipmentAlarm.ts @@ -1,6 +1,8 @@ +import { BASE_URL } from '../index'; + export enum equipmentAlarmApi { - getTableList = '/carbon-smart/api/AlarmEquipmentLog/selectAlarmEquipmentLog', //设备告警 列表 - getCodeList = '/carbon-smart/api/AlarmEquipmentLog/selectErrorCodeList', //设备告警 列表 - getSelectAlarmEquipmentLogStatusProcess = '/carbon-smart/api/AlarmEquipmentLogStatusProcess/selectAlarmEquipmentLogStatusProcess', //设备告警 状态 没有创建工单log接口 - noCreatOrUpdateLog = '/carbon-smart/api/AlarmEquipmentLogStatusProcess/creatOrUpdate', //设备告警 状态 没有创建工单 添加 修改状态log + getTableList = `${BASE_URL}/api/AlarmEquipmentLog/selectAlarmEquipmentLog`, //设备告警 列表 + getCodeList = `${BASE_URL}/api/AlarmEquipmentLog/selectErrorCodeList`, //设备告警 列表 + getSelectAlarmEquipmentLogStatusProcess = `${BASE_URL}/api/AlarmEquipmentLogStatusProcess/selectAlarmEquipmentLogStatusProcess`, //设备告警 状态 没有创建工单log接口 + noCreatOrUpdateLog = `${BASE_URL}/api/AlarmEquipmentLogStatusProcess/creatOrUpdate`, //设备告警 状态 没有创建工单 添加 修改状态log } diff --git a/hx-ai-intelligent/src/api/alarmManagement/gatewayAlarm.ts b/hx-ai-intelligent/src/api/alarmManagement/gatewayAlarm.ts index 69f2f66..8d88be4 100644 --- a/hx-ai-intelligent/src/api/alarmManagement/gatewayAlarm.ts +++ b/hx-ai-intelligent/src/api/alarmManagement/gatewayAlarm.ts @@ -1,3 +1,4 @@ +import { BASE_URL } from '../index'; export enum gatewayAlarmApi { - getTableList = '/carbon-smart/api/AlarmGatewayLog/selectAlarmGatewayLog', //网关告警 列表 + getTableList = `${BASE_URL}/api/AlarmGatewayLog/selectAlarmGatewayLog`, //网关告警 列表 } diff --git a/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts b/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts index c9b0f97..2f9c803 100644 --- a/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts +++ b/hx-ai-intelligent/src/api/carbonEmissionFactorLibrary.ts @@ -8,6 +8,9 @@ export enum carbonEmissionFactorLibrary { getCarbonFactorTree = '/carbon-smart/api/carbon/emission/type/getCarbonFactorTree', creat = '/carbon-smart/api/carbon/emission/type/creatOrUpdate', delTreeNode = '/carbon-smart/api/carbon/emission/type/del', + move = '/carbon-smart/api/carbon/emission/type/move', + import = '/carbon-smart/api/carbon/emission/factor/import', + export = '/carbon-smart/api/carbon/emission/factor/export', // 单位管理 dictionaryUnitManagement = '/carbon-smart/client/dict/dictionaryUnitManagement', findOutermost = '/carbon-smart/client/dict/findOutermost', @@ -15,7 +18,7 @@ export enum carbonEmissionFactorLibrary { updateDictionary = '/carbon-smart/client/dict/updateDictionary', delDictionary = '/carbon-smart/client/dict/delDictionary', } -// 碳排管理-碳排统计接口 +// 碳排管理-能耗统计接口 export enum energyConsumption { getDicList = '/carbon-smart/client/dict/list', pageList = '/carbon-smart/api/carbon/stats/pageList', @@ -23,6 +26,10 @@ export enum energyConsumption { creat = '/carbon-smart/api/carbon/stats/creat', update = '/carbon-smart/api/carbon/stats/update', del = '/carbon-smart/api/carbon/stats/del', + voucherDownloadList = '/carbon-smart/api/carbon/stats/voucherDownloadList', + energyAcquisition = '/carbon-smart/api/carbon/stats/energyAcquisition', + import = '/carbon-smart/api/carbon/stats/import', + export = '/carbon-smart/api/carbon/stats/export', } // 碳排管理-碳排速算接口 export enum quickCalculation { @@ -55,6 +62,7 @@ export enum carbonInventoryCheck { findUnitById = '/carbon-smart/api/carbon/inventory/findById', getDetailsList = '/carbon-smart/api/carbon/inventory/details/getDetailsList', updateTable = '/carbon-smart/api/carbon/inventory/details/update', + voucherDownloadList = '/carbon-smart/api/carbon/inventory/details/voucherDownloadList', // 排放统计接口 emissionStatistic = '/carbon-smart/api/carbon/inventory/emissionStatistic', // 碳排流向 @@ -75,6 +83,8 @@ export enum uploadPic { uploadfiles = '/carbon-smart/api/common/file/uploadfiles', select = '/carbon-smart/api/common/file/select', uploadfile = '/carbon-smart/api/common/file/uploadfile', + download = '/carbon-smart/api/common/file/download', + downloadZip = '/carbon-smart/api/common/file/downloadZip', } // 碳规划 export enum carbonPlanning { @@ -90,4 +100,6 @@ export enum carbonPlanning { detailedStatisticalDataChart = '/carbon-smart/api/carbon/planning/detailedStatisticalDataChart', batchOrUpdate = '/carbon-smart/api/carbon/planning/batchOrUpdate', addNodes = '/carbon-smart/api/carbon/planning/addNodes', + benchmarkSetting = '/carbon-smart/api/carbon/planning/benchmarkSetting', + benchmarkSubmit = '/carbon-smart/api/carbon/planning/benchmarkSubmit', } diff --git a/hx-ai-intelligent/src/api/planToAdd.ts b/hx-ai-intelligent/src/api/planToAdd.ts new file mode 100644 index 0000000..4841c52 --- /dev/null +++ b/hx-ai-intelligent/src/api/planToAdd.ts @@ -0,0 +1,5 @@ +export enum planToAddApi { + getActivatedPlanTree = '/carbon-smart/deviceCtrlPlan/getActivatedPlanTree', //计划树 + getActivatedPlanListByTree = '/carbon-smart/deviceCtrlPlan/getActivatedPlanListByTree', //计划列表 + updPlan = '/carbon-smart/deviceCtrlPlan/updateActivatedPlan', //修改计划 +} diff --git a/hx-ai-intelligent/src/icon/biaoge.svg b/hx-ai-intelligent/src/icon/biaoge.svg index 75845a1..dc789ff 100644 --- a/hx-ai-intelligent/src/icon/biaoge.svg +++ b/hx-ai-intelligent/src/icon/biaoge.svg @@ -1 +1,4 @@ - \ No newline at end of file + + + + diff --git a/hx-ai-intelligent/src/icon/bingtu.svg b/hx-ai-intelligent/src/icon/bingtu.svg index 56c8ecd..80f4a3b 100644 --- a/hx-ai-intelligent/src/icon/bingtu.svg +++ b/hx-ai-intelligent/src/icon/bingtu.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/hx-ai-intelligent/src/icon/carbonAssetsSearch-1.svg b/hx-ai-intelligent/src/icon/carbonAssetsSearch-1.svg deleted file mode 100644 index babbb9e..0000000 --- a/hx-ai-intelligent/src/icon/carbonAssetsSearch-1.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/hx-ai-intelligent/src/icon/carbonAssetsSearch-2.svg b/hx-ai-intelligent/src/icon/carbonAssetsSearch-2.svg deleted file mode 100644 index 2a1bcfa..0000000 --- a/hx-ai-intelligent/src/icon/carbonAssetsSearch-2.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/hx-ai-intelligent/src/icon/carbonAssetsSearch-3.svg b/hx-ai-intelligent/src/icon/carbonAssetsSearch-3.svg deleted file mode 100644 index 0ddbb21..0000000 --- a/hx-ai-intelligent/src/icon/carbonAssetsSearch-3.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/hx-ai-intelligent/src/icon/carbonAssetsToDetail-1.svg b/hx-ai-intelligent/src/icon/carbonAssetsToDetail-1.svg new file mode 100644 index 0000000..4acc848 --- /dev/null +++ b/hx-ai-intelligent/src/icon/carbonAssetsToDetail-1.svg @@ -0,0 +1,4 @@ + + + + diff --git a/hx-ai-intelligent/src/icon/carbonAssetsToDetail-2.svg b/hx-ai-intelligent/src/icon/carbonAssetsToDetail-2.svg new file mode 100644 index 0000000..cab1ccb --- /dev/null +++ b/hx-ai-intelligent/src/icon/carbonAssetsToDetail-2.svg @@ -0,0 +1,4 @@ + + + + diff --git a/hx-ai-intelligent/src/icon/carbonAssetsToDetail-3.svg b/hx-ai-intelligent/src/icon/carbonAssetsToDetail-3.svg new file mode 100644 index 0000000..5651733 --- /dev/null +++ b/hx-ai-intelligent/src/icon/carbonAssetsToDetail-3.svg @@ -0,0 +1,4 @@ + + + + diff --git a/hx-ai-intelligent/src/icon/del.svg b/hx-ai-intelligent/src/icon/del.svg new file mode 100644 index 0000000..c8c2fcf --- /dev/null +++ b/hx-ai-intelligent/src/icon/del.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/hx-ai-intelligent/src/icon/title.svg b/hx-ai-intelligent/src/icon/title.svg new file mode 100644 index 0000000..9bf85e3 --- /dev/null +++ b/hx-ai-intelligent/src/icon/title.svg @@ -0,0 +1,4 @@ + + + + diff --git a/hx-ai-intelligent/src/icon/xiazai.svg b/hx-ai-intelligent/src/icon/xiazai.svg index dca8632..738f4a4 100644 --- a/hx-ai-intelligent/src/icon/xiazai.svg +++ b/hx-ai-intelligent/src/icon/xiazai.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/hx-ai-intelligent/src/router/carbonEmissionManage.ts b/hx-ai-intelligent/src/router/carbonEmissionManage.ts index 9adcfc0..b0034fa 100644 --- a/hx-ai-intelligent/src/router/carbonEmissionManage.ts +++ b/hx-ai-intelligent/src/router/carbonEmissionManage.ts @@ -40,6 +40,9 @@ const equipment = { meta: { title: '碳排因子库', keepAlive: false, + operates: [ + { title: '碳排因子库导入', code: 'carbonEmissionFactorLibraryImport' }, + ], // backApi: [], }, }, diff --git a/hx-ai-intelligent/src/router/equipmentControl.ts b/hx-ai-intelligent/src/router/equipmentControl.ts index e6a13b3..54d21d3 100644 --- a/hx-ai-intelligent/src/router/equipmentControl.ts +++ b/hx-ai-intelligent/src/router/equipmentControl.ts @@ -119,6 +119,25 @@ const equipmentControl = { }, ], }, + { + path: 'planToAdd', + name: 'planToAdd', + meta: { title: '计划添加', hideChildren: true, icon: 'shebeiqunkong' }, + component: Base, + redirect: { name: 'planToAddIndex' }, + children: [ + { + path: 'index', + name: 'planToAddIndex', + component: () => import('/@/view/equipmentControl/planToAdd/index.vue'), + meta: { + title: '计划添加', + keepAlive: false, + // backApi: [], + }, + }, + ], + }, ], }; export default equipmentControl; diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue index 2b19531..593fd48 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue @@ -39,7 +39,7 @@ >{{ item.title }} - 今日处理 / 总数 + 今日处理 / 总数 @@ -50,7 +50,7 @@
- 优先级 + 优先级
- 处理进度 + 处理进度
- 处理进度 + 处理进度
( 近30天 )
@@ -136,26 +136,35 @@ const echartPieOne = ref(null); const echartPieTow = ref(null); const getGraphChart = async () => { - let dayData = []; + let dayData: any = []; // 能源告警 - let energyAlarm = []; + let energyAlarm: any = []; // 网关告警 - let wgAlarm = []; + let wgAlarm: any = []; // 设备告警 - let equipmentAlarm = []; - let total = []; + let equipmentAlarm: any = []; + let total: any = []; await http .post(alarmOverviewApi.getAlarmTrend, { orgId: orgId.value, }) .then((res) => { if (res.msg === 'success') { - res.data.forEach((item: any, index) => { + // 从小 到 大 日期排序 + const data = res.data.sort((a: any, b: any) => { + // 将 dayData 转换为日期对象 + const dateA: any = new Date(a.createTime); + const dateB: any = new Date(b.createTime); + // 返回比较结果,升序排列 + return dateA - dateB; + }); + data.forEach((item: any) => { energyAlarm.push(item.alarmEnergyConsumptionNum); wgAlarm.push(item.alarmGatewayNum); equipmentAlarm.push(item.alarmEquipmentNum); total.push(0); - dayData.push(item.createTime); + item.createTime = item.createTime.substring(5, 10); + dayData.push(item.createTime.replace('-', '/')); }); } }); @@ -180,7 +189,7 @@ axisPointer: { type: 'shadow', }, - formatter: function (params) { + formatter: function (params: any) { let res = params[0].axisValue + '
' + @@ -217,11 +226,13 @@ left: 'right', // 将图例居中显示 textStyle: { color: 'rgb(89, 89, 89)', - fontSize: '14', + fontSize: 14, fontWeight: 'normal', }, // 注意这里的颜色值要用引号括起来 data: ['设备告警', '网关告警', '能源告警'], itemGap: 30, // 这里可以调整图例项之间的间距,单位为像素 + itemWidth: 16, //图例宽度 + itemHeight: 16, //图例高度 }, ], calculable: true, @@ -238,14 +249,24 @@ show: false, }, data: dayData, + axisLabel: { + show: true, // 显示所有刻度值 + // interval: 1, // 显示所有刻度,不跳过 + // rotate: 45, // 可选:如果标签过长,可以旋转标签以避免重叠 + }, }, ], yAxis: [ { type: 'value', - shwo: false, + show: true, splitLine: { show: true, + lineStyle: { + color: '#dae7ff', // 设置分隔线颜色 + width: 1, // 设置分隔线宽度 + type: 'dashed', // 设置分隔线类型,可选 'solid'、'dashed' 或 'dotted' + }, }, axisLine: { show: false, @@ -257,17 +278,49 @@ show: false, }, axisLabel: { - show: false, // 不显示刻度值 + show: true, // 不显示刻度值 }, }, ], + //滑块样式 dataZoom: [ { - height: 12, + type: 'inside', start: 0, end: 100, - handleSize: '300%', // 设置滑块的大小 - bottom: 15, + }, + { + type: 'slider', + // backgroundColor: 'yellow', + // fillerColor: 'yellow', + height: 12, // 设置slider的高度为15 + start: 0, + end: 100, + right: 60, + left: 60, + bottom: 10, + handleIcon: + 'path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5M36.9,35.8h-1.3z M27.8,35.8 h-1.3H27L27.8,35.8L27.8,35.8z', // 使用类似 axisPointer 的图标 + handleSize: '140%', // 放大按钮 + // borderColor: 'none', + handleStyle: { + // color: 'red', + // shadowBlur: 6, + // shadowColor: 'yellow', + shadowOffsetX: 0, // 阴影偏移x轴多少 + shadowOffsetY: 0, // 阴影偏移y轴多少 + }, + // 显示的label的格式化器 + // 20050101 变为 2005\n0101 + // labelFormatter: function (index, value) { + // const year = value.slice(0, 4); + // const date = value.slice(4); + // return year + '\n' + date; + // }, + // textStyle: { + // fontStyle: 'italic', // 设置字体倾斜 + // }, + // showDataShadow: false, // 隐藏数据阴影 }, ], series: [ @@ -330,7 +383,7 @@ color: '#000000', position: 'top', top: '10', - formatter: function (value) { + formatter: function (value: any) { return ( Number(energyAlarm[value.dataIndex]) + Number(wgAlarm[value.dataIndex]) + @@ -404,7 +457,7 @@ // icon: 'circle', itemWidth: 16, itemHeight: 16, - itemGap: 16, + itemGap: 30, textStyle: { fontSize: 14, }, @@ -426,8 +479,9 @@ fontSize: 14, fontWeight: 'bold', }, - formatter: function (parms) { - return '[ ' + parms.data.name + ' ] : ' + parms.data.value; + formatter: function (parms: any) { + // return '[ ' + parms.data.name + ' ] : ' + parms.data.value; + return parms.data.name + ' : ' + parms.data.value; }, }, // emphasis: { @@ -516,7 +570,7 @@ orient: 'vertical', itemWidth: 16, itemHeight: 16, - itemGap: 16, + itemGap: 30, textStyle: { fontSize: 14, }, @@ -538,8 +592,9 @@ fontSize: 14, fontWeight: 'bold', }, - formatter: function (parms) { - return '[ ' + parms.data.name + ' ] : ' + parms.data.value; + formatter: function (parms: any) { + // return '[ ' + parms.data.name + ' ] : ' + parms.data.value; + return parms.data.name + ' : ' + parms.data.value; }, }, }, @@ -611,7 +666,7 @@ // border: 1px solid red; display: flex; flex-direction: column; - gap: 12px; + gap: 20px; background-color: #f0f1f4; box-sizing: border-box; .box-top { @@ -620,11 +675,11 @@ height: 100%; display: flex; flex-direction: row; - gap: 12px; + gap: 20px; .box-top-item { height: 100%; flex: 1; - gap: 12px; + gap: 20px; background-color: white; border-radius: 4px; .item-box { @@ -652,7 +707,7 @@ } .iem-box-left-number { color: #000000; - font-weight: 700; + font-weight: 400; font-family: 'Arial Negreta', 'Arial Normal', 'Arial', sans-serif; font-style: normal; font-size: 30px; @@ -669,7 +724,7 @@ flex: 4; width: 100%; display: flex; - gap: 12px; + gap: 20px; .box-center-item { flex: 1; height: 100%; diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/configureEnergyAlarms.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/configureEnergyAlarms.vue index ffab04e..966b7ca 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/configureEnergyAlarms.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/configureEnergyAlarms.vue @@ -145,8 +145,8 @@ return data.list.length === 0; }, handle: (data: any) => { - let ids = []; - data.list.forEach((item) => { + let ids: any = []; + data.list.forEach((item: any) => { ids.push(item.id); }); data.list = []; @@ -167,6 +167,7 @@ customRender: (text: any) => { return text.index + 1; }, + width: 80, }, { title: '规则id', @@ -179,6 +180,7 @@ { title: '对比类型', dataIndex: 'comparisonType', + width: 180, }, { title: '告警点位', @@ -196,11 +198,16 @@ { title: '启用状态', dataIndex: 'enableRules', + width: 120, }, ], // rowSelection: null, 选择按钮 + scroll: { x: 2500 }, columnActions: { title: '操作', + width: 200, + fixed: 'right', + dataIndex: 'tableAction', actions: [ { label: '编辑', @@ -318,24 +325,25 @@ background-color: linear-gradient( 180deg, rgba(1, 206, 255, 1) 0%, - rgba(0, 150, 229, 1) 100% + rgba(57, 215, 187, 1) 100% ) !important; } .grey-background.ant-switch { - background-color: grey !important; + background-color: rgba(238, 238, 238, 1) !important; } .blue-background.ant-switch-checked .ant-switch-handle { background-color: linear-gradient( 180deg, rgba(1, 206, 255, 1) 0%, - rgba(0, 150, 229, 1) 100% + rgba(57, 215, 187, 1) 100% ) !important; } - + .ant-switch-checked { + background-color: rgba(57, 215, 187, 1) !important; + } .grey-background.ant-switch .ant-switch-handle { - background-color: grey !important; + background-color: rgba(238, 238, 238, 1) !important; } -../../../../api/alarmManagement/alarmSettings/energyAlarm diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue index 3d6275b..7431126 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue @@ -1,13 +1,16 @@