|
|
|
|
@ -20588,6 +20588,7 @@ var NewLearnPathPage = function NewLearnPathPage(_ref) {
|
|
|
|
|
};
|
|
|
|
|
var handleFinish = /*#__PURE__*/function () {
|
|
|
|
|
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(values) {
|
|
|
|
|
var _learning_modes;
|
|
|
|
|
var learning_modes, allIds, res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
|
|
|
|
|
while (1) switch (_context5.prev = _context5.next) {
|
|
|
|
|
@ -20660,31 +20661,38 @@ var NewLearnPathPage = function NewLearnPathPage(_ref) {
|
|
|
|
|
}
|
|
|
|
|
console.log("learning_modes--", learning_modes);
|
|
|
|
|
// setSubMitLoading(true);
|
|
|
|
|
if (!(((_learning_modes = learning_modes) === null || _learning_modes === void 0 ? void 0 : _learning_modes.length) === 0)) {
|
|
|
|
|
_context5.next = 7;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
message/* default */.ZP.info("\u8BF7\u6DFB\u52A0".concat(values.mode === 1 ? '阶段' : '模块'));
|
|
|
|
|
return _context5.abrupt("return");
|
|
|
|
|
case 7:
|
|
|
|
|
if (!learningPathId) {
|
|
|
|
|
_context5.next = 10;
|
|
|
|
|
_context5.next = 13;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
_context5.next = 7;
|
|
|
|
|
_context5.next = 10;
|
|
|
|
|
return (0,paths/* updateShixunList */.TR)(objectSpread2_default()(objectSpread2_default()({
|
|
|
|
|
id: params.pathId
|
|
|
|
|
}, values), {}, {
|
|
|
|
|
subject_learning_path_id: learningPathId,
|
|
|
|
|
learning_modes: learning_modes
|
|
|
|
|
}));
|
|
|
|
|
case 7:
|
|
|
|
|
case 10:
|
|
|
|
|
_context5.t0 = _context5.sent;
|
|
|
|
|
_context5.next = 13;
|
|
|
|
|
_context5.next = 16;
|
|
|
|
|
break;
|
|
|
|
|
case 10:
|
|
|
|
|
_context5.next = 12;
|
|
|
|
|
case 13:
|
|
|
|
|
_context5.next = 15;
|
|
|
|
|
return (0,paths/* addLearningPath */.$U)(objectSpread2_default()(objectSpread2_default()({
|
|
|
|
|
pathId: params.pathId
|
|
|
|
|
}, values), {}, {
|
|
|
|
|
learning_modes: learning_modes
|
|
|
|
|
}));
|
|
|
|
|
case 12:
|
|
|
|
|
case 15:
|
|
|
|
|
_context5.t0 = _context5.sent;
|
|
|
|
|
case 13:
|
|
|
|
|
case 16:
|
|
|
|
|
res = _context5.t0;
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
message/* default */.ZP.success(!!learningPathId ? '编辑成功!' : '新建成功!');
|
|
|
|
|
@ -20697,7 +20705,7 @@ var NewLearnPathPage = function NewLearnPathPage(_ref) {
|
|
|
|
|
setShixunModeList([]);
|
|
|
|
|
}
|
|
|
|
|
// setSubMitLoading(false);
|
|
|
|
|
case 15:
|
|
|
|
|
case 18:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context5.stop();
|
|
|
|
|
}
|
|
|
|
|
@ -20764,10 +20772,15 @@ var NewLearnPathPage = function NewLearnPathPage(_ref) {
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var handleFinish2 = /*#__PURE__*/function () {
|
|
|
|
|
var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6(values) {
|
|
|
|
|
var _ref7 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
|
|
|
|
|
var values;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
|
|
|
|
|
while (1) switch (_context6.prev = _context6.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context6.next = 2;
|
|
|
|
|
return form2.validateFields();
|
|
|
|
|
case 2:
|
|
|
|
|
values = _context6.sent;
|
|
|
|
|
console.log('values---', values);
|
|
|
|
|
console.log('attachment_id_b', attachment_id_b);
|
|
|
|
|
if (currShixunIndex > -1) {
|
|
|
|
|
@ -20777,13 +20790,13 @@ var NewLearnPathPage = function NewLearnPathPage(_ref) {
|
|
|
|
|
}
|
|
|
|
|
setShixunModeList(toConsumableArray_default()(shixunModeList));
|
|
|
|
|
setModeVis(false);
|
|
|
|
|
case 5:
|
|
|
|
|
case 8:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context6.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee6);
|
|
|
|
|
}));
|
|
|
|
|
return function handleFinish2(_x4) {
|
|
|
|
|
return function handleFinish2() {
|
|
|
|
|
return _ref7.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
@ -20796,6 +20809,9 @@ var NewLearnPathPage = function NewLearnPathPage(_ref) {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(drawer/* default */.Z, {
|
|
|
|
|
placement: "bottom",
|
|
|
|
|
height: "100%",
|
|
|
|
|
style: {
|
|
|
|
|
overflowY: 'auto'
|
|
|
|
|
},
|
|
|
|
|
closable: false
|
|
|
|
|
// onClose={this.onClose}
|
|
|
|
|
,
|
|
|
|
|
@ -21279,11 +21295,19 @@ var NewLearnPathPage = function NewLearnPathPage(_ref) {
|
|
|
|
|
while (1) switch (_context7.prev = _context7.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
if (formValue2.mode_type === 2) {
|
|
|
|
|
// if (selectShixunRowKeys.length === 0) {
|
|
|
|
|
// message.info('请选择项目!');
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
form2.setFieldValue('relation_pro', {
|
|
|
|
|
selectShixunRowKeys: selectShixunRowKeys,
|
|
|
|
|
selectShixunRows: selectShixunRows
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
// if (checkedShixunKeys.length === 0) {
|
|
|
|
|
// message.info('请选择章节!');
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
form2.setFieldValue('relation_pro', {
|
|
|
|
|
checkedShixunKeys: checkedShixunKeys,
|
|
|
|
|
checkedShixunNodes: checkedShixunNodes
|
|
|
|
|
@ -21343,32 +21367,41 @@ var NewLearnPathPage = function NewLearnPathPage(_ref) {
|
|
|
|
|
label: '项目模块'
|
|
|
|
|
}]
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z.Item, {
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
name: "cover_id",
|
|
|
|
|
label: "\u5C01\u9762\u56FE"
|
|
|
|
|
// rules={[
|
|
|
|
|
// { required: true, message: '请上传封面图' },
|
|
|
|
|
// ]}
|
|
|
|
|
,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(upload/* default */.Z, {
|
|
|
|
|
withCredentials: true,
|
|
|
|
|
name: "file",
|
|
|
|
|
showUploadList: false,
|
|
|
|
|
action: "".concat(env/* default */.Z.API_SERVER, "/api/attachments.json"),
|
|
|
|
|
beforeUpload: beforeUpload,
|
|
|
|
|
onChange: handleChange_s,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
|
|
|
|
|
loading: imgLoadings,
|
|
|
|
|
shape: "default",
|
|
|
|
|
icon: /*#__PURE__*/(0,jsx_runtime.jsx)(UploadOutlined/* default */.Z, {}),
|
|
|
|
|
children: "\u70B9\u51FB\u4E0A\u4F20"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
color: '#9096A3'
|
|
|
|
|
display: 'flex',
|
|
|
|
|
alignItems: 'center'
|
|
|
|
|
},
|
|
|
|
|
children: "(\u9009\u586B\u9879\uFF0C\u4E0D\u4E0A\u4F20\u5219\u663E\u793A\u9ED8\u8BA4\u56FE\u7247)"
|
|
|
|
|
})]
|
|
|
|
|
}), renderImg_s()]
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(upload/* default */.Z, {
|
|
|
|
|
withCredentials: true,
|
|
|
|
|
name: "file",
|
|
|
|
|
showUploadList: false,
|
|
|
|
|
action: "".concat(env/* default */.Z.API_SERVER, "/api/attachments.json"),
|
|
|
|
|
beforeUpload: beforeUpload,
|
|
|
|
|
onChange: handleChange_s,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
|
|
|
|
|
loading: imgLoadings,
|
|
|
|
|
shape: "default",
|
|
|
|
|
icon: /*#__PURE__*/(0,jsx_runtime.jsx)(UploadOutlined/* default */.Z, {}),
|
|
|
|
|
children: "\u70B9\u51FB\u4E0A\u4F20"
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
color: '#9096A3',
|
|
|
|
|
marginLeft: '8px'
|
|
|
|
|
},
|
|
|
|
|
children: "(\u9009\u586B\u9879\uFF0C\u4E0D\u4E0A\u4F20\u5219\u663E\u793A\u9ED8\u8BA4\u56FE\u7247)"
|
|
|
|
|
})]
|
|
|
|
|
}), attachment_id_b && renderImg_s()]
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
name: "relation_pro",
|