From 3e5120802492fd870746d277334db3313952f4bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=87=AF?= Date: Thu, 2 Jul 2026 10:06:24 +0800 Subject: [PATCH] feat: add roundtable chain rail scroll --- .../pages/RoundtablePlanningPage.tsx | 78 ++++++++++++------- 1 file changed, 51 insertions(+), 27 deletions(-) diff --git a/frontend-web/src/roundtable-planning/pages/RoundtablePlanningPage.tsx b/frontend-web/src/roundtable-planning/pages/RoundtablePlanningPage.tsx index ffb04607..b7718f96 100644 --- a/frontend-web/src/roundtable-planning/pages/RoundtablePlanningPage.tsx +++ b/frontend-web/src/roundtable-planning/pages/RoundtablePlanningPage.tsx @@ -2729,7 +2729,8 @@ function LeftSidebar({ ref={dzRef} id="left-sidebar" className={cn( - "shrink-0 flex flex-col gap-3 overflow-y-auto pr-1 transition-[width] duration-200 ease-out", + "min-h-0 shrink-0 flex flex-col gap-3 pr-1 transition-[width] duration-200 ease-out", + isStep2 ? "overflow-y-auto" : "overflow-hidden", isStep2 && !sidebarExpanded ? "w-[56px]" : "w-[280px]", )} > @@ -2911,6 +2912,7 @@ function RoundtableEntryRail({ businessCode?: string | null; }) { const [chains, setChains] = useState([]); + const [chainSectionExpanded, setChainSectionExpanded] = useState(true); const [expandedChainId, setExpandedChainId] = useState(null); const { drafts: records, refresh } = useRoundtableDrafts(taskId); // 分析记录「按业务链筛选」—— 选项从已加载草稿的 chainTitle 去重得到, @@ -2961,7 +2963,7 @@ function RoundtableEntryRail({ let cancelled = false; void listChains("public") .then((all) => { - if (!cancelled) setChains(all.slice(0, 3)); + if (!cancelled) setChains(all); }) .catch(() => { /* 业务链非关键,静默忽略 */ @@ -2985,7 +2987,7 @@ function RoundtableEntryRail({ }; return ( - <> +
{/* 深链接(taskId)模式:左上角展示「当前任务」(rwfx/3qfx)或「当前行动」(xdfx),替代业务链选择。 */} {deeplink ? ( isXdfx ? ( @@ -3028,33 +3030,50 @@ function RoundtableEntryRail({
) ) : ( - /* 业务链(公共,前 3 个) */ + /* 业务链(公共列表,内部滚动) */
-
+

业务链

+ + {chains.length} + +
- {chains.length === 0 ? ( + {chainSectionExpanded && chains.length === 0 ? (

暂无公共业务链

- ) : ( -
- {chains.map((chain) => { - const selected = selectedChainId === chain.id; - const graphOpen = expandedChainId === chain.id; - const stageGroups = getChainStageGroups(chain); - let seatColorIndex = 0; - return ( -
+ ) : chainSectionExpanded ? ( +
+
+ {chains.map((chain) => { + const selected = selectedChainId === chain.id; + const graphOpen = expandedChainId === chain.id; + const stageGroups = getChainStageGroups(chain); + let seatColorIndex = 0; + return ( +
)} -
- ); - })} +
+ ); + })} +
+ ) : ( +

+ 已收起,可展开查看全部公共业务链。 +

)}
)} @@ -3342,7 +3366,7 @@ function RoundtableEntryRail({ )}
- + ); }