"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 (

趋势预测

用户增长预测、价值预测与流失预警

{/* 预测指标 */}
下月预测用户数
445M
+3.9% 增长
下月预测价值
¥132.5亿
+5.3% 增长
流失风险用户
42.5K
需重点关注
预测准确率
94.2%
基于历史数据
{/* 趋势图表 */}
用户增长预测 资产价值预测
{/* 流失风险预警 */} 流失风险预警
{churnRiskData.map((item, index) => (
{item.segment}
{item.count.toLocaleString()} 用户
{item.risk}%
流失风险
{item.trend === 'down' ? ( ) : item.trend === 'up' ? ( ) : (
)}
))}
{/* 商机预测 */} 商机预测
{opportunityData.map((item, index) => (

{item.name}

{item.timeframe}
预测收益
{item.potential}
成功概率
{item.probability}%
))}
) }