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 @@ + + + + + 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? '是' : '否' }}