@zykjcommon/questions 0.0.51 → 0.0.53

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.
@@ -23957,62 +23957,63 @@ var index = {
23957
23957
  const Question_Programming_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Programmingvue_type_script_lang_js, [['render',Question_Programmingvue_type_template_id_61b5ec79_render]])
23958
23958
 
23959
23959
  /* harmony default export */ var Question_Programming = (Question_Programming_exports_);
23960
- ;// 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=118d493f
23960
+ ;// 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=894b084c
23961
23961
 
23962
- var Question_Classifyvue_type_template_id_118d493f_hoisted_1 = {
23962
+ var Question_Classifyvue_type_template_id_894b084c_hoisted_1 = {
23963
23963
  class: "zykjcommon-question",
23964
23964
  style: {
23965
23965
  "width": "100%",
23966
23966
  "height": "100%"
23967
23967
  }
23968
23968
  };
23969
- var Question_Classifyvue_type_template_id_118d493f_hoisted_2 = {
23969
+ var Question_Classifyvue_type_template_id_894b084c_hoisted_2 = {
23970
23970
  class: "box"
23971
23971
  };
23972
- var Question_Classifyvue_type_template_id_118d493f_hoisted_3 = {
23972
+ var Question_Classifyvue_type_template_id_894b084c_hoisted_3 = {
23973
23973
  class: "main-block"
23974
23974
  };
23975
- var Question_Classifyvue_type_template_id_118d493f_hoisted_4 = ["src"];
23976
- var Question_Classifyvue_type_template_id_118d493f_hoisted_5 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
23975
+ var Question_Classifyvue_type_template_id_894b084c_hoisted_4 = ["src"];
23976
+ var Question_Classifyvue_type_template_id_894b084c_hoisted_5 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
23977
23977
  class: "main-content"
23978
23978
  }, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
23979
23979
  class: "main-append"
23980
23980
  })], -1);
23981
- var Question_Classifyvue_type_template_id_118d493f_hoisted_6 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
23981
+ var Question_Classifyvue_type_template_id_894b084c_hoisted_6 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
23982
23982
  class: "prev"
23983
23983
  }, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
23984
23984
  class: "prev-main"
23985
23985
  })], -1);
23986
- var Question_Classifyvue_type_template_id_118d493f_hoisted_7 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
23986
+ var Question_Classifyvue_type_template_id_894b084c_hoisted_7 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
23987
23987
  class: "next"
23988
23988
  }, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
23989
23989
  class: "next-main"
23990
23990
  })], -1);
23991
- var Question_Classifyvue_type_template_id_118d493f_hoisted_8 = {
23991
+ var Question_Classifyvue_type_template_id_894b084c_hoisted_8 = {
23992
23992
  class: "list"
23993
23993
  };
23994
- var Question_Classifyvue_type_template_id_118d493f_hoisted_9 = ["idx"];
23995
- var Question_Classifyvue_type_template_id_118d493f_hoisted_10 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
23994
+ var Question_Classifyvue_type_template_id_894b084c_hoisted_9 = ["idx"];
23995
+ var Question_Classifyvue_type_template_id_894b084c_hoisted_10 = {
23996
+ key: 0,
23996
23997
  class: "look-big-img-btn"
23997
- }, null, -1);
23998
- function Question_Classifyvue_type_template_id_118d493f_render(_ctx, _cache, $props, $setup, $data, $options) {
23998
+ };
23999
+ function Question_Classifyvue_type_template_id_894b084c_render(_ctx, _cache, $props, $setup, $data, $options) {
23999
24000
  var _component_MediaLooker = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("MediaLooker");
24000
- 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_118d493f_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
24001
+ 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_894b084c_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
24001
24002
  class: "question-classify",
24002
24003
  style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)($data.bigBgCss)
24003
- }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_118d493f_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, function (item, index) {
24004
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_894b084c_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, function (item, index) {
24004
24005
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
24005
24006
  class: "box-item",
24006
24007
  style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(item.bgUrlCss),
24007
24008
  key: index
24008
- }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_118d493f_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("img", {
24009
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_894b084c_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("img", {
24009
24010
  src: item.imgUrl,
24010
24011
  alt: ""
24011
- }, null, 8, Question_Classifyvue_type_template_id_118d493f_hoisted_4)]), Question_Classifyvue_type_template_id_118d493f_hoisted_5], 4);
24012
+ }, null, 8, Question_Classifyvue_type_template_id_894b084c_hoisted_4)]), Question_Classifyvue_type_template_id_894b084c_hoisted_5], 4);
24012
24013
  }), 128))]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
24013
24014
  class: "list-outter",
24014
24015
  style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)($data.bottomBgCss)
24015
- }, [Question_Classifyvue_type_template_id_118d493f_hoisted_6, Question_Classifyvue_type_template_id_118d493f_hoisted_7, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_118d493f_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, function (item, index) {
24016
+ }, [Question_Classifyvue_type_template_id_894b084c_hoisted_6, Question_Classifyvue_type_template_id_894b084c_hoisted_7, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_894b084c_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, function (item, index) {
24016
24017
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
24017
24018
  class: "list-item",
24018
24019
  idx: item.idx,
@@ -24020,7 +24021,7 @@ function Question_Classifyvue_type_template_id_118d493f_render(_ctx, _cache, $pr
24020
24021
  key: index
24021
24022
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.withDirectives)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
24022
24023
  class: "list-item-text"
24023
- }, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(item.content), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_.vShow, item.content_type != 2]]), Question_Classifyvue_type_template_id_118d493f_hoisted_10], 12, Question_Classifyvue_type_template_id_118d493f_hoisted_9);
24024
+ }, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(item.content), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_.vShow, item.content_type != 2]]), $data.isNeedLookBigImgBtn ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", Question_Classifyvue_type_template_id_894b084c_hoisted_10)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)], 12, Question_Classifyvue_type_template_id_894b084c_hoisted_9);
24024
24025
  }), 128))])], 4)], 4), _ctx.visible ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createBlock)(_component_MediaLooker, {
24025
24026
  key: 0,
24026
24027
  visible: _ctx.visible,
@@ -24031,7 +24032,7 @@ function Question_Classifyvue_type_template_id_118d493f_render(_ctx, _cache, $pr
24031
24032
  mediaLookerList: _ctx.mediaLookerList
24032
24033
  }, null, 8, ["visible", "mediaCount", "mediaLookerList"])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)]);
24033
24034
  }
24034
- ;// CONCATENATED MODULE: ./src/components/questions/Question_Classify.vue?vue&type=template&id=118d493f
24035
+ ;// CONCATENATED MODULE: ./src/components/questions/Question_Classify.vue?vue&type=template&id=894b084c
24035
24036
 
24036
24037
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.sort.js
24037
24038
  var es_array_sort = __webpack_require__(2707);
@@ -24163,6 +24164,7 @@ var env = js_fun.getDeviceEnv();
24163
24164
  },
24164
24165
  data: function data() {
24165
24166
  return _objectSpread2({
24167
+ isNeedLookBigImgBtn: false,
24166
24168
  animationing: false,
24167
24169
  analyCorrectAnswer: '',
24168
24170
  classify_question_info: {},
@@ -24254,6 +24256,17 @@ var env = js_fun.getDeviceEnv();
24254
24256
  var correct = this.questionInfo.answerMap.is_correct === '1' ? true : false;
24255
24257
  return correct;
24256
24258
  },
24259
+ getIsNeedLookBigImgBtn: function getIsNeedLookBigImgBtn(exam_options_data) {
24260
+ //如果每个item的file_url地址都是同一个就说明是默认背景不需要看大图
24261
+ var arr = [];
24262
+ exam_options_data.forEach(function (item) {
24263
+ var objItem = item.data;
24264
+ if (arr.indexOf(objItem.file_url) <= -1) {
24265
+ arr.push(objItem.file_url);
24266
+ }
24267
+ });
24268
+ return arr.length > 1 ? true : false;
24269
+ },
24257
24270
  parseLists: function parseLists(nv) {
24258
24271
  this.classify_question_info = nv.classify_question_info;
24259
24272
  var exam_options_data = nv.exam_options_data;
@@ -24274,6 +24287,7 @@ var env = js_fun.getDeviceEnv();
24274
24287
  idx: item.index
24275
24288
  });
24276
24289
  });
24290
+ this.isNeedLookBigImgBtn = this.getIsNeedLookBigImgBtn(exam_options_data);
24277
24291
  this.optionList = optionList;
24278
24292
  this.listItemBgCss = !optionList[0] ? '' : optionList[0].bgUrlCss;
24279
24293
  var bigBoxItemList = [];
@@ -24636,7 +24650,7 @@ var env = js_fun.getDeviceEnv();
24636
24650
 
24637
24651
 
24638
24652
  ;
24639
- const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',Question_Classifyvue_type_template_id_118d493f_render]])
24653
+ const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',Question_Classifyvue_type_template_id_894b084c_render]])
24640
24654
 
24641
24655
  /* harmony default export */ var Question_Classify = (Question_Classify_exports_);
24642
24656
  ;// CONCATENATED MODULE: ./src/components/questions/const.js
@@ -23967,62 +23967,63 @@ var index = {
23967
23967
  const Question_Programming_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Programmingvue_type_script_lang_js, [['render',Question_Programmingvue_type_template_id_61b5ec79_render]])
23968
23968
 
23969
23969
  /* harmony default export */ var Question_Programming = (Question_Programming_exports_);
23970
- ;// 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=118d493f
23970
+ ;// 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=894b084c
23971
23971
 
23972
- var Question_Classifyvue_type_template_id_118d493f_hoisted_1 = {
23972
+ var Question_Classifyvue_type_template_id_894b084c_hoisted_1 = {
23973
23973
  class: "zykjcommon-question",
23974
23974
  style: {
23975
23975
  "width": "100%",
23976
23976
  "height": "100%"
23977
23977
  }
23978
23978
  };
23979
- var Question_Classifyvue_type_template_id_118d493f_hoisted_2 = {
23979
+ var Question_Classifyvue_type_template_id_894b084c_hoisted_2 = {
23980
23980
  class: "box"
23981
23981
  };
23982
- var Question_Classifyvue_type_template_id_118d493f_hoisted_3 = {
23982
+ var Question_Classifyvue_type_template_id_894b084c_hoisted_3 = {
23983
23983
  class: "main-block"
23984
23984
  };
23985
- var Question_Classifyvue_type_template_id_118d493f_hoisted_4 = ["src"];
23986
- var Question_Classifyvue_type_template_id_118d493f_hoisted_5 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
23985
+ var Question_Classifyvue_type_template_id_894b084c_hoisted_4 = ["src"];
23986
+ var Question_Classifyvue_type_template_id_894b084c_hoisted_5 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
23987
23987
  class: "main-content"
23988
23988
  }, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
23989
23989
  class: "main-append"
23990
23990
  })], -1);
23991
- var Question_Classifyvue_type_template_id_118d493f_hoisted_6 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
23991
+ var Question_Classifyvue_type_template_id_894b084c_hoisted_6 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
23992
23992
  class: "prev"
23993
23993
  }, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
23994
23994
  class: "prev-main"
23995
23995
  })], -1);
23996
- var Question_Classifyvue_type_template_id_118d493f_hoisted_7 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
23996
+ var Question_Classifyvue_type_template_id_894b084c_hoisted_7 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
23997
23997
  class: "next"
23998
23998
  }, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
23999
23999
  class: "next-main"
24000
24000
  })], -1);
24001
- var Question_Classifyvue_type_template_id_118d493f_hoisted_8 = {
24001
+ var Question_Classifyvue_type_template_id_894b084c_hoisted_8 = {
24002
24002
  class: "list"
24003
24003
  };
24004
- var Question_Classifyvue_type_template_id_118d493f_hoisted_9 = ["idx"];
24005
- var Question_Classifyvue_type_template_id_118d493f_hoisted_10 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
24004
+ var Question_Classifyvue_type_template_id_894b084c_hoisted_9 = ["idx"];
24005
+ var Question_Classifyvue_type_template_id_894b084c_hoisted_10 = {
24006
+ key: 0,
24006
24007
  class: "look-big-img-btn"
24007
- }, null, -1);
24008
- function Question_Classifyvue_type_template_id_118d493f_render(_ctx, _cache, $props, $setup, $data, $options) {
24008
+ };
24009
+ function Question_Classifyvue_type_template_id_894b084c_render(_ctx, _cache, $props, $setup, $data, $options) {
24009
24010
  var _component_MediaLooker = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("MediaLooker");
24010
- 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_118d493f_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
24011
+ 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_894b084c_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
24011
24012
  class: "question-classify",
24012
24013
  style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)($data.bigBgCss)
24013
- }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_118d493f_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, function (item, index) {
24014
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_894b084c_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, function (item, index) {
24014
24015
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
24015
24016
  class: "box-item",
24016
24017
  style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)(item.bgUrlCss),
24017
24018
  key: index
24018
- }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_118d493f_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("img", {
24019
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_894b084c_hoisted_3, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("img", {
24019
24020
  src: item.imgUrl,
24020
24021
  alt: ""
24021
- }, null, 8, Question_Classifyvue_type_template_id_118d493f_hoisted_4)]), Question_Classifyvue_type_template_id_118d493f_hoisted_5], 4);
24022
+ }, null, 8, Question_Classifyvue_type_template_id_894b084c_hoisted_4)]), Question_Classifyvue_type_template_id_894b084c_hoisted_5], 4);
24022
24023
  }), 128))]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
24023
24024
  class: "list-outter",
24024
24025
  style: (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeStyle)($data.bottomBgCss)
24025
- }, [Question_Classifyvue_type_template_id_118d493f_hoisted_6, Question_Classifyvue_type_template_id_118d493f_hoisted_7, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_118d493f_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, function (item, index) {
24026
+ }, [Question_Classifyvue_type_template_id_894b084c_hoisted_6, Question_Classifyvue_type_template_id_894b084c_hoisted_7, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Classifyvue_type_template_id_894b084c_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, function (item, index) {
24026
24027
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
24027
24028
  class: "list-item",
24028
24029
  idx: item.idx,
@@ -24030,7 +24031,7 @@ function Question_Classifyvue_type_template_id_118d493f_render(_ctx, _cache, $pr
24030
24031
  key: index
24031
24032
  }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.withDirectives)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
24032
24033
  class: "list-item-text"
24033
- }, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(item.content), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_.vShow, item.content_type != 2]]), Question_Classifyvue_type_template_id_118d493f_hoisted_10], 12, Question_Classifyvue_type_template_id_118d493f_hoisted_9);
24034
+ }, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(item.content), 513), [[external_commonjs_vue_commonjs2_vue_root_Vue_.vShow, item.content_type != 2]]), $data.isNeedLookBigImgBtn ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", Question_Classifyvue_type_template_id_894b084c_hoisted_10)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)], 12, Question_Classifyvue_type_template_id_894b084c_hoisted_9);
24034
24035
  }), 128))])], 4)], 4), _ctx.visible ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createBlock)(_component_MediaLooker, {
24035
24036
  key: 0,
24036
24037
  visible: _ctx.visible,
@@ -24041,7 +24042,7 @@ function Question_Classifyvue_type_template_id_118d493f_render(_ctx, _cache, $pr
24041
24042
  mediaLookerList: _ctx.mediaLookerList
24042
24043
  }, null, 8, ["visible", "mediaCount", "mediaLookerList"])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)]);
24043
24044
  }
24044
- ;// CONCATENATED MODULE: ./src/components/questions/Question_Classify.vue?vue&type=template&id=118d493f
24045
+ ;// CONCATENATED MODULE: ./src/components/questions/Question_Classify.vue?vue&type=template&id=894b084c
24045
24046
 
24046
24047
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.sort.js
24047
24048
  var es_array_sort = __webpack_require__(2707);
@@ -24173,6 +24174,7 @@ var env = js_fun.getDeviceEnv();
24173
24174
  },
24174
24175
  data: function data() {
24175
24176
  return _objectSpread2({
24177
+ isNeedLookBigImgBtn: false,
24176
24178
  animationing: false,
24177
24179
  analyCorrectAnswer: '',
24178
24180
  classify_question_info: {},
@@ -24264,6 +24266,17 @@ var env = js_fun.getDeviceEnv();
24264
24266
  var correct = this.questionInfo.answerMap.is_correct === '1' ? true : false;
24265
24267
  return correct;
24266
24268
  },
24269
+ getIsNeedLookBigImgBtn: function getIsNeedLookBigImgBtn(exam_options_data) {
24270
+ //如果每个item的file_url地址都是同一个就说明是默认背景不需要看大图
24271
+ var arr = [];
24272
+ exam_options_data.forEach(function (item) {
24273
+ var objItem = item.data;
24274
+ if (arr.indexOf(objItem.file_url) <= -1) {
24275
+ arr.push(objItem.file_url);
24276
+ }
24277
+ });
24278
+ return arr.length > 1 ? true : false;
24279
+ },
24267
24280
  parseLists: function parseLists(nv) {
24268
24281
  this.classify_question_info = nv.classify_question_info;
24269
24282
  var exam_options_data = nv.exam_options_data;
@@ -24284,6 +24297,7 @@ var env = js_fun.getDeviceEnv();
24284
24297
  idx: item.index
24285
24298
  });
24286
24299
  });
24300
+ this.isNeedLookBigImgBtn = this.getIsNeedLookBigImgBtn(exam_options_data);
24287
24301
  this.optionList = optionList;
24288
24302
  this.listItemBgCss = !optionList[0] ? '' : optionList[0].bgUrlCss;
24289
24303
  var bigBoxItemList = [];
@@ -24646,7 +24660,7 @@ var env = js_fun.getDeviceEnv();
24646
24660
 
24647
24661
 
24648
24662
  ;
24649
- const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',Question_Classifyvue_type_template_id_118d493f_render]])
24663
+ const Question_Classify_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Classifyvue_type_script_lang_js, [['render',Question_Classifyvue_type_template_id_894b084c_render]])
24650
24664
 
24651
24665
  /* harmony default export */ var Question_Classify = (Question_Classify_exports_);
24652
24666
  ;// CONCATENATED MODULE: ./src/components/questions/const.js
@@ -24,4 +24,4 @@ return function(t){var n=e,r=n.lib,o=r.WordArray,i=r.Hasher,a=n.algo,s=o.create(
24
24
  * (c) 2022 Evan You
25
25
  * @license MIT
26
26
  */
27
- var Ur="store";function Qr(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function Wr(e){return null!==e&&"object"===typeof e}function Xr(e){return e&&"function"===typeof e.then}function zr(e,t){return function(){return e(t)}}function Kr(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 Yr(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;Zr(e,n,[],e._modules.root,!0),Jr(e,n,t)}function Jr(e,t,n){var r=e._state,o=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var a=e._wrappedGetters,s={},c={},u=(0,i.effectScope)(!0);u.run((function(){Qr(a,(function(t,n){s[n]=zr(t,e),c[n]=(0,i.computed)((function(){return s[n]()})),Object.defineProperty(e.getters,n,{get:function(){return c[n].value},enumerable:!0})}))})),e._state=(0,i.reactive)({data:t}),e._scope=u,e.strict&&oo(e),r&&n&&e._withCommit((function(){r.data=null})),o&&o.stop()}function Zr(e,t,n,r,o){var i=!n.length,a=e._modules.getNamespace(n);if(r.namespaced&&(e._modulesNamespaceMap[a],e._modulesNamespaceMap[a]=r),!i&&!o){var s=io(t,n.slice(0,-1)),c=n[n.length-1];e._withCommit((function(){s[c]=r.state}))}var u=r.context=$r(e,a,n);r.forEachMutation((function(t,n){var r=a+n;to(e,r,t,u)})),r.forEachAction((function(t,n){var r=t.root?n:a+n,o=t.handler||t;no(e,r,o,u)})),r.forEachGetter((function(t,n){var r=a+n;ro(e,r,t,u)})),r.forEachChild((function(r,i){Zr(e,t,n.concat(i),r,o)}))}function $r(e,t,n){var r=""===t,o={dispatch:r?e.dispatch:function(n,r,o){var i=ao(n,r,o),a=i.payload,s=i.options,c=i.type;return s&&s.root||(c=t+c),e.dispatch(c,a)},commit:r?e.commit:function(n,r,o){var i=ao(n,r,o),a=i.payload,s=i.options,c=i.type;s&&s.root||(c=t+c),e.commit(c,a,s)}};return Object.defineProperties(o,{getters:{get:r?function(){return e.getters}:function(){return eo(e,t)}},state:{get:function(){return io(e.state,n)}}}),o}function eo(e,t){if(!e._makeLocalGettersCache[t]){var n={},r=t.length;Object.keys(e.getters).forEach((function(o){if(o.slice(0,r)===t){var i=o.slice(r);Object.defineProperty(n,i,{get:function(){return e.getters[o]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function to(e,t,n,r){var o=e._mutations[t]||(e._mutations[t]=[]);o.push((function(t){n.call(e,r.state,t)}))}function no(e,t,n,r){var o=e._actions[t]||(e._actions[t]=[]);o.push((function(t){var o=n.call(e,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:e.getters,rootState:e.state},t);return Xr(o)||(o=Promise.resolve(o)),e._devtoolHook?o.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):o}))}function ro(e,t,n,r){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(e){return n(r.state,r.getters,e.state,e.getters)})}function oo(e){(0,i.watch)((function(){return e._state.data}),(function(){0}),{deep:!0,flush:"sync"})}function io(e,t){return t.reduce((function(e,t){return e[t]}),e)}function ao(e,t,n){return Wr(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var so="vuex bindings",co="vuex:mutations",uo="vuex:actions",lo="vuex",fo=0;function ho(e,t){qr({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:[so]},(function(n){n.addTimelineLayer({id:co,label:"Vuex Mutations",color:po}),n.addTimelineLayer({id:uo,label:"Vuex Actions",color:po}),n.addInspector({id:lo,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree((function(n){if(n.app===e&&n.inspectorId===lo)if(n.filter){var r=[];To(r,t._modules.root,n.filter,""),n.rootNodes=r}else n.rootNodes=[bo(t._modules.root,"")]})),n.on.getInspectorState((function(n){if(n.app===e&&n.inspectorId===lo){var r=n.nodeId;eo(t,r),n.state=So(wo(t._modules,r),"root"===r?t.getters:t._makeLocalGettersCache,r)}})),n.on.editInspectorState((function(n){if(n.app===e&&n.inspectorId===lo){var r=n.nodeId,o=n.path;"root"!==r&&(o=r.split("/").filter(Boolean).concat(o)),t._withCommit((function(){n.set(t._state.data,o,n.state.value)}))}})),t.subscribe((function(e,t){var r={};e.payload&&(r.payload=e.payload),r.state=t,n.notifyComponentUpdate(),n.sendInspectorTree(lo),n.sendInspectorState(lo),n.addTimelineEvent({layerId:co,event:{time:Date.now(),title:e.type,data:r}})})),t.subscribeAction({before:function(e,t){var r={};e.payload&&(r.payload=e.payload),e._id=fo++,e._time=Date.now(),r.state=t,n.addTimelineEvent({layerId:uo,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:r}})},after:function(e,t){var r={},o=Date.now()-e._time;r.duration={_custom:{type:"duration",display:o+"ms",tooltip:"Action duration",value:o}},e.payload&&(r.payload=e.payload),r.state=t,n.addTimelineEvent({layerId:uo,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:r}})}})}))}var po=8702998,mo=6710886,vo=16777215,Ao={label:"namespaced",textColor:vo,backgroundColor:mo};function go(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function bo(e,t){return{id:t||"root",label:go(t),tags:e.namespaced?[Ao]:[],children:Object.keys(e._children).map((function(n){return bo(e._children[n],t+n+"/")}))}}function To(e,t,n,r){r.includes(n)&&e.push({id:r||"root",label:r.endsWith("/")?r.slice(0,r.length-1):r||"Root",tags:t.namespaced?[Ao]:[]}),Object.keys(t._children).forEach((function(o){To(e,t._children[o],n,r+o+"/")}))}function So(e,t,n){t="root"===n?t:t[n];var r=Object.keys(t),o={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(r.length){var i=yo(t);o.getters=Object.keys(i).map((function(e){return{key:e.endsWith("/")?go(e):e,editable:!1,value:Mo((function(){return i[e]}))}}))}return o}function yo(e){var t={};return Object.keys(e).forEach((function(n){var r=n.split("/");if(r.length>1){var o=t,i=r.pop();r.forEach((function(e){o[e]||(o[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),o=o[e]._custom.value})),o[i]=Mo((function(){return e[n]}))}else t[n]=Mo((function(){return e[n]}))})),t}function wo(e,t){var n=t.split("/").filter((function(e){return e}));return n.reduce((function(e,r,o){var i=e[r];if(!i)throw new Error('Missing module "'+r+'" for path "'+t+'".');return o===n.length-1?i:i._children}),"root"===t?e:e.root._children)}function Mo(e){try{return e()}catch(t){return t}}var Bo=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)||{}},Co={namespaced:{configurable:!0}};Co.namespaced.get=function(){return!!this._rawModule.namespaced},Bo.prototype.addChild=function(e,t){this._children[e]=t},Bo.prototype.removeChild=function(e){delete this._children[e]},Bo.prototype.getChild=function(e){return this._children[e]},Bo.prototype.hasChild=function(e){return e in this._children},Bo.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)},Bo.prototype.forEachChild=function(e){Qr(this._children,e)},Bo.prototype.forEachGetter=function(e){this._rawModule.getters&&Qr(this._rawModule.getters,e)},Bo.prototype.forEachAction=function(e){this._rawModule.actions&&Qr(this._rawModule.actions,e)},Bo.prototype.forEachMutation=function(e){this._rawModule.mutations&&Qr(this._rawModule.mutations,e)},Object.defineProperties(Bo.prototype,Co);var Eo=function(e){this.register([],e,!1)};function Po(e,t,n){if(t.update(n),n.modules)for(var r in n.modules){if(!t.getChild(r))return void 0;Po(e.concat(r),t.getChild(r),n.modules[r])}}Eo.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},Eo.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return t=t.getChild(n),e+(t.namespaced?n+"/":"")}),"")},Eo.prototype.update=function(e){Po([],this.root,e)},Eo.prototype.register=function(e,t,n){var r=this;void 0===n&&(n=!0);var o=new Bo(t,n);if(0===e.length)this.root=o;else{var i=this.get(e.slice(0,-1));i.addChild(e[e.length-1],o)}t.modules&&Qr(t.modules,(function(t,o){r.register(e.concat(o),t,n)}))},Eo.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],r=t.getChild(n);r&&r.runtime&&t.removeChild(n)},Eo.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var Io=function(e){var t=this;void 0===e&&(e={});var n=e.plugins;void 0===n&&(n=[]);var r=e.strict;void 0===r&&(r=!1);var o=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 Eo(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=o;var i=this,a=this,s=a.dispatch,c=a.commit;this.dispatch=function(e,t){return s.call(i,e,t)},this.commit=function(e,t,n){return c.call(i,e,t,n)},this.strict=r;var u=this._modules.root.state;Zr(this,u,[],this._modules.root),Jr(this,u),n.forEach((function(e){return e(t)}))},xo={state:{configurable:!0}};Io.prototype.install=function(e,t){e.provide(t||Ur,this),e.config.globalProperties.$store=this;var n=void 0!==this._devtools&&this._devtools;n&&ho(e,this)},xo.state.get=function(){return this._state.data},xo.state.set=function(e){0},Io.prototype.commit=function(e,t,n){var r=this,o=ao(e,t,n),i=o.type,a=o.payload,s=(o.options,{type:i,payload:a}),c=this._mutations[i];c&&(this._withCommit((function(){c.forEach((function(e){e(a)}))})),this._subscribers.slice().forEach((function(e){return e(s,r.state)})))},Io.prototype.dispatch=function(e,t){var n=this,r=ao(e,t),o=r.type,i=r.payload,a={type:o,payload:i},s=this._actions[o];if(s){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(a,n.state)}))}catch(u){0}var c=s.length>1?Promise.all(s.map((function(e){return e(i)}))):s[0](i);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(a,n.state)}))}catch(u){0}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(a,n.state,e)}))}catch(u){0}t(e)}))}))}},Io.prototype.subscribe=function(e,t){return Kr(e,this._subscribers,t)},Io.prototype.subscribeAction=function(e,t){var n="function"===typeof e?{before:e}:e;return Kr(n,this._actionSubscribers,t)},Io.prototype.watch=function(e,t,n){var r=this;return(0,i.watch)((function(){return e(r.state,r.getters)}),t,Object.assign({},n))},Io.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},Io.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"===typeof e&&(e=[e]),this._modules.register(e,t),Zr(this,this.state,e,this._modules.get(e),n.preserveState),Jr(this,this.state)},Io.prototype.unregisterModule=function(e){var t=this;"string"===typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var n=io(t.state,e.slice(0,-1));delete n[e[e.length-1]]})),Yr(this)},Io.prototype.hasModule=function(e){return"string"===typeof e&&(e=[e]),this._modules.isRegistered(e)},Io.prototype.hotUpdate=function(e){this._modules.update(e),Yr(this,!0)},Io.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(Io.prototype,xo);var ko=Oo((function(e,t){var n={};return Do(t).forEach((function(t){var r=t.key,o=t.val;n[r]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var r=No(this.$store,"mapState",e);if(!r)return;t=r.context.state,n=r.context.getters}return"function"===typeof o?o.call(this,t,n):t[o]},n[r].vuex=!0})),n})),Go=(Oo((function(e,t){var n={};return Do(t).forEach((function(t){var r=t.key,o=t.val;n[r]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var r=this.$store.commit;if(e){var i=No(this.$store,"mapMutations",e);if(!i)return;r=i.context.commit}return"function"===typeof o?o.apply(this,[r].concat(t)):r.apply(this.$store,[o].concat(t))}})),n})),Oo((function(e,t){var n={};return Do(t).forEach((function(t){var r=t.key,o=t.val;o=e+o,n[r]=function(){if(!e||No(this.$store,"mapGetters",e))return this.$store.getters[o]},n[r].vuex=!0})),n})),Oo((function(e,t){var n={};return Do(t).forEach((function(t){var r=t.key,o=t.val;n[r]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var r=this.$store.dispatch;if(e){var i=No(this.$store,"mapActions",e);if(!i)return;r=i.context.dispatch}return"function"===typeof o?o.apply(this,[r].concat(t)):r.apply(this.$store,[o].concat(t))}})),n})));function Do(e){return Ho(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 Ho(e){return Array.isArray(e)||Wr(e)}function Oo(e){return function(t,n){return"string"!==typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function No(e,t,n){var r=e._modulesNamespaceMap[n];return r}var Lo={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"},showScore:{type:Boolean,default:!1},showQuestionType:{type:Boolean,default:!0},showQuestionHint:{type:Boolean,default:!0},showQuestionIndex:{type:Boolean,default:!0}},mounted:function(){var e=this;z(this),this.$watch("oss_temp_url",(function(t){if(t){var n=e.isAnswered();e.$emit("getIsAnswered",n),"exam"===e.mode&&e.bus.$emit("questionCardChange",{questionIndex:e.questionInfo.questionIndex-1,answered:n})}}),{immediate:!0})},created:function(){this.isEnterCodeByInit&&(this.oss_temp_url?this.startCode("2"):this.startCode("1"))},data:function(){return W({findIframeTimer:null,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:r(3031),2:r(3843),3:r(6543),4:r(2657)},answerMap:{}},JSON.parse(X))},watch:{questionInfo:{handler:function(e,t){if(e){this.answerMap=e.answerMap;var n=e.answerMap;n&&(this.code_file_oss_temp_path=n.code_file_oss_temp_path,this.oss_temp_url=n.oss_temp_url)}},immediate:!0}},computed:W({},ko("zykjcommonQuestions",["pythonCodeWebPath","scratchCodeWebPath","cplusCodeWebPath"])),methods:W(W({},Go("zykjcommonQuestions",["getEditorUrlActions"])),{},{menuBarloaded:function(){this.$emit("menuBarloaded")},getIframeContentWindow:function(){var e=this;return new Promise((function(t,n){e.iframe?t(e.iframe.contentWindow):e.findIframeTimer=setInterval((function(){e.iframe&&(e.findIframeTimer&&clearInterval(e.findIframeTimer),e.findIframeTimer=null,t(e.iframe.contentWindow))}),200)}))},getAnswer:function(){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:function(){var e=""!==this.oss_temp_url;return e},isCorrect:function(){var e="1"===this.questionInfo.answerMap.is_correct;return e},getCodeWebPath:function(e){var t=this;this.pythonCodeWebPath||this.scratchCodeWebPath||this.cplusCodeWebPath?e&&e():(this.loading=!0,this.getEditorUrlActions().then((function(){t.loading=!1,e&&e()}),(function(){t.loading=!1})))},startCode:function(e){var t=this;this.loading||(this.getCodeWebPath((function(){var 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},r="",o=t.questionInfo.code_type,i=n[e],a=t.urlQuery+"&codeUrl=".concat(i);switch(o){case 1:r="".concat(t.scratchCodeWebPath,"/?").concat(a);break;case 2:r="".concat(t.pythonCodeWebPath,"/?").concat(a);break;case 3:r="".concat(t.pythonCodeWebPath,"/?").concat(a,"&pygame=true");break;case 4:r="".concat(t.cplusCodeWebPath,"/?").concat(a);break}t.iframeUrl=r})),this.showFrame=!0)},getQuestionInfo:function(){var e=this,t={type:"getQuestionInfo",data:e.questionInfo.htmlContent};this.iframe&&this.iframe.contentWindow.postMessage(JSON.stringify(t),"*")},submitCodeQuestionByTimeover:function(){var e={type:"submitCodeQuestionByTimeover"};this.iframe&&this.iframe.contentWindow.postMessage(JSON.stringify(e),"*")},iframeLoaded:function(e){this.iframe=e,this.enterCode=!0,this.bus.$emit&&this.bus.$emit("enterCode",!0)},closeIframe:function(){this.enterCode=!1,this.bus.$emit&&this.bus.$emit("enterCode",!1),this.showFrame=!1},closeAndSave:function(e){this.saveCodeOnly(e),this.isEnterCodeByInit||this.closeIframe(),this.$emit("closeAndSave",e)},saveCodeOnly:function(e){var 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&&this.bus.$emit("submitQuestion",{saveType:1,submitRequestAutoQuit:!1,needSubmitRequest:!1});var n=this.isAnswered();"exam"===this.mode&&this.bus.$emit("questionCardChange",{questionIndex:t.questionInfo.questionIndex-1,answered:n}),this.$emit("saveCodeOnly",e)},uploadCodingFileSuccess:function(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&&this.bus.$emit("uploadCodingFileSuccess")}}),components:{IframeComponent:Gr,MediaLooker:Ze,Loading:Ir}};const Vo=(0,Ye.Z)(Lo,[["render",br]]);var Ro=Vo,_o={class:"zykjcommon-question",style:{width:"100%",height:"100%"}},jo={class:"box"},Fo={class:"main-block"},qo=["src"],Uo=(0,i.createElementVNode)("div",{class:"main-content"},[(0,i.createElementVNode)("div",{class:"main-append"})],-1),Qo=(0,i.createElementVNode)("div",{class:"prev"},[(0,i.createElementVNode)("div",{class:"prev-main"})],-1),Wo=(0,i.createElementVNode)("div",{class:"next"},[(0,i.createElementVNode)("div",{class:"next-main"})],-1),Xo={class:"list"},zo=["idx"],Ko=(0,i.createElementVNode)("div",{class:"look-big-img-btn"},null,-1);function Yo(e,t,n,r,o,a){var s=(0,i.resolveComponent)("MediaLooker");return(0,i.openBlock)(),(0,i.createElementBlock)("div",_o,[(0,i.createElementVNode)("div",{class:"question-classify",style:(0,i.normalizeStyle)(o.bigBgCss)},[(0,i.createElementVNode)("div",jo,[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(o.bigBoxItemList,(function(e,t){return(0,i.openBlock)(),(0,i.createElementBlock)("div",{class:"box-item",style:(0,i.normalizeStyle)(e.bgUrlCss),key:t},[(0,i.createElementVNode)("div",Fo,[(0,i.createElementVNode)("img",{src:e.imgUrl,alt:""},null,8,qo)]),Uo],4)})),128))]),(0,i.createElementVNode)("div",{class:"list-outter",style:(0,i.normalizeStyle)(o.bottomBgCss)},[Qo,Wo,(0,i.createElementVNode)("div",Xo,[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(o.optionList,(function(e,t){return(0,i.openBlock)(),(0,i.createElementBlock)("div",{class:"list-item",idx:e.idx,style:(0,i.normalizeStyle)(e.bgUrlCss),key:t},[(0,i.withDirectives)((0,i.createElementVNode)("div",{class:"list-item-text"},(0,i.toDisplayString)(e.content),513),[[i.vShow,2!=e.content_type]]),Ko],12,zo)})),128))])],4)],4),e.visible?((0,i.openBlock)(),(0,i.createBlock)(s,{key:0,visible:e.visible,"onUpdate:visible":t[0]||(t[0]=function(t){return e.visible=t}),mediaCount:e.curMediaCount,mediaLookerList:e.mediaLookerList},null,8,["visible","mediaCount","mediaLookerList"])):(0,i.createCommentVNode)("",!0)])}r(2707),r(4553),r(561);var Jo=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1440,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=100,i=document.documentElement.clientWidth||document.body.clientWidth,a=document.documentElement.clientHeight||document.body.clientHeight;a-=t;var s=4.3/3,c=s/(i/a),u=parseInt(i*c);r.style.fontSize=u/e*o*n+"px"},Zo=ze.getDeviceEnv(),$o={name:"Question_Classify",props:{questionInfo:{type:Object,default:{}},bus:{type:Object,default:function(){return{}}},mode:{type:String,default:"exam"},screenRepairH:{type:Number,default:0},screenScale:{type:Number,default:1}},created:function(){},unmounted:function(){this.unmountedDo()},destroyed:function(){this.unmountedDo()},mounted:function(){var e=this;this.setRootFontSize(),window.addEventListener("resize",this.setRootFontSize),this.init(),this.$watch("optionList",(function(t){t&&t.length&&e.$nextTick((function(){e.dothings()}))}),{immediate:!0,deep:!0})},data:function(){return W({animationing:!1,analyCorrectAnswer:"",classify_question_info:{},answerMap:{},optionList:[],bigBoxItemList:[],bigBgCss:"",bottomBgCss:"",listItemBgCss:"",env:Zo,p1:{},p2:{},listItem:null,moveDiv:null,timer:null,mousedown:"mobile"===Zo?"touchstart":"mousedown",mousemove:"mobile"===Zo?"touchmove":"mousemove",mouseup:"mobile"===Zo?"touchend":"mouseup",dragWay:"",flag:!1,scrollDistance:3e3,lazyDragTimer:null,dragingStart:!1},JSON.parse(X))},watch:{questionInfo:{handler:function(e,t){e&&(console.log(e,33),this.parseLists(e),this.answerMap=e.answerMap,e.answerMap&&this.mode)},immediate:!0}},computed:{},methods:{getAnswer:function(){var e=[];return $(this.$el).find(".box-item").each((function(t,n){var r=$(this),o=[];r.find(".append-item").each((function(e,t){o.push(Number($(t).attr("idx")))})),o=o.sort((function(e,t){return e-t})),console.log(o,345),e.push({big_type_index:t+1,small_type_index_list:o})})),{classify_mapping_list:e}},isAnswered:function(){var e=[],t=$(this.$el).find(".main-append");return t.each((function(t,n){var r=$(n).find(".append-item");e.push(r.length)})),2===e.length&&(e[0]&&e[1])},isCorrect:function(){var e="1"===this.questionInfo.answerMap.is_correct;return e},parseLists:function(e){this.classify_question_info=e.classify_question_info;var t=e.exam_options_data;if(this.classify_question_info){this.classify_question_info.background_file&&(this.bigBgCss="background-image: url(".concat(this.classify_question_info.background_file.file_url,");")),this.classify_question_info.bottom_img_file&&(this.bottomBgCss="background-image: url(".concat(this.classify_question_info.bottom_img_file.file_url,");"));var n=[];this.optionList=[],t.forEach((function(e){n.push({content_type:e.data.content_type,content:e.data.option_content,bgUrlCss:"background-image: url(".concat(e.data.file_url,");color:").concat(e.data.font_color),idx:e.index})})),this.optionList=n,this.listItemBgCss=n[0]?n[0].bgUrlCss:"";var r=[],o=this.classify_question_info.big_type_box_image_list,i=this.classify_question_info.big_type_option_list;o.forEach((function(e,t){r.push({imgUrl:i[t].file_url,bgUrl:e.file_url,bgUrlCss:"background-image: url(".concat(e.file_url,");")})})),this.bigBoxItemList=r}},setRootFontSize:function(){Jo(1e3,this.screenRepairH,this.screenScale,this.$el)},unmountedDo:function(){window.removeEventListener("resize",this.setRootFontSize),document.removeEventListener("gesturestart",this.gesturestartListener),$(this.$el).find(".question-classify .append-item").off(this.mousedown),$(this.$el).find(".question-classify .list-item").off(this.mousedown),$(this.$el).find(".question-classify .next").off("click"),$(this.$el).find(".question-classify .prev").off("click"),$(document).off(this.mouseup),document.onselectstart=null},answeredNotify:function(){var e=this,t=e.isAnswered();e.$emit("getIsAnswered",t),"exam"===e.mode&&e.bus.$emit("questionCardChange",{questionIndex:e.questionInfo.questionIndex-1,answered:t})},gesturestartListener:function(e){e.preventDefault()},init:function(){"mobile"===Zo&&document.addEventListener("gesturestart",this.gesturestartListener)},getSpecArr:function(){var e=this,t=[],n=e.moveDiv.offset().left,r=n+e.moveDiv.width(),o=e.moveDiv.offset().top,i=o+e.moveDiv.height();return $(this.$el).find(".box-item").each((function(e,a){var s=$(a),c=s.offset().left,u=c+s.width(),l=s.offset().top,f=l+s.height();n>c&&r<u&&o>l&&i<f&&t.push({dom:s})})),t},lookBigImg:function(e){var t=this,n=$(e.target).parent(".list-item").css("background-image"),r=/url\(["'](.+)["']\)/,o=n.match(r);if(o&&o.length>1){var i=o[1].replace(/^\s+/gi,"").replace(/\s+$/gi,"");t.mediaLookerList=[],t.mediaLookerList.push({url:i,mediaType:1}),t.visible=!0}},bindDragDomEvent:function(e,t){var n=this;function r(e,r){if(!n.moveDiv){"mobile"===Zo&&n.startLazyDrag(),n.flag=!1,n.dragWay=t,console.log(e),e.stopPropagation(),e.preventDefault(),n.listItem=$(r),n.listItem.addClass("drag"),n.p1.moveX=n.listItem.offset().left,n.p1.moveY=n.listItem.offset().top-30;var o=n.listItem.attr("idx"),i="".concat(n.listItem.get(0).style.backgroundImage),a="".concat(n.listItem.get(0).style.color),s=n.listItem.find(".list-item-text").get(0).style.display;console.log(i,1234),n.moveDiv=$('<div class="question-classify-moveDiv" idx="'.concat(o,'"><div class="list-item-text" style="').concat(s?"display:"+s:"",'">').concat(n.listItem.find(".list-item-text").text(),"</div></div>")),n.moveDiv.css({left:"".concat(n.p1.moveX,"px"),top:"".concat(n.p1.moveY,"px"),backgroundImage:i,color:a}),$(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;var t=n.p2.moveX-n.moveDiv.width()/2,r=n.p2.moveY-n.moveDiv.height()/2;n.moveDiv.css({left:t+"px",top:r+"px"})}))}}e.off(this.mousedown),e.on(this.mousedown,(function(e){var t=this;e.stopPropagation();var o=e.target.className;o.indexOf("look-big-img-btn")>-1?n.lookBigImg(e):(console.log(123),"mobile"===Zo?n.lazyDragTimer=setTimeout((function(){r(e,t)}),100):r(e,this))}))},appendMoveDiv:function(e){var t=this;t.listItem.remove();var n=t.moveDiv.attr("idx"),r="".concat(t.moveDiv.get(0).style.backgroundImage),o="".concat(t.moveDiv.get(0).style.color),i=t.moveDiv.find(".list-item-text").get(0).style.display,a="list-item"===e.appendItemClassName?'<div class="look-big-img-btn"></div>':"",s=$('<div class="'.concat(e.appendItemClassName,'" idx="').concat(n,'"><div class="list-item-text" style="').concat(i?"display:"+i:"",'">').concat(t.moveDiv.find(".list-item-text").text(),"</div>").concat(a,"</div>"));s.css({opacity:0,backgroundImage:r,color:o}),e.targetList.append(s),e.targetList[e.scrollDirection](t.scrollDistance);var c=s.offset().left,u=s.offset().top;t.animationing=!0,t.moveDiv.css({transition:"all 0.5s",left:c,top:u}).on("transitionend",(function(){t.flag||(t.moveDiv.remove(),t.moveDiv.off("transitionend"),t.moveDiv=null,s.css({opacity:1}),t.answeredNotify(),t.bindDragDomEvent(s,e.op),t.animationing=!1),t.flag=!0}))},bindNextPrevEvent:function(e){var t=this;$(this.$el).find(".question-classify .".concat(e)).off("click"),$(this.$el).find(".question-classify .".concat(e)).on("click",(function(n){n.stopPropagation(),n.preventDefault();var r=$(t.$el).find(".question-classify .list-item"),o=$(t.$el).find(".question-classify .list"),i=r.outerWidth()*("next"===e?1:-1),a=o.scrollLeft();console.log(a),$(t.$el).find(".question-classify .list").stop(!0).animate({scrollLeft:a+i},500)}))},dothings:function(){var 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).off(e.mouseup),$(document).on(e.mouseup,(function(t){if("mobile"===Zo&&e.stopLazyDrag(),!e.animationing)if(console.log(e.dragWay,7788),"go"===e.dragWay){if($(document).off(e.mousemove),e.listItem&&e.listItem.removeClass("drag"),e.moveDiv){var n=e.getSpecArr();if(0===n.length)e.moveDiv&&(e.moveDiv.remove(),e.moveDiv=null);else{var r=n[0].dom;e.appendMoveDiv({targetList:r.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)){var o=e.getSpecArr();if(0===o.length)e.appendMoveDiv({targetList:$(e.$el).find(".question-classify .list"),appendItemClassName:"list-item",op:"go",scrollDirection:"scrollLeft"});else{var i=o[0].dom,a=e.listItem.parents(".question-classify .box-item");i.get(0)===a.get(0)?(console.log("自己"),e.moveDiv.remove(),e.moveDiv=null,e.listItem&&e.listItem.removeClass("drag")):(console.log("不是自己"),e.appendMoveDiv({targetList:i.find(".main-append"),appendItemClassName:"append-item",op:"back",scrollDirection:"scrollTop"}),console.log("不是自己"))}console.log(o.length)}})),document.onselectstart=function(){return!1},"mobile"===Zo&&($(".list").off("scroll"),$(".list").on("scroll",(function(){e.dragingStart||e.stopLazyDrag()})).addClass("noScrollBar"),$(".main-append").off("scroll"),$(".main-append").on("scroll",(function(t){e.dragingStart||e.stopLazyDrag()}))),e.bindNextPrevEvent("next"),e.bindNextPrevEvent("prev")},startLazyDrag:function(){this.dragingStart=!0,$(".list").css({overflow:"hidden"}),$(".main-append").css({overflow:"hidden"})},stopLazyDrag:function(){this.dragingStart=!1,this.lazyDragTimer&&clearTimeout(this.lazyDragTimer),this.lazyDragTimer=null,$(".list").css({overflowX:"auto"}),$(".main-append").css({overflowY:"auto"})},setAnswerDo:function(){var e=this,t=this,n=[];$(this.$el).find(".question-classify .list-item").each((function(e,t){n.push(Number($(t).attr("idx")))})),$(this.$el).find(".main-append").empty(),this.answerMap.classify_mapping_list.forEach((function(r,o){r.small_type_index_list.forEach((function(r){var i=n.findIndex((function(e){return e==r}));if(i>-1){n.splice(i,1);var a=$(e.$el).find(".question-classify .list-item").eq(i),s="".concat(a.get(0).style.backgroundImage),c="".concat(a.get(0).style.color),u=a.find(".list-item-text").get(0).style.display,l=a.attr("idx"),f=$('<div class="append-item" idx="'.concat(l,'"><div class="list-item-text" style="').concat(u?"display:"+u:"",'">').concat(a.find(".list-item-text").text(),"</div></div>"));f.css({backgroundImage:s,color:c}),t.bindDragDomEvent(f,"back"),$(e.$el).find(".main-append").eq(o).append(f),a.remove()}}))})),this.answeredNotify()}},components:{MediaLooker:Ze}};const ei=(0,Ye.Z)($o,[["render",Yo]]);var ti=ei,ni={1:"Question_SingleChoice",2:"Question_MultipleChoice",3:"Question_SingleChoice",7:"Question_BriefAnswer",16:"Question_Programming",11:"Question_Reading",4:"Question_FillBlank",17:"Question_Classify"},ri=r(1354),oi=r(9669),ii=r.n(oi),ai=r(7631),si=r.n(ai),ci="piw38kulfozrea7ydmjnvbc965q1gt2x",ui=function(e,t,n,r){void 0!=n&&"undefined"!==typeof n["password"]&&(n["password"]=si().hex_md5(si().hex_md5(n["password"]+"FE605C9343A3A47764598FDC184EC66F").toUpperCase()+"FE605C9343A3A47764598FDC184EC66F").toUpperCase());var o=e+"\n/student-web"+t+"\n"+r+"\n"+(n?JSON.stringify(n):""),i=ri.enc.Base64.stringify((0,ri.HmacSHA256)(o,ci)),a=function(e){var t=e.replace(/\+/g,"-");t=t.replace(/\//g,"_");var n=t.length%4,r="====";return t+=r.substring(0,n),t};return a(i)};ii().defaults.baseURL="https://jsl-api.thedeer.cn/student-web/",ii().defaults.timeout=6e4,ii().defaults.withCredentials=!0;var li=function(e,t){if(t&&-1!=t["Content-Type"].indexOf("multipart/form-data")){var n=new FormData;for(var r in e)n.append(r,e[r]);return n}return JSON.stringify(e)},fi=function(e){e=JSON.parse(e),e.hasOwnProperty("errorCode")&&(e.error_code=e.errorCode);var t=e,n=t.error_code,r=t.message;if(n){var o=[39002,39003];if(o.indexOf(n)<=-1){var i=r||"系统异常";ze.messageTip("warning",i)}}return e};function di(e,t,n,r,o){var i=void 0,a=void 0;e=e.toUpperCase(),t+=0===n.indexOf("/")?n.substr(1):n;var s=window.isMock;"undefined"!==typeof o&&"undefined"!==typeof o.isMock&&(s=o.isMock,delete o.isMock),s&&o&&o.onUploadProgress&&delete o.onUploadProgress;var c=n;"/"!==n[0]&&(c="/"+n);var u=(new Date).getTime(),l={ts:u,sign:ui(e,c,r,u),token:ze.getToken()};switch(e){case"Get":a=r||{};break;default:case"POST":i=r||{},l["Content-Type"]=o&&o.contentType?o.contentType:"application/json";break}return t instanceof Array?ii().all([]).then(ii().spread((function(){}))):ii()(Object.assign({headers:l,method:e,url:t,data:i,params:a,transformRequest:li,transformResponse:fi},o)).then((function(e){return e.data})).catch((function(e){return console.log("服务端请求/响应错误:",e,e.config),Promise.reject(e)}))}var hi=function(e,t,n){return di("GET","",e,t,n)},pi={editorUrl:"/open/editor-url"},mi={pythonCodeWebPath:"",scratchCodeWebPath:"",cplusCodeWebPath:""},vi={namespaced:!0,state:mi,getters:{},mutations:{setCodeWebPath:function(e,t){e.pythonCodeWebPath=t.pythonCodeWebPath,e.scratchCodeWebPath=t.scratchCodeWebPath,e.cplusCodeWebPath=t.cplusCodeWebPath}},actions:{getEditorUrlActions:function(e){var t=e.commit;e.dispatch;return new Promise((function(e,n){hi("".concat(pi.editorUrl)).then((function(n){var r=n.error_code,o=n.data;if(!r){var i=o.pythonCodeWebPath,a=o.scratchCodeWebPath,s=o.cplusCodeWebPath;t("setCodeWebPath",{pythonCodeWebPath:i,scratchCodeWebPath:a,cplusCodeWebPath:s})}e(n)}),(function(e){n(e)}))}))}}},Ai=function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;function i(e,t){e.forEach((function(e){if("img"===e["<>"]&&e.hasOwnProperty("width")){var 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((function(t,a){if(t.questionComponent=ni[t.question_type],void 0===o?t.questionIndex=a+1:(t.questionIndex=o+1+"-"+(a+1),t.questionIndex2=a+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;var s=Object.keys(t.answerMap),c=/^user_/gi;s.forEach((function(e){if(c.test(e)){var n=e.replace(c,"");t.answerMap[n]=t.answerMap[e]}}))}}else t.answerMap=null;var u=t.question_type;3==u?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((function(e,t){e.enIndex=ze.indexToEnIndex(t+1)}));try{var l=JSON.parse(t.content),f=jQuery(".question-list").width()-30;i(l,f),t.htmlContent=$.json2html({},l)}catch(d){t.htmlContent=t.content}try{t.analysis?t.analysisHtmlContent=$.json2html({},JSON.parse(t.analysis)):t.analysisHtmlContent=""}catch(d){t.analysisHtmlContent=t.analysis}t.sub_questions&&t.sub_questions.length&&r.parseQuestionListItem(e,t.sub_questions,n,a)}))};function gi(e){return e.registerModule("zykjcommonQuestions",vi),{install:function(e){ze.getVueVersion();e.mixin({methods:{parseQuestionListItem:Ai}}),e.component("Question_SingleChoice",tt),e.component("Question_MultipleChoice",Vt),e.component("Question_Reading",en),e.component("Question_BriefAnswer",Dn),e.component("Question_FillBlank",Wn),e.component("Question_Programming",Ro),e.component("Question_Classify",ti)},parseQuestionListItem:Ai,questionMapper:ni,Question_SingleChoice:tt,Question_MultipleChoice:Vt,Question_Reading:en,Question_BriefAnswer:Dn,Question_FillBlank:Wn,Question_Programming:Ro,Question_Classify:ti}}var bi=gi}(),o}()}));
27
+ var Ur="store";function Qr(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function Wr(e){return null!==e&&"object"===typeof e}function Xr(e){return e&&"function"===typeof e.then}function zr(e,t){return function(){return e(t)}}function Kr(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 Yr(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;Zr(e,n,[],e._modules.root,!0),Jr(e,n,t)}function Jr(e,t,n){var r=e._state,o=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var a=e._wrappedGetters,s={},c={},u=(0,i.effectScope)(!0);u.run((function(){Qr(a,(function(t,n){s[n]=zr(t,e),c[n]=(0,i.computed)((function(){return s[n]()})),Object.defineProperty(e.getters,n,{get:function(){return c[n].value},enumerable:!0})}))})),e._state=(0,i.reactive)({data:t}),e._scope=u,e.strict&&oo(e),r&&n&&e._withCommit((function(){r.data=null})),o&&o.stop()}function Zr(e,t,n,r,o){var i=!n.length,a=e._modules.getNamespace(n);if(r.namespaced&&(e._modulesNamespaceMap[a],e._modulesNamespaceMap[a]=r),!i&&!o){var s=io(t,n.slice(0,-1)),c=n[n.length-1];e._withCommit((function(){s[c]=r.state}))}var u=r.context=$r(e,a,n);r.forEachMutation((function(t,n){var r=a+n;to(e,r,t,u)})),r.forEachAction((function(t,n){var r=t.root?n:a+n,o=t.handler||t;no(e,r,o,u)})),r.forEachGetter((function(t,n){var r=a+n;ro(e,r,t,u)})),r.forEachChild((function(r,i){Zr(e,t,n.concat(i),r,o)}))}function $r(e,t,n){var r=""===t,o={dispatch:r?e.dispatch:function(n,r,o){var i=ao(n,r,o),a=i.payload,s=i.options,c=i.type;return s&&s.root||(c=t+c),e.dispatch(c,a)},commit:r?e.commit:function(n,r,o){var i=ao(n,r,o),a=i.payload,s=i.options,c=i.type;s&&s.root||(c=t+c),e.commit(c,a,s)}};return Object.defineProperties(o,{getters:{get:r?function(){return e.getters}:function(){return eo(e,t)}},state:{get:function(){return io(e.state,n)}}}),o}function eo(e,t){if(!e._makeLocalGettersCache[t]){var n={},r=t.length;Object.keys(e.getters).forEach((function(o){if(o.slice(0,r)===t){var i=o.slice(r);Object.defineProperty(n,i,{get:function(){return e.getters[o]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function to(e,t,n,r){var o=e._mutations[t]||(e._mutations[t]=[]);o.push((function(t){n.call(e,r.state,t)}))}function no(e,t,n,r){var o=e._actions[t]||(e._actions[t]=[]);o.push((function(t){var o=n.call(e,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:e.getters,rootState:e.state},t);return Xr(o)||(o=Promise.resolve(o)),e._devtoolHook?o.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):o}))}function ro(e,t,n,r){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(e){return n(r.state,r.getters,e.state,e.getters)})}function oo(e){(0,i.watch)((function(){return e._state.data}),(function(){0}),{deep:!0,flush:"sync"})}function io(e,t){return t.reduce((function(e,t){return e[t]}),e)}function ao(e,t,n){return Wr(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var so="vuex bindings",co="vuex:mutations",uo="vuex:actions",lo="vuex",fo=0;function ho(e,t){qr({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:[so]},(function(n){n.addTimelineLayer({id:co,label:"Vuex Mutations",color:po}),n.addTimelineLayer({id:uo,label:"Vuex Actions",color:po}),n.addInspector({id:lo,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree((function(n){if(n.app===e&&n.inspectorId===lo)if(n.filter){var r=[];To(r,t._modules.root,n.filter,""),n.rootNodes=r}else n.rootNodes=[bo(t._modules.root,"")]})),n.on.getInspectorState((function(n){if(n.app===e&&n.inspectorId===lo){var r=n.nodeId;eo(t,r),n.state=So(wo(t._modules,r),"root"===r?t.getters:t._makeLocalGettersCache,r)}})),n.on.editInspectorState((function(n){if(n.app===e&&n.inspectorId===lo){var r=n.nodeId,o=n.path;"root"!==r&&(o=r.split("/").filter(Boolean).concat(o)),t._withCommit((function(){n.set(t._state.data,o,n.state.value)}))}})),t.subscribe((function(e,t){var r={};e.payload&&(r.payload=e.payload),r.state=t,n.notifyComponentUpdate(),n.sendInspectorTree(lo),n.sendInspectorState(lo),n.addTimelineEvent({layerId:co,event:{time:Date.now(),title:e.type,data:r}})})),t.subscribeAction({before:function(e,t){var r={};e.payload&&(r.payload=e.payload),e._id=fo++,e._time=Date.now(),r.state=t,n.addTimelineEvent({layerId:uo,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:r}})},after:function(e,t){var r={},o=Date.now()-e._time;r.duration={_custom:{type:"duration",display:o+"ms",tooltip:"Action duration",value:o}},e.payload&&(r.payload=e.payload),r.state=t,n.addTimelineEvent({layerId:uo,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:r}})}})}))}var po=8702998,mo=6710886,vo=16777215,Ao={label:"namespaced",textColor:vo,backgroundColor:mo};function go(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function bo(e,t){return{id:t||"root",label:go(t),tags:e.namespaced?[Ao]:[],children:Object.keys(e._children).map((function(n){return bo(e._children[n],t+n+"/")}))}}function To(e,t,n,r){r.includes(n)&&e.push({id:r||"root",label:r.endsWith("/")?r.slice(0,r.length-1):r||"Root",tags:t.namespaced?[Ao]:[]}),Object.keys(t._children).forEach((function(o){To(e,t._children[o],n,r+o+"/")}))}function So(e,t,n){t="root"===n?t:t[n];var r=Object.keys(t),o={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(r.length){var i=yo(t);o.getters=Object.keys(i).map((function(e){return{key:e.endsWith("/")?go(e):e,editable:!1,value:Mo((function(){return i[e]}))}}))}return o}function yo(e){var t={};return Object.keys(e).forEach((function(n){var r=n.split("/");if(r.length>1){var o=t,i=r.pop();r.forEach((function(e){o[e]||(o[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),o=o[e]._custom.value})),o[i]=Mo((function(){return e[n]}))}else t[n]=Mo((function(){return e[n]}))})),t}function wo(e,t){var n=t.split("/").filter((function(e){return e}));return n.reduce((function(e,r,o){var i=e[r];if(!i)throw new Error('Missing module "'+r+'" for path "'+t+'".');return o===n.length-1?i:i._children}),"root"===t?e:e.root._children)}function Mo(e){try{return e()}catch(t){return t}}var Bo=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)||{}},Co={namespaced:{configurable:!0}};Co.namespaced.get=function(){return!!this._rawModule.namespaced},Bo.prototype.addChild=function(e,t){this._children[e]=t},Bo.prototype.removeChild=function(e){delete this._children[e]},Bo.prototype.getChild=function(e){return this._children[e]},Bo.prototype.hasChild=function(e){return e in this._children},Bo.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)},Bo.prototype.forEachChild=function(e){Qr(this._children,e)},Bo.prototype.forEachGetter=function(e){this._rawModule.getters&&Qr(this._rawModule.getters,e)},Bo.prototype.forEachAction=function(e){this._rawModule.actions&&Qr(this._rawModule.actions,e)},Bo.prototype.forEachMutation=function(e){this._rawModule.mutations&&Qr(this._rawModule.mutations,e)},Object.defineProperties(Bo.prototype,Co);var Eo=function(e){this.register([],e,!1)};function Po(e,t,n){if(t.update(n),n.modules)for(var r in n.modules){if(!t.getChild(r))return void 0;Po(e.concat(r),t.getChild(r),n.modules[r])}}Eo.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},Eo.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return t=t.getChild(n),e+(t.namespaced?n+"/":"")}),"")},Eo.prototype.update=function(e){Po([],this.root,e)},Eo.prototype.register=function(e,t,n){var r=this;void 0===n&&(n=!0);var o=new Bo(t,n);if(0===e.length)this.root=o;else{var i=this.get(e.slice(0,-1));i.addChild(e[e.length-1],o)}t.modules&&Qr(t.modules,(function(t,o){r.register(e.concat(o),t,n)}))},Eo.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],r=t.getChild(n);r&&r.runtime&&t.removeChild(n)},Eo.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var Io=function(e){var t=this;void 0===e&&(e={});var n=e.plugins;void 0===n&&(n=[]);var r=e.strict;void 0===r&&(r=!1);var o=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 Eo(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=o;var i=this,a=this,s=a.dispatch,c=a.commit;this.dispatch=function(e,t){return s.call(i,e,t)},this.commit=function(e,t,n){return c.call(i,e,t,n)},this.strict=r;var u=this._modules.root.state;Zr(this,u,[],this._modules.root),Jr(this,u),n.forEach((function(e){return e(t)}))},xo={state:{configurable:!0}};Io.prototype.install=function(e,t){e.provide(t||Ur,this),e.config.globalProperties.$store=this;var n=void 0!==this._devtools&&this._devtools;n&&ho(e,this)},xo.state.get=function(){return this._state.data},xo.state.set=function(e){0},Io.prototype.commit=function(e,t,n){var r=this,o=ao(e,t,n),i=o.type,a=o.payload,s=(o.options,{type:i,payload:a}),c=this._mutations[i];c&&(this._withCommit((function(){c.forEach((function(e){e(a)}))})),this._subscribers.slice().forEach((function(e){return e(s,r.state)})))},Io.prototype.dispatch=function(e,t){var n=this,r=ao(e,t),o=r.type,i=r.payload,a={type:o,payload:i},s=this._actions[o];if(s){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(a,n.state)}))}catch(u){0}var c=s.length>1?Promise.all(s.map((function(e){return e(i)}))):s[0](i);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(a,n.state)}))}catch(u){0}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(a,n.state,e)}))}catch(u){0}t(e)}))}))}},Io.prototype.subscribe=function(e,t){return Kr(e,this._subscribers,t)},Io.prototype.subscribeAction=function(e,t){var n="function"===typeof e?{before:e}:e;return Kr(n,this._actionSubscribers,t)},Io.prototype.watch=function(e,t,n){var r=this;return(0,i.watch)((function(){return e(r.state,r.getters)}),t,Object.assign({},n))},Io.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},Io.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"===typeof e&&(e=[e]),this._modules.register(e,t),Zr(this,this.state,e,this._modules.get(e),n.preserveState),Jr(this,this.state)},Io.prototype.unregisterModule=function(e){var t=this;"string"===typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var n=io(t.state,e.slice(0,-1));delete n[e[e.length-1]]})),Yr(this)},Io.prototype.hasModule=function(e){return"string"===typeof e&&(e=[e]),this._modules.isRegistered(e)},Io.prototype.hotUpdate=function(e){this._modules.update(e),Yr(this,!0)},Io.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(Io.prototype,xo);var ko=Oo((function(e,t){var n={};return Do(t).forEach((function(t){var r=t.key,o=t.val;n[r]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var r=No(this.$store,"mapState",e);if(!r)return;t=r.context.state,n=r.context.getters}return"function"===typeof o?o.call(this,t,n):t[o]},n[r].vuex=!0})),n})),Go=(Oo((function(e,t){var n={};return Do(t).forEach((function(t){var r=t.key,o=t.val;n[r]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var r=this.$store.commit;if(e){var i=No(this.$store,"mapMutations",e);if(!i)return;r=i.context.commit}return"function"===typeof o?o.apply(this,[r].concat(t)):r.apply(this.$store,[o].concat(t))}})),n})),Oo((function(e,t){var n={};return Do(t).forEach((function(t){var r=t.key,o=t.val;o=e+o,n[r]=function(){if(!e||No(this.$store,"mapGetters",e))return this.$store.getters[o]},n[r].vuex=!0})),n})),Oo((function(e,t){var n={};return Do(t).forEach((function(t){var r=t.key,o=t.val;n[r]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var r=this.$store.dispatch;if(e){var i=No(this.$store,"mapActions",e);if(!i)return;r=i.context.dispatch}return"function"===typeof o?o.apply(this,[r].concat(t)):r.apply(this.$store,[o].concat(t))}})),n})));function Do(e){return Ho(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 Ho(e){return Array.isArray(e)||Wr(e)}function Oo(e){return function(t,n){return"string"!==typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function No(e,t,n){var r=e._modulesNamespaceMap[n];return r}var Lo={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"},showScore:{type:Boolean,default:!1},showQuestionType:{type:Boolean,default:!0},showQuestionHint:{type:Boolean,default:!0},showQuestionIndex:{type:Boolean,default:!0}},mounted:function(){var e=this;z(this),this.$watch("oss_temp_url",(function(t){if(t){var n=e.isAnswered();e.$emit("getIsAnswered",n),"exam"===e.mode&&e.bus.$emit("questionCardChange",{questionIndex:e.questionInfo.questionIndex-1,answered:n})}}),{immediate:!0})},created:function(){this.isEnterCodeByInit&&(this.oss_temp_url?this.startCode("2"):this.startCode("1"))},data:function(){return W({findIframeTimer:null,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:r(3031),2:r(3843),3:r(6543),4:r(2657)},answerMap:{}},JSON.parse(X))},watch:{questionInfo:{handler:function(e,t){if(e){this.answerMap=e.answerMap;var n=e.answerMap;n&&(this.code_file_oss_temp_path=n.code_file_oss_temp_path,this.oss_temp_url=n.oss_temp_url)}},immediate:!0}},computed:W({},ko("zykjcommonQuestions",["pythonCodeWebPath","scratchCodeWebPath","cplusCodeWebPath"])),methods:W(W({},Go("zykjcommonQuestions",["getEditorUrlActions"])),{},{menuBarloaded:function(){this.$emit("menuBarloaded")},getIframeContentWindow:function(){var e=this;return new Promise((function(t,n){e.iframe?t(e.iframe.contentWindow):e.findIframeTimer=setInterval((function(){e.iframe&&(e.findIframeTimer&&clearInterval(e.findIframeTimer),e.findIframeTimer=null,t(e.iframe.contentWindow))}),200)}))},getAnswer:function(){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:function(){var e=""!==this.oss_temp_url;return e},isCorrect:function(){var e="1"===this.questionInfo.answerMap.is_correct;return e},getCodeWebPath:function(e){var t=this;this.pythonCodeWebPath||this.scratchCodeWebPath||this.cplusCodeWebPath?e&&e():(this.loading=!0,this.getEditorUrlActions().then((function(){t.loading=!1,e&&e()}),(function(){t.loading=!1})))},startCode:function(e){var t=this;this.loading||(this.getCodeWebPath((function(){var 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},r="",o=t.questionInfo.code_type,i=n[e],a=t.urlQuery+"&codeUrl=".concat(i);switch(o){case 1:r="".concat(t.scratchCodeWebPath,"/?").concat(a);break;case 2:r="".concat(t.pythonCodeWebPath,"/?").concat(a);break;case 3:r="".concat(t.pythonCodeWebPath,"/?").concat(a,"&pygame=true");break;case 4:r="".concat(t.cplusCodeWebPath,"/?").concat(a);break}t.iframeUrl=r})),this.showFrame=!0)},getQuestionInfo:function(){var e=this,t={type:"getQuestionInfo",data:e.questionInfo.htmlContent};this.iframe&&this.iframe.contentWindow.postMessage(JSON.stringify(t),"*")},submitCodeQuestionByTimeover:function(){var e={type:"submitCodeQuestionByTimeover"};this.iframe&&this.iframe.contentWindow.postMessage(JSON.stringify(e),"*")},iframeLoaded:function(e){this.iframe=e,this.enterCode=!0,this.bus.$emit&&this.bus.$emit("enterCode",!0)},closeIframe:function(){this.enterCode=!1,this.bus.$emit&&this.bus.$emit("enterCode",!1),this.showFrame=!1},closeAndSave:function(e){this.saveCodeOnly(e),this.isEnterCodeByInit||this.closeIframe(),this.$emit("closeAndSave",e)},saveCodeOnly:function(e){var 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&&this.bus.$emit("submitQuestion",{saveType:1,submitRequestAutoQuit:!1,needSubmitRequest:!1});var n=this.isAnswered();"exam"===this.mode&&this.bus.$emit("questionCardChange",{questionIndex:t.questionInfo.questionIndex-1,answered:n}),this.$emit("saveCodeOnly",e)},uploadCodingFileSuccess:function(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&&this.bus.$emit("uploadCodingFileSuccess")}}),components:{IframeComponent:Gr,MediaLooker:Ze,Loading:Ir}};const Vo=(0,Ye.Z)(Lo,[["render",br]]);var Ro=Vo,_o={class:"zykjcommon-question",style:{width:"100%",height:"100%"}},jo={class:"box"},Fo={class:"main-block"},qo=["src"],Uo=(0,i.createElementVNode)("div",{class:"main-content"},[(0,i.createElementVNode)("div",{class:"main-append"})],-1),Qo=(0,i.createElementVNode)("div",{class:"prev"},[(0,i.createElementVNode)("div",{class:"prev-main"})],-1),Wo=(0,i.createElementVNode)("div",{class:"next"},[(0,i.createElementVNode)("div",{class:"next-main"})],-1),Xo={class:"list"},zo=["idx"],Ko={key:0,class:"look-big-img-btn"};function Yo(e,t,n,r,o,a){var s=(0,i.resolveComponent)("MediaLooker");return(0,i.openBlock)(),(0,i.createElementBlock)("div",_o,[(0,i.createElementVNode)("div",{class:"question-classify",style:(0,i.normalizeStyle)(o.bigBgCss)},[(0,i.createElementVNode)("div",jo,[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(o.bigBoxItemList,(function(e,t){return(0,i.openBlock)(),(0,i.createElementBlock)("div",{class:"box-item",style:(0,i.normalizeStyle)(e.bgUrlCss),key:t},[(0,i.createElementVNode)("div",Fo,[(0,i.createElementVNode)("img",{src:e.imgUrl,alt:""},null,8,qo)]),Uo],4)})),128))]),(0,i.createElementVNode)("div",{class:"list-outter",style:(0,i.normalizeStyle)(o.bottomBgCss)},[Qo,Wo,(0,i.createElementVNode)("div",Xo,[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(o.optionList,(function(e,t){return(0,i.openBlock)(),(0,i.createElementBlock)("div",{class:"list-item",idx:e.idx,style:(0,i.normalizeStyle)(e.bgUrlCss),key:t},[(0,i.withDirectives)((0,i.createElementVNode)("div",{class:"list-item-text"},(0,i.toDisplayString)(e.content),513),[[i.vShow,2!=e.content_type]]),o.isNeedLookBigImgBtn?((0,i.openBlock)(),(0,i.createElementBlock)("div",Ko)):(0,i.createCommentVNode)("",!0)],12,zo)})),128))])],4)],4),e.visible?((0,i.openBlock)(),(0,i.createBlock)(s,{key:0,visible:e.visible,"onUpdate:visible":t[0]||(t[0]=function(t){return e.visible=t}),mediaCount:e.curMediaCount,mediaLookerList:e.mediaLookerList},null,8,["visible","mediaCount","mediaLookerList"])):(0,i.createCommentVNode)("",!0)])}r(2707),r(4553),r(561);var Jo=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1440,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=100,i=document.documentElement.clientWidth||document.body.clientWidth,a=document.documentElement.clientHeight||document.body.clientHeight;a-=t;var s=4.3/3,c=s/(i/a),u=parseInt(i*c);r.style.fontSize=u/e*o*n+"px"},Zo=ze.getDeviceEnv(),$o={name:"Question_Classify",props:{questionInfo:{type:Object,default:{}},bus:{type:Object,default:function(){return{}}},mode:{type:String,default:"exam"},screenRepairH:{type:Number,default:0},screenScale:{type:Number,default:1}},created:function(){},unmounted:function(){this.unmountedDo()},destroyed:function(){this.unmountedDo()},mounted:function(){var e=this;this.setRootFontSize(),window.addEventListener("resize",this.setRootFontSize),this.init(),this.$watch("optionList",(function(t){t&&t.length&&e.$nextTick((function(){e.dothings()}))}),{immediate:!0,deep:!0})},data:function(){return W({isNeedLookBigImgBtn:!1,animationing:!1,analyCorrectAnswer:"",classify_question_info:{},answerMap:{},optionList:[],bigBoxItemList:[],bigBgCss:"",bottomBgCss:"",listItemBgCss:"",env:Zo,p1:{},p2:{},listItem:null,moveDiv:null,timer:null,mousedown:"mobile"===Zo?"touchstart":"mousedown",mousemove:"mobile"===Zo?"touchmove":"mousemove",mouseup:"mobile"===Zo?"touchend":"mouseup",dragWay:"",flag:!1,scrollDistance:3e3,lazyDragTimer:null,dragingStart:!1},JSON.parse(X))},watch:{questionInfo:{handler:function(e,t){e&&(console.log(e,33),this.parseLists(e),this.answerMap=e.answerMap,e.answerMap&&this.mode)},immediate:!0}},computed:{},methods:{getAnswer:function(){var e=[];return $(this.$el).find(".box-item").each((function(t,n){var r=$(this),o=[];r.find(".append-item").each((function(e,t){o.push(Number($(t).attr("idx")))})),o=o.sort((function(e,t){return e-t})),console.log(o,345),e.push({big_type_index:t+1,small_type_index_list:o})})),{classify_mapping_list:e}},isAnswered:function(){var e=[],t=$(this.$el).find(".main-append");return t.each((function(t,n){var r=$(n).find(".append-item");e.push(r.length)})),2===e.length&&(e[0]&&e[1])},isCorrect:function(){var e="1"===this.questionInfo.answerMap.is_correct;return e},getIsNeedLookBigImgBtn:function(e){var t=[];return e.forEach((function(e){var n=e.data;t.indexOf(n.file_url)<=-1&&t.push(n.file_url)})),t.length>1},parseLists:function(e){this.classify_question_info=e.classify_question_info;var t=e.exam_options_data;if(this.classify_question_info){this.classify_question_info.background_file&&(this.bigBgCss="background-image: url(".concat(this.classify_question_info.background_file.file_url,");")),this.classify_question_info.bottom_img_file&&(this.bottomBgCss="background-image: url(".concat(this.classify_question_info.bottom_img_file.file_url,");"));var n=[];this.optionList=[],t.forEach((function(e){n.push({content_type:e.data.content_type,content:e.data.option_content,bgUrlCss:"background-image: url(".concat(e.data.file_url,");color:").concat(e.data.font_color),idx:e.index})})),this.isNeedLookBigImgBtn=this.getIsNeedLookBigImgBtn(t),this.optionList=n,this.listItemBgCss=n[0]?n[0].bgUrlCss:"";var r=[],o=this.classify_question_info.big_type_box_image_list,i=this.classify_question_info.big_type_option_list;o.forEach((function(e,t){r.push({imgUrl:i[t].file_url,bgUrl:e.file_url,bgUrlCss:"background-image: url(".concat(e.file_url,");")})})),this.bigBoxItemList=r}},setRootFontSize:function(){Jo(1e3,this.screenRepairH,this.screenScale,this.$el)},unmountedDo:function(){window.removeEventListener("resize",this.setRootFontSize),document.removeEventListener("gesturestart",this.gesturestartListener),$(this.$el).find(".question-classify .append-item").off(this.mousedown),$(this.$el).find(".question-classify .list-item").off(this.mousedown),$(this.$el).find(".question-classify .next").off("click"),$(this.$el).find(".question-classify .prev").off("click"),$(document).off(this.mouseup),document.onselectstart=null},answeredNotify:function(){var e=this,t=e.isAnswered();e.$emit("getIsAnswered",t),"exam"===e.mode&&e.bus.$emit("questionCardChange",{questionIndex:e.questionInfo.questionIndex-1,answered:t})},gesturestartListener:function(e){e.preventDefault()},init:function(){"mobile"===Zo&&document.addEventListener("gesturestart",this.gesturestartListener)},getSpecArr:function(){var e=this,t=[],n=e.moveDiv.offset().left,r=n+e.moveDiv.width(),o=e.moveDiv.offset().top,i=o+e.moveDiv.height();return $(this.$el).find(".box-item").each((function(e,a){var s=$(a),c=s.offset().left,u=c+s.width(),l=s.offset().top,f=l+s.height();n>c&&r<u&&o>l&&i<f&&t.push({dom:s})})),t},lookBigImg:function(e){var t=this,n=$(e.target).parent(".list-item").css("background-image"),r=/url\(["'](.+)["']\)/,o=n.match(r);if(o&&o.length>1){var i=o[1].replace(/^\s+/gi,"").replace(/\s+$/gi,"");t.mediaLookerList=[],t.mediaLookerList.push({url:i,mediaType:1}),t.visible=!0}},bindDragDomEvent:function(e,t){var n=this;function r(e,r){if(!n.moveDiv){"mobile"===Zo&&n.startLazyDrag(),n.flag=!1,n.dragWay=t,console.log(e),e.stopPropagation(),e.preventDefault(),n.listItem=$(r),n.listItem.addClass("drag"),n.p1.moveX=n.listItem.offset().left,n.p1.moveY=n.listItem.offset().top-30;var o=n.listItem.attr("idx"),i="".concat(n.listItem.get(0).style.backgroundImage),a="".concat(n.listItem.get(0).style.color),s=n.listItem.find(".list-item-text").get(0).style.display;console.log(i,1234),n.moveDiv=$('<div class="question-classify-moveDiv" idx="'.concat(o,'"><div class="list-item-text" style="').concat(s?"display:"+s:"",'">').concat(n.listItem.find(".list-item-text").text(),"</div></div>")),n.moveDiv.css({left:"".concat(n.p1.moveX,"px"),top:"".concat(n.p1.moveY,"px"),backgroundImage:i,color:a}),$(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;var t=n.p2.moveX-n.moveDiv.width()/2,r=n.p2.moveY-n.moveDiv.height()/2;n.moveDiv.css({left:t+"px",top:r+"px"})}))}}e.off(this.mousedown),e.on(this.mousedown,(function(e){var t=this;e.stopPropagation();var o=e.target.className;o.indexOf("look-big-img-btn")>-1?n.lookBigImg(e):(console.log(123),"mobile"===Zo?n.lazyDragTimer=setTimeout((function(){r(e,t)}),100):r(e,this))}))},appendMoveDiv:function(e){var t=this;t.listItem.remove();var n=t.moveDiv.attr("idx"),r="".concat(t.moveDiv.get(0).style.backgroundImage),o="".concat(t.moveDiv.get(0).style.color),i=t.moveDiv.find(".list-item-text").get(0).style.display,a="list-item"===e.appendItemClassName?'<div class="look-big-img-btn"></div>':"",s=$('<div class="'.concat(e.appendItemClassName,'" idx="').concat(n,'"><div class="list-item-text" style="').concat(i?"display:"+i:"",'">').concat(t.moveDiv.find(".list-item-text").text(),"</div>").concat(a,"</div>"));s.css({opacity:0,backgroundImage:r,color:o}),e.targetList.append(s),e.targetList[e.scrollDirection](t.scrollDistance);var c=s.offset().left,u=s.offset().top;t.animationing=!0,t.moveDiv.css({transition:"all 0.5s",left:c,top:u}).on("transitionend",(function(){t.flag||(t.moveDiv.remove(),t.moveDiv.off("transitionend"),t.moveDiv=null,s.css({opacity:1}),t.answeredNotify(),t.bindDragDomEvent(s,e.op),t.animationing=!1),t.flag=!0}))},bindNextPrevEvent:function(e){var t=this;$(this.$el).find(".question-classify .".concat(e)).off("click"),$(this.$el).find(".question-classify .".concat(e)).on("click",(function(n){n.stopPropagation(),n.preventDefault();var r=$(t.$el).find(".question-classify .list-item"),o=$(t.$el).find(".question-classify .list"),i=r.outerWidth()*("next"===e?1:-1),a=o.scrollLeft();console.log(a),$(t.$el).find(".question-classify .list").stop(!0).animate({scrollLeft:a+i},500)}))},dothings:function(){var 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).off(e.mouseup),$(document).on(e.mouseup,(function(t){if("mobile"===Zo&&e.stopLazyDrag(),!e.animationing)if(console.log(e.dragWay,7788),"go"===e.dragWay){if($(document).off(e.mousemove),e.listItem&&e.listItem.removeClass("drag"),e.moveDiv){var n=e.getSpecArr();if(0===n.length)e.moveDiv&&(e.moveDiv.remove(),e.moveDiv=null);else{var r=n[0].dom;e.appendMoveDiv({targetList:r.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)){var o=e.getSpecArr();if(0===o.length)e.appendMoveDiv({targetList:$(e.$el).find(".question-classify .list"),appendItemClassName:"list-item",op:"go",scrollDirection:"scrollLeft"});else{var i=o[0].dom,a=e.listItem.parents(".question-classify .box-item");i.get(0)===a.get(0)?(console.log("自己"),e.moveDiv.remove(),e.moveDiv=null,e.listItem&&e.listItem.removeClass("drag")):(console.log("不是自己"),e.appendMoveDiv({targetList:i.find(".main-append"),appendItemClassName:"append-item",op:"back",scrollDirection:"scrollTop"}),console.log("不是自己"))}console.log(o.length)}})),document.onselectstart=function(){return!1},"mobile"===Zo&&($(".list").off("scroll"),$(".list").on("scroll",(function(){e.dragingStart||e.stopLazyDrag()})).addClass("noScrollBar"),$(".main-append").off("scroll"),$(".main-append").on("scroll",(function(t){e.dragingStart||e.stopLazyDrag()}))),e.bindNextPrevEvent("next"),e.bindNextPrevEvent("prev")},startLazyDrag:function(){this.dragingStart=!0,$(".list").css({overflow:"hidden"}),$(".main-append").css({overflow:"hidden"})},stopLazyDrag:function(){this.dragingStart=!1,this.lazyDragTimer&&clearTimeout(this.lazyDragTimer),this.lazyDragTimer=null,$(".list").css({overflowX:"auto"}),$(".main-append").css({overflowY:"auto"})},setAnswerDo:function(){var e=this,t=this,n=[];$(this.$el).find(".question-classify .list-item").each((function(e,t){n.push(Number($(t).attr("idx")))})),$(this.$el).find(".main-append").empty(),this.answerMap.classify_mapping_list.forEach((function(r,o){r.small_type_index_list.forEach((function(r){var i=n.findIndex((function(e){return e==r}));if(i>-1){n.splice(i,1);var a=$(e.$el).find(".question-classify .list-item").eq(i),s="".concat(a.get(0).style.backgroundImage),c="".concat(a.get(0).style.color),u=a.find(".list-item-text").get(0).style.display,l=a.attr("idx"),f=$('<div class="append-item" idx="'.concat(l,'"><div class="list-item-text" style="').concat(u?"display:"+u:"",'">').concat(a.find(".list-item-text").text(),"</div></div>"));f.css({backgroundImage:s,color:c}),t.bindDragDomEvent(f,"back"),$(e.$el).find(".main-append").eq(o).append(f),a.remove()}}))})),this.answeredNotify()}},components:{MediaLooker:Ze}};const ei=(0,Ye.Z)($o,[["render",Yo]]);var ti=ei,ni={1:"Question_SingleChoice",2:"Question_MultipleChoice",3:"Question_SingleChoice",7:"Question_BriefAnswer",16:"Question_Programming",11:"Question_Reading",4:"Question_FillBlank",17:"Question_Classify"},ri=r(1354),oi=r(9669),ii=r.n(oi),ai=r(7631),si=r.n(ai),ci="piw38kulfozrea7ydmjnvbc965q1gt2x",ui=function(e,t,n,r){void 0!=n&&"undefined"!==typeof n["password"]&&(n["password"]=si().hex_md5(si().hex_md5(n["password"]+"FE605C9343A3A47764598FDC184EC66F").toUpperCase()+"FE605C9343A3A47764598FDC184EC66F").toUpperCase());var o=e+"\n/student-web"+t+"\n"+r+"\n"+(n?JSON.stringify(n):""),i=ri.enc.Base64.stringify((0,ri.HmacSHA256)(o,ci)),a=function(e){var t=e.replace(/\+/g,"-");t=t.replace(/\//g,"_");var n=t.length%4,r="====";return t+=r.substring(0,n),t};return a(i)};ii().defaults.baseURL="https://jsl-api.thedeer.cn/student-web/",ii().defaults.timeout=6e4,ii().defaults.withCredentials=!0;var li=function(e,t){if(t&&-1!=t["Content-Type"].indexOf("multipart/form-data")){var n=new FormData;for(var r in e)n.append(r,e[r]);return n}return JSON.stringify(e)},fi=function(e){e=JSON.parse(e),e.hasOwnProperty("errorCode")&&(e.error_code=e.errorCode);var t=e,n=t.error_code,r=t.message;if(n){var o=[39002,39003];if(o.indexOf(n)<=-1){var i=r||"系统异常";ze.messageTip("warning",i)}}return e};function di(e,t,n,r,o){var i=void 0,a=void 0;e=e.toUpperCase(),t+=0===n.indexOf("/")?n.substr(1):n;var s=window.isMock;"undefined"!==typeof o&&"undefined"!==typeof o.isMock&&(s=o.isMock,delete o.isMock),s&&o&&o.onUploadProgress&&delete o.onUploadProgress;var c=n;"/"!==n[0]&&(c="/"+n);var u=(new Date).getTime(),l={ts:u,sign:ui(e,c,r,u),token:ze.getToken()};switch(e){case"Get":a=r||{};break;default:case"POST":i=r||{},l["Content-Type"]=o&&o.contentType?o.contentType:"application/json";break}return t instanceof Array?ii().all([]).then(ii().spread((function(){}))):ii()(Object.assign({headers:l,method:e,url:t,data:i,params:a,transformRequest:li,transformResponse:fi},o)).then((function(e){return e.data})).catch((function(e){return console.log("服务端请求/响应错误:",e,e.config),Promise.reject(e)}))}var hi=function(e,t,n){return di("GET","",e,t,n)},pi={editorUrl:"/open/editor-url"},mi={pythonCodeWebPath:"",scratchCodeWebPath:"",cplusCodeWebPath:""},vi={namespaced:!0,state:mi,getters:{},mutations:{setCodeWebPath:function(e,t){e.pythonCodeWebPath=t.pythonCodeWebPath,e.scratchCodeWebPath=t.scratchCodeWebPath,e.cplusCodeWebPath=t.cplusCodeWebPath}},actions:{getEditorUrlActions:function(e){var t=e.commit;e.dispatch;return new Promise((function(e,n){hi("".concat(pi.editorUrl)).then((function(n){var r=n.error_code,o=n.data;if(!r){var i=o.pythonCodeWebPath,a=o.scratchCodeWebPath,s=o.cplusCodeWebPath;t("setCodeWebPath",{pythonCodeWebPath:i,scratchCodeWebPath:a,cplusCodeWebPath:s})}e(n)}),(function(e){n(e)}))}))}}},Ai=function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;function i(e,t){e.forEach((function(e){if("img"===e["<>"]&&e.hasOwnProperty("width")){var 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((function(t,a){if(t.questionComponent=ni[t.question_type],void 0===o?t.questionIndex=a+1:(t.questionIndex=o+1+"-"+(a+1),t.questionIndex2=a+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;var s=Object.keys(t.answerMap),c=/^user_/gi;s.forEach((function(e){if(c.test(e)){var n=e.replace(c,"");t.answerMap[n]=t.answerMap[e]}}))}}else t.answerMap=null;var u=t.question_type;3==u?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((function(e,t){e.enIndex=ze.indexToEnIndex(t+1)}));try{var l=JSON.parse(t.content),f=jQuery(".question-list").width()-30;i(l,f),t.htmlContent=$.json2html({},l)}catch(d){t.htmlContent=t.content}try{t.analysis?t.analysisHtmlContent=$.json2html({},JSON.parse(t.analysis)):t.analysisHtmlContent=""}catch(d){t.analysisHtmlContent=t.analysis}t.sub_questions&&t.sub_questions.length&&r.parseQuestionListItem(e,t.sub_questions,n,a)}))};function gi(e){return e.registerModule("zykjcommonQuestions",vi),{install:function(e){ze.getVueVersion();e.mixin({methods:{parseQuestionListItem:Ai}}),e.component("Question_SingleChoice",tt),e.component("Question_MultipleChoice",Vt),e.component("Question_Reading",en),e.component("Question_BriefAnswer",Dn),e.component("Question_FillBlank",Wn),e.component("Question_Programming",Ro),e.component("Question_Classify",ti)},parseQuestionListItem:Ai,questionMapper:ni,Question_SingleChoice:tt,Question_MultipleChoice:Vt,Question_Reading:en,Question_BriefAnswer:Dn,Question_FillBlank:Wn,Question_Programming:Ro,Question_Classify:ti}}var bi=gi}(),o}()}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zykjcommon/questions",
3
- "version": "0.0.51",
3
+ "version": "0.0.53",
4
4
  "main": "src/components/questions/entry.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -21,7 +21,11 @@
21
21
  "md5": "^2.2.1",
22
22
  "mitt": "^3.0.0",
23
23
  "mobile-detect": "^1.4.5",
24
- "video.js": "^7.6.0"
24
+ "video.js": "^7.6.0",
25
+ "vue": "^3.0.0",
26
+ "vue-router": "^4.0.0-0",
27
+ "vuex": "^4.0.0-0",
28
+ "vuex-composition-helpers": "^2.0.1"
25
29
  },
26
30
  "devDependencies": {
27
31
  "@types/node": "^18.11.9",
@@ -51,11 +55,7 @@
51
55
  "unplugin-vue-components": "^0.17.18",
52
56
  "url-loader": "^4.1.1",
53
57
  "webpack": "^5.88.1",
54
- "yargs": "^16.2.0",
55
- "vue": "^3.0.0",
56
- "vue-router": "^4.0.0-0",
57
- "vuex": "^4.0.0-0",
58
- "vuex-composition-helpers": "^2.0.1"
58
+ "yargs": "^16.2.0"
59
59
  },
60
60
  "publishConfig": {
61
61
  "access": "public",
@@ -29,7 +29,7 @@
29
29
  v-for="(item,index) in optionList"
30
30
  :key="index">
31
31
  <div class="list-item-text" v-show="item.content_type!=2">{{item.content}}</div>
32
- <div class="look-big-img-btn"></div>
32
+ <div class="look-big-img-btn" v-if="isNeedLookBigImgBtn"></div>
33
33
  </div>
34
34
  </div>
35
35
  </div>
@@ -101,6 +101,7 @@ export default {
101
101
  },
102
102
  data() {
103
103
  return {
104
+ isNeedLookBigImgBtn:false,
104
105
  animationing:false,
105
106
  analyCorrectAnswer:'',
106
107
  classify_question_info:{},
@@ -192,6 +193,17 @@ export default {
192
193
  let correct = this.questionInfo.answerMap.is_correct === '1' ? true : false
193
194
  return correct
194
195
  },
196
+ getIsNeedLookBigImgBtn(exam_options_data){
197
+ //如果每个item的file_url地址都是同一个就说明是默认背景不需要看大图
198
+ let arr = []
199
+ exam_options_data.forEach((item)=>{
200
+ let objItem = item.data
201
+ if(arr.indexOf(objItem.file_url) <= -1){
202
+ arr.push(objItem.file_url)
203
+ }
204
+ })
205
+ return arr.length > 1 ? true : false
206
+ },
195
207
  parseLists(nv){
196
208
  this.classify_question_info = nv.classify_question_info
197
209
  let exam_options_data = nv.exam_options_data
@@ -212,6 +224,7 @@ export default {
212
224
  idx:item.index
213
225
  })
214
226
  })
227
+ this.isNeedLookBigImgBtn = this.getIsNeedLookBigImgBtn(exam_options_data)
215
228
  this.optionList = optionList
216
229
  this.listItemBgCss = !optionList[0]?'':optionList[0].bgUrlCss
217
230
 
@@ -1,13 +1,10 @@
1
1
  <template>
2
2
  <div class="zykjcommon-question">
3
- <div class="question-type" v-if="!isSub">
4
- <div class="question-type-str" v-if="showQuestionType"><span v-if="showQuestionIndex">{{questionInfo.questionIndex}}、</span>{{ questionInfo.question_type_str }}</div>
5
- <span v-if="questionInfo.score!=='null' && showScore">({{questionInfo.score}}分)</span>
3
+ <div class="question-type" v-if="!isSub">{{questionInfo.questionIndex}}、{{ questionInfo.question_type_str }}<span v-if="questionInfo.score!=='null' && showScore">({{questionInfo.score}}分1111)</span>
6
4
  <span class="score fr" v-if="mode==='analysis'">得分:{{questionInfo.answerMap ? questionInfo.answerMap.user_score : '-'}}分</span>
7
5
  </div>
8
6
  <div class="question-box">
9
- <div class="question-hint"
10
- :class="{'bold':!showQuestionType}" v-if="showQuestionHint && questionInfo.hint && !isSub">{{ questionInfo.hint }}</div>
7
+ <div class="question-hint" v-if="questionInfo.hint && !isSub">{{ questionInfo.hint }}</div>
11
8
  <div class="editor-content"
12
9
  style="line-height: 40px;"
13
10
  v-if="questionInfo.htmlContent" v-html="questionInfo.htmlContent"></div>
@@ -61,18 +58,6 @@ export default {
61
58
  showScore: {
62
59
  type: Boolean,
63
60
  default: false
64
- },
65
- showQuestionType: {
66
- type: Boolean,
67
- default: true
68
- },
69
- showQuestionHint: {
70
- type: Boolean,
71
- default: true
72
- },
73
- showQuestionIndex: {
74
- type: Boolean,
75
- default: true
76
61
  }
77
62
  },
78
63
  mounted() {
@@ -83,10 +68,37 @@ export default {
83
68
  this.answerMap = nv.answerMap
84
69
  let fillBlank = jQuery(this.$el).find('.fill-blank')
85
70
  fillBlank.replaceWith(jQuery(`<span class="fill-blank" contenteditable="${self.mode==='exam'?'true':'false'}">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>`))
71
+
72
+ //先解绑
73
+ jQuery(this.$el).find('.fill-blank').unbind('input')
74
+ jQuery(this.$el).find('.fill-blank').unbind('keydown')
75
+ jQuery(this.$el).find('.fill-blank').unbind('paste')
76
+
77
+ jQuery(this.$el).bind('keydown',function(e){
78
+ if(e.keyCode === 13){
79
+ e.preventDefault()
80
+ }
81
+ })
82
+
83
+ jQuery(this.$el).bind('paste', function(e) {
84
+ // self.pasteMark = true
85
+ e.preventDefault();
86
+ });
87
+
88
+
86
89
  jQuery(this.$el).find('.fill-blank').bind('input',function(e){
87
90
  let ipt = jQuery(e.target)
88
- let iptValue = ipt.html()
91
+ let iptValue = ipt.text()
89
92
  iptValue = self.getIptValue(iptValue)
93
+ console.log(iptValue,123456);
94
+ //黏贴后过滤掉格式,只留文本
95
+ // if(self.pasteMark){
96
+ // ipt.text(iptValue)
97
+ // var selection = window.getSelection();
98
+ // selection.selectAllChildren(ipt.get(0));
99
+ // selection.collapseToEnd();
100
+ // self.pasteMark = false
101
+ // }
90
102
  if(iptValue.length <= 0){
91
103
  ipt.html('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;')
92
104
  }
@@ -132,6 +144,7 @@ export default {
132
144
  return {
133
145
  analyCorrectAnswer:'',
134
146
  answerMap:{},
147
+ pasteMark:false,
135
148
  ...JSON.parse(commonData)
136
149
  };
137
150
  },
@@ -143,7 +156,7 @@ export default {
143
156
  let fillBlank = jQuery(this.$el).find('.fill-blank')
144
157
  let gap_data = []
145
158
  fillBlank.each((index,item)=>{
146
- let iptValue = jQuery(item).html()
159
+ let iptValue = jQuery(item).text()
147
160
  iptValue = this.getIptValue(iptValue)
148
161
  gap_data.push(iptValue)
149
162
  })
@@ -151,7 +164,7 @@ export default {
151
164
  },
152
165
  isAnswered(){
153
166
  let answerResult = this.getAnswer().gap_data
154
- let answered = answerResult.some((item)=>{
167
+ let answered = answerResult.every((item)=>{
155
168
  return item !== ''
156
169
  })
157
170
  return answered