index.js 1.34 KB
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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
import { request } from '@wisdom-utils/utils';

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

// 获取监控展示配置
export function getMonitorConfig({ params, data } = {}) {
  return request({
    url: `/PandaMonitor/Monitor/MonitorConfig/GetMonitorConf`,
    method: REQUEST_METHOD_GET,
    params,
    data,
  });
}

// 获取传感器类型
export function getSensorType({ params, data } = {}) {
  return request({
    url: `/PandaCore/GCK/Sensor/GetSensorType`,
    method: REQUEST_METHOD_GET,
    params,
    data,
  });
}

// 获取设备实时数据
export function getDeviceRealInfo({ params, data } = {}) {
  return request({
    url: `/PandaMonitor/Monitor/Device/GetDeviceRealInfo`,
    method: REQUEST_METHOD_POST,
    params,
    data,
  });
}

// 获取点表地址
export function getPointAddressEntry({ params, data } = {}) {
  return request({
    url: `/PandaMonitor/Monitor/PointAddress/GetPointAddressEntry`,
    method: REQUEST_METHOD_GET,
    params,
    data,
  });
}

// 获取点表版本
export function getPointAddress({ params, data } = {}) {
  return request({
    url: `/PandaMonitor/Monitor/PointAddress/GetPointAddress`,
    method: REQUEST_METHOD_GET,
    params,
    data,
  });
}