From 7b77c3cc88590f65dd35785634472947434214c6 Mon Sep 17 00:00:00 2001 From: zhaohy <1695786511@qq.com> Date: Tue, 23 Jul 2024 14:28:49 +0800 Subject: [PATCH] =?UTF-8?q?add:=E8=AE=BE=E5=A4=87=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E7=BD=91=E5=85=B3=E5=91=8A=E8=AD=A6=E5=AF=B9=E6=8E=A5=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/alarmManagement/energyAlarm.ts | 6 + .../src/api/alarmManagement/gatewayAlarm.ts | 3 + hx-ai-intelligent/src/router/alarmManagement.ts | 19 ++ .../energyAlarm/editConfigureEnergyAlarm.vue | 3 +- .../equipmentAlarm/editConfigureDeviceAlarm.vue | 26 +- .../alarmSettings/notificationManagement/index.vue | 1 - .../src/view/alarmManagement/energyAlarm/index.vue | 48 ++++ .../src/view/alarmManagement/energyAlarm/look.vue | 272 +++++++++++++++++++++ .../energyAlarm/notificationManagementMock.json | 108 ++++++++ .../view/alarmManagement/energyAlarm/status.vue | 170 +++++++++++++ .../view/alarmManagement/energyAlarm/ts/config.ts | 187 ++++++++++++++ .../view/alarmManagement/equipmentAlarm/look.vue | 1 + .../view/alarmManagement/equipmentAlarm/status.vue | 23 +- .../view/alarmManagement/gatewayAlarm/index.vue | 11 +- .../src/view/alarmManagement/gatewayAlarm/look.vue | 47 +++- .../view/alarmManagement/gatewayAlarm/ts/config.ts | 89 ++++--- 16 files changed, 940 insertions(+), 74 deletions(-) create mode 100644 hx-ai-intelligent/src/api/alarmManagement/energyAlarm.ts create mode 100644 hx-ai-intelligent/src/api/alarmManagement/gatewayAlarm.ts create mode 100644 hx-ai-intelligent/src/view/alarmManagement/energyAlarm/index.vue create mode 100644 hx-ai-intelligent/src/view/alarmManagement/energyAlarm/look.vue create mode 100644 hx-ai-intelligent/src/view/alarmManagement/energyAlarm/notificationManagementMock.json create mode 100644 hx-ai-intelligent/src/view/alarmManagement/energyAlarm/status.vue create mode 100644 hx-ai-intelligent/src/view/alarmManagement/energyAlarm/ts/config.ts diff --git a/hx-ai-intelligent/src/api/alarmManagement/energyAlarm.ts b/hx-ai-intelligent/src/api/alarmManagement/energyAlarm.ts new file mode 100644 index 0000000..eecda98 --- /dev/null +++ b/hx-ai-intelligent/src/api/alarmManagement/energyAlarm.ts @@ -0,0 +1,6 @@ +export enum energyAlarmApi { + 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 +} diff --git a/hx-ai-intelligent/src/api/alarmManagement/gatewayAlarm.ts b/hx-ai-intelligent/src/api/alarmManagement/gatewayAlarm.ts new file mode 100644 index 0000000..69f2f66 --- /dev/null +++ b/hx-ai-intelligent/src/api/alarmManagement/gatewayAlarm.ts @@ -0,0 +1,3 @@ +export enum gatewayAlarmApi { + getTableList = '/carbon-smart/api/AlarmGatewayLog/selectAlarmGatewayLog', //网关告警 列表 +} diff --git a/hx-ai-intelligent/src/router/alarmManagement.ts b/hx-ai-intelligent/src/router/alarmManagement.ts index f9b326a..f5c15b2 100644 --- a/hx-ai-intelligent/src/router/alarmManagement.ts +++ b/hx-ai-intelligent/src/router/alarmManagement.ts @@ -63,6 +63,25 @@ const alarmManagement = { ], }, { + path: 'EnergyAlarm', + name: 'EnergyAlarm', + meta: { title: '能碳告警', hideChildren: true, icon: 'gaojingguanli' }, + component: Base, + redirect: { name: 'EnergyAlarmIndex' }, + children: [ + { + path: 'index', + name: 'EnergyAlarmIndex', + component: () => import('/@/view/alarmManagement/energyAlarm/index.vue'), + meta: { + title: '能碳告警', + keepAlive: false, + // backApi: [], + }, + }, + ], + }, + { path: 'alarmSettings', name: 'AlarmSettings', meta: { title: '告警设置', hideChildren: true, icon: 'gaojingguanli' }, 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 a5d0067..1cec04d 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue @@ -138,7 +138,6 @@ import { energyAlarms } from '/@/api/alarmManagement/alarmSettings/energyAlarm'; import { http } from '/nerv-lib/util'; import { dict } from '/@/api'; - import { async } from '@antv/x6/lib/registry/marker/async'; // import type { Rule } from 'ant-design-vue/es/form'; @@ -367,7 +366,7 @@ message: '请输入异常描述', trigger: 'blur', validator: (rules: any, abnormalDescription: any, cbfn: any) => { - if (abnormalDescription.trim() !== '') { + if (abnormalDescription && abnormalDescription.trim() !== '') { cbfn(); } else { cbfn('告警标题不能为空'); diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue index ca07bd3..4ff4b42 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue @@ -46,6 +46,7 @@ :disabled="!(infoObject && infoObject.deviceType && infoObject.deviceType.length > 0)" style="width: 100%" :autoClearSearchValue="true" + allow-clear @change="selectDevice" placeholder="请选择设备名称">