du
7 天以前 410f59df2c05841805b5653664b3866e03d34021
easegen-front/src/views/chooseTemplate/index.vue
@@ -310,6 +310,7 @@
                  selectPPT.digitalHuman?.host.pictureUrl !== null &&
                  selectPPT.digitalHuman?.host.videoUrl !== null
                "
                :key="InitDigHuman"
                :parent="false"
                :lockAspectRatio="true"
                :minW="350"
@@ -356,6 +357,7 @@
                  selectPPT.digitalHuman?.host.pictureUrl !== null &&
                  selectPPT.digitalHuman?.host.videoUrl !== null
                "
                :key="InitDigHuman"
                :parent="false"
                :lockAspectRatio="true"
                :minW="350"
@@ -818,7 +820,8 @@
  Headset,
  Delete,
  VideoPlay,
  CopyDocument
  CopyDocument,
Select
} from '@element-plus/icons-vue'
import { generateUUID } from '@/utils'
import { useRoute, useRouter } from 'vue-router'
@@ -1810,7 +1813,7 @@
// 所有数字人形象
const AllHumanList = ref<any[]>([])
// 获取所有数字人形象
const GetAllHumanList = () => {
const GetAllHumanList = async () => {
  let query = {
    pageNo: 1,
    pageSize: 100,
@@ -1822,6 +1825,13 @@
  GetHumanList(query)
  query.type = '1'
  GetHumanList(query)
  if (route.query.id) {
    await getCourseDetail(route.query.id)
  } else {
    coursesCreate()
  }
}
// 获取单类数字人形象
const GetHumanList = async (query) => {
@@ -1834,7 +1844,6 @@
    child.isActive = child.id === item.id
  })
  selectPPT.value = item
  console.log('selectPPT.value', selectPPT.value)
}
// const chooseHost = (item) => {
@@ -2095,8 +2104,6 @@
        return
      }
    }
    try {
      const res = await pptTemplateApi.coursesSave(JSON.stringify(saveSubmitForm))
@@ -2446,10 +2453,10 @@
    data.y = -100 // 可以设置最小坐标为 -100
  }
}
// 对数字人组件强制刷新
const InitDigHuman = ref(0);
const getCourseDetail = async (id) => {
  const res = await pptTemplateApi.coursesDetail(id)
  console.log('res当前信息', res)
  if (res) {
    courseInfo.value = res
    if (res.scenes && res.scenes.length > 0) {
@@ -2512,7 +2519,8 @@
          }
        ]
      }
      InitDigHuman.value = 1
      console.log( "selectPPT.value", selectPPT.value )
      // 设置音频选择数据
      const firstScene = res.scenes[0]
      if (firstScene.voice) {
@@ -2557,14 +2565,8 @@
  selectTemplate.value = cloneDeep(templates.value[0])
  await getList()
  // 获取所有数字人信息并根据具体情况进行页面初始化
  GetAllHumanList()
  if (route.query.id) {
    await getCourseDetail(route.query.id)
  } else {
    coursesCreate()
  }
})
onUnmounted(() => {