@zykjcommon/questions 0.0.13 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/.env.production +2 -1
  2. package/.env.test +2 -1
  3. package/dist/zykjcommon-questions.common.js +14842 -2485
  4. package/dist/zykjcommon-questions.css +1 -1
  5. package/dist/zykjcommon-questions.umd.js +14843 -2494
  6. package/dist/zykjcommon-questions.umd.min.js +24 -1
  7. package/package.json +2 -2
  8. package/src/App.vue +2 -0
  9. package/src/assets/js/fun.js +23 -2
  10. package/src/assets/js/http.js +1 -1
  11. package/src/assets/scss/questions/index.scss +97 -22
  12. package/src/components/common/IframeComponent.vue +60 -76
  13. package/src/components/common/Loading.vue +9 -31
  14. package/src/components/common/TextAreaEditor.vue +72 -87
  15. package/src/components/exam/QuestionCard.vue +3 -3
  16. package/src/components/questions/QuestionReader.js +4 -4
  17. package/src/components/questions/Question_BriefAnswer.vue +146 -0
  18. package/src/components/questions/Question_FillBlank.vue +151 -0
  19. package/src/components/questions/Question_MultipleChoice.vue +179 -0
  20. package/src/components/questions/Question_Programming.vue +285 -0
  21. package/src/components/questions/Question_Reading.vue +173 -0
  22. package/src/components/questions/Question_SingleChoice.vue +7 -21
  23. package/src/components/questions/buildEntry.js +130 -5
  24. package/src/components/questions/const.js +15 -0
  25. package/src/components/questions/developmentEntry.js +130 -5
  26. package/src/components/questions/entry.js +2 -18
  27. package/src/components/questions/store.js +44 -0
  28. package/src/main.ts +16 -12
  29. package/src/views/exam/Analysis.vue +620 -7
  30. package/src/views/exam/Exam.vue +612 -11
  31. package/vue.config.js +8 -4
@@ -18,6 +18,8 @@
18
18
  <ul class="question-list">
19
19
  <li v-for="(item,index) in responsiveObj.questionList" :id="'question'+ index">
20
20
  <component :is="item.questionComponent"
21
+ :bus="eventBus"
22
+ :urlQuery="getUrlQuery(item)"
21
23
  :mode="'analysis'"
22
24
  :questionInfo="item"
23
25
  :key="'question'+ index"
@@ -50,10 +52,12 @@ import {defineComponent, ref, toRefs, reactive, watch, computed, onMounted,getCu
50
52
  import QuestionCard from '@src/components/exam/QuestionCard.vue'
51
53
  import TimeCounter from '@src/components/exam/TimeCounter.vue'
52
54
  import QuestionHeader from '@src/components/exam/QuestionHeader.vue'
55
+ import { useState as rootUseState } from 'vuex-composition-helpers'
53
56
  import {createNamespacedHelpers} from 'vuex-composition-helpers';
54
57
  import {useRouter,useRoute} from 'vue-router'
55
58
  import fun from "@/assets/js/fun";
56
59
  import {questionMapper} from '@src/common/const.ts'
60
+ import bus from "@/assets/js/bus";
57
61
 
58
62
  interface dataInterface{
59
63
  autoSubmitTimer:any,
@@ -63,7 +67,8 @@ interface dataInterface{
63
67
  }>,
64
68
  loading:boolean,
65
69
  warnVisible:boolean,
66
- warnText:string
70
+ warnText:string,
71
+ eventBus:any
67
72
  }
68
73
 
69
74
  interface responsiveData{
@@ -81,7 +86,11 @@ export default defineComponent({
81
86
  TimeCounter
82
87
  },
83
88
  setup(props,context) {
89
+ const currentInstance:any = getCurrentInstance()
90
+ let _this = currentInstance.proxy
91
+ const {token} = rootUseState(['token'])
84
92
  const {useState, useActions,useMutations} = createNamespacedHelpers('exam'); // specific module name
93
+ let {userId} = useState(['userId'])
85
94
  const {getExamReviewActions} = useActions(['getExamReviewActions'])
86
95
  let route = useRoute()
87
96
  let router = useRouter()
@@ -89,6 +98,7 @@ export default defineComponent({
89
98
  let allQuestionList:Array<any> = []
90
99
  //不需要响应式或者写死的数据放里面
91
100
  let data:dataInterface = reactive({
101
+ eventBus:bus,
92
102
  autoSubmitTimer:null,
93
103
  tabList:[{name:'全部',type:'1',checked:true},{name:'错题',type:'2',checked:false}],
94
104
  loading:false,
@@ -125,6 +135,503 @@ export default defineComponent({
125
135
  let res = {
126
136
  "data": {
127
137
  "question_list": [
138
+ {
139
+ "question_type_str": "编程题",
140
+ "data_mode": 1,
141
+ "correct_judge": "",
142
+ "is_auto_check": "",
143
+ "content": "[{\"<>\":\"p\",\"text\":\"1、准备工作\"},{\"<>\":\"p\",\"text\":\" (1) 选择背景 Desert,Galaxy;\"},{\"<>\":\"p\",\"text\":\" (2) 选择角色 Rocketship。\"},{\"<>\":\"p\",\"text\":\" 2、功能实现\"},{\"<>\":\"p\",\"text\":\" (1)火箭初始造型为 rocketship-a,初始位置为舞台下端,初始背景为 Dessert;\"},{\"<>\":\"p\",\"text\":\" (2)点击绿旗,火箭垂直向上移动,一直移动到舞台顶端,并在移动过 程中切换造型;\"},{\"<>\":\"p\",\"text\":\" (3)当火箭达到舞台顶端时,背景切换为 Galaxy;\"},{\"<>\":\"p\",\"html\":[{\"<>\":\"span\",\"style\":\"\",\"text\":\" (4)火箭最后移到舞台下端的位置(初始位置),造型不限。\"}]},{\"<>\":\"p\",\"html\":[{\"<>\":\"span\",\"style\":\"\",\"html\":[{\"<>\":\"img\",\"src\":\"https://dev-resource.thedeer.cn/pre/resource-testing/image/3ae47ad6586554f0cd57b4858b800034qve9a1g4zs6twrc5.jpg\",\"width\":\"89\",\"height\":\"89\",\"base_src\":\"resource-testing/image/3ae47ad6586554f0cd57b4858b800034qve9a1g4zs6twrc5.jpg\"}]}]}]",
144
+ "correct_subjective_answer": "",
145
+ "auto_check": false,
146
+ "options_data": [],
147
+ "score": "30.00",
148
+ "sub_questions": [],
149
+ "style_type": "CODING",
150
+ "template_file_full_url": "https://dev-resource.thedeer.cn/pre/resource-testing/coding/d489ef8637c0198c9905b9628536ef875jsskgofnaulimvh.sb3",
151
+ "question_name": "1、准备工作 (1) 选择背景 Desert,Galaxy; (2) 选择角色 Rocketship。 2、功能实现 (1)火箭初始造型为 rocketship-a,初始位置为舞台下端,初始背景为 Dessert; (2)点击绿旗,火箭垂直向上移动,一直移动到舞台顶端,并在移动过 程中切换造型; (3)当火箭达到舞台顶端时,背景切换为 Galaxy; (4)火箭最后移到舞台下端的位置(初始位置),造型不限。",
152
+ "correct_rate": "",
153
+ "knowledge_name": "",
154
+ "page_location_list": [],
155
+ "code_type": 1,
156
+ "difficulty_level": "2",
157
+ "question_index": "",
158
+ "correct_single_index": 0,
159
+ "question_type": "16",
160
+ "media_resources": [],
161
+ "analysis": "[{\"<>\":\"p\",\"text\":\"我是编程题解析!!\"}]",
162
+ "question_id": "12918",
163
+ "difficulty_level_str": "困难",
164
+ "update_date": "2023-05-13 10:09:59",
165
+ "exam_options_data": [],
166
+ "exam_link_answer_data": [],
167
+ "reference_file_full_url": "",
168
+ "correct_multiple_index_set": [],
169
+ "hint": "飞向太空",
170
+ "knowledge_id": ""
171
+ },
172
+ {
173
+ "question_type_str": "填空题",
174
+ "data_mode": 1,
175
+ "correct_judge": "",
176
+ "is_auto_check": "",
177
+ "content": "[{\"<>\":\"p\",\"html\":[{\"<>\":\"span\",\"style\":\"\",\"text\":\"六年级数学课程特色是: \"},{\"<>\":\"span\",\"style\":\"display:inline-block; line-height:1.2; text-align:center; padding:0 1.5em; border:0; border-bottom: 1px solid #000; color:#E6A23C;\",\"html\":[{\"<>\":\"span\",\"text\":\"①\"},{\"<>\":\"span\",\"style\":\"\"}],\"data_key\":\"fill-blank-6281256\",\"class\":\"fill-blank\"},{\"<>\":\"span\",\"style\":\"\"},{\"<>\":\"span\",\"style\":\"\",\"text\":\"学习,循环巩固; \"},{\"<>\":\"span\",\"style\":\"display:inline-block; line-height:1.2; text-align:center; padding:0 1.5em; border:0; border-bottom: 1px solid #000; color:#E6A23C;\",\"html\":[{\"<>\":\"span\",\"text\":\"②\"},{\"<>\":\"span\",\"style\":\"\"}],\"data_key\":\"fill-blank-11845542\",\"class\":\"fill-blank\"},{\"<>\":\"span\",\"style\":\"\"},{\"<>\":\"span\",\"style\":\"\",\"text\":\"教学,因材施教;精选精讲, \"},{\"<>\":\"span\",\"style\":\"display:inline-block; line-height:1.2; text-align:center; padding:0 1.5em; border:0; border-bottom: 1px solid #000; color:#E6A23C;\",\"html\":[{\"<>\":\"span\",\"text\":\"③\"},{\"<>\":\"span\",\"style\":\"\"}],\"data_key\":\"fill-blank-95523722\",\"class\":\"fill-blank\"},{\"<>\":\"span\",\"style\":\"\"},{\"<>\":\"span\",\"style\":\"\",\"html\":[{\"<>\":\"font\",\"text\":\"练习; \"},{\"<>\":\"span\",\"style\":\"display:inline-block; line-height:1.2; text-align:center; padding:0 1.5em; border:0; border-bottom: 1px solid #000; color:#E6A23C;\",\"html\":[{\"<>\":\"span\",\"text\":\"④\"}],\"data_key\":\"fill-blank-5441657\",\"class\":\"fill-blank\"},{\"<>\":\"font\",\"text\":\"进阶,循环巩固。\"}]},{\"<>\":\"span\",\"style\":\"\"}]}]",
178
+ "correct_subjective_answer": "",
179
+ "auto_check": true,
180
+ "options_data": [],
181
+ "score": "2.00",
182
+ "sub_questions": [],
183
+ "style_type": "",
184
+ "template_file_full_url": "",
185
+ "question_name": "六年级数学课程特色是: ①学习,循环巩固; ②教学,因材施教;精选精讲, ③练习; ④进阶,循环巩固。",
186
+ "correct_rate": "",
187
+ "knowledge_name": "中学",
188
+ "page_location_list": [],
189
+ "code_type": 0,
190
+ "difficulty_level": "1",
191
+ "question_index": "",
192
+ "correct_single_index": 0,
193
+ "question_type": "4",
194
+ "media_resources": [],
195
+ "analysis": "[{\"<>\":\"p\",\"html\":[{\"<>\":\"br\"}]}]",
196
+ "question_id": "2433",
197
+ "difficulty_level_str": "简单",
198
+ "update_date": "2019-12-18 19:18:05",
199
+ "exam_options_data": [],
200
+ "exam_link_answer_data": [],
201
+ "reference_file_full_url": "",
202
+ "correct_multiple_index_set": [],
203
+ "hint": "Read and write.(填空题)",
204
+ "knowledge_id": "193"
205
+ },
206
+ {
207
+ "question_type_str": "简答题",
208
+ "data_mode": 1,
209
+ "correct_judge": "",
210
+ "is_auto_check": "",
211
+ "content": "[{\"<>\":\"p\",\"html\":[{\"<>\":\"img\",\"src\":\"https://dev-resource.thedeer.cn/pre/resource-testing/image/189cf50d746bb69d3337f5b0787a3febcmizk0vlpx5fdfh6.jpg\",\"base_src\":\"resource-testing/image/189cf50d746bb69d3337f5b0787a3febcmizk0vlpx5fdfh6.jpg\"}]},{\"<>\":\"p\",\"text\":\"Hello, I'm_________\"},{\"<>\":\"p\",\"text\":\"I_________on Mondays, I________on Tuesdays,\"},{\"<>\":\"p\",\"text\":\"I_________on Wednesdays, I_____ on Thursdays,\"},{\"<>\":\"p\",\"html\":[{\"<>\":\"span\",\"text\":\"I_________\"},{\"<>\":\"span\",\"style\":\"\",\"text\":\"on Fridays, I ____on Saturdays,\"}]},{\"<>\":\"p\",\"text\":\"I____ on Sundays.\"},{\"<>\":\"p\",\"html\":[{\"<>\":\"br\"}]}]",
212
+ "correct_subjective_answer": "",
213
+ "auto_check": false,
214
+ "options_data": [],
215
+ "score": "5.00",
216
+ "sub_questions": [],
217
+ "style_type": "BRIEF",
218
+ "template_file_full_url": "",
219
+ "question_name": "Hello, I'm_________I_________on Mondays, I________on Tuesdays,I_________on Wednesdays, I_____ on Thursdays,I_________on Fridays, I ____on Saturdays,I____ on Sundays.",
220
+ "correct_rate": "",
221
+ "knowledge_name": "",
222
+ "page_location_list": [],
223
+ "code_type": 0,
224
+ "difficulty_level": "1",
225
+ "question_index": "",
226
+ "correct_single_index": 0,
227
+ "question_type": "7",
228
+ "media_resources": [],
229
+ "analysis": "[{\"<>\":\"p\",\"text\":\"我是简答题解析!!\"}]",
230
+ "question_id": "3104",
231
+ "difficulty_level_str": "简单",
232
+ "update_date": "2020-06-17 16:20:30",
233
+ "exam_options_data": [],
234
+ "exam_link_answer_data": [],
235
+ "reference_file_full_url": "",
236
+ "correct_multiple_index_set": [],
237
+ "hint": "主观题",
238
+ "knowledge_id": ""
239
+ },
240
+ {
241
+ "question_type_str": "阅读理解题",
242
+ "data_mode": 1,
243
+ "correct_judge": "",
244
+ "is_auto_check": "",
245
+ "content": "[{\"<>\":\"p\",\"text\":\"      There is no denying that students should learn something about how computers work, just as we expect them at least to understand that the internal-combustion engine (内燃机) has something to do with burning fuel, expanding gases and pistons  (活塞) being driven. For people should have some basic idea of how the things that they use do what they do. Further, students might be helped by a course that considers the computer’s impact on society. But that is not what is meant by computer literacy. For computer literacy is not a form of literacy (读写能力); it is a trade skill that should not be taught as a liberal art.\"},{\"<>\":\"p\",\"text\":\"     Learning how to use a computer and learning how to program one are two distinct activities. A case might be made that the competent citizens of tomorrow should free themselves from their fear of computers. But this is quite different from saying that all ought to know how to program one. Leave that to people who have chosen programming as a career. While programming can be lots of fun, and while our society needs some people who are experts at it, the same is true of auto repair and violin-making.\"},{\"<>\":\"p\",\"text\":\"      Learning how to use a computer is not that difficu1t, and it gets easier all the time as programs become more “user-friendly”. Let us assume that in the future everyone is going to have to know how to use a computer to be a competent citizen. What does the phrase “learning to use a computer” mean? It sounds like “learning to drive a car”, that is, it sounds as if there is some set of definite skills that, once acquired, enable one to use a computer.\"},{\"<>\":\"p\",\"text\":\"In fact, “learning to use a computer” is much more like “learning to play a game”, but learning the rules of one game may not he1p you play a second game, whose rules may not be the same. There is no such a thing as teaching someone how to use a computer. One can only teach people to use this or that program and generally that is easily accomplished.\"},{\"<>\":\"p\",\"html\":[{\"<>\":\"br\"}]}]",
246
+ "correct_subjective_answer": "",
247
+ "auto_check": true,
248
+ "options_data": [],
249
+ "score": "5.00",
250
+ "sub_questions": [
251
+ {
252
+ "question_type_str": "单选题",
253
+ "data_mode": 2,
254
+ "correct_judge": "",
255
+ "is_auto_check": "",
256
+ "content": "To be the competent citizens of tomorrow, people should _____________.",
257
+ "correct_subjective_answer": "",
258
+ "auto_check": true,
259
+ "options_data": [
260
+ {
261
+ "file_url": "",
262
+ "content_type": 1,
263
+ "file_type": 0,
264
+ "name": "",
265
+ "id": 0,
266
+ "thumbnail_url": "",
267
+ "option_content": " try to lay a solid foundation in computer science"
268
+ },
269
+ {
270
+ "file_url": "",
271
+ "content_type": 1,
272
+ "file_type": 0,
273
+ "name": "",
274
+ "id": 0,
275
+ "thumbnail_url": "",
276
+ "option_content": " be aware of how the things that they use do what they do"
277
+ },
278
+ {
279
+ "file_url": "",
280
+ "content_type": 1,
281
+ "file_type": 0,
282
+ "name": "",
283
+ "id": 0,
284
+ "thumbnail_url": "",
285
+ "option_content": " learn to use a computer by acquiring a certain set of skills"
286
+ },
287
+ {
288
+ "file_url": "",
289
+ "content_type": 1,
290
+ "file_type": 0,
291
+ "name": "",
292
+ "id": 0,
293
+ "thumbnail_url": "",
294
+ "option_content": "understand that programming a computer is more essential than repairing a car"
295
+ }
296
+ ],
297
+ "score": "100",
298
+ "sub_questions": [],
299
+ "style_type": "",
300
+ "template_file_full_url": "",
301
+ "question_name": "To be the competent citizens of tomorrow, people should _____________.",
302
+ "correct_rate": "",
303
+ "knowledge_name": "",
304
+ "page_location_list": [],
305
+ "code_type": 0,
306
+ "difficulty_level": "0",
307
+ "question_index": "",
308
+ "correct_single_index": 0,
309
+ "question_type": "1",
310
+ "media_resources": [],
311
+ "analysis": "[{\"<>\":\"p\",\"text\":\"我是第一题解析!!\"}]",
312
+ "question_id": "13118",
313
+ "difficulty_level_str": "未知",
314
+ "update_date": "",
315
+ "exam_options_data": [
316
+ {
317
+ "data": {
318
+ "file_url": "",
319
+ "content_type": 1,
320
+ "file_type": 0,
321
+ "name": "",
322
+ "id": 0,
323
+ "thumbnail_url": "",
324
+ "option_content": " try to lay a solid foundation in computer science"
325
+ },
326
+ "index": 1
327
+ },
328
+ {
329
+ "data": {
330
+ "file_url": "",
331
+ "content_type": 1,
332
+ "file_type": 0,
333
+ "name": "",
334
+ "id": 0,
335
+ "thumbnail_url": "",
336
+ "option_content": " be aware of how the things that they use do what they do"
337
+ },
338
+ "index": 2
339
+ },
340
+ {
341
+ "data": {
342
+ "file_url": "",
343
+ "content_type": 1,
344
+ "file_type": 0,
345
+ "name": "",
346
+ "id": 0,
347
+ "thumbnail_url": "",
348
+ "option_content": " learn to use a computer by acquiring a certain set of skills"
349
+ },
350
+ "index": 3
351
+ },
352
+ {
353
+ "data": {
354
+ "file_url": "",
355
+ "content_type": 1,
356
+ "file_type": 0,
357
+ "name": "",
358
+ "id": 0,
359
+ "thumbnail_url": "",
360
+ "option_content": "understand that programming a computer is more essential than repairing a car"
361
+ },
362
+ "index": 4
363
+ }
364
+ ],
365
+ "exam_link_answer_data": [],
366
+ "reference_file_full_url": "",
367
+ "correct_multiple_index_set": [],
368
+ "hint": "",
369
+ "knowledge_id": ""
370
+ },
371
+ {
372
+ "question_type_str": "单选题",
373
+ "data_mode": 2,
374
+ "correct_judge": "",
375
+ "is_auto_check": "",
376
+ "content": "In the second paragraph “violin-making” is mentioned to show that_____________.",
377
+ "correct_subjective_answer": "",
378
+ "auto_check": true,
379
+ "options_data": [
380
+ {
381
+ "file_url": "",
382
+ "content_type": 1,
383
+ "file_type": 0,
384
+ "name": "",
385
+ "id": 0,
386
+ "thumbnail_url": "",
387
+ "option_content": "programming a computer is as interesting as making a violin"
388
+ },
389
+ {
390
+ "file_url": "",
391
+ "content_type": 1,
392
+ "file_type": 0,
393
+ "name": "",
394
+ "id": 0,
395
+ "thumbnail_url": "",
396
+ "option_content": "our society needs experts in different fields"
397
+ },
398
+ {
399
+ "file_url": "",
400
+ "content_type": 1,
401
+ "file_type": 0,
402
+ "name": "",
403
+ "id": 0,
404
+ "thumbnail_url": "",
405
+ "option_content": "violin-making requires as much skill as computer programming"
406
+ },
407
+ {
408
+ "file_url": "",
409
+ "content_type": 1,
410
+ "file_type": 0,
411
+ "name": "",
412
+ "id": 0,
413
+ "thumbnail_url": "",
414
+ "option_content": "people who can use a computer don't necessarily have to know computer programming"
415
+ }
416
+ ],
417
+ "score": "100",
418
+ "sub_questions": [],
419
+ "style_type": "",
420
+ "template_file_full_url": "",
421
+ "question_name": "In the second paragraph “violin-making” is mentioned to show that_____________.",
422
+ "correct_rate": "",
423
+ "knowledge_name": "",
424
+ "page_location_list": [],
425
+ "code_type": 0,
426
+ "difficulty_level": "0",
427
+ "question_index": "",
428
+ "correct_single_index": 0,
429
+ "question_type": "1",
430
+ "media_resources": [],
431
+ "analysis": "[{\"<>\":\"p\",\"text\":\"我是第二题解析!!\"}]",
432
+ "question_id": "13119",
433
+ "difficulty_level_str": "未知",
434
+ "update_date": "",
435
+ "exam_options_data": [
436
+ {
437
+ "data": {
438
+ "file_url": "",
439
+ "content_type": 1,
440
+ "file_type": 0,
441
+ "name": "",
442
+ "id": 0,
443
+ "thumbnail_url": "",
444
+ "option_content": "programming a computer is as interesting as making a violin"
445
+ },
446
+ "index": 1
447
+ },
448
+ {
449
+ "data": {
450
+ "file_url": "",
451
+ "content_type": 1,
452
+ "file_type": 0,
453
+ "name": "",
454
+ "id": 0,
455
+ "thumbnail_url": "",
456
+ "option_content": "our society needs experts in different fields"
457
+ },
458
+ "index": 2
459
+ },
460
+ {
461
+ "data": {
462
+ "file_url": "",
463
+ "content_type": 1,
464
+ "file_type": 0,
465
+ "name": "",
466
+ "id": 0,
467
+ "thumbnail_url": "",
468
+ "option_content": "violin-making requires as much skill as computer programming"
469
+ },
470
+ "index": 3
471
+ },
472
+ {
473
+ "data": {
474
+ "file_url": "",
475
+ "content_type": 1,
476
+ "file_type": 0,
477
+ "name": "",
478
+ "id": 0,
479
+ "thumbnail_url": "",
480
+ "option_content": "people who can use a computer don't necessarily have to know computer programming"
481
+ },
482
+ "index": 4
483
+ }
484
+ ],
485
+ "exam_link_answer_data": [],
486
+ "reference_file_full_url": "",
487
+ "correct_multiple_index_set": [],
488
+ "hint": "",
489
+ "knowledge_id": ""
490
+ }
491
+ ],
492
+ "style_type": "READ_R",
493
+ "template_file_full_url": "",
494
+ "question_name": "      There is no denying that students should learn something about how computers work, just as we expect them at least to understand that the internal-combustion engine (内燃机) has something to do with burning fuel, expanding gases and pistons  (活塞) being driven. For people should have some basic idea of how the things that they use do what they do. Further, students might be helped by a course that considers the computer’s impact on society. But that is not what is meant by computer literacy. For computer literacy is not a form of literacy (读写能力); it is a trade skill that should not be taught as a liberal art.     Learning how to use a computer and learning how to program one are two distinct activities. A case might be made that the competent citizens of tomorrow should free themselves from their fear of computers. But this is quite different from saying that all ought to know how to program one. Leave that to people who have chosen programming as a career. While programming can be lots of fun, and while our society needs some people who are experts at it, the same is true of auto repair and violin-making.      Learning how to use a computer is not that difficu1t, and it gets easier all the time as programs become more “user-friendly”. Let us assume that in the future everyone is going to have to know how to use a computer to be a competent citizen. What does the phrase “learning to use a computer” mean? It sounds like “learning to drive a car”, that is, it sounds as if there is some set of definite skills that, once acquired, enable one to use a computer.In fact, “learning to use a computer” is much more like “learning to play a game”, but learning the rules of one game may not he1p you play a second game, whose rules may not be the same. There is no such a thing as teaching someone how to use a computer. One can only teach people to use this or that program and generally that is easily accomplished.",
495
+ "correct_rate": "",
496
+ "knowledge_name": "",
497
+ "page_location_list": [],
498
+ "code_type": 0,
499
+ "difficulty_level": "2",
500
+ "question_index": "",
501
+ "correct_single_index": 0,
502
+ "question_type": "11",
503
+ "media_resources": [],
504
+ "analysis": "",
505
+ "question_id": "13123",
506
+ "difficulty_level_str": "困难",
507
+ "update_date": "",
508
+ "exam_options_data": [],
509
+ "exam_link_answer_data": [],
510
+ "reference_file_full_url": "",
511
+ "correct_multiple_index_set": [],
512
+ "hint": "Reading.B",
513
+ "knowledge_id": ""
514
+ },
515
+ {
516
+ "question_type_str": "多选题",
517
+ "data_mode": 1,
518
+ "correct_judge": "",
519
+ "is_auto_check": "",
520
+ "content": "[{\"<>\":\"p\",\"text\":\"如果角色想在舞台上呈现多种时尚穿戴,应该使用以下哪种积 木?\"}]",
521
+ "correct_subjective_answer": "",
522
+ "auto_check": true,
523
+ "options_data": [
524
+ {
525
+ "file_url": "https://dev-resource.thedeer.cn/pre/resource-media/image/4aa9ef2cc18fbaa10bd7260598c47a03x9x34xv4b0rg2zjv.png-quality_80",
526
+ "content_type": 2,
527
+ "file_type": 1,
528
+ "name": "01",
529
+ "id": 3450,
530
+ "thumbnail_url": "",
531
+ "option_content": "3450"
532
+ },
533
+ {
534
+ "file_url": "https://dev-resource.thedeer.cn/pre/resource-media/image/683cfb2ce022c4fc1b7c12d8ecf045e8bn5n4y03uobvtg7d.png-quality_80",
535
+ "content_type": 2,
536
+ "file_type": 1,
537
+ "name": "02",
538
+ "id": 3451,
539
+ "thumbnail_url": "",
540
+ "option_content": "3451"
541
+ },
542
+ {
543
+ "file_url": "https://dev-resource.thedeer.cn/pre/resource-media/image/7413e421584f4c14eafb3d9ffed29fdbz0ovou38mhw6oeww.png-quality_80",
544
+ "content_type": 2,
545
+ "file_type": 1,
546
+ "name": "03",
547
+ "id": 3452,
548
+ "thumbnail_url": "",
549
+ "option_content": "3452"
550
+ },
551
+ {
552
+ "file_url": "https://dev-resource.thedeer.cn/pre/resource-media/image/a8d3af78518632174fb853544d36672cn4g1bnsuzrsuke1d.png-quality_80",
553
+ "content_type": 2,
554
+ "file_type": 1,
555
+ "name": "04",
556
+ "id": 3453,
557
+ "thumbnail_url": "",
558
+ "option_content": "3453"
559
+ }
560
+ ],
561
+ "score": "8.00",
562
+ "sub_questions": [],
563
+ "style_type": "SELECT_R-P",
564
+ "template_file_full_url": "",
565
+ "question_name": "如果角色想在舞台上呈现多种时尚穿戴,应该使用以下哪种积 木?",
566
+ "correct_rate": "",
567
+ "knowledge_name": "",
568
+ "page_location_list": [],
569
+ "code_type": 0,
570
+ "difficulty_level": "1",
571
+ "question_index": "",
572
+ "correct_single_index": 0,
573
+ "question_type": "2",
574
+ "media_resources": [],
575
+ "analysis": "[{\"<>\":\"p\",\"text\":\"我是多选题解析!!\"}]",
576
+ "question_id": "12919",
577
+ "difficulty_level_str": "简单",
578
+ "update_date": "2022-05-19 11:37:23",
579
+ "exam_options_data": [
580
+ {
581
+ "data": {
582
+ "file_url": "https://dev-resource.thedeer.cn/pre/resource-media/image/4aa9ef2cc18fbaa10bd7260598c47a03x9x34xv4b0rg2zjv.png-quality_80",
583
+ "content_type": 2,
584
+ "file_type": 1,
585
+ "name": "01",
586
+ "id": 3450,
587
+ "thumbnail_url": "",
588
+ "option_content": "3450"
589
+ },
590
+ "index": 1
591
+ },
592
+ {
593
+ "data": {
594
+ "file_url": "https://dev-resource.thedeer.cn/pre/resource-media/image/683cfb2ce022c4fc1b7c12d8ecf045e8bn5n4y03uobvtg7d.png-quality_80",
595
+ "content_type": 2,
596
+ "file_type": 1,
597
+ "name": "02",
598
+ "id": 3451,
599
+ "thumbnail_url": "",
600
+ "option_content": "3451"
601
+ },
602
+ "index": 2
603
+ },
604
+ {
605
+ "data": {
606
+ "file_url": "https://dev-resource.thedeer.cn/pre/resource-media/image/7413e421584f4c14eafb3d9ffed29fdbz0ovou38mhw6oeww.png-quality_80",
607
+ "content_type": 2,
608
+ "file_type": 1,
609
+ "name": "03",
610
+ "id": 3452,
611
+ "thumbnail_url": "",
612
+ "option_content": "3452"
613
+ },
614
+ "index": 3
615
+ },
616
+ {
617
+ "data": {
618
+ "file_url": "https://dev-resource.thedeer.cn/pre/resource-media/image/a8d3af78518632174fb853544d36672cn4g1bnsuzrsuke1d.png-quality_80",
619
+ "content_type": 2,
620
+ "file_type": 1,
621
+ "name": "04",
622
+ "id": 3453,
623
+ "thumbnail_url": "",
624
+ "option_content": "3453"
625
+ },
626
+ "index": 4
627
+ }
628
+ ],
629
+ "exam_link_answer_data": [],
630
+ "reference_file_full_url": "",
631
+ "correct_multiple_index_set": [],
632
+ "hint": "根据题目要求作答",
633
+ "knowledge_id": ""
634
+ },
128
635
  {
129
636
  "question_type_str": "单选题",
130
637
  "data_mode": 1,
@@ -375,6 +882,53 @@ export default defineComponent({
375
882
  "applicant_name": "李老丹"
376
883
  },
377
884
  "user_answer_map": {
885
+ "12918":{
886
+ "answer_use_time": 0,
887
+ "scratch_answer_json": "",
888
+ "question_type": 0,
889
+ "code_file_oss_temp_path": "coding_temp/20230726/983f527ba282f8dd4f475bd8930a71d8av48t9vp2nifa492.sb3",
890
+ "multiple_index_set": [],
891
+ "single_index": 0,
892
+ "judge": false,
893
+ "question_id": 12918,
894
+ "is_correct": "",
895
+ "gap_data": [],
896
+ "subjective_answer": "",
897
+ "oss_temp_url": "https://zykj-resource-repository-dev.oss-cn-hangzhou.aliyuncs.com/coding_temp/20230726/983f527ba282f8dd4f475bd8930a71d8av48t9vp2nifa492.sb3"
898
+ },
899
+ "2433":{
900
+ "answer_use_time": 0,
901
+ "scratch_answer_json": "",
902
+ "question_type": 0,
903
+ "code_file_oss_temp_path": "",
904
+ "multiple_index_set": [],
905
+ "single_index": 0,
906
+ "judge": false,
907
+ "question_id": 2433,
908
+ "is_correct": "",
909
+ "gap_data": [
910
+ "",
911
+ "",
912
+ "121212121212121121212121212",
913
+ ""
914
+ ],
915
+ "subjective_answer": "",
916
+ "oss_temp_url": ""
917
+ },
918
+ "3104":{
919
+ "answer_use_time": 0,
920
+ "scratch_answer_json": "",
921
+ "question_type": 0,
922
+ "code_file_oss_temp_path": "",
923
+ "multiple_index_set": [],
924
+ "single_index": 0,
925
+ "judge": false,
926
+ "question_id": 3104,
927
+ "is_correct": "",
928
+ "gap_data": [],
929
+ "subjective_answer": "66666666666",
930
+ "oss_temp_url": ""
931
+ },
378
932
  "13091": {
379
933
  "answer_use_time": 0,
380
934
  "scratch_answer_json": "",
@@ -402,6 +956,52 @@ export default defineComponent({
402
956
  "gap_data": [],
403
957
  "subjective_answer": "",
404
958
  "oss_temp_url": ""
959
+ },
960
+ "12919":{
961
+ "answer_use_time": 0,
962
+ "scratch_answer_json": "",
963
+ "question_type": 0,
964
+ "code_file_oss_temp_path": "",
965
+ "multiple_index_set": [
966
+ 1,
967
+ 2,
968
+ 3
969
+ ],
970
+ "single_index": 0,
971
+ "judge": false,
972
+ "question_id": 12919,
973
+ "is_correct": "0",
974
+ "gap_data": [],
975
+ "subjective_answer": "",
976
+ "oss_temp_url": ""
977
+ },
978
+ "13118":{
979
+ "answer_use_time": 0,
980
+ "scratch_answer_json": "",
981
+ "question_type": 0,
982
+ "code_file_oss_temp_path": "",
983
+ "multiple_index_set": [],
984
+ "single_index": 3,
985
+ "judge": false,
986
+ "question_id": 13118,
987
+ "is_correct": "",
988
+ "gap_data": [],
989
+ "subjective_answer": "",
990
+ "oss_temp_url": ""
991
+ },
992
+ "13119":{
993
+ "answer_use_time": 0,
994
+ "scratch_answer_json": "",
995
+ "question_type": 0,
996
+ "code_file_oss_temp_path": "",
997
+ "multiple_index_set": [],
998
+ "single_index": 1,
999
+ "judge": false,
1000
+ "question_id": 13119,
1001
+ "is_correct": "",
1002
+ "gap_data": [],
1003
+ "subjective_answer": "",
1004
+ "oss_temp_url": ""
405
1005
  }
406
1006
  }
407
1007
  },
@@ -412,7 +1012,7 @@ export default defineComponent({
412
1012
  }
413
1013
  let {question_list,user_answer_map} = res.data
414
1014
  responsiveObj.value.resData = res.data
415
- parseQuestionListItem(question_list,user_answer_map)
1015
+ _this.parseQuestionListItem('analysis',question_list,user_answer_map)
416
1016
  //错题
417
1017
  errQuestionList = (fun.copyDeepObject(question_list) as Array<any>).filter((item:any)=>{
418
1018
  return item.answerMap && item.answerMap.is_correct === '0'
@@ -422,8 +1022,13 @@ export default defineComponent({
422
1022
  responsiveObj.value.questionListMapper = {'1':allQuestionList,'2':errQuestionList}
423
1023
  responsiveObj.value.questionList = question_list
424
1024
  }
1025
+ function getUrlQuery(item:any){
1026
+ let canEditQuery = route.name === 'examIndex' ? 'canEdit=1' : 'canEdit=0'
1027
+ let urlQuery = `token=${token.value}&tmplUrl=${item.template_file_full_url}&isExam=1&examId=${route.query.examId}&questionId=${item.question_id}&${canEditQuery}&userId=${userId.value}`
1028
+ return urlQuery
1029
+ }
425
1030
 
426
-
1031
+ /*
427
1032
  function parseQuestionListItem(question_list:Array<any>,answer_map:any,parentIndex:any = undefined){
428
1033
  question_list.forEach((item:any,index:number)=>{
429
1034
  item.questionComponent = questionMapper[item.question_type]
@@ -479,25 +1084,32 @@ export default defineComponent({
479
1084
  }
480
1085
  }
481
1086
 
482
- //转化富文本
1087
+ //转化content富文本
483
1088
  try{
484
1089
  item.htmlContent = $.json2html({}, JSON.parse(item.content));
1090
+ }catch(e){
1091
+ item.htmlContent = item.content
1092
+ }
1093
+ //转化analysis富文本
1094
+ try{
485
1095
  if(item.analysis){
486
1096
  item.analysisHtmlContent = $.json2html({}, JSON.parse(item.analysis));
487
1097
  }else{
488
1098
  item.analysisHtmlContent = ''
489
1099
  }
490
1100
  }catch(e){
491
- item.htmlContent = item.content
492
1101
  item.analysisHtmlContent = item.analysis
493
- // console.log('json2html转化出错:', e);
494
1102
  }
1103
+
1104
+
1105
+
495
1106
  //如果是阅读题要递归解析
496
1107
  if(item.sub_questions && item.sub_questions.length){
497
1108
  parseQuestionListItem(item.sub_questions,answer_map,index)
498
1109
  }
499
1110
  })
500
1111
  }
1112
+ */
501
1113
 
502
1114
  function quitQuestion(){
503
1115
  fun.postMessageByType('close')
@@ -506,7 +1118,8 @@ export default defineComponent({
506
1118
  ...toRefs(data),
507
1119
  responsiveObj,
508
1120
  clickTab,
509
- quitQuestion
1121
+ quitQuestion,
1122
+ getUrlQuery
510
1123
  }
511
1124
  }
512
1125
  })