|
|
|
|
@ -823,11 +823,11 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
var handleFinish = /*#__PURE__*/function () {
|
|
|
|
|
var _ref9 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10(values) {
|
|
|
|
|
var _departmentList$find2, _schoolList$find3, _majorList$find;
|
|
|
|
|
var nickname, gender, identity, studentNo, jobTitle, manager, school, department, edu_background, edu_entry_year, brief_introduction, face_image, staff_id, major_name, department_id, school_id, major_id, basicInfo, titls, professionalFlags, modal, _modal, _account$basicInfo6, _fileList$2, res, _account$basicInfo7, _user$userInfo7;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee10$(_context10) {
|
|
|
|
|
while (1) switch (_context10.prev = _context10.next) {
|
|
|
|
|
var _ref9 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9(values) {
|
|
|
|
|
var _departmentList$find2, _schoolList$find3, _majorList$find, _account$basicInfo4, _fileList$;
|
|
|
|
|
var nickname, gender, identity, studentNo, jobTitle, manager, school, department, edu_background, edu_entry_year, brief_introduction, face_image, staff_id, major_name, department_id, school_id, major_id, basicInfo, titls, professionalFlags, modal, _modal, res, _account$basicInfo5, _user$userInfo4;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee9$(_context9) {
|
|
|
|
|
while (1) switch (_context9.prev = _context9.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, major_name = values.major_name;
|
|
|
|
|
department_id = (_departmentList$find2 = departmentList.find(function (item) {
|
|
|
|
|
@ -883,7 +883,7 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (school_id) {
|
|
|
|
|
_context10.next = 12;
|
|
|
|
|
_context9.next = 12;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
modal = es_modal/* default */.Z.confirm({
|
|
|
|
|
@ -903,10 +903,10 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
modal.destroy();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return _context10.abrupt("return");
|
|
|
|
|
return _context9.abrupt("return");
|
|
|
|
|
case 12:
|
|
|
|
|
if (!(!!department && !department_id)) {
|
|
|
|
|
_context10.next = 15;
|
|
|
|
|
_context9.next = 15;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
_modal = es_modal/* default */.Z.confirm({
|
|
|
|
|
@ -926,10 +926,10 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
_modal.destroy();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return _context10.abrupt("return");
|
|
|
|
|
return _context9.abrupt("return");
|
|
|
|
|
case 15:
|
|
|
|
|
if (!(!!major_name && !major_id)) {
|
|
|
|
|
_context10.next = 18;
|
|
|
|
|
_context9.next = 18;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
es_modal/* default */.Z.info({
|
|
|
|
|
@ -944,133 +944,13 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
return _context10.abrupt("return");
|
|
|
|
|
return _context9.abrupt("return");
|
|
|
|
|
case 18:
|
|
|
|
|
if (!(titls.length > 0 || professionalFlags.length > 0)) {
|
|
|
|
|
_context10.next = 22;
|
|
|
|
|
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 _callee9() {
|
|
|
|
|
var _account$basicInfo4, _fileList$;
|
|
|
|
|
var _user$userInfo4, _user$userInfo5, res, _account$basicInfo5, _user$userInfo6;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee9$(_context9) {
|
|
|
|
|
while (1) switch (_context9.prev = _context9.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
if (!(titls.length > 0)) {
|
|
|
|
|
_context9.next = 3;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
_context9.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)) {
|
|
|
|
|
_context9.next = 6;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
_context9.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:
|
|
|
|
|
_context9.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,
|
|
|
|
|
department_major_id: major_id || null,
|
|
|
|
|
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 = _context9.sent;
|
|
|
|
|
if (!((res === null || res === void 0 ? void 0 : res.status) === -1)) {
|
|
|
|
|
_context9.next = 11;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return _context9.abrupt("return");
|
|
|
|
|
case 11:
|
|
|
|
|
if (!res) {
|
|
|
|
|
_context9.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')) {
|
|
|
|
|
_context9.next = 17;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return _context9.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 _context9.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee9);
|
|
|
|
|
}));
|
|
|
|
|
function onOk() {
|
|
|
|
|
return _onOk2.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
return onOk;
|
|
|
|
|
}()
|
|
|
|
|
});
|
|
|
|
|
_context10.next = 35;
|
|
|
|
|
break;
|
|
|
|
|
case 22:
|
|
|
|
|
_context10.next = 24;
|
|
|
|
|
_context9.next = 20;
|
|
|
|
|
return dispatch({
|
|
|
|
|
type: 'account/updateAccount',
|
|
|
|
|
payload: {
|
|
|
|
|
id: (_account$basicInfo6 = account.basicInfo) === null || _account$basicInfo6 === void 0 ? void 0 : _account$basicInfo6.id,
|
|
|
|
|
id: (_account$basicInfo4 = account.basicInfo) === null || _account$basicInfo4 === void 0 ? void 0 : _account$basicInfo4.id,
|
|
|
|
|
department_id: department_id,
|
|
|
|
|
department_major_id: major_id || null,
|
|
|
|
|
gender: gender,
|
|
|
|
|
@ -1087,23 +967,23 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
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
|
|
|
|
|
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 24:
|
|
|
|
|
res = _context10.sent;
|
|
|
|
|
case 20:
|
|
|
|
|
res = _context9.sent;
|
|
|
|
|
if (!((res === null || res === void 0 ? void 0 : res.status) === -1)) {
|
|
|
|
|
_context10.next = 27;
|
|
|
|
|
_context9.next = 23;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return _context10.abrupt("return");
|
|
|
|
|
case 27:
|
|
|
|
|
return _context9.abrupt("return");
|
|
|
|
|
case 23:
|
|
|
|
|
if (!res) {
|
|
|
|
|
_context10.next = 35;
|
|
|
|
|
_context9.next = 31;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
message/* default */.ZP.info('保存成功');
|
|
|
|
|
if (!((_account$basicInfo7 = account.basicInfo) !== null && _account$basicInfo7 !== void 0 && _account$basicInfo7.base_info_completed)) {
|
|
|
|
|
if (!((_account$basicInfo5 = account.basicInfo) !== null && _account$basicInfo5 !== void 0 && _account$basicInfo5.base_info_completed)) {
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'user/getUserInfo'
|
|
|
|
|
});
|
|
|
|
|
@ -1111,15 +991,15 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'account/getBasicInfo',
|
|
|
|
|
payload: {
|
|
|
|
|
login: (_user$userInfo7 = user.userInfo) === null || _user$userInfo7 === void 0 ? void 0 : _user$userInfo7.login
|
|
|
|
|
login: (_user$userInfo4 = user.userInfo) === null || _user$userInfo4 === void 0 ? void 0 : _user$userInfo4.login
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (!(identity !== saveIdentity && identity === 'teacher')) {
|
|
|
|
|
_context10.next = 33;
|
|
|
|
|
_context9.next = 29;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return _context10.abrupt("return");
|
|
|
|
|
case 33:
|
|
|
|
|
return _context9.abrupt("return");
|
|
|
|
|
case 29:
|
|
|
|
|
if (localStorage.getItem('Noviceguide') === '0') {} else {
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
|
|
@ -1134,11 +1014,11 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
_umi_production_exports.history.push('/account/profile');
|
|
|
|
|
case 35:
|
|
|
|
|
case 31:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context10.stop();
|
|
|
|
|
return _context9.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee10);
|
|
|
|
|
}, _callee9);
|
|
|
|
|
}));
|
|
|
|
|
return function handleFinish(_x7) {
|
|
|
|
|
return _ref9.apply(this, arguments);
|