|
|
|
|
@ -689,9 +689,11 @@ var jsx_runtime = __webpack_require__(37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Simple = function Simple(_ref) {
|
|
|
|
|
var _answerData$exercise, _item$user_answer, _item$user_answer2, _item$user_answer4, _item$tag_disciplines;
|
|
|
|
|
var _item$user_answer, _item$user_answer2, _item$user_answer4, _item$tag_disciplines;
|
|
|
|
|
var item = _ref.item,
|
|
|
|
|
answerData = _ref.answerData,
|
|
|
|
|
_ref$showConfirm = _ref.showConfirm,
|
|
|
|
|
showConfirm = _ref$showConfirm === void 0 ? false : _ref$showConfirm,
|
|
|
|
|
_ref$onBlur = _ref.onBlur,
|
|
|
|
|
_onBlur = _ref$onBlur === void 0 ? function () {} : _ref$onBlur;
|
|
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(),
|
|
|
|
|
@ -710,12 +712,12 @@ var Simple = function Simple(_ref) {
|
|
|
|
|
setIsShow(item === null || item === void 0 ? void 0 : item.a_flag);
|
|
|
|
|
}, [item === null || item === void 0 ? void 0 : item.a_flag]);
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [(answerData === null || answerData === void 0 || (_answerData$exercise = answerData.exercise) === null || _answerData$exercise === void 0 ? void 0 : _answerData$exercise.commit_status) === 1 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [item !== null && item !== void 0 && item.standard_answer ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
|
|
className: "mt10 mb20",
|
|
|
|
|
className: "mt10 mb10",
|
|
|
|
|
children: "\u6211\u7684\u7B54\u6848\uFF1A"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: Practicemodules.simpleText,
|
|
|
|
|
className: "".concat(Practicemodules.simpleText, " mb10"),
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
|
|
value: item === null || item === void 0 || (_item$user_answer = item.user_answer) === null || _item$user_answer === void 0 ? void 0 : _item$user_answer[0]
|
|
|
|
|
})
|
|
|
|
|
@ -832,7 +834,7 @@ var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
|
|
|
var monaco_editor = __webpack_require__(76003);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/MisCollection/Practice/components/index.less?modules
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
/* harmony default export */ var componentsmodules = ({"flex_box_center":"flex_box_center___YZgA8","flex_space_between":"flex_space_between___y_yQQ","flex_box_vertical_center":"flex_box_vertical_center___x6kKD","flex_box_center_end":"flex_box_center_end___SUaAb","flex_box_column":"flex_box_column___d9xOC","shixunWrp":"shixunWrp___Dwyh4","fill":"fill___Q0enF","index":"index___GmCwl","success":"success___ZMZ3Z","fail":"fail___bBT84","fillInput":"fillInput___wfcRy","shixunWrapper":"shixunWrapper___lPyRH","score":"score___rww4Y","name":"name___wkhzh","programWrapper":"programWrapper___SEO7i","desc":"desc___RqdJ_","content":"content___vkDN5"});
|
|
|
|
|
/* harmony default export */ var componentsmodules = ({"flex_box_center":"flex_box_center___YZgA8","flex_space_between":"flex_space_between___y_yQQ","flex_box_vertical_center":"flex_box_vertical_center___x6kKD","flex_box_center_end":"flex_box_center_end___SUaAb","flex_box_column":"flex_box_column___d9xOC","shixunWrp":"shixunWrp___Dwyh4","fill":"fill___Q0enF","index":"index___GmCwl","success":"success___ZMZ3Z","fail":"fail___bBT84","fillInput":"fillInput___wfcRy","shixunWrapper":"shixunWrapper___lPyRH","score":"score___rww4Y","name":"name___wkhzh","programWrapper":"programWrapper___SEO7i","desc":"desc___RqdJ_","content":"content___vkDN5","analysisWrap":"analysisWrap___enuLG","greyBg":"greyBg___UXSWa"});
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/MisCollection/Practice/components/Shixun.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1242,9 +1244,11 @@ var TextArea = input/* default */.Z.TextArea;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Fill = function Fill(_ref) {
|
|
|
|
|
var _item$standard_answer, _item$standard_answer2, _item$tag_disciplines;
|
|
|
|
|
var _item$standard_answer2, _item$standard_answer3, _item$tag_disciplines;
|
|
|
|
|
var item = _ref.item,
|
|
|
|
|
answerData = _ref.answerData,
|
|
|
|
|
_ref$showConfirm = _ref.showConfirm,
|
|
|
|
|
showConfirm = _ref$showConfirm === void 0 ? false : _ref$showConfirm,
|
|
|
|
|
_ref$onBlur = _ref.onBlur,
|
|
|
|
|
onBlur = _ref$onBlur === void 0 ? function () {} : _ref$onBlur;
|
|
|
|
|
var _useState = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
@ -1276,7 +1280,7 @@ var Fill = function Fill(_ref) {
|
|
|
|
|
}, [item === null || item === void 0 ? void 0 : item.user_answer]);
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [userAnswer === null || userAnswer === void 0 ? void 0 : userAnswer.map(function (answer, index) {
|
|
|
|
|
var _saveStatusArr$index, _saveStatusArr$index2, _saveStatusArr$index3;
|
|
|
|
|
var _item$standard_answer, _saveStatusArr$index, _saveStatusArr$index2, _saveStatusArr$index3;
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
className: "".concat(componentsmodules.baseMargin, " ").concat(componentsmodules.fill),
|
|
|
|
|
align: "middle",
|
|
|
|
|
@ -1288,7 +1292,7 @@ var Fill = function Fill(_ref) {
|
|
|
|
|
className: "ml20 mr20",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u7B54\u6848",
|
|
|
|
|
disabled: !!(item !== null && item !== void 0 && item.standard_answer_show),
|
|
|
|
|
disabled: !!(item !== null && item !== void 0 && (_item$standard_answer = item.standard_answer) !== null && _item$standard_answer !== void 0 && _item$standard_answer.length),
|
|
|
|
|
value: answer === null || answer === void 0 ? void 0 : answer.answer_text,
|
|
|
|
|
onChange: function onChange(e) {
|
|
|
|
|
console.log('userAnswer', userAnswer);
|
|
|
|
|
@ -1360,7 +1364,7 @@ var Fill = function Fill(_ref) {
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
}, index);
|
|
|
|
|
}), !!(item !== null && item !== void 0 && (_item$standard_answer = item.standard_answer) !== null && _item$standard_answer !== void 0 && _item$standard_answer.length) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
}), !!(item !== null && item !== void 0 && (_item$standard_answer2 = item.standard_answer) !== null && _item$standard_answer2 !== void 0 && _item$standard_answer2.length) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
fontSize: '16px',
|
|
|
|
|
@ -1391,7 +1395,7 @@ var Fill = function Fill(_ref) {
|
|
|
|
|
lineHeight: '30px'
|
|
|
|
|
},
|
|
|
|
|
children: "\u3010\u7B54\u6848\u3011"
|
|
|
|
|
}), item === null || item === void 0 || (_item$standard_answer2 = item.standard_answer) === null || _item$standard_answer2 === void 0 ? void 0 : _item$standard_answer2.map(function (answer, index) {
|
|
|
|
|
}), item === null || item === void 0 || (_item$standard_answer3 = item.standard_answer) === null || _item$standard_answer3 === void 0 ? void 0 : _item$standard_answer3.map(function (answer, index) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
|
|
className: "mr40",
|
|
|
|
|
style: {
|
|
|
|
|
@ -2642,13 +2646,14 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
className: "".concat(Practicemodules.changeButton, " ml20"),
|
|
|
|
|
type: "primary",
|
|
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee14() {
|
|
|
|
|
var _item$user_answer4;
|
|
|
|
|
var paramsData, res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee14$(_context14) {
|
|
|
|
|
while (1) switch (_context14.prev = _context14.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
|
|
|
|
|
exercise_choice_id: item === null || item === void 0 || (_item$user_answer4 = item.user_answer) === null || _item$user_answer4 === void 0 ? void 0 : _item$user_answer4[0]
|
|
|
|
|
};
|
|
|
|
|
_context14.next = 3;
|
|
|
|
|
return (0,exercise/* commitQuestion */.an)(objectSpread2_default()({}, paramsData));
|
|
|
|
|
@ -2708,6 +2713,7 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(components_Fill, {
|
|
|
|
|
item: item,
|
|
|
|
|
answerData: answerData,
|
|
|
|
|
showConfirm: showConfirm,
|
|
|
|
|
onBlur: ( /*#__PURE__*/function () {
|
|
|
|
|
var _ref14 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee15(value, index, userAnswer) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee15$(_context15) {
|
|
|
|
|
@ -2735,6 +2741,7 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(components_Simple, {
|
|
|
|
|
item: item,
|
|
|
|
|
answerData: answerData,
|
|
|
|
|
showConfirm: showConfirm,
|
|
|
|
|
onBlur: function onBlur(value) {
|
|
|
|
|
return handleBlurSimple(value, item === null || item === void 0 ? void 0 : item.question_id, item);
|
|
|
|
|
}
|