fix(short-drama-agent-front): 显示首帧警告镜头并支持定位刷新
This commit is contained in:
1 parent
383c4f2308
commit
83482a70c5
4 files changed
+109
-26
No files matched your search
@@ -53,21 +53,25 @@ const productionReady = computed(() => directionComplete.value && visualStateCom
|
||||
/** 分镜时长审计为只读预警,接口失败不能影响分镜设计。 */
|
||||
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) ?? []
|
||||
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(() => [
|
||||
@@ -167,9 +171,12 @@ const rules = { concurrency: integerRule('批量并发'), maxRepairAttempts: int
|
||||
本集镜头已重新生成。新标题和剧情详情尚未提供,当前只显示正式镜头编号;请按实际生成规格核对内容。
|
||||
</NAlert>
|
||||
<NAlert v-if="currentEpisodeDurationIssues.length" type="warning" :show-icon="false">
|
||||
<div class="text-sm font-medium">本集有 {{ currentEpisodeDurationIssues.length }} 条分镜时长建议(不阻断生成)</div>
|
||||
<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 }}
|
||||
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>
|
||||
|
||||
@@ -456,13 +456,53 @@ const rules = { concurrency: integerRule('批量并发'), limit: integerRule('
|
||||
title="下游主首帧需要处理"
|
||||
data-keyframe-impact
|
||||
>
|
||||
{{ impact.stale.value.length }}
|
||||
个镜头的主首帧已标记为过期。此警告不表示形态图片本身失效;请选择镜头核对当前素材,确认过期后再重建首帧。
|
||||
<div class="flex flex-wrap items-start justify-between gap-2">
|
||||
<p>
|
||||
{{ impact.stale.value.length }}
|
||||
个镜头的首帧需要核对。此警告不表示形态图片本身失效;请先查看对应镜头与关联素材,确认原因后再处理。
|
||||
</p>
|
||||
<NButton
|
||||
text
|
||||
size="small"
|
||||
:loading="impact.query.loading.value"
|
||||
data-refresh-keyframe-impact
|
||||
@click="impact.query.refresh"
|
||||
>重新检查</NButton
|
||||
>
|
||||
</div>
|
||||
<p v-if="impact.stale.value.some(item => item.inconsistent)" class="mt-2">
|
||||
其中
|
||||
{{ impact.stale.value.filter(item => item.inconsistent).length }}
|
||||
个镜头的首帧与视频检查结果不一致,不建议直接重复生图。
|
||||
其中 {{ impact.stale.value.filter(item => item.inconsistent).length }}
|
||||
个镜头的首帧与视频检查结果不一致,请先核对状态。
|
||||
</p>
|
||||
<!-- 以下是待处理镜头明细模块,直接展示编号并提供精确定位入口 -->
|
||||
<NScrollbar class="mt-3 max-h-36" aria-label="待核对镜头列表">
|
||||
<ul class="space-y-2">
|
||||
<li
|
||||
v-for="shot in impact.stale.value"
|
||||
:key="shot.shotId"
|
||||
class="flex flex-wrap items-center gap-x-4 gap-y-2"
|
||||
>
|
||||
<span class="font-medium"
|
||||
>第 {{ shot.episodeNo }} 集 · BEAT {{ shot.beatNo }} / 镜头 {{ shot.shotNo }}</span
|
||||
>
|
||||
<NTag size="small" :bordered="false" type="warning">{{
|
||||
shot.inconsistent ? '状态待核对' : '首帧过期'
|
||||
}}</NTag>
|
||||
<NButton text size="small" data-impact-materials @click="selectImpactShot(shot.shotId)"
|
||||
>查看关联素材</NButton
|
||||
>
|
||||
<RouterLink
|
||||
:to="{
|
||||
path: `/projects/${encodeURIComponent(id)}/production`,
|
||||
query: { episodeNo: String(shot.episodeNo), shotId: shot.shotId }
|
||||
}"
|
||||
class="text-button"
|
||||
data-impact-shot-link
|
||||
>查看镜头 →</RouterLink
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</NScrollbar>
|
||||
</NAlert>
|
||||
<NAlert v-if="impact.query.error.value" type="warning" :show-icon="false" class="mt-3"
|
||||
>镜头影响检查失败,暂时无法确认有无过期首帧:{{ impact.query.error.value }}
|
||||
@@ -486,7 +526,7 @@ const rules = { concurrency: integerRule('批量并发'), limit: integerRule('
|
||||
<NSelect
|
||||
:value="sourceShot?.shotId ?? null"
|
||||
:options="impactOptions"
|
||||
placeholder="选择过期镜头,查看关联素材"
|
||||
placeholder="选择待核对镜头,查看关联素材"
|
||||
clearable
|
||||
aria-label="选择关联镜头"
|
||||
class="asset-impact-select"
|
||||
|
||||
Reference in new issue
Block a user