import request from '@/utils/request'

//查询图层
export function GetList(params) {
    return request({
        url: '/LayerManager/Load',
        method: 'get',
        params
    })
}

//查询关联关系
export function GetListRel(params) {
    return request({
        url: '/LayerManager/LoadRel',
        method: 'get',
        params
    })
}

//添加关联关系
export function AddRel(data) {
    return request({
        url: '/LayerManager/AddRel',
        method: 'post',
        data
    })
}

//删除关联关系
export function DeleteRel(data) {
    return request({
        url: '/LayerManager/DeleteRel',
        method: 'post',
        data
    })
}

//添加修改图层数据
export function AddLayer(data){
    return request({
        url: '/LayerManager/Add',
        method: 'post',
        data
    })
}

//删除图层数据
export function DeleteLayer(data){
    return request({
        url: '/LayerManager/Delete',
        method: 'post',
        data
    })
}

//角色绑定所有图层
export function AddRelAll(params){
    return request({
        url: '/LayerManager/AddRelAll',
        method: 'get',
        params
    })
}

//角色解除绑定所有图层
export function DeleteAll(params){
    return request({
        url: '/LayerManager/DeleteAll',
        method: 'get',
        params
    })
}