From 8f5812335a83c80b857304a527e315ef476191ab Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Mon, 4 Mar 2024 20:48:03 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix=20:=20=E7=BB=86=E8=8A=82=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/content/usedEle/UsedEle.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/content/usedEle/UsedEle.vue b/src/components/content/usedEle/UsedEle.vue index 0d69659..998821f 100644 --- a/src/components/content/usedEle/UsedEle.vue +++ b/src/components/content/usedEle/UsedEle.vue @@ -118,9 +118,11 @@ watch(() => props.eleData, (now) => { if (now) { let fanObj = {} now.frequencyChangerList.forEach(item => { - fanObj = { - value: item.equipmentId, - label: changeNum(item.equipmentId) + if (item.equipmentId === 22 || item.equipmentId === 23) { + fanObj = { + value: item.equipmentId, + label: changeNum(item.equipmentId) + } } fanList.value.push(fanObj) }) From c242691a6585be49e3a6495ba522b197eae0575c Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Mon, 4 Mar 2024 22:48:09 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix=20:=20=E9=A3=8E=E5=8E=8B=E7=BB=86?= =?UTF-8?q?=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/content/windPressure/WindPressureList.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/content/windPressure/WindPressureList.vue b/src/components/content/windPressure/WindPressureList.vue index ea62c89..d248325 100644 --- a/src/components/content/windPressure/WindPressureList.vue +++ b/src/components/content/windPressure/WindPressureList.vue @@ -140,6 +140,9 @@ const getScreenInfo = (now) => { } windPressureArr.push(windPressureObj) }) + if(windPressureArr.map(item=>item.equipmentName).includes('10号风压')){ + windPressureArr.push(windPressureArr.shift()) + } wpList.value = windPressureArr } /** From 204d6873361575018e508ba143e6ef9098cc747e Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Tue, 5 Mar 2024 21:47:53 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix=20:=20=E4=BF=AE=E5=A4=8D=E6=95=B0?= =?UTF-8?q?=E6=8D=AEloading=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/content/airInfo/AirInfo.vue | 53 +++++++++++++--------- src/components/content/usedEle/UsedEle.vue | 19 ++++++-- src/views/device-manage/index.vue | 8 +++- src/views/edit/edit.vue | 8 +++- src/views/site/index.vue | 40 ++++++++++------ src/views/tunnel-manage/index.vue | 8 +++- src/views/tunnel/index.vue | 12 +++-- src/views/user/index.vue | 8 +++- 8 files changed, 109 insertions(+), 47 deletions(-) diff --git a/src/components/content/airInfo/AirInfo.vue b/src/components/content/airInfo/AirInfo.vue index 3caf2d5..735d14a 100644 --- a/src/components/content/airInfo/AirInfo.vue +++ b/src/components/content/airInfo/AirInfo.vue @@ -4,11 +4,11 @@
-
+
风速{{ windSpeed }}m/s
-
+
风向{{ windDirection }} °
@@ -64,10 +64,12 @@ const props = defineProps({ const chooseDayRef = ref(); const chooseMonthRef = ref(); const windSpeed = ref(0) -const windDirection = ref(0) +const windDirection = ref(null) const loadingText = ref('加载中...') const windSpeedId = ref(0) +const windSpeedType = ref(null) const windDirectionSpeedId = ref(0) +const windDirectionSpeedType = ref(null) const dialogTitle = ref('风速') const openDialogId = ref(0) const airList = ref([]) @@ -85,27 +87,34 @@ watch(() => props.list, (now) => { }) }, {deep: true}); watch(() => props.airData, (now) => { - if (now.sensorList.length !== 0) { - if (now.sensorList.length === 0) { - airList.value = [] - } else { - getAirInfo(now.sensorList) - } - } else { + if (now.sensorList.length === 0) { airList.value = [] - windSpeed.value = 0 + windSpeed.value = null + windDirection.value = null + } else { + getAirInfo(now.sensorList) } + // if (now.sensorList.length !== 0) { + // if (now.sensorList.length === 0) { + // airList.value = [] + // } else { + // getAirInfo(now.sensorList) + // } + // } else { + // airList.value = [] + // windSpeed.value = 0 + // } }, {deep: true}); const daySelect = (val) => { - getChartInfo(openDialogId.value, 'day',val) + getChartInfo(openDialogId.value, 'day', val) } const monthSelect = (val) => { - getChartInfo(openDialogId.value, 'month',val) + getChartInfo(openDialogId.value, 'month', val) } -const getChartInfo = (equipmentId, type = 'day',time='') => { +const getChartInfo = (equipmentId, type = 'day', time = '') => { isWindSpeedVisited.value = true showSpeedLoading.value = true - getEchartsInfo(equipmentId,time, type).then(res => { + getEchartsInfo(equipmentId, time, type).then(res => { if (res?.code === 1000) { showSpeedLoading.value = false nextTick(() => { @@ -121,11 +130,11 @@ const getChartInfo = (equipmentId, type = 'day',time='') => { } const handleOpenChart = (id, type) => { selectTimeButton.value = 2 - nextTick(()=>{ - if(chooseMonthRef.value){ + nextTick(() => { + if (chooseMonthRef.value) { chooseMonthRef.value.clearData() } - if(chooseDayRef.value){ + if (chooseDayRef.value) { chooseDayRef.value.clearData() } }) @@ -134,13 +143,13 @@ const handleOpenChart = (id, type) => { openDialogId.value = id.equipmentId getChartInfo(id.equipmentId, 'day') } else { - if (id === 11) { + if (id === "windDirection") { dialogTitle.value = '风向' } else { dialogTitle.value = '风速' } - openDialogId.value = id - getChartInfo(id, 'day') + openDialogId.value = type + getChartInfo(type, 'day') } } @@ -188,9 +197,11 @@ const getAirInfo = (now) => { airObj = changeData(item) airArr.push(airObj) } else if (item.equipmentType === "windSpeed") { + windSpeedType.value = item.equipmentType windSpeedId.value = item.equipmentId windSpeed.value = item.value } else if (item.equipmentType === "windDirection") { + windDirectionSpeedType.value = item.equipmentType windDirectionSpeedId.value = item.equipmentId windDirection.value = item.value } diff --git a/src/components/content/usedEle/UsedEle.vue b/src/components/content/usedEle/UsedEle.vue index 998821f..a853f9b 100644 --- a/src/components/content/usedEle/UsedEle.vue +++ b/src/components/content/usedEle/UsedEle.vue @@ -1,6 +1,10 @@