This commit is contained in:
2026-07-21 10:40:54 +08:00
parent 5538ddaa43
commit 65fc424583
6 changed files with 35 additions and 7 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -28,7 +28,7 @@
}
})();
</script>
<script type="module" crossorigin src="/assets/index-W0SXIbZy.js"></script>
<script type="module" crossorigin src="/assets/index-eTB6NUIy.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-D7ShJUt4.css">
</head>
<body>
+5 -5
View File
@@ -79,10 +79,10 @@ const AdminDashboard: React.FC = () => {
{/* 日期筛选 */}
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', flexWrap: 'wrap', gap: 12, marginBottom: 20 }}>
<Space>
<Button type={activeRange === 'today' ? 'primary' : 'default'} size="small" onClick={() => setActiveRange('today')}></Button>
<Button type={activeRange === 'yesterday' ? 'primary' : 'default'} size="small" onClick={() => setActiveRange('yesterday')}></Button>
<Button type={activeRange === 'week' ? 'primary' : 'default'} size="small" onClick={() => setActiveRange('week')}></Button>
<Button type={activeRange === 'month' ? 'primary' : 'default'} size="small" onClick={() => setActiveRange('month')}></Button>
<Button type={activeRange === 'today' ? 'primary' : 'default'} size="small" onClick={handleToday}></Button>
<Button type={activeRange === 'yesterday' ? 'primary' : 'default'} size="small" onClick={handleYesterday}></Button>
<Button type={activeRange === 'week' ? 'primary' : 'default'} size="small" onClick={handleWeek}></Button>
<Button type={activeRange === 'month' ? 'primary' : 'default'} size="small" onClick={handleMonth}></Button>
</Space>
<div style={{ display: 'flex', alignItems: 'center', gap: 8, background: '#fff', border: '1px solid #e2e8f0', padding: '4px 12px', borderRadius: 8 }}>
<CalendarOutlined style={{ color: '#64748b' }} />
@@ -121,7 +121,7 @@ const AdminDashboard: React.FC = () => {
</Col>
<Col xs={24} lg={12}>
<ChartCard title="各模块积分占比" loading={loading}>
<ModulePie data={stats?.dailyCreditsByModule || []} />
<ModulePie data={stats?.periodCreditsByModule || []} />
</ChartCard>
</Col>
<Col xs={24} lg={12}>
+1
View File
@@ -233,6 +233,7 @@ export interface AdminStats {
lastPeriodRevenue: number;
lastPeriodCreditsConsumed: number;
dailyCreditsByModule: DailyCredit[];
periodCreditsByModule: DailyCredit[];
creditsByTeam: TeamCredit[];
modelUsage: ModelUsageOut[];
}