From 4298438219ffaebe935a4ce8551eb2f9bb0c1504 Mon Sep 17 00:00:00 2001 From: GouJ Date: Wed, 23 Sep 2026 11:35:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8C=89=E8=B4=A8=E9=87=8F=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E7=AE=A1=E7=90=86=E4=B8=BB=E9=A6=96=E5=B8=A7=E5=80=99?= =?UTF-8?q?=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../production/components/KeyframeCard.vue | 73 +++++++++ .../production/components/KeyframeDialog.vue | 22 +-- .../components/ShotProductionAssets.vue | 139 ++++++++++-------- src/features/production/quality.ts | 12 ++ tests/features/production/production.test.ts | 11 +- .../features/production/public-assets.test.ts | 74 +++++++++- 6 files changed, 243 insertions(+), 88 deletions(-) create mode 100644 src/features/production/components/KeyframeCard.vue diff --git a/src/features/production/components/KeyframeCard.vue b/src/features/production/components/KeyframeCard.vue new file mode 100644 index 0000000..5f35970 --- /dev/null +++ b/src/features/production/components/KeyframeCard.vue @@ -0,0 +1,73 @@ + + + diff --git a/src/features/production/components/KeyframeDialog.vue b/src/features/production/components/KeyframeDialog.vue index 9047663..2682227 100644 --- a/src/features/production/components/KeyframeDialog.vue +++ b/src/features/production/components/KeyframeDialog.vue @@ -8,13 +8,12 @@ import { AppDialog } from '../../../components/ui' import { errorMessage } from '../../../lib/http' import { productionApi } from '../api' import { validOptionalSize } from '../model' -import type { GenerateKeyframeInput, KeyframeGenerationPreview, ShotKeyframe } from '../types' +import type { GenerateKeyframeInput, KeyframeGenerationPreview } from '../types' -/** 单镜头首帧表单;普通候选仍由用户明确选择,过期主首帧默认替换为新图。 */ +/** 单镜头首帧表单;所有新图先生成候选,通过质量检查后再人工晋升。 */ const props = defineProps<{ shotId: string shotTitle: string - keyframes: ShotKeyframe[] disabled: boolean replacePrimary?: boolean }>() @@ -22,20 +21,17 @@ const open = defineModel('open', { default: false }) const emit = defineEmits<{ generate: [input: GenerateKeyframeInput] }>() const width = ref('') const height = ref('') -const setPrimary = ref(false) const confirmed = ref(false) const preview = ref(null) const previewError = ref('') const previewPending = ref(false) -const hasPrimary = computed(() => props.keyframes.some(item => item.isPrimary && item.status === 'completed')) const sizeValid = computed(() => validOptionalSize(width.value, height.value)) const canSubmit = computed(() => !props.disabled && sizeValid.value && confirmed.value) -/** 切换镜头或重新打开时清空费用确认;过期首帧默认让新结果成为 Primary。 */ +/** 切换镜头或重新打开时清空费用确认;新图一律先作为候选。 */ function reset() { width.value = '' height.value = '' - setPrimary.value = !!props.replacePrimary || !hasPrimary.value confirmed.value = false preview.value = null previewError.value = '' @@ -48,7 +44,7 @@ function submit() { if (!canSubmit.value) return emit('generate', { ...(width.value === '' ? {} : { width: width.value, height: height.value as number }), - setPrimary: setPrimary.value + setPrimary: false }) open.value = false reset() @@ -77,8 +73,8 @@ async function loadPreview() {