|
|
|
|
@ -1,48 +1,6 @@
|
|
|
|
|
"use strict";
|
|
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[38634],{
|
|
|
|
|
|
|
|
|
|
/***/ 60936:
|
|
|
|
|
/*!*******************************************************************************************************!*\
|
|
|
|
|
!*** ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/InboxOutlined.js + 1 modules ***!
|
|
|
|
|
\*******************************************************************************************************/
|
|
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
|
|
Z: function() { return /* binding */ icons_InboxOutlined; }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/esm/extends.js
|
|
|
|
|
var esm_extends = __webpack_require__(26508);
|
|
|
|
|
// 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.3.1@@ant-design/icons-svg/es/asn/InboxOutlined.js
|
|
|
|
|
// This icon file is generated automatically.
|
|
|
|
|
var InboxOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z" } }] }, "name": "inbox", "theme": "outlined" };
|
|
|
|
|
/* harmony default export */ var asn_InboxOutlined = (InboxOutlined);
|
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
|
|
|
var AntdIcon = __webpack_require__(91851);
|
|
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/InboxOutlined.js
|
|
|
|
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var InboxOutlined_InboxOutlined = function InboxOutlined(props, ref) {
|
|
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
|
|
ref: ref,
|
|
|
|
|
icon: asn_InboxOutlined
|
|
|
|
|
}));
|
|
|
|
|
};
|
|
|
|
|
if (false) {}
|
|
|
|
|
/* harmony default export */ var icons_InboxOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(InboxOutlined_InboxOutlined));
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 88463:
|
|
|
|
|
/*!**********************************************!*\
|
|
|
|
|
!*** ./src/components/ExportCount/index.tsx ***!
|
|
|
|
|
@ -798,10 +756,10 @@ var EditAttendance = function EditAttendance(_ref) {
|
|
|
|
|
})(EditAttendance));
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.7.1@antd/es/upload/index.js + 24 modules
|
|
|
|
|
var upload = __webpack_require__(70748);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/InboxOutlined.js + 1 modules
|
|
|
|
|
var InboxOutlined = __webpack_require__(60936);
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
|
|
|
var env = __webpack_require__(47786);
|
|
|
|
|
// EXTERNAL MODULE: ./src/service/classrooms.ts
|
|
|
|
|
var classrooms = __webpack_require__(89237);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CourseGroup/List/components/ImportCourse.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -814,24 +772,38 @@ var env = __webpack_require__(47786);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Dragger = upload/* default */.Z.Dragger;
|
|
|
|
|
var ImportCourse_TreeNode = tree_select/* default.TreeNode */.Z.TreeNode;
|
|
|
|
|
var ImportCourse_EditAttendance = function EditAttendance(_ref) {
|
|
|
|
|
' ';
|
|
|
|
|
|
|
|
|
|
var classroomList = _ref.classroomList,
|
|
|
|
|
loading = _ref.loading,
|
|
|
|
|
dispatch = _ref.dispatch;
|
|
|
|
|
var params = (0,_umi_production_exports.useParams)();
|
|
|
|
|
var _useState = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
|
|
files = _useState2[0],
|
|
|
|
|
setFiles = _useState2[1];
|
|
|
|
|
selectedRowKeys = _useState2[0],
|
|
|
|
|
setSelectedRowKeys = _useState2[1];
|
|
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
|
|
files = _useState4[0],
|
|
|
|
|
setFiles = _useState4[1];
|
|
|
|
|
params['id'] = params['coursesId'];
|
|
|
|
|
var detailLeftMenus = classroomList.detailLeftMenus,
|
|
|
|
|
actionTabs = classroomList.actionTabs;
|
|
|
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
|
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
|
|
|
form = _Form$useForm2[0];
|
|
|
|
|
// 初始化班级信息
|
|
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
|
|
classData = _useState6[0],
|
|
|
|
|
setClassData = _useState6[1];
|
|
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
|
|
selectArrs = _useState8[0],
|
|
|
|
|
setSelectArrs = _useState8[1];
|
|
|
|
|
var props = {
|
|
|
|
|
name: 'file',
|
|
|
|
|
multiple: true,
|
|
|
|
|
@ -848,84 +820,171 @@ var ImportCourse_EditAttendance = function EditAttendance(_ref) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
(0,classrooms/* getAllClass */.F9)().then(function (res) {
|
|
|
|
|
if (res) {
|
|
|
|
|
var _res$student_groups$;
|
|
|
|
|
setClassData(res.student_groups);
|
|
|
|
|
// 设置form
|
|
|
|
|
form.setFieldsValue({
|
|
|
|
|
search_class: res === null || res === void 0 ? void 0 : (_res$student_groups$ = res.student_groups[0]) === null || _res$student_groups$ === void 0 ? void 0 : _res$student_groups$.id
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}, []);
|
|
|
|
|
var onSelectChange = function onSelectChange(newSelectedRowKeys, selectedRows) {
|
|
|
|
|
console.log('selectedRowKeys changed: ', newSelectedRowKeys, selectedRows);
|
|
|
|
|
setSelectedRowKeys(newSelectedRowKeys);
|
|
|
|
|
};
|
|
|
|
|
var rowSelection = {
|
|
|
|
|
selectedRowKeys: selectedRowKeys,
|
|
|
|
|
onChange: onSelectChange
|
|
|
|
|
};
|
|
|
|
|
var columnsClass = [
|
|
|
|
|
// {
|
|
|
|
|
// title: '',
|
|
|
|
|
// dataIndex: 'added',
|
|
|
|
|
// width: 40,
|
|
|
|
|
// ellipsis: true,
|
|
|
|
|
// render: (add: string, record: any) => {
|
|
|
|
|
//
|
|
|
|
|
// return (
|
|
|
|
|
// <Checkbox
|
|
|
|
|
// value={record.id}
|
|
|
|
|
// checked={selectArrs.includes(String(record.id))}
|
|
|
|
|
// disabled={!!add}
|
|
|
|
|
// ></Checkbox>
|
|
|
|
|
// );
|
|
|
|
|
// },
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
title: '分班名称',
|
|
|
|
|
width: 150,
|
|
|
|
|
dataIndex: 'name',
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
render: function render(text) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
|
|
placement: "bottom",
|
|
|
|
|
title: text,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: text || '--'
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
title: '院系/部门',
|
|
|
|
|
dataIndex: 'department_name',
|
|
|
|
|
width: 130,
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
render: function render(text) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
|
|
placement: "bottom",
|
|
|
|
|
title: text,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: text || '--'
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
title: '学生成员',
|
|
|
|
|
dataIndex: 'student_count',
|
|
|
|
|
width: 130,
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
render: function render(text) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
|
|
placement: "bottom",
|
|
|
|
|
title: text,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
children: text || '--'
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}];
|
|
|
|
|
var saveSelect = function saveSelect(id) {
|
|
|
|
|
id = String(id);
|
|
|
|
|
var key = selectArrs.indexOf(id);
|
|
|
|
|
if (key < 0) {
|
|
|
|
|
selectArrs.push(id);
|
|
|
|
|
} else {
|
|
|
|
|
selectArrs.splice(key, 1);
|
|
|
|
|
}
|
|
|
|
|
setSelectArrs(toConsumableArray_default()(selectArrs));
|
|
|
|
|
};
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(modal/* default */.Z, {
|
|
|
|
|
centered: true,
|
|
|
|
|
title: "\u5BFC\u5165\u521B\u5EFA\u5206\u73ED",
|
|
|
|
|
title: "\u521B\u5EFA\u5206\u73ED",
|
|
|
|
|
width: 1000,
|
|
|
|
|
open: classroomList.actionTabs.key === '导入创建分班' ? true : false,
|
|
|
|
|
okText: "\u786E\u5B9A",
|
|
|
|
|
cancelText: "\u53D6\u6D88",
|
|
|
|
|
bodyStyle: {
|
|
|
|
|
minHeight: 130,
|
|
|
|
|
padding: '0 20px',
|
|
|
|
|
marginTop: 25
|
|
|
|
|
minHeight: 130
|
|
|
|
|
},
|
|
|
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
var formValue, res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context.t0 = (objectSpread2_default());
|
|
|
|
|
_context.t1 = {};
|
|
|
|
|
_context.next = 4;
|
|
|
|
|
return form.validateFields();
|
|
|
|
|
case 4:
|
|
|
|
|
_context.t2 = _context.sent;
|
|
|
|
|
formValue = (0, _context.t0)(_context.t1, _context.t2);
|
|
|
|
|
if (!(files == '')) {
|
|
|
|
|
_context.next = 9;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
message/* default */.ZP.error('请先上传文件');
|
|
|
|
|
return _context.abrupt("return", false);
|
|
|
|
|
case 9:
|
|
|
|
|
_context.next = 11;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(params.id, "/create_group_by_importing_file.json"), {
|
|
|
|
|
method: 'post',
|
|
|
|
|
body: {
|
|
|
|
|
attachment_ids: files.map(function (v) {
|
|
|
|
|
return v.response.id;
|
|
|
|
|
})
|
|
|
|
|
// 导入班级
|
|
|
|
|
(0,classrooms/* exportStudent */.tR)({
|
|
|
|
|
identifier: params.coursesId,
|
|
|
|
|
student_group_ids: selectedRowKeys
|
|
|
|
|
}).then(function (res) {
|
|
|
|
|
if (res) {
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'classroomList/setActionTabs',
|
|
|
|
|
payload: {}
|
|
|
|
|
});
|
|
|
|
|
setSelectedRowKeys([]);
|
|
|
|
|
// 添加数据进入dva
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'classroomList/getCourseGroupsList',
|
|
|
|
|
payload: {
|
|
|
|
|
id: params.id
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 11:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
message/* default */.ZP.success('添加成功');
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'classroomList/setActionTabs',
|
|
|
|
|
payload: {}
|
|
|
|
|
});
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'classroomList/getCourseGroupsList',
|
|
|
|
|
payload: {
|
|
|
|
|
id: params['coursesId']
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
case 13:
|
|
|
|
|
case 1:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
})),
|
|
|
|
|
onCancel: function onCancel() {
|
|
|
|
|
setSelectArrs([]);
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'classroomList/setActionTabs',
|
|
|
|
|
payload: {}
|
|
|
|
|
});
|
|
|
|
|
setSelectedRowKeys([]);
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(Dragger, objectSpread2_default()(objectSpread2_default()({}, props), {}, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
|
|
className: "ant-upload-drag-icon",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(InboxOutlined/* default */.Z, {})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
|
|
className: "ant-upload-text",
|
|
|
|
|
children: "\u70B9\u51FB\u6216\u62D6\u62FD\u6587\u4EF6\u5230\u8FD9\u91CC\u4E0A\u4F20"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("p", {
|
|
|
|
|
className: "ant-upload-hint",
|
|
|
|
|
children: "\u5355\u4E2A\u6587\u4EF6\u6700\u5927150MB"
|
|
|
|
|
})]
|
|
|
|
|
}))
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("section", {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
maxHeight: 260,
|
|
|
|
|
overflow: 'auto'
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
|
|
pagination: false,
|
|
|
|
|
dataSource: classData,
|
|
|
|
|
columns: columnsClass,
|
|
|
|
|
rowSelection: rowSelection,
|
|
|
|
|
rowKey: function rowKey(record) {
|
|
|
|
|
return record.id + '';
|
|
|
|
|
},
|
|
|
|
|
onRow: function onRow(record) {
|
|
|
|
|
return {
|
|
|
|
|
onClick: function onClick(event) {
|
|
|
|
|
' ';
|
|
|
|
|
|
|
|
|
|
var _event$target, _event$target2;
|
|
|
|
|
if (!((_event$target = event.target) !== null && _event$target !== void 0 && _event$target.disabled)) saveSelect((_event$target2 = event.target) === null || _event$target2 === void 0 ? void 0 : _event$target2.value);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}), ","]
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/* harmony default export */ var ImportCourse = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
|
|
|
|