| | |
| | | /> |
| | | <!-- 数字人(有则显示) --> |
| | | <el-image |
| | | v-if="element.digitalHuman?.show && element.digitalHuman?.host" |
| | | v-if=" |
| | | element.digitalHuman?.show && |
| | | element.digitalHuman?.host && |
| | | element.digitalHuman?.host.fixVideoUrl !== null && |
| | | element.digitalHuman?.host.pictureUrl !== null && |
| | | element.digitalHuman?.host.videoUrl !== null |
| | | " |
| | | class="host" |
| | | :style="{ |
| | | width: element.digitalHuman.w * (thumViewSize.width / 800) + 'px', |
| | |
| | | </Vue3DraggableResizable> |
| | | <!-- 数字人 --> |
| | | <Vue3DraggableResizable |
| | | v-if="selectPPT.digitalHuman.show == true && selectPPT.digitalHuman?.host" |
| | | v-if=" |
| | | selectPPT.digitalHuman.show == true && |
| | | selectPPT.digitalHuman?.host && |
| | | selectPPT.digitalHuman?.host.fixVideoUrl !== null && |
| | | selectPPT.digitalHuman?.host.pictureUrl !== null && |
| | | selectPPT.digitalHuman?.host.videoUrl !== null |
| | | " |
| | | :parent="false" |
| | | :lockAspectRatio="true" |
| | | :minW="350" |
| | |
| | | </el-icon> |
| | | </Vue3DraggableResizable> |
| | | <Vue3DraggableResizable |
| | | v-if="selectPPT.digitalHuman.show == false && selectPPT.digitalHuman?.host" |
| | | v-if=" |
| | | selectPPT.digitalHuman.show == false && |
| | | selectPPT.digitalHuman?.host && |
| | | selectPPT.digitalHuman?.host.fixVideoUrl !== null && |
| | | selectPPT.digitalHuman?.host.pictureUrl !== null && |
| | | selectPPT.digitalHuman?.host.videoUrl !== null |
| | | " |
| | | :parent="false" |
| | | :lockAspectRatio="true" |
| | | :minW="350" |
| | |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div class="SoundModelArea" v-loading="soundLoading"> |
| | | <div class="SoundModelArea" v-loading="soundLoading" v-show="ChangeSoundTypeList?.value === 2 " > |
| | | <div class="SoundModelAreaBox" v-for="(value, key, index) in audioList" :key="index"> |
| | | <div class="SoundClassTit"> |
| | | <el-divider content-position="center"> {{ languageClass(key) }} </el-divider> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="ButtonArea"> |
| | | <div class="ButtonArea" v-show="ChangeSoundTypeList?.value === 2" > |
| | | <el-button type="primary" @click="submitForm">{{ t('common.ok') }}</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | } |
| | | const hostValue = ref({}) |
| | | const chooseHost = (item) => { |
| | | if (PPTArr.value.length === 0) { |
| | | message.warning('请先上传ppt') |
| | | return false |
| | | } |
| | | |
| | | // 数字人默认所有页,没有当前页选项 |
| | | hostValue.value = item |
| | | chooseHost1(2) |
| | |
| | | page.digitalHuman.host = host |
| | | initHumanPositon(host, page.digitalHuman) |
| | | }) |
| | | |
| | | selectPPT.value = PPTArr.value[0] |
| | | } |
| | | const saveEdit = () => { |
| | | isEditing.value = false |
| | |
| | | hostList.value = data.list |
| | | if (hostList.value.length > 0 && !selectHost.value) { |
| | | selectHost.value = hostList.value[0] |
| | | console.log('selectHost.value', selectHost.value) |
| | | if (selectHost.value !== null) { |
| | | selectHost.value.fixVideoUrl = null |
| | | selectHost.value.pictureUrl = null |
| | | selectHost.value.videoUrl = null |
| | | selectHost.value.id = null |
| | | } |
| | | // 更新当前选中PPT的数字人 |
| | | if (selectPPT.value) { |
| | | selectPPT.value.digitalHuman.host = selectHost.value |
| | |
| | | } finally { |
| | | loading.value = false |
| | | } |
| | | } |
| | | |
| | | // 所有数字人形象 |
| | | const AllHumanList = ref<any[]>([]) |
| | | // 获取所有数字人形象 |
| | | const GetAllHumanList = () => { |
| | | let query = { |
| | | pageNo: 1, |
| | | pageSize: 100, |
| | | type: '0', |
| | | gender: tabs2ActiveNum.value, |
| | | posture: tabs3ActiveNum.value, |
| | | status: 0 |
| | | } |
| | | GetHumanList(query) |
| | | query.type = '1' |
| | | GetHumanList(query) |
| | | } |
| | | // 获取单类数字人形象 |
| | | const GetHumanList = async (query) => { |
| | | let data = await pptTemplateApi.pageList(query) |
| | | AllHumanList.value = [...AllHumanList.value, ...data.list] |
| | | } |
| | | |
| | | const choosePPt = (item) => { |
| | |
| | | const saveSubmit = async (type) => { |
| | | console.log('是否删除', DeleteD.value) |
| | | |
| | | if (ChangeSoundTypeList.value.value === 2) { |
| | | //此时为通用 |
| | | if (selectList.value === undefined || selectList.value === null) { |
| | | message.warning('请选择声音模型') |
| | | return false |
| | | } |
| | | } |
| | | |
| | | if (!PPTArr.value || PPTArr.value.length === 0) { |
| | | message.warning('场景为空,请先上传PPT!') |
| | | return false |
| | | } |
| | | |
| | | if ( |
| | | selectPPT.value.digitalHuman?.host.fixVideoUrl === null || |
| | | selectPPT.value.digitalHuman?.host.pictureUrl === null || |
| | | selectPPT.value.digitalHuman?.host.videoUrl === null |
| | | ) { |
| | | message.error('请先选择数字人') |
| | | return |
| | | } |
| | | |
| | | //人脸校验 |
| | |
| | | } |
| | | } else { |
| | | try { |
| | | |
| | | if ( |
| | | ChangeSoundTypeList.value?.value === undefined || |
| | | selectLanguage.value?.value === undefined |
| | | ) { |
| | | message.error('请先选择语种与声音类型') |
| | | return |
| | | } |
| | | |
| | | if (ChangeSoundTypeList.value.value === 2) { |
| | | //此时为通用 |
| | | if (selectList.value === undefined || selectList.value === null) { |
| | | message.warning('请选择声音模型,并点击确定按钮确定所选声音模型') |
| | | return false |
| | | } |
| | | |
| | | if (audioSelectData.value == undefined) { |
| | | message.warning('请点击确定按钮确定所选声音模型') |
| | | return false |
| | | } |
| | | } |
| | | |
| | | const saveResult = await saveSubmit('save') |
| | |
| | | const currentAudio = ref() |
| | | |
| | | const createAudio = async () => { |
| | | if (ChangeSoundTypeList.value?.value === undefined || selectLanguage.value?.value === undefined || selectLanguage.value.value === 'all_Language' ) { |
| | | message.error('请先选择语种与声音类型') |
| | | return |
| | | } |
| | | |
| | | if (ChangeSoundTypeList.value.value === 2) { |
| | | //此时为通用 |
| | | if (selectList.value === undefined || selectList.value === null) { |
| | | message.warning('请选择声音模型') |
| | | return false |
| | | } |
| | | } |
| | | |
| | | if( ChangeSoundTypeList.value.value === 1 ){ |
| | | if( selectPPT.value.digitalHuman.host === null || selectPPT.value.digitalHuman.host.id === undefined || selectPPT.value.digitalHuman.host.id === null ){ |
| | | message.warning('请选择数字人') |
| | | return false |
| | | } |
| | | } |
| | | |
| | | const text = editorRef.value.getText() |
| | | if (!text) { |
| | | message.warning('请输入需要试听文本的内容…') |
| | | return false |
| | | } |
| | | |
| | | if ( |
| | | ChangeSoundTypeList.value?.value === undefined || |
| | | selectLanguage.value?.value === undefined || |
| | | selectLanguage.value.value === 'all_Language' |
| | | ) { |
| | | message.error('请先选择语种与声音类型') |
| | | return |
| | | } |
| | | |
| | | console.log(ChangeSoundTypeList.value.value) |
| | | console.log(selectList.value) |
| | | |
| | | if (ChangeSoundTypeList.value.value === 2) { |
| | | //此时为通用 |
| | | if (selectList.value === undefined || selectList.value === null) { |
| | | message.warning('请选择声音模型,并点击确定按钮确定所选声音模型') |
| | | return false |
| | | } |
| | | |
| | | if (audioSelectData.value == undefined) { |
| | | message.warning('请点击确定按钮确定所选声音模型') |
| | | return false |
| | | } |
| | | } |
| | | |
| | | if (ChangeSoundTypeList.value.value === 1) { |
| | | if ( |
| | | selectPPT.value.digitalHuman.host === null || |
| | | selectPPT.value.digitalHuman.host.id === undefined || |
| | | selectPPT.value.digitalHuman.host.id === null |
| | | ) { |
| | | message.warning('请选择数字人') |
| | | return false |
| | | } |
| | | } |
| | | |
| | | const truncatedText = text.length > 100 ? text.substring(0, 100) : text |
| | |
| | | |
| | | const getCourseDetail = async (id) => { |
| | | const res = await pptTemplateApi.coursesDetail(id) |
| | | console.log( "res当前信息", res ) |
| | | console.log('res当前信息', res) |
| | | if (res) { |
| | | courseInfo.value = res |
| | | |
| | | if (res.scenes && res.scenes.length > 0) { |
| | | res.scenes.forEach((item) => { |
| | | item.isActive = false |
| | |
| | | h: hostInfo.height / scaleRatio.value.height, |
| | | active: false, |
| | | host: { |
| | | ...hostList.value.find((h) => h.code === hostInfo.entityId), |
| | | ...AllHumanList.value.find((h) => h.code === hostInfo.entityId), |
| | | code: hostInfo.entityId, |
| | | type: hostInfo.entityType |
| | | } |
| | |
| | | |
| | | await getList() |
| | | |
| | | GetAllHumanList() |
| | | |
| | | if (route.query.id) { |
| | | await getCourseDetail(route.query.id) |
| | | } else { |