import request from '@/utils/request';

// 水利站点降水分析统计
export const getRainfallStatisticsCount = (timeOption) => {
  return request({
    url: '/api/gateway/v2/get_rainfall_statistics_count',
    method: 'post',
    data: {
      query: {
        timeOption
      }
    }
  });
};

// 降雨量排行
export const getRainfallRange1 = (params) => {
  return request({
    url: '/api/gateway/v1/get_rainfall_range',
    method: 'post',
    data: params
  });
};

export const getRainfallRange2 = (params) => {
  return request({
    url: '/api/gateway/v2/get_rainfall_range',
    method: 'post',
    data: params
  });
};
// 降雨量统计
export const getRainfallInfo = (code: string) => {
  return request({
    url: '/api/rainfall/info/' + code,
    method: 'get'
  });
};
// 影响分析
export const getRainfallTownNumCount = (params) => {
  return request({
    url: '/api/gateway/v2/get_rainfall_town_num_count',
    method: 'post',
    data: params
  });
};

export const getRainfallTownDataExport = (params) => {
  return request({
    url: '/api/gateway/v1/get_rainfall_town_data_export',
    method: 'post',
    data: params
  });
};
