index.js 860 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
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,
  });
24 25 26 27 28 29 30 31 32
}

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