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.
1670 lines
75 KiB
1670 lines
75 KiB
(self["webpackChunk"] = self["webpackChunk"] || []).push([[1702],{
|
|
|
|
/***/ 33853:
|
|
/*!******************************************************************************************************!*\
|
|
!*** ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/LeftOutlined.js + 1 modules ***!
|
|
\******************************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ icons_LeftOutlined; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.3@@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(71409);
|
|
// 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/LeftOutlined.js
|
|
// This icon file is generated automatically.
|
|
var LeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z" } }] }, "name": "left", "theme": "outlined" };
|
|
/* harmony default export */ var asn_LeftOutlined = (LeftOutlined);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
var AntdIcon = __webpack_require__(7657);
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/LeftOutlined.js
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
var LeftOutlined_LeftOutlined = function LeftOutlined(props, ref) {
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
ref: ref,
|
|
icon: asn_LeftOutlined
|
|
}));
|
|
};
|
|
|
|
/** */
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(LeftOutlined_LeftOutlined);
|
|
if (false) {}
|
|
/* harmony default export */ var icons_LeftOutlined = (RefIcon);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 38819:
|
|
/*!*******************************************************************************************************!*\
|
|
!*** ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/RightOutlined.js + 1 modules ***!
|
|
\*******************************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ icons_RightOutlined; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.27.3@@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(71409);
|
|
// 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/RightOutlined.js
|
|
// This icon file is generated automatically.
|
|
var RightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" } }] }, "name": "right", "theme": "outlined" };
|
|
/* harmony default export */ var asn_RightOutlined = (RightOutlined);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
var AntdIcon = __webpack_require__(7657);
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/RightOutlined.js
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
var RightOutlined_RightOutlined = function RightOutlined(props, ref) {
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
ref: ref,
|
|
icon: asn_RightOutlined
|
|
}));
|
|
};
|
|
|
|
/** */
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(RightOutlined_RightOutlined);
|
|
if (false) {}
|
|
/* harmony default export */ var icons_RightOutlined = (RefIcon);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 24742:
|
|
/*!*************************************************************************************!*\
|
|
!*** ./src/pages/Classrooms/New/components/AppplySchoolModal/index.tsx + 1 modules ***!
|
|
\*************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ components_AppplySchoolModal; }
|
|
});
|
|
|
|
// 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/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js
|
|
var objectWithoutProperties = __webpack_require__(39647);
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
var _umi_production_exports = __webpack_require__(80184);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
|
var input = __webpack_require__(10249);
|
|
// 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/cascader/index.js + 18 modules
|
|
var cascader = __webpack_require__(19842);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
var es_button = __webpack_require__(3113);
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.13@dayjs/dayjs.min.js
|
|
var dayjs_min = __webpack_require__(61186);
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/CheckCircleFilled.js + 1 modules
|
|
var CheckCircleFilled = __webpack_require__(29679);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/CloseCircleFilled.js + 1 modules
|
|
var CloseCircleFilled = __webpack_require__(19248);
|
|
// EXTERNAL MODULE: ./src/utils/cityData.ts
|
|
var cityData = __webpack_require__(82527);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/New/components/AppplySchoolModal/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var AppplySchoolModalmodules = ({"flexRow":"flexRow___wVzmN","flexColumn":"flexColumn___gLZgJ","formWrap":"formWrap___z7EIz","example":"example___dy_gt","footerWrap":"footerWrap___Y3nmz"});
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/New/components/AppplySchoolModal/index.tsx
|
|
|
|
|
|
|
|
|
|
var _excluded = ["newClassroom", "globalSetting", "loading", "dispatch", "schoolName", "onSuccess"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var filter = function filter(inputValue, path) {
|
|
return path.some(function (option) {
|
|
return option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1;
|
|
});
|
|
};
|
|
var TextArea = input/* default */.Z.TextArea;
|
|
var AppplySchoolModal = function AppplySchoolModal(_ref) {
|
|
var newClassroom = _ref.newClassroom,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
dispatch = _ref.dispatch,
|
|
schoolName = _ref.schoolName,
|
|
_ref$onSuccess = _ref.onSuccess,
|
|
onSuccess = _ref$onSuccess === void 0 ? function () {} : _ref$onSuccess,
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
form = _Form$useForm2[0];
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
form.setFieldsValue({
|
|
name: schoolName
|
|
});
|
|
}, [schoolName]);
|
|
var handleFinish = /*#__PURE__*/function () {
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(values) {
|
|
var _ref3, name, _ref3$city, city, address, remarks, res;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
_ref3 = values || {}, name = _ref3.name, _ref3$city = _ref3.city, city = _ref3$city === void 0 ? [] : _ref3$city, address = _ref3.address, remarks = _ref3.remarks;
|
|
_context.next = 3;
|
|
return dispatch({
|
|
type: 'newClassroom/appplySchool',
|
|
payload: {
|
|
name: name,
|
|
province: city[0],
|
|
city: city[1],
|
|
address: address,
|
|
remarks: remarks
|
|
}
|
|
});
|
|
case 3:
|
|
res = _context.sent;
|
|
dispatch({
|
|
type: 'newClassroom/setActionTabs',
|
|
payload: {}
|
|
});
|
|
if (res) {
|
|
message/* default */.ZP.success("新增学校/单位成功!");
|
|
onSuccess(name);
|
|
}
|
|
case 6:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function handleFinish(_x) {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
centered: true,
|
|
keyboard: false,
|
|
closable: false,
|
|
destroyOnClose: true,
|
|
open: newClassroom.actionTabs.key === 'NewClassroom-AppplySchool',
|
|
title: "\u7533\u8BF7\u6DFB\u52A0\u5355\u4F4D\u540D\u79F0",
|
|
width: "600px",
|
|
footer: null,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
className: AppplySchoolModalmodules.formWrap,
|
|
form: form,
|
|
labelCol: {
|
|
span: 4
|
|
},
|
|
wrapperCol: {
|
|
span: 20
|
|
},
|
|
onFinish: handleFinish,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
label: "\u5355\u4F4D\u5168\u79F0\uFF1A",
|
|
name: "name",
|
|
rules: [{
|
|
required: true,
|
|
message: '请输入学校或工作单位'
|
|
}],
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
placeholder: "\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: "".concat(AppplySchoolModalmodules.flexRow, " ").concat(AppplySchoolModalmodules.example),
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
children: "\u793A\u4F8B\uFF1A"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: AppplySchoolModalmodules.flexColumn,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(CheckCircleFilled/* default */.Z, {
|
|
style: {
|
|
color: "rgb(82, 196, 26)"
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "font14 ml5",
|
|
children: "\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784"
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(CloseCircleFilled/* default */.Z, {
|
|
style: {
|
|
color: "red"
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: "font14 ml5",
|
|
children: ["\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784", dayjs_min_default()().format("YYYY"), "\u6625"]
|
|
})]
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
label: "\u5730\u533A\uFF1A",
|
|
name: "city",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(cascader/* default */.Z, {
|
|
allowClear: true,
|
|
size: 'middle',
|
|
options: cityData/* CityData */.P,
|
|
placeholder: "\u8BF7\u9009\u62E9\u6240\u5728\u5730",
|
|
showSearch: {
|
|
matchInputWidth: true,
|
|
filter: filter
|
|
}
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
label: "\u8BE6\u7EC6\u5730\u5740\uFF1A",
|
|
name: "address",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
placeholder: "\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
label: "\u8BF4\u660E\uFF1A",
|
|
name: "remarks",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
|
|
placeholder: "\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: AppplySchoolModalmodules.footerWrap,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z.Item, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
className: "mr5",
|
|
size: 'middle',
|
|
onClick: function onClick() {
|
|
dispatch({
|
|
type: 'newClassroom/setActionTabs',
|
|
payload: {}
|
|
});
|
|
},
|
|
children: "\u53D6\u6D88"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
size: 'middle',
|
|
type: "primary",
|
|
htmlType: "submit",
|
|
loading: loading['newClassroom/appplySchool'],
|
|
children: "\u4FDD\u5B58"
|
|
})]
|
|
})
|
|
})]
|
|
})
|
|
});
|
|
};
|
|
/* harmony default export */ var components_AppplySchoolModal = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
var newClassroom = _ref4.newClassroom,
|
|
loading = _ref4.loading,
|
|
globalSetting = _ref4.globalSetting;
|
|
return {
|
|
newClassroom: newClassroom,
|
|
globalSetting: globalSetting,
|
|
loading: loading.effects
|
|
};
|
|
})(AppplySchoolModal));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 76928:
|
|
/*!********************************************************!*\
|
|
!*** ./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
|
|
var _umi_production_exports = __webpack_require__(80184);
|
|
// 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__(10249);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/date-picker/index.js + 66 modules
|
|
var date_picker = __webpack_require__(5083);
|
|
// 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/_dayjs@1.11.13@dayjs/dayjs.min.js
|
|
var dayjs_min = __webpack_require__(61186);
|
|
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__(24742);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(35325);
|
|
// EXTERNAL MODULE: ./src/service/classrooms.ts
|
|
var classrooms = __webpack_require__(18356);
|
|
;// 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","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__(1079);
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
var authority = __webpack_require__(13277);
|
|
// 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];
|
|
(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
|
|
};
|
|
getSchoolList(res.school);
|
|
setFormValue(objectSpread2_default()({}, data));
|
|
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, 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;
|
|
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
|
|
};
|
|
if (!isEdit) {
|
|
_context2.next = 17;
|
|
break;
|
|
}
|
|
_context2.next = 9;
|
|
return (0,classrooms/* updateCourseData */.fr)(objectSpread2_default()(objectSpread2_default()({}, postData), {
|
|
coursesId: params.coursesId
|
|
}));
|
|
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 && _umi_production_exports.history.push(res.first_category_url);
|
|
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'
|
|
};
|
|
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"
|
|
})]
|
|
})
|
|
}), /*#__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.jsxs)("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"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "".concat(Newmodules.color0152d9, " current"),
|
|
onClick: handleApplySchool,
|
|
children: "\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)(AppplySchoolModal/* default */.Z, {
|
|
schoolName: formValue.school
|
|
})]
|
|
})
|
|
});
|
|
};
|
|
/* 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));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 8378:
|
|
/*!*******************************************************************!*\
|
|
!*** ./node_modules/_antd@5.9.0@antd/es/style/motion/collapse.js ***!
|
|
\*******************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__) {
|
|
|
|
"use strict";
|
|
const genCollapseMotion = token => ({
|
|
[token.componentCls]: {
|
|
// For common/openAnimation
|
|
[`${token.antCls}-motion-collapse-legacy`]: {
|
|
overflow: 'hidden',
|
|
'&-active': {
|
|
transition: `height ${token.motionDurationMid} ${token.motionEaseInOut},
|
|
opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important`
|
|
}
|
|
},
|
|
[`${token.antCls}-motion-collapse`]: {
|
|
overflow: 'hidden',
|
|
transition: `height ${token.motionDurationMid} ${token.motionEaseInOut},
|
|
opacity ${token.motionDurationMid} ${token.motionEaseInOut} !important`
|
|
}
|
|
}
|
|
});
|
|
/* harmony default export */ __webpack_exports__.Z = (genCollapseMotion);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 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 */ 90432)["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();
|
|
};
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 90432:
|
|
/*!*********************************************************************************************!*\
|
|
!*** ./node_modules/_@babel_runtime@7.27.3@@babel/runtime/helpers/interopRequireDefault.js ***!
|
|
\*********************************************************************************************/
|
|
/***/ (function(module) {
|
|
|
|
function _interopRequireDefault(e) {
|
|
return e && e.__esModule ? e : {
|
|
"default": e
|
|
};
|
|
}
|
|
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
|
|
/***/ })
|
|
|
|
}]); |