import request from '@/utils/request'

// 查询部门列表
export function listManage(query) {
  return request({
    url: '/business/manage/manageList',
    method: 'POST',
    params: query
  })
}

// 查询部门列表（排除节点）
export function listManageExcludeChild(deptId) {
  return request({
    url: '/business/manage/list/exclude/' + deptId,
    method: 'get'
  })
}

// 查询部门详细
export function getManage(deptId) {
  return request({
    url: '/business/manage/' + deptId,
    method: 'get'
  })
}

// 新增部门
export function addManage(data) {
  return request({
    url: '/business/manage',
    method: 'post',
    data: data
  })
}
// 修改部门
export function updateManage(data) {
  return request({
    url: '/business/manage ',
    method: 'put',
    data: data
  })
}

// 删除部门
export function delManage(deptId) {
  return request({
    url: '/business/manage/' + deptId,
    method: 'delete'
  })
}
