|
|
@ -20,6 +20,7 @@ |
|
|
|
show-search |
|
|
|
:allowClear="true" |
|
|
|
placeholder="请选择通知方式" |
|
|
|
:field-names="{ label: 'cnValue', value: 'dicKey', options: 'children' }" |
|
|
|
:filter-option="filterDevicePoint" /> |
|
|
|
</a-form-item> |
|
|
|
<a-form-item label="启用规则"> |
|
|
@ -73,6 +74,7 @@ |
|
|
|
import { http } from '/nerv-lib/util'; |
|
|
|
import linkPeople from './linkPeople/index.vue'; |
|
|
|
import { notificationManagementApi } from '/@/api/alarmManagement/alarmSettings/notificationManagements'; |
|
|
|
import { dict } from '/@/api'; |
|
|
|
|
|
|
|
//table 数据 |
|
|
|
const columns = [ |
|
|
@ -173,10 +175,7 @@ |
|
|
|
} |
|
|
|
}; |
|
|
|
// 通知信息 |
|
|
|
const devicePointData = ref([ |
|
|
|
{ label: '站内信息', value: '1' }, |
|
|
|
{ label: '邮件', value: '2' }, |
|
|
|
]); |
|
|
|
const devicePointData = ref([]); |
|
|
|
|
|
|
|
const rules = { |
|
|
|
notificationMethod: [{ required: true, message: '请选择通知方式', trigger: 'change' }], |
|
|
@ -185,6 +184,9 @@ |
|
|
|
const formRef = ref(); |
|
|
|
const emit = defineEmits(['updNotification']); |
|
|
|
const toggle = async (value: any) => { |
|
|
|
// NOTIFICATIONMETHOD |
|
|
|
let devicePoint = await dict({ params: { dicKey: 'NOTIFICATIONMETHOD' } }); |
|
|
|
devicePointData.value = devicePoint.data.data; |
|
|
|
//判断 是新增 还是修改 |
|
|
|
if (value) { |
|
|
|
// // 获取接口 |
|
|
@ -235,10 +237,12 @@ |
|
|
|
notificationMethod: null, |
|
|
|
hxAlarmNotifyUserList: [], |
|
|
|
enableNotifications: 0, |
|
|
|
orgId: null, |
|
|
|
}; |
|
|
|
obj.notificationMethod = infoObject.value.notificationMethod.toString(); |
|
|
|
obj.id = infoObject.value.id; |
|
|
|
obj.enableNotifications = infoObject.value.enableNotifications; |
|
|
|
obj.orgId = infoObject.value.orgId; |
|
|
|
//处理 选择人数据 |
|
|
|
dataSource.value.forEach((item) => { |
|
|
|
obj.hxAlarmNotifyUserList.push({ |
|
|
|