chore: 清理macOS同步产生的重复文件
详细说明: - 删除了352个带数字后缀的重复文件 - 更新.gitignore防止未来产生此类文件 - 这些文件是由iCloud或其他同步服务冲突产生的 - 不影响项目功能,仅清理冗余文件
This commit is contained in:
167
web_frontend/exhibition-demo/src/components/ResultModal.tsx
Normal file
167
web_frontend/exhibition-demo/src/components/ResultModal.tsx
Normal file
@@ -0,0 +1,167 @@
|
||||
import React from 'react';
|
||||
import { motion, AnimatePresence } from 'framer-motion';
|
||||
import { X, Download, Eye, CheckCircle, FileText, TrendingUp, Calendar } from 'lucide-react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
interface ResultModalProps {
|
||||
isOpen: boolean;
|
||||
onClose: () => void;
|
||||
onViewDetails: () => void;
|
||||
}
|
||||
|
||||
const ResultModal: React.FC<ResultModalProps> = ({ isOpen, onClose, onViewDetails }) => {
|
||||
const stats = [
|
||||
{ label: '生成时间', value: '3分钟', icon: <Calendar className="w-5 h-5" /> },
|
||||
{ label: '文档页数', value: '68页', icon: <FileText className="w-5 h-5" /> },
|
||||
{ label: '预期ROI', value: '30%', icon: <TrendingUp className="w-5 h-5" /> },
|
||||
];
|
||||
|
||||
const sections = [
|
||||
{ name: '策划案概述', status: 'completed', pages: 8 },
|
||||
{ name: '展会介绍', status: 'completed', pages: 12 },
|
||||
{ name: '营销方案', status: 'completed', pages: 15 },
|
||||
{ name: '现场运营', status: 'completed', pages: 10 },
|
||||
{ name: '预算分析', status: 'completed', pages: 13 },
|
||||
{ name: '风险评估', status: 'completed', pages: 10 },
|
||||
];
|
||||
|
||||
return (
|
||||
<AnimatePresence>
|
||||
{isOpen && (
|
||||
<>
|
||||
{/* 背景遮罩 */}
|
||||
<motion.div
|
||||
initial={{ opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
exit={{ opacity: 0 }}
|
||||
className="fixed inset-0 bg-black/60 backdrop-blur-sm z-50"
|
||||
onClick={onClose}
|
||||
/>
|
||||
|
||||
{/* 弹窗内容 */}
|
||||
<motion.div
|
||||
initial={{ opacity: 0, scale: 0.9, y: 20 }}
|
||||
animate={{ opacity: 1, scale: 1, y: 0 }}
|
||||
exit={{ opacity: 0, scale: 0.9, y: 20 }}
|
||||
transition={{ type: 'spring', damping: 25, stiffness: 300 }}
|
||||
className="fixed inset-0 flex items-center justify-center z-50 p-4"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<div className="bg-white rounded-2xl shadow-2xl max-w-2xl w-full max-h-[90vh] overflow-hidden">
|
||||
{/* 头部 */}
|
||||
<div className="relative bg-gradient-to-br from-green-500 to-emerald-600 p-8 text-white">
|
||||
<button
|
||||
onClick={onClose}
|
||||
className="absolute top-4 right-4 p-2 hover:bg-white/20 rounded-lg transition-colors"
|
||||
>
|
||||
<X className="w-6 h-6" />
|
||||
</button>
|
||||
|
||||
<div className="flex items-center justify-center mb-4">
|
||||
<motion.div
|
||||
initial={{ scale: 0 }}
|
||||
animate={{ scale: 1 }}
|
||||
transition={{ delay: 0.2, type: 'spring', stiffness: 200 }}
|
||||
className="p-4 bg-white/20 rounded-full"
|
||||
>
|
||||
<CheckCircle className="w-12 h-12" />
|
||||
</motion.div>
|
||||
</div>
|
||||
|
||||
<h2 className="text-3xl font-bold text-center mb-2">方案生成完成!</h2>
|
||||
<p className="text-center text-green-100">
|
||||
AI已成功为您生成完整的展会策划方案
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="p-6">
|
||||
{/* 统计信息 */}
|
||||
<div className="grid grid-cols-3 gap-4 mb-6">
|
||||
{stats.map((stat, index) => (
|
||||
<motion.div
|
||||
key={stat.label}
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ delay: 0.3 + index * 0.1 }}
|
||||
className="bg-gray-50 rounded-xl p-4"
|
||||
>
|
||||
<div className="flex items-center gap-3 mb-2">
|
||||
<div className="p-2 bg-white rounded-lg text-gray-600">
|
||||
{stat.icon}
|
||||
</div>
|
||||
<div>
|
||||
<p className="text-2xl font-bold text-gray-900">{stat.value}</p>
|
||||
<p className="text-xs text-gray-500">{stat.label}</p>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* 内容章节 */}
|
||||
<div className="mb-6">
|
||||
<h3 className="text-sm font-semibold text-gray-700 mb-3">生成内容</h3>
|
||||
<div className="space-y-2">
|
||||
{sections.map((section, index) => (
|
||||
<motion.div
|
||||
key={section.name}
|
||||
initial={{ opacity: 0, x: -20 }}
|
||||
animate={{ opacity: 1, x: 0 }}
|
||||
transition={{ delay: 0.4 + index * 0.05 }}
|
||||
className="flex items-center justify-between p-3 bg-gray-50 rounded-lg"
|
||||
>
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="w-8 h-8 bg-green-100 text-green-600 rounded-full flex items-center justify-center">
|
||||
<CheckCircle className="w-5 h-5" />
|
||||
</div>
|
||||
<span className="font-medium text-gray-900">{section.name}</span>
|
||||
</div>
|
||||
<span className="text-sm text-gray-500">{section.pages}页</span>
|
||||
</motion.div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 生成信息 */}
|
||||
<div className="p-4 bg-blue-50 rounded-xl mb-6">
|
||||
<div className="flex items-start gap-3">
|
||||
<div className="p-2 bg-blue-100 rounded-lg">
|
||||
<FileText className="w-5 h-5 text-blue-600" />
|
||||
</div>
|
||||
<div className="flex-1">
|
||||
<h4 className="font-semibold text-gray-900 mb-1">
|
||||
2024长三角新能源汽车展策划方案
|
||||
</h4>
|
||||
<p className="text-sm text-gray-600">
|
||||
包含完整的市场分析、设计方案、预算规划、执行计划、营销策略等内容
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 操作按钮 */}
|
||||
<div className="flex gap-3">
|
||||
<button
|
||||
onClick={onViewDetails}
|
||||
className="flex-1 px-6 py-3 bg-gradient-to-r from-blue-600 to-purple-600 text-white rounded-xl font-medium hover:shadow-lg transform hover:scale-105 transition-all flex items-center justify-center gap-2"
|
||||
>
|
||||
<Eye className="w-5 h-5" />
|
||||
查看详细方案
|
||||
</button>
|
||||
<button
|
||||
className="flex-1 px-6 py-3 bg-gray-100 text-gray-700 rounded-xl font-medium hover:bg-gray-200 transition-colors flex items-center justify-center gap-2"
|
||||
>
|
||||
<Download className="w-5 h-5" />
|
||||
下载PDF
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
</>
|
||||
)}
|
||||
</AnimatePresence>
|
||||
);
|
||||
};
|
||||
|
||||
export default ResultModal;
|
||||
Reference in New Issue
Block a user