/**
 * 燃气配置接口
 */
import request from '@/utils/request'
// 燃气配置查询
export function getGasConfigList(params) {
  return request({
    url: 'busConfig/gasConfig/list',
    method: 'get',
    params
  })
}

// 修改燃气配置
export function editGasConfig(params) {
  return request({
    url: 'busConfig/gasConfig/config',
    method: 'post',
    params
  })
}

// 批量导入
export function batchImportGasConfig(fileobj) {
  const param = new FormData()
  param.append('file', fileobj)
  return request({
    url: 'busConfig/gasConfig/batchImport',
    method: 'post',
    headers: { 'Content-Type': 'multipart/form-data' },
    data: param
  })
}
// 批量导出
export function batchExportGasConfig(params) {
  return request({
    url: 'busConfig/gasConfig/batchExport',
    method: 'get',
    params,
    responseType: 'blob' // 这一步也很关键，一定要加上 responseType 值为 blob
  })
}
