|
|
|
|
@ -232,15 +232,15 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
|
|
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/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/asyncToGenerator.js
|
|
|
|
|
var asyncToGenerator = __webpack_require__(41498);
|
|
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
|
|
@ -263,7 +263,7 @@ 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);
|
|
|
|
|
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
|
|
|
|
|
@ -425,8 +425,8 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
visible: false
|
|
|
|
|
};
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
getSchoolOption();
|
|
|
|
|
}, []);
|
|
|
|
|
(basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo.id) && getSchoolOption();
|
|
|
|
|
}, [basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo.id]);
|
|
|
|
|
(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('学号');
|
|
|
|
|
@ -446,7 +446,10 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
setDepartmentList(res === null || res === void 0 ? void 0 : res.departments);
|
|
|
|
|
case 4:
|
|
|
|
|
setFilterDepartmentList(toConsumableArray_default()(res === null || res === void 0 ? void 0 : res.departments.filter(function (e) {
|
|
|
|
|
return e.name.includes((basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo.department_name) || '');
|
|
|
|
|
})));
|
|
|
|
|
case 5:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
@ -468,7 +471,10 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
setSchoolLoading(false);
|
|
|
|
|
setSchoolList(res === null || res === void 0 ? void 0 : res.schools);
|
|
|
|
|
case 6:
|
|
|
|
|
setFilterSchoolList(toConsumableArray_default()(res === null || res === void 0 ? void 0 : res.schools.filter(function (e) {
|
|
|
|
|
return e.name.includes((basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo.school_name) || '');
|
|
|
|
|
})));
|
|
|
|
|
case 7:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|
|
|
|
|
@ -485,7 +491,7 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
|
|
|
|
|
//专业
|
|
|
|
|
var handleSetMajorList = /*#__PURE__*/function () {
|
|
|
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
|
|
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(change) {
|
|
|
|
|
var _schoolList$find, _departmentList$find;
|
|
|
|
|
var schoolId, departmentId, res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
|
|
@ -498,39 +504,69 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
return item.name === form.getFieldValue('department');
|
|
|
|
|
})) === null || _departmentList$find === void 0 ? void 0 : _departmentList$find.id;
|
|
|
|
|
if (!departmentId) {
|
|
|
|
|
_context3.next = 7;
|
|
|
|
|
_context3.next = 8;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
_context3.next = 5;
|
|
|
|
|
if (change) {
|
|
|
|
|
form.setFieldsValue({
|
|
|
|
|
major_name: ''
|
|
|
|
|
});
|
|
|
|
|
setFormValue(objectSpread2_default()(objectSpread2_default()({}, formValue), {}, {
|
|
|
|
|
major_name: ''
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
_context3.next = 6;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/schools/".concat(schoolId, "/departments/").concat(departmentId, "/major_option.json"), {
|
|
|
|
|
method: 'get'
|
|
|
|
|
});
|
|
|
|
|
case 5:
|
|
|
|
|
case 6:
|
|
|
|
|
res = _context3.sent;
|
|
|
|
|
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
|
|
|
|
|
setMajorList(res === null || res === void 0 ? void 0 : res.majors);
|
|
|
|
|
setFilterMajorList(toConsumableArray_default()(res === null || res === void 0 ? void 0 : res.majors.filter(function (e) {
|
|
|
|
|
return e.name.includes(form.getFieldValue('major_name') || '');
|
|
|
|
|
})));
|
|
|
|
|
}
|
|
|
|
|
case 7:
|
|
|
|
|
case 8:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context3.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee3);
|
|
|
|
|
}));
|
|
|
|
|
return function handleSetMajorList() {
|
|
|
|
|
return function handleSetMajorList(_x) {
|
|
|
|
|
return _ref4.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var getDepartmentOption = function getDepartmentOption(schoolId) {
|
|
|
|
|
if (!schoolId) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
return dispatch({
|
|
|
|
|
type: 'account/getDepartmentOption',
|
|
|
|
|
payload: {
|
|
|
|
|
id: schoolId
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
var getDepartmentOption = /*#__PURE__*/function () {
|
|
|
|
|
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(schoolId) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
if (schoolId) {
|
|
|
|
|
_context4.next = 2;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return _context4.abrupt("return", Promise.reject());
|
|
|
|
|
case 2:
|
|
|
|
|
_context4.next = 4;
|
|
|
|
|
return dispatch({
|
|
|
|
|
type: 'account/getDepartmentOption',
|
|
|
|
|
payload: {
|
|
|
|
|
id: schoolId
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 4:
|
|
|
|
|
return _context4.abrupt("return", _context4.sent);
|
|
|
|
|
case 5:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context4.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee4);
|
|
|
|
|
}));
|
|
|
|
|
return function getDepartmentOption(_x2) {
|
|
|
|
|
return _ref5.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
if (!account.basicInfo) {
|
|
|
|
|
return;
|
|
|
|
|
@ -550,7 +586,8 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
brief_introduction: basicInfo.brief_introduction,
|
|
|
|
|
jobTitle: basicInfo.identity == "teacher" ? basicInfo.technical_title : "教授",
|
|
|
|
|
manager: basicInfo.identity == "professional" ? basicInfo.technical_title : "企业管理者",
|
|
|
|
|
staff_id: basicInfo.staff_id
|
|
|
|
|
staff_id: basicInfo.staff_id,
|
|
|
|
|
major_name: basicInfo === null || basicInfo === void 0 ? void 0 : basicInfo.department_major_name
|
|
|
|
|
// face_image:[{uid:'111',name:'111',url:basicInfo.face_image}]
|
|
|
|
|
};
|
|
|
|
|
if (basicInfo !== null && basicInfo !== void 0 && basicInfo.face_image) {
|
|
|
|
|
@ -607,15 +644,11 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
}) || {}).id;
|
|
|
|
|
if (findSchoolId) {
|
|
|
|
|
handleSetDepartment(changedValues.school);
|
|
|
|
|
} else {
|
|
|
|
|
form.setFieldsValue({
|
|
|
|
|
department: ''
|
|
|
|
|
});
|
|
|
|
|
setFormValue(objectSpread2_default()(objectSpread2_default()({}, formValue), {
|
|
|
|
|
school: changedValues.school,
|
|
|
|
|
department: ''
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
// else {
|
|
|
|
|
// form.setFieldsValue({ department: '' });
|
|
|
|
|
// setFormValue({ ...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);
|
|
|
|
|
@ -641,51 +674,54 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
var handleSetDepartment = /*#__PURE__*/function () {
|
|
|
|
|
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(school, departmentName) {
|
|
|
|
|
var _schoolList$find2, _res$departments;
|
|
|
|
|
var findSchoolId, res, name;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
|
|
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(school, departmentName) {
|
|
|
|
|
var _schoolList$find2;
|
|
|
|
|
var findSchoolId, res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
findSchoolId = (_schoolList$find2 = schoolList.find(function (item) {
|
|
|
|
|
return item.name === school;
|
|
|
|
|
})) === null || _schoolList$find2 === void 0 ? void 0 : _schoolList$find2.id;
|
|
|
|
|
_context4.next = 3;
|
|
|
|
|
_context5.next = 3;
|
|
|
|
|
return getDepartmentOption(findSchoolId);
|
|
|
|
|
case 3:
|
|
|
|
|
_context4.t0 = _context4.sent;
|
|
|
|
|
if (_context4.t0) {
|
|
|
|
|
_context4.next = 6;
|
|
|
|
|
_context5.t0 = _context5.sent;
|
|
|
|
|
if (_context5.t0) {
|
|
|
|
|
_context5.next = 6;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
_context4.t0 = {};
|
|
|
|
|
_context5.t0 = {};
|
|
|
|
|
case 6:
|
|
|
|
|
res = _context4.t0;
|
|
|
|
|
res = _context5.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);
|
|
|
|
|
setFilterDepartmentList(toConsumableArray_default()(res === null || res === void 0 ? void 0 : res.departments));
|
|
|
|
|
// const name = departmentName || res?.departments?.[0]?.name;
|
|
|
|
|
form.setFieldsValue({
|
|
|
|
|
department: name
|
|
|
|
|
department: '',
|
|
|
|
|
major_name: ''
|
|
|
|
|
});
|
|
|
|
|
setFormValue(objectSpread2_default()(objectSpread2_default()({}, formValue), {
|
|
|
|
|
school: school,
|
|
|
|
|
department: name
|
|
|
|
|
department: '',
|
|
|
|
|
major_name: ''
|
|
|
|
|
}));
|
|
|
|
|
case 11:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context4.stop();
|
|
|
|
|
return _context5.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee4);
|
|
|
|
|
}, _callee5);
|
|
|
|
|
}));
|
|
|
|
|
return function handleSetDepartment(_x, _x2) {
|
|
|
|
|
return _ref5.apply(this, arguments);
|
|
|
|
|
return function handleSetDepartment(_x3, _x4) {
|
|
|
|
|
return _ref6.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var handleSchoolSuccess = /*#__PURE__*/function () {
|
|
|
|
|
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(schoolName) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
|
|
var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6(schoolName) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
|
|
|
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context5.next = 2;
|
|
|
|
|
_context6.next = 2;
|
|
|
|
|
return getSchoolOption();
|
|
|
|
|
case 2:
|
|
|
|
|
form.setFieldsValue({
|
|
|
|
|
@ -698,52 +734,52 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
}));
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context5.stop();
|
|
|
|
|
return _context6.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee5);
|
|
|
|
|
}, _callee6);
|
|
|
|
|
}));
|
|
|
|
|
return function handleSchoolSuccess(_x3) {
|
|
|
|
|
return _ref6.apply(this, arguments);
|
|
|
|
|
return function handleSchoolSuccess(_x5) {
|
|
|
|
|
return _ref7.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var handleCancelAuth = /*#__PURE__*/function () {
|
|
|
|
|
var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7(isRealNameAuth) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
|
|
|
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
|
|
|
var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8(isRealNameAuth) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
|
|
|
|
|
while (1) switch (_context8.prev = _context8.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
modal/* default */.Z.confirm({
|
|
|
|
|
es_modal/* default */.Z.confirm({
|
|
|
|
|
centered: true,
|
|
|
|
|
okText: '确定',
|
|
|
|
|
cancelText: '取消',
|
|
|
|
|
title: isRealNameAuth ? '您已通过实名认证,修改姓名需要撤销实名认证,是否确定撤销?' : '您已通过职业认证,修改信息需要撤销职业认证,是否确定撤销?',
|
|
|
|
|
onOk: function () {
|
|
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
|
|
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
|
|
|
|
|
var _user$userInfo, _user$userInfo2;
|
|
|
|
|
var res, _user$userInfo3;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
|
|
|
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
|
|
|
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
if (!isRealNameAuth) {
|
|
|
|
|
_context6.next = 6;
|
|
|
|
|
_context7.next = 6;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
_context6.next = 3;
|
|
|
|
|
_context7.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:
|
|
|
|
|
_context6.t0 = _context6.sent;
|
|
|
|
|
_context6.next = 9;
|
|
|
|
|
_context7.t0 = _context7.sent;
|
|
|
|
|
_context7.next = 9;
|
|
|
|
|
break;
|
|
|
|
|
case 6:
|
|
|
|
|
_context6.next = 8;
|
|
|
|
|
_context7.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:
|
|
|
|
|
_context6.t0 = _context6.sent;
|
|
|
|
|
_context7.t0 = _context7.sent;
|
|
|
|
|
case 9:
|
|
|
|
|
res = _context6.t0;
|
|
|
|
|
res = _context7.t0;
|
|
|
|
|
if (res) {
|
|
|
|
|
message/* default */.ZP.success(isRealNameAuth ? '撤销实名认证成功' : '撤销职业认证成功');
|
|
|
|
|
dispatch({
|
|
|
|
|
@ -755,9 +791,9 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
}
|
|
|
|
|
case 11:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context6.stop();
|
|
|
|
|
return _context7.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee6);
|
|
|
|
|
}, _callee7);
|
|
|
|
|
}));
|
|
|
|
|
function onOk() {
|
|
|
|
|
return _onOk.apply(this, arguments);
|
|
|
|
|
@ -767,12 +803,12 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
});
|
|
|
|
|
case 1:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context7.stop();
|
|
|
|
|
return _context8.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee7);
|
|
|
|
|
}, _callee8);
|
|
|
|
|
}));
|
|
|
|
|
return function handleCancelAuth(_x4) {
|
|
|
|
|
return _ref7.apply(this, arguments);
|
|
|
|
|
return function handleCancelAuth(_x6) {
|
|
|
|
|
return _ref8.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var educationBackound = function educationBackound() {
|
|
|
|
|
@ -787,11 +823,11 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
var handleFinish = /*#__PURE__*/function () {
|
|
|
|
|
var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9(values) {
|
|
|
|
|
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, _account$basicInfo6, _fileList$2, res, _account$basicInfo7, _user$userInfo7;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee9$(_context9) {
|
|
|
|
|
while (1) switch (_context9.prev = _context9.next) {
|
|
|
|
|
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) {
|
|
|
|
|
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) {
|
|
|
|
|
@ -842,15 +878,79 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
if (department != basicInfo.department_name) {
|
|
|
|
|
professionalFlags.push('院系/部门');
|
|
|
|
|
}
|
|
|
|
|
if (major_name != basicInfo.major_name) {
|
|
|
|
|
if (major_name != basicInfo.department_major_name) {
|
|
|
|
|
professionalFlags.push('专业');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (school_id) {
|
|
|
|
|
_context10.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 _context10.abrupt("return");
|
|
|
|
|
case 12:
|
|
|
|
|
if (!(!!department && !department_id)) {
|
|
|
|
|
_context10.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 _context10.abrupt("return");
|
|
|
|
|
case 15:
|
|
|
|
|
if (!(!!major_name && !major_id)) {
|
|
|
|
|
_context10.next = 18;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
es_modal/* default */.Z.info({
|
|
|
|
|
icon: null,
|
|
|
|
|
width: 600,
|
|
|
|
|
centered: true,
|
|
|
|
|
okText: '我知道了',
|
|
|
|
|
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\u4E13\u4E1A"
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
return _context10.abrupt("return");
|
|
|
|
|
case 18:
|
|
|
|
|
if (!(titls.length > 0 || professionalFlags.length > 0)) {
|
|
|
|
|
_context9.next = 13;
|
|
|
|
|
_context10.next = 22;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
modal/* default */.Z.confirm({
|
|
|
|
|
es_modal/* default */.Z.confirm({
|
|
|
|
|
centered: true,
|
|
|
|
|
icon: null,
|
|
|
|
|
okText: '确定',
|
|
|
|
|
@ -860,37 +960,37 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
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 _callee8() {
|
|
|
|
|
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 _callee8$(_context8) {
|
|
|
|
|
while (1) switch (_context8.prev = _context8.next) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee9$(_context9) {
|
|
|
|
|
while (1) switch (_context9.prev = _context9.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
if (!(titls.length > 0)) {
|
|
|
|
|
_context8.next = 3;
|
|
|
|
|
_context9.next = 3;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
_context8.next = 3;
|
|
|
|
|
_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)) {
|
|
|
|
|
_context8.next = 6;
|
|
|
|
|
_context9.next = 6;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
_context8.next = 6;
|
|
|
|
|
_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:
|
|
|
|
|
_context8.next = 8;
|
|
|
|
|
_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,
|
|
|
|
|
major_id: major_id,
|
|
|
|
|
department_major_id: major_id || null,
|
|
|
|
|
gender: gender,
|
|
|
|
|
identity: identity,
|
|
|
|
|
location: location,
|
|
|
|
|
@ -908,15 +1008,15 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 8:
|
|
|
|
|
res = _context8.sent;
|
|
|
|
|
res = _context9.sent;
|
|
|
|
|
if (!((res === null || res === void 0 ? void 0 : res.status) === -1)) {
|
|
|
|
|
_context8.next = 11;
|
|
|
|
|
_context9.next = 11;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return _context8.abrupt("return");
|
|
|
|
|
return _context9.abrupt("return");
|
|
|
|
|
case 11:
|
|
|
|
|
if (!res) {
|
|
|
|
|
_context8.next = 19;
|
|
|
|
|
_context9.next = 19;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
message/* default */.ZP.info('保存成功');
|
|
|
|
|
@ -932,10 +1032,10 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (!(identity !== saveIdentity && identity === 'teacher')) {
|
|
|
|
|
_context8.next = 17;
|
|
|
|
|
_context9.next = 17;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return _context8.abrupt("return");
|
|
|
|
|
return _context9.abrupt("return");
|
|
|
|
|
case 17:
|
|
|
|
|
if (localStorage.getItem('Noviceguide') === '0') {} else {
|
|
|
|
|
dispatch({
|
|
|
|
|
@ -953,9 +1053,9 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
_umi_production_exports.history.push('/account/profile');
|
|
|
|
|
case 19:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context8.stop();
|
|
|
|
|
return _context9.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee8);
|
|
|
|
|
}, _callee9);
|
|
|
|
|
}));
|
|
|
|
|
function onOk() {
|
|
|
|
|
return _onOk2.apply(this, arguments);
|
|
|
|
|
@ -963,16 +1063,16 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
return onOk;
|
|
|
|
|
}()
|
|
|
|
|
});
|
|
|
|
|
_context9.next = 26;
|
|
|
|
|
_context10.next = 35;
|
|
|
|
|
break;
|
|
|
|
|
case 13:
|
|
|
|
|
_context9.next = 15;
|
|
|
|
|
case 22:
|
|
|
|
|
_context10.next = 24;
|
|
|
|
|
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,
|
|
|
|
|
major_id: major_id,
|
|
|
|
|
department_major_id: major_id || null,
|
|
|
|
|
gender: gender,
|
|
|
|
|
identity: identity,
|
|
|
|
|
location: location,
|
|
|
|
|
@ -990,16 +1090,16 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
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 15:
|
|
|
|
|
res = _context9.sent;
|
|
|
|
|
case 24:
|
|
|
|
|
res = _context10.sent;
|
|
|
|
|
if (!((res === null || res === void 0 ? void 0 : res.status) === -1)) {
|
|
|
|
|
_context9.next = 18;
|
|
|
|
|
_context10.next = 27;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return _context9.abrupt("return");
|
|
|
|
|
case 18:
|
|
|
|
|
return _context10.abrupt("return");
|
|
|
|
|
case 27:
|
|
|
|
|
if (!res) {
|
|
|
|
|
_context9.next = 26;
|
|
|
|
|
_context10.next = 35;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
message/* default */.ZP.info('保存成功');
|
|
|
|
|
@ -1015,11 +1115,11 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (!(identity !== saveIdentity && identity === 'teacher')) {
|
|
|
|
|
_context9.next = 24;
|
|
|
|
|
_context10.next = 33;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return _context9.abrupt("return");
|
|
|
|
|
case 24:
|
|
|
|
|
return _context10.abrupt("return");
|
|
|
|
|
case 33:
|
|
|
|
|
if (localStorage.getItem('Noviceguide') === '0') {} else {
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
|
|
@ -1034,14 +1134,14 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
_umi_production_exports.history.push('/account/profile');
|
|
|
|
|
case 26:
|
|
|
|
|
case 35:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context9.stop();
|
|
|
|
|
return _context10.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee9);
|
|
|
|
|
}, _callee10);
|
|
|
|
|
}));
|
|
|
|
|
return function handleFinish(_x5) {
|
|
|
|
|
return _ref8.apply(this, arguments);
|
|
|
|
|
return function handleFinish(_x7) {
|
|
|
|
|
return _ref9.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
var modalSkip = function modalSkip() {
|
|
|
|
|
@ -1418,7 +1518,7 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(auto_complete/* default */.Z, {
|
|
|
|
|
size: "large",
|
|
|
|
|
onChange: function onChange(value) {
|
|
|
|
|
handleSetMajorList();
|
|
|
|
|
handleSetMajorList(true);
|
|
|
|
|
setFilterDepartmentList(departmentList === null || departmentList === void 0 ? void 0 : departmentList.filter(function (item) {
|
|
|
|
|
return item.name.includes(value);
|
|
|
|
|
}));
|
|
|
|
|
@ -1729,7 +1829,7 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
onSuccess: function onSuccess(departmentName) {
|
|
|
|
|
return handleSetDepartment(formValue.school, departmentName);
|
|
|
|
|
}
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
|
|
|
|
|
centered: true,
|
|
|
|
|
destroyOnClose: true,
|
|
|
|
|
open: assistantVisible,
|
|
|
|
|
@ -1762,12 +1862,12 @@ var Edit = function Edit(_ref) {
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(image_preview/* default */.Z, {})]
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/* harmony default export */ var Profile_Edit = ((0,_umi_production_exports.connect)(function (_ref9) {
|
|
|
|
|
var user = _ref9.user,
|
|
|
|
|
account = _ref9.account,
|
|
|
|
|
loading = _ref9.loading,
|
|
|
|
|
globalSetting = _ref9.globalSetting,
|
|
|
|
|
shixunHomeworks = _ref9.shixunHomeworks;
|
|
|
|
|
/* harmony default export */ var Profile_Edit = ((0,_umi_production_exports.connect)(function (_ref10) {
|
|
|
|
|
var user = _ref10.user,
|
|
|
|
|
account = _ref10.account,
|
|
|
|
|
loading = _ref10.loading,
|
|
|
|
|
globalSetting = _ref10.globalSetting,
|
|
|
|
|
shixunHomeworks = _ref10.shixunHomeworks;
|
|
|
|
|
return {
|
|
|
|
|
user: user,
|
|
|
|
|
account: account,
|