import { request } from '@wisdom-utils/utils';

const REQUEST_METHOD_GET = 'get';
const REQUEST_METHOD_POST = 'post';
// eslint-disable-next-line no-undef
const baseURI = typeof DUMI_TYPE !== 'undefined' && DUMI_TYPE === 'dumi' ? '/api' : '';

// 获取历史数据
export function getHistoryInfo(data) {
  return request({
    url: `${baseURI}/PandaMonitor/Monitor/Device/GetSensorsDataForStation`,
    method: REQUEST_METHOD_POST,
    data,
  });
}

// 获取统计数据
export function getStatisticsInfo(data) {
  return request({
    url: `${baseURI}/PandaMonitor/Monitor/Device/EquipmentDataReports`,
    method: REQUEST_METHOD_POST,
    data,
  });
}

// 获取节假日、工作日
export function getDateList(params) {
  return request({
    url: `${baseURI}/PandaMonitor/Monitor/Alert/GetDateList`,
    method: REQUEST_METHOD_GET,
    params,
  });
}