fix(mobile): align practice scene copy with task context

This commit is contained in:
2026-07-09 22:10:31 +08:00
parent cc3581a27a
commit 61a26fc543
2 changed files with 13 additions and 1 deletions
+12 -1
View File
@@ -49,7 +49,7 @@
<view v-if="loggedIn" class="panel scenario-card">
<text class="scenario-badge">今日小训</text>
<text class="scenario-title">{{ activeScenarioName }}</text>
<text class="scenario-desc">业主投诉服务或设施问题时,练习承接情绪、说明流程、给出反馈节点。</text>
<text class="scenario-desc">{{ scenarioDescription }}</text>
<view v-if="prepCard" class="prep-card">
<view class="prep-head">
<text>训练前预习卡</text>
@@ -224,6 +224,17 @@ const hasTraineeReply = computed(() => turns.value.some((item) => item.role ===
const canFinishPractice = computed(() => hasTraineeReply.value && !redFlagActive.value);
const hasCoachState = computed(() => emotionScore.value > 0 || trustScore.value > 0 || redFlagActive.value);
const canAdjustCoach = computed(() => status.value === 'active' && lastCoachRoundIndex.value !== null && turns.value.some((item) => item.role === 'coach'));
const activeAssignment = computed(() => assignments.value.find((item) => item.id === activeAssignmentId.value));
const scenarioDescription = computed(() => {
const points = (prepCard.value?.keyPoints || []).map((item) => item.trim()).filter(Boolean).slice(0, 2);
if (points.length) return `本场重点:${points.join(';')}`;
if (activeAssignment.value?.reason) return activeAssignment.value.reason;
const name = activeScenarioName.value;
if (/催|缴|费|停车/.test(name)) return '练习承接缴费异议、说明规则依据、给出缴费路径和跟进节点。';
if (/报修|维修|设施|电梯|漏水/.test(name)) return '练习记录问题、安抚情绪、说明报修流转和反馈时限。';
if (/突发|应急|安全|火灾|摔|道闸|车库/.test(name)) return '练习先稳现场、同步上报、留痕取证和风险告知。';
return '练习承接业主情绪、说明处理动作、明确反馈时间和责任边界。';
});
const styleOptions = [
{ value: 'serious', label: '再严肃' },
{ value: 'gentle', label: '再温柔' },