|
|
@ -84,7 +84,7 @@ |
|
|
|
placeholder="请选择取值类型" |
|
|
|
allow-clear |
|
|
|
style="width: 100%" |
|
|
|
:options="qzOptions" /> |
|
|
|
:options="valueTypeEnum" /> |
|
|
|
</a-form-item> |
|
|
|
<a-form-item label="异常描述" name="abnormalDescription"> |
|
|
|
<a-textarea |
|
|
@ -114,7 +114,7 @@ |
|
|
|
<a-select |
|
|
|
v-model:value="infoObject.alarmList[index - 1].logic" |
|
|
|
style="width: 70px; margin-left: 12px" |
|
|
|
:options="ljOptions" /> |
|
|
|
:options="logicEnum" /> |
|
|
|
<span style="line-height: 32px; margin-left: 32px">{{ `数值${index}:` }}</span> |
|
|
|
<a-input |
|
|
|
style="width: 65px; margin-left: 6px" |
|
|
@ -158,6 +158,7 @@ |
|
|
|
import { device } from '/@/api/deviceManage'; |
|
|
|
import { deviceAlarms } from '/@/api/alarmManagement/alarmSettings/deviceAlarms'; |
|
|
|
import { http } from '/nerv-lib/util'; |
|
|
|
import { getAllEnum } from '/@/api'; |
|
|
|
|
|
|
|
const visible = ref(false); |
|
|
|
// 父级数据 |
|
|
@ -241,18 +242,9 @@ |
|
|
|
); |
|
|
|
}; |
|
|
|
//取值类型 |
|
|
|
const qzOptions = ref<SelectProps['options']>([ |
|
|
|
{ value: 1, label: '实时值' }, |
|
|
|
{ value: 2, label: '平均值' }, |
|
|
|
]); |
|
|
|
const valueTypeEnum = ref<SelectProps['options']>(); |
|
|
|
//逻辑 |
|
|
|
const ljOptions = ref<SelectProps['options']>([ |
|
|
|
{ value: 0, label: '≥' }, |
|
|
|
{ value: 1, label: '>' }, |
|
|
|
{ value: 2, label: '≤' }, |
|
|
|
{ value: 3, label: '<' }, |
|
|
|
{ value: 4, label: '=' }, |
|
|
|
]); |
|
|
|
const logicEnum = ref<SelectProps['options']>([]); |
|
|
|
|
|
|
|
//开关 |
|
|
|
const clickSwitch = () => { |
|
|
@ -299,10 +291,16 @@ |
|
|
|
} |
|
|
|
return null; // 没有找到目标节点,返回 null |
|
|
|
}; |
|
|
|
const getMenu = async () => { |
|
|
|
let menu = await getAllEnum({ params: ['LogicEnum', 'ValueTypeEnum'] }); |
|
|
|
logicEnum.value = menu.data.LogicEnum; |
|
|
|
valueTypeEnum.value = menu.data.ValueTypeEnum; |
|
|
|
}; |
|
|
|
//父调子 页面显示方法 |
|
|
|
const toggle = async (value: any, info: any) => { |
|
|
|
equipmentAlarm.value = info; |
|
|
|
|
|
|
|
//获取枚举 回显 |
|
|
|
getMenu(); |
|
|
|
//获取设备类型 |
|
|
|
await http |
|
|
|
.post(device.queryDeviceTree, { orgId: orgId.value, pageNum: 1, pageSize: 10 }) |
|
|
|