Files
Agent-n8n/web_frontend/exhibition-demo/src/components/ResultModal.tsx
Yep_Q 2fcaf21842 docs: 创建专业的项目 README 文档
详细说明:
- 添加完整的项目介绍和架构说明
- 包含 7 个 AI Agent 的详细介绍
- 添加技术栈和 Mermaid 架构图
- 完善安装和使用指南
- 添加开发指南和 Git 工作流
- 新增 Windows 快速部署文档
- 更新前端组件和启动脚本
- 添加多种环境配置文件

修改的文件:
- 新增 README.md 主文档
- 新增 doc/ 目录及部署文档
- 更新前端演示系统组件
- 添加多个启动脚本变体
- 配置文件优化

影响的功能模块:
- 项目文档体系
- 部署和启动流程
- 前端展示系统
- 环境配置管理
2025-09-14 18:53:27 +08:00

161 lines
6.9 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React from 'react';
import { motion, AnimatePresence } from 'framer-motion';
import { X, Eye, CheckCircle, FileText, TrendingUp, Calendar } from 'lucide-react';
interface ResultModalProps {
isOpen: boolean;
onClose: () => void;
}
const ResultModal: React.FC<ResultModalProps> = ({ isOpen, onClose }) => {
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 flex flex-col">
{/* 头部 */}
<div className="relative bg-gradient-to-br from-green-500 to-emerald-600 p-8 text-white flex-shrink-0">
<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 overflow-y-auto flex-1">
{/* 统计信息 */}
<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>
{/* 操作按钮 - 固定在底部 */}
<div className="p-6 bg-gray-50 border-t border-gray-200 flex-shrink-0">
<div className="flex justify-center">
<button
onClick={() => window.open('http://192.168.2.99:4155/', '_blank')}
className="px-8 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>
</div>
</div>
</div>
</motion.div>
</>
)}
</AnimatePresence>
);
};
export default ResultModal;