/**
 * 噪声配置接口
 */
import request from '@/utils/request'
// 噪声配置查询
export function getNoiseConfigList(params) {
  return request({
    url: 'busConfig/noiseConfig/list',
    method: 'get',
    params
  })
}

// 修改噪声配置
export function editNoiseConfig(params) {
  return request({
    url: 'busConfig/noiseConfig/config',
    method: 'post',
    params
  })
}

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