"use client" import { useState } from "react" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" import { Button } from "@/components/ui/button" import { Badge } from "@/components/ui/badge" import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" import { Input } from "@/components/ui/input" import { Label } from "@/components/ui/label" import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select" import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "@/components/ui/dialog" import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table" import { Progress } from "@/components/ui/progress" import { Package, Plus, Download, Eye, Trash2, RefreshCw, Users, Calendar, Tag, Filter, MoreHorizontal, Share2, CheckCircle2, Clock, AlertCircle } from "lucide-react" import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu" const packages = [ { id: "1", name: "高价值用户流量包", description: "CLV评分前20%的活跃用户", userCount: 15680, tags: ["高价值", "活跃用户"], status: "active", createdAt: "2024-01-10", lastUpdated: "2024-01-15", downloadCount: 23, }, { id: "2", name: "潜力用户营销包", description: "近30天有浏览但未转化的用户", userCount: 8920, tags: ["潜力用户", "营销"], status: "active", createdAt: "2024-01-08", lastUpdated: "2024-01-14", downloadCount: 15, }, { id: "3", name: "流失预警用户包", description: "预测30天内可能流失的用户", userCount: 3240, tags: ["流失预警", "挽回"], status: "updating", createdAt: "2024-01-05", lastUpdated: "2024-01-15", downloadCount: 8, }, ] export default function PackagesPage() { const [showCreateDialog, setShowCreateDialog] = useState(false) const [showPreviewDialog, setShowPreviewDialog] = useState(false) const [selectedPackage, setSelectedPackage] = useState(null) const getStatusBadge = (status: string) => { switch (status) { case "active": return 可用 case "updating": return 更新中 case "expired": return 已过期 default: return 未知 } } return (
{/* 页面标题 */}

流量包管理

创建和管理用户流量包,支持多维度筛选和导出

{/* 统计卡片 */}

流量包总数

24

覆盖用户

156.8K

本月下载

89

活跃包

18

{/* 流量包列表 */}
流量包列表 管理所有已创建的用户流量包
名称 用户数 标签 状态 更新时间 下载次数 操作 {packages.map((pkg) => (

{pkg.name}

{pkg.description}

{pkg.userCount.toLocaleString()}
{pkg.tags.map((tag) => ( {tag} ))}
{getStatusBadge(pkg.status)} {pkg.lastUpdated} {pkg.downloadCount}
刷新数据 分享 删除
))}
{/* 创建流量包弹窗 */} 创建流量包 通过设置筛选条件创建用户流量包
{/* 预览弹窗 */} 流量包预览 - {selectedPackage?.name} {selectedPackage?.description}

用户总数

{selectedPackage?.userCount.toLocaleString()}

平均CLV

¥2,580

活跃率

78.5%

用户样本 用户ID CLV评分 RFM等级 最后活跃 U****001 92 A 2024-01-15 U****002 88 A 2024-01-14 U****003 85 B 2024-01-15
) }