From 99b24c107cf5e78d4167a446a5f74161cb576d56 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 14 Dec 2024 20:44:58 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E3=80=91IoT=EF=BC=9A=E8=AE=BE=E5=A4=87=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=A2=9E=E5=8A=A0=E8=AE=BE=E5=A4=87=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=9E=9A=E4=B8=BE=E5=8F=8A=E7=8A=B6=E6=80=81=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/iot/device/index.ts | 8 +++++ src/views/iot/device/device/index.vue | 47 ++++++++++++++++++++++----- 2 files changed, 47 insertions(+), 8 deletions(-) diff --git a/src/api/iot/device/index.ts b/src/api/iot/device/index.ts index a483484d..c618bb19 100644 --- a/src/api/iot/device/index.ts +++ b/src/api/iot/device/index.ts @@ -55,6 +55,14 @@ export interface DeviceHistoryDataVO { data: string // 数据 } +// IoT 设备状态枚举 +export enum DeviceStatusEnum { + INACTIVE = 0, // 未激活 + ONLINE = 1, // 在线 + OFFLINE = 2, // 离线 + DISABLED = 3 // 已禁用 +} + // 设备 API export const DeviceApi = { // 查询设备分页 diff --git a/src/views/iot/device/device/index.vue b/src/views/iot/device/device/index.vue index bcc2df21..f4a3702f 100644 --- a/src/views/iot/device/device/index.vue +++ b/src/views/iot/device/device/index.vue @@ -150,14 +150,45 @@