Browse Source

兼容优化

wzl
wangzhonglu 1 year ago
parent
commit
a748345954

+ 14
- 11
css/common.css View File

@@ -17,14 +17,14 @@ h1,h2,h3,h4 {
17 17
 }
18 18
 .pdf_root {
19 19
   margin: 0 auto;
20
-  width: 210mm;
20
+  width: 194mm;
21 21
   background-color: #fff;
22 22
 }
23 23
 .page_root {
24 24
   position: relative;
25 25
   margin: 0 auto;
26
-  padding: 0 8mm;
27
-  width: 210mm;
26
+  /* padding: 0 8mm; */
27
+  width: 194mm;
28 28
   height: 277mm;
29 29
   box-sizing: border-box;
30 30
   background-color: #fff;
@@ -59,26 +59,28 @@ h1,h2,h3,h4 {
59 59
   border-radius: 5mm;
60 60
   color: #fff;
61 61
   background-color: #2D8CF0;
62
+  overflow: hidden;
62 63
 }
63 64
 .abstract_left {
64 65
   float: left;
65 66
   margin: 4mm 0;
66
-  width: 50mm;
67
-  height: calc(100% - 8mm);
67
+  width: 60mm;
68
+  height: 30mm;
68 69
   text-align: center;
69 70
   border-right: 0.5mm dashed #f5f5f5;
70 71
   box-sizing: border-box;
71 72
 }
72 73
 .abstract_left img {
74
+  display: block;
73 75
   margin: 0 auto;
74 76
   width: 38mm;
75 77
   height: 30mm;
76 78
 }
77 79
 .abstract_right {
78
-  float: left;
79
-  margin: 4mm 8mm;
80
-  width: calc(100% - 75mm);
81
-  height: calc(100% - 8mm);
80
+  float: right;
81
+  margin: 4mm 10mm;
82
+  width: 114mm;
83
+  height: 30mm;
82 84
   box-sizing: border-box;
83 85
 }
84 86
 .abstract_content {
@@ -114,10 +116,11 @@ h1,h2,h3,h4 {
114 116
 .my_table td {
115 117
   position: relative;
116 118
   padding: 0.5mm;
117
-  line-height: 6mm;
119
+  line-height: 5mm;
118 120
   text-align: center;
119 121
   vertical-align: middle;
120
-  white-space: nowrap;
122
+  white-space: pre-wrap;
123
+  word-break: break-all;
121 124
   border: 0.2mm solid #dcdee2;
122 125
 }
123 126
 .my_table .my_cell {

+ 2
- 0
js/index.js View File

@@ -40,6 +40,7 @@ $(function () {
40 40
   var _pdfBaseurl = "https://schoolapitest.xhkjedu.com/";
41 41
   // 47.1.1pdf报告
42 42
   var _sexam_ers_pdf = _pdfBaseurl + "sexam/ers/pdf";
43
+  window.status = "no_completed";
43 44
   $.ajax({
44 45
     type: "POST",
45 46
     url: _sexam_ers_pdf,
@@ -51,6 +52,7 @@ $(function () {
51 52
     success: function (data) {
52 53
       if (data.code === 0) {
53 54
         loadSectionHtml(data.obj);
55
+        window.status = "completed";
54 56
       } else {
55 57
         alert(data.msg);
56 58
       }

+ 4
- 4
js/scoreAnalysis/section_2_class_all.js View File

@@ -151,7 +151,7 @@ $(function () {
151 151
         }
152 152
       ],
153 153
     };
154
-    var myEcharts = echarts.init(document.querySelector(".section_2_class_all #classScoreEcharts"));
154
+    var myEcharts = echarts.init($(".section_2_class_all #classScoreEcharts")[0]);
155 155
     myEcharts.clear();
156 156
     myEcharts.setOption(option);
157 157
   }
@@ -307,7 +307,7 @@ $(function () {
307 307
         }
308 308
       ],
309 309
     };
310
-    var myEcharts = echarts.init(document.querySelector(".section_2_class_all #classRateEcharts"));
310
+    var myEcharts = echarts.init($(".section_2_class_all #classRateEcharts")[0]);
311 311
     myEcharts.clear();
312 312
     myEcharts.setOption(option);
313 313
   }
@@ -423,7 +423,7 @@ $(function () {
423 423
         }
424 424
       ],
425 425
     };
426
-    var myEcharts = echarts.init(document.querySelector(".section_2_class_all #classExamEcharts"));
426
+    var myEcharts = echarts.init($(".section_2_class_all #classExamEcharts")[0]);
427 427
     myEcharts.clear();
428 428
     myEcharts.setOption(option);
429 429
   }
@@ -508,7 +508,7 @@ $(function () {
508 508
         data: series_data,
509 509
       }]
510 510
     };
511
-    var myEcharts = echarts.init(document.querySelector(".section_2_class_all #classStdEcharts"));
511
+    var myEcharts = echarts.init($(".section_2_class_all #classStdEcharts")[0]);
512 512
     myEcharts.clear();
513 513
     myEcharts.setOption(option);
514 514
   }

+ 8
- 8
js/scoreAnalysis/section_2_class_single.js View File

@@ -157,9 +157,9 @@ $(function () {
157 157
       ],
158 158
     };
159 159
     var myEcharts = echarts.init(
160
-      document.querySelector(
160
+      $(
161 161
         ".section_2_class_single_" + s_index + " #classScoreEcharts"
162
-      )
162
+      )[0]
163 163
     );
164 164
     myEcharts.clear();
165 165
     myEcharts.setOption(option);
@@ -322,9 +322,9 @@ $(function () {
322 322
       ],
323 323
     };
324 324
     var myEcharts = echarts.init(
325
-      document.querySelector(
325
+      $(
326 326
         ".section_2_class_single_" + s_index + " #classRateEcharts"
327
-      )
327
+      )[0]
328 328
     );
329 329
     myEcharts.clear();
330 330
     myEcharts.setOption(option);
@@ -447,9 +447,9 @@ $(function () {
447 447
       ],
448 448
     };
449 449
     var myEcharts = echarts.init(
450
-      document.querySelector(
450
+      $(
451 451
         ".section_2_class_single_" + s_index + " #classExamEcharts"
452
-      )
452
+      )[0]
453 453
     );
454 454
     myEcharts.clear();
455 455
     myEcharts.setOption(option);
@@ -542,9 +542,9 @@ $(function () {
542 542
       ],
543 543
     };
544 544
     var myEcharts = echarts.init(
545
-      document.querySelector(
545
+      $(
546 546
         ".section_2_class_single_" + s_index + " #classStdEcharts"
547
-      )
547
+      )[0]
548 548
     );
549 549
     myEcharts.clear();
550 550
     myEcharts.setOption(option);

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

@@ -125,7 +125,7 @@ $(function () {
125 125
         }
126 126
       ]
127 127
     };
128
-    var myEcharts = echarts.init(document.querySelector(".section_2_excellent.section_2_excellent_" + s_index + " #classExcellenceEcharts"));
128
+    var myEcharts = echarts.init($(".section_2_excellent.section_2_excellent_" + s_index + " #classExcellenceEcharts")[0]);
129 129
     myEcharts.clear();
130 130
     myEcharts.setOption(option);
131 131
   }

+ 2
- 2
js/scoreAnalysis/section_2_level.js View File

@@ -134,9 +134,9 @@ $(function () {
134 134
       series: series_data
135 135
     };
136 136
     var myEcharts = echarts.init(
137
-      document.querySelector(
137
+      $(
138 138
         ".section_2_level.level_" + s_index + " #classLevelEcharts"
139
-      )
139
+      )[0]
140 140
     );
141 141
     myEcharts.clear();
142 142
     myEcharts.setOption(option);

+ 3
- 3
js/scoreAnalysis/section_2_lin.js View File

@@ -127,9 +127,9 @@ $(function () {
127 127
       ],
128 128
     };
129 129
     var myEcharts = echarts.init(
130
-      document.querySelector(
130
+      $(
131 131
         ".section_2_lin.section_2_lin_" + s_index + " #classCriticalRankEcharts"
132
-      )
132
+      )[0]
133 133
     );
134 134
     myEcharts.clear();
135 135
     myEcharts.setOption(option);
@@ -262,7 +262,7 @@ $(function () {
262 262
       ],
263 263
     };
264 264
     var myEcharts = echarts.init(
265
-      document.querySelector(".section_2_lin.section_2_lin_" + s_index + " #classCriticalScoreEcharts")
265
+      $(".section_2_lin.section_2_lin_" + s_index + " #classCriticalScoreEcharts")[0]
266 266
     );
267 267
     myEcharts.clear();
268 268
     myEcharts.setOption(option);

+ 3
- 3
js/scoreAnalysis/section_2_part.js View File

@@ -24,7 +24,7 @@ $(function () {
24 24
             verticalAlign: "bottom",
25 25
             position: "top",
26 26
             distance: 0,
27
-            formatter: `{c}`
27
+            formatter: "{c}"
28 28
           }
29 29
         },
30 30
         data: dataArr
@@ -98,7 +98,7 @@ $(function () {
98 98
       series: series_data
99 99
     };
100 100
     var myEcharts = echarts.init(
101
-      document.querySelector(".part_" + s_index + " #classPartEcharts")
101
+      $(".part_" + s_index + " #classPartEcharts")[0]
102 102
     );
103 103
     myEcharts.clear();
104 104
     myEcharts.setOption(option);
@@ -196,7 +196,7 @@ $(function () {
196 196
     "page-params"
197 197
   );
198 198
   parameter = JSON.parse(parameter);
199
-  console.log(parameter);
199
+  // console.log(parameter);
200 200
   var subjectInfo = [];
201 201
   for (var sid in parameter) {
202 202
     if (sid === "zf") {

+ 4
- 4
js/section_1.js View File

@@ -126,7 +126,7 @@ $(function () {
126 126
       }],
127 127
       series: curseries
128 128
     };
129
-    var myEcharts = echarts.init(document.querySelector(".section1 #averagescoreEcharts"));
129
+    var myEcharts = echarts.init($(".section1 #averagescoreEcharts")[0]);
130 130
     myEcharts.clear();
131 131
     myEcharts.setOption(option);
132 132
   }
@@ -259,7 +259,7 @@ $(function () {
259 259
       }],
260 260
       series: curseries
261 261
     };
262
-    var myEcharts = echarts.init(document.querySelector(".section1 #excellencerateEcharts"));
262
+    var myEcharts = echarts.init($(".section1 #excellencerateEcharts")[0]);
263 263
     myEcharts.clear();
264 264
     myEcharts.setOption(option);
265 265
   }
@@ -369,7 +369,7 @@ $(function () {
369 369
       }],
370 370
       series: curseries
371 371
     };
372
-    var myEcharts = echarts.init(document.querySelector(".section1 #examnumEcharts"));
372
+    var myEcharts = echarts.init($(".section1 #examnumEcharts")[0]);
373 373
     myEcharts.clear();
374 374
     myEcharts.setOption(option);
375 375
   }
@@ -467,7 +467,7 @@ $(function () {
467 467
       }],
468 468
       series: curseries
469 469
     };
470
-    var myEcharts = echarts.init(document.querySelector(".section1 #bzcEcharts"));
470
+    var myEcharts = echarts.init($(".section1 #bzcEcharts")[0]);
471 471
     myEcharts.clear();
472 472
     myEcharts.setOption(option);
473 473
   }

+ 1
- 1
js/section_2.js View File

@@ -39,7 +39,7 @@ $(function () {
39 39
       djfx_data[djfx_item.ranktype] = {};
40 40
     }
41 41
     if (djfx_item.ranktype === 5) {
42
-      djfx_item.ranks.forEach(rankItem => {
42
+      $.each(djfx_item.ranks, function(rankIndex, rankItem) {
43 43
         rankItem.stujson = JSON.parse(rankItem.stujson);
44 44
       });
45 45
     }

+ 1
- 1
js/section_3.js View File

@@ -93,7 +93,7 @@ $(function () {
93 93
         },
94 94
       ],
95 95
     };
96
-    var myEcharts = echarts.init(document.querySelector(".section_3 #subjectBadEcharts"));
96
+    var myEcharts = echarts.init($(".section_3 #subjectBadEcharts")[0]);
97 97
     myEcharts.clear();
98 98
     myEcharts.setOption(option);
99 99
   }

+ 1
- 1
js/section_4.js View File

@@ -93,7 +93,7 @@ $(function () {
93 93
         },
94 94
       ],
95 95
     };
96
-    var myEcharts = echarts.init(document.querySelector(".section_4 #subjectGoodEcharts"));
96
+    var myEcharts = echarts.init($(".section_4 #subjectGoodEcharts")[0]);
97 97
     myEcharts.clear();
98 98
     myEcharts.setOption(option);
99 99
   }

+ 1
- 1
js/section_5.js View File

@@ -93,7 +93,7 @@ $(function () {
93 93
         },
94 94
       ],
95 95
     };
96
-    var myEcharts = echarts.init(document.querySelector(".section_5 #subjectGoodEcharts"));
96
+    var myEcharts = echarts.init($(".section_5 #subjectGoodEcharts")[0]);
97 97
     myEcharts.clear();
98 98
     myEcharts.setOption(option);
99 99
   }

Loading…
Cancel
Save