From d62f97dabd206364220b74dfa0bb065d4e64dc7b Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 20 三月 2026 18:16:56 +0800
Subject: [PATCH] #
---
src/main/webapp/components/DevpCard.js | 38 +++++++++++++++++++++++++++++++++++---
1 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/src/main/webapp/components/DevpCard.js b/src/main/webapp/components/DevpCard.js
index d699cfc..4aecb86 100644
--- a/src/main/webapp/components/DevpCard.js
+++ b/src/main/webapp/components/DevpCard.js
@@ -1,9 +1,11 @@
+var stationTracePageVersion = "20260319_station_trace_layout_v2";
+
Vue.component("devp-card", {
template: `
<div class="mc-root">
<div class="mc-toolbar">
<div class="mc-title">杈撻�佺洃鎺�</div>
- <div class="mc-search">
+ <div v-if="!readOnly" class="mc-search">
<input class="mc-input" v-model="searchStationId" placeholder="璇疯緭鍏ョ珯鍙�" />
<button type="button" class="mc-btn mc-btn-ghost" @click="getDevpStateInfo">鏌ヨ</button>
</div>
@@ -32,6 +34,8 @@
<div class="mc-action-row">
<button type="button" class="mc-btn" @click="controlCommand">涓嬪彂</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>
</div>
@@ -88,7 +92,7 @@
<div v-if="displayStationList.length === 0" class="mc-empty">褰撳墠娌℃湁鍙睍绀虹殑绔欑偣鏁版嵁</div>
</div>
- <div class="mc-footer">
+ <div v-if="!readOnly || totalPages > 1" class="mc-footer">
<button type="button" class="mc-page-btn" :disabled="currentPage <= 1" @click="handlePageChange(currentPage - 1)">涓婁竴椤�</button>
<span>{{ currentPage }} / {{ totalPages }}</span>
<button type="button" class="mc-page-btn" :disabled="currentPage >= totalPages" @click="handlePageChange(currentPage + 1)">涓嬩竴椤�</button>
@@ -113,7 +117,8 @@
targetStationId: ""
},
barcodePreviewCache: {},
- pageSize: 12,
+ showFakeTraceEntry: false,
+ pageSize: this.readOnly ? 24 : 12,
currentPage: 1,
timer: null
};
@@ -155,6 +160,7 @@
},
created: function () {
MonitorCardKit.ensureStyles();
+ this.loadFakeProcessStatus();
if (this.autoRefresh) {
this.timer = setInterval(this.getDevpStateInfo, 1000);
}
@@ -223,9 +229,35 @@
this.afterDataRefresh();
}
},
+ loadFakeProcessStatus: function () {
+ if (this.readOnly || !window.$ || typeof baseUrl === "undefined") {
+ this.showFakeTraceEntry = false;
+ return;
+ }
+ $.ajax({
+ url: baseUrl + "/openapi/getFakeSystemRunStatus",
+ method: "get",
+ success: function (res) {
+ var data = res && res.data ? res.data : null;
+ this.showFakeTraceEntry = !!(data && data.isFake);
+ }.bind(this),
+ error: function () {
+ this.showFakeTraceEntry = false;
+ }.bind(this)
+ });
+ },
openControl: function () {
this.showControl = !this.showControl;
},
+ openFakeTracePage: function () {
+ if (!this.showFakeTraceEntry) {
+ return;
+ }
+ 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) },
--
Gitblit v1.9.1