@zykjcommon/questions 0.0.42 → 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.
- package/dist/zykjcommon-questions.common.js +61 -63
- package/dist/zykjcommon-questions.css +1 -1
- package/dist/zykjcommon-questions.umd.js +61 -63
- package/dist/zykjcommon-questions.umd.min.js +2 -2
- package/package.json +1 -1
- package/src/assets/scss/questions/zykjcommon-questions.scss +11 -7
- package/src/components/questions/Question_Classify.vue +2 -4
- package/src/components/questions/Question_Programming.vue +6 -6
- package/src/views/exam/FullScreen.vue +36 -1
- package/src/views/exam/ReviewQuestion.vue +43 -2
- package/tasks/setPublishPackageJson.js +5 -2
package/package.json
CHANGED
|
@@ -41,6 +41,8 @@ $greenItemFontSize:0.13em;
|
|
|
41
41
|
color:#fff;
|
|
42
42
|
background: #FFBC00;
|
|
43
43
|
font-size: 12px;
|
|
44
|
+
border:none;
|
|
45
|
+
outline: none;
|
|
44
46
|
}
|
|
45
47
|
.question-option-list{
|
|
46
48
|
margin-top: 30px;
|
|
@@ -391,19 +393,21 @@ $greenItemFontSize:0.13em;
|
|
|
391
393
|
padding: 0 0.28em 0.15em 0.35em;
|
|
392
394
|
flex: 1;
|
|
393
395
|
.main-append{
|
|
394
|
-
height: 2.
|
|
396
|
+
height: 2.8em;
|
|
395
397
|
overflow: auto;
|
|
396
|
-
display: flex;
|
|
398
|
+
//display: flex;
|
|
397
399
|
flex-wrap: wrap;
|
|
398
|
-
justify-content: space-between;
|
|
400
|
+
//justify-content: space-between;
|
|
399
401
|
align-content: start;
|
|
400
|
-
|
|
402
|
+
/*&.noScrollBar::-webkit-scrollbar {
|
|
401
403
|
width: 0;
|
|
402
404
|
height: 0;
|
|
403
|
-
}
|
|
405
|
+
}*/
|
|
404
406
|
}
|
|
405
407
|
}
|
|
406
408
|
.append-item{
|
|
409
|
+
margin-left: 0.2em;
|
|
410
|
+
float: left;
|
|
407
411
|
/*background: url("../../img/classify-green-item.png") no-repeat center;*/
|
|
408
412
|
background-repeat: no-repeat;
|
|
409
413
|
background-position: center;
|
|
@@ -434,12 +438,12 @@ $greenItemFontSize:0.13em;
|
|
|
434
438
|
display: -webkit-box;
|
|
435
439
|
-webkit-box-orient: vertical;
|
|
436
440
|
}
|
|
437
|
-
|
|
441
|
+
/*&:nth-child(2n+1){
|
|
438
442
|
margin-left: 0.2em;
|
|
439
443
|
}
|
|
440
444
|
&:nth-child(2n){
|
|
441
445
|
margin-right: 0.2em;
|
|
442
|
-
}
|
|
446
|
+
}*/
|
|
443
447
|
}
|
|
444
448
|
.list-outter{
|
|
445
449
|
padding: 0 0.33em;
|
|
@@ -219,8 +219,6 @@ export default {
|
|
|
219
219
|
$(this.$el).find(`.question-classify .next`).off('click')
|
|
220
220
|
$(this.$el).find(`.question-classify .prev`).off('click')
|
|
221
221
|
$(document).off(this.mouseup)
|
|
222
|
-
let html = document.getElementsByTagName("html")[0];
|
|
223
|
-
html.style.fontSize = "";
|
|
224
222
|
document.onselectstart = null
|
|
225
223
|
},
|
|
226
224
|
answeredNotify(){
|
|
@@ -468,10 +466,10 @@ export default {
|
|
|
468
466
|
this.lazyDragTimer && clearTimeout(this.lazyDragTimer)
|
|
469
467
|
this.lazyDragTimer = null
|
|
470
468
|
$('.list').css({
|
|
471
|
-
|
|
469
|
+
overflowX:'auto'
|
|
472
470
|
})
|
|
473
471
|
$('.main-append').css({
|
|
474
|
-
|
|
472
|
+
overflowY:'auto'
|
|
475
473
|
})
|
|
476
474
|
},
|
|
477
475
|
//回显答案
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="zykjcommon-question">
|
|
3
|
-
<div class="question-type" v-if="!isSub">{{questionInfo.questionIndex}}、{{ questionInfo.question_type_str }}<span v-if="questionInfo.score!=='null' && showScore">({{questionInfo.score}}分)</span>
|
|
3
|
+
<div class="question-type" v-show="!isEnterCodeByInit" v-if="!isSub">{{questionInfo.questionIndex}}、{{ questionInfo.question_type_str }}<span v-if="questionInfo.score!=='null' && showScore">({{questionInfo.score}}分)</span>
|
|
4
4
|
<span class="score fr" v-if="mode==='analysis'">得分:{{questionInfo.answerMap ? questionInfo.answerMap.user_score : '-'}}分</span>
|
|
5
5
|
</div>
|
|
6
|
-
<div class="question-box">
|
|
6
|
+
<div class="question-box" v-show="!isEnterCodeByInit">
|
|
7
7
|
<div class="question-hint" v-if="questionInfo.hint && !isSub">{{ questionInfo.hint }}</div>
|
|
8
8
|
<div class="editor-content" v-html="questionInfo.htmlContent"></div>
|
|
9
9
|
<button class="bcdt-btn"
|
|
@@ -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:{
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
<QuestionHeader></QuestionHeader>
|
|
4
4
|
<div class="content-outter" style="overflow: inherit">
|
|
5
5
|
<component :is="responsiveObj.curQuestionInfo.questionComponent"
|
|
6
|
+
:isEnterCodeByInit="true"
|
|
6
7
|
:bus="eventBus"
|
|
7
8
|
:questionInfo="responsiveObj.curQuestionInfo"
|
|
8
9
|
:screenRepairH="140"
|
|
@@ -405,6 +406,40 @@ export default defineComponent({
|
|
|
405
406
|
"judge_percent": "",
|
|
406
407
|
"knowledge_id": "367",
|
|
407
408
|
"read_content": ""
|
|
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": ""
|
|
408
443
|
}
|
|
409
444
|
],
|
|
410
445
|
"examination_duration": 5400,
|
|
@@ -437,7 +472,7 @@ export default defineComponent({
|
|
|
437
472
|
"small_type_index_list": [
|
|
438
473
|
1,
|
|
439
474
|
2,
|
|
440
|
-
|
|
475
|
+
3
|
|
441
476
|
]
|
|
442
477
|
},
|
|
443
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(()=>{
|
|
@@ -13,8 +13,11 @@ function getPublishJson(jsonStr){
|
|
|
13
13
|
let result = ''
|
|
14
14
|
let json = JSON.parse(jsonStr)
|
|
15
15
|
needOpKeyArr.forEach((item)=>{
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
let dependenciesVal = json.dependencies[item]
|
|
17
|
+
if(dependenciesVal){
|
|
18
|
+
json.devDependencies[item] = dependenciesVal
|
|
19
|
+
delete json.dependencies[item]
|
|
20
|
+
}
|
|
18
21
|
})
|
|
19
22
|
result = JSON.stringify(json,null,2)
|
|
20
23
|
return result
|