|
@@ -3,13 +3,21 @@ $(function () {
|
3
|
3
|
var rgbaColor = "";
|
4
|
4
|
var reg = /^#[\da-f]{6}$/i;
|
5
|
5
|
if (reg.test(hex)) {
|
6
|
|
- rgbaColor = 'rgba(' + parseInt("0x" + hex.slice(1, 3)) + ',' + parseInt("0x" + hex.slice(3, 5))
|
7
|
|
- + ',' + parseInt("0x" + hex.slice(5, 7)) + ',' + opacity + ')'
|
8
|
|
- }
|
|
6
|
+ rgbaColor =
|
|
7
|
+ "rgba(" +
|
|
8
|
+ parseInt("0x" + hex.slice(1, 3)) +
|
|
9
|
+ "," +
|
|
10
|
+ parseInt("0x" + hex.slice(3, 5)) +
|
|
11
|
+ "," +
|
|
12
|
+ parseInt("0x" + hex.slice(5, 7)) +
|
|
13
|
+ "," +
|
|
14
|
+ opacity +
|
|
15
|
+ ")";
|
|
16
|
+ }
|
9
|
17
|
return rgbaColor;
|
10
|
|
- }
|
11
|
|
- function initlargeAnalysisEcharts(s_index,list) {
|
12
|
|
- var schoolscore = [],
|
|
18
|
+ }
|
|
19
|
+ function initlargeAnalysisEcharts(s_index, list) {
|
|
20
|
+ var schoolscore = [],
|
13
|
21
|
classscore = [],
|
14
|
22
|
legendlist = [currentclass, "全年级"];
|
15
|
23
|
$.each(list, function (idx, item) {
|
|
@@ -62,7 +70,7 @@ $(function () {
|
62
|
70
|
},
|
63
|
71
|
// areaStyle: {}, //内部阴影
|
64
|
72
|
data: [
|
65
|
|
- {
|
|
73
|
+ {
|
66
|
74
|
value: classscore,
|
67
|
75
|
label: {
|
68
|
76
|
show: true,
|
|
@@ -72,7 +80,7 @@ $(function () {
|
72
|
80
|
},
|
73
|
81
|
name: currentclass
|
74
|
82
|
},
|
75
|
|
- {
|
|
83
|
+ {
|
76
|
84
|
value: schoolscore,
|
77
|
85
|
label: {
|
78
|
86
|
show: true,
|
|
@@ -86,204 +94,218 @@ $(function () {
|
86
|
94
|
}
|
87
|
95
|
};
|
88
|
96
|
var myEcharts = echarts.init(
|
89
|
|
- document.querySelector(".section_3_"+s_index +" #largeAnalysisEcharts")
|
|
97
|
+ $(".section_3_" + s_index + " #largeAnalysisEcharts")[0]
|
90
|
98
|
);
|
91
|
99
|
myEcharts.clear();
|
92
|
100
|
myEcharts.setOption(option);
|
93
|
|
- showlargeAnalysistable(list,legendlist,s_index);
|
|
101
|
+ showlargeAnalysistable(list, legendlist, s_index);
|
94
|
102
|
}
|
95
|
103
|
|
96
|
|
- function showlargeAnalysistable (list,legendlist,s_index) {
|
97
|
|
- var table = "",goodTableHeadTr1Html = '<th rowspan="2">题型</th><th rowspan="2">对应题号</th><th rowspan="2">分值</th><th rowspan="2">占比</th><th colspan="2">年级</th><th colspan="2">'+currentclass+'</th>',
|
98
|
|
- goodTableHeadTr2Html = "", trHtml = "";
|
|
104
|
+ function showlargeAnalysistable(list, legendlist, s_index) {
|
|
105
|
+ var table = "",
|
|
106
|
+ goodTableHeadTr1Html =
|
|
107
|
+ '<th rowspan="2">题型</th><th rowspan="2">对应题号</th><th rowspan="2">分值</th><th rowspan="2">占比</th><th colspan="2">年级</th><th colspan="2">' +
|
|
108
|
+ currentclass +
|
|
109
|
+ "</th>",
|
|
110
|
+ goodTableHeadTr2Html = "",
|
|
111
|
+ trHtml = "";
|
99
|
112
|
var data = {
|
100
|
|
- 0:""
|
101
|
|
- }, page = 0;
|
102
|
|
- var pointnum = s_index == 0?11:16;//第一次是半页 显示十条 往后二十条每页
|
|
113
|
+ 0: ""
|
|
114
|
+ },
|
|
115
|
+ page = 0;
|
|
116
|
+ var pointnum = s_index == 0 ? 11 : 16; //第一次是半页 显示十条 往后二十条每页
|
103
|
117
|
$.each(list, function (idx, item) {
|
104
|
|
- if((idx + 1) % pointnum == 0){
|
|
118
|
+ if ((idx + 1) % pointnum == 0) {
|
105
|
119
|
page++;
|
106
|
120
|
if (page == 1) {
|
107
|
121
|
pointnum = 31;
|
108
|
122
|
}
|
109
|
|
- data[page] = "";
|
|
123
|
+ data[page] = "";
|
110
|
124
|
}
|
111
|
125
|
data[page] += "<tr>";
|
112
|
|
- data[page]+= '<td><div class="my_cell">' +
|
113
|
|
- item.qtypename +
|
114
|
|
- '</div></td><td><div class="my_cell">' +
|
115
|
|
- item.qns +
|
116
|
|
- '</div></td><td><div class="my_cell">' +
|
117
|
|
- item.score +
|
118
|
|
- '</div></td><td><div class="my_cell">' +
|
119
|
|
- item.srate +
|
120
|
|
- '%</div></td><td><div class="my_cell">' +
|
121
|
|
- item.gradeavgscore +
|
122
|
|
- '</div></td><td><div class="my_cell">' +
|
123
|
|
- item.gradesrate +
|
124
|
|
- '%</div></td><td><div class="my_cell">' +
|
125
|
|
- item.classavgscore +
|
126
|
|
- '</div></td><td><div class="my_cell">' +
|
127
|
|
- item.classsrate +
|
128
|
|
- "%" +
|
129
|
|
- '</div></td>';
|
130
|
|
- })
|
131
|
|
- console.log(page,data);
|
|
126
|
+ data[page] +=
|
|
127
|
+ '<td><div class="my_cell">' +
|
|
128
|
+ item.qtypename +
|
|
129
|
+ '</div></td><td><div class="my_cell">' +
|
|
130
|
+ item.qns +
|
|
131
|
+ '</div></td><td><div class="my_cell">' +
|
|
132
|
+ item.score +
|
|
133
|
+ '</div></td><td><div class="my_cell">' +
|
|
134
|
+ item.srate +
|
|
135
|
+ '%</div></td><td><div class="my_cell">' +
|
|
136
|
+ item.gradeavgscore +
|
|
137
|
+ '</div></td><td><div class="my_cell">' +
|
|
138
|
+ item.gradesrate +
|
|
139
|
+ '%</div></td><td><div class="my_cell">' +
|
|
140
|
+ item.classavgscore +
|
|
141
|
+ '</div></td><td><div class="my_cell">' +
|
|
142
|
+ item.classsrate +
|
|
143
|
+ "%" +
|
|
144
|
+ "</div></td>";
|
|
145
|
+ });
|
132
|
146
|
$.each(legendlist, function (idx, item) {
|
133
|
|
- goodTableHeadTr2Html+="<th>平均分</th><th>得分率</th>";
|
134
|
|
- })
|
|
147
|
+ goodTableHeadTr2Html += "<th>平均分</th><th>得分率</th>";
|
|
148
|
+ });
|
135
|
149
|
|
136
|
|
- table =' <table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
|
137
|
|
- goodTableHeadTr1Html +
|
138
|
|
- '</tr><tr class="goodTableHeadTr2">' +
|
139
|
|
- goodTableHeadTr2Html +
|
140
|
|
- '</tr></thead><tbody class="goodTableTbody">' +
|
141
|
|
- trHtml +
|
142
|
|
- "</tbody></table>"
|
143
|
|
- for (var i = 0; i <= page; i++){
|
144
|
|
- table ='<table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
|
145
|
|
- goodTableHeadTr1Html +
|
|
150
|
+ table =
|
|
151
|
+ ' <table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
|
|
152
|
+ goodTableHeadTr1Html +
|
|
153
|
+ '</tr><tr class="goodTableHeadTr2">' +
|
|
154
|
+ goodTableHeadTr2Html +
|
|
155
|
+ '</tr></thead><tbody class="goodTableTbody">' +
|
|
156
|
+ trHtml +
|
|
157
|
+ "</tbody></table>";
|
|
158
|
+ for (var i = 0; i <= page; i++) {
|
|
159
|
+ table =
|
|
160
|
+ '<table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
|
|
161
|
+ goodTableHeadTr1Html +
|
146
|
162
|
'</tr><tr class="goodTableHeadTr2">' +
|
147
|
|
- goodTableHeadTr2Html +
|
|
163
|
+ goodTableHeadTr2Html +
|
148
|
164
|
'</tr></thead><tbody class="goodTableTbody">' +
|
149
|
|
- data[i] +
|
150
|
|
- "</tbody></table>"
|
151
|
|
- $(".section_3_" + s_index + ".large_"+ i+" .largeAnalysistable").html(table);
|
|
165
|
+ data[i] +
|
|
166
|
+ "</tbody></table>";
|
|
167
|
+ $(".section_3_" + s_index + ".large_" + i + " .largeAnalysistable").html(
|
|
168
|
+ table
|
|
169
|
+ );
|
152
|
170
|
if (i != 0) {
|
153
|
|
- //添加分页
|
154
|
|
- $(".large_"+ (i-1)+".section_3_"+s_index).after(
|
155
|
|
- '<div class="page_root section_3_'+s_index+' large_'+i+'"></div>'
|
|
171
|
+ //添加分页
|
|
172
|
+ $(".large_" + (i - 1) + ".section_3_" + s_index).after(
|
|
173
|
+ '<div class="page_root section_3_' +
|
|
174
|
+ s_index +
|
|
175
|
+ " large_" +
|
|
176
|
+ i +
|
|
177
|
+ '"></div>'
|
156
|
178
|
);
|
157
|
|
- $(".page_root.section_3_"+s_index+'.large_'+i).html(table);
|
|
179
|
+ $(".page_root.section_3_" + s_index + ".large_" + i).html(table);
|
158
|
180
|
}
|
159
|
181
|
}
|
160
|
182
|
// $(".section_3_"+s_index +" .largeAnalysistable").html(table)
|
161
|
183
|
}
|
162
|
184
|
|
163
|
|
- function initSmallAnalysisEcharts (s_index,list) {
|
164
|
|
- let legendlist = [currentclass, "全年级"],
|
165
|
|
- xAxis_data = [],
|
166
|
|
- schoolscore = [],
|
167
|
|
- classscore = [],
|
|
185
|
+ function initSmallAnalysisEcharts(s_index, list) {
|
|
186
|
+ let legendlist = [currentclass, "全年级"],
|
|
187
|
+ xAxis_data = [],
|
|
188
|
+ schoolscore = [],
|
|
189
|
+ classscore = [],
|
168
|
190
|
curseries = [];
|
169
|
191
|
$.each(list, function (idx, item) {
|
170
|
192
|
xAxis_data.push("第" + item.qn + "题");
|
171
|
|
- classscore.push(item.classavgscore);
|
172
|
|
- schoolscore.push(item.gradeavgscore);
|
173
|
|
- })
|
174
|
|
- let color = ["#5699FF", "#5EC5C8"];
|
175
|
|
- curseries = [
|
176
|
|
- {
|
177
|
|
- name: currentclass,
|
178
|
|
- type: "line",
|
179
|
|
- symbol: "circle", // 默认是空心圆(中间是白色的),改成实心圆
|
180
|
|
- smooth: false, //折线是否弯曲
|
181
|
|
- // symbol: "emptyCircle",
|
182
|
|
- symbolSize: 6,
|
183
|
|
- itemStyle: {
|
184
|
|
- normal: {
|
185
|
|
- color: "#4190FF" // 拐点外圈颜色
|
186
|
|
- }
|
187
|
|
- },
|
188
|
|
- label: {
|
189
|
|
- normal: {
|
190
|
|
- show: true,
|
191
|
|
- align: "center",
|
192
|
|
- verticalAlign: "bottom",
|
193
|
|
- position: "top",
|
194
|
|
- distance: 0,
|
195
|
|
- formatter: `{c}`
|
196
|
|
- }
|
197
|
|
- },
|
198
|
|
- areaStyle: {
|
199
|
|
- normal: {
|
200
|
|
- color: new echarts.graphic.LinearGradient(
|
201
|
|
- 0,
|
202
|
|
- 0,
|
203
|
|
- 0,
|
204
|
|
- 1,
|
205
|
|
- [
|
206
|
|
- {
|
207
|
|
- offset: 0,
|
208
|
|
- color: hexToRgba(color[0], 0.3)
|
209
|
|
- },
|
210
|
|
- {
|
211
|
|
- offset: 1,
|
212
|
|
- color: hexToRgba(color[0], 0)
|
213
|
|
- }
|
214
|
|
- ],
|
215
|
|
- false
|
216
|
|
- ),
|
217
|
|
- shadowColor: hexToRgba(color[0], 0),
|
218
|
|
- shadowBlur: 10
|
219
|
|
- }
|
220
|
|
- },
|
221
|
|
- data: classscore
|
|
193
|
+ classscore.push(item.classavgscore);
|
|
194
|
+ schoolscore.push(item.gradeavgscore);
|
|
195
|
+ });
|
|
196
|
+ let color = ["#5699FF", "#5EC5C8"];
|
|
197
|
+ curseries = [
|
|
198
|
+ {
|
|
199
|
+ name: currentclass,
|
|
200
|
+ type: "line",
|
|
201
|
+ symbol: "circle", // 默认是空心圆(中间是白色的),改成实心圆
|
|
202
|
+ smooth: false, //折线是否弯曲
|
|
203
|
+ // symbol: "emptyCircle",
|
|
204
|
+ symbolSize: 6,
|
|
205
|
+ itemStyle: {
|
|
206
|
+ normal: {
|
|
207
|
+ color: "#4190FF" // 拐点外圈颜色
|
|
208
|
+ }
|
222
|
209
|
},
|
223
|
|
- {
|
224
|
|
- name: "全年级",
|
225
|
|
- type: "line",
|
226
|
|
- // smooth: true, //是否平滑曲线显示
|
227
|
|
- symbol: "circle", // 默认是空心圆(中间是白色的),改成实心圆
|
228
|
|
- smooth: false, //折线是否弯曲
|
229
|
|
- // symbol: "emptyCircle",
|
230
|
|
- symbolSize: 6,
|
231
|
|
- // zlevel: 3,
|
232
|
|
- itemStyle: {
|
233
|
|
- normal: {
|
234
|
|
- color: "#5FCE9E" // 拐点外圈颜色
|
235
|
|
- }
|
236
|
|
- },
|
237
|
|
- label: {
|
238
|
|
- normal: {
|
239
|
|
- show: true,
|
240
|
|
- align: "center",
|
241
|
|
- verticalAlign: "bottom",
|
242
|
|
- position: "top",
|
243
|
|
- distance: 0,
|
244
|
|
- formatter: `{c}`
|
245
|
|
- }
|
246
|
|
- },
|
247
|
|
- areaStyle: {
|
248
|
|
- normal: {
|
249
|
|
- color: new echarts.graphic.LinearGradient(
|
250
|
|
- 0,
|
251
|
|
- 0,
|
252
|
|
- 0,
|
253
|
|
- 1,
|
254
|
|
- [
|
255
|
|
- {
|
256
|
|
- offset: 0,
|
257
|
|
- color: hexToRgba(color[1], 0.3)
|
258
|
|
- },
|
259
|
|
- {
|
260
|
|
- offset: 1,
|
261
|
|
- color: hexToRgba(color[1], 0)
|
262
|
|
- }
|
263
|
|
- ],
|
264
|
|
- false
|
265
|
|
- ),
|
266
|
|
- shadowColor: hexToRgba(color[1], 0),
|
267
|
|
- shadowBlur: 10
|
268
|
|
- }
|
269
|
|
- },
|
270
|
|
- data: schoolscore
|
271
|
|
- }
|
272
|
|
- ];
|
273
|
|
- let option = {
|
274
|
|
- animation: false,
|
275
|
|
- color: ["#5699FF", "#5EC5C8"],
|
276
|
|
- title: {
|
277
|
|
- text: "分",
|
278
|
|
- x: "left",
|
279
|
|
- y: "top",
|
280
|
|
- textStyle: {
|
281
|
|
- color: "#5F6E82",
|
282
|
|
- fontSize: 12,
|
283
|
|
- fontWeight: 500
|
|
210
|
+ label: {
|
|
211
|
+ normal: {
|
|
212
|
+ show: true,
|
|
213
|
+ align: "center",
|
|
214
|
+ verticalAlign: "bottom",
|
|
215
|
+ position: "top",
|
|
216
|
+ distance: 0,
|
|
217
|
+ formatter: `{c}`
|
|
218
|
+ }
|
|
219
|
+ },
|
|
220
|
+ areaStyle: {
|
|
221
|
+ normal: {
|
|
222
|
+ color: new echarts.graphic.LinearGradient(
|
|
223
|
+ 0,
|
|
224
|
+ 0,
|
|
225
|
+ 0,
|
|
226
|
+ 1,
|
|
227
|
+ [
|
|
228
|
+ {
|
|
229
|
+ offset: 0,
|
|
230
|
+ color: hexToRgba(color[0], 0.3)
|
|
231
|
+ },
|
|
232
|
+ {
|
|
233
|
+ offset: 1,
|
|
234
|
+ color: hexToRgba(color[0], 0)
|
|
235
|
+ }
|
|
236
|
+ ],
|
|
237
|
+ false
|
|
238
|
+ ),
|
|
239
|
+ shadowColor: hexToRgba(color[0], 0),
|
|
240
|
+ shadowBlur: 10
|
|
241
|
+ }
|
|
242
|
+ },
|
|
243
|
+ data: classscore
|
|
244
|
+ },
|
|
245
|
+ {
|
|
246
|
+ name: "全年级",
|
|
247
|
+ type: "line",
|
|
248
|
+ // smooth: true, //是否平滑曲线显示
|
|
249
|
+ symbol: "circle", // 默认是空心圆(中间是白色的),改成实心圆
|
|
250
|
+ smooth: false, //折线是否弯曲
|
|
251
|
+ // symbol: "emptyCircle",
|
|
252
|
+ symbolSize: 6,
|
|
253
|
+ // zlevel: 3,
|
|
254
|
+ itemStyle: {
|
|
255
|
+ normal: {
|
|
256
|
+ color: "#5FCE9E" // 拐点外圈颜色
|
|
257
|
+ }
|
|
258
|
+ },
|
|
259
|
+ label: {
|
|
260
|
+ normal: {
|
|
261
|
+ show: true,
|
|
262
|
+ align: "center",
|
|
263
|
+ verticalAlign: "bottom",
|
|
264
|
+ position: "top",
|
|
265
|
+ distance: 0,
|
|
266
|
+ formatter: `{c}`
|
|
267
|
+ }
|
|
268
|
+ },
|
|
269
|
+ areaStyle: {
|
|
270
|
+ normal: {
|
|
271
|
+ color: new echarts.graphic.LinearGradient(
|
|
272
|
+ 0,
|
|
273
|
+ 0,
|
|
274
|
+ 0,
|
|
275
|
+ 1,
|
|
276
|
+ [
|
|
277
|
+ {
|
|
278
|
+ offset: 0,
|
|
279
|
+ color: hexToRgba(color[1], 0.3)
|
|
280
|
+ },
|
|
281
|
+ {
|
|
282
|
+ offset: 1,
|
|
283
|
+ color: hexToRgba(color[1], 0)
|
|
284
|
+ }
|
|
285
|
+ ],
|
|
286
|
+ false
|
|
287
|
+ ),
|
|
288
|
+ shadowColor: hexToRgba(color[1], 0),
|
|
289
|
+ shadowBlur: 10
|
284
|
290
|
}
|
285
|
291
|
},
|
286
|
|
- legend: {
|
|
292
|
+ data: schoolscore
|
|
293
|
+ }
|
|
294
|
+ ];
|
|
295
|
+ let option = {
|
|
296
|
+ animation: false,
|
|
297
|
+ color: ["#5699FF", "#5EC5C8"],
|
|
298
|
+ title: {
|
|
299
|
+ text: "分",
|
|
300
|
+ x: "left",
|
|
301
|
+ y: "top",
|
|
302
|
+ textStyle: {
|
|
303
|
+ color: "#5F6E82",
|
|
304
|
+ fontSize: 12,
|
|
305
|
+ fontWeight: 500
|
|
306
|
+ }
|
|
307
|
+ },
|
|
308
|
+ legend: {
|
287
|
309
|
icon: "rectRound",
|
288
|
310
|
itemWidth: $.UnitUtil.mm2px(2),
|
289
|
311
|
itemHeight: $.UnitUtil.mm2px(2),
|
|
@@ -298,105 +320,113 @@ $(function () {
|
298
|
320
|
bottom: $.UnitUtil.mm2px(8),
|
299
|
321
|
containLabel: true
|
300
|
322
|
},
|
301
|
|
- xAxis: [
|
302
|
|
- {
|
303
|
|
- type: "category",
|
304
|
|
- data: xAxis_data,
|
305
|
|
- axisLabel: {
|
306
|
|
- color: "#5F6E82" //更改坐标轴文字颜色
|
307
|
|
- },
|
308
|
|
- axisTick: {
|
309
|
|
- alignWithLabel: true
|
310
|
|
- },
|
311
|
|
- boundaryGap: true,
|
312
|
|
- triggerEvent: true,
|
313
|
|
- axisLine: {
|
314
|
|
- show: true, //是否显示轴线
|
315
|
|
- lineStyle: {
|
316
|
|
- color: "#DADADA" //刻度线的颜色
|
317
|
|
- }
|
|
323
|
+ xAxis: [
|
|
324
|
+ {
|
|
325
|
+ type: "category",
|
|
326
|
+ data: xAxis_data,
|
|
327
|
+ axisLabel: {
|
|
328
|
+ color: "#5F6E82" //更改坐标轴文字颜色
|
|
329
|
+ },
|
|
330
|
+ axisTick: {
|
|
331
|
+ alignWithLabel: true
|
|
332
|
+ },
|
|
333
|
+ boundaryGap: true,
|
|
334
|
+ triggerEvent: true,
|
|
335
|
+ axisLine: {
|
|
336
|
+ show: true, //是否显示轴线
|
|
337
|
+ lineStyle: {
|
|
338
|
+ color: "#DADADA" //刻度线的颜色
|
318
|
339
|
}
|
319
|
340
|
}
|
320
|
|
- ],
|
321
|
|
- yAxis: [
|
322
|
|
- {
|
323
|
|
- type: "value",
|
324
|
|
- axisTick: {
|
325
|
|
- show: false //刻度
|
326
|
|
- },
|
327
|
|
- axisLine: {
|
328
|
|
- show: false, //是否显示轴线
|
329
|
|
- lineStyle: {
|
330
|
|
- color: "#DADADA" //刻度线的颜色
|
331
|
|
- }
|
332
|
|
- },
|
333
|
|
- splitLine: {
|
334
|
|
- //网格线
|
335
|
|
- lineStyle: {
|
336
|
|
- type: "dotted" //设置网格线类型 dotted:虚线 solid:实线
|
337
|
|
- },
|
338
|
|
- show: true //隐藏或显示
|
339
|
|
- },
|
340
|
|
- axisLabel: {
|
341
|
|
- color: "#5F6E82" //更改坐标轴文字颜色
|
|
341
|
+ }
|
|
342
|
+ ],
|
|
343
|
+ yAxis: [
|
|
344
|
+ {
|
|
345
|
+ type: "value",
|
|
346
|
+ axisTick: {
|
|
347
|
+ show: false //刻度
|
|
348
|
+ },
|
|
349
|
+ axisLine: {
|
|
350
|
+ show: false, //是否显示轴线
|
|
351
|
+ lineStyle: {
|
|
352
|
+ color: "#DADADA" //刻度线的颜色
|
342
|
353
|
}
|
|
354
|
+ },
|
|
355
|
+ splitLine: {
|
|
356
|
+ //网格线
|
|
357
|
+ lineStyle: {
|
|
358
|
+ type: "dotted" //设置网格线类型 dotted:虚线 solid:实线
|
|
359
|
+ },
|
|
360
|
+ show: true //隐藏或显示
|
|
361
|
+ },
|
|
362
|
+ axisLabel: {
|
|
363
|
+ color: "#5F6E82" //更改坐标轴文字颜色
|
343
|
364
|
}
|
344
|
|
- ],
|
345
|
|
- series: curseries
|
|
365
|
+ }
|
|
366
|
+ ],
|
|
367
|
+ series: curseries
|
346
|
368
|
};
|
347
|
|
- var myEcharts = echarts.init(
|
348
|
|
- document.querySelector(".section_3_"+s_index +" #SmallAnalysisEcharts")
|
|
369
|
+ var myEcharts = echarts.init(
|
|
370
|
+ $(".section_3_" + s_index + " #SmallAnalysisEcharts")[0]
|
349
|
371
|
);
|
350
|
372
|
myEcharts.clear();
|
351
|
373
|
myEcharts.setOption(option);
|
352
|
|
- showSmallSmallAnalysistable(list,legendlist,s_index);
|
|
374
|
+ showSmallSmallAnalysistable(list, legendlist, s_index);
|
353
|
375
|
}
|
354
|
376
|
|
355
|
|
- function showSmallSmallAnalysistable (list,legendlist,s_index) {
|
356
|
|
- var table = "",goodTableHeadTr1Html = '<th rowspan="2">题号</th><th rowspan="2">题型</th><th rowspan="2">分值</th><th rowspan="2">难度</th><th colspan="2">年级</th><th colspan="2">'+currentclass+'</th>',
|
357
|
|
- goodTableHeadTr2Html = "", trHtml = "";
|
|
377
|
+ function showSmallSmallAnalysistable(list, legendlist, s_index) {
|
|
378
|
+ var table = "",
|
|
379
|
+ goodTableHeadTr1Html =
|
|
380
|
+ '<th rowspan="2">题号</th><th rowspan="2">题型</th><th rowspan="2">分值</th><th rowspan="2">难度</th><th colspan="2">年级</th><th colspan="2">' +
|
|
381
|
+ currentclass +
|
|
382
|
+ "</th>",
|
|
383
|
+ goodTableHeadTr2Html = "",
|
|
384
|
+ trHtml = "";
|
358
|
385
|
var complexityarr = ["一", "二", "三", "四", "五"];
|
359
|
386
|
$.each(list, function (idx, item) {
|
360
|
|
- var complexity = item.complexity ? complexityarr[item.complexity - 1] + "星" : " ";
|
|
387
|
+ var complexity = item.complexity
|
|
388
|
+ ? complexityarr[item.complexity - 1] + "星"
|
|
389
|
+ : " ";
|
361
|
390
|
trHtml += "<tr>";
|
362
|
|
- trHtml+= '<td><div class="my_cell">' +
|
363
|
|
- item.qn +
|
364
|
|
- '</div></td><td><div class="my_cell">' +
|
365
|
|
- item.qtypename +
|
366
|
|
- '</div></td><td><div class="my_cell">' +
|
367
|
|
- item.score +
|
368
|
|
- '</div></td><td><div class="my_cell">' +
|
369
|
|
- complexity +
|
370
|
|
- '</div></td><td><div class="my_cell">' +
|
371
|
|
- item.gradeavgscore +
|
372
|
|
- '</div></td><td><div class="my_cell">' +
|
373
|
|
- item.gradesrate +
|
374
|
|
- '%</div></td><td><div class="my_cell">' +
|
375
|
|
- item.classavgscore +
|
376
|
|
- '</div></td><td><div class="my_cell">' +
|
377
|
|
- item.classsrate +
|
378
|
|
- "%" +
|
379
|
|
- '</div></td>';
|
380
|
|
- })
|
|
391
|
+ trHtml +=
|
|
392
|
+ '<td><div class="my_cell">' +
|
|
393
|
+ item.qn +
|
|
394
|
+ '</div></td><td><div class="my_cell">' +
|
|
395
|
+ item.qtypename +
|
|
396
|
+ '</div></td><td><div class="my_cell">' +
|
|
397
|
+ item.score +
|
|
398
|
+ '</div></td><td><div class="my_cell">' +
|
|
399
|
+ complexity +
|
|
400
|
+ '</div></td><td><div class="my_cell">' +
|
|
401
|
+ item.gradeavgscore +
|
|
402
|
+ '</div></td><td><div class="my_cell">' +
|
|
403
|
+ item.gradesrate +
|
|
404
|
+ '%</div></td><td><div class="my_cell">' +
|
|
405
|
+ item.classavgscore +
|
|
406
|
+ '</div></td><td><div class="my_cell">' +
|
|
407
|
+ item.classsrate +
|
|
408
|
+ "%" +
|
|
409
|
+ "</div></td>";
|
|
410
|
+ });
|
381
|
411
|
$.each(legendlist, function (idx, item) {
|
382
|
|
- goodTableHeadTr2Html+="<th>平均分</th><th>得分率</th>";
|
383
|
|
- })
|
384
|
|
- table =' <table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
|
385
|
|
- goodTableHeadTr1Html +
|
386
|
|
- '</tr><tr class="goodTableHeadTr2">' +
|
387
|
|
- goodTableHeadTr2Html +
|
388
|
|
- '</tr></thead><tbody class="goodTableTbody">' +
|
389
|
|
- trHtml +
|
390
|
|
- "</tbody></table>"
|
|
412
|
+ goodTableHeadTr2Html += "<th>平均分</th><th>得分率</th>";
|
|
413
|
+ });
|
|
414
|
+ table =
|
|
415
|
+ ' <table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
|
|
416
|
+ goodTableHeadTr1Html +
|
|
417
|
+ '</tr><tr class="goodTableHeadTr2">' +
|
|
418
|
+ goodTableHeadTr2Html +
|
|
419
|
+ '</tr></thead><tbody class="goodTableTbody">' +
|
|
420
|
+ trHtml +
|
|
421
|
+ "</tbody></table>";
|
391
|
422
|
$(".section_3_" + s_index + " .SmallAnalysistable").html(table);
|
392
|
423
|
}
|
393
|
424
|
|
394
|
|
- function initpointsAnalysisEcharts (s_index, list) {
|
|
425
|
+ function initpointsAnalysisEcharts(s_index, list) {
|
395
|
426
|
if (list.length == 0) return;
|
396
|
|
- console.log(list);
|
397
|
427
|
var schoolscore = [],
|
398
|
428
|
classscore = [],
|
399
|
|
- legendlist = [currentclass+"得分率", "年级得分率"];
|
|
429
|
+ legendlist = [currentclass + "得分率", "年级得分率"];
|
400
|
430
|
$.each(list, function (idx, item) {
|
401
|
431
|
if (item.subjectname != "全科") {
|
402
|
432
|
classscore.push(item.classsrate);
|
|
@@ -447,7 +477,7 @@ $(function () {
|
447
|
477
|
},
|
448
|
478
|
// areaStyle: {}, //内部阴影
|
449
|
479
|
data: [
|
450
|
|
- {
|
|
480
|
+ {
|
451
|
481
|
value: classscore,
|
452
|
482
|
label: {
|
453
|
483
|
show: true,
|
|
@@ -455,9 +485,9 @@ $(function () {
|
455
|
485
|
return params.value;
|
456
|
486
|
}
|
457
|
487
|
},
|
458
|
|
- name: currentclass+"得分率"
|
|
488
|
+ name: currentclass + "得分率"
|
459
|
489
|
},
|
460
|
|
- {
|
|
490
|
+ {
|
461
|
491
|
value: schoolscore,
|
462
|
492
|
label: {
|
463
|
493
|
show: true,
|
|
@@ -471,66 +501,80 @@ $(function () {
|
471
|
501
|
}
|
472
|
502
|
};
|
473
|
503
|
var myEcharts = echarts.init(
|
474
|
|
- document.querySelector(".section_3_"+s_index +" #pointsAnalysisEcharts")
|
|
504
|
+ $(".section_3_" + s_index + " #pointsAnalysisEcharts")[0]
|
475
|
505
|
);
|
476
|
506
|
myEcharts.clear();
|
477
|
507
|
myEcharts.setOption(option);
|
478
|
|
- showpointsAnalysistable(list,legendlist,s_index);
|
|
508
|
+ showpointsAnalysistable(list, legendlist, s_index);
|
479
|
509
|
}
|
480
|
510
|
|
481
|
|
- function showpointsAnalysistable (list, legendlist, s_index) {
|
482
|
|
- var table = "",goodTableHeadTr1Html = '<th rowspan="2" class="points">知识点</th><th rowspan="2">对应题号</th><th rowspan="2">分值</th><th rowspan="2">占比</th><th colspan="2">年级</th><th colspan="2">'+currentclass+'</th>',
|
483
|
|
- goodTableHeadTr2Html = "", trHtml = "";
|
|
511
|
+ function showpointsAnalysistable(list, legendlist, s_index) {
|
|
512
|
+ var table = "",
|
|
513
|
+ goodTableHeadTr1Html =
|
|
514
|
+ '<th rowspan="2" class="points">知识点</th><th rowspan="2">对应题号</th><th rowspan="2">分值</th><th rowspan="2">占比</th><th colspan="2">年级</th><th colspan="2">' +
|
|
515
|
+ currentclass +
|
|
516
|
+ "</th>",
|
|
517
|
+ goodTableHeadTr2Html = "",
|
|
518
|
+ trHtml = "";
|
484
|
519
|
var data = {
|
485
|
|
- 0:""
|
486
|
|
- }, page = 0;
|
487
|
|
- var pointnum = 16;//第一次是半页 显示十条 往后二十条每页
|
|
520
|
+ 0: ""
|
|
521
|
+ },
|
|
522
|
+ page = 0;
|
|
523
|
+ var pointnum = 16; //第一次是半页 显示十条 往后二十条每页
|
488
|
524
|
$.each(list, function (idx, item) {
|
489
|
|
- if((idx + 1) % pointnum == 0){
|
|
525
|
+ if ((idx + 1) % pointnum == 0) {
|
490
|
526
|
page++;
|
491
|
527
|
if (page == 1) {
|
492
|
528
|
pointnum = 31;
|
493
|
529
|
}
|
494
|
|
- data[page] = "";
|
|
530
|
+ data[page] = "";
|
495
|
531
|
}
|
496
|
532
|
data[page] += "<tr>";
|
497
|
|
- data[page]+= '<td><div class="my_cell">' +
|
498
|
|
- item.pointname +
|
499
|
|
- '</div></td><td><div class="my_cell">' +
|
500
|
|
- item.qns +
|
501
|
|
- '</div></td><td><div class="my_cell">' +
|
502
|
|
- item.score +
|
503
|
|
- '</div></td><td><div class="my_cell">' +
|
504
|
|
- item.srate +
|
505
|
|
- '%</div></td><td><div class="my_cell">' +
|
506
|
|
- item.gradeavgscore +
|
507
|
|
- '</div></td><td><div class="my_cell">' +
|
508
|
|
- item.gradesrate +
|
509
|
|
- '%</div></td><td><div class="my_cell">' +
|
510
|
|
- item.classavgscore +
|
511
|
|
- '</div></td><td><div class="my_cell">' +
|
512
|
|
- item.classsrate +
|
513
|
|
- "%" +
|
514
|
|
- '</div></td>';
|
515
|
|
- })
|
|
533
|
+ data[page] +=
|
|
534
|
+ '<td><div class="my_cell">' +
|
|
535
|
+ item.pointname +
|
|
536
|
+ '</div></td><td><div class="my_cell">' +
|
|
537
|
+ item.qns +
|
|
538
|
+ '</div></td><td><div class="my_cell">' +
|
|
539
|
+ item.score +
|
|
540
|
+ '</div></td><td><div class="my_cell">' +
|
|
541
|
+ item.srate +
|
|
542
|
+ '%</div></td><td><div class="my_cell">' +
|
|
543
|
+ item.gradeavgscore +
|
|
544
|
+ '</div></td><td><div class="my_cell">' +
|
|
545
|
+ item.gradesrate +
|
|
546
|
+ '%</div></td><td><div class="my_cell">' +
|
|
547
|
+ item.classavgscore +
|
|
548
|
+ '</div></td><td><div class="my_cell">' +
|
|
549
|
+ item.classsrate +
|
|
550
|
+ "%" +
|
|
551
|
+ "</div></td>";
|
|
552
|
+ });
|
516
|
553
|
$.each(legendlist, function (idx, item) {
|
517
|
|
- goodTableHeadTr2Html+="<th>平均分</th><th>得分率</th>";
|
518
|
|
- })
|
519
|
|
- for (var i = 0; i <= page; i++){
|
520
|
|
- table ='<table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
|
521
|
|
- goodTableHeadTr1Html +
|
|
554
|
+ goodTableHeadTr2Html += "<th>平均分</th><th>得分率</th>";
|
|
555
|
+ });
|
|
556
|
+ for (var i = 0; i <= page; i++) {
|
|
557
|
+ table =
|
|
558
|
+ '<table border="1" class="my_table"><thead><tr class="goodTableHeadTr1">' +
|
|
559
|
+ goodTableHeadTr1Html +
|
522
|
560
|
'</tr><tr class="goodTableHeadTr2">' +
|
523
|
|
- goodTableHeadTr2Html +
|
|
561
|
+ goodTableHeadTr2Html +
|
524
|
562
|
'</tr></thead><tbody class="goodTableTbody">' +
|
525
|
|
- data[i] +
|
526
|
|
- "</tbody></table>"
|
527
|
|
- $(".section_3_" + s_index + ".page_"+ i+" .pointsAnalysistable").html(table);
|
|
563
|
+ data[i] +
|
|
564
|
+ "</tbody></table>";
|
|
565
|
+ $(".section_3_" + s_index + ".page_" + i + " .pointsAnalysistable").html(
|
|
566
|
+ table
|
|
567
|
+ );
|
528
|
568
|
if (i != 0) {
|
529
|
|
- //添加分页
|
530
|
|
- $(".page_"+ (i-1)+".section_3_"+s_index).after(
|
531
|
|
- '<div class="page_root section_3_'+s_index+' page_'+i+'"></div>'
|
|
569
|
+ //添加分页
|
|
570
|
+ $(".page_" + (i - 1) + ".section_3_" + s_index).after(
|
|
571
|
+ '<div class="page_root section_3_' +
|
|
572
|
+ s_index +
|
|
573
|
+ " page_" +
|
|
574
|
+ i +
|
|
575
|
+ '"></div>'
|
532
|
576
|
);
|
533
|
|
- $(".page_root.section_3_"+s_index+'.page_'+i).html(table);
|
|
577
|
+ $(".page_root.section_3_" + s_index + ".page_" + i).html(table);
|
534
|
578
|
}
|
535
|
579
|
}
|
536
|
580
|
}
|
|
@@ -538,20 +582,32 @@ $(function () {
|
538
|
582
|
parameter = JSON.parse(parameter);
|
539
|
583
|
var html = "";
|
540
|
584
|
$.each(parameter, function (s_index, item) {
|
541
|
|
- html+='<div class="page_root large_0 section_3_'+s_index +'">'+
|
542
|
|
- (s_index == 0?'<h1 class="section_title_1">第三章 试卷分析</h1><div class="abstract_box"><div class="abstract_left"><img src="/img/img2.png" /></div><div class="abstract_right"><div class="abstract_content">从学科试卷分析,帮我们从宏观的角度了解班级的水平和差异。系统从多个维度的数据进行学科对比分析,<strong>包括大题年级和班级的(平均分、得分率)、小题年级和班级的(平均分、得分率)。</strong></div></div></div>':"")+
|
543
|
|
- '<h1 class="subjectinfo">'+item.subjectname+'试卷分析</h1><h2 class="section_title_2">1. 大题分析</h2><h3 class="section_title_3">1.1 大题分析</h3><div id="largeAnalysisEcharts" style="margin: 0 4mm 4mm; height: 71mm"></div><h2 class="section_title_3">1.2 大题整体分析</h2><div class="largeAnalysistable"></div></div><div class="page_root section_3_'+
|
544
|
|
- s_index + '"><h2 class="section_title_2">2. 小题分析</h2><h3 class="section_title_3">2.1 小题分析</h3><div id="SmallAnalysisEcharts" style="margin: 0 4mm 4mm; height: 71mm"></div><h2 class="section_title_3_'+
|
545
|
|
- s_index +'">2.2 小题整体分析</h2><div class="SmallAnalysistable"></div></div>'+(item.points.length>0?'<div class="page_root page_0 section_3_'+
|
546
|
|
- s_index +'"><h2 class="section_title_2">3. 知识点掌握整体概况</h2><h3 class="section_title_3">3.1 知识点得分率分析</h3><div id="pointsAnalysisEcharts" style="margin: 0 4mm 4mm; height: 90mm"></div><h2 class="section_title_3">3.2 知识点整体分析</h2><div class="pointsAnalysistable"></div></div></div>':"")
|
547
|
|
- })
|
|
585
|
+ html +=
|
|
586
|
+ '<div class="page_root large_0 section_3_' +
|
|
587
|
+ s_index +
|
|
588
|
+ '">' +
|
|
589
|
+ (s_index == 0
|
|
590
|
+ ? '<h1 class="section_title_1">第三章 试卷分析</h1><div class="abstract_box"><div class="abstract_left"><img src="/img/img2.png" /></div><div class="abstract_right"><div class="abstract_content">从学科试卷分析,帮我们从宏观的角度了解班级的水平和差异。系统从多个维度的数据进行学科对比分析,<strong>包括大题年级和班级的(平均分、得分率)、小题年级和班级的(平均分、得分率)。</strong></div></div></div>'
|
|
591
|
+ : "") +
|
|
592
|
+ '<h1 class="subjectinfo">' +
|
|
593
|
+ item.subjectname +
|
|
594
|
+ '试卷分析</h1><h2 class="section_title_2">1. 大题分析</h2><h3 class="section_title_3">1.1 大题分析</h3><div id="largeAnalysisEcharts" style="margin: 0 4mm 4mm; height: 71mm"></div><h2 class="section_title_3">1.2 大题整体分析</h2><div class="largeAnalysistable"></div></div><div class="page_root section_3_' +
|
|
595
|
+ s_index +
|
|
596
|
+ '"><h2 class="section_title_2">2. 小题分析</h2><h3 class="section_title_3">2.1 小题分析</h3><div id="SmallAnalysisEcharts" style="margin: 0 4mm 4mm; height: 71mm"></div><h2 class="section_title_3_' +
|
|
597
|
+ s_index +
|
|
598
|
+ '">2.2 小题整体分析</h2><div class="SmallAnalysistable"></div></div>' +
|
|
599
|
+ (item.points.length > 0
|
|
600
|
+ ? '<div class="page_root page_0 section_3_' +
|
|
601
|
+ s_index +
|
|
602
|
+ '"><h2 class="section_title_2">3. 知识点掌握整体概况</h2><h3 class="section_title_3">3.1 知识点得分率分析</h3><div id="pointsAnalysisEcharts" style="margin: 0 4mm 4mm; height: 90mm"></div><h2 class="section_title_3">3.2 知识点整体分析</h2><div class="pointsAnalysistable"></div></div></div>'
|
|
603
|
+ : "");
|
|
604
|
+ });
|
548
|
605
|
$(".ChapterThree").html(html);
|
549
|
|
- console.log(parameter);
|
550
|
|
- $.each(parameter, function (s_index, item) {
|
|
606
|
+ $.each(parameter, function (s_index, item) {
|
551
|
607
|
initlargeAnalysisEcharts(s_index, item.types);
|
552
|
608
|
initSmallAnalysisEcharts(s_index, item.questions);
|
553
|
609
|
initpointsAnalysisEcharts(s_index, item.points);
|
554
|
|
- })
|
555
|
|
-
|
|
610
|
+ });
|
|
611
|
+
|
556
|
612
|
// document.documentElement.scrollTop = 1000;
|
557
|
|
-});
|
|
613
|
+});
|