import request from '@/utils/request' // 查询设备列表 export function listDevice(query) { return request({ url: '/bst/device/list', method: 'get', params: query }) } // 查询设备详细 export function getDevice(id, sn = null) { return request({ url: '/bst/device', method: 'get', params: {id, sn } }) } // 新增设备 export function addDevice(data) { return request({ url: '/bst/device', method: 'post', data: data }) } // 修改设备 export function updateDevice(data) { return request({ url: '/bst/device', method: 'put', data: data }) } // 删除设备 export function delDevice(id) { return request({ url: '/bst/device/' + id, method: 'delete' }) } // 设备入仓 export function inDevice(ids) { return request({ url: '/bst/device/in', method: 'put', data: ids }) } // 设备出仓 export function outDevice(ids) { return request({ url: '/bst/device/out', method: 'put', data: ids }) } // 设备禁用 export function disableDevice(ids) { return request({ url: '/bst/device/disable', method: 'put', data: ids }) } // 设备启用 export function enableDevice(ids) { return request({ url: '/bst/device/enable', method: 'put', data: ids }) } // 设备划拨运营区 export function transferDevice(data) { return request({ url: '/bst/device/transfer', method: 'put', data: data }) } // 设备解绑所属用户 export function unbindDeviceMch(ids) { return request({ url: '/bst/device/unbindMch', method: 'put', data: ids }) } // 设备解绑运营区 export function unbindDeviceArea(ids) { return request({ url: '/bst/device/unbindArea', method: 'put', data: ids }) } // 查询全部设备列表 export function listAllDevice(query) { return request({ url: '/bst/device/all', method: 'get', params: query }) }