|
|
|
@ -275,7 +275,11 @@ export default {
|
|
|
|
|
],
|
|
|
|
|
hfData: [],
|
|
|
|
|
equipmentData: [],
|
|
|
|
|
agvData: []
|
|
|
|
|
agvData: [],
|
|
|
|
|
siteData:{
|
|
|
|
|
x:250000,
|
|
|
|
|
y:200000
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
@ -292,8 +296,8 @@ export default {
|
|
|
|
|
e.Data.forEach(v => {
|
|
|
|
|
agvArr.push({
|
|
|
|
|
id: v.AgvId,
|
|
|
|
|
x: Math.random(),
|
|
|
|
|
y: Math.random(),
|
|
|
|
|
x: Math.random() || v.X/this.siteData.x,
|
|
|
|
|
y: Math.random() || v.Y/this.siteData.y,
|
|
|
|
|
rotate: v.Angle,
|
|
|
|
|
isGoods: false,
|
|
|
|
|
})
|
|
|
|
@ -305,12 +309,12 @@ export default {
|
|
|
|
|
getAgvData().then(e => {
|
|
|
|
|
e.Data.forEach(v => {
|
|
|
|
|
if(this.agvData.filter(r=>r.id===v.AgvId).length>=1){
|
|
|
|
|
new TWEEN.Tween(this.agvData.find(r=>r.id===v.AgvId)).to({x: Math.random(), y: Math.random()}, time).start()
|
|
|
|
|
new TWEEN.Tween(this.agvData.find(r=>r.id===v.AgvId)).to({x:v.X/this.siteData.x, y: v.Y/this.siteData.y}, time).start()
|
|
|
|
|
}else{
|
|
|
|
|
this.agvData.push({
|
|
|
|
|
id: v.AgvId,
|
|
|
|
|
x: Math.random(),
|
|
|
|
|
y: Math.random(),
|
|
|
|
|
x: Math.random() || v.X/this.siteData.x,
|
|
|
|
|
y: Math.random() || v.Y/this.siteData.y,
|
|
|
|
|
rotate: v.Angle,
|
|
|
|
|
isGoods: false,
|
|
|
|
|
})
|
|
|
|
|