feat(知识领域): 添加敏捷裁剪因素功能

1. 类型定义:
   - 新增TailoringFactor接口定义敏捷裁剪因素
   - 为KnowledgeArea添加可选的tailoringFactors字段

2. 数据更新:
   - 为KA05(项目质量管理)添加4个敏捷裁剪因素:
     * 政策合规与审计
     * 标准与法规合规性
     * 持续改进
     * 干系人参与

3. 页面展示:
   - 在知识领域详情页添加敏捷裁剪因素展示区域
   - 使用灯泡图标和编号列表样式
   - 支持深色模式

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>
This commit is contained in:
ittoview
2026-02-18 13:15:45 +00:00
parent 2a5b971f2f
commit c5a8e0525b
3 changed files with 55 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
import { useEffect, useRef } from 'react'
import { Link, useParams } from 'react-router-dom'
import { motion } from 'framer-motion'
import { ArrowRight, FileText, Wrench, FileOutput } from 'lucide-react'
import { ArrowRight, FileText, Wrench, FileOutput, Lightbulb } from 'lucide-react'
import { knowledgeAreas, processesByKnowledgeArea, knowledgeAreaMap, processGroupMap } from '@/data'
const containerVariants = {
@@ -73,6 +73,34 @@ export function KnowledgeAreasPage() {
<p className="mt-2 text-sm text-gray-600 dark:text-gray-300">{selectedKA.description}</p>
</motion.div>
{/* 敏捷裁剪因素 */}
{selectedKA.tailoringFactors && selectedKA.tailoringFactors.length > 0 && (
<motion.div
initial={{ opacity: 0, y: 10 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: 0.1 }}
className="bg-white dark:bg-gray-800 rounded-lg p-4 shadow-sm border border-gray-100 dark:border-gray-700"
>
<div className="flex items-center gap-2 mb-3">
<Lightbulb size={18} className="text-amber-500" />
<h2 className="text-base font-semibold text-gray-900 dark:text-white"></h2>
</div>
<div className="space-y-3">
{selectedKA.tailoringFactors.map((factor, index) => (
<div key={index} className="flex gap-3">
<div className="flex-shrink-0 w-6 h-6 rounded-full bg-amber-100 dark:bg-amber-900/30 flex items-center justify-center text-amber-600 dark:text-amber-400 text-xs font-medium">
{index + 1}
</div>
<div className="flex-1">
<h3 className="text-sm font-medium text-gray-900 dark:text-white mb-1">{factor.title}</h3>
<p className="text-xs text-gray-600 dark:text-gray-400">{factor.description}</p>
</div>
</div>
))}
</div>
</motion.div>
)}
{/* 过程列表 - 紧凑版 */}
<motion.div variants={containerVariants} initial="hidden" animate="visible" className="space-y-2">
{processes.map((process) => {