/**
 * 开挖配置接口
 */
import request from '@/utils/request'
// 开挖配置查询
export function getDigConfigList(params) {
  return request({
    url: 'busConfig/digConfig/list',
    method: 'get',
    params
  })
}

// 修改开挖配置
export function editDigConfig(params) {
  return request({
    url: 'busConfig/digConfig/config',
    method: 'post',
    params
  })
}

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