From 67e58660ff0928fb56030093e736118bc3f0da50 Mon Sep 17 00:00:00 2001
From: Kven <2955163637@qq.com>
Date: Fri, 21 Feb 2025 21:48:34 +0800
Subject: [PATCH] =?UTF-8?q?feat(iot):=20=E8=AE=BE=E5=A4=87=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E5=A2=9E=E5=8A=A0=E6=89=80=E5=B1=9E=E4=BA=A7=E5=93=81?=
=?UTF-8?q?=E7=AD=9B=E9=80=89=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 在设备列表页面和设备卡片页面添加所属产品筛选条件
- 更新设备列表数据结构,增加所属产品字段- 修改设备卡片组件,显示所属产品信息
---
src/views/iot/device/index.vue | 23 +++++++
.../iot/deviceCard/components/card-wrap.vue | 6 +-
src/views/iot/deviceCard/index.vue | 60 +++++++------------
3 files changed, 46 insertions(+), 43 deletions(-)
diff --git a/src/views/iot/device/index.vue b/src/views/iot/device/index.vue
index 783fb4e..ec19e55 100644
--- a/src/views/iot/device/index.vue
+++ b/src/views/iot/device/index.vue
@@ -30,6 +30,16 @@
+
+
+
+
+
{
+ return [
+ {
+ label: '全部',
+ value: '',
+ },
+ ];
+ });
// 获取设备列表
const fetchData = async (params = { size: 10, current: 1 }) => {
diff --git a/src/views/iot/deviceCard/components/card-wrap.vue b/src/views/iot/deviceCard/components/card-wrap.vue
index af5310c..2f99997 100644
--- a/src/views/iot/deviceCard/components/card-wrap.vue
+++ b/src/views/iot/deviceCard/components/card-wrap.vue
@@ -14,8 +14,8 @@
-
- {{ createBy }}
+
+ {{ productName }}
{{ dayjs(createTime).format('YYYY-MM-DD HH:mm:ss') }}
@@ -68,7 +68,7 @@
type: Number,
default: -1,
},
- createBy: {
+ productName: {
type: String,
default: '',
},
diff --git a/src/views/iot/deviceCard/index.vue b/src/views/iot/deviceCard/index.vue
index 5db8ee9..cd41a18 100644
--- a/src/views/iot/deviceCard/index.vue
+++ b/src/views/iot/deviceCard/index.vue
@@ -30,6 +30,16 @@
+
+
+
+
+
@@ -94,25 +104,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
{
+ return [
+ {
+ label: '全部',
+ value: '',
+ },
+ ];
+ });
+
// 获取设备列表
const fetchData = async (params = { size: 10, current: 1 }) => {
@@ -207,26 +207,6 @@
formModel.value = generateFormModel();
};
- // // 打开详情
- // function openDetail(id:number): void{
- // const url = router.resolve({
- // name: 'deviceDetail',
- // params: {id}
- // }).href;
- // router.push(url);
- // }
-
- // // 删除
- // const handleDelete = async (id: number) => {
- // const res = await deleteDevice(id);
- // if (res.status === 200) {
- // Message.success({
- // content: '删除成功',
- // duration: 5 * 1000,
- // });
- // search();
- // }
- // };
onMounted(() => {
search();
});