import request from '@/utils/request'

export function getDeptPage(params) {
    return request({
        url: '/admin/dept/page',
        method: 'get',
        params
    })
}

export function getDeptList(params) {
    return request({
        url: '/admin/dept/list',
        method: 'get',
        params
    })
}


export function getDeptTree(params) {
  return request({
    url: '/admin/dept/tree',
    method: 'get',
    params
  })
}

export function addDept(data) {
    return request({
        url: '/admin/dept/add',
        method: 'post',
        data: data
    })
}

export function editDept(data) {
    return request({
        url: '/admin/dept/update',
        method: 'post',
        data: data
    })
}

export function deleteDept(deptId) {
    return request({
        url: '/admin/dept/delete/' + deptId,
        method: 'get'
    })
}

