detectorInfo.js 2.19 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
/*
 * @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 yhqlistDetectorInfo(query) {
  return request({
    url: "/system/yehuaqiDevice/list",
    method: "get",
    params: {
      pageNum: 1,
      pageSize: 5,
      ...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,
  });
}
export function selectDeviceNum(query) {
  return request({
    url: '/device/device/selectDeviceNum',
    method: 'get',
    params: query
  })
}

//数据监控获取探测器数据
export function selectDetectorMointor(query){
  return request({
    url: '/detector/detectorInfo/selectDetectorMointor',
    method: 'get',
    params: {
      pageNum: 1,
      pageSize: 20,
      ...query,
  },
  })
}