device.api.ts 1.0 KB

1234567891011121314151617181920212223242526272829
  1. import { defHttp } from '/@/utils/http/axios';
  2. enum Api {
  3. subStationList = '/safety/ventanalySubStation/alllist',
  4. deviceList = '/dataCenter/compute/deviceData/getDeviceAll',
  5. devMonitorList = '/dataCenter/compute/deviceData/getDeviceMonitorInfo',
  6. }
  7. // 分站查询接口
  8. export const subStationList = (params) => defHttp.get({ url: Api.subStationList, params });
  9. //根据设备类型获取设备列表
  10. export const getDeviceListByType = (params) =>
  11. defHttp.post({
  12. headers: {
  13. 'X-Access-Token':
  14. 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiZXhwIjoxNzU5ODQxMTcwfQ.fHaM3l-d88tUSLOs8sstXsDuSCn6Agbj_EMZMgV6waw',
  15. },
  16. url: Api.deviceList,
  17. params,
  18. });
  19. //根据设备id获取设备监控数据
  20. export const getDevMonitorListById = (params) =>
  21. defHttp.post({
  22. headers: {
  23. 'X-Access-Token':
  24. 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiZXhwIjoxNzU5ODQxMTcwfQ.fHaM3l-d88tUSLOs8sstXsDuSCn6Agbj_EMZMgV6waw',
  25. },
  26. url: Api.devMonitorList,
  27. params,
  28. });