|
|
|
|
@ -2460,6 +2460,8 @@ var SeeAnswer = __webpack_require__(89761);
|
|
|
|
|
var componentmodules = __webpack_require__(13706);
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
|
|
|
var fetch = __webpack_require__(41686);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_js-base64@2.6.4@js-base64/base64.js
|
|
|
|
|
var base64 = __webpack_require__(24334);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/Review/component/BFill.tsx
|
|
|
|
|
@ -2478,6 +2480,7 @@ var jsx_runtime = __webpack_require__(37712);
|
|
|
|
|
|
|
|
|
|
var TextArea = input/* default */.Z.TextArea;
|
|
|
|
|
var BFill = function BFill(_ref) {
|
|
|
|
|
var _datas$records, _item$submit_records;
|
|
|
|
|
var item = _ref.item,
|
|
|
|
|
answerData = _ref.answerData,
|
|
|
|
|
changeScoreData = _ref.changeScoreData,
|
|
|
|
|
@ -2502,6 +2505,78 @@ var BFill = function BFill(_ref) {
|
|
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
|
|
datas = _useState8[0],
|
|
|
|
|
setdatas = _useState8[1];
|
|
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)({
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 5
|
|
|
|
|
}),
|
|
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
|
|
urlData = _useState10[0],
|
|
|
|
|
setUrlData = _useState10[1];
|
|
|
|
|
var columns1 = [{
|
|
|
|
|
title: '序号',
|
|
|
|
|
width: 80,
|
|
|
|
|
dataIndex: 'index'
|
|
|
|
|
}, {
|
|
|
|
|
title: '学生答案',
|
|
|
|
|
width: "40%",
|
|
|
|
|
dataIndex: 'answer_content',
|
|
|
|
|
render: function render(text) {
|
|
|
|
|
return text === null || text === void 0 ? void 0 : text.map(function (item, index) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("pre", {
|
|
|
|
|
style: {
|
|
|
|
|
whiteSpace: 'pre-wrap'
|
|
|
|
|
},
|
|
|
|
|
children: [item === null || item === void 0 ? void 0 : item.name, ":", item === null || item === void 0 ? void 0 : item.value]
|
|
|
|
|
}, index);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
title: '评测结果',
|
|
|
|
|
dataIndex: 'evaluate_status'
|
|
|
|
|
}, {
|
|
|
|
|
title: '评测时间',
|
|
|
|
|
width: 110,
|
|
|
|
|
dataIndex: 'evaluate_time'
|
|
|
|
|
}, {
|
|
|
|
|
title: '得分',
|
|
|
|
|
width: 80,
|
|
|
|
|
dataIndex: 'score'
|
|
|
|
|
}];
|
|
|
|
|
var columns2 = [{
|
|
|
|
|
title: '序号',
|
|
|
|
|
width: 80,
|
|
|
|
|
dataIndex: 'index'
|
|
|
|
|
}, {
|
|
|
|
|
title: '学生答案',
|
|
|
|
|
width: (datas === null || datas === void 0 || (_datas$records = datas.records) === null || _datas$records === void 0 ? void 0 : _datas$records.every(function (k) {
|
|
|
|
|
return !(k !== null && k !== void 0 && k.is_new);
|
|
|
|
|
})) && 80,
|
|
|
|
|
dataIndex: 'answer_content',
|
|
|
|
|
render: function render(text, record) {
|
|
|
|
|
return text === null || text === void 0 ? void 0 : text.map(function (item, index) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("pre", {
|
|
|
|
|
style: {
|
|
|
|
|
whiteSpace: 'pre-wrap'
|
|
|
|
|
},
|
|
|
|
|
children: [item === null || item === void 0 ? void 0 : item.name, ":", item === null || item === void 0 ? void 0 : item.value]
|
|
|
|
|
}, index);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
title: '评测结果',
|
|
|
|
|
dataIndex: 'evaluate_status',
|
|
|
|
|
render: function render(text, record) {
|
|
|
|
|
return record !== null && record !== void 0 && record.is_new ? text : base64.Base64.decode(text);
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
title: '评测时间',
|
|
|
|
|
width: 110,
|
|
|
|
|
dataIndex: 'evaluate_time'
|
|
|
|
|
}, {
|
|
|
|
|
title: '得分',
|
|
|
|
|
width: 80,
|
|
|
|
|
dataIndex: 'score'
|
|
|
|
|
}];
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
if (changeScoreData !== null && changeScoreData !== void 0 && changeScoreData[item.q_position]) {
|
|
|
|
|
!showEdit && setShowEdit(true);
|
|
|
|
|
@ -2520,6 +2595,37 @@ var BFill = function BFill(_ref) {
|
|
|
|
|
});
|
|
|
|
|
setUserAnswer(data);
|
|
|
|
|
}, [item === null || item === void 0 ? void 0 : item.user_answer]);
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
isshow && getSubmitRecords();
|
|
|
|
|
}, [urlData]);
|
|
|
|
|
var getSubmitRecords = /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
var res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context.next = 2;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/myproblems/".concat(item === null || item === void 0 ? void 0 : item.hack_user_identifier, "/exercise_submit_records.json"), {
|
|
|
|
|
params: {
|
|
|
|
|
exercise_question_id: item === null || item === void 0 ? void 0 : item.question_id
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
// let res = await Fetch(`/api/myproblems/${item?.hack_user_identifier}/submit_records.json`, {
|
|
|
|
|
// method: 'get',
|
|
|
|
|
// })
|
|
|
|
|
setdatas(res);
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}));
|
|
|
|
|
return function getSubmitRecords() {
|
|
|
|
|
return _ref2.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: componentmodules/* default */.Z.fillBg,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
@ -2534,42 +2640,26 @@ var BFill = function BFill(_ref) {
|
|
|
|
|
style: {
|
|
|
|
|
cursor: 'pointer'
|
|
|
|
|
},
|
|
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
var res, _res$records;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
if (item !== null && item !== void 0 && item.hack_user_identifier) {
|
|
|
|
|
_context.next = 3;
|
|
|
|
|
_context2.next = 3;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
message/* default */.ZP.info("当前学生暂无评测记录");
|
|
|
|
|
return _context.abrupt("return");
|
|
|
|
|
return _context2.abrupt("return");
|
|
|
|
|
case 3:
|
|
|
|
|
_context.next = 5;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/myproblems/".concat(item === null || item === void 0 ? void 0 : item.hack_user_identifier, "/submit_records.json"), {
|
|
|
|
|
method: 'get'
|
|
|
|
|
});
|
|
|
|
|
case 5:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
if (!res) {
|
|
|
|
|
_context.next = 12;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (!((res === null || res === void 0 || (_res$records = res.records) === null || _res$records === void 0 ? void 0 : _res$records.length) === 0)) {
|
|
|
|
|
_context.next = 10;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
message/* default */.ZP.info("当前学生暂无评测记录");
|
|
|
|
|
return _context.abrupt("return");
|
|
|
|
|
case 10:
|
|
|
|
|
setisshow(true);
|
|
|
|
|
setdatas(res === null || res === void 0 ? void 0 : res.records);
|
|
|
|
|
case 12:
|
|
|
|
|
setUrlData(objectSpread2_default()(objectSpread2_default()({}, urlData), {}, {
|
|
|
|
|
page: 1
|
|
|
|
|
}));
|
|
|
|
|
case 5:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}, _callee2);
|
|
|
|
|
})),
|
|
|
|
|
className: "font14 c-light-primary mb5",
|
|
|
|
|
children: "\u67E5\u770B\u8BC4\u6D4B\u8BB0\u5F55"
|
|
|
|
|
@ -2598,39 +2688,37 @@ var BFill = function BFill(_ref) {
|
|
|
|
|
});
|
|
|
|
|
}), seeAnswerVisible && /*#__PURE__*/(0,jsx_runtime.jsx)(SeeAnswer/* SeeAnswer */.u, {
|
|
|
|
|
data: item
|
|
|
|
|
}), !!(item !== null && item !== void 0 && (_item$submit_records = item.submit_records) !== null && _item$submit_records !== void 0 && _item$submit_records.length) && /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
|
|
className: "mt20",
|
|
|
|
|
dataSource: item === null || item === void 0 ? void 0 : item.submit_records,
|
|
|
|
|
columns: columns1,
|
|
|
|
|
pagination: false
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
|
|
|
|
|
title: "\u8BC4\u6D4B\u8BB0\u5F55",
|
|
|
|
|
open: isshow,
|
|
|
|
|
footer: false,
|
|
|
|
|
centered: true,
|
|
|
|
|
width: 900,
|
|
|
|
|
onCancel: function onCancel() {
|
|
|
|
|
setisshow(false);
|
|
|
|
|
},
|
|
|
|
|
width: 700,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
|
|
scroll: {
|
|
|
|
|
y: 400
|
|
|
|
|
},
|
|
|
|
|
dataSource: datas,
|
|
|
|
|
columns: [{
|
|
|
|
|
title: '评测序号',
|
|
|
|
|
dataIndex: 'name',
|
|
|
|
|
render: function render(text, record, index) {
|
|
|
|
|
return index + 1;
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
title: '评测时间',
|
|
|
|
|
dataIndex: 'created_at',
|
|
|
|
|
render: function render(text, record, index) {
|
|
|
|
|
return dayjs_min_default()(text).format('YYYY-MM-DD HH:mm');
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
title: '评测结果',
|
|
|
|
|
dataIndex: 'error_msg',
|
|
|
|
|
render: function render(text, record, index) {
|
|
|
|
|
return Base64.decode(text);
|
|
|
|
|
dataSource: datas === null || datas === void 0 ? void 0 : datas.records,
|
|
|
|
|
columns: columns2,
|
|
|
|
|
pagination: {
|
|
|
|
|
current: urlData.page,
|
|
|
|
|
pageSize: urlData.limit,
|
|
|
|
|
total: datas === null || datas === void 0 ? void 0 : datas.records_count,
|
|
|
|
|
onChange: function onChange(page, limit) {
|
|
|
|
|
setUrlData(objectSpread2_default()(objectSpread2_default()({}, urlData), {}, {
|
|
|
|
|
page: page,
|
|
|
|
|
limit: limit
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
}]
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
@ -3380,8 +3468,6 @@ var ScoreModal = function ScoreModal(_ref, ref) {
|
|
|
|
|
};
|
|
|
|
|
/* harmony default export */ var component_ScoreModal = (/*#__PURE__*/(0,_react_17_0_2_react.forwardRef)(ScoreModal));
|
|
|
|
|
;
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_js-base64@2.6.4@js-base64/base64.js
|
|
|
|
|
var base64 = __webpack_require__(24334);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/Review/component/NewProgram.tsx
|
|
|
|
|
|
|
|
|
|
|