index.js 1.5 KB
Newer Older
1 2 3 4 5
import { request } from '@wisdom-utils/utils/es';

const REQUEST_METHOD_GET = 'get';
const REQUEST_METHOD_POST = 'post';
// eslint-disable-next-line no-undef
李纪文's avatar
李纪文 committed
6
const baseURI = typeof DUMI_TYPE !== 'undefined' && DUMI_TYPE === 'dumi' ? '/api' : '';
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 57 58 59 60
// 获取画板列表接口
export function getSketchPadList(params) {
  return request({
    url: `${baseURI}/PandaCore/GCK/SketchPad/List`,
    method: REQUEST_METHOD_GET,
    header: { 'content-type': 'application/x-www-form-urlencoded' },
    params,
  });
}

// 获取画板JSON
export function getSketchPadContent(params) {
  return request({
    url: `${baseURI}/PandaCore/GCK/SketchPad/SketchContent`,
    method: REQUEST_METHOD_GET,
    params,
  });
}

// 获取点表地址信息
export function getPointAddress(params) {
  return request({
    url: `${baseURI}/PandaCore/GCK/PointAddress/GetPointAddress`,
    method: REQUEST_METHOD_GET,
    params,
  });
}

// 获取历史数据
export function getHistoryInfo(params) {
  return request({
    url: `${baseURI}/PandaCore/GCK/Device/SensorsDataForStation`,
    method: REQUEST_METHOD_POST,
    data: params,
  });
}

// 获取数据字典
export function getDictionaryList(params) {
  return request({
    url: `${baseURI}/PandaOMS/OMS/DataManger/GetDataDictionaryList`,
    method: REQUEST_METHOD_GET,
    params,
  });
}

// 获取设备实时数据
export function getDeviceRealInfo(data) {
  return request({
    url: `${baseURI}/PandaCore/GCK/Device/DeviceRealInfo`,
    method: REQUEST_METHOD_POST,
    data,
  });
}