From eee30266991706e77373065f59dc8d6b54599c22 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: Thu, 4 Sep 2025 21:42:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=AA=E8=BE=91=E8=AE=A1=E5=88=92=20?= =?UTF-8?q?=E6=9C=AA=E6=88=90=E5=8A=9F=20=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=89=AA=E8=BE=91=E5=B9=B3=E5=8F=B0=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/pages/work-flow/use-workflow-data.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/pages/work-flow/use-workflow-data.tsx b/components/pages/work-flow/use-workflow-data.tsx index 456adfa..6e262a3 100644 --- a/components/pages/work-flow/use-workflow-data.tsx +++ b/components/pages/work-flow/use-workflow-data.tsx @@ -61,6 +61,7 @@ export function useWorkflowData({ onEditPlanGenerated }: UseWorkflowDataProps = const [isPauseWorkFlow, setIsPauseWorkFlow] = useState(false); const [canGoToCut, setCanGoToCut] = useState(false); const [isShowError, setIsShowError] = useState(false); + const [isGenerateEditPlan, setIsGenerateEditPlan] = useState(false); const [state, setState] = useState({ mode: 'automatic' as 'automatic' | 'manual' | 'auto', originalText: '', @@ -134,6 +135,7 @@ export function useWorkflowData({ onEditPlanGenerated }: UseWorkflowDataProps = try { await getGenerateEditPlan({ project_id: episodeId }); console.error('生成剪辑计划成功'); + setIsGenerateEditPlan(true); localStorage.setItem(`isLoaded_plan_${episodeId}`, 'true'); isLoadedRef.current = 'true'; setNeedStreamData(true); @@ -142,6 +144,7 @@ export function useWorkflowData({ onEditPlanGenerated }: UseWorkflowDataProps = } catch (error) { console.error('生成剪辑计划失败:', error); setNeedStreamData(true); + setIsGenerateEditPlan(false); } }, [episodeId, onEditPlanGenerated]); @@ -645,7 +648,7 @@ export function useWorkflowData({ onEditPlanGenerated }: UseWorkflowDataProps = fallbackToStep, originalText: state.originalText, // showGotoCutButton: from && currentLoadingText.includes('Post-production') ? true : false, - showGotoCutButton: canGoToCut ? true : false, + showGotoCutButton: canGoToCut && isGenerateEditPlan ? true : false, generateEditPlan: openEditPlan, handleRetryVideo };