feat(short-drama-agent-front): 补齐后端生产与质量功能
This commit is contained in:
1 parent
967c4ebea1
commit
470b52e26d
52 files changed
+3754
-1075
No files matched your search
@@ -32,6 +32,8 @@ import type {
|
||||
import KeyframeDialog from './KeyframeDialog.vue'
|
||||
import KeyframeCard from './KeyframeCard.vue'
|
||||
import QualityDialog from './QualityDialog.vue'
|
||||
import VideoQualityDiagnostics from './VideoQualityDiagnostics.vue'
|
||||
import KeyframeValidationHistory from './KeyframeValidationHistory.vue'
|
||||
import ActionMenu from '../../../components/ui/ActionMenu.vue'
|
||||
import { AppDialog } from '../../../components/ui'
|
||||
import ModelCapabilities from './ModelCapabilities.vue'
|
||||
@@ -47,25 +49,37 @@ import GenerationModelControls from '../../generation-config/components/Generati
|
||||
|
||||
/** 单镜头生产面板只负责正式资产,不修改上游导演设计与即时状态。 */
|
||||
const props = defineProps<{
|
||||
/** 当前正式项目 ID。 */
|
||||
projectId: string
|
||||
/** 当前正式镜头。 */
|
||||
shot: DesignedShot
|
||||
/** 当前剧集编号,用于限制单镜头质量生成。 */
|
||||
episodeNo?: number
|
||||
/** 视频提示词就绪项。 */
|
||||
promptReadiness?: PromptReadinessItem
|
||||
/** 首帧就绪项。 */
|
||||
keyframeReadiness?: KeyframeReadinessItem
|
||||
/** 视频就绪项。 */
|
||||
videoReadiness?: VideoReadinessItem
|
||||
/** 是否从深链接打开首帧生成。 */
|
||||
openKeyframe?: boolean
|
||||
/** 页面上游状态是否阻断操作。 */
|
||||
disabled: boolean
|
||||
}>()
|
||||
const emit = defineEmits<{ changed: [] }>()
|
||||
/** 通知父页面刷新及观察已启动的质量任务。 */
|
||||
const emit = defineEmits<{ changed: []; qualityStarted: [executionId: string] }>()
|
||||
const key = computed(() => props.shot.shotId)
|
||||
/** 仅当前镜头存在后台首帧或视频任务时临时轮询,终态后自动停止。 */
|
||||
let query!: ReturnType<typeof usePolling<{
|
||||
keyframes: Awaited<ReturnType<typeof productionApi.listKeyframes>>
|
||||
videos: Awaited<ReturnType<typeof productionApi.listVideos>>
|
||||
qualityStatus: Awaited<ReturnType<typeof productionApi.videoQualityStatus>> | null
|
||||
qualityStatusError: string
|
||||
inputPlan: Awaited<ReturnType<typeof productionApi.videoInputPlan>> | null
|
||||
inputPlanError: string
|
||||
}>>
|
||||
let query!: ReturnType<
|
||||
typeof usePolling<{
|
||||
keyframes: Awaited<ReturnType<typeof productionApi.listKeyframes>>
|
||||
videos: Awaited<ReturnType<typeof productionApi.listVideos>>
|
||||
qualityStatus: Awaited<ReturnType<typeof productionApi.videoQualityStatus>> | null
|
||||
qualityStatusError: string
|
||||
inputPlan: Awaited<ReturnType<typeof productionApi.videoInputPlan>> | null
|
||||
inputPlanError: string
|
||||
}>
|
||||
>
|
||||
const assetPollInterval = computed(() => {
|
||||
const data = query?.data.value
|
||||
if (!data) return false
|
||||
@@ -173,6 +187,17 @@ function openQuality(kind: 'keyframe' | 'video', assetId: string) {
|
||||
}
|
||||
qualityOpen.value = true
|
||||
}
|
||||
/** 只打开当前镜头的有限质量重跑表单,费用确认后才发送任务。 */
|
||||
function openShotKeyframeQuality() {
|
||||
if (!props.episodeNo || !canGenerateKeyframe.value) return
|
||||
qualityTarget.value = {
|
||||
kind: 'batch',
|
||||
episodeNo: props.episodeNo,
|
||||
shotId: props.shot.shotId,
|
||||
title: `${props.shot.title} · 本镜首帧质量重跑`
|
||||
}
|
||||
qualityOpen.value = true
|
||||
}
|
||||
const confirmingKeyframe = ref('')
|
||||
const confirmingVideo = ref('')
|
||||
const inspecting = ref(false)
|
||||
@@ -458,6 +483,15 @@ async function inspectSpecs() {
|
||||
/>
|
||||
</div>
|
||||
<p v-else class="mt-4 text-xs text-muted">尚无已确认主首帧。请生成候选,完成质量检查后再设为主首帧。</p>
|
||||
<!-- 以下是当前主首帧的只读视觉校验历史模块 -->
|
||||
<KeyframeValidationHistory
|
||||
v-if="currentKeyframe"
|
||||
:key="currentKeyframe.id"
|
||||
:project-id="projectId"
|
||||
:shot-id="shot.shotId"
|
||||
:keyframe-id="currentKeyframe.id"
|
||||
class="mt-3"
|
||||
/>
|
||||
<NAlert
|
||||
v-if="currentKeyframe && keyframePassed(currentKeyframe.id) === false"
|
||||
type="error"
|
||||
@@ -470,6 +504,9 @@ async function inspectSpecs() {
|
||||
视频质量链状态暂时无法读取;视频资产仍可查看。请稍后刷新。
|
||||
</NAlert>
|
||||
<div class="production-stage-actions">
|
||||
<NButton :disabled="!episodeNo || !canGenerateKeyframe" @click="openShotKeyframeQuality"
|
||||
>本镜首帧质量重跑</NButton
|
||||
>
|
||||
<NButton v-if="keyframeCandidates.length" @click="candidatesOpen = true">
|
||||
管理候选({{ keyframeCandidates.length }})
|
||||
</NButton>
|
||||
@@ -597,6 +634,8 @@ async function inspectSpecs() {
|
||||
。请检查候选视频和校验结果,调整提示词或参考资产后再重新生成。
|
||||
</template>
|
||||
</NAlert>
|
||||
<!-- 以下是当前镜头只读视频质量详情与失败归因模块 -->
|
||||
<VideoQualityDiagnostics :key="shot.shotId" :shot-id="shot.shotId" class="mt-3" />
|
||||
<div v-if="videos.length" class="video-grid mt-4">
|
||||
<article v-for="item in videos" :key="item.id" class="video-record">
|
||||
<video
|
||||
@@ -795,6 +834,7 @@ async function inspectSpecs() {
|
||||
:target="qualityTarget"
|
||||
:disabled="assetBlocked"
|
||||
@changed="refreshAll"
|
||||
@started="emit('qualityStarted', $event)"
|
||||
/>
|
||||
<AppDialog
|
||||
v-model:open="candidatesOpen"
|
||||
|
||||
Reference in new issue
Block a user