浏览代码

重新修改

1
mo 2 年之前
父节点
当前提交
678f93e0f7
共有 1 个文件被更改,包括 21 次插入12 次删除
  1. 21 12
      src/views/liveClassManager/createLiveClass.vue

+ 21 - 12
src/views/liveClassManager/createLiveClass.vue

@@ -306,6 +306,7 @@
         >
         <el-table
           :key="studentRefKey"
+          v-if="showTable"
           style="width: 100%; margin-top: 20px"
           :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
           :data="form.timeTable"
@@ -665,6 +666,7 @@ export default {
       startTime: "",
       courseTime: "",
       studentRefKey: "12321321",
+      showTable: true,
     };
   },
   async mounted() {
@@ -752,16 +754,20 @@ export default {
     submitResetClass() {
       console.log(this.activeRow, "activeRow");
       console.log(this.maskForm, "maskForm");
-      this.form.timeTable[this.actvieIndex] = {
-        actualTeacherId: this.activeRow.actualTeacherId,
-        classDate: this.maskForm.date,
-        endClassTimeStr: this.maskForm.endTime,
-        singleClassMinutes: this.courseTime,
-        startClassTimeStr: this.startTime,
-        teachMode: this.activeRow.teachMode,
-        teachingContent: this.activeRow.teachingContent,
-        teachingPoint: this.activeRow.teachingPoint,
-      };
+
+      this.form.timeTable[
+        this.actvieIndex
+      ].actualTeacherId = this.activeRow.actualTeacherId;
+      this.form.timeTable[this.actvieIndex].classDate = this.maskForm.date;
+      this.form.timeTable[this.actvieIndex].endClassTimeStr = this.maskForm.endTime;
+      this.form.timeTable[this.actvieIndex].singleClassMinutes = this.courseTime;
+      this.form.timeTable[this.actvieIndex].startClassTimeStr = this.startTime;
+      this.form.timeTable[this.actvieIndex].teachMode = this.activeRow.teachMode;
+      this.form.timeTable[
+        this.actvieIndex
+      ].teachingContent = this.activeRow.teachingContent;
+      this.form.timeTable[this.actvieIndex].teachingPoint = this.activeRow.teachingPoint;
+
       console.log(
         " this.form.timeTable[this.actvieIndex]",
         this.form.timeTable[this.actvieIndex]
@@ -775,9 +781,12 @@ export default {
         ).valueOf();
         return aTime - bTime;
       });
-      this.studentRefKey = Math.random();
-      this.$forceUpdate();
+      this.showTable = false;
       this.handleClose();
+      this.studentRefKey = Math.random();
+      this.$nextTick(() => {
+        this.showTable = true;
+      });
     },
     changeStartTime(val) {
       this.$nextTick((res) => {