浏览代码

Merge remote-tracking branch 'origin/gzb' into wzl

wzl_h
wangzhonglu 2 年前
父节点
当前提交
fcecf633fa
共有 3 个文件被更改,包括 550 次插入11 次删除
  1. 0
    3
      css/section_1.css
  2. 438
    1
      js/section_1.js
  3. 112
    7
      sections/section_1.html

+ 0
- 3
css/section_1.css 查看文件

@@ -12,9 +12,6 @@
12 12
   padding-top: 4mm;
13 13
   box-sizing: border-box;
14 14
 }
15
-.section_item:nth-last-child(1){
16
-  margin-right: 0;
17
-}
18 15
 .section1 .item_num{
19 16
   height: 5mm;
20 17
   font-size: 3mm;

+ 438
- 1
js/section_1.js 查看文件

@@ -1,5 +1,442 @@
1
-$(function() {
1
+function initaveragescoreEcharts() {
2
+  var itemStyle = {
3
+    normal: {
4
+      label: {
5
+        show: true, //开启显示数值
6
+        position: "top" //数值在上方显示
7
+      }
8
+    }
9
+  };
10
+  var xAxis_data = ["一般", "二班"]
11
+  var curlegend = ["满分", "最高分", "最低分", "平均分"];
12
+  var curseries = [{
13
+      name: "满分",
14
+      type: "bar",
15
+      barWidth: 32,
16
+      barMinHeight: 16,
17
+      barGap: 0,
18
+      data: [60, 70],
19
+      itemStyle
20
+    },
21
+    {
22
+      name: "最高分",
23
+      type: "bar",
24
+      barWidth: 32,
25
+      barMinHeight: 16,
26
+      barGap: 0,
27
+      data: [50, 60],
28
+      itemStyle
29
+    },
30
+    {
31
+      name: "最低分",
32
+      type: "bar",
33
+      barWidth: 32,
34
+      barMinHeight: 16,
35
+      barGap: 0,
36
+      data: [30, 40],
37
+      itemStyle
38
+    },
39
+    {
40
+      name: "平均分",
41
+      type: "bar",
42
+      barWidth: 32,
43
+      barMinHeight: 16,
44
+      barGap: 0,
45
+      data: [40, 50],
46
+      itemStyle
47
+    }
48
+  ];
49
+  let option = {
50
+    color: ["#5C99FF", "#FF5F56", "#5EC5C8", "#f1982b"],
51
+    title: {
52
+      text: "分",
53
+      x: "left",
54
+      y: "top",
55
+      textStyle: {
56
+        color: "#5F6E82",
57
+        fontSize: 12,
58
+        fontWeight: 500
59
+      }
60
+    },
61
+    legend: {
62
+      itemWidth: 6,
63
+      itemHeight: 6,
64
+      top: "bottom",
65
+      data: curlegend
66
+    },
67
+    grid: {
68
+      top: 30,
69
+      left: 5,
70
+      right: 0,
71
+      bottom: "10%",
72
+      containLabel: true
73
+    },
74
+    xAxis: [{
75
+      type: "category",
76
+      data: xAxis_data,
77
+      axisLabel: {
78
+        color: "#5F6E82" //更改坐标轴文字颜色
79
+      },
80
+      axisTick: {
81
+        alignWithLabel: true
82
+      },
83
+      boundaryGap: true,
84
+      triggerEvent: true,
85
+      axisLine: {
86
+        show: true, //是否显示轴线
87
+        lineStyle: {
88
+          color: "#DADADA" //刻度线的颜色
89
+        }
90
+      }
91
+    }],
92
+    yAxis: [{
93
+      type: "value",
94
+      axisTick: {
95
+        show: false //刻度
96
+      },
97
+      axisLine: {
98
+        show: false, //是否显示轴线
99
+        lineStyle: {
100
+          color: "#DADADA" //刻度线的颜色
101
+        }
102
+      },
103
+      splitLine: {
104
+        //网格线
105
+        lineStyle: {
106
+          type: "dotted" //设置网格线类型 dotted:虚线   solid:实线
107
+        },
108
+        show: true //隐藏或显示
109
+      },
110
+      axisLabel: {
111
+        color: "#5F6E82" //更改坐标轴文字颜色
112
+      }
113
+    }],
114
+    series: curseries
115
+  };
116
+  var myEcharts = echarts.init(document.querySelector(".section1 #averagescoreEcharts"));
117
+  myEcharts.clear();
118
+  myEcharts.setOption(option);
119
+}
120
+
121
+function initexcellencerateEcharts() {
122
+  var itemStyle = {
123
+    normal: {
124
+      label: {
125
+        show: true, //开启显示数值
126
+        position: "top" //数值在上方显示
127
+      }
128
+    }
129
+  };
130
+  var xAxis_data = ["一般", "二班"]
131
+  var curlegend = ["优秀率", "良好率", "及格率", "低分率"];
132
+  var curseries = [{
133
+      name: "优秀率",
134
+      type: "bar",
135
+      barWidth: 32,
136
+      barMinHeight: 16,
137
+      barGap: 0,
138
+      data: [60, 70],
139
+      itemStyle
140
+    },
141
+    {
142
+      name: "良好率",
143
+      type: "bar",
144
+      barWidth: 32,
145
+      barMinHeight: 16,
146
+      barGap: 0,
147
+      data: [50, 60],
148
+      itemStyle
149
+    },
150
+    {
151
+      name: "及格率",
152
+      type: "bar",
153
+      barWidth: 32,
154
+      barMinHeight: 16,
155
+      barGap: 0,
156
+      data: [30, 40],
157
+      itemStyle
158
+    },
159
+    {
160
+      name: "低分率",
161
+      type: "bar",
162
+      barWidth: 32,
163
+      barMinHeight: 16,
164
+      barGap: 0,
165
+      data: [40, 50],
166
+      itemStyle
167
+    }
168
+  ];
169
+  let option = {
170
+    color: ["#5C99FF", "#FF5F56", "#5EC5C8", "#f1982b"],
171
+    title: {
172
+      text: "分",
173
+      x: "left",
174
+      y: "top",
175
+      textStyle: {
176
+        color: "#5F6E82",
177
+        fontSize: 12,
178
+        fontWeight: 500
179
+      }
180
+    },
181
+    legend: {
182
+      itemWidth: 6,
183
+      itemHeight: 6,
184
+      top: "bottom",
185
+      data: curlegend
186
+    },
187
+    grid: {
188
+      top: 30,
189
+      left: 5,
190
+      right: 0,
191
+      bottom: "10%",
192
+      containLabel: true
193
+    },
194
+    xAxis: [{
195
+      type: "category",
196
+      data: xAxis_data,
197
+      axisLabel: {
198
+        color: "#5F6E82" //更改坐标轴文字颜色
199
+      },
200
+      axisTick: {
201
+        alignWithLabel: true
202
+      },
203
+      boundaryGap: true,
204
+      triggerEvent: true,
205
+      axisLine: {
206
+        show: true, //是否显示轴线
207
+        lineStyle: {
208
+          color: "#DADADA" //刻度线的颜色
209
+        }
210
+      }
211
+    }],
212
+    yAxis: [{
213
+      type: "value",
214
+      axisTick: {
215
+        show: false //刻度
216
+      },
217
+      axisLine: {
218
+        show: false, //是否显示轴线
219
+        lineStyle: {
220
+          color: "#DADADA" //刻度线的颜色
221
+        }
222
+      },
223
+      splitLine: {
224
+        //网格线
225
+        lineStyle: {
226
+          type: "dotted" //设置网格线类型 dotted:虚线   solid:实线
227
+        },
228
+        show: true //隐藏或显示
229
+      },
230
+      axisLabel: {
231
+        color: "#5F6E82" //更改坐标轴文字颜色
232
+      }
233
+    }],
234
+    series: curseries
235
+  };
236
+  var myEcharts = echarts.init(document.querySelector(".section1 #excellencerateEcharts"));
237
+  myEcharts.clear();
238
+  myEcharts.setOption(option);
239
+}
240
+
241
+function initexamnumEcharts() {
242
+  var itemStyle = {
243
+    normal: {
244
+      label: {
245
+        show: true, //开启显示数值
246
+        position: "top" //数值在上方显示
247
+      }
248
+    }
249
+  };
250
+  var xAxis_data = ["一般", "二班"]
251
+  var curlegend = ["实考人数", "缺考人数"];
252
+  var curseries = [{
253
+      name: "实考人数",
254
+      type: "bar",
255
+      barWidth: 32,
256
+      barMinHeight: 16,
257
+      barGap: 0,
258
+      data: [60, 70],
259
+      itemStyle
260
+    },
261
+    {
262
+      name: "缺考人数",
263
+      type: "bar",
264
+      barWidth: 32,
265
+      barMinHeight: 16,
266
+      barGap: 0,
267
+      data: [50, 60],
268
+      itemStyle
269
+    }
270
+  ];
271
+  let option = {
272
+    color: ["#5C99FF", "#FF5F56", "#5EC5C8", "#f1982b"],
273
+    title: {
274
+      text: "分",
275
+      x: "left",
276
+      y: "top",
277
+      textStyle: {
278
+        color: "#5F6E82",
279
+        fontSize: 12,
280
+        fontWeight: 500
281
+      }
282
+    },
283
+    legend: {
284
+      itemWidth: 6,
285
+      itemHeight: 6,
286
+      top: "bottom",
287
+      data: curlegend
288
+    },
289
+    grid: {
290
+      top: 30,
291
+      left: 5,
292
+      right: 0,
293
+      bottom: "10%",
294
+      containLabel: true
295
+    },
296
+    xAxis: [{
297
+      type: "category",
298
+      data: xAxis_data,
299
+      axisLabel: {
300
+        color: "#5F6E82" //更改坐标轴文字颜色
301
+      },
302
+      axisTick: {
303
+        alignWithLabel: true
304
+      },
305
+      boundaryGap: true,
306
+      triggerEvent: true,
307
+      axisLine: {
308
+        show: true, //是否显示轴线
309
+        lineStyle: {
310
+          color: "#DADADA" //刻度线的颜色
311
+        }
312
+      }
313
+    }],
314
+    yAxis: [{
315
+      type: "value",
316
+      axisTick: {
317
+        show: false //刻度
318
+      },
319
+      axisLine: {
320
+        show: false, //是否显示轴线
321
+        lineStyle: {
322
+          color: "#DADADA" //刻度线的颜色
323
+        }
324
+      },
325
+      splitLine: {
326
+        //网格线
327
+        lineStyle: {
328
+          type: "dotted" //设置网格线类型 dotted:虚线   solid:实线
329
+        },
330
+        show: true //隐藏或显示
331
+      },
332
+      axisLabel: {
333
+        color: "#5F6E82" //更改坐标轴文字颜色
334
+      }
335
+    }],
336
+    series: curseries
337
+  };
338
+  var myEcharts = echarts.init(document.querySelector(".section1 #examnumEcharts"));
339
+  myEcharts.clear();
340
+  myEcharts.setOption(option);
341
+}
342
+
343
+function initbzcEcharts() {
344
+  var itemStyle = {
345
+    normal: {
346
+      label: {
347
+        show: true, //开启显示数值
348
+        position: "top" //数值在上方显示
349
+      }
350
+    }
351
+  };
352
+  var xAxis_data = ["一般", "二班"]
353
+  var curlegend = ["标准差"];
354
+  var curseries = [{
355
+    name: "标准差",
356
+    type: "bar",
357
+    barWidth: 32,
358
+    barMinHeight: 16,
359
+    barGap: 0,
360
+    data: [60, 70],
361
+    itemStyle
362
+  }];
363
+  let option = {
364
+    color: ["#5C99FF", "#FF5F56", "#5EC5C8", "#f1982b"],
365
+    title: {
366
+      text: "分",
367
+      x: "left",
368
+      y: "top",
369
+      textStyle: {
370
+        color: "#5F6E82",
371
+        fontSize: 12,
372
+        fontWeight: 500
373
+      }
374
+    },
375
+    legend: {
376
+      itemWidth: 6,
377
+      itemHeight: 6,
378
+      top: "bottom",
379
+      data: curlegend
380
+    },
381
+    grid: {
382
+      top: 30,
383
+      left: 5,
384
+      right: 0,
385
+      bottom: "10%",
386
+      containLabel: true
387
+    },
388
+    xAxis: [{
389
+      type: "category",
390
+      data: xAxis_data,
391
+      axisLabel: {
392
+        color: "#5F6E82" //更改坐标轴文字颜色
393
+      },
394
+      axisTick: {
395
+        alignWithLabel: true
396
+      },
397
+      boundaryGap: true,
398
+      triggerEvent: true,
399
+      axisLine: {
400
+        show: true, //是否显示轴线
401
+        lineStyle: {
402
+          color: "#DADADA" //刻度线的颜色
403
+        }
404
+      }
405
+    }],
406
+    yAxis: [{
407
+      type: "value",
408
+      axisTick: {
409
+        show: false //刻度
410
+      },
411
+      axisLine: {
412
+        show: false, //是否显示轴线
413
+        lineStyle: {
414
+          color: "#DADADA" //刻度线的颜色
415
+        }
416
+      },
417
+      splitLine: {
418
+        //网格线
419
+        lineStyle: {
420
+          type: "dotted" //设置网格线类型 dotted:虚线   solid:实线
421
+        },
422
+        show: true //隐藏或显示
423
+      },
424
+      axisLabel: {
425
+        color: "#5F6E82" //更改坐标轴文字颜色
426
+      }
427
+    }],
428
+    series: curseries
429
+  };
430
+  var myEcharts = echarts.init(document.querySelector(".section1 #bzcEcharts"));
431
+  myEcharts.clear();
432
+  myEcharts.setOption(option);
433
+}
434
+$(function () {
2 435
   // outerHeight(true) 高度为 height+margin+padding+border
3 436
   var parameter = $(".section_1_html_root").data("page-params");
4 437
   console.log("section_1:parameter", parameter);
438
+  initaveragescoreEcharts();
439
+  initexcellencerateEcharts();
440
+  initexamnumEcharts();
441
+  initbzcEcharts();
5 442
 });

+ 112
- 7
sections/section_1.html 查看文件

@@ -48,7 +48,7 @@
48 48
           <div class="item_num"><span>512</span>分</div>
49 49
           <div class="item_title">平均分</div>
50 50
         </div>
51
-        <div class="section_item">
51
+        <div class="section_item" style="margin-right: 0">
52 52
           <div class="item_num"><span>456</span>分</div>
53 53
           <div class="item_title">最低分</div>
54 54
         </div>
@@ -57,7 +57,10 @@
57 57
       <h3 class="section_title_3">
58 58
         2.1 各科满分、最高分、最低分、平均分对比分析
59 59
       </h3>
60
-      <div id="subjectEcharts" style="margin: 0 4mm 4mm; height: 71mm"></div>
60
+      <div
61
+        id="averagescoreEcharts"
62
+        style="margin: 0 4mm 4mm; height: 80mm"
63
+      ></div>
61 64
       <div class="echarts_result">
62 65
         <div>上图统计结果表示:</div>
63 66
         <div class="echarts_result_content">
@@ -67,20 +70,122 @@
67 70
     </div>
68 71
     <div class="page_root section1">
69 72
       <h3 class="section_title_3">
70
-        2.1 各科优秀率、良好率、及格率、低分率对比分析
73
+        2.2 各科优秀率、良好率、及格率、低分率对比分析
71 74
       </h3>
72
-      <div id="subjectEcharts" style="margin: 0 4mm 4mm; height: 80mm"></div>
75
+      <div
76
+        id="excellencerateEcharts"
77
+        style="margin: 0 4mm 4mm; height: 80mm"
78
+      ></div>
73 79
       <div class="echarts_result">
74 80
         <div>上图统计结果表示:</div>
75 81
         <div class="echarts_result_content">
76
-          <span style="background-color: #ff5d41"></span>优秀率最高的科目:英语
82
+          <span style="background-color: #5c99ff"></span>优秀率最高的科目:英语
83
+        </div>
84
+        <div
85
+          class="echarts_result_content"
86
+          style="margin-top: 0; padding-top: 0"
87
+        >
88
+          <span style="background-color: #ff5f56"></span>优秀率最高的科目:英语
77 89
         </div>
90
+      </div>
91
+      <h3 class="section_title_3">2.3 各科实考人数、缺考人数分析</h3>
92
+      <div id="examnumEcharts" style="margin: 0 4mm 4mm; height: 80mm"></div>
93
+      <div class="echarts_result">
94
+        <div>上图统计结果表示:</div>
78 95
         <div class="echarts_result_content">
79
-          <span style="background-color: #ff5d41"></span>优秀率最高的科目:英语
96
+          <span style="background-color: #5c99ff"></span
97
+          >实考人数最多的科目:英语
98
+        </div>
99
+        <div
100
+          class="echarts_result_content"
101
+          style="margin-top: 0; padding-top: 0"
102
+        >
103
+          <span style="background-color: #ff5d41"></span
104
+          >缺考人数最多的科目:英语
80 105
         </div>
81 106
       </div>
82 107
     </div>
83
-    <div class="page_root section1"></div>
108
+    <div class="page_root section1">
109
+      <h3 class="section_title_3">2.4 各科标准差分析</h3>
110
+      <div id="bzcEcharts" style="margin: 0 4mm 4mm; height: 80mm"></div>
111
+      <h3 class="section_title_3">2.5 成绩整体分析</h3>
112
+      <table border="1" class="my_table">
113
+        <thead>
114
+          <tr>
115
+            <th>科目</th>
116
+            <th>实考人数</th>
117
+            <th>缺考人数</th>
118
+            <th>满分</th>
119
+            <th>最高分</th>
120
+            <th>最低分</th>
121
+            <th>平均分</th>
122
+            <th>优秀率</th>
123
+            <th>良好率</th>
124
+            <th>及格率</th>
125
+            <th>低分率</th>
126
+            <th>标准差</th>
127
+          </tr>
128
+        </thead>
129
+        <tbody>
130
+          <tr>
131
+            <td><div class="my_cell">语文</div></td>
132
+            <td><div class="my_cell">5</div></td>
133
+            <td><div class="my_cell">4%</div></td>
134
+            <td><div class="my_cell">5</div></td>
135
+            <td><div class="my_cell">4%</div></td>
136
+            <td><div class="my_cell">5</div></td>
137
+            <td><div class="my_cell">4%</div></td>
138
+            <td><div class="my_cell">5</div></td>
139
+            <td><div class="my_cell">4%</div></td>
140
+            <td><div class="my_cell">5</div></td>
141
+            <td><div class="my_cell">4%</div></td>
142
+            <td><div class="my_cell">4%</div></td>
143
+          </tr>
144
+          <tr>
145
+            <td><div class="my_cell">英语</div></td>
146
+            <td><div class="my_cell">5</div></td>
147
+            <td><div class="my_cell">4%</div></td>
148
+            <td><div class="my_cell">5</div></td>
149
+            <td><div class="my_cell">4%</div></td>
150
+            <td><div class="my_cell">5</div></td>
151
+            <td><div class="my_cell">4%</div></td>
152
+            <td><div class="my_cell">5</div></td>
153
+            <td><div class="my_cell">4%</div></td>
154
+            <td><div class="my_cell">5</div></td>
155
+            <td><div class="my_cell">4%</div></td>
156
+            <td><div class="my_cell">4%</div></td>
157
+          </tr>
158
+          <tr>
159
+            <td><div class="my_cell">数学</div></td>
160
+            <td><div class="my_cell">5</div></td>
161
+            <td><div class="my_cell">4%</div></td>
162
+            <td><div class="my_cell">5</div></td>
163
+            <td><div class="my_cell">4%</div></td>
164
+            <td><div class="my_cell">5</div></td>
165
+            <td><div class="my_cell">4%</div></td>
166
+            <td><div class="my_cell">5</div></td>
167
+            <td><div class="my_cell">4%</div></td>
168
+            <td><div class="my_cell">5</div></td>
169
+            <td><div class="my_cell">4%</div></td>
170
+            <td><div class="my_cell">4%</div></td>
171
+          </tr>
172
+          <tr>
173
+            <td><div class="my_cell">政治</div></td>
174
+            <td><div class="my_cell">5</div></td>
175
+            <td><div class="my_cell">4%</div></td>
176
+            <td><div class="my_cell">5</div></td>
177
+            <td><div class="my_cell">4%</div></td>
178
+            <td><div class="my_cell">5</div></td>
179
+            <td><div class="my_cell">4%</div></td>
180
+            <td><div class="my_cell">5</div></td>
181
+            <td><div class="my_cell">4%</div></td>
182
+            <td><div class="my_cell">5</div></td>
183
+            <td><div class="my_cell">4%</div></td>
184
+            <td><div class="my_cell">4%</div></td>
185
+          </tr>
186
+        </tbody>
187
+      </table>
188
+    </div>
84 189
     <script src="../js/section_1.js"></script>
85 190
   </body>
86 191
 </html>

正在加载...
取消
保存