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" >