浏览代码

新上报websocket不显示

qinhouyu 2 年之前
父节点
当前提交
54126d7786
共有 1 个文件被更改,包括 11 次插入9 次删除
  1. 11 9
      src/views/forest.vue

+ 11 - 9
src/views/forest.vue

@@ -1205,16 +1205,18 @@ export default {
       if (data.tag == "eventPush" && that.markersList.filter(item => data.eventCode == item.parameter).length == 0) {
         getEventPush({ eventCode: data.eventCode }).then((res) => {
           if (res.data != undefined) {
-            if(res.data.eventType == 403){
-              res.data.picturePath = "../assets/images/土壤墒情监测.png"
+            if (res.data.eventStatusValue !== "forest_event_status_1") {
+              if (res.data.eventType == 403) {
+                res.data.picturePath = "../assets/images/土壤墒情监测.png"
+              }
+              //插入到第一条
+              this.eventList.unshift(res.data)
+              // 插入后删除最后一条 保证列表中为10条数据
+              if (this.eventList.length > 9)
+                this.eventList.splice(10, 1)
+              // 将收到的数据在地图上添加
+              this.getWebSocketEvent(res.data)
             }
-            //插入到第一条
-            this.eventList.unshift(res.data)
-            // 插入后删除最后一条 保证列表中为10条数据
-            if (this.eventList.length > 9)
-              this.eventList.splice(10, 1)
-            // 将收到的数据在地图上添加
-            this.getWebSocketEvent(res.data)
           }
         })
       }