index.vue
8.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
<template>
<div>
<Dec :content="content" />
<div class="classes">
<div class="search">
<span>选择班级:</span>
<el-select v-model="grade" size="small" placeholder="请选择">
<el-option
v-for="item in gradeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-select v-model="classes" size="small" placeholder="请选择">
<el-option
v-for="item in classesList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-button type="primary" size="small">统计</el-button>
<el-button type="warning" size="small">清空</el-button>
</div>
<div class="classinfo">
<div class="box-l">
<p class="ccc">班级名称</p>
<p>一年三班</p>
</div>
<div class="box-r">
<el-row>
<el-col :span="6"><span class="ccc">班级编号:</span>2234</el-col>
<el-col :span="6"><span class="ccc">班级人数:</span>55人</el-col>
<el-col :span="6"><span class="ccc">当前年级:</span>小学一年级</el-col>
<el-col :span="6"><span class="ccc">累计考试次数:</span>21次</el-col>
</el-row>
</div>
<p class="state">状态:在读中</p>
</div>
<div class="subjectbox">
<div class="titlebox">
<div class="title">科目趋势</div><div class="sjx" />
<el-select v-model="subject" size="small" placeholder="请选择">
<el-option
v-for="item in subjectList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<span class="ccc">按科目历史考试的正确率排序</span>
</div>
<div class="content">
<div id="myChart" :style="{width: '100%', height: '300px'}" />
</div>
</div>
<div class="rankbox">
<div class="titlebox">
<div class="title">成绩排名</div><div class="sjx" />
<el-select v-model="ssubject" size="small" style="float:right;margin-top:8px;margin-right:20px;" placeholder="请选择">
<el-option
v-for="item in ssubjectList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
<div class="content">
<el-table
:data="scoreData"
height="450"
style="width: 100%"
>
<el-table-column
prop="name"
label="姓名"
/>
<el-table-column
prop="rightbl"
label="正确率"
/>
<el-table-column
prop="rank"
label="班级排名"
/>
</el-table>
</div>
</div>
<div class="historybox">
<div class="titlebox">
<div class="title">往期考试</div><div class="sjx" />
<el-link href="#" style="line-height:40px;float:right;margin-right:20px;">更多>></el-link>
</div>
<div class="content">
<el-table
:data="historyData"
style="width: 100%"
>
<el-table-column
prop="name"
width="260"
:show-overflow-tooltip="true"
label="试卷名"
/>
<el-table-column
prop="youbl"
label="优秀率"
/>
<el-table-column
prop="bujigebl"
label="不及格率"
/>
<el-table-column
prop="lostbl"
label="缺考率"
/>
</el-table>
</div>
</div>
<div class="lostbox">
<div class="titlebox">
<div class="title">缺考排行</div><div class="sjx" />
TOP3
</div>
<div class="content">
<div v-for="(value,index) in lostData" :key="index" class="lostlist">
<div class="round">{{ value.num }}次</div>
<p>{{ value.name }}</p>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import Dec from '@/components/Dec'
export default {
name: 'Classes',
components: {
Dec
},
data() {
return {
content: '',
grade: '',
classes: '',
subject: '',
ssubject: '',
gradeList: [
{
label: '小学一年级',
value: '1'
},
{
label: '小学二年级',
value: '2'
}
],
classesList: [
{
label: '一班',
value: '1'
},
{
label: '二班',
value: '2'
}
],
subjectList: [
{
label: '数学',
value: '1'
}
],
ssubjectList: [
{
label: '数学',
value: '1'
}
],
scoreData: [
{
name: '张三',
rightbl: '99%',
rank: '1'
}
],
historyData: [
{
name: '【第六章-经济学人】测验试卷一',
youbl: '34%',
bujigebl: '9%',
lostbl: '1%'
}
],
lostData: [
{
name: '小鬼',
num: '8'
},
{
name: '李荣浩',
num: '5'
},
{
name: '杨千嬅',
num: '3'
}
]
}
},
mounted() {
this.drawLine()
},
methods: {
drawLine() {
// 基于准备好的dom,初始化echarts实例
const myChart = this.$echarts.init(document.getElementById('myChart'))
// 绘制图表
myChart.setOption({
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
axisLabel: {
rotate: 60
}
},
tooltip: {
trigger: 'axis'
},
yAxis: {
type: 'value'
},
series: [{
data: [820, 932, 901, 934, 1290, 1330, 1320],
type: 'line'
}]
})
}
}
}
</script>
<style scoped>
.classes{
max-width: 1700px;
min-width: 1100px;
height:calc(100vh - 115px);
margin:0 auto;
background: #fff;
margin-top:15px;
padding:20px;
overflow: auto
}
.sjx{
display: inline-block;
width:0;
height:0;
border-top:20px solid transparent;
border-bottom:20px solid transparent;
border-left: 20px solid #000;
vertical-align: middle;
}
.title{
width:200px;
height:40px;
background: #000;
display: inline-block;
vertical-align: middle;
color:#fff;
line-height: 40px;
text-align: center
}
.classinfo{
border:1px solid #888;
border-radius: 20px;
padding:20px;
overflow: hidden;
font-size:14px;
margin-top: 10px;
position: relative;
}
.ccc{
color:#888
}
.box-l{
width:15%;
text-align: center;
border-right:1px solid #ccc;
float:left
}
.box-r{
width:80%;
margin-left:5%;
float: left;
line-height:74px;
}
.state{
position: absolute;
top:0px;
right:20px;
}
.subjectbox{
border:1px solid #888;
margin-top:10px;
height:400px;
border-radius: 0 10px 10px 10px;
}
.rankbox{
width:calc(50% - 5px);
height:510px;
margin-top:10px;
border:1px solid #888;
border-radius: 0 10px 10px 10px;
float: left;
}
.rankbox .content{
margin-top:10px;
}
.historybox{
width:calc(50% - 5px);
height:300px;
float: left;
margin-left:10px;
margin-top:10px;
border:1px solid #888;
border-radius: 0 10px 10px 10px;
}
.lostbox{
width:calc(50% - 5px);
height:200px;
float: left;
margin-left:10px;
margin-top:10px;
border:1px solid #888;
border-radius: 0 10px 10px 10px;
}
.lostlist{
float: left;
width:30%;
margin-top:30px;
text-align: center
}
.lostlist .round{
width:60px;
height:60px;
line-height: 60px;
text-align: center;
display: inline-block;
border-radius: 30px;
border:1px solid #ff8d00;
color:#ff8d00
}
.lostlist p{
color:#ff8d00;
margin: 0;
line-height: 30px;
}
</style>