feat(staffchat): 统计分析7tab(分型明细列+计数徽标+近7天窗+msgid定位,对齐云客)
- 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 <noreply@anthropic.com>
This commit is contained in:
+11
-2
@@ -378,10 +378,19 @@ export function getMoments(query: MomentsQuery): Promise<MomentsList> {
|
||||
)
|
||||
}
|
||||
|
||||
/** 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<StaffStatsDetail> {
|
||||
return getJson<StaffStatsDetail>(
|
||||
'/staff-stats',
|
||||
|
||||
Reference in New Issue
Block a user