Browse Source

修改旧版本学习中心样式

zengyicheng 2 years ago
parent
commit
f573d39f52
1 changed files with 12 additions and 10 deletions
  1. 12 10
      src/components/study.vue

+ 12 - 10
src/components/study.vue

@@ -898,7 +898,7 @@
                         :askJSON="
                           worksStudent[jdIndex][rwIndex][toolIndex][0].works
                         "
-                        :checkJson="checkJson[toolIndex]"
+                        :checkJson="checkJson[jdIndex][rwIndex][toolIndex]"
                       ></AskStatic>
                     </div>
                     <div
@@ -2600,8 +2600,8 @@ export default {
               }
             }
           }
-
           for (var q = 0; q < a.length; q++) {
+            var d = a[q].chapterInfo[0].taskJson;
             for (var w = 0; w < d.length; w++) {
               var e = d[w].toolChoose;
               for (var i = 0; i < e.length; i++) {
@@ -2609,16 +2609,17 @@ export default {
                   var data = b[j];
                   if (i == b[j].tool) {
                     if (data.type == 2) {
+                      console.log(this.checkJson)
                       for (var z = 0; z < this.checkJson[i].length; z++) {
-                        this.checkJson[i][z].checkPerent = [];
+                        this.checkJson[q][w][i][z].checkPerent = [];
                         for (
                           var k = 0;
-                          k < this.checkJson[i][z].checkCount.length;
+                          k < this.checkJson[q][w][i][z].checkCount.length;
                           k++
                         ) {
-                          this.checkJson[i][z].checkPerent.push(
+                          this.checkJson[q][w][i][z].checkPerent.push(
                             Math.round(
-                              (this.checkJson[i][z].checkCount[k] /
+                              (this.checkJson[q][w][i][z].checkCount[k] /
                                 parseInt(this.worksStudent[i].length)) *
                                 100
                             )
@@ -2885,7 +2886,7 @@ export default {
       this.courseType = s;
       this.navId = i;
       this.taskCount = n;
-      this.showType = 0;
+      this.showType = [];
       this.isNoHomeWork = false;
       (this.studyJuri = [
         {
@@ -2905,8 +2906,8 @@ export default {
       //   }
       // }, 0);
 
-      // this.getHomeWork();
-      // this.getCourseDetail();
+      this.getHomeWork();
+      this.getCourseDetail();
       this.$forceUpdate();
     },
 
@@ -3910,9 +3911,10 @@ export default {
 }
 .study_top {
   /* margin-top: 90px; */
-  width: 100%;
+  width: 95%;
   overflow: auto;
   height: auto;
+  margin: 0 auto;
 }
 .study_top .checkbox {
   display: flex;