|
|
|
|
@ -1783,7 +1783,7 @@ var Simple = function Simple(_ref) {
|
|
|
|
|
},
|
|
|
|
|
children: (item === null || item === void 0 ? void 0 : item.user_score) === (item === null || item === void 0 ? void 0 : item.question_score) ? "\u7B54\u5BF9\u4E86" : "\u7B54\u9519\u4E86"
|
|
|
|
|
})]
|
|
|
|
|
}), (item === null || item === void 0 ? void 0 : item.show_recommend) && (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)("span", {
|
|
|
|
|
}), (item === null || item === void 0 ? void 0 : item.show_recommend) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
cursor: 'pointer',
|
|
|
|
|
color: '#3061D0',
|
|
|
|
|
@ -2749,7 +2749,7 @@ var Fill = function Fill(_ref) {
|
|
|
|
|
},
|
|
|
|
|
children: (item === null || item === void 0 ? void 0 : item.user_score) === (item === null || item === void 0 ? void 0 : item.question_score) ? "\u7B54\u5BF9\u4E86" : "\u7B54\u9519\u4E86"
|
|
|
|
|
})]
|
|
|
|
|
}), (item === null || item === void 0 ? void 0 : item.show_recommend) && (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)("span", {
|
|
|
|
|
}), (item === null || item === void 0 ? void 0 : item.show_recommend) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
cursor: 'pointer',
|
|
|
|
|
color: '#3061D0',
|
|
|
|
|
@ -3245,6 +3245,11 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
var _answerData$exercise_;
|
|
|
|
|
setQuestionItem(answerData === null || answerData === void 0 || (_answerData$exercise_ = answerData.exercise_question_types) === null || _answerData$exercise_ === void 0 || (_answerData$exercise_ = _answerData$exercise_[oneindex]) === null || _answerData$exercise_ === void 0 || (_answerData$exercise_ = _answerData$exercise_.items) === null || _answerData$exercise_ === void 0 ? void 0 : _answerData$exercise_[twoindex]);
|
|
|
|
|
}, [answerData]);
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
if (knowledgeDialog) {
|
|
|
|
|
setShowBtn(true);
|
|
|
|
|
}
|
|
|
|
|
}, [knowledgeDialog]);
|
|
|
|
|
var sendBeacon = function sendBeacon() {
|
|
|
|
|
var _exercise$exerciseUse;
|
|
|
|
|
if (!(answerCheckData !== null && answerCheckData !== void 0 && answerCheckData.is_commit) && (0,authority/* isStudent */.dE)()) {
|
|
|
|
|
@ -3559,7 +3564,7 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var handleChangeSingle = function handleChangeSingle(value, id, key, item) {
|
|
|
|
|
if (item.question_type == 'SINGLE') {
|
|
|
|
|
if (['SINGLE', 'JUDGMENT'].includes(item.question_type)) {
|
|
|
|
|
updateSuggestAnswer(value, id);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
@ -3603,11 +3608,16 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
}();
|
|
|
|
|
var handleChangeMultiple = function handleChangeMultiple(value, id, item) {
|
|
|
|
|
if (!(value !== null && value !== void 0 && value.length)) return;
|
|
|
|
|
if (item.question_type == 'MULTIPLE') {
|
|
|
|
|
updateSuggestAnswer(value, id);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
item.user_answer = value;
|
|
|
|
|
answerData.question_status.find(function (item) {
|
|
|
|
|
return item.ques_id === id;
|
|
|
|
|
}).ques_status = value !== null && value !== void 0 && value.length ? 1 : 0;
|
|
|
|
|
setAnswerData(objectSpread2_default()({}, answerData));
|
|
|
|
|
setShowConfirm(true);
|
|
|
|
|
};
|
|
|
|
|
var handleBlurFill = /*#__PURE__*/function () {
|
|
|
|
|
var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9(value, index, id, param, item) {
|
|
|
|
|
@ -3788,7 +3798,7 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
},
|
|
|
|
|
children: (item === null || item === void 0 ? void 0 : item.user_score) === (item === null || item === void 0 ? void 0 : item.question_score) ? "\u7B54\u5BF9\u4E86" : "\u7B54\u9519\u4E86"
|
|
|
|
|
})]
|
|
|
|
|
}), (item === null || item === void 0 ? void 0 : item.show_recommend) && (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)("span", {
|
|
|
|
|
}), (item === null || item === void 0 ? void 0 : item.show_recommend) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
cursor: 'pointer',
|
|
|
|
|
color: '#3061D0',
|
|
|
|
|
@ -3867,13 +3877,7 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
var disabled = (answerData === null || answerData === void 0 || (_answerData$exercise = answerData.exercise) === null || _answerData$exercise === void 0 ? void 0 : _answerData$exercise.user_exercise_status) === 1 || !items.repeat_answer && items.ques_status !== 0;
|
|
|
|
|
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$question_choice3, _item$user_answer2, _item$question_choice4;
|
|
|
|
|
var answerText = '';
|
|
|
|
|
item === null || item === void 0 || (_item$question_choice3 = item.question_choices) === null || _item$question_choice3 === void 0 || _item$question_choice3.forEach(function (k, i) {
|
|
|
|
|
if (k.standard_boolean) {
|
|
|
|
|
answerText = answerText + tagList[i];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
var _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", {
|
|
|
|
|
@ -3911,7 +3915,7 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
setShowConfirm(true);
|
|
|
|
|
},
|
|
|
|
|
className: item.user_score && "edu-radio-".concat(item.user_score === item.question_score ? "green" : "red"),
|
|
|
|
|
children: item === null || item === void 0 || (_item$question_choice4 = item.question_choices) === null || _item$question_choice4 === void 0 ? void 0 : _item$question_choice4.map(function (answer, index) {
|
|
|
|
|
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) {
|
|
|
|
|
var isJudge = item.question_type == 2;
|
|
|
|
|
var prefix = isJudge ? '' : "".concat(tagList[index], ".");
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
@ -3969,8 +3973,8 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
var renderMultiple = function renderMultiple(item, key) {
|
|
|
|
|
var _item$question_choice5, _item$standard_answer2, _item$question_choice6;
|
|
|
|
|
var userAnswer = (item === null || item === void 0 || (_item$question_choice5 = item.question_choices) === null || _item$question_choice5 === void 0 ? void 0 : _item$question_choice5.filter(function (choice) {
|
|
|
|
|
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;
|
|
|
|
|
@ -3987,10 +3991,9 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
},
|
|
|
|
|
onChange: function onChange(value) {
|
|
|
|
|
handleChangeMultiple(value, item === null || item === void 0 ? void 0 : item.question_id, item);
|
|
|
|
|
setShowConfirm(true);
|
|
|
|
|
},
|
|
|
|
|
className: item.user_score && "edu-checkbox-".concat(item.user_score === item.question_score ? "green" : "red"),
|
|
|
|
|
children: item === null || item === void 0 || (_item$question_choice6 = item.question_choices) === null || _item$question_choice6 === void 0 ? void 0 : _item$question_choice6.map(function (answer, index) {
|
|
|
|
|
children: item === null || item === void 0 || (_item$question_choice5 = item.question_choices) === null || _item$question_choice5 === void 0 ? void 0 : _item$question_choice5.map(function (answer, index) {
|
|
|
|
|
var prefix = "".concat(tagList[index], ".");
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: Answermodules.answerWrap,
|
|
|
|
|
@ -4027,7 +4030,7 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
},
|
|
|
|
|
children: (item === null || item === void 0 ? void 0 : item.user_score) === (item === null || item === void 0 ? void 0 : item.question_score) ? "\u7B54\u5BF9\u4E86" : "\u7B54\u9519\u4E86"
|
|
|
|
|
})]
|
|
|
|
|
}), (item === null || item === void 0 ? void 0 : item.show_recommend) && (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)("span", {
|
|
|
|
|
}), (item === null || item === void 0 ? void 0 : item.show_recommend) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
cursor: 'pointer',
|
|
|
|
|
color: '#3061D0',
|
|
|
|
|
@ -4048,7 +4051,7 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
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 && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: Answermodules.analysisWrap,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: Answermodules.greyBg,
|
|
|
|
|
@ -4664,6 +4667,7 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
});
|
|
|
|
|
return item;
|
|
|
|
|
});
|
|
|
|
|
console.log('111', arr);
|
|
|
|
|
return arr;
|
|
|
|
|
});
|
|
|
|
|
divRef.current.scrollTo(0, 0);
|
|
|
|
|
@ -4996,7 +5000,7 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
footer: null,
|
|
|
|
|
onOk: function onOk() {},
|
|
|
|
|
onCancel: function onCancel() {
|
|
|
|
|
_setKnowledgeDialog(false);
|
|
|
|
|
return _setKnowledgeDialog(false);
|
|
|
|
|
},
|
|
|
|
|
children: [itemBankData.length > 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
@ -5006,10 +5010,11 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
ref: divRef,
|
|
|
|
|
children: itemBankData.map(function (item, index) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: "mb10",
|
|
|
|
|
children: renderQuestion(item, index, false)
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), showBtn ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), itemBankData.length > 0 && showBtn ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
width: '100%',
|
|
|
|
|
display: 'flex',
|