From 3b383c80c90a7d0cdc980ce6fe9889bfa20fecb9 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期日, 07 四月 2024 08:29:05 +0800
Subject: [PATCH] Merge branch 'Four-Way-Rack' of http://47.97.1.152:5880/r/zy-asrs-master into Four-Way-Rack
---
zy-asrs-flow/src/pages/map/utils.js | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/zy-asrs-flow/src/pages/map/utils.js b/zy-asrs-flow/src/pages/map/utils.js
index f25e436..3188b8f 100644
--- a/zy-asrs-flow/src/pages/map/utils.js
+++ b/zy-asrs-flow/src/pages/map/utils.js
@@ -113,6 +113,17 @@
};
}
+export const querySprite = (type, no) => {
+ if (!mapContainer) {
+ return;
+ }
+ for (const sprite of mapContainer.children) {
+ if (sprite.data?.type === type && sprite.data?.no === no) {
+ return sprite;
+ }
+ }
+}
+
// show sprite feature from sprite click event
export const viewFeature = (sprite, setCurSPrite) => {
sprite.off('pointerup');
@@ -588,6 +599,13 @@
const mapVo = JSON.parse(data);
// shuttle
for (const shuttleVo of mapVo.shuttleVos) {
- console.log(shuttleVo);
+ const shuttle = querySprite(SENSOR_TYPE.SHUTTLE, shuttleVo.shuttleNo);
+ if (!shuttle && !shuttleVo.curLocNo) { continue; }
+ const { row, bay, lev } = parseLocNo(shuttleVo.curLocNo);
+ const shelf = querySprite(SENSOR_TYPE.SHELF, row + '-' + bay);
+ new TWEEDLE.Tween(shuttle.position).easing(TWEEDLE.Easing.Linear.None).to({
+ x: shelf.position.x,
+ y: shelf.position.y
+ }, 1000).start();
}
}
\ No newline at end of file
--
Gitblit v1.9.1