From 407898dcc48aff3d4158a01b4842ce2138aa9a71 Mon Sep 17 00:00:00 2001 From: dengj <209192278@qq.com> Date: Mon, 11 Dec 2023 10:59:44 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20=E5=8F=B3=E4=BE=A7?= =?UTF-8?q?=E9=BC=A0=E6=A0=87=E7=BB=8F=E8=BF=87=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/content/airInfo/AirInfo.vue | 32 +++++++++++---- .../content/airInfo/childComps/ItemInfo.vue | 25 ++++++++---- .../content/badGasInfo/BadGasInfo.vue | 39 +++++++++++-------- .../content/windPressure/WindPressureList.vue | 9 +++-- .../childComps/WindPressureItem.vue | 30 ++++++++++---- src/views/tunnel/index.vue | 2 +- 6 files changed, 94 insertions(+), 43 deletions(-) diff --git a/src/components/content/airInfo/AirInfo.vue b/src/components/content/airInfo/AirInfo.vue index 2a9ad95..5772f7e 100644 --- a/src/components/content/airInfo/AirInfo.vue +++ b/src/components/content/airInfo/AirInfo.vue @@ -38,6 +38,9 @@ import {ref, reactive} from "vue"; import ItemInfo from "./childComps/ItemInfo.vue"; +const props = defineProps({ + list: Array +}); const info = reactive({ windPId: 0, //编号 max: 120, //最大值 @@ -62,12 +65,17 @@ const info3 = reactive({ value: 80, //测量值 point: 88, //阈值 }); -setInterval(() => { - info.value = parseInt(Math.random() * 10) * 10; - info1.value = parseInt(Math.random() * 10) * 10; - info2.value = parseInt(Math.random() * 10) * 10; - info3.value = parseInt(Math.random() * 10) * 10; -}, 2000); +watch(() => props.list, (now, old) => { + console.log('传感器 ', now, old) + // wpList.value=now +}, {deep: true}); +// setInterval(() => { +// info.value = parseInt(Math.random() * 10) * 10; +// info1.value = parseInt(Math.random() * 10) * 10; +// info2.value = parseInt(Math.random() * 10) * 10; +// info3.value = parseInt(Math.random() * 10) * 10; +// }, 2000); + diff --git a/src/components/content/windPressure/childComps/WindPressureItem.vue b/src/components/content/windPressure/childComps/WindPressureItem.vue index afa41a4..e69dc24 100644 --- a/src/components/content/windPressure/childComps/WindPressureItem.vue +++ b/src/components/content/windPressure/childComps/WindPressureItem.vue @@ -1,9 +1,8 @@