import request from '@/utils/request'

// 查询重点排污单位名录列表
export function listSources(query) {
  return request({
    url: '/basicData/xcrKeyPollutionSources/findByPage',
    method: 'get',
    params: query
  })
}

// 查询重点排污单位名录详细
export function getSources(xhCodeId) {
  return request({
    url: '/basicData/xcrKeyPollutionSources/' + xhCodeId,
    method: 'get'
  })
}

// 新增重点排污单位名录
export function addSources(data) {
  return request({
    url: '/basicData/xcrKeyPollutionSources',
    method: 'post',
    data: data
  })
}

// 修改重点排污单位名录
export function updateSources(data) {
  return request({
    url: '/basicData/xcrKeyPollutionSources',
    method: 'put',
    data: data
  })
}

// 删除重点排污单位名录
export function delSources(xhCodeId) {
  return request({
    url: '/basicData/xcrKeyPollutionSources/deleteAll',
    method: 'delete'
  })
}
// 批量删除行政许可
export function delSourcesBatch(ids) {
  return request.post('/basicData/xcrKeyPollutionSources/delete',ids)
}
