feat: 新增分析页

This commit is contained in:
2024-10-18 00:21:19 +08:00
parent ad31d9f2ff
commit 455f2695c8
11 changed files with 766 additions and 10 deletions

View File

@@ -14,3 +14,23 @@ export function listDashboardAccessTrend(days: number) {
export function listDashboardNotice() {
return http.get<T.DashboardNoticeResp[]>(`${BASE_URL}/notice`)
}
/** @desc 查询访问时段分析 */
export function getAnalysisTimeslot() {
return http.get<T.DashboardChartCommonResp[]>(`${BASE_URL}/analysis/timeslot`)
}
/** @desc 查询模块分析 */
export function getAnalysisModule() {
return http.get<T.DashboardChartCommonResp[]>(`${BASE_URL}/analysis/module`)
}
/** @desc 查询终端分析 */
export function getAnalysisOs() {
return http.get<T.DashboardChartCommonResp[]>(`${BASE_URL}/analysis/os`)
}
/** @desc 查询浏览器分析 */
export function getAnalysisBrowser() {
return http.get<T.DashboardChartCommonResp[]>(`${BASE_URL}/analysis/browser`)
}

View File

@@ -12,6 +12,12 @@ export interface DashboardAccessTrendResp {
ipCount: number
}
/** 仪表盘图表类型 */
export interface DashboardChartCommonResp {
name: string
value: number
}
/** 仪表盘公告类型 */
export interface DashboardNoticeResp {
id: number