Browse Source

临界生

wzl_h
wangzl 2 years ago
parent
commit
a96c388177
3 changed files with 26 additions and 16 deletions
  1. 4
    4
      js/index.js
  2. 1
    1
      js/scoreAnalysis/section_2_lin_all.js
  3. 21
    11
      js/section_2.js

+ 4
- 4
js/index.js View File

3
    
3
    
4
     var loadHtmlArr = [
4
     var loadHtmlArr = [
5
       // "cover",  //封面
5
       // "cover",  //封面
6
-      "preface",  //前言
7
-      "section_1",
6
+      // "preface",  //前言
7
+      // "section_1",
8
       "section_2",
8
       "section_2",
9
-      "section_3",
10
-      "section_4",
9
+      // "section_3",
10
+      // "section_4",
11
     ];
11
     ];
12
     $(".pdf_root").html(loadHtmlArr.map(function (htmlName) {
12
     $(".pdf_root").html(loadHtmlArr.map(function (htmlName) {
13
       return "<div class='" + htmlName + "_html_root'></div>";
13
       return "<div class='" + htmlName + "_html_root'></div>";

+ 1
- 1
js/scoreAnalysis/section_2_lin_all.js View File

251
   }
251
   }
252
   var parameter = $(".section_2_html_root .section_2_lin_all_html_root").data("page-params");
252
   var parameter = $(".section_2_html_root .section_2_lin_all_html_root").data("page-params");
253
   parameter = JSON.parse(parameter);
253
   parameter = JSON.parse(parameter);
254
-  // console.log(".section_2_lin_all_html_root:parameter", parameter);
254
+  console.log(".section_2_lin_all_html_root:parameter", parameter);
255
   initClassCriticalRankEcharts();
255
   initClassCriticalRankEcharts();
256
   initClassCriticalScoreEcharts();
256
   initClassCriticalScoreEcharts();
257
 });
257
 });

+ 21
- 11
js/section_2.js View File

3
   parameter = JSON.parse(parameter);
3
   parameter = JSON.parse(parameter);
4
   var sectionsHtmlArr = [
4
   var sectionsHtmlArr = [
5
     // "section_2_class_all",
5
     // "section_2_class_all",
6
-    "section_2_class_single",
6
+    // "section_2_class_single",
7
     // "section_2_level",
7
     // "section_2_level",
8
     // "section_2_part",
8
     // "section_2_part",
9
-    // "section_2_lin_all",
10
-    // "section_2_lin_single",
9
+    "section_2_lin_all",
10
+    "section_2_lin_single",
11
     // "section_2_excellent_all"
11
     // "section_2_excellent_all"
12
   ];
12
   ];
13
   $(".section_2.score_analysis_root").html(sectionsHtmlArr.map(function (htmlName) {
13
   $(".section_2.score_analysis_root").html(sectionsHtmlArr.map(function (htmlName) {
14
     return "<div class='" + htmlName + "_html_root'></div>";
14
     return "<div class='" + htmlName + "_html_root'></div>";
15
   }).join(""));
15
   }).join(""));
16
   var cjfx = parameter.cjfx;
16
   var cjfx = parameter.cjfx;
17
-  var djfx = parameter.djfx;
17
+  // 班级成绩分析
18
   var class_all_arr = [];
18
   var class_all_arr = [];
19
   var class_single_arr = [];
19
   var class_single_arr = [];
20
-  var _s_index = 2;
20
+  var cjfx_s_index = 2;
21
   for (var s_key in cjfx) {
21
   for (var s_key in cjfx) {
22
     var s_item = cjfx[s_key];
22
     var s_item = cjfx[s_key];
23
     if (s_key === "总分") {
23
     if (s_key === "总分") {
25
     } else {
25
     } else {
26
       class_single_arr.push({
26
       class_single_arr.push({
27
         subjectname: s_key,
27
         subjectname: s_key,
28
-        s_index: _s_index,
28
+        s_index: cjfx_s_index,
29
         arr: s_item
29
         arr: s_item
30
       });
30
       });
31
-      _s_index += 1;
31
+      cjfx_s_index += 1;
32
+    }
33
+  }
34
+  // ranktype 类型1等级2分数段3临界分4临界名次5优困生
35
+  var djfx = parameter.djfx;
36
+  var djfx_data = {};
37
+  for(var djfx_s_index = 0; djfx_s_index < djfx.length; djfx_s_index++) {
38
+    var djfx_item = djfx[djfx_s_index];
39
+    if (!djfx_data[djfx_item.ranktype]) {
40
+      djfx_data[djfx_item.ranktype] = {};
32
     }
41
     }
42
+    djfx_data[djfx_item.ranktype][djfx_item.subjectid] = djfx_item;
33
   }
43
   }
34
   sectionsHtmlArr.forEach(function(htmlName) {
44
   sectionsHtmlArr.forEach(function(htmlName) {
35
     if (htmlName === "section_2_class_all") {
45
     if (htmlName === "section_2_class_all") {
51
       }));
61
       }));
52
     } else if (htmlName === "section_2_lin_all") {
62
     } else if (htmlName === "section_2_lin_all") {
53
       $(".section_2.score_analysis_root ." + htmlName + "_html_root").data("page-params", JSON.stringify({
63
       $(".section_2.score_analysis_root ." + htmlName + "_html_root").data("page-params", JSON.stringify({
54
-        cjfx: parameter.cjfx,
55
-        djfx: parameter.djfx
64
+        3: djfx_data[3],
65
+        4: djfx_data[4]
56
       }));
66
       }));
57
     } else if (htmlName === "section_2_lin_single") {
67
     } else if (htmlName === "section_2_lin_single") {
58
       $(".section_2.score_analysis_root ." + htmlName + "_html_root").data("page-params", JSON.stringify({
68
       $(".section_2.score_analysis_root ." + htmlName + "_html_root").data("page-params", JSON.stringify({
59
-        cjfx: parameter.cjfx,
60
-        djfx: parameter.djfx
69
+        3: djfx_data[3],
70
+        4: djfx_data[4]
61
       }));
71
       }));
62
     } else if (htmlName === "section_2_excellent_all") {
72
     } else if (htmlName === "section_2_excellent_all") {
63
       $(".section_2.score_analysis_root ." + htmlName + "_html_root").data("page-params", JSON.stringify({
73
       $(".section_2.score_analysis_root ." + htmlName + "_html_root").data("page-params", JSON.stringify({

Loading…
Cancel
Save