|
|
|
|
@ -1711,7 +1711,7 @@ var Simple = function Simple(_ref) {
|
|
|
|
|
};
|
|
|
|
|
}, []);
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [(item === null || item === void 0 || (_item$standard_answer = item.standard_answer) === null || _item$standard_answer === void 0 ? void 0 : _item$standard_answer.length) > 0 && ((item === null || item === void 0 ? void 0 : item.can_answer_num) == 0 || !showBtn) ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [(item === null || item === void 0 || (_item$standard_answer = item.standard_answer) === null || _item$standard_answer === void 0 ? void 0 : _item$standard_answer.length) > 0 && ((item === null || item === void 0 ? void 0 : item.can_answer_num) == 0 || !showBtn) || (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", {
|
|
|
|
|
className: "mb20",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
justify: "space-between",
|
|
|
|
|
@ -2669,7 +2669,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 = item.standard_answer) === null || _item$standard_answer === void 0 ? void 0 : _item$standard_answer.length) > 0 && ((item === null || item === void 0 ? void 0 : item.can_answer_num) == 0 || !showBtn),
|
|
|
|
|
disabled: (item === null || item === void 0 || (_item$standard_answer = item.standard_answer) === null || _item$standard_answer === void 0 ? void 0 : _item$standard_answer.length) > 0 && ((item === null || item === void 0 ? void 0 : item.can_answer_num) == 0 || !showBtn) || (item === null || item === void 0 ? void 0 : item.user_score) === (item === null || item === void 0 ? void 0 : item.question_score),
|
|
|
|
|
value: answer === null || answer === void 0 ? void 0 : answer.answer_text,
|
|
|
|
|
onChange: function onChange(e) {
|
|
|
|
|
userAnswer[index].answer_text = e.target.value;
|
|
|
|
|
@ -3818,14 +3818,13 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
signConfigFuc();
|
|
|
|
|
};
|
|
|
|
|
var renderSingle = function renderSingle(item, key) {
|
|
|
|
|
var _item$question_choice, _item$standard_answer, _item$standard_answer2, _item$question_choice2;
|
|
|
|
|
var _item$question_choice, _item$standard_answer, _item$question_choice2;
|
|
|
|
|
var userAnswer = (item === null || item === void 0 || (_item$question_choice = item.question_choices) === null || _item$question_choice === void 0 ? void 0 : _item$question_choice.filter(function (choice) {
|
|
|
|
|
return choice.user_answer_boolean;
|
|
|
|
|
}).map(function (choice) {
|
|
|
|
|
return choice.choice_id;
|
|
|
|
|
})) || [];
|
|
|
|
|
var disabled = (item === null || item === void 0 || (_item$standard_answer = item.standard_answer) === null || _item$standard_answer === void 0 ? void 0 : _item$standard_answer.length) > 0 && ((item === null || item === void 0 ? void 0 : item.can_answer_num) == 0 || !showBtn);
|
|
|
|
|
console.log('disabled', item, item === null || item === void 0 || (_item$standard_answer2 = item.standard_answer) === null || _item$standard_answer2 === void 0 ? void 0 : _item$standard_answer2.length, (item === null || item === void 0 ? void 0 : item.can_answer_num) == 0, !showBtn);
|
|
|
|
|
var disabled = (item === null || item === void 0 || (_item$standard_answer = item.standard_answer) === null || _item$standard_answer === void 0 ? void 0 : _item$standard_answer.length) > 0 && ((item === null || item === void 0 ? void 0 : item.can_answer_num) == 0 || !showBtn) || (item === null || item === void 0 ? void 0 : item.user_score) === (item === null || item === void 0 ? void 0 : item.question_score);
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: Answermodules.baseMargin,
|
|
|
|
|
@ -4053,13 +4052,13 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
var renderMultiple = function renderMultiple(item, key) {
|
|
|
|
|
var _item$question_choice4, _item$standard_answer3, _item$question_choice5;
|
|
|
|
|
var _item$question_choice4, _item$standard_answer2, _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_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);
|
|
|
|
|
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_score) === (item === null || item === void 0 ? void 0 : item.question_score);
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: Answermodules.baseMargin,
|
|
|
|
|
@ -4715,18 +4714,20 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
_context14.next = 5;
|
|
|
|
|
console.log("!111");
|
|
|
|
|
_context14.next = 6;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/exercise_questions/".concat(currentInfo.question_id, "/exercise_answers/subject_exercise_answer.json"), {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
body: paramsData
|
|
|
|
|
});
|
|
|
|
|
case 5:
|
|
|
|
|
case 6:
|
|
|
|
|
res = _context14.sent;
|
|
|
|
|
if (res.status == 0) {
|
|
|
|
|
setShowConfirm(false);
|
|
|
|
|
console.log("222");
|
|
|
|
|
initData();
|
|
|
|
|
}
|
|
|
|
|
case 7:
|
|
|
|
|
case 8:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context14.stop();
|
|
|
|
|
}
|