diff --git a/yunkes/src/views/CallList.vue b/yunkes/src/views/CallList.vue index f8e876e..665c80c 100644 --- a/yunkes/src/views/CallList.vue +++ b/yunkes/src/views/CallList.vue @@ -254,6 +254,20 @@ const staffDrawerSections = computed(() => { }) /** 把通话类型(voice_call/wa_voice_call)映射到聊天渠道(wechat/whatsapp)。电话返回 null。 */ +function callSourceText(row: PhoneCall): string { + const v = cell(row, 'callFrom') ?? cell(row, 'dataFrom') + if (v === 1 || v === '1') return '手机' + return '--' +} + +function callDurationText(row: PhoneCall): string { + const sec = row.call_duration ?? 0 + if (!sec) return '--' + const m = Math.floor(sec / 60) + const s = sec % 60 + return `${String(m).padStart(2, '0')}'${String(s).padStart(2, '0')}"' +} + function chatChannel(ch: CallChannel): 'wechat' | 'whatsapp' | null { return ch === 'voice_call' ? 'wechat' : ch === 'wa_voice_call' ? 'whatsapp' : null } @@ -398,52 +412,67 @@ onMounted(() => { @row-click="openDrawer" > - + - 通话状态:{{ callStatusLabel(row.call_status, row.channel) }} - 类型:{{ callTypeLabel(row.channel) }} - 来源:{{ cell(row, 'from') || '--' }} + {{ callStatusLabel(row.call_status, row.channel) }} + 微信语音 + {{ callSourceText(row) }} - - + {{ cell(row, 'roomName') || cell(row, 'talker') || '--' }} {{ cell(row, 'roomId') || '--' }} - {{ cell(row, 'talkerNickName') }} - -- - {{ row.call_number || cell(row, 'talker') || '--' }} + + + + {{ cell(row, 'talkerNickName') }} + -- + {{ cell(row, 'talkerAlias') || cell(row, 'talker') || '--' }} + 备注名 {{ cell(row, 'friendRemark') }} + + - + - {{ cell(row, 'userWeChatNickName') }} - -- - {{ cell(row, 'userWeChatAlias') || cell(row, 'weChatId') || '--' }} + + + + {{ cell(row, 'userWeChatNickName') }} + -- + {{ cell(row, 'userWeChatAlias') || cell(row, 'weChatId') || '--' }} + + - {{ row.user_id_name }} - -- + {{ row.user_id_name || cell(row, 'userName') || '--' }} {{ cell(row, 'userPhone') || '--' }} - + - 播放 + + {{ callDurationText(row) }} + 播放 + -- 查看长语音 - - {{ formatCallDuration(row.call_duration) }} + + + {{ cell(row, 'endTime') || '--' }} + {{ callDurationText(row) }} + @@ -769,4 +798,12 @@ onMounted(() => { .yk-drawer__empty { color: #c0c4cc; } +.yk-call-person { + display: flex; + align-items: center; + gap: 8px; +} +.yk-call-person__meta { + min-width: 0; +}