@zykjcommon/questions 0.0.43 → 0.0.44

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.
@@ -260,12 +260,12 @@ export default {
260
260
  this.iframe = node
261
261
  //用于浮动倒计时样式
262
262
  this.enterCode = true
263
- this.bus.$emit('enterCode',true)
263
+ this.bus.$emit && this.bus.$emit('enterCode',true)
264
264
  },
265
265
  //只关闭iframe不保存(考试已经结束)
266
266
  closeIframe(){
267
267
  this.enterCode = false
268
- this.bus.$emit('enterCode',false)
268
+ this.bus.$emit && this.bus.$emit('enterCode',false)
269
269
  this.showFrame = false
270
270
  },
271
271
  //关闭iframe并且保存(考试中)
@@ -281,7 +281,7 @@ export default {
281
281
  this.code_file_oss_temp_path = res.codeFileOssTempPath
282
282
  this.oss_temp_url = res.ossTempUrl
283
283
  this.scratch_answer_json = res.scratch_answer_json
284
- this.bus.$emit('submitQuestion',{saveType:1,submitRequestAutoQuit:false,needSubmitRequest:false})
284
+ this.bus.$emit && this.bus.$emit('submitQuestion',{saveType:1,submitRequestAutoQuit:false,needSubmitRequest:false})
285
285
  let answered = this.isAnswered()
286
286
  this.mode === 'exam' && this.bus.$emit('questionCardChange',{
287
287
  questionIndex:self.questionInfo.questionIndex - 1,
@@ -293,7 +293,7 @@ export default {
293
293
  this.code_file_oss_temp_path = res.codeFileOssTempPath
294
294
  this.oss_temp_url = res.ossTempUrl
295
295
  this.scratch_answer_json = res.scratch_answer_json
296
- this.bus.$emit('uploadCodingFileSuccess')
296
+ this.bus.$emit && this.bus.$emit('uploadCodingFileSuccess')
297
297
  }
298
298
  },
299
299
  components:{
@@ -118,40 +118,6 @@ export default defineComponent({
118
118
  "size": 23,
119
119
  "question_list": [
120
120
  {
121
- "question_type_str": "编程题",
122
- "data_mode": 1,
123
- "correct_judge": "",
124
- "is_auto_check": "",
125
- "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\"}]}]}]",
126
- "correct_subjective_answer": "",
127
- "auto_check": false,
128
- "options_data": [],
129
- "score": "30.00",
130
- "sub_questions": [],
131
- "style_type": "CODING",
132
- "template_file_full_url": "https://dev-resource.thedeer.cn/pre/resource-testing/coding/d489ef8637c0198c9905b9628536ef875jsskgofnaulimvh.sb3",
133
- "question_name": "1、准备工作 (1) 选择背景 Desert,Galaxy; (2) 选择角色 Rocketship。 2、功能实现 (1)火箭初始造型为 rocketship-a,初始位置为舞台下端,初始背景为 Dessert; (2)点击绿旗,火箭垂直向上移动,一直移动到舞台顶端,并在移动过 程中切换造型; (3)当火箭达到舞台顶端时,背景切换为 Galaxy; (4)火箭最后移到舞台下端的位置(初始位置),造型不限。",
134
- "correct_rate": "",
135
- "knowledge_name": "",
136
- "page_location_list": [],
137
- "code_type": 1,
138
- "difficulty_level": "2",
139
- "question_index": "",
140
- "correct_single_index": 0,
141
- "question_type": "16",
142
- "media_resources": [],
143
- "analysis": "",
144
- "question_id": "12918",
145
- "difficulty_level_str": "困难",
146
- "update_date": "2023-05-13 10:09:59",
147
- "exam_options_data": [],
148
- "exam_link_answer_data": [],
149
- "reference_file_full_url": "",
150
- "correct_multiple_index_set": [],
151
- "hint": "飞向太空",
152
- "knowledge_id": ""
153
- }
154
- /*{
155
121
  "question_type_str": "分类题",
156
122
  "is_need_judge": "",
157
123
  "read_audio_url": "",
@@ -440,7 +406,41 @@ export default defineComponent({
440
406
  "judge_percent": "",
441
407
  "knowledge_id": "367",
442
408
  "read_content": ""
443
- }*/
409
+ },
410
+ {
411
+ "question_type_str": "编程题",
412
+ "data_mode": 1,
413
+ "correct_judge": "",
414
+ "is_auto_check": "",
415
+ "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\"}]}]}]",
416
+ "correct_subjective_answer": "",
417
+ "auto_check": false,
418
+ "options_data": [],
419
+ "score": "30.00",
420
+ "sub_questions": [],
421
+ "style_type": "CODING",
422
+ "template_file_full_url": "https://dev-resource.thedeer.cn/pre/resource-testing/coding/d489ef8637c0198c9905b9628536ef875jsskgofnaulimvh.sb3",
423
+ "question_name": "1、准备工作 (1) 选择背景 Desert,Galaxy; (2) 选择角色 Rocketship。 2、功能实现 (1)火箭初始造型为 rocketship-a,初始位置为舞台下端,初始背景为 Dessert; (2)点击绿旗,火箭垂直向上移动,一直移动到舞台顶端,并在移动过 程中切换造型; (3)当火箭达到舞台顶端时,背景切换为 Galaxy; (4)火箭最后移到舞台下端的位置(初始位置),造型不限。",
424
+ "correct_rate": "",
425
+ "knowledge_name": "",
426
+ "page_location_list": [],
427
+ "code_type": 1,
428
+ "difficulty_level": "2",
429
+ "question_index": "",
430
+ "correct_single_index": 0,
431
+ "question_type": "16",
432
+ "media_resources": [],
433
+ "analysis": "",
434
+ "question_id": "12918",
435
+ "difficulty_level_str": "困难",
436
+ "update_date": "2023-05-13 10:09:59",
437
+ "exam_options_data": [],
438
+ "exam_link_answer_data": [],
439
+ "reference_file_full_url": "",
440
+ "correct_multiple_index_set": [],
441
+ "hint": "飞向太空",
442
+ "knowledge_id": ""
443
+ }
444
444
  ],
445
445
  "examination_duration": 5400,
446
446
  "examination_id": 495,
@@ -472,7 +472,7 @@ export default defineComponent({
472
472
  "small_type_index_list": [
473
473
  1,
474
474
  2,
475
- 4
475
+ 3
476
476
  ]
477
477
  },
478
478
  {
@@ -7,6 +7,7 @@
7
7
  <ul class="question-list">
8
8
  <li v-for="(item,index) in responsiveObj.questionList" :id="'question'+ index">
9
9
  <component :is="item.questionComponent"
10
+ :bus="eventBus"
10
11
  :mode="'review'"
11
12
  :questionInfo="item"
12
13
  :key="'question'+ index"
@@ -35,7 +36,8 @@ interface dataInterface{
35
36
  warnVisible:boolean,
36
37
  enterCode:boolean,
37
38
  autoSubmitTimer:any,
38
- routeName:string
39
+ routeName:string,
40
+ eventBus:any
39
41
  }
40
42
 
41
43
  interface responsiveData{
@@ -60,7 +62,8 @@ export default defineComponent({
60
62
  autoSubmitTimer:null,
61
63
  warnVisible:false,
62
64
  enterCode:false,
63
- routeName:route.name as string
65
+ routeName:route.name as string,
66
+ eventBus:bus
64
67
  })
65
68
 
66
69
  //需要响应式放里面
@@ -75,6 +78,44 @@ export default defineComponent({
75
78
  bus.$on('enterCode',(bol)=>{
76
79
  data.enterCode = bol as boolean
77
80
  })
81
+ let questionList = [
82
+ {
83
+ "question_type_str": "编程题",
84
+ "data_mode": 1,
85
+ "correct_judge": "",
86
+ "is_auto_check": "",
87
+ "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\"}]}]}]",
88
+ "correct_subjective_answer": "",
89
+ "auto_check": false,
90
+ "options_data": [],
91
+ "score": "30.00",
92
+ "sub_questions": [],
93
+ "style_type": "CODING",
94
+ "template_file_full_url": "https://dev-resource.thedeer.cn/pre/resource-testing/coding/d489ef8637c0198c9905b9628536ef875jsskgofnaulimvh.sb3",
95
+ "question_name": "1、准备工作 (1) 选择背景 Desert,Galaxy; (2) 选择角色 Rocketship。 2、功能实现 (1)火箭初始造型为 rocketship-a,初始位置为舞台下端,初始背景为 Dessert; (2)点击绿旗,火箭垂直向上移动,一直移动到舞台顶端,并在移动过 程中切换造型; (3)当火箭达到舞台顶端时,背景切换为 Galaxy; (4)火箭最后移到舞台下端的位置(初始位置),造型不限。",
96
+ "correct_rate": "",
97
+ "knowledge_name": "",
98
+ "page_location_list": [],
99
+ "code_type": 1,
100
+ "difficulty_level": "2",
101
+ "question_index": "",
102
+ "correct_single_index": 0,
103
+ "question_type": "16",
104
+ "media_resources": [],
105
+ "analysis": "",
106
+ "question_id": "12918",
107
+ "difficulty_level_str": "困难",
108
+ "update_date": "2023-05-13 10:09:59",
109
+ "exam_options_data": [],
110
+ "exam_link_answer_data": [],
111
+ "reference_file_full_url": "",
112
+ "correct_multiple_index_set": [],
113
+ "hint": "飞向太空",
114
+ "knowledge_id": ""
115
+ }
116
+ ]
117
+ parseQuestionListItem(questionList)
118
+ responsiveObj.value.questionList = questionList
78
119
  })
79
120
 
80
121
  onUnmounted(()=>{