From 7beb37c5170f93a33c059c72fac3233b82865481 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Sun, 04 Feb 2024 09:43:09 +0800
Subject: [PATCH] fix:修改成16位风向值

---
 src/components/Wind/Map.vue |   43 ++++++++++++++++---------------------------
 1 files changed, 16 insertions(+), 27 deletions(-)

diff --git a/src/components/Wind/Map.vue b/src/components/Wind/Map.vue
index 68813ac..d3a2760 100644
--- a/src/components/Wind/Map.vue
+++ b/src/components/Wind/Map.vue
@@ -554,6 +554,9 @@
     window.deviceDetail = this.deviceDetail
   },
   created () {
+    if (this.$store.state.orgId === 72) {
+      this.changeColor = 1
+    }
     const newLL = this.bd09togcj02(this.jingduNew, this.weiduNew) // ���������������������������������
     this.jingduNew = newLL[1]
     this.weiduNew = newLL[0]
@@ -1491,13 +1494,16 @@
       this.indexsLaber = 0
       this.clickmac = marker.inforData.mac
       this.childerItem = marker.inforData
+      console.log('this.defaultData', this.defaultData)
       this.defaultData.forEach(item => {
-        item.devices.forEach((dev, index) => {
-          if (dev.mac === marker.inforData.mac) {
-            this.farterItem = item
-            this.indexsLaber = index
-          }
-        })
+        if (item.devices) {
+          item.devices.forEach((dev, index) => {
+            if (dev.mac === marker.inforData.mac) {
+              this.farterItem = item
+              this.indexsLaber = index
+            }
+          })
+        }
       })
       this.$request({
         url: '/historyFiveMinutely/queryFiveDataByMac',
@@ -1543,32 +1549,15 @@
           console.log('level', level)
           if (deviceDetails.a01008) {
             var windDirs = dushu === '-' ? 0 : Number(dushu)
-            console.log('windDirs', windDirs)
+            WWindUtil.windValueFormat(windDirs)
+            console.log('windDirs', WWindUtil.windValueFormat(windDirs))
             windDeg = windDirs
             windTip = 'inline'
             if (windDirs === 0 || windDirs === '-') {
               windDir = '-'
               windTip = 'none'
-            } else if (windDirs > 0 && windDirs < 90) {
-              windDir = '���������'
-              windTip = 'inline'
-            } else if (windDirs === 90) {
-              windDir = '������'
-              windTip = 'inline'
-            } else if (windDirs > 90 && windDirs < 180) {
-              windDir = '���������'
-              windTip = 'inline'
-            } else if (windDirs === 180) {
-              windDir = '������'
-              windTip = 'inline'
-            } else if (windDirs > 180 && windDirs < 270) {
-              windDir = '���������'
-              windTip = 'inline'
-            } else if (windDirs === 270) {
-              windDir = '������'
-              windTip = 'inline'
-            } else if (windDirs > 270 && windDirs < 360) {
-              windDir = '���������'
+            } else {
+              windDir = WWindUtil.windValueFormat(windDirs)
               windTip = 'inline'
             }
           }

--
Gitblit v1.8.0