fix(web): align workbench user ids with auth seed
Unify MOCK_USERS with backend auth (admin id=1), merge session identity on login, and migrate demo seeds/tests to id 2/3/4 for 张工/李/王. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
committed by
weichen
co-authored by
Cursor
parent
a8c8cba447
commit
636eb0ccf1
@@ -14,12 +14,12 @@ export const DEFAULT_PROJECTS: ProjectInfo[] = [
|
||||
title: '超声吸引系统 (NeuroPulse-CUSA)',
|
||||
deviceType: '数字化高频超声手术吸引系统',
|
||||
description: '神经外科颅内微创高频超声吸引与切割系统研发项目',
|
||||
creatorId: 1,
|
||||
creatorId: 2,
|
||||
creatorName: '张工',
|
||||
createdAt: '2026-09-08 09:00',
|
||||
members: [
|
||||
{
|
||||
userId: 1,
|
||||
userId: 2,
|
||||
userName: '张工',
|
||||
department: '机器人与微创器械研发中心',
|
||||
position: '方案工程师',
|
||||
@@ -28,7 +28,7 @@ export const DEFAULT_PROJECTS: ProjectInfo[] = [
|
||||
joinedAt: '2026-09-08 09:00',
|
||||
},
|
||||
{
|
||||
userId: 2,
|
||||
userId: 3,
|
||||
userName: '李主管',
|
||||
department: '机器人与微创内窥镜研发中心',
|
||||
position: '研发项目技术主管',
|
||||
@@ -37,7 +37,7 @@ export const DEFAULT_PROJECTS: ProjectInfo[] = [
|
||||
joinedAt: '2026-09-08 09:10',
|
||||
},
|
||||
{
|
||||
userId: 3,
|
||||
userId: 4,
|
||||
userName: '王总监',
|
||||
department: '医疗器械研发事业部',
|
||||
position: '微创器械研发总监',
|
||||
@@ -52,12 +52,12 @@ export const DEFAULT_PROJECTS: ProjectInfo[] = [
|
||||
title: '数字化超声手术吸引系统 (CUSA-Ultra)',
|
||||
deviceType: '高频超声手术吸引切割系统',
|
||||
description: '多频段钛合金压电换能手术吸引切割设备研发',
|
||||
creatorId: 1,
|
||||
creatorId: 2,
|
||||
creatorName: '张工',
|
||||
createdAt: '2026-09-07 14:00',
|
||||
members: [
|
||||
{
|
||||
userId: 1,
|
||||
userId: 2,
|
||||
userName: '张工',
|
||||
department: '机器人与微创器械研发中心',
|
||||
position: '方案工程师',
|
||||
@@ -66,7 +66,7 @@ export const DEFAULT_PROJECTS: ProjectInfo[] = [
|
||||
joinedAt: '2026-09-07 14:00',
|
||||
},
|
||||
{
|
||||
userId: 2,
|
||||
userId: 3,
|
||||
userName: '李主管',
|
||||
department: '机器人与微创内窥镜研发中心',
|
||||
position: '研发项目技术主管',
|
||||
@@ -75,7 +75,7 @@ export const DEFAULT_PROJECTS: ProjectInfo[] = [
|
||||
joinedAt: '2026-09-07 14:10',
|
||||
},
|
||||
{
|
||||
userId: 3,
|
||||
userId: 4,
|
||||
userName: '王总监',
|
||||
department: '医疗器械研发事业部',
|
||||
position: '微创器械研发总监',
|
||||
@@ -90,12 +90,12 @@ export const DEFAULT_PROJECTS: ProjectInfo[] = [
|
||||
title: `${p.name} (${p.shortName})`,
|
||||
deviceType: p.deviceType,
|
||||
description: `对标临床 ${p.customer},面向 ${p.targetMarket} 准入。${p.intendedUse}`,
|
||||
creatorId: p.creatorUserId || 1,
|
||||
creatorId: p.creatorUserId || 2,
|
||||
creatorName: '张工',
|
||||
createdAt: '2026-09-11 08:30',
|
||||
members: [
|
||||
{
|
||||
userId: 1,
|
||||
userId: 2,
|
||||
userName: '张工',
|
||||
department: '机器人与微创器械研发中心',
|
||||
position: '方案工程师',
|
||||
@@ -104,7 +104,7 @@ export const DEFAULT_PROJECTS: ProjectInfo[] = [
|
||||
joinedAt: '2026-09-11 08:30',
|
||||
},
|
||||
{
|
||||
userId: 2,
|
||||
userId: 3,
|
||||
userName: '李主管',
|
||||
department: '机器人与微创内窥镜研发中心',
|
||||
position: '研发项目技术主管',
|
||||
@@ -113,7 +113,7 @@ export const DEFAULT_PROJECTS: ProjectInfo[] = [
|
||||
joinedAt: '2026-09-11 08:40',
|
||||
},
|
||||
{
|
||||
userId: 3,
|
||||
userId: 4,
|
||||
userName: '王总监',
|
||||
department: '医疗器械研发事业部',
|
||||
position: '微创器械研发总监',
|
||||
|
||||
Reference in New Issue
Block a user