@zykjcommon/questions 0.0.23 → 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=095794e2
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_095794e2_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_095794e2_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_095794e2_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_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", {
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_095794e2_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_095794e2_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_095794e2_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_095794e2_hoisted_9 = ["idx"];
16298
- const Question_Classifyvue_type_template_id_095794e2_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_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", {
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_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) => {
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_095794e2_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_095794e2_hoisted_4)]), Question_Classifyvue_type_template_id_095794e2_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_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) => {
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_095794e2_hoisted_10, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(item.content), 1)], 12, Question_Classifyvue_type_template_id_095794e2_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=095794e2
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
  /**
@@ -16460,6 +16460,7 @@ let env = js_fun.getDeviceEnv();
16460
16460
  if (nv) {
16461
16461
  console.log(nv, 33);
16462
16462
  this.parseLists(nv);
16463
+ this.answerMap = nv.answerMap;
16463
16464
  //回显答案
16464
16465
  if (nv.answerMap) {
16465
16466
  if (this.mode === 'analysis') {}
@@ -16481,12 +16482,19 @@ let env = js_fun.getDeviceEnv();
16481
16482
  cur.find('.append-item').each((subIndex, subItem) => {
16482
16483
  small_type_index_list.push(Number($(subItem).attr('idx')));
16483
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);
16484
16490
  result.push({
16485
16491
  big_type_index: index + 1,
16486
16492
  small_type_index_list
16487
16493
  });
16488
16494
  });
16489
- return result;
16495
+ return {
16496
+ classify_mapping_list: result
16497
+ };
16490
16498
  },
16491
16499
  isAnswered() {
16492
16500
  let len = $(this.$el).find('.list .list-item').length;
@@ -16499,14 +16507,19 @@ let env = js_fun.getDeviceEnv();
16499
16507
  },
16500
16508
  parseLists(nv) {
16501
16509
  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%`;
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
+ }
16505
16517
  let optionList = [];
16506
- this.classify_question_info.small_type_option_list.forEach(item => {
16518
+ exam_options_data.forEach(item => {
16507
16519
  optionList.push({
16508
- content: item.option_content,
16509
- 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
16510
16523
  });
16511
16524
  });
16512
16525
  this.optionList = optionList;
@@ -16537,6 +16550,15 @@ let env = js_fun.getDeviceEnv();
16537
16550
  let html = document.getElementsByTagName("html")[0];
16538
16551
  html.style.fontSize = "";
16539
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
+ },
16540
16562
  gesturestartListener(event) {
16541
16563
  event.preventDefault();
16542
16564
  },
@@ -16628,6 +16650,7 @@ let env = js_fun.getDeviceEnv();
16628
16650
  appendItem.css({
16629
16651
  opacity: 1
16630
16652
  });
16653
+ self.answeredNotify();
16631
16654
  self.bindDragDomEvent(appendItem, options.op);
16632
16655
  }
16633
16656
  self.flag = true;
@@ -16650,6 +16673,9 @@ let env = js_fun.getDeviceEnv();
16650
16673
  },
16651
16674
  dothings() {
16652
16675
  let self = this;
16676
+ if (this.answerMap && this.answerMap.classify_mapping_list && this.answerMap.classify_mapping_list.length) {
16677
+ this.setAnswerDo();
16678
+ }
16653
16679
  self.bindDragDomEvent($(this.$el).find('.question-classify .list-item'), 'go');
16654
16680
  $(document).on(self.mouseup, function (e) {
16655
16681
  // e.preventDefault()
@@ -16712,6 +16738,32 @@ let env = js_fun.getDeviceEnv();
16712
16738
  });
16713
16739
  self.bindNextPrevEvent('next');
16714
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();
16715
16767
  }
16716
16768
  },
16717
16769
  components: {}
@@ -16724,7 +16776,7 @@ let env = js_fun.getDeviceEnv();
16724
16776
 
16725
16777
 
16726
16778
  ;
16727
- const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',Question_Classifyvue_type_template_id_095794e2_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]])
16728
16780
 
16729
16781
  /* harmony default export */ var Question_Classify = (Question_Classify_exports_);
16730
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=095794e2
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_095794e2_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_095794e2_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_095794e2_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_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", {
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_095794e2_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_095794e2_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_095794e2_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_095794e2_hoisted_9 = ["idx"];
16308
- const Question_Classifyvue_type_template_id_095794e2_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_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", {
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_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) => {
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_095794e2_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_095794e2_hoisted_4)]), Question_Classifyvue_type_template_id_095794e2_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_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) => {
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_095794e2_hoisted_10, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(item.content), 1)], 12, Question_Classifyvue_type_template_id_095794e2_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=095794e2
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
  /**
@@ -16470,6 +16470,7 @@ let env = js_fun.getDeviceEnv();
16470
16470
  if (nv) {
16471
16471
  console.log(nv, 33);
16472
16472
  this.parseLists(nv);
16473
+ this.answerMap = nv.answerMap;
16473
16474
  //回显答案
16474
16475
  if (nv.answerMap) {
16475
16476
  if (this.mode === 'analysis') {}
@@ -16491,12 +16492,19 @@ let env = js_fun.getDeviceEnv();
16491
16492
  cur.find('.append-item').each((subIndex, subItem) => {
16492
16493
  small_type_index_list.push(Number($(subItem).attr('idx')));
16493
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);
16494
16500
  result.push({
16495
16501
  big_type_index: index + 1,
16496
16502
  small_type_index_list
16497
16503
  });
16498
16504
  });
16499
- return result;
16505
+ return {
16506
+ classify_mapping_list: result
16507
+ };
16500
16508
  },
16501
16509
  isAnswered() {
16502
16510
  let len = $(this.$el).find('.list .list-item').length;
@@ -16509,14 +16517,19 @@ let env = js_fun.getDeviceEnv();
16509
16517
  },
16510
16518
  parseLists(nv) {
16511
16519
  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%`;
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
+ }
16515
16527
  let optionList = [];
16516
- this.classify_question_info.small_type_option_list.forEach(item => {
16528
+ exam_options_data.forEach(item => {
16517
16529
  optionList.push({
16518
- content: item.option_content,
16519
- 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
16520
16533
  });
16521
16534
  });
16522
16535
  this.optionList = optionList;
@@ -16547,6 +16560,15 @@ let env = js_fun.getDeviceEnv();
16547
16560
  let html = document.getElementsByTagName("html")[0];
16548
16561
  html.style.fontSize = "";
16549
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
+ },
16550
16572
  gesturestartListener(event) {
16551
16573
  event.preventDefault();
16552
16574
  },
@@ -16638,6 +16660,7 @@ let env = js_fun.getDeviceEnv();
16638
16660
  appendItem.css({
16639
16661
  opacity: 1
16640
16662
  });
16663
+ self.answeredNotify();
16641
16664
  self.bindDragDomEvent(appendItem, options.op);
16642
16665
  }
16643
16666
  self.flag = true;
@@ -16660,6 +16683,9 @@ let env = js_fun.getDeviceEnv();
16660
16683
  },
16661
16684
  dothings() {
16662
16685
  let self = this;
16686
+ if (this.answerMap && this.answerMap.classify_mapping_list && this.answerMap.classify_mapping_list.length) {
16687
+ this.setAnswerDo();
16688
+ }
16663
16689
  self.bindDragDomEvent($(this.$el).find('.question-classify .list-item'), 'go');
16664
16690
  $(document).on(self.mouseup, function (e) {
16665
16691
  // e.preventDefault()
@@ -16722,6 +16748,32 @@ let env = js_fun.getDeviceEnv();
16722
16748
  });
16723
16749
  self.bindNextPrevEvent('next');
16724
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();
16725
16777
  }
16726
16778
  },
16727
16779
  components: {}
@@ -16734,7 +16786,7 @@ let env = js_fun.getDeviceEnv();
16734
16786
 
16735
16787
 
16736
16788
  ;
16737
- const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',Question_Classifyvue_type_template_id_095794e2_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]])
16738
16790
 
16739
16791
  /* harmony default export */ var Question_Classify = (Question_Classify_exports_);
16740
16792
  ;// CONCATENATED MODULE: ./src/components/questions/const.js