From d89dcf8ba3353f978d7d1dca7f1ad1a8151b1462 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期日, 12 四月 2026 18:30:10 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/deviceLogs/deviceLogs.js | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/src/main/webapp/static/js/deviceLogs/deviceLogs.js b/src/main/webapp/static/js/deviceLogs/deviceLogs.js
index d32ac6d..eb49498 100644
--- a/src/main/webapp/static/js/deviceLogs/deviceLogs.js
+++ b/src/main/webapp/static/js/deviceLogs/deviceLogs.js
@@ -33,6 +33,7 @@
selectedType: '',
selectedDeviceNo: '',
selectedStationId: '',
+ selectedStationLabel: '',
visualFocusStationId: '',
activeDeviceKey: '',
@@ -129,7 +130,7 @@
var deviceKeyword = String(this.searchDeviceNo || '').trim();
var stationKeyword = String(this.searchStationId || '').trim();
return devices.map(function (item) {
- var matchedStationId = '';
+ var matchedStationIds = [];
var matchesDeviceNo = !deviceKeyword || String(item.deviceNo).indexOf(deviceKeyword) >= 0;
var matchesStation = true;
if (stationKeyword) {
@@ -137,14 +138,13 @@
if (item.type === 'Devp') {
if (item.stationId && String(item.stationId).indexOf(stationKeyword) >= 0) {
matchesStation = true;
- matchedStationId = String(item.stationId);
+ matchedStationIds = [String(item.stationId)];
} else {
var stationIds = Array.isArray(item.stationIds) ? item.stationIds : [];
for (var i = 0; i < stationIds.length; i++) {
if (String(stationIds[i]).indexOf(stationKeyword) >= 0) {
matchesStation = true;
- matchedStationId = String(stationIds[i]);
- break;
+ matchedStationIds.push(String(stationIds[i]));
}
}
}
@@ -154,7 +154,8 @@
return null;
}
return Object.assign({}, item, {
- matchedStationId: matchedStationId
+ matchedStationIds: matchedStationIds,
+ matchedStationId: matchedStationIds.length === 1 ? matchedStationIds[0] : ''
});
}).filter(function (item) {
return !!item;
@@ -506,6 +507,7 @@
deviceNo: String(device.deviceNo),
stationId: device.stationId == null ? '' : String(device.stationId),
stationIds: (device.stationIds || []).map(function (stationId) { return String(stationId); }),
+ matchedStationIds: [],
matchedStationId: '',
fileCount: device.fileCount || 0,
firstTime: device.firstTime || 0,
@@ -573,6 +575,7 @@
this.selectedType = '';
this.selectedDeviceNo = '';
this.selectedStationId = '';
+ this.selectedStationLabel = '';
this.visualFocusStationId = '';
this.activeDeviceKey = '';
this.detailTab = 'logs';
@@ -601,9 +604,10 @@
this.selectedType = device.type;
this.selectedDeviceNo = String(device.deviceNo);
this.selectedStationId = device.stationId == null ? '' : String(device.stationId);
- this.visualFocusStationId = device.stationId == null || String(device.stationId) === ''
+ this.selectedStationLabel = device.stationId == null || String(device.stationId) === ''
? (device.matchedStationId == null ? '' : String(device.matchedStationId))
: String(device.stationId);
+ this.visualFocusStationId = this.selectedStationLabel;
this.activeDeviceKey = nextKey;
this.detailTab = 'raw';
this.rawTab = 'wcs';
@@ -613,6 +617,9 @@
this.loadingOffsets = {};
this.selectedTimestamp = 0;
this.logLoadError = '';
+ if (this.selectedType === 'Devp' && !this.selectedStationId) {
+ return;
+ }
this.loadTimeline();
},
resolveVisualStationId: function (logItem) {
--
Gitblit v1.9.1