autoUpdataFile

dev_local_v9_zzxy
eduauto 1 year ago
parent 8b484608ea
commit 7426db02f4

@ -29,7 +29,7 @@
display: block !important;
}
</style><script>if(document.domain !== "www.educoder.net") document.title = '';</script>
<script src="/react/build/umi.8629b517.js"></script>
<script src="/react/build/umi.2c69b383.js"></script>
<script src="/react/build/js/public.js"></script>
</body>
</html>

@ -161,7 +161,7 @@ var jsx_runtime = __webpack_require__(37712);
var NewCoursePage = function NewCoursePage(_ref) {
var _team$team_leader, _team$members, _searchMemberList, _ref7;
var _team$team_leader, _team$members2, _searchMemberList, _ref7;
var shixunHomeworks = _ref.shixunHomeworks,
user = _ref.user,
newCourse = _ref.newCourse,
@ -313,13 +313,20 @@ var NewCoursePage = function NewCoursePage(_ref) {
}
var handleSubmit = /*#__PURE__*/function () {
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(bodyData) {
var res;
var _team$members, res;
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
bodyData.user_ids = [].concat(toConsumableArray_default()((bodyData === null || bodyData === void 0 ? void 0 : bodyData.user_ids) || []), toConsumableArray_default()(selectArr === null || selectArr === void 0 ? void 0 : selectArr.map(function (item) {
return item.user_id;
})));
if ((studentWorkEditDefaultData === null || studentWorkEditDefaultData === void 0 ? void 0 : studentWorkEditDefaultData.group_type) === 1) {
bodyData.user_ids = (team === null || team === void 0 || (_team$members = team.members) === null || _team$members === void 0 ? void 0 : _team$members.map(function (item) {
return item.user_id;
})) || [];
} else {
// bodyData.user_ids = selectStudent?.map(item => item.user_id) || []
bodyData.user_ids = [].concat(toConsumableArray_default()((bodyData === null || bodyData === void 0 ? void 0 : bodyData.user_ids) || []), toConsumableArray_default()(selectArr === null || selectArr === void 0 ? void 0 : selectArr.map(function (item) {
return item.user_id;
})));
}
_context3.next = 3;
return (0,service_shixunHomeworks/* editStudentWork */.z2)(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, params), bodyData), {}, {
type: 3
@ -354,26 +361,24 @@ var NewCoursePage = function NewCoursePage(_ref) {
return v.id || v.response.id;
});
}
if ((studentWorkEditDefaultData === null || studentWorkEditDefaultData === void 0 ? void 0 : studentWorkEditDefaultData.group_type) === 1) {
bodyData["group_leader_scores"] = team === null || team === void 0 ? void 0 : team.members.map(function (item) {
return {
user_id: item.user_id,
score: item.score
};
});
} else {
bodyData["group_leader_scores"] = [].concat(toConsumableArray_default()(selectStudent.map(function (item) {
return {
user_id: item.user_id,
score: item.score
};
})), toConsumableArray_default()(selectArr.map(function (item) {
return {
user_id: item.user_id,
score: item.score
};
})));
}
// if (studentWorkEditDefaultData?.group_type === 1) {
// bodyData["group_leader_scores"] = team?.members.map((item: any) => ({ user_id: item.user_id, score: item.score }))
// } else {
bodyData["group_leader_scores"] = [].concat(toConsumableArray_default()(selectStudent.map(function (item) {
return {
user_id: item.user_id,
score: item.score
};
})), toConsumableArray_default()(selectArr.map(function (item) {
return {
user_id: item.user_id,
score: item.score
};
})));
// }
if (bodyData.attachment_ids == '') {
modal/* default */.Z.confirm({
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
@ -558,7 +563,7 @@ var NewCoursePage = function NewCoursePage(_ref) {
padding: '3px 10px'
},
children: "\u7EC4\u5458"
}), team === null || team === void 0 || (_team$members = team.members) === null || _team$members === void 0 ? void 0 : _team$members.map(function (item, index) {
}), team === null || team === void 0 || (_team$members2 = team.members) === null || _team$members2 === void 0 ? void 0 : _team$members2.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
marginLeft: index === 0 ? 10 : 0

@ -161,7 +161,7 @@ var jsx_runtime = __webpack_require__(37712);
var NewCoursePage = function NewCoursePage(_ref) {
var _team$members;
var _team$members2;
var shixunHomeworks = _ref.shixunHomeworks,
user = _ref.user,
newCourse = _ref.newCourse,
@ -280,13 +280,19 @@ var NewCoursePage = function NewCoursePage(_ref) {
}
var handleSubmit = /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2(bodyData) {
var res;
var _team$members, res;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
bodyData.user_ids = (selectStudent === null || selectStudent === void 0 ? void 0 : selectStudent.map(function (item) {
return item.user_id;
})) || [];
if ((studentWorkAddDefaultData === null || studentWorkAddDefaultData === void 0 ? void 0 : studentWorkAddDefaultData.group_type) === 1) {
bodyData.user_ids = (team === null || team === void 0 || (_team$members = team.members) === null || _team$members === void 0 ? void 0 : _team$members.map(function (item) {
return item.user_id;
})) || [];
} else {
bodyData.user_ids = (selectStudent === null || selectStudent === void 0 ? void 0 : selectStudent.map(function (item) {
return item.user_id;
})) || [];
}
_context2.next = 3;
return (0,service_shixunHomeworks/* addStudentWork */.Be)(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, params), bodyData), {}, {
type: 3
@ -344,21 +350,12 @@ var NewCoursePage = function NewCoursePage(_ref) {
message/* default */.ZP.warning("评分不能为空");
return _context3.abrupt("return");
case 12:
if ((studentWorkAddDefaultData === null || studentWorkAddDefaultData === void 0 ? void 0 : studentWorkAddDefaultData.group_type) === 1) {
bodyData["group_leader_scores"] = team === null || team === void 0 ? void 0 : team.members.map(function (item) {
return {
user_id: item.user_id,
score: item.score
};
});
} else {
bodyData["group_leader_scores"] = selectStudent.map(function (item) {
return {
user_id: item.user_id,
score: item.score
};
});
}
bodyData["group_leader_scores"] = selectStudent.map(function (item) {
return {
user_id: item.user_id,
score: item.score
};
});
if (!bodyData.attachment_ids || bodyData.attachment_ids == '') {
modal/* default */.Z.confirm({
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
@ -543,7 +540,7 @@ var NewCoursePage = function NewCoursePage(_ref) {
padding: '3px 10px'
},
children: "\u7EC4\u5458"
}), team === null || team === void 0 || (_team$members = team.members) === null || _team$members === void 0 ? void 0 : _team$members.map(function (item, index) {
}), team === null || team === void 0 || (_team$members2 = team.members) === null || _team$members2 === void 0 ? void 0 : _team$members2.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
marginLeft: index === 0 ? 10 : 0

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save