From f7e1f1d775d804169729291360443bdd63b4a88e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E5=BF=B5?= Date: Mon, 24 Aug 2026 10:34:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(calls):=20=E5=91=98=E5=B7=A5=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=8A=BD=E5=B1=89=E6=8E=A5=E7=BA=BF=E8=A1=A5=E5=85=A8?= =?UTF-8?q?(=E5=87=BD=E6=95=B0=E4=BD=93+=E7=8A=B6=E6=80=81=E5=8F=98?= =?UTF-8?q?=E9=87=8F,=E4=B8=8A=E8=BD=AE=E6=96=AD=E8=A8=80=E4=B8=AD?= =?UTF-8?q?=E6=96=AD=E5=8F=AA=E5=86=99=E5=85=A5=E4=BA=86=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude --- yunkes/src/views/CallList.vue | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/yunkes/src/views/CallList.vue b/yunkes/src/views/CallList.vue index 5407444..a3a2774 100644 --- a/yunkes/src/views/CallList.vue +++ b/yunkes/src/views/CallList.vue @@ -72,6 +72,8 @@ const voiceClipStaffName = ref(null) // All-fields drawer state. const drawerOpen = ref(false) const drawerCall = ref(null) +const staffDrawerOpen = ref(false) +const staffDrawerCall = ref(null) const tabs: { value: CallChannel; label: string }[] = [ { value: 'voice_call', label: '微信语音' }, @@ -231,14 +233,25 @@ function openDrawer(row: PhoneCall): void { * calls whose structured user_id is null still resolve. */ function goToStaffDetail(row: PhoneCall): void { - const id = row.user_id ?? (cell(row, 'userId') as string | undefined) - if (!id) { - ElMessage.info('该通话无员工 userId,无法查看员工详情') - return - } - router.push({ name: 'staff-detail', params: { userId: String(id) } }) + staffDrawerCall.value = row + staffDrawerOpen.value = true } +/** 员工信息抽屉的字段(从通话行的 raw_json 提取员工侧字段)。 */ +const staffDrawerSections = computed(() => { + const row = staffDrawerCall.value + if (!row) return [] + const fields: { label: string; text: string }[] = [ + { label: '姓名', text: String(cell(row, 'userName') ?? row.user_id_name ?? '--') }, + { label: '手机号', text: String(cell(row, 'userPhone') ?? '--') }, + { label: '工号', text: String(cell(row, 'jobNumber') ?? '--') }, + { label: '员工微信昵称', text: String(cell(row, 'weChatNickName') ?? '--') }, + { label: '员工微信', text: String(cell(row, 'weChatId') ?? '--') }, + { label: '部门', text: String(cell(row, 'departmentName') ?? '--') }, + ] + return [{ title: '员工信息', fields }] +}) + /** 把通话类型(voice_call/wa_voice_call)映射到聊天渠道(wechat/whatsapp)。电话返回 null。 */ function chatChannel(ch: CallChannel): 'wechat' | 'whatsapp' | null { return ch === 'voice_call' ? 'wechat' : ch === 'wa_voice_call' ? 'whatsapp' : null