Files
app-govern/common/api/device.js

60 lines
1.1 KiB
JavaScript
Raw Normal View History

2023-07-06 14:24:03 +08:00
import request from '../js/request'
import config from '../js/config'
2023-04-04 08:47:19 +08:00
2023-05-24 08:58:48 +08:00
// 获取设备
2023-04-04 08:47:19 +08:00
export function getDeviceList(params) {
return request({
2023-07-03 20:29:24 +08:00
url: '/cs-device-boot/EquipmentDelivery/queryEquipmentByProject',
2023-04-04 08:47:19 +08:00
method: 'post',
data: params,
2023-07-06 14:24:03 +08:00
})
}
/**
* 设备统计
* @param {*} id 工程id
* @returns
*/
export function getDevCount(id) {
return request({
url: '/cs-device-boot/deviceUser/devCount',
method: 'post',
data: { id },
})
2023-04-04 08:47:19 +08:00
}
2023-07-10 20:20:00 +08:00
// 获取直连设备模板信息
export function getModel(nDid) {
return request({
url: '/access-boot/device/model',
method: 'post',
data: {
nDid
},
})
}
// 直连设备接入
export function addDevice(params) {
return request({
url: '/access-boot/device/access',
method: 'post',
header: {
'Content-Type': 'application/json',
},
data: params,
})
}
// 直连设备注册
export function registerDevice(nDid) {
return request({
url: '/access-boot/device/register',
method: 'post',
data: {
nDid
},
})
}