import request from '@/utils/request'

export function fetchList(query) {
    return request({
        url: '/ncjtEntranceGuard/getDevicePageList',
        method: 'get',
        params: query
    })
}

export function fetchGroupList(query) {
    return request({
        url: '/ncjtEntranceGuard/getGroupPageList',
        method: 'get',
        params: query
    })
}

export function checkGroups(query) {
    return request({
        url: '/ncjtEntranceGuard/getDeviceGroupById',
        method: 'post',
        params: query
    })
}

export function bindGroups(data) {
    return request({
        url: '/ncjtEntranceGuard/bindDeviceWithGroupIds',
        method: 'post',
        data
    })
}

export function deleteGroups(data) {
    return request({
        url: '/ncjtEntranceGuard/unbindDeviceWithGroupIds',
        method: 'post',
        data
    })
}

export function searchList(query) {
    return request({
        url: '/ncjtEntranceGuard/getDevicePageListByParams',
        method: 'post',
        params: query
    })
}
