diff --git a/hx-ai-intelligent/src/api/alarmSettings/energyAlarm.ts b/hx-ai-intelligent/src/api/alarmSettings/energyAlarm.ts index 0ea6ebc..88a661d 100644 --- a/hx-ai-intelligent/src/api/alarmSettings/energyAlarm.ts +++ b/hx-ai-intelligent/src/api/alarmSettings/energyAlarm.ts @@ -2,8 +2,8 @@ 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', //配置设备告警删除 + configGetTableList = '/carbon-smart/api/AlarmEnergyConsumptionRule/selectAlarmEnergyConsumptionRule', //配置设备告警分页 + configAddOrUpNewData = '/carbon-smart/api/AlarmEnergyConsumptionRule/creatOrUpdate', //配置设备告警添加 修改 + configFindById = '/carbon-smart/api/AlarmEnergyConsumptionRule/findById', //配置设备告警 查询详情 + configDel = '/carbon-smart/api/AlarmEnergyConsumptionRule/delete', //配置设备告警删除 } diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue index bf0c008..4793714 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue @@ -30,7 +30,9 @@ style="flex: 1; height: 100%; background-color: white; border-radius: 4px; padding: 12px">
-
xxxx
+
+
+
@@ -49,8 +51,10 @@ const info = ref({}); let chartInstance: echarts.ECharts | null = null; let chartInstanceOne: echarts.ECharts | null = null; + let chartInstanceTow: echarts.ECharts | null = null; const graphChart = ref(null); const echartPieOne = ref(null); + const echartPieTow = ref(null); const getGraphChart = () => { let dayData = []; let energyAlarm = []; @@ -294,7 +298,7 @@ }, textAlign: 'center', x: '44.3%', - y: '46%', + y: '43%', }, ], tooltip: { @@ -327,9 +331,10 @@ clockwise: false, //饼图的扇区是否是顺时针排布 avoidLabelOverlap: false, label: { + show: true, normal: { show: true, - position: 'outter', + position: 'outside', textStyle: { fontSize: 14, fontWeight: 'bold', @@ -342,7 +347,7 @@ labelLine: { show: true, // 控制标签线是否显示 length: 10, // 标签线长度 - length2: 20, // 标签线引出部分长度 + length2: 0, // 标签线引出部分长度 // 其他样式属性,如 lineStyle 等 }, data: m2R2Data, @@ -352,11 +357,107 @@ chartInstanceOne = echarts.init(echartPieOne.value); chartInstanceOne.setOption(option); }; + const getEchartPieTow = () => { + if (chartInstanceTow) { + chartInstanceTow.dispose(); + } + chartInstanceTow = echarts.init(echartPieTow.value); + var m2R2Data = [ + { value: 335, name: '紧急', itemStyle: { color: '#F56E53' } }, + { value: 310, name: '重要', itemStyle: { color: '#F7C122' } }, + { value: 234, name: '一般', itemStyle: { color: '#3BC27F' } }, + ]; + const option = { + title: [ + { + text: '优先级 / 近30天', + textStyle: { + fontSize: 16, + fontWeight: 'normal', + color: '#aaaaaa', + }, + left: '2%', + top: '2%', + }, + { + text: '优先级', + subtext: 12312 + '个', + textStyle: { + fontSize: 24, + color: 'black', + }, + subtextStyle: { + fontSize: 24, + fontWeight: '700', + color: 'black', + }, + textAlign: 'center', + x: '44.3%', + y: '43%', + }, + ], + tooltip: { + trigger: 'item', + formatter: function (parms) { + var str = parms.marker + ' :' + parms.data.value; + return str; + }, + }, + legend: { + // 设置图例靠右,上下居中,垂直排列 + right: 50, + top: 'center', + orient: 'vertical', + // 图例图标设置为圆形 + icon: 'circle', + itemWidth: 12, + itemHeight: 12, + itemGap: 16, + textStyle: { + fontSize: 14, + }, + }, + series: [ + { + name: '优先级', + type: 'pie', + center: ['45%', '50%'], + radius: ['50%', '70%'], + clockwise: false, //饼图的扇区是否是顺时针排布 + avoidLabelOverlap: false, + label: { + show: true, + normal: { + show: true, + position: 'outside', + textStyle: { + fontSize: 14, + fontWeight: 'bold', + }, + formatter: function (parms) { + return '[ ' + parms.data.name + ' ] : ' + parms.data.value; + }, + }, + }, + labelLine: { + show: true, // 控制标签线是否显示 + length: 10, // 标签线长度 + length2: 0, // 标签线引出部分长度 + // 其他样式属性,如 lineStyle 等 + }, + data: m2R2Data, + }, + ], + }; + chartInstanceTow = echarts.init(echartPieTow.value); + chartInstanceTow.setOption(option); + }; onMounted(() => { //渲染第三个图表 getGraphChart(); //优先级 getEchartPieOne(); + getEchartPieTow(); }); diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/linkPeople/index.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/linkPeople/index.vue new file mode 100644 index 0000000..dd498ad --- /dev/null +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/notificationManagement/linkPeople/index.vue @@ -0,0 +1,45 @@ + + + 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 5bcee5e..16cc06a 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/ts/equipmentAlarmConfig.ts @@ -14,7 +14,7 @@ const tableKeyMap = [ }, { title: '优先级', - dataIndex: 'priority', + dataIndex: 'prioritys', }, { title: '告警标题', @@ -26,8 +26,7 @@ const tableKeyMap = [ }, { title: '重复次数', - dataIndex: 'repetitions', - textEllipsis: true, + dataIndex: 'repetition', }, { title: '监测时长', @@ -104,6 +103,9 @@ export const equipmentAlarmTableConfig = ( name: 'FeedBackDetail', dynamicParams: ['uuid', 'appealType'], handle: (data: any) => { + data.priority = data.priority.value; + data.repetitions = data.repetitions.value; + data.monitorTimeUnit = data.monitorTimeUnit.value; editEquipmentAlarm.value.toggle(data); }, },