From a37c168efe4393b463bda5dd8b57cb6a14b10192 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 29 Jun 2025 22:00:20 +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=E9=87=8D=E6=9E=84=E8=AE=BE=E5=A4=87=E6=A8=A1?= =?UTF-8?q?=E6=8B=9F=E5=99=A8=EF=BC=8C=E4=BC=98=E5=8C=96=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E5=92=8C=E4=BA=8B=E4=BB=B6=E4=B8=8A=E6=8A=A5=E9=80=BB=E8=BE=91?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=BC=BA=E7=94=A8=E6=88=B7=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E4=BD=93=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/iot/thingmodel/index.ts | 8 - .../device/detail/DeviceDetailsSimulator.vue | 473 +++++++++++------- src/views/iot/device/device/detail/index.vue | 1 + 3 files changed, 283 insertions(+), 199 deletions(-) diff --git a/src/api/iot/thingmodel/index.ts b/src/api/iot/thingmodel/index.ts index 544227f2e..2ad37caed 100644 --- a/src/api/iot/thingmodel/index.ts +++ b/src/api/iot/thingmodel/index.ts @@ -18,14 +18,6 @@ export interface ThingModelData { service?: ThingModelService // 服务 } -/** - * IoT 模拟设备 - */ -// TODO @super:和 ThingModelSimulatorData 会不会好点 -export interface SimulatorData extends ThingModelData { - simulateValue?: string | number // 用于存储模拟值 TODO @super:字段使用 value 会不会好点 -} - /** * ThingModelProperty 类型 */ diff --git a/src/views/iot/device/device/detail/DeviceDetailsSimulator.vue b/src/views/iot/device/device/detail/DeviceDetailsSimulator.vue index 8d6a369b3..599de70d1 100644 --- a/src/views/iot/device/device/detail/DeviceDetailsSimulator.vue +++ b/src/views/iot/device/device/detail/DeviceDetailsSimulator.vue @@ -6,75 +6,109 @@ - - + + - + - - - - - - - + + + + - + - - + - -
- 发送 +
+ + 设置属性值后,点击「发送属性上报」按钮 + + 发送属性上报
- - + - - - +
@@ -90,39 +124,106 @@ - - - + + - + - +
+ + 设置属性值后,点击「发送属性设置」按钮 + + 发送属性设置 +
- - + - + + + + + + + + + + + + +
@@ -142,119 +243,60 @@ diff --git a/src/views/iot/device/device/detail/index.vue b/src/views/iot/device/device/detail/index.vue index 3fa835e06..3ec756b5c 100644 --- a/src/views/iot/device/device/detail/index.vue +++ b/src/views/iot/device/device/detail/index.vue @@ -26,6 +26,7 @@ v-if="activeTab === 'simulator'" :product="product" :device="device" + :thing-model-list="thingModelList" />