diff --git a/src/router/index.js b/src/router/index.js index 39d80c8..a07ce7a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -32,6 +32,7 @@ import Layout from '@/layout' export const constantRoutes = [ {path: '/cs', component: () => import('@/views/cs/index.vue')}, {path: '/cs2', component: () => import('@/views/cs/index2.vue')}, + {path: '/cs3', component: () => import('@/views/cs/index3.vue')}, { path: '/redirect', component: Layout, diff --git a/src/views/cs/index2.vue b/src/views/cs/index2.vue index 645bfa1..3bd0e7a 100644 --- a/src/views/cs/index2.vue +++ b/src/views/cs/index2.vue @@ -313,15 +313,19 @@ 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({ + let f1 = new TWEEN.Tween(this.agvData.find(r => r.id === v.AgvId)).to({ rotate: v.Angle, - }, 100).start() - new TWEEN.Tween(this.agvData.find(r => r.id === v.AgvId)).to({ + }, 100).start().onComplete(()=>{ + f1 = null + }) + let f2 = new TWEEN.Tween(this.agvData.find(r => r.id === v.AgvId)).to({ x: (v.X - 126000) / this.siteData.x, y: (72000 - (v.Y - 116000)) / this.siteData.y, show: v.X < 245000 && v.X > 126000 && v.Y < 187000 && v.Y > 116000 // show: true - }, time - 100).start() + }, time - 100).start().onComplete(()=>{ + f2 = null + }) } else { this.agvData.push({ id: v.AgvId, diff --git a/src/views/cs/index3.vue b/src/views/cs/index3.vue new file mode 100644 index 0000000..aedf388 --- /dev/null +++ b/src/views/cs/index3.vue @@ -0,0 +1,30 @@ + + +