fix(培训): 完善培训相关细节!

This commit is contained in:
runny committed 2026-09-22 19:42:15 +08:00
1 parent 453d910364
commit ae882d5d04
8 files changed
+96 -16

No files matched your search

@@ -431,7 +431,13 @@ const compactSummary = computed(() => {
total: workspace.totalQuestionCount,
});
}
return workspace.isPassed ? t('chat.training.result.passTitle') : t('chat.training.result.failTitle');
// 通过标题按培训类型区分:出国规章培训为纯视频学习,通过文案不使用"新人培训考试"表述
if (workspace.isPassed) {
return workspace.isOverseasRegulationsTraining
? t('chat.training.result.overseasPassTitle')
: t('chat.training.result.passTitle');
}
return t('chat.training.result.failTitle');
});
const ruleItems = computed(() => ([
@@ -1189,14 +1195,15 @@ const currentSafetyStageText = computed(() => {
{{ workspace.isPassed ? $t('chat.training.result.passedTag') : $t('chat.training.result.failedTag') }}
</div>
<h3 class="mt-2.5 text-lg font-semibold text-primary md:text-xl">
{{ workspace.isPassed ? $t('chat.training.result.passTitle') : $t('chat.training.result.failTitle') }}
{{ workspace.isPassed ? (workspace.isOverseasRegulationsTraining ? $t('chat.training.result.overseasPassTitle') : $t('chat.training.result.passTitle')) : $t('chat.training.result.failTitle') }}
</h3>
<p class="mt-2 text-sm leading-6 text-secondary">
<!-- [RULE] 出国规章培训为纯视频学习(无考试),描述文案与考试语义不匹配,仅其他培训类型展示 -->
<p v-if="!workspace.isOverseasRegulationsTraining" class="mt-2 text-sm leading-6 text-secondary">
{{ workspace.isPassed ? $t('chat.training.result.passDescription') : $t('chat.training.result.failDescription', { passScore: workspace.passScore }) }}
</p>
</div>
<div class="grid grid-cols-2 gap-2 text-center">
<div v-if="!workspace.isOverseasRegulationsTraining" class="grid grid-cols-2 gap-2 text-center">
<div class="rounded-2xl bg-surface-soft px-4 py-2.5">
<div class="text-xs text-muted">{{ $t('chat.training.result.scoreLabel') }}</div>
<div class="text-xl font-semibold text-primary">{{ workspace.score }}</div>
@@ -1208,12 +1215,13 @@ const currentSafetyStageText = computed(() => {
</div>
</div>
<div class="mt-3 grid gap-2.5 md:grid-cols-3">
<div class="rounded-2xl border border-default bg-surface-soft p-3.5">
<!-- [RULE] 出国规章培训完成页仅保留与视频学习相关的完成日期,对错题数等考试统计一律隐藏 -->
<div class="mt-3 grid gap-2.5" :class="workspace.isOverseasRegulationsTraining ? '' : 'md:grid-cols-3'">
<div v-if="!workspace.isOverseasRegulationsTraining" class="rounded-2xl border border-default bg-surface-soft p-3.5">
<div class="text-xs text-muted">{{ $t('chat.training.result.correctCount') }}</div>
<div class="mt-1 text-lg font-semibold text-primary">{{ workspace.correctCount }}</div>
</div>
<div class="rounded-2xl border border-default bg-surface-soft p-3.5">
<div v-if="!workspace.isOverseasRegulationsTraining" class="rounded-2xl border border-default bg-surface-soft p-3.5">
<div class="text-xs text-muted">{{ $t('chat.training.result.wrongCount') }}</div>
<div class="mt-1 text-lg font-semibold text-primary">{{ workspace.wrongCount }}</div>
</div>