Parcourir la source

echarts优化

gzb
guozhongbo il y a 1 an
Parent
révision
e877228b21
8 fichiers modifiés avec 766 ajouts et 540 suppressions
  1. 5
    6
      js/index.js
  2. 57
    56
      js/section_1.js
  3. 330
    154
      js/section_2.js
  4. 368
    312
      js/section_3.js
  5. 1
    3
      js/section_4.js
  6. 1
    3
      js/section_5.js
  7. 1
    3
      js/section_6.js
  8. 3
    3
      sections/section_1.html

+ 5
- 6
js/index.js Voir le fichier

@@ -31,16 +31,15 @@ $(function () {
31 31
     return gradename;
32 32
   };
33 33
   function loadSectionHtml (sectionsData) {
34
-    console.log(sectionsData);
35 34
     currentclass = getGradeName(sectionsData.ksgk.gradeid) +sectionsData.xkcj[0].classname;
36 35
     var loadHtmlArr = [
37 36
       // "cover", //封面
38 37
       // "preface", //前言
39
-      // "section_1",
40
-      // "section_2",
41
-      // "section_3",
42
-      // "section_4",
43
-      // "section_5",
38
+      "section_1",
39
+      "section_2",
40
+      "section_3",
41
+      "section_4",
42
+      "section_5",
44 43
       "section_6"
45 44
     ];
46 45
     $(".pdf_root").html(loadHtmlArr.map(function (htmlName) {

+ 57
- 56
js/section_1.js Voir le fichier

@@ -134,9 +134,7 @@ $(function () {
134 134
       ],
135 135
       series: curseries
136 136
     };
137
-    var myEcharts = echarts.init(
138
-      document.querySelector(".section1 #averagescoreEcharts")
139
-    );
137
+    var myEcharts = echarts.init($(".section1 #averagescoreEcharts")[0]);
140 138
     myEcharts.clear();
141 139
     myEcharts.setOption(option);
142 140
   }
@@ -276,9 +274,7 @@ $(function () {
276 274
       ],
277 275
       series: curseries
278 276
     };
279
-    var myEcharts = echarts.init(
280
-      document.querySelector(".section1 #excellencerateEcharts")
281
-    );
277
+    var myEcharts = echarts.init($(".section1 #excellencerateEcharts")[0]);
282 278
     myEcharts.clear();
283 279
     myEcharts.setOption(option);
284 280
   }
@@ -500,9 +496,7 @@ $(function () {
500 496
       ],
501 497
       series: curseries
502 498
     };
503
-    var myEcharts = echarts.init(
504
-      document.querySelector(".section1 #bzcEcharts")
505
-    );
499
+    var myEcharts = echarts.init($(".section1 #bzcEcharts")[0]);
506 500
     myEcharts.clear();
507 501
     myEcharts.setOption(option);
508 502
   }
@@ -618,9 +612,7 @@ $(function () {
618 612
       ],
619 613
       series: curseries
620 614
     };
621
-    var myEcharts = echarts.init(
622
-      document.querySelector(".section1 #examaverageEcharts")
623
-    );
615
+    var myEcharts = echarts.init($(".section1 #examaverageEcharts")[0]);
624 616
     myEcharts.clear();
625 617
     myEcharts.setOption(option);
626 618
   }
@@ -761,9 +753,7 @@ $(function () {
761 753
       ],
762 754
       series: series_data
763 755
     };
764
-    var myEcharts = echarts.init(
765
-      document.querySelector(".section1 #scoreGradeEcharts")
766
-    );
756
+    var myEcharts = echarts.init($(".section1 #scoreGradeEcharts")[0]);
767 757
     myEcharts.clear();
768 758
     myEcharts.setOption(option);
769 759
   }
@@ -816,6 +806,10 @@ $(function () {
816 806
       return val.subjectid == "zf";
817 807
     });
818 808
     $.each(arr, function (index, item) {
809
+      if (index == 0) {
810
+        var rank = item.rankname.slice(3, 5) - item.rankname.slice(1, 2);
811
+        $(".section1 .classPartEcharts").text(rank);
812
+      }
819 813
       xAxis_data.push(item.rankname);
820 814
       dataArr.push(item.stunum);
821 815
     });
@@ -905,9 +899,7 @@ $(function () {
905 899
       },
906 900
       series: series_data
907 901
     };
908
-    var myEcharts = echarts.init(
909
-      document.querySelector(".section1 #classscorePartEcharts")
910
-    );
902
+    var myEcharts = echarts.init($(".section1 #classscorePartEcharts")[0]);
911 903
     myEcharts.clear();
912 904
     myEcharts.setOption(option);
913 905
     showscoredistributiondata(list, xAxis_data, dataArr);
@@ -985,21 +977,24 @@ $(function () {
985 977
   function initgoodbadSubjectEcharts(list) {
986 978
     var schoolrate = [],
987 979
       classrate = [],
988
-      legendlist = [ "全年级",list[0].classname];
980
+      legendlist = ["全年级", list[0].classname];
989 981
     $.each(list, function (idx, item) {
990 982
       if (item.subjectname != "全科") {
991
-           classrate.push(
992
-        parseInt(
993
-          ((item.classavgscore - item.schoolavgscore) / item.bzc) * 10000
994
-        ) / 100 || 0
995
-      );
996
-      schoolrate.push(
997
-        parseInt((item.classavgscore / item.schoolavgscore) * 10000) / 100 || 0
998
-      );
983
+        classrate.push(
984
+          parseInt(
985
+            ((item.classavgscore - item.schoolavgscore) / item.bzc) * 10000
986
+          ) / 100 || 0
987
+        );
988
+        schoolrate.push(
989
+          parseInt((item.classavgscore / item.schoolavgscore) * 10000) / 100 ||
990
+            0
991
+        );
999 992
       }
1000 993
     });
1001 994
     // 求出数组最大值
1002
-    let arr = [...schoolrate, ...classrate],yssubject = "",lssubject = "";
995
+    let arr = [...schoolrate, ...classrate],
996
+      yssubject = "",
997
+      lssubject = "";
1003 998
     let arr1 = Math.max.apply(null, arr);
1004 999
     let maxnum = parseInt((arr1 + 10) / 10) * 10;
1005 1000
     let arrList = [];
@@ -1010,11 +1005,11 @@ $(function () {
1010 1005
           max: maxnum
1011 1006
         };
1012 1007
         arrList.push(j);
1013
-         if (item.bzc > item.qkbzc) {
1014
-                yssubject += item.subjectname + "、";
1015
-              } else {
1016
-                lssubject += item.subjectname + "、";
1017
-              }
1008
+        if (item.bzc > item.qkbzc) {
1009
+          yssubject += item.subjectname + "、";
1010
+        } else {
1011
+          lssubject += item.subjectname + "、";
1012
+        }
1018 1013
       }
1019 1014
     });
1020 1015
     yssubject = yssubject.substr(0, yssubject.length - 1);
@@ -1051,7 +1046,7 @@ $(function () {
1051 1046
         },
1052 1047
         // areaStyle: {},  //内部阴影
1053 1048
         data: [
1054
-         {
1049
+          {
1055 1050
             value: schoolrate,
1056 1051
             label: {
1057 1052
               show: true,
@@ -1074,38 +1069,41 @@ $(function () {
1074 1069
         ]
1075 1070
       }
1076 1071
     };
1077
-    var myEcharts = echarts.init(
1078
-      document.querySelector(".section1 #goodbadSubjectEcharts")
1079
-    );
1072
+    var myEcharts = echarts.init($(".section1 #goodbadSubjectEcharts")[0]);
1080 1073
     myEcharts.clear();
1081 1074
     myEcharts.setOption(option);
1082
-    showgoodbadtable(list,legendlist,schoolrate,classrate);
1075
+    showgoodbadtable(list, legendlist, schoolrate, classrate);
1083 1076
   }
1084 1077
 
1085
-  function showgoodbadtable (list, legendlist, schoolrate, classrate) {
1086
-    var table = "", goodTableHeadTr1Html = '<th >班级</th>', goodTableHeadTr2Html = "", trHtml = "";
1078
+  function showgoodbadtable(list, legendlist, schoolrate, classrate) {
1079
+    var table = "",
1080
+      goodTableHeadTr1Html = "<th >班级</th>",
1081
+      goodTableHeadTr2Html = "",
1082
+      trHtml = "";
1087 1083
     $.each(list, function (idx, item) {
1088
-      if (item.subjectname != "全科") { 
1089
-         goodTableHeadTr1Html += '<th>' + item.subjectname + "</th>";
1084
+      if (item.subjectname != "全科") {
1085
+        goodTableHeadTr1Html += "<th>" + item.subjectname + "</th>";
1090 1086
       }
1091
-    })
1087
+    });
1092 1088
     $.each(legendlist, function (idx, item) {
1093
-      trHtml += '<tr><th>' + item + "</th>";
1089
+      trHtml += "<tr><th>" + item + "</th>";
1094 1090
       if (idx == 0) {
1095 1091
         $.each(schoolrate, function (idx, item) {
1096
-        trHtml += '<th>' + item + "%</th>";
1097
-      })
1092
+          trHtml += "<th>" + item + "%</th>";
1093
+        });
1098 1094
       } else {
1099
-          $.each(classrate, function (idx, item) {
1100
-        trHtml += '<th>' + item + "%</th>";
1101
-      })
1095
+        $.each(classrate, function (idx, item) {
1096
+          trHtml += "<th>" + item + "%</th>";
1097
+        });
1102 1098
       }
1103
-       
1104
-    })
1105
-    table = '<table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
1106
-        goodTableHeadTr1Html + '</tr></thead><tbody class="goodTableTbody">' +
1107
-      trHtml + '</tbody></table>'
1108
-    $(".section1 .goodbadtable").html(table); 
1099
+    });
1100
+    table =
1101
+      '<table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
1102
+      goodTableHeadTr1Html +
1103
+      '</tr></thead><tbody class="goodTableTbody">' +
1104
+      trHtml +
1105
+      "</tbody></table>";
1106
+    $(".section1 .goodbadtable").html(table);
1109 1107
   }
1110 1108
   var parameter = JSON.parse($(".section_1_html_root").data("page-params"));
1111 1109
   var xAxis_data = [],
@@ -1186,12 +1184,16 @@ $(function () {
1186 1184
           num: item.stunum,
1187 1185
           classname: item.subjectname
1188 1186
         };
1187
+      } else if (skclass.num == item.stunum) {
1188
+        skclass.classname += "、" + item.subjectname;
1189 1189
       }
1190 1190
       if (qkclass.num < item.missnum) {
1191 1191
         qkclass = {
1192 1192
           num: item.missnum,
1193 1193
           classname: item.subjectname
1194 1194
         };
1195
+      } else if (qkclass.num == item.stunum) {
1196
+        qkclass.classname += "、" + item.subjectname;
1195 1197
       }
1196 1198
       if (item.bzc > item.qkbzc) {
1197 1199
         goodclass.classname += item.subjectname + "、";
@@ -1239,7 +1241,6 @@ $(function () {
1239 1241
     0,
1240 1242
     badclass.classname.length - 1
1241 1243
   );
1242
-  console.log(parameter);
1243 1244
   $(".section1 .mfclass").text(mfclass.classname); //满分
1244 1245
   $(".section1 .yxclass").text(yxclass.classname); //优秀
1245 1246
   $(".section1 .lhclass").text(lhclass.classname); //良好

+ 330
- 154
js/section_2.js Voir le fichier

@@ -1,6 +1,6 @@
1 1
 $(function () {
2
-  function initaveragescoreEcharts (list,s_index) {
3
-       var itemStyle = {
2
+  function initaveragescoreEcharts(list, s_index) {
3
+    var itemStyle = {
4 4
       normal: {
5 5
         label: {
6 6
           show: true, //开启显示数值
@@ -8,13 +8,15 @@ $(function () {
8 8
         }
9 9
       }
10 10
     };
11
-    var avgscore = [],xAxis_data=[],totalScore = 0;
12
-    var curlegend = [ "平均分"];
11
+    var avgscore = [],
12
+      xAxis_data = [],
13
+      totalScore = 0;
14
+    var curlegend = ["平均分"];
13 15
     $.each(list.pjf, function (idx, item) {
14 16
       totalScore += item.classavgscore;
15 17
       avgscore.push(item.classavgscore);
16
-      xAxis_data.push(item.classname)
17
-    })
18
+      xAxis_data.push(item.classname);
19
+    });
18 20
     var gradeAvgScore = Math.floor(totalScore / xAxis_data.length);
19 21
     var curseries = [
20 22
       {
@@ -27,27 +29,27 @@ $(function () {
27 29
         data: avgscore,
28 30
         itemStyle: itemStyle,
29 31
         markLine: {
30
-              precision: 0,
31
-              data: [{ type: "average", name: "平均值" }],
32
-              itemStyle: {
33
-                normal: {
34
-                  lineStyle: {
35
-                    color: "#ff001e",
36
-                    type: "dotted"
37
-                  },
38
-                  label: {
39
-                    show: true,
40
-                    color: "#ff001e",
41
-                    position: "insideEndTop",
42
-                    formatter: function () {
43
-                      return "年级平均分:" + gradeAvgScore;
44
-                    }
45
-                  }
46
-                }
32
+          precision: 0,
33
+          data: [{ type: "average", name: "平均值" }],
34
+          itemStyle: {
35
+            normal: {
36
+              lineStyle: {
37
+                color: "#ff001e",
38
+                type: "dotted"
47 39
               },
48
-              large: true
49
-            },
50
-            z: 10
40
+              label: {
41
+                show: true,
42
+                color: "#ff001e",
43
+                position: "insideEndTop",
44
+                formatter: function () {
45
+                  return "年级平均分:" + gradeAvgScore;
46
+                }
47
+              }
48
+            }
49
+          },
50
+          large: true
51
+        },
52
+        z: 10
51 53
       }
52 54
     ];
53 55
     var option = {
@@ -123,180 +125,354 @@ $(function () {
123 125
       series: curseries
124 126
     };
125 127
     var myEcharts = echarts.init(
126
-      document.querySelector(".section2.sectiontwo_"+s_index+"  #averagescoreEcharts")
128
+      $(".section2.sectiontwo_" + s_index + "  #averagescoreEcharts")[0]
127 129
     );
128 130
     myEcharts.clear();
129 131
     myEcharts.setOption(option);
130 132
   }
131
-  function achievementdistributiontable (list,s_index) {
132
-    var table = "", goodTableHeadTr1Html = '<th class="dj">等级</th><th class="pm">排名(年级/名)</th><th class="dj">人数</th><th class="comm">详情</th>',
133
-       trHtml = "";
134
-     $.each(list.djtj, function (idx, item) {
135
-       var stujson = JSON.parse(item.stujson),stuarr = "";
136
-       $.each(stujson, function (index, items) {
137
-         stuarr+=items.studentname+"("+items.schoolrank+"名)、"
138
-       })
139
-        stuarr = stuarr.substr(0, stuarr.length - 1);
140
-       trHtml += '<tr><td>' + item.rankname + "类</td><td>" + item.rankrange + "</td><td>" +
141
-        item.stunum+"</td><td>"+stuarr+"</td></tr>";
142
-     })
143
-    
144
-    table =  '<table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
145
-        goodTableHeadTr1Html + '</tr></thead><tbody class="goodTableTbody">' +
146
-      trHtml + '</tbody></table>'
147
-    $(".section2.sectiontwo_"+s_index+"  .achievementdistribution").html(table)
133
+  function achievementdistributiontable(list, s_index) {
134
+    var table = "",
135
+      goodTableHeadTr1Html =
136
+        '<th class="dj">等级</th><th class="pm">排名(年级/名)</th><th class="dj">人数</th><th class="comm">详情</th>',
137
+      trHtml = "";
138
+    $.each(list.djtj, function (idx, item) {
139
+      var stujson = JSON.parse(item.stujson),
140
+        stuarr = "";
141
+      $.each(stujson, function (index, items) {
142
+        stuarr += items.studentname + "(" + items.schoolrank + "名)、";
143
+      });
144
+      stuarr = stuarr.substr(0, stuarr.length - 1);
145
+      trHtml +=
146
+        "<tr><td>" +
147
+        item.rankname +
148
+        "类</td><td>" +
149
+        item.rankrange +
150
+        "</td><td>" +
151
+        item.stunum +
152
+        "</td><td>" +
153
+        stuarr +
154
+        "</td></tr>";
155
+    });
156
+
157
+    table =
158
+      '<table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
159
+      goodTableHeadTr1Html +
160
+      '</tr></thead><tbody class="goodTableTbody">' +
161
+      trHtml +
162
+      "</tbody></table>";
163
+    $(".section2.sectiontwo_" + s_index + "  .achievementdistribution").html(
164
+      table
165
+    );
148 166
   }
149
-  function progresstable (list,s_index) {
150
-    var table = "", trHtml={1:"",2:""};
151
-    var cjdjheight = $(".section2_1.sectiontwo_"+s_index+"  .cjdjheight").height() - 454;
167
+  function progresstable (list, s_index) {
168
+    if(s_index !=0) return
169
+    var table = "",
170
+      trHtml = { 1: "", 2: "" };
171
+    var cjdjheight =
172
+      $(".section2_1.sectiontwo_" + s_index + "  .cjdjheight").height() - 454;//454
152 173
     var surplus = pageheight - cjdjheight; //本页剩余高度
153
-    var height = 0,page = {1:"",2:""},ispage = false;
174
+    var height = 0,
175
+      page = { 1: "", 2: "" },
176
+      ispage = false;
154 177
     $.each(list.dfjb, function (idx, item) {
155 178
       if (idx % 2 == 0) {
156 179
         height += 27.5;
157
-      if (height > surplus && surplus - height < 27.5) {
158
-        ispage = true;
159
-      }
180
+        if (height > surplus && surplus - height < 27.5) {
181
+          ispage = true;
182
+        }
160 183
         if (ispage) {
161
-           trHtml[2] += '<tr><td>' + (idx+1) + '</td><td>' + item.username + '</td><td>' + item.score + '分</td><td>第' +
162
-        item.classrank + '名</td><td class="green">进步' + item.classrankpre + '名</td>';
184
+          trHtml[2] +=
185
+            "<tr><td>" +
186
+            (idx + 1) +
187
+            "</td><td>" +
188
+            item.username +
189
+            "</td><td>" +
190
+            item.score +
191
+            "分</td><td>第" +
192
+            item.classrank +
193
+            '名</td><td class="green">进步' +
194
+            item.classrankpre +
195
+            "名</td>";
163 196
         } else {
164
-           trHtml[1] += '<tr><td>' + (idx+1) + '</td><td>' + item.username + '</td><td>' + item.score + '分</td><td>第' +
165
-        item.classrank + '名</td><td class="green">进步' + item.classrankpre + '名</td>';
197
+          trHtml[1] +=
198
+            "<tr><td>" +
199
+            (idx + 1) +
200
+            "</td><td>" +
201
+            item.username +
202
+            "</td><td>" +
203
+            item.score +
204
+            "分</td><td>第" +
205
+            item.classrank +
206
+            '名</td><td class="green">进步' +
207
+            item.classrankpre +
208
+            "名</td>";
166 209
         }
167 210
       } else {
168 211
         if (ispage) {
169
-           trHtml[2]+= '<td>' + (idx+1) + '</td><td>' + item.username + '</td><td>' + item.score + '分</td><td>第' +
170
-        item.classrank + '名</td><td class="green">进步' + item.classrankpre + '名</td>';
212
+          trHtml[2] +=
213
+            "<td>" +
214
+            (idx + 1) +
215
+            "</td><td>" +
216
+            item.username +
217
+            "</td><td>" +
218
+            item.score +
219
+            "分</td><td>第" +
220
+            item.classrank +
221
+            '名</td><td class="green">进步' +
222
+            item.classrankpre +
223
+            "名</td>";
171 224
         } else {
172
-           trHtml[1] += '<td>' + (idx+1) + '</td><td>' + item.username + '</td><td>' + item.score + '分</td><td>第' +
173
-        item.classrank + '名</td><td class="green">进步' + item.classrankpre + '名</td>';
225
+          trHtml[1] +=
226
+            "<td>" +
227
+            (idx + 1) +
228
+            "</td><td>" +
229
+            item.username +
230
+            "</td><td>" +
231
+            item.score +
232
+            "分</td><td>第" +
233
+            item.classrank +
234
+            '名</td><td class="green">进步' +
235
+            item.classrankpre +
236
+            "名</td>";
174 237
         }
175
-       
176
-      } 
177
-    })
178
-    for (var i = 1; i < 3; i++){
179
-      page[i]='<table border="1" class="my_table"><tbody class="goodTableTbody">' +
180
-      trHtml[i] + '</tbody></table>'
238
+      }
239
+    });
240
+    for (var i = 1; i < 3; i++) {
241
+      page[i] =
242
+        '<table border="1" class="my_table"><tbody class="goodTableTbody">' +
243
+        trHtml[i] +
244
+        "</tbody></table>";
181 245
     }
182
-    $(".section2_1.sectiontwo_"+s_index+" .progress").html(page[1])
246
+    $(".section2_1.sectiontwo_" + s_index + " .progress").html(page[1]);
183 247
     if (ispage) {
184 248
       //添加第二页
185
-        $(".section2_1.sectiontwo_"+s_index).after(
186
-        '<div class="page_root section2 sectiontwo_'+s_index+' section2_2"></div>'
249
+      $(".section2_1.sectiontwo_" + s_index).after(
250
+        '<div class="page_root section2 sectiontwo_' +
251
+          s_index +
252
+          ' section2_2"></div>'
187 253
       );
188
-      $(".section2_2.sectiontwo_"+s_index).html(page[2]); 
254
+      $(".section2_2.sectiontwo_" + s_index).html(page[2]);
189 255
     }
190 256
   }
191 257
 
192
-  function retrogression (list,s_index) {
193
-    var trHtml = "", table = "";
258
+  function retrogression(list, s_index) {
259
+    var trHtml = "",
260
+      table = "";
194 261
     $.each(list.dftb, function (idx, item) {
195
-       item.classrankpre = Math.abs(item.classrankpre)
262
+      item.classrankpre = Math.abs(item.classrankpre);
196 263
       if (idx % 2 == 0) {
197
-           trHtml += '<tr><td>' + (idx+1) + '</td><td>' + item.username + '</td><td>' + item.score + '分</td><td>第' +
198
-        item.classrank + '名</td><td class="red">退步' + item.classrankpre + '名</td>';
199
-        
264
+        trHtml +=
265
+          "<tr><td>" +
266
+          (idx + 1) +
267
+          "</td><td>" +
268
+          item.username +
269
+          "</td><td>" +
270
+          item.score +
271
+          "分</td><td>第" +
272
+          item.classrank +
273
+          '名</td><td class="red">退步' +
274
+          item.classrankpre +
275
+          "名</td>";
200 276
       } else {
201
-           trHtml += '<td>' + (idx+1) + '</td><td>' + item.username + '</td><td>' + item.score + '分</td><td>第' +
202
-        item.classrank + '名</td><td class="red">退步' + item.classrankpre + '名</td>';
203
-      } 
204
-     })
205
-    var table ='<table border="1" class="my_table"><tbody class="goodTableTbody">' +
206
-      trHtml + '</tbody></table>'
207
-    $(".section2.sectiontwo_"+s_index+" .retrogression").html(table)
277
+        trHtml +=
278
+          "<td>" +
279
+          (idx + 1) +
280
+          "</td><td>" +
281
+          item.username +
282
+          "</td><td>" +
283
+          item.score +
284
+          "分</td><td>第" +
285
+          item.classrank +
286
+          '名</td><td class="red">退步' +
287
+          item.classrankpre +
288
+          "名</td>";
289
+      }
290
+    });
291
+    var table =
292
+      '<table border="1" class="my_table"><tbody class="goodTableTbody">' +
293
+      trHtml +
294
+      "</tbody></table>";
295
+    $(".section2.sectiontwo_" + s_index + " .retrogression").html(table);
208 296
   }
209 297
 
210
-  function critical (list,s_index) {
211
-    var trHtml = "", table = "";
298
+  function critical(list, s_index) {
299
+    var trHtml = "",
300
+      table = "";
212 301
     $.each(list.ljs, function (idx, item) {
213 302
       if (idx % 2 == 0) {
214
-           trHtml += '<tr><td>' + (idx+1) + '</td><td>' + item.username + '</td><td>' + item.score + '分</td><td>第' +
215
-        item.classrank + '分</td><td class="red">' + item.classrankpre + '分</td>';
216
-        
303
+        trHtml +=
304
+          "<tr><td>" +
305
+          (idx + 1) +
306
+          "</td><td>" +
307
+          item.username +
308
+          "</td><td>" +
309
+          item.score +
310
+          "分</td><td>第" +
311
+          item.classrank +
312
+          '分</td><td class="red">' +
313
+          item.classrankpre +
314
+          "分</td>";
217 315
       } else {
218
-           trHtml += '<td>' + (idx+1) + '</td><td>' + item.username + '</td><td>' + item.score + '分</td><td>第' +
219
-        item.classrank + '分</td><td class="red">' + item.classrankpre + '分</td>';
220
-      } 
221
-     })
222
-    var table ='<table border="1" class="my_table"><tbody class="goodTableTbody">' +
223
-      trHtml + '</tbody></table>'
224
-    $(".section2.sectiontwo_"+s_index+" .critical").html(table)
316
+        trHtml +=
317
+          "<td>" +
318
+          (idx + 1) +
319
+          "</td><td>" +
320
+          item.username +
321
+          "</td><td>" +
322
+          item.score +
323
+          "分</td><td>第" +
324
+          item.classrank +
325
+          '分</td><td class="red">' +
326
+          item.classrankpre +
327
+          "分</td>";
328
+      }
329
+    });
330
+    var table =
331
+      '<table border="1" class="my_table"><tbody class="goodTableTbody">' +
332
+      trHtml +
333
+      "</tbody></table>";
334
+    $(".section2.sectiontwo_" + s_index + " .critical").html(table);
225 335
   }
226 336
 
227
-  function wave (list,s_index) {
228
-    var trHtml = "", table = "";
337
+  function wave(list, s_index) {
338
+    var trHtml = "",
339
+      table = "";
229 340
     $.each(list.bds, function (idx, item) {
230 341
       var curdata = {
231 342
         class: "red",
232
-        name :"退步"
233
-      }
343
+        name: "退步"
344
+      };
234 345
       if (item.classrankpre > 0) {
235 346
         curdata = {
236
-        class: "green",
237
-        name :"进步"
347
+          class: "green",
348
+          name: "进步"
349
+        };
238 350
       }
239
-      }
240
-      item.classrankpre = Math.abs(item.classrankpre)
351
+      item.classrankpre = Math.abs(item.classrankpre);
241 352
       if (idx % 2 == 0) {
242
-           trHtml += '<tr><td>' + (idx+1) + '</td><td>' + item.username + '</td><td>' + item.score + '分</td><td>' +
243
-        item.classrank + '分</td><td class="'+curdata.class+'">'+curdata.name + item.classrankpre + '名</td>';
244
-        
353
+        trHtml +=
354
+          "<tr><td>" +
355
+          (idx + 1) +
356
+          "</td><td>" +
357
+          item.username +
358
+          "</td><td>" +
359
+          item.score +
360
+          "分</td><td>" +
361
+          item.classrank +
362
+          '分</td><td class="' +
363
+          curdata.class +
364
+          '">' +
365
+          curdata.name +
366
+          item.classrankpre +
367
+          "名</td>";
245 368
       } else {
246
-           trHtml += '<td>' + (idx+1) + '</td><td>' + item.username + '</td><td>' + item.score + '分</td><td>' +
247
-        item.classrank + '分</td><td class="'+curdata.class+'">'+curdata.name + item.classrankpre + '名</td>';
248
-      } 
249
-     })
250
-    var table ='<table border="1" class="my_table"><tbody class="goodTableTbody">' +
251
-      trHtml + '</tbody></table>'
252
-    $(".section2.sectiontwo_"+s_index+" .wave").html(table)
369
+        trHtml +=
370
+          "<td>" +
371
+          (idx + 1) +
372
+          "</td><td>" +
373
+          item.username +
374
+          "</td><td>" +
375
+          item.score +
376
+          "分</td><td>" +
377
+          item.classrank +
378
+          '分</td><td class="' +
379
+          curdata.class +
380
+          '">' +
381
+          curdata.name +
382
+          item.classrankpre +
383
+          "名</td>";
384
+      }
385
+    });
386
+    var table =
387
+      '<table border="1" class="my_table"><tbody class="goodTableTbody">' +
388
+      trHtml +
389
+      "</tbody></table>";
390
+    $(".section2.sectiontwo_" + s_index + " .wave").html(table);
253 391
   }
254 392
 
255
-  function errquestion (list,s_index) {
256
-    var table = "", goodTableHeadTr1Html = '<th>题号</th><th>题型</th><th>知识点</th><th>班级得分率</th><th>年级得分率</th><th>高频错误项</th>',
257
-       trHtml = "";
258
-     $.each(list.gpctList, function (idx, item) {
259
-       item.answer = JSON.parse(item.answer);
260
-       var pointnames = item.pointnames[0] || "";
261
-       var erroroption = item.erroroption|| "--";
262
-       trHtml += '<tr><td class="word_wrap">第' + item.qn + "题</td><td>" + item.eptname + "</td><td>" +
263
-        pointnames+"</td><td>"+item.classsrate+'%</td><td>'+item.gradesrate+'%</td><td>'+erroroption+"</td></tr>";
264
-     })
265
-    table =  '<table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
266
-        goodTableHeadTr1Html + '</tr></thead><tbody class="goodTableTbody">' +
267
-      trHtml + '</tbody></table>'
268
-   $(".section2.sectiontwo_"+s_index+" .errquestion").html(table)
393
+  function errquestion(list, s_index) {
394
+    var table = "",
395
+      goodTableHeadTr1Html =
396
+        "<th>题号</th><th>题型</th><th>知识点</th><th>班级得分率</th><th>年级得分率</th><th>高频错误项</th>",
397
+      trHtml = "";
398
+    $.each(list.gpctList, function (idx, item) {
399
+      item.answer = JSON.parse(item.answer);
400
+      var pointnames = item.pointnames[0] || "";
401
+      var erroroption = item.erroroption || "--";
402
+      trHtml +=
403
+        '<tr><td class="word_wrap">第' +
404
+        item.qn +
405
+        "题</td><td>" +
406
+        item.eptname +
407
+        "</td><td>" +
408
+        pointnames +
409
+        "</td><td>" +
410
+        item.classsrate +
411
+        "%</td><td>" +
412
+        item.gradesrate +
413
+        "%</td><td>" +
414
+        erroroption +
415
+        "</td></tr>";
416
+    });
417
+    table =
418
+      '<table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
419
+      goodTableHeadTr1Html +
420
+      '</tr></thead><tbody class="goodTableTbody">' +
421
+      trHtml +
422
+      "</tbody></table>";
423
+    $(".section2.sectiontwo_" + s_index + " .errquestion").html(table);
269 424
   }
270 425
   var parameter = $(".section_2_html_root").data("page-params");
271 426
   parameter = JSON.parse(parameter);
272 427
   var html = "";
273 428
   $.each(parameter, function (s_index, item) {
274
-    html+=' <div class="page_root section2 sectiontwo_'+s_index+'">'+
275
-      (s_index === 0 ?'<h1 class="section_title_1">第二章 单科概况</h1><div class="abstract_box"><div class="abstract_left"><img src="/img/img2.png" /></div><div class="abstract_right"><div class="abstract_content">从学校和数据的角度分析整体科目、整体班级及各科各班之间的水平和差异情况,系统从多个维度的数据进行对比分析,包括<strong> 满分、最高分、平均分、最低分、四率、参考人数、标准差。</strong ></div ></div ></div >':"")+
276
-      '<h1 class="subjectinfo">'+item.subjectname+'概况</h1><div class="section_title_3 jj">本次报告是结合学生语文学科成绩,进行深层分析,很好地反映了全部学生阶段性的教学成果和存在的问题。学生整体表现大致如下:</div><h2 class="section_title_2">1.总览</h2><div class="section_list"><div class="section_item"><div class="item_num"><span class="classavgscore"></span>分</div><div class="item_title">平均分</div></div><div class="section_item"><div class="item_num"><span class="classavgscorerank"></span>名</div><div class="item_title">平均分排名</div></div><div class="section_item"><div class="item_num"><span class="yxrate"></span>%</div><div class="item_title">优秀率</div></div><div class="section_item"><div class="item_num"><span class="jgrate"></span>%</div><div class="item_title">及格率</div></div><div class="section_item" style="margin-right: 0"><div class="item_num"><span class="classmaxscore"></span>分</div><div class="item_title">最高分</div></div></div><div style="margin-bottom: 4mm; font-size: 4mm">全校平均分:<span class="schoolavgscore blue"></span>分<spanclass="line"></spanclass=>全校最高分:<span class="schoolmaxscore blue"></span>分</div><h2 class="section_title_2">2.学科平均分对比</h2><div id="averagescoreEcharts" style="margin: 0 4mm 4mm; height: 80mm"></div></div><div class="page_root section2 section2_1 sectiontwo_'+ 
277
-    s_index + '"><div class="cjdjheight"><h2 class="section_title_2">3.成绩等级分布</h2><div class="achievementdistribution"></div><h2 class="section_title_2">4.需关注学生</h2><h3 class="section_title_3">4.1 大幅进步分布</h3></div><div class="progress multicolumn"></div></div><div class="page_root section2 sectiontwo_'+
278
-    s_index + '"><h3 class="section_title_3">4.2 大幅退步分布</h3><div class="retrogression"></div></div><div class="page_root section2 sectiontwo_'+
279
-    s_index + '"><h3 class="section_title_3">4.3 临界生分布</h3><div class="critical"></div></div><div class="page_root section2 sectiontwo_'+
280
-    s_index + '"><h3 class="section_title_3">4.4 波动生分布</h3><div class="wave"></div></div><div class="page_root section2 sectiontwo_'+
281
-    s_index + '"><h2 class="section_title_2">5.高频错题分析</h2><div class="errquestion"></div></div>'
282
-    console.log(item);
283
-  })
284
-  $(".ChapterTwo").html(html)
429
+    html +=
430
+      ' <div class="page_root section2 sectiontwo_' +
431
+      s_index +
432
+      '">' +
433
+      (s_index === 0
434
+        ? '<h1 class="section_title_1">第二章 单科概况</h1><div class="abstract_box"><div class="abstract_left"><img src="/img/img2.png" /></div><div class="abstract_right"><div class="abstract_content">从学校和数据的角度分析整体科目、整体班级及各科各班之间的水平和差异情况,系统从多个维度的数据进行对比分析,包括<strong> 满分、最高分、平均分、最低分、四率、参考人数、标准差。</strong ></div ></div ></div >'
435
+        : "") +
436
+      '<h1 class="subjectinfo">' +
437
+      item.subjectname +
438
+      '概况</h1><div class="section_title_3 jj">本次报告是结合学生语文学科成绩,进行深层分析,很好地反映了全部学生阶段性的教学成果和存在的问题。学生整体表现大致如下:</div><h2 class="section_title_2">1.总览</h2><div class="section_list"><div class="section_item"><div class="item_num"><span class="classavgscore"></span>分</div><div class="item_title">平均分</div></div><div class="section_item"><div class="item_num"><span class="classavgscorerank"></span>名</div><div class="item_title">平均分排名</div></div><div class="section_item"><div class="item_num"><span class="yxrate"></span>%</div><div class="item_title">优秀率</div></div><div class="section_item"><div class="item_num"><span class="jgrate"></span>%</div><div class="item_title">及格率</div></div><div class="section_item" style="margin-right: 0"><div class="item_num"><span class="classmaxscore"></span>分</div><div class="item_title">最高分</div></div></div><div style="margin-bottom: 4mm; font-size: 4mm">全校平均分:<span class="schoolavgscore blue"></span>分<spanclass="line"></spanclass=>全校最高分:<span class="schoolmaxscore blue"></span>分</div><h2 class="section_title_2">2.学科平均分对比</h2><div id="averagescoreEcharts" style="margin: 0 4mm 4mm; height: 80mm"></div></div><div class="page_root section2 section2_1 sectiontwo_' +
439
+      s_index +
440
+      '"><div class="cjdjheight"><h2 class="section_title_2">3.成绩等级分布</h2><div class="achievementdistribution"></div><h2 class="section_title_2">4.需关注学生</h2><h3 class="section_title_3">4.1 大幅进步分布</h3></div><div class="progress multicolumn"></div></div><div class="page_root section2 sectiontwo_' +
441
+      s_index +
442
+      '"><h3 class="section_title_3">4.2 大幅退步分布</h3><div class="retrogression"></div></div><div class="page_root section2 sectiontwo_' +
443
+      s_index +
444
+      '"><h3 class="section_title_3">4.3 临界生分布</h3><div class="critical"></div></div><div class="page_root section2 sectiontwo_' +
445
+      s_index +
446
+      '"><h3 class="section_title_3">4.4 波动生分布</h3><div class="wave"></div></div><div class="page_root section2 sectiontwo_' +
447
+      s_index +
448
+      '"><h2 class="section_title_2">5.高频错题分析</h2><div class="errquestion"></div></div>';
449
+  });
450
+  $(".ChapterTwo").html(html);
285 451
   $.each(parameter, function (s_index, item) {
286
-    $(".section2.sectiontwo_"+s_index+" .classavgscore").text(item.classavgscore);
287
-  $(".section2.sectiontwo_"+s_index+" .classavgscorerank").text(item.classavgscorerank);
288
-  $(".section2.sectiontwo_"+s_index+" .yxrate").text(item.yxrate);
289
-  $(".section2.sectiontwo_"+s_index+" .jgrate").text(item.jgrate);
290
-  $(".section2.sectiontwo_"+s_index+" .classmaxscore").text(item.classmaxscore);
291
-  $(".section2.sectiontwo_"+s_index+" .schoolavgscore").text(item.schoolavgscore);
292
-  $(".section2.sectiontwo_"+s_index+" .schoolmaxscore").text(item.schoolmaxscore);
293
-  initaveragescoreEcharts(item,s_index);
294
-  achievementdistributiontable(item,s_index);
295
-  progresstable(item,s_index);
296
-  retrogression(item,s_index);
297
-  critical(item,s_index);
298
-  wave(item,s_index);
299
-  errquestion(item,s_index)
300
-  })
301
-   document.documentElement.scrollTop = 13500;
302
-});
452
+    $(".section2.sectiontwo_" + s_index + " .classavgscore").text(
453
+      item.classavgscore
454
+    );
455
+    $(".section2.sectiontwo_" + s_index + " .classavgscorerank").text(
456
+      item.classavgscorerank
457
+    );
458
+    $(".section2.sectiontwo_" + s_index + " .yxrate").text(item.yxrate);
459
+    $(".section2.sectiontwo_" + s_index + " .jgrate").text(item.jgrate);
460
+    $(".section2.sectiontwo_" + s_index + " .classmaxscore").text(
461
+      item.classmaxscore
462
+    );
463
+    $(".section2.sectiontwo_" + s_index + " .schoolavgscore").text(
464
+      item.schoolavgscore
465
+    );
466
+    $(".section2.sectiontwo_" + s_index + " .schoolmaxscore").text(
467
+      item.schoolmaxscore
468
+    );
469
+    initaveragescoreEcharts(item, s_index);
470
+    achievementdistributiontable(item, s_index);
471
+    progresstable(item, s_index);
472
+    retrogression(item, s_index);
473
+    critical(item, s_index);
474
+    wave(item, s_index);
475
+    errquestion(item, s_index);
476
+      //  document.documentElement.scrollTop = 8500;
477
+  });
478
+});

+ 368
- 312
js/section_3.js Voir le fichier

@@ -3,13 +3,21 @@ $(function () {
3 3
     var rgbaColor = "";
4 4
     var reg = /^#[\da-f]{6}$/i;
5 5
     if (reg.test(hex)) {
6
-      rgbaColor = 'rgba(' + parseInt("0x" + hex.slice(1, 3)) + ',' + parseInt("0x" + hex.slice(3, 5))
7
-        + ',' + parseInt("0x" + hex.slice(5, 7)) + ',' + opacity + ')'
8
-      }
6
+      rgbaColor =
7
+        "rgba(" +
8
+        parseInt("0x" + hex.slice(1, 3)) +
9
+        "," +
10
+        parseInt("0x" + hex.slice(3, 5)) +
11
+        "," +
12
+        parseInt("0x" + hex.slice(5, 7)) +
13
+        "," +
14
+        opacity +
15
+        ")";
16
+    }
9 17
     return rgbaColor;
10
- }
11
-  function initlargeAnalysisEcharts(s_index,list) {
12
-     var schoolscore = [],
18
+  }
19
+  function initlargeAnalysisEcharts(s_index, list) {
20
+    var schoolscore = [],
13 21
       classscore = [],
14 22
       legendlist = [currentclass, "全年级"];
15 23
     $.each(list, function (idx, item) {
@@ -62,7 +70,7 @@ $(function () {
62 70
         },
63 71
         // areaStyle: {},  //内部阴影
64 72
         data: [
65
-         {
73
+          {
66 74
             value: classscore,
67 75
             label: {
68 76
               show: true,
@@ -72,7 +80,7 @@ $(function () {
72 80
             },
73 81
             name: currentclass
74 82
           },
75
-         {
83
+          {
76 84
             value: schoolscore,
77 85
             label: {
78 86
               show: true,
@@ -86,204 +94,218 @@ $(function () {
86 94
       }
87 95
     };
88 96
     var myEcharts = echarts.init(
89
-      document.querySelector(".section_3_"+s_index +" #largeAnalysisEcharts")
97
+      $(".section_3_" + s_index + " #largeAnalysisEcharts")[0]
90 98
     );
91 99
     myEcharts.clear();
92 100
     myEcharts.setOption(option);
93
-    showlargeAnalysistable(list,legendlist,s_index);
101
+    showlargeAnalysistable(list, legendlist, s_index);
94 102
   }
95 103
 
96
-  function showlargeAnalysistable (list,legendlist,s_index) {
97
-    var table = "",goodTableHeadTr1Html = '<th rowspan="2">题型</th><th rowspan="2">对应题号</th><th rowspan="2">分值</th><th rowspan="2">占比</th><th colspan="2">年级</th><th colspan="2">'+currentclass+'</th>',
98
-      goodTableHeadTr2Html = "", trHtml = "";
104
+  function showlargeAnalysistable(list, legendlist, s_index) {
105
+    var table = "",
106
+      goodTableHeadTr1Html =
107
+        '<th rowspan="2">题型</th><th rowspan="2">对应题号</th><th rowspan="2">分值</th><th rowspan="2">占比</th><th colspan="2">年级</th><th colspan="2">' +
108
+        currentclass +
109
+        "</th>",
110
+      goodTableHeadTr2Html = "",
111
+      trHtml = "";
99 112
     var data = {
100
-      0:""
101
-    }, page = 0;
102
-    var pointnum = s_index == 0?11:16;//第一次是半页 显示十条 往后二十条每页
113
+        0: ""
114
+      },
115
+      page = 0;
116
+    var pointnum = s_index == 0 ? 11 : 16; //第一次是半页 显示十条 往后二十条每页
103 117
     $.each(list, function (idx, item) {
104
-      if((idx + 1) % pointnum == 0){
118
+      if ((idx + 1) % pointnum == 0) {
105 119
         page++;
106 120
         if (page == 1) {
107 121
           pointnum = 31;
108 122
         }
109
-        data[page] = ""; 
123
+        data[page] = "";
110 124
       }
111 125
       data[page] += "<tr>";
112
-      data[page]+= '<td><div class="my_cell">' +
113
-      item.qtypename +
114
-      '</div></td><td><div class="my_cell">' +
115
-      item.qns +
116
-      '</div></td><td><div class="my_cell">' +
117
-      item.score +
118
-      '</div></td><td><div class="my_cell">' +
119
-      item.srate +
120
-      '%</div></td><td><div class="my_cell">' +
121
-      item.gradeavgscore +
122
-      '</div></td><td><div class="my_cell">' +
123
-      item.gradesrate +
124
-      '%</div></td><td><div class="my_cell">' +
125
-      item.classavgscore +
126
-      '</div></td><td><div class="my_cell">' +
127
-      item.classsrate +
128
-      "%" +
129
-      '</div></td>';
130
-    })
131
-    console.log(page,data);
126
+      data[page] +=
127
+        '<td><div class="my_cell">' +
128
+        item.qtypename +
129
+        '</div></td><td><div class="my_cell">' +
130
+        item.qns +
131
+        '</div></td><td><div class="my_cell">' +
132
+        item.score +
133
+        '</div></td><td><div class="my_cell">' +
134
+        item.srate +
135
+        '%</div></td><td><div class="my_cell">' +
136
+        item.gradeavgscore +
137
+        '</div></td><td><div class="my_cell">' +
138
+        item.gradesrate +
139
+        '%</div></td><td><div class="my_cell">' +
140
+        item.classavgscore +
141
+        '</div></td><td><div class="my_cell">' +
142
+        item.classsrate +
143
+        "%" +
144
+        "</div></td>";
145
+    });
132 146
     $.each(legendlist, function (idx, item) {
133
-      goodTableHeadTr2Html+="<th>平均分</th><th>得分率</th>";
134
-    })
147
+      goodTableHeadTr2Html += "<th>平均分</th><th>得分率</th>";
148
+    });
135 149
 
136
-      table ='  <table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
137
-        goodTableHeadTr1Html  +
138
-        '</tr><tr class="goodTableHeadTr2">' +
139
-        goodTableHeadTr2Html  +
140
-        '</tr></thead><tbody class="goodTableTbody">' +
141
-        trHtml  +
142
-      "</tbody></table>"
143
-     for (var i = 0; i <= page; i++){
144
-      table ='<table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
145
-        goodTableHeadTr1Html  +
150
+    table =
151
+      '  <table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
152
+      goodTableHeadTr1Html +
153
+      '</tr><tr class="goodTableHeadTr2">' +
154
+      goodTableHeadTr2Html +
155
+      '</tr></thead><tbody class="goodTableTbody">' +
156
+      trHtml +
157
+      "</tbody></table>";
158
+    for (var i = 0; i <= page; i++) {
159
+      table =
160
+        '<table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
161
+        goodTableHeadTr1Html +
146 162
         '</tr><tr class="goodTableHeadTr2">' +
147
-        goodTableHeadTr2Html  +
163
+        goodTableHeadTr2Html +
148 164
         '</tr></thead><tbody class="goodTableTbody">' +
149
-        data[i]  +
150
-        "</tbody></table>"
151
-      $(".section_3_" + s_index + ".large_"+ i+" .largeAnalysistable").html(table);
165
+        data[i] +
166
+        "</tbody></table>";
167
+      $(".section_3_" + s_index + ".large_" + i + " .largeAnalysistable").html(
168
+        table
169
+      );
152 170
       if (i != 0) {
153
-         //添加分页
154
-        $(".large_"+ (i-1)+".section_3_"+s_index).after(
155
-        '<div class="page_root section_3_'+s_index+' large_'+i+'"></div>'
171
+        //添加分页
172
+        $(".large_" + (i - 1) + ".section_3_" + s_index).after(
173
+          '<div class="page_root section_3_' +
174
+            s_index +
175
+            " large_" +
176
+            i +
177
+            '"></div>'
156 178
         );
157
-      $(".page_root.section_3_"+s_index+'.large_'+i).html(table); 
179
+        $(".page_root.section_3_" + s_index + ".large_" + i).html(table);
158 180
       }
159 181
     }
160 182
     // $(".section_3_"+s_index +" .largeAnalysistable").html(table)
161 183
   }
162 184
 
163
-  function initSmallAnalysisEcharts (s_index,list) {
164
-     let legendlist = [currentclass, "全年级"],
165
-        xAxis_data = [],
166
-        schoolscore = [],
167
-        classscore = [],
185
+  function initSmallAnalysisEcharts(s_index, list) {
186
+    let legendlist = [currentclass, "全年级"],
187
+      xAxis_data = [],
188
+      schoolscore = [],
189
+      classscore = [],
168 190
       curseries = [];
169 191
     $.each(list, function (idx, item) {
170 192
       xAxis_data.push("第" + item.qn + "题");
171
-        classscore.push(item.classavgscore);
172
-        schoolscore.push(item.gradeavgscore);
173
-    })
174
-      let color = ["#5699FF", "#5EC5C8"];
175
-      curseries = [
176
-        {
177
-          name: currentclass,
178
-          type: "line",
179
-          symbol: "circle", // 默认是空心圆(中间是白色的),改成实心圆
180
-          smooth: false, //折线是否弯曲
181
-          // symbol: "emptyCircle",
182
-          symbolSize: 6,
183
-          itemStyle: {
184
-            normal: {
185
-              color: "#4190FF" // 拐点外圈颜色
186
-            }
187
-          },
188
-          label: {
189
-            normal: {
190
-              show: true,
191
-              align: "center",
192
-              verticalAlign: "bottom",
193
-              position: "top",
194
-              distance: 0,
195
-              formatter: `{c}`
196
-            }
197
-          },
198
-          areaStyle: {
199
-            normal: {
200
-              color: new echarts.graphic.LinearGradient(
201
-                0,
202
-                0,
203
-                0,
204
-                1,
205
-                [
206
-                  {
207
-                    offset: 0,
208
-                    color: hexToRgba(color[0], 0.3)
209
-                  },
210
-                  {
211
-                    offset: 1,
212
-                    color: hexToRgba(color[0], 0)
213
-                  }
214
-                ],
215
-                false
216
-              ),
217
-              shadowColor: hexToRgba(color[0], 0),
218
-              shadowBlur: 10
219
-            }
220
-          },
221
-          data: classscore
193
+      classscore.push(item.classavgscore);
194
+      schoolscore.push(item.gradeavgscore);
195
+    });
196
+    let color = ["#5699FF", "#5EC5C8"];
197
+    curseries = [
198
+      {
199
+        name: currentclass,
200
+        type: "line",
201
+        symbol: "circle", // 默认是空心圆(中间是白色的),改成实心圆
202
+        smooth: false, //折线是否弯曲
203
+        // symbol: "emptyCircle",
204
+        symbolSize: 6,
205
+        itemStyle: {
206
+          normal: {
207
+            color: "#4190FF" // 拐点外圈颜色
208
+          }
222 209
         },
223
-        {
224
-          name: "全年级",
225
-          type: "line",
226
-          // smooth: true, //是否平滑曲线显示
227
-          symbol: "circle", // 默认是空心圆(中间是白色的),改成实心圆
228
-          smooth: false, //折线是否弯曲
229
-          // symbol: "emptyCircle",
230
-          symbolSize: 6,
231
-          // zlevel: 3,
232
-          itemStyle: {
233
-            normal: {
234
-              color: "#5FCE9E" // 拐点外圈颜色
235
-            }
236
-          },
237
-          label: {
238
-            normal: {
239
-              show: true,
240
-              align: "center",
241
-              verticalAlign: "bottom",
242
-              position: "top",
243
-              distance: 0,
244
-              formatter: `{c}`
245
-            }
246
-          },
247
-          areaStyle: {
248
-            normal: {
249
-              color: new echarts.graphic.LinearGradient(
250
-                0,
251
-                0,
252
-                0,
253
-                1,
254
-                [
255
-                  {
256
-                    offset: 0,
257
-                    color: hexToRgba(color[1], 0.3)
258
-                  },
259
-                  {
260
-                    offset: 1,
261
-                    color: hexToRgba(color[1], 0)
262
-                  }
263
-                ],
264
-                false
265
-              ),
266
-              shadowColor: hexToRgba(color[1], 0),
267
-              shadowBlur: 10
268
-            }
269
-          },
270
-          data: schoolscore
271
-        }
272
-      ];
273
-    let option = {
274
-        animation: false,
275
-        color: ["#5699FF", "#5EC5C8"],
276
-        title: {
277
-          text: "分",
278
-          x: "left",
279
-          y: "top",
280
-          textStyle: {
281
-            color: "#5F6E82",
282
-            fontSize: 12,
283
-            fontWeight: 500
210
+        label: {
211
+          normal: {
212
+            show: true,
213
+            align: "center",
214
+            verticalAlign: "bottom",
215
+            position: "top",
216
+            distance: 0,
217
+            formatter: `{c}`
218
+          }
219
+        },
220
+        areaStyle: {
221
+          normal: {
222
+            color: new echarts.graphic.LinearGradient(
223
+              0,
224
+              0,
225
+              0,
226
+              1,
227
+              [
228
+                {
229
+                  offset: 0,
230
+                  color: hexToRgba(color[0], 0.3)
231
+                },
232
+                {
233
+                  offset: 1,
234
+                  color: hexToRgba(color[0], 0)
235
+                }
236
+              ],
237
+              false
238
+            ),
239
+            shadowColor: hexToRgba(color[0], 0),
240
+            shadowBlur: 10
241
+          }
242
+        },
243
+        data: classscore
244
+      },
245
+      {
246
+        name: "全年级",
247
+        type: "line",
248
+        // smooth: true, //是否平滑曲线显示
249
+        symbol: "circle", // 默认是空心圆(中间是白色的),改成实心圆
250
+        smooth: false, //折线是否弯曲
251
+        // symbol: "emptyCircle",
252
+        symbolSize: 6,
253
+        // zlevel: 3,
254
+        itemStyle: {
255
+          normal: {
256
+            color: "#5FCE9E" // 拐点外圈颜色
257
+          }
258
+        },
259
+        label: {
260
+          normal: {
261
+            show: true,
262
+            align: "center",
263
+            verticalAlign: "bottom",
264
+            position: "top",
265
+            distance: 0,
266
+            formatter: `{c}`
267
+          }
268
+        },
269
+        areaStyle: {
270
+          normal: {
271
+            color: new echarts.graphic.LinearGradient(
272
+              0,
273
+              0,
274
+              0,
275
+              1,
276
+              [
277
+                {
278
+                  offset: 0,
279
+                  color: hexToRgba(color[1], 0.3)
280
+                },
281
+                {
282
+                  offset: 1,
283
+                  color: hexToRgba(color[1], 0)
284
+                }
285
+              ],
286
+              false
287
+            ),
288
+            shadowColor: hexToRgba(color[1], 0),
289
+            shadowBlur: 10
284 290
           }
285 291
         },
286
-        legend: {
292
+        data: schoolscore
293
+      }
294
+    ];
295
+    let option = {
296
+      animation: false,
297
+      color: ["#5699FF", "#5EC5C8"],
298
+      title: {
299
+        text: "分",
300
+        x: "left",
301
+        y: "top",
302
+        textStyle: {
303
+          color: "#5F6E82",
304
+          fontSize: 12,
305
+          fontWeight: 500
306
+        }
307
+      },
308
+      legend: {
287 309
         icon: "rectRound",
288 310
         itemWidth: $.UnitUtil.mm2px(2),
289 311
         itemHeight: $.UnitUtil.mm2px(2),
@@ -298,105 +320,113 @@ $(function () {
298 320
         bottom: $.UnitUtil.mm2px(8),
299 321
         containLabel: true
300 322
       },
301
-        xAxis: [
302
-          {
303
-            type: "category",
304
-            data: xAxis_data,
305
-            axisLabel: {
306
-              color: "#5F6E82" //更改坐标轴文字颜色
307
-            },
308
-            axisTick: {
309
-              alignWithLabel: true
310
-            },
311
-            boundaryGap: true,
312
-            triggerEvent: true,
313
-            axisLine: {
314
-              show: true, //是否显示轴线
315
-              lineStyle: {
316
-                color: "#DADADA" //刻度线的颜色
317
-              }
323
+      xAxis: [
324
+        {
325
+          type: "category",
326
+          data: xAxis_data,
327
+          axisLabel: {
328
+            color: "#5F6E82" //更改坐标轴文字颜色
329
+          },
330
+          axisTick: {
331
+            alignWithLabel: true
332
+          },
333
+          boundaryGap: true,
334
+          triggerEvent: true,
335
+          axisLine: {
336
+            show: true, //是否显示轴线
337
+            lineStyle: {
338
+              color: "#DADADA" //刻度线的颜色
318 339
             }
319 340
           }
320
-        ],
321
-        yAxis: [
322
-          {
323
-            type: "value",
324
-            axisTick: {
325
-              show: false //刻度
326
-            },
327
-            axisLine: {
328
-              show: false, //是否显示轴线
329
-              lineStyle: {
330
-                color: "#DADADA" //刻度线的颜色
331
-              }
332
-            },
333
-            splitLine: {
334
-              //网格线
335
-              lineStyle: {
336
-                type: "dotted" //设置网格线类型 dotted:虚线   solid:实线
337
-              },
338
-              show: true //隐藏或显示
339
-            },
340
-            axisLabel: {
341
-              color: "#5F6E82" //更改坐标轴文字颜色
341
+        }
342
+      ],
343
+      yAxis: [
344
+        {
345
+          type: "value",
346
+          axisTick: {
347
+            show: false //刻度
348
+          },
349
+          axisLine: {
350
+            show: false, //是否显示轴线
351
+            lineStyle: {
352
+              color: "#DADADA" //刻度线的颜色
342 353
             }
354
+          },
355
+          splitLine: {
356
+            //网格线
357
+            lineStyle: {
358
+              type: "dotted" //设置网格线类型 dotted:虚线   solid:实线
359
+            },
360
+            show: true //隐藏或显示
361
+          },
362
+          axisLabel: {
363
+            color: "#5F6E82" //更改坐标轴文字颜色
343 364
           }
344
-        ],
345
-        series: curseries
365
+        }
366
+      ],
367
+      series: curseries
346 368
     };
347
-     var myEcharts = echarts.init(
348
-      document.querySelector(".section_3_"+s_index +" #SmallAnalysisEcharts")
369
+    var myEcharts = echarts.init(
370
+      $(".section_3_" + s_index + " #SmallAnalysisEcharts")[0]
349 371
     );
350 372
     myEcharts.clear();
351 373
     myEcharts.setOption(option);
352
-    showSmallSmallAnalysistable(list,legendlist,s_index);
374
+    showSmallSmallAnalysistable(list, legendlist, s_index);
353 375
   }
354 376
 
355
-  function showSmallSmallAnalysistable (list,legendlist,s_index) {
356
-    var table = "",goodTableHeadTr1Html = '<th rowspan="2">题号</th><th rowspan="2">题型</th><th rowspan="2">分值</th><th rowspan="2">难度</th><th colspan="2">年级</th><th colspan="2">'+currentclass+'</th>',
357
-      goodTableHeadTr2Html = "", trHtml = "";
377
+  function showSmallSmallAnalysistable(list, legendlist, s_index) {
378
+    var table = "",
379
+      goodTableHeadTr1Html =
380
+        '<th rowspan="2">题号</th><th rowspan="2">题型</th><th rowspan="2">分值</th><th rowspan="2">难度</th><th colspan="2">年级</th><th colspan="2">' +
381
+        currentclass +
382
+        "</th>",
383
+      goodTableHeadTr2Html = "",
384
+      trHtml = "";
358 385
     var complexityarr = ["一", "二", "三", "四", "五"];
359 386
     $.each(list, function (idx, item) {
360
-      var complexity = item.complexity ? complexityarr[item.complexity - 1] + "星" : " ";
387
+      var complexity = item.complexity
388
+        ? complexityarr[item.complexity - 1] + "星"
389
+        : " ";
361 390
       trHtml += "<tr>";
362
-      trHtml+= '<td><div class="my_cell">' +
363
-      item.qn +
364
-      '</div></td><td><div class="my_cell">' +
365
-      item.qtypename +
366
-      '</div></td><td><div class="my_cell">' +
367
-      item.score +
368
-      '</div></td><td><div class="my_cell">' +
369
-      complexity +
370
-      '</div></td><td><div class="my_cell">' +
371
-      item.gradeavgscore +
372
-      '</div></td><td><div class="my_cell">' +
373
-      item.gradesrate +
374
-      '%</div></td><td><div class="my_cell">' +
375
-      item.classavgscore +
376
-      '</div></td><td><div class="my_cell">' +
377
-      item.classsrate +
378
-      "%" +
379
-      '</div></td>';
380
-    })
391
+      trHtml +=
392
+        '<td><div class="my_cell">' +
393
+        item.qn +
394
+        '</div></td><td><div class="my_cell">' +
395
+        item.qtypename +
396
+        '</div></td><td><div class="my_cell">' +
397
+        item.score +
398
+        '</div></td><td><div class="my_cell">' +
399
+        complexity +
400
+        '</div></td><td><div class="my_cell">' +
401
+        item.gradeavgscore +
402
+        '</div></td><td><div class="my_cell">' +
403
+        item.gradesrate +
404
+        '%</div></td><td><div class="my_cell">' +
405
+        item.classavgscore +
406
+        '</div></td><td><div class="my_cell">' +
407
+        item.classsrate +
408
+        "%" +
409
+        "</div></td>";
410
+    });
381 411
     $.each(legendlist, function (idx, item) {
382
-      goodTableHeadTr2Html+="<th>平均分</th><th>得分率</th>";
383
-    })
384
-      table ='  <table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
385
-        goodTableHeadTr1Html  +
386
-        '</tr><tr class="goodTableHeadTr2">' +
387
-        goodTableHeadTr2Html  +
388
-        '</tr></thead><tbody class="goodTableTbody">' +
389
-        trHtml  +
390
-      "</tbody></table>"
412
+      goodTableHeadTr2Html += "<th>平均分</th><th>得分率</th>";
413
+    });
414
+    table =
415
+      '  <table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
416
+      goodTableHeadTr1Html +
417
+      '</tr><tr class="goodTableHeadTr2">' +
418
+      goodTableHeadTr2Html +
419
+      '</tr></thead><tbody class="goodTableTbody">' +
420
+      trHtml +
421
+      "</tbody></table>";
391 422
     $(".section_3_" + s_index + " .SmallAnalysistable").html(table);
392 423
   }
393 424
 
394
-  function initpointsAnalysisEcharts (s_index, list) {
425
+  function initpointsAnalysisEcharts(s_index, list) {
395 426
     if (list.length == 0) return;
396
-    console.log(list);
397 427
     var schoolscore = [],
398 428
       classscore = [],
399
-      legendlist = [currentclass+"得分率", "年级得分率"];
429
+      legendlist = [currentclass + "得分率", "年级得分率"];
400 430
     $.each(list, function (idx, item) {
401 431
       if (item.subjectname != "全科") {
402 432
         classscore.push(item.classsrate);
@@ -447,7 +477,7 @@ $(function () {
447 477
         },
448 478
         // areaStyle: {},  //内部阴影
449 479
         data: [
450
-         {
480
+          {
451 481
             value: classscore,
452 482
             label: {
453 483
               show: true,
@@ -455,9 +485,9 @@ $(function () {
455 485
                 return params.value;
456 486
               }
457 487
             },
458
-            name: currentclass+"得分率"
488
+            name: currentclass + "得分率"
459 489
           },
460
-         {
490
+          {
461 491
             value: schoolscore,
462 492
             label: {
463 493
               show: true,
@@ -471,66 +501,80 @@ $(function () {
471 501
       }
472 502
     };
473 503
     var myEcharts = echarts.init(
474
-      document.querySelector(".section_3_"+s_index +" #pointsAnalysisEcharts")
504
+      $(".section_3_" + s_index + " #pointsAnalysisEcharts")[0]
475 505
     );
476 506
     myEcharts.clear();
477 507
     myEcharts.setOption(option);
478
-    showpointsAnalysistable(list,legendlist,s_index);
508
+    showpointsAnalysistable(list, legendlist, s_index);
479 509
   }
480 510
 
481
-  function showpointsAnalysistable (list, legendlist, s_index) {
482
-     var table = "",goodTableHeadTr1Html = '<th rowspan="2" class="points">知识点</th><th rowspan="2">对应题号</th><th rowspan="2">分值</th><th rowspan="2">占比</th><th colspan="2">年级</th><th colspan="2">'+currentclass+'</th>',
483
-      goodTableHeadTr2Html = "", trHtml = "";
511
+  function showpointsAnalysistable(list, legendlist, s_index) {
512
+    var table = "",
513
+      goodTableHeadTr1Html =
514
+        '<th rowspan="2" class="points">知识点</th><th rowspan="2">对应题号</th><th rowspan="2">分值</th><th rowspan="2">占比</th><th colspan="2">年级</th><th colspan="2">' +
515
+        currentclass +
516
+        "</th>",
517
+      goodTableHeadTr2Html = "",
518
+      trHtml = "";
484 519
     var data = {
485
-      0:""
486
-    }, page = 0;
487
-    var pointnum = 16;//第一次是半页 显示十条 往后二十条每页
520
+        0: ""
521
+      },
522
+      page = 0;
523
+    var pointnum = 16; //第一次是半页 显示十条 往后二十条每页
488 524
     $.each(list, function (idx, item) {
489
-      if((idx + 1) % pointnum == 0){
525
+      if ((idx + 1) % pointnum == 0) {
490 526
         page++;
491 527
         if (page == 1) {
492 528
           pointnum = 31;
493 529
         }
494
-        data[page] = ""; 
530
+        data[page] = "";
495 531
       }
496 532
       data[page] += "<tr>";
497
-      data[page]+= '<td><div class="my_cell">' +
498
-      item.pointname +
499
-      '</div></td><td><div class="my_cell">' +
500
-      item.qns +
501
-      '</div></td><td><div class="my_cell">' +
502
-      item.score +
503
-      '</div></td><td><div class="my_cell">' +
504
-      item.srate +
505
-      '%</div></td><td><div class="my_cell">' +
506
-      item.gradeavgscore +
507
-      '</div></td><td><div class="my_cell">' +
508
-      item.gradesrate +
509
-      '%</div></td><td><div class="my_cell">' +
510
-      item.classavgscore +
511
-      '</div></td><td><div class="my_cell">' +
512
-      item.classsrate +
513
-      "%" +
514
-      '</div></td>';
515
-    })
533
+      data[page] +=
534
+        '<td><div class="my_cell">' +
535
+        item.pointname +
536
+        '</div></td><td><div class="my_cell">' +
537
+        item.qns +
538
+        '</div></td><td><div class="my_cell">' +
539
+        item.score +
540
+        '</div></td><td><div class="my_cell">' +
541
+        item.srate +
542
+        '%</div></td><td><div class="my_cell">' +
543
+        item.gradeavgscore +
544
+        '</div></td><td><div class="my_cell">' +
545
+        item.gradesrate +
546
+        '%</div></td><td><div class="my_cell">' +
547
+        item.classavgscore +
548
+        '</div></td><td><div class="my_cell">' +
549
+        item.classsrate +
550
+        "%" +
551
+        "</div></td>";
552
+    });
516 553
     $.each(legendlist, function (idx, item) {
517
-      goodTableHeadTr2Html+="<th>平均分</th><th>得分率</th>";
518
-    })
519
-    for (var i = 0; i <= page; i++){
520
-      table ='<table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
521
-        goodTableHeadTr1Html  +
554
+      goodTableHeadTr2Html += "<th>平均分</th><th>得分率</th>";
555
+    });
556
+    for (var i = 0; i <= page; i++) {
557
+      table =
558
+        '<table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
559
+        goodTableHeadTr1Html +
522 560
         '</tr><tr class="goodTableHeadTr2">' +
523
-        goodTableHeadTr2Html  +
561
+        goodTableHeadTr2Html +
524 562
         '</tr></thead><tbody class="goodTableTbody">' +
525
-        data[i]  +
526
-        "</tbody></table>"
527
-      $(".section_3_" + s_index + ".page_"+ i+" .pointsAnalysistable").html(table);
563
+        data[i] +
564
+        "</tbody></table>";
565
+      $(".section_3_" + s_index + ".page_" + i + " .pointsAnalysistable").html(
566
+        table
567
+      );
528 568
       if (i != 0) {
529
-         //添加分页
530
-        $(".page_"+ (i-1)+".section_3_"+s_index).after(
531
-        '<div class="page_root section_3_'+s_index+' page_'+i+'"></div>'
569
+        //添加分页
570
+        $(".page_" + (i - 1) + ".section_3_" + s_index).after(
571
+          '<div class="page_root section_3_' +
572
+            s_index +
573
+            " page_" +
574
+            i +
575
+            '"></div>'
532 576
         );
533
-      $(".page_root.section_3_"+s_index+'.page_'+i).html(table); 
577
+        $(".page_root.section_3_" + s_index + ".page_" + i).html(table);
534 578
       }
535 579
     }
536 580
   }
@@ -538,20 +582,32 @@ $(function () {
538 582
   parameter = JSON.parse(parameter);
539 583
   var html = "";
540 584
   $.each(parameter, function (s_index, item) {
541
-    html+='<div class="page_root large_0 section_3_'+s_index +'">'+
542
-     (s_index == 0?'<h1 class="section_title_1">第三章 试卷分析</h1><div class="abstract_box"><div class="abstract_left"><img src="/img/img2.png" /></div><div class="abstract_right"><div class="abstract_content">从学科试卷分析,帮我们从宏观的角度了解班级的水平和差异。系统从多个维度的数据进行学科对比分析,<strong>包括大题年级和班级的(平均分、得分率)、小题年级和班级的(平均分、得分率)。</strong></div></div></div>':"")+ 
543
-      '<h1 class="subjectinfo">'+item.subjectname+'试卷分析</h1><h2 class="section_title_2">1. 大题分析</h2><h3 class="section_title_3">1.1 大题分析</h3><div id="largeAnalysisEcharts" style="margin: 0 4mm 4mm; height: 71mm"></div><h2 class="section_title_3">1.2 大题整体分析</h2><div class="largeAnalysistable"></div></div><div class="page_root section_3_'+
544
-    s_index + '"><h2 class="section_title_2">2. 小题分析</h2><h3 class="section_title_3">2.1 小题分析</h3><div id="SmallAnalysisEcharts" style="margin: 0 4mm 4mm; height: 71mm"></div><h2 class="section_title_3_'+
545
-      s_index +'">2.2 小题整体分析</h2><div class="SmallAnalysistable"></div></div>'+(item.points.length>0?'<div class="page_root page_0 section_3_'+
546
-    s_index +'"><h2 class="section_title_2">3. 知识点掌握整体概况</h2><h3 class="section_title_3">3.1 知识点得分率分析</h3><div id="pointsAnalysisEcharts" style="margin: 0 4mm 4mm; height: 90mm"></div><h2 class="section_title_3">3.2 知识点整体分析</h2><div class="pointsAnalysistable"></div></div></div>':"")
547
-  })
585
+    html +=
586
+      '<div class="page_root large_0 section_3_' +
587
+      s_index +
588
+      '">' +
589
+      (s_index == 0
590
+        ? '<h1 class="section_title_1">第三章 试卷分析</h1><div class="abstract_box"><div class="abstract_left"><img src="/img/img2.png" /></div><div class="abstract_right"><div class="abstract_content">从学科试卷分析,帮我们从宏观的角度了解班级的水平和差异。系统从多个维度的数据进行学科对比分析,<strong>包括大题年级和班级的(平均分、得分率)、小题年级和班级的(平均分、得分率)。</strong></div></div></div>'
591
+        : "") +
592
+      '<h1 class="subjectinfo">' +
593
+      item.subjectname +
594
+      '试卷分析</h1><h2 class="section_title_2">1. 大题分析</h2><h3 class="section_title_3">1.1 大题分析</h3><div id="largeAnalysisEcharts" style="margin: 0 4mm 4mm; height: 71mm"></div><h2 class="section_title_3">1.2 大题整体分析</h2><div class="largeAnalysistable"></div></div><div class="page_root section_3_' +
595
+      s_index +
596
+      '"><h2 class="section_title_2">2. 小题分析</h2><h3 class="section_title_3">2.1 小题分析</h3><div id="SmallAnalysisEcharts" style="margin: 0 4mm 4mm; height: 71mm"></div><h2 class="section_title_3_' +
597
+      s_index +
598
+      '">2.2 小题整体分析</h2><div class="SmallAnalysistable"></div></div>' +
599
+      (item.points.length > 0
600
+        ? '<div class="page_root page_0 section_3_' +
601
+          s_index +
602
+          '"><h2 class="section_title_2">3. 知识点掌握整体概况</h2><h3 class="section_title_3">3.1 知识点得分率分析</h3><div id="pointsAnalysisEcharts" style="margin: 0 4mm 4mm; height: 90mm"></div><h2 class="section_title_3">3.2 知识点整体分析</h2><div class="pointsAnalysistable"></div></div></div>'
603
+        : "");
604
+  });
548 605
   $(".ChapterThree").html(html);
549
-  console.log(parameter);
550
-  $.each(parameter, function (s_index, item) { 
606
+  $.each(parameter, function (s_index, item) {
551 607
     initlargeAnalysisEcharts(s_index, item.types);
552 608
     initSmallAnalysisEcharts(s_index, item.questions);
553 609
     initpointsAnalysisEcharts(s_index, item.points);
554
-  })
555
-  
610
+  });
611
+
556 612
   //  document.documentElement.scrollTop = 1000;
557
-});
613
+});

+ 1
- 3
js/section_4.js Voir le fichier

@@ -110,9 +110,7 @@ $(function () {
110 110
       ],
111 111
       series: curseries
112 112
     };
113
-    var myEcharts = echarts.init(
114
-      document.querySelector(".section_4  #violationEcharts")
115
-    );
113
+    var myEcharts = echarts.init($(".section_4  #violationEcharts")[0]);
116 114
     myEcharts.clear();
117 115
     myEcharts.setOption(option);
118 116
     showviolationtable(list);

+ 1
- 3
js/section_5.js Voir le fichier

@@ -110,9 +110,7 @@ $(function () {
110 110
       ],
111 111
       series: curseries
112 112
     };
113
-    var myEcharts = echarts.init(
114
-      document.querySelector(".section_5  #goodexamEcharts")
115
-    );
113
+    var myEcharts = echarts.init($(".section_5  #goodexamEcharts")[0]);
116 114
     myEcharts.clear();
117 115
     myEcharts.setOption(option);
118 116
     showgoodexamable(list);

+ 1
- 3
js/section_6.js Voir le fichier

@@ -110,9 +110,7 @@ $(function () {
110 110
       ],
111 111
       series: curseries
112 112
     };
113
-    var myEcharts = echarts.init(
114
-      document.querySelector(".section_6  #badexamEcharts")
115
-    );
113
+    var myEcharts = echarts.init($(".section_6  #badexamEcharts")[0]);
116 114
     myEcharts.clear();
117 115
     myEcharts.setOption(option);
118 116
     showbadexamable(list);

+ 3
- 3
sections/section_1.html Voir le fichier

@@ -4,12 +4,12 @@
4 4
     <meta charset="UTF-8" />
5 5
     <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6 6
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
-    <title>校本PDF报告-第一章 考试概况</title>
7
+    <title>校本PDF报告-第一章 报告概况</title>
8 8
     <link rel="stylesheet" href="../css/section_1.css" />
9 9
   </head>
10 10
   <body>
11 11
     <div class="page_root section1">
12
-      <h1 class="section_title_1">第一章 考试概况</h1>
12
+      <h1 class="section_title_1">第一章 报告概况</h1>
13 13
       <div class="abstract_box">
14 14
         <div class="abstract_left">
15 15
           <img src="/img/img1.png" />
@@ -117,7 +117,7 @@
117 117
       <h2 class="section_title_2">2.平均分对比</h2>
118 118
       <div
119 119
         id="examaverageEcharts"
120
-        style="margin: 0 4mm 4mm; height: 80mm"
120
+        style="margin: 0 4mm 4mm; height: 70mm"
121 121
       ></div>
122 122
       <div class="echarts_result">
123 123
         <div>上图统计结果表示:</div>

Chargement…
Annuler
Enregistrer