feat(全局概览): 快捷入口下方新增人员操作统计区域

- 表格展示每人 接收/转交/上传备注/总次数,按总次数降序
- 跟随顶部时间筛选(今天/近7天/近30天/自定义)联动刷新
This commit is contained in:
2026-08-28 13:14:13 +08:00
parent b85188e625
commit 72fbb8b501
2 changed files with 80 additions and 3 deletions

View File

@ -54,6 +54,15 @@ export interface RejectedTask {
rejected_at: string | null;
}
export interface UserOperation {
user_id: string;
user_name: string;
receive_count: number;
transfer_count: number;
record_count: number;
total: number;
}
export interface PersonDevice {
product_id: string;
serial_number: string;
@ -142,6 +151,14 @@ export async function fetchRejectedTasks(since?: string, until?: string): Promis
return data;
}
export async function fetchUserOperations(since?: string, until?: string): Promise<UserOperation[]> {
const params: Record<string, string> = {};
if (since) params.since = since;
if (until) params.until = until;
const { data } = await api.get<UserOperation[]>("/dashboard/user-operations", { params });
return data;
}
export async function fetchPeopleWorkload(): Promise<PersonWorkload[]> {
const { data } = await api.get<PersonWorkload[]>("/dashboard/people-workload");
return data;