import request from '@/utils/request'

// 查询配网字典列表
export function listDic(query) {
  return request({
    url: '/powerdistribution/dic/list',
    method: 'get',
    params: query
  })
}

// 查询配网字典详细
export function getDic(id) {
  return request({
    url: '/powerdistribution/dic/' + id,
    method: 'get'
  })
}

// 新增配网字典
export function addDic(data) {
  return request({
    url: '/powerdistribution/dic',
    method: 'post',
    data: data
  })
}

// 修改配网字典
export function updateDic(data) {
  return request({
    url: '/powerdistribution/dic',
    method: 'put',
    data: data
  })
}

// 删除配网字典
export function delDic(id) {
  return request({
    url: '/powerdistribution/dic/' + id,
    method: 'delete'
  })
}
// 查询配网字典详细
export function getPdmDicTree() {
  return request({
    url: '/powerdistribution/dic/getPdmDicTree',
    method: 'get'
  })
}