Blame view

src/views/standard/test/analysis.vue 28.5 KB
4c4f7640   梁保满   路由表,路由前端文件
1
  <template>
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
2
    <div ref="main" class="page-container">
f356590c   阿宝   即时测列表,分析页面
3
4
5
6
7
      <back-box>
        <template slot="title">
          <span>单卷分析</span>
        </template>
      </back-box>
24f4b248   梁保满   单卷试题分析打印样式
8
      <div class="tips" v-if="paperModifyLog.modifiedTime && !status">
f356590c   阿宝   即时测列表,分析页面
9
10
11
12
13
14
15
        <p class="tips-p">
          <i class="fa fa-bell-o"></i>
          {{
            `${paperModifyLog.modifiedTime} ${paperModifyLog.realName}`
          }}修改了答案,是否重新记分?
        </p>
        <div class="btn-box">
9309dc5d   梁保满   任课老师接口完成
16
17
18
          <el-button type="danger" round @click="_ReScore" size="mini"
            >重新计分</el-button
          >
8ea67428   梁保满   飞书bug
19
20
21
22
23
24
25
26
          <el-button
            type="danger"
            round
            plain
            size="mini"
            @click="paperModifyLog.modifiedTime = ''"
            >暂时不计</el-button
          >
f356590c   阿宝   即时测列表,分析页面
27
28
29
        </div>
      </div>
      <div class="page-content">
4295ede6   梁保满   即使测报表对比页面开发
30
31
32
33
34
35
36
37
38
39
40
41
        <div class="content-header">
          <div class="tab-box">
            <span
              v-for="(item, index) in tabList"
              :key="item"
              class="tab-item"
              :class="type == index ? 'active' : ''"
              @click="setType(index)"
              >{{ item }}</span
            >
          </div>
          <el-button
31436559   梁保满   多班级样式问题,成绩登记设置问题
42
            v-if="!status"
4295ede6   梁保满   即使测报表对比页面开发
43
44
45
46
47
            class="setMinScore"
            @click="diaMinScore = true"
            round
            size="small"
            >设置低分值</el-button
f356590c   阿宝   即时测列表,分析页面
48
49
          >
        </div>
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
50
        <div id="print-content" class="table-box" v-loading="loading">
255e2506   梁保满   飞书bug及优化
51
52
          <el-table
            :max-height="tableMaxHeight"
e5e4a3e6   梁保满   v1.3
53
            v-show="type == 0"
255e2506   梁保满   飞书bug及优化
54
55
56
            :data="tableData"
            border
            style="width: 100%"
9309dc5d   梁保满   任课老师接口完成
57
          >
f356590c   阿宝   即时测列表,分析页面
58
            <el-table-column
255e2506   梁保满   飞书bug及优化
59
60
              prop="questionIndex"
              label="题号"
f356590c   阿宝   即时测列表,分析页面
61
              align="center"
255e2506   梁保满   飞书bug及优化
62
63
              fixed
              width="60"
f356590c   阿宝   即时测列表,分析页面
64
65
            ></el-table-column>
            <el-table-column
255e2506   梁保满   飞书bug及优化
66
67
              prop="questionType"
              label="题型"
f356590c   阿宝   即时测列表,分析页面
68
              align="center"
255e2506   梁保满   飞书bug及优化
69
70
71
72
73
              fixed
              width="100"
              ><template slot-scope="scope">{{
                setSubPro(scope.row.questionType)
              }}</template></el-table-column
9309dc5d   梁保满   任课老师接口完成
74
            >
f356590c   阿宝   即时测列表,分析页面
75
            <el-table-column
255e2506   梁保满   飞书bug及优化
76
77
78
79
              prop="score"
              width="100"
              label="满分值"
              sortable
f356590c   阿宝   即时测列表,分析页面
80
81
82
              align="center"
            ></el-table-column>
            <el-table-column
255e2506   梁保满   飞书bug及优化
83
84
85
86
              width="110"
              prop="highestScore"
              label="班最高分"
              sortable
f356590c   阿宝   即时测列表,分析页面
87
              align="center"
255e2506   梁保满   飞书bug及优化
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
            ></el-table-column>
            <el-table-column
              width="110"
              prop="lowestScore"
              label="班最低分"
              sortable
              align="center"
            ></el-table-column>
            <el-table-column
              width="110"
              prop="avgScore"
              label="班平均分"
              sortable
              align="center"
            ></el-table-column>
            <el-table-column
              prop="classScoringRate"
              width="120"
              sortable
              label="班级得分率"
              align="center"
              ><template slot-scope="scoped"
                >{{ scoped.row.classScoringRate }}%</template
9309dc5d   梁保满   任课老师接口完成
111
112
              ></el-table-column
            >
255e2506   梁保满   飞书bug及优化
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
            <el-table-column prop="correctAnswer" label="答案" align="center"
              ><template slot-scope="scoped">{{
                scoped.row.correctAnswer == 1
                  ? "✓"
                  : scoped.row.correctAnswer == 2
                  ? "✗"
                  : scoped.row.correctAnswer
              }}</template>
            </el-table-column>
            <el-table-column
              v-for="(item, index) in optionsList"
              :key="index"
              :label="item.title"
              :prop="'count' + index"
              align="center"
a6eb85ed   梁保满   下载模版错误信息展示,图标根据环境切换
128
              width="120"
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
129
130
131
132
133
134
135
136
137
138
139
140
141
              ><template slot-scope="scope"
                ><p class="persent">
                  {{
                    scope.row.questionType == "5"
                      ? ""
                      : scope.row["option" + index]
                      ? `${scope.row["option" + index]}(${
                          scope.row["persent" + index]
                        })`
                      : ""
                  }}
                </p></template
              >
255e2506   梁保满   飞书bug及优化
142
143
            </el-table-column>
          </el-table>
24f4b248   梁保满   单卷试题分析打印样式
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
          <div id="print-table">
            <table class="hide">
              <thead>
                <tr>
                  <th>题号</th>
                  <th>题型</th>
                  <th>满分值</th>
                  <th>班最高分</th>
                  <th>班最低分</th>
                  <th>班平均分</th>
                  <th>班级得分率</th>
                  <th>答案</th>
                  <th>选项1</th>
                  <th>选项2</th>
                  <th>选项3</th>
                  <th>选项4</th>
                  <th>未答</th>
                </tr>
              </thead>
              <tbody>
                <tr v-for="(tr, index) in tableData">
                  <td width="60">{{ index + 1 }}</td>
                  <td width="100">{{ setSubPro(tr.questionType) }}</td>
                  <td width="100">{{ tr.sortable }}</td>
                  <td width="110">{{ tr.highestScore }}</td>
                  <td width="110">{{ tr.lowestScore }}</td>
                  <td width="110">{{ tr.avgScore }}</td>
                  <td width="120">{{ tr.classScoringRate }}%</td>
                  <td>
                    {{
                      tr.correctAnswer == 1
                        ? "✓"
                        : tr.correctAnswer == 2
                        ? "✗"
                        : tr.correctAnswer
                    }}
                  </td>
                  <td
                    v-for="(item, index) in optionsList"
                    :key="index"
                    width="120"
                  >
                    <p class="persent">
                      {{
                        tr.questionType == "5"
                          ? ""
                          : tr["option" + index]
                          ? `${tr["option" + index]}(${tr["persent" + index]})`
                          : ""
                      }}
                    </p>
                  </td>
                </tr>
              </tbody>
            </table>
            <div class="hui-box" v-show="type == 0">
              <span class="s-txt">汇总</span>
              <ul class="hui-ul">
                <li class="hui-li">
                  <span class="hui-s s1">主观题</span>
                  <span class="hui-s s1">{{ examReport.subjectiveScore }}</span>
                  <span class="hui-s s2">{{
                    examReport.subjectiveHighestScore
                  }}</span>
                  <span class="hui-s s2">{{
                    examReport.subjectiveLowestScore
                  }}</span>
                  <span class="hui-s s2">{{
                    examReport.subjectiveAvgScore
                  }}</span>
                  <span class="hui-s s3"
                    >{{ examReport.subjectiveClassScoringRate }}%</span
                  >
                </li>
                <li class="hui-li">
                  <span class="hui-s s1">客观题</span>
                  <span class="hui-s s1">{{ examReport.objectiveScore }}</span>
                  <span class="hui-s s2">{{
                    examReport.objectiveHighestScore
                  }}</span>
                  <span class="hui-s s2">{{
                    examReport.objectiveLowestScore
                  }}</span>
                  <span class="hui-s s2">{{ examReport.objectiveAvgScore }}</span>
                  <span class="hui-s s3"
                    >{{ examReport.objectiveClassScoringRate }}%</span
                  >
                </li>
                <li class="hui-li">
                  <span class="hui-s s1">整卷</span>
                  <span class="hui-s s1">{{ examReport.examPaperScore }}</span>
                  <span class="hui-s s2">{{ examReport.highestScore }}</span>
                  <span class="hui-s s2">{{ examReport.lowestScore }}</span>
                  <span class="hui-s s2">{{ examReport.avgScore }}</span>
                  <span class="hui-s s3">{{ examReport.classScoringRate }}%</span>
                </li>
              </ul>
            </div>
255e2506   梁保满   飞书bug及优化
242
243
          </div>
          <el-table
e5e4a3e6   梁保满   v1.3
244
            v-show="type == 1"
255e2506   梁保满   飞书bug及优化
245
246
247
248
249
250
            :max-height="tableMaxHeight"
            :data="tableData2"
            border
            style="width: 100%"
            :default-sort="{ prop: 'dadui', order: 'descending' }"
          >
f356590c   阿宝   即时测列表,分析页面
251
            <el-table-column
255e2506   梁保满   飞书bug及优化
252
253
              prop="studentCode"
              label="学号"
f356590c   阿宝   即时测列表,分析页面
254
              align="center"
255e2506   梁保满   飞书bug及优化
255
              fixed
f356590c   阿宝   即时测列表,分析页面
256
257
            ></el-table-column>
            <el-table-column
255e2506   梁保满   飞书bug及优化
258
259
260
              prop="studentName"
              label="姓名"
              fixed
f356590c   阿宝   即时测列表,分析页面
261
262
              align="center"
            ></el-table-column>
255e2506   梁保满   飞书bug及优化
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
            <el-table-column
              prop="examScore"
              label="总分"
              sortable
              align="center"
            ></el-table-column>
            <el-table-column
              prop="scoringRate"
              label="得分率"
              sortable
              align="center"
              ><template slot-scope="scope"
                >{{ scope.row.scoringRate }}%</template
              ></el-table-column
            >
            <el-table-column
              prop="classRank"
              label="班名"
              sortable
              align="center"
            ></el-table-column>
            <el-table-column label="客观题" align="center">
              <el-table-column
                prop="objectiveExamScore"
                label="得分"
                align="center"
              ></el-table-column>
              <el-table-column
                prop="objectiveScoringRate"
                label="得分率"
                align="center"
                ><template slot-scope="scope"
                  >{{ scope.row.objectiveScoringRate }}%</template
                ></el-table-column
9309dc5d   梁保满   任课老师接口完成
297
              >
255e2506   梁保满   飞书bug及优化
298
299
300
301
302
303
304
305
306
307
308
309
310
311
            </el-table-column>
            <el-table-column label="主观题" align="center">
              <el-table-column
                prop="subjectiveExamScore"
                label="得分"
                align="center"
              ></el-table-column>
              <el-table-column
                prop="subjectiveScoringRate"
                label="得分率"
                align="center"
                ><template slot-scope="scope"
                  >{{ scope.row.subjectiveScoringRate }}%</template
                ></el-table-column
9309dc5d   梁保满   任课老师接口完成
312
              >
255e2506   梁保满   飞书bug及优化
313
314
315
            </el-table-column>
          </el-table>
          <el-table
e5e4a3e6   梁保满   v1.3
316
            v-show="type == 2"
255e2506   梁保满   飞书bug及优化
317
318
319
320
321
            :max-height="tableMaxHeight"
            :data="tableData2"
            border
            style="width: 100%"
            :default-sort="{ prop: '', order: 'descending' }"
9309dc5d   梁保满   任课老师接口完成
322
          >
255e2506   梁保满   飞书bug及优化
323
324
325
326
327
            <el-table-column
              prop="studentCode"
              label="学号"
              fixed
              align="center"
c3cdce9c   梁保满   bug
328
              width="120"
255e2506   梁保满   飞书bug及优化
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
            ></el-table-column>
            <el-table-column
              prop="studentName"
              label="姓名"
              fixed
              align="center"
            ></el-table-column>
            <el-table-column
              prop="examScore"
              label="总分"
              sortable
              align="center"
            ></el-table-column>
            <el-table-column label="分数组成" align="center">
              <el-table-column
                prop="objectiveExamScore"
                label="客观题分"
                align="center"
              ></el-table-column>
              <el-table-column
                prop="subjectiveExamScore"
                label="主观题分"
                align="center"
              ></el-table-column>
            </el-table-column>
            <el-table-column
              align="center"
              v-for="(item, index) in questionList"
              :key="index"
11a4e518   梁保满   背题组卷修改答案设置,即使测随堂问...
358
              :label="'Q' + item.id"
255e2506   梁保满   飞书bug及优化
359
360
361
362
363
364
              :prop="'score' + item.id"
            >
            </el-table-column>
          </el-table>
          <el-table
            :max-height="tableMaxHeight"
e5e4a3e6   梁保满   v1.3
365
            v-show="type == 3"
255e2506   梁保满   飞书bug及优化
366
367
368
369
            :data="tableData2"
            border
            style="width: 100%"
            :default-sort="{ prop: '', order: 'descending' }"
9309dc5d   梁保满   任课老师接口完成
370
          >
255e2506   梁保满   飞书bug及优化
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
            <el-table-column
              prop="studentCode"
              label="学号"
              fixed
              align="center"
            ></el-table-column>
            <el-table-column
              prop="studentName"
              label="姓名"
              fixed
              align="center"
            ></el-table-column>
            <el-table-column
              prop="className"
              label="班级"
              align="center"
            ></el-table-column>
            <el-table-column
              prop="examScore"
              label="总分"
              sortable
              align="center"
            ></el-table-column>
            <el-table-column
              align="center"
              v-for="(item, index) in questionList"
              :key="index"
11a4e518   梁保满   背题组卷修改答案设置,即使测随堂问...
398
              :label="'Q' + item.id"
255e2506   梁保满   飞书bug及优化
399
400
            >
              <template slot-scope="scope">
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
401
                <span v-if="tableData[index]?.questionType == 5">*</span>
0e46bc25   梁保满   优化
402
403
                <span
                  v-else-if="scope.row['answer' + item.id]"
255e2506   梁保满   飞书bug及优化
404
405
406
407
408
409
410
                  :class="scope.row['isRight' + item.id] ? '' : 'error'"
                >
                  {{ scope.row["answer" + item.id] }}
                </span>
                <span
                  v-else
                  :class="scope.row['questionType' + item.id] == 5 ? '' : 'error'"
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
411
412
                  >-</span
                >
255e2506   梁保满   飞书bug及优化
413
414
415
              </template>
            </el-table-column>
          </el-table>
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
416
417
418
        </div>
        <div class="down">
          <div>
9309dc5d   梁保满   任课老师接口完成
419
            <el-button
255e2506   梁保满   飞书bug及优化
420
              @click="exportData"
533a17d8   梁保满   备题组卷添加批量设置答案
421
              type="primary"
255e2506   梁保满   飞书bug及优化
422
              plain
9309dc5d   梁保满   任课老师接口完成
423
              round
255e2506   梁保满   飞书bug及优化
424
425
              icon="fa fa-cloud-download"
              >导出报表</el-button
9309dc5d   梁保满   任课老师接口完成
426
            >
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
427
            <el-button
167079c6   梁保满   班主任隐藏查看题目
428
              v-if="!this.$store.getters.code"
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
429
430
431
432
433
434
435
436
              @click="print"
              type="primary"
              plain
              round
              icon="el-icon-printer"
              >打印</el-button
            >
          </div>
e5e4a3e6   梁保满   v1.3
437
          <div v-if="!status">
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
438
439
440
441
442
443
444
445
            <el-button
              v-if="examReport.subjectiveScore != 0"
              @click="diaUp = true"
              type="primary"
              round
              v-loading="exportLoading"
              >导入主观题分数</el-button
            >
167079c6   梁保满   班主任隐藏查看题目
446
447
448
449
450
451
452
453
            <template v-if="role == 'ROLE_JIAOSHI'">
              <el-button
                @click="edit"
                type="primary"
                v-if="examReport.subjectiveScore != examReport.examPaperScore"
                round
                >查看题目</el-button
              ></template
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
454
            >
9309dc5d   梁保满   任课老师接口完成
455
          </div>
9309dc5d   梁保满   任课老师接口完成
456
        </div>
4295ede6   梁保满   即使测报表对比页面开发
457
458
459
460
461
462
        <el-dialog
          :close-on-click-modal="false"
          title="导入主观题分数"
          :visible.sync="diaUp"
          width="600"
        >
167079c6   梁保满   班主任隐藏查看题目
463
          <up-load :url="url" :examId="id" @upSuccess="upSuccess">
9309dc5d   梁保满   任课老师接口完成
464
465
466
467
468
469
470
471
472
473
474
475
            <template slot="down">
              <p class="down-txt">
                第一步:下载模板并编辑完成学生分数
                <el-link type="danger" @click="downExcel">模板下载</el-link> 。
              </p>
              <p class="down-txt">第二步:上传完成编辑的模板文件并导入。</p>
            </template>
          </up-load>
          <div class="dialog-footer" slot="footer">
            <el-button @click="diaUp = false">取 消</el-button>
          </div>
        </el-dialog>
4295ede6   梁保满   即使测报表对比页面开发
476
477
478
479
480
481
482
483
484
485
        <el-dialog
          :close-on-click-modal="false"
          title="低分区间设置"
          :visible.sync="diaMinScore"
          width="480px"
          @closed="closeDiaMinScore"
        >
          <el-form>
            <el-form-item label="低分设置模式:">
              <el-select v-model="lowRange.type" @change="changeScore">
ee00775c   梁保满   测试bug
486
487
                <el-option label="按分数设置" :value="0"></el-option>
                <el-option label="按已考人数比例" :value="1"></el-option>
4295ede6   梁保满   即使测报表对比页面开发
488
489
490
491
492
493
494
495
496
497
              </el-select>
            </el-form-item>
            <el-form-item label="低分区间:">
              <el-input
                class="score-ipt"
                type="number"
                v-model="lowRange.range[0]"
                :min="0"
                :max="100"
                @input="lowRange.range[1] > 100 ? (lowRange.range[1] = 100) : ''"
ee00775c   梁保满   测试bug
498
                @keydown.native="keydownRange($event)"
4295ede6   梁保满   即使测报表对比页面开发
499
              ></el-input
ee00775c   梁保满   测试bug
500
              >{{ lowRange.type == 1 ? "%" : "分" }}(含)
4295ede6   梁保满   即使测报表对比页面开发
501
502
503
504
505
506
507
              <el-input
                class="score-ipt"
                type="number"
                v-model="lowRange.range[1]"
                :min="0"
                :max="100"
                @input="lowRange.range[1] > 100 ? (lowRange.range[1] = 100) : ''"
ee00775c   梁保满   测试bug
508
                @keydown.native="keydownRange($event)"
4295ede6   梁保满   即使测报表对比页面开发
509
              ></el-input
ee00775c   梁保满   测试bug
510
              >{{ lowRange.type == 1 ? "%" : "分" }}(含)
4295ede6   梁保满   即使测报表对比页面开发
511
512
513
            </el-form-item>
          </el-form>
  
ee00775c   梁保满   测试bug
514
515
516
517
518
519
          <div
            class="dialog-footer"
            slot="footer"
            align="center"
            v-loading="loadingTange"
          >
4295ede6   梁保满   即使测报表对比页面开发
520
521
522
523
            <el-button type="danger" @click="_SavelowRange">保存</el-button>
            <el-button @click="diaMinScore = false">取 消</el-button>
          </div>
        </el-dialog>
f356590c   阿宝   即时测列表,分析页面
524
525
      </div>
    </div>
4c4f7640   梁保满   路由表,路由前端文件
526
527
528
  </template>
  
  <script>
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
529
  import { downloadFile, tablePrint } from "@/utils";
4c4f7640   梁保满   路由表,路由前端文件
530
  export default {
f356590c   阿宝   即时测列表,分析页面
531
532
    data() {
      return {
167079c6   梁保满   班主任隐藏查看题目
533
        role: "",
31436559   梁保满   多班级样式问题,成绩登记设置问题
534
        status: 0,// 1:已归档试卷
255e2506   梁保满   飞书bug及优化
535
        tableMaxHeight: 600,
9309dc5d   梁保满   任课老师接口完成
536
537
538
        loading: false,
        exportLoading: false,
        diaUp: false,
9309dc5d   梁保满   任课老师接口完成
539
        url: "/api_html/teaching/importSubjectiveScore",
f356590c   阿宝   即时测列表,分析页面
540
        id: "",
4295ede6   梁保满   即使测报表对比页面开发
541
542
        classId: "",
        subjectName: "",
9309dc5d   梁保满   任课老师接口完成
543
544
        title: "",
        score: "",
e5e4a3e6   梁保满   v1.3
545
546
        tabList: ["试题分析", "成绩排名", "小题分报表", "作答明细表"],
        type: 0,
31436559   梁保满   多班级样式问题,成绩登记设置问题
547
        paperModifyLog: { //修改信息
9309dc5d   梁保满   任课老师接口完成
548
549
          realName: "",
          modifiedTime: "",
255e2506   梁保满   飞书bug及优化
550
551
        },
        examReport: {
8ea67428   梁保满   飞书bug
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
          subjectiveScore: 0,
          subjectiveHighestScore: "",
          subjectiveLowestScore: "",
          subjectiveAvgScore: "",
          subjectiveClassScoringRate: "",
          objectiveScore: "",
          objectiveHighestScore: "",
          objectiveLowestScore: "",
          objectiveAvgScore: "",
          objectiveClassScoringRate: "",
          examPaperScore: "",
          highestScore: "",
          lowestScore: "",
          avgScore: "",
          classScoringRate: "",
f356590c   阿宝   即时测列表,分析页面
567
        },
9309dc5d   梁保满   任课老师接口完成
568
569
570
571
572
573
574
        tableData: [],
        optionsList: [],
        tableData2: [],
        questionList: [],
        page: 1,
        size: 20,
        total: 0,
4295ede6   梁保满   即使测报表对比页面开发
575
        // 设置低分值
ee00775c   梁保满   测试bug
576
        loadingTange: false,
4295ede6   梁保满   即使测报表对比页面开发
577
578
        diaMinScore: false,
        lowRange: {
ee00775c   梁保满   测试bug
579
          type: 0,
4295ede6   梁保满   即使测报表对比页面开发
580
581
          range: [60, 0],
        },
ee00775c   梁保满   测试bug
582
583
584
585
        defaultLowRange: {
          type: 0,
          range: [],
        },
f356590c   阿宝   即时测列表,分析页面
586
587
588
      };
    },
    created() {
167079c6   梁保满   班主任隐藏查看题目
589
590
591
      this.role =
        this.$store.getters.info.showRole ||
        this.$store.getters.info.permissions[0].role;
f356590c   阿宝   即时测列表,分析页面
592
      this.id = this.$route.query.id;
e5e4a3e6   梁保满   v1.3
593
      this.status = this.$route.query.status ? this.$route.query.status : 0;
9309dc5d   梁保满   任课老师接口完成
594
      this.title = this.$route.query.title || "";
4295ede6   梁保满   即使测报表对比页面开发
595
596
      this.classId = this.$route.query.classId || "";
      this.subjectName = this.$route.query.subjectName || "";
9309dc5d   梁保满   任课老师接口完成
597
      this._QueryData();
f356590c   阿宝   即时测列表,分析页面
598
599
    },
    methods: {
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
600
      print() {
24f4b248   梁保满   单卷试题分析打印样式
601
602
603
604
605
        if (this.type == 0) {
          tablePrint("print-table", this.title + this.tabList[this.type], true);
        } else {
          tablePrint("print-content", this.title + this.tabList[this.type]);
        }
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
606
      },
757a21e3   梁保满   上传成功提示成功数量
607
      upSuccess(res) {
255e2506   梁保满   飞书bug及优化
608
        //导入成功
167079c6   梁保满   班主任隐藏查看题目
609
        this.$message.success("导入成功");
255e2506   梁保满   飞书bug及优化
610
611
612
613
614
615
616
        this.diaUp = false;
        this._QueryData();
      },
      setType(type) {
        console.log(this.$refs.main.offsetHeight - 50);
        this.tableMaxHeight = this.$refs.main.offsetHeight;
        this.type = type;
dbbfc6c5   梁保满   飞书优化及bug
617
      },
9309dc5d   梁保满   任课老师接口完成
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
      setSubPro(type) {
        let tit;
        switch (type) {
          case 2:
            tit = "单选题";
            break;
          case 3:
            tit = "多选题";
            break;
          case 4:
            tit = "判断题";
            break;
          case 5:
            tit = "主观题";
            break;
        }
        return tit;
      },
      edit() {
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
637
638
639
640
641
642
643
644
        this.$router.push({
          path: "/examinationPaperEdit",
          query: {
            paperId: this.id,
            title: this.title,
            type: 2,
          },
        });
9309dc5d   梁保满   任课老师接口完成
645
646
647
648
649
      },
      changePage(page) {
        this.page = page;
        this.examQuestionReport();
      },
4295ede6   梁保满   即使测报表对比页面开发
650
651
      // 切换低分设置类型设置默认分值
      changeScore() {
ee00775c   梁保满   测试bug
652
653
654
655
656
657
658
        this.lowRange.range = [...this.defaultLowRange.range];
      },
      // 禁止输入负数
      keydownRange(event) {
        if (event.key == "-" || event.key == "e") {
          event.returnValue = "";
        }
4295ede6   梁保满   即使测报表对比页面开发
659
660
661
      },
      // 关闭低分设置
      closeDiaMinScore() {
ee00775c   梁保满   测试bug
662
663
        this.lowRange.type = this.defaultLowRange.type;
        this.lowRange.range = [...this.defaultLowRange.range];
4295ede6   梁保满   即使测报表对比页面开发
664
665
666
      },
      // 保存低分设置
      async _SavelowRange() {
f552f352   梁保满   低分设置参数验证
667
668
669
670
        if(this.lowRange.range[0].trim() == "" || this.lowRange.range[1].trim() == ""){
          this.$message.warning("请补全低分设置!");
          return 
        }
4295ede6   梁保满   即使测报表对比页面开发
671
        this.loadingTange = true;
ee00775c   梁保满   测试bug
672
        let { data, status, info } = await this.$request.setLowRange({
4295ede6   梁保满   即使测报表对比页面开发
673
674
675
676
677
          classId: this.classId,
          subjectName: this.subjectName,
          ...this.lowRange,
        });
        this.loadingTange = false;
ee00775c   梁保满   测试bug
678
679
        if (status === 0) {
          this.$message.success(info);
4295ede6   梁保满   即使测报表对比页面开发
680
          this.diaMinScore = false;
ee00775c   梁保满   测试bug
681
682
683
          this.examDetail();
        } else {
          this.$message.error(info);
4295ede6   梁保满   即使测报表对比页面开发
684
685
        }
      },
f356590c   阿宝   即时测列表,分析页面
686
      async _QueryData() {
9309dc5d   梁保满   任课老师接口完成
687
688
689
690
691
692
693
694
695
        this.examDetail();
        this.examStudentReport();
        this.examQuestionReport();
      },
      async examDetail() {
        //详情
        this.loading = true;
        let { data, info, status } = await this.$request.examDetail({
          examId: this.id,
f356590c   阿宝   即时测列表,分析页面
696
        });
9309dc5d   梁保满   任课老师接口完成
697
698
        this.loading = false;
        if (status === 0) {
255e2506   梁保满   飞书bug及优化
699
700
          if (data.paperModifyLog) {
            this.paperModifyLog = { ...data?.paperModifyLog };
9309dc5d   梁保满   任课老师接口完成
701
          }
255e2506   梁保满   飞书bug及优化
702
          this.examReport = { ...data?.examReport };
ee00775c   梁保满   测试bug
703
          this.defaultLowRange = data.lowRange || {
4295ede6   梁保满   即使测报表对比页面开发
704
705
706
            type: 1,
            range: [60, 0],
          };
ee00775c   梁保满   测试bug
707
708
          this.lowRange.type = this.defaultLowRange.type;
          this.lowRange.range = [...this.defaultLowRange.range];
9309dc5d   梁保满   任课老师接口完成
709
710
711
712
713
714
715
716
717
718
719
720
721
        } else {
          this.$message.error(info);
        }
      },
      async _ReScore() {
        //重新记分
        this.loading = true;
        let { data, info, status } = await this.$request.reScore({
          examId: this.id,
        });
        this.loading = false;
        if (status === 0) {
          this.$message.success(info);
8ea67428   梁保满   飞书bug
722
723
724
          this._QueryData();
          this.paperModifyLog.modifiedTime = "";
          this.paperModifyLog.realName = "";
9309dc5d   梁保满   任课老师接口完成
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
        } else {
          this.$message.error(info);
        }
      },
      async examStudentReport() {
        //成绩排名-小题分-作答明细
        this.loading = true;
        let { data, info, status } = await this.$request.examStudentReport({
          examId: this.id,
        });
        this.loading = false;
        if (status === 0) {
          let optionsList = [];
          this.tableData2 = data?.list.map((item) => {
            let params = {};
  
            const detail = JSON.parse(item.detail);
            if (detail.length > optionsList.length) {
              optionsList = [...detail];
            }
9309dc5d   梁保满   任课老师接口完成
745
746
            detail.map((items, index) => {
              params["que" + items.id] = items.id;
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
747
748
749
              params["score" + items.id] = String(items.score).includes(".")
                ? Number(items.score).toFixed(2)
                : items.score;
8ea67428   梁保满   飞书bug
750
751
              params["answer" + items.id] =
                items.answer == 1 ? "✓" : items.answer == 2 ? "✗" : items.answer;
9309dc5d   梁保满   任课老师接口完成
752
753
754
755
756
757
758
759
              params["isRight" + items.id] = items.isRight;
              params["questionType" + items.id] = items.questionType;
            });
            return {
              ...item,
              ...params,
            };
          });
255e2506   梁保满   飞书bug及优化
760
761
762
763
          console.log();
          this.questionList = optionsList.sort((a, b) => {
            return a.id - b.id;
          });
9309dc5d   梁保满   任课老师接口完成
764
765
766
767
768
769
770
771
772
773
        } else {
          this.$message.error(info);
        }
      },
      async examQuestionReport() {
        //试题分析
        this.loading = true;
        let { data, info, status } = await this.$request.examQuestionReport({
          examId: this.id,
          page: this.page,
255e2506   梁保满   飞书bug及优化
774
775
          // size: this.size,
          size: 9999,
9309dc5d   梁保满   任课老师接口完成
776
777
778
        });
        this.loading = false;
        if (status === 0) {
255e2506   梁保满   飞书bug及优化
779
780
          let optionsList = [{}, {}, {}, {}, {}];
          let tableData = data?.list.map((item) => {
9309dc5d   梁保满   任课老师接口完成
781
            let params = {};
9309dc5d   梁保满   任课老师接口完成
782
            const detail = JSON.parse(item.detail);
255e2506   梁保满   飞书bug及优化
783
784
785
786
787
788
            let lastOPtion = detail?.find((item) => {
              return item.option == "未答";
            });
            let defaultArr = detail?.filter((item) => {
              return item.option != "未答";
            });
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
789
  
255e2506   梁保满   飞书bug及优化
790
791
792
            optionsList.map((items, index) => {
              if (index != 4) {
                params["count" + index] =
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
793
794
795
                  defaultArr[index]?.option != "未答"
                    ? defaultArr[index]?.count
                    : "";
236b1f0e   梁保满   周末-飞书bug
796
                params["persent" + index] =
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
797
798
799
                  defaultArr[index]?.option != "未答"
                    ? defaultArr[index]?.persent
                    : "";
255e2506   梁保满   飞书bug及优化
800
801
802
803
804
805
806
807
808
809
810
811
                params["option" + index] =
                  defaultArr[index]?.option != "未答"
                    ? defaultArr[index]?.option == 1
                      ? "✓"
                      : defaultArr[index]?.option == 2
                      ? "✗"
                      : defaultArr[index]?.option
                    : "";
                items["title"] = "选项" + (index + 1);
              } else {
                items["title"] = "未答";
                params["count" + index] = lastOPtion.count;
236b1f0e   梁保满   周末-飞书bug
812
                params["persent" + index] = lastOPtion.persent;
533a17d8   梁保满   备题组卷添加批量设置答案
813
                params["option" + index] = "?";
255e2506   梁保满   飞书bug及优化
814
              }
9309dc5d   梁保满   任课老师接口完成
815
816
817
818
819
820
            });
            return {
              ...item,
              ...params,
            };
          });
255e2506   梁保满   飞书bug及优化
821
822
823
          this.tableData = tableData.sort((a, b) => {
            return a.questionIndex - b.questionIndex;
          });
9309dc5d   梁保满   任课老师接口完成
824
825
          this.optionsList = [...optionsList];
          this.total = data.count;
e5e4a3e6   梁保满   v1.3
826
          this.setType(0);
9309dc5d   梁保满   任课老师接口完成
827
828
829
830
831
832
        } else {
          this.$message.error(info);
        }
      },
      //导出
      async exportData() {
236b1f0e   梁保满   周末-飞书bug
833
834
835
        if (this.exportLoading == true) return;
        this.exportLoading = true;
        const data = await this.$request.exportExamReport({
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
836
          examId: this.id,
236b1f0e   梁保满   周末-飞书bug
837
838
839
        });
        this.exportLoading = false;
        if (data) {
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
840
          let blob = new Blob([data], {
236b1f0e   梁保满   周末-飞书bug
841
842
            type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
          });
e5e4a3e6   梁保满   v1.3
843
844
845
846
847
848
          downloadFile(
            this.status
              ? "即时测-已归档单卷测练报表.xlsx"
              : "即时测-单卷测练报表.xlsx",
            blob
          );
236b1f0e   梁保满   周末-飞书bug
849
850
851
        } else {
          this.$message.error("下载失败");
        }
f356590c   阿宝   即时测列表,分析页面
852
      },
c2460294   梁保满   平台管理员接口联调
853
854
855
856
857
858
859
860
861
862
863
864
865
      async downExcel() {
        let data = await this.$request.subjectiveScoreTemplate({
          examId: this.id,
        });
        if (data && !data.code) {
          let blob = new Blob([data], {
            type: "application/vnd.ms-excel;charset=utf-8",
          });
          downloadFile(`主观题模版.xlsx`, blob);
        } else {
          this.$message.error(data.info);
        }
      },
f356590c   阿宝   即时测列表,分析页面
866
867
    },
  };
4c4f7640   梁保满   路由表,路由前端文件
868
  </script>
dbbfc6c5   梁保满   飞书优化及bug
869
870
871
872
873
874
875
876
877
878
  <style>
  div::-webkit-scrollbar {
    width: 3px;
    height: 10px;
  }
  div::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background-color: #ccc;
  }
  </style>
f356590c   阿宝   即时测列表,分析页面
879
  <style lang="scss" scoped>
24f4b248   梁保满   单卷试题分析打印样式
880
881
882
  .hide {
    display: none;
  }
9309dc5d   梁保满   任课老师接口完成
883
884
  .page-container {
    position: relative;
255e2506   梁保满   飞书bug及优化
885
886
887
888
    height: 100%;
    .table-box {
      min-height: 100%;
    }
9309dc5d   梁保满   任课老师接口完成
889
    &.active {
9309dc5d   梁保满   任课老师接口完成
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
      overflow: hidden;
    }
    .edit-dia {
      position: absolute;
      left: 0;
      top: 0;
      right: 0;
      bottom: 0;
      width: 100%;
      height: calc(100vh - 70px);
      background: #fff;
      overflow-y: auto;
      z-index: 10;
    }
  }
e371f2dc   梁保满   软件下载,学校,班级老师等报表导入...
905
  .persent {
533a17d8   梁保满   备题组卷添加批量设置答案
906
907
    white-space: nowrap;
  }
9309dc5d   梁保满   任课老师接口完成
908
909
910
  .error {
    color: #f30;
  }
f356590c   阿宝   即时测列表,分析页面
911
912
913
914
915
916
917
918
919
920
921
922
923
  .page-content {
    padding: 20px 20px 0;
  }
  .tips {
    height: 48px;
    box-sizing: border-box;
    line-height: 48px;
    padding: 0 16px;
    border: 1px solid #fac7cc;
    border-radius: 5px;
    background-color: #ffebec;
    font-size: 14px;
    color: #fd9795;
255e2506   梁保满   飞书bug及优化
924
    margin: 10px 20px 0 20px;
f356590c   阿宝   即时测列表,分析页面
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
956
957
    display: flex;
    &-p {
      flex: 1;
    }
    .fa-bell-o {
      font-size: 18px;
      margin-right: 5px;
    }
  }
  .tab-box {
    width: 800px;
    margin: 0 auto 12px;
    background: #f8f8f8;
    border-radius: 20px;
    display: flex;
    user-select: none;
    .tab-item {
      flex: 1;
      height: 40px;
      line-height: 40px;
      text-align: center;
      font-size: 16px;
      color: #666;
      font-weight: 500;
      background: transparent;
      border-radius: 20px;
      cursor: pointer;
      &.active {
        background: #667ffd;
        color: #fff;
      }
    }
  }
9309dc5d   梁保满   任课老师接口完成
958
959
960
961
962
963
  .down {
    padding-top: 20px;
    width: 100%;
    display: flex;
    justify-content: space-between;
  }
8ea67428   梁保满   飞书bug
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
  .hui-box {
    display: flex;
    text-align: center;
    .s-txt {
      width: 61px;
      line-height: 144px;
      background: #e2e2e2;
      font-size: 16px;
      color: #fff;
      font-weight: 700;
    }
    .hui-ul {
      border-top: 1px solid #e2e2e2;
    }
    .hui-li {
      display: flex;
      .hui-s {
        height: 48px;
        line-height: 48px;
        border-right: 1px solid #e2e2e2;
        border-bottom: 1px solid #e2e2e2;
        box-sizing: border-box;
      }
      .s1 {
        width: 100px;
      }
      .s2 {
        width: 110px;
      }
      .s3 {
        width: 120px;
      }
    }
  }
4295ede6   梁保满   即使测报表对比页面开发
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
  
  // 设置低分值
  .content-header {
    width: 100%;
    position: relative;
    .setMinScore {
      position: absolute;
      bottom: 0;
      right: 50px;
    }
  }
  .score-ipt {
    width: 80px;
    margin: 0 5px;
  }
4c4f7640   梁保满   路由表,路由前端文件
1013
  </style>