@zykjcommon/questions 0.0.15 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.production +1 -0
- package/.env.test +1 -0
- package/dist/zykjcommon-questions.common.js +54 -38
- package/dist/zykjcommon-questions.umd.js +54 -38
- package/dist/zykjcommon-questions.umd.min.js +1 -1
- package/package.json +2 -2
- package/src/assets/js/http.js +1 -1
- package/src/components/questions/Question_Programming.vue +19 -3
package/.env.production
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
BASE_URL = https://jsl-static.thedeer.cn/recruit-exam/
|
|
7
7
|
#VUE_APP_SERVER = https://jsl-api.thedeer.cn/education/
|
|
8
8
|
VUE_APP_SERVER = https://jsl-api.thedeer.cn/student-web/
|
|
9
|
+
VUE_APP_QUESTIONS_SERVER = https://jsl-api.thedeer.cn/student-web/
|
|
9
10
|
#正式环境地址
|
|
10
11
|
#https://jsl-exam.thedeer.cn/
|
|
11
12
|
|
package/.env.test
CHANGED
|
@@ -8,6 +8,7 @@ VUE_APP_FLAG = test
|
|
|
8
8
|
BASE_URL = https://pre-jsl-recruit-exam.thedeer.cn
|
|
9
9
|
#VUE_APP_SERVER = https://pre-api.thedeer.cn/education/
|
|
10
10
|
VUE_APP_SERVER = https://pre-api.thedeer.cn/student-web/
|
|
11
|
+
VUE_APP_QUESTIONS_SERVER = https://pre-api.thedeer.cn/student-web/
|
|
11
12
|
|
|
12
13
|
VUE_APP_ERROR_SERVER = https://pre-api.thedeer.cn
|
|
13
14
|
VUE_APP_ENV = 'pre'
|
|
@@ -13121,109 +13121,109 @@ let filerRegs = [{
|
|
|
13121
13121
|
const Question_FillBlank_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_FillBlankvue_type_script_lang_js, [['render',Question_FillBlankvue_type_template_id_c4c14c5a_render]])
|
|
13122
13122
|
|
|
13123
13123
|
/* harmony default export */ var Question_FillBlank = (Question_FillBlank_exports_);
|
|
13124
|
-
;// 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_Programming.vue?vue&type=template&id=
|
|
13124
|
+
;// 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_Programming.vue?vue&type=template&id=66006ba2
|
|
13125
13125
|
|
|
13126
|
-
const
|
|
13126
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_1 = {
|
|
13127
13127
|
class: "zykjcommon-question"
|
|
13128
13128
|
};
|
|
13129
|
-
const
|
|
13129
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_2 = {
|
|
13130
13130
|
key: 0,
|
|
13131
13131
|
class: "question-type"
|
|
13132
13132
|
};
|
|
13133
|
-
const
|
|
13133
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_3 = {
|
|
13134
13134
|
key: 0
|
|
13135
13135
|
};
|
|
13136
|
-
const
|
|
13136
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_4 = {
|
|
13137
13137
|
key: 1,
|
|
13138
13138
|
class: "score fr"
|
|
13139
13139
|
};
|
|
13140
|
-
const
|
|
13140
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_5 = {
|
|
13141
13141
|
class: "question-box"
|
|
13142
13142
|
};
|
|
13143
|
-
const
|
|
13144
|
-
const
|
|
13143
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_6 = ["innerHTML"];
|
|
13144
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_7 = {
|
|
13145
13145
|
key: 1,
|
|
13146
13146
|
class: "question-analysis"
|
|
13147
13147
|
};
|
|
13148
|
-
const
|
|
13148
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_8 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
13149
13149
|
class: "triangle-top"
|
|
13150
13150
|
}, null, -1);
|
|
13151
|
-
const
|
|
13151
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_9 = {
|
|
13152
13152
|
class: "question-analysis-item"
|
|
13153
13153
|
};
|
|
13154
|
-
const
|
|
13154
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_10 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("span", {
|
|
13155
13155
|
class: "txt"
|
|
13156
13156
|
}, "【你的答案】:", -1);
|
|
13157
|
-
const
|
|
13158
|
-
const
|
|
13157
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_11 = ["src"];
|
|
13158
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_12 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
13159
13159
|
class: "mask-text-box"
|
|
13160
13160
|
}, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
13161
13161
|
class: "mask"
|
|
13162
13162
|
}), /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
13163
13163
|
class: "mask-text"
|
|
13164
13164
|
}, "去修改")], -1);
|
|
13165
|
-
const
|
|
13165
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_13 = {
|
|
13166
13166
|
key: 2,
|
|
13167
13167
|
class: "question-analysis"
|
|
13168
13168
|
};
|
|
13169
|
-
const
|
|
13169
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_14 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
13170
13170
|
class: "triangle-top"
|
|
13171
13171
|
}, null, -1);
|
|
13172
|
-
const
|
|
13172
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_15 = {
|
|
13173
13173
|
class: "question-analysis-item"
|
|
13174
13174
|
};
|
|
13175
|
-
const
|
|
13175
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_16 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("span", {
|
|
13176
13176
|
class: "txt"
|
|
13177
13177
|
}, "【你的答案】:", -1);
|
|
13178
|
-
const
|
|
13179
|
-
const
|
|
13178
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_17 = ["src"];
|
|
13179
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_18 = {
|
|
13180
13180
|
class: "question-analysis-item"
|
|
13181
13181
|
};
|
|
13182
|
-
const
|
|
13182
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_19 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("span", {
|
|
13183
13183
|
class: "txt"
|
|
13184
13184
|
}, "【正确答案】:", -1);
|
|
13185
|
-
const
|
|
13186
|
-
const
|
|
13185
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_20 = ["src"];
|
|
13186
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_21 = {
|
|
13187
13187
|
key: 0,
|
|
13188
13188
|
class: "question-analysis-item"
|
|
13189
13189
|
};
|
|
13190
|
-
const
|
|
13190
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_22 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("span", {
|
|
13191
13191
|
class: "txt"
|
|
13192
13192
|
}, "【本题解析】:", -1);
|
|
13193
|
-
const
|
|
13193
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_23 = {
|
|
13194
13194
|
class: "txt-box"
|
|
13195
13195
|
};
|
|
13196
|
-
const
|
|
13197
|
-
function
|
|
13196
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_24 = ["innerHTML"];
|
|
13197
|
+
function Question_Programmingvue_type_template_id_66006ba2_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
13198
13198
|
const _component_MediaLooker = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("MediaLooker");
|
|
13199
13199
|
const _component_IframeComponent = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("IframeComponent");
|
|
13200
13200
|
const _component_Loading = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("Loading");
|
|
13201
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div",
|
|
13201
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", Question_Programmingvue_type_template_id_66006ba2_hoisted_1, [!$props.isSub ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", Question_Programmingvue_type_template_id_66006ba2_hoisted_2, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createTextVNode)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)($props.questionInfo.questionIndex) + "、" + (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)($props.questionInfo.hint ? $props.questionInfo.hint : $props.questionInfo.question_type_str), 1), $props.questionInfo.score !== 'null' ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("span", Question_Programmingvue_type_template_id_66006ba2_hoisted_3)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), $props.mode === 'analysis' ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("span", Question_Programmingvue_type_template_id_66006ba2_hoisted_4, "得分:" + (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)($props.questionInfo.answerMap ? $props.questionInfo.answerMap.user_score : '-') + "分", 1)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Programmingvue_type_template_id_66006ba2_hoisted_5, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
13202
13202
|
class: "editor-content",
|
|
13203
13203
|
innerHTML: $props.questionInfo.htmlContent
|
|
13204
|
-
}, null, 8,
|
|
13204
|
+
}, null, 8, Question_Programmingvue_type_template_id_66006ba2_hoisted_6), $props.mode === 'exam' && !$data.oss_temp_url || $props.mode === 'review' ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("button", {
|
|
13205
13205
|
key: 0,
|
|
13206
13206
|
class: "bcdt-btn",
|
|
13207
13207
|
onClick: _cache[0] || (_cache[0] = $event => $options.startCode('1'))
|
|
13208
|
-
}, "进入" + (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)($data.codeTypeMap[$props.questionInfo.code_type]) + "答题", 1)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), $props.mode === 'exam' && $data.oss_temp_url ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div",
|
|
13208
|
+
}, "进入" + (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)($data.codeTypeMap[$props.questionInfo.code_type]) + "答题", 1)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), $props.mode === 'exam' && $data.oss_temp_url ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", Question_Programmingvue_type_template_id_66006ba2_hoisted_7, [Question_Programmingvue_type_template_id_66006ba2_hoisted_8, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Programmingvue_type_template_id_66006ba2_hoisted_9, [Question_Programmingvue_type_template_id_66006ba2_hoisted_10, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
13209
13209
|
class: "img-box",
|
|
13210
13210
|
onClick: _cache[1] || (_cache[1] = $event => $options.startCode('2'))
|
|
13211
13211
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("img", {
|
|
13212
13212
|
src: $data.codeTypeImgMap[$props.questionInfo.code_type]
|
|
13213
|
-
}, null, 8,
|
|
13213
|
+
}, null, 8, Question_Programmingvue_type_template_id_66006ba2_hoisted_11), Question_Programmingvue_type_template_id_66006ba2_hoisted_12])])])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), $props.mode === 'analysis' ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", Question_Programmingvue_type_template_id_66006ba2_hoisted_13, [Question_Programmingvue_type_template_id_66006ba2_hoisted_14, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Programmingvue_type_template_id_66006ba2_hoisted_15, [Question_Programmingvue_type_template_id_66006ba2_hoisted_16, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
13214
13214
|
class: "img-box",
|
|
13215
13215
|
onClick: _cache[2] || (_cache[2] = $event => $options.startCode('3'))
|
|
13216
13216
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("img", {
|
|
13217
13217
|
src: $data.codeTypeImgMap[$props.questionInfo.code_type]
|
|
13218
|
-
}, null, 8,
|
|
13218
|
+
}, null, 8, Question_Programmingvue_type_template_id_66006ba2_hoisted_17)])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Programmingvue_type_template_id_66006ba2_hoisted_18, [Question_Programmingvue_type_template_id_66006ba2_hoisted_19, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
13219
13219
|
class: "img-box",
|
|
13220
13220
|
onClick: _cache[3] || (_cache[3] = $event => $options.startCode('4'))
|
|
13221
13221
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("img", {
|
|
13222
13222
|
src: $data.codeTypeImgMap[$props.questionInfo.code_type]
|
|
13223
|
-
}, null, 8,
|
|
13223
|
+
}, null, 8, Question_Programmingvue_type_template_id_66006ba2_hoisted_20)])]), $props.questionInfo.analysis ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", Question_Programmingvue_type_template_id_66006ba2_hoisted_21, [Question_Programmingvue_type_template_id_66006ba2_hoisted_22, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Programmingvue_type_template_id_66006ba2_hoisted_23, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("span", {
|
|
13224
13224
|
class: "analysis-txt",
|
|
13225
13225
|
innerHTML: $props.questionInfo.analysisHtmlContent
|
|
13226
|
-
}, null, 8,
|
|
13226
|
+
}, null, 8, Question_Programmingvue_type_template_id_66006ba2_hoisted_24)])])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)]), _ctx.visible ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createBlock)(_component_MediaLooker, {
|
|
13227
13227
|
key: 1,
|
|
13228
13228
|
visible: _ctx.visible,
|
|
13229
13229
|
"onUpdate:visible": _cache[4] || (_cache[4] = $event => _ctx.visible = $event),
|
|
@@ -13242,7 +13242,7 @@ function Question_Programmingvue_type_template_id_f33b5d50_render(_ctx, _cache,
|
|
|
13242
13242
|
loading: $data.loading
|
|
13243
13243
|
}, null, 8, ["loading"])]);
|
|
13244
13244
|
}
|
|
13245
|
-
;// CONCATENATED MODULE: ./src/components/questions/Question_Programming.vue?vue&type=template&id=
|
|
13245
|
+
;// CONCATENATED MODULE: ./src/components/questions/Question_Programming.vue?vue&type=template&id=66006ba2
|
|
13246
13246
|
|
|
13247
13247
|
;// 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/common/IframeComponent.vue?vue&type=template&id=0d05d84e
|
|
13248
13248
|
|
|
@@ -14964,6 +14964,10 @@ var index = {
|
|
|
14964
14964
|
/* harmony default export */ var Question_Programmingvue_type_script_lang_js = ({
|
|
14965
14965
|
name: 'Question_Programming',
|
|
14966
14966
|
props: {
|
|
14967
|
+
isEnterCodeByInit: {
|
|
14968
|
+
type: Boolean,
|
|
14969
|
+
default: false
|
|
14970
|
+
},
|
|
14967
14971
|
urlQuery: {
|
|
14968
14972
|
type: String,
|
|
14969
14973
|
default: ''
|
|
@@ -15000,6 +15004,16 @@ var index = {
|
|
|
15000
15004
|
immediate: true
|
|
15001
15005
|
});
|
|
15002
15006
|
},
|
|
15007
|
+
created() {
|
|
15008
|
+
//设置了后无需点击按钮直接进入编辑器
|
|
15009
|
+
if (this.isEnterCodeByInit) {
|
|
15010
|
+
if (this.oss_temp_url) {
|
|
15011
|
+
this.startCode('2');
|
|
15012
|
+
} else {
|
|
15013
|
+
this.startCode('1');
|
|
15014
|
+
}
|
|
15015
|
+
}
|
|
15016
|
+
},
|
|
15003
15017
|
data() {
|
|
15004
15018
|
return {
|
|
15005
15019
|
iframe: null,
|
|
@@ -15142,8 +15156,10 @@ var index = {
|
|
|
15142
15156
|
//关闭iframe并且保存(考试中)
|
|
15143
15157
|
closeAndSave(res) {
|
|
15144
15158
|
this.saveCodeOnly(res);
|
|
15145
|
-
this.
|
|
15146
|
-
|
|
15159
|
+
if (!this.isEnterCodeByInit) {
|
|
15160
|
+
this.closeIframe();
|
|
15161
|
+
}
|
|
15162
|
+
this.$emit('closeAndSave', res);
|
|
15147
15163
|
},
|
|
15148
15164
|
saveCodeOnly(res) {
|
|
15149
15165
|
let self = this;
|
|
@@ -15160,7 +15176,7 @@ var index = {
|
|
|
15160
15176
|
questionIndex: self.questionInfo.questionIndex - 1,
|
|
15161
15177
|
answered
|
|
15162
15178
|
});
|
|
15163
|
-
this.$emit('saveCodeOnly');
|
|
15179
|
+
this.$emit('saveCodeOnly', res);
|
|
15164
15180
|
},
|
|
15165
15181
|
uploadCodingFileSuccess(res) {
|
|
15166
15182
|
this.code_file_oss_temp_path = res.codeFileOssTempPath;
|
|
@@ -15183,7 +15199,7 @@ var index = {
|
|
|
15183
15199
|
|
|
15184
15200
|
|
|
15185
15201
|
;
|
|
15186
|
-
const Question_Programming_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Programmingvue_type_script_lang_js, [['render',
|
|
15202
|
+
const Question_Programming_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Programmingvue_type_script_lang_js, [['render',Question_Programmingvue_type_template_id_66006ba2_render]])
|
|
15187
15203
|
|
|
15188
15204
|
/* harmony default export */ var Question_Programming = (Question_Programming_exports_);
|
|
15189
15205
|
;// CONCATENATED MODULE: ./src/components/questions/const.js
|
|
@@ -13131,109 +13131,109 @@ let filerRegs = [{
|
|
|
13131
13131
|
const Question_FillBlank_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_FillBlankvue_type_script_lang_js, [['render',Question_FillBlankvue_type_template_id_c4c14c5a_render]])
|
|
13132
13132
|
|
|
13133
13133
|
/* harmony default export */ var Question_FillBlank = (Question_FillBlank_exports_);
|
|
13134
|
-
;// 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_Programming.vue?vue&type=template&id=
|
|
13134
|
+
;// 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_Programming.vue?vue&type=template&id=66006ba2
|
|
13135
13135
|
|
|
13136
|
-
const
|
|
13136
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_1 = {
|
|
13137
13137
|
class: "zykjcommon-question"
|
|
13138
13138
|
};
|
|
13139
|
-
const
|
|
13139
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_2 = {
|
|
13140
13140
|
key: 0,
|
|
13141
13141
|
class: "question-type"
|
|
13142
13142
|
};
|
|
13143
|
-
const
|
|
13143
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_3 = {
|
|
13144
13144
|
key: 0
|
|
13145
13145
|
};
|
|
13146
|
-
const
|
|
13146
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_4 = {
|
|
13147
13147
|
key: 1,
|
|
13148
13148
|
class: "score fr"
|
|
13149
13149
|
};
|
|
13150
|
-
const
|
|
13150
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_5 = {
|
|
13151
13151
|
class: "question-box"
|
|
13152
13152
|
};
|
|
13153
|
-
const
|
|
13154
|
-
const
|
|
13153
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_6 = ["innerHTML"];
|
|
13154
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_7 = {
|
|
13155
13155
|
key: 1,
|
|
13156
13156
|
class: "question-analysis"
|
|
13157
13157
|
};
|
|
13158
|
-
const
|
|
13158
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_8 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
13159
13159
|
class: "triangle-top"
|
|
13160
13160
|
}, null, -1);
|
|
13161
|
-
const
|
|
13161
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_9 = {
|
|
13162
13162
|
class: "question-analysis-item"
|
|
13163
13163
|
};
|
|
13164
|
-
const
|
|
13164
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_10 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("span", {
|
|
13165
13165
|
class: "txt"
|
|
13166
13166
|
}, "【你的答案】:", -1);
|
|
13167
|
-
const
|
|
13168
|
-
const
|
|
13167
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_11 = ["src"];
|
|
13168
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_12 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
13169
13169
|
class: "mask-text-box"
|
|
13170
13170
|
}, [/*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
13171
13171
|
class: "mask"
|
|
13172
13172
|
}), /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
13173
13173
|
class: "mask-text"
|
|
13174
13174
|
}, "去修改")], -1);
|
|
13175
|
-
const
|
|
13175
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_13 = {
|
|
13176
13176
|
key: 2,
|
|
13177
13177
|
class: "question-analysis"
|
|
13178
13178
|
};
|
|
13179
|
-
const
|
|
13179
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_14 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
13180
13180
|
class: "triangle-top"
|
|
13181
13181
|
}, null, -1);
|
|
13182
|
-
const
|
|
13182
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_15 = {
|
|
13183
13183
|
class: "question-analysis-item"
|
|
13184
13184
|
};
|
|
13185
|
-
const
|
|
13185
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_16 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("span", {
|
|
13186
13186
|
class: "txt"
|
|
13187
13187
|
}, "【你的答案】:", -1);
|
|
13188
|
-
const
|
|
13189
|
-
const
|
|
13188
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_17 = ["src"];
|
|
13189
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_18 = {
|
|
13190
13190
|
class: "question-analysis-item"
|
|
13191
13191
|
};
|
|
13192
|
-
const
|
|
13192
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_19 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("span", {
|
|
13193
13193
|
class: "txt"
|
|
13194
13194
|
}, "【正确答案】:", -1);
|
|
13195
|
-
const
|
|
13196
|
-
const
|
|
13195
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_20 = ["src"];
|
|
13196
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_21 = {
|
|
13197
13197
|
key: 0,
|
|
13198
13198
|
class: "question-analysis-item"
|
|
13199
13199
|
};
|
|
13200
|
-
const
|
|
13200
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_22 = /*#__PURE__*/(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("span", {
|
|
13201
13201
|
class: "txt"
|
|
13202
13202
|
}, "【本题解析】:", -1);
|
|
13203
|
-
const
|
|
13203
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_23 = {
|
|
13204
13204
|
class: "txt-box"
|
|
13205
13205
|
};
|
|
13206
|
-
const
|
|
13207
|
-
function
|
|
13206
|
+
const Question_Programmingvue_type_template_id_66006ba2_hoisted_24 = ["innerHTML"];
|
|
13207
|
+
function Question_Programmingvue_type_template_id_66006ba2_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
13208
13208
|
const _component_MediaLooker = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("MediaLooker");
|
|
13209
13209
|
const _component_IframeComponent = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("IframeComponent");
|
|
13210
13210
|
const _component_Loading = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("Loading");
|
|
13211
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div",
|
|
13211
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", Question_Programmingvue_type_template_id_66006ba2_hoisted_1, [!$props.isSub ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", Question_Programmingvue_type_template_id_66006ba2_hoisted_2, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createTextVNode)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)($props.questionInfo.questionIndex) + "、" + (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)($props.questionInfo.hint ? $props.questionInfo.hint : $props.questionInfo.question_type_str), 1), $props.questionInfo.score !== 'null' ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("span", Question_Programmingvue_type_template_id_66006ba2_hoisted_3)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), $props.mode === 'analysis' ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("span", Question_Programmingvue_type_template_id_66006ba2_hoisted_4, "得分:" + (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)($props.questionInfo.answerMap ? $props.questionInfo.answerMap.user_score : '-') + "分", 1)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Programmingvue_type_template_id_66006ba2_hoisted_5, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
13212
13212
|
class: "editor-content",
|
|
13213
13213
|
innerHTML: $props.questionInfo.htmlContent
|
|
13214
|
-
}, null, 8,
|
|
13214
|
+
}, null, 8, Question_Programmingvue_type_template_id_66006ba2_hoisted_6), $props.mode === 'exam' && !$data.oss_temp_url || $props.mode === 'review' ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("button", {
|
|
13215
13215
|
key: 0,
|
|
13216
13216
|
class: "bcdt-btn",
|
|
13217
13217
|
onClick: _cache[0] || (_cache[0] = $event => $options.startCode('1'))
|
|
13218
|
-
}, "进入" + (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)($data.codeTypeMap[$props.questionInfo.code_type]) + "答题", 1)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), $props.mode === 'exam' && $data.oss_temp_url ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div",
|
|
13218
|
+
}, "进入" + (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)($data.codeTypeMap[$props.questionInfo.code_type]) + "答题", 1)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), $props.mode === 'exam' && $data.oss_temp_url ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", Question_Programmingvue_type_template_id_66006ba2_hoisted_7, [Question_Programmingvue_type_template_id_66006ba2_hoisted_8, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Programmingvue_type_template_id_66006ba2_hoisted_9, [Question_Programmingvue_type_template_id_66006ba2_hoisted_10, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
13219
13219
|
class: "img-box",
|
|
13220
13220
|
onClick: _cache[1] || (_cache[1] = $event => $options.startCode('2'))
|
|
13221
13221
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("img", {
|
|
13222
13222
|
src: $data.codeTypeImgMap[$props.questionInfo.code_type]
|
|
13223
|
-
}, null, 8,
|
|
13223
|
+
}, null, 8, Question_Programmingvue_type_template_id_66006ba2_hoisted_11), Question_Programmingvue_type_template_id_66006ba2_hoisted_12])])])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true), $props.mode === 'analysis' ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", Question_Programmingvue_type_template_id_66006ba2_hoisted_13, [Question_Programmingvue_type_template_id_66006ba2_hoisted_14, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Programmingvue_type_template_id_66006ba2_hoisted_15, [Question_Programmingvue_type_template_id_66006ba2_hoisted_16, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
13224
13224
|
class: "img-box",
|
|
13225
13225
|
onClick: _cache[2] || (_cache[2] = $event => $options.startCode('3'))
|
|
13226
13226
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("img", {
|
|
13227
13227
|
src: $data.codeTypeImgMap[$props.questionInfo.code_type]
|
|
13228
|
-
}, null, 8,
|
|
13228
|
+
}, null, 8, Question_Programmingvue_type_template_id_66006ba2_hoisted_17)])]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Programmingvue_type_template_id_66006ba2_hoisted_18, [Question_Programmingvue_type_template_id_66006ba2_hoisted_19, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
13229
13229
|
class: "img-box",
|
|
13230
13230
|
onClick: _cache[3] || (_cache[3] = $event => $options.startCode('4'))
|
|
13231
13231
|
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("img", {
|
|
13232
13232
|
src: $data.codeTypeImgMap[$props.questionInfo.code_type]
|
|
13233
|
-
}, null, 8,
|
|
13233
|
+
}, null, 8, Question_Programmingvue_type_template_id_66006ba2_hoisted_20)])]), $props.questionInfo.analysis ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", Question_Programmingvue_type_template_id_66006ba2_hoisted_21, [Question_Programmingvue_type_template_id_66006ba2_hoisted_22, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", Question_Programmingvue_type_template_id_66006ba2_hoisted_23, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("span", {
|
|
13234
13234
|
class: "analysis-txt",
|
|
13235
13235
|
innerHTML: $props.questionInfo.analysisHtmlContent
|
|
13236
|
-
}, null, 8,
|
|
13236
|
+
}, null, 8, Question_Programmingvue_type_template_id_66006ba2_hoisted_24)])])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)]), _ctx.visible ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createBlock)(_component_MediaLooker, {
|
|
13237
13237
|
key: 1,
|
|
13238
13238
|
visible: _ctx.visible,
|
|
13239
13239
|
"onUpdate:visible": _cache[4] || (_cache[4] = $event => _ctx.visible = $event),
|
|
@@ -13252,7 +13252,7 @@ function Question_Programmingvue_type_template_id_f33b5d50_render(_ctx, _cache,
|
|
|
13252
13252
|
loading: $data.loading
|
|
13253
13253
|
}, null, 8, ["loading"])]);
|
|
13254
13254
|
}
|
|
13255
|
-
;// CONCATENATED MODULE: ./src/components/questions/Question_Programming.vue?vue&type=template&id=
|
|
13255
|
+
;// CONCATENATED MODULE: ./src/components/questions/Question_Programming.vue?vue&type=template&id=66006ba2
|
|
13256
13256
|
|
|
13257
13257
|
;// 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/common/IframeComponent.vue?vue&type=template&id=0d05d84e
|
|
13258
13258
|
|
|
@@ -14974,6 +14974,10 @@ var index = {
|
|
|
14974
14974
|
/* harmony default export */ var Question_Programmingvue_type_script_lang_js = ({
|
|
14975
14975
|
name: 'Question_Programming',
|
|
14976
14976
|
props: {
|
|
14977
|
+
isEnterCodeByInit: {
|
|
14978
|
+
type: Boolean,
|
|
14979
|
+
default: false
|
|
14980
|
+
},
|
|
14977
14981
|
urlQuery: {
|
|
14978
14982
|
type: String,
|
|
14979
14983
|
default: ''
|
|
@@ -15010,6 +15014,16 @@ var index = {
|
|
|
15010
15014
|
immediate: true
|
|
15011
15015
|
});
|
|
15012
15016
|
},
|
|
15017
|
+
created() {
|
|
15018
|
+
//设置了后无需点击按钮直接进入编辑器
|
|
15019
|
+
if (this.isEnterCodeByInit) {
|
|
15020
|
+
if (this.oss_temp_url) {
|
|
15021
|
+
this.startCode('2');
|
|
15022
|
+
} else {
|
|
15023
|
+
this.startCode('1');
|
|
15024
|
+
}
|
|
15025
|
+
}
|
|
15026
|
+
},
|
|
15013
15027
|
data() {
|
|
15014
15028
|
return {
|
|
15015
15029
|
iframe: null,
|
|
@@ -15152,8 +15166,10 @@ var index = {
|
|
|
15152
15166
|
//关闭iframe并且保存(考试中)
|
|
15153
15167
|
closeAndSave(res) {
|
|
15154
15168
|
this.saveCodeOnly(res);
|
|
15155
|
-
this.
|
|
15156
|
-
|
|
15169
|
+
if (!this.isEnterCodeByInit) {
|
|
15170
|
+
this.closeIframe();
|
|
15171
|
+
}
|
|
15172
|
+
this.$emit('closeAndSave', res);
|
|
15157
15173
|
},
|
|
15158
15174
|
saveCodeOnly(res) {
|
|
15159
15175
|
let self = this;
|
|
@@ -15170,7 +15186,7 @@ var index = {
|
|
|
15170
15186
|
questionIndex: self.questionInfo.questionIndex - 1,
|
|
15171
15187
|
answered
|
|
15172
15188
|
});
|
|
15173
|
-
this.$emit('saveCodeOnly');
|
|
15189
|
+
this.$emit('saveCodeOnly', res);
|
|
15174
15190
|
},
|
|
15175
15191
|
uploadCodingFileSuccess(res) {
|
|
15176
15192
|
this.code_file_oss_temp_path = res.codeFileOssTempPath;
|
|
@@ -15193,7 +15209,7 @@ var index = {
|
|
|
15193
15209
|
|
|
15194
15210
|
|
|
15195
15211
|
;
|
|
15196
|
-
const Question_Programming_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Programmingvue_type_script_lang_js, [['render',
|
|
15212
|
+
const Question_Programming_exports_ = /*#__PURE__*/(0,exportHelper/* default */.Z)(Question_Programmingvue_type_script_lang_js, [['render',Question_Programmingvue_type_template_id_66006ba2_render]])
|
|
15197
15213
|
|
|
15198
15214
|
/* harmony default export */ var Question_Programming = (Question_Programming_exports_);
|
|
15199
15215
|
;// CONCATENATED MODULE: ./src/components/questions/const.js
|
|
@@ -21,4 +21,4 @@ return function(t){var n=e,o=n.lib,r=o.WordArray,i=o.Hasher,s=n.algo,a=r.create(
|
|
|
21
21
|
* (c) 2022 Evan You
|
|
22
22
|
* @license MIT
|
|
23
23
|
*/
|
|
24
|
-
var po="store";function mo(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function go(e){return null!==e&&"object"===typeof e}function Ao(e){return e&&"function"===typeof e.then}function vo(e,t){return function(){return e(t)}}function yo(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 wo(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;Co(e,n,[],e._modules.root,!0),bo(e,n,t)}function bo(e,t,o){var r=e._state,i=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var s=e._wrappedGetters,a={},c={},u=(0,n.effectScope)(!0);u.run((function(){mo(s,(function(t,o){a[o]=vo(t,e),c[o]=(0,n.computed)((function(){return a[o]()})),Object.defineProperty(e.getters,o,{get:function(){return c[o].value},enumerable:!0})}))})),e._state=(0,n.reactive)({data:t}),e._scope=u,e.strict&&Mo(e),r&&o&&e._withCommit((function(){r.data=null})),i&&i.stop()}function Co(e,t,n,o,r){var i=!n.length,s=e._modules.getNamespace(n);if(o.namespaced&&(e._modulesNamespaceMap[s],e._modulesNamespaceMap[s]=o),!i&&!r){var a=So(t,n.slice(0,-1)),c=n[n.length-1];e._withCommit((function(){a[c]=o.state}))}var u=o.context=xo(e,s,n);o.forEachMutation((function(t,n){var o=s+n;Bo(e,o,t,u)})),o.forEachAction((function(t,n){var o=t.root?n:s+n,r=t.handler||t;Eo(e,o,r,u)})),o.forEachGetter((function(t,n){var o=s+n;Io(e,o,t,u)})),o.forEachChild((function(o,i){Co(e,t,n.concat(i),o,r)}))}function xo(e,t,n){var o=""===t,r={dispatch:o?e.dispatch:function(n,o,r){var i=Do(n,o,r),s=i.payload,a=i.options,c=i.type;return a&&a.root||(c=t+c),e.dispatch(c,s)},commit:o?e.commit:function(n,o,r){var i=Do(n,o,r),s=i.payload,a=i.options,c=i.type;a&&a.root||(c=t+c),e.commit(c,s,a)}};return Object.defineProperties(r,{getters:{get:o?function(){return e.getters}:function(){return ko(e,t)}},state:{get:function(){return So(e.state,n)}}}),r}function ko(e,t){if(!e._makeLocalGettersCache[t]){var n={},o=t.length;Object.keys(e.getters).forEach((function(r){if(r.slice(0,o)===t){var i=r.slice(o);Object.defineProperty(n,i,{get:function(){return e.getters[r]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function Bo(e,t,n,o){var r=e._mutations[t]||(e._mutations[t]=[]);r.push((function(t){n.call(e,o.state,t)}))}function Eo(e,t,n,o){var r=e._actions[t]||(e._actions[t]=[]);r.push((function(t){var r=n.call(e,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:e.getters,rootState:e.state},t);return Ao(r)||(r=Promise.resolve(r)),e._devtoolHook?r.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):r}))}function Io(e,t,n,o){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(e){return n(o.state,o.getters,e.state,e.getters)})}function Mo(e){(0,n.watch)((function(){return e._state.data}),(function(){0}),{deep:!0,flush:"sync"})}function So(e,t){return t.reduce((function(e,t){return e[t]}),e)}function Do(e,t,n){return go(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var Oo="vuex bindings",jo="vuex:mutations",qo="vuex:actions",No="vuex",_o=0;function Lo(e,t){ho({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:[Oo]},(function(n){n.addTimelineLayer({id:jo,label:"Vuex Mutations",color:Vo}),n.addTimelineLayer({id:qo,label:"Vuex Actions",color:Vo}),n.addInspector({id:No,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree((function(n){if(n.app===e&&n.inspectorId===No)if(n.filter){var o=[];zo(o,t._modules.root,n.filter,""),n.rootNodes=o}else n.rootNodes=[Uo(t._modules.root,"")]})),n.on.getInspectorState((function(n){if(n.app===e&&n.inspectorId===No){var o=n.nodeId;ko(t,o),n.state=Go(Ho(t._modules,o),"root"===o?t.getters:t._makeLocalGettersCache,o)}})),n.on.editInspectorState((function(n){if(n.app===e&&n.inspectorId===No){var o=n.nodeId,r=n.path;"root"!==o&&(r=o.split("/").filter(Boolean).concat(r)),t._withCommit((function(){n.set(t._state.data,r,n.state.value)}))}})),t.subscribe((function(e,t){var o={};e.payload&&(o.payload=e.payload),o.state=t,n.notifyComponentUpdate(),n.sendInspectorTree(No),n.sendInspectorState(No),n.addTimelineEvent({layerId:jo,event:{time:Date.now(),title:e.type,data:o}})})),t.subscribeAction({before:function(e,t){var o={};e.payload&&(o.payload=e.payload),e._id=_o++,e._time=Date.now(),o.state=t,n.addTimelineEvent({layerId:qo,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:o}})},after:function(e,t){var o={},r=Date.now()-e._time;o.duration={_custom:{type:"duration",display:r+"ms",tooltip:"Action duration",value:r}},e.payload&&(o.payload=e.payload),o.state=t,n.addTimelineEvent({layerId:qo,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:o}})}})}))}var Vo=8702998,To=6710886,Po=16777215,Qo={label:"namespaced",textColor:Po,backgroundColor:To};function Fo(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function Uo(e,t){return{id:t||"root",label:Fo(t),tags:e.namespaced?[Qo]:[],children:Object.keys(e._children).map((function(n){return Uo(e._children[n],t+n+"/")}))}}function zo(e,t,n,o){o.includes(n)&&e.push({id:o||"root",label:o.endsWith("/")?o.slice(0,o.length-1):o||"Root",tags:t.namespaced?[Qo]:[]}),Object.keys(t._children).forEach((function(r){zo(e,t._children[r],n,o+r+"/")}))}function Go(e,t,n){t="root"===n?t:t[n];var o=Object.keys(t),r={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(o.length){var i=Ro(t);r.getters=Object.keys(i).map((function(e){return{key:e.endsWith("/")?Fo(e):e,editable:!1,value:Yo((function(){return i[e]}))}}))}return r}function Ro(e){var t={};return Object.keys(e).forEach((function(n){var o=n.split("/");if(o.length>1){var r=t,i=o.pop();o.forEach((function(e){r[e]||(r[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),r=r[e]._custom.value})),r[i]=Yo((function(){return e[n]}))}else t[n]=Yo((function(){return e[n]}))})),t}function Ho(e,t){var n=t.split("/").filter((function(e){return e}));return n.reduce((function(e,o,r){var i=e[o];if(!i)throw new Error('Missing module "'+o+'" for path "'+t+'".');return r===n.length-1?i:i._children}),"root"===t?e:e.root._children)}function Yo(e){try{return e()}catch(t){return t}}var Ko=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)||{}},Wo={namespaced:{configurable:!0}};Wo.namespaced.get=function(){return!!this._rawModule.namespaced},Ko.prototype.addChild=function(e,t){this._children[e]=t},Ko.prototype.removeChild=function(e){delete this._children[e]},Ko.prototype.getChild=function(e){return this._children[e]},Ko.prototype.hasChild=function(e){return e in this._children},Ko.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)},Ko.prototype.forEachChild=function(e){mo(this._children,e)},Ko.prototype.forEachGetter=function(e){this._rawModule.getters&&mo(this._rawModule.getters,e)},Ko.prototype.forEachAction=function(e){this._rawModule.actions&&mo(this._rawModule.actions,e)},Ko.prototype.forEachMutation=function(e){this._rawModule.mutations&&mo(this._rawModule.mutations,e)},Object.defineProperties(Ko.prototype,Wo);var Xo=function(e){this.register([],e,!1)};function Jo(e,t,n){if(t.update(n),n.modules)for(var o in n.modules){if(!t.getChild(o))return void 0;Jo(e.concat(o),t.getChild(o),n.modules[o])}}Xo.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},Xo.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return t=t.getChild(n),e+(t.namespaced?n+"/":"")}),"")},Xo.prototype.update=function(e){Jo([],this.root,e)},Xo.prototype.register=function(e,t,n){var o=this;void 0===n&&(n=!0);var r=new Ko(t,n);if(0===e.length)this.root=r;else{var i=this.get(e.slice(0,-1));i.addChild(e[e.length-1],r)}t.modules&&mo(t.modules,(function(t,r){o.register(e.concat(r),t,n)}))},Xo.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],o=t.getChild(n);o&&o.runtime&&t.removeChild(n)},Xo.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var Zo=function(e){var t=this;void 0===e&&(e={});var n=e.plugins;void 0===n&&(n=[]);var o=e.strict;void 0===o&&(o=!1);var r=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 Xo(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=r;var i=this,s=this,a=s.dispatch,c=s.commit;this.dispatch=function(e,t){return a.call(i,e,t)},this.commit=function(e,t,n){return c.call(i,e,t,n)},this.strict=o;var u=this._modules.root.state;Co(this,u,[],this._modules.root),bo(this,u),n.forEach((function(e){return e(t)}))},$o={state:{configurable:!0}};Zo.prototype.install=function(e,t){e.provide(t||po,this),e.config.globalProperties.$store=this;var n=void 0!==this._devtools&&this._devtools;n&&Lo(e,this)},$o.state.get=function(){return this._state.data},$o.state.set=function(e){0},Zo.prototype.commit=function(e,t,n){var o=this,r=Do(e,t,n),i=r.type,s=r.payload,a=(r.options,{type:i,payload:s}),c=this._mutations[i];c&&(this._withCommit((function(){c.forEach((function(e){e(s)}))})),this._subscribers.slice().forEach((function(e){return e(a,o.state)})))},Zo.prototype.dispatch=function(e,t){var n=this,o=Do(e,t),r=o.type,i=o.payload,s={type:r,payload:i},a=this._actions[r];if(a){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(s,n.state)}))}catch(u){0}var c=a.length>1?Promise.all(a.map((function(e){return e(i)}))):a[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(s,n.state)}))}catch(u){0}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(s,n.state,e)}))}catch(u){0}t(e)}))}))}},Zo.prototype.subscribe=function(e,t){return yo(e,this._subscribers,t)},Zo.prototype.subscribeAction=function(e,t){var n="function"===typeof e?{before:e}:e;return yo(n,this._actionSubscribers,t)},Zo.prototype.watch=function(e,t,o){var r=this;return(0,n.watch)((function(){return e(r.state,r.getters)}),t,Object.assign({},o))},Zo.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},Zo.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"===typeof e&&(e=[e]),this._modules.register(e,t),Co(this,this.state,e,this._modules.get(e),n.preserveState),bo(this,this.state)},Zo.prototype.unregisterModule=function(e){var t=this;"string"===typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var n=So(t.state,e.slice(0,-1));delete n[e[e.length-1]]})),wo(this)},Zo.prototype.hasModule=function(e){return"string"===typeof e&&(e=[e]),this._modules.isRegistered(e)},Zo.prototype.hotUpdate=function(e){this._modules.update(e),wo(this,!0)},Zo.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(Zo.prototype,$o);var er=rr((function(e,t){var n={};return nr(t).forEach((function(t){var o=t.key,r=t.val;n[o]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var o=ir(this.$store,"mapState",e);if(!o)return;t=o.context.state,n=o.context.getters}return"function"===typeof r?r.call(this,t,n):t[r]},n[o].vuex=!0})),n})),tr=(rr((function(e,t){var n={};return nr(t).forEach((function(t){var o=t.key,r=t.val;n[o]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var o=this.$store.commit;if(e){var i=ir(this.$store,"mapMutations",e);if(!i)return;o=i.context.commit}return"function"===typeof r?r.apply(this,[o].concat(t)):o.apply(this.$store,[r].concat(t))}})),n})),rr((function(e,t){var n={};return nr(t).forEach((function(t){var o=t.key,r=t.val;r=e+r,n[o]=function(){if(!e||ir(this.$store,"mapGetters",e))return this.$store.getters[r]},n[o].vuex=!0})),n})),rr((function(e,t){var n={};return nr(t).forEach((function(t){var o=t.key,r=t.val;n[o]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var o=this.$store.dispatch;if(e){var i=ir(this.$store,"mapActions",e);if(!i)return;o=i.context.dispatch}return"function"===typeof r?r.apply(this,[o].concat(t)):o.apply(this.$store,[r].concat(t))}})),n})));function nr(e){return or(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 or(e){return Array.isArray(e)||go(e)}function rr(e){return function(t,n){return"string"!==typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function ir(e,t,n){var o=e._modulesNamespaceMap[n];return o}var sr={name:"Question_Programming",props:{urlQuery:{type:String,default:""},isSub:{type:Boolean,default:!1},questionInfo:{type:Object,default:{}},bus:{type:Object,default:{}},mode:{type:String,default:"exam"}},mounted(){N(this),this.$watch("oss_temp_url",(e=>{if(e){let e=this.isAnswered();this.$emit("getIsAnswered",e),"exam"===this.mode&&this.bus.$emit("questionCardChange",{questionIndex:this.questionInfo.questionIndex-1,answered:e})}}),{immediate:!0})},data(){return{iframe:null,showFrame:!1,analyCorrectAnswer:"",iframeUrl:"",code_file_oss_temp_path:"",oss_temp_url:"",scratch_answer_json:"",loading:!1,enterCode:!1,codeTypeMap:{1:"Scratch",2:"Python",3:"PyGame",4:"C++"},codeTypeImgMap:{1:o(3031),2:o(3843),3:o(6543),4:o(2657)},answerMap:{},...JSON.parse(q)}},watch:{questionInfo:{handler(e,t){if(e){this.answerMap=e.answerMap;let t=e.answerMap;t&&(this.code_file_oss_temp_path=t.code_file_oss_temp_path,this.oss_temp_url=t.oss_temp_url)}},immediate:!0}},computed:{...er("zykjcommonQuestions",["pythonCodeWebPath","scratchCodeWebPath","cplusCodeWebPath"])},methods:{...tr("zykjcommonQuestions",["getEditorUrlActions"]),getAnswer(){return{code_file_oss_temp_path:this.code_file_oss_temp_path,oss_temp_url:this.oss_temp_url,scratch_answer_json:this.scratch_answer_json}},isAnswered(){let e=""!==this.oss_temp_url;return e},isCorrect(){let e="1"===this.questionInfo.answerMap.is_correct;return e},getCodeWebPath(e){this.pythonCodeWebPath||this.scratchCodeWebPath||this.cplusCodeWebPath?e&&e():(this.loading=!0,this.getEditorUrlActions().then((()=>{this.loading=!1,e&&e()}),(()=>{this.loading=!1})))},startCode(e){let t=this;this.loading||(this.getCodeWebPath((function(){let n={1:t.questionInfo.template_file_full_url,2:t.oss_temp_url,3:t.oss_temp_url,4:t.questionInfo.reference_file_full_url},o="",r=t.questionInfo.code_type,i=n[e],s=t.urlQuery+`&codeUrl=${i}`;switch(r){case 1:o=`${t.scratchCodeWebPath}/?${s}`;break;case 2:o=`${t.pythonCodeWebPath}/?${s}`;break;case 3:o=`${t.pythonCodeWebPath}/?${s}&pygame=true`;break;case 4:o=`${t.cplusCodeWebPath}/?${s}`;break}t.iframeUrl=o})),this.showFrame=!0)},getQuestionInfo(){let e=this,t={type:"getQuestionInfo",data:e.questionInfo.htmlContent};this.iframe&&this.iframe.contentWindow.postMessage(JSON.stringify(t),"*")},submitCodeQuestionByTimeover(){let e={type:"submitCodeQuestionByTimeover"};this.iframe&&this.iframe.contentWindow.postMessage(JSON.stringify(e),"*")},iframeLoaded(e){this.iframe=e,this.enterCode=!0,this.bus.$emit("enterCode",!0)},closeIframe(){this.enterCode=!1,this.bus.$emit("enterCode",!1),this.showFrame=!1},closeAndSave(e){this.saveCodeOnly(e),this.closeIframe(),this.$emit("closeAndSave")},saveCodeOnly(e){let t=this;this.code_file_oss_temp_path=e.codeFileOssTempPath,this.oss_temp_url=e.ossTempUrl,this.scratch_answer_json=e.scratch_answer_json,this.bus.$emit("submitQuestion",{saveType:1,submitRequestAutoQuit:!1,needSubmitRequest:!1});let n=this.isAnswered();"exam"===this.mode&&this.bus.$emit("questionCardChange",{questionIndex:t.questionInfo.questionIndex-1,answered:n}),this.$emit("saveCodeOnly")},uploadCodingFileSuccess(e){this.code_file_oss_temp_path=e.codeFileOssTempPath,this.oss_temp_url=e.ossTempUrl,this.scratch_answer_json=e.scratch_answer_json,this.bus.$emit("uploadCodingFileSuccess")}},components:{IframeComponent:to,MediaLooker:De,Loading:Zn}};const ar=(0,Me.Z)(sr,[["render",Un]]);var cr=ar;let ur={1:"Question_SingleChoice",2:"Question_MultipleChoice",3:"Question_SingleChoice",7:"Question_BriefAnswer",16:"Question_Programming",11:"Question_Reading",4:"Question_FillBlank"};var lr=o(1354),dr=o(9669),fr=o.n(dr),hr=o(7631),pr=o.n(hr);let mr="piw38kulfozrea7ydmjnvbc965q1gt2x",gr=function(e,t,n,o){void 0!=n&&"undefined"!==typeof n["password"]&&(n["password"]=pr().hex_md5(pr().hex_md5(n["password"]+"FE605C9343A3A47764598FDC184EC66F").toUpperCase()+"FE605C9343A3A47764598FDC184EC66F").toUpperCase());let r=e+"\n/student-web"+t+"\n"+o+"\n"+(n?JSON.stringify(n):""),i=lr.enc.Base64.stringify((0,lr.HmacSHA256)(r,mr)),s=function(e){let t=e.replace(/\+/g,"-");t=t.replace(/\//g,"_");let n=t.length%4,o="====";return t+=o.substring(0,n),t};return s(i)};fr().defaults.baseURL="https://jsl-api.thedeer.cn/student-web/",fr().defaults.timeout=6e4,fr().defaults.withCredentials=!0;let Ar=(e,t)=>{if(t&&-1!=t["Content-Type"].indexOf("multipart/form-data")){let t=new FormData;for(let n in e)t.append(n,e[n]);return t}return JSON.stringify(e)},vr=e=>{e=JSON.parse(e),e.hasOwnProperty("errorCode")&&(e.error_code=e.errorCode);let{error_code:t,message:n}=e;if(t){let e=[39002,39003];if(e.indexOf(t)<=-1){let e=n||"系统异常";Ee.messageTip("warning",e)}}return e};function yr(e,t,n,o,r){let i,s;e=e.toUpperCase(),t+=0===n.indexOf("/")?n.substr(1):n;let a=window.isMock;"undefined"!==typeof r&&"undefined"!==typeof r.isMock&&(a=r.isMock,delete r.isMock),a&&r&&r.onUploadProgress&&delete r.onUploadProgress;let c=n;"/"!==n[0]&&(c="/"+n);let u=(new Date).getTime(),l={ts:u,sign:gr(e,c,o,u),token:Ee.getToken()};switch(e){case"Get":s=o||{};break;default:case"POST":i=o||{},l["Content-Type"]=r&&r.contentType?r.contentType:"application/json";break}return t instanceof Array?fr().all([]).then(fr().spread((function(){}))):fr()(Object.assign({headers:l,method:e,url:t,data:i,params:s,transformRequest:Ar,transformResponse:vr},r)).then((e=>e.data)).catch((e=>(console.log("服务端请求/响应错误:",e,e.config),Promise.reject(e))))}const wr=(e,t,n)=>yr("GET","",e,t,n);let br={editorUrl:"/open/editor-url"};const Cr={pythonCodeWebPath:"",scratchCodeWebPath:"",cplusCodeWebPath:""};var xr={namespaced:!0,state:Cr,getters:{},mutations:{setCodeWebPath(e,t){e.pythonCodeWebPath=t.pythonCodeWebPath,e.scratchCodeWebPath=t.scratchCodeWebPath,e.cplusCodeWebPath=t.cplusCodeWebPath}},actions:{getEditorUrlActions({commit:e,dispatch:t}){return new Promise(((t,n)=>{wr(`${br.editorUrl}`).then((n=>{let{error_code:o,data:r}=n;if(!o){let{pythonCodeWebPath:t,scratchCodeWebPath:n,cplusCodeWebPath:o}=r;e("setCodeWebPath",{pythonCodeWebPath:t,scratchCodeWebPath:n,cplusCodeWebPath:o})}t(n)}),(e=>{n(e)}))}))}}};function kr(e){return e.registerModule("zykjcommonQuestions",xr),{install(e){Ee.getVueVersion();e.mixin({methods:{parseQuestionListItem(e,t,n,o=void 0){function r(e,t){e.forEach((e=>{if("img"===e["<>"]&&e.hasOwnProperty("width")){let n=Number(e.width);n>t&&(e.width=Math.floor(t),e.height&&delete e.height)}e.html&&e.html.length&&r(e.html,t)}))}t.forEach(((t,i)=>{if(t.questionComponent=ur[t.question_type],void 0===o?t.questionIndex=i+1:(t.questionIndex=o+1+"-"+(i+1),t.questionIndex2=i+1),n&&n.hasOwnProperty(t.question_id)){if(t.answerMap=n[t.question_id],"analysis"===e){t.answerMap.user_coding_file&&(t.answerMap.oss_temp_url=t.answerMap.user_coding_file),t.score=t.answerMap.question_max_score;let e=Object.keys(t.answerMap),n=/^user_/gi;e.forEach((e=>{if(n.test(e)){let o=e.replace(n,"");t.answerMap[o]=t.answerMap[e]}}))}}else t.answerMap=null;let s=t.question_type;3==s?t.exam_options_data=[{index:1,data:{name:"正确"}},{index:2,data:{name:"错误"}}]:t.exam_options_data&&t.exam_options_data.length&&t.exam_options_data.forEach(((e,t)=>{e.enIndex=Ee.indexToEnIndex(t+1)}));try{let e=JSON.parse(t.content),n=jQuery(".question-list").width()-30;r(e,n),t.htmlContent=$.json2html({},e)}catch(a){t.htmlContent=t.content}try{t.analysis?t.analysisHtmlContent=$.json2html({},JSON.parse(t.analysis)):t.analysisHtmlContent=""}catch(a){t.analysisHtmlContent=t.analysis}t.sub_questions&&t.sub_questions.length&&this.parseQuestionListItem(e,t.sub_questions,n,i)}))}}}),e.component("Question_SingleChoice",qe),e.component("Question_MultipleChoice",mt),e.component("Question_Reading",St),e.component("Question_BriefAnswer",sn),e.component("Question_FillBlank",An),e.component("Question_Programming",cr)},Question_SingleChoice:qe,Question_MultipleChoice:mt,Question_Reading:St,Question_BriefAnswer:sn,Question_FillBlank:An,Question_Programming:cr}}var Br=kr}(),r}()}));
|
|
24
|
+
var po="store";function mo(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function go(e){return null!==e&&"object"===typeof e}function Ao(e){return e&&"function"===typeof e.then}function vo(e,t){return function(){return e(t)}}function yo(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 wo(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;Co(e,n,[],e._modules.root,!0),bo(e,n,t)}function bo(e,t,o){var r=e._state,i=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var s=e._wrappedGetters,a={},c={},u=(0,n.effectScope)(!0);u.run((function(){mo(s,(function(t,o){a[o]=vo(t,e),c[o]=(0,n.computed)((function(){return a[o]()})),Object.defineProperty(e.getters,o,{get:function(){return c[o].value},enumerable:!0})}))})),e._state=(0,n.reactive)({data:t}),e._scope=u,e.strict&&Mo(e),r&&o&&e._withCommit((function(){r.data=null})),i&&i.stop()}function Co(e,t,n,o,r){var i=!n.length,s=e._modules.getNamespace(n);if(o.namespaced&&(e._modulesNamespaceMap[s],e._modulesNamespaceMap[s]=o),!i&&!r){var a=So(t,n.slice(0,-1)),c=n[n.length-1];e._withCommit((function(){a[c]=o.state}))}var u=o.context=xo(e,s,n);o.forEachMutation((function(t,n){var o=s+n;Bo(e,o,t,u)})),o.forEachAction((function(t,n){var o=t.root?n:s+n,r=t.handler||t;Eo(e,o,r,u)})),o.forEachGetter((function(t,n){var o=s+n;Io(e,o,t,u)})),o.forEachChild((function(o,i){Co(e,t,n.concat(i),o,r)}))}function xo(e,t,n){var o=""===t,r={dispatch:o?e.dispatch:function(n,o,r){var i=Do(n,o,r),s=i.payload,a=i.options,c=i.type;return a&&a.root||(c=t+c),e.dispatch(c,s)},commit:o?e.commit:function(n,o,r){var i=Do(n,o,r),s=i.payload,a=i.options,c=i.type;a&&a.root||(c=t+c),e.commit(c,s,a)}};return Object.defineProperties(r,{getters:{get:o?function(){return e.getters}:function(){return ko(e,t)}},state:{get:function(){return So(e.state,n)}}}),r}function ko(e,t){if(!e._makeLocalGettersCache[t]){var n={},o=t.length;Object.keys(e.getters).forEach((function(r){if(r.slice(0,o)===t){var i=r.slice(o);Object.defineProperty(n,i,{get:function(){return e.getters[r]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function Bo(e,t,n,o){var r=e._mutations[t]||(e._mutations[t]=[]);r.push((function(t){n.call(e,o.state,t)}))}function Eo(e,t,n,o){var r=e._actions[t]||(e._actions[t]=[]);r.push((function(t){var r=n.call(e,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:e.getters,rootState:e.state},t);return Ao(r)||(r=Promise.resolve(r)),e._devtoolHook?r.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):r}))}function Io(e,t,n,o){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(e){return n(o.state,o.getters,e.state,e.getters)})}function Mo(e){(0,n.watch)((function(){return e._state.data}),(function(){0}),{deep:!0,flush:"sync"})}function So(e,t){return t.reduce((function(e,t){return e[t]}),e)}function Do(e,t,n){return go(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var Oo="vuex bindings",jo="vuex:mutations",qo="vuex:actions",No="vuex",_o=0;function Lo(e,t){ho({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:[Oo]},(function(n){n.addTimelineLayer({id:jo,label:"Vuex Mutations",color:Vo}),n.addTimelineLayer({id:qo,label:"Vuex Actions",color:Vo}),n.addInspector({id:No,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree((function(n){if(n.app===e&&n.inspectorId===No)if(n.filter){var o=[];zo(o,t._modules.root,n.filter,""),n.rootNodes=o}else n.rootNodes=[Uo(t._modules.root,"")]})),n.on.getInspectorState((function(n){if(n.app===e&&n.inspectorId===No){var o=n.nodeId;ko(t,o),n.state=Go(Ho(t._modules,o),"root"===o?t.getters:t._makeLocalGettersCache,o)}})),n.on.editInspectorState((function(n){if(n.app===e&&n.inspectorId===No){var o=n.nodeId,r=n.path;"root"!==o&&(r=o.split("/").filter(Boolean).concat(r)),t._withCommit((function(){n.set(t._state.data,r,n.state.value)}))}})),t.subscribe((function(e,t){var o={};e.payload&&(o.payload=e.payload),o.state=t,n.notifyComponentUpdate(),n.sendInspectorTree(No),n.sendInspectorState(No),n.addTimelineEvent({layerId:jo,event:{time:Date.now(),title:e.type,data:o}})})),t.subscribeAction({before:function(e,t){var o={};e.payload&&(o.payload=e.payload),e._id=_o++,e._time=Date.now(),o.state=t,n.addTimelineEvent({layerId:qo,event:{time:e._time,title:e.type,groupId:e._id,subtitle:"start",data:o}})},after:function(e,t){var o={},r=Date.now()-e._time;o.duration={_custom:{type:"duration",display:r+"ms",tooltip:"Action duration",value:r}},e.payload&&(o.payload=e.payload),o.state=t,n.addTimelineEvent({layerId:qo,event:{time:Date.now(),title:e.type,groupId:e._id,subtitle:"end",data:o}})}})}))}var Vo=8702998,To=6710886,Po=16777215,Qo={label:"namespaced",textColor:Po,backgroundColor:To};function Fo(e){return e&&"root"!==e?e.split("/").slice(-2,-1)[0]:"Root"}function Uo(e,t){return{id:t||"root",label:Fo(t),tags:e.namespaced?[Qo]:[],children:Object.keys(e._children).map((function(n){return Uo(e._children[n],t+n+"/")}))}}function zo(e,t,n,o){o.includes(n)&&e.push({id:o||"root",label:o.endsWith("/")?o.slice(0,o.length-1):o||"Root",tags:t.namespaced?[Qo]:[]}),Object.keys(t._children).forEach((function(r){zo(e,t._children[r],n,o+r+"/")}))}function Go(e,t,n){t="root"===n?t:t[n];var o=Object.keys(t),r={state:Object.keys(e.state).map((function(t){return{key:t,editable:!0,value:e.state[t]}}))};if(o.length){var i=Ro(t);r.getters=Object.keys(i).map((function(e){return{key:e.endsWith("/")?Fo(e):e,editable:!1,value:Yo((function(){return i[e]}))}}))}return r}function Ro(e){var t={};return Object.keys(e).forEach((function(n){var o=n.split("/");if(o.length>1){var r=t,i=o.pop();o.forEach((function(e){r[e]||(r[e]={_custom:{value:{},display:e,tooltip:"Module",abstract:!0}}),r=r[e]._custom.value})),r[i]=Yo((function(){return e[n]}))}else t[n]=Yo((function(){return e[n]}))})),t}function Ho(e,t){var n=t.split("/").filter((function(e){return e}));return n.reduce((function(e,o,r){var i=e[o];if(!i)throw new Error('Missing module "'+o+'" for path "'+t+'".');return r===n.length-1?i:i._children}),"root"===t?e:e.root._children)}function Yo(e){try{return e()}catch(t){return t}}var Ko=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)||{}},Wo={namespaced:{configurable:!0}};Wo.namespaced.get=function(){return!!this._rawModule.namespaced},Ko.prototype.addChild=function(e,t){this._children[e]=t},Ko.prototype.removeChild=function(e){delete this._children[e]},Ko.prototype.getChild=function(e){return this._children[e]},Ko.prototype.hasChild=function(e){return e in this._children},Ko.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)},Ko.prototype.forEachChild=function(e){mo(this._children,e)},Ko.prototype.forEachGetter=function(e){this._rawModule.getters&&mo(this._rawModule.getters,e)},Ko.prototype.forEachAction=function(e){this._rawModule.actions&&mo(this._rawModule.actions,e)},Ko.prototype.forEachMutation=function(e){this._rawModule.mutations&&mo(this._rawModule.mutations,e)},Object.defineProperties(Ko.prototype,Wo);var Xo=function(e){this.register([],e,!1)};function Jo(e,t,n){if(t.update(n),n.modules)for(var o in n.modules){if(!t.getChild(o))return void 0;Jo(e.concat(o),t.getChild(o),n.modules[o])}}Xo.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},Xo.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return t=t.getChild(n),e+(t.namespaced?n+"/":"")}),"")},Xo.prototype.update=function(e){Jo([],this.root,e)},Xo.prototype.register=function(e,t,n){var o=this;void 0===n&&(n=!0);var r=new Ko(t,n);if(0===e.length)this.root=r;else{var i=this.get(e.slice(0,-1));i.addChild(e[e.length-1],r)}t.modules&&mo(t.modules,(function(t,r){o.register(e.concat(r),t,n)}))},Xo.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],o=t.getChild(n);o&&o.runtime&&t.removeChild(n)},Xo.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var Zo=function(e){var t=this;void 0===e&&(e={});var n=e.plugins;void 0===n&&(n=[]);var o=e.strict;void 0===o&&(o=!1);var r=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 Xo(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=r;var i=this,s=this,a=s.dispatch,c=s.commit;this.dispatch=function(e,t){return a.call(i,e,t)},this.commit=function(e,t,n){return c.call(i,e,t,n)},this.strict=o;var u=this._modules.root.state;Co(this,u,[],this._modules.root),bo(this,u),n.forEach((function(e){return e(t)}))},$o={state:{configurable:!0}};Zo.prototype.install=function(e,t){e.provide(t||po,this),e.config.globalProperties.$store=this;var n=void 0!==this._devtools&&this._devtools;n&&Lo(e,this)},$o.state.get=function(){return this._state.data},$o.state.set=function(e){0},Zo.prototype.commit=function(e,t,n){var o=this,r=Do(e,t,n),i=r.type,s=r.payload,a=(r.options,{type:i,payload:s}),c=this._mutations[i];c&&(this._withCommit((function(){c.forEach((function(e){e(s)}))})),this._subscribers.slice().forEach((function(e){return e(a,o.state)})))},Zo.prototype.dispatch=function(e,t){var n=this,o=Do(e,t),r=o.type,i=o.payload,s={type:r,payload:i},a=this._actions[r];if(a){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(s,n.state)}))}catch(u){0}var c=a.length>1?Promise.all(a.map((function(e){return e(i)}))):a[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(s,n.state)}))}catch(u){0}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(s,n.state,e)}))}catch(u){0}t(e)}))}))}},Zo.prototype.subscribe=function(e,t){return yo(e,this._subscribers,t)},Zo.prototype.subscribeAction=function(e,t){var n="function"===typeof e?{before:e}:e;return yo(n,this._actionSubscribers,t)},Zo.prototype.watch=function(e,t,o){var r=this;return(0,n.watch)((function(){return e(r.state,r.getters)}),t,Object.assign({},o))},Zo.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._state.data=e}))},Zo.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"===typeof e&&(e=[e]),this._modules.register(e,t),Co(this,this.state,e,this._modules.get(e),n.preserveState),bo(this,this.state)},Zo.prototype.unregisterModule=function(e){var t=this;"string"===typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var n=So(t.state,e.slice(0,-1));delete n[e[e.length-1]]})),wo(this)},Zo.prototype.hasModule=function(e){return"string"===typeof e&&(e=[e]),this._modules.isRegistered(e)},Zo.prototype.hotUpdate=function(e){this._modules.update(e),wo(this,!0)},Zo.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(Zo.prototype,$o);var er=rr((function(e,t){var n={};return nr(t).forEach((function(t){var o=t.key,r=t.val;n[o]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var o=ir(this.$store,"mapState",e);if(!o)return;t=o.context.state,n=o.context.getters}return"function"===typeof r?r.call(this,t,n):t[r]},n[o].vuex=!0})),n})),tr=(rr((function(e,t){var n={};return nr(t).forEach((function(t){var o=t.key,r=t.val;n[o]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var o=this.$store.commit;if(e){var i=ir(this.$store,"mapMutations",e);if(!i)return;o=i.context.commit}return"function"===typeof r?r.apply(this,[o].concat(t)):o.apply(this.$store,[r].concat(t))}})),n})),rr((function(e,t){var n={};return nr(t).forEach((function(t){var o=t.key,r=t.val;r=e+r,n[o]=function(){if(!e||ir(this.$store,"mapGetters",e))return this.$store.getters[r]},n[o].vuex=!0})),n})),rr((function(e,t){var n={};return nr(t).forEach((function(t){var o=t.key,r=t.val;n[o]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var o=this.$store.dispatch;if(e){var i=ir(this.$store,"mapActions",e);if(!i)return;o=i.context.dispatch}return"function"===typeof r?r.apply(this,[o].concat(t)):o.apply(this.$store,[r].concat(t))}})),n})));function nr(e){return or(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 or(e){return Array.isArray(e)||go(e)}function rr(e){return function(t,n){return"string"!==typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function ir(e,t,n){var o=e._modulesNamespaceMap[n];return o}var sr={name:"Question_Programming",props:{isEnterCodeByInit:{type:Boolean,default:!1},urlQuery:{type:String,default:""},isSub:{type:Boolean,default:!1},questionInfo:{type:Object,default:{}},bus:{type:Object,default:{}},mode:{type:String,default:"exam"}},mounted(){N(this),this.$watch("oss_temp_url",(e=>{if(e){let e=this.isAnswered();this.$emit("getIsAnswered",e),"exam"===this.mode&&this.bus.$emit("questionCardChange",{questionIndex:this.questionInfo.questionIndex-1,answered:e})}}),{immediate:!0})},created(){this.isEnterCodeByInit&&(this.oss_temp_url?this.startCode("2"):this.startCode("1"))},data(){return{iframe:null,showFrame:!1,analyCorrectAnswer:"",iframeUrl:"",code_file_oss_temp_path:"",oss_temp_url:"",scratch_answer_json:"",loading:!1,enterCode:!1,codeTypeMap:{1:"Scratch",2:"Python",3:"PyGame",4:"C++"},codeTypeImgMap:{1:o(3031),2:o(3843),3:o(6543),4:o(2657)},answerMap:{},...JSON.parse(q)}},watch:{questionInfo:{handler(e,t){if(e){this.answerMap=e.answerMap;let t=e.answerMap;t&&(this.code_file_oss_temp_path=t.code_file_oss_temp_path,this.oss_temp_url=t.oss_temp_url)}},immediate:!0}},computed:{...er("zykjcommonQuestions",["pythonCodeWebPath","scratchCodeWebPath","cplusCodeWebPath"])},methods:{...tr("zykjcommonQuestions",["getEditorUrlActions"]),getAnswer(){return{code_file_oss_temp_path:this.code_file_oss_temp_path,oss_temp_url:this.oss_temp_url,scratch_answer_json:this.scratch_answer_json}},isAnswered(){let e=""!==this.oss_temp_url;return e},isCorrect(){let e="1"===this.questionInfo.answerMap.is_correct;return e},getCodeWebPath(e){this.pythonCodeWebPath||this.scratchCodeWebPath||this.cplusCodeWebPath?e&&e():(this.loading=!0,this.getEditorUrlActions().then((()=>{this.loading=!1,e&&e()}),(()=>{this.loading=!1})))},startCode(e){let t=this;this.loading||(this.getCodeWebPath((function(){let n={1:t.questionInfo.template_file_full_url,2:t.oss_temp_url,3:t.oss_temp_url,4:t.questionInfo.reference_file_full_url},o="",r=t.questionInfo.code_type,i=n[e],s=t.urlQuery+`&codeUrl=${i}`;switch(r){case 1:o=`${t.scratchCodeWebPath}/?${s}`;break;case 2:o=`${t.pythonCodeWebPath}/?${s}`;break;case 3:o=`${t.pythonCodeWebPath}/?${s}&pygame=true`;break;case 4:o=`${t.cplusCodeWebPath}/?${s}`;break}t.iframeUrl=o})),this.showFrame=!0)},getQuestionInfo(){let e=this,t={type:"getQuestionInfo",data:e.questionInfo.htmlContent};this.iframe&&this.iframe.contentWindow.postMessage(JSON.stringify(t),"*")},submitCodeQuestionByTimeover(){let e={type:"submitCodeQuestionByTimeover"};this.iframe&&this.iframe.contentWindow.postMessage(JSON.stringify(e),"*")},iframeLoaded(e){this.iframe=e,this.enterCode=!0,this.bus.$emit("enterCode",!0)},closeIframe(){this.enterCode=!1,this.bus.$emit("enterCode",!1),this.showFrame=!1},closeAndSave(e){this.saveCodeOnly(e),this.isEnterCodeByInit||this.closeIframe(),this.$emit("closeAndSave",e)},saveCodeOnly(e){let t=this;this.code_file_oss_temp_path=e.codeFileOssTempPath,this.oss_temp_url=e.ossTempUrl,this.scratch_answer_json=e.scratch_answer_json,this.bus.$emit("submitQuestion",{saveType:1,submitRequestAutoQuit:!1,needSubmitRequest:!1});let n=this.isAnswered();"exam"===this.mode&&this.bus.$emit("questionCardChange",{questionIndex:t.questionInfo.questionIndex-1,answered:n}),this.$emit("saveCodeOnly",e)},uploadCodingFileSuccess(e){this.code_file_oss_temp_path=e.codeFileOssTempPath,this.oss_temp_url=e.ossTempUrl,this.scratch_answer_json=e.scratch_answer_json,this.bus.$emit("uploadCodingFileSuccess")}},components:{IframeComponent:to,MediaLooker:De,Loading:Zn}};const ar=(0,Me.Z)(sr,[["render",Un]]);var cr=ar;let ur={1:"Question_SingleChoice",2:"Question_MultipleChoice",3:"Question_SingleChoice",7:"Question_BriefAnswer",16:"Question_Programming",11:"Question_Reading",4:"Question_FillBlank"};var lr=o(1354),dr=o(9669),fr=o.n(dr),hr=o(7631),pr=o.n(hr);let mr="piw38kulfozrea7ydmjnvbc965q1gt2x",gr=function(e,t,n,o){void 0!=n&&"undefined"!==typeof n["password"]&&(n["password"]=pr().hex_md5(pr().hex_md5(n["password"]+"FE605C9343A3A47764598FDC184EC66F").toUpperCase()+"FE605C9343A3A47764598FDC184EC66F").toUpperCase());let r=e+"\n/student-web"+t+"\n"+o+"\n"+(n?JSON.stringify(n):""),i=lr.enc.Base64.stringify((0,lr.HmacSHA256)(r,mr)),s=function(e){let t=e.replace(/\+/g,"-");t=t.replace(/\//g,"_");let n=t.length%4,o="====";return t+=o.substring(0,n),t};return s(i)};fr().defaults.baseURL="https://jsl-api.thedeer.cn/student-web/",fr().defaults.timeout=6e4,fr().defaults.withCredentials=!0;let Ar=(e,t)=>{if(t&&-1!=t["Content-Type"].indexOf("multipart/form-data")){let t=new FormData;for(let n in e)t.append(n,e[n]);return t}return JSON.stringify(e)},vr=e=>{e=JSON.parse(e),e.hasOwnProperty("errorCode")&&(e.error_code=e.errorCode);let{error_code:t,message:n}=e;if(t){let e=[39002,39003];if(e.indexOf(t)<=-1){let e=n||"系统异常";Ee.messageTip("warning",e)}}return e};function yr(e,t,n,o,r){let i,s;e=e.toUpperCase(),t+=0===n.indexOf("/")?n.substr(1):n;let a=window.isMock;"undefined"!==typeof r&&"undefined"!==typeof r.isMock&&(a=r.isMock,delete r.isMock),a&&r&&r.onUploadProgress&&delete r.onUploadProgress;let c=n;"/"!==n[0]&&(c="/"+n);let u=(new Date).getTime(),l={ts:u,sign:gr(e,c,o,u),token:Ee.getToken()};switch(e){case"Get":s=o||{};break;default:case"POST":i=o||{},l["Content-Type"]=r&&r.contentType?r.contentType:"application/json";break}return t instanceof Array?fr().all([]).then(fr().spread((function(){}))):fr()(Object.assign({headers:l,method:e,url:t,data:i,params:s,transformRequest:Ar,transformResponse:vr},r)).then((e=>e.data)).catch((e=>(console.log("服务端请求/响应错误:",e,e.config),Promise.reject(e))))}const wr=(e,t,n)=>yr("GET","",e,t,n);let br={editorUrl:"/open/editor-url"};const Cr={pythonCodeWebPath:"",scratchCodeWebPath:"",cplusCodeWebPath:""};var xr={namespaced:!0,state:Cr,getters:{},mutations:{setCodeWebPath(e,t){e.pythonCodeWebPath=t.pythonCodeWebPath,e.scratchCodeWebPath=t.scratchCodeWebPath,e.cplusCodeWebPath=t.cplusCodeWebPath}},actions:{getEditorUrlActions({commit:e,dispatch:t}){return new Promise(((t,n)=>{wr(`${br.editorUrl}`).then((n=>{let{error_code:o,data:r}=n;if(!o){let{pythonCodeWebPath:t,scratchCodeWebPath:n,cplusCodeWebPath:o}=r;e("setCodeWebPath",{pythonCodeWebPath:t,scratchCodeWebPath:n,cplusCodeWebPath:o})}t(n)}),(e=>{n(e)}))}))}}};function kr(e){return e.registerModule("zykjcommonQuestions",xr),{install(e){Ee.getVueVersion();e.mixin({methods:{parseQuestionListItem(e,t,n,o=void 0){function r(e,t){e.forEach((e=>{if("img"===e["<>"]&&e.hasOwnProperty("width")){let n=Number(e.width);n>t&&(e.width=Math.floor(t),e.height&&delete e.height)}e.html&&e.html.length&&r(e.html,t)}))}t.forEach(((t,i)=>{if(t.questionComponent=ur[t.question_type],void 0===o?t.questionIndex=i+1:(t.questionIndex=o+1+"-"+(i+1),t.questionIndex2=i+1),n&&n.hasOwnProperty(t.question_id)){if(t.answerMap=n[t.question_id],"analysis"===e){t.answerMap.user_coding_file&&(t.answerMap.oss_temp_url=t.answerMap.user_coding_file),t.score=t.answerMap.question_max_score;let e=Object.keys(t.answerMap),n=/^user_/gi;e.forEach((e=>{if(n.test(e)){let o=e.replace(n,"");t.answerMap[o]=t.answerMap[e]}}))}}else t.answerMap=null;let s=t.question_type;3==s?t.exam_options_data=[{index:1,data:{name:"正确"}},{index:2,data:{name:"错误"}}]:t.exam_options_data&&t.exam_options_data.length&&t.exam_options_data.forEach(((e,t)=>{e.enIndex=Ee.indexToEnIndex(t+1)}));try{let e=JSON.parse(t.content),n=jQuery(".question-list").width()-30;r(e,n),t.htmlContent=$.json2html({},e)}catch(a){t.htmlContent=t.content}try{t.analysis?t.analysisHtmlContent=$.json2html({},JSON.parse(t.analysis)):t.analysisHtmlContent=""}catch(a){t.analysisHtmlContent=t.analysis}t.sub_questions&&t.sub_questions.length&&this.parseQuestionListItem(e,t.sub_questions,n,i)}))}}}),e.component("Question_SingleChoice",qe),e.component("Question_MultipleChoice",mt),e.component("Question_Reading",St),e.component("Question_BriefAnswer",sn),e.component("Question_FillBlank",An),e.component("Question_Programming",cr)},Question_SingleChoice:qe,Question_MultipleChoice:mt,Question_Reading:St,Question_BriefAnswer:sn,Question_FillBlank:An,Question_Programming:cr}}var Br=kr}(),r}()}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zykjcommon/questions",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"main": "src/components/questions/entry.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"serve": "vue-cli-service serve",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"build:lib": "vue-cli-service build --target lib src/components/questions/buildEntry.js --name zykjcommon-questions"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@zykjcommon/questions": "^0.0.
|
|
15
|
+
"@zykjcommon/questions": "^0.0.16",
|
|
16
16
|
"alife-logger": "^1.8.30",
|
|
17
17
|
"axios": "^0.26.0",
|
|
18
18
|
"cookie": "^0.4.1",
|
package/src/assets/js/http.js
CHANGED
|
@@ -50,7 +50,7 @@ let createSign = function(method, URL, param, ClientTimestamp) {
|
|
|
50
50
|
/**
|
|
51
51
|
* 全局默认配置
|
|
52
52
|
*/
|
|
53
|
-
Axios.defaults.baseURL = process.env.
|
|
53
|
+
Axios.defaults.baseURL = process.env.VUE_APP_QUESTIONS_SERVER;
|
|
54
54
|
Axios.defaults.timeout = 60000;
|
|
55
55
|
Axios.defaults.withCredentials = true;
|
|
56
56
|
let transformRequest = (req, headers) => {
|
|
@@ -80,6 +80,10 @@ import {mapActions, mapState} from "vuex";
|
|
|
80
80
|
export default {
|
|
81
81
|
name: 'Question_Programming',
|
|
82
82
|
props: {
|
|
83
|
+
isEnterCodeByInit:{
|
|
84
|
+
type: Boolean,
|
|
85
|
+
default: false
|
|
86
|
+
},
|
|
83
87
|
urlQuery:{
|
|
84
88
|
type: String,
|
|
85
89
|
default: ''
|
|
@@ -116,6 +120,16 @@ export default {
|
|
|
116
120
|
immediate:true
|
|
117
121
|
})
|
|
118
122
|
},
|
|
123
|
+
created() {
|
|
124
|
+
//设置了后无需点击按钮直接进入编辑器
|
|
125
|
+
if(this.isEnterCodeByInit){
|
|
126
|
+
if(this.oss_temp_url){
|
|
127
|
+
this.startCode('2')
|
|
128
|
+
}else{
|
|
129
|
+
this.startCode('1')
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
119
133
|
data() {
|
|
120
134
|
return {
|
|
121
135
|
iframe:null,
|
|
@@ -253,8 +267,10 @@ export default {
|
|
|
253
267
|
//关闭iframe并且保存(考试中)
|
|
254
268
|
closeAndSave(res){
|
|
255
269
|
this.saveCodeOnly(res)
|
|
256
|
-
this.
|
|
257
|
-
|
|
270
|
+
if(!this.isEnterCodeByInit){
|
|
271
|
+
this.closeIframe()
|
|
272
|
+
}
|
|
273
|
+
this.$emit('closeAndSave',res)
|
|
258
274
|
},
|
|
259
275
|
saveCodeOnly(res){
|
|
260
276
|
let self = this
|
|
@@ -267,7 +283,7 @@ export default {
|
|
|
267
283
|
questionIndex:self.questionInfo.questionIndex - 1,
|
|
268
284
|
answered
|
|
269
285
|
})
|
|
270
|
-
this.$emit('saveCodeOnly')
|
|
286
|
+
this.$emit('saveCodeOnly',res)
|
|
271
287
|
},
|
|
272
288
|
uploadCodingFileSuccess(res){
|
|
273
289
|
this.code_file_oss_temp_path = res.codeFileOssTempPath
|