后台管理功能补充

This commit is contained in:
2025-12-25 00:13:42 +08:00
parent 90d9de0e71
commit f4bc9f6dab
9 changed files with 259 additions and 3 deletions
+34
View File
@@ -67,6 +67,28 @@ export interface DashboardStats {
updateTime: string
}
/**
* AI配置调用次数统计项类型定义
*/
export interface AiConfigCallStatsItem {
configId: string
configName: string
configKey: string
provider: string
configType: string
workflowId: string
isEnabled: number
isDefault: number
callCount: number
}
/**
* AI配置调用次数统计响应类型定义
*/
export interface AiConfigCallStatsResponse {
items: AiConfigCallStatsItem[]
}
/**
* 获取仪表盘统计数据
*/
@@ -137,4 +159,16 @@ export function getRecentLogins(limit: number = 10) {
method: 'get',
params: { limit }
})
}
/**
* 获取 AI 配置调用次数统计(按调用次数倒序)
* @param limit 返回条数,默认 10
*/
export function getAiConfigCallStats(limit: number = 10) {
return request<AiConfigCallStatsResponse>({
url: '/admin/dashboard/aiConfigCallStats',
method: 'get',
params: { limit }
})
}