@zykjcommon/questions 0.0.24 → 0.0.26

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=0bb44304
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=26d349c8
16264
16264
 
16265
- const Question_Classifyvue_type_template_id_0bb44304_hoisted_1 = {
16265
+ const Question_Classifyvue_type_template_id_26d349c8_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_0bb44304_hoisted_2 = {
16272
+ const Question_Classifyvue_type_template_id_26d349c8_hoisted_2 = {
16273
16273
  class: "box"
16274
16274
  };
16275
- const Question_Classifyvue_type_template_id_0bb44304_hoisted_3 = {
16275
+ const Question_Classifyvue_type_template_id_26d349c8_hoisted_3 = {
16276
16276
  class: "main-block"
16277
16277
  };
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", {
16278
+ const Question_Classifyvue_type_template_id_26d349c8_hoisted_4 = ["src"];
16279
+ const Question_Classifyvue_type_template_id_26d349c8_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_0bb44304_hoisted_6 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16284
+ const Question_Classifyvue_type_template_id_26d349c8_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_0bb44304_hoisted_7 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16289
+ const Question_Classifyvue_type_template_id_26d349c8_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_0bb44304_hoisted_8 = {
16294
+ const Question_Classifyvue_type_template_id_26d349c8_hoisted_8 = {
16295
16295
  class: "list"
16296
16296
  };
16297
- const Question_Classifyvue_type_template_id_0bb44304_hoisted_9 = ["idx"];
16298
- const Question_Classifyvue_type_template_id_0bb44304_hoisted_10 = {
16297
+ const Question_Classifyvue_type_template_id_26d349c8_hoisted_9 = ["idx"];
16298
+ const Question_Classifyvue_type_template_id_26d349c8_hoisted_10 = {
16299
16299
  class: "list-item-text"
16300
16300
  };
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", {
16301
+ function Question_Classifyvue_type_template_id_26d349c8_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_26d349c8_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_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) => {
16305
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_26d349c8_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_0bb44304_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_26d349c8_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_0bb44304_hoisted_4)]), Question_Classifyvue_type_template_id_0bb44304_hoisted_5], 4);
16313
+ }, null, 8, Question_Classifyvue_type_template_id_26d349c8_hoisted_4)]), Question_Classifyvue_type_template_id_26d349c8_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_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) => {
16317
+ }, [Question_Classifyvue_type_template_id_26d349c8_hoisted_6, Question_Classifyvue_type_template_id_26d349c8_hoisted_7, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_26d349c8_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
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_0bb44304_hoisted_10, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(item.content), 1)], 12, Question_Classifyvue_type_template_id_0bb44304_hoisted_9);
16323
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_26d349c8_hoisted_10, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(item.content), 1)], 12, Question_Classifyvue_type_template_id_26d349c8_hoisted_9);
16324
16324
  }), 128))])], 4)], 4)]);
16325
16325
  }
16326
- ;// CONCATENATED MODULE: ./src/components/questions/Question_Classify.vue?vue&type=template&id=0bb44304
16326
+ ;// CONCATENATED MODULE: ./src/components/questions/Question_Classify.vue?vue&type=template&id=26d349c8
16327
16327
 
16328
16328
  ;// CONCATENATED MODULE: ./src/assets/js/rem.js
16329
16329
  /**
@@ -16367,7 +16367,9 @@ let setRemFixedHeight = function (designWidth = 1440, repairH = 0, scale = 1) {
16367
16367
  let frameBili = 4 / 3;
16368
16368
  let b = frameBili / (winWidth / winHeight);
16369
16369
  let realW = parseInt(winWidth * b);
16370
- html.style.fontSize = realW / designWidth * baseNum * scale + 'px';
16370
+ let parent = document.querySelector('.zykjcommon-question');
16371
+ parent.style.fontSize = realW / designWidth * baseNum * scale + 'px';
16372
+ // html.style.fontSize = (realW / designWidth) * baseNum * scale + 'px';
16371
16373
  console.log(html.style.fontSize);
16372
16374
  };
16373
16375
  ;// 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/index.js??ruleSet[0].use[0]!./src/components/questions/Question_Classify.vue?vue&type=script&lang=js
@@ -16400,8 +16402,8 @@ let env = js_fun.getDeviceEnv();
16400
16402
  }
16401
16403
  },
16402
16404
  created() {
16403
- this.setRootFontSize();
16404
- window.addEventListener('resize', this.setRootFontSize);
16405
+ // this.setRootFontSize()
16406
+ // window.addEventListener('resize',this.setRootFontSize)
16405
16407
  },
16406
16408
  unmounted() {
16407
16409
  this.unmountedDo();
@@ -16410,6 +16412,8 @@ let env = js_fun.getDeviceEnv();
16410
16412
  this.unmountedDo();
16411
16413
  },
16412
16414
  mounted() {
16415
+ this.setRootFontSize();
16416
+ window.addEventListener('resize', this.setRootFontSize);
16413
16417
  this.init();
16414
16418
  this.$watch('optionList', nv => {
16415
16419
  if (nv && nv.length) {
@@ -16428,6 +16432,7 @@ let env = js_fun.getDeviceEnv();
16428
16432
 
16429
16433
  data() {
16430
16434
  return {
16435
+ animationing: false,
16431
16436
  analyCorrectAnswer: '',
16432
16437
  classify_question_info: {},
16433
16438
  answerMap: {},
@@ -16610,7 +16615,8 @@ let env = js_fun.getDeviceEnv();
16610
16615
  left: `${self.p1.moveX}px`,
16611
16616
  top: `${self.p1.moveY}px`
16612
16617
  });
16613
- $('body').append(self.moveDiv);
16618
+ $(self.$el).append(self.moveDiv);
16619
+ // $('body').append(self.moveDiv)
16614
16620
  $(document).on(self.mousemove, function (e2) {
16615
16621
  // e2.preventDefault()
16616
16622
  e2.stopPropagation();
@@ -16638,6 +16644,7 @@ let env = js_fun.getDeviceEnv();
16638
16644
  let appendLeft = appendItem.offset().left;
16639
16645
  let appendTop = appendItem.offset().top;
16640
16646
  //transitionend事件会执行2次,所以使用标记避免
16647
+ self.animationing = true;
16641
16648
  self.moveDiv.css({
16642
16649
  transition: 'all 0.5s',
16643
16650
  left: appendLeft,
@@ -16652,6 +16659,7 @@ let env = js_fun.getDeviceEnv();
16652
16659
  });
16653
16660
  self.answeredNotify();
16654
16661
  self.bindDragDomEvent(appendItem, options.op);
16662
+ self.animationing = false;
16655
16663
  }
16656
16664
  self.flag = true;
16657
16665
  });
@@ -16678,6 +16686,9 @@ let env = js_fun.getDeviceEnv();
16678
16686
  }
16679
16687
  self.bindDragDomEvent($(this.$el).find('.question-classify .list-item'), 'go');
16680
16688
  $(document).on(self.mouseup, function (e) {
16689
+ if (self.animationing) {
16690
+ return;
16691
+ }
16681
16692
  // e.preventDefault()
16682
16693
  if (self.dragWay === 'go') {
16683
16694
  $(document).off(self.mousemove);
@@ -16776,7 +16787,7 @@ let env = js_fun.getDeviceEnv();
16776
16787
 
16777
16788
 
16778
16789
  ;
16779
- const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',Question_Classifyvue_type_template_id_0bb44304_render]])
16790
+ const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',Question_Classifyvue_type_template_id_26d349c8_render]])
16780
16791
 
16781
16792
  /* harmony default export */ var Question_Classify = (Question_Classify_exports_);
16782
16793
  ;// 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=0bb44304
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=26d349c8
16274
16274
 
16275
- const Question_Classifyvue_type_template_id_0bb44304_hoisted_1 = {
16275
+ const Question_Classifyvue_type_template_id_26d349c8_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_0bb44304_hoisted_2 = {
16282
+ const Question_Classifyvue_type_template_id_26d349c8_hoisted_2 = {
16283
16283
  class: "box"
16284
16284
  };
16285
- const Question_Classifyvue_type_template_id_0bb44304_hoisted_3 = {
16285
+ const Question_Classifyvue_type_template_id_26d349c8_hoisted_3 = {
16286
16286
  class: "main-block"
16287
16287
  };
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", {
16288
+ const Question_Classifyvue_type_template_id_26d349c8_hoisted_4 = ["src"];
16289
+ const Question_Classifyvue_type_template_id_26d349c8_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_0bb44304_hoisted_6 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16294
+ const Question_Classifyvue_type_template_id_26d349c8_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_0bb44304_hoisted_7 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
16299
+ const Question_Classifyvue_type_template_id_26d349c8_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_0bb44304_hoisted_8 = {
16304
+ const Question_Classifyvue_type_template_id_26d349c8_hoisted_8 = {
16305
16305
  class: "list"
16306
16306
  };
16307
- const Question_Classifyvue_type_template_id_0bb44304_hoisted_9 = ["idx"];
16308
- const Question_Classifyvue_type_template_id_0bb44304_hoisted_10 = {
16307
+ const Question_Classifyvue_type_template_id_26d349c8_hoisted_9 = ["idx"];
16308
+ const Question_Classifyvue_type_template_id_26d349c8_hoisted_10 = {
16309
16309
  class: "list-item-text"
16310
16310
  };
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", {
16311
+ function Question_Classifyvue_type_template_id_26d349c8_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_26d349c8_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_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) => {
16315
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_26d349c8_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_0bb44304_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_26d349c8_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_0bb44304_hoisted_4)]), Question_Classifyvue_type_template_id_0bb44304_hoisted_5], 4);
16323
+ }, null, 8, Question_Classifyvue_type_template_id_26d349c8_hoisted_4)]), Question_Classifyvue_type_template_id_26d349c8_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_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) => {
16327
+ }, [Question_Classifyvue_type_template_id_26d349c8_hoisted_6, Question_Classifyvue_type_template_id_26d349c8_hoisted_7, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_26d349c8_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
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_0bb44304_hoisted_10, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(item.content), 1)], 12, Question_Classifyvue_type_template_id_0bb44304_hoisted_9);
16333
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_26d349c8_hoisted_10, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(item.content), 1)], 12, Question_Classifyvue_type_template_id_26d349c8_hoisted_9);
16334
16334
  }), 128))])], 4)], 4)]);
16335
16335
  }
16336
- ;// CONCATENATED MODULE: ./src/components/questions/Question_Classify.vue?vue&type=template&id=0bb44304
16336
+ ;// CONCATENATED MODULE: ./src/components/questions/Question_Classify.vue?vue&type=template&id=26d349c8
16337
16337
 
16338
16338
  ;// CONCATENATED MODULE: ./src/assets/js/rem.js
16339
16339
  /**
@@ -16377,7 +16377,9 @@ let setRemFixedHeight = function (designWidth = 1440, repairH = 0, scale = 1) {
16377
16377
  let frameBili = 4 / 3;
16378
16378
  let b = frameBili / (winWidth / winHeight);
16379
16379
  let realW = parseInt(winWidth * b);
16380
- html.style.fontSize = realW / designWidth * baseNum * scale + 'px';
16380
+ let parent = document.querySelector('.zykjcommon-question');
16381
+ parent.style.fontSize = realW / designWidth * baseNum * scale + 'px';
16382
+ // html.style.fontSize = (realW / designWidth) * baseNum * scale + 'px';
16381
16383
  console.log(html.style.fontSize);
16382
16384
  };
16383
16385
  ;// 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/index.js??ruleSet[0].use[0]!./src/components/questions/Question_Classify.vue?vue&type=script&lang=js
@@ -16410,8 +16412,8 @@ let env = js_fun.getDeviceEnv();
16410
16412
  }
16411
16413
  },
16412
16414
  created() {
16413
- this.setRootFontSize();
16414
- window.addEventListener('resize', this.setRootFontSize);
16415
+ // this.setRootFontSize()
16416
+ // window.addEventListener('resize',this.setRootFontSize)
16415
16417
  },
16416
16418
  unmounted() {
16417
16419
  this.unmountedDo();
@@ -16420,6 +16422,8 @@ let env = js_fun.getDeviceEnv();
16420
16422
  this.unmountedDo();
16421
16423
  },
16422
16424
  mounted() {
16425
+ this.setRootFontSize();
16426
+ window.addEventListener('resize', this.setRootFontSize);
16423
16427
  this.init();
16424
16428
  this.$watch('optionList', nv => {
16425
16429
  if (nv && nv.length) {
@@ -16438,6 +16442,7 @@ let env = js_fun.getDeviceEnv();
16438
16442
 
16439
16443
  data() {
16440
16444
  return {
16445
+ animationing: false,
16441
16446
  analyCorrectAnswer: '',
16442
16447
  classify_question_info: {},
16443
16448
  answerMap: {},
@@ -16620,7 +16625,8 @@ let env = js_fun.getDeviceEnv();
16620
16625
  left: `${self.p1.moveX}px`,
16621
16626
  top: `${self.p1.moveY}px`
16622
16627
  });
16623
- $('body').append(self.moveDiv);
16628
+ $(self.$el).append(self.moveDiv);
16629
+ // $('body').append(self.moveDiv)
16624
16630
  $(document).on(self.mousemove, function (e2) {
16625
16631
  // e2.preventDefault()
16626
16632
  e2.stopPropagation();
@@ -16648,6 +16654,7 @@ let env = js_fun.getDeviceEnv();
16648
16654
  let appendLeft = appendItem.offset().left;
16649
16655
  let appendTop = appendItem.offset().top;
16650
16656
  //transitionend事件会执行2次,所以使用标记避免
16657
+ self.animationing = true;
16651
16658
  self.moveDiv.css({
16652
16659
  transition: 'all 0.5s',
16653
16660
  left: appendLeft,
@@ -16662,6 +16669,7 @@ let env = js_fun.getDeviceEnv();
16662
16669
  });
16663
16670
  self.answeredNotify();
16664
16671
  self.bindDragDomEvent(appendItem, options.op);
16672
+ self.animationing = false;
16665
16673
  }
16666
16674
  self.flag = true;
16667
16675
  });
@@ -16688,6 +16696,9 @@ let env = js_fun.getDeviceEnv();
16688
16696
  }
16689
16697
  self.bindDragDomEvent($(this.$el).find('.question-classify .list-item'), 'go');
16690
16698
  $(document).on(self.mouseup, function (e) {
16699
+ if (self.animationing) {
16700
+ return;
16701
+ }
16691
16702
  // e.preventDefault()
16692
16703
  if (self.dragWay === 'go') {
16693
16704
  $(document).off(self.mousemove);
@@ -16786,7 +16797,7 @@ let env = js_fun.getDeviceEnv();
16786
16797
 
16787
16798
 
16788
16799
  ;
16789
- const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',Question_Classifyvue_type_template_id_0bb44304_render]])
16800
+ const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',Question_Classifyvue_type_template_id_26d349c8_render]])
16790
16801
 
16791
16802
  /* harmony default export */ var Question_Classify = (Question_Classify_exports_);
16792
16803
  ;// CONCATENATED MODULE: ./src/components/questions/const.js
@@ -24,4 +24,4 @@ return function(t){var n=e,o=n.lib,i=o.WordArray,r=o.Hasher,s=n.algo,a=i.create(
24
24
  * (c) 2022 Evan You
25
25
  * @license MIT
26
26
  */
27
- var mo="store";function To(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function go(e){return null!==e&&"object"===typeof e}function bo(e){return e&&"function"===typeof e.then}function So(e,t){return function(){return e(t)}}function vo(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function Mo(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;Bo(e,n,[],e._modules.root,!0),yo(e,n,t)}function yo(e,t,o){var i=e._state,r=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var s=e._wrappedGetters,a={},c={},l=(0,n.effectScope)(!0);l.run((function(){To(s,(function(t,o){a[o]=So(t,e),c[o]=(0,n.computed)((function(){return a[o]()})),Object.defineProperty(e.getters,o,{get:function(){return c[o].value},enumerable:!0})}))})),e._state=(0,n.reactive)({data:t}),e._scope=l,e.strict&&Go(e),i&&o&&e._withCommit((function(){i.data=null})),r&&r.stop()}function Bo(e,t,n,o,i){var r=!n.length,s=e._modules.getNamespace(n);if(o.namespaced&&(e._modulesNamespaceMap[s],e._modulesNamespaceMap[s]=o),!r&&!i){var a=xo(t,n.slice(0,-1)),c=n[n.length-1];e._withCommit((function(){a[c]=o.state}))}var l=o.context=Co(e,s,n);o.forEachMutation((function(t,n){var o=s+n;Po(e,o,t,l)})),o.forEachAction((function(t,n){var o=t.root?n:s+n,i=t.handler||t;Eo(e,o,i,l)})),o.forEachGetter((function(t,n){var o=s+n;Io(e,o,t,l)})),o.forEachChild((function(o,r){Bo(e,t,n.concat(r),o,i)}))}function Co(e,t,n){var o=""===t,i={dispatch:o?e.dispatch:function(n,o,i){var r=Do(n,o,i),s=r.payload,a=r.options,c=r.type;return a&&a.root||(c=t+c),e.dispatch(c,s)},commit:o?e.commit:function(n,o,i){var r=Do(n,o,i),s=r.payload,a=r.options,c=r.type;a&&a.root||(c=t+c),e.commit(c,s,a)}};return Object.defineProperties(i,{getters:{get:o?function(){return e.getters}:function(){return wo(e,t)}},state:{get:function(){return xo(e.state,n)}}}),i}function wo(e,t){if(!e._makeLocalGettersCache[t]){var n={},o=t.length;Object.keys(e.getters).forEach((function(i){if(i.slice(0,o)===t){var r=i.slice(o);Object.defineProperty(n,r,{get:function(){return e.getters[i]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function Po(e,t,n,o){var i=e._mutations[t]||(e._mutations[t]=[]);i.push((function(t){n.call(e,o.state,t)}))}function Eo(e,t,n,o){var i=e._actions[t]||(e._actions[t]=[]);i.push((function(t){var i=n.call(e,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:e.getters,rootState:e.state},t);return bo(i)||(i=Promise.resolve(i)),e._devtoolHook?i.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):i}))}function Io(e,t,n,o){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(e){return n(o.state,o.getters,e.state,e.getters)})}function Go(e){(0,n.watch)((function(){return e._state.data}),(function(){0}),{deep:!0,flush:"sync"})}function xo(e,t){return t.reduce((function(e,t){return e[t]}),e)}function Do(e,t,n){return go(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var ko="vuex bindings",Ho="vuex:mutations",No="vuex:actions",Oo="vuex",Lo=0;function Vo(e,t){Ao({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[ko]},(function(n){n.addTimelineLayer({id:Ho,label:"Vuex Mutations",color:_o}),n.addTimelineLayer({id:No,label:"Vuex Actions",color:_o}),n.addInspector({id:Oo,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree((function(n){if(n.app===e&&n.inspectorId===Oo)if(n.filter){var o=[];Qo(o,t._modules.root,n.filter,""),n.rootNodes=o}else n.rootNodes=[Uo(t._modules.root,"")]})),n.on.getInspectorState((function(n){if(n.app===e&&n.inspectorId===Oo){var o=n.nodeId;wo(t,o),n.state=Xo(Ko(t._modules,o),"root"===o?t.getters:t._makeLocalGettersCache,o)}})),n.on.editInspectorState((function(n){if(n.app===e&&n.inspectorId===Oo){var o=n.nodeId,i=n.path;"root"!==o&&(i=o.split("/").filter(Boolean).concat(i)),t._withCommit((function(){n.set(t._state.data,i,n.state.value)}))}})),t.subscribe((function(e,t){var o={};e.payload&&(o.payload=e.payload),o.state=t,n.notifyComponentUpdate(),n.sendInspectorTree(Oo),n.sendInspectorState(Oo),n.addTimelineEvent({layerId:Ho,event:{time:Date.now(),title:e.type,data:o}})})),t.subscribeAction({before:function(e,t){var o={};e.payload&&(o.payload=e.payload),e._id=Lo++,e._time=Date.now(),o.state=t,n.addTimelineEvent({layerId:No,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:o}})},after:function(e,t){var o={},i=Date.now()-e._time;o.duration={_custom:{type:"duration",display:i+"ms",tooltip:"Action duration",value:i}},e.payload&&(o.payload=e.payload),o.state=t,n.addTimelineEvent({layerId:No,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:o}})}})}))}var _o=8702998,Fo=6710886,Ro=16777215,qo={label:"namespaced",textColor:Ro,backgroundColor:Fo};function jo(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function Uo(e,t){return{id:t||"root",label:jo(t),tags:e.namespaced?[qo]:[],children:Object.keys(e._children).map((function(n){return Uo(e._children[n],t+n+"/")}))}}function Qo(e,t,n,o){o.includes(n)&&e.push({id:o||"root",label:o.endsWith("/")?o.slice(0,o.length-1):o||"Root",tags:t.namespaced?[qo]:[]}),Object.keys(t._children).forEach((function(i){Qo(e,t._children[i],n,o+i+"/")}))}function Xo(e,t,n){t="root"===n?t:t[n];var o=Object.keys(t),i={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(o.length){var r=Wo(t);i.getters=Object.keys(r).map((function(e){return{key:e.endsWith("/")?jo(e):e,editable:!1,value:zo((function(){return r[e]}))}}))}return i}function Wo(e){var t={};return Object.keys(e).forEach((function(n){var o=n.split("/");if(o.length>1){var i=t,r=o.pop();o.forEach((function(e){i[e]||(i[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),i=i[e]._custom.value})),i[r]=zo((function(){return e[n]}))}else t[n]=zo((function(){return e[n]}))})),t}function Ko(e,t){var n=t.split("/").filter((function(e){return e}));return n.reduce((function(e,o,i){var r=e[o];if(!r)throw new Error('Missing module "'+o+'" for path "'+t+'".');return i===n.length-1?r:r._children}),"root"===t?e:e.root._children)}function zo(e){try{return e()}catch(t){return t}}var Yo=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"===typeof n?n():n)||{}},Jo={namespaced:{configurable:!0}};Jo.namespaced.get=function(){return!!this._rawModule.namespaced},Yo.prototype.addChild=function(e,t){this._children[e]=t},Yo.prototype.removeChild=function(e){delete this._children[e]},Yo.prototype.getChild=function(e){return this._children[e]},Yo.prototype.hasChild=function(e){return e in this._children},Yo.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},Yo.prototype.forEachChild=function(e){To(this._children,e)},Yo.prototype.forEachGetter=function(e){this._rawModule.getters&&To(this._rawModule.getters,e)},Yo.prototype.forEachAction=function(e){this._rawModule.actions&&To(this._rawModule.actions,e)},Yo.prototype.forEachMutation=function(e){this._rawModule.mutations&&To(this._rawModule.mutations,e)},Object.defineProperties(Yo.prototype,Jo);var Zo=function(e){this.register([],e,!1)};function $o(e,t,n){if(t.update(n),n.modules)for(var o in n.modules){if(!t.getChild(o))return void 0;$o(e.concat(o),t.getChild(o),n.modules[o])}}Zo.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},Zo.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return t=t.getChild(n),e+(t.namespaced?n+"/":"")}),"")},Zo.prototype.update=function(e){$o([],this.root,e)},Zo.prototype.register=function(e,t,n){var o=this;void 0===n&&(n=!0);var i=new Yo(t,n);if(0===e.length)this.root=i;else{var r=this.get(e.slice(0,-1));r.addChild(e[e.length-1],i)}t.modules&&To(t.modules,(function(t,i){o.register(e.concat(i),t,n)}))},Zo.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],o=t.getChild(n);o&&o.runtime&&t.removeChild(n)},Zo.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var ei=function(e){var t=this;void 0===e&&(e={});var n=e.plugins;void 0===n&&(n=[]);var o=e.strict;void 0===o&&(o=!1);var i=e.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Zo(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=i;var r=this,s=this,a=s.dispatch,c=s.commit;this.dispatch=function(e,t){return a.call(r,e,t)},this.commit=function(e,t,n){return c.call(r,e,t,n)},this.strict=o;var l=this._modules.root.state;Bo(this,l,[],this._modules.root),yo(this,l),n.forEach((function(e){return e(t)}))},ti={state:{configurable:!0}};ei.prototype.install=function(e,t){e.provide(t||mo,this),e.config.globalProperties.$store=this;var n=void 0!==this._devtools&&this._devtools;n&&Vo(e,this)},ti.state.get=function(){return this._state.data},ti.state.set=function(e){0},ei.prototype.commit=function(e,t,n){var o=this,i=Do(e,t,n),r=i.type,s=i.payload,a=(i.options,{type:r,payload:s}),c=this._mutations[r];c&&(this._withCommit((function(){c.forEach((function(e){e(s)}))})),this._subscribers.slice().forEach((function(e){return e(a,o.state)})))},ei.prototype.dispatch=function(e,t){var n=this,o=Do(e,t),i=o.type,r=o.payload,s={type:i,payload:r},a=this._actions[i];if(a){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(s,n.state)}))}catch(l){0}var c=a.length>1?Promise.all(a.map((function(e){return e(r)}))):a[0](r);return new Promise((function(e,t){c.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(s,n.state)}))}catch(l){0}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(s,n.state,e)}))}catch(l){0}t(e)}))}))}},ei.prototype.subscribe=function(e,t){return vo(e,this._subscribers,t)},ei.prototype.subscribeAction=function(e,t){var n="function"===typeof e?{before:e}:e;return vo(n,this._actionSubscribers,t)},ei.prototype.watch=function(e,t,o){var i=this;return(0,n.watch)((function(){return e(i.state,i.getters)}),t,Object.assign({},o))},ei.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},ei.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"===typeof e&&(e=[e]),this._modules.register(e,t),Bo(this,this.state,e,this._modules.get(e),n.preserveState),yo(this,this.state)},ei.prototype.unregisterModule=function(e){var t=this;"string"===typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var n=xo(t.state,e.slice(0,-1));delete n[e[e.length-1]]})),Mo(this)},ei.prototype.hasModule=function(e){return"string"===typeof e&&(e=[e]),this._modules.isRegistered(e)},ei.prototype.hotUpdate=function(e){this._modules.update(e),Mo(this,!0)},ei.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(ei.prototype,ti);var ni=si((function(e,t){var n={};return ii(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var o=ai(this.$store,"mapState",e);if(!o)return;t=o.context.state,n=o.context.getters}return"function"===typeof i?i.call(this,t,n):t[i]},n[o].vuex=!0})),n})),oi=(si((function(e,t){var n={};return ii(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var o=this.$store.commit;if(e){var r=ai(this.$store,"mapMutations",e);if(!r)return;o=r.context.commit}return"function"===typeof i?i.apply(this,[o].concat(t)):o.apply(this.$store,[i].concat(t))}})),n})),si((function(e,t){var n={};return ii(t).forEach((function(t){var o=t.key,i=t.val;i=e+i,n[o]=function(){if(!e||ai(this.$store,"mapGetters",e))return this.$store.getters[i]},n[o].vuex=!0})),n})),si((function(e,t){var n={};return ii(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var o=this.$store.dispatch;if(e){var r=ai(this.$store,"mapActions",e);if(!r)return;o=r.context.dispatch}return"function"===typeof i?i.apply(this,[o].concat(t)):o.apply(this.$store,[i].concat(t))}})),n})));function ii(e){return ri(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function ri(e){return Array.isArray(e)||go(e)}function si(e){return function(t,n){return"string"!==typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function ai(e,t,n){var o=e._modulesNamespaceMap[n];return o}var ci={name:"Question_Programming",props:{isEnterCodeByInit:{type:Boolean,default:!1},urlQuery:{type:String,default:""},isSub:{type:Boolean,default:!1},questionInfo:{type:Object,default:{}},bus:{type:Object,default:{}},mode:{type:String,default:"exam"}},mounted(){H(this),this.$watch("oss_temp_url",(e=>{if(e){let e=this.isAnswered();this.$emit("getIsAnswered",e),"exam"===this.mode&&this.bus.$emit("questionCardChange",{questionIndex:this.questionInfo.questionIndex-1,answered:e})}}),{immediate:!0})},created(){this.isEnterCodeByInit&&(this.oss_temp_url?this.startCode("2"):this.startCode("1"))},data(){return{iframe:null,showFrame:!1,analyCorrectAnswer:"",iframeUrl:"",code_file_oss_temp_path:"",oss_temp_url:"",scratch_answer_json:"",loading:!1,enterCode:!1,codeTypeMap:{1:"Scratch",2:"Python",3:"PyGame",4:"C++"},codeTypeImgMap:{1:o(3031),2:o(3843),3:o(6543),4:o(2657)},answerMap:{},...JSON.parse(k)}},watch:{questionInfo:{handler(e,t){if(e){this.answerMap=e.answerMap;let t=e.answerMap;t&&(this.code_file_oss_temp_path=t.code_file_oss_temp_path,this.oss_temp_url=t.oss_temp_url)}},immediate:!0}},computed:{...ni("zykjcommonQuestions",["pythonCodeWebPath","scratchCodeWebPath","cplusCodeWebPath"])},methods:{...oi("zykjcommonQuestions",["getEditorUrlActions"]),getAnswer(){return{code_file_oss_temp_path:this.code_file_oss_temp_path,oss_temp_url:this.oss_temp_url,scratch_answer_json:this.scratch_answer_json}},isAnswered(){let e=""!==this.oss_temp_url;return e},isCorrect(){let e="1"===this.questionInfo.answerMap.is_correct;return e},getCodeWebPath(e){this.pythonCodeWebPath||this.scratchCodeWebPath||this.cplusCodeWebPath?e&&e():(this.loading=!0,this.getEditorUrlActions().then((()=>{this.loading=!1,e&&e()}),(()=>{this.loading=!1})))},startCode(e){let t=this;this.loading||(this.getCodeWebPath((function(){let n={1:t.questionInfo.template_file_full_url,2:t.oss_temp_url,3:t.oss_temp_url,4:t.questionInfo.reference_file_full_url},o="",i=t.questionInfo.code_type,r=n[e],s=t.urlQuery+`&codeUrl=${r}`;switch(i){case 1:o=`${t.scratchCodeWebPath}/?${s}`;break;case 2:o=`${t.pythonCodeWebPath}/?${s}`;break;case 3:o=`${t.pythonCodeWebPath}/?${s}&pygame=true`;break;case 4:o=`${t.cplusCodeWebPath}/?${s}`;break}t.iframeUrl=o})),this.showFrame=!0)},getQuestionInfo(){let e=this,t={type:"getQuestionInfo",data:e.questionInfo.htmlContent};this.iframe&&this.iframe.contentWindow.postMessage(JSON.stringify(t),"*")},submitCodeQuestionByTimeover(){let e={type:"submitCodeQuestionByTimeover"};this.iframe&&this.iframe.contentWindow.postMessage(JSON.stringify(e),"*")},iframeLoaded(e){this.iframe=e,this.enterCode=!0,this.bus.$emit("enterCode",!0)},closeIframe(){this.enterCode=!1,this.bus.$emit("enterCode",!1),this.showFrame=!1},closeAndSave(e){this.saveCodeOnly(e),this.isEnterCodeByInit||this.closeIframe(),this.$emit("closeAndSave",e)},saveCodeOnly(e){let t=this;this.code_file_oss_temp_path=e.codeFileOssTempPath,this.oss_temp_url=e.ossTempUrl,this.scratch_answer_json=e.scratch_answer_json,this.bus.$emit("submitQuestion",{saveType:1,submitRequestAutoQuit:!1,needSubmitRequest:!1});let n=this.isAnswered();"exam"===this.mode&&this.bus.$emit("questionCardChange",{questionIndex:t.questionInfo.questionIndex-1,answered:n}),this.$emit("saveCodeOnly",e)},uploadCodingFileSuccess(e){this.code_file_oss_temp_path=e.codeFileOssTempPath,this.oss_temp_url=e.ossTempUrl,this.scratch_answer_json=e.scratch_answer_json,this.bus.$emit("uploadCodingFileSuccess")}},components:{IframeComponent:oo,MediaLooker:De,Loading:eo}};const li=(0,Ge.Z)(ci,[["render",Un]]);var ui=li;const di={class:"zykjcommon-question",style:{width:"100%",height:"100%"}},fi={class:"box"},hi={class:"main-block"},pi=["src"],Ai=(0,n.createElementVNode)("div",{class:"main-content"},[(0,n.createElementVNode)("div",{class:"main-append"})],-1),mi=(0,n.createElementVNode)("div",{class:"prev"},[(0,n.createElementVNode)("div",{class:"prev-main"})],-1),Ti=(0,n.createElementVNode)("div",{class:"next"},[(0,n.createElementVNode)("div",{class:"next-main"})],-1),gi={class:"list"},bi=["idx"],Si={class:"list-item-text"};function vi(e,t,o,i,r,s){return(0,n.openBlock)(),(0,n.createElementBlock)("div",di,[(0,n.createElementVNode)("div",{class:"question-classify",style:(0,n.normalizeStyle)(r.bigBgCss)},[(0,n.createElementVNode)("div",fi,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(r.bigBoxItemList,((e,t)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{class:"box-item",style:(0,n.normalizeStyle)(e.bgUrlCss),key:t},[(0,n.createElementVNode)("div",hi,[(0,n.createElementVNode)("img",{src:e.imgUrl,alt:""},null,8,pi)]),Ai],4)))),128))]),(0,n.createElementVNode)("div",{class:"list-outter",style:(0,n.normalizeStyle)(r.bottomBgCss)},[mi,Ti,(0,n.createElementVNode)("div",gi,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(r.optionList,((e,t)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{class:"list-item",idx:e.idx,style:(0,n.normalizeStyle)(e.bgUrlCss),key:t},[(0,n.createElementVNode)("div",Si,(0,n.toDisplayString)(e.content),1)],12,bi)))),128))])],4)],4)])}let Mi=function(e=1440,t=0,n=1){let o=100,i=document.documentElement.clientWidth||document.body.clientWidth,r=document.documentElement.clientHeight||document.body.clientHeight;r-=t;let s=document.getElementsByTagName("html")[0],a=4/3,c=a/(i/r),l=parseInt(i*c);s.style.fontSize=l/e*o*n+"px",console.log(s.style.fontSize)},yi=Ee.getDeviceEnv();var Bi={name:"Question_Classify",props:{questionInfo:{type:Object,default:{}},bus:{type:Object,default:{}},mode:{type:String,default:"exam"},screenRepairH:{type:Number,default:0},screenScale:{type:Number,default:0}},created(){this.setRootFontSize(),window.addEventListener("resize",this.setRootFontSize)},unmounted(){this.unmountedDo()},destroyed(){this.unmountedDo()},mounted(){this.init(),this.$watch("optionList",(e=>{e&&e.length&&this.$nextTick((()=>{this.dothings()}))}),{immediate:!0,deep:!0})},data(){return{analyCorrectAnswer:"",classify_question_info:{},answerMap:{},optionList:[],bigBoxItemList:[],bigBgCss:"",bottomBgCss:"",listItemBgCss:"",env:yi,p1:{},p2:{},listItem:null,moveDiv:null,timer:null,mousedown:"mobile"===yi?"touchstart":"mousedown",mousemove:"mobile"===yi?"touchmove":"mousemove",mouseup:"mobile"===yi?"touchend":"mouseup",dragWay:"",flag:!1,scrollDistance:3e3}},watch:{questionInfo:{handler(e,t){e&&(console.log(e,33),this.parseLists(e),this.answerMap=e.answerMap,e.answerMap&&this.mode)},immediate:!0}},computed:{},methods:{getAnswer(){let e=[];return $(this.$el).find(".box-item").each((function(t,n){let o=$(this),i=[];o.find(".append-item").each(((e,t)=>{i.push(Number($(t).attr("idx")))})),i=i.sort((function(e,t){return e-t})),console.log(i,345),e.push({big_type_index:t+1,small_type_index_list:i})})),{classify_mapping_list:e}},isAnswered(){let e=$(this.$el).find(".list .list-item").length,t=0===e;return t},isCorrect(){let e="1"===this.questionInfo.answerMap.is_correct;return e},parseLists(e){this.classify_question_info=e.classify_question_info;let t=e.exam_options_data;this.classify_question_info.background_file&&(this.bigBgCss=`background: url(${this.classify_question_info.background_file.file_url}) no-repeat center;background-size: 100% 100%`),this.classify_question_info.bottom_img_file&&(this.bottomBgCss=`background: url(${this.classify_question_info.bottom_img_file.file_url}) no-repeat center;background-size: 100% 100%`);let n=[];t.forEach((e=>{n.push({content:e.data.option_content,bgUrlCss:`background: url(${e.data.file_url}) no-repeat center;background-size: 100% 100%`,idx:e.index})})),this.optionList=n,this.listItemBgCss=n[0]?n[0].bgUrlCss:"";let o=[],i=this.classify_question_info.big_type_box_image_list,r=this.classify_question_info.big_type_option_list;i.forEach(((e,t)=>{o.push({imgUrl:r[t].file_url,bgUrl:e.file_url,bgUrlCss:`background: url(${e.file_url}) no-repeat center;background-size: 100% 100%`})})),this.bigBoxItemList=o},setRootFontSize(){Mi(1e3,this.screenRepairH,this.screenScale)},unmountedDo(){window.removeEventListener("resize",this.setRootFontSize),document.removeEventListener("gesturestart",this.gesturestartListener),this.$el,$(this.$el).find(".question-classify .append-item").off(this.mousedown),$(this.$el).find(".question-classify .list-item").off(this.mousedown),$(document).off(this.mouseup);let e=document.getElementsByTagName("html")[0];e.style.fontSize=""},answeredNotify(){let e=this,t=e.isAnswered();e.$emit("getIsAnswered",t),"exam"===e.mode&&e.bus.$emit("questionCardChange",{questionIndex:e.questionInfo.questionIndex-1,answered:t})},gesturestartListener(e){e.preventDefault()},init(){"mobile"===yi&&document.addEventListener("gesturestart",this.gesturestartListener)},getSpecArr(){let e=this,t=[],n=e.moveDiv.offset().left,o=n+e.moveDiv.width(),i=e.moveDiv.offset().top,r=i+e.moveDiv.height();return $(this.$el).find(".box-item").each(((e,s)=>{let a=$(s),c=a.offset().left,l=c+a.width(),u=a.offset().top,d=u+a.height();n>c&&o<l&&i>u&&r<d&&t.push({dom:a})})),t},bindDragDomEvent(e,t){let n=this;e.on(this.mousedown,(function(e){if(n.moveDiv)return;n.flag=!1,n.dragWay=t,console.log(e),e.stopPropagation(),e.preventDefault(),n.listItem=$(this),n.listItem.addClass("drag"),n.p1.moveX=n.listItem.offset().left,n.p1.moveY=n.listItem.offset().top-30;let o=n.listItem.attr("idx");n.moveDiv=$(`<div class="question-classify-moveDiv" idx="${o}" style="${n.listItemBgCss}"><div class="list-item-text">${n.listItem.find(".list-item-text").text()}</div></div>`),n.moveDiv.css({left:`${n.p1.moveX}px`,top:`${n.p1.moveY}px`}),$("body").append(n.moveDiv),$(document).on(n.mousemove,(function(e){e.stopPropagation(),n.p2.moveX=e.clientX||e.originalEvent.touches&&e.originalEvent.touches[0].clientX,n.p2.moveY=e.clientY||e.originalEvent.touches&&e.originalEvent.touches[0].clientY;let t=n.p2.moveX-n.moveDiv.width()/2,o=n.p2.moveY-n.moveDiv.height()/2;n.moveDiv.css({left:t+"px",top:o+"px"})}))}))},appendMoveDiv(e){let t=this;t.listItem.remove();let n=t.moveDiv.attr("idx"),o=$(`<div class="${e.appendItemClassName}" idx="${n}" style="${t.listItemBgCss}"><div class="list-item-text">${t.moveDiv.find(".list-item-text").text()}</div></div>`);o.css({opacity:0}),e.targetList.append(o),e.targetList[e.scrollDirection](t.scrollDistance);let i=o.offset().left,r=o.offset().top;t.moveDiv.css({transition:"all 0.5s",left:i,top:r}).on("transitionend",(function(){t.flag||(t.moveDiv.remove(),t.moveDiv.off("transitionend"),t.moveDiv=null,o.css({opacity:1}),t.answeredNotify(),t.bindDragDomEvent(o,e.op)),t.flag=!0}))},bindNextPrevEvent(e){let t=this;$(this.$el).find(`.question-classify .${e}`).on("click",(function(n){n.stopPropagation(),n.preventDefault();let o=$(t.$el).find(".question-classify .list-item"),i=$(t.$el).find(".question-classify .list"),r=o.outerWidth()*("next"===e?1:-1),s=i.scrollLeft();console.log(s),$(t.$el).find(".question-classify .list").stop(!0).animate({scrollLeft:s+r},500)}))},dothings(){let e=this;this.answerMap&&this.answerMap.classify_mapping_list&&this.answerMap.classify_mapping_list.length&&this.setAnswerDo(),e.bindDragDomEvent($(this.$el).find(".question-classify .list-item"),"go"),$(document).on(e.mouseup,(function(t){if("go"===e.dragWay){if($(document).off(e.mousemove),e.listItem&&e.listItem.removeClass("drag"),e.moveDiv){let t=e.getSpecArr();if(0===t.length)e.moveDiv&&(e.moveDiv.remove(),e.moveDiv=null);else{let n=t[0].dom;e.appendMoveDiv({targetList:n.find(".main-append"),appendItemClassName:"append-item",op:"back",scrollDirection:"scrollTop"})}}}else if("back"===e.dragWay&&($(document).off(e.mousemove),e.listItem&&e.listItem.removeClass("drag"),e.moveDiv)){let t=e.getSpecArr();if(0===t.length)e.appendMoveDiv({targetList:$(e.$el).find(".question-classify .list"),appendItemClassName:"list-item",op:"go",scrollDirection:"scrollLeft"});else{let n=t[0].dom,o=e.listItem.parents(".question-classify .box-item");n.get(0)===o.get(0)?(console.log("自己"),e.moveDiv.remove(),e.moveDiv=null,e.listItem&&e.listItem.removeClass("drag")):(console.log("不是自己"),e.appendMoveDiv({targetList:n.find(".main-append"),appendItemClassName:"append-item",op:"back",scrollDirection:"scrollTop"}),console.log("不是自己"))}console.log(t.length)}})),e.bindNextPrevEvent("next"),e.bindNextPrevEvent("prev")},setAnswerDo(){let e=this,t=[];$(this.$el).find(".question-classify .list-item").each(((e,n)=>{t.push(Number($(n).attr("idx")))})),this.answerMap.classify_mapping_list.forEach(((n,o)=>{n.small_type_index_list.forEach((n=>{let i=t.findIndex((e=>e==n));if(i>-1){t.splice(i,1);let n=$(this.$el).find(".question-classify .list-item").eq(i),r=n.attr("idx"),s=$(`<div class="append-item" idx="${r}" style="${e.listItemBgCss}"><div class="list-item-text">${n.find(".list-item-text").text()}</div></div>`);e.bindDragDomEvent(s,"back"),$(this.$el).find(".main-append").eq(o).append(s),n.remove()}}))})),this.answeredNotify()}},components:{}};const Ci=(0,Ge.Z)(Bi,[["render",vi]]);var wi=Ci;let Pi={1:"Question_SingleChoice",2:"Question_MultipleChoice",3:"Question_SingleChoice",7:"Question_BriefAnswer",16:"Question_Programming",11:"Question_Reading",4:"Question_FillBlank",17:"Question_Classify"};var Ei=o(1354),Ii=o(9669),Gi=o.n(Ii),xi=o(7631),Di=o.n(xi);let ki="piw38kulfozrea7ydmjnvbc965q1gt2x",Hi=function(e,t,n,o){void 0!=n&&"undefined"!==typeof n["password"]&&(n["password"]=Di().hex_md5(Di().hex_md5(n["password"]+"FE605C9343A3A47764598FDC184EC66F").toUpperCase()+"FE605C9343A3A47764598FDC184EC66F").toUpperCase());let i=e+"\n/student-web"+t+"\n"+o+"\n"+(n?JSON.stringify(n):""),r=Ei.enc.Base64.stringify((0,Ei.HmacSHA256)(i,ki)),s=function(e){let t=e.replace(/\+/g,"-");t=t.replace(/\//g,"_");let n=t.length%4,o="====";return t+=o.substring(0,n),t};return s(r)};Gi().defaults.baseURL="https://jsl-api.thedeer.cn/student-web/",Gi().defaults.timeout=6e4,Gi().defaults.withCredentials=!0;let Ni=(e,t)=>{if(t&&-1!=t["Content-Type"].indexOf("multipart/form-data")){let t=new FormData;for(let n in e)t.append(n,e[n]);return t}return JSON.stringify(e)},Oi=e=>{e=JSON.parse(e),e.hasOwnProperty("errorCode")&&(e.error_code=e.errorCode);let{error_code:t,message:n}=e;if(t){let e=[39002,39003];if(e.indexOf(t)<=-1){let e=n||"系统异常";Ee.messageTip("warning",e)}}return e};function Li(e,t,n,o,i){let r,s;e=e.toUpperCase(),t+=0===n.indexOf("/")?n.substr(1):n;let a=window.isMock;"undefined"!==typeof i&&"undefined"!==typeof i.isMock&&(a=i.isMock,delete i.isMock),a&&i&&i.onUploadProgress&&delete i.onUploadProgress;let c=n;"/"!==n[0]&&(c="/"+n);let l=(new Date).getTime(),u={ts:l,sign:Hi(e,c,o,l),token:Ee.getToken()};switch(e){case"Get":s=o||{};break;default:case"POST":r=o||{},u["Content-Type"]=i&&i.contentType?i.contentType:"application/json";break}return t instanceof Array?Gi().all([]).then(Gi().spread((function(){}))):Gi()(Object.assign({headers:u,method:e,url:t,data:r,params:s,transformRequest:Ni,transformResponse:Oi},i)).then((e=>e.data)).catch((e=>(console.log("服务端请求/响应错误:",e,e.config),Promise.reject(e))))}const Vi=(e,t,n)=>Li("GET","",e,t,n);let _i={editorUrl:"/open/editor-url"};const Fi={pythonCodeWebPath:"",scratchCodeWebPath:"",cplusCodeWebPath:""};var Ri={namespaced:!0,state:Fi,getters:{},mutations:{setCodeWebPath(e,t){e.pythonCodeWebPath=t.pythonCodeWebPath,e.scratchCodeWebPath=t.scratchCodeWebPath,e.cplusCodeWebPath=t.cplusCodeWebPath}},actions:{getEditorUrlActions({commit:e,dispatch:t}){return new Promise(((t,n)=>{Vi(`${_i.editorUrl}`).then((n=>{let{error_code:o,data:i}=n;if(!o){let{pythonCodeWebPath:t,scratchCodeWebPath:n,cplusCodeWebPath:o}=i;e("setCodeWebPath",{pythonCodeWebPath:t,scratchCodeWebPath:n,cplusCodeWebPath:o})}t(n)}),(e=>{n(e)}))}))}}};function qi(e){return e.registerModule("zykjcommonQuestions",Ri),{install(e){Ee.getVueVersion();e.mixin({methods:{parseQuestionListItem(e,t,n,o=void 0){function i(e,t){e.forEach((e=>{if("img"===e["<>"]&&e.hasOwnProperty("width")){let n=Number(e.width);n>t&&(e.width=Math.floor(t),e.height&&delete e.height)}e.html&&e.html.length&&i(e.html,t)}))}t.forEach(((t,r)=>{if(t.questionComponent=Pi[t.question_type],void 0===o?t.questionIndex=r+1:(t.questionIndex=o+1+"-"+(r+1),t.questionIndex2=r+1),n&&n.hasOwnProperty(t.question_id)){if(t.answerMap=n[t.question_id],"analysis"===e){t.answerMap.user_coding_file&&(t.answerMap.oss_temp_url=t.answerMap.user_coding_file),t.score=t.answerMap.question_max_score;let e=Object.keys(t.answerMap),n=/^user_/gi;e.forEach((e=>{if(n.test(e)){let o=e.replace(n,"");t.answerMap[o]=t.answerMap[e]}}))}}else t.answerMap=null;let s=t.question_type;3==s?t.exam_options_data=[{index:1,data:{name:"正确"}},{index:2,data:{name:"错误"}}]:t.exam_options_data&&t.exam_options_data.length&&t.exam_options_data.forEach(((e,t)=>{e.enIndex=Ee.indexToEnIndex(t+1)}));try{let e=JSON.parse(t.content),n=jQuery(".question-list").width()-30;i(e,n),t.htmlContent=$.json2html({},e)}catch(a){t.htmlContent=t.content}try{t.analysis?t.analysisHtmlContent=$.json2html({},JSON.parse(t.analysis)):t.analysisHtmlContent=""}catch(a){t.analysisHtmlContent=t.analysis}t.sub_questions&&t.sub_questions.length&&this.parseQuestionListItem(e,t.sub_questions,n,r)}))}}}),e.component("Question_SingleChoice",Ne),e.component("Question_MultipleChoice",Tt),e.component("Question_Reading",xt),e.component("Question_BriefAnswer",cn),e.component("Question_FillBlank",bn),e.component("Question_Programming",ui),e.component("Question_Classify",wi)},Question_SingleChoice:Ne,Question_MultipleChoice:Tt,Question_Reading:xt,Question_BriefAnswer:cn,Question_FillBlank:bn,Question_Programming:ui,Question_Classify:wi}}var ji=qi}(),i}()}));
27
+ var mo="store";function To(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function go(e){return null!==e&&"object"===typeof e}function bo(e){return e&&"function"===typeof e.then}function So(e,t){return function(){return e(t)}}function vo(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function Mo(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;Bo(e,n,[],e._modules.root,!0),yo(e,n,t)}function yo(e,t,o){var i=e._state,r=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var s=e._wrappedGetters,a={},c={},l=(0,n.effectScope)(!0);l.run((function(){To(s,(function(t,o){a[o]=So(t,e),c[o]=(0,n.computed)((function(){return a[o]()})),Object.defineProperty(e.getters,o,{get:function(){return c[o].value},enumerable:!0})}))})),e._state=(0,n.reactive)({data:t}),e._scope=l,e.strict&&Go(e),i&&o&&e._withCommit((function(){i.data=null})),r&&r.stop()}function Bo(e,t,n,o,i){var r=!n.length,s=e._modules.getNamespace(n);if(o.namespaced&&(e._modulesNamespaceMap[s],e._modulesNamespaceMap[s]=o),!r&&!i){var a=xo(t,n.slice(0,-1)),c=n[n.length-1];e._withCommit((function(){a[c]=o.state}))}var l=o.context=Co(e,s,n);o.forEachMutation((function(t,n){var o=s+n;Po(e,o,t,l)})),o.forEachAction((function(t,n){var o=t.root?n:s+n,i=t.handler||t;Eo(e,o,i,l)})),o.forEachGetter((function(t,n){var o=s+n;Io(e,o,t,l)})),o.forEachChild((function(o,r){Bo(e,t,n.concat(r),o,i)}))}function Co(e,t,n){var o=""===t,i={dispatch:o?e.dispatch:function(n,o,i){var r=Do(n,o,i),s=r.payload,a=r.options,c=r.type;return a&&a.root||(c=t+c),e.dispatch(c,s)},commit:o?e.commit:function(n,o,i){var r=Do(n,o,i),s=r.payload,a=r.options,c=r.type;a&&a.root||(c=t+c),e.commit(c,s,a)}};return Object.defineProperties(i,{getters:{get:o?function(){return e.getters}:function(){return wo(e,t)}},state:{get:function(){return xo(e.state,n)}}}),i}function wo(e,t){if(!e._makeLocalGettersCache[t]){var n={},o=t.length;Object.keys(e.getters).forEach((function(i){if(i.slice(0,o)===t){var r=i.slice(o);Object.defineProperty(n,r,{get:function(){return e.getters[i]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function Po(e,t,n,o){var i=e._mutations[t]||(e._mutations[t]=[]);i.push((function(t){n.call(e,o.state,t)}))}function Eo(e,t,n,o){var i=e._actions[t]||(e._actions[t]=[]);i.push((function(t){var i=n.call(e,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:e.getters,rootState:e.state},t);return bo(i)||(i=Promise.resolve(i)),e._devtoolHook?i.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):i}))}function Io(e,t,n,o){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(e){return n(o.state,o.getters,e.state,e.getters)})}function Go(e){(0,n.watch)((function(){return e._state.data}),(function(){0}),{deep:!0,flush:"sync"})}function xo(e,t){return t.reduce((function(e,t){return e[t]}),e)}function Do(e,t,n){return go(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var ko="vuex bindings",Ho="vuex:mutations",No="vuex:actions",Oo="vuex",Lo=0;function Vo(e,t){Ao({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[ko]},(function(n){n.addTimelineLayer({id:Ho,label:"Vuex Mutations",color:_o}),n.addTimelineLayer({id:No,label:"Vuex Actions",color:_o}),n.addInspector({id:Oo,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree((function(n){if(n.app===e&&n.inspectorId===Oo)if(n.filter){var o=[];Qo(o,t._modules.root,n.filter,""),n.rootNodes=o}else n.rootNodes=[Uo(t._modules.root,"")]})),n.on.getInspectorState((function(n){if(n.app===e&&n.inspectorId===Oo){var o=n.nodeId;wo(t,o),n.state=Xo(Ko(t._modules,o),"root"===o?t.getters:t._makeLocalGettersCache,o)}})),n.on.editInspectorState((function(n){if(n.app===e&&n.inspectorId===Oo){var o=n.nodeId,i=n.path;"root"!==o&&(i=o.split("/").filter(Boolean).concat(i)),t._withCommit((function(){n.set(t._state.data,i,n.state.value)}))}})),t.subscribe((function(e,t){var o={};e.payload&&(o.payload=e.payload),o.state=t,n.notifyComponentUpdate(),n.sendInspectorTree(Oo),n.sendInspectorState(Oo),n.addTimelineEvent({layerId:Ho,event:{time:Date.now(),title:e.type,data:o}})})),t.subscribeAction({before:function(e,t){var o={};e.payload&&(o.payload=e.payload),e._id=Lo++,e._time=Date.now(),o.state=t,n.addTimelineEvent({layerId:No,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:o}})},after:function(e,t){var o={},i=Date.now()-e._time;o.duration={_custom:{type:"duration",display:i+"ms",tooltip:"Action duration",value:i}},e.payload&&(o.payload=e.payload),o.state=t,n.addTimelineEvent({layerId:No,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:o}})}})}))}var _o=8702998,Fo=6710886,Ro=16777215,qo={label:"namespaced",textColor:Ro,backgroundColor:Fo};function jo(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function Uo(e,t){return{id:t||"root",label:jo(t),tags:e.namespaced?[qo]:[],children:Object.keys(e._children).map((function(n){return Uo(e._children[n],t+n+"/")}))}}function Qo(e,t,n,o){o.includes(n)&&e.push({id:o||"root",label:o.endsWith("/")?o.slice(0,o.length-1):o||"Root",tags:t.namespaced?[qo]:[]}),Object.keys(t._children).forEach((function(i){Qo(e,t._children[i],n,o+i+"/")}))}function Xo(e,t,n){t="root"===n?t:t[n];var o=Object.keys(t),i={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(o.length){var r=Wo(t);i.getters=Object.keys(r).map((function(e){return{key:e.endsWith("/")?jo(e):e,editable:!1,value:zo((function(){return r[e]}))}}))}return i}function Wo(e){var t={};return Object.keys(e).forEach((function(n){var o=n.split("/");if(o.length>1){var i=t,r=o.pop();o.forEach((function(e){i[e]||(i[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),i=i[e]._custom.value})),i[r]=zo((function(){return e[n]}))}else t[n]=zo((function(){return e[n]}))})),t}function Ko(e,t){var n=t.split("/").filter((function(e){return e}));return n.reduce((function(e,o,i){var r=e[o];if(!r)throw new Error('Missing module "'+o+'" for path "'+t+'".');return i===n.length-1?r:r._children}),"root"===t?e:e.root._children)}function zo(e){try{return e()}catch(t){return t}}var Yo=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"===typeof n?n():n)||{}},Jo={namespaced:{configurable:!0}};Jo.namespaced.get=function(){return!!this._rawModule.namespaced},Yo.prototype.addChild=function(e,t){this._children[e]=t},Yo.prototype.removeChild=function(e){delete this._children[e]},Yo.prototype.getChild=function(e){return this._children[e]},Yo.prototype.hasChild=function(e){return e in this._children},Yo.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},Yo.prototype.forEachChild=function(e){To(this._children,e)},Yo.prototype.forEachGetter=function(e){this._rawModule.getters&&To(this._rawModule.getters,e)},Yo.prototype.forEachAction=function(e){this._rawModule.actions&&To(this._rawModule.actions,e)},Yo.prototype.forEachMutation=function(e){this._rawModule.mutations&&To(this._rawModule.mutations,e)},Object.defineProperties(Yo.prototype,Jo);var Zo=function(e){this.register([],e,!1)};function $o(e,t,n){if(t.update(n),n.modules)for(var o in n.modules){if(!t.getChild(o))return void 0;$o(e.concat(o),t.getChild(o),n.modules[o])}}Zo.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},Zo.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return t=t.getChild(n),e+(t.namespaced?n+"/":"")}),"")},Zo.prototype.update=function(e){$o([],this.root,e)},Zo.prototype.register=function(e,t,n){var o=this;void 0===n&&(n=!0);var i=new Yo(t,n);if(0===e.length)this.root=i;else{var r=this.get(e.slice(0,-1));r.addChild(e[e.length-1],i)}t.modules&&To(t.modules,(function(t,i){o.register(e.concat(i),t,n)}))},Zo.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],o=t.getChild(n);o&&o.runtime&&t.removeChild(n)},Zo.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var ei=function(e){var t=this;void 0===e&&(e={});var n=e.plugins;void 0===n&&(n=[]);var o=e.strict;void 0===o&&(o=!1);var i=e.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Zo(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=i;var r=this,s=this,a=s.dispatch,c=s.commit;this.dispatch=function(e,t){return a.call(r,e,t)},this.commit=function(e,t,n){return c.call(r,e,t,n)},this.strict=o;var l=this._modules.root.state;Bo(this,l,[],this._modules.root),yo(this,l),n.forEach((function(e){return e(t)}))},ti={state:{configurable:!0}};ei.prototype.install=function(e,t){e.provide(t||mo,this),e.config.globalProperties.$store=this;var n=void 0!==this._devtools&&this._devtools;n&&Vo(e,this)},ti.state.get=function(){return this._state.data},ti.state.set=function(e){0},ei.prototype.commit=function(e,t,n){var o=this,i=Do(e,t,n),r=i.type,s=i.payload,a=(i.options,{type:r,payload:s}),c=this._mutations[r];c&&(this._withCommit((function(){c.forEach((function(e){e(s)}))})),this._subscribers.slice().forEach((function(e){return e(a,o.state)})))},ei.prototype.dispatch=function(e,t){var n=this,o=Do(e,t),i=o.type,r=o.payload,s={type:i,payload:r},a=this._actions[i];if(a){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(s,n.state)}))}catch(l){0}var c=a.length>1?Promise.all(a.map((function(e){return e(r)}))):a[0](r);return new Promise((function(e,t){c.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(s,n.state)}))}catch(l){0}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(s,n.state,e)}))}catch(l){0}t(e)}))}))}},ei.prototype.subscribe=function(e,t){return vo(e,this._subscribers,t)},ei.prototype.subscribeAction=function(e,t){var n="function"===typeof e?{before:e}:e;return vo(n,this._actionSubscribers,t)},ei.prototype.watch=function(e,t,o){var i=this;return(0,n.watch)((function(){return e(i.state,i.getters)}),t,Object.assign({},o))},ei.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},ei.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"===typeof e&&(e=[e]),this._modules.register(e,t),Bo(this,this.state,e,this._modules.get(e),n.preserveState),yo(this,this.state)},ei.prototype.unregisterModule=function(e){var t=this;"string"===typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var n=xo(t.state,e.slice(0,-1));delete n[e[e.length-1]]})),Mo(this)},ei.prototype.hasModule=function(e){return"string"===typeof e&&(e=[e]),this._modules.isRegistered(e)},ei.prototype.hotUpdate=function(e){this._modules.update(e),Mo(this,!0)},ei.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(ei.prototype,ti);var ni=si((function(e,t){var n={};return ii(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var o=ai(this.$store,"mapState",e);if(!o)return;t=o.context.state,n=o.context.getters}return"function"===typeof i?i.call(this,t,n):t[i]},n[o].vuex=!0})),n})),oi=(si((function(e,t){var n={};return ii(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var o=this.$store.commit;if(e){var r=ai(this.$store,"mapMutations",e);if(!r)return;o=r.context.commit}return"function"===typeof i?i.apply(this,[o].concat(t)):o.apply(this.$store,[i].concat(t))}})),n})),si((function(e,t){var n={};return ii(t).forEach((function(t){var o=t.key,i=t.val;i=e+i,n[o]=function(){if(!e||ai(this.$store,"mapGetters",e))return this.$store.getters[i]},n[o].vuex=!0})),n})),si((function(e,t){var n={};return ii(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var o=this.$store.dispatch;if(e){var r=ai(this.$store,"mapActions",e);if(!r)return;o=r.context.dispatch}return"function"===typeof i?i.apply(this,[o].concat(t)):o.apply(this.$store,[i].concat(t))}})),n})));function ii(e){return ri(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function ri(e){return Array.isArray(e)||go(e)}function si(e){return function(t,n){return"string"!==typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function ai(e,t,n){var o=e._modulesNamespaceMap[n];return o}var ci={name:"Question_Programming",props:{isEnterCodeByInit:{type:Boolean,default:!1},urlQuery:{type:String,default:""},isSub:{type:Boolean,default:!1},questionInfo:{type:Object,default:{}},bus:{type:Object,default:{}},mode:{type:String,default:"exam"}},mounted(){H(this),this.$watch("oss_temp_url",(e=>{if(e){let e=this.isAnswered();this.$emit("getIsAnswered",e),"exam"===this.mode&&this.bus.$emit("questionCardChange",{questionIndex:this.questionInfo.questionIndex-1,answered:e})}}),{immediate:!0})},created(){this.isEnterCodeByInit&&(this.oss_temp_url?this.startCode("2"):this.startCode("1"))},data(){return{iframe:null,showFrame:!1,analyCorrectAnswer:"",iframeUrl:"",code_file_oss_temp_path:"",oss_temp_url:"",scratch_answer_json:"",loading:!1,enterCode:!1,codeTypeMap:{1:"Scratch",2:"Python",3:"PyGame",4:"C++"},codeTypeImgMap:{1:o(3031),2:o(3843),3:o(6543),4:o(2657)},answerMap:{},...JSON.parse(k)}},watch:{questionInfo:{handler(e,t){if(e){this.answerMap=e.answerMap;let t=e.answerMap;t&&(this.code_file_oss_temp_path=t.code_file_oss_temp_path,this.oss_temp_url=t.oss_temp_url)}},immediate:!0}},computed:{...ni("zykjcommonQuestions",["pythonCodeWebPath","scratchCodeWebPath","cplusCodeWebPath"])},methods:{...oi("zykjcommonQuestions",["getEditorUrlActions"]),getAnswer(){return{code_file_oss_temp_path:this.code_file_oss_temp_path,oss_temp_url:this.oss_temp_url,scratch_answer_json:this.scratch_answer_json}},isAnswered(){let e=""!==this.oss_temp_url;return e},isCorrect(){let e="1"===this.questionInfo.answerMap.is_correct;return e},getCodeWebPath(e){this.pythonCodeWebPath||this.scratchCodeWebPath||this.cplusCodeWebPath?e&&e():(this.loading=!0,this.getEditorUrlActions().then((()=>{this.loading=!1,e&&e()}),(()=>{this.loading=!1})))},startCode(e){let t=this;this.loading||(this.getCodeWebPath((function(){let n={1:t.questionInfo.template_file_full_url,2:t.oss_temp_url,3:t.oss_temp_url,4:t.questionInfo.reference_file_full_url},o="",i=t.questionInfo.code_type,r=n[e],s=t.urlQuery+`&codeUrl=${r}`;switch(i){case 1:o=`${t.scratchCodeWebPath}/?${s}`;break;case 2:o=`${t.pythonCodeWebPath}/?${s}`;break;case 3:o=`${t.pythonCodeWebPath}/?${s}&pygame=true`;break;case 4:o=`${t.cplusCodeWebPath}/?${s}`;break}t.iframeUrl=o})),this.showFrame=!0)},getQuestionInfo(){let e=this,t={type:"getQuestionInfo",data:e.questionInfo.htmlContent};this.iframe&&this.iframe.contentWindow.postMessage(JSON.stringify(t),"*")},submitCodeQuestionByTimeover(){let e={type:"submitCodeQuestionByTimeover"};this.iframe&&this.iframe.contentWindow.postMessage(JSON.stringify(e),"*")},iframeLoaded(e){this.iframe=e,this.enterCode=!0,this.bus.$emit("enterCode",!0)},closeIframe(){this.enterCode=!1,this.bus.$emit("enterCode",!1),this.showFrame=!1},closeAndSave(e){this.saveCodeOnly(e),this.isEnterCodeByInit||this.closeIframe(),this.$emit("closeAndSave",e)},saveCodeOnly(e){let t=this;this.code_file_oss_temp_path=e.codeFileOssTempPath,this.oss_temp_url=e.ossTempUrl,this.scratch_answer_json=e.scratch_answer_json,this.bus.$emit("submitQuestion",{saveType:1,submitRequestAutoQuit:!1,needSubmitRequest:!1});let n=this.isAnswered();"exam"===this.mode&&this.bus.$emit("questionCardChange",{questionIndex:t.questionInfo.questionIndex-1,answered:n}),this.$emit("saveCodeOnly",e)},uploadCodingFileSuccess(e){this.code_file_oss_temp_path=e.codeFileOssTempPath,this.oss_temp_url=e.ossTempUrl,this.scratch_answer_json=e.scratch_answer_json,this.bus.$emit("uploadCodingFileSuccess")}},components:{IframeComponent:oo,MediaLooker:De,Loading:eo}};const li=(0,Ge.Z)(ci,[["render",Un]]);var ui=li;const di={class:"zykjcommon-question",style:{width:"100%",height:"100%"}},fi={class:"box"},hi={class:"main-block"},pi=["src"],Ai=(0,n.createElementVNode)("div",{class:"main-content"},[(0,n.createElementVNode)("div",{class:"main-append"})],-1),mi=(0,n.createElementVNode)("div",{class:"prev"},[(0,n.createElementVNode)("div",{class:"prev-main"})],-1),Ti=(0,n.createElementVNode)("div",{class:"next"},[(0,n.createElementVNode)("div",{class:"next-main"})],-1),gi={class:"list"},bi=["idx"],Si={class:"list-item-text"};function vi(e,t,o,i,r,s){return(0,n.openBlock)(),(0,n.createElementBlock)("div",di,[(0,n.createElementVNode)("div",{class:"question-classify",style:(0,n.normalizeStyle)(r.bigBgCss)},[(0,n.createElementVNode)("div",fi,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(r.bigBoxItemList,((e,t)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{class:"box-item",style:(0,n.normalizeStyle)(e.bgUrlCss),key:t},[(0,n.createElementVNode)("div",hi,[(0,n.createElementVNode)("img",{src:e.imgUrl,alt:""},null,8,pi)]),Ai],4)))),128))]),(0,n.createElementVNode)("div",{class:"list-outter",style:(0,n.normalizeStyle)(r.bottomBgCss)},[mi,Ti,(0,n.createElementVNode)("div",gi,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(r.optionList,((e,t)=>((0,n.openBlock)(),(0,n.createElementBlock)("div",{class:"list-item",idx:e.idx,style:(0,n.normalizeStyle)(e.bgUrlCss),key:t},[(0,n.createElementVNode)("div",Si,(0,n.toDisplayString)(e.content),1)],12,bi)))),128))])],4)],4)])}let Mi=function(e=1440,t=0,n=1){let o=100,i=document.documentElement.clientWidth||document.body.clientWidth,r=document.documentElement.clientHeight||document.body.clientHeight;r-=t;let s=document.getElementsByTagName("html")[0],a=4/3,c=a/(i/r),l=parseInt(i*c),u=document.querySelector(".zykjcommon-question");u.style.fontSize=l/e*o*n+"px",console.log(s.style.fontSize)},yi=Ee.getDeviceEnv();var Bi={name:"Question_Classify",props:{questionInfo:{type:Object,default:{}},bus:{type:Object,default:{}},mode:{type:String,default:"exam"},screenRepairH:{type:Number,default:0},screenScale:{type:Number,default:0}},created(){},unmounted(){this.unmountedDo()},destroyed(){this.unmountedDo()},mounted(){this.setRootFontSize(),window.addEventListener("resize",this.setRootFontSize),this.init(),this.$watch("optionList",(e=>{e&&e.length&&this.$nextTick((()=>{this.dothings()}))}),{immediate:!0,deep:!0})},data(){return{animationing:!1,analyCorrectAnswer:"",classify_question_info:{},answerMap:{},optionList:[],bigBoxItemList:[],bigBgCss:"",bottomBgCss:"",listItemBgCss:"",env:yi,p1:{},p2:{},listItem:null,moveDiv:null,timer:null,mousedown:"mobile"===yi?"touchstart":"mousedown",mousemove:"mobile"===yi?"touchmove":"mousemove",mouseup:"mobile"===yi?"touchend":"mouseup",dragWay:"",flag:!1,scrollDistance:3e3}},watch:{questionInfo:{handler(e,t){e&&(console.log(e,33),this.parseLists(e),this.answerMap=e.answerMap,e.answerMap&&this.mode)},immediate:!0}},computed:{},methods:{getAnswer(){let e=[];return $(this.$el).find(".box-item").each((function(t,n){let o=$(this),i=[];o.find(".append-item").each(((e,t)=>{i.push(Number($(t).attr("idx")))})),i=i.sort((function(e,t){return e-t})),console.log(i,345),e.push({big_type_index:t+1,small_type_index_list:i})})),{classify_mapping_list:e}},isAnswered(){let e=$(this.$el).find(".list .list-item").length,t=0===e;return t},isCorrect(){let e="1"===this.questionInfo.answerMap.is_correct;return e},parseLists(e){this.classify_question_info=e.classify_question_info;let t=e.exam_options_data;this.classify_question_info.background_file&&(this.bigBgCss=`background: url(${this.classify_question_info.background_file.file_url}) no-repeat center;background-size: 100% 100%`),this.classify_question_info.bottom_img_file&&(this.bottomBgCss=`background: url(${this.classify_question_info.bottom_img_file.file_url}) no-repeat center;background-size: 100% 100%`);let n=[];t.forEach((e=>{n.push({content:e.data.option_content,bgUrlCss:`background: url(${e.data.file_url}) no-repeat center;background-size: 100% 100%`,idx:e.index})})),this.optionList=n,this.listItemBgCss=n[0]?n[0].bgUrlCss:"";let o=[],i=this.classify_question_info.big_type_box_image_list,r=this.classify_question_info.big_type_option_list;i.forEach(((e,t)=>{o.push({imgUrl:r[t].file_url,bgUrl:e.file_url,bgUrlCss:`background: url(${e.file_url}) no-repeat center;background-size: 100% 100%`})})),this.bigBoxItemList=o},setRootFontSize(){Mi(1e3,this.screenRepairH,this.screenScale)},unmountedDo(){window.removeEventListener("resize",this.setRootFontSize),document.removeEventListener("gesturestart",this.gesturestartListener),this.$el,$(this.$el).find(".question-classify .append-item").off(this.mousedown),$(this.$el).find(".question-classify .list-item").off(this.mousedown),$(document).off(this.mouseup);let e=document.getElementsByTagName("html")[0];e.style.fontSize=""},answeredNotify(){let e=this,t=e.isAnswered();e.$emit("getIsAnswered",t),"exam"===e.mode&&e.bus.$emit("questionCardChange",{questionIndex:e.questionInfo.questionIndex-1,answered:t})},gesturestartListener(e){e.preventDefault()},init(){"mobile"===yi&&document.addEventListener("gesturestart",this.gesturestartListener)},getSpecArr(){let e=this,t=[],n=e.moveDiv.offset().left,o=n+e.moveDiv.width(),i=e.moveDiv.offset().top,r=i+e.moveDiv.height();return $(this.$el).find(".box-item").each(((e,s)=>{let a=$(s),c=a.offset().left,l=c+a.width(),u=a.offset().top,d=u+a.height();n>c&&o<l&&i>u&&r<d&&t.push({dom:a})})),t},bindDragDomEvent(e,t){let n=this;e.on(this.mousedown,(function(e){if(n.moveDiv)return;n.flag=!1,n.dragWay=t,console.log(e),e.stopPropagation(),e.preventDefault(),n.listItem=$(this),n.listItem.addClass("drag"),n.p1.moveX=n.listItem.offset().left,n.p1.moveY=n.listItem.offset().top-30;let o=n.listItem.attr("idx");n.moveDiv=$(`<div class="question-classify-moveDiv" idx="${o}" style="${n.listItemBgCss}"><div class="list-item-text">${n.listItem.find(".list-item-text").text()}</div></div>`),n.moveDiv.css({left:`${n.p1.moveX}px`,top:`${n.p1.moveY}px`}),$(n.$el).append(n.moveDiv),$(document).on(n.mousemove,(function(e){e.stopPropagation(),n.p2.moveX=e.clientX||e.originalEvent.touches&&e.originalEvent.touches[0].clientX,n.p2.moveY=e.clientY||e.originalEvent.touches&&e.originalEvent.touches[0].clientY;let t=n.p2.moveX-n.moveDiv.width()/2,o=n.p2.moveY-n.moveDiv.height()/2;n.moveDiv.css({left:t+"px",top:o+"px"})}))}))},appendMoveDiv(e){let t=this;t.listItem.remove();let n=t.moveDiv.attr("idx"),o=$(`<div class="${e.appendItemClassName}" idx="${n}" style="${t.listItemBgCss}"><div class="list-item-text">${t.moveDiv.find(".list-item-text").text()}</div></div>`);o.css({opacity:0}),e.targetList.append(o),e.targetList[e.scrollDirection](t.scrollDistance);let i=o.offset().left,r=o.offset().top;t.animationing=!0,t.moveDiv.css({transition:"all 0.5s",left:i,top:r}).on("transitionend",(function(){t.flag||(t.moveDiv.remove(),t.moveDiv.off("transitionend"),t.moveDiv=null,o.css({opacity:1}),t.answeredNotify(),t.bindDragDomEvent(o,e.op),t.animationing=!1),t.flag=!0}))},bindNextPrevEvent(e){let t=this;$(this.$el).find(`.question-classify .${e}`).on("click",(function(n){n.stopPropagation(),n.preventDefault();let o=$(t.$el).find(".question-classify .list-item"),i=$(t.$el).find(".question-classify .list"),r=o.outerWidth()*("next"===e?1:-1),s=i.scrollLeft();console.log(s),$(t.$el).find(".question-classify .list").stop(!0).animate({scrollLeft:s+r},500)}))},dothings(){let e=this;this.answerMap&&this.answerMap.classify_mapping_list&&this.answerMap.classify_mapping_list.length&&this.setAnswerDo(),e.bindDragDomEvent($(this.$el).find(".question-classify .list-item"),"go"),$(document).on(e.mouseup,(function(t){if(!e.animationing)if("go"===e.dragWay){if($(document).off(e.mousemove),e.listItem&&e.listItem.removeClass("drag"),e.moveDiv){let t=e.getSpecArr();if(0===t.length)e.moveDiv&&(e.moveDiv.remove(),e.moveDiv=null);else{let n=t[0].dom;e.appendMoveDiv({targetList:n.find(".main-append"),appendItemClassName:"append-item",op:"back",scrollDirection:"scrollTop"})}}}else if("back"===e.dragWay&&($(document).off(e.mousemove),e.listItem&&e.listItem.removeClass("drag"),e.moveDiv)){let t=e.getSpecArr();if(0===t.length)e.appendMoveDiv({targetList:$(e.$el).find(".question-classify .list"),appendItemClassName:"list-item",op:"go",scrollDirection:"scrollLeft"});else{let n=t[0].dom,o=e.listItem.parents(".question-classify .box-item");n.get(0)===o.get(0)?(console.log("自己"),e.moveDiv.remove(),e.moveDiv=null,e.listItem&&e.listItem.removeClass("drag")):(console.log("不是自己"),e.appendMoveDiv({targetList:n.find(".main-append"),appendItemClassName:"append-item",op:"back",scrollDirection:"scrollTop"}),console.log("不是自己"))}console.log(t.length)}})),e.bindNextPrevEvent("next"),e.bindNextPrevEvent("prev")},setAnswerDo(){let e=this,t=[];$(this.$el).find(".question-classify .list-item").each(((e,n)=>{t.push(Number($(n).attr("idx")))})),this.answerMap.classify_mapping_list.forEach(((n,o)=>{n.small_type_index_list.forEach((n=>{let i=t.findIndex((e=>e==n));if(i>-1){t.splice(i,1);let n=$(this.$el).find(".question-classify .list-item").eq(i),r=n.attr("idx"),s=$(`<div class="append-item" idx="${r}" style="${e.listItemBgCss}"><div class="list-item-text">${n.find(".list-item-text").text()}</div></div>`);e.bindDragDomEvent(s,"back"),$(this.$el).find(".main-append").eq(o).append(s),n.remove()}}))})),this.answeredNotify()}},components:{}};const Ci=(0,Ge.Z)(Bi,[["render",vi]]);var wi=Ci;let Pi={1:"Question_SingleChoice",2:"Question_MultipleChoice",3:"Question_SingleChoice",7:"Question_BriefAnswer",16:"Question_Programming",11:"Question_Reading",4:"Question_FillBlank",17:"Question_Classify"};var Ei=o(1354),Ii=o(9669),Gi=o.n(Ii),xi=o(7631),Di=o.n(xi);let ki="piw38kulfozrea7ydmjnvbc965q1gt2x",Hi=function(e,t,n,o){void 0!=n&&"undefined"!==typeof n["password"]&&(n["password"]=Di().hex_md5(Di().hex_md5(n["password"]+"FE605C9343A3A47764598FDC184EC66F").toUpperCase()+"FE605C9343A3A47764598FDC184EC66F").toUpperCase());let i=e+"\n/student-web"+t+"\n"+o+"\n"+(n?JSON.stringify(n):""),r=Ei.enc.Base64.stringify((0,Ei.HmacSHA256)(i,ki)),s=function(e){let t=e.replace(/\+/g,"-");t=t.replace(/\//g,"_");let n=t.length%4,o="====";return t+=o.substring(0,n),t};return s(r)};Gi().defaults.baseURL="https://jsl-api.thedeer.cn/student-web/",Gi().defaults.timeout=6e4,Gi().defaults.withCredentials=!0;let Ni=(e,t)=>{if(t&&-1!=t["Content-Type"].indexOf("multipart/form-data")){let t=new FormData;for(let n in e)t.append(n,e[n]);return t}return JSON.stringify(e)},Oi=e=>{e=JSON.parse(e),e.hasOwnProperty("errorCode")&&(e.error_code=e.errorCode);let{error_code:t,message:n}=e;if(t){let e=[39002,39003];if(e.indexOf(t)<=-1){let e=n||"系统异常";Ee.messageTip("warning",e)}}return e};function Li(e,t,n,o,i){let r,s;e=e.toUpperCase(),t+=0===n.indexOf("/")?n.substr(1):n;let a=window.isMock;"undefined"!==typeof i&&"undefined"!==typeof i.isMock&&(a=i.isMock,delete i.isMock),a&&i&&i.onUploadProgress&&delete i.onUploadProgress;let c=n;"/"!==n[0]&&(c="/"+n);let l=(new Date).getTime(),u={ts:l,sign:Hi(e,c,o,l),token:Ee.getToken()};switch(e){case"Get":s=o||{};break;default:case"POST":r=o||{},u["Content-Type"]=i&&i.contentType?i.contentType:"application/json";break}return t instanceof Array?Gi().all([]).then(Gi().spread((function(){}))):Gi()(Object.assign({headers:u,method:e,url:t,data:r,params:s,transformRequest:Ni,transformResponse:Oi},i)).then((e=>e.data)).catch((e=>(console.log("服务端请求/响应错误:",e,e.config),Promise.reject(e))))}const Vi=(e,t,n)=>Li("GET","",e,t,n);let _i={editorUrl:"/open/editor-url"};const Fi={pythonCodeWebPath:"",scratchCodeWebPath:"",cplusCodeWebPath:""};var Ri={namespaced:!0,state:Fi,getters:{},mutations:{setCodeWebPath(e,t){e.pythonCodeWebPath=t.pythonCodeWebPath,e.scratchCodeWebPath=t.scratchCodeWebPath,e.cplusCodeWebPath=t.cplusCodeWebPath}},actions:{getEditorUrlActions({commit:e,dispatch:t}){return new Promise(((t,n)=>{Vi(`${_i.editorUrl}`).then((n=>{let{error_code:o,data:i}=n;if(!o){let{pythonCodeWebPath:t,scratchCodeWebPath:n,cplusCodeWebPath:o}=i;e("setCodeWebPath",{pythonCodeWebPath:t,scratchCodeWebPath:n,cplusCodeWebPath:o})}t(n)}),(e=>{n(e)}))}))}}};function qi(e){return e.registerModule("zykjcommonQuestions",Ri),{install(e){Ee.getVueVersion();e.mixin({methods:{parseQuestionListItem(e,t,n,o=void 0){function i(e,t){e.forEach((e=>{if("img"===e["<>"]&&e.hasOwnProperty("width")){let n=Number(e.width);n>t&&(e.width=Math.floor(t),e.height&&delete e.height)}e.html&&e.html.length&&i(e.html,t)}))}t.forEach(((t,r)=>{if(t.questionComponent=Pi[t.question_type],void 0===o?t.questionIndex=r+1:(t.questionIndex=o+1+"-"+(r+1),t.questionIndex2=r+1),n&&n.hasOwnProperty(t.question_id)){if(t.answerMap=n[t.question_id],"analysis"===e){t.answerMap.user_coding_file&&(t.answerMap.oss_temp_url=t.answerMap.user_coding_file),t.score=t.answerMap.question_max_score;let e=Object.keys(t.answerMap),n=/^user_/gi;e.forEach((e=>{if(n.test(e)){let o=e.replace(n,"");t.answerMap[o]=t.answerMap[e]}}))}}else t.answerMap=null;let s=t.question_type;3==s?t.exam_options_data=[{index:1,data:{name:"正确"}},{index:2,data:{name:"错误"}}]:t.exam_options_data&&t.exam_options_data.length&&t.exam_options_data.forEach(((e,t)=>{e.enIndex=Ee.indexToEnIndex(t+1)}));try{let e=JSON.parse(t.content),n=jQuery(".question-list").width()-30;i(e,n),t.htmlContent=$.json2html({},e)}catch(a){t.htmlContent=t.content}try{t.analysis?t.analysisHtmlContent=$.json2html({},JSON.parse(t.analysis)):t.analysisHtmlContent=""}catch(a){t.analysisHtmlContent=t.analysis}t.sub_questions&&t.sub_questions.length&&this.parseQuestionListItem(e,t.sub_questions,n,r)}))}}}),e.component("Question_SingleChoice",Ne),e.component("Question_MultipleChoice",Tt),e.component("Question_Reading",xt),e.component("Question_BriefAnswer",cn),e.component("Question_FillBlank",bn),e.component("Question_Programming",ui),e.component("Question_Classify",wi)},Question_SingleChoice:Ne,Question_MultipleChoice:Tt,Question_Reading:xt,Question_BriefAnswer:cn,Question_FillBlank:bn,Question_Programming:ui,Question_Classify:wi}}var ji=qi}(),i}()}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zykjcommon/questions",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "main": "src/components/questions/entry.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -12,7 +12,7 @@
12
12
  "build:lib": "vue-cli-service build --target lib src/components/questions/buildEntry.js --name zykjcommon-questions"
13
13
  },
14
14
  "dependencies": {
15
- "@zykjcommon/questions": "^0.0.20",
15
+ "@zykjcommon/questions": "^0.0.24",
16
16
  "alife-logger": "^1.8.30",
17
17
  "axios": "^0.26.0",
18
18
  "cookie": "^0.4.1",
@@ -41,6 +41,8 @@ export let setRemFixedHeight = function(designWidth=1440,repairH = 0,scale=1){
41
41
  let frameBili = 4 / 3
42
42
  let b = frameBili / (winWidth / winHeight)
43
43
  let realW = parseInt(winWidth * b)
44
- html.style.fontSize = (realW / designWidth) * baseNum * scale + 'px';
44
+ let parent = document.querySelector('.zykjcommon-question')
45
+ parent.style.fontSize = (realW / designWidth) * baseNum * scale + 'px';
46
+ // html.style.fontSize = (realW / designWidth) * baseNum * scale + 'px';
45
47
  console.log(html.style.fontSize);
46
48
  }