fix(培训页面优化):1.请检查所有企业培训相关页面带有列表展示都要进行分页,使用分页共用组件默认每页15条!
deploy-hxtesting / build-and-deploy (push) Successful in 1m8s
deploy-hxtesting / build-and-deploy (push) Successful in 1m8s
2.课程管理页面右侧固定太宽如图二所示收缩够用就可以,可参考培训计划页面 3.月培训计划数据默认显示计划培训和授课培训是当月数据,可筛选其他月份支持多选或全部数据 4.月培训计划只需要保留一个【创建月度计划】按钮,无法创建月度计划请核实根因!
This commit is contained in:
1 parent
2483dd933a
commit
102d94e6c8
10 files changed
+387
-50
No files matched your search
@@ -44,7 +44,7 @@
|
||||
<span class="records-header__title">试卷</span>
|
||||
<span class="muted">学员可在企微内答题;此处支持本人在线答题与监考代录</span>
|
||||
</div>
|
||||
<t-table :data="papers" :columns="paperColumns" row-key="id" size="small" :loading="papersLoading">
|
||||
<t-table :data="pagedPapers" :columns="paperColumns" row-key="id" size="small" :loading="papersLoading">
|
||||
<template #course="{ row }">{{ paperCourseName(row) }}</template>
|
||||
<template #op="{ row }">
|
||||
<t-button variant="text" theme="primary" size="small" @click="onTakeExam(row)">答题</t-button>
|
||||
@@ -52,6 +52,7 @@
|
||||
<t-button variant="text" size="small" @click="recordPaperId = row.id">考试情况</t-button>
|
||||
</template>
|
||||
</t-table>
|
||||
<TrainingPagination v-model:current="paperPage" v-model:page-size="paperPageSize" :total="paperTotal" />
|
||||
<t-empty v-if="!papersLoading && !papers.length" description="该课程暂无试卷(组卷/AI 生成/答题后自动生成)" />
|
||||
</template>
|
||||
|
||||
@@ -93,7 +94,7 @@
|
||||
<span class="query-bar__hit">共 {{ filteredRecords.length }} 条</span>
|
||||
</div>
|
||||
|
||||
<t-table :data="filteredRecords" :columns="recordColumns" row-key="id" size="small" class="records-table" :loading="recordLoading">
|
||||
<t-table :data="pagedRecords" :columns="recordColumns" row-key="id" size="small" class="records-table" :loading="recordLoading">
|
||||
<template #member="{ row }">{{ memberLabel(row.member_id) }}</template>
|
||||
<template #dept="{ row }">{{ memberDept(row.member_id) }}</template>
|
||||
<template #score="{ row }">
|
||||
@@ -101,6 +102,7 @@
|
||||
</template>
|
||||
<template #submitted_at="{ row }">{{ fmtTime(row.submitted_at) }}</template>
|
||||
</t-table>
|
||||
<TrainingPagination v-model:current="recordPage" v-model:page-size="recordPageSize" :total="recordTotal" />
|
||||
<t-empty v-if="!recordPaperId" description="选择课程与试卷后查看考试情况与答题记录" />
|
||||
<t-empty v-else-if="!recordLoading && !records.length" description="该试卷暂无答题记录" />
|
||||
<t-empty v-else-if="records.length && !filteredRecords.length" description="没有符合查询条件的记录" />
|
||||
@@ -171,6 +173,8 @@ import {
|
||||
import { fmtBeijingTime } from '@/utils/datetime'
|
||||
import { apiErrorMessage } from '@/utils/request'
|
||||
import QuestionExamDialog from './QuestionExamDialog.vue'
|
||||
import TrainingPagination from './TrainingPagination.vue'
|
||||
import { useTrainingPager } from './useTrainingPager'
|
||||
|
||||
const props = defineProps<{ roles: string[]; admin?: boolean; initialCourseId?: string }>()
|
||||
// 监考/代交卷:人事/课长/讲师(roles 已按权限组展开,经理自动命中)
|
||||
@@ -311,6 +315,19 @@ const filteredRecords = computed(() => {
|
||||
})
|
||||
})
|
||||
|
||||
// 共用分页(000163):试卷/考试成绩列表默认每页 15 条
|
||||
const { page: paperPage, pageSize: paperPageSize, total: paperTotal, paged: pagedPapers } = useTrainingPager(papers)
|
||||
const {
|
||||
page: recordPage,
|
||||
pageSize: recordPageSize,
|
||||
total: recordTotal,
|
||||
paged: pagedRecords,
|
||||
reset: resetRecordPage,
|
||||
} = useTrainingPager(filteredRecords)
|
||||
|
||||
// 条件查询/切换试卷后考试成绩回到第 1 页
|
||||
watch(filteredRecords, resetRecordPage)
|
||||
|
||||
const loadAll = async () => {
|
||||
const [s, m, c, d] = await Promise.all([
|
||||
listSessions({ page_size: 200 }),
|
||||
|
||||
Reference in new issue
Block a user