|
@@ -6,9 +6,13 @@ import type {
|
|
|
AddInterface,
|
|
|
AgreementUpdate,
|
|
|
AlarmEvent,
|
|
|
+ AlarmEventHistoryItemData,
|
|
|
+ AlarmHistory,
|
|
|
AlarmHistoryItem,
|
|
|
+ AlarmPageParams,
|
|
|
AllDevicesList,
|
|
|
BatchUpdate,
|
|
|
+ ChangeState,
|
|
|
CustomParameters,
|
|
|
DeviceBindQuery,
|
|
|
DeviceGroup,
|
|
@@ -28,6 +32,7 @@ import type {
|
|
|
EquipmentInformationForm,
|
|
|
EquipmentTypeItem,
|
|
|
EquipmentUpdateForm,
|
|
|
+ EventTriggerData,
|
|
|
GatewayBody,
|
|
|
GatewayInformation,
|
|
|
GatewayInterface,
|
|
@@ -154,6 +159,49 @@ export const addAlarmEvent = async (params: AlarmEvent) => {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+export const alarmEventChangeState = async (params: ChangeState) => {
|
|
|
+ await request(apiBiz('/alarmEvent/changeState'), {
|
|
|
+ method: 'POST',
|
|
|
+ body: JSON.stringify(params),
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+export const deleteAlarmEvent = async (id: number) => {
|
|
|
+ await request(apiBiz(`/alarmEvent/delete/${id}`), {
|
|
|
+ method: 'POST',
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+export const getAlarmEventGetPageList = async (params: AlarmPageParams) => {
|
|
|
+ const data = await request<EventTriggerData>(apiBiz('/alarmEvent/getPageList'), {
|
|
|
+ method: 'POST',
|
|
|
+ body: JSON.stringify(params),
|
|
|
+ });
|
|
|
+ return data;
|
|
|
+};
|
|
|
+
|
|
|
+export const getAlarmEventInfo = async (id: number) => {
|
|
|
+ const data = await request<AlarmEvent>(apiBiz(`/alarmEvent/info/${id}`));
|
|
|
+ return data;
|
|
|
+};
|
|
|
+
|
|
|
+export const updateAlarmEvent = async (params: AlarmEvent) => {
|
|
|
+ await request(apiBiz('/alarmEvent/update'), {
|
|
|
+ method: 'POST',
|
|
|
+ body: JSON.stringify(params),
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+// 报警历史表
|
|
|
+
|
|
|
+export const getAlarmHistoryList = async (params: AlarmHistory) => {
|
|
|
+ const data = await request<AlarmEventHistoryItemData>(apiBiz('/alarmHistory/getPageList'), {
|
|
|
+ method: 'POST',
|
|
|
+ body: JSON.stringify(params),
|
|
|
+ });
|
|
|
+ return data;
|
|
|
+};
|
|
|
+
|
|
|
// 环境监控-监测点预警配置
|
|
|
|
|
|
export const addBatchMonitorPointAlarm = async (params: WarningItem[]) => {
|