import request from '@/utils/request'

export function getTree(data) {
    return request({
        url: 'pipe/network/getTree',
        method: 'post',
        data
    })
}

export function getChildren(data) {
    return request({
        url: 'pipe/network/getChildList',
        method: 'post',
        data
    })
}

export function getParentTree(data) {
    return request({
        url: 'pipe/network/getParentTree',
        method: 'post',
        data
    })
}

export function add(data) {
    return request({
        url: 'pipe/network/insert',
        method: 'post',
        data
    })
}

export function edit(data) {
    return request({
        url: 'pipe/network/update',
        method: 'post',
        data
    })
}

export function del(ids) {
    return request({
        url: 'pipe/network/delete',
        method: 'post',
        data: ids
    })
}

export default { getTree, getChildren, getParentTree, add, edit, del }