Browse Source

试试更新

y595705120 3 months ago
parent
commit
84c23b3404

+ 0 - 1
src/containers/center/components/pay/IBuyCourse.vue

@@ -133,7 +133,6 @@
     },
     },
     watch:{
     watch:{
       courseId(){
       courseId(){
-        console.log("change", this.courseId)
         this.loadPayInfo();
         this.loadPayInfo();
       }
       }
     },
     },

+ 14 - 1
src/containers/center/play/components/iCourseInfo.vue

@@ -85,9 +85,20 @@
     },
     },
     props: ['tpl', 'info', 'extraXs'],
     props: ['tpl', 'info', 'extraXs'],
     mounted(){
     mounted(){
-      this.finishCount = (this.extraXs.index1) + (+this.extraXs.index2) + (+this.extraXs.index3) + (+this.extraXs.index4)||0
+      this.recalcXs()
+    },
+    watch:{
+      extraXs:{
+        handler(){
+          this.recalcXs()
+        },
+        deep:true
+      }
     },
     },
     methods: {
     methods: {
+      recalcXs(){
+        this.finishCount = (this.extraXs.index1) + (+this.extraXs.index2) + (+this.extraXs.index3) + (+this.extraXs.index4)||0
+      },
       startExam() {
       startExam() {
         if (this.tpl.isClosed == 1) {
         if (this.tpl.isClosed == 1) {
           this.$message.errorMsg("课程已经关闭", 2)
           this.$message.errorMsg("课程已经关闭", 2)
@@ -96,9 +107,11 @@
         this.$emit("startExam", 0)
         this.$emit("startExam", 0)
       },
       },
       startExamTest() {
       startExamTest() {
+        this.recalcXs()
         this.$emit("startExamTest")
         this.$emit("startExamTest")
       },
       },
       printCert() {
       printCert() {
+        this.recalcXs()
         this.$emit("printCert")
         this.$emit("printCert")
       },
       },
       formatFinish() {
       formatFinish() {

+ 5 - 1
src/containers/center/play/index.vue

@@ -78,7 +78,7 @@
 
 
         <el-dialog class="previewDialog" :visible.sync="testExamDalog"
         <el-dialog class="previewDialog" :visible.sync="testExamDalog"
           top="50px" width="1024px"
           top="50px" width="1024px"
-          @close="testExamDalog=false">
+          @close="closeTestModel()">
           <ICourseAnswerTest :info="info" :extraXs="extraXs" @updateExtraXs="updateExtraXs" :groupId="tpl.testGroupId"> </ICourseAnswerTest>
           <ICourseAnswerTest :info="info" :extraXs="extraXs" @updateExtraXs="updateExtraXs" :groupId="tpl.testGroupId"> </ICourseAnswerTest>
         </el-dialog>
         </el-dialog>
       </div>
       </div>
@@ -305,6 +305,10 @@
       formatString(val){
       formatString(val){
         return ()=> val;
         return ()=> val;
       },
       },
+      closeTestModel(){
+        this.getData()
+        this.testExamDalog = false;
+      },
       getData() {
       getData() {
         let param = { courseId: this.courseId }
         let param = { courseId: this.courseId }
         httpServer("course.getCourse", param).then(res => {
         httpServer("course.getCourse", param).then(res => {