ce278878
梁保满
2-2 bugfix
|
1
|
<!-- 组卷 -->
|
77ebf04d
梁保满
个人版
|
2
3
4
5
|
<template>
<div ref="content" class="content-box">
<back-box>
<template slot="title">
|
6bca489d
LH_PC
云平台二期UI
|
6
|
<span>{{ isUpload ? "导入试卷" : "创建答题卡" }}</span>
|
77ebf04d
梁保满
个人版
|
7
8
9
|
</template>
</back-box>
<div class="content">
|
6bca489d
LH_PC
云平台二期UI
|
10
11
|
<el-dialog :close-on-click-modal="false" title="选择班级分享" :visible.sync="classSharingType" width="800"
:modal-append-to-body="false" :append-to-body="true">
|
ef16e57e
LH_PC
fix:前端版本迭代
|
12
|
<div :key="classSharingType">
|
574f1a90
LH_PC
fix:修改年级组长/任课老师缺少...
|
13
|
<div class="row-subfix">
|
77fa942a
LH_PC
feat:修改打印对接
|
14
|
<div>
|
6bca489d
LH_PC
云平台二期UI
|
15
16
17
|
<span class="line-subfix">年级:</span>
<span class="line-value">{{ gradeName }}</span>
</div>
|
574f1a90
LH_PC
fix:修改年级组长/任课老师缺少...
|
18
|
</div>
|
77fa942a
LH_PC
feat:修改打印对接
|
19
20
|
<div v-if="shareClass.length >= 1" class="row-subfix"
style="margin-top: 20px;margin-bottom: 20px;overflow: auto">
|
6bca489d
LH_PC
云平台二期UI
|
21
|
<span class="line-subfix" style="float: left;">班级:</span>
|
77fa942a
LH_PC
feat:修改打印对接
|
22
|
<div style="float: left;
|
6bca489d
LH_PC
云平台二期UI
|
23
24
|
background:rgb(245,247,250);padding:15px 10px;width: calc(100% - 80px);border-radius:5px;">
<span class="line-value" style="min-height: 300px;border-radius: 4px; background: rgb(247,247,250);">
|
77fa942a
LH_PC
feat:修改打印对接
|
25
|
<el-checkbox v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
|
ef16e57e
LH_PC
fix:前端版本迭代
|
26
27
28
|
<div>
<el-checkbox @change="handleCheckedClassChange" v-model="item.isChecked" :key="index"
v-for="(item, index) in shareClass" :label="item.id">
|
6bca489d
LH_PC
云平台二期UI
|
29
30
|
{{ item.className }}
</el-checkbox>
|
ef16e57e
LH_PC
fix:前端版本迭代
|
31
|
</div>
|
6bca489d
LH_PC
云平台二期UI
|
32
33
|
</span>
</div>
|
574f1a90
LH_PC
fix:修改年级组长/任课老师缺少...
|
34
|
</div>
|
6bca489d
LH_PC
云平台二期UI
|
35
36
37
38
39
40
|
</div>
<div slot="footer">
<el-button type="info" :size="'small'" @click="classSharingType = false">取消</el-button>
<el-button type="primary" :size="'small'" @click="_checkedClass">确定</el-button>
</div>
</el-dialog>
|
f45b3c05
LH_PC
云平台新UI界面
|
41
|
<el-steps :active="step" finish-status="success" simple style="margin: 20px 0">
|
77ebf04d
梁保满
个人版
|
42
|
<el-step title="基础信息" icon="el-icon-edit"></el-step>
|
f45b3c05
LH_PC
云平台新UI界面
|
43
|
<el-step v-if="!isUpload" title="题目编辑" icon="el-icon-tickets"></el-step>
|
77ebf04d
梁保满
个人版
|
44
|
<el-step title="设置答案" icon="el-icon-edit-outline"></el-step>
|
f45b3c05
LH_PC
云平台新UI界面
|
45
|
<el-step v-if="isUpload" title="试卷预览" icon="el-icon-edit-outline"></el-step>
|
77ebf04d
梁保满
个人版
|
46
47
|
</el-steps>
<div v-show="step == 0">
|
f45b3c05
LH_PC
云平台新UI界面
|
48
|
<el-form ref="forms" :model="form" :rules="formRules" label-width="140px">
|
77ebf04d
梁保满
个人版
|
49
|
<el-form-item label="答题卡名称:" prop="title">
|
f45b3c05
LH_PC
云平台新UI界面
|
50
51
|
<el-input class="sel2" type="text" placeholder="请输入答题卡名称" v-model.trim="form.title" maxlength="50" size="45"
show-word-limit>
|
77ebf04d
梁保满
个人版
|
52
53
54
55
56
|
</el-input>
</el-form-item>
<el-form-item label="测验类型:">
<el-select v-model="form.tagId" placeholder="选择测验类型">
<el-option label="--" value=""> </el-option>
|
f45b3c05
LH_PC
云平台新UI界面
|
57
|
<el-option v-for="item in answerTypeList" :key="item.id" :label="item.typeName" :value="item.id">{{
|
77fa942a
LH_PC
feat:修改打印对接
|
58
|
item.typeName }}</el-option>
|
77ebf04d
梁保满
个人版
|
59
|
</el-select>
|
f45b3c05
LH_PC
云平台新UI界面
|
60
|
<el-button class="ml-20" type="primary" round circle icon="el-icon-edit" @click="openTagDia"></el-button>
|
77ebf04d
梁保满
个人版
|
61
|
</el-form-item>
|
f45b3c05
LH_PC
云平台新UI界面
|
62
63
64
|
<el-form-item v-if="role != 'ROLE_PERSONAL'" label="年级:" prop="gradeName">
<el-select class="sel" v-model="form.gradeName" placeholder="" @change="changeGrade">
<el-option v-for="item in gradeList" :key="item" :label="item" :value="item">
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
65
66
67
|
</el-option>
</el-select>
</el-form-item>
|
77ebf04d
梁保满
个人版
|
68
69
|
<el-form-item label="科目:" prop="subjectName">
<el-select class="sel" v-model="form.subjectName" placeholder="">
|
f45b3c05
LH_PC
云平台新UI界面
|
70
|
<el-option v-for="item in subjectList" :key="item.value" :label="item.label" :value="item.value">{{
|
77fa942a
LH_PC
feat:修改打印对接
|
71
72
|
item.label
}}
|
77ebf04d
梁保满
个人版
|
73
74
75
76
|
</el-option>
</el-select>
</el-form-item>
<el-form-item label="考试时长:">
|
f45b3c05
LH_PC
云平台新UI界面
|
77
78
|
<el-input-number size="medium" :min="1" :max="140" :step-strictly="true" :step="1"
v-model="form.examsDuration" label="考试时长"></el-input-number>
|
77ebf04d
梁保满
个人版
|
79
|
</el-form-item>
|
f45b3c05
LH_PC
云平台新UI界面
|
80
|
<el-form-item v-if="role != 'ROLE_PERSONAL'" label="分享范围:" prop="sharingType">
|
ead476dd
LH_PC
fix:最终定版
|
81
82
83
|
<el-radio :label="0" v-model="form.sharingType">任课班级分享</el-radio>
<el-radio class="name-radio" @click.native="_selectClassSharingType" v-model="form.sharingType"
:label="1">自定义分享班级</el-radio>
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
84
|
</el-form-item>
|
77ebf04d
梁保满
个人版
|
85
86
|
</el-form>
<div class="btn-box">
|
f45b3c05
LH_PC
云平台新UI界面
|
87
88
|
<el-button type="danger" plain round @click="linkBack">取消</el-button>
<el-button type="primary" round @click="isUpload ? setStep2() : setStep1()">下一步</el-button>
|
77ebf04d
梁保满
个人版
|
89
|
</div>
|
6bca489d
LH_PC
云平台二期UI
|
90
91
|
<el-dialog :close-on-click-modal="false" title="设置测验类型" :visible.sync="dialogVisible" width="500px"
:append-to-body="true">
|
77ebf04d
梁保满
个人版
|
92
93
94
|
<div class="dia-content">
<p class="add-type" v-for="item in tagList" :key="item.id">
<el-row :gutter="10">
|
77fa942a
LH_PC
feat:修改打印对接
|
95
|
<el-col :span="18"><el-input :disabled="item.typeName == '错题复习'" v-model="item.typeName" :maxlength="10"
|
f45b3c05
LH_PC
云平台新UI界面
|
96
|
placeholder="请输入答题卡类型名称"></el-input></el-col>
|
77ebf04d
梁保满
个人版
|
97
98
|
<el-col :span="6">
<el-tooltip effect="dark" content="保存" placement="top">
|
77fa942a
LH_PC
feat:修改打印对接
|
99
100
|
<el-button v-if="item.typeName != '错题复习'" class="js-set" type="primary" size="small" round circle
icon="el-icon-check" @click="editTypeName(item)"></el-button>
|
77ebf04d
梁保满
个人版
|
101
102
|
</el-tooltip>
<el-tooltip effect="dark" content="删除" placement="right">
|
f45b3c05
LH_PC
云平台新UI界面
|
103
|
<el-popconfirm title="确定删除这道大题吗?" @confirm="removeTypeName(item)">
|
77fa942a
LH_PC
feat:修改打印对接
|
104
105
|
<el-button v-if="item.typeName != '错题复习'" class="js-set" type="danger" size="small" round circle
icon="el-icon-delete" slot="reference"></el-button>
|
77ebf04d
梁保满
个人版
|
106
107
108
109
110
111
112
113
|
</el-popconfirm>
</el-tooltip>
</el-col>
</el-row>
</p>
<p class="add-type">
<el-row :gutter="10">
<el-col :span="18">
|
f45b3c05
LH_PC
云平台新UI界面
|
114
|
<el-input type="text" placeholder="请输入答题卡类型名称" v-model.trim="answerTypeName" :maxlength="10">
|
77ebf04d
梁保满
个人版
|
115
116
117
118
|
</el-input>
</el-col>
<el-col :span="6">
<el-tooltip effect="dark" content="添加" placement="right">
|
f45b3c05
LH_PC
云平台新UI界面
|
119
120
|
<el-button class="js-set" type="primary" size="small" round circle icon="el-icon-plus"
@click="addPaperType"></el-button>
|
77ebf04d
梁保满
个人版
|
121
122
123
124
125
126
127
128
129
130
|
</el-tooltip>
</el-col>
</el-row>
</p>
</div>
<div class="" slot="footer">
<el-button @click="dialogVisible = false">关 闭</el-button>
</div>
</el-dialog>
</div>
|
352c53cc
梁保满
上传word回传数据
|
131
132
|
<template v-if="!isUpload">
<div v-show="step == 1">
|
f45b3c05
LH_PC
云平台新UI界面
|
133
|
<div class="question-box" v-for="(question, index) in form.questionList" :key="index">
|
352c53cc
梁保满
上传word回传数据
|
134
|
<p class="question-title">
|
f45b3c05
LH_PC
云平台新UI界面
|
135
136
137
|
<el-tooltip effect="dark" :content="question.show ? '收起' : '展开'" placement="left">
<i class="el-icon-caret-right" :class="question.show ? 'active' : ''"
@click="question.show = !question.show"></i>
|
352c53cc
梁保满
上传word回传数据
|
138
139
|
</el-tooltip>
<span>{{ setBigNum(index) }}、</span>
|
f45b3c05
LH_PC
云平台新UI界面
|
140
141
142
143
144
|
<el-input class="ipt" v-model.trim="question.questionTitle" maxlength="30"
placeholder="填写大题名称"></el-input>
<el-popconfirm title="确定删除这道大题吗?" @confirm="form.questionList.splice(index, 1)">
<el-button slot="reference" class="delete" type="danger" size="mini" circle
icon="el-icon-delete"></el-button>
|
352c53cc
梁保满
上传word回传数据
|
145
|
</el-popconfirm>
|
f45b3c05
LH_PC
云平台新UI界面
|
146
|
<span class="m20">共:{{ question.subQuestions ? question.subQuestions.length : 0 }}题</span>
|
352c53cc
梁保满
上传word回传数据
|
147
148
149
150
151
152
153
154
155
156
157
158
|
<span>共:{{ setScore(question) }}分</span>
</p>
<transition name="el-zoom-in-top">
<ul v-show="question.show" class="questions-ul">
<li 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">选项设置</div>
<div class="qs-set">操作</div>
</li>
|
f45b3c05
LH_PC
云平台新UI界面
|
159
160
|
<template v-for="(subQuestions, indexs) in question.subQuestions">
<li v-if="!subQuestions.qusType && !subQuestions.subNum" class="sub-questions" :key="indexs">
|
d4e9b596
梁保满
手动创建组卷 删除题目,批量设置显示问题
|
161
162
|
<div class="qs-num">{{ setNum(index, indexs) }}</div>
<div class="qs-type">
|
f45b3c05
LH_PC
云平台新UI界面
|
163
164
|
<el-select v-model="subQuestions.questionType" placeholder="选择题目类型"
@change="changeSubQuestions($event, subQuestions)">
|
d4e9b596
梁保满
手动创建组卷 删除题目,批量设置显示问题
|
165
166
167
168
169
170
171
|
<el-option label="单选题" :value="2"></el-option>
<el-option label="多选题" :value="3"></el-option>
<el-option label="判断题" :value="4"></el-option>
<el-option label="主观题" :value="5"></el-option>
</el-select>
</div>
<div class="qs-score">
|
f45b3c05
LH_PC
云平台新UI界面
|
172
173
|
<el-input-number class="number-ipt" size="medium" :min="1" :max="200" :precision="2" :step="1"
v-model="subQuestions.score" label="单题分值"></el-input-number>
|
d4e9b596
梁保满
手动创建组卷 删除题目,批量设置显示问题
|
174
175
176
|
</div>
<div class="qs-partScore">
<p v-if="subQuestions.questionType != 3">--</p>
|
f45b3c05
LH_PC
云平台新UI界面
|
177
178
179
|
<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>
|
d4e9b596
梁保满
手动创建组卷 删除题目,批量设置显示问题
|
180
181
182
|
</div>
<div class="qs-options">
<p v-if="subQuestions.questionType == 5">--</p>
|
f45b3c05
LH_PC
云平台新UI界面
|
183
184
|
<p v-if="subQuestions.questionType == 4" class="answer-box">
<span class="answer-s" :class="subQuestions.correctAnswer == 1 ? 'active' : ''
|
77fa942a
LH_PC
feat:修改打印对接
|
185
|
" @click="subQuestions.correctAnswer = 1">✓</span>
|
f45b3c05
LH_PC
云平台新UI界面
|
186
|
<span class="answer-s" :class="subQuestions.correctAnswer == 2 ? 'active' : ''
|
77fa942a
LH_PC
feat:修改打印对接
|
187
|
" @click="subQuestions.correctAnswer = 2">✗</span>
|
d4e9b596
梁保满
手动创建组卷 删除题目,批量设置显示问题
|
188
|
</p>
|
f45b3c05
LH_PC
云平台新UI界面
|
189
190
|
<p v-if="subQuestions.questionType == 3" class="answer-box">
<span class="answer-s" v-for="option in subQuestions.answerOptions.split(
|
77fa942a
LH_PC
feat:修改打印对接
|
191
192
193
194
195
|
','
)" :class="subQuestions.correctAnswer ? subQuestions.correctAnswer.includes(option)
? 'active'
: '' : ''
" :key="option" @click="changAnswer(subQuestions, option)">{{ option }}</span>
|
d4e9b596
梁保满
手动创建组卷 删除题目,批量设置显示问题
|
196
|
</p>
|
f45b3c05
LH_PC
云平台新UI界面
|
197
198
|
<p v-if="subQuestions.questionType == 2" class="answer-box">
<span class="answer-s" v-for="option in subQuestions.answerOptions.split(
|
77fa942a
LH_PC
feat:修改打印对接
|
199
200
201
|
','
)" :class="subQuestions.correctAnswer == option ? 'active' : ''
" :key="option" @click="subQuestions.correctAnswer = option">{{ option }}</span>
|
d4e9b596
梁保满
手动创建组卷 删除题目,批量设置显示问题
|
202
|
</p>
|
f45b3c05
LH_PC
云平台新UI界面
|
203
|
<p v-if="subQuestions.questionType == 3 ||
|
77fa942a
LH_PC
feat:修改打印对接
|
204
205
|
subQuestions.questionType == 2
" class="answer-box answer-box2">
|
f45b3c05
LH_PC
云平台新UI界面
|
206
207
208
209
|
<el-button size="mini" type="primary" icon="el-icon-plus" circle
@click="addOptions(subQuestions)"></el-button>
<el-button size="mini" type="primary" icon="el-icon-minus" round circle
@click="removeOptions(subQuestions)"></el-button>
|
d4e9b596
梁保满
手动创建组卷 删除题目,批量设置显示问题
|
210
211
212
|
</p>
</div>
<div class="qs-set">
|
f45b3c05
LH_PC
云平台新UI界面
|
213
214
215
|
<el-popconfirm title="确定删除这道题吗?" @confirm="delTabData(indexs, index)">
<el-button slot="reference" class="delete" type="danger" size="mini" circle
icon="el-icon-delete"></el-button>
|
d4e9b596
梁保满
手动创建组卷 删除题目,批量设置显示问题
|
216
217
218
219
|
</el-popconfirm>
</div>
</li>
</template>
|
352c53cc
梁保满
上传word回传数据
|
220
221
222
|
<li class="sub-questions">
<div class="qs-num">添加</div>
<div class="qs-type">
|
f45b3c05
LH_PC
云平台新UI界面
|
223
224
|
<el-select v-model="addSubQuestionsType" placeholder="选择题目类型"
@change="changeAddSubQuestions($event, question)">
|
352c53cc
梁保满
上传word回传数据
|
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
|
<el-option label="单选题" :value="2"></el-option>
<el-option label="多选题" :value="3"></el-option>
<el-option label="判断题" :value="4"></el-option>
<el-option label="主观题" :value="5"></el-option>
</el-select>
</div>
<div class="qs-score"></div>
<div class="qs-partScore"></div>
<div class="qs-options"></div>
<div class="qs-set"></div>
</li>
</ul>
</transition>
</div>
<div class="add-box">
<p class="add-question" @click="openQuestion">
|
f45b3c05
LH_PC
云平台新UI界面
|
241
|
<el-button size="mini" type="primary" icon="el-icon-plus" circle></el-button>
|
352c53cc
梁保满
上传word回传数据
|
242
243
244
245
|
<span class="s1">添加大题</span>
</p>
</div>
<div class="btn-box">
|
f45b3c05
LH_PC
云平台新UI界面
|
246
|
<el-button type="danger" plain round @click="linkBack">取消</el-button>
|
352c53cc
梁保满
上传word回传数据
|
247
|
<el-button round @click="step = 0">上一步</el-button>
|
f45b3c05
LH_PC
云平台新UI界面
|
248
249
|
<el-button :type="form.questionList.length == 0 ? 'info' : 'primary'" round
@click="setStep2">下一步</el-button>
|
352c53cc
梁保满
上传word回传数据
|
250
|
</div>
|
6bca489d
LH_PC
云平台二期UI
|
251
252
|
<el-dialog :close-on-click-modal="false" title="添加大题" :append-to-body="true"
:visible.sync="addQuestionVisible" width="600px">
|
352c53cc
梁保满
上传word回传数据
|
253
|
<div class="dia-content">
|
ef16e57e
LH_PC
fix:前端版本迭代
|
254
|
<el-form ref="form" :model="questionForm" :rules="questionFormRules" label-width="150px">
|
352c53cc
梁保满
上传word回传数据
|
255
256
|
<el-form-item label="标题:">
<el-col :span="20">
|
f45b3c05
LH_PC
云平台新UI界面
|
257
|
<el-input v-model.trim="questionForm.questionTitle" maxlength="30" placeholder="输入大题名称"></el-input>
|
352c53cc
梁保满
上传word回传数据
|
258
259
260
|
</el-col>
</el-form-item>
<el-form-item label="选择题型:">
|
f45b3c05
LH_PC
云平台新UI界面
|
261
262
263
|
<el-select v-model="questionForm.questionType" placeholder="" @change="setQuestionForm">
<el-option v-for="item in questionOptions" :key="item.value" :label="item.label"
:value="item.value">
|
352c53cc
梁保满
上传word回传数据
|
264
265
|
</el-option>
<el-option label="混合题" :value="6"> </el-option>
|
77ebf04d
梁保满
个人版
|
266
|
</el-select>
|
352c53cc
梁保满
上传word回传数据
|
267
268
|
</el-form-item>
<el-form-item label="题数:">
|
f45b3c05
LH_PC
云平台新UI界面
|
269
270
|
<el-input-number v-model="questionForm.number" @change="changeQesNum" :min="1" :max="100"
:step-strictly="true" :step="1" label="label"></el-input-number>
|
352c53cc
梁保满
上传word回传数据
|
271
|
</el-form-item>
|
f45b3c05
LH_PC
云平台新UI界面
|
272
|
<el-form-item label="选项个数:" v-show="questionForm.questionType != 4 &&
|
77fa942a
LH_PC
feat:修改打印对接
|
273
274
|
questionForm.questionType != 5
">
|
f45b3c05
LH_PC
云平台新UI界面
|
275
276
|
<el-input-number v-model="questionForm.selectNum" :min="3" :max="10" :step-strictly="true" :step="1"
label="label"></el-input-number>
|
352c53cc
梁保满
上传word回传数据
|
277
278
|
</el-form-item>
<el-form-item label="单题分数:">
|
f45b3c05
LH_PC
云平台新UI界面
|
279
280
|
<el-input-number v-model="questionForm.score" :min="1" :max="200" :precision="2" :step="1"
label="label"></el-input-number>
|
352c53cc
梁保满
上传word回传数据
|
281
|
</el-form-item>
|
f45b3c05
LH_PC
云平台新UI界面
|
282
283
284
|
<el-form-item label="漏选得分:" v-if="questionForm.questionType == 3">
<el-input-number v-model="questionForm.partScore" :min="0" :max="questionForm.score" :precision="2"
:step="0.5" label="label"></el-input-number>
|
352c53cc
梁保满
上传word回传数据
|
285
|
</el-form-item>
|
f45b3c05
LH_PC
云平台新UI界面
|
286
|
<el-form-item label="设置答案:" v-show="questionForm.questionType != 5 &&
|
77fa942a
LH_PC
feat:修改打印对接
|
287
288
|
questionForm.questionType != 6
">
|
352c53cc
梁保满
上传word回传数据
|
289
290
|
<div class="qs-options">
<p class="ipt">
|
f45b3c05
LH_PC
云平台新UI界面
|
291
|
<el-input v-if="questionForm.questionType == 2 ||
|
77fa942a
LH_PC
feat:修改打印对接
|
292
293
294
295
296
297
298
|
questionForm.questionType == 3 ||
questionForm.questionType == 6
" ref="formAnsIpt2" v-model="questionForm.answerList" @keydown.native="
keydownAnswer($event, questionForm.questionType, 1)
" @input="
setAllAnswer($event, questionForm.questionType, 1)
"></el-input>
|
f45b3c05
LH_PC
云平台新UI界面
|
299
300
|
<el-input v-if="questionForm.questionType == 4" v-model="questionForm.answerList"
readonly=""></el-input>
|
352c53cc
梁保满
上传word回传数据
|
301
302
303
|
</p>
<p class="answer-box">
<template v-if="questionForm.questionType == 4">
|
f45b3c05
LH_PC
云平台新UI界面
|
304
|
<span class="answer-s active" @click="
|
77fa942a
LH_PC
feat:修改打印对接
|
305
306
307
308
|
questionForm.answerList.length < questionForm.number
? (questionForm.answerList += '✓')
: ''
">✓</span>
|
f45b3c05
LH_PC
云平台新UI界面
|
309
|
<span class="answer-s active" @click="
|
77fa942a
LH_PC
feat:修改打印对接
|
310
311
312
313
|
questionForm.answerList.length < questionForm.number
? (questionForm.answerList += '✗')
: ''
">✗</span>
|
352c53cc
梁保满
上传word回传数据
|
314
315
316
|
</template>
<template v-if="questionForm.questionType == 3">
<template v-for="(option, opIdx) in rightOptions">
|
f45b3c05
LH_PC
云平台新UI界面
|
317
318
|
<span v-if="opIdx < questionForm.selectNum" class="answer-s active" :key="option"
@click="setMultiple(questionForm, option, 1)">{{ option }}</span>
|
352c53cc
梁保满
上传word回传数据
|
319
|
</template>
|
f45b3c05
LH_PC
云平台新UI界面
|
320
|
<span class="answer-s active" @click="setMultiple(questionForm, ',', 1)">,</span>
|
77ebf04d
梁保满
个人版
|
321
|
</template>
|
f45b3c05
LH_PC
云平台新UI界面
|
322
|
<template v-if="questionForm.questionType == 2 ||
|
77fa942a
LH_PC
feat:修改打印对接
|
323
324
|
questionForm.questionType == 6
">
|
352c53cc
梁保满
上传word回传数据
|
325
|
<template v-for="(option, opIdx) in rightOptions">
|
f45b3c05
LH_PC
云平台新UI界面
|
326
|
<span v-if="opIdx < questionForm.selectNum" class="answer-s active" :key="option" @click="
|
77fa942a
LH_PC
feat:修改打印对接
|
327
328
329
330
331
|
questionForm.answerList.length <
questionForm.number
? (questionForm.answerList += option)
: ''
">{{ option }}</span>
|
352c53cc
梁保满
上传word回传数据
|
332
|
</template>
|
77ebf04d
梁保满
个人版
|
333
|
</template>
|
f45b3c05
LH_PC
云平台新UI界面
|
334
|
<span class="answer-s delButton" @click="
|
77fa942a
LH_PC
feat:修改打印对接
|
335
336
337
|
questionForm.answerList =
questionForm.answerList.slice(0, -1)
">x</span>
|
f45b3c05
LH_PC
云平台新UI界面
|
338
|
<span class="answer-s ac" @click="questionForm.answerList = ''">ac</span>
|
352c53cc
梁保满
上传word回传数据
|
339
340
341
342
343
344
345
346
347
348
349
350
|
</p>
</div>
</el-form-item>
</el-form>
</div>
<div class="dialog-footer" slot="footer">
<el-button type="primary" @click="addQuestion">确 定</el-button>
<el-button @click="addQuestionVisible = false">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
|
77ebf04d
梁保满
个人版
|
351
352
353
354
355
|
<div v-show="step == 2">
<div class="answer-title">
<p class="name">{{ form.title }}</p>
<p class="totals">卷面总分:{{ allScore }}分</p>
</div>
|
ead476dd
LH_PC
fix:最终定版
|
356
|
<div class="question-box flex-content" v-for="(question, index) in form.questionList" :key="index">
|
77ebf04d
梁保满
个人版
|
357
358
359
360
361
|
<p class="question-title">
<span>{{ setBigNum(index) }}、</span>
<span class="title-txt">{{ question.questionTitle }}</span>
<span class="m20">共:{{ setNums(question.subQuestions) }}题</span>
<span>共:{{ setScore(question) }} 分</span>
|
f45b3c05
LH_PC
云平台新UI界面
|
362
363
364
|
<el-popconfirm title="确定删除这道大题吗?" @confirm="form.questionList.splice(index, 1)">
<el-button slot="reference" class="delete" type="danger" size="mini" circle
icon="el-icon-delete"></el-button>
|
77da338a
梁保满
自测问题修改
|
365
|
</el-popconfirm>
|
77ebf04d
梁保满
个人版
|
366
367
368
369
370
371
372
373
|
</p>
<ul class="questions-ul">
<li 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>
|
b248db27
梁保满
课件模版区分,错别字修改,录分成功...
|
374
|
<div class="qs-upload" v-if="isUpload">题干</div>
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
375
|
<div class="qs-upload" v-if="isUpload">题目解析</div>
|
ef16e57e
LH_PC
fix:前端版本迭代
|
376
|
<div class="qs-upload">知识点</div>
|
8af7657f
梁保满
修改添加备题,组卷
|
377
|
<div class="qs-set">操作</div>
|
77ebf04d
梁保满
个人版
|
378
|
</li>
|
f45b3c05
LH_PC
云平台新UI界面
|
379
380
|
<li v-for="(subQuestions, indexs) in question.subQuestions" :key="indexs">
<p class="set-ans-btn" v-if="subQuestions.qusType &&
|
77fa942a
LH_PC
feat:修改打印对接
|
381
382
383
|
subQuestions.subNum &&
subQuestions.subNum > 4
">
|
f45b3c05
LH_PC
云平台新UI界面
|
384
|
<el-button type="primary" @click="setFormAns(indexs, index)">批量设置答案</el-button>
|
77ebf04d
梁保满
个人版
|
385
386
387
388
389
390
|
</p>
<div v-else class="sub-questions">
<div class="qs-num">
{{ setNum(index, indexs, subQuestions) }}
</div>
<div class="qs-type">
|
ead476dd
LH_PC
fix:最终定版
|
391
|
<el-select v-model="subQuestions.questionType" placeholder="选择题目类型"
|
77fa942a
LH_PC
feat:修改打印对接
|
392
393
394
395
|
@change="changeSubQuestions($event, subQuestions)">
<el-option v-for="options in questionOptions" :key="options.value" :label="options.label"
:value="options.value"></el-option>
</el-select>
|
77ebf04d
梁保满
个人版
|
396
397
|
</div>
<div class="qs-score">
|
f45b3c05
LH_PC
云平台新UI界面
|
398
399
|
<el-input-number class="number-ipt" size="medium" :min="1" :max="200" :precision="2"
v-model="subQuestions.score" label="单题分值"></el-input-number>
|
77ebf04d
梁保满
个人版
|
400
401
402
|
</div>
<div class="qs-partScore">
<p v-if="subQuestions.questionType != 3">--</p>
|
f45b3c05
LH_PC
云平台新UI界面
|
403
404
405
|
<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>
|
77ebf04d
梁保满
个人版
|
406
407
408
409
|
</div>
<div class="qs-options qs-options2">
<p v-if="subQuestions.questionType == 5">--</p>
<p v-if="subQuestions.questionType == 4" class="answer-box">
|
f45b3c05
LH_PC
云平台新UI界面
|
410
411
412
413
|
<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>
|
77ebf04d
梁保满
个人版
|
414
415
|
</p>
<p v-if="subQuestions.questionType == 3" class="answer-box">
|
f45b3c05
LH_PC
云平台新UI界面
|
416
|
<span class="answer-s" v-for="option in subQuestions.answerOptions.split(',')" :class="subQuestions.correctAnswer?.includes(option)
|
77fa942a
LH_PC
feat:修改打印对接
|
417
418
419
|
? 'active'
: ''
" :key="option" @click="changAnswer(subQuestions, option)">{{ option }}</span>
|
77ebf04d
梁保满
个人版
|
420
421
|
</p>
<p v-if="subQuestions.questionType == 2" class="answer-box">
|
f45b3c05
LH_PC
云平台新UI界面
|
422
|
<span class="answer-s" v-for="option in subQuestions.answerOptions.split(',')" :class="subQuestions.correctAnswer == option ? 'active' : ''
|
77fa942a
LH_PC
feat:修改打印对接
|
423
|
" :key="option" @click="subQuestions.correctAnswer = option">{{ option }}</span>
|
77ebf04d
梁保满
个人版
|
424
|
</p>
|
f45b3c05
LH_PC
云平台新UI界面
|
425
|
<p v-if="subQuestions.questionType == 3 ||
|
77fa942a
LH_PC
feat:修改打印对接
|
426
427
|
subQuestions.questionType == 2
" class="answer-box answer-box2">
|
f45b3c05
LH_PC
云平台新UI界面
|
428
429
430
431
|
<el-button size="mini" type="primary" icon="el-icon-plus" circle
@click="addOptions(subQuestions)"></el-button>
<el-button size="mini" type="primary" icon="el-icon-minus" round circle
@click="removeOptions(subQuestions)"></el-button>
|
ce278878
梁保满
2-2 bugfix
|
432
|
</p>
|
77ebf04d
梁保满
个人版
|
433
|
</div>
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
434
435
|
<template v-if="isUpload">
<div class="qs-upload">
|
f45b3c05
LH_PC
云平台新UI界面
|
436
437
|
<el-button slot="reference" class="icon-tickets" type="primary" circle size="mini"
icon="el-icon-tickets" @click="openStem(subQuestions, index, indexs, 1)"></el-button>
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
438
439
|
</div>
<div class="qs-upload">
|
f45b3c05
LH_PC
云平台新UI界面
|
440
441
|
<el-button slot="reference" class="icon-tickets" type="primary" circle size="mini"
icon="el-icon-tickets" @click="openStem(subQuestions, index, indexs, 2)"></el-button>
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
442
|
</div>
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
443
|
</template>
|
ef16e57e
LH_PC
fix:前端版本迭代
|
444
445
446
447
|
<div class="qs-upload">
<el-button type="primary" circle size="mini" icon="el-icon-price-tag"
@click="openKnowledge(subQuestions, index, indexs)"></el-button>
</div>
|
8af7657f
梁保满
修改添加备题,组卷
|
448
|
<div class="qs-set">
|
f45b3c05
LH_PC
云平台新UI界面
|
449
450
451
|
<el-popconfirm title="确定删除这道题吗?" @confirm="delTabData(indexs, index)">
<el-button slot="reference" class="delete" type="danger" size="mini" circle
icon="el-icon-delete"></el-button>
|
8af7657f
梁保满
修改添加备题,组卷
|
452
453
|
</el-popconfirm>
</div>
|
77ebf04d
梁保满
个人版
|
454
455
456
457
|
</div>
</li>
</ul>
</div>
|
f45b3c05
LH_PC
云平台新UI界面
|
458
459
|
<el-dialog :close-on-click-modal="false" title="批量设置答案" :visible.sync="diaSetAns" width="400"
:modal-append-to-body="false">
|
77ebf04d
梁保满
个人版
|
460
461
462
463
464
465
|
<div class="qs-options">
<p class="dia-tips">
请点击选项按钮设置答案,多选题题目之间用“,”隔开,若添加5道题:“AC,AD,BD,AC,CD”
</p>
<p>{{ setSubPro(formAns.qusType) }}:</p>
<p class="ipt">
|
f45b3c05
LH_PC
云平台新UI界面
|
466
467
468
469
|
<el-input v-if="formAns.qusType == 2 || formAns.qusType == 3" ref="formAnsIpt"
v-model="formAns.answerList" @keydown.native="keydownAnswer($event, formAns.qusType)"
@input="setAllAnswer($event, formAns.qusType)"></el-input>
<el-input v-if="formAns.qusType == 4" v-model="formAns.answerList" readonly=""></el-input>
|
77ebf04d
梁保满
个人版
|
470
471
472
|
</p>
<p class="answer-box">
<template v-if="formAns.qusType == 4">
|
f45b3c05
LH_PC
云平台新UI界面
|
473
|
<span class="answer-s active" @click="
|
77fa942a
LH_PC
feat:修改打印对接
|
474
475
476
477
|
formAns.answerList.length < formAns.subNum
? (formAns.answerList += '✓')
: ''
">✓</span>
|
f45b3c05
LH_PC
云平台新UI界面
|
478
|
<span class="answer-s active" @click="
|
77fa942a
LH_PC
feat:修改打印对接
|
479
480
481
482
|
formAns.answerList.length < formAns.subNum
? (formAns.answerList += '✗')
: ''
">✗</span>
|
77ebf04d
梁保满
个人版
|
483
484
|
</template>
<template v-if="formAns.qusType == 3">
|
f45b3c05
LH_PC
云平台新UI界面
|
485
486
487
|
<span class="answer-s active" v-for="option in formAns.answerOptions.split(',')" :key="option"
@click="setMultiple(formAns, option, 2)">{{ option }}</span>
<span class="answer-s active" @click="setMultiple(formAns, ',', 2)">,</span>
|
77ebf04d
梁保满
个人版
|
488
489
|
</template>
<template v-if="formAns.qusType == 2">
|
f45b3c05
LH_PC
云平台新UI界面
|
490
|
<span class="answer-s active" v-for="option in formAns.answerOptions.split(',')" :key="option" @click="
|
77fa942a
LH_PC
feat:修改打印对接
|
491
492
493
494
|
formAns.answerList.length < formAns.subNum
? (formAns.answerList += option)
: ''
">{{ option }}</span>
|
77ebf04d
梁保满
个人版
|
495
|
</template>
|
f45b3c05
LH_PC
云平台新UI界面
|
496
497
|
<span class="answer-s delButton" @click="formAns.answerList = formAns.answerList.slice(0, -1)">x</span>
<span class="answer-s ac" @click="formAns.answerList = ''">ac</span>
|
77ebf04d
梁保满
个人版
|
498
499
500
501
502
503
504
|
</p>
</div>
<div class="dialog-footer" slot="footer">
<el-button @click="saveFormAns">确 定</el-button>
<el-button @click="diaSetAns = false">取 消</el-button>
</div>
</el-dialog>
|
ef16e57e
LH_PC
fix:前端版本迭代
|
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
|
<div class="btn-box flex-btn" style="text-align: center; ">
<div style="display: inline-block;line-height: 45px;">
<label>请仔细核对
<label style="color:red;">“题型” </label>
和
<label style="color:red;">“答案”</label>
等是否识别正确
</label>
</div>
<div style="display: inline;;float: right">
<el-button type="danger" plain round @click="linkBack">取消</el-button>
<template v-if="!isUpload">
<el-button round @click="toStep(1)">上一步</el-button>
<el-button type="primary" round @click="save">保存</el-button>
</template>
<template v-else>
<el-button round @click="step = 0">上一步</el-button>
<el-button type="primary" round @click="toStep(3)">下一步</el-button>
</template>
|
ead476dd
LH_PC
fix:最终定版
|
524
|
</div>
|
8af7657f
梁保满
修改添加备题,组卷
|
525
526
|
</div>
</div>
|
b7739169
梁保满
组卷预览
|
527
|
<div v-if="step == 3">
|
8af7657f
梁保满
修改添加备题,组卷
|
528
529
|
<div class="answer-title">
<p class="name">{{ form.title }}</p>
|
b248db27
梁保满
课件模版区分,错别字修改,录分成功...
|
530
|
<p class="totals">卷面总分:{{ allScore }}分</p>
|
8af7657f
梁保满
修改添加备题,组卷
|
531
|
</div>
|
ead476dd
LH_PC
fix:最终定版
|
532
|
<div class="question-box flex-content">
|
8af7657f
梁保满
修改添加备题,组卷
|
533
|
<template v-for="(question, index) in form.questionList">
|
b248db27
梁保满
课件模版区分,错别字修改,录分成功...
|
534
535
536
|
<p class="question-title">
<span>{{ setBigNum(index) }}、</span>
<span class="title-txt">{{ question.questionTitle }}</span>
|
f45b3c05
LH_PC
云平台新UI界面
|
537
|
<span class="m20">共:{{ setNums(question.subQuestions) }}题</span>
|
b248db27
梁保满
课件模版区分,错别字修改,录分成功...
|
538
539
|
<span>共:{{ setScore(question) }} 分</span>
</p>
|
98dec083
梁保满
复制试卷问题,题干列表样式,题目解...
|
540
|
<div v-for="(subQuestions, indexs) in question.subQuestions">
|
f45b3c05
LH_PC
云平台新UI界面
|
541
542
|
<div class="screenshot-box" v-if="subQuestions.screenshot" :key="index + '-' + indexs">
<iframe class="screenshot" :src="subQuestions.screenshot"></iframe>
|
98dec083
梁保满
复制试卷问题,题干列表样式,题目解...
|
543
|
</div>
|
8af7657f
梁保满
修改添加备题,组卷
|
544
545
546
|
</div>
</template>
</div>
|
ef16e57e
LH_PC
fix:前端版本迭代
|
547
|
<div class="btn-box flex-btn">
|
f45b3c05
LH_PC
云平台新UI界面
|
548
|
<el-button type="danger" plain round @click="linkBack">取消</el-button>
|
8af7657f
梁保满
修改添加备题,组卷
|
549
|
<el-button round @click="toStep(2)">上一步</el-button>
|
77ebf04d
梁保满
个人版
|
550
551
552
|
<el-button type="primary" round @click="save">保存</el-button>
</div>
</div>
|
f45b3c05
LH_PC
云平台新UI界面
|
553
|
<el-dialog :close-on-click-modal="false" :title="stem.type == 1 ? '上传题干' : '上传题目解析'" :visible.sync="dialogStem"
|
6bca489d
LH_PC
云平台二期UI
|
554
|
v-if="dialogStem" width="800px" :append-to-body="true">
|
352c53cc
梁保满
上传word回传数据
|
555
|
<div class="upload-box">
|
ddcd75d7
梁保满
教师二次管理数据问题
|
556
557
|
<div v-loading="iframeLoading">
<template v-if="stem.type == 1">
|
f45b3c05
LH_PC
云平台新UI界面
|
558
559
|
<iframe ref="screenshot" class="screenshot" v-if="stem.screenshot" :src="stem.screenshot"
@load="iframeLoading = false"></iframe>
|
ddcd75d7
梁保满
教师二次管理数据问题
|
560
561
|
</template>
<template v-else="stem.type == 2">
|
f45b3c05
LH_PC
云平台新UI界面
|
562
563
|
<iframe ref="screenshot" class="screenshot" v-if="stem.answerScreenshot" :src="stem.answerScreenshot"
@load="iframeLoading = false"></iframe>
|
ddcd75d7
梁保满
教师二次管理数据问题
|
564
565
|
</template>
</div>
|
f45b3c05
LH_PC
云平台新UI界面
|
566
567
|
<el-upload class="upload-demo" :action="uploadUrl" :limit="1" :on-success="upSuccess" :on-error="upError"
accept="image/*">
|
ce278878
梁保满
2-2 bugfix
|
568
|
<el-button size="small" type="primary">选择照片</el-button>
|
352c53cc
梁保满
上传word回传数据
|
569
570
571
|
</el-upload>
</div>
<div slot="footer">
|
8af7657f
梁保满
修改添加备题,组卷
|
572
|
<el-button @click="dialogStem = false">确定</el-button>
|
352c53cc
梁保满
上传word回传数据
|
573
574
|
</div>
</el-dialog>
|
6bca489d
LH_PC
云平台二期UI
|
575
|
<el-dialog :close-on-click-modal="false" :append-to-body="true" title="知识点" :visible.sync="dialogKnowledge"
|
ef16e57e
LH_PC
fix:前端版本迭代
|
576
577
578
|
width="60%">
<knowledgePoints :key="dialogKnowledge" @opration="knowledgeOpration" :sectionName="stem.sectionName"
:subjectName="stem.subjectName" :knowledges="stem.knowledge" />
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
579
|
</el-dialog>
|
77ebf04d
梁保满
个人版
|
580
581
582
583
584
|
</div>
</div>
</template>
<script>
|
8af7657f
梁保满
修改添加备题,组卷
|
585
|
import { deepClone, checkAnswer, cNum } from "utils";
|
ef16e57e
LH_PC
fix:前端版本迭代
|
586
|
import conf from "@/config/index";
|
77ebf04d
梁保满
个人版
|
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
|
const questionForm = {
questionTitle: "",
questionType: 2,
number: 10,
selectNum: 4,
score: 1,
partScore: 0,
answerList: "",
};
const subQuesOptions = {
questionType: 2,
score: 1,
partScore: 0,
selectNum: 4,
answerOptions: "A,B,C,D",
correctAnswer: "",
};
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
604
|
import knowledgeList from "assets/js/knowledgeList.js";
|
77ebf04d
梁保满
个人版
|
605
606
607
608
609
|
export default {
computed: {
allScore: function () {
let score = 0;
this.form.questionList.map((item) => {
|
352c53cc
梁保满
上传word回传数据
|
610
|
score += item.subQuestions?.reduce((a, b) => {
|
77ebf04d
梁保满
个人版
|
611
612
613
614
615
|
return a + Number(b.score ? b.score : 0);
}, 0);
}, 0);
return Number(score).toFixed(2);
},
|
ef16e57e
LH_PC
fix:前端版本迭代
|
616
617
618
619
620
621
622
623
624
|
uploadUrl: function () {
var requestUrl = '';
var ogrinUrl = '/file/uploadImgToHtml';
var baseUrl = conf.baseURL;
if (baseUrl == '/' && ogrinUrl.indexOf('/') == 0) {
requestUrl = ogrinUrl;
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
625
|
}
|
ef16e57e
LH_PC
fix:前端版本迭代
|
626
627
628
629
630
631
|
else {
requestUrl = baseUrl + ogrinUrl
}
return requestUrl;
}
|
77ebf04d
梁保满
个人版
|
632
633
634
635
636
637
638
639
640
641
|
},
watch: {
step: function () {
this.$nextTick(function () {
this.$refs.content.scrollTop = 0;
});
},
},
data() {
return {
|
6bca489d
LH_PC
云平台二期UI
|
642
643
644
645
646
647
648
|
shareClass: [],
role: "",
checkedClass: [],
classSharingType: false,
gradeName: "",
isIndeterminate: false,
checkAll: false,
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
649
650
|
role: "",
step: 0, //步骤
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
651
|
gradeClassList: [], //年级-班级数据
|
77ebf04d
梁保满
个人版
|
652
653
654
655
656
657
658
659
660
661
662
|
gradeList: [], //年级
subjectList: [], //科目
answerTypeList: [], //测验类型
answerTypeName: "", //测验类型名称
form: {
//答题卡详情
title: "",
tagId: "",
subjectName: "",
examsDuration: 90,
questionList: [],
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
663
664
|
gradeName: "",
sharingType: 0,
|
77ebf04d
梁保满
个人版
|
665
666
667
668
669
670
671
|
},
formRules: {
//答题卡验证
title: [
{ required: true, message: "请输入答题卡名称", trigger: "blur" },
{
min: 1,
|
23659274
梁保满
备题接口对接
|
672
673
|
max: 50,
message: "长度在 1 到 50 个字符",
|
77ebf04d
梁保满
个人版
|
674
675
676
677
678
679
680
681
682
683
684
|
trigger: "blur",
},
],
subjectName: [
{ required: true, message: "请选择科目", trigger: "blur" },
],
examsDuration: [
{ required: true, message: "请设置考试时长", trigger: "blur" },
],
},
tagList: [],
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
685
|
diaSetAns: false, //答案开关
|
77ebf04d
梁保满
个人版
|
686
687
688
689
690
691
692
693
694
|
formAns: {
listIndex: 0, //大题位置
endIndex: 0, //相同题目最后一位题目的questionIndex
index: 0, //相同题目最后一位题目的位置
qusType: "", //题目类型
subNum: 0, //数量
answerOptions: [], //答案选项
answerList: "", //答案列表-字符串
},
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
|
type: 1, //1-创建,2-复制答题卡
dialogVisible: false, //测验类型设置弹窗
addQuestionVisible: false, //添加大题弹窗
questionForm: { ...questionForm },
questionFormRules: {
questionTitle: [
{ required: true, message: "请输入大题名称", trigger: "blur" },
{
min: 1,
max: 30,
message: "长度在 1 到 30 个字符",
trigger: "blur",
},
],
},
questionOptions: [
{ label: "单选题", value: 2 },
{ label: "多选题", value: 3 },
{ label: "判断题", value: 4 },
{ label: "主观题", value: 5 },
],
|
ec6394d1
梁保满
v1.3.1。细节调整
|
716
|
rightOptions: ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J"],
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
717
|
addSubQuestionsType: "",
|
352c53cc
梁保满
上传word回传数据
|
718
719
|
//v1.5
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
720
|
knowledgeList: { ...knowledgeList },
|
352c53cc
梁保满
上传word回传数据
|
721
722
|
isUpload: false,
dialogStem: false, //截图开关
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
723
|
dialogKnowledge: false, //知识点开关
|
352c53cc
梁保满
上传word回传数据
|
724
|
stem: {
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
725
|
type: 1,
|
352c53cc
梁保满
上传word回传数据
|
726
727
728
|
index: 0, //大题位置
indexs: 0, //小题位置
screenshot: "", //题干图片地址
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
729
730
|
answerScreenshot: "", //题目解析图片地址
knowledge: [], //知识点
|
352c53cc
梁保满
上传word回传数据
|
731
|
},
|
77da338a
梁保满
自测问题修改
|
732
733
734
735
|
//返回列表页参数记录
listType: 1,
listShare: 0,
|
ef16e57e
LH_PC
fix:前端版本迭代
|
736
|
// uploadUrl: "/file/uploadImgToHtml",
|
ddcd75d7
梁保满
教师二次管理数据问题
|
737
|
iframeLoading: false,
|
77ebf04d
梁保满
个人版
|
738
739
740
|
};
},
async created() {
|
77da338a
梁保满
自测问题修改
|
741
|
this.listType = this.$route.query.listType ? this.$route.query.listType : 1;
|
b0cd2598
梁保满
fix:测试问题
|
742
743
744
|
this.listShare = this.$route.query.listShare
? this.$route.query.listShare
: 0;
|
77ebf04d
梁保满
个人版
|
745
|
this.type = this.$route.query.type ? this.$route.query.type : 1;
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
746
747
748
749
750
751
752
753
754
|
this.role =
this.$store.getters.info.showRole ||
this.$store.getters.info.permissions[0].role;
if (this.role != "ROLE_PERSONAL") {
this.formRules.gradeName = [
{ required: true, message: "请选择年级", trigger: "blur" },
];
await this._GradeList();
}
|
b0cd2598
梁保满
fix:测试问题
|
755
|
this.isUpload = this.$route.query.isUpload || false;
|
352c53cc
梁保满
上传word回传数据
|
756
|
if (this.isUpload) {
|
b0cd2598
梁保满
fix:测试问题
|
757
758
759
760
761
762
763
764
|
let params =
(this.$route.query.params && JSON.parse(this.$route.query.params)) ||
null;
this.form.title = params?.name;
this.form.id = params?.id;
this.form.examsDuration = params?.examsDuration || 90;
this.form.sharingType = params?.sharingType || 0;
this.formatData(params);
|
352c53cc
梁保满
上传word回传数据
|
765
|
}
|
77ebf04d
梁保满
个人版
|
766
767
768
769
770
771
772
|
await this._QuerySubjectList(this.gradeList[0]);
await this._TypeList();
if (this.type == 2) {
this._QueryDetail();
}
},
methods: {
|
ef16e57e
LH_PC
fix:前端版本迭代
|
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
|
openKnowledge(obj, index, indexs) {
this.stem.index = index;
this.stem.indexs = indexs || 0;
this.stem.knowledge = obj.knowledge;
if (this.form.gradeName && this.form.subjectName) {
var matchClass = this.gradeClassList.find((item) => {
if (this.form.gradeName == item.gradeName) {
return item.sectionName;
}
});
this.stem.sectionName = matchClass?.sectionName ?? "";
this.stem.subjectName = this.form.subjectName ?? "";
}
this.dialogKnowledge = true;
},
knowledgeOpration(target) {
if (target.opration == 'confirm') {
this.form.questionList[this.stem.index].
subQuestions[this.stem.indexs].knowledge = target.knowledges.join(",");
this.dialogKnowledge = false;
}
else {
this.dialogKnowledge = false;
}
},
|
6bca489d
LH_PC
云平台二期UI
|
798
|
_checkedClass() {
|
ef16e57e
LH_PC
fix:前端版本迭代
|
799
|
this.checkedClass = this.shareClass.filter(item => item.isChecked).map(imap => imap.id);
|
6bca489d
LH_PC
云平台二期UI
|
800
801
802
|
this.classSharingType = false;
},
handleCheckAllChange(val) {
|
ef16e57e
LH_PC
fix:前端版本迭代
|
803
804
805
|
this.shareClass.forEach(item => {
item.isChecked = val;
})
|
6bca489d
LH_PC
云平台二期UI
|
806
807
808
|
this.isIndeterminate = false;
},
handleCheckedClassChange(value) {
|
ef16e57e
LH_PC
fix:前端版本迭代
|
809
|
var value = this.shareClass.filter(item => item.isChecked);
|
77fa942a
LH_PC
feat:修改打印对接
|
810
|
var checkedCount = value.length;
|
ef16e57e
LH_PC
fix:前端版本迭代
|
811
812
813
|
this.checkAll = checkedCount === this.shareClass.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.shareClass.length;
},
|
352c53cc
梁保满
上传word回传数据
|
814
815
|
// v1.5
//上传截图
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
816
|
openStem(obj, index, indexs, type) {
|
ddcd75d7
梁保满
教师二次管理数据问题
|
817
|
this.iframeLoading = true;
|
352c53cc
梁保满
上传word回传数据
|
818
819
|
this.stem.index = index;
this.stem.indexs = indexs;
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
820
821
|
this.stem.type = type;
if (type == 1) {
|
03cd547e
梁保满
单体型以及其他类型试卷修改答案逻辑
|
822
|
if (!obj.screenshot || obj.screenshot == "") {
|
ddcd75d7
梁保满
教师二次管理数据问题
|
823
824
|
this.iframeLoading = false;
}
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
825
826
827
|
this.stem.screenshot = obj.screenshot || "";
this.stem.answerScreenshot = "";
} else {
|
03cd547e
梁保满
单体型以及其他类型试卷修改答案逻辑
|
828
|
if (!obj.answerScreenshot || obj.answerScreenshot == "") {
|
ddcd75d7
梁保满
教师二次管理数据问题
|
829
830
|
this.iframeLoading = false;
}
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
831
832
833
834
|
this.stem.answerScreenshot = obj.answerScreenshot || "";
this.stem.screenshot = "";
}
|
352c53cc
梁保满
上传word回传数据
|
835
836
|
this.dialogStem = true;
},
|
cb6ceaa8
梁保满
添加备题,组卷参数调整
|
837
|
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
838
839
|
// 图片上传成功
upSuccess(res) {
|
352c53cc
梁保满
上传word回传数据
|
840
|
if (res && res.status == 0) {
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
841
842
|
if (this.stem.type == 1) {
this.stem.screenshot = res.data.url;
|
b0cd2598
梁保满
fix:测试问题
|
843
844
845
|
this.form.questionList[this.stem.index].subQuestions[
this.stem.indexs
].screenshot = this.stem.screenshot;
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
846
847
|
} else {
this.stem.answerScreenshot = res.data.url;
|
b0cd2598
梁保满
fix:测试问题
|
848
849
850
|
this.form.questionList[this.stem.index].subQuestions[
this.stem.indexs
].answerScreenshot = this.stem.answerScreenshot;
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
851
|
}
|
352c53cc
梁保满
上传word回传数据
|
852
853
854
855
856
|
this.$message.success("上传成功");
} else {
this.$message.error(res.info);
}
},
|
352c53cc
梁保满
上传word回传数据
|
857
858
859
|
upError(res) {
this.$message.error("上传失败");
},
|
352c53cc
梁保满
上传word回传数据
|
860
|
|
8af7657f
梁保满
修改添加备题,组卷
|
861
|
//取消创建
|
77ebf04d
梁保满
个人版
|
862
863
864
|
linkBack() {
this.$confirm(
(this.type == 2 ? "修改复制的" : "组建的") +
|
f45b3c05
LH_PC
云平台新UI界面
|
865
|
"答题卡未保存,确认退出吗?",
|
77ebf04d
梁保满
个人版
|
866
867
868
869
870
871
872
873
874
875
876
877
|
"提示",
{
confirmButtonText: "取消",
cancelButtonText: "确定",
confirmButtonClass: "el-button--danger1",
cancelButtonClass: "el-button--primary",
showClose: false,
roundButton: true,
center: true,
type: "warning",
}
)
|
f45b3c05
LH_PC
云平台新UI界面
|
878
|
.then(() => { })
|
77ebf04d
梁保满
个人版
|
879
|
.catch(() => {
|
6bca489d
LH_PC
云平台二期UI
|
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
|
if (location.href.indexOf('askPreparationQuestionsAdd') >= 1) {
this.$router.push({
path: "/askPreparationQuestions"
});
}
else if (location.href.indexOf('testPaperAdd') >= 1) {
this.$router.push({
path: "/testPaper"
});
}
else {
this.$router.push({
path: "/examinationPaper",
query: {
type: this.listType,
share: this.listShare,
},
});
}
|
77ebf04d
梁保满
个人版
|
899
900
|
});
},
|
8af7657f
梁保满
修改添加备题,组卷
|
901
|
//转换题型显示方式
|
77ebf04d
梁保满
个人版
|
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
|
setSubPro(type) {
let tit;
switch (type) {
case 2:
tit = "单选题";
break;
case 3:
tit = "多选题";
break;
case 4:
tit = "判断题";
break;
case 5:
tit = "主观题";
break;
}
return tit;
},
|
8af7657f
梁保满
修改添加备题,组卷
|
920
|
//计算题号
|
77ebf04d
梁保满
个人版
|
921
|
setNum(index, indexs, sub) {
|
b0cd2598
梁保满
fix:测试问题
|
922
923
|
let lengths = 0; //所在大题之前的所有小题数量
let subIndex = 0; //所在大题的位置
|
77ebf04d
梁保满
个人版
|
924
925
926
927
928
929
|
for (let i = 0; i < index; i++) {
let subArr = this.form.questionList[i].subQuestions.filter((item) => {
return !!item.questionType;
});
lengths += subArr.length;
}
|
77ebf04d
梁保满
个人版
|
930
931
932
933
934
935
936
|
for (let i = 0; i < indexs; i++) {
if (!!this.form.questionList[index].subQuestions[i].questionType) {
subIndex += 1;
}
}
return lengths + subIndex + 1;
},
|
8af7657f
梁保满
修改添加备题,组卷
|
937
|
//统计小题数量
|
77ebf04d
梁保满
个人版
|
938
939
|
setNums(ques) {
let lengths = 0;
|
b0cd2598
梁保满
fix:测试问题
|
940
941
942
943
|
let subArr =
ques?.filter((item) => {
return !!item.questionType;
}) || [];
|
77ebf04d
梁保满
个人版
|
944
945
946
|
lengths = subArr.length;
return lengths;
},
|
8af7657f
梁保满
修改添加备题,组卷
|
947
|
//转换中文大题题号
|
77ebf04d
梁保满
个人版
|
948
949
|
setBigNum(num) {
let txt = "";
|
b0cd2598
梁保满
fix:测试问题
|
950
|
let bigNum = [...cNum];
|
77ebf04d
梁保满
个人版
|
951
952
953
954
|
txt = bigNum[num];
return txt;
},
|
b31444fa
梁保满
复制归档答题卡后续流程
|
955
|
//切换题型清空答案
|
77ebf04d
梁保满
个人版
|
956
|
setQuestionForm(val) {
|
77ebf04d
梁保满
个人版
|
957
958
|
this.questionForm.answerList = "";
},
|
b31444fa
梁保满
复制归档答题卡后续流程
|
959
|
//减少题数设置答案
|
77ebf04d
梁保满
个人版
|
960
|
changeQesNum(val) {
|
77ebf04d
梁保满
个人版
|
961
962
963
964
965
966
967
968
969
|
if (
this.questionForm.questionType == 2 ||
this.questionForm.questionType == 4
) {
this.questionForm.answerList = this.questionForm.answerList.substring(
0,
val
);
} else {
|
77ebf04d
梁保满
个人版
|
970
971
972
973
974
975
|
this.questionForm.answerList = this.questionForm.answerList
.split(",")
.splice(0, val)
.join(",");
}
},
|
b31444fa
梁保满
复制归档答题卡后续流程
|
976
|
//初始化要修改的答案
|
77ebf04d
梁保满
个人版
|
977
|
setFormAns(indexs, index) {
|
77ebf04d
梁保满
个人版
|
978
979
|
this.formAns = { ...this.form.questionList[index].subQuestions[indexs] };
this.formAns.listIndex = index;
|
77ebf04d
梁保满
个人版
|
980
|
let answerList = "";
|
8af7657f
梁保满
修改添加备题,组卷
|
981
|
let startIndex = indexs - this.formAns.subNum; //批量设置大难开始位置
|
77ebf04d
梁保满
个人版
|
982
|
this.form.questionList[index].subQuestions.map((item, subIdx) => {
|
8af7657f
梁保满
修改添加备题,组卷
|
983
|
if (subIdx >= startIndex && subIdx < indexs) {
|
77ebf04d
梁保满
个人版
|
984
|
answerList += this.setAnswer(item.questionType, item.correctAnswer);
|
8af7657f
梁保满
修改添加备题,组卷
|
985
986
987
|
if (item.qusType == 3) {
answerList = answerList.slice(0, -1);
|
77ebf04d
梁保满
个人版
|
988
989
990
|
}
}
});
|
8af7657f
梁保满
修改添加备题,组卷
|
991
|
this.formAns.answerList = answerList;
|
77ebf04d
梁保满
个人版
|
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
|
this.diaSetAns = true;
},
insertTxtAndSetcursor(element, answerList, str) {
let startPos = element.selectionStart; // 获取光标开始的位置
if (startPos === undefined) {
// 如果没有光标位置 不操作
return answerList;
} else {
return {
text:
answerList.substring(0, startPos) +
str +
answerList.substring(startPos), // 将文本插入
startPos: startPos + str.length,
};
}
},
|
b31444fa
梁保满
复制归档答题卡后续流程
|
1010
|
//多选答案设置
|
77ebf04d
梁保满
个人版
|
1011
|
setMultiple(obj, answer, type) {
|
77ebf04d
梁保满
个人版
|
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
|
let elements =
type == 1
? this.$refs["formAnsIpt2"].$el.children[0]
: this.$refs["formAnsIpt"].$el.children[0];
let resault = this.insertTxtAndSetcursor(
elements,
obj.answerList || "",
answer
);
obj.answerList = resault.text;
let str = obj.answerList;
let str2;
if (!!obj.answerOptions) {
str2 = checkAnswer(
str,
3,
obj.answerOptions.split(",").length,
obj.subNum
);
} else {
str2 = checkAnswer(str, 3, obj.selectNum, obj.number);
}
obj.answerList = str2;
elements.focus();
elements.selectionStart = resault.startPos;
},
|
b31444fa
梁保满
复制归档答题卡后续流程
|
1038
|
//批量修改答案
|
77ebf04d
梁保满
个人版
|
1039
|
saveFormAns() {
|
77ebf04d
梁保满
个人版
|
1040
1041
1042
1043
1044
1045
|
let EndIndex;
let subNum = this.formAns.subNum - 1;
this.form.questionList[this.formAns.listIndex].subQuestions.some(
(item, index) => {
if (this.formAns.endIndex == item.questionIndex) {
EndIndex = index;
|
77ebf04d
梁保满
个人版
|
1046
|
}
|
b0cd2598
梁保满
fix:测试问题
|
1047
|
return this.formAns.endIndex == item.questionIndex;
|
77ebf04d
梁保满
个人版
|
1048
1049
|
}
);
|
77ebf04d
梁保满
个人版
|
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
|
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] == "✗"
|
f45b3c05
LH_PC
云平台新UI界面
|
1061
1062
|
? 2
: "";
|
77ebf04d
梁保满
个人版
|
1063
1064
1065
1066
1067
1068
1069
1070
|
}
this.form.questionList[this.formAns.listIndex].subQuestions[
EndIndex - i
].correctAnswer = correctAnswer;
}
this.diaSetAns = false;
},
keydownAnswer(event, type, isAddBig) {
|
ec6394d1
梁保满
v1.3.1。细节调整
|
1071
1072
|
let answerA = "ABCDEFGHIJ";
let answer_a = "abcdefghij";
|
77ebf04d
梁保满
个人版
|
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
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
|
if (isAddBig) {
answerA = answerA.substring(0, this.questionForm.selectNum);
answer_a = answer_a.substring(0, this.questionForm.selectNum);
} else {
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, isAddBig) {
if (isAddBig) {
let str = this.questionForm.answerList;
let str2 = checkAnswer(
str,
type,
this.questionForm.selectNum,
this.questionForm.number
);
this.questionForm.answerList = str2;
} else {
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;
},
|
8af7657f
梁保满
修改添加备题,组卷
|
1134
1135
|
toStep(step) {
if (step == 2) {
|
b0cd2598
梁保满
fix:测试问题
|
1136
|
this.setStep2();
|
8af7657f
梁保满
修改添加备题,组卷
|
1137
1138
1139
1140
|
} else {
this.formatQuestionList();
this.step = step;
}
|
77ebf04d
梁保满
个人版
|
1141
1142
|
},
setStep1() {
|
b31444fa
梁保满
复制归档答题卡后续流程
|
1143
1144
1145
1146
|
if (this.subjectList.length == 0) {
this.$message.warning("暂无绑定年级信息,请先联系管理员设置。");
return;
}
|
77ebf04d
梁保满
个人版
|
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
|
this.$refs["forms"].validate((valid) => {
// 验证通过:保存
if (valid) {
this.step = 1;
} else {
this.$message.error("数据有误,请检查!");
return false;
}
});
},
setStep2() {
if (!this.form.questionList.length) {
this.$message.warning("请添加题目!");
return;
|
b0cd2598
梁保满
fix:测试问题
|
1161
1162
|
}
this.formatQuestionList();
|
77ebf04d
梁保满
个人版
|
1163
1164
1165
|
//添加题目ID、序号
this.form.questionList.map((item, index) => {
item.questionType = 0;
|
352c53cc
梁保满
上传word回传数据
|
1166
|
item.subQuestions?.map((items, indexs) => {
|
77ebf04d
梁保满
个人版
|
1167
1168
1169
1170
1171
|
items.questionId = this.setNum(index, indexs);
items.questionIndex = this.setNum(index, indexs);
});
});
//整理问题
|
b0cd2598
梁保满
fix:测试问题
|
1172
|
this.formateQuestion();
|
8af7657f
梁保满
修改添加备题,组卷
|
1173
1174
1175
1176
|
this.step = 2;
return;
},
formateQuestion() {
|
b0cd2598
梁保满
fix:测试问题
|
1177
|
this.formatQuestionList();
|
77ebf04d
梁保满
个人版
|
1178
1179
|
this.form.questionList?.map((item) => {
let types = [{}];
|
509f152d
梁保满
参数命名修改
|
1180
|
let addIndex = 0;
|
352c53cc
梁保满
上传word回传数据
|
1181
|
item.subQuestions?.map((sub, index) => {
|
77ebf04d
梁保满
个人版
|
1182
1183
|
if (!!sub.questionType) {
if (
|
509f152d
梁保满
参数命名修改
|
1184
|
sub.questionType == types[addIndex].qusType &&
|
77ebf04d
梁保满
个人版
|
1185
1186
1187
|
sub.questionType != 5
) {
//同类型批量答案+1
|
509f152d
梁保满
参数命名修改
|
1188
|
types[addIndex].subNum += 1;
|
77ebf04d
梁保满
个人版
|
1189
|
if (
|
509f152d
梁保满
参数命名修改
|
1190
|
types[addIndex].answerOptions.length < sub.answerOptions.length
|
77ebf04d
梁保满
个人版
|
1191
|
) {
|
509f152d
梁保满
参数命名修改
|
1192
|
types[addIndex].answerOptions = sub.answerOptions;
|
77ebf04d
梁保满
个人版
|
1193
1194
|
}
|
509f152d
梁保满
参数命名修改
|
1195
|
// types[addIndex].answerList += this.setAnswer(
|
77ebf04d
梁保满
个人版
|
1196
1197
1198
|
// sub.questionType,
// sub.correctAnswer
// );
|
509f152d
梁保满
参数命名修改
|
1199
|
types[addIndex].answerList = "";
|
77ebf04d
梁保满
个人版
|
1200
1201
|
if (index == item.subQuestions.length - 1) {
//循环最后类型数量大于等于5,保存批量答案
|
509f152d
梁保满
参数命名修改
|
1202
1203
1204
|
if (types[addIndex].subNum && types[addIndex].subNum >= 5) {
types[addIndex].endIndex = sub.questionIndex;
types[addIndex].index = index;
|
77ebf04d
梁保满
个人版
|
1205
1206
1207
|
}
}
} else {
|
509f152d
梁保满
参数命名修改
|
1208
|
if (types[addIndex].subNum && types[addIndex].subNum >= 5) {
|
77ebf04d
梁保满
个人版
|
1209
|
//不同类型时如果原有类型数量大于等于5,保存批量答案
|
509f152d
梁保满
参数命名修改
|
1210
|
types[addIndex].endIndex =
|
77ebf04d
梁保满
个人版
|
1211
|
item.subQuestions[index - 1].questionIndex;
|
509f152d
梁保满
参数命名修改
|
1212
1213
1214
|
types[addIndex].index = index - 1;
addIndex += 1;
types[addIndex] = {};
|
77ebf04d
梁保满
个人版
|
1215
1216
|
}
//不同类型初始化批量答案
|
509f152d
梁保满
参数命名修改
|
1217
1218
1219
1220
|
types[addIndex].qusType = sub.questionType;
types[addIndex].subNum = 1;
types[addIndex].answerOptions = sub.answerOptions;
types[addIndex].answerList = "";
|
77ebf04d
梁保满
个人版
|
1221
1222
1223
1224
1225
|
}
}
});
for (let i = 0; i < types.length; i++) {
if (types[i].subNum >= 5) {
|
352c53cc
梁保满
上传word回传数据
|
1226
|
item.subQuestions?.splice(
|
77ebf04d
梁保满
个人版
|
1227
1228
1229
1230
1231
1232
|
types[i].index + i + 1,
0,
deepClone(types[i])
);
}
}
|
77ebf04d
梁保满
个人版
|
1233
|
});
|
77ebf04d
梁保满
个人版
|
1234
|
},
|
8af7657f
梁保满
修改添加备题,组卷
|
1235
|
|
b31444fa
梁保满
复制归档答题卡后续流程
|
1236
|
//删除批量操作数据
|
77ebf04d
梁保满
个人版
|
1237
|
formatQuestionList() {
|
77ebf04d
梁保满
个人版
|
1238
1239
1240
|
for (let i = 0; i < this.form.questionList.length; i++) {
for (
let j = 0;
|
352c53cc
梁保满
上传word回传数据
|
1241
|
j < this.form.questionList[i].subQuestions?.length;
|
77ebf04d
梁保满
个人版
|
1242
1243
|
j++
) {
|
352c53cc
梁保满
上传word回传数据
|
1244
1245
|
if (this.form.questionList[i].subQuestions[j]?.qusType) {
this.form.questionList[i].subQuestions?.splice(j, 1);
|
77ebf04d
梁保满
个人版
|
1246
1247
1248
|
}
}
}
|
77ebf04d
梁保满
个人版
|
1249
|
},
|
6bca489d
LH_PC
云平台二期UI
|
1250
1251
1252
1253
|
async _selectClassSharingType() {
this.classSharingType = true;
|
ef16e57e
LH_PC
fix:前端版本迭代
|
1254
1255
|
this.shareClass = [];
|
6bca489d
LH_PC
云平台二期UI
|
1256
1257
|
var grade = this.gradeClassList.find(item => item.gradeName == this.form.gradeName);
|
ef16e57e
LH_PC
fix:前端版本迭代
|
1258
|
var classResponse = await this.$request.tClassGrade(grade?.grade, this.form.subjectName);
|
6bca489d
LH_PC
云平台二期UI
|
1259
1260
1261
|
if (classResponse.status != 0) {
this.$message.error(classResponse.info);
|
ef16e57e
LH_PC
fix:前端版本迭代
|
1262
|
return;
|
6bca489d
LH_PC
云平台二期UI
|
1263
|
}
|
ef16e57e
LH_PC
fix:前端版本迭代
|
1264
|
|
6bca489d
LH_PC
云平台二期UI
|
1265
|
this.gradeName = grade.gradeName;
|
6bca489d
LH_PC
云平台二期UI
|
1266
|
|
ef16e57e
LH_PC
fix:前端版本迭代
|
1267
1268
1269
1270
1271
1272
|
this.shareClass = [...classResponse.data.map(item => {
return {
isChecked: this.checkedClass.includes(item.id),
id: item.id,
className: item.className
}
|
77fa942a
LH_PC
feat:修改打印对接
|
1273
|
})];
|
574f1a90
LH_PC
fix:修改年级组长/任课老师缺少...
|
1274
|
|
77fa942a
LH_PC
feat:修改打印对接
|
1275
|
this.checkAll = this.checkedClass.length == this.shareClass.length;
|
6bca489d
LH_PC
云平台二期UI
|
1276
|
},
|
77ebf04d
梁保满
个人版
|
1277
1278
1279
1280
|
openQuestion() {
this.questionForm = { ...questionForm };
this.addQuestionVisible = true;
},
|
b31444fa
梁保满
复制归档答题卡后续流程
|
1281
|
//添加大题
|
77ebf04d
梁保满
个人版
|
1282
|
addQuestion() {
|
77ebf04d
梁保满
个人版
|
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
|
let subQuestions = [];
let questionsOptions = {
...subQuesOptions,
selectNum: this.questionForm.selectNum,
score: this.questionForm.score,
partScore: this.questionForm.partScore,
questionType:
this.questionForm.questionType == 6
? 2
: this.questionForm.questionType,
};
switch (questionsOptions.questionType) {
case 2:
questionsOptions.answerOptions = this.rightOptions
.slice(0, questionsOptions.selectNum)
.join(",");
break;
case 3:
questionsOptions.answerOptions = this.rightOptions
.slice(0, questionsOptions.selectNum)
.join(",");
break;
case 4:
questionsOptions.selectNum = 0;
questionsOptions.answerOptions = "1,2";
break;
case 5:
questionsOptions.selectNum = 0;
break;
}
for (let i = 0; i < this.questionForm.number; i++) {
let answer = "";
if (questionsOptions.questionType == 4) {
answer =
this.questionForm.answerList[i] == "✓"
? 1
: this.questionForm.answerList[i] == "✗"
|
f45b3c05
LH_PC
云平台新UI界面
|
1320
1321
|
? 2
: "";
|
77ebf04d
梁保满
个人版
|
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
|
} else if (questionsOptions.questionType == 3) {
answer = this.questionForm.answerList.split(",")[i] || "";
} else if (questionsOptions.questionType == 2) {
answer = this.questionForm.answerList[i] || "";
}
questionsOptions.correctAnswer = answer;
subQuestions.push({ ...questionsOptions });
}
this.form.questionList.push({
questionTitle: this.questionForm.questionTitle,
number: this.questionForm.number,
source: 10,
subQuestions: [...subQuestions],
show: false,
});
this.addQuestionVisible = false;
},
|
b31444fa
梁保满
复制归档答题卡后续流程
|
1339
|
//删除小题
|
77ebf04d
梁保满
个人版
|
1340
|
delTabData(subIndex, index) {
|
77ebf04d
梁保满
个人版
|
1341
|
this.form.questionList[index].subQuestions.splice(subIndex, 1);
|
384a2a54
梁保满
请求头添加班主任信息,bug修改
|
1342
|
if (this.form.questionList[index].subQuestions.length == 0) {
|
b0cd2598
梁保满
fix:测试问题
|
1343
|
this.form.questionList.splice(index, 1);
|
77da338a
梁保满
自测问题修改
|
1344
|
}
|
b0cd2598
梁保满
fix:测试问题
|
1345
|
this.formateQuestion();
|
77ebf04d
梁保满
个人版
|
1346
1347
|
},
setScore(question) {
|
352c53cc
梁保满
上传word回传数据
|
1348
|
let score = question.subQuestions?.reduce((a, b) => {
|
77ebf04d
梁保满
个人版
|
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
|
return a + (b.score ? b.score : 0);
}, 0);
return Number(score).toFixed(2);
},
changeAddSubQuestions(val, question) {
if (val) {
let questionsOptions = {
...subQuesOptions,
questionType: val,
};
switch (questionsOptions.questionType) {
case 2:
questionsOptions.answerOptions = this.rightOptions
.slice(0, questionsOptions.selectNum)
.join(",");
break;
case 3:
questionsOptions.answerOptions = this.rightOptions
.slice(0, questionsOptions.selectNum)
.join(",");
questionsOptions.partScore = 0;
break;
case 4:
questionsOptions.selectNum = 0;
questionsOptions.answerOptions = "1,2";
break;
case 5:
questionsOptions.selectNum = 0;
break;
}
|
b0cd2598
梁保满
fix:测试问题
|
1379
1380
1381
|
question.subQuestions
? question.subQuestions.push(questionsOptions)
: (question.subQuestions = [questionsOptions]);
|
77ebf04d
梁保满
个人版
|
1382
1383
1384
|
this.addSubQuestionsType = "";
}
},
|
b31444fa
梁保满
复制归档答题卡后续流程
|
1385
|
//切换多题型-小题题型
|
77ebf04d
梁保满
个人版
|
1386
|
changeSubQuestions(val, subQuestions) {
|
77ebf04d
梁保满
个人版
|
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
|
const that = this;
subQuestions.score = 1;
subQuestions.partScore = 0;
subQuestions.correctAnswer = "";
subQuestions.selectNum = 4;
switch (val) {
case 2:
subQuestions.answerOptions = that.rightOptions
.slice(0, subQuestions.selectNum)
.join(",");
break;
case 3:
subQuestions.answerOptions = that.rightOptions
.slice(0, subQuestions.selectNum)
.join(",");
break;
case 4:
subQuestions.selectNum = 0;
subQuestions.answerOptions = "1,2";
break;
case 5:
subQuestions.selectNum = 0;
break;
}
|
b0cd2598
梁保满
fix:测试问题
|
1411
|
this.formateQuestion();
|
77ebf04d
梁保满
个人版
|
1412
|
},
|
b31444fa
梁保满
复制归档答题卡后续流程
|
1413
|
//添加选项
|
77ebf04d
梁保满
个人版
|
1414
|
addOptions(subQuestions) {
|
77ebf04d
梁保满
个人版
|
1415
|
let length = subQuestions.answerOptions.split(",").length;
|
ec6394d1
梁保满
v1.3.1。细节调整
|
1416
|
if (length > 9) return;
|
77ebf04d
梁保满
个人版
|
1417
1418
1419
1420
1421
|
subQuestions.selectNum = length + 1;
subQuestions.answerOptions = this.rightOptions
.slice(0, subQuestions.selectNum)
.join(",");
},
|
b31444fa
梁保满
复制归档答题卡后续流程
|
1422
|
//删除选项
|
77ebf04d
梁保满
个人版
|
1423
|
removeOptions(subQuestions) {
|
77ebf04d
梁保满
个人版
|
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
|
let length = subQuestions.answerOptions.split(",").length;
if (length < 3) return;
subQuestions.selectNum = length - 1;
subQuestions.answerOptions = this.rightOptions
.slice(0, subQuestions.selectNum)
.join(",");
subQuestions.correctAnswer = subQuestions.correctAnswer.slice(
0,
subQuestions.selectNum
);
},
|
b31444fa
梁保满
复制归档答题卡后续流程
|
1435
|
//设置多选答案
|
77ebf04d
梁保满
个人版
|
1436
|
changAnswer(sub, option) {
|
77ebf04d
梁保满
个人版
|
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
|
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("");
}
},
openTagDia() {
this.tagList = deepClone(this.answerTypeList);
this.dialogVisible = true;
},
async editTypeName(obj) {
let isRepeat = false;
this.answerTypeList.map((item) => {
if (item.typeName == obj.typeName) {
isRepeat = true;
}
});
if (isRepeat) {
this.$message.error("类型已存在请重新填写!");
return;
}
//修改测验类型
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
1462
1463
1464
1465
1466
|
let editPaperType =
this.role == "ROLE_PERSONAL"
? this.$request.pModifyPaperType
: this.$request.editPaperType;
const { data, status, info } = await editPaperType({
|
77ebf04d
梁保满
个人版
|
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
|
tagId: obj.id,
tag: obj.typeName,
});
if (status == 0) {
await this._TypeList();
this.tagList = deepClone(this.answerTypeList);
this.$message.success("修改成功");
} else {
this.$message.error(info);
}
},
async removeTypeName(obj) {
//删除测验类型
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
1480
1481
1482
1483
1484
|
let delPaperType =
this.role == "ROLE_PERSONAL"
? this.$request.pDelPaperType
: this.$request.delPaperType;
const { data, status, info } = await delPaperType({
|
77ebf04d
梁保满
个人版
|
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
|
tagId: obj.id,
});
if (status == 0) {
await this._TypeList();
this.tagList = deepClone(this.answerTypeList);
this.$message.success("删除成功");
} else {
this.$message.error(info);
}
},
|
77fa942a
LH_PC
feat:修改打印对接
|
1495
|
async addPaperType(type) {
|
77ebf04d
梁保满
个人版
|
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
|
//保存测验类型
if (!this.answerTypeName) {
this.$message.error("请填写测验名称!");
return;
}
let isRepeat = false;
this.answerTypeList.map((item) => {
if (item.typeName == this.answerTypeName) {
isRepeat = true;
}
});
if (isRepeat) {
this.$message.error("类型已存在请重新填写!");
return;
}
//添加测验类型
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
1512
1513
1514
1515
1516
|
let addPaperType =
this.role == "ROLE_PERSONAL"
? this.$request.pAddPaperType
: this.$request.addPaperType;
const { data, status, info } = await addPaperType({
|
77ebf04d
梁保满
个人版
|
1517
1518
1519
1520
1521
|
tag: this.answerTypeName,
});
if (status == 0) {
await this._TypeList();
this.tagList = deepClone(this.answerTypeList);
|
77ebf04d
梁保满
个人版
|
1522
|
this.answerTypeName = "";
|
77fa942a
LH_PC
feat:修改打印对接
|
1523
1524
1525
1526
|
if (type != -1) {
this.form.tagId = data || "";
this.$message.success("添加成功");
}
|
77ebf04d
梁保满
个人版
|
1527
1528
1529
1530
1531
1532
|
} else {
this.$message.error(info);
}
},
async save() {
if (this.saveLoading) return;
|
ef16e57e
LH_PC
fix:前端版本迭代
|
1533
|
|
77ebf04d
梁保满
个人版
|
1534
|
this.saveLoading = true;
|
ef16e57e
LH_PC
fix:前端版本迭代
|
1535
|
|
77ebf04d
梁保满
个人版
|
1536
|
this.formatQuestionList();
|
ef16e57e
LH_PC
fix:前端版本迭代
|
1537
|
|
77ebf04d
梁保满
个人版
|
1538
|
let formDatas = deepClone(this.form);
|
ef16e57e
LH_PC
fix:前端版本迭代
|
1539
|
|
6bca489d
LH_PC
云平台二期UI
|
1540
1541
1542
|
formDatas.questionList = formDatas.questionList.filter(item => {
return item.subQuestions?.length >= 1;
});
|
ef16e57e
LH_PC
fix:前端版本迭代
|
1543
|
|
77ebf04d
梁保满
个人版
|
1544
1545
|
for (let i = 0; i < formDatas.questionList.length; i++) {
delete formDatas.questionList[i].show;
|
77ebf04d
梁保满
个人版
|
1546
|
}
|
ef16e57e
LH_PC
fix:前端版本迭代
|
1547
|
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
1548
1549
1550
1551
|
let addPaper =
this.role == "ROLE_PERSONAL"
? this.$request.pAddPaper
: this.$request.addPaper;
|
6bca489d
LH_PC
云平台二期UI
|
1552
1553
|
formDatas.classIds = this.checkedClass.join(",");
|
ef16e57e
LH_PC
fix:前端版本迭代
|
1554
|
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
1555
|
const { data, status, info } = await addPaper({
|
77ebf04d
梁保满
个人版
|
1556
1557
1558
1559
|
...formDatas,
});
this.saveLoading = false;
if (status == 0) {
|
f45b3c05
LH_PC
云平台新UI界面
|
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
|
if (location.href.indexOf('askPreparationQuestionsAdd') >= 1) {
this.$router.push({
path: "/askPreparationQuestions"
});
}
else if (location.href.indexOf('testPaperAdd') >= 1) {
this.$router.push({
path: "/testPaper"
});
}
else {
this.$router.push({
path: "/examinationPaper",
query: {
type: this.listType,
share: this.listShare,
},
});
}
|
77ebf04d
梁保满
个人版
|
1579
1580
1581
1582
|
} else {
this.$message.error(info);
}
},
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
1583
1584
1585
1586
|
async changeGrade() {
//切换年级查询科目
this._QuerySubjectList(this.form.gradeName);
},
|
77ebf04d
梁保满
个人版
|
1587
1588
|
async _TypeList() {
//测验类型查询
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
1589
1590
1591
1592
1593
|
let fetchTypeNames =
this.role == "ROLE_PERSONAL"
? this.$request.pPaperTagList
: this.$request.fetchTypeNames;
const { data, status, info } = await fetchTypeNames({
|
77ebf04d
梁保满
个人版
|
1594
1595
1596
|
type: 1,
});
if (status == 0) {
|
77fa942a
LH_PC
feat:修改打印对接
|
1597
|
var hasWrongType = false;
|
77ebf04d
梁保满
个人版
|
1598
1599
|
this.answerTypeList =
data.list?.map((item) => {
|
77fa942a
LH_PC
feat:修改打印对接
|
1600
1601
1602
|
if (item.tag == '错题复习') {
hasWrongType = true;
}
|
77ebf04d
梁保满
个人版
|
1603
1604
1605
1606
1607
|
return {
typeName: item.tag,
id: item.tagId,
};
}) || [];
|
77fa942a
LH_PC
feat:修改打印对接
|
1608
1609
1610
1611
|
if (!hasWrongType) {
this.answerTypeName = "错题复习";
await this.addPaperType(-1);
}
|
696f2d42
梁保满
fix:报表导出问题
|
1612
1613
1614
|
// if (this.type != 2) {
// this.form.tagId = this.answerTypeList[0]?.id || "";
// }
|
77ebf04d
梁保满
个人版
|
1615
1616
1617
1618
|
} else {
this.$message.error(info);
}
},
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
1619
1620
|
async _GradeList() {
//查询年级列表
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
1621
1622
1623
1624
1625
1626
1627
1628
1629
|
// const { data, status, info } = await this.$request.fetchGradeList();
// 查找班级
let fetchClassList =
this.role == "ROLE_PERSONAL"
? this.$request.pClassList
: this.$request.fetchClassList;
const { data, status, info } = await fetchClassList();
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
1630
|
if (status == 0) {
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
1631
|
this.gradeClassList = data.list?.map((item) => {
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
1632
|
if (!this.gradeList.includes(item.gradeName)) {
|
b0cd2598
梁保满
fix:测试问题
|
1633
|
this.gradeList.push(item.gradeName);
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
1634
|
}
|
b0cd2598
梁保满
fix:测试问题
|
1635
1636
|
return item;
});
|
3ca58022
梁保满
修改添加组卷题目解析,知识点梳理等
|
1637
|
// this.gradeList = (data.gradeNames && [...data.gradeNames]) || [];
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
1638
1639
1640
1641
1642
1643
1644
1645
|
if (this.type != 2) {
this.form.gradeName = this.gradeList[0];
}
} else {
this.$message.error(info);
}
},
async _QuerySubjectList(grade) {
|
77ebf04d
梁保满
个人版
|
1646
|
//查询科目列表
|
23659274
梁保满
备题接口对接
|
1647
|
if (!grade) {
|
b31444fa
梁保满
复制归档答题卡后续流程
|
1648
1649
|
return;
}
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
1650
1651
1652
1653
1654
1655
1656
1657
1658
|
let query = {};
let fetchSubjectList =
this.role == "ROLE_PERSONAL"
? this.$request.pSubjectList
: this.$request.fetchSubjectList;
if (this.role != "ROLE_PERSONAL") {
query.gradeName = grade;
}
const { data, status, info } = await fetchSubjectList({ ...query });
|
77ebf04d
梁保满
个人版
|
1659
|
if (status === 0) {
|
b0cd2598
梁保满
fix:测试问题
|
1660
|
let subjectArr = [];
|
77ebf04d
梁保满
个人版
|
1661
1662
|
this.subjectList =
data.subjectNames?.map((item) => {
|
03cd547e
梁保满
单体型以及其他类型试卷修改答案逻辑
|
1663
1664
1665
|
let subName =
this.role == "ROLE_PERSONAL" ? item.subjectName : item;
subjectArr.push(subName);
|
77ebf04d
梁保满
个人版
|
1666
|
return {
|
03cd547e
梁保满
单体型以及其他类型试卷修改答案逻辑
|
1667
1668
|
value: subName,
label: subName,
|
77ebf04d
梁保满
个人版
|
1669
1670
|
};
}) || [];
|
77ebf04d
梁保满
个人版
|
1671
|
if (this.subjectList.length) {
|
ce278878
梁保满
2-2 bugfix
|
1672
1673
1674
1675
1676
|
if (subjectArr.includes(this.$route.query.subjectName)) {
this.form.subjectName = this.$route.query.subjectName;
} else {
this.form.subjectName = this.subjectList[0].value;
}
|
77ebf04d
梁保满
个人版
|
1677
|
}
|
77ebf04d
梁保满
个人版
|
1678
1679
1680
1681
1682
|
} else {
this.$message.error(info);
}
},
async _QueryDetail() {
|
03bce046
梁保满
个人版调整
|
1683
|
//查询答题卡详情
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
1684
1685
1686
1687
1688
|
let fetchPaperDetail =
this.role == "ROLE_PERSONAL"
? this.$request.pPaperDetail
: this.$request.fetchPaperDetail;
const { data, status, info } = await fetchPaperDetail({
|
77ebf04d
梁保满
个人版
|
1689
1690
1691
1692
|
paperId: this.$route.query.paperId,
});
if (status == 0) {
this.form.title = data.title + "_副本";
|
77da338a
梁保满
自测问题修改
|
1693
|
|
8af7657f
梁保满
修改添加备题,组卷
|
1694
1695
1696
1697
|
this.form.examsDuration = data.examsDuration;
if (this.role != "ROLE_PERSONAL") {
this.form.sharingType = data.sharingType;
}
|
ce278878
梁保满
2-2 bugfix
|
1698
|
this.form.tagId = "";
|
b0cd2598
梁保满
fix:测试问题
|
1699
|
this.formatData(data);
|
352c53cc
梁保满
上传word回传数据
|
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
|
} else {
this.$message.error(info);
}
},
formatData(data) {
if (this.subjectList.length) {
this.subjectList.map((item) => {
if (item.label == data.subjectName) {
this.form.subjectName = item.value;
}
});
} else {
this.form.subjectName = "";
}
|
8af7657f
梁保满
修改添加备题,组卷
|
1715
|
|
352c53cc
梁保满
上传word回传数据
|
1716
|
if (this.role != "ROLE_PERSONAL") {
|
352c53cc
梁保满
上传word回传数据
|
1717
1718
1719
1720
|
if (this.gradeList.length) {
this.gradeList.map((item) => {
if (item == data.gradeName) {
this.form.gradeName = data.gradeName;
|
47a01cb6
梁保满
v1.3测试问题
|
1721
1722
1723
|
}
});
} else {
|
352c53cc
梁保满
上传word回传数据
|
1724
|
this.form.gradeName = "";
|
47a01cb6
梁保满
v1.3测试问题
|
1725
|
}
|
77ebf04d
梁保满
个人版
|
1726
|
}
|
352c53cc
梁保满
上传word回传数据
|
1727
1728
1729
1730
|
this.form.questionList = data.questionList?.map((item) => {
let subQuestions =
item.subQuestions?.map((items) => {
return {
|
cb6ceaa8
梁保满
添加备题,组卷参数调整
|
1731
|
...items,
|
23659274
梁保满
备题接口对接
|
1732
|
selectNum: items.answerOptions?.split(",").length,
|
352c53cc
梁保满
上传word回传数据
|
1733
|
answerOptions: items.answerOptions || "A,B,C,D",
|
352c53cc
梁保满
上传word回传数据
|
1734
|
screenshot: items.screenshot || "",
|
cb6ceaa8
梁保满
添加备题,组卷参数调整
|
1735
1736
|
correctAnswer: items.correctAnswer || "",
knowledge: items.knowledge || "",
|
352c53cc
梁保满
上传word回传数据
|
1737
1738
1739
1740
1741
1742
1743
1744
|
};
}) || [];
return {
questionTitle: item.questionTitle,
subQuestions: subQuestions,
show: false,
};
});
|
b0cd2598
梁保满
fix:测试问题
|
1745
|
},
|
77ebf04d
梁保满
个人版
|
1746
1747
1748
|
},
};
</script>
|
2f5cbe11
梁保满
上传题目解析高度调整
|
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
|
<style>
.screenshot-box {
width: 600px;
}
.screenshot {
width: 100%;
box-shadow: none;
border: none;
height: 400px;
}
.screenshot-img {
display: block;
width: auto;
max-width: 100%;
margin: 0 auto;
margin-bottom: 10px;
}
</style>
|
77ebf04d
梁保满
个人版
|
1769
1770
1771
1772
|
<style lang="scss" scoped>
.red {
color: #f30;
}
|
352c53cc
梁保满
上传word回传数据
|
1773
|
|
77ebf04d
梁保满
个人版
|
1774
1775
|
.qs-options {
flex: 1;
|
352c53cc
梁保满
上传word回传数据
|
1776
|
|
77ebf04d
梁保满
个人版
|
1777
1778
1779
|
.ipt {
margin-bottom: 5px;
}
|
352c53cc
梁保满
上传word回传数据
|
1780
|
|
77ebf04d
梁保满
个人版
|
1781
1782
1783
1784
|
.answer-box {
.answer-s {
cursor: pointer;
user-select: none;
|
ec6394d1
梁保满
v1.3.1。细节调整
|
1785
|
margin-bottom: 10px;
|
352c53cc
梁保满
上传word回传数据
|
1786
|
|
77ebf04d
梁保满
个人版
|
1787
1788
1789
1790
1791
|
&:first-of-type {
margin-left: 0;
}
}
}
|
352c53cc
梁保满
上传word回传数据
|
1792
|
|
ec6394d1
梁保满
v1.3.1。细节调整
|
1793
1794
1795
|
.answer-box2 {
margin-bottom: 10px;
}
|
352c53cc
梁保满
上传word回传数据
|
1796
|
|
77ebf04d
梁保满
个人版
|
1797
1798
1799
|
.delButton {
text-indent: -9999999px;
border-color: #ff6868;
|
e371f2dc
梁保满
软件下载,学校,班级老师等报表导入...
|
1800
|
background: #ff6868 url("../../assets/images/arrow.png") no-repeat center;
|
77ebf04d
梁保满
个人版
|
1801
1802
1803
|
background-size: 19px;
color: transparent;
}
|
352c53cc
梁保满
上传word回传数据
|
1804
|
|
77ebf04d
梁保满
个人版
|
1805
1806
1807
|
.answer-s.ac {
border: none;
}
|
352c53cc
梁保满
上传word回传数据
|
1808
|
|
77ebf04d
梁保满
个人版
|
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
|
.ac {
border-color: #ff6868;
background: #ff6868;
color: #fff !important;
}
}
.sel2 {
width: 480px;
}
|
352c53cc
梁保满
上传word回传数据
|
1819
|
|
77ebf04d
梁保满
个人版
|
1820
1821
1822
1823
1824
1825
1826
|
.set-ans-btn {
width: 100%;
padding: 10px 0 10px 630px;
box-sizing: border-box;
border-right: 1px solid #e2e2e2;
border-bottom: 1px solid #e2e2e2;
}
|
352c53cc
梁保满
上传word回传数据
|
1827
|
|
77ebf04d
梁保满
个人版
|
1828
1829
1830
1831
1832
|
.content-box {
width: 100%;
height: 100%;
overflow-y: auto;
}
|
352c53cc
梁保满
上传word回传数据
|
1833
|
|
77ebf04d
梁保满
个人版
|
1834
1835
1836
1837
|
.content {
width: 100%;
box-sizing: border-box;
padding: 0 24px;
|
352c53cc
梁保满
上传word回传数据
|
1838
|
|
77ebf04d
梁保满
个人版
|
1839
1840
1841
|
.ml-20 {
margin-left: 20px;
}
|
352c53cc
梁保满
上传word回传数据
|
1842
|
|
77ebf04d
梁保满
个人版
|
1843
1844
1845
1846
1847
|
.btn-box {
text-align: right;
margin-left: 140px;
}
}
|
352c53cc
梁保满
上传word回传数据
|
1848
|
|
77ebf04d
梁保满
个人版
|
1849
1850
1851
1852
1853
1854
1855
|
.dia-content {
.dia-tit {
font-size: 20px;
color: #333;
font-weight: 700;
text-align: center;
}
|
352c53cc
梁保满
上传word回传数据
|
1856
|
|
77ebf04d
梁保满
个人版
|
1857
1858
1859
|
.add-type {
width: 100%;
margin-bottom: 10px;
|
352c53cc
梁保满
上传word回传数据
|
1860
|
|
77ebf04d
梁保满
个人版
|
1861
1862
1863
1864
1865
|
.js-set {
margin: 2.5px 10px 0 0;
font-size: 14px;
}
}
|
352c53cc
梁保满
上传word回传数据
|
1866
|
|
77ebf04d
梁保满
个人版
|
1867
1868
1869
1870
|
.add-btn {
margin-left: 20px;
}
}
|
352c53cc
梁保满
上传word回传数据
|
1871
|
|
77ebf04d
梁保满
个人版
|
1872
1873
1874
1875
1876
|
.el-message-box {
:deep(.el-button--default) {
color: #fff;
}
}
|
352c53cc
梁保满
上传word回传数据
|
1877
|
|
77ebf04d
梁保满
个人版
|
1878
1879
1880
1881
|
.add-box {
display: flex;
justify-content: center;
align-items: center;
|
352c53cc
梁保满
上传word回传数据
|
1882
|
|
77ebf04d
梁保满
个人版
|
1883
1884
1885
1886
1887
1888
1889
1890
|
.add-question {
display: flex;
justify-content: center;
align-items: center;
font-size: 16px;
font-weight: bolder;
padding: 2px;
cursor: pointer;
|
352c53cc
梁保满
上传word回传数据
|
1891
|
|
77ebf04d
梁保满
个人版
|
1892
1893
1894
|
.s1 {
margin-left: 6px;
}
|
352c53cc
梁保满
上传word回传数据
|
1895
|
|
77ebf04d
梁保满
个人版
|
1896
1897
1898
1899
|
:deep(.el-icon-plus) {
font-size: 24px;
font-weight: 900;
}
|
352c53cc
梁保满
上传word回传数据
|
1900
|
|
77ebf04d
梁保满
个人版
|
1901
1902
1903
1904
1905
|
:deep(.el-button--mini.is-circle) {
padding: 3px;
}
}
}
|
352c53cc
梁保满
上传word回传数据
|
1906
|
|
77ebf04d
梁保满
个人版
|
1907
1908
|
.dialog-footer {
text-align: center;
|
352c53cc
梁保满
上传word回传数据
|
1909
|
|
77ebf04d
梁保满
个人版
|
1910
1911
1912
1913
1914
1915
|
:deep(.el-button) {
border-radius: 20px;
padding: 8px 20px 7px;
margin: 0 12px;
}
}
|
352c53cc
梁保满
上传word回传数据
|
1916
|
|
77ebf04d
梁保满
个人版
|
1917
1918
|
.question-box {
margin-bottom: 20px;
|
8af7657f
梁保满
修改添加备题,组卷
|
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
|
.screenshot-box {
width: 100%;
border: 1px solid #e2e2e2;
margin-bottom: 20px;
.screenshot-img {
margin: 0;
}
}
|
77ebf04d
梁保满
个人版
|
1929
|
}
|
352c53cc
梁保满
上传word回传数据
|
1930
|
|
77ebf04d
梁保满
个人版
|
1931
1932
1933
1934
1935
|
.question-title {
line-height: 40px;
display: flex;
align-items: center;
margin-bottom: 12px;
|
352c53cc
梁保满
上传word回传数据
|
1936
|
|
77ebf04d
梁保满
个人版
|
1937
1938
1939
|
.m20 {
margin: 0 20px;
}
|
352c53cc
梁保满
上传word回传数据
|
1940
|
|
77ebf04d
梁保满
个人版
|
1941
1942
1943
|
.ipt {
width: 300px;
margin: 0 16px 0 10px;
|
352c53cc
梁保满
上传word回传数据
|
1944
|
|
77ebf04d
梁保满
个人版
|
1945
1946
1947
1948
1949
1950
|
:deep(.el-input__inner) {
border-radius: 20px;
border-color: #667ffd;
background: rgba($color: #667ffd, $alpha: 0.05);
}
}
|
352c53cc
梁保满
上传word回传数据
|
1951
|
|
77ebf04d
梁保满
个人版
|
1952
|
.delete {
|
384a2a54
梁保满
请求头添加班主任信息,bug修改
|
1953
|
margin: 0 8px;
|
77ebf04d
梁保满
个人版
|
1954
|
}
|
352c53cc
梁保满
上传word回传数据
|
1955
|
|
77ebf04d
梁保满
个人版
|
1956
1957
1958
1959
1960
|
.title-txt {
margin-right: 20px;
font-size: 16px;
font-weight: 700;
}
|
352c53cc
梁保满
上传word回传数据
|
1961
|
|
77ebf04d
梁保满
个人版
|
1962
1963
1964
1965
1966
1967
|
.el-icon-caret-right {
font-size: 24px;
color: #888;
transition: all 0.4s;
margin-right: 12px;
cursor: pointer;
|
352c53cc
梁保满
上传word回传数据
|
1968
|
|
77ebf04d
梁保满
个人版
|
1969
1970
1971
1972
1973
|
&.active {
transform: rotate(90deg);
}
}
}
|
352c53cc
梁保满
上传word回传数据
|
1974
|
|
77ebf04d
梁保满
个人版
|
1975
1976
1977
1978
|
.questions-ul {
border-left: 1px solid #e2e2e2;
border-top: 1px solid #e2e2e2;
}
|
352c53cc
梁保满
上传word回传数据
|
1979
|
|
77ebf04d
梁保满
个人版
|
1980
1981
1982
|
.el-input-number {
width: 140px;
}
|
352c53cc
梁保满
上传word回传数据
|
1983
|
|
77ebf04d
梁保满
个人版
|
1984
1985
1986
1987
1988
1989
|
.answer-title {
text-align: center;
font-size: 20px;
color: #333;
font-weight: 700;
padding-bottom: 20px;
|
352c53cc
梁保满
上传word回传数据
|
1990
|
|
77ebf04d
梁保满
个人版
|
1991
1992
1993
1994
1995
1996
|
.totals {
font-size: 16px;
color: #888;
font-weight: normal;
}
}
|
352c53cc
梁保满
上传word回传数据
|
1997
|
|
77ebf04d
梁保满
个人版
|
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
|
.answer-box {
.answer-s {
display: inline-block;
width: 30px;
height: 30px;
border: 1px solid #e2e2e2;
border-radius: 3px;
margin: 0 6px;
font-size: 16px;
color: #333;
text-align: center;
line-height: 30px;
|
352c53cc
梁保满
上传word回传数据
|
2010
|
|
77ebf04d
梁保满
个人版
|
2011
2012
2013
2014
2015
2016
2017
|
&.active {
background: #5e78fa;
border-color: #5e78fa;
color: #fff;
}
}
}
|
352c53cc
梁保满
上传word回传数据
|
2018
|
|
77ebf04d
梁保满
个人版
|
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
|
.qs-options {
.answer-s {
display: inline-block;
width: 30px;
height: 30px;
border: 1px solid #e2e2e2;
border-radius: 3px;
margin: 0 6px;
font-size: 16px;
color: #333;
text-align: center;
line-height: 30px;
cursor: pointer;
|
352c53cc
梁保满
上传word回传数据
|
2032
|
|
77ebf04d
梁保满
个人版
|
2033
2034
2035
2036
2037
2038
2039
|
&.active {
background: #5e78fa;
border-color: #5e78fa;
color: #fff;
}
}
}
|
352c53cc
梁保满
上传word回传数据
|
2040
|
|
77ebf04d
梁保满
个人版
|
2041
2042
2043
2044
|
.sub-questions {
width: 100%;
display: flex;
border-bottom: 1px solid #e2e2e2;
|
352c53cc
梁保满
上传word回传数据
|
2045
|
|
f45b3c05
LH_PC
云平台新UI界面
|
2046
|
&>div {
|
77ebf04d
梁保满
个人版
|
2047
2048
2049
2050
2051
2052
2053
2054
|
min-height: 40px;
padding: 5px;
flex-shrink: 0;
border-right: 1px solid #e2e2e2;
display: flex;
justify-content: center;
align-items: center;
}
|
352c53cc
梁保满
上传word回传数据
|
2055
|
|
77ebf04d
梁保满
个人版
|
2056
2057
2058
|
.qs-num {
width: 70px;
}
|
352c53cc
梁保满
上传word回传数据
|
2059
|
|
77ebf04d
梁保满
个人版
|
2060
2061
2062
|
.qs-type {
width: 160px;
}
|
352c53cc
梁保满
上传word回传数据
|
2063
|
|
77ebf04d
梁保满
个人版
|
2064
2065
2066
2067
|
.qs-score,
.qs-partScore {
width: 160px;
}
|
352c53cc
梁保满
上传word回传数据
|
2068
|
|
77ebf04d
梁保满
个人版
|
2069
2070
2071
|
.qs-options {
flex: 1;
}
|
352c53cc
梁保满
上传word回传数据
|
2072
|
|
8af7657f
梁保满
修改添加备题,组卷
|
2073
2074
2075
2076
|
.qs-upload {
width: 60px;
}
|
77ebf04d
梁保满
个人版
|
2077
|
.qs-set {
|
ec6394d1
梁保满
v1.3.1。细节调整
|
2078
|
width: 60px;
|
77ebf04d
梁保满
个人版
|
2079
|
}
|
352c53cc
梁保满
上传word回传数据
|
2080
|
|
77ebf04d
梁保满
个人版
|
2081
2082
2083
2084
|
.qs-options2 {
text-align: left;
justify-content: flex-start;
padding-left: 20px;
|
352c53cc
梁保满
上传word回传数据
|
2085
|
|
77ebf04d
梁保满
个人版
|
2086
2087
2088
2089
|
.answer-s {
cursor: pointer;
}
}
|
352c53cc
梁保满
上传word回传数据
|
2090
|
|
77ebf04d
梁保满
个人版
|
2091
2092
2093
2094
2095
2096
2097
2098
2099
|
: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);
}
|
352c53cc
梁保满
上传word回传数据
|
2100
|
|
77ebf04d
梁保满
个人版
|
2101
2102
2103
2104
2105
|
.el-input__icon {
line-height: 32px;
}
}
}
|
8af7657f
梁保满
修改添加备题,组卷
|
2106
2107
2108
2109
2110
|
.upload-box {
.upload-demo {
text-align: center;
}
|
f45b3c05
LH_PC
云平台新UI界面
|
2111
|
|
b0cd2598
梁保满
fix:测试问题
|
2112
2113
|
.screenshot {
width: 100%;
|
8af7657f
梁保满
修改添加备题,组卷
|
2114
2115
|
}
}
|
77ebf04d
梁保满
个人版
|
2116
|
</style>
|