|
|
|
|
@ -1657,7 +1657,7 @@ var scoreStatusMapping = {
|
|
|
|
|
1: 'c-green'
|
|
|
|
|
};
|
|
|
|
|
var Simple = function Simple(_ref) {
|
|
|
|
|
var _answerData$exercise, _answerData$exercise2, _item$user_answer, _item$user_answer2;
|
|
|
|
|
var _item$standard_answer, _answerData$exercise, _answerData$exercise2, _item$user_answer, _item$user_answer2;
|
|
|
|
|
var item = _ref.item,
|
|
|
|
|
answerData = _ref.answerData,
|
|
|
|
|
isEducation = _ref.isEducation,
|
|
|
|
|
@ -1711,7 +1711,7 @@ var Simple = function Simple(_ref) {
|
|
|
|
|
};
|
|
|
|
|
}, []);
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [(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) ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: "mb20",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
justify: "space-between",
|
|
|
|
|
@ -2619,7 +2619,7 @@ var Fill_scoreStatusMapping = {
|
|
|
|
|
1: 'c-green'
|
|
|
|
|
};
|
|
|
|
|
var Fill = function Fill(_ref) {
|
|
|
|
|
var _item$standard_answer, _item$standard_answer2;
|
|
|
|
|
var _item$standard_answer2, _item$standard_answer3;
|
|
|
|
|
var sign = _ref.sign,
|
|
|
|
|
item = _ref.item,
|
|
|
|
|
answerData = _ref.answerData,
|
|
|
|
|
@ -2657,7 +2657,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",
|
|
|
|
|
@ -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 ? 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),
|
|
|
|
|
value: answer === null || answer === void 0 ? void 0 : answer.answer_text,
|
|
|
|
|
onChange: function onChange(e) {
|
|
|
|
|
userAnswer[index].answer_text = e.target.value;
|
|
|
|
|
@ -2753,7 +2753,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.jsxs)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
fontSize: '16px',
|
|
|
|
|
@ -2804,7 +2804,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: {
|
|
|
|
|
@ -3272,9 +3272,11 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
var currentQuestionItem = (_answerData$exercise_2 = answerData.exercise_question_types) === null || _answerData$exercise_2 === void 0 || (_answerData$exercise_2 = _answerData$exercise_2[oneindex]) === null || _answerData$exercise_2 === void 0 || (_answerData$exercise_2 = _answerData$exercise_2.items) === null || _answerData$exercise_2 === void 0 ? void 0 : _answerData$exercise_2[twoindex];
|
|
|
|
|
console.log('currentQuestionItem', currentQuestionItem);
|
|
|
|
|
if (currentQuestionItem !== null && currentQuestionItem !== void 0 && currentQuestionItem.show_recommend) {
|
|
|
|
|
console.log("2222");
|
|
|
|
|
setItemBankData(currentQuestionItem.recommend_item_banks);
|
|
|
|
|
setShowBtn(false);
|
|
|
|
|
} else {
|
|
|
|
|
console.log("111");
|
|
|
|
|
setShowBtn(true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -3804,13 +3806,13 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
signConfigFuc();
|
|
|
|
|
};
|
|
|
|
|
var renderSingle = function renderSingle(item, key) {
|
|
|
|
|
var _item$question_choice, _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 ? 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);
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: Answermodules.baseMargin,
|
|
|
|
|
@ -4038,13 +4040,13 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
var renderMultiple = function renderMultiple(item, key) {
|
|
|
|
|
var _item$question_choice4, _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 ? 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);
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: Answermodules.baseMargin,
|
|
|
|
|
@ -5068,9 +5070,11 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
onOk: function onOk() {},
|
|
|
|
|
onCancel: function onCancel() {
|
|
|
|
|
_setKnowledgeDialog(false);
|
|
|
|
|
if (!showBtn) initData();
|
|
|
|
|
if (!showBtn) {
|
|
|
|
|
initData();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
children: [itemBankData.length > 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
children: [(itemBankData === null || itemBankData === void 0 ? void 0 : itemBankData.length) > 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
maxHeight: 500,
|
|
|
|
|
overflowY: 'auto'
|
|
|
|
|
@ -5082,7 +5086,7 @@ var Answer = function Answer(_ref) {
|
|
|
|
|
children: renderQuestion(item, index, false)
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), itemBankData.length > 0 && showBtn ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), (itemBankData === null || itemBankData === void 0 ? void 0 : itemBankData.length) > 0 && showBtn ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
width: '100%',
|
|
|
|
|
display: 'flex',
|