feat(short-drama-agent-front): 接入连续性状态签收与联合审核
This commit is contained in:
1 parent
0d58dd8c53
commit
10e008ca10
21 files changed
+1319
-25
No files matched your search
@@ -1,4 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import ContinuityStateEditor from './ContinuityStateEditor.vue'
|
||||
import ContinuityJointReview from './ContinuityJointReview.vue'
|
||||
import { validStateChecks, stateDimensions } from '../continuity-state'
|
||||
import { computed, onScopeDispose, ref, watch } from 'vue'
|
||||
import { NButton, NCollapse, NCollapseItem, NInput, NSelect, NSkeleton } from 'naive-ui'
|
||||
import { AssetImage } from '../../../components/ui'
|
||||
@@ -44,6 +47,12 @@ const open = defineModel<boolean>('open', { default: false })
|
||||
const emit = defineEmits<{ changed: [] }>()
|
||||
/** 用户明确选择的镜头。 */
|
||||
const selected = ref<string[]>([])
|
||||
/** 显式人工范围,默认固定几何。 */
|
||||
const scope = ref<'fixed_geometry' | 'geometry_and_state'>('fixed_geometry')
|
||||
/** 联合审核表单通过公共底栏操作。 */
|
||||
const jointRef = ref<InstanceType<typeof ContinuityJointReview> | null>(null)
|
||||
/** 联合批准和执行请求锁。 */
|
||||
const jointBusy = ref(false)
|
||||
/** 当前共同场景形态。 */
|
||||
const sceneFormId = ref('')
|
||||
/** 最新诊断及原始依据。 */
|
||||
@@ -86,7 +95,7 @@ const reviewId = ref('')
|
||||
/** 用户输入后再显式读取,避免输入时反复请求。 */
|
||||
const requestedReviewId = ref('')
|
||||
/** 当前审核提交锁。 */
|
||||
const busy = computed(() => saving.value || layoutSaving.value)
|
||||
const busy = computed(() => saving.value || layoutSaving.value || jointBusy.value)
|
||||
/** 正式镜头选择约束。 */
|
||||
const selectionValid = computed(() =>
|
||||
continuitySelectionValid(
|
||||
@@ -180,7 +189,7 @@ const canSave = computed(
|
||||
!diagnosing.value
|
||||
)
|
||||
/** 与来源和参数绑定的诊断身份。 */
|
||||
const target = computed(() => JSON.stringify([context.value, selected.value, sceneFormId.value]))
|
||||
const target = computed(() => JSON.stringify([context.value, selected.value, sceneFormId.value, scope.value]))
|
||||
/** 请求代次防止切范围、关闭或编辑期间回填旧结果。 */
|
||||
let generation = 0
|
||||
/** 免费诊断取消控制器。 */
|
||||
@@ -236,6 +245,7 @@ function selectShots(ids: string[]) {
|
||||
*/
|
||||
function blankObservation(result: ContinuityDiagnosis): ContinuityObservation {
|
||||
return {
|
||||
...(scope.value === 'geometry_and_state' ? { stateChecks: [] } : {}),
|
||||
expectedFingerprint: result.fingerprint!,
|
||||
landmarks: ['', ''],
|
||||
frames: result.frames.map(frame => ({
|
||||
@@ -262,7 +272,12 @@ async function diagnose(withObservation = false) {
|
||||
sources.error.value
|
||||
)
|
||||
return
|
||||
if (withObservation && !validObservation(observation.value, selected.value)) {
|
||||
if (
|
||||
withObservation &&
|
||||
(!validObservation(observation.value, selected.value) ||
|
||||
(scope.value === 'geometry_and_state' &&
|
||||
!validStateChecks(observation.value?.stateChecks ?? [], diagnosis.value?.stateContext ?? [])))
|
||||
) {
|
||||
showActionFeedback(message, '请填写两个不同地标、逐镜观察依据及固定结构位置或数量。', 'warning')
|
||||
return
|
||||
}
|
||||
@@ -274,6 +289,7 @@ async function diagnose(withObservation = false) {
|
||||
JSON.stringify({
|
||||
shotIds: [...selected.value],
|
||||
sceneFormId: sceneFormId.value,
|
||||
...(scope.value === 'geometry_and_state' ? { scope: scope.value } : {}),
|
||||
...(withObservation ? { observation: observation.value } : {})
|
||||
})
|
||||
)
|
||||
@@ -379,11 +395,21 @@ function updateFrame(index: number, value: GeometryFrameObservation) {
|
||||
<!-- 以下是同场景连续镜头的全屏诊断与持久化审核模块 -->
|
||||
<AppDrawer
|
||||
v-model:open="open"
|
||||
title="跨镜固定几何审核"
|
||||
description="免费对照相邻两到三镜的固定结构,审核不会自动修改主首帧。"
|
||||
title="跨镜连续性审核"
|
||||
description="免费核对相邻两到三镜的固定结构与所选人工状态,各范围独立签收,不自动修改主首帧。"
|
||||
:busy="busy"
|
||||
>
|
||||
<div class="space-y-6">
|
||||
<!-- 以下是独立签收范围选择,切换后重新读取指纹 -->
|
||||
<NSelect
|
||||
v-model:value="scope"
|
||||
:disabled="busy || diagnosing"
|
||||
:options="[
|
||||
{ label: '固定几何(默认)', value: 'fixed_geometry' },
|
||||
{ label: '几何与状态(人工)', value: 'geometry_and_state' }
|
||||
]"
|
||||
aria-label="连续性签收范围"
|
||||
/>
|
||||
<section class="space-y-3">
|
||||
<WorkspaceSectionHeading
|
||||
title="选择审核范围"
|
||||
@@ -597,6 +623,12 @@ function updateFrame(index: number, value: GeometryFrameObservation) {
|
||||
/>
|
||||
</article>
|
||||
</div>
|
||||
<ContinuityStateEditor
|
||||
v-if="scope === 'geometry_and_state' && diagnosis?.stateContext && observation.stateChecks"
|
||||
v-model="observation.stateChecks"
|
||||
:contexts="diagnosis.stateContext"
|
||||
:disabled="busy || diagnosing"
|
||||
/>
|
||||
<NButton :loading="diagnosing" :disabled="busy" @click="diagnose(true)">免费诊断人工观察</NButton>
|
||||
</section>
|
||||
<!-- 以下是最新诊断结论及正式审核保存模块 -->
|
||||
@@ -608,6 +640,16 @@ function updateFrame(index: number, value: GeometryFrameObservation) {
|
||||
<p v-for="(item, index) in diagnosis.nonBlockingUnknowns" :key="'unknown-' + index">
|
||||
保留非阻断未知:{{ item.featureKey }} · {{ item.evidence }}(未核实通过)
|
||||
</p>
|
||||
<p v-for="(check, index) in diagnosis.stateChecks" :key="'state-' + index">
|
||||
{{ check.subjectRef }} · {{ stateDimensions[check.dimension] }}:{{ check.before ?? '未知' }} →
|
||||
{{ check.after ?? '未知' }} ·
|
||||
{{
|
||||
check.status === 'non_blocking_unknown'
|
||||
? '非阻断未知(仍未核实)'
|
||||
: continuityStatusLabels[check.status]
|
||||
}}
|
||||
· {{ check.evidence }}
|
||||
</p>
|
||||
<p v-if="!diagnosis.issues.length">本次提交的固定结构观察未发现冲突。</p>
|
||||
<NInput
|
||||
v-if="diagnosis.observation"
|
||||
@@ -677,6 +719,17 @@ function updateFrame(index: number, value: GeometryFrameObservation) {
|
||||
>
|
||||
</article>
|
||||
</section>
|
||||
<!-- 以下是已存有序组的联合审核计划与单次批准 -->
|
||||
<ContinuityJointReview
|
||||
ref="jointRef"
|
||||
v-if="reviewQuery.data.value && context"
|
||||
:key="reviewKey"
|
||||
:project-id="projectId"
|
||||
:review="reviewQuery.data.value"
|
||||
:disabled="disabled || saving || layoutSaving"
|
||||
@busy="jointBusy = $event"
|
||||
@changed="emit('changed')"
|
||||
/>
|
||||
<!-- 以下是布局补充与正式确认模块,确认后回读来源但不生成素材 -->
|
||||
<LayoutSupplementPanel
|
||||
ref="layoutPanelRef"
|
||||
@@ -693,6 +746,15 @@ function updateFrame(index: number, value: GeometryFrameObservation) {
|
||||
</div>
|
||||
<template #footer>
|
||||
<NButton :disabled="busy" @click="open = false">关闭</NButton>
|
||||
<NButton v-if="jointRef?.canAuthorize" type="primary" :disabled="busy" @click="jointRef.authorize"
|
||||
>登记联合审核费用批准</NButton
|
||||
>
|
||||
<NButton v-if="jointRef?.canExecute" type="primary" :disabled="busy" @click="jointRef.execute"
|
||||
>执行本次联合审核</NButton
|
||||
>
|
||||
<NButton v-if="jointRef?.canResume" type="primary" :disabled="busy" @click="jointRef.resume"
|
||||
>明确恢复原联合任务</NButton
|
||||
>
|
||||
<NButton
|
||||
v-if="diagnosis?.observation"
|
||||
type="primary"
|
||||
|
||||
Reference in new issue
Block a user