Auto Submit

dev_local_v9_haijunshiguan_net
autosubmit 2 years ago
parent 74f2aee161
commit 53ffc3b2b2

@ -27,7 +27,7 @@
display: block !important;
}
</style><script>if(document.domain !== "www.educoder.net") document.title = '';</script>
<script src="/react/build/umi.14b29fec.js"></script>
<script src="/react/build/umi.c05e0de5.js"></script>
<script src="/react/build/js/public.js"></script>
</body>
</html>

@ -1544,6 +1544,9 @@ __webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ Detail_Answer; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectDestructuringEmpty.js
var objectDestructuringEmpty = __webpack_require__(70236);
var objectDestructuringEmpty_default = /*#__PURE__*/__webpack_require__.n(objectDestructuringEmpty);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(82242);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
@ -1572,26 +1575,26 @@ var modal = __webpack_require__(43418);
var message = __webpack_require__(8591);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/radio/index.js + 5 modules
var es_radio = __webpack_require__(5112);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
var es_button = __webpack_require__(3113);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/index.js + 3 modules
var es_checkbox = __webpack_require__(24905);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
var row = __webpack_require__(95237);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
var col = __webpack_require__(43604);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/index.js + 3 modules
var es_checkbox = __webpack_require__(24905);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules
var spin = __webpack_require__(71418);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/progress/index.js + 13 modules
var progress = __webpack_require__(93948);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(6848);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
var es_button = __webpack_require__(3113);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.6@@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules
var ExclamationCircleOutlined = __webpack_require__(23717);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.6@@ant-design/icons/es/icons/MinusSquareOutlined.js + 1 modules
var MinusSquareOutlined = __webpack_require__(4917);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.6@@ant-design/icons/es/icons/PlusSquareOutlined.js + 1 modules
var PlusSquareOutlined = __webpack_require__(20614);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.6@@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules
var ExclamationCircleOutlined = __webpack_require__(23717);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.24.4@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(24931);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/LogoutOutlined.js
@ -3093,6 +3096,7 @@ var NoData = __webpack_require__(55635);
var _excluded = ["globalSetting", "loading", "user", "exercise", "dispatch"];
@ -3835,104 +3839,16 @@ var Answer = function Answer(_ref) {
}, index);
})
})
}), (item === null || item === void 0 ? void 0 : item.standard_answer_show) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
fontSize: '16px',
marginBottom: 14,
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: ["\u7B54\u9898\u7ED3\u679C", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
marginLeft: 12,
color: item !== null && item !== void 0 && item.user_answer_right ? '#29A64F' : '#E53333'
},
children: item !== null && item !== void 0 && item.user_answer_right ? "\u7B54\u5BF9\u4E86" : "\u7B54\u9519\u4E86"
})]
}), (item === null || item === void 0 ? void 0 : item.show_recommend) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
cursor: 'pointer',
color: '#3061D0',
fontSize: '14px'
},
onClick: function onClick() {
_setKnowledgeDialog(true);
},
children: ["\u4E3A\u4F60\u63A8\u8350\u540C\u77E5\u8BC6\u70B9\u9898\u76EE\uFF0C\u7ACB\u5373\u5DE9\u56FA", " >"]
})]
}), (item === null || item === void 0 ? void 0 : item.can_answer_num) > 0 && (item === null || item === void 0 ? void 0 : item.user_score) != (item === null || item === void 0 ? void 0 : item.question_score) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
color: '#FF8C29',
marginBottom: 14
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ExclamationCircleOutlined/* default */.Z, {
style: {
marginRight: 10
}
}), "\u6E29\u99A8\u63D0\u793A\uFF1A\u8FD8\u6709 ", item === null || item === void 0 ? void 0 : item.can_answer_num, " \u6B21\u673A\u4F1A\u53EF\u5C1D\u8BD5\u8FDB\u884C\u91CD\u65B0\u7B54\u9898\uFF0C\u91CD\u65B0\u7B54\u9898\u6B63\u786E\u540E\u4E5F\u4F1A\u8BA1\u5165\u603B\u6210\u7EE9\u3002"]
}), ((item === null || item === void 0 ? void 0 : item.can_answer_num) == 0 || (item === null || item === void 0 ? void 0 : item.user_score) == item.question_score || knowledgeDialog) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Answermodules.analysisWrap,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Answermodules.greyBg,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
className: "mb20",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
className: "font14 mr10",
style: {
color: '#6A7283',
lineHeight: '30px'
},
children: "\u3010\u7B54\u6848\u3011"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
style: {
fontSize: 16,
lineHeight: '30px'
},
children: item === null || item === void 0 ? void 0 : item.standard_answer_show
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font14 mr10 mb20",
style: {
color: '#6A7283',
lineHeight: '30px'
},
children: "\u3010\u89E3\u6790\u3011"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
className: Answermodules.renderHtml,
value: item === null || item === void 0 ? void 0 : item.analysis
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font14 mr10",
style: {
color: '#6A7283',
lineHeight: '30px'
},
children: "\u3010\u77E5\u8BC6\u70B9\u3011"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
style: {
fontSize: 16,
lineHeight: '30px'
},
children: item === null || item === void 0 ? void 0 : item.tag_disciplines
})]
})]
})
})]
}), (item === null || item === void 0 ? void 0 : item.standard_answer_show) && /*#__PURE__*/(0,jsx_runtime.jsx)(AnswerDetail, {
item: item
})]
});
};
var renderSingles = function renderSingles(items, keys, i) {
var _items$standard_answe, _items$sub_exercise_q4;
var disabled = (items === null || items === void 0 || (_items$standard_answe = items.standard_answer) === null || _items$standard_answe === void 0 ? void 0 : _items$standard_answe.length) > 0 && ((items === null || items === void 0 ? void 0 : items.can_answer_num) == 0 || !showBtn) || (items === null || items === void 0 ? void 0 : items.user_answer_right) && !showBtn;
var answerText = '';
var _items$sub_exercise_q4;
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: items === null || items === void 0 || (_items$sub_exercise_q4 = items.sub_exercise_questions) === null || _items$sub_exercise_q4 === void 0 ? void 0 : _items$sub_exercise_q4.map(function (item, key) {
var _item$user_answer2, _item$question_choice3;
var _item$standard_answer2, _item$user_answer2, _item$question_choice3;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(Answermodules.baseMargin, " ").concat(Answermodules.singleItem, " mb20"),
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
@ -3963,11 +3879,10 @@ var Answer = function Answer(_ref) {
style: {
marginLeft: 66
},
disabled: disabled,
disabled: (item === null || item === void 0 || (_item$standard_answer2 = item.standard_answer) === null || _item$standard_answer2 === void 0 ? void 0 : _item$standard_answer2.length) > 0 && ((item === null || item === void 0 ? void 0 : item.can_answer_num) == 0 || !showBtn) || (item === null || item === void 0 ? void 0 : item.user_answer_right),
defaultValue: item === null || item === void 0 || (_item$user_answer2 = item.user_answer) === null || _item$user_answer2 === void 0 ? void 0 : _item$user_answer2[0],
onChange: function onChange(e) {
handleChangeSingles(e.target.value, items === null || items === void 0 ? void 0 : items.question_id, key, item, items);
setShowConfirm(true);
},
className: setClassName(item, 'radio'),
children: item === null || item === void 0 || (_item$question_choice3 = item.question_choices) === null || _item$question_choice3 === void 0 ? void 0 : _item$question_choice3.map(function (answer, index) {
@ -3994,33 +3909,44 @@ var Answer = function Answer(_ref) {
})
}, index);
})
}), (item === null || item === void 0 ? void 0 : item.standard_answer_show) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Answermodules.analysisWrap,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Answermodules.greyBg,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
className: "mb20",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
className: "font14 mr10",
style: {
color: '#6A7283'
},
children: "\u3010\u7B54\u6848\u3011"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
children: answerText
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font14 mr10",
style: {
color: '#6A7283'
},
children: "\u3010\u89E3\u6790\u3011"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
className: Answermodules.renderHtml,
value: item === null || item === void 0 ? void 0 : item.analysis
})]
})]
}), (item === null || item === void 0 ? void 0 : item.standard_answer_show) && /*#__PURE__*/(0,jsx_runtime.jsx)(AnswerDetail, {
item: item
}), (item === null || item === void 0 ? void 0 : item.can_answer_num) > 0 && (item === null || item === void 0 ? void 0 : item.user_score) != (item === null || item === void 0 ? void 0 : item.question_score) && !(item !== null && item !== void 0 && item.user_answer_right) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
display: 'flex',
justifyContent: 'flex-end'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
className: "".concat(Answermodules.changeButton, " ml20"),
type: "primary",
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee11() {
var paramsData, res;
return regeneratorRuntime_default()().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
paramsData = {
questionId: item === null || item === void 0 ? void 0 : item.question_id,
exercise_choice_id: item === null || item === void 0 ? void 0 : item.user_answer
};
_context11.next = 3;
return (0,fetch/* default */.ZP)("/api/exercise_questions/".concat(item === null || item === void 0 ? void 0 : item.question_id, "/exercise_answers/subject_exercise_answer.json"), {
method: 'POST',
body: paramsData
});
case 3:
res = _context11.sent;
if (res.status == 0) {
setShowConfirm(false);
initData();
signConfigFuc();
}
case 5:
case "end":
return _context11.stop();
}
}, _callee11);
})),
children: "\u786E\u5B9A"
})
})]
}, key);
@ -4028,13 +3954,13 @@ var Answer = function Answer(_ref) {
});
};
var renderMultiple = function renderMultiple(item, key) {
var _item$question_choice4, _item$standard_answer2, _item$question_choice5;
var _item$question_choice4, _item$standard_answer3, _item$question_choice5;
var userAnswer = (item === null || item === void 0 || (_item$question_choice4 = item.question_choices) === null || _item$question_choice4 === void 0 ? void 0 : _item$question_choice4.filter(function (choice) {
return choice.user_answer_boolean;
}).map(function (choice) {
return choice.choice_id;
})) || [];
var disabled = (item === null || item === void 0 || (_item$standard_answer2 = item.standard_answer) === null || _item$standard_answer2 === void 0 ? void 0 : _item$standard_answer2.length) > 0 && ((item === null || item === void 0 ? void 0 : item.can_answer_num) == 0 || !showBtn) || (item === null || item === void 0 ? void 0 : item.user_answer_right) && !showBtn;
var disabled = (item === null || item === void 0 || (_item$standard_answer3 = item.standard_answer) === null || _item$standard_answer3 === void 0 ? void 0 : _item$standard_answer3.length) > 0 && ((item === null || item === void 0 ? void 0 : item.can_answer_num) == 0 || !showBtn) || (item === null || item === void 0 ? void 0 : item.user_answer_right) && !showBtn;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Answermodules.baseMargin,
@ -4068,94 +3994,8 @@ var Answer = function Answer(_ref) {
});
})
})
}), (item === null || item === void 0 ? void 0 : item.standard_answer_show) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
fontSize: '16px',
marginBottom: 14,
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: ["\u7B54\u9898\u7ED3\u679C", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
marginLeft: 12,
color: item !== null && item !== void 0 && item.user_answer_right ? '#29A64F' : '#E53333'
},
children: item !== null && item !== void 0 && item.user_answer_right ? "\u7B54\u5BF9\u4E86" : "\u7B54\u9519\u4E86"
})]
}), (item === null || item === void 0 ? void 0 : item.show_recommend) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
cursor: 'pointer',
color: '#3061D0',
fontSize: '14px'
},
onClick: function onClick() {
_setKnowledgeDialog(true);
},
children: ["\u4E3A\u4F60\u63A8\u8350\u540C\u77E5\u8BC6\u70B9\u9898\u76EE\uFF0C\u7ACB\u5373\u5DE9\u56FA", " >"]
})]
}), (item === null || item === void 0 ? void 0 : item.can_answer_num) > 0 && (item === null || item === void 0 ? void 0 : item.user_score) != (item === null || item === void 0 ? void 0 : item.question_score) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
color: '#FF8C29',
marginBottom: 14
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ExclamationCircleOutlined/* default */.Z, {
style: {
marginRight: 10
}
}), "\u6E29\u99A8\u63D0\u793A\uFF1A\u8FD8\u6709 ", item === null || item === void 0 ? void 0 : item.can_answer_num, " \u6B21\u673A\u4F1A\u53EF\u5C1D\u8BD5\u8FDB\u884C\u91CD\u65B0\u7B54\u9898\uFF0C\u91CD\u65B0\u7B54\u9898\u6B63\u786E\u540E\u4E5F\u4F1A\u8BA1\u5165\u603B\u6210\u7EE9\u3002"]
}), ((item === null || item === void 0 ? void 0 : item.can_answer_num) == 0 || (item === null || item === void 0 ? void 0 : item.user_score) == item.question_score || knowledgeDialog) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Answermodules.analysisWrap,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Answermodules.greyBg,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
className: "mb20",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
className: "font14 mr10",
style: {
color: '#6A7283',
lineHeight: '30px'
},
children: "\u3010\u7B54\u6848\u3011"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
style: {
fontSize: 16,
lineHeight: '30px'
},
children: item === null || item === void 0 ? void 0 : item.standard_answer_show
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font14 mr10 mb20",
style: {
color: '#6A7283',
lineHeight: '30px'
},
children: "\u3010\u89E3\u6790\u3011"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
className: Answermodules.renderHtml,
value: item === null || item === void 0 ? void 0 : item.analysis
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font14 mr10",
style: {
color: '#6A7283',
lineHeight: '30px'
},
children: "\u3010\u77E5\u8BC6\u70B9\u3011"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
style: {
fontSize: 16,
lineHeight: '30px'
},
children: item === null || item === void 0 ? void 0 : item.tag_disciplines
})]
})]
})
})]
}), (item === null || item === void 0 ? void 0 : item.standard_answer_show) && /*#__PURE__*/(0,jsx_runtime.jsx)(AnswerDetail, {
item: item
})]
});
};
@ -4170,22 +4010,22 @@ var Answer = function Answer(_ref) {
return _setKnowledgeDialog(true);
},
onBlur: ( /*#__PURE__*/function () {
var _ref10 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee11(value, index, userAnswer) {
return regeneratorRuntime_default()().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
var _ref11 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee12(value, index, userAnswer) {
return regeneratorRuntime_default()().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
_context11.next = 2;
_context12.next = 2;
return handleBlurFill(value, index, item === null || item === void 0 ? void 0 : item.question_id, userAnswer, item);
case 2:
return _context11.abrupt("return", _context11.sent);
return _context12.abrupt("return", _context12.sent);
case 3:
case "end":
return _context11.stop();
return _context12.stop();
}
}, _callee11);
}, _callee12);
}));
return function (_x20, _x21, _x22) {
return _ref10.apply(this, arguments);
return _ref11.apply(this, arguments);
};
}())
});
@ -4240,22 +4080,22 @@ var Answer = function Answer(_ref) {
item: item,
answerData: answerData,
onBlur: ( /*#__PURE__*/function () {
var _ref11 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee12(value, index, userAnswer) {
return regeneratorRuntime_default()().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
var _ref12 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee13(value, index, userAnswer) {
return regeneratorRuntime_default()().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
_context12.next = 2;
_context13.next = 2;
return handleBlurBProgram(value, index, item === null || item === void 0 ? void 0 : item.question_id, userAnswer, item);
case 2:
return _context12.abrupt("return", _context12.sent);
return _context13.abrupt("return", _context13.sent);
case 3:
case "end":
return _context12.stop();
return _context13.stop();
}
}, _callee12);
}, _callee13);
}));
return function (_x23, _x24, _x25) {
return _ref11.apply(this, arguments);
return _ref12.apply(this, arguments);
};
}())
});
@ -4396,19 +4236,19 @@ var Answer = function Answer(_ref) {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AsyncButton/* AsyncButton */.Z, {
type: "primary",
className: Answermodules.toIframeBtn,
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee13() {
return regeneratorRuntime_default()().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee14() {
return regeneratorRuntime_default()().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
_context13.next = 2;
_context14.next = 2;
return handleJoinShixun(item);
case 2:
return _context13.abrupt("return", _context13.sent);
return _context14.abrupt("return", _context14.sent);
case 3:
case "end":
return _context13.stop();
return _context14.stop();
}
}, _callee13);
}, _callee14);
})),
children: "\u8FDB\u5165\u7B54\u9898"
})
@ -4516,6 +4356,102 @@ var Answer = function Answer(_ref) {
});
};
// 回答结果详情
var AnswerDetail = function AnswerDetail(_ref14) {
var props = Object.assign({}, (objectDestructuringEmpty_default()(_ref14), _ref14));
var item = props === null || props === void 0 ? void 0 : props.item;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "mb10",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
fontSize: '16px',
marginBottom: 14,
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: ["\u7B54\u9898\u7ED3\u679C", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
marginLeft: 12,
color: item !== null && item !== void 0 && item.user_answer_right ? '#29A64F' : '#E53333'
},
children: item !== null && item !== void 0 && item.user_answer_right ? "\u7B54\u5BF9\u4E86" : "\u7B54\u9519\u4E86"
})]
}), (item === null || item === void 0 ? void 0 : item.show_recommend) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
cursor: 'pointer',
color: '#3061D0',
fontSize: '14px'
},
onClick: function onClick() {
_setKnowledgeDialog(true);
},
children: ["\u4E3A\u4F60\u63A8\u8350\u540C\u77E5\u8BC6\u70B9\u9898\u76EE\uFF0C\u7ACB\u5373\u5DE9\u56FA", " >"]
})]
}), (item === null || item === void 0 ? void 0 : item.can_answer_num) > 0 && (item === null || item === void 0 ? void 0 : item.user_score) != (item === null || item === void 0 ? void 0 : item.question_score) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
color: '#FF8C29',
marginBottom: 14
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ExclamationCircleOutlined/* default */.Z, {
style: {
marginRight: 10
}
}), "\u6E29\u99A8\u63D0\u793A\uFF1A\u8FD8\u6709 ", item === null || item === void 0 ? void 0 : item.can_answer_num, " \u6B21\u673A\u4F1A\u53EF\u5C1D\u8BD5\u8FDB\u884C\u91CD\u65B0\u7B54\u9898\uFF0C\u91CD\u65B0\u7B54\u9898\u6B63\u786E\u540E\u4E5F\u4F1A\u8BA1\u5165\u603B\u6210\u7EE9\u3002"]
}), ((item === null || item === void 0 ? void 0 : item.can_answer_num) == 0 || (item === null || item === void 0 ? void 0 : item.user_score) == item.question_score || knowledgeDialog) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Answermodules.analysisWrap,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Answermodules.greyBg,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
className: "mb20",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
className: "font14 mr10",
style: {
color: '#6A7283',
lineHeight: '30px'
},
children: "\u3010\u7B54\u6848\u3011"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
style: {
fontSize: 16,
lineHeight: '30px'
},
children: item === null || item === void 0 ? void 0 : item.standard_answer_show
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font14 mr10 mb20",
style: {
color: '#6A7283',
lineHeight: '30px'
},
children: "\u3010\u89E3\u6790\u3011"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
className: Answermodules.renderHtml,
value: item === null || item === void 0 ? void 0 : item.analysis
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "font14 mr10",
style: {
color: '#6A7283',
lineHeight: '30px'
},
children: "\u3010\u77E5\u8BC6\u70B9\u3011"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
style: {
fontSize: 16,
lineHeight: '30px'
},
children: item === null || item === void 0 ? void 0 : item.tag_disciplines
})]
})]
})
})]
});
};
// 退出刷题
var quitExercise = function quitExercise() {
var _answerData$question_4, _answerData$exercise_6;
@ -4665,10 +4601,10 @@ var Answer = function Answer(_ref) {
// 练习答题提交
var submitAnswer = /*#__PURE__*/function () {
var _ref13 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee14() {
var _ref15 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee15() {
var paramsData, _questionItem$user_an4, res;
return regeneratorRuntime_default()().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
return regeneratorRuntime_default()().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
paramsData = {
questionId: questionItem.question_id,
@ -4685,22 +4621,14 @@ var Answer = function Answer(_ref) {
} else if (questionItem.question_type == 4) {
//简答题
paramsData.answer_text = questionItem === null || questionItem === void 0 || (_questionItem$user_an4 = questionItem.user_answer) === null || _questionItem$user_an4 === void 0 ? void 0 : _questionItem$user_an4[0];
} else if (questionItem.question_type == 7) {
//组合题
paramsData.answers = questionItem.sub_exercise_questions.map(function (item) {
return {
exercise_choice_id: item === null || item === void 0 ? void 0 : item.question_id,
answer_text: item === null || item === void 0 ? void 0 : item.user_answer
};
});
}
_context14.next = 4;
_context15.next = 4;
return (0,fetch/* default */.ZP)("/api/exercise_questions/".concat(questionItem.question_id, "/exercise_answers/subject_exercise_answer.json"), {
method: 'POST',
body: paramsData
});
case 4:
res = _context14.sent;
res = _context15.sent;
if (res.status == 0) {
setShowConfirm(false);
initData();
@ -4708,22 +4636,22 @@ var Answer = function Answer(_ref) {
}
case 6:
case "end":
return _context14.stop();
return _context15.stop();
}
}, _callee14);
}, _callee15);
}));
return function submitAnswer() {
return _ref13.apply(this, arguments);
return _ref15.apply(this, arguments);
};
}();
// 推荐题作答提交
var submitAnswer2 = /*#__PURE__*/function () {
var _ref14 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee15() {
var _ref16 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee16() {
var _paramsData$item_bank, _answerData$exercise3;
var paramsData, _paramsData$item_bank2, res;
return regeneratorRuntime_default()().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
return regeneratorRuntime_default()().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
paramsData = {
exercise_question_id: questionItem.question_id,
@ -4741,19 +4669,19 @@ var Answer = function Answer(_ref) {
}
});
if (!((itemBankData === null || itemBankData === void 0 ? void 0 : itemBankData.length) > (paramsData === null || paramsData === void 0 || (_paramsData$item_bank = paramsData.item_banks) === null || _paramsData$item_bank === void 0 ? void 0 : _paramsData$item_bank.length))) {
_context15.next = 5;
_context16.next = 5;
break;
}
message/* default */.ZP.error("\u8FD8\u6709".concat((itemBankData === null || itemBankData === void 0 ? void 0 : itemBankData.length) - (paramsData === null || paramsData === void 0 || (_paramsData$item_bank2 = paramsData.item_banks) === null || _paramsData$item_bank2 === void 0 ? void 0 : _paramsData$item_bank2.length), "\u9898\u6CA1\u6709\u4F5C\u7B54\uFF01"));
return _context15.abrupt("return");
return _context16.abrupt("return");
case 5:
_context15.next = 7;
_context16.next = 7;
return (0,fetch/* default */.ZP)("/api/subject_exercises/".concat(answerData === null || answerData === void 0 || (_answerData$exercise3 = answerData.exercise) === null || _answerData$exercise3 === void 0 ? void 0 : _answerData$exercise3.subject_exercise_id, "/answer.json"), {
method: 'post',
body: paramsData
});
case 7:
res = _context15.sent;
res = _context16.sent;
if (res.status == 0) {
setItemBankData(function (e) {
var arr = e.map(function (item) {
@ -4775,12 +4703,12 @@ var Answer = function Answer(_ref) {
}
case 9:
case "end":
return _context15.stop();
return _context16.stop();
}
}, _callee15);
}, _callee16);
}));
return function submitAnswer2() {
return _ref14.apply(this, arguments);
return _ref16.apply(this, arguments);
};
}();
return /*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, {
@ -5027,19 +4955,19 @@ var Answer = function Answer(_ref) {
skipNextQuestion();
},
children: "\u4E0B\u4E00\u9898"
}), showConfirm && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
}), showConfirm && ![7, 'COMBINATION'].includes(questionItem === null || questionItem === void 0 ? void 0 : questionItem.question_type) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
className: "".concat(Answermodules.changeButton, " ml20"),
type: "primary",
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee16() {
return regeneratorRuntime_default()().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee17() {
return regeneratorRuntime_default()().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
submitAnswer();
case 1:
case "end":
return _context16.stop();
return _context17.stop();
}
}, _callee16);
}, _callee17);
})),
children: "\u786E\u5B9A"
})]
@ -5083,19 +5011,19 @@ var Answer = function Answer(_ref) {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(AsyncButton/* AsyncButton */.Z, {
type: "primary",
className: Answermodules.toIframeBtn,
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee17() {
return regeneratorRuntime_default()().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee18() {
return regeneratorRuntime_default()().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
_context17.next = 2;
_context18.next = 2;
return submitAnswer2();
case 2:
return _context17.abrupt("return", _context17.sent);
return _context18.abrupt("return", _context18.sent);
case 3:
case "end":
return _context17.stop();
return _context18.stop();
}
}, _callee17);
}, _callee18);
})),
children: "\u786E\u5B9A"
})
@ -5107,11 +5035,11 @@ var Answer = function Answer(_ref) {
})]
});
};
/* harmony default export */ var Detail_Answer = ((0,_umi_production_exports.connect)(function (_ref17) {
var loading = _ref17.loading,
user = _ref17.user,
exercise = _ref17.exercise,
globalSetting = _ref17.globalSetting;
/* harmony default export */ var Detail_Answer = ((0,_umi_production_exports.connect)(function (_ref19) {
var loading = _ref19.loading,
user = _ref19.user,
exercise = _ref19.exercise,
globalSetting = _ref19.globalSetting;
return {
globalSetting: globalSetting,
user: user,

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save