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="请选择设备名称">