feat(short-drama-agent-front): 接入人工动作修订与视频版本权限
This commit is contained in:
1 parent
7a60db3ced
commit
fa76165960
38 files changed
+2003
-158
No files matched your search
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { videoOperationAllowed } from '../video-permissions'
|
||||
import FeedbackMessage from '../../../components/ui/FeedbackMessage.vue'
|
||||
|
||||
import ContextNotice from '../../../components/ui/ContextNotice.vue'
|
||||
@@ -31,18 +32,18 @@ const props = defineProps<{
|
||||
confirming: boolean
|
||||
}>()
|
||||
/** 交由父面板执行检查与切换,卡片不直接调用生成接口。 */
|
||||
const emit = defineEmits<{ quality: []; history: []; select: []; confirm: []; cancel: [] }>()
|
||||
const emit = defineEmits<{ quality: []; repair: []; history: []; select: []; confirm: []; cancel: [] }>()
|
||||
/** 播放和外链共用经过协议与资源路径校验的地址。 */
|
||||
const videoUrl = computed(() => (props.item.videoUrl ? mediaAssetUrl(props.item.videoUrl) : null))
|
||||
/** 优先显示本次会话的检查结果,否则显示此视频已有的记录。 */
|
||||
const previousValidation = computed(() => props.validationPassed ?? props.recordedValidationPassed ?? null)
|
||||
/** 只有已完成且在当前会话检查通过的候选才能发起切换。 */
|
||||
/** 晋升资格只使用本候选的后端权限,历史通过不恢复过期资格。 */
|
||||
const canSelect = computed(
|
||||
() =>
|
||||
props.item.status === 'completed' &&
|
||||
!!videoUrl.value &&
|
||||
!props.item.isPrimary &&
|
||||
props.validationPassed === true
|
||||
videoOperationAllowed(props.item, 'primary')
|
||||
)
|
||||
</script>
|
||||
|
||||
@@ -75,10 +76,24 @@ const canSelect = computed(
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<StatusBadge :status="item.status" :label="productionStatusLabel(item.status)" />
|
||||
<NTag size="small" :bordered="false">{{ item.isPrimary ? '主视频' : '候选视频' }}</NTag>
|
||||
<NTag v-if="item.isPrimary && stale" size="small" type="warning" :bordered="false">需更新</NTag>
|
||||
<NTag
|
||||
v-if="stale || item.motionPlanStale || item.qualityTerminalStatus === 'stale_motion_plan'"
|
||||
size="small"
|
||||
type="warning"
|
||||
:bordered="false"
|
||||
>需更新</NTag
|
||||
>
|
||||
<span class="text-[10px] text-muted">{{ item.durationSeconds || durationSeconds || '—' }}s</span>
|
||||
</div>
|
||||
<!-- 以下是此视频此前检查结果模块,历史通过不代表当前素材仍然适用 -->
|
||||
<p v-if="item.staleReason" class="mt-2 text-xs text-muted">{{ item.staleReason }}</p>
|
||||
<p
|
||||
v-if="item.motionPlanRevisionId || item.currentMotionPlanRevisionId"
|
||||
class="mt-2 break-all text-[10px] text-muted"
|
||||
>
|
||||
生成动作版本 {{ item.motionPlanRevisionId ?? 'AI 原始' }} · 当前
|
||||
{{ item.currentMotionPlanRevisionId ?? 'AI 原始' }}
|
||||
</p>
|
||||
<p v-if="previousValidation !== null" class="mt-2 text-[11px] text-muted">
|
||||
{{ previousValidation ? '此前画面检查通过' : '此前画面检查未通过' }}
|
||||
</p>
|
||||
@@ -87,9 +102,23 @@ const canSelect = computed(
|
||||
{{ item.provider }} · {{ item.model }} · {{ formatDate(item.createdAt) }}
|
||||
</p>
|
||||
<div class="mt-3 flex flex-wrap gap-3">
|
||||
<NButton v-if="item.status === 'completed' && videoUrl" text size="small" @click="emit('quality')">
|
||||
<NButton
|
||||
v-if="item.status === 'completed' && videoUrl"
|
||||
:disabled="blocked || !videoOperationAllowed(item, 'validate')"
|
||||
text
|
||||
size="small"
|
||||
@click="emit('quality')"
|
||||
>
|
||||
质量检查
|
||||
</NButton>
|
||||
<NButton
|
||||
v-if="item.status === 'completed' && videoUrl && videoOperationAllowed(item, 'repair')"
|
||||
:disabled="blocked"
|
||||
text
|
||||
size="small"
|
||||
@click="emit('repair')"
|
||||
>创建修复候选</NButton
|
||||
>
|
||||
<NButton text size="small" @click="emit('history')">查看质量记录</NButton>
|
||||
<NButton v-if="canSelect" :disabled="blocked" text size="small" @click="emit('select')">
|
||||
设为主视频
|
||||
|
||||
Reference in new issue
Block a user