diff --git a/src/api/product.ts b/src/api/product.ts
index c71d190..5c51f22 100644
--- a/src/api/product.ts
+++ b/src/api/product.ts
@@ -47,7 +47,7 @@ export function queryProductListAll(data: ProductRecord) {
}
// 查看详情
-export function queryProductDetail(id: number) {
+export function queryProductDetail(id: number | undefined) {
return axios.get(`/api/rest/product/${id}`);
}
diff --git a/src/router/routes/modules/iot.ts b/src/router/routes/modules/iot.ts
index 698c191..bc65654 100644
--- a/src/router/routes/modules/iot.ts
+++ b/src/router/routes/modules/iot.ts
@@ -34,7 +34,18 @@ const IOT: AppRouteRecordRaw = {
requiresAuth: true,
permissions: ['*'],
},
- }
+ },
+ {
+ path: 'product/:id',
+ name: 'productDetail',
+ component: () => import('@/views/iot/product/components/product-detail.vue'),
+ meta: {
+ title: '产品详情',
+ requiresAuth: true,
+ showInMenu: false,
+ permissions: ['*'],
+ },
+ },
],
};
diff --git a/src/views/iot/device/components/device-detail.vue b/src/views/iot/device/components/device-detail.vue
new file mode 100644
index 0000000..4d47e58
--- /dev/null
+++ b/src/views/iot/device/components/device-detail.vue
@@ -0,0 +1,70 @@
+
+
+
+ 详情
+
+
+
+ 设备详情
+
+ {{formData.productId}}
+ {{formData.hardwareVersion}}
+ {{formData.firmwareVersion}}
+ {{formData.extendParams}}
+
+
+
+
+ 确定
+
+
+
+
+
+
+
diff --git a/src/views/iot/device/index.vue b/src/views/iot/device/index.vue
index 490266c..29470e9 100644
--- a/src/views/iot/device/index.vue
+++ b/src/views/iot/device/index.vue
@@ -162,16 +162,17 @@
{{ record.online == true? '是' : '否' }}
-
-
- 详情
-
+
+
+
+
+
+
+
+
+
+
+
{
return {
diff --git a/src/views/iot/product/components/product-detail.vue b/src/views/iot/product/components/product-detail.vue
new file mode 100644
index 0000000..e16d117
--- /dev/null
+++ b/src/views/iot/product/components/product-detail.vue
@@ -0,0 +1,135 @@
+
+
+
+
+
+
+ {{renderData.name}}
+ {{renderData.productType}}
+ {{renderData.model}}
+ {{renderData.link}}
+ {{renderData.remark}}
+ {{dayjs(renderData.createTime).format('YYYY-MM-DD HH:mm:ss')}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/iot/product/index.vue b/src/views/iot/product/index.vue
index 7312327..431fbcb 100644
--- a/src/views/iot/product/index.vue
+++ b/src/views/iot/product/index.vue
@@ -173,6 +173,7 @@
详情