diff --git a/src/assets/board/cs3/bg.png b/src/assets/board/cs3/bg.png new file mode 100644 index 0000000..8873759 Binary files /dev/null and b/src/assets/board/cs3/bg.png differ diff --git a/src/components/Charts/Chart.vue b/src/components/Charts/Chart.vue new file mode 100644 index 0000000..0899129 --- /dev/null +++ b/src/components/Charts/Chart.vue @@ -0,0 +1,35 @@ + + + diff --git a/src/router/index.js b/src/router/index.js index a07ce7a..f5a8fcd 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -33,6 +33,7 @@ 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: '/cs3_1', component: () => import('@/views/cs/index3_1.vue')}, { path: '/redirect', component: Layout, diff --git a/src/views/cs/index2.vue b/src/views/cs/index2.vue index 3bd0e7a..1b32fbf 100644 --- a/src/views/cs/index2.vue +++ b/src/views/cs/index2.vue @@ -278,28 +278,27 @@ export default { equipmentData: [], agvData: [], siteData: { - x: 121000, - y: 82000 + x: 120565, + y: 71313 } } }, methods: { getLocation(x, y) { - let a = (66 + (90 - 66) * y) * x - let b = 12 * y - let xLocation = 16 - b + a - let yLocation = 22 + (84 - 22) * y + let a = (70 + (91 - 70) * y) * x + let b = 10.5 * y + let xLocation = 14.5 - b + a + let yLocation = 29 + (85 - 29) * y return ` left: ${xLocation}%;top: ${yLocation}%;` }, getAgvLocation() { let agvArr = [] getAgvData().then(e => { - console.log(Math.max(...e.Data.map(v => v.X)), Math.max(...e.Data.map(v => v.Y))) e.Data.forEach(v => { agvArr.push({ id: v.AgvId, - x: (v.X - 126000) / this.siteData.x, - y: (72000 - (v.Y - 116000)) / this.siteData.y, + x: (v.X - 126061) / this.siteData.x, + y: (71313 - (v.Y - 116722)) / this.siteData.y, rotate: v.Angle, isGoods: false, show: v.X < 245000 && v.X > 126000 && v.Y < 187000 && v.Y > 116000 @@ -319,8 +318,8 @@ export default { 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, + x: (v.X - 126061) / this.siteData.x, + y: (71313 - (v.Y - 116722)) / this.siteData.y, show: v.X < 245000 && v.X > 126000 && v.Y < 187000 && v.Y > 116000 // show: true }, time - 100).start().onComplete(()=>{ @@ -329,8 +328,8 @@ export default { } else { this.agvData.push({ id: v.AgvId, - x: (v.X - 126000) / this.siteData.x, - y: (72000 - (v.Y - 116000)) / this.siteData.y, + x: (v.X - 126061) / this.siteData.x, + y: (71313 - (v.Y - 116722)) / this.siteData.y, rotate: v.Angle, isGoods: false, show: v.X < 245000 && v.X > 126000 && v.Y < 187000 && v.Y > 116000 diff --git a/src/views/cs/index3.vue b/src/views/cs/index3.vue index aedf388..1eead17 100644 --- a/src/views/cs/index3.vue +++ b/src/views/cs/index3.vue @@ -1,30 +1,132 @@ diff --git a/src/views/cs/index3_1.vue b/src/views/cs/index3_1.vue new file mode 100644 index 0000000..aedf388 --- /dev/null +++ b/src/views/cs/index3_1.vue @@ -0,0 +1,30 @@ + + +