import request from '@/utils/request'

// 查询当前报警列表
export function getAlarmNowList(params) {
  return request({
    url: '/alarm/listPage',
    method: 'get',
    params
  })
}

// 查询历史报警记录
export function getAlarmList(params) {
  return request({
    url: '/alarm/listPage',
    method: 'get',
    params
  })
}

// 取消报警
export function alarmCancel(params) {
  return request({
    url: '/alarm/cancel',
    method: 'post',
    params
  })
}

// 查询报警详情
export function alarmDetail(id) {
  return request({
    url: '/alarm/detail/' + id,
    method: 'get',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
    }
  })
}

// 运行总览页面查询报警列表
export function alarmListOverview(params) {
  return request({
    url: '/earthview/alarmList',
    method: 'get',
    params
  })
}
