style: 任务执行页把基础导图移到计时区下方
This commit is contained in:
@@ -348,6 +348,17 @@ describe('StartTask.vue', () => {
|
||||
wrapper.unmount()
|
||||
})
|
||||
|
||||
it('闭环-05:倒计时在基础导图之上', async () => {
|
||||
const wrapper = await mountTask()
|
||||
|
||||
const html = wrapper.html()
|
||||
expect(html).toContain('timer-card')
|
||||
expect(html).toContain('mindmap-card')
|
||||
expect(html.indexOf('timer-card')).toBeLessThan(html.indexOf('mindmap-card'))
|
||||
|
||||
wrapper.unmount()
|
||||
})
|
||||
|
||||
it('闭环-05:没有导图时可用任务名作为根节点新建', async () => {
|
||||
vi.mocked(getStandardMindMap).mockResolvedValue({ code: 200, data: null } as any)
|
||||
const wrapper = await mountTask()
|
||||
|
||||
@@ -787,46 +787,6 @@ defineExpose({
|
||||
</el-dialog>
|
||||
</article>
|
||||
|
||||
<!-- 闭环-05:基础导图展示与就地编辑 -->
|
||||
<article class="surface-card mindmap-card">
|
||||
<div class="mindmap-header">
|
||||
<h3>基础导图</h3>
|
||||
<div class="mindmap-actions">
|
||||
<template v-if="editingStandard">
|
||||
<el-button size="small" @click="cancelStandardEdit">取消</el-button>
|
||||
<el-button size="small" type="success" :loading="savingStandard" @click="saveStandardEdit">
|
||||
保存
|
||||
</el-button>
|
||||
</template>
|
||||
<el-button v-else size="small" type="success" plain @click="startEditStandard">
|
||||
{{ standard ? "编辑" : "新建导图" }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-alert
|
||||
v-if="standard && standard.needsUpdate"
|
||||
type="warning"
|
||||
show-icon
|
||||
:closable="false"
|
||||
title="内容归属已变化,这张导图需要重建"
|
||||
description="重建在复习页里手动触发;这里可以先把发现的问题直接改掉。"
|
||||
/>
|
||||
<p v-if="editingStandard" class="mindmap-hint">
|
||||
直接在导图上编辑(Tab 加子节点 / Enter 加同级 / 双击改文字),保存后生效。
|
||||
</p>
|
||||
<MindMapViewer
|
||||
v-if="editingStandard"
|
||||
ref="editViewer"
|
||||
:tree="editableStandardTree"
|
||||
:editable="true"
|
||||
height="50vh"
|
||||
/>
|
||||
<template v-else>
|
||||
<MindMapViewer v-if="standardTree" :tree="standardTree" height="50vh" />
|
||||
<p v-else class="empty-text">这个任务还没有基础导图,点「新建导图」开始。</p>
|
||||
</template>
|
||||
</article>
|
||||
|
||||
<!-- 学习预期 -->
|
||||
<article class="surface-card expectation-card" v-if="expectationSaved">
|
||||
<span class="expectation-label">本次预期</span>
|
||||
@@ -904,6 +864,46 @@ defineExpose({
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<!-- 闭环-05:基础导图展示与就地编辑(倒计时才是本页重点,导图放在计时区之后) -->
|
||||
<article class="surface-card mindmap-card">
|
||||
<div class="mindmap-header">
|
||||
<h3>基础导图</h3>
|
||||
<div class="mindmap-actions">
|
||||
<template v-if="editingStandard">
|
||||
<el-button size="small" @click="cancelStandardEdit">取消</el-button>
|
||||
<el-button size="small" type="success" :loading="savingStandard" @click="saveStandardEdit">
|
||||
保存
|
||||
</el-button>
|
||||
</template>
|
||||
<el-button v-else size="small" type="success" plain @click="startEditStandard">
|
||||
{{ standard ? "编辑" : "新建导图" }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-alert
|
||||
v-if="standard && standard.needsUpdate"
|
||||
type="warning"
|
||||
show-icon
|
||||
:closable="false"
|
||||
title="内容归属已变化,这张导图需要重建"
|
||||
description="重建在复习页里手动触发;这里可以先把发现的问题直接改掉。"
|
||||
/>
|
||||
<p v-if="editingStandard" class="mindmap-hint">
|
||||
直接在导图上编辑(Tab 加子节点 / Enter 加同级 / 双击改文字),保存后生效。
|
||||
</p>
|
||||
<MindMapViewer
|
||||
v-if="editingStandard"
|
||||
ref="editViewer"
|
||||
:tree="editableStandardTree"
|
||||
:editable="true"
|
||||
height="50vh"
|
||||
/>
|
||||
<template v-else>
|
||||
<MindMapViewer v-if="standardTree" :tree="standardTree" height="50vh" />
|
||||
<p v-else class="empty-text">这个任务还没有基础导图,点「新建导图」开始。</p>
|
||||
</template>
|
||||
</article>
|
||||
|
||||
<!-- 当前会话学习残片 -->
|
||||
<article class="surface-card fragments-card" v-if="fragmentsList.length > 0">
|
||||
<h3>当前会话学习残片</h3>
|
||||
|
||||
Reference in New Issue
Block a user