export.js 2.49 KB
Newer Older
yanzhongrong's avatar
yanzhongrong committed
1 2 3
import request from '@/utils/request'

const path = {
neogcg's avatar
neogcg committed
4
  // 告警管理
5 6
  exportLeakyCable: 'api/sysMonitorAlarm/export',
  exportConnet: 'api/sysConnectAlarm/export',
yanzhongrong's avatar
yanzhongrong committed
7

neogcg's avatar
neogcg committed
8
  // 配置管理
9 10 11 12 13 14
  exportRailWay: "api/railWay/export",
  exportSite: "api/site/export",
  exportFsu: "api/fsu/export",
  exportMonitorEquip: "api/monitorEquip/export",
  exportLeaky: "api/leakyCable/export",
  exportFeeder: "api/antennaFeeder/export",
yanzhongrong's avatar
yanzhongrong committed
15

neogcg's avatar
neogcg committed
16
  // 实时状态
17 18
  exportLeakyCableTime: 'api/sysLeakyCableStatus/export',
  exportConnetTime: 'api/sysDeviceStatus/export',
yanzhongrong's avatar
yanzhongrong committed
19

neogcg's avatar
neogcg committed
20
  // 历史数据
21 22 23 24
  exportLeakyStatusHistory: 'api/sysHistoryMonitorStatus/export',
  exportLeakyMaintainHistory: 'api/sysHistoryMonitorMaintain/export',
  exportConnectStatusHistory: 'api/sysHistoryConnectStatus/export',
  exportConnectMaintainHistory: 'api/sysHistoryConnectMaintain/export',
yanzhongrong's avatar
yanzhongrong committed
25

neogcg's avatar
neogcg committed
26
  // 用户管理
27
  exportLog: 'api/sysLog/exportLog',
yanzhongrong's avatar
yanzhongrong committed
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
}

const blobConf = { responseType: 'blob' }
function requestBlob(url, params, config = {}) {
  return request.post(url, params, {
    ...config,
    ...blobConf
  })
}

export function exportLeakyCable() {
  return requestBlob(path.exportLeakyCable, ...arguments)
}
export function exportConnet() {
  return requestBlob(path.exportConnet, ...arguments)
}

neogcg's avatar
neogcg committed
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
export function exportRailWay() {
  return requestBlob(path.exportRailWay, ...arguments)
}
export function exportSite() {
  return requestBlob(path.exportSite, ...arguments)
}
export function exportFsu() {
  return requestBlob(path.exportFsu, ...arguments)
}
export function exportMonitorEquip() {
  return requestBlob(path.exportMonitorEquip, ...arguments)
}
export function exportLeaky() {
  return requestBlob(path.exportLeaky, ...arguments)
}
yanzhongrong's avatar
yanzhongrong committed
60 61 62
export function exportFeeder() {
  return requestBlob(path.exportFeeder, ...arguments)
}
neogcg's avatar
neogcg committed
63 64


yanzhongrong's avatar
yanzhongrong committed
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
export function exportLeakyCableTime() {
  return requestBlob(path.exportLeakyCableTime, ...arguments)
}
export function exportConnetTime() {
  return requestBlob(path.exportConnetTime, ...arguments)
}

export function exportLeakyStatusHistory() {
  return requestBlob(path.exportLeakyStatusHistory, ...arguments)
}
export function exportLeakyMaintainHistory() {
  return requestBlob(path.exportLeakyMaintainHistory, ...arguments)
}
export function exportConnectStatusHistory() {
  return requestBlob(path.exportConnectStatusHistory, ...arguments)
}
export function exportConnectMaintainHistory() {
  return requestBlob(path.exportConnectMaintainHistory, ...arguments)
}

export function exportLog() {
  return requestBlob(path.exportLog, ...arguments)
}