diff --git a/src/api/iot/device/index.ts b/src/api/iot/device/index.ts
index 903874b7..9bc82c4f 100644
--- a/src/api/iot/device/index.ts
+++ b/src/api/iot/device/index.ts
@@ -35,6 +35,19 @@ export interface DeviceUpdateStatusVO {
status: number // 设备状态
}
+// IoT 设备数据 VO
+export interface DeviceDataVO {
+ deviceId: number // 设备编号
+ thinkModelFunctionId: number // 物模型编号
+ productKey: string // 产品标识
+ deviceName: string // 设备名称
+ identifier: string // 属性标识符
+ name: string // 属性名称
+ dataType: string // 数据类型
+ updateTime: Date // 更新时间
+ value: string // 最新值
+}
+
// 设备 API
export const DeviceApi = {
// 查询设备分页
@@ -70,5 +83,10 @@ export const DeviceApi = {
// 获取设备数量
getDeviceCount: async (productId: number) => {
return await request.get({ url: `/iot/device/count?productId=` + productId })
+ },
+
+ // 获取设备属性最新数据
+ getDevicePropertiesLatestData: async (params: any) => {
+ return await request.get({ url: `/iot/device/data/latest-data`, params })
}
}
diff --git a/src/api/iot/product/index.ts b/src/api/iot/product/index.ts
index 19c827cf..047dc716 100644
--- a/src/api/iot/product/index.ts
+++ b/src/api/iot/product/index.ts
@@ -23,6 +23,12 @@ export enum ValidateTypeEnum {
WEAK = 0, // 弱校验
NONE = 1 // 免校验
}
+// IOT 产品设备类型枚举类 0: 直连设备, 1: 网关子设备, 2: 网关设备
+export enum DeviceTypeEnum {
+ DEVICE = 0, // 直连设备
+ GATEWAY_SUB = 1, // 网关子设备
+ GATEWAY = 2 // 网关设备
+}
// IoT 产品 API
export const ProductApi = {
@@ -63,6 +69,6 @@ export const ProductApi = {
// 查询产品(精简)列表
getSimpleProductList() {
- return request.get({ url: '/iot/product/list-all-simple' })
+ return request.get({ url: '/iot/product/simple-list' })
}
}
diff --git a/src/views/iot/device/detail/DeviceDataDetail.vue b/src/views/iot/device/detail/DeviceDataDetail.vue
new file mode 100644
index 00000000..b4df6484
--- /dev/null
+++ b/src/views/iot/device/detail/DeviceDataDetail.vue
@@ -0,0 +1,28 @@
+
+
+
+
diff --git a/src/views/iot/device/detail/DeviceDetailsModel.vue b/src/views/iot/device/detail/DeviceDetailsModel.vue
new file mode 100644
index 00000000..40c1a89a
--- /dev/null
+++ b/src/views/iot/device/detail/DeviceDetailsModel.vue
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查看数据
+
+
+
+
+
+
+
+
+
+
+ 事件管理
+
+
+ 服务调用
+
+
+
+
+
diff --git a/src/views/iot/device/detail/index.vue b/src/views/iot/device/detail/index.vue
index 2db16bbc..be6eec79 100644
--- a/src/views/iot/device/detail/index.vue
+++ b/src/views/iot/device/detail/index.vue
@@ -11,17 +11,21 @@
-
-
+
+
+
+
+
\ No newline at end of file
+