|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[53247],{
|
|
|
|
|
|
/***/ 57630:
|
|
|
/*!**********************************************************************************************************!*\
|
|
|
!*** ./node_modules/_@ant-design_icons@5.3.5@@ant-design/icons/es/icons/DownloadOutlined.js + 1 modules ***!
|
|
|
\**********************************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ icons_DownloadOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.24.1@@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(66820);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/DownloadOutlined.js
|
|
|
// This icon file is generated automatically.
|
|
|
var DownloadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z" } }] }, "name": "download", "theme": "outlined" };
|
|
|
/* harmony default export */ var asn_DownloadOutlined = (DownloadOutlined);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.5@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
|
var AntdIcon = __webpack_require__(13814);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.3.5@@ant-design/icons/es/icons/DownloadOutlined.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var DownloadOutlined_DownloadOutlined = function DownloadOutlined(props, ref) {
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
ref: ref,
|
|
|
icon: asn_DownloadOutlined
|
|
|
}));
|
|
|
};
|
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(DownloadOutlined_DownloadOutlined);
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_DownloadOutlined = (RefIcon);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 35231:
|
|
|
/*!**********************************************!*\
|
|
|
!*** ./src/components/AsyncButton/index.tsx ***!
|
|
|
\**********************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
/* harmony export */ Z: function() { return /* binding */ AsyncButton; }
|
|
|
/* harmony export */ });
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js */ 41498);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js */ 79800);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js */ 39647);
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd */ 3113);
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["children"];
|
|
|
|
|
|
|
|
|
|
|
|
var AsyncButton = function AsyncButton(_ref) {
|
|
|
var children = _ref.children,
|
|
|
props = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4___default()(_ref, _excluded);
|
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(false),
|
|
|
_useState2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3___default()(_useState, 2),
|
|
|
btnLoading = _useState2[0],
|
|
|
setBtnLoading = _useState2[1];
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(antd__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP, _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, props), {}, {
|
|
|
loading: btnLoading,
|
|
|
onClick: ( /*#__PURE__*/function () {
|
|
|
var _ref2 = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().mark(function _callee(e) {
|
|
|
return _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_1___default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
_context.prev = 0;
|
|
|
setBtnLoading(true);
|
|
|
_context.next = 4;
|
|
|
return props.onClick(e);
|
|
|
case 4:
|
|
|
setBtnLoading(false);
|
|
|
_context.next = 11;
|
|
|
break;
|
|
|
case 7:
|
|
|
_context.prev = 7;
|
|
|
_context.t0 = _context["catch"](0);
|
|
|
console.error(_context.t0);
|
|
|
setBtnLoading(false);
|
|
|
case 11:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee, null, [[0, 7]]);
|
|
|
}));
|
|
|
return function (_x) {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}()),
|
|
|
children: children
|
|
|
}));
|
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 21561:
|
|
|
/*!**************************************************************************!*\
|
|
|
!*** ./src/components/EcListItems/Problemset/Card/index.tsx + 1 modules ***!
|
|
|
\**************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ Problemset_Card; }
|
|
|
});
|
|
|
|
|
|
// 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/radio/index.js + 5 modules
|
|
|
var es_radio = __webpack_require__(5112);
|
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx
|
|
|
var RenderHtml = __webpack_require__(78653);
|
|
|
;// CONCATENATED MODULE: ./src/components/EcListItems/Problemset/Card/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var Cardmodules = ({"flexRow":"flexRow____Sm4b","flexColumn":"flexColumn___mQNZs","action":"action___QUVEn","setScore":"setScore___yZ0Yb","delete":"delete___e4taL","content":"content___jR4Y6","titleWrap":"titleWrap___zsXYY","titleNumber":"titleNumber___p60vi","score":"score___DbCHw","titleHtml":"titleHtml___FALbj","answerWrap":"answerWrap___uPjYq","answer":"answer___pfiPk","answerText":"answerText___K3TNr"});
|
|
|
// EXTERNAL MODULE: ./node_modules/_js-base64@2.6.4@js-base64/base64.js
|
|
|
var base64 = __webpack_require__(24334);
|
|
|
// EXTERNAL MODULE: ./src/components/MathsLatexKeybords/index.tsx
|
|
|
var MathsLatexKeybords = __webpack_require__(99011);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/components/EcListItems/Problemset/Card/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// import Item from '@/pages/Forums/Index/components/Item';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var tagDotList = ['A.', 'B.', 'C.', 'D.', 'E.', 'F.', 'G.', 'H.', 'I.', 'J.', 'K.', 'L.', 'M.', 'N.', 'O.', 'P.', 'Q.', 'R.', 'S.', 'T.', 'U.', 'V.', 'W.', 'X.', 'Y.', 'Z.'];
|
|
|
var questionType = [{
|
|
|
type: 'single',
|
|
|
name: '单选题'
|
|
|
}, {
|
|
|
type: 'multiple',
|
|
|
name: '多选题'
|
|
|
}, {
|
|
|
type: 'judgement',
|
|
|
name: '判断题'
|
|
|
}, {
|
|
|
type: 'completion',
|
|
|
name: '填空题'
|
|
|
}, {
|
|
|
type: 'subjective',
|
|
|
name: '简答题'
|
|
|
}];
|
|
|
var Card = function Card(_ref) {
|
|
|
var _data$program_attr3;
|
|
|
var index = _ref.index,
|
|
|
typeName = _ref.typeName,
|
|
|
type = _ref.type,
|
|
|
_ref$data = _ref.data,
|
|
|
data = _ref$data === void 0 ? {} : _ref$data,
|
|
|
inMouseId = _ref.inMouseId,
|
|
|
isshow = _ref.isshow,
|
|
|
_ref$onSetScore = _ref.onSetScore,
|
|
|
onSetScore = _ref$onSetScore === void 0 ? function () {} : _ref$onSetScore,
|
|
|
_ref$onDelete = _ref.onDelete,
|
|
|
onDelete = _ref$onDelete === void 0 ? function () {} : _ref$onDelete,
|
|
|
_ref$onMouseEnter = _ref.onMouseEnter,
|
|
|
_onMouseEnter = _ref$onMouseEnter === void 0 ? function () {} : _ref$onMouseEnter,
|
|
|
_ref$showAnswer = _ref.showAnswer,
|
|
|
showAnswer = _ref$showAnswer === void 0 ? false : _ref$showAnswer;
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
isopen = _useState2[0],
|
|
|
setisopen = _useState2[1];
|
|
|
var renderSingleOrMultiple = function renderSingleOrMultiple() {
|
|
|
var _data$choices;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cardmodules.answerWrap,
|
|
|
children: [data === null || data === void 0 || (_data$choices = data.choices) === null || _data$choices === void 0 ? void 0 : _data$choices.map(function (item, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "".concat(Cardmodules.flexRow, " mt15"),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
lineHeight: '24px',
|
|
|
flexShrink: 0
|
|
|
},
|
|
|
children: tagDotList[index]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Cardmodules.answer, " ml5"),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: item === null || item === void 0 ? void 0 : item.choice_text
|
|
|
})
|
|
|
})]
|
|
|
}, index);
|
|
|
}), showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt10 ".concat(Cardmodules.answerText),
|
|
|
children: ["\u53C2\u8003\u7B54\u6848\uFF1A", data === null || data === void 0 ? void 0 : data.standard_answer_show]
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
var renderJudgment = function renderJudgment() {
|
|
|
var _data$choices2;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cardmodules.answerWrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Cardmodules.flexRow, " mt15"),
|
|
|
children: data === null || data === void 0 || (_data$choices2 = data.choices) === null || _data$choices2 === void 0 ? void 0 : _data$choices2.map(function (item, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
disabled: true,
|
|
|
children: item === null || item === void 0 ? void 0 : item.choice_text
|
|
|
}, index);
|
|
|
})
|
|
|
}), showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt10 ".concat(Cardmodules.answerText),
|
|
|
children: ["\u53C2\u8003\u7B54\u6848\uFF1A", data === null || data === void 0 ? void 0 : data.standard_answer_show]
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
var renderProgram = function renderProgram() {
|
|
|
var _data$program_attr;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cardmodules.answerWrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Cardmodules.flexRow, " mt15"),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: data === null || data === void 0 || (_data$program_attr = data.program_attr) === null || _data$program_attr === void 0 ? void 0 : _data$program_attr.description
|
|
|
})
|
|
|
}), showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt15",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cardmodules.answerText,
|
|
|
children: ["\u53C2\u8003\u7B54\u6848\uFF1A", !(data !== null && data !== void 0 && data.answer_text) && '暂无']
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: (data === null || data === void 0 ? void 0 : data.answer_text) || ''
|
|
|
})]
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
var renderCompletion = function renderCompletion() {
|
|
|
var _data$standard_answer;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Cardmodules.answerWrap,
|
|
|
children: showAnswer && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Cardmodules.flexColumn, " mt15"),
|
|
|
children: data === null || data === void 0 || (_data$standard_answer = data.standard_answer) === null || _data$standard_answer === void 0 ? void 0 : _data$standard_answer.map(function (item, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: (item === null || item === void 0 ? void 0 : item.model) === 1 ? /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: "\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A".concat(item.position, "\uFF09\uFF1A").concat(item.answer_text.join("、")),
|
|
|
className: Cardmodules.answerText
|
|
|
}, index) : /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
style: {
|
|
|
display: 'inline-flex',
|
|
|
alignItems: 'center',
|
|
|
marginBottom: 5
|
|
|
},
|
|
|
children: ["\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A ", item.position, "\uFF09\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)(MathsLatexKeybords/* default */.Z, {
|
|
|
disabled: true,
|
|
|
width: "180px",
|
|
|
value: item.answer_text.join("、")
|
|
|
})]
|
|
|
})
|
|
|
});
|
|
|
})
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
var renderSubjective = function renderSubjective() {
|
|
|
var _data$answer_texts;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Cardmodules.answerWrap,
|
|
|
children: showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt15",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Cardmodules.answerText,
|
|
|
children: "\u53C2\u8003\u7B54\u6848\uFF1A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: data === null || data === void 0 || (_data$answer_texts = data.answer_texts) === null || _data$answer_texts === void 0 ? void 0 : _data$answer_texts[0],
|
|
|
className: Cardmodules.answerText
|
|
|
})]
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
var renderBProgram = function renderBProgram() {
|
|
|
var _data$program_attr2, _data$standard_answer2;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cardmodules.answerWrap,
|
|
|
style: {
|
|
|
marginTop: 10
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
showProgramFill: true,
|
|
|
disabledFill: true,
|
|
|
value: base64.Base64.decode(data === null || data === void 0 || (_data$program_attr2 = data.program_attr) === null || _data$program_attr2 === void 0 ? void 0 : _data$program_attr2.code)
|
|
|
}), showAnswer && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Cardmodules.flexColumn, " mt15"),
|
|
|
children: data === null || data === void 0 || (_data$standard_answer2 = data.standard_answer) === null || _data$standard_answer2 === void 0 ? void 0 : _data$standard_answer2.map(function (item, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: "\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A".concat(item.position, "\uFF09\uFF1A").concat(item.answer_text)
|
|
|
}, index);
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
var renderShixun = function renderShixun() {
|
|
|
var _data$shixun;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cardmodules.answerWrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "mt10",
|
|
|
children: "\u9636\u6BB5\u6210\u7EE9"
|
|
|
}), data === null || data === void 0 || (_data$shixun = data.shixun) === null || _data$shixun === void 0 ? void 0 : _data$shixun.map(function (item, index) {
|
|
|
var _item$challenge_answe, _item$challenge_answe2;
|
|
|
// return <div className="mt10 font14" key={index}>{index + 1}. {item?.challenge_name}</div>
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt10 font14",
|
|
|
children: ["\u7B2C", index + 1, "\u5173 ", item === null || item === void 0 ? void 0 : item.challenge_name, " \uFF08", item.challenge_score, "\u5206\uFF09"]
|
|
|
}, index), showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cardmodules.answerText,
|
|
|
children: ["\u53C2\u8003\u7B54\u6848\uFF1A", ((_item$challenge_answe = item.challenge_answers) === null || _item$challenge_answe === void 0 ? void 0 : _item$challenge_answe.length) === 0 ? '暂无' : '']
|
|
|
}), (_item$challenge_answe2 = item.challenge_answers) === null || _item$challenge_answe2 === void 0 ? void 0 : _item$challenge_answe2.map(function (item, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt15",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u7EA7\u522B", index + 1, "\uFF1A", item.name]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: (item === null || item === void 0 ? void 0 : item.contents) || '',
|
|
|
className: Cardmodules.answerText
|
|
|
})]
|
|
|
});
|
|
|
})]
|
|
|
})]
|
|
|
});
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
var renderCombination = function renderCombination() {
|
|
|
var _data$sub_questions;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Cardmodules.answerWrap,
|
|
|
style: {
|
|
|
display: isopen && 'none'
|
|
|
},
|
|
|
children: data === null || data === void 0 || (_data$sub_questions = data.sub_questions) === null || _data$sub_questions === void 0 ? void 0 : _data$sub_questions.map(function (e, i) {
|
|
|
var _questionType$find, _e$choices, _e$choices2, _e$standard_answer, _e$answer_texts;
|
|
|
var str = "<span style=\"margin-right: 10px\">".concat(index + 1, ".").concat(i + 1, "</span><span>\uFF08").concat((_questionType$find = questionType.find(function (i) {
|
|
|
return i.type == e.item_type;
|
|
|
})) === null || _questionType$find === void 0 ? void 0 : _questionType$find.name, "\uFF09</span><span class=\"c-grey-999\">\uFF08").concat(e.score, "\u5206\uFF09</span>");
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(_react_17_0_2_react.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Cardmodules.titleWrap,
|
|
|
style: {
|
|
|
marginTop: 16
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
className: Cardmodules.titleHtml,
|
|
|
value: str + e.name
|
|
|
})
|
|
|
}), (e.item_type == 'single' || e.item_type == 'multiple') && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [e === null || e === void 0 || (_e$choices = e.choices) === null || _e$choices === void 0 ? void 0 : _e$choices.map(function (item, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "".concat(Cardmodules.flexRow, " mt15"),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
lineHeight: '24px',
|
|
|
flexShrink: 0
|
|
|
},
|
|
|
children: tagDotList[index]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Cardmodules.answer, " ml5"),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: item === null || item === void 0 ? void 0 : item.choice_text
|
|
|
})
|
|
|
})]
|
|
|
}, index);
|
|
|
}), showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt10 ".concat(Cardmodules.answerText),
|
|
|
children: ["\u53C2\u8003\u7B54\u6848\uFF1A", e === null || e === void 0 ? void 0 : e.standard_answer_show]
|
|
|
})]
|
|
|
}), e.item_type == 'judgement' && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cardmodules.answerWrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Cardmodules.flexRow, " mt15"),
|
|
|
children: e === null || e === void 0 || (_e$choices2 = e.choices) === null || _e$choices2 === void 0 ? void 0 : _e$choices2.map(function (item, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
disabled: true,
|
|
|
children: item === null || item === void 0 ? void 0 : item.choice_text
|
|
|
}, index);
|
|
|
})
|
|
|
}), showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt10 ".concat(Cardmodules.answerText),
|
|
|
children: ["\u53C2\u8003\u7B54\u6848\uFF1A", e === null || e === void 0 ? void 0 : e.standard_answer_show]
|
|
|
})]
|
|
|
}), e.item_type == 'completion' && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Cardmodules.answerWrap,
|
|
|
children: showAnswer && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Cardmodules.flexColumn, " mt15"),
|
|
|
children: e === null || e === void 0 || (_e$standard_answer = e.standard_answer) === null || _e$standard_answer === void 0 ? void 0 : _e$standard_answer.map(function (item, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: (item === null || item === void 0 ? void 0 : item.model) === 1 ? /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: "\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A".concat(item.position, "\uFF09\uFF1A").concat(item.answer_text.join("、")),
|
|
|
className: Cardmodules.answerText
|
|
|
}, index) : /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
children: ["\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A$", item.position, "\uFF09\uFF1A", /*#__PURE__*/(0,jsx_runtime.jsx)(MathsLatexKeybords/* default */.Z, {
|
|
|
value: item.answer_text.join("、")
|
|
|
})]
|
|
|
})
|
|
|
});
|
|
|
})
|
|
|
})
|
|
|
}), e.item_type == 'subjective' && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Cardmodules.answerWrap,
|
|
|
children: showAnswer && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "mt15",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Cardmodules.answerText,
|
|
|
children: "\u53C2\u8003\u7B54\u6848\uFF1A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
value: e === null || e === void 0 || (_e$answer_texts = e.answer_texts) === null || _e$answer_texts === void 0 ? void 0 : _e$answer_texts[0],
|
|
|
className: Cardmodules.answerText
|
|
|
})]
|
|
|
})
|
|
|
})]
|
|
|
}, e === null || e === void 0 ? void 0 : e.id);
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
var renderAnswer = function renderAnswer() {
|
|
|
var mapping = {
|
|
|
'SINGLE': renderSingleOrMultiple,
|
|
|
'MULTIPLE': renderSingleOrMultiple,
|
|
|
'JUDGMENT': renderJudgment,
|
|
|
'PROGRAM': renderProgram,
|
|
|
'COMPLETION': renderCompletion,
|
|
|
'SUBJECTIVE': renderSubjective,
|
|
|
'PRACTICAL': renderShixun,
|
|
|
'COMBINATION': renderCombination,
|
|
|
'BPROGRAM': renderBProgram
|
|
|
};
|
|
|
return mapping[type] ? mapping[type]() : null;
|
|
|
};
|
|
|
var getDomString = function getDomString(data, i) {
|
|
|
var _data$sub_questions2;
|
|
|
var str = "<span style=\"margin-right: -10px\">".concat(i + 1, "\u3001</span><span class=\"c-grey-999\">\uFF08").concat((data === null || data === void 0 ? void 0 : data.item_type) === "combination" ? "\u5171".concat(data === null || data === void 0 || (_data$sub_questions2 = data.sub_questions) === null || _data$sub_questions2 === void 0 ? void 0 : _data$sub_questions2.length, "\u5C0F\u9898\uFF0C") : '').concat(data.score, "\u5206\uFF09</span> ");
|
|
|
return str;
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
onMouseEnter: function onMouseEnter() {
|
|
|
return _onMouseEnter(data.id);
|
|
|
},
|
|
|
children: [inMouseId === data.id && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cardmodules.action,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Cardmodules.setScore,
|
|
|
onClick: function onClick() {
|
|
|
return onSetScore(data.id, typeName, data === null || data === void 0 ? void 0 : data.shixun, data.score, data);
|
|
|
},
|
|
|
children: "\u8BBE\u7F6E\u5F97\u5206"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Cardmodules["delete"],
|
|
|
onClick: function onClick() {
|
|
|
return onDelete(data.id);
|
|
|
},
|
|
|
children: "\u5220\u9664"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cardmodules.content,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Cardmodules.titleWrap,
|
|
|
style: {
|
|
|
justifyContent: 'space-between'
|
|
|
},
|
|
|
children: [(data === null || data === void 0 ? void 0 : data.item_type) === "bprogram" ? /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
className: Cardmodules.titleHtml,
|
|
|
value: getDomString(data, index) + (data === null || data === void 0 || (_data$program_attr3 = data.program_attr) === null || _data$program_attr3 === void 0 ? void 0 : _data$program_attr3.description)
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
|
className: Cardmodules.titleHtml,
|
|
|
value: getDomString(data, index) + ((data === null || data === void 0 ? void 0 : data.item_type) === "combination" ? "\uFF08\u9898\u5E72\uFF09" : '') + (data.name || (data === null || data === void 0 ? void 0 : data.shixun_name))
|
|
|
}), (data === null || data === void 0 ? void 0 : data.item_type) === "combination" && !isshow && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
onClick: function onClick(e) {
|
|
|
setisopen(!isopen);
|
|
|
},
|
|
|
style: {
|
|
|
textAlign: 'end',
|
|
|
flexShrink: 0,
|
|
|
cursor: "pointer"
|
|
|
},
|
|
|
children: isopen ? '展开' : '收起'
|
|
|
})]
|
|
|
}), renderAnswer()]
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var Problemset_Card = (Card);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 38461:
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./src/components/FixedButton/index.tsx + 1 modules ***!
|
|
|
\**********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
t: function() { return /* binding */ FixedButton; }
|
|
|
});
|
|
|
|
|
|
// 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/_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/button/index.js
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
;// CONCATENATED MODULE: ./src/components/FixedButton/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var FixedButtonmodules = ({"buttonFixed":"buttonFixed___vyq30","button":"button___hxmYv","buttonWrap":"buttonWrap___uK8dl"});
|
|
|
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
|
|
|
var _classnames_2_5_1_classnames = __webpack_require__(92310);
|
|
|
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/components/FixedButton/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var FixedButton = function FixedButton(_ref) {
|
|
|
var _ref$cancelText = _ref.cancelText,
|
|
|
cancelText = _ref$cancelText === void 0 ? '取消' : _ref$cancelText,
|
|
|
_ref$okText = _ref.okText,
|
|
|
okText = _ref$okText === void 0 ? '确定' : _ref$okText,
|
|
|
_ref$loading = _ref.loading,
|
|
|
loading = _ref$loading === void 0 ? false : _ref$loading,
|
|
|
_ref$hasOkBtn = _ref.hasOkBtn,
|
|
|
hasOkBtn = _ref$hasOkBtn === void 0 ? true : _ref$hasOkBtn,
|
|
|
_ref$hasCancelBtn = _ref.hasCancelBtn,
|
|
|
hasCancelBtn = _ref$hasCancelBtn === void 0 ? true : _ref$hasCancelBtn,
|
|
|
_ref$okButtonProps = _ref.okButtonProps,
|
|
|
okButtonProps = _ref$okButtonProps === void 0 ? {} : _ref$okButtonProps,
|
|
|
_ref$onCancel = _ref.onCancel,
|
|
|
onCancel = _ref$onCancel === void 0 ? function () {} : _ref$onCancel,
|
|
|
_ref$onOk = _ref.onOk,
|
|
|
onOk = _ref$onOk === void 0 ? function () {} : _ref$onOk,
|
|
|
_ref$className = _ref.className,
|
|
|
className = _ref$className === void 0 ? '' : _ref$className;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: _classnames_2_5_1_classnames_default()(FixedButtonmodules.buttonFixed, className),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: FixedButtonmodules.buttonWrap,
|
|
|
children: [hasCancelBtn && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
size: "middle",
|
|
|
className: "".concat(FixedButtonmodules.button, " mr20")
|
|
|
// 点击取消的返回
|
|
|
,
|
|
|
onClick: onCancel,
|
|
|
children: cancelText
|
|
|
}), hasOkBtn && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, objectSpread2_default()(objectSpread2_default()({
|
|
|
size: 'middle',
|
|
|
type: "primary",
|
|
|
className: "".concat(FixedButtonmodules.button, " mr20"),
|
|
|
loading: loading,
|
|
|
onClick: onOk
|
|
|
}, okButtonProps), {}, {
|
|
|
children: okText
|
|
|
}))]
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 99011:
|
|
|
/*!*****************************************************!*\
|
|
|
!*** ./src/components/MathsLatexKeybords/index.tsx ***!
|
|
|
\*****************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
|
|
|
/* harmony import */ var _index_less_modules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less?modules */ 47598);
|
|
|
/* harmony import */ var mathlatex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! mathlatex */ 48136);
|
|
|
/* harmony import */ var _keybords__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./keybords */ 11591);
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd */ 43418);
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var MathsLatex = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (_ref, ref) {
|
|
|
var callback = _ref.callback,
|
|
|
width = _ref.width,
|
|
|
onChange = _ref.onChange,
|
|
|
disabled = _ref.disabled,
|
|
|
readOnly = _ref.readOnly,
|
|
|
_ref$type = _ref.type,
|
|
|
type = _ref$type === void 0 ? "" : _ref$type,
|
|
|
_ref$value = _ref.value,
|
|
|
value = _ref$value === void 0 ? "" : _ref$value;
|
|
|
var GraphicsRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
|
var KeybordsRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
|
var getData = function getData() {
|
|
|
var dom = document.createElement("div");
|
|
|
dom.innerHTML = GraphicsRef.current.getValue();
|
|
|
var str = dom.innerText;
|
|
|
callback && callback(str);
|
|
|
return str;
|
|
|
};
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(ref, function () {
|
|
|
return {
|
|
|
getData: getData
|
|
|
};
|
|
|
});
|
|
|
var showInput = function showInput() {
|
|
|
if (disabled || readOnly) return;
|
|
|
antd__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z.confirm({
|
|
|
content: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_keybords__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, {
|
|
|
value: value,
|
|
|
ref: KeybordsRef,
|
|
|
onChange: onChange,
|
|
|
showSaveButton: false
|
|
|
}),
|
|
|
width: 860,
|
|
|
icon: null,
|
|
|
title: "输入LATEX公式",
|
|
|
onOk: function onOk() {
|
|
|
var val = KeybordsRef.current.getData();
|
|
|
GraphicsRef.current.setValue(val);
|
|
|
onChange(val);
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
|
|
|
style: {
|
|
|
width: width || "100%"
|
|
|
},
|
|
|
className: "".concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z.mathFillWrap, " ").concat(disabled || readOnly ? 'cursorDefault' : ''),
|
|
|
onClick: function onClick() {
|
|
|
return showInput();
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("math-field", {
|
|
|
disabled: disabled,
|
|
|
locale: "zh_cn",
|
|
|
"class": "".concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z.mathField, " ").concat(type),
|
|
|
readOnly: readOnly,
|
|
|
placeholder: "\u8BF7\u8F93\u5165latex\u516C\u5F0F",
|
|
|
ref: GraphicsRef,
|
|
|
style: {
|
|
|
width: "100%",
|
|
|
fontSize: value ? 18 : 14
|
|
|
},
|
|
|
value: value || ""
|
|
|
})
|
|
|
});
|
|
|
});
|
|
|
/* harmony default export */ __webpack_exports__.Z = (MathsLatex);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 43287:
|
|
|
/*!**********************************************************!*\
|
|
|
!*** ./src/pages/Paperlibrary/See/index.tsx + 1 modules ***!
|
|
|
\**********************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
"use strict";
|
|
|
// ESM COMPAT FLAG
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
"default": function() { return /* binding */ Paperlibrary_See; }
|
|
|
});
|
|
|
|
|
|
// 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/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/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 + 15 modules
|
|
|
var _umi_production_exports = __webpack_require__(58011);
|
|
|
// 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/row/index.js
|
|
|
var row = __webpack_require__(95237);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/index.js + 6 modules
|
|
|
var breadcrumb = __webpack_require__(66104);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
|
var table = __webpack_require__(90508);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
var modal = __webpack_require__(43418);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.5@@ant-design/icons/es/icons/DownloadOutlined.js + 1 modules
|
|
|
var DownloadOutlined = __webpack_require__(57630);
|
|
|
// EXTERNAL MODULE: ./src/components/EcListItems/Problemset/Card/index.tsx + 1 modules
|
|
|
var Card = __webpack_require__(21561);
|
|
|
// EXTERNAL MODULE: ./src/components/FixedButton/index.tsx + 1 modules
|
|
|
var FixedButton = __webpack_require__(38461);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Paperlibrary/See/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var Seemodules = ({"bg":"bg___vBzoO","wrap":"wrap___rrSkg","title":"title___itgaE","btnWrapper":"btnWrapper___F_tyj","titleForExport":"titleForExport___lhBnq","flexRow":"flexRow___cvXQo","flexColumn":"flexColumn___cTDFf","flexJustifyBetween":"flexJustifyBetween___vy_7r","relative":"relative____B_F8","questionNumber":"questionNumber___V4g28","score":"score___dNKpj","selectTopicButton":"selectTopicButton___NO9DO","line":"line___j553x","dragTip":"dragTip___AaESI","typeActive":"typeActive___dLHVW","mouseTypeActive":"mouseTypeActive___N_Yv8","typeName":"typeName___bdcw3","typeNumber":"typeNumber___B6Fic","typeAction":"typeAction___O3dpz","setScore":"setScore___GA5cK","delete":"delete___O2OvN","modal":"modal___0ENtb","table":"table___ZRr4b","glassSeal":"glassSeal___C7Vpa","export_type_modal":"export_type_modal___ldAtg","export_type_modal_con":"export_type_modal_con___Y9iST","type_item":"type_item___cWirW","img_warp":"img_warp___G7xtB","img_warp_active":"img_warp_active___rw33a"});
|
|
|
// EXTERNAL MODULE: ./src/pages/Paperlibrary/components/SendToClassModal.tsx + 6 modules
|
|
|
var SendToClassModal = __webpack_require__(81393);
|
|
|
// EXTERNAL MODULE: ./src/pages/Paperlibrary/See/exportPDF.ts
|
|
|
var exportPDF = __webpack_require__(83734);
|
|
|
// EXTERNAL MODULE: ./src/components/AsyncButton/index.tsx
|
|
|
var AsyncButton = __webpack_require__(35231);
|
|
|
// EXTERNAL MODULE: ./src/service/paperlibrary.ts
|
|
|
var service_paperlibrary = __webpack_require__(70134);
|
|
|
// EXTERNAL MODULE: ./src/utils/constant.ts
|
|
|
var constant = __webpack_require__(49198);
|
|
|
// EXTERNAL MODULE: ./src/utils/export.ts
|
|
|
var utils_export = __webpack_require__(49081);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Paperlibrary/See/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var See = function See(_ref) {
|
|
|
var _questionName$find, _questionName$find2, _questionName$find3, _questionName$find4, _questionName$find5, _questionName$find6, _questionName$find7, _questionName$find8, _questionName$find9, _paperlibrary$paperDa2, _paperlibrary$paperDa3;
|
|
|
var newExercisePaper = _ref.newExercisePaper,
|
|
|
_ref$isExportBlank = _ref.isExportBlank,
|
|
|
isExportBlank = _ref$isExportBlank === void 0 ? false : _ref$isExportBlank,
|
|
|
paperlibrary = _ref.paperlibrary,
|
|
|
user = _ref.user,
|
|
|
globalSetting = _ref.globalSetting,
|
|
|
loading = _ref.loading,
|
|
|
dispatch = _ref.dispatch;
|
|
|
var location = (0,_umi_production_exports.useLocation)();
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
var _useSearchParams = (0,_umi_production_exports.useSearchParams)(),
|
|
|
_useSearchParams2 = slicedToArray_default()(_useSearchParams, 1),
|
|
|
searchParams = _useSearchParams2[0];
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
defaultActiveKey = _useState2[0],
|
|
|
setDefaultActiveKey = _useState2[1];
|
|
|
var id = (0,_react_17_0_2_react.useRef)();
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
headData = _useState4[0],
|
|
|
setHeadData = _useState4[1];
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
tableData = _useState6[0],
|
|
|
setTableData = _useState6[1];
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
questionName = _useState8[0],
|
|
|
setQuestionName = _useState8[1];
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
exportTypeModal = _useState10[0],
|
|
|
setExportTypeModal = _useState10[1];
|
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(""),
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
exportType = _useState12[0],
|
|
|
setExportType = _useState12[1];
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
dispatch({
|
|
|
type: 'globalSetting/footerToggle',
|
|
|
payload: false
|
|
|
});
|
|
|
return function () {
|
|
|
dispatch({
|
|
|
type: 'globalSetting/footerToggle',
|
|
|
payload: true
|
|
|
});
|
|
|
};
|
|
|
}, []);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
id.current = params === null || params === void 0 ? void 0 : params.id;
|
|
|
setDefaultActiveKey(searchParams.get("defaultActiveKey"));
|
|
|
getPaperData();
|
|
|
getData();
|
|
|
handleGetQuestionName();
|
|
|
}, []);
|
|
|
console.log('---', paperlibrary);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
var _newExercisePaper$exe;
|
|
|
if ((_newExercisePaper$exe = newExercisePaper.exerciseExportHeadData) !== null && _newExercisePaper$exe !== void 0 && _newExercisePaper$exe.title) {
|
|
|
var res = newExercisePaper.exerciseExportHeadData;
|
|
|
setHeadData(objectSpread2_default()({}, res || {}));
|
|
|
var _ref2 = res || {},
|
|
|
table = _ref2.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_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) + Number(table === null || table === void 0 ? void 0 : table.total_bpros_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,
|
|
|
doubles_score: table === null || table === void 0 ? void 0 : table.total_doubles_scores,
|
|
|
nulls_score: table === null || table === void 0 ? void 0 : table.total_nulls_scores,
|
|
|
judges_score: table === null || table === void 0 ? void 0 : table.total_judges_scores,
|
|
|
pros_score: table === null || table === void 0 ? void 0 : table.total_pros_scores,
|
|
|
bpros_score: table === null || table === void 0 ? void 0 : table.total_bpros_scores,
|
|
|
shixuns_score: table === null || table === void 0 ? void 0 : table.total_shixuns_scores,
|
|
|
mains_score: table === null || table === void 0 ? void 0 : table.total_mains_scores,
|
|
|
combinations_score: table === null || table === void 0 ? void 0 : table.total_combination_scores,
|
|
|
total_score: total_score
|
|
|
}, {
|
|
|
key: '2',
|
|
|
name: '实得分',
|
|
|
singles_score: table === null || table === void 0 ? void 0 : table.singles_scores,
|
|
|
doubles_score: table === null || table === void 0 ? void 0 : table.doubles_scores,
|
|
|
nulls_score: table === null || table === void 0 ? void 0 : table.nulls_scores,
|
|
|
judges_score: table === null || table === void 0 ? void 0 : table.judges_scores,
|
|
|
pros_score: table === null || table === void 0 ? void 0 : table.pros_scores,
|
|
|
bpros_score: table === null || table === void 0 ? void 0 : table.bpros_scores,
|
|
|
shixuns_score: table === null || table === void 0 ? void 0 : table.shixuns_scores,
|
|
|
mains_score: table === null || table === void 0 ? void 0 : table.mains_scores,
|
|
|
combinations_score: table === null || table === void 0 ? void 0 : table.combination_scores,
|
|
|
total_score: actual_total_score
|
|
|
}, {
|
|
|
key: '3',
|
|
|
name: '评卷人'
|
|
|
}];
|
|
|
var blankData = [{
|
|
|
key: '1',
|
|
|
name: '应得分',
|
|
|
singles_score: table === null || table === void 0 ? void 0 : table.total_singles_scores,
|
|
|
doubles_score: table === null || table === void 0 ? void 0 : table.total_doubles_scores,
|
|
|
nulls_score: table === null || table === void 0 ? void 0 : table.total_nulls_scores,
|
|
|
judges_score: table === null || table === void 0 ? void 0 : table.total_judges_scores,
|
|
|
pros_score: table === null || table === void 0 ? void 0 : table.total_pros_scores,
|
|
|
bpros_score: table === null || table === void 0 ? void 0 : table.total_bpros_scores,
|
|
|
shixuns_score: table === null || table === void 0 ? void 0 : table.total_shixuns_scores,
|
|
|
mains_score: table === null || table === void 0 ? void 0 : table.total_mains_scores,
|
|
|
combinations_score: table === null || table === void 0 ? void 0 : table.combination_scores,
|
|
|
total_score: total_score
|
|
|
}, {
|
|
|
key: '2',
|
|
|
name: '实得分'
|
|
|
}, {
|
|
|
key: '3',
|
|
|
name: '评卷人'
|
|
|
}];
|
|
|
setTableData(toConsumableArray_default()(isExportBlank ? blankData : data));
|
|
|
}
|
|
|
}, [newExercisePaper.exerciseExportHeadData]);
|
|
|
var handleGetQuestionName = /*#__PURE__*/function () {
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
var _paperlibrary$paperDa;
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
_context.next = 2;
|
|
|
return (0,service_paperlibrary/* getQuestionTypeAlias */.cV)({
|
|
|
id: params.id
|
|
|
});
|
|
|
case 2:
|
|
|
res = _context.sent;
|
|
|
res.status == 0 && setQuestionName(res.data);
|
|
|
_context.next = 6;
|
|
|
return getData();
|
|
|
case 6:
|
|
|
if (searchParams.get("exportPDF") && (_paperlibrary$paperDa = paperlibrary.paperData) !== null && _paperlibrary$paperDa !== void 0 && _paperlibrary$paperDa.questionList) {
|
|
|
message/* default */.ZP.info('正在导出空白试卷pdf');
|
|
|
(0,exportPDF/* exportPDF */.F)(paperDomRef.current.children, '导出试卷');
|
|
|
}
|
|
|
case 7:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function handleGetQuestionName() {
|
|
|
return _ref3.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var getData = /*#__PURE__*/function () {
|
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
var 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:
|
|
|
_context2.next = 2;
|
|
|
return (0,service_paperlibrary/* getExerciseHeadInfo */.Dq)(params.id);
|
|
|
case 2:
|
|
|
res = _context2.sent;
|
|
|
console.log(res, "res-----------------");
|
|
|
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_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_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) + Number(table === null || table === void 0 ? void 0 : table.total_bpros_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.combinations_score) {
|
|
|
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.combinations_score);
|
|
|
}
|
|
|
data = [{
|
|
|
key: '1',
|
|
|
name: '应得分',
|
|
|
singles_score: table === null || table === void 0 ? void 0 : table.total_singles_scores,
|
|
|
doubles_score: table === null || table === void 0 ? void 0 : table.total_doubles_scores,
|
|
|
nulls_score: table === null || table === void 0 ? void 0 : table.total_nulls_scores,
|
|
|
judges_score: table === null || table === void 0 ? void 0 : table.total_judges_scores,
|
|
|
pros_score: table === null || table === void 0 ? void 0 : table.total_pros_scores,
|
|
|
bpros_score: table === null || table === void 0 ? void 0 : table.total_bpros_scores,
|
|
|
shixuns_score: table === null || table === void 0 ? void 0 : table.total_shixuns_scores,
|
|
|
combinations_score: table === null || table === void 0 ? void 0 : table.total_combination_scores,
|
|
|
mains_score: table === null || table === void 0 ? void 0 : table.total_mains_scores,
|
|
|
total_score: total_score
|
|
|
}, {
|
|
|
key: '2',
|
|
|
name: '实得分',
|
|
|
singles_score: table === null || table === void 0 ? void 0 : table.singles_scores,
|
|
|
doubles_score: table === null || table === void 0 ? void 0 : table.doubles_scores,
|
|
|
nulls_score: table === null || table === void 0 ? void 0 : table.nulls_scores,
|
|
|
judges_score: table === null || table === void 0 ? void 0 : table.judges_scores,
|
|
|
pros_score: table === null || table === void 0 ? void 0 : table.pros_scores,
|
|
|
bpros_score: table === null || table === void 0 ? void 0 : table.bpros_scores,
|
|
|
shixuns_score: table === null || table === void 0 ? void 0 : table.shixuns_scores,
|
|
|
mains_score: table === null || table === void 0 ? void 0 : table.mains_scores,
|
|
|
combinations_score: table === null || table === void 0 ? void 0 : table.combination_scores,
|
|
|
total_score: actual_total_score
|
|
|
}, {
|
|
|
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: '9%',
|
|
|
title: '题型',
|
|
|
align: 'center',
|
|
|
dataIndex: 'name',
|
|
|
render: function render(text) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
children: text
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
width: '9%',
|
|
|
title: ((_questionName$find = questionName.find(function (item) {
|
|
|
return item.value == constant/* QUESTIONTYPE */.f[0].nameType;
|
|
|
})) === null || _questionName$find === void 0 ? void 0 : _questionName$find.name) || constant/* QUESTIONTYPE */.f[0].name,
|
|
|
align: 'center',
|
|
|
dataIndex: 'singles_score',
|
|
|
render: function render(text) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
children: text === '0.0' ? 0 : text
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
width: '9%',
|
|
|
title: ((_questionName$find2 = questionName.find(function (item) {
|
|
|
return item.value == constant/* QUESTIONTYPE */.f[1].nameType;
|
|
|
})) === null || _questionName$find2 === void 0 ? void 0 : _questionName$find2.name) || constant/* QUESTIONTYPE */.f[1].name,
|
|
|
align: 'center',
|
|
|
dataIndex: 'doubles_score',
|
|
|
render: function render(text) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
children: text === '0.0' ? 0 : text
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
width: '9%',
|
|
|
title: ((_questionName$find3 = questionName.find(function (item) {
|
|
|
return item.value == constant/* QUESTIONTYPE */.f[3].nameType;
|
|
|
})) === null || _questionName$find3 === void 0 ? void 0 : _questionName$find3.name) || constant/* QUESTIONTYPE */.f[3].name,
|
|
|
align: 'center',
|
|
|
dataIndex: 'nulls_score',
|
|
|
render: function render(text) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
children: text === '0.0' ? 0 : text
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
width: '9%',
|
|
|
title: ((_questionName$find4 = questionName.find(function (item) {
|
|
|
return item.value == constant/* QUESTIONTYPE */.f[2].nameType;
|
|
|
})) === null || _questionName$find4 === void 0 ? void 0 : _questionName$find4.name) || constant/* QUESTIONTYPE */.f[2].name,
|
|
|
align: 'center',
|
|
|
dataIndex: 'judges_score',
|
|
|
render: function render(text) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
children: text === '0.0' ? 0 : text
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
width: '9%',
|
|
|
title: ((_questionName$find5 = questionName.find(function (item) {
|
|
|
return item.value == constant/* QUESTIONTYPE */.f[6].nameType;
|
|
|
})) === null || _questionName$find5 === void 0 ? void 0 : _questionName$find5.name) || constant/* QUESTIONTYPE */.f[6].name,
|
|
|
align: 'center',
|
|
|
dataIndex: 'pros_score',
|
|
|
render: function render(text) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
children: text === '0.0' ? 0 : text
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
width: '9%',
|
|
|
title: ((_questionName$find6 = questionName.find(function (item) {
|
|
|
return item.value == constant/* QUESTIONTYPE */.f[5].nameType;
|
|
|
})) === null || _questionName$find6 === void 0 ? void 0 : _questionName$find6.name) || constant/* QUESTIONTYPE */.f[5].name,
|
|
|
align: 'center',
|
|
|
dataIndex: 'shixuns_score',
|
|
|
render: function render(text) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
children: text === '0.0' ? 0 : text
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
width: '9%',
|
|
|
title: ((_questionName$find7 = questionName.find(function (item) {
|
|
|
return item.value == constant/* QUESTIONTYPE */.f[4].nameType;
|
|
|
})) === null || _questionName$find7 === void 0 ? void 0 : _questionName$find7.name) || constant/* QUESTIONTYPE */.f[4].name,
|
|
|
align: 'center',
|
|
|
dataIndex: 'mains_score',
|
|
|
render: function render(text) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
children: text === '0.0' ? 0 : text
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
width: '9%',
|
|
|
title: ((_questionName$find8 = questionName.find(function (item) {
|
|
|
return item.value == constant/* QUESTIONTYPE */.f[7].nameType;
|
|
|
})) === null || _questionName$find8 === void 0 ? void 0 : _questionName$find8.name) || constant/* QUESTIONTYPE */.f[7].name,
|
|
|
align: 'center',
|
|
|
dataIndex: 'combinations_score',
|
|
|
render: function render(text) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
children: text === '0.0' ? 0 : text
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
width: '10%',
|
|
|
title: ((_questionName$find9 = questionName.find(function (item) {
|
|
|
return item.value == constant/* QUESTIONTYPE */.f[8].nameType;
|
|
|
})) === null || _questionName$find9 === void 0 ? void 0 : _questionName$find9.name) || constant/* QUESTIONTYPE */.f[8].name,
|
|
|
align: 'center',
|
|
|
dataIndex: 'bpros_score',
|
|
|
render: function render(text) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
children: text === '0.0' ? 0 : text
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
width: '9%',
|
|
|
title: '总分',
|
|
|
align: 'center',
|
|
|
dataIndex: 'total_score',
|
|
|
render: function render(text) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
children: text === '0.0' ? 0 : text ? parseFloat(text).toFixed(1) : ''
|
|
|
});
|
|
|
}
|
|
|
}];
|
|
|
var getPaperData = function getPaperData(val) {
|
|
|
dispatch({
|
|
|
type: 'paperlibrary/getPaperData',
|
|
|
payload: objectSpread2_default()({
|
|
|
id: id.current
|
|
|
}, val)
|
|
|
});
|
|
|
};
|
|
|
var handleDragEnd = /*#__PURE__*/function () {
|
|
|
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(data, paperItem) {
|
|
|
var itemId, position, res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
if (!(!data.destination || !data.source)) {
|
|
|
_context3.next = 2;
|
|
|
break;
|
|
|
}
|
|
|
return _context3.abrupt("return");
|
|
|
case 2:
|
|
|
itemId = paperItem.questions[data.source.index].id;
|
|
|
position = data.destination.index + 1;
|
|
|
_context3.next = 6;
|
|
|
return dispatch({
|
|
|
type: 'paperlibrary/adjustPosition',
|
|
|
payload: {
|
|
|
id: id.current,
|
|
|
itemId: itemId,
|
|
|
position: position
|
|
|
}
|
|
|
});
|
|
|
case 6:
|
|
|
res = _context3.sent;
|
|
|
if (!(res.status === -1)) {
|
|
|
_context3.next = 9;
|
|
|
break;
|
|
|
}
|
|
|
return _context3.abrupt("return");
|
|
|
case 9:
|
|
|
getPaperData();
|
|
|
case 10:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}));
|
|
|
return function handleDragEnd(_x, _x2) {
|
|
|
return _ref6.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleSendToClass = function handleSendToClass() {
|
|
|
dispatch({
|
|
|
type: 'paperlibrary/setActionTabs',
|
|
|
payload: {
|
|
|
key: 'Paperlibrary-SendToClass',
|
|
|
params: {
|
|
|
id: id.current
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
var paperDomRef = (0,_react_17_0_2_react.useRef)();
|
|
|
var _useState13 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
showAnswer = _useState14[0],
|
|
|
setShowAnswer = _useState14[1];
|
|
|
var handleExportPaper = /*#__PURE__*/function () {
|
|
|
var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
case 0:
|
|
|
setShowAnswer(false);
|
|
|
setExportType('');
|
|
|
setExportTypeModal(true);
|
|
|
case 3:
|
|
|
case "end":
|
|
|
return _context4.stop();
|
|
|
}
|
|
|
}, _callee4);
|
|
|
}));
|
|
|
return function handleExportPaper() {
|
|
|
return _ref7.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleExportPaperWithAnswer = /*#__PURE__*/function () {
|
|
|
var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
case 0:
|
|
|
setShowAnswer(true);
|
|
|
setExportType('');
|
|
|
setExportTypeModal(true);
|
|
|
case 3:
|
|
|
case "end":
|
|
|
return _context5.stop();
|
|
|
}
|
|
|
}, _callee5);
|
|
|
}));
|
|
|
return function handleExportPaperWithAnswer() {
|
|
|
return _ref8.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
className: Seemodules.bg,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
className: "mt30",
|
|
|
justify: "space-between",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(breadcrumb/* default */.Z, {
|
|
|
separator: ">",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default */.Z.Item, {
|
|
|
href: "/paperlibrary",
|
|
|
children: "\u8BD5\u5377\u5E93"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default */.Z.Item, {
|
|
|
href: "/paperlibrary?defaultActiveKey=".concat(defaultActiveKey),
|
|
|
children: defaultActiveKey === "1" ? "公开" : defaultActiveKey === "2" ? "团队共享" : "我创建的"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb/* default */.Z.Item, {
|
|
|
children: "\u8BD5\u5377\u8BE6\u60C5"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Seemodules.btnWrapper,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(AsyncButton/* AsyncButton */.Z, {
|
|
|
style: {
|
|
|
borderRadius: "16px"
|
|
|
},
|
|
|
type: "primary",
|
|
|
icon: /*#__PURE__*/(0,jsx_runtime.jsx)(DownloadOutlined/* default */.Z, {}),
|
|
|
onClick: handleExportPaperWithAnswer,
|
|
|
children: "\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377+\u7B54\u6848"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(AsyncButton/* AsyncButton */.Z, {
|
|
|
style: {
|
|
|
borderRadius: "16px"
|
|
|
},
|
|
|
type: "primary",
|
|
|
className: "ml10",
|
|
|
icon: /*#__PURE__*/(0,jsx_runtime.jsx)(DownloadOutlined/* default */.Z, {}),
|
|
|
onClick: handleExportPaper,
|
|
|
children: "\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377"
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Seemodules.wrap,
|
|
|
ref: paperDomRef,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "pt20 pb20",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Seemodules.titleForExport,
|
|
|
children: (_paperlibrary$paperDa2 = paperlibrary.paperData) === null || _paperlibrary$paperDa2 === void 0 || (_paperlibrary$paperDa2 = _paperlibrary$paperDa2.exam) === null || _paperlibrary$paperDa2 === void 0 ? void 0 : _paperlibrary$paperDa2.name
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
fontSize: "15px",
|
|
|
marginBottom: "12px",
|
|
|
textAlign: "left"
|
|
|
},
|
|
|
children: headData === null || headData === void 0 ? void 0 : headData.exercise_description
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
textAlign: "center",
|
|
|
fontSize: "15px"
|
|
|
},
|
|
|
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"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
style: {
|
|
|
margin: "20px auto"
|
|
|
},
|
|
|
className: Seemodules.table,
|
|
|
columns: columns,
|
|
|
dataSource: toConsumableArray_default()(tableData || []),
|
|
|
bordered: true,
|
|
|
pagination: false
|
|
|
}), (_paperlibrary$paperDa3 = paperlibrary.paperData) === null || _paperlibrary$paperDa3 === void 0 || (_paperlibrary$paperDa3 = _paperlibrary$paperDa3.questionList) === null || _paperlibrary$paperDa3 === void 0 ? void 0 : _paperlibrary$paperDa3.map(function (paperItem, paperKey) {
|
|
|
var _paperItem$questions;
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "".concat(Seemodules.relative, " mt20 mb20"),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Seemodules.typeActive,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: Seemodules.typeName,
|
|
|
children: [paperItem.number, "\u3001", paperItem.name]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: Seemodules.typeNumber,
|
|
|
children: ["\uFF08\u5171", paperItem.questions_count, "\u9898\uFF1B\u5171", paperItem.questions_score, "\u5206\uFF09"]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "mt20",
|
|
|
children: (_paperItem$questions = paperItem.questions) === null || _paperItem$questions === void 0 ? void 0 : _paperItem$questions.map(function (questionItem, qeustionKey) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Card/* default */.Z, {
|
|
|
index: qeustionKey,
|
|
|
typeName: paperItem.name,
|
|
|
type: paperItem.type,
|
|
|
data: questionItem,
|
|
|
showAnswer: showAnswer,
|
|
|
isshow: false
|
|
|
})
|
|
|
})
|
|
|
}, questionItem.id);
|
|
|
})
|
|
|
})]
|
|
|
}, paperKey);
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(FixedButton/* FixedButton */.t, {
|
|
|
okText: "\u53D1\u9001\u8BFE\u5802",
|
|
|
onCancel: function onCancel() {
|
|
|
return _umi_production_exports.history.push("/paperlibrary?defaultActiveKey=".concat(defaultActiveKey));
|
|
|
},
|
|
|
onOk: handleSendToClass
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(SendToClassModal/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
|
width: 450,
|
|
|
title: "\u8BF7\u9009\u62E9\u9700\u8981\u5BFC\u51FA\u7684\u683C\u5F0F",
|
|
|
open: exportTypeModal,
|
|
|
onCancel: function onCancel() {
|
|
|
return setExportTypeModal(false);
|
|
|
},
|
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
|
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
|
case 0:
|
|
|
if (!(exportType == '')) {
|
|
|
_context6.next = 5;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.info('请选择一种导出格式');
|
|
|
return _context6.abrupt("return");
|
|
|
case 5:
|
|
|
if (!(exportType == 'pdf')) {
|
|
|
_context6.next = 10;
|
|
|
break;
|
|
|
}
|
|
|
_context6.next = 8;
|
|
|
return (0,exportPDF/* exportPDF */.F)(paperDomRef.current.children, '导出试卷');
|
|
|
case 8:
|
|
|
_context6.next = 11;
|
|
|
break;
|
|
|
case 10:
|
|
|
if (exportType == 'word') {
|
|
|
(0,utils_export/* exportPaperlibraryPaper */.ON)({
|
|
|
id: id.current,
|
|
|
middle_export: 1,
|
|
|
export_type: showAnswer ? 1 : 0
|
|
|
});
|
|
|
}
|
|
|
case 11:
|
|
|
setExportTypeModal(false);
|
|
|
case 12:
|
|
|
case "end":
|
|
|
return _context6.stop();
|
|
|
}
|
|
|
}, _callee6);
|
|
|
})),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Seemodules.export_type_modal,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Seemodules.export_type_modal_con,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Seemodules.type_item,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Seemodules.img_warp, " ").concat(exportType == 'pdf' ? Seemodules.img_warp_active : ''),
|
|
|
onClick: function onClick() {
|
|
|
return setExportType('pdf');
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
src: __webpack_require__(/*! @/assets/images/file_type/pdf_img.png */ 45614),
|
|
|
width: 70,
|
|
|
height: 70
|
|
|
})
|
|
|
}), "pdf\u683C\u5F0F"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Seemodules.type_item,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Seemodules.img_warp, " ").concat(exportType == 'word' ? Seemodules.img_warp_active : ''),
|
|
|
onClick: function onClick() {
|
|
|
return setExportType('word');
|
|
|
},
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
src: __webpack_require__(/*! @/assets/images/file_type/word_img.png */ 38347),
|
|
|
width: 70,
|
|
|
height: 70
|
|
|
})
|
|
|
}), "word\u683C\u5F0F"]
|
|
|
})]
|
|
|
})
|
|
|
})
|
|
|
})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var Paperlibrary_See = ((0,_umi_production_exports.connect)(function (_ref10) {
|
|
|
var paperlibrary = _ref10.paperlibrary,
|
|
|
user = _ref10.user,
|
|
|
loading = _ref10.loading,
|
|
|
globalSetting = _ref10.globalSetting,
|
|
|
newExercisePaper = _ref10.newExercisePaper;
|
|
|
return {
|
|
|
paperlibrary: paperlibrary,
|
|
|
user: user,
|
|
|
globalSetting: globalSetting,
|
|
|
loading: loading.effects,
|
|
|
newExercisePaper: newExercisePaper
|
|
|
};
|
|
|
})(See));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 24334:
|
|
|
/*!***********************************************************!*\
|
|
|
!*** ./node_modules/_js-base64@2.6.4@js-base64/base64.js ***!
|
|
|
\***********************************************************/
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
|
|
|
* base64.js
|
|
|
*
|
|
|
* Licensed under the BSD 3-Clause License.
|
|
|
* http://opensource.org/licenses/BSD-3-Clause
|
|
|
*
|
|
|
* References:
|
|
|
* http://en.wikipedia.org/wiki/Base64
|
|
|
*/
|
|
|
;(function (global, factory) {
|
|
|
true
|
|
|
? module.exports = factory(global)
|
|
|
: 0
|
|
|
}((
|
|
|
typeof self !== 'undefined' ? self
|
|
|
: typeof window !== 'undefined' ? window
|
|
|
: typeof __webpack_require__.g !== 'undefined' ? __webpack_require__.g
|
|
|
: this
|
|
|
), function(global) {
|
|
|
'use strict';
|
|
|
// existing version for noConflict()
|
|
|
global = global || {};
|
|
|
var _Base64 = global.Base64;
|
|
|
var version = "2.6.4";
|
|
|
// constants
|
|
|
var b64chars
|
|
|
= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
|
var b64tab = function(bin) {
|
|
|
var t = {};
|
|
|
for (var i = 0, l = bin.length; i < l; i++) t[bin.charAt(i)] = i;
|
|
|
return t;
|
|
|
}(b64chars);
|
|
|
var fromCharCode = String.fromCharCode;
|
|
|
// encoder stuff
|
|
|
var cb_utob = function(c) {
|
|
|
if (c.length < 2) {
|
|
|
var cc = c.charCodeAt(0);
|
|
|
return cc < 0x80 ? c
|
|
|
: cc < 0x800 ? (fromCharCode(0xc0 | (cc >>> 6))
|
|
|
+ fromCharCode(0x80 | (cc & 0x3f)))
|
|
|
: (fromCharCode(0xe0 | ((cc >>> 12) & 0x0f))
|
|
|
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
|
|
|
+ fromCharCode(0x80 | ( cc & 0x3f)));
|
|
|
} else {
|
|
|
var cc = 0x10000
|
|
|
+ (c.charCodeAt(0) - 0xD800) * 0x400
|
|
|
+ (c.charCodeAt(1) - 0xDC00);
|
|
|
return (fromCharCode(0xf0 | ((cc >>> 18) & 0x07))
|
|
|
+ fromCharCode(0x80 | ((cc >>> 12) & 0x3f))
|
|
|
+ fromCharCode(0x80 | ((cc >>> 6) & 0x3f))
|
|
|
+ fromCharCode(0x80 | ( cc & 0x3f)));
|
|
|
}
|
|
|
};
|
|
|
var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;
|
|
|
var utob = function(u) {
|
|
|
return u.replace(re_utob, cb_utob);
|
|
|
};
|
|
|
var cb_encode = function(ccc) {
|
|
|
var padlen = [0, 2, 1][ccc.length % 3],
|
|
|
ord = ccc.charCodeAt(0) << 16
|
|
|
| ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8)
|
|
|
| ((ccc.length > 2 ? ccc.charCodeAt(2) : 0)),
|
|
|
chars = [
|
|
|
b64chars.charAt( ord >>> 18),
|
|
|
b64chars.charAt((ord >>> 12) & 63),
|
|
|
padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63),
|
|
|
padlen >= 1 ? '=' : b64chars.charAt(ord & 63)
|
|
|
];
|
|
|
return chars.join('');
|
|
|
};
|
|
|
var btoa = global.btoa && typeof global.btoa == 'function'
|
|
|
? function(b){ return global.btoa(b) } : function(b) {
|
|
|
if (b.match(/[^\x00-\xFF]/)) throw new RangeError(
|
|
|
'The string contains invalid characters.'
|
|
|
);
|
|
|
return b.replace(/[\s\S]{1,3}/g, cb_encode);
|
|
|
};
|
|
|
var _encode = function(u) {
|
|
|
return btoa(utob(String(u)));
|
|
|
};
|
|
|
var mkUriSafe = function (b64) {
|
|
|
return b64.replace(/[+\/]/g, function(m0) {
|
|
|
return m0 == '+' ? '-' : '_';
|
|
|
}).replace(/=/g, '');
|
|
|
};
|
|
|
var encode = function(u, urisafe) {
|
|
|
return urisafe ? mkUriSafe(_encode(u)) : _encode(u);
|
|
|
};
|
|
|
var encodeURI = function(u) { return encode(u, true) };
|
|
|
var fromUint8Array;
|
|
|
if (global.Uint8Array) fromUint8Array = function(a, urisafe) {
|
|
|
// return btoa(fromCharCode.apply(null, a));
|
|
|
var b64 = '';
|
|
|
for (var i = 0, l = a.length; i < l; i += 3) {
|
|
|
var a0 = a[i], a1 = a[i+1], a2 = a[i+2];
|
|
|
var ord = a0 << 16 | a1 << 8 | a2;
|
|
|
b64 += b64chars.charAt( ord >>> 18)
|
|
|
+ b64chars.charAt((ord >>> 12) & 63)
|
|
|
+ ( typeof a1 != 'undefined'
|
|
|
? b64chars.charAt((ord >>> 6) & 63) : '=')
|
|
|
+ ( typeof a2 != 'undefined'
|
|
|
? b64chars.charAt( ord & 63) : '=');
|
|
|
}
|
|
|
return urisafe ? mkUriSafe(b64) : b64;
|
|
|
};
|
|
|
// decoder stuff
|
|
|
var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
|
|
|
var cb_btou = function(cccc) {
|
|
|
switch(cccc.length) {
|
|
|
case 4:
|
|
|
var cp = ((0x07 & cccc.charCodeAt(0)) << 18)
|
|
|
| ((0x3f & cccc.charCodeAt(1)) << 12)
|
|
|
| ((0x3f & cccc.charCodeAt(2)) << 6)
|
|
|
| (0x3f & cccc.charCodeAt(3)),
|
|
|
offset = cp - 0x10000;
|
|
|
return (fromCharCode((offset >>> 10) + 0xD800)
|
|
|
+ fromCharCode((offset & 0x3FF) + 0xDC00));
|
|
|
case 3:
|
|
|
return fromCharCode(
|
|
|
((0x0f & cccc.charCodeAt(0)) << 12)
|
|
|
| ((0x3f & cccc.charCodeAt(1)) << 6)
|
|
|
| (0x3f & cccc.charCodeAt(2))
|
|
|
);
|
|
|
default:
|
|
|
return fromCharCode(
|
|
|
((0x1f & cccc.charCodeAt(0)) << 6)
|
|
|
| (0x3f & cccc.charCodeAt(1))
|
|
|
);
|
|
|
}
|
|
|
};
|
|
|
var btou = function(b) {
|
|
|
return b.replace(re_btou, cb_btou);
|
|
|
};
|
|
|
var cb_decode = function(cccc) {
|
|
|
var len = cccc.length,
|
|
|
padlen = len % 4,
|
|
|
n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0)
|
|
|
| (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0)
|
|
|
| (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0)
|
|
|
| (len > 3 ? b64tab[cccc.charAt(3)] : 0),
|
|
|
chars = [
|
|
|
fromCharCode( n >>> 16),
|
|
|
fromCharCode((n >>> 8) & 0xff),
|
|
|
fromCharCode( n & 0xff)
|
|
|
];
|
|
|
chars.length -= [0, 0, 2, 1][padlen];
|
|
|
return chars.join('');
|
|
|
};
|
|
|
var _atob = global.atob && typeof global.atob == 'function'
|
|
|
? function(a){ return global.atob(a) } : function(a){
|
|
|
return a.replace(/\S{1,4}/g, cb_decode);
|
|
|
};
|
|
|
var atob = function(a) {
|
|
|
return _atob(String(a).replace(/[^A-Za-z0-9\+\/]/g, ''));
|
|
|
};
|
|
|
var _decode = function(a) { return btou(_atob(a)) };
|
|
|
var _fromURI = function(a) {
|
|
|
return String(a).replace(/[-_]/g, function(m0) {
|
|
|
return m0 == '-' ? '+' : '/'
|
|
|
}).replace(/[^A-Za-z0-9\+\/]/g, '');
|
|
|
};
|
|
|
var decode = function(a){
|
|
|
return _decode(_fromURI(a));
|
|
|
};
|
|
|
var toUint8Array;
|
|
|
if (global.Uint8Array) toUint8Array = function(a) {
|
|
|
return Uint8Array.from(atob(_fromURI(a)), function(c) {
|
|
|
return c.charCodeAt(0);
|
|
|
});
|
|
|
};
|
|
|
var noConflict = function() {
|
|
|
var Base64 = global.Base64;
|
|
|
global.Base64 = _Base64;
|
|
|
return Base64;
|
|
|
};
|
|
|
// export Base64
|
|
|
global.Base64 = {
|
|
|
VERSION: version,
|
|
|
atob: atob,
|
|
|
btoa: btoa,
|
|
|
fromBase64: decode,
|
|
|
toBase64: encode,
|
|
|
utob: utob,
|
|
|
encode: encode,
|
|
|
encodeURI: encodeURI,
|
|
|
btou: btou,
|
|
|
decode: decode,
|
|
|
noConflict: noConflict,
|
|
|
fromUint8Array: fromUint8Array,
|
|
|
toUint8Array: toUint8Array
|
|
|
};
|
|
|
// if ES5 is available, make Base64.extendString() available
|
|
|
if (typeof Object.defineProperty === 'function') {
|
|
|
var noEnum = function(v){
|
|
|
return {value:v,enumerable:false,writable:true,configurable:true};
|
|
|
};
|
|
|
global.Base64.extendString = function () {
|
|
|
Object.defineProperty(
|
|
|
String.prototype, 'fromBase64', noEnum(function () {
|
|
|
return decode(this)
|
|
|
}));
|
|
|
Object.defineProperty(
|
|
|
String.prototype, 'toBase64', noEnum(function (urisafe) {
|
|
|
return encode(this, urisafe)
|
|
|
}));
|
|
|
Object.defineProperty(
|
|
|
String.prototype, 'toBase64URI', noEnum(function () {
|
|
|
return encode(this, true)
|
|
|
}));
|
|
|
};
|
|
|
}
|
|
|
//
|
|
|
// export Base64 to the namespace
|
|
|
//
|
|
|
if (global['Meteor']) { // Meteor.js
|
|
|
Base64 = global.Base64;
|
|
|
}
|
|
|
// module.exports and AMD are mutually exclusive.
|
|
|
// module.exports has precedence.
|
|
|
if ( true && module.exports) {
|
|
|
module.exports.Base64 = global.Base64;
|
|
|
}
|
|
|
else if (true) {
|
|
|
// AMD. Register as an anonymous module.
|
|
|
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function(){ return global.Base64 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
|
|
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
|
}
|
|
|
// that's it!
|
|
|
return {Base64: global.Base64}
|
|
|
}));
|
|
|
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
}]); |