diff --git a/api/DTO/movieEdit.ts b/api/DTO/movieEdit.ts index ded289a..45654c9 100644 --- a/api/DTO/movieEdit.ts +++ b/api/DTO/movieEdit.ts @@ -625,21 +625,25 @@ export interface Role { name: string; url: string; status: number; + type: string; } interface Scene { url: string; script: string; status: number; + type: string; } interface ShotSketch { url: string; script: string; status: number; + type: string; } export interface ShotVideo { video_id: string; urls: string[]; video_status: number; + type: string; } // 执行loading文字映射 diff --git a/components/pages/style/work-flow.css b/components/pages/style/work-flow.css index 6f02097..e551469 100644 --- a/components/pages/style/work-flow.css +++ b/components/pages/style/work-flow.css @@ -153,7 +153,7 @@ .media-Ocdu1O { flex-direction: column; - gap: 12px; + gap: 8px; height: 100%; flex: 1; display: flex; diff --git a/components/pages/work-flow.tsx b/components/pages/work-flow.tsx index cbc6d3f..8f79222 100644 --- a/components/pages/work-flow.tsx +++ b/components/pages/work-flow.tsx @@ -77,7 +77,7 @@ const WorkFlow = React.memo(function WorkFlow() { return ( -
+
@@ -131,7 +131,7 @@ const WorkFlow = React.memo(function WorkFlow() { ) : isLoading ? ( ) : ( -
+
{taskObject.currentStage !== 'final_video' && taskObject.currentStage !== 'script' && ( -
+
+ + + )} +
+ {/* 角色类型 */} + {currentSketch.type === 'role' && ( +
+ Role: {currentSketch.name} +
+ )} +
+ {/* 操作按钮组 */}
)} -
- Scene {index + 1} +
+ {/* 角色类型 */} + {sketch.type === 'role' && ( +
+ + Role +
+ )} + {/* 场景类型 */} + {sketch.type === 'scene' && ( +
+ + Scene +
+ )} + {/* 分镜类型 */} + {(!sketch.type || sketch.type === 'shot_sketch') && ( +
+ + Shot {index + 1} +
+ )}
); @@ -269,7 +288,7 @@ export function ThumbnailGrid({
setIsFocused(false)} > {taskObject.currentStage === 'video' && renderVideoThumbnails()} - {taskObject.currentStage === 'scene' && renderSketchThumbnails(taskObject.scenes.data)} + {(taskObject.currentStage === 'scene' || taskObject.currentStage === 'character') && renderSketchThumbnails(getCurrentData())} {taskObject.currentStage === 'shot_sketch' && renderSketchThumbnails(taskObject.shot_sketch.data)} - {taskObject.currentStage === 'character' && renderSketchThumbnails(taskObject.scenes.data)}
); } diff --git a/components/pages/work-flow/use-workflow-data.tsx b/components/pages/work-flow/use-workflow-data.tsx index df92ee4..ef24078 100644 --- a/components/pages/work-flow/use-workflow-data.tsx +++ b/components/pages/work-flow/use-workflow-data.tsx @@ -215,7 +215,8 @@ export function useWorkflowData() { characterList.push({ name: character.character_name, url: character.image_path, - status: character.image_path ? 1 : (task.task_status === 'COMPLETED' ? 2 : 0) + status: character.image_path ? 1 : (task.task_status === 'COMPLETED' ? 2 : 0), + type: 'role' }); } taskCurrent.roles.data = characterList; @@ -242,7 +243,8 @@ export function useWorkflowData() { sketchList.push({ url: sketch.image_path, script: sketch.sketch_name, - status: sketch.image_path ? 1 : (task.task_status === 'COMPLETED' ? 2 : 0) + status: sketch.image_path ? 1 : (task.task_status === 'COMPLETED' ? 2 : 0), + type: 'scene' }); } taskCurrent.scenes.data = sketchList; @@ -269,7 +271,8 @@ export function useWorkflowData() { sketchList.push({ url: sketch.url, script: sketch.description, - status: sketch.url ? 1 : (task.task_status === 'COMPLETED' ? 2 : 0) + status: sketch.url ? 1 : (task.task_status === 'COMPLETED' ? 2 : 0), + type: 'shot_sketch' }); } taskCurrent.shot_sketch.data = sketchList; @@ -302,6 +305,7 @@ export function useWorkflowData() { urls: video.urls, video_id: video.video_id, video_status: video_status, // 0 生成中 1 生成完成 2 生成失败 + type: 'video' }); } taskCurrent.videos.data = videoList; @@ -427,7 +431,8 @@ export function useWorkflowData() { characterList.push({ name: character.character_name, url: character.image_path, - status: character.image_path ? 1 : (data.character.task_status === 'COMPLETED' ? 2 : 0) + status: character.image_path ? 1 : (data.character.task_status === 'COMPLETED' ? 2 : 0), + type: 'role' }); } taskCurrent.roles.data = characterList; @@ -446,7 +451,8 @@ export function useWorkflowData() { sketchList.push({ url: sketch.image_path, script: sketch.sketch_name, - status: sketch.image_path ? 1 : (data.sketch.task_status === 'COMPLETED' ? 2 : 0) + status: sketch.image_path ? 1 : (data.sketch.task_status === 'COMPLETED' ? 2 : 0), + type: 'scene' }); } taskCurrent.scenes.data = sketchList; @@ -466,7 +472,8 @@ export function useWorkflowData() { sketchList.push({ url: sketch.url, script: sketch.description, - status: sketch.url ? 1 : (data.shot_sketch.task_status === 'COMPLETED' ? 2 : 0) + status: sketch.url ? 1 : (data.shot_sketch.task_status === 'COMPLETED' ? 2 : 0), + type: 'shot_sketch' }); } taskCurrent.shot_sketch.data = sketchList; @@ -492,6 +499,7 @@ export function useWorkflowData() { urls: video.urls, video_id: video.video_id, video_status: video_status, // 0 生成中 1 生成完成 2 生成失败 + type: 'video' }); } taskCurrent.videos.data = videoList;