diff --git a/yunkes/src/utils/callFields.ts b/yunkes/src/utils/callFields.ts index 9a0c111..2853d65 100644 --- a/yunkes/src/utils/callFields.ts +++ b/yunkes/src/utils/callFields.ts @@ -55,6 +55,17 @@ export const CALL_FIELD_LABELS: Record = { // 关联与版本 planCustomerName: '关联客户', version: '版本', + // 微信/WA 语音 + userWeChatNickName: '员工微信昵称', + userWeChatAlias: '员工微信号', + userPhone: '员工手机', + talker: '客户号', + talkerNickName: '客户昵称', + talkerAlias: '客户微信号', + weChatId: '员工微信ID', + callFileId: '录音文件ID', + from: '通话来源', + isRoom: '是否群通话', } /** diff --git a/yunkes/src/utils/format.ts b/yunkes/src/utils/format.ts index a701691..cfac857 100644 --- a/yunkes/src/utils/format.ts +++ b/yunkes/src/utils/format.ts @@ -82,13 +82,15 @@ export function wechatTypeLabel(typeRaw?: number | null): string { // Phone / voice call rendering // --------------------------------------------------------------------------- -/** Call-type (PhoneCall.channel) label — 电话 vs 语音通话. */ +/** Call-type (PhoneCall.channel) label — 电话 vs 语音通话 vs WA 语音通话. */ export function callTypeLabel(channel?: string | null): string { switch (channel) { case 'phone_call': return '电话' case 'voice_call': return '语音通话' + case 'wa_voice_call': + return 'WA 语音通话' default: return channel ?? '未知' } @@ -101,17 +103,26 @@ export function callDirectionLabel(incoming?: number | null): string { } /** - * Call status. The upstream schema uses 1 = 已接通 (answered/connected) and - * 0 = 未接通 (missed/failed); other codes fall back to the raw value so the UI - * never hides information. + * Call connected/missed label. The upstream ``call_status`` polarity differs by + * channel (verified against smoke.db recording correlation + scraper code): + * • phone_call: 0 = 未接通, 2 = 已接通. + * • voice_call / wa_voice_call: 1 = 已接通, 2 = 未接通. + * Value 2 is the only code that flips meaning across channels, so it alone + * branches on ``channel``; 0/1 are stable. Unknown codes pass through so the + * UI never hides information. */ -export function callStatusLabel(status?: number | null): string { +export function callStatusLabel( + status?: number | null, + channel?: string | null, +): string { if (status == null) return '--' switch (status) { - case 1: - return '已接通' case 0: return '未接通' + case 1: + return '已接通' + case 2: + return channel === 'phone_call' ? '已接通' : '未接通' default: return `状态 ${status}` } diff --git a/yunkes/src/views/CallList.vue b/yunkes/src/views/CallList.vue index 96e382a..6177988 100644 --- a/yunkes/src/views/CallList.vue +++ b/yunkes/src/views/CallList.vue @@ -160,7 +160,7 @@ onMounted(load)