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