fix(培训页面优化):1.请检查所有企业培训相关页面带有列表展示都要进行分页,使用分页共用组件默认每页15条!
deploy-hxtesting / build-and-deploy (push) Successful in 1m8s

2.课程管理页面右侧固定太宽如图二所示收缩够用就可以,可参考培训计划页面
3.月培训计划数据默认显示计划培训和授课培训是当月数据,可筛选其他月份支持多选或全部数据
4.月培训计划只需要保留一个【创建月度计划】按钮,无法创建月度计划请核实根因!
This commit is contained in:
runny committed 2026-11-25 13:45:36 +08:00
1 parent 2483dd933a
commit 102d94e6c8
10 files changed
+387 -50

No files matched your search

@@ -22,7 +22,7 @@
<span class="panel-box__title">我的学习任务</span>
<span class="panel-box__sub">点击课程名进入学习,进度 ≥95% 自动完成</span>
</div>
<t-table :data="tasks" :columns="taskColumns" row-key="id" size="small">
<t-table :data="pagedTasks" :columns="taskColumns" row-key="id" size="small">
<template #course_name="{ row }">
<a class="task-course-link" @click="goCourse(row.course_id)">{{ row.course_name }}</a>
</template>
@@ -31,6 +31,7 @@
<t-tag :theme="taskTheme(row.status)" variant="light" size="small">{{ taskText(row.status) }}</t-tag>
</template>
</t-table>
<TrainingPagination v-model:current="taskPage" v-model:page-size="taskPageSize" :total="taskTotal" />
<t-empty v-if="!tasks.length" description="暂无学习任务,课程发布后将自动生成" />
</div>
@@ -38,7 +39,7 @@
<div class="panel-box__header">
<span class="panel-box__title">我的考试成绩</span>
</div>
<t-table :data="myRecords" :columns="myRecordColumns" row-key="id" size="small" :loading="loading">
<t-table :data="pagedMyRecords" :columns="myRecordColumns" row-key="id" size="small" :loading="loading">
<template #course_name="{ row }">{{ row.course_name || row.paper_name || '-' }}</template>
<template #score="{ row }">
<span :class="passClass(row)">{{ row.score ?? '—' }}</span>
@@ -46,6 +47,7 @@
<template #pass_line="{ row }">{{ row.pass_score || '-' }} / {{ row.total_score || '-' }}</template>
<template #submitted_at="{ row }">{{ fmtTime(row.submitted_at) }}</template>
</t-table>
<TrainingPagination v-model:current="myRecordPage" v-model:page-size="myRecordPageSize" :total="myRecordTotal" />
<t-empty v-if="!myRecords.length" description="暂无考试记录,参加随堂考试后此处展示成绩" />
</div>
@@ -53,7 +55,7 @@
<div class="panel-box__header">
<span class="panel-box__title">我的错题本</span>
</div>
<t-table :data="wrongBook" :columns="wrongColumns" row-key="id" size="small">
<t-table :data="pagedWrongBook" :columns="wrongColumns" row-key="id" size="small">
<template #knowledge_point="{ row }">
<t-tag v-if="row.knowledge_point" variant="light" size="small">{{ row.knowledge_point }}</t-tag>
<span v-else>—</span>
@@ -64,6 +66,7 @@
</t-tag>
</template>
</t-table>
<TrainingPagination v-model:current="wrongPage" v-model:page-size="wrongPageSize" :total="wrongTotal" />
<t-empty v-if="!wrongBook.length" description="错题本为空,继续保持" />
</div>
@@ -144,6 +147,8 @@ import { fmtBeijingTime } from '@/utils/datetime'
import CourseLearningStatus from './CourseLearningStatus.vue'
import ExamPanel from './ExamPanel.vue'
import CourseAIAnalysis from './CourseAIAnalysis.vue'
import TrainingPagination from './TrainingPagination.vue'
import { useTrainingPager } from './useTrainingPager'
const props = defineProps<{ roles: string[]; admin?: boolean }>()
// 课程学习/考试情况管理端:人事/课长/讲师(roles 已按权限组展开,经理自动命中)
@@ -228,6 +233,11 @@ const taskText = (s: string) => ({ pending: '待学习', doing: '学习中', don
const taskTheme = (s: string) => ({ pending: 'default', doing: 'primary', done: 'success', overdue: 'danger' }[s] || 'default')
const fmtTime = (raw: string | null) => fmtBeijingTime(raw) || '—'
// 四宫格列表分页(000163):学习任务/考试成绩/错题本默认每页 15 条
const { page: taskPage, pageSize: taskPageSize, total: taskTotal, paged: pagedTasks } = useTrainingPager(tasks)
const { page: myRecordPage, pageSize: myRecordPageSize, total: myRecordTotal, paged: pagedMyRecords } = useTrainingPager(myRecords)
const { page: wrongPage, pageSize: wrongPageSize, total: wrongTotal, paged: pagedWrongBook } = useTrainingPager(wrongBook)
const passClass = (row: MyExamRecord) => {
if (row.score == null) return ''
return row.pass_score ? (row.score >= row.pass_score ? 'tone-good' : 'tone-bad') : ''