Merge branch 'feature/iot' of https://gitee.com/alwayssuper/yudao-ui-admin-vue3 into feature/iot
# Conflicts: # pnpm-lock.yaml
This commit is contained in:
@ -63,6 +63,16 @@ export enum DeviceStatusEnum {
|
||||
DISABLED = 3 // 已禁用
|
||||
}
|
||||
|
||||
// IoT 模拟设备数据
|
||||
export interface SimulatorDataVO {
|
||||
productKey: string
|
||||
deviceKey: string
|
||||
type: string
|
||||
subType: string
|
||||
reportTime: number // 时间戳
|
||||
content: string // 存储 JSON 字符串
|
||||
}
|
||||
|
||||
// 设备 API
|
||||
export const DeviceApi = {
|
||||
// 查询设备分页
|
||||
@ -136,5 +146,14 @@ export const DeviceApi = {
|
||||
// 获取导入模板
|
||||
importDeviceTemplate: async () => {
|
||||
return await request.download({ url: `/iot/device/get-import-template` })
|
||||
},
|
||||
|
||||
// 模拟设备
|
||||
simulatorDevice: async (data: SimulatorDataVO) => {
|
||||
return await request.post({ url: `/iot/device/data/simulator`, data })
|
||||
},
|
||||
//查询设备日志分页
|
||||
getDeviceLogPage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/device/data/log/page`, params })
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,6 +17,13 @@ export interface ThingModelData {
|
||||
service?: ThingModelService // 服务
|
||||
}
|
||||
|
||||
/**
|
||||
* IoT 模拟设备
|
||||
*/
|
||||
export interface SimulatorData extends ThingModelData {
|
||||
simulateValue?: string | number // 用于存储模拟值
|
||||
}
|
||||
|
||||
/**
|
||||
* ThingModelProperty 类型
|
||||
*/
|
||||
@ -45,6 +52,11 @@ export const ThingModelApi = {
|
||||
return await request.get({ url: `/iot/thing-model/page`, params })
|
||||
},
|
||||
|
||||
// 获得产品物模型列表
|
||||
getThingModelList: async (params: any) => {
|
||||
return await request.get({ url: `/iot/thing-model/list`, params })
|
||||
},
|
||||
|
||||
// 获得产品物模型
|
||||
getThingModelListByProductId: async (params: any) => {
|
||||
return await request.get({
|
||||
|
||||
Reference in New Issue
Block a user