Browse Source

分数等级对比

gzb
wangzhonglu 1 year ago
parent
commit
cbbdd03486
2 changed files with 60 additions and 5 deletions
  1. 55
    0
      js/scoreAnalysis/section_2_level.js
  2. 5
    5
      js/section_2.js

+ 55
- 0
js/scoreAnalysis/section_2_level.js View File

164
     $(".section_2_level .goodTableHeadTr1").html(goodTableHeadTr1Html);
164
     $(".section_2_level .goodTableHeadTr1").html(goodTableHeadTr1Html);
165
     $(".section_2_level .goodTableHeadTr2").html(goodTableHeadTr2Html);
165
     $(".section_2_level .goodTableHeadTr2").html(goodTableHeadTr2Html);
166
     $(".section_2_level .goodTableTbody").html(goodTableTbodyHtml);
166
     $(".section_2_level .goodTableTbody").html(goodTableTbodyHtml);
167
+    var totalObj = {};
168
+    var maxObj = {};
169
+    var minObj = {};
170
+    var classObj = {};
171
+    $.each(list, function(index, listItem) {
172
+      if (!totalObj[listItem.rankname]) {
173
+        totalObj[listItem.rankname] = {};
174
+      }
175
+      if (!maxObj[listItem.rankname]) {
176
+        maxObj[listItem.rankname] = {};
177
+      }
178
+      if (!minObj[listItem.rankname]) {
179
+        minObj[listItem.rankname] = {};
180
+      }
181
+      // if (listItem.classid === 0) {
182
+      //   type[listItem.rankname].totalnum = listItem.stunum;
183
+      //   type[listItem.rankname].totalrate = listItem.sturate;
184
+      // } else {
185
+      //   if (type[listItem.rankname].max.stunum < listItem.stunum) {
186
+      //     type[listItem.rankname].max.stunum = listItem.stunum;
187
+      //     type[listItem.rankname].max.classname = listItem.classname;
188
+      //   }
189
+      //   if (type[listItem.rankname].min.stunum > listItem.stunum) {
190
+      //     type[listItem.rankname].min.stunum = listItem.stunum;
191
+      //     type[listItem.rankname].min.classname = listItem.classname;
192
+      //   }
193
+      // }
194
+    });
195
+    console.log(type);
196
+    /* 
197
+      {A: {
198
+        totalnum: 0,
199
+        totalrate: 20,
200
+        max: {
201
+          num: 0,
202
+          classname: ""
203
+        },
204
+        min: {
205
+          num: 0,
206
+          classname: ""
207
+        }
208
+      }}
209
+      {
210
+        "sturate": 0,
211
+        "rankrange": "[280.5,330]",
212
+        "classid": 0,
213
+        "stunum": 0,
214
+        "classname": "全部班级",
215
+        "ranktype": 1,
216
+        "rsturate": 100,
217
+        "rankname": "A",
218
+        "stujson": "",
219
+        "subjectid": "zf"
220
+      },
221
+    */
167
   }
222
   }
168
   var parameter = $(".section_2_html_root .section_2_level_html_root").data("page-params");
223
   var parameter = $(".section_2_html_root .section_2_level_html_root").data("page-params");
169
   parameter = JSON.parse(parameter);
224
   parameter = JSON.parse(parameter);

+ 5
- 5
js/section_2.js View File

2
   var parameter = $(".section_2_html_root").data("page-params");
2
   var parameter = $(".section_2_html_root").data("page-params");
3
   parameter = JSON.parse(parameter);
3
   parameter = JSON.parse(parameter);
4
   var sectionsHtmlArr = [
4
   var sectionsHtmlArr = [
5
-    "section_2_class_all", //全科成绩对比
6
-    "section_2_class_single", //单科成绩对比
5
+    // "section_2_class_all", //全科成绩对比
6
+    // "section_2_class_single", //单科成绩对比
7
     "section_2_level", //分数等级
7
     "section_2_level", //分数等级
8
-    "section_2_part",
9
-    "section_2_lin",
10
-    "section_2_excellent"
8
+    // "section_2_part",
9
+    // "section_2_lin",
10
+    // "section_2_excellent"
11
   ];
11
   ];
12
   $(".section_2.score_analysis_root").html(sectionsHtmlArr.map(function (htmlName) {
12
   $(".section_2.score_analysis_root").html(sectionsHtmlArr.map(function (htmlName) {
13
     return "<div class='" + htmlName + "_html_root'></div>";
13
     return "<div class='" + htmlName + "_html_root'></div>";

Loading…
Cancel
Save