"use strict"; (self["webpackChunk"] = self["webpackChunk"] || []).push([[10485],{ /***/ 40001: /*!*******************************************************************************************************!*\ !*** ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/CheckOutlined.js + 1 modules ***! \*******************************************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: function() { return /* binding */ icons_CheckOutlined; } }); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(14809); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js var _react_17_0_2_react = __webpack_require__(59301); ;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/CheckOutlined.js // This icon file is generated automatically. var CheckOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z" } }] }, "name": "check", "theme": "outlined" }; /* harmony default export */ var asn_CheckOutlined = (CheckOutlined); // EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules var AntdIcon = __webpack_require__(7657); ;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/CheckOutlined.js // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var CheckOutlined_CheckOutlined = function CheckOutlined(props, ref) { return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { ref: ref, icon: asn_CheckOutlined })); }; /**![check](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTkxMiAxOTBoLTY5LjljLTkuOCAwLTE5LjEgNC41LTI1LjEgMTIuMkw0MDQuNyA3MjQuNSAyMDcgNDc0YTMyIDMyIDAgMDAtMjUuMS0xMi4ySDExMmMtNi43IDAtMTAuNCA3LjctNi4zIDEyLjlsMjczLjkgMzQ3YzEyLjggMTYuMiAzNy40IDE2LjIgNTAuMyAwbDQ4OC40LTYxOC45YzQuMS01LjEuNC0xMi44LTYuMy0xMi44eiIgLz48L3N2Zz4=) */ var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(CheckOutlined_CheckOutlined); if (false) {} /* harmony default export */ var icons_CheckOutlined = (RefIcon); /***/ }), /***/ 15277: /*!*****************************************************************************************************!*\ !*** ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/EyeOutlined.js + 1 modules ***! \*****************************************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: function() { return /* binding */ icons_EyeOutlined; } }); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.6@@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(14809); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js var _react_17_0_2_react = __webpack_require__(59301); ;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/EyeOutlined.js // This icon file is generated automatically. var EyeOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" } }] }, "name": "eye", "theme": "outlined" }; /* harmony default export */ var asn_EyeOutlined = (EyeOutlined); // EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules var AntdIcon = __webpack_require__(7657); ;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/EyeOutlined.js // GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY var EyeOutlined_EyeOutlined = function EyeOutlined(props, ref) { return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, { ref: ref, icon: asn_EyeOutlined })); }; /**![eye](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTk0Mi4yIDQ4Ni4yQzg0Ny40IDI4Ni41IDcwNC4xIDE4NiA1MTIgMTg2Yy0xOTIuMiAwLTMzNS40IDEwMC41LTQzMC4yIDMwMC4zYTYwLjMgNjAuMyAwIDAwMCA1MS41QzE3Ni42IDczNy41IDMxOS45IDgzOCA1MTIgODM4YzE5Mi4yIDAgMzM1LjQtMTAwLjUgNDMwLjItMzAwLjMgNy43LTE2LjIgNy43LTM1IDAtNTEuNXpNNTEyIDc2NmMtMTYxLjMgMC0yNzkuNC04MS44LTM2Mi43LTI1NEMyMzIuNiAzMzkuOCAzNTAuNyAyNTggNTEyIDI1OGMxNjEuMyAwIDI3OS40IDgxLjggMzYyLjcgMjU0Qzc5MS41IDY4NC4yIDY3My40IDc2NiA1MTIgNzY2em0tNC00MzBjLTk3LjIgMC0xNzYgNzguOC0xNzYgMTc2czc4LjggMTc2IDE3NiAxNzYgMTc2LTc4LjggMTc2LTE3Ni03OC44LTE3Ni0xNzYtMTc2em0wIDI4OGMtNjEuOSAwLTExMi01MC4xLTExMi0xMTJzNTAuMS0xMTIgMTEyLTExMiAxMTIgNTAuMSAxMTIgMTEyLTUwLjEgMTEyLTExMiAxMTJ6IiAvPjwvc3ZnPg==) */ var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(EyeOutlined_EyeOutlined); if (false) {} /* harmony default export */ var icons_EyeOutlined = (RefIcon); /***/ }), /***/ 84430: /*!*********************************************************************!*\ !*** ./src/pages/Question/AddOrEdit/BatchAdd/index.tsx + 1 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 */ AddOrEdit_BatchAdd; } }); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js var regeneratorRuntime = __webpack_require__(7557); var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js var asyncToGenerator = __webpack_require__(41498); var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js var objectSpread2 = __webpack_require__(82242); var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js var slicedToArray = __webpack_require__(79800); var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__(39647); var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js var _react_17_0_2_react = __webpack_require__(59301); // EXTERNAL MODULE: ./src/.umi-production/exports.ts var _umi_production_exports = __webpack_require__(80184); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules var message = __webpack_require__(8591); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js var row = __webpack_require__(95237); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js var col = __webpack_require__(43604); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/index.js + 24 modules var upload = __webpack_require__(54580); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js var es_button = __webpack_require__(3113); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules var spin = __webpack_require__(71418); // EXTERNAL MODULE: ./src/utils/util.tsx var util = __webpack_require__(1079); ;// CONCATENATED MODULE: ./src/pages/Question/AddOrEdit/BatchAdd/index.less?modules // extracted by mini-css-extract-plugin /* harmony default export */ var BatchAddmodules = ({"flex_box_center":"flex_box_center___Rx_bl","flex_space_between":"flex_space_between___pf3DK","flex_box_vertical_center":"flex_box_vertical_center___C2f9B","flex_box_center_end":"flex_box_center_end___Pmdn_","flex_box_column":"flex_box_column___RduTL","wrap":"wrap___Z5mJ_","head":"head___WiKNg"}); // EXTERNAL MODULE: ./src/utils/fetch.ts var fetch = __webpack_require__(35325); // EXTERNAL MODULE: ./src/utils/env.ts + 1 modules var env = __webpack_require__(67390); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js var jsx_runtime = __webpack_require__(37712); ;// CONCATENATED MODULE: ./src/pages/Question/AddOrEdit/BatchAdd/index.tsx var _excluded = ["globalSetting", "user", "dispatch"]; var BatchAdd = function BatchAdd(_ref) { var _Datas$fail, _Datas$fail2, _Datas$fail3; var globalSetting = _ref.globalSetting, user = _ref.user, dispatch = _ref.dispatch, props = objectWithoutProperties_default()(_ref, _excluded); //导入 var _useState = (0,_react_17_0_2_react.useState)([]), _useState2 = slicedToArray_default()(_useState, 2), fileList = _useState2[0], setFileList = _useState2[1]; var _useState3 = (0,_react_17_0_2_react.useState)(), _useState4 = slicedToArray_default()(_useState3, 2), Datas = _useState4[0], setDatas = _useState4[1]; var _useState5 = (0,_react_17_0_2_react.useState)(false), _useState6 = slicedToArray_default()(_useState5, 2), isClick = _useState6[0], setIsclick = _useState6[1]; var _useState7 = (0,_react_17_0_2_react.useState)(false), _useState8 = slicedToArray_default()(_useState7, 2), loading = _useState8[0], setLoading = _useState8[1]; var Draggers = { onRemove: function onRemove() { setFileList([]); }, beforeUpload: function beforeUpload(file) { // console.log(file); if ((file === null || file === void 0 ? void 0 : file.size) > 1024 * 1024 * 50) { message/* default */.ZP.info('文件超过50M,不符合上传要求'); return false; } var filelist = []; filelist.push(file); setFileList([].concat(filelist)); return false; }, fileList: fileList, accept: ".xls,.xlsx" }; return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", { className: BatchAddmodules.wrap, children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: BatchAddmodules.head, children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", { onClick: function onClick() { return _umi_production_exports.history.push('/problems'); }, children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", { className: "iconfont icon-fanhui2" }), /*#__PURE__*/(0,jsx_runtime.jsx)("span", { className: "mr20", children: "\u8FD4\u56DE" })] }), /*#__PURE__*/(0,jsx_runtime.jsx)("b", { children: "\u6279\u91CF\u5BFC\u5165\u8BD5\u9898" })] }), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { className: "pr40 pl30 mt30", children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { gutter: [16, 16], children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { className: "font14", span: 2, style: { height: '40px', lineHeight: '40px', textAlign: 'end' }, children: "\u6587\u4EF6\u4E0A\u4F20\uFF1A" }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { children: /*#__PURE__*/(0,jsx_runtime.jsx)(upload/* default */.Z, objectSpread2_default()(objectSpread2_default()({}, Draggers), {}, { children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, { ghost: true, type: "primary", style: { width: 96, height: 40, borderRadius: 4 }, children: "\u9009\u62E9\u6587\u4EF6" }) })) })] }), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, { gutter: [16, 16], children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { span: 2, className: "font14", style: { textAlign: 'end' }, children: "\u6CE8\u610F\uFF1A" }), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, { span: 22, children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", { children: ["1.\u4EC5\u652F\u6301\u4E0A\u4F20.xlsx\u6216.xls\u7C7B\u578B\u7684\u6587\u4EF6\u3002 ", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "2.\u9700\u4E0A\u4F20\u6307\u5B9A\u6A21\u677F\u7684\u6587\u4EF6\u3002", /*#__PURE__*/(0,jsx_runtime.jsx)("span", { style: { cursor: 'pointer', color: '#0152d9' }, onClick: function onClick() { (0,util/* downLoadFile */.FH)('', (0,util/* setUrlQuery */.NY)({ url: env/* default */.Z.API_SERVER + "/api/practices/down_template", query: {} })); }, children: "\u4E0B\u8F7D\u5BFC\u5165\u6A21\u7248" }), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "3.\u82E5\u76F4\u63A5\u4E0A\u4F20\u4FEE\u6539\u540E\u7684\u5931\u8D25\u6587\u4EF6\uFF0C\u9700\u8981\u5148\u5C06\u201C\u5931\u8D25\u539F\u56E0\u201D\u5217\u5220\u9664\u3002"] }) })] }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", { style: { display: 'flex', justifyContent: 'flex-end' }, children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, { type: "primary", style: { width: '116px', height: '40px', borderRadius: '4px' }, onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() { var formData, result; return regeneratorRuntime_default()().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: if (!((fileList === null || fileList === void 0 ? void 0 : fileList.length) <= 0)) { _context.next = 3; break; } message/* default */.ZP.info('请上传文件'); return _context.abrupt("return"); case 3: setIsclick(false); setLoading(true); formData = new FormData(); formData.append('file', fileList[0]); _context.next = 9; return (0,fetch/* default */.ZP)("/api/practices/file_import.json", { method: 'post', body: formData }, true); case 9: result = _context.sent; setLoading(false); if (!(result.status === -1)) { _context.next = 13; break; } return _context.abrupt("return"); case 13: setIsclick(true); setDatas(result); case 15: case "end": return _context.stop(); } }, _callee); })), children: "\u786E\u8BA4\u4E0A\u4F20" }) }), isClick && !loading && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", { style: { paddingLeft: 15, fontSize: 14 }, children: "\u4E0A\u4F20\u7ED3\u679C" }), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { style: { fontSize: '16px', textAlign: 'center', display: 'flex' }, children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", { style: { flex: '1', lineHeight: '30px' }, children: [" \u672C\u6B21\u4E0A\u4F20 \u65B0\u589E", /*#__PURE__*/(0,jsx_runtime.jsx)("span", { style: { color: '#FA6400' }, children: Datas === null || Datas === void 0 ? void 0 : Datas.success }), "\u6761\u8BD5\u9898\uFF0C\u4E0A\u4F20\u6210\u529F", /*#__PURE__*/(0,jsx_runtime.jsx)("span", { style: { color: '#FA6400' }, children: Datas === null || Datas === void 0 ? void 0 : Datas.success }), "\u6761\u6570\u636E", !!(Datas !== null && Datas !== void 0 && (_Datas$fail = Datas.fail) !== null && _Datas$fail !== void 0 && _Datas$fail.length) && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", { children: ["\uFF0C\u5931\u8D25", /*#__PURE__*/(0,jsx_runtime.jsx)("span", { style: { color: '#FA6400' }, children: Datas === null || Datas === void 0 || (_Datas$fail2 = Datas.fail) === null || _Datas$fail2 === void 0 ? void 0 : _Datas$fail2.length }), "\u6761\u6570\u636E"] })] }), !!(Datas !== null && Datas !== void 0 && (_Datas$fail3 = Datas.fail) !== null && _Datas$fail3 !== void 0 && _Datas$fail3.length) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, { style: { height: '30px', width: '144px' }, type: "primary", ghost: true, onClick: function onClick() { (0,util/* downLoadFile */.FH)('', (0,util/* setUrlQuery */.NY)({ url: env/* default */.Z.API_SERVER + (Datas === null || Datas === void 0 ? void 0 : Datas.error_file), query: {} })); }, children: "\u4E0B\u8F7D\u5931\u8D25\u6570\u636E" })] })] }), /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, { tip: "\u4E0A\u4F20\u4E2D", style: { width: '100%', marginTop: 26 }, spinning: loading })] })] }); }; /* harmony default export */ var AddOrEdit_BatchAdd = ((0,_umi_production_exports.connect)(function (_ref3) { var user = _ref3.user, globalSetting = _ref3.globalSetting; return { user: user, globalSetting: globalSetting }; })(BatchAdd)); /***/ }), /***/ 56762: /*!************************************************************************!*\ !*** ./node_modules/_antd@5.9.0@antd/es/_util/hooks/useForceUpdate.js ***! \************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: function() { return /* binding */ useForceUpdate; } /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301); function useForceUpdate() { const [, forceUpdate] = react__WEBPACK_IMPORTED_MODULE_0__.useReducer(x => x + 1, 0); return forceUpdate; } /***/ }), /***/ 8378: /*!*******************************************************************!*\ !*** ./node_modules/_antd@5.9.0@antd/es/style/motion/collapse.js ***! \*******************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__) { const genCollapseMotion = token => ({ [token.componentCls]: { // For common/openAnimation [`${token.antCls}-motion-collapse-legacy`]: { overflow: 'hidden', '&-active': { transition: `height ${token.motionDurationMid} ${token.motionEaseInOut}, opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important` } }, [`${token.antCls}-motion-collapse`]: { overflow: 'hidden', transition: `height ${token.motionDurationMid} ${token.motionEaseInOut}, opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important` } } }); /* harmony default export */ __webpack_exports__.Z = (genCollapseMotion); /***/ }) }]);