|
|
|
|
@ -821,6 +821,17 @@ var WorkList = function WorkList(_ref) {
|
|
|
|
|
children: record.absence_penalty ? "\u7F3A\u8BC4\u6263\u5206\uFF1A".concat(record.absence_penalty, "\u5206") : "\u7F3A\u8BC4\u6263\u5206\uFF1A0.0\u5206"
|
|
|
|
|
}) : "", /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
children: record.work_score ? "\u6700\u7EC8\u6210\u7EE9\uFF1A".concat(record.work_score, "\u5206") : "\u6700\u7EC8\u6210\u7EE9\uFF1A0.0\u5206"
|
|
|
|
|
}), !(workList !== null && workList !== void 0 && workList.is_jupyter || workList !== null && workList !== void 0 && workList.is_jupyter_lab) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
onClick: function onClick(e) {
|
|
|
|
|
var _params$course_group;
|
|
|
|
|
e.stopPropagation();
|
|
|
|
|
(0,util/* openNewWindow */.xg)(workList.is_jupyter || workList.is_jupyter_lab ? "/classrooms/".concat(params.coursesId, "/common_homework/").concat(params.categoryId, "/").concat(record.id, "/comment") : params['course_group'] ? "/classrooms/".concat(params.coursesId, "/common_homework/").concat(params.categoryId, "/review/").concat(record.id, "?ids=").concat((_params$course_group = params['course_group']) === null || _params$course_group === void 0 ? void 0 : _params$course_group.toString()) : "/classrooms/".concat(params.coursesId, "/common_homework/").concat(params.categoryId, "/review/").concat(record.id));
|
|
|
|
|
},
|
|
|
|
|
style: {
|
|
|
|
|
color: '#8bb6fd',
|
|
|
|
|
cursor: 'pointer'
|
|
|
|
|
},
|
|
|
|
|
children: "\u67E5\u770B\u8BC4\u5206 >"
|
|
|
|
|
})]
|
|
|
|
|
}),
|
|
|
|
|
children: text > 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
@ -968,7 +979,7 @@ var WorkList = function WorkList(_ref) {
|
|
|
|
|
fixed: 'right',
|
|
|
|
|
dataInex: 'action',
|
|
|
|
|
render: function render(text, record) {
|
|
|
|
|
var _params$course_group;
|
|
|
|
|
var _params$course_group2;
|
|
|
|
|
if (record.work_status === 0 && !(0,authority/* isAdmin */.GJ)()) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
children: "--"
|
|
|
|
|
@ -985,7 +996,7 @@ var WorkList = function WorkList(_ref) {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(_umi_production_exports.Link, {
|
|
|
|
|
className: "c-blue",
|
|
|
|
|
target: "_blank",
|
|
|
|
|
to: workList.is_jupyter || workList.is_jupyter_lab ? "/classrooms/".concat(params.coursesId, "/common_homework/").concat(params.categoryId, "/").concat(record.id, "/comment") : params['course_group'] ? "/classrooms/".concat(params.coursesId, "/common_homework/").concat(params.categoryId, "/review/").concat(record.id, "?ids=").concat((_params$course_group = params['course_group']) === null || _params$course_group === void 0 ? void 0 : _params$course_group.toString()) : "/classrooms/".concat(params.coursesId, "/common_homework/").concat(params.categoryId, "/review/").concat(record.id),
|
|
|
|
|
to: workList.is_jupyter || workList.is_jupyter_lab ? "/classrooms/".concat(params.coursesId, "/common_homework/").concat(params.categoryId, "/").concat(record.id, "/comment") : params['course_group'] ? "/classrooms/".concat(params.coursesId, "/common_homework/").concat(params.categoryId, "/review/").concat(record.id, "?ids=").concat((_params$course_group2 = params['course_group']) === null || _params$course_group2 === void 0 ? void 0 : _params$course_group2.toString()) : "/classrooms/".concat(params.coursesId, "/common_homework/").concat(params.categoryId, "/review/").concat(record.id),
|
|
|
|
|
onClick: function onClick(e) {
|
|
|
|
|
var _classroomList$Assist, _classroomList$Assist2;
|
|
|
|
|
e.stopPropagation();
|
|
|
|
|
@ -1491,8 +1502,8 @@ var WorkList = function WorkList(_ref) {
|
|
|
|
|
onRow: function onRow(record, index) {
|
|
|
|
|
return {
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
var _params$course_group2;
|
|
|
|
|
(0,util/* openNewWindow */.xg)(workList.is_jupyter || workList.is_jupyter_lab ? "/classrooms/".concat(params.coursesId, "/common_homework/").concat(params.categoryId, "/").concat(record.id, "/comment") : params['course_group'] ? "/classrooms/".concat(params.coursesId, "/common_homework/").concat(params.categoryId, "/review/").concat(record.id, "?ids=").concat((_params$course_group2 = params['course_group']) === null || _params$course_group2 === void 0 ? void 0 : _params$course_group2.toString()) : "/classrooms/".concat(params.coursesId, "/common_homework/").concat(params.categoryId, "/review/").concat(record.id));
|
|
|
|
|
var _params$course_group3;
|
|
|
|
|
(0,util/* openNewWindow */.xg)(workList.is_jupyter || workList.is_jupyter_lab ? "/classrooms/".concat(params.coursesId, "/common_homework/").concat(params.categoryId, "/").concat(record.id, "/comment") : params['course_group'] ? "/classrooms/".concat(params.coursesId, "/common_homework/").concat(params.categoryId, "/review/").concat(record.id, "?ids=").concat((_params$course_group3 = params['course_group']) === null || _params$course_group3 === void 0 ? void 0 : _params$course_group3.toString()) : "/classrooms/".concat(params.coursesId, "/common_homework/").concat(params.categoryId, "/review/").concat(record.id));
|
|
|
|
|
|
|
|
|
|
// openNewWindow(`/classrooms/${params.coursesId}/common_homework/${params.categoryId}/${record.id}/comment`)
|
|
|
|
|
}
|
|
|
|
|
@ -3119,7 +3130,7 @@ var Publish = __webpack_require__(3836);
|
|
|
|
|
var CutOffNow = __webpack_require__(75738);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/Detail/components/ConfigWorks/index.less?modules
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
/* harmony default export */ var ConfigWorksmodules = ({"flex_box_center":"flex_box_center___iIik3","flex_space_between":"flex_space_between___Q7wj5","flex_box_vertical_center":"flex_box_vertical_center___LFAxO","flex_box_center_end":"flex_box_center_end___SFNWP","flex_box_column":"flex_box_column___aq5d_","form":"form___z6oqV","efficiency":"efficiency___VZgt9","configWorkContainer":"configWorkContainer___gQ6ac"});
|
|
|
|
|
/* harmony default export */ var ConfigWorksmodules = ({"flex_box_center":"flex_box_center___iIik3","flex_space_between":"flex_space_between___Q7wj5","flex_box_vertical_center":"flex_box_vertical_center___LFAxO","flex_box_center_end":"flex_box_center_end___SFNWP","flex_box_column":"flex_box_column___aq5d_","form":"form___z6oqV","efficiency":"efficiency___VZgt9","configWorkContainer":"configWorkContainer___gQ6ac","tips":"tips___PkPgo","total":"total___c2k9V","tip1":"tip1___BUn8c","tip2":"tip2___Q8WSw"});
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/Detail/components/ConfigWorks/Collaboration.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -5299,6 +5310,8 @@ var HiddenSetting_WorkList = function WorkList(_ref) {
|
|
|
|
|
loading: loading.effects
|
|
|
|
|
};
|
|
|
|
|
})(HiddenSetting_WorkList));
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.0@@ant-design/icons/es/icons/MinusCircleOutlined.js + 1 modules
|
|
|
|
|
var MinusCircleOutlined = __webpack_require__(17300);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/Classrooms/Lists/CommonHomework/Detail/components/ConfigWorks/ScoreSetting.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -5318,7 +5331,7 @@ var HiddenSetting_WorkList = function WorkList(_ref) {
|
|
|
|
|
var ScoreSetting_RangePicker = date_picker["default"].RangePicker;
|
|
|
|
|
var ScoreSetting_Option = es_select["default"].Option;
|
|
|
|
|
var ScoreSetting_WorkList = function WorkList(_ref) {
|
|
|
|
|
var _workList$homework_st, _workList$homework_st2, _workList$homework_st3, _workList$homework_st4, _workList$homework_st5;
|
|
|
|
|
var _workList$homework_st, _workList$homework_st2, _workList$homework_st3, _workList$homework_st4, _workList$homework_st5, _rateSetting2;
|
|
|
|
|
var shixunHomeworks = _ref.shixunHomeworks,
|
|
|
|
|
loading = _ref.loading,
|
|
|
|
|
dispatch = _ref.dispatch;
|
|
|
|
|
@ -5341,15 +5354,25 @@ var ScoreSetting_WorkList = function WorkList(_ref) {
|
|
|
|
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
|
|
|
isshow = _useState6[0],
|
|
|
|
|
setisshow = _useState6[1];
|
|
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)([{
|
|
|
|
|
name: '理论评分',
|
|
|
|
|
score: 40
|
|
|
|
|
}, {
|
|
|
|
|
name: '实践评分',
|
|
|
|
|
score: 60
|
|
|
|
|
}]),
|
|
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
|
|
groupSettings = _useState8[0],
|
|
|
|
|
setGroupSetting = _useState8[1];
|
|
|
|
|
rateSetting = _useState8[0],
|
|
|
|
|
setRateSetting = _useState8[1];
|
|
|
|
|
var _useState9 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState10 = slicedToArray_default()(_useState9, 2),
|
|
|
|
|
repairSettings = _useState10[0],
|
|
|
|
|
setRepairSetting = _useState10[1];
|
|
|
|
|
var _useState11 = (0,_react_17_0_2_react.useState)({
|
|
|
|
|
groupSettings = _useState10[0],
|
|
|
|
|
setGroupSetting = _useState10[1];
|
|
|
|
|
var _useState11 = (0,_react_17_0_2_react.useState)([]),
|
|
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
|
|
repairSettings = _useState12[0],
|
|
|
|
|
setRepairSetting = _useState12[1];
|
|
|
|
|
var _useState13 = (0,_react_17_0_2_react.useState)({
|
|
|
|
|
unified_setting: false,
|
|
|
|
|
//是否统一设置
|
|
|
|
|
publish_time: '',
|
|
|
|
|
@ -5427,11 +5450,21 @@ var ScoreSetting_WorkList = function WorkList(_ref) {
|
|
|
|
|
//是否开启查重扣分
|
|
|
|
|
repeat_setting_score: '',
|
|
|
|
|
//设置的查重扣分
|
|
|
|
|
repeat_limit: '' //扣分阈值
|
|
|
|
|
repeat_limit: '',
|
|
|
|
|
//扣分阈值
|
|
|
|
|
single_score: true,
|
|
|
|
|
//评分维度 true单维度false多维度
|
|
|
|
|
score_details: [{
|
|
|
|
|
name: '理论评分',
|
|
|
|
|
score: 40
|
|
|
|
|
}, {
|
|
|
|
|
name: '实践评分',
|
|
|
|
|
score: 60
|
|
|
|
|
}]
|
|
|
|
|
}),
|
|
|
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
|
|
|
data = _useState12[0],
|
|
|
|
|
setData = _useState12[1];
|
|
|
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
|
|
|
data = _useState14[0],
|
|
|
|
|
setData = _useState14[1];
|
|
|
|
|
var anonymityDisable = (workList === null || workList === void 0 || (_workList$homework_st = workList.homework_status) === null || _workList$homework_st === void 0 ? void 0 : _workList$homework_st.includes("匿评中")) || (workList === null || workList === void 0 || (_workList$homework_st2 = workList.homework_status) === null || _workList$homework_st2 === void 0 ? void 0 : _workList$homework_st2.includes("申诉中"))
|
|
|
|
|
// || workList?.homework_status?.includes("已截止")
|
|
|
|
|
;
|
|
|
|
|
@ -5466,7 +5499,11 @@ var ScoreSetting_WorkList = function WorkList(_ref) {
|
|
|
|
|
}).filter(function (v) {
|
|
|
|
|
return v.late_time !== null;
|
|
|
|
|
})));
|
|
|
|
|
rateSetting = JSON.parse(JSON.stringify(workSetting.score_details.map(function (e) {
|
|
|
|
|
return objectSpread2_default()({}, e);
|
|
|
|
|
})));
|
|
|
|
|
setData(objectSpread2_default()({}, data));
|
|
|
|
|
setRateSetting(toConsumableArray_default()(rateSetting));
|
|
|
|
|
setGroupSetting(toConsumableArray_default()(groupSettings));
|
|
|
|
|
setRepairSetting(toConsumableArray_default()(repairSettings));
|
|
|
|
|
}, [workSetting]);
|
|
|
|
|
@ -5477,12 +5514,39 @@ var ScoreSetting_WorkList = function WorkList(_ref) {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
var onHandleChange = /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
var _groupSettings;
|
|
|
|
|
var bodyData, _repairSettings, res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
|
|
var _rateSetting, _groupSettings;
|
|
|
|
|
var flag, bodyData, _repairSettings, res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
flag = false;
|
|
|
|
|
(_rateSetting = rateSetting) === null || _rateSetting === void 0 || _rateSetting.find(function (item) {
|
|
|
|
|
if (item.name === '' || item.score === '') {
|
|
|
|
|
flag = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (!flag) {
|
|
|
|
|
_context2.next = 4;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
return _context2.abrupt("return");
|
|
|
|
|
case 4:
|
|
|
|
|
if (!(calcScore().toFixed(2) != 100)) {
|
|
|
|
|
_context2.next = 7;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
message/* default */.ZP.warning('整个作业最终的满分值必须为100分');
|
|
|
|
|
return _context2.abrupt("return");
|
|
|
|
|
case 7:
|
|
|
|
|
if (!hasDuplicateName(rateSetting)) {
|
|
|
|
|
_context2.next = 10;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
message/* default */.ZP.warning('维度名称不能重复');
|
|
|
|
|
return _context2.abrupt("return");
|
|
|
|
|
case 10:
|
|
|
|
|
bodyData = JSON.parse(JSON.stringify(data));
|
|
|
|
|
bodyData.categoryId = params.categoryId;
|
|
|
|
|
if (!data.unified_setting) (_groupSettings = groupSettings) === null || _groupSettings === void 0 || _groupSettings.map(function (item) {
|
|
|
|
|
@ -5507,31 +5571,32 @@ var ScoreSetting_WorkList = function WorkList(_ref) {
|
|
|
|
|
})) === null || _item$group_name === void 0 ? void 0 : _item$group_name.toString().split(",");
|
|
|
|
|
});
|
|
|
|
|
bodyData.group_settings = groupSettings;
|
|
|
|
|
bodyData.score_details = rateSetting;
|
|
|
|
|
if (!data.allow_late) {
|
|
|
|
|
_context.next = 16;
|
|
|
|
|
_context2.next = 27;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (!data.unified_late) {
|
|
|
|
|
_context.next = 14;
|
|
|
|
|
_context2.next = 25;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (!(data.late_penalty === null || data.late_penalty === undefined || data.late_penalty < 0 || data.late_penalty > 100)) {
|
|
|
|
|
_context.next = 9;
|
|
|
|
|
_context2.next = 20;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
message/* default */.ZP.error('迟交扣分填写区间为0~100');
|
|
|
|
|
throw new String('迟交扣分填写区间为0~100');
|
|
|
|
|
case 9:
|
|
|
|
|
case 20:
|
|
|
|
|
if (data.late_time) {
|
|
|
|
|
_context.next = 12;
|
|
|
|
|
_context2.next = 23;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
message/* default */.ZP.error('请把截止时间填写完整');
|
|
|
|
|
throw new String('请把截止时间填写完整');
|
|
|
|
|
case 12:
|
|
|
|
|
_context.next = 16;
|
|
|
|
|
case 23:
|
|
|
|
|
_context2.next = 27;
|
|
|
|
|
break;
|
|
|
|
|
case 14:
|
|
|
|
|
case 25:
|
|
|
|
|
repairSettings = (_repairSettings = repairSettings) === null || _repairSettings === void 0 ? void 0 : _repairSettings.map(function (item) {
|
|
|
|
|
var _item$group_name2;
|
|
|
|
|
if (item.late_penalty === null || item.late_penalty === undefined || item.late_penalty < 0 || item.late_penalty > 100) {
|
|
|
|
|
@ -5557,7 +5622,7 @@ var ScoreSetting_WorkList = function WorkList(_ref) {
|
|
|
|
|
return item;
|
|
|
|
|
});
|
|
|
|
|
bodyData.allow_late_settings = repairSettings;
|
|
|
|
|
case 16:
|
|
|
|
|
case 27:
|
|
|
|
|
Object.keys(bodyData).map(function (item) {
|
|
|
|
|
if (item.indexOf("proportion") > -1) {
|
|
|
|
|
bodyData[item] = bodyData[item] / 100;
|
|
|
|
|
@ -5567,13 +5632,79 @@ var ScoreSetting_WorkList = function WorkList(_ref) {
|
|
|
|
|
// type: 'shixunHomeworks/updateSetting',
|
|
|
|
|
// payload: bodyData,
|
|
|
|
|
// }).then(res => {
|
|
|
|
|
_context.next = 19;
|
|
|
|
|
if (!(JSON.stringify(rateSetting) !== JSON.stringify(workSetting === null || workSetting === void 0 ? void 0 : workSetting.score_details) || (workSetting === null || workSetting === void 0 ? void 0 : workSetting.single_score) != (data === null || data === void 0 ? void 0 : data.single_score))) {
|
|
|
|
|
_context2.next = 32;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
modal/* default */.Z.confirm({
|
|
|
|
|
title: '更新成绩',
|
|
|
|
|
centered: true,
|
|
|
|
|
icon: null,
|
|
|
|
|
content: '您改动了本次作业的评分维度,这可能导致已完成作业的学生的成绩产生错误。点击“确定”按钮将保存最新设置并按最新设置更新全班成绩。',
|
|
|
|
|
cancelText: '取消',
|
|
|
|
|
okText: '确定',
|
|
|
|
|
onOk: function () {
|
|
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
var res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context.next = 2;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/homework_commons/".concat(params.categoryId, "/score_setting_with_normal.json"), {
|
|
|
|
|
method: 'post',
|
|
|
|
|
body: objectSpread2_default()({}, bodyData)
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
message/* default */.ZP.success('更新成功');
|
|
|
|
|
if (workSetting !== null && workSetting !== void 0 && workSetting.have_repeated && ((workSetting === null || workSetting === void 0 ? void 0 : workSetting.is_repeat_minus) !== (data === null || data === void 0 ? void 0 : data.is_repeat_minus) || (workSetting === null || workSetting === void 0 ? void 0 : workSetting.repeat_setting_score) !== (data === null || data === void 0 ? void 0 : data.repeat_setting_score) || (workSetting === null || workSetting === void 0 ? void 0 : workSetting.repeat_limit) !== (data === null || data === void 0 ? void 0 : data.repeat_limit))) {
|
|
|
|
|
modal/* default */.Z.confirm({
|
|
|
|
|
title: '更新成绩',
|
|
|
|
|
content: '您改动了本次作业的查重扣分规则,需要重新查重才能生效,生效后成绩将覆盖成最新的成绩',
|
|
|
|
|
cancelText: '取消',
|
|
|
|
|
okText: '立即查重',
|
|
|
|
|
onOk: function onOk() {
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'shixunHomeworks/setActionTabs',
|
|
|
|
|
payload: {
|
|
|
|
|
key: '代码查重',
|
|
|
|
|
// selectArrs: workList.student_works.map(v => v.id),
|
|
|
|
|
params: params
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
setDisabled(true);
|
|
|
|
|
getData();
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'shixunHomeworks/getWorkList',
|
|
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}));
|
|
|
|
|
function onOk() {
|
|
|
|
|
return _onOk.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
return onOk;
|
|
|
|
|
}()
|
|
|
|
|
});
|
|
|
|
|
_context2.next = 36;
|
|
|
|
|
break;
|
|
|
|
|
case 32:
|
|
|
|
|
_context2.next = 34;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/homework_commons/".concat(params.categoryId, "/score_setting_with_normal.json"), {
|
|
|
|
|
method: 'post',
|
|
|
|
|
body: objectSpread2_default()({}, bodyData)
|
|
|
|
|
});
|
|
|
|
|
case 19:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
case 34:
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
message/* default */.ZP.success('更新成功');
|
|
|
|
|
if (workSetting !== null && workSetting !== void 0 && workSetting.have_repeated && ((workSetting === null || workSetting === void 0 ? void 0 : workSetting.is_repeat_minus) !== (data === null || data === void 0 ? void 0 : data.is_repeat_minus) || (workSetting === null || workSetting === void 0 ? void 0 : workSetting.repeat_setting_score) !== (data === null || data === void 0 ? void 0 : data.repeat_setting_score) || (workSetting === null || workSetting === void 0 ? void 0 : workSetting.repeat_limit) !== (data === null || data === void 0 ? void 0 : data.repeat_limit))) {
|
|
|
|
|
@ -5601,12 +5732,11 @@ var ScoreSetting_WorkList = function WorkList(_ref) {
|
|
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
// })
|
|
|
|
|
case 21:
|
|
|
|
|
case 36:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}, _callee2);
|
|
|
|
|
}));
|
|
|
|
|
return function onHandleChange() {
|
|
|
|
|
return _ref2.apply(this, arguments);
|
|
|
|
|
@ -5623,6 +5753,23 @@ var ScoreSetting_WorkList = function WorkList(_ref) {
|
|
|
|
|
var disabledDate = function disabledDate(current) {
|
|
|
|
|
return current && current < dayjs_min_default()().startOf('minute');
|
|
|
|
|
};
|
|
|
|
|
var calcScore = function calcScore() {
|
|
|
|
|
return rateSetting.reduce(function (pre, cur) {
|
|
|
|
|
if (cur.score !== '') {
|
|
|
|
|
return pre + cur.score;
|
|
|
|
|
} else {
|
|
|
|
|
return pre;
|
|
|
|
|
}
|
|
|
|
|
}, 0);
|
|
|
|
|
};
|
|
|
|
|
function hasDuplicateName(arr) {
|
|
|
|
|
return arr.some(function (item, index) {
|
|
|
|
|
var foundItem = arr.find(function (innerItem, innerIndex) {
|
|
|
|
|
return innerItem.name === item.name && innerIndex !== index;
|
|
|
|
|
});
|
|
|
|
|
return foundItem !== undefined;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("section", {
|
|
|
|
|
className: [ConfigWorksmodules.form].join(' '),
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("aside", {
|
|
|
|
|
@ -5678,6 +5825,171 @@ var ScoreSetting_WorkList = function WorkList(_ref) {
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}), !(workList !== null && workList !== void 0 && workList.is_jupyter || workList !== null && workList !== void 0 && workList.is_jupyter_lab) && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
className: "mt25",
|
|
|
|
|
style: {
|
|
|
|
|
paddingLeft: 40
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
|
|
className: "mr10",
|
|
|
|
|
children: "\u8BC4\u5206\u7EF4\u5EA6"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
|
|
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: ["1.\u652F\u6301\u5355\u7EF4\u5EA6\u8BC4\u5206\u548C\u591A\u7EF4\u5EA6\u8BC4\u5206;", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "2.\u591A\u7EF4\u5EA6\u8BC4\u5206\u652F\u6301\u8BBE\u7F6E\u8BC4\u5206\u7EF4\u5EA6\u7684\u540D\u79F0\uFF0C\u4EE5\u53CA\u6BCF\u4E2A\u7EF4\u5EA6\u7684\u6EE1\u5206\u503C;", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "3.\u8BBE\u7F6E\u591A\u7EF4\u5EA6\u8BC4\u5206\u65F6\uFF0C\u6700\u591A\u53EA\u80FD\u6DFB\u52A05\u4E2A\u8BC4\u5206\u7EF4\u5EA6\u3002\u5B66\u751F\u7684\u7EFC\u5408\u5F97\u5206\u7B49\u4E8E\u5404\u4E2A\u7EF4\u5EA6\u7684\u8BC4\u5206\u4E4B\u548C\u3002", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {})]
|
|
|
|
|
}),
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: ConfigWorksmodules.tips,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-a-wenhaobeifen2"
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
span: 24,
|
|
|
|
|
className: "pl30 mt10"
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
paddingLeft: 65
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_radio/* default.Group */.ZP.Group, {
|
|
|
|
|
disabled: disabled,
|
|
|
|
|
value: data === null || data === void 0 ? void 0 : data.single_score,
|
|
|
|
|
onChange: function onChange(e) {
|
|
|
|
|
data.single_score = e.target.value;
|
|
|
|
|
setData(objectSpread2_default()({}, data));
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
|
|
value: true,
|
|
|
|
|
style: {
|
|
|
|
|
marginTop: 15
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
|
|
children: "\u5355\u7EF4\u5EA6\u8BC4\u5206"
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_radio/* default */.ZP, {
|
|
|
|
|
value: false,
|
|
|
|
|
style: {
|
|
|
|
|
marginTop: 15,
|
|
|
|
|
marginBottom: 20
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
|
|
children: "\u591A\u7EF4\u5EA6\u8BC4\u5206"
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
}), !data.single_score && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: ConfigWorksmodules.total,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
color: '#666666'
|
|
|
|
|
},
|
|
|
|
|
className: "mr10",
|
|
|
|
|
children: "\u5F53\u524D\u6EE1\u5206"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
color: '#E30000'
|
|
|
|
|
},
|
|
|
|
|
children: [calcScore().toFixed(2), "\u5206"]
|
|
|
|
|
})]
|
|
|
|
|
}), (_rateSetting2 = rateSetting) === null || _rateSetting2 === void 0 ? void 0 : _rateSetting2.map(function (item, index) {
|
|
|
|
|
var _rateSetting3;
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
span: 24,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(space/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
height: 85,
|
|
|
|
|
display: 'flex',
|
|
|
|
|
marginTop: 2,
|
|
|
|
|
background: '#F6F7F9',
|
|
|
|
|
borderRadius: '2px',
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
fontSize: 14
|
|
|
|
|
},
|
|
|
|
|
align: "baseline",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "ml20 mr10",
|
|
|
|
|
children: "\u7EF4\u5EA6\u540D\u79F0"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
|
|
disabled: disabled,
|
|
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u7EF4\u5EA6\u540D\u79F0",
|
|
|
|
|
style: {
|
|
|
|
|
width: 490
|
|
|
|
|
},
|
|
|
|
|
size: "large",
|
|
|
|
|
showCount: true,
|
|
|
|
|
maxLength: 10,
|
|
|
|
|
value: item === null || item === void 0 ? void 0 : item.name,
|
|
|
|
|
onChange: function onChange(e) {
|
|
|
|
|
console.log(e);
|
|
|
|
|
rateSetting[index].name = e.target.value.trim();
|
|
|
|
|
setRateSetting(toConsumableArray_default()(rateSetting));
|
|
|
|
|
}
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "mr10",
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: 80
|
|
|
|
|
},
|
|
|
|
|
children: "\u6EE1\u5206"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(input_number/* default */.Z, {
|
|
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u6EE1\u5206\u5206\u503C",
|
|
|
|
|
style: {
|
|
|
|
|
width: 180,
|
|
|
|
|
marginRight: 80
|
|
|
|
|
},
|
|
|
|
|
size: "large",
|
|
|
|
|
min: 0.01,
|
|
|
|
|
max: 100,
|
|
|
|
|
value: item === null || item === void 0 ? void 0 : item.score
|
|
|
|
|
// precision={2}
|
|
|
|
|
,
|
|
|
|
|
disabled: disabled,
|
|
|
|
|
onChange: function onChange(value) {
|
|
|
|
|
console.log(value);
|
|
|
|
|
if (value) {
|
|
|
|
|
rateSetting[index].score = Number(value.toFixed(2));
|
|
|
|
|
setRateSetting(toConsumableArray_default()(rateSetting));
|
|
|
|
|
} else {
|
|
|
|
|
rateSetting[index].score = '';
|
|
|
|
|
setRateSetting(toConsumableArray_default()(rateSetting));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// calcScore()
|
|
|
|
|
}
|
|
|
|
|
}), ((_rateSetting3 = rateSetting) === null || _rateSetting3 === void 0 ? void 0 : _rateSetting3.length) < 5 && !disabled && /*#__PURE__*/(0,jsx_runtime.jsx)(PlusCircleOutlined/* default */.Z, {
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setRateSetting([].concat(toConsumableArray_default()(rateSetting), [{
|
|
|
|
|
name: '',
|
|
|
|
|
score: ''
|
|
|
|
|
}]));
|
|
|
|
|
},
|
|
|
|
|
style: {
|
|
|
|
|
color: '#2FA34F',
|
|
|
|
|
marginRight: 15
|
|
|
|
|
}
|
|
|
|
|
}), index > 1 && !disabled && /*#__PURE__*/(0,jsx_runtime.jsx)(MinusCircleOutlined/* default */.Z, {
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
rateSetting.splice(index, 1);
|
|
|
|
|
console.log(rateSetting);
|
|
|
|
|
setRateSetting(toConsumableArray_default()(rateSetting));
|
|
|
|
|
},
|
|
|
|
|
style: {
|
|
|
|
|
color: '#E30000'
|
|
|
|
|
}
|
|
|
|
|
}), !rateSetting[index].name && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: ConfigWorksmodules.tip1,
|
|
|
|
|
children: "\u8BF7\u8F93\u5165\u7EF4\u5EA6\u540D\u79F0"
|
|
|
|
|
}), !rateSetting[index].score && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: ConfigWorksmodules.tip2,
|
|
|
|
|
children: "\u8BF7\u8F93\u5165\u6EE1\u5206\u5206\u503C"
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
className: "mt25",
|
|
|
|
|
style: {
|
|
|
|
|
@ -5937,10 +6249,10 @@ var ScoreSetting_WorkList = function WorkList(_ref) {
|
|
|
|
|
onCancel: function onCancel() {
|
|
|
|
|
setisshow(false);
|
|
|
|
|
},
|
|
|
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
|
|
var bodyData, res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
bodyData = JSON.parse(JSON.stringify(data));
|
|
|
|
|
Object.keys(bodyData).map(function (item) {
|
|
|
|
|
@ -5948,7 +6260,7 @@ var ScoreSetting_WorkList = function WorkList(_ref) {
|
|
|
|
|
bodyData[item] = bodyData[item] / 100;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
_context2.next = 4;
|
|
|
|
|
_context3.next = 4;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/courses/".concat(params.coursesId, "/homework_commons/set_default_score_setting.json"), {
|
|
|
|
|
method: 'post',
|
|
|
|
|
body: {
|
|
|
|
|
@ -5957,16 +6269,16 @@ var ScoreSetting_WorkList = function WorkList(_ref) {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 4:
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
res = _context3.sent;
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
message/* default */.ZP.success('设置成功');
|
|
|
|
|
setisshow(false);
|
|
|
|
|
}
|
|
|
|
|
case 6:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
return _context3.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee2);
|
|
|
|
|
}, _callee3);
|
|
|
|
|
})),
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
children: "\u60A8\u662F\u5426\u8981\u5C06\u5F53\u524D\u8BC4\u5206\u89C4\u5219\u8BBE\u7F6E\u4E3A\u60A8\u7684\u9ED8\u8BA4\u89C4\u5219\uFF0C\u8BE5\u9ED8\u8BA4\u89C4\u5219\u4EC5\u5E94\u7528\u4E8E\u60A8\u540E\u7EED\u65B0\u5EFA\u7684\u4F5C\u4E1A\uFF0C\u4E14\u4E0D\u4F1A\u5F71\u54CD\u5176\u4ED6\u8001\u5E08\u65B0\u5EFA\u4F5C\u4E1A\u7684\u8BC4\u5206\u89C4\u5219\u3002"
|