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.
1386 lines
55 KiB
1386 lines
55 KiB
(self["webpackChunk"] = self["webpackChunk"] || []).push([[87922],{
|
|
|
|
/***/ 40362:
|
|
/*!***********************************************************************************************************!*\
|
|
!*** ./node_modules/_@ant-design_icons@5.4.0@@ant-design/icons/es/icons/ArrowLeftOutlined.js + 1 modules ***!
|
|
\***********************************************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Z: function() { return /* binding */ icons_ArrowLeftOutlined; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.25.6@@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(33614);
|
|
// 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/ArrowLeftOutlined.js
|
|
// This icon file is generated automatically.
|
|
var ArrowLeftOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z" } }] }, "name": "arrow-left", "theme": "outlined" };
|
|
/* harmony default export */ var asn_ArrowLeftOutlined = (ArrowLeftOutlined);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.4.0@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
var AntdIcon = __webpack_require__(1393);
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.4.0@@ant-design/icons/es/icons/ArrowLeftOutlined.js
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
var ArrowLeftOutlined_ArrowLeftOutlined = function ArrowLeftOutlined(props, ref) {
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
ref: ref,
|
|
icon: asn_ArrowLeftOutlined
|
|
}));
|
|
};
|
|
|
|
/** */
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(ArrowLeftOutlined_ArrowLeftOutlined);
|
|
if (false) {}
|
|
/* harmony default export */ var icons_ArrowLeftOutlined = (RefIcon);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 31739:
|
|
/*!*****************************************************************************!*\
|
|
!*** ./src/pages/Classrooms/Lists/CourseGroup/Detail/index.tsx + 1 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 */ Detail; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js
|
|
var toConsumableArray = __webpack_require__(37205);
|
|
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
|
|
var regeneratorRuntime = __webpack_require__(7557);
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
|
|
var asyncToGenerator = __webpack_require__(41498);
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(82242);
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(79800);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
// 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/_react-copy-to-clipboard@5.0.2@react-copy-to-clipboard/lib/index.js
|
|
var lib = __webpack_require__(56102);
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
var _umi_production_exports = __webpack_require__(80608);
|
|
// 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/input/index.js + 3 modules
|
|
var input = __webpack_require__(92832);
|
|
// 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/menu/index.js + 11 modules
|
|
var menu = __webpack_require__(20834);
|
|
// 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/dropdown/index.js + 1 modules
|
|
var dropdown = __webpack_require__(38854);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/row/index.js
|
|
var row = __webpack_require__(95237);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/col/index.js
|
|
var col = __webpack_require__(43604);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
var table = __webpack_require__(51945);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
|
var pagination = __webpack_require__(86859);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.4.0@@ant-design/icons/es/icons/ArrowLeftOutlined.js + 1 modules
|
|
var ArrowLeftOutlined = __webpack_require__(40362);
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
var fetch = __webpack_require__(49105);
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.4.0@@ant-design/icons/es/icons/DownOutlined.js + 1 modules
|
|
var DownOutlined = __webpack_require__(46952);
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(27876);
|
|
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
|
var NoData = __webpack_require__(6638);
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
var authority = __webpack_require__(75916);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CourseGroup/Detail/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Detailmodules = ({"flex_box_center":"flex_box_center___oNuKm","flex_space_between":"flex_space_between___U1Zic","flex_box_vertical_center":"flex_box_vertical_center___r26GC","flex_box_center_end":"flex_box_center_end___Zlv2y","flex_box_column":"flex_box_column___Ml9Kt","bg":"bg___WNwKr","containerTitle":"containerTitle___U8kcU","containerDesc":"containerDesc___UxxtF","listItem":"listItem___fnQZO","title":"title___USjS0","titleLeft":"titleLeft___PVbk6","titleRight":"titleRight___xjHF8","acitons":"acitons___l0Pb3","memberManager":"memberManager___ZFyEi","headWrap":"headWrap___G2Uc9","checkbox":"checkbox___SnMlz"});
|
|
// EXTERNAL MODULE: ./src/service/classrooms.ts
|
|
var classrooms = __webpack_require__(6668);
|
|
// EXTERNAL MODULE: ./src/service/teacher.ts
|
|
var teacher = __webpack_require__(79657);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CourseGroup/Detail/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dayjs_min_default().locale('zh-cn');
|
|
var ShixunsListPage = function ShixunsListPage(_ref) {
|
|
var _params$search, _params$search2, _params$search3, _courseGroupList$filt;
|
|
var classroomList = _ref.classroomList,
|
|
globalSetting = _ref.globalSetting,
|
|
loading = _ref.loading,
|
|
dispatch = _ref.dispatch;
|
|
var _useState = (0,_react_17_0_2_react.useState)(objectSpread2_default()(objectSpread2_default()({}, (0,_umi_production_exports.useParams)()), {
|
|
page: 1,
|
|
limit: 20
|
|
})),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
params = _useState2[0],
|
|
setParams = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
courseGroupList = _useState4[0],
|
|
setCourseGroupList = _useState4[1];
|
|
var _useState5 = (0,_react_17_0_2_react.useState)({}),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
data = _useState6[0],
|
|
setData = _useState6[1];
|
|
var name = (0,_react_17_0_2_react.useRef)();
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
isLoading = _useState8[0],
|
|
setIsLoading = _useState8[1];
|
|
var _useState9 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
checkedList = _useState10[0],
|
|
setCheckedList = _useState10[1];
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
checkedAll = _useState12[0],
|
|
setCheckedAll = _useState12[1];
|
|
var _useState13 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
isgroup = _useState14[0],
|
|
setIsgroup = _useState14[1];
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
params.order = 1;
|
|
params.sort = 'asc';
|
|
params.page = 1;
|
|
params.limit = 20;
|
|
params.course_group_id = params.categoryId;
|
|
setParams(params);
|
|
handleGetData(params);
|
|
handleGetAllCourseGroup();
|
|
}, [params['categoryId']]);
|
|
var handleGetAllCourseGroup = /*#__PURE__*/function () {
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
var _res$course_groups, _res$course_groups2;
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
_context.next = 2;
|
|
return (0,classrooms/* getAllCourseGroup */.c_)({
|
|
coursesId: params.coursesId
|
|
});
|
|
case 2:
|
|
res = _context.sent;
|
|
setCourseGroupList((res === null || res === void 0 || (_res$course_groups = res.course_groups) === null || _res$course_groups === void 0 ? void 0 : _res$course_groups.map(function (item) {
|
|
return objectSpread2_default()(objectSpread2_default()({}, item), {
|
|
show: true
|
|
});
|
|
})) || []);
|
|
setIsgroup(res === null || res === void 0 || (_res$course_groups2 = res.course_groups) === null || _res$course_groups2 === void 0 ? void 0 : _res$course_groups2.filter(function (item) {
|
|
return item.in_current_course_group;
|
|
}));
|
|
case 5:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return function handleGetAllCourseGroup() {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
var handleGetData = /*#__PURE__*/function () {
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(query) {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
setIsLoading(true);
|
|
_context2.next = 3;
|
|
return (0,classrooms/* getCourseGroupStudents */.Rk)(query);
|
|
case 3:
|
|
res = _context2.sent;
|
|
setIsLoading(false);
|
|
setData(res || {});
|
|
case 6:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
return function handleGetData(_x) {
|
|
return _ref3.apply(this, arguments);
|
|
};
|
|
}();
|
|
var onShowSizeChange = function onShowSizeChange(current, pageSize) {
|
|
params.page = current;
|
|
setCheckedAll(false);
|
|
setCheckedList([]);
|
|
setParams(params);
|
|
handleGetData(params);
|
|
};
|
|
var handleRename = function handleRename() {
|
|
name.current = data.course_group_name;
|
|
modal/* default */.Z.confirm({
|
|
width: 530,
|
|
title: '提示',
|
|
okText: '确定',
|
|
cancelText: '取消',
|
|
centered: true,
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "tc font16",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
defaultValue: name.current,
|
|
onChange: function onChange(e) {
|
|
return name.current = e.target.value;
|
|
}
|
|
})
|
|
}),
|
|
onOk: function () {
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
case 0:
|
|
_context3.next = 2;
|
|
return (0,classrooms/* renameCourseGroup */.$T)({
|
|
categoryId: params.categoryId,
|
|
name: name.current
|
|
});
|
|
case 2:
|
|
res = _context3.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
message/* default */.ZP.success("更新成功");
|
|
handleGetData(params);
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}, _callee3);
|
|
}));
|
|
function onOk() {
|
|
return _onOk.apply(this, arguments);
|
|
}
|
|
return onOk;
|
|
}()
|
|
});
|
|
};
|
|
var handleJoin = function handleJoin() {
|
|
modal/* default */.Z.confirm({
|
|
width: 530,
|
|
title: '提示',
|
|
okText: '确定',
|
|
cancelText: '取消',
|
|
centered: true,
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "tc font16",
|
|
children: "\u52A0\u5165\u5206\u73ED\u540E\uFF0C\u9700\u8054\u7CFB\u8001\u5E08\u6216\u52A9\u6559\u624D\u80FD\u8C03\u6574\u5206\u73ED"
|
|
}),
|
|
onOk: function () {
|
|
var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
case 0:
|
|
_context4.next = 2;
|
|
return (0,classrooms/* joinCourseGroup */.i6)({
|
|
coursesId: params.coursesId,
|
|
course_group_id: params.categoryId
|
|
});
|
|
case 2:
|
|
res = _context4.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
message/* default */.ZP.success("加入成功");
|
|
handleGetData(params);
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context4.stop();
|
|
}
|
|
}, _callee4);
|
|
}));
|
|
function onOk() {
|
|
return _onOk2.apply(this, arguments);
|
|
}
|
|
return onOk;
|
|
}()
|
|
});
|
|
};
|
|
var handelDelete = function handelDelete() {
|
|
modal/* default */.Z.confirm({
|
|
width: 530,
|
|
title: '提示',
|
|
okText: '确定',
|
|
cancelText: '取消',
|
|
centered: true,
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: "tc font16",
|
|
children: ["\u8BE5\u5206\u73ED\u7684\u5B66\u751F\u5C06\u88AB\u79FB\u52A8\u5230\u201C\u672A\u5206\u73ED\u201D", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u662F\u5426\u786E\u8BA4\u5220\u9664?"]
|
|
}),
|
|
onOk: function () {
|
|
var _onOk3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
case 0:
|
|
_context5.next = 2;
|
|
return (0,classrooms/* deleteCourseGroup */.pv)({
|
|
categoryId: params.categoryId
|
|
});
|
|
case 2:
|
|
res = _context5.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
message/* default */.ZP.success("删除成功");
|
|
dispatch({
|
|
type: 'classroomList/getClassroomLeftMenus',
|
|
payload: {
|
|
id: params.coursesId
|
|
}
|
|
});
|
|
_umi_production_exports.history.push("/classrooms/".concat(params.coursesId, "/course_group"));
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context5.stop();
|
|
}
|
|
}, _callee5);
|
|
}));
|
|
function onOk() {
|
|
return _onOk3.apply(this, arguments);
|
|
}
|
|
return onOk;
|
|
}()
|
|
});
|
|
};
|
|
var handleTransferToCourseGroup = /*#__PURE__*/function () {
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6(id) {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
case 0:
|
|
if (!((checkedList === null || checkedList === void 0 ? void 0 : checkedList.length) === 0)) {
|
|
_context6.next = 3;
|
|
break;
|
|
}
|
|
message/* default */.ZP.info('请选择学生');
|
|
return _context6.abrupt("return");
|
|
case 3:
|
|
_context6.next = 5;
|
|
return (0,classrooms/* transferToCourseGroup */.wR)({
|
|
coursesId: params.coursesId,
|
|
course_group_id: id,
|
|
students: checkedList.map(function (item) {
|
|
return {
|
|
course_member_id: item
|
|
};
|
|
})
|
|
});
|
|
case 5:
|
|
res = _context6.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
message/* default */.ZP.success('操作成功');
|
|
}
|
|
params.page = 1;
|
|
setCheckedList([]);
|
|
setParams(params);
|
|
handleGetData(params);
|
|
case 11:
|
|
case "end":
|
|
return _context6.stop();
|
|
}
|
|
}, _callee6);
|
|
}));
|
|
return function handleTransferToCourseGroup(_x2) {
|
|
return _ref4.apply(this, arguments);
|
|
};
|
|
}();
|
|
var handleTransferToCourseItem = /*#__PURE__*/function () {
|
|
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7(id, item_id) {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
case 0:
|
|
_context7.next = 2;
|
|
return (0,classrooms/* transferToCourseGroup */.wR)({
|
|
coursesId: params.coursesId,
|
|
course_group_id: id,
|
|
students: [{
|
|
course_member_id: item_id
|
|
}]
|
|
});
|
|
case 2:
|
|
res = _context7.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
message/* default */.ZP.success('操作成功');
|
|
}
|
|
params.page = 1;
|
|
setCheckedList([]);
|
|
setParams(params);
|
|
handleGetData(params);
|
|
case 8:
|
|
case "end":
|
|
return _context7.stop();
|
|
}
|
|
}, _callee7);
|
|
}));
|
|
return function handleTransferToCourseItem(_x3, _x4) {
|
|
return _ref5.apply(this, arguments);
|
|
};
|
|
}();
|
|
var deleteMuch = function deleteMuch() {
|
|
if ((checkedList === null || checkedList === void 0 ? void 0 : checkedList.length) === 0) {
|
|
message/* default */.ZP.info('请选择学生');
|
|
return;
|
|
}
|
|
modal/* default */.Z.confirm({
|
|
centered: true,
|
|
okText: '确定',
|
|
cancelText: '取消',
|
|
title: "\u662F\u5426\u786E\u8BA4\u5220\u9664",
|
|
content: '是否确认将学生从课堂内删除?',
|
|
onOk: function () {
|
|
var _onOk4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
|
|
while (1) switch (_context8.prev = _context8.next) {
|
|
case 0:
|
|
_context8.next = 2;
|
|
return (0,teacher/* deleteCourseStudents */.l3)({
|
|
coursesId: params.coursesId,
|
|
students: checkedList.map(function (item) {
|
|
return {
|
|
course_member_id: item
|
|
};
|
|
})
|
|
});
|
|
case 2:
|
|
res = _context8.sent;
|
|
if (res.status === 0) {
|
|
message/* default */.ZP.success('删除成功');
|
|
params.page = 1;
|
|
setCheckedList([]);
|
|
setParams(params);
|
|
handleGetData(params);
|
|
dispatch({
|
|
type: 'classroomList/getClassroomTopBanner',
|
|
payload: {
|
|
id: params.coursesId
|
|
}
|
|
});
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context8.stop();
|
|
}
|
|
}, _callee8);
|
|
}));
|
|
function onOk() {
|
|
return _onOk4.apply(this, arguments);
|
|
}
|
|
return onOk;
|
|
}()
|
|
});
|
|
};
|
|
var handleDeleteStudent = function handleDeleteStudent(course_member_id) {
|
|
modal/* default */.Z.confirm({
|
|
width: 530,
|
|
title: '提示',
|
|
okText: '确定',
|
|
cancelText: '取消',
|
|
centered: true,
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "tc font16",
|
|
children: "\u662F\u5426\u786E\u8BA4\u5220\u9664?"
|
|
}),
|
|
onOk: function () {
|
|
var _onOk5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee9$(_context9) {
|
|
while (1) switch (_context9.prev = _context9.next) {
|
|
case 0:
|
|
_context9.next = 2;
|
|
return (0,classrooms/* deleteStudent */.MA)({
|
|
coursesId: params.coursesId,
|
|
students: [{
|
|
course_member_id: course_member_id
|
|
}]
|
|
});
|
|
case 2:
|
|
res = _context9.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
message/* default */.ZP.success("删除成功");
|
|
params.page = 1;
|
|
handleGetData(params);
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context9.stop();
|
|
}
|
|
}, _callee9);
|
|
}));
|
|
function onOk() {
|
|
return _onOk5.apply(this, arguments);
|
|
}
|
|
return onOk;
|
|
}()
|
|
});
|
|
};
|
|
var exportMenuArr = [{
|
|
name: '课堂信息',
|
|
url: (0,util/* setUrlQuery */.NY)({
|
|
url: "/api/courses/".concat(params.coursesId, "/export_couser_info.xlsx&export=true"),
|
|
query: objectSpread2_default()(objectSpread2_default()({}, params), {
|
|
group_id: params.course_group_id,
|
|
search: params.search ? (_params$search = params.search) === null || _params$search === void 0 ? void 0 : _params$search.trim() : null
|
|
})
|
|
})
|
|
}, {
|
|
name: '活跃度',
|
|
url: (0,util/* setUrlQuery */.NY)({
|
|
url: "/api/courses/".concat(params.coursesId, "/export_member_act_score.xlsx&export=true"),
|
|
query: objectSpread2_default()(objectSpread2_default()({}, params), {
|
|
group_id: params.course_group_id,
|
|
search: params.search ? (_params$search2 = params.search) === null || _params$search2 === void 0 ? void 0 : _params$search2.trim() : null
|
|
})
|
|
})
|
|
}, {
|
|
name: '总成绩',
|
|
url: (0,util/* setUrlQuery */.NY)({
|
|
url: "/api/courses/".concat(params.coursesId, "/export_member_scores_excel.xlsx&export=true"),
|
|
query: objectSpread2_default()(objectSpread2_default()({}, params), {
|
|
group_id: params.course_group_id,
|
|
search: params.search ? (_params$search3 = params.search) === null || _params$search3 === void 0 ? void 0 : _params$search3.trim() : null
|
|
})
|
|
})
|
|
}];
|
|
var moveMenu = /*#__PURE__*/(0,jsx_runtime.jsxs)(menu/* default */.Z, {
|
|
style: {
|
|
maxHeight: 400,
|
|
width: 200,
|
|
overflow: 'auto',
|
|
padding: 10
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("input", {
|
|
placeholder: "\u641C\u7D22",
|
|
className: "ant-input",
|
|
onChange: function onChange(e) {
|
|
var value = e.target.value;
|
|
setCourseGroupList(courseGroupList.map(function (item) {
|
|
var _item$name;
|
|
if ((_item$name = item.name) !== null && _item$name !== void 0 && _item$name.includes(value)) {
|
|
return objectSpread2_default()(objectSpread2_default()({}, item), {
|
|
show: true
|
|
});
|
|
}
|
|
return objectSpread2_default()(objectSpread2_default()({}, item), {
|
|
show: false
|
|
});
|
|
}));
|
|
},
|
|
style: {
|
|
width: 180
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z.Item, {
|
|
onClick: function onClick() {
|
|
return handleTransferToCourseGroup(0);
|
|
},
|
|
className: "multi-llipsis1e",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u672A\u5206\u73ED"
|
|
})
|
|
}), courseGroupList === null || courseGroupList === void 0 || (_courseGroupList$filt = courseGroupList.filter(function (item) {
|
|
return item.show;
|
|
})) === null || _courseGroupList$filt === void 0 ? void 0 : _courseGroupList$filt.map(function (item, key) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z.Item, {
|
|
onClick: function onClick() {
|
|
return handleTransferToCourseGroup(item.id);
|
|
},
|
|
className: "multi-llipsis1e",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: item.name
|
|
})
|
|
});
|
|
})]
|
|
});
|
|
var exportMenu = /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z, {
|
|
style: {
|
|
maxHeight: 400,
|
|
width: 240,
|
|
overflow: 'auto'
|
|
},
|
|
children: exportMenuArr.map(function (item, key) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z.Item, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee10$(_context10) {
|
|
while (1) switch (_context10.prev = _context10.next) {
|
|
case 0:
|
|
_context10.next = 2;
|
|
return (0,fetch/* default */.ZP)(item.url, {
|
|
method: 'get'
|
|
});
|
|
case 2:
|
|
res = _context10.sent;
|
|
if (res && (res === null || res === void 0 ? void 0 : res.status) !== -1 && (res === null || res === void 0 ? void 0 : res.status) !== -2) {
|
|
(0,util/* openNewWindow */.xg)(item.url);
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context10.stop();
|
|
}
|
|
}, _callee10);
|
|
})),
|
|
children: item.name
|
|
})
|
|
}, item.url);
|
|
})
|
|
});
|
|
var columns = [(0,authority/* isAdmin */.GJ)() && {
|
|
title: '',
|
|
width: 80,
|
|
align: "center",
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
checked: checkedList.includes(record.course_member_id),
|
|
onChange: function onChange(e) {
|
|
if (e.target.checked) {
|
|
setCheckedList([].concat(toConsumableArray_default()(checkedList), [record.course_member_id]));
|
|
} else {
|
|
setCheckedList(checkedList.filter(function (item) {
|
|
return item !== record.course_member_id;
|
|
}));
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}, {
|
|
title: '序号',
|
|
render: function render(text, record, index) {
|
|
return params.limit * (params.page - 1) + index + 1;
|
|
},
|
|
width: 80,
|
|
align: "center"
|
|
}, {
|
|
title: '姓名',
|
|
dataIndex: 'name',
|
|
width: 80,
|
|
ellipsis: true,
|
|
align: "center",
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
className: "c-blank",
|
|
onClick: function onClick() {
|
|
return (0,util/* openNewWindow */.xg)("/users/".concat(record.login));
|
|
},
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '学号',
|
|
dataIndex: 'student_id',
|
|
width: 80,
|
|
ellipsis: true,
|
|
align: "center",
|
|
sorter: true,
|
|
showSorterTooltip: false,
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '手机号',
|
|
dataIndex: 'user_phone',
|
|
width: 80,
|
|
ellipsis: true,
|
|
align: "center",
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text
|
|
});
|
|
}
|
|
}, {
|
|
title: '邮箱',
|
|
dataIndex: 'user_mail',
|
|
width: 80,
|
|
ellipsis: true,
|
|
align: "center",
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text
|
|
});
|
|
}
|
|
},
|
|
// {
|
|
// title: '操作',
|
|
// key: 'action',
|
|
// width: 140,
|
|
// align: "center",
|
|
// render: (text: string, record: any) => (
|
|
// <a className="c-grey-666" onClick={() => {
|
|
// handleDeleteStudent(record.course_member_id);
|
|
// }}>删除学生</a>
|
|
// ),
|
|
// },
|
|
(0,authority/* isAdminOrAssistant */.Gg)() && {
|
|
title: '操作',
|
|
align: 'center',
|
|
dataIndex: 'name',
|
|
width: 140,
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(dropdown/* default */.Z, {
|
|
dropdownRender: function dropdownRender() {
|
|
var _courseGroupList$filt2;
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(menu/* default */.Z, {
|
|
style: {
|
|
maxHeight: 400,
|
|
width: 200,
|
|
overflow: 'auto',
|
|
padding: 10
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("input", {
|
|
placeholder: "\u641C\u7D22",
|
|
className: "ant-input",
|
|
onChange: function onChange(e) {
|
|
var value = e.target.value;
|
|
setCourseGroupList(courseGroupList.map(function (item) {
|
|
var _item$name2;
|
|
if ((_item$name2 = item.name) !== null && _item$name2 !== void 0 && _item$name2.includes(value)) {
|
|
return objectSpread2_default()(objectSpread2_default()({}, item), {
|
|
show: true
|
|
});
|
|
}
|
|
return objectSpread2_default()(objectSpread2_default()({}, item), {
|
|
show: false
|
|
});
|
|
}));
|
|
},
|
|
style: {
|
|
width: 180
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z.Item, {
|
|
onClick: function onClick() {
|
|
return handleTransferToCourseItem(0, record.course_member_id);
|
|
},
|
|
className: "multi-llipsis1e",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: "\u672A\u5206\u73ED"
|
|
})
|
|
}), courseGroupList === null || courseGroupList === void 0 || (_courseGroupList$filt2 = courseGroupList.filter(function (item) {
|
|
return item.show;
|
|
})) === null || _courseGroupList$filt2 === void 0 ? void 0 : _courseGroupList$filt2.map(function (item, key) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(menu/* default */.Z.Item, {
|
|
onClick: function onClick() {
|
|
return handleTransferToCourseItem(item.id, record.course_member_id);
|
|
},
|
|
className: "multi-llipsis1e",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: item.name
|
|
})
|
|
});
|
|
})]
|
|
});
|
|
},
|
|
className: "ml20",
|
|
placement: "bottomRight",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "font14 current",
|
|
style: {
|
|
color: '#3061d0'
|
|
},
|
|
children: "\u79FB\u52A8\u5206\u73ED"
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "current",
|
|
style: {
|
|
color: 'red',
|
|
marginLeft: 10
|
|
},
|
|
onClick: function onClick() {
|
|
modal/* default */.Z.confirm({
|
|
centered: true,
|
|
okText: '确定',
|
|
cancelText: '取消',
|
|
title: "\u662F\u5426\u786E\u8BA4\u5220\u9664",
|
|
content: '是否确认将学生从课堂内删除?',
|
|
onOk: function () {
|
|
var _onOk6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee11() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee11$(_context11) {
|
|
while (1) switch (_context11.prev = _context11.next) {
|
|
case 0:
|
|
_context11.next = 2;
|
|
return (0,teacher/* deleteCourseStudents */.l3)({
|
|
coursesId: params.coursesId,
|
|
students: [{
|
|
course_member_id: record.course_member_id
|
|
}]
|
|
});
|
|
case 2:
|
|
res = _context11.sent;
|
|
if (res.status === 0) {
|
|
message/* default */.ZP.success('删除成功');
|
|
params.page = 1;
|
|
setCheckedList([]);
|
|
setParams(params);
|
|
handleGetData(params);
|
|
dispatch({
|
|
type: 'classroomList/getClassroomTopBanner',
|
|
payload: {
|
|
id: params.coursesId
|
|
}
|
|
});
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context11.stop();
|
|
}
|
|
}, _callee11);
|
|
}));
|
|
function onOk() {
|
|
return _onOk6.apply(this, arguments);
|
|
}
|
|
return onOk;
|
|
}()
|
|
});
|
|
},
|
|
children: "\u5220\u9664"
|
|
})]
|
|
});
|
|
}
|
|
}].filter(function (item) {
|
|
return !!item;
|
|
});
|
|
var actionsArr = ['导入创建分班', '新建分班'];
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
className: Detailmodules.bg,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
className: Detailmodules.headWrap,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
flex: "1",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ArrowLeftOutlined/* default */.Z, {
|
|
className: "font16 c-black",
|
|
onClick: function onClick() {
|
|
return _umi_production_exports.history.push("/classrooms/".concat(params.coursesId, "/course_group"));
|
|
}
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "".concat(Detailmodules.title, " ml10"),
|
|
children: data.course_group_name
|
|
}), (0,authority/* isAdmin */.GJ)() && data.invite_code && /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: "ml10",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-grey-999 font16",
|
|
children: "\u9080\u8BF7\u7801\uFF1A"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-orange font16",
|
|
children: data.invite_code
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(lib.CopyToClipboard, {
|
|
text: data.invite_code,
|
|
className: "current",
|
|
onCopy: function onCopy() {
|
|
return message/* default */.ZP.success('复制成功');
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
className: "iconfont icon-fuzhi font14 ml10 c-orange"
|
|
})
|
|
})
|
|
})
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [(0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: [Detailmodules.add, 'font16', 'c-blue', 'ml20', 'current'].join(' '),
|
|
onClick: handelDelete,
|
|
children: "\u5220\u9664\u5206\u73ED"
|
|
}), (0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: [Detailmodules.add, 'font16', 'c-blue', 'ml20', 'current'].join(' '),
|
|
onClick: handleRename,
|
|
children: "\u5206\u73ED\u91CD\u547D\u540D"
|
|
}), (0,authority/* isStudent */.dE)() && isgroup.length <= 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: [Detailmodules.add, 'font16', 'c-blue', 'ml20', 'current'].join(' '),
|
|
onClick: handleJoin,
|
|
children: "\u52A0\u5165\u5206\u73ED"
|
|
})]
|
|
})
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Detailmodules.containerDesc,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("p", {
|
|
children: ["\u5171", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-orange",
|
|
children: data.students_count
|
|
}), "\u4E2A\u5B66\u751F"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
|
|
allowClear: true,
|
|
placeholder: "\u8BF7\u8F93\u5165\u59D3\u540D\u3001\u5B66\u53F7\u8FDB\u884C\u641C\u7D22",
|
|
onSearch: function onSearch(value) {
|
|
params.search = value;
|
|
params.page = 1;
|
|
setParams(params);
|
|
handleGetData(params);
|
|
},
|
|
style: {
|
|
width: 300
|
|
}
|
|
})
|
|
})]
|
|
})]
|
|
}), data.students_count === 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {}), data.students_count > 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
className: "plr30 mt20 ".concat(Detailmodules.bg),
|
|
children: [(0,authority/* isAdmin */.GJ)() && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
justify: "space-between",
|
|
className: Detailmodules.checkbox,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
checked: checkedAll,
|
|
onChange: function onChange(e) {
|
|
setCheckedAll(e.target.checked);
|
|
if (e.target.checked) {
|
|
var _data$students;
|
|
setCheckedList((_data$students = data.students) === null || _data$students === void 0 ? void 0 : _data$students.map(function (item) {
|
|
return item.course_member_id;
|
|
}));
|
|
} else {
|
|
setCheckedList([]);
|
|
}
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: "font14",
|
|
children: ["\u5DF2\u9009", checkedList.length, "\u4E2A"]
|
|
})
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
marginLeft: 'auto',
|
|
cursor: 'pointer',
|
|
color: 'red'
|
|
},
|
|
onClick: function onClick() {
|
|
deleteMuch();
|
|
},
|
|
children: "\u6279\u91CF\u5220\u9664"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(dropdown/* default */.Z, {
|
|
dropdownRender: function dropdownRender() {
|
|
return moveMenu;
|
|
},
|
|
className: "ml20",
|
|
placement: "bottomRight",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
className: "font14 current",
|
|
style: {
|
|
color: '#3061d0'
|
|
},
|
|
children: ["\u79FB\u52A8\u5230", /*#__PURE__*/(0,jsx_runtime.jsx)(DownOutlined/* default */.Z, {
|
|
className: "ml5"
|
|
})]
|
|
})
|
|
})
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
className: "pt20",
|
|
columns: columns,
|
|
dataSource: data.students,
|
|
loading: isLoading,
|
|
pagination: false,
|
|
onChange: function onChange(a, b, c) {
|
|
console.log('c: ', c);
|
|
if (c.order === 'ascend') params['sort'] = 'asc';
|
|
if (c.order === 'descend') params['sort'] = 'desc';
|
|
if (!c.order) delete params['sort'];
|
|
setParams(params);
|
|
handleGetData(params);
|
|
}
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
|
|
className: "tc mb50 mt30",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
hideOnSinglePage: true,
|
|
showSizeChanger: false,
|
|
onChange: onShowSizeChange,
|
|
defaultCurrent: 1,
|
|
defaultPageSize: 20,
|
|
current: params.page || 1,
|
|
total: data.students_count
|
|
})
|
|
})]
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var Detail = ((0,_umi_production_exports.connect)(function (_ref7) {
|
|
var classroomList = _ref7.classroomList,
|
|
loading = _ref7.loading,
|
|
globalSetting = _ref7.globalSetting;
|
|
return {
|
|
classroomList: classroomList,
|
|
globalSetting: globalSetting,
|
|
loading: loading
|
|
};
|
|
})(ShixunsListPage));
|
|
|
|
/***/ }),
|
|
|
|
/***/ 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;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 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();
|
|
};
|
|
};
|
|
|
|
|
|
/***/ })
|
|
|
|
}]); |