fix: 修复WorkflowPageV3组件TypeScript错误和清理副本文件

详细说明:
- 修复WorkflowPageV3.tsx中的TypeScript类型错误
- 移除未使用的executionTimeoutRef变量
- 修复style标签的jsx属性问题
- 将deprecated的substr()改为substring()
- 清理n8n目录下的副本文件
- 添加server.js和start脚本用于静态文件服务

影响的文件:
- web_frontend/exhibition-demo/src/pages/WorkflowPageV3.tsx
- web_frontend/exhibition-demo/src/components/ResultModal.tsx
- web_frontend/web_result/server.js (新增)
- web_frontend/web_result/start.bat (新增)
- web_frontend/web_result/start.sh (新增)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Yep_Q
2025-09-08 16:34:51 +08:00
parent d0d256f8ef
commit 83dc9270c8
19 changed files with 8962 additions and 99 deletions

View File

@@ -0,0 +1,59 @@
#!/bin/bash
# Web Result 静态服务器启动脚本 (Node.js版)
# 端口: 4155
# 颜色定义
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m'
# 获取脚本所在目录
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo -e "${BLUE}======================================${NC}"
echo -e "${BLUE} Web Result 静态服务器${NC}"
echo -e "${BLUE} 端口: 4155${NC}"
echo -e "${BLUE}======================================${NC}"
echo
# 切换到脚本所在目录
cd "$SCRIPT_DIR"
# 检查 Node.js
if ! command -v node &> /dev/null; then
echo -e "${RED}[错误] Node.js 未安装${NC}"
echo -e "${YELLOW}请先安装 Node.js: https://nodejs.org${NC}"
exit 1
fi
echo -e "${GREEN}[信息] Node.js 版本: $(node --version)${NC}"
# 检查端口是否被占用
if lsof -Pi :4155 -sTCP:LISTEN -t >/dev/null 2>&1; then
echo -e "${YELLOW}[警告] 端口 4155 已被占用${NC}"
echo -e "${BLUE}[信息] 正在查看占用进程...${NC}"
lsof -i :4155
read -p "是否终止占用进程?(y/N): " kill_process
if [[ $kill_process =~ ^[Yy]$ ]]; then
echo -e "${BLUE}[信息] 正在终止占用进程...${NC}"
lsof -ti:4155 | xargs kill -9
echo -e "${GREEN}[成功] 进程已终止${NC}"
sleep 1
else
echo -e "${RED}[错误] 无法启动服务器,端口被占用${NC}"
exit 1
fi
fi
# 启动服务器
echo -e "${GREEN}[信息] 正在启动服务器...${NC}"
echo -e "${GREEN}[信息] 访问地址: http://localhost:4155${NC}"
echo -e "${YELLOW}[提示] 按 Ctrl+C 停止服务器${NC}"
echo
# 使用 Node.js 启动服务器
node server.js