Browse Source

优秀生、学困生对比

wzl_h
wangzl 2 years ago
parent
commit
d5bfa51954

+ 0
- 0
css/scoreAnalysis/section_2_excellent.css View File


+ 13
- 0
css/scoreAnalysis/section_2_excellent_all.css View File

@@ -0,0 +1,13 @@
1
+.section_2_excellent_all .echarts_result_content {
2
+    margin-top: 3mm;
3
+    padding: 2mm 3mm;
4
+    line-height: 7mm;
5
+    background-color: #fff;
6
+}
7
+.section_2_excellent_all .echarts_result_content .dot {
8
+    display: inline-block;
9
+    margin-right: 2mm;
10
+    width: 2mm;
11
+    height: 2mm;
12
+    border-radius: 50%;
13
+}

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


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

@@ -0,0 +1,128 @@
1
+$(function () {
2
+  // 优秀生、学困生统计
3
+  function initClassExcellenceEcharts() {
4
+    let legend_data = ["优秀生", "学困生"];
5
+    let xAxis_data = ["全部班级", "九年级一班", "九年级二班"];
6
+    let series_data1 = [10, 6, 4];
7
+    let series_data2 = [-11, -11, -11];
8
+    let option = {
9
+      title: {
10
+        text: "人",
11
+        x: "left",
12
+        y: "top",
13
+        textStyle: {
14
+          color: "#5F6E82",
15
+          fontSize: 12,
16
+          fontWeight: 500
17
+        }
18
+      },
19
+      color: ["#5C99FF", "#F39A2C"],
20
+      legend: {
21
+        itemWidth: 6,
22
+        itemHeight: 6,
23
+        bottom: 30,
24
+        data: legend_data
25
+      },
26
+      grid: {
27
+        top: 30,
28
+        left: 5,
29
+        right: 0,
30
+        bottom: 65,
31
+        containLabel: true
32
+      },
33
+      xAxis: [
34
+        {
35
+          type: "category",
36
+          offset: 10,
37
+          position: "bottom",
38
+          data: xAxis_data,
39
+          axisLabel: {
40
+            color: "#5F6E82" //更改坐标轴文字颜色
41
+          },
42
+          axisTick: {
43
+            alignWithLabel: true
44
+          },
45
+          boundaryGap: true,
46
+          triggerEvent: true,
47
+          axisLine: {
48
+            show: true, //是否显示轴线
49
+            lineStyle: {
50
+              color: "#DADADA" //刻度线的颜色
51
+            }
52
+          }
53
+        }
54
+      ],
55
+      yAxis: [
56
+        {
57
+          type: "value",
58
+          axisTick: {
59
+            show: false //刻度
60
+          },
61
+          axisLine: {
62
+            show: false, //是否显示轴线
63
+            lineStyle: {
64
+              color: "#DADADA" //刻度线的颜色
65
+            }
66
+          },
67
+          splitLine: {
68
+            //网格线
69
+            lineStyle: {
70
+              type: "dotted" //设置网格线类型 dotted:虚线   solid:实线
71
+            },
72
+            show: true //隐藏或显示
73
+          },
74
+          axisLabel: {
75
+            color: "#5F6E82" //更改坐标轴文字颜色
76
+          }
77
+        }
78
+      ],
79
+      series: [
80
+        {
81
+          name: legend_data[0],
82
+          type: "bar",
83
+          stack: "one",
84
+          barWidth: 32,
85
+          // 柱状图最小高度
86
+          barMinHeight: 0,
87
+          barGap: 0,
88
+          label: {
89
+            normal: {
90
+              show: true,
91
+              align: "center",
92
+              verticalAlign: "bottom",
93
+              position: "top",
94
+              distance: 0
95
+            }
96
+          },
97
+          data: series_data1
98
+        },
99
+        {
100
+          name: legend_data[1],
101
+          type: "bar",
102
+          stack: "one",
103
+          barWidth: 32,
104
+          // 柱状图最小高度
105
+          barMinHeight: 0,
106
+          barGap: 0,
107
+          label: {
108
+            normal: {
109
+              show: true,
110
+              align: "center",
111
+              verticalAlign: "top",
112
+              position: "bottom",
113
+              distance: 0,
114
+              formatter: function (params) {
115
+                return Math.abs(params.value);
116
+              }
117
+            }
118
+          },
119
+          data: series_data2
120
+        }
121
+      ]
122
+    };
123
+    var myEcharts = echarts.init(document.querySelector(".section_2_excellent_all #classExcellenceEcharts"));
124
+    myEcharts.clear();
125
+    myEcharts.setOption(option);
126
+  }
127
+  initClassExcellenceEcharts();
128
+});

+ 1
- 1
js/section_2.js View File

@@ -10,7 +10,7 @@ $(function() {
10 10
     "section_2_part",
11 11
     "section_2_lin_all",
12 12
     "section_2_lin_single",
13
-    "section_2_excellent"
13
+    "section_2_excellent_all"
14 14
   ];
15 15
   $(".score_analysis_root").html(sectionsHtmlArr.map(function (htmlName) {
16 16
     return "<div class='" + htmlName + "_html_root'></div>";

+ 2
- 1
notes.txt View File

@@ -10,7 +10,8 @@ section_2.html 第二部分
10 10
         分数分段对比-全科(分数分段对比-单科)section_2_part
11 11
         临界生对比-全科 (按名次)临界生对比-全科 (按分数)section_2_lin_all
12 12
         临界生对比-单科 (按名次)临界生对比-单科 (按分数)section_2_lin_single
13
-        优秀生、学困生对比-全科(优秀生、学困生对比-单科)section_2_excellent
13
+        优秀生、学困生对比-全科 section_2_excellent_all
14
+        优秀生、学困生对比-单科 section_2_excellent_single
14 15
 section_3.html 第三部分
15 16
 section_4.html 第四部分
16 17
 

+ 0
- 13
sections/scoreAnalysis/section_2_excellent.html View File

@@ -1,13 +0,0 @@
1
-<!DOCTYPE html>
2
-<html lang="zh-cn">
3
-<head>
4
-  <meta charset="UTF-8">
5
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
-  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
-  <title>校本PDF报告-第二章 成绩分析</title>
8
-</head>
9
-<body>
10
-  <div class="page_root"></div>
11
-  <script src="../../js/scoreAnalysis/section_2_excellent.js"></script>
12
-</body>
13
-</html>

+ 71
- 0
sections/scoreAnalysis/section_2_excellent_all.html View File

@@ -0,0 +1,71 @@
1
+<!DOCTYPE html>
2
+<html lang="zh-cn">
3
+<head>
4
+  <meta charset="UTF-8">
5
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
6
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+  <title>校本PDF报告-第二章 成绩分析</title>
8
+  <link rel="stylesheet" href="../../css/scoreAnalysis/section_2_excellent_all.css">
9
+</head>
10
+<body>
11
+  <div class="page_root section_2_excellent_all">
12
+    <h2 class="section_title_2">5. 优秀生、学困生对比</h2>
13
+    <h3 class="section_title_3">5.1 全科优秀生、学困生对比</h3>
14
+    <h4 class="section_title_4">5.1.1 各班的优秀生、学困生对比</h4>
15
+    <div class="echarts_result">优秀生:年级前<span class="c_5699FF">10</span>名<span class="margin_left_6mm">学困生:年级后<span class="c_5699FF">10</span>名</span></div>
16
+    <div id="classExcellenceEcharts" style="margin: 0 4mm 4mm;height: 120mm;"></div>
17
+  </div>
18
+  <div class="page_root section_2_excellent_all">
19
+    <h4 class="section_title_4">5.1.2 各班优秀生、学困生占比分布</h4>
20
+    <table border="1" class="my_table">
21
+      <thead>
22
+        <tr>
23
+          <th>班级</th>
24
+          <th>前10名</th>
25
+          <th>占比</th>
26
+          <th>后10名</th>
27
+          <th>占比</th>
28
+        </tr>
29
+      </thead>
30
+      <tbody>
31
+        <tr>
32
+          <td><div class="my_cell">全年级</div></td>
33
+          <td><div class="my_cell">5</div></td>
34
+          <td><div class="my_cell">4%</div></td>
35
+          <td><div class="my_cell">5</div></td>
36
+          <td><div class="my_cell">4%</div></td>
37
+        </tr>
38
+        <tr>
39
+          <td><div class="my_cell">八年级一班</div></td>
40
+          <td><div class="my_cell">5</div></td>
41
+          <td><div class="my_cell">4%</div></td>
42
+          <td><div class="my_cell">5</div></td>
43
+          <td><div class="my_cell">4%</div></td>
44
+        </tr>
45
+        <tr>
46
+          <td><div class="my_cell">八年级一班</div></td>
47
+          <td><div class="my_cell">5</div></td>
48
+          <td><div class="my_cell">4%</div></td>
49
+          <td><div class="my_cell">5</div></td>
50
+          <td><div class="my_cell">4%</div></td>
51
+        </tr>
52
+        <tr>
53
+          <td><div class="my_cell">八年级一班</div></td>
54
+          <td><div class="my_cell">5</div></td>
55
+          <td><div class="my_cell">4%</div></td>
56
+          <td><div class="my_cell">5</div></td>
57
+          <td><div class="my_cell">4%</div></td>
58
+        </tr>
59
+      </tbody>
60
+    </table>
61
+    <div class="echarts_result">
62
+      <div>上图统计结果表示:</div>
63
+      <div class="echarts_result_content">
64
+        <div><span class="dot bg_5699FF"></span>年级前10名优秀生最多的班级:八年级一班</div>
65
+        <div><span class="dot bg_FF5F56"></span>年级后10名学困生最多的班级:八年级六班</div>
66
+      </div>
67
+    </div>
68
+  </div>
69
+  <script src="../../js/scoreAnalysis/section_2_excellent_all.js"></script>
70
+</body>
71
+</html>

Loading…
Cancel
Save