feat: 分镜页面展示当前剧集的非阻断时长预警
This commit is contained in:
1 parent
7997c4aa1b
commit
383c4f2308
1 file changed
+28
@@ -19,6 +19,7 @@ import SubjectCoverageAudit from './components/SubjectCoverageAudit.vue'
|
|||||||
import type { SubjectCoverageIssue } from './coverage.types'
|
import type { SubjectCoverageIssue } from './coverage.types'
|
||||||
import WorkflowExecutionPanel from '../workflows/WorkflowExecutionPanel.vue'
|
import WorkflowExecutionPanel from '../workflows/WorkflowExecutionPanel.vue'
|
||||||
import { useStoryboard } from './useStoryboard'
|
import { useStoryboard } from './useStoryboard'
|
||||||
|
import { storyboardApi, type StoryboardDurationAudit } from './api'
|
||||||
|
|
||||||
const detailTab = ref('design')
|
const detailTab = ref('design')
|
||||||
|
|
||||||
@@ -49,6 +50,26 @@ const {
|
|||||||
run
|
run
|
||||||
} = useStoryboard()
|
} = useStoryboard()
|
||||||
const productionReady = computed(() => directionComplete.value && visualStateComplete.value)
|
const productionReady = computed(() => directionComplete.value && visualStateComplete.value)
|
||||||
|
/** 分镜时长审计为只读预警,接口失败不能影响分镜设计。 */
|
||||||
|
const durationAudit = ref<StoryboardDurationAudit | null>(null)
|
||||||
|
const durationAuditError = ref('')
|
||||||
|
watch(id, async (projectId, _old, onCleanup) => {
|
||||||
|
const controller = new AbortController()
|
||||||
|
onCleanup(() => controller.abort())
|
||||||
|
durationAudit.value = null
|
||||||
|
durationAuditError.value = ''
|
||||||
|
if (!projectId) return
|
||||||
|
try {
|
||||||
|
const result = await storyboardApi.durationAudit(projectId, controller.signal)
|
||||||
|
if (!controller.signal.aborted) durationAudit.value = result
|
||||||
|
} catch {
|
||||||
|
if (!controller.signal.aborted) durationAuditError.value = '分镜时长审计暂时不可用,不影响当前分镜操作。'
|
||||||
|
}
|
||||||
|
}, { immediate: true })
|
||||||
|
const currentEpisodeDurationIssues = computed(() =>
|
||||||
|
durationAudit.value?.issues.filter(issue => issue.episodeNo === episodeNo.value) ?? []
|
||||||
|
)
|
||||||
|
|
||||||
const coverage = computed(() => [
|
const coverage = computed(() => [
|
||||||
{
|
{
|
||||||
title: '导演设计',
|
title: '导演设计',
|
||||||
@@ -145,6 +166,13 @@ const rules = { concurrency: integerRule('批量并发'), maxRepairAttempts: int
|
|||||||
<NAlert v-if="episodeSourceUnavailable" type="info" :show-icon="false">
|
<NAlert v-if="episodeSourceUnavailable" type="info" :show-icon="false">
|
||||||
本集镜头已重新生成。新标题和剧情详情尚未提供,当前只显示正式镜头编号;请按实际生成规格核对内容。
|
本集镜头已重新生成。新标题和剧情详情尚未提供,当前只显示正式镜头编号;请按实际生成规格核对内容。
|
||||||
</NAlert>
|
</NAlert>
|
||||||
|
<NAlert v-if="currentEpisodeDurationIssues.length" type="warning" :show-icon="false">
|
||||||
|
<div class="text-sm font-medium">本集有 {{ currentEpisodeDurationIssues.length }} 条分镜时长建议(不阻断生成)</div>
|
||||||
|
<div v-for="(issue, index) in currentEpisodeDurationIssues" :key="index" class="mt-1 text-sm">
|
||||||
|
Beat {{ issue.beatNo }}<span v-if="issue.shotNo"> · Shot {{ issue.shotNo }}</span>:{{ issue.message }}
|
||||||
|
</div>
|
||||||
|
</NAlert>
|
||||||
|
<span v-if="durationAuditError" class="text-xs text-muted">{{ durationAuditError }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #header
|
<template #header
|
||||||
><div class="workspace-toolbar">
|
><div class="workspace-toolbar">
|
||||||
|
|||||||
Reference in new issue
Block a user