Browse Source

第二部分

wzl_h
wangzl 2 years ago
parent
commit
692aeda0b6

+ 3
- 0
index.html View File

@@ -10,7 +10,10 @@
10 10
 <body class="root_body">
11 11
   <div class="pdf_root"></div>
12 12
   <script>
13
+    // 请求接口前缀
13 14
     var _pdfBaseurl = "https://schoolapitest.xhkjedu.com/";
15
+    // 47.1.1pdf报告
16
+    var _sexam_ers_pdf = _pdfBaseurl + "sexam/ers/pdf";
14 17
   </script>
15 18
   <script src="./librarys/jquery@3.6.1/jquery.js"></script>
16 19
   <script src="./librarys/echarts@4.8.0/echarts.min.js"></script>

+ 4
- 4
js/index.js View File

@@ -4,9 +4,9 @@ $(function () {
4 4
       // "cover",
5 5
       // "preface",
6 6
       // "section_1",
7
-      // "section_2",
8
-      "section_3",
9
-      "section_4",
7
+      "section_2",
8
+      // "section_3",
9
+      // "section_4",
10 10
     ];
11 11
     $(".pdf_root").html(loadHtmlArr.map(function (htmlName) {
12 12
       return "<div class='" + htmlName + "_html_root'></div>";
@@ -32,7 +32,7 @@ $(function () {
32 32
   }
33 33
   $.ajax({
34 34
     type: "POST",
35
-    url: _pdfBaseurl + "sexam/ers/pdf",
35
+    url: _sexam_ers_pdf,
36 36
     data: JSON.stringify({
37 37
       examid: 2
38 38
     }),

+ 9
- 0
js/scoreAnalysis/section_2_class_all.js View File

@@ -557,6 +557,15 @@ $(function () {
557 557
     myEcharts.clear();
558 558
     myEcharts.setOption(option);
559 559
   }
560
+  var parameter = $(".section_2_html_root .section_2_class_all_html_root").data("page-params");
561
+  parameter = JSON.parse(parameter);
562
+  var cjfx = parameter.cjfx;
563
+  // var djfx = parameter.djfx;
564
+  
565
+
566
+
567
+  console.log(".section_2_class_all_html_root:parameter", parameter);
568
+
560 569
   initClassScoreEcharts();
561 570
   initClassRateEcharts();
562 571
   initClassExamEcharts();

+ 3
- 0
js/scoreAnalysis/section_2_class_single.js View File

@@ -557,6 +557,9 @@ $(function () {
557 557
     myEcharts.clear();
558 558
     myEcharts.setOption(option);
559 559
   }
560
+  var parameter = $(".section_2_html_root .section_2_class_single_html_root").data("page-params");
561
+  parameter = JSON.parse(parameter);
562
+  // console.log(".section_2_class_single_html_root:parameter", parameter);
560 563
   initClassScoreEcharts();
561 564
   initClassRateEcharts();
562 565
   initClassExamEcharts();

+ 3
- 0
js/scoreAnalysis/section_2_excellent_all.js View File

@@ -124,5 +124,8 @@ $(function () {
124 124
     myEcharts.clear();
125 125
     myEcharts.setOption(option);
126 126
   }
127
+  var parameter = $(".section_2_html_root .section_2_excellent_all_html_root").data("page-params");
128
+  parameter = JSON.parse(parameter);
129
+  // console.log(".section_2_excellent_all_html_root:parameter", parameter);
127 130
   initClassExcellenceEcharts();
128 131
 });

+ 3
- 0
js/scoreAnalysis/section_2_lin_all.js View File

@@ -249,6 +249,9 @@ $(function () {
249 249
     myEcharts.clear();
250 250
     myEcharts.setOption(option);
251 251
   }
252
+  var parameter = $(".section_2_html_root .section_2_lin_all_html_root").data("page-params");
253
+  parameter = JSON.parse(parameter);
254
+  // console.log(".section_2_lin_all_html_root:parameter", parameter);
252 255
   initClassCriticalRankEcharts();
253 256
   initClassCriticalScoreEcharts();
254 257
 });

+ 3
- 0
js/scoreAnalysis/section_2_lin_single.js View File

@@ -249,6 +249,9 @@ $(function () {
249 249
       myEcharts.clear();
250 250
       myEcharts.setOption(option);
251 251
     }
252
+    var parameter = $(".section_2_html_root .section_2_lin_single_html_root").data("page-params");
253
+    parameter = JSON.parse(parameter);
254
+    // console.log(".section_2_lin_single_html_root:parameter", parameter);
252 255
     initClassCriticalRankEcharts();
253 256
     initClassCriticalScoreEcharts();
254 257
   });

+ 13
- 24
js/section_2.js View File

@@ -1,34 +1,23 @@
1 1
 $(function() {
2
-  // outerHeight(true) 高度为 height+margin+padding+border
3 2
   var parameter = $(".section_2_html_root").data("page-params");
4
-  console.log("section_2:parameter", JSON.parse(parameter));
5
-
3
+  parameter = JSON.parse(parameter);
6 4
   var sectionsHtmlArr = [
7 5
     "section_2_class_all",
8
-    "section_2_class_single",
9
-    "section_2_level",
10
-    "section_2_part",
11
-    "section_2_lin_all",
12
-    "section_2_lin_single",
13
-    "section_2_excellent_all"
6
+    // "section_2_class_single",
7
+    // "section_2_level",
8
+    // "section_2_part",
9
+    // "section_2_lin_all",
10
+    // "section_2_lin_single",
11
+    // "section_2_excellent_all"
14 12
   ];
15
-  $(".score_analysis_root").html(sectionsHtmlArr.map(function (htmlName) {
13
+  $(".section_2.score_analysis_root").html(sectionsHtmlArr.map(function (htmlName) {
16 14
     return "<div class='" + htmlName + "_html_root'></div>";
17 15
   }).join(""));
18 16
   sectionsHtmlArr.forEach(function(htmlName) {
19
-    if (htmlName === "preface") {
20
-      $("." + htmlName + "_html_root").data("page-params", JSON.stringify({
21
-        htmlName: htmlName,
22
-        subjectname: "语文",
23
-        num: 12
24
-      }));
25
-    } else if (htmlName === "section_1") {
26
-      $("." + htmlName + "_html_root").data("page-params", JSON.stringify({
27
-        htmlName: htmlName,
28
-        subjectname: "数学",
29
-        num: 33
30
-      }));
31
-    }
32
-    $("." + htmlName + "_html_root").load("./sections/scoreAnalysis/" + htmlName + ".html");
17
+    $(".section_2.score_analysis_root ." + htmlName + "_html_root").data("page-params", JSON.stringify({
18
+      cjfx: parameter.cjfx,
19
+      djfx: parameter.djfx
20
+    }));
21
+    $(".section_2.score_analysis_root ." + htmlName + "_html_root").load("./sections/scoreAnalysis/" + htmlName + ".html");
33 22
   });
34 23
 });

+ 1
- 1
sections/section_2.html View File

@@ -7,7 +7,7 @@
7 7
   <title>校本PDF报告-第二章 成绩分析</title>
8 8
 </head>
9 9
 <body>
10
-  <div class="score_analysis_root"></div>
10
+  <div class="section_2 score_analysis_root"></div>
11 11
   <script src="../js/section_2.js"></script>
12 12
 </body>
13 13
 </html>

Loading…
Cancel
Save