review:【antd】【iot】设备管理(暂未彻底 review,等 product 搞完)

This commit is contained in:
YunaiV
2025-11-21 10:53:54 +08:00
parent 77afbe4d64
commit 543e48504b
5 changed files with 11 additions and 4 deletions

View File

@@ -3,7 +3,8 @@ import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace IotDeviceApi {
/** IoT 设备 VO */
// TODO @haohao需要跟后端对齐必要的 ReqVO、RespVO
/** 设备 */
export interface Device {
id?: number; // 设备 ID主键自增
deviceName: string; // 设备名称
@@ -48,7 +49,7 @@ export namespace IotDeviceApi {
dataSpecsList: any[]; // 数据定义列表
}
/** IoT 设备属性 VO */
/** 设备属性 VO */
export interface DeviceProperty {
identifier: string; // 属性标识符
value: string; // 最新值
@@ -62,7 +63,7 @@ export namespace IotDeviceApi {
password: string; // 密码
}
/** IoT 设备发送消息 Request VO */
/** 设备发送消息 Request VO */
export interface DeviceMessageSendReq {
deviceId: number; // 设备编号
method: string; // 请求方法
@@ -77,6 +78,7 @@ export namespace IotDeviceApi {
}
/** IoT 设备状态枚举 */
// TODO @haohaopackages/constants/src/biz-iot-enum.ts 枚举;
export enum DeviceStateEnum {
INACTIVE = 0, // 未激活
OFFLINE = 2, // 离线

View File

@@ -3,7 +3,7 @@ import type { PageParam, PageResult } from '@vben/request';
import { requestClient } from '#/api/request';
export namespace IotProductApi {
/** IoT 产品 VO */
/** 产品 */
export interface Product {
id?: number; // 产品编号
name: string; // 产品名称
@@ -27,6 +27,8 @@ export namespace IotProductApi {
}
}
// TODO @haohaopackages/constants/src/biz-iot-enum.ts 枚举;
/** IOT 产品设备类型枚举类 */
export enum DeviceTypeEnum {
DEVICE = 0, // 直连设备