|
|
@@ -778,7 +778,7 @@
|
|
|
<div v-if="!editingCourseName" @click="editingCourseName = true" class="course-name-text">
|
|
|
{{ courseName || lang.ssUntitledCourse }}
|
|
|
</div>
|
|
|
- <el-input v-else v-model="courseName" @blur="editingCourseName = false"
|
|
|
+ <el-input v-else v-model="courseName" @blur="editingCourseName = false; handleUpdateTitle()"
|
|
|
@keyup.enter="editingCourseName = false" class="course-name-input" autofocus></el-input>
|
|
|
</div>
|
|
|
|
|
|
@@ -977,6 +977,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ pptIframeUrl: "",
|
|
|
gotype: (window.topU && window.topU.gotype) ? window.topU.gotype : '',
|
|
|
checkAll: false,
|
|
|
userid: this.$route.query.userid,
|
|
|
@@ -1163,25 +1164,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- // 判断当前页面URL是否包含beta
|
|
|
- isBetaEnv() {
|
|
|
- return window.location.href.includes('beta');
|
|
|
- },
|
|
|
- // 动态生成PPT iframe的URL
|
|
|
- pptIframeUrl() {
|
|
|
-
|
|
|
- let ppturl = "https://beta.ppt.cocorobo.cn"
|
|
|
- if (this.isBetaEnv) {
|
|
|
- ppturl = "https://beta.ppt.cocorobo.cn"
|
|
|
- } else if (this.lang.lang == 'com') {
|
|
|
- ppturl = 'https://ppt.cocorobo.com'
|
|
|
- } else if (this.lang.lang == 'hk') {
|
|
|
- ppturl = 'https://ppt.cocorobo.hk'
|
|
|
- } else {
|
|
|
- ppturl = 'https://ppt.cocorobo.cn'
|
|
|
- }
|
|
|
- return `${ppturl}/?mode=editor3&courseid=${this.cid}`;
|
|
|
- },
|
|
|
getListClassC() {
|
|
|
return function (list) {
|
|
|
let _c2 = [];
|
|
|
@@ -1350,7 +1332,7 @@ export default {
|
|
|
visibility: this.isTeacherSee,
|
|
|
aiAssistant: this.aiAssistant
|
|
|
});
|
|
|
- thisisTeacherSee
|
|
|
+ // this.TeacherSee
|
|
|
// this.dialogVisiblePublish = false;
|
|
|
|
|
|
// 仅保留已存在于 courseTypeId 中的非学科/年级项
|
|
|
@@ -1804,10 +1786,19 @@ export default {
|
|
|
this.uploadWorkLoading = true;
|
|
|
}
|
|
|
let _pptData = await this.getPPtJson();
|
|
|
-
|
|
|
+ const _pptData2 = JSON.parse(JSON.stringify(_pptData))
|
|
|
+ if (_pptData2.slides) {
|
|
|
+ _pptData2.slides.forEach((slide) => {
|
|
|
+ if (slide.elements) {
|
|
|
+ slide.elements = slide.elements.filter((element) => element.type !== 'image')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
// 用_pptData生成json文件,并生成File对象
|
|
|
const pptJsonStr = JSON.stringify(_pptData, null, 2);
|
|
|
+ const pptJsonStr2 = JSON.stringify(_pptData2, null, 2);
|
|
|
const pptJsonFile = new File([pptJsonStr], this.courseName + ".json", { type: "application/json" });
|
|
|
+ const pptJsonFile2 = new File([pptJsonStr2], this.courseName + ".json", { type: "application/json" });
|
|
|
// 你可以根据需要将pptJsonFile上传或保存
|
|
|
|
|
|
let _url = await this.uploadFile(pptJsonFile);
|
|
|
@@ -1874,7 +1865,7 @@ export default {
|
|
|
this.copyCourse(this.cid);
|
|
|
}
|
|
|
this.loadgetCourseDetail();
|
|
|
- this.uploadFile2(pptJsonFile, this.courseId);
|
|
|
+ this.uploadFile2(pptJsonFile2, this.courseId);
|
|
|
this.addOp3(
|
|
|
"1",
|
|
|
"",
|
|
|
@@ -1910,12 +1901,14 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
// 用_pptData生成json文件,并生成File对象
|
|
|
- const pptJsonStr = JSON.stringify(_pptData2, null, 2);
|
|
|
+ const pptJsonStr = JSON.stringify(_pptData, null, 2);
|
|
|
+ const pptJsonStr2 = JSON.stringify(_pptData2, null, 2);
|
|
|
const pptJsonFile = new File([pptJsonStr], this.courseName + ".json", { type: "application/json" });
|
|
|
+ const pptJsonFile2 = new File([pptJsonStr2], this.courseName + ".json", { type: "application/json" });
|
|
|
// 你可以根据需要将pptJsonFile上传或保存
|
|
|
console.log(_url)
|
|
|
let _url = await this.uploadFile(pptJsonFile);
|
|
|
- this.uploadFile2(pptJsonFile, this.cid);
|
|
|
+ this.uploadFile2(pptJsonFile2, this.cid);
|
|
|
|
|
|
this.pptCourseJson.pptData = _url;
|
|
|
|
|
|
@@ -3293,6 +3286,24 @@ export default {
|
|
|
this.dialogVisible7 = false;
|
|
|
|
|
|
},
|
|
|
+ // 判断当前页面URL是否包含beta
|
|
|
+ isBetaEnv() {
|
|
|
+ return window.location.href.includes('beta');
|
|
|
+ },
|
|
|
+ // 动态生成PPT iframe的URL
|
|
|
+ setPptIframeUrl() {
|
|
|
+ let ppturl = "https://beta.ppt.cocorobo.cn"
|
|
|
+ if (this.isBetaEnv) {
|
|
|
+ ppturl = "https://beta.ppt.cocorobo.cn"
|
|
|
+ } else if (this.lang.lang == 'com') {
|
|
|
+ ppturl = 'https://ppt.cocorobo.com'
|
|
|
+ } else if (this.lang.lang == 'hk') {
|
|
|
+ ppturl = 'https://ppt.cocorobo.hk'
|
|
|
+ } else {
|
|
|
+ ppturl = 'https://ppt.cocorobo.cn'
|
|
|
+ }
|
|
|
+ this.pptIframeUrl = `${ppturl}/?mode=editor3&courseid=${this.cid}`;
|
|
|
+ },
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
|
|
|
@@ -3314,6 +3325,7 @@ export default {
|
|
|
// 清空
|
|
|
this.pptCourseJson.toolsList = [];
|
|
|
this.setPPtToolList()
|
|
|
+ this.setPptIframeUrl();
|
|
|
// iframe页面加载完成
|
|
|
this.$refs.pptIframeRef.onload = () => {
|
|
|
console.log("iframe页面加载完成");
|