feat(short-drama-agent-front): 接入首帧授权与连续性审核
This commit is contained in:
1 parent
dbf97e6f98
commit
518b630a46
35 files changed
+3070
-97
No files matched your search
@@ -7,7 +7,7 @@ import ContextNotice from '../../../components/ui/ContextNotice.vue'
|
||||
import IssueHint from '../../../components/ui/IssueHint.vue'
|
||||
import { useActionMessage } from '../../../components/ui/useActionMessage'
|
||||
import ProviderInputInspector from './ProviderInputInspector.vue'
|
||||
import { NButton, NCollapse, NCollapseItem, NSelect, NTag } from 'naive-ui'
|
||||
import { NButton, NCheckbox, NCollapse, NCollapseItem, NSelect, NTag } from 'naive-ui'
|
||||
import { computed, onScopeDispose, ref, watch } from 'vue'
|
||||
import { ImagePlus, RefreshCw } from '@lucide/vue'
|
||||
import { AssetImage } from '../../../components/ui'
|
||||
@@ -360,6 +360,10 @@ const historyBlocked = computed(() => {
|
||||
})
|
||||
/** 首帧校验历史弹窗的显示状态。 */
|
||||
const historyOpen = ref(false)
|
||||
/** 历史授权提交期间锁定记录弹窗。 */
|
||||
const historyAuthorizationPending = ref(false)
|
||||
/** 记录弹窗在统一底栏提交独立审核授权。 */
|
||||
const visionHistoryRef = ref<InstanceType<typeof KeyframeValidationHistory> | null>(null)
|
||||
/**
|
||||
* 打开指定首帧的校验历史,供主首帧与候选卡片共用。
|
||||
* @param keyframeId 需要查看历史的首帧 ID
|
||||
@@ -576,7 +580,13 @@ async function setPrimaryKeyframe() {
|
||||
qualityApi.keyframeHistory(shotId, keyframeId, undefined, props.projectId)
|
||||
])
|
||||
const vision = visionState(history)
|
||||
if (vision.active || vision.unknown || vision.resumable) throw new Error('审核尚未结算,暂不能设为主首帧。')
|
||||
if (
|
||||
vision.active ||
|
||||
vision.unknown ||
|
||||
vision.resumable ||
|
||||
history.some(item => item.id === review.validationTaskId && item.legacyTermination)
|
||||
)
|
||||
throw new Error('审核尚未结算,暂不能设为主首帧。')
|
||||
if (!['passed', 'manual_accepted'].includes(review.effectiveQualityStatus))
|
||||
throw new Error('此候选尚未通过当前质量要求,请先完成质量检查或有效人工复核。')
|
||||
const result = await productionApi.setPrimaryKeyframe(shotId, keyframeId)
|
||||
@@ -1145,19 +1155,39 @@ defineExpose({ inspectSpecs, inspecting })
|
||||
:stale-reason="videoHistoryId === currentVideo?.id ? videoStaleReason : videoHistoryAsset?.staleReason"
|
||||
/>
|
||||
</AppDialog>
|
||||
<AppDialog v-model:open="historyOpen" title="首帧记录" wide>
|
||||
<AppDialog v-model:open="historyOpen" title="首帧记录" :busy="historyAuthorizationPending" wide>
|
||||
<div v-if="historyOpen && historyKeyframeId" :key="historyKeyframeId" class="workspace-section-stack">
|
||||
<!-- 以下是按需读取的候选生成证据 -->
|
||||
<KeyframeInputDetails :project-id="projectId" :shot-id="shot.shotId" :keyframe-id="historyKeyframeId" />
|
||||
<KeyframeValidationHistory
|
||||
ref="visionHistoryRef"
|
||||
:project-id="projectId"
|
||||
:shot-id="shot.shotId"
|
||||
:keyframe-id="historyKeyframeId"
|
||||
:disabled="historyBlocked"
|
||||
@busy="historyAuthorizationPending = $event"
|
||||
initial-open
|
||||
@reviewed="refreshAfterReview"
|
||||
/>
|
||||
</div>
|
||||
<template #footer>
|
||||
<NCheckbox
|
||||
v-if="visionHistoryRef?.authorizationAvailable"
|
||||
:checked="visionHistoryRef.authorizationAcknowledged"
|
||||
:disabled="historyAuthorizationPending"
|
||||
@update:checked="visionHistoryRef.setAuthorizationAcknowledged($event)"
|
||||
>我已确认授权、费用与本次处理范围</NCheckbox
|
||||
>
|
||||
<NButton :disabled="historyAuthorizationPending" @click="historyOpen = false">关闭</NButton
|
||||
><NButton
|
||||
v-if="visionHistoryRef?.authorizationAvailable"
|
||||
type="primary"
|
||||
:loading="historyAuthorizationPending"
|
||||
:disabled="!visionHistoryRef.authorizationReady"
|
||||
@click="visionHistoryRef.submitAuthorization()"
|
||||
>{{ visionHistoryRef.authorizationLabel }}</NButton
|
||||
></template
|
||||
>
|
||||
</AppDialog>
|
||||
<KeyframeDialog
|
||||
v-model:open="keyframeOpen"
|
||||
|
||||
Reference in new issue
Block a user