fix: 修复Agent头像显示和结果弹窗问题

主要修复:
- 恢复Agent真实头像显示(替换emoji为实际图片)
- 删除自动跳转到ResultPageV2的逻辑
- 修改ResultModal支持动态内容显示
- 根据不同订单班显示对应的方案信息

优化内容:
- 重构Agent系统,每个订单班独立管理Agent配置
- 删除不需要的ResultPageV2组件
- handleViewDetails改为在新标签页打开

影响模块:
- web_frontend/exhibition-demo/src/components/ResultModal.tsx
- web_frontend/exhibition-demo/src/pages/WorkflowPageV4.tsx
- web_frontend/exhibition-demo/src/App.tsx
- web_frontend/exhibition-demo/src/data/terminalSimulations/*.ts

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Yep_Q
2025-09-29 20:12:57 +08:00
parent a884afc494
commit 0d96ffd429
991 changed files with 113654 additions and 1303 deletions

View File

@@ -1,6 +1,6 @@
import React, { useState } from 'react';
import { motion, AnimatePresence } from 'framer-motion';
import { X, Sparkles, FileText, Zap } from 'lucide-react';
import { X, Sparkles, FileText, Zap, PenTool } from 'lucide-react';
import orderClassesData from '../data/orderClasses.json';
import { OrderClassIconMap } from './OrderClassIcons';
@@ -147,7 +147,7 @@ const RequirementModal: React.FC<RequirementModalProps> = ({ isOpen, onClose, on
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-5xl w-full max-h-[90vh] overflow-hidden">
<div className="bg-white rounded-3xl shadow-2xl max-w-5xl w-full overflow-hidden">
{/* 头部 - 苹果风格设计 */}
<div className="relative">
{/* 渐变背景 */}
@@ -198,52 +198,77 @@ const RequirementModal: React.FC<RequirementModalProps> = ({ isOpen, onClose, on
<div className="h-px bg-gradient-to-r from-transparent via-gray-200 to-transparent" />
</div>
<div className="p-6 max-h-[calc(90vh-120px)] overflow-y-auto">
<div className="p-6 bg-white/50 backdrop-blur-sm">
{/* 订单班选择 */}
<div className="mb-6">
<h3 className="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2">
<FileText className="w-4 h-4" />
<div className="mb-6 p-5 bg-white rounded-xl shadow-sm">
<h3 className="text-base font-semibold text-gray-800 mb-4 flex items-center gap-2">
<FileText className="w-5 h-5" />
</h3>
<div className="grid grid-cols-3 gap-3">
<div className="grid grid-cols-3 gap-4">
{orderClassesData.orderClasses.map((orderClass) => (
<button
key={orderClass.id}
onClick={() => handleTemplateSelect(orderClass)}
className={`p-4 rounded-xl border-2 transition-all hover:shadow-lg ${
className={`group relative p-5 rounded-2xl border-2 transition-all duration-300 transform hover:-translate-y-1 ${
selectedTemplate === orderClass.id
? 'border-blue-500 bg-blue-50'
: 'border-gray-200 hover:border-gray-300'
? 'border-blue-500 bg-gradient-to-br from-blue-50 to-white shadow-xl scale-[1.02]'
: 'border-gray-200 hover:border-gray-300 hover:shadow-lg bg-white'
}`}
>
<div className="flex items-center gap-3 mb-2">
<div className={`p-2 rounded-lg transition-all ${
{/* 选中时的光晕效果 */}
{selectedTemplate === orderClass.id && (
<div className="absolute inset-0 rounded-2xl bg-blue-400 opacity-10 blur-xl animate-pulse" />
)}
<div className="relative flex items-center gap-3">
<div className={`p-3 rounded-xl transition-all duration-300 ${
selectedTemplate === orderClass.id
? 'bg-gradient-to-br from-blue-500 to-blue-600 text-white shadow-md scale-110'
: 'text-white hover:scale-105'
? 'bg-gradient-to-br from-blue-500 to-blue-600 text-white shadow-lg scale-110 rotate-3'
: 'text-white group-hover:scale-110 group-hover:rotate-3'
}`}
style={{
backgroundColor: selectedTemplate === orderClass.id ? undefined : orderClass.color,
boxShadow: selectedTemplate === orderClass.id ? '0 4px 12px rgba(59, 130, 246, 0.4)' : undefined
boxShadow: selectedTemplate === orderClass.id
? '0 8px 20px rgba(59, 130, 246, 0.4)'
: '0 4px 12px rgba(0, 0, 0, 0.1)'
}}>
{(() => {
const IconComponent = OrderClassIconMap[orderClass.id];
return IconComponent ? <IconComponent size={20} /> : <FileText className="w-5 h-5" />;
return IconComponent ? <IconComponent size={24} /> : <FileText className="w-6 h-6" />;
})()}
</div>
<div className="text-left flex-1">
<div className="font-medium text-gray-900">{orderClass.name}</div>
<div className="text-xs text-gray-500 truncate">{orderClass.template?.title || orderClass.description}</div>
<div className={`font-semibold transition-colors duration-300 ${
selectedTemplate === orderClass.id ? 'text-blue-900' : 'text-gray-900'
}`}>
{orderClass.name}
</div>
<div className={`text-xs mt-0.5 line-clamp-2 transition-colors duration-300 ${
selectedTemplate === orderClass.id ? 'text-blue-600' : 'text-gray-500'
}`}>
{orderClass.template?.title || orderClass.description}
</div>
</div>
</div>
{/* 选中标记 */}
{selectedTemplate === orderClass.id && (
<div className="absolute -top-2 -right-2 w-6 h-6 bg-blue-500 rounded-full flex items-center justify-center shadow-lg animate-bounce">
<svg className="w-3.5 h-3.5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={3} d="M5 13l4 4L19 7" />
</svg>
</div>
)}
</button>
))}
</div>
</div>
{/* 输入区域 */}
<div className="mb-6">
<label className="block text-sm font-semibold text-gray-700 mb-2">
<div className="mb-6 p-5 bg-white rounded-xl shadow-sm">
<label className="text-base font-semibold text-gray-800 mb-3 flex items-center gap-2">
<PenTool className="w-5 h-5" />
</label>
<textarea

View File

@@ -5,9 +5,20 @@ import { X, Eye, CheckCircle, FileText, TrendingUp, Calendar } from 'lucide-reac
interface ResultModalProps {
isOpen: boolean;
onClose: () => void;
onViewDetails?: () => void;
projectTitle?: string;
projectSubtitle?: string;
orderClassName?: string;
}
const ResultModal: React.FC<ResultModalProps> = ({ isOpen, onClose }) => {
const ResultModal: React.FC<ResultModalProps> = ({
isOpen,
onClose,
onViewDetails,
projectTitle = '项目方案',
projectSubtitle = '包含完整的分析、设计、预算、执行计划等内容',
orderClassName = '通用'
}) => {
const stats = [
{ label: '生成时间', value: '3分钟', icon: <Calendar className="w-5 h-5" /> },
{ label: '文档页数', value: '68页', icon: <FileText className="w-5 h-5" /> },
@@ -68,7 +79,7 @@ const ResultModal: React.FC<ResultModalProps> = ({ isOpen, onClose }) => {
<h2 className="text-3xl font-bold text-center mb-2"></h2>
<p className="text-center text-green-100">
AI已成功为您生成完整的展会策划方
AI已成功为您生成完整的{orderClassName}
</p>
</div>
@@ -128,10 +139,10 @@ const ResultModal: React.FC<ResultModalProps> = ({ isOpen, onClose }) => {
</div>
<div className="flex-1">
<h4 className="font-semibold text-gray-900 mb-1">
2024
{projectTitle}
</h4>
<p className="text-sm text-gray-600">
{projectSubtitle}
</p>
</div>
</div>
@@ -142,7 +153,7 @@ const ResultModal: React.FC<ResultModalProps> = ({ isOpen, onClose }) => {
<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://localhost:4155/', '_blank')}
onClick={onViewDetails}
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" />