From 93a0789e34280c3607a80c5ebfdb3da5894b5e97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=89=E6=B5=A9=E6=B5=A9?= <1036606149@qq.com> Date: Sun, 22 Sep 2024 15:42:20 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91=20IOT=20?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=AE=A1=E7=90=86=EF=BC=8C=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/iot/device/index.ts | 1 + src/router/modules/remaining.ts | 11 ++ .../iot/device/detail/DeviceDetailsHeader.vue | 114 ++++++++++++ .../iot/device/detail/DeviceDetailsInfo.vue | 175 ++++++++++++++++++ src/views/iot/device/detail/index.vue | 66 +++++++ src/views/iot/device/index.vue | 38 ++-- 6 files changed, 387 insertions(+), 18 deletions(-) create mode 100644 src/views/iot/device/detail/DeviceDetailsHeader.vue create mode 100644 src/views/iot/device/detail/DeviceDetailsInfo.vue create mode 100644 src/views/iot/device/detail/index.vue diff --git a/src/api/iot/device/index.ts b/src/api/iot/device/index.ts index 39a2e5a8..2a1951de 100644 --- a/src/api/iot/device/index.ts +++ b/src/api/iot/device/index.ts @@ -15,6 +15,7 @@ export interface DeviceVO { lastOnlineTime: Date // 最后上线时间 lastOfflineTime: Date // 最后离线时间 activeTime: Date // 设备激活时间 + createTime: Date // 创建时间 ip: string // 设备的 IP 地址 firmwareVersion: string // 设备的固件版本 deviceSecret: string // 设备密钥,用于设备认证,需安全存储 diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 4595d563..cba8359c 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -622,6 +622,17 @@ const remainingRouter: AppRouteRecordRaw[] = [ activeMenu: '/iot/product' }, component: () => import('@/views/iot/product/detail/index.vue') + }, + { + path: 'device/detail/:id', + name: 'IoTDeviceDetail', + meta: { + title: '设备详情', + noCache: true, + hidden: true, + activeMenu: '/iot/device' + }, + component: () => import('@/views/iot/device/detail/index.vue') } ] } diff --git a/src/views/iot/device/detail/DeviceDetailsHeader.vue b/src/views/iot/device/detail/DeviceDetailsHeader.vue new file mode 100644 index 00000000..cc585f4a --- /dev/null +++ b/src/views/iot/device/detail/DeviceDetailsHeader.vue @@ -0,0 +1,114 @@ + + diff --git a/src/views/iot/device/detail/DeviceDetailsInfo.vue b/src/views/iot/device/detail/DeviceDetailsInfo.vue new file mode 100644 index 00000000..2acbaabb --- /dev/null +++ b/src/views/iot/device/detail/DeviceDetailsInfo.vue @@ -0,0 +1,175 @@ + + diff --git a/src/views/iot/device/detail/index.vue b/src/views/iot/device/detail/index.vue new file mode 100644 index 00000000..2db16bbc --- /dev/null +++ b/src/views/iot/device/detail/index.vue @@ -0,0 +1,66 @@ + + diff --git a/src/views/iot/device/index.vue b/src/views/iot/device/index.vue index bb733250..566c78a6 100644 --- a/src/views/iot/device/index.vue +++ b/src/views/iot/device/index.vue @@ -96,7 +96,11 @@ - + + +