feat: 同步精简接口并统一表单校验
This commit is contained in:
1 parent
82d7bde631
commit
2eea0ea72e
66 files changed
+1611
-1100
No files matched your search
@@ -2,9 +2,9 @@ import { computed, onScopeDispose, ref, watch } from 'vue'
|
||||
import { projectsApi } from '../projects/api'
|
||||
import { useProjectContext } from '../projects/context'
|
||||
import { subjectImagesApi } from '../subject-images/api'
|
||||
import { hasRunningImages, isPrimaryIdentityStale, primaryImage } from '../subject-images/model'
|
||||
import { hasRunningImages, primaryImage } from '../subject-images/model'
|
||||
import { getOperation, runOperation } from '../workflows/operations'
|
||||
import { workflowCheckpoints } from '../workflows/selectors'
|
||||
import { hasRunningWorkflow } from '../workflows/selectors'
|
||||
import { errorMessage } from '../../lib/http'
|
||||
import { productionApi } from './api'
|
||||
import { getProductionSession } from './model'
|
||||
@@ -33,16 +33,10 @@ export async function checkPipeline(projectId: string) {
|
||||
)
|
||||
issues.push('各阶段镜头列表不一致,可能正在重新拆解,请刷新后重试。')
|
||||
if (project.status !== 'completed') issues.push('剧本尚未完成,请先完成剧本创作。')
|
||||
if (
|
||||
project.tasks.some(task => ['pending', 'queued', 'running', 'generating'].includes(task.status)) ||
|
||||
[...new Set(checkpoints.map(item => item.workflowName))].some(
|
||||
name => workflowCheckpoints(checkpoints, name).at(-1)?.state.workflowExecution?.status === 'running'
|
||||
)
|
||||
)
|
||||
issues.push('项目仍有后台任务或工作流进行中。')
|
||||
if (hasRunningWorkflow(checkpoints)) issues.push('项目仍有后台任务或工作流进行中。')
|
||||
if (!forms.length) issues.push('尚无正式形态,请先完成拆解。')
|
||||
if (forms.some(form => hasRunningImages(form.images))) issues.push('形态图片仍在生成中。')
|
||||
if (forms.some(form => !primaryImage(form.images)?.imageUrl || isPrimaryIdentityStale(form)))
|
||||
if (forms.some(form => !primaryImage(form.images)?.imageUrl))
|
||||
issues.push('请先补齐并确认所有形态主图,更新过期母版引用,再生成首帧。')
|
||||
if (
|
||||
!keyframes.total ||
|
||||
|
||||
Reference in new issue
Block a user