Browse Source

fix:修改设备告警逻辑

temp
zhaohy 3 months ago
parent
commit
0ee511e23a
  1. 50
      hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue

50
hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue

@ -15,20 +15,6 @@
<a-form-item name="alarmTitle" label="告警标题">
<ns-input allowClear v-model:value="infoObject.alarmTitle" placeholder="请输入告警标题" />
</a-form-item>
<a-form-item name="monitorTime" label="监测时长">
<ns-input-number
allowClear
v-model:value="infoObject.monitorTime"
placeholder="请输入监测时长" />
</a-form-item>
<a-form-item label="监测时长单位" name="monitorTimeUnit">
<a-select
v-model:value="infoObject.monitorTimeUnit"
placeholder="请选择监测时长单位"
style="width: 100%"
allowClear
:options="MonitorTimeUnitEnum" />
</a-form-item>
<a-form-item label="告警频率" name="alarmFrequency">
<a-select
v-model:value="infoObject.alarmFrequency"
@ -56,6 +42,30 @@
</template>
</ns-input-number>
</a-form-item>
<a-form-item name="monitorTime" label="监测时长">
<ns-input-number
allowClear
style="width: 100%"
v-model:value="infoObject.monitorTime"
placeholder="请输入监测时长">
<template #addonAfter>
<a-select
v-model:value="infoObject.monitorTimeUnit"
placeholder="请选择监测时长单位"
style="width: 80px"
allowClear
:options="MonitorTimeUnitEnum" />
</template>
</ns-input-number>
</a-form-item>
<!-- <a-form-item label="监测时长单位" name="monitorTimeUnit">
<a-select
v-model:value="infoObject.monitorTimeUnit"
placeholder="请选择监测时长单位"
style="width: 100%"
allowClear
:options="MonitorTimeUnitEnum" />
</a-form-item> -->
<a-form-item label="优先级" name="priority">
<a-select
v-model:value="infoObject.priority"
@ -101,7 +111,7 @@
alarmTitle: null,
alarmFrequency: null,
monitorTime: null,
monitorTimeUnit: null,
monitorTimeUnit: 2,
priority: null,
createWorkOrder: null,
intervalDurationUnit: null,
@ -141,7 +151,7 @@
alarmTitle: null,
alarmFrequency: null,
monitorTime: null,
monitorTimeUnit: null,
monitorTimeUnit: 2,
priority: null,
createWorkOrder: null,
intervalDurationUnit: null,
@ -180,7 +190,11 @@
required: true,
trigger: 'change',
validator: (rules: any, monitorTime: any, cbfn: any) => {
if (Number.isInteger(monitorTime) && monitorTime > 0) {
if (
Number.isInteger(monitorTime) &&
monitorTime > 0 &&
infoObject.value.monitorTimeUnit
) {
cbfn();
} else {
cbfn('请输入正确的监测时长');
@ -220,7 +234,7 @@
],
createWorkOrder: [{ required: true, message: '请选择是否创建工单', trigger: 'change' }],
priority: [{ required: true, message: '请选择优先级', trigger: 'change' }],
monitorTimeUnit: [{ required: true, message: '请选择监测时长单位', trigger: 'change' }],
// monitorTimeUnit: [{ required: true, message: '', trigger: 'change' }],
};
//
const changeSwitch = () => {

Loading…
Cancel
Save