From 4f7e5d3dc070ea46f4ca243bcbae9eda76d8c8a0 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期一, 21 三月 2022 16:19:04 +0800 Subject: [PATCH] # --- static/js/object/CrnTask.js | 37 +++++++++++++++++++++++++------------ 1 files changed, 25 insertions(+), 12 deletions(-) diff --git a/static/js/object/CrnTask.js b/static/js/object/CrnTask.js index 0acf3d2..5f564bd 100644 --- a/static/js/object/CrnTask.js +++ b/static/js/object/CrnTask.js @@ -33,6 +33,7 @@ that.preZ = 0; that.prePosition = null; that.preForkPos = -1; // -1, "涓嶅湪瀹氫綅" 0, "璐у弶鍘熶綅" 1, "璐у弶鍦ㄥ乏渚ц繙" 2, "璐у弶鍦ㄥ乏渚�" 3, "璐у弶鍦ㄥ彸渚�" 4, "璐у弶鍦ㄥ彸渚ц繙" + that.preLoadPos = -1; // 褰撳墠鏁版嵁 that.bay = 1 ; that.lev = 1 ; @@ -41,6 +42,7 @@ that.z = 0; that.position = null; that.forkPos = -1; + that.loadPos = -1; that.crnBody = null; that.crnLoad = null; @@ -63,6 +65,7 @@ that.z = crnData.position.z; that.position = crnData.position; that.forkPos = crnData.forkPos; + that.loadPos = crnData.loadPos; that.crnBody = getArrVal(object.objects, "name", that.crnNo + "-body"); that.crnLoad = getArrVal(object.objects, "name", that.crnNo + "-load"); @@ -112,6 +115,7 @@ that.preZ = that.z; that.prePosition = JSON.parse(JSON.stringify(that.position)); that.preForkPos = that.forkPos; + that.preLoadPos = that.loadPos; // 褰撳墠 that.bay = crnData.bay; that.lev = crnData.lev; @@ -120,6 +124,25 @@ that.z = crnData.position.z; that.position = crnData.position; that.forkPos = crnData.forkPos; + that.loadPos = crnData.loadPos; + + // 鏍规嵁璐у弶涓婁笅瀹氫綅 鍒ゆ柇鍫嗗灈鏈哄彇鏀捐揣浣滀笟 ----------------------------------------------- + + // 涓婂畾浣� ===>> 涓嬪畾浣� 鏀捐揣瀹屾垚 + if (that.preLoadPos === 1 && that.loadPos === 0) { + if (that.locNo != null) { + if (that.pallet != null) { + that.pallet.name = that.locNo + "-Pallet"; + } + if (that.goods != null) { + that.goods.name = that.locNo + "-Goods"; + } + } + // 涓嬪畾浣� ===>> 涓婂畾浣� 鍙栬揣瀹屾垚 + } else { + + } + // create Route ------------------------------------------------ @@ -130,6 +153,7 @@ progress: 0, part: 'fork', loaded: crnData.loaded, + loadPos: crnData.loadPos, route: new Route([ { x: that.prePosition.x, @@ -170,7 +194,6 @@ curves.map((value, index) => { if (that.crnNo === 1) { - // console.log(crnData) // console.log(value.part + " --> " + JSON.stringify(value.route.points)) } }); @@ -189,15 +212,6 @@ if (i !== curves.length - 1) { curves[i+1].start = true; } else { - // if (that.locNo != null) { - // if (that.pallet != null) { - // that.pallet.name = that.locNo + "-Pallet"; - // } - // if (that.goods != null) { - // that.goods.name = that.locNo + "-Goods"; - // } - // } - // reset curves = []; that.run = false; } @@ -216,8 +230,7 @@ break case 'fork': that.crnFork.position.set(point.x + xOffset1, point.y, point.z); - // todo:luxiaotao 鎵樼洏+璐х墿 杩愬姩 涓嶆槸鏍规嵁loaded锛屾槸鏍规嵁涓婁笅瀹氫綅 - if (curves[i].loaded === 1 && that.pallet) { + if (curves[i].loadPos === 1 && that.pallet) { that.pallet.position.setX(point.x + palletX); that.goods.position.setX(point.x + goodsX); } -- Gitblit v1.9.1