index.js 1.74 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
// 获取画板列表接口
export function getSketchPadList(params) {
  return request({
10
    url: `${baseURI}/PandaMonitor/Monitor/SketchPad/List`,
11 12 13 14 15 16 17 18 19
    method: REQUEST_METHOD_GET,
    header: { 'content-type': 'application/x-www-form-urlencoded' },
    params,
  });
}

// 获取画板JSON
export function getSketchPadContent(params) {
  return request({
20
    url: `${baseURI}/PandaMonitor/Monitor/SketchPad/SketchContent`,
21 22 23 24 25 26 27 28
    method: REQUEST_METHOD_GET,
    params,
  });
}

// 获取点表地址信息
export function getPointAddress(params) {
  return request({
29
    url: `${baseURI}/PandaMonitor/Monitor/PointAddress/GetPointAddress`,
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
    method: REQUEST_METHOD_GET,
    params,
  });
}

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

// 获取设备实时数据
export function getDeviceRealInfo(data) {
  return request({
47
    url: `${baseURI}/PandaMonitor/Monitor/Device/DeviceRealInfo`,
48 49 50 51
    method: REQUEST_METHOD_POST,
    data,
  });
}
52 53 54 55 56 57 58 59 60

// 获取历史数据
export function getHistoryInfo(data) {
  return request({
    url: `${baseURI}/PandaMonitor/Monitor/Device/GetSensorsDataForStation`,
    method: REQUEST_METHOD_POST,
    data,
  });
}
李纪文's avatar
李纪文 committed
61 62 63 64

// 获取视频通道详情
export function getVideoDetail(params) {
  return request({
65
    url: `${baseURI}/PandaMonitor/Monitor/Video/GetVideoPlayListByDeviceCode`,
李纪文's avatar
李纪文 committed
66 67 68
    method: REQUEST_METHOD_GET,
    params,
  });
程恺文's avatar
程恺文 committed
69
}