From 11fd98003aa9fb424b3d7af24d3a5971de8762e6 Mon Sep 17 00:00:00 2001 From: liujun Date: Fri, 1 Nov 2024 17:50:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E7=AB=AF=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/map/index.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/views/map/index.vue b/src/views/map/index.vue index fbe95de..7115566 100644 --- a/src/views/map/index.vue +++ b/src/views/map/index.vue @@ -1289,7 +1289,7 @@ export default { const collection = new Cesium.CustomDataSource('trajectoryEntityCollection') collection.entities.add(entity) viewer.dataSources.add(collection) - this.trajectoryEntityCollection = collection + this.trajectoryEntityCollection = Object.freeze(collection) } }) }, @@ -2450,8 +2450,8 @@ export default { const wsUrl = config.NoDwSysUrl + '/ltLocation/DW_' + new Date().getTime() + '_98' _this.fwebsocket = new WebSocket(encodeURI(wsUrl)) _this.fwebsocket.onmessage = function(message) { - console.info('接收消息') const peopleList = JSON.parse(message.data) + viewer.entities.suspendEvents() for (let i = 0; i < peopleList.length; i++) { const item = peopleList[i] if ((!item)) continue @@ -2484,6 +2484,7 @@ export default { _this.mqttPoint[_this.subscription.topic.substring(0, _this.subscription.topic.lastIndexOf('+')) + item.id] = item.id } } + viewer.entities.resumeEvents() } } },