feat: expand user growth record view

This commit is contained in:
2026-07-31 16:25:50 +08:00
parent a84650bb9e
commit 763c78bd7e
2 changed files with 28 additions and 1 deletions

View File

@@ -30,6 +30,8 @@ const helpCard = ref<TeacherHelpCard | null>(null);
const helpCardContent = ref("");
const shareDraft = ref<ShareDraft | null>(null);
const shareDraftContent = ref("");
const helpCardHistory = ref<TeacherHelpCard[]>([]);
const shareDraftHistory = ref<ShareDraft[]>([]);
const profileLoading = ref(false);
const finishingTopic = ref(false);
const generatingHelpCard = ref(false);
@@ -292,7 +294,14 @@ async function openGrowthProfile() {
profileDialogOpen.value = true;
profileLoading.value = true;
try {
growthProfile.value = await api.growthProfile();
const [profileResult, helpCards, shareDrafts] = await Promise.all([
api.growthProfile(),
api.helpCards(10),
api.shareDrafts(10),
]);
growthProfile.value = profileResult;
helpCardHistory.value = helpCards;
shareDraftHistory.value = shareDrafts;
} catch (error) {
handleError(error, "成长档案加载失败");
} finally {
@@ -482,6 +491,20 @@ async function copyText(text: string) {
<p>{{ item.summary }}</p>
</article>
</div>
<div v-if="helpCardHistory.length" class="recent-topic-summaries">
<h3>最近老师求助卡</h3>
<article v-for="item in helpCardHistory" :key="`help-${item.id}`">
<time>{{ item.createdAt }} · {{ item.copied ? '已复制' : '未复制' }}</time>
<p>{{ item.content.slice(0, 140) }}{{ item.content.length > 140 ? '…' : '' }}</p>
</article>
</div>
<div v-if="shareDraftHistory.length" class="recent-topic-summaries">
<h3>最近班级分享稿</h3>
<article v-for="item in shareDraftHistory" :key="`share-${item.id}`">
<time>{{ item.createdAt }} · {{ item.copied ? '已复制' : '未复制' }}</time>
<p>{{ item.content.slice(0, 140) }}{{ item.content.length > 140 ? '…' : '' }}</p>
</article>
</div>
</section>
</AppDialog>

View File

@@ -686,6 +686,10 @@ AI 日志增加:
- 用户能查看成长档案摘要;
- 基础版和深度版展示边界不同。
#### 开发进度
- 2026-07-31用户端“我的档案”弹窗已扩展为实修记录视图可查看成长档案摘要、最近主题沉淀、最近老师求助卡和最近班级分享稿仍保持“我的实修记录”表达不做后台画像式展示。
---
### 11. 后台用户详情升级