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.
888 lines
48 KiB
888 lines
48 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[8605],{
|
|
|
|
/***/ 35894:
|
|
/*!************************************************************!*\
|
|
!*** ./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/_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__(50993);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/image/index.js + 26 modules
|
|
var es_image = __webpack_require__(10211);
|
|
;// CONCATENATED MODULE: ./src/components/image-preview/index.tsx
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var image_preview = (() => {
|
|
const [url, setUrl] = (0,_react_17_0_2_react.useState)("");
|
|
const [deg, setDeg] = (0,_react_17_0_2_react.useState)(0);
|
|
let [width, setwidth] = (0,_react_17_0_2_react.useState)();
|
|
let [height, setheight] = (0,_react_17_0_2_react.useState)();
|
|
const [down, setdown] = (0,_react_17_0_2_react.useState)(false);
|
|
const saveUrl = (0,_react_17_0_2_react.useRef)("");
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
const unSub = mediator/* default */.Z.subscribe("preview-image", (value) => {
|
|
setUrl(value);
|
|
console.log(imgref.current);
|
|
document.body.style.overflow = "hidden";
|
|
});
|
|
return unSub;
|
|
}, []);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
document.addEventListener("keydown", onViewEscClose);
|
|
return () => {
|
|
document.removeEventListener("keydown", onViewEscClose);
|
|
};
|
|
}, []);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
saveUrl.current = url;
|
|
}, [url]);
|
|
function onViewEscClose(e) {
|
|
if (e.keyCode == 27 && saveUrl.current) {
|
|
onClose();
|
|
}
|
|
}
|
|
function onClose() {
|
|
document.body.style.overflow = "auto";
|
|
setwidth(void 0);
|
|
setheight(void 0);
|
|
setDeg(0);
|
|
setUrl("");
|
|
}
|
|
function onRotate() {
|
|
setDeg(deg + 90);
|
|
}
|
|
function big() {
|
|
width = imgref.current.width * 1.1;
|
|
height = imgref.current.height * 1.1;
|
|
setheight(height);
|
|
setwidth(width);
|
|
}
|
|
function small() {
|
|
width = imgref.current.width / 1.1;
|
|
height = imgref.current.height / 1.1;
|
|
setheight(height);
|
|
setwidth(width);
|
|
}
|
|
const maskRef = (0,_react_17_0_2_react.useRef)();
|
|
const previewWrapperRef = (0,_react_17_0_2_react.useRef)();
|
|
const imgref = (0,_react_17_0_2_react.useRef)();
|
|
const handleMaskClick = (e) => {
|
|
if (e.nativeEvent.target === maskRef.current || e.nativeEvent.target === previewWrapperRef.current) {
|
|
onClose();
|
|
}
|
|
};
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, !url ? null : /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"div",
|
|
null,
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "preview-wrp-group", ref: previewWrapperRef }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_image/* default */.Z,
|
|
{
|
|
className: "image-preview",
|
|
src: url,
|
|
style: { display: "none" },
|
|
preview: {
|
|
visible: true,
|
|
src: url,
|
|
movable: false,
|
|
onVisibleChange: (value) => {
|
|
setUrl("");
|
|
}
|
|
},
|
|
alt: "\u9884\u89C8\u5927\u56FE"
|
|
}
|
|
))
|
|
));
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 31880:
|
|
/*!***************************************************************************************************!*\
|
|
!*** ./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/_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__(20008);
|
|
// 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__(73598);
|
|
// 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__(96971);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/PlusOutlined.js + 1 modules
|
|
var PlusOutlined = __webpack_require__(79297);
|
|
;// 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 + 15 modules
|
|
var _umi_production_exports = __webpack_require__(23852);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(64841);
|
|
// EXTERNAL MODULE: ./src/components/ImagesIcon/index.ts + 33 modules
|
|
var ImagesIcon = __webpack_require__(81200);
|
|
// EXTERNAL MODULE: ./src/components/mediator.js
|
|
var mediator = __webpack_require__(50993);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(19351);
|
|
// EXTERNAL MODULE: ./src/components/markdown-editor/index.tsx + 15 modules
|
|
var markdown_editor = __webpack_require__(16393);
|
|
// EXTERNAL MODULE: ./src/components/image-preview/index.tsx + 1 modules
|
|
var image_preview = __webpack_require__(35894);
|
|
;// 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";
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/Export/components/ExportSetting/index.tsx
|
|
var __defProp = Object.defineProperty;
|
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var __spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (__hasOwnProp.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
if (__getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(b)) {
|
|
if (__propIsEnum.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
var __async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { TextArea } = input["default"];
|
|
const ExportSetting = ({ exercise, loading, dispatch }) => {
|
|
var _a;
|
|
const { workSetting } = exercise;
|
|
const params = (0,_umi_production_exports.useParams)();
|
|
params.category = params.categoryId || params.exerciseId;
|
|
params.categoryId = params.categoryId || params.exerciseId;
|
|
const [disabled, setDisabled] = (0,_react_17_0_2_react.useState)(false);
|
|
const [pageLoading, setPageLoading] = (0,_react_17_0_2_react.useState)(false);
|
|
let [data, setData] = (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: ""
|
|
// 考试说明内容
|
|
});
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
setDefaultData();
|
|
}, [workSetting]);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
dispatch({
|
|
type: "exercise/getWorkSetting",
|
|
payload: __spreadValues({}, params)
|
|
});
|
|
}, []);
|
|
const setDefaultData = () => {
|
|
var _a2, _b, _c, _d;
|
|
const res = JSON.parse(JSON.stringify(workSetting));
|
|
Object.keys(data).forEach((item) => {
|
|
var _a3;
|
|
data[item] = (_a3 = res == null ? void 0 : res["exercise_header"]) == null ? void 0 : _a3[item];
|
|
});
|
|
data.file_list = ((_a2 = res == null ? void 0 : res["exercise_header"]) == null ? void 0 : _a2.attachment_id) ? [{ uid: (_b = res == null ? void 0 : res["exercise_header"]) == null ? void 0 : _b.attachment_id, id: (_c = res == null ? void 0 : res["exercise_header"]) == null ? void 0 : _c.attachment_id, url: (_d = res == null ? void 0 : res["exercise_header"]) == null ? void 0 : _d.photo_url }] : [];
|
|
setData(data);
|
|
};
|
|
const handleSubmit = () => {
|
|
var _a2, _b, _c;
|
|
const bodyData = JSON.parse(JSON.stringify(data));
|
|
bodyData.categoryId = params.categoryId;
|
|
bodyData.attachment_id = ((_c = (_b = (_a2 = bodyData.file_list) == null ? void 0 : _a2[0]) == null ? void 0 : _b.response) == null ? void 0 : _c.id) || null;
|
|
handleUpdate(bodyData);
|
|
};
|
|
const handleUpdate = (bodyData) => __async(void 0, null, function* () {
|
|
setPageLoading(true);
|
|
const res = yield (0,fetch/* default */.ZP)(`/api/exercises/${params == null ? void 0 : params.categoryId}/foramt_settings.json`, {
|
|
method: "post",
|
|
body: bodyData
|
|
});
|
|
if (res.status === 0) {
|
|
message/* default */.ZP.success("\u66F4\u65B0\u6210\u529F");
|
|
dispatch({
|
|
type: "exercise/getCommonHeader",
|
|
payload: __spreadValues({}, params)
|
|
});
|
|
dispatch({
|
|
type: "exercise/getWorkSetting",
|
|
payload: __spreadValues({}, params)
|
|
});
|
|
dispatch({
|
|
type: "exercise/getExerciseExportHeadData",
|
|
payload: {
|
|
id: params.exerciseId || params.categoryId,
|
|
identify: params.userId || null
|
|
}
|
|
});
|
|
setPageLoading(false);
|
|
}
|
|
});
|
|
const uploadProps = {
|
|
disabled,
|
|
multiple: false,
|
|
listType: "picture-card",
|
|
onPreview: (file) => {
|
|
mediator/* default */.Z.publish("preview-image", file.thumbUrl || file.url);
|
|
},
|
|
withCredentials: true,
|
|
fileList: data.file_list,
|
|
beforeUpload: (file) => {
|
|
const 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: `${env/* default */.Z.API_SERVER}/api/attachments.json`,
|
|
onChange(info) {
|
|
let fileList = info.fileList.filter((file) => !!file.status);
|
|
data.file_list = fileList;
|
|
setData(Object.assign({}, data));
|
|
},
|
|
onRemove: (file) => __async(void 0, null, function* () {
|
|
data.file_list = [];
|
|
setData(Object.assign({}, data));
|
|
return true;
|
|
})
|
|
};
|
|
return /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
modal["default"],
|
|
{
|
|
title: "\u5BFC\u51FA\u8BBE\u7F6E",
|
|
className: ExportSettingmodules.modalWrapper,
|
|
width: 900,
|
|
centered: true,
|
|
open: exercise.actionTabs.key === "exportSetting",
|
|
onOk: () => handleSubmit(),
|
|
onCancel: () => {
|
|
setDefaultData();
|
|
dispatch({
|
|
type: "exercise/setActionTabs",
|
|
payload: {}
|
|
});
|
|
}
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("section", { className: ExportSettingmodules.exportSettingWrapper }, /* @__PURE__ */ _react_17_0_2_react.createElement(spin/* default */.Z, { spinning: loading["exercise/getWorkSetting"] || pageLoading }, /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, { wrap: false, justify: "space-between" }, /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, null, /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, { align: "middle" }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u5377\u5934\u5DE6\u89D2\u6807"), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: ExportSettingmodules.tips }, "\u56FE\u7247\u5EFA\u8BAE\u5C3A\u5BF8\uFF1A700px*500px\uFF0C\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC7200k")), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "mt15" }, /* @__PURE__ */ _react_17_0_2_react.createElement(upload["default"], __spreadValues({}, uploadProps), !((_a = data.file_list) == null ? void 0 : _a.length) && /* @__PURE__ */ _react_17_0_2_react.createElement("div", null, /* @__PURE__ */ _react_17_0_2_react.createElement(PlusOutlined/* default */.Z, null), /* @__PURE__ */ _react_17_0_2_react.createElement("div", { style: { marginTop: 8 } }, "\u4E0A\u4F20")))), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { span: 24, className: "mt15" }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_checkbox["default"],
|
|
{
|
|
checked: data.show_title,
|
|
disabled,
|
|
onChange: (e) => {
|
|
data.show_title = e.target.checked;
|
|
setData(Object.assign({}, data));
|
|
}
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u5C55\u793A\u8BD5\u5377\u6807\u9898")
|
|
)), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { span: 24, className: "mt15" }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_checkbox["default"],
|
|
{
|
|
checked: data.show_body,
|
|
disabled,
|
|
onChange: (e) => {
|
|
data.show_body = e.target.checked;
|
|
setData(Object.assign({}, data));
|
|
}
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u5C55\u793A\u8003\u8BD5\u5185\u5BB9\uFF08\u5373\u672C\u8BD5\u5377\u6240\u5C5E\u8BFE\u7A0B\u540D\u79F0\uFF09")
|
|
)), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { span: 24, className: "mt15" }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_checkbox["default"],
|
|
{
|
|
checked: data.show_info,
|
|
disabled,
|
|
onChange: (e) => {
|
|
data.show_info = e.target.checked;
|
|
setData(Object.assign({}, data));
|
|
}
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u5C55\u793A\u9898\u91CF\u3001\u5206\u503C\u3001\u8003\u8BD5\u65F6\u957F")
|
|
)), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { span: 24, className: "mt15" }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_checkbox["default"],
|
|
{
|
|
checked: data.show_table,
|
|
disabled,
|
|
onChange: (e) => {
|
|
data.show_table = e.target.checked;
|
|
setData(Object.assign({}, data));
|
|
}
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u5C55\u793A\u5F97\u5206\u3001\u8BC4\u5206\u8868\u683C")
|
|
)), /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, { align: "middle", className: `mt20 ${ExportSettingmodules.pottedLine}` }, /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, null, /* @__PURE__ */ _react_17_0_2_react.createElement("img", { src: halfDottedLine_namespaceObject, alt: "" })), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { className: ExportSettingmodules.text }, "\u5BC6\u5C01\u7EBF\u533A\u57DF\u8BBE\u7F6E"), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, null, /* @__PURE__ */ _react_17_0_2_react.createElement("img", { src: halfDottedLine_namespaceObject, alt: "" }))), /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, { className: "mt15", justify: "center", style: { width: 320 } }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_checkbox["default"],
|
|
{
|
|
className: "pl8",
|
|
checked: data.show_user,
|
|
disabled,
|
|
onChange: (e) => {
|
|
data.show_user = e.target.checked;
|
|
setData(Object.assign({}, data));
|
|
}
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u59D3\u540D")
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_checkbox["default"],
|
|
{
|
|
checked: data.show_no,
|
|
disabled,
|
|
onChange: (e) => {
|
|
data.show_no = e.target.checked;
|
|
setData(Object.assign({}, data));
|
|
}
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u5B66\u53F7")
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_checkbox["default"],
|
|
{
|
|
checked: data.show_group,
|
|
disabled,
|
|
onChange: (e) => {
|
|
data.show_group = e.target.checked;
|
|
setData(Object.assign({}, data));
|
|
}
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u4E13\u4E1A\u73ED\u7EA7")
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_checkbox["default"],
|
|
{
|
|
checked: data.show_school_name,
|
|
disabled,
|
|
onChange: (e) => {
|
|
data.show_school_name = e.target.checked;
|
|
setData(Object.assign({}, data));
|
|
}
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u5B66\u6821/\u5355\u4F4D")
|
|
), /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_checkbox["default"],
|
|
{
|
|
checked: data.show_phone,
|
|
disabled,
|
|
onChange: (e) => {
|
|
data.show_phone = e.target.checked;
|
|
setData(Object.assign({}, data));
|
|
}
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u624B\u673A\u53F7")
|
|
)), /* @__PURE__ */ _react_17_0_2_react.createElement("img", { src: dottedLine_namespaceObject, alt: "", className: "mt15", style: { width: 320 } }), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { span: 24, className: "mt15" }, /* @__PURE__ */ _react_17_0_2_react.createElement("span", null, "\u6BCF\u9875\u5BFC\u51FA\u6700\u5927\u8BD5\u9898\u6570\uFF1A"), /* @__PURE__ */ _react_17_0_2_react.createElement(input_number/* default */.Z, { size: "middle", min: 1, value: !data.export_page_num ? 40 : data.export_page_num, onChange: (value) => {
|
|
data.export_page_num = value;
|
|
setData(__spreadValues({}, data));
|
|
} }), /* @__PURE__ */ _react_17_0_2_react.createElement("span", { className: "ml10" }, "\u9898")), /* @__PURE__ */ _react_17_0_2_react.createElement(row/* default */.Z, { className: "mt15" }, /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
es_checkbox["default"],
|
|
{
|
|
checked: data.show_desc,
|
|
disabled,
|
|
onChange: (e) => {
|
|
data.show_desc = e.target.checked;
|
|
setData(Object.assign({}, data));
|
|
}
|
|
},
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement("div", null, "\u8003\u8BD5\u8BF4\u660E")
|
|
)), data.show_desc && /* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
"div",
|
|
{ className: "mt15" },
|
|
// disabled ?
|
|
// <TextArea style={{ height: 150, width: 550 }} disabled value={data.description} /> :
|
|
/* @__PURE__ */ _react_17_0_2_react.createElement(
|
|
markdown_editor/* default */.Z,
|
|
{
|
|
width: 550,
|
|
height: 100,
|
|
defaultValue: data.description,
|
|
id: "exercise-detail-config-exam-description-id",
|
|
onChange: (value) => {
|
|
data.description = value;
|
|
setData(Object.assign({}, data));
|
|
}
|
|
}
|
|
)
|
|
)), /* @__PURE__ */ _react_17_0_2_react.createElement(col/* default */.Z, { className: ExportSettingmodules.imgPreviewPart }, /* @__PURE__ */ _react_17_0_2_react.createElement("div", { className: "pb10" }, "\u793A\u4F8B\u56FE\u7247\u9884\u89C8\uFF1A"), /* @__PURE__ */ _react_17_0_2_react.createElement("img", { src: ImagesIcon/* exportExerciseTemplate */.qz })))), /* @__PURE__ */ _react_17_0_2_react.createElement(image_preview/* default */.Z, null))
|
|
);
|
|
};
|
|
/* harmony default export */ var components_ExportSetting = ((0,_umi_production_exports.connect)(
|
|
({
|
|
exercise,
|
|
loading,
|
|
globalSetting
|
|
}) => ({
|
|
exercise,
|
|
loading: loading.effects,
|
|
globalSetting
|
|
})
|
|
)(ExportSetting));
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 53006:
|
|
/*!******************************************************************************************!*\
|
|
!*** ./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/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 15 modules
|
|
var _umi_production_exports = __webpack_require__(23852);
|
|
// 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/table/index.js + 85 modules
|
|
var table = __webpack_require__(86383);
|
|
;// 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__(53669);
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx
|
|
var RenderHtml = __webpack_require__(92936);
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(75798);
|
|
// EXTERNAL MODULE: ./src/pages/Classrooms/Lists/Exercise/Export/components/ExportSetting/index.tsx + 3 modules
|
|
var ExportSetting = __webpack_require__(31880);
|
|
// EXTERNAL MODULE: ./src/utils/constant.ts
|
|
var constant = __webpack_require__(16298);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(19351);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Exercise/Export/components/Head/index.tsx
|
|
/* provided dependency */ var React = __webpack_require__(/*! react */ 59301);
|
|
var __defProp = Object.defineProperty;
|
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
var __spreadValues = (a, b) => {
|
|
for (var prop in b || (b = {}))
|
|
if (__hasOwnProp.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
if (__getOwnPropSymbols)
|
|
for (var prop of __getOwnPropSymbols(b)) {
|
|
if (__propIsEnum.call(b, prop))
|
|
__defNormalProp(a, prop, b[prop]);
|
|
}
|
|
return a;
|
|
};
|
|
var __async = (__this, __arguments, generator) => {
|
|
return new Promise((resolve, reject) => {
|
|
var fulfilled = (value) => {
|
|
try {
|
|
step(generator.next(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var rejected = (value) => {
|
|
try {
|
|
step(generator.throw(value));
|
|
} catch (e) {
|
|
reject(e);
|
|
}
|
|
};
|
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
});
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Head = ({
|
|
isPreview = false,
|
|
isExportBlank = false,
|
|
activeTabs,
|
|
exercise,
|
|
globalSetting,
|
|
loading,
|
|
user,
|
|
dispatch,
|
|
showExportBtn = false
|
|
}) => {
|
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
|
const params = (0,_umi_production_exports.useParams)();
|
|
const { userInfo } = user;
|
|
const [headData, setHeadData] = (0,_react_17_0_2_react.useState)();
|
|
const [tableData, setTableData] = (0,_react_17_0_2_react.useState)();
|
|
let leftheight = (0,_react_17_0_2_react.useRef)(null);
|
|
const [leftheights, setleftheights] = (0,_react_17_0_2_react.useState)(21);
|
|
const [questionName, setQuestionName] = (0,_react_17_0_2_react.useState)([]);
|
|
const questionNameGet = (0,_react_17_0_2_react.useRef)(true);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
!(() => __async(void 0, null, function* () {
|
|
if (!questionNameGet.current)
|
|
return;
|
|
questionNameGet.current = false;
|
|
const questionName2 = yield (0,service_exercise/* getQuestionTypeAlias */.cV)({
|
|
id: params.exerciseId || params.categoryId
|
|
});
|
|
questionName2.status == 0 && setQuestionName(questionName2.data);
|
|
}))();
|
|
if ((0,util/* isUnOrNull */.W)(activeTabs)) {
|
|
} else {
|
|
activeTabs === "2" && getData();
|
|
}
|
|
}, [params.userId, params.coursesId, params.exerciseId, params.categoryId, activeTabs]);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
if (leftheight.current) {
|
|
setleftheights(leftheight.current.clientHeight);
|
|
}
|
|
}, [leftheight.current]);
|
|
(0,_react_17_0_2_react.useEffect)(() => {
|
|
var _a2;
|
|
if ((_a2 = exercise.exerciseExportHeadData) == null ? void 0 : _a2.title) {
|
|
const res = exercise.exerciseExportHeadData;
|
|
setHeadData(__spreadValues({}, res || {}));
|
|
const { table } = res || {};
|
|
let total_score;
|
|
let actual_total_score;
|
|
if ((table == null ? void 0 : table.total_singles_scores) || (table == null ? void 0 : table.total_doubles_scores) || (table == null ? void 0 : table.total_nulls_scores) || (table == null ? void 0 : table.total_judges_scores) || (table == null ? void 0 : table.total_pros_scores) || (table == null ? void 0 : table.total_shixuns_scores) || (table == null ? void 0 : table.total_mains_scores) || (table == null ? void 0 : table.total_combination_scores) || (table == null ? void 0 : table.total_bpros_scores)) {
|
|
total_score = Number(table == null ? void 0 : table.total_singles_scores) + Number(table == null ? void 0 : table.total_doubles_scores) + Number(table == null ? void 0 : table.total_nulls_scores) + Number(table == null ? void 0 : table.total_judges_scores) + Number(table == null ? void 0 : table.total_bpros_scores) + Number(table == null ? void 0 : table.total_pros_scores) + Number(table == null ? void 0 : table.total_shixuns_scores) + Number(table == null ? void 0 : table.total_mains_scores) + Number(table == null ? void 0 : table.total_combination_scores);
|
|
}
|
|
if ((table == null ? void 0 : table.singles_scores) || (table == null ? void 0 : table.doubles_scores) || (table == null ? void 0 : table.nulls_scores) || (table == null ? void 0 : table.judges_scores) || (table == null ? void 0 : table.pros_scores) || (table == null ? void 0 : table.bpros_scores) || (table == null ? void 0 : table.shixuns_scores) || (table == null ? void 0 : table.mains_scores) || (table == null ? void 0 : table.combination_scores)) {
|
|
actual_total_score = Number(table == null ? void 0 : table.singles_scores) + Number(table == null ? void 0 : table.doubles_scores) + Number(table == null ? void 0 : table.nulls_scores) + Number(table == null ? void 0 : table.judges_scores) + Number(table == null ? void 0 : table.pros_scores) + Number(table == null ? void 0 : table.bpros_scores) + Number(table == null ? void 0 : table.shixuns_scores) + Number(table == null ? void 0 : table.mains_scores) + Number(table == null ? void 0 : table.combination_scores);
|
|
}
|
|
const data = [
|
|
{
|
|
key: "1",
|
|
name: "\u5E94\u5F97\u5206",
|
|
singles_score: (table == null ? void 0 : table.total_singles_scores) || 0,
|
|
doubles_score: (table == null ? void 0 : table.total_doubles_scores) || 0,
|
|
nulls_score: (table == null ? void 0 : table.total_nulls_scores) || 0,
|
|
judges_score: (table == null ? void 0 : table.total_judges_scores) || 0,
|
|
pros_score: (table == null ? void 0 : table.total_pros_scores) || 0,
|
|
bpros_score: (table == null ? void 0 : table.total_bpros_scores) || 0,
|
|
shixuns_score: (table == null ? void 0 : table.total_shixuns_scores) || 0,
|
|
mains_score: (table == null ? void 0 : table.total_mains_scores) || 0,
|
|
total_combination_scores: (table == null ? void 0 : table.total_combination_scores) || 0,
|
|
total_score: total_score || 0
|
|
},
|
|
{
|
|
key: "2",
|
|
name: "\u5B9E\u5F97\u5206",
|
|
singles_score: (table == null ? void 0 : table.singles_scores) || 0,
|
|
doubles_score: (table == null ? void 0 : table.doubles_scores) || 0,
|
|
nulls_score: (table == null ? void 0 : table.nulls_scores) || 0,
|
|
judges_score: (table == null ? void 0 : table.judges_scores) || 0,
|
|
pros_score: (table == null ? void 0 : table.pros_scores) || 0,
|
|
bpros_score: (table == null ? void 0 : table.bpros_scores) || 0,
|
|
shixuns_score: (table == null ? void 0 : table.shixuns_scores) || 0,
|
|
mains_score: (table == null ? void 0 : table.mains_scores) || 0,
|
|
total_combination_scores: (table == null ? void 0 : table.combination_scores) || 0,
|
|
total_score: actual_total_score || 0
|
|
},
|
|
{
|
|
key: "3",
|
|
name: "\u8BC4\u5377\u4EBA"
|
|
}
|
|
];
|
|
const blankData = [
|
|
{
|
|
key: "1",
|
|
name: "\u5E94\u5F97\u5206",
|
|
singles_score: (table == null ? void 0 : table.total_singles_scores) || 0,
|
|
doubles_score: (table == null ? void 0 : table.total_doubles_scores) || 0,
|
|
nulls_score: (table == null ? void 0 : table.total_nulls_scores) || 0,
|
|
judges_score: (table == null ? void 0 : table.total_judges_scores) || 0,
|
|
pros_score: (table == null ? void 0 : table.total_pros_scores) || 0,
|
|
bpros_score: (table == null ? void 0 : table.total_bpros_scores) || 0,
|
|
shixuns_score: (table == null ? void 0 : table.total_shixuns_scores) || 0,
|
|
mains_score: (table == null ? void 0 : table.total_mains_scores) || 0,
|
|
total_combination_scores: (table == null ? void 0 : table.total_combination_scores) || 0,
|
|
total_score: total_score || 0
|
|
},
|
|
{
|
|
key: "2",
|
|
name: "\u5B9E\u5F97\u5206"
|
|
},
|
|
{
|
|
key: "3",
|
|
name: "\u8BC4\u5377\u4EBA"
|
|
}
|
|
];
|
|
setTableData([...isExportBlank ? blankData : data]);
|
|
}
|
|
}, [exercise.exerciseExportHeadData]);
|
|
const getData = () => __async(void 0, null, function* () {
|
|
const query = {
|
|
id: params.exerciseId || params.categoryId,
|
|
identify: (userInfo == null ? void 0 : userInfo.login) || null
|
|
};
|
|
const res = yield (0,service_exercise/* getExerciseExportHeadData */.iw)(query);
|
|
setHeadData(res || {});
|
|
const { table } = res || {};
|
|
let total_score;
|
|
let actual_total_score;
|
|
if ((table == null ? void 0 : table.total_singles_scores) || (table == null ? void 0 : table.total_doubles_scores) || (table == null ? void 0 : table.total_nulls_scores) || (table == null ? void 0 : table.total_judges_scores) || (table == null ? void 0 : table.total_pros_scores) || (table == null ? void 0 : table.total_bpros_scores) || (table == null ? void 0 : table.total_shixuns_scores) || (table == null ? void 0 : table.total_mains_scores) || (table == null ? void 0 : table.total_combination_scores)) {
|
|
total_score = Number(table == null ? void 0 : table.total_singles_scores) + Number(table == null ? void 0 : table.total_doubles_scores) + Number(table == null ? void 0 : table.total_nulls_scores) + Number(table == null ? void 0 : table.total_bpros_scores) + Number(table == null ? void 0 : table.total_judges_scores) + Number(table == null ? void 0 : table.total_pros_scores) + Number(table == null ? void 0 : table.total_shixuns_scores) + Number(table == null ? void 0 : table.total_mains_scores) + Number(table == null ? void 0 : table.total_combination_scores);
|
|
}
|
|
if ((table == null ? void 0 : table.singles_scores) || (table == null ? void 0 : table.doubles_scores) || (table == null ? void 0 : table.nulls_scores) || (table == null ? void 0 : table.judges_scores) || (table == null ? void 0 : table.pros_scores) || (table == null ? void 0 : table.bpros_scores) || (table == null ? void 0 : table.shixuns_scores) || (table == null ? void 0 : table.mains_scores) || (table == null ? void 0 : table.combination_scores)) {
|
|
actual_total_score = Number(table == null ? void 0 : table.singles_scores) + Number(table == null ? void 0 : table.doubles_scores) + Number(table == null ? void 0 : table.bpros_scores) + Number(table == null ? void 0 : table.nulls_scores) + Number(table == null ? void 0 : table.judges_scores) + Number(table == null ? void 0 : table.pros_scores) + Number(table == null ? void 0 : table.shixuns_scores) + Number(table == null ? void 0 : table.mains_scores) + Number(table == null ? void 0 : table.combination_scores);
|
|
}
|
|
const data = [
|
|
{
|
|
key: "1",
|
|
name: "\u5E94\u5F97\u5206",
|
|
singles_score: (table == null ? void 0 : table.total_singles_scores) || 0,
|
|
doubles_score: (table == null ? void 0 : table.total_doubles_scores) || 0,
|
|
nulls_score: (table == null ? void 0 : table.total_nulls_scores) || 0,
|
|
judges_score: (table == null ? void 0 : table.total_judges_scores) || 0,
|
|
pros_score: (table == null ? void 0 : table.total_pros_scores) || 0,
|
|
bpros_score: (table == null ? void 0 : table.total_bpros_scores) || 0,
|
|
shixuns_score: (table == null ? void 0 : table.total_shixuns_scores) || 0,
|
|
mains_score: (table == null ? void 0 : table.total_mains_scores) || 0,
|
|
total_combination_scores: (table == null ? void 0 : table.total_combination_scores) || 0,
|
|
total_score: total_score || 0
|
|
},
|
|
{
|
|
key: "2",
|
|
name: "\u5B9E\u5F97\u5206",
|
|
singles_score: (table == null ? void 0 : table.singles_scores) || 0,
|
|
doubles_score: (table == null ? void 0 : table.doubles_scores) || 0,
|
|
nulls_score: (table == null ? void 0 : table.nulls_scores) || 0,
|
|
judges_score: (table == null ? void 0 : table.judges_scores) || 0,
|
|
pros_score: (table == null ? void 0 : table.pros_scores) || 0,
|
|
bpros_score: (table == null ? void 0 : table.bpros_scores) || 0,
|
|
shixuns_score: (table == null ? void 0 : table.shixuns_scores) || 0,
|
|
mains_score: (table == null ? void 0 : table.mains_scores) || 0,
|
|
total_combination_scores: (table == null ? void 0 : table.combination_scores) || 0,
|
|
total_score: actual_total_score || 0
|
|
},
|
|
{
|
|
key: "3",
|
|
name: "\u8BC4\u5377\u4EBA"
|
|
}
|
|
];
|
|
const blankData = [
|
|
{
|
|
key: "1",
|
|
name: "\u5E94\u5F97\u5206"
|
|
},
|
|
{
|
|
key: "2",
|
|
name: "\u5B9E\u5F97\u5206"
|
|
},
|
|
{
|
|
key: "3",
|
|
name: "\u8BC4\u5377\u4EBA"
|
|
}
|
|
];
|
|
setTableData(isExportBlank ? blankData : data);
|
|
});
|
|
const columns = [
|
|
{
|
|
width: "10%",
|
|
title: "\u9898\u578B",
|
|
align: "center",
|
|
dataIndex: "name",
|
|
render: (text) => /* @__PURE__ */ React.createElement("a", null, text)
|
|
},
|
|
{
|
|
// width: '10%',
|
|
title: ((_a = questionName == null ? void 0 : questionName.find((item) => item.value == constant/* QUESTIONTYPE */.f[0].nameType)) == null ? void 0 : _a.name) || "\u5355\u9009\u9898",
|
|
align: "center",
|
|
// ellipsis: true,
|
|
dataIndex: "singles_score",
|
|
render: (text) => /* @__PURE__ */ React.createElement("a", null, text === "0.0" ? 0 : text)
|
|
},
|
|
{
|
|
// width: '10%',
|
|
title: ((_b = questionName == null ? void 0 : questionName.find((item) => item.value == constant/* QUESTIONTYPE */.f[1].nameType)) == null ? void 0 : _b.name) || "\u591A\u9009\u9898",
|
|
align: "center",
|
|
// ellipsis: true,
|
|
dataIndex: "doubles_score",
|
|
render: (text) => /* @__PURE__ */ React.createElement("a", null, text === "0.0" ? 0 : text)
|
|
},
|
|
{
|
|
// width: '10%',
|
|
title: ((_c = questionName == null ? void 0 : questionName.find((item) => item.value == constant/* QUESTIONTYPE */.f[3].nameType)) == null ? void 0 : _c.name) || "\u586B\u7A7A\u9898",
|
|
align: "center",
|
|
// ellipsis: true,
|
|
dataIndex: "nulls_score",
|
|
render: (text) => /* @__PURE__ */ React.createElement("a", null, text === "0.0" ? 0 : text)
|
|
},
|
|
{
|
|
// width: '10%',
|
|
title: ((_d = questionName == null ? void 0 : questionName.find((item) => item.value == constant/* QUESTIONTYPE */.f[2].nameType)) == null ? void 0 : _d.name) || "\u5224\u65AD\u9898",
|
|
align: "center",
|
|
// ellipsis: true,
|
|
dataIndex: "judges_score",
|
|
render: (text) => /* @__PURE__ */ React.createElement("a", null, text === "0.0" ? 0 : text)
|
|
},
|
|
{
|
|
// width: '10%',
|
|
title: ((_e = questionName == null ? void 0 : questionName.find((item) => item.value == constant/* QUESTIONTYPE */.f[6].nameType)) == null ? void 0 : _e.name) || "\u7F16\u7A0B\u9898",
|
|
align: "center",
|
|
// ellipsis: true,
|
|
dataIndex: "pros_score",
|
|
render: (text) => /* @__PURE__ */ React.createElement("a", null, text === "0.0" ? 0 : text)
|
|
},
|
|
{
|
|
// width: '10%',
|
|
title: ((_f = questionName == null ? void 0 : questionName.find((item) => item.value == constant/* QUESTIONTYPE */.f[5].nameType)) == null ? void 0 : _f.name) || "\u5B9E\u8BAD\u9898",
|
|
align: "center",
|
|
// ellipsis: true,
|
|
dataIndex: "shixuns_score",
|
|
render: (text) => /* @__PURE__ */ React.createElement("a", null, text === "0.0" ? 0 : text)
|
|
},
|
|
{
|
|
// width: '10%',
|
|
title: ((_g = questionName == null ? void 0 : questionName.find((item) => item.value == constant/* QUESTIONTYPE */.f[4].nameType)) == null ? void 0 : _g.name) || "\u7B80\u7B54\u9898",
|
|
align: "center",
|
|
// ellipsis: true,
|
|
dataIndex: "mains_score",
|
|
render: (text) => /* @__PURE__ */ React.createElement("a", null, text === "0.0" ? 0 : text)
|
|
},
|
|
{
|
|
// width: '10%',
|
|
title: ((_h = questionName == null ? void 0 : questionName.find((item) => item.value == constant/* QUESTIONTYPE */.f[7].nameType)) == null ? void 0 : _h.name) || "\u7EC4\u5408\u9898",
|
|
align: "center",
|
|
// ellipsis: true,
|
|
dataIndex: "total_combination_scores",
|
|
render: (text) => /* @__PURE__ */ React.createElement("a", null, text === "0.0" ? 0 : text)
|
|
},
|
|
{
|
|
// width: '10%',
|
|
title: ((_i = questionName == null ? void 0 : questionName.find((item) => item.value == constant/* QUESTIONTYPE */.f[8].nameType)) == null ? void 0 : _i.name) || "\u7A0B\u5E8F\u586B\u7A7A\u9898",
|
|
align: "center",
|
|
// ellipsis: true,
|
|
dataIndex: "bpros_score",
|
|
render: (text) => /* @__PURE__ */ React.createElement("a", null, text === "0.0" ? 0 : text)
|
|
},
|
|
{
|
|
width: "10%",
|
|
title: "\u603B\u5206",
|
|
align: "center",
|
|
dataIndex: "total_score",
|
|
render: (text) => /* @__PURE__ */ React.createElement("a", null, text === "0.0" ? 0 : text == null ? void 0 : text.toFixed(1))
|
|
}
|
|
];
|
|
const { exercise_header } = headData || {};
|
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, ((exercise_header == null ? void 0 : exercise_header.show_user) || (exercise_header == null ? void 0 : exercise_header.show_no) || (exercise_header == null ? void 0 : exercise_header.show_group)) && /* @__PURE__ */ React.createElement("section", { className: Headmodules.glassSeal }, (exercise_header == null ? void 0 : exercise_header.show_user) && /* @__PURE__ */ React.createElement("span", null, "\u59D3\u540D\uFF1A", /* @__PURE__ */ React.createElement("span", null, headData == null ? void 0 : headData.user)), (exercise_header == null ? void 0 : exercise_header.show_no) && /* @__PURE__ */ React.createElement("span", null, "\u5B66\u53F7\uFF1A", /* @__PURE__ */ React.createElement("span", null, headData == null ? void 0 : headData.student_id)), (exercise_header == null ? void 0 : exercise_header.show_group) && /* @__PURE__ */ React.createElement("span", null, "\u4E13\u4E1A\u73ED\u7EA7\uFF1A", /* @__PURE__ */ React.createElement("span", null, headData == null ? void 0 : headData.group_name)), (exercise_header == null ? void 0 : exercise_header.show_school_name) && /* @__PURE__ */ React.createElement("span", null, "\u5B66\u6821/\u5355\u4F4D\uFF1A", /* @__PURE__ */ React.createElement("span", null, headData == null ? void 0 : headData.school_name)), (exercise_header == null ? void 0 : exercise_header.show_phone) && /* @__PURE__ */ React.createElement("span", null, "\u624B\u673A\u53F7\uFF1A", /* @__PURE__ */ React.createElement("span", null, headData == null ? void 0 : headData.phone))), /* @__PURE__ */ React.createElement("section", { className: `${Headmodules.wrap} ${isPreview ? "pl20" : ""} ` }, (headData == null ? void 0 : headData.photo_url) && /* @__PURE__ */ React.createElement("img", { className: Headmodules.img, src: `${env/* default */.Z.API_SERVER}${headData == null ? void 0 : headData.photo_url}` }), (exercise_header == null ? void 0 : exercise_header.show_title) && /* @__PURE__ */ React.createElement(row/* default */.Z, { className: Headmodules.paperHeader, justify: "center" }, /* @__PURE__ */ React.createElement("div", null, headData == null ? void 0 : headData.title)), (exercise_header == null ? void 0 : exercise_header.show_body) && (((_j = exercise == null ? void 0 : exercise.exerciseExportHeadData) == null ? void 0 : _j.exercise_description) || ((_k = exercise == null ? void 0 : exercise.commonHeader) == null ? void 0 : _k.exercise_description)) && /* @__PURE__ */ React.createElement("span", { ref: leftheight, style: { justifyContent: leftheights === 21 ? "center" : "left", wordBreak: "break-all", display: "flex", textAlign: "left" }, className: "tc c-grey-333" }, `\u8BD5\u5377\u987B\u77E5\uFF1A${((_l = exercise == null ? void 0 : exercise.exerciseExportHeadData) == null ? void 0 : _l.exercise_description) || ((_m = exercise == null ? void 0 : exercise.commonHeader) == null ? void 0 : _m.exercise_description)}`), (exercise_header == null ? void 0 : exercise_header.show_info) && /* @__PURE__ */ React.createElement("p", { className: "tc c-grey-666" }, "\u5171:\u3010", headData == null ? void 0 : headData.large_counts, "\u5927\u9898\u3011\u3010", headData == null ? void 0 : headData.total_count, "\u5C0F\u9898\u3011\u3010 \u6EE1\u5206", headData == null ? void 0 : headData.score, "\u5206\u3011 \u8003\u8BD5\u65F6\u95F4\uFF1A\u3010", (headData == null ? void 0 : headData.time) > -1 ? `${headData == null ? void 0 : headData.time}\u5206\u949F` : `\u4E0D\u9650`, "\u3011"), (exercise_header == null ? void 0 : exercise_header.show_desc) && /* @__PURE__ */ React.createElement("div", { className: "mt10" }, /* @__PURE__ */ React.createElement("p", { className: "font16" }, "\u8003\u8BD5\u8BF4\u660E\uFF1A"), /* @__PURE__ */ React.createElement(RenderHtml/* default */.Z, { value: headData == null ? void 0 : headData.description })), (exercise_header == null ? void 0 : exercise_header.show_table) && /* @__PURE__ */ React.createElement("div", { className: "mt10" }, /* @__PURE__ */ React.createElement(
|
|
table["default"],
|
|
{
|
|
className: Headmodules.table,
|
|
columns,
|
|
dataSource: [...tableData || []],
|
|
bordered: true,
|
|
pagination: false
|
|
}
|
|
)), ((_n = exercise == null ? void 0 : exercise.exerciseExportHeadData) == null ? void 0 : _n.analysis) && /* @__PURE__ */ React.createElement("span", { style: { justifyContent: "left", wordBreak: "break-all", display: "flex", textAlign: "left", marginTop: "10px" }, className: "tc c-grey-333" }, `\u8003\u8BD5\u8BC4\u4EF7\uFF1A${(_o = exercise == null ? void 0 : exercise.exerciseExportHeadData) == null ? void 0 : _o.analysis}`)), /* @__PURE__ */ React.createElement(ExportSetting/* default */.Z, null));
|
|
};
|
|
/* harmony default export */ var components_Head = ((0,_umi_production_exports.connect)(
|
|
({
|
|
exercise,
|
|
loading,
|
|
user,
|
|
globalSetting
|
|
}) => ({
|
|
exercise,
|
|
globalSetting,
|
|
user,
|
|
loading: loading.effects
|
|
})
|
|
)(Head));
|
|
|
|
|
|
/***/ })
|
|
|
|
}]); |