From a79a381c595ee896ce65e46e14c4f4cafff1e8a3 Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Thu, 23 May 2024 10:58:42 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=20=E4=BF=AE=E5=A4=8D=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=BB=86=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/content/airInfo/AirInfo.vue | 6 +++--- .../content/windPressure/childComps/WindPressureItem.vue | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/content/airInfo/AirInfo.vue b/src/components/content/airInfo/AirInfo.vue index a748cc0..ce8e945 100644 --- a/src/components/content/airInfo/AirInfo.vue +++ b/src/components/content/airInfo/AirInfo.vue @@ -101,17 +101,17 @@ const clickMonth = ref('') const clickDay = ref('') watch(() => props.windSpeed, (now) => { now.forEach(newItem => { - windSpeed.value = newItem.value + windSpeed.value =parseFloat(newItem.value) }) }) watch(() => props.list, (now) => { airList.value?.forEach(item => { now.forEach(newItem => { if (newItem.equipmentId === 11) {//风向传感器 - windDirection.value = newItem.value + windDirection.value = parseFloat(newItem.value) } if (item.equipmentId === newItem.equipmentId) { - item.value = newItem.value + item.value = parseFloat(newItem.value) } }) }) diff --git a/src/components/content/windPressure/childComps/WindPressureItem.vue b/src/components/content/windPressure/childComps/WindPressureItem.vue index 15b7477..128cc58 100644 --- a/src/components/content/windPressure/childComps/WindPressureItem.vue +++ b/src/components/content/windPressure/childComps/WindPressureItem.vue @@ -31,7 +31,8 @@ onMounted(()=>{ setValue(); }); -watch(() => params.wp.value, () => { +watch(() => params.wp.value, (newVal) => { + params.wp.value=parseFloat(newVal) setValue(); });