From 2b8a06fad6cc62d8d46307626489b68c4f8f065d Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 27 三月 2026 16:15:49 +0800
Subject: [PATCH] #
---
src/main/webapp/components/DevpCard.js | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/src/main/webapp/components/DevpCard.js b/src/main/webapp/components/DevpCard.js
index d8daf18..77ddc73 100644
--- a/src/main/webapp/components/DevpCard.js
+++ b/src/main/webapp/components/DevpCard.js
@@ -1,3 +1,5 @@
+var stationTracePageVersion = "20260319_station_trace_layout_v2";
+
Vue.component("devp-card", {
template: `
<div class="mc-root">
@@ -31,7 +33,9 @@
</label>
<div class="mc-action-row">
<button type="button" class="mc-btn" @click="controlCommand">涓嬪彂</button>
+ <button type="button" class="mc-btn mc-btn-soft" @click="clearPathCommand">娓呰矾寰�</button>
<button type="button" class="mc-btn mc-btn-soft" @click="resetCommand">澶嶄綅</button>
+ <button type="button" class="mc-btn mc-btn-ghost" @click="openStationTracePage">杩愯杞ㄨ抗</button>
<button v-if="showFakeTraceEntry" type="button" class="mc-btn mc-btn-ghost" @click="openFakeTracePage">浠跨湡杞ㄨ抗</button>
</div>
</div>
@@ -252,6 +256,9 @@
}
window.open(baseUrl + "/views/watch/fakeTrace.html", "_blank");
},
+ openStationTracePage: function () {
+ window.open(baseUrl + "/views/watch/stationTrace.html?v=" + stationTracePageVersion, "_blank");
+ },
buildDetailEntries: function (item) {
return [
{ label: "缂栧彿", value: this.orDash(item.stationId) },
@@ -269,10 +276,26 @@
{ label: "鏉$爜", value: this.orDash(item.barcode), code: true, type: "barcode" },
{ label: "閲嶉噺", value: this.orDash(item.weight) },
{ label: "浠诲姟鍙啓鍖�", value: this.orDash(item.taskWriteIdx) },
+ { label: "缂撳瓨鍖烘暟鎹�", value: this.formatTaskBufferItems(item.taskBufferItems), code: true },
{ label: "鏁呴殰浠g爜", value: this.orDash(item.error) },
{ label: "鏁呴殰淇℃伅", value: this.orDash(item.errorMsg) },
+ { label: "绯荤粺鍛婅", value: this.orDash(item.systemWarning) },
{ label: "鎵╁睍鏁版嵁", value: this.orDash(item.extend) }
];
+ },
+ formatTaskBufferItems: function (items) {
+ if (!Array.isArray(items) || items.length === 0) {
+ return "--";
+ }
+ return items.map(function (item) {
+ var slotIdx = item && item.slotIdx != null ? item.slotIdx : "?";
+ var taskNo = item && item.taskNo != null ? item.taskNo : 0;
+ var targetStaNo = item && item.targetStaNo != null ? item.targetStaNo : 0;
+ if (!taskNo && !targetStaNo) {
+ return slotIdx + ": 绌�";
+ }
+ return slotIdx + ": " + taskNo + " -> " + targetStaNo;
+ }).join(" | ");
},
postControl: function (url, payload) {
$.ajax({
@@ -462,6 +485,9 @@
controlCommand: function () {
this.postControl("/station/command/move", this.controlParam);
},
+ clearPathCommand: function () {
+ this.postControl("/station/command/clearPath", this.controlParam);
+ },
resetCommand: function () {
this.postControl("/station/command/reset", this.controlParam);
}
--
Gitblit v1.9.1