|
|
|
@ -112,11 +112,11 @@ import {
|
|
|
|
|
storeyHeight,
|
|
|
|
|
storeyWidth,
|
|
|
|
|
tuopanLocation,
|
|
|
|
|
animationLine
|
|
|
|
|
animationLine, isLoading
|
|
|
|
|
} from './setThree'
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
AGVAnimation, agvData
|
|
|
|
|
AGVAnimation, agvData,floorOrigin,floorData1,isAGVLoading
|
|
|
|
|
} from './agv'
|
|
|
|
|
|
|
|
|
|
const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100
|
|
|
|
@ -134,9 +134,42 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
getAgvDeviceStatus().then(e=>{
|
|
|
|
|
console.log(e)
|
|
|
|
|
})
|
|
|
|
|
setInterval(()=>{
|
|
|
|
|
if(isLoading && isAGVLoading){
|
|
|
|
|
getAgvDeviceStatus().then(e=>{
|
|
|
|
|
console.log(e)
|
|
|
|
|
e.data.agvStatusList.forEach(v=>{
|
|
|
|
|
if(v.agvName === "2楼叉车"){
|
|
|
|
|
let x = (v.posX - floorOrigin.floor2Data.x) / floorData1.floor2Data.x
|
|
|
|
|
let z = (v.posY - floorOrigin.floor2Data.y) / floorData1.floor2Data.z
|
|
|
|
|
console.log({x,z})
|
|
|
|
|
AGVAnimation('2AGV', '2AGV', 'xz', { x: x * 100, z: z * 100 })
|
|
|
|
|
}
|
|
|
|
|
if(v.agvName === "3楼叉车"){
|
|
|
|
|
let x = (v.posX - floorOrigin.floor3Data.x) / floorData1.floor3Data.x
|
|
|
|
|
let z = (v.posY - floorOrigin.floor3Data.y) / floorData1.floor3Data.z
|
|
|
|
|
AGVAnimation('3AGV', '3AGV', 'xz', { x: x * 100, z: z * 100 })
|
|
|
|
|
}
|
|
|
|
|
if(v.agvName === "5楼叉车"){
|
|
|
|
|
let x = (v.posX - floorOrigin.floor5Data.x) / floorData1.floor5Data.x
|
|
|
|
|
let z = (v.posY - floorOrigin.floor5Data.y) / floorData1.floor5Data.z
|
|
|
|
|
AGVAnimation('5CCAGV', '5CCAGV', 'xz', { x: x * 100, z: z * 100 })
|
|
|
|
|
}
|
|
|
|
|
if(v.agvName === "5楼背负式"){
|
|
|
|
|
let x = (v.posX - floorOrigin.floor5Data.x) / floorData1.floor5Data.x
|
|
|
|
|
let z = (v.posY - floorOrigin.floor5Data.y) / floorData1.floor5Data.z
|
|
|
|
|
AGVAnimation('5BFAGV', '5BFAGV', 'xz', { x: x * 100, z: z * 100 })
|
|
|
|
|
}
|
|
|
|
|
if(v.agvName === "5楼CTU"){
|
|
|
|
|
let x = (v.posX - floorOrigin.floor5Data.x) / floorData1.floor5Data.x
|
|
|
|
|
let z = (v.posY - floorOrigin.floor5Data.y) / floorData1.floor5Data.z
|
|
|
|
|
AGVAnimation('5CTU', '5CTU', 'x', { x: x * 100, z: z * 100 })
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},2500)
|
|
|
|
|
this.$refs.threeJs.appendChild(renderer.domElement)
|
|
|
|
|
|
|
|
|
|
// controls.rotateSpeed = -controls.rotateSpeed;
|
|
|
|
|