Ver código fonte

班级成绩对比-全科对比

wzl_h
wangzl 2 anos atrás
pai
commit
6021ead979

+ 1
- 1
css/scoreAnalysis/section_2_class_all.css Ver arquivo

@@ -4,7 +4,7 @@
4 4
   line-height: 7mm;
5 5
   background-color: #fff;
6 6
 }
7
-.section_2_class_all .echarts_result_content span {
7
+.section_2_class_all .echarts_result_content .dot {
8 8
   display: inline-block;
9 9
   margin-right: 2mm;
10 10
   width: 2mm;

+ 154
- 55
js/scoreAnalysis/section_2_class_all.js Ver arquivo

@@ -1,17 +1,11 @@
1 1
 $(function () {
2 2
   // 各班满分、最高分、最低分、平均分对比分析
3
-  function initClassScoreEcharts() {
4
-    var xAxis_data = [
5
-      "全年级",
6
-      "八年级一班",
7
-      "八年级二班",
8
-      "八年级三班",
9
-      "八年级四班"
10
-    ];
11
-    var series_full_data = [100, 100, 100, 100, 100];
12
-    var series_max_data = [95, 80, 85, 97, 85];
13
-    var series_min_data = [55, 60, 40, 30, 40];
14
-    var series_avg_data = [70, 65, 60, 80, 60];
3
+  function initClassScoreEcharts(classnameArr, classScoreInfo) {
4
+    var xAxis_data = classnameArr;
5
+    var series_full_data = classScoreInfo.full;
6
+    var series_max_data = classScoreInfo.max;
7
+    var series_min_data = classScoreInfo.min;
8
+    var series_avg_data = classScoreInfo.avg;
15 9
     var option = {
16 10
       animation: false,
17 11
       title: {
@@ -167,18 +161,12 @@ $(function () {
167 161
     myEcharts.setOption(option);
168 162
   }
169 163
   // 各班优秀率、良好率、及格率、低分率对比分析
170
-  function initClassRateEcharts() {
171
-    var xAxis_data = [
172
-      "全年级",
173
-      "八年级一班",
174
-      "八年级二班",
175
-      "八年级三班",
176
-      "八年级四班"
177
-    ];
178
-    var series_xy_data = [80.45, 77.06, 89, 78.6, 80.6];
179
-    var series_lh_data = [45.45, 47.06, 50, 48.6, 60.6];
180
-    var series_jg_data = [80.45, 77.06, 89, 78.6, 80.6];
181
-    var series_df_data = [80.45, 77.06, 89, 78.6, 80.6];
164
+  function initClassRateEcharts(classnameArr, classRateInfo) {
165
+    var xAxis_data = classnameArr;
166
+    var series_yx_data = classRateInfo.yx;
167
+    var series_lh_data = classRateInfo.lh;
168
+    var series_jg_data = classRateInfo.jg;
169
+    var series_df_data = classRateInfo.df;
182 170
     var option = {
183 171
       animation: false,
184 172
       title: {
@@ -268,7 +256,7 @@ $(function () {
268 256
               formatter: "{c}",
269 257
             },
270 258
           },
271
-          data: series_xy_data,
259
+          data: series_yx_data,
272 260
         },
273 261
         {
274 262
           name: "良好率",
@@ -334,16 +322,10 @@ $(function () {
334 322
     myEcharts.setOption(option);
335 323
   }
336 324
   // 各班实考人数、缺考人数对比
337
-  function initClassExamEcharts() {
338
-    var xAxis_data = [
339
-      "全年级",
340
-      "八年级一班",
341
-      "八年级二班",
342
-      "八年级三班",
343
-      "八年级四班"
344
-    ];
345
-    var series_sk_data = [100, 100, 100, 100, 100];
346
-    var series_qk_data = [95, 80, 85, 97, 85];
325
+  function initClassExamEcharts(classnameArr, classExamInfo) {
326
+    var xAxis_data = classnameArr;
327
+    var series_sk_data = classExamInfo.sk;
328
+    var series_qk_data = classExamInfo.qk;
347 329
     var option = {
348 330
       animation: false,
349 331
       title: {
@@ -461,15 +443,9 @@ $(function () {
461 443
     myEcharts.setOption(option);
462 444
   }
463 445
   // 各班标准差对比分析
464
-  function initClassStdEcharts() {
465
-    var xAxis_data = [
466
-      "全年级",
467
-      "八年级一班",
468
-      "八年级二班",
469
-      "八年级三班",
470
-      "八年级四班"
471
-    ];
472
-    var series_data = [12, 10, 3, 14, 7];
446
+  function initClassStdEcharts(classnameArr, classStd) {
447
+    var xAxis_data = classnameArr;
448
+    var series_data = classStd;
473 449
     var option = {
474 450
       animation: false,
475 451
       color: ["#5C99FF"],
@@ -559,15 +535,138 @@ $(function () {
559 535
   }
560 536
   var parameter = $(".section_2_html_root .section_2_class_all_html_root").data("page-params");
561 537
   parameter = JSON.parse(parameter);
562
-  var cjfx = parameter.cjfx;
563
-  // var djfx = parameter.djfx;
564
-  
565
-
566
-
567
-  console.log(".section_2_class_all_html_root:parameter", parameter);
568
-
569
-  initClassScoreEcharts();
570
-  initClassRateEcharts();
571
-  initClassExamEcharts();
572
-  initClassStdEcharts();
538
+  var subjectname = parameter.subjectname;
539
+  var class_all_arr = parameter.arr;
540
+  $(".section_2_class_all .subjectname").text(subjectname);
541
+  var classnameArr = [];
542
+  // 各班满分、最高分、最低分、平均分对比分析
543
+  var classScoreInfo = {
544
+    full: [],
545
+    max: [],
546
+    min: [],
547
+    avg: [],
548
+    gt_avg_classes: [],
549
+    lt_avg_classes: []
550
+  };
551
+  // 各班优秀率、良好率、及格率、低分率对比分析
552
+  var classRateInfo = {
553
+    yx: [],
554
+    lh: [],
555
+    jg: [],
556
+    df: [],
557
+    yx_max: {
558
+      rate: 0,
559
+      classname: ""
560
+    },
561
+    lh_max: {
562
+      rate: 0,
563
+      classname: ""
564
+    },
565
+    jg_max: {
566
+      rate: 0,
567
+      classname: ""
568
+    },
569
+    df_max: {
570
+      rate: 0,
571
+      classname: ""
572
+    }
573
+  };
574
+  // 各班实考人数、缺考人数对比
575
+  var classExamInfo = {
576
+    sk: [],
577
+    qk: [],
578
+    sk_max: {
579
+      num: 0,
580
+      classname: ""
581
+    },
582
+    qk_max: {
583
+      num: 0,
584
+      classname: ""
585
+    }
586
+  }
587
+  // 各班标准差对比分析
588
+  var classStd = [];
589
+  // 班级整体分析
590
+  var classTbodyHtml = "";
591
+  for (var i = 0; i < class_all_arr.length; i++) {
592
+    var c_item = class_all_arr[i];
593
+    classnameArr.push(c_item.classname);
594
+    // 各班满分、最高分、最低分、平均分对比分析
595
+    classScoreInfo.full.push(c_item.allscore);
596
+    classScoreInfo.max.push(c_item.classmaxscore);
597
+    classScoreInfo.min.push(c_item.classminscore);
598
+    classScoreInfo.avg.push(c_item.classavgscore);
599
+    if (c_item.schoolavgscore < c_item.classavgscore) {
600
+      classScoreInfo.gt_avg_classes.push(c_item.classname);
601
+    }
602
+    if (c_item.schoolavgscore > c_item.classavgscore) {
603
+      classScoreInfo.lt_avg_classes.push(c_item.classname);
604
+    }
605
+    // 各班优秀率、良好率、及格率、低分率对比分析
606
+    classRateInfo.yx.push(c_item.yxrate);
607
+    classRateInfo.lh.push(c_item.lhrate);
608
+    classRateInfo.jg.push(c_item.jgrate);
609
+    classRateInfo.df.push(c_item.dfrate);
610
+    if (classRateInfo.yx_max.rate < c_item.yxrate) {
611
+      classRateInfo.yx_max = {
612
+        rate: c_item.yxrate,
613
+        classname: c_item.classname
614
+      };
615
+    }
616
+    if (classRateInfo.lh_max.rate < c_item.lhrate) {
617
+      classRateInfo.lh_max = {
618
+        rate: c_item.lhrate,
619
+        classname: c_item.classname
620
+      };
621
+    }
622
+    if (classRateInfo.jg_max.rate < c_item.jgrate) {
623
+      classRateInfo.jg_max = {
624
+        rate: c_item.jgrate,
625
+        classname: c_item.classname
626
+      };
627
+    }
628
+    if (classRateInfo.df_max.rate < c_item.dfrate) {
629
+      classRateInfo.df_max = {
630
+        rate: c_item.dfrate,
631
+        classname: c_item.classname
632
+      };
633
+    }
634
+    // 各班实考人数、缺考人数对比
635
+    classExamInfo.sk.push(c_item.stunum);
636
+    classExamInfo.qk.push(c_item.missnum);
637
+    if (classExamInfo.sk_max.num < c_item.stunum) {
638
+      classExamInfo.sk_max = {
639
+        num: c_item.stunum,
640
+        classname: c_item.classname
641
+      };
642
+    }
643
+    if (classExamInfo.qk_max.num < c_item.missnum) {
644
+      classExamInfo.qk_max = {
645
+        num: c_item.missnum,
646
+        classname: c_item.classname
647
+      };
648
+    }
649
+    // 各班标准差对比分析
650
+    classStd.push(c_item.bzc);
651
+    // 班级整体分析
652
+    classTbodyHtml += '<tr><td><div class="my_cell">' + c_item.classname + '</div></td><td><div class="my_cell">' + c_item.stunum + '</div></td><td><div class="my_cell">' + c_item.missnum + '</div></td><td><div class="my_cell">' + c_item.allscore + '</div></td><td><div class="my_cell">' + c_item.classmaxscore + '</div></td><td><div class="my_cell">' + c_item.classminscore + '</div></td><td><div class="my_cell">' + c_item.classavgscore + '</div></td><td><div class="my_cell">' + c_item.yxrate + '%</div></td><td><div class="my_cell">' + c_item.lhrate + '%</div></td><td><div class="my_cell">' + c_item.jgrate + '%</div></td><td><div class="my_cell">' + c_item.dfrate + '%</div></td><td><div class="my_cell">' + c_item.bzc + '</div></td></tr>';
653
+  }
654
+  // 各班满分、最高分、最低分、平均分对比分析
655
+  initClassScoreEcharts(classnameArr, classScoreInfo);
656
+  $(".section_2_class_all .gt_avg_classes").text(classScoreInfo.gt_avg_classes.join("、"));
657
+  $(".section_2_class_all .lt_avg_classes").text(classScoreInfo.lt_avg_classes.join("、"));
658
+  // 各班优秀率、良好率、及格率、低分率对比分析
659
+  initClassRateEcharts(classnameArr, classRateInfo);
660
+  $(".section_2_class_all .yx_max_class").text(classRateInfo.yx_max.classname);
661
+  $(".section_2_class_all .lh_max_class").text(classRateInfo.lh_max.classname);
662
+  $(".section_2_class_all .jg_max_class").text(classRateInfo.jg_max.classname);
663
+  $(".section_2_class_all .df_max_class").text(classRateInfo.df_max.classname);
664
+  // 各班实考人数、缺考人数对比
665
+  initClassExamEcharts(classnameArr, classExamInfo);
666
+  $(".section_2_class_all .sk_max_class").text(classExamInfo.sk_max.classname);
667
+  $(".section_2_class_all .qk_max_class").text(classExamInfo.qk_max.classname);
668
+  // 各班标准差对比分析
669
+  initClassStdEcharts(classnameArr, classStd);
670
+  // 班级整体分析
671
+  $(".section_2_class_all .classTbody").html(classTbodyHtml);
573 672
 });

+ 51
- 4
js/section_2.js Ver arquivo

@@ -13,11 +13,58 @@ $(function() {
13 13
   $(".section_2.score_analysis_root").html(sectionsHtmlArr.map(function (htmlName) {
14 14
     return "<div class='" + htmlName + "_html_root'></div>";
15 15
   }).join(""));
16
+  var cjfx = parameter.cjfx;
17
+  var djfx = parameter.djfx;
18
+  var class_all_arr = [];
19
+  var class_single_arr = [];
20
+  for (var s_key in cjfx) {
21
+    var s_item = cjfx[s_key];
22
+    if (s_key === "总分") {
23
+      class_all_arr = s_item;
24
+    } else {
25
+      class_single_arr.push({
26
+        subjectname: s_key,
27
+        arr: s_item
28
+      });
29
+    }
30
+  }
16 31
   sectionsHtmlArr.forEach(function(htmlName) {
17
-    $(".section_2.score_analysis_root ." + htmlName + "_html_root").data("page-params", JSON.stringify({
18
-      cjfx: parameter.cjfx,
19
-      djfx: parameter.djfx
20
-    }));
32
+    if (htmlName === "section_2_class_all") {
33
+      $(".section_2.score_analysis_root ." + htmlName + "_html_root").data("page-params", JSON.stringify({
34
+        subjectname: "全科",
35
+        arr: class_all_arr
36
+      }));
37
+    } else if (htmlName === "section_2_class_single") {
38
+      $(".section_2.score_analysis_root ." + htmlName + "_html_root").data("page-params", JSON.stringify({
39
+        cjfx: parameter.cjfx,
40
+        djfx: parameter.djfx
41
+      }));
42
+    } else if (htmlName === "section_2_level") {
43
+      $(".section_2.score_analysis_root ." + htmlName + "_html_root").data("page-params", JSON.stringify({
44
+        cjfx: parameter.cjfx,
45
+        djfx: parameter.djfx
46
+      }));
47
+    } else if (htmlName === "section_2_part") {
48
+      $(".section_2.score_analysis_root ." + htmlName + "_html_root").data("page-params", JSON.stringify({
49
+        cjfx: parameter.cjfx,
50
+        djfx: parameter.djfx
51
+      }));
52
+    } else if (htmlName === "section_2_lin_all") {
53
+      $(".section_2.score_analysis_root ." + htmlName + "_html_root").data("page-params", JSON.stringify({
54
+        cjfx: parameter.cjfx,
55
+        djfx: parameter.djfx
56
+      }));
57
+    } else if (htmlName === "section_2_lin_single") {
58
+      $(".section_2.score_analysis_root ." + htmlName + "_html_root").data("page-params", JSON.stringify({
59
+        cjfx: parameter.cjfx,
60
+        djfx: parameter.djfx
61
+      }));
62
+    } else if (htmlName === "section_2_excellent_all") {
63
+      $(".section_2.score_analysis_root ." + htmlName + "_html_root").data("page-params", JSON.stringify({
64
+        cjfx: parameter.cjfx,
65
+        djfx: parameter.djfx
66
+      }));
67
+    }
21 68
     $(".section_2.score_analysis_root ." + htmlName + "_html_root").load("./sections/scoreAnalysis/" + htmlName + ".html");
22 69
   });
23 70
 });

+ 11
- 68
sections/scoreAnalysis/section_2_class_all.html Ver arquivo

@@ -19,14 +19,14 @@
19 19
       </div>
20 20
     </div>
21 21
     <h2 class="section_title_2">1.班级成绩对比</h2>
22
-    <h3 class="section_title_3">1.1 全科对比</h3>
22
+    <h3 class="section_title_3">1.1 <span class="subjectname"></span>对比</h3>
23 23
     <h4 class="section_title_4">1.1.1 各班满分、最高分、最低分、平均分对比分析</h4>
24 24
     <div id="classScoreEcharts" style="margin: 0 4mm 4mm;height: 68mm;"></div>
25 25
     <div class="echarts_result">
26 26
       <div>上图统计结果表示:</div>
27 27
       <div class="echarts_result_content">
28
-        <div><span class="bg_5699FF"></span>高于年级平均分的班级:八年级一班</div>
29
-        <div><span class="bg_FF5F56"></span>低于年级平均分的班级:八年级二班、八年级三班、八年级四班</div>
28
+        <div><span class="dot bg_5699FF"></span>高于年级平均分的班级:<span class="gt_avg_classes"></span></div>
29
+        <div><span class="dot bg_FF5F56"></span>低于年级平均分的班级:<span class="lt_avg_classes"></span></div>
30 30
       </div>
31 31
     </div>
32 32
   </div>
@@ -36,10 +36,10 @@
36 36
     <div class="echarts_result">
37 37
       <div>上图统计结果表示:</div>
38 38
       <div class="echarts_result_content">
39
-        <div><span class="bg_5699FF"></span>优秀率最高的班级:八年级二班</div>
40
-        <div><span class="bg_FF5F56"></span>良好率最高的班级:八年级三班</div>
41
-        <div><span class="bg_5EC5C8"></span>及格率最高的班级:八年级四班</div>
42
-        <div><span class="bg_F1982B"></span>低分率最高的班级:八年级一班</div>
39
+        <div><span class="dot bg_5699FF"></span>优秀率最高的班级:<span class="yx_max_class"></span></div>
40
+        <div><span class="dot bg_FF5F56"></span>良好率最高的班级:<span class="lh_max_class"></span></div>
41
+        <div><span class="dot bg_5EC5C8"></span>及格率最高的班级:<span class="jg_max_class"></span></div>
42
+        <div><span class="dot bg_F1982B"></span>低分率最高的班级:<span class="df_max_class"></span></div>
43 43
       </div>
44 44
     </div>
45 45
     <h4 class="section_title_4">1.1.3 各班实考人数、缺考人数对比</h4>
@@ -47,15 +47,15 @@
47 47
     <div class="echarts_result">
48 48
       <div>上图统计结果表示:</div>
49 49
       <div class="echarts_result_content">
50
-        <div><span class="bg_5699FF"></span>实考人数最多的班级:八年级一班、八年级二班、八年级三班</div>
51
-        <div><span class="bg_FF5F56"></span>缺考人数最多的班级:八年级四班</div>
50
+        <div><span class="dot bg_5699FF"></span>实考人数最多的班级:<span class="sk_max_class"></span></div>
51
+        <div><span class="dot bg_FF5F56"></span>缺考人数最多的班级:<span class="qk_max_class"></span></div>
52 52
       </div>
53 53
     </div>
54 54
   </div>
55 55
   <div class="page_root section_2_class_all">
56 56
     <h4 class="section_title_4">1.1.4 各班标准差对比分析</h4>
57 57
     <div id="classStdEcharts" style="margin: 0 4mm 4mm;height: 63mm;"></div>
58
-    <h4 class="section_title_4">1.1.5 班级全科整体分析</h4>
58
+    <h4 class="section_title_4">1.1.5 班级<span class="subjectname"></span>整体分析</h4>
59 59
     <table border="1" class="my_table">
60 60
       <thead>
61 61
         <tr>
@@ -73,64 +73,7 @@
73 73
           <th class="w12mm">标准差</th>
74 74
         </tr>
75 75
       </thead>
76
-      <tbody>
77
-        <tr>
78
-          <td><div class="my_cell">全年级</div></td>
79
-          <td><div class="my_cell">5</div></td>
80
-          <td><div class="my_cell">4%</div></td>
81
-          <td><div class="my_cell">5</div></td>
82
-          <td><div class="my_cell">4%</div></td>
83
-          <td><div class="my_cell">5</div></td>
84
-          <td><div class="my_cell">4%</div></td>
85
-          <td><div class="my_cell">5</div></td>
86
-          <td><div class="my_cell">4%</div></td>
87
-          <td><div class="my_cell">5</div></td>
88
-          <td><div class="my_cell">4%</div></td>
89
-          <td><div class="my_cell">4%</div></td>
90
-        </tr>
91
-        <tr>
92
-          <td><div class="my_cell">八年级一班</div></td>
93
-          <td><div class="my_cell">5</div></td>
94
-          <td><div class="my_cell">4%</div></td>
95
-          <td><div class="my_cell">5</div></td>
96
-          <td><div class="my_cell">4%</div></td>
97
-          <td><div class="my_cell">5</div></td>
98
-          <td><div class="my_cell">4%</div></td>
99
-          <td><div class="my_cell">5</div></td>
100
-          <td><div class="my_cell">4%</div></td>
101
-          <td><div class="my_cell">5</div></td>
102
-          <td><div class="my_cell">4%</div></td>
103
-          <td><div class="my_cell">4%</div></td>
104
-        </tr>
105
-        <tr>
106
-          <td><div class="my_cell">八年级一班</div></td>
107
-          <td><div class="my_cell">5</div></td>
108
-          <td><div class="my_cell">4%</div></td>
109
-          <td><div class="my_cell">5</div></td>
110
-          <td><div class="my_cell">4%</div></td>
111
-          <td><div class="my_cell">5</div></td>
112
-          <td><div class="my_cell">4%</div></td>
113
-          <td><div class="my_cell">5</div></td>
114
-          <td><div class="my_cell">4%</div></td>
115
-          <td><div class="my_cell">5</div></td>
116
-          <td><div class="my_cell">4%</div></td>
117
-          <td><div class="my_cell">4%</div></td>
118
-        </tr>
119
-        <tr>
120
-          <td><div class="my_cell">八年级一班</div></td>
121
-          <td><div class="my_cell">5</div></td>
122
-          <td><div class="my_cell">4%</div></td>
123
-          <td><div class="my_cell">5</div></td>
124
-          <td><div class="my_cell">4%</div></td>
125
-          <td><div class="my_cell">5</div></td>
126
-          <td><div class="my_cell">4%</div></td>
127
-          <td><div class="my_cell">5</div></td>
128
-          <td><div class="my_cell">4%</div></td>
129
-          <td><div class="my_cell">5</div></td>
130
-          <td><div class="my_cell">4%</div></td>
131
-          <td><div class="my_cell">4%</div></td>
132
-        </tr>
133
-      </tbody>
76
+      <tbody class="classTbody"></tbody>
134 77
     </table>
135 78
   </div>
136 79
   <script src="../../js/scoreAnalysis/section_2_class_all.js"></script>

Carregando…
Cancelar
Salvar