|
@@ -15,6 +15,7 @@ import {
|
|
getAlarmEventGetPageList,
|
|
getAlarmEventGetPageList,
|
|
getAlarmEventInfo,
|
|
getAlarmEventInfo,
|
|
getAlarmHistoryList,
|
|
getAlarmHistoryList,
|
|
|
|
+ getOrgUsers,
|
|
updateAlarmEvent,
|
|
updateAlarmEvent,
|
|
} from '@/api';
|
|
} from '@/api';
|
|
import { DictCode } from '@/constants';
|
|
import { DictCode } from '@/constants';
|
|
@@ -33,6 +34,7 @@ import type {
|
|
EventTrigger,
|
|
EventTrigger,
|
|
ExecutionAction,
|
|
ExecutionAction,
|
|
TriggerConditionItem,
|
|
TriggerConditionItem,
|
|
|
|
+ UserPageItem,
|
|
} from '@/types';
|
|
} from '@/types';
|
|
|
|
|
|
const { handleRequest } = useRequest();
|
|
const { handleRequest } = useRequest();
|
|
@@ -49,6 +51,7 @@ const triggerConditionRefs = ref<InstanceType<typeof AlarmConditions>[]>([]);
|
|
const judgmentConditionRefs = ref<InstanceType<typeof AlarmConditions>[]>([]);
|
|
const judgmentConditionRefs = ref<InstanceType<typeof AlarmConditions>[]>([]);
|
|
const executionActionRefs = ref<InstanceType<typeof AlarmConditions>[]>([]);
|
|
const executionActionRefs = ref<InstanceType<typeof AlarmConditions>[]>([]);
|
|
const alarmConditionList = ref<DictValue[]>([]);
|
|
const alarmConditionList = ref<DictValue[]>([]);
|
|
|
|
+const orgUsersList = ref<UserPageItem[]>([]);
|
|
const alarmPageParams = ref<AlarmPageParams>({
|
|
const alarmPageParams = ref<AlarmPageParams>({
|
|
pageIndex: 1,
|
|
pageIndex: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
@@ -263,6 +266,14 @@ const convertBtoA = (arr: AlarmEventItem[]): TriggerConditionItem[] | ExecutionA
|
|
// 处理动态字段
|
|
// 处理动态字段
|
|
const dynamicFields = item.dataList.reduce(
|
|
const dynamicFields = item.dataList.reduce(
|
|
(acc, { code, value }) => {
|
|
(acc, { code, value }) => {
|
|
|
|
+ if (code === 'alarmContact') {
|
|
|
|
+ if (value) {
|
|
|
|
+ acc[code] = Number(value);
|
|
|
|
+ } else {
|
|
|
|
+ acc[code] = undefined;
|
|
|
|
+ }
|
|
|
|
+ return acc;
|
|
|
|
+ }
|
|
// 特殊处理时间字段
|
|
// 特殊处理时间字段
|
|
if (code === 'alarmScheduledTime') {
|
|
if (code === 'alarmScheduledTime') {
|
|
const timeStr = dayjs(value, 'HH:mm');
|
|
const timeStr = dayjs(value, 'HH:mm');
|
|
@@ -593,6 +604,12 @@ const okConfirm = async () => {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+const getOrgUsersList = () => {
|
|
|
|
+ handleRequest(async () => {
|
|
|
|
+ orgUsersList.value = await getOrgUsers();
|
|
|
|
+ });
|
|
|
|
+};
|
|
|
|
+
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
handleRequest(async () => {
|
|
handleRequest(async () => {
|
|
await getAlarmCondition();
|
|
await getAlarmCondition();
|
|
@@ -604,6 +621,7 @@ onMounted(() => {
|
|
await getAlarmNotifyMethod();
|
|
await getAlarmNotifyMethod();
|
|
});
|
|
});
|
|
getAlarmEventGetPageData();
|
|
getAlarmEventGetPageData();
|
|
|
|
+ getOrgUsersList();
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
|
|
|
|
@@ -744,6 +762,7 @@ onMounted(() => {
|
|
:form="item"
|
|
:form="item"
|
|
:execution-action="executionAction"
|
|
:execution-action="executionAction"
|
|
:alarm-notify-method="alarmNotifyMethod"
|
|
:alarm-notify-method="alarmNotifyMethod"
|
|
|
|
+ :org-users-list="orgUsersList"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
|
|
|