77ebf04d
梁保满
个人版
|
1
2
3
4
|
<template>
<div>
<back-box>
<template slot="title">
|
391f66b9
梁保满
异常设备信息显示问题,单题型总分错误
|
5
|
<span>{{ type == 1 ? "修改试卷" : "修改答案" }}</span>
|
77ebf04d
梁保满
个人版
|
6
7
8
|
</template>
</back-box>
<div class="content">
|
4c2f99b0
梁保满
修改组卷
|
9
10
|
<template v-if="type == 1">
<p class="tips" v-if="paperModifyLog.modifiedTime">
|
77ebf04d
梁保满
个人版
|
11
12
13
14
|
<i class="fa fa-bell-o"></i>
{{
`${paperModifyLog.modifiedTime} ${paperModifyLog.realName}`
}}老师修改了答案
|
4c2f99b0
梁保满
修改组卷
|
15
16
|
</p>
</template>
|
391f66b9
梁保满
异常设备信息显示问题,单题型总分错误
|
17
|
<div class="answer-title" :class="type == 1 ? 't-left' : ''">
|
4c2fb560
梁保满
反馈新需求
|
18
19
20
21
22
|
<p class="name-box" v-if="type == 1">
<span>试卷名称:</span>
<el-input class="ipt-name" v-model="form.title"></el-input>
</p>
<p class="name" v-else>{{ form.title }}</p>
|
77ebf04d
梁保满
个人版
|
23
24
|
<p class="totals">卷面总分:{{ allScore }}分</p>
</div>
|
c6f2a550
梁保满
创建备题组卷,修改备题
|
25
|
<div class="question-box">
|
82235092
梁保满
导入或者修改答案没有答案报错,修改...
|
26
27
28
29
|
<ul
class="questions-ul questions-ul2"
v-if="!questionList[0]?.subQuestions"
>
|
77da338a
梁保满
自测问题修改
|
30
|
<li class="sub-questions">
|
c6f2a550
梁保满
创建备题组卷,修改备题
|
31
32
33
34
35
36
37
38
|
<div class="qs-num">题号</div>
<div class="qs-type">题型</div>
<div class="qs-score">分数</div>
<div class="qs-partScore">漏选得分</div>
<div class="qs-options qs-options2">选项设置</div>
<div class="qs-set">题干</div>
<div class="qs-set">题目解析</div>
<div class="qs-set">知识点</div>
|
77da338a
梁保满
自测问题修改
|
39
|
</li>
|
77da338a
梁保满
自测问题修改
|
40
|
</ul>
|
82235092
梁保满
导入或者修改答案没有答案报错,修改...
|
41
42
43
|
<template v-for="(question, index) in questionList">
<template v-if="question.subQuestions">
|
03cd547e
梁保满
单体型以及其他类型试卷修改答案逻辑
|
44
|
<p class="question-title" v-if="paperType == 2">
|
c6f2a550
梁保满
创建备题组卷,修改备题
|
45
|
<span>{{ setBigNum(index) }}、</span>
|
ddcd75d7
梁保满
教师二次管理数据问题
|
46
47
48
49
50
51
|
<el-input
class="ipt"
v-model.trim="question.questionTitle"
maxlength="30"
placeholder="填写大题名称"
></el-input>
|
c6f2a550
梁保满
创建备题组卷,修改备题
|
52
53
|
<span>共 {{ setScore(question) }} 分</span>
</p>
|
03cd547e
梁保满
单体型以及其他类型试卷修改答案逻辑
|
54
55
56
57
|
<div
class="questions-ul"
:class="paperType == 1 ? 'questions-ul2' : ''"
>
|
22095aba
梁保满
接口联调
|
58
59
60
61
62
63
64
65
66
|
<div class="sub-questions">
<div class="qs-num">题号</div>
<div class="qs-type">题型</div>
<div class="qs-score">分数</div>
<div class="qs-partScore">漏选得分</div>
<div class="qs-options qs-options2">选项设置</div>
<div class="qs-set">题干</div>
<div class="qs-set">题目解析</div>
<div class="qs-set">知识点</div>
|
c6f2a550
梁保满
创建备题组卷,修改备题
|
67
|
</div>
|
ddcd75d7
梁保满
教师二次管理数据问题
|
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
<div
v-for="(subQuestions, indexs) in question.subQuestions"
:key="indexs"
>
<p
class="set-ans-btn"
v-if="
subQuestions.qusType &&
subQuestions.subNum &&
subQuestions.subNum > 4
"
>
<el-button type="primary" @click="setFormAns(indexs, index)"
>批量设置答案</el-button
>
|
77da338a
梁保满
自测问题修改
|
83
84
|
</p>
<div v-else class="sub-questions">
|
03cd547e
梁保满
单体型以及其他类型试卷修改答案逻辑
|
85
|
<div class="qs-num">{{ setNum(index, indexs) }}</div>
|
77da338a
梁保满
自测问题修改
|
86
87
88
89
|
<div class="qs-type">
{{ setSubPro(subQuestions.questionType) }}
</div>
<div class="qs-score">
|
ddcd75d7
梁保满
教师二次管理数据问题
|
90
91
92
93
94
95
96
97
98
99
|
<el-input-number
class="number-ipt"
size="medium"
:min="1"
:max="200"
:precision="2"
:step="1"
v-model="subQuestions.score"
label="单题分值"
></el-input-number>
|
77da338a
梁保满
自测问题修改
|
100
101
102
|
</div>
<div class="qs-partScore">
<p v-if="subQuestions.questionType != 3">--</p>
|
ddcd75d7
梁保满
教师二次管理数据问题
|
103
104
105
106
107
108
109
110
111
112
113
|
<el-input-number
class="number-ipt"
v-else
size="medium"
:min="0"
:precision="2"
:max="subQuestions.score"
:step="0.5"
v-model="subQuestions.partScore"
label="漏选得分"
></el-input-number>
|
77da338a
梁保满
自测问题修改
|
114
115
116
117
|
</div>
<div class="qs-options qs-options2">
<p v-if="subQuestions.questionType == 5">--</p>
<p v-if="subQuestions.questionType == 4" class="answer-box">
|
ddcd75d7
梁保满
教师二次管理数据问题
|
118
119
120
121
122
123
124
125
126
127
128
129
|
<span
class="answer-s"
:class="subQuestions.correctAnswer == 1 ? 'active' : ''"
@click="subQuestions.correctAnswer = 1"
>✓</span
>
<span
class="answer-s"
:class="subQuestions.correctAnswer == 2 ? 'active' : ''"
@click="subQuestions.correctAnswer = 2"
>✗</span
>
|
77da338a
梁保满
自测问题修改
|
130
131
|
</p>
<p v-if="subQuestions.questionType == 3" class="answer-box">
|
ddcd75d7
梁保满
教师二次管理数据问题
|
132
|
<template
|
7f5613f1
梁保满
设置答案问题
|
133
|
v-for="option in subQuestions.answerOptions?.split(',')"
|
ddcd75d7
梁保满
教师二次管理数据问题
|
134
135
136
137
138
|
>
<span
v-if="option"
class="answer-s"
:class="
|
82235092
梁保满
导入或者修改答案没有答案报错,修改...
|
139
|
subQuestions.correctAnswer?.includes(option)
|
ddcd75d7
梁保满
教师二次管理数据问题
|
140
141
142
143
144
145
146
|
? 'active'
: ''
"
:key="option"
@click="changAnswer(subQuestions, option)"
>{{ option }}</span
>
|
77da338a
梁保满
自测问题修改
|
147
148
149
|
</template>
</p>
<p v-if="subQuestions.questionType == 2" class="answer-box">
|
ddcd75d7
梁保满
教师二次管理数据问题
|
150
|
<template
|
7f5613f1
梁保满
设置答案问题
|
151
|
v-for="option in subQuestions.answerOptions?.split(',')"
|
ddcd75d7
梁保满
教师二次管理数据问题
|
152
153
154
155
156
157
158
159
160
161
162
|
>
<span
class="answer-s"
v-if="option"
:class="
subQuestions.correctAnswer == option ? 'active' : ''
"
:key="option"
@click="subQuestions.correctAnswer = option"
>{{ option }}</span
>
|
77da338a
梁保满
自测问题修改
|
163
164
165
166
|
</template>
</p>
</div>
<div class="qs-set">
|
ddcd75d7
梁保满
教师二次管理数据问题
|
167
168
169
170
171
172
173
174
|
<el-button
class="icon-tickets"
type="primary"
circle
size="mini"
icon="el-icon-tickets"
@click="openStem(subQuestions, 1, index, indexs)"
></el-button>
|
77da338a
梁保满
自测问题修改
|
175
176
|
</div>
<div class="qs-set">
|
ddcd75d7
梁保满
教师二次管理数据问题
|
177
178
179
180
181
182
183
184
|
<el-button
class="icon-tickets"
type="primary"
circle
size="mini"
icon="el-icon-tickets"
@click="openStem(subQuestions, 2, index, indexs)"
></el-button>
|
77da338a
梁保满
自测问题修改
|
185
186
|
</div>
<div class="qs-set">
|
ddcd75d7
梁保满
教师二次管理数据问题
|
187
188
189
190
191
192
193
|
<el-button
type="primary"
circle
size="mini"
icon="el-icon-price-tag"
@click="openKnowledge(subQuestions, index, indexs)"
></el-button>
|
77da338a
梁保满
自测问题修改
|
194
|
</div>
|
22095aba
梁保满
接口联调
|
195
|
</div>
|
c6f2a550
梁保满
创建备题组卷,修改备题
|
196
|
</div>
|
4c2f99b0
梁保满
修改组卷
|
197
|
</div>
|
77da338a
梁保满
自测问题修改
|
198
|
</template>
|
82235092
梁保满
导入或者修改答案没有答案报错,修改...
|
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
|
<div v-else>
<p
class="set-ans-btn"
v-if="question.qusType && question.subNum && question.subNum > 4"
>
<el-button type="primary" @click="setFormAns(index)"
>批量设置答案</el-button
>
</p>
<div v-else class="sub-questions">
<div class="qs-num">{{ question.questionIndex }}</div>
<div class="qs-type">
{{ setSubPro(question.questionType) }}
</div>
<div class="qs-score">
<el-input-number
class="number-ipt"
size="medium"
:min="1"
:max="200"
:precision="2"
:step="1"
v-model="question.score"
label="单题分值"
></el-input-number>
</div>
<div class="qs-partScore">
<p v-if="question.questionType != 3">--</p>
<el-input-number
class="number-ipt"
v-else
size="medium"
:min="0"
:precision="2"
:max="question.score"
:step="0.5"
v-model="question.partScore"
label="漏选得分"
></el-input-number>
</div>
<div class="qs-options qs-options2">
<p v-if="question.questionType == 5">--</p>
<p v-if="question.questionType == 4" class="answer-box">
<span
class="answer-s"
:class="question.correctAnswer == 1 ? 'active' : ''"
@click="question.correctAnswer = 1"
>✓</span
>
<span
class="answer-s"
:class="question.correctAnswer == 2 ? 'active' : ''"
@click="question.correctAnswer = 2"
>✗</span
>
</p>
<p v-if="question.questionType == 3" class="answer-box">
<template
v-for="option in question.answerOptions?.split(',')"
>
<span
v-if="option"
class="answer-s"
:class="
question.correctAnswer?.includes(option) ? 'active' : ''
"
:key="option"
@click="changAnswer(question, option)"
>{{ option }}</span
>
</template>
</p>
<p v-if="question.questionType == 2" class="answer-box">
<template
v-for="option in question.answerOptions?.split(',')"
>
<span
class="answer-s"
v-if="option"
:class="question.correctAnswer == option ? 'active' : ''"
:key="option"
@click="question.correctAnswer = option"
>{{ option }}</span
>
</template>
</p>
</div>
<div class="qs-set">
<el-button
class="icon-tickets"
type="primary"
circle
size="mini"
icon="el-icon-tickets"
@click="openStem(question, 1, index)"
></el-button>
</div>
<div class="qs-set">
<el-button
class="icon-tickets"
type="primary"
circle
size="mini"
icon="el-icon-tickets"
@click="openStem(question, 2, index)"
></el-button>
</div>
<div class="qs-set">
<el-button
type="primary"
circle
size="mini"
icon="el-icon-price-tag"
@click="openKnowledge(question, index)"
></el-button>
</div>
</div>
</div>
|
22095aba
梁保满
接口联调
|
317
|
</template>
|
c6f2a550
梁保满
创建备题组卷,修改备题
|
318
|
</div>
|
77ebf04d
梁保满
个人版
|
319
320
321
322
|
<div class="btn-box">
<el-button type="danger" plain round @click="linkBack">取消</el-button>
<el-button type="primary" round @click="save">保存</el-button>
</div>
|
ddcd75d7
梁保满
教师二次管理数据问题
|
323
324
325
326
327
328
329
|
<el-dialog
:close-on-click-modal="false"
title="批量设置答案"
:visible.sync="diaSetAns"
width="400"
:modal-append-to-body="false"
>
|
77ebf04d
梁保满
个人版
|
330
331
332
333
334
335
|
<div class="qs-options set-questions">
<p class="dia-tips">
请点击选项按钮设置答案,多选题题目之间用“,”隔开,若添加5道题:“AC,AD,BD,AC,CD”
</p>
<p>{{ setSubPro(formAns.qusType) }}:</p>
<p class="ipt">
|
ddcd75d7
梁保满
教师二次管理数据问题
|
336
337
338
339
|
<el-input
ref="formAnsIpt"
v-if="formAns.qusType == 2 || formAns.qusType == 3"
v-model="formAns.answerList"
|
77ebf04d
梁保满
个人版
|
340
|
@keydown.native="keydownAnswer($event, formAns.qusType)"
|
ddcd75d7
梁保满
教师二次管理数据问题
|
341
342
343
344
345
346
347
|
@input="setAllAnswer($event, formAns.qusType)"
></el-input>
<el-input
v-if="formAns.qusType == 4"
v-model="formAns.answerList"
readonly=""
></el-input>
|
77ebf04d
梁保满
个人版
|
348
349
350
|
</p>
<p class="answer-box">
<template v-if="formAns.qusType == 4">
|
ddcd75d7
梁保满
教师二次管理数据问题
|
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
|
<span
class="answer-s active"
@click="
formAns.answerList.length < formAns.subNum
? (formAns.answerList += '✓')
: ''
"
>✓</span
>
<span
class="answer-s active"
@click="
formAns.answerList.length < formAns.subNum
? (formAns.answerList += '✗')
: ''
"
>✗</span
>
|
77ebf04d
梁保满
个人版
|
369
370
|
</template>
<template v-if="formAns.qusType == 3">
|
ddcd75d7
梁保满
教师二次管理数据问题
|
371
372
373
374
375
376
377
378
379
380
|
<span
class="answer-s active"
v-for="option in formAns.answerOptions.split(',')"
:key="option"
@click="setMultiple(formAns, option)"
>{{ option }}</span
>
<span class="answer-s active" @click="setMultiple(formAns, ',')"
>,</span
>
|
77ebf04d
梁保满
个人版
|
381
|
</template>
|
c2460294
梁保满
平台管理员接口联调
|
382
|
<template v-if="formAns.qusType == 2">
|
ddcd75d7
梁保满
教师二次管理数据问题
|
383
384
385
386
387
388
389
390
391
392
393
|
<span
class="answer-s active"
v-for="option in formAns.answerOptions.split(',')"
:key="option"
@click="
formAns.answerList.length < formAns.subNum
? (formAns.answerList += option)
: ''
"
>{{ option }}</span
>
|
77ebf04d
梁保满
个人版
|
394
|
</template>
|
ddcd75d7
梁保满
教师二次管理数据问题
|
395
396
397
398
399
|
<span
class="answer-s delButton"
@click="formAns.answerList = formAns.answerList.slice(0, -1)"
>x</span
>
|
77ebf04d
梁保满
个人版
|
400
401
402
403
404
405
406
407
|
<span class="answer-s ac" @click="formAns.answerList = ''">ac</span>
</p>
</div>
<div class="dialog-footer" slot="footer">
<el-button @click="saveFormAns">确 定</el-button>
<el-button @click="diaSetAns = false">取 消</el-button>
</div>
</el-dialog>
|
ddcd75d7
梁保满
教师二次管理数据问题
|
408
409
410
411
412
413
414
|
<el-dialog
:close-on-click-modal="false"
:title="stem.type == 1 ? '上传题干' : '上传题目解析'"
:visible.sync="dialogStem"
v-if="dialogStem"
width="500"
>
|
4c2f99b0
梁保满
修改组卷
|
415
|
<div class="upload-box">
|
ddcd75d7
梁保满
教师二次管理数据问题
|
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
|
<div v-loading="iframeLoading">
<template v-if="stem.type == 1">
<iframe
ref="screenshot"
class="screenshot"
v-if="stem.screenshot"
:src="stem.screenshot"
@load="iframeLoading = false"
></iframe>
</template>
<template v-else>
<iframe
ref="screenshot"
class="screenshot"
v-if="stem.answerScreenshot"
:src="stem.answerScreenshot"
@load="iframeLoading = false"
></iframe>
</template>
</div>
<el-upload
class="upload-demo"
:action="uploadUrl"
:limit="1"
:on-success="upSuccess"
:on-error="upError"
accept="image/*"
>
|
ce278878
梁保满
2-2 bugfix
|
444
|
<el-button size="small" type="primary">选择照片</el-button>
|
4c2f99b0
梁保满
修改组卷
|
445
446
447
448
449
450
|
</el-upload>
</div>
<div slot="footer">
<el-button @click="dialogStem = false">确定</el-button>
</div>
</el-dialog>
|
ddcd75d7
梁保满
教师二次管理数据问题
|
451
452
453
454
455
456
|
<el-dialog
:close-on-click-modal="false"
title="知识点"
:visible.sync="dialogKnowledge"
width="500"
>
|
4c2f99b0
梁保满
修改组卷
|
457
458
459
|
<div>
<el-form ref="form" :model="stem" label-width="160px">
<el-form-item label="知识点:">
|
ddcd75d7
梁保满
教师二次管理数据问题
|
460
461
462
463
464
465
466
467
468
469
470
471
472
473
|
<el-cascader
size="small"
filterable
:show-all-levels="false"
clearable
placeholder="选择知识点"
v-model="stem.knowledge"
:options="knowledgeData"
:props="{
expandTrigger: 'hover',
multiple: true,
checkStrictly: true,
}"
></el-cascader>
|
4c2f99b0
梁保满
修改组卷
|
474
475
476
477
478
479
480
481
|
</el-form-item>
</el-form>
</div>
<div slot="footer">
<el-button @click="dialogKnowledge = false">取 消</el-button>
<el-button type="primary" @click="setKnowledge">确 定</el-button>
</div>
</el-dialog>
|
77ebf04d
梁保满
个人版
|
482
483
484
485
486
487
|
</div>
</div>
</template>
<script>
import { deepClone, checkAnswer } from "utils";
|
4c2f99b0
梁保满
修改组卷
|
488
|
import knowledgeList from "assets/js/knowledgeList.js";
|
77ebf04d
梁保满
个人版
|
489
490
491
|
export default {
data() {
return {
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
492
|
role: "",
|
77ebf04d
梁保满
个人版
|
493
|
title: "",
|
7f5613f1
梁保满
设置答案问题
|
494
|
type: 1, //1:答题卡 2:即时测报表题目列表 3:课时题目列表
|
77ebf04d
梁保满
个人版
|
495
|
questionList: [],
|
ddcd75d7
梁保满
教师二次管理数据问题
|
496
|
paperType: 1, //1 备题(随堂问) /2 组卷
|
c6f2a550
梁保满
创建备题组卷,修改备题
|
497
|
//答题卡详情
|
77ebf04d
梁保满
个人版
|
498
|
form: {
|
c6f2a550
梁保满
创建备题组卷,修改备题
|
499
|
examType: 2, //考试类型:0-未知/1-随堂问/2-即时测/3-xx考
|
77ebf04d
梁保满
个人版
|
500
501
502
503
|
title: "",
tag: "",
subjectId: "",
examsDuration: 90,
|
4c2f99b0
梁保满
修改组卷
|
504
|
sectionName: "",
|
77ebf04d
梁保满
个人版
|
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
|
gradeName: "",
share: 1,
questionList: [],
},
paperModifyLog: {
realName: "",
modifiedTime: "",
},
diaSetAns: false,
formAns: {
listIndex: 0, //大题位置
endIndex: 0, //相同题目最后一位题目的questionIndex
index: 0,
qusType: "", //题目类型
subNum: 0, //数量
answerOptions: [], //答案选项
answerList: "", //答案列表-字符串
},
|
4c2f99b0
梁保满
修改组卷
|
523
524
525
526
527
528
529
530
531
532
533
534
535
|
//v1.5
dialogStem: false, //截图开关
dialogKnowledge: false, //知识点开关
knowledgeList: { ...knowledgeList },
stem: {
type: 1,
index: 0, //大题位置
indexs: 0, //小题位置
screenshot: "", //题干图片地址
answerScreenshot: "", //题目解析图片地址
knowledge: [], //知识点
},
|
ce278878
梁保满
2-2 bugfix
|
536
|
gradeClassList: [], //学段列表
|
ddcd75d7
梁保满
教师二次管理数据问题
|
537
538
|
uploadUrl: "/file/uploadImgToHtml",
iframeLoading: false,
|
03cd547e
梁保满
单体型以及其他类型试卷修改答案逻辑
|
539
|
examType: 2,
|
77ebf04d
梁保满
个人版
|
540
541
542
543
544
545
546
547
548
549
550
|
};
},
computed: {
allScore: function () {
let score = 0;
this.questionList?.map((item) => {
if (item.subQuestions) {
score += item.subQuestions.reduce((a, b) => {
return a + (Number(b.score) || 0);
}, 0);
} else {
|
ddcd75d7
梁保满
教师二次管理数据问题
|
551
|
score += item.score || 0;
|
77ebf04d
梁保满
个人版
|
552
553
554
555
|
}
}, 0);
return Number(score).toFixed(2);
},
|
4c2f99b0
梁保满
修改组卷
|
556
557
|
// 知识点列表 根据学段-科目筛选
knowledgeData: function () {
|
ddcd75d7
梁保满
教师二次管理数据问题
|
558
|
let jsons = [];
|
a9f5dfcf
梁保满
修改知识点匹配,删除即时测报表
|
559
|
if (this.form.gradeName && this.form.subjectName) {
|
ddcd75d7
梁保满
教师二次管理数据问题
|
560
561
|
let sectionName = "";
this.gradeClassList?.map((item) => {
|
a9f5dfcf
梁保满
修改知识点匹配,删除即时测报表
|
562
|
if (this.form.gradeName == item.gradeName) {
|
ddcd75d7
梁保满
教师二次管理数据问题
|
563
|
sectionName = item.sectionName;
|
a9f5dfcf
梁保满
修改知识点匹配,删除即时测报表
|
564
|
}
|
ddcd75d7
梁保满
教师二次管理数据问题
|
565
566
567
568
569
570
571
572
573
574
575
576
577
|
});
console.log(this.gradeClassList);
console.log(sectionName);
if (
sectionName &&
Object.keys(this.knowledgeList).includes(sectionName)
) {
if (
Object.keys(this.knowledgeList[sectionName]).includes(
this.form.subjectName
)
) {
jsons = this.knowledgeList[sectionName][this.form.subjectName];
|
4c2f99b0
梁保满
修改组卷
|
578
579
580
|
}
}
}
|
ddcd75d7
梁保满
教师二次管理数据问题
|
581
|
return jsons;
|
4c2f99b0
梁保满
修改组卷
|
582
|
},
|
77ebf04d
梁保满
个人版
|
583
584
|
},
created() {
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
585
586
587
|
this.role =
this.$store.getters.info.showRole ||
this.$store.getters.info.permissions[0].role;
|
77ebf04d
梁保满
个人版
|
588
|
this.type = this.$route.query.type || 1;
|
03cd547e
梁保满
单体型以及其他类型试卷修改答案逻辑
|
589
|
this.examType = this.$route.query.examType || 2;
|
7f5613f1
梁保满
设置答案问题
|
590
|
this.paperType = this.$route.query.paperType || 2;
|
4c2fb560
梁保满
反馈新需求
|
591
|
this.form.title = this.$route.query.title || "";
|
77ebf04d
梁保满
个人版
|
592
|
this._QueryDetail();
|
a9f5dfcf
梁保满
修改知识点匹配,删除即时测报表
|
593
|
this._GradeList();
|
77ebf04d
梁保满
个人版
|
594
595
|
},
methods: {
|
4c2f99b0
梁保满
修改组卷
|
596
597
|
// v1.5
//上传截图
|
77da338a
梁保满
自测问题修改
|
598
|
openStem(obj, type, index, indexs) {
|
ddcd75d7
梁保满
教师二次管理数据问题
|
599
600
|
this.iframeLoading = true;
this.stem.type = type;
|
4c2f99b0
梁保满
修改组卷
|
601
602
603
|
this.stem.index = index;
this.stem.indexs = indexs;
if (type == 1) {
|
03cd547e
梁保满
单体型以及其他类型试卷修改答案逻辑
|
604
|
if (!obj.screenshot || obj.screenshot == "") {
|
ddcd75d7
梁保满
教师二次管理数据问题
|
605
606
|
this.iframeLoading = false;
}
|
4c2f99b0
梁保满
修改组卷
|
607
608
609
|
this.stem.screenshot = obj.screenshot || "";
this.stem.answerScreenshot = "";
} else {
|
03cd547e
梁保满
单体型以及其他类型试卷修改答案逻辑
|
610
|
if (!obj.answerScreenshot || obj.answerScreenshot == "") {
|
ddcd75d7
梁保满
教师二次管理数据问题
|
611
612
|
this.iframeLoading = false;
}
|
4c2f99b0
梁保满
修改组卷
|
613
614
615
616
617
618
619
620
621
|
this.stem.answerScreenshot = obj.answerScreenshot || "";
this.stem.screenshot = "";
}
this.dialogStem = true;
},
//图片上传成功
upSuccess(res, file) {
if (res && res.status == 0) {
|
4c2f99b0
梁保满
修改组卷
|
622
|
if (this.stem.type == 1) {
|
98dec083
梁保满
复制试卷问题,题干列表样式,题目解...
|
623
|
this.stem.screenshot = res.data.url;
|
77da338a
梁保满
自测问题修改
|
624
|
if (this.questionList[0]?.subQuestions) {
|
ddcd75d7
梁保满
教师二次管理数据问题
|
625
626
627
|
this.questionList[this.stem.index].subQuestions[
this.stem.indexs
].screenshot = this.stem.screenshot;
|
77da338a
梁保满
自测问题修改
|
628
|
} else {
|
ddcd75d7
梁保满
教师二次管理数据问题
|
629
630
|
this.questionList[this.stem.index].screenshot =
this.stem.screenshot;
|
77da338a
梁保满
自测问题修改
|
631
|
}
|
4c2f99b0
梁保满
修改组卷
|
632
|
} else {
|
98dec083
梁保满
复制试卷问题,题干列表样式,题目解...
|
633
|
this.stem.answerScreenshot = res.data.url;
|
77da338a
梁保满
自测问题修改
|
634
|
if (this.questionList[0]?.subQuestions) {
|
ddcd75d7
梁保满
教师二次管理数据问题
|
635
636
637
|
this.questionList[this.stem.index].subQuestions[
this.stem.indexs
].answerScreenshot = this.stem.answerScreenshot;
|
77da338a
梁保满
自测问题修改
|
638
|
} else {
|
ddcd75d7
梁保满
教师二次管理数据问题
|
639
640
|
this.questionList[this.stem.index].answerScreenshot =
this.stem.answerScreenshot;
|
77da338a
梁保满
自测问题修改
|
641
|
}
|
4c2f99b0
梁保满
修改组卷
|
642
643
644
645
646
647
648
|
}
this.$message.success("上传成功");
} else {
this.$message.error(res.info);
}
},
|
a9f5dfcf
梁保满
修改知识点匹配,删除即时测报表
|
649
650
651
652
653
|
async _GradeList() {
let fetchClassList =
this.role == "ROLE_PERSONAL"
? this.$request.pClassList
: this.$request.fetchClassList;
|
4c2f99b0
梁保满
修改组卷
|
654
|
|
a9f5dfcf
梁保满
修改知识点匹配,删除即时测报表
|
655
656
|
const { data, status, info } = await fetchClassList();
if (status == 0) {
|
ddcd75d7
梁保满
教师二次管理数据问题
|
657
|
this.gradeClassList = data.list;
|
a9f5dfcf
梁保满
修改知识点匹配,删除即时测报表
|
658
659
660
661
|
} else {
this.$message.error(info);
}
},
|
4c2f99b0
梁保满
修改组卷
|
662
663
664
665
666
667
|
upError(res) {
this.$message.error("上传失败");
},
// 打开知识点
openKnowledge(obj, index, indexs) {
this.stem.index = index;
|
77da338a
梁保满
自测问题修改
|
668
|
this.stem.indexs = indexs || 0;
|
384a2a54
梁保满
请求头添加班主任信息,bug修改
|
669
|
this.stem.knowledge = (obj.knowledge && obj.knowledge.split("#")) || [];
|
4c2f99b0
梁保满
修改组卷
|
670
671
672
673
|
this.dialogKnowledge = true;
},
// 选择知识点
setKnowledge() {
|
77da338a
梁保满
自测问题修改
|
674
675
676
|
if (this.questionList[0]?.subQuestions) {
this.questionList[this.stem.index].subQuestions[
this.stem.indexs
|
384a2a54
梁保满
请求头添加班主任信息,bug修改
|
677
|
].knowledge = this.stem.knowledge.join("#");
|
77da338a
梁保满
自测问题修改
|
678
|
} else {
|
ddcd75d7
梁保满
教师二次管理数据问题
|
679
680
|
this.questionList[this.stem.index].knowledge =
this.stem.knowledge.join("#");
|
77da338a
梁保满
自测问题修改
|
681
|
}
|
4c2f99b0
梁保满
修改组卷
|
682
683
684
685
|
this.dialogKnowledge = false;
},
//end
|
77ebf04d
梁保满
个人版
|
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
725
726
727
728
729
730
731
732
733
734
|
linkBack() {
this.$router.go(-1);
},
setSubPro(type) {
let tit;
switch (type) {
case 2:
tit = "单选题";
break;
case 3:
tit = "多选题";
break;
case 4:
tit = "判断题";
break;
case 5:
tit = "主观题";
break;
}
return tit;
},
setBigNum(num) {
let txt = "";
let bigNum = [
"一",
"二",
"三",
"四",
"五",
"六",
"七",
"八",
"九",
"十",
"十一",
"十二",
"十三",
"十四",
"十五",
"十六",
"十七",
"十八",
"十九",
"二十",
];
txt = bigNum[num];
return txt;
},
|
03cd547e
梁保满
单体型以及其他类型试卷修改答案逻辑
|
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
|
//计算题号
setNum(index, indexs, sub) {
let lengths = 0; //所在大题之前的所有小题数量
let subIndex = 0; //所在大题的位置
for (let i = 0; i < index; i++) {
let subArr = this.questionList[i].subQuestions.filter((item) => {
return !!item.questionType;
});
lengths += subArr.length;
}
for (let i = 0; i < indexs; i++) {
if (!!this.questionList[index].subQuestions[i].questionType) {
subIndex += 1;
}
}
return lengths + subIndex + 1;
},
|
77ebf04d
梁保满
个人版
|
752
753
754
755
756
757
|
setScore(question) {
let score = question.subQuestions.reduce((a, b) => {
return a + (b.score || 0);
}, 0);
return Number(score).toFixed(2);
},
|
82235092
梁保满
导入或者修改答案没有答案报错,修改...
|
758
|
//设置多选答案
|
77ebf04d
梁保满
个人版
|
759
|
changAnswer(sub, option) {
|
77ebf04d
梁保满
个人版
|
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
|
let str = new RegExp(option, "g");
if (sub.correctAnswer?.includes(option)) {
sub.correctAnswer = sub.correctAnswer.replace(str, "");
} else {
let arrs = (sub.correctAnswer && sub.correctAnswer.split("")) || [];
arrs.push(option);
sub.correctAnswer = arrs.sort().join("");
}
},
keydownAnswer(event, type) {
let answerA = "ABCDEFG";
let answer_a = "abcdefg";
answerA = answerA.substring(0, this.formAns.subNum);
answer_a = answer_a.substring(0, this.formAns.subNum);
answerA += answer_a;
answerA = type == 2 ? answerA : answerA + ",";
if (
event.key == "Meta" ||
event.key == "CapsLock" ||
event.key == "Shift" ||
event.key == "Enter" ||
event.key == "Alt" ||
event.key == "Backspace" ||
event.key == "Delete" ||
event.key == "ArrowUp" ||
event.key == "ArrowDown" ||
event.key == "ArrowLeft" ||
event.key == "v" ||
event.key == "V" ||
event.key == "ArrowRight"
)
return;
if (!answerA.includes(event.key)) {
event.returnValue = "";
}
},
setAllAnswer(event, type) {
let str = this.formAns.answerList;
let str2 = checkAnswer(
str,
type,
this.formAns.answerOptions.split(",").length,
this.formAns.subNum
);
this.formAns.answerList = str2;
},
setAnswer(type, ans) {
let txt = "";
if (type == 2) {
txt = ans;
} else if (type == 3) {
txt = ans + ",";
} else if (type == 4) {
txt = ans == 1 ? "✓" : ans == 2 ? "✗" : "";
}
return txt;
},
insertTxtAndSetcursor(answerList, str) {
let element = this.$refs.formAnsIpt.$el.children[0]; // 获取到指定标签
let startPos = element.selectionStart; // 获取光标开始的位置
if (startPos === undefined) {
// 如果没有光标位置 不操作
return answerList;
} else {
return {
text:
answerList.substring(0, startPos) +
str +
answerList.substring(startPos), // 将文本插入
startPos: startPos + str.length,
};
}
},
|
4c2f99b0
梁保满
修改组卷
|
833
|
//多选答案设置
|
77ebf04d
梁保满
个人版
|
834
|
setMultiple(obj, answer) {
|
77ebf04d
梁保满
个人版
|
835
836
837
838
839
840
841
842
843
844
845
846
847
|
let resault = this.insertTxtAndSetcursor(obj.answerList || "", answer);
obj.answerList = resault.text;
let str = obj.answerList;
let str2 = checkAnswer(
str,
3,
obj.answerOptions.split(",").length,
obj.subNum
);
obj.answerList = str2;
this.$refs.formAnsIpt.$el.children[0].focus();
this.$refs.formAnsIpt.$el.children[0].selectionStart = resault.startPos;
},
|
4c2f99b0
梁保满
修改组卷
|
848
|
//初始化要修改的答案
|
77ebf04d
梁保满
个人版
|
849
|
setFormAns(indexs, index) {
|
4c2f99b0
梁保满
修改组卷
|
850
|
let answerList = "";
|
77da338a
梁保满
自测问题修改
|
851
852
853
854
855
856
857
858
859
860
|
if (this.questionList[0]?.subQuestions) {
this.formAns = { ...this.questionList[index].subQuestions[indexs] };
this.formAns.listIndex = index;
let startIndex = indexs - this.formAns.subNum; //批量设置大难开始位置
this.questionList[index].subQuestions.map((item, subIdx) => {
if (subIdx >= startIndex && subIdx < indexs) {
answerList += this.setAnswer(item.questionType, item.correctAnswer);
if (item.qusType == 3) {
answerList = answerList.slice(0, -1);
}
|
77ebf04d
梁保满
个人版
|
861
|
}
|
77da338a
梁保满
自测问题修改
|
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
|
});
} else {
this.formAns = { ...this.questionList[indexs] };
let startIndex = indexs - this.formAns.subNum; //批量设置开始位置
this.formAns.answerList = [];
this.formAns.listIndex = indexs;
this.questionList.map((item, subIdx) => {
if (subIdx >= startIndex && subIdx < indexs) {
answerList += this.setAnswer(item.questionType, item.correctAnswer);
if (item.qusType == 3) {
answerList = answerList.slice(0, -1);
}
}
});
}
|
4c2f99b0
梁保满
修改组卷
|
877
|
this.formAns.answerList = answerList;
|
77ebf04d
梁保满
个人版
|
878
879
880
881
882
883
|
this.diaSetAns = true;
},
saveFormAns() {
//批量修改答案
let EndIndex;
let subNum = this.formAns.subNum - 1;
|
77da338a
梁保满
自测问题修改
|
884
885
886
887
888
889
|
if (this.questionList[0]?.subQuestions) {
this.questionList[this.formAns.listIndex].subQuestions.some(
(item, index) => {
if (this.formAns.endIndex == item.questionIndex) {
EndIndex = index;
}
|
ddcd75d7
梁保满
教师二次管理数据问题
|
890
|
return this.formAns.endIndex == item.questionIndex;
|
77da338a
梁保满
自测问题修改
|
891
892
893
894
|
}
);
} else {
this.questionList.some((item, index) => {
|
77ebf04d
梁保满
个人版
|
895
896
|
if (this.formAns.endIndex == item.questionIndex) {
EndIndex = index;
|
77ebf04d
梁保满
个人版
|
897
|
}
|
ddcd75d7
梁保满
教师二次管理数据问题
|
898
|
return this.formAns.endIndex == item.questionIndex;
|
77da338a
梁保满
自测问题修改
|
899
900
|
});
}
|
77ebf04d
梁保满
个人版
|
901
902
903
904
905
906
907
908
909
910
911
912
|
for (let i = 0; i <= subNum; i++) {
let correctAnswer = "";
if (this.formAns.qusType == 2) {
correctAnswer = this.formAns.answerList[subNum - i] || "";
} else if (this.formAns.qusType == 3) {
correctAnswer = this.formAns.answerList.split(",")[subNum - i] || "";
} else if (this.formAns.qusType == 4) {
correctAnswer =
this.formAns.answerList[subNum - i] == "✓"
? 1
: this.formAns.answerList[subNum - i] == "✗"
|
ddcd75d7
梁保满
教师二次管理数据问题
|
913
914
|
? 2
: "";
|
77ebf04d
梁保满
个人版
|
915
|
}
|
77da338a
梁保满
自测问题修改
|
916
917
918
919
920
921
922
|
if (this.questionList[0]?.subQuestions) {
this.questionList[this.formAns.listIndex].subQuestions[
EndIndex - i
].correctAnswer = correctAnswer;
} else {
this.questionList[EndIndex - i].correctAnswer = correctAnswer;
}
|
77ebf04d
梁保满
个人版
|
923
924
925
926
927
|
}
this.diaSetAns = false;
},
async save() {
for (let i = 0; i < this.questionList.length; i++) {
|
77da338a
梁保满
自测问题修改
|
928
929
930
931
932
933
934
935
936
937
|
if (this.questionList[0]?.subQuestions) {
for (let j = 0; j < this.questionList[i].subQuestions.length; j++) {
if (this.questionList[i].subQuestions[j].qusType) {
this.questionList[i].subQuestions.splice(j, 1);
}
}
} else {
if (this.questionList[i].qusType) {
this.questionList.splice(i, 1);
i--;
|
77ebf04d
梁保满
个人版
|
938
939
|
}
}
|
77ebf04d
梁保满
个人版
|
940
941
942
943
944
945
946
947
948
949
|
}
let questionList = this.questionList.map((item) => {
item.score = null;
// item.questionId = "";
// item.questionIndex = "";
return item;
});
//更新答题卡
let modifyPaper, params;
if (this.type == 1) {
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
950
951
952
953
|
modifyPaper =
this.role == "ROLE_PERSONAL"
? this.$request.pModifyPaper
: this.$request.modifyPaper;
|
77ebf04d
梁保满
个人版
|
954
955
956
957
958
|
params = {
paperId: this.$route.query.paperId,
questionList: questionList,
};
} else if (this.type == 2) {
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
959
960
961
962
|
modifyPaper =
this.role == "ROLE_PERSONAL"
? this.$request.pSetExamAnswer
: this.$request.setExamAnswer;
|
77ebf04d
梁保满
个人版
|
963
964
965
966
967
|
params = {
examId: this.$route.query.paperId,
questionList: questionList,
};
} else {
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
968
969
970
971
|
modifyPaper =
this.role == "ROLE_PERSONAL"
? this.$request.pSetPeriodAnswer
: this.$request.setPeriodAnswer;
|
77ebf04d
梁保满
个人版
|
972
973
974
975
976
|
params = {
periodId: this.$route.query.paperId,
questionList: questionList,
};
}
|
4c2fb560
梁保满
反馈新需求
|
977
978
979
980
|
const { data, status, info } = await modifyPaper({
title: this.form.title,
...params,
});
|
77ebf04d
梁保满
个人版
|
981
982
983
984
985
986
987
988
|
if (status == 0) {
this.$router.go(-1);
} else {
this.$message.error(message);
}
},
async _QueryDetail() {
//查询详情
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
989
990
991
992
993
994
|
let detail;
if (this.role == "ROLE_PERSONAL") {
detail =
this.type == 1
? this.$request.pPaperDetail
: this.type == 2
|
ddcd75d7
梁保满
教师二次管理数据问题
|
995
996
|
? this.$request.pExamQuestionList
: this.$request.pPeriodQuestionList;
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
997
998
999
|
} else {
detail =
this.type == 1
|
11cb8ce0
梁保满
样式调整
|
1000
|
? this.$request.fetchPaperDetail
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
1001
|
: this.type == 2
|
ddcd75d7
梁保满
教师二次管理数据问题
|
1002
1003
|
? this.$request.examQuestionList
: this.$request.periodQuestionList;
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
1004
|
}
|
77ebf04d
梁保满
个人版
|
1005
1006
1007
1008
|
let params =
this.type == 1
? { paperId: this.$route.query.paperId }
: this.type == 2
|
ddcd75d7
梁保满
教师二次管理数据问题
|
1009
1010
|
? { examId: this.$route.query.paperId }
: {
|
77ebf04d
梁保满
个人版
|
1011
1012
1013
1014
|
periodId: this.$route.query.paperId,
};
const { data, status, info } = await detail(params);
if (status == 0) {
|
7f5613f1
梁保满
设置答案问题
|
1015
|
let questionList;
|
77ebf04d
梁保满
个人版
|
1016
|
if (this.type == 1) {
|
4c2f99b0
梁保满
修改组卷
|
1017
|
//修改答案信息
|
77ebf04d
梁保满
个人版
|
1018
1019
1020
1021
1022
|
this.paperModifyLog = {
...this.paperModifyLog,
...this.form.paperModifyLog,
};
this.form = deepClone(data);
|
82235092
梁保满
导入或者修改答案没有答案报错,修改...
|
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
|
questionList = this.form.questionList.map((item) => {
if (item.subQuestions) {
item.subQuestions.map((subQuestion) => {
subQuestion.questionType == 2 || subQuestion.questionType == 3
? (subQuestion.answerOptions =
subQuestion.answerOptions || "A,B,C,D")
: "";
subQuestion.correctAnswer = subQuestion.correctAnswer || "";
});
} else {
item.questionType == 2 || item.questionType == 3
? (item.answerOptions = item.answerOptions || "A,B,C,D")
: "";
item.correctAnswer = item.correctAnswer || "";
}
return item;
});
|
77ebf04d
梁保满
个人版
|
1040
|
} else {
|
7f5613f1
梁保满
设置答案问题
|
1041
|
questionList = data.list.sort((a, b) => {
|
77ebf04d
梁保满
个人版
|
1042
1043
1044
|
return a.questionIndex - b.questionIndex;
});
}
|
82235092
梁保满
导入或者修改答案没有答案报错,修改...
|
1045
1046
|
this.questionList = questionList;
this.formateQuestion();
|
4c2f99b0
梁保满
修改组卷
|
1047
1048
1049
1050
|
} else {
this.$message.error(info);
}
},
|
82235092
梁保满
导入或者修改答案没有答案报错,修改...
|
1051
1052
|
formateQuestion() {
let arr = this.questionList;
|
7f5613f1
梁保满
设置答案问题
|
1053
1054
|
if (arr[0]?.subQuestions) {
this.questionList = arr.map((item) => {
|
77da338a
梁保满
自测问题修改
|
1055
1056
1057
|
let types = [{}];
let addndex = 0;
item.subQuestions.map((sub, index) => {
|
77da338a
梁保满
自测问题修改
|
1058
1059
1060
1061
1062
1063
1064
1065
|
if (!!sub.questionType) {
if (
sub.questionType == types[addndex].qusType &&
sub.questionType != 5
) {
//同类型批量答案+1
types[addndex].subNum += 1;
if (
|
ddcd75d7
梁保满
教师二次管理数据问题
|
1066
|
types[addndex].answerOptions.length < sub.answerOptions.length
|
77da338a
梁保满
自测问题修改
|
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
|
) {
types[addndex].answerOptions = sub.answerOptions;
}
types[addndex].answerList += this.setAnswer(
sub.questionType,
sub.correctAnswer
);
if (index == item.subQuestions.length - 1) {
//循环最后类型数量大于等于5,保存批量答案
if (types[addndex].subNum && types[addndex].subNum >= 5) {
types[addndex].endIndex = sub.questionIndex;
types[addndex].index = index;
}
}
} else {
if (types[addndex].subNum && types[addndex].subNum >= 5) {
//不同类型时如果原有类型数量大于等于5,保存批量答案
types[addndex].endIndex =
item.subQuestions[index - 1].questionIndex;
types[addndex].index = index - 1;
addndex += 1;
types[addndex] = {};
}
//不同类型初始化批量答案
types[addndex].qusType = sub.questionType;
types[addndex].subNum = 1;
types[addndex].answerOptions = sub.answerOptions;
types[addndex].answerList = this.setAnswer(
sub.questionType,
sub.correctAnswer
);
}
}
});
for (let i = 0; i < types.length; i++) {
if (types[i].qusType == 3) {
types[i].answerList = types[i].answerList.slice(0, -1);
}
if (types[i].subNum >= 5) {
item.subQuestions.splice(
types[i].index + i + 1,
0,
deepClone(types[i])
);
}
}
|
7f5613f1
梁保满
设置答案问题
|
1113
|
return item;
|
77da338a
梁保满
自测问题修改
|
1114
1115
|
});
} else {
|
4c2f99b0
梁保满
修改组卷
|
1116
1117
|
let types = [{}];
let addndex = 0;
|
7f5613f1
梁保满
设置答案问题
|
1118
|
this.questionList = arr.map((sub, index) => {
|
4c2f99b0
梁保满
修改组卷
|
1119
1120
1121
1122
1123
1124
1125
|
if (!!sub.questionType) {
if (
sub.questionType == types[addndex].qusType &&
sub.questionType != 5
) {
//同类型批量答案+1
types[addndex].subNum += 1;
|
e93f8636
梁保满
即使测列表角色权限操作问题
|
1126
|
//最大选项
|
4c2f99b0
梁保满
修改组卷
|
1127
|
if (
|
77da338a
梁保满
自测问题修改
|
1128
|
types[addndex].answerOptions.length < sub.answerOptions.length
|
4c2f99b0
梁保满
修改组卷
|
1129
1130
1131
1132
1133
1134
1135
|
) {
types[addndex].answerOptions = sub.answerOptions;
}
types[addndex].answerList += this.setAnswer(
sub.questionType,
sub.correctAnswer
);
|
e93f8636
梁保满
即使测列表角色权限操作问题
|
1136
1137
|
if (index == arr.length - 1) {
|
4c2f99b0
梁保满
修改组卷
|
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
|
//循环最后类型数量大于等于5,保存批量答案
if (types[addndex].subNum && types[addndex].subNum >= 5) {
types[addndex].endIndex = sub.questionIndex;
types[addndex].index = index;
}
}
} else {
if (types[addndex].subNum && types[addndex].subNum >= 5) {
//不同类型时如果原有类型数量大于等于5,保存批量答案
types[addndex].endIndex =
|
77da338a
梁保满
自测问题修改
|
1148
|
this.questionList[index - 1].questionIndex;
|
4c2f99b0
梁保满
修改组卷
|
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
|
types[addndex].index = index - 1;
addndex += 1;
types[addndex] = {};
}
//不同类型初始化批量答案
types[addndex].qusType = sub.questionType;
types[addndex].subNum = 1;
types[addndex].answerOptions = sub.answerOptions;
types[addndex].answerList = this.setAnswer(
sub.questionType,
sub.correctAnswer
);
}
}
|
7f5613f1
梁保满
设置答案问题
|
1163
|
return sub;
|
4c2f99b0
梁保满
修改组卷
|
1164
|
});
|
e93f8636
梁保满
即使测列表角色权限操作问题
|
1165
|
console.log(types);
|
4c2f99b0
梁保满
修改组卷
|
1166
1167
1168
1169
1170
|
for (let i = 0; i < types.length; i++) {
if (types[i].qusType == 3) {
types[i].answerList = types[i].answerList.slice(0, -1);
}
if (types[i].subNum >= 5) {
|
77da338a
梁保满
自测问题修改
|
1171
|
this.questionList.splice(
|
4c2f99b0
梁保满
修改组卷
|
1172
1173
1174
1175
1176
1177
|
types[i].index + i + 1,
0,
deepClone(types[i])
);
}
}
|
77da338a
梁保满
自测问题修改
|
1178
|
}
|
7f5613f1
梁保满
设置答案问题
|
1179
|
console.log(this.questionList);
|
77ebf04d
梁保满
个人版
|
1180
1181
1182
1183
|
},
},
};
</script>
|
ddcd75d7
梁保满
教师二次管理数据问题
|
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
|
<style>
.screenshot-box {
width: 600px;
}
.screenshot {
width: 100%;
box-shadow: none;
border: none;
height: 400px;
}
|
77ebf04d
梁保满
个人版
|
1195
|
|
ddcd75d7
梁保满
教师二次管理数据问题
|
1196
1197
1198
1199
1200
1201
1202
1203
|
.screenshot-img {
display: block;
width: auto;
max-width: 100%;
margin: 0 auto;
margin-bottom: 10px;
}
</style>
|
77ebf04d
梁保满
个人版
|
1204
1205
1206
1207
|
<style lang="scss" scoped>
.content {
width: 100%;
box-sizing: border-box;
|
11cb8ce0
梁保满
样式调整
|
1208
|
padding: 0 50px 60px;
|
4c2f99b0
梁保满
修改组卷
|
1209
|
|
77ebf04d
梁保满
个人版
|
1210
1211
1212
|
.ml-20 {
margin-left: 20px;
}
|
4c2f99b0
梁保满
修改组卷
|
1213
|
|
77ebf04d
梁保满
个人版
|
1214
|
.btn-box {
|
11cb8ce0
梁保满
样式调整
|
1215
1216
1217
1218
|
width: calc(100% - 240px);
position: fixed;
right: 40px;
bottom: 20px;
|
e5e4a3e6
梁保满
v1.3
|
1219
|
padding: 10px 0 5px;
|
11cb8ce0
梁保满
样式调整
|
1220
|
background: #fff;
|
77ebf04d
梁保满
个人版
|
1221
1222
|
text-align: right;
margin-left: 140px;
|
11cb8ce0
梁保满
样式调整
|
1223
|
z-index: 10;
|
77ebf04d
梁保满
个人版
|
1224
|
}
|
4c2f99b0
梁保满
修改组卷
|
1225
|
|
77ebf04d
梁保满
个人版
|
1226
1227
1228
1229
1230
1231
1232
1233
1234
|
.tips {
height: 48px;
line-height: 48px;
padding: 0 16px;
border: 1px solid #fac7cc;
background-color: #ffebec;
font-size: 14px;
color: #fd9795;
margin: 10px 0 20px 0;
|
4c2f99b0
梁保满
修改组卷
|
1235
|
|
77ebf04d
梁保满
个人版
|
1236
1237
1238
1239
1240
1241
|
.fa-bell-o {
font-size: 18px;
margin-right: 5px;
}
}
}
|
4c2f99b0
梁保满
修改组卷
|
1242
|
|
77ebf04d
梁保满
个人版
|
1243
1244
1245
1246
1247
1248
|
.answer-title {
text-align: center;
font-size: 20px;
color: #333;
font-weight: 700;
padding: 20px 0;
|
4c2f99b0
梁保满
修改组卷
|
1249
|
|
391f66b9
梁保满
异常设备信息显示问题,单题型总分错误
|
1250
|
&.t-left {
|
4c2fb560
梁保满
反馈新需求
|
1251
1252
|
text-align: left;
}
|
4c2f99b0
梁保满
修改组卷
|
1253
|
|
77ebf04d
梁保满
个人版
|
1254
1255
|
.totals {
font-size: 16px;
|
4c2fb560
梁保满
反馈新需求
|
1256
1257
1258
|
color: #666;
font-weight: normal;
}
|
4c2f99b0
梁保满
修改组卷
|
1259
|
|
4c2fb560
梁保满
反馈新需求
|
1260
1261
1262
1263
1264
1265
|
.name-box {
display: flex;
white-space: nowrap;
align-items: center;
margin-bottom: 10px;
font-size: 16px;
|
77ebf04d
梁保满
个人版
|
1266
|
font-weight: normal;
|
4c2f99b0
梁保满
修改组卷
|
1267
|
|
4c2fb560
梁保满
反馈新需求
|
1268
1269
1270
1271
1272
|
:deep(.el-input__inner) {
font-size: 16px;
color: #333;
font-weight: 700;
}
|
77ebf04d
梁保满
个人版
|
1273
1274
|
}
}
|
4c2f99b0
梁保满
修改组卷
|
1275
|
|
77ebf04d
梁保满
个人版
|
1276
1277
|
.question-title {
line-height: 40px;
|
4c2f99b0
梁保满
修改组卷
|
1278
|
|
77ebf04d
梁保满
个人版
|
1279
1280
1281
|
.ipt {
width: 300px;
margin: 0 16px 0 10px;
|
4c2f99b0
梁保满
修改组卷
|
1282
|
|
77ebf04d
梁保满
个人版
|
1283
1284
1285
1286
1287
1288
|
:deep(.el-input__inner) {
border-radius: 20px;
border-color: #667ffd;
background: rgba($color: #667ffd, $alpha: 0.05);
}
}
|
4c2f99b0
梁保满
修改组卷
|
1289
|
|
77ebf04d
梁保满
个人版
|
1290
1291
1292
|
.delete {
margin-right: 8px;
}
|
4c2f99b0
梁保满
修改组卷
|
1293
|
|
77ebf04d
梁保满
个人版
|
1294
1295
1296
1297
1298
1299
|
.title-txt {
margin-right: 20px;
font-size: 16px;
font-weight: 700;
}
}
|
ddcd75d7
梁保满
教师二次管理数据问题
|
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
|
.question-box {
margin-bottom: 20px;
.screenshot-box {
width: 100%;
border: 1px solid #e2e2e2;
margin-bottom: 20px;
.screenshot-img {
margin: 0;
}
}
}
|
4c2f99b0
梁保满
修改组卷
|
1313
|
|
77ebf04d
梁保满
个人版
|
1314
1315
1316
1317
1318
1319
1320
|
.set-ans-btn {
width: 100%;
padding: 10px 0 10px 630px;
box-sizing: border-box;
border-bottom: 1px solid #e2e2e2;
border-right: 1px solid #e2e2e2;
}
|
4c2f99b0
梁保满
修改组卷
|
1321
|
|
77ebf04d
梁保满
个人版
|
1322
1323
1324
|
.el-input-number {
width: 140px;
}
|
4c2f99b0
梁保满
修改组卷
|
1325
|
|
d703d72c
梁保满
首页,个人信息,班级名单,部分备题...
|
1326
1327
1328
|
.delete {
margin-left: 8px;
}
|
4c2f99b0
梁保满
修改组卷
|
1329
|
|
77ebf04d
梁保满
个人版
|
1330
1331
1332
1333
1334
|
.questions-ul {
border-left: 1px solid #e2e2e2;
border-top: 1px solid #e2e2e2;
margin: 12px 0;
}
|
4c2f99b0
梁保满
修改组卷
|
1335
|
|
c6f2a550
梁保满
创建备题组卷,修改备题
|
1336
1337
1338
1339
1340
1341
1342
1343
1344
|
.questions-ul2 {
margin: 0;
border-top: none;
&:nth-child(1) {
border-top: 1px solid #e2e2e2;
}
}
|
77ebf04d
梁保满
个人版
|
1345
1346
1347
1348
|
.sub-questions {
width: 100%;
display: flex;
border-bottom: 1px solid #e2e2e2;
|
4c2f99b0
梁保满
修改组卷
|
1349
|
|
ddcd75d7
梁保满
教师二次管理数据问题
|
1350
|
& > div {
|
77ebf04d
梁保满
个人版
|
1351
1352
1353
1354
1355
1356
1357
1358
|
min-height: 40px;
padding: 5px;
flex-shrink: 0;
border-right: 1px solid #e2e2e2;
display: flex;
justify-content: center;
align-items: center;
}
|
4c2f99b0
梁保满
修改组卷
|
1359
|
|
77ebf04d
梁保满
个人版
|
1360
1361
1362
|
.qs-num {
width: 80px;
}
|
4c2f99b0
梁保满
修改组卷
|
1363
|
|
77ebf04d
梁保满
个人版
|
1364
1365
1366
|
.qs-type {
width: 160px;
}
|
4c2f99b0
梁保满
修改组卷
|
1367
|
|
77ebf04d
梁保满
个人版
|
1368
1369
1370
1371
|
.qs-score,
.qs-partScore {
width: 160px;
}
|
4c2f99b0
梁保满
修改组卷
|
1372
|
|
77ebf04d
梁保满
个人版
|
1373
|
.qs-set {
|
4c2f99b0
梁保满
修改组卷
|
1374
|
width: 60px;
|
77ebf04d
梁保满
个人版
|
1375
|
}
|
4c2f99b0
梁保满
修改组卷
|
1376
|
|
77ebf04d
梁保满
个人版
|
1377
1378
1379
|
.qs-options {
flex: 1;
}
|
4c2f99b0
梁保满
修改组卷
|
1380
|
|
77ebf04d
梁保满
个人版
|
1381
1382
1383
1384
1385
|
.qs-options2 {
text-align: left;
justify-content: flex-start;
padding-left: 20px;
}
|
4c2f99b0
梁保满
修改组卷
|
1386
|
|
77ebf04d
梁保满
个人版
|
1387
1388
1389
|
.answer-s {
cursor: pointer;
}
|
4c2f99b0
梁保满
修改组卷
|
1390
|
|
77ebf04d
梁保满
个人版
|
1391
1392
1393
1394
1395
1396
1397
1398
1399
|
:deep(.el-select) {
.el-input__inner {
border-radius: 20px;
border-color: #667ffd;
width: 150px;
height: 32px;
line-height: 32px;
background: rgba($color: #667ffd, $alpha: 0.05);
}
|
4c2f99b0
梁保满
修改组卷
|
1400
|
|
77ebf04d
梁保满
个人版
|
1401
1402
1403
1404
1405
|
.el-input__icon {
line-height: 32px;
}
}
}
|
4c2f99b0
梁保满
修改组卷
|
1406
|
|
77ebf04d
梁保满
个人版
|
1407
1408
1409
1410
1411
|
.set-questions {
.answer-box {
.answer-s {
cursor: pointer;
user-select: none;
|
4c2f99b0
梁保满
修改组卷
|
1412
|
|
77ebf04d
梁保满
个人版
|
1413
1414
1415
1416
1417
1418
|
&:first-of-type {
margin-left: 0;
}
}
}
}
|
4c2f99b0
梁保满
修改组卷
|
1419
1420
1421
1422
1423
1424
1425
1426
1427
|
.upload-box {
.upload-demo {
text-align: center;
}
.stem-pic {
display: block;
margin: 0 auto 20px;
|
77da338a
梁保满
自测问题修改
|
1428
1429
|
max-width: 100%;
max-height: 200px;
|
4c2f99b0
梁保满
修改组卷
|
1430
1431
1432
|
object-fit: cover;
}
}
|
77ebf04d
梁保满
个人版
|
1433
|
</style>
|