feat: 版本详情完整功能 + 数据串联 + 登录模块

- 版本详情:关联需求Tab(从需求池添加已采纳需求/移除释放)
- 版本详情:调研/产品方案/UI设计Tab(计划CRUD、完成提交成果、耗时统计)
- 版本详情:超期校验(结束日期超版本截止需填写原因)
- 版本详情:概览统计卡片(加班时长/排名/原因占比)
- 数据串联:产品→项目→版本→需求→加班全链路贯通
- 版本管理:规划中版本可删除,删除释放关联需求
- 数据清理:仅保留翻台宝/值班,需求池10条值班待评审需求
- 修复:列表页overflow裁剪菜单问题(4个页面统一修复)
- 新增:登录模块、AuthGuard、VersionPlan store

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Script Generator
2026-06-10 17:07:36 +08:00
parent 2f69bc74cd
commit 2acc9aeaa9
21 changed files with 1278 additions and 323 deletions

View File

@@ -76,151 +76,21 @@ const PRESET_PLATFORMS: DictItem[] = [
// --- Mock requirements ---
const MOCK_REQUIREMENTS: Requirement[] = [
{
id: 'req-1',
code: 'REQ-001',
title: '考勤打卡支持人脸识别',
description: '员工打卡增加人脸识别验证方式,防止代打卡',
productId: 'mock-1',
projectId: 'p1',
versionId: 'v2',
sourceType: 'customer',
sourceTarget: '海底捞',
platforms: ['platform-2', 'platform-3'],
typeId: 'type-1',
status: 'developing',
priority: 'P1',
effort: 'L',
creator: '张三',
createdAt: '2024-04-10',
},
{
id: 'req-2',
code: 'REQ-002',
title: '电子合同批量签署',
description: '支持企业批量发起合同签署,提升入职效率',
productId: 'mock-1',
projectId: 'p2',
versionId: 'v13',
sourceType: 'operation',
sourceTarget: '运营部',
platforms: ['platform-1'],
typeId: 'type-1',
status: 'pending_review',
priority: 'P2',
effort: 'XL',
creator: '李四',
createdAt: '2024-05-02',
},
{
id: 'req-3',
code: 'REQ-003',
title: '支付渠道对账异常修复',
description: '修复微信支付对账金额不一致的问题',
productId: 'mock-2',
projectId: 'p4',
sourceType: 'customer',
sourceTarget: '西贝',
platforms: ['platform-1', 'platform-4'],
typeId: 'type-2',
status: 'testing',
priority: 'P0',
effort: 'M',
creator: '王五',
createdAt: '2024-05-15',
},
{
id: 'req-4',
code: 'REQ-004',
title: '会员积分过期提醒',
description: '积分到期前7天推送小程序模板消息通知',
productId: 'mock-2',
projectId: 'p5',
versionId: 'v13',
sourceType: 'management',
sourceTarget: '张总',
platforms: ['platform-4', 'platform-5'],
typeId: 'type-4',
status: 'planned',
priority: 'P2',
effort: 'S',
creator: '张三',
createdAt: '2024-05-20',
},
{
id: 'req-5',
code: 'REQ-005',
title: '值班交接单增加拍照上传',
description: '值班交接时支持拍照上传现场情况',
productId: 'mock-1',
projectId: 'p3',
sourceType: 'internal',
sourceTarget: '产品部',
platforms: ['platform-2', 'platform-3'],
typeId: 'type-1',
status: 'adopted',
priority: 'P3',
effort: 'M',
creator: '李四',
createdAt: '2024-05-28',
},
{
id: 'req-6',
code: 'REQ-006',
title: '考勤报表导出性能优化',
description: '大数据量下考勤报表导出超时,需优化查询和导出逻辑',
productId: 'mock-1',
projectId: 'p1',
versionId: 'v2',
sourceType: 'customer',
sourceTarget: '喜茶',
platforms: ['platform-1'],
typeId: 'type-7',
status: 'developing',
priority: 'P1',
effort: 'M',
creator: '王五',
createdAt: '2024-06-01',
},
{
id: 'req-7',
code: 'REQ-007',
title: '支付模块埋点需求',
description: '支付成功率、失败原因分布等核心指标埋点',
productId: 'mock-2',
projectId: 'p4',
sourceType: 'aftersale',
sourceTarget: '客服部',
platforms: ['platform-1', 'platform-4', 'platform-5'],
typeId: 'type-3',
status: 'released',
priority: 'P2',
effort: 'S',
creator: '张三',
createdAt: '2024-04-25',
},
{
id: 'req-8',
code: 'REQ-008',
title: '会员模块重构-拆分储值与积分服务',
description: '将储值卡和积分系统拆分为独立微服务,降低耦合度',
productId: 'mock-2',
projectId: 'p5',
sourceType: 'competitor',
sourceTarget: '美团收银',
platforms: ['platform-1'],
typeId: 'type-5',
status: 'pending_review',
priority: 'P3',
effort: 'XL',
creator: '李四',
createdAt: '2024-06-05',
},
{ id: 'req-1', code: 'REQ-001', title: '值班排班自动生成', description: '根据员工可用时间自动排班,支持轮换规则', productId: 'mock-1', projectId: 'p3', status: 'pending_review', priority: 'P1', effort: 'L', sourceType: 'internal', sourceTarget: '运营部', platforms: ['platform-1'], typeId: 'type-1', creator: '张三', createdAt: '2024-06-01' },
{ id: 'req-2', code: 'REQ-002', title: '值班交接确认', description: '交接班时双方确认签到,记录交接内容', productId: 'mock-1', projectId: 'p3', status: 'pending_review', priority: 'P1', effort: 'M', sourceType: 'internal', sourceTarget: '门店经理', platforms: ['platform-1'], typeId: 'type-1', creator: '张三', createdAt: '2024-06-01' },
{ id: 'req-3', code: 'REQ-003', title: '值班异常提醒', description: '迟到、缺勤自动推送提醒给店长', productId: 'mock-1', projectId: 'p3', status: 'pending_review', priority: 'P0', effort: 'M', sourceType: 'customer', sourceTarget: '连锁品牌A', platforms: ['platform-1', 'platform-2'], typeId: 'type-1', creator: '李四', createdAt: '2024-06-02' },
{ id: 'req-4', code: 'REQ-004', title: '值班日历视图', description: '以日历形式展示当月值班安排', productId: 'mock-1', projectId: 'p3', status: 'pending_review', priority: 'P2', effort: 'L', sourceType: 'internal', sourceTarget: '产品部', platforms: ['platform-1'], typeId: 'type-2', creator: '张三', createdAt: '2024-06-03' },
{ id: 'req-5', code: 'REQ-005', title: '值班换班申请', description: '员工可发起换班申请,经理审批', productId: 'mock-1', projectId: 'p3', status: 'pending_review', priority: 'P2', effort: 'M', sourceType: 'customer', sourceTarget: '连锁品牌B', platforms: ['platform-1'], typeId: 'type-1', creator: '李四', createdAt: '2024-06-03' },
{ id: 'req-6', code: 'REQ-006', title: '值班统计报表', description: '按月/周统计各员工值班时长、缺勤次数', productId: 'mock-1', projectId: 'p3', status: 'pending_review', priority: 'P2', effort: 'L', sourceType: 'internal', sourceTarget: '运营部', platforms: ['platform-1'], typeId: 'type-3', creator: '张三', createdAt: '2024-06-04' },
{ id: 'req-7', code: 'REQ-007', title: '多门店值班管理', description: '区域经理可查看管辖所有门店值班情况', productId: 'mock-1', projectId: 'p3', status: 'pending_review', priority: 'P1', effort: 'XL', sourceType: 'management', sourceTarget: '区域总监', platforms: ['platform-1', 'platform-3'], typeId: 'type-1', creator: '张三', createdAt: '2024-06-05' },
{ id: 'req-8', code: 'REQ-008', title: '值班备注功能', description: '排班时可添加备注(如特殊事项提醒)', productId: 'mock-1', projectId: 'p3', status: 'pending_review', priority: 'P3', effort: 'S', sourceType: 'internal', sourceTarget: '产品部', platforms: ['platform-1'], typeId: 'type-2', creator: '李四', createdAt: '2024-06-05' },
{ id: 'req-9', code: 'REQ-009', title: '法定节假日排班规则', description: '节假日自动应用特殊排班规则(加班费标记)', productId: 'mock-1', projectId: 'p3', status: 'pending_review', priority: 'P1', effort: 'M', sourceType: 'operation', sourceTarget: '合规部', platforms: ['platform-1'], typeId: 'type-1', creator: '张三', createdAt: '2024-06-06' },
{ id: 'req-10', code: 'REQ-010', title: '值班模板管理', description: '创建值班模板供快速复用(如早中晚三班)', productId: 'mock-1', projectId: 'p3', status: 'pending_review', priority: 'P2', effort: 'M', sourceType: 'internal', sourceTarget: '产品部', platforms: ['platform-1'], typeId: 'type-1', creator: '张三', createdAt: '2024-06-06' },
];
// --- localStorage helpers ---
const STORAGE_KEY = 'ftb_requirements_v2';
const STORAGE_KEY = 'ftb_requirements_v3';
function saveLocal(state: { requirements: Requirement[]; sourceTargets: SourceTarget[]; types: DictItem[]; platforms: DictItem[] }) {
try {