@zykjcommon/questions 0.0.21 → 0.0.23
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 +147 -53
- package/dist/zykjcommon-questions.umd.js +147 -53
- package/dist/zykjcommon-questions.umd.min.js +3 -3
- package/package.json +1 -1
- package/src/assets/scss/questions/zykjcommon-questions.scss +17 -12
- package/src/components/questions/Question_Classify.vue +119 -33
- package/src/main.ts +5 -5
- package/src/views/exam/FullScreen.vue +149 -101
|
@@ -16260,47 +16260,70 @@ var index = {
|
|
|
16260
16260
|
const Question_Programming_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Programmingvue_type_script_lang_js, [['render',Question_Programmingvue_type_template_id_66006ba2_render]])
|
|
16261
16261
|
|
|
16262
16262
|
/* harmony default export */ var Question_Programming = (Question_Programming_exports_);
|
|
16263
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[4]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/questions/Question_Classify.vue?vue&type=template&id=
|
|
16263
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[4]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/questions/Question_Classify.vue?vue&type=template&id=095794e2
|
|
16264
16264
|
|
|
16265
|
-
const
|
|
16265
|
+
const Question_Classifyvue_type_template_id_095794e2_hoisted_1 = {
|
|
16266
16266
|
class: "zykjcommon-question",
|
|
16267
16267
|
style: {
|
|
16268
16268
|
"width": "100%",
|
|
16269
16269
|
"height": "100%"
|
|
16270
16270
|
}
|
|
16271
16271
|
};
|
|
16272
|
-
const
|
|
16273
|
-
class: "
|
|
16272
|
+
const Question_Classifyvue_type_template_id_095794e2_hoisted_2 = {
|
|
16273
|
+
class: "box"
|
|
16274
16274
|
};
|
|
16275
|
-
const
|
|
16276
|
-
|
|
16277
|
-
class: "list-outter"
|
|
16275
|
+
const Question_Classifyvue_type_template_id_095794e2_hoisted_3 = {
|
|
16276
|
+
class: "main-block"
|
|
16278
16277
|
};
|
|
16279
|
-
const
|
|
16278
|
+
const Question_Classifyvue_type_template_id_095794e2_hoisted_4 = ["src"];
|
|
16279
|
+
const Question_Classifyvue_type_template_id_095794e2_hoisted_5 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
16280
|
+
class: "main-content"
|
|
16281
|
+
}, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
16282
|
+
class: "main-append"
|
|
16283
|
+
})], -1);
|
|
16284
|
+
const Question_Classifyvue_type_template_id_095794e2_hoisted_6 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
16280
16285
|
class: "prev"
|
|
16281
16286
|
}, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
16282
16287
|
class: "prev-main"
|
|
16283
16288
|
})], -1);
|
|
16284
|
-
const
|
|
16289
|
+
const Question_Classifyvue_type_template_id_095794e2_hoisted_7 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
16285
16290
|
class: "next"
|
|
16286
16291
|
}, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
16287
16292
|
class: "next-main"
|
|
16288
16293
|
})], -1);
|
|
16289
|
-
const
|
|
16294
|
+
const Question_Classifyvue_type_template_id_095794e2_hoisted_8 = {
|
|
16290
16295
|
class: "list"
|
|
16291
16296
|
};
|
|
16292
|
-
const
|
|
16297
|
+
const Question_Classifyvue_type_template_id_095794e2_hoisted_9 = ["idx"];
|
|
16298
|
+
const Question_Classifyvue_type_template_id_095794e2_hoisted_10 = {
|
|
16293
16299
|
class: "list-item-text"
|
|
16294
16300
|
};
|
|
16295
|
-
function
|
|
16296
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div",
|
|
16301
|
+
function Question_Classifyvue_type_template_id_095794e2_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
16302
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", Question_Classifyvue_type_template_id_095794e2_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
16303
|
+
class: "question-classify",
|
|
16304
|
+
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)($data.bigBgCss)
|
|
16305
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_095794e2_hoisted_2, [((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)(external_commonjs_vue_commonjs2_vue_root_Vue_.Fragment, null, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderList)($data.bigBoxItemList, (item, index) => {
|
|
16306
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
|
|
16307
|
+
class: "box-item",
|
|
16308
|
+
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(item.bgUrlCss),
|
|
16309
|
+
key: index
|
|
16310
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_095794e2_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("img", {
|
|
16311
|
+
src: item.imgUrl,
|
|
16312
|
+
alt: ""
|
|
16313
|
+
}, null, 8, Question_Classifyvue_type_template_id_095794e2_hoisted_4)]), Question_Classifyvue_type_template_id_095794e2_hoisted_5], 4);
|
|
16314
|
+
}), 128))]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
16315
|
+
class: "list-outter",
|
|
16316
|
+
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)($data.bottomBgCss)
|
|
16317
|
+
}, [Question_Classifyvue_type_template_id_095794e2_hoisted_6, Question_Classifyvue_type_template_id_095794e2_hoisted_7, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_095794e2_hoisted_8, [((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)(external_commonjs_vue_commonjs2_vue_root_Vue_.Fragment, null, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderList)($data.optionList, (item, index) => {
|
|
16297
16318
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
|
|
16298
16319
|
class: "list-item",
|
|
16320
|
+
idx: index + 1,
|
|
16321
|
+
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(item.bgUrlCss),
|
|
16299
16322
|
key: index
|
|
16300
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div",
|
|
16301
|
-
}), 128))])])])]);
|
|
16323
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_095794e2_hoisted_10, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(item.content), 1)], 12, Question_Classifyvue_type_template_id_095794e2_hoisted_9);
|
|
16324
|
+
}), 128))])], 4)], 4)]);
|
|
16302
16325
|
}
|
|
16303
|
-
;// CONCATENATED MODULE: ./src/components/questions/Question_Classify.vue?vue&type=template&id=
|
|
16326
|
+
;// CONCATENATED MODULE: ./src/components/questions/Question_Classify.vue?vue&type=template&id=095794e2
|
|
16304
16327
|
|
|
16305
16328
|
;// CONCATENATED MODULE: ./src/assets/js/rem.js
|
|
16306
16329
|
/**
|
|
@@ -16366,6 +16389,14 @@ let env = js_fun.getDeviceEnv();
|
|
|
16366
16389
|
mode: {
|
|
16367
16390
|
type: String,
|
|
16368
16391
|
default: 'exam'
|
|
16392
|
+
},
|
|
16393
|
+
screenRepairH: {
|
|
16394
|
+
type: Number,
|
|
16395
|
+
default: 0
|
|
16396
|
+
},
|
|
16397
|
+
screenScale: {
|
|
16398
|
+
type: Number,
|
|
16399
|
+
default: 0
|
|
16369
16400
|
}
|
|
16370
16401
|
},
|
|
16371
16402
|
created() {
|
|
@@ -16380,39 +16411,31 @@ let env = js_fun.getDeviceEnv();
|
|
|
16380
16411
|
},
|
|
16381
16412
|
mounted() {
|
|
16382
16413
|
this.init();
|
|
16383
|
-
this.$watch('
|
|
16414
|
+
this.$watch('optionList', nv => {
|
|
16384
16415
|
if (nv && nv.length) {
|
|
16385
16416
|
this.$nextTick(() => {
|
|
16386
16417
|
this.dothings();
|
|
16387
16418
|
});
|
|
16388
16419
|
}
|
|
16420
|
+
}, {
|
|
16421
|
+
immediate: true,
|
|
16422
|
+
deep: true
|
|
16389
16423
|
});
|
|
16390
|
-
setTimeout(()
|
|
16391
|
-
|
|
16392
|
-
|
|
16393
|
-
}, {
|
|
16394
|
-
name: '音乐播放10次'
|
|
16395
|
-
}, {
|
|
16396
|
-
name: '把10个梨子放进篮子'
|
|
16397
|
-
}, {
|
|
16398
|
-
name: '音乐播放9次'
|
|
16399
|
-
}, {
|
|
16400
|
-
name: '把9个梨子放进篮子'
|
|
16401
|
-
}, {
|
|
16402
|
-
name: '音乐播放8次'
|
|
16403
|
-
}, {
|
|
16404
|
-
name: '把8个梨子放进篮子'
|
|
16405
|
-
}, {
|
|
16406
|
-
name: '音乐播放6次'
|
|
16407
|
-
}];
|
|
16408
|
-
}, 500);
|
|
16424
|
+
// setTimeout(()=>{
|
|
16425
|
+
// this.optionList = [{name:'每年春夏秋冬季节变化'},{name:'音乐播放10次'},{name:'把10个梨子放进篮子'},{name:'音乐播放9次'},{name:'把9个梨子放进篮子'},{name:'音乐播放8次'},{name:'把8个梨子放进篮子'},{name:'音乐播放6次'}]
|
|
16426
|
+
// },500)
|
|
16409
16427
|
},
|
|
16428
|
+
|
|
16410
16429
|
data() {
|
|
16411
16430
|
return {
|
|
16412
16431
|
analyCorrectAnswer: '',
|
|
16413
|
-
|
|
16432
|
+
classify_question_info: {},
|
|
16414
16433
|
answerMap: {},
|
|
16415
|
-
|
|
16434
|
+
optionList: [],
|
|
16435
|
+
bigBoxItemList: [],
|
|
16436
|
+
bigBgCss: '',
|
|
16437
|
+
bottomBgCss: '',
|
|
16438
|
+
listItemBgCss: '',
|
|
16416
16439
|
env,
|
|
16417
16440
|
p1: {},
|
|
16418
16441
|
//存mousedown相关
|
|
@@ -16430,17 +16453,86 @@ let env = js_fun.getDeviceEnv();
|
|
|
16430
16453
|
};
|
|
16431
16454
|
},
|
|
16432
16455
|
|
|
16433
|
-
watch: {
|
|
16456
|
+
watch: {
|
|
16457
|
+
questionInfo: {
|
|
16458
|
+
handler(nv, ov) {
|
|
16459
|
+
let self = this;
|
|
16460
|
+
if (nv) {
|
|
16461
|
+
console.log(nv, 33);
|
|
16462
|
+
this.parseLists(nv);
|
|
16463
|
+
//回显答案
|
|
16464
|
+
if (nv.answerMap) {
|
|
16465
|
+
if (this.mode === 'analysis') {}
|
|
16466
|
+
// this.$emit('optionChange', {orderIndex:this.orderIndex,isAnswered:this.isAnswered()})
|
|
16467
|
+
}
|
|
16468
|
+
}
|
|
16469
|
+
},
|
|
16470
|
+
|
|
16471
|
+
immediate: true
|
|
16472
|
+
}
|
|
16473
|
+
},
|
|
16434
16474
|
computed: {},
|
|
16435
16475
|
methods: {
|
|
16476
|
+
getAnswer() {
|
|
16477
|
+
let result = [];
|
|
16478
|
+
$(this.$el).find('.box-item').each(function (index, item) {
|
|
16479
|
+
let cur = $(this);
|
|
16480
|
+
let small_type_index_list = [];
|
|
16481
|
+
cur.find('.append-item').each((subIndex, subItem) => {
|
|
16482
|
+
small_type_index_list.push(Number($(subItem).attr('idx')));
|
|
16483
|
+
});
|
|
16484
|
+
result.push({
|
|
16485
|
+
big_type_index: index + 1,
|
|
16486
|
+
small_type_index_list
|
|
16487
|
+
});
|
|
16488
|
+
});
|
|
16489
|
+
return result;
|
|
16490
|
+
},
|
|
16491
|
+
isAnswered() {
|
|
16492
|
+
let len = $(this.$el).find('.list .list-item').length;
|
|
16493
|
+
let answerd = len === 0;
|
|
16494
|
+
return answerd;
|
|
16495
|
+
},
|
|
16496
|
+
isCorrect() {
|
|
16497
|
+
let correct = this.questionInfo.answerMap.is_correct === '1' ? true : false;
|
|
16498
|
+
return correct;
|
|
16499
|
+
},
|
|
16500
|
+
parseLists(nv) {
|
|
16501
|
+
this.classify_question_info = nv.classify_question_info;
|
|
16502
|
+
this.answerMap = nv.answerMap;
|
|
16503
|
+
this.bigBgCss = `background: url(${this.classify_question_info.background_file.file_url}) no-repeat center;background-size: 100% 100%`;
|
|
16504
|
+
this.bottomBgCss = `background: url(${this.classify_question_info.bottom_img_file.file_url}) no-repeat center;background-size: 100% 100%`;
|
|
16505
|
+
let optionList = [];
|
|
16506
|
+
this.classify_question_info.small_type_option_list.forEach(item => {
|
|
16507
|
+
optionList.push({
|
|
16508
|
+
content: item.option_content,
|
|
16509
|
+
bgUrlCss: `background: url(${item.file_url}) no-repeat center;background-size: 100% 100%`
|
|
16510
|
+
});
|
|
16511
|
+
});
|
|
16512
|
+
this.optionList = optionList;
|
|
16513
|
+
this.listItemBgCss = !optionList[0] ? '' : optionList[0].bgUrlCss;
|
|
16514
|
+
let bigBoxItemList = [];
|
|
16515
|
+
let big_type_box_image_list = this.classify_question_info.big_type_box_image_list;
|
|
16516
|
+
let big_type_option_list = this.classify_question_info.big_type_option_list;
|
|
16517
|
+
big_type_box_image_list.forEach((item, index) => {
|
|
16518
|
+
bigBoxItemList.push({
|
|
16519
|
+
imgUrl: big_type_option_list[index].file_url,
|
|
16520
|
+
bgUrl: item.file_url,
|
|
16521
|
+
bgUrlCss: `background: url(${item.file_url}) no-repeat center;background-size: 100% 100%`
|
|
16522
|
+
});
|
|
16523
|
+
});
|
|
16524
|
+
this.bigBoxItemList = bigBoxItemList;
|
|
16525
|
+
},
|
|
16436
16526
|
setRootFontSize() {
|
|
16437
|
-
setRemFixedHeight(1000,
|
|
16527
|
+
// setRemFixedHeight(1000,140,1.08)
|
|
16528
|
+
setRemFixedHeight(1000, this.screenRepairH, this.screenScale);
|
|
16438
16529
|
},
|
|
16439
16530
|
unmountedDo() {
|
|
16440
16531
|
window.removeEventListener('resize', this.setRootFontSize);
|
|
16441
16532
|
document.removeEventListener('gesturestart', this.gesturestartListener);
|
|
16442
|
-
|
|
16443
|
-
$('.question-classify .
|
|
16533
|
+
this.$el;
|
|
16534
|
+
$(this.$el).find('.question-classify .append-item').off(this.mousedown);
|
|
16535
|
+
$(this.$el).find('.question-classify .list-item').off(this.mousedown);
|
|
16444
16536
|
$(document).off(this.mouseup);
|
|
16445
16537
|
let html = document.getElementsByTagName("html")[0];
|
|
16446
16538
|
html.style.fontSize = "";
|
|
@@ -16461,7 +16553,7 @@ let env = js_fun.getDeviceEnv();
|
|
|
16461
16553
|
let moveDivLeftEnd = moveDivLeft + self.moveDiv.width();
|
|
16462
16554
|
let moveDivTop = self.moveDiv.offset().top;
|
|
16463
16555
|
let moveDivTopEnd = moveDivTop + self.moveDiv.height();
|
|
16464
|
-
$('.box-item').each((index, item) => {
|
|
16556
|
+
$(this.$el).find('.box-item').each((index, item) => {
|
|
16465
16557
|
let boxItem = $(item);
|
|
16466
16558
|
let boxLeft = boxItem.offset().left;
|
|
16467
16559
|
let boxLeftEnd = boxLeft + boxItem.width();
|
|
@@ -16490,8 +16582,8 @@ let env = js_fun.getDeviceEnv();
|
|
|
16490
16582
|
self.listItem.addClass('drag');
|
|
16491
16583
|
self.p1.moveX = self.listItem.offset().left;
|
|
16492
16584
|
self.p1.moveY = self.listItem.offset().top - 30;
|
|
16493
|
-
|
|
16494
|
-
self.moveDiv = $(`<div class="question-classify-moveDiv"><div class="list-item-text">${self.listItem.find('.list-item-text').text()}</div></div>`);
|
|
16585
|
+
let idx = self.listItem.attr('idx');
|
|
16586
|
+
self.moveDiv = $(`<div class="question-classify-moveDiv" idx="${idx}" style="${self.listItemBgCss}"><div class="list-item-text">${self.listItem.find('.list-item-text').text()}</div></div>`);
|
|
16495
16587
|
self.moveDiv.css({
|
|
16496
16588
|
left: `${self.p1.moveX}px`,
|
|
16497
16589
|
top: `${self.p1.moveY}px`
|
|
@@ -16514,7 +16606,8 @@ let env = js_fun.getDeviceEnv();
|
|
|
16514
16606
|
appendMoveDiv(options) {
|
|
16515
16607
|
let self = this;
|
|
16516
16608
|
self.listItem.remove();
|
|
16517
|
-
let
|
|
16609
|
+
let idx = self.moveDiv.attr('idx');
|
|
16610
|
+
let appendItem = $(`<div class="${options.appendItemClassName}" idx="${idx}" style="${self.listItemBgCss}"><div class="list-item-text">${self.moveDiv.find('.list-item-text').text()}</div></div>`);
|
|
16518
16611
|
appendItem.css({
|
|
16519
16612
|
opacity: 0
|
|
16520
16613
|
});
|
|
@@ -16541,22 +16634,23 @@ let env = js_fun.getDeviceEnv();
|
|
|
16541
16634
|
});
|
|
16542
16635
|
},
|
|
16543
16636
|
bindNextPrevEvent(type) {
|
|
16544
|
-
|
|
16637
|
+
let self = this;
|
|
16638
|
+
$(this.$el).find(`.question-classify .${type}`).on('click', function (e) {
|
|
16545
16639
|
e.stopPropagation();
|
|
16546
16640
|
e.preventDefault();
|
|
16547
|
-
let listItem = $('.question-classify .list-item');
|
|
16548
|
-
let list = $('.question-classify .list');
|
|
16641
|
+
let listItem = $(self.$el).find('.question-classify .list-item');
|
|
16642
|
+
let list = $(self.$el).find('.question-classify .list');
|
|
16549
16643
|
let w = listItem.outerWidth() * (type === 'next' ? 1 : -1);
|
|
16550
16644
|
let scrollLeft = list.scrollLeft();
|
|
16551
16645
|
console.log(scrollLeft);
|
|
16552
|
-
$('.question-classify .list').stop(true).animate({
|
|
16646
|
+
$(self.$el).find('.question-classify .list').stop(true).animate({
|
|
16553
16647
|
scrollLeft: scrollLeft + w
|
|
16554
16648
|
}, 500);
|
|
16555
16649
|
});
|
|
16556
16650
|
},
|
|
16557
16651
|
dothings() {
|
|
16558
16652
|
let self = this;
|
|
16559
|
-
self.bindDragDomEvent($('.question-classify .list-item'), 'go');
|
|
16653
|
+
self.bindDragDomEvent($(this.$el).find('.question-classify .list-item'), 'go');
|
|
16560
16654
|
$(document).on(self.mouseup, function (e) {
|
|
16561
16655
|
// e.preventDefault()
|
|
16562
16656
|
if (self.dragWay === 'go') {
|
|
@@ -16588,7 +16682,7 @@ let env = js_fun.getDeviceEnv();
|
|
|
16588
16682
|
//0说明都不在两个框内 1说明在其中一个框内
|
|
16589
16683
|
if (specArr.length === 0) {
|
|
16590
16684
|
self.appendMoveDiv({
|
|
16591
|
-
targetList: $('.question-classify .list'),
|
|
16685
|
+
targetList: $(self.$el).find('.question-classify .list'),
|
|
16592
16686
|
appendItemClassName: 'list-item',
|
|
16593
16687
|
op: 'go',
|
|
16594
16688
|
scrollDirection: 'scrollLeft'
|
|
@@ -16630,7 +16724,7 @@ let env = js_fun.getDeviceEnv();
|
|
|
16630
16724
|
|
|
16631
16725
|
|
|
16632
16726
|
;
|
|
16633
|
-
const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',
|
|
16727
|
+
const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',Question_Classifyvue_type_template_id_095794e2_render]])
|
|
16634
16728
|
|
|
16635
16729
|
/* harmony default export */ var Question_Classify = (Question_Classify_exports_);
|
|
16636
16730
|
;// CONCATENATED MODULE: ./src/components/questions/const.js
|
|
@@ -16270,47 +16270,70 @@ var index = {
|
|
|
16270
16270
|
const Question_Programming_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Programmingvue_type_script_lang_js, [['render',Question_Programmingvue_type_template_id_66006ba2_render]])
|
|
16271
16271
|
|
|
16272
16272
|
/* harmony default export */ var Question_Programming = (Question_Programming_exports_);
|
|
16273
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-86.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[4]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/questions/Question_Classify.vue?vue&type=template&id=
|
|
16273
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-86.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[4]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/questions/Question_Classify.vue?vue&type=template&id=095794e2
|
|
16274
16274
|
|
|
16275
|
-
const
|
|
16275
|
+
const Question_Classifyvue_type_template_id_095794e2_hoisted_1 = {
|
|
16276
16276
|
class: "zykjcommon-question",
|
|
16277
16277
|
style: {
|
|
16278
16278
|
"width": "100%",
|
|
16279
16279
|
"height": "100%"
|
|
16280
16280
|
}
|
|
16281
16281
|
};
|
|
16282
|
-
const
|
|
16283
|
-
class: "
|
|
16282
|
+
const Question_Classifyvue_type_template_id_095794e2_hoisted_2 = {
|
|
16283
|
+
class: "box"
|
|
16284
16284
|
};
|
|
16285
|
-
const
|
|
16286
|
-
|
|
16287
|
-
class: "list-outter"
|
|
16285
|
+
const Question_Classifyvue_type_template_id_095794e2_hoisted_3 = {
|
|
16286
|
+
class: "main-block"
|
|
16288
16287
|
};
|
|
16289
|
-
const
|
|
16288
|
+
const Question_Classifyvue_type_template_id_095794e2_hoisted_4 = ["src"];
|
|
16289
|
+
const Question_Classifyvue_type_template_id_095794e2_hoisted_5 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
16290
|
+
class: "main-content"
|
|
16291
|
+
}, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
16292
|
+
class: "main-append"
|
|
16293
|
+
})], -1);
|
|
16294
|
+
const Question_Classifyvue_type_template_id_095794e2_hoisted_6 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
16290
16295
|
class: "prev"
|
|
16291
16296
|
}, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
16292
16297
|
class: "prev-main"
|
|
16293
16298
|
})], -1);
|
|
16294
|
-
const
|
|
16299
|
+
const Question_Classifyvue_type_template_id_095794e2_hoisted_7 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
16295
16300
|
class: "next"
|
|
16296
16301
|
}, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
16297
16302
|
class: "next-main"
|
|
16298
16303
|
})], -1);
|
|
16299
|
-
const
|
|
16304
|
+
const Question_Classifyvue_type_template_id_095794e2_hoisted_8 = {
|
|
16300
16305
|
class: "list"
|
|
16301
16306
|
};
|
|
16302
|
-
const
|
|
16307
|
+
const Question_Classifyvue_type_template_id_095794e2_hoisted_9 = ["idx"];
|
|
16308
|
+
const Question_Classifyvue_type_template_id_095794e2_hoisted_10 = {
|
|
16303
16309
|
class: "list-item-text"
|
|
16304
16310
|
};
|
|
16305
|
-
function
|
|
16306
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div",
|
|
16311
|
+
function Question_Classifyvue_type_template_id_095794e2_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
16312
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", Question_Classifyvue_type_template_id_095794e2_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
16313
|
+
class: "question-classify",
|
|
16314
|
+
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)($data.bigBgCss)
|
|
16315
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_095794e2_hoisted_2, [((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)(external_commonjs_vue_commonjs2_vue_root_Vue_.Fragment, null, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderList)($data.bigBoxItemList, (item, index) => {
|
|
16316
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
|
|
16317
|
+
class: "box-item",
|
|
16318
|
+
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(item.bgUrlCss),
|
|
16319
|
+
key: index
|
|
16320
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_095794e2_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("img", {
|
|
16321
|
+
src: item.imgUrl,
|
|
16322
|
+
alt: ""
|
|
16323
|
+
}, null, 8, Question_Classifyvue_type_template_id_095794e2_hoisted_4)]), Question_Classifyvue_type_template_id_095794e2_hoisted_5], 4);
|
|
16324
|
+
}), 128))]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
16325
|
+
class: "list-outter",
|
|
16326
|
+
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)($data.bottomBgCss)
|
|
16327
|
+
}, [Question_Classifyvue_type_template_id_095794e2_hoisted_6, Question_Classifyvue_type_template_id_095794e2_hoisted_7, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_095794e2_hoisted_8, [((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)(external_commonjs_vue_commonjs2_vue_root_Vue_.Fragment, null, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.renderList)($data.optionList, (item, index) => {
|
|
16307
16328
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
|
|
16308
16329
|
class: "list-item",
|
|
16330
|
+
idx: index + 1,
|
|
16331
|
+
style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(item.bgUrlCss),
|
|
16309
16332
|
key: index
|
|
16310
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div",
|
|
16311
|
-
}), 128))])])])]);
|
|
16333
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_095794e2_hoisted_10, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(item.content), 1)], 12, Question_Classifyvue_type_template_id_095794e2_hoisted_9);
|
|
16334
|
+
}), 128))])], 4)], 4)]);
|
|
16312
16335
|
}
|
|
16313
|
-
;// CONCATENATED MODULE: ./src/components/questions/Question_Classify.vue?vue&type=template&id=
|
|
16336
|
+
;// CONCATENATED MODULE: ./src/components/questions/Question_Classify.vue?vue&type=template&id=095794e2
|
|
16314
16337
|
|
|
16315
16338
|
;// CONCATENATED MODULE: ./src/assets/js/rem.js
|
|
16316
16339
|
/**
|
|
@@ -16376,6 +16399,14 @@ let env = js_fun.getDeviceEnv();
|
|
|
16376
16399
|
mode: {
|
|
16377
16400
|
type: String,
|
|
16378
16401
|
default: 'exam'
|
|
16402
|
+
},
|
|
16403
|
+
screenRepairH: {
|
|
16404
|
+
type: Number,
|
|
16405
|
+
default: 0
|
|
16406
|
+
},
|
|
16407
|
+
screenScale: {
|
|
16408
|
+
type: Number,
|
|
16409
|
+
default: 0
|
|
16379
16410
|
}
|
|
16380
16411
|
},
|
|
16381
16412
|
created() {
|
|
@@ -16390,39 +16421,31 @@ let env = js_fun.getDeviceEnv();
|
|
|
16390
16421
|
},
|
|
16391
16422
|
mounted() {
|
|
16392
16423
|
this.init();
|
|
16393
|
-
this.$watch('
|
|
16424
|
+
this.$watch('optionList', nv => {
|
|
16394
16425
|
if (nv && nv.length) {
|
|
16395
16426
|
this.$nextTick(() => {
|
|
16396
16427
|
this.dothings();
|
|
16397
16428
|
});
|
|
16398
16429
|
}
|
|
16430
|
+
}, {
|
|
16431
|
+
immediate: true,
|
|
16432
|
+
deep: true
|
|
16399
16433
|
});
|
|
16400
|
-
setTimeout(()
|
|
16401
|
-
|
|
16402
|
-
|
|
16403
|
-
}, {
|
|
16404
|
-
name: '音乐播放10次'
|
|
16405
|
-
}, {
|
|
16406
|
-
name: '把10个梨子放进篮子'
|
|
16407
|
-
}, {
|
|
16408
|
-
name: '音乐播放9次'
|
|
16409
|
-
}, {
|
|
16410
|
-
name: '把9个梨子放进篮子'
|
|
16411
|
-
}, {
|
|
16412
|
-
name: '音乐播放8次'
|
|
16413
|
-
}, {
|
|
16414
|
-
name: '把8个梨子放进篮子'
|
|
16415
|
-
}, {
|
|
16416
|
-
name: '音乐播放6次'
|
|
16417
|
-
}];
|
|
16418
|
-
}, 500);
|
|
16434
|
+
// setTimeout(()=>{
|
|
16435
|
+
// this.optionList = [{name:'每年春夏秋冬季节变化'},{name:'音乐播放10次'},{name:'把10个梨子放进篮子'},{name:'音乐播放9次'},{name:'把9个梨子放进篮子'},{name:'音乐播放8次'},{name:'把8个梨子放进篮子'},{name:'音乐播放6次'}]
|
|
16436
|
+
// },500)
|
|
16419
16437
|
},
|
|
16438
|
+
|
|
16420
16439
|
data() {
|
|
16421
16440
|
return {
|
|
16422
16441
|
analyCorrectAnswer: '',
|
|
16423
|
-
|
|
16442
|
+
classify_question_info: {},
|
|
16424
16443
|
answerMap: {},
|
|
16425
|
-
|
|
16444
|
+
optionList: [],
|
|
16445
|
+
bigBoxItemList: [],
|
|
16446
|
+
bigBgCss: '',
|
|
16447
|
+
bottomBgCss: '',
|
|
16448
|
+
listItemBgCss: '',
|
|
16426
16449
|
env,
|
|
16427
16450
|
p1: {},
|
|
16428
16451
|
//存mousedown相关
|
|
@@ -16440,17 +16463,86 @@ let env = js_fun.getDeviceEnv();
|
|
|
16440
16463
|
};
|
|
16441
16464
|
},
|
|
16442
16465
|
|
|
16443
|
-
watch: {
|
|
16466
|
+
watch: {
|
|
16467
|
+
questionInfo: {
|
|
16468
|
+
handler(nv, ov) {
|
|
16469
|
+
let self = this;
|
|
16470
|
+
if (nv) {
|
|
16471
|
+
console.log(nv, 33);
|
|
16472
|
+
this.parseLists(nv);
|
|
16473
|
+
//回显答案
|
|
16474
|
+
if (nv.answerMap) {
|
|
16475
|
+
if (this.mode === 'analysis') {}
|
|
16476
|
+
// this.$emit('optionChange', {orderIndex:this.orderIndex,isAnswered:this.isAnswered()})
|
|
16477
|
+
}
|
|
16478
|
+
}
|
|
16479
|
+
},
|
|
16480
|
+
|
|
16481
|
+
immediate: true
|
|
16482
|
+
}
|
|
16483
|
+
},
|
|
16444
16484
|
computed: {},
|
|
16445
16485
|
methods: {
|
|
16486
|
+
getAnswer() {
|
|
16487
|
+
let result = [];
|
|
16488
|
+
$(this.$el).find('.box-item').each(function (index, item) {
|
|
16489
|
+
let cur = $(this);
|
|
16490
|
+
let small_type_index_list = [];
|
|
16491
|
+
cur.find('.append-item').each((subIndex, subItem) => {
|
|
16492
|
+
small_type_index_list.push(Number($(subItem).attr('idx')));
|
|
16493
|
+
});
|
|
16494
|
+
result.push({
|
|
16495
|
+
big_type_index: index + 1,
|
|
16496
|
+
small_type_index_list
|
|
16497
|
+
});
|
|
16498
|
+
});
|
|
16499
|
+
return result;
|
|
16500
|
+
},
|
|
16501
|
+
isAnswered() {
|
|
16502
|
+
let len = $(this.$el).find('.list .list-item').length;
|
|
16503
|
+
let answerd = len === 0;
|
|
16504
|
+
return answerd;
|
|
16505
|
+
},
|
|
16506
|
+
isCorrect() {
|
|
16507
|
+
let correct = this.questionInfo.answerMap.is_correct === '1' ? true : false;
|
|
16508
|
+
return correct;
|
|
16509
|
+
},
|
|
16510
|
+
parseLists(nv) {
|
|
16511
|
+
this.classify_question_info = nv.classify_question_info;
|
|
16512
|
+
this.answerMap = nv.answerMap;
|
|
16513
|
+
this.bigBgCss = `background: url(${this.classify_question_info.background_file.file_url}) no-repeat center;background-size: 100% 100%`;
|
|
16514
|
+
this.bottomBgCss = `background: url(${this.classify_question_info.bottom_img_file.file_url}) no-repeat center;background-size: 100% 100%`;
|
|
16515
|
+
let optionList = [];
|
|
16516
|
+
this.classify_question_info.small_type_option_list.forEach(item => {
|
|
16517
|
+
optionList.push({
|
|
16518
|
+
content: item.option_content,
|
|
16519
|
+
bgUrlCss: `background: url(${item.file_url}) no-repeat center;background-size: 100% 100%`
|
|
16520
|
+
});
|
|
16521
|
+
});
|
|
16522
|
+
this.optionList = optionList;
|
|
16523
|
+
this.listItemBgCss = !optionList[0] ? '' : optionList[0].bgUrlCss;
|
|
16524
|
+
let bigBoxItemList = [];
|
|
16525
|
+
let big_type_box_image_list = this.classify_question_info.big_type_box_image_list;
|
|
16526
|
+
let big_type_option_list = this.classify_question_info.big_type_option_list;
|
|
16527
|
+
big_type_box_image_list.forEach((item, index) => {
|
|
16528
|
+
bigBoxItemList.push({
|
|
16529
|
+
imgUrl: big_type_option_list[index].file_url,
|
|
16530
|
+
bgUrl: item.file_url,
|
|
16531
|
+
bgUrlCss: `background: url(${item.file_url}) no-repeat center;background-size: 100% 100%`
|
|
16532
|
+
});
|
|
16533
|
+
});
|
|
16534
|
+
this.bigBoxItemList = bigBoxItemList;
|
|
16535
|
+
},
|
|
16446
16536
|
setRootFontSize() {
|
|
16447
|
-
setRemFixedHeight(1000,
|
|
16537
|
+
// setRemFixedHeight(1000,140,1.08)
|
|
16538
|
+
setRemFixedHeight(1000, this.screenRepairH, this.screenScale);
|
|
16448
16539
|
},
|
|
16449
16540
|
unmountedDo() {
|
|
16450
16541
|
window.removeEventListener('resize', this.setRootFontSize);
|
|
16451
16542
|
document.removeEventListener('gesturestart', this.gesturestartListener);
|
|
16452
|
-
|
|
16453
|
-
$('.question-classify .
|
|
16543
|
+
this.$el;
|
|
16544
|
+
$(this.$el).find('.question-classify .append-item').off(this.mousedown);
|
|
16545
|
+
$(this.$el).find('.question-classify .list-item').off(this.mousedown);
|
|
16454
16546
|
$(document).off(this.mouseup);
|
|
16455
16547
|
let html = document.getElementsByTagName("html")[0];
|
|
16456
16548
|
html.style.fontSize = "";
|
|
@@ -16471,7 +16563,7 @@ let env = js_fun.getDeviceEnv();
|
|
|
16471
16563
|
let moveDivLeftEnd = moveDivLeft + self.moveDiv.width();
|
|
16472
16564
|
let moveDivTop = self.moveDiv.offset().top;
|
|
16473
16565
|
let moveDivTopEnd = moveDivTop + self.moveDiv.height();
|
|
16474
|
-
$('.box-item').each((index, item) => {
|
|
16566
|
+
$(this.$el).find('.box-item').each((index, item) => {
|
|
16475
16567
|
let boxItem = $(item);
|
|
16476
16568
|
let boxLeft = boxItem.offset().left;
|
|
16477
16569
|
let boxLeftEnd = boxLeft + boxItem.width();
|
|
@@ -16500,8 +16592,8 @@ let env = js_fun.getDeviceEnv();
|
|
|
16500
16592
|
self.listItem.addClass('drag');
|
|
16501
16593
|
self.p1.moveX = self.listItem.offset().left;
|
|
16502
16594
|
self.p1.moveY = self.listItem.offset().top - 30;
|
|
16503
|
-
|
|
16504
|
-
self.moveDiv = $(`<div class="question-classify-moveDiv"><div class="list-item-text">${self.listItem.find('.list-item-text').text()}</div></div>`);
|
|
16595
|
+
let idx = self.listItem.attr('idx');
|
|
16596
|
+
self.moveDiv = $(`<div class="question-classify-moveDiv" idx="${idx}" style="${self.listItemBgCss}"><div class="list-item-text">${self.listItem.find('.list-item-text').text()}</div></div>`);
|
|
16505
16597
|
self.moveDiv.css({
|
|
16506
16598
|
left: `${self.p1.moveX}px`,
|
|
16507
16599
|
top: `${self.p1.moveY}px`
|
|
@@ -16524,7 +16616,8 @@ let env = js_fun.getDeviceEnv();
|
|
|
16524
16616
|
appendMoveDiv(options) {
|
|
16525
16617
|
let self = this;
|
|
16526
16618
|
self.listItem.remove();
|
|
16527
|
-
let
|
|
16619
|
+
let idx = self.moveDiv.attr('idx');
|
|
16620
|
+
let appendItem = $(`<div class="${options.appendItemClassName}" idx="${idx}" style="${self.listItemBgCss}"><div class="list-item-text">${self.moveDiv.find('.list-item-text').text()}</div></div>`);
|
|
16528
16621
|
appendItem.css({
|
|
16529
16622
|
opacity: 0
|
|
16530
16623
|
});
|
|
@@ -16551,22 +16644,23 @@ let env = js_fun.getDeviceEnv();
|
|
|
16551
16644
|
});
|
|
16552
16645
|
},
|
|
16553
16646
|
bindNextPrevEvent(type) {
|
|
16554
|
-
|
|
16647
|
+
let self = this;
|
|
16648
|
+
$(this.$el).find(`.question-classify .${type}`).on('click', function (e) {
|
|
16555
16649
|
e.stopPropagation();
|
|
16556
16650
|
e.preventDefault();
|
|
16557
|
-
let listItem = $('.question-classify .list-item');
|
|
16558
|
-
let list = $('.question-classify .list');
|
|
16651
|
+
let listItem = $(self.$el).find('.question-classify .list-item');
|
|
16652
|
+
let list = $(self.$el).find('.question-classify .list');
|
|
16559
16653
|
let w = listItem.outerWidth() * (type === 'next' ? 1 : -1);
|
|
16560
16654
|
let scrollLeft = list.scrollLeft();
|
|
16561
16655
|
console.log(scrollLeft);
|
|
16562
|
-
$('.question-classify .list').stop(true).animate({
|
|
16656
|
+
$(self.$el).find('.question-classify .list').stop(true).animate({
|
|
16563
16657
|
scrollLeft: scrollLeft + w
|
|
16564
16658
|
}, 500);
|
|
16565
16659
|
});
|
|
16566
16660
|
},
|
|
16567
16661
|
dothings() {
|
|
16568
16662
|
let self = this;
|
|
16569
|
-
self.bindDragDomEvent($('.question-classify .list-item'), 'go');
|
|
16663
|
+
self.bindDragDomEvent($(this.$el).find('.question-classify .list-item'), 'go');
|
|
16570
16664
|
$(document).on(self.mouseup, function (e) {
|
|
16571
16665
|
// e.preventDefault()
|
|
16572
16666
|
if (self.dragWay === 'go') {
|
|
@@ -16598,7 +16692,7 @@ let env = js_fun.getDeviceEnv();
|
|
|
16598
16692
|
//0说明都不在两个框内 1说明在其中一个框内
|
|
16599
16693
|
if (specArr.length === 0) {
|
|
16600
16694
|
self.appendMoveDiv({
|
|
16601
|
-
targetList: $('.question-classify .list'),
|
|
16695
|
+
targetList: $(self.$el).find('.question-classify .list'),
|
|
16602
16696
|
appendItemClassName: 'list-item',
|
|
16603
16697
|
op: 'go',
|
|
16604
16698
|
scrollDirection: 'scrollLeft'
|
|
@@ -16640,7 +16734,7 @@ let env = js_fun.getDeviceEnv();
|
|
|
16640
16734
|
|
|
16641
16735
|
|
|
16642
16736
|
;
|
|
16643
|
-
const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',
|
|
16737
|
+
const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',Question_Classifyvue_type_template_id_095794e2_render]])
|
|
16644
16738
|
|
|
16645
16739
|
/* harmony default export */ var Question_Classify = (Question_Classify_exports_);
|
|
16646
16740
|
;// CONCATENATED MODULE: ./src/components/questions/const.js
|