forked from 77media/video-flow
初始化剧本 只期望 处于剧本阶段 触发;
This commit is contained in:
parent
07349766ef
commit
fd7aa0a18e
@ -109,18 +109,6 @@ export function useWorkflowData() {
|
|||||||
setAnyAttribute,
|
setAnyAttribute,
|
||||||
applyScript
|
applyScript
|
||||||
} = useScriptService();
|
} = useScriptService();
|
||||||
// 初始化剧本
|
|
||||||
useUpdateEffect(() => {
|
|
||||||
if (taskObject.currentStage === 'script') {
|
|
||||||
console.log('开始初始化剧本', originalText,episodeId);
|
|
||||||
// TODO 为什么一开始没项目id
|
|
||||||
originalText && initializeFromProject(episodeId, originalText).then(() => {
|
|
||||||
console.log('应用剧本');
|
|
||||||
// 自动模式下 应用剧本;手动模式 需要点击 下一步 触发
|
|
||||||
mode.includes('auto') && applyScript();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, [originalText], {mode: 'none'});
|
|
||||||
// 监听剧本加载完毕
|
// 监听剧本加载完毕
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (scriptBlocksMemo.length > 0) {
|
if (scriptBlocksMemo.length > 0) {
|
||||||
@ -596,6 +584,16 @@ export function useWorkflowData() {
|
|||||||
|
|
||||||
console.log('---look-taskData', taskCurrent);
|
console.log('---look-taskData', taskCurrent);
|
||||||
|
|
||||||
|
if (taskCurrent.currentStage === 'script') {
|
||||||
|
console.log('开始初始化剧本', originalText,episodeId);
|
||||||
|
// TODO 为什么一开始没项目id
|
||||||
|
originalText && initializeFromProject(episodeId, originalText).then(() => {
|
||||||
|
console.log('应用剧本');
|
||||||
|
// 自动模式下 应用剧本;手动模式 需要点击 下一步 触发
|
||||||
|
mode.includes('auto') && applyScript();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 设置步骤
|
// 设置步骤
|
||||||
setTaskObject(prev => {
|
setTaskObject(prev => {
|
||||||
const newState = JSON.parse(JSON.stringify({...prev, ...taskCurrent}));
|
const newState = JSON.parse(JSON.stringify({...prev, ...taskCurrent}));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user