From 17ee5a1a6c7ddcec472525b5037ace316098230b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E5=BF=B5?= Date: Tue, 11 Aug 2026 15:25:42 +0800 Subject: [PATCH] =?UTF-8?q?feat(calls):=20=E5=BE=AE=E4=BF=A1=E8=AF=AD?= =?UTF-8?q?=E9=9F=B3=20=E5=A5=BD=E5=8F=8B/=E7=BE=A4=20scope=20=E7=AD=9B?= =?UTF-8?q?=E9=80=89(=E5=AF=B9=E9=BD=90=E4=BA=91=E5=AE=A2,client-side=20is?= =?UTF-8?q?Room=20=E8=BF=87=E6=BB=A4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude --- yunkes/src/views/CallList.vue | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/yunkes/src/views/CallList.vue b/yunkes/src/views/CallList.vue index 43e8ac0..d834087 100644 --- a/yunkes/src/views/CallList.vue +++ b/yunkes/src/views/CallList.vue @@ -19,6 +19,10 @@ import VoiceClipModal from '@/components/VoiceClipModal.vue' // doesn't fight the shared top-bar wechat/whatsapp store used by customers/groups. const callType = ref('voice_call') +// 微信语音 tab scope filter: 对齐云客 微信好友/微信群 二分(isRoom 0=好友, 1=群)。 +// 仅在 voice_call tab 生效;client-side 过滤当前页。 +const voiceScope = ref<'all' | 'friend' | 'group'>('all') + const calls = ref([]) const total = ref(0) const page = ref(1) @@ -82,9 +86,27 @@ function handlePageSizeChange(s: number): void { function onTabChange(_name: TabPaneName): void { // v-model has already updated callType; just reset paging and reload. page.value = 1 + // 切 tab 时复位 scope,避免把 微信群/好友 筛选带到 WA语音/电话 tab。 + voiceScope.value = 'all' load() } +/** + * 当前表格要渲染的行。非 voice_call tab 原样返回;voice_call tab 按 voiceScope + * 依 isRoom(0=好友, 1=群)做页内过滤。云客 isRoom 可能是 number/string/boolean, + * 三种都判一下。 + */ +const displayCalls = computed(() => { + if (callType.value !== 'voice_call' || voiceScope.value === 'all') { + return calls.value + } + return calls.value.filter((row) => { + const v = cell(row, 'isRoom') + const isGroup = v === 1 || v === '1' || v === true + return voiceScope.value === 'group' ? isGroup : !isGroup + }) +}) + /** * Read a raw_json camelCase key off a call, preferring the structured * snake_case column when it is populated. The first argument is the row so the @@ -200,9 +222,20 @@ onMounted(load) style="margin-bottom: 12px" /> + + 全部 + 微信好友 + 微信群 + +