fix(培训优化):1.签到码文案改「二维码有效期至 HH:mm」、代扫码按钮改「补录」;2.课程管理「适合人员」升级「课程权限」(默认所属部门,部门+人员混合选择互斥,按权限过滤目录/选课/学员视图);3.筛选增加按状态查询,核验改审核;4.审核通过即自动发布(去发布按钮),审核时课程权限必填;5.下线课程全面拦截(和信课程撤回/计划不可选/学习提示已下线,存量计划保留);6.课件管理支持多课件追加不替换(迁移000163/000164);7.AI对话问候语改「小和」;8.登录页品牌标识提升对比度
deploy-hxtesting / build-and-deploy (push) Successful in 1m15s
deploy-hxtesting / build-and-deploy (push) Successful in 1m15s
This commit is contained in:
1 parent
9e00af1905
commit
6defb1f2c6
22 files changed
+1169
-307
No files matched your search
@@ -13,6 +13,8 @@
|
||||
</t-tag>
|
||||
<h2 class="detail-name">{{ course?.name || '课程详情' }}</h2>
|
||||
<t-tag v-if="course" theme="default" variant="outline" size="small">{{ typeText }}</t-tag>
|
||||
<!-- 课程下线(000163):关联课程管理条目已下线时标注并拦截学习入口 -->
|
||||
<t-tag v-if="libraryOffline" theme="danger" variant="light" size="small">课程已下线</t-tag>
|
||||
<!-- 培训签到:跳「培训签到」页并自动定位本课程场次(SignPanel 读取 courseId 查询参数) -->
|
||||
<t-button v-if="course" variant="outline" theme="primary" size="small" class="detail-signin" @click="goSignin">
|
||||
培训签到
|
||||
@@ -53,8 +55,14 @@
|
||||
<!-- 预览区 -->
|
||||
<main class="preview-pane">
|
||||
<t-loading :loading="previewLoading" class="preview-pane__inner" :fullscreen="false">
|
||||
<!-- 课程已下线(000163):不能再打开学习,统一提示 -->
|
||||
<t-empty
|
||||
v-if="libraryOffline"
|
||||
class="preview-empty"
|
||||
description="该课程已下线,不能再继续学习;如有疑问请联系培训管理员"
|
||||
/>
|
||||
<DocumentPreview
|
||||
v-if="current && docBlob"
|
||||
v-else-if="current && docBlob"
|
||||
:source-blob="docBlob"
|
||||
:file-type="previewKind(current)"
|
||||
:file-name="current.name"
|
||||
@@ -71,8 +79,8 @@
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<!-- 随堂考试(开启随堂考试或绑定题库即可考) -->
|
||||
<div v-if="course?.exam_enabled || course?.exam_ready" class="panel-box exam-box">
|
||||
<!-- 随堂考试(开启随堂考试或绑定题库即可考;课程已下线时不提供) -->
|
||||
<div v-if="!libraryOffline && (course?.exam_enabled || course?.exam_ready)" class="panel-box exam-box">
|
||||
<div class="panel-box__header">
|
||||
<span class="panel-box__title">随堂考试</span>
|
||||
<div class="panel-box__actions">
|
||||
@@ -182,6 +190,10 @@ const wrongCount = ref(0)
|
||||
|
||||
const typeText = computed(() => (course.value?.type === 'elective' ? '选修' : '必修'))
|
||||
|
||||
// 课程已下线(000163):关联课程管理条目 publish_status=offline 时拦截学习
|
||||
// (课件预览/进度上报/随堂考试统一提示「该课程已下线」;已有培训计划保留展示)
|
||||
const libraryOffline = computed(() => Boolean(course.value?.library_offline))
|
||||
|
||||
const taskState = computed(() => {
|
||||
const map: Record<string, string> = { done: '已完成', doing: '学习中', overdue: '已逾期', pending: '待学习' }
|
||||
return myTask.value ? map[myTask.value.status] || '' : ''
|
||||
@@ -225,6 +237,10 @@ const stopHeartbeat = () => {
|
||||
// 跨空间学员(培训数据在档案空间)会被 403「Permission denied」拦截;培训域
|
||||
// 文件流按解析后的培训租户服务端取文件,与下载/和信课程抽屉同口径。
|
||||
const openMaterial = async (m: TrainingMaterial) => {
|
||||
if (libraryOffline.value) {
|
||||
MessagePlugin.warning('该课程已下线,不能再继续学习')
|
||||
return
|
||||
}
|
||||
if (current.value?.id === m.id) return
|
||||
stopHeartbeat()
|
||||
current.value = m
|
||||
@@ -306,6 +322,10 @@ const bindVideoHeartbeat = () => {
|
||||
// ---- 随堂考试 ----
|
||||
|
||||
const startExam = async () => {
|
||||
if (libraryOffline.value) {
|
||||
MessagePlugin.warning('该课程已下线,不能再参加考试')
|
||||
return
|
||||
}
|
||||
examLoading.value = true
|
||||
try {
|
||||
const data = unwrap<{ paper: TrainingPaper; questions: TrainingQuestion[] }>(await getCourseExamPaper(courseId))
|
||||
@@ -377,6 +397,8 @@ const loadAll = async () => {
|
||||
const exam = r && unwrap<{ record: TrainingExamRecord | null; passed: boolean }>(r)
|
||||
examRecord.value = exam?.record || null
|
||||
examPassed.value = !!exam?.passed
|
||||
// 课程已下线(000163):不自动打开课件,页面统一展示「该课程已下线」
|
||||
if (libraryOffline.value) return
|
||||
// [2026-11 需求] 进入有课件的课程默认打开第一个课件,免手动从左侧选择
|
||||
if (materials.value.length) void openMaterial(materials.value[0])
|
||||
} finally {
|
||||
|
||||
Reference in new issue
Block a user