From 2f4a70cf2be3a35b7770d1b6cf105560856b4897 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 06 三月 2026 15:05:06 +0800
Subject: [PATCH] #
---
src/main/webapp/components/MapCanvas.js | 28 ++++++++++++----------------
1 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/src/main/webapp/components/MapCanvas.js b/src/main/webapp/components/MapCanvas.js
index f04f4ea..92d3367 100644
--- a/src/main/webapp/components/MapCanvas.js
+++ b/src/main/webapp/components/MapCanvas.js
@@ -678,21 +678,7 @@
sta.statusObj = null;
if (sta.textObj.parent !== sta) { sta.addChild(sta.textObj); sta.textObj.position.set(sta.width / 2, sta.height / 2); }
}
- let baseColor = 0xb8b8b8;
- if (status === "site-auto") {
- baseColor = 0x78ff81;
- } else if (status === "site-auto-run" || status === "site-auto-id" || status === "site-auto-run-id") {
- baseColor = 0xfa51f6;
- } else if (status === "site-unauto") {
- baseColor = 0xb8b8b8;
- } else if (status === "machine-pakin") {
- baseColor = 0x30bffc;
- } else if (status === "machine-pakout") {
- baseColor = 0x97b400;
- } else if (status === "site-run-block") {
- baseColor = 0xe69138;
- }
- this.setStationBaseColor(sta, baseColor);
+ this.setStationBaseColor(sta, this.getStationStatusColor(status));
});
},
getCrnInfo() {
@@ -1221,6 +1207,17 @@
const b = color & 0xFF;
const brightness = (r * 299 + g * 587 + b * 114) / 1000;
return brightness > 150 ? '#000000' : '#ffffff';
+ },
+ getStationStatusColor(status) {
+ if (status === "site-auto") { return 0x78ff81; }
+ if (status === "site-auto-run") { return 0xfa51f6; }
+ if (status === "site-auto-id") { return 0xc4c400; }
+ if (status === "site-auto-run-id") { return 0x30bffc; }
+ if (status === "site-unauto") { return 0xb8b8b8; }
+ if (status === "machine-pakin") { return 0x30bffc; }
+ if (status === "machine-pakout") { return 0x97b400; }
+ if (status === "site-run-block") { return 0xe69138; }
+ return 0xb8b8b8;
},
getCrnStatusColor(status) {
if (status === "machine-auto") { return 0x21BA45; }
@@ -2016,7 +2013,6 @@
}
}
});
-
--
Gitblit v1.9.1