From 111ac645925643d87690588d34c68be40fc99b38 Mon Sep 17 00:00:00 2001 From: YoVinchen Date: Sun, 3 Aug 2025 10:57:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=9F=A5=E8=AF=A2=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/app.js | 67 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 12 deletions(-) diff --git a/static/js/app.js b/static/js/app.js index 01b4bf5..5d35f4b 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -3378,6 +3378,23 @@ function displayModalGroupedQueryLogs(groupedLogs) { const batchTypeMatch = firstLog?.message.match(/开始(\w+)查询批次/); const batchType = batchTypeMatch ? batchTypeMatch[1] : '未知'; + // 提取并格式化查询日期 + const queryDate = firstLog ? new Date(firstLog.timestamp).toLocaleString('zh-CN', { + year: 'numeric', + month: '2-digit', + day: '2-digit', + hour: '2-digit', + minute: '2-digit', + second: '2-digit' + }) : '未知时间'; + + // 简化的日期显示(仅显示日期部分) + const queryDateShort = firstLog ? new Date(firstLog.timestamp).toLocaleDateString('zh-CN', { + year: 'numeric', + month: '2-digit', + day: '2-digit' + }) : '未知'; + // 检查是否有关联的历史记录ID const historyId = firstLog?.history_id; const historyBadge = historyId ? @@ -3393,15 +3410,23 @@ function displayModalGroupedQueryLogs(groupedLogs) {
-
- - ${batchType}查询批次 ${batchId} - ${totalLogs}条日志 - ${historyBadge} +
+
+ + ${batchType}查询批次 ${batchId} + ${totalLogs}条日志 + ${historyBadge} +
+
+ + + 查询时间: ${queryDate} + +
- ${duration} + 持续时间: ${duration}
${logCounts.INFO > 0 ? `${logCounts.INFO} INFO` : ''} @@ -3598,19 +3623,37 @@ function displayHistoryRelatedLogs(groupedLogs, historyId) { const batchTypeMatch = firstLog?.message.match(/开始(\w+)查询批次/); const batchType = batchTypeMatch ? batchTypeMatch[1] : '未知'; + // 提取并格式化查询日期 + const queryDate = firstLog ? new Date(firstLog.timestamp).toLocaleString('zh-CN', { + year: 'numeric', + month: '2-digit', + day: '2-digit', + hour: '2-digit', + minute: '2-digit', + second: '2-digit' + }) : '未知时间'; + html += `
-
- - ${batchType}查询批次 ${batchId} - ${totalLogs}条日志 - 历史记录 +
+
+ + ${batchType}查询批次 ${batchId} + ${totalLogs}条日志 + 历史记录 +
+
+ + + 查询时间: ${queryDate} + +
- ${duration} + 持续时间: ${duration}
${logCounts.INFO > 0 ? `${logCounts.INFO} INFO` : ''}