import request from '@/utils/request' //引入axios请求及拦截器
export default {
    //新增部门
    addDept(data) {
        return request({
            url: '/system/dept',
            method: 'post',
            data
        })
    },
    //修改部门
    editDept(data) {
        return request({
            url: '/system/dept/edit',
            method: 'post',
            data
        })
    },
    //部门列表
    obtainDeptList(data) {
        return request({
            url: '/system/dept/list',
            method: 'get',
            params: data
        })
    },
    //查询部门列表（节点）
    excludeDeptList(data) {
        return request({
            url: `/system/dept/list/exclude/` + data,
            method: 'get',
            params: data
        })
    },
    //加载对应角色部门列表树
    loadDeptRoleDeptTreeselect(data) {
        return request({
            url: `/system/dept/roleDeptTreeselect/` + data,
            method: 'get',
        })
    },
    //获取部门下拉树列表
    obtainDeptTreeselect(data) {
        return request({
            url: '/system/dept/treeselect',
            method: 'get',
            params: data
        })
    },
    //根据部门编号获取详细信息
    obtainDeptId(data) {
        return request({
            url: `/system/dept/` + data,
            method: 'get',
        })
    },
}