'use client' import { useState } from 'react' import { useRouter } from 'next/navigation' import { Video, Search, SlidersHorizontal, ChevronDown, Upload, Bot, Users, Building2, Check, X, Loader2 } from 'lucide-react' import { ResponsiveLayout } from '@/components/layout/ResponsiveLayout' import { cn } from '@/lib/utils' // 任务阶段状态类型 type StageStatus = 'pending' | 'current' | 'done' | 'error' // 任务数据类型 type Task = { id: string title: string description: string // 脚本阶段 scriptStage: { submit: StageStatus ai: StageStatus agency: StageStatus brand: StageStatus } // 视频阶段 videoStage: { submit: StageStatus ai: StageStatus agency: StageStatus brand: StageStatus } // 按钮配置 buttonText: string buttonType: 'upload' | 'view' | 'fix' // 阶段颜色 scriptColor: 'blue' | 'indigo' | 'coral' | 'green' videoColor: 'tertiary' | 'blue' | 'indigo' | 'coral' | 'green' } // 15个任务数据,覆盖所有状态 const mockTasks: Task[] = [ { id: 'task-001', title: 'XX品牌618推广', description: '产品种草视频 · 时长要求 60-90秒 · 截止: 2026-02-10', scriptStage: { submit: 'current', ai: 'pending', agency: 'pending', brand: 'pending' }, videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' }, buttonText: '上传脚本', buttonType: 'upload', scriptColor: 'blue', videoColor: 'tertiary', }, { id: 'task-002', title: 'YY美妆新品', description: '口播测评 · 已上传视频 · 提交于: 今天 14:30', scriptStage: { submit: 'done', ai: 'current', agency: 'pending', brand: 'pending' }, videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' }, buttonText: '查看详情', buttonType: 'view', scriptColor: 'indigo', videoColor: 'tertiary', }, { id: 'task-003', title: 'ZZ饮品夏日', description: '探店Vlog · 发现2处问题 · 需修改后重新提交', scriptStage: { submit: 'done', ai: 'error', agency: 'pending', brand: 'pending' }, videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' }, buttonText: '查看修改', buttonType: 'fix', scriptColor: 'coral', videoColor: 'tertiary', }, { id: 'task-004', title: 'AA数码新品发布', description: '开箱测评 · 审核通过 · 可发布', scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' }, videoStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' }, buttonText: '查看详情', buttonType: 'view', scriptColor: 'green', videoColor: 'green', }, { id: 'task-005', title: 'BB运动饮料', description: '运动场景 · 脚本AI审核中 · 等待结果', scriptStage: { submit: 'done', ai: 'current', agency: 'pending', brand: 'pending' }, videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' }, buttonText: '查看详情', buttonType: 'view', scriptColor: 'indigo', videoColor: 'tertiary', }, { id: 'task-006', title: 'CC服装春季款', description: '穿搭展示 · 脚本待代理商审核', scriptStage: { submit: 'done', ai: 'done', agency: 'current', brand: 'pending' }, videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' }, buttonText: '查看详情', buttonType: 'view', scriptColor: 'indigo', videoColor: 'tertiary', }, { id: 'task-007', title: 'DD家电测评', description: '开箱视频 · 脚本待品牌终审', scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'current' }, videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' }, buttonText: '查看详情', buttonType: 'view', scriptColor: 'indigo', videoColor: 'tertiary', }, { id: 'task-008', title: 'EE食品试吃', description: '美食测评 · 脚本通过 · 待上传视频', scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' }, videoStage: { submit: 'current', ai: 'pending', agency: 'pending', brand: 'pending' }, buttonText: '上传视频', buttonType: 'upload', scriptColor: 'green', videoColor: 'blue', }, { id: 'task-009', title: 'FF护肤品', description: '使用教程 · 视频AI审核中', scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' }, videoStage: { submit: 'done', ai: 'current', agency: 'pending', brand: 'pending' }, buttonText: '查看详情', buttonType: 'view', scriptColor: 'green', videoColor: 'indigo', }, { id: 'task-010', title: 'GG智能手表', description: '功能展示 · 脚本代理商不通过', scriptStage: { submit: 'done', ai: 'done', agency: 'error', brand: 'pending' }, videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' }, buttonText: '查看修改', buttonType: 'fix', scriptColor: 'coral', videoColor: 'tertiary', }, { id: 'task-011', title: 'HH美妆代言', description: '品牌代言 · 脚本品牌不通过', scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'error' }, videoStage: { submit: 'pending', ai: 'pending', agency: 'pending', brand: 'pending' }, buttonText: '查看修改', buttonType: 'fix', scriptColor: 'coral', videoColor: 'tertiary', }, { id: 'task-012', title: 'II数码配件', description: '配件展示 · 视频代理商审核中', scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' }, videoStage: { submit: 'done', ai: 'done', agency: 'current', brand: 'pending' }, buttonText: '查看详情', buttonType: 'view', scriptColor: 'green', videoColor: 'indigo', }, { id: 'task-013', title: 'JJ旅行vlog', description: '旅行记录 · 视频代理商不通过', scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' }, videoStage: { submit: 'done', ai: 'done', agency: 'error', brand: 'pending' }, buttonText: '查看修改', buttonType: 'fix', scriptColor: 'green', videoColor: 'coral', }, { id: 'task-014', title: 'KK宠物用品', description: '宠物日常 · 视频品牌终审中', scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' }, videoStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'current' }, buttonText: '查看详情', buttonType: 'view', scriptColor: 'green', videoColor: 'indigo', }, { id: 'task-015', title: 'LL厨房电器', description: '使用演示 · 视频品牌不通过', scriptStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'done' }, videoStage: { submit: 'done', ai: 'done', agency: 'done', brand: 'error' }, buttonText: '查看修改', buttonType: 'fix', scriptColor: 'green', videoColor: 'coral', }, ] // 步骤图标组件 function StepIcon({ status, icon }: { status: StageStatus; icon: 'upload' | 'bot' | 'users' | 'building' }) { const IconComponent = { upload: Upload, bot: Bot, users: Users, building: Building2, }[icon] const getStyle = () => { switch (status) { case 'done': return 'bg-accent-green' case 'current': return 'bg-accent-indigo' case 'error': return 'bg-accent-coral' default: return 'bg-bg-elevated border-[1.5px] border-border-subtle' } } const getIconColor = () => { if (status === 'done' || status === 'current' || status === 'error') return 'text-white' return 'text-text-tertiary' } return (
{filter === 'all' ? `共 ${tasks.length} 个任务` : `${currentFilterLabel} ${filteredTasks.length} 个`}
没有找到匹配的任务
尝试调整搜索条件或筛选状态