Commit af13dd9c authored by Dazzle Wu's avatar Dazzle Wu

fix: 视频数字人保存草稿

parent 245f50d5
...@@ -114,7 +114,7 @@ export const useDigitalCreationStore = defineStore('digital-creation-store', { ...@@ -114,7 +114,7 @@ export const useDigitalCreationStore = defineStore('digital-creation-store', {
this.enabled = subtitleEnabled this.enabled = subtitleEnabled
}, },
updateDigitalCreation(digitalCreation: DraftConfig) { updateDigitalCreation(digitalCreation: Partial<DraftConfig>) {
this.$state = { ...this.$state, ...digitalCreation } this.$state = { ...this.$state, ...digitalCreation }
}, },
......
...@@ -57,15 +57,15 @@ const digitalImagePositionH = computed({ ...@@ -57,15 +57,15 @@ const digitalImagePositionH = computed({
</n-input-number> </n-input-number>
</div> </div>
<div class="mt-4 flex"> <div class="mt-4 flex">
<n-input-number v-model:value="digitalImagePositionW" class="flex-1"> <n-input v-model:value="digitalImagePositionW" readonly class="flex-1">
<template #prefix><div class="text-gray w-4 text-center text-xs">W</div></template> <template #prefix><div class="text-gray w-4 text-center text-xs">W</div></template>
</n-input-number> </n-input>
<div class="flex w-4 items-center justify-center"> <div class="flex w-4 items-center justify-center">
<CustomIcon class="text-gray text-xs" icon="fa6-solid:lock" /> <CustomIcon class="text-gray text-xs" icon="fa6-solid:lock" />
</div> </div>
<n-input-number v-model:value="digitalImagePositionH" class="flex-1"> <n-input v-model:value="digitalImagePositionH" readonly class="flex-1">
<template #prefix><div class="text-gray w-4 text-center text-xs">H</div></template> <template #prefix><div class="text-gray w-4 text-center text-xs">H</div></template>
</n-input-number> </n-input>
</div> </div>
</div> </div>
</template> </template>
...@@ -106,7 +106,7 @@ async function saveDraft(autoSave: boolean = true) { ...@@ -106,7 +106,7 @@ async function saveDraft(autoSave: boolean = true) {
const res = await saveDraftConfig<DraftConfig>(payload) const res = await saveDraftConfig<DraftConfig>(payload)
if (res.code === 0) { if (res.code === 0) {
autoSave ? (autoSaveSuccess.value = true) : window.$message.success('保存成功') autoSave ? (autoSaveSuccess.value = true) : window.$message.success('保存成功')
// digitalCreationStore.updateDigitalCreation(res.data) digitalCreationStore.updateDigitalCreation({ id: res.data.id })
const temp: DraftConfig = { ...res.data, modifiedTime: '' } const temp: DraftConfig = { ...res.data, modifiedTime: '' }
savedConfig.value = temp savedConfig.value = temp
} }
......
...@@ -58,6 +58,7 @@ async function handleCreateDigitalHumanVideo(digitalHumanVideoForm: DigitalHuman ...@@ -58,6 +58,7 @@ async function handleCreateDigitalHumanVideo(digitalHumanVideoForm: DigitalHuman
payload.draftName = digitalHumanVideoForm.title payload.draftName = digitalHumanVideoForm.title
payload.width = digitalHumanVideoForm.pageLayout === ScreenType.PORTRAIT ? 1080 : 1920 payload.width = digitalHumanVideoForm.pageLayout === ScreenType.PORTRAIT ? 1080 : 1920
payload.height = digitalHumanVideoForm.pageLayout === ScreenType.PORTRAIT ? 1920 : 1080 payload.height = digitalHumanVideoForm.pageLayout === ScreenType.PORTRAIT ? 1920 : 1080
payload.figureId = digitalHumanVideoForm.pageLayout === ScreenType.PORTRAIT ? 'A2A_V2-gaoming' : 'A2A_V2-3to2_xinyi'
payload.inputImageUrl = payload.inputImageUrl =
digitalHumanVideoForm.pageLayout === ScreenType.PORTRAIT digitalHumanVideoForm.pageLayout === ScreenType.PORTRAIT
? 'https://demand-ai-sit.gz.bcebos.com/data/20240913/1726223058345.png' ? 'https://demand-ai-sit.gz.bcebos.com/data/20240913/1726223058345.png'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment