【新增功能】IOT:设备数据展示
This commit is contained in:
@ -35,6 +35,19 @@ export interface DeviceUpdateStatusVO {
|
||||
status: number // 设备状态
|
||||
}
|
||||
|
||||
// IoT 设备数据 VO
|
||||
export interface DeviceDataVO {
|
||||
deviceId: number // 设备编号
|
||||
thinkModelFunctionId: number // 物模型编号
|
||||
productKey: string // 产品标识
|
||||
deviceName: string // 设备名称
|
||||
identifier: string // 属性标识符
|
||||
name: string // 属性名称
|
||||
dataType: string // 数据类型
|
||||
updateTime: Date // 更新时间
|
||||
value: string // 最新值
|
||||
}
|
||||
|
||||
// 设备 API
|
||||
export const DeviceApi = {
|
||||
// 查询设备分页
|
||||
@ -70,5 +83,10 @@ export const DeviceApi = {
|
||||
// 获取设备数量
|
||||
getDeviceCount: async (productId: number) => {
|
||||
return await request.get({ url: `/iot/device/count?productId=` + productId })
|
||||
},
|
||||
|
||||
// 获取设备属性最新数据
|
||||
getDevicePropertiesLatestData: async (params: any) => {
|
||||
return await request.get({ url: `/iot/device/data/latest-data`, params })
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,6 +23,12 @@ export enum ValidateTypeEnum {
|
||||
WEAK = 0, // 弱校验
|
||||
NONE = 1 // 免校验
|
||||
}
|
||||
// IOT 产品设备类型枚举类 0: 直连设备, 1: 网关子设备, 2: 网关设备
|
||||
export enum DeviceTypeEnum {
|
||||
DEVICE = 0, // 直连设备
|
||||
GATEWAY_SUB = 1, // 网关子设备
|
||||
GATEWAY = 2 // 网关设备
|
||||
}
|
||||
|
||||
// IoT 产品 API
|
||||
export const ProductApi = {
|
||||
@ -63,6 +69,6 @@ export const ProductApi = {
|
||||
|
||||
// 查询产品(精简)列表
|
||||
getSimpleProductList() {
|
||||
return request.get({ url: '/iot/product/list-all-simple' })
|
||||
return request.get({ url: '/iot/product/simple-list' })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user