import request from '@/utils/request'

// 查询探测器列表
export function listDetectorInfo(query) {
  return request({
    url: '/detector/detectorInfo/list',
    method: 'get',
    params: query
  })
}

// 探测器列表
export function detectorInfoList(query) {
  return request({
    url: '/detector/detectorInfo/detectorInfoList',
    method: 'get',
    params: query
  })
}

// 新增探测器
export function addDetectorInfo(data) {
  return request({
    url: '/detector/detectorInfo',
    method: 'post',
    data: data
  })
}

// 修改探测器
export function updateDetectorInfo(data) {
  return request({
    url: '/detector/detectorInfo',
    method: 'put',
    data: data
  })
}

// 删除探测器
export function delDetectorInfo(detectorId) {
  return request({
    url: '/detector/detectorInfo/' + detectorId,
    method: 'delete'
  })
}

// 导出探测器
export function exportDetectorInfo(query) {
  return request({
    url: '/detector/detectorInfo/export',
    method: 'get',
    params: query
  })
}

// 右上角的综合列表
export function alarmData(query) {
  return request({
    url: '/detector/detectorInfo/getAlarmData',
    method: 'get',
    params: query
  })
}
