Blame view

src/views/examinationPaper/addAsk.vue 42 KB
4c4f7640   梁保满   路由表,路由前端文件
1
  <template>
ca39cc52   阿宝   飞书问题处理
2
    <div ref="content" class="content-box">
13b58a42   梁保满   备题组卷部分前端页面基本完成
3
4
      <back-box>
        <template slot="title">
8af7657f   梁保满   修改添加备题,组卷
5
          <span>导入课件</span>
13b58a42   梁保满   备题组卷部分前端页面基本完成
6
7
8
        </template>
      </back-box>
      <div class="content">
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
9
        <el-steps :active="step" finish-status="success" simple style="margin: 20px 0">
13b58a42   梁保满   备题组卷部分前端页面基本完成
10
11
          <el-step title="基础信息" icon="el-icon-edit"></el-step>
          <el-step title="题目编辑" icon="el-icon-tickets"></el-step>
8af7657f   梁保满   修改添加备题,组卷
12
          <el-step title="课件预览" icon="el-icon-edit-outline"></el-step>
13b58a42   梁保满   备题组卷部分前端页面基本完成
13
14
        </el-steps>
        <div v-show="step == 0">
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
15
          <el-form ref="forms" :model="form" :rules="formRules" label-width="140px">
8af7657f   梁保满   修改添加备题,组卷
16
            <el-form-item label="课件名称:" prop="title">
23659274   梁保满   备题接口对接
17
              <el-input class="sel2" type="text" placeholder="请输入答题卡名称" v-model.trim="form.title" maxlength="50" size="45"
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
18
                show-word-limit>
ca39cc52   阿宝   飞书问题处理
19
              </el-input>
13b58a42   梁保满   备题组卷部分前端页面基本完成
20
            </el-form-item>
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
21
22
23
            <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">
13b58a42   梁保满   备题组卷部分前端页面基本完成
24
25
26
                </el-option>
              </el-select>
            </el-form-item>
ee6e7628   梁保满   备题组卷借口数据对接调整
27
28
            <el-form-item label="科目:" prop="subjectName">
              <el-select class="sel" v-model="form.subjectName" placeholder="">
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
29
30
                <el-option v-for="item in subjectList" :key="item.value" :label="item.label" :value="item.value">{{
                  item.label }}
13b58a42   梁保满   备题组卷部分前端页面基本完成
31
32
33
                </el-option>
              </el-select>
            </el-form-item>
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
34
            <el-form-item v-if="role != 'ROLE_PERSONAL'" label="分享范围:" prop="sharingType">
ee6e7628   梁保满   备题组卷借口数据对接调整
35
              <el-radio-group v-model="form.sharingType">
f356590c   阿宝   即时测列表,分析页面
36
37
                <el-radio :label="0">任课班级分享</el-radio>
                <el-radio :label="1">全年级分享</el-radio>
13b58a42   梁保满   备题组卷部分前端页面基本完成
38
39
40
41
              </el-radio-group>
            </el-form-item>
          </el-form>
          <div class="btn-box">
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
42
            <el-button type="danger" plain round @click="linkBack">取消</el-button>
13b58a42   梁保满   备题组卷部分前端页面基本完成
43
44
            <el-button type="primary" round @click="setStep1">下一步</el-button>
          </div>
13b58a42   梁保满   备题组卷部分前端页面基本完成
45
46
        </div>
        <div v-show="step == 1">
f26ecfa4   阿宝   测试bug
47
48
          <div class="answer-title">
            <p class="name">{{ form.title }}</p>
f26ecfa4   阿宝   测试bug
49
          </div>
8af7657f   梁保满   修改添加备题,组卷
50
          <div class="question-box">
f5729396   梁保满   批量设置答案
51
52
53
54
55
56
57
            <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>
8af7657f   梁保满   修改添加备题,组卷
58
                <div class="qs-upload">提干</div>
cb6ceaa8   梁保满   添加备题,组卷参数调整
59
                <div class="qs-upload">题目解析</div>
23659274   梁保满   备题接口对接
60
61
                <div class="qs-upload" v-if="knowledgeData.length">知识点</div>
                <div class="qs-set">操作</div>
f5729396   梁保满   批量设置答案
62
              </li>
f5729396   梁保满   批量设置答案
63
            </ul>
c6f2a550   梁保满   创建备题组卷,修改备题
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
            <template v-for="(question, index) in form.questionList">
              <ul class="questions-ul">
                <li 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>
                  </p>
                  <div v-else class="sub-questions">
                    <div class="qs-num">
                      {{ setNum(index, indexs, subQuestions) }}
                    </div>
                    <div class="qs-type">
                      <el-select v-model="subQuestions.questionType" placeholder="选择题目类型"
                        @change="changeSubQuestions($event, subQuestions)">
384a2a54   梁保满   请求头添加班主任信息,bug修改
80
                        <el-option v-for="options in questionOptions" :key="options.value" :label="options.label"
c6f2a550   梁保满   创建备题组卷,修改备题
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
                          :value="options.value"></el-option>
                      </el-select>
                    </div>
                    <div class="qs-score">
                      <el-input-number class="number-ipt" size="medium" :min="1" :max="200" :precision="2"
                        v-model="subQuestions.score" label="单题分值"></el-input-number>
                    </div>
                    <div class="qs-partScore">
                      <p v-if="subQuestions.questionType != 3">--</p>
                      <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>
                    </div>
                    <div class="qs-options qs-options2">
                      <p v-if="subQuestions.questionType == 5">--</p>
                      <p v-if="subQuestions.questionType == 4" class="answer-box">
                        <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>
                      </p>
                      <p v-if="subQuestions.questionType == 3" class="answer-box">
                        <span class="answer-s" v-for="option in subQuestions.answerOptions.split(',')" :class="subQuestions.correctAnswer?.includes(option)
                          ? 'active'
                          : ''
                          " :key="option" @click="changAnswer(subQuestions, option)">{{ option }}</span>
                      </p>
                      <p v-if="subQuestions.questionType == 2" class="answer-box">
                        <span class="answer-s" v-for="option in subQuestions.answerOptions.split(',')" :class="subQuestions.correctAnswer == option ? 'active' : ''
                          " :key="option" @click="subQuestions.correctAnswer = option">{{ option }}</span>
                      </p>
77da338a   梁保满   自测问题修改
112
113
114
115
116
117
118
119
                      <p v-if="subQuestions.questionType == 3 ||
                        subQuestions.questionType == 2
                        " class="answer-box answer-box2">
                        <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>
                      </p>
c6f2a550   梁保满   创建备题组卷,修改备题
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
                    </div>
  
                    <div class="qs-upload">
                      <el-popover placement="right" width="600" trigger="click">
                        <div class="screenshot-box">
                          <iframe class="screenshot"
                            v-if="subQuestions.screenshot && subQuestions.screenshot.includes('html')"
                            :src="subQuestions.screenshot"></iframe>
                          <img class="screenshot screenshot-img"
                            v-if="subQuestions.screenshot && !subQuestions.screenshot.includes('html')"
                            :src="subQuestions.screenshot" alt="">
                          <p style="textAlign:center"><el-button type="primary" round size="mini" icon="el-icon-upload"
                              @click="openStem(subQuestions, index, indexs, 1)">{{ subQuestions.answerScreenshot ? "重新选择图片"
                                : "上传题干" }}</el-button>
                          </p>
                        </div>
                        <el-button slot="reference" class="icon-tickets" type="primary" circle size="mini"
                          icon="el-icon-tickets"></el-button>
                      </el-popover>
                    </div>
                    <div class="qs-upload">
                      <el-popover placement="right" width="600" trigger="click">
                        <div class="screenshot-box">
                          <iframe class="screenshot"
                            v-if="subQuestions.answerScreenshot && subQuestions.answerScreenshot.includes('html')"
                            :src="subQuestions.answerScreenshot"></iframe>
                          <img class="screenshot screenshot-img"
                            v-if="subQuestions.answerScreenshot && !subQuestions.answerScreenshot.includes('html')"
                            :src="subQuestions.answerScreenshot" alt="">
                          <p style="textAlign:center"><el-button type="primary" round size="mini" icon="el-icon-upload"
                              @click="openStem(subQuestions, index, indexs, 2)">{{ subQuestions.answerScreenshot ? "重新选择图片"
                                : "上传题目解析" }}</el-button>
                          </p>
                        </div>
                        <el-button slot="reference" class="icon-tickets" type="primary" circle size="mini"
                          icon="el-icon-tickets"></el-button>
                      </el-popover>
                    </div>
                    <div class="qs-upload" v-if="knowledgeData.length">
                      <el-button type="primary" circle size="mini" icon="el-icon-price-tag"
                        @click="openKnowledge(subQuestions, index, indexs)"></el-button>
                    </div>
                    <div class="qs-set">
                      <el-popconfirm title="确定删除这道题吗?" @confirm="delTabData(indexs, index)">
                        <el-button slot="reference" class="delete" type="danger" size="mini" circle
                          icon="el-icon-delete"></el-button>
                      </el-popconfirm>
                    </div>
                  </div>
                </li>
              </ul>
            </template>
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
172
          </div>
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
173
174
          <el-dialog :close-on-click-modal="false" title="批量设置答案" :visible.sync="diaSetAns" width="400"
            :modal-append-to-body="false">
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
175
176
177
178
179
180
            <div class="qs-options">
              <p class="dia-tips">
                请点击选项按钮设置答案,多选题题目之间用“,”隔开,若添加5道题:“AC,AD,BD,AC,CD”
              </p>
              <p>{{ setSubPro(formAns.qusType) }}:</p>
              <p class="ipt">
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
181
                <el-input v-if="formAns.qusType == 2 || formAns.qusType == 3" ref="formAnsIpt" v-model="formAns.answerList"
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
182
                  @keydown.native="keydownAnswer($event, formAns.qusType)"
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
183
184
                  @input="setAllAnswer($event, formAns.qusType)"></el-input>
                <el-input v-if="formAns.qusType == 4" v-model="formAns.answerList" readonly=""></el-input>
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
185
186
187
              </p>
              <p class="answer-box">
                <template v-if="formAns.qusType == 4">
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
188
189
190
191
192
193
194
195
196
197
                  <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>
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
198
199
                </template>
                <template v-if="formAns.qusType == 3">
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
200
201
202
                  <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>
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
203
                </template>
21dfdeae   梁保满   平台管理员
204
                <template v-if="formAns.qusType == 2">
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
205
206
207
208
209
                  <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>
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
210
                </template>
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
211
212
                <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>
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
213
214
215
216
217
218
219
              </p>
            </div>
            <div class="dialog-footer" slot="footer">
              <el-button @click="saveFormAns">确 定</el-button>
              <el-button @click="diaSetAns = false">取 消</el-button>
            </div>
          </el-dialog>
13b58a42   梁保满   备题组卷部分前端页面基本完成
220
          <div class="btn-box">
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
221
            <el-button type="danger" plain round @click="linkBack">取消</el-button>
8af7657f   梁保满   修改添加备题,组卷
222
223
            <el-button round @click="step = 0">上一步</el-button>
            <el-button type="primary" round @click="toStep(2)">下一步</el-button>
13b58a42   梁保满   备题组卷部分前端页面基本完成
224
          </div>
cb6ceaa8   梁保满   添加备题,组卷参数调整
225
226
          <el-dialog :close-on-click-modal="false" :title="stem.type == 1 ? '上传题干' : '上传题目解析'" :visible.sync="dialogStem"
            v-if="dialogStem" width="500">
8af7657f   梁保满   修改添加备题,组卷
227
            <div class="upload-box">
cb6ceaa8   梁保满   添加备题,组卷参数调整
228
229
230
231
232
233
234
              <template v-show="stem.type == 1">
                <img v-if="stem.screenshot && !stem.screenshot.includes('html')" :src="stem.screenshot" class="stem-pic" />
              </template>
              <template v-show="stem.type == 2">
                <img v-if="stem.answerScreenshot && !stem.answerScreenshot.includes('html')" :src="stem.answerScreenshot"
                  class="stem-pic" />
              </template>
8af7657f   梁保满   修改添加备题,组卷
235
236
              <el-upload class="upload-demo" action="http://121.40.127.171/file/uploadImg" :limit="1"
                :on-success="upSuccess" :on-error="upError" accept="image/*">
cb6ceaa8   梁保满   添加备题,组卷参数调整
237
                <el-button v-show="stem.type == 1" size="small" type="primary">{{
8af7657f   梁保满   修改添加备题,组卷
238
239
                  stem.screenshot && !stem.screenshot.includes('html') ? "重新上传" : "选择照片"
                }}</el-button>
cb6ceaa8   梁保满   添加备题,组卷参数调整
240
241
242
                <el-button v-show="stem.type == 2" size="small" type="primary">{{
                  stem.answerScreenshot && !stem.answerScreenshot.includes('html') ? "重新上传" : "选择照片"
                }}</el-button>
8af7657f   梁保满   修改添加备题,组卷
243
244
245
246
247
248
              </el-upload>
            </div>
            <div slot="footer">
              <el-button @click="dialogStem = false">确定</el-button>
            </div>
          </el-dialog>
cb6ceaa8   梁保满   添加备题,组卷参数调整
249
250
251
252
253
254
255
256
257
258
259
260
261
262
          <el-dialog :close-on-click-modal="false" title="知识点" :visible.sync="dialogKnowledge" width="500">
            <div>
              <el-form ref="form" :model="stem" label-width="160px">
                <el-form-item label="知识点:">
                  <el-cascader size="small" filterable :show-all-levels="false" collapse clearable placeholder="选择知识点"
                    v-model="stem.knowledge" :options="knowledgeData" :props="{ expandTrigger: 'hover' }"></el-cascader>
                </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>
13b58a42   梁保满   备题组卷部分前端页面基本完成
263
        </div>
8af7657f   梁保满   修改添加备题,组卷
264
265
266
        <div v-show="step == 2">
          <div class="answer-title">
            <p class="name">{{ form.title }}</p>
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
267
          </div>
8af7657f   梁保满   修改添加备题,组卷
268
          <div class="question-box">
c6f2a550   梁保满   创建备题组卷,修改备题
269
270
271
272
273
274
275
276
277
            <template v-for="question in form.questionList">
              <div class="screenshot-box" v-for="subQuestions in question.subQuestions">
                <iframe class="screenshot" v-if="subQuestions.screenshot && subQuestions.screenshot.includes('html')"
                  :src="subQuestions.screenshot"></iframe>
                <img class="screenshot screenshot-img"
                  v-if="subQuestions.screenshot && !subQuestions.screenshot.includes('html')" :src="subQuestions.screenshot"
                  alt="">
              </div>
            </template>
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
278
          </div>
8af7657f   梁保满   修改添加备题,组卷
279
280
281
282
283
284
          <div class="btn-box">
            <el-button type="danger" plain round @click="linkBack">取消</el-button>
            <el-button round @click="toStep(1)">上一步</el-button>
            <el-button type="primary" round @click="save">保存</el-button>
          </div>
        </div>
13b58a42   梁保满   备题组卷部分前端页面基本完成
285
286
      </div>
    </div>
4c4f7640   梁保满   路由表,路由前端文件
287
288
289
  </template>
  
  <script>
533a17d8   梁保满   备题组卷添加批量设置答案
290
  import { deepClone, checkAnswer } from "utils";
cb6ceaa8   梁保满   添加备题,组卷参数调整
291
  import knowledgeList from "assets/js/knowledgeList.js";
4c4f7640   梁保满   路由表,路由前端文件
292
  export default {
13b58a42   梁保满   备题组卷部分前端页面基本完成
293
294
    data() {
      return {
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
295
        role: "",
13b58a42   梁保满   备题组卷部分前端页面基本完成
296
        step: 0, //步骤
cb6ceaa8   梁保满   添加备题,组卷参数调整
297
        gradeClassList: [], //年级-班级数据
13b58a42   梁保满   备题组卷部分前端页面基本完成
298
299
        gradeList: [], //年级
        subjectList: [], //科目
13b58a42   梁保满   备题组卷部分前端页面基本完成
300
301
302
        form: {
          //答题卡详情
          title: "",
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
303
          gradeName: "",
8af7657f   梁保满   修改添加备题,组卷
304
          subjectName: "",
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
305
          sharingType: 0,
8af7657f   梁保满   修改添加备题,组卷
306
          questionList: [],
13b58a42   梁保满   备题组卷部分前端页面基本完成
307
308
309
310
311
312
313
        },
        formRules: {
          //答题卡验证
          title: [
            { required: true, message: "请输入答题卡名称", trigger: "blur" },
            {
              min: 1,
23659274   梁保满   备题接口对接
314
315
              max: 50,
              message: "长度在 1 到 50 个字符",
13b58a42   梁保满   备题组卷部分前端页面基本完成
316
317
318
              trigger: "blur",
            },
          ],
8af7657f   梁保满   修改添加备题,组卷
319
320
321
          gradeName: [
            { required: true, message: "请选择年级", trigger: "blur" },
          ],
ee6e7628   梁保满   备题组卷借口数据对接调整
322
323
324
          subjectName: [
            { required: true, message: "请选择科目", trigger: "blur" },
          ],
13b58a42   梁保满   备题组卷部分前端页面基本完成
325
        },
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
326
        diaSetAns: false, //答案开关
cb6ceaa8   梁保满   添加备题,组卷参数调整
327
        dialogKnowledge: false, //知识点
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
328
        dialogStem: false, //截图开关
533a17d8   梁保满   备题组卷添加批量设置答案
329
        formAns: {
c6f2a550   梁保满   创建备题组卷,修改备题
330
331
          listIndex: 0, //大题位置
          endIndex: 0, //相同题目最后一位题目的questionIndex
98f6a547   梁保满   创建答题卡,统计答题信息
332
          index: 0, //相同题目最后一位题目的位置
533a17d8   梁保满   备题组卷添加批量设置答案
333
334
335
336
337
          qusType: "", //题目类型
          subNum: 0, //数量
          answerOptions: [], //答案选项
          answerList: "", //答案列表-字符串
        },
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
338
        stem: {
cb6ceaa8   梁保满   添加备题,组卷参数调整
339
          type: 1,
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
340
          index: 0, //大题位置
c6f2a550   梁保满   创建备题组卷,修改备题
341
          indexs: 0, //小题位置
8af7657f   梁保满   修改添加备题,组卷
342
          screenshot: "", //题干图片地址
cb6ceaa8   梁保满   添加备题,组卷参数调整
343
344
          answerScreenshot: "", //题目解析图片地址
          knowledge: [], //知识点
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
345
346
        },
        type: 1, //1-创建,2-复制答题卡
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
347
348
349
350
351
352
353
        questionOptions: [
          { label: "单选题", value: 2 },
          { label: "多选题", value: 3 },
          { label: "判断题", value: 4 },
          { label: "主观题", value: 5 },
        ],
        rightOptions: ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J"],
384a2a54   梁保满   请求头添加班主任信息,bug修改
354
355
356
357
        knowledgeList: { ...knowledgeList },
        //返回列表页参数记录
        listType: 1,
        listShare: 0,
13b58a42   梁保满   备题组卷部分前端页面基本完成
358
359
      };
    },
23659274   梁保满   备题接口对接
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
    computed: {
      // 知识点列表 根据学段-科目筛选
      knowledgeData: function () {
        let jsons = []
        if (this.form.gradeName && this.form.subjectName) {
          let sectionName = ""
          this.gradeClassList.map(item => {
            if (this.form.gradeName == item.gradeName) {
              sectionName = item.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]
            }
          }
        }
        return jsons
      },
    },
    watch: {
      step: function () {
        this.$nextTick(function () {
          this.$refs.content.scrollTop = 0;
        });
      },
    },
5424ef82   梁保满   接口调整
387
    async created() {
384a2a54   梁保满   请求头添加班主任信息,bug修改
388
389
      this.listType = this.$route.query.listType ? this.$route.query.listType : 1;
      this.listShare = this.$route.query.listShare ? this.$route.query.listShare : 0;
f26ecfa4   阿宝   测试bug
390
      this.type = this.$route.query.type ? this.$route.query.type : 1;
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
391
392
393
      this.role =
        this.$store.getters.info.showRole ||
        this.$store.getters.info.permissions[0].role;
8af7657f   梁保满   修改添加备题,组卷
394
395
396
397
398
399
      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.sharingType = params?.sharingType || 0
      this.formatData(params)
      console.log(this.form)
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
400
401
402
403
404
405
      if (this.role != "ROLE_PERSONAL") {
        this.formRules.gradeName = [
          { required: true, message: "请选择年级", trigger: "blur" },
        ];
        await this._GradeList();
      }
8f573b82   阿宝   组卷接口联调
406
      await this._QuerySubjectList(this.gradeList[0]);
13b58a42   梁保满   备题组卷部分前端页面基本完成
407
      if (this.type == 2) {
ee6e7628   梁保满   备题组卷借口数据对接调整
408
        this._QueryDetail();
13b58a42   梁保满   备题组卷部分前端页面基本完成
409
410
411
      }
    },
    methods: {
8af7657f   梁保满   修改添加备题,组卷
412
      // v1.5
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
413
      //上传截图
c6f2a550   梁保满   创建备题组卷,修改备题
414
      openStem(obj, index, indexs, type) {
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
415
        this.stem.index = index;
c6f2a550   梁保满   创建备题组卷,修改备题
416
417
        this.stem.indexs = indexs;
        this.stem.type = type;
cb6ceaa8   梁保满   添加备题,组卷参数调整
418
419
420
421
422
423
424
        if (type == 1) {
          this.stem.screenshot = obj.screenshot || "";
          this.stem.answerScreenshot = "";
        } else {
          this.stem.answerScreenshot = obj.answerScreenshot || "";
          this.stem.screenshot = "";
        }
c6f2a550   梁保满   创建备题组卷,修改备题
425
  
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
426
427
        this.dialogStem = true;
      },
c6f2a550   梁保满   创建备题组卷,修改备题
428
429
430
  
      // 图片上传成功
      upSuccess(res) {
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
431
        if (res && res.status == 0) {
cb6ceaa8   梁保满   添加备题,组卷参数调整
432
433
          if (this.stem.type == 1) {
            this.stem.screenshot = res.data.url;
c6f2a550   梁保满   创建备题组卷,修改备题
434
            this.form.questionList[this.stem.index].subQuestions[this.stem.indexs].screenshot = this.stem.screenshot;
cb6ceaa8   梁保满   添加备题,组卷参数调整
435
436
          } else {
            this.stem.answerScreenshot = res.data.url;
c6f2a550   梁保满   创建备题组卷,修改备题
437
            this.form.questionList[this.stem.index].subQuestions[this.stem.indexs].answerScreenshot = this.stem.answerScreenshot;
cb6ceaa8   梁保满   添加备题,组卷参数调整
438
          }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
439
440
441
442
443
444
445
446
447
          this.$message.success("上传成功");
        } else {
          this.$message.error(res.info);
        }
      },
  
      upError(res) {
        this.$message.error("上传失败");
      },
cb6ceaa8   梁保满   添加备题,组卷参数调整
448
449
450
      // 知识点
      openKnowledge(obj, index) {
        this.stem.index = index;
c6f2a550   梁保满   创建备题组卷,修改备题
451
        this.stem.indexs = indexs;
384a2a54   梁保满   请求头添加班主任信息,bug修改
452
        this.stem.knowledge = (obj.knowledge && obj.knowledge.split("#")) || [];
cb6ceaa8   梁保满   添加备题,组卷参数调整
453
454
455
456
        this.dialogKnowledge = true;
      },
      // 知识点
      setKnowledge() {
384a2a54   梁保满   请求头添加班主任信息,bug修改
457
        this.form.questionList[this.stem.index].subQuestions[this.stem.indexs].knowledge = this.stem.knowledge.join("#");
cb6ceaa8   梁保满   添加备题,组卷参数调整
458
459
460
        this.dialogKnowledge = false;
      },
  
8af7657f   梁保满   修改添加备题,组卷
461
      //end
13b58a42   梁保满   备题组卷部分前端页面基本完成
462
463
      linkBack() {
        this.$confirm(
8af7657f   梁保满   修改添加备题,组卷
464
465
          (this.type == 2 ? "修改复制的" : "导入的") +
          "课件未保存,确认退出吗?",
13b58a42   梁保满   备题组卷部分前端页面基本完成
466
467
468
469
470
471
472
473
474
475
476
477
          "提示",
          {
            confirmButtonText: "取消",
            cancelButtonText: "确定",
            confirmButtonClass: "el-button--danger1",
            cancelButtonClass: "el-button--primary",
            showClose: false,
            roundButton: true,
            center: true,
            type: "warning",
          }
        )
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
478
          .then(() => { })
13b58a42   梁保满   备题组卷部分前端页面基本完成
479
480
481
          .catch(() => {
            this.$router.push({
              path: "/examinationPaper",
384a2a54   梁保满   请求头添加班主任信息,bug修改
482
483
484
485
              query: {
                type: this.listType,
                share: this.listShare,
              }
13b58a42   梁保满   备题组卷部分前端页面基本完成
486
487
488
            });
          });
      },
c6f2a550   梁保满   创建备题组卷,修改备题
489
      //转换题型显示方式
13b58a42   梁保满   备题组卷部分前端页面基本完成
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
      setSubPro(type) {
        let tit;
        switch (type) {
          case 2:
            tit = "单选题";
            break;
          case 3:
            tit = "多选题";
            break;
          case 4:
            tit = "判断题";
            break;
          case 5:
            tit = "主观题";
            break;
        }
        return tit;
      },
c6f2a550   梁保满   创建备题组卷,修改备题
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
      //计算题号
      setNum(index, indexs, sub) {
        let lengths = 0;//所在大题之前的所有小题数量
        let subIndex = 0;//所在大题的位置
        for (let i = 0; i < index; i++) {
          let subArr = this.form.questionList[i].subQuestions.filter((item) => {
            return !!item.questionType;
          });
          lengths += subArr.length;
        }
        for (let i = 0; i < indexs; i++) {
          if (!!this.form.questionList[index].subQuestions[i].questionType) {
            subIndex += 1;
          }
        }
        return lengths + subIndex + 1;
      },
8af7657f   梁保满   修改添加备题,组卷
525
526
      //整理问题
      formateQuestion() {
8af7657f   梁保满   修改添加备题,组卷
527
        this.formatQuestionList()
c6f2a550   梁保满   创建备题组卷,修改备题
528
529
530
531
532
        this.form.questionList?.map((item) => {
          let types = [{}];
          let addndex = 0;
          item.subQuestions?.map((sub, index) => {
            if (!!sub.questionType) {
8af7657f   梁保满   修改添加备题,组卷
533
              if (
c6f2a550   梁保满   创建备题组卷,修改备题
534
535
                sub.questionType == types[addndex].qusType &&
                sub.questionType != 5
8af7657f   梁保满   修改添加备题,组卷
536
              ) {
c6f2a550   梁保满   创建备题组卷,修改备题
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
                //同类型批量答案+1
                types[addndex].subNum += 1;
                if (
                  types[addndex].answerOptions.length < sub.answerOptions.length
                ) {
                  types[addndex].answerOptions = sub.answerOptions;
                }
  
                // types[addndex].answerList += this.setAnswer(
                //   sub.questionType,
                //   sub.correctAnswer
                // );
                types[addndex].answerList = "";
                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;
8af7657f   梁保满   修改添加备题,组卷
569
                types[addndex].answerOptions = sub.answerOptions;
c6f2a550   梁保满   创建备题组卷,修改备题
570
                types[addndex].answerList = "";
8af7657f   梁保满   修改添加备题,组卷
571
              }
c6f2a550   梁保满   创建备题组卷,修改备题
572
573
574
575
576
577
578
579
580
            }
          });
          for (let i = 0; i < types.length; i++) {
            if (types[i].subNum >= 5) {
              item.subQuestions?.splice(
                types[i].index + i + 1,
                0,
                deepClone(types[i])
              );
8af7657f   梁保满   修改添加备题,组卷
581
            }
533a17d8   梁保满   备题组卷添加批量设置答案
582
          }
0e46bc25   梁保满   优化
583
        });
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
584
      },
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
585
      //初始化要修改的答案
c6f2a550   梁保满   创建备题组卷,修改备题
586
587
588
      setFormAns(indexs, index) {
        this.formAns = { ...this.form.questionList[index].subQuestions[indexs] };
        this.formAns.listIndex = index;
11a4e518   梁保满   背题组卷修改答案设置,即使测随堂问...
589
        let answerList = "";
c6f2a550   梁保满   创建备题组卷,修改备题
590
591
592
        let startIndex = indexs - this.formAns.subNum; //批量设置大难开始位置
        this.form.questionList[index].subQuestions.map((item, subIdx) => {
          if (subIdx >= startIndex && subIdx < indexs) {
f5729396   梁保满   批量设置答案
593
            answerList += this.setAnswer(item.questionType, item.correctAnswer);
c6f2a550   梁保满   创建备题组卷,修改备题
594
  
8af7657f   梁保满   修改添加备题,组卷
595
596
            if (item.qusType == 3) {
              answerList = answerList.slice(0, -1);
11a4e518   梁保满   背题组卷修改答案设置,即使测随堂问...
597
            }
11a4e518   梁保满   背题组卷修改答案设置,即使测随堂问...
598
599
          }
        });
c6f2a550   梁保满   创建备题组卷,修改备题
600
601
        this.formAns.answerList = answerList;
  
533a17d8   梁保满   备题组卷添加批量设置答案
602
603
        this.diaSetAns = true;
      },
def690b2   梁保满   批量设置答案
604
      insertTxtAndSetcursor(element, answerList, str) {
f5729396   梁保满   批量设置答案
605
606
607
608
609
610
611
612
613
614
615
616
617
618
        let startPos = element.selectionStart; // 获取光标开始的位置
        if (startPos === undefined) {
          // 如果没有光标位置 不操作
          return answerList;
        } else {
          return {
            text:
              answerList.substring(0, startPos) +
              str +
              answerList.substring(startPos), // 将文本插入
            startPos: startPos + str.length,
          };
        }
      },
77da338a   梁保满   自测问题修改
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
      //添加选项
      addOptions(subQuestions) {
        let length = subQuestions.answerOptions.split(",").length;
        if (length > 9) return;
        subQuestions.selectNum = length + 1;
        subQuestions.answerOptions = this.rightOptions
          .slice(0, subQuestions.selectNum)
          .join(",");
      },
      //删除选项
      removeOptions(subQuestions) {
        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
        );
      },
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
641
      //多选答案设置
def690b2   梁保满   批量设置答案
642
      setMultiple(obj, answer, type) {
def690b2   梁保满   批量设置答案
643
644
645
646
647
648
649
650
651
        let elements =
          type == 1
            ? this.$refs["formAnsIpt2"].$el.children[0]
            : this.$refs["formAnsIpt"].$el.children[0];
        let resault = this.insertTxtAndSetcursor(
          elements,
          obj.answerList || "",
          answer
        );
f5729396   梁保满   批量设置答案
652
        obj.answerList = resault.text;
533a17d8   梁保满   备题组卷添加批量设置答案
653
        let str = obj.answerList;
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
654
655
656
657
658
659
        let str2;
        if (!!obj.answerOptions) {
          str2 = checkAnswer(
            str,
            3,
            obj.answerOptions.split(",").length,
b2d3d803   梁保满   批量设置答案优化
660
            obj.subNum
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
661
662
          );
        } else {
b2d3d803   梁保满   批量设置答案优化
663
          str2 = checkAnswer(str, 3, obj.selectNum, obj.number);
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
664
        }
533a17d8   梁保满   备题组卷添加批量设置答案
665
        obj.answerList = str2;
def690b2   梁保满   批量设置答案
666
667
        elements.focus();
        elements.selectionStart = resault.startPos;
533a17d8   梁保满   备题组卷添加批量设置答案
668
      },
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
669
      //批量修改答案
533a17d8   梁保满   备题组卷添加批量设置答案
670
      saveFormAns() {
533a17d8   梁保满   备题组卷添加批量设置答案
671
672
        let EndIndex;
        let subNum = this.formAns.subNum - 1;
c6f2a550   梁保满   创建备题组卷,修改备题
673
        this.form.questionList[this.formAns.listIndex].subQuestions.some(
533a17d8   梁保满   备题组卷添加批量设置答案
674
          (item, index) => {
c6f2a550   梁保满   创建备题组卷,修改备题
675
            if (this.formAns.endIndex == item.questionIndex) {
533a17d8   梁保满   备题组卷添加批量设置答案
676
              EndIndex = index;
533a17d8   梁保满   备题组卷添加批量设置答案
677
            }
c6f2a550   梁保满   创建备题组卷,修改备题
678
            return this.formAns.endIndex == item.questionIndex
533a17d8   梁保满   备题组卷添加批量设置答案
679
680
          }
        );
533a17d8   梁保满   备题组卷添加批量设置答案
681
682
683
        for (let i = 0; i <= subNum; i++) {
          let correctAnswer = "";
          if (this.formAns.qusType == 2) {
f5729396   梁保满   批量设置答案
684
            correctAnswer = this.formAns.answerList[subNum - i] || "";
533a17d8   梁保满   备题组卷添加批量设置答案
685
          } else if (this.formAns.qusType == 3) {
f5729396   梁保满   批量设置答案
686
            correctAnswer = this.formAns.answerList.split(",")[subNum - i] || "";
533a17d8   梁保满   备题组卷添加批量设置答案
687
          } else if (this.formAns.qusType == 4) {
503b6063   梁保满   判断题答案选项
688
689
690
691
            correctAnswer =
              this.formAns.answerList[subNum - i] == "✓"
                ? 1
                : this.formAns.answerList[subNum - i] == "✗"
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
692
693
                  ? 2
                  : "";
533a17d8   梁保满   备题组卷添加批量设置答案
694
          }
c6f2a550   梁保满   创建备题组卷,修改备题
695
          this.form.questionList[this.formAns.listIndex].subQuestions[
533a17d8   梁保满   备题组卷添加批量设置答案
696
697
698
699
700
            EndIndex - i
          ].correctAnswer = correctAnswer;
        }
        this.diaSetAns = false;
      },
8af7657f   梁保满   修改添加备题,组卷
701
      keydownAnswer(event, type) {
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
702
703
        let answerA = "ABCDEFGHIJ";
        let answer_a = "abcdefghij";
8af7657f   梁保满   修改添加备题,组卷
704
705
706
707
  
        answerA = answerA.substring(0, this.formAns.subNum);
        answer_a = answer_a.substring(0, this.formAns.subNum);
  
813d4d64   梁保满   批量设置答案添加输入
708
709
        answerA += answer_a;
        answerA = type == 2 ? answerA : answerA + ",";
533a17d8   梁保满   备题组卷添加批量设置答案
710
711
712
713
714
715
716
717
718
719
720
721
722
723
        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"
813d4d64   梁保满   批量设置答案添加输入
724
        )
533a17d8   梁保满   备题组卷添加批量设置答案
725
          return;
813d4d64   梁保满   批量设置答案添加输入
726
        if (!answerA.includes(event.key)) {
533a17d8   梁保满   备题组卷添加批量设置答案
727
728
729
          event.returnValue = "";
        }
      },
8af7657f   梁保满   修改添加备题,组卷
730
731
732
733
734
735
736
737
738
739
740
      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;
  
813d4d64   梁保满   批量设置答案添加输入
741
      },
533a17d8   梁保满   备题组卷添加批量设置答案
742
743
744
      setAnswer(type, ans) {
        let txt = "";
        if (type == 2) {
c6f2a550   梁保满   创建备题组卷,修改备题
745
          txt = ans || "";
533a17d8   梁保满   备题组卷添加批量设置答案
746
        } else if (type == 3) {
c6f2a550   梁保满   创建备题组卷,修改备题
747
          txt = (ans || "") + ",";
533a17d8   梁保满   备题组卷添加批量设置答案
748
        } else if (type == 4) {
d32e461c   梁保满   备题组卷
749
          txt = ans == 1 ? "✓" : ans == 2 ? "✗" : "";
533a17d8   梁保满   备题组卷添加批量设置答案
750
751
752
        }
        return txt;
      },
8af7657f   梁保满   修改添加备题,组卷
753
      toStep(step) {
533a17d8   梁保满   备题组卷添加批量设置答案
754
        this.formatQuestionList();
8af7657f   梁保满   修改添加备题,组卷
755
        this.step = step;
cb6ceaa8   梁保满   添加备题,组卷参数调整
756
        if (step == 1) {
8af7657f   梁保满   修改添加备题,组卷
757
758
          this.formateQuestion()
        }
533a17d8   梁保满   备题组卷添加批量设置答案
759
      },
13b58a42   梁保满   备题组卷部分前端页面基本完成
760
      setStep1() {
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
761
762
763
764
        if (this.subjectList.length == 0) {
          this.$message.warning("暂无绑定年级信息,请先联系管理员设置。");
          return;
        }
13b58a42   梁保满   备题组卷部分前端页面基本完成
765
766
767
        this.$refs["forms"].validate((valid) => {
          // 验证通过:保存
          if (valid) {
8af7657f   梁保满   修改添加备题,组卷
768
            this.formateQuestion()
13b58a42   梁保满   备题组卷部分前端页面基本完成
769
770
771
772
773
774
775
            this.step = 1;
          } else {
            this.$message.error("数据有误,请检查!");
            return false;
          }
        });
      },
8af7657f   梁保满   修改添加备题,组卷
776
  
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
777
      //删除批量操作数据
533a17d8   梁保满   备题组卷添加批量设置答案
778
779
      formatQuestionList() {
        for (let i = 0; i < this.form.questionList.length; i++) {
c6f2a550   梁保满   创建备题组卷,修改备题
780
781
782
783
784
785
786
787
          for (
            let j = 0;
            j < this.form.questionList[i].subQuestions?.length;
            j++
          ) {
            if (this.form.questionList[i].subQuestions[j]?.qusType) {
              this.form.questionList[i].subQuestions?.splice(j, 1);
            }
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
788
          }
13b58a42   梁保满   备题组卷部分前端页面基本完成
789
        }
13b58a42   梁保满   备题组卷部分前端页面基本完成
790
      },
8af7657f   梁保满   修改添加备题,组卷
791
      //删除题
c6f2a550   梁保满   创建备题组卷,修改备题
792
793
      delTabData(subIndex, index) {
        this.form.questionList[index].subQuestions.splice(subIndex, 1);
8af7657f   梁保满   修改添加备题,组卷
794
        this.formateQuestion()
13b58a42   梁保满   备题组卷部分前端页面基本完成
795
      },
23659274   梁保满   备题接口对接
796
      //切换题型
13b58a42   梁保满   备题组卷部分前端页面基本完成
797
      changeSubQuestions(val, subQuestions) {
13b58a42   梁保满   备题组卷部分前端页面基本完成
798
799
800
801
802
803
804
        const that = this;
        subQuestions.score = 1;
        subQuestions.partScore = 0;
        subQuestions.correctAnswer = "";
        subQuestions.selectNum = 4;
        switch (val) {
          case 2:
8f573b82   阿宝   组卷接口联调
805
806
807
            subQuestions.answerOptions = that.rightOptions
              .slice(0, subQuestions.selectNum)
              .join(",");
13b58a42   梁保满   备题组卷部分前端页面基本完成
808
809
            break;
          case 3:
8f573b82   阿宝   组卷接口联调
810
811
812
            subQuestions.answerOptions = that.rightOptions
              .slice(0, subQuestions.selectNum)
              .join(",");
13b58a42   梁保满   备题组卷部分前端页面基本完成
813
814
            break;
          case 4:
503b6063   梁保满   判断题答案选项
815
816
817
            subQuestions.selectNum = 0;
            subQuestions.answerOptions = "1,2";
            break;
13b58a42   梁保满   备题组卷部分前端页面基本完成
818
819
820
821
          case 5:
            subQuestions.selectNum = 0;
            break;
        }
c6f2a550   梁保满   创建备题组卷,修改备题
822
        this.formateQuestion()
13b58a42   梁保满   备题组卷部分前端页面基本完成
823
      },
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
824
      //设置多选答案
13b58a42   梁保满   备题组卷部分前端页面基本完成
825
      changAnswer(sub, option) {
13b58a42   梁保满   备题组卷部分前端页面基本完成
826
827
828
829
830
831
832
833
834
        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("");
        }
      },
8af7657f   梁保满   修改添加备题,组卷
835
836
837
838
  
  
  
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
839
      async save() {
8f573b82   阿宝   组卷接口联调
840
841
        if (this.saveLoading) return;
        this.saveLoading = true;
533a17d8   梁保满   备题组卷添加批量设置答案
842
        this.formatQuestionList();
f5729396   梁保满   批量设置答案
843
        let formDatas = deepClone(this.form);
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
844
845
846
847
848
        let addPaper =
          this.role == "ROLE_PERSONAL"
            ? this.$request.pAddPaper
            : this.$request.addPaper;
        const { data, status, info } = await addPaper({
8af7657f   梁保满   修改添加备题,组卷
849
          type: 1,
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
850
          ...formDatas,
13b58a42   梁保满   备题组卷部分前端页面基本完成
851
        });
8f573b82   阿宝   组卷接口联调
852
        this.saveLoading = false;
ee6e7628   梁保满   备题组卷借口数据对接调整
853
        if (status == 0) {
13b58a42   梁保满   备题组卷部分前端页面基本完成
854
          this.$router.push({
ee6e7628   梁保满   备题组卷借口数据对接调整
855
            path: "/examinationPaper",
384a2a54   梁保满   请求头添加班主任信息,bug修改
856
857
858
859
            query: {
              type: this.listType,
              share: this.listShare,
            }
ee6e7628   梁保满   备题组卷借口数据对接调整
860
          });
13b58a42   梁保满   备题组卷部分前端页面基本完成
861
        } else {
6fffbd55   阿宝   组卷接口调整
862
          this.$message.error(info);
13b58a42   梁保满   备题组卷部分前端页面基本完成
863
864
865
866
867
868
        }
      },
      async changeGrade() {
        //切换年级查询科目
        this._QuerySubjectList(this.form.gradeName);
      },
8af7657f   梁保满   修改添加备题,组卷
869
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
870
871
      async _GradeList() {
        //查询年级列表
cb6ceaa8   梁保满   添加备题,组卷参数调整
872
873
874
875
876
877
878
879
880
        // 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();
ee6e7628   梁保满   备题组卷借口数据对接调整
881
        if (status == 0) {
cb6ceaa8   梁保满   添加备题,组卷参数调整
882
883
884
885
886
887
888
889
          this.gradeClassList = data.list?.map((item) => {
            console.log(!this.gradeList.includes(item.gradeName))
            if (!this.gradeList.includes(item.gradeName)) {
              this.gradeList.push(item.gradeName)
            }
            return item
          })
          // this.gradeList = (data.gradeNames && [...data.gradeNames]) || [];
13b58a42   梁保满   备题组卷部分前端页面基本完成
890
891
892
          if (this.type != 2) {
            this.form.gradeName = this.gradeList[0];
          }
13b58a42   梁保满   备题组卷部分前端页面基本完成
893
        } else {
6fffbd55   阿宝   组卷接口调整
894
          this.$message.error(info);
13b58a42   梁保满   备题组卷部分前端页面基本完成
895
896
        }
      },
5424ef82   梁保满   接口调整
897
      async _QuerySubjectList(grade) {
13b58a42   梁保满   备题组卷部分前端页面基本完成
898
        //查询科目列表
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
899
900
901
902
903
904
905
906
907
908
909
910
        if (!grade) {
          return;
        }
        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 });
ee6e7628   梁保满   备题组卷借口数据对接调整
911
        if (status === 0) {
f26ecfa4   阿宝   测试bug
912
913
914
          this.subjectList =
            data.subjectNames?.map((item) => {
              return {
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
915
916
                value: this.role == "ROLE_PERSONAL" ? item.subjectName : item,
                label: this.role == "ROLE_PERSONAL" ? item.subjectName : item,
f26ecfa4   阿宝   测试bug
917
918
              };
            }) || [];
ee6e7628   梁保满   备题组卷借口数据对接调整
919
920
          if (this.subjectList.length) {
            this.form.subjectName = this.subjectList[0].value;
13b58a42   梁保满   备题组卷部分前端页面基本完成
921
          }
13b58a42   梁保满   备题组卷部分前端页面基本完成
922
        } else {
6fffbd55   阿宝   组卷接口调整
923
          this.$message.error(info);
13b58a42   梁保满   备题组卷部分前端页面基本完成
924
925
        }
      },
ee6e7628   梁保满   备题组卷借口数据对接调整
926
      async _QueryDetail() {
03bce046   梁保满   个人版调整
927
        //查询答题卡详情
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
928
929
930
931
932
        let fetchPaperDetail =
          this.role == "ROLE_PERSONAL"
            ? this.$request.pPaperDetail
            : this.$request.fetchPaperDetail;
        const { data, status, info } = await fetchPaperDetail({
ee6e7628   梁保满   备题组卷借口数据对接调整
933
934
935
          paperId: this.$route.query.paperId,
        });
        if (status == 0) {
f26ecfa4   阿宝   测试bug
936
          this.form.title = data.title + "_副本";
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
937
938
          if (this.role != "ROLE_PERSONAL") {
            this.form.sharingType = data.sharingType;
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
939
          }
8af7657f   梁保满   修改添加备题,组卷
940
          this.formatData(data)
ee6e7628   梁保满   备题组卷借口数据对接调整
941
        } else {
6fffbd55   阿宝   组卷接口调整
942
          this.$message.error(info);
ee6e7628   梁保满   备题组卷借口数据对接调整
943
944
        }
      },
8af7657f   梁保满   修改添加备题,组卷
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
      formatData(data) {
        if (this.subjectList.length) {
          this.subjectList.map((item) => {
            if (item.label == data.subjectName) {
              this.form.subjectName = item.value;
            }
          });
        } else {
          this.form.subjectName = "";
        }
  
        if (this.role != "ROLE_PERSONAL") {
          if (this.gradeList.length) {
            this.gradeList.map((item) => {
              if (item == data.gradeName) {
                this.form.gradeName = data.gradeName;
              }
            });
          } else {
            this.form.gradeName = "";
          }
        }
        this.form.questionList = data.questionList?.map((item) => {
c6f2a550   梁保满   创建备题组卷,修改备题
968
969
970
971
972
973
974
975
976
977
978
          let subQuestions =
            item.subQuestions?.map((items) => {
              return {
                ...items,
                selectNum: items.answerOptions?.split(",").length,
                answerOptions: items.answerOptions || "A,B,C,D",
                screenshot: items.screenshot || "",
                correctAnswer: items.correctAnswer || "",
                knowledge: items.knowledge || "",
              };
            }) || [];
8af7657f   梁保满   修改添加备题,组卷
979
          return {
c6f2a550   梁保满   创建备题组卷,修改备题
980
981
982
983
            questionTitle: item.questionTitle,
            subQuestions: subQuestions,
            show: false,
          };
8af7657f   梁保满   修改添加备题,组卷
984
985
        });
      }
13b58a42   梁保满   备题组卷部分前端页面基本完成
986
987
988
    },
  };
  </script>
8af7657f   梁保满   修改添加备题,组卷
989
990
  <style>
  .screenshot-box {
c6f2a550   梁保满   创建备题组卷,修改备题
991
    width: 600px;
8af7657f   梁保满   修改添加备题,组卷
992
  }
4c4f7640   梁保满   路由表,路由前端文件
993
  
8af7657f   梁保满   修改添加备题,组卷
994
995
996
997
  .screenshot {
    width: 100%;
    box-shadow: none;
    border: none;
c6f2a550   梁保满   创建备题组卷,修改备题
998
    height: 400px;
8af7657f   梁保满   修改添加备题,组卷
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
  }
  
  .screenshot-img {
    display: block;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    margin-bottom: 10px;
  }
  </style>
13b58a42   梁保满   备题组卷部分前端页面基本完成
1009
1010
1011
1012
  <style lang="scss" scoped>
  .red {
    color: #f30;
  }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1013
  
533a17d8   梁保满   备题组卷添加批量设置答案
1014
1015
  .qs-options {
    flex: 1;
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1016
  
533a17d8   梁保满   备题组卷添加批量设置答案
1017
1018
1019
    .ipt {
      margin-bottom: 5px;
    }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1020
  
533a17d8   梁保满   备题组卷添加批量设置答案
1021
1022
1023
1024
    .answer-box {
      .answer-s {
        cursor: pointer;
        user-select: none;
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1025
1026
        margin-bottom: 10px;
  
533a17d8   梁保满   备题组卷添加批量设置答案
1027
1028
1029
1030
1031
        &:first-of-type {
          margin-left: 0;
        }
      }
    }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1032
1033
1034
1035
1036
  
    .answer-box2 {
      margin-bottom: 10px;
    }
  
533a17d8   梁保满   备题组卷添加批量设置答案
1037
1038
1039
    .delButton {
      text-indent: -9999999px;
      border-color: #ff6868;
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1040
      background: #ff6868 url("../../assets/images/arrow.png") no-repeat center;
533a17d8   梁保满   备题组卷添加批量设置答案
1041
1042
1043
      background-size: 19px;
      color: transparent;
    }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1044
  
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
1045
1046
    .answer-s.ac {
      border: none;
11a4e518   梁保满   背题组卷修改答案设置,即使测随堂问...
1047
    }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1048
  
533a17d8   梁保满   备题组卷添加批量设置答案
1049
1050
1051
    .ac {
      border-color: #ff6868;
      background: #ff6868;
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
1052
      color: #fff !important;
533a17d8   梁保满   备题组卷添加批量设置答案
1053
1054
1055
    }
  }
  
255e2506   梁保满   飞书bug及优化
1056
1057
  .sel2 {
    width: 480px;
e5ff81a1   阿宝   集团管理员接口
1058
  }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1059
  
533a17d8   梁保满   备题组卷添加批量设置答案
1060
1061
1062
1063
1064
1065
1066
  .set-ans-btn {
    width: 100%;
    padding: 10px 0 10px 630px;
    box-sizing: border-box;
    border-right: 1px solid #e2e2e2;
    border-bottom: 1px solid #e2e2e2;
  }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1067
  
255e2506   梁保满   飞书bug及优化
1068
1069
1070
  .content-box {
    width: 100%;
    height: 100%;
ca39cc52   阿宝   飞书问题处理
1071
1072
    overflow-y: auto;
  }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1073
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1074
1075
1076
  .content {
    width: 100%;
    box-sizing: border-box;
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1077
1078
    padding: 0 24px;
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1079
1080
1081
    .ml-20 {
      margin-left: 20px;
    }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1082
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1083
1084
1085
1086
1087
    .btn-box {
      text-align: right;
      margin-left: 140px;
    }
  }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1088
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1089
1090
1091
1092
1093
1094
1095
  .dia-content {
    .dia-tit {
      font-size: 20px;
      color: #333;
      font-weight: 700;
      text-align: center;
    }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1096
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1097
    .add-type {
818e50d7   梁保满   标签删除,修改
1098
1099
      width: 100%;
      margin-bottom: 10px;
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1100
  
818e50d7   梁保满   标签删除,修改
1101
1102
1103
1104
      .js-set {
        margin: 2.5px 10px 0 0;
        font-size: 14px;
      }
13b58a42   梁保满   备题组卷部分前端页面基本完成
1105
    }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1106
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1107
1108
1109
1110
    .add-btn {
      margin-left: 20px;
    }
  }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1111
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1112
1113
1114
1115
1116
  .el-message-box {
    :deep(.el-button--default) {
      color: #fff;
    }
  }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1117
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1118
1119
1120
1121
  .add-box {
    display: flex;
    justify-content: center;
    align-items: center;
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1122
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1123
1124
1125
1126
1127
1128
1129
1130
    .add-question {
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 16px;
      font-weight: bolder;
      padding: 2px;
      cursor: pointer;
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1131
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1132
1133
1134
      .s1 {
        margin-left: 6px;
      }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1135
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1136
1137
1138
1139
      :deep(.el-icon-plus) {
        font-size: 24px;
        font-weight: 900;
      }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1140
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1141
1142
1143
1144
1145
      :deep(.el-button--mini.is-circle) {
        padding: 3px;
      }
    }
  }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1146
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1147
1148
  .dialog-footer {
    text-align: center;
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1149
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1150
1151
1152
1153
1154
1155
    :deep(.el-button) {
      border-radius: 20px;
      padding: 8px 20px 7px;
      margin: 0 12px;
    }
  }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1156
  
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
1157
1158
  .question-box {
    margin-bottom: 20px;
8af7657f   梁保满   修改添加备题,组卷
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
  
    .screenshot-box {
      width: 100%;
      border: 1px solid #e2e2e2;
      margin-bottom: 20px;
  
      .screenshot-img {
        margin: 0;
      }
    }
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
1169
  }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1170
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1171
1172
  .question-title {
    line-height: 40px;
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
1173
1174
1175
    display: flex;
    align-items: center;
    margin-bottom: 12px;
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1176
  
503b6063   梁保满   判断题答案选项
1177
    .m20 {
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1178
      margin: 0 20px;
d32e461c   梁保满   备题组卷
1179
    }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1180
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1181
1182
1183
    .ipt {
      width: 300px;
      margin: 0 16px 0 10px;
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1184
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1185
1186
1187
1188
1189
1190
      :deep(.el-input__inner) {
        border-radius: 20px;
        border-color: #667ffd;
        background: rgba($color: #667ffd, $alpha: 0.05);
      }
    }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1191
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1192
1193
1194
    .delete {
      margin-right: 8px;
    }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1195
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1196
1197
1198
1199
1200
    .title-txt {
      margin-right: 20px;
      font-size: 16px;
      font-weight: 700;
    }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1201
  
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
1202
1203
1204
1205
1206
1207
    .el-icon-caret-right {
      font-size: 24px;
      color: #888;
      transition: all 0.4s;
      margin-right: 12px;
      cursor: pointer;
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1208
  
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
1209
1210
1211
1212
1213
      &.active {
        transform: rotate(90deg);
      }
    }
  }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1214
  
3ba60a63   梁保满   发卡补卡,设备状态上传下载接口联调
1215
1216
  .questions-ul {
    border-left: 1px solid #e2e2e2;
c6f2a550   梁保满   创建备题组卷,修改备题
1217
1218
1219
1220
  
    &:first-child {
      border-top: 1px solid #e2e2e2;
    }
13b58a42   梁保满   备题组卷部分前端页面基本完成
1221
  }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1222
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1223
1224
1225
  .el-input-number {
    width: 140px;
  }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1226
  
f26ecfa4   阿宝   测试bug
1227
1228
1229
1230
1231
1232
  .answer-title {
    text-align: center;
    font-size: 20px;
    color: #333;
    font-weight: 700;
    padding-bottom: 20px;
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1233
  
f26ecfa4   阿宝   测试bug
1234
1235
1236
1237
1238
1239
    .totals {
      font-size: 16px;
      color: #888;
      font-weight: normal;
    }
  }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1240
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
  .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;
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1253
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1254
1255
1256
1257
1258
1259
1260
      &.active {
        background: #5e78fa;
        border-color: #5e78fa;
        color: #fff;
      }
    }
  }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1261
  
255e2506   梁保满   飞书bug及优化
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
  .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;
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1275
  
255e2506   梁保满   飞书bug及优化
1276
1277
1278
1279
1280
1281
1282
      &.active {
        background: #5e78fa;
        border-color: #5e78fa;
        color: #fff;
      }
    }
  }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1283
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1284
1285
1286
1287
  .sub-questions {
    width: 100%;
    display: flex;
    border-bottom: 1px solid #e2e2e2;
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1288
1289
  
    &>div {
13b58a42   梁保满   备题组卷部分前端页面基本完成
1290
1291
1292
1293
1294
1295
1296
1297
      min-height: 40px;
      padding: 5px;
      flex-shrink: 0;
      border-right: 1px solid #e2e2e2;
      display: flex;
      justify-content: center;
      align-items: center;
    }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1298
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1299
    .qs-num {
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1300
      width: 70px;
13b58a42   梁保满   备题组卷部分前端页面基本完成
1301
    }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1302
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1303
1304
1305
    .qs-type {
      width: 160px;
    }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1306
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1307
1308
1309
1310
    .qs-score,
    .qs-partScore {
      width: 160px;
    }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1311
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1312
1313
1314
    .qs-options {
      flex: 1;
    }
cb6ceaa8   梁保满   添加备题,组卷参数调整
1315
1316
  
    .qs-upload {
8af7657f   梁保满   修改添加备题,组卷
1317
1318
      width: 60px;
    }
cb6ceaa8   梁保满   添加备题,组卷参数调整
1319
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1320
    .qs-set {
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1321
      width: 60px;
13b58a42   梁保满   备题组卷部分前端页面基本完成
1322
    }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1323
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1324
1325
1326
1327
    .qs-options2 {
      text-align: left;
      justify-content: flex-start;
      padding-left: 20px;
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1328
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1329
1330
1331
1332
      .answer-s {
        cursor: pointer;
      }
    }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1333
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1334
1335
1336
1337
1338
1339
1340
1341
1342
    :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);
      }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1343
  
13b58a42   梁保满   备题组卷部分前端页面基本完成
1344
1345
1346
1347
1348
      .el-input__icon {
        line-height: 32px;
      }
    }
  }
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1349
1350
1351
1352
1353
1354
1355
1356
1357
  
  .upload-box {
    .upload-demo {
      text-align: center;
    }
  
    .stem-pic {
      display: block;
      margin: 0 auto 20px;
77da338a   梁保满   自测问题修改
1358
1359
      max-width: 100%;
      max-height: 200px;
6192eba8   梁保满   引用上传文件组件问题,备题组卷顶部
1360
1361
1362
      object-fit: cover;
    }
  }
4c4f7640   梁保满   路由表,路由前端文件
1363
  </style>