forked from 77media/video-flow
更新角色响应数据结构,将角色属性从characters更改为data;在RoleEditUseCase和SaveEditUseCase中相应调整数据映射和逻辑;在useWorkflowData中重置taskData结构以包含视频数据;在edit-modal中调用SaveEditUseCase以保存数据。
This commit is contained in:
parent
42aab61892
commit
01509ad3d5
@ -92,10 +92,6 @@ export class SaveEditUseCase {
|
||||
throw new Error('项目ID不能为空');
|
||||
}
|
||||
|
||||
if (SaveEditUseCase.videoTasks.length === 0) {
|
||||
throw new Error('视频任务列表不能为空');
|
||||
}
|
||||
|
||||
const response = await modifyCharacterOrScene({
|
||||
project_id: SaveEditUseCase.projectId,
|
||||
character_id: SaveEditUseCase.characterId,
|
||||
|
||||
@ -83,7 +83,7 @@ export function useWorkflowData() {
|
||||
const [isPauseWorkFlow, setIsPauseWorkFlow] = useState(false);
|
||||
const [mode, setMode] = useState<'automatic' | 'manual' | 'auto'>('automatic');
|
||||
|
||||
const taskData: any = {
|
||||
let taskData: any = {
|
||||
sketch: { data: [], total_count: -1 },
|
||||
character: { data: [], total_count: -1 },
|
||||
shot_sketch: { data: [], total_count: -1 },
|
||||
@ -612,8 +612,17 @@ export function useWorkflowData() {
|
||||
|
||||
// 回退到 指定状态 重新获取数据
|
||||
const fallbackToStep = (step: string) => {
|
||||
console.log('fallbackToStep', step);
|
||||
setCurrentStep(step);
|
||||
setNeedStreamData(true);
|
||||
taskData = {
|
||||
sketch: { data: [], total_count: -1 },
|
||||
character: { data: [], total_count: -1 },
|
||||
shot_sketch: { data: [], total_count: -1 },
|
||||
video: { data: [], total_count: -1 },
|
||||
status: step
|
||||
};
|
||||
// loadingText = LOADING_TEXT_MAP.initializing;
|
||||
}
|
||||
|
||||
// 重试加载数据
|
||||
|
||||
@ -11,6 +11,7 @@ import { SettingsTabContent } from './settings-tab-content';
|
||||
import { CharacterTabContent } from './character-tab-content';
|
||||
import { MusicTabContent } from './music-tab-content';
|
||||
import FloatingGlassPanel from './FloatingGlassPanel';
|
||||
import { SaveEditUseCase } from '@/app/service/usecase/SaveEditUseCase';
|
||||
|
||||
interface EditModalProps {
|
||||
isOpen: boolean;
|
||||
@ -126,12 +127,16 @@ const [pendingSwitchTabId, setPendingSwitchTabId] = useState<string | null>(null
|
||||
|
||||
const handleConfirmGotoFallback = () => {
|
||||
console.log('handleConfirmGotoFallback');
|
||||
SaveEditUseCase.saveData();
|
||||
if (activeTab === '0') {
|
||||
fallbackToStep('0');
|
||||
// 应用剧本
|
||||
} else {
|
||||
fallbackToStep('1');
|
||||
}
|
||||
setIsRemindFallbackOpen(false);
|
||||
// 关闭弹窗
|
||||
onClose();
|
||||
}
|
||||
const handleCloseRemindFallbackPanel = () => {
|
||||
if (pendingSwitchTabId) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user