index.js 864 Bytes
Newer Older
1 2 3 4 5 6 7
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' : '';

崔佳豪's avatar
崔佳豪 committed
8
const MonitorUrl = `${baseUrl}/PandaMonitor/Monitor`;
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

// 查询设备指标
export function getQuataList(params) {
  return request({
    url: `${MonitorUrl}/Device/GetQutaList`,
    method: REQUEST_METHOD_GET,
    params,
  });
}

// 设备监控展示
export function getMonitorConf(params) {
  return request({
    url: `${MonitorUrl}/MonitorConfig/GetMonitorConf`,
    method: REQUEST_METHOD_GET,
    params,
  });
}

// 设备监控展示
export function updateMonitorConf(data) {
  return request({
    url: `${MonitorUrl}/MonitorConfig/AddOrUpdateMonitorConf`,
    method: REQUEST_METHOD_POST,
    data,
  });
}