feat(staffchat): 消息右列(近14天默认窗+9类类型过滤+msgid定位+导出,复制改造自ChatTimeline)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
浅念
2026-08-25 18:10:30 +08:00
parent 98fb4b8248
commit 3aaf4ec8fa
2 changed files with 659 additions and 7 deletions
+4 -3
View File
@@ -2,7 +2,7 @@
各 pane 由 Task 10-14 逐个替换占位实现。 -->
<script setup lang="ts">
import { computed, ref, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { useRouter } from 'vue-router'
import { getAccounts } from '@/api'
import type { Account } from '@/api/types'
import StaffChatSide, { TAB_KEYS, type TabKey } from '@/components/staffchat/StaffChatSide.vue'
@@ -13,7 +13,6 @@ import ContactsPane from '@/components/staffchat/ContactsPane.vue'
import StatsPane from '@/components/staffchat/StatsPane.vue'
const props = defineProps<{ ownerId: string; tab?: string; talkerId?: string }>()
const route = useRoute()
const router = useRouter()
// TabKey/TAB_KEYS 从 StaffChatSide 导出(NAVS 单一事实源);VALID 仅做运行时兜底
const VALID: readonly TabKey[] = TAB_KEYS
@@ -48,7 +47,9 @@ function onSelectSession(s: { type: 'friend' | 'group'; talker_id?: string | nul
tab: s.type === 'group' ? 'group' : 'single',
talkerId: s.talker_id ?? s.room_id ?? '',
},
query: route.query.msgid ? { msgid: String(route.query.msgid) } : {},
// 用户主动换会话 → 丢弃 ?msgid 定位意图(定位只对跳转来源的会话有意义,
// 带到新会话必然找不到目标,反而误弹「不在当前页」提示)
query: {},
})
}