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