代理商端前端: - 新增达人管理页面(含任务申诉次数管理) - 新增消息中心(含申诉次数申请审批) - 新增 Brief 管理(列表、详情) - 新增审核中心(脚本审核、视频审核) - 新增数据报表页面 品牌方端前端: - 优化首页仪表盘布局 - 新增项目管理(列表、详情、创建) - 新增代理商管理页面 - 新增审核中心(脚本终审、视频终审) - 新增系统设置页面 文档更新: - 申诉次数改为按任务分配(每任务初始1次) - 更新 PRD、FeatureSummary、User_Role_Interfaces 等文档 - 更新 UI 设计规范和开发计划 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
274 lines
9.3 KiB
TypeScript
274 lines
9.3 KiB
TypeScript
'use client'
|
||
|
||
import { useState } from 'react'
|
||
import Link from 'next/link'
|
||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/Card'
|
||
import { Button } from '@/components/ui/Button'
|
||
import { SuccessTag, PendingTag, WarningTag, ErrorTag } from '@/components/ui/Tag'
|
||
import {
|
||
FileText,
|
||
Video,
|
||
Search,
|
||
Filter,
|
||
Clock,
|
||
User,
|
||
Building,
|
||
ChevronRight,
|
||
AlertTriangle
|
||
} from 'lucide-react'
|
||
|
||
// 模拟脚本待审列表
|
||
const mockScriptTasks = [
|
||
{
|
||
id: 'script-001',
|
||
title: '夏日护肤推广脚本',
|
||
creatorName: '小美护肤',
|
||
agencyName: '星耀传媒',
|
||
projectName: 'XX品牌618推广',
|
||
aiScore: 88,
|
||
submittedAt: '2026-02-06 14:30',
|
||
hasHighRisk: false,
|
||
agencyApproved: true,
|
||
},
|
||
{
|
||
id: 'script-002',
|
||
title: '新品口红试色脚本',
|
||
creatorName: '美妆Lisa',
|
||
agencyName: '创意无限',
|
||
projectName: 'XX品牌618推广',
|
||
aiScore: 72,
|
||
submittedAt: '2026-02-06 12:15',
|
||
hasHighRisk: true,
|
||
agencyApproved: true,
|
||
},
|
||
]
|
||
|
||
// 模拟视频待审列表
|
||
const mockVideoTasks = [
|
||
{
|
||
id: 'video-001',
|
||
title: '夏日护肤推广',
|
||
creatorName: '小美护肤',
|
||
agencyName: '星耀传媒',
|
||
projectName: 'XX品牌618推广',
|
||
aiScore: 85,
|
||
duration: '02:15',
|
||
submittedAt: '2026-02-06 15:00',
|
||
hasHighRisk: false,
|
||
agencyApproved: true,
|
||
},
|
||
{
|
||
id: 'video-002',
|
||
title: '新品口红试色',
|
||
creatorName: '美妆Lisa',
|
||
agencyName: '创意无限',
|
||
projectName: 'XX品牌618推广',
|
||
aiScore: 68,
|
||
duration: '03:42',
|
||
submittedAt: '2026-02-06 13:45',
|
||
hasHighRisk: true,
|
||
agencyApproved: true,
|
||
},
|
||
{
|
||
id: 'video-003',
|
||
title: '健身器材开箱',
|
||
creatorName: '健身教练王',
|
||
agencyName: '美妆达人MCN',
|
||
projectName: 'XX运动品牌',
|
||
aiScore: 92,
|
||
duration: '04:20',
|
||
submittedAt: '2026-02-06 11:30',
|
||
hasHighRisk: false,
|
||
agencyApproved: true,
|
||
},
|
||
]
|
||
|
||
function ScoreTag({ score }: { score: number }) {
|
||
if (score >= 85) return <SuccessTag>{score}分</SuccessTag>
|
||
if (score >= 70) return <WarningTag>{score}分</WarningTag>
|
||
return <ErrorTag>{score}分</ErrorTag>
|
||
}
|
||
|
||
function TaskCard({ task, type }: { task: typeof mockScriptTasks[0] | typeof mockVideoTasks[0]; type: 'script' | 'video' }) {
|
||
const href = type === 'script' ? `/brand/review/script/${task.id}` : `/brand/review/video/${task.id}`
|
||
|
||
return (
|
||
<Link href={href}>
|
||
<div className="p-4 rounded-lg border border-border-subtle hover:border-accent-indigo/50 hover:bg-accent-indigo/5 transition-all cursor-pointer">
|
||
<div className="flex items-start justify-between mb-3">
|
||
<div className="flex-1 min-w-0">
|
||
<div className="flex items-center gap-2">
|
||
<h4 className="font-medium text-text-primary truncate">{task.title}</h4>
|
||
{task.hasHighRisk && (
|
||
<span className="flex items-center gap-1 px-2 py-0.5 text-xs bg-accent-coral/20 text-accent-coral rounded">
|
||
<AlertTriangle size={12} />
|
||
高风险
|
||
</span>
|
||
)}
|
||
</div>
|
||
<div className="flex items-center gap-4 mt-1 text-sm text-text-secondary">
|
||
<span className="flex items-center gap-1">
|
||
<User size={12} />
|
||
{task.creatorName}
|
||
</span>
|
||
<span className="flex items-center gap-1">
|
||
<Building size={12} />
|
||
{task.agencyName}
|
||
</span>
|
||
</div>
|
||
</div>
|
||
<ScoreTag score={task.aiScore} />
|
||
</div>
|
||
<div className="flex items-center justify-between text-xs text-text-tertiary">
|
||
<span>{task.projectName}</span>
|
||
<span className="flex items-center gap-1">
|
||
<Clock size={12} />
|
||
{task.submittedAt}
|
||
</span>
|
||
</div>
|
||
{'duration' in task && (
|
||
<div className="mt-2 text-xs text-text-tertiary">
|
||
时长: {task.duration}
|
||
</div>
|
||
)}
|
||
</div>
|
||
</Link>
|
||
)
|
||
}
|
||
|
||
export default function BrandReviewListPage() {
|
||
const [searchQuery, setSearchQuery] = useState('')
|
||
const [activeTab, setActiveTab] = useState<'all' | 'script' | 'video'>('all')
|
||
|
||
const filteredScripts = mockScriptTasks.filter(task =>
|
||
task.title.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
||
task.creatorName.toLowerCase().includes(searchQuery.toLowerCase())
|
||
)
|
||
|
||
const filteredVideos = mockVideoTasks.filter(task =>
|
||
task.title.toLowerCase().includes(searchQuery.toLowerCase()) ||
|
||
task.creatorName.toLowerCase().includes(searchQuery.toLowerCase())
|
||
)
|
||
|
||
return (
|
||
<div className="space-y-6">
|
||
{/* 页面标题 */}
|
||
<div className="flex items-center justify-between">
|
||
<div>
|
||
<h1 className="text-2xl font-bold text-text-primary">终审台</h1>
|
||
<p className="text-sm text-text-secondary mt-1">审核代理商提交的脚本和视频</p>
|
||
</div>
|
||
<div className="flex items-center gap-2 text-sm">
|
||
<span className="text-text-secondary">待审核:</span>
|
||
<span className="px-2 py-1 bg-accent-indigo/20 text-accent-indigo rounded font-medium">
|
||
{mockScriptTasks.length} 脚本
|
||
</span>
|
||
<span className="px-2 py-1 bg-purple-500/20 text-purple-400 rounded font-medium">
|
||
{mockVideoTasks.length} 视频
|
||
</span>
|
||
</div>
|
||
</div>
|
||
|
||
{/* 搜索和筛选 */}
|
||
<div className="flex items-center gap-4">
|
||
<div className="relative flex-1 max-w-md">
|
||
<Search size={18} className="absolute left-3 top-1/2 -translate-y-1/2 text-text-tertiary" />
|
||
<input
|
||
type="text"
|
||
placeholder="搜索任务名称或达人..."
|
||
value={searchQuery}
|
||
onChange={(e) => setSearchQuery(e.target.value)}
|
||
className="w-full pl-10 pr-4 py-2 border border-border-subtle rounded-lg bg-bg-elevated text-text-primary focus:outline-none focus:ring-2 focus:ring-accent-indigo"
|
||
/>
|
||
</div>
|
||
<div className="flex items-center gap-1 p-1 bg-bg-elevated rounded-lg">
|
||
<button
|
||
type="button"
|
||
onClick={() => setActiveTab('all')}
|
||
className={`px-4 py-2 rounded-md text-sm font-medium transition-colors ${
|
||
activeTab === 'all' ? 'bg-bg-card text-text-primary shadow-sm' : 'text-text-secondary hover:text-text-primary'
|
||
}`}
|
||
>
|
||
全部
|
||
</button>
|
||
<button
|
||
type="button"
|
||
onClick={() => setActiveTab('script')}
|
||
className={`px-4 py-2 rounded-md text-sm font-medium transition-colors ${
|
||
activeTab === 'script' ? 'bg-bg-card text-text-primary shadow-sm' : 'text-text-secondary hover:text-text-primary'
|
||
}`}
|
||
>
|
||
脚本
|
||
</button>
|
||
<button
|
||
type="button"
|
||
onClick={() => setActiveTab('video')}
|
||
className={`px-4 py-2 rounded-md text-sm font-medium transition-colors ${
|
||
activeTab === 'video' ? 'bg-bg-card text-text-primary shadow-sm' : 'text-text-secondary hover:text-text-primary'
|
||
}`}
|
||
>
|
||
视频
|
||
</button>
|
||
</div>
|
||
</div>
|
||
|
||
{/* 任务列表 */}
|
||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
||
{/* 脚本待审列表 */}
|
||
{(activeTab === 'all' || activeTab === 'script') && (
|
||
<Card>
|
||
<CardHeader>
|
||
<CardTitle className="flex items-center gap-2">
|
||
<FileText size={18} className="text-accent-indigo" />
|
||
脚本终审
|
||
<span className="ml-auto text-sm font-normal text-text-secondary">
|
||
{filteredScripts.length} 条待审
|
||
</span>
|
||
</CardTitle>
|
||
</CardHeader>
|
||
<CardContent className="space-y-3">
|
||
{filteredScripts.length > 0 ? (
|
||
filteredScripts.map((task) => (
|
||
<TaskCard key={task.id} task={task} type="script" />
|
||
))
|
||
) : (
|
||
<div className="text-center py-8 text-text-tertiary">
|
||
<FileText size={32} className="mx-auto mb-2 opacity-50" />
|
||
<p>暂无待审脚本</p>
|
||
</div>
|
||
)}
|
||
</CardContent>
|
||
</Card>
|
||
)}
|
||
|
||
{/* 视频待审列表 */}
|
||
{(activeTab === 'all' || activeTab === 'video') && (
|
||
<Card>
|
||
<CardHeader>
|
||
<CardTitle className="flex items-center gap-2">
|
||
<Video size={18} className="text-purple-400" />
|
||
视频终审
|
||
<span className="ml-auto text-sm font-normal text-text-secondary">
|
||
{filteredVideos.length} 条待审
|
||
</span>
|
||
</CardTitle>
|
||
</CardHeader>
|
||
<CardContent className="space-y-3">
|
||
{filteredVideos.length > 0 ? (
|
||
filteredVideos.map((task) => (
|
||
<TaskCard key={task.id} task={task} type="video" />
|
||
))
|
||
) : (
|
||
<div className="text-center py-8 text-text-tertiary">
|
||
<Video size={32} className="mx-auto mb-2 opacity-50" />
|
||
<p>暂无待审视频</p>
|
||
</div>
|
||
)}
|
||
</CardContent>
|
||
</Card>
|
||
)}
|
||
</div>
|
||
</div>
|
||
)
|
||
}
|