Blame view

src/views/basic/askTestQuestion/detail.vue 103 KB
f45b3c05   LH_PC   云平台新UI界面
1
  <template>
ef16e57e   LH_PC   fix:前端版本迭代
2
      <el-container class="default-body default-body-detail">
f45b3c05   LH_PC   云平台新UI界面
3
4
5
6
7
8
9
10
11
12
13
          <el-header>
              <back-box class="detailBack">
                  <template slot="title">
                      <span class="default-title">
                          {{ title }}
                      </span>
                  </template>
              </back-box>
          </el-header>
          <div class="default-filter">
              <el-row class="row-type">
ef16e57e   LH_PC   fix:前端版本迭代
14
                  <label>报表类型</label>
f45b3c05   LH_PC   云平台新UI界面
15
16
17
18
19
                  <el-select @change="_changeType" v-if="dataType && currentType" class="opration-select"
                      v-model="currentType">
                      <el-option v-for="(item, index) in types" :lable="item.name" :key="index" :value="item.name" />
                  </el-select>
                  <div style="float: right;">
ead476dd   LH_PC   fix:最终定版
20
                      <span v-if="(dataType == '2' && currentType == '测验成绩单') || (dataType == '2' && currentType == '试题分析') ">
6bca489d   LH_PC   云平台二期UI
21
22
23
24
25
                          单题低分率:
                          <el-input-number class="parent-number" v-model="lowLevel" :min="1" :max="100" label="低分率">
                          </el-input-number>
                      </span>
  
ead476dd   LH_PC   fix:最终定版
26
                      <el-button v-if="(dataType == '3' && currentType == '班级对比情况表') ||  (dataType == '3' && currentType == '学生成绩排名')" @click="_studentLevelSet"
6bca489d   LH_PC   云平台二期UI
27
28
29
30
                          class="green-el-button">
                          设置学生成绩等级
                      </el-button>
                      <el-button type="primary" style="margin-left:10px;" @click="_export" class="opration-btn"
f45b3c05   LH_PC   云平台新UI界面
31
32
33
34
35
36
                          icon="el-icon-upload2">导出报表</el-button>
                      <el-button type="primary" @click="_print" class="opration-btn"
                          icon="el-icon-printer">打印报表</el-button>
                  </div>
              </el-row>
          </div>
ef16e57e   LH_PC   fix:前端版本迭代
37
          <el-main v-loading="loading">
f45b3c05   LH_PC   云平台新UI界面
38
              <div style=" padding: 20px;" id="print-content">
ef16e57e   LH_PC   fix:前端版本迭代
39
                  <div style="margin-bottom:20px;background:#ffb3b3;padding:10px 20px;" class="tips print-hidden"
6bca489d   LH_PC   云平台二期UI
40
41
42
                      v-if="paperModifyLog.modifiedTime && !status">
                      <p class="tips-p">
                          <i class="fa fa-bell-o"></i>
ef16e57e   LH_PC   fix:前端版本迭代
43
                          {{ `${paperModifyLog.modifiedTime} ${paperModifyLog.realName}` }}修改了试卷,是否重新记分?
6bca489d   LH_PC   云平台二期UI
44
45
46
47
48
                          <el-button type="danger" round @click="_reScore" size="mini">重新计分</el-button>
                          <el-button type="danger" round plain size="mini"
                              @click="paperModifyLog.modifiedTime = ''">暂时不计</el-button>
                      </p>
                  </div>
f45b3c05   LH_PC   云平台新UI界面
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
                  <div v-if="dataType == '1' && currentType == '试题分析'">
                      <el-row class="row-subfix">
                          <div class="row-line">
                              <span class="line-subfix">班级:</span>
                              <span class="line-value">{{ detail.className }}</span>
                          </div>
                          <div class="row-line">
                              <span class="line-subfix">科目:</span>
                              <span class="line-value">{{ detail.subjectName }}</span>
                          </div>
                          <div class="row-line">
                              <span class="line-subfix">课时数:</span>
                              <span class="line-value">{{ ids.length }}</span>
                          </div>
                          <div class="row-line">
                              <span class="line-subfix">上课时间:</span>
                              <span class="line-value">{{ detail.startTime }}</span>
                          </div>
                          <div class="row-line">
                              <span class="line-subfix">下课时间:</span>
                              <span class="line-value">{{ detail.endTime }}</span>
                          </div>
                      </el-row>
                      <el-row class="row-subfix">
ef16e57e   LH_PC   fix:前端版本迭代
73
                          <div class="row-line  row-line-5">
f45b3c05   LH_PC   云平台新UI界面
74
75
76
                              <span class="line-subfix">班级人数:</span>
                              <span class="line-value">{{ detail.classPersonNum }}</span>
                          </div>
ef16e57e   LH_PC   fix:前端版本迭代
77
                          <div class="row-line  row-line-5">
f45b3c05   LH_PC   云平台新UI界面
78
79
80
                              <span class="line-subfix">签到人数:</span>
                              <span class="line-value">{{ detail.checkInCount }}</span>
                          </div>
ef16e57e   LH_PC   fix:前端版本迭代
81
                          <div class="row-line  row-line-5">
f45b3c05   LH_PC   云平台新UI界面
82
83
84
                              <span class="line-subfix">题目总数:</span>
                              <span class="line-value">{{ detail.questionNum }}</span>
                          </div>
ef16e57e   LH_PC   fix:前端版本迭代
85
                          <div class="row-line  row-line-5">
f45b3c05   LH_PC   云平台新UI界面
86
87
88
                              <span class="line-subfix">答题总数:</span>
                              <span class="line-value">{{ detail.totalAnswersNum }}</span>
                          </div>
ef16e57e   LH_PC   fix:前端版本迭代
89
                          <div class="row-line  row-line-5">
f45b3c05   LH_PC   云平台新UI界面
90
91
92
93
94
                              <span class="line-subfix">课时时长:</span>
                              <span class="line-value">{{ setDuration(detail.duration) }}</span>
                          </div>
                      </el-row>
                      <el-row class="row-subfix">
ef16e57e   LH_PC   fix:前端版本迭代
95
                          <div class="row-line  row-line-5">
f45b3c05   LH_PC   云平台新UI界面
96
97
98
                              <span class="line-subfix">答对总数:</span>
                              <span class="line-value">{{ detail.totalCorrectAnswersNum }}</span>
                          </div>
ef16e57e   LH_PC   fix:前端版本迭代
99
                          <div class="row-line  row-line-5">
f45b3c05   LH_PC   云平台新UI界面
100
                              <span class="line-subfix">总参与度:</span>
6bca489d   LH_PC   云平台二期UI
101
                              <span class="line-value">{{ detail.participationRate }}%</span>
f45b3c05   LH_PC   云平台新UI界面
102
                          </div>
ef16e57e   LH_PC   fix:前端版本迭代
103
                          <div class="row-line  row-line-5">
f45b3c05   LH_PC   云平台新UI界面
104
                              <span class="line-subfix">班级正确率:</span>
6bca489d   LH_PC   云平台二期UI
105
                              <span class="line-value">{{ detail.classCorrectRate }}%</span>
f45b3c05   LH_PC   云平台新UI界面
106
                          </div>
ef16e57e   LH_PC   fix:前端版本迭代
107
108
                          <div class="row-line  row-line-5">
                              <span class="line-subfix">已答正确率:</span>
6bca489d   LH_PC   云平台二期UI
109
                              <span class="line-value">{{ detail.answerCorrectRate }}%</span>
f45b3c05   LH_PC   云平台新UI界面
110
                          </div>
ef16e57e   LH_PC   fix:前端版本迭代
111
                          <div class="row-line  row-line-5">
f45b3c05   LH_PC   云平台新UI界面
112
                              <span class="line-subfix">反馈时长:</span>
ef16e57e   LH_PC   fix:前端版本迭代
113
                              <span class="line-value">{{ setDuration1000(detail.consumingDuration) }}</span>
f45b3c05   LH_PC   云平台新UI界面
114
115
116
117
118
                          </div>
                      </el-row>
                      <el-row class="row-table">
                          <el-table class="default-table" :data="askItemAnalysis">
                              <el-table-column prop="title" label="课时-题号" />
ef16e57e   LH_PC   fix:前端版本迭代
119
                              <el-table-column label="题干" class-name="print-hidden" width="80">
f45b3c05   LH_PC   云平台新UI界面
120
121
122
123
124
125
126
127
128
                                  <template slot-scope="scoped">
                                      <el-button type="text" size="mini" @click="openStem(scoped.row)">查看</el-button>
                                  </template>
                              </el-table-column>
                              <el-table-column prop="questionType" label="题型" width="100">
                                  <template slot-scope="scoped">{{ setSubPro(scoped.row.questionType) }}</template>
                              </el-table-column>
                              <el-table-column prop="answeredNum" label="答题人数" width="100" />
                              <el-table-column prop="correctAnswerNum" label="答对人数" width="100" />
6bca489d   LH_PC   云平台二期UI
129
                              <el-table-column prop="participationRate" label="班级参与度(单题)" width="170">
f45b3c05   LH_PC   云平台新UI界面
130
131
                                  <template slot-scope="scoped">{{ scoped.row.participationRate }}%</template>
                              </el-table-column>
6bca489d   LH_PC   云平台二期UI
132
                              <el-table-column prop="classCorrectRate" label="班级正确率(单题)" width="170">
f45b3c05   LH_PC   云平台新UI界面
133
134
135
                                  <template slot-scope="scoped">{{ scoped.row.classCorrectRate }}%</template>
                              </el-table-column>
  
6bca489d   LH_PC   云平台二期UI
136
                              <el-table-column prop="answerCorrectRate" label="已答正确率(单题)" width="170">
f45b3c05   LH_PC   云平台新UI界面
137
138
139
                                  <template slot-scope="scoped">{{ scoped.row.answerCorrectRate }}%</template>
                              </el-table-column>
  
ef16e57e   LH_PC   fix:前端版本迭代
140
141
142
143
144
145
146
147
148
149
                              <el-table-column prop="knowledge" label="知识点(单题)" width="150">
                                  <template slot-scope="scoped">
                                      <el-tooltip effect="dark" :content="_knowledge(scoped.row.knowledge)"
                                          placement="bottom">
                                          <span class="overflowText">
                                              {{ _knowledge(scoped.row.knowledge) }}
                                          </span>
                                      </el-tooltip>
                                  </template>
                              </el-table-column>
f45b3c05   LH_PC   云平台新UI界面
150
151
152
                              <el-table-column prop="correctAnswer" label="正确答案(单题)" width="150">
                                  <template slot-scope="scoped">
                                      {{
ef16e57e   LH_PC   fix:前端版本迭代
153
154
                              scoped.row.correctAnswer == 1 && scoped.row.questionType == 4 ? "✓" :
                                  scoped.row.correctAnswer == 2 && scoped.row.questionType == 4 ? "✗" :
f45b3c05   LH_PC   云平台新UI界面
155
156
157
158
159
160
161
                                      scoped.row.correctAnswer
                          }}
                                  </template>
                              </el-table-column>
                              <el-table-column prop="fallible" label="干扰选项(单题)" width="150">
                                  <template slot-scope="scoped">
                                      {{
ef16e57e   LH_PC   fix:前端版本迭代
162
163
                                  scoped.row.fallible == 1 && scoped.row.questionType == 4 ? "✓" :
                                      scoped.row.fallible == 2 && scoped.row.questionType == 4 ? "✗" :
f45b3c05   LH_PC   云平台新UI界面
164
165
166
167
168
169
170
171
172
173
                                          scoped.row.fallible
                              }}
                                  </template>
                              </el-table-column>
                          </el-table>
                      </el-row>
                  </div>
                  <div v-if="dataType == '1' && currentType == '学生作答表现'">
                      <el-row class="row-table" style="margin-top:0px;">
                          <el-table class="default-table" :data="askPeriodQuestionItems">
6bca489d   LH_PC   云平台二期UI
174
175
                              <el-table-column prop="studentCode" label="学号"></el-table-column>
                              <el-table-column prop="studentName" label="姓名"></el-table-column>
f45b3c05   LH_PC   云平台新UI界面
176
                              <el-table-column prop="answerTimes" label="答题次数"></el-table-column>
ef16e57e   LH_PC   fix:前端版本迭代
177
178
                              <el-table-column prop="consumingDuration" label="答题耗时"><template slot-scope="scoped">
                                      {{ setDuration1000(scoped.row.consumingDuration) }}
f45b3c05   LH_PC   云平台新UI界面
179
180
                                  </template></el-table-column>
                              <el-table-column prop="correctAnswerTimes" label="答对次数">
ef16e57e   LH_PC   fix:前端版本迭代
181
182
183
184
                                  <template slot-scope="scoped">
                                      {{ scoped.row.correctAnswerTimes || Number(scoped.row.correctAnswerTimes) === 0 ?
                              scoped.row.correctAnswerTimes : "-" }}
                                  </template>
f45b3c05   LH_PC   云平台新UI界面
185
186
                              </el-table-column>
                              <el-table-column prop="participationRate" label="参与度"><template slot-scope="scoped">{{
ef16e57e   LH_PC   fix:前端版本迭代
187
188
189
190
191
                              scoped.row.participationRate ||
                                  Number(scoped.row.participationRate) === 0
                                  ? scoped.row.participationRate + "%"
                                  : "-"
                          }}</template></el-table-column>
f45b3c05   LH_PC   云平台新UI界面
192
193
194
195
196
197
198
199
200
201
202
                              <el-table-column prop="correctRate" label="正确率"><template slot-scope="scoped">{{
                                  scoped.row.correctRate || Number(scoped.row.correctRate) === 0
                                      ? scoped.row.correctRate + "%"
                                      : "-"
                              }}</template></el-table-column>
                              <el-table-column prop="answerCorrectRate" label="已答正确率"><template slot-scope="scoped">{{
                                  scoped.row.answerCorrectRate ||
                                      Number(scoped.row.answerCorrectRate) === 0
                                      ? scoped.row.answerCorrectRate + "%"
                                      : "-"
                              }}</template></el-table-column>
ef16e57e   LH_PC   fix:前端版本迭代
203
204
                              <el-table-column class-name="anwser-column"
                                  v-for="(item, index) in askPeriodQuestionItemOptions" :key="index"
f45b3c05   LH_PC   云平台新UI界面
205
                                  :label="'Q' + (index + 1)"><template slot-scope="scoped">
ef16e57e   LH_PC   fix:前端版本迭代
206
207
                                      <div :class="scoped.row['isRight' + index] ? '' : 'red'">{{ scoped.row["answer" +
                              index] || "-" }}</div>
f45b3c05   LH_PC   云平台新UI界面
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
                                  </template>
                              </el-table-column>
                          </el-table>
                      </el-row>
                  </div>
                  <div v-if="dataType == '1' && currentType == '学生互动表现'">
                      <el-row class="row-table" style="margin-top:0px;">
                          <el-table class="default-table" :data="askInteractives">
                              <el-table-column prop="studentCode" label="学号"></el-table-column>
                              <el-table-column prop="studentName" label="姓名"></el-table-column>
                              <el-table-column prop="interactionsNum" label="参与得分"></el-table-column>
                              <el-table-column prop="interactionsCorrectNum" label="对错得分"></el-table-column>
                              <el-table-column prop="rushAnswerTimes" label="抢答成功次数"></el-table-column>
                              <el-table-column prop="rushAnswerCorrectTimes" label="抢答答对次数"></el-table-column>
                              <el-table-column prop="checkAnswerTimes" label="被抽答次数"></el-table-column>
                              <el-table-column prop="checkAnswerCorrectTimes" label="被抽答答对次数"></el-table-column>
                          </el-table>
                      </el-row>
                  </div>
                  <div v-if="dataType == '1' && currentType == '学生签到表现'">
                      <el-row class="row-subfix">
ef16e57e   LH_PC   fix:前端版本迭代
229
                          <div class="row-line row-line-5">
f45b3c05   LH_PC   云平台新UI界面
230
231
232
                              <span class="line-subfix">应到人数:</span>
                              <span class="line-value">{{ detail.classPersonNum }}</span>
                          </div>
ef16e57e   LH_PC   fix:前端版本迭代
233
                          <div class="row-line row-line-5">
f45b3c05   LH_PC   云平台新UI界面
234
235
236
                              <span class="line-subfix">实到人数:</span>
                              <span class="line-value">{{ detail.checkInCount }}</span>
                          </div>
ef16e57e   LH_PC   fix:前端版本迭代
237
                          <div class="row-line row-line-5">
f45b3c05   LH_PC   云平台新UI界面
238
239
240
                              <span class="line-subfix">迟到人数:</span>
                              <span class="line-value">{{ detail.classPersonNum - detail.checkInCount }}</span>
                          </div>
ef16e57e   LH_PC   fix:前端版本迭代
241
                          <div class="row-line row-line-5">
f45b3c05   LH_PC   云平台新UI界面
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
                              <span class="line-subfix">未到人数:</span>
                              <span class="line-value">{{ detail.classPersonNum - detail.checkInCount }}</span>
                          </div>
                      </el-row>
                      <el-row class="row-table" style="margin-top:20px;">
                          <el-table class="default-table" :data="askCheckinStatus">
                              <el-table-column prop="studentCode" label="学号"></el-table-column>
                              <el-table-column prop="studentName" label="姓名"></el-table-column>
                              <el-table-column prop="checkInTime" label="签到时间"></el-table-column>
                              <el-table-column prop="makeUpTime" label="补签时间"></el-table-column>
                              <el-table-column prop="rushAnswerTimes" label="是否迟到"></el-table-column>
                          </el-table>
                      </el-row>
                  </div>
                  <div v-if="dataType == '2' && currentType == '测验成绩单'">
                      <el-row class="row-subfix" :key="index" v-for="(item, index) in 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="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">
ef16e57e   LH_PC   fix:前端版本迭代
285
286
                          <el-table class="default-table" style="margin-top: 10px" :data="studentList" ref="table">
                              <el-table-column :width="item.label == '学号' ? 90 : 0" :prop="item.prop" :label="item.label"
f45b3c05   LH_PC   云平台新UI界面
287
288
289
                                  :key="index" v-for="(item, index) in studentHeader" />
                          </el-table>
                      </el-row>
6bca489d   LH_PC   云平台二期UI
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
                      <el-row class="row-subfix" style="margin-top:10px">
                          <el-table class="default-table" v-if="question4List && question4List.length >= 1"
                              :data="question4List">
                              <el-table-column prop="column0" width="100" 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" width="100" 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" width="100" 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" />
f45b3c05   LH_PC   云平台新UI界面
332
333
                          </el-table>
                      </el-row>
6bca489d   LH_PC   云平台二期UI
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
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
                      <el-row class="row-subfix" style="margin-top:10px">
                          <el-table class="default-table" v-if="question7List && question7List.length >= 1"
                              :data="question7List">
                              <el-table-column prop="column0" width="100" 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" width="100" 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" />
                          </el-table>
                      </el-row>
                      <el-row class="row-subfix">
                          <el-table class="default-table" v-if="question10List && question10List.length >= 1"
                              :data="question10List">
                              <el-table-column prop="column0" width="100" 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界面
393
394
395
396
397
398
399
400
401
                          </el-table>
                      </el-row>
                      <el-row class="row-subfix">
                          <el-table class="default-table" style="margin-top: 10px" :data="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;">
6bca489d   LH_PC   云平台二期UI
402
                                              {{ scoped.row.missPeopleNumber }}</span> 
f45b3c05   LH_PC   云平台新UI界面
403
404
                                      </span>
                                      <span style="margin: 10px 0;"
ead476dd   LH_PC   fix:最终定版
405
                                          v-if="item.students && item.students?.length >= 1"
ef16e57e   LH_PC   fix:前端版本迭代
406
                                          v-for="(item, index) in scoped.row.details.filter(item => item.option.indexOf('未答') < 0 && !item.right)">
f45b3c05   LH_PC   云平台新UI界面
407
408
409
410
411
412
413
414
415
                                          选{{ item.option }}:{{ item.students.join("/") }}
                                      </span>
                                      <span></span>
                                  </template>
                              </el-table-column>
                          </el-table>
                      </el-row>
                  </div>
                  <div v-if="dataType == '2' && currentType == '试题分析'">
6bca489d   LH_PC   云平台二期UI
416
                      <el-table class="default-table" :data="testQuestions" :span-method="singgleSpanMethod">
f45b3c05   LH_PC   云平台新UI界面
417
418
419
420
421
422
                          <el-table-column prop="questionIndex" label="题号" width="60"></el-table-column>
                          <el-table-column prop="questionType" label="题型" width="100">
                              <template slot-scope="scope">
                                  {{ setSubPro(scope.row.questionType) }}
                              </template>
                          </el-table-column>
ef16e57e   LH_PC   fix:前端版本迭代
423
424
425
426
427
428
429
430
431
432
                          <el-table-column prop="knowledge" width="100" label="知识点">
                              <template slot-scope="scoped">
                                  <el-tooltip effect="dark" :content="_knowledge(scoped.row.knowledge)"
                                      placement="bottom">
                                      <span class="overflowText">
                                          {{ _knowledge(scoped.row.knowledge) }}
                                      </span>
                                  </el-tooltip>
                              </template>
                          </el-table-column>
f45b3c05   LH_PC   云平台新UI界面
433
434
435
                          <el-table-column prop="score" width="100" label="满分值"></el-table-column>
                          <el-table-column width="110" prop="highestScore" label="班最高分"></el-table-column>
                          <el-table-column width="110" prop="lowestScore" label="班最低分"></el-table-column>
6bca489d   LH_PC   云平台二期UI
436
437
438
439
440
441
442
443
444
445
446
447
448
                          <el-table-column width="110" prop="avgScore" label="班平均分">
                              <template slot-scope="scoped">
                                  <div v-if="scoped.row.type != 'colspan'">
                                      {{ scoped.row.avgScore }}
                                  </div>
                                  <div :class="scoped.row.avgScore <= lowLevel ? 'lowLevelClass' : ''" v-else>
                                      {{ Number(scoped.row.avgScore).toFixed(2) }}%
                                  </div>
                              </template>
                          </el-table-column>
                          <el-table-column prop="classScoringRate" width="120" label="已考得分率">
                              <template slot-scope="scoped">
                                  <div v-if="scoped.row.type == 'colspan'">
ef16e57e   LH_PC   fix:前端版本迭代
449
                                      {{ scoped.row.scoringRate }}
6bca489d   LH_PC   云平台二期UI
450
                                  </div>
ef16e57e   LH_PC   fix:前端版本迭代
451
452
                                  <div :class="scoped.row.scoringRate <= lowLevel ? 'lowLevelClass' : ''" v-else>
                                      {{ Number(scoped.row.scoringRate).toFixed(2) }}%
6bca489d   LH_PC   云平台二期UI
453
454
455
                                  </div>
                              </template>
                          </el-table-column>
f45b3c05   LH_PC   云平台新UI界面
456
                          <el-table-column prop="correctAnswer" label="答案"><template slot-scope="scoped">{{
ef16e57e   LH_PC   fix:前端版本迭代
457
                              scoped.row.correctAnswer == 1 && scoped.row.questionType == 4
f45b3c05   LH_PC   云平台新UI界面
458
                                  ? "✓"
ef16e57e   LH_PC   fix:前端版本迭代
459
                                  : scoped.row.correctAnswer == 2 && scoped.row.questionType == 4
f45b3c05   LH_PC   云平台新UI界面
460
461
462
463
464
465
466
467
                                      ? "✗"
                                      : scoped.row.correctAnswer
                          }}</template>
                          </el-table-column>
                          <el-table-column v-for="(item, index) in testQuestionOptions" :key="index" :label="item.title"
                              :prop="'count' + index" width="120"><template slot-scope="scope">
                                  <p class="persent">
                                      {{
6bca489d   LH_PC   云平台二期UI
468
469
                              scope.row["option" + index] == "?" ? "未答" : scope.row.questionType == "5" ? "" :
                                  scope.row["option" + index]
f45b3c05   LH_PC   云平台新UI界面
470
471
                                      ? `${scope.row["option" + index]}(${scope.row["persent" + index]
                                      })`
6bca489d   LH_PC   云平台二期UI
472
                                      : "" }}
f45b3c05   LH_PC   云平台新UI界面
473
474
475
476
477
                                  </p>
                              </template>
                          </el-table-column>
                      </el-table>
                  </div>
6bca489d   LH_PC   云平台二期UI
478
479
                  <div v-if="dataType == '2' && currentType == '成绩排名'" ref="studentRank">
                      <el-table :key="studentRank.length" class="default-table" :data="studentRank">
f45b3c05   LH_PC   云平台新UI界面
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
                          <el-table-column prop="studentCode" label="学号" width="120"></el-table-column>
                          <el-table-column prop="studentName" label="姓名"></el-table-column>
                          <el-table-column prop="examScore" label="总分"></el-table-column>
                          <el-table-column prop="scoringRate" label="得分率">
                              <template slot-scope="scope">
                                  {{ scope.row.scoringRate }}%
                              </template>
                          </el-table-column>
                          <el-table-column prop="classRank" label="班名"></el-table-column>
                          <el-table-column label="客观题">
                              <el-table-column prop="objectiveExamScore" label="总分"></el-table-column>
                              <el-table-column prop="objectiveScoringRate" label="得分率">
                                  <template slot-scope="scope">
                                      {{ scope.row.objectiveScoringRate }}%
                                  </template>
                              </el-table-column>
                          </el-table-column>
                          <el-table-column label="主观题">
                              <el-table-column prop="subjectiveExamScore" label="总分"></el-table-column>
                              <el-table-column prop="subjectiveScoringRate" label="得分率">
                                  <template slot-scope="scope">
                                      {{ scope.row.subjectiveScoringRate }}%
                                  </template>
                              </el-table-column>
                          </el-table-column>
                      </el-table>
                  </div>
6bca489d   LH_PC   云平台二期UI
507
508
                  <div v-if="dataType == '2' && currentType == '小题分报表'" ref="studentQuestions">
                      <el-table :key="studentQuestions.length" class="default-table" :data="studentQuestions">
f45b3c05   LH_PC   云平台新UI界面
509
510
511
512
513
514
515
                          <el-table-column prop="studentCode" label="学号" width="120"></el-table-column>
                          <el-table-column prop="studentName" label="姓名"></el-table-column>
                          <el-table-column prop="examScore" label="总分"></el-table-column>
                          <el-table-column label="分数组成">
                              <el-table-column prop="objectiveExamScore" label="客观题分"></el-table-column>
                              <el-table-column prop="subjectiveExamScore" label="主观题分"></el-table-column>
                          </el-table-column>
6bca489d   LH_PC   云平台二期UI
516
                          <el-table-column v-for="(item, index) in studentQuestionOptions" :key="index"
ef16e57e   LH_PC   fix:前端版本迭代
517
                              :label="'Q' + item.questionIndex" :prop="'score' + item.id">
f45b3c05   LH_PC   云平台新UI界面
518
519
520
                          </el-table-column>
                      </el-table>
                  </div>
6bca489d   LH_PC   云平台二期UI
521
522
                  <div v-if="dataType == '2' && currentType == '作答明细'" ref="studentAnsered">
                      <el-table :key="studentAnsered.length" class="default-table" :data="studentAnsered">
f45b3c05   LH_PC   云平台新UI界面
523
524
525
526
                          <el-table-column prop="studentCode" width="120" label="学号"></el-table-column>
                          <el-table-column prop="studentName" label="姓名"></el-table-column>
                          <el-table-column prop="className" label="班级"></el-table-column>
                          <el-table-column prop="examScore" label="总分"></el-table-column>
ef16e57e   LH_PC   fix:前端版本迭代
527
528
                          <el-table-column class-name="anwser-column" v-for="(item, index) in studentAnseredOptions"
                              :key="index" :label="'Q' + item.questionIndex">
f45b3c05   LH_PC   云平台新UI界面
529
                              <template slot-scope="scope">
6bca489d   LH_PC   云平台二期UI
530
                                  <span v-if="studentAnsered[index]?.questionType == 5">*</span>
f45b3c05   LH_PC   云平台新UI界面
531
                                  <span v-else-if="scope.row['answer' + item.id]"
ef16e57e   LH_PC   fix:前端版本迭代
532
                                      :class="scope.row['isRight' + item.id] ? '' : 'red'">
f45b3c05   LH_PC   云平台新UI界面
533
534
                                      {{ scope.row["answer" + item.id] }}
                                  </span>
ef16e57e   LH_PC   fix:前端版本迭代
535
                                  <span v-else :class="scope.row['questionType' + item.id] == 5 ? '' : 'red'">-</span>
f45b3c05   LH_PC   云平台新UI界面
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
                              </template>
                          </el-table-column>
                      </el-table>
                  </div>
                  <div v-if="dataType == '3' && currentType == '班级对比情况表'">
                      <el-table class="default-table" :data="classdiffExamReport">
                          <el-table-column prop="index" label="序号" width="120" />
                          <el-table-column prop="className" label="班级" width="120" />
                          <el-table-column label="测验人数/班级人数">
                              <template slot-scope="scoped">
                                  {{ scoped.row.testCount }} / {{ scoped.row.classCount }}
                              </template>
                          </el-table-column>
                          <el-table-column prop="title" label="参与度" width="120">
                              <template slot-scope="scoped">
ef16e57e   LH_PC   fix:前端版本迭代
551
552
                                  {{ Number(scoped.row.testCount * 100 / scoped.row.classCount).toFixed(2) }}%
  
f45b3c05   LH_PC   云平台新UI界面
553
554
555
556
557
558
559
                              </template>
                          </el-table-column>
                          <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="front20" label="前20名均分" width="120" />
                          <el-table-column prop="last20" label="后20名均分" width="120" />
6bca489d   LH_PC   云平台二期UI
560
561
                          <el-table-column v-for="(item, index) in defaultLevels.levels" :key="index"
                              :label="item[0] ? item[0] + '数(率)' : ''">
f45b3c05   LH_PC   云平台新UI界面
562
                              <template slot-scope="scoped">
6bca489d   LH_PC   云平台二期UI
563
                                  {{ scoped.row.leverValues[item[0]] }}
f45b3c05   LH_PC   云平台新UI界面
564
565
566
567
568
                              </template>
                          </el-table-column>
                      </el-table>
                  </div>
                  <div v-if="dataType == '3' && currentType == '试题分析'">
6bca489d   LH_PC   云平台二期UI
569
                      <el-table class="default-table" :data="testPaperExamReport" :span-method="arraySpanMethod">
f45b3c05   LH_PC   云平台新UI界面
570
571
572
573
574
575
                          <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
576
577
                          <el-table-column prop="knowledge" label="知识点">
                              <template slot-scope="scoped">
ef16e57e   LH_PC   fix:前端版本迭代
578
579
                                  <el-tooltip effect="dark" :content="_knowledge(scoped.row.knowledge)"
                                      placement="bottom">
6bca489d   LH_PC   云平台二期UI
580
                                      <span class="overflowText">
ef16e57e   LH_PC   fix:前端版本迭代
581
                                          {{ _knowledge(scoped.row.knowledge) }}
6bca489d   LH_PC   云平台二期UI
582
583
584
585
                                      </span>
                                  </el-tooltip>
                              </template>
                          </el-table-column>
f45b3c05   LH_PC   云平台新UI界面
586
                          <el-table-column prop="score" label="满分值" width="120" />
6bca489d   LH_PC   云平台二期UI
587
588
                          <el-table-column prop="avgScore" label="年级平均分" width="120">
                              <template slot-scope="scoped">
ef16e57e   LH_PC   fix:前端版本迭代
589
                                  <div v-if="scoped.row.type == 'colspan'">
6bca489d   LH_PC   云平台二期UI
590
591
592
593
594
595
596
                                      {{ Number(scoped.row.avgScore).toFixed(2) }} %
                                  </div>
                                  <div v-else>
                                      {{ scoped.row.avgScore }}
                                  </div>
                              </template>
                          </el-table-column>
ef16e57e   LH_PC   fix:前端版本迭代
597
                          <el-table-column prop="gradeScoringRate" label="年级已考得分率" width="120">
6bca489d   LH_PC   云平台二期UI
598
                              <template slot-scope="scoped">
ef16e57e   LH_PC   fix:前端版本迭代
599
600
601
602
603
                                  <div v-if="scoped.row.questionIndex == '汇总'">
                                      {{ scoped.row.gradeScoringRate.toFixed(2) }} %
                                  </div>
                                  <div v-else-if="scoped.row.type == 'colspan'">
                                      {{ scoped.row.gradeScoringRate.toFixed(2) }}
6bca489d   LH_PC   云平台二期UI
604
                                  </div>
ef16e57e   LH_PC   fix:前端版本迭代
605
606
                                  <div v-else="scoped.row.gradeScoringRate">
                                      {{ Number(scoped.row.gradeScoringRate * 100).toFixed(2) }} %
6bca489d   LH_PC   云平台二期UI
607
608
609
                                  </div>
                              </template>
                          </el-table-column>
ef16e57e   LH_PC   fix:前端版本迭代
610
611
612
613
614
615
616
617
618
                          <el-table-column prop="correctAnswer" label="答案" width="120">
                              <template slot-scope="scoped">
                                  {{
                              scoped.row.correctAnswer == 1 && scoped.row.questionType == 4 ? "✓" :
                                  scoped.row.correctAnswer == 2 && scoped.row.questionType == 4 ? "✗" :
                                      scoped.row.correctAnswer
                          }}
                              </template>
                          </el-table-column>
f45b3c05   LH_PC   云平台新UI界面
619
620
621
622
623
                          <el-table-column v-for="(item, index) in testPaperExamReportOptions" :key="index"
                              :label="item.title" :prop="'count' + index" width="120">
                              <template slot-scope="scope">
                                  <p class="persent">
                                      {{
ef16e57e   LH_PC   fix:前端版本迭代
624
625
626
627
                              scope.row.questionType == "5" ? "" : scope.row["option" + index]
                                  ? `${scope.row["option" + index]}(${scope.row["persent" + index] ?? "0"
                                  })`
                                  : ""
f45b3c05   LH_PC   云平台新UI界面
628
629
630
631
632
633
                          }}
                                  </p>
                              </template>
                          </el-table-column>
                      </el-table>
                  </div>
ef16e57e   LH_PC   fix:前端版本迭代
634
                  <div v-if="dataType == '3' && currentType == '学生成绩排名'">
f45b3c05   LH_PC   云平台新UI界面
635
636
637
638
639
640
                      <el-table class="default-table" :data="testStudentExamReport">
                          <el-table-column prop="gradeRank" label="年级排行" />
                          <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
641
                          <el-table-column prop="lever" label="成绩等级" />
f45b3c05   LH_PC   云平台新UI界面
642
643
644
645
646
                      </el-table>
                  </div>
              </div>
          </el-main>
          <el-dialog class="stem" :visible.sync="stem.visible" :title="'题干'" width="800" :append-to-body="true">
ef16e57e   LH_PC   fix:前端版本迭代
647
648
              <Preview v-if="stem && stem.src" :src="stem.src" :key="stem.src" />
              <!-- <iframe v-if="stem && stem.src" :src="stem.src" style="width: 100%;min-height: 400px;" /> -->
6bca489d   LH_PC   云平台二期UI
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
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
          </el-dialog>
          <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>
f45b3c05   LH_PC   云平台新UI界面
725
726
727
728
          </el-dialog>
      </el-container>
  </template>
  <script>
ef16e57e   LH_PC   fix:前端版本迭代
729
730
  import Preview from "@/components/preview";
  import { formatDate, downloadFile, tablePrint, getKnowledge } from "utils";
f45b3c05   LH_PC   云平台新UI界面
731
732
  export default {
      name: "reportDetail",
ef16e57e   LH_PC   fix:前端版本迭代
733
      components: { testScoreSet: () => import("./components/testScoreSet.vue"), Preview },
f45b3c05   LH_PC   云平台新UI界面
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
      async created() {
          this.role =
  
              this.$store.getters.info.showRole ||
  
              this.$store.getters.info.permissions[0].role;
  
          this.dataType = this.$route.query.dataType || "";
  
          this.classIds = (this.$route.query.classIds || "").split(',');
  
          this.subjects = (this.$route.query.subjects || "").split(',');
  
          this.ids = [this.$route.query.id];
  
          this.title = this.$route.query.title;
  
          this.types = this.types.filter(fl => { return fl.dataType == this.dataType });
  
          this.currentType = this.types[0]?.name ?? ""
  
          await this._changeType();
6bca489d   LH_PC   云平台二期UI
756
757
758
  
          await this._queryDefaultLevels();
  
ef16e57e   LH_PC   fix:前端版本迭代
759
          await this._examDetail();
f45b3c05   LH_PC   云平台新UI界面
760
761
762
      },
      data() {
          return {
ef16e57e   LH_PC   fix:前端版本迭代
763
              loading: true,
6bca489d   LH_PC   云平台二期UI
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
              status: 0,
              //导出相关
              paperModifyLog: {},
              diaShow: false,
              exportStudent: [],
              showSelect: true, //是否显示录总分
              showAllSetScore: false, //当前操作试卷可录总分分状态
              showSetScore: false, //当前操作试卷可录小题分状态 
              lowLevel: 20,
              defaultLevels: [],
              examPaperScore: 100, //卷面最高分
              fromData: {
                  levelType: 0,
                  levels: [
                      ["优秀", 100, 90],
                      ["良好", 89.9, 70],
                      ["合格", 69.9, 60],
                      ["不合格", 59.9, 0],
                  ],
              },
              studentLevelDialog: false,
f45b3c05   LH_PC   云平台新UI界面
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
              titleInfo: [],
              studentList: [],
              studentHeader: [],
              studentMapping: [
                  {
                      key: "code",
                      label: "学号",
                  },
                  {
                      key: "name",
                      label: "姓名",
                  },
                  {
                      key: "gradeRank",
                      label: "排名",
                  },
                  {
                      key: "exam",
                      label: "总分",
                  },
                  {
                      key: "objective",
                      label: "客观分",
                  },
                  {
                      key: "subjective",
                      label: "主观分",
                  },
              ],
6bca489d   LH_PC   云平台二期UI
814
815
816
              question4List: [],
              question7List: [],
              question10List: [],
f45b3c05   LH_PC   云平台新UI界面
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
              questionTotal: [],
              dataType: null,
              classIds: [],
              subjects: [],
              ids: [],
              // 试题分析对象
              askItemAnalysis: [],
              // 作答情况对象
              askPeriodQuestionItems: [],
              // 作答情况选项对象
              askPeriodQuestionItemOptions: [],
              // 学生互动问答对象
              askInteractives: [],
              // 学生签到情况
              askCheckinStatus: [],
              // 报表详情
ef16e57e   LH_PC   fix:前端版本迭代
833
              examReport: {
f45b3c05   LH_PC   云平台新UI界面
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
                  subjectiveScore: 0,
                  subjectiveHighestScore: "",
                  subjectiveLowestScore: "",
                  subjectiveAvgScore: "",
                  subjectiveClassScoringRate: "",
                  objectiveScore: "",
                  objectiveHighestScore: "",
                  objectiveLowestScore: "",
                  objectiveAvgScore: "",
                  objectiveClassScoringRate: "",
                  examPaperScore: "",
                  highestScore: "",
                  lowestScore: "",
                  avgScore: "",
                  classScoringRate: "",
              },
              // 报表学生详情
              testStudents: [],
              // 报表学生选项
              testStudentOptions: [],
6bca489d   LH_PC   云平台二期UI
854
855
856
857
858
              studentAnsered: [],
              studentAnseredOptions: [],
              studentRank: [],
              studentQuestions: [],
              studentQuestionOptions: [],
f45b3c05   LH_PC   云平台新UI界面
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
              // 报表题目详情
              testQuestions: [],
              // 报表题目选项
              testQuestionOptions: [],
              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
879
                          tit = type;
f45b3c05   LH_PC   云平台新UI界面
880
881
882
883
                  }
                  return tit;
              },
              setDuration(times) {
ef16e57e   LH_PC   fix:前端版本迭代
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
                  let m = parseInt(times / 60);
                  let s = parseInt(times % 60);
                  console.log(times)
                  let aTime;
                  if (times == 0) {
                      aTime = `0`;
                  } else {
                      if (m == 0 && times != 0) {
                          aTime = `${times}秒`;
                      } else if (m != 0 && times != 0) {
                          aTime = `${m}分${s}秒`;
                      }
                  }
                  return aTime;
              },
              setDuration1000(times) {
f45b3c05   LH_PC   云平台新UI界面
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
                  let m = parseInt(times / 1000 / 60);
                  let s = parseInt((times / 1000) % 60);
                  let ms = times;
                  let aTime;
                  if (times == 0) {
                      aTime = `0`;
                  } else {
                      if (m == 0 && s == 0) {
                          aTime = `${ms}毫秒`;
                      } else if (m == 0 && s != 0) {
                          aTime = `${s}秒`;
                      } else if (m != 0 && s != 0) {
                          aTime = `${m}分${s}秒`;
                      }
                  }
                  return aTime;
              },
              title: "",
              types: [{
                  dataType: "3",
                  name: "班级对比情况表"
              }, {
                  dataType: "3",
                  name: "试题分析"
              }, {
                  dataType: "3",
ef16e57e   LH_PC   fix:前端版本迭代
926
                  name: "学生成绩排名"
f45b3c05   LH_PC   云平台新UI界面
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
              }, {
                  dataType: "2",
                  name: "测验成绩单"
              }, {
                  dataType: "2",
                  name: "试题分析"
              }, {
                  dataType: "2",
                  name: "成绩排名"
              }, {
                  dataType: "2",
                  name: "小题分报表"
              }, {
                  dataType: "2",
                  name: "作答明细"
              }, {
                  dataType: "1",
                  name: "试题分析"
              }, {
                  dataType: "1",
                  name: "学生作答表现"
              }, {
                  dataType: "1",
                  name: "学生互动表现"
              }, {
                  dataType: "1",
                  name: "学生签到表现"
              }],
              detail: {},
              currentType: null,
              classdiffExamReport: [],
6bca489d   LH_PC   云平台二期UI
958
              classdiffLevelOptions: [],
f45b3c05   LH_PC   云平台新UI界面
959
960
961
              testPaperExamReport: [],
              testStudentExamReport: [],
              testPaperExamReportOptions: [],
6bca489d   LH_PC   云平台二期UI
962
              diffType: 0,
f45b3c05   LH_PC   云平台新UI界面
963
964
965
966
967
968
969
970
              //题干数据对象
              stem: {
                  visible: false,
                  src: null
              }
          }
      },
      methods: {
ef16e57e   LH_PC   fix:前端版本迭代
971
972
973
          _knowledge(param) {
              return getKnowledge(param);
          },
6bca489d   LH_PC   云平台二期UI
974
          async _examDetail() {
ef16e57e   LH_PC   fix:前端版本迭代
975
976
977
978
979
              if (this.dataType == 2) {
                  const examDetail =
                      this.role == "ROLE_PERSONAL"
                          ? this.$request.pExamDetail
                          : this.$request.examDetail;
6bca489d   LH_PC   云平台二期UI
980
  
ef16e57e   LH_PC   fix:前端版本迭代
981
982
983
984
985
986
987
988
989
990
991
992
                  let { data, info, status } = await examDetail({
                      examId: this.ids[0],
                  });
  
                  if (status === 0) {
                      this.examReport = { ...data?.examReport };
  
                      if (data.paperModifyLog) {
                          this.paperModifyLog = { ...data?.paperModifyLog };
                      }
                  } else {
                      this.$message.error(info);
6bca489d   LH_PC   云平台二期UI
993
                  }
ef16e57e   LH_PC   fix:前端版本迭代
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
              }
              else if (this.dataType == 3) {
                  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;
                      });
                  }
  
                  let { data, info, status } = await this.$request.classdiffreport({
                      paperId: this.ids[0],
                      classIds: this.classIds,
                      reportRange: paramObj
                  });
  
                  if (status != 0) {
                      this.$message.error(info);
                      return;
                  }
  
                  this.examReport = { ...data };
6bca489d   LH_PC   云平台二期UI
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
              }
          },
          async _reScore() {
              //重新记分 
              let { data, info, status } = await this.$request.reScore({
                  examId: this.ids[0],
              });
              if (status === 0) {
                  this.$message.success(info);
                  await this._changeType();
                  this.paperModifyLog.modifiedTime = "";
                  this.paperModifyLog.realName = "";
ef16e57e   LH_PC   fix:前端版本迭代
1029
                  location.reload();
6bca489d   LH_PC   云平台二期UI
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
              } else {
                  this.$message.error(info);
              }
          },
          _closeScoreSet() {
              this.scoreSet.diaScoreSet = false;
          },
          _successScoreSet() {
              this._changeType();
              this._closeScoreSet();
          },
          async _queryDefaultLevels() {
  
              const { data, info, status } = await this.$request.defaultLevels();
  
              if (status != 0) {
                  this.$message.error(info);
                  return;
              }
  
              this.defaultLevels = { ...data } || {
                  levelType: 0,
                  levels: [
                      ["优秀", 100, 90],
                      ["良好", 89.9, 70],
                      ["合格", 69.9, 60],
                      ["不合格", 59.9, 0],
                  ],
              };
  
              this.defaultLevels.type = 0
  
              this.fromData.levelType = this.defaultLevels.levelType;
  
              this.fromData.levels = [...this.defaultLevels.levels];
  
              sessionStorage.setItem(
                  "levelFromData",
                  JSON.stringify(this.defaultLevels)
              );
          },
          singgleSpanMethod({ row, column, rowIndex, columnIndex }) {
              if (rowIndex == this.testQuestions?.length - 3) {
                  if (columnIndex == 0) {
                      return [3, 1];
                  }
ef16e57e   LH_PC   fix:前端版本迭代
1076
1077
1078
1079
1080
1081
1082
1083
1084
                  else if (columnIndex == 8) {
                      return [3, 1];
                  }
                  else if (columnIndex == 9) {
                      return [3, this.testQuestionOptions.length];
                  }
                  else if (columnIndex >= 9) {
                      return [0, 0];
                  }
6bca489d   LH_PC   云平台二期UI
1085
1086
1087
                  else {
                      return [1, 1]
                  }
ef16e57e   LH_PC   fix:前端版本迭代
1088
1089
1090
1091
              } else if (rowIndex > this.testQuestions?.length - 3) {
                  if (columnIndex >= 7) {
                      return [0, 0];
                  }
6bca489d   LH_PC   云平台二期UI
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
              }
              else {
                  return [1, 1]
              }
          },
          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) {
ef16e57e   LH_PC   fix:前端版本迭代
1106
1107
1108
1109
                      return [3, this.testPaperExamReportOptions.length];
                  }
                  else if (columnIndex >= 7) {
                      return [0, 0];
6bca489d   LH_PC   云平台二期UI
1110
1111
1112
1113
                  }
                  else {
                      return [1, 1]
                  }
ef16e57e   LH_PC   fix:前端版本迭代
1114
1115
1116
1117
              } else if (rowIndex > this.testPaperExamReport?.length - 3) {
                  if (columnIndex >= 5) {
                      return [0, 0];
                  }
6bca489d   LH_PC   云平台二期UI
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
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
              }
              else {
                  return [1, 1]
              }
  
          },
          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._changeType();
          },
          _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];
              }
          },
          _studentLevelSet() {
              this.studentLevelDialog = true;
          },
f45b3c05   LH_PC   云平台新UI界面
1174
1175
1176
1177
1178
1179
          async _export() {
              if (this.dataType == "1") {
  
                  let exportPeriodReport = "";
  
                  var query = {};
6bca489d   LH_PC   云平台二期UI
1180
  
f45b3c05   LH_PC   云平台新UI界面
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
                  query.periodId = this.ids[0];
  
                  exportPeriodReport =
                      this.role == "ROLE_PERSONAL"
                          ? this.$request.pExportPeriodReport
                          : this.$request.exportPeriodReport;
  
                  const data = await exportPeriodReport({
                      ...query,
                  });
  
                  if (data) {
                      let blob = new Blob([data], {
                          type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
                      });
                      let name = `随堂问-单课时报表.xlsx`
                      downloadFile(this.status ? "随堂问-已归档单课时报表.xlsx" : name, blob);
                  } else {
                      this.$message.error("下载失败");
                  }
              }
              else if (this.dataType == "2") {
f45b3c05   LH_PC   云平台新UI界面
1203
1204
1205
1206
1207
1208
1209
1210
1211
                  const exportExamReport =
                      this.role == "ROLE_PERSONAL"
                          ? this.$request.pExportExamReport
                          : this.$request.exportExamReport;
  
                  const data = await exportExamReport({
                      examId: this.ids[0]
                  });
  
f45b3c05   LH_PC   云平台新UI界面
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
                  if (!data.status) {
                      let blob = new Blob([data], {
                          type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
                      });
                      downloadFile(
                          this.status
                              ? "即时测-已归档单卷测练报表.xlsx"
                              : "即时测-单卷测练报表.xlsx",
                          blob
                      );
                  } else {
                      this.$message.error(data.info);
                  }
              }
6bca489d   LH_PC   云平台二期UI
1226
              else if (this.dataType == '3') {
6bca489d   LH_PC   云平台二期UI
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
                  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;
                      });
                  }
  
                  const data = await this.$request.exportExamMultiReport({
                      examIds: this.classdiffExamReport?.map(item => item.examId) ?? [],
                      levels: paramObj.levels,
                      levelType: paramObj.levelType,
                  });
  
  
                  if (!data.status) {
                      let blob = new Blob([data], {
                          type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
                      });
                      downloadFile(
                          '多班对比.xlsx',
                          blob
                      );
                  } else {
                      this.$message.error(data.info);
                  }
              }
f45b3c05   LH_PC   云平台新UI界面
1256
1257
1258
  
          },
          _print() {
ef16e57e   LH_PC   fix:前端版本迭代
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
              var splitNumber = null;
              var index = null;
              var printType = 0;
              var fixedColumn = null;
              var diffNumber = null;
              var diffStNumber = null;
              if (this.dataType == '1' && this.currentType == '学生作答表现') {
                  splitNumber = 18;
                  fixedColumn = 2;
                  diffNumber = 2;
                  diffStNumber = 17;
              }
              else if (this.dataType == '2' && this.currentType == '小题分报表') {
                  splitNumber = 18;
                  index = 0;
                  fixedColumn = 2;
                  diffNumber = 2;
                  diffStNumber = 3;
                  printType = '即时测-小题分报表';
              }
              else if (this.dataType == '2' && this.currentType == '试题分析') {
                  splitNumber = 17;
              }
              else if (this.dataType == '2' && this.currentType == '作答明细') {
                  fixedColumn = 3;
                  diffNumber = 3;
                  diffStNumber = 17;
                  splitNumber = 18;
              }
              tablePrint({
                  id: "print-content",
                  title: this.title + "_" + this.currentType,
                  lindex: index,
                  splitParam: splitNumber,
                  printType: printType,
                  fixedColumn: fixedColumn,
                  diffNumber: diffNumber,
                  diffStNumber: diffStNumber
              });
f45b3c05   LH_PC   云平台新UI界面
1298
1299
          },
          async _changeType() {
ef16e57e   LH_PC   fix:前端版本迭代
1300
              this.loading = true;
f45b3c05   LH_PC   云平台新UI界面
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
              if (this.dataType == "1") {
                  if (this.currentType == "试题分析") {
                      await this._loadAskItemAnalysis();
                  }
                  else if (this.currentType == "学生作答表现") {
                      await this._loadAskAnwserItems();
                  }
                  else if (this.currentType == "学生互动表现") {
                      await this._loadAskInteractives();
                  }
                  else if (this.currentType == "学生签到表现") {
                      await this._loadAskCheckinStatus();
                  }
              }
              else if (this.dataType == "2") {
                  if (this.currentType == "测验成绩单") {
                      await this._testExamReport();
                  }
                  else if (this.currentType == "试题分析") {
                      await this._loadTestQuestionReport();
                  }
                  else if (this.currentType == "成绩排名") {
                      await this._loadTestStudentReport();
                  }
                  else if (this.currentType == "小题分报表") {
                      await this._loadTestStudentReport();
                  }
                  else if (this.currentType == "作答明细") {
                      await this._loadTestStudentReport();
                  }
              }
              else if (this.dataType == "3") {
  
                  if (this.currentType == "班级对比情况表") {
                      await this._classdiffExamReport();
                  }
                  else if (this.currentType == "试题分析") {
                      await this._testPaperExamReport();
                  }
ef16e57e   LH_PC   fix:前端版本迭代
1340
                  else if (this.currentType == "学生成绩排名") {
f45b3c05   LH_PC   云平台新UI界面
1341
1342
1343
                      await this._testStudentExamReport();
                  }
              }
ef16e57e   LH_PC   fix:前端版本迭代
1344
              this.loading = false;
f45b3c05   LH_PC   云平台新UI界面
1345
1346
          },
          async _testPaperExamReport() {
6bca489d   LH_PC   云平台二期UI
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
              //主观
              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界面
1371
1372
1373
1374
1375
              const request = this.$request.tPaperExamReport;
  
              let response = await request({
                  paperId: this.ids[0],
                  classIds: this.classIds,
ef16e57e   LH_PC   fix:前端版本迭代
1376
                  size: 9999
f45b3c05   LH_PC   云平台新UI界面
1377
1378
1379
1380
1381
1382
              });
  
              if (response.status != 0) {
                  this.$message.error(response.info);
                  return;
              }
ef16e57e   LH_PC   fix:前端版本迭代
1383
1384
1385
1386
1387
  
              var maxOption = 0;
              response.data.forEach((item) => {
                  if (item.details) {
                      if (maxOption < item.details.length) {
6bca489d   LH_PC   云平台二期UI
1388
                          maxOption = item.details.length;
ef16e57e   LH_PC   fix:前端版本迭代
1389
                      }
6bca489d   LH_PC   云平台二期UI
1390
                  }
f45b3c05   LH_PC   云平台新UI界面
1391
  
ef16e57e   LH_PC   fix:前端版本迭代
1392
1393
1394
1395
1396
              })
  
              let optionsList = [];
  
              for (var io = 0; io < maxOption; io++) {
6bca489d   LH_PC   云平台二期UI
1397
1398
1399
                  optionsList.push({})
              }
  
f45b3c05   LH_PC   云平台新UI界面
1400
1401
  
              let tableData = response.data?.map((item) => {
6bca489d   LH_PC   云平台二期UI
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
  
                  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界面
1420
1421
                  let params = {};
  
ef16e57e   LH_PC   fix:前端版本迭代
1422
  
f45b3c05   LH_PC   云平台新UI界面
1423
1424
1425
1426
1427
1428
1429
1430
                  const detail = item?.details ?? [];
  
                  let lastOPtion = detail?.find((item) => {
                      return item.option == "未答";
                  });
                  let defaultArr = detail?.filter((item) => {
                      return item.option != "未答";
                  });
6bca489d   LH_PC   云平台二期UI
1431
  
f45b3c05   LH_PC   云平台新UI界面
1432
                  optionsList.map((items, index) => {
ef16e57e   LH_PC   fix:前端版本迭代
1433
                      if (index < maxOption - 1) {
f45b3c05   LH_PC   云平台新UI界面
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
                          params["count" + index] =
                              defaultArr[index]?.option != "未答"
                                  ? defaultArr[index]?.count
                                  : "";
                          params["persent" + index] =
                              defaultArr[index]?.option != "未答"
                                  ? defaultArr[index]?.persent
                                  : "";
                          params["option" + index] =
                              defaultArr[index]?.option != "未答"
ef16e57e   LH_PC   fix:前端版本迭代
1444
                                  ? defaultArr[index]?.option == 1 && item.questionType == 4
f45b3c05   LH_PC   云平台新UI界面
1445
                                      ? "✓"
ef16e57e   LH_PC   fix:前端版本迭代
1446
                                      : defaultArr[index]?.option == 2 && item.questionType == 4
f45b3c05   LH_PC   云平台新UI界面
1447
1448
1449
1450
1451
1452
1453
1454
                                          ? "✗"
                                          : defaultArr[index]?.option
                                  : "";
                          items["title"] = "选项" + (index + 1);
                      } else {
                          items["title"] = "未答";
                          params["count" + index] = lastOPtion?.count ?? "";
                          params["persent" + index] = lastOPtion?.persent ?? "";
ef16e57e   LH_PC   fix:前端版本迭代
1455
                          params["option" + index] = "未答";
f45b3c05   LH_PC   云平台新UI界面
1456
1457
1458
                      }
                  });
  
f45b3c05   LH_PC   云平台新UI界面
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
                  return {
                      ...item,
                      ...params,
                  };
              });
  
              this.testPaperExamReport = tableData?.sort((a, b) => {
                  return a.questionIndex - b.questionIndex;
              });
  
              this.testPaperExamReportOptions = [...optionsList];
6bca489d   LH_PC   云平台二期UI
1470
1471
              this.testPaperExamReport.push({
                  questionIndex: "汇总",
ef16e57e   LH_PC   fix:前端版本迭代
1472
1473
1474
1475
                  questionType: "主观题",
                  score: this.examReport.subjectiveScore,
                  avgScore: this.examReport.subjectiveAvgScore,
                  gradeScoringRate: this.examReport.subjectiveRate,
6bca489d   LH_PC   云平台二期UI
1476
1477
1478
1479
                  correctAnswer: "备注"
              })
  
              this.testPaperExamReport.push({
ef16e57e   LH_PC   fix:前端版本迭代
1480
                  questionIndex: "客观题",
6bca489d   LH_PC   云平台二期UI
1481
                  type: "colspan",
ef16e57e   LH_PC   fix:前端版本迭代
1482
1483
1484
                  knowledge: this.examReport.objectiveScore,
                  score: this.examReport.objectiveAvgScore,
                  avgScore: this.examReport.objectiveRate
6bca489d   LH_PC   云平台二期UI
1485
1486
1487
1488
1489
              })
  
              this.testPaperExamReport.push({
                  questionIndex: "合计",
                  type: "colspan",
ef16e57e   LH_PC   fix:前端版本迭代
1490
1491
1492
                  knowledge: this.examReport.examPaperScore,
                  score: this.examReport.avg,
                  avgScore: this.examReport.rate
6bca489d   LH_PC   云平台二期UI
1493
              })
f45b3c05   LH_PC   云平台新UI界面
1494
1495
1496
1497
          },
          async _testStudentExamReport() {
              const request = this.$request.tgStudentExamReport;
  
6bca489d   LH_PC   云平台二期UI
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
              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界面
1508
1509
1510
              let response = await request({
                  paperId: this.ids[0],
                  classIds: this.classIds,
6bca489d   LH_PC   云平台二期UI
1511
                  reportRange: paramObj
f45b3c05   LH_PC   云平台新UI界面
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
              });
  
              if (response.status != 0) {
                  this.$message.error(response.info);
                  return;
              }
  
              this.testStudentExamReport = response.data;
          },
          async _classdiffExamReport() {
6bca489d   LH_PC   云平台二期UI
1522
1523
              this.classdiffExamReport = [];
              this.classdiffLevelOptions = [];
f45b3c05   LH_PC   云平台新UI界面
1524
1525
              const classDiffRequest = this.$request.tClassdiffExamReport;
  
6bca489d   LH_PC   云平台二期UI
1526
1527
1528
1529
1530
1531
1532
1533
1534
              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界面
1535
1536
1537
              let classDiffResponse = await classDiffRequest({
                  paperId: this.ids[0],
                  classIds: this.classIds,
6bca489d   LH_PC   云平台二期UI
1538
                  reportRange: paramObj
f45b3c05   LH_PC   云平台新UI界面
1539
1540
1541
1542
1543
1544
              });
  
              if (classDiffResponse.status != 0) {
                  this.$message.error(classDiffResponse.info);
                  return;
              }
6bca489d   LH_PC   云平台二期UI
1545
  
f45b3c05   LH_PC   云平台新UI界面
1546
1547
1548
1549
1550
              var index = 0;
  
              this.classdiffExamReport = classDiffResponse.data.map((item) => {
                  item.index = index + 1;
                  index += 1;
6bca489d   LH_PC   云平台二期UI
1551
1552
1553
1554
1555
1556
                  var cols = 0;
                  item.keys.forEach(toam => {
                      this.classdiffLevelOptions.push(toam);
                      item[toam] = item.leverValues[cols];
                      cols += 1;
                  })
f45b3c05   LH_PC   云平台新UI界面
1557
1558
                  return item;
              });
6bca489d   LH_PC   云平台二期UI
1559
1560
  
              console.log(this.fromData)
f45b3c05   LH_PC   云平台新UI界面
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
          },
          openStem(stemRow) {
              this.stem.src = stemRow.screenshot ?? "";
              this.stem.visible = true;
          },
          async _testExamReport() {
  
              this.questionTotal = [];
  
              const request = this.$request.tTestExamReport;
  
              let response = await request({
6bca489d   LH_PC   云平台二期UI
1573
1574
                  examIds: [this.ids[0]],
                  classIds: this.classIds
f45b3c05   LH_PC   云平台新UI界面
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
              });
  
              if (response.status != 0) {
                  this.$message.error(response.info);
                  return;
              }
  
              this.titleInfo = response.data.titleInfos;
  
              var studentHeaders = [];
  
              var studentResults = [];
  
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
1588
              for (var iheader = 0; iheader < 18; iheader++) {
ef16e57e   LH_PC   fix:前端版本迭代
1589
1590
1591
1592
1593
                  studentHeaders.push({
                      prop: "column" + iheader,
                      label: this.studentMapping[iheader % this.studentMapping.length].label,
                      key: this.studentMapping[iheader % this.studentMapping.length].key,
                  });
f45b3c05   LH_PC   云平台新UI界面
1594
1595
              }
  
ef16e57e   LH_PC   fix:前端版本迭代
1596
1597
              var studentList = response.data.gradeExamStudentReports;
  
f45b3c05   LH_PC   云平台新UI界面
1598
1599
              this.studentHeader = [...studentHeaders];
  
ef16e57e   LH_PC   fix:前端版本迭代
1600
              var stuRow = Math.ceil(studentList.length * 1.00 / 3);
f45b3c05   LH_PC   云平台新UI界面
1601
  
ef16e57e   LH_PC   fix:前端版本迭代
1602
              for (var isp = 0; isp < studentList.length; isp++) {
f45b3c05   LH_PC   云平台新UI界面
1603
  
ef16e57e   LH_PC   fix:前端版本迭代
1604
                  var row = isp % stuRow;
f45b3c05   LH_PC   云平台新UI界面
1605
  
ef16e57e   LH_PC   fix:前端版本迭代
1606
                  var col = parseInt(isp / stuRow);
f45b3c05   LH_PC   云平台新UI界面
1607
  
ef16e57e   LH_PC   fix:前端版本迭代
1608
                  var item = {};
f45b3c05   LH_PC   云平台新UI界面
1609
  
ef16e57e   LH_PC   fix:前端版本迭代
1610
1611
                  if (studentResults.length <= row)
                      studentResults.push({});
f45b3c05   LH_PC   云平台新UI界面
1612
  
ef16e57e   LH_PC   fix:前端版本迭代
1613
                  item = studentResults[row];
f45b3c05   LH_PC   云平台新UI界面
1614
  
ef16e57e   LH_PC   fix:前端版本迭代
1615
                  var studentResult = studentList[isp];
f45b3c05   LH_PC   云平台新UI界面
1616
  
ef16e57e   LH_PC   fix:前端版本迭代
1617
1618
1619
1620
1621
1622
1623
1624
                  item["column" + (6 * col)] = studentResult.code;
                  item["column" + (6 * col + 1)] = studentResult.name;
                  item["column" + (6 * col + 2)] = studentResult.gradeRank;
                  item["column" + (6 * col + 3)] = studentResult.exam;
                  item["column" + (6 * col + 4)] = studentResult.objective;
                  item["column" + (6 * col + 5)] = studentResult.subjective;
              }
              console.log(studentResults)
f45b3c05   LH_PC   云平台新UI界面
1625
1626
              this.studentList = [...studentResults];
  
6bca489d   LH_PC   云平台二期UI
1627
              var show4Area = true;  //显示4选项区域
f45b3c05   LH_PC   云平台新UI界面
1628
  
6bca489d   LH_PC   云平台二期UI
1629
              var show7Area = true;  //显示7选项区域
f45b3c05   LH_PC   云平台新UI界面
1630
  
6bca489d   LH_PC   云平台二期UI
1631
              var show10Area = true;  //显示10选项区域
f45b3c05   LH_PC   云平台新UI界面
1632
  
6bca489d   LH_PC   云平台二期UI
1633
              var optionNumList = [];
f45b3c05   LH_PC   云平台新UI界面
1634
  
6bca489d   LH_PC   云平台二期UI
1635
              var maxOptions = 4;
f45b3c05   LH_PC   云平台新UI界面
1636
  
6bca489d   LH_PC   云平台二期UI
1637
              var minOptions = 10;  //最多10个选项
f45b3c05   LH_PC   云平台新UI界面
1638
  
6bca489d   LH_PC   云平台二期UI
1639
              var questionList = response.data.questionInfos;
f45b3c05   LH_PC   云平台新UI界面
1640
  
6bca489d   LH_PC   云平台二期UI
1641
              questionList = questionList.sort((prev, next) => { return prev.questionIndex - next.questionIndex });
f45b3c05   LH_PC   云平台新UI界面
1642
  
6bca489d   LH_PC   云平台二期UI
1643
              for (var i = 0; i < questionList.length; i++) {
f45b3c05   LH_PC   云平台新UI界面
1644
  
ef16e57e   LH_PC   fix:前端版本迭代
1645
1646
1647
                  var correctAnswerValue =
                      questionList[i].questionType == 4 && questionList[i].correctAnswer == "1" ? "✓" :
                          questionList[i].questionType == 4 && questionList[i].correctAnswer == "2" ? "✗" : questionList[i].correctAnswer;
f45b3c05   LH_PC   云平台新UI界面
1648
  
6bca489d   LH_PC   云平台二期UI
1649
1650
                  var missCount = 0;
  
ead476dd   LH_PC   fix:最终定版
1651
                  var missI = questionList[i].details.filter(item => item.option.indexOf('未答') < 0 && !item.right);
6bca489d   LH_PC   云平台二期UI
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
  
                  missI.forEach(itemsa => {
                      missCount = Number(missCount) + Number(itemsa.students?.length ?? 0)
                  });
                  this.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界面
1678
                  }
ef16e57e   LH_PC   fix:前端版本迭代
1679
1680
1681
1682
                  if (questionList[i].questionType == 3) {
                      if (minOptions > 4) minOptions = 4;
                  }
  
f45b3c05   LH_PC   云平台新UI界面
1683
1684
              }
  
6bca489d   LH_PC   云平台二期UI
1685
              show4Area = minOptions <= 4;
f45b3c05   LH_PC   云平台新UI界面
1686
  
6bca489d   LH_PC   云平台二期UI
1687
              show7Area = optionNumList.filter(o => o > 4 && o <= 7);
f45b3c05   LH_PC   云平台新UI界面
1688
  
6bca489d   LH_PC   云平台二期UI
1689
              show10Area = optionNumList.filter(o => o > 7);
f45b3c05   LH_PC   云平台新UI界面
1690
  
f45b3c05   LH_PC   云平台新UI界面
1691
  
6bca489d   LH_PC   云平台二期UI
1692
              var currentRow = {};
f45b3c05   LH_PC   云平台新UI界面
1693
  
6bca489d   LH_PC   云平台二期UI
1694
              if (show4Area) {
f45b3c05   LH_PC   云平台新UI界面
1695
  
6bca489d   LH_PC   云平台二期UI
1696
                  var areaList = [];
f45b3c05   LH_PC   云平台新UI界面
1697
  
6bca489d   LH_PC   云平台二期UI
1698
                  var quesRow = Math.ceil(questionList?.length * 1.00 / 3);
f45b3c05   LH_PC   云平台新UI界面
1699
  
6bca489d   LH_PC   云平台二期UI
1700
1701
                  for (var irow = 0; irow < quesRow; irow++) {
                      areaList.push({});
f45b3c05   LH_PC   云平台新UI界面
1702
                  }
f45b3c05   LH_PC   云平台新UI界面
1703
  
6bca489d   LH_PC   云平台二期UI
1704
1705
1706
                  for (var i = 0; i < questionList?.length; i++) {
  
                      var col = parseInt(i / quesRow);
f45b3c05   LH_PC   云平台新UI界面
1707
  
6bca489d   LH_PC   云平台二期UI
1708
                      var row = parseInt(i % quesRow);
f45b3c05   LH_PC   云平台新UI界面
1709
  
6bca489d   LH_PC   云平台二期UI
1710
                      var question = questionList[i];
f45b3c05   LH_PC   云平台新UI界面
1711
  
6bca489d   LH_PC   云平台二期UI
1712
                      var currentRow = areaList[row];
f45b3c05   LH_PC   云平台新UI界面
1713
  
ef16e57e   LH_PC   fix:前端版本迭代
1714
1715
1716
                      var correctAnswerValue =
                          question.questionType == 4 && question.correctAnswer == "1" ? "✓" :
                              question.questionType == 4 && question.correctAnswer == "2" ? "✗" : question.correctAnswer;
6bca489d   LH_PC   云平台二期UI
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
  
                      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界面
1730
1731
                          }
                          else {
6bca489d   LH_PC   云平台二期UI
1732
1733
1734
1735
1736
1737
  
                              var questionDetail = details[ilr - 2];
  
                              var questionColumn = 'column' + Number(6 * col + ilr);
  
                              if (details.length <= 4) {
ef16e57e   LH_PC   fix:前端版本迭代
1738
1739
                                  var questionOption = questionDetail ? (question.questionType == 4 && questionDetail.option == "1" ? "✓" :
                                      question.questionType == 4 && questionDetail.option == "2" ? "✗" : questionDetail.option) : "- -"
6bca489d   LH_PC   云平台二期UI
1740
1741
1742
1743
1744
1745
1746
1747
  
                                  if (questionOption != "- -") questionOption += "(" + questionDetail.persent + ")";
  
                                  currentRow[questionColumn] = questionOption;
                              }
                              else {
                                  currentRow[questionColumn] = "--";
                              }
f45b3c05   LH_PC   云平台新UI界面
1748
1749
                          }
                      }
f45b3c05   LH_PC   云平台新UI界面
1750
1751
                  }
  
6bca489d   LH_PC   云平台二期UI
1752
1753
                  this.question4List = [...areaList]
  
f45b3c05   LH_PC   云平台新UI界面
1754
1755
              }
  
f45b3c05   LH_PC   云平台新UI界面
1756
  
6bca489d   LH_PC   云平台二期UI
1757
              if (show7Area && show7Area.length > -1) {
f45b3c05   LH_PC   云平台新UI界面
1758
  
6bca489d   LH_PC   云平台二期UI
1759
                  var areaList = [];
f45b3c05   LH_PC   云平台新UI界面
1760
  
6bca489d   LH_PC   云平台二期UI
1761
                  var quesRow = Math.ceil(show7Area.length * 1.00 / 2);
f45b3c05   LH_PC   云平台新UI界面
1762
  
6bca489d   LH_PC   云平台二期UI
1763
                  var num = 0;
f45b3c05   LH_PC   云平台新UI界面
1764
  
6bca489d   LH_PC   云平台二期UI
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
                  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界面
1775
                      });
6bca489d   LH_PC   云平台二期UI
1776
1777
1778
1779
1780
1781
1782
1783
1784
  
                      if (question.questionType == 2 && details.length > 4 && details.length <= 7) {
  
                          var col = parseInt(num / quesRow);
  
                          var row = parseInt(num % quesRow);
  
                          var currentRow = areaList[row];
  
ef16e57e   LH_PC   fix:前端版本迭代
1785
1786
                          var correctAnswerValue = question.questionType == 4 && question.correctAnswer == "1" ? "✓" :
                              question.questionType == 4 && question.correctAnswer == "2" ? "✗" : question.correctAnswer;
6bca489d   LH_PC   云平台二期UI
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
  
                          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界面
1810
                  }
6bca489d   LH_PC   云平台二期UI
1811
1812
  
                  this.question7List = [...areaList]
f45b3c05   LH_PC   云平台新UI界面
1813
1814
              }
  
f45b3c05   LH_PC   云平台新UI界面
1815
  
6bca489d   LH_PC   云平台二期UI
1816
              if (show10Area && show10Area.length > -1) {
f45b3c05   LH_PC   云平台新UI界面
1817
  
6bca489d   LH_PC   云平台二期UI
1818
                  var areaList = [];
f45b3c05   LH_PC   云平台新UI界面
1819
  
6bca489d   LH_PC   云平台二期UI
1820
                  var quesRow = show10Area.length;
f45b3c05   LH_PC   云平台新UI界面
1821
  
6bca489d   LH_PC   云平台二期UI
1822
                  var num = 0;
f45b3c05   LH_PC   云平台新UI界面
1823
  
6bca489d   LH_PC   云平台二期UI
1824
1825
                  for (var irow = 0; irow < quesRow; irow++) {
                      areaList.push({});
f45b3c05   LH_PC   云平台新UI界面
1826
1827
                  }
  
6bca489d   LH_PC   云平台二期UI
1828
                  for (var i = 0; i < questionList?.length; i++) {
f45b3c05   LH_PC   云平台新UI界面
1829
  
6bca489d   LH_PC   云平台二期UI
1830
                      var question = questionList[i];
f45b3c05   LH_PC   云平台新UI界面
1831
  
6bca489d   LH_PC   云平台二期UI
1832
1833
1834
                      var details = question.details.filter(fl => {
                          return fl.option.indexOf('未答') < 0;
                      });
f45b3c05   LH_PC   云平台新UI界面
1835
  
6bca489d   LH_PC   云平台二期UI
1836
1837
                      if (question.questionType == 2 && details.length > 7) {
                          var col = parseInt(num / quesRow);
f45b3c05   LH_PC   云平台新UI界面
1838
  
6bca489d   LH_PC   云平台二期UI
1839
                          var row = num;
f45b3c05   LH_PC   云平台新UI界面
1840
  
6bca489d   LH_PC   云平台二期UI
1841
                          var currentRow = areaList[row];
f45b3c05   LH_PC   云平台新UI界面
1842
  
ef16e57e   LH_PC   fix:前端版本迭代
1843
1844
                          var correctAnswerValue = question.questionType == 4 && question.correctAnswer == "1" ? "✓" :
                              question.questionType == 4 && question.correctAnswer == "2" ? "✗" : question.correctAnswer;
f45b3c05   LH_PC   云平台新UI界面
1845
  
6bca489d   LH_PC   云平台二期UI
1846
                          for (var ilr = 0; ilr < 12; ilr++) {
f45b3c05   LH_PC   云平台新UI界面
1847
  
6bca489d   LH_PC   云平台二期UI
1848
1849
1850
1851
1852
1853
1854
                              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界面
1855
  
6bca489d   LH_PC   云平台二期UI
1856
                                  var questionDetail = details[ilr - 2];
f45b3c05   LH_PC   云平台新UI界面
1857
  
6bca489d   LH_PC   云平台二期UI
1858
                                  var questionColumn = 'column' + Number(12 * col + ilr);
f45b3c05   LH_PC   云平台新UI界面
1859
  
6bca489d   LH_PC   云平台二期UI
1860
1861
1862
                                  currentRow[questionColumn] = questionDetail ? questionDetail.option + "(" + questionDetail.persent + ")" : "- -";
                              }
                          }
f45b3c05   LH_PC   云平台新UI界面
1863
  
6bca489d   LH_PC   云平台二期UI
1864
1865
                          num = num + 1;
                      }
f45b3c05   LH_PC   云平台新UI界面
1866
  
f45b3c05   LH_PC   云平台新UI界面
1867
                  }
6bca489d   LH_PC   云平台二期UI
1868
1869
  
                  this.question10List = [...areaList]
f45b3c05   LH_PC   云平台新UI界面
1870
1871
              }
  
f45b3c05   LH_PC   云平台新UI界面
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
  
          },
          async _loadAskInteractives() {
              const request =
                  this.role == "ROLE_PERSONAL"
                      ? this.$request.pPhaseInteractiveReport
                      : this.$request.phaseInteractiveReport;
  
              let response = await request({
                  periodIds: this.ids,
                  classIds: this.classIds
              });
  
              if (response.status != 0) {
                  this.$message.error(response.info);
                  return;
              }
  
              this.askInteractives = response.data.list;
          },
          async _loadAskItemAnalysis() {
              const request =
                  this.role == "ROLE_PERSONAL"
                      ? this.$request.pPeriodDetail
                      : this.$request.periodDetail;
  
              let response = await request({
ef16e57e   LH_PC   fix:前端版本迭代
1899
1900
                  periodIds: this.ids,
                  size: 9999
f45b3c05   LH_PC   云平台新UI界面
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
              });
  
              if (response.status != 0) {
                  this.$message.error(response.info);
                  return;
              }
  
              this.detail = response.data;
  
              this.detail.selectDate = formatDate(new Date(), "yyyy-MM-dd");
  
              const listRequest =
                  this.role == "ROLE_PERSONAL"
                      ? this.$request.pPeriodQuestionReport
                      : this.$request.periodQuestionReport;
  
  
              let listResponse = await listRequest({
                  periodIds: this.ids,
ef16e57e   LH_PC   fix:前端版本迭代
1920
1921
                  classIds: this.classIds,
                  size: 9999
f45b3c05   LH_PC   云平台新UI界面
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
              });
  
              if (listResponse.status != 0) {
                  this.$message.error(listResponse.info);
                  return;
              }
  
              this.askItemAnalysis = listResponse.data.list;
  
          },
          async _loadAskAnwserItems() {
              const request =
                  this.role == "ROLE_PERSONAL"
                      ? this.$request.pPeriodStudentReport
                      : this.$request.periodStudentReport;
  
              let response = await request({
                  periodId: this.ids[0],
                  classId: this.classIds[0]
              });
  
              if (response.status != 0) {
                  this.$message.error(response.info);
                  return;
              }
  
              this.askPeriodQuestionItems = response.data.list.map((item) => {
                  let params = {};
                  const detail = item.detail ? JSON.parse(item.detail) : [];
                  if (detail.length > this.askPeriodQuestionItemOptions.length) {
                      this.askPeriodQuestionItemOptions = [...detail];
                  }
ef16e57e   LH_PC   fix:前端版本迭代
1954
  
f45b3c05   LH_PC   云平台新UI界面
1955
1956
1957
                  detail.map((items, index) => {
                      params["isRight" + index] = items.isRight;
                      params["answer" + index] =
ef16e57e   LH_PC   fix:前端版本迭代
1958
                          items.answer == "1" && items.questionType == 4
f45b3c05   LH_PC   云平台新UI界面
1959
                              ? "✓"
ef16e57e   LH_PC   fix:前端版本迭代
1960
                              : items.answer == "2" && items.questionType == 4
f45b3c05   LH_PC   云平台新UI界面
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
                                  ? "✗"
                                  : items.answer;
                  });
                  return {
                      ...item,
                      ...params
                  };
              });
          },
          async _loadAskCheckinStatus() {
  
              const detailRequest =
                  this.role == "ROLE_PERSONAL"
                      ? this.$request.pPeriodDetail
                      : this.$request.periodDetail;
  
              let detailResponse = await detailRequest({
                  periodIds: this.ids
              });
  
              if (detailResponse.status != 0) {
                  this.$message.error(response.info);
                  return;
              }
  
              this.detail = detailResponse.data;
  
              const request =
                  this.role == "ROLE_PERSONAL"
                      ? this.$request.pPeriodStudentReport
                      : this.$request.periodStudentReport;
  
              let response = await request({
                  periodId: this.ids[0],
                  classId: this.classIds[0],
                  type: 3
              });
  
              if (response.status != 0) {
                  this.$message.error(response.info);
                  return;
              }
  
              this.askCheckinStatus = response.data.list;
  
f45b3c05   LH_PC   云平台新UI界面
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
  
          },
          async _loadTestDetail() {
              //详情 
              const examDetail =
                  this.role == "ROLE_PERSONAL"
                      ? this.$request.pExamDetail
                      : this.$request.examDetail;
  
              let { data, info, status } = await examDetail({
                  examId: this.ids[0],
              });
  
              if (status != 0) {
                  this.$message.error(info);
                  return;
              }
  
              this.testReport = { ...data?.examReport };
          },
          async _loadTestStudentReport() {
  
6bca489d   LH_PC   云平台二期UI
2028
2029
2030
2031
2032
2033
2034
2035
              this.testStudents = [];
              this.testStudentOptions = [];
              this.studentAnsered = [];
              this.studentAnseredOptions = [];
              this.studentRank = [];
              this.studentQuestions = [];
              this.studentQuestionOptions = [];
  
f45b3c05   LH_PC   云平台新UI界面
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
              const examStudentReport =
                  this.role == "ROLE_PERSONAL"
                      ? this.$request.pExamStudentReport
                      : this.$request.examStudentReport;
  
              let { data, info, status } = await examStudentReport({
                  examId: this.ids[0],
              });
  
              if (status != 0) {
                  this.$message.error(info);
                  return;
              }
  
              let optionsList = [];
  
6bca489d   LH_PC   云平台二期UI
2052
              let rTestStudents = data?.list.map((item) => {
f45b3c05   LH_PC   云平台新UI界面
2053
2054
2055
2056
2057
2058
2059
2060
                  let params = {};
                  const detail = JSON.parse(item.detail);
                  if (detail.length) {
                      this.showSelect = false;
                  }
                  if (detail.length > optionsList.length) {
                      optionsList = [...detail];
                  }
ef16e57e   LH_PC   fix:前端版本迭代
2061
  
f45b3c05   LH_PC   云平台新UI界面
2062
2063
2064
2065
2066
2067
                  detail.map((items, index) => {
                      params["que" + items.id] = items.id;
                      params["score" + items.id] = String(items.score).includes(".")
                          ? Number(items.score)
                          : items.score;
                      params["answer" + items.id] =
ef16e57e   LH_PC   fix:前端版本迭代
2068
                          items.questionType == 4 && items.answer == "1" ? "✓" : items.questionType == 4 && items.answer == "2" ? "✗" : items.answer;
f45b3c05   LH_PC   云平台新UI界面
2069
                      params["isRight" + items.id] = items.isRight;
ef16e57e   LH_PC   fix:前端版本迭代
2070
                      params["questionType" + items.id] = item.questionType;
f45b3c05   LH_PC   云平台新UI界面
2071
2072
2073
2074
2075
2076
2077
                  });
                  return {
                      ...item,
                      ...params,
                  };
              });
  
6bca489d   LH_PC   云平台二期UI
2078
              let rtestStudentOptions = optionsList.sort((a, b) => {
f45b3c05   LH_PC   云平台新UI界面
2079
2080
                  return a.id - b.id;
              });
6bca489d   LH_PC   云平台二期UI
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
  
              if (this.currentType == "成绩排名") {
                  this.studentRank = [...rTestStudents]
              }
              else if (this.currentType == "小题分报表") {
                  this.studentQuestions = [...rTestStudents]
                  this.studentQuestionOptions = [...rtestStudentOptions]
              }
              else if (this.currentType == "作答明细") {
                  this.studentAnsered = [...rTestStudents]
                  this.studentAnseredOptions = [...rtestStudentOptions]
              }
f45b3c05   LH_PC   云平台新UI界面
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
          },
          async _loadTestQuestionReport() {
              //试题分析
              this.loading = true;
              const examQuestionReport =
                  this.role == "ROLE_PERSONAL"
                      ? this.$request.pExamQuestionReport
                      : this.$request.examQuestionReport;
  
              let { data, info, status } = await examQuestionReport({
                  examId: this.ids[0],
                  page: 1,
                  size: 9999,
              });
  
              if (status != 0) {
                  this.$message.error(info);
                  return;
              }
  
6bca489d   LH_PC   云平台二期UI
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
              //主观
              var subjective = {
                  sum: 0.0,
                  avg: 0.0,
                  rate: 0.0,
                  number: 0,
                  max: 0,
                  min: 9999,
                  answeredRate: 0
              };
  
              //客观
              var objective = {
                  sum: 0.0,
                  avg: 0.0,
                  rate: 0.0,
                  number: 0,
                  max: 0,
                  min: 9999,
                  answeredRate: 0
              };
  
              //汇总
              var summary = {
                  sum: 0.0,
                  avg: 0.0,
                  rate: 0.0,
                  number: 0,
                  max: 0,
                  min: 9999,
                  answeredRate: 0
              };
ef16e57e   LH_PC   fix:前端版本迭代
2145
  
6bca489d   LH_PC   云平台二期UI
2146
              var maxOption = 0;
ef16e57e   LH_PC   fix:前端版本迭代
2147
2148
2149
2150
2151
2152
2153
  
              data?.list?.forEach((item) => {
  
                  const detail = JSON.parse(item.detail);
  
                  if (maxOption < detail.length) {
  
6bca489d   LH_PC   云平台二期UI
2154
                      maxOption = detail.length;
ef16e57e   LH_PC   fix:前端版本迭代
2155
                  }
6bca489d   LH_PC   云平台二期UI
2156
              })
6bca489d   LH_PC   云平台二期UI
2157
  
ef16e57e   LH_PC   fix:前端版本迭代
2158
2159
2160
              let optionsList = [];
  
              for (var io = 0; io < maxOption; io++) {
6bca489d   LH_PC   云平台二期UI
2161
2162
                  optionsList.push({})
              }
f45b3c05   LH_PC   云平台新UI界面
2163
2164
2165
  
              let tableData = data?.list?.map((item) => {
                  let params = {};
6bca489d   LH_PC   云平台二期UI
2166
  
f45b3c05   LH_PC   云平台新UI界面
2167
                  const detail = JSON.parse(item.detail);
6bca489d   LH_PC   云平台二期UI
2168
  
f45b3c05   LH_PC   云平台新UI界面
2169
2170
2171
2172
2173
2174
2175
2176
                  let lastOPtion = detail?.find((item) => {
                      return item.option == "未答";
                  });
                  let defaultArr = detail?.filter((item) => {
                      return item.option != "未答";
                  });
  
                  optionsList.map((items, index) => {
6bca489d   LH_PC   云平台二期UI
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
                      params["count" + index] =
                          defaultArr[index]?.option != "未答"
                              ? defaultArr[index]?.count
                              : "";
                      params["persent" + index] =
                          defaultArr[index]?.option != "未答"
                              ? defaultArr[index]?.persent
                              : "";
                      params["option" + index] =
                          defaultArr[index]?.option != "未答"
ef16e57e   LH_PC   fix:前端版本迭代
2187
                              ? defaultArr[index]?.option == "1" && item?.questionType == 4
6bca489d   LH_PC   云平台二期UI
2188
                                  ? "✓"
ef16e57e   LH_PC   fix:前端版本迭代
2189
                                  : defaultArr[index]?.option == "2" && item?.questionType == 4
6bca489d   LH_PC   云平台二期UI
2190
2191
2192
                                      ? "✗"
                                      : defaultArr[index]?.option
                              : "";
ef16e57e   LH_PC   fix:前端版本迭代
2193
  
6bca489d   LH_PC   云平台二期UI
2194
                      items["title"] = "选项" + (index + 1);
ef16e57e   LH_PC   fix:前端版本迭代
2195
2196
2197
2198
2199
2200
2201
                      if (index >= optionsList.length - 1) {
                          items["title"] = "未答";
                          params["count" + index] = lastOPtion.count;
                          params["persent" + index] = lastOPtion.persent;
                          params["option" + index] = "未答";
                      }
  
f45b3c05   LH_PC   云平台新UI界面
2202
                  });
6bca489d   LH_PC   云平台二期UI
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
  
                  summary.sum += parseFloat(item.score);
                  summary.avg += parseFloat(item.avgScore);
                  summary.rate += parseFloat(item.classScoringRate);
                  summary.number += 1;
                  summary.max = item.highestScore > summary.max ? item.highestScore : summary.max;
                  summary.min = item.lowestScore < summary.min ? item.lowestScore : summary.min;
  
                  if (item.questionType == 5) {
                      subjective.sum += parseFloat(item.score);
                      subjective.avg += parseFloat(item.avgScore);
                      subjective.rate += parseFloat(item.classScoringRate);
                      subjective.number += 1;
                      subjective.max = item.highestScore > summary.max ? item.highestScore : summary.max;
                      subjective.min = item.lowestScore < summary.min ? item.lowestScore : summary.min;
                  }
  
                  else {
                      objective.sum += parseFloat(item.score);
                      objective.avg += parseFloat(item.avgScore);
                      objective.rate += parseFloat(item.classScoringRate);
                      objective.number += 1;
                      objective.max = item.highestScore > summary.max ? item.highestScore : summary.max;
                      objective.min = item.lowestScore < summary.min ? item.lowestScore : summary.min;
                  }
  
f45b3c05   LH_PC   云平台新UI界面
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
                  return {
                      ...item,
                      ...params,
                  };
              });
  
              this.testQuestions = tableData?.sort((a, b) => {
                  return a.questionIndex - b.questionIndex;
              });
  
              this.testQuestionOptions = [...optionsList];
6bca489d   LH_PC   云平台二期UI
2240
2241
2242
2243
2244
  
              this.testQuestions.push({
                  questionIndex: "汇总",
                  questionType: "主观题",
                  //满分值
ef16e57e   LH_PC   fix:前端版本迭代
2245
                  score: this.examReport.subjectiveScore,
6bca489d   LH_PC   云平台二期UI
2246
                  //最高分
ef16e57e   LH_PC   fix:前端版本迭代
2247
                  highestScore: this.examReport.subjectiveHighestScore,
6bca489d   LH_PC   云平台二期UI
2248
                  //最低分
ef16e57e   LH_PC   fix:前端版本迭代
2249
                  lowestScore: this.examReport.subjectiveLowestScore,
6bca489d   LH_PC   云平台二期UI
2250
                  //平均分
ef16e57e   LH_PC   fix:前端版本迭代
2251
                  avgScore: this.examReport.subjectiveAvgScore,
6bca489d   LH_PC   云平台二期UI
2252
                  //已考得分率
ef16e57e   LH_PC   fix:前端版本迭代
2253
2254
                  scoringRate: this.examReport.subjectiveScoringRate,
                  correctAnswer: "备注"
6bca489d   LH_PC   云平台二期UI
2255
2256
2257
2258
2259
2260
              })
  
              this.testQuestions.push({
                  questionIndex: "客观题",
                  type: "colspan",
                  //满分值
ef16e57e   LH_PC   fix:前端版本迭代
2261
                  knowledge: this.examReport.objectiveScore,
6bca489d   LH_PC   云平台二期UI
2262
                  //最高分
ef16e57e   LH_PC   fix:前端版本迭代
2263
                  score: this.examReport.objectiveHighestScore,
6bca489d   LH_PC   云平台二期UI
2264
                  //最低分
ef16e57e   LH_PC   fix:前端版本迭代
2265
                  highestScore: this.examReport.objectiveLowestScore,
6bca489d   LH_PC   云平台二期UI
2266
                  //平均分
ef16e57e   LH_PC   fix:前端版本迭代
2267
                  lowestScore: this.examReport.objectiveAvgScore,
6bca489d   LH_PC   云平台二期UI
2268
                  //已考得分率
ef16e57e   LH_PC   fix:前端版本迭代
2269
                  avgScore: this.examReport.objectiveScoringRate
6bca489d   LH_PC   云平台二期UI
2270
2271
              })
  
6bca489d   LH_PC   云平台二期UI
2272
2273
2274
2275
              this.testQuestions.push({
                  questionIndex: "合计",
                  type: "colspan",
                  //满分值
ef16e57e   LH_PC   fix:前端版本迭代
2276
                  knowledge: this.examReport.examPaperScore,
6bca489d   LH_PC   云平台二期UI
2277
                  //最高分
ef16e57e   LH_PC   fix:前端版本迭代
2278
                  score: this.examReport.highestScore,
6bca489d   LH_PC   云平台二期UI
2279
                  //最低分
ef16e57e   LH_PC   fix:前端版本迭代
2280
                  highestScore: this.examReport.lowestScore,
6bca489d   LH_PC   云平台二期UI
2281
                  //平均分
ef16e57e   LH_PC   fix:前端版本迭代
2282
                  lowestScore: this.examReport.avgScore,
6bca489d   LH_PC   云平台二期UI
2283
                  //已考得分率
ef16e57e   LH_PC   fix:前端版本迭代
2284
                  avgScore: this.examReport.scoringRate
6bca489d   LH_PC   云平台二期UI
2285
2286
2287
2288
2289
2290
              })
          },
          keydownRange(event) {
              if (event.key == "-" || event.key == "e") {
                  event.returnValue = "";
              }
f45b3c05   LH_PC   云平台新UI界面
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
          }
      }
  }
  </script>
  <style lang="scss">
  .opration-select {
      margin-left: 10px !important;
  }
  
  .row-line {
      overflow: hidden;
6bca489d   LH_PC   云平台二期UI
2302
      width: calc(20% - 4px);
f45b3c05   LH_PC   云平台新UI界面
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
      border: 1px solid #ebeef5;
      background: #f5f7fa;
      display: inline-block;
      height: 40px;
      line-height: 40px;
  
      .line-subfix {
          margin-left: 10px;
  
      }
  }
  
  .row-table {
      margin-top: 20px;
  }
  
ef16e57e   LH_PC   fix:前端版本迭代
2319
2320
2321
2322
2323
2324
  
  
  
  // .red {
  //     color: #f30;
  // }
6bca489d   LH_PC   云平台二期UI
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
  
  .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界面
2390
  </style>