detectorInfo.js 1.99 KB
Newer Older
纪泽龙's avatar
纪泽龙 committed
1 2 3 4 5 6 7 8 9
/*
 * @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";
10 11 12 13

// 查询探测器列表
export function listDetectorInfo(query) {
  return request({
纪泽龙's avatar
纪泽龙 committed
14 15 16 17 18 19 20 21
    url: "/detector/detectorInfo/list",
    method: "get",
    params: {
      pageNum: 1,
      pageSize: 20,
      ...query,
    },
  });
22 23 24 25 26
}

// 探测器列表
export function detectorInfoList(query) {
  return request({
纪泽龙's avatar
纪泽龙 committed
27 28 29 30 31
    url: "/detector/detectorInfo/detectorInfoList",
    method: "get",

    params: query,
  });
32 33 34 35 36
}

// 新增探测器
export function addDetectorInfo(data) {
  return request({
纪泽龙's avatar
纪泽龙 committed
37 38 39 40
    url: "/detector/detectorInfo",
    method: "post",
    data: data,
  });
41 42 43 44 45
}

// 修改探测器
export function updateDetectorInfo(data) {
  return request({
纪泽龙's avatar
纪泽龙 committed
46 47 48 49
    url: "/detector/detectorInfo",
    method: "put",
    data: data,
  });
50 51 52 53 54
}

// 删除探测器
export function delDetectorInfo(detectorId) {
  return request({
纪泽龙's avatar
纪泽龙 committed
55 56 57
    url: "/detector/detectorInfo/" + detectorId,
    method: "delete",
  });
58 59 60 61 62
}

// 导出探测器
export function exportDetectorInfo(query) {
  return request({
纪泽龙's avatar
纪泽龙 committed
63 64 65 66
    url: "/detector/detectorInfo/export",
    method: "get",
    params: query,
  });
67
}
王晓倩's avatar
王晓倩 committed
68 69 70 71

// 右上角的综合列表
export function alarmData(query) {
  return request({
纪泽龙's avatar
纪泽龙 committed
72 73 74 75
    url: "/detector/detectorInfo/getAlarmData",
    method: "get",
    params: query,
  });
王晓倩's avatar
王晓倩 committed
76
}
77 78 79 80 81 82 83
export function selectDeviceNum(query) {
  return request({
    url: '/device/device/selectDeviceNum',
    method: 'get',
    params: query
  })
}
84 85 86 87 88 89 90 91 92 93 94 95 96

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