#
luxiaotao1123
2021-12-17 c1a770f7d71370878bc3d28f5248881b698d7718
static/js/app.js
@@ -42,7 +42,8 @@
         this.stats.end();
         // this.queryTask();
         this.queryCrn();
         this.modelMove();
         // this.modelMove();
         this.crnMove();
      }
      this.initScene = function () {
         this.scene = new THREE.Scene();
@@ -191,7 +192,7 @@
            initStore();
            if (Store3DData !== null) {
               for(var group of Store3DData.data.store.groups) {
                  let crn = new StoreCrn(group.crn, object);
                  new StoreCrn(group.crn, object);
                  for (var line of group.lines) {
                     let shelf = new StoreShelf(line);
                     object.addObject(shelf);
@@ -280,10 +281,10 @@
            for (let crnData of CrnDatas) {
               let crnTask = getArrVal(this.crnTasks, "crnNo", crnData.crnNo);
               if (null == crnTask) {
                  // let crnFork = getArrVal(this.objects, "name", wrkMast.crnNo + "-fork");
                  this.crnTasks.push(new CrnTask(crnData));
                  this.crnTasks.push(new CrnTask(crnData, this));
               } else {
                  if(!crnTask.run) {
                     // console.log(2)
                     crnTask.modify(crnData);
                  }
               }
@@ -378,14 +379,14 @@
            });
      }
      this.initModelMove = function () {
         console.log(this.wrkTasks)
         for (var wrkMast of this.wrkTasks) {
            this.crnBody = getArrVal(this.objects, "name", wrkMast.crnNo + "-body");
            // 取货点定位
            let sourceLocPosition = getBinPosition(wrkMast.sourceLocNo);
            let points = [new THREE.Vector3(this.crnBody.position.x, this.crnBody.position.y, this.crnBody.position.z), sourceLocPosition];
            this.curve = new Route(points);
         }
         console.log(this.crnTasks)
         // for (var wrkMast of this.wrkTasks) {
         //    this.crnBody = getArrVal(this.objects, "name", wrkMast.crnNo + "-body");
         //    // 取货点定位
         //    let sourceLocPosition = getBinPosition(wrkMast.sourceLocNo);
         //    let points = [new THREE.Vector3(this.crnBody.position.x, this.crnBody.position.y, this.crnBody.position.z), sourceLocPosition];
         //    this.curve = new Route(points);
         // }
      }
      this.modelMove = function () {
@@ -401,6 +402,11 @@
            }
         }
      }
      this.crnMove = function (object) {
         for (let crnTask of this.crnTasks) {
            crnTask.move();
         }
      }
   },
};