|
|
"use strict";
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[48431],{
|
|
|
|
|
|
/***/ 42110:
|
|
|
/*!*******************************************************************!*\
|
|
|
!*** ./node_modules/@ant-design/icons-svg/es/asn/PlusOutlined.js ***!
|
|
|
\*******************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__) {
|
|
|
|
|
|
// This icon file is generated automatically.
|
|
|
var PlusOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "defs", "attrs": {}, "children": [{ "tag": "style", "attrs": {} }] }, { "tag": "path", "attrs": { "d": "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { "tag": "path", "attrs": { "d": "M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z" } }] }, "name": "plus", "theme": "outlined" };
|
|
|
/* harmony default export */ __webpack_exports__["Z"] = (PlusOutlined);
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 43861:
|
|
|
/*!**************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Export/index.tsx + 3 modules ***!
|
|
|
\**************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
// ESM COMPAT FLAG
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"default": function() { return /* binding */ Exercise_Export; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/dropdown/style/index.js + 1 modules
|
|
|
var style = __webpack_require__(68018);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/dropdown/index.js
|
|
|
var dropdown = __webpack_require__(13013);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
|
|
|
var button_style = __webpack_require__(29913);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(71577);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/breadcrumb/style/index.js + 1 modules
|
|
|
var breadcrumb_style = __webpack_require__(63102);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/breadcrumb/index.js + 3 modules
|
|
|
var breadcrumb = __webpack_require__(58492);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js
|
|
|
var createForOfIteratorHelper = __webpack_require__(74704);
|
|
|
var createForOfIteratorHelper_default = /*#__PURE__*/__webpack_require__.n(createForOfIteratorHelper);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/divider/style/index.js + 1 modules
|
|
|
var divider_style = __webpack_require__(98541);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/divider/index.js
|
|
|
var divider = __webpack_require__(27049);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/checkbox/style/index.js + 1 modules
|
|
|
var checkbox_style = __webpack_require__(82000);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/checkbox/index.js + 2 modules
|
|
|
var es_checkbox = __webpack_require__(32808);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/row/style/index.js
|
|
|
var row_style = __webpack_require__(13062);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/row/index.js
|
|
|
var row = __webpack_require__(71230);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/col/style/index.js
|
|
|
var col_style = __webpack_require__(89032);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/col/index.js
|
|
|
var col = __webpack_require__(15746);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/radio/style/index.js + 1 modules
|
|
|
var radio_style = __webpack_require__(83822);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/radio/index.js + 4 modules
|
|
|
var es_radio = __webpack_require__(29924);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/modal/style/index.js + 1 modules
|
|
|
var modal_style = __webpack_require__(35611);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/modal/index.js + 7 modules
|
|
|
var es_modal = __webpack_require__(85402);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
var regeneratorRuntime = __webpack_require__(17061);
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
|
|
|
var objectSpread2 = __webpack_require__(42122);
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__(17156);
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(27424);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js
|
|
|
var objectWithoutProperties = __webpack_require__(70215);
|
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input/style/index.js + 1 modules
|
|
|
var input_style = __webpack_require__(69463);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input/index.js + 5 modules
|
|
|
var input = __webpack_require__(75008);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 8 modules
|
|
|
var _umi_production_exports = __webpack_require__(89214);
|
|
|
// EXTERNAL MODULE: ./node_modules/jszip/dist/jszip.min.js
|
|
|
var jszip_min = __webpack_require__(55733);
|
|
|
var jszip_min_default = /*#__PURE__*/__webpack_require__.n(jszip_min);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/ArrowLeftOutlined.js + 1 modules
|
|
|
var ArrowLeftOutlined = __webpack_require__(82826);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/DownloadOutlined.js
|
|
|
var DownloadOutlined = __webpack_require__(69753);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/DeliveredProcedureOutlined.js + 1 modules
|
|
|
var DeliveredProcedureOutlined = __webpack_require__(95604);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/CaretDownOutlined.js
|
|
|
var CaretDownOutlined = __webpack_require__(95025);
|
|
|
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/SettingOutlined.js + 1 modules
|
|
|
var SettingOutlined = __webpack_require__(42952);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/Export/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var Exportmodules = ({"flex_box_center":"flex_box_center___GW1u0","flex_space_between":"flex_space_between___XhK9z","flex_box_vertical_center":"flex_box_vertical_center___NKIbp","flex_box_center_end":"flex_box_center_end___V3qhT","flex_box_column":"flex_box_column___b4G29","bg":"bg___exMJB","title":"title___yiXeD","questionIcons":"questionIcons___v75Tz","green":"green___HRGef","orange":"orange___tdW4E","greenTip":"greenTip___f2SpQ","redTip":"redTip___jc8UE","orangeTip":"orangeTip___VMO_s","flexRow":"flexRow___Jshv2","simpleWrap":"simpleWrap___ul6oi","divider":"divider___Of_8z","modal":"modal___oAD7F","programTitle":"programTitle___ybswa","simpleBg":"simpleBg___yLrQy","exportBtn":"exportBtn___x5fcE"});
|
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 1 modules
|
|
|
var RenderHtml = __webpack_require__(12768);
|
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
|
var util = __webpack_require__(29427);
|
|
|
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/Exercise/Review/component/Fill.tsx
|
|
|
var Fill = __webpack_require__(19637);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/table/style/index.js + 1 modules
|
|
|
var table_style = __webpack_require__(71854);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/table/index.js + 58 modules
|
|
|
var table = __webpack_require__(67250);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input-number/style/index.js + 1 modules
|
|
|
var input_number_style = __webpack_require__(25359);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/input-number/index.js + 9 modules
|
|
|
var input_number = __webpack_require__(87799);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/message/style/index.js + 1 modules
|
|
|
var message_style = __webpack_require__(14934);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 1 modules
|
|
|
var message = __webpack_require__(12461);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js + 1 modules
|
|
|
var tooltip_style = __webpack_require__(38390);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
|
|
|
var tooltip = __webpack_require__(84908);
|
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
|
var authority = __webpack_require__(7);
|
|
|
// EXTERNAL MODULE: ./node_modules/moment/moment.js
|
|
|
var moment = __webpack_require__(30381);
|
|
|
var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
|
|
|
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 3 modules
|
|
|
var monaco_editor = __webpack_require__(8691);
|
|
|
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/Exercise/Review/component/index.less?modules
|
|
|
var componentmodules = __webpack_require__(1446);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/Review/component/Shixun.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Shixun = function Shixun(_ref) {
|
|
|
var _answerData$exercise, _answerData$exercise2, _item$shixun;
|
|
|
var item = _ref.item,
|
|
|
answerData = _ref.answerData,
|
|
|
_ref$hasChangeScore = _ref.hasChangeScore,
|
|
|
hasChangeScore = _ref$hasChangeScore === void 0 ? true : _ref$hasChangeScore,
|
|
|
autoHeight = _ref.autoHeight,
|
|
|
_ref$saveChangeScore = _ref.saveChangeScore,
|
|
|
saveChangeScore = _ref$saveChangeScore === void 0 ? function () {} : _ref$saveChangeScore;
|
|
|
var _useState = (0,react.useState)([]),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
data = _useState2[0],
|
|
|
setData = _useState2[1];
|
|
|
var _useState3 = (0,react.useState)([]),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
challengeData = _useState4[0],
|
|
|
setChallengeData = _useState4[1];
|
|
|
(0,react.useEffect)(function () {
|
|
|
var _item$shixun_details;
|
|
|
if (!(item !== null && item !== void 0 && (_item$shixun_details = item.shixun_details) !== null && _item$shixun_details !== void 0 && _item$shixun_details.length)) {
|
|
|
return;
|
|
|
}
|
|
|
var shixun = [];
|
|
|
var challenge = [];
|
|
|
for (var i = 0; i < (item === null || item === void 0 ? void 0 : (_item$shixun_details2 = item.shixun_details) === null || _item$shixun_details2 === void 0 ? void 0 : _item$shixun_details2.length); i++) {
|
|
|
var _item$shixun_details2, _item$shixun_details7, _item$shixun_details8;
|
|
|
for (var j = 0; j < (item === null || item === void 0 ? void 0 : item.shixun_details[i].stage_list.length); j++) {
|
|
|
var _item$shixun_details3, _item$shixun_details4, _item$shixun_details5, _item$shixun_details6, _item$shixun_details$;
|
|
|
var shixunItem = item === null || item === void 0 ? void 0 : item.shixun_details[i].stage_list[j];
|
|
|
shixun.push(objectSpread2_default()(objectSpread2_default()({}, shixunItem), {
|
|
|
operation: item === null || item === void 0 ? void 0 : (_item$shixun_details3 = item.shixun_details) === null || _item$shixun_details3 === void 0 ? void 0 : (_item$shixun_details4 = _item$shixun_details3[i]) === null || _item$shixun_details4 === void 0 ? void 0 : (_item$shixun_details5 = _item$shixun_details4.shixun_detail) === null || _item$shixun_details5 === void 0 ? void 0 : (_item$shixun_details6 = _item$shixun_details5[0]) === null || _item$shixun_details6 === void 0 ? void 0 : _item$shixun_details6.game_identifier,
|
|
|
shixun_challenge_id: item === null || item === void 0 ? void 0 : (_item$shixun_details$ = item.shixun_details[i]) === null || _item$shixun_details$ === void 0 ? void 0 : _item$shixun_details$.shixun_challenge_id
|
|
|
}));
|
|
|
}
|
|
|
if (item !== null && item !== void 0 && (_item$shixun_details7 = item.shixun_details) !== null && _item$shixun_details7 !== void 0 && (_item$shixun_details8 = _item$shixun_details7[i]) !== null && _item$shixun_details8 !== void 0 && _item$shixun_details8.shixun_detail) {
|
|
|
var _item$shixun_details9, _item$shixun_details10, _item$shixun_details11;
|
|
|
challenge.push(item === null || item === void 0 ? void 0 : (_item$shixun_details9 = item.shixun_details) === null || _item$shixun_details9 === void 0 ? void 0 : (_item$shixun_details10 = _item$shixun_details9[i]) === null || _item$shixun_details10 === void 0 ? void 0 : (_item$shixun_details11 = _item$shixun_details10.shixun_detail) === null || _item$shixun_details11 === void 0 ? void 0 : _item$shixun_details11[0]);
|
|
|
}
|
|
|
}
|
|
|
setChallengeData(challenge);
|
|
|
setData([].concat(shixun));
|
|
|
}, [item === null || item === void 0 ? void 0 : item.shixun_details]);
|
|
|
var columns = [{
|
|
|
title: "关卡",
|
|
|
dataIndex: "position",
|
|
|
key: "position",
|
|
|
align: 'center'
|
|
|
}, {
|
|
|
title: "任务名称",
|
|
|
dataIndex: "name",
|
|
|
key: "name",
|
|
|
align: 'center',
|
|
|
ellipsis: true,
|
|
|
width: 260,
|
|
|
render: function render(name) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
title: name,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "overflowHidden1",
|
|
|
style: {
|
|
|
maxWidth: "400px"
|
|
|
},
|
|
|
title: name && name.length > 25 ? name : "",
|
|
|
children: name
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: "评测次数",
|
|
|
dataIndex: "evaluate_count",
|
|
|
key: "evaluate_count",
|
|
|
align: 'center',
|
|
|
render: function render(testCount, item) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: item.evaluate_count ? item.evaluate_count : /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "color-grey-9",
|
|
|
children: "--"
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: "完成时间",
|
|
|
key: "finished_time",
|
|
|
dataIndex: "finished_time",
|
|
|
align: 'center',
|
|
|
render: function render(endTime, item) {
|
|
|
var timeOver = false;
|
|
|
if (item.finished_time && answerData !== null && answerData !== void 0 && answerData.exercise && answerData !== null && answerData !== void 0 && answerData.exercise_answer_user) {
|
|
|
// issue#29511 exercise.time -1没有设置答题的时间限制,则比较完成时间和试卷截至时间
|
|
|
if ((answerData === null || answerData === void 0 ? void 0 : answerData.exercise.time) === -1) {
|
|
|
timeOver = moment_default()(answerData === null || answerData === void 0 ? void 0 : answerData.exercise.end_time).isBefore(item.finished_time);
|
|
|
} else {
|
|
|
timeOver = moment_default()(answerData === null || answerData === void 0 ? void 0 : answerData.exercise_answer_user.start_at).add(answerData === null || answerData === void 0 ? void 0 : answerData.exercise.time, "m").isBefore(item.finished_time);
|
|
|
}
|
|
|
}
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: [item.finished_time || /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-grey-999",
|
|
|
children: "--"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-orange-ff9 ",
|
|
|
children: timeOver ? "(已超时)" : ""
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: "耗时",
|
|
|
dataIndex: "time_consuming",
|
|
|
key: "time_consuming",
|
|
|
align: 'center',
|
|
|
render: function render(time, item) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: item.time_consuming || /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "color-grey-9",
|
|
|
children: "--"
|
|
|
})
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: "查看答案",
|
|
|
dataIndex: "view_answer",
|
|
|
key: "view_answer",
|
|
|
align: 'center',
|
|
|
render: function render(exp, item) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: item.view_answer ? "已查看" : "未查看"
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
// {
|
|
|
// title: "经验值",
|
|
|
// dataIndex: "experience",
|
|
|
// key: "experience",
|
|
|
// align: 'center',
|
|
|
// render: (exp: any, item: any) => {
|
|
|
// return (
|
|
|
// <span>
|
|
|
// <span className="c-green">{item.myself_experience}</span>/
|
|
|
// {item.experience}
|
|
|
// </span>
|
|
|
// );
|
|
|
// },
|
|
|
// },
|
|
|
{
|
|
|
title: "得分/满分",
|
|
|
dataIndex: "user_score",
|
|
|
key: "user_score",
|
|
|
align: 'center',
|
|
|
render: function render(exp, item) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-orange",
|
|
|
children: item.user_score
|
|
|
}), "/", item.game_score]
|
|
|
});
|
|
|
}
|
|
|
}, hasChangeScore && {
|
|
|
title: "调分",
|
|
|
dataIndex: "user_score",
|
|
|
key: "user_score",
|
|
|
align: 'center',
|
|
|
render: function render(value, data, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
|
|
|
min: 0,
|
|
|
max: Number(data.game_score),
|
|
|
defaultValue: value,
|
|
|
onBlur: /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(e) {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
if (!(e.target.value != value)) {
|
|
|
_context.next = 6;
|
|
|
break;
|
|
|
}
|
|
|
_context.next = 3;
|
|
|
return saveChangeScore(objectSpread2_default()(objectSpread2_default()({}, item), {
|
|
|
shixun_challenge_id: data.shixun_challenge_id,
|
|
|
shixunScore: e.target.value
|
|
|
}));
|
|
|
case 3:
|
|
|
res = _context.sent;
|
|
|
console.log('res: ', res);
|
|
|
if (res !== null && res !== void 0 && res.question_comments) {
|
|
|
message/* default.success */.ZP.success("已修改当前评分");
|
|
|
}
|
|
|
case 6:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function (_x) {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}()
|
|
|
});
|
|
|
}
|
|
|
}].filter(function (x) {
|
|
|
return !!x;
|
|
|
});
|
|
|
var outputColumns = [{
|
|
|
title: '评测次数',
|
|
|
dataIndex: 'key',
|
|
|
width: "127px",
|
|
|
key: 'key',
|
|
|
align: 'center',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: record.key
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '详细信息',
|
|
|
dataIndex: 'error_msg',
|
|
|
key: 'error_msg',
|
|
|
align: 'center',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: record.error_msg ? record.error_msg : "--"
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '评测时间',
|
|
|
dataIndex: 'updated_at',
|
|
|
key: 'updated_at',
|
|
|
align: 'center',
|
|
|
width: 200,
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: record.updated_at ? record.updated_at : "--"
|
|
|
});
|
|
|
}
|
|
|
}];
|
|
|
var options = {
|
|
|
selectOnLineNumbers: true,
|
|
|
readOnly: true,
|
|
|
minimap: {
|
|
|
enabled: false
|
|
|
},
|
|
|
scrollBeyondLastLine: false
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [((answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise = answerData.exercise) === null || _answerData$exercise === void 0 ? void 0 : _answerData$exercise.student_commit_status) !== 0 || (answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise2 = answerData.exercise) === null || _answerData$exercise2 === void 0 ? void 0 : _answerData$exercise2.user_exercise_status) !== 0) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt15",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
className: "font16 c-grey-666",
|
|
|
children: "\u9636\u6BB5\u6210\u7EE9"
|
|
|
}), !!(data !== null && data !== void 0 && data.length) && /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
columns: columns,
|
|
|
dataSource: data,
|
|
|
pagination: false
|
|
|
})]
|
|
|
}), !!(challengeData !== null && challengeData !== void 0 && challengeData.length) && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
className: "font16 c-grey-666 mt10",
|
|
|
children: "\u5B9E\u8BAD\u8BE6\u60C5"
|
|
|
}), challengeData === null || challengeData === void 0 ? void 0 : challengeData.map(function (chanllenge, index) {
|
|
|
var _chanllenge$outputs;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt5",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "font16 mr15",
|
|
|
children: [" \u7B2C", chanllenge.position, "\u5173"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
className: "current c-black font16",
|
|
|
to: "/tasks/".concat(chanllenge.game_identifier),
|
|
|
children: chanllenge.name
|
|
|
})]
|
|
|
}), !!(chanllenge !== null && chanllenge !== void 0 && (_chanllenge$outputs = chanllenge.outputs) !== null && _chanllenge$outputs !== void 0 && _chanllenge$outputs.length) && /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
bordered: true,
|
|
|
dataSource: chanllenge.outputs.map(function (out) {
|
|
|
return {
|
|
|
key: out.position,
|
|
|
error_msg: out.output_detail,
|
|
|
updated_at: out.updated_at
|
|
|
};
|
|
|
}),
|
|
|
columns: outputColumns,
|
|
|
pagination: false
|
|
|
}), (chanllenge === null || chanllenge === void 0 ? void 0 : chanllenge.st) === 0 && chanllenge.passed_code && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: componentmodules/* default.shixunWrp */.Z.shixunWrp,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("h2", {
|
|
|
children: ["\u6700\u540E\u4E00\u6B21\u901A\u5173\u7684\u4EE3\u7801\uFF08\u672A\u901A\u5173\u5219\u4E3A\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\uFF09", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-light-black",
|
|
|
children: chanllenge.path
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, {
|
|
|
height: 300,
|
|
|
autoHeight: autoHeight,
|
|
|
language: "python",
|
|
|
theme: "default",
|
|
|
value: chanllenge.passed_code,
|
|
|
options: options
|
|
|
})]
|
|
|
})]
|
|
|
});
|
|
|
})]
|
|
|
}), (0,authority/* isStudent */.dE)() && /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
className: "c-grey-999 mt20 mb20",
|
|
|
value: item === null || item === void 0 ? void 0 : item.question_title
|
|
|
}), item === null || item === void 0 ? void 0 : (_item$shixun = item.shixun) === null || _item$shixun === void 0 ? void 0 : _item$shixun.map(function (shixun, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
|
className: "font16 c-grey-666 mb5",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "mr20",
|
|
|
children: ["\u7B2C", shixun === null || shixun === void 0 ? void 0 : shixun.challenge_position, "\u5173 ", shixun === null || shixun === void 0 ? void 0 : shixun.challenge_name]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: [shixun === null || shixun === void 0 ? void 0 : shixun.challenge_score, "\u5206"]
|
|
|
})]
|
|
|
});
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "mb15"
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var component_Shixun = (Shixun);
|
|
|
// EXTERNAL MODULE: ./node_modules/js-base64/base64.js
|
|
|
var base64 = __webpack_require__(19575);
|
|
|
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/Exercise/Review/index.less?modules
|
|
|
var Reviewmodules = __webpack_require__(37729);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/Review/component/Program.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Program = function Program(_ref) {
|
|
|
var _answerData$exercise, _answerData$exercise2, _answerData$exercise3, _answerData$exercise4, _item$user_answer;
|
|
|
var item = _ref.item,
|
|
|
answerData = _ref.answerData,
|
|
|
autoHeight = _ref.autoHeight;
|
|
|
var _useState = (0,react.useState)([]),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
data = _useState2[0],
|
|
|
setData = _useState2[1];
|
|
|
(0,react.useEffect)(function () {
|
|
|
var _item$evaluate_codes;
|
|
|
if ((item === null || item === void 0 ? void 0 : (_item$evaluate_codes = item.evaluate_codes) === null || _item$evaluate_codes === void 0 ? void 0 : _item$evaluate_codes.length) > 0) {
|
|
|
var _item$evaluate_codes2;
|
|
|
setData(item === null || item === void 0 ? void 0 : (_item$evaluate_codes2 = item.evaluate_codes) === null || _item$evaluate_codes2 === void 0 ? void 0 : _item$evaluate_codes2.map(function (code, index) {
|
|
|
return {
|
|
|
key: index + 1,
|
|
|
error_msg: code !== null && code !== void 0 && code.error_msg ? base64.Base64.decode(code === null || code === void 0 ? void 0 : code.error_msg) : '',
|
|
|
created_at: code.created_at
|
|
|
};
|
|
|
}));
|
|
|
} else {
|
|
|
setData([{
|
|
|
key: "--",
|
|
|
error_msg: "--"
|
|
|
}]);
|
|
|
}
|
|
|
}, [item === null || item === void 0 ? void 0 : item.evaluate_codes]);
|
|
|
var columns = [{
|
|
|
title: '评测序号',
|
|
|
dataIndex: 'key',
|
|
|
width: "127px",
|
|
|
key: 'key',
|
|
|
align: 'center',
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: record.key
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '评测时间',
|
|
|
dataIndex: 'created_at',
|
|
|
key: 'created_at',
|
|
|
align: 'center',
|
|
|
width: 200,
|
|
|
render: function render(text, record) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: record.created_at ? moment_default()(record.created_at).format('YYYY-MM-DD HH:mm') : "--"
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
title: '评测结果',
|
|
|
dataIndex: 'error_msg',
|
|
|
key: 'error_msg',
|
|
|
align: 'center',
|
|
|
render: function render(text, record) {
|
|
|
var _record$error_msg;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: record.error_msg ? ((_record$error_msg = record.error_msg) === null || _record$error_msg === void 0 ? void 0 : _record$error_msg.length) > 1000 ? record.error_msg.substring(0, 1000) + "..." : record.error_msg : "--"
|
|
|
});
|
|
|
}
|
|
|
}];
|
|
|
var options = {
|
|
|
selectOnLineNumbers: true,
|
|
|
readOnly: true,
|
|
|
minimap: {
|
|
|
enabled: false
|
|
|
},
|
|
|
scrollBeyondLastLine: false
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "mt15 mb15",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: item === null || item === void 0 ? void 0 : item.description
|
|
|
})
|
|
|
}), (!!(answerData !== null && answerData !== void 0 && (_answerData$exercise = answerData.exercise) !== null && _answerData$exercise !== void 0 && _answerData$exercise.student_commit_status) && (answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise2 = answerData.exercise) === null || _answerData$exercise2 === void 0 ? void 0 : _answerData$exercise2.student_commit_status) !== 0 || !!(answerData !== null && answerData !== void 0 && (_answerData$exercise3 = answerData.exercise) !== null && _answerData$exercise3 !== void 0 && _answerData$exercise3.user_exercise_status) && (answerData === null || answerData === void 0 ? void 0 : (_answerData$exercise4 = answerData.exercise) === null || _answerData$exercise4 === void 0 ? void 0 : _answerData$exercise4.user_exercise_status) !== 0) && /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
className: "mt5",
|
|
|
bordered: true,
|
|
|
dataSource: data,
|
|
|
columns: columns,
|
|
|
pagination: false
|
|
|
}), !!(item !== null && item !== void 0 && (_item$user_answer = item.user_answer) !== null && _item$user_answer !== void 0 && _item$user_answer.length) && (item === null || item === void 0 ? void 0 : item.passed_code) && /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
className: Reviewmodules/* default.shixunWrp */.Z.shixunWrp,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("h3", {
|
|
|
children: "\u7B2C\u4E00\u6B21\u8BC4\u6D4B\u901A\u8FC7\u7684\u4EE3\u7801\uFF08\u672A\u901A\u5173\u5219\u4E3A\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\uFF09"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, {
|
|
|
style: {
|
|
|
border: '1px solid #ccc'
|
|
|
},
|
|
|
height: 300,
|
|
|
language: "python",
|
|
|
theme: "vs-light",
|
|
|
value: item !== null && item !== void 0 && item.passed_code ? base64.Base64.decode(item === null || item === void 0 ? void 0 : item.passed_code) : "",
|
|
|
autoHeight: autoHeight,
|
|
|
options: options
|
|
|
})]
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var component_Program = (Program);
|
|
|
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/Exercise/Export/components/Head/index.tsx + 5 modules
|
|
|
var Head = __webpack_require__(92170);
|
|
|
// EXTERNAL MODULE: ./node_modules/html2pdf.js/dist/html2pdf.js
|
|
|
var html2pdf = __webpack_require__(80599);
|
|
|
var html2pdf_default = /*#__PURE__*/__webpack_require__.n(html2pdf);
|
|
|
// EXTERNAL MODULE: ./src/utils/enum.ts
|
|
|
var utils_enum = __webpack_require__(70960);
|
|
|
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/Exercise/Review/component/AnswerComments/index.tsx + 1 modules
|
|
|
var AnswerComments = __webpack_require__(37537);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/Export/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["exercise", "globalSetting", "loading", "user", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var PageCount = 30;
|
|
|
var TextArea = input/* default.TextArea */.Z.TextArea;
|
|
|
var questionType = (/* unused pure expression or super */ null && (['单选题', '多选题', '判断题', '填空题', '简答题', '实训题', '编程题']));
|
|
|
var Export = function Export(_ref) {
|
|
|
var _userInfo$course, _exportData$exercise3, _exportData$exercise_, _exportData$exercise4, _exportData$exercise5, _exportData$exercise6, _exportData$exercise7;
|
|
|
var exercise = _ref.exercise,
|
|
|
globalSetting = _ref.globalSetting,
|
|
|
loading = _ref.loading,
|
|
|
user = _ref.user,
|
|
|
dispatch = _ref.dispatch,
|
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
var userInfo = user.userInfo;
|
|
|
var _useState = (0,react.useState)({}),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
changeScoreData = _useState2[0],
|
|
|
setChangeScoreData = _useState2[1];
|
|
|
var exportElement = (0,react.useRef)();
|
|
|
var isExportBlank = (0,react.useRef)(false);
|
|
|
var _useState3 = (0,react.useState)(false),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
isLoading = _useState4[0],
|
|
|
setIsLoading = _useState4[1];
|
|
|
var _useState5 = (0,react.useState)({}),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
exportData = _useState6[0],
|
|
|
setExportData = _useState6[1];
|
|
|
var _useState7 = (0,react.useState)(new (jszip_min_default())()),
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
zip = _useState8[0],
|
|
|
setZip = _useState8[1];
|
|
|
var _useState9 = (0,react.useState)([]),
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
allStudents = _useState10[0],
|
|
|
setAllStudents = _useState10[1];
|
|
|
var _useState11 = (0,react.useState)(false),
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
autoHeight = _useState12[0],
|
|
|
setAutoHeight = _useState12[1];
|
|
|
var _useState13 = (0,react.useState)(false),
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
isshowanswer = _useState14[0],
|
|
|
setisshowanswer = _useState14[1]; //导出空白试卷加答案时显示答案
|
|
|
var _useState15 = (0,react.useState)(false),
|
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
|
userScoreVisible = _useState16[0],
|
|
|
setUserScoreVisible = _useState16[1]; //导出所有学生试卷时需要显示学生得分
|
|
|
var _useState17 = (0,react.useState)(false),
|
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
|
userCommentVisible = _useState18[0],
|
|
|
setUserCommentVisible = _useState18[1]; //导出所有学生试卷时需要显示评语
|
|
|
var _useState19 = (0,react.useState)(false),
|
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
|
ismodal = _useState20[0],
|
|
|
setismodal = _useState20[1];
|
|
|
(0,react.useEffect)(function () {
|
|
|
if (userInfo !== null && userInfo !== void 0 && userInfo.login) {
|
|
|
getData();
|
|
|
}
|
|
|
try {
|
|
|
setAllStudents(JSON.parse(localStorage.total_exercise_users));
|
|
|
} catch (e) {}
|
|
|
}, [params.userId, params.coursesId, params.exerciseId, userInfo]);
|
|
|
var handleRemoveSurplusCanvas = function handleRemoveSurplusCanvas() {
|
|
|
document.querySelectorAll('canvas').forEach(function (item) {
|
|
|
(!item.clientWidth || !item.clientHeight) && item.remove();
|
|
|
});
|
|
|
};
|
|
|
var scrollView = function scrollView() {
|
|
|
document.body.scrollIntoView();
|
|
|
};
|
|
|
var randomQuestion = function randomQuestion(res) {
|
|
|
var _res$exercise_answer_, _res$exercise, _res$exercise2;
|
|
|
var random_id = res === null || res === void 0 ? void 0 : (_res$exercise_answer_ = res.exercise_answer_user) === null || _res$exercise_answer_ === void 0 ? void 0 : _res$exercise_answer_.user_id;
|
|
|
if (res !== null && res !== void 0 && (_res$exercise = res.exercise) !== null && _res$exercise !== void 0 && _res$exercise.question_random || res !== null && res !== void 0 && (_res$exercise2 = res.exercise) !== null && _res$exercise2 !== void 0 && _res$exercise2.choice_random) {
|
|
|
var _res$exercise_questio;
|
|
|
var _key = 1;
|
|
|
res.exercise.question_random = res === null || res === void 0 ? void 0 : (_res$exercise_questio = res.exercise_question_types) === null || _res$exercise_questio === void 0 ? void 0 : _res$exercise_questio.map(function (item) {
|
|
|
var _res$exercise3, _res$exercise4;
|
|
|
if (res !== null && res !== void 0 && (_res$exercise3 = res.exercise) !== null && _res$exercise3 !== void 0 && _res$exercise3.choice_random) {
|
|
|
if (item.question_type === 0 || item.question_type === 1) {
|
|
|
item.items.map(function (i) {
|
|
|
i.question_choices = (0,util/* randomArray */.M2)(i.question_choices, random_id);
|
|
|
return i;
|
|
|
});
|
|
|
}
|
|
|
if (item.question_type === 7) {
|
|
|
item.items.forEach(function (i) {
|
|
|
i.sub_exercise_questions.forEach(function (k) {
|
|
|
k.question_choices = (0,util/* randomArray */.M2)(k.question_choices, random_id);
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
if (res !== null && res !== void 0 && (_res$exercise4 = res.exercise) !== null && _res$exercise4 !== void 0 && _res$exercise4.question_random) {
|
|
|
item.items = (0,util/* randomArray */.M2)(item.items, random_id);
|
|
|
}
|
|
|
item.items.map(function (i) {
|
|
|
i.question_num = _key;
|
|
|
_key++;
|
|
|
return i;
|
|
|
});
|
|
|
return item;
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
var getData = /*#__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:
|
|
|
dispatch({
|
|
|
type: "exercise/getExerciseExportHeadData",
|
|
|
payload: {
|
|
|
id: params.exerciseId || params.categoryId,
|
|
|
identify: params.userId || null
|
|
|
}
|
|
|
});
|
|
|
if (!params.userId) {
|
|
|
_context.next = 9;
|
|
|
break;
|
|
|
}
|
|
|
_context.next = 4;
|
|
|
return dispatch({
|
|
|
type: "exercise/getReviewExercise",
|
|
|
payload: {
|
|
|
exerciseId: params.exerciseId,
|
|
|
login: params.userId
|
|
|
}
|
|
|
});
|
|
|
case 4:
|
|
|
res = _context.sent;
|
|
|
randomQuestion(res);
|
|
|
isExportBlank.current = false;
|
|
|
_context.next = 13;
|
|
|
break;
|
|
|
case 9:
|
|
|
_context.next = 11;
|
|
|
return dispatch({
|
|
|
type: 'exercise/editExercise',
|
|
|
payload: {
|
|
|
coursesId: params.coursesId,
|
|
|
categoryId: params.exerciseId
|
|
|
}
|
|
|
});
|
|
|
case 11:
|
|
|
res = _context.sent;
|
|
|
isExportBlank.current = true;
|
|
|
case 13:
|
|
|
setExportData(objectSpread2_default()({}, res || {}));
|
|
|
setTimeout(function () {
|
|
|
var nbPages = 1;
|
|
|
var sourceHtml = document.getElementById("export-id-all");
|
|
|
var max_page_height = 860; //Is the max size of page i want. in px
|
|
|
var current_page_height = 0; //
|
|
|
|
|
|
// let dom = Array.from(document.getElementById("export-all").children);
|
|
|
// dom.map((item, key) => {
|
|
|
// current_page_height += item.scrollHeight
|
|
|
// if (max_page_height <= current_page_height) {
|
|
|
// current_page_height = item.scrollHeight;
|
|
|
// ++nbPages;
|
|
|
// let li = document.createElement("li")
|
|
|
// li.className = 'html2pdf__page-break'
|
|
|
// li.innerHTML = ' '
|
|
|
// document.getElementById("export-all").insertBefore(li, item)
|
|
|
// }
|
|
|
// })
|
|
|
}, 1500);
|
|
|
case 15:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function getData() {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var download = function download() {
|
|
|
zip.generateAsync({
|
|
|
type: "blob"
|
|
|
}).then(function (content) {
|
|
|
var _exportData$exercise, _exercise$exerciseExp, _exportData$exercise2;
|
|
|
var link = document.createElement('a');
|
|
|
link.href = window.URL.createObjectURL(content);
|
|
|
link.download = Object.keys(zip.files).length > 1 ? (exportData === null || exportData === void 0 ? void 0 : (_exportData$exercise = exportData.exercise) === null || _exportData$exercise === void 0 ? void 0 : _exportData$exercise.exercise_name) + '.zip' : ((exercise === null || exercise === void 0 ? void 0 : (_exercise$exerciseExp = exercise.exerciseExportHeadData) === null || _exercise$exerciseExp === void 0 ? void 0 : _exercise$exerciseExp.user) || (exportData === null || exportData === void 0 ? void 0 : (_exportData$exercise2 = exportData.exercise) === null || _exportData$exercise2 === void 0 ? void 0 : _exportData$exercise2.exercise_name)) + '.zip';
|
|
|
document.body.appendChild(link);
|
|
|
var evt = document.createEvent("MouseEvents");
|
|
|
evt.initEvent("click", false, false);
|
|
|
link.dispatchEvent(evt);
|
|
|
document.body.removeChild(link);
|
|
|
setZip(new (jszip_min_default())());
|
|
|
});
|
|
|
setisshowanswer(false);
|
|
|
setUserCommentVisible(false);
|
|
|
setUserScoreVisible(false);
|
|
|
setAutoHeight(false);
|
|
|
};
|
|
|
var exportReport = /*#__PURE__*/function () {
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6(type) {
|
|
|
var _exercise$exerciseExp2;
|
|
|
var nums, modal, pages, title, _exercise$exerciseExp3, _exercise$exerciseExp4, opt, worker, _loop, i, next, _next;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context8) {
|
|
|
while (1) switch (_context8.prev = _context8.next) {
|
|
|
case 0:
|
|
|
_next = function _next3() {
|
|
|
_next = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context7) {
|
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
|
case 0:
|
|
|
nums++;
|
|
|
isExportBlank.current = false;
|
|
|
scrollView();
|
|
|
_context7.next = 5;
|
|
|
return dispatch({
|
|
|
type: "exercise/getExerciseExportHeadData",
|
|
|
payload: {
|
|
|
id: params.exerciseId || params.categoryId,
|
|
|
identify: allStudents[nums - 1]['user_login']
|
|
|
}
|
|
|
});
|
|
|
case 5:
|
|
|
_context7.next = 7;
|
|
|
return dispatch({
|
|
|
type: "exercise/getReviewExercise",
|
|
|
payload: {
|
|
|
exerciseId: params.exerciseId,
|
|
|
login: allStudents[nums - 1]['user_login']
|
|
|
}
|
|
|
});
|
|
|
case 7:
|
|
|
res = _context7.sent;
|
|
|
randomQuestion(res);
|
|
|
setExportData(objectSpread2_default()({}, res || {}));
|
|
|
setTimeout( /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
|
|
|
var worker, _loop2, _i;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context6) {
|
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
|
case 0:
|
|
|
handleRemoveSurplusCanvas();
|
|
|
// const pdfUrl = await html2pdf()
|
|
|
// .from(document.getElementById("export-all"))
|
|
|
// .set(opt)
|
|
|
// // .toPdf()
|
|
|
// .output('blob')
|
|
|
// setIsLoading(false)
|
|
|
worker = html2pdf_default()();
|
|
|
_loop2 = /*#__PURE__*/regeneratorRuntime_default()().mark(function _loop2(i) {
|
|
|
return regeneratorRuntime_default()().wrap(function _loop2$(_context5) {
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
case 0:
|
|
|
_context5.next = 2;
|
|
|
return worker.set(opt).from(pages[i]).toContainer().toCanvas().toPdf().get('pdf').then( /*#__PURE__*/function () {
|
|
|
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(pdf) {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context4) {
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
case 0:
|
|
|
if (!(i < pages.length - 1)) {
|
|
|
_context4.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
_context4.next = 3;
|
|
|
return pdf.addPage();
|
|
|
case 3:
|
|
|
case "end":
|
|
|
return _context4.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}));
|
|
|
return function (_x3) {
|
|
|
return _ref6.apply(this, arguments);
|
|
|
};
|
|
|
}());
|
|
|
case 2:
|
|
|
case "end":
|
|
|
return _context5.stop();
|
|
|
}
|
|
|
}, _loop2);
|
|
|
});
|
|
|
_i = 0;
|
|
|
case 4:
|
|
|
if (!(_i < pages.length)) {
|
|
|
_context6.next = 9;
|
|
|
break;
|
|
|
}
|
|
|
return _context6.delegateYield(_loop2(_i), "t0", 6);
|
|
|
case 6:
|
|
|
_i++;
|
|
|
_context6.next = 4;
|
|
|
break;
|
|
|
case 9:
|
|
|
zip.file("".concat(allStudents[nums - 1]['user_name'], "-").concat(moment_default()().format('YYYY-MM-DD HH:mm:ss'), ".pdf"), worker.output("blob"));
|
|
|
modal.update({
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u5F53\u524D\u8FDB\u5EA6: ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-blue",
|
|
|
children: nums + 1
|
|
|
}), "/", allStudents === null || allStudents === void 0 ? void 0 : allStudents.length]
|
|
|
})
|
|
|
});
|
|
|
if (nums == (allStudents === null || allStudents === void 0 ? void 0 : allStudents.length)) {
|
|
|
modal.destroy();
|
|
|
setIsLoading(false);
|
|
|
download();
|
|
|
} else {
|
|
|
next();
|
|
|
}
|
|
|
case 12:
|
|
|
case "end":
|
|
|
return _context6.stop();
|
|
|
}
|
|
|
}, _callee4);
|
|
|
})), 2600);
|
|
|
case 11:
|
|
|
case "end":
|
|
|
return _context7.stop();
|
|
|
}
|
|
|
}, _callee5);
|
|
|
}));
|
|
|
return _next.apply(this, arguments);
|
|
|
};
|
|
|
next = function _next2() {
|
|
|
return _next.apply(this, arguments);
|
|
|
};
|
|
|
if (type === "all") {
|
|
|
isExportBlank.current = false;
|
|
|
} else if (!params.userId) {
|
|
|
isExportBlank.current = true;
|
|
|
}
|
|
|
scrollView();
|
|
|
setAutoHeight(true);
|
|
|
nums = 0;
|
|
|
if (type !== 'all') setIsLoading(true);
|
|
|
// else
|
|
|
modal = es_modal/* default.info */.Z.info({
|
|
|
width: 460,
|
|
|
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u6B63\u5728\u5BFC\u51FA\u8BD5\u5377,", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-red",
|
|
|
children: "\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3"
|
|
|
})]
|
|
|
}),
|
|
|
content: type === 'all' ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u5F53\u524D\u8FDB\u5EA6: ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-blue",
|
|
|
children: nums + 1
|
|
|
}), "/", allStudents === null || allStudents === void 0 ? void 0 : allStudents.length]
|
|
|
}) : null,
|
|
|
maskClosable: false,
|
|
|
className: Exportmodules.modal,
|
|
|
onOk: function onOk() {}
|
|
|
});
|
|
|
handleRemoveSurplusCanvas();
|
|
|
_context8.next = 11;
|
|
|
return new Promise(function (resolve, reject) {
|
|
|
setTimeout(function () {
|
|
|
resolve('');
|
|
|
}, 1000);
|
|
|
});
|
|
|
case 11:
|
|
|
// const opt = {
|
|
|
// // margin: [10, 10],
|
|
|
// html2canvas: { letterRendering: true, useCORS: true, allowTaint: false },
|
|
|
// // filename: 'test.pdf',
|
|
|
// // enableLinks: false,
|
|
|
// jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' }
|
|
|
// // pagebreak: { mode: ['avoid-all', 'css', 'legacy'] },
|
|
|
// // image: { type: 'jpeg', quality: 0.98 }
|
|
|
// }
|
|
|
// let title = `${moment().format('YYYY-MM-DD HH:mm:ss')}`;
|
|
|
// if (exercise.exerciseExportHeadData?.user) {
|
|
|
// title = `${exercise.exerciseExportHeadData?.student_id || ''}${exercise.exerciseExportHeadData?.user}`
|
|
|
// }
|
|
|
// const pdfUrl = await html2pdf()
|
|
|
// .from(document.getElementById("export-all"))
|
|
|
// .set(opt)
|
|
|
// // .toPdf()
|
|
|
// .output('blob')
|
|
|
// setIsLoading(false)
|
|
|
// if (type !== 'all')
|
|
|
// zip.file(`${title}-${moment().format('YYYY-MM-DD HH:mm:ss')}.pdf`, pdfUrl);
|
|
|
// if (type !== 'all') {
|
|
|
// modal.destroy()
|
|
|
// download()
|
|
|
// return;
|
|
|
// }
|
|
|
pages = exportElement.current.children;
|
|
|
console.log(pages);
|
|
|
title = "".concat(moment_default()().format('YYYY-MM-DD HH:mm:ss'));
|
|
|
if ((_exercise$exerciseExp2 = exercise.exerciseExportHeadData) !== null && _exercise$exerciseExp2 !== void 0 && _exercise$exerciseExp2.user) {
|
|
|
title = "".concat(((_exercise$exerciseExp3 = exercise.exerciseExportHeadData) === null || _exercise$exerciseExp3 === void 0 ? void 0 : _exercise$exerciseExp3.student_id) || '').concat((_exercise$exerciseExp4 = exercise.exerciseExportHeadData) === null || _exercise$exerciseExp4 === void 0 ? void 0 : _exercise$exerciseExp4.user);
|
|
|
}
|
|
|
opt = {
|
|
|
html2canvas: {
|
|
|
letterRendering: true,
|
|
|
useCORS: true,
|
|
|
allowTaint: false
|
|
|
},
|
|
|
jsPDF: {
|
|
|
unit: 'in',
|
|
|
format: 'letter',
|
|
|
orientation: 'portrait'
|
|
|
},
|
|
|
pagebreak: {
|
|
|
mode: ['avoid-all']
|
|
|
}
|
|
|
};
|
|
|
worker = html2pdf_default()();
|
|
|
_loop = /*#__PURE__*/regeneratorRuntime_default()().mark(function _loop(i) {
|
|
|
return regeneratorRuntime_default()().wrap(function _loop$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
_context3.next = 2;
|
|
|
return worker.set(opt).from(pages[i]).toContainer().toCanvas().toPdf().get('pdf').then( /*#__PURE__*/function () {
|
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(pdf) {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
case 0:
|
|
|
if (!(i < pages.length - 1)) {
|
|
|
_context2.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
_context2.next = 3;
|
|
|
return pdf.addPage();
|
|
|
case 3:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return function (_x2) {
|
|
|
return _ref4.apply(this, arguments);
|
|
|
};
|
|
|
}());
|
|
|
case 2:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _loop);
|
|
|
});
|
|
|
i = 0;
|
|
|
case 19:
|
|
|
if (!(i < pages.length)) {
|
|
|
_context8.next = 24;
|
|
|
break;
|
|
|
}
|
|
|
return _context8.delegateYield(_loop(i), "t0", 21);
|
|
|
case 21:
|
|
|
i++;
|
|
|
_context8.next = 19;
|
|
|
break;
|
|
|
case 24:
|
|
|
if (!!(allStudents !== null && allStudents !== void 0 && allStudents.length) && type === 'all') {
|
|
|
next();
|
|
|
} else {
|
|
|
// zip.file(`${shixunWorkReport.username}.pdf`, pdfUrl);
|
|
|
zip.file("".concat(title, ".pdf"), worker.output("blob"), {
|
|
|
base64: false
|
|
|
});
|
|
|
// worker.save()
|
|
|
modal.destroy();
|
|
|
setIsLoading(false);
|
|
|
download();
|
|
|
}
|
|
|
// openNewWindow(pdfUrl)
|
|
|
case 25:
|
|
|
case "end":
|
|
|
return _context8.stop();
|
|
|
}
|
|
|
}, _callee6);
|
|
|
}));
|
|
|
return function exportReport(_x) {
|
|
|
return _ref3.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var setPdfFooter = function setPdfFooter(pdf) {
|
|
|
var totalPages = pdf.internal.getNumberOfPages();
|
|
|
for (var pageNumber = 1; pageNumber <= totalPages; pageNumber += 1) {
|
|
|
pdf.setPage(pageNumber);
|
|
|
pdf.setFontSize(9);
|
|
|
pdf.setTextColor('#6a6a6a');
|
|
|
pdf.text("".concat(pageNumber, " / ").concat(totalPages), pdf.internal.pageSize.getWidth() - 20, pdf.internal.pageSize.getHeight() - 6);
|
|
|
}
|
|
|
};
|
|
|
var renderQuestion = function renderQuestion(item, i) {
|
|
|
var _item$question_choice, _item$question_choice2, _item$question_choice3, _changeScoreData$item, _item$user_answer4, _item$user_answer_lig, _item$user_answer5, _item$sub_exercise_qu, _item$standard_answer, _item$standard_answer2, _item$standard_answer3, _item$standard_answer4;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
display: 'flex'
|
|
|
},
|
|
|
className: Exportmodules.programTitle,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
style: {
|
|
|
flexShrink: 0
|
|
|
},
|
|
|
className: "font18",
|
|
|
children: [i, "."]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: item.question_title
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
style: {
|
|
|
flexShrink: 0
|
|
|
},
|
|
|
className: "font16",
|
|
|
children: ["\uFF08", (item === null || item === void 0 ? void 0 : item.question_type) === 7 ? "\u5171".concat(item === null || item === void 0 ? void 0 : item.sub_q_count, "\u5C0F\u9898") : '', " ", item.question_score, "\u5206\uFF09"]
|
|
|
})]
|
|
|
}),
|
|
|
// 单选题
|
|
|
item.question_type === utils_enum/* QuestionType.Single */.c.Single && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
|
children: (_item$question_choice = item.question_choices) === null || _item$question_choice === void 0 ? void 0 : _item$question_choice.map(function (val, key) {
|
|
|
var _item$user_answer;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: "25px",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
width: 25,
|
|
|
overflow: "hidden"
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
checked: (_item$user_answer = item.user_answer) === null || _item$user_answer === void 0 ? void 0 : _item$user_answer.includes(val.choice_id),
|
|
|
style: {
|
|
|
width: 25
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: "1",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: val.choice_text || ""
|
|
|
})
|
|
|
})]
|
|
|
}, key);
|
|
|
})
|
|
|
}),
|
|
|
// 多选题
|
|
|
item.question_type === utils_enum/* QuestionType.Multiple */.c.Multiple && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
|
children: (_item$question_choice2 = item.question_choices) === null || _item$question_choice2 === void 0 ? void 0 : _item$question_choice2.map(function (val, key) {
|
|
|
var _item$user_answer2;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: "25px",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
width: 25,
|
|
|
overflow: "hidden"
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
checked: (_item$user_answer2 = item.user_answer) === null || _item$user_answer2 === void 0 ? void 0 : _item$user_answer2.includes(val.choice_id),
|
|
|
style: {
|
|
|
width: 25
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: "1",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: val.choice_text || ""
|
|
|
})
|
|
|
})]
|
|
|
}, key);
|
|
|
// return <div className=""><Checkbox checked={item.user_answer?.includes(val.choice_id)}>
|
|
|
// {val.choice_text}
|
|
|
// </Checkbox></div>
|
|
|
})
|
|
|
}),
|
|
|
// 判断题
|
|
|
item.question_type === utils_enum/* QuestionType.Judge */.c.Judge && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Exportmodules.flexRow,
|
|
|
children: (_item$question_choice3 = item.question_choices) === null || _item$question_choice3 === void 0 ? void 0 : _item$question_choice3.map(function (val, key) {
|
|
|
var _item$user_answer3;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: "25px",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
width: 25,
|
|
|
overflow: "hidden"
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
checked: (_item$user_answer3 = item.user_answer) === null || _item$user_answer3 === void 0 ? void 0 : _item$user_answer3.includes(val.choice_id),
|
|
|
style: {
|
|
|
width: 25
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: "1",
|
|
|
children: val.choice_text
|
|
|
})]
|
|
|
}, key);
|
|
|
// return <div className=""><Radio checked={item.user_answer?.includes(val.choice_id)}>
|
|
|
// {val.choice_text}
|
|
|
// </Radio></div>
|
|
|
})
|
|
|
}), item.question_type === utils_enum/* QuestionType.Fill */.c.Fill && !isExportBlank.current && /*#__PURE__*/(0,jsx_runtime.jsx)(Fill/* default */.Z, {
|
|
|
item: item,
|
|
|
answerData: exportData,
|
|
|
changeScoreData: changeScoreData,
|
|
|
textValue: (_changeScoreData$item = changeScoreData[item.q_position]) === null || _changeScoreData$item === void 0 ? void 0 : _changeScoreData$item.text,
|
|
|
textOnChange: function textOnChange(value) {
|
|
|
changeScoreData[item.q_position].text = value;
|
|
|
setChangeScoreData(objectSpread2_default()({}, changeScoreData));
|
|
|
},
|
|
|
seeAnswerVisible: false
|
|
|
}), item.question_type === utils_enum/* QuestionType.Shixun */.c.Shixun && /*#__PURE__*/(0,jsx_runtime.jsx)(component_Shixun, {
|
|
|
item: item,
|
|
|
answerData: exportData,
|
|
|
hasChangeScore: false,
|
|
|
autoHeight: autoHeight
|
|
|
}), item.question_type === utils_enum/* QuestionType.Subjective */.c.Subjective && item !== null && item !== void 0 && (_item$user_answer4 = item.user_answer) !== null && _item$user_answer4 !== void 0 && _item$user_answer4[0] ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Exportmodules.simpleBg,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "font14 c-light-primary mb5",
|
|
|
children: "\u5B66\u751F\u7B54\u9898"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: userCommentVisible ? /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: item === null || item === void 0 ? void 0 : (_item$user_answer_lig = item.user_answer_light) === null || _item$user_answer_lig === void 0 ? void 0 : _item$user_answer_lig[0]
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: item === null || item === void 0 ? void 0 : (_item$user_answer5 = item.user_answer) === null || _item$user_answer5 === void 0 ? void 0 : _item$user_answer5[0]
|
|
|
})
|
|
|
})]
|
|
|
}) : null, item.question_type === utils_enum/* QuestionType.Program */.c.Program && /*#__PURE__*/(0,jsx_runtime.jsx)(component_Program, {
|
|
|
item: item,
|
|
|
answerData: exportData,
|
|
|
autoHeight: autoHeight
|
|
|
}), item.question_type === utils_enum/* QuestionType.Combine */.c.Combine && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
|
children: (_item$sub_exercise_qu = item.sub_exercise_questions) === null || _item$sub_exercise_qu === void 0 ? void 0 : _item$sub_exercise_qu.map(function (val, key) {
|
|
|
var _val$question_choices, _val$standard_answer;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
marginLeft: 10
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
style: {
|
|
|
fontSize: '16px'
|
|
|
},
|
|
|
children: [i, ".", key + 1, "\uFF08\u5355\u9009\u9898\uFF09", val === null || val === void 0 ? void 0 : val.question_title, "\uFF08", val === null || val === void 0 ? void 0 : val.question_score, "\u5206\uFF09"]
|
|
|
}), (_val$question_choices = val.question_choices) === null || _val$question_choices === void 0 ? void 0 : _val$question_choices.map(function (vals, keys) {
|
|
|
var _val$user_answer;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: "25px",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
width: 25,
|
|
|
overflow: "hidden"
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
checked: (_val$user_answer = val.user_answer) === null || _val$user_answer === void 0 ? void 0 : _val$user_answer.includes(vals.choice_id),
|
|
|
style: {
|
|
|
width: 25
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: "1",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: vals.choice_text || ""
|
|
|
})
|
|
|
})]
|
|
|
}, keys);
|
|
|
}), (val === null || val === void 0 ? void 0 : val.standard_answer_show) && isshowanswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "font16 ",
|
|
|
children: ["\u6B63\u786E\u7B54\u6848\uFF1A", val === null || val === void 0 ? void 0 : val.standard_answer_show]
|
|
|
}), ((val === null || val === void 0 ? void 0 : val.standard_answer_show) || (val === null || val === void 0 ? void 0 : (_val$standard_answer = val.standard_answer) === null || _val$standard_answer === void 0 ? void 0 : _val$standard_answer.length) > 0) && isshowanswer && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
style: {
|
|
|
marginTop: 14
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "font16 ",
|
|
|
children: "\u89E3\u6790\uFF1A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
className: Exportmodules.renderHtml,
|
|
|
value: (val === null || val === void 0 ? void 0 : val.analysis) || '暂无解析'
|
|
|
})]
|
|
|
})]
|
|
|
});
|
|
|
})
|
|
|
}), isshowanswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
marginTop: 10
|
|
|
},
|
|
|
children: [(item === null || item === void 0 ? void 0 : item.question_type) < 3 && (item === null || item === void 0 ? void 0 : item.standard_answer_show) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "font16 ",
|
|
|
children: ["\u6B63\u786E\u7B54\u6848\uFF1A", item === null || item === void 0 ? void 0 : item.standard_answer_show]
|
|
|
}), !!(item !== null && item !== void 0 && (_item$standard_answer = item.standard_answer) !== null && _item$standard_answer !== void 0 && _item$standard_answer.length) && isshowanswer && (item === null || item === void 0 ? void 0 : item.question_type) === 3 && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: item === null || item === void 0 ? void 0 : (_item$standard_answer2 = item.standard_answer) === null || _item$standard_answer2 === void 0 ? void 0 : _item$standard_answer2.map(function (answer, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: ["\u53C2\u8003\u7B54\u6848\uFF1A\uFF08\u586B\u7A7A", index + 1, "\uFF09:"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
|
|
|
autoSize: true,
|
|
|
disabled: true,
|
|
|
value: answer === null || answer === void 0 ? void 0 : answer.answer_text[0]
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
})
|
|
|
}), (item === null || item === void 0 ? void 0 : item.standard_answer) && (item === null || item === void 0 ? void 0 : item.question_type) === 4 && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
className: "mt10 mb0",
|
|
|
children: "\u53C2\u8003\u7B54\u6848\uFF1A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
border: "1px solid #eee",
|
|
|
background: "#f5f5f5",
|
|
|
borderRadius: 4,
|
|
|
padding: 5
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: item === null || item === void 0 ? void 0 : (_item$standard_answer3 = item.standard_answer) === null || _item$standard_answer3 === void 0 ? void 0 : _item$standard_answer3[0]
|
|
|
})
|
|
|
})]
|
|
|
}), (item === null || item === void 0 ? void 0 : item.question_type) <= 4 && ((item === null || item === void 0 ? void 0 : item.standard_answer_show) || (item === null || item === void 0 ? void 0 : (_item$standard_answer4 = item.standard_answer) === null || _item$standard_answer4 === void 0 ? void 0 : _item$standard_answer4.length) > 0) && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
style: {
|
|
|
marginTop: 14
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "font16 ",
|
|
|
children: "\u89E3\u6790\uFF1A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
className: Exportmodules.renderHtml,
|
|
|
value: (item === null || item === void 0 ? void 0 : item.analysis) || '暂无解析'
|
|
|
})]
|
|
|
})]
|
|
|
}), userScoreVisible && !Number.isNaN(parseFloat(item === null || item === void 0 ? void 0 : item.user_score)) && (item === null || item === void 0 ? void 0 : item.question_type) !== utils_enum/* QuestionType.Shixun */.c.Shixun && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
color: '#0152d9'
|
|
|
},
|
|
|
children: "\u5B66\u751F\u5F97\u5206\uFF1A"
|
|
|
}), item === null || item === void 0 ? void 0 : item.user_score, "\u5206"]
|
|
|
}), (item === null || item === void 0 ? void 0 : item.answer_comments) && userCommentVisible && /*#__PURE__*/(0,jsx_runtime.jsx)(AnswerComments/* default */.Z, {
|
|
|
list: item === null || item === void 0 ? void 0 : item.answer_comments
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {
|
|
|
style: isExportBlank.current ? {
|
|
|
marginTop: 30
|
|
|
} : {}
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
|
|
|
//转换中文
|
|
|
var toChinesNum = function toChinesNum(num) {
|
|
|
var changeNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九']; //changeNum[0] = "零"
|
|
|
var unit = ["", "十", "百", "千", "万"];
|
|
|
num = parseInt(num);
|
|
|
var getWan = function getWan(temp) {
|
|
|
var strArr = temp.toString().split("").reverse();
|
|
|
var newNum = "";
|
|
|
for (var i = 0; i < strArr.length; i++) {
|
|
|
newNum = (i == 0 && strArr[i] == 0 ? "" : i > 0 && strArr[i] == 0 && strArr[i - 1] == 0 ? "" : changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i])) + newNum;
|
|
|
}
|
|
|
return newNum;
|
|
|
};
|
|
|
var overWan = Math.floor(num / 10000);
|
|
|
var noWan = num % 10000;
|
|
|
if (noWan.toString().length < 4) noWan = "0" + noWan;
|
|
|
return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num);
|
|
|
};
|
|
|
var renderDom = function renderDom(er, key, index) {
|
|
|
if (er.category) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "font16 c-light-primary",
|
|
|
children: [toChinesNum(index + 1), "\u3001", er.name]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: "c-grey-999",
|
|
|
children: ["\uFF08\u5171", er.count, "\u9898\uFF0C", (er === null || er === void 0 ? void 0 : er.question_type) === 7 ? "\u5305\u542B".concat(er === null || er === void 0 ? void 0 : er.sub_count, "\u5C0F\u9898\uFF1B") : '', "\u5171", er.score, "\u5206\uFF09"]
|
|
|
})]
|
|
|
}), renderQuestion(er.questionDetail, key)]
|
|
|
});
|
|
|
} else {
|
|
|
return renderQuestion(er.questionDetail, key);
|
|
|
}
|
|
|
};
|
|
|
var renderClassifyQuestion = (0,react.useCallback)(function () {
|
|
|
var _exercise$exerciseExp5, _exercise$exerciseExp6, _Array, _Array$fill, _Array$fill$map;
|
|
|
var step = (exercise === null || exercise === void 0 ? void 0 : (_exercise$exerciseExp5 = exercise.exerciseExportHeadData) === null || _exercise$exerciseExp5 === void 0 ? void 0 : (_exercise$exerciseExp6 = _exercise$exerciseExp5.exercise_header) === null || _exercise$exerciseExp6 === void 0 ? void 0 : _exercise$exerciseExp6.export_page_num) || 40;
|
|
|
var newData = [];
|
|
|
var questionIndex = 1; //小题题号
|
|
|
var _iterator = createForOfIteratorHelper_default()((exportData === null || exportData === void 0 ? void 0 : exportData.exercise_question_types) || []),
|
|
|
_step;
|
|
|
try {
|
|
|
var _loop3 = function _loop3() {
|
|
|
var questionItem = _step.value;
|
|
|
questionItem.items.forEach(function (question, index) {
|
|
|
if (index === 0) {
|
|
|
newData.push(objectSpread2_default()(objectSpread2_default()({}, questionItem), {}, {
|
|
|
items: null,
|
|
|
category: 1,
|
|
|
questionDetail: question,
|
|
|
questionIndex: questionIndex
|
|
|
}));
|
|
|
} else {
|
|
|
newData.push({
|
|
|
questionDetail: question,
|
|
|
questionIndex: questionIndex
|
|
|
});
|
|
|
}
|
|
|
questionIndex++;
|
|
|
});
|
|
|
};
|
|
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
|
_loop3();
|
|
|
}
|
|
|
} catch (err) {
|
|
|
_iterator.e(err);
|
|
|
} finally {
|
|
|
_iterator.f();
|
|
|
}
|
|
|
console.log(exportData === null || exportData === void 0 ? void 0 : exportData.exercise_question_types, newData);
|
|
|
if (newData !== null && newData !== void 0 && newData.length) return (_Array = new Array(Math.ceil((newData === null || newData === void 0 ? void 0 : newData.length) / step))) === null || _Array === void 0 ? void 0 : (_Array$fill = _Array.fill([])) === null || _Array$fill === void 0 ? void 0 : (_Array$fill$map = _Array$fill.map(function (item, key) {
|
|
|
return newData.slice(key * step, key * step + step);
|
|
|
})) === null || _Array$fill$map === void 0 ? void 0 : _Array$fill$map.map(function (i, k) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "pl60 pr30",
|
|
|
style: {
|
|
|
minHeight: k === 0 ? 1000 : "auto"
|
|
|
},
|
|
|
children: [k === 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Head/* default */.Z, {
|
|
|
isExportBlank: isExportBlank.current
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(divider/* default */.Z, {
|
|
|
className: Exportmodules.divider
|
|
|
})]
|
|
|
}), i === null || i === void 0 ? void 0 : i.map(function (item, index) {
|
|
|
return renderDom(item, item.questionIndex, index);
|
|
|
})]
|
|
|
});
|
|
|
});
|
|
|
return null;
|
|
|
}, [exportData, exercise, autoHeight]);
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
className: "edu-container",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
className: "animated fadeIn",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: "mt10",
|
|
|
children: userInfo && /*#__PURE__*/(0,jsx_runtime.jsxs)(breadcrumb/* default */.Z, {
|
|
|
separator: ">",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default.Item */.Z.Item, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
to: "/classrooms/".concat(params.coursesId, "/exercise"),
|
|
|
children: userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$course = userInfo.course) === null || _userInfo$course === void 0 ? void 0 : _userInfo$course.course_name
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default.Item */.Z.Item, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
to: "/classrooms/".concat(params.coursesId, "/exercise"),
|
|
|
children: "\u8BD5\u5377\u5217\u8868"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default.Item */.Z.Item, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
to: "/classrooms/".concat(params.coursesId, "/exercise/").concat(exportData === null || exportData === void 0 ? void 0 : (_exportData$exercise3 = exportData.exercise) === null || _exportData$exercise3 === void 0 ? void 0 : _exportData$exercise3.id, "/detail"),
|
|
|
children: "\u8BD5\u5377\u8BE6\u60C5"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default.Item */.Z.Item, {
|
|
|
children: (exportData === null || exportData === void 0 ? void 0 : (_exportData$exercise_ = exportData.exercise_answer_user) === null || _exportData$exercise_ === void 0 ? void 0 : _exportData$exercise_.user_name) || (exportData === null || exportData === void 0 ? void 0 : (_exportData$exercise4 = exportData.exercise) === null || _exportData$exercise4 === void 0 ? void 0 : _exportData$exercise4.exercise_name)
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
|
className: [Exportmodules.title, 'mt20'].join(' '),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
style: {
|
|
|
width: "100%"
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
flex: "1",
|
|
|
style: {
|
|
|
lineHeight: '24px'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
to: "/classrooms/".concat(params.coursesId, "/exercise/").concat(exportData === null || exportData === void 0 ? void 0 : (_exportData$exercise5 = exportData.exercise) === null || _exportData$exercise5 === void 0 ? void 0 : _exportData$exercise5.id, "/detail"),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ArrowLeftOutlined/* default */.Z, {
|
|
|
className: "font16 c-black"
|
|
|
})
|
|
|
}), (0,util/* exerciseTips */.vB)((_exportData$exercise6 = exportData.exercise) === null || _exportData$exercise6 === void 0 ? void 0 : _exportData$exercise6.exercise_status), /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
className: "font20 ml5",
|
|
|
children: exportData === null || exportData === void 0 ? void 0 : (_exportData$exercise7 = exportData.exercise) === null || _exportData$exercise7 === void 0 ? void 0 : _exportData$exercise7.exercise_name
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(dropdown/* default */.Z, {
|
|
|
menu: {
|
|
|
items: [{
|
|
|
label: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
|
|
|
type: "text",
|
|
|
onClick: function onClick() {
|
|
|
setisshowanswer(true);
|
|
|
setTimeout(function () {
|
|
|
exportReport("");
|
|
|
}, 500);
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(DownloadOutlined/* default */.Z, {}), "\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377+\u7B54\u6848"]
|
|
|
}),
|
|
|
key: '1',
|
|
|
show: true
|
|
|
}, {
|
|
|
label: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
|
|
|
type: "text",
|
|
|
onClick: function onClick() {
|
|
|
return exportReport("");
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(DownloadOutlined/* default */.Z, {}), "\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377"]
|
|
|
}),
|
|
|
key: '2',
|
|
|
show: true
|
|
|
}, {
|
|
|
label: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
|
|
|
type: "text",
|
|
|
onClick: function onClick() {
|
|
|
setismodal(true);
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(DownloadOutlined/* default */.Z, {}), "\u5BFC\u51FA\u6240\u6709\u5B66\u751F\u8BD5\u5377"]
|
|
|
}),
|
|
|
key: '3',
|
|
|
show: (0,authority/* isAdmin */.GJ)()
|
|
|
}].filter(function (item) {
|
|
|
return item.show;
|
|
|
}).map(function (item) {
|
|
|
return {
|
|
|
label: item.label,
|
|
|
key: item.key
|
|
|
};
|
|
|
})
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.Z, {
|
|
|
className: Exportmodules.exportBtn,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(DeliveredProcedureOutlined/* default */.Z, {}), "\u5BFC\u51FA", /*#__PURE__*/(0,jsx_runtime.jsx)(CaretDownOutlined/* default */.Z, {})]
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
className: "ml20",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
|
|
|
icon: /*#__PURE__*/(0,jsx_runtime.jsx)(SettingOutlined/* default */.Z, {}),
|
|
|
className: Exportmodules.exportBtn,
|
|
|
onClick: function onClick() {
|
|
|
dispatch({
|
|
|
type: 'exercise/setActionTabs',
|
|
|
payload: {
|
|
|
key: 'exportSetting'
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
children: "\u5BFC\u51FA\u8BBE\u7F6E"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {})]
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
|
|
|
title: '导出试卷选择'
|
|
|
// okText='是'
|
|
|
,
|
|
|
open: ismodal
|
|
|
// cancelText="否"
|
|
|
,
|
|
|
footer: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
|
|
|
type: "primary",
|
|
|
onClick: function onClick() {
|
|
|
setUserCommentVisible(true);
|
|
|
setUserScoreVisible(true);
|
|
|
setismodal(false);
|
|
|
exportReport("all");
|
|
|
},
|
|
|
children: "\u662F"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
|
|
|
onClick: function onClick() {
|
|
|
setUserScoreVisible(true);
|
|
|
setismodal(false);
|
|
|
exportReport("all");
|
|
|
},
|
|
|
children: "\u5426"
|
|
|
})]
|
|
|
}),
|
|
|
onCancel: function onCancel() {
|
|
|
return setismodal(false);
|
|
|
},
|
|
|
children: "\u662F\u5426\u8FDE\u540C\u8BC4\u9605\u6559\u5E08\u3001\u6559\u5E08\u8BC4\u8BED\u4E00\u8D77\u5BFC\u51FA\uFF1F"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("section", {
|
|
|
id: "export-all",
|
|
|
className: [Exportmodules.bg, 'pt30', 'pb30', 'mt20', 'mb20', 'relative'].join(' '),
|
|
|
ref: exportElement,
|
|
|
children: renderClassifyQuestion()
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var Exercise_Export = ((0,_umi_production_exports.connect)(function (_ref7) {
|
|
|
var exercise = _ref7.exercise,
|
|
|
loading = _ref7.loading,
|
|
|
user = _ref7.user,
|
|
|
globalSetting = _ref7.globalSetting;
|
|
|
return {
|
|
|
exercise: exercise,
|
|
|
globalSetting: globalSetting,
|
|
|
user: user,
|
|
|
loading: loading.effects
|
|
|
};
|
|
|
})(Export));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 37537:
|
|
|
/*!***************************************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Review/component/AnswerComments/index.tsx + 1 modules ***!
|
|
|
\***************************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"Z": function() { return /* binding */ component_AnswerComments; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/row/style/index.js
|
|
|
var style = __webpack_require__(13062);
|
|
|
// EXTERNAL MODULE: ./node_modules/antd/es/row/index.js
|
|
|
var row = __webpack_require__(71230);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
|
var react = __webpack_require__(67294);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/Review/component/AnswerComments/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var AnswerCommentsmodules = ({"flex_box_center":"flex_box_center___hzSR8","flex_space_between":"flex_space_between___Mscip","flex_box_vertical_center":"flex_box_vertical_center___Uckau","flex_box_center_end":"flex_box_center_end___Kw1tf","flex_box_column":"flex_box_column___udgQE","comments":"comments___He0El","line":"line___P3zVB"});
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
|
var env = __webpack_require__(59758);
|
|
|
// EXTERNAL MODULE: ./node_modules/moment/moment.js
|
|
|
var moment = __webpack_require__(30381);
|
|
|
var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
|
|
|
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(85893);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/Review/component/AnswerComments/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var AnswerComments = function AnswerComments(_ref) {
|
|
|
var list = _ref.list,
|
|
|
_ref$hideScore = _ref.hideScore,
|
|
|
hideScore = _ref$hideScore === void 0 ? false : _ref$hideScore;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: list === null || list === void 0 ? void 0 : list.map(function (v) {
|
|
|
var _v$user, _v$user2, _v$user3, _v$comments;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt20",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
align: "middle",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
src: env/* default.API_SERVER */.Z.API_SERVER + '/images/' + ((_v$user2 = v.user) === null || _v$user2 === void 0 ? void 0 : _v$user2.image_url),
|
|
|
width: "40",
|
|
|
style: {
|
|
|
borderRadius: 40
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "ml10 font16",
|
|
|
children: (_v$user3 = v.user) === null || _v$user3 === void 0 ? void 0 : _v$user3.name
|
|
|
})]
|
|
|
}, v === null || v === void 0 ? void 0 : (_v$user = v.user) === null || _v$user === void 0 ? void 0 : _v$user.user_id), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: AnswerCommentsmodules.comments,
|
|
|
children: v === null || v === void 0 ? void 0 : (_v$comments = v.comments) === null || _v$comments === void 0 ? void 0 : _v$comments.map(function (e, i) {
|
|
|
var _v$user4, _v$comments2;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
align: "middle",
|
|
|
justify: "space-between",
|
|
|
children: [!!e.shixun_chanllge_position && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
flexShrink: 0,
|
|
|
marginRight: 10
|
|
|
},
|
|
|
children: ["\u7B2C", e.shixun_chanllge_position, "\u5173"]
|
|
|
}), !hideScore && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
flex: 1
|
|
|
},
|
|
|
children: ["\u539F\u59CB\u5F97\u5206", e === null || e === void 0 ? void 0 : e.origin_score, "\u5206\uFF0C\u4FEE\u6B63\u4E3A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-light-primary",
|
|
|
children: e === null || e === void 0 ? void 0 : e.score
|
|
|
}), "\u5206"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
flexShrink: 0
|
|
|
},
|
|
|
children: moment_default()(e.updated_at).format('YYYY-MM-DD HH:mm')
|
|
|
})]
|
|
|
}), !!e.comment && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u8BC4\u8BED\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "c-light-primary",
|
|
|
children: e.comment
|
|
|
})]
|
|
|
}), (v === null || v === void 0 ? void 0 : (_v$comments2 = v.comments) === null || _v$comments2 === void 0 ? void 0 : _v$comments2.length) - 1 > i && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: AnswerCommentsmodules.line
|
|
|
})]
|
|
|
}, (v === null || v === void 0 ? void 0 : (_v$user4 = v.user) === null || _v$user4 === void 0 ? void 0 : _v$user4.user_id) + '-' + i);
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var component_AnswerComments = (AnswerComments);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 19637:
|
|
|
/*!***********************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Review/component/Fill.tsx ***!
|
|
|
\***********************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ 42122);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/slicedToArray.js */ 27424);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
/* harmony import */ var antd_es_input_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd/es/input/style */ 69463);
|
|
|
/* harmony import */ var antd_es_input__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! antd/es/input */ 75008);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ 67294);
|
|
|
/* harmony import */ var _components_RenderHtml__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/RenderHtml */ 12768);
|
|
|
/* harmony import */ var _SeeAnswer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SeeAnswer */ 18707);
|
|
|
/* harmony import */ var _index_less_modules__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./index.less?modules */ 1446);
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ 85893);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var TextArea = antd_es_input__WEBPACK_IMPORTED_MODULE_8__/* ["default"].TextArea */ .Z.TextArea;
|
|
|
var Fill = function Fill(_ref) {
|
|
|
var item = _ref.item,
|
|
|
answerData = _ref.answerData,
|
|
|
changeScoreData = _ref.changeScoreData,
|
|
|
textValue = _ref.textValue,
|
|
|
_ref$textOnChange = _ref.textOnChange,
|
|
|
textOnChange = _ref$textOnChange === void 0 ? function () {} : _ref$textOnChange,
|
|
|
_ref$seeAnswerVisible = _ref.seeAnswerVisible,
|
|
|
seeAnswerVisible = _ref$seeAnswerVisible === void 0 ? true : _ref$seeAnswerVisible;
|
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)([]),
|
|
|
_useState2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1___default()(_useState, 2),
|
|
|
userAnswer = _useState2[0],
|
|
|
setUserAnswer = _useState2[1];
|
|
|
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(false),
|
|
|
_useState4 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_1___default()(_useState3, 2),
|
|
|
showEdit = _useState4[0],
|
|
|
setShowEdit = _useState4[1];
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () {
|
|
|
if (changeScoreData !== null && changeScoreData !== void 0 && changeScoreData[item.q_position]) {
|
|
|
!showEdit && setShowEdit(true);
|
|
|
} else {
|
|
|
showEdit && setShowEdit(false);
|
|
|
}
|
|
|
}, [changeScoreData === null || changeScoreData === void 0 ? void 0 : changeScoreData[item === null || item === void 0 ? void 0 : item.q_position]]);
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_3__.useEffect)(function () {
|
|
|
var data = [];
|
|
|
var _loop = function _loop(i) {
|
|
|
var _item$user_answer;
|
|
|
var param = (item === null || item === void 0 ? void 0 : (_item$user_answer = item.user_answer) === null || _item$user_answer === void 0 ? void 0 : _item$user_answer.find(function (e) {
|
|
|
return e.choice_id === i + 1;
|
|
|
})) || {
|
|
|
choice_id: i + 1,
|
|
|
answer_text: ''
|
|
|
};
|
|
|
data.push(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, param));
|
|
|
};
|
|
|
for (var i = 0; i < (item === null || item === void 0 ? void 0 : item.multi_count); i++) {
|
|
|
_loop(i);
|
|
|
}
|
|
|
setUserAnswer(data);
|
|
|
}, [item === null || item === void 0 ? void 0 : item.user_answer]);
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div", {
|
|
|
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_6__/* ["default"].fillBg */ .Z.fillBg,
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("aside", {
|
|
|
className: "font14 c-light-primary mb5",
|
|
|
children: "\u5B66\u751F\u7B54\u9898"
|
|
|
}), userAnswer === null || userAnswer === void 0 ? void 0 : userAnswer.map(function (answer, index) {
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsxs)("span", {
|
|
|
children: ["\u7B54\u6848(\u586B\u7A7A", index + 1, "):"]
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)("div", {
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, {
|
|
|
value: answer === null || answer === void 0 ? void 0 : answer.answer_text
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
}), seeAnswerVisible && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__.jsx)(_SeeAnswer__WEBPACK_IMPORTED_MODULE_5__/* .SeeAnswer */ .u, {
|
|
|
data: item
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ __webpack_exports__["Z"] = (Fill);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 18707:
|
|
|
/*!****************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Review/component/SeeAnswer.tsx ***!
|
|
|
\****************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ "u": function() { return /* binding */ SeeAnswer; }
|
|
|
/* harmony export */ });
|
|
|
/* harmony import */ var antd_es_row_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/row/style */ 13062);
|
|
|
/* harmony import */ var antd_es_row__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! antd/es/row */ 71230);
|
|
|
/* harmony import */ var antd_es_col_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/col/style */ 89032);
|
|
|
/* harmony import */ var antd_es_col__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd/es/col */ 15746);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/slicedToArray.js */ 27424);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ 67294);
|
|
|
/* harmony import */ var _components_RenderHtml__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/RenderHtml */ 12768);
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react/jsx-runtime */ 85893);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var SeeAnswer = function SeeAnswer(_ref) {
|
|
|
var data = _ref.data;
|
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(false),
|
|
|
_useState2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default()(_useState, 2),
|
|
|
show = _useState2[0],
|
|
|
setShow = _useState2[1];
|
|
|
var renderDom = function renderDom() {
|
|
|
var _data$standard_answer, _data$standard_answer2;
|
|
|
switch (data.question_type) {
|
|
|
case 3:
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("aside", {
|
|
|
className: "mt20",
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("span", {
|
|
|
style: {
|
|
|
cursor: "pointer"
|
|
|
},
|
|
|
className: "font14 c-blue current",
|
|
|
onClick: function onClick() {
|
|
|
setShow(!show);
|
|
|
},
|
|
|
children: show ? "隐藏参考答案" : "查看参考答案"
|
|
|
}), show && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
|
|
|
children: data === null || data === void 0 ? void 0 : (_data$standard_answer = data.standard_answer) === null || _data$standard_answer === void 0 ? void 0 : _data$standard_answer.map(function (item, key) {
|
|
|
var _item$answer_text;
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(antd_es_row__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z, {
|
|
|
style: {
|
|
|
alignItems: 'baseline'
|
|
|
},
|
|
|
className: "mr20",
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(antd_es_col__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, {
|
|
|
flex: "50px",
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("span", {
|
|
|
className: "mt10",
|
|
|
children: ["\u586B\u7A7A", item.choice_id, ":"]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(antd_es_col__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, {
|
|
|
flex: 1,
|
|
|
children: item === null || item === void 0 ? void 0 : (_item$answer_text = item.answer_text) === null || _item$answer_text === void 0 ? void 0 : _item$answer_text.map(function (val, key) {
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
|
|
|
children: val
|
|
|
});
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
break;
|
|
|
case 4:
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)("aside", {
|
|
|
className: "mt20",
|
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("span", {
|
|
|
style: {
|
|
|
cursor: "pointer"
|
|
|
},
|
|
|
className: "font14 c-blue current",
|
|
|
onClick: function onClick() {
|
|
|
setShow(!show);
|
|
|
},
|
|
|
children: show ? "隐藏参考答案" : "查看参考答案"
|
|
|
}), show && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, {
|
|
|
value: data === null || data === void 0 ? void 0 : (_data$standard_answer2 = data.standard_answer) === null || _data$standard_answer2 === void 0 ? void 0 : _data$standard_answer2.join(" ")
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
break;
|
|
|
}
|
|
|
};
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("section", {
|
|
|
children: renderDom()
|
|
|
});
|
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 70960:
|
|
|
/*!***************************!*\
|
|
|
!*** ./src/utils/enum.ts ***!
|
|
|
\***************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ "c": function() { return /* binding */ QuestionType; }
|
|
|
/* harmony export */ });
|
|
|
/* unused harmony export PageType */
|
|
|
var PageType;
|
|
|
(function (PageType) {
|
|
|
PageType["FirstPage"] = "firstPage";
|
|
|
PageType["PrevPage"] = "prevPage";
|
|
|
PageType["NextPage"] = "nextPage";
|
|
|
})(PageType || (PageType = {}));
|
|
|
var QuestionType;
|
|
|
(function (QuestionType) {
|
|
|
QuestionType[QuestionType["Single"] = 0] = "Single";
|
|
|
QuestionType[QuestionType["Multiple"] = 1] = "Multiple";
|
|
|
QuestionType[QuestionType["Judge"] = 2] = "Judge";
|
|
|
QuestionType[QuestionType["Fill"] = 3] = "Fill";
|
|
|
QuestionType[QuestionType["Subjective"] = 4] = "Subjective";
|
|
|
QuestionType[QuestionType["Shixun"] = 5] = "Shixun";
|
|
|
QuestionType[QuestionType["Program"] = 6] = "Program";
|
|
|
QuestionType[QuestionType["Combine"] = 7] = "Combine";
|
|
|
})(QuestionType || (QuestionType = {}));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 1446:
|
|
|
/*!*********************************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Review/component/index.less?modules ***!
|
|
|
\*********************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__) {
|
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ __webpack_exports__["Z"] = ({"flex_box_center":"flex_box_center___VAUts","flex_space_between":"flex_space_between___gx5ZV","flex_box_vertical_center":"flex_box_vertical_center___HV_tL","flex_box_center_end":"flex_box_center_end___fVsIw","flex_box_column":"flex_box_column___F5DHk","shixunWrp":"shixunWrp___pinaF","s":"s___mtpV4","fillComment":"fillComment___WEgkI","commentContent":"commentContent___v_Ebo","commentText":"commentText___fyDle","simpleWrap":"simpleWrap___uwIie","fillBg":"fillBg___iyMsm","simpleBg":"simpleBg___UqElF","lookCode":"lookCode___xKifS"});
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 37729:
|
|
|
/*!***********************************************************************!*\
|
|
|
!*** ./src/pages/Classrooms/Lists/Exercise/Review/index.less?modules ***!
|
|
|
\***********************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__) {
|
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ __webpack_exports__["Z"] = ({"flex_box_center":"flex_box_center___D6Qly","flex_space_between":"flex_space_between___ZA98O","flex_box_vertical_center":"flex_box_vertical_center___aST6E","flex_box_center_end":"flex_box_center_end___kJ_eQ","flex_box_column":"flex_box_column___ZOkyZ","bg":"bg___rbSyL","circularBlue":"circularBlue___qvnla","circularRed":"circularRed___jo0FU","circularOrange":"circularOrange___GteY7","circularGreen":"circularGreen___PW_tz","circularGrey":"circularGrey___Nt7Wc","title":"title___Volf5","questionIcons":"questionIcons___MIxzq","grey":"grey___XquYB","green":"green___sjsXt","blue":"blue___Jwa9H","orange":"orange___cGfa7","red":"red___NensB","greenTip":"greenTip___lDmky","redTip":"redTip___Yp9nM","cccTip":"cccTip___Uzudc","orangeTip":"orangeTip___gA104","flexRow":"flexRow___GsOMs","simpleWrap":"simpleWrap___jppmP","userPhoto":"userPhoto___LUsoO","CCCIcons":"CCCIcons___STbxr","buttonFixed":"buttonFixed___aUnd3","typeTitle":"typeTitle___i1hJu","answerResult":"answerResult___kLknn","questionsInfo":"questionsInfo___spnx1","leftBar":"leftBar___AjrjB","greenBg":"greenBg___nlTOV","blueBg":"blueBg___nYACT","redBg":"redBg___WTgtT","orangeBg":"orangeBg___mMAXu","greyBg":"greyBg___eAdgQ","commentText":"commentText___smAVm","full":"full____Rgkm","answerInfo":"answerInfo___iSSvg","listType":"listType___fUHyn"});
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
}]); |