diff --git a/src/components/DocumentCockpit.tsx b/src/components/DocumentCockpit.tsx index 8a32602..c450146 100644 --- a/src/components/DocumentCockpit.tsx +++ b/src/components/DocumentCockpit.tsx @@ -18,7 +18,7 @@ import { } from '../documentCockpit' import { CockpitPanel, CockpitReader } from './CockpitReader' -interface ProjectView { id: string; name: string; canAudit?: boolean } +interface ProjectView { projectId: string; name: string; canAudit?: boolean } function CockpitErrorState({ raw }: { raw: string }) { const c = classifyRdmError(raw) @@ -71,7 +71,7 @@ export function DocumentCockpit() { const rows = Array.isArray(list) ? list : (list?.projects ?? []) setProjects(rows) // 设计 §6.2:进入驾驶舱默认选中第一个可见项目,驱动概览首屏。 - if (rows.length > 0) setPid(prev => prev || rows[0].id) + if (rows.length > 0) setPid(prev => prev || rows[0].projectId) }) .catch(e => { if (!c) setError(e.message) }) return () => { c = true } @@ -130,7 +130,7 @@ export function DocumentCockpit() {
{filter &&