|
|
|
|
@ -659,7 +659,11 @@ var NewCoursePage = function NewCoursePage(_ref) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
|
|
|
|
|
while (1) switch (_context4.prev = _context4.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
bodyData = objectSpread2_default()({}, formValue);
|
|
|
|
|
_context4.next = 2;
|
|
|
|
|
return form.getFieldsValue();
|
|
|
|
|
case 2:
|
|
|
|
|
bodyData = _context4.sent;
|
|
|
|
|
bodyData.base_on_project = 1;
|
|
|
|
|
if (bodyData.attachment_ids) {
|
|
|
|
|
bodyData.attachment_ids = bodyData === null || bodyData === void 0 ? void 0 : (_bodyData$attachment_ = bodyData.attachment_ids) === null || _bodyData$attachment_ === void 0 ? void 0 : _bodyData$attachment_.map(function (v) {
|
|
|
|
|
return v.response.id;
|
|
|
|
|
@ -677,7 +681,7 @@ var NewCoursePage = function NewCoursePage(_ref) {
|
|
|
|
|
} else {
|
|
|
|
|
handleSubmit(bodyData);
|
|
|
|
|
}
|
|
|
|
|
case 3:
|
|
|
|
|
case 6:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context4.stop();
|
|
|
|
|
}
|
|
|
|
|
@ -721,10 +725,9 @@ var NewCoursePage = function NewCoursePage(_ref) {
|
|
|
|
|
onValuesChange: function onValuesChange() {
|
|
|
|
|
setFormValue(objectSpread2_default()({}, form.getFieldsValue()));
|
|
|
|
|
console.log("formValue:", formValue);
|
|
|
|
|
},
|
|
|
|
|
initialValues: [{
|
|
|
|
|
base_on_project: 1
|
|
|
|
|
}],
|
|
|
|
|
}
|
|
|
|
|
// initialValues={[{ base_on_project: 1 }]}
|
|
|
|
|
,
|
|
|
|
|
onFinish: handleFinish,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: EditWorkmodules.mdWrap,
|
|
|
|
|
|