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 @@ - + + +