From 9233b9a9c7c2e760d519d4ca0ccf0868b57fb1cd Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期一, 13 十二月 2021 15:14:49 +0800 Subject: [PATCH] # --- static/js/app.js | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-) diff --git a/static/js/app.js b/static/js/app.js index a7723c5..796ffe3 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -31,7 +31,6 @@ this.initLight(); this.initFloor(); this.initModel(); - this.queryTask(); this.initStoreObjects(this); } this.animate = function () { @@ -39,7 +38,8 @@ this.stats.begin(); this.renderer.render(this.scene, this.camera); this.stats.end(); - this.modelMove(); + this.queryTask(); + // this.modelMove(); } this.initScene = function () { this.scene = new THREE.Scene(); @@ -263,9 +263,13 @@ } } this.queryTask = function () { - if (this.firstTime === 1) { - queryTaskCurrent(); - this.wrkTasks = TaskData; + if (TaskDatas !== null) { + for (let TaskData of TaskDatas) { + let wrkTask = getArrVal(this.wrkTasks, "wrkNo", TaskData.wrkNo); + if (null == wrkTask) { + this.wrkTasks.push(TaskData); + } + } } } this.getExistedGoodType=function(state){ @@ -353,8 +357,10 @@ }); } this.initModelMove = function () { + console.log(this.wrkTasks) for (var wrkMast of this.wrkTasks) { let crnBody = getArrVal(this.objects, "name", wrkMast.crnNo + "-body"); + console.log(crnBody) // 鍙栬揣鐐瑰畾浣� let sourceLocPosition = getBinPosition(wrkMast.sourceLocNo); let points = [crnBody.position, sourceLocPosition]; @@ -378,7 +384,6 @@ } } }, - }; -- Gitblit v1.9.1