|
|
|
|
@ -6005,7 +6005,13 @@ var WorkList = function WorkList(_ref) {
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
|
|
}), (exerciseList === null || exerciseList === void 0 ? void 0 : exerciseList.status) === -3 && !(0,authority/* isStudent */.dE)() && /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {
|
|
|
|
|
customText: "\u4FEE\u6539\u7ED9\u5206\u65B9\u5F0F\u91CD\u65B0\u5224\u5206\u4E2D\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85...",
|
|
|
|
|
styles: {
|
|
|
|
|
margin: '0 auto',
|
|
|
|
|
padding: 100
|
|
|
|
|
}
|
|
|
|
|
}), (exerciseList === null || exerciseList === void 0 ? void 0 : exerciseList.status) !== -3 && /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
|
|
|
|
|
className: "mt30",
|
|
|
|
|
loading: loading['exercise/getExerciseList'],
|
|
|
|
|
hideOnSinglePage: true,
|
|
|
|
|
@ -18173,32 +18179,6 @@ var PreventCheatingSettings_PublishSettings = function PublishSettings(_ref) {
|
|
|
|
|
children: "\u591A\u9009\u9898\u90E8\u5206\u5F97\u5206"
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}), (commonHeader === null || commonHeader === void 0 ? void 0 : commonHeader.is_random) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
name: "use_blank_score",
|
|
|
|
|
valuePropName: "checked",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
|
|
disabled: (commonHeader === null || commonHeader === void 0 ? void 0 : commonHeader.exercise_status) != 1 ? true : disabled,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("strong", {
|
|
|
|
|
children: "\u591A\u9009\u9898\u90E8\u5206\u5F97\u5206"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
|
|
placement: "right",
|
|
|
|
|
overlayStyle: {
|
|
|
|
|
maxWidth: 600
|
|
|
|
|
},
|
|
|
|
|
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: ["\u672A\u52FE\u9009 \u5168\u5BF9\u7ED9\u5206\uFF1A\u9009\u4E2D\u7684\u7B54\u6848\u5168\u90E8\u6B63\u786E\u4E14\u672A\u6F0F\u9009\u6B63\u786E\u7B54\u6848\uFF0C\u5219\u83B7\u5F97\u8BE5\u5C0F\u9898\u7684\u5206\u503C\u3002", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u5DF2\u52FE\u9009 \u6F0F\u9009\u7ED9\u5206\uFF1A\u9009\u4E2D\u7684\u7B54\u6848\u5168\u90E8\u6B63\u786E\u4F46\u6709\u6F0F\u9009\u6B63\u786E\u7B54\u6848\uFF0C\u5219\u83B7\u5F97\u7684\u5206\u503C=\u9009\u4E2D\u7684\u7B54\u6848\u4E2A\u6570 * (\u8BE5\u5C0F\u9898\u5206\u503C / \u6B63\u786E\u7B54\u6848\u7684\u4E2A\u6570)\uFF1B"]
|
|
|
|
|
}),
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(QuestionCircleOutlined/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
cursor: 'pointer',
|
|
|
|
|
color: '#4C6FFF',
|
|
|
|
|
marginLeft: 8
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
}), ((0,authority/* isAdminOrCreator */.aN)() || (exercise === null || exercise === void 0 || (_exercise$commonHeade = exercise.commonHeader) === null || _exercise$commonHeade === void 0 ? void 0 : _exercise$commonHeade.exercise_author)) && /*#__PURE__*/(0,jsx_runtime.jsx)(FixedButton/* FixedButton */.t, {
|
|
|
|
|
okText: "\u4FDD\u5B58\u8BBE\u7F6E",
|
|
|
|
|
@ -18237,6 +18217,7 @@ var PreventCheatingSettings_PublishSettings = function PublishSettings(_ref) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var PropertySettings_PublishSettings = function PublishSettings(_ref) {
|
|
|
|
|
var _exercise$commonHeade;
|
|
|
|
|
var exercise = _ref.exercise,
|
|
|
|
|
@ -18317,19 +18298,97 @@ var PropertySettings_PublishSettings = function PublishSettings(_ref) {
|
|
|
|
|
handleUpdate(bodyData);
|
|
|
|
|
};
|
|
|
|
|
var handleUpdate = /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(bodyData) {
|
|
|
|
|
var 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(bodyData) {
|
|
|
|
|
var _workSetting$exercise;
|
|
|
|
|
var modal, res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
if (!((bodyData === null || bodyData === void 0 ? void 0 : bodyData.use_blank_score) !== (workSetting === null || workSetting === void 0 || (_workSetting$exercise = workSetting.exercise) === null || _workSetting$exercise === void 0 ? void 0 : _workSetting$exercise.use_blank_score))) {
|
|
|
|
|
_context2.next = 4;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
modal = es_modal/* default */.Z.confirm({
|
|
|
|
|
closable: true,
|
|
|
|
|
width: 500,
|
|
|
|
|
centered: true,
|
|
|
|
|
icon: null,
|
|
|
|
|
title: '提示',
|
|
|
|
|
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:
|
|
|
|
|
setPageLoading(true);
|
|
|
|
|
_context.next = 3;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/exercises/".concat(params === null || params === void 0 ? void 0 : params.categoryId, "/property_settings.json"), {
|
|
|
|
|
method: 'post',
|
|
|
|
|
body: bodyData
|
|
|
|
|
});
|
|
|
|
|
case 3:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
setPageLoading(false);
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
message/* default */.ZP.success('保存成功');
|
|
|
|
|
handleIsSetData("");
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'exercise/getCommonHeader',
|
|
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
|
|
});
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'exercise/getWorkSetting',
|
|
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
|
|
});
|
|
|
|
|
setPageLoading(false);
|
|
|
|
|
// setDisabled(true)
|
|
|
|
|
}
|
|
|
|
|
case 6:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}));
|
|
|
|
|
function onOk() {
|
|
|
|
|
return _onOk.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
return onOk;
|
|
|
|
|
}()
|
|
|
|
|
});
|
|
|
|
|
if (bodyData !== null && bodyData !== void 0 && bodyData.use_blank_score) {
|
|
|
|
|
modal.update({
|
|
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: ["\u60A8\u5DF2\u52FE\u9009", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
color: '#165DFF'
|
|
|
|
|
},
|
|
|
|
|
children: "\u201C \u591A\u9009\u9898\u6F0F\u9009\u90E8\u5206\u7ED9\u5206 \u201D"
|
|
|
|
|
}), "\uFF0C\u4FDD\u5B58\u8BBE\u7F6E\u540E\u5C06\u4F1A\u6309\u7167\u65B0\u7684\u7ED9\u5206\u65B9\u5F0F\u91CD\u65B0\u8BA1\u7B97\u5206\u503C\u3002\u662F\u5426\u786E\u5B9A\u4FEE\u6539\uFF1F"]
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
modal.update({
|
|
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: ["\u60A8\u5DF2\u53D6\u6D88\u52FE\u9009", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
color: '#165DFF'
|
|
|
|
|
},
|
|
|
|
|
children: "\u201C \u591A\u9009\u9898\u6F0F\u9009\u90E8\u5206\u7ED9\u5206 \u201D"
|
|
|
|
|
}), "\uFF0C\u4FDD\u5B58\u8BBE\u7F6E\u540E\u5C06\u4F1A\u6309\u7167\u65B0\u7684\u7ED9\u5206\u65B9\u5F0F\u91CD\u65B0\u8BA1\u7B97\u5206\u503C\u3002\u662F\u5426\u786E\u5B9A\u4FEE\u6539\uFF1F"]
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
return _context2.abrupt("return");
|
|
|
|
|
case 4:
|
|
|
|
|
setPageLoading(true);
|
|
|
|
|
_context.next = 3;
|
|
|
|
|
_context2.next = 7;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/exercises/".concat(params === null || params === void 0 ? void 0 : params.categoryId, "/property_settings.json"), {
|
|
|
|
|
method: 'post',
|
|
|
|
|
body: bodyData
|
|
|
|
|
});
|
|
|
|
|
case 3:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
case 7:
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
setPageLoading(false);
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
message/* default */.ZP.success('保存成功');
|
|
|
|
|
handleIsSetData("");
|
|
|
|
|
@ -18341,14 +18400,13 @@ var PropertySettings_PublishSettings = function PublishSettings(_ref) {
|
|
|
|
|
type: 'exercise/getWorkSetting',
|
|
|
|
|
payload: objectSpread2_default()({}, params)
|
|
|
|
|
});
|
|
|
|
|
setPageLoading(false);
|
|
|
|
|
// setDisabled(true)
|
|
|
|
|
}
|
|
|
|
|
case 5:
|
|
|
|
|
case 10:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}, _callee2);
|
|
|
|
|
}));
|
|
|
|
|
return function handleUpdate(_x) {
|
|
|
|
|
return _ref2.apply(this, arguments);
|
|
|
|
|
@ -18358,7 +18416,45 @@ var PropertySettings_PublishSettings = function PublishSettings(_ref) {
|
|
|
|
|
className: ConfigWorksmodules.scoreSettingWrapper,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(spin/* default */.Z, {
|
|
|
|
|
spinning: loading['exercise/getWorkSetting'] || pageLoading,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
|
|
|
|
|
align: "middle",
|
|
|
|
|
justify: "space-between",
|
|
|
|
|
className: "mt30 mb20",
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_checkbox/* default */.Z, {
|
|
|
|
|
checked: data.use_blank_score,
|
|
|
|
|
disabled: disabled,
|
|
|
|
|
onChange: function onChange(e) {
|
|
|
|
|
data.use_blank_score = e.target.checked;
|
|
|
|
|
setData(Object.assign({}, data));
|
|
|
|
|
},
|
|
|
|
|
className: ConfigWorksmodules.mainRuleText,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
fontWeight: 400
|
|
|
|
|
},
|
|
|
|
|
children: "\u591A\u9009\u9898\u6F0F\u9009\u90E8\u5206\u7ED9\u5206"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
|
|
placement: "right",
|
|
|
|
|
overlayStyle: {
|
|
|
|
|
maxWidth: 600
|
|
|
|
|
},
|
|
|
|
|
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: ["\u672A\u52FE\u9009 \u5168\u5BF9\u7ED9\u5206\uFF1A\u9009\u4E2D\u7684\u7B54\u6848\u5168\u90E8\u6B63\u786E\u4E14\u672A\u6F0F\u9009\u6B63\u786E\u7B54\u6848\uFF0C\u5219\u83B7\u5F97\u8BE5\u5C0F\u9898\u7684\u5206\u503C\uFF1B", /*#__PURE__*/(0,jsx_runtime.jsx)("br", {}), "\u5DF2\u52FE\u9009 \u6F0F\u9009\u7ED9\u5206\uFF1A\u9009\u4E2D\u7684\u7B54\u6848\u5168\u90E8\u6B63\u786E\u4F46\u6709\u6F0F\u9009\u6B63\u786E\u7B54\u6848\uFF0C\u5219\u83B7\u5F97\u7684\u5206\u503C=\u9009\u4E2D\u7684\u7B54\u6848\u4E2A\u6570 * (\u8BE5\u5C0F\u9898\u5206\u503C / \u6B63\u786E\u7B54\u6848\u7684\u4E2A\u6570)\u3002"]
|
|
|
|
|
}),
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(QuestionCircleOutlined/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
cursor: 'pointer',
|
|
|
|
|
color: '#4C6FFF',
|
|
|
|
|
marginLeft: 8
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(row/* default */.Z, {
|
|
|
|
|
align: "middle",
|
|
|
|
|
justify: "space-between",
|
|
|
|
|
className: "mt30 mb20",
|