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

682 lines
34 KiB

This file contains ambiguous Unicode characters!

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

"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[99589],{
/***/ 99589:
/*!**************************************************************!*\
!*** ./src/pages/Graduations/components/Addperson/index.tsx ***!
\**************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js */ 37205);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js */ 41498);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js */ 79800);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! umi */ 80184);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! antd */ 78241);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! antd */ 6848);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! antd */ 8591);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! antd */ 43418);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! antd */ 57809);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! antd */ 10249);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! antd */ 88522);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! antd */ 1710);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! moment */ 61186);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _components_NoData__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/components/NoData */ 46172);
/* harmony import */ var _service_graduations__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @/service/graduations */ 13071);
/* harmony import */ var _components_ui_customization__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @/components/ui-customization */ 7401);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
var Page = function Page(_ref) {
var StageSetting = _ref.graduations.StageSetting,
_onCancel = _ref.onCancel,
OnOk = _ref.OnOk,
_ref$open = _ref.open,
open = _ref$open === void 0 ? false : _ref$open,
title = _ref.title,
dispatch = _ref.dispatch;
var params = (0,umi__WEBPACK_IMPORTED_MODULE_6__.useParams)();
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)([]),
_useState2 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState, 2),
options = _useState2[0],
setOptions = _useState2[1];
var _Form$useForm = antd__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z.useForm(),
_Form$useForm2 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_Form$useForm, 1),
form = _Form$useForm2[0];
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)({
school: "",
search: "",
search_type: 'name'
}),
_useState4 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState3, 2),
formValue = _useState4[0],
setFormValue = _useState4[1];
var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(true),
_useState6 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState5, 2),
hasMore = _useState6[0],
setHasmore = _useState6[1];
var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(false),
_useState8 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState7, 2),
isLoading = _useState8[0],
setIsLoading = _useState8[1];
var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(false),
_useState10 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState9, 2),
btnLoading = _useState10[0],
setBtnLoading = _useState10[1];
var _useState11 = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)([]),
_useState12 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState11, 2),
dataSource = _useState12[0],
setDataSource = _useState12[1];
var _useState13 = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(0),
_useState14 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState13, 2),
dataCount = _useState14[0],
setDataCount = _useState14[1];
var _useState15 = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(0),
_useState16 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState15, 2),
menuType = _useState16[0],
setmenuType = _useState16[1]; // 0:添加学生 1添加老师
var _useState17 = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(1),
_useState18 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState17, 2),
page = _useState18[0],
setPage = _useState18[1];
var _useState19 = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)([]),
_useState20 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState19, 2),
selectedRowKeys = _useState20[0],
setSelectedRowKeys = _useState20[1];
var _useState21 = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)(false),
_useState22 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_4___default()(_useState21, 2),
isSearch = _useState22[0],
setIsSearch = _useState22[1];
var usertable = (0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)(null);
(0,react__WEBPACK_IMPORTED_MODULE_5__.useEffect)(function () {
switch (title) {
case "添加学生":
setmenuType(0);
break;
case "添加老师":
setmenuType(1);
break;
default:
setmenuType(null);
}
}, [open]);
(0,react__WEBPACK_IMPORTED_MODULE_5__.useEffect)(function () {
!_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2___default()().mark(function _callee() {
var _res$schools;
var res;
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2___default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return (0,_service_graduations__WEBPACK_IMPORTED_MODULE_9__/* .getGraduationsSchoolSearch */ .xF)({
keyword: "",
per_page: 9999
});
case 2:
res = _context.sent;
setOptions(res === null || res === void 0 || (_res$schools = res.schools) === null || _res$schools === void 0 ? void 0 : _res$schools.map(function (item) {
return {
label: item.name,
value: item.id
};
}));
case 4:
case "end":
return _context.stop();
}
}, _callee);
}))();
}, []);
var columns = [{
title: "姓名",
width: 100,
ellipsis: true,
dataIndex: "name",
render: function render(text) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, {
placement: "topLeft",
title: text,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("span", {
style: {
color: "#000"
},
children: text || '--'
})
});
}
}, {
title: "学校/单位",
dataIndex: "school",
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, {
placement: "topLeft",
title: text,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("span", {
style: {
color: "#000"
},
children: text || '--'
})
});
}
}, {
title: "院系/部门",
dataIndex: "department",
width: 130,
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, {
placement: "topLeft",
title: text,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("span", {
style: {
color: "#000"
},
children: text || '--'
})
});
}
}, {
title: "学号/工号",
width: 100,
dataIndex: "student_number",
ellipsis: true,
render: function render(text, record) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, {
placement: "topLeft",
title: record.staff_id || record.student_id,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("span", {
className: "c-grey-666",
children: record.staff_id || record.student_id || '--'
})
});
}
}, {
title: "手机",
width: 110,
dataIndex: "phone",
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, {
placement: "topLeft",
title: text,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("span", {
className: "c-grey-666",
children: text || '--'
})
});
}
}, {
title: "邮箱",
dataIndex: "mail",
width: 120,
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, {
placement: "topLeft",
title: text,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("span", {
className: "c-grey-666",
children: text || '--'
})
});
}
}, {
title: "实名认证",
dataIndex: "authentication",
width: 80,
render: function render(text) {
return text ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("span", {
style: {
color: "#000"
},
children: "\u662F"
}) : "否";
}
}, {
title: "最后登录时间",
dataIndex: "last_login_on",
width: 140,
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, {
placement: "topLeft",
title: text,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("span", {
className: "c-grey-666",
children: moment__WEBPACK_IMPORTED_MODULE_7___default()(text).format("YYYY-MM-DD HH:mm")
})
});
}
}, {
title: "状态",
dataIndex: "checked",
width: 80,
render: function render(text) {
return text ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("span", {
className: "c-green",
children: "\u5DF2\u6DFB\u52A0"
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("span", {
className: "c-grey-333",
children: "\u672A\u6DFB\u52A0"
});
}
}];
var onFinish = /*#__PURE__*/function () {
var _ref3 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2___default()().mark(function _callee2(values) {
var _usertable$current;
var res, body;
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2___default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
usertable.current && ((_usertable$current = usertable.current) === null || _usertable$current === void 0 || (_usertable$current = _usertable$current.querySelector(".ant-table-body")) === null || _usertable$current === void 0 ? void 0 : _usertable$current.scrollTo(0, 0));
setIsSearch(true);
setSelectedRowKeys([]);
if (values.search || values.school) {
_context2.next = 6;
break;
}
antd__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .ZP.warning("请输入搜索内容");
return _context2.abrupt("return");
case 6:
setIsLoading(true);
setFormValue(values);
setPage(1);
body = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({
id: params.id
}, values);
if (!(menuType == 0)) {
_context2.next = 14;
break;
}
_context2.next = 13;
return (0,_service_graduations__WEBPACK_IMPORTED_MODULE_9__/* .getGraduationsStudentsSearch */ .l5)(body);
case 13:
res = _context2.sent;
case 14:
if (!(menuType == 1)) {
_context2.next = 18;
break;
}
_context2.next = 17;
return (0,_service_graduations__WEBPACK_IMPORTED_MODULE_9__/* .getGraduationsTeacherSearch */ .bS)(body);
case 17:
res = _context2.sent;
case 18:
if (res.status == 0) {
setDataSource(res.data);
setDataCount(res.count);
}
setIsLoading(false);
case 20:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function onFinish(_x) {
return _ref3.apply(this, arguments);
};
}();
var handleInfiniteOnLoad = /*#__PURE__*/function () {
var _ref4 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2___default()().mark(function _callee3() {
var _usertable$current2, _usertable$current3, _usertable$current4;
var reload,
scrollHeight,
offsetTop,
offsetHeight,
res,
body,
_res,
_args3 = arguments;
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2___default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
reload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : false;
scrollHeight = (_usertable$current2 = usertable.current) === null || _usertable$current2 === void 0 ? void 0 : _usertable$current2.querySelector(".ant-table-body").scrollHeight;
offsetTop = (_usertable$current3 = usertable.current) === null || _usertable$current3 === void 0 ? void 0 : _usertable$current3.querySelector(".ant-table-body").scrollTop;
offsetHeight = (_usertable$current4 = usertable.current) === null || _usertable$current4 === void 0 ? void 0 : _usertable$current4.querySelector(".ant-table-body").clientHeight;
if (!(scrollHeight == offsetTop + offsetHeight && hasMore && !isLoading)) {
_context3.next = 18;
break;
}
setIsLoading(true);
setPage(page + 1);
body = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({
page: page + 1,
id: params.id
}, formValue);
if (!(menuType == 0)) {
_context3.next = 12;
break;
}
_context3.next = 11;
return (0,_service_graduations__WEBPACK_IMPORTED_MODULE_9__/* .getGraduationsStudentsSearch */ .l5)(body);
case 11:
res = _context3.sent;
case 12:
if (!(menuType == 1)) {
_context3.next = 16;
break;
}
_context3.next = 15;
return (0,_service_graduations__WEBPACK_IMPORTED_MODULE_9__/* .getGraduationsTeacherSearch */ .bS)(body);
case 15:
res = _context3.sent;
case 16:
if (res.status == 0) {
if (((_res = res) === null || _res === void 0 || (_res = _res.data) === null || _res === void 0 ? void 0 : _res.length) + dataSource.length == res.count) setHasmore(false);
setDataSource([].concat(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_0___default()(dataSource), _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_toConsumableArray_js__WEBPACK_IMPORTED_MODULE_0___default()(res.data)));
setDataCount(res.count);
}
setIsLoading(false);
case 18:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return function handleInfiniteOnLoad() {
return _ref4.apply(this, arguments);
};
}();
var rowSelection = {
selectedRowKeys: selectedRowKeys,
onChange: function onChange(newSelectedRowKeys, selectedRows) {
setSelectedRowKeys(newSelectedRowKeys);
},
getCheckboxProps: function getCheckboxProps(record) {
return {
disabled: record.checked,
name: record.checked
};
}
};
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z, {
destroyOnClose: true,
width: 1200,
style: {
height: "613px"
},
open: open,
confirmLoading: btnLoading,
title: title,
bodyStyle: {
padding: "0px 25px"
},
onOk: /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_3___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2___default()().mark(function _callee4() {
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_2___default()().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
if (!(selectedRowKeys.length > 0)) {
_context4.next = 11;
break;
}
setBtnLoading(true);
_context4.next = 4;
return OnOk(selectedRowKeys);
case 4:
setBtnLoading(false);
form.resetFields();
setDataSource([]);
setIsSearch(false);
setSelectedRowKeys([]);
_context4.next = 12;
break;
case 11:
antd__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .ZP.warning("请选择添加人员");
case 12:
case "end":
return _context4.stop();
}
}, _callee4);
})),
onCancel: function onCancel() {
_onCancel();
form.resetFields();
setIsSearch(false);
setDataSource([]);
setSelectedRowKeys([]);
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, {
layout: "inline",
className: "mt10",
colon: false,
form: form,
initialValues: {
school: "",
search: "",
search_type: 'name'
},
onValuesChange: function onValuesChange(changedValues, allValues) {
return setFormValue(allValues);
},
size: "large",
onFinish: onFinish,
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z.Item, {
name: "search_type",
label: "\u641C\u7D22\u7C7B\u578B",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsxs)(antd__WEBPACK_IMPORTED_MODULE_16__["default"], {
style: {
width: 160
},
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_16__["default"].Option, {
value: "name",
children: "\u59D3\u540D"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_16__["default"].Option, {
value: "phone",
children: "\u624B\u673A\u53F7"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_16__["default"].Option, {
value: "mail",
children: "\u90AE\u7BB1"
})]
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z.Item, {
name: "search",
label: "\u641C\u7D22\u5185\u5BB9",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_17__/* ["default"] */ .Z, {
allowClear: true,
style: {
width: 320
},
placeholder: "\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",
defaultValue: ""
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z.Item, {
name: "school",
label: "\u5355\u4F4D",
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_18__/* ["default"] */ .Z, {
options: options,
style: {
width: 380
},
placeholder: "\u8BF7\u8F93\u5165\u5355\u4F4D\u540D\u79F0",
onSelect: function onSelect(_, v) {
console.log(_, v);
form.setFieldsValue({
school: v.label
});
},
filterOption: function filterOption(inputValue, option) {
return option.label.toUpperCase().indexOf(inputValue.toUpperCase()) !== -1;
}
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z.Item, {
noStyle: true,
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_components_ui_customization__WEBPACK_IMPORTED_MODULE_10__/* .CustomButton */ .op, {
onClick: function onClick() {
return form.submit();
},
size: "large",
shape: "default",
children: "\u641C\u7D22"
})
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)("div", {
onScrollCapture: function onScrollCapture() {
return handleInfiniteOnLoad();
},
children: isSearch ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(antd__WEBPACK_IMPORTED_MODULE_19__/* ["default"] */ .Z, {
className: "mt20",
loading: isLoading,
showHeader: dataSource.length > 0,
scroll: dataCount > 10 ? {
y: 450
} : {},
rowKey: "user_id",
rowSelection: rowSelection,
locale: {
emptyText: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_components_NoData__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, {
customText: "未找到符合条件的数据,请重新调整您的筛选条件。"
})
},
pagination: false,
dataSource: dataSource,
ref: usertable,
columns: columns
}) : /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__.jsx)(_components_NoData__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, {
customText: "请搜索要添加的人员"
})
})]
});
};
/* harmony default export */ __webpack_exports__.Z = ((0,umi__WEBPACK_IMPORTED_MODULE_6__.connect)(function (_ref6) {
var graduations = _ref6.graduations;
return {
graduations: graduations
};
})(Page));
/***/ }),
/***/ 88522:
/*!*****************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/auto-complete/index.js ***!
\*****************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 92310);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/Children/toArray */ 11592);
/* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rc-util/es/omit */ 2738);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _util_PurePanel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../_util/PurePanel */ 53487);
/* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../_util/reactNode */ 92343);
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../config-provider */ 36355);
/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../select */ 57809);
"use client";
const {
Option
} = _select__WEBPACK_IMPORTED_MODULE_3__["default"];
function isSelectOptionOrSelectOptGroup(child) {
return child && child.type && (child.type.isSelectOption || child.type.isSelectOptGroup);
}
const AutoComplete = (props, ref) => {
const {
prefixCls: customizePrefixCls,
className,
popupClassName,
dropdownClassName,
children,
dataSource
} = props;
const childNodes = (0,rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(children);
// ============================= Input =============================
let customizeInput;
if (childNodes.length === 1 && (0,_util_reactNode__WEBPACK_IMPORTED_MODULE_4__/* .isValidElement */ .l$)(childNodes[0]) && !isSelectOptionOrSelectOptGroup(childNodes[0])) {
[customizeInput] = childNodes;
}
const getInputElement = customizeInput ? () => customizeInput : undefined;
// ============================ Options ============================
let optionChildren;
// [Legacy] convert `children` or `dataSource` into option children
if (childNodes.length && isSelectOptionOrSelectOptGroup(childNodes[0])) {
optionChildren = children;
} else {
optionChildren = dataSource ? dataSource.map(item => {
if ((0,_util_reactNode__WEBPACK_IMPORTED_MODULE_4__/* .isValidElement */ .l$)(item)) {
return item;
}
switch (typeof item) {
case 'string':
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(Option, {
key: item,
value: item
}, item);
case 'object':
{
const {
value: optionValue
} = item;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(Option, {
key: optionValue,
value: optionValue
}, item.text);
}
default:
false ? 0 : void 0;
return undefined;
}
}) : [];
}
if (false) {}
const {
getPrefixCls
} = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_5__/* .ConfigContext */ .E_);
const prefixCls = getPrefixCls('select', customizePrefixCls);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(_select__WEBPACK_IMPORTED_MODULE_3__["default"], Object.assign({
ref: ref,
suffixIcon: null
}, (0,rc_util_es_omit__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(props, ['dataSource', 'dropdownClassName']), {
prefixCls: prefixCls,
popupClassName: popupClassName || dropdownClassName,
className: classnames__WEBPACK_IMPORTED_MODULE_0___default()(`${prefixCls}-auto-complete`, className),
mode: _select__WEBPACK_IMPORTED_MODULE_3__["default"].SECRET_COMBOBOX_MODE_DO_NOT_USE
}, {
// Internal api
getInputElement
}), optionChildren);
};
const RefAutoComplete = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.forwardRef(AutoComplete);
// We don't care debug panel
/* istanbul ignore next */
const PurePanel = (0,_util_PurePanel__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z)(RefAutoComplete);
RefAutoComplete.Option = Option;
RefAutoComplete._InternalPanelDoNotUseOrYouWillBeFired = PurePanel;
if (false) {}
/* harmony default export */ __webpack_exports__.Z = (RefAutoComplete);
/***/ })
}]);