feat: 补齐前端主流程并收紧工作台布局
统一工作台紧凑头部与形态图库间距,修复主体身份布局,并接入正式严格视频质量流水线。
This commit is contained in:
25 files changed
+355
-233
No files matched your search
@@ -22,6 +22,8 @@ export function useProduction() {
|
||||
const keyframeLimit = ref<number | ''>('')
|
||||
const keyframeWidth = ref<number | ''>('')
|
||||
const keyframeHeight = ref<number | ''>('')
|
||||
const videoLimit = ref<number | null>(1)
|
||||
const videoRepairAttempts = ref<number | null>(2)
|
||||
const snapshot = computed(() => breakdownSnapshot(context.checkpoints.value))
|
||||
const sourceEpisodes = computed(
|
||||
() => snapshot.value?.storyboardEpisodeShots ?? snapshot.value?.breakdownResult?.storyboardEpisodeShots ?? []
|
||||
@@ -80,6 +82,14 @@ export function useProduction() {
|
||||
(keyframeLimit.value === '' || (Number.isSafeInteger(keyframeLimit.value) && keyframeLimit.value > 0)) &&
|
||||
validOptionalSize(keyframeWidth.value, keyframeHeight.value)
|
||||
)
|
||||
/** 视频质量流水线要求有限的提交范围和至少一次自动修复额度。 */
|
||||
const videoQualityValid = computed(
|
||||
() =>
|
||||
Number.isSafeInteger(videoLimit.value) &&
|
||||
(videoLimit.value ?? 0) > 0 &&
|
||||
Number.isSafeInteger(videoRepairAttempts.value) &&
|
||||
(videoRepairAttempts.value ?? 0) > 0
|
||||
)
|
||||
const blocked = computed(
|
||||
() =>
|
||||
operation.value.pending ||
|
||||
@@ -91,7 +101,13 @@ export function useProduction() {
|
||||
|
||||
/** 批量操作只向就绪镜头提交;最终资产状态由轮询查询确认。 */
|
||||
async function run(command: ProductionCommand) {
|
||||
if (blocked.value || !batchValid.value || (command === 'keyframes' && !keyframeValid.value)) return
|
||||
if (
|
||||
blocked.value ||
|
||||
!batchValid.value ||
|
||||
(command === 'keyframes' && !keyframeValid.value) ||
|
||||
(command === 'videos' && !videoQualityValid.value)
|
||||
)
|
||||
return
|
||||
const projectId = id.value
|
||||
const input = { concurrency: concurrency.value, force: force.value }
|
||||
const target = getProductionSession(projectId)
|
||||
@@ -106,10 +122,10 @@ export function useProduction() {
|
||||
? `更新 ${staleKeyframes} 个过期主首帧`
|
||||
: `补齐第 ${episodeNo.value} 集主首帧`,
|
||||
videos: force.value
|
||||
? '新增项目视频候选'
|
||||
? '新增项目质量视频候选'
|
||||
: staleVideos > 0
|
||||
? `更新 ${staleVideos} 个过期主视频`
|
||||
: '提交就绪视频任务',
|
||||
: '提交视频质量任务',
|
||||
'retry-videos': '重试失败视频任务'
|
||||
}
|
||||
await runOperation(projectId, labels[command], async () => {
|
||||
@@ -137,7 +153,11 @@ export function useProduction() {
|
||||
target.receipt = {
|
||||
kind: 'videos',
|
||||
title: labels[command],
|
||||
result: await productionApi.generateVideos(projectId, input)
|
||||
result: await productionApi.generateQualityVideos(projectId, {
|
||||
...input,
|
||||
limit: videoLimit.value ?? undefined,
|
||||
maxRepairAttempts: videoRepairAttempts.value ?? 0
|
||||
})
|
||||
}
|
||||
} else {
|
||||
target.receipt = {
|
||||
@@ -170,7 +190,10 @@ export function useProduction() {
|
||||
keyframeLimit,
|
||||
keyframeWidth,
|
||||
keyframeHeight,
|
||||
videoLimit,
|
||||
videoRepairAttempts,
|
||||
keyframeValid,
|
||||
videoQualityValid,
|
||||
batchValid,
|
||||
blocked,
|
||||
run
|
||||
|
||||
Reference in new issue
Block a user