From 0a4c2819971cddca130ac06975c56521a2ccc761 Mon Sep 17 00:00:00 2001 From: 2910410219 <2910410219@qq.com> Date: Wed, 8 Jul 2026 16:42:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=A5=E4=BD=9C=E7=A9=BA?= =?UTF-8?q?=E9=97=B4=E7=BB=93=E6=9E=9C=E6=97=A5=E6=9C=9F=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home/index.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 91a169e..dba496d 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -308,9 +308,18 @@ const loadMoreWorkspace = async () => { return; } workspacePage.value = nextPage; - // 追加新数据到现有 treeNodes const newNodes = buildTreeNodes(newTree); - treeNodes.value = [...treeNodes.value, ...newNodes]; + // 合并跨页重复的日期分组 + const lastExisting = treeNodes.value[treeNodes.value.length - 1]; + const firstNew = newNodes[0]; + if (lastExisting && firstNew && lastExisting.label === firstNew.label) { + const existingIds = new Set((lastExisting.children || []).map((c) => c.backendId)); + const uniqueChildren = (firstNew.children || []).filter((c) => !existingIds.has(c.backendId)); + lastExisting.children!.push(...uniqueChildren); + treeNodes.value.push(...newNodes.slice(1)); + } else { + treeNodes.value = [...treeNodes.value, ...newNodes]; + } } catch { // 错误已由全局拦截器处理 } finally {