|
@@ -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 = [15, 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,9 +535,149 @@ $(function () {
|
559
|
535
|
}
|
560
|
536
|
var parameter = $(".section_2_html_root .section_2_class_single_html_root").data("page-params");
|
561
|
537
|
parameter = JSON.parse(parameter);
|
562
|
|
- // console.log(".section_2_class_single_html_root:parameter", parameter);
|
563
|
|
- initClassScoreEcharts();
|
564
|
|
- initClassRateEcharts();
|
565
|
|
- initClassExamEcharts();
|
566
|
|
- initClassStdEcharts();
|
|
538
|
+ console.log("section_2_class_single:parameter", parameter);
|
|
539
|
+ var singleRootHtml = "";
|
|
540
|
+ for(var s_data_i = 0; s_data_i < parameter.length; s_data_i++) {
|
|
541
|
+ var s_index = s_data_i + 2;
|
|
542
|
+ singleRootHtml += '<div class="page_root section_2_class_single section_2_class_single_' + s_index + '"><h3 class="section_title_3">1.' + s_index + ' <span class="subjectname"></span>对比</h3><h4 class="section_title_4">1.' + s_index + '.1 各班满分、最高分、最低分、平均分对比分析</h4><div id="classScoreEcharts" style="margin: 0 4mm 4mm;height: 68mm;"></div><div class="echarts_result"><div>上图统计结果表示:</div><div class="echarts_result_content"><div><span class="dot bg_5699FF"></span>高于年级平均分的班级:<span class="gt_avg_classes"></span></div><div><span class="dot bg_FF5F56"></span>低于年级平均分的班级:<span class="lt_avg_classes"></span></div></div></div><h4 class="section_title_4">1.' + s_index + '.2 各班优秀率、良好率、及格率、低分率对比分析</h4><div id="classRateEcharts" style="margin: 0 4mm 4mm;height: 78mm;"></div><div class="echarts_result"><div>上图统计结果表示:</div><div class="echarts_result_content"><div><span class="dot bg_5699FF"></span>优秀率最高的班级:<span class="yx_max_class"></span></div><div><span class="dot bg_FF5F56"></span>良好率最高的班级:<span class="lh_max_class"></span></div><div><span class="dot bg_5EC5C8"></span>及格率最高的班级:<span class="jg_max_class"></span></div><div><span class="dot bg_F1982B"></span>低分率最高的班级:<span class="df_max_class"></span></div></div></div></div><div class="page_root section_2_class_single section_2_class_single_' + s_index + '"><h4 class="section_title_4">1.' + s_index + '.3 各班实考人数、缺考人数对比</h4><div id="classExamEcharts" style="margin: 0 4mm 4mm;height: 78mm;"></div><div class="echarts_result"><div>上图统计结果表示:</div><div class="echarts_result_content"><div><span class="dot bg_5699FF"></span>实考人数最多的班级:<span class="sk_max_class"></span></div><div><span class="dot bg_FF5F56"></span>缺考人数最多的班级:<span class="qk_max_class"></span></div></div></div><h4 class="section_title_4">1.' + s_index + '.4 各班标准差对比分析</h4><div id="classStdEcharts" style="margin: 0 4mm 4mm;height: 63mm;"></div></div><div class="page_root section_2_class_single section_2_class_single_' + s_index + '"><h4 class="section_title_4">1.' + s_index + '.5 班级<span class="subjectname"></span>整体分析</h4><table border="1" class="my_table"><thead><tr><th>班级</th><th class="w16mm">实考人数</th><th class="w16mm">缺考人数</th><th class="w10mm">满分</th><th class="w12mm">最高分</th><th class="w12mm">最低分</th><th class="w12mm">平均分</th><th class="w14mm">优秀率</th><th class="w14mm">良好率</th><th class="w14mm">及格率</th><th class="w14mm">低分率</th><th class="w12mm">标准差</th></tr></thead><tbody class="classTbody"></tbody></table></div>'
|
|
543
|
+ }
|
|
544
|
+ $(".section_2_class_single_root").html(singleRootHtml);
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+ return;
|
|
549
|
+ var subjectname = parameter.subjectname;
|
|
550
|
+ var class_arr = parameter.arr;
|
|
551
|
+ $(".section_2_class_single .subjectname").text(subjectname);
|
|
552
|
+ var classnameArr = [];
|
|
553
|
+ // 各班满分、最高分、最低分、平均分对比分析
|
|
554
|
+ var classScoreInfo = {
|
|
555
|
+ full: [],
|
|
556
|
+ max: [],
|
|
557
|
+ min: [],
|
|
558
|
+ avg: [],
|
|
559
|
+ gt_avg_classes: [],
|
|
560
|
+ lt_avg_classes: []
|
|
561
|
+ };
|
|
562
|
+ // 各班优秀率、良好率、及格率、低分率对比分析
|
|
563
|
+ var classRateInfo = {
|
|
564
|
+ yx: [],
|
|
565
|
+ lh: [],
|
|
566
|
+ jg: [],
|
|
567
|
+ df: [],
|
|
568
|
+ yx_max: {
|
|
569
|
+ rate: 0,
|
|
570
|
+ classname: ""
|
|
571
|
+ },
|
|
572
|
+ lh_max: {
|
|
573
|
+ rate: 0,
|
|
574
|
+ classname: ""
|
|
575
|
+ },
|
|
576
|
+ jg_max: {
|
|
577
|
+ rate: 0,
|
|
578
|
+ classname: ""
|
|
579
|
+ },
|
|
580
|
+ df_max: {
|
|
581
|
+ rate: 0,
|
|
582
|
+ classname: ""
|
|
583
|
+ }
|
|
584
|
+ };
|
|
585
|
+ // 各班实考人数、缺考人数对比
|
|
586
|
+ var classExamInfo = {
|
|
587
|
+ sk: [],
|
|
588
|
+ qk: [],
|
|
589
|
+ sk_max: {
|
|
590
|
+ num: 0,
|
|
591
|
+ classname: ""
|
|
592
|
+ },
|
|
593
|
+ qk_max: {
|
|
594
|
+ num: 0,
|
|
595
|
+ classname: ""
|
|
596
|
+ }
|
|
597
|
+ }
|
|
598
|
+ // 各班标准差对比分析
|
|
599
|
+ var classStd = [];
|
|
600
|
+ // 班级整体分析
|
|
601
|
+ var classTbodyHtml = "";
|
|
602
|
+ for (var i = 0; i < class_arr.length; i++) {
|
|
603
|
+ var c_item = class_arr[i];
|
|
604
|
+ classnameArr.push(c_item.classname);
|
|
605
|
+ // 各班满分、最高分、最低分、平均分对比分析
|
|
606
|
+ classScoreInfo.full.push(c_item.allscore);
|
|
607
|
+ classScoreInfo.max.push(c_item.classmaxscore);
|
|
608
|
+ classScoreInfo.min.push(c_item.classminscore);
|
|
609
|
+ classScoreInfo.avg.push(c_item.classavgscore);
|
|
610
|
+ if (c_item.schoolavgscore < c_item.classavgscore) {
|
|
611
|
+ classScoreInfo.gt_avg_classes.push(c_item.classname);
|
|
612
|
+ }
|
|
613
|
+ if (c_item.schoolavgscore > c_item.classavgscore) {
|
|
614
|
+ classScoreInfo.lt_avg_classes.push(c_item.classname);
|
|
615
|
+ }
|
|
616
|
+ // 各班优秀率、良好率、及格率、低分率对比分析
|
|
617
|
+ classRateInfo.yx.push(c_item.yxrate);
|
|
618
|
+ classRateInfo.lh.push(c_item.lhrate);
|
|
619
|
+ classRateInfo.jg.push(c_item.jgrate);
|
|
620
|
+ classRateInfo.df.push(c_item.dfrate);
|
|
621
|
+ if (classRateInfo.yx_max.rate < c_item.yxrate) {
|
|
622
|
+ classRateInfo.yx_max = {
|
|
623
|
+ rate: c_item.yxrate,
|
|
624
|
+ classname: c_item.classname
|
|
625
|
+ };
|
|
626
|
+ }
|
|
627
|
+ if (classRateInfo.lh_max.rate < c_item.lhrate) {
|
|
628
|
+ classRateInfo.lh_max = {
|
|
629
|
+ rate: c_item.lhrate,
|
|
630
|
+ classname: c_item.classname
|
|
631
|
+ };
|
|
632
|
+ }
|
|
633
|
+ if (classRateInfo.jg_max.rate < c_item.jgrate) {
|
|
634
|
+ classRateInfo.jg_max = {
|
|
635
|
+ rate: c_item.jgrate,
|
|
636
|
+ classname: c_item.classname
|
|
637
|
+ };
|
|
638
|
+ }
|
|
639
|
+ if (classRateInfo.df_max.rate < c_item.dfrate) {
|
|
640
|
+ classRateInfo.df_max = {
|
|
641
|
+ rate: c_item.dfrate,
|
|
642
|
+ classname: c_item.classname
|
|
643
|
+ };
|
|
644
|
+ }
|
|
645
|
+ // 各班实考人数、缺考人数对比
|
|
646
|
+ classExamInfo.sk.push(c_item.stunum);
|
|
647
|
+ classExamInfo.qk.push(c_item.missnum);
|
|
648
|
+ if (classExamInfo.sk_max.num < c_item.stunum) {
|
|
649
|
+ classExamInfo.sk_max = {
|
|
650
|
+ num: c_item.stunum,
|
|
651
|
+ classname: c_item.classname
|
|
652
|
+ };
|
|
653
|
+ }
|
|
654
|
+ if (classExamInfo.qk_max.num < c_item.missnum) {
|
|
655
|
+ classExamInfo.qk_max = {
|
|
656
|
+ num: c_item.missnum,
|
|
657
|
+ classname: c_item.classname
|
|
658
|
+ };
|
|
659
|
+ }
|
|
660
|
+ // 各班标准差对比分析
|
|
661
|
+ classStd.push(c_item.bzc);
|
|
662
|
+ // 班级整体分析
|
|
663
|
+ 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>';
|
|
664
|
+ }
|
|
665
|
+ // 各班满分、最高分、最低分、平均分对比分析
|
|
666
|
+ initClassScoreEcharts(classnameArr, classScoreInfo);
|
|
667
|
+ $(".section_2_class_single .gt_avg_classes").text(classScoreInfo.gt_avg_classes.join("、"));
|
|
668
|
+ $(".section_2_class_single .lt_avg_classes").text(classScoreInfo.lt_avg_classes.join("、"));
|
|
669
|
+ // 各班优秀率、良好率、及格率、低分率对比分析
|
|
670
|
+ initClassRateEcharts(classnameArr, classRateInfo);
|
|
671
|
+ $(".section_2_class_single .yx_max_class").text(classRateInfo.yx_max.classname);
|
|
672
|
+ $(".section_2_class_single .lh_max_class").text(classRateInfo.lh_max.classname);
|
|
673
|
+ $(".section_2_class_single .jg_max_class").text(classRateInfo.jg_max.classname);
|
|
674
|
+ $(".section_2_class_single .df_max_class").text(classRateInfo.df_max.classname);
|
|
675
|
+ // 各班实考人数、缺考人数对比
|
|
676
|
+ initClassExamEcharts(classnameArr, classExamInfo);
|
|
677
|
+ $(".section_2_class_single .sk_max_class").text(classExamInfo.sk_max.classname);
|
|
678
|
+ $(".section_2_class_single .qk_max_class").text(classExamInfo.qk_max.classname);
|
|
679
|
+ // 各班标准差对比分析
|
|
680
|
+ initClassStdEcharts(classnameArr, classStd);
|
|
681
|
+ // 班级整体分析
|
|
682
|
+ $(".section_2_class_single .classTbody").html(classTbodyHtml);
|
567
|
683
|
});
|