feat(short-drama-agent-front): 接入草案、首帧证据与审核继续
This commit is contained in:
1 parent
751106985e
commit
d0264c08ce
23 files changed
+990
-170
No files matched your search
@@ -54,14 +54,18 @@ const { key, session, operation, execution, blocked, run } = useQuality(
|
||||
)
|
||||
/** 打开首帧质量弹窗时读取正式审核状态。 */
|
||||
const visionKey = computed(() =>
|
||||
open.value && props.target?.kind === 'keyframe' ? JSON.stringify([props.target.shotId, props.target.assetId]) : ''
|
||||
open.value && props.target?.kind === 'keyframe'
|
||||
? JSON.stringify([props.target.shotId, props.target.assetId, props.projectId])
|
||||
: ''
|
||||
)
|
||||
const vision = useKeyframeVision(visionKey)
|
||||
/** 有原参数时继续;没有原参数时保留只读核查。 */
|
||||
const visionBlocked = computed(() => !!visionKey.value && vision.blocked.value)
|
||||
/** 质量弹窗重新读取所选候选自身的权限,不以会话历史代替后端事实。 */
|
||||
const videoKey = computed(() =>
|
||||
open.value && props.target?.kind === 'video' ? JSON.stringify([props.target.shotId, props.target.assetId]) : ''
|
||||
open.value && props.target?.kind === 'video'
|
||||
? JSON.stringify([props.target.shotId, props.target.assetId, props.projectId])
|
||||
: ''
|
||||
)
|
||||
/** 按正式镜头和候选 ID 查询公开权限。 */
|
||||
const videoQuery = useQuery(videoKey, async (value, signal) => {
|
||||
@@ -143,7 +147,7 @@ const input = computed<QualityInput>(() => ({
|
||||
maxRepairAttempts: action.value === 'validate' ? 0 : (attempts.value ?? -1),
|
||||
force: force.value,
|
||||
episodeNo: props.target?.kind === 'batch' ? props.target.episodeNo : 1,
|
||||
allowedTexts: vision.resumeTexts.value ?? allowedTextLines(texts.value),
|
||||
allowedTexts: allowedTextLines(texts.value),
|
||||
...(action.value === 'validate' || width.value === null ? {} : { width: width.value }),
|
||||
...(action.value === 'validate' || height.value === null ? {} : { height: height.value })
|
||||
}))
|
||||
@@ -243,11 +247,21 @@ async function submit() {
|
||||
blocked.value ||
|
||||
visionBlocked.value ||
|
||||
!repairAvailable.value ||
|
||||
(!!vision.resumeTexts.value && action.value !== 'validate')
|
||||
!!vision.state.value.resumable
|
||||
)
|
||||
return
|
||||
acknowledged.value = false
|
||||
await run(action.value, input.value)
|
||||
if (visionKey.value) void vision.history.refresh()
|
||||
}
|
||||
|
||||
/** 只用已确认的原任务身份继续;不会退回普通审核。 */
|
||||
async function submitResume() {
|
||||
const resume = vision.resume.value
|
||||
if (!resume || !acknowledged.value || blocked.value || visionBlocked.value || action.value !== 'validate') return
|
||||
acknowledged.value = false
|
||||
await run('validate', input.value, resume)
|
||||
if (visionKey.value) void vision.history.refresh()
|
||||
}
|
||||
/** 质量面板的formModel状态,随目标更新。 */
|
||||
const formModel = computed(() => ({
|
||||
@@ -374,9 +388,9 @@ const optionsExpanded = ref<string[]>(['options'])
|
||||
</div>
|
||||
<NFormItem class="mt-4 block" path="texts" label="额外允许的画面文字(一行一项,可留空)"
|
||||
><NInput
|
||||
:value="vision.resumeTexts.value?.join('\n') ?? texts"
|
||||
:value="texts"
|
||||
@update:value="texts = $event"
|
||||
:disabled="pending || !!vision.resumeTexts.value"
|
||||
:disabled="pending || !!vision.state.value.resumable"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 5 }"
|
||||
:input-props="{ 'aria-label': '额外允许的画面文字' }"
|
||||
@@ -444,8 +458,8 @@ const optionsExpanded = ref<string[]>(['options'])
|
||||
@refresh="execution.query.refresh"
|
||||
@dismiss="execution.dismiss"
|
||||
/>
|
||||
<p v-if="vision.state.value.resumable && !vision.resumeTexts.value" class="mt-3 text-xs text-muted">
|
||||
此窗口没有原审核参数,暂不能安全继续。
|
||||
<p v-if="vision.state.value.resumable && !vision.resume.value" class="mt-3 text-xs text-muted">
|
||||
原审核缺少可核对的请求版本,暂不能安全继续。
|
||||
</p>
|
||||
<KeyframeValidationHistory
|
||||
v-if="open && target?.kind === 'keyframe'"
|
||||
@@ -453,6 +467,7 @@ const optionsExpanded = ref<string[]>(['options'])
|
||||
:shot-id="target.shotId"
|
||||
:key="target.assetId"
|
||||
:keyframe-id="target.assetId"
|
||||
:observation="vision"
|
||||
:disabled="disabled || pending"
|
||||
initial-open
|
||||
@reviewed="emit('changed')"
|
||||
@@ -479,17 +494,22 @@ const optionsExpanded = ref<string[]>(['options'])
|
||||
<div class="quality-dialog-actions">
|
||||
<NButton @click="open = false">关闭</NButton>
|
||||
<NButton
|
||||
v-if="vision.state.value.resumable"
|
||||
type="primary"
|
||||
:loading="pending"
|
||||
:disabled="
|
||||
blocked ||
|
||||
visionBlocked ||
|
||||
!acknowledged ||
|
||||
!repairAvailable ||
|
||||
(!!vision.resumeTexts.value && action !== 'validate')
|
||||
blocked || visionBlocked || !acknowledged || !vision.resume.value || action !== 'validate'
|
||||
"
|
||||
@click="submitResume"
|
||||
>继续原审核</NButton
|
||||
>
|
||||
<NButton
|
||||
v-else
|
||||
type="primary"
|
||||
:loading="pending"
|
||||
:disabled="blocked || visionBlocked || !acknowledged || !repairAvailable"
|
||||
@click="formRef?.validate(submit)"
|
||||
>{{ vision.resumeTexts.value && action === 'validate' ? '继续原审核' : label }}</NButton
|
||||
>{{ label }}</NButton
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user