import request from '@/utils/request'

export function tree(queryParams) {
    return request({
        url: '/user-boot/depts/getDeptsTree',
        method: 'get',
        params: queryParams
    })
}

export function list(queryParams) {
    return request({
        url: '/user-boot/depts/getDepts',
        method: 'get',
        params: queryParams
    })
}
export function quyu() {
    return request({
        url: '/system-boot/dicData/getArea',
        method: 'get',
    })
}
// export function depts() {
//   return request({
//     url: '/user-boot/depts/getAllDepts',
//     method: 'get',
//   })
// }
export function datalist(queryParams) {
    return request({
        url: '/user-boot/depts/getDeptsAndChildByDeptsIndex',
        method: 'get',
        params: queryParams
    })
}
export function add(data) {
    return request({
        url: '/user-boot/depts/addDepts',
        method: 'post',
        data: data
    })
}
export function del(data) {
    return request({
        url: '/user-boot/depts/deleteDepts',
        method: 'delete',
        params: data
    })
}
export function panduan(data) {
    return request({
        url: '/user-boot/depts/judgeDeleteDepts',
        method: 'get',
        params: data
    })
}
export function updated(data) {
    return request({
        url: '/user-boot/depts/updateDepts',
        method: 'put',
        data: data
    })
}
export function getById(data) {
    return request({
        url: '/user-boot/depts/getDeptsByDeptsIndex',
        method: 'get',
        params: data
    })
}
export function getAreaTree(data) {
    return request({
        url: '/user-boot/dept/getAreaTree',
        method: 'post',
        params: data
    })
}
export function getPidAreaByAreaId(data) {
    return request({
        url: '/user-boot/dept/getPidAreaByAreaId',
        method: 'post',
        params: data
    })
}
export function deptTree() {
    return request({
        url: '/user-boot/dept/deptTree',
        method: 'post',
        //data: data
    })
}

export function existMonitorDeptTree() {
    return request({
        url: '/user-boot/dept/existMonitorDeptTree',
        method: 'post',
        //data: data
    })
}

export function addDetp(data) {
    return request({
        url: '/user-boot/dept/add',
        method: 'post',
        data: data
    })
}
export function updateDetp(data) {
    return request({
        url: '/user-boot/dept/update',
        method: 'post',
        data: data
    })
}
export function selectPid(data) {
    return request({
        url: '/user-boot/dept/selectPid',
        method: 'post',
        data: data
    })
}
export function deleteDept(data) {
    return request({
        url: '/user-boot/dept/delete',
        method: 'post',
        data: data
    })
}
export function deptArea(data) {
    return request({
        url: '/user-boot/dept/deptArea',
        method: 'post',
        data: data
    })
}
export function deptBindLine(data) {
    return request({
        url: '/device-boot/deptLine/deptBindLine',
        method: 'post',
        data: data
    })
}
export function deptChangeBindLine(data) {
    return request({
        url: '/user-boot/dept/deptChangeBindLine',
        method: 'post',
        data: data
    })
}
export function deptDeleteBindLine(data) {
    return request({
        url: '/user-boot/dept/deptDeleteBindLine',
        method: 'post',
        data: data
    })
}
export function getUnLineTree(data) {
    return request({
        url: '/user-boot/dept/getUnLineTree',
        method: 'post',
        data: data
    })
}
export function listDept(data) {
    return request({
        url: '/user-boot/dept/list',
        method: 'post',
        data: data
    })
}
export function removeBind(data) {
    return request({
        url: '/user-boot/dept/removeBind',
        method: 'post',
        data: data
    })
}
export function selectdeptBindLine(data) {
    return request({
        url: '/user-boot/dept/selectdeptBindLine',
        method: 'post',
        data: data
    })
}
export function getDeptBindDeptLineTree(data) {
    return request({
        url: '/device-boot/terminalTree/getDeptBindDeptLineTree',
        method: 'get',
        params: data
    })
}
export function getDeptMapConfig() {
    return request({
        url: '/system-boot/deptMap/getDeptMapConfig',
        method: 'get',
        // params: data
    })
}
