feat(agency): 工作台统计数据分类显示脚本和视频

- 待审核数量分脚本/视频显示
- 今日通过数量分脚本/视频显示
- 进行中数量分脚本/视频显示
- 项目概览审核中状态分脚本审核/视频审核显示

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Your Name 2026-02-06 15:47:43 +08:00
parent 4753626e5a
commit 576c89c8c4

View File

@ -18,10 +18,19 @@ import {
// 模拟统计数据
const stats = {
pendingReview: 12,
pendingReview: {
script: 8,
video: 4,
},
pendingAppeal: 3,
todayPassed: 28,
inProgress: 45,
todayPassed: {
script: 18,
video: 10,
},
inProgress: {
script: 25,
video: 20,
},
}
// 模拟紧急待办
@ -60,7 +69,8 @@ const projectOverview = [
total: 20,
submitted: 15,
passed: 10,
reviewing: 3,
reviewingScript: 2,
reviewingVideo: 1,
needRevision: 2,
},
{
@ -69,7 +79,8 @@ const projectOverview = [
total: 12,
submitted: 8,
passed: 6,
reviewing: 1,
reviewingScript: 1,
reviewingVideo: 0,
needRevision: 1,
},
{
@ -78,7 +89,8 @@ const projectOverview = [
total: 15,
submitted: 12,
passed: 9,
reviewing: 2,
reviewingScript: 1,
reviewingVideo: 1,
needRevision: 1,
},
]
@ -136,7 +148,11 @@ export default function AgencyDashboard() {
<div className="flex items-center justify-between">
<div>
<div className="text-sm text-text-secondary"></div>
<div className="text-3xl font-bold text-accent-coral">{stats.pendingReview}</div>
<div className="text-3xl font-bold text-accent-coral">{stats.pendingReview.script + stats.pendingReview.video}</div>
<div className="flex gap-3 mt-1 text-xs text-text-tertiary">
<span> {stats.pendingReview.script}</span>
<span> {stats.pendingReview.video}</span>
</div>
</div>
<div className="w-12 h-12 rounded-full bg-accent-coral/20 flex items-center justify-center">
<Clock size={24} className="text-accent-coral" />
@ -162,7 +178,11 @@ export default function AgencyDashboard() {
<div className="flex items-center justify-between">
<div>
<div className="text-sm text-text-secondary"></div>
<div className="text-3xl font-bold text-accent-green">{stats.todayPassed}</div>
<div className="text-3xl font-bold text-accent-green">{stats.todayPassed.script + stats.todayPassed.video}</div>
<div className="flex gap-3 mt-1 text-xs text-text-tertiary">
<span> {stats.todayPassed.script}</span>
<span> {stats.todayPassed.video}</span>
</div>
</div>
<div className="w-12 h-12 rounded-full bg-accent-green/20 flex items-center justify-center">
<CheckCircle size={24} className="text-accent-green" />
@ -175,7 +195,11 @@ export default function AgencyDashboard() {
<div className="flex items-center justify-between">
<div>
<div className="text-sm text-text-secondary"></div>
<div className="text-3xl font-bold text-accent-indigo">{stats.inProgress}</div>
<div className="text-3xl font-bold text-accent-indigo">{stats.inProgress.script + stats.inProgress.video}</div>
<div className="flex gap-3 mt-1 text-xs text-text-tertiary">
<span> {stats.inProgress.script}</span>
<span> {stats.inProgress.video}</span>
</div>
</div>
<div className="w-12 h-12 rounded-full bg-accent-indigo/20 flex items-center justify-center">
<FileVideo size={24} className="text-accent-indigo" />
@ -225,47 +249,59 @@ export default function AgencyDashboard() {
</CardHeader>
<CardContent>
<div className="space-y-4">
{projectOverview.map((project) => (
<div key={project.id} className="p-4 rounded-lg bg-bg-elevated">
<div className="flex items-center justify-between mb-3">
<span className="font-medium text-text-primary">{project.name}</span>
<span className="text-sm text-text-secondary">
{project.submitted}/{project.total}
</span>
{projectOverview.map((project) => {
const totalReviewing = project.reviewingScript + project.reviewingVideo
return (
<div key={project.id} className="p-4 rounded-lg bg-bg-elevated">
<div className="flex items-center justify-between mb-3">
<span className="font-medium text-text-primary">{project.name}</span>
<span className="text-sm text-text-secondary">
{project.submitted}/{project.total}
</span>
</div>
<div className="flex h-3 rounded-full overflow-hidden bg-bg-page">
<div
className="bg-accent-green transition-all"
style={{ width: `${(project.passed / project.total) * 100}%` }}
title={`已通过: ${project.passed}`}
/>
<div
className="bg-accent-indigo transition-all"
style={{ width: `${(project.reviewingScript / project.total) * 100}%` }}
title={`脚本审核中: ${project.reviewingScript}`}
/>
<div
className="bg-purple-500 transition-all"
style={{ width: `${(project.reviewingVideo / project.total) * 100}%` }}
title={`视频审核中: ${project.reviewingVideo}`}
/>
<div
className="bg-orange-500 transition-all"
style={{ width: `${(project.needRevision / project.total) * 100}%` }}
title={`需修改: ${project.needRevision}`}
/>
</div>
<div className="flex flex-wrap gap-x-4 gap-y-1 mt-2 text-xs text-text-secondary">
<span className="flex items-center gap-1">
<span className="w-2 h-2 bg-accent-green rounded-full" />
{project.passed}
</span>
<span className="flex items-center gap-1">
<span className="w-2 h-2 bg-accent-indigo rounded-full" />
{project.reviewingScript}
</span>
<span className="flex items-center gap-1">
<span className="w-2 h-2 bg-purple-500 rounded-full" />
{project.reviewingVideo}
</span>
<span className="flex items-center gap-1">
<span className="w-2 h-2 bg-orange-500 rounded-full" />
{project.needRevision}
</span>
</div>
</div>
<div className="flex h-3 rounded-full overflow-hidden bg-bg-page">
<div
className="bg-accent-green transition-all"
style={{ width: `${(project.passed / project.total) * 100}%` }}
title={`已通过: ${project.passed}`}
/>
<div
className="bg-accent-indigo transition-all"
style={{ width: `${(project.reviewing / project.total) * 100}%` }}
title={`审核中: ${project.reviewing}`}
/>
<div
className="bg-orange-500 transition-all"
style={{ width: `${(project.needRevision / project.total) * 100}%` }}
title={`需修改: ${project.needRevision}`}
/>
</div>
<div className="flex gap-4 mt-2 text-xs text-text-secondary">
<span className="flex items-center gap-1">
<span className="w-2 h-2 bg-accent-green rounded-full" />
{project.passed}
</span>
<span className="flex items-center gap-1">
<span className="w-2 h-2 bg-accent-indigo rounded-full" />
{project.reviewing}
</span>
<span className="flex items-center gap-1">
<span className="w-2 h-2 bg-orange-500 rounded-full" />
{project.needRevision}
</span>
</div>
</div>
))}
)
})}
</div>
</CardContent>
</Card>