|
|
"use strict";
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[57345],{
|
|
|
|
|
|
/***/ 62772:
|
|
|
/*!******************************************************************************************************!*\
|
|
|
!*** ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/PlusOutlined.js + 1 modules ***!
|
|
|
\******************************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ icons_PlusOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.28.6@@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(60499);
|
|
|
// 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/PlusOutlined.js
|
|
|
// This icon file is generated automatically.
|
|
|
var PlusOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { "tag": "path", "attrs": { "d": "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z" } }] }, "name": "plus", "theme": "outlined" };
|
|
|
/* harmony default export */ var asn_PlusOutlined = (PlusOutlined);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
|
var AntdIcon = __webpack_require__(7657);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/PlusOutlined.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var PlusOutlined_PlusOutlined = function PlusOutlined(props, ref) {
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
ref: ref,
|
|
|
icon: asn_PlusOutlined
|
|
|
}));
|
|
|
};
|
|
|
|
|
|
/** */
|
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(PlusOutlined_PlusOutlined);
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_PlusOutlined = (RefIcon);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 32398:
|
|
|
/*!********************************************************************************************************!*\
|
|
|
!*** ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/ReloadOutlined.js + 1 modules ***!
|
|
|
\********************************************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ icons_ReloadOutlined; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.28.6@@babel/runtime/helpers/esm/extends.js
|
|
|
var esm_extends = __webpack_require__(60499);
|
|
|
// 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/ReloadOutlined.js
|
|
|
// This icon file is generated automatically.
|
|
|
var ReloadOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z" } }] }, "name": "reload", "theme": "outlined" };
|
|
|
/* harmony default export */ var asn_ReloadOutlined = (ReloadOutlined);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
|
var AntdIcon = __webpack_require__(7657);
|
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/ReloadOutlined.js
|
|
|
|
|
|
// GENERATE BY ./scripts/generate.ts
|
|
|
// DON NOT EDIT IT MANUALLY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ReloadOutlined_ReloadOutlined = function ReloadOutlined(props, ref) {
|
|
|
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
|
|
|
ref: ref,
|
|
|
icon: asn_ReloadOutlined
|
|
|
}));
|
|
|
};
|
|
|
|
|
|
/** */
|
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(ReloadOutlined_ReloadOutlined);
|
|
|
if (false) {}
|
|
|
/* harmony default export */ var icons_ReloadOutlined = (RefIcon);
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 53333:
|
|
|
/*!************************************************************!*\
|
|
|
!*** ./src/components/image-preview/index.tsx + 1 modules ***!
|
|
|
\************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ image_preview; }
|
|
|
});
|
|
|
|
|
|
// 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);
|
|
|
;// CONCATENATED MODULE: ./src/components/image-preview/index.less
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
|
// EXTERNAL MODULE: ./src/components/mediator.js
|
|
|
var mediator = __webpack_require__(24750);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/ReloadOutlined.js + 1 modules
|
|
|
var ReloadOutlined = __webpack_require__(32398);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/DownloadOutlined.js + 1 modules
|
|
|
var DownloadOutlined = __webpack_require__(41464);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/CloseOutlined.js + 1 modules
|
|
|
var CloseOutlined = __webpack_require__(99267);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/components/image-preview/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var image_preview = (function () {
|
|
|
var _useState = (0,_react_17_0_2_react.useState)(''),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
url = _useState2[0],
|
|
|
setUrl = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(0),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
deg = _useState4[0],
|
|
|
setDeg = _useState4[1];
|
|
|
var saveUrl = (0,_react_17_0_2_react.useRef)('');
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
var unSub = mediator/* default */.Z.subscribe('preview-image', function (value) {
|
|
|
setUrl(value);
|
|
|
// window.document.body
|
|
|
// document.body.style.height='100%'
|
|
|
document.body.style.overflow = 'hidden';
|
|
|
});
|
|
|
return unSub;
|
|
|
}, []);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
document.addEventListener('keydown', onViewEscClose);
|
|
|
return function () {
|
|
|
document.removeEventListener('keydown', onViewEscClose);
|
|
|
};
|
|
|
}, []);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
saveUrl.current = url;
|
|
|
}, [url]);
|
|
|
function onViewEscClose(e) {
|
|
|
if (e.keyCode == 27 && saveUrl.current) {
|
|
|
onClose();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// https://data.educoder.net/api/attachments/1571649
|
|
|
function onClose() {
|
|
|
// document.body.style.height='100%'
|
|
|
document.body.style.overflow = 'auto';
|
|
|
setUrl('');
|
|
|
}
|
|
|
function onRotate() {
|
|
|
setDeg(deg + 90);
|
|
|
}
|
|
|
var maskRef = (0,_react_17_0_2_react.useRef)();
|
|
|
var previewWrapperRef = (0,_react_17_0_2_react.useRef)();
|
|
|
var handleMaskClick = function handleMaskClick(e) {
|
|
|
if (e.nativeEvent.target === maskRef.current || e.nativeEvent.target === previewWrapperRef.current) {
|
|
|
onClose();
|
|
|
}
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(_react_17_0_2_react.Fragment, {
|
|
|
children: !url ? null : /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "image-preview-container",
|
|
|
ref: maskRef,
|
|
|
onClick: handleMaskClick,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "button-group",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
|
onClick: onRotate,
|
|
|
children: ["\u65CB\u8F6C", /*#__PURE__*/(0,jsx_runtime.jsx)(ReloadOutlined/* default */.Z, {})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
|
href: url,
|
|
|
children: ["\u4E0B\u8F7D", /*#__PURE__*/(0,jsx_runtime.jsx)(DownloadOutlined/* default */.Z, {})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_button/* default */.ZP, {
|
|
|
onClick: onClose,
|
|
|
children: ["\u5173\u95ED", /*#__PURE__*/(0,jsx_runtime.jsx)(CloseOutlined/* default */.Z, {})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "preview-wrp-group",
|
|
|
ref: previewWrapperRef,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
className: "image-preview",
|
|
|
src: url,
|
|
|
alt: "\u9884\u89C8\u5927\u56FE",
|
|
|
style: {
|
|
|
transform: "rotate(".concat(deg, "deg)")
|
|
|
}
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
});
|
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 57345:
|
|
|
/*!**************************************************************!*\
|
|
|
!*** ./src/pages/Account/Profile/Edit/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 */ Profile_Edit; },
|
|
|
identityMap: function() { return /* binding */ identityMap; }
|
|
|
});
|
|
|
|
|
|
// 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/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/regeneratorRuntime.js
|
|
|
var regeneratorRuntime = __webpack_require__(7557);
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__(41498);
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(79800);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js
|
|
|
var objectWithoutProperties = __webpack_require__(39647);
|
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
|
var _umi_production_exports = __webpack_require__(25789);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/select/index.js
|
|
|
var es_select = __webpack_require__(57809);
|
|
|
// 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/form/index.js + 19 modules
|
|
|
var es_form = __webpack_require__(78241);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
|
var message = __webpack_require__(8591);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
var modal = __webpack_require__(43418);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/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/tooltip/index.js + 3 modules
|
|
|
var tooltip = __webpack_require__(6848);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/auto-complete/index.js
|
|
|
var auto_complete = __webpack_require__(88522);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/radio/index.js
|
|
|
var es_radio = __webpack_require__(69140);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/index.js
|
|
|
var upload = __webpack_require__(60028);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Account/Profile/Edit/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var Editmodules = ({"wrap":"wrap___isQuw","content":"content___Gh5i7","hint":"hint___dh6_r","title":"title___Txz11","titleWrap":"titleWrap___p75TL","formWrap":"formWrap___tyQRy","identityWrap":"identityWrap___RmEwo","schoolHintWrap":"schoolHintWrap___WnTDr","colorCDCDCD":"colorCDCDCD___Xq4Mx","color0152d9":"color0152d9___lAjmo","submitButton":"submitButton___LHi3i","submitButtondiv":"submitButtondiv___J6VbH","glow":"glow___jcndc","staffidInput":"staffidInput___M9rEi"});
|
|
|
// EXTERNAL MODULE: ./src/pages/Account/components/AppplySchoolModal/index.tsx + 1 modules
|
|
|
var AppplySchoolModal = __webpack_require__(8226);
|
|
|
// EXTERNAL MODULE: ./src/pages/Account/components/AppplyDepartmentModal/index.tsx + 1 modules
|
|
|
var AppplyDepartmentModal = __webpack_require__(50643);
|
|
|
// EXTERNAL MODULE: ./src/assets/images/AssistantCode3.jpeg
|
|
|
var AssistantCode3 = __webpack_require__(32637);
|
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
|
var util = __webpack_require__(20681);
|
|
|
// EXTERNAL MODULE: ./src/service/account.ts
|
|
|
var service_account = __webpack_require__(75779);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/LoadingOutlined.js + 1 modules
|
|
|
var LoadingOutlined = __webpack_require__(58617);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/PlusOutlined.js + 1 modules
|
|
|
var PlusOutlined = __webpack_require__(62772);
|
|
|
// EXTERNAL MODULE: ./src/components/image-preview/index.tsx + 1 modules
|
|
|
var image_preview = __webpack_require__(53333);
|
|
|
// EXTERNAL MODULE: ./src/components/mediator.js
|
|
|
var mediator = __webpack_require__(24750);
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
|
var env = __webpack_require__(14160);
|
|
|
// EXTERNAL MODULE: ./src/service/laboratory.ts
|
|
|
var laboratory = __webpack_require__(684);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Account/Profile/Edit/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["user", "account", "globalSetting", "shixunHomeworks", "loading", "dispatch"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Option = es_select["default"].Option;
|
|
|
var TextArea = input/* default */.Z.TextArea;
|
|
|
var identityMap = {
|
|
|
"teacher": "教员",
|
|
|
"student": "学员",
|
|
|
"professional": "编外人员"
|
|
|
};
|
|
|
var MAX_NAME_LENGTH = 20;
|
|
|
var MAX_NICKNAME_LENGTH = 20;
|
|
|
var Edit = function Edit(_ref) {
|
|
|
var _account$basicInfo3, _account$basicInfo8, _account$basicInfo9, _formValue$nickname, _form$getFieldValue, _schoolList$find3;
|
|
|
var user = _ref.user,
|
|
|
account = _ref.account,
|
|
|
globalSetting = _ref.globalSetting,
|
|
|
shixunHomeworks = _ref.shixunHomeworks,
|
|
|
loading = _ref.loading,
|
|
|
dispatch = _ref.dispatch,
|
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
|
form = _Form$useForm2[0];
|
|
|
var _useState = (0,_react_17_0_2_react.useState)({}),
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
formValue = _useState2[0],
|
|
|
setFormValue = _useState2[1];
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
schoolList = _useState4[0],
|
|
|
setSchoolList = _useState4[1];
|
|
|
var _useState5 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
filterSchoolList = _useState6[0],
|
|
|
setFilterSchoolList = _useState6[1];
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
departmentList = _useState8[0],
|
|
|
setDepartmentList = _useState8[1];
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
filterDepartmentList = _useState10[0],
|
|
|
setFilterDepartmentList = _useState10[1];
|
|
|
var _useState11 = (0,_react_17_0_2_react.useState)(true),
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
showRealName = _useState12[0],
|
|
|
setShowRealName = _useState12[1];
|
|
|
var _useState13 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
assistantVisible = _useState14[0],
|
|
|
setAssistantVisible = _useState14[1];
|
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(),
|
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
|
realName = _useState16[0],
|
|
|
setRealName = _useState16[1];
|
|
|
var _useState17 = (0,_react_17_0_2_react.useState)(null),
|
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
|
saveIdentity = _useState18[0],
|
|
|
setSaveIdentity = _useState18[1];
|
|
|
var _useState19 = (0,_react_17_0_2_react.useState)(true),
|
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
|
schoolLoading = _useState20[0],
|
|
|
setSchoolLoading = _useState20[1];
|
|
|
var _useState21 = (0,_react_17_0_2_react.useState)(),
|
|
|
_useState22 = slicedToArray_default()(_useState21, 2),
|
|
|
imageUrl = _useState22[0],
|
|
|
setimageUrl = _useState22[1];
|
|
|
var _useState23 = (0,_react_17_0_2_react.useState)(false),
|
|
|
_useState24 = slicedToArray_default()(_useState23, 2),
|
|
|
imgloading = _useState24[0],
|
|
|
setimgLoading = _useState24[1];
|
|
|
var _useState25 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState26 = slicedToArray_default()(_useState25, 2),
|
|
|
fileList = _useState26[0],
|
|
|
setFileList = _useState26[1];
|
|
|
var _useState27 = (0,_react_17_0_2_react.useState)('学号'),
|
|
|
_useState28 = slicedToArray_default()(_useState27, 2),
|
|
|
studentName = _useState28[0],
|
|
|
setStudentName = _useState28[1];
|
|
|
var _useState29 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState30 = slicedToArray_default()(_useState29, 2),
|
|
|
bigCadets = _useState30[0],
|
|
|
setBigCadets = _useState30[1];
|
|
|
var _useState31 = (0,_react_17_0_2_react.useState)([]),
|
|
|
_useState32 = slicedToArray_default()(_useState31, 2),
|
|
|
cadets = _useState32[0],
|
|
|
setCadets = _useState32[1];
|
|
|
var _account$basicInfo = account.basicInfo,
|
|
|
basicInfo = _account$basicInfo === void 0 ? {} : _account$basicInfo;
|
|
|
// 已职业认证的账户不能修改职业,学校/单位,院系/部门(true为disable)
|
|
|
var professionalFlag = basicInfo && basicInfo.professional_certification == "certified";
|
|
|
var toolTipProps = professionalFlag ? {
|
|
|
visible: false
|
|
|
} : {
|
|
|
visible: false
|
|
|
};
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
getSchoolOption();
|
|
|
}, []);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (basicInfo !== null && basicInfo !== void 0 && basicInfo.identity && (basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo.identity) === 'student' || !(basicInfo !== null && basicInfo !== void 0 && basicInfo.identity)) {
|
|
|
setStudentName('学号');
|
|
|
} else {
|
|
|
setStudentName('工号');
|
|
|
}
|
|
|
}, [account]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
var _account$basicInfo2;
|
|
|
var res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
_context.next = 2;
|
|
|
return getDepartmentOption((_account$basicInfo2 = account.basicInfo) === null || _account$basicInfo2 === void 0 ? void 0 : _account$basicInfo2.school_id);
|
|
|
case 2:
|
|
|
res = _context.sent;
|
|
|
setDepartmentList(res === null || res === void 0 ? void 0 : res.departments);
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}))();
|
|
|
}, [(_account$basicInfo3 = account.basicInfo) === null || _account$basicInfo3 === void 0 ? void 0 : _account$basicInfo3.school_id]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (basicInfo !== null && basicInfo !== void 0 && basicInfo.department_id) {
|
|
|
_get_big_cadets(basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo.department_id);
|
|
|
}
|
|
|
}, [basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo.department_id]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (basicInfo !== null && basicInfo !== void 0 && basicInfo.big_cadet_id) {
|
|
|
_get_cadets(basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo.big_cadet_id);
|
|
|
form.setFieldsValue({
|
|
|
cadet_id: null
|
|
|
});
|
|
|
}
|
|
|
}, [basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo.big_cadet_id]);
|
|
|
|
|
|
// 获取学员大队
|
|
|
var _get_big_cadets = function _get_big_cadets(department_id) {
|
|
|
(0,laboratory/* get_big_cadets */.i$)({
|
|
|
department_id: department_id
|
|
|
}).then(function (res) {
|
|
|
setBigCadets((res === null || res === void 0 ? void 0 : res.big_cadets) || []);
|
|
|
});
|
|
|
};
|
|
|
|
|
|
// 获取学员队
|
|
|
var _get_cadets = function _get_cadets(big_cadet_id) {
|
|
|
(0,laboratory/* get_cadets */.pI)({
|
|
|
big_cadet_id: big_cadet_id
|
|
|
}).then(function (res) {
|
|
|
setCadets((res === null || res === void 0 ? void 0 : res.cadets) || []);
|
|
|
});
|
|
|
};
|
|
|
var getSchoolOption = /*#__PURE__*/function () {
|
|
|
var _ref3 = 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:
|
|
|
setSchoolLoading(true);
|
|
|
_context2.next = 3;
|
|
|
return dispatch({
|
|
|
type: 'account/getSchoolOption'
|
|
|
});
|
|
|
case 3:
|
|
|
res = _context2.sent;
|
|
|
setSchoolLoading(false);
|
|
|
setSchoolList(res === null || res === void 0 ? void 0 : res.schools);
|
|
|
case 6:
|
|
|
case "end":
|
|
|
return _context2.stop();
|
|
|
}
|
|
|
}, _callee2);
|
|
|
}));
|
|
|
return function getSchoolOption() {
|
|
|
return _ref3.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var getDepartmentOption = function getDepartmentOption(schoolId) {
|
|
|
if (!schoolId) {
|
|
|
return;
|
|
|
}
|
|
|
return dispatch({
|
|
|
type: 'account/getDepartmentOption',
|
|
|
payload: {
|
|
|
id: schoolId
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
if (!account.basicInfo) {
|
|
|
return;
|
|
|
}
|
|
|
var basicInfo = account.basicInfo;
|
|
|
var formData = {
|
|
|
nickname: basicInfo.nickname,
|
|
|
name: basicInfo.show_realname ? basicInfo.name : (0,util/* getHiddenName */.YA)(basicInfo.name),
|
|
|
gender: basicInfo.gender,
|
|
|
city: [basicInfo.location, basicInfo.location_city],
|
|
|
identity: basicInfo.identity,
|
|
|
school: basicInfo.school_name,
|
|
|
department: basicInfo.department_name,
|
|
|
studentNo: basicInfo.student_id,
|
|
|
edu_entry_year: basicInfo.edu_entry_year,
|
|
|
edu_background: basicInfo.edu_background,
|
|
|
brief_introduction: basicInfo.brief_introduction,
|
|
|
jobTitle: basicInfo.identity == "teacher" ? basicInfo.technical_title : "教授",
|
|
|
manager: basicInfo.identity == "professional" ? basicInfo.technical_title : "企业管理者",
|
|
|
staff_id: basicInfo.staff_id,
|
|
|
big_cadet_id: basicInfo.big_cadet_id,
|
|
|
cadet_id: basicInfo.cadet_id,
|
|
|
military_rank: basicInfo.military_rank,
|
|
|
grade: basicInfo.grade,
|
|
|
semester: basicInfo.semester
|
|
|
// face_image:[{uid:'111',name:'111',url:basicInfo.face_image}]
|
|
|
};
|
|
|
if (basicInfo !== null && basicInfo !== void 0 && basicInfo.face_image) {
|
|
|
var _basicInfo$face_image;
|
|
|
setFileList([{
|
|
|
uid: '111',
|
|
|
name: '111',
|
|
|
url: env/* default */.Z.API_SERVER + basicInfo.face_image,
|
|
|
response: {
|
|
|
id: basicInfo === null || basicInfo === void 0 || (_basicInfo$face_image = basicInfo.face_image) === null || _basicInfo$face_image === void 0 || (_basicInfo$face_image = _basicInfo$face_image.split('/')) === null || _basicInfo$face_image === void 0 ? void 0 : _basicInfo$face_image[3]
|
|
|
}
|
|
|
}]);
|
|
|
}
|
|
|
setRealName(basicInfo.name);
|
|
|
setShowRealName(basicInfo.show_realname);
|
|
|
setSaveIdentity(basicInfo.identity);
|
|
|
form.setFieldsValue(formData);
|
|
|
setFormValue(formData);
|
|
|
}, [account.basicInfo]);
|
|
|
var handleApplySchool = function handleApplySchool() {
|
|
|
dispatch({
|
|
|
type: 'account/setActionTabs',
|
|
|
payload: {
|
|
|
key: 'Account-AppplySchool'
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
var handleApplyDepartment = function handleApplyDepartment() {
|
|
|
if (!schoolList.find(function (item) {
|
|
|
return item.name === formValue.school;
|
|
|
})) {
|
|
|
message/* default */.ZP.info('请先选择正确的单位或者学校!');
|
|
|
return;
|
|
|
}
|
|
|
dispatch({
|
|
|
type: 'account/setActionTabs',
|
|
|
payload: {
|
|
|
key: 'Account-AppplyDepartment'
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
var handleValuesChange = function handleValuesChange(changedValues) {
|
|
|
var _changedValues$nickna;
|
|
|
setFormValue(objectSpread2_default()({}, form.getFieldsValue()));
|
|
|
// if(!changedValues.nickname){
|
|
|
// form.setFieldsValue({ name: formValue.name });
|
|
|
// }
|
|
|
if ('school' in changedValues) {
|
|
|
setFilterSchoolList(schoolList.filter(function (item) {
|
|
|
return item.name.includes(changedValues.school);
|
|
|
}));
|
|
|
var findSchoolId = (schoolList.find(function (item) {
|
|
|
return item.name === changedValues.school;
|
|
|
}) || {}).id;
|
|
|
if (findSchoolId) {
|
|
|
handleSetDepartment(changedValues.school);
|
|
|
} else {
|
|
|
form.setFieldsValue({
|
|
|
department: ''
|
|
|
});
|
|
|
setFormValue(objectSpread2_default()(objectSpread2_default()({}, formValue), {
|
|
|
school: changedValues.school,
|
|
|
department: ''
|
|
|
}));
|
|
|
}
|
|
|
}
|
|
|
if ((changedValues === null || changedValues === void 0 || (_changedValues$nickna = changedValues.nickname) === null || _changedValues$nickna === void 0 ? void 0 : _changedValues$nickna.length) <= 0) {
|
|
|
setShowRealName(true);
|
|
|
form.setFieldsValue({
|
|
|
name: realName
|
|
|
});
|
|
|
}
|
|
|
if ('name' in changedValues) {
|
|
|
setRealName(changedValues.name);
|
|
|
}
|
|
|
if ('identity' in changedValues) {
|
|
|
form.setFieldsValue({
|
|
|
staff_id: ''
|
|
|
});
|
|
|
}
|
|
|
if ('department' in changedValues) {
|
|
|
form.setFieldsValue({
|
|
|
big_cadet_id: '',
|
|
|
cadet_id: ''
|
|
|
});
|
|
|
setFormValue(objectSpread2_default()(objectSpread2_default()({}, formValue), {
|
|
|
big_cadet_id: '',
|
|
|
cadet_id: ''
|
|
|
}));
|
|
|
setBigCadets([]);
|
|
|
setCadets([]);
|
|
|
departmentList.forEach(function (item) {
|
|
|
if (item.name === (changedValues === null || changedValues === void 0 ? void 0 : changedValues.department)) {
|
|
|
_get_big_cadets(item.id);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
if ('big_cadet_id' in changedValues) {
|
|
|
form.setFieldsValue({
|
|
|
cadet_id: ''
|
|
|
});
|
|
|
setFormValue(objectSpread2_default()(objectSpread2_default()({}, formValue), {
|
|
|
cadet_id: ''
|
|
|
}));
|
|
|
setCadets([]);
|
|
|
_get_cadets(changedValues === null || changedValues === void 0 ? void 0 : changedValues.big_cadet_id);
|
|
|
}
|
|
|
};
|
|
|
var handleSetShowRealName = function handleSetShowRealName() {
|
|
|
var nextRealNameStatus = !showRealName;
|
|
|
setShowRealName(nextRealNameStatus);
|
|
|
var nextName = nextRealNameStatus ? realName : (0,util/* getHiddenName */.YA)(realName);
|
|
|
form.setFieldsValue({
|
|
|
name: nextName
|
|
|
});
|
|
|
};
|
|
|
var handleSetDepartment = /*#__PURE__*/function () {
|
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(school, departmentName) {
|
|
|
var _schoolList$find, _res$departments;
|
|
|
var findSchoolId, res, name;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
case 0:
|
|
|
findSchoolId = (_schoolList$find = schoolList.find(function (item) {
|
|
|
return item.name === school;
|
|
|
})) === null || _schoolList$find === void 0 ? void 0 : _schoolList$find.id;
|
|
|
_context3.next = 3;
|
|
|
return getDepartmentOption(findSchoolId);
|
|
|
case 3:
|
|
|
_context3.t0 = _context3.sent;
|
|
|
if (_context3.t0) {
|
|
|
_context3.next = 6;
|
|
|
break;
|
|
|
}
|
|
|
_context3.t0 = {};
|
|
|
case 6:
|
|
|
res = _context3.t0;
|
|
|
setDepartmentList(res === null || res === void 0 ? void 0 : res.departments);
|
|
|
name = departmentName || (res === null || res === void 0 || (_res$departments = res.departments) === null || _res$departments === void 0 || (_res$departments = _res$departments[0]) === null || _res$departments === void 0 ? void 0 : _res$departments.name);
|
|
|
form.setFieldsValue({
|
|
|
department: name
|
|
|
});
|
|
|
setFormValue(objectSpread2_default()(objectSpread2_default()({}, formValue), {
|
|
|
school: school,
|
|
|
department: name
|
|
|
}));
|
|
|
case 11:
|
|
|
case "end":
|
|
|
return _context3.stop();
|
|
|
}
|
|
|
}, _callee3);
|
|
|
}));
|
|
|
return function handleSetDepartment(_x, _x2) {
|
|
|
return _ref4.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleSchoolSuccess = /*#__PURE__*/function () {
|
|
|
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(schoolName) {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
case 0:
|
|
|
_context4.next = 2;
|
|
|
return getSchoolOption();
|
|
|
case 2:
|
|
|
form.setFieldsValue({
|
|
|
school: schoolName,
|
|
|
department: ''
|
|
|
});
|
|
|
setFormValue(objectSpread2_default()(objectSpread2_default()({}, formValue), {
|
|
|
school: schoolName,
|
|
|
department: ''
|
|
|
}));
|
|
|
case 4:
|
|
|
case "end":
|
|
|
return _context4.stop();
|
|
|
}
|
|
|
}, _callee4);
|
|
|
}));
|
|
|
return function handleSchoolSuccess(_x3) {
|
|
|
return _ref5.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var handleCancelAuth = /*#__PURE__*/function () {
|
|
|
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6(isRealNameAuth) {
|
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
|
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
|
case 0:
|
|
|
modal/* default */.Z.confirm({
|
|
|
centered: true,
|
|
|
okText: '确定',
|
|
|
cancelText: '取消',
|
|
|
title: isRealNameAuth ? '您已通过实名认证,修改姓名需要撤销实名认证,是否确定撤销?' : '您已通过职业认证,修改信息需要撤销职业认证,是否确定撤销?',
|
|
|
onOk: function () {
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
|
|
|
var _user$userInfo, _user$userInfo2;
|
|
|
var res, _user$userInfo3;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
case 0:
|
|
|
if (!isRealNameAuth) {
|
|
|
_context5.next = 6;
|
|
|
break;
|
|
|
}
|
|
|
_context5.next = 3;
|
|
|
return (0,service_account/* cancelAuthentication */.RA)({
|
|
|
login: (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.login
|
|
|
});
|
|
|
case 3:
|
|
|
_context5.t0 = _context5.sent;
|
|
|
_context5.next = 9;
|
|
|
break;
|
|
|
case 6:
|
|
|
_context5.next = 8;
|
|
|
return (0,service_account/* cancelProfessionalCertification */.kN)({
|
|
|
login: (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.login
|
|
|
});
|
|
|
case 8:
|
|
|
_context5.t0 = _context5.sent;
|
|
|
case 9:
|
|
|
res = _context5.t0;
|
|
|
if (res) {
|
|
|
message/* default */.ZP.success(isRealNameAuth ? '撤销实名认证成功' : '撤销职业认证成功');
|
|
|
dispatch({
|
|
|
type: 'account/getBasicInfo',
|
|
|
payload: {
|
|
|
login: (_user$userInfo3 = user.userInfo) === null || _user$userInfo3 === void 0 ? void 0 : _user$userInfo3.login
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
case 11:
|
|
|
case "end":
|
|
|
return _context5.stop();
|
|
|
}
|
|
|
}, _callee5);
|
|
|
}));
|
|
|
function onOk() {
|
|
|
return _onOk.apply(this, arguments);
|
|
|
}
|
|
|
return onOk;
|
|
|
}()
|
|
|
});
|
|
|
case 1:
|
|
|
case "end":
|
|
|
return _context6.stop();
|
|
|
}
|
|
|
}, _callee6);
|
|
|
}));
|
|
|
return function handleCancelAuth(_x4) {
|
|
|
return _ref6.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var educationBackound = function educationBackound() {
|
|
|
var year = new Date().getFullYear();
|
|
|
return Array(31).fill({}).map(function (item, key) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: year - key,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: year - key
|
|
|
})
|
|
|
}, key);
|
|
|
});
|
|
|
};
|
|
|
var handleFinish = /*#__PURE__*/function () {
|
|
|
var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8(values) {
|
|
|
var _departmentList$find, _schoolList$find2;
|
|
|
var nickname, gender, identity, studentNo, jobTitle, manager, school, department, edu_background, edu_entry_year, brief_introduction, face_image, staff_id, big_cadet_id, cadet_id, military_rank, grade, semester, department_id, school_id, basicInfo, titls, professionalFlags, _account$basicInfo6, _fileList$2, res, _account$basicInfo7, _user$userInfo7;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
|
|
|
while (1) switch (_context8.prev = _context8.next) {
|
|
|
case 0:
|
|
|
nickname = values.nickname, gender = values.gender, identity = values.identity, studentNo = values.studentNo, jobTitle = values.jobTitle, manager = values.manager, school = values.school, department = values.department, edu_background = values.edu_background, edu_entry_year = values.edu_entry_year, brief_introduction = values.brief_introduction, face_image = values.face_image, staff_id = values.staff_id, big_cadet_id = values.big_cadet_id, cadet_id = values.cadet_id, military_rank = values.military_rank, grade = values.grade, semester = values.semester;
|
|
|
department_id = (_departmentList$find = departmentList.find(function (item) {
|
|
|
return item.name === department;
|
|
|
})) === null || _departmentList$find === void 0 ? void 0 : _departmentList$find.id;
|
|
|
school_id = (_schoolList$find2 = schoolList.find(function (item) {
|
|
|
return item.name === school;
|
|
|
})) === null || _schoolList$find2 === void 0 ? void 0 : _schoolList$find2.id;
|
|
|
basicInfo = account.basicInfo; //
|
|
|
// const [location, location_city] = city;
|
|
|
titls = [];
|
|
|
if (basicInfo.authentication != 'uncertified') {
|
|
|
//判断名称是不是修改了
|
|
|
if (realName != basicInfo.name) {
|
|
|
titls.push('姓名');
|
|
|
}
|
|
|
if (gender != basicInfo.gender) {
|
|
|
titls.push('性别');
|
|
|
}
|
|
|
}
|
|
|
professionalFlags = [];
|
|
|
if (professionalFlag) {
|
|
|
if (identity != basicInfo.identity) {
|
|
|
professionalFlags.push('职业');
|
|
|
} else {
|
|
|
if (formValue.identity === 'student') {
|
|
|
if (studentNo != basicInfo.student_id) {
|
|
|
professionalFlags.push('职业');
|
|
|
}
|
|
|
}
|
|
|
if (formValue.identity === 'teacher') {
|
|
|
if (jobTitle != basicInfo.technical_title) {
|
|
|
professionalFlags.push('职业');
|
|
|
}
|
|
|
}
|
|
|
if (formValue.identity === 'professional') {
|
|
|
if (manager != basicInfo.technical_title) {
|
|
|
professionalFlags.push('职业');
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (school != basicInfo.school_name) {
|
|
|
professionalFlags.push('学校/单位');
|
|
|
}
|
|
|
if (department != basicInfo.department_name) {
|
|
|
professionalFlags.push('院系/部门');
|
|
|
}
|
|
|
}
|
|
|
if (!(titls.length > 0 || professionalFlags.length > 0)) {
|
|
|
_context8.next = 12;
|
|
|
break;
|
|
|
}
|
|
|
modal/* default */.Z.confirm({
|
|
|
centered: true,
|
|
|
icon: null,
|
|
|
okText: '确定',
|
|
|
cancelText: '取消',
|
|
|
title: '提示',
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: "\u672C\u6B21\u4FEE\u6539\u6D89\u53CA".concat(titls.toString().replaceAll(',', '、')).concat(titls.length > 0 && professionalFlags.length > 0 ? '、' : '').concat(professionalFlags.toString().replaceAll(',', '、'), "\uFF0C\u9700\u8981\u91CD\u65B0\u8FDB\u884C").concat(titls.length > 0 ? '实名认证' : '').concat(titls.length > 0 && professionalFlags.length > 0 ? '和' : '').concat(professionalFlags.length > 0 ? '职业认证' : '', "\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u8FDB\u884C\u4FEE\u6539")
|
|
|
}),
|
|
|
onOk: function () {
|
|
|
var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
|
|
|
var _account$basicInfo4, _fileList$;
|
|
|
var _user$userInfo4, _user$userInfo5, res, _account$basicInfo5, _user$userInfo6;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
|
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
|
case 0:
|
|
|
if (!(titls.length > 0)) {
|
|
|
_context7.next = 3;
|
|
|
break;
|
|
|
}
|
|
|
_context7.next = 3;
|
|
|
return (0,service_account/* cancelAuthentication */.RA)({
|
|
|
login: (_user$userInfo4 = user.userInfo) === null || _user$userInfo4 === void 0 ? void 0 : _user$userInfo4.login
|
|
|
});
|
|
|
case 3:
|
|
|
if (!(professionalFlags.length > 0)) {
|
|
|
_context7.next = 6;
|
|
|
break;
|
|
|
}
|
|
|
_context7.next = 6;
|
|
|
return (0,service_account/* cancelProfessionalCertification */.kN)({
|
|
|
login: (_user$userInfo5 = user.userInfo) === null || _user$userInfo5 === void 0 ? void 0 : _user$userInfo5.login
|
|
|
});
|
|
|
case 6:
|
|
|
_context7.next = 8;
|
|
|
return dispatch({
|
|
|
type: 'account/updateAccount',
|
|
|
payload: {
|
|
|
id: (_account$basicInfo4 = account.basicInfo) === null || _account$basicInfo4 === void 0 ? void 0 : _account$basicInfo4.id,
|
|
|
department_id: department_id,
|
|
|
gender: gender,
|
|
|
identity: identity,
|
|
|
location: location,
|
|
|
// location_city,
|
|
|
name: realName,
|
|
|
nickname: nickname,
|
|
|
school_id: school_id,
|
|
|
edu_background: edu_background,
|
|
|
edu_entry_year: edu_entry_year,
|
|
|
show_realname: showRealName,
|
|
|
brief_introduction: brief_introduction,
|
|
|
student_id: identity === 'student' ? studentNo : null,
|
|
|
technical_title: jobTitle || manager,
|
|
|
face_image: fileList === null || fileList === void 0 || (_fileList$ = fileList[0]) === null || _fileList$ === void 0 || (_fileList$ = _fileList$.response) === null || _fileList$ === void 0 ? void 0 : _fileList$.id,
|
|
|
big_cadet_id: big_cadet_id,
|
|
|
cadet_id: cadet_id,
|
|
|
military_rank: military_rank,
|
|
|
grade: grade,
|
|
|
semester: semester
|
|
|
}
|
|
|
});
|
|
|
case 8:
|
|
|
res = _context7.sent;
|
|
|
if (!((res === null || res === void 0 ? void 0 : res.status) === -1)) {
|
|
|
_context7.next = 11;
|
|
|
break;
|
|
|
}
|
|
|
return _context7.abrupt("return");
|
|
|
case 11:
|
|
|
if (!res) {
|
|
|
_context7.next = 19;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.info('保存成功');
|
|
|
if (!((_account$basicInfo5 = account.basicInfo) !== null && _account$basicInfo5 !== void 0 && _account$basicInfo5.base_info_completed)) {
|
|
|
dispatch({
|
|
|
type: 'user/getUserInfo'
|
|
|
});
|
|
|
}
|
|
|
dispatch({
|
|
|
type: 'account/getBasicInfo',
|
|
|
payload: {
|
|
|
login: (_user$userInfo6 = user.userInfo) === null || _user$userInfo6 === void 0 ? void 0 : _user$userInfo6.login
|
|
|
}
|
|
|
});
|
|
|
if (!(identity !== saveIdentity && identity === 'teacher')) {
|
|
|
_context7.next = 17;
|
|
|
break;
|
|
|
}
|
|
|
return _context7.abrupt("return");
|
|
|
case 17:
|
|
|
if (localStorage.getItem('Noviceguide') === '0') {} else {
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {
|
|
|
key: '底部弹窗',
|
|
|
type: 4,
|
|
|
href: '/classrooms',
|
|
|
text: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: "OK\uFF0C\u63A5\u4E0B\u6765\uFF0C\u8BA9\u6211\u4EEC\u5F00\u59CB\u65B0\u5EFA\u3010\u6559\u5B66\u8BFE\u5802\u3011\uFF0C\u8BF7\u60A8\u627E\u5230\u95EA\u5149\u6846\u5E76\u70B9\u51FB \u201C\u6559\u5B66\u8BFE\u5802\u201D\u3002"
|
|
|
})
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
_umi_production_exports.history.push('/account/profile');
|
|
|
case 19:
|
|
|
case "end":
|
|
|
return _context7.stop();
|
|
|
}
|
|
|
}, _callee7);
|
|
|
}));
|
|
|
function onOk() {
|
|
|
return _onOk2.apply(this, arguments);
|
|
|
}
|
|
|
return onOk;
|
|
|
}()
|
|
|
});
|
|
|
_context8.next = 25;
|
|
|
break;
|
|
|
case 12:
|
|
|
_context8.next = 14;
|
|
|
return dispatch({
|
|
|
type: 'account/updateAccount',
|
|
|
payload: {
|
|
|
id: (_account$basicInfo6 = account.basicInfo) === null || _account$basicInfo6 === void 0 ? void 0 : _account$basicInfo6.id,
|
|
|
department_id: department_id,
|
|
|
gender: gender,
|
|
|
identity: identity,
|
|
|
location: location,
|
|
|
// location_city,
|
|
|
name: realName,
|
|
|
nickname: nickname,
|
|
|
school_id: school_id,
|
|
|
edu_background: edu_background,
|
|
|
edu_entry_year: edu_entry_year,
|
|
|
staff_id: staff_id,
|
|
|
show_realname: showRealName,
|
|
|
brief_introduction: brief_introduction,
|
|
|
student_id: identity === 'student' ? studentNo : null,
|
|
|
technical_title: jobTitle || manager,
|
|
|
face_image: fileList === null || fileList === void 0 || (_fileList$2 = fileList[0]) === null || _fileList$2 === void 0 || (_fileList$2 = _fileList$2.response) === null || _fileList$2 === void 0 ? void 0 : _fileList$2.id,
|
|
|
big_cadet_id: big_cadet_id,
|
|
|
cadet_id: cadet_id,
|
|
|
military_rank: military_rank,
|
|
|
grade: grade,
|
|
|
semester: semester
|
|
|
}
|
|
|
});
|
|
|
case 14:
|
|
|
res = _context8.sent;
|
|
|
if (!((res === null || res === void 0 ? void 0 : res.status) === -1)) {
|
|
|
_context8.next = 17;
|
|
|
break;
|
|
|
}
|
|
|
return _context8.abrupt("return");
|
|
|
case 17:
|
|
|
if (!res) {
|
|
|
_context8.next = 25;
|
|
|
break;
|
|
|
}
|
|
|
message/* default */.ZP.info('保存成功');
|
|
|
if (!((_account$basicInfo7 = account.basicInfo) !== null && _account$basicInfo7 !== void 0 && _account$basicInfo7.base_info_completed)) {
|
|
|
dispatch({
|
|
|
type: 'user/getUserInfo'
|
|
|
});
|
|
|
}
|
|
|
dispatch({
|
|
|
type: 'account/getBasicInfo',
|
|
|
payload: {
|
|
|
login: (_user$userInfo7 = user.userInfo) === null || _user$userInfo7 === void 0 ? void 0 : _user$userInfo7.login
|
|
|
}
|
|
|
});
|
|
|
if (!(identity !== saveIdentity && identity === 'teacher')) {
|
|
|
_context8.next = 23;
|
|
|
break;
|
|
|
}
|
|
|
return _context8.abrupt("return");
|
|
|
case 23:
|
|
|
if (localStorage.getItem('Noviceguide') === '0') {} else {
|
|
|
dispatch({
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
payload: {
|
|
|
key: '底部弹窗',
|
|
|
type: 4,
|
|
|
href: '/classrooms',
|
|
|
text: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: "OK\uFF0C\u63A5\u4E0B\u6765\uFF0C\u8BA9\u6211\u4EEC\u5F00\u59CB\u65B0\u5EFA\u3010\u6559\u5B66\u8BFE\u5802\u3011\uFF0C\u8BF7\u60A8\u627E\u5230\u95EA\u5149\u6846\u5E76\u70B9\u51FB \u201C\u6559\u5B66\u8BFE\u5802\u201D\u3002"
|
|
|
})
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
_umi_production_exports.history.push('/account/profile');
|
|
|
case 25:
|
|
|
case "end":
|
|
|
return _context8.stop();
|
|
|
}
|
|
|
}, _callee8);
|
|
|
}));
|
|
|
return function handleFinish(_x5) {
|
|
|
return _ref7.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
var modalSkip = function modalSkip() {
|
|
|
setAssistantVisible(false);
|
|
|
_umi_production_exports.history.push('/account/profile');
|
|
|
};
|
|
|
var uploadButton = /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [imgloading ? /*#__PURE__*/(0,jsx_runtime.jsx)(LoadingOutlined/* default */.Z, {}) : /*#__PURE__*/(0,jsx_runtime.jsx)(PlusOutlined/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
marginTop: 8
|
|
|
},
|
|
|
children: "\u4E0A\u4F20"
|
|
|
})]
|
|
|
});
|
|
|
var getBase64 = function getBase64(img, callback) {
|
|
|
var reader = new FileReader();
|
|
|
reader.addEventListener('load', function () {
|
|
|
return callback(reader.result);
|
|
|
});
|
|
|
reader.readAsDataURL(img);
|
|
|
};
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
className: Editmodules.wrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Editmodules.content,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Editmodules.titleWrap,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: Editmodules.title,
|
|
|
children: "\u57FA\u672C\u4FE1\u606F"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
|
form: form,
|
|
|
className: Editmodules.formWrap,
|
|
|
layout: "horizontal",
|
|
|
onValuesChange: handleValuesChange,
|
|
|
onFinish: handleFinish,
|
|
|
children: [
|
|
|
/*#__PURE__*/
|
|
|
// basicInfo.authentication == 'uncertified' ?
|
|
|
(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u59D3\u540D",
|
|
|
name: "name",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: "\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(MAX_NAME_LENGTH, "\u4E2A\u5B57\u7B26")
|
|
|
}, {
|
|
|
validator: util/* handleValidatorName */.HJ
|
|
|
}],
|
|
|
extra: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: formValue.nickname ? showRealName ? '显示:平台将显示您的真实姓名' : '隐藏:平台将显示你的昵称' : '填写昵称后可设置姓名进行隐藏(当进行姓名搜索时,会展示您的真实姓名)'
|
|
|
}),
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z
|
|
|
// size="large"
|
|
|
, {
|
|
|
style: {
|
|
|
height: 40
|
|
|
},
|
|
|
disabled: formValue.nickname ? !showRealName : false,
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D\uFF0C\u6700\u5927\u9650\u5236".concat(MAX_NAME_LENGTH, "\u4E2A\u5B57\u7B26"),
|
|
|
maxLength: MAX_NAME_LENGTH,
|
|
|
suffix: formValue.nickname ? /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
style: {
|
|
|
lineHeight: '26px'
|
|
|
},
|
|
|
className: "iconfont ".concat(showRealName ? 'icon-xianshi' : 'icon-yincang', " font18 ").concat(Editmodules.color0152d9),
|
|
|
onClick: handleSetShowRealName
|
|
|
}) : null
|
|
|
})
|
|
|
})
|
|
|
// :
|
|
|
// <Form.Item
|
|
|
// label="姓名"
|
|
|
|
|
|
// >
|
|
|
// <Tooltip title="已完成实名认证">
|
|
|
// <span className="mr5" onClick={() => { handleCancelAuth(true) }}>{showRealName ? getHiddenName(basicInfo.name) : basicInfo.name}</span>
|
|
|
// </Tooltip>
|
|
|
// <i className={`iconfont ${showRealName ? 'icon-xianshi' : 'icon-yincang'} font18 ${styles.color0152d9}`}
|
|
|
// onClick={handleSetShowRealName} />
|
|
|
// <span>{showRealName ? '(显示:平台将显示您的真实姓名)' : '(隐藏:平台将显示你的昵称)'}</span>
|
|
|
// </Form.Item>
|
|
|
, /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
gutter: [10, 0],
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, objectSpread2_default()(objectSpread2_default()({
|
|
|
placement: "bottom",
|
|
|
title: function title() {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: "\u5DF2\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u53EF\u5728", /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
href: "/account/certification",
|
|
|
className: "c-blue",
|
|
|
children: "\u8BA4\u8BC1\u4FE1\u606F"
|
|
|
}), "\u4E2D\u901A\u8FC7\u201C\u91CD\u65B0\u8BA4\u8BC1\u201D\u8FDB\u884C\u4FEE\u6539"]
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}, toolTipProps), {}, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u804C\u4E1A",
|
|
|
name: "identity",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请先选择职业'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
|
|
|
style: {
|
|
|
width: 160
|
|
|
},
|
|
|
size: "large",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: "teacher",
|
|
|
children: "\u6559\u5458"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: "student",
|
|
|
children: "\u5B66\u5458"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: "professional",
|
|
|
children: "\u7F16\u5916\u4EBA\u5458"
|
|
|
})]
|
|
|
})
|
|
|
})
|
|
|
}))
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
children: [formValue.identity === 'student' && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, objectSpread2_default()(objectSpread2_default()({
|
|
|
placement: "bottom",
|
|
|
title: function title() {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: "\u5DF2\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u53EF\u5728", /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
href: "/account/certification",
|
|
|
className: "c-blue",
|
|
|
children: "\u8BA4\u8BC1\u4FE1\u606F"
|
|
|
}), "\u4E2D\u901A\u8FC7\u201C\u91CD\u65B0\u8BA4\u8BC1\u201D\u8FDB\u884C\u4FEE\u6539"]
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}, toolTipProps), {}, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
initialValue: formValue.studentNo,
|
|
|
name: "studentNo",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请先输入学号'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
size: "large",
|
|
|
style: {
|
|
|
width: 200
|
|
|
},
|
|
|
type: "text",
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u5B66\u53F7"
|
|
|
})
|
|
|
})
|
|
|
})), formValue.identity === 'teacher' && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, objectSpread2_default()(objectSpread2_default()({
|
|
|
placement: "bottom",
|
|
|
title: function title() {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: "\u5DF2\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u53EF\u5728", /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
href: "/account/certification",
|
|
|
className: "c-blue",
|
|
|
children: "\u8BA4\u8BC1\u4FE1\u606F"
|
|
|
}), "\u4E2D\u901A\u8FC7\u201C\u91CD\u65B0\u8BA4\u8BC1\u201D\u8FDB\u884C\u4FEE\u6539"]
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}, toolTipProps), {}, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
initialValue: formValue.jobTitle,
|
|
|
name: "jobTitle",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请先选择职称'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
|
|
|
style: {
|
|
|
width: 200
|
|
|
},
|
|
|
size: "large",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: "\u6559\u6388",
|
|
|
children: "\u6559\u6388"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: "\u7814\u7A76\u5458",
|
|
|
children: "\u7814\u7A76\u5458"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: "\u526F\u6559\u6388",
|
|
|
children: "\u526F\u6559\u6388"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: "\u526F\u7814\u7A76\u5458",
|
|
|
children: "\u526F\u7814\u7A76\u5458"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: "\u8BB2\u5E08",
|
|
|
children: "\u8BB2\u5E08"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: "\u52A9\u7406\u7814\u7A76\u5458",
|
|
|
children: "\u52A9\u7406\u7814\u7A76\u5458"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: "\u52A9\u7406\u6559\u6388",
|
|
|
children: "\u52A9\u7406\u6559\u6388"
|
|
|
})]
|
|
|
})
|
|
|
})
|
|
|
})), formValue.identity === 'professional' && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, objectSpread2_default()(objectSpread2_default()({
|
|
|
placement: "bottom",
|
|
|
title: function title() {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: "\u5DF2\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u53EF\u5728", /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
href: "/account/certification",
|
|
|
className: "c-blue",
|
|
|
children: "\u8BA4\u8BC1\u4FE1\u606F"
|
|
|
}), "\u4E2D\u901A\u8FC7\u201C\u91CD\u65B0\u8BA4\u8BC1\u201D\u8FDB\u884C\u4FEE\u6539"]
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}, toolTipProps), {}, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
initialValue: formValue.manager,
|
|
|
name: "manager",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请先选择职称'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
|
|
|
style: {
|
|
|
width: 200
|
|
|
},
|
|
|
size: "large",
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: "\u4F01\u4E1A\u7BA1\u7406\u8005",
|
|
|
children: "\u4F01\u4E1A\u7BA1\u7406\u8005"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: "\u90E8\u95E8\u7BA1\u7406\u8005",
|
|
|
children: "\u90E8\u95E8\u7BA1\u7406\u8005"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: "\u9AD8\u7EA7\u5DE5\u7A0B\u5E08",
|
|
|
children: "\u9AD8\u7EA7\u5DE5\u7A0B\u5E08"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: "\u5DE5\u7A0B\u5E08",
|
|
|
children: "\u5DE5\u7A0B\u5E08"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: "\u52A9\u7406\u5DE5\u7A0B\u5E08",
|
|
|
children: "\u52A9\u7406\u5DE5\u7A0B\u5E08"
|
|
|
})]
|
|
|
})
|
|
|
})
|
|
|
}))]
|
|
|
}), (formValue.identity === 'teacher' || formValue.identity === 'professional') && /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
flex: 1,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u5DE5\u53F7",
|
|
|
name: "staff_id",
|
|
|
labelCol: {
|
|
|
span: 4
|
|
|
},
|
|
|
rules: [{
|
|
|
validator: function validator(rule, value) {
|
|
|
var chineseReg = /[\u4E00-\u9FA5]/g;
|
|
|
if (chineseReg.test(value)) {
|
|
|
return Promise.reject('请勿输入中文字符');
|
|
|
}
|
|
|
return Promise.resolve();
|
|
|
}
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
className: Editmodules.staffidInput,
|
|
|
suffix: " "
|
|
|
})
|
|
|
})
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, objectSpread2_default()(objectSpread2_default()({
|
|
|
placement: "bottom",
|
|
|
title: function title() {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: "\u5DF2\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u53EF\u5728", /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
href: "/account/certification",
|
|
|
className: "c-blue",
|
|
|
children: "\u8BA4\u8BC1\u4FE1\u606F"
|
|
|
}), "\u4E2D\u901A\u8FC7\u201C\u91CD\u65B0\u8BA4\u8BC1\u201D\u8FDB\u884C\u4FEE\u6539"]
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}, toolTipProps), {}, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u5B66\u6821/\u5355\u4F4D",
|
|
|
name: "school",
|
|
|
wrapperCol: {
|
|
|
span: 10
|
|
|
},
|
|
|
extra: !schoolLoading && formValue.school && !(schoolList !== null && schoolList !== void 0 && schoolList.find(function (item) {
|
|
|
return item.name === formValue.school;
|
|
|
})) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Editmodules.schoolHintWrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
className: Editmodules.colorCDCDCD,
|
|
|
children: ["\u672A\u627E\u5230\u5305\u542B\u201C", formValue.school, "\u201D\u7684\u9AD8\u6821\uFF0C"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "".concat(Editmodules.color0152d9, " current"),
|
|
|
onClick: handleApplySchool,
|
|
|
children: "\u7533\u8BF7\u65B0\u589E"
|
|
|
})]
|
|
|
}),
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请先选择学校/单位'
|
|
|
}, {
|
|
|
whitespace: true,
|
|
|
message: '请先选择学校/单位'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(auto_complete/* default */.Z, {
|
|
|
size: "large",
|
|
|
showSearch: true,
|
|
|
options: filterSchoolList === null || filterSchoolList === void 0 ? void 0 : filterSchoolList.map(function (item) {
|
|
|
return {
|
|
|
value: item.name
|
|
|
};
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
})), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, objectSpread2_default()(objectSpread2_default()({
|
|
|
placement: "bottom",
|
|
|
title: function title() {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: "\u5DF2\u63D0\u4EA4\u804C\u4E1A\u8BA4\u8BC1"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: ["\u53EF\u5728", /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
href: "/account/certification",
|
|
|
className: "c-blue",
|
|
|
children: "\u8BA4\u8BC1\u4FE1\u606F"
|
|
|
}), "\u4E2D\u901A\u8FC7\u201C\u91CD\u65B0\u8BA4\u8BC1\u201D\u8FDB\u884C\u4FEE\u6539"]
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
}, toolTipProps), {}, {
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u9662\u7CFB/\u90E8\u95E8",
|
|
|
name: "department",
|
|
|
wrapperCol: {
|
|
|
span: 10
|
|
|
},
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请先选择院系/部门'
|
|
|
}],
|
|
|
extra: !schoolLoading && formValue.department && !(departmentList !== null && departmentList !== void 0 && departmentList.find(function (item) {
|
|
|
return item.name === formValue.department;
|
|
|
})) && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: Editmodules.schoolHintWrap,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: Editmodules.colorCDCDCD,
|
|
|
children: formValue.department ? "\u672A\u627E\u5230\u5305\u542B\u201C".concat(formValue.department, "\u201D\u7684\u9AD8\u6821\uFF0C") : '未找到院系,'
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "".concat(Editmodules.color0152d9, " current"),
|
|
|
onClick: handleApplyDepartment,
|
|
|
children: "\u7533\u8BF7\u65B0\u589E"
|
|
|
})]
|
|
|
})
|
|
|
// rules={[{
|
|
|
// // required: true,
|
|
|
// message: '请先选择院系/部门'
|
|
|
// }]}
|
|
|
,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(auto_complete/* default */.Z, {
|
|
|
size: "large",
|
|
|
onChange: function onChange(value) {
|
|
|
setFilterDepartmentList(departmentList.filter(function (item) {
|
|
|
return item.name.includes(value);
|
|
|
}));
|
|
|
},
|
|
|
children: filterDepartmentList.map(function (item, key) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: item.name,
|
|
|
children: item.name
|
|
|
}, key);
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
})), formValue.identity === 'student' && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u5B66\u5458\u5927\u961F",
|
|
|
wrapperCol: {
|
|
|
span: 10
|
|
|
},
|
|
|
name: "big_cadet_id",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请先选择学员大队'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
|
placeholder: "\u8BF7\u9009\u62E9\u5B66\u5458\u5927\u961F",
|
|
|
size: "large",
|
|
|
children: bigCadets === null || bigCadets === void 0 ? void 0 : bigCadets.map(function (item, key) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: item.id,
|
|
|
children: item.name
|
|
|
}, key);
|
|
|
})
|
|
|
})
|
|
|
}), formValue.identity === 'student' && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u5B66\u5458\u961F",
|
|
|
wrapperCol: {
|
|
|
span: 10
|
|
|
},
|
|
|
name: "cadet_id",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请先选择学员队'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
|
placeholder: "\u8BF7\u9009\u62E9\u5B66\u5458\u961F",
|
|
|
size: "large",
|
|
|
children: cadets === null || cadets === void 0 ? void 0 : cadets.map(function (item, key) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: item.id,
|
|
|
children: item.name
|
|
|
}, key);
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u519B\u8854",
|
|
|
wrapperCol: {
|
|
|
span: 10
|
|
|
},
|
|
|
name: "military_rank",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
|
placeholder: "\u8BF7\u9009\u62E9\u519B\u8854",
|
|
|
size: "large",
|
|
|
children: account === null || account === void 0 || (_account$basicInfo8 = account.basicInfo) === null || _account$basicInfo8 === void 0 || (_account$basicInfo8 = _account$basicInfo8.military_ranks) === null || _account$basicInfo8 === void 0 ? void 0 : _account$basicInfo8.map(function (item, key) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: item.key,
|
|
|
children: item.value
|
|
|
}, key);
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u7B49\u7EA7",
|
|
|
wrapperCol: {
|
|
|
span: 10
|
|
|
},
|
|
|
name: "grade",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
|
placeholder: "\u8BF7\u9009\u62E9\u7B49\u7EA7",
|
|
|
size: "large",
|
|
|
children: account === null || account === void 0 || (_account$basicInfo9 = account.basicInfo) === null || _account$basicInfo9 === void 0 ? void 0 : _account$basicInfo9.grade_range.map(function (item, key) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: item,
|
|
|
children: item
|
|
|
}, key);
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u6635\u79F0",
|
|
|
name: "nickname",
|
|
|
rules: [{
|
|
|
// required: true,
|
|
|
message: '请输入您的昵称'
|
|
|
}, {
|
|
|
validator: util/* handleValidatorNickName */.G7
|
|
|
}],
|
|
|
validateTrigger: "onSubmit",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z
|
|
|
// size="large"
|
|
|
, {
|
|
|
style: {
|
|
|
height: 40
|
|
|
},
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u60A8\u7684\u6635\u79F0\uFF0C\u6700\u5927\u9650\u5236".concat(MAX_NICKNAME_LENGTH, "\u4E2A\u5B57\u7B26"),
|
|
|
maxLength: MAX_NICKNAME_LENGTH,
|
|
|
suffix: "".concat(((_formValue$nickname = formValue.nickname) === null || _formValue$nickname === void 0 ? void 0 : _formValue$nickname.length) || 0, "/").concat(MAX_NICKNAME_LENGTH)
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
labelCol: {
|
|
|
span: 3
|
|
|
},
|
|
|
wrapperCol: {
|
|
|
span: 4
|
|
|
},
|
|
|
label: "\u6027\u522B",
|
|
|
className: "mb0",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
name: "gender"
|
|
|
// rules={[{
|
|
|
// required: true,
|
|
|
// message: '请选择性别',
|
|
|
// }]}
|
|
|
,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
value: 0,
|
|
|
children: "\u7537"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
value: 1,
|
|
|
children: "\u5973"
|
|
|
})]
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u5165\u5B66\u5E74\u4EFD",
|
|
|
name: "edu_entry_year",
|
|
|
wrapperCol: {
|
|
|
span: 10
|
|
|
}
|
|
|
// rules={[{
|
|
|
// // required: true,
|
|
|
// message: "请选择入学年份"
|
|
|
// }]}
|
|
|
,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
|
placeholder: "\u8BF7\u9009\u62E9\u5165\u5B66\u5E74\u4EFD",
|
|
|
size: "large",
|
|
|
children: educationBackound()
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u5B66\u671F",
|
|
|
wrapperCol: {
|
|
|
span: 10
|
|
|
},
|
|
|
name: "semester",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
|
placeholder: "\u8BF7\u9009\u62E9\u5B66\u671F",
|
|
|
size: "large",
|
|
|
children: [{
|
|
|
name: '春季',
|
|
|
id: 1
|
|
|
}, {
|
|
|
name: '秋季',
|
|
|
id: 2
|
|
|
}].map(function (item, key) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: item.id,
|
|
|
children: item.name
|
|
|
}, key);
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u6700\u9AD8\u5B66\u5386",
|
|
|
wrapperCol: {
|
|
|
span: 10
|
|
|
},
|
|
|
name: "edu_background"
|
|
|
// rules={[{
|
|
|
// // required: true,
|
|
|
// message: "请选择最高学历"
|
|
|
// }]}
|
|
|
,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
|
|
|
placeholder: "\u8BF7\u9009\u62E9\u6700\u9AD8\u5B66\u5386",
|
|
|
size: "large",
|
|
|
children: util/* educationList */.jh.map(function (item, key) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Option, {
|
|
|
value: item.id,
|
|
|
children: item.name
|
|
|
}, key);
|
|
|
})
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
labelCol: {
|
|
|
span: 3
|
|
|
},
|
|
|
label: studentName === '学号' ? '班级' : '负责班级',
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: {
|
|
|
width: '100%',
|
|
|
display: 'flex',
|
|
|
flexWrap: 'wrap'
|
|
|
},
|
|
|
children: function () {
|
|
|
var style = {
|
|
|
background: '#FAFAFA',
|
|
|
borderRadius: '2px',
|
|
|
border: '1px solid #E1E1E1',
|
|
|
marginRight: '10px',
|
|
|
lineHeight: '28px',
|
|
|
padding: '0 10px 0 10px',
|
|
|
color: '#999999'
|
|
|
};
|
|
|
if ((basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo.student_group_name) === null || (basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo.student_group_name) === undefined || (basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo.student_group_name.length) === 0) {
|
|
|
if (studentName === '学号') {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: style,
|
|
|
children: "未分班"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
color: '#FA6400'
|
|
|
},
|
|
|
children: "\uFF08\u8BF7\u8054\u7CFB\u4E0A\u8BFE\u8001\u5E08\u6DFB\u52A0\u73ED\u7EA7\uFF09"
|
|
|
})]
|
|
|
});
|
|
|
}
|
|
|
return null;
|
|
|
} else if (Array.isArray(basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo.student_group_name)) {
|
|
|
var _basicInfo$student_gr;
|
|
|
//只有教员身份会返回数组
|
|
|
return basicInfo === null || basicInfo === void 0 || (_basicInfo$student_gr = basicInfo.student_group_name) === null || _basicInfo$student_gr === void 0 ? void 0 : _basicInfo$student_gr.map(function (res, index) {
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: style,
|
|
|
children: res
|
|
|
}, index);
|
|
|
});
|
|
|
} else {
|
|
|
return studentName === '学号' ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
style: style,
|
|
|
children: basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo.student_group_name
|
|
|
}) : null;
|
|
|
}
|
|
|
}()
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
display: 'flex'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u4E0A\u4F20\u8BC1\u4EF6\u7167",
|
|
|
wrapperCol: {
|
|
|
span: 10
|
|
|
},
|
|
|
name: "face_image",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(upload/* default */.Z, {
|
|
|
listType: "picture-card",
|
|
|
withCredentials: true,
|
|
|
className: "avatar-uploader",
|
|
|
fileList: fileList,
|
|
|
onPreview: function onPreview(file) {
|
|
|
mediator/* default */.Z.publish('preview-image', file.thumbUrl || file.url);
|
|
|
},
|
|
|
action: "".concat(env/* default */.Z.API_SERVER, "/api/attachments.json"),
|
|
|
beforeUpload: function beforeUpload(file) {
|
|
|
var isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
|
|
|
if (!isJpgOrPng) {
|
|
|
message/* default */.ZP.error('您上传的不是JPG/PNG类型文件');
|
|
|
return Promise.reject();
|
|
|
}
|
|
|
var isLt2M = file.size / 1024 / 1024 < 1;
|
|
|
if (!isLt2M) {
|
|
|
message/* default */.ZP.error('文件不能大于1MB');
|
|
|
return Promise.reject();
|
|
|
}
|
|
|
return isJpgOrPng && isLt2M;
|
|
|
},
|
|
|
onChange: function onChange(info) {
|
|
|
setFileList(toConsumableArray_default()(info.fileList));
|
|
|
},
|
|
|
children: (fileList === null || fileList === void 0 ? void 0 : fileList.length) > 0 ? null : uploadButton
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
marginLeft: 16,
|
|
|
color: '#666666',
|
|
|
display: 'flex',
|
|
|
flexDirection: 'column',
|
|
|
marginTop: 5
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "\u8981\u6C42\uFF1A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "1.\u5B66\u5458\u7167\u7247\u5FC5\u987B\u4E3A\u9AD8\u6E05\u7684\u4EBA\u8138\u7167"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "2.\u6309\u7167 \u59D3\u540D-\u5B66\u53F7 \u7684\u65B9\u5F0F\u6765\u547D\u540D\u7167\u7247"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
children: "3.\u56FE\u7247\u5927\u5C0F\u57281MB\u4EE5\u5185"
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
position: 'relative'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u7B80\u4ECB",
|
|
|
name: "brief_introduction"
|
|
|
// wrapperCol={{ span: 20 }}
|
|
|
,
|
|
|
rules: [{
|
|
|
required: false
|
|
|
// message: ""
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
|
|
|
maxLength: 500,
|
|
|
rows: 6
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
position: 'absolute',
|
|
|
bottom: 10,
|
|
|
right: 10
|
|
|
},
|
|
|
children: [(_form$getFieldValue = form.getFieldValue('brief_introduction')) === null || _form$getFieldValue === void 0 ? void 0 : _form$getFieldValue.length, "/500"]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z.Item, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
className: "".concat(shixunHomeworks.actionTabs.type === 2 ? Editmodules.submitButtondiv : Editmodules.submitButton, " ml100"),
|
|
|
size: 'middle',
|
|
|
type: "primary",
|
|
|
htmlType: "submit",
|
|
|
loading: loading['account/editAccount'],
|
|
|
children: "\u4FDD\u5B58"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
className: Editmodules.submitButton,
|
|
|
size: 'middle',
|
|
|
onClick: function onClick() {
|
|
|
return _umi_production_exports.history.push('/account/profile');
|
|
|
},
|
|
|
children: "\u53D6\u6D88"
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: "".concat(Editmodules.hint, " font14"),
|
|
|
children: "* \u6211\u4EEC\u786E\u4FDD\u4F60\u6240\u63D0\u4F9B\u7684\u4FE1\u606F\u5747\u5904\u4E8E\u4E25\u683C\u4FDD\u5BC6\u72B6\u6001\uFF0C\u4E0D\u4F1A\u6CC4\u9732"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(AppplySchoolModal/* default */.Z, {
|
|
|
visible: account.actionTabs.key === 'Account-AppplySchool',
|
|
|
onClose: function onClose() {
|
|
|
dispatch({
|
|
|
type: 'account/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
},
|
|
|
schoolName: formValue.school,
|
|
|
onSuccess: handleSchoolSuccess
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(AppplyDepartmentModal/* default */.Z, {
|
|
|
visible: account.actionTabs.key === 'Account-AppplyDepartment',
|
|
|
onClose: function onClose() {
|
|
|
dispatch({
|
|
|
type: 'account/setActionTabs',
|
|
|
payload: {}
|
|
|
});
|
|
|
},
|
|
|
schoolId: (_schoolList$find3 = schoolList.find(function (item) {
|
|
|
return item.name === formValue.school;
|
|
|
})) === null || _schoolList$find3 === void 0 ? void 0 : _schoolList$find3.id,
|
|
|
schoolName: formValue.school,
|
|
|
departmentName: formValue.department,
|
|
|
onSuccess: function onSuccess(departmentName) {
|
|
|
return handleSetDepartment(formValue.school, departmentName);
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
|
centered: true,
|
|
|
destroyOnClose: true,
|
|
|
open: assistantVisible,
|
|
|
title: "\u5934\u6B4C\u6559\u5458\u4EA4\u6D41\u793E\u533A",
|
|
|
width: 648,
|
|
|
onCancel: modalSkip,
|
|
|
onOk: modalSkip,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
style: {
|
|
|
display: 'flex',
|
|
|
flexDirection: 'column',
|
|
|
alignItems: 'center'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
style: {
|
|
|
padding: '8px 70px'
|
|
|
},
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
style: {
|
|
|
letterSpacing: 1
|
|
|
},
|
|
|
children: "\u57FA\u4E8E\u60A8\u6240\u5728\u9662\u6821\u4E0E\u5E73\u53F0\u6709\u6DF1\u5EA6\u5408\u4F5C\uFF0C\u6211\u4EEC\u7279\u610F\u4E3A\u60A8\u914D\u5907\u4E86\u5E73\u53F0\u76841\u5BF91\u52A9"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u6559\uFF0C\u60A8\u53EF\u4EE5\u626B\u63CF\u4E0B\u65B9\u4E8C\u7EF4\u7801\u6DFB\u52A0\u52A9\u7406\u5FAE\u4FE1\uFF0C\u6211\u4EEC\u5C067*24\u5C0F\u65F6\u4E3A\u60A8\u7B54\u7591\u89E3\u60D1\u3002"]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("img", {
|
|
|
src: AssistantCode3,
|
|
|
width: 162,
|
|
|
height: 162
|
|
|
})]
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(image_preview/* default */.Z, {})]
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var Profile_Edit = ((0,_umi_production_exports.connect)(function (_ref8) {
|
|
|
var user = _ref8.user,
|
|
|
account = _ref8.account,
|
|
|
loading = _ref8.loading,
|
|
|
globalSetting = _ref8.globalSetting,
|
|
|
shixunHomeworks = _ref8.shixunHomeworks;
|
|
|
return {
|
|
|
user: user,
|
|
|
account: account,
|
|
|
globalSetting: globalSetting,
|
|
|
loading: loading.effects,
|
|
|
shixunHomeworks: shixunHomeworks
|
|
|
};
|
|
|
})(Edit));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 50643:
|
|
|
/*!**********************************************************************************!*\
|
|
|
!*** ./src/pages/Account/components/AppplyDepartmentModal/index.tsx + 1 modules ***!
|
|
|
\**********************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ components_AppplyDepartmentModal; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
var regeneratorRuntime = __webpack_require__(7557);
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__(41498);
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(79800);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js
|
|
|
var objectWithoutProperties = __webpack_require__(39647);
|
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
|
var _umi_production_exports = __webpack_require__(25789);
|
|
|
// 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/form/index.js + 19 modules
|
|
|
var es_form = __webpack_require__(78241);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
|
var message = __webpack_require__(8591);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
var modal = __webpack_require__(43418);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Account/components/AppplyDepartmentModal/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var AppplyDepartmentModalmodules = ({"flexRow":"flexRow___QJsV8","flexColumn":"flexColumn___Otjag","formWrap":"formWrap___z8635","example":"example___rgoyo","footerWrap":"footerWrap___gNXP9"});
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Account/components/AppplyDepartmentModal/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["account", "globalSetting", "loading", "dispatch", "schoolName", "departmentName", "visible", "onClose", "onSuccess"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var TextArea = input/* default */.Z.TextArea;
|
|
|
var AppplyDepartmentModal = function AppplyDepartmentModal(_ref) {
|
|
|
var account = _ref.account,
|
|
|
globalSetting = _ref.globalSetting,
|
|
|
loading = _ref.loading,
|
|
|
dispatch = _ref.dispatch,
|
|
|
schoolName = _ref.schoolName,
|
|
|
departmentName = _ref.departmentName,
|
|
|
visible = _ref.visible,
|
|
|
_ref$onClose = _ref.onClose,
|
|
|
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
|
|
|
_ref$onSuccess = _ref.onSuccess,
|
|
|
onSuccess = _ref$onSuccess === void 0 ? function () {} : _ref$onSuccess,
|
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
|
form = _Form$useForm2[0];
|
|
|
var schoolId = (0,_react_17_0_2_react.useRef)();
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
schoolId.current = props.schoolId;
|
|
|
}, [props.schoolId]);
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
form.setFieldsValue({
|
|
|
department: departmentName
|
|
|
});
|
|
|
}, [departmentName]);
|
|
|
var handleFinish = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(values) {
|
|
|
var _ref3, department, remarks, res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
_ref3 = values || {}, department = _ref3.department, remarks = _ref3.remarks;
|
|
|
_context.next = 3;
|
|
|
return dispatch({
|
|
|
type: 'account/appplyDepartment',
|
|
|
payload: {
|
|
|
school_id: schoolId.current,
|
|
|
name: department,
|
|
|
remarks: remarks
|
|
|
}
|
|
|
});
|
|
|
case 3:
|
|
|
res = _context.sent;
|
|
|
onClose();
|
|
|
if (res) {
|
|
|
message/* default */.ZP.success("新增院系/部门成功!");
|
|
|
onSuccess(department);
|
|
|
}
|
|
|
case 6:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function handleFinish(_x) {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
|
centered: true,
|
|
|
keyboard: false,
|
|
|
closable: false,
|
|
|
destroyOnClose: true,
|
|
|
open: visible,
|
|
|
title: "\u7533\u8BF7\u6DFB\u52A0\u5B50\u5355\u4F4D\u540D\u79F0",
|
|
|
width: "600px",
|
|
|
footer: null,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
|
className: AppplyDepartmentModalmodules.formWrap,
|
|
|
form: form,
|
|
|
labelCol: {
|
|
|
span: 4
|
|
|
},
|
|
|
wrapperCol: {
|
|
|
span: 20
|
|
|
},
|
|
|
onFinish: handleFinish,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u5355\u4F4D\u540D\u79F0\uFF1A",
|
|
|
children: schoolName
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u90E8\u95E8\u540D\u79F0\uFF1A",
|
|
|
name: "department",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入部门或者学院名称'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u90E8\u95E8\u6216\u8005\u5B66\u9662\u540D\u79F0"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u8BF4\u660E\uFF1A",
|
|
|
name: "remarks",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
|
|
|
placeholder: "\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: AppplyDepartmentModalmodules.footerWrap,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z.Item, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
className: "mr5",
|
|
|
size: 'middle',
|
|
|
onClick: function onClick() {
|
|
|
onClose();
|
|
|
},
|
|
|
children: "\u53D6\u6D88"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
size: 'middle',
|
|
|
type: "primary",
|
|
|
htmlType: "submit",
|
|
|
loading: loading['account/appplyDepartment'],
|
|
|
children: "\u4FDD\u5B58"
|
|
|
})]
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var components_AppplyDepartmentModal = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
|
var account = _ref4.account,
|
|
|
loading = _ref4.loading,
|
|
|
globalSetting = _ref4.globalSetting;
|
|
|
return {
|
|
|
account: account,
|
|
|
globalSetting: globalSetting,
|
|
|
loading: loading.effects
|
|
|
};
|
|
|
})(AppplyDepartmentModal));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 8226:
|
|
|
/*!******************************************************************************!*\
|
|
|
!*** ./src/pages/Account/components/AppplySchoolModal/index.tsx + 1 modules ***!
|
|
|
\******************************************************************************/
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
Z: function() { return /* binding */ components_AppplySchoolModal; }
|
|
|
});
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
var regeneratorRuntime = __webpack_require__(7557);
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
|
|
|
var asyncToGenerator = __webpack_require__(41498);
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
|
|
|
var slicedToArray = __webpack_require__(79800);
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js
|
|
|
var objectWithoutProperties = __webpack_require__(39647);
|
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
|
|
|
var _umi_production_exports = __webpack_require__(25789);
|
|
|
// 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/form/index.js + 19 modules
|
|
|
var es_form = __webpack_require__(78241);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
|
var message = __webpack_require__(8591);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
var modal = __webpack_require__(43418);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/cascader/index.js + 18 modules
|
|
|
var cascader = __webpack_require__(19842);
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
|
|
|
var es_button = __webpack_require__(3113);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/CheckCircleFilled.js + 1 modules
|
|
|
var CheckCircleFilled = __webpack_require__(29679);
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.6.1@@ant-design/icons/es/icons/CloseCircleFilled.js + 1 modules
|
|
|
var CloseCircleFilled = __webpack_require__(19248);
|
|
|
// EXTERNAL MODULE: ./src/utils/cityData.ts
|
|
|
var cityData = __webpack_require__(84581);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Account/components/AppplySchoolModal/index.less?modules
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
/* harmony default export */ var AppplySchoolModalmodules = ({"flexRow":"flexRow___qRWfN","flexColumn":"flexColumn___qUHfF","formWrap":"formWrap___kSgvX","example":"example___D0a_H","footerWrap":"footerWrap___kTeYf"});
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
;// CONCATENATED MODULE: ./src/pages/Account/components/AppplySchoolModal/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _excluded = ["account", "globalSetting", "loading", "dispatch", "schoolName", "visible", "onClose", "onSuccess"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var filter = function filter(inputValue, path) {
|
|
|
return path.some(function (option) {
|
|
|
return option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1;
|
|
|
});
|
|
|
};
|
|
|
var TextArea = input/* default */.Z.TextArea;
|
|
|
var AppplySchoolModal = function AppplySchoolModal(_ref) {
|
|
|
var account = _ref.account,
|
|
|
globalSetting = _ref.globalSetting,
|
|
|
loading = _ref.loading,
|
|
|
dispatch = _ref.dispatch,
|
|
|
schoolName = _ref.schoolName,
|
|
|
visible = _ref.visible,
|
|
|
_ref$onClose = _ref.onClose,
|
|
|
onClose = _ref$onClose === void 0 ? function () {} : _ref$onClose,
|
|
|
_ref$onSuccess = _ref.onSuccess,
|
|
|
onSuccess = _ref$onSuccess === void 0 ? function () {} : _ref$onSuccess,
|
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
|
var _Form$useForm = es_form/* default */.Z.useForm(),
|
|
|
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
|
|
|
form = _Form$useForm2[0];
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
form.setFieldsValue({
|
|
|
name: schoolName
|
|
|
});
|
|
|
}, [schoolName]);
|
|
|
var handleFinish = /*#__PURE__*/function () {
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(values) {
|
|
|
var _ref3, name, _ref3$city, city, address, remarks, res;
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
case 0:
|
|
|
_ref3 = values || {}, name = _ref3.name, _ref3$city = _ref3.city, city = _ref3$city === void 0 ? [] : _ref3$city, address = _ref3.address, remarks = _ref3.remarks;
|
|
|
_context.next = 3;
|
|
|
return dispatch({
|
|
|
type: 'account/appplySchool',
|
|
|
payload: {
|
|
|
name: name,
|
|
|
province: city[0],
|
|
|
city: city[1],
|
|
|
address: address,
|
|
|
remarks: remarks
|
|
|
}
|
|
|
});
|
|
|
case 3:
|
|
|
res = _context.sent;
|
|
|
onClose();
|
|
|
if (res) {
|
|
|
message/* default */.ZP.success("新增学校/单位成功!");
|
|
|
onSuccess(name);
|
|
|
}
|
|
|
case 6:
|
|
|
case "end":
|
|
|
return _context.stop();
|
|
|
}
|
|
|
}, _callee);
|
|
|
}));
|
|
|
return function handleFinish(_x) {
|
|
|
return _ref2.apply(this, arguments);
|
|
|
};
|
|
|
}();
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
|
centered: true,
|
|
|
keyboard: false,
|
|
|
closable: false,
|
|
|
destroyOnClose: true,
|
|
|
open: visible,
|
|
|
title: "\u7533\u8BF7\u6DFB\u52A0\u5355\u4F4D\u540D\u79F0",
|
|
|
width: "600px",
|
|
|
footer: null,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
|
className: AppplySchoolModalmodules.formWrap,
|
|
|
form: form,
|
|
|
labelCol: {
|
|
|
span: 4
|
|
|
},
|
|
|
wrapperCol: {
|
|
|
span: 20
|
|
|
},
|
|
|
onFinish: handleFinish,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u5355\u4F4D\u5168\u79F0\uFF1A",
|
|
|
name: "name",
|
|
|
rules: [{
|
|
|
required: true,
|
|
|
message: '请输入学校或工作单位'
|
|
|
}],
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
placeholder: "\u5B66\u6821\u6216\u5DE5\u4F5C\u5355\u4F4D"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: "".concat(AppplySchoolModalmodules.flexRow, " ").concat(AppplySchoolModalmodules.example),
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
children: "\u793A\u4F8B\uFF1A"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
className: AppplySchoolModalmodules.flexColumn,
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(CheckCircleFilled/* default */.Z, {
|
|
|
style: {
|
|
|
color: "rgb(82, 196, 26)"
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "font14 ml5",
|
|
|
children: "\u6B63\u786E\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u6784"
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(CloseCircleFilled/* default */.Z, {
|
|
|
style: {
|
|
|
color: "red"
|
|
|
}
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
className: "font14 ml5",
|
|
|
children: "\u9519\u8BEF\u793A\u4F8B\uFF1A\u6570\u636E\u7ED3\u67842019\u6625"
|
|
|
})]
|
|
|
})]
|
|
|
})]
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u5730\u533A\uFF1A",
|
|
|
name: "city",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(cascader/* default */.Z, {
|
|
|
allowClear: true,
|
|
|
size: 'middle',
|
|
|
options: cityData/* CityData */.P,
|
|
|
placeholder: "\u8BF7\u9009\u62E9\u6240\u5728\u5730",
|
|
|
showSearch: {
|
|
|
matchInputWidth: true,
|
|
|
filter: filter
|
|
|
}
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u8BE6\u7EC6\u5730\u5740\uFF1A",
|
|
|
name: "address",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
placeholder: "\u8BF7\u586B\u5199\u5B8C\u6574\u7684\u5730\u5740\u4FE1\u606F"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
label: "\u8BF4\u660E\uFF1A",
|
|
|
name: "remarks",
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea, {
|
|
|
placeholder: "\u518D\u6B21\u8BF4\u660E\u7279\u522B\u60C5\u51B5\uFF08\u9009\u586B\uFF09"
|
|
|
})
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
className: AppplySchoolModalmodules.footerWrap,
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z.Item, {
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
className: "mr5",
|
|
|
size: 'middle',
|
|
|
onClick: function onClick() {
|
|
|
onClose();
|
|
|
},
|
|
|
children: "\u53D6\u6D88"
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
|
|
|
size: 'middle',
|
|
|
type: "primary",
|
|
|
htmlType: "submit",
|
|
|
loading: loading['account/appplySchool'],
|
|
|
children: "\u4FDD\u5B58"
|
|
|
})]
|
|
|
})
|
|
|
})]
|
|
|
})
|
|
|
});
|
|
|
};
|
|
|
/* harmony default export */ var components_AppplySchoolModal = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
|
var account = _ref4.account,
|
|
|
loading = _ref4.loading,
|
|
|
globalSetting = _ref4.globalSetting;
|
|
|
return {
|
|
|
account: account,
|
|
|
globalSetting: globalSetting,
|
|
|
loading: loading.effects
|
|
|
};
|
|
|
})(AppplySchoolModal));
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
/***/ 32637:
|
|
|
/*!***********************************************!*\
|
|
|
!*** ./src/assets/images/AssistantCode3.jpeg ***!
|
|
|
\***********************************************/
|
|
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
|
|
|
|
module.exports = __webpack_require__.p + "static/AssistantCode3.a8740efb.jpeg";
|
|
|
|
|
|
/***/ })
|
|
|
|
|
|
}]); |