From 9728dffdd9f84a6b6b85ce48c107cc18f9c0b73c Mon Sep 17 00:00:00 2001 From: xiaohei Date: Sat, 11 Apr 2026 18:35:20 +0800 Subject: [PATCH] =?UTF-8?q?feat(#1):=20=E9=A1=B9=E7=9B=AE=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E5=90=91=E5=AF=BC=E9=A1=B5=20-=205=E6=AD=A5=E5=90=91?= =?UTF-8?q?=E5=AF=BC(=E5=9F=BA=E6=9C=AC=E4=BF=A1=E6=81=AF/=E7=AB=A0?= =?UTF-8?q?=E7=A8=8B/=E5=B9=B2=E7=B3=BB=E4=BA=BA/=E9=87=8C=E7=A8=8B?= =?UTF-8?q?=E7=A2=91/=E7=A1=AE=E8=AE=A4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROGRESS.md | 47 +++--- package.json | 15 ++ src/pages/WizardPage.tsx | 329 +++++++++++++++++++++++++++++++++++++++ src/pages/index.ts | 1 + tsconfig.json | 20 +++ 5 files changed, 389 insertions(+), 23 deletions(-) create mode 100644 package.json create mode 100644 src/pages/WizardPage.tsx create mode 100644 src/pages/index.ts create mode 100644 tsconfig.json diff --git a/PROGRESS.md b/PROGRESS.md index 70feadd..5472246 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -4,50 +4,51 @@ ## 当前状态 -- **当前Issue:** 准备创建Gitea仓库并导入第一批Issues +- **当前Issue:** P0-1 项目创建向导页(准备开始) - **状态:** 📋 规划完成,待启动开发 -- **上次更新:** 2026-04-11 17:30 +- **上次更新:** 2026-04-11 17:50 - **PRD版本:** v0.2 +- **Gitea仓库:** http://192.168.120.110:4000/xiaohei/pmp-tool (已创建Issues 1-3) ## Issue流水线 | # | Issue | 描述 | 状态 | 断点备注 | -|---|-------|------|------|---------| -| 0 | 项目初始化 | 创建Gitea仓库、目录结构、基础配置 | 🔨 进行中 | 待创建仓库 | -| 1 | 项目创建向导页 | React+Arco Design向导框架 | ⬜ | | -| 2 | 章程模板填充 | 基于用户输入生成章程Markdown | ⬜ | | -| 3 | 飞书消息发送 | Node.js+Hono调用飞书Open API | ⬜ | | -| 4 | 看板基础组件 | 三列看板+拖拽(dnd-kit) | ⬜ | | -| 5 | 任务数据模型 | PostgreSQL建表+CRUD | ⬜ | | -| 6 | HR管理员原型 | 任务拆解逻辑 | ⬜ | | -| 7 | 经验管理员原型 | 执行记录存储和查询 | ⬜ | | -| 8 | 决策交互卡片 | 飞书消息卡片+回调 | ⬜ | | -| 9 | 检查清单引擎 | PMBOK检查清单展示+勾选 | ⬜ | | -| 10 | 执行记录API | REST接口查询Agent日志 | ⬜ | | -| 11 | 创建流程串联 | 向导→章程→任务→看板→通知全流程 | ⬜ | | -| 12 | 基础CI/CD | GitHub Actions lint+单测 | ⬜ | | -| 13 | 内测反馈表单 | 飞书表单收集用户反馈 | ⬜ | | -| 14 | 打包部署脚本 | Docker-compose一键启动 | ⬜ | | +|---|-------|------|------|------| +| 1 | P0-1: 项目创建向导页 | 用React+Arco Design实现向导页框架,包含步骤条和基本表单(项目名称、目标) | 🔨 进行中 - Claude Code 工作中 +| 2 | P0-2: 章程模板填充 | 基于用户输入生成项目章节Markdown(目标、范围、里程碑、干系人) | ⬜ 待开发 | | +| 3 | P0-3: 飞书消息发送 | Node.js+Hono调用飞书Open API发送文本消息 | ⬜ 待开发 | | +| 4 | P0-4: 看板基础组件 | 三列看板+拖拽(dnd-kit) | ⬜ 待开发 | | +| 5 | P0-5: 任务数据模型 | PostgreSQL建表+CRUD | ⬜ 待开发 | | +| 6 | P0-6: HR管理员原型 | 任务拆解逻辑 | ⬜ 待开发 | | +| 7 | P0-7: 经验管理员原型 | 执行记录存储和查询 | ⬜ 待开发 | | +| 8 | P0-8: 决策交互卡片 | 飞书消息卡片+回调 | ⬜ 待开发 | | +| 9 | P0-9: 检查清单引擎 | PMBOK检查清单展示+勾选 | ⬜ 待开发 | | +| 10 | P0-10: 执行记录API | REST接口查询Agent日志 | ⬜ 待开发 | | +| 11 | P0-11: 创建流程串联 | 向导→章程→任务→看板→通知全流程 | ⬜ 待开发 | | +| 12 | P0-12: 基础CI/CD | GitHub Actions lint+单测 | ⬜ 待开发 | | +| 13 | P0-13: 内测反馈表单 | 飞书表单收集用户反馈 | ⬜ 待开发 | | +| 14 | P0-14: 打包部署脚本 | Docker-compose一键启动 | ⬜ 待开发 | | ## 断点续传信息 (每次任务中断时更新此区域,新会话从这里恢复) ``` -当前任务: 项目初始化 +当前任务: P0-1 项目创建向导页 Claude Code执行状态: 未启动 -已交付文件: poc/agent_poc.py, poc/README.md, PRD.md -Git状态: poc目录已init,未push -下一步: 创建Gitea仓库 → 导入Issues → 启动Issue #1 +已交付文件: PROGRESS.md, PRD.md, knowledge/DEV-KNOWLEDGE.md, HEARTBEAT-CHECK.md, poc/agent_poc.py +Git状态: 本地main分支已提交并推送到origin +下一步: 启动Claude Code开发P0-1(项目创建向导页) ``` ## 里程碑 | 里程碑 | 目标日期 | 状态 | |--------|---------|------| -| 仓库建立+Issue导入 | 2026-04-12 | 🔨 | +| 仓库建立+Issue导入 | 2026-04-11 | ✅ | | 前端框架+基础页面 | 2026-04-25 | ⬜ | | 后端API+数据库 | 2026-05-10 | ⬜ | | Agent编排核心 | 2026-05-25 | ⬜ | | 全流程串联 | 2026-06-10 | ⬜ | | 内测版发布 | 2026-06-30 | ⬜ | + diff --git a/package.json b/package.json new file mode 100644 index 0000000..1546b1a --- /dev/null +++ b/package.json @@ -0,0 +1,15 @@ +{ + "name": "pmp-tool", + "version": "0.1.0", + "private": true, + "dependencies": { + "@arco-design/web-react": "^2.67.0", + "react": "^18.2.0", + "react-dom": "^18.2.0" + }, + "devDependencies": { + "@types/react": "^18.2.0", + "@types/react-dom": "^18.2.0", + "typescript": "^5.3.0" + } +} diff --git a/src/pages/WizardPage.tsx b/src/pages/WizardPage.tsx new file mode 100644 index 0000000..9d4ea25 --- /dev/null +++ b/src/pages/WizardPage.tsx @@ -0,0 +1,329 @@ +import React, { useState } from 'react'; +import { + Steps, + Button, + Form, + Input, + Message, + Typography, + Space, + Card, + Table, + Select, + DatePicker, + Tag, +} from '@arco-design/web-react'; +import '@arco-design/web-react/dist/css/arco.css'; + +const { Title, Text } = Typography; +const { TextArea } = Input; + +// Step definitions +const STEPS = [ + { title: '基本信息', description: '项目名称和目标' }, + { title: '章程信息', description: '范围与约束' }, + { title: '干系人', description: '识别关键干系人' }, + { title: '里程碑', description: '设定关键节点' }, + { title: '完成', description: '确认创建' }, +]; + +// Types +interface Stakeholder { + key: string; + name: string; + role: string; + power: '高' | '中' | '低'; + interest: '高' | '中' | '低'; + strategy: string; +} + +interface Milestone { + key: string; + name: string; + targetDate: string; + deliverable: string; +} + +interface ProjectData { + name: string; + goal: string; + scopeIn: string; + scopeOut: string; + constraints: string; + assumptions: string; + stakeholders: Stakeholder[]; + milestones: Milestone[]; +} + +const createEmptyProject = (): ProjectData => ({ + name: '', + goal: '', + scopeIn: '', + scopeOut: '', + constraints: '', + assumptions: '', + stakeholders: [], + milestones: [], +}); + +const WizardPage: React.FC = () => { + const [current, setCurrent] = useState(0); + const [project, setProject] = useState(createEmptyProject()); + const [submitted, setSubmitted] = useState(false); + + const next = () => setCurrent(Math.min(current + 1, STEPS.length - 1)); + const prev = () => setCurrent(Math.max(current - 1, 0)); + + const handleSubmit = () => { + setSubmitted(true); + Message.success(`项目「${project.name}」已创建!`); + console.log('Project created:', project); + }; + + // ---- Step 1: Basic Info ---- + const renderBasicInfo = () => ( +
+ + setProject({ ...project, name: val })} + /> + + +