From 0a5788e52c8c33c05ed5e156043cf84137be342e Mon Sep 17 00:00:00 2001 From: ittoview Date: Mon, 23 Feb 2026 06:32:09 +0000 Subject: [PATCH] =?UTF-8?q?feat(=E8=BF=87=E7=A8=8B=E8=AF=A6=E6=83=85):=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=B8=BB=E8=A6=81=E4=BD=9C=E7=94=A8=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E6=9B=BF=E6=8D=A25W1H=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - types/itto.ts: Process 新增 purpose 可选字段 - processes.json: P8.7 监督风险添加 purpose 示例数据 - ProcessDetailPage: 隐藏5W1H,改为显示主要作用卡片 - CLAUDE.md: 记录三类日常学习内容更新操作指南 via [HAPI](https://hapi.run) Co-Authored-By: HAPI --- CLAUDE.md | 81 +++++++++++++++++++++++++++++++++ src/data/processes.json | 1 + src/pages/ProcessDetailPage.tsx | 44 ++++-------------- src/types/itto.ts | 1 + 4 files changed, 92 insertions(+), 35 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 91999dc..dc36a11 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -237,3 +237,84 @@ import { useAppStore } from '@/stores/useAppStore' - 需求设计文档: `docs/需求设计文档.md` - ITTO 手册 PDF: `⑦ ITTO输入输出工具手册.pdf` + +## 日常学习内容更新操作指南 + +### 1. 更新知识领域的敏捷裁剪因素 + +**文件:** `src/data/knowledge-areas.json` + +在对应知识领域对象中添加 `tailoringFactors` 数组: + +```json +{ + "id": "KA06", + "name": "项目资源管理", + "tailoringFactors": [ + { + "title": "多元化", + "description": "团队的多元化背景是什么?" + }, + { + "title": "物理位置", + "description": "团队成员和实物资源的物理位置在哪里?" + } + ] +} +``` + +**注意:** `tailoringFactors` 为可选字段,未填写的知识领域页面不显示该区块。 + +--- + +### 2. 更新过程的 ITTO 明细 + +**文件:** `src/data/processes.json` + +`inputs` / `tools` / `outputs` 支持两种格式: +- 纯字符串 ID(无明细):`"A008"` +- 带明细对象(有子项展开):`{ "id": "A008", "detail": [{ "label": "质量管理计划" }, { "label": "范围基准" }] }` + +**示例:** + +```json +{ + "id": "P5.1", + "inputs": [ + { "id": "A008", "detail": [{ "label": "质量管理计划" }, { "label": "范围基准" }] }, + { "id": "A076", "detail": [{ "label": "假设日志" }, { "label": "需求文件" }] }, + "A005", + "A006" + ], + "tools": [ + "TT001", + { "id": "TT008", "detail": [{ "label": "成本效益分析" }, { "label": "质量成本" }] } + ], + "outputs": [ + "A021", + { "id": "A077", "detail": [{ "label": "经验教训登记册" }, { "label": "风险登记册" }] } + ] +} +``` + +**注意:** +- `detail` 数组中每项必须是 `{ "label": "名称" }` 对象,不能是纯字符串 +- 如果引用的工件/工具 ID 不存在于 `artifacts.json` / `tools.json`,需先添加 + +--- + +### 3. 更新过程的主要作用 + +**文件:** `src/data/processes.json` + +在对应过程对象中添加 `purpose` 字段: + +```json +{ + "id": "P8.7", + "name": "监督风险", + "purpose": "保证项目决策是在整体项目风险和单个项目风险当前信息的基础上进行。本过程需要在整个项目期间开展。" +} +``` + +**注意:** `purpose` 为可选字段,填写后会在过程详情页标题下方以蓝色卡片展示;未填写则不显示。 diff --git a/src/data/processes.json b/src/data/processes.json index 68d68e1..1d96c7c 100644 --- a/src/data/processes.json +++ b/src/data/processes.json @@ -1261,6 +1261,7 @@ "inputs": ["A008", "A076", "A067", "A069", "A005", "A006"], "tools": ["TT008", "TT067", "TT032"], "outputs": ["A068", "A053", "A078", "A077", "A075"], + "purpose": "保证项目决策是在整体项目风险和单个项目风险当前信息的基础上进行。本过程需要在整个项目期间开展。", "w5h1": { "who": "PM主导,风险责任人参与", "what": "监督商定的风险应对计划的实施、跟踪已识别风险、识别和分析新风险,以及评估风险管理有效性", diff --git a/src/pages/ProcessDetailPage.tsx b/src/pages/ProcessDetailPage.tsx index 242ff62..79522f4 100644 --- a/src/pages/ProcessDetailPage.tsx +++ b/src/pages/ProcessDetailPage.tsx @@ -1,19 +1,9 @@ import { useParams, Link, useLocation, useNavigate } from 'react-router-dom' import { motion } from 'framer-motion' -import { ArrowLeft, ArrowRight, FileText, Wrench, FileOutput, LayoutGrid, Workflow, User, Target, Clock, MapPin, HelpCircle, Cog, Eye, EyeOff } from 'lucide-react' +import { ArrowLeft, ArrowRight, FileText, Wrench, FileOutput, LayoutGrid, Workflow, Eye, EyeOff, Info } from 'lucide-react' import { getProcessDetail, processes } from '@/data' import { useState, useEffect } from 'react' -// 5W1H图标和标签配置 -const w5h1Config = { - who: { icon: User, label: 'Who', title: '谁负责', color: 'text-blue-600 dark:text-blue-400' }, - what: { icon: Target, label: 'What', title: '做什么', color: 'text-emerald-600 dark:text-emerald-400' }, - when: { icon: Clock, label: 'When', title: '何时', color: 'text-amber-600 dark:text-amber-400' }, - where: { icon: MapPin, label: 'Where', title: '何地', color: 'text-purple-600 dark:text-purple-400' }, - why: { icon: HelpCircle, label: 'Why', title: '为什么', color: 'text-rose-600 dark:text-rose-400' }, - how: { icon: Cog, label: 'How', title: '如何做', color: 'text-indigo-600 dark:text-indigo-400' }, -} - type IttoSection = 'inputs' | 'tools' | 'outputs' const STORAGE_KEY = 'ittoview:process-detail:itto-visibility' @@ -78,7 +68,7 @@ export function ProcessDetailPage() { const ka = processDetail.knowledgeArea const pg = processDetail.processGroup - const w5h1 = (processDetail as any).w5h1 + const purpose = (processDetail as any).purpose const currentIndex = processes.findIndex(p => p.id === id) const prevProcess = currentIndex > 0 ? processes[currentIndex - 1] : null @@ -151,35 +141,19 @@ export function ProcessDetailPage() { - {/* 5W1H记忆卡片 */} - {w5h1 && ( + {/* 主要作用 */} + {purpose && ( -

- 5W1H - 记忆要点 -

-
- {(Object.keys(w5h1Config) as Array).map((key) => { - const config = w5h1Config[key] - const Icon = config.icon - const value = w5h1[key] - return ( -
-
- - {config.label} - ({config.title}) -
-

{value}

-
- ) - })} +
+ +

主要作用

+

{purpose}

)} diff --git a/src/types/itto.ts b/src/types/itto.ts index 15eba20..e86c532 100644 --- a/src/types/itto.ts +++ b/src/types/itto.ts @@ -72,6 +72,7 @@ export interface Process { inputs: ProcessRef[]; // 输入工件ID列表(支持明细) tools: ProcessRef[]; // 工具与技术ID列表(支持明细) outputs: ProcessRef[]; // 输出工件ID列表(支持明细) + purpose?: string; // 本过程的主要作用 w5h1?: Process5W1H; // 5W1H记忆辅助信息 }