import request from '@/utils/request'

// 查询配网作业机构列表
export function listOrgan(query) {
  return request({
    url: '/powerdistribution/organ/list',
    method: 'get',
    params: query
  })
}

// 查询配网作业机构详细
export function getOrgan(id) {
  return request({
    url: '/powerdistribution/organ/' + id,
    method: 'get'
  })
}

// 新增配网作业机构
export function addOrgan(data) {
  return request({
    url: '/powerdistribution/organ',
    method: 'post',
    data: data
  })
}

// 修改配网作业机构
export function updateOrgan(data) {
  return request({
    url: '/powerdistribution/organ',
    method: 'put',
    data: data
  })
}

// 删除配网作业机构
export function delOrgan(id) {
  return request({
    url: '/powerdistribution/organ/' + id,
    method: 'delete'
  })
}
