feat(plan): 支持学案生成时指定单词数
- 在 AddLessonPlanReqVO 中新增 wordSize 字段 - 修改 LessonPlansService 接口及实现,支持 wordSize 参数 - 优化学案生成逻辑,按指定单词数切分词汇列表 - 更新前端 LessonPlanDialog,添加单词数输入框 - 修改生成学案接口及调用,传递 wordSize 参数 - 增加查询学生词汇掌握详情接口及实现 - 添加学生词汇统计展示组件及页面集成 - 调整词汇相关 Mapper,修正记忆强度条件范围 - 更新权限配置,允许访问学生单词详情接口
This commit is contained in:
@@ -6,8 +6,7 @@
|
||||
</el-header>
|
||||
|
||||
<el-main class="p-4">
|
||||
<div class="grid grid-cols-1 lg:grid-cols-1 gap-6"
|
||||
v-loading="loading">
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6" v-loading="loading">
|
||||
<div class="bg-white dark:bg-gray-800 rounded-lg shadow p-6">
|
||||
<div class="text-lg font-semibold mb-4">学生详情</div>
|
||||
<template v-if="detail">
|
||||
@@ -24,6 +23,20 @@
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div class="bg-white dark:bg-gray-800 rounded-lg shadow p-6">
|
||||
<div class="text-lg font-semibold mb-4">学生词汇统计</div>
|
||||
<template v-if="wordStat">
|
||||
<el-descriptions :column="1" border>
|
||||
<el-descriptions-item label="已掌握">{{ wordStat.masteredWordCount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="未掌握">{{ wordStat.unmasteredWordCount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="待复习">{{ wordStat.pendingReviewWordCount }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-empty description="暂无统计" />
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<div class="bg-white dark:bg-gray-800 rounded-lg shadow p-6">
|
||||
<div class="text-md font-semibold mb-3">学生考试记录</div>
|
||||
<ExamHistoryChart :data="history" />
|
||||
@@ -63,6 +76,7 @@ import { ref, onMounted, computed } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { getStudentDetail, getStudentStudyAnalyze } from '@/api/student'
|
||||
import { getStudentExamHistory } from '@/api/exam'
|
||||
import { getWordStudentDetail } from '@/api/words'
|
||||
import ExamHistoryChart from '@/layouts/components/student/ExamHistoryChart.vue'
|
||||
import PlanHistoryChart from '@/layouts/components/student/PlanHistoryChart.vue'
|
||||
import WordMasteryHeatmap from '@/layouts/components/student/WordMasteryHeatmap.vue'
|
||||
@@ -74,6 +88,7 @@ const route = useRoute()
|
||||
const history = ref([])
|
||||
const analyzeLoading = ref(false)
|
||||
const analysisText = ref('')
|
||||
const wordStat = ref(null)
|
||||
const md = new MarkdownIt({
|
||||
html: false,
|
||||
linkify: true,
|
||||
@@ -122,8 +137,17 @@ async function fetchStudyAnalyze() {
|
||||
}
|
||||
}
|
||||
|
||||
async function fetchWordStat() {
|
||||
const id = route.params.id
|
||||
if (!id) return
|
||||
const res = await getWordStudentDetail(Number(id))
|
||||
const d = res.data
|
||||
wordStat.value = d?.data || null
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchDetail()
|
||||
fetchExamHistory()
|
||||
fetchWordStat()
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user