From 2c51071d0d306d4ef1ca623c2a0c2c0ee6765bc2 Mon Sep 17 00:00:00 2001 From: danial Date: Mon, 8 Dec 2025 16:42:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(prefetch):=20=E8=B0=83=E6=95=B4=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E6=B8=B2=E6=9F=93=E9=A1=BA=E5=BA=8F=E4=B8=BA=E4=BF=9D?= =?UTF-8?q?=E6=8C=81=E5=8E=9F=E5=A7=8B=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除日志数据倒序处理,改为保持后端返回的原始顺序 - 新增日志追加时不再倒序,确保顺序一致 - 优化日志列表显示的时间顺序逻辑 - 保证加载更多的判断逻辑不受影响 --- .../camel-oil-info/prefetch/components/prefetch-logs.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/camel-oil-info/prefetch/components/prefetch-logs.vue b/src/views/camel-oil-info/prefetch/components/prefetch-logs.vue index eb67153..9655232 100644 --- a/src/views/camel-oil-info/prefetch/components/prefetch-logs.vue +++ b/src/views/camel-oil-info/prefetch/components/prefetch-logs.vue @@ -189,8 +189,8 @@ const fetchLogs = async (reset = true) => { actualQueryStartTime.value = data.actualStartTime || queryStartTime; queryOffsetMinutes.value = 0; - // 倒序显示,最新的在前面 - logsRenderData.value = newLogs.reverse(); + // 保持后端返回的原始顺序 + logsRenderData.value = newLogs; // 如果有数据就设置有更多数据可加载 hasMore.value = newLogs.length > 0; @@ -242,8 +242,8 @@ const fetchLogs = async (reset = true) => { const newLogs = data.logs || []; - // 将新日志倒序显示,追加到现有日志后面 - logsRenderData.value.push(...newLogs.reverse()); + // 将新日志保持原始顺序,追加到现有日志后面 + logsRenderData.value.push(...newLogs); // 检查是否达到最大查询范围,决定是否还有更多数据 hasMore.value = queryOffsetMinutes.value < maxQueryMinutes;