|
@@ -673,7 +673,6 @@ export default {
|
|
|
name: name
|
|
|
})
|
|
|
this.id++;
|
|
|
- console.log('this.viewer3D.entities :>> ', this.viewer3D.entities);
|
|
|
},
|
|
|
// 从鼠标点击事件获取坐标
|
|
|
getCoordinatesFromEvent(event) {
|
|
@@ -794,6 +793,13 @@ export default {
|
|
|
await axios
|
|
|
.post("/api/pos", {simulation_time: newTimeString+'.000'}).then(res=>{
|
|
|
console.log('res :>> ', res);
|
|
|
+ let data = res.data[1]
|
|
|
+ //依次更新每个模型位置
|
|
|
+ for(let i=0;i<this.nameIdList.length;i++){
|
|
|
+ if(data[this.nameIdList[i].name]!=null&&data[this.nameIdList[i].name]!=undefined){
|
|
|
+ this.modelEntityMoveByIDAndLocation(this.viewer2D,this.nameIdList[i].id,data[this.nameIdList[i].name].x,id,data[this.nameIdList[i].name].y,id,data[this.nameIdList[i].name].z)
|
|
|
+ }
|
|
|
+ }
|
|
|
//更新模型位置
|
|
|
// this.modelEntityMoveByIDAndLocation(this.viewer2D,"1654426964397658112",res.data[1].data.W1.x,res.data[1].data.W1.y,res.data[1].data.W1.z)
|
|
|
})
|
|
@@ -809,6 +815,13 @@ export default {
|
|
|
await axios
|
|
|
.post("/api/pos", {simulation_time: newTimeString+'.000'}).then(res=>{
|
|
|
console.log('res :>> ', res);
|
|
|
+ let data = res.data[1]
|
|
|
+ //依次更新每个模型位置
|
|
|
+ for(let i=0;i<this.nameIdList.length;i++){
|
|
|
+ if(data[this.nameIdList[i].name]!=null&&data[this.nameIdList[i].name]!=undefined){
|
|
|
+ this.modelEntityMoveByIDAndLocation(this.viewer3D,this.nameIdList[i].id,data[this.nameIdList[i].name].x,id,data[this.nameIdList[i].name].y,id,data[this.nameIdList[i].name].z)
|
|
|
+ }
|
|
|
+ }
|
|
|
//更新模型位置
|
|
|
// this.modelEntityMoveByIDAndLocation(this.viewer3D,viewer,"1654426964397658112",res.data[1].data.W1.x,res.data[1].data.W1.y,res.data[1].data.W1.z)
|
|
|
})
|