fix(bug):和信智汇学院上线培训 · 2026/11/27 10:00对该课程扫码签到如图所示学员信息丢失了!请核对矫正!
deploy-hxtesting / build-and-deploy (push) Successful in 1m17s
deploy-hxtesting / build-and-deploy (push) Successful in 1m17s
This commit is contained in:
1 parent
4f77907a8a
commit
0c471efb9f
8 files changed
+52
-11
No files matched your search
@@ -661,6 +661,10 @@ export interface TrainingSignRecord {
|
||||
status: 'normal' | 'late' | 'abnormal' | 'duplicate' | 'outside'
|
||||
abnormal_flags: string[]
|
||||
reviewed_by: string
|
||||
// 后端联查回填的学员展示字段(签到明细学员列优先用它,名册反查仅兜底)
|
||||
member_name?: string
|
||||
employee_no?: string
|
||||
dept_name?: string
|
||||
}
|
||||
|
||||
export interface SignSummary {
|
||||
|
||||
@@ -114,12 +114,12 @@
|
||||
<t-button v-if="canReview && signCode" variant="outline" size="small" @click="proxyVisible = true">补录</t-button>
|
||||
</div>
|
||||
<t-table :data="pagedRecords" :columns="recordColumns" row-key="id" size="small" :loading="loading">
|
||||
<template #member="{ row }">{{ memberLabel(row.member_id) }}</template>
|
||||
<template #member="{ row }">{{ recordMemberLabel(row) }}</template>
|
||||
<template #signed_at="{ row }">{{ fmtRecordTime(row.signed_at) }}</template>
|
||||
<template #channel="{ row }">{{ channelText(row.channel) }}</template>
|
||||
<template #status="{ row }">
|
||||
<t-tag :theme="statusTheme(row.status)" variant="light" size="small">{{ statusText(row.status) }}</t-tag>
|
||||
<t-tag v-for="f in row.abnormal_flags || []" :key="f" theme="danger" variant="outline" size="small" class="flag-tag">{{ flagText(f) }}</t-tag>
|
||||
<t-tag v-for="f in extraFlags(row)" :key="f" theme="danger" variant="outline" size="small" class="flag-tag">{{ flagText(f) }}</t-tag>
|
||||
</template>
|
||||
<template #op="{ row }">
|
||||
<template v-if="canReview && row.status !== 'normal'">
|
||||
@@ -378,6 +378,19 @@ const memberLabelText = (m: TrainingMember) =>
|
||||
.filter(Boolean)
|
||||
.join(' ')
|
||||
|
||||
// 签到明细学员列优先后端联查返回的「姓名 工号」(明细接口已 JOIN 员工档案,
|
||||
// 不再依赖名册全量反查 —— 名册分页截断时曾回退显示 member_id);缺失时回退
|
||||
// 名册标签,再回退 member_id 前缀。
|
||||
const recordMemberLabel = (row: TrainingSignRecord) => {
|
||||
const direct = [row.member_name || '', row.employee_no || ''].filter(Boolean).join(' ')
|
||||
return direct || memberLabel(row.member_id)
|
||||
}
|
||||
|
||||
// 状态标签已表达 outside 时,abnormal_flags 里的同名标记不再重复渲染
|
||||
// (复核前曾出现连续两个「定位异常」标签)。
|
||||
const extraFlags = (row: TrainingSignRecord) =>
|
||||
(row.abnormal_flags || []).filter((f) => !(f === 'outside' && row.status === 'outside'))
|
||||
|
||||
const loadAll = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user