feat(short-drama-agent-front): 新增诊断抽屉并优化项目弹窗
This commit is contained in:
1 parent
97dc784c8b
commit
49ad08a63e
21 files changed
+1479
-363
No files matched your search
@@ -84,7 +84,9 @@ const productionReady = computed(() => directionComplete.value && visualStateCom
|
||||
const durationAudit = ref<StoryboardDurationAudit | null>(null)
|
||||
/** 项目预算汇总为只读数据,失败不影响现有分镜操作。 */
|
||||
const durationBudget = ref<ProjectDurationBudgetSummary | null>(null)
|
||||
const currentDurationBudget = computed(() => durationBudget.value?.episodes?.find(item => item.episodeNo === episodeNo.value) ?? null)
|
||||
const currentDurationBudget = computed(
|
||||
() => durationBudget.value?.episodes?.find(item => item.episodeNo === episodeNo.value) ?? null
|
||||
)
|
||||
const durationAuditError = ref('')
|
||||
/** 仅在只读预算请求进行中展示局部加载状态。 */
|
||||
const durationLoading = ref(false)
|
||||
@@ -108,9 +110,8 @@ async function refreshDuration(projectId: string) {
|
||||
durationLoading.value = false
|
||||
if (audit.status === 'fulfilled') durationAudit.value = audit.value
|
||||
if (budget.status === 'fulfilled' && Array.isArray(budget.value?.episodes)) durationBudget.value = budget.value
|
||||
durationAuditError.value = audit.status === 'rejected' || budget.status === 'rejected'
|
||||
? '部分时长信息暂不可用,不影响分镜操作。'
|
||||
: ''
|
||||
durationAuditError.value =
|
||||
audit.status === 'rejected' || budget.status === 'rejected' ? '部分时长信息暂不可用,不影响分镜操作。' : ''
|
||||
}
|
||||
watch(
|
||||
id,
|
||||
@@ -255,21 +256,39 @@ const rules = { concurrency: integerRule('批量并发'), maxRepairAttempts: int
|
||||
></NSelect>
|
||||
</div>
|
||||
<!-- 当前剧集时长汇总仅占一行;窄屏自动换行,不挤压操作按钮。 -->
|
||||
<div v-if="currentDurationBudget || durationLoading" class="storyboard-duration-summary" aria-label="本集时长预算">
|
||||
<div
|
||||
v-if="currentDurationBudget || durationLoading"
|
||||
class="storyboard-duration-summary"
|
||||
aria-label="本集时长预算"
|
||||
>
|
||||
<span v-if="durationLoading" class="text-muted" role="status">时长数据更新中…</span>
|
||||
<template v-if="currentDurationBudget">
|
||||
<span v-if="currentDurationBudget.targetDurationSeconds !== null">目标 {{ currentDurationBudget.targetDurationSeconds }} 秒</span>
|
||||
<span v-if="currentDurationBudget.targetDurationSeconds !== null"
|
||||
>目标 {{ currentDurationBudget.targetDurationSeconds }} 秒</span
|
||||
>
|
||||
<span v-else>自动规划时长</span>
|
||||
<span v-if="currentDurationBudget.plannedSeconds !== null">Beat {{ currentDurationBudget.plannedSeconds }} 秒</span>
|
||||
<span v-if="currentDurationBudget.shotCount > 0 && currentDurationBudget.shotSeconds !== null">Shot {{ currentDurationBudget.shotSeconds }} 秒</span>
|
||||
<span v-if="currentDurationBudget.plannedSeconds !== null"
|
||||
>Beat {{ currentDurationBudget.plannedSeconds }} 秒</span
|
||||
>
|
||||
<span v-if="currentDurationBudget.shotCount > 0 && currentDurationBudget.shotSeconds !== null"
|
||||
>Shot {{ currentDurationBudget.shotSeconds }} 秒</span
|
||||
>
|
||||
<span
|
||||
v-if="durationStatusLabel"
|
||||
:class="currentDurationBudget.audit?.needsReview ? 'text-warning' : 'text-muted'"
|
||||
>
|
||||
{{ durationStatusLabel }}
|
||||
<template v-if="currentDurationBudget.audit?.deviationSeconds !== null && currentDurationBudget.audit?.deviationSeconds !== undefined">
|
||||
{{ currentDurationBudget.audit.deviationSeconds > 0 ? '+' : '' }}{{ currentDurationBudget.audit.deviationSeconds }} 秒
|
||||
(±{{ currentDurationBudget.audit.toleranceSeconds ?? 0 }} 秒)
|
||||
<template
|
||||
v-if="
|
||||
currentDurationBudget.audit?.deviationSeconds !== null &&
|
||||
currentDurationBudget.audit?.deviationSeconds !== undefined
|
||||
"
|
||||
>
|
||||
{{ currentDurationBudget.audit.deviationSeconds > 0 ? '+' : ''
|
||||
}}{{ currentDurationBudget.audit.deviationSeconds }} 秒 (±{{
|
||||
currentDurationBudget.audit.toleranceSeconds ?? 0
|
||||
}}
|
||||
秒)
|
||||
</template>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
Reference in new issue
Block a user