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

3104 lines
154 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[22257],{
/***/ 37863:
/*!***********************************************!*\
!*** ./src/components/Editor/NullMDEditor.js ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "Z": function() { return /* binding */ NullMDEditor; }
/* harmony export */ });
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/objectSpread2.js */ 42122);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_classCallCheck_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/classCallCheck.js */ 56690);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_classCallCheck_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_classCallCheck_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_createClass_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/createClass.js */ 89728);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_createClass_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_createClass_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/assertThisInitialized.js */ 66115);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_inherits_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/inherits.js */ 61655);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_inherits_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_inherits_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_createSuper_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/createSuper.js */ 26389);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_createSuper_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_createSuper_js__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/defineProperty.js */ 38416);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_defineProperty_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_defineProperty_js__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ 67294);
/* harmony import */ var _markdown_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../markdown-editor */ 55373);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react/jsx-runtime */ 85893);
var NULL_CH = '▁';
var NullMDEditor = /*#__PURE__*/function (_Component) {
_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_inherits_js__WEBPACK_IMPORTED_MODULE_4___default()(NullMDEditor, _Component);
var _super = _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_createSuper_js__WEBPACK_IMPORTED_MODULE_5___default()(NullMDEditor);
function NullMDEditor() {
var _this;
_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_classCallCheck_js__WEBPACK_IMPORTED_MODULE_1___default()(this, NullMDEditor);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _super.call.apply(_super, [this].concat(args));
_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_defineProperty_js__WEBPACK_IMPORTED_MODULE_6___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_3___default()(_this), "getChCountBeforeCursor", function (cm, cursor) {
var currentLine = cursor.line;
var placeholderCountBefore = 0;
for (var _line = 0; _line < currentLine; _line++) {
placeholderCountBefore += cm.getLine(_line).split(NULL_CH).length - 1;
}
var currentLineStringBeforeCursor = cm.getLine(currentLine).substring(0, cursor.ch);
placeholderCountBefore += currentLineStringBeforeCursor.split(NULL_CH).length - 1;
return placeholderCountBefore;
});
_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_defineProperty_js__WEBPACK_IMPORTED_MODULE_6___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_3___default()(_this), "onCMBeforeChange", function (cm, change) {
var rangeText = cm.getRange(change.from, change.to);
var totalPlaceholderCount = 0;
change.text.forEach(function (item) {
totalPlaceholderCount += item.split(NULL_CH).length - 1;
});
if (rangeText && rangeText.indexOf(NULL_CH) != -1) {
var placeholderCountInRange = rangeText.split(NULL_CH).length - 1;
var placeholderCountBefore = _this.getChCountBeforeCursor(cm, change.from);
console.log("\u5220\u9664".concat(placeholderCountInRange, "\u4E2A\uFF0C \u4E4B\u524D\u6709").concat(placeholderCountBefore, "\u4E2A\uFF0C\u65B0\u589E").concat(totalPlaceholderCount, "\u4E2A"));
if (_this.props.deleteEmptyDisabled) {
// 删除空格不检测
change.cancel();
} else {
// const ret = window.confirm(
// `确认要删除第${
// placeholderCountInRange == 1
// ? placeholderCountBefore + 1
// : `${placeholderCountBefore + 1}-${placeholderCountBefore +
// placeholderCountInRange}`
// }个空吗?`,
// );
// if (ret) {
_this.props.onPlaceholderChange && _this.props.onPlaceholderChange(placeholderCountBefore, placeholderCountInRange, totalPlaceholderCount);
// } else {
// change.cancel();
// }
}
} else if (totalPlaceholderCount) {
var _placeholderCountBefore = _this.getChCountBeforeCursor(cm, change.from);
console.log("\u65B0\u589E".concat(totalPlaceholderCount, "\u4E2A\uFF0C\u4E4B\u524D\u6709").concat(_placeholderCountBefore, "\u4E2A"));
_this.props.onPlaceholderChange && _this.props.onPlaceholderChange(_placeholderCountBefore, 0, totalPlaceholderCount);
}
});
return _this;
}
_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_createClass_js__WEBPACK_IMPORTED_MODULE_2___default()(NullMDEditor, [{
key: "render",
value: function render() {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_9__.jsx)(_markdown_editor__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, this.props), {}, {
onCMBeforeChange: this.onCMBeforeChange
}));
}
}]);
return NullMDEditor;
}(react__WEBPACK_IMPORTED_MODULE_7__.Component);
/***/ }),
/***/ 2977:
/*!*********************************************************************!*\
!*** ./src/components/Editor/NullChildEditor/index.jsx + 1 modules ***!
\*********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"Z": function() { return /* binding */ Editor_NullChildEditor; }
});
// EXTERNAL MODULE: ./node_modules/antd/es/message/style/index.js + 1 modules
var style = __webpack_require__(14934);
// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 1 modules
var message = __webpack_require__(12461);
// EXTERNAL MODULE: ./node_modules/antd/es/tag/style/index.js + 1 modules
var tag_style = __webpack_require__(71114);
// EXTERNAL MODULE: ./node_modules/antd/es/tag/index.js + 1 modules
var es_tag = __webpack_require__(20550);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js
var classCallCheck = __webpack_require__(56690);
var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createClass.js
var createClass = __webpack_require__(89728);
var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/inherits.js
var inherits = __webpack_require__(61655);
var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createSuper.js
var createSuper = __webpack_require__(26389);
var createSuper_default = /*#__PURE__*/__webpack_require__.n(createSuper);
// EXTERNAL MODULE: ./node_modules/antd/es/input/style/index.js + 1 modules
var input_style = __webpack_require__(69463);
// EXTERNAL MODULE: ./node_modules/antd/es/input/index.js + 5 modules
var input = __webpack_require__(75008);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
;// CONCATENATED MODULE: ./src/components/Editor/NullChildEditor/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var NullChildEditormodules = ({"flex":"flex___eLcnP","flex1":"flex1___yUTT7","color666":"color666___TiUhG","error":"error___gTTtv","deleteIcon":"deleteIcon___mnZW1","addIcon":"addIcon___JC5NS"});
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/es/icons/PlusOutlined.js
var PlusOutlined = __webpack_require__(51042);
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/components/Editor/NullChildEditor/index.jsx
var TextArea = input/* default.TextArea */.Z.TextArea;
var NullChildEditor = /*#__PURE__*/function (_Component) {
inherits_default()(NullChildEditor, _Component);
var _super = createSuper_default()(NullChildEditor);
function NullChildEditor(props) {
var _this;
classCallCheck_default()(this, NullChildEditor);
_this = _super.call(this, props);
_this.state = {
inputVisible: false,
EditInputIndex: -1
};
return _this;
}
// componentDidMount() {
// // console.log(`${this.props.index}----`,this.props,e);
// if (this.props.answers[0].length <= 0) {
// this.setState({
// EditInputIndex: 0,
// });
// }
// }
createClass_default()(NullChildEditor, [{
key: "render",
value: function render() {
var _this2 = this;
var _this$props = this.props,
index = _this$props.index,
onAnswerChange = _this$props.onAnswerChange,
addChildAnswer = _this$props.addChildAnswer,
exerciseIsPublish = _this$props.exerciseIsPublish,
answers = _this$props.answers,
activeOptionErrorIndex = _this$props.activeOptionErrorIndex,
_this$props$flex = _this$props.flex,
flex = _this$props$flex === void 0 ? '0 0 1000px' : _this$props$flex;
console.log('----', answers);
var _this$state = this.state,
inputVisible = _this$state.inputVisible,
EditInputIndex = _this$state.EditInputIndex;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: NullChildEditormodules.flex,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(NullChildEditormodules.color666, " mb5 mt6"),
style: {
flex: '0 0 90px'
},
children: ["\u7B54\u6848(\u586B\u7A7A", index + 1, "):"]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
border: '1px solid #f6f6f6',
flex: 1,
padding: 10
},
children: [answers.map(function (tag, itemIndex) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: EditInputIndex !== itemIndex ? tag.length > 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(es_tag/* default */.Z, {
className: "edit-tag",
closable: true,
onClose: function onClose(e) {
e.preventDefault();
if ((answers === null || answers === void 0 ? void 0 : answers.length) === 1 && itemIndex === 0) {
_this2.props.deleteChildAnswermain(index, itemIndex);
} else {
_this2.props.deleteChildAnswer(index, itemIndex);
}
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onDoubleClick: function onDoubleClick(e) {
_this2.setState({
EditInputIndex: itemIndex
});
e.preventDefault();
},
children: tag
})
}, tag) : /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
defaultValue: tag,
style: {
width: 78,
marginRight: 8,
height: 24,
verticalAlign: 'top'
},
onBlur: function onBlur(e) {
if (e.target.value.replaceAll(' ', '').length <= 0) {
message/* default.info */.ZP.info('内容不能为纯空格');
return;
}
onAnswerChange(index, itemIndex, e.target.value);
_this2.setState({
EditInputIndex: -1,
inputVisible: false
});
}
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
defaultValue: tag,
style: {
width: 78,
marginRight: 8,
height: 24,
verticalAlign: 'top'
},
onBlur: function onBlur(e) {
if (e.target.value.replaceAll(' ', '').length <= 0) {
message/* default.info */.ZP.info('内容不能为纯空格');
return;
}
onAnswerChange(index, itemIndex, e.target.value);
_this2.setState({
EditInputIndex: -1,
inputVisible: false
});
}
})
});
}), !inputVisible && /*#__PURE__*/(0,jsx_runtime.jsxs)(es_tag/* default */.Z, {
className: "site-tag-plus",
onClick: function onClick() {
addChildAnswer(index);
// console.log(this.props.index);
_this2.setState({
inputVisible: true
});
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(PlusOutlined/* default */.Z, {}), " \u65B0\u589E\u7B54\u6848"]
})]
})]
});
}
}]);
return NullChildEditor;
}(react.Component);
/* harmony default export */ var Editor_NullChildEditor = (NullChildEditor);
/***/ }),
/***/ 1931:
/*!*************************************************************************!*\
!*** ./src/pages/Paperlibrary/Random/AddAndEdit/index.tsx + 15 modules ***!
\*************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ AddAndEdit; }
});
// EXTERNAL MODULE: ./node_modules/antd/es/skeleton/style/index.js + 1 modules
var style = __webpack_require__(61099);
// EXTERNAL MODULE: ./node_modules/antd/es/skeleton/index.js + 11 modules
var skeleton = __webpack_require__(73481);
// EXTERNAL MODULE: ./node_modules/antd/es/button/style/index.js + 1 modules
var button_style = __webpack_require__(29913);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__(71577);
// EXTERNAL MODULE: ./node_modules/antd/es/radio/style/index.js + 1 modules
var radio_style = __webpack_require__(83822);
// EXTERNAL MODULE: ./node_modules/antd/es/radio/index.js + 4 modules
var es_radio = __webpack_require__(29924);
// EXTERNAL MODULE: ./node_modules/antd/es/input-number/style/index.js + 1 modules
var input_number_style = __webpack_require__(25359);
// EXTERNAL MODULE: ./node_modules/antd/es/input-number/index.js + 9 modules
var input_number = __webpack_require__(87799);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(17061);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(17156);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(42122);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/antd/es/form/style/index.js + 1 modules
var form_style = __webpack_require__(75627);
// EXTERNAL MODULE: ./node_modules/antd/es/form/index.js + 17 modules
var es_form = __webpack_require__(51018);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(27424);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/antd/es/input/style/index.js + 1 modules
var input_style = __webpack_require__(69463);
// EXTERNAL MODULE: ./node_modules/antd/es/input/index.js + 5 modules
var input = __webpack_require__(75008);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__(67294);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 8 modules
var _umi_production_exports = __webpack_require__(89214);
;// CONCATENATED MODULE: ./src/pages/Paperlibrary/Random/AddAndEdit/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var AddAndEditmodules = ({"flex_box_center":"flex_box_center___IuNGJ","flex_space_between":"flex_space_between___TG0jT","flex_box_vertical_center":"flex_box_vertical_center___BPTjI","flex_box_center_end":"flex_box_center_end___ckhiu","flex_box_column":"flex_box_column___fxuMa","wrap":"wrap___c9z0X","btns":"btns____fdIK","crumbs":"crumbs___OdzeI","oneWrap":"oneWrap___Cet7W","title":"title___MB1fA","formWrap":"formWrap____g777","rb":"rb___fKrld"});
;// CONCATENATED MODULE: ./src/pages/Paperlibrary/Random/AddAndEdit/components/Tabs/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Tabsmodules = ({"tabs":"tabs___XlMdZ","active":"active___heIFJ"});
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
var jsx_runtime = __webpack_require__(85893);
;// CONCATENATED MODULE: ./src/pages/Paperlibrary/Random/AddAndEdit/components/Tabs/index.tsx
var Tabs = function Tabs(_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? [] : _ref$value,
onChange = _ref.onChange,
_ref$className = _ref.className,
className = _ref$className === void 0 ? '' : _ref$className;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(Tabsmodules.tabs, " ").concat(className, " "),
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
onClick: function onClick() {
return onChange(0);
},
className: value === 0 ? Tabsmodules.active : '',
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "1"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u5F55\u5165\u4FE1\u606F"
}), " "]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
onClick: function onClick() {
return onChange(1);
},
className: value === 1 ? Tabsmodules.active : '',
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "2"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u914D\u7F6E\u7EC4\u5377"
})]
})]
});
};
/* harmony default export */ var components_Tabs = (Tabs);
// EXTERNAL MODULE: ./node_modules/antd/es/modal/style/index.js + 1 modules
var modal_style = __webpack_require__(35611);
// EXTERNAL MODULE: ./node_modules/antd/es/modal/index.js + 7 modules
var modal = __webpack_require__(85402);
// EXTERNAL MODULE: ./node_modules/antd/es/checkbox/style/index.js + 1 modules
var checkbox_style = __webpack_require__(82000);
// EXTERNAL MODULE: ./node_modules/antd/es/checkbox/index.js + 2 modules
var es_checkbox = __webpack_require__(32808);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/style/index.js + 1 modules
var tooltip_style = __webpack_require__(38390);
// EXTERNAL MODULE: ./node_modules/antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(84908);
// EXTERNAL MODULE: ./node_modules/antd/es/message/style/index.js + 1 modules
var message_style = __webpack_require__(14934);
// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 1 modules
var message = __webpack_require__(12461);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js
var toConsumableArray = __webpack_require__(861);
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
;// CONCATENATED MODULE: ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepTwo/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var StepTwomodules = ({"flex_box_center":"flex_box_center___LDL3f","flex_space_between":"flex_space_between___Xl1HD","flex_box_vertical_center":"flex_box_vertical_center___n7UPy","flex_box_center_end":"flex_box_center_end___pttB_","flex_box_column":"flex_box_column___Jpfxo","wrap":"wrap___aPyki","left":"left___cqZKp","list":"list___IWY_v","name":"name___k_tHd","b":"b____iUPp","r":"r___yRdFx","l":"l___Tle8P","total":"total___VTraD","topWarp":"topWarp___Y6Gn4","right":"right___IuNp1","tabs":"tabs___KAQJT","title":"title___Cx_AF","source":"source___CzyxS","folder":"folder___jJTuI","choice":"choice___lu9pS","range":"range___BOaY9","btn":"btn___DWkEW","knWarp":"knWarp___JTaEU","kn":"kn___sA6Lo","btns":"btns___UPkmA","modalBody":"modalBody___NDRx0","active":"active___vLIUY","inputWarp":"inputWarp___TOT_1","modal":"modal___S2RSB","exportModal":"exportModal___GIHaw","teachModal":"teachModal___lqfFQ","head":"head___VxgJz","wraps":"wraps___rmP7C","body":"body___coJ9M"});
// EXTERNAL MODULE: ./src/service/problemset.ts
var problemset = __webpack_require__(75968);
;// CONCATENATED MODULE: ./src/assets/images/paper/wenhao.svg
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = function __defNormalProp(obj, key, value) {
return key in obj ? __defProp(obj, key, {
enumerable: true,
configurable: true,
writable: true,
value: value
}) : obj[key] = value;
};
var __spreadValues = function __spreadValues(a, b) {
for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols) {
var _iterator = _createForOfIteratorHelper(__getOwnPropSymbols(b)),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var prop = _step.value;
if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
}
return a;
};
var SvgWenhao = function SvgWenhao(props) {
return /* @__PURE__ */React.createElement("svg", __spreadValues({
width: 22,
height: 22,
xmlns: "http://www.w3.org/2000/svg"
}, props), /* @__PURE__ */React.createElement("title", null, "\u95EE\u53F7\u5907\u4EFD 2"), /* @__PURE__ */React.createElement("path", {
d: "M11 20.56a9.56 9.56 0 1 0 0-19.12 9.56 9.56 0 0 0 0 19.12ZM11 22C4.925 22 0 17.075 0 11S4.925 0 11 0s11 4.925 11 11-4.925 11-11 11ZM8.993 9.295v.016a.72.72 0 1 1-1.44-.029.254.254 0 0 1-.001-.032c0-1.064.298-1.94.89-2.63.648-.745 1.541-1.11 2.672-1.11 1.007 0 1.822.292 2.443.88.596.561.892 1.32.892 2.26 0 .681-.212 1.307-.625 1.854-.173.218-.545.58-1.22 1.191-.327.286-.557.552-.701.794a1.99 1.99 0 0 0-.282 1.016l.026.436a.252.252 0 0 1-.251.267h-.943a.252.252 0 0 1-.253-.251v-.436c0-.476.1-.921.295-1.31.236-.506.725-1.092 1.434-1.71.44-.442.579-.584.67-.699.288-.37.428-.738.428-1.123 0-.573-.166-1.026-.482-1.355-.332-.332-.818-.498-1.476-.498-.734 0-1.26.236-1.623.717-.304.381-.45.938-.45 1.707 0 .015 0 .03-.003.045ZM11 16.664a.72.72 0 0 1 0-1.44.72.72 0 0 1 0 1.44Z",
fill: "#4C6FFF",
fillRule: "nonzero"
}));
};
/* harmony default export */ var wenhao = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExIDIwLjU2YTkuNTYgOS41NiAwIDEgMCAwLTE5LjEyIDkuNTYgOS41NiAwIDAgMCAwIDE5LjEyWk0xMSAyMkM0LjkyNSAyMiAwIDE3LjA3NSAwIDExUzQuOTI1IDAgMTEgMHMxMSA0LjkyNSAxMSAxMS00LjkyNSAxMS0xMSAxMVpNOC45OTMgOS4yOTV2LjAxNmEuNzIuNzIgMCAxIDEtMS40NC0uMDI5LjI1NC4yNTQgMCAwIDEtLjAwMS0uMDMyYzAtMS4wNjQuMjk4LTEuOTQuODktMi42My42NDgtLjc0NSAxLjU0MS0xLjExIDIuNjcyLTEuMTEgMS4wMDcgMCAxLjgyMi4yOTIgMi40NDMuODguNTk2LjU2MS44OTIgMS4zMi44OTIgMi4yNiAwIC42ODEtLjIxMiAxLjMwNy0uNjI1IDEuODU0LS4xNzMuMjE4LS41NDUuNTgtMS4yMiAxLjE5MS0uMzI3LjI4Ni0uNTU3LjU1Mi0uNzAxLjc5NGExLjk5IDEuOTkgMCAwIDAtLjI4MiAxLjAxNmwuMDI2LjQzNmEuMjUyLjI1MiAwIDAgMS0uMjUxLjI2N2gtLjk0M2EuMjUyLjI1MiAwIDAgMS0uMjUzLS4yNTF2LS40MzZjMC0uNDc2LjEtLjkyMS4yOTUtMS4zMS4yMzYtLjUwNi43MjUtMS4wOTIgMS40MzQtMS43MS40NC0uNDQyLjU3OS0uNTg0LjY3LS42OTkuMjg4LS4zNy40MjgtLjczOC40MjgtMS4xMjMgMC0uNTczLS4xNjYtMS4wMjYtLjQ4Mi0xLjM1NS0uMzMyLS4zMzItLjgxOC0uNDk4LTEuNDc2LS40OTgtLjczNCAwLTEuMjYuMjM2LTEuNjIzLjcxNy0uMzA0LjM4MS0uNDUuOTM4LS40NSAxLjcwNyAwIC4wMTUgMCAuMDMtLjAwMy4wNDVaTTExIDE2LjY2NGEuNzIuNzIgMCAwIDEgMC0xLjQ0LjcyLjcyIDAgMCAxIDAgMS40NFoiIGZpbGw9IiM0QzZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==");
;// CONCATENATED MODULE: ./src/assets/images/paper/wenjian.svg
function wenjian_createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = wenjian_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function wenjian_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return wenjian_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return wenjian_arrayLikeToArray(o, minLen); }
function wenjian_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
var wenjian_defProp = Object.defineProperty;
var wenjian_getOwnPropSymbols = Object.getOwnPropertySymbols;
var wenjian_hasOwnProp = Object.prototype.hasOwnProperty;
var wenjian_propIsEnum = Object.prototype.propertyIsEnumerable;
var wenjian_defNormalProp = function __defNormalProp(obj, key, value) {
return key in obj ? wenjian_defProp(obj, key, {
enumerable: true,
configurable: true,
writable: true,
value: value
}) : obj[key] = value;
};
var wenjian_spreadValues = function __spreadValues(a, b) {
for (var prop in b || (b = {})) if (wenjian_hasOwnProp.call(b, prop)) wenjian_defNormalProp(a, prop, b[prop]);
if (wenjian_getOwnPropSymbols) {
var _iterator = wenjian_createForOfIteratorHelper(wenjian_getOwnPropSymbols(b)),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var prop = _step.value;
if (wenjian_propIsEnum.call(b, prop)) wenjian_defNormalProp(a, prop, b[prop]);
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
}
return a;
};
var SvgWenjian = function SvgWenjian(props) {
return /* @__PURE__ */React.createElement("svg", wenjian_spreadValues({
width: 22,
height: 16,
xmlns: "http://www.w3.org/2000/svg"
}, props), /* @__PURE__ */React.createElement("title", null, "\u5927\u6587\u4EF6\u5939"), /* @__PURE__ */React.createElement("g", {
fill: "none",
fillRule: "evenodd"
}, /* @__PURE__ */React.createElement("path", {
d: "M0 0h22v16H0z"
}), /* @__PURE__ */React.createElement("path", {
d: "M2.6 6.444 1 12.312V1.052C1 .472 1.471 0 2.052 0h4.997c.28 0 .547.11.744.308l2.155 2.155c.04.04.093.061.148.061h7.522c.581.001 1.052.471 1.052 1.052V5.05H4.427c-.853.001-1.6.572-1.826 1.395Zm18.184-.14a1.044 1.044 0 0 0-.836-.414H4.427c-.474.001-.89.318-1.015.776l-2.18 7.993a1.052 1.052 0 0 0 1.015 1.328h15.52c.475 0 .89-.318 1.015-.775l2.18-7.994a1.044 1.044 0 0 0-.179-.915Z",
fill: "#165DFF",
fillRule: "nonzero"
})));
};
/* harmony default export */ var wenjian = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMCAwaDIydjE2SDB6Ii8+PHBhdGggZD0iTTIuNiA2LjQ0NCAxIDEyLjMxMlYxLjA1MkMxIC40NzIgMS40NzEgMCAyLjA1MiAwaDQuOTk3Yy4yOCAwIC41NDcuMTEuNzQ0LjMwOGwyLjE1NSAyLjE1NWMuMDQuMDQuMDkzLjA2MS4xNDguMDYxaDcuNTIyYy41ODEuMDAxIDEuMDUyLjQ3MSAxLjA1MiAxLjA1MlY1LjA1SDQuNDI3Yy0uODUzLjAwMS0xLjYuNTcyLTEuODI2IDEuMzk1Wm0xOC4xODQtLjE0YTEuMDQ0IDEuMDQ0IDAgMCAwLS44MzYtLjQxNEg0LjQyN2MtLjQ3NC4wMDEtLjg5LjMxOC0xLjAxNS43NzZsLTIuMTggNy45OTNhMS4wNTIgMS4wNTIgMCAwIDAgMS4wMTUgMS4zMjhoMTUuNTJjLjQ3NSAwIC44OS0uMzE4IDEuMDE1LS43NzVsMi4xOC03Ljk5NGExLjA0NCAxLjA0NCAwIDAgMC0uMTc5LS45MTVaIiBmaWxsPSIjMTY1REZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L2c+PC9zdmc+");
;// CONCATENATED MODULE: ./src/assets/images/paper/median.svg
function median_createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = median_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function median_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return median_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return median_arrayLikeToArray(o, minLen); }
function median_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
var median_defProp = Object.defineProperty;
var median_getOwnPropSymbols = Object.getOwnPropertySymbols;
var median_hasOwnProp = Object.prototype.hasOwnProperty;
var median_propIsEnum = Object.prototype.propertyIsEnumerable;
var median_defNormalProp = function __defNormalProp(obj, key, value) {
return key in obj ? median_defProp(obj, key, {
enumerable: true,
configurable: true,
writable: true,
value: value
}) : obj[key] = value;
};
var median_spreadValues = function __spreadValues(a, b) {
for (var prop in b || (b = {})) if (median_hasOwnProp.call(b, prop)) median_defNormalProp(a, prop, b[prop]);
if (median_getOwnPropSymbols) {
var _iterator = median_createForOfIteratorHelper(median_getOwnPropSymbols(b)),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var prop = _step.value;
if (median_propIsEnum.call(b, prop)) median_defNormalProp(a, prop, b[prop]);
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
}
return a;
};
var SvgMedian = function SvgMedian(props) {
return /* @__PURE__ */React.createElement("svg", median_spreadValues({
width: 20,
height: 20,
xmlns: "http://www.w3.org/2000/svg"
}, props), /* @__PURE__ */React.createElement("title", null, "\u8003\u5BDF\u95E8\u5E97"), /* @__PURE__ */React.createElement("path", {
d: "M8.007 10.27 1.145 6.456a.999.999 0 0 1 0-1.418L8.239.993a1.013 1.013 0 0 1 1.427 0l6.862 3.814a.999.999 0 0 1 0 1.418L9.434 10.27a1.013 1.013 0 0 1-1.426 0Zm-7.74-.062C-.178 9.94.009 9.133.279 8.691a.945.945 0 0 1 1.294-.313l6.96 4.207.08.08a.068.068 0 0 0 .095 0l.076-.077 3.278-1.995a4.372 4.372 0 0 0-.303 2.39l-1.811 1.09a1.95 1.95 0 0 1-1.288.482 1.95 1.95 0 0 1-1.283-.478l-7.11-3.869Zm12.152 4.324c.344.549.911.972 1.456 1.325l-3.928 2.462a1.95 1.95 0 0 1-1.287.481c-.472.001-.927-.169-1.283-.478L.595 14.223a.933.933 0 0 1-.315-1.286.945.945 0 0 1 1.293-.313l6.96 4.206.08.08a.068.068 0 0 0 .095 0l.077-.076 3.634-2.302Zm6.939.718a.676.676 0 0 1 0 .96.686.686 0 0 1-.966 0l-1.463-1.454a2.89 2.89 0 0 1-1.486.409 2.883 2.883 0 0 1-2.892-2.875 2.884 2.884 0 0 1 2.892-2.875 2.884 2.884 0 0 1 2.893 2.875c0 .555-.16 1.074-.434 1.514l1.456 1.446Zm-3.914-1.222c.964 0 1.748-.78 1.748-1.738 0-.96-.784-1.74-1.748-1.74-.965 0-1.75.78-1.75 1.74 0 .958.785 1.738 1.75 1.738Z",
fill: "#007DFE",
fillRule: "nonzero"
}));
};
/* harmony default export */ var median = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTguMDA3IDEwLjI3IDEuMTQ1IDYuNDU2YS45OTkuOTk5IDAgMCAxIDAtMS40MThMOC4yMzkuOTkzYTEuMDEzIDEuMDEzIDAgMCAxIDEuNDI3IDBsNi44NjIgMy44MTRhLjk5OS45OTkgMCAwIDEgMCAxLjQxOEw5LjQzNCAxMC4yN2ExLjAxMyAxLjAxMyAwIDAgMS0xLjQyNiAwWm0tNy43NC0uMDYyQy0uMTc4IDkuOTQuMDA5IDkuMTMzLjI3OSA4LjY5MWEuOTQ1Ljk0NSAwIDAgMSAxLjI5NC0uMzEzbDYuOTYgNC4yMDcuMDguMDhhLjA2OC4wNjggMCAwIDAgLjA5NSAwbC4wNzYtLjA3NyAzLjI3OC0xLjk5NWE0LjM3MiA0LjM3MiAwIDAgMC0uMzAzIDIuMzlsLTEuODExIDEuMDlhMS45NSAxLjk1IDAgMCAxLTEuMjg4LjQ4MiAxLjk1IDEuOTUgMCAwIDEtMS4yODMtLjQ3OGwtNy4xMS0zLjg2OVptMTIuMTUyIDQuMzI0Yy4zNDQuNTQ5LjkxMS45NzIgMS40NTYgMS4zMjVsLTMuOTI4IDIuNDYyYTEuOTUgMS45NSAwIDAgMS0xLjI4Ny40ODFjLS40NzIuMDAxLS45MjctLjE2OS0xLjI4My0uNDc4TC41OTUgMTQuMjIzYS45MzMuOTMzIDAgMCAxLS4zMTUtMS4yODYuOTQ1Ljk0NSAwIDAgMSAxLjI5My0uMzEzbDYuOTYgNC4yMDYuMDguMDhhLjA2OC4wNjggMCAwIDAgLjA5NSAwbC4wNzctLjA3NiAzLjYzNC0yLjMwMlptNi45MzkuNzE4YS42NzYuNjc2IDAgMCAxIDAgLjk2LjY4Ni42ODYgMCAwIDEtLjk2NiAwbC0xLjQ2My0xLjQ1NGEyLjg5IDIuODkgMCAwIDEtMS40ODYuNDA5IDIuODgzIDIuODgzIDAgMCAxLTIuODkyLTIuODc1IDIuODg0IDIuODg0IDAgMCAxIDIuODkyLTIuODc1IDIuODg0IDIuODg0IDAgMCAxIDIuODkzIDIuODc1YzAgLjU1NS0uMTYgMS4wNzQtLjQzNCAxLjUxNGwxLjQ1NiAxLjQ0NlptLTMuOTE0LTEuMjIyYy45NjQgMCAxLjc0OC0uNzggMS43NDgtMS43MzggMC0uOTYtLjc4NC0xLjc0LTEuNzQ4LTEuNzQtLjk2NSAwLTEuNzUuNzgtMS43NSAxLjc0IDAgLjk1OC43ODUgMS43MzggMS43NSAxLjczOFoiIGZpbGw9IiMwMDdERkUiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==");
;// CONCATENATED MODULE: ./src/assets/images/paper/shu.svg
function shu_createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = shu_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function shu_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return shu_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return shu_arrayLikeToArray(o, minLen); }
function shu_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
var shu_defProp = Object.defineProperty;
var shu_getOwnPropSymbols = Object.getOwnPropertySymbols;
var shu_hasOwnProp = Object.prototype.hasOwnProperty;
var shu_propIsEnum = Object.prototype.propertyIsEnumerable;
var shu_defNormalProp = function __defNormalProp(obj, key, value) {
return key in obj ? shu_defProp(obj, key, {
enumerable: true,
configurable: true,
writable: true,
value: value
}) : obj[key] = value;
};
var shu_spreadValues = function __spreadValues(a, b) {
for (var prop in b || (b = {})) if (shu_hasOwnProp.call(b, prop)) shu_defNormalProp(a, prop, b[prop]);
if (shu_getOwnPropSymbols) {
var _iterator = shu_createForOfIteratorHelper(shu_getOwnPropSymbols(b)),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var prop = _step.value;
if (shu_propIsEnum.call(b, prop)) shu_defNormalProp(a, prop, b[prop]);
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
}
return a;
};
var SvgShu = function SvgShu(props) {
return /* @__PURE__ */React.createElement("svg", shu_spreadValues({
width: 18,
height: 18,
xmlns: "http://www.w3.org/2000/svg"
}, props), /* @__PURE__ */React.createElement("title", null, "\u7F16\u7EC4 3"), /* @__PURE__ */React.createElement("defs", null, /* @__PURE__ */React.createElement("linearGradient", {
x1: "50%",
y1: "0%",
x2: "50%",
y2: "100%",
id: "shu_svg__a"
}, /* @__PURE__ */React.createElement("stop", {
stopColor: "#6975FD",
offset: "0%"
}), /* @__PURE__ */React.createElement("stop", {
stopColor: "#007AFF",
offset: "100%"
}))), /* @__PURE__ */React.createElement("g", {
fill: "none",
fillRule: "evenodd"
}, /* @__PURE__ */React.createElement("path", {
fillOpacity: 0.01,
fill: "#FFF",
d: "M0 0h18v18H0z"
}), /* @__PURE__ */React.createElement("rect", {
fill: "url(#shu_svg__a)",
x: 6,
y: 1,
width: 5,
height: 16,
rx: 2.5
})));
};
/* harmony default export */ var shu = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSI1MCUiIHkxPSIwJSIgeDI9IjUwJSIgeTI9IjEwMCUiIGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjNjk3NUZEIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzAwN0FGRiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBmaWxsLW9wYWNpdHk9Ii4wMSIgZmlsbD0iI0ZGRiIgZD0iTTAgMGgxOHYxOEgweiIvPjxyZWN0IGZpbGw9InVybCgjYSkiIHg9IjYiIHk9IjEiIHdpZHRoPSI1IiBoZWlnaHQ9IjE2IiByeD0iMi41Ii8+PC9nPjwvc3ZnPg==");
// EXTERNAL MODULE: ./src/assets/images/paper/xixi.svg
var xixi = __webpack_require__(81930);
// EXTERNAL MODULE: ./src/assets/images/paper/bi.svg
var bi = __webpack_require__(48601);
;// CONCATENATED MODULE: ./src/assets/images/paper/te.svg
function te_createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = te_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function te_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return te_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return te_arrayLikeToArray(o, minLen); }
function te_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
var te_defProp = Object.defineProperty;
var te_getOwnPropSymbols = Object.getOwnPropertySymbols;
var te_hasOwnProp = Object.prototype.hasOwnProperty;
var te_propIsEnum = Object.prototype.propertyIsEnumerable;
var te_defNormalProp = function __defNormalProp(obj, key, value) {
return key in obj ? te_defProp(obj, key, {
enumerable: true,
configurable: true,
writable: true,
value: value
}) : obj[key] = value;
};
var te_spreadValues = function __spreadValues(a, b) {
for (var prop in b || (b = {})) if (te_hasOwnProp.call(b, prop)) te_defNormalProp(a, prop, b[prop]);
if (te_getOwnPropSymbols) {
var _iterator = te_createForOfIteratorHelper(te_getOwnPropSymbols(b)),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var prop = _step.value;
if (te_propIsEnum.call(b, prop)) te_defNormalProp(a, prop, b[prop]);
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
}
return a;
};
var SvgTe = function SvgTe(props) {
return /* @__PURE__ */React.createElement("svg", te_spreadValues({
width: 24,
height: 24,
xmlns: "http://www.w3.org/2000/svg"
}, props), /* @__PURE__ */React.createElement("title", null, "\u6559\u7814\u56E2\u961F"), /* @__PURE__ */React.createElement("g", {
fill: "none",
fillRule: "evenodd"
}, /* @__PURE__ */React.createElement("path", {
d: "M0 0h24v24H0z"
}), /* @__PURE__ */React.createElement("g", {
fillRule: "nonzero"
}, /* @__PURE__ */React.createElement("path", {
d: "M8.062 14.52c.258-.082.505-.195.739-.335.422-.272.749-.832-.04-1.516-2.604-3.825-1.657-6.364-1.26-7.32a3.04 3.04 0 0 0-1.135-.212H6.23c-2.494 0-3.152 2.313-3.207 3.606-.033 3.054 1.798 4.27 1.798 4.27.096.192.138.41.117.626a.892.892 0 0 1-.188.52C3.727 15.002.31 15.881.07 17.702a5.401 5.401 0 0 0-.024 1.575c.558.436 2.35.807 2.35.807.122-.401.222-.808.3-1.22.22-1.12 1.715-2.94 5.365-4.345Zm15.831 3.168c-.245-1.815-3.752-2.694-4.803-3.538a.901.901 0 0 1-.188-.52c-.02-.216.02-.433.115-.626 0 0 1.88-1.212 1.847-4.265-.051-1.296-.845-3.603-3.288-3.603h-.136a3.27 3.27 0 0 0-1.351.27c.525 1.782 1.151 5.053-1.493 7.243-1.037 1.574 2.417 2.5 1.88 2.251 3.125 1.433 3.965 2.53 4.193 3.663.193.947.3 1.526.3 1.526s2.342-.364 2.947-.828a5.444 5.444 0 0 0-.023-1.573Z",
fill: "#B6D0FC",
opacity: 0.7
}), /* @__PURE__ */React.createElement("path", {
d: "M13.704 14.2a1.114 1.114 0 0 1-.233-.646 1.448 1.448 0 0 1 .142-.775c-.003.002 2.31-1.271 2.263-5.301C15.815 5.868 14.841 3 11.843 3h-.172C8.538 3 7.701 5.867 7.64 7.478c-.041 3.793 2.262 5.3 2.262 5.3.19.258.289.576.28.902 0 .133-.223.4-.37.52-1.287 1.05-5.923 2.105-6.223 4.363-.235.958-1.61 2.477 2.964 3.088 1.755.202 3.52.292 5.285.268 10.612 0 8.417-2.094 8.122-3.32-.298-2.257-4.97-3.351-6.258-4.398h.002Z",
fill: "#165DFF"
}))));
};
/* harmony default export */ var te = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMCAwaDI0djI0SDB6Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNOC4wNjIgMTQuNTJjLjI1OC0uMDgyLjUwNS0uMTk1LjczOS0uMzM1LjQyMi0uMjcyLjc0OS0uODMyLS4wNC0xLjUxNi0yLjYwNC0zLjgyNS0xLjY1Ny02LjM2NC0xLjI2LTcuMzJhMy4wNCAzLjA0IDAgMCAwLTEuMTM1LS4yMTJINi4yM2MtMi40OTQgMC0zLjE1MiAyLjMxMy0zLjIwNyAzLjYwNi0uMDMzIDMuMDU0IDEuNzk4IDQuMjcgMS43OTggNC4yNy4wOTYuMTkyLjEzOC40MS4xMTcuNjI2YS44OTIuODkyIDAgMCAxLS4xODguNTJDMy43MjcgMTUuMDAyLjMxIDE1Ljg4MS4wNyAxNy43MDJhNS40MDEgNS40MDEgMCAwIDAtLjAyNCAxLjU3NWMuNTU4LjQzNiAyLjM1LjgwNyAyLjM1LjgwNy4xMjItLjQwMS4yMjItLjgwOC4zLTEuMjIuMjItMS4xMiAxLjcxNS0yLjk0IDUuMzY1LTQuMzQ1Wm0xNS44MzEgMy4xNjhjLS4yNDUtMS44MTUtMy43NTItMi42OTQtNC44MDMtMy41MzhhLjkwMS45MDEgMCAwIDEtLjE4OC0uNTJjLS4wMi0uMjE2LjAyLS40MzMuMTE1LS42MjYgMCAwIDEuODgtMS4yMTIgMS44NDctNC4yNjUtLjA1MS0xLjI5Ni0uODQ1LTMuNjAzLTMuMjg4LTMuNjAzaC0uMTM2YTMuMjcgMy4yNyAwIDAgMC0xLjM1MS4yN2MuNTI1IDEuNzgyIDEuMTUxIDUuMDUzLTEuNDkzIDcuMjQzLTEuMDM3IDEuNTc0IDIuNDE3IDIuNSAxLjg4IDIuMjUxIDMuMTI1IDEuNDMzIDMuOTY1IDIuNTMgNC4xOTMgMy42NjMuMTkzLjk0Ny4zIDEuNTI2LjMgMS41MjZzMi4zNDItLjM2NCAyLjk0Ny0uODI4YTUuNDQ0IDUuNDQ0IDAgMCAwLS4wMjMtMS41NzNaIiBmaWxsPSIjQjZEMEZDIiBvcGFjaXR5PSIuNyIvPjxwYXRoIGQ9Ik0xMy43MDQgMTQuMmExLjExNCAxLjExNCAwIDAgMS0uMjMzLS42NDYgMS40NDggMS40NDggMCAwIDEgLjE0Mi0uNzc1Yy0uMDAzLjAwMiAyLjMxLTEuMjcxIDIuMjYzLTUuMzAxQzE1LjgxNSA1Ljg2OCAxNC44NDEgMyAxMS44NDMgM2gtLjE3MkM4LjUzOCAzIDcuNzAxIDUuODY3IDcuNjQgNy40NzhjLS4wNDEgMy43OTMgMi4yNjIgNS4zIDIuMjYyIDUuMy4xOS4yNTguMjg5LjU3Ni4yOC45MDIgMCAuMTMzLS4yMjMuNC0uMzcuNTItMS4yODcgMS4wNS01LjkyMyAyLjEwNS02LjIyMyA0LjM2My0uMjM1Ljk1OC0xLjYxIDIuNDc3IDIuOTY0IDMuMDg4IDEuNzU1LjIwMiAzLjUyLjI5MiA1LjI4NS4yNjggMTAuNjEyIDAgOC40MTctMi4wOTQgOC4xMjItMy4zMi0uMjk4LTIuMjU3LTQuOTctMy4zNTEtNi4yNTgtNC4zOThoLjAwMloiIGZpbGw9IiMxNjVERkYiLz48L2c+PC9nPjwvc3ZnPg==");
;// CONCATENATED MODULE: ./src/assets/images/paper/sren.svg
function sren_createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = sren_unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function sren_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return sren_arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return sren_arrayLikeToArray(o, minLen); }
function sren_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
var sren_defProp = Object.defineProperty;
var sren_getOwnPropSymbols = Object.getOwnPropertySymbols;
var sren_hasOwnProp = Object.prototype.hasOwnProperty;
var sren_propIsEnum = Object.prototype.propertyIsEnumerable;
var sren_defNormalProp = function __defNormalProp(obj, key, value) {
return key in obj ? sren_defProp(obj, key, {
enumerable: true,
configurable: true,
writable: true,
value: value
}) : obj[key] = value;
};
var sren_spreadValues = function __spreadValues(a, b) {
for (var prop in b || (b = {})) if (sren_hasOwnProp.call(b, prop)) sren_defNormalProp(a, prop, b[prop]);
if (sren_getOwnPropSymbols) {
var _iterator = sren_createForOfIteratorHelper(sren_getOwnPropSymbols(b)),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var prop = _step.value;
if (sren_propIsEnum.call(b, prop)) sren_defNormalProp(a, prop, b[prop]);
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
}
return a;
};
var SvgSren = function SvgSren(props) {
return /* @__PURE__ */React.createElement("svg", sren_spreadValues({
width: 18,
height: 18,
xmlns: "http://www.w3.org/2000/svg"
}, props), /* @__PURE__ */React.createElement("title", null, "\u5C0F\u6559\u7814\u56E2\u961F"), /* @__PURE__ */React.createElement("g", {
fill: "none",
fillRule: "evenodd"
}, /* @__PURE__ */React.createElement("path", {
d: "M0 0h18v18H0z"
}), /* @__PURE__ */React.createElement("g", {
fillRule: "nonzero"
}, /* @__PURE__ */React.createElement("path", {
d: "M6.047 10.89c.193-.062.378-.146.554-.251.316-.204.561-.624-.03-1.138-1.953-2.868-1.243-4.773-.945-5.49a2.28 2.28 0 0 0-.851-.158h-.103c-1.87 0-2.364 1.734-2.406 2.704-.024 2.29 1.35 3.203 1.35 3.203a.87.87 0 0 1 .087.47.669.669 0 0 1-.142.389c-.766.633-3.327 1.293-3.508 2.658a4.05 4.05 0 0 0-.018 1.181c.419.327 1.763.606 1.763.606.092-.301.166-.606.225-.916.164-.84 1.286-2.205 4.024-3.258Zm11.873 2.376c-.184-1.362-2.814-2.02-3.602-2.653a.676.676 0 0 1-.141-.39.875.875 0 0 1 .086-.47s1.41-.91 1.385-3.199c-.038-.971-.633-2.702-2.466-2.702h-.102a2.452 2.452 0 0 0-1.013.202c.393 1.337.863 3.79-1.12 5.433-.778 1.18 1.812 1.874 1.41 1.688 2.344 1.075 2.974 1.897 3.145 2.747.144.71.225 1.144.225 1.144s1.756-.273 2.21-.62c.051-.392.046-.79-.017-1.18Z",
fill: "#B6D0FC",
opacity: 0.7
}), /* @__PURE__ */React.createElement("path", {
d: "M10.278 10.65a.836.836 0 0 1-.175-.484c-.019-.2.018-.402.107-.582-.002.001 1.732-.953 1.697-3.976-.046-1.207-.776-3.358-3.025-3.358h-.129c-2.35 0-2.977 2.15-3.023 3.358-.031 2.845 1.697 3.976 1.697 3.976.142.193.216.432.21.676 0 .1-.168.3-.279.39-.964.787-4.442 1.578-4.667 3.272-.175.719-1.206 1.858 2.224 2.316 1.316.152 2.64.22 3.964.202 7.959 0 6.312-1.571 6.09-2.49-.223-1.693-3.727-2.514-4.692-3.3h.001Z",
fill: "#165DFF"
}))));
};
/* harmony default export */ var sren = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMCAwaDE4djE4SDB6Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNNi4wNDcgMTAuODljLjE5My0uMDYyLjM3OC0uMTQ2LjU1NC0uMjUxLjMxNi0uMjA0LjU2MS0uNjI0LS4wMy0xLjEzOC0xLjk1My0yLjg2OC0xLjI0My00Ljc3My0uOTQ1LTUuNDlhMi4yOCAyLjI4IDAgMCAwLS44NTEtLjE1OGgtLjEwM2MtMS44NyAwLTIuMzY0IDEuNzM0LTIuNDA2IDIuNzA0LS4wMjQgMi4yOSAxLjM1IDMuMjAzIDEuMzUgMy4yMDNhLjg3Ljg3IDAgMCAxIC4wODcuNDcuNjY5LjY2OSAwIDAgMS0uMTQyLjM4OWMtLjc2Ni42MzMtMy4zMjcgMS4yOTMtMy41MDggMi42NThhNC4wNSA0LjA1IDAgMCAwLS4wMTggMS4xODFjLjQxOS4zMjcgMS43NjMuNjA2IDEuNzYzLjYwNi4wOTItLjMwMS4xNjYtLjYwNi4yMjUtLjkxNi4xNjQtLjg0IDEuMjg2LTIuMjA1IDQuMDI0LTMuMjU4Wm0xMS44NzMgMi4zNzZjLS4xODQtMS4zNjItMi44MTQtMi4wMi0zLjYwMi0yLjY1M2EuNjc2LjY3NiAwIDAgMS0uMTQxLS4zOS44NzUuODc1IDAgMCAxIC4wODYtLjQ3czEuNDEtLjkxIDEuMzg1LTMuMTk5Yy0uMDM4LS45NzEtLjYzMy0yLjcwMi0yLjQ2Ni0yLjcwMmgtLjEwMmEyLjQ1MiAyLjQ1MiAwIDAgMC0xLjAxMy4yMDJjLjM5MyAxLjMzNy44NjMgMy43OS0xLjEyIDUuNDMzLS43NzggMS4xOCAxLjgxMiAxLjg3NCAxLjQxIDEuNjg4IDIuMzQ0IDEuMDc1IDIuOTc0IDEuODk3IDMuMTQ1IDIuNzQ3LjE0NC43MS4yMjUgMS4xNDQuMjI1IDEuMTQ0czEuNzU2LS4yNzMgMi4yMS0uNjJjLjA1MS0uMzkyLjA0Ni0uNzktLjAxNy0xLjE4WiIgZmlsbD0iI0I2RDBGQyIgb3BhY2l0eT0iLjciLz48cGF0aCBkPSJNMTAuMjc4IDEwLjY1YS44MzYuODM2IDAgMCAxLS4xNzUtLjQ4NGMtLjAxOS0uMi4wMTgtLjQwMi4xMDctLjU4Mi0uMDAyLjAwMSAxLjczMi0uOTUzIDEuNjk3LTMuOTc2LS4wNDYtMS4yMDctLjc3Ni0zLjM1OC0zLjAyNS0zLjM1OGgtLjEyOWMtMi4zNSAwLTIuOTc3IDIuMTUtMy4wMjMgMy4zNTgtLjAzMSAyLjg0NSAxLjY5NyAzLjk3NiAxLjY5NyAzLjk3Ni4xNDIuMTkzLjIxNi40MzIuMjEuNjc2IDAgLjEtLjE2OC4zLS4yNzkuMzktLjk2NC43ODctNC40NDIgMS41NzgtNC42NjcgMy4yNzItLjE3NS43MTktMS4yMDYgMS44NTggMi4yMjQgMi4zMTYgMS4zMTYuMTUyIDIuNjQuMjIgMy45NjQuMjAyIDcuOTU5IDAgNi4zMTItMS41NzEgNi4wOS0yLjQ5LS4yMjMtMS42OTMtMy43MjctMi41MTQtNC42OTItMy4zaC4wMDFaIiBmaWxsPSIjMTY1REZGIi8+PC9nPjwvZz48L3N2Zz4=");
// EXTERNAL MODULE: ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepTwo/AddTags/index.tsx + 2 modules
var AddTags = __webpack_require__(54304);
// EXTERNAL MODULE: ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepTwo/List/index.tsx + 5 modules
var List = __webpack_require__(80216);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__(70215);
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
;// CONCATENATED MODULE: ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepTwo/ProCheckout/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var ProCheckoutmodules = ({"cInput":"cInput___JgrZH","cl":"cl___m_LmD","box":"box___tp7pq","box1":"box1___W8bK6","cr":"cr___Bwgc4"});
// EXTERNAL MODULE: ./node_modules/lodash/lodash.js
var lodash = __webpack_require__(96486);
;// CONCATENATED MODULE: ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepTwo/ProCheckout/index.tsx
var _excluded = ["value", "onChange", "options", "search"];
var CheckboxGroup = es_checkbox/* default.Group */.Z.Group;
var ProCheckout_AddTags = function AddTags(_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? [] : _ref$value,
onChange = _ref.onChange,
options = _ref.options,
search = _ref.search,
props = objectWithoutProperties_default()(_ref, _excluded);
var _React$useState = react.useState(false),
_React$useState2 = slicedToArray_default()(_React$useState, 2),
checkAll = _React$useState2[0],
setCheckAll = _React$useState2[1];
(0,react.useEffect)(function () {
var _options$tag_discipli;
var ids = options === null || options === void 0 ? void 0 : (_options$tag_discipli = options.tag_disciplines) === null || _options$tag_discipli === void 0 ? void 0 : _options$tag_discipli.map(function (e) {
return e.id;
});
var u = value === null || value === void 0 ? void 0 : value.filter(function (e) {
return ids.includes(e);
});
setCheckAll(u.length === (ids === null || ids === void 0 ? void 0 : ids.length));
}, [value]);
var onCheckChange = function onCheckChange(list) {
var _options$tag_discipli2, _options$tag_discipli3;
var ids = options === null || options === void 0 ? void 0 : (_options$tag_discipli2 = options.tag_disciplines) === null || _options$tag_discipli2 === void 0 ? void 0 : _options$tag_discipli2.map(function (e) {
return e.id;
});
var u = value === null || value === void 0 ? void 0 : value.filter(function (e) {
return ids.includes(e);
});
var newList = (0,lodash.uniq)([].concat(toConsumableArray_default()(value), toConsumableArray_default()(list)));
if (u.length > list.length) {
var newLevel = (0,lodash.xor)(u, list);
console.log(newLevel, 'newLevel');
newList = newList.filter(function (e) {
return !newLevel.includes(e);
});
}
onChange(newList);
setCheckAll(list.length === (options === null || options === void 0 ? void 0 : (_options$tag_discipli3 = options.tag_disciplines) === null || _options$tag_discipli3 === void 0 ? void 0 : _options$tag_discipli3.length));
};
var onCheckAllChange = function onCheckAllChange(e) {
var _options$tag_discipli4;
var ids = options === null || options === void 0 ? void 0 : (_options$tag_discipli4 = options.tag_disciplines) === null || _options$tag_discipli4 === void 0 ? void 0 : _options$tag_discipli4.map(function (e) {
return e.id;
});
onChange(e.target.checked ? (0,lodash.uniq)([].concat(toConsumableArray_default()(value), toConsumableArray_default()(ids))) : value === null || value === void 0 ? void 0 : value.filter(function (e) {
return !ids.includes(e);
}));
setCheckAll(e.target.checked);
};
console.log(options, 'options');
var searchOptions = function searchOptions() {
var _item2, _item3;
var item = (options === null || options === void 0 ? void 0 : options.tag_disciplines) || [];
if (search) {
var _item;
item = (_item = item) === null || _item === void 0 ? void 0 : _item.filter(function (e) {
var _e$name;
return e === null || e === void 0 ? void 0 : (_e$name = e.name) === null || _e$name === void 0 ? void 0 : _e$name.includes(search);
});
}
item = (_item2 = item) === null || _item2 === void 0 ? void 0 : _item2.map(function (e) {
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
label: "".concat(e.name, "(".concat(e === null || e === void 0 ? void 0 : e.item_count, ")")),
value: e.id
});
});
item = (_item3 = item) === null || _item3 === void 0 ? void 0 : _item3.filter(function (e) {
return e.item_count !== 0;
});
return item;
};
var get = function get() {
var bool = false;
if (!search) {
bool = true;
} else {
var _options$tag_discipli5;
(_options$tag_discipli5 = options.tag_disciplines) === null || _options$tag_discipli5 === void 0 ? void 0 : _options$tag_discipli5.forEach(function (s) {
if (!bool) {
var _s$name;
bool = ((_s$name = s.name) === null || _s$name === void 0 ? void 0 : _s$name.includes(search)) && s.item_count !== 0;
}
});
}
return bool;
};
if ((options === null || options === void 0 ? void 0 : options.item_count) === 0 || !get()) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {});
}
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: ProCheckoutmodules.cInput,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: ProCheckoutmodules.cl,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
checked: checkAll,
onChange: onCheckAllChange,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: ProCheckoutmodules.box,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "font14 c-light-primary",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
title: options === null || options === void 0 ? void 0 : options.name,
className: ProCheckoutmodules.box1,
children: [" ", options === null || options === void 0 ? void 0 : options.name]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: [" ", "(".concat(options === null || options === void 0 ? void 0 : options.item_count, ")")]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-lujing font12 ml5"
})]
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: ProCheckoutmodules.cr,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(CheckboxGroup, {
options: searchOptions(),
value: value,
onChange: onCheckChange
})
})]
});
};
/* harmony default export */ var ProCheckout = (ProCheckout_AddTags);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__(84519);
// EXTERNAL MODULE: ./node_modules/antd/es/tree/style/index.js + 1 modules
var tree_style = __webpack_require__(62216);
// EXTERNAL MODULE: ./node_modules/antd/es/tree/index.js + 9 modules
var tree = __webpack_require__(54205);
;// CONCATENATED MODULE: ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepTwo/CustomTree/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var CustomTreemodules = ({"flex_box_center":"flex_box_center___Quckf","flex_space_between":"flex_space_between___lLGs0","flex_box_vertical_center":"flex_box_vertical_center___C3unY","flex_box_center_end":"flex_box_center_end___xS7F9","flex_box_column":"flex_box_column___tLZ8U","customTree":"customTree___NuOQ7","name":"name___un7cz"});
;// CONCATENATED MODULE: ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepTwo/CustomTree/index.tsx
var CustomTree_excluded = ["value", "onChange", "defaultValue", "treeData"];
var CustomTree = function CustomTree(_ref) {
var value = _ref.value,
onChange = _ref.onChange,
defaultValue = _ref.defaultValue,
_ref$treeData = _ref.treeData,
treeData = _ref$treeData === void 0 ? [] : _ref$treeData,
props = objectWithoutProperties_default()(_ref, CustomTree_excluded);
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: CustomTreemodules.customTree,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tree/* default */.Z, objectSpread2_default()({
multiple: true,
showIcon: true,
selectedKeys: value,
defaultExpandedKeys: defaultValue,
treeData: treeData,
onSelect: onChange
}, props))
});
};
/* harmony default export */ var StepTwo_CustomTree = (CustomTree);
// EXTERNAL MODULE: ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepPreview/index.tsx + 10 modules
var StepPreview = __webpack_require__(59992);
;// CONCATENATED MODULE: ./src/pages/Paperlibrary/Random/AddAndEdit/components/StepTwo/index.tsx
var Search = input/* default.Search */.Z.Search;
var Page = function Page(_ref) {
var _disciplines$find;
var formValue = _ref.formValue,
setFatherTabs = _ref.setFatherTabs,
tabs = _ref.tabs,
editData = _ref.editData,
dispatch = _ref.dispatch;
var editId = (0,_umi_production_exports.useParams)().id;
var _useState = (0,react.useState)(['mine']),
_useState2 = slicedToArray_default()(_useState, 2),
source = _useState2[0],
setSource = _useState2[1]; //mine,public,teach_groups
var _useState3 = (0,react.useState)(true),
_useState4 = slicedToArray_default()(_useState3, 2),
loading = _useState4[0],
setLoading = _useState4[1];
var _useState5 = (0,react.useState)(false),
_useState6 = slicedToArray_default()(_useState5, 2),
Sloading = _useState6[0],
setSLoading = _useState6[1];
var _useState7 = (0,react.useState)(false),
_useState8 = slicedToArray_default()(_useState7, 2),
Ploading = _useState8[0],
setPLoading = _useState8[1];
//考试范围
var _useState9 = (0,react.useState)(''),
_useState10 = slicedToArray_default()(_useState9, 2),
inputValue = _useState10[0],
setInputValue = _useState10[1];
var _useState11 = (0,react.useState)(false),
_useState12 = slicedToArray_default()(_useState11, 2),
modalVisible = _useState12[0],
setModalVisible = _useState12[1];
var _useState13 = (0,react.useState)(false),
_useState14 = slicedToArray_default()(_useState13, 2),
preview = _useState14[0],
setPreview = _useState14[1];
var _useState15 = (0,react.useState)({}),
_useState16 = slicedToArray_default()(_useState15, 2),
previewData = _useState16[0],
setPreviewData = _useState16[1];
var _useState17 = (0,react.useState)([]),
_useState18 = slicedToArray_default()(_useState17, 2),
listData = _useState18[0],
setListData = _useState18[1];
var _useState19 = (0,react.useState)([]),
_useState20 = slicedToArray_default()(_useState19, 2),
disciplines = _useState20[0],
setDisciplines = _useState20[1];
var _useState21 = (0,react.useState)([]),
_useState22 = slicedToArray_default()(_useState21, 2),
tagDisciplines = _useState22[0],
setTagDisciplines = _useState22[1];
var _useState23 = (0,react.useState)([]),
_useState24 = slicedToArray_default()(_useState23, 2),
disciplinesValue = _useState24[0],
setDisciplinesValue = _useState24[1];
var _useState25 = (0,react.useState)(null),
_useState26 = slicedToArray_default()(_useState25, 2),
disciplinesKey = _useState26[0],
setDisciplinesKey = _useState26[1];
var disciplinesValueRef = (0,react.useRef)([]);
//文件夹
var _useState27 = (0,react.useState)(false),
_useState28 = slicedToArray_default()(_useState27, 2),
folderVisible = _useState28[0],
setFolderVisible = _useState28[1];
var _useState29 = (0,react.useState)([]),
_useState30 = slicedToArray_default()(_useState29, 2),
folderValue = _useState30[0],
setFolderValue = _useState30[1];
var _useState31 = (0,react.useState)([0]),
_useState32 = slicedToArray_default()(_useState31, 2),
defaultValue = _useState32[0],
setDefaultValue = _useState32[1];
var _useState33 = (0,react.useState)([]),
_useState34 = slicedToArray_default()(_useState33, 2),
selectedNodes = _useState34[0],
setSelectedNodes = _useState34[1];
var folderValueRef = (0,react.useRef)([]);
//教研共享
var _useState35 = (0,react.useState)(false),
_useState36 = slicedToArray_default()(_useState35, 2),
teachVisible = _useState36[0],
setTeachVisible = _useState36[1];
var _useState37 = (0,react.useState)([]),
_useState38 = slicedToArray_default()(_useState37, 2),
teachValue = _useState38[0],
setTeachValue = _useState38[1];
var _useState39 = (0,react.useState)([]),
_useState40 = slicedToArray_default()(_useState39, 2),
teachData = _useState40[0],
setTeachValueData = _useState40[1];
var teachValueRef = (0,react.useRef)([]);
var _useState41 = (0,react.useState)([]),
_useState42 = slicedToArray_default()(_useState41, 2),
treeData = _useState42[0],
setTreeData = _useState42[1];
var _useState43 = (0,react.useState)(false),
_useState44 = slicedToArray_default()(_useState43, 2),
treeVisible = _useState44[0],
setTreeVisible = _useState44[1];
var signData = (0,react.useRef)([]);
//获取选中状态
var _useState45 = (0,react.useState)(0),
_useState46 = slicedToArray_default()(_useState45, 2),
selectcount = _useState46[0],
setSelectcount = _useState46[1];
//渲染文件夹框内容
var folder = selectedNodes === null || selectedNodes === void 0 ? void 0 : selectedNodes.filter(function (e) {
return folderValue === null || folderValue === void 0 ? void 0 : folderValue.includes(e.id);
});
//渲染教研共享内容
var teach = teachData === null || teachData === void 0 ? void 0 : teachData.filter(function (e) {
return teachValue === null || teachValue === void 0 ? void 0 : teachValue.includes(e.id);
});
(0,react.useEffect)(function () {
getTreeData();
}, []);
//出现页面右侧悬浮按钮
(0,react.useEffect)(function () {
if (tabs === 1) {
dispatch({
type: 'globalSetting/onlyShowBackTopToggle',
payload: false
});
dispatch({
type: 'globalSetting/onlyShowBackTopIconToggle',
payload: false
});
}
return function () {
dispatch({
type: 'globalSetting/onlyShowBackTopToggle',
payload: true
});
dispatch({
type: 'globalSetting/onlyShowBackTopIconToggle',
payload: true
});
};
}, [tabs]);
(0,react.useEffect)(function () {
if (!editId) {
getDisciplines(source);
getTeachGroup();
setLoading(false);
} else {
if (editData) {
getEditData();
}
}
}, [editData]);
(0,react.useEffect)(function () {
if (inputValue) {
filterKey();
}
}, [inputValue]);
var filterKey = function filterKey() {
var dKey = null;
disciplines === null || disciplines === void 0 ? void 0 : disciplines.forEach(function (e) {
var _e$sub_disciplines;
(_e$sub_disciplines = e.sub_disciplines) === null || _e$sub_disciplines === void 0 ? void 0 : _e$sub_disciplines.forEach(function (k) {
var _k$tag_disciplines;
(_k$tag_disciplines = k.tag_disciplines) === null || _k$tag_disciplines === void 0 ? void 0 : _k$tag_disciplines.forEach(function (s) {
var _s$name;
var bool = ((_s$name = s.name) === null || _s$name === void 0 ? void 0 : _s$name.includes(inputValue)) && s.item_count !== 0;
if (bool && !dKey) {
dKey = e.id;
}
});
});
});
if (dKey) {
setDisciplinesKey(dKey);
}
};
var transformTreeKey = function transformTreeKey(items) {
function mapTree(org) {
var realChildren = org.children;
var haveChildren = Array.isArray(realChildren) && realChildren.length > 0;
var key = org === null || org === void 0 ? void 0 : org.group_id;
signData.current.push({
name: org === null || org === void 0 ? void 0 : org.name,
id: key,
count: org === null || org === void 0 ? void 0 : org.count
});
return {
//分别将我们查询出来的值做出改变他的key
title: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
title: org === null || org === void 0 ? void 0 : org.name,
className: StepTwomodules.name,
children: org === null || org === void 0 ? void 0 : org.name
}),
value: key,
name: org === null || org === void 0 ? void 0 : org.name,
key: key,
count: org === null || org === void 0 ? void 0 : org.count,
id: key,
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-wenjianjia2 c-light-primary mr10",
style: {
lineHeight: '19px'
}
}),
//判断它是否存在子集,若果存在就进行再次进行遍历操作,知道不存在子集便对其他的元素进行操作
children: haveChildren ? realChildren === null || realChildren === void 0 ? void 0 : realChildren.map(function (e) {
return mapTree(e);
}) : []
};
}
return items === null || items === void 0 ? void 0 : items.map(function (org) {
return mapTree(org);
});
};
var getTreeData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var res, item;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0,problemset/* getPaperList */.NZ)({});
case 2:
res = _context.sent;
console.log(res, "res");
signData.current = [{
id: 0,
name: '根目录',
count: res === null || res === void 0 ? void 0 : res.root_count
}];
if (res !== null && res !== void 0 && res.data) {
item = [{
title: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
title: '根目录',
className: StepTwomodules.name,
children: "\u6839\u76EE\u5F55"
}),
value: 0,
id: 0,
key: 0,
count: res === null || res === void 0 ? void 0 : res.root_count,
name: '根目录',
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-wenjianjia2 c-light-primary mr10",
style: {
lineHeight: '19px'
}
}),
children: transformTreeKey(res.data || [])
}];
setSelectedNodes(signData.current);
setTreeData(item);
}
case 6:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getTreeData() {
return _ref2.apply(this, arguments);
};
}();
var getEditData = /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
var _editData$tag_discipl, _editData$groups, _editData$examination, _list, _list2, _editData$sort_by_ite, _editData$examination2, _editData$examination3, _editData$groups2;
var tag_discipline_ids, group_ids, body, res, list, param, panel, score_num_item, sortList;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
tag_discipline_ids = editData === null || editData === void 0 ? void 0 : (_editData$tag_discipl = editData.tag_disciplines) === null || _editData$tag_discipl === void 0 ? void 0 : _editData$tag_discipl.map(function (e) {
return e.tag_discipline_id;
});
group_ids = editData === null || editData === void 0 ? void 0 : (_editData$groups = editData.groups) === null || _editData$groups === void 0 ? void 0 : _editData$groups.map(function (e) {
return e.id;
});
body = {
source: editData === null || editData === void 0 ? void 0 : (_editData$examination = editData.examination_bank) === null || _editData$examination === void 0 ? void 0 : _editData$examination.source,
group_ids: group_ids,
tag_discipline_ids: tag_discipline_ids,
teach_group_ids: editData === null || editData === void 0 ? void 0 : editData.teach_group_ids
};
_context2.next = 5;
return (0,fetch/* default */.ZP)('/api/examination_intelligent_settings/form_paper.json', {
method: 'post',
body: body
});
case 5:
res = _context2.sent;
if (!((res === null || res === void 0 ? void 0 : res.status) === -1)) {
_context2.next = 8;
break;
}
return _context2.abrupt("return");
case 8:
list = res === null || res === void 0 ? void 0 : res.filter(function (e) {
var _e$item_banks;
return !!(e !== null && e !== void 0 && (_e$item_banks = e.item_banks) !== null && _e$item_banks !== void 0 && _e$item_banks.length);
});
list = list.map(function (e) {
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
scoreTotal: 0,
score: 0,
questionTotal: 0
});
});
list = (_list = list) === null || _list === void 0 ? void 0 : _list.map(function (k, index) {
var _editData$score_setti, _editData$score_setti2, _k$item_banks;
return objectSpread2_default()(objectSpread2_default()({}, k), {}, {
score: (editData === null || editData === void 0 ? void 0 : (_editData$score_setti = editData.score_settings) === null || _editData$score_setti === void 0 ? void 0 : (_editData$score_setti2 = _editData$score_setti.find(function (r) {
return r.item_type === (k === null || k === void 0 ? void 0 : k.item_type);
})) === null || _editData$score_setti2 === void 0 ? void 0 : _editData$score_setti2.score) || 0,
item_banks: k === null || k === void 0 ? void 0 : (_k$item_banks = k.item_banks) === null || _k$item_banks === void 0 ? void 0 : _k$item_banks.map(function (e) {
var _e$tag_disciplines;
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
tag_disciplines: e === null || e === void 0 ? void 0 : (_e$tag_disciplines = e.tag_disciplines) === null || _e$tag_disciplines === void 0 ? void 0 : _e$tag_disciplines.map(function (r) {
var _r$difficulties;
return objectSpread2_default()(objectSpread2_default()({}, r), {}, {
difficulties: r === null || r === void 0 ? void 0 : (_r$difficulties = r.difficulties) === null || _r$difficulties === void 0 ? void 0 : _r$difficulties.map(function (s) {
var boolParam = editData === null || editData === void 0 ? void 0 : editData.contents.find(function (v) {
return v.item_type === k.item_type && v.sub_discipline_id === e.sub_discipline_id && v.tag_discipline_id === r.tag_discipline_id && v.difficulty === s.difficulty;
});
if (boolParam) {
return objectSpread2_default()(objectSpread2_default()({}, s), {}, {
num: boolParam === null || boolParam === void 0 ? void 0 : boolParam.quanlity
});
}
return objectSpread2_default()({}, s);
})
});
})
});
})
});
});
param = calculate(list);
panel = param.panel, score_num_item = param.score_num_item;
list = (_list2 = list) === null || _list2 === void 0 ? void 0 : _list2.map(function (e, i) {
var _panel$i;
var questionTotal = (panel === null || panel === void 0 ? void 0 : (_panel$i = panel[i]) === null || _panel$i === void 0 ? void 0 : _panel$i.reduce(function (a, b) {
return a + b;
}, 0)) || 0;
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
scoreTotal: questionTotal * (score_num_item[i] || 0),
questionTotal: questionTotal
});
});
sortList = [];
editData === null || editData === void 0 ? void 0 : (_editData$sort_by_ite = editData.sort_by_item_type) === null || _editData$sort_by_ite === void 0 ? void 0 : _editData$sort_by_ite.forEach(function (e) {
var param = list.find(function (k) {
var _questionData$find;
var name = (_questionData$find = questionData.find(function (r) {
return r.type === (k === null || k === void 0 ? void 0 : k.item_type);
})) === null || _questionData$find === void 0 ? void 0 : _questionData$find.name;
return name === e;
});
sortList.push(param);
});
sortList = (0,lodash.compact)(sortList);
getDisciplines(editData === null || editData === void 0 ? void 0 : (_editData$examination2 = editData.examination_bank) === null || _editData$examination2 === void 0 ? void 0 : _editData$examination2.source);
getTeachGroup();
setSource(editData === null || editData === void 0 ? void 0 : (_editData$examination3 = editData.examination_bank) === null || _editData$examination3 === void 0 ? void 0 : _editData$examination3.source);
setDisciplinesValue(tag_discipline_ids);
disciplinesValueRef.current = tag_discipline_ids;
setFolderValue(group_ids);
setTeachValue((editData === null || editData === void 0 ? void 0 : editData.teach_group_ids) || []);
setSelectcount(editData === null || editData === void 0 ? void 0 : (_editData$groups2 = editData.groups) === null || _editData$groups2 === void 0 ? void 0 : _editData$groups2.map(function (e) {
return e.count;
}).reduce(function (current, next) {
return current + next;
}, 0));
folderValueRef.current = group_ids;
setDefaultValue(group_ids !== null && group_ids !== void 0 && group_ids.length ? group_ids : [0]);
setListData((0,lodash.cloneDeep)(sortList));
setLoading(false);
case 29:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function getEditData() {
return _ref3.apply(this, arguments);
};
}();
var handleOk = /*#__PURE__*/function () {
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
var body;
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
body = {
source: source,
group_ids: folderValue,
tag_discipline_ids: disciplinesValue,
teach_group_ids: teachValue
};
getList(body);
disciplinesValueRef.current = disciplinesValue;
setModalVisible(false);
case 4:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return function handleOk() {
return _ref4.apply(this, arguments);
};
}();
var getDisciplines = /*#__PURE__*/function () {
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(pub) {
var _res$disciplines, _res$disciplines2;
var res, list, key, new_disciplines;
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return (0,fetch/* default */.ZP)('/api/disciplines.json', {
method: 'get',
params: {
source: "question",
question_source: pub
}
});
case 2:
res = _context4.sent;
list = [];
res === null || res === void 0 ? void 0 : (_res$disciplines = res.disciplines) === null || _res$disciplines === void 0 ? void 0 : _res$disciplines.forEach(function (e) {
var _e$sub_disciplines2;
e === null || e === void 0 ? void 0 : (_e$sub_disciplines2 = e.sub_disciplines) === null || _e$sub_disciplines2 === void 0 ? void 0 : _e$sub_disciplines2.forEach(function (r) {
list = list.concat((r === null || r === void 0 ? void 0 : r.tag_disciplines) || []);
});
});
key = null;
new_disciplines = res === null || res === void 0 ? void 0 : (_res$disciplines2 = res.disciplines) === null || _res$disciplines2 === void 0 ? void 0 : _res$disciplines2.map(function (e) {
var _e$sub_disciplines3;
var num = e === null || e === void 0 ? void 0 : (_e$sub_disciplines3 = e.sub_disciplines) === null || _e$sub_disciplines3 === void 0 ? void 0 : _e$sub_disciplines3.reduce(function (a, b) {
return a + b.item_count;
}, 0);
if (!key && num !== 0) {
key = e.id;
}
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
item_count: num
});
});
console.log(new_disciplines, 48767874);
setDisciplines(new_disciplines);
setTagDisciplines(list);
setDisciplinesKey(key);
case 11:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return function getDisciplines(_x) {
return _ref5.apply(this, arguments);
};
}();
var getTeachGroup = /*#__PURE__*/function () {
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
var res;
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return (0,fetch/* default */.ZP)('/api/teach_groups.json', {
method: 'get',
params: {
is_random_exam: true
}
});
case 2:
res = _context5.sent;
setTeachValueData((res === null || res === void 0 ? void 0 : res.groups) || []);
case 4:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return function getTeachGroup() {
return _ref6.apply(this, arguments);
};
}();
var getList = /*#__PURE__*/function () {
var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6(body) {
var res, list;
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
setLoading(true);
_context6.next = 3;
return (0,fetch/* default */.ZP)('/api/examination_intelligent_settings/form_paper.json', {
method: 'post',
body: body
});
case 3:
res = _context6.sent;
list = res === null || res === void 0 ? void 0 : res.filter(function (e) {
var _e$item_banks2;
return !!(e !== null && e !== void 0 && (_e$item_banks2 = e.item_banks) !== null && _e$item_banks2 !== void 0 && _e$item_banks2.length);
}); // scoreTotal 题型总分
// questionTotal 题型总数
list = list.map(function (e) {
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
scoreTotal: 0,
score: 0,
questionTotal: 0
});
});
setListData(list);
setLoading(false);
case 8:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return function getList(_x2) {
return _ref7.apply(this, arguments);
};
}();
var handleCancel = function handleCancel() {
setDisciplinesValue(disciplinesValueRef.current);
setModalVisible(false);
setInputValue('');
};
var handleCheckout = function handleCheckout(v) {
setDisciplinesValue(v);
};
var dealList = function dealList() {
var subDisciplinesList = tagDisciplines === null || tagDisciplines === void 0 ? void 0 : tagDisciplines.filter(function (e) {
return disciplinesValue === null || disciplinesValue === void 0 ? void 0 : disciplinesValue.includes(e.id);
});
var list = toConsumableArray_default()(subDisciplinesList),
flag = 0,
data = [];
for (var i = 0; i < list.length; i++) {
var az = '';
for (var j = 0; j < data.length; j++) {
if (data[j][0].parent_name == list[i].parent_name) {
flag = 1;
az = j;
break;
}
}
if (flag == 1) {
data[az].push(list[i]);
flag = 0;
} else if (flag == 0) {
var wdy = new Array();
wdy.push(list[i]);
data.push(wdy);
}
}
return data;
};
var handleChange = function handleChange(e, i) {
var _param$panel, _param$panel$;
var newValue = (0,lodash.cloneDeep)(listData);
newValue[i] = e;
var param = calculate([newValue[i]]);
var sum = param === null || param === void 0 ? void 0 : (_param$panel = param.panel) === null || _param$panel === void 0 ? void 0 : (_param$panel$ = _param$panel[0]) === null || _param$panel$ === void 0 ? void 0 : _param$panel$.reduce(function (a, b) {
return a + b;
}, 0);
newValue[i].questionTotal = sum;
setListData(newValue);
var dom = document.getElementsByClassName('customError');
if (!!dom.length) dom === null || dom === void 0 ? void 0 : dom.forEach(function (e) {
var _e$classList;
e === null || e === void 0 ? void 0 : (_e$classList = e.classList) === null || _e$classList === void 0 ? void 0 : _e$classList.remove("customError");
});
};
var calculate = function calculate(list) {
var item = {
contents: [],
panel: [],
score_num_item: [],
//每题多少分集合
score_total: [],
error_tips: []
};
list === null || list === void 0 ? void 0 : list.forEach(function (k, index) {
var _item$error_tips, _questionData$find2, _k$item_banks2;
item.panel.push([]);
item.score_num_item.push(k === null || k === void 0 ? void 0 : k.score);
item.score_total.push(k === null || k === void 0 ? void 0 : k.scoreTotal);
(_item$error_tips = item.error_tips) === null || _item$error_tips === void 0 ? void 0 : _item$error_tips.push({
name: (_questionData$find2 = questionData.find(function (l) {
return l.type === (k === null || k === void 0 ? void 0 : k.item_type);
})) === null || _questionData$find2 === void 0 ? void 0 : _questionData$find2.name,
score: (k === null || k === void 0 ? void 0 : k.score) || 0,
scoreTotal: k === null || k === void 0 ? void 0 : k.scoreTotal,
item_type: k === null || k === void 0 ? void 0 : k.item_type
});
k === null || k === void 0 ? void 0 : (_k$item_banks2 = k.item_banks) === null || _k$item_banks2 === void 0 ? void 0 : _k$item_banks2.forEach(function (e) {
var _e$tag_disciplines2;
e === null || e === void 0 ? void 0 : (_e$tag_disciplines2 = e.tag_disciplines) === null || _e$tag_disciplines2 === void 0 ? void 0 : _e$tag_disciplines2.forEach(function (r) {
var _r$difficulties2;
r === null || r === void 0 ? void 0 : (_r$difficulties2 = r.difficulties) === null || _r$difficulties2 === void 0 ? void 0 : _r$difficulties2.forEach(function (s) {
if (s.num) {
item.panel[index].push(s.num);
item.contents.push({
difficulty: s.difficulty,
item_type: k.item_type,
items_count: s.num,
sub_discipline_id: e.sub_discipline_id,
tag_discipline_id: r.tag_discipline_id
});
}
});
});
});
});
return item;
};
var handleSubmit = /*#__PURE__*/function () {
var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7(record) {
var new_score_settings, new_sort_by_item_type, param, i, _param$panel2, _param$panel2$i, sum, _param$error_tips$i, dom, _param$error_tips$i2, _dom, _param$error_tips$i3, _param$error_tips$i4, body, newBody, _res, res;
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
if (!(!folderValue.length && !disciplinesValue.length && !teachValue.length)) {
_context7.next = 3;
break;
}
message/* default.warn */.ZP.warn('必须选择考察范围或试题文件夹或教研团队的其中一项');
return _context7.abrupt("return");
case 3:
new_score_settings = [];
new_sort_by_item_type = [];
param = calculate(listData);
i = 0;
case 7:
if (!(i < param.error_tips.length)) {
_context7.next = 23;
break;
}
sum = param === null || param === void 0 ? void 0 : (_param$panel2 = param.panel) === null || _param$panel2 === void 0 ? void 0 : (_param$panel2$i = _param$panel2[i]) === null || _param$panel2$i === void 0 ? void 0 : _param$panel2$i.reduce(function (a, b) {
return a + b;
}, 0);
if (!(param.error_tips[i].score === 0 && sum !== 0)) {
_context7.next = 14;
break;
}
dom = document.getElementById("".concat((_param$error_tips$i = param.error_tips[i]) === null || _param$error_tips$i === void 0 ? void 0 : _param$error_tips$i.item_type, "_score"));
dom.classList.add("customError");
dom.scrollIntoView({
block: "start",
behavior: "smooth"
});
return _context7.abrupt("return");
case 14:
if (!(param.error_tips[i].score !== 0 && sum === 0)) {
_context7.next = 19;
break;
}
_dom = document.getElementById("".concat((_param$error_tips$i2 = param.error_tips[i]) === null || _param$error_tips$i2 === void 0 ? void 0 : _param$error_tips$i2.item_type, "_sum"));
_dom.classList.add("customError");
_dom.scrollIntoView({
block: "start",
behavior: "smooth"
});
return _context7.abrupt("return");
case 19:
if (param.error_tips[i].score !== 0 && sum !== 0) {
new_score_settings === null || new_score_settings === void 0 ? void 0 : new_score_settings.push({
item_type: (_param$error_tips$i3 = param.error_tips[i]) === null || _param$error_tips$i3 === void 0 ? void 0 : _param$error_tips$i3.item_type,
score: ((_param$error_tips$i4 = param.error_tips[i]) === null || _param$error_tips$i4 === void 0 ? void 0 : _param$error_tips$i4.score) || 0
});
new_sort_by_item_type.push(param.error_tips[i].name);
}
case 20:
i++;
_context7.next = 7;
break;
case 23:
if (!(new_score_settings.length === 0)) {
_context7.next = 26;
break;
}
message/* default.warn */.ZP.warn('不允许每个题型的总分和抽题数量都为0');
return _context7.abrupt("return");
case 26:
setSLoading(true);
body = objectSpread2_default()({
contents: param.contents,
group_ids: folderValue,
teach_group_ids: teachValue,
score_settings: new_score_settings,
source: source,
sub_discipline_id: 0,
sort_by_item_type: new_sort_by_item_type,
tag_discipline_ids: disciplinesValue
}, formValue);
if (!record) {
_context7.next = 36;
break;
}
newBody = objectSpread2_default()(objectSpread2_default()({}, body), record);
_context7.next = 32;
return (0,fetch/* default */.ZP)("/api/examination_banks/save_question_list.json", {
method: "post",
body: newBody
});
case 32:
_res = _context7.sent;
if (_res.status === 0) {
message/* default.success */.ZP.success("保存成功");
// history.push("/paperlibrary");
}
setSLoading(false);
return _context7.abrupt("return");
case 36:
res = {};
if (!editData) {
_context7.next = 43;
break;
}
_context7.next = 40;
return (0,fetch/* default */.ZP)("/api/examination_banks/".concat(editData === null || editData === void 0 ? void 0 : editData.id, "/update_random_exam.json"), {
method: 'post',
body: body
});
case 40:
res = _context7.sent;
_context7.next = 46;
break;
case 43:
_context7.next = 45;
return (0,fetch/* default */.ZP)('/api/examination_banks/create_random_exam.json', {
method: 'post',
body: body
});
case 45:
res = _context7.sent;
case 46:
if (res.status === 0) {
message/* default.success */.ZP.success("操作成功");
_umi_production_exports.history.push("/paperlibrary?defaultActiveKey=0");
}
setSLoading(false);
case 48:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return function handleSubmit(_x3) {
return _ref8.apply(this, arguments);
};
}();
var handlePreview = /*#__PURE__*/function () {
var _ref9 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8(record, other) {
var new_score_settings, new_sort_by_item_type, param, i, _param$panel3, _param$panel3$i, sum, _param$error_tips$i5, dom, _param$error_tips$i6, _dom2, _param$error_tips$i7, _param$error_tips$i8, body, _res2, _clonePreviewData$que, clonePreviewData, _res3, _clonePreviewData$que2, _clonePreviewData, res, paperData, sortList;
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
if (!(!folderValue.length && !disciplinesValue.length && !teachValue.length)) {
_context8.next = 3;
break;
}
message/* default.warn */.ZP.warn('必须选择考察范围或试题文件夹或教研团队的其中一项');
return _context8.abrupt("return");
case 3:
new_score_settings = [];
new_sort_by_item_type = [];
param = calculate(listData);
i = 0;
case 7:
if (!(i < param.error_tips.length)) {
_context8.next = 23;
break;
}
sum = param === null || param === void 0 ? void 0 : (_param$panel3 = param.panel) === null || _param$panel3 === void 0 ? void 0 : (_param$panel3$i = _param$panel3[i]) === null || _param$panel3$i === void 0 ? void 0 : _param$panel3$i.reduce(function (a, b) {
return a + b;
}, 0);
if (!(param.error_tips[i].score === 0 && sum !== 0)) {
_context8.next = 14;
break;
}
dom = document.getElementById("".concat((_param$error_tips$i5 = param.error_tips[i]) === null || _param$error_tips$i5 === void 0 ? void 0 : _param$error_tips$i5.item_type, "_score"));
dom.classList.add("customError");
dom.scrollIntoView({
block: "start",
behavior: "smooth"
});
return _context8.abrupt("return");
case 14:
if (!(param.error_tips[i].score !== 0 && sum === 0)) {
_context8.next = 19;
break;
}
_dom2 = document.getElementById("".concat((_param$error_tips$i6 = param.error_tips[i]) === null || _param$error_tips$i6 === void 0 ? void 0 : _param$error_tips$i6.item_type, "_sum"));
_dom2.classList.add("customError");
_dom2.scrollIntoView({
block: "start",
behavior: "smooth"
});
return _context8.abrupt("return");
case 19:
if (param.error_tips[i].score !== 0 && sum !== 0) {
new_score_settings === null || new_score_settings === void 0 ? void 0 : new_score_settings.push({
item_type: (_param$error_tips$i7 = param.error_tips[i]) === null || _param$error_tips$i7 === void 0 ? void 0 : _param$error_tips$i7.item_type,
score: ((_param$error_tips$i8 = param.error_tips[i]) === null || _param$error_tips$i8 === void 0 ? void 0 : _param$error_tips$i8.score) || 0
});
new_sort_by_item_type.push(param.error_tips[i].name);
}
case 20:
i++;
_context8.next = 7;
break;
case 23:
if (!(new_score_settings.length === 0)) {
_context8.next = 26;
break;
}
message/* default.warn */.ZP.warn('不允许每个题型的总分和抽题数量都为0');
return _context8.abrupt("return");
case 26:
setPLoading(true);
body = objectSpread2_default()({
contents: param.contents,
group_ids: folderValue,
teach_group_ids: teachValue,
score_settings: new_score_settings,
sort_by_item_type: new_sort_by_item_type,
tag_discipline_ids: disciplinesValue,
source: source,
sub_discipline_id: 0
}, formValue);
if (!(record !== undefined && !(record !== null && record !== void 0 && record.single_question_id))) {
_context8.next = 36;
break;
}
body.seleted_item_bank_ids = record === null || record === void 0 ? void 0 : record.seleted_item_bank_ids;
_context8.next = 32;
return (0,fetch/* default */.ZP)('/api/examination_banks/toggle_random_questions.json', {
method: 'post',
body: body
});
case 32:
_res2 = _context8.sent;
if (_res2 !== null && _res2 !== void 0 && _res2.questions) {
clonePreviewData = (0,lodash.cloneDeep)(previewData);
clonePreviewData.questionList = clonePreviewData === null || clonePreviewData === void 0 ? void 0 : (_clonePreviewData$que = clonePreviewData.questionList) === null || _clonePreviewData$que === void 0 ? void 0 : _clonePreviewData$que.map(function (e) {
if (e.type === other.type) {
var _res2$questions;
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
questions: (_res2 === null || _res2 === void 0 ? void 0 : (_res2$questions = _res2.questions) === null || _res2$questions === void 0 ? void 0 : _res2$questions.questions) || []
});
}
return e;
});
setPreviewData(clonePreviewData);
}
setPLoading(false);
return _context8.abrupt("return");
case 36:
if (!(record !== undefined && record !== null && record !== void 0 && record.single_question_id)) {
_context8.next = 45;
break;
}
body.seleted_item_bank_ids = record === null || record === void 0 ? void 0 : record.seleted_item_bank_ids;
body.single_question_id = record === null || record === void 0 ? void 0 : record.single_question_id;
_context8.next = 41;
return (0,fetch/* default */.ZP)('/api/examination_banks/toggle_random_questions.json', {
method: 'post',
body: body
});
case 41:
_res3 = _context8.sent;
if (_res3) {
_clonePreviewData = (0,lodash.cloneDeep)(previewData);
_clonePreviewData.questionList = _clonePreviewData === null || _clonePreviewData === void 0 ? void 0 : (_clonePreviewData$que2 = _clonePreviewData.questionList) === null || _clonePreviewData$que2 === void 0 ? void 0 : _clonePreviewData$que2.map(function (e) {
if (e.type === other.type) {
var _res3$questions, _res3$questions$quest;
var new_questions = (0,lodash.cloneDeep)(e === null || e === void 0 ? void 0 : e.questions);
new_questions.splice(other.index, 1, _res3 === null || _res3 === void 0 ? void 0 : (_res3$questions = _res3.questions) === null || _res3$questions === void 0 ? void 0 : (_res3$questions$quest = _res3$questions.questions) === null || _res3$questions$quest === void 0 ? void 0 : _res3$questions$quest[0]);
console.log(e === null || e === void 0 ? void 0 : e.questions, new_questions, other.index, 'new_questions');
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
questions: new_questions
});
}
return e;
});
setPreviewData(_clonePreviewData);
}
setPLoading(false);
return _context8.abrupt("return");
case 45:
_context8.next = 47;
return (0,fetch/* default */.ZP)('/api/examination_banks/preview_random_questions.json', {
method: 'post',
body: body
});
case 47:
res = _context8.sent;
if (res.exam) {
paperData = formatPaperData(res);
sortList = [];
new_sort_by_item_type === null || new_sort_by_item_type === void 0 ? void 0 : new_sort_by_item_type.forEach(function (e) {
var _paperData$questionLi;
var param = paperData === null || paperData === void 0 ? void 0 : (_paperData$questionLi = paperData.questionList) === null || _paperData$questionLi === void 0 ? void 0 : _paperData$questionLi.find(function (k) {
var _questionData$find3;
var name = (_questionData$find3 = questionData.find(function (r) {
return r.type === (k === null || k === void 0 ? void 0 : k.type);
})) === null || _questionData$find3 === void 0 ? void 0 : _questionData$find3.name;
return name === e;
});
sortList.push(param);
});
sortList = (0,lodash.compact)(sortList);
paperData.questionList = sortList;
setPreviewData(objectSpread2_default()({}, paperData));
console.log(JSON.stringify(paperData));
setPreview(true);
document.body.scrollIntoView();
}
setPLoading(false);
case 50:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return function handlePreview(_x4, _x5) {
return _ref9.apply(this, arguments);
};
}();
var questionData = [{
type: 'SINGLE',
name: '单选题'
}, {
type: 'MULTIPLE',
name: '多选题'
}, {
type: 'COMPLETION',
name: '填空题'
}, {
type: 'JUDGMENT',
name: '判断题'
}, {
type: 'SUBJECTIVE',
name: '简答题'
}, {
type: 'PROGRAM',
name: '编程题'
}, {
type: 'PRACTICAL',
name: '实训题'
}, {
type: 'COMBINATION',
name: '组合题'
}];
var renderTotal = function renderTotal() {
var param = calculate(listData);
var panel = param.panel,
score_total = param.score_total;
score_total = score_total.reduce(function (a, b) {
return a + b;
}, 0);
panel = (0,lodash.flatten)(panel).reduce(function (a, b) {
return a + b;
}, 0);
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.total,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: xixi/* default */.Z
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u9898\u6570(\u9053)"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
children: panel
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: bi/* default */.Z
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u603B\u5206(\u5206)"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
children: score_total
})]
})]
});
};
var swapItems = function swapItems(arr, index1, index2) {
arr[index1] = arr.splice(index2, 1, arr[index1])[0];
return arr;
};
var upData = function upData(index) {
var newArr = [];
var arr = (0,lodash.cloneDeep)(listData);
if (arr.length > 1 && index !== 0) {
newArr = swapItems(arr, index, index - 1);
}
setListData(newArr);
};
var downData = function downData(index) {
var newArr = [];
var arr = (0,lodash.cloneDeep)(listData);
if (arr.length > 1 && index !== arr.length - 1) {
newArr = swapItems(arr, index, index + 1);
}
setListData(newArr);
};
var handleSource = /*#__PURE__*/function () {
var _ref10 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9(n) {
var _item, _item2;
var item, body;
return regeneratorRuntime_default()().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
item = toConsumableArray_default()(source);
if (source.includes(n)) {
item = item.filter(function (e) {
return e !== n;
});
} else {
item.push(n);
}
if (!(item.length === 0)) {
_context9.next = 5;
break;
}
message/* default.warn */.ZP.warn('试题来源为必选项');
return _context9.abrupt("return");
case 5:
if (!((_item = item) !== null && _item !== void 0 && _item.includes('mine'))) {
setFolderValue([]);
folderValueRef.current = [];
}
if (!((_item2 = item) !== null && _item2 !== void 0 && _item2.includes('teach_groups'))) {
setTeachValue([]);
teachValueRef.current = [];
}
setSource(item);
getDisciplines(item);
setDisciplinesValue([]);
disciplinesValueRef.current = [];
body = {
source: item,
group_ids: folderValueRef.current,
tag_discipline_ids: [],
teach_group_ids: teachValueRef.current
};
getList(body);
case 13:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return function handleSource(_x6) {
return _ref10.apply(this, arguments);
};
}();
var formatPaperData = function formatPaperData(originData) {
var numberFormatChinese = {
1: '一',
2: '二',
3: '三',
4: '四',
5: '五',
6: '六',
7: '七'
};
if (!originData) {
return;
}
var _ref11 = originData || {},
exam = _ref11.exam,
single_questions = _ref11.single_questions,
multiple_questions = _ref11.multiple_questions,
judgement_questions = _ref11.judgement_questions,
program_questions = _ref11.program_questions,
completion_questions = _ref11.completion_questions,
subjective_questions = _ref11.subjective_questions,
practical_questions = _ref11.practical_questions,
combination_questions = _ref11.combination_questions;
var questionData = [objectSpread2_default()({
type: 'SINGLE',
name: '单选题'
}, single_questions), objectSpread2_default()({
type: 'MULTIPLE',
name: '多选题'
}, multiple_questions), objectSpread2_default()({
type: 'COMPLETION',
name: '填空题'
}, completion_questions), objectSpread2_default()({
type: 'JUDGMENT',
name: '判断题'
}, judgement_questions), objectSpread2_default()({
type: 'SUBJECTIVE',
name: '简答题'
}, subjective_questions), objectSpread2_default()({
type: 'PROGRAM',
name: '编程题'
}, program_questions), objectSpread2_default()({
type: 'PRACTICAL',
name: '实训题'
}, practical_questions), objectSpread2_default()({
type: 'COMBINATION',
name: '组合题'
}, combination_questions)];
var ids = [];
var all_score = 0;
var all_questions_count = 0;
var questionList = questionData.filter(function (item) {
return item.questions_count > 0;
}).map(function (item, index) {
var _item$questions;
(_item$questions = item.questions) === null || _item$questions === void 0 ? void 0 : _item$questions.forEach(function (e) {
ids.push(e.id);
all_score = all_score + e.score;
all_questions_count = all_questions_count + 1;
});
return objectSpread2_default()(objectSpread2_default()({}, item), {
number: numberFormatChinese[index + 1]
});
});
return {
all_questions_count: all_questions_count,
all_score: all_score,
questionList: questionList,
ids: ids,
exam: exam
};
};
var handleTypeScore = function handleTypeScore(item) {
var _clonePreviewData$que3, _cloneListData;
var clonePreviewData = (0,lodash.cloneDeep)(previewData);
var cloneListData = (0,lodash.cloneDeep)(listData);
clonePreviewData.questionList = clonePreviewData === null || clonePreviewData === void 0 ? void 0 : (_clonePreviewData$que3 = clonePreviewData.questionList) === null || _clonePreviewData$que3 === void 0 ? void 0 : _clonePreviewData$que3.map(function (e) {
if (e.type === item.type) {
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
questions_score: item.scoreTotal
});
}
return e;
});
cloneListData = (_cloneListData = cloneListData) === null || _cloneListData === void 0 ? void 0 : _cloneListData.map(function (e) {
if (e.item_type === item.type) {
return objectSpread2_default()(objectSpread2_default()({}, e), {}, {
score: item.score,
scoreTotal: item.scoreTotal
});
}
return e;
});
setListData(cloneListData);
setPreviewData(clonePreviewData);
console.log(item, previewData, listData);
};
//渲染modal框内容
var sub_disciplines = disciplines === null || disciplines === void 0 ? void 0 : (_disciplines$find = disciplines.find(function (e) {
return e.id === disciplinesKey;
})) === null || _disciplines$find === void 0 ? void 0 : _disciplines$find.sub_disciplines;
var selectList = dealList();
if (preview) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(StepPreview/* default */.Z, {
loading: Sloading,
submit: handleSubmit,
goBack: function goBack() {
return setPreview(false);
},
data: previewData,
onTypeScore: handleTypeScore,
onExchange: handlePreview
});
}
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
className: StepTwomodules.wrap,
style: {
display: tabs ? 'flex' : 'none'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
id: "id_left",
className: StepTwomodules.left,
onMouseEnter: function onMouseEnter(e) {
var dom = document.getElementById('id_left');
dom.style.overflowY = 'auto';
},
onMouseLeave: function onMouseLeave(e) {
var dom = document.getElementById('id_left');
dom.style.overflowY = 'hidden';
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(skeleton/* default */.Z, {
loading: loading,
active: true,
paragraph: {
rows: 5
},
children: listData.map(function (e, i) {
var _questionData$find4;
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.list,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.name,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (_questionData$find4 = questionData.find(function (r) {
return r.type === (e === null || e === void 0 ? void 0 : e.item_type);
})) === null || _questionData$find4 === void 0 ? void 0 : _questionData$find4.name
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: ["\u5171", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: StepTwomodules.b,
children: e.questionTotal
}), "\u9898", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: StepTwomodules.l,
children: "|"
}), "\u5171", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: StepTwomodules.r,
children: e.scoreTotal
}), "\u5206"]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [i > 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
getPopupContainer: function getPopupContainer(trigger) {
return document.getElementById('id_left');
},
title: "\u4E0A\u79FB",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
onClick: function onClick() {
return upData(i);
},
className: "mb20",
style: {
transform: 'rotate(270deg)'
},
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-jiantou1"
})]
})
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "mb20",
style: {
transform: 'rotate(270deg)',
cursor: 'not-allowed'
},
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-jiantou1"
})]
}), i < listData.length - 1 ? /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
getPopupContainer: function getPopupContainer(trigger) {
return document.getElementById('id_left');
},
title: "\u4E0B\u79FB",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
onClick: function onClick() {
return downData(i);
},
style: {
transform: 'rotate(90deg)'
},
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-jiantou1"
})]
})
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
transform: 'rotate(90deg)',
cursor: 'not-allowed'
},
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-jiantou1"
})]
})]
})]
})]
}, i);
})
}), renderTotal()]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.right,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(components_Tabs, {
className: StepTwomodules.tabs,
value: 1,
onChange: function onChange() {
return setFatherTabs(0);
}
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
className: StepTwomodules.topWarp,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.title,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u62BD\u9898\u7EC4\u5377"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "STEP2"
}), " "]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.source,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {
children: "*"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u8BD5\u9898\u6765\u6E90"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
onClick: function onClick() {
return handleSource('mine');
},
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
checked: source === null || source === void 0 ? void 0 : source.includes('mine')
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: source !== null && source !== void 0 && source.includes('mine') ? "#007DFE" : '#666666'
},
children: "\u4EC5\u6211\u521B\u5EFA\u7684"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "mb20",
onClick: function onClick() {
return handleSource('teach_groups');
},
children: [" ", /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
checked: source === null || source === void 0 ? void 0 : source.includes('teach_groups')
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: source !== null && source !== void 0 && source.includes('teach_groups') ? "#007DFE" : '#666666'
},
children: "\u6559\u7814\u5171\u4EAB"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
onClick: function onClick() {
return handleSource('public');
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
checked: source === null || source === void 0 ? void 0 : source.includes('public')
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: source !== null && source !== void 0 && source.includes('public') ? "#007DFE" : '#666666'
},
children: "\u516C\u5171\u9898\u5E93"
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
children: [(source === null || source === void 0 ? void 0 : source.includes('mine')) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
marginBottom: 14
},
className: StepTwomodules.folder,
onClick: function onClick() {
setTreeVisible(true);
setFolderVisible(true);
folderValueRef.current = folderValue;
setSelectcount((folder === null || folder === void 0 ? void 0 : folder.map(function (e) {
return e.count;
}).reduce(function (current, next) {
return current + next;
}, 0)) || 0);
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: wenjian
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u9009\u62E9\u8BD5\u9898\u6587\u4EF6\u5939"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u9009\u4E2D\u9879\u4EC5\u5305\u62EC\u8BE5\u6587\u4EF6\u5939\u4E0B\u7684\u8BD5\u9898\uFF0C\u4E0D\u5305\u62EC\u5B50\u6587\u4EF6\u5939\uFF0C\u4E14\u7CFB\u7EDF\u53D6\u60A8\u9009\u4E2D\u7684\u6587\u4EF6\u5939\u548C\u8003\u67E5\u8303\u56F4\u4E2D\u7684\u8BD5\u9898\u7684\u5E76\u96C6\u4F5C\u4E3A\u968F\u673A\u5BF9\u8C61\u3002",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: wenhao
})
})]
}), (source === null || source === void 0 ? void 0 : source.includes('teach_groups')) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.folder,
onClick: function onClick() {
setTeachVisible(true);
teachValueRef.current = teachValue;
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: te
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u9009\u62E9\u6559\u7814\u56E2\u961F"
})]
})]
})]
}), (source === null || source === void 0 ? void 0 : source.includes('mine')) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.choice,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.name,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u5DF2\u9009\u6587\u4EF6\u5939"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(AddTags/* default */.Z, {
type: 2,
value: folder,
onChange: function onChange(id) {
var list = folderValue.filter(function (r) {
return r !== id;
});
var body = {
source: source,
group_ids: list,
tag_discipline_ids: disciplinesValue,
teach_group_ids: teachValue
};
getList(body);
setFolderValue(list);
folderValueRef.current = list;
}
})]
}), (source === null || source === void 0 ? void 0 : source.includes('teach_groups')) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.choice,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.name,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u5DF2\u9009\u6559\u7814\u56E2\u961F"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(AddTags/* default */.Z, {
icon: sren,
type: 2,
value: teach,
onChange: function onChange(id) {
var list = teachValue.filter(function (r) {
return r !== id;
});
var body = {
source: source,
group_ids: folderValue,
tag_discipline_ids: disciplinesValue,
teach_group_ids: list
};
getList(body);
setTeachValue(list);
teachValueRef.current = list;
}
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.range,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.name,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u8003\u5BDF\u8303\u56F4"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
onClick: function onClick() {
if (disciplinesKey === null) {
message/* default.warn */.ZP.warn('考察范围没有知识点可以选择');
return;
}
disciplinesValueRef.current = disciplinesValue;
setModalVisible(true);
},
className: StepTwomodules.btn,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: median
}), " \u9009\u62E9\u8303\u56F4"]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.name,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {
className: StepTwomodules.num
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u5DF2\u9009\u77E5\u8BC6\u70B9"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: StepTwomodules.knWarp,
children: selectList === null || selectList === void 0 ? void 0 : selectList.map(function (e, key) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)(react.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.kn,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: key + 1
}), " ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: e === null || e === void 0 ? void 0 : e[0].parent_name
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(AddTags/* default */.Z, {
type: 1,
value: e === null || e === void 0 ? void 0 : e.filter(function (m) {
return !!m.item_count;
}),
onChange: function onChange(id) {
var list = disciplinesValue.filter(function (r) {
return r !== id;
});
var body = {
source: source,
group_ids: folderValue,
tag_discipline_ids: list,
teach_group_ids: teachValue
};
getList(body);
setDisciplinesValue(list);
disciplinesValueRef.current = list;
}
})]
}, key);
})
})]
})]
}), console.log('-----', listData), /*#__PURE__*/(0,jsx_runtime.jsxs)(skeleton/* default */.Z, {
loading: loading,
active: true,
paragraph: {
rows: 5
},
children: [listData.map(function (e, i) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(List/* default */.Z, {
value: e,
onChange: function onChange(e) {
return handleChange(e, i);
}
}, i);
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.btns,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
onClick: function onClick() {
setFatherTabs(0);
document.body.scrollIntoView();
},
children: "\u4E0A\u4E00\u6B65"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
loading: Sloading,
onClick: function onClick() {
return handleSubmit();
},
children: "\u63D0\u4EA4"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
loading: Ploading,
onClick: function onClick() {
return handlePreview();
},
type: "primary",
children: "\u9884\u89C8"
})]
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
centered: true,
closable: false,
destroyOnClose: true,
className: StepTwomodules.modal,
open: modalVisible,
title: null,
width: "1200px",
onOk: handleOk,
onCancel: handleCancel,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.modalBody,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.left,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.title,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: shu
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u8BD5\u9898\u8303\u56F4"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: StepTwomodules.l,
children: disciplines === null || disciplines === void 0 ? void 0 : disciplines.map(function (e) {
var dKey = null;
var bool = false;
if (!inputValue) {
bool = true;
} else {
var _e$sub_disciplines4;
(_e$sub_disciplines4 = e.sub_disciplines) === null || _e$sub_disciplines4 === void 0 ? void 0 : _e$sub_disciplines4.forEach(function (k) {
var _k$tag_disciplines2;
(_k$tag_disciplines2 = k.tag_disciplines) === null || _k$tag_disciplines2 === void 0 ? void 0 : _k$tag_disciplines2.forEach(function (s) {
if (!bool) {
var _s$name2;
bool = ((_s$name2 = s.name) === null || _s$name2 === void 0 ? void 0 : _s$name2.includes(inputValue)) && s.item_count !== 0;
}
});
});
}
return /*#__PURE__*/(0,jsx_runtime.jsx)(react.Fragment, {
children: !!e.item_count && bool && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
onClick: function onClick() {
return setDisciplinesKey(e.id);
},
className: "".concat(StepTwomodules.name, " ").concat(e.id === disciplinesKey ? StepTwomodules.active : ''),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: e.name
})]
})
}, e.id);
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.right,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: StepTwomodules.inputWarp,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Search, {
onChange: function onChange(e) {
return setInputValue(e.target.value);
},
placeholder: "\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9",
value: inputValue
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: StepTwomodules.l,
children: sub_disciplines === null || sub_disciplines === void 0 ? void 0 : sub_disciplines.map(function (e, i) {
var _e$tag_disciplines3;
var item = objectSpread2_default()(objectSpread2_default()({}, e), {}, {
tag_disciplines: e === null || e === void 0 ? void 0 : (_e$tag_disciplines3 = e.tag_disciplines) === null || _e$tag_disciplines3 === void 0 ? void 0 : _e$tag_disciplines3.filter(function (e) {
return e.item_count !== 0;
})
}); //清空为0的数据做全选
return /*#__PURE__*/(0,jsx_runtime.jsx)(ProCheckout, {
search: inputValue,
onChange: handleCheckout,
value: disciplinesValue,
options: item
}, e.id);
})
})]
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
centered: true,
title: "\u9009\u62E9\u6587\u4EF6\u5939",
open: folderVisible,
width: 718,
destroyOnClose: true,
onCancel: function onCancel() {
setFolderValue(folderValueRef.current);
setFolderVisible(false);
setSelectcount(0);
},
footer: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
alignItems: 'center'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
flex: '1',
textAlign: 'left'
},
children: ["\u5DF2\u9009", folderValue.length || 0, "\u4E2A\u6587\u4EF6\u5939\uFF0C\u5171\uFF08", selectcount || 0, "\uFF09\u9053\u9898"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
onClick: function onClick() {
setFolderValue(folderValueRef.current);
setSelectcount(0);
setFolderVisible(false);
},
children: "\u53D6\u6D88"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
type: "primary",
onClick: function onClick() {
var body = {
source: source,
group_ids: folderValue,
tag_discipline_ids: disciplinesValue,
teach_group_ids: teachValue
};
getList(body);
folderValueRef.current = folderValue;
setFolderVisible(false);
},
children: "\u786E\u8BA4"
})]
})
// onOk={() => {
// }}
,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
className: StepTwomodules.exportModal,
children: treeVisible && /*#__PURE__*/(0,jsx_runtime.jsx)(StepTwo_CustomTree, {
treeData: treeData,
defaultValue: defaultValue,
value: folderValue,
onChange: function onChange(e, r) {
var _r$selectedNodes;
// selectcount=selectcount+r?.node?.count;
setSelectcount((_r$selectedNodes = r.selectedNodes) === null || _r$selectedNodes === void 0 ? void 0 : _r$selectedNodes.map(function (item) {
return item.count;
}).reduce(function (current, next) {
return current + next;
}, 0));
// console.log('----',r,r.selectedNodes.map(item=>item.count).reduce((current: any, next: any) => current + next, 0));
// console.log('----',
// treeData[0]?.children?.filter((item: { id: any; })=>folderValue.includes(item.id)).map((item: { count: any; })=>item.count).reduce((current: any, next: any) => current + next, 0)
// );
setFolderValue(e);
}
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
centered: true,
title: "\u9009\u62E9\u6559\u7814\u56E2\u961F",
open: teachVisible,
width: 718,
destroyOnClose: true,
onCancel: function onCancel() {
setTeachValue(teachValueRef.current);
setTeachVisible(false);
},
onOk: function onOk() {
var body = {
source: source,
group_ids: folderValue,
tag_discipline_ids: disciplinesValue,
teach_group_ids: teachValue
};
getList(body);
teachValueRef.current = teachValue;
setTeachVisible(false);
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
className: StepTwomodules.teachModal,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.head,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: StepTwomodules.li
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: StepTwomodules.li,
children: "\u56E2\u961F\u540D\u79F0"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: StepTwomodules.li,
children: "\u5171\u4EAB\u9898\u76EE\u6570\u91CF"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: StepTwomodules.wraps,
children: teachData === null || teachData === void 0 ? void 0 : teachData.map(function (e) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: StepTwomodules.body,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: StepTwomodules.li,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
onChange: function onChange() {
var n = e.id;
var item = toConsumableArray_default()(teachValue);
if (teachValue.includes(n)) {
item = item.filter(function (e) {
return e !== n;
});
} else {
item.push(n);
}
setTeachValue(item);
},
checked: teachValue === null || teachValue === void 0 ? void 0 : teachValue.includes(e.id)
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
title: e.name,
className: StepTwomodules.li,
children: e.name
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: StepTwomodules.li,
children: e.item_bank_count
})]
}, e.id);
})
})]
})
})]
});
};
/* harmony default export */ var StepTwo = (Page);
;// CONCATENATED MODULE: ./src/pages/Paperlibrary/Random/AddAndEdit/index.tsx
// import StepOne from './components/StepOne';
var TextArea = input/* default.TextArea */.Z.TextArea;
var PaperlibraryPage = function PaperlibraryPage(_ref) {
var paperlibrary = _ref.paperlibrary,
user = _ref.user,
globalSetting = _ref.globalSetting,
dispatch = _ref.dispatch;
var _useState = (0,react.useState)(0),
_useState2 = slicedToArray_default()(_useState, 2),
tabs = _useState2[0],
setTabs = _useState2[1];
var _Form$useForm = es_form/* default.useForm */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
form = _Form$useForm2[0];
var _useState3 = (0,react.useState)({}),
_useState4 = slicedToArray_default()(_useState3, 2),
formValue = _useState4[0],
setFormValue = _useState4[1];
var _useState5 = (0,react.useState)(true),
_useState6 = slicedToArray_default()(_useState5, 2),
loading = _useState6[0],
setLoading = _useState6[1];
var _useState7 = (0,react.useState)(null),
_useState8 = slicedToArray_default()(_useState7, 2),
editData = _useState8[0],
setEditData = _useState8[1];
var editId = (0,_umi_production_exports.useParams)().id;
console.log(editId, 'editId');
(0,react.useEffect)(function () {
dispatch({
type: 'globalSetting/footerToggle',
payload: false
});
return function () {
dispatch({
type: 'globalSetting/footerToggle',
payload: true
});
};
}, []);
(0,react.useEffect)(function () {
document.body.setAttribute('data-custom', 'initial');
return function () {
document.body.removeAttribute('data-custom');
};
}, []);
var handleValuesChange = function handleValuesChange(changedValues) {
setFormValue(objectSpread2_default()({}, form.getFieldsValue()));
};
(0,react.useEffect)(function () {
if (editId) {
getEditData();
return;
}
setLoading(false);
}, [editId]);
var getEditData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var res, _res$examination_bank, _res$examination_bank2, _res$examination_bank3, _res$examination_bank4, param;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0,fetch/* default */.ZP)("/api/examination_banks/".concat(editId, "/edit_random_exam.json"), {
method: 'get',
params: {}
});
case 2:
res = _context.sent;
if (res !== null && res !== void 0 && res.examination_bank) {
param = {
difficulty: res === null || res === void 0 ? void 0 : (_res$examination_bank = res.examination_bank) === null || _res$examination_bank === void 0 ? void 0 : _res$examination_bank.difficulty,
exam_notes: res === null || res === void 0 ? void 0 : (_res$examination_bank2 = res.examination_bank) === null || _res$examination_bank2 === void 0 ? void 0 : _res$examination_bank2.exam_notes,
name: res === null || res === void 0 ? void 0 : (_res$examination_bank3 = res.examination_bank) === null || _res$examination_bank3 === void 0 ? void 0 : _res$examination_bank3.name,
time: res === null || res === void 0 ? void 0 : (_res$examination_bank4 = res.examination_bank) === null || _res$examination_bank4 === void 0 ? void 0 : _res$examination_bank4.time
};
setLoading(false);
setFormValue(objectSpread2_default()({}, param));
form.setFieldsValue(objectSpread2_default()({}, param));
setEditData(objectSpread2_default()(objectSpread2_default()({}, res), {}, {
id: editId
}));
}
case 4:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getEditData() {
return _ref2.apply(this, arguments);
};
}();
var handleTabsChange = /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(num) {
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
if (!(num === 0)) {
_context2.next = 3;
break;
}
setTabs(num);
return _context2.abrupt("return");
case 3:
_context2.next = 5;
return form.validateFields();
case 5:
setTabs(num);
case 6:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function handleTabsChange(_x) {
return _ref3.apply(this, arguments);
};
}();
// const rule = {
// pattern: /^(?!(\s+$))/,
// message: '禁止输入空格',
// }
var parser = function parser(v) {
var num = parseInt(v);
return (0,lodash.isNaN)(num) ? '' : num;
};
return /*#__PURE__*/(0,jsx_runtime.jsx)("section", {
className: AddAndEditmodules.wrap,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(skeleton/* default */.Z, {
loading: loading,
active: true,
paragraph: {
rows: 5
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: AddAndEditmodules.crumbs,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "current",
onClick: function onClick() {
return _umi_production_exports.history.push('/');
},
children: '首页>'
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "current",
onClick: function onClick() {
return _umi_production_exports.history.push('/paperlibrary');
},
children: '试卷库>'
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#bebebe"
},
children: '随机组卷'
})]
}), tabs === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(components_Tabs, {
value: tabs,
onChange: handleTabsChange
}), tabs === 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
className: AddAndEditmodules.oneWrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: AddAndEditmodules.title,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("b", {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u57FA\u672C\u4FE1\u606F"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "STEP1"
}), " "]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
className: AddAndEditmodules.formWrap,
form: form,
layout: "horizontal",
onValuesChange: handleValuesChange
// onFinish={handleFinish}
,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u8BD5\u5377\u540D\u79F0",
name: "name",
rules: [{
required: true,
message: '试卷名称不能为空'
}, {
pattern: /^(?!(\s+$))/,
message: '输入框不能全为空格'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
className: AddAndEditmodules["in"],
bordered: false,
placeholder: "\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0\uFF0C\u6700\u591A60\u4E2A\u5B57",
maxLength: 60
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
position: 'relative'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u7B54\u9898\u65F6\u957F:",
name: "time",
rules: [{
required: true,
message: "答题时长不能为空"
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
min: 1,
parser: parser,
max: 9999
// formatter={numberFormatter}
,
placeholder: "\u8BF7\u8F93\u5165\u7B54\u9898\u65F6\u957F",
style: {
width: 190
}
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
position: 'absolute',
top: 26,
left: 310
},
children: "\u5206\u949F"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u8BD5\u9898\u96BE\u5EA6",
name: "difficulty",
rules: [{
required: true,
message: "请选择难度"
}],
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
style: {
display: "flex",
width: 286,
justifyContent: "space-between"
},
size: "large",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default.Button */.ZP.Button, {
className: AddAndEditmodules.rb,
value: 1,
children: "\u7B80\u5355"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default.Button */.ZP.Button, {
className: AddAndEditmodules.rb,
value: 2,
children: "\u9002\u4E2D"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default.Button */.ZP.Button, {
className: AddAndEditmodules.rb,
value: 3,
children: "\u56F0\u96BE"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default.Item */.Z.Item, {
label: "\u8003\u8BD5\u987B\u77E5",
name: "exam_notes",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
placeholder: "\u8003\u751F\u5FC5\u987B\u4E25\u683C\u9075\u5B88\u8003\u573A\u7EAA\u5F8B\uFF0C\u4E0D\u51C6\u5192\u540D\u9876\u66FF\uFF0C\u4E0D\u51C6\u6709\u4EFB\u4F55\u4F5C\u5F0A\u884C\u4E3A\u3002\u5982\u53D1\u73B0\u8FDD\u7EAA\uFF0C\u5E76\u7ED9\u4E88\u4E25\u5389\u5904\u5206\u3002",
rows: 4,
maxLength: 300
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: AddAndEditmodules.btns,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
className: "mr40",
onClick: function onClick() {
return _umi_production_exports.history.push('/paperlibrary');
},
children: "\u8FD4\u56DE"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.Z, {
type: "primary",
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return form.validateFields();
case 2:
setTabs(1);
case 3:
case "end":
return _context3.stop();
}
}, _callee3);
})),
children: "\u4E0B\u4E00\u6B65"
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(StepTwo, {
tabs: tabs,
dispatch: dispatch,
editData: editData,
setFatherTabs: setTabs,
formValue: formValue
})]
})
});
};
/* harmony default export */ var AddAndEdit = ((0,_umi_production_exports.connect)(function (_ref5) {
var paperlibrary = _ref5.paperlibrary,
user = _ref5.user,
globalSetting = _ref5.globalSetting;
return {
paperlibrary: paperlibrary,
user: user,
globalSetting: globalSetting
};
})(PaperlibraryPage));
/***/ })
}]);