Auto Submit

dev_local_v9_test6
autosubmit 1 year ago
parent 2144aae35f
commit 0592cb43cb

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

@ -20041,7 +20041,8 @@ var NewLearnPathPage = function NewLearnPathPage(_ref) {
var _ref$learningPathId = _ref.learningPathId,
learningPathId = _ref$learningPathId === void 0 ? undefined : _ref$learningPathId,
visable = _ref.visable,
onCancel = _ref.onCancel;
onCancel = _ref.onCancel,
onOk = _ref.onOk;
var params = (0,_umi_production_exports.useParams)();
var _Form$useForm = es_form/* default */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
@ -20696,7 +20697,7 @@ var NewLearnPathPage = function NewLearnPathPage(_ref) {
res = _context5.t0;
if (res.status === 0) {
message/* default */.ZP.success(!!learningPathId ? '编辑成功!' : '新建成功!');
onCancel();
onOk();
form.resetFields();
setCheckedClassLabel([]);
setCheckedClassValue([]);
@ -21035,29 +21036,32 @@ var NewLearnPathPage = function NewLearnPathPage(_ref) {
style: {
marginTop: '15px',
marginLeft: '80px',
marginBottom: '24px'
marginBottom: '24px',
display: 'flex',
alignItems: 'center',
flexFlow: 'wrap',
gap: '20px'
},
children: checkedClassLabel.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: AddLearnPathmodules.classSty,
style: {
marginLeft: index === 0 ? '0px' : '20px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: item
}), /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-guanbi5 ml10 current",
style: {
color: '#979797',
fontSize: '10px'
},
onClick: function onClick() {
checkedClassValue.splice(index, 1);
checkedClassLabel.splice(index, 1);
setCheckedClassValue(toConsumableArray_default()(checkedClassValue));
setCheckedClassLabel(toConsumableArray_default()(checkedClassLabel));
}
})]
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
className: AddLearnPathmodules.classSty,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: item
}), /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-guanbi5 ml10 current",
style: {
color: '#979797',
fontSize: '10px'
},
onClick: function onClick() {
checkedClassValue.splice(index, 1);
checkedClassLabel.splice(index, 1);
setCheckedClassValue(toConsumableArray_default()(checkedClassValue));
setCheckedClassLabel(toConsumableArray_default()(checkedClassLabel));
}
})]
})
}, index);
})
})]
@ -21095,7 +21099,9 @@ var NewLearnPathPage = function NewLearnPathPage(_ref) {
children: "\u53D6\u6D88"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
onClick: function onClick() {
form.setFieldValue('course_group_ids', checkedClassValue);
if ((checkedClassValue === null || checkedClassValue === void 0 ? void 0 : checkedClassValue.length) > 0) {
form.setFieldValue('course_group_ids', checkedClassValue);
}
form.submit();
},
className: AddLearnPathmodules.submit_button,
@ -21112,6 +21118,7 @@ var NewLearnPathPage = function NewLearnPathPage(_ref) {
afterClose: function afterClose() {
setCheckedKeys2([]);
setCheckedNodes2([]);
setCheckAll(false);
},
onOk: function onOk() {
if (formValue.mode === 2) {
@ -21232,6 +21239,10 @@ var NewLearnPathPage = function NewLearnPathPage(_ref) {
keyboard: false,
maskClosable: false,
destroyOnClose: true,
afterClose: function afterClose() {
setCheckClassAll(false);
setIndeterminate(false);
},
title: "\u9009\u62E9\u73ED\u7EA7\uFF08\u53EF\u591A\u9009\uFF09",
open: classVis,
onOk: function onOk() {
@ -21300,19 +21311,23 @@ var NewLearnPathPage = function NewLearnPathPage(_ref) {
// message.info('请选择项目!');
// return;
// }
form2.setFieldValue('relation_pro', {
selectShixunRowKeys: selectShixunRowKeys,
selectShixunRows: selectShixunRows
});
if ((selectShixunRowKeys === null || selectShixunRowKeys === void 0 ? void 0 : selectShixunRowKeys.length) > 0) {
form2.setFieldValue('relation_pro', {
selectShixunRowKeys: selectShixunRowKeys,
selectShixunRows: selectShixunRows
});
}
} else {
// if (checkedShixunKeys.length === 0) {
// message.info('请选择章节!');
// return;
// }
form2.setFieldValue('relation_pro', {
checkedShixunKeys: checkedShixunKeys,
checkedShixunNodes: checkedShixunNodes
});
if ((checkedShixunKeys === null || checkedShixunKeys === void 0 ? void 0 : checkedShixunKeys.length) > 0) {
form2.setFieldValue('relation_pro', {
checkedShixunKeys: checkedShixunKeys,
checkedShixunNodes: checkedShixunNodes
});
}
}
form2.setFieldValue('cover_id', attachment_id_b);
a = form2.getFieldsValue();
@ -21409,7 +21424,7 @@ var NewLearnPathPage = function NewLearnPathPage(_ref) {
label: formValue2.mode_type === 1 ? '关联章节' : '关联项目',
rules: [{
required: true,
message: "".concat(formValue2.type === 1 ? '请选择章节模块' : '请选择项目模块')
message: "".concat(formValue2.mode_type === 1 ? '请选择章节模块' : '请选择项目模块')
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
shape: "default",
@ -21659,16 +21674,21 @@ var LearnPath = function LearnPath(_ref) {
_useState12 = slicedToArray_default()(_useState11, 2),
isLoading = _useState12[0],
setIsLoading = _useState12[1];
var _useState13 = (0,_react_17_0_2_react.useState)(false),
_useState14 = slicedToArray_default()(_useState13, 2),
delOkLoading = _useState14[0],
setDelOkLoading = _useState14[1];
console.log('params', params);
//学生端
var _useState13 = (0,_react_17_0_2_react.useState)({}),
_useState14 = slicedToArray_default()(_useState13, 2),
learnModes = _useState14[0],
setLearnModes = _useState14[1];
var _useState15 = (0,_react_17_0_2_react.useState)(false),
var _useState15 = (0,_react_17_0_2_react.useState)({}),
_useState16 = slicedToArray_default()(_useState15, 2),
detailVis = _useState16[0],
setDetailVis = _useState16[1];
learnModes = _useState16[0],
setLearnModes = _useState16[1];
var _useState17 = (0,_react_17_0_2_react.useState)(false),
_useState18 = slicedToArray_default()(_useState17, 2),
detailVis = _useState18[0],
setDetailVis = _useState18[1];
var getPathData = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var res, _res$data;
@ -21678,7 +21698,7 @@ var LearnPath = function LearnPath(_ref) {
setIsLoading(true);
_context.next = 3;
return (0,paths/* getLearningPathList */.fb)({
pathId: params === null || params === void 0 ? void 0 : params.pathId,
id: params === null || params === void 0 ? void 0 : params.pathId,
keyword: keyWords
});
case 3:
@ -21703,17 +21723,21 @@ var LearnPath = function LearnPath(_ref) {
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
setDelOkLoading(true);
_context2.next = 3;
return (0,paths/* delLearningPath */.Em)({
pathId: params === null || params === void 0 ? void 0 : params.pathId,
id: params === null || params === void 0 ? void 0 : params.pathId,
subject_learning_path_id: subjectId
});
case 2:
case 3:
res = _context2.sent;
if (res.status === 0) {
message/* default */.ZP.success('删除成功!');
}
case 4:
setDelPathVis(false);
getPathData();
setDelOkLoading(false);
case 8:
case "end":
return _context2.stop();
}
@ -21845,9 +21869,12 @@ var LearnPath = function LearnPath(_ref) {
}), /*#__PURE__*/(0,jsx_runtime.jsx)(AddLearnPath, {
learningPathId: learnPathId,
visable: createPathVis,
onCancel: function onCancel() {
onOk: function onOk() {
getPathData();
setCreatePathVis(false);
},
onCancel: function onCancel() {
setCreatePathVis(false);
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
centered: true,
@ -21857,10 +21884,11 @@ var LearnPath = function LearnPath(_ref) {
destroyOnClose: true,
title: "\u63D0\u793A",
open: delPathVis,
okButtonProps: {
loading: delOkLoading
},
onOk: function onOk() {
deleteLearnPath(delPathId);
setDelPathVis(false);
getPathData();
},
onCancel: function onCancel() {
setDelPathVis(false);

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