From 4c3bc3ee933fc1eda623fc7845858f5b0eed052f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E5=BF=B5?= Date: Tue, 25 Aug 2026 19:32:14 +0800 Subject: [PATCH] =?UTF-8?q?feat(staffchat):=20=E7=BB=9F=E8=AE=A1=E5=88=86?= =?UTF-8?q?=E6=9E=907tab(=E5=88=86=E5=9E=8B=E6=98=8E=E7=BB=86=E5=88=97+?= =?UTF-8?q?=E8=AE=A1=E6=95=B0=E5=BE=BD=E6=A0=87+=E8=BF=917=E5=A4=A9?= =?UTF-8?q?=E7=AA=97+msgid=E5=AE=9A=E4=BD=8D,=E5=AF=B9=E9=BD=90=E4=BA=91?= =?UTF-8?q?=E5=AE=A2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - StatsPane 占位替换: 7 tab(label 带 (N) 计数)+daterange 默认近7天(清空后端兜底) - 明细列配置驱动(KIND_COLS);link 列跳 single/group 聊天;红包/转账行带 ?msgid 定位 - 语音通话列对齐 CallList(通话人/类型/呼入呼出/接通状态/时长/录音播放 dialog/时间/操作) - 敏感词 tab 空态卡(词库未配置,待 C1 接入,零请求) - 员工微信列用资料卡信息(明细行无 staff 字段,数据本属该员工) - counts 与明细解耦;双 seq 竞态守卫(兄弟组件惯例) - api: getStaffStatsDetail kind 收紧为 StaffStatsKind 联合(后端 Literal 6 值) Co-Authored-By: Claude --- yunkes/src/api/index.ts | 13 +- yunkes/src/components/staffchat/StatsPane.vue | 621 +++++++++++++++++- 2 files changed, 629 insertions(+), 5 deletions(-) diff --git a/yunkes/src/api/index.ts b/yunkes/src/api/index.ts index 5f7d087..adc8c0e 100644 --- a/yunkes/src/api/index.ts +++ b/yunkes/src/api/index.ts @@ -378,10 +378,19 @@ export function getMoments(query: MomentsQuery): Promise { ) } +/** staff-stats 明细 kind(与后端 KindParam Literal 6 值一致;无 sensitive——词库未接入)。 */ +export type StaffStatsKind = + | 'new_customers' + | 'new_groups' + | 'red_transfer' + | 'del_customers' + | 'blocked_customers' + | 'voice_calls' + export interface StaffStatsQuery { wechat_id: string /** 传 kind 走明细模式,缺省返回 7 数字 counts。 */ - kind?: string + kind?: StaffStatsKind start?: number end?: number } @@ -400,7 +409,7 @@ export function getStaffStatsCounts( } export function getStaffStatsDetail( - query: StaffStatsQuery & { kind: string }, + query: StaffStatsQuery & { kind: StaffStatsKind }, ): Promise { return getJson( '/staff-stats', diff --git a/yunkes/src/components/staffchat/StatsPane.vue b/yunkes/src/components/staffchat/StatsPane.vue index 81a3337..af9efdf 100644 --- a/yunkes/src/components/staffchat/StatsPane.vue +++ b/yunkes/src/components/staffchat/StatsPane.vue @@ -1,8 +1,623 @@ - + + +