@zykjcommon/questions 0.0.22 → 0.0.24

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.
@@ -16260,70 +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=2bc7fc5f
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=0bb44304
16264
16264
 
16265
- const Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_1 = {
16265
+ const Question_Classifyvue_type_template_id_0bb44304_hoisted_1 = {
16266
16266
  class: "zykjcommon-question",
16267
16267
  style: {
16268
16268
  "width": "100%",
16269
16269
  "height": "100%"
16270
16270
  }
16271
16271
  };
16272
- const Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_2 = {
16272
+ const Question_Classifyvue_type_template_id_0bb44304_hoisted_2 = {
16273
16273
  class: "box"
16274
16274
  };
16275
- const Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_3 = {
16275
+ const Question_Classifyvue_type_template_id_0bb44304_hoisted_3 = {
16276
16276
  class: "main-block"
16277
16277
  };
16278
- const Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_4 = ["src"];
16279
- const Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_5 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16278
+ const Question_Classifyvue_type_template_id_0bb44304_hoisted_4 = ["src"];
16279
+ const Question_Classifyvue_type_template_id_0bb44304_hoisted_5 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16280
16280
  class: "main-content"
16281
16281
  }, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16282
16282
  class: "main-append"
16283
16283
  })], -1);
16284
- const Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_6 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16284
+ const Question_Classifyvue_type_template_id_0bb44304_hoisted_6 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16285
16285
  class: "prev"
16286
16286
  }, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16287
16287
  class: "prev-main"
16288
16288
  })], -1);
16289
- const Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_7 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16289
+ const Question_Classifyvue_type_template_id_0bb44304_hoisted_7 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16290
16290
  class: "next"
16291
16291
  }, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16292
16292
  class: "next-main"
16293
16293
  })], -1);
16294
- const Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_8 = {
16294
+ const Question_Classifyvue_type_template_id_0bb44304_hoisted_8 = {
16295
16295
  class: "list"
16296
16296
  };
16297
- const Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_9 = ["idx"];
16298
- const Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_10 = {
16297
+ const Question_Classifyvue_type_template_id_0bb44304_hoisted_9 = ["idx"];
16298
+ const Question_Classifyvue_type_template_id_0bb44304_hoisted_10 = {
16299
16299
  class: "list-item-text"
16300
16300
  };
16301
- function Question_Classifyvue_type_template_id_2bc7fc5f_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_2bc7fc5f_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16301
+ function Question_Classifyvue_type_template_id_0bb44304_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_0bb44304_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16303
16303
  class: "question-classify",
16304
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_2bc7fc5f_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) => {
16305
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_0bb44304_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
16306
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
16307
16307
  class: "box-item",
16308
16308
  style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(item.bgUrlCss),
16309
16309
  key: index
16310
- }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("img", {
16310
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_0bb44304_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("img", {
16311
16311
  src: item.imgUrl,
16312
16312
  alt: ""
16313
- }, null, 8, Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_4)]), Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_5], 4);
16313
+ }, null, 8, Question_Classifyvue_type_template_id_0bb44304_hoisted_4)]), Question_Classifyvue_type_template_id_0bb44304_hoisted_5], 4);
16314
16314
  }), 128))]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16315
16315
  class: "list-outter",
16316
16316
  style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)($data.bottomBgCss)
16317
- }, [Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_6, Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_7, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_2bc7fc5f_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) => {
16317
+ }, [Question_Classifyvue_type_template_id_0bb44304_hoisted_6, Question_Classifyvue_type_template_id_0bb44304_hoisted_7, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_0bb44304_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) => {
16318
16318
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
16319
16319
  class: "list-item",
16320
- idx: index + 1,
16320
+ idx: item.idx,
16321
16321
  style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(item.bgUrlCss),
16322
16322
  key: index
16323
- }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_10, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(item.content), 1)], 12, Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_9);
16323
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_0bb44304_hoisted_10, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(item.content), 1)], 12, Question_Classifyvue_type_template_id_0bb44304_hoisted_9);
16324
16324
  }), 128))])], 4)], 4)]);
16325
16325
  }
16326
- ;// CONCATENATED MODULE: ./src/components/questions/Question_Classify.vue?vue&type=template&id=2bc7fc5f
16326
+ ;// CONCATENATED MODULE: ./src/components/questions/Question_Classify.vue?vue&type=template&id=0bb44304
16327
16327
 
16328
16328
  ;// CONCATENATED MODULE: ./src/assets/js/rem.js
16329
16329
  /**
@@ -16418,7 +16418,8 @@ let env = js_fun.getDeviceEnv();
16418
16418
  });
16419
16419
  }
16420
16420
  }, {
16421
- immediate: true
16421
+ immediate: true,
16422
+ deep: true
16422
16423
  });
16423
16424
  // setTimeout(()=>{
16424
16425
  // this.optionList = [{name:'每年春夏秋冬季节变化'},{name:'音乐播放10次'},{name:'把10个梨子放进篮子'},{name:'音乐播放9次'},{name:'把9个梨子放进篮子'},{name:'音乐播放8次'},{name:'把8个梨子放进篮子'},{name:'音乐播放6次'}]
@@ -16459,6 +16460,7 @@ let env = js_fun.getDeviceEnv();
16459
16460
  if (nv) {
16460
16461
  console.log(nv, 33);
16461
16462
  this.parseLists(nv);
16463
+ this.answerMap = nv.answerMap;
16462
16464
  //回显答案
16463
16465
  if (nv.answerMap) {
16464
16466
  if (this.mode === 'analysis') {}
@@ -16480,12 +16482,19 @@ let env = js_fun.getDeviceEnv();
16480
16482
  cur.find('.append-item').each((subIndex, subItem) => {
16481
16483
  small_type_index_list.push(Number($(subItem).attr('idx')));
16482
16484
  });
16485
+ //答案升序排列
16486
+ small_type_index_list = small_type_index_list.sort(function (a, b) {
16487
+ return a - b;
16488
+ });
16489
+ console.log(small_type_index_list, 345);
16483
16490
  result.push({
16484
16491
  big_type_index: index + 1,
16485
16492
  small_type_index_list
16486
16493
  });
16487
16494
  });
16488
- return result;
16495
+ return {
16496
+ classify_mapping_list: result
16497
+ };
16489
16498
  },
16490
16499
  isAnswered() {
16491
16500
  let len = $(this.$el).find('.list .list-item').length;
@@ -16498,14 +16507,19 @@ let env = js_fun.getDeviceEnv();
16498
16507
  },
16499
16508
  parseLists(nv) {
16500
16509
  this.classify_question_info = nv.classify_question_info;
16501
- this.answerMap = nv.answerMap;
16502
- this.bigBgCss = `background: url(${this.classify_question_info.background_file.file_url}) no-repeat center;background-size: 100% 100%`;
16503
- this.bottomBgCss = `background: url(${this.classify_question_info.bottom_img_file.file_url}) no-repeat center;background-size: 100% 100%`;
16510
+ let exam_options_data = nv.exam_options_data;
16511
+ if (this.classify_question_info.background_file) {
16512
+ this.bigBgCss = `background: url(${this.classify_question_info.background_file.file_url}) no-repeat center;background-size: 100% 100%`;
16513
+ }
16514
+ if (this.classify_question_info.bottom_img_file) {
16515
+ this.bottomBgCss = `background: url(${this.classify_question_info.bottom_img_file.file_url}) no-repeat center;background-size: 100% 100%`;
16516
+ }
16504
16517
  let optionList = [];
16505
- this.classify_question_info.small_type_option_list.forEach(item => {
16518
+ exam_options_data.forEach(item => {
16506
16519
  optionList.push({
16507
- content: item.option_content,
16508
- bgUrlCss: `background: url(${item.file_url}) no-repeat center;background-size: 100% 100%`
16520
+ content: item.data.option_content,
16521
+ bgUrlCss: `background: url(${item.data.file_url}) no-repeat center;background-size: 100% 100%`,
16522
+ idx: item.index
16509
16523
  });
16510
16524
  });
16511
16525
  this.optionList = optionList;
@@ -16536,6 +16550,15 @@ let env = js_fun.getDeviceEnv();
16536
16550
  let html = document.getElementsByTagName("html")[0];
16537
16551
  html.style.fontSize = "";
16538
16552
  },
16553
+ answeredNotify() {
16554
+ let self = this;
16555
+ let answered = self.isAnswered();
16556
+ self.$emit('getIsAnswered', answered);
16557
+ self.mode === 'exam' && self.bus.$emit('questionCardChange', {
16558
+ questionIndex: self.questionInfo.questionIndex - 1,
16559
+ answered
16560
+ });
16561
+ },
16539
16562
  gesturestartListener(event) {
16540
16563
  event.preventDefault();
16541
16564
  },
@@ -16627,6 +16650,7 @@ let env = js_fun.getDeviceEnv();
16627
16650
  appendItem.css({
16628
16651
  opacity: 1
16629
16652
  });
16653
+ self.answeredNotify();
16630
16654
  self.bindDragDomEvent(appendItem, options.op);
16631
16655
  }
16632
16656
  self.flag = true;
@@ -16649,6 +16673,9 @@ let env = js_fun.getDeviceEnv();
16649
16673
  },
16650
16674
  dothings() {
16651
16675
  let self = this;
16676
+ if (this.answerMap && this.answerMap.classify_mapping_list && this.answerMap.classify_mapping_list.length) {
16677
+ this.setAnswerDo();
16678
+ }
16652
16679
  self.bindDragDomEvent($(this.$el).find('.question-classify .list-item'), 'go');
16653
16680
  $(document).on(self.mouseup, function (e) {
16654
16681
  // e.preventDefault()
@@ -16711,6 +16738,32 @@ let env = js_fun.getDeviceEnv();
16711
16738
  });
16712
16739
  self.bindNextPrevEvent('next');
16713
16740
  self.bindNextPrevEvent('prev');
16741
+ },
16742
+ //回显答案
16743
+ setAnswerDo() {
16744
+ let self = this;
16745
+ let listItemIds = [];
16746
+ $(this.$el).find('.question-classify .list-item').each((index, item) => {
16747
+ listItemIds.push(Number($(item).attr('idx')));
16748
+ });
16749
+ this.answerMap.classify_mapping_list.forEach((item, index) => {
16750
+ item.small_type_index_list.forEach(subItem => {
16751
+ let idx = listItemIds.findIndex(i => {
16752
+ return i == subItem;
16753
+ });
16754
+ if (idx > -1) {
16755
+ //找到一个删掉一个,要不会有问题
16756
+ listItemIds.splice(idx, 1);
16757
+ let listItemDom = $(this.$el).find('.question-classify .list-item').eq(idx);
16758
+ let attrIdx = listItemDom.attr('idx');
16759
+ let appendItem = $(`<div class="append-item" idx="${attrIdx}" style="${self.listItemBgCss}"><div class="list-item-text">${listItemDom.find('.list-item-text').text()}</div></div>`);
16760
+ self.bindDragDomEvent(appendItem, 'back');
16761
+ $(this.$el).find('.main-append').eq(index).append(appendItem);
16762
+ listItemDom.remove();
16763
+ }
16764
+ });
16765
+ });
16766
+ this.answeredNotify();
16714
16767
  }
16715
16768
  },
16716
16769
  components: {}
@@ -16723,7 +16776,7 @@ let env = js_fun.getDeviceEnv();
16723
16776
 
16724
16777
 
16725
16778
  ;
16726
- const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',Question_Classifyvue_type_template_id_2bc7fc5f_render]])
16779
+ const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',Question_Classifyvue_type_template_id_0bb44304_render]])
16727
16780
 
16728
16781
  /* harmony default export */ var Question_Classify = (Question_Classify_exports_);
16729
16782
  ;// CONCATENATED MODULE: ./src/components/questions/const.js
@@ -16270,70 +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=2bc7fc5f
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=0bb44304
16274
16274
 
16275
- const Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_1 = {
16275
+ const Question_Classifyvue_type_template_id_0bb44304_hoisted_1 = {
16276
16276
  class: "zykjcommon-question",
16277
16277
  style: {
16278
16278
  "width": "100%",
16279
16279
  "height": "100%"
16280
16280
  }
16281
16281
  };
16282
- const Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_2 = {
16282
+ const Question_Classifyvue_type_template_id_0bb44304_hoisted_2 = {
16283
16283
  class: "box"
16284
16284
  };
16285
- const Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_3 = {
16285
+ const Question_Classifyvue_type_template_id_0bb44304_hoisted_3 = {
16286
16286
  class: "main-block"
16287
16287
  };
16288
- const Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_4 = ["src"];
16289
- const Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_5 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16288
+ const Question_Classifyvue_type_template_id_0bb44304_hoisted_4 = ["src"];
16289
+ const Question_Classifyvue_type_template_id_0bb44304_hoisted_5 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16290
16290
  class: "main-content"
16291
16291
  }, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16292
16292
  class: "main-append"
16293
16293
  })], -1);
16294
- const Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_6 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16294
+ const Question_Classifyvue_type_template_id_0bb44304_hoisted_6 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16295
16295
  class: "prev"
16296
16296
  }, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16297
16297
  class: "prev-main"
16298
16298
  })], -1);
16299
- const Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_7 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16299
+ const Question_Classifyvue_type_template_id_0bb44304_hoisted_7 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16300
16300
  class: "next"
16301
16301
  }, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16302
16302
  class: "next-main"
16303
16303
  })], -1);
16304
- const Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_8 = {
16304
+ const Question_Classifyvue_type_template_id_0bb44304_hoisted_8 = {
16305
16305
  class: "list"
16306
16306
  };
16307
- const Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_9 = ["idx"];
16308
- const Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_10 = {
16307
+ const Question_Classifyvue_type_template_id_0bb44304_hoisted_9 = ["idx"];
16308
+ const Question_Classifyvue_type_template_id_0bb44304_hoisted_10 = {
16309
16309
  class: "list-item-text"
16310
16310
  };
16311
- function Question_Classifyvue_type_template_id_2bc7fc5f_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_2bc7fc5f_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16311
+ function Question_Classifyvue_type_template_id_0bb44304_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_0bb44304_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16313
16313
  class: "question-classify",
16314
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_2bc7fc5f_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) => {
16315
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_0bb44304_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
16316
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
16317
16317
  class: "box-item",
16318
16318
  style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(item.bgUrlCss),
16319
16319
  key: index
16320
- }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("img", {
16320
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_0bb44304_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("img", {
16321
16321
  src: item.imgUrl,
16322
16322
  alt: ""
16323
- }, null, 8, Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_4)]), Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_5], 4);
16323
+ }, null, 8, Question_Classifyvue_type_template_id_0bb44304_hoisted_4)]), Question_Classifyvue_type_template_id_0bb44304_hoisted_5], 4);
16324
16324
  }), 128))]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16325
16325
  class: "list-outter",
16326
16326
  style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)($data.bottomBgCss)
16327
- }, [Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_6, Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_7, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_2bc7fc5f_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) => {
16327
+ }, [Question_Classifyvue_type_template_id_0bb44304_hoisted_6, Question_Classifyvue_type_template_id_0bb44304_hoisted_7, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_0bb44304_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) => {
16328
16328
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
16329
16329
  class: "list-item",
16330
- idx: index + 1,
16330
+ idx: item.idx,
16331
16331
  style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(item.bgUrlCss),
16332
16332
  key: index
16333
- }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_10, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(item.content), 1)], 12, Question_Classifyvue_type_template_id_2bc7fc5f_hoisted_9);
16333
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_0bb44304_hoisted_10, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(item.content), 1)], 12, Question_Classifyvue_type_template_id_0bb44304_hoisted_9);
16334
16334
  }), 128))])], 4)], 4)]);
16335
16335
  }
16336
- ;// CONCATENATED MODULE: ./src/components/questions/Question_Classify.vue?vue&type=template&id=2bc7fc5f
16336
+ ;// CONCATENATED MODULE: ./src/components/questions/Question_Classify.vue?vue&type=template&id=0bb44304
16337
16337
 
16338
16338
  ;// CONCATENATED MODULE: ./src/assets/js/rem.js
16339
16339
  /**
@@ -16428,7 +16428,8 @@ let env = js_fun.getDeviceEnv();
16428
16428
  });
16429
16429
  }
16430
16430
  }, {
16431
- immediate: true
16431
+ immediate: true,
16432
+ deep: true
16432
16433
  });
16433
16434
  // setTimeout(()=>{
16434
16435
  // this.optionList = [{name:'每年春夏秋冬季节变化'},{name:'音乐播放10次'},{name:'把10个梨子放进篮子'},{name:'音乐播放9次'},{name:'把9个梨子放进篮子'},{name:'音乐播放8次'},{name:'把8个梨子放进篮子'},{name:'音乐播放6次'}]
@@ -16469,6 +16470,7 @@ let env = js_fun.getDeviceEnv();
16469
16470
  if (nv) {
16470
16471
  console.log(nv, 33);
16471
16472
  this.parseLists(nv);
16473
+ this.answerMap = nv.answerMap;
16472
16474
  //回显答案
16473
16475
  if (nv.answerMap) {
16474
16476
  if (this.mode === 'analysis') {}
@@ -16490,12 +16492,19 @@ let env = js_fun.getDeviceEnv();
16490
16492
  cur.find('.append-item').each((subIndex, subItem) => {
16491
16493
  small_type_index_list.push(Number($(subItem).attr('idx')));
16492
16494
  });
16495
+ //答案升序排列
16496
+ small_type_index_list = small_type_index_list.sort(function (a, b) {
16497
+ return a - b;
16498
+ });
16499
+ console.log(small_type_index_list, 345);
16493
16500
  result.push({
16494
16501
  big_type_index: index + 1,
16495
16502
  small_type_index_list
16496
16503
  });
16497
16504
  });
16498
- return result;
16505
+ return {
16506
+ classify_mapping_list: result
16507
+ };
16499
16508
  },
16500
16509
  isAnswered() {
16501
16510
  let len = $(this.$el).find('.list .list-item').length;
@@ -16508,14 +16517,19 @@ let env = js_fun.getDeviceEnv();
16508
16517
  },
16509
16518
  parseLists(nv) {
16510
16519
  this.classify_question_info = nv.classify_question_info;
16511
- this.answerMap = nv.answerMap;
16512
- this.bigBgCss = `background: url(${this.classify_question_info.background_file.file_url}) no-repeat center;background-size: 100% 100%`;
16513
- this.bottomBgCss = `background: url(${this.classify_question_info.bottom_img_file.file_url}) no-repeat center;background-size: 100% 100%`;
16520
+ let exam_options_data = nv.exam_options_data;
16521
+ if (this.classify_question_info.background_file) {
16522
+ this.bigBgCss = `background: url(${this.classify_question_info.background_file.file_url}) no-repeat center;background-size: 100% 100%`;
16523
+ }
16524
+ if (this.classify_question_info.bottom_img_file) {
16525
+ this.bottomBgCss = `background: url(${this.classify_question_info.bottom_img_file.file_url}) no-repeat center;background-size: 100% 100%`;
16526
+ }
16514
16527
  let optionList = [];
16515
- this.classify_question_info.small_type_option_list.forEach(item => {
16528
+ exam_options_data.forEach(item => {
16516
16529
  optionList.push({
16517
- content: item.option_content,
16518
- bgUrlCss: `background: url(${item.file_url}) no-repeat center;background-size: 100% 100%`
16530
+ content: item.data.option_content,
16531
+ bgUrlCss: `background: url(${item.data.file_url}) no-repeat center;background-size: 100% 100%`,
16532
+ idx: item.index
16519
16533
  });
16520
16534
  });
16521
16535
  this.optionList = optionList;
@@ -16546,6 +16560,15 @@ let env = js_fun.getDeviceEnv();
16546
16560
  let html = document.getElementsByTagName("html")[0];
16547
16561
  html.style.fontSize = "";
16548
16562
  },
16563
+ answeredNotify() {
16564
+ let self = this;
16565
+ let answered = self.isAnswered();
16566
+ self.$emit('getIsAnswered', answered);
16567
+ self.mode === 'exam' && self.bus.$emit('questionCardChange', {
16568
+ questionIndex: self.questionInfo.questionIndex - 1,
16569
+ answered
16570
+ });
16571
+ },
16549
16572
  gesturestartListener(event) {
16550
16573
  event.preventDefault();
16551
16574
  },
@@ -16637,6 +16660,7 @@ let env = js_fun.getDeviceEnv();
16637
16660
  appendItem.css({
16638
16661
  opacity: 1
16639
16662
  });
16663
+ self.answeredNotify();
16640
16664
  self.bindDragDomEvent(appendItem, options.op);
16641
16665
  }
16642
16666
  self.flag = true;
@@ -16659,6 +16683,9 @@ let env = js_fun.getDeviceEnv();
16659
16683
  },
16660
16684
  dothings() {
16661
16685
  let self = this;
16686
+ if (this.answerMap && this.answerMap.classify_mapping_list && this.answerMap.classify_mapping_list.length) {
16687
+ this.setAnswerDo();
16688
+ }
16662
16689
  self.bindDragDomEvent($(this.$el).find('.question-classify .list-item'), 'go');
16663
16690
  $(document).on(self.mouseup, function (e) {
16664
16691
  // e.preventDefault()
@@ -16721,6 +16748,32 @@ let env = js_fun.getDeviceEnv();
16721
16748
  });
16722
16749
  self.bindNextPrevEvent('next');
16723
16750
  self.bindNextPrevEvent('prev');
16751
+ },
16752
+ //回显答案
16753
+ setAnswerDo() {
16754
+ let self = this;
16755
+ let listItemIds = [];
16756
+ $(this.$el).find('.question-classify .list-item').each((index, item) => {
16757
+ listItemIds.push(Number($(item).attr('idx')));
16758
+ });
16759
+ this.answerMap.classify_mapping_list.forEach((item, index) => {
16760
+ item.small_type_index_list.forEach(subItem => {
16761
+ let idx = listItemIds.findIndex(i => {
16762
+ return i == subItem;
16763
+ });
16764
+ if (idx > -1) {
16765
+ //找到一个删掉一个,要不会有问题
16766
+ listItemIds.splice(idx, 1);
16767
+ let listItemDom = $(this.$el).find('.question-classify .list-item').eq(idx);
16768
+ let attrIdx = listItemDom.attr('idx');
16769
+ let appendItem = $(`<div class="append-item" idx="${attrIdx}" style="${self.listItemBgCss}"><div class="list-item-text">${listItemDom.find('.list-item-text').text()}</div></div>`);
16770
+ self.bindDragDomEvent(appendItem, 'back');
16771
+ $(this.$el).find('.main-append').eq(index).append(appendItem);
16772
+ listItemDom.remove();
16773
+ }
16774
+ });
16775
+ });
16776
+ this.answeredNotify();
16724
16777
  }
16725
16778
  },
16726
16779
  components: {}
@@ -16733,7 +16786,7 @@ let env = js_fun.getDeviceEnv();
16733
16786
 
16734
16787
 
16735
16788
  ;
16736
- const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',Question_Classifyvue_type_template_id_2bc7fc5f_render]])
16789
+ const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',Question_Classifyvue_type_template_id_0bb44304_render]])
16737
16790
 
16738
16791
  /* harmony default export */ var Question_Classify = (Question_Classify_exports_);
16739
16792
  ;// CONCATENATED MODULE: ./src/components/questions/const.js