Browse Source

fix(pptEasy): 在添加课程时调用loadgetCourseDetail方法

确保在添加课程后立即加载课程详情,保持数据同步
lsc 1 day ago
parent
commit
33be93d0f4
1 changed files with 13 additions and 0 deletions
  1. 13 0
      src/components/pages/pptEasy/addCourse3.vue

+ 13 - 0
src/components/pages/pptEasy/addCourse3.vue

@@ -1747,6 +1747,7 @@ export default {
           if(ctype == 2){
           if(ctype == 2){
             this.copyCourse(this.cid);
             this.copyCourse(this.cid);
           }
           }
+          this.loadgetCourseDetail();
           this.uploadFile2(pptJsonFile, this.courseId);
           this.uploadFile2(pptJsonFile, this.courseId);
           this.addOp3(
           this.addOp3(
             "1",
             "1",
@@ -1838,6 +1839,7 @@ export default {
           if(ctype == 2){
           if(ctype == 2){
             this.copyCourse(this.cid);
             this.copyCourse(this.cid);
           }
           }
+          this.loadgetCourseDetail();
           this.addOp3(
           this.addOp3(
             "1",
             "1",
             "",
             "",
@@ -2297,6 +2299,17 @@ export default {
         this.$message.success(this.lang.ssAddOk);
         this.$message.success(this.lang.ssAddOk);
       }
       }
     },
     },
+    loadgetCourseDetail(){
+      let _pptIframe = this.$refs.pptIframeRef;
+      if (
+        _pptIframe &&
+        _pptIframe.contentWindow &&
+        _pptIframe.contentWindow.window &&
+        typeof _pptIframe.contentWindow.window.getCourseDetail === "function"
+      ){
+        _pptIframe.contentWindow.window.getCourseDetail(this.cid);
+      }
+    },
     addContent(data, type = 1){
     addContent(data, type = 1){
       let _pptIframe = this.$refs.pptIframeRef;
       let _pptIframe = this.$refs.pptIframeRef;
       if (
       if (