autoUpdataFile

dev_local_v9_brain_cloud
eduauto 2 years ago
parent 174f0c080d
commit aba8613587

@ -1,5 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[85274,96738,80638,63276],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[45289,96738,99531,63276],{
/***/ 5929:
/*!**********************************************!*\
@ -1453,9 +1453,9 @@ var FileDownloadList = function FileDownloadList(_ref) {
/***/ }),
/***/ 80638:
/***/ 99531:
/*!**********************************************************!*\
!*** ./src/components/MultiUpload/index.tsx + 3 modules ***!
!*** ./src/components/MultiUpload/index.tsx + 2 modules ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
@ -1486,7 +1486,7 @@ var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/index.js + 24 modules
var upload = __webpack_require__(46651);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
var es_message = __webpack_require__(8591);
var message = __webpack_require__(8591);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
var modal = __webpack_require__(43418);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
@ -1495,136 +1495,8 @@ var es_button = __webpack_require__(3113);
var env = __webpack_require__(17985);
// EXTERNAL MODULE: ./src/pages/MoopCases/FormPanel/service.ts
var service = __webpack_require__(52989);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/components/SingleUpload/index.tsx
var uploadNameSizeSeperator = '  ';
function bytesToSize(bytes) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
if (bytes == 0) return '0 Byte';
var i = parseInt('' + Math.floor(Math.log(bytes) / Math.log(1024)), 10);
return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i];
}
/* harmony default export */ var SingleUpload = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? [] : _ref$value,
action = _ref.action,
_onChange = _ref.onChange,
className = _ref.className,
_ref$maxSize = _ref.maxSize,
maxSize = _ref$maxSize === void 0 ? 150 : _ref$maxSize,
_ref$title = _ref.title,
title = _ref$title === void 0 ? '文件上传' : _ref$title,
_ref$accept = _ref.accept,
accept = _ref$accept === void 0 ? null : _ref$accept;
var uploadProps = {
multiple: false,
fileList: value,
accept: accept,
withCredentials: true,
beforeUpload: function beforeUpload(file) {
var fileSize = file.size / 1024 / 1024;
if (!(fileSize < maxSize)) {
message.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20"));
return Promise.reject();
}
return true;
},
action: "".concat(ENV.API_SERVER, "/api/attachments.json"),
// ?debug=student&randomcode=undefined&client_key=6d57f8c3dd186c5ada392546ace9620a
onChange: function onChange(info) {
var _info$file;
var fileList = _toConsumableArray(info.fileList);
fileList = fileList.map(function (file) {
if (file.name.indexOf(uploadNameSizeSeperator) === -1) {
file.name = "".concat(file.name).concat(uploadNameSizeSeperator).concat(bytesToSize(file.size));
}
return _objectSpread({}, file);
});
if (info.file.status === 'done' && ((_info$file = info.file) === null || _info$file === void 0 || (_info$file = _info$file.response) === null || _info$file === void 0 ? void 0 : _info$file.status) === -1) {
var _info$file2;
message.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message);
_onChange([]);
return;
}
_onChange(fileList);
},
onRemove: function () {
var _onRemove = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
var fileSize, id, rs;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
fileSize = file.size / 1024 / 1024;
if (!(file.status === 'uploading')) {
_context.next = 3;
break;
}
return _context.abrupt("return", true);
case 3:
if (fileSize < maxSize) {
_context.next = 7;
break;
}
return _context.abrupt("return", true);
case 7:
id = file.response ? file.response.id : file.uid;
if (!id) {
_context.next = 15;
break;
}
_context.next = 11;
return removeAttachment(file.response ? file.response.id : file.id);
case 11:
rs = _context.sent;
return _context.abrupt("return", rs);
case 15:
return _context.abrupt("return", true);
case 16:
case "end":
return _context.stop();
}
}, _callee);
}));
function onRemove(_x) {
return _onRemove.apply(this, arguments);
}
return onRemove;
}()
};
function onCancel(e) {
e.preventDefault();
e.stopPropagation();
}
return /*#__PURE__*/_jsx("div", {
className: "single-upload ".concat(className ? className : ''),
children: /*#__PURE__*/_jsxs(Upload, _objectSpread(_objectSpread({}, uploadProps), {}, {
children: [/*#__PURE__*/_jsx(Button, {
type: "primary",
title: value.length > 0 ? '每次只能上传一个资源, 删除下面资源可重新上传 ' : '',
disabled: value.length > 0,
ghost: true,
children: title
}), /*#__PURE__*/_jsxs("span", {
onClick: onCancel,
style: {
marginLeft: 10
},
children: ["(\u5355\u4E2A\u6587\u4EF6\u6700\u5927", maxSize, "M)", ' ']
})]
}))
});
});
// EXTERNAL MODULE: ./src/components/SingleUpload/index.tsx
var SingleUpload = __webpack_require__(95081);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/InboxOutlined.js + 1 modules
var InboxOutlined = __webpack_require__(93737);
// EXTERNAL MODULE: ./node_modules/_lodash@4.17.21@lodash/lodash.js
@ -1680,6 +1552,8 @@ var SvgUploadImg = function SvgUploadImg(props) {
};
/* harmony default export */ var uploadImg = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjM1NCAzLjVoLTIuNzd2OC4xNjdINi40MTZWMy41SDMuNjQ2TDcgMGwzLjM1NCAzLjVaTTE0IDdoLTEuMTY3djUuODMzSDEuMTY3VjdIMHY3aDE0VjdaIiBmaWxsPSIjMzA2MUQwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=");
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/components/MultiUpload/index.tsx
@ -1705,7 +1579,7 @@ function coverToFileList(data) {
return {
uid: item.id,
id: item.id,
name: item.title + uploadNameSizeSeperator + item.filesize,
name: item.title + SingleUpload/* uploadNameSizeSeperator */.sX + item.filesize,
url: item.url,
filesize: item.filesize,
status: 'done',
@ -1778,7 +1652,7 @@ function coverToFileList(data) {
if (fileList.concat(fileArr).length > number) {
fileList.pop();
setFileList(toConsumableArray_default()(fileList));
es_message/* default */.ZP.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(number, "\u4E2A\u6587\u4EF6"));
message/* default */.ZP.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(number, "\u4E2A\u6587\u4EF6"));
if (aloneClear) {
return Promise.reject();
}
@ -1786,7 +1660,7 @@ function coverToFileList(data) {
return false;
}
if (!(fileSize < maxSize)) {
es_message/* default */.ZP.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB)."));
message/* default */.ZP.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB)."));
if (aloneClear) {
return Promise.reject();
}
@ -1807,7 +1681,7 @@ function coverToFileList(data) {
}
if (info.file.status === 'done' && ((_info$file = info.file) === null || _info$file === void 0 || (_info$file = _info$file.response) === null || _info$file === void 0 ? void 0 : _info$file.status) === -1) {
var _info$file2;
es_message/* default */.ZP.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message);
message/* default */.ZP.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message);
return;
}
if (fileList.length >= number) setDisabled(true);else setDisabled(false);
@ -1818,8 +1692,8 @@ function coverToFileList(data) {
var _file$response2;
file.url = "/api/attachments/".concat(file === null || file === void 0 || (_file$response2 = file.response) === null || _file$response2 === void 0 ? void 0 : _file$response2.id);
}
if (file.name.indexOf(uploadNameSizeSeperator) === -1) {
file.name = "".concat(file.name).concat(uploadNameSizeSeperator).concat(bytesToSize(file.size));
if (file.name.indexOf(SingleUpload/* uploadNameSizeSeperator */.sX) === -1) {
file.name = "".concat(file.name).concat(SingleUpload/* uploadNameSizeSeperator */.sX).concat((0,SingleUpload/* bytesToSize */.RD)(file.size));
}
return objectSpread2_default()({}, file);
});
@ -1885,7 +1759,7 @@ function coverToFileList(data) {
return remove();
case 2:
res = _context2.sent;
es_message/* default */.ZP.success('删除成功');
message/* default */.ZP.success('删除成功');
resolve(true);
case 5:
case "end":
@ -1953,6 +1827,158 @@ function coverToFileList(data) {
/***/ }),
/***/ 95081:
/*!***********************************************!*\
!*** ./src/components/SingleUpload/index.tsx ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ RD: function() { return /* binding */ bytesToSize; },
/* harmony export */ sX: function() { return /* binding */ uploadNameSizeSeperator; }
/* harmony export */ });
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js */ 41498);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js */ 37205);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _utils_env__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/utils/env */ 17985);
/* harmony import */ var _pages_MoopCases_FormPanel_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/pages/MoopCases/FormPanel/service */ 52989);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
var uploadNameSizeSeperator = '  ';
function bytesToSize(bytes) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
if (bytes == 0) return '0 Byte';
var i = parseInt('' + Math.floor(Math.log(bytes) / Math.log(1024)), 10);
return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i];
}
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? [] : _ref$value,
action = _ref.action,
_onChange = _ref.onChange,
className = _ref.className,
_ref$maxSize = _ref.maxSize,
maxSize = _ref$maxSize === void 0 ? 150 : _ref$maxSize,
_ref$title = _ref.title,
title = _ref$title === void 0 ? '文件上传' : _ref$title,
_ref$accept = _ref.accept,
accept = _ref$accept === void 0 ? null : _ref$accept;
var uploadProps = {
multiple: false,
fileList: value,
accept: accept,
withCredentials: true,
beforeUpload: function beforeUpload(file) {
var fileSize = file.size / 1024 / 1024;
if (!(fileSize < maxSize)) {
message.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20"));
return Promise.reject();
}
return true;
},
action: "".concat(ENV.API_SERVER, "/api/attachments.json"),
// ?debug=student&randomcode=undefined&client_key=6d57f8c3dd186c5ada392546ace9620a
onChange: function onChange(info) {
var _info$file;
var fileList = _toConsumableArray(info.fileList);
fileList = fileList.map(function (file) {
if (file.name.indexOf(uploadNameSizeSeperator) === -1) {
file.name = "".concat(file.name).concat(uploadNameSizeSeperator).concat(bytesToSize(file.size));
}
return _objectSpread({}, file);
});
if (info.file.status === 'done' && ((_info$file = info.file) === null || _info$file === void 0 || (_info$file = _info$file.response) === null || _info$file === void 0 ? void 0 : _info$file.status) === -1) {
var _info$file2;
message.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message);
_onChange([]);
return;
}
_onChange(fileList);
},
onRemove: function () {
var _onRemove = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
var fileSize, id, rs;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
fileSize = file.size / 1024 / 1024;
if (!(file.status === 'uploading')) {
_context.next = 3;
break;
}
return _context.abrupt("return", true);
case 3:
if (fileSize < maxSize) {
_context.next = 7;
break;
}
return _context.abrupt("return", true);
case 7:
id = file.response ? file.response.id : file.uid;
if (!id) {
_context.next = 15;
break;
}
_context.next = 11;
return removeAttachment(file.response ? file.response.id : file.id);
case 11:
rs = _context.sent;
return _context.abrupt("return", rs);
case 15:
return _context.abrupt("return", true);
case 16:
case "end":
return _context.stop();
}
}, _callee);
}));
function onRemove(_x) {
return _onRemove.apply(this, arguments);
}
return onRemove;
}()
};
function onCancel(e) {
e.preventDefault();
e.stopPropagation();
}
return /*#__PURE__*/_jsx("div", {
className: "single-upload ".concat(className ? className : ''),
children: /*#__PURE__*/_jsxs(Upload, _objectSpread(_objectSpread({}, uploadProps), {}, {
children: [/*#__PURE__*/_jsx(Button, {
type: "primary",
title: value.length > 0 ? '每次只能上传一个资源, 删除下面资源可重新上传 ' : '',
disabled: value.length > 0,
ghost: true,
children: title
}), /*#__PURE__*/_jsxs("span", {
onClick: onCancel,
style: {
marginLeft: 10
},
children: ["(\u5355\u4E2A\u6587\u4EF6\u6700\u5927", maxSize, "M)", ' ']
})]
}))
});
});
/***/ }),
/***/ 819:
/*!***************************************************************************************************************!*\
!*** ./src/pages/Classrooms/Lists/CommonHomework/Detail/components/ConfigWorks/HiddenSetting/GroupAppeal.tsx ***!

@ -377,8 +377,8 @@ var PoweroffOutlined = __webpack_require__(84078);
var lib = __webpack_require__(56102);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
var _umi_production_exports = __webpack_require__(12712);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 3 modules
var MultiUpload = __webpack_require__(80638);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(99531);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(17985);
// EXTERNAL MODULE: ./src/utils/fetch.ts

@ -1,9 +1,9 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[80638],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[99531],{
/***/ 80638:
/***/ 99531:
/*!**********************************************************!*\
!*** ./src/components/MultiUpload/index.tsx + 3 modules ***!
!*** ./src/components/MultiUpload/index.tsx + 2 modules ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
@ -34,7 +34,7 @@ var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/index.js + 24 modules
var upload = __webpack_require__(46651);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
var es_message = __webpack_require__(8591);
var message = __webpack_require__(8591);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
var modal = __webpack_require__(43418);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
@ -43,136 +43,8 @@ var es_button = __webpack_require__(3113);
var env = __webpack_require__(17985);
// EXTERNAL MODULE: ./src/pages/MoopCases/FormPanel/service.ts
var service = __webpack_require__(52989);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/components/SingleUpload/index.tsx
var uploadNameSizeSeperator = '  ';
function bytesToSize(bytes) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
if (bytes == 0) return '0 Byte';
var i = parseInt('' + Math.floor(Math.log(bytes) / Math.log(1024)), 10);
return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i];
}
/* harmony default export */ var SingleUpload = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? [] : _ref$value,
action = _ref.action,
_onChange = _ref.onChange,
className = _ref.className,
_ref$maxSize = _ref.maxSize,
maxSize = _ref$maxSize === void 0 ? 150 : _ref$maxSize,
_ref$title = _ref.title,
title = _ref$title === void 0 ? '文件上传' : _ref$title,
_ref$accept = _ref.accept,
accept = _ref$accept === void 0 ? null : _ref$accept;
var uploadProps = {
multiple: false,
fileList: value,
accept: accept,
withCredentials: true,
beforeUpload: function beforeUpload(file) {
var fileSize = file.size / 1024 / 1024;
if (!(fileSize < maxSize)) {
message.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20"));
return Promise.reject();
}
return true;
},
action: "".concat(ENV.API_SERVER, "/api/attachments.json"),
// ?debug=student&randomcode=undefined&client_key=6d57f8c3dd186c5ada392546ace9620a
onChange: function onChange(info) {
var _info$file;
var fileList = _toConsumableArray(info.fileList);
fileList = fileList.map(function (file) {
if (file.name.indexOf(uploadNameSizeSeperator) === -1) {
file.name = "".concat(file.name).concat(uploadNameSizeSeperator).concat(bytesToSize(file.size));
}
return _objectSpread({}, file);
});
if (info.file.status === 'done' && ((_info$file = info.file) === null || _info$file === void 0 || (_info$file = _info$file.response) === null || _info$file === void 0 ? void 0 : _info$file.status) === -1) {
var _info$file2;
message.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message);
_onChange([]);
return;
}
_onChange(fileList);
},
onRemove: function () {
var _onRemove = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
var fileSize, id, rs;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
fileSize = file.size / 1024 / 1024;
if (!(file.status === 'uploading')) {
_context.next = 3;
break;
}
return _context.abrupt("return", true);
case 3:
if (fileSize < maxSize) {
_context.next = 7;
break;
}
return _context.abrupt("return", true);
case 7:
id = file.response ? file.response.id : file.uid;
if (!id) {
_context.next = 15;
break;
}
_context.next = 11;
return removeAttachment(file.response ? file.response.id : file.id);
case 11:
rs = _context.sent;
return _context.abrupt("return", rs);
case 15:
return _context.abrupt("return", true);
case 16:
case "end":
return _context.stop();
}
}, _callee);
}));
function onRemove(_x) {
return _onRemove.apply(this, arguments);
}
return onRemove;
}()
};
function onCancel(e) {
e.preventDefault();
e.stopPropagation();
}
return /*#__PURE__*/_jsx("div", {
className: "single-upload ".concat(className ? className : ''),
children: /*#__PURE__*/_jsxs(Upload, _objectSpread(_objectSpread({}, uploadProps), {}, {
children: [/*#__PURE__*/_jsx(Button, {
type: "primary",
title: value.length > 0 ? '每次只能上传一个资源, 删除下面资源可重新上传 ' : '',
disabled: value.length > 0,
ghost: true,
children: title
}), /*#__PURE__*/_jsxs("span", {
onClick: onCancel,
style: {
marginLeft: 10
},
children: ["(\u5355\u4E2A\u6587\u4EF6\u6700\u5927", maxSize, "M)", ' ']
})]
}))
});
});
// EXTERNAL MODULE: ./src/components/SingleUpload/index.tsx
var SingleUpload = __webpack_require__(95081);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/InboxOutlined.js + 1 modules
var InboxOutlined = __webpack_require__(93737);
// EXTERNAL MODULE: ./node_modules/_lodash@4.17.21@lodash/lodash.js
@ -228,6 +100,8 @@ var SvgUploadImg = function SvgUploadImg(props) {
};
/* harmony default export */ var uploadImg = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjM1NCAzLjVoLTIuNzd2OC4xNjdINi40MTZWMy41SDMuNjQ2TDcgMGwzLjM1NCAzLjVaTTE0IDdoLTEuMTY3djUuODMzSDEuMTY3VjdIMHY3aDE0VjdaIiBmaWxsPSIjMzA2MUQwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=");
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/components/MultiUpload/index.tsx
@ -253,7 +127,7 @@ function coverToFileList(data) {
return {
uid: item.id,
id: item.id,
name: item.title + uploadNameSizeSeperator + item.filesize,
name: item.title + SingleUpload/* uploadNameSizeSeperator */.sX + item.filesize,
url: item.url,
filesize: item.filesize,
status: 'done',
@ -326,7 +200,7 @@ function coverToFileList(data) {
if (fileList.concat(fileArr).length > number) {
fileList.pop();
setFileList(toConsumableArray_default()(fileList));
es_message/* default */.ZP.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(number, "\u4E2A\u6587\u4EF6"));
message/* default */.ZP.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(number, "\u4E2A\u6587\u4EF6"));
if (aloneClear) {
return Promise.reject();
}
@ -334,7 +208,7 @@ function coverToFileList(data) {
return false;
}
if (!(fileSize < maxSize)) {
es_message/* default */.ZP.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB)."));
message/* default */.ZP.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB)."));
if (aloneClear) {
return Promise.reject();
}
@ -355,7 +229,7 @@ function coverToFileList(data) {
}
if (info.file.status === 'done' && ((_info$file = info.file) === null || _info$file === void 0 || (_info$file = _info$file.response) === null || _info$file === void 0 ? void 0 : _info$file.status) === -1) {
var _info$file2;
es_message/* default */.ZP.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message);
message/* default */.ZP.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message);
return;
}
if (fileList.length >= number) setDisabled(true);else setDisabled(false);
@ -366,8 +240,8 @@ function coverToFileList(data) {
var _file$response2;
file.url = "/api/attachments/".concat(file === null || file === void 0 || (_file$response2 = file.response) === null || _file$response2 === void 0 ? void 0 : _file$response2.id);
}
if (file.name.indexOf(uploadNameSizeSeperator) === -1) {
file.name = "".concat(file.name).concat(uploadNameSizeSeperator).concat(bytesToSize(file.size));
if (file.name.indexOf(SingleUpload/* uploadNameSizeSeperator */.sX) === -1) {
file.name = "".concat(file.name).concat(SingleUpload/* uploadNameSizeSeperator */.sX).concat((0,SingleUpload/* bytesToSize */.RD)(file.size));
}
return objectSpread2_default()({}, file);
});
@ -433,7 +307,7 @@ function coverToFileList(data) {
return remove();
case 2:
res = _context2.sent;
es_message/* default */.ZP.success('删除成功');
message/* default */.ZP.success('删除成功');
resolve(true);
case 5:
case "end":
@ -501,6 +375,158 @@ function coverToFileList(data) {
/***/ }),
/***/ 95081:
/*!***********************************************!*\
!*** ./src/components/SingleUpload/index.tsx ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ RD: function() { return /* binding */ bytesToSize; },
/* harmony export */ sX: function() { return /* binding */ uploadNameSizeSeperator; }
/* harmony export */ });
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js */ 41498);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js */ 37205);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _utils_env__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/utils/env */ 17985);
/* harmony import */ var _pages_MoopCases_FormPanel_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/pages/MoopCases/FormPanel/service */ 52989);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
var uploadNameSizeSeperator = '  ';
function bytesToSize(bytes) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
if (bytes == 0) return '0 Byte';
var i = parseInt('' + Math.floor(Math.log(bytes) / Math.log(1024)), 10);
return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i];
}
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? [] : _ref$value,
action = _ref.action,
_onChange = _ref.onChange,
className = _ref.className,
_ref$maxSize = _ref.maxSize,
maxSize = _ref$maxSize === void 0 ? 150 : _ref$maxSize,
_ref$title = _ref.title,
title = _ref$title === void 0 ? '文件上传' : _ref$title,
_ref$accept = _ref.accept,
accept = _ref$accept === void 0 ? null : _ref$accept;
var uploadProps = {
multiple: false,
fileList: value,
accept: accept,
withCredentials: true,
beforeUpload: function beforeUpload(file) {
var fileSize = file.size / 1024 / 1024;
if (!(fileSize < maxSize)) {
message.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20"));
return Promise.reject();
}
return true;
},
action: "".concat(ENV.API_SERVER, "/api/attachments.json"),
// ?debug=student&randomcode=undefined&client_key=6d57f8c3dd186c5ada392546ace9620a
onChange: function onChange(info) {
var _info$file;
var fileList = _toConsumableArray(info.fileList);
fileList = fileList.map(function (file) {
if (file.name.indexOf(uploadNameSizeSeperator) === -1) {
file.name = "".concat(file.name).concat(uploadNameSizeSeperator).concat(bytesToSize(file.size));
}
return _objectSpread({}, file);
});
if (info.file.status === 'done' && ((_info$file = info.file) === null || _info$file === void 0 || (_info$file = _info$file.response) === null || _info$file === void 0 ? void 0 : _info$file.status) === -1) {
var _info$file2;
message.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message);
_onChange([]);
return;
}
_onChange(fileList);
},
onRemove: function () {
var _onRemove = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
var fileSize, id, rs;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
fileSize = file.size / 1024 / 1024;
if (!(file.status === 'uploading')) {
_context.next = 3;
break;
}
return _context.abrupt("return", true);
case 3:
if (fileSize < maxSize) {
_context.next = 7;
break;
}
return _context.abrupt("return", true);
case 7:
id = file.response ? file.response.id : file.uid;
if (!id) {
_context.next = 15;
break;
}
_context.next = 11;
return removeAttachment(file.response ? file.response.id : file.id);
case 11:
rs = _context.sent;
return _context.abrupt("return", rs);
case 15:
return _context.abrupt("return", true);
case 16:
case "end":
return _context.stop();
}
}, _callee);
}));
function onRemove(_x) {
return _onRemove.apply(this, arguments);
}
return onRemove;
}()
};
function onCancel(e) {
e.preventDefault();
e.stopPropagation();
}
return /*#__PURE__*/_jsx("div", {
className: "single-upload ".concat(className ? className : ''),
children: /*#__PURE__*/_jsxs(Upload, _objectSpread(_objectSpread({}, uploadProps), {}, {
children: [/*#__PURE__*/_jsx(Button, {
type: "primary",
title: value.length > 0 ? '每次只能上传一个资源, 删除下面资源可重新上传 ' : '',
disabled: value.length > 0,
ghost: true,
children: title
}), /*#__PURE__*/_jsxs("span", {
onClick: onCancel,
style: {
marginLeft: 10
},
children: ["(\u5355\u4E2A\u6587\u4EF6\u6700\u5927", maxSize, "M)", ' ']
})]
}))
});
});
/***/ }),
/***/ 52989:
/*!**************************************************!*\
!*** ./src/pages/MoopCases/FormPanel/service.ts ***!

@ -27,7 +27,7 @@
display: block !important;
}
</style><script>if(document.domain !== "www.educoder.net") document.title = '';</script>
<script src="/react/build/umi.e6075c25.js"></script>
<script src="/react/build/umi.08e3ba48.js"></script>
<script src="/react/build/js/public.js"></script>
</body>
</html>

@ -54,8 +54,8 @@ var ArrowLeftOutlined = __webpack_require__(22596);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Board/Add/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Addmodules = ({"flex_box_center":"flex_box_center___Zr62V","flex_space_between":"flex_space_between___MocyP","flex_box_vertical_center":"flex_box_vertical_center___q9TyA","flex_box_center_end":"flex_box_center_end___uv4oS","flex_box_column":"flex_box_column___Tkhbw","title":"title___vcf30","export":"export___WECx3","bg":"bg___cLnNg","tabs":"tabs___fDuTh","btn":"btn___ckSh1","sticky":"sticky___Jdoog"});
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 3 modules
var MultiUpload = __webpack_require__(80638);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(99531);
// EXTERNAL MODULE: ./src/utils/authority.ts
var authority = __webpack_require__(33287);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js

@ -52,8 +52,8 @@ var ArrowLeftOutlined = __webpack_require__(22596);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Board/Edit/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Editmodules = ({"flex_box_center":"flex_box_center___bErbF","flex_space_between":"flex_space_between___X4dC_","flex_box_vertical_center":"flex_box_vertical_center___gHQ8N","flex_box_center_end":"flex_box_center_end___Smiak","flex_box_column":"flex_box_column___uAEy9","title":"title___weIJS","export":"export___Z0YvH","bg":"bg___wQbLV","tabs":"tabs___PRyjG","btn":"btn___y2qNz","sticky":"sticky___AmErR"});
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 3 modules
var MultiUpload = __webpack_require__(80638);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(99531);
// EXTERNAL MODULE: ./src/utils/authority.ts
var authority = __webpack_require__(33287);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js

@ -46,8 +46,8 @@ var service_shixunHomeworks = __webpack_require__(41027);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/Add/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Addmodules = ({"bg":"bg___mk00l","flexRow":"flexRow___cF86d","flexJustifyCenter":"flexJustifyCenter___xffJH","flexAlignEnd":"flexAlignEnd___XZNbd","flexAlignCenter":"flexAlignCenter___rBycD","flexColumn":"flexColumn___bvZmC","formWrap":"formWrap___IeMB8","titleWrap":"titleWrap___jBULn","fieldWrap":"fieldWrap___mRoj3","mdWrap":"mdWrap___XC6AD","backgroundFa":"backgroundFa___dCgV1","button":"button___ga1Ue"});
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 3 modules
var MultiUpload = __webpack_require__(80638);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(99531);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(26795);
// EXTERNAL MODULE: ./src/components/AddPoints/index.tsx + 2 modules

@ -7610,7 +7610,7 @@ var CommonHomeworkDetail = function CommonHomeworkDetail(_ref) {
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! antd */ 98135);
/* harmony import */ var _service_shixunHomeworks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/service/shixunHomeworks */ 41027);
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! umi */ 12712);
/* harmony import */ var _components_MultiUpload__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/MultiUpload */ 80638);
/* harmony import */ var _components_MultiUpload__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/MultiUpload */ 99531);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react/jsx-runtime */ 37712);

@ -49,8 +49,8 @@ var service_shixunHomeworks = __webpack_require__(41027);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/EditWork/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var EditWorkmodules = ({"flex_box_center":"flex_box_center___GSZm1","flex_space_between":"flex_space_between___CqZVt","flex_box_vertical_center":"flex_box_vertical_center___qljQ5","flex_box_center_end":"flex_box_center_end___sDM6r","flex_box_column":"flex_box_column___sHSL3","bg":"bg___J84pl","flexRow":"flexRow___Pr6cS","flexJustifyCenter":"flexJustifyCenter___Ncnh8","flexAlignEnd":"flexAlignEnd___In8cH","flexAlignCenter":"flexAlignCenter___PDuBO","flexColumn":"flexColumn___gE1bq","formWrap":"formWrap___W4Lac","titleWrap":"titleWrap____Ia29","fieldWrap":"fieldWrap___OJdJh","mdWrap":"mdWrap___adquF","backgroundFa":"backgroundFa___J8U3h","button":"button___VA52Q","searchMember":"searchMember___jBt4d"});
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 3 modules
var MultiUpload = __webpack_require__(80638);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(99531);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/EditWork/index.tsx

@ -46,8 +46,8 @@ var service_shixunHomeworks = __webpack_require__(41027);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/Edit/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Editmodules = ({"bg":"bg___ZTexa","flexRow":"flexRow___VO4ro","flexJustifyCenter":"flexJustifyCenter___OXFkk","flexAlignEnd":"flexAlignEnd___d6zIM","flexAlignCenter":"flexAlignCenter___YzqD8","flexColumn":"flexColumn___RKoTE","formWrap":"formWrap___BxAFG","titleWrap":"titleWrap___tvKuf","fieldWrap":"fieldWrap___eigdN","mdWrap":"mdWrap___cmz87","backgroundFa":"backgroundFa___b57J2","button":"button___VVH5U"});
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 3 modules
var MultiUpload = __webpack_require__(80638);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(99531);
// EXTERNAL MODULE: ./src/components/AddPoints/index.tsx + 2 modules
var AddPoints = __webpack_require__(45563);
// EXTERNAL MODULE: ./src/utils/fetch.ts

@ -844,8 +844,8 @@ var DelShixun = function DelShixun(_ref) {
var RenderHtml = __webpack_require__(6150);
// EXTERNAL MODULE: ./node_modules/_lodash@4.17.21@lodash/lodash.js
var lodash = __webpack_require__(89392);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 3 modules
var MultiUpload = __webpack_require__(80638);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(99531);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/Review/components/AfterAppendix.tsx

@ -49,8 +49,8 @@ var service_shixunHomeworks = __webpack_require__(41027);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/SubmitWork/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var SubmitWorkmodules = ({"flex_box_center":"flex_box_center___HcDSI","flex_space_between":"flex_space_between___Apy3C","flex_box_vertical_center":"flex_box_vertical_center___D1ebH","flex_box_center_end":"flex_box_center_end___RoAdV","flex_box_column":"flex_box_column___o0Rwk","bg":"bg___TiMPN","flexRow":"flexRow___z3dqH","flexJustifyCenter":"flexJustifyCenter___PBTpD","flexAlignEnd":"flexAlignEnd___vbqsb","flexAlignCenter":"flexAlignCenter___wRMBE","flexColumn":"flexColumn___ZjAyF","formWrap":"formWrap___t6WyS","titleWrap":"titleWrap___riXqq","fieldWrap":"fieldWrap___TBdw7","mdWrap":"mdWrap____nxvH","backgroundFa":"backgroundFa___gDA1e","button":"button___mpK6Z","searchMember":"searchMember___vifCN"});
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 3 modules
var MultiUpload = __webpack_require__(80638);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(99531);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/SubmitWork/index.tsx

@ -1,5 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[49890,80638,63276],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[49890,99531,63276],{
/***/ 28194:
/*!******************************************************!*\
@ -729,9 +729,9 @@ var CuttOffNow = function CuttOffNow(_ref) {
/***/ }),
/***/ 80638:
/***/ 99531:
/*!**********************************************************!*\
!*** ./src/components/MultiUpload/index.tsx + 3 modules ***!
!*** ./src/components/MultiUpload/index.tsx + 2 modules ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
@ -762,7 +762,7 @@ var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/index.js + 24 modules
var upload = __webpack_require__(46651);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
var es_message = __webpack_require__(8591);
var message = __webpack_require__(8591);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
var modal = __webpack_require__(43418);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
@ -771,136 +771,8 @@ var es_button = __webpack_require__(3113);
var env = __webpack_require__(17985);
// EXTERNAL MODULE: ./src/pages/MoopCases/FormPanel/service.ts
var service = __webpack_require__(52989);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/components/SingleUpload/index.tsx
var uploadNameSizeSeperator = '  ';
function bytesToSize(bytes) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
if (bytes == 0) return '0 Byte';
var i = parseInt('' + Math.floor(Math.log(bytes) / Math.log(1024)), 10);
return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i];
}
/* harmony default export */ var SingleUpload = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? [] : _ref$value,
action = _ref.action,
_onChange = _ref.onChange,
className = _ref.className,
_ref$maxSize = _ref.maxSize,
maxSize = _ref$maxSize === void 0 ? 150 : _ref$maxSize,
_ref$title = _ref.title,
title = _ref$title === void 0 ? '文件上传' : _ref$title,
_ref$accept = _ref.accept,
accept = _ref$accept === void 0 ? null : _ref$accept;
var uploadProps = {
multiple: false,
fileList: value,
accept: accept,
withCredentials: true,
beforeUpload: function beforeUpload(file) {
var fileSize = file.size / 1024 / 1024;
if (!(fileSize < maxSize)) {
message.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20"));
return Promise.reject();
}
return true;
},
action: "".concat(ENV.API_SERVER, "/api/attachments.json"),
// ?debug=student&randomcode=undefined&client_key=6d57f8c3dd186c5ada392546ace9620a
onChange: function onChange(info) {
var _info$file;
var fileList = _toConsumableArray(info.fileList);
fileList = fileList.map(function (file) {
if (file.name.indexOf(uploadNameSizeSeperator) === -1) {
file.name = "".concat(file.name).concat(uploadNameSizeSeperator).concat(bytesToSize(file.size));
}
return _objectSpread({}, file);
});
if (info.file.status === 'done' && ((_info$file = info.file) === null || _info$file === void 0 || (_info$file = _info$file.response) === null || _info$file === void 0 ? void 0 : _info$file.status) === -1) {
var _info$file2;
message.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message);
_onChange([]);
return;
}
_onChange(fileList);
},
onRemove: function () {
var _onRemove = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
var fileSize, id, rs;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
fileSize = file.size / 1024 / 1024;
if (!(file.status === 'uploading')) {
_context.next = 3;
break;
}
return _context.abrupt("return", true);
case 3:
if (fileSize < maxSize) {
_context.next = 7;
break;
}
return _context.abrupt("return", true);
case 7:
id = file.response ? file.response.id : file.uid;
if (!id) {
_context.next = 15;
break;
}
_context.next = 11;
return removeAttachment(file.response ? file.response.id : file.id);
case 11:
rs = _context.sent;
return _context.abrupt("return", rs);
case 15:
return _context.abrupt("return", true);
case 16:
case "end":
return _context.stop();
}
}, _callee);
}));
function onRemove(_x) {
return _onRemove.apply(this, arguments);
}
return onRemove;
}()
};
function onCancel(e) {
e.preventDefault();
e.stopPropagation();
}
return /*#__PURE__*/_jsx("div", {
className: "single-upload ".concat(className ? className : ''),
children: /*#__PURE__*/_jsxs(Upload, _objectSpread(_objectSpread({}, uploadProps), {}, {
children: [/*#__PURE__*/_jsx(Button, {
type: "primary",
title: value.length > 0 ? '每次只能上传一个资源, 删除下面资源可重新上传 ' : '',
disabled: value.length > 0,
ghost: true,
children: title
}), /*#__PURE__*/_jsxs("span", {
onClick: onCancel,
style: {
marginLeft: 10
},
children: ["(\u5355\u4E2A\u6587\u4EF6\u6700\u5927", maxSize, "M)", ' ']
})]
}))
});
});
// EXTERNAL MODULE: ./src/components/SingleUpload/index.tsx
var SingleUpload = __webpack_require__(95081);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/InboxOutlined.js + 1 modules
var InboxOutlined = __webpack_require__(93737);
// EXTERNAL MODULE: ./node_modules/_lodash@4.17.21@lodash/lodash.js
@ -956,6 +828,8 @@ var SvgUploadImg = function SvgUploadImg(props) {
};
/* harmony default export */ var uploadImg = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjM1NCAzLjVoLTIuNzd2OC4xNjdINi40MTZWMy41SDMuNjQ2TDcgMGwzLjM1NCAzLjVaTTE0IDdoLTEuMTY3djUuODMzSDEuMTY3VjdIMHY3aDE0VjdaIiBmaWxsPSIjMzA2MUQwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=");
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/components/MultiUpload/index.tsx
@ -981,7 +855,7 @@ function coverToFileList(data) {
return {
uid: item.id,
id: item.id,
name: item.title + uploadNameSizeSeperator + item.filesize,
name: item.title + SingleUpload/* uploadNameSizeSeperator */.sX + item.filesize,
url: item.url,
filesize: item.filesize,
status: 'done',
@ -1054,7 +928,7 @@ function coverToFileList(data) {
if (fileList.concat(fileArr).length > number) {
fileList.pop();
setFileList(toConsumableArray_default()(fileList));
es_message/* default */.ZP.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(number, "\u4E2A\u6587\u4EF6"));
message/* default */.ZP.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(number, "\u4E2A\u6587\u4EF6"));
if (aloneClear) {
return Promise.reject();
}
@ -1062,7 +936,7 @@ function coverToFileList(data) {
return false;
}
if (!(fileSize < maxSize)) {
es_message/* default */.ZP.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB)."));
message/* default */.ZP.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB)."));
if (aloneClear) {
return Promise.reject();
}
@ -1083,7 +957,7 @@ function coverToFileList(data) {
}
if (info.file.status === 'done' && ((_info$file = info.file) === null || _info$file === void 0 || (_info$file = _info$file.response) === null || _info$file === void 0 ? void 0 : _info$file.status) === -1) {
var _info$file2;
es_message/* default */.ZP.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message);
message/* default */.ZP.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message);
return;
}
if (fileList.length >= number) setDisabled(true);else setDisabled(false);
@ -1094,8 +968,8 @@ function coverToFileList(data) {
var _file$response2;
file.url = "/api/attachments/".concat(file === null || file === void 0 || (_file$response2 = file.response) === null || _file$response2 === void 0 ? void 0 : _file$response2.id);
}
if (file.name.indexOf(uploadNameSizeSeperator) === -1) {
file.name = "".concat(file.name).concat(uploadNameSizeSeperator).concat(bytesToSize(file.size));
if (file.name.indexOf(SingleUpload/* uploadNameSizeSeperator */.sX) === -1) {
file.name = "".concat(file.name).concat(SingleUpload/* uploadNameSizeSeperator */.sX).concat((0,SingleUpload/* bytesToSize */.RD)(file.size));
}
return objectSpread2_default()({}, file);
});
@ -1161,7 +1035,7 @@ function coverToFileList(data) {
return remove();
case 2:
res = _context2.sent;
es_message/* default */.ZP.success('删除成功');
message/* default */.ZP.success('删除成功');
resolve(true);
case 5:
case "end":
@ -1229,6 +1103,158 @@ function coverToFileList(data) {
/***/ }),
/***/ 95081:
/*!***********************************************!*\
!*** ./src/components/SingleUpload/index.tsx ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ RD: function() { return /* binding */ bytesToSize; },
/* harmony export */ sX: function() { return /* binding */ uploadNameSizeSeperator; }
/* harmony export */ });
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js */ 41498);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js */ 37205);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _utils_env__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/utils/env */ 17985);
/* harmony import */ var _pages_MoopCases_FormPanel_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/pages/MoopCases/FormPanel/service */ 52989);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
var uploadNameSizeSeperator = '  ';
function bytesToSize(bytes) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
if (bytes == 0) return '0 Byte';
var i = parseInt('' + Math.floor(Math.log(bytes) / Math.log(1024)), 10);
return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i];
}
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? [] : _ref$value,
action = _ref.action,
_onChange = _ref.onChange,
className = _ref.className,
_ref$maxSize = _ref.maxSize,
maxSize = _ref$maxSize === void 0 ? 150 : _ref$maxSize,
_ref$title = _ref.title,
title = _ref$title === void 0 ? '文件上传' : _ref$title,
_ref$accept = _ref.accept,
accept = _ref$accept === void 0 ? null : _ref$accept;
var uploadProps = {
multiple: false,
fileList: value,
accept: accept,
withCredentials: true,
beforeUpload: function beforeUpload(file) {
var fileSize = file.size / 1024 / 1024;
if (!(fileSize < maxSize)) {
message.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20"));
return Promise.reject();
}
return true;
},
action: "".concat(ENV.API_SERVER, "/api/attachments.json"),
// ?debug=student&randomcode=undefined&client_key=6d57f8c3dd186c5ada392546ace9620a
onChange: function onChange(info) {
var _info$file;
var fileList = _toConsumableArray(info.fileList);
fileList = fileList.map(function (file) {
if (file.name.indexOf(uploadNameSizeSeperator) === -1) {
file.name = "".concat(file.name).concat(uploadNameSizeSeperator).concat(bytesToSize(file.size));
}
return _objectSpread({}, file);
});
if (info.file.status === 'done' && ((_info$file = info.file) === null || _info$file === void 0 || (_info$file = _info$file.response) === null || _info$file === void 0 ? void 0 : _info$file.status) === -1) {
var _info$file2;
message.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message);
_onChange([]);
return;
}
_onChange(fileList);
},
onRemove: function () {
var _onRemove = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
var fileSize, id, rs;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
fileSize = file.size / 1024 / 1024;
if (!(file.status === 'uploading')) {
_context.next = 3;
break;
}
return _context.abrupt("return", true);
case 3:
if (fileSize < maxSize) {
_context.next = 7;
break;
}
return _context.abrupt("return", true);
case 7:
id = file.response ? file.response.id : file.uid;
if (!id) {
_context.next = 15;
break;
}
_context.next = 11;
return removeAttachment(file.response ? file.response.id : file.id);
case 11:
rs = _context.sent;
return _context.abrupt("return", rs);
case 15:
return _context.abrupt("return", true);
case 16:
case "end":
return _context.stop();
}
}, _callee);
}));
function onRemove(_x) {
return _onRemove.apply(this, arguments);
}
return onRemove;
}()
};
function onCancel(e) {
e.preventDefault();
e.stopPropagation();
}
return /*#__PURE__*/_jsx("div", {
className: "single-upload ".concat(className ? className : ''),
children: /*#__PURE__*/_jsxs(Upload, _objectSpread(_objectSpread({}, uploadProps), {}, {
children: [/*#__PURE__*/_jsx(Button, {
type: "primary",
title: value.length > 0 ? '每次只能上传一个资源, 删除下面资源可重新上传 ' : '',
disabled: value.length > 0,
ghost: true,
children: title
}), /*#__PURE__*/_jsxs("span", {
onClick: onCancel,
style: {
marginLeft: 10
},
children: ["(\u5355\u4E2A\u6587\u4EF6\u6700\u5927", maxSize, "M)", ' ']
})]
}))
});
});
/***/ }),
/***/ 52781:
/*!**********************************************!*\
!*** ./src/components/TooltipTags/index.tsx ***!
@ -1290,7 +1316,7 @@ var TooltipTags = function TooltipTags(_ref) {
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! antd */ 98135);
/* harmony import */ var _service_shixunHomeworks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/service/shixunHomeworks */ 41027);
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! umi */ 12712);
/* harmony import */ var _components_MultiUpload__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/MultiUpload */ 80638);
/* harmony import */ var _components_MultiUpload__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/MultiUpload */ 99531);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react/jsx-runtime */ 37712);

@ -56,8 +56,8 @@ var es_button = __webpack_require__(3113);
/* harmony default export */ var Addmodules = ({"flex_box_center":"flex_box_center___xV7b6","flex_space_between":"flex_space_between___VKhsb","flex_box_vertical_center":"flex_box_vertical_center___ZeNry","flex_box_center_end":"flex_box_center_end___j462S","flex_box_column":"flex_box_column___zDUss","bg":"bg___I9Ce6","title":"title___N0IDa","titleLeft":"titleLeft___v14y3","titleRight":"titleRight___QkPDR","btns":"btns___QGvIi"});
// EXTERNAL MODULE: ./src/service/graduation.ts
var service_graduation = __webpack_require__(98726);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 3 modules
var MultiUpload = __webpack_require__(80638);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(99531);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Graduation/Tasks/Add/index.tsx

@ -56,8 +56,8 @@ var es_button = __webpack_require__(3113);
/* harmony default export */ var Editmodules = ({"flex_box_center":"flex_box_center___kxbNF","flex_space_between":"flex_space_between___Te3v3","flex_box_vertical_center":"flex_box_vertical_center___JIb6j","flex_box_center_end":"flex_box_center_end___cEF2a","flex_box_column":"flex_box_column___IiBIg","bg":"bg___FvwS3","title":"title___Tcifz","titleLeft":"titleLeft___E3nrq","titleRight":"titleRight___UwoN7","btns":"btns___Yd_8X"});
// EXTERNAL MODULE: ./src/service/graduation.ts
var service_graduation = __webpack_require__(98726);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 3 modules
var MultiUpload = __webpack_require__(80638);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(99531);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/Graduation/Tasks/Edit/index.tsx

@ -58,8 +58,8 @@ var service_shixunHomeworks = __webpack_require__(41027);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/GroupHomework/Add/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Addmodules = ({"bg":"bg___wrwMu","flexRow":"flexRow___tXDGx","flexJustifyCenter":"flexJustifyCenter___FJrBL","flexAlignEnd":"flexAlignEnd___Y_tEj","flexAlignCenter":"flexAlignCenter___KQIWk","flexColumn":"flexColumn___bt5NB","formWrap":"formWrap___zb3yW","titleWrap":"titleWrap___Tqypo","fieldWrap":"fieldWrap___LZQ8o","mdWrap":"mdWrap___oYoPg","backgroundFa":"backgroundFa___ilebm","button":"button___JhLyG"});
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 3 modules
var MultiUpload = __webpack_require__(80638);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(99531);
// EXTERNAL MODULE: ./src/components/AddPoints/index.tsx + 2 modules
var AddPoints = __webpack_require__(45563);
// EXTERNAL MODULE: ./src/utils/fetch.ts

@ -8487,7 +8487,7 @@ var Detail_ShixunsListPage = function ShixunsListPage(_ref) {
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! antd */ 98135);
/* harmony import */ var _service_shixunHomeworks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/service/shixunHomeworks */ 41027);
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! umi */ 12712);
/* harmony import */ var _components_MultiUpload__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/MultiUpload */ 80638);
/* harmony import */ var _components_MultiUpload__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/MultiUpload */ 99531);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react/jsx-runtime */ 37712);

@ -138,8 +138,8 @@ var service_shixunHomeworks = __webpack_require__(41027);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/GroupHomework/EditWork/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var EditWorkmodules = ({"flex_box_center":"flex_box_center___Oai0Y","flex_space_between":"flex_space_between___fZFK_","flex_box_vertical_center":"flex_box_vertical_center___RWV5x","flex_box_center_end":"flex_box_center_end___ajHAV","flex_box_column":"flex_box_column___jI14a","bg":"bg___cSxNp","flexRow":"flexRow___bc5Oj","flexJustifyCenter":"flexJustifyCenter___Nx05M","flexAlignEnd":"flexAlignEnd___DhuDB","flexAlignCenter":"flexAlignCenter___nIPvg","flexColumn":"flexColumn___KpeLE","formWrap":"formWrap___ORs91","titleWrap":"titleWrap___J_NOF","fieldWrap":"fieldWrap___G9hW5","mdWrap":"mdWrap___TuZ7q","backgroundFa":"backgroundFa___QRzbN","button":"button___S5k_z","Onerow":"Onerow___Pi45X","searchMember":"searchMember___oWEni","searchMemberHeader":"searchMemberHeader___K11IN"});
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 3 modules
var MultiUpload = __webpack_require__(80638);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(99531);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/GroupHomework/EditWork/index.tsx

@ -56,8 +56,8 @@ var service_shixunHomeworks = __webpack_require__(41027);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/GroupHomework/Edit/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Editmodules = ({"bg":"bg___znu26","flexRow":"flexRow___wGnqf","flexJustifyCenter":"flexJustifyCenter____vugD","flexAlignEnd":"flexAlignEnd___gq4z7","flexAlignCenter":"flexAlignCenter___xzbBs","flexColumn":"flexColumn___F71iN","formWrap":"formWrap___THE6p","titleWrap":"titleWrap___TPgV7","fieldWrap":"fieldWrap___vVJhC","mdWrap":"mdWrap___Wjo_5","backgroundFa":"backgroundFa___KSlqe","button":"button___HFajm"});
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 3 modules
var MultiUpload = __webpack_require__(80638);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(99531);
// EXTERNAL MODULE: ./src/components/AddPoints/index.tsx + 2 modules
var AddPoints = __webpack_require__(45563);
// EXTERNAL MODULE: ./src/utils/fetch.ts

@ -837,8 +837,8 @@ var DelShixun = function DelShixun(_ref) {
shixunHomeworks: shixunHomeworks
};
})(DelShixun));
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 3 modules
var MultiUpload = __webpack_require__(80638);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(99531);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/GroupHomework/Review/components/AfterAppendix.tsx

@ -138,8 +138,8 @@ var service_shixunHomeworks = __webpack_require__(41027);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/GroupHomework/SubmitWork/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var SubmitWorkmodules = ({"flex_box_center":"flex_box_center___zhDlQ","flex_space_between":"flex_space_between___G3Pry","flex_box_vertical_center":"flex_box_vertical_center___IidBt","flex_box_center_end":"flex_box_center_end___jySR4","flex_box_column":"flex_box_column___AzFAn","bg":"bg___wt09q","flexRow":"flexRow___D5fvl","flexJustifyCenter":"flexJustifyCenter___wXpVq","flexAlignEnd":"flexAlignEnd___L6jeu","flexAlignCenter":"flexAlignCenter___aGyHJ","flexColumn":"flexColumn____MXLR","formWrap":"formWrap___zUO3M","titleWrap":"titleWrap___WjWMI","fieldWrap":"fieldWrap___jarda","mdWrap":"mdWrap___Ig5ru","backgroundFa":"backgroundFa___kIq8U","button":"button___RImGP","Onerow":"Onerow___yUQfa","searchMember":"searchMember___ty7AP","searchMemberHeader":"searchMemberHeader___NA8eK"});
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 3 modules
var MultiUpload = __webpack_require__(80638);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(99531);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/GroupHomework/SubmitWork/index.tsx

@ -1281,7 +1281,7 @@ var TabMenu = function TabMenu(_ref) {
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! antd */ 98135);
/* harmony import */ var _service_shixunHomeworks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/service/shixunHomeworks */ 41027);
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! umi */ 12712);
/* harmony import */ var _components_MultiUpload__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/MultiUpload */ 80638);
/* harmony import */ var _components_MultiUpload__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/components/MultiUpload */ 99531);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react/jsx-runtime */ 37712);

@ -751,8 +751,8 @@ var Head = function Head(_ref) {
var exercise = __webpack_require__(44239);
// EXTERNAL MODULE: ./src/pages/Video/Detail/components/AddVideoModal/index.tsx + 1 modules
var AddVideoModal = __webpack_require__(8910);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 3 modules
var MultiUpload = __webpack_require__(80638);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(99531);
// EXTERNAL MODULE: ./src/pages/Paths/Detail/components/Sort/index.tsx + 1 modules
var Sort = __webpack_require__(33622);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules

@ -1650,8 +1650,8 @@ var CuttOffNowShixun = function CuttOffNowShixun(_ref) {
})(CuttOffNowShixun));
// EXTERNAL MODULE: ./src/service/shixunHomeworks.ts
var shixunHomeworks = __webpack_require__(41027);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 3 modules
var MultiUpload = __webpack_require__(80638);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(99531);
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/ProgramHomework/components/AfterAppendix.tsx

@ -5285,88 +5285,218 @@ span.CodeMirror-selectedtext {
display: block;
}
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/_css-loader@6.7.1@css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/_@umijs_bundler-webpack@4.2.10@@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/_@umijs_bundler-webpack@4.2.10@@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/pages/Competitions/Edit/view/components/Content.less?modules ***!
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.flex_box_center___Y72kq {
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/_css-loader@6.7.1@css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/_@umijs_bundler-webpack@4.2.10@@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/_@umijs_bundler-webpack@4.2.10@@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/pages/Competitions/Edit/view/components/Content/index.less?modules ***!
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.formDiv___yzTTW [class~='ant-upload-list-item-info'] {
height: 26px;
background: #f6f7f9;
border-radius: 15px;
}
.formDiv___yzTTW [class~='ant-upload-list-item-name'] {
line-height: 26px;
}
.formDiv___yzTTW [class~='anticon'] {
line-height: 20px;
}
.formDiv___yzTTW [class~='ant-upload-list-item'] {
margin-top: 10px;
}
.FileList___Qf10g {
margin-top: 20px;
display: inline-block;
padding: 7px 10px;
background: #f6f7f9;
border-radius: 15px;
}
.deletetitle___roN6D {
cursor: pointer;
}
.deletetitle___roN6D:hover {
color: red;
}
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/_css-loader@6.7.1@css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/_@umijs_bundler-webpack@4.2.10@@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/_@umijs_bundler-webpack@4.2.10@@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/components/QuestionEditor/index.less?modules ***!
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wrap___ilWvf div[class~='ant-form-item'] {
margin-bottom: 0;
}
.wrap___ilWvf div[class~='ant-form-item-explain-error'] {
display: none;
}
.wrap___ilWvf .deleteIcon___JBDG8 {
color: #E30000;
font-size: 14px;
}
.wrap___ilWvf .keywordTag___iieCb {
padding: 10px 10px 10px 8px;
font-size: 14px;
font-weight: 400;
color: #000000;
}
.questionTitleEditorWrap___MHB5s {
margin-bottom: 18px;
}
.choiceWrap___QFkTc {
margin-bottom: 20px;
}
.choiceWrap___QFkTc .choiceIndex___Mr2YO {
display: flex;
flex: 0 0 auto;
justify-content: center;
align-items: center;
-webkit-justify-content: center;
box-align: center;
width: 46px;
height: 46px;
border-radius: 23px;
border: 1px solid #DCDCDC;
font-size: 16px;
font-weight: 400;
color: #464F66;
cursor: pointer;
}
.flex_space_between___d30ej {
justify-content: space-between;
-webkit-box-pack: justify;
.choiceWrap___QFkTc .choiceIndex___Mr2YO.judgementIndex___fUVWK {
border-radius: 2px;
}
.flex_box_vertical_center___p_tif {
.choiceWrap___QFkTc .setAnswerBtn___Whox5 {
border-radius: 2px;
border: 1px solid #DCDCDC;
font-size: 14px;
font-weight: 400;
color: #9096A3;
height: 46px;
display: flex;
align-items: center;
box-align: center;
padding: 0 16px;
cursor: pointer;
}
.flex_box_center_end___AyBVH {
justify-content: flex-end;
.choiceWrap___QFkTc .activeAnswer___fGU6Y {
background-color: #37AD83;
border-color: #37AD83;
color: #fff;
}
.choiceWrap___QFkTc .activeJudgementAnswer___wJv8P {
background-color: #ebf6f2;
border-color: #37AD83;
color: #37AD83;
}
.choiceWrap___QFkTc .actionWrapper___ERQ7k {
display: flex;
align-items: center;
-webkit-justify-content: flex-end;
-webkit-align-items: center;
-webkit-box-align: center;
-webkit-box-pack: end;
box-align: center;
box-pack: end;
justify-content: flex-end;
margin: auto 0 auto 20px;
}
.flex_box_column___NQalW {
flex-direction: column;
box-orient: block-axis;
.choiceWrap___QFkTc .actionWrapper___ERQ7k .addIcon___L9TE0 {
color: #2FA34F;
font-size: 14px;
}
.bg___cLFww {
width: 100%;
padding: 30px;
min-height: 400px;
.choiceWrap___QFkTc .actionWrapper___ERQ7k .deleteIcon___JBDG8 {
color: #E30000;
font-size: 14px;
margin-left: 20px;
}
.bg___cLFww [class~='ant-checkbox'] + span {
padding-right: 0px;
.inputBorder___Q5tRE {
border-radius: 2px;
border: 1px solid #DCDCDC;
padding: 8px 12px;
font-size: 14px;
min-height: 46px;
display: flex;
align-items: center;
}
.bg___cLFww .btns___uWjSy {
.placeholder___p9sFY {
font-size: 14px;
font-weight: 400;
color: #9096A3;
}
.blankWrapper___nC45e {
display: flex;
align-items: center;
justify-content: end;
margin-top: 30px;
}
.bg___cLFww .btns___uWjSy .confirm___ZvnTx {
width: 128px;
height: 38px;
background: #3061D0;
box-shadow: 0px 2px 4px 0px #E0DFE1;
.blankWrapper___nC45e .blankInput___pEHsx {
border-radius: 2px;
border: 1px solid #DCDCDC;
height: 46px;
font-size: 14px;
color: #FFFFFF;
text-align: center;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: pointer;
margin-left: 20px;
}
.bg___cLFww .btns___uWjSy .cancel___v9uv4 {
width: 60px;
height: 38px;
background: #fff;
border-radius: 2px;
border: 1px solid #bacffe7c;
.blankInputNumberWrapper___uEHb0 div[class~='ant-form-item-label'] {
line-height: 46px;
}
.blankInputNumberWrapper___uEHb0 [class~="ant-row"] {
align-items: center !important;
}
.blankInputNumberWrapper___uEHb0 input[class~='ant-input-number-input'] {
font-size: 14px;
color: #3061D0;
text-align: center;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: pointer;
height: 46px;
}
.bg___cLFww .deletetitle___DnoRO {
margin-left: 20px;
.addBtn___WR5ZI {
display: flex;
justify-content: center;
align-items: center;
width: 80px;
height: 32px;
background: #3061D0;
box-shadow: 0px 2px 4px 0px #E0DFE1, inset 0px -1px 3px 0px rgba(255, 255, 255, 0.5);
border-radius: 16px;
cursor: pointer;
font-weight: 400;
color: #FFFFFF;
font-size: 12px;
}
.bg___cLFww .deletetitle___DnoRO:hover {
color: red;
.blankIndex___x9Pny {
font-size: 14px;
font-weight: 400;
color: #666666;
}
.baseInputWrapper___eVsG7 div[class~='ant-form-item-label'] {
line-height: 56px;
}
.baseInputWrapper___eVsG7 input[class~='ant-input-number-input'] {
font-size: 14px;
}
div[class~='ant-collapse-borderless'] {
background-color: #fff;
}
.collapseWrapper___ZTysU {
margin-bottom: 30px;
}
.collapseWrapper___ZTysU div[class~='ant-collapse-item'] {
margin-bottom: 20px;
border: none;
box-shadow: 0px 2px 4px 0px #EAEEF4;
}
.collapseWrapper___ZTysU div[class~='ant-collapse-item'] div[class~='ant-collapse-header'] {
padding: 0 20px !important;
height: 64px !important;
background-color: #F6F7F8;
align-items: center !important;
}
.collapseWrapper___ZTysU div[class~='ant-collapse-item'] div[class~='ant-collapse-content'] {
background-color: #fff !important;
}
.collapseWrapper___ZTysU div[class~='ant-collapse-item'] div[class~='ant-collapse-content'] div[class~='ant-collapse-content-box'] {
padding: 20px 40px !important;
}
.collapseWrapper___ZTysU div[class~='ant-collapse-item-active'] div[class~='ant-collapse-header'] {
background-color: #eaeffa !important;
}
.collapseWrapper___ZTysU .panelHeader___QSN9g {
font-size: 14px;
font-weight: 400;
color: #000000;
}
.collapseWrapper___ZTysU .panelHeader___QSN9g span {
color: #666666;
}
.collapseWrapper___ZTysU .open___B6FU9 {
color: #165DFF;
transform: rotateZ(90deg);
}
.collapseWrapper___ZTysU .close___QX19r {
color: #82A8FF;
}
.hide___mn25n {
display: none;
}
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\

@ -159,6 +159,81 @@ var AsyncButton = function AsyncButton(_ref) {
}));
};
/***/ }),
/***/ 56107:
/*!**********************************************************!*\
!*** ./src/components/QuestionEditor/MdEditorInForm.tsx ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ h: function() { return /* binding */ MdEditorInForm; },
/* harmony export */ x: function() { return /* binding */ RegularInput; }
/* harmony export */ });
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js */ 39647);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _components_markdown_editor__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/markdown-editor */ 58273);
/* harmony import */ var _index_less_modules__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./index.less?modules */ 72008);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _components_RenderHtml__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/components/RenderHtml */ 6150);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
var _excluded = ["value", "onChange", "scrollId"];
var MdEditorInForm = function MdEditorInForm(_ref) {
var value = _ref.value,
_onChange = _ref.onChange,
scrollId = _ref.scrollId,
props = _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_1___default()(_ref, _excluded);
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", {
id: scrollId || '',
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_components_markdown_editor__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, props), {}, {
// hidetoolBar
defaultValue: value,
onChange: function onChange(a, b) {
console.log("a:", a, b);
if (!!(b !== null && b !== void 0 && b.length)) _onChange(a, b);else _onChange(a);
}
}))
});
};
var RegularInput = function RegularInput(_ref2) {
var value = _ref2.value,
onChange = _ref2.onChange,
placeholder = _ref2.placeholder,
_ref2$height = _ref2.height,
height = _ref2$height === void 0 ? 140 : _ref2$height,
isEdit = _ref2.isEdit;
return isEdit ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_components_markdown_editor__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, {
watch: true,
isFocus: true,
height: height,
placeholder: placeholder,
defaultValue: value,
onChange: onChange
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", {
style: {
cursor: 'pointer'
},
children: value ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)(_components_RenderHtml__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {
className: _index_less_modules__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z.inputBorder,
value: value
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_6__.jsx)("div", {
className: "".concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z.inputBorder, " ").concat(_index_less_modules__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z.placeholder),
children: placeholder
})
});
};
/***/ }),
/***/ 33099:
@ -3332,7 +3407,7 @@ function useInterval(callback, delay) {
/***/ }),
/***/ 79327:
/***/ 21067:
/*!************************************************************!*\
!*** ./src/pages/Competitions/Edit/index.tsx + 42 modules ***!
\************************************************************/
@ -9379,19 +9454,18 @@ var DragQuestions = function DragQuestions(_ref) {
});
};
/* harmony default export */ var LeftItem = (DragQuestions);
;// CONCATENATED MODULE: ./src/pages/Competitions/Edit/view/components/Content.less?modules
;// CONCATENATED MODULE: ./src/pages/Competitions/Edit/view/components/Content/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Contentmodules = ({"flex_box_center":"flex_box_center___Y72kq","flex_space_between":"flex_space_between___d30ej","flex_box_vertical_center":"flex_box_vertical_center___p_tif","flex_box_center_end":"flex_box_center_end___AyBVH","flex_box_column":"flex_box_column___NQalW","bg":"bg___cLFww","btns":"btns___uWjSy","confirm":"confirm___ZvnTx","cancel":"cancel___v9uv4","deletetitle":"deletetitle___DnoRO"});
/* harmony default export */ var Contentmodules = ({"formDiv":"formDiv___yzTTW","FileList":"FileList___Qf10g","deletetitle":"deletetitle___roN6D"});
// EXTERNAL MODULE: ./src/components/QuestionEditor/MdEditorInForm.tsx
var MdEditorInForm = __webpack_require__(56107);
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 2 modules
var RenderHtml = __webpack_require__(6150);
;// CONCATENATED MODULE: ./src/pages/Competitions/Edit/view/components/Content.tsx
;// CONCATENATED MODULE: ./src/pages/Competitions/Edit/view/components/Content/index.tsx
var Content_excluded = ["competitions", "globalSetting", "loading", "dispatch", "selectedKeys", "isedit", "setisedit", "user"];
@ -9405,334 +9479,321 @@ var Content_excluded = ["competitions", "globalSetting", "loading", "dispatch",
var Content_competitionsPage = function competitionsPage(_ref) {
var competitions = _ref.competitions,
globalSetting = _ref.globalSetting,
var Content = function Content(_ref) {
var dispatch = _ref.dispatch,
competitions = _ref.competitions,
loading = _ref.loading,
dispatch = _ref.dispatch,
selectedKeys = _ref.selectedKeys,
isedit = _ref.isedit,
setisedit = _ref.setisedit,
user = _ref.user,
props = objectWithoutProperties_default()(_ref, Content_excluded);
setIsedit = _ref.setIsedit,
setselectedKeys = _ref.setselectedKeys;
var _Form$useForm = es_form/* default */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
form = _Form$useForm2[0];
var MdContent = competitions.MdContent;
var _useParams = (0,_umi_production_exports.useParams)(),
identifier = _useParams.identifier;
var RightItems = competitions.RightItems;
var _useState = (0,_react_17_0_2_react.useState)([]),
_useState2 = slicedToArray_default()(_useState, 2),
defaultFileList = _useState2[0],
setDefaultFileList = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(RightItems.md_content),
fileList = _useState2[0],
setFileList = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)({}),
_useState4 = slicedToArray_default()(_useState3, 2),
defaultcontent = _useState4[0],
setDefaultcontent = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(false),
_useState6 = slicedToArray_default()(_useState5, 2),
hidden = _useState6[0],
sethidden = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(''),
_useState8 = slicedToArray_default()(_useState7, 2),
description = _useState8[0],
setdescription = _useState8[1];
initForm = _useState4[0],
setInitForm = _useState4[1];
(0,_react_17_0_2_react.useEffect)(function () {
var _RightItems$attachmen;
var data = [];
RightItems === null || RightItems === void 0 || (_RightItems$attachmen = RightItems.attachments) === null || _RightItems$attachmen === void 0 || _RightItems$attachmen.map(function (item) {
var tt = {
var _MdContent$attachment;
var files = MdContent === null || MdContent === void 0 || (_MdContent$attachment = MdContent.attachments) === null || _MdContent$attachment === void 0 ? void 0 : _MdContent$attachment.map(function (item) {
return objectSpread2_default()(objectSpread2_default()({}, item), {}, {
uid: item.id,
status: "done",
url: item.url,
name: item.title,
response: {
id: item.id
}
};
data.push(tt);
});
setDefaultFileList(data);
}, [RightItems === null || RightItems === void 0 ? void 0 : RightItems.attachments]);
(0,_react_17_0_2_react.useEffect)(function () {
setdescription(RightItems === null || RightItems === void 0 ? void 0 : RightItems.name);
setDefaultcontent(RightItems.md_content);
sethidden(RightItems === null || RightItems === void 0 ? void 0 : RightItems.hidden);
}, [RightItems.md_content || RightItems.name || RightItems.hidden]);
console.log('---', defaultFileList);
var uploadProps = {
name: 'file',
multiple: true,
withCredentials: true,
action: env/* default */.Z.API_SERVER + '/api/attachments.json',
// defaultFileList: getdata(),
fileList: defaultFileList,
onRemove: function onRemove(e) {
// console.log('e', e);
(0,service_competitions/* deletAttachments */.y8)({
id: e.response.id
});
},
onChange: function onChange(info) {
setDefaultFileList(toConsumableArray_default()(info.fileList));
},
});
var initData = objectSpread2_default()(objectSpread2_default()({}, MdContent), {}, {
competition_module_id: MdContent === null || MdContent === void 0 ? void 0 : MdContent.id,
content: MdContent === null || MdContent === void 0 ? void 0 : MdContent.md_content,
name: (MdContent === null || MdContent === void 0 ? void 0 : MdContent.md_name) || (MdContent === null || MdContent === void 0 ? void 0 : MdContent.name),
md_content_id: MdContent === null || MdContent === void 0 ? void 0 : MdContent.md_id,
attachment_ids: files
});
setFileList(files);
form.setFieldsValue(initData);
setInitForm(initData);
}, [MdContent]);
var UploadProps = {
action: "".concat(env/* default */.Z.API_SERVER, "/api/attachments.json"),
onRemove: function () {
var _onRemove = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(file) {
var _file$response;
var res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0,service_competitions/* deletAttachments */.y8)({
id: file === null || file === void 0 || (_file$response = file.response) === null || _file$response === void 0 ? void 0 : _file$response.id
});
case 2:
res = _context.sent;
if (res.status == 0) {
message/* default */.ZP.success("\u9644\u4EF6\"".concat(file.name || file.title, "\"\u5220\u9664\u6210\u529F"));
}
case 4:
case "end":
return _context.stop();
}
}, _callee);
}));
function onRemove(_x) {
return _onRemove.apply(this, arguments);
}
return onRemove;
}(),
beforeUpload: function beforeUpload(file) {
var isLt150M = file.size / 1024 / 1024 < 150;
if (!isLt150M) {
message/* default */.ZP.info("文件大小必须小于150MB");
return upload/* default */.Z.LIST_IGNORE;
var fileSize = file.size / 1024 / 1024;
if (fileSize > 150) {
message/* default */.ZP.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(150MB)");
return Promise.reject();
}
return isLt150M;
return true;
}
};
//修改内容回调接口
function updateItem() {
return _updateItem.apply(this, arguments);
} //获取对应文件列表
function _updateItem() {
_updateItem = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return dispatch({
type: 'competitions/updateMdContent',
payload: {
attachment_ids: getitemid(defaultFileList),
competition_module_id: RightItems.id,
md_content_id: RightItems.md_id,
content: defaultcontent,
identifier: identifier,
hidden: hidden,
description: description
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: isedit ? /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
form: form,
className: Contentmodules.formDiv,
initialValues: initForm,
size: "large",
onFinish: ( /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(valueAll) {
var _valueAll$attachment_;
var res;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
valueAll.attachment_ids = valueAll === null || valueAll === void 0 || (_valueAll$attachment_ = valueAll.attachment_ids) === null || _valueAll$attachment_ === void 0 ? void 0 : _valueAll$attachment_.map(function (item) {
return item.response.id;
});
_context2.next = 3;
return dispatch({
type: "competitions/getUpdateMdContent",
payload: objectSpread2_default()({
identifier: identifier
}, valueAll)
});
case 3:
res = _context2.sent;
if (!(res.status == 0)) {
_context2.next = 9;
break;
}
message/* default */.ZP.success("保存成功");
setIsedit(false);
_context2.next = 9;
return dispatch({
type: "competitions/common_header",
payload: identifier
});
case 9:
case "end":
return _context2.stop();
}
});
case 2:
res = _context.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
message/* default */.ZP.info('提交成功');
setisedit(false);
//刷新
dispatch({
type: 'competitions/getItem',
payload: {
url: RightItems.params_url
}
});
dispatch({
type: 'competitions/getHeader',
payload: {
identifier: identifier
}
});
dispatch({
type: 'competitions/setActionTabs',
payload: {
key: 'showheader'
}
});
}
case 4:
case "end":
return _context.stop();
}
}, _callee);
}));
return _updateItem.apply(this, arguments);
}
function getitemid(itemlist) {
var data = [];
if ((itemlist === null || itemlist === void 0 ? void 0 : itemlist.length) <= 0) {
return data;
} else {
itemlist && (itemlist === null || itemlist === void 0 ? void 0 : itemlist.map(function (item) {
data.push(item.response.id);
}));
return data;
}
}
function deleteitem() {
return _deleteitem.apply(this, arguments);
}
function _deleteitem() {
_deleteitem = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
modal/* default */.Z.confirm({
icon: false,
title: '提示',
content: '删除页面后,数据不可恢复,请确认是否删除',
onOk: function () {
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
var res;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
}, _callee2);
}));
return function (_x2) {
return _ref2.apply(this, arguments);
};
}()),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u6A21\u5757id",
name: "competition_module_id",
hidden: true
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u5BF9\u5E94\u5185\u5BB9\u7684id",
name: "md_content_id",
hidden: true
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
justify: "space-between",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
flex: 1,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
name: "name",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {})
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
className: "ml20",
align: "middle",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
name: "hidden",
valuePropName: "checked",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
children: "\u9690\u85CF"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
className: "ml20",
style: {
marginBottom: 16
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: Contentmodules.deletetitle,
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context2.next = 2;
return (0,fetch/* default */.ZP)("/api/competitions/".concat(identifier, "/competition_modules/").concat(RightItems.id, ".json"), {
method: 'delete'
});
case 2:
res = _context2.sent;
if (res.status === 0) {
dispatch({
type: 'competitions/getHeader',
payload: {
identifier: identifier
modal/* default */.Z.confirm({
icon: false,
title: '提示',
content: '删除页面后,数据不可恢复,请确认是否删除',
onOk: function () {
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
var res;
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return (0,fetch/* default */.ZP)("/api/competitions/".concat(identifier, "/competition_modules/").concat(MdContent === null || MdContent === void 0 ? void 0 : MdContent.id, ".json"), {
method: 'delete'
});
case 2:
res = _context3.sent;
if (!((res === null || res === void 0 ? void 0 : res.status) === 0)) {
_context3.next = 8;
break;
}
setselectedKeys(null);
setIsedit(false);
_context3.next = 8;
return dispatch({
type: 'competitions/common_header',
payload: identifier
});
case 8:
case "end":
return _context3.stop();
}
}, _callee3);
}));
function onOk() {
return _onOk.apply(this, arguments);
}
});
setisedit(false);
}
case 4:
return onOk;
}()
});
case 1:
case "end":
return _context2.stop();
return _context4.stop();
}
}, _callee2);
}));
function onOk() {
return _onOk.apply(this, arguments);
}
return onOk;
}()
});
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _deleteitem.apply(this, arguments);
}
return /*#__PURE__*/(0,jsx_runtime.jsx)("section", {
className: Contentmodules.bg,
children: isedit ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
marginBottom: 30,
display: 'flex',
alignItems: 'center'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
style: {
width: '82%',
height: 40,
borderRadius: 2,
border: '1px solid #DCDCDC'
},
value: description,
onChange: function onChange(e) {
setdescription(e.target.value);
}
}), " ", /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
className: "ml40 font14",
style: {
marginLeft: '23px'
},
checked: hidden,
onChange: function onChange(e) {
sethidden(e.target.checked);
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
display: 'inline-block'
},
children: "\u9690\u85CF"
}, _callee4);
})),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-piliangshanchu3 font14 mr5"
}), "\u5220\u9664\u9875\u9762"]
})
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
className: "mt5",
name: "content",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(MdEditorInForm/* MdEditorInForm */.h, {
scrollId: ''
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: Contentmodules.deletetitle,
onClick: function onClick() {
deleteitem();
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-piliangshanchu3",
style: {
fontSize: 14,
marginRight: 6
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
name: "attachment_ids",
valuePropName: "fileList",
getValueFromEvent: function getValueFromEvent(e) {
if (Array.isArray(e)) {
return e;
}
}), "\u5220\u9664\u9875\u9762"]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
defaultValue: RightItems.md_content,
onChange: function onChange(e) {
return setDefaultcontent(e);
}
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(upload/* default */.Z, objectSpread2_default()(objectSpread2_default()({}, uploadProps), {}, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "inline-block current",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
style: {
borderRadius: 2,
marginTop: 18
},
children: "\u4E0A\u4F20\u9644\u4EF6"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml25 c-grey-999",
children: "(\u5355\u4E2A\u6587\u4EF6150M\u4EE5\u5185)"
})]
})), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Contentmodules.btns,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
className: Contentmodules.cancel,
onClick: function onClick() {
return setisedit(false);
return e === null || e === void 0 ? void 0 : e.fileList;
},
children: "\u53D6\u6D88"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(AsyncButton/* AsyncButton */.Z, {
className: Contentmodules.confirm,
type: "primary",
onClick: updateItem,
children: "\u4FDD\u5B58\u66F4\u6539"
children: /*#__PURE__*/(0,jsx_runtime.jsx)(upload/* default */.Z, objectSpread2_default()(objectSpread2_default()({}, UploadProps), {}, {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
children: "\u4E0A\u4F20\u9644\u4EF6"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
className: "ml20",
style: {
color: "#9096a3"
},
children: "\u5355\u4E2A\u6587\u4EF6150M\u4EE5\u5185"
})]
})
}))
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
align: "middle",
justify: "end",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
onClick: function onClick() {
setIsedit(false);
form.resetFields();
},
children: "\u53D6\u6D88"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
className: "ml20",
type: "primary",
htmlType: "submit",
children: "\u4FDD\u5B58\u66F4\u6539"
})]
})]
})]
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [!(RightItems !== null && RightItems !== void 0 && RightItems.md_content) && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
style: {
marginBottom: 30,
width: "calc(1015px - 60px)"
},
value: RightItems.md_content || ''
}), RightItems && RightItems.attachments && RightItems.attachments.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
href: (env/* default */.Z === null || env/* default */.Z === void 0 ? void 0 : env/* default */.Z.API_SERVER) + item.url,
target: "_self",
download: item.title,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
style: {
color: '#29BD8B'
},
className: "font-14 color-green iconfont icon-fujian mr8"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000000'
},
children: item.title
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000000',
marginLeft: '10px'
},
children: item.filesize
})]
})
})
}) : MdContent !== null && MdContent !== void 0 && MdContent.md_content ? /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
value: MdContent === null || MdContent === void 0 ? void 0 : MdContent.md_content
}), fileList === null || fileList === void 0 ? void 0 : fileList.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Contentmodules.FileList,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
href: "".concat(env/* default */.Z.API_SERVER).concat(item.url),
target: "_self",
download: item.title,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
style: {
color: '#29BD8B'
},
className: "font-14 color-green iconfont icon-fujian mr8"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000000'
},
children: item.title
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "ml10",
style: {
color: '#000000'
},
children: item.filesize
})]
})
}, index)
});
})]
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {
imgUrl: __webpack_require__(/*! @/assets/images/icons/nodata.png */ 4977)
})
});
};
/* harmony default export */ var Content = ((0,_umi_production_exports.connect)(function (_ref2) {
var competitions = _ref2.competitions,
loading = _ref2.loading,
globalSetting = _ref2.globalSetting,
user = _ref2.user;
/* harmony default export */ var components_Content = ((0,_umi_production_exports.connect)(function (_ref4) {
var competitions = _ref4.competitions,
loading = _ref4.loading,
globalSetting = _ref4.globalSetting,
user = _ref4.user;
return {
competitions: competitions,
globalSetting: globalSetting,
loading: loading.models.competitions,
loading: loading.effects,
user: user
};
})(Content_competitionsPage));
})(Content));
;// CONCATENATED MODULE: ./src/pages/Competitions/Edit/view/Entrance/index.tsx
@ -10273,7 +10334,7 @@ var view_competitionsPage = function competitionsPage(_ref) {
var Item = [{
type: "other",
name: "其他",
content: /*#__PURE__*/(0,jsx_runtime.jsx)(Content, {
content: /*#__PURE__*/(0,jsx_runtime.jsx)(components_Content, {
isedit: isedit,
setIsedit: setIsedit,
setselectedKeys: setselectedKeys
@ -13153,6 +13214,17 @@ var ExportCourseWorkListShixuns = /*#__PURE__*/function () {
/***/ }),
/***/ 72008:
/*!**********************************************************!*\
!*** ./src/components/QuestionEditor/index.less?modules ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
// extracted by mini-css-extract-plugin
/* harmony default export */ __webpack_exports__.Z = ({"wrap":"wrap___ilWvf","deleteIcon":"deleteIcon___JBDG8","keywordTag":"keywordTag___iieCb","questionTitleEditorWrap":"questionTitleEditorWrap___MHB5s","choiceWrap":"choiceWrap___QFkTc","choiceIndex":"choiceIndex___Mr2YO","judgementIndex":"judgementIndex___fUVWK","setAnswerBtn":"setAnswerBtn___Whox5","activeAnswer":"activeAnswer___fGU6Y","activeJudgementAnswer":"activeJudgementAnswer___wJv8P","actionWrapper":"actionWrapper___ERQ7k","addIcon":"addIcon___L9TE0","inputBorder":"inputBorder___Q5tRE","placeholder":"placeholder___p9sFY","blankWrapper":"blankWrapper___nC45e","blankInput":"blankInput___pEHsx","blankInputNumberWrapper":"blankInputNumberWrapper___uEHb0","addBtn":"addBtn___WR5ZI","blankIndex":"blankIndex___x9Pny","baseInputWrapper":"baseInputWrapper___eVsG7","collapseWrapper":"collapseWrapper___ZTysU","panelHeader":"panelHeader___QSN9g","open":"open___B6FU9","close":"close___QX19r","hide":"hide___mn25n"});
/***/ }),
/***/ 96908:
/*!**************************************************************************!*\
!*** ./src/components/ui-customization/Cards/ShixunList/img/Jupyter.png ***!

@ -0,0 +1,50 @@
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/_css-loader@6.7.1@css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/_@umijs_bundler-webpack@4.2.10@@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/_@umijs_bundler-webpack@4.2.10@@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/pages/Competitions/Group/index.less?modules ***!
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.autoWidth1200___OIDhh {
width: 1200px;
margin: 0 auto;
}
.Onerow___m6Icy {
word-break: break-all;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.MultiLine___YOJVp {
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.FlexNoWrap___PX28d {
display: flex;
flex-wrap: nowrap;
align-items: center;
white-space: nowrap;
}
.TagDiv___qGJiv {
padding: 3px 9px;
line-height: 20px;
font-size: 14px;
border-radius: 13px;
border: 1px solid #dadbde;
}
.ListItem___J490e {
padding: 20px;
width: 100%;
box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.05);
border-radius: 4px;
border: 1px solid #f5f5f5;
cursor: pointer;
}
.TrendsItem___WMbue {
margin-bottom: 22px;
cursor: pointer;
}
.TrendsItem___WMbue:last-child {
margin-bottom: 0px;
}

File diff suppressed because one or more lines are too long

@ -0,0 +1,766 @@
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/_css-loader@6.7.1@css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/_@umijs_bundler-webpack@4.2.10@@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/_@umijs_bundler-webpack@4.2.10@@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/pages/Competitions/SpecialSubject/index.less?modules ***!
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wrap___SiB3P {
background-color: #ffffff;
overflow: hidden;
}
.wrap___SiB3P .bg___AqEXo {
margin: 0 auto 64px auto;
width: 1200px;
}
.fieldWrap____VgWd {
padding: 10px 30px 30px 30px;
}
.fieldWrap____VgWd .form_item_textarea___V6ATS {
position: relative;
color: #666666;
margin-top: 30px;
}
.fieldWrap____VgWd .form_item_textarea___V6ATS .textarea_suffix___c44xE {
position: absolute;
bottom: 10px;
right: 10px;
}
.fieldWrap____VgWd .form_item___yddQv {
color: #666666;
margin-top: 30px;
}
.fieldWrap____VgWd .form_item___yddQv span[class~='ant-input-affix-wrapper'] {
height: 40px;
}
.fieldWrap____VgWd .form_item___yddQv span[class~='ant-input-affix-wrapper'] .record_count___nfR0A {
font-size: 14px;
color: #9096a3;
}
.fieldWrap____VgWd .form_item___yddQv [class~='ant-form-item-label'] label {
color: #666666 !important;
margin-top: 7px;
margin-right: 7px;
}
.fieldWrap____VgWd .form_item___yddQv .close_style___JElbS {
width: 14px;
height: 14px;
position: absolute;
top: -8px;
right: -8px;
cursor: pointer;
z-index: 10;
}
.fieldWrap____VgWd .form_item___yddQv .xmfm___JEOWi {
width: 159px;
height: 95px;
position: relative;
margin-top: 20px;
}
.fieldWrap____VgWd .form_item___yddQv .xmfm___JEOWi .img_content___xKxuz {
width: 159px;
height: 95px;
position: absolute;
top: 0;
left: 0;
z-index: 5;
}
.fieldWrap____VgWd .form_item___yddQv .xxsp___bprTM {
color: #232b40;
font-size: 12px;
margin-top: 5px;
}
.fieldWrap____VgWd .form_item___yddQv .xxsp___bprTM .shanchu___vZ3YD {
color: #8e94a0;
cursor: pointer;
margin-left: 10px;
}
.fieldWrap____VgWd .form_item___yddQv .xxsp___bprTM .shanchu___vZ3YD:hover {
color: #e53333;
}
.fieldWrap____VgWd .form_item___yddQv .dbbjt___TYz9J {
width: 400px;
height: 130px;
position: relative;
margin-top: 20px;
}
.fieldWrap____VgWd .form_item___yddQv .dbbjt___TYz9J .img_content___xKxuz {
width: 400px;
height: 130px;
position: absolute;
top: 0;
left: 0;
z-index: 5;
}
.fieldWrap____VgWd .form_item___yddQv .sssd_list___hodEG {
display: flex;
flex-wrap: wrap;
}
.fieldWrap____VgWd .form_item___yddQv .sssd_list___hodEG .sssd___mRWYY {
width: 1040px;
height: 72px;
background: #f8f9fa;
margin-top: 10px;
position: relative;
}
.fieldWrap____VgWd .form_item___yddQv .sssd_list___hodEG .sssd___mRWYY .bianji___N2ae0 {
color: #8e94a0;
cursor: pointer;
position: absolute;
right: 50px;
top: 10px;
}
.fieldWrap____VgWd .form_item___yddQv .sssd_list___hodEG .sssd___mRWYY .bianji___N2ae0:hover {
color: #165dff;
}
.fieldWrap____VgWd .form_item___yddQv .sssd_list___hodEG .sssd___mRWYY .shanchu___vZ3YD {
color: #8e94a0;
cursor: pointer;
position: absolute;
right: 15px;
top: 10px;
}
.fieldWrap____VgWd .form_item___yddQv .sssd_list___hodEG .sssd___mRWYY .shanchu___vZ3YD:hover {
color: #e53333;
}
.fieldWrap____VgWd .form_item___yddQv .sssd_list___hodEG .sssd___mRWYY .sssd_title___CrCbL {
width: 90%;
height: 22px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #232b40;
line-height: 22px;
margin: 12px 16px 7px 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.fieldWrap____VgWd .form_item___yddQv .sssd_list___hodEG .sssd___mRWYY .sssd_content___O5uxL {
width: 90%;
height: 20px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #9096a3;
line-height: 20px;
margin: 0 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.fieldWrap____VgWd .form_item___yddQv .ssdt_list___ifd2F {
display: flex;
flex-wrap: wrap;
}
.fieldWrap____VgWd .form_item___yddQv .ssdt_list___ifd2F .ssdt___mjJfh {
width: 1040px;
height: 72px;
background: #f8f9fa;
margin-top: 10px;
position: relative;
display: flex;
}
.fieldWrap____VgWd .form_item___yddQv .ssdt_list___ifd2F .ssdt___mjJfh .bianji___N2ae0 {
color: #8e94a0;
cursor: pointer;
position: absolute;
right: 50px;
top: 10px;
}
.fieldWrap____VgWd .form_item___yddQv .ssdt_list___ifd2F .ssdt___mjJfh .bianji___N2ae0:hover {
color: #165dff;
}
.fieldWrap____VgWd .form_item___yddQv .ssdt_list___ifd2F .ssdt___mjJfh .shanchu___vZ3YD {
color: #8e94a0;
cursor: pointer;
position: absolute;
right: 15px;
top: 10px;
}
.fieldWrap____VgWd .form_item___yddQv .ssdt_list___ifd2F .ssdt___mjJfh .shanchu___vZ3YD:hover {
color: #e53333;
}
.fieldWrap____VgWd .form_item___yddQv .ssdt_list___ifd2F .ssdt___mjJfh .ssdt_img___maP1j {
width: 89px;
height: 50px;
margin: 12px 16px;
}
.fieldWrap____VgWd .form_item___yddQv .ssdt_list___ifd2F .ssdt___mjJfh .ssdt_right___cUX6Y {
width: 80%;
}
.fieldWrap____VgWd .form_item___yddQv .ssdt_list___ifd2F .ssdt___mjJfh .ssdt_right___cUX6Y .ssdt_title___IOnjG {
height: 22px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #232b40;
line-height: 22px;
margin: 12px 16px 7px 0px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.fieldWrap____VgWd .form_item___yddQv .ssdt_list___ifd2F .ssdt___mjJfh .ssdt_right___cUX6Y .ssdt_content___bVqoE {
height: 20px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #9096a3;
line-height: 20px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.fieldWrap____VgWd .form_item___yddQv .huodong___P7M4I {
display: flex;
align-items: center;
margin-top: 15px;
}
.fieldWrap____VgWd .form_item___yddQv .huodong___P7M4I .shanchu___vZ3YD {
color: #8e94a0;
cursor: pointer;
margin-left: 10px;
}
.fieldWrap____VgWd .form_item___yddQv .huodong___P7M4I .shanchu___vZ3YD:hover {
color: #e53333;
}
.fieldWrap____VgWd .form_item___yddQv .huodongtupian___ThyxV {
width: 188px;
height: 105px;
margin-top: 10px;
}
.footer_style___zFSOR {
width: 100%;
height: 64px;
background: #ffffff;
box-shadow: 0px -2px 8px 0px #f1f1f1;
position: fixed;
bottom: 0;
z-index: 100;
}
.footer_style___zFSOR .backgroundFa___zwBss {
display: flex;
justify-content: center;
align-items: center;
width: 1200px;
margin: auto;
}
.footer_style___zFSOR .backgroundFa___zwBss .btn_close___XVZv6 {
width: 60px;
height: 38px;
line-height: 38px;
border-radius: 2px;
opacity: 0.9;
border: 1px solid #bacffe;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #3061d0;
align-items: center;
text-align: center;
cursor: pointer;
margin: 13px 20px;
}
.footer_style___zFSOR .backgroundFa___zwBss .btn_submit___fj1_1 {
width: 118px;
height: 38px;
line-height: 38px;
background: #3061d0;
border-radius: 2px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
text-align: center;
cursor: pointer;
margin: 13px 0;
}
.aBtn___sfvQC {
display: inline-block;
width: 108px;
height: 38px;
background: #f6f7f9 linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
box-shadow: 0px 2px 4px 0px #e0dfe1, inset 0px 1px 3px 0px rgba(255, 255, 255, 0.5);
border-radius: 2px;
border: 1px solid #bacffe;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #3061d0;
line-height: 36px;
cursor: pointer;
text-align: center;
align-items: center;
align-content: center;
}
.aBtn___sfvQC .aBtn_img___fK7cq {
width: 14px;
height: 14px;
margin-top: -3px;
margin-right: 5px;
}
.aBtn___sfvQC:hover {
border: 1px solid #165dff;
}
.bBtn___NIbMt {
height: 32px;
line-height: 30px;
background: #fcfcfe;
border-radius: 2px;
border: 1px solid #c3cfe0;
text-align: center;
color: #464f66;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
margin-right: 20px;
font-size: 14px;
padding: 0 16px;
}
.bBtn___NIbMt:hover {
border: 1px solid #165dff;
color: #165dff;
}
.table_modal___RNE1A .table_title___Oz2oO {
width: 640px;
height: 22px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #232b40;
line-height: 22px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.table_modal___RNE1A .table_content___V0K0O {
width: 640px;
height: 20px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #9096a3;
line-height: 20px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.modal_list___xGdTt {
display: flex;
}
.modal_close___baoru {
width: auto;
padding: 0 16px;
height: 32px;
line-height: 32px;
background: #f8f9fc;
border-radius: 2px;
margin-left: auto;
margin-right: 20px;
border: 1px solid #c3cfe0;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #464f66;
text-align: center;
cursor: pointer;
}
.modal_sumbit___j7C0c {
width: auto;
padding: 0 16px;
height: 32px;
line-height: 32px;
background: #2958d4;
box-shadow: 0px 2px 4px 0px #e0dfe1, inset 0px 1px 3px 0px rgba(255, 255, 255, 0.5);
border-radius: 2px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
text-align: center;
cursor: pointer;
}
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/_css-loader@6.7.1@css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[1]!./node_modules/_@umijs_bundler-webpack@4.2.10@@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[2]!./node_modules/_@umijs_bundler-webpack@4.2.10@@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[3]!./src/pages/Competitions/SpecialSubject/index.less ***!
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wrap {
background-color: #ffffff;
overflow: hidden;
}
.wrap .bg {
margin: 0 auto 64px auto;
width: 1200px;
}
.fieldWrap {
padding: 10px 30px 30px 30px;
}
.fieldWrap .form_item_textarea {
position: relative;
color: #666666;
margin-top: 30px;
}
.fieldWrap .form_item_textarea .textarea_suffix {
position: absolute;
bottom: 10px;
right: 10px;
}
.fieldWrap .form_item {
color: #666666;
margin-top: 30px;
}
.fieldWrap .form_item span[class~='ant-input-affix-wrapper'] {
height: 40px;
}
.fieldWrap .form_item span[class~='ant-input-affix-wrapper'] .record_count {
font-size: 14px;
color: #9096a3;
}
.fieldWrap .form_item [class~='ant-form-item-label'] label {
color: #666666 !important;
margin-top: 7px;
margin-right: 7px;
}
.fieldWrap .form_item .close_style {
width: 14px;
height: 14px;
position: absolute;
top: -8px;
right: -8px;
cursor: pointer;
z-index: 10;
}
.fieldWrap .form_item .xmfm {
width: 159px;
height: 95px;
position: relative;
margin-top: 20px;
}
.fieldWrap .form_item .xmfm .img_content {
width: 159px;
height: 95px;
position: absolute;
top: 0;
left: 0;
z-index: 5;
}
.fieldWrap .form_item .xxsp {
color: #232b40;
font-size: 12px;
margin-top: 5px;
}
.fieldWrap .form_item .xxsp .shanchu {
color: #8e94a0;
cursor: pointer;
margin-left: 10px;
}
.fieldWrap .form_item .xxsp .shanchu:hover {
color: #e53333;
}
.fieldWrap .form_item .dbbjt {
width: 400px;
height: 130px;
position: relative;
margin-top: 20px;
}
.fieldWrap .form_item .dbbjt .img_content {
width: 400px;
height: 130px;
position: absolute;
top: 0;
left: 0;
z-index: 5;
}
.fieldWrap .form_item .sssd_list {
display: flex;
flex-wrap: wrap;
}
.fieldWrap .form_item .sssd_list .sssd {
width: 1040px;
height: 72px;
background: #f8f9fa;
margin-top: 10px;
position: relative;
}
.fieldWrap .form_item .sssd_list .sssd .bianji {
color: #8e94a0;
cursor: pointer;
position: absolute;
right: 50px;
top: 10px;
}
.fieldWrap .form_item .sssd_list .sssd .bianji:hover {
color: #165dff;
}
.fieldWrap .form_item .sssd_list .sssd .shanchu {
color: #8e94a0;
cursor: pointer;
position: absolute;
right: 15px;
top: 10px;
}
.fieldWrap .form_item .sssd_list .sssd .shanchu:hover {
color: #e53333;
}
.fieldWrap .form_item .sssd_list .sssd .sssd_title {
width: 90%;
height: 22px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #232b40;
line-height: 22px;
margin: 12px 16px 7px 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.fieldWrap .form_item .sssd_list .sssd .sssd_content {
width: 90%;
height: 20px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #9096a3;
line-height: 20px;
margin: 0 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.fieldWrap .form_item .ssdt_list {
display: flex;
flex-wrap: wrap;
}
.fieldWrap .form_item .ssdt_list .ssdt {
width: 1040px;
height: 72px;
background: #f8f9fa;
margin-top: 10px;
position: relative;
display: flex;
}
.fieldWrap .form_item .ssdt_list .ssdt .bianji {
color: #8e94a0;
cursor: pointer;
position: absolute;
right: 50px;
top: 10px;
}
.fieldWrap .form_item .ssdt_list .ssdt .bianji:hover {
color: #165dff;
}
.fieldWrap .form_item .ssdt_list .ssdt .shanchu {
color: #8e94a0;
cursor: pointer;
position: absolute;
right: 15px;
top: 10px;
}
.fieldWrap .form_item .ssdt_list .ssdt .shanchu:hover {
color: #e53333;
}
.fieldWrap .form_item .ssdt_list .ssdt .ssdt_img {
width: 89px;
height: 50px;
margin: 12px 16px;
}
.fieldWrap .form_item .ssdt_list .ssdt .ssdt_right {
width: 80%;
}
.fieldWrap .form_item .ssdt_list .ssdt .ssdt_right .ssdt_title {
height: 22px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #232b40;
line-height: 22px;
margin: 12px 16px 7px 0px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.fieldWrap .form_item .ssdt_list .ssdt .ssdt_right .ssdt_content {
height: 20px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #9096a3;
line-height: 20px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.fieldWrap .form_item .huodong {
display: flex;
align-items: center;
margin-top: 15px;
}
.fieldWrap .form_item .huodong .shanchu {
color: #8e94a0;
cursor: pointer;
margin-left: 10px;
}
.fieldWrap .form_item .huodong .shanchu:hover {
color: #e53333;
}
.fieldWrap .form_item .huodongtupian {
width: 188px;
height: 105px;
margin-top: 10px;
}
.footer_style {
width: 100%;
height: 64px;
background: #ffffff;
box-shadow: 0px -2px 8px 0px #f1f1f1;
position: fixed;
bottom: 0;
z-index: 100;
}
.footer_style .backgroundFa {
display: flex;
justify-content: center;
align-items: center;
width: 1200px;
margin: auto;
}
.footer_style .backgroundFa .btn_close {
width: 60px;
height: 38px;
line-height: 38px;
border-radius: 2px;
opacity: 0.9;
border: 1px solid #bacffe;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #3061d0;
align-items: center;
text-align: center;
cursor: pointer;
margin: 13px 20px;
}
.footer_style .backgroundFa .btn_submit {
width: 118px;
height: 38px;
line-height: 38px;
background: #3061d0;
border-radius: 2px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
text-align: center;
cursor: pointer;
margin: 13px 0;
}
.aBtn {
display: inline-block;
width: 108px;
height: 38px;
background: #f6f7f9 linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
box-shadow: 0px 2px 4px 0px #e0dfe1, inset 0px 1px 3px 0px rgba(255, 255, 255, 0.5);
border-radius: 2px;
border: 1px solid #bacffe;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #3061d0;
line-height: 36px;
cursor: pointer;
text-align: center;
align-items: center;
align-content: center;
}
.aBtn .aBtn_img {
width: 14px;
height: 14px;
margin-top: -3px;
margin-right: 5px;
}
.aBtn:hover {
border: 1px solid #165dff;
}
.bBtn {
height: 32px;
line-height: 30px;
background: #fcfcfe;
border-radius: 2px;
border: 1px solid #c3cfe0;
text-align: center;
color: #464f66;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
margin-right: 20px;
font-size: 14px;
padding: 0 16px;
}
.bBtn:hover {
border: 1px solid #165dff;
color: #165dff;
}
.table_modal .table_title {
width: 640px;
height: 22px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #232b40;
line-height: 22px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.table_modal .table_content {
width: 640px;
height: 20px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #9096a3;
line-height: 20px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.modal_list {
display: flex;
}
.modal_close {
width: auto;
padding: 0 16px;
height: 32px;
line-height: 32px;
background: #f8f9fc;
border-radius: 2px;
margin-left: auto;
margin-right: 20px;
border: 1px solid #c3cfe0;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #464f66;
text-align: center;
cursor: pointer;
}
.modal_sumbit {
width: auto;
padding: 0 16px;
height: 32px;
line-height: 32px;
background: #2958d4;
box-shadow: 0px 2px 4px 0px #e0dfe1, inset 0px 1px 3px 0px rgba(255, 255, 255, 0.5);
border-radius: 2px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
text-align: center;
cursor: pointer;
}

File diff suppressed because it is too large Load Diff

@ -264,8 +264,8 @@ var lib = __webpack_require__(56102);
var task = __webpack_require__(75909);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/ExclamationCircleOutlined.js + 1 modules
var ExclamationCircleOutlined = __webpack_require__(88289);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 3 modules
var MultiUpload = __webpack_require__(80638);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(99531);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(17985);
// EXTERNAL MODULE: ./src/utils/fetch.ts

@ -1,5 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[23332,31503,16116,80638,28767,45563],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[23332,31503,16116,99531,28767,45563],{
/***/ 40720:
/*!*********************************!*\
@ -755,9 +755,9 @@ var FormSearch = function FormSearch(_ref) {
/***/ }),
/***/ 80638:
/***/ 99531:
/*!**********************************************************!*\
!*** ./src/components/MultiUpload/index.tsx + 3 modules ***!
!*** ./src/components/MultiUpload/index.tsx + 2 modules ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
@ -788,7 +788,7 @@ var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/index.js + 24 modules
var upload = __webpack_require__(46651);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
var es_message = __webpack_require__(8591);
var message = __webpack_require__(8591);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
var modal = __webpack_require__(43418);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
@ -797,136 +797,8 @@ var es_button = __webpack_require__(3113);
var env = __webpack_require__(17985);
// EXTERNAL MODULE: ./src/pages/MoopCases/FormPanel/service.ts
var service = __webpack_require__(52989);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/components/SingleUpload/index.tsx
var uploadNameSizeSeperator = '  ';
function bytesToSize(bytes) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
if (bytes == 0) return '0 Byte';
var i = parseInt('' + Math.floor(Math.log(bytes) / Math.log(1024)), 10);
return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i];
}
/* harmony default export */ var SingleUpload = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? [] : _ref$value,
action = _ref.action,
_onChange = _ref.onChange,
className = _ref.className,
_ref$maxSize = _ref.maxSize,
maxSize = _ref$maxSize === void 0 ? 150 : _ref$maxSize,
_ref$title = _ref.title,
title = _ref$title === void 0 ? '文件上传' : _ref$title,
_ref$accept = _ref.accept,
accept = _ref$accept === void 0 ? null : _ref$accept;
var uploadProps = {
multiple: false,
fileList: value,
accept: accept,
withCredentials: true,
beforeUpload: function beforeUpload(file) {
var fileSize = file.size / 1024 / 1024;
if (!(fileSize < maxSize)) {
message.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20"));
return Promise.reject();
}
return true;
},
action: "".concat(ENV.API_SERVER, "/api/attachments.json"),
// ?debug=student&randomcode=undefined&client_key=6d57f8c3dd186c5ada392546ace9620a
onChange: function onChange(info) {
var _info$file;
var fileList = _toConsumableArray(info.fileList);
fileList = fileList.map(function (file) {
if (file.name.indexOf(uploadNameSizeSeperator) === -1) {
file.name = "".concat(file.name).concat(uploadNameSizeSeperator).concat(bytesToSize(file.size));
}
return _objectSpread({}, file);
});
if (info.file.status === 'done' && ((_info$file = info.file) === null || _info$file === void 0 || (_info$file = _info$file.response) === null || _info$file === void 0 ? void 0 : _info$file.status) === -1) {
var _info$file2;
message.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message);
_onChange([]);
return;
}
_onChange(fileList);
},
onRemove: function () {
var _onRemove = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
var fileSize, id, rs;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
fileSize = file.size / 1024 / 1024;
if (!(file.status === 'uploading')) {
_context.next = 3;
break;
}
return _context.abrupt("return", true);
case 3:
if (fileSize < maxSize) {
_context.next = 7;
break;
}
return _context.abrupt("return", true);
case 7:
id = file.response ? file.response.id : file.uid;
if (!id) {
_context.next = 15;
break;
}
_context.next = 11;
return removeAttachment(file.response ? file.response.id : file.id);
case 11:
rs = _context.sent;
return _context.abrupt("return", rs);
case 15:
return _context.abrupt("return", true);
case 16:
case "end":
return _context.stop();
}
}, _callee);
}));
function onRemove(_x) {
return _onRemove.apply(this, arguments);
}
return onRemove;
}()
};
function onCancel(e) {
e.preventDefault();
e.stopPropagation();
}
return /*#__PURE__*/_jsx("div", {
className: "single-upload ".concat(className ? className : ''),
children: /*#__PURE__*/_jsxs(Upload, _objectSpread(_objectSpread({}, uploadProps), {}, {
children: [/*#__PURE__*/_jsx(Button, {
type: "primary",
title: value.length > 0 ? '每次只能上传一个资源, 删除下面资源可重新上传 ' : '',
disabled: value.length > 0,
ghost: true,
children: title
}), /*#__PURE__*/_jsxs("span", {
onClick: onCancel,
style: {
marginLeft: 10
},
children: ["(\u5355\u4E2A\u6587\u4EF6\u6700\u5927", maxSize, "M)", ' ']
})]
}))
});
});
// EXTERNAL MODULE: ./src/components/SingleUpload/index.tsx
var SingleUpload = __webpack_require__(95081);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/InboxOutlined.js + 1 modules
var InboxOutlined = __webpack_require__(93737);
// EXTERNAL MODULE: ./node_modules/_lodash@4.17.21@lodash/lodash.js
@ -982,6 +854,8 @@ var SvgUploadImg = function SvgUploadImg(props) {
};
/* harmony default export */ var uploadImg = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjM1NCAzLjVoLTIuNzd2OC4xNjdINi40MTZWMy41SDMuNjQ2TDcgMGwzLjM1NCAzLjVaTTE0IDdoLTEuMTY3djUuODMzSDEuMTY3VjdIMHY3aDE0VjdaIiBmaWxsPSIjMzA2MUQwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=");
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/components/MultiUpload/index.tsx
@ -1007,7 +881,7 @@ function coverToFileList(data) {
return {
uid: item.id,
id: item.id,
name: item.title + uploadNameSizeSeperator + item.filesize,
name: item.title + SingleUpload/* uploadNameSizeSeperator */.sX + item.filesize,
url: item.url,
filesize: item.filesize,
status: 'done',
@ -1080,7 +954,7 @@ function coverToFileList(data) {
if (fileList.concat(fileArr).length > number) {
fileList.pop();
setFileList(toConsumableArray_default()(fileList));
es_message/* default */.ZP.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(number, "\u4E2A\u6587\u4EF6"));
message/* default */.ZP.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(number, "\u4E2A\u6587\u4EF6"));
if (aloneClear) {
return Promise.reject();
}
@ -1088,7 +962,7 @@ function coverToFileList(data) {
return false;
}
if (!(fileSize < maxSize)) {
es_message/* default */.ZP.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB)."));
message/* default */.ZP.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB)."));
if (aloneClear) {
return Promise.reject();
}
@ -1109,7 +983,7 @@ function coverToFileList(data) {
}
if (info.file.status === 'done' && ((_info$file = info.file) === null || _info$file === void 0 || (_info$file = _info$file.response) === null || _info$file === void 0 ? void 0 : _info$file.status) === -1) {
var _info$file2;
es_message/* default */.ZP.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message);
message/* default */.ZP.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message);
return;
}
if (fileList.length >= number) setDisabled(true);else setDisabled(false);
@ -1120,8 +994,8 @@ function coverToFileList(data) {
var _file$response2;
file.url = "/api/attachments/".concat(file === null || file === void 0 || (_file$response2 = file.response) === null || _file$response2 === void 0 ? void 0 : _file$response2.id);
}
if (file.name.indexOf(uploadNameSizeSeperator) === -1) {
file.name = "".concat(file.name).concat(uploadNameSizeSeperator).concat(bytesToSize(file.size));
if (file.name.indexOf(SingleUpload/* uploadNameSizeSeperator */.sX) === -1) {
file.name = "".concat(file.name).concat(SingleUpload/* uploadNameSizeSeperator */.sX).concat((0,SingleUpload/* bytesToSize */.RD)(file.size));
}
return objectSpread2_default()({}, file);
});
@ -1187,7 +1061,7 @@ function coverToFileList(data) {
return remove();
case 2:
res = _context2.sent;
es_message/* default */.ZP.success('删除成功');
message/* default */.ZP.success('删除成功');
resolve(true);
case 5:
case "end":
@ -2035,6 +1909,158 @@ var ReuseShixunModal = function ReuseShixunModal(props) {
/***/ }),
/***/ 95081:
/*!***********************************************!*\
!*** ./src/components/SingleUpload/index.tsx ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ RD: function() { return /* binding */ bytesToSize; },
/* harmony export */ sX: function() { return /* binding */ uploadNameSizeSeperator; }
/* harmony export */ });
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js */ 41498);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js */ 37205);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _utils_env__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/utils/env */ 17985);
/* harmony import */ var _pages_MoopCases_FormPanel_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/pages/MoopCases/FormPanel/service */ 52989);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
var uploadNameSizeSeperator = '  ';
function bytesToSize(bytes) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
if (bytes == 0) return '0 Byte';
var i = parseInt('' + Math.floor(Math.log(bytes) / Math.log(1024)), 10);
return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i];
}
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? [] : _ref$value,
action = _ref.action,
_onChange = _ref.onChange,
className = _ref.className,
_ref$maxSize = _ref.maxSize,
maxSize = _ref$maxSize === void 0 ? 150 : _ref$maxSize,
_ref$title = _ref.title,
title = _ref$title === void 0 ? '文件上传' : _ref$title,
_ref$accept = _ref.accept,
accept = _ref$accept === void 0 ? null : _ref$accept;
var uploadProps = {
multiple: false,
fileList: value,
accept: accept,
withCredentials: true,
beforeUpload: function beforeUpload(file) {
var fileSize = file.size / 1024 / 1024;
if (!(fileSize < maxSize)) {
message.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20"));
return Promise.reject();
}
return true;
},
action: "".concat(ENV.API_SERVER, "/api/attachments.json"),
// ?debug=student&randomcode=undefined&client_key=6d57f8c3dd186c5ada392546ace9620a
onChange: function onChange(info) {
var _info$file;
var fileList = _toConsumableArray(info.fileList);
fileList = fileList.map(function (file) {
if (file.name.indexOf(uploadNameSizeSeperator) === -1) {
file.name = "".concat(file.name).concat(uploadNameSizeSeperator).concat(bytesToSize(file.size));
}
return _objectSpread({}, file);
});
if (info.file.status === 'done' && ((_info$file = info.file) === null || _info$file === void 0 || (_info$file = _info$file.response) === null || _info$file === void 0 ? void 0 : _info$file.status) === -1) {
var _info$file2;
message.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message);
_onChange([]);
return;
}
_onChange(fileList);
},
onRemove: function () {
var _onRemove = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
var fileSize, id, rs;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
fileSize = file.size / 1024 / 1024;
if (!(file.status === 'uploading')) {
_context.next = 3;
break;
}
return _context.abrupt("return", true);
case 3:
if (fileSize < maxSize) {
_context.next = 7;
break;
}
return _context.abrupt("return", true);
case 7:
id = file.response ? file.response.id : file.uid;
if (!id) {
_context.next = 15;
break;
}
_context.next = 11;
return removeAttachment(file.response ? file.response.id : file.id);
case 11:
rs = _context.sent;
return _context.abrupt("return", rs);
case 15:
return _context.abrupt("return", true);
case 16:
case "end":
return _context.stop();
}
}, _callee);
}));
function onRemove(_x) {
return _onRemove.apply(this, arguments);
}
return onRemove;
}()
};
function onCancel(e) {
e.preventDefault();
e.stopPropagation();
}
return /*#__PURE__*/_jsx("div", {
className: "single-upload ".concat(className ? className : ''),
children: /*#__PURE__*/_jsxs(Upload, _objectSpread(_objectSpread({}, uploadProps), {}, {
children: [/*#__PURE__*/_jsx(Button, {
type: "primary",
title: value.length > 0 ? '每次只能上传一个资源, 删除下面资源可重新上传 ' : '',
disabled: value.length > 0,
ghost: true,
children: title
}), /*#__PURE__*/_jsxs("span", {
onClick: onCancel,
style: {
marginLeft: 10
},
children: ["(\u5355\u4E2A\u6587\u4EF6\u6700\u5927", maxSize, "M)", ' ']
})]
}))
});
});
/***/ }),
/***/ 33099:
/*!*************************************************************!*\
!*** ./src/components/markdown-editor/code-block/index.tsx ***!
@ -11858,8 +11884,8 @@ var markdown_editor = __webpack_require__(58273);
var video = __webpack_require__(15615);
// EXTERNAL MODULE: ./src/pages/Video/Detail/components/AddVideoModal/index.tsx + 1 modules
var AddVideoModal = __webpack_require__(8910);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 3 modules
var MultiUpload = __webpack_require__(80638);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(99531);
;// CONCATENATED MODULE: ./src/pages/Paths/Detail/components/Stage/Discuss/index.less
// extracted by mini-css-extract-plugin

@ -1,4 +1,4 @@
(self["webpackChunk"] = self["webpackChunk"] || []).push([[93665,80638],{
(self["webpackChunk"] = self["webpackChunk"] || []).push([[93665,99531],{
/***/ 40720:
/*!*********************************!*\
@ -124,9 +124,9 @@ var useDisableAction = function useDisableAction(disable) {
/***/ }),
/***/ 80638:
/***/ 99531:
/*!**********************************************************!*\
!*** ./src/components/MultiUpload/index.tsx + 3 modules ***!
!*** ./src/components/MultiUpload/index.tsx + 2 modules ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
@ -158,7 +158,7 @@ var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/index.js + 24 modules
var upload = __webpack_require__(46651);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
var es_message = __webpack_require__(8591);
var message = __webpack_require__(8591);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
var modal = __webpack_require__(43418);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
@ -167,136 +167,8 @@ var es_button = __webpack_require__(3113);
var env = __webpack_require__(17985);
// EXTERNAL MODULE: ./src/pages/MoopCases/FormPanel/service.ts
var service = __webpack_require__(52989);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/components/SingleUpload/index.tsx
var uploadNameSizeSeperator = '  ';
function bytesToSize(bytes) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
if (bytes == 0) return '0 Byte';
var i = parseInt('' + Math.floor(Math.log(bytes) / Math.log(1024)), 10);
return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i];
}
/* harmony default export */ var SingleUpload = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? [] : _ref$value,
action = _ref.action,
_onChange = _ref.onChange,
className = _ref.className,
_ref$maxSize = _ref.maxSize,
maxSize = _ref$maxSize === void 0 ? 150 : _ref$maxSize,
_ref$title = _ref.title,
title = _ref$title === void 0 ? '文件上传' : _ref$title,
_ref$accept = _ref.accept,
accept = _ref$accept === void 0 ? null : _ref$accept;
var uploadProps = {
multiple: false,
fileList: value,
accept: accept,
withCredentials: true,
beforeUpload: function beforeUpload(file) {
var fileSize = file.size / 1024 / 1024;
if (!(fileSize < maxSize)) {
message.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20"));
return Promise.reject();
}
return true;
},
action: "".concat(ENV.API_SERVER, "/api/attachments.json"),
// ?debug=student&randomcode=undefined&client_key=6d57f8c3dd186c5ada392546ace9620a
onChange: function onChange(info) {
var _info$file;
var fileList = _toConsumableArray(info.fileList);
fileList = fileList.map(function (file) {
if (file.name.indexOf(uploadNameSizeSeperator) === -1) {
file.name = "".concat(file.name).concat(uploadNameSizeSeperator).concat(bytesToSize(file.size));
}
return _objectSpread({}, file);
});
if (info.file.status === 'done' && ((_info$file = info.file) === null || _info$file === void 0 || (_info$file = _info$file.response) === null || _info$file === void 0 ? void 0 : _info$file.status) === -1) {
var _info$file2;
message.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message);
_onChange([]);
return;
}
_onChange(fileList);
},
onRemove: function () {
var _onRemove = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
var fileSize, id, rs;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
fileSize = file.size / 1024 / 1024;
if (!(file.status === 'uploading')) {
_context.next = 3;
break;
}
return _context.abrupt("return", true);
case 3:
if (fileSize < maxSize) {
_context.next = 7;
break;
}
return _context.abrupt("return", true);
case 7:
id = file.response ? file.response.id : file.uid;
if (!id) {
_context.next = 15;
break;
}
_context.next = 11;
return removeAttachment(file.response ? file.response.id : file.id);
case 11:
rs = _context.sent;
return _context.abrupt("return", rs);
case 15:
return _context.abrupt("return", true);
case 16:
case "end":
return _context.stop();
}
}, _callee);
}));
function onRemove(_x) {
return _onRemove.apply(this, arguments);
}
return onRemove;
}()
};
function onCancel(e) {
e.preventDefault();
e.stopPropagation();
}
return /*#__PURE__*/_jsx("div", {
className: "single-upload ".concat(className ? className : ''),
children: /*#__PURE__*/_jsxs(Upload, _objectSpread(_objectSpread({}, uploadProps), {}, {
children: [/*#__PURE__*/_jsx(Button, {
type: "primary",
title: value.length > 0 ? '每次只能上传一个资源, 删除下面资源可重新上传 ' : '',
disabled: value.length > 0,
ghost: true,
children: title
}), /*#__PURE__*/_jsxs("span", {
onClick: onCancel,
style: {
marginLeft: 10
},
children: ["(\u5355\u4E2A\u6587\u4EF6\u6700\u5927", maxSize, "M)", ' ']
})]
}))
});
});
// EXTERNAL MODULE: ./src/components/SingleUpload/index.tsx
var SingleUpload = __webpack_require__(95081);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.7@@ant-design/icons/es/icons/InboxOutlined.js + 1 modules
var InboxOutlined = __webpack_require__(93737);
// EXTERNAL MODULE: ./node_modules/_lodash@4.17.21@lodash/lodash.js
@ -352,6 +224,8 @@ var SvgUploadImg = function SvgUploadImg(props) {
};
/* harmony default export */ var uploadImg = ("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwLjM1NCAzLjVoLTIuNzd2OC4xNjdINi40MTZWMy41SDMuNjQ2TDcgMGwzLjM1NCAzLjVaTTE0IDdoLTEuMTY3djUuODMzSDEuMTY3VjdIMHY3aDE0VjdaIiBmaWxsPSIjMzA2MUQwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=");
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/components/MultiUpload/index.tsx
@ -377,7 +251,7 @@ function coverToFileList(data) {
return {
uid: item.id,
id: item.id,
name: item.title + uploadNameSizeSeperator + item.filesize,
name: item.title + SingleUpload/* uploadNameSizeSeperator */.sX + item.filesize,
url: item.url,
filesize: item.filesize,
status: 'done',
@ -450,7 +324,7 @@ function coverToFileList(data) {
if (fileList.concat(fileArr).length > number) {
fileList.pop();
setFileList(toConsumableArray_default()(fileList));
es_message/* default */.ZP.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(number, "\u4E2A\u6587\u4EF6"));
message/* default */.ZP.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(number, "\u4E2A\u6587\u4EF6"));
if (aloneClear) {
return Promise.reject();
}
@ -458,7 +332,7 @@ function coverToFileList(data) {
return false;
}
if (!(fileSize < maxSize)) {
es_message/* default */.ZP.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB)."));
message/* default */.ZP.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB)."));
if (aloneClear) {
return Promise.reject();
}
@ -479,7 +353,7 @@ function coverToFileList(data) {
}
if (info.file.status === 'done' && ((_info$file = info.file) === null || _info$file === void 0 || (_info$file = _info$file.response) === null || _info$file === void 0 ? void 0 : _info$file.status) === -1) {
var _info$file2;
es_message/* default */.ZP.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message);
message/* default */.ZP.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message);
return;
}
if (fileList.length >= number) setDisabled(true);else setDisabled(false);
@ -490,8 +364,8 @@ function coverToFileList(data) {
var _file$response2;
file.url = "/api/attachments/".concat(file === null || file === void 0 || (_file$response2 = file.response) === null || _file$response2 === void 0 ? void 0 : _file$response2.id);
}
if (file.name.indexOf(uploadNameSizeSeperator) === -1) {
file.name = "".concat(file.name).concat(uploadNameSizeSeperator).concat(bytesToSize(file.size));
if (file.name.indexOf(SingleUpload/* uploadNameSizeSeperator */.sX) === -1) {
file.name = "".concat(file.name).concat(SingleUpload/* uploadNameSizeSeperator */.sX).concat((0,SingleUpload/* bytesToSize */.RD)(file.size));
}
return objectSpread2_default()({}, file);
});
@ -557,7 +431,7 @@ function coverToFileList(data) {
return remove();
case 2:
res = _context2.sent;
es_message/* default */.ZP.success('删除成功');
message/* default */.ZP.success('删除成功');
resolve(true);
case 5:
case "end":
@ -625,6 +499,159 @@ function coverToFileList(data) {
/***/ }),
/***/ 95081:
/*!***********************************************!*\
!*** ./src/components/SingleUpload/index.tsx ***!
\***********************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ RD: function() { return /* binding */ bytesToSize; },
/* harmony export */ sX: function() { return /* binding */ uploadNameSizeSeperator; }
/* harmony export */ });
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js */ 41498);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js */ 37205);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test4_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _utils_env__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/utils/env */ 17985);
/* harmony import */ var _pages_MoopCases_FormPanel_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/pages/MoopCases/FormPanel/service */ 52989);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
var uploadNameSizeSeperator = '  ';
function bytesToSize(bytes) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
if (bytes == 0) return '0 Byte';
var i = parseInt('' + Math.floor(Math.log(bytes) / Math.log(1024)), 10);
return (bytes / Math.pow(1024, i)).toFixed(1) + ' ' + sizes[i];
}
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (function (_ref) {
var _ref$value = _ref.value,
value = _ref$value === void 0 ? [] : _ref$value,
action = _ref.action,
_onChange = _ref.onChange,
className = _ref.className,
_ref$maxSize = _ref.maxSize,
maxSize = _ref$maxSize === void 0 ? 150 : _ref$maxSize,
_ref$title = _ref.title,
title = _ref$title === void 0 ? '文件上传' : _ref$title,
_ref$accept = _ref.accept,
accept = _ref$accept === void 0 ? null : _ref$accept;
var uploadProps = {
multiple: false,
fileList: value,
accept: accept,
withCredentials: true,
beforeUpload: function beforeUpload(file) {
var fileSize = file.size / 1024 / 1024;
if (!(fileSize < maxSize)) {
message.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20"));
return Promise.reject();
}
return true;
},
action: "".concat(ENV.API_SERVER, "/api/attachments.json"),
// ?debug=student&randomcode=undefined&client_key=6d57f8c3dd186c5ada392546ace9620a
onChange: function onChange(info) {
var _info$file;
var fileList = _toConsumableArray(info.fileList);
fileList = fileList.map(function (file) {
if (file.name.indexOf(uploadNameSizeSeperator) === -1) {
file.name = "".concat(file.name).concat(uploadNameSizeSeperator).concat(bytesToSize(file.size));
}
return _objectSpread({}, file);
});
if (info.file.status === 'done' && ((_info$file = info.file) === null || _info$file === void 0 || (_info$file = _info$file.response) === null || _info$file === void 0 ? void 0 : _info$file.status) === -1) {
var _info$file2;
message.error((_info$file2 = info.file) === null || _info$file2 === void 0 || (_info$file2 = _info$file2.response) === null || _info$file2 === void 0 ? void 0 : _info$file2.message);
_onChange([]);
return;
}
_onChange(fileList);
},
onRemove: function () {
var _onRemove = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {
var fileSize, id, rs;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
fileSize = file.size / 1024 / 1024;
if (!(file.status === 'uploading')) {
_context.next = 3;
break;
}
return _context.abrupt("return", true);
case 3:
if (fileSize < maxSize) {
_context.next = 7;
break;
}
return _context.abrupt("return", true);
case 7:
id = file.response ? file.response.id : file.uid;
if (!id) {
_context.next = 15;
break;
}
_context.next = 11;
return removeAttachment(file.response ? file.response.id : file.id);
case 11:
rs = _context.sent;
return _context.abrupt("return", rs);
case 15:
return _context.abrupt("return", true);
case 16:
case "end":
return _context.stop();
}
}, _callee);
}));
function onRemove(_x) {
return _onRemove.apply(this, arguments);
}
return onRemove;
}()
};
function onCancel(e) {
e.preventDefault();
e.stopPropagation();
}
return /*#__PURE__*/_jsx("div", {
className: "single-upload ".concat(className ? className : ''),
children: /*#__PURE__*/_jsxs(Upload, _objectSpread(_objectSpread({}, uploadProps), {}, {
children: [/*#__PURE__*/_jsx(Button, {
type: "primary",
title: value.length > 0 ? '每次只能上传一个资源, 删除下面资源可重新上传 ' : '',
disabled: value.length > 0,
ghost: true,
children: title
}), /*#__PURE__*/_jsxs("span", {
onClick: onCancel,
style: {
marginLeft: 10
},
children: ["(\u5355\u4E2A\u6587\u4EF6\u6700\u5927", maxSize, "M)", ' ']
})]
}))
});
});
/***/ }),
/***/ 33099:
/*!*************************************************************!*\
!*** ./src/components/markdown-editor/code-block/index.tsx ***!

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save