fix: 需求池操作矩阵微调 + 来源管理 bug 修复

需求池:
- 已采纳状态去掉「删除」操作(推进后不应直接删除,要走拒绝路径)

来源管理:
- 清空预设 mock 数据(海底捞/西贝/喜茶/奈雪等 17 条),用户自己维护
- 修复新建需求选「新建的来源对象」时显示数字 ID bug:
  原因是 RequirementModal 里 <option value={t.id}> 存了 ID,但 mock
  和详情页直接读 sourceTarget 当名字展示,导致新建的对象只显示 ID。
  改为 <option value={t.name}> 与 mock 数据格式对齐

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Script Generator
2026-06-16 20:39:03 +08:00
parent d1b4d81a75
commit 75519fd4e3
3 changed files with 4 additions and 29 deletions

View File

@@ -27,32 +27,7 @@ interface RequirementState {
// --- Preset dictionaries ---
const PRESET_SOURCE_TARGETS: SourceTarget[] = [
// customer type
{ id: 'st-1', name: '海底捞', sourceType: 'customer', createdAt: '2024-01-01' },
{ id: 'st-2', name: '西贝', sourceType: 'customer', createdAt: '2024-01-01' },
{ id: 'st-3', name: '喜茶', sourceType: 'customer', createdAt: '2024-01-01' },
{ id: 'st-4', name: '奈雪的茶', sourceType: 'customer', createdAt: '2024-01-01' },
{ id: 'st-5', name: '麦当劳', sourceType: 'customer', createdAt: '2024-01-01' },
// operation type
{ id: 'st-6', name: '运营部', sourceType: 'operation', createdAt: '2024-01-01' },
{ id: 'st-7', name: '销售部', sourceType: 'operation', createdAt: '2024-01-01' },
{ id: 'st-8', name: '客服部', sourceType: 'operation', createdAt: '2024-01-01' },
// internal
{ id: 'st-9', name: '产品部', sourceType: 'internal', createdAt: '2024-01-01' },
{ id: 'st-10', name: '技术部', sourceType: 'internal', createdAt: '2024-01-01' },
// management
{ id: 'st-11', name: '张总', sourceType: 'management', createdAt: '2024-01-01' },
{ id: 'st-12', name: '李总', sourceType: 'management', createdAt: '2024-01-01' },
// aftersale
{ id: 'st-13', name: '实施部', sourceType: 'aftersale', createdAt: '2024-01-01' },
{ id: 'st-14', name: '客服部', sourceType: 'aftersale', createdAt: '2024-01-01' },
// market
{ id: 'st-15', name: '市场部', sourceType: 'market', createdAt: '2024-01-01' },
// competitor
{ id: 'st-16', name: '美团收银', sourceType: 'competitor', createdAt: '2024-01-01' },
{ id: 'st-17', name: '客如云', sourceType: 'competitor', createdAt: '2024-01-01' },
];
const PRESET_SOURCE_TARGETS: SourceTarget[] = [];
const PRESET_TYPES: DictItem[] = [
{ id: 'type-1', name: '新功能', createdAt: '2024-01-01' },