You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/27045.3d83bcbd.async.js

1181 lines
62 KiB

"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[27045],{
/***/ 62509:
/*!************************************************************!*\
!*** ./src/components/image-preview/index.tsx + 1 modules ***!
\************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ image_preview; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(79800);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
;// CONCATENATED MODULE: ./src/components/image-preview/index.less
// extracted by mini-css-extract-plugin
// EXTERNAL MODULE: ./src/components/mediator.js
var mediator = __webpack_require__(34145);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
var es_button = __webpack_require__(3113);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.5.1@@ant-design/icons/es/icons/ReloadOutlined.js + 1 modules
var ReloadOutlined = __webpack_require__(73303);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.5.1@@ant-design/icons/es/icons/DownloadOutlined.js + 1 modules
var DownloadOutlined = __webpack_require__(82234);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.5.1@@ant-design/icons/es/icons/CloseOutlined.js + 1 modules
var CloseOutlined = __webpack_require__(51638);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/components/image-preview/index.tsx
/* harmony default export */ var image_preview = (function () {
var _useState = (0,_react_17_0_2_react.useState)(''),
_useState2 = slicedToArray_default()(_useState, 2),
url = _useState2[0],
setUrl = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(0),
_useState4 = slicedToArray_default()(_useState3, 2),
deg = _useState4[0],
setDeg = _useState4[1];
var saveUrl = (0,_react_17_0_2_react.useRef)('');
(0,_react_17_0_2_react.useEffect)(function () {
var unSub = mediator/* default */.Z.subscribe('preview-image', function (value) {
setUrl(value);
// window.document.body
// document.body.style.height='100%'
document.body.style.overflow = 'hidden';
});
return unSub;
}, []);
(0,_react_17_0_2_react.useEffect)(function () {
document.addEventListener('keydown', onViewEscClose);
return function () {
document.removeEventListener('keydown', onViewEscClose);
};
}, []);
(0,_react_17_0_2_react.useEffect)(function () {
saveUrl.current = url;
}, [url]);
function onViewEscClose(e) {
if (e.keyCode == 27 && saveUrl.current) {
onClose();
}
}
// https://data.educoder.net/api/attachments/1571649
function onClose() {
// document.body.style.height='100%'
document.body.style.overflow = 'auto';
setUrl('');
}
function onRotate() {
setDeg(deg + 90);
}
var maskRef = (0,_react_17_0_2_react.useRef)();
var previewWrapperRef = (0,_react_17_0_2_react.useRef)();
var handleMaskClick = function handleMaskClick(e) {
if (e.nativeEvent.target === maskRef.current || e.nativeEvent.target === previewWrapperRef.current) {
onClose();
}
};
return /*#__PURE__*/(0,jsx_runtime.jsx)(_react_17_0_2_react.Fragment, {
children: !url ? null : /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "image-preview-container",
ref: maskRef,
onClick: handleMaskClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "button-group",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
onClick: onRotate,
children: ["\u65CB\u8F6C", /*#__PURE__*/(0,jsx_runtime.jsx)(ReloadOutlined/* default */.Z, {})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
href: url,
children: ["\u4E0B\u8F7D", /*#__PURE__*/(0,jsx_runtime.jsx)(DownloadOutlined/* default */.Z, {})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
onClick: onClose,
children: ["\u5173\u95ED", /*#__PURE__*/(0,jsx_runtime.jsx)(CloseOutlined/* default */.Z, {})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "preview-wrp-group",
ref: previewWrapperRef,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
className: "image-preview",
src: url,
alt: "\u9884\u89C8\u5927\u56FE",
style: {
transform: "rotate(".concat(deg, "deg)")
}
})
})]
})
});
});
/***/ }),
/***/ 31369:
/*!***************************************************************************************************!*\
!*** ./src/pages/Classrooms/Lists/Exercise/Export/components/ExportSetting/index.tsx + 3 modules ***!
\***************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ components_ExportSetting; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(7557);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(41498);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(82242);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(79800);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
var input = __webpack_require__(73782);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
var message = __webpack_require__(8591);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
var modal = __webpack_require__(43418);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules
var spin = __webpack_require__(71418);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
var row = __webpack_require__(95237);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
var col = __webpack_require__(43604);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/index.js + 24 modules
var upload = __webpack_require__(59028);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/index.js + 3 modules
var es_checkbox = __webpack_require__(24905);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input-number/index.js + 14 modules
var input_number = __webpack_require__(94001);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.5.1@@ant-design/icons/es/icons/PlusOutlined.js + 1 modules
var PlusOutlined = __webpack_require__(26762);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/Export/components/ExportSetting/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var ExportSettingmodules = ({"modalWrapper":"modalWrapper___rWDvO","exportSettingWrapper":"exportSettingWrapper___pCClH","imgPreviewPart":"imgPreviewPart___PCv0Y","tips":"tips___EVeBl","pottedLine":"pottedLine___AaY68","text":"text___ho3u_"});
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
var _umi_production_exports = __webpack_require__(3125);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__(52774);
// EXTERNAL MODULE: ./src/components/ImagesIcon/index.ts + 32 modules
var ImagesIcon = __webpack_require__(26931);
// EXTERNAL MODULE: ./src/components/mediator.js
var mediator = __webpack_require__(34145);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(19219);
// EXTERNAL MODULE: ./src/components/markdown-editor/index.tsx + 10 modules
var markdown_editor = __webpack_require__(1387);
// EXTERNAL MODULE: ./src/components/image-preview/index.tsx + 1 modules
var image_preview = __webpack_require__(62509);
;// CONCATENATED MODULE: ./src/assets/images/classrooms/halfDottedLine.png
var halfDottedLine_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAAECAYAAADLcnBRAAAAAXNSR0IArs4c6QAAAcNJREFUSEvtlT1oFFEURs+dndmAqGBAMCAoKAqChT+lYGER6xQLlsGdXWMQFETbtREhjQgmuxmLdJIEi1SxCdjYRpCQbkEhoihioYjMneyVCDtMCuG+fqedc9437775ZoTRNZrAaAL/nYDs3bFZTmjB0dA5Jbt8kRfseD2b4YgOOOXlh1wCv6XHttezFWq6wQUvX+WSa7yTBrte19qcUzjg5cs9RfRlgR9ez5oc1xrHvHyZE/NNnvPR69kdDmvOGS9f5gh/pMtWiJe3uRzCl1kTvJcOude1Gc7qgENevswxPvwrSN6kB7RCF5CIuWSRB16vSGkMjGUvX3LCZj3jkteze4zrT757+X0FSRgPeXHzJpsQXsYoohEvsup9Rk2ZM+O+lx9ykdCLM255PU2ZNOO1l6+cUb+ecdrrWYdYd1Avv++MxjgZUnpNeWPG1dCsCJrDgsyKcD10AYFXccaS19MWVzAeevkK108y7no9u83BQnnp5atcnHBD5vnldTXlKYT/FanxJOny1ptTtJm2AVNefsgZrNcz5r2etbhYGI+8fCXncz3zf2StQ1R8Yi00Z4+Pa9yULl+9rqY8Bs57+ZKLePYXdsiA6BdYLZkAAAAASUVORK5CYII=";
;// CONCATENATED MODULE: ./src/assets/images/classrooms/dottedLine.png
var dottedLine_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAn4AAAAECAYAAAAQ9jLuAAAAAXNSR0IArs4c6QAABLVJREFUaEPtmVuIVVUYgL+1z17H0S6kliWaJdlVS7pQBHajoLAMKpjo8hKdfc7MiNmoaA8Fx4IIjMzIuZx9sijLrkRGGURQdHkJjSy7G2bqWHaTKbO99pw/ztRs9rz9ax58qHPeDnzf+tf6/7XWXmtvQ+vXykArA60MtDLQykArA60MtDLwv8iAaY5SFnKCSznGd8R2iL2mzi6tJ51MdA1O0vIjnIUDpp/PtJ48T8G9xdlaPs/Zy/nItDOkdaXCGQ4maPlsTAHbTS+/aj0pMd0VOE7LZ3FC9pm1fKf1ZBFHuoRTtHwWx3DQ9PGpj5dUOM+Hz2JNZaupkmhd6eRU1+AILZ/FEXaYGj9pPSkz1RmmafncXPjF9PKt1pNlHOYGOV3L59aRM/187ONJmXOcIfBxmqydwDazmj+1nnQxyw1xlJbPxtTG92YNP2g96WCKE2Zo+SxOgd9MD99oPanS5gaYo+Vzc65hamzx8aTCXAfWxxmuUYEvTA+/az0pMdMVmKzlszFZ9phH2dP8P+Y6G3aaPn7Uxj5kde5mvDvAbG2//tN1FnabGgPaXMhCJruUmVo+t18Oml6+1HpSpegGOEvL5znbx2ZjEK0rHcxxQpuWz82Hr02N/VpPysxwhilaPovz75lt+OCXlOgHyr6NmIBVtsZyrZdGtDeE57R8xhm2FGPO1XrSzSQ3yM9aflShLZN8DmRJaXiT9j5kBgHtYY0XtH10EatEWKblR7jA0B/GdGg9F3GlCG9o+VyNthdjZmk9qRK6XTgtP6pG4zjR5zDrIt4W4RLfWAGUwjqPaT0XcbcI92n5XO42FGNu1nquwoUyxAdafoQzsM/W/TYLF/GHyBguNpa5ppet2j66EhsFFmj5jAtYUqyxWuslZe6gwRotn8vd67bO1VpPImY78bsINds2hr9s7PfgcCUGBP9LoQm4yNZ4TzumpMRTwK1aPstdwEpbo9r87yJeFeEa3zaA7mKdh7VeErEY0fNZXw2v2Vjfv+EHfcon2n7l5tNBW2e8j+dK7BU41scZnlMh82wf72u9JGI9wi1aPjemqq2zUuulFW5rDLFOy+dq9K6NuVjrSRfHu4SdWj7P2emM83nJkER8hXCyb6zAMD+M2aT10hI9DejU8rncPWRjlo4c/BYaw1XejcBLYcwTWs+VmYewQsvnuO025k6tJ10cnjo2aPk8F1pu8rkFu2h4c/F+i0mBB3wWY3ORSIPrfccksKkY06P1mm94UtEv3pF2BQaKsf7yIFWCdDevaPs1qkYFbve5/buI+4EzvWMFPGL7eVPrpRVulIb/gxF4x8Y8qI0jZU5LhVVaPlej/cXYr38u4kVgnG+ssMAi08cOrdc8NAMXaPlsIxPqYV0/j9IKC6Shn6e5/nxoY+7V9q95I0+FtVo+xzkb+63zJOJJAxN9Y4UBK3y+pLiIJcBlvnGM8ExY/2c/dmXuQTjfuw2Iw5iNWi+NuFYg0vKHvM5CYuvc4NO/MdfZstz08Lk2liuzFOFSLZ+tRXg6jHlW67mIK4DFWj7HbbMxd2k9KXN0Kjyu5Uc9a6ZxnamSat00ok/w/+ojQrVYZ7M2TlKm0wjztXyuRi+HMev+Bu2qoBRawxtVAAAAAElFTkSuQmCC";
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/Export/components/ExportSetting/index.tsx
var TextArea = input/* default */.Z.TextArea;
var ExportSetting = function ExportSetting(_ref) {
var _data$file_list;
var exercise = _ref.exercise,
loading = _ref.loading,
dispatch = _ref.dispatch;
var workSetting = exercise.workSetting;
var params = (0,_umi_production_exports.useParams)();
params.category = params.categoryId || params.exerciseId;
params.categoryId = params.categoryId || params.exerciseId;
var _useState = (0,_react_17_0_2_react.useState)(false),
_useState2 = slicedToArray_default()(_useState, 2),
disabled = _useState2[0],
setDisabled = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(false),
_useState4 = slicedToArray_default()(_useState3, 2),
pageLoading = _useState4[0],
setPageLoading = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)({
file_list: [],
attachment_id: '',
//卷头左角标附件id
show_title: false,
//展示试卷标题
show_body: false,
//展示考试内容
show_info: false,
//展示题量、分值、考试时长
show_table: false,
//展示得分、评分表格
show_user: false,
//密封线区域设置姓名
show_no: false,
//密封线区域设置学号
show_group: false,
//密封线区域设置专业班级
show_phone: false,
//密封线区域设置手机号
show_school_name: false,
//密封区域设置学校/单位
export_page_num: 40,
//每页导出最大试题数
show_desc: false,
//考试说明选择框
description: '' // 考试说明内容
}),
_useState6 = slicedToArray_default()(_useState5, 2),
data = _useState6[0],
setData = _useState6[1];
(0,_react_17_0_2_react.useEffect)(function () {
setDefaultData();
}, [workSetting]);
(0,_react_17_0_2_react.useEffect)(function () {
dispatch({
type: 'exercise/getWorkSetting',
payload: objectSpread2_default()({}, params)
});
}, []);
var setDefaultData = function setDefaultData() {
var _res$exercise_header2, _res$exercise_header3, _res$exercise_header4, _res$exercise_header5;
var res = JSON.parse(JSON.stringify(workSetting));
Object.keys(data).forEach(function (item) {
var _res$exercise_header;
data[item] = res === null || res === void 0 || (_res$exercise_header = res['exercise_header']) === null || _res$exercise_header === void 0 ? void 0 : _res$exercise_header[item];
});
data.file_list = res !== null && res !== void 0 && (_res$exercise_header2 = res['exercise_header']) !== null && _res$exercise_header2 !== void 0 && _res$exercise_header2.attachment_id ? [{
uid: res === null || res === void 0 || (_res$exercise_header3 = res['exercise_header']) === null || _res$exercise_header3 === void 0 ? void 0 : _res$exercise_header3.attachment_id,
id: res === null || res === void 0 || (_res$exercise_header4 = res['exercise_header']) === null || _res$exercise_header4 === void 0 ? void 0 : _res$exercise_header4.attachment_id,
url: res === null || res === void 0 || (_res$exercise_header5 = res['exercise_header']) === null || _res$exercise_header5 === void 0 ? void 0 : _res$exercise_header5.photo_url
}] : [];
setData(data);
};
var handleSubmit = function handleSubmit() {
var _bodyData$file_list;
var bodyData = JSON.parse(JSON.stringify(data));
bodyData.categoryId = params.categoryId;
bodyData.attachment_id = ((_bodyData$file_list = bodyData.file_list) === null || _bodyData$file_list === void 0 || (_bodyData$file_list = _bodyData$file_list[0]) === null || _bodyData$file_list === void 0 || (_bodyData$file_list = _bodyData$file_list.response) === null || _bodyData$file_list === void 0 ? void 0 : _bodyData$file_list.id) || null;
handleUpdate(bodyData);
};
var handleUpdate = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(bodyData) {
var res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
setPageLoading(true);
_context.next = 3;
return (0,fetch/* default */.ZP)("/api/exercises/".concat(params === null || params === void 0 ? void 0 : params.categoryId, "/foramt_settings.json"), {
method: 'post',
body: bodyData
});
case 3:
res = _context.sent;
if (res.status === 0) {
message/* default */.ZP.success('更新成功');
dispatch({
type: 'exercise/getCommonHeader',
payload: objectSpread2_default()({}, params)
});
dispatch({
type: 'exercise/getWorkSetting',
payload: objectSpread2_default()({}, params)
});
dispatch({
type: 'exercise/getExerciseExportHeadData',
payload: {
id: params.exerciseId || params.categoryId,
identify: params.userId || null
}
});
setPageLoading(false);
}
case 5:
case "end":
return _context.stop();
}
}, _callee);
}));
return function handleUpdate(_x) {
return _ref2.apply(this, arguments);
};
}();
var uploadProps = {
disabled: disabled,
multiple: false,
listType: "picture-card",
onPreview: function onPreview(file) {
mediator/* default */.Z.publish('preview-image', file.thumbUrl || file.url);
},
withCredentials: true,
fileList: data.file_list,
beforeUpload: function beforeUpload(file) {
var fileSize = file.size / 1024;
if (fileSize > 200) {
message/* default */.ZP.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(200KB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20");
return false;
}
return true;
},
action: "".concat(env/* default */.Z.API_SERVER, "/api/attachments.json"),
onChange: function onChange(info) {
var fileList = info.fileList.filter(function (file) {
return !!file.status;
});
data.file_list = fileList;
setData(Object.assign({}, data));
},
onRemove: function () {
var _onRemove = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(file) {
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
data.file_list = [];
setData(Object.assign({}, data));
return _context2.abrupt("return", true);
case 3:
case "end":
return _context2.stop();
}
}, _callee2);
}));
function onRemove(_x2) {
return _onRemove.apply(this, arguments);
}
return onRemove;
}()
};
return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
title: "\u5BFC\u51FA\u8BBE\u7F6E",
className: ExportSettingmodules.modalWrapper,
width: 900,
centered: true,
open: exercise.actionTabs.key === 'exportSetting',
onOk: function onOk() {
return handleSubmit();
},
onCancel: function onCancel() {
setDefaultData();
dispatch({
type: 'exercise/setActionTabs',
payload: {}
});
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
className: ExportSettingmodules.exportSettingWrapper,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
spinning: loading['exercise/getWorkSetting'] || pageLoading,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
wrap: false,
justify: "space-between",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u5377\u5934\u5DE6\u89D2\u6807"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: ExportSettingmodules.tips,
children: "\u56FE\u7247\u5EFA\u8BAE\u5C3A\u5BF8\uFF1A700px*500px\uFF0C\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC7200k"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "mt15",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(upload/* default */.Z, objectSpread2_default()(objectSpread2_default()({}, uploadProps), {}, {
children: !((_data$file_list = data.file_list) !== null && _data$file_list !== void 0 && _data$file_list.length) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(PlusOutlined/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
marginTop: 8
},
children: "\u4E0A\u4F20"
})]
})
}))
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
span: 24,
className: "mt15",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
checked: data.show_title,
disabled: disabled,
onChange: function onChange(e) {
data.show_title = e.target.checked;
setData(Object.assign({}, data));
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u5C55\u793A\u8BD5\u5377\u6807\u9898"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
span: 24,
className: "mt15",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
checked: data.show_body,
disabled: disabled,
onChange: function onChange(e) {
data.show_body = e.target.checked;
setData(Object.assign({}, data));
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u5C55\u793A\u8003\u8BD5\u5185\u5BB9\uFF08\u5373\u672C\u8BD5\u5377\u6240\u5C5E\u8BFE\u7A0B\u540D\u79F0\uFF09"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
span: 24,
className: "mt15",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
checked: data.show_info,
disabled: disabled,
onChange: function onChange(e) {
data.show_info = e.target.checked;
setData(Object.assign({}, data));
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u5C55\u793A\u9898\u91CF\u3001\u5206\u503C\u3001\u8003\u8BD5\u65F6\u957F"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
span: 24,
className: "mt15",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
checked: data.show_table,
disabled: disabled,
onChange: function onChange(e) {
data.show_table = e.target.checked;
setData(Object.assign({}, data));
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u5C55\u793A\u5F97\u5206\u3001\u8BC4\u5206\u8868\u683C"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
className: "mt20 ".concat(ExportSettingmodules.pottedLine),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: halfDottedLine_namespaceObject,
alt: ""
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
className: ExportSettingmodules.text,
children: "\u5BC6\u5C01\u7EBF\u533A\u57DF\u8BBE\u7F6E"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: halfDottedLine_namespaceObject,
alt: ""
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
className: "mt15",
justify: "center",
style: {
width: 320
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
className: "pl8",
checked: data.show_user,
disabled: disabled,
onChange: function onChange(e) {
data.show_user = e.target.checked;
setData(Object.assign({}, data));
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u59D3\u540D"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
checked: data.show_no,
disabled: disabled,
onChange: function onChange(e) {
data.show_no = e.target.checked;
setData(Object.assign({}, data));
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u5B66\u53F7"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
checked: data.show_group,
disabled: disabled,
onChange: function onChange(e) {
data.show_group = e.target.checked;
setData(Object.assign({}, data));
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u4E13\u4E1A\u73ED\u7EA7"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
checked: data.show_school_name,
disabled: disabled,
onChange: function onChange(e) {
data.show_school_name = e.target.checked;
setData(Object.assign({}, data));
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u5B66\u6821/\u5355\u4F4D"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
checked: data.show_phone,
disabled: disabled,
onChange: function onChange(e) {
data.show_phone = e.target.checked;
setData(Object.assign({}, data));
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u624B\u673A\u53F7"
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: dottedLine_namespaceObject,
alt: "",
className: "mt15",
style: {
width: 320
}
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
span: 24,
className: "mt15",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u6BCF\u9875\u5BFC\u51FA\u6700\u5927\u8BD5\u9898\u6570\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
size: 'middle',
min: 1,
value: !data.export_page_num ? 40 : data.export_page_num,
onChange: function onChange(value) {
data.export_page_num = value;
setData(objectSpread2_default()({}, data));
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
children: "\u9898"
})]
})
// <Col span={24} className="mt15 pl30">
// <Checkbox
// checked={data.export_page_num}
// disabled={disabled}
// onChange={e => {
// data.export_page_num = e.target.checked
// setData(Object.assign({}, data))
// }}
// >
// <div>每页导出题目数</div>
// </Checkbox>
// </Col>
, /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
className: "mt15",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
checked: data.show_desc,
disabled: disabled,
onChange: function onChange(e) {
data.show_desc = e.target.checked;
setData(Object.assign({}, data));
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u8003\u8BD5\u8BF4\u660E"
})
})
}), data.show_desc && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "mt15",
children:
/*#__PURE__*/
// disabled ?
// <TextArea style={{ height: 150, width: 550 }} disabled value={data.description} /> :
(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
width: 550,
height: 100,
defaultValue: data.description,
id: "exercise-detail-config-exam-description-id",
onChange: function onChange(value) {
data.description = value;
setData(Object.assign({}, data));
}
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
className: ExportSettingmodules.imgPreviewPart,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "pb10",
children: "\u793A\u4F8B\u56FE\u7247\u9884\u89C8\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: ImagesIcon/* exportExerciseTemplate */.qz
})]
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(image_preview/* default */.Z, {})]
})
});
};
/* harmony default export */ var components_ExportSetting = ((0,_umi_production_exports.connect)(function (_ref3) {
var exercise = _ref3.exercise,
loading = _ref3.loading,
globalSetting = _ref3.globalSetting;
return {
exercise: exercise,
loading: loading.effects,
globalSetting: globalSetting
};
})(ExportSetting));
/***/ }),
/***/ 27045:
/*!******************************************************************************************!*\
!*** ./src/pages/Classrooms/Lists/Exercise/Export/components/Head/index.tsx + 1 modules ***!
\******************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ components_Head; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js
var toConsumableArray = __webpack_require__(37205);
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(82242);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(7557);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(41498);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(79800);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
var _umi_production_exports = __webpack_require__(3125);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
var row = __webpack_require__(95237);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
var es_button = __webpack_require__(3113);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
var table = __webpack_require__(61998);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.5.1@@ant-design/icons/es/icons/SettingOutlined.js + 1 modules
var SettingOutlined = __webpack_require__(59536);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/Export/components/Head/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Headmodules = ({"wrap":"wrap___SSpd0","img":"img___nbd2O","table":"table___fcP71","totalScore":"totalScore___YxSMe","people":"people___bf9pK","glassSeal":"glassSeal___dYhKO","paperHeader":"paperHeader___gYUbq","exportBtn":"exportBtn___nyRYQ"});
// EXTERNAL MODULE: ./src/service/exercise.ts
var service_exercise = __webpack_require__(18846);
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 2 modules
var RenderHtml = __webpack_require__(53729);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(65327);
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/Exercise/Export/components/ExportSetting/index.tsx + 3 modules
var ExportSetting = __webpack_require__(31369);
// EXTERNAL MODULE: ./src/utils/constant.ts
var constant = __webpack_require__(67385);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/Export/components/Head/index.tsx
var Head = function Head(_ref) {
var _questionName$find, _questionName$find2, _questionName$find3, _questionName$find4, _questionName$find5, _questionName$find6, _questionName$find7, _questionName$find8, _questionName$find9, _exercise$exerciseExp2, _exercise$commonHeade, _exercise$exerciseExp3, _exercise$commonHeade2, _exercise$exerciseExp4, _exercise$exerciseExp5;
var _ref$isPreview = _ref.isPreview,
isPreview = _ref$isPreview === void 0 ? false : _ref$isPreview,
_ref$isExportBlank = _ref.isExportBlank,
isExportBlank = _ref$isExportBlank === void 0 ? false : _ref$isExportBlank,
activeTabs = _ref.activeTabs,
exercise = _ref.exercise,
globalSetting = _ref.globalSetting,
loading = _ref.loading,
user = _ref.user,
dispatch = _ref.dispatch,
_ref$showExportBtn = _ref.showExportBtn,
showExportBtn = _ref$showExportBtn === void 0 ? false : _ref$showExportBtn;
var params = (0,_umi_production_exports.useParams)();
var userInfo = user.userInfo;
var _useState = (0,_react_17_0_2_react.useState)(),
_useState2 = slicedToArray_default()(_useState, 2),
headData = _useState2[0],
setHeadData = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(),
_useState4 = slicedToArray_default()(_useState3, 2),
tableData = _useState4[0],
setTableData = _useState4[1];
var leftheight = (0,_react_17_0_2_react.useRef)(null);
var _useState5 = (0,_react_17_0_2_react.useState)(21),
_useState6 = slicedToArray_default()(_useState5, 2),
leftheights = _useState6[0],
setleftheights = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)([]),
_useState8 = slicedToArray_default()(_useState7, 2),
questionName = _useState8[0],
setQuestionName = _useState8[1];
(0,_react_17_0_2_react.useEffect)(function () {
!asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var questionName;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0,service_exercise/* getQuestionTypeAlias */.cV)({
id: params.exerciseId || params.categoryId
});
case 2:
questionName = _context.sent;
questionName.status == 0 && setQuestionName(questionName.data);
case 4:
case "end":
return _context.stop();
}
}, _callee);
}))();
if ((0,util/* isUnOrNull */.W)(activeTabs)) {
// getData();
} else {
// 兼容试卷预览tab 切换重新获取数据
activeTabs === "2" && getData();
}
}, [params.userId, params.coursesId, params.exerciseId, params.categoryId, activeTabs]);
(0,_react_17_0_2_react.useEffect)(function () {
if (leftheight.current) {
setleftheights(leftheight.current.clientHeight);
}
}, [leftheight.current]);
(0,_react_17_0_2_react.useEffect)(function () {
var _exercise$exerciseExp;
if ((_exercise$exerciseExp = exercise.exerciseExportHeadData) !== null && _exercise$exerciseExp !== void 0 && _exercise$exerciseExp.title) {
var res = exercise.exerciseExportHeadData;
setHeadData(objectSpread2_default()({}, res || {}));
var _ref3 = res || {},
table = _ref3.table;
var total_score;
var actual_total_score;
if (table !== null && table !== void 0 && table.total_singles_scores || table !== null && table !== void 0 && table.total_doubles_scores || table !== null && table !== void 0 && table.total_nulls_scores || table !== null && table !== void 0 && table.total_judges_scores || table !== null && table !== void 0 && table.total_pros_scores || table !== null && table !== void 0 && table.total_shixuns_scores || table !== null && table !== void 0 && table.total_mains_scores || table !== null && table !== void 0 && table.total_combination_scores || table !== null && table !== void 0 && table.total_bpros_scores) {
total_score = Number(table === null || table === void 0 ? void 0 : table.total_singles_scores) + Number(table === null || table === void 0 ? void 0 : table.total_doubles_scores) + Number(table === null || table === void 0 ? void 0 : table.total_nulls_scores) + Number(table === null || table === void 0 ? void 0 : table.total_judges_scores) + Number(table === null || table === void 0 ? void 0 : table.total_bpros_scores) + Number(table === null || table === void 0 ? void 0 : table.total_pros_scores) + Number(table === null || table === void 0 ? void 0 : table.total_shixuns_scores) + Number(table === null || table === void 0 ? void 0 : table.total_mains_scores) + Number(table === null || table === void 0 ? void 0 : table.total_combination_scores);
}
if (table !== null && table !== void 0 && table.singles_scores || table !== null && table !== void 0 && table.doubles_scores || table !== null && table !== void 0 && table.nulls_scores || table !== null && table !== void 0 && table.judges_scores || table !== null && table !== void 0 && table.pros_scores || table !== null && table !== void 0 && table.bpros_scores || table !== null && table !== void 0 && table.shixuns_scores || table !== null && table !== void 0 && table.mains_scores || table !== null && table !== void 0 && table.combination_scores) {
actual_total_score = Number(table === null || table === void 0 ? void 0 : table.singles_scores) + Number(table === null || table === void 0 ? void 0 : table.doubles_scores) + Number(table === null || table === void 0 ? void 0 : table.nulls_scores) + Number(table === null || table === void 0 ? void 0 : table.judges_scores) + Number(table === null || table === void 0 ? void 0 : table.pros_scores) + Number(table === null || table === void 0 ? void 0 : table.bpros_scores) + Number(table === null || table === void 0 ? void 0 : table.shixuns_scores) + Number(table === null || table === void 0 ? void 0 : table.mains_scores) + Number(table === null || table === void 0 ? void 0 : table.combination_scores);
}
var data = [{
key: '1',
name: '应得分',
singles_score: (table === null || table === void 0 ? void 0 : table.total_singles_scores) || 0,
doubles_score: (table === null || table === void 0 ? void 0 : table.total_doubles_scores) || 0,
nulls_score: (table === null || table === void 0 ? void 0 : table.total_nulls_scores) || 0,
judges_score: (table === null || table === void 0 ? void 0 : table.total_judges_scores) || 0,
pros_score: (table === null || table === void 0 ? void 0 : table.total_pros_scores) || 0,
bpros_score: (table === null || table === void 0 ? void 0 : table.total_bpros_scores) || 0,
shixuns_score: (table === null || table === void 0 ? void 0 : table.total_shixuns_scores) || 0,
mains_score: (table === null || table === void 0 ? void 0 : table.total_mains_scores) || 0,
total_combination_scores: (table === null || table === void 0 ? void 0 : table.total_combination_scores) || 0,
total_score: total_score || 0
}, {
key: '2',
name: '实得分',
singles_score: (table === null || table === void 0 ? void 0 : table.singles_scores) || 0,
doubles_score: (table === null || table === void 0 ? void 0 : table.doubles_scores) || 0,
nulls_score: (table === null || table === void 0 ? void 0 : table.nulls_scores) || 0,
judges_score: (table === null || table === void 0 ? void 0 : table.judges_scores) || 0,
pros_score: (table === null || table === void 0 ? void 0 : table.pros_scores) || 0,
bpros_score: (table === null || table === void 0 ? void 0 : table.bpros_scores) || 0,
shixuns_score: (table === null || table === void 0 ? void 0 : table.shixuns_scores) || 0,
mains_score: (table === null || table === void 0 ? void 0 : table.mains_scores) || 0,
total_combination_scores: (table === null || table === void 0 ? void 0 : table.combination_scores) || 0,
total_score: actual_total_score || 0
}, {
key: '3',
name: '评卷人'
}];
var blankData = [{
key: '1',
name: '应得分',
singles_score: (table === null || table === void 0 ? void 0 : table.total_singles_scores) || 0,
doubles_score: (table === null || table === void 0 ? void 0 : table.total_doubles_scores) || 0,
nulls_score: (table === null || table === void 0 ? void 0 : table.total_nulls_scores) || 0,
judges_score: (table === null || table === void 0 ? void 0 : table.total_judges_scores) || 0,
pros_score: (table === null || table === void 0 ? void 0 : table.total_pros_scores) || 0,
bpros_score: (table === null || table === void 0 ? void 0 : table.total_bpros_scores) || 0,
shixuns_score: (table === null || table === void 0 ? void 0 : table.total_shixuns_scores) || 0,
mains_score: (table === null || table === void 0 ? void 0 : table.total_mains_scores) || 0,
total_combination_scores: (table === null || table === void 0 ? void 0 : table.total_combination_scores) || 0,
total_score: total_score || 0
}, {
key: '2',
name: '实得分'
}, {
key: '3',
name: '评卷人'
}];
setTableData(toConsumableArray_default()(isExportBlank ? blankData : data));
}
}, [exercise.exerciseExportHeadData]);
var getData = /*#__PURE__*/function () {
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
var query, res, _ref5, table, total_score, actual_total_score, data, blankData;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
query = {
id: params.exerciseId || params.categoryId,
identify: (userInfo === null || userInfo === void 0 ? void 0 : userInfo.login) || null
};
_context2.next = 3;
return (0,service_exercise/* getExerciseExportHeadData */.iw)(query);
case 3:
res = _context2.sent;
setHeadData(res || {});
_ref5 = res || {}, table = _ref5.table;
if (table !== null && table !== void 0 && table.total_singles_scores || table !== null && table !== void 0 && table.total_doubles_scores || table !== null && table !== void 0 && table.total_nulls_scores || table !== null && table !== void 0 && table.total_judges_scores || table !== null && table !== void 0 && table.total_pros_scores || table !== null && table !== void 0 && table.total_bpros_scores || table !== null && table !== void 0 && table.total_shixuns_scores || table !== null && table !== void 0 && table.total_mains_scores || table !== null && table !== void 0 && table.total_combination_scores) {
total_score = Number(table === null || table === void 0 ? void 0 : table.total_singles_scores) + Number(table === null || table === void 0 ? void 0 : table.total_doubles_scores) + Number(table === null || table === void 0 ? void 0 : table.total_nulls_scores) + Number(table === null || table === void 0 ? void 0 : table.total_bpros_scores) + Number(table === null || table === void 0 ? void 0 : table.total_judges_scores) + Number(table === null || table === void 0 ? void 0 : table.total_pros_scores) + Number(table === null || table === void 0 ? void 0 : table.total_shixuns_scores) + Number(table === null || table === void 0 ? void 0 : table.total_mains_scores) + Number(table === null || table === void 0 ? void 0 : table.total_combination_scores);
}
if (table !== null && table !== void 0 && table.singles_scores || table !== null && table !== void 0 && table.doubles_scores || table !== null && table !== void 0 && table.nulls_scores || table !== null && table !== void 0 && table.judges_scores || table !== null && table !== void 0 && table.pros_scores || table !== null && table !== void 0 && table.bpros_scores || table !== null && table !== void 0 && table.shixuns_scores || table !== null && table !== void 0 && table.mains_scores || table !== null && table !== void 0 && table.combination_scores) {
actual_total_score = Number(table === null || table === void 0 ? void 0 : table.singles_scores) + Number(table === null || table === void 0 ? void 0 : table.doubles_scores) + Number(table === null || table === void 0 ? void 0 : table.bpros_scores) + Number(table === null || table === void 0 ? void 0 : table.nulls_scores) + Number(table === null || table === void 0 ? void 0 : table.judges_scores) + Number(table === null || table === void 0 ? void 0 : table.pros_scores) + Number(table === null || table === void 0 ? void 0 : table.shixuns_scores) + Number(table === null || table === void 0 ? void 0 : table.mains_scores) + Number(table === null || table === void 0 ? void 0 : table.combination_scores);
}
data = [{
key: '1',
name: '应得分',
singles_score: (table === null || table === void 0 ? void 0 : table.total_singles_scores) || 0,
doubles_score: (table === null || table === void 0 ? void 0 : table.total_doubles_scores) || 0,
nulls_score: (table === null || table === void 0 ? void 0 : table.total_nulls_scores) || 0,
judges_score: (table === null || table === void 0 ? void 0 : table.total_judges_scores) || 0,
pros_score: (table === null || table === void 0 ? void 0 : table.total_pros_scores) || 0,
bpros_score: (table === null || table === void 0 ? void 0 : table.total_bpros_scores) || 0,
shixuns_score: (table === null || table === void 0 ? void 0 : table.total_shixuns_scores) || 0,
mains_score: (table === null || table === void 0 ? void 0 : table.total_mains_scores) || 0,
total_combination_scores: (table === null || table === void 0 ? void 0 : table.total_combination_scores) || 0,
total_score: total_score || 0
}, {
key: '2',
name: '实得分',
singles_score: (table === null || table === void 0 ? void 0 : table.singles_scores) || 0,
doubles_score: (table === null || table === void 0 ? void 0 : table.doubles_scores) || 0,
nulls_score: (table === null || table === void 0 ? void 0 : table.nulls_scores) || 0,
judges_score: (table === null || table === void 0 ? void 0 : table.judges_scores) || 0,
pros_score: (table === null || table === void 0 ? void 0 : table.pros_scores) || 0,
bpros_score: (table === null || table === void 0 ? void 0 : table.bpros_scores) || 0,
shixuns_score: (table === null || table === void 0 ? void 0 : table.shixuns_scores) || 0,
mains_score: (table === null || table === void 0 ? void 0 : table.mains_scores) || 0,
total_combination_scores: (table === null || table === void 0 ? void 0 : table.combination_scores) || 0,
total_score: actual_total_score || 0
}, {
key: '3',
name: '评卷人'
}];
blankData = [{
key: '1',
name: '应得分'
}, {
key: '2',
name: '实得分'
}, {
key: '3',
name: '评卷人'
}];
setTableData(isExportBlank ? blankData : data);
case 11:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function getData() {
return _ref4.apply(this, arguments);
};
}();
var columns = [{
width: '10%',
title: '题型',
align: 'center',
dataIndex: 'name',
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
children: text
});
}
}, {
// width: '10%',
title: (questionName === null || questionName === void 0 || (_questionName$find = questionName.find(function (item) {
return item.value == constant/* QUESTIONTYPE */.f[0].nameType;
})) === null || _questionName$find === void 0 ? void 0 : _questionName$find.name) || '单选题',
align: 'center',
// ellipsis: true,
dataIndex: 'singles_score',
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
children: text === '0.0' ? 0 : text
});
}
}, {
// width: '10%',
title: (questionName === null || questionName === void 0 || (_questionName$find2 = questionName.find(function (item) {
return item.value == constant/* QUESTIONTYPE */.f[1].nameType;
})) === null || _questionName$find2 === void 0 ? void 0 : _questionName$find2.name) || '多选题',
align: 'center',
// ellipsis: true,
dataIndex: 'doubles_score',
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
children: text === '0.0' ? 0 : text
});
}
}, {
// width: '10%',
title: (questionName === null || questionName === void 0 || (_questionName$find3 = questionName.find(function (item) {
return item.value == constant/* QUESTIONTYPE */.f[3].nameType;
})) === null || _questionName$find3 === void 0 ? void 0 : _questionName$find3.name) || '填空题',
align: 'center',
// ellipsis: true,
dataIndex: 'nulls_score',
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
children: text === '0.0' ? 0 : text
});
}
}, {
// width: '10%',
title: (questionName === null || questionName === void 0 || (_questionName$find4 = questionName.find(function (item) {
return item.value == constant/* QUESTIONTYPE */.f[2].nameType;
})) === null || _questionName$find4 === void 0 ? void 0 : _questionName$find4.name) || '判断题',
align: 'center',
// ellipsis: true,
dataIndex: 'judges_score',
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
children: text === '0.0' ? 0 : text
});
}
}, {
// width: '10%',
title: (questionName === null || questionName === void 0 || (_questionName$find5 = questionName.find(function (item) {
return item.value == constant/* QUESTIONTYPE */.f[6].nameType;
})) === null || _questionName$find5 === void 0 ? void 0 : _questionName$find5.name) || '编程题',
align: 'center',
// ellipsis: true,
dataIndex: 'pros_score',
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
children: text === '0.0' ? 0 : text
});
}
}, {
// width: '10%',
title: (questionName === null || questionName === void 0 || (_questionName$find6 = questionName.find(function (item) {
return item.value == constant/* QUESTIONTYPE */.f[5].nameType;
})) === null || _questionName$find6 === void 0 ? void 0 : _questionName$find6.name) || '实训题',
align: 'center',
// ellipsis: true,
dataIndex: 'shixuns_score',
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
children: text === '0.0' ? 0 : text
});
}
}, {
// width: '10%',
title: (questionName === null || questionName === void 0 || (_questionName$find7 = questionName.find(function (item) {
return item.value == constant/* QUESTIONTYPE */.f[4].nameType;
})) === null || _questionName$find7 === void 0 ? void 0 : _questionName$find7.name) || '简答题',
align: 'center',
// ellipsis: true,
dataIndex: 'mains_score',
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
children: text === '0.0' ? 0 : text
});
}
}, {
// width: '10%',
title: (questionName === null || questionName === void 0 || (_questionName$find8 = questionName.find(function (item) {
return item.value == constant/* QUESTIONTYPE */.f[7].nameType;
})) === null || _questionName$find8 === void 0 ? void 0 : _questionName$find8.name) || '组合题',
align: 'center',
// ellipsis: true,
dataIndex: 'total_combination_scores',
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
children: text === '0.0' ? 0 : text
});
}
}, {
// width: '10%',
title: (questionName === null || questionName === void 0 || (_questionName$find9 = questionName.find(function (item) {
return item.value == constant/* QUESTIONTYPE */.f[8].nameType;
})) === null || _questionName$find9 === void 0 ? void 0 : _questionName$find9.name) || '程序填空题',
align: 'center',
// ellipsis: true,
dataIndex: 'bpros_score',
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
children: text === '0.0' ? 0 : text
});
}
}, {
width: '10%',
title: '总分',
align: 'center',
dataIndex: 'total_score',
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
children: text === '0.0' ? 0 : text === null || text === void 0 ? void 0 : text.toFixed(1)
});
}
}];
var _ref6 = headData || {},
exercise_header = _ref6.exercise_header;
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [((exercise_header === null || exercise_header === void 0 ? void 0 : exercise_header.show_user) || (exercise_header === null || exercise_header === void 0 ? void 0 : exercise_header.show_no) || (exercise_header === null || exercise_header === void 0 ? void 0 : exercise_header.show_group)) && /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
className: Headmodules.glassSeal,
children: [(exercise_header === null || exercise_header === void 0 ? void 0 : exercise_header.show_user) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: ["\u59D3\u540D\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: headData === null || headData === void 0 ? void 0 : headData.user
})]
}), (exercise_header === null || exercise_header === void 0 ? void 0 : exercise_header.show_no) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: ["\u5B66\u53F7\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: headData === null || headData === void 0 ? void 0 : headData.student_id
})]
}), (exercise_header === null || exercise_header === void 0 ? void 0 : exercise_header.show_group) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: ["\u4E13\u4E1A\u73ED\u7EA7\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: headData === null || headData === void 0 ? void 0 : headData.group_name
})]
}), (exercise_header === null || exercise_header === void 0 ? void 0 : exercise_header.show_school_name) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: ["\u5B66\u6821/\u5355\u4F4D\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: headData === null || headData === void 0 ? void 0 : headData.school_name
})]
}), (exercise_header === null || exercise_header === void 0 ? void 0 : exercise_header.show_phone) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: ["\u624B\u673A\u53F7\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: headData === null || headData === void 0 ? void 0 : headData.phone
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
className: "".concat(Headmodules.wrap, " ").concat(isPreview ? 'pl20' : '', " "),
children: [(headData === null || headData === void 0 ? void 0 : headData.photo_url) && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
className: Headmodules.img,
src: headData === null || headData === void 0 ? void 0 : headData.photo_url
}), (exercise_header === null || exercise_header === void 0 ? void 0 : exercise_header.show_title) && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
className: Headmodules.paperHeader,
justify: "center",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: headData === null || headData === void 0 ? void 0 : headData.title
}), showExportBtn && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
icon: /*#__PURE__*/(0,jsx_runtime.jsx)(SettingOutlined/* default */.Z, {}),
className: Headmodules.exportBtn,
onClick: function onClick() {
dispatch({
type: 'exercise/setActionTabs',
payload: {
key: 'exportSetting'
}
});
},
children: "\u5BFC\u51FA\u8BBE\u7F6E"
})]
}), (exercise_header === null || exercise_header === void 0 ? void 0 : exercise_header.show_body) && ((exercise === null || exercise === void 0 || (_exercise$exerciseExp2 = exercise.exerciseExportHeadData) === null || _exercise$exerciseExp2 === void 0 ? void 0 : _exercise$exerciseExp2.exercise_description) || (exercise === null || exercise === void 0 || (_exercise$commonHeade = exercise.commonHeader) === null || _exercise$commonHeade === void 0 ? void 0 : _exercise$commonHeade.exercise_description)) && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
ref: leftheight,
style: {
justifyContent: leftheights === 21 ? 'center' : 'left',
wordBreak: 'break-all',
display: 'flex',
textAlign: 'left'
},
className: "tc c-grey-333",
children: "\u8BD5\u5377\u987B\u77E5\uFF1A".concat((exercise === null || exercise === void 0 || (_exercise$exerciseExp3 = exercise.exerciseExportHeadData) === null || _exercise$exerciseExp3 === void 0 ? void 0 : _exercise$exerciseExp3.exercise_description) || (exercise === null || exercise === void 0 || (_exercise$commonHeade2 = exercise.commonHeader) === null || _exercise$commonHeade2 === void 0 ? void 0 : _exercise$commonHeade2.exercise_description))
}), (exercise_header === null || exercise_header === void 0 ? void 0 : exercise_header.show_info) && /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
className: "tc c-grey-666",
children: ["\u5171:\u3010", headData === null || headData === void 0 ? void 0 : headData.large_counts, "\u5927\u9898\u3011\u3010", headData === null || headData === void 0 ? void 0 : headData.total_count, "\u5C0F\u9898\u3011\u3010 \u6EE1\u5206", headData === null || headData === void 0 ? void 0 : headData.score, "\u5206\u3011 \u8003\u8BD5\u65F6\u95F4\uFF1A\u3010", (headData === null || headData === void 0 ? void 0 : headData.time) > -1 ? "".concat(headData === null || headData === void 0 ? void 0 : headData.time, "\u5206\u949F") : "\u4E0D\u9650", "\u3011"]
}), (exercise_header === null || exercise_header === void 0 ? void 0 : exercise_header.show_desc) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "mt10",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
className: "font16",
children: "\u8003\u8BD5\u8BF4\u660E\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: headData === null || headData === void 0 ? void 0 : headData.description
})]
}), (exercise_header === null || exercise_header === void 0 ? void 0 : exercise_header.show_table) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "mt10",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
className: Headmodules.table,
columns: columns,
dataSource: toConsumableArray_default()(tableData || []),
bordered: true,
pagination: false
})
}), (exercise === null || exercise === void 0 || (_exercise$exerciseExp4 = exercise.exerciseExportHeadData) === null || _exercise$exerciseExp4 === void 0 ? void 0 : _exercise$exerciseExp4.analysis) && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
justifyContent: 'left',
wordBreak: 'break-all',
display: 'flex',
textAlign: 'left',
marginTop: "10px"
},
className: "tc c-grey-333",
children: "\u8003\u8BD5\u8BC4\u4EF7\uFF1A".concat(exercise === null || exercise === void 0 || (_exercise$exerciseExp5 = exercise.exerciseExportHeadData) === null || _exercise$exerciseExp5 === void 0 ? void 0 : _exercise$exerciseExp5.analysis)
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(ExportSetting/* default */.Z, {})]
});
};
/* harmony default export */ var components_Head = ((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
};
})(Head));
/***/ })
}]);