From 7ab05c26b1a8d7897fdc56b9cd8b8564e958b6ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=97=E6=9E=B3?= <7854742+wang_rumeng@user.noreply.gitee.com> Date: Sun, 20 Jul 2025 11:34:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=B7=A5=E4=BD=9C=E6=B5=81lo?= =?UTF-8?q?ading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/pages/work-flow/task-info.tsx | 54 +++++++++--------------- 1 file changed, 20 insertions(+), 34 deletions(-) diff --git a/components/pages/work-flow/task-info.tsx b/components/pages/work-flow/task-info.tsx index 26bab5f..80fc9b3 100644 --- a/components/pages/work-flow/task-info.tsx +++ b/components/pages/work-flow/task-info.tsx @@ -26,21 +26,6 @@ interface TaskInfoProps { roles: any[]; } -// 根据加载文本返回对应的图标 -const getStageIcon = (currentStage: number) => { - if (currentStage === 0) { - return Heart; - } else if (currentStage === 1) { - return Camera; - } else if (currentStage === 2) { - return Film; - } else if (currentStage === 3) { - return Scissors; - } else { - return Loader2; - } -}; - const stageIconMap = { 0: { icon: Heart, @@ -72,11 +57,12 @@ const StageIcons = ({ currentStage, isExpanded }: { currentStage: number, isExpa })); // 将当前阶段移到第一位 - return stages.sort((a, b) => { - if (a.stage === currentStage) return -1; - if (b.stage === currentStage) return 1; - return a.stage - b.stage; - }); + // return stages.sort((a, b) => { + // if (a.stage === currentStage) return -1; + // if (b.stage === currentStage) return 1; + // return a.stage - b.stage; + // }); + return stages; }, [currentStage]); return ( @@ -228,21 +214,21 @@ export function TaskInfo({ setIsScriptModalOpen(true); setCurrentStage(1); } - // if (currentLoadingText.includes('character')) { - // console.log('isScriptModalOpen-character', currentLoadingText, isScriptModalOpen); - // if (isScriptModalOpen) { - // setIsScriptModalOpen(false); + if (currentLoadingText.includes('character')) { + console.log('isScriptModalOpen-character', currentLoadingText, isScriptModalOpen); + if (isScriptModalOpen) { + setIsScriptModalOpen(false); - // // 延迟8s 再次打开 - // timerRef.current = setTimeout(() => { - // setIsScriptModalOpen(true); - // setCurrentStage(0); - // }, 8000); - // } else { - // setIsScriptModalOpen(true); - // setCurrentStage(0); - // } - // } + // 延迟8s 再次打开 + timerRef.current = setTimeout(() => { + setIsScriptModalOpen(true); + setCurrentStage(0); + }, 8000); + } else { + setIsScriptModalOpen(true); + setCurrentStage(0); + } + } if (currentLoadingText.includes('initializing')) { console.log('isScriptModalOpen-initializing', currentLoadingText, isScriptModalOpen); setIsScriptModalOpen(true);