Browse Source

优劣学科

gzb
guozhongbo 2 years ago
parent
commit
1766337563
1 changed files with 6 additions and 9 deletions
  1. 6
    9
      js/section_1.js

+ 6
- 9
js/section_1.js View File

983
   }
983
   }
984
 
984
 
985
   function initgoodbadSubjectEcharts(list) {
985
   function initgoodbadSubjectEcharts(list) {
986
-    console.log(list);
987
     var schoolrate = [],
986
     var schoolrate = [],
988
       classrate = [],
987
       classrate = [],
989
       legendlist = [ "全年级",list[0].classname];
988
       legendlist = [ "全年级",list[0].classname];
990
-    console.log(legendlist);
991
     $.each(list, function (idx, item) {
989
     $.each(list, function (idx, item) {
992
       if (item.subjectname != "全科") {
990
       if (item.subjectname != "全科") {
993
            classrate.push(
991
            classrate.push(
1085
   }
1083
   }
1086
 
1084
 
1087
   function showgoodbadtable (list, legendlist, schoolrate, classrate) {
1085
   function showgoodbadtable (list, legendlist, schoolrate, classrate) {
1088
-    var table = "", goodTableHeadTr1Html = '<th rowspan="2">班级</th>', goodTableHeadTr2Html = "", trHtml = "";
1086
+    var table = "", goodTableHeadTr1Html = '<th >班级</th>', goodTableHeadTr2Html = "", trHtml = "";
1089
     $.each(list, function (idx, item) {
1087
     $.each(list, function (idx, item) {
1090
       if (item.subjectname != "全科") { 
1088
       if (item.subjectname != "全科") { 
1091
-         goodTableHeadTr1Html += '<th colspan="2">' + item.subjectname + "</th>";
1089
+         goodTableHeadTr1Html += '<th>' + item.subjectname + "</th>";
1092
       }
1090
       }
1093
     })
1091
     })
1094
     $.each(legendlist, function (idx, item) {
1092
     $.each(legendlist, function (idx, item) {
1095
-      trHtml += '<tr><th colspan="2">' + item + "</th>";
1093
+      trHtml += '<tr><th>' + item + "</th>";
1096
       if (idx == 0) {
1094
       if (idx == 0) {
1097
         $.each(schoolrate, function (idx, item) {
1095
         $.each(schoolrate, function (idx, item) {
1098
-        trHtml += '<th colspan="2">' + item + "%</th>";
1096
+        trHtml += '<th>' + item + "%</th>";
1099
       })
1097
       })
1100
       } else {
1098
       } else {
1101
           $.each(classrate, function (idx, item) {
1099
           $.each(classrate, function (idx, item) {
1102
-        trHtml += '<th colspan="2">' + item + "%</th>";
1100
+        trHtml += '<th>' + item + "%</th>";
1103
       })
1101
       })
1104
       }
1102
       }
1105
        
1103
        
1108
         goodTableHeadTr1Html + '</tr></thead><tbody class="goodTableTbody">' +
1106
         goodTableHeadTr1Html + '</tr></thead><tbody class="goodTableTbody">' +
1109
       trHtml + '</tbody></table>'
1107
       trHtml + '</tbody></table>'
1110
     $(".section1 .goodbadtable").html(table); 
1108
     $(".section1 .goodbadtable").html(table); 
1111
-    console.log(table);
1112
   }
1109
   }
1113
   var parameter = JSON.parse($(".section_1_html_root").data("page-params"));
1110
   var parameter = JSON.parse($(".section_1_html_root").data("page-params"));
1114
   var xAxis_data = [],
1111
   var xAxis_data = [],
1261
   initscoreGradeEcharts(parameter.fsdjtj, xAxis_data);
1258
   initscoreGradeEcharts(parameter.fsdjtj, xAxis_data);
1262
   initclassscorePartEcharts(parameter.fsdtj);
1259
   initclassscorePartEcharts(parameter.fsdtj);
1263
   initgoodbadSubjectEcharts(parameter.xkcj);
1260
   initgoodbadSubjectEcharts(parameter.xkcj);
1264
-  document.documentElement.scrollTop = 6200;
1261
+  //  document.documentElement.scrollTop = 6200;
1265
 });
1262
 });

Loading…
Cancel
Save