Auto Submit

pull/1/head
autosubmit 2 years ago
parent e482160d57
commit 74a1cd9bc8

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

@ -7429,7 +7429,9 @@ var Comment_ShixunsListPage = function ShixunsListPage(_ref) {
(0,_react_17_0_2_react.useEffect)(function () {
if (shixunHomeworks.actionTabs.key === '导出实训报告' && (shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.students_count) > 0) {
exportReport('all');
setTimeout(function () {
exportReport('all');
}, 800);
}
}, [shixunWorkReport === null || shixunWorkReport === void 0 ? void 0 : shixunWorkReport.students_count]);
(0,_react_17_0_2_react.useEffect)(function () {

@ -7715,7 +7715,7 @@ function reducer(state, action) {
function _onSubmit() {
_onSubmit = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6(values, saveType, is_cover) {
var _hack$tag_discipline_;
var _values, hack_sets, hack_codes, hack, tags, codes, obj, _hack$tag_discipline_2, _hack$tag_discipline_3, update_hack_sets, new_hack_sets, sumScore, new_list, _iterator, _step, item, newCodes, res, _yield$updateExercise, _status2, _yield$addProgramming, identifier, exam_identifier, _res, _yield$addExerciseQue, _status3;
var _values, hack_sets, hack_codes, hack, tags, codes, obj, _hack$tag_discipline_2, _hack$tag_discipline_3, update_hack_sets, new_hack_sets, sumScore, new_list, _iterator, _step, item, newCodes, updateRes, res, _yield$updateExercise, _status2, _yield$addProgramming, identifier, exam_identifier, _res, _yield$addExerciseQue, _status3;
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
@ -7801,7 +7801,7 @@ function reducer(state, action) {
}
//编辑
if (!id) {
_context6.next = 53;
_context6.next = 57;
break;
}
_context6.next = 28;
@ -7816,18 +7816,31 @@ function reducer(state, action) {
codes: newCodes
});
case 28:
updateRes = _context6.sent;
if (!(updateRes.status !== 0)) {
_context6.next = 32;
break;
}
dispatch({
type: Types.SET_LOADING,
payload: false
});
return _context6.abrupt("return");
case 32:
;
//* 从编辑试卷入口 进来的修改处理逻辑
if (!callback_url) {
_context6.next = 47;
_context6.next = 52;
break;
}
_context6.next = 31;
_context6.next = 36;
return (0,service/* publishProgrammingTopic */.j2)(id);
case 31:
case 36:
if (!callback_url.includes('paperlibrary')) {
_context6.next = 37;
_context6.next = 42;
break;
}
_context6.next = 34;
_context6.next = 39;
return (0,paperlibrary/* createOrModifyQuestion */.oF)({
id: express_id,
question_id: question_id,
@ -7841,7 +7854,7 @@ function reducer(state, action) {
analysis: hack.analysis
// identifier: id
});
case 34:
case 39:
res = _context6.sent;
if (res.status === 0) {
// history.replace(searchParams.get('callback_url'))
@ -7856,8 +7869,8 @@ function reducer(state, action) {
}
}
return _context6.abrupt("return");
case 37:
_context6.next = 39;
case 42:
_context6.next = 44;
return (0,service/* updateExerciseQuestion */.GM)(question_id, {
question_type: 6,
question_score: hack.score,
@ -7869,19 +7882,19 @@ function reducer(state, action) {
identifier: id,
analysis: hack.analysis
});
case 39:
case 44:
_yield$updateExercise = _context6.sent;
_status2 = _yield$updateExercise.status;
if (!(_status2 === 0)) {
_context6.next = 45;
_context6.next = 50;
break;
}
if (!(saveType === 'start')) {
_context6.next = 44;
_context6.next = 49;
break;
}
return _context6.abrupt("return");
case 44:
case 49:
// history.replace(searchParams.get('callback_url'))
if (searchParams.get('pageType') == 'course') {
if (searchParams.get('updateType') == 'course') {
@ -7892,23 +7905,23 @@ function reducer(state, action) {
} else {
_umi_production_exports.history.replace(searchParams.get('callback_url'));
}
case 45:
_context6.next = 50;
case 50:
_context6.next = 54;
break;
case 47:
case 52:
// window.location.reload()
message/* default */.ZP.success('保存成功');
_umi_production_exports.history.replace('/problemset');
// history.replace('/problemset')
initData(getTimeStamp());
case 50:
case 54:
dispatch({
type: Types.SET_LOADING,
payload: false
});
_context6.next = 83;
_context6.next = 87;
break;
case 53:
_context6.next = 55;
case 57:
_context6.next = 59;
return (0,service/* addProgrammingTopic */.zQ)({
hack: hack,
hack_codes: hack_codes,
@ -7916,7 +7929,7 @@ function reducer(state, action) {
tags: tags,
examination_bank_id: express_id || null
});
case 55:
case 59:
_yield$addProgramming = _context6.sent;
identifier = _yield$addProgramming.identifier;
exam_identifier = _yield$addProgramming.exam_identifier;
@ -7925,17 +7938,17 @@ function reducer(state, action) {
payload: false
});
if (!(saveType === 'start')) {
_context6.next = 61;
_context6.next = 65;
break;
}
return _context6.abrupt("return");
case 61:
case 65:
if (!identifier) {
_context6.next = 83;
_context6.next = 87;
break;
}
if (callback_url) {
_context6.next = 66;
_context6.next = 70;
break;
}
modal/* default */.Z.confirm({
@ -7973,21 +7986,21 @@ function reducer(state, action) {
}()
});
// history.replace(`/problems/${identifier}/edit?lastedUpdateTime=${getTimeStamp()}`)
_context6.next = 83;
_context6.next = 87;
break;
case 66:
_context6.next = 68;
case 70:
_context6.next = 72;
return (0,service/* publishProgrammingTopic */.j2)(identifier);
case 68:
case 72:
if (id) {
_context6.next = 82;
_context6.next = 86;
break;
}
if (!callback_url.includes('paperlibrary')) {
_context6.next = 75;
_context6.next = 79;
break;
}
_context6.next = 72;
_context6.next = 76;
return (0,paperlibrary/* createOrModifyQuestion */.oF)({
id: express_id,
item_type: utils_enum/* QuestionType */.c.Program,
@ -7999,7 +8012,7 @@ function reducer(state, action) {
identifier: exam_identifier,
analysis: hack.analysis
});
case 72:
case 76:
_res = _context6.sent;
if (_res.status === 0) {
// history.replace(searchParams.get('callback_url'))
@ -8014,8 +8027,8 @@ function reducer(state, action) {
}
}
return _context6.abrupt("return");
case 75:
_context6.next = 77;
case 79:
_context6.next = 81;
return (0,service/* addExerciseQuestion */.MK)(parseInt(express_id, 10), {
question_type: 6,
question_score: hack.score,
@ -8024,7 +8037,7 @@ function reducer(state, action) {
tag_discipline_ids: hack.tag_discipline_ids,
analysis: hack.analysis
});
case 77:
case 81:
_yield$addExerciseQue = _context6.sent;
_status3 = _yield$addExerciseQue.status;
if (_status3 === 0) {
@ -8039,9 +8052,9 @@ function reducer(state, action) {
_umi_production_exports.history.replace(searchParams.get('callback_url'));
}
}
_context6.next = 83;
_context6.next = 87;
break;
case 82:
case 86:
// history.replace(searchParams.get('callback_url'))
if (searchParams.get('pageType') == 'course') {
if (searchParams.get('updateType') == 'course') {
@ -8052,7 +8065,7 @@ function reducer(state, action) {
} else {
_umi_production_exports.history.replace(searchParams.get('callback_url'));
}
case 83:
case 87:
case "end":
return _context6.stop();
}

Loading…
Cancel
Save