From bcec8512f44419bd63d09bad4a08929331c76a6b Mon Sep 17 00:00:00 2001 From: cat-shark <1716967236@qq.com> Date: Sun, 2 Aug 2026 11:31:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=9B=9E=E5=BF=86?= =?UTF-8?q?=E9=A1=B5=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=E4=B8=8E=E9=87=8D?= =?UTF-8?q?=E9=80=89=E8=8A=82=E7=82=B9=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ReviewRecall.vue | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/components/ReviewRecall.vue b/src/components/ReviewRecall.vue index f25175a..521c460 100644 --- a/src/components/ReviewRecall.vue +++ b/src/components/ReviewRecall.vue @@ -51,6 +51,7 @@ const editViewer = ref | null>(null); // 回忆历史 const historyRecords = ref([]); const showHistory = ref(false); +const historyLoading = ref(false); // 解析标准导图 JSON 为树节点 const standardTree = computed(() => { @@ -250,6 +251,8 @@ const resetComparison = () => { hasCompared.value = false; focusPath.value = ""; recallTree.value = buildEmptyRecallTree(); + standardExpanded.value = true; + editingStandard.value = false; }; // 编辑标准导图 @@ -294,12 +297,19 @@ const cancelStandardEdit = () => { // 查看回忆历史 const loadHistory = async () => { + if (showHistory.value) { + showHistory.value = false; + return; + } + historyLoading.value = true; try { const res = await listRecallRecords(taskNum.value); historyRecords.value = res?.data || []; showHistory.value = true; } catch { ElMessage.error("加载历史记录失败"); + } finally { + historyLoading.value = false; } }; @@ -311,6 +321,8 @@ const selectHistoryRecord = (record: RecallRecord) => { const tree = parseOutlineToTree(record.recallContent); if (tree) recallTree.value = tree; hasCompared.value = true; + focusPath.value = record.focusPath || ""; + standardExpanded.value = true; } catch { ElMessage.error("解析对比记录失败"); } @@ -375,8 +387,8 @@ onMounted(() => { @@ -384,7 +396,7 @@ onMounted(() => {
复习起点 {{ focusPath }} - 重选节点 + 重选节点
@@ -420,9 +432,9 @@ onMounted(() => { -
+

回忆历史

-
+
{ ✅{{ record.matchedCount }} ❌{{ record.missedCount }} ➕{{ record.extraCount }}
+