Newer
Older
baseResourceFront / src / api / system / fileImport.js
yangqianqian on 23 Mar 2021 1 KB 修改UI
import request from '@/utils/request'
import Vue from 'vue'
export function batchImportController(fileobj) {
  const param = new FormData()
  param.append('file', fileobj)
  const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值
  const lampPath = basetConfig.lampBasePath
  return request({
    url: lampPath + 'busDeviceController/batchImport',
    method: 'post',
    headers: { 'Content-Type': 'multipart/form-data' },
    data: param
  })
}

export function batchImportLamppost(fileobj) {
  const param = new FormData()
  param.append('file', fileobj)
  const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值
  const lampPath = basetConfig.lampBasePath
  return request({
    url: lampPath + 'busDeviceLamppost/batchImport',
    method: 'post',
    headers: { 'Content-Type': 'multipart/form-data' },
    data: param
  })
}

export function batchImportLamp(fileobj) {
  const param = new FormData()
  param.append('file', fileobj)
  const basetConfig = Vue.prototype.baseConfig // 注意该行应放在export里面,否则获取不到值
  const lampPath = basetConfig.lampBasePath
  return request({
    url: lampPath + 'busDeviceLamp/batchImport',
    method: 'post',
    headers: { 'Content-Type': 'multipart/form-data' },
    data: param
  })
}