"use client" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { Badge } from "@/components/ui/badge" import { Button } from "@/components/ui/button" import { TrendingUp, TrendingDown, AlertCircle, Download, RefreshCw } from 'lucide-react' import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer, AreaChart, Area } from 'recharts' export default function TrendPrediction() { const userGrowthPrediction = [ { date: '2024-06', actual: 428, predicted: null }, { date: '2024-07', actual: null, predicted: 445 }, { date: '2024-08', actual: null, predicted: 468 }, { date: '2024-09', actual: null, predicted: 495 }, { date: '2024-10', actual: null, predicted: 528 }, { date: '2024-11', actual: null, predicted: 565 }, { date: '2024-12', actual: null, predicted: 608 }, ] const valuePrediction = [ { date: '2024-06', actual: 125.8, predicted: null }, { date: '2024-07', actual: null, predicted: 132.5 }, { date: '2024-08', actual: null, predicted: 141.2 }, { date: '2024-09', actual: null, predicted: 151.8 }, { date: '2024-10', actual: null, predicted: 164.5 }, { date: '2024-11', actual: null, predicted: 179.2 }, { date: '2024-12', actual: null, predicted: 196.5 }, ] const churnRiskData = [ { segment: '高价值用户', risk: 8.5, count: 1285, trend: 'down' }, { segment: 'VIP用户', risk: 12.3, count: 856, trend: 'stable' }, { segment: '活跃用户', risk: 18.6, count: 12856, trend: 'up' }, { segment: '沉默用户', risk: 45.8, count: 28560, trend: 'up' }, ] const opportunityData = [ { name: '新品推广机会', potential: '¥85.6M', probability: 78, timeframe: '未来30天' }, { name: '复购唤醒', potential: '¥56.2M', probability: 65, timeframe: '未来15天' }, { name: '会员升级', potential: '¥38.5M', probability: 82, timeframe: '未来7天' }, { name: '交叉销售', potential: '¥92.8M', probability: 58, timeframe: '未来45天' }, ] return (
用户增长预测、价值预测与流失预警