f45b3c05
LH_PC
云平台新UI界面
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
<template>
<el-container class="default-body">
<el-header>
<back-box class="detailBack">
<template slot="title">
<span class="default-title">
{{ title }}
</span>
</template>
</back-box>
</el-header>
<div class="default-filter">
已考班级:
|
6bca489d
LH_PC
云平台二期UI
|
14
15
|
<el-checkbox style="margin-right:15px;" class="_el-checkbox" :checked="checkAll"
@change="_handleCheckAllChange">全选</el-checkbox>
|
f45b3c05
LH_PC
云平台新UI界面
|
16
|
<el-checkbox-group style="display: inline-block" v-model="checkedClassInfos" @change="_handleCheckedClassChange">
|
f45b3c05
LH_PC
云平台新UI界面
|
17
|
<el-checkbox class="_el-checkbox" v-for="classItem in classInfos" :key="classItem.classId"
|
6bca489d
LH_PC
云平台二期UI
|
18
|
:label="classItem.classId">
|
f45b3c05
LH_PC
云平台新UI界面
|
19
20
21
|
{{ classItem.className }}
</el-checkbox>
</el-checkbox-group>
|
6bca489d
LH_PC
云平台二期UI
|
22
|
<el-button type="primary" style='float: right;' @click="_anys">分析</el-button>
|
f45b3c05
LH_PC
云平台新UI界面
|
23
24
|
</div>
<el-main>
|
6bca489d
LH_PC
云平台二期UI
|
25
|
<div style="position: relative" Id="print-content">
|
f45b3c05
LH_PC
云平台新UI界面
|
26
27
28
|
<el-tabs v-model="tabType" v-loading="queryLoading" type="card" class="default-tabs">
<el-tab-pane :name="'成绩测验单'" :label="`成绩测验单`" style="padding: 0 20px">
<div style="height: calc(100% - 80px);">
|
6bca489d
LH_PC
云平台二期UI
|
29
|
<el-row class="row-subfix print-hidden">
|
f45b3c05
LH_PC
云平台新UI界面
|
30
|
<div style="float: right;margin-bottom: 20px;">
|
6bca489d
LH_PC
云平台二期UI
|
31
32
33
34
35
36
|
单题低分率:
<el-input-number class="parent-number" v-model="lowLevel" :min="1" :max="100" label="低分率">
</el-input-number>
<el-button style="margin-left:10px;" @click="_import" type="primary" class="opration-btn"
icon="el-icon-upload2">导出报表</el-button>
<el-button @click="_print" type="primary" class="opration-btn" icon="el-icon-printer">打印报表</el-button>
|
f45b3c05
LH_PC
云平台新UI界面
|
37
38
|
</div>
</el-row>
|
6bca489d
LH_PC
云平台二期UI
|
39
|
<el-row class="row-subfix" :key="index" v-for="(item, index) in testTranscript.titleInfo || []">
|
f45b3c05
LH_PC
云平台新UI界面
|
40
41
42
43
44
45
|
<div class="row-line">
<span class="line-subfix">班级:</span>
<span class="line-value">{{ item.className }}</span>
</div>
<div class="row-line">
<span class="line-subfix">试卷名称:</span>
|
6bca489d
LH_PC
云平台二期UI
|
46
47
48
|
<el-tooltip effect="dark" :content="item.paperName" placement="left">
<span class="line-value">{{ item.paperName }}</span>
</el-tooltip>
|
f45b3c05
LH_PC
云平台新UI界面
|
49
50
51
52
53
54
55
|
</div>
<div class="row-line">
<span class="line-subfix">测验时间:</span>
<span class="line-value">{{ item.testTime }}</span>
</div>
</el-row>
<el-row class="row-subfix">
|
6bca489d
LH_PC
云平台二期UI
|
56
|
<el-table class="default-table" style="margin-top: 10px" :data="testTranscript.titleInfo || []">
|
f45b3c05
LH_PC
云平台新UI界面
|
57
58
59
60
61
62
63
64
65
66
67
68
|
<el-table-column prop="testCount" label="测验人数" width="120" />
<el-table-column prop="avg" label="平均分" width="120" />
<el-table-column prop="hight" label="最高分" width="120" />
<el-table-column prop="low" label="最低分" width="120" />
<el-table-column prop="title" label="缺考名单">
<template slot-scope="scoped">
{{ scoped.row.miss.join("/") }}
</template>
</el-table-column>
</el-table>
</el-row>
<el-row class="row-subfix">
|
6bca489d
LH_PC
云平台二期UI
|
69
|
<el-table class="default-table" style="margin-top: 10px" :data="testTranscript.studentList || []">
|
f45b3c05
LH_PC
云平台新UI界面
|
70
|
<el-table-column :width="item.label == '学号' ? 120 : 0" :prop="item.prop" :label="item.label"
|
6bca489d
LH_PC
云平台二期UI
|
71
|
:key="index" v-for="(item, index) in testTranscript.studentHeader || []" />
|
f45b3c05
LH_PC
云平台新UI界面
|
72
73
|
</el-table>
</el-row>
|
6bca489d
LH_PC
云平台二期UI
|
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
|
<el-row class="row-subfix" style="margin-top:10px">
<el-table class="default-table"
v-if="testTranscript && testTranscript.question4List && testTranscript.question4List.length >= 1"
:data="testTranscript.question4List">
<el-table-column prop="column0" label="题号&答案" />
<el-table-column prop="column1" label="得分率">
<template slot-scope="scoped">
<div :class="Number(scoped.row.column1?.replace('%', '')) <= lowLevel ? 'lowLevelClass' : ''">
{{ scoped.row.column1 }}
</div>
</template>
</el-table-column>
<el-table-column prop="column2" label="选项1" />
<el-table-column prop="column3" label="选项2" />
<el-table-column prop="column4" label="选项3" />
<el-table-column prop="column5" label="选项4" />
<el-table-column prop="column6" label="题号&答案" />
<el-table-column prop="column7" label="得分率">
<template slot-scope="scoped">
<div :class="Number(scoped.row.column7?.replace('%', '')) <= lowLevel ? 'lowLevelClass' : ''">
{{ scoped.row.column7 }}
</div>
</template>
</el-table-column>
<el-table-column prop="column8" label="选项1" />
<el-table-column prop="column9" label="选项2" />
<el-table-column prop="column10" label="选项3" />
<el-table-column prop="column11" label="选项4" />
<el-table-column prop="column12" label="题号&答案" />
<el-table-column prop="column13" label="得分率">
<template slot-scope="scoped">
<div :class="Number(scoped.row.column13?.replace('%', '')) <= lowLevel ? 'lowLevelClass' : ''">
{{ scoped.row.column13 }}
</div>
</template>
</el-table-column>
<el-table-column prop="column14" label="选项1" />
<el-table-column prop="column15" label="选项2" />
<el-table-column prop="column16" label="选项3" />
<el-table-column prop="column17" label="选项4" />
</el-table>
</el-row>
<el-row class="row-subfix" style="margin-top:10px">
<el-table class="default-table"
v-if="testTranscript && testTranscript.question7List && testTranscript.question7List.length >= 1"
:data="testTranscript.question7List">
<el-table-column prop="column0" label="题号&答案" />
<el-table-column prop="column1" label="得分率">
<template slot-scope="scoped">
<div :class="Number(scoped.row.column1?.replace('%', '')) <= lowLevel ? 'lowLevelClass' : ''">
{{ scoped.row?.column1 }}
</div>
</template>
</el-table-column>
<el-table-column prop="column2" label="选项1" />
<el-table-column prop="column3" label="选项2" />
<el-table-column prop="column4" label="选项3" />
<el-table-column prop="column5" label="选项4" />
<el-table-column prop="column6" label="选项5" />
<el-table-column prop="column7" label="选项6" />
<el-table-column prop="column8" label="选项7" />
<el-table-column prop="column9" label="题号&答案" />
<el-table-column prop="column10" label="得分率">
<template slot-scope="scoped">
<div :class="Number(scoped.row.column10?.replace('%', '')) <= lowLevel ? 'lowLevelClass' : ''">
{{ scoped.row?.column10 }}
</div>
</template>
</el-table-column>
<el-table-column prop="column11" label="选项1" />
<el-table-column prop="column12" label="选项2" />
<el-table-column prop="column13" label="选项3" />
<el-table-column prop="column14" label="选项4" />
<el-table-column prop="column15" label="选项5" />
<el-table-column prop="column16" label="选项6" />
<el-table-column prop="column17" label="选项7" />
|
f45b3c05
LH_PC
云平台新UI界面
|
150
151
|
</el-table>
</el-row>
|
6bca489d
LH_PC
云平台二期UI
|
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
<el-row class="row-subfix">
<el-table class="default-table"
v-if="testTranscript && testTranscript.question10List && testTranscript.question10List.length >= 1"
:data="testTranscript.question10List">
<el-table-column prop="column0" label="题号&答案" />
<el-table-column prop="column1" label="得分率">
<template slot-scope="scoped">
<div :class="Number(scoped.row.column1?.replace('%', '')) <= lowLevel ? 'lowLevelClass' : ''">
{{ scoped.row?.column1 }}
</div>
</template>
</el-table-column>
<el-table-column prop="column2" label="选项1" />
<el-table-column prop="column3" label="选项2" />
<el-table-column prop="column4" label="选项3" />
<el-table-column prop="column5" label="选项4" />
<el-table-column prop="column6" label="选项5" />
<el-table-column prop="column7" label="选项6" />
<el-table-column prop="column8" label="选项7" />
<el-table-column prop="column9" label="选项8" />
<el-table-column prop="column10" label="选项9" />
<el-table-column prop="column11" label="选项10" />
|
f45b3c05
LH_PC
云平台新UI界面
|
174
175
176
|
</el-table>
</el-row>
<el-row class="row-subfix">
|
6bca489d
LH_PC
云平台二期UI
|
177
|
<el-table class="default-table" style="margin-top: 10px" :data="testTranscript.questionTotal || []">
|
f45b3c05
LH_PC
云平台新UI界面
|
178
179
180
181
182
|
<el-table-column prop="quesion" label="题号" width="120" />
<el-table-column prop="anwser" label="答案" width="120" />
<el-table-column prop="student" label="答错学生">
<template slot-scope="scoped">
<span>总计 <span style="color:red;">
|
6bca489d
LH_PC
云平台二期UI
|
183
|
{{ scoped.row.missPeopleNumber }}</span> 人
|
f45b3c05
LH_PC
云平台新UI界面
|
184
185
|
</span>
<span style="margin: 10px 0;"
|
6bca489d
LH_PC
云平台二期UI
|
186
|
v-for="(item, index) in scoped.row.details.filter(item => !item.right)">
|
f45b3c05
LH_PC
云平台新UI界面
|
187
188
189
190
191
192
193
194
|
选{{ item.option }}:{{ item.students.join("/") }}
</span>
<span></span>
</template>
</el-table-column>
</el-table>
</el-row>
</div>
|
6bca489d
LH_PC
云平台二期UI
|
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
|
<div style="height: 80px; width:240px;margin:20px auto;" class="print-hidden">
<el-button type="default" :size="'small'" @click="_changePage('prev')">
上一页</el-button>
{{ currentPage || 0 }}/{{ totalPage || 0 }}
<el-button type="default" style="margin-left:0px" :size="'small'"
@click="_changePage('next')">下一页</el-button>
</div>
<div style="display: none;">
<div id="test-print">
<div v-for="(testTranscript, index) in testTranscriptDatas">
<div style="margin-top:20px">
<el-row class="row-subfix" :key="index" v-for="(item, index) in testTranscript.titleInfo || []">
<div class="row-line">
<span class="line-subfix">班级:</span>
<span class="line-value">{{ item.className }}</span>
</div>
<div class="row-line">
<span class="line-subfix">试卷名称:</span>
<span class="line-value">{{ item.paperName }}</span>
</div>
<div class="row-line">
<span class="line-subfix">测验时间:</span>
<span class="line-value">{{ item.testTime }}</span>
</div>
</el-row>
<el-row class="row-subfix">
<el-table class="default-table" style="margin-top: 10px" :data="testTranscript.titleInfo || []">
<el-table-column prop="testCount" label="测验人数" width="120" />
<el-table-column prop="avg" label="平均分" width="120" />
<el-table-column prop="hight" label="最高分" width="120" />
<el-table-column prop="low" label="最低分" width="120" />
<el-table-column prop="title" label="缺考名单">
<template slot-scope="scoped">
{{ scoped.row.miss.join("/") }}
</template>
</el-table-column>
</el-table>
</el-row>
<el-row class="row-subfix">
<el-table class="default-table" style="margin-top: 10px" :data="testTranscript.studentList || []">
<el-table-column :width="item.label == '学号' ? 120 : 0" :prop="item.prop" :label="item.label"
:key="index" v-for="(item, index) in testTranscript.studentHeader || []" />
</el-table>
</el-row>
<el-row class="row-subfix" style="margin-top:10px">
<el-table class="default-table"
v-if="testTranscript && testTranscript.question4List && testTranscript.question4List.length >= 1"
:data="testTranscript.question4List">
<el-table-column prop="column0" label="题号&答案" />
<el-table-column prop="column1" label="得分率" />
<el-table-column prop="column2" label="选项1" />
<el-table-column prop="column3" label="选项2" />
<el-table-column prop="column4" label="选项3" />
<el-table-column prop="column5" label="选项4" />
<el-table-column prop="column6" label="题号&答案" />
<el-table-column prop="column7" label="得分率" />
<el-table-column prop="column8" label="选项1" />
<el-table-column prop="column9" label="选项2" />
<el-table-column prop="column10" label="选项3" />
<el-table-column prop="column11" label="选项4" />
<el-table-column prop="column12" label="题号&答案" />
<el-table-column prop="column13" label="得分率" />
<el-table-column prop="column14" label="选项1" />
<el-table-column prop="column15" label="选项2" />
<el-table-column prop="column16" label="选项3" />
<el-table-column prop="column17" label="选项4" />
</el-table>
</el-row>
<el-row class="row-subfix" style="margin-top:10px">
<el-table class="default-table"
v-if="testTranscript && testTranscript.question7List && testTranscript.question7List.length >= 1"
:data="testTranscript.question7List">
<el-table-column prop="column0" label="题号&答案" />
<el-table-column prop="column1" label="得分率" />
<el-table-column prop="column2" label="选项1" />
<el-table-column prop="column3" label="选项2" />
<el-table-column prop="column4" label="选项3" />
<el-table-column prop="column5" label="选项4" />
<el-table-column prop="column6" label="选项5" />
<el-table-column prop="column7" label="选项6" />
<el-table-column prop="column8" label="选项7" />
<el-table-column prop="column9" label="题号&答案" />
<el-table-column prop="column10" label="得分率" />
<el-table-column prop="column11" label="选项1" />
<el-table-column prop="column12" label="选项2" />
<el-table-column prop="column13" label="选项3" />
<el-table-column prop="column14" label="选项4" />
<el-table-column prop="column15" label="选项5" />
<el-table-column prop="column16" label="选项6" />
<el-table-column prop="column17" label="选项7" />
</el-table>
</el-row>
<el-row class="row-subfix">
<el-table class="default-table"
v-if="testTranscript && testTranscript.question10List && testTranscript.question10List.length >= 1"
:data="testTranscript.question10List">
<el-table-column prop="column0" label="题号&答案" />
<el-table-column prop="column1" label="得分率" />
<el-table-column prop="column2" label="选项1" />
<el-table-column prop="column3" label="选项2" />
<el-table-column prop="column4" label="选项3" />
<el-table-column prop="column5" label="选项4" />
<el-table-column prop="column6" label="选项5" />
<el-table-column prop="column7" label="选项6" />
<el-table-column prop="column8" label="选项7" />
<el-table-column prop="column9" label="选项8" />
<el-table-column prop="column10" label="选项9" />
<el-table-column prop="column11" label="选项10" />
</el-table>
</el-row>
<el-row class="row-subfix">
<el-table class="default-table" style="margin-top: 10px"
:data="testTranscript.questionTotal || []">
<el-table-column prop="quesion" label="题号" width="120" />
<el-table-column prop="anwser" label="答案" width="120" />
<el-table-column prop="student" label="答错学生">
<template slot-scope="scoped">
<span>总计 <span style="color:red;">
{{ scoped.row.missPeopleNumber }}</span> 人
</span>
<span style="margin: 10px 0;"
v-for="(item, index) in scoped.row.details.filter(item => !item.right)">
选{{ item.option }}:{{ item.students.join("/") }}
</span>
<span></span>
</template>
</el-table-column>
</el-table>
</el-row>
</div>
</div>
</div>
</div>
|
f45b3c05
LH_PC
云平台新UI界面
|
329
330
331
|
</el-tab-pane>
<el-tab-pane :name="'班级对比情况'" :label="`班级对比情况`" style="padding: 0 20px">
<div style="float: right;margin-bottom: 20px;">
|
6bca489d
LH_PC
云平台二期UI
|
332
333
334
335
336
|
<el-button @click="_studentLevelSet" class="green-el-button" type="primary">
设置学生成绩等级
</el-button>
<el-button @click="_import" type="primary" class="opration-btn" icon="el-icon-upload2">导出报表</el-button>
<el-button @click="_print" type="primary" class="opration-btn" icon="el-icon-printer">打印报表</el-button>
|
f45b3c05
LH_PC
云平台新UI界面
|
337
338
|
</div>
<el-table class="default-table" :data="classdiffExamReport">
|
6bca489d
LH_PC
云平台二期UI
|
339
340
341
|
<el-table-column prop="index" label="序号" width="60" />
<el-table-column prop="className" label="班级" width="80" />
<el-table-column label="测验人数/班级人数" width="180">
|
f45b3c05
LH_PC
云平台新UI界面
|
342
343
344
345
|
<template slot-scope="scoped">
{{ scoped.row.testCount }} / {{ scoped.row.classCount }}
</template>
</el-table-column>
|
6bca489d
LH_PC
云平台二期UI
|
346
|
<el-table-column prop="title" label="参与度" width="100">
|
f45b3c05
LH_PC
云平台新UI界面
|
347
|
<template slot-scope="scoped">
|
6bca489d
LH_PC
云平台二期UI
|
348
|
{{ Number(scoped.row.testCount * 100 / scoped.row.classCount).toFixed(2) }}%
|
f45b3c05
LH_PC
云平台新UI界面
|
349
350
|
</template>
</el-table-column>
|
6bca489d
LH_PC
云平台二期UI
|
351
352
353
|
<el-table-column prop="avg" label="班平均分" width="100" />
<el-table-column prop="hight" label="班最高分" width="100" />
<el-table-column prop="low" label="班最低分" width="100" />
|
f45b3c05
LH_PC
云平台新UI界面
|
354
355
|
<el-table-column prop="front20" label="前20名均分" width="120" />
<el-table-column prop="last20" label="后20名均分" width="120" />
|
6bca489d
LH_PC
云平台二期UI
|
356
357
358
359
360
361
362
|
<el-table-column v-for="(item, index) in defaultLevels.levels" :key="index"
:label="item[0] ? item[0] + '数(率)' : ''">
<template slot-scope="scoped">
{{ scoped.row.leverValues[item[0]] }}
</template>
</el-table-column>
<!-- <el-table-column prop="excellenRate" label="优秀数(率)" width="120">
|
f45b3c05
LH_PC
云平台新UI界面
|
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
|
<template slot-scope="scoped">
{{ scoped.row.excellenRate }}%
</template>
</el-table-column>
<el-table-column prop="goodRate" label="良好数(率)" width="120">
<template slot-scope="scoped">
{{ scoped.row.goodRate }}%
</template>
</el-table-column>
<el-table-column prop="passRate" label="合格数(率)" width="120">
<template slot-scope="scoped">
{{ scoped.row.passRate }}%
</template>
</el-table-column>
<el-table-column prop="failedRate" label="不合格数(率)" width="120">
<template slot-scope="scoped">
{{ scoped.row.passRate }}%
</template>
|
6bca489d
LH_PC
云平台二期UI
|
381
|
</el-table-column> -->
|
f45b3c05
LH_PC
云平台新UI界面
|
382
383
384
385
|
</el-table>
</el-tab-pane>
<el-tab-pane :name="'试题分析表'" :label="`试题分析表`" style="padding: 0 20px">
<div style="float: right;margin-bottom: 20px;">
|
6bca489d
LH_PC
云平台二期UI
|
386
387
388
389
390
391
|
单题低分率
<el-input-number class="parent-number" v-model="lowLevel" :min="1" :max="100" label="低分率">
</el-input-number>
<el-button @click="_import" type="primary" style="margin-left:10px" class="opration-btn"
icon="el-icon-upload2">导出报表</el-button>
<el-button @click="_print" type="primary" class="opration-btn" icon="el-icon-printer">打印报表</el-button>
|
f45b3c05
LH_PC
云平台新UI界面
|
392
|
</div>
|
6bca489d
LH_PC
云平台二期UI
|
393
|
<el-table class="default-table" :data="testPaperExamReport" :span-method="arraySpanMethod">
|
f45b3c05
LH_PC
云平台新UI界面
|
394
395
396
397
398
399
|
<el-table-column prop="questionIndex" label="题号" width="120" />
<el-table-column prop="questionType" label="题型" width="100">
<template slot-scope="scope">
{{ setSubPro(scope.row.questionType) }}
</template>
</el-table-column>
|
6bca489d
LH_PC
云平台二期UI
|
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
|
<el-table-column prop="knowledge" label="知识点">
<template slot-scope="scoped">
<el-tooltip effect="dark" :content="scoped.row.knowledge" placement="left">
<span class="overflowText">
{{ scoped.row.knowledge }}
</span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column prop="score" label="满分值" width="120">
<template slot-scope="scoped">
<div v-if="scoped.row.type == 'colspan'">
{{ Number(scoped.row.score).toFixed(2) }}
</div>
<div v-else>
{{ scoped.row.score }}
</div>
</template>
</el-table-column>
<el-table-column prop="avgScore" label="年级平均分" width="120">
<template slot-scope="scoped">
<div v-if="scoped.row.type == 'colspan' && scoped.row.questionType != '客观题'"
:class="Number(scoped.row.avgScore) < lowLevel ? 'lowLevelClass' : ''">
{{ Number(scoped.row.avgScore).toFixed(2) }} %
</div>
<div v-else>
{{ scoped.row.avgScore }}
</div>
</template>
</el-table-column>
<el-table-column prop="gradeScoringRate" label="年级得分率" width="120">
<template slot-scope="scoped">
<div v-if="scoped.row.type == 'colspan'"
:class="scoped.row.gradeScoringRate < lowLevel ? 'lowLevelClass' : ''">
{{ scoped.row.gradeScoringRate }} %
</div>
<div v-else="scoped.row.gradeScoringRate"
:class="Number(scoped.row.gradeScoringRate * 100) < lowLevel ? 'lowLevelClass' : ''">
{{ Number(scoped.row.gradeScoringRate * 100).toFixed(2) }} %
</div>
</template>
</el-table-column>
|
f45b3c05
LH_PC
云平台新UI界面
|
442
|
<el-table-column prop="correctAnswer" label="答案" width="120" />
|
6bca489d
LH_PC
云平台二期UI
|
443
|
<el-table-column v-for="( item, index ) in testPaperExamReportOptions " :key="index" :label="item.title"
|
f45b3c05
LH_PC
云平台新UI界面
|
444
445
446
447
|
:prop="'count' + index" width="120">
<template slot-scope="scope">
<p class="persent">
{{
|
6bca489d
LH_PC
云平台二期UI
|
448
|
scope.row["option" + index] == "?" ? "未答" : scope.row.questionType == "5"
|
f45b3c05
LH_PC
云平台新UI界面
|
449
450
|
? ""
: scope.row["option" + index]
|
6bca489d
LH_PC
云平台二期UI
|
451
|
? `${scope.row["option" + index]} (${scope.row["persent" + index] ?? "0"
|
f45b3c05
LH_PC
云平台新UI界面
|
452
453
454
455
456
457
458
459
460
461
|
})`
: ""
}}
</p>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane :name="'学生成绩排行'" :label="`学生成绩排行`" style="padding: 0 20px">
<div style="float: right;margin-bottom: 20px;">
|
6bca489d
LH_PC
云平台二期UI
|
462
463
|
<el-button @click="_import" type="primary" class="opration-btn" icon="el-icon-upload2">导出报表</el-button>
<el-button @click="_print" type="primary" class="opration-btn" icon="el-icon-printer">打印报表</el-button>
|
f45b3c05
LH_PC
云平台新UI界面
|
464
465
|
</div>
<el-table class="default-table" style="margin-top: 10px" :data="testStudentExamReport">
|
6bca489d
LH_PC
云平台二期UI
|
466
|
<el-table-column prop="gradeRank" label="年级排名" />
|
f45b3c05
LH_PC
云平台新UI界面
|
467
468
469
470
|
<el-table-column prop="code" label="学号" />
<el-table-column prop="name" label="姓名" />
<el-table-column prop="className" label="班级" />
<el-table-column prop="exam" label="分数" />
|
6bca489d
LH_PC
云平台二期UI
|
471
|
<el-table-column prop="lever" label="成绩等级" />
|
f45b3c05
LH_PC
云平台新UI界面
|
472
473
|
</el-table>
</el-tab-pane>
|
6bca489d
LH_PC
云平台二期UI
|
474
|
|
f45b3c05
LH_PC
云平台新UI界面
|
475
476
477
|
</el-tabs>
</div>
</el-main>
|
6bca489d
LH_PC
云平台二期UI
|
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
|
<el-dialog :append-to-body="true" :close-on-click-modal="false" title="学生等级设置" :visible.sync="studentLevelDialog"
width="900px" @closed="_studentLevelClose">
<el-container class="default-body" style="background: transparent !important;">
<el-main>
<div class="default-main">
<el-form class="use-form">
<el-form-item class="use-form-item-box">
<el-form-item label="等级设置模式" class="use-form-item">
<el-select size="small" v-model="fromData.levelType">
<el-option label="按分数比例" :value="0"></el-option>
<el-option label="按已考人数比例" :value="1"></el-option>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item>
<div class="dia-tab-box">
<p class="dia-tab-tit">
<span class="item1 boxitem">序号</span>
<span class="item2 boxitem"><i>*</i>等级名称</span>
<span class="item3 boxitem"><i>*</i>等级最高</span>
<span class="item3 boxitem"><i>*</i>等级最低</span>
<span class="item boxitem">操作</span>
</p>
<div class="dia-tab-item" v-for="(item, index) in fromData.levels" :key="index">
<span class="item1 boxitem">{{ index + 1 }}</span>
<p class="item2 boxitem">
<el-input class="score-ipt" v-model="item[0]" :maxlength="12"
@keydown.native="keydownRange($event)"></el-input>
</p>
<p class="item3 boxitem">
<el-input class="score-ipt" type="number" v-model="item[1]" :min="item[2]"
:max="index == 0 ? 100 : fromData.levels[index - 1][2]"
@keydown.native="keydownRange($event)"></el-input>
<span class="descption">
%
<template v-if="fromData.levelType == 0">
(
{{ index != 0 ? "不含" : "" }}
{{ Number(((item[1] / 100) * examPaperScore).toFixed(1)) }}分
)
</template>
<template v-else>{{ index != 0 ? "不含" : "" }}</template>
</span>
</p>
<p class="item3 boxitem">
<el-input class="score-ipt" type="number" v-model="item[2]" :min="0" :max="item[1]"
@keydown.native="keydownRange($event)"></el-input>
<span class="descption">
%
<template v-if="fromData.levelType == 0">
({{ Number(((item[2] / 100) * examPaperScore).toFixed(1)) }}分)
</template>
</span>
</p>
<p class="item boxitem">
<el-link type="danger" :underline="false" @click="fromData.levels.splice(index, 1)">删除</el-link>
</p>
</div>
<div class="add">
<p @click="fromData.levels.push(['', '', ''])">
<el-button size="mini" icon="el-icon-plus" circle type="primary"></el-button>添加一行
</p>
</div>
</div>
</el-form-item>
</el-form>
</div>
</el-main>
</el-container>
<div class="dialog-footer" slot="footer" align="right">
<el-button type="info" :size="'small'" @click="studentLevelDialog = false">取 消</el-button>
<el-button type="primary" class="green-el-button" :size="'small'" @click="_savefrom">保存</el-button>
</div>
</el-dialog>
|
f45b3c05
LH_PC
云平台新UI界面
|
552
553
554
555
|
</el-container>
</template>
<script>
|
6bca489d
LH_PC
云平台二期UI
|
556
|
import { formatDate, downloadFile, tablePrint } from "utils";
|
f45b3c05
LH_PC
云平台新UI界面
|
557
558
559
|
export default {
data() {
return {
|
6bca489d
LH_PC
云平台二期UI
|
560
|
studentLevelDialog: false,
|
f45b3c05
LH_PC
云平台新UI界面
|
561
562
563
|
checkAll: true,
isIndeterminate: true,
title: "",
|
6bca489d
LH_PC
云平台二期UI
|
564
|
defaultLevels: [],
|
f45b3c05
LH_PC
云平台新UI界面
|
565
|
paperId: null,
|
6bca489d
LH_PC
云平台二期UI
|
566
567
|
lowLevel: 20,
anyLowLevel: 20,
|
f45b3c05
LH_PC
云平台新UI界面
|
568
|
classInfos: [],
|
6bca489d
LH_PC
云平台二期UI
|
569
570
571
572
573
574
575
576
577
578
579
580
581
|
examIds: [],
testTranscriptDatas: [],
testTranscript: {
titleInfo: [],
studentList: [],
studentHeader: [],
question4List: [],
question7List: [],
question10List: [],
questionTotal: [],
},
currentPage: 0,
totalPage: 0,
|
f45b3c05
LH_PC
云平台新UI界面
|
582
583
584
|
checkedClassInfos: [],
queryLoading: false,
tabType: "0",
|
6bca489d
LH_PC
云平台二期UI
|
585
586
587
588
589
590
591
592
593
594
|
examPaperScore: 100, //卷面最高分
fromData: {
levelType: 0,
levels: [
["优秀", 100, 90],
["良好", 89.9, 70],
["合格", 69.9, 60],
["不合格", 59.9, 0],
],
},
|
f45b3c05
LH_PC
云平台新UI界面
|
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
|
studentMapping: [
{
key: "code",
label: "学号",
},
{
key: "name",
label: "姓名",
},
{
key: "gradeRank",
label: "排名",
},
{
key: "exam",
label: "总分",
},
{
key: "objective",
label: "客观分",
},
{
key: "subjective",
label: "主观分",
},
],
|
f45b3c05
LH_PC
云平台新UI界面
|
621
622
623
624
625
626
627
|
testPaperExamReport: [],
testPaperExamReportOptions: [],
testStudentExamReport: [],
classdiffExamReport: [],
};
},
watch: {
|
6bca489d
LH_PC
云平台二期UI
|
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
|
async tabType() {
await this._anys();
},
async checkedClassInfos(value) {
if (value?.length >= 1) {
this.currentPage = 1;
this.totalPage = value.length;
} else {
this.currentPage = 0;
this.totalPage = 0;
}
this.tabType = '成绩测验单';
this.checkAll = value.length >= this.classInfos.length;
await this._anys();
},
async currentPage(value) {
await this._testExamReport(value - 1);
}
},
async created() {
this.title = this.$route.query.title || "";
this.paperId = this.$route.query.paperId;
this.classInfos = JSON.parse(this.$route.query.classListStr);
this.examIds = this.$route.query.examIds.split(',') || [];
this.checkedClassInfos = this.classInfos?.map(item => item.classId);
this.tabType = "成绩测验单";
await this._queryDefaultLevels();
},
methods: {
async _anys() {
this.queryLoading = true;
switch (this.tabType) {
|
f45b3c05
LH_PC
云平台新UI界面
|
660
|
case "成绩测验单":
|
6bca489d
LH_PC
云平台二期UI
|
661
|
await this._testExamReport(0);
|
f45b3c05
LH_PC
云平台新UI界面
|
662
663
664
665
666
667
668
669
670
671
672
|
break;
case "班级对比情况":
await this._classdiffExamReport();
break;
case "试题分析表":
await this._testPaperExamReport();
break;
case "学生成绩排行":
await this._testStudentExamReport();
break;
}
|
6bca489d
LH_PC
云平台二期UI
|
673
|
this.queryLoading = false;
|
f45b3c05
LH_PC
云平台新UI界面
|
674
|
},
|
6bca489d
LH_PC
云平台二期UI
|
675
|
async _queryDefaultLevels() {
|
f45b3c05
LH_PC
云平台新UI界面
|
676
|
|
6bca489d
LH_PC
云平台二期UI
|
677
|
const { data, info, status } = await this.$request.gdefaultLevels();
|
f45b3c05
LH_PC
云平台新UI界面
|
678
|
|
6bca489d
LH_PC
云平台二期UI
|
679
680
681
682
|
if (status != 0) {
this.$message.error(info);
return;
}
|
f45b3c05
LH_PC
云平台新UI界面
|
683
|
|
6bca489d
LH_PC
云平台二期UI
|
684
685
686
687
688
689
690
691
692
|
this.defaultLevels = { ...data } || {
levelType: 0,
levels: [
["优秀", 100, 90],
["良好", 89.9, 70],
["合格", 69.9, 60],
["不合格", 59.9, 0],
],
};
|
f45b3c05
LH_PC
云平台新UI界面
|
693
|
|
6bca489d
LH_PC
云平台二期UI
|
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
|
this.defaultLevels.type = 0
this.fromData.levelType = this.defaultLevels.levelType;
this.fromData.levels = [...this.defaultLevels.levels];
sessionStorage.setItem(
"levelFromData",
JSON.stringify(this.defaultLevels)
);
},
async _savefrom() {
for (let i = 0; i < this.fromData.levels.length; i++) {
if (this.fromData.levels[i].includes("")) {
this.$message.warning("请补全编号" + (i + 1) + "设置信息!");
return;
}
}
if (this.fromData.levels.length == 0) {
this.$message.warning("请添加等级设置!");
return;
}
let nums = [];
let ERR_OK = false;
this.fromData.levels.map((item) => {
nums.push(Number(item[1]));
nums.push(Number(item[2]));
});
for (let i = 0; i < nums.length; i++) {
if (nums[i + 1] && nums[i + 1] > nums[i]) {
ERR_OK = true;
this.$message.warning("高等级比例不能低于低等级比例!请检查");
break;
}
}
if (ERR_OK) return;
this.tableData = [];
this.tableData2 = [];
this.defaultLevels.type = this.fromData.type;
this.defaultLevels.levelType = this.fromData.levelType;
this.defaultLevels.levels = [...this.fromData.levels];
sessionStorage.setItem("levelFromData", JSON.stringify(this.fromData));
this.studentLevelDialog = false;
await this._anys();
// await this._classdiffExamReport();
},
_studentLevelSet() {
this.studentLevelDialog = true;
},
_studentLevelClose() {
let levelFromData = sessionStorage.getItem("levelFromData");
if (levelFromData) {
levelFromData = JSON.parse(levelFromData);
this.fromData.type = levelFromData.type;
this.fromData.levelType = levelFromData.levelType;
this.fromData.levels = [...levelFromData.levels];
} else {
this.fromData.type = 0;
this.fromData.levelType = this.defaultLevels.levelType;
this.fromData.levels = [...this.defaultLevels.levels];
}
},
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
if (rowIndex == this.testPaperExamReport?.length - 3) {
if (columnIndex == 0) {
return [3, 1];
}
else if (columnIndex == 6) {
return [3, 1];
}
else if (columnIndex == 7) {
return [3, 5];
}
else {
return [1, 1]
}
}
else {
return [1, 1]
}
},
keydownRange(event) {
if (event.key == "-" || event.key == "e") {
event.returnValue = "";
}
},
_changePage(status) {
if (status == "next") {
if (this.currentPage < this.checkedClassInfos.length) {
this.currentPage += 1;
}
}
else if (status == "prev") {
if (this.currentPage > 1) {
this.currentPage -= 1;
}
}
else {
this.$message.error('异常操作');
}
},
|
f45b3c05
LH_PC
云平台新UI界面
|
796
|
_handleCheckAllChange(val) {
|
6bca489d
LH_PC
云平台二期UI
|
797
798
799
|
this.checkAll = val;
if (val) this.checkedClassInfos = this.classInfos.map(item => item.classId);
else this.checkedClassInfos = [];
|
f45b3c05
LH_PC
云平台新UI界面
|
800
801
|
},
_handleCheckedClassChange(value) {
|
6bca489d
LH_PC
云平台二期UI
|
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
|
},
async _print() {
if (this.tabType == '成绩测验单') {
if (this.checkedClassInfos.length <= 0) {
this.$message.error('请选中班级');
return;
}
this.testTranscriptDatas = [];
for (var page = 0; page < this.checkedClassInfos.length; page++) {
this.testTranscriptDatas.push(await this._testExamReport(page));
}
setTimeout(() => {
tablePrint("test-print", this.tabType);
}, 500);
}
else {
tablePrint("print-content", this.tabType);
}
},
async _import() {
let importRequest;
switch (this.tabType) {
case "成绩测验单": {
importRequest = this.$request.tgexportPhaseExamReport;
} break;
case "班级对比情况": {
importRequest = this.$request.tgexportPhaseExamReport2;
} break;
case "试题分析表": {
importRequest = this.$request.tgexportPhaseExamReport3;
} break;
case "学生成绩排行": {
importRequest = this.$request.tgexportPhaseExamReport4;
} break;
}
let paramObj = JSON.parse(JSON.stringify(this.fromData))
if (paramObj.levelType == 0) {
paramObj.levels = paramObj.levels.map((item) => {
item[1] = ((item[1] / 100) * this.examPaperScore).toFixed(1);
item[2] = ((item[2] / 100) * this.examPaperScore).toFixed(1);
return item;
});
}
var data = await importRequest({
paperId: this.paperId,
classIds: this.checkedClassInfos ?? [],
examIds: this.classInfos.
filter(item =>
this.checkedClassInfos.includes(item.classId)).map(ida => ida.examId),
reportRange: paramObj
})
if (data) {
let blob = new Blob([data], {
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
});
downloadFile(this.tabType + ".xlsx", blob);
} else {
this.$message.error("下载失败");
}
|
f45b3c05
LH_PC
云平台新UI界面
|
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
|
},
_detailQ(id) { },
setSubPro(type) {
let tit;
switch (type) {
case 2:
tit = "单选题";
break;
case 3:
tit = "多选题";
break;
case 4:
tit = "判断题";
break;
case 5:
tit = "主观题";
break;
default:
|
6bca489d
LH_PC
云平台二期UI
|
885
|
tit = type;
|
f45b3c05
LH_PC
云平台新UI界面
|
886
887
888
|
}
return tit;
},
|
6bca489d
LH_PC
云平台二期UI
|
889
890
891
892
893
894
895
896
897
898
899
900
901
902
|
async _testExamReport(page, type) {
let demoTestTranscript = {
titleInfo: [],
studentList: [],
studentHeader: [],
question4List: [],
question7List: [],
question10List: [],
questionTotal: [],
};
if (type != 1) {
this.testTranscript = demoTestTranscript;
}
|
f45b3c05
LH_PC
云平台新UI界面
|
903
|
|
6bca489d
LH_PC
云平台二期UI
|
904
905
|
if (!this.checkedClassInfos || this.checkedClassInfos?.length <= 0) return;
|
f45b3c05
LH_PC
云平台新UI界面
|
906
907
908
909
910
|
const request = this.$request.gTestExamReport;
let response = await request({
paperId: this.paperId,
|
6bca489d
LH_PC
云平台二期UI
|
911
|
classIds: [this.checkedClassInfos[page]],
|
f45b3c05
LH_PC
云平台新UI界面
|
912
913
914
915
916
917
918
|
});
if (response.status != 0) {
this.$message.error(response.info);
return;
}
|
6bca489d
LH_PC
云平台二期UI
|
919
920
|
demoTestTranscript.titleInfo = response.data.titleInfos;
|
f45b3c05
LH_PC
云平台新UI界面
|
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
|
var studentHeaders = [];
var studentResults = [];
for (var iheader = 0; iheader < 3; iheader++) {
for (
var imapping = 0;
imapping < this.studentMapping.length;
imapping++
) {
studentHeaders.push({
prop: this.studentMapping[imapping].key + "_" + iheader,
label: this.studentMapping[imapping].label,
key: this.studentMapping[imapping].key,
});
}
}
|
6bca489d
LH_PC
云平台二期UI
|
939
|
demoTestTranscript.studentHeader = [...studentHeaders];
|
f45b3c05
LH_PC
云平台新UI界面
|
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
|
for (var isp = 0; isp < response.data.gradeExamStudentReports.length; isp++) {
var item = {};
for (
var iamapping = 0;
iamapping < studentHeaders.length;
iamapping++
) {
var currentData = response.data.gradeExamStudentReports[isp];
if (!currentData) continue;
var currentHeader = studentHeaders[iamapping];
item[currentHeader.prop] = currentData[currentHeader.key];
if (
iamapping >= this.studentMapping.length - 1 &&
iamapping % this.studentMapping.length == 0
) {
isp += 1;
}
}
studentResults.push(item);
}
|
6bca489d
LH_PC
云平台二期UI
|
969
|
demoTestTranscript.studentList = [...studentResults];
|
f45b3c05
LH_PC
云平台新UI界面
|
970
|
|
6bca489d
LH_PC
云平台二期UI
|
971
|
var show4Area = true; //显示4选项区域
|
f45b3c05
LH_PC
云平台新UI界面
|
972
|
|
6bca489d
LH_PC
云平台二期UI
|
973
|
var show7Area = true; //显示7选项区域
|
f45b3c05
LH_PC
云平台新UI界面
|
974
|
|
6bca489d
LH_PC
云平台二期UI
|
975
|
var show10Area = true; //显示10选项区域
|
f45b3c05
LH_PC
云平台新UI界面
|
976
|
|
6bca489d
LH_PC
云平台二期UI
|
977
|
var optionNumList = [];
|
f45b3c05
LH_PC
云平台新UI界面
|
978
|
|
6bca489d
LH_PC
云平台二期UI
|
979
|
var maxOptions = 4;
|
f45b3c05
LH_PC
云平台新UI界面
|
980
|
|
6bca489d
LH_PC
云平台二期UI
|
981
|
var minOptions = 10; //最多10个选项
|
f45b3c05
LH_PC
云平台新UI界面
|
982
|
|
6bca489d
LH_PC
云平台二期UI
|
983
|
var questionList = response.data.questionInfos;
|
f45b3c05
LH_PC
云平台新UI界面
|
984
|
|
6bca489d
LH_PC
云平台二期UI
|
985
|
questionList = questionList.sort((prev, next) => { return prev.questionIndex - next.questionIndex });
|
f45b3c05
LH_PC
云平台新UI界面
|
986
|
|
6bca489d
LH_PC
云平台二期UI
|
987
|
for (var i = 0; i < questionList.length; i++) {
|
f45b3c05
LH_PC
云平台新UI界面
|
988
|
|
6bca489d
LH_PC
云平台二期UI
|
989
|
var correctAnswerValue = questionList[i].correctAnswer == "1" ? "✓" : questionList[i].correctAnswer == 2 ? "✗" : questionList[i].correctAnswer;
|
f45b3c05
LH_PC
云平台新UI界面
|
990
|
|
6bca489d
LH_PC
云平台二期UI
|
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
|
var missCount = 0;
var missI = questionList[i].details.filter(item => !item.right);
missI.forEach(itemsa => {
missCount = Number(missCount) + Number(itemsa.students?.length ?? 0)
});
demoTestTranscript.questionTotal.push({
quesion: "Q" + (questionList[i].questionIndex),
anwser: correctAnswerValue ?? "-----",
details: questionList[i].details,
missPeopleNumber: missCount
})
if ((questionList[i].questionType == 2)) {
//单选题可能有超过4个选项,多选题是固定的
if (questionList[i].details?.length > maxOptions) {
maxOptions = questionList[i].details.filter(iam => { return iam.option.indexOf('未答') < 0 })?.length;
}
//单选题可能有超过4个选项,多选题是固定的
if (questionList[i].details?.length < minOptions) {
minOptions = questionList[i].details.filter(iam => { return iam.option.indexOf('未答') < 0 })?.length;
}
optionNumList.push(questionList[i].details.filter(iam => { return iam.option.indexOf('未答') < 0 })?.length);
}
if (questionList[i].questionType == 4) {
minOptions = 2;
optionNumList.push(2);
|
f45b3c05
LH_PC
云平台新UI界面
|
1021
1022
1023
|
}
}
|
6bca489d
LH_PC
云平台二期UI
|
1024
|
console.log(demoTestTranscript.questionTotal)
|
f45b3c05
LH_PC
云平台新UI界面
|
1025
|
|
6bca489d
LH_PC
云平台二期UI
|
1026
|
show4Area = minOptions <= 4;
|
f45b3c05
LH_PC
云平台新UI界面
|
1027
|
|
6bca489d
LH_PC
云平台二期UI
|
1028
|
show7Area = optionNumList.filter(o => o > 4 && o <= 7);
|
f45b3c05
LH_PC
云平台新UI界面
|
1029
|
|
6bca489d
LH_PC
云平台二期UI
|
1030
|
show10Area = optionNumList.filter(o => o > 7);
|
f45b3c05
LH_PC
云平台新UI界面
|
1031
|
|
f45b3c05
LH_PC
云平台新UI界面
|
1032
|
|
6bca489d
LH_PC
云平台二期UI
|
1033
|
var currentRow = {};
|
f45b3c05
LH_PC
云平台新UI界面
|
1034
|
|
6bca489d
LH_PC
云平台二期UI
|
1035
|
if (show4Area) {
|
f45b3c05
LH_PC
云平台新UI界面
|
1036
|
|
6bca489d
LH_PC
云平台二期UI
|
1037
|
var areaList = [];
|
f45b3c05
LH_PC
云平台新UI界面
|
1038
|
|
6bca489d
LH_PC
云平台二期UI
|
1039
|
var quesRow = Math.ceil(questionList?.length * 1.00 / 3);
|
f45b3c05
LH_PC
云平台新UI界面
|
1040
|
|
6bca489d
LH_PC
云平台二期UI
|
1041
1042
|
for (var irow = 0; irow < quesRow; irow++) {
areaList.push({});
|
f45b3c05
LH_PC
云平台新UI界面
|
1043
|
}
|
f45b3c05
LH_PC
云平台新UI界面
|
1044
|
|
6bca489d
LH_PC
云平台二期UI
|
1045
|
for (var i = 0; i < questionList?.length; i++) {
|
f45b3c05
LH_PC
云平台新UI界面
|
1046
|
|
6bca489d
LH_PC
云平台二期UI
|
1047
|
var col = parseInt(i / quesRow);
|
f45b3c05
LH_PC
云平台新UI界面
|
1048
|
|
6bca489d
LH_PC
云平台二期UI
|
1049
|
var row = parseInt(i % quesRow);
|
f45b3c05
LH_PC
云平台新UI界面
|
1050
|
|
6bca489d
LH_PC
云平台二期UI
|
1051
|
var question = questionList[i];
|
f45b3c05
LH_PC
云平台新UI界面
|
1052
|
|
6bca489d
LH_PC
云平台二期UI
|
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
|
var currentRow = areaList[row];
var correctAnswerValue = question.correctAnswer == "1" ? "✓" : question.correctAnswer == 2 ? "✗" : question.correctAnswer;
var details = question.details.filter(fl => {
return fl.option.indexOf('未答') < 0;
});
for (var ilr = 0; ilr < 6; ilr++) {
if (ilr == 0) {
currentRow['column' + Number(6 * col + ilr)] = question.questionIndex + correctAnswerValue;
}
else if (ilr == 1) {
currentRow['column' + Number(6 * col + ilr)] = (question.gradeScoringRate * 100).toFixed(2) + '%';
|
f45b3c05
LH_PC
云平台新UI界面
|
1069
1070
|
}
else {
|
6bca489d
LH_PC
云平台二期UI
|
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
|
var questionDetail = details[ilr - 2];
var questionColumn = 'column' + Number(6 * col + ilr);
if (details.length <= 4) {
var questionOption = questionDetail ? (questionDetail.option == "1" ? "✓" : questionDetail.option == "2" ? "✗" : questionDetail.option) : "- -"
if (questionOption != "- -") questionOption += "(" + questionDetail.persent + ")";
currentRow[questionColumn] = questionOption;
}
else {
currentRow[questionColumn] = "--";
}
|
f45b3c05
LH_PC
云平台新UI界面
|
1087
1088
|
}
}
|
f45b3c05
LH_PC
云平台新UI界面
|
1089
1090
|
}
|
6bca489d
LH_PC
云平台二期UI
|
1091
1092
|
demoTestTranscript.question4List = [...areaList]
|
f45b3c05
LH_PC
云平台新UI界面
|
1093
1094
|
}
|
f45b3c05
LH_PC
云平台新UI界面
|
1095
|
|
6bca489d
LH_PC
云平台二期UI
|
1096
|
if (show7Area && show7Area.length > -1) {
|
f45b3c05
LH_PC
云平台新UI界面
|
1097
|
|
6bca489d
LH_PC
云平台二期UI
|
1098
|
var areaList = [];
|
f45b3c05
LH_PC
云平台新UI界面
|
1099
|
|
6bca489d
LH_PC
云平台二期UI
|
1100
|
var quesRow = Math.ceil(show7Area.length * 1.00 / 2);
|
f45b3c05
LH_PC
云平台新UI界面
|
1101
|
|
6bca489d
LH_PC
云平台二期UI
|
1102
|
var num = 0;
|
f45b3c05
LH_PC
云平台新UI界面
|
1103
|
|
6bca489d
LH_PC
云平台二期UI
|
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
|
for (var irow = 0; irow < quesRow; irow++) {
areaList.push({});
}
for (var i = 0; i < questionList?.length; i++) {
var question = questionList[i];
var details = question.details.filter(fl => {
return fl.option.indexOf('未答') < 0;
|
f45b3c05
LH_PC
云平台新UI界面
|
1114
|
});
|
6bca489d
LH_PC
云平台二期UI
|
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
|
if (question.questionType == 2 && details.length > 4 && details.length <= 7) {
var col = parseInt(num / quesRow);
var row = parseInt(num % quesRow);
var currentRow = areaList[row];
var correctAnswerValue = question.correctAnswer == "1" ? "✓" : question.correctAnswer == 2 ? "✗" : question.correctAnswer;
for (var ilr = 0; ilr < 9; ilr++) {
if (ilr == 0) {
currentRow['column' + Number(9 * col + ilr)] = question.questionIndex + correctAnswerValue;
}
else if (ilr == 1) {
currentRow['column' + Number(9 * col + ilr)] = (question.gradeScoringRate * 100).toFixed(2) + '%';
}
else {
var questionDetail = details[ilr - 2];
var questionColumn = 'column' + Number(9 * col + ilr);
currentRow[questionColumn] = questionDetail ? questionDetail.option + "(" + questionDetail.persent + ")" : "- -";
}
}
num = num + 1;
}
|
f45b3c05
LH_PC
云平台新UI界面
|
1147
|
}
|
6bca489d
LH_PC
云平台二期UI
|
1148
1149
|
demoTestTranscript.question7List = [...areaList]
|
f45b3c05
LH_PC
云平台新UI界面
|
1150
1151
|
}
|
f45b3c05
LH_PC
云平台新UI界面
|
1152
|
|
6bca489d
LH_PC
云平台二期UI
|
1153
|
if (show10Area && show10Area.length > -1) {
|
f45b3c05
LH_PC
云平台新UI界面
|
1154
|
|
6bca489d
LH_PC
云平台二期UI
|
1155
|
var areaList = [];
|
f45b3c05
LH_PC
云平台新UI界面
|
1156
|
|
6bca489d
LH_PC
云平台二期UI
|
1157
|
var quesRow = show10Area.length;
|
f45b3c05
LH_PC
云平台新UI界面
|
1158
|
|
6bca489d
LH_PC
云平台二期UI
|
1159
|
var num = 0;
|
f45b3c05
LH_PC
云平台新UI界面
|
1160
|
|
6bca489d
LH_PC
云平台二期UI
|
1161
1162
|
for (var irow = 0; irow < quesRow; irow++) {
areaList.push({});
|
f45b3c05
LH_PC
云平台新UI界面
|
1163
1164
|
}
|
6bca489d
LH_PC
云平台二期UI
|
1165
|
for (var i = 0; i < questionList?.length; i++) {
|
f45b3c05
LH_PC
云平台新UI界面
|
1166
|
|
6bca489d
LH_PC
云平台二期UI
|
1167
|
var question = questionList[i];
|
f45b3c05
LH_PC
云平台新UI界面
|
1168
|
|
6bca489d
LH_PC
云平台二期UI
|
1169
1170
1171
|
var details = question.details.filter(fl => {
return fl.option.indexOf('未答') < 0;
});
|
f45b3c05
LH_PC
云平台新UI界面
|
1172
|
|
6bca489d
LH_PC
云平台二期UI
|
1173
1174
|
if (question.questionType == 2 && details.length > 7) {
var col = parseInt(num / quesRow);
|
f45b3c05
LH_PC
云平台新UI界面
|
1175
|
|
6bca489d
LH_PC
云平台二期UI
|
1176
|
var row = num;
|
f45b3c05
LH_PC
云平台新UI界面
|
1177
|
|
6bca489d
LH_PC
云平台二期UI
|
1178
|
var currentRow = areaList[row];
|
f45b3c05
LH_PC
云平台新UI界面
|
1179
|
|
6bca489d
LH_PC
云平台二期UI
|
1180
|
var correctAnswerValue = question.correctAnswer == "1" ? "✓" : question.correctAnswer == 2 ? "✗" : question.correctAnswer;
|
f45b3c05
LH_PC
云平台新UI界面
|
1181
|
|
6bca489d
LH_PC
云平台二期UI
|
1182
|
for (var ilr = 0; ilr < 12; ilr++) {
|
f45b3c05
LH_PC
云平台新UI界面
|
1183
|
|
6bca489d
LH_PC
云平台二期UI
|
1184
1185
1186
1187
1188
1189
1190
|
if (ilr == 0) {
currentRow['column' + Number(12 * col + ilr)] = question.questionIndex + correctAnswerValue;
}
else if (ilr == 1) {
currentRow['column' + Number(12 * col + ilr)] = (question.gradeScoringRate * 100).toFixed(2) + '%';
}
else {
|
f45b3c05
LH_PC
云平台新UI界面
|
1191
|
|
6bca489d
LH_PC
云平台二期UI
|
1192
|
var questionDetail = details[ilr - 2];
|
f45b3c05
LH_PC
云平台新UI界面
|
1193
|
|
6bca489d
LH_PC
云平台二期UI
|
1194
|
var questionColumn = 'column' + Number(12 * col + ilr);
|
f45b3c05
LH_PC
云平台新UI界面
|
1195
|
|
6bca489d
LH_PC
云平台二期UI
|
1196
1197
1198
|
currentRow[questionColumn] = questionDetail ? questionDetail.option + "(" + questionDetail.persent + ")" : "- -";
}
}
|
f45b3c05
LH_PC
云平台新UI界面
|
1199
|
|
6bca489d
LH_PC
云平台二期UI
|
1200
1201
|
num = num + 1;
}
|
f45b3c05
LH_PC
云平台新UI界面
|
1202
|
|
f45b3c05
LH_PC
云平台新UI界面
|
1203
|
}
|
6bca489d
LH_PC
云平台二期UI
|
1204
1205
|
demoTestTranscript.question10List = [...areaList]
|
f45b3c05
LH_PC
云平台新UI界面
|
1206
1207
|
}
|
6bca489d
LH_PC
云平台二期UI
|
1208
1209
|
return demoTestTranscript;
|
f45b3c05
LH_PC
云平台新UI界面
|
1210
1211
1212
|
},
async _testPaperExamReport() {
|
6bca489d
LH_PC
云平台二期UI
|
1213
1214
1215
1216
1217
1218
1219
|
this.testPaperExamReport = [];
this.testPaperExamReportOptions = [];
if (!this.checkedClassInfos || this.checkedClassInfos?.length <= 0) return;
|
f45b3c05
LH_PC
云平台新UI界面
|
1220
1221
1222
1223
|
const request = this.$request.gPaperExamReport;
let response = await request({
paperId: this.paperId,
|
6bca489d
LH_PC
云平台二期UI
|
1224
|
classIds: this.checkedClassInfos,
|
f45b3c05
LH_PC
云平台新UI界面
|
1225
1226
1227
1228
1229
1230
|
});
if (response.status != 0) {
this.$message.error(response.info);
return;
}
|
6bca489d
LH_PC
云平台二期UI
|
1231
1232
1233
1234
1235
1236
1237
1238
1239
|
var maxOption = 0;
response.data.forEach((item) => {
if (item.details) {
if (maxOption < item.details.length) {
maxOption = item.details.length;
}
}
})
|
f45b3c05
LH_PC
云平台新UI界面
|
1240
|
|
6bca489d
LH_PC
云平台二期UI
|
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
|
let optionsList = [];
for (var io = 0; io < maxOption; io++) {
optionsList.push({})
}
//主观
var subjective = {
sum: 0.0,
avg: 0.0,
rate: 0.0,
number: 0
};
//客观
var objective = {
sum: 0.0,
avg: 0.0,
rate: 0.0,
number: 0
};
//汇总
var summary = {
sum: 0.0,
avg: 0.0,
rate: 0.0,
number: 0
};
|
f45b3c05
LH_PC
云平台新UI界面
|
1269
1270
|
let tableData = response.data?.map((item) => {
|
6bca489d
LH_PC
云平台二期UI
|
1271
|
|
f45b3c05
LH_PC
云平台新UI界面
|
1272
|
let params = {};
|
6bca489d
LH_PC
云平台二期UI
|
1273
|
|
f45b3c05
LH_PC
云平台新UI界面
|
1274
|
const detail = item.details;
|
6bca489d
LH_PC
云平台二期UI
|
1275
|
|
f45b3c05
LH_PC
云平台新UI界面
|
1276
1277
1278
|
let lastOPtion = detail?.find((item) => {
return item.option == "未答";
});
|
6bca489d
LH_PC
云平台二期UI
|
1279
|
|
f45b3c05
LH_PC
云平台新UI界面
|
1280
1281
1282
|
let defaultArr = detail?.filter((item) => {
return item.option != "未答";
});
|
6bca489d
LH_PC
云平台二期UI
|
1283
|
|
f45b3c05
LH_PC
云平台新UI界面
|
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
|
optionsList.map((items, index) => {
if (index != 4) {
params["count" + index] =
defaultArr[index]?.option != "未答"
? defaultArr[index]?.count
: "";
params["persent" + index] =
defaultArr[index]?.option != "未答"
? defaultArr[index]?.persent
: "";
params["option" + index] =
defaultArr[index]?.option != "未答"
? defaultArr[index]?.option == 1
? "✓"
: defaultArr[index]?.option == 2
? "✗"
: defaultArr[index]?.option
: "";
items["title"] = "选项" + (index + 1);
} else {
items["title"] = "未答";
|
6bca489d
LH_PC
云平台二期UI
|
1305
1306
|
params["count" + index] = lastOPtion?.count ?? "";
params["persent" + index] = lastOPtion?.persent ?? "";
|
f45b3c05
LH_PC
云平台新UI界面
|
1307
1308
1309
1310
|
params["option" + index] = "?";
}
});
|
6bca489d
LH_PC
云平台二期UI
|
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
|
summary.sum += parseFloat(item.score);
summary.avg += parseFloat(item.avgScore);
summary.rate += parseFloat(item.gradeScoringRate);
summary.number += 1;
if (item.questionType == 5) {
subjective.sum += parseFloat(item.score);
subjective.rate += parseFloat(item.gradeScoringRate);
subjective.avg += parseFloat(item.avgScore);
subjective.number += 1;
}
else {
objective.sum += parseFloat(item.score);
objective.rate += parseFloat(item.gradeScoringRate);
objective.avg += parseFloat(item.avgScore);
objective.number += 1;
}
|
f45b3c05
LH_PC
云平台新UI界面
|
1327
1328
1329
1330
1331
1332
1333
|
return {
...item,
...params,
};
});
this.testPaperExamReport = tableData?.sort((a, b) => {
|
6bca489d
LH_PC
云平台二期UI
|
1334
|
return Number(a.questionIndex) - Number(b.questionIndex);
|
f45b3c05
LH_PC
云平台新UI界面
|
1335
1336
1337
1338
|
});
this.testPaperExamReportOptions = [...optionsList];
|
6bca489d
LH_PC
云平台二期UI
|
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
|
console.log(objective, subjective, summary, Number(objective.avg / objective.sum))
this.testPaperExamReport.push({
questionIndex: "汇总",
questionType: "客观题",
type: "colspan",
score: objective.sum,
avgScore: objective.avg == 0 ? 0 : Number(objective.avg).toFixed(2),
gradeScoringRate: objective.avg == 0 ? 0 : Number(objective.avg * 100 / objective.sum).toFixed(2),
correctAnswer: "备注"
})
this.testPaperExamReport.push({
questionIndex: "主观题",
type: "colspan",
knowledge: subjective.sum,
score: subjective.avg == 0 ? 0 : Number(subjective.avg).toFixed(2),
avgScore: subjective.avg == 0 ? 0 : Number(subjective.avg * 100 / subjective.sum).toFixed(2)
})
this.testPaperExamReport.push({
questionIndex: "合计",
type: "colspan",
knowledge: summary.sum,
score: summary.avg == 0 ? 0 : Number(summary.avg).toFixed(2),
avgScore: summary.avg == 0 ? 0 : Number(summary.avg * 100 / summary.sum).toFixed(2)
})
|
f45b3c05
LH_PC
云平台新UI界面
|
1365
1366
|
},
async _testStudentExamReport() {
|
6bca489d
LH_PC
云平台二期UI
|
1367
1368
1369
|
this.testStudentExamReport = [];
if (!this.checkedClassInfos || this.checkedClassInfos?.length <= 0) return;
|
f45b3c05
LH_PC
云平台新UI界面
|
1370
1371
|
const request = this.$request.gStudentExamReport;
|
6bca489d
LH_PC
云平台二期UI
|
1372
1373
1374
1375
1376
1377
1378
1379
1380
|
let paramObj = JSON.parse(JSON.stringify(this.fromData))
if (paramObj.levelType == 0) {
paramObj.levels = paramObj.levels.map((item) => {
item[1] = ((item[1] / 100) * this.examPaperScore).toFixed(1);
item[2] = ((item[2] / 100) * this.examPaperScore).toFixed(1);
return item;
});
}
|
f45b3c05
LH_PC
云平台新UI界面
|
1381
1382
|
let response = await request({
paperId: this.paperId,
|
6bca489d
LH_PC
云平台二期UI
|
1383
1384
|
classIds: this.checkedClassInfos,
reportRange: paramObj
|
f45b3c05
LH_PC
云平台新UI界面
|
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
|
});
if (response.status != 0) {
this.$message.error(response.info);
return;
}
this.testStudentExamReport = response.data;
},
async _classdiffExamReport() {
|
6bca489d
LH_PC
云平台二期UI
|
1395
1396
1397
1398
1399
|
this.classdiffExamReport = [];
if (!this.checkedClassInfos || this.checkedClassInfos?.length <= 0) return;
|
f45b3c05
LH_PC
云平台新UI界面
|
1400
1401
|
const request = this.$request.gClassdiffExamReport;
|
6bca489d
LH_PC
云平台二期UI
|
1402
1403
1404
1405
1406
1407
1408
1409
1410
|
let paramObj = JSON.parse(JSON.stringify(this.fromData))
if (paramObj.levelType == 0) {
paramObj.levels = paramObj.levels.map((item) => {
item[1] = ((item[1] / 100) * this.examPaperScore).toFixed(1);
item[2] = ((item[2] / 100) * this.examPaperScore).toFixed(1);
return item;
});
}
|
f45b3c05
LH_PC
云平台新UI界面
|
1411
1412
|
let response = await request({
paperId: this.paperId,
|
6bca489d
LH_PC
云平台二期UI
|
1413
1414
|
classIds: this.checkedClassInfos,
reportRange: paramObj
|
f45b3c05
LH_PC
云平台新UI界面
|
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
|
});
if (response.status != 0) {
this.$message.error(response.info);
return;
}
var index = 0;
this.classdiffExamReport = response.data.map((item) => {
item.index = index + 1;
index += 1;
|
6bca489d
LH_PC
云平台二期UI
|
1426
|
|
f45b3c05
LH_PC
云平台新UI界面
|
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
|
return item;
});
},
_delete() { },
},
};
</script>
<style lang="scss">
._el-checkbox {
* {
height: 15px !important;
line-height: 15px !important;
}
}
.default-filter {
padding: 10px !important;
}
|
6bca489d
LH_PC
云平台二期UI
|
1446
|
|
f45b3c05
LH_PC
云平台新UI界面
|
1447
|
.row-line {
|
6bca489d
LH_PC
云平台二期UI
|
1448
1449
1450
|
overflow: hidden; //超出宽度隐藏
white-space: nowrap; //强制文字在一行
text-overflow: ellipsis; //文字溢出显示省略号
|
f45b3c05
LH_PC
云平台新UI界面
|
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
|
width: calc(33% - 2px);
border: 1px solid #ebeef5;
background: #f5f7fa;
display: inline-block;
height: 40px;
line-height: 40px;
.line-subfix {
margin-left: 10px;
}
|
6bca489d
LH_PC
云平台二期UI
|
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
|
}
.dia-tab-box {
font-size: 14px;
.boxitem {
border: 1px solid #DCDFE6;
margin: 0px !important;
* {
border: none;
}
}
.dia-tab-tit,
.dia-tab-item {
i {
color: #f30;
padding-right: 5px;
}
display: flex;
.item {
width: 80px;
}
.item1 {
padding-left: 10px;
width: 10%;
}
.item2 {
width: 18%;
}
.item3 {
padding-left: 12px;
flex: 1;
}
.score-ipt {
width: 100px;
}
}
.dia-tab-tit {
background: rgb(245, 247, 250) !important
}
.add {
display: flex;
justify-content: center;
margin: 0 auto;
p {
cursor: pointer;
}
.el-button {
margin-right: 6px;
}
}
|
f45b3c05
LH_PC
云平台新UI界面
|
1527
1528
|
}
</style>
|