feat: 简化工作流可视化,直接显示工作流截图

- 移除图片/iframe切换功能,仅保留静态图片显示
- 移除showWorkflowImage状态变量
- 图片完整贴合容器四边,使用object-cover样式
- 添加工作流可视化截图(workflow-visualization.jpeg)
This commit is contained in:
KQL
2025-10-18 14:22:16 +08:00
parent b5d9e4471c
commit 3f5657c684
2 changed files with 21 additions and 8 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 KiB

View File

@@ -957,7 +957,7 @@ const WorkflowPageV4 = () => {
// setShowResultModal(false);
// 在新标签页中打开详情页面
const baseUrl = 'http://localhost:4155';
const baseUrl = 'http://192.168.2.9:4155';
if (selectedOrderClass) {
// 根据订单班 ID 映射到对应的路径
@@ -1127,13 +1127,26 @@ const WorkflowPageV4 = () => {
<Maximize2 className="w-4 h-4 text-gray-600" />
</button>
</div>
<div className="flex-1">
<iframe
src="http://localhost:5678/workflow/"
// src="http://localhost:5678/workflow/XbfF8iRI4a69hmYS"
className="w-full h-full border-0"
title="n8n Workflow"
/>
<div className="flex-1 relative">
{/* 工作流效果图 */}
<div className="absolute inset-0 bg-gray-50">
<img
src="/images/workflow-visualization.jpeg"
alt="工作流可视化效果图"
className="w-full h-full object-cover"
onError={(e) => {
// 如果图片加载失败,显示占位符
e.currentTarget.style.display = 'none';
const parent = e.currentTarget.parentElement;
if (parent) {
const placeholder = document.createElement('div');
placeholder.className = 'text-center text-gray-400 flex items-center justify-center h-full';
placeholder.innerHTML = '<p>工作流效果图加载失败</p>';
parent.appendChild(placeholder);
}
}}
/>
</div>
</div>
</div>