From c255963b3140859c3d390a00f9af123518e32d90 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 18 Jun 2025 21:31:18 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E3=80=90IoT=20=E7=89=A9=E8=81=94?= =?UTF-8?q?=E7=BD=91=E3=80=91=E8=B0=83=E6=95=B4=E2=80=9C=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=EF=BC=88=E8=BF=90=E8=A1=8C=E7=8A=B6=E6=80=81?= =?UTF-8?q?=EF=BC=89=E2=80=9D=E7=9A=84=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/iot/device/device/index.ts | 14 +++--- .../DeviceDetailsThingModelProperty.vue | 50 ++++++++----------- 2 files changed, 28 insertions(+), 36 deletions(-) diff --git a/src/api/iot/device/device/index.ts b/src/api/iot/device/device/index.ts index cb145bc43..daf6ead1c 100644 --- a/src/api/iot/device/device/index.ts +++ b/src/api/iot/device/device/index.ts @@ -30,17 +30,15 @@ export interface DeviceVO { groupIds?: number[] // 添加分组 ID } -// IoT 设备数据 VO -export interface DeviceDataVO { - deviceId: number // 设备编号 - thinkModelFunctionId: number // 物模型编号 - productKey: string // 产品标识 - deviceName: string // 设备名称 +// IoT 设备属性详细 VO +export interface IotDevicePropertyDetailRespVO { identifier: string // 属性标识符 + value: string // 最新值 + updateTime: Date // 更新时间 name: string // 属性名称 dataType: string // 数据类型 - updateTime: Date // 更新时间 - value: string // 最新值 + dataSpecs: any // 数据定义 + dataSpecsList: any[] // 数据定义列表 } // IoT 设备数据 VO diff --git a/src/views/iot/device/device/detail/DeviceDetailsThingModelProperty.vue b/src/views/iot/device/device/detail/DeviceDetailsThingModelProperty.vue index 3525899c5..1ffa6fcf8 100644 --- a/src/views/iot/device/device/detail/DeviceDetailsThingModelProperty.vue +++ b/src/views/iot/device/device/detail/DeviceDetailsThingModelProperty.vue @@ -50,7 +50,7 @@ -
{{ - item.property?.name || item.name - }}
+
{{ item.name }}
- {{ item.property?.identifier || item.identifier }} + {{ item.identifier }}
- {{ item.property?.dataType || item.dataType }} + {{ item.dataType }}
@@ -107,7 +105,7 @@
更新时间 - {{ dateFormatter(null, null, item.updateTime) }} + {{ item.updateTime ? formatDate(item.updateTime) : '-' }}
@@ -119,9 +117,9 @@ - - - + + + @@ -149,15 +143,15 @@