diff --git a/apps/web-antd/src/api/iot/device/device/index.ts b/apps/web-antd/src/api/iot/device/device/index.ts index 650fe0875..7bd59886f 100644 --- a/apps/web-antd/src/api/iot/device/device/index.ts +++ b/apps/web-antd/src/api/iot/device/device/index.ts @@ -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 @haohao:packages/constants/src/biz-iot-enum.ts 枚举; export enum DeviceStateEnum { INACTIVE = 0, // 未激活 OFFLINE = 2, // 离线 diff --git a/apps/web-antd/src/api/iot/product/product/index.ts b/apps/web-antd/src/api/iot/product/product/index.ts index 71bc3ade3..28b2f7b2e 100644 --- a/apps/web-antd/src/api/iot/product/product/index.ts +++ b/apps/web-antd/src/api/iot/product/product/index.ts @@ -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 @haohao:packages/constants/src/biz-iot-enum.ts 枚举; + /** IOT 产品设备类型枚举类 */ export enum DeviceTypeEnum { DEVICE = 0, // 直连设备 diff --git a/apps/web-antd/src/views/iot/device/device/index.vue b/apps/web-antd/src/views/iot/device/device/index.vue index 659f6b98d..83e79c0a3 100644 --- a/apps/web-antd/src/views/iot/device/device/index.vue +++ b/apps/web-antd/src/views/iot/device/device/index.vue @@ -48,6 +48,7 @@ const viewMode = ref<'card' | 'list'>('card'); const cardViewRef = ref(); // Modal instances +// TODO @haohao:这个界面,等 product 改完,在一起看看怎么弄更好。 const [DeviceFormModal, deviceFormModalApi] = useVbenModal({ connectedComponent: DeviceForm, destroyOnClose: true, diff --git a/packages/constants/src/biz-iot-enum.ts b/packages/constants/src/biz-iot-enum.ts new file mode 100644 index 000000000..a43d9c6b0 --- /dev/null +++ b/packages/constants/src/biz-iot-enum.ts @@ -0,0 +1 @@ +// TODO @haohao:枚举可以放到这里; \ No newline at end of file diff --git a/packages/constants/src/index.ts b/packages/constants/src/index.ts index 0514c480c..311c86d65 100644 --- a/packages/constants/src/index.ts +++ b/packages/constants/src/index.ts @@ -2,6 +2,7 @@ export * from './biz-ai-enum'; export * from './biz-bpm-enum'; export * from './biz-erp-enum'; export * from './biz-infra-enum'; +export * from './biz-iot-enum'; export * from './biz-mall-enum'; export * from './biz-mp-enum'; export * from './biz-pay-enum';