From 16149fd49968017154a0249f8a0e0b8d575238c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E5=BF=B5?= Date: Wed, 5 Aug 2026 19:09:24 +0800 Subject: [PATCH] =?UTF-8?q?feat(staff):=20WhatsApp=20nickname=20=E2=86=92?= =?UTF-8?q?=20chat=20timeline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude --- yunkes/src/views/StaffList.vue | 38 +++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/yunkes/src/views/StaffList.vue b/yunkes/src/views/StaffList.vue index 34b0b52..8f21df6 100644 --- a/yunkes/src/views/StaffList.vue +++ b/yunkes/src/views/StaffList.vue @@ -2,7 +2,7 @@ import { computed, onMounted, reactive, ref } from 'vue' import { useRouter } from 'vue-router' import { ElMessage } from 'element-plus' -import { getAccounts, getCustomers } from '@/api' +import { getAccounts, getCustomers, getMessages } from '@/api' import type { Account, Channel } from '@/api/types' import YkStaffDetailModal from '@/components/YkStaffDetailModal.vue' import { useChannelStore } from '@/stores/channel' @@ -193,6 +193,25 @@ function viewGroups(row: Account): void { }) } +async function viewChat(row: Account) { + // 取该账号最近一条会话,跳 ChatTimeline(降级:云客是会话列表,我们跳最近一条) + const res = await getMessages({ + channel: row.channel, + owner_account_id: row.account_id, + page: 1, + page_size: 1, + }) + const m = res.items[0] + if (!m) { + ElMessage.info('该账号暂无聊天记录') + return + } + const path = m.room_id + ? `/group/${row.channel}/${row.account_id}/${m.room_id}` + : `/chat/${row.channel}/${row.account_id}/${m.talker_id}` + router.push(path) +} + // --------------------------------------------------------------------------- // Detail modal (stat-number click → 明细) — reused for 添加人数 / 沟通人数. // fetcher is set by open*Modal; the modal triggers it on open. @@ -555,9 +574,13 @@ onMounted(() => {
{{ initials(row) }}
-
+ {{ cellText(row, 'nickName') }} -
+
{{ cellText(row, 'phone') }}
@@ -779,6 +802,15 @@ onMounted(() => { text-overflow: ellipsis; } +.yk-link { + color: var(--el-color-primary); + cursor: pointer; +} + +.yk-link:hover { + opacity: 0.8; +} + .yk-staffinfo__pair { font-size: 12px; line-height: 1.7;