import http from '@/api'
import { FalseAlarmVO, FalseAlarmForm, FalseAlarmQuery } from '@/api/interface/als/falseAlarm'
/**
 * @name 查询虚警抑制列表
 * @param query 参数
 * @returns 返回列表
 */
export const listFalseAlarmApi = (query: FalseAlarmQuery) => {
  return http.get<FalseAlarmVO[]>('/als/falseAlarm/list', query, { loading: true })
}

/**
 * @name 查询虚警抑制详细
 * @param id id
 * @returns returns
 */
export const getFalseAlarmApi = (id: string | number) => {
  return http.get<FalseAlarmVO>(`/als/falseAlarm/${id}`)
}

/**
 * @name 新增虚警抑制
 * @param data data
 * @returns returns
 */
export const addFalseAlarmApi = (data: FalseAlarmForm) => {
  return http.post<any>('/als/falseAlarm', data, { loading: false })
}

/**
 * @name 修改虚警抑制
 * @param data data
 * @returns returns
 */
export const updateFalseAlarmApi = (data: FalseAlarmForm) => {
  return http.put<any>('/als/falseAlarm', data, { loading: false })
}

/**
 * @name 删除虚警抑制
 * @param id id
 * @returns returns
 */
export const delFalseAlarmApi = (id: string | number | Array<string | number>) => {
  return http.delete<any>(`/als/falseAlarm/${id}`)
}

/**
 * @name 导出数据
 * @returns returns
 */
export const exportFalseAlarmApi = (data: any) => {
  return http.post('/als/falseAlarm/export', data)
}
