feat(short-drama-agent-front): 优化分镜界面并新增弹窗手势

This commit is contained in:
GJ committed 2026-11-18 18:50:15 +08:00
1 parent b15a6011ce
commit d68f03471c
59 files changed
+2694 -857

No files matched your search

@@ -2,7 +2,6 @@
import { computed, onScopeDispose, ref, shallowRef, watch } from 'vue'
import { NButton, NCheckbox, NInput, NInputNumber } from 'naive-ui'
import { AssetImage } from '../../../components/ui'
import RawDataDetails from '../../../components/ui/RawDataDetails.vue'
import { useQuery } from '../../../composables/useQuery'
import { errorMessage } from '../../../lib/http'
import { useActionMessage } from '../../../components/ui/useActionMessage'
@@ -17,6 +16,15 @@ const props = defineProps<{
/** 已存人工记录。 */ review: ContinuityReview
/** 项目活动锁。 */ disabled: boolean
}>()
/**
* 使用本次审核的顺序说明图片归属,不显示内部镜头编号。
* @param shotId 原绑定镜头
* @returns 可读的审核范围位置
*/
function reviewShotLabel(shotId: string) {
const index = props.review.diagnosis.frames.findIndex(frame => frame.shotId === shotId)
return index < 0 ? '范围待核对' : `审核范围第 ${index + 1} 镜`
}
/** 把写入锁与变化交给原抽屉。 */
const emit = defineEmits<{ busy: [boolean]; changed: [] }>()
/** 当前免费计划。 */
@@ -318,11 +326,11 @@ defineExpose({ canAuthorize, canExecute, canResume, authorize, execute, resume }
{{ image.pixels.height }}
</p>
<p v-for="(binding, i) in image.bindings" :key="i">
{{ binding.shotId }} ·
{{ reviewShotLabel(binding.shotId) }} ·
{{ binding.role === 'frame' ? '镜头首帧' : '空间参考(不代表人物或道具状态)' }}
</p>
</div>
<RawDataDetails title="高级详情:最终脱敏请求、图片摘要与全部绑定" :value="plan" />
<template
v-if="plan.status === 'ready' && plan.executionAvailable && plan.capability.verified && !uncertain"
>
@@ -369,15 +377,7 @@ defineExpose({ canAuthorize, canExecute, canResume, authorize, execute, resume }
</p>
<p>{{ task.data.value.summary }}</p>
<p>人工原签收和非阻断未知保持原样,机器新观察不会自动覆盖。</p>
<RawDataDetails
title="原机器评估、解析观察与用量(独立追溯)"
:value="{
diagnosis: task.data.value.diagnosis,
machineObservation: task.data.value.machineObservation,
step: task.data.value.step,
feeScope: task.data.value.feeScope
}"
/>
<WorkflowExecutionPanel
v-if="execution.query.data.value?.id === task.data.value.executionId"
:execution="execution.query.data.value"
@@ -398,6 +398,7 @@ function updateFrame(index: number, value: GeometryFrameObservation) {
title="跨镜连续性审核"
description="免费核对相邻两到三镜的固定结构与所选人工状态,各范围独立签收,不自动修改主首帧。"
:busy="busy"
description-as-info
>
<div class="space-y-6">
<!-- 以下是独立签收范围选择,切换后重新读取指纹 -->
@@ -412,8 +413,9 @@ function updateFrame(index: number, value: GeometryFrameObservation) {
/>
<section class="space-y-3">
<WorkspaceSectionHeading
title="选择审核范围"
title="选择相邻的两到三镜"
description="选择同一场景形态下、同集正式顺序连续的两到三镜。"
description-as-info
/>
<NSelect
:value="selected"
@@ -479,6 +481,7 @@ function updateFrame(index: number, value: GeometryFrameObservation) {
镜头 {{ item.spec.beatNo }}.{{ item.spec.shotNo }} · {{ item.spec.title }}
</h3>
<AssetImage
class="h-[min(32dvh,280px)] aspect-auto"
:src="item.primary?.imageUrl"
:style="{
aspectRatio:
@@ -491,7 +494,8 @@ function updateFrame(index: number, value: GeometryFrameObservation) {
object-fit="contain"
empty-text="暂无当前主首帧"
/>
<p class="wrap-anywhere text-xs text-muted">当前主首帧:{{ item.primary?.id || '未设置' }}</p>
<p class="text-xs text-muted">{{ item.primary ? '已设置主首帧' : '尚未设置主首帧' }}</p>
<p class="text-sm">
镜头设计:{{
[
@@ -534,21 +538,6 @@ function updateFrame(index: number, value: GeometryFrameObservation) {
)
}}
</p>
<NCollapse
v-if="
diagnosis?.frames.find(frame => frame.shotId === item.spec.shotId)?.formalSourceFingerprint
"
>
<NCollapseItem name="source" title="高级来源详情">
<pre class="whitespace-pre-wrap break-words text-xs">{{
JSON.stringify(
diagnosis.frames.find(frame => frame.shotId === item.spec.shotId),
null,
2
)
}}</pre>
</NCollapseItem>
</NCollapse>
</article>
</section>
<!-- 以下是当前布局母版、场景形态当前性及历史版本模块 -->
@@ -571,12 +560,18 @@ function updateFrame(index: number, value: GeometryFrameObservation) {
<div v-for="layout in sceneSources.data.value.layouts" :key="layout.id" class="space-y-3">
<p class="text-sm">
{{ layout.name }} ·
<span class="wrap-anywhere text-xs text-muted">当前版本:{{ layout.version }}</span>
<span class="text-xs text-muted">已读取当前布局</span>
</p>
<p v-if="!layout.masters.length" class="text-sm text-muted">暂无适用布局母版。</p>
<div class="continuity-frame-grid">
<article v-for="master in layout.masters" :key="master.id" class="space-y-2 min-w-0">
<AssetImage :src="master.imageUrl" alt="布局母版" preview object-fit="contain" />
<AssetImage
class="h-[min(32dvh,280px)] aspect-auto"
:src="master.imageUrl"
alt="布局母版"
preview
object-fit="contain"
/>
<p class="text-sm">
{{ master.subjectFormId ? '当前场景形态机位' : '全局布局母版' }} ·
{{
@@ -595,6 +590,7 @@ function updateFrame(index: number, value: GeometryFrameObservation) {
<WorkspaceSectionHeading
title="人工观察"
description="相对已确认布局核对观察面与地标顺序。只记录固定结构位置和完整可辨数量;开门、关门属于即时状态。无法判断时请保留未知。"
description-as-info
/>
<div class="continuity-landmarks">
<NInput
@@ -674,6 +670,7 @@ function updateFrame(index: number, value: GeometryFrameObservation) {
<WorkspaceSectionHeading
title="读取历史审核"
description="刷新后恢复本机最近审核,也可填写已有审核编号。"
description-as-info
/>
<div class="flex items-end gap-2">
<NInput
@@ -710,13 +707,6 @@ function updateFrame(index: number, value: GeometryFrameObservation) {
{{ userFacingText(issue.message) }}
</p></template
>
<NCollapse
><NCollapseItem name="original" title="原始诊断">
<pre class="whitespace-pre-wrap break-words text-xs">{{
JSON.stringify(reviewQuery.data.value.diagnosis, null, 2)
}}</pre>
</NCollapseItem></NCollapse
>
</article>
</section>
<!-- 以下是已存有序组的联合审核计划与单次批准 -->
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { computed } from 'vue'
import { NButton, NInput, NSelect } from 'naive-ui'
import RawDataDetails from '../../../components/ui/RawDataDetails.vue'
import RecordDetails from '../../../components/ui/RecordDetails.vue'
import { stateDimensions, type StateCheck, type StateContext } from '../continuity-state'
/** 正式有序组与操作锁。 */
const props = defineProps<{ /** 正式上下文。 */ contexts: StateContext[]; /** 操作锁。 */ disabled: boolean }>()
@@ -60,11 +60,18 @@ function boundary(check: StateCheck, value: string) {
<p class="text-muted">
逐项核对原图和正式依据。无法辨认留空;出画不等于主体消失。交接或开关变化须有前镜实际动作及后镜本主体状态支持,不能只凭勾选依据判为一致。
</p>
<RawDataDetails
<RecordDetails
v-for="(context, i) in contexts"
:key="context.shotId"
:title="`第 ${i + 1} 镜正式状态与动作`"
:value="context"
:records="[
{
fields: context.sources.map(source => ({
label: source.executable ? '本镜动作' : '正式状态依据',
value: [source.subjectRef, source.text].filter(Boolean).join(' · ')
}))
}
]"
/>
<section v-for="(check, index) in checks" :key="index" class="space-y-3 bg-(--app-subtle) p-4">
<NSelect
@@ -120,7 +127,7 @@ function boundary(check: StateCheck, value: string) {
:options="
sources(check).map(s => ({
value: s.id,
label: `${s.shotId === check.fromShotId ? '前镜' : '后镜'} · ${s.subjectRef ?? '镜头'} · ${s.field} · ${s.text}${s.executable ? '(本镜实际执行)' : ''}`
label: `${s.shotId === check.fromShotId ? '前镜' : '后镜'} · ${s.subjectRef ?? '镜头'} · ${s.text}${s.executable ? '(本镜实际执行)' : ''}`
}))
"
:disabled="disabled"
@@ -1,9 +1,8 @@
<script setup lang="ts">
import { ClipboardCheck, ScanEye, Pencil, History } from '@lucide/vue'
import { ClipboardCheck, ScanEye, Pencil, History, Info } from '@lucide/vue'
import WorkspaceActionTooltip from '../../../components/ui/WorkspaceActionTooltip.vue'
import ContextNotice from '../../../components/ui/ContextNotice.vue'
import IssueHint from '../../../components/ui/IssueHint.vue'
import { productionMessage } from '../production-messages'
import { useKeyframeVision } from '../keyframe-vision'
import { computed, ref, watch } from 'vue'
@@ -13,7 +12,7 @@ import {
effectiveQualityLabels,
keyframeQualitySummary
} from '../effective-keyframe-quality'
import { NButton, NTag } from 'naive-ui'
import { NButton, NTag, NPopover } from 'naive-ui'
import { AssetImage, AssetOpenLink, StatusBadge } from '../../../components/ui'
import { formatDate } from '../../../lib/format'
import { productionStatusLabel } from '../model'
@@ -21,6 +20,7 @@ import type { ShotKeyframe } from '../types'
/** 首帧卡片统一主图标识、质量结论和晋升限制。 */
const props = defineProps<{
/** 镜头名称及稳定图片序号,由完整资产列表生成,仅用于展示。 */ displayName?: string
/** 摄影审核只读嵌入,保留图片与历史入口,不开放生成/编辑/采用。 */ readonly?: boolean
item: ShotKeyframe
/** 正式项目归属,用于查询候选审核。 */
@@ -40,10 +40,13 @@ const props = defineProps<{
}>()
/** 用户显式打开来源复核,不能自动调用模型。 */
const sourceReviewOpen = ref(false)
/** 模型、错误与来源信息按需查看,切换候选即关闭旧详情。 */
const detailsOpen = ref(false)
watch(
() => JSON.stringify([props.projectId, props.shotId, props.item.id]),
() => {
sourceReviewOpen.value = false
detailsOpen.value = false
},
{ flush: 'sync' }
)
@@ -134,8 +137,8 @@ const canSelect = computed(
/>
<AssetOpenLink :src="item.status === 'completed' ? item.imageUrl : null" label="打开图片" />
</div>
<div class="p-3">
<div class="flex flex-wrap items-center gap-2">
<div class="keyframe-card-body">
<div class="keyframe-card-status">
<StatusBadge :status="item.status" :label="productionStatusLabel(item.status)" />
<NTag v-if="item.source !== 'provider_variant'" size="small" :bordered="false">
{{ item.isPrimary ? '主首帧' : '候选首帧' }}
@@ -159,136 +162,174 @@ const canSelect = computed(
</NTag>
<NTag v-if="item.source === 'provider_variant'" size="small" :bordered="false">视频参考图</NTag>
<NTag v-if="item.isPrimary && stale" size="small" type="warning" :bordered="false">已过期</NTag>
<!-- 以下是完整尺寸信息模块,数据缺失时隐藏 -->
<span v-if="item.width && item.height" class="text-[10px] text-muted"
>{{ item.width }} × {{ item.height }}</span
>
</div>
<!-- 以下是候选的来源、画幅与后台审核状态 -->
<p
v-if="effectiveStatus === 'stale' && reviewQuery.data.value && !reviewQuery.error.value"
class="mt-2 text-xs text-muted"
>
{{ keyframeQualitySummary(reviewQuery.data.value.qualityDecision, effectiveStatus) }}
</p>
<p v-if="item.provider || item.model" class="mt-2 wrap-anywhere text-xs text-muted">
{{ [item.provider, item.model].filter(Boolean).join(' / ') }}
</p>
<p
v-if="item.canvasDiagnosis && item.status === 'completed'"
class="mt-2 text-xs"
:class="wrongCanvas ? 'text-danger' : 'text-muted'"
>
{{
wrongCanvas
? `历史画幅 ${item.canvasDiagnosis.actual ?? '未知'} 与交付画幅 ${item.canvasDiagnosis.expected ?? '未知'} 不符,仅供查看。`
: item.canvasDiagnosis.status === 'matched'
? `匹配交付画幅 ${item.canvasDiagnosis.expected}`
: '画幅尚未确认'
}}
</p>
<p
v-if="vision.state.value.active || vision.state.value.unknown || vision.uncertain.value"
role="status"
class="mt-2 text-xs text-muted"
>
{{ vision.state.value.active?.executionId ? '质量审核在后台进行' : '审核结果或费用待核查' }}
</p>
<IssueHint v-if="item.error" :messages="[productionMessage(item.error)]" type="error" />
<!-- 以下是来源记录与独立的免费恢复入口 -->
<p v-if="item.inputSnapshotStatus" class="mt-2 text-xs text-muted">
{{
{ recorded: '已保存生成输入', 'not-recorded': '历史生成输入未记录', invalid: '生成输入证据已失效' }[
item.inputSnapshotStatus
]
}}
<span v-if="item.providerInputFingerprint" :title="item.providerInputFingerprint">
· {{ item.providerInputFingerprint.slice(0, 12) }}</span
<!-- 名称固定单行,完整文字可在悬停或图片详情中核对。 -->
<h4 class="keyframe-card-name" :title="displayName || `镜头 ${shotNo} · 首帧`">
{{ displayName || `镜头 ${shotNo} · 首帧` }}
</h4>
<!-- 列表保留创建时间,详细模型、错误和来源只在主动展开时显示。 -->
<p class="text-[10px] text-muted">{{ formatDate(item.createdAt) }}</p>
<div class="keyframe-card-actions">
<!-- 浮层挂到视口层,避免被候选弹窗和内容滚动边界裁切。 -->
<NPopover
v-model:show="detailsOpen"
trigger="click"
placement="bottom-start"
:show-arrow="false"
:to="true"
:flip="true"
>
</p>
<p v-if="item.recoveryRequired" class="mt-2 text-xs text-muted">
{{
productionMessage(
item.recoveryReason ||
(item.canRecoverSavedResult
? '可以恢复已生成图片的下载。'
: '原请求结果待核查,请先核对候选和模型服务记录。')
)
}}
</p>
<NButton
v-if="item.canRecoverSavedResult && !readonly"
class="mt-2"
size="small"
:disabled="blocked || recovering"
:loading="recovering"
@click="emit('recover')"
>恢复已生成图片</NButton
>
<p class="mt-2 text-[10px] text-muted">{{ formatDate(item.createdAt) }}</p>
<!-- 以下是集中排列的首帧辅助图标操作,提示与无障碍名称一致 -->
<div v-if="item.status === 'completed' && item.imageUrl" class="mt-4 flex flex-wrap items-center gap-2">
<WorkspaceActionTooltip
placement="top"
v-if="item.isPrimary && projectId && !readonly"
label="按当前来源人工复核"
<template #trigger>
<span class="inline-flex">
<WorkspaceActionTooltip placement="top" label="查看首帧详情" :disabled="detailsOpen">
<NButton square class="workspace-action-button icon-button" aria-label="查看首帧详情"
><Info :size="17"
/></NButton>
</WorkspaceActionTooltip>
</span>
</template>
<section class="keyframe-card-details" aria-label="首帧详情">
<p class="text-sm font-semibold">{{ displayName || `镜头 ${shotNo} · 首帧` }}</p>
<p v-if="item.width && item.height" class="mt-2 text-xs text-muted">
{{ item.width }} × {{ item.height }}
</p>
<!-- 以下是候选的来源、画幅与后台审核状态 -->
<p
v-if="effectiveStatus === 'stale' && reviewQuery.data.value && !reviewQuery.error.value"
class="mt-2 text-xs text-muted"
>
{{ keyframeQualitySummary(reviewQuery.data.value.qualityDecision, effectiveStatus) }}
</p>
<p v-if="item.provider || item.model" class="mt-2 wrap-anywhere text-xs text-muted">
{{ [item.provider, item.model].filter(Boolean).join(' / ') }}
</p>
<p
v-if="item.canvasDiagnosis && item.status === 'completed'"
class="mt-2 text-xs"
:class="wrongCanvas ? 'text-danger' : 'text-muted'"
>
{{
wrongCanvas
? `历史画幅 ${item.canvasDiagnosis.actual ?? '未知'} 与交付画幅 ${item.canvasDiagnosis.expected ?? '未知'} 不符,仅供查看。`
: item.canvasDiagnosis.status === 'matched'
? `匹配交付画幅 ${item.canvasDiagnosis.expected}`
: '画幅尚未确认'
}}
</p>
<p
v-if="vision.state.value.active || vision.state.value.unknown || vision.uncertain.value"
role="status"
class="mt-2 text-xs text-muted"
>
{{ vision.state.value.active?.executionId ? '质量审核在后台进行' : '审核结果或费用待核查' }}
</p>
<p v-if="item.error" class="mt-2 text-xs">{{ productionMessage(item.error) }}</p>
<!-- 以下是来源记录与独立的免费恢复入口 -->
<p v-if="item.inputSnapshotStatus" class="mt-2 text-xs text-muted">
{{
{
recorded: '已保存生成输入',
'not-recorded': '历史生成输入未记录',
invalid: '生成输入证据已失效'
}[item.inputSnapshotStatus]
}}
</p>
<p v-if="item.recoveryRequired" class="mt-2 text-xs text-muted">
{{
productionMessage(
item.recoveryReason ||
(item.canRecoverSavedResult
? '可以恢复已生成图片的下载。'
: '原请求结果待核查,请先核对候选和模型服务记录。')
)
}}
</p>
</section>
</NPopover>
<NButton
v-if="item.canRecoverSavedResult && !readonly"
size="small"
:disabled="blocked || recovering"
:loading="recovering"
@click="emit('recover')"
>恢复已生成图片</NButton
>
<NButton
square
class="workspace-action-button icon-button"
aria-label="按当前来源人工复核"
@click="sourceReviewOpen = true"
><ClipboardCheck :size="17"
/></NButton>
</WorkspaceActionTooltip>
<WorkspaceActionTooltip
placement="top"
v-if="!wrongCanvas && !stale && !readonly"
:label="qualityActionLabel"
>
<NButton
square
class="workspace-action-button icon-button"
:aria-label="qualityActionLabel"
@click="emit('quality')"
><ScanEye :size="17"
/></NButton>
</WorkspaceActionTooltip>
<WorkspaceActionTooltip
placement="top"
v-if="item.source !== 'provider_variant' && !wrongCanvas && !stale && !readonly"
label="编辑此首帧"
>
<NButton
square
class="workspace-action-button icon-button"
:disabled="blocked"
:loading="editing"
aria-label="编辑此首帧"
@click="emit('edit')"
><Pencil :size="17"
/></NButton>
</WorkspaceActionTooltip>
<WorkspaceActionTooltip placement="top" label="查看首帧校验历史">
<NButton
square
class="workspace-action-button icon-button"
aria-label="查看首帧校验历史"
@click="emit('history')"
><History :size="17"
/></NButton>
</WorkspaceActionTooltip>
<NButton v-if="canSelect" :disabled="blocked" text size="small" @click="emit('select')">
设为主首帧
</NButton>
<!-- 以下是集中排列的首帧辅助图标操作,提示与无障碍名称一致 -->
<template v-if="item.status === 'completed' && item.imageUrl">
<WorkspaceActionTooltip
placement="top"
v-if="item.isPrimary && projectId && !readonly"
label="按当前来源人工复核"
>
<NButton
square
class="workspace-action-button icon-button"
aria-label="按当前来源人工复核"
@click="sourceReviewOpen = true"
><ClipboardCheck :size="17"
/></NButton>
</WorkspaceActionTooltip>
<WorkspaceActionTooltip
placement="top"
v-if="!wrongCanvas && !stale && !readonly"
:label="qualityActionLabel"
>
<NButton
square
class="workspace-action-button icon-button"
:aria-label="qualityActionLabel"
@click="emit('quality')"
><ScanEye :size="17"
/></NButton>
</WorkspaceActionTooltip>
<WorkspaceActionTooltip
placement="top"
v-if="item.source !== 'provider_variant' && !wrongCanvas && !stale && !readonly"
label="编辑此首帧"
>
<NButton
square
class="workspace-action-button icon-button"
:disabled="blocked"
:loading="editing"
aria-label="编辑此首帧"
@click="emit('edit')"
><Pencil :size="17"
/></NButton>
</WorkspaceActionTooltip>
<WorkspaceActionTooltip placement="top" label="查看首帧校验历史">
<NButton
square
class="workspace-action-button icon-button"
aria-label="查看首帧校验历史"
@click="emit('history')"
><History :size="17"
/></NButton>
</WorkspaceActionTooltip>
<NPopover
v-if="canSelect"
:show="confirming && canSelect"
trigger="manual"
placement="top"
:show-arrow="false"
:to="true"
:flip="true"
@clickoutside="emit('cancel')"
>
<template #trigger>
<NButton :disabled="blocked" text size="small" @click="emit('select')">设为主首帧</NButton>
</template>
<!-- 人工采用确认独立于卡片排版,保持列表等高及原确认门禁。 -->
<ContextNotice type="info" :show-icon="false" class="keyframe-card-details text-xs">
<p>该候选已满足当前质量要求。确认让后续视频使用此首帧?</p>
<div class="mt-2 flex gap-3">
<NButton type="primary" :disabled="blocked" @click="emit('confirm')">确认切换</NButton>
<NButton text size="small" @click="emit('cancel')">取消</NButton>
</div>
</ContextNotice>
</NPopover>
</template>
</div>
<ContextNotice v-if="confirming && canSelect" type="info" :show-icon="false" class="mt-2 text-xs">
<p>该候选已满足当前质量要求。确认让后续视频使用此首帧?</p>
<div class="mt-2 flex gap-3">
<NButton type="primary" :disabled="blocked" @click="emit('confirm')">确认切换</NButton>
<NButton text size="small" @click="emit('cancel')">取消</NButton>
</div>
</ContextNotice>
</div>
</article>
<SourceReviewDrawer
@@ -300,3 +341,35 @@ const canSelect = computed(
@changed="onSourceChanged"
/>
</template>
<style>
@reference "../../../styles/styles.css";
/* 卡片自身保留中性底面与正方形画面,不依赖生产页面是否已加载。 */
.keyframe-card {
@apply flex h-full min-w-0 flex-col rounded-none bg-(--app-subtle);
}
.keyframe-card .asset-image {
@apply aspect-square rounded-none;
}
/* 状态和操作使用稳定槽位,短卡片也将操作对齐至底部。 */
.keyframe-card-body {
@apply flex flex-1 flex-col gap-2 p-3;
}
.keyframe-card-status {
@apply flex min-h-[22px] flex-wrap items-center gap-1.5;
}
.keyframe-card-name {
@apply truncate text-sm font-medium leading-5;
}
.keyframe-card-actions {
@apply mt-auto flex min-h-[34px] flex-wrap items-center gap-2;
}
/* 详情浮层保持可读宽度与独立滚动,不撑高任何图片卡片。 */
.keyframe-card-details {
width: min(340px, calc(100vw - 64px));
max-height: min(480px, 65dvh);
overflow-y: auto;
overflow-wrap: anywhere;
white-space: normal;
}
</style>
@@ -9,6 +9,7 @@ import ImageGenerationPreview from '../../subject-images/components/ImageGenerat
import { useImageGenerationPreview, type ImageGenerationSubmission } from '../../subject-images/generation-preview'
import ContextNotice from '../../../components/ui/ContextNotice.vue'
import RecordDetails from '../../../components/ui/RecordDetails.vue'
import AppForm from '../../../components/ui/AppForm.vue'
import { NButton, NCheckbox, NCollapse, NCollapseItem } from 'naive-ui'
@@ -155,6 +156,16 @@ const boundedBudget = computed(() =>
)
: null
)
/** 仅有真实阻断或可选许可时展示人工准入,普通有效授权不常驻未知费用说明。 */
const showAdditionalOptions = computed(
() =>
canInspectAdditional.value &&
(!!additionalId.value ||
!!additionalOptions.value.length ||
additionalQuery.loading.value ||
!!additionalQuery.error.value ||
additionalQuery.data.value?.billingBlocked)
)
watch(
[() => props.projectId, () => props.shotId, open],
() => {
@@ -287,6 +298,7 @@ watch(
:title="`${replacePrimary ? '生成替代候选' : '生成首帧候选'} · ${shotTitle}`"
description="新图通过检查后可设为主首帧。"
:busy="submitting"
description-as-info
>
<AppForm
ref="formRef"
@@ -319,16 +331,21 @@ watch(
生成模型目录读取失败:{{ generationCatalogError }}
</ContextNotice>
<!-- 以下是用户主动选择的原精确计划追加许可,普通unknown不放行。 -->
<section v-if="canInspectAdditional" class="workspace-section-stack mt-5">
<p class="text-sm">
原请求和费用仍未知。只可使用已单独批准的有限许可,重新预览核对精确计划;不会自动追加或消费剩余次数。
<section v-if="showAdditionalOptions" class="workspace-panel workspace-section-stack mt-5">
<p v-if="additionalQuery.data.value?.billingBlocked" class="text-sm">
原请求在途或费用待核对。有限许可不会核清旧费用。
</p>
<FieldLabel
label="人工有限许可"
description="只作用于已批准的镜头和精确计划;每次由你主动操作,不自动消耗剩余次数。"
icon="info"
/>
<NSelect
v-model:value="additionalId"
clearable
:options="additionalOptions"
:disabled="submitting || additionalQuery.loading.value"
placeholder="主动选择已有人工追加许可(可不选,仅免费预览)"
placeholder="选择人工有限许可(可选)"
aria-label="本次人工追加许可"
/><NButton
:loading="additionalQuery.loading.value"
@@ -338,7 +355,7 @@ watch(
>
<p v-if="additionalQuery.error.value" role="alert">{{ additionalQuery.error.value }}</p>
<p v-if="additionalParent" class="text-sm">
原镜头 {{ additionalParent.input.targetId }} · 原型号 {{ additionalParent.input.model }} · 原预留
原型号 {{ additionalParent.input.model }} · 原预留
{{ formatMicros(additionalParent.input.reservedMicros) }} · 原账单
{{ formatMicros(additionalParent.output?.actualBilledMicros) }}
</p>
@@ -346,6 +363,28 @@ watch(
本镜已用 {{ boundedTarget.usedRequests }}/{{ boundedTarget.maxRequests }} 次 · 原预算剩余
{{ formatMicros(boundedBudget?.remainingMicros) }}。旧未知费用未被核清。
</p>
<RecordDetails
v-if="additionalPermit"
title="许可记录"
:records="[
{
fields: [
{
label: '适用方式',
value:
additionalPermit.input.mode === 'bounded'
? '限定镜头与计划'
: '同一计划人工追加'
},
{ label: '批准人', value: additionalPermit.input.approvedBy },
{ label: '批准说明', value: additionalPermit.input.approvalNote },
{ label: '批准次数', value: additionalPermit.input.maxRequests },
{ label: '已用次数', value: additionalPermit.usedRequests },
{ label: '剩余次数', value: additionalPermit.remainingRequests }
]
}
]"
/>
</section>
<!-- 以下是正式摄影设计与画面状态 -->
<ModelCapabilities
@@ -401,7 +440,9 @@ watch(
/>
<!-- 以下是正式画幅、尺寸及连续性诊断 -->
<KeyframePreviewChecks v-if="preview" :preview="preview" class="mt-3" />
<p v-if="chargeNotice" class="text-sm text-muted" role="status">{{ chargeNotice }}</p>
<ContextNotice v-if="chargeNotice" emphasized :show-icon="false" role="status">{{
chargeNotice
}}</ContextNotice>
<NCheckbox
v-if="requiresCostConfirmation"
id="confirm-keyframe-cost"
@@ -42,9 +42,7 @@ const label = computed(() => {
<p>{{ label }} · {{ executionStageLabel(execution.stage) }}</p>
<p v-if="execution.total > 0">审核计划进度:{{ execution.current }} / {{ execution.total }}</p>
<p v-else>尚无可确认的步骤进度。</p>
<p class="wrap-anywhere text-xs text-muted">
执行编号:{{ execution.id }} · {{ formatDate(execution.updatedAt) }}
</p>
<p class="wrap-anywhere text-xs text-muted">更新于 {{ formatDate(execution.updatedAt) }}</p>
<p v-if="typeof execution.result?.summary === 'string'">
历史执行摘要:{{ userFacingText(execution.result.summary) }}
</p>
@@ -6,7 +6,7 @@ import ContextNotice from '../../../components/ui/ContextNotice.vue'
import { computed, ref, watch } from 'vue'
import { NButton, NInput, NCollapse, NCollapseItem } from 'naive-ui'
import RawDataDetails from '../../../components/ui/RawDataDetails.vue'
import RecordDetails from '../../../components/ui/RecordDetails.vue'
import { useQuery } from '../../../composables/useQuery'
import { imageAuthorizationApi } from '../../image-authorization/api'
import { formatMicros } from '../../image-authorization/model'
@@ -339,21 +339,37 @@ const records = computed(() =>
<p v-if="generationRecords.loading.value" role="status">正在读取原图片请求…</p>
<p v-else-if="generationRecords.error.value" role="alert">{{ generationRecords.error.value }}</p>
<p v-else-if="!generationRecords.data.value?.length" class="text-xs text-muted">
未找到此图片的原OpenAI费用记录;不据此推断费用为0。
暂无这张图片的费用记录,不能据此判断免费。
</p>
<article
v-for="row in generationRecords.data.value ?? []"
:key="row.id"
class="my-3 space-y-2 text-xs wrap-anywhere"
aria-label="原图片生成记录"
>
<p>原请求 {{ row.id }} · {{ generationStatusLabels[row.status] ?? '待确认' }}</p>
<p>原图片生成:{{ generationStatusLabels[row.status] ?? '待确认' }}</p>
<p>
原预留 {{ formatMicros(row.input.reservedMicros) }} · 公开用量价
{{ formatMicros(row.output?.usageCostMicros) }} · 实际账单
{{ formatMicros(row.output?.actualBilledMicros) }}
</p>
<p v-if="row.billingAudit?.released">费用已核清;原执行、机器质量及主首帧状态保持独立。</p>
<RawDataDetails :value="row" title="原模型、来源、精确计划与回执" />
<RecordDetails
inline
title="当次生成记录"
:records="[
{
fields: [
{ label: '模型', value: row.input.model },
{ label: '生成范围', value: '本镜头的原图片' },
{
label: '使用许可',
value: row.input.additionalAuthorizationId ? '人工有限许可' : '原图片授权'
}
]
}
]"
/>
</article>
</NCollapseItem>
</NCollapse>
@@ -436,7 +452,6 @@ const records = computed(() =>
<p>补跑要求:原通用检查已通过;本次仅补跑一个物理步骤,不重复提交通用检查。</p>
<p>物理专项原失败原因:{{ userFacingText(physicalTarget.error, '原物理回执未能形成有效结果。') }}</p>
<p>原费用已记录,保留原回执;本次需要独立授权,可能产生新费用。</p>
<p class="wrap-anywhere text-xs text-muted">原审核任务:{{ physicalTarget.id }}</p>
</template>
<p v-else>原审核已人工终止,未标记通过。请填写已取得的独立授权编号,新审核可能产生费用。</p>
<NInput
@@ -479,11 +494,9 @@ const records = computed(() =>
: '暂无结论'
}}
</p>
<p class="mt-2 wrap-anywhere text-xs text-muted">审核任务:{{ record.id }}</p>
<section v-if="record.legacyTermination" class="mt-2 space-y-1 text-sm">
<p>历史审核已人工终止,原任务状态:{{ stepLabels[record.status] ?? '待确认' }};未标记通过。</p>
<p>人工终止时间:{{ formatDate(record.legacyTermination.terminatedAt) }}</p>
<p class="wrap-anywhere">审计编号:{{ record.legacyTermination.auditId }}</p>
<p>
费用结论:{{
{
@@ -512,9 +525,7 @@ const records = computed(() =>
</p>
<p v-if="record.recoveryReason" class="text-muted">{{ userFacingText(record.recoveryReason) }}</p>
<p v-if="record.error" class="text-danger">{{ userFacingText(record.error) }}</p>
<p v-if="record.sourceReviewId" class="wrap-anywhere text-sm">
独立新来源审核 · 人工记录 {{ record.sourceReviewId }}(与旧 Vision 分开存证)
</p>
<p v-if="record.sourceReviewId" class="wrap-anywhere text-sm">已按新来源独立审核,旧审核记录仍保留。</p>
<template v-if="record.validation">
<p>合并结论:{{ userFacingText(record.validation.summary) }}</p>
<p v-for="(issue, index) in record.validation.issues" :key="index" class="text-danger">
@@ -4,12 +4,7 @@ import { formatDate } from '../../../lib/format'
import { userFacingText } from '../../../lib/user-facing-text'
import type { KeyframeValidationStep } from '../quality.types'
import type { ValidationExecutionStep } from '../validation-executions.types'
import {
validationQualityLabels,
validationStatusLabels,
validationStepNames,
validationUsageLabels
} from '../validation-execution-labels'
import { validationQualityLabels, validationStatusLabels, validationStepNames } from '../validation-execution-labels'
/** 原任务摘要与逐次执行共用公开步骤展示,复用用量不重复归入本次。 */
defineProps<{
@@ -47,7 +42,9 @@ function stepTitle(step: KeyframeValidationStep | ValidationExecutionStep) {
: '执行方式未记录'
}}
</p>
<p v-if="step.usageAttribution === 'reused'" class="text-muted">以下为原调用计量,不重复计入本次。</p>
<p v-if="step.usageAttribution === 'reused'" class="text-muted">
本步骤复用原调用,不重复计入本次费用。
</p>
<p v-else-if="step.usageAttribution === 'unknown'" class="text-muted">
计量归属未记录,不能推算本次费用。
</p>
@@ -59,19 +56,15 @@ function stepTitle(step: KeyframeValidationStep | ValidationExecutionStep) {
</ul>
<p v-else class="mt-2 text-xs text-muted">{{ step.issues ? '未记录问题。' : '未记录问题证据。' }}</p>
<p v-if="step.error" class="mt-2 text-sm">{{ userFacingText(step.error) }}</p>
<!-- 以下是必要的原始请求、时间和计量,默认收起 -->
<!-- 步骤时间与调用方式按需核对,内部请求与原始计量留在数据层。 -->
<NCollapse class="mt-2"
><NCollapseItem name="diagnostics" title="高级详情">
><NCollapseItem name="diagnostics" title="步骤记录">
<dl class="space-y-1 wrap-anywhere text-xs text-muted">
<div v-if="step.startedAt">开始:{{ formatDate(step.startedAt) }}</div>
<div v-if="step.finishedAt">完成:{{ formatDate(step.finishedAt) }}</div>
<div v-if="step.requestId">请求编号:{{ step.requestId }}</div>
<div v-if="step.providerRequestId">模型服务请求编号:{{ step.providerRequestId }}</div>
<div v-if="'sourceExecutionId' in step && step.sourceExecutionId">
复用来源执行:{{ step.sourceExecutionId }}
</div>
<div v-if="'usageAttribution' in step">
计量归属:{{
调用方式:{{
step.usageAttribution === 'this_execution'
? '本次新调用'
: step.usageAttribution === 'reused'
@@ -79,10 +72,6 @@ function stepTitle(step: KeyframeValidationStep | ValidationExecutionStep) {
: '未记录'
}}
</div>
<div v-for="(count, unit) in step.usage" :key="unit">
{{ validationUsageLabels[unit] }}词元:{{ count }}
</div>
<div v-if="!step.usage || !Object.keys(step.usage).length">未记录计量。</div>
</dl>
</NCollapseItem></NCollapse
>
@@ -2,6 +2,7 @@
import { computed, onScopeDispose, ref, watch } from 'vue'
import { NButton, NCheckbox, NCollapse, NCollapseItem, NInput, NSelect } from 'naive-ui'
import WorkspaceSectionHeading from '../../../components/ui/WorkspaceSectionHeading.vue'
import RecordDetails from '../../../components/ui/RecordDetails.vue'
import { useActionMessage, showActionFeedback } from '../../../components/ui/useActionMessage'
import { ApiError, errorMessage } from '../../../lib/http'
import { layoutApi, type ConfirmedLayout, type LayoutSupplementPreview } from '../layout-api'
@@ -200,7 +201,7 @@ async function confirmLayout() {
placeholder="选择当前布局"
aria-label="待审结构布局"
/>
<p v-if="layout" class="wrap-anywhere text-xs text-muted">当前布局版本:{{ layout.version }}</p>
<p v-if="layout" class="text-xs text-muted">已读取当前布局,保存前会再次核对版本。</p>
<NInput
v-model:value="instruction"
type="textarea"
@@ -218,23 +219,42 @@ async function confirmLayout() {
:input-props="{ 'aria-label': '布局结构依据' }"
/>
<NButton :loading="loading" :disabled="!valid || saving" @click="loadPreview">免费预览结构约束</NButton>
<!-- 以下是待审提示词、独立指纹与正式确认参数模块 -->
<!-- 以下是待审画面描述与完整业务约束,版本保护仍使用原始参数。 -->
<section v-if="preview" class="space-y-3 text-sm">
<p>待审输入不能用于生图;需要确认布局并重新确认母版。</p>
<NCollapse>
<NCollapseItem name="preview" title="预览画面描述与高级详情">
<NCollapseItem name="preview" title="预览画面描述">
<pre class="whitespace-pre-wrap break-words text-xs">{{ preview.providerPrompt }}</pre>
<dl class="mt-3 space-y-2 wrap-anywhere text-xs text-muted">
<div>待审指纹:{{ preview.draftFingerprint }}</div>
<div>可用于生产:{{ preview.productionReady ? '是' : '否' }}</div>
<div>需要布局确认:{{ preview.requiresLayoutConfirmation ? '是' : '否' }}</div>
<div>需要母版重新确认:{{ preview.requiresMasterReconfirmation ? '是' : '否' }}</div>
</dl>
<pre class="mt-3 whitespace-pre-wrap break-words text-xs">{{
JSON.stringify(preview.layoutConfirmation, null, 2)
}}</pre>
</NCollapseItem>
</NCollapse>
<RecordDetails
title="本次完整布局约束"
:records="[
{
fields: [
{ label: '布局', value: preview.layoutConfirmation.name },
{ label: '依据', value: preview.layoutConfirmation.evidence }
]
},
...preview.layoutConfirmation.constraints.map((constraint, index) => ({
title: `约束 ${index + 1}`,
fields: [
{ label: '要求', value: constraint.description },
{ label: '来源', value: constraint.source === 'script' ? '剧本事实' : '人工美术设计' },
{ label: '画面要求', value: constraint.keyframeInstruction },
...(constraint.compositionRules ?? []).flatMap(rule => [
{ label: '构图要求', value: rule.requirement },
{ label: '验收依据', value: rule.acceptance }
])
]
}))
]"
/>
<WorkspaceSectionHeading
title="正式布局确认"
description="保存会改变布局版本。母版、场景形态及已有首帧需要重新核对,不会自动生成素材。"
@@ -252,8 +272,6 @@ async function confirmLayout() {
<!-- 以下是版本变化与最新母版来源影响,不自动生成或替换主图 -->
<section v-if="confirmed" class="space-y-2 wrap-anywhere text-sm" role="status">
<p class="font-semibold">布局已更新</p>
<p class="text-xs">原版本:{{ confirmed.previous }}</p>
<p class="text-xs">新版本:{{ confirmed.layout.version }}</p>
<p>
布局母版:{{
layouts
@@ -340,7 +340,7 @@ const rules = computed(() => ({
...sizeRules(() => formModel.value)
}))
/** 更多参数折叠状态。 */
const optionsExpanded = ref<string[]>(['options'])
const optionsExpanded = ref<string[]>([])
</script>
<template>
@@ -497,6 +497,7 @@ const optionsExpanded = ref<string[]>(['options'])
</NCollapse>
<ContextNotice
v-if="!visionHistoryRef?.authorizationAvailable && !(visionKey && action === 'validate')"
emphasized
type="warning"
:show-icon="false"
class="mt-4"
@@ -562,7 +563,6 @@ const optionsExpanded = ref<string[]>(['options'])
<p class="mt-3 text-xs text-muted">此为历史抽样结论,不保证当前上游素材仍然一致。</p></NCollapseItem
></NCollapse
>
<p v-if="target?.kind !== 'batch'" class="mt-3 text-xs text-muted">可导出结果或查看首帧检查历史。</p>
<!-- 以下是底栏左侧费用确认与右侧操作按钮模块 -->
<template #footer>
<div class="quality-dialog-footer">
@@ -1,5 +1,4 @@
<script setup lang="ts">
import RawDataDetails from '../../../components/ui/RawDataDetails.vue'
import { userFacingText } from '../../../lib/user-facing-text'
import ContextNotice from '../../../components/ui/ContextNotice.vue'
@@ -189,7 +188,6 @@ function exportResult() {
<p v-for="issue in subject.issues" :key="issue">{{ issue }}</p>
</div>
</template>
<RawDataDetails :value="receipt.result" />
</NCollapseItem>
</NCollapse>
</section>
@@ -23,7 +23,14 @@ import ConfirmAction from '../../workflows/ConfirmAction.vue'
import { runOperation } from '../../workflows/operations'
import { productionApi } from '../api'
import { qualityApi } from '../quality-api'
import { isActiveVideo, primaryKeyframe, primaryVideo, productionStatusLabel, videoRecordedValidation } from '../model'
import {
isActiveVideo,
primaryKeyframe,
primaryVideo,
productionStatusLabel,
videoRecordedValidation,
keyframeDisplayNames
} from '../model'
import { productionIssueText, productionMessage, videoInputStaleReason } from '../production-messages'
import type {
GenerateKeyframeInput,
@@ -205,6 +212,8 @@ const currentVideoInput = computed(() =>
videoInputQuery.data.value?.shotId === key.value ? videoInputQuery.data.value : null
)
const keyframes = computed(() => query.data.value?.keyframes ?? [])
/** 主图与候选共用完整记录的名称,晋升或倒序查看不重新编号。 */
const keyframeNames = computed(() => keyframeDisplayNames(keyframes.value, props.shot.title, props.shot.shotNo))
/** 下载回执丢失或刷新后,只用列表明确保存的恢复结果解除同镜头的保护。 */
watch(keyframes, rows => {
const shotId = props.shot.shotId
@@ -857,6 +866,7 @@ defineExpose({ inspectSpecs, inspecting })
:shot-id="shot.shotId"
:review-revision="reviewRevision"
:item="currentKeyframe"
:display-name="keyframeNames.get(currentKeyframe.id)"
:editing="
editSource?.id === currentKeyframe.id &&
isOperationRunning(getOperation(projectId), `编辑镜头 ${shot.shotId} 首帧`)
@@ -1185,12 +1195,13 @@ defineExpose({ inspectSpecs, inspecting })
>
<!-- 候选图片和对应的人工复核入口按相同候选 ID 分组。 -->
<div v-if="keyframeCandidates.length" class="asset-candidate-grid mt-4">
<div v-for="item in keyframeCandidates" :key="item.id" class="min-w-0">
<div v-for="item in keyframeCandidates" :key="item.id" class="min-w-0 h-full">
<KeyframeCard
:project-id="projectId"
:shot-id="shot.shotId"
:review-revision="reviewRevision"
:item="item"
:display-name="keyframeNames.get(item.id)"
:recovering="isOperationRunning(getOperation(projectId), `恢复已生成首帧 ${item.id}`)"
@recover="recoverSavedKeyframe(item)"
:editing="
@@ -1283,7 +1294,12 @@ defineExpose({ inspectSpecs, inspecting })
>
</template>
</AppDrawer>
<AppDialog v-model:open="historyOpen" title="首帧记录" :busy="historyAuthorizationPending" wide>
<AppDialog
v-model:open="historyOpen"
:title="`首帧记录 · ${keyframeNames.get(historyKeyframeId) ?? '当前图片'}`"
: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" />
@@ -1364,18 +1380,6 @@ defineExpose({ inspectSpecs, inspecting })
.video-grid {
@apply grid w-full max-w-[260px] grid-cols-1 gap-3;
}
/* 候选画面固定 260px,最多五列;列数减少时仍保持左右边缘对齐。 */
.asset-candidate-grid {
@apply grid w-full max-w-[1348px] items-start gap-3;
grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 260px));
justify-content: space-between;
}
.keyframe-card {
@apply min-w-0 overflow-hidden rounded-none bg-(--app-subtle);
}
.keyframe-card .asset-image {
@apply aspect-square rounded-none;
}
/* 素材背景与标题铺满外层内容宽度。 */
.video-input-section {
width: 100%;
@@ -1416,10 +1420,6 @@ defineExpose({ inspectSpecs, inspecting })
.video-grid {
@apply max-w-none;
}
/* 手机候选按整行展示,避免固定 260px 造成侧边留白。 */
.asset-candidate-grid {
@apply max-w-none grid-cols-[minmax(0,_1fr)];
}
/* 窄屏优先并排展示两列;素材较少时仍等分占满可用宽度。 */
.video-input-grid {
grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr));
@@ -1,6 +1,6 @@
<script setup lang="ts">
import SourceApplicabilityFields from './SourceApplicabilityFields.vue'
import RawDataDetails from '../../../components/ui/RawDataDetails.vue'
import RecordDetails from '../../../components/ui/RecordDetails.vue'
import { computed, watch } from 'vue'
import { NButton, NCheckbox, NCollapse, NCollapseItem, NInput, NInputNumber, NSelect } from 'naive-ui'
import AppDrawer from '../../../components/ui/AppDrawer.vue'
@@ -49,6 +49,33 @@ const findingOptions = [
{ label: '通过', value: 'passed' },
{ label: '不通过', value: 'failed' }
]
/** 历史人工观察只显示维度、意见和事实,保留原记录用于后续核对。 */
const observationRecords = computed(() => {
const review = form.record.value?.review
if (!review) return []
return [
{
fields: [
{ label: '审核人', value: review.reviewer },
{ label: '复核理由', value: review.reason }
]
},
...review.observations.map(observation => ({
title: `比较参考 ${observation.imageNumber}`,
fields: [
...Object.entries(sourceFindingLabels).map(([dimension, label]) => ({
label,
value:
findingOptions.find(
option =>
option.value === observation.finding[dimension as keyof typeof sourceFindingLabels]
)?.label ?? '未知/无法看清'
})),
{ label: '可见事实', value: observation.note }
]
}))
]
})
/** 正式动作只从当前预检原文解析,不用编号或关键词猜测。 */
const formalActions = computed(() => {
const raw = form.preview.value?.applicabilityBasis?.facts.rawJson
@@ -82,7 +109,7 @@ const referenceRoleLabels: Record<string, string> = {
'style-scene': '场景风格',
'style-prop': '道具风格'
}
/** 同图同主体合并职责,完整原始绑定仍保留在高级详情。 */
/** 同图同主体合并职责,原始绑定继续用于来源保护。 */
const referenceSummaries = computed(
() =>
new Map(
@@ -134,6 +161,7 @@ const statusLabels: Record<string, string> = {
title="按当前来源人工复核"
description="人工观察、机器审核与跨镜验收分别进行;不会生图或替换主首帧。"
:busy="busy"
description-as-info
>
<div class="source-review-body">
<!-- 以下是当前有效质量摘要,人工观察通过不代表机器质量通过 -->
@@ -180,24 +208,32 @@ const statusLabels: Record<string, string> = {
<WorkspaceSectionHeading
title="保留的原主首帧"
description="点击小图查看原图。当前参考仅用于比较,不代表原图生成时已使用。"
description-as-info
/>
<p v-if="form.restored.value && form.targetMatched.value" class="text-sm text-muted">
已读取当前有效的原观察和依据,无需重复填写或保存;只需修改变化项,未知仍保持未知。
</p>
<RawDataDetails
title="历史输入、图片摘要与来源变化"
:value="{
originalProviderInput: form.preview.value.originalProviderInput,
historicalVision: form.preview.value.historicalVision,
originalPixels: form.preview.value.originalPixels,
sourceChanges: form.preview.value.sourceChanges
}"
<RecordDetails
title="原图片生成记录"
:records="[
{
fields: [
{ label: '原模型', value: form.preview.value.originalProviderInput.model },
{
label: '原画面描述',
value: form.preview.value.originalProviderInput.providerPrompt
},
{ label: '历史审核次数', value: form.preview.value.historicalVision.length }
]
}
]"
/>
</div>
</section>
<WorkspaceSectionHeading
title="本次新参考与逐图观察"
description="新参考仅是本次比较依据,不是原图的生成输入。结构看不清时保留未知,并逐项核对本镜是否需要该证据。"
description-as-info
/>
<!-- 以下是正式动作和适用范围的核对依据 -->
<section v-if="form.preview.value.applicabilityBasis" class="space-y-2 text-sm">
@@ -208,15 +244,10 @@ const statusLabels: Record<string, string> = {
? '固定机位'
: '非固定或尚未确认的机位'
}}
· 正式动作
{{ form.preview.value.applicabilityBasis.actionIds?.join('、') || '未提供,不能判为非阻断' }}
· {{ formalActions.length ? `${formalActions.length} 项正式动作` : '正式动作依据待核对' }}
</p>
<p v-for="action in formalActions" :key="action.id">{{ action.id }}:{{ action.description }}</p>
<p v-if="!formalActions.length">未读到完整正式动作原文,请核对高级详情;不能凭动作编号猜测依赖。</p>
<RawDataDetails
title="核对完整正式动作、摄影与即时状态"
:value="form.preview.value.applicabilityBasis.facts"
/>
<p v-for="action in formalActions" :key="action.id">{{ action.description }}</p>
<p v-if="!formalActions.length">缺少正式动作原文,请先核对当前分镜;不能据此豁免审核。</p>
</section>
<!-- 以下是逐参考的小图与核对表单,必要的未知范围按需展开 -->
<div class="source-review-reference-grid">
@@ -337,13 +368,7 @@ const statusLabels: Record<string, string> = {
<p v-if="form.record.value.invalidation" class="text-sm text-muted">
{{ userFacingText(form.record.value.invalidation) }}
</p>
<NCollapse
><NCollapseItem title="原始人工观察" name="observations">
<pre class="whitespace-pre-wrap wrap-anywhere text-xs">{{
JSON.stringify(form.record.value.review, null, 2)
}}</pre>
</NCollapseItem></NCollapse
>
<RecordDetails title="原始人工观察" :records="observationRecords" />
<NButton
:loading="form.pending.value === 'plan'"
:disabled="
@@ -368,13 +393,6 @@ const statusLabels: Record<string, string> = {
}}
· 最多请求 {{ form.plan.value.steps.length }} 次
</p>
<NCollapse
><NCollapseItem title="完整计划及指纹" name="plan">
<pre class="whitespace-pre-wrap wrap-anywhere text-xs">{{
JSON.stringify(form.plan.value, null, 2)
}}</pre>
</NCollapseItem></NCollapse
>
<NCollapse
><NCollapseItem name="paid-approval" title="准备独立付费审核(按需展开)"
><div class="flex flex-col gap-4">
@@ -470,7 +488,7 @@ const statusLabels: Record<string, string> = {
/>
<p v-if="resultLabel" class="text-sm" role="status">{{ resultLabel }}</p>
<!-- 以下是默认收起的历史追溯,不让已结束执行干扰当前观察 -->
<NCollapse v-if="form.result.value || form.vision.history.data.value?.some(item => item.sourceReviewId)"
<NCollapse v-if="form.vision.history.data.value?.some(item => item.sourceReviewId)"
><NCollapseItem name="source-history" title="历史审核与执行记录">
<section
v-for="record in form.vision.history.data.value?.filter(r => r.sourceReviewId)"
@@ -478,7 +496,7 @@ const statusLabels: Record<string, string> = {
class="space-y-2"
>
<p class="wrap-anywhere text-sm">
独立新来源审核 · 人工记录 {{ record.sourceReviewId }} · 原任务 {{ record.id }} ·
独立新来源审核 ·
{{ userFacingText(record.status) }}
</p>
<KeyframeExecutionHistory
@@ -487,16 +505,8 @@ const statusLabels: Record<string, string> = {
:keyframe-id="keyframeId"
:validation-task-id="record.id"
/>
</section>
<NCollapse v-if="form.result.value"
><NCollapseItem title="本次完整回执(完成不等于通过)" name="receipt">
<pre class="whitespace-pre-wrap wrap-anywhere text-xs">{{
JSON.stringify(form.result.value, null, 2)
}}</pre>
</NCollapseItem></NCollapse
>
</NCollapseItem></NCollapse
>
</section> </NCollapseItem
></NCollapse>
<NButton class="self-start" :loading="form.vision.history.loading.value" @click="refreshQuality"
>只读刷新审核历史</NButton
>
@@ -3,6 +3,14 @@ import { NCollapse, NCollapseItem } from 'naive-ui'
import { AssetImage } from '../../../components/ui'
import { validationStepNames } from '../validation-execution-labels'
import { validationImageUrl, type ValidationPreview } from '../validation-preview'
/** 参考职责使用业务名称,未知职责只说明图片参考,不展示内部枚举。 */
const referenceRoleLabels: Record<string, string> = {
'identity-anchor': '主体外观',
'form-primary': '形态参考',
'layout-master': '空间布局',
'scene-form-view': '场景机位',
'structure-reference': '固定结构'
}
/** 免费普通审核计划;不提供任何自动执行入口。 */
defineProps<{ /** 当前只读计划。 */ plan: ValidationPreview }>()
</script>
@@ -50,7 +58,6 @@ defineProps<{ /** 当前只读计划。 */ plan: ValidationPreview }>()
object-fit="contain"
preview
/>
<p class="wrap-anywhere text-xs">SHA:{{ plan.image.sha256 }}</p>
</div>
<div v-for="reference in plan.references" :key="reference.imageNumber" class="min-w-0 space-y-2">
<p>审核图片 {{ reference.imageNumber }} · 生成参考 {{ reference.generationImageNumber }}</p>
@@ -62,9 +69,8 @@ defineProps<{ /** 当前只读计划。 */ plan: ValidationPreview }>()
preview
/>
<p v-for="(binding, index) in reference.bindings" :key="index">
{{ binding.subjectRef }} · {{ binding.role }}
{{ binding.subjectRef }} · {{ referenceRoleLabels[binding.role] || '图片参考' }}
</p>
<p class="wrap-anywhere text-xs">SHA:{{ reference.sha256 }}</p>
</div>
</div>
</NCollapseItem></NCollapse
+16
View File
@@ -1,6 +1,22 @@
import { reactive } from 'vue'
import type { ProductionIssueCode, ProductionSession, ShotKeyframe, ShotVideo, ShotVideoQualityStatus } from './types'
/**
* 为没有独立名称字段的首帧生成展示名称,按原创建时间编号,不随列表倒序或主图切换改名。
* @param items 同一镜头的完整图片记录
* @param shotTitle 当前镜头名称
* @param shotNo 镜头序号,用于名称缺失时说明归属
* @returns 图片ID与只用于展示的名称,不写回资产
*/
export function keyframeDisplayNames(items: readonly ShotKeyframe[], shotTitle: string, shotNo: number) {
const title = shotTitle.trim() || `镜头 ${shotNo}`
return new Map(
items
.toSorted((a, b) => (a.createdAt ?? '').localeCompare(b.createdAt ?? '') || a.id.localeCompare(b.id))
.map((item, index) => [item.id, `${title} · 图片 ${String(index + 1).padStart(2, '0')}`])
)
}
/** 按项目隔离生产回执,切换页面后仍能查看上一次批量操作结果。 */
const sessions = reactive<Record<string, ProductionSession>>({})