feat(复习): 节点选择交互 + 移除 session 维度

- MindMapViewer 新增 selectable 模式,点击节点 emit node-select 事件
- ReviewRecall.vue 移除会话选择器,改为节点选择交互
- 支持 URL ?focusPath= 参数自动预设复习起点
- 节点选择弹窗确认后回忆导图根节点=选中节点标题
- ReviewDetail 和 Welcome 中调用 findNode API 匹配节点后跳转
- API: recallCompare 使用 focusPath 替代 sessionNum
- API: 新增 findNode 端点
This commit is contained in:
2026-07-05 18:10:42 +08:00
parent 5a5a294f06
commit 84fe452e80
6 changed files with 150 additions and 54 deletions
+24
View File
@@ -99,6 +99,29 @@ const openRecallDetail = () => {
router.push(`/review/detail/${group.navigateType}/${group.navigateId}`);
};
/** 从回忆卡片跳转到回忆复习页(先匹配标准导图节点) */
const goToRecallFromCard = async () => {
const group = recallCard.value.group;
if (!group) return;
recallCard.value.visible = false;
const tn = group.taskNum;
const content = group.content || "";
if (tn && content) {
try {
const { findNode } = await import("@/api/standardMindMap");
const res = await findNode(tn, content.substring(0, 500));
const data = res?.data;
if (data?.path) {
router.push(`/review/recall/${tn}?focusPath=${encodeURIComponent(data.path)}`);
return;
}
} catch { /* fall through */ }
router.push(`/review/recall/${tn}`);
} else {
router.push("/review");
}
};
const startStudy = () => {
router.push("/study");
};
@@ -197,6 +220,7 @@ onMounted(() => {
回忆好了展开对照
</el-button>
<el-button v-else type="success" @click="openRecallDetail">进入详情页</el-button>
<el-button type="success" plain @click="goToRecallFromCard">前往回忆复习</el-button>
<el-button @click="recallCard.visible = false">关闭</el-button>
</template>
</el-dialog>