import request from '@/utils/request'

// 查询列表
export function listSideband(query) {
    return request({
        url: '/bracelet/sideband/list',
        method: 'get',
        params: query
    })
}

// 查询杆塔绑定列表
export function listDevice(query) {
    return request({
        url: '/bracelet/sideband/listDevice',
        method: 'get',
        params: query
    })
}

//查询未绑定杆塔列表
export function listDeviceNoBind(query) {
    return request({
        url: '/bracelet/sideband/listDeviceNoBind',
        method: 'get',
        params: query
    })
}

// 新增
export function addSideband(data) {
    return request({
        url: '/bracelet/sideband/addSideband',
        method: 'post',
        data: data
    })
}

// 编辑
export function editSideband(data) {
    return request({
        url: '/bracelet/sideband/editSideband',
        method: 'post',
        data: data
    })
}

// 详情
export function getSidebandInfo(sidebandId) {
    return request({
        url: '/bracelet/sideband/' + sidebandId,
        method: 'get'
      })
}

// 删除
export function delSideband(data) {
    return request({
        url: '/bracelet/sideband/delSideband',
        method: 'post',
        data: data
    })
}

// 解除绑定
export function delDevice(data) {
    return request({
        url: '/bracelet/sideband/delDevice',
        method: 'post',
        data: data
    })
}

//绑定
export function bindDevice(data) {
    return request({
        url: '/bracelet/sideband/bindDevice',
        method: 'post',
        data:data
    })
}

// 导出
export function exportPerson(query) {
    return request({
        url: '/bracelet/export/exportPerson',
        method: 'get',
        responseType: 'blob',
        params: query
    })
}




