+
@@ -2679,7 +2679,6 @@ export default {
data_id: item.cardId + '',
point_type: 'peoplePositionCzks',
label: item.realName
-
}
czksPerLoc.push(perLoc)
ry_drag.addEntity(perLoc)
@@ -2968,14 +2967,14 @@ export default {
_this.fwebsocket = new WebSocket(encodeURI(wsUrl))
_this.fwebsocket.onmessage = function(message) {
console.info('接收消息')
- const peopleList = JSON.parse(message.data).data.data
+ const peopleList = JSON.parse(message.data)
console.log(peopleList)
for (let i = 0; i < peopleList.length; i++) {
const item = peopleList[i]
if ((!item)) continue
// 将地图上剩余的点与最新的定位人员点进行对比 更新地图上已存在的点 新增地图上之前没有的点
const index = _this.onePerLocArr.findIndex(item1 => {
- return item1.id.toString() === item.id.toString()
+ return item1.id === item.id
})
const x = item.lon
const y = item.lat
@@ -2988,6 +2987,7 @@ export default {
} else {
const perLoc = {
id: item.id,
+ name: item.name,
x: x,
y: y,
icon_type: 'img4_0' + pointColor,
diff --git a/src/views/map/js/ry_dragentity.js b/src/views/map/js/ry_dragentity.js
index 3a65fbb..82c02e8 100644
--- a/src/views/map/js/ry_dragentity.js
+++ b/src/views/map/js/ry_dragentity.js
@@ -31,7 +31,7 @@ export default class DragEntity {
disableDepthTestDistance: Number.POSITIVE_INFINITY
},
label: {
- text: point.id,
+ text: point.name ? point.name : point.id,
font: '13px sans-serif',
pixelOffset: new Cesium.Cartesian2(0, -55),
showBackground: true,