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
      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 ?? ""
45b98e8e   LH_PC   fix:修复年级组长打印,班主任最...
754
          await this._queryDefaultLevels(); 
ef16e57e   LH_PC   fix:前端版本迭代
755
          await this._examDetail();
45b98e8e   LH_PC   fix:修复年级组长打印,班主任最...
756
757
          await this._changeType(); 
          
f45b3c05   LH_PC   云平台新UI界面
758
759
760
      },
      data() {
          return {
ef16e57e   LH_PC   fix:前端版本迭代
761
              loading: true,
6bca489d   LH_PC   云平台二期UI
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
              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界面
783
784
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
              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
812
813
814
              question4List: [],
              question7List: [],
              question10List: [],
f45b3c05   LH_PC   云平台新UI界面
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
              questionTotal: [],
              dataType: null,
              classIds: [],
              subjects: [],
              ids: [],
              // 试题分析对象
              askItemAnalysis: [],
              // 作答情况对象
              askPeriodQuestionItems: [],
              // 作答情况选项对象
              askPeriodQuestionItemOptions: [],
              // 学生互动问答对象
              askInteractives: [],
              // 学生签到情况
              askCheckinStatus: [],
              // 报表详情
ef16e57e   LH_PC   fix:前端版本迭代
831
              examReport: {
f45b3c05   LH_PC   云平台新UI界面
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
                  subjectiveScore: 0,
                  subjectiveHighestScore: "",
                  subjectiveLowestScore: "",
                  subjectiveAvgScore: "",
                  subjectiveClassScoringRate: "",
                  objectiveScore: "",
                  objectiveHighestScore: "",
                  objectiveLowestScore: "",
                  objectiveAvgScore: "",
                  objectiveClassScoringRate: "",
                  examPaperScore: "",
                  highestScore: "",
                  lowestScore: "",
                  avgScore: "",
                  classScoringRate: "",
              },
              // 报表学生详情
              testStudents: [],
              // 报表学生选项
              testStudentOptions: [],
6bca489d   LH_PC   云平台二期UI
852
853
854
855
856
              studentAnsered: [],
              studentAnseredOptions: [],
              studentRank: [],
              studentQuestions: [],
              studentQuestionOptions: [],
f45b3c05   LH_PC   云平台新UI界面
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
              // 报表题目详情
              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
877
                          tit = type;
f45b3c05   LH_PC   云平台新UI界面
878
879
880
881
                  }
                  return tit;
              },
              setDuration(times) {
ef16e57e   LH_PC   fix:前端版本迭代
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
                  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界面
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
                  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:前端版本迭代
924
                  name: "学生成绩排名"
f45b3c05   LH_PC   云平台新UI界面
925
926
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
              }, {
                  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
956
              classdiffLevelOptions: [],
f45b3c05   LH_PC   云平台新UI界面
957
958
959
              testPaperExamReport: [],
              testStudentExamReport: [],
              testPaperExamReportOptions: [],
6bca489d   LH_PC   云平台二期UI
960
              diffType: 0,
f45b3c05   LH_PC   云平台新UI界面
961
962
963
964
965
966
967
968
              //题干数据对象
              stem: {
                  visible: false,
                  src: null
              }
          }
      },
      methods: {
ef16e57e   LH_PC   fix:前端版本迭代
969
970
971
          _knowledge(param) {
              return getKnowledge(param);
          },
6bca489d   LH_PC   云平台二期UI
972
          async _examDetail() {
ef16e57e   LH_PC   fix:前端版本迭代
973
974
975
976
977
              if (this.dataType == 2) {
                  const examDetail =
                      this.role == "ROLE_PERSONAL"
                          ? this.$request.pExamDetail
                          : this.$request.examDetail;
6bca489d   LH_PC   云平台二期UI
978
  
ef16e57e   LH_PC   fix:前端版本迭代
979
980
981
982
983
984
985
986
987
988
989
990
                  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
991
                  }
ef16e57e   LH_PC   fix:前端版本迭代
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
              }
              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;
45b98e8e   LH_PC   fix:修复年级组长打印,班主任最...
1012
                  } 
ef16e57e   LH_PC   fix:前端版本迭代
1013
                  this.examReport = { ...data };
45b98e8e   LH_PC   fix:修复年级组长打印,班主任最...
1014
                  this.examPaperScore = this.examReport.examPaperScore;
6bca489d   LH_PC   云平台二期UI
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
              }
          },
          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:前端版本迭代
1027
                  location.reload();
6bca489d   LH_PC   云平台二期UI
1028
1029
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
              } 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:前端版本迭代
1074
1075
1076
1077
1078
1079
1080
1081
1082
                  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
1083
1084
1085
                  else {
                      return [1, 1]
                  }
ef16e57e   LH_PC   fix:前端版本迭代
1086
1087
1088
1089
              } else if (rowIndex > this.testQuestions?.length - 3) {
                  if (columnIndex >= 7) {
                      return [0, 0];
                  }
6bca489d   LH_PC   云平台二期UI
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
              }
              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:前端版本迭代
1104
1105
1106
1107
                      return [3, this.testPaperExamReportOptions.length];
                  }
                  else if (columnIndex >= 7) {
                      return [0, 0];
6bca489d   LH_PC   云平台二期UI
1108
1109
1110
1111
                  }
                  else {
                      return [1, 1]
                  }
ef16e57e   LH_PC   fix:前端版本迭代
1112
1113
1114
1115
              } else if (rowIndex > this.testPaperExamReport?.length - 3) {
                  if (columnIndex >= 5) {
                      return [0, 0];
                  }
6bca489d   LH_PC   云平台二期UI
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
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
              }
              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界面
1172
1173
1174
1175
1176
1177
          async _export() {
              if (this.dataType == "1") {
  
                  let exportPeriodReport = "";
  
                  var query = {};
6bca489d   LH_PC   云平台二期UI
1178
  
f45b3c05   LH_PC   云平台新UI界面
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
                  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界面
1201
1202
1203
1204
1205
1206
1207
1208
1209
                  const exportExamReport =
                      this.role == "ROLE_PERSONAL"
                          ? this.$request.pExportExamReport
                          : this.$request.exportExamReport;
  
                  const data = await exportExamReport({
                      examId: this.ids[0]
                  });
  
f45b3c05   LH_PC   云平台新UI界面
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
                  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
1224
              else if (this.dataType == '3') {
6bca489d   LH_PC   云平台二期UI
1225
1226
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
                  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界面
1254
1255
1256
  
          },
          _print() {
ef16e57e   LH_PC   fix:前端版本迭代
1257
1258
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
              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界面
1296
1297
          },
          async _changeType() {
ef16e57e   LH_PC   fix:前端版本迭代
1298
              this.loading = true;
f45b3c05   LH_PC   云平台新UI界面
1299
1300
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
              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:前端版本迭代
1338
                  else if (this.currentType == "学生成绩排名") {
f45b3c05   LH_PC   云平台新UI界面
1339
1340
1341
                      await this._testStudentExamReport();
                  }
              }
ef16e57e   LH_PC   fix:前端版本迭代
1342
              this.loading = false;
f45b3c05   LH_PC   云平台新UI界面
1343
1344
          },
          async _testPaperExamReport() {
6bca489d   LH_PC   云平台二期UI
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
              //主观
              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界面
1369
1370
1371
1372
1373
              const request = this.$request.tPaperExamReport;
  
              let response = await request({
                  paperId: this.ids[0],
                  classIds: this.classIds,
ef16e57e   LH_PC   fix:前端版本迭代
1374
                  size: 9999
f45b3c05   LH_PC   云平台新UI界面
1375
1376
1377
1378
1379
1380
              });
  
              if (response.status != 0) {
                  this.$message.error(response.info);
                  return;
              }
ef16e57e   LH_PC   fix:前端版本迭代
1381
1382
1383
1384
1385
  
              var maxOption = 0;
              response.data.forEach((item) => {
                  if (item.details) {
                      if (maxOption < item.details.length) {
6bca489d   LH_PC   云平台二期UI
1386
                          maxOption = item.details.length;
ef16e57e   LH_PC   fix:前端版本迭代
1387
                      }
6bca489d   LH_PC   云平台二期UI
1388
                  }
f45b3c05   LH_PC   云平台新UI界面
1389
  
ef16e57e   LH_PC   fix:前端版本迭代
1390
1391
1392
1393
1394
              })
  
              let optionsList = [];
  
              for (var io = 0; io < maxOption; io++) {
6bca489d   LH_PC   云平台二期UI
1395
1396
1397
                  optionsList.push({})
              }
  
f45b3c05   LH_PC   云平台新UI界面
1398
1399
  
              let tableData = response.data?.map((item) => {
6bca489d   LH_PC   云平台二期UI
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
  
                  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界面
1418
1419
                  let params = {};
  
ef16e57e   LH_PC   fix:前端版本迭代
1420
  
f45b3c05   LH_PC   云平台新UI界面
1421
1422
1423
1424
1425
1426
1427
1428
                  const detail = item?.details ?? [];
  
                  let lastOPtion = detail?.find((item) => {
                      return item.option == "未答";
                  });
                  let defaultArr = detail?.filter((item) => {
                      return item.option != "未答";
                  });
6bca489d   LH_PC   云平台二期UI
1429
  
f45b3c05   LH_PC   云平台新UI界面
1430
                  optionsList.map((items, index) => {
ef16e57e   LH_PC   fix:前端版本迭代
1431
                      if (index < maxOption - 1) {
f45b3c05   LH_PC   云平台新UI界面
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
                          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:前端版本迭代
1442
                                  ? defaultArr[index]?.option == 1 && item.questionType == 4
f45b3c05   LH_PC   云平台新UI界面
1443
                                      ? "✓"
ef16e57e   LH_PC   fix:前端版本迭代
1444
                                      : defaultArr[index]?.option == 2 && item.questionType == 4
f45b3c05   LH_PC   云平台新UI界面
1445
1446
1447
1448
1449
1450
1451
1452
                                          ? "✗"
                                          : defaultArr[index]?.option
                                  : "";
                          items["title"] = "选项" + (index + 1);
                      } else {
                          items["title"] = "未答";
                          params["count" + index] = lastOPtion?.count ?? "";
                          params["persent" + index] = lastOPtion?.persent ?? "";
ef16e57e   LH_PC   fix:前端版本迭代
1453
                          params["option" + index] = "未答";
f45b3c05   LH_PC   云平台新UI界面
1454
1455
1456
                      }
                  });
  
f45b3c05   LH_PC   云平台新UI界面
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
                  return {
                      ...item,
                      ...params,
                  };
              });
  
              this.testPaperExamReport = tableData?.sort((a, b) => {
                  return a.questionIndex - b.questionIndex;
              });
  
              this.testPaperExamReportOptions = [...optionsList];
6bca489d   LH_PC   云平台二期UI
1468
1469
              this.testPaperExamReport.push({
                  questionIndex: "汇总",
ef16e57e   LH_PC   fix:前端版本迭代
1470
1471
1472
1473
                  questionType: "主观题",
                  score: this.examReport.subjectiveScore,
                  avgScore: this.examReport.subjectiveAvgScore,
                  gradeScoringRate: this.examReport.subjectiveRate,
6bca489d   LH_PC   云平台二期UI
1474
1475
1476
1477
                  correctAnswer: "备注"
              })
  
              this.testPaperExamReport.push({
ef16e57e   LH_PC   fix:前端版本迭代
1478
                  questionIndex: "客观题",
6bca489d   LH_PC   云平台二期UI
1479
                  type: "colspan",
ef16e57e   LH_PC   fix:前端版本迭代
1480
1481
1482
                  knowledge: this.examReport.objectiveScore,
                  score: this.examReport.objectiveAvgScore,
                  avgScore: this.examReport.objectiveRate
6bca489d   LH_PC   云平台二期UI
1483
1484
1485
1486
1487
              })
  
              this.testPaperExamReport.push({
                  questionIndex: "合计",
                  type: "colspan",
ef16e57e   LH_PC   fix:前端版本迭代
1488
1489
1490
                  knowledge: this.examReport.examPaperScore,
                  score: this.examReport.avg,
                  avgScore: this.examReport.rate
6bca489d   LH_PC   云平台二期UI
1491
              })
f45b3c05   LH_PC   云平台新UI界面
1492
1493
1494
1495
          },
          async _testStudentExamReport() {
              const request = this.$request.tgStudentExamReport;
  
6bca489d   LH_PC   云平台二期UI
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
              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界面
1506
1507
1508
              let response = await request({
                  paperId: this.ids[0],
                  classIds: this.classIds,
6bca489d   LH_PC   云平台二期UI
1509
                  reportRange: paramObj
f45b3c05   LH_PC   云平台新UI界面
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
              });
  
              if (response.status != 0) {
                  this.$message.error(response.info);
                  return;
              }
  
              this.testStudentExamReport = response.data;
          },
          async _classdiffExamReport() {
6bca489d   LH_PC   云平台二期UI
1520
1521
              this.classdiffExamReport = [];
              this.classdiffLevelOptions = [];
f45b3c05   LH_PC   云平台新UI界面
1522
1523
              const classDiffRequest = this.$request.tClassdiffExamReport;
  
6bca489d   LH_PC   云平台二期UI
1524
1525
1526
1527
1528
1529
1530
1531
1532
              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界面
1533
1534
1535
              let classDiffResponse = await classDiffRequest({
                  paperId: this.ids[0],
                  classIds: this.classIds,
6bca489d   LH_PC   云平台二期UI
1536
                  reportRange: paramObj
f45b3c05   LH_PC   云平台新UI界面
1537
1538
1539
1540
1541
1542
              });
  
              if (classDiffResponse.status != 0) {
                  this.$message.error(classDiffResponse.info);
                  return;
              }
6bca489d   LH_PC   云平台二期UI
1543
  
f45b3c05   LH_PC   云平台新UI界面
1544
1545
1546
1547
1548
              var index = 0;
  
              this.classdiffExamReport = classDiffResponse.data.map((item) => {
                  item.index = index + 1;
                  index += 1;
6bca489d   LH_PC   云平台二期UI
1549
1550
1551
1552
1553
1554
                  var cols = 0;
                  item.keys.forEach(toam => {
                      this.classdiffLevelOptions.push(toam);
                      item[toam] = item.leverValues[cols];
                      cols += 1;
                  })
f45b3c05   LH_PC   云平台新UI界面
1555
1556
                  return item;
              });
6bca489d   LH_PC   云平台二期UI
1557
1558
  
              console.log(this.fromData)
f45b3c05   LH_PC   云平台新UI界面
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
          },
          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
1571
1572
                  examIds: [this.ids[0]],
                  classIds: this.classIds
f45b3c05   LH_PC   云平台新UI界面
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
              });
  
              if (response.status != 0) {
                  this.$message.error(response.info);
                  return;
              }
  
              this.titleInfo = response.data.titleInfos;
  
              var studentHeaders = [];
  
              var studentResults = [];
  
574f1a90   LH_PC   fix:修改年级组长/任课老师缺少...
1586
              for (var iheader = 0; iheader < 18; iheader++) {
ef16e57e   LH_PC   fix:前端版本迭代
1587
1588
1589
1590
1591
                  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界面
1592
1593
              }
  
ef16e57e   LH_PC   fix:前端版本迭代
1594
1595
              var studentList = response.data.gradeExamStudentReports;
  
f45b3c05   LH_PC   云平台新UI界面
1596
1597
              this.studentHeader = [...studentHeaders];
  
ef16e57e   LH_PC   fix:前端版本迭代
1598
              var stuRow = Math.ceil(studentList.length * 1.00 / 3);
f45b3c05   LH_PC   云平台新UI界面
1599
  
ef16e57e   LH_PC   fix:前端版本迭代
1600
              for (var isp = 0; isp < studentList.length; isp++) {
f45b3c05   LH_PC   云平台新UI界面
1601
  
ef16e57e   LH_PC   fix:前端版本迭代
1602
                  var row = isp % stuRow;
f45b3c05   LH_PC   云平台新UI界面
1603
  
ef16e57e   LH_PC   fix:前端版本迭代
1604
                  var col = parseInt(isp / stuRow);
f45b3c05   LH_PC   云平台新UI界面
1605
  
ef16e57e   LH_PC   fix:前端版本迭代
1606
                  var item = {};
f45b3c05   LH_PC   云平台新UI界面
1607
  
ef16e57e   LH_PC   fix:前端版本迭代
1608
1609
                  if (studentResults.length <= row)
                      studentResults.push({});
f45b3c05   LH_PC   云平台新UI界面
1610
  
ef16e57e   LH_PC   fix:前端版本迭代
1611
                  item = studentResults[row];
f45b3c05   LH_PC   云平台新UI界面
1612
  
ef16e57e   LH_PC   fix:前端版本迭代
1613
                  var studentResult = studentList[isp];
f45b3c05   LH_PC   云平台新UI界面
1614
  
ef16e57e   LH_PC   fix:前端版本迭代
1615
1616
1617
1618
1619
1620
1621
1622
                  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界面
1623
1624
              this.studentList = [...studentResults];
  
6bca489d   LH_PC   云平台二期UI
1625
              var show4Area = true;  //显示4选项区域
f45b3c05   LH_PC   云平台新UI界面
1626
  
6bca489d   LH_PC   云平台二期UI
1627
              var show7Area = true;  //显示7选项区域
f45b3c05   LH_PC   云平台新UI界面
1628
  
6bca489d   LH_PC   云平台二期UI
1629
              var show10Area = true;  //显示10选项区域
f45b3c05   LH_PC   云平台新UI界面
1630
  
6bca489d   LH_PC   云平台二期UI
1631
              var optionNumList = [];
f45b3c05   LH_PC   云平台新UI界面
1632
  
6bca489d   LH_PC   云平台二期UI
1633
              var maxOptions = 4;
f45b3c05   LH_PC   云平台新UI界面
1634
  
6bca489d   LH_PC   云平台二期UI
1635
              var minOptions = 10;  //最多10个选项
f45b3c05   LH_PC   云平台新UI界面
1636
  
6bca489d   LH_PC   云平台二期UI
1637
              var questionList = response.data.questionInfos;
f45b3c05   LH_PC   云平台新UI界面
1638
  
6bca489d   LH_PC   云平台二期UI
1639
              questionList = questionList.sort((prev, next) => { return prev.questionIndex - next.questionIndex });
f45b3c05   LH_PC   云平台新UI界面
1640
  
6bca489d   LH_PC   云平台二期UI
1641
              for (var i = 0; i < questionList.length; i++) {
f45b3c05   LH_PC   云平台新UI界面
1642
  
ef16e57e   LH_PC   fix:前端版本迭代
1643
1644
1645
                  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界面
1646
  
6bca489d   LH_PC   云平台二期UI
1647
1648
                  var missCount = 0;
  
ead476dd   LH_PC   fix:最终定版
1649
                  var missI = questionList[i].details.filter(item => item.option.indexOf('未答') < 0 && !item.right);
6bca489d   LH_PC   云平台二期UI
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
  
                  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界面
1676
                  }
ef16e57e   LH_PC   fix:前端版本迭代
1677
1678
1679
1680
                  if (questionList[i].questionType == 3) {
                      if (minOptions > 4) minOptions = 4;
                  }
  
f45b3c05   LH_PC   云平台新UI界面
1681
1682
              }
  
6bca489d   LH_PC   云平台二期UI
1683
              show4Area = minOptions <= 4;
f45b3c05   LH_PC   云平台新UI界面
1684
  
6bca489d   LH_PC   云平台二期UI
1685
              show7Area = optionNumList.filter(o => o > 4 && o <= 7);
f45b3c05   LH_PC   云平台新UI界面
1686
  
6bca489d   LH_PC   云平台二期UI
1687
              show10Area = optionNumList.filter(o => o > 7);
f45b3c05   LH_PC   云平台新UI界面
1688
  
f45b3c05   LH_PC   云平台新UI界面
1689
  
6bca489d   LH_PC   云平台二期UI
1690
              var currentRow = {};
f45b3c05   LH_PC   云平台新UI界面
1691
  
6bca489d   LH_PC   云平台二期UI
1692
              if (show4Area) {
f45b3c05   LH_PC   云平台新UI界面
1693
  
6bca489d   LH_PC   云平台二期UI
1694
                  var areaList = [];
f45b3c05   LH_PC   云平台新UI界面
1695
  
6bca489d   LH_PC   云平台二期UI
1696
                  var quesRow = Math.ceil(questionList?.length * 1.00 / 3);
f45b3c05   LH_PC   云平台新UI界面
1697
  
6bca489d   LH_PC   云平台二期UI
1698
1699
                  for (var irow = 0; irow < quesRow; irow++) {
                      areaList.push({});
f45b3c05   LH_PC   云平台新UI界面
1700
                  }
f45b3c05   LH_PC   云平台新UI界面
1701
  
6bca489d   LH_PC   云平台二期UI
1702
1703
1704
                  for (var i = 0; i < questionList?.length; i++) {
  
                      var col = parseInt(i / quesRow);
f45b3c05   LH_PC   云平台新UI界面
1705
  
6bca489d   LH_PC   云平台二期UI
1706
                      var row = parseInt(i % quesRow);
f45b3c05   LH_PC   云平台新UI界面
1707
  
6bca489d   LH_PC   云平台二期UI
1708
                      var question = questionList[i];
f45b3c05   LH_PC   云平台新UI界面
1709
  
6bca489d   LH_PC   云平台二期UI
1710
                      var currentRow = areaList[row];
f45b3c05   LH_PC   云平台新UI界面
1711
  
ef16e57e   LH_PC   fix:前端版本迭代
1712
1713
1714
                      var correctAnswerValue =
                          question.questionType == 4 && question.correctAnswer == "1" ? "✓" :
                              question.questionType == 4 && question.correctAnswer == "2" ? "✗" : question.correctAnswer;
6bca489d   LH_PC   云平台二期UI
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
  
                      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界面
1728
1729
                          }
                          else {
6bca489d   LH_PC   云平台二期UI
1730
1731
1732
1733
1734
1735
  
                              var questionDetail = details[ilr - 2];
  
                              var questionColumn = 'column' + Number(6 * col + ilr);
  
                              if (details.length <= 4) {
ef16e57e   LH_PC   fix:前端版本迭代
1736
1737
                                  var questionOption = questionDetail ? (question.questionType == 4 && questionDetail.option == "1" ? "✓" :
                                      question.questionType == 4 && questionDetail.option == "2" ? "✗" : questionDetail.option) : "- -"
6bca489d   LH_PC   云平台二期UI
1738
1739
1740
1741
1742
1743
1744
1745
  
                                  if (questionOption != "- -") questionOption += "(" + questionDetail.persent + ")";
  
                                  currentRow[questionColumn] = questionOption;
                              }
                              else {
                                  currentRow[questionColumn] = "--";
                              }
f45b3c05   LH_PC   云平台新UI界面
1746
1747
                          }
                      }
f45b3c05   LH_PC   云平台新UI界面
1748
1749
                  }
  
6bca489d   LH_PC   云平台二期UI
1750
1751
                  this.question4List = [...areaList]
  
f45b3c05   LH_PC   云平台新UI界面
1752
1753
              }
  
f45b3c05   LH_PC   云平台新UI界面
1754
  
6bca489d   LH_PC   云平台二期UI
1755
              if (show7Area && show7Area.length > -1) {
f45b3c05   LH_PC   云平台新UI界面
1756
  
6bca489d   LH_PC   云平台二期UI
1757
                  var areaList = [];
f45b3c05   LH_PC   云平台新UI界面
1758
  
6bca489d   LH_PC   云平台二期UI
1759
                  var quesRow = Math.ceil(show7Area.length * 1.00 / 2);
f45b3c05   LH_PC   云平台新UI界面
1760
  
6bca489d   LH_PC   云平台二期UI
1761
                  var num = 0;
f45b3c05   LH_PC   云平台新UI界面
1762
  
6bca489d   LH_PC   云平台二期UI
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
                  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界面
1773
                      });
6bca489d   LH_PC   云平台二期UI
1774
1775
1776
1777
1778
1779
1780
1781
1782
  
                      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:前端版本迭代
1783
1784
                          var correctAnswerValue = question.questionType == 4 && question.correctAnswer == "1" ? "✓" :
                              question.questionType == 4 && question.correctAnswer == "2" ? "✗" : question.correctAnswer;
6bca489d   LH_PC   云平台二期UI
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
  
                          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界面
1808
                  }
6bca489d   LH_PC   云平台二期UI
1809
1810
  
                  this.question7List = [...areaList]
f45b3c05   LH_PC   云平台新UI界面
1811
1812
              }
  
f45b3c05   LH_PC   云平台新UI界面
1813
  
6bca489d   LH_PC   云平台二期UI
1814
              if (show10Area && show10Area.length > -1) {
f45b3c05   LH_PC   云平台新UI界面
1815
  
6bca489d   LH_PC   云平台二期UI
1816
                  var areaList = [];
f45b3c05   LH_PC   云平台新UI界面
1817
  
6bca489d   LH_PC   云平台二期UI
1818
                  var quesRow = show10Area.length;
f45b3c05   LH_PC   云平台新UI界面
1819
  
6bca489d   LH_PC   云平台二期UI
1820
                  var num = 0;
f45b3c05   LH_PC   云平台新UI界面
1821
  
6bca489d   LH_PC   云平台二期UI
1822
1823
                  for (var irow = 0; irow < quesRow; irow++) {
                      areaList.push({});
f45b3c05   LH_PC   云平台新UI界面
1824
1825
                  }
  
6bca489d   LH_PC   云平台二期UI
1826
                  for (var i = 0; i < questionList?.length; i++) {
f45b3c05   LH_PC   云平台新UI界面
1827
  
6bca489d   LH_PC   云平台二期UI
1828
                      var question = questionList[i];
f45b3c05   LH_PC   云平台新UI界面
1829
  
6bca489d   LH_PC   云平台二期UI
1830
1831
1832
                      var details = question.details.filter(fl => {
                          return fl.option.indexOf('未答') < 0;
                      });
f45b3c05   LH_PC   云平台新UI界面
1833
  
6bca489d   LH_PC   云平台二期UI
1834
1835
                      if (question.questionType == 2 && details.length > 7) {
                          var col = parseInt(num / quesRow);
f45b3c05   LH_PC   云平台新UI界面
1836
  
6bca489d   LH_PC   云平台二期UI
1837
                          var row = num;
f45b3c05   LH_PC   云平台新UI界面
1838
  
6bca489d   LH_PC   云平台二期UI
1839
                          var currentRow = areaList[row];
f45b3c05   LH_PC   云平台新UI界面
1840
  
ef16e57e   LH_PC   fix:前端版本迭代
1841
1842
                          var correctAnswerValue = question.questionType == 4 && question.correctAnswer == "1" ? "✓" :
                              question.questionType == 4 && question.correctAnswer == "2" ? "✗" : question.correctAnswer;
f45b3c05   LH_PC   云平台新UI界面
1843
  
6bca489d   LH_PC   云平台二期UI
1844
                          for (var ilr = 0; ilr < 12; ilr++) {
f45b3c05   LH_PC   云平台新UI界面
1845
  
6bca489d   LH_PC   云平台二期UI
1846
1847
1848
1849
1850
1851
1852
                              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界面
1853
  
6bca489d   LH_PC   云平台二期UI
1854
                                  var questionDetail = details[ilr - 2];
f45b3c05   LH_PC   云平台新UI界面
1855
  
6bca489d   LH_PC   云平台二期UI
1856
                                  var questionColumn = 'column' + Number(12 * col + ilr);
f45b3c05   LH_PC   云平台新UI界面
1857
  
6bca489d   LH_PC   云平台二期UI
1858
1859
1860
                                  currentRow[questionColumn] = questionDetail ? questionDetail.option + "(" + questionDetail.persent + ")" : "- -";
                              }
                          }
f45b3c05   LH_PC   云平台新UI界面
1861
  
6bca489d   LH_PC   云平台二期UI
1862
1863
                          num = num + 1;
                      }
f45b3c05   LH_PC   云平台新UI界面
1864
  
f45b3c05   LH_PC   云平台新UI界面
1865
                  }
6bca489d   LH_PC   云平台二期UI
1866
1867
  
                  this.question10List = [...areaList]
f45b3c05   LH_PC   云平台新UI界面
1868
1869
              }
  
f45b3c05   LH_PC   云平台新UI界面
1870
1871
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
  
          },
          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:前端版本迭代
1897
1898
                  periodIds: this.ids,
                  size: 9999
f45b3c05   LH_PC   云平台新UI界面
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
              });
  
              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:前端版本迭代
1918
1919
                  classIds: this.classIds,
                  size: 9999
f45b3c05   LH_PC   云平台新UI界面
1920
1921
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
              });
  
              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:前端版本迭代
1952
  
f45b3c05   LH_PC   云平台新UI界面
1953
1954
1955
                  detail.map((items, index) => {
                      params["isRight" + index] = items.isRight;
                      params["answer" + index] =
ef16e57e   LH_PC   fix:前端版本迭代
1956
                          items.answer == "1" && items.questionType == 4
f45b3c05   LH_PC   云平台新UI界面
1957
                              ? "✓"
ef16e57e   LH_PC   fix:前端版本迭代
1958
                              : items.answer == "2" && items.questionType == 4
f45b3c05   LH_PC   云平台新UI界面
1959
1960
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
                                  ? "✗"
                                  : 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界面
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
  
          },
          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
2026
2027
2028
2029
2030
2031
2032
2033
              this.testStudents = [];
              this.testStudentOptions = [];
              this.studentAnsered = [];
              this.studentAnseredOptions = [];
              this.studentRank = [];
              this.studentQuestions = [];
              this.studentQuestionOptions = [];
  
f45b3c05   LH_PC   云平台新UI界面
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
              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
2050
              let rTestStudents = data?.list.map((item) => {
f45b3c05   LH_PC   云平台新UI界面
2051
2052
2053
2054
2055
2056
2057
2058
                  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:前端版本迭代
2059
  
f45b3c05   LH_PC   云平台新UI界面
2060
2061
2062
2063
2064
2065
                  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:前端版本迭代
2066
                          items.questionType == 4 && items.answer == "1" ? "✓" : items.questionType == 4 && items.answer == "2" ? "✗" : items.answer;
f45b3c05   LH_PC   云平台新UI界面
2067
                      params["isRight" + items.id] = items.isRight;
ef16e57e   LH_PC   fix:前端版本迭代
2068
                      params["questionType" + items.id] = item.questionType;
f45b3c05   LH_PC   云平台新UI界面
2069
2070
2071
2072
2073
2074
2075
                  });
                  return {
                      ...item,
                      ...params,
                  };
              });
  
6bca489d   LH_PC   云平台二期UI
2076
              let rtestStudentOptions = optionsList.sort((a, b) => {
f45b3c05   LH_PC   云平台新UI界面
2077
2078
                  return a.id - b.id;
              });
6bca489d   LH_PC   云平台二期UI
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
  
              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界面
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
          },
          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
2111
2112
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
              //主观
              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:前端版本迭代
2143
  
6bca489d   LH_PC   云平台二期UI
2144
              var maxOption = 0;
ef16e57e   LH_PC   fix:前端版本迭代
2145
2146
2147
2148
2149
2150
2151
  
              data?.list?.forEach((item) => {
  
                  const detail = JSON.parse(item.detail);
  
                  if (maxOption < detail.length) {
  
6bca489d   LH_PC   云平台二期UI
2152
                      maxOption = detail.length;
ef16e57e   LH_PC   fix:前端版本迭代
2153
                  }
6bca489d   LH_PC   云平台二期UI
2154
              })
6bca489d   LH_PC   云平台二期UI
2155
  
ef16e57e   LH_PC   fix:前端版本迭代
2156
2157
2158
              let optionsList = [];
  
              for (var io = 0; io < maxOption; io++) {
6bca489d   LH_PC   云平台二期UI
2159
2160
                  optionsList.push({})
              }
f45b3c05   LH_PC   云平台新UI界面
2161
2162
2163
  
              let tableData = data?.list?.map((item) => {
                  let params = {};
6bca489d   LH_PC   云平台二期UI
2164
  
f45b3c05   LH_PC   云平台新UI界面
2165
                  const detail = JSON.parse(item.detail);
6bca489d   LH_PC   云平台二期UI
2166
  
f45b3c05   LH_PC   云平台新UI界面
2167
2168
2169
2170
2171
2172
2173
2174
                  let lastOPtion = detail?.find((item) => {
                      return item.option == "未答";
                  });
                  let defaultArr = detail?.filter((item) => {
                      return item.option != "未答";
                  });
  
                  optionsList.map((items, index) => {
6bca489d   LH_PC   云平台二期UI
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
                      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:前端版本迭代
2185
                              ? defaultArr[index]?.option == "1" && item?.questionType == 4
6bca489d   LH_PC   云平台二期UI
2186
                                  ? "✓"
ef16e57e   LH_PC   fix:前端版本迭代
2187
                                  : defaultArr[index]?.option == "2" && item?.questionType == 4
6bca489d   LH_PC   云平台二期UI
2188
2189
2190
                                      ? "✗"
                                      : defaultArr[index]?.option
                              : "";
ef16e57e   LH_PC   fix:前端版本迭代
2191
  
6bca489d   LH_PC   云平台二期UI
2192
                      items["title"] = "选项" + (index + 1);
ef16e57e   LH_PC   fix:前端版本迭代
2193
2194
2195
2196
2197
2198
2199
                      if (index >= optionsList.length - 1) {
                          items["title"] = "未答";
                          params["count" + index] = lastOPtion.count;
                          params["persent" + index] = lastOPtion.persent;
                          params["option" + index] = "未答";
                      }
  
f45b3c05   LH_PC   云平台新UI界面
2200
                  });
6bca489d   LH_PC   云平台二期UI
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
  
                  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界面
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
                  return {
                      ...item,
                      ...params,
                  };
              });
  
              this.testQuestions = tableData?.sort((a, b) => {
                  return a.questionIndex - b.questionIndex;
              });
  
              this.testQuestionOptions = [...optionsList];
6bca489d   LH_PC   云平台二期UI
2238
2239
2240
2241
2242
  
              this.testQuestions.push({
                  questionIndex: "汇总",
                  questionType: "主观题",
                  //满分值
ef16e57e   LH_PC   fix:前端版本迭代
2243
                  score: this.examReport.subjectiveScore,
6bca489d   LH_PC   云平台二期UI
2244
                  //最高分
ef16e57e   LH_PC   fix:前端版本迭代
2245
                  highestScore: this.examReport.subjectiveHighestScore,
6bca489d   LH_PC   云平台二期UI
2246
                  //最低分
ef16e57e   LH_PC   fix:前端版本迭代
2247
                  lowestScore: this.examReport.subjectiveLowestScore,
6bca489d   LH_PC   云平台二期UI
2248
                  //平均分
ef16e57e   LH_PC   fix:前端版本迭代
2249
                  avgScore: this.examReport.subjectiveAvgScore,
6bca489d   LH_PC   云平台二期UI
2250
                  //已考得分率
ef16e57e   LH_PC   fix:前端版本迭代
2251
2252
                  scoringRate: this.examReport.subjectiveScoringRate,
                  correctAnswer: "备注"
6bca489d   LH_PC   云平台二期UI
2253
2254
2255
2256
2257
2258
              })
  
              this.testQuestions.push({
                  questionIndex: "客观题",
                  type: "colspan",
                  //满分值
ef16e57e   LH_PC   fix:前端版本迭代
2259
                  knowledge: this.examReport.objectiveScore,
6bca489d   LH_PC   云平台二期UI
2260
                  //最高分
ef16e57e   LH_PC   fix:前端版本迭代
2261
                  score: this.examReport.objectiveHighestScore,
6bca489d   LH_PC   云平台二期UI
2262
                  //最低分
ef16e57e   LH_PC   fix:前端版本迭代
2263
                  highestScore: this.examReport.objectiveLowestScore,
6bca489d   LH_PC   云平台二期UI
2264
                  //平均分
ef16e57e   LH_PC   fix:前端版本迭代
2265
                  lowestScore: this.examReport.objectiveAvgScore,
6bca489d   LH_PC   云平台二期UI
2266
                  //已考得分率
ef16e57e   LH_PC   fix:前端版本迭代
2267
                  avgScore: this.examReport.objectiveScoringRate
6bca489d   LH_PC   云平台二期UI
2268
2269
              })
  
6bca489d   LH_PC   云平台二期UI
2270
2271
2272
2273
              this.testQuestions.push({
                  questionIndex: "合计",
                  type: "colspan",
                  //满分值
ef16e57e   LH_PC   fix:前端版本迭代
2274
                  knowledge: this.examReport.examPaperScore,
6bca489d   LH_PC   云平台二期UI
2275
                  //最高分
ef16e57e   LH_PC   fix:前端版本迭代
2276
                  score: this.examReport.highestScore,
6bca489d   LH_PC   云平台二期UI
2277
                  //最低分
ef16e57e   LH_PC   fix:前端版本迭代
2278
                  highestScore: this.examReport.lowestScore,
6bca489d   LH_PC   云平台二期UI
2279
                  //平均分
ef16e57e   LH_PC   fix:前端版本迭代
2280
                  lowestScore: this.examReport.avgScore,
6bca489d   LH_PC   云平台二期UI
2281
                  //已考得分率
ef16e57e   LH_PC   fix:前端版本迭代
2282
                  avgScore: this.examReport.scoringRate
6bca489d   LH_PC   云平台二期UI
2283
2284
2285
2286
2287
2288
              })
          },
          keydownRange(event) {
              if (event.key == "-" || event.key == "e") {
                  event.returnValue = "";
              }
f45b3c05   LH_PC   云平台新UI界面
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
          }
      }
  }
  </script>
  <style lang="scss">
  .opration-select {
      margin-left: 10px !important;
  }
  
  .row-line {
      overflow: hidden;
6bca489d   LH_PC   云平台二期UI
2300
      width: calc(20% - 4px);
f45b3c05   LH_PC   云平台新UI界面
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
      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:前端版本迭代
2317
2318
2319
2320
2321
2322
  
  
  
  // .red {
  //     color: #f30;
  // }
6bca489d   LH_PC   云平台二期UI
2323
2324
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
  
  .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界面
2388
  </style>