From 5a02c9dece5e54f91ccc9f2864eb0956119ff4cb Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期五, 01 七月 2022 09:23:12 +0800
Subject: [PATCH] #

---
 static/js/app.js               |    2 
 static/js/object/StaTask.js    |   25 ++++++------
 static/js/data/BuildingData.js |   34 ++++++++--------
 3 files changed, 31 insertions(+), 30 deletions(-)

diff --git a/static/js/app.js b/static/js/app.js
index 0f111c5..cf1bd8b 100644
--- a/static/js/app.js
+++ b/static/js/app.js
@@ -369,7 +369,7 @@
 					if (null == staTask) {
 						this.staTasks.push(new StaTask(staData, this));
 					} else {
-						if(!staTask.run) {
+						if(!staTask.run && !staTask.isDel) {
 							staTask.modify(staData);
 						}
 					}
diff --git a/static/js/data/BuildingData.js b/static/js/data/BuildingData.js
index 47c25ef..92a3772 100644
--- a/static/js/data/BuildingData.js
+++ b/static/js/data/BuildingData.js
@@ -15,22 +15,22 @@
                 color: 0x5F7480,
             }
         },
-        {
-            objectName: 'floor',
-            objectType: 'cube',
-            length: 2750,
-            width: 600,
-            height: 5,
-            position: {
-                x: 1375,
-                y: 297,
-                z: 300
-            },
-            style:{
-                color: 0x5F7480,
-                transparent:1,
-                opacity:0.8
-            }
-        }
+        // {
+        //     objectName: 'floor',
+        //     objectType: 'cube',
+        //     length: 2750,
+        //     width: 600,
+        //     height: 5,
+        //     position: {
+        //         x: 1375,
+        //         y: 297,
+        //         z: 300
+        //     },
+        //     style:{
+        //         color: 0x5F7480,
+        //         transparent:1,
+        //         opacity:0.8
+        //     }
+        // }
     ]
 }
diff --git a/static/js/object/StaTask.js b/static/js/object/StaTask.js
index 4cc24b3..fea8462 100644
--- a/static/js/object/StaTask.js
+++ b/static/js/object/StaTask.js
@@ -27,7 +27,6 @@
         if (!that.position && item) {
             that.position = item.position;
         }
-
         if (!item) {
             that.isDel = true;
         }
@@ -35,32 +34,34 @@
     init();
 
     that.modify = function (staData) {
-        if (that.no === 0 && !that.isDel) {
+        if (that.no === 0) {
             return;
         }
 
         if (staData.loaded === 1 && staData.wrkNo && staData.wrkNo !== '0' && that.wrkNo !== staData.wrkNo) {
-            if (that.loaded === 1) {
+            if (that.outlet !== 1) {
+                if (that.loaded === 1) {
 
-                that.object.removeObject(that.wrkNo + "-Pallet");
-                that.object.removeObject(that.wrkNo + "-Goods");
+                    that.object.removeObject(that.wrkNo + "-Pallet");
+                    that.object.removeObject(that.wrkNo + "-Goods");
+                }
+
+                InitPallet(that.object, [{wrkNo: staData.wrkNo}], {position: that.position}, 2);
+                InitGoods(that.object, [{wrkNo: staData.wrkNo}], {position: that.position}, 2);
             }
-
-            InitPallet(that.object, [{wrkNo: staData.wrkNo}], {position: that.position}, 2);
-            InitGoods(that.object, [{wrkNo: staData.wrkNo}], {position: that.position}, 2);
         }
 
         if (staData.loaded === 0) {
             if (that.loaded === 1 && that.wrkNo && that.wrkNo !== '0') {
-
-                that.object.removeObject(that.wrkNo + "-Pallet");
-                that.object.removeObject(that.wrkNo + "-Goods");
+                if (that.inlet !== 1) {
+                    that.object.removeObject(that.wrkNo + "-Pallet");
+                    that.object.removeObject(that.wrkNo + "-Goods");
+                }
             }
         }
 
         that.loaded = staData.loaded;
         that.wrkNo = staData.wrkNo;
-
     }
 
 }

--
Gitblit v1.9.1