/*
 * @Author: your name
 * @Date: 2022-02-26 16:01:37
 * @LastEditTime: 2022-02-26 21:11:12
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /gassafety-progress/gassafetyprogress-web/src/api/detector/detectorInfo.js
 */
import request from "@/utils/request";

// 查询探测器列表
export function listDetectorInfo(query) {
  return request({
    url: "/detector/detectorInfo/list",
    method: "get",
    params: {
      pageNum: 1,
      pageSize: 20,
      ...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,
  });
}
