"use strict"; (self["webpackChunk"] = self["webpackChunk"] || []).push([[29266],{ /***/ 378: /*!******************************************************************************************************!*\ !*** ./node_modules/_@ant-design_icons@5.2.6@@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.23.2@@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(26508); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js var _react_17_0_2_react = __webpack_require__(59301); ;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.3.1@@ant-design/icons-svg/es/asn/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.2.6@@ant-design/icons/es/components/AntdIcon.js + 3 modules var AntdIcon = __webpack_require__(91851); ;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/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 })); }; if (false) {} /* harmony default export */ var icons_PlusOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(PlusOutlined_PlusOutlined)); /***/ }), /***/ 78273: /*!************************************************************!*\ !*** ./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.2@@babel/runtime/helpers/slicedToArray.js var slicedToArray = __webpack_require__(11006); var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); // EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js var _react_17_0_2_react = __webpack_require__(59301); ;// CONCATENATED MODULE: ./src/components/image-preview/index.less // extracted by mini-css-extract-plugin // EXTERNAL MODULE: ./src/components/mediator.js var mediator = __webpack_require__(93914); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/image/index.js + 26 modules var es_image = __webpack_require__(89536); // 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 _useState5 = (0,_react_17_0_2_react.useState)(), _useState6 = slicedToArray_default()(_useState5, 2), width = _useState6[0], setwidth = _useState6[1]; var _useState7 = (0,_react_17_0_2_react.useState)(), _useState8 = slicedToArray_default()(_useState7, 2), height = _useState8[0], setheight = _useState8[1]; // const [movable, setmovable] = useState(false); var _useState9 = (0,_react_17_0_2_react.useState)(false), _useState10 = slicedToArray_default()(_useState9, 2), down = _useState10[0], setdown = _useState10[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%' console.log(imgref.current); 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'; setwidth(undefined); setheight(undefined); setDeg(0); setUrl(''); } function onRotate() { setDeg(deg + 90); } function big() { width = imgref.current.width * 1.1; height = imgref.current.height * 1.1; setheight(height); setwidth(width); } function small() { width = imgref.current.width / 1.1; height = imgref.current.height / 1.1; setheight(height); setwidth(width); } var maskRef = (0,_react_17_0_2_react.useRef)(); var previewWrapperRef = (0,_react_17_0_2_react.useRef)(); var imgref = (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.jsx)("div", { children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", { className: "preview-wrp-group", ref: previewWrapperRef, children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_image/* default */.Z, { className: "image-preview", src: url, style: { display: 'none' } // ref={imgref} , preview: { visible: true, src: url, movable: false, onVisibleChange: function onVisibleChange(value) { setUrl(''); } }, alt: "\u9884\u89C8\u5927\u56FE" }) }) }) }); }); /***/ }), /***/ 29266: /*!**************************************************************!*\ !*** ./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.2@@babel/runtime/helpers/toConsumableArray.js var toConsumableArray = __webpack_require__(93923); var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectSpread2.js var objectSpread2 = __webpack_require__(26801); var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/regeneratorRuntime.js var regeneratorRuntime = __webpack_require__(10574); var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/asyncToGenerator.js var asyncToGenerator = __webpack_require__(39343); var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/slicedToArray.js var slicedToArray = __webpack_require__(11006); var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray); // EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.2@@babel/runtime/helpers/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__(27161); 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 + 8 modules var _umi_production_exports = __webpack_require__(66660); // 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 + 5 modules var input = __webpack_require__(1056); // 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 es_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 + 5 modules var es_radio = __webpack_require__(5112); // EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/index.js + 24 modules var upload = __webpack_require__(6557); // 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__(1359); // EXTERNAL MODULE: ./src/components/AppplyDepartmentModal/index.tsx var AppplyDepartmentModal = __webpack_require__(9017); // EXTERNAL MODULE: ./src/pages/Account/Certification/components/ProfessionalAuthModal.tsx var ProfessionalAuthModal = __webpack_require__(93126); // EXTERNAL MODULE: ./src/assets/images/AssistantCode3.jpeg var AssistantCode3 = __webpack_require__(32637); // EXTERNAL MODULE: ./src/utils/util.tsx var util = __webpack_require__(27291); // EXTERNAL MODULE: ./src/service/account.ts var service_account = __webpack_require__(43971); // EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/LoadingOutlined.js + 1 modules var LoadingOutlined = __webpack_require__(38521); // EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.2.6@@ant-design/icons/es/icons/PlusOutlined.js + 1 modules var PlusOutlined = __webpack_require__(378); // EXTERNAL MODULE: ./src/components/image-preview/index.tsx + 1 modules var image_preview = __webpack_require__(78273); // EXTERNAL MODULE: ./src/components/mediator.js var mediator = __webpack_require__(93914); // EXTERNAL MODULE: ./src/utils/fetch.ts var fetch = __webpack_require__(97174); // EXTERNAL MODULE: ./src/utils/env.ts + 1 modules var env = __webpack_require__(47015); // 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, _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)(false), _useState16 = slicedToArray_default()(_useState15, 2), tipVisible = _useState16[0], settipVisible = _useState16[1]; var _useState17 = (0,_react_17_0_2_react.useState)(), _useState18 = slicedToArray_default()(_useState17, 2), realName = _useState18[0], setRealName = _useState18[1]; var _useState19 = (0,_react_17_0_2_react.useState)(null), _useState20 = slicedToArray_default()(_useState19, 2), saveIdentity = _useState20[0], setSaveIdentity = _useState20[1]; var _useState21 = (0,_react_17_0_2_react.useState)(true), _useState22 = slicedToArray_default()(_useState21, 2), schoolLoading = _useState22[0], setSchoolLoading = _useState22[1]; var _useState23 = (0,_react_17_0_2_react.useState)(), _useState24 = slicedToArray_default()(_useState23, 2), imageUrl = _useState24[0], setimageUrl = _useState24[1]; var _useState25 = (0,_react_17_0_2_react.useState)(false), _useState26 = slicedToArray_default()(_useState25, 2), imgloading = _useState26[0], setimgLoading = _useState26[1]; var _useState27 = (0,_react_17_0_2_react.useState)([]), _useState28 = slicedToArray_default()(_useState27, 2), fileList = _useState28[0], setFileList = _useState28[1]; var _useState29 = (0,_react_17_0_2_react.useState)(false), _useState30 = slicedToArray_default()(_useState29, 2), isshow = _useState30[0], setishow = _useState30[1]; var _useState31 = (0,_react_17_0_2_react.useState)(true), _useState32 = slicedToArray_default()(_useState31, 2), isfirst = _useState32[0], setisfirst = _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 (isfirst) { form.setFieldsValue({ studentNo: formValue.studentNo }); form.validateFields(['studentNo']); } }, [formValue.studentNo]); (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]); var getbgid = function getbgid(name) { var _educationList$find; return util/* educationList */.jh === null || util/* educationList */.jh === void 0 || (_educationList$find = util/* educationList */.jh.find(function (item) { return item.name === name; })) === null || _educationList$find === void 0 ? void 0 : _educationList$find.id; }; 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: getbgid(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 // 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: '' }); } }; 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: es_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, department_id, school_id, basicInfo, titls, professionalFlags, modal, _modal, _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; 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; console.log("B", values, 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 (school_id) { _context8.next = 12; break; } modal = es_modal/* default */.Z.confirm({ icon: null, width: 600, centered: true, okText: '新增', cancelText: '取消', title: '提示', content: /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, { children: /*#__PURE__*/(0,jsx_runtime.jsx)("p", { children: "\u7CFB\u7EDF\u672A\u627E\u5230\u60A8\u586B\u5199\u7684\u5B66\u6821/\u5355\u4F4D\uFF0C\u662F\u5426\u7533\u8BF7\u65B0\u589E\u8BE5\u5355\u4F4D\uFF1F" }) }), onOk: handleApplySchool, onCancel: function onCancel() { modal.destroy(); } }); return _context8.abrupt("return"); case 12: if (!(!!department && !department_id)) { _context8.next = 15; break; } _modal = es_modal/* default */.Z.confirm({ icon: null, width: 600, centered: true, okText: '新增', cancelText: '取消', title: '提示', content: /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, { children: /*#__PURE__*/(0,jsx_runtime.jsx)("p", { children: "\u7CFB\u7EDF\u672A\u627E\u5230\u60A8\u586B\u5199\u7684\u9662\u7CFB/\u90E8\u95E8\uFF0C\u662F\u5426\u7533\u8BF7\u65B0\u589E\u8BE5\u90E8\u95E8\uFF1F" }) }), onOk: handleApplyDepartment, onCancel: function onCancel() { _modal.destroy(); } }); return _context8.abrupt("return"); case 15: if (!(titls.length > 0 || professionalFlags.length > 0)) { _context8.next = 19; break; } es_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 } }); 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 = 20; 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 = 18; break; } setAssistantVisible(true); return _context7.abrupt("return"); case 18: 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 20: case "end": return _context7.stop(); } }, _callee7); })); function onOk() { return _onOk2.apply(this, arguments); } return onOk; }() }); _context8.next = 33; break; case 19: _context8.next = 21; 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 } }); case 21: res = _context8.sent; if (!((res === null || res === void 0 ? void 0 : res.status) === -1)) { _context8.next = 24; break; } return _context8.abrupt("return"); case 24: if (!res) { _context8.next = 33; 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 = 31; break; } setAssistantVisible(true); return _context8.abrupt("return"); case 31: 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 33: 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, onFinishFailed: function onFinishFailed() { if (isshow) { settipVisible(true); return; } }, 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 }) }) // : // // // { handleCancelAuth(true) }}>{showRealName ? getHiddenName(basicInfo.name) : basicInfo.name} // // // {showRealName ? '(显示:平台将显示您的真实姓名)' : '(隐藏:平台将显示你的昵称)'} // , /*#__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\u5E08" }), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, { value: "student", children: "\u5B66\u751F" }), /*#__PURE__*/(0,jsx_runtime.jsx)(Option, { value: "professional", children: "\u4E13\u4E1A\u4EBA\u58EB" })] }) }) })) }), /*#__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: '请先输入学号', // }]} , validateTrigger: "onBlur", rules: [{ required: true, validator: function () { var _validator = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9(_, value) { var _user$userInfo8; var res; return regeneratorRuntime_default()().wrap(function _callee9$(_context9) { while (1) switch (_context9.prev = _context9.next) { case 0: setisfirst(false); _context9.next = 3; return (0,fetch/* default */.ZP)("/api/users/accounts/".concat(user === null || user === void 0 || (_user$userInfo8 = user.userInfo) === null || _user$userInfo8 === void 0 ? void 0 : _user$userInfo8.user_id, "/valid_student_id"), { method: 'get', params: { school_id: basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo.school_id, student_id: value } }); case 3: res = _context9.sent; setishow((res === null || res === void 0 ? void 0 : res.status) === -1); return _context9.abrupt("return", (res === null || res === void 0 ? void 0 : res.status) === -1 ? Promise.reject('本单位内学号重复,请更改') : Promise.resolve()); case 6: case "end": return _context9.stop(); } }, _callee9); })); function validator(_x6, _x7) { return _validator.apply(this, arguments); } return validator; }() }], 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 }, 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); }) }) }) })), /*#__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: "\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.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\u751F\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)(es_modal/* default */.Z, { centered: true, destroyOnClose: true, open: assistantVisible, title: "\u5934\u6B4C\u6559\u5E08\u4EA4\u6D41\u793E\u533A", width: 648, onCancel: function onCancel() {}, onOk: function onOk() {}, 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)(es_modal/* default */.Z, { centered: true, destroyOnClose: true, open: tipVisible, title: "\u63D0\u793A", width: 520, okText: "\u804C\u4E1A\u8BA4\u8BC1", onCancel: function onCancel() { return settipVisible(false); }, onOk: function onOk() { _umi_production_exports.history.push('/account/certification'); dispatch({ type: 'account/setActionTabs', payload: { key: 'Account-ProfessionalAuth' } }); settipVisible(false); }, children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", { children: [/*#__PURE__*/(0,jsx_runtime.jsx)("p", { children: "\u8BE5\u5B66\u53F7\u5DF2\u88AB\u4F7F\u7528\uFF0C\u60A8\u53EF\u4EE5\u901A\u8FC7\u804C\u4E1A\u8BA4\u8BC1\u7ED1\u5B9A\u8BE5\u5B66\u53F7\u4E0E\u5F53\u524D\u8D26\u53F7\u3002\u8BA4\u8BC1\u65F6\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u4EFB\u610F\u4E00\u79CD\u9A8C\u8BC1\u64CD\u4F5C\uFF0C\u4EE5\u4FBF\u5FEB\u901F\u901A\u8FC7\u8BA4\u8BC1\uFF1A" }), /*#__PURE__*/(0,jsx_runtime.jsx)("p", { children: "1\u3001\u63D0\u4F9B\u5F53\u524D\u8D26\u53F7\u52A0\u5165\u7684\u6559\u5B66\u8BFE\u5802\u7684\u9080\u8BF7\u7801\uFF1B" }), /*#__PURE__*/(0,jsx_runtime.jsx)("p", { children: "2\u3001\u63D0\u4F9B\u5F53\u524D\u8D26\u53F7\u52A0\u5165\u7684\u6559\u5B66\u8BFE\u5802\u7684\u7BA1\u7406\u6559\u5E08\u624B\u673A\u53F7\u540E4\u4F4D\u3002" }), /*#__PURE__*/(0,jsx_runtime.jsx)("p", { children: "\u6CE8\u610F\uFF1A\u5F53\u524D\u8D26\u53F7\u548C\u6559\u5B66\u8BFE\u5802\u6240\u5C5E\u5355\u4F4D\u5FC5\u987B\u76F8\u540C\uFF01" })] }) }), /*#__PURE__*/(0,jsx_runtime.jsx)(image_preview/* default */.Z, {}), /*#__PURE__*/(0,jsx_runtime.jsx)(ProfessionalAuthModal/* 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)); /***/ }), /***/ 32637: /*!***********************************************!*\ !*** ./src/assets/images/AssistantCode3.jpeg ***! \***********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { module.exports = __webpack_require__.p + "static/AssistantCode3.a8740efb.jpeg"; /***/ }) }]);