import request from '@/utils/request'

// 查询树形字典列表
export function listTreeDict(query) {
  return request({
    url: '/system/treeDict/list',
    method: 'get',
    params: query
  })
}

// 查询树形字典详细
export function getTreeDict(id) {
  return request({
    url: '/system/treeDict/' + id,
    method: 'get'
  })
}

// 新增树形字典
export function addTreeDict(data) {
  return request({
    url: '/system/treeDict',
    method: 'post',
    data: data
  })
}

// 修改树形字典
export function updateTreeDict(data) {
  return request({
    url: '/system/treeDict',
    method: 'put',
    data: data
  })
}

// 删除树形字典
export function delTreeDict(id) {
  return request({
    url: '/system/treeDict/' + id,
    method: 'delete'
  })
}
