Browse Source

fix(pptEasy): 修复课程保存和上传时的条件判断问题

修复在课程名称存在时自动保存的问题
调整上传和更新作品时的加载状态判断逻辑
lsc 1 month ago
parent
commit
c870c8dbfa
1 changed files with 10 additions and 3 deletions
  1. 10 3
      src/components/pages/pptEasy/addCourse3.vue

+ 10 - 3
src/components/pages/pptEasy/addCourse3.vue

@@ -1275,6 +1275,9 @@ export default {
       ]));
       // 关闭弹窗
       this.dialogVisibleCourseSettings = false;
+      if(this.courseName){
+        this.save(3)
+      }
     },
     // 打开发布弹窗
     openPublishDialog() {
@@ -1707,7 +1710,9 @@ export default {
     async addWork(type = 1, ctype = 1) {
       if (this.$refs.pptIframeRef.contentWindow.window.pptLoading !== 2) return this.$message.info(this.lang.ssPptLoad)
       if (this.uploadWorkLoading) return;
-      this.uploadWorkLoading = true;
+      if(ctype != 3){
+        this.uploadWorkLoading = true;
+      }
       let _pptData = await this.getPPtJson();
 
       // 用_pptData生成json文件,并生成File对象
@@ -1802,7 +1807,9 @@ export default {
     async updateWork(type = 1, ctype = 1) {
       if (this.$refs.pptIframeRef.contentWindow.window.pptLoading !== 2) return this.$message.info(this.lang.ssPptLoad)
       if (this.uploadWorkLoading) return;
-      this.uploadWorkLoading = true;
+      if(ctype != 3){
+        this.uploadWorkLoading = true;
+      }
       let _pptData = await this.getPPtJson();
 
       // 用_pptData生成json文件,并生成File对象
@@ -3177,7 +3184,7 @@ export default {
     window.setCouresTitle = (title) => {
       this.courseName = title;
     }
-    window.save = () => this.save(); // 保存
+    window.save = (type = 1) => this.save(type); // 保存
     window.copyCourse = () => this.save(2)
     window.deleteCourse = () => this.deleteCourse(this.cid);
     window.publishCourse = () => {