人员轨迹
parent
01edc5f766
commit
6dbd709ab0
|
@ -1116,6 +1116,7 @@ export default {
|
|||
},
|
||||
subscription: {
|
||||
// '+'是通配符
|
||||
// topic: '+/+/+/alarm',
|
||||
topic: '+/UwbBQ/+/prop',
|
||||
qos: 0
|
||||
},
|
||||
|
@ -1143,7 +1144,8 @@ export default {
|
|||
vmport: '7010',
|
||||
linkPort: '8093',
|
||||
VIIDPort: '8088'
|
||||
}
|
||||
},
|
||||
trajectoryEntityCollection: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -1466,6 +1468,50 @@ export default {
|
|||
}
|
||||
// var cartesian = this.getCatesian3FromPX(movement.position)
|
||||
}, Cesium.ScreenSpaceEventType.LEFT_CLICK)
|
||||
this.handler.setInputAction(movement => {
|
||||
const pick = viewer.scene.pick(movement.position)
|
||||
if (Cesium.defined(pick) && (pick.id.id)) {
|
||||
if (!pick.id._monitoItems) {
|
||||
this.removeTrajectory()
|
||||
return
|
||||
}
|
||||
const point_type = pick.id._monitoItems.data.point_type
|
||||
const point_id = pick.id._monitoItems.data.id
|
||||
const corpInfoId = pick.id._monitoItems.data.corpInfoId
|
||||
if (point_type === '标记点peoplePositionOne') {
|
||||
this.addTrajectory(point_id, corpInfoId)
|
||||
}
|
||||
} else {
|
||||
this.removeTrajectory()
|
||||
}
|
||||
}, Cesium.ScreenSpaceEventType.RIGHT_CLICK)
|
||||
},
|
||||
addTrajectory(point_id, corpInfoId) {
|
||||
requestFN(
|
||||
'/map/getPersonTrace',
|
||||
{
|
||||
id: point_id,
|
||||
corpId: corpInfoId
|
||||
}
|
||||
).then((data) => {
|
||||
console.log(data.list)
|
||||
const positions = []
|
||||
for (let i = 0; i < data.list.length; i++) {
|
||||
positions.push(Cesium.Cartesian3.fromDegrees(data.list[i].XAxis, data.list[i].YAxis))
|
||||
}
|
||||
const entity = new Cesium.Entity({
|
||||
id: 'trajectory',
|
||||
polyline: { positions, width: 5.0, material: Cesium.Color.RED }
|
||||
})
|
||||
const collection = new Cesium.CustomDataSource('trajectoryEntityCollection')
|
||||
collection.entities.add(entity)
|
||||
viewer.dataSources.add(collection)
|
||||
this.trajectoryEntityCollection = collection
|
||||
})
|
||||
},
|
||||
removeTrajectory() {
|
||||
viewer.dataSources.remove(this.trajectoryEntityCollection)
|
||||
this.trajectoryEntityCollection = {}
|
||||
},
|
||||
|
||||
getCatesian3FromPX: function(px) {
|
||||
|
@ -1820,6 +1866,7 @@ export default {
|
|||
this.destroyConnection()
|
||||
this.clearAllBottomOptionsItemsCheck()
|
||||
this.clearAllBottomOptionsItemsEntityCollection()
|
||||
this.removeTrajectory()
|
||||
this.onePerLocArr = []
|
||||
this.perLocArr = []
|
||||
this.clearMqttPoint()
|
||||
|
@ -1864,6 +1911,7 @@ export default {
|
|||
this.addBranchPoint()
|
||||
this.clearAllBottomOptionsItemsCheck()
|
||||
this.clearAllBottomOptionsItemsEntityCollection()
|
||||
this.removeTrajectory()
|
||||
},
|
||||
bottomOptionsClick(index) {
|
||||
if (this.bottomClickDisable) return
|
||||
|
@ -1938,6 +1986,7 @@ export default {
|
|||
} else if (this.CORP_INFO_ID) {
|
||||
this.CORP_INFO_ID = ''
|
||||
this.clearAllBottomOptionsItemsEntityCollection()
|
||||
this.removeTrajectory()
|
||||
this.dragAreaEntity(this.branchPoint)
|
||||
this.toCenter(this.parentCenter)
|
||||
this.destroyConnection()
|
||||
|
@ -2010,7 +2059,7 @@ export default {
|
|||
}
|
||||
if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '035958e685cf4850bc40151c5e0617a6' && urlType === 'peoplePosition') {
|
||||
this.doUnSubscribe()
|
||||
this.clearMqttPoint('1698584148364034050/UwbBQ/')
|
||||
this.clearMqttPoint('+/UwbBQ/')
|
||||
}
|
||||
this.bottomOptionsList[pindex].list[index].check = false
|
||||
if (this.gangkouActive === '00004') {
|
||||
|
|
Loading…
Reference in New Issue