Commit e255598a authored by xinzhedeai's avatar xinzhedeai

add:random update 经纬度

parent fc7ab78e
...@@ -52,19 +52,19 @@ export default { ...@@ -52,19 +52,19 @@ export default {
methods: { methods: {
createPersonModel() { createPersonModel() {
// 批次号管理(每次定时器触发时生成一个新的批次号) // 批次号管理(每次定时器触发时生成一个新的批次号)
// let currentBatch = 0; // var currentBatch = 0;
// const batchMap = {}; // const batchMap = {};
// if (!this.personModelInterval) { if (!this.personModelInterval) {
// this.personModelInterval = setInterval(() => { this.personModelInterval = setInterval(() => {
console.log("开始获取实时数据");
// currentBatch++; // 每次定时器触发,生成新的批次号 // currentBatch++; // 每次定时器触发,生成新的批次号
debugger;
if (this.bgEntities) { if (this.bgEntities) {
for (let key in this.bgEntities) { for (let key in this.bgEntities) {
if (isNaN(parseFloat(key))) { if (isNaN(parseFloat(key))) {
// 非数字键名的是人员实体 // 非数字键名的是人员实体
this.viewer.entities.remove(this.bgEntities[key]); this.viewer.entities.remove(this.bgEntities[key]);
delete m.bgEntities[key]; delete this.bgEntities[key];
} }
} }
} }
...@@ -123,13 +123,13 @@ export default { ...@@ -123,13 +123,13 @@ export default {
description: `<div><h4>${item.perName}${item.status}</h4></div>`, description: `<div><h4>${item.perName}${item.status}</h4></div>`,
fixedFrame: Cesium.Transforms.eastNorthUpToFixedFrame(position), fixedFrame: Cesium.Transforms.eastNorthUpToFixedFrame(position),
}); });
// entity.info = item; // 添加 info 属性 entity.info = item; // 添加 info 属性
// // entity.batch = currentBatch; // 标记当前批次 // entity.batch = currentBatch; // 标记当前批次
// this.bgEntities[item.perName] = entity; // 存储新实体 this.bgEntities[item.perName] = entity; // 存储新实体
} }
}); });
// }, 10000); // 每10秒刷新一次 }, 10000); // 每10秒刷新一次
// } }
}, },
personCardList(fn) { personCardList(fn) {
console.log("人员定位数据", this.personnelList); console.log("人员定位数据", this.personnelList);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment