Quellcode durchsuchen

临界生

wzl_h
wangzl vor 2 Jahren
Ursprung
Commit
a96c388177
3 geänderte Dateien mit 26 neuen und 16 gelöschten Zeilen
  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 Datei anzeigen

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

+ 1
- 1
js/scoreAnalysis/section_2_lin_all.js Datei anzeigen

@@ -251,7 +251,7 @@ $(function () {
251 251
   }
252 252
   var parameter = $(".section_2_html_root .section_2_lin_all_html_root").data("page-params");
253 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 255
   initClassCriticalRankEcharts();
256 256
   initClassCriticalScoreEcharts();
257 257
 });

+ 21
- 11
js/section_2.js Datei anzeigen

@@ -3,21 +3,21 @@ $(function() {
3 3
   parameter = JSON.parse(parameter);
4 4
   var sectionsHtmlArr = [
5 5
     // "section_2_class_all",
6
-    "section_2_class_single",
6
+    // "section_2_class_single",
7 7
     // "section_2_level",
8 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 11
     // "section_2_excellent_all"
12 12
   ];
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 16
   var cjfx = parameter.cjfx;
17
-  var djfx = parameter.djfx;
17
+  // 班级成绩分析
18 18
   var class_all_arr = [];
19 19
   var class_single_arr = [];
20
-  var _s_index = 2;
20
+  var cjfx_s_index = 2;
21 21
   for (var s_key in cjfx) {
22 22
     var s_item = cjfx[s_key];
23 23
     if (s_key === "总分") {
@@ -25,11 +25,21 @@ $(function() {
25 25
     } else {
26 26
       class_single_arr.push({
27 27
         subjectname: s_key,
28
-        s_index: _s_index,
28
+        s_index: cjfx_s_index,
29 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 44
   sectionsHtmlArr.forEach(function(htmlName) {
35 45
     if (htmlName === "section_2_class_all") {
@@ -51,13 +61,13 @@ $(function() {
51 61
       }));
52 62
     } else if (htmlName === "section_2_lin_all") {
53 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 67
     } else if (htmlName === "section_2_lin_single") {
58 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 72
     } else if (htmlName === "section_2_excellent_all") {
63 73
       $(".section_2.score_analysis_root ." + htmlName + "_html_root").data("page-params", JSON.stringify({

Laden…
Abbrechen
Speichern