diff --git a/src/api/iot/device/device/index.ts b/src/api/iot/device/device/index.ts index b489a04f..fae8100a 100644 --- a/src/api/iot/device/device/index.ts +++ b/src/api/iot/device/device/index.ts @@ -58,19 +58,20 @@ export interface DeviceHistoryDataVO { // IoT 设备状态枚举 export enum DeviceStatusEnum { INACTIVE = 0, // 未激活 - ONLINE = 1, // 在线 - OFFLINE = 2, // 离线 - DISABLED = 3 // 已禁用 + ONLINE = 1, // 在线 + OFFLINE = 2, // 离线 + DISABLED = 3 // 已禁用 } // IoT 模拟设备数据 +// TODO @super:DeviceSimulatorDataReqVO export interface SimulatorDataVO { productKey: string deviceKey: string type: string subType: string reportTime: number // 时间戳 - content: string // 存储 JSON 字符串 + content: string // 存储 JSON 字符串 } // 设备 API @@ -101,10 +102,7 @@ export const DeviceApi = { }, // 修改设备分组 - updateDeviceGroup: async (data: { - ids: number[] - groupIds: number[] - }) => { + updateDeviceGroup: async (data: { ids: number[]; groupIds: number[] }) => { return await request.put({ url: `/iot/device/update-group`, data }) }, @@ -150,10 +148,12 @@ export const DeviceApi = { // 模拟设备 simulatorDevice: async (data: SimulatorDataVO) => { + // TODO @super:/iot/device/simulator return await request.post({ url: `/iot/device/data/simulator`, data }) }, - //查询设备日志分页 + // 查询设备日志分页 getDeviceLogPage: async (params: any) => { + // TODO @super:/iot/log-page 或者 /iot/log/page return await request.get({ url: `/iot/device/data/log/page`, params }) } } diff --git a/src/api/iot/thingmodel/index.ts b/src/api/iot/thingmodel/index.ts index 0c3ccdb4..5deaaad5 100644 --- a/src/api/iot/thingmodel/index.ts +++ b/src/api/iot/thingmodel/index.ts @@ -20,8 +20,9 @@ export interface ThingModelData { /** * IoT 模拟设备 */ +// TODO @super:和 ThingModelSimulatorData 会不会好点 export interface SimulatorData extends ThingModelData { - simulateValue?: string | number // 用于存储模拟值 + simulateValue?: string | number // 用于存储模拟值 TODO @super:字段使用 value 会不会好点 } /** diff --git a/src/views/iot/device/device/detail/DeviceDetailsLog.vue b/src/views/iot/device/device/detail/DeviceDetailsLog.vue index e703ca4f..2ffcd5de 100644 --- a/src/views/iot/device/device/detail/DeviceDetailsLog.vue +++ b/src/views/iot/device/device/detail/DeviceDetailsLog.vue @@ -5,6 +5,7 @@ + @@ -48,7 +49,6 @@ diff --git a/src/views/iot/device/device/detail/index.vue b/src/views/iot/device/device/detail/index.vue index 8e342590..1c7e7c45 100644 --- a/src/views/iot/device/device/detail/index.vue +++ b/src/views/iot/device/device/detail/index.vue @@ -17,11 +17,16 @@ - + + - - + + @@ -34,6 +39,7 @@ import DeviceDetailsInfo from './DeviceDetailsInfo.vue' import DeviceDetailsModel from './DeviceDetailsModel.vue' import DeviceDetailsLog from './DeviceDetailsLog.vue' import DeviceDetailsSimulator from './DeviceDetailsSimulator.vue' + defineOptions({ name: 'IoTDeviceDetail' }) const route = useRoute()