From 98a681faa7746dee150543213500ce62fd715a85 Mon Sep 17 00:00:00 2001 From: du <13220750630.163.com> Date: 星期四, 10 四月 2025 15:45:09 +0800 Subject: [PATCH] 课程修改 --- easegen-front/src/views/chooseTemplate/index.vue | 36 +++++++++++++++++++++++++----------- 1 files changed, 25 insertions(+), 11 deletions(-) diff --git a/easegen-front/src/views/chooseTemplate/index.vue b/easegen-front/src/views/chooseTemplate/index.vue index 773ad62..e40e51d 100644 --- a/easegen-front/src/views/chooseTemplate/index.vue +++ b/easegen-front/src/views/chooseTemplate/index.vue @@ -630,6 +630,7 @@ import { polyphonic } from 'pinyin-pro'; //缂栬緫鍣ㄥ唴瀹硅浆鎹sml import { useEditorHtml } from '@/hooks/web/useEditorHtml'; +import {coursesDelete} from "@/api/pptTemplate"; const editorHtml = useEditorHtml() const router = useRouter() // 璺敱 const route = useRoute() // @@ -698,8 +699,8 @@ height: (152 * 9) / 16 }) const digitalHumanSize = reactive({ - width: 150, - height: 200 + width: 640, + height: 360 }) // 娣诲姞缂╂斁姣斾緥璁$畻 const scaleRatio = computed(() => ({ @@ -1062,7 +1063,7 @@ } percentagePPT.value = parseInt(`${progress * 100}`) } else if (res && res.length > 0) { - console.log('selectTemplate', selectTemplate.value) + console.log('courseInfo', courseInfo.value) res.forEach((item) => { item.isActive = false item.isChecked = false @@ -1119,12 +1120,14 @@ // 鍒濆鍖栨槸鍚﹀睍绀烘暟瀛椾汉 item.showDigitalHuman = true // 鏁板瓧浜轰綅缃拰灏哄涔熼渶瑕佺缉鏀� + console.log(selectTemplate.value) PPTpositon.w = selectTemplate.value.humanW PPTpositon.h = selectTemplate.value.humanH PPTpositon.x = selectTemplate.value.humanX PPTpositon.y = selectTemplate.value.humanY }) PPTArr.value = res + console.log('PPTArr.value', PPTArr.value) PPTArr.value[0].isActive = true selectPPT.value = PPTArr.value[0] console.log('selectPPT.value', selectPPT.value) @@ -1280,16 +1283,17 @@ } // 鏍规嵁鏁板瓧浜虹殑涓嶅悓濮垮娍鍒濆鍖栧叾鍦╬pt鐨勪綅缃� const initHumanPositon = (data) => { + console.log(digitalHumanSize) if (data.posture === 1) { PPTpositon.x = viewSize.width - digitalHumanSize.width PPTpositon.y = viewSize.height - digitalHumanSize.height PPTpositon.w = digitalHumanSize.width PPTpositon.h = digitalHumanSize.height } else if (data.posture === 2) { - PPTpositon.x = viewSize.width - digitalHumanSize.height - PPTpositon.y = viewSize.height - digitalHumanSize.width - PPTpositon.w = digitalHumanSize.height - PPTpositon.h = digitalHumanSize.width + PPTpositon.x = viewSize.width - digitalHumanSize.width + PPTpositon.y = viewSize.height - digitalHumanSize.height + PPTpositon.w = digitalHumanSize.width + PPTpositon.h = digitalHumanSize.height } } //鎵撳紑寮规 @@ -1387,11 +1391,11 @@ thumbnail: '', subtitlesStyle: '{}' } - // if(type == "save"){ + if(type == "save"){ Reflect.set(saveSubmitForm, 'id', courseInfo.value.id) - // }else{ - // Reflect.set(saveSubmitForm, "courseMediaId", courseInfo.value.id); - // } + }else{ + Reflect.set(saveSubmitForm, "courseMediaId", courseInfo.value.id); + } //缁勮鏁版嵁 const scenes: any = [] @@ -1554,6 +1558,7 @@ let warningStrArr: any = [] for (let i = 0; i < PPTArr.value.length; i++) { const item = PPTArr.value[i] + console.log(item) // 鏍¢獙鑳屾櫙瀹介珮 if (!item.width || !item.height) { message.warning('鑳屾櫙灏哄鏃犳晥锛岃妫�鏌ュ楂樿缃紝鎴栬�呴噸鏂伴�夋嫨妯℃澘') @@ -1815,6 +1820,13 @@ } //杩斿洖 const goBack = () => { + console.log(PPTArr.value,courseInfo.value.id) + if (!PPTArr.value) { + // 鍒犻櫎褰撳墠璇剧▼ + pptTemplateApi.coursesDelete(courseInfo.value.id).then((res) => { + console.log(res) + }) + } router.go(-1) } const getCourseDetail = (id) => { @@ -2053,6 +2065,7 @@ selectTemplate.value = cloneDeep(templates.value[0]) // console.log('onMounted selectTemplate.value',selectTemplate.value) await getList() + console.log(route.query.id) if (route.query.id) { await getCourseDetail(route.query.id) // saveInter() // 鍚姩瀹氭椂淇濆瓨 @@ -2062,6 +2075,7 @@ }) onUnmounted(() => { // clearInterval(saveTimer.value) + console.log(schedulePPTTimer.value) clearInterval(schedulePPTTimer.value) if (currentAudioFile.value) { currentAudioFile.value.removeEventListener('ended', cancelAudio) -- Gitblit v1.9.3