From 2f6c32fbfbd3696ed3ccce3b89158e4a5876ddc5 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期一, 13 十二月 2021 11:19:27 +0800
Subject: [PATCH] #

---
 static/js/app.js |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/static/js/app.js b/static/js/app.js
index 6af6ee1..5fb69a3 100644
--- a/static/js/app.js
+++ b/static/js/app.js
@@ -15,6 +15,7 @@
 		this.stats = null;
 		this.goodTypes=[];//瀛樺偍鎵�鏈夌殑搴撲綅绫诲瀷
 		this.wrkNo = 0;
+		this.wrkTasks = [];// 浠诲姟鍒楄〃
 
 		this.start = function () {
 			this.initMain();
@@ -264,9 +265,7 @@
 		this.queryTask = function () {
 			if (this.firstTime === 1) {
 				queryTaskCurrent();
-				if (this.wrkNo !== TaskData.wrkNo) {
-					this.wrkNo = TaskData.wrkNo;
-				}
+				this.wrkTasks = TaskData;
 			}
 		}
 		this.getExistedGoodType=function(state){
@@ -354,9 +353,12 @@
 				});
 		}
 		this.modelMove = function () {
-			// console.log(1)
-			let crnBody = getArrVal(this.objects, "name", "1-body");
-			console.log(crnBody.position)
+			for (var wrkMast of this.wrkTasks) {
+				console.log(wrkMast)
+				let crnBody = getArrVal(this.objects, "name", wrkMast.crnNo + "-body");
+
+				console.log(crnBody.position);
+			}
 		}
 	},
 

--
Gitblit v1.9.1