feat: add dashboard cahrts display

This commit is contained in:
engigu
2025-12-21 21:49:34 +08:00
parent a66f14b5f4
commit 0ff136cfcd
6 changed files with 473 additions and 41 deletions
+16 -1
View File
@@ -102,7 +102,9 @@ export const api = {
},
dashboard: {
stats: () => request<Stats>('/stats'),
sentence: () => request<{ sentence: string }>('/sentence')
sentence: () => request<{ sentence: string }>('/sentence'),
sendStats: () => request<DailyStats[]>('/sendstats'),
taskStats: () => request<TaskStatsItem[]>('/taskstats')
},
settings: {
changePassword: (data: { old_password: string; new_password: string }) =>
@@ -289,3 +291,16 @@ export interface LoginLogListResponse {
page: number
page_size: number
}
export interface DailyStats {
day: string
total: number
success: number
failed: number
}
export interface TaskStatsItem {
task_id: number
task_name: string
count: number
}