lsc 2 年 前
コミット
dbdca97a5f

+ 8 - 5
src/components/pages/addCourse.vue

@@ -5469,6 +5469,7 @@ export default {
       _this.unitJson[unitIndex].chapterInfo[0].taskJson[
         itemTaskIndex
       ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
+      _this.$forceUpdate();
       if (file) {
         var params = {
           Key:
@@ -5497,7 +5498,7 @@ export default {
             _this.unitJson[unitIndex].chapterInfo[0].taskJson[
               itemTaskIndex
             ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
-            this.$forceUpdate();
+            _this.$forceUpdate();
           })
           .send(function (err, data) {
             // loading.close();
@@ -5629,6 +5630,7 @@ export default {
       _this.unitJson[unitIndex].chapterInfo[0].taskJson[
         itemTaskIndex
       ].isAllSize = (file.size / 1024 / 1024).toFixed(2);
+      _this.$forceUpdate();
       if (file) {
         var params = {
           Key:
@@ -5657,7 +5659,7 @@ export default {
             _this.unitJson[unitIndex].chapterInfo[0].taskJson[
               itemTaskIndex
             ].isFinishSize = (evt.loaded / 1024 / 1024).toFixed(2);
-            this.$forceUpdate();
+            _this.$forceUpdate();
           })
           .send(function (err, data) {
             // loading.close();
@@ -7667,9 +7669,10 @@ export default {
             if (!this.cid) {
               this.courseTypeId[res.data[0][i].id] = [];
             }
-            if (!this.CourseTypeJson[res.data[0][i].id]) {
-              this.CourseTypeJson[res.data[0][i].id] = [];
-            }
+            // if (!this.CourseTypeJson[res.data[0][i].id]) {
+            // }
+            this.CourseTypeJson[res.data[0][i].id] = [];
+
             if (this.oid == "69893dca-1d47-11ed-8c78-005056b86db5") {
               if (res.data[0][i].name == "栏目") {
                 this.CourseType[0][i].name = "主题";

+ 1 - 3
src/components/pages/student/addCourse.vue

@@ -8307,9 +8307,7 @@ export default {
             if (!this.cid) {
               this.courseTypeId[res.data[0][i].id] = "";
             }
-            if (!this.CourseTypeJson[res.data[0][i].id]) {
-              this.CourseTypeJson[res.data[0][i].id] = [];
-            }
+            this.CourseTypeJson[res.data[0][i].id] = [];
             if (this.oid == "1c3b9def-8fbe-11ed-b13d-005056b86db5") {
               if (res.data[0][i].name == "赛道") {
                 this.CourseType[0][i].name = "项目类型";