|
|
|
|
@ -525,7 +525,7 @@ var SelfTestRun = function SelfTestRun(_ref) {
|
|
|
|
|
var stats = isAppraise ? data === null || data === void 0 ? void 0 : data.answer_content : form.getFieldValue(answerKey);
|
|
|
|
|
var test_input = isAppraise ? data === null || data === void 0 ? void 0 : data.input : (_form$getFieldValue2 = form.getFieldValue('hack_sets')) === null || _form$getFieldValue2 === void 0 ? void 0 : _form$getFieldValue2.input;
|
|
|
|
|
stats === null || stats === void 0 || stats.forEach(function (item) {
|
|
|
|
|
var answer_text = item.value || item.answer_text;
|
|
|
|
|
var answer_text = item.value || item.answer_text || '';
|
|
|
|
|
code = code.replace(/(@▁@|@▁▁@)/, answer_text);
|
|
|
|
|
});
|
|
|
|
|
setTestInput(test_input);
|
|
|
|
|
@ -2533,6 +2533,20 @@ var BFill = function BFill(_ref) {
|
|
|
|
|
width: 76,
|
|
|
|
|
dataIndex: 'answer_content',
|
|
|
|
|
render: function render(e) {
|
|
|
|
|
var _item$standard_answer;
|
|
|
|
|
var answerContent = [];
|
|
|
|
|
item === null || item === void 0 || (_item$standard_answer = item.standard_answer) === null || _item$standard_answer === void 0 || _item$standard_answer.forEach(function (k, j) {
|
|
|
|
|
var name = "\u586B\u7A7A".concat(j + 1);
|
|
|
|
|
var p = e === null || e === void 0 ? void 0 : e.find(function (e) {
|
|
|
|
|
return e.name === name;
|
|
|
|
|
});
|
|
|
|
|
if (p) {
|
|
|
|
|
answerContent.push(p);
|
|
|
|
|
} else answerContent.push({
|
|
|
|
|
name: name,
|
|
|
|
|
value: ""
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(SelfTestRun/* default */.Z, {
|
|
|
|
|
buttonProps: {
|
|
|
|
|
type: "link",
|
|
|
|
|
@ -2544,7 +2558,7 @@ var BFill = function BFill(_ref) {
|
|
|
|
|
hackIdentifier: item === null || item === void 0 ? void 0 : item.hack_identifier,
|
|
|
|
|
data: {
|
|
|
|
|
code: base64.Base64.decode(item === null || item === void 0 ? void 0 : item.code),
|
|
|
|
|
answer_content: e,
|
|
|
|
|
answer_content: answerContent,
|
|
|
|
|
time_limit: (item === null || item === void 0 ? void 0 : item.time_limit) || 10,
|
|
|
|
|
input: item === null || item === void 0 ? void 0 : item.test_input
|
|
|
|
|
}
|
|
|
|
|
@ -5936,15 +5950,33 @@ var ExeriseReview = function ExeriseReview(_ref) {
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var renderQuestion = function renderQuestion(item, i, isIncombination, jndex) {
|
|
|
|
|
var _ref8, _item$question_choice, _item$question_choice2, _item$question_choice3, _changeScoreData$item, _changeScoreData$item2, _reviewExercise$revie3, _changeScoreData$item3, _item$sub_exercise_qu, _item$question_choice4, _item$user_answer2, _item$user_score, _item$user_score2, _item$question_score, _item$question_score2, _reviewExercise$exerc4;
|
|
|
|
|
var _item$question_choice, _item$question_choice2, _item$question_choice3, _changeScoreData$item, _changeScoreData$item2, _reviewExercise$revie3, _changeScoreData$item3, _item$sub_exercise_qu, _item$question_choice4, _item$user_answer2, _item$user_score, _item$user_score2, _item$question_score, _item$question_score2, _reviewExercise$exerc4;
|
|
|
|
|
// 如果是组合题中的小题则isIncombination为true
|
|
|
|
|
var lastScoreDetail = (_ref8 = (item === null || item === void 0 ? void 0 : item.last_score_detail) || []) === null || _ref8 === void 0 ? void 0 : _ref8.map(function (e) {
|
|
|
|
|
var _e$score;
|
|
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
|
|
|
|
|
score: [undefined, null, 0, '0', '0.0'].includes(e.score) ? '0' : (_e$score = e.score) === null || _e$score === void 0 ? void 0 : _e$score.toFixed(1)
|
|
|
|
|
var lastScoreDetail = [];
|
|
|
|
|
if ((item === null || item === void 0 ? void 0 : item.question_type) === 8) {
|
|
|
|
|
var _ref8, _item$standard_answer;
|
|
|
|
|
var newLastScoreDetail = (_ref8 = (item === null || item === void 0 ? void 0 : item.last_score_detail) || []) === null || _ref8 === void 0 ? void 0 : _ref8.map(function (e) {
|
|
|
|
|
var _e$score;
|
|
|
|
|
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
|
|
|
|
|
score: [undefined, null, 0, '0', '0.0'].includes(e.score) ? '0' : (_e$score = e.score) === null || _e$score === void 0 ? void 0 : _e$score.toFixed(1)
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
console.log(lastScoreDetail, 'lastScoreDetail');
|
|
|
|
|
item === null || item === void 0 || (_item$standard_answer = item.standard_answer) === null || _item$standard_answer === void 0 || _item$standard_answer.forEach(function (k, j) {
|
|
|
|
|
var _k$score;
|
|
|
|
|
var position = j + 1;
|
|
|
|
|
var p = newLastScoreDetail === null || newLastScoreDetail === void 0 ? void 0 : newLastScoreDetail.find(function (e) {
|
|
|
|
|
return e.position === position;
|
|
|
|
|
});
|
|
|
|
|
if (p) {
|
|
|
|
|
lastScoreDetail.push(p);
|
|
|
|
|
} else lastScoreDetail.push({
|
|
|
|
|
position: position,
|
|
|
|
|
name: "\u586B\u7A7A".concat(position),
|
|
|
|
|
value: "",
|
|
|
|
|
score: [undefined, null, 0, '0', '0.0'].includes(k.score) ? '0' : (_k$score = k.score) === null || _k$score === void 0 ? void 0 : _k$score.toFixed(1)
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
className: "mb20",
|
|
|
|
|
|