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.
1042 lines
47 KiB
1042 lines
47 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[66063],{
|
|
|
|
/***/ 72020:
|
|
/*!*****************************************!*\
|
|
!*** ./src/components/NoData/index.tsx ***!
|
|
\*****************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js */ 26801);
|
|
/* harmony import */ var _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
|
|
/* harmony import */ var _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/assets/images/icons/nodata.png */ 4977);
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 3113);
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var noData = function noData(_ref) {
|
|
var img = _ref.img,
|
|
_ref$buttonProps = _ref.buttonProps,
|
|
buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
|
|
_ref$styles = _ref.styles,
|
|
styles = _ref$styles === void 0 ? {} : _ref$styles,
|
|
customText = _ref.customText,
|
|
ButtonText = _ref.ButtonText,
|
|
ButtonClick = _ref.ButtonClick,
|
|
Buttonclass = _ref.Buttonclass,
|
|
ButtonTwo = _ref.ButtonTwo,
|
|
imgStyles = _ref.imgStyles,
|
|
_ref$loading = _ref.loading,
|
|
loading = _ref$loading === void 0 ? false : _ref$loading;
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("section", {
|
|
className: "tc animated fadeIn",
|
|
style: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, {
|
|
color: '#999',
|
|
margin: '100px auto',
|
|
visibility: loading ? 'hidden' : 'visible'
|
|
}), styles),
|
|
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("img", {
|
|
src: img || _assets_images_icons_nodata_png__WEBPACK_IMPORTED_MODULE_2__,
|
|
style: _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, imgStyles)
|
|
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("p", {
|
|
className: "mt20 font14",
|
|
children: customText || '暂时还没有相关数据哦!'
|
|
}), ButtonText && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .ZP, _root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_SJ5m_develop_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({
|
|
className: Buttonclass,
|
|
onClick: ButtonClick
|
|
}, buttonProps), {}, {
|
|
children: ButtonText
|
|
})), ButtonTwo && ButtonTwo]
|
|
});
|
|
};
|
|
/* harmony default export */ __webpack_exports__.Z = (noData);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 78388:
|
|
/*!************************************************************************!*\
|
|
!*** ./src/pages/Graduations/Lists/Personmanage/index.tsx + 1 modules ***!
|
|
\************************************************************************/
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
// ESM COMPAT FLAG
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
"default": function() { return /* binding */ Personmanage; }
|
|
});
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js
|
|
var objectSpread2 = __webpack_require__(26801);
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/toConsumableArray.js
|
|
var toConsumableArray = __webpack_require__(93923);
|
|
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js
|
|
var regeneratorRuntime = __webpack_require__(10574);
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js
|
|
var asyncToGenerator = __webpack_require__(39343);
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(11006);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
;// CONCATENATED MODULE: ./src/pages/Graduations/Lists/Personmanage/index.less?modules
|
|
// extracted by mini-css-extract-plugin
|
|
/* harmony default export */ var Personmanagemodules = ({"flex_box_center":"flex_box_center___SU33_","flex_space_between":"flex_space_between___NnGYW","flex_box_vertical_center":"flex_box_vertical_center___lX31d","flex_box_center_end":"flex_box_center_end___KWld3","flex_box_column":"flex_box_column___QHzze","ActvieE3":"ActvieE3___Hv5W0","Actvie00":"Actvie00___xMrRz","body":"body___gECjr","AddBut":"AddBut___iCNdk","selectInfo":"selectInfo___2doF7"});
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts + 8 modules
|
|
var _umi_production_exports = __webpack_require__(66660);
|
|
// 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/tooltip/index.js + 3 modules
|
|
var tooltip = __webpack_require__(6848);
|
|
// 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/space/index.js + 3 modules
|
|
var space = __webpack_require__(81327);
|
|
// 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/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/message/index.js + 4 modules
|
|
var message = __webpack_require__(8591);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/skeleton/index.js + 12 modules
|
|
var skeleton = __webpack_require__(59981);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
var table = __webpack_require__(72315);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
|
var pagination = __webpack_require__(41867);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
|
|
var input = __webpack_require__(1056);
|
|
// EXTERNAL MODULE: ./src/components/ui-customization/index.tsx + 34 modules
|
|
var ui_customization = __webpack_require__(6487);
|
|
// EXTERNAL MODULE: ./node_modules/_lodash@4.17.21@lodash/lodash.js
|
|
var lodash = __webpack_require__(89392);
|
|
// EXTERNAL MODULE: ./src/service/graduations.ts
|
|
var service_graduations = __webpack_require__(36075);
|
|
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
|
var NoData = __webpack_require__(72020);
|
|
// EXTERNAL MODULE: ./src/pages/Graduations/components/Addperson/index.tsx
|
|
var Addperson = __webpack_require__(34085);
|
|
// EXTERNAL MODULE: ./src/utils/authority.ts
|
|
var authority = __webpack_require__(76107);
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
;// CONCATENATED MODULE: ./src/pages/Graduations/Lists/Personmanage/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Page = function Page(_ref) {
|
|
var _graduations$teachers, _graduations$students, _graduations$teachers2, _graduations$students2, _graduations$teachers3, _graduations$teachers4, _graduations$teachers5, _graduations$teachers6, _graduations$students3, _graduations$students4, _graduations$students5, _graduations$students6;
|
|
var graduations = _ref.graduations,
|
|
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 _useState = (0,_react_17_0_2_react.useState)("teachers"),
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
tabType = _useState2[0],
|
|
setTabType = _useState2[1];
|
|
var _useState3 = (0,_react_17_0_2_react.useState)("processing"),
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
notPass = _useState4[0],
|
|
setNotPass = _useState4[1];
|
|
var keywordRef = (0,_react_17_0_2_react.useRef)("");
|
|
var _useState5 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
isAddOpen = _useState6[0],
|
|
setIsAddOpen = _useState6[1];
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
form = _Form$useForm2[0];
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
isEidtModal = _useState8[0],
|
|
setIsEidtModal = _useState8[1];
|
|
var _useState9 = (0,_react_17_0_2_react.useState)({
|
|
id: params.id,
|
|
keyword: keywordRef.current,
|
|
page: 1,
|
|
per_page: 20
|
|
}),
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
teacherParams = _useState10[0],
|
|
setTeacherParams = _useState10[1];
|
|
var _useState11 = (0,_react_17_0_2_react.useState)([]),
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
selectedRowKeys = _useState12[0],
|
|
setSelectedRowKeys = _useState12[1];
|
|
var columns = [{
|
|
title: '教师姓名',
|
|
width: 112,
|
|
dataIndex: 'name',
|
|
ellipsis: true,
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
placement: "topLeft",
|
|
title: text,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text || "- -"
|
|
})
|
|
});
|
|
}
|
|
}, {
|
|
title: '所属学校',
|
|
dataIndex: 'school',
|
|
ellipsis: true,
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
placement: "topLeft",
|
|
title: text,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text || "- -"
|
|
})
|
|
});
|
|
}
|
|
}, {
|
|
title: '所属学院',
|
|
ellipsis: true,
|
|
dataIndex: 'department',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
placement: "topLeft",
|
|
title: text,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text || "- -"
|
|
})
|
|
});
|
|
}
|
|
}, {
|
|
title: '工号',
|
|
width: 120,
|
|
dataIndex: 'staff_id',
|
|
ellipsis: true,
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
placement: "topLeft",
|
|
title: text,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text || "- -"
|
|
})
|
|
});
|
|
}
|
|
}, {
|
|
title: '职称',
|
|
dataIndex: 'technical_title',
|
|
width: 80,
|
|
ellipsis: true,
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
placement: "topLeft",
|
|
title: text,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text || "- -"
|
|
})
|
|
});
|
|
}
|
|
}, {
|
|
title: '操作',
|
|
align: "right",
|
|
width: 100,
|
|
dataIndex: 'name',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
children: (0,authority/* isGPAdminOrTeacher */.tu)() && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
children: [notPass === "processing" && /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
className: Personmanagemodules.ActvieE3,
|
|
onClick: function onClick() {
|
|
modal/* default */.Z.confirm({
|
|
centered: true,
|
|
icon: null,
|
|
title: "删除",
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "",
|
|
children: "\u786E\u8BA4\u8981\u5C06\"".concat(record.name, "\"\u4ECE\u8BE5\u6BD5\u4E1A\u8BBE\u8BA1\u4E2D\u79FB\u9664\u5417\uFF1F\u79FB\u9664\u540E\u8BE5\u7528 \u6237\u5728\u6BD5\u8BBE\u4E2D\u63D0\u4EA4\u7684\u6587\u4EF6\u5C06\u88AB\u6E05\u7A7A")
|
|
}),
|
|
onOk: (0,lodash.throttle)( /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
while (1) switch (_context.prev = _context.next) {
|
|
case 0:
|
|
_context.next = 2;
|
|
return (0,service_graduations/* deleteGraduationTeachers */.zT)(params.id, {
|
|
ids: [record.id]
|
|
});
|
|
case 2:
|
|
res = _context.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
getData();
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}, _callee);
|
|
})), 2000)
|
|
});
|
|
},
|
|
children: "\u5220\u9664"
|
|
}), notPass !== "processing" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(space/* default */.Z, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
onClick: function onClick() {
|
|
modal/* default */.Z.confirm({
|
|
centered: true,
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "",
|
|
children: "\u662F\u5426\u786E\u8BA4\u540C\u610F\"".concat(record.name, "\"\u7684\u52A0\u5165\uFF1F")
|
|
}),
|
|
onOk: (0,lodash.throttle)( /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
_context2.next = 2;
|
|
return (0,service_graduations/* postGraduationTeachersPass */.V1)(params.id, {
|
|
ids: [record.id]
|
|
});
|
|
case 2:
|
|
res = _context2.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
getData();
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}, _callee2);
|
|
})), 2000)
|
|
});
|
|
},
|
|
children: "\u901A\u8FC7"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
onClick: function onClick() {
|
|
modal/* default */.Z.confirm({
|
|
icon: null,
|
|
centered: true,
|
|
title: "\u662F\u5426\u786E\u8BA4\u62D2\u7EDD\"".concat(record.name, "\"\u7684\u52A0\u5165\uFF1F"),
|
|
onOk: (0,lodash.throttle)( /*#__PURE__*/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,service_graduations/* postGraduationTeachersNotPass */.Ib)(params.id, {
|
|
ids: [record.id]
|
|
});
|
|
case 2:
|
|
res = _context3.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
getData();
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}, _callee3);
|
|
})), 2000)
|
|
});
|
|
},
|
|
children: "\u9A73\u56DE"
|
|
})]
|
|
})
|
|
})]
|
|
})
|
|
});
|
|
}
|
|
}];
|
|
var columnsStudents = [{
|
|
title: '学生姓名',
|
|
width: 112,
|
|
dataIndex: 'name',
|
|
ellipsis: true,
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
placement: "topLeft",
|
|
title: text,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text
|
|
})
|
|
});
|
|
}
|
|
}, {
|
|
title: '学号',
|
|
// width: 239,
|
|
dataIndex: 'student_id',
|
|
ellipsis: true,
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
placement: "topLeft",
|
|
title: text,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text || "- -"
|
|
})
|
|
});
|
|
}
|
|
}, {
|
|
title: '手机号',
|
|
width: 200,
|
|
ellipsis: true,
|
|
dataIndex: 'phone',
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
placement: "topLeft",
|
|
title: text,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text || "- -"
|
|
})
|
|
});
|
|
}
|
|
}, {
|
|
title: '专业',
|
|
width: 200,
|
|
dataIndex: 'major',
|
|
ellipsis: true,
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
placement: "topLeft",
|
|
title: text,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text || "- -"
|
|
})
|
|
});
|
|
}
|
|
}, {
|
|
title: '所属课题',
|
|
dataIndex: 'graduation_tasks',
|
|
width: 136,
|
|
ellipsis: true,
|
|
render: function render(text) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
placement: "topLeft",
|
|
title: text,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
children: text || "- -"
|
|
})
|
|
});
|
|
}
|
|
}, {
|
|
title: "操作",
|
|
align: "right",
|
|
width: 120,
|
|
dataIndex: 'name',
|
|
render: function render(text, record) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
children: (0,authority/* isGPAdminOrTeacher */.tu)() && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
children: [notPass === "processing" && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
className: Personmanagemodules.Active00,
|
|
onClick: function onClick() {
|
|
form.setFieldsValue(record);
|
|
setIsEidtModal(true);
|
|
},
|
|
children: "\u7F16\u8F91"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
className: "ml20 ".concat(Personmanagemodules.ActvieE3),
|
|
onClick: function onClick() {
|
|
modal/* default */.Z.confirm({
|
|
centered: true,
|
|
icon: null,
|
|
title: "删除",
|
|
content: "\u786E\u8BA4\u8981\u5C06\"".concat(record.name, "\"\u4ECE\u8BE5\u6BD5\u4E1A\u8BBE\u8BA1\u4E2D\u79FB\u9664\u5417\uFF1F\u79FB\u9664\u540E\u8BE5\u7528 \u6237\u5728\u6BD5\u8BBE\u4E2D\u63D0\u4EA4\u7684\u6587\u4EF6\u5C06\u88AB\u6E05\u7A7A"),
|
|
onOk: (0,lodash.throttle)( /*#__PURE__*/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,service_graduations/* deleteGraduationStudents */.rU)(params.id, {
|
|
ids: [record.id]
|
|
});
|
|
case 2:
|
|
res = _context4.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
getData();
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context4.stop();
|
|
}
|
|
}, _callee4);
|
|
})), 2000)
|
|
});
|
|
},
|
|
children: "\u5220\u9664"
|
|
})]
|
|
}), notPass !== "processing" && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(space/* default */.Z, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
className: Personmanagemodules.Active00,
|
|
onClick: function onClick() {
|
|
modal/* default */.Z.confirm({
|
|
centered: true,
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "",
|
|
children: "\u662F\u5426\u786E\u8BA4\u540C\u610F\"".concat(record.name, "\"\u7684\u52A0\u5165\uFF1F")
|
|
}),
|
|
onOk: (0,lodash.throttle)( /*#__PURE__*/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,service_graduations/* postGraduationStudentsPass */.Fi)(params.id, {
|
|
ids: [record.id]
|
|
});
|
|
case 2:
|
|
res = _context5.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
getData();
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context5.stop();
|
|
}
|
|
}, _callee5);
|
|
})), 2000)
|
|
});
|
|
},
|
|
children: "\u901A\u8FC7"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
className: "ml20 ".concat(Personmanagemodules.ActvieE3),
|
|
onClick: function onClick() {
|
|
modal/* default */.Z.confirm({
|
|
icon: null,
|
|
centered: true,
|
|
title: "\u662F\u5426\u786E\u8BA4\u62D2\u7EDD\"".concat(record.name, "\"\u7684\u52A0\u5165\uFF1F"),
|
|
onOk: (0,lodash.throttle)( /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
case 0:
|
|
_context6.next = 2;
|
|
return (0,service_graduations/* postGraduationStudentsNotPass */.Zd)(params.id, {
|
|
ids: [record.id]
|
|
});
|
|
case 2:
|
|
res = _context6.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
getData();
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context6.stop();
|
|
}
|
|
}, _callee6);
|
|
})), 2000)
|
|
});
|
|
},
|
|
children: "\u9A73\u56DE"
|
|
})]
|
|
})
|
|
})]
|
|
})
|
|
});
|
|
}
|
|
}];
|
|
var tags = [{
|
|
id: 'processing',
|
|
name: "\u5DF2\u5BA1\u6838 ".concat((tabType == "teachers" ? graduations === null || graduations === void 0 || (_graduations$teachers = graduations.teachers) === null || _graduations$teachers === void 0 ? void 0 : _graduations$teachers.pass_count : graduations === null || graduations === void 0 || (_graduations$students = graduations.students) === null || _graduations$students === void 0 ? void 0 : _graduations$students.pass_count) || 0)
|
|
}, {
|
|
id: 'end',
|
|
name: "\u672A\u5BA1\u6838 ".concat((tabType == "teachers" ? graduations === null || graduations === void 0 || (_graduations$teachers2 = graduations.teachers) === null || _graduations$teachers2 === void 0 ? void 0 : _graduations$teachers2.not_pass_count : graduations === null || graduations === void 0 || (_graduations$students2 = graduations.students) === null || _graduations$students2 === void 0 ? void 0 : _graduations$students2.not_pass_count) || 0)
|
|
}];
|
|
var onSelectChange = function onSelectChange(newSelectedRowKeys) {
|
|
console.log('selectedRowKeys changed: ', newSelectedRowKeys);
|
|
setSelectedRowKeys(newSelectedRowKeys);
|
|
};
|
|
var rowSelection = {
|
|
selectedRowKeys: selectedRowKeys,
|
|
onChange: onSelectChange
|
|
// columnWidth: 56,
|
|
};
|
|
|
|
var getData = /*#__PURE__*/function () {
|
|
var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
|
|
var type;
|
|
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
case 0:
|
|
type = "graduations/getGraduationsStudents";
|
|
teacherParams.keyword = keywordRef.current;
|
|
if (notPass === "") {
|
|
delete teacherParams.not_pass;
|
|
} else {
|
|
teacherParams.not_pass = notPass === "processing" ? false : true;
|
|
}
|
|
if (tabType === "teachers") {
|
|
type = "graduations/getGraduationsTeachers";
|
|
}
|
|
dispatch({
|
|
type: type,
|
|
payload: teacherParams
|
|
});
|
|
case 5:
|
|
case "end":
|
|
return _context7.stop();
|
|
}
|
|
}, _callee7);
|
|
}));
|
|
return function getData() {
|
|
return _ref8.apply(this, arguments);
|
|
};
|
|
}();
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
if (searchParams.get("state") && Number(searchParams.get("state")) == 0) {
|
|
setNotPass("end");
|
|
} else {
|
|
setNotPass("processing");
|
|
}
|
|
if (location.pathname.includes("teachers")) setTabType("teachers");else setTabType("students");
|
|
}, []);
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
getData();
|
|
}, [tabType, notPass, graduations === null || graduations === void 0 ? void 0 : graduations.updateIndex]);
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
className: Personmanagemodules.body,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomTabs */.YG, {
|
|
value: tabType,
|
|
tabBarExtraContent: /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(space/* default */.Z, {
|
|
children: (0,authority/* isGPAdminOrTeacher */.tu)() && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
children: [tabType != "teachers" && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
className: Personmanagemodules.AddBut,
|
|
onClick: function onClick() {
|
|
return setIsAddOpen(true);
|
|
},
|
|
children: "\u6DFB\u52A0\u5B66\u751F"
|
|
}), tabType == "teachers" && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
className: Personmanagemodules.AddBut,
|
|
onClick: function onClick() {
|
|
return setIsAddOpen(true);
|
|
},
|
|
children: "\u6DFB\u52A0\u6559\u5E08"
|
|
})]
|
|
})
|
|
})
|
|
}),
|
|
dataSource: [{
|
|
id: 'teachers',
|
|
name: "\u6559\u5E08"
|
|
}, {
|
|
id: 'students',
|
|
name: "\u5B66\u751F"
|
|
}],
|
|
onChange: function onChange(category) {
|
|
keywordRef.current = "";
|
|
setNotPass("processing");
|
|
_umi_production_exports.history.push("/graduations/".concat(params.id, "/").concat(category));
|
|
// setTabType(category)
|
|
setSelectedRowKeys([]);
|
|
}
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
wrap: false,
|
|
align: "middle",
|
|
justify: "space-between",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomTags */.qp, {
|
|
title: "\u72B6\u6001",
|
|
className: "mt20",
|
|
dataSource: tags,
|
|
titleWidth: 28,
|
|
value: notPass,
|
|
onChange: function onChange(value) {
|
|
teacherParams.page = 1;
|
|
setTeacherParams(teacherParams);
|
|
setNotPass(value);
|
|
setSelectedRowKeys([]);
|
|
}
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomInput */.t7, {
|
|
style: {
|
|
width: 210,
|
|
height: "38px"
|
|
},
|
|
placeholder: "".concat(tabType === "teachers" ? "教师姓名/工号" : "学生姓名/学号"),
|
|
value: keywordRef.current,
|
|
onChange: function onChange(value) {
|
|
teacherParams.page = 1;
|
|
setTeacherParams(teacherParams);
|
|
keywordRef.current = value;
|
|
getData();
|
|
}
|
|
})
|
|
})]
|
|
}), (selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length) > 0 && (0,authority/* isGPAdminOrTeacher */.tu)() && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Personmanagemodules.selectInfo,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: ["\u5DF2\u9009\u62E9 ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-blue",
|
|
children: selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length
|
|
}), " \u9879"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
children: [notPass === "processing" && /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
className: "c-red",
|
|
onClick: function onClick() {
|
|
modal/* default */.Z.confirm({
|
|
centered: true,
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "",
|
|
children: "\u8BF7\u786E\u8BA4\u662F\u5426\u8981\u6279\u91CF\u79FB\u9664\u5417\uFF1F"
|
|
}),
|
|
onOk: (0,lodash.throttle)( /*#__PURE__*/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 (tabType === "teachers" ? service_graduations/* deleteGraduationTeachers */.zT : service_graduations/* deleteGraduationStudents */.rU)(params.id, {
|
|
ids: toConsumableArray_default()(selectedRowKeys)
|
|
});
|
|
case 2:
|
|
res = _context8.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
message/* default */.ZP.warning("批量删除操作成功");
|
|
teacherParams.page = 1;
|
|
setTeacherParams(teacherParams);
|
|
setSelectedRowKeys([]);
|
|
getData();
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context8.stop();
|
|
}
|
|
}, _callee8);
|
|
})), 2000)
|
|
});
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "iconfont icon-shanchu12 mr8"
|
|
}), "\u6279\u91CF\u5220\u9664"]
|
|
}), notPass !== "processing" && /*#__PURE__*/(0,jsx_runtime.jsxs)(space/* default */.Z, {
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
className: "c-green-29b ml20",
|
|
onClick: function onClick() {
|
|
modal/* default */.Z.confirm({
|
|
centered: true,
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "",
|
|
children: "\u8BF7\u786E\u8BA4\u662F\u5426\u8981\u6279\u91CF\u901A\u8FC7\u5417\uFF1F"
|
|
}),
|
|
onOk: (0,lodash.throttle)( /*#__PURE__*/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 (tabType === "teachers" ? service_graduations/* postGraduationTeachersPass */.V1 : service_graduations/* postGraduationStudentsPass */.Fi)(params.id, {
|
|
ids: toConsumableArray_default()(selectedRowKeys)
|
|
});
|
|
case 2:
|
|
res = _context9.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
setSelectedRowKeys([]);
|
|
message/* default */.ZP.warning("批量通过操作成功");
|
|
getData();
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context9.stop();
|
|
}
|
|
}, _callee9);
|
|
})), 2000)
|
|
});
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "iconfont icon-tongguobeifen mr8 c-green-29b"
|
|
}), "\u6279\u91CF\u901A\u8FC7"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("a", {
|
|
className: "c-red ml20",
|
|
onClick: function onClick() {
|
|
modal/* default */.Z.confirm({
|
|
icon: null,
|
|
centered: true,
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: "",
|
|
children: "\u8BF7\u786E\u8BA4\u662F\u5426\u8981\u6279\u91CF\u9A73\u56DE\u5417\uFF1F"
|
|
}),
|
|
onOk: (0,lodash.throttle)( /*#__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 (tabType === "teachers" ? service_graduations/* postGraduationTeachersNotPass */.Ib : service_graduations/* postGraduationStudentsNotPass */.Zd)(params.id, {
|
|
ids: toConsumableArray_default()(selectedRowKeys)
|
|
});
|
|
case 2:
|
|
res = _context10.sent;
|
|
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
|
|
setSelectedRowKeys([]);
|
|
message/* default */.ZP.warning("批量驳回操作成功");
|
|
getData();
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context10.stop();
|
|
}
|
|
}, _callee10);
|
|
})), 2000)
|
|
});
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "iconfont icon-bohuibeifen mr8"
|
|
}), "\u6279\u91CF\u9A73\u56DE"]
|
|
})]
|
|
})]
|
|
})]
|
|
}), tabType === "teachers" && /*#__PURE__*/(0,jsx_runtime.jsxs)(skeleton/* default */.Z, {
|
|
loading: loading.effects["graduations/getGraduationsTeachers"],
|
|
avatar: true,
|
|
active: true,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
rowSelection: rowSelection,
|
|
style: {
|
|
minHeight: 500
|
|
},
|
|
locale: {
|
|
emptyText: /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {
|
|
customText: "暂时还没有相关数据哦!"
|
|
})
|
|
},
|
|
columns: columns,
|
|
dataSource: (graduations === null || graduations === void 0 || (_graduations$teachers3 = graduations.teachers) === null || _graduations$teachers3 === void 0 ? void 0 : _graduations$teachers3.data) || [],
|
|
pagination: false
|
|
}), (graduations === null || graduations === void 0 || (_graduations$teachers4 = graduations.teachers) === null || _graduations$teachers4 === void 0 ? void 0 : _graduations$teachers4.count) != 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
className: "mt20 mb20",
|
|
wrap: false,
|
|
align: "middle",
|
|
justify: "space-between",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
children: ["\u5171 ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-blue",
|
|
children: graduations === null || graduations === void 0 || (_graduations$teachers5 = graduations.teachers) === null || _graduations$teachers5 === void 0 ? void 0 : _graduations$teachers5.count
|
|
}), " \u6761\u6570\u636E"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
showQuickJumper: true,
|
|
showSizeChanger: true,
|
|
onShowSizeChange: function onShowSizeChange(current, pageSize) {
|
|
teacherParams.per_page = pageSize;
|
|
setTeacherParams(objectSpread2_default()({}, teacherParams));
|
|
getData();
|
|
},
|
|
current: teacherParams.page,
|
|
pageSize: teacherParams.per_page,
|
|
onChange: function onChange(value) {
|
|
teacherParams.page = value;
|
|
setTeacherParams(objectSpread2_default()({}, teacherParams));
|
|
getData();
|
|
},
|
|
total: graduations === null || graduations === void 0 || (_graduations$teachers6 = graduations.teachers) === null || _graduations$teachers6 === void 0 ? void 0 : _graduations$teachers6.count
|
|
})
|
|
})]
|
|
})]
|
|
}), tabType !== "teachers" && /*#__PURE__*/(0,jsx_runtime.jsxs)(skeleton/* default */.Z, {
|
|
loading: loading.effects["graduations/getGraduationsStudents"],
|
|
avatar: true,
|
|
active: true,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
rowSelection: rowSelection,
|
|
style: {
|
|
minHeight: 500
|
|
},
|
|
locale: {
|
|
emptyText: /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {
|
|
customText: "暂时还没有相关数据哦!"
|
|
})
|
|
},
|
|
columns: columnsStudents,
|
|
dataSource: (graduations === null || graduations === void 0 || (_graduations$students3 = graduations.students) === null || _graduations$students3 === void 0 ? void 0 : _graduations$students3.data) || [],
|
|
pagination: false
|
|
}), (graduations === null || graduations === void 0 || (_graduations$students4 = graduations.students) === null || _graduations$students4 === void 0 ? void 0 : _graduations$students4.count) != 0 && /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
className: "mt20 mb20",
|
|
wrap: false,
|
|
align: "middle",
|
|
justify: "space-between",
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
children: ["\u5171 ", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
className: "c-blue",
|
|
children: graduations === null || graduations === void 0 || (_graduations$students5 = graduations.students) === null || _graduations$students5 === void 0 ? void 0 : _graduations$students5.count
|
|
}), " \u6761\u6570\u636E"]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
|
|
showQuickJumper: true,
|
|
showSizeChanger: true,
|
|
current: teacherParams.page,
|
|
pageSize: teacherParams.per_page,
|
|
onShowSizeChange: function onShowSizeChange(current, pageSize) {
|
|
teacherParams.per_page = pageSize;
|
|
teacherParams.page = 1;
|
|
setTeacherParams(objectSpread2_default()({}, teacherParams));
|
|
getData();
|
|
},
|
|
onChange: function onChange(value) {
|
|
teacherParams.page = value;
|
|
setTeacherParams(objectSpread2_default()({}, teacherParams));
|
|
getData();
|
|
},
|
|
total: graduations === null || graduations === void 0 || (_graduations$students6 = graduations.students) === null || _graduations$students6 === void 0 ? void 0 : _graduations$students6.count
|
|
})
|
|
})]
|
|
})]
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
centered: true,
|
|
open: isEidtModal,
|
|
destroyOnClose: true,
|
|
title: "编辑学生",
|
|
onCancel: function onCancel() {
|
|
return setIsEidtModal(false);
|
|
},
|
|
onOk: function onOk() {
|
|
return form.submit();
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
className: "mt10",
|
|
layout: "vertical",
|
|
colon: false,
|
|
form: form,
|
|
initialValues: {},
|
|
size: "large",
|
|
onFinish: /*#__PURE__*/function () {
|
|
var _ref12 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee11(values) {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee11$(_context11) {
|
|
while (1) switch (_context11.prev = _context11.next) {
|
|
case 0:
|
|
_context11.next = 2;
|
|
return (0,service_graduations/* getAddGraduationsUpdateMajor */.Ot)(objectSpread2_default()({
|
|
identifier: params.id
|
|
}, values));
|
|
case 2:
|
|
res = _context11.sent;
|
|
if (res.status == 0) {
|
|
message/* default */.ZP.success("修改成功");
|
|
setIsEidtModal(false);
|
|
getData();
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context11.stop();
|
|
}
|
|
}, _callee11);
|
|
}));
|
|
return function (_x) {
|
|
return _ref12.apply(this, arguments);
|
|
};
|
|
}(),
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
htmlFor: null,
|
|
label: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
color: "#5F6368"
|
|
},
|
|
children: "\u4E13\u4E1A"
|
|
}),
|
|
name: "major",
|
|
rules: [{
|
|
required: true,
|
|
message: '请输入专业'
|
|
}, {
|
|
type: "string",
|
|
max: 60,
|
|
message: "输入超限,请缩减字符数"
|
|
}, {
|
|
type: "string",
|
|
whitespace: true,
|
|
message: "内容不能全为空格"
|
|
}],
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
showCount: true,
|
|
maxLength: 60,
|
|
size: "large"
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
hidden: true,
|
|
name: "id",
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {})
|
|
})]
|
|
})
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Addperson/* default */.Z, {
|
|
open: isAddOpen,
|
|
onCancel: function onCancel() {
|
|
return setIsAddOpen(false);
|
|
},
|
|
title: tabType === "teachers" ? "添加老师" : "添加学生",
|
|
OnOk: /*#__PURE__*/function () {
|
|
var _ref13 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee12(ids) {
|
|
var res;
|
|
return regeneratorRuntime_default()().wrap(function _callee12$(_context12) {
|
|
while (1) switch (_context12.prev = _context12.next) {
|
|
case 0:
|
|
_context12.next = 2;
|
|
return (tabType == "teachers" ? service_graduations/* getAddGraduationsTeachers */.HF : service_graduations/* getAddGraduationsStudents */.NX)({
|
|
id: params.id,
|
|
user_ids: ids
|
|
});
|
|
case 2:
|
|
res = _context12.sent;
|
|
if (res.status == 0) {
|
|
message/* default */.ZP.success("添加成功");
|
|
setIsAddOpen(false);
|
|
dispatch({
|
|
type: 'graduations/getGraduationsDetails',
|
|
payload: {
|
|
id: params === null || params === void 0 ? void 0 : params.id
|
|
}
|
|
});
|
|
getData();
|
|
}
|
|
case 4:
|
|
case "end":
|
|
return _context12.stop();
|
|
}
|
|
}, _callee12);
|
|
}));
|
|
return function (_x2) {
|
|
return _ref13.apply(this, arguments);
|
|
};
|
|
}()
|
|
})]
|
|
});
|
|
};
|
|
/* harmony default export */ var Personmanage = ((0,_umi_production_exports.connect)(function (_ref14) {
|
|
var graduations = _ref14.graduations,
|
|
loading = _ref14.loading;
|
|
return {
|
|
graduations: graduations,
|
|
loading: loading
|
|
};
|
|
})(Page));
|
|
|
|
/***/ })
|
|
|
|
}]); |