feat(优化):1.人事课孙凯发布月培训选我刘义亮参加培训如图一所示,但我的培训中却线上”我主讲“?请核实!
deploy-hxtesting / build-and-deploy (push) Successful in 1m8s

2.培训中心增加2个统计”我主讲X门“、”我参加X门“如图二所示
3.如图三培训详情页面右上角增加一个【培训签到】按钮,点击自动跳转到如图四”培训签到“页面自动打开该课程签到详情,
4.如图四所示增加一个【培训详情】块,点击自动返回如图三该培训详情页面!
请在本地修改代码!
This commit is contained in:
runny committed 2026-11-25 08:47:05 +08:00
1 parent 11450bdb96
commit ea0524c445
3 files changed
+69 -2

No files matched your search

@@ -59,6 +59,15 @@
<div class="upload-card__hint">{{ uploading ? '上传中…' : '课程实录留证 · 每个 ≤ ' + VIDEO_MAX_MB + 'MB' }}</div>
</div>
</template>
<!-- 培训详情:回跳课程学习详情页(与课程详情页「培训签到」按钮互为出入口) -->
<div v-if="selectedCourseId" class="stat-card upload-card" role="button" tabindex="0" @click="goCourseDetail" @keydown.enter="goCourseDetail">
<div class="stat-card__label">培训详情</div>
<div class="upload-card__main">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M4 19V5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v14"/><path d="M2 19h20"/><path d="M8 7h8M8 11h6"/></svg>
<span :title="courseName(selectedCourseId)">{{ courseName(selectedCourseId) }}</span>
</div>
<div class="upload-card__hint">查看课程课件 / 随堂考试详情</div>
</div>
</div>
<input ref="photoInput" type="file" accept="image/*" multiple class="visually-hidden-input" @change="onEvidenceFiles($event, 'sign_photo')" />
<input ref="videoInput" type="file" accept="video/*" multiple class="visually-hidden-input" @change="onEvidenceFiles($event, 'training_video')" />
@@ -151,7 +160,7 @@
<script setup lang="ts">
import { computed, onMounted, ref, watch } from 'vue'
import { useRoute } from 'vue-router'
import { useRoute, useRouter } from 'vue-router'
import { MessagePlugin } from 'tdesign-vue-next'
import QRCode from 'qrcode'
import {
@@ -182,6 +191,7 @@ import { fmtBeijingTime } from '@/utils/datetime'
const props = defineProps<{ roles: string[]; admin?: boolean }>()
const route = useRoute()
const router = useRouter()
// 签到复核/代签:人事/课长(roles 已按权限组展开,经理自动命中)
const canReview = computed(() => props.admin || props.roles.some((r) => r === 'hr' || r === 'supervisor'))
// 佐证上传/删除:人事/课长/讲师(与课件上传同口径)
@@ -197,6 +207,15 @@ const exportLoading = ref(false)
const sessions = ref<TrainingCourseSession[]>([])
const courses = ref<TrainingCourse[]>([])
const selectedSessionId = ref('')
// 当前选中场次的课程 id:「培训详情」卡片回跳课程学习详情页用(2026-11 需求)
const selectedCourseId = computed(
() => sessions.value.find((s) => s.id === selectedSessionId.value)?.course_id || '',
)
// 培训详情:携课程 id 跳「培训签到」页的同源落地页(课程学习详情)。
const goCourseDetail = () => {
if (!selectedCourseId.value) return
router.push({ path: `/platform/training/course/${selectedCourseId.value}` })
}
const signCode = ref<TrainingSignCode | null>(null)
const summary = ref<SignSummary | null>(null)
const records = ref<TrainingSignRecord[]>([])