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

enum Api {
  getProvinceAlarm = '/province/alarm/getProvinceAlarm',
  getProvinceAlarmNum = '/province/alarm/getProvinceAlarmNum',
  getProvinceAlarmHistory = '/province/alarm/getProvinceAlarmHistory',
}
//根据预警类型查询不同等级数量
export const getProvinceAlarmNum = (params) =>
  defHttp.post(
    {
      url: Api.getProvinceAlarmNum,
      params,
    },
    { joinParamsToUrl: true }
  );
//查询预警数据
export const getProvinceAlarm = (params) =>
  defHttp.post(
    {
      url: Api.getProvinceAlarm,
      params: {
        alarmType: 'overLimitAlarmOut',
        ...params,
      },
    },
    { joinParamsToUrl: true }
  );
//查询预警历史数据
export const getProvinceAlarmHistory = (params) =>
  defHttp.post(
    {
      url: Api.getProvinceAlarmHistory,
      params: {
        alarmType: 'overLimitAlarmOut',
        ...params,
      },
    },
    { joinParamsToUrl: true }
  );
