import { defHttp } from '/@/utils/http/axios';

enum Api {
  getGoafData = '/province/device/getGoafData',
  getCoalSeamFireNum = '/province/homeData/getCoalSeamFireNum',
  getGoafStatusNum = '/province/homeData/getGoafStatusNum',
  getGoafAlarmNum = '/province/homeData/getGoafAlarmNum',
  getProvinceAlarm = '/province/alarm/getProvinceAlarm',
}

// 查询密闭监测数据
export function getGoafData(params: any) {
  return defHttp.post({ url: Api.getGoafData, params }, { joinParamsToUrl: true });
}

// 查询煤层自燃倾向数量统计
export function getCoalSeamFireNum(params) {
  return defHttp.post({
    url: Api.getCoalSeamFireNum,
    params,
  })
};

// 查询密闭统计
export function getGoafStatusNum(params) {
  return defHttp.post({
    url: Api.getGoafStatusNum,
    params,
  })
};

// 查询预警统计
export function getGoafAlarmNum(params) {
  return defHttp.post({
    url: Api.getGoafAlarmNum,
    params,
  })
};

// 查询预警信息列表
export function getProvinceAlarm(params) {
  return defHttp.post({
    url: Api.getProvinceAlarm,
    params,
  }, 
  { joinParamsToUrl: true })
};