Pārlūkot izejas kodu

websocket bug修复

王通 1 gadu atpakaļ
vecāks
revīzija
f48045399c
1 mainītis faili ar 5 papildinājumiem un 4 dzēšanām
  1. 5 4
      src/views/forest.vue

+ 5 - 4
src/views/forest.vue

@@ -1220,8 +1220,7 @@ export default {
         this.getEventByEventType(this.getCurrentDataStr(), true);
         this.getEventByReportorOrder(this.getCurrentDataStr(), true);
         this.getExposureStage(this.getCurrentDataStr(), true);
-        this.$refs.bottomMenu.updateAlert();
-        this.$refs.up.play();
+
         // thes.$refs.up.pause();//停止播放音乐
       }
     },
@@ -1239,7 +1238,7 @@ export default {
             if (res.data.eventTypeXl == 510) {
               res.data.picturePath = "../assets/images/水压.png"
             }
-            if (res.data.eventStatusValue !== "forest_event_status_1") {
+            //if (res.data.eventStatusValue !== "forest_event_status_1") {
               //插入到第一条
               this.eventList.unshift(res.data)
               // 插入后删除最后一条 保证列表中为10条数据
@@ -1247,7 +1246,9 @@ export default {
                 this.eventList.splice(10, 1)
               // 将收到的数据在地图上添加
               this.getWebSocketEvent(res.data)
-            }
+            this.$refs.bottomMenu.updateAlert();
+            this.$refs.up.play();
+            //}
           }
         })
       }