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

1949 lines
89 KiB

This file contains ambiguous Unicode characters!

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

(self["webpackChunk"] = self["webpackChunk"] || []).push([[1702],{
/***/ 52702:
/*!***********************************************************************************************************!*\
!*** ./node_modules/_@ant-design_icons@5.3.5@@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules ***!
\***********************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ icons_ArrowDownOutlined; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.24.1@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(66820);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/ArrowDownOutlined.js
// This icon file is generated automatically.
var ArrowDownOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z" } }] }, "name": "arrow-down", "theme": "outlined" };
/* harmony default export */ var asn_ArrowDownOutlined = (ArrowDownOutlined);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.5@@ant-design/icons/es/components/AntdIcon.js + 3 modules
var AntdIcon = __webpack_require__(13814);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.3.5@@ant-design/icons/es/icons/ArrowDownOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ArrowDownOutlined_ArrowDownOutlined = function ArrowDownOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_ArrowDownOutlined
}));
};
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(ArrowDownOutlined_ArrowDownOutlined);
if (false) {}
/* harmony default export */ var icons_ArrowDownOutlined = (RefIcon);
/***/ }),
/***/ 72544:
/*!*****************************************!*\
!*** ./src/components/NoData/index.tsx ***!
\*****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ 93314);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 3113);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
var noData = function noData(_ref) {
var img = _ref.img,
_ref$buttonProps = _ref.buttonProps,
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
_ref$styles = _ref.styles,
styles = _ref$styles === void 0 ? {} : _ref$styles,
customText = _ref.customText,
ButtonText = _ref.ButtonText,
ButtonClick = _ref.ButtonClick,
Buttonclass = _ref.Buttonclass,
ButtonTwo = _ref.ButtonTwo,
imgStyles = _ref.imgStyles,
_ref$loading = _ref.loading,
loading = _ref$loading === void 0 ? false : _ref$loading;
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("section", {
className: "tc animated fadeIn",
style: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, {
color: '#999',
margin: '100px auto',
visibility: loading ? 'hidden' : 'visible'
}), styles),
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("img", {
src: img || _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__,
style: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, imgStyles), {}, {
pointerEvents: "none",
userSelect: "none"
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", {
className: "mt20 font14",
children: customText || '暂时还没有相关数据哦!'
}), ButtonText && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .ZP, _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({
className: Buttonclass,
onClick: ButtonClick
}, buttonProps), {}, {
children: ButtonText
})), ButtonTwo && ButtonTwo]
});
};
/* harmony default export */ __webpack_exports__.Z = (noData);
/***/ }),
/***/ 92472:
/*!*********************************************************!*\
!*** ./src/components/PreviewAll/index.tsx + 1 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ PreviewAll; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(82242);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(7557);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(41498);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(79800);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var PreviewAllmodules = ({"wrp":"wrp___dq7YK","bgBlack":"bgBlack___ARIUV","monaco":"monaco___VnZC3","darkBlue":"darkBlue___UprA9","close":"close___LKoWu","embed":"embed___hvpEJ"});
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
var es_button = __webpack_require__(3113);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.5@@ant-design/icons/es/icons/ArrowDownOutlined.js + 1 modules
var ArrowDownOutlined = __webpack_require__(52702);
// EXTERNAL MODULE: ./src/components/monaco-editor/index.jsx + 4 modules
var monaco_editor = __webpack_require__(12124);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
var tooltip = __webpack_require__(6848);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(67747);
// EXTERNAL MODULE: ./src/service/exercise.ts
var exercise = __webpack_require__(91610);
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
var NoData = __webpack_require__(72544);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(33083);
// EXTERNAL MODULE: ./src/service/attachment.ts
var attachment = __webpack_require__(67753);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/components/PreviewAll/index.tsx
/* harmony default export */ var PreviewAll = (function (_ref) {
var _data, _data2, _data3, _data4, _data5, _data6;
var _ref$editOffice = _ref.editOffice,
editOffice = _ref$editOffice === void 0 ? 'view' : _ref$editOffice,
data = _ref.data,
theme = _ref.theme,
type = _ref.type,
filename = _ref.filename,
monacoEditor = _ref.monacoEditor,
className = _ref.className,
style = _ref.style,
close = _ref.close,
onClose = _ref.onClose,
hasMask = _ref.hasMask,
disabledDownload = _ref.disabledDownload,
onImgDimensions = _ref.onImgDimensions,
showNodata = _ref.showNodata,
recordInfo = _ref.recordInfo;
var _useState = (0,_react_17_0_2_react.useState)('https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt'),
_useState2 = slicedToArray_default()(_useState, 2),
src = _useState2[0],
setSrc = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(""),
_useState4 = slicedToArray_default()(_useState3, 2),
token = _useState4[0],
setToken = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(),
_useState6 = slicedToArray_default()(_useState5, 2),
officeData = _useState6[0],
setOfficeData = _useState6[1];
var officePath = window.ENV === "build" ? "/react/build" : "";
var apiServer = location.host.startsWith("localhost") ? env/* default */.Z.PROXY_SERVER : env/* default */.Z.API_SERVER;
// let size;
var unit = 1024 * 1024;
var maxSize = 10 * unit;
var closeRef = (0,_react_17_0_2_react.useRef)();
if ((_data = data) !== null && _data !== void 0 && _data.startsWith("/api") && type !== "txt") {
data = env/* default */.Z.API_SERVER + data;
}
var getFileExtension = function getFileExtension(url) {
var filename = url.substring(url.lastIndexOf('/') + 1);
var extension = filename.split('.').pop();
return extension;
};
if (filename) monacoEditor.filename = filename;
(0,_react_17_0_2_react.useEffect)(function () {
var _document$cookie;
var cookies = (_document$cookie = document.cookie) === null || _document$cookie === void 0 || (_document$cookie = _document$cookie.replace(/\s/g, "")) === null || _document$cookie === void 0 ? void 0 : _document$cookie.split(";");
cookies === null || cookies === void 0 || cookies.map(function (item) {
var i = item.split("=");
if (i[0] === '_educoder_session') {
setToken(i[1]);
}
});
}, []);
(0,_react_17_0_2_react.useEffect)(function () {
if (type === "office") {
if (data.indexOf("bigfilescdn.") > -1 || data.indexOf("bigfiles1") > -1) {
setOfficeData({
url: data,
fileType: getFileExtension(data),
model: data.indexOf("model=edit") ? "edit" : "view"
});
} else {
getData();
}
}
}, [type, data]);
var getData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _url, _id, res;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
console.log("data:", data);
_url = data;
if (!data.startsWith("http")) {
_url = location.origin + _url;
}
_id = new URL(_url).pathname.split("/").pop();
_context.next = 6;
return (0,exercise/* setEcsAttachment */.gJ)({
attachment_id: _id
});
case 6:
res = _context.sent;
res.url = apiServer + res.url;
setOfficeData(res);
case 9:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getData() {
return _ref2.apply(this, arguments);
};
}();
var handleClick = function handleClick() {
if (data.startsWith("http") || data.startsWith('blob:')) {
handleDown();
return;
}
(0,util/* downloadFile */.Sv)(filename || 'educoder', data, filename);
};
var handleDown = function handleDown() {
if (recordInfo) {
// 教学资料--点击下载资料时记录下载信息
(0,attachment/* add_file_quantity */.fc)({
id: recordInfo === null || recordInfo === void 0 ? void 0 : recordInfo.id,
watch_type: 1,
course_id: recordInfo === null || recordInfo === void 0 ? void 0 : recordInfo.course_id
});
}
(0,util/* downLoadLink */.Nd)(filename || 'educoder', decodeURIComponent(data));
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: objectSpread2_default()({}, style || {}),
className: "".concat(hasMask && PreviewAllmodules.bgBlack, " ").concat(!!type ? PreviewAllmodules.wrp : "hide"),
children: [close && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: PreviewAllmodules.close,
ref: closeRef,
children: [!!onImgDimensions && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: function onClick() {
onClose();
onImgDimensions();
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-yulanpizhu"
})
})
}), !disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
onClick: handleDown,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-quxiaozhiding"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: "\u5173\u95ED",
getPopupContainer: function getPopupContainer() {
return closeRef.current;
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "",
onClick: onClose,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "icon-guanbi1"
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(PreviewAllmodules[className], " ").concat(className, " ").concat(PreviewAllmodules.monaco, " ").concat(type === "txt" ? "show" : "hide"),
children: type === "txt" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(monaco_editor/* default */.ZP, objectSpread2_default()({}, monacoEditor))
})
}), type === "audio" && /*#__PURE__*/(0,jsx_runtime.jsx)("audio", {
src: "".concat(((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.indexOf("http://")) > -1 || ((_data3 = data) === null || _data3 === void 0 ? void 0 : _data3.indexOf("https://")) > -1 ? "" : "data:audio/mp3;base64,").concat(data),
autoPlay: true
}), type === "video" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.indexOf("http")) > -1 ? /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "".concat(data),
autoPlay: true
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("video", {
controls: true,
src: "data:video/mp4;base64,".concat(data),
autoPlay: true
})
}), type === 'office' && officeData && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/office.html?key=").concat(officeData.key, "&url=").concat(btoa(officeData.url), "&callbackUrl=").concat(apiServer + officeData.callbackUrl, "&fileType=").concat(officeData.fileType, "&title=").concat(officeData.title, "&model=").concat(editOffice, "&officeServer=").concat(env/* default */.Z.ONLYOFFICE, "&disabledDownload=").concat(!!disabledDownload)
}), type === 'html' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: data + '&disposition=inline'
}), type === 'pdf' && /*#__PURE__*/(0,jsx_runtime.jsx)("iframe", {
src: "".concat(officePath, "/js/pdfview/index.html?url=").concat(data, "&disabledDownload=").concat(!!disabledDownload)
}) //<embed className={styles.embed + "#toolbar=0"} src={data} />
, type === "image" && /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: "".concat(((_data5 = data) === null || _data5 === void 0 ? void 0 : _data5.indexOf("http://")) > -1 || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.indexOf("https://")) > -1 ? "" : "data:image/png;base64,").concat(data)
}), (type === "other" || type === "download") && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
children: showNodata ? /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {
customText: "\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",
ButtonTwo: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-xiazai4 font14"
}),
type: "primary",
size: 'middle',
onClick: handleClick,
children: "\u4E0B\u8F7D"
})
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
type: "primary",
size: 'middle',
onClick: handleClick,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ArrowDownOutlined/* default */.Z, {}), "\u70B9\u51FB\u4E0B\u8F7D"]
})
})]
});
});
/***/ }),
/***/ 70335:
/*!********************************************************!*\
!*** ./src/pages/Classrooms/New/index.tsx + 3 modules ***!
\********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ New; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
var regeneratorRuntime = __webpack_require__(7557);
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
var objectSpread2 = __webpack_require__(82242);
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(41498);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(79800);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 15 modules
var _umi_production_exports = __webpack_require__(46478);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
var es_form = __webpack_require__(78241);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
var message = __webpack_require__(8591);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
var modal = __webpack_require__(43418);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
var es_button = __webpack_require__(3113);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/auto-complete/index.js
var auto_complete = __webpack_require__(88522);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
var input = __webpack_require__(62680);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/date-picker/index.js + 66 modules
var date_picker = __webpack_require__(92641);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/checkbox/index.js + 3 modules
var es_checkbox = __webpack_require__(24905);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/radio/index.js + 5 modules
var es_radio = __webpack_require__(5112);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/index.js + 24 modules
var upload = __webpack_require__(33556);
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js
var dayjs_min = __webpack_require__(9498);
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/lib/date-picker/locale/zh_CN.js
var zh_CN = __webpack_require__(10527);
// EXTERNAL MODULE: ./src/pages/Classrooms/New/components/AppplySchoolModal/index.tsx + 1 modules
var AppplySchoolModal = __webpack_require__(5305);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__(79539);
// EXTERNAL MODULE: ./src/service/classrooms.ts
var classrooms = __webpack_require__(77630);
;// CONCATENATED MODULE: ./src/pages/Classrooms/New/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Newmodules = ({"bg":"bg___scGBN","wrap":"wrap___h5b4S","middle":"middle___hq_IK","row":"row___EoLy1","title":"title___BQ3Sj","size":"size___Tag29","download":"download___ROULb","preview":"preview___JP69C","delete":"delete___JF6Ct","annotation":"annotation___DCmsV","crumbs":"crumbs___JJo3q","titleWrap":"titleWrap___Cnywx","flexRow":"flexRow___FVlte","flexJustifyCenter":"flexJustifyCenter___Q_2Lz","flexAlignCenter":"flexAlignCenter___d6nhw","flexColumn":"flexColumn___mCDIJ","fieldWrap":"fieldWrap___dOMry","checkUsersFromCode":"checkUsersFromCode___toyn5","courseField":"courseField___qQV_5","courseExample":"courseExample___IY_Tc","period":"period___vIGwk","credit":"credit___aOpp2","endTime":"endTime___E5PEn","width655":"width655___Zwxr5","color999":"color999___ZFcVB","colorCDCDCD":"colorCDCDCD___Cb3mH","color0152d9":"color0152d9___bDkNR","backgroundFa":"backgroundFa___lmMKC","bBtn":"bBtn____iNQx","schoolHintWrap":"schoolHintWrap___VeMJ3","w700":"w700___YWsgj","classromediv":"classromediv___Ee2n7","glow":"glow___uTEgy","modal":"modal___xWdwx","content":"content___b2kXV","box":"box___iMIt6"});
;// CONCATENATED MODULE: ./src/pages/Classrooms/New/img/correct.png
var correct_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAf5JREFUOE+tVT1oE2EYft5LgqF3/lBqaWMTiE1ahYpLJpFCNydbFQUzZBDppkuJCJXSUUxpOwgOQkHFDqVNi4tVcHOsDiKGXNqhYi4ilUByPbQx98p3ckfIT5Ngbny/53m+5/353iPU+ZjZs61/n2DiCWaOAOT7B2ONiLaIaSOk9G0QUamaTtWBtKFdoTISDB6sd5kdI9AOuxAf7vKtV+IcQWaWMvvaQ2bEDxOqcURIhGXffSIyxZkjqOrZR+2KOW4JiSHl1D1HUKSJMifbcVaDddFVkT6JBmT0XKpZzZpdJmoaVvrPUqaYu27CXGlGaOVcgnSDVF17yczRVgg25knuHdb2trBwOopzst+hEtEypYvZNIChVgR/myVM767ibf4zJBCeDU/ivByopKqULmpFgBU7upn/hLlvrzETGMfo8TMO+EepgLs7L/DF0KC4vJgL3sSFY6EqH6TXCL76+REPdtfglTxYCt/GiDxgiQgxIeo/0o3HgzEEvSfrJGUJ1qY8+zWJ5N4HdLtlTPaPYTH7Br/MEiJHg5gPRnHC3dWoQmrdppRh4s72c7wvZBzitZ4Ipv2X4SZXw3JbTWk0NoZ5gFvqU6SMHKYGLiHWe7Fp36yxOWywhdP8HwM9bqdnjd3Zgy0QHX169pUdXQ7W6uz0+rKddmzBVlb7f34BfwEB2vw97tKWNAAAAABJRU5ErkJggg==";
;// CONCATENATED MODULE: ./src/pages/Classrooms/New/img/error.png
var error_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAkNJREFUOE+tlUtLG1EUx/9nRidpCEm6EKGQiBYC3Wfjxp24EIwJNNHiA/EraMnSZWnUha4EQRRaTBet6MKVn8CqCGqpGskDIgqaBGPSPGZOmbHGPCaCNHd5Hr97Xvdcgs5h5tZCLDZIzIMMuIjojWrGzAkCfjLRhuRwbBBRsdadagWleNwjK0oQzG/1LivLiMKiIEy32O0/Ku3KQGYWCrHYJzBPPwuqC4mCksMRICJFVZWB+Wj084thj3CioKGj42MZqKUpy99fFFmNsSiKXjV9+teAX5U1Kx0doXh4iFdDQ4AoVrmWLi6Q39qCaWICZLE86YjCksPxjvLR6Hswf6v0Sk9OIr+zA4PbDev8fBlaOj9Hyu+HcnMD69ISDH191XES+agQiXxh4EOlpnhwgNToKDiTKUPleBxJnw/K9TWknh7YlpcBSaoCEvCV8pHIbwDO2voV9/aQGhsD399D6u2FfHwMOZGA1N0N28oKYDTqlfyUCtHoHTOb9bQadGQEnMtp6laXC7a1NZDJpNs/Iso8C1TTS7rdkC8vNYCxvx+WxUVAEBoDG6Ws3N4i6fdDPjuD2NkJ5eoKnM3C6PHAMjfXCHqq2xROp5EcHkbp5ASi04nXoRDkcPihpirU64VldrYO+tAUnbG5CwSQW19HS1cXbKEQhLY2LcXi7i5S4+Ma1LqwAMPAQP3Y6A32n+1tFDY3YZ6ZgdDeXuVU3N9HdnUV5qkpiHZ7/WCrkqY+vccrmrocVGjT19djpE1bsJWV/58v4C/igjuIQ13SqQAAAABJRU5ErkJggg==";
// EXTERNAL MODULE: ./node_modules/_react-copy-to-clipboard@5.0.2@react-copy-to-clipboard/lib/index.js
var lib = __webpack_require__(56102);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(67747);
// EXTERNAL MODULE: ./src/utils/authority.ts
var authority = __webpack_require__(40441);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.5@@ant-design/icons/es/icons/FolderOpenOutlined.js + 1 modules
var FolderOpenOutlined = __webpack_require__(81904);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(33083);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 1 modules
var PreviewAll = __webpack_require__(92472);
// EXTERNAL MODULE: ./src/assets/images/account/touge_code.jpg
var touge_code = __webpack_require__(29831);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Classrooms/New/index.tsx
var disabledDate = function disabledDate(current) {
return current && current < dayjs_min_default()().endOf('day').subtract(1, 'days');
};
var NewClassroomPage = function NewClassroomPage(_ref) {
var _user$userInfo, _user$userInfo2, _formValue$course, _form$getFieldValue, _formValue$period, _formValue$credit, _editData$course_modu, _LetData$course_modul, _newClassroom$schoolL, _newClassroom$schoolL2;
var user = _ref.user,
newClassroom = _ref.newClassroom,
globalSetting = _ref.globalSetting,
classroomList = _ref.classroomList,
shixunHomeworks = _ref.shixunHomeworks,
loading = _ref.loading,
dispatch = _ref.dispatch;
var params = (0,_umi_production_exports.useParams)();
var _useSearchParams = (0,_umi_production_exports.useSearchParams)(),
_useSearchParams2 = slicedToArray_default()(_useSearchParams, 1),
searchParams = _useSearchParams2[0];
var _Form$useForm = es_form/* default */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
form = _Form$useForm2[0];
var _useState = (0,_react_17_0_2_react.useState)({}),
_useState2 = slicedToArray_default()(_useState, 2),
formValue = _useState2[0],
setFormValue = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(),
_useState4 = slicedToArray_default()(_useState3, 2),
isEdit = _useState4[0],
setIsEdit = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)({}),
_useState6 = slicedToArray_default()(_useState5, 2),
editData = _useState6[0],
setEditData = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)([]),
_useState8 = slicedToArray_default()(_useState7, 2),
LetData = _useState8[0],
setletdata = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)(''),
_useState10 = slicedToArray_default()(_useState9, 2),
fileList = _useState10[0],
setFileList = _useState10[1];
var _useState11 = (0,_react_17_0_2_react.useState)(),
_useState12 = slicedToArray_default()(_useState11, 2),
file = _useState12[0],
setfile = _useState12[1];
var _useState13 = (0,_react_17_0_2_react.useState)(false),
_useState14 = slicedToArray_default()(_useState13, 2),
okloading = _useState14[0],
setokloading = _useState14[1];
var _useState15 = (0,_react_17_0_2_react.useState)({
content: "",
type: ""
}),
_useState16 = slicedToArray_default()(_useState15, 2),
data = _useState16[0],
setData = _useState16[1];
var _useState17 = (0,_react_17_0_2_react.useState)(false),
_useState18 = slicedToArray_default()(_useState17, 2),
isshow = _useState18[0],
setisshow = _useState18[1];
(0,_react_17_0_2_react.useEffect)(function () {
if (!params.coursesId) {
setIsEdit(false);
getCourseData();
form.setFieldsValue({
set: 0,
is_show_conceal: false
});
setFormValue({
set: 0,
is_show_conceal: false
});
return;
}
setIsEdit(true);
getEditData();
}, [params.coursesId]);
(0,_react_17_0_2_react.useEffect)(function () {
if (!LetData.user_school) {
return;
}
var userSchool = LetData.user_school;
form.setFieldsValue({
school: userSchool
});
getSchoolList(userSchool);
}, [LetData]);
var getEditData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var res, _data;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0,classrooms/* getCourseEditData */.EO)({
coursesId: params.coursesId
});
case 2:
res = _context.sent;
if (res !== null && res !== void 0 && res.course_id) {
setEditData(objectSpread2_default()({}, res) || {});
_data = {
course: res.course_list_name,
classroom: res.name,
period: res.class_period,
credit: res.credit,
allowed_quit: res === null || res === void 0 ? void 0 : res.allowed_quit,
endTime: res.end_date && dayjs_min_default()(res.end_date),
publicClassroom: res.is_public === 1,
classModule: res.course_module_types,
school: res.school,
set: res.invite_code_halt,
allow_copy: res === null || res === void 0 ? void 0 : res.allow_copy,
is_show_conceal: res === null || res === void 0 ? void 0 : res.is_show_conceal,
student_join_approve: res === null || res === void 0 ? void 0 : res.student_join_approve,
student_join_pro: res === null || res === void 0 ? void 0 : res.student_join_pro
};
getSchoolList(res.school);
setFormValue(objectSpread2_default()({}, _data));
setfile(res === null || res === void 0 ? void 0 : res.student_attachment);
form.setFieldsValue(objectSpread2_default()({}, _data));
}
case 4:
case "end":
return _context.stop();
}
}, _callee);
}));
return function getEditData() {
return _ref2.apply(this, arguments);
};
}();
function getCourseData() {
return _getCourseData.apply(this, arguments);
}
function _getCourseData() {
_getCourseData = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
var data;
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/courses/new.json", {
method: 'get'
});
case 2:
data = _context3.sent;
if ((data === null || data === void 0 ? void 0 : data.status) === 0) {
setletdata(data);
form.setFieldValue("classModule", data === null || data === void 0 ? void 0 : data.course_module_types);
}
case 4:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _getCourseData.apply(this, arguments);
}
var getSchoolList = function getSchoolList(value) {
dispatch({
type: 'newClassroom/getSchoolList',
payload: {
search: value
}
});
};
var getSearchCourseList = function getSearchCourseList(value) {
dispatch({
type: 'newClassroom/getSearchCourseList',
payload: {
search: value
}
});
};
var handleCourseSearch = function handleCourseSearch(value) {
// if (!value) {
// return
// }
form.setFieldsValue({
classroom: value
});
getSearchCourseList(value);
};
var handleCourseSelect = function handleCourseSelect(value) {
value && form.setFieldsValue({
classroom: value
});
};
var handleSchoolChange = function handleSchoolChange(value) {
getSchoolList(value);
};
var handleApplySchool = function handleApplySchool() {
dispatch({
type: 'newClassroom/setActionTabs',
payload: {
key: 'NewClassroom-AppplySchool'
}
});
};
var goBack = function goBack() {
if (searchParams.get("username")) {
_umi_production_exports.history.push("/users/".concat(searchParams.get("username"), "/classrooms"));
return;
}
_umi_production_exports.history.push(isEdit ? "/classrooms/".concat(params.coursesId) : '/classrooms');
};
var handleFinish = /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(values) {
var _ref4, course_list_name, credit, name, class_period, endTime, publicClassroom, course_module_types, school, _ref4$set, set, allow_copy, allowed_quit, is_show_conceal, _ref4$student_join_ap, student_join_approve, _ref4$student_join_pr, student_join_pro, end_date, postData, res, _res, result, _result$course_module, _res2, _res3;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
if (!(!(0,authority/* isAdminOrCreator */.aN)() && isEdit)) {
_context2.next = 3;
break;
}
message/* default */.ZP.info('课堂信息只有课堂管理员可以调整');
return _context2.abrupt("return");
case 3:
_ref4 = values || {}, course_list_name = _ref4.course, credit = _ref4.credit, name = _ref4.classroom, class_period = _ref4.period, endTime = _ref4.endTime, publicClassroom = _ref4.publicClassroom, course_module_types = _ref4.classModule, school = _ref4.school, _ref4$set = _ref4.set, set = _ref4$set === void 0 ? 0 : _ref4$set, allow_copy = _ref4.allow_copy, allowed_quit = _ref4.allowed_quit, is_show_conceal = _ref4.is_show_conceal, _ref4$student_join_ap = _ref4.student_join_approve, student_join_approve = _ref4$student_join_ap === void 0 ? false : _ref4$student_join_ap, _ref4$student_join_pr = _ref4.student_join_pro, student_join_pro = _ref4$student_join_pr === void 0 ? false : _ref4$student_join_pr;
end_date = endTime && dayjs_min_default()(endTime).format('YYYY-MM-DD');
postData = {
course_list_name: course_list_name,
name: name,
class_period: class_period,
allowed_quit: allowed_quit,
credit: credit,
end_date: end_date,
is_public: publicClassroom ? 1 : 0,
course_module_types: course_module_types,
school: school,
set: set,
allow_copy: allow_copy,
is_show_conceal: is_show_conceal,
student_join_approve: student_join_approve,
student_join_pro: student_join_pro
};
if (!isEdit) {
_context2.next = 17;
break;
}
_context2.next = 9;
return (0,classrooms/* updateCourseData */.fr)(objectSpread2_default()(objectSpread2_default()({}, postData), {
coursesId: params.coursesId,
student_attachment_id: file === null || file === void 0 ? void 0 : file.id
}));
case 9:
res = _context2.sent;
if (!(((_res = res) === null || _res === void 0 ? void 0 : _res.status) === 0)) {
_context2.next = 15;
break;
}
_context2.next = 13;
return (0,fetch/* default */.ZP)("/api/courses/".concat(params.coursesId, "/left_banner.json"), {
method: 'get',
params: {
id: params.coursesId
}
});
case 13:
result = _context2.sent;
if (result) {
_umi_production_exports.history.push("".concat(result === null || result === void 0 || (_result$course_module = result.course_modules) === null || _result$course_module === void 0 ? void 0 : _result$course_module[0].category_url));
}
case 15:
_context2.next = 21;
break;
case 17:
_context2.next = 19;
return dispatch({
type: 'newClassroom/submitCourses',
payload: postData
});
case 19:
res = _context2.sent;
if (res.status !== -1) {
if (localStorage.getItem('Noviceguide') === '0') {} else {
dispatch({
type: 'shixunHomeworks/setActionTabs',
payload: {
key: '底部弹窗',
type: 7,
text: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u975E\u5E38\u68D2\uFF01\u6559\u5B66\u8BFE\u5802\u5DF2\u7ECF\u65B0\u5EFA\u5B8C\u6210\uFF01\u63A5\u4E0B\u6765\u60A8\u53EF\u4EE5\u70B9\u51FB \u201C\u8FDB\u5165\u8BFE\u5802\u8BE6\u60C5\u201D\u53BB\u9080\u8BF7\u60A8\u7684\u5B66\u751F\u3001\u8BBE\u7F6E\u8BFE\u5802\u5185\u5BB9\u4E86~"
})
}
});
}
(0,util/* trackEvent */.L9)(["教学课堂", '新建课堂']);
modal/* default */.Z.info({
title: "课堂创建成功",
width: 600,
className: "custom-modal-divider ".concat(Newmodules.modal),
icon: null,
okText: '进入课堂详情',
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Newmodules.content,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
children: ["\u60A8\u7684\u8BFE\u5802\u300A", course_list_name, "\u300B\u5DF2\u7ECF\u521B\u5EFA\u6210\u529F\uFF0C\u53EF\u590D\u5236\u4E0B\u65B9\u7684\u9080\u8BF7\u7801\uFF0C\u9080\u8BF7\u8001\u5E08\u3001\u52A9\u6559\u548C\u5B66\u751F\u52A0\u5165\u8BFE\u5802\u8FDB\u884C\u6559\u5B66\u548C\u5B66\u4E60\u3002"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
children: "\u88AB\u9080\u8BF7\u7528\u6237\u53EF\u4EE5\u5728\u52A0\u5165\u8BFE\u5802\u5F39\u7A97\u4E2D\u8F93\u5165\u9080\u8BF7\u7801\u52A0\u5165\u8BFE\u5802\u4E2D\u3002"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Newmodules.box,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u9080\u8BF7\u7801\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: (_res2 = res) === null || _res2 === void 0 ? void 0 : _res2.invite_code
}), /*#__PURE__*/(0,jsx_runtime.jsx)(lib.CopyToClipboard, {
text: (_res3 = res) === null || _res3 === void 0 ? void 0 : _res3.invite_code,
onCopy: function onCopy() {
return message/* default */.ZP.success('复制成功');
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
children: "\u590D\u5236\u9080\u8BF7\u7801"
})
})]
})]
}),
onOk: function onOk() {
window.scrollTo(0, 0);
// res && history.push(res.first_category_url)
res && window.open(res.first_category_url, "_self");
if (localStorage.getItem('Noviceguide') === '0') {} else {
dispatch({
type: 'shixunHomeworks/setActionTabs',
payload: {
key: '底部弹窗',
type: 11,
text: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u63A5\u4E0B\u6765\uFF0C\u54B1\u4EEC\u7ED9\u6559\u5B66\u8BFE\u5802\u6DFB\u52A0\u4E00\u4E2A\u201C\u8BFE\u7A0B\u5B9E\u9A8C\u201D~\u70B9\u51FB\u201C\u9009\u7528\u5B9E\u8DF5\u9879\u76EE\u201D\uFF0C\u9009\u62E9\u4E00\u4E2A\u4F5C\u4E1A\uFF0C\u7136\u540E\u70B9\u51FB\u201C\u7ACB\u5373\u53D1\u5E03\u201D\u5C31\u7ED9\u5B9E\u8DF5\u8BFE\u5802\u6DFB\u52A0\u4E86\u4E00\u4E2A\u8BFE\u7A0B\u5B9E\u9A8C\u3002"
})
}
});
}
}
});
}
case 21:
if (res) {
window.localStorage.setItem('yslGuideone', "true");
}
case 22:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function handleFinish(_x) {
return _ref3.apply(this, arguments);
};
}();
var checkboxOption = [{
label: '公告栏',
value: 'announcement'
}, {
label: '实训作业',
value: 'shixun_homework'
}, {
label: '普通作业',
value: 'common_homework'
}, ((_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.main_site) && {
label: '分组作业',
value: 'group_homework'
}, {
label: '试卷',
value: 'exercise'
}, {
label: '问卷',
value: 'poll'
}, {
label: '教学资料',
value: 'attachment'
}, {
label: '视频直播',
value: 'video'
}, {
label: '讨论',
value: 'board'
}, {
label: '分班',
value: 'course_group'
}, {
label: '统计',
value: 'statistics'
}, {
label: '签到',
value: 'attendance'
}, ((_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.admin) && {
label: '模板管理',
value: 'template'
}].filter(function (item) {
var _globalSetting$settin;
if (!item) return false;
if (globalSetting !== null && globalSetting !== void 0 && (_globalSetting$settin = globalSetting.setting) !== null && _globalSetting$settin !== void 0 && _globalSetting$settin.is_local) {
return item.label !== '视频直播';
} else {
return true;
}
});
var radioStyle = {
display: 'block',
height: '30px',
lineHeight: '30px'
};
var Draggers = {
action: "".concat(env/* default */.Z.API_SERVER, "/api/attachments.json"),
withCredentials: true,
onChange: function onChange(info) {
if (info.file.status === 'done') {
var _info$file;
setFileList(info === null || info === void 0 || (_info$file = info.file) === null || _info$file === void 0 ? void 0 : _info$file.response);
}
},
accept: '.xls,.xlsx'
};
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Newmodules.wrap,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Newmodules.bg,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Newmodules.crumbs,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u6559\u5B66\u8BFE\u5802"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-zhankai1"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("b", {
children: [isEdit ? '编辑' : '创建', "\u8BFE\u5802"]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Newmodules.titleWrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: [isEdit ? '编辑' : '创建', "\u8BFE\u5802"]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("b", {
onClick: goBack,
children: "\u8FD4\u56DE"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
form: form,
className: Newmodules.formWrap,
scrollToFirstError: true,
colon: false,
layout: "vertical",
initialValues: {
allowed_quit: false,
classModule: ["shixun_homework", "common_homework", "group_homework", "exercise", "attachment", "course_group", "video", "attendance", "statistics"]
},
onValuesChange: function onValuesChange(values, value) {
setFormValue(objectSpread2_default()({}, form.getFieldsValue()));
},
onFinish: handleFinish,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Newmodules.fieldWrap,
style: {
marginTop: 28
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Newmodules.flexRow,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
className: Newmodules.width655,
name: "course",
label: "\u8BFE\u7A0B\u540D\u79F0",
rules: [{
required: true,
message: '不能为空'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(auto_complete/* default */.Z, {
className: Newmodules.courseField,
onSearch: handleCourseSearch,
onSelect: handleCourseSelect,
options: newClassroom.searchCourseList.map(function (item) {
return {
value: item.name
};
}),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
placeholder: "\u4F8B\u5982\uFF1A\u6570\u636E\u7ED3\u6784",
maxLength: 60,
addonAfter: "".concat(((_formValue$course = formValue.course) === null || _formValue$course === void 0 ? void 0 : _formValue$course.length) || 0, "/60")
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Newmodules.courseExample,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(Newmodules.flexRow, " ").concat(Newmodules.flexAlignCenter),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: correct_namespaceObject,
width: 12
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "".concat(Newmodules.color999, " font12 ml5"),
children: "\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(Newmodules.flexRow, " ").concat(Newmodules.flexAlignCenter),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: error_namespaceObject,
width: 12
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "".concat(Newmodules.color999, " font12 ml5"),
children: ["\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784", dayjs_min_default()().format("YYYY"), "\u6625"]
})]
})]
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Newmodules.fieldWrap,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Newmodules.flexRow,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
className: Newmodules.width655,
name: "classroom",
label: "\u8BFE\u5802\u540D\u79F0",
rules: [{
required: true,
message: '不能为空'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
placeholder: "\u4F8B\u5982\uFF1A\u6570\u636E\u7ED3\u67842016\u79CB\u5B63\u73ED\u7EA7",
maxLength: 60,
addonAfter: "".concat(((_form$getFieldValue = form.getFieldValue('classroom')) === null || _form$getFieldValue === void 0 ? void 0 : _form$getFieldValue.length) || 0, "/60")
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Newmodules.courseExample,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(Newmodules.flexRow, " ").concat(Newmodules.flexAlignCenter),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: correct_namespaceObject,
width: 12
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "".concat(Newmodules.color999, " font12 ml5"),
children: ["\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784", dayjs_min_default()().format("YYYY"), "\u6625\u5B63\u73ED\u7EA7"]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: "".concat(Newmodules.flexRow, " ").concat(Newmodules.flexAlignCenter),
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: error_namespaceObject,
width: 12
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: "".concat(Newmodules.color999, " font12 ml5"),
children: ["\u9519\u8BEF\u793A\u4F8B\uFF1A", dayjs_min_default()().format("YYYY"), "\u6625\u5B63\u73ED\u7EA7\u6570\u636E\u7ED3\u6784"]
})]
})]
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Newmodules.fieldWrap,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Newmodules.flexColumn,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
className: Newmodules.period,
name: "period",
label: "\u603B\u5B66\u65F6",
rules: [{
pattern: new RegExp(/^[0-9]+([.]{1}[0-9]+){0,1}$/, "g"),
message: '必须是数值'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
placeholder: "\u4F8B\u5982\uFF1A30",
maxLength: 5,
addonAfter: "".concat(((_formValue$period = formValue.period) === null || _formValue$period === void 0 ? void 0 : _formValue$period.toString().length) || 0, "/5")
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
className: Newmodules.credit,
name: "credit",
label: "\u5B66\u5206",
rules: [{
pattern: new RegExp(/^[0-9]+([.]{1}[0-9]+){0,1}$/, "g"),
message: '必须是数值'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
placeholder: "\u4F8B\u5982\uFF1A3",
maxLength: 5,
addonAfter: "".concat(((_formValue$credit = formValue.credit) === null || _formValue$credit === void 0 ? void 0 : _formValue$credit.toString().length) || 0, "/5")
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
className: Newmodules.endTime,
name: "endTime",
label: "\u7ED3\u675F\u65F6\u95F4",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(date_picker["default"], {
showToday: false,
placeholder: "\u8BF7\u9009\u62E9\u7ED3\u675F\u65F6\u95F4",
locale: zh_CN/* default */.Z,
format: 'YYYY-MM-DD',
disabledDate: disabledDate
})
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Newmodules.fieldWrap,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Newmodules.flexRow,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
className: Newmodules.courseFormItem,
name: "classModule",
label: "\u8BFE\u5802\u6A21\u5757",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z.Group, {
children: isEdit ? editData === null || editData === void 0 || (_editData$course_modu = editData.course_modules) === null || _editData$course_modu === void 0 ? void 0 : _editData$course_modu.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
value: item.module_type,
style: {
fontSize: '14px'
},
children: item.module_name
}, item.module_type);
}) : LetData === null || LetData === void 0 || (_LetData$course_modul = LetData.course_modules) === null || _LetData$course_modul === void 0 ? void 0 : _LetData$course_modul.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
value: item.module_type,
style: {
fontSize: '14px'
},
children: item.module_name
}, item.module_type);
})
})
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Newmodules.fieldWrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
style: {
marginBottom: 0
},
name: "publicClassroom",
label: "\u516C\u5F00\u8BBE\u7F6E",
valuePropName: "checked",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_checkbox/* default */.Z, {
children: ["\u516C\u5F00\u8BFE\u5802", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#5f6367'
},
children: "\uFF08\u9009\u4E2D\u540E\u6240\u6709\u7528\u6237\u5747\u53EF\u8FDB\u5165\u5E76\u6D4F\u89C8\u672C\u8BFE\u5802\uFF0C\u5426\u5219\u4EC5\u672C\u8BFE\u5802\u6210\u5458\u53EF\u8FDB\u5165\uFF09"
})]
})
}), !!formValue.publicClassroom && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
style: {
marginBottom: 0
},
className: 'ml20',
name: "allow_copy",
valuePropName: "checked",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_checkbox/* default */.Z, {
children: ["\u5141\u8BB8\u975E\u672C\u8BFE\u5802\u6559\u5E08\u590D\u5236\u8BFE\u5802", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#5f6367'
},
children: "\uFF08\u9009\u4E2D\u540E\uFF0C\u5E73\u53F0\u4E0A\u4EFB\u4F55\u6559\u5E08\u90FD\u53EF\u4EE5\u590D\u5236\u672C\u8BFE\u5802\uFF09"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
style: {
marginBottom: 0
},
name: "allowed_quit",
valuePropName: "checked",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_checkbox/* default */.Z, {
children: ["\u5141\u8BB8\u9000\u51FA\u8BFE\u5802", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#5f6367'
},
children: "\uFF08\u9009\u4E2D\u540E\uFF0C\u5B66\u751F\u53EF\u4EE5\u4E3B\u52A8\u9000\u51FA\u8BFE\u5802\uFF0C\u5426\u5219\u5B66\u751F\u65E0\u6CD5\u4E3B\u52A8\u9000\u51FA\u3002\uFF09"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
name: "is_show_conceal",
valuePropName: "checked",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_checkbox/* default */.Z, {
children: ["\u5141\u8BB8\u5B66\u751F\u67E5\u770B\u624B\u673A\u53F7\u548C\u90AE\u7BB1\u5730\u5740", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#5f6367'
},
children: "\uFF08\u9009\u4E2D\u540E\uFF0C\u5B66\u751F\u53EF\u4EE5\u67E5\u770B\u8BFE\u5802\u5185\u5176\u4ED6\u6210\u5458\u5B8C\u6574\u7684\u624B\u673A\u53F7\u548C\u90AE\u7BB1\u5730\u5740\uFF0C\u5426\u5219\u5BF9\u624B\u673A\u53F7\u548C\u90AE\u7BB1\u8FDB\u884C\u8131\u654F\u5904\u7406\uFF09"
})]
})
})]
}), isEdit && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Newmodules.fieldWrap,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
className: Newmodules.courseFormItem,
name: "set",
label: "\u9080\u8BF7\u7801\u8BBE\u7F6E",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default */.ZP, {
style: radioStyle,
value: 0,
children: ["\u5BF9\u6240\u6709\u89D2\u8272\u542F\u7528", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#5f6367'
},
children: "\uFF08\u9009\u4E2D\u540E\u7528\u6237\u53EF\u4EE5\u4EE5\u4EFB\u610F\u8EAB\u4EFD\u52A0\u5165\u8BFE\u5802\uFF09"
})]
}), formValue.set === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
name: "student_join_approve",
className: Newmodules.checkUsersFromCode,
valuePropName: "checked",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_checkbox/* default */.Z, {
children: ["\u4F7F\u7528\u9080\u8BF7\u7801\u52A0\u5165\u8BFE\u5802\u7684\u6240\u6709\u89D2\u8272\u5747\u9700\u8981\u5BA1\u6838", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#5f6367'
},
children: "\uFF08\u9009\u4E2D\u540E\uFF0C\u7533\u8BF7\u52A0\u5165\u7684\u5B66\u751F\u3001\u52A9\u6559\u3001\u8001\u5E08\u5747\u9700\u8981\u901A\u8FC7\u5BA1\u6838\u624D\u80FD\u52A0\u5165\u8BFE\u5802\uFF0C\u5426\u5219\u4EC5\u6559\u5E08\u548C\u52A9\u6559\u52A0\u5165\u65F6\u9700\u8981\u5BA1\u6838\uFF09"
})]
})
}), formValue.set === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
name: "student_join_pro",
className: Newmodules.checkUsersFromCode,
valuePropName: "checked",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_checkbox/* default */.Z, {
children: ["\u4F7F\u7528\u9080\u8BF7\u7801\u52A0\u5165\u8BFE\u5802\u7684\u7528\u6237\u9700\u8FDB\u884C\u804C\u4E1A\u8BA4\u8BC1", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#5f6367'
},
children: "\uFF08\u9009\u4E2D\u540E\uFF0C\u7533\u8BF7\u52A0\u5165\u7684\u7528\u6237\u9700\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u672A\u804C\u4E1A\u8BA4\u8BC1\u7684\u7528\u6237\u9700\u8BFE\u5802\u7BA1\u7406\u5458\u6216\u8001\u5E08\u8FDB\u884C\u5BA1\u6279\uFF09"
})]
})
}), formValue.student_join_pro && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
height: 30,
fontSize: 14,
marginLeft: 45
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
display: 'flex',
height: 30,
lineHeight: '30px',
alignItems: 'center'
},
children: [file !== null && file !== void 0 && file.id ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Newmodules.row,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Newmodules.title,
onClick: function onClick() {
setData({
content: env/* default */.Z.API_SERVER + file.url,
type: 'office'
});
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-fujian1"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
title: file.title || file.filename,
children: file.title || file.filename
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Newmodules.preview,
onClick: function onClick() {
setData({
content: env/* default */.Z.API_SERVER + file.url,
type: 'office'
});
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-yulan"
}), "\u67E5\u770B"]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Newmodules["delete"],
onClick: function onClick() {
setfile('');
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-piliangshanchubeifen"
}), "\u5220\u9664"]
})]
})
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
onClick: function onClick() {
setisshow(true);
// Modal.confirm({
// title: '上传课堂名单',
// icon: null,
// closable: true,
// onOk() {
// console.log('----222', fileList);
// setfile(fileList);
// },
// onCancel: () => {
// setfile('');
// setFileList('')
// },
// content: <div>
// <p><span>步骤1</span>下载
// <a
// href={env.API_SERVER + `/api/courses/down_student_template `}
// download={`模版.xlsx`}
// >课堂名单模版</a>批量导入成员</p>
// <p style={{ display: 'flex' }}><span>步骤2</span>
// <div>
// <div>
// 上传填写好的《课堂名单模板》
// </div>
// <Upload {...Draggers}>
// <Button type="primary" icon={<FolderOpenOutlined />}>
// 选择文件
// </Button>
// </Upload>
// </div>
// </p>
// </div>
// })
},
children: "\u4E0A\u4F20\u8BFE\u5802\u540D\u5355"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#5f6367'
},
children: "\uFF08\u540D\u5355\u5185\u7528\u6237\u7533\u8BF7\u52A0\u5165\u8BFE\u5802\u65F6\uFF0C\u65E0\u9700\u5BA1\u6838\uFF0C\u7CFB\u7EDF\u81EA\u52A8\u5BA1\u6838\u901A\u8FC7\uFF09"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default */.ZP, {
style: radioStyle,
value: 2,
children: ["\u5BF9\u5B66\u751F\u505C\u7528", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#5f6367'
},
children: "\uFF08\u9009\u4E2D\u540E\u7528\u6237\u4EE5\u5B66\u751F\u8EAB\u4EFD\u52A0\u5165\u8BFE\u5802\u65F6\uFF0C\u9080\u8BF7\u7801\u65E0\u6548\uFF09"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default */.ZP, {
style: radioStyle,
value: 1,
children: ["\u5BF9\u6240\u6709\u89D2\u8272\u505C\u7528", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#5f6367'
},
children: "\uFF08\u9009\u4E2D\u540E\u672C\u9080\u8BF7\u7801\u5931\u6548\uFF0C\u7528\u6237\u4E0D\u80FD\u4E3B\u52A8\u52A0\u5165\u8BFE\u5802\uFF09"
})]
})]
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Newmodules.fieldWrap,
style: {
marginTop: 20
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(Newmodules.flexRow, " ").concat(Newmodules.flexAlignCenter, " ").concat(Newmodules.school),
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
className: Newmodules.courseFormItem,
name: "school",
label: "\u8BFE\u5802\u6240\u5C5E\u5355\u4F4D",
rules: [{
required: true,
message: '不能为空'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(auto_complete/* default */.Z, {
maxTagTextLength: 60,
className: Newmodules.w700,
placeholder: "\u8BF7\u8F93\u5165\u5E76\u9009\u62E9\u8BFE\u672C\u5802\u7684\u6240\u5C5E\u5355\u4F4D",
onSearch: handleSchoolChange,
onChange: handleSchoolChange,
options: (_newClassroom$schoolL = newClassroom.schoolList) === null || _newClassroom$schoolL === void 0 ? void 0 : _newClassroom$schoolL.map(function (item) {
return {
value: item
};
})
})
})
}), formValue.school && !((_newClassroom$schoolL2 = newClassroom.schoolList) !== null && _newClassroom$schoolL2 !== void 0 && _newClassroom$schoolL2.find(function (item) {
return item === formValue.school;
})) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Newmodules.schoolHintWrap,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: Newmodules.colorCDCDCD,
children: ["\u672A\u627E\u5230\u5305\u542B\u201C", formValue.school, "\u201D\u7684\u9AD8\u6821\uFF0C\u5982\u6709\u9700\u8981\uFF0C\u8BF7", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "blue",
cursor: 'pointer'
},
onClick: function onClick() {
modal/* default */.Z.info({
title: '联系平台运营',
width: 400,
icon: null,
centered: true,
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
textAlign: "center"
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
textAlign: 'left'
},
children: "\u8BF7\u626B\u7801\u6216\u641C\u7D22\u52A0\u5165\u5934\u6B4C\u5B98\u65B9\u4EA4\u6D41QQ\u7FA4\uFF1A727685969\uFF0C\u8054\u7CFB\u7FA4\u5185\u7684\u8FD0\u8425\u8FDB\u884C\u54A8\u8BE2\u548C\u7533\u8BF7\u65B0\u589E\u5B66\u6821\u540D\u79F0\u3002"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: touge_code,
style: {
width: '170px',
height: '170px',
marginTop: '20px'
}
})]
}),
okText: '我知道了'
});
},
children: "\u8054\u7CFB\u5E73\u53F0\u8FD0\u8425"
}), "\u7533\u8BF7\u65B0\u589E"]
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Newmodules.backgroundFa,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Newmodules.bBtn,
onClick: goBack,
children: "\u53D6\u6D88"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
className: "".concat(shixunHomeworks.actionTabs.type === 6 ? Newmodules.classromediv : ''),
onClick: function onClick() {
return form.submit();
},
loading: loading['newClassroom/submitCourses'],
children: "\u63D0\u4EA4"
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
open: isshow,
title: "\u4E0A\u4F20\u8BFE\u5802\u540D\u5355",
onOk: function onOk() {
setfile(fileList);
setisshow(false);
},
onCancel: function onCancel() {
setfile('');
setFileList('');
setisshow(false);
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u6B65\u9AA41\uFF1A"
}), "\u4E0B\u8F7D", /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
href: env/* default */.Z.API_SERVER + "/api/courses/down_student_template ",
download: "\u6A21\u7248.xlsx",
children: "\u8BFE\u5802\u540D\u5355\u6A21\u7248"
}), "\u6279\u91CF\u5BFC\u5165\u6210\u5458"]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
style: {
display: 'flex'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u6B65\u9AA42\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: "\u4E0A\u4F20\u586B\u5199\u597D\u7684\u300A\u8BFE\u5802\u540D\u5355\u6A21\u677F\u300B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(upload/* default */.Z, objectSpread2_default()(objectSpread2_default()({}, Draggers), {}, {
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
icon: /*#__PURE__*/(0,jsx_runtime.jsx)(FolderOpenOutlined/* default */.Z, {}),
children: "\u9009\u62E9\u6587\u4EF6"
})
}))]
})]
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(AppplySchoolModal/* default */.Z, {
schoolName: formValue.school,
onSuccess: function onSuccess(school) {
handleSchoolChange(school);
form.setFieldsValue({
school: school
});
setFormValue(objectSpread2_default()(objectSpread2_default()({}, formValue), {}, {
school: school
}));
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: data === null || data === void 0 ? void 0 : data.content,
type: data === null || data === void 0 ? void 0 : data.type,
hasMask: true,
editOffice: 'view',
onClose: function onClose() {
setData({
content: "",
type: ""
});
}
})]
})
});
};
/* harmony default export */ var New = ((0,_umi_production_exports.connect)(function (_ref5) {
var user = _ref5.user,
newClassroom = _ref5.newClassroom,
loading = _ref5.loading,
globalSetting = _ref5.globalSetting,
classroomList = _ref5.classroomList,
shixunHomeworks = _ref5.shixunHomeworks;
return {
user: user,
newClassroom: newClassroom,
globalSetting: globalSetting,
loading: loading.effects,
classroomList: classroomList,
shixunHomeworks: shixunHomeworks
};
})(NewClassroomPage));
/***/ }),
/***/ 10527:
/*!***********************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/lib/date-picker/locale/zh_CN.js ***!
\***********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
var __webpack_unused_export__;
var _interopRequireDefault = (__webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 63430)["default"]);
__webpack_unused_export__ = ({
value: true
});
exports.Z = void 0;
var _zh_CN = _interopRequireDefault(__webpack_require__(/*! rc-picker/lib/locale/zh_CN */ 65835));
var _zh_CN2 = _interopRequireDefault(__webpack_require__(/*! ../../time-picker/locale/zh_CN */ 6432));
// 统一合并为完整的 Locale
const locale = {
lang: Object.assign({
placeholder: '请选择日期',
yearPlaceholder: '请选择年份',
quarterPlaceholder: '请选择季度',
monthPlaceholder: '请选择月份',
weekPlaceholder: '请选择周',
rangePlaceholder: ['开始日期', '结束日期'],
rangeYearPlaceholder: ['开始年份', '结束年份'],
rangeMonthPlaceholder: ['开始月份', '结束月份'],
rangeQuarterPlaceholder: ['开始季度', '结束季度'],
rangeWeekPlaceholder: ['开始周', '结束周']
}, _zh_CN.default),
timePickerLocale: Object.assign({}, _zh_CN2.default)
};
// should add whitespace between char in Button
locale.lang.ok = '确定';
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
var _default = locale;
exports.Z = _default;
/***/ }),
/***/ 6432:
/*!***********************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/lib/time-picker/locale/zh_CN.js ***!
\***********************************************************************/
/***/ (function(__unused_webpack_module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
const locale = {
placeholder: '请选择时间',
rangePlaceholder: ['开始时间', '结束时间']
};
var _default = locale;
exports["default"] = _default;
/***/ }),
/***/ 25769:
/*!**************************************************************************!*\
!*** ./node_modules/_copy-to-clipboard@3.3.3@copy-to-clipboard/index.js ***!
\**************************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
var deselectCurrent = __webpack_require__(/*! toggle-selection */ 98040);
var clipboardToIE11Formatting = {
"text/plain": "Text",
"text/html": "Url",
"default": "Text"
}
var defaultMessage = "Copy to clipboard: #{key}, Enter";
function format(message) {
var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
return message.replace(/#{\s*key\s*}/g, copyKey);
}
function copy(text, options) {
var debug,
message,
reselectPrevious,
range,
selection,
mark,
success = false;
if (!options) {
options = {};
}
debug = options.debug || false;
try {
reselectPrevious = deselectCurrent();
range = document.createRange();
selection = document.getSelection();
mark = document.createElement("span");
mark.textContent = text;
// avoid screen readers from reading out loud the text
mark.ariaHidden = "true"
// reset user styles for span element
mark.style.all = "unset";
// prevents scrolling to the end of the page
mark.style.position = "fixed";
mark.style.top = 0;
mark.style.clip = "rect(0, 0, 0, 0)";
// used to preserve spaces and line breaks
mark.style.whiteSpace = "pre";
// do not inherit user-select (it may be `none`)
mark.style.webkitUserSelect = "text";
mark.style.MozUserSelect = "text";
mark.style.msUserSelect = "text";
mark.style.userSelect = "text";
mark.addEventListener("copy", function(e) {
e.stopPropagation();
if (options.format) {
e.preventDefault();
if (typeof e.clipboardData === "undefined") { // IE 11
debug && console.warn("unable to use e.clipboardData");
debug && console.warn("trying IE specific stuff");
window.clipboardData.clearData();
var format = clipboardToIE11Formatting[options.format] || clipboardToIE11Formatting["default"]
window.clipboardData.setData(format, text);
} else { // all other browsers
e.clipboardData.clearData();
e.clipboardData.setData(options.format, text);
}
}
if (options.onCopy) {
e.preventDefault();
options.onCopy(e.clipboardData);
}
});
document.body.appendChild(mark);
range.selectNodeContents(mark);
selection.addRange(range);
var successful = document.execCommand("copy");
if (!successful) {
throw new Error("copy command was unsuccessful");
}
success = true;
} catch (err) {
debug && console.error("unable to copy using execCommand: ", err);
debug && console.warn("trying IE specific stuff");
try {
window.clipboardData.setData(options.format || "text", text);
options.onCopy && options.onCopy(window.clipboardData);
success = true;
} catch (err) {
debug && console.error("unable to copy using clipboardData: ", err);
debug && console.error("falling back to prompt");
message = format("message" in options ? options.message : defaultMessage);
window.prompt(message, text);
}
} finally {
if (selection) {
if (typeof selection.removeRange == "function") {
selection.removeRange(range);
} else {
selection.removeAllRanges();
}
}
if (mark) {
document.body.removeChild(mark);
}
reselectPrevious();
}
return success;
}
module.exports = copy;
/***/ }),
/***/ 65835:
/*!**********************************************************************!*\
!*** ./node_modules/_rc-picker@3.13.2@rc-picker/lib/locale/zh_CN.js ***!
\**********************************************************************/
/***/ (function(__unused_webpack_module, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = void 0;
var locale = {
locale: 'zh_CN',
today: '今天',
now: '此刻',
backToToday: '返回今天',
ok: '确定',
timeSelect: '选择时间',
dateSelect: '选择日期',
weekSelect: '选择周',
clear: '清除',
month: '月',
year: '年',
previousMonth: '上个月 (翻页上键)',
nextMonth: '下个月 (翻页下键)',
monthSelect: '选择月份',
yearSelect: '选择年份',
decadeSelect: '选择年代',
yearFormat: 'YYYY年',
dayFormat: 'D日',
dateFormat: 'YYYY年M月D日',
dateTimeFormat: 'YYYY年M月D日 HH时mm分ss秒',
previousYear: '上一年 (Control键加左方向键)',
nextYear: '下一年 (Control键加右方向键)',
previousDecade: '上一年代',
nextDecade: '下一年代',
previousCentury: '上一世纪',
nextCentury: '下一世纪'
};
var _default = locale;
exports["default"] = _default;
/***/ }),
/***/ 83145:
/*!**********************************************************************************************!*\
!*** ./node_modules/_react-copy-to-clipboard@5.0.2@react-copy-to-clipboard/lib/Component.js ***!
\**********************************************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.CopyToClipboard = void 0;
var _react = _interopRequireDefault(__webpack_require__(/*! react */ 59301));
var _copyToClipboard = _interopRequireDefault(__webpack_require__(/*! copy-to-clipboard */ 25769));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var CopyToClipboard =
/*#__PURE__*/
function (_React$PureComponent) {
_inherits(CopyToClipboard, _React$PureComponent);
function CopyToClipboard() {
var _getPrototypeOf2;
var _this;
_classCallCheck(this, CopyToClipboard);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(CopyToClipboard)).call.apply(_getPrototypeOf2, [this].concat(args)));
_defineProperty(_assertThisInitialized(_this), "onClick", function (event) {
var _this$props = _this.props,
text = _this$props.text,
onCopy = _this$props.onCopy,
children = _this$props.children,
options = _this$props.options;
var elem = _react["default"].Children.only(children);
var result = (0, _copyToClipboard["default"])(text, options);
if (onCopy) {
onCopy(text, result);
} // Bypass onClick if it was present
if (elem && elem.props && typeof elem.props.onClick === 'function') {
elem.props.onClick(event);
}
});
return _this;
}
_createClass(CopyToClipboard, [{
key: "render",
value: function render() {
var _this$props2 = this.props,
_text = _this$props2.text,
_onCopy = _this$props2.onCopy,
_options = _this$props2.options,
children = _this$props2.children,
props = _objectWithoutProperties(_this$props2, ["text", "onCopy", "options", "children"]);
var elem = _react["default"].Children.only(children);
return _react["default"].cloneElement(elem, _objectSpread({}, props, {
onClick: this.onClick
}));
}
}]);
return CopyToClipboard;
}(_react["default"].PureComponent);
exports.CopyToClipboard = CopyToClipboard;
_defineProperty(CopyToClipboard, "defaultProps", {
onCopy: undefined,
options: undefined
});
/***/ }),
/***/ 56102:
/*!******************************************************************************************!*\
!*** ./node_modules/_react-copy-to-clipboard@5.0.2@react-copy-to-clipboard/lib/index.js ***!
\******************************************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
var _require = __webpack_require__(/*! ./Component */ 83145),
CopyToClipboard = _require.CopyToClipboard;
CopyToClipboard.CopyToClipboard = CopyToClipboard;
module.exports = CopyToClipboard;
/***/ }),
/***/ 98040:
/*!************************************************************************!*\
!*** ./node_modules/_toggle-selection@1.0.6@toggle-selection/index.js ***!
\************************************************************************/
/***/ (function(module) {
module.exports = function () {
var selection = document.getSelection();
if (!selection.rangeCount) {
return function () {};
}
var active = document.activeElement;
var ranges = [];
for (var i = 0; i < selection.rangeCount; i++) {
ranges.push(selection.getRangeAt(i));
}
switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML
case 'INPUT':
case 'TEXTAREA':
active.blur();
break;
default:
active = null;
break;
}
selection.removeAllRanges();
return function () {
selection.type === 'Caret' &&
selection.removeAllRanges();
if (!selection.rangeCount) {
ranges.forEach(function(range) {
selection.addRange(range);
});
}
active &&
active.focus();
};
};
/***/ }),
/***/ 29831:
/*!**************************************************!*\
!*** ./src/assets/images/account/touge_code.jpg ***!
\**************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
module.exports = __webpack_require__.p + "static/touge_code.728ce351.jpg";
/***/ }),
/***/ 63430:
/*!*********************************************************************************************!*\
!*** ./node_modules/_@babel_runtime@7.24.1@@babel/runtime/helpers/interopRequireDefault.js ***!
\*********************************************************************************************/
/***/ (function(module) {
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ })
}]);