|
|
|
|
@ -86,6 +86,7 @@ var MyEditorForm = function MyEditorForm(_ref) {
|
|
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div", {
|
|
|
|
|
id: scrollId || "",
|
|
|
|
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_index__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, _root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()(_root_workspace_ppte5yg23_local_v9_test5_node_modules_babel_runtime_7_23_2_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0___default()({}, props), {}, {
|
|
|
|
|
defaultvalue: props.defaultvalue || value,
|
|
|
|
|
onChange: function onChange(a, b) {
|
|
|
|
|
if (!!(b !== null && b !== void 0 && b.length)) _onChange(a, b);else _onChange(a);
|
|
|
|
|
}
|
|
|
|
|
@ -503,7 +504,7 @@ var TitleDom = function TitleDom(_ref) {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(col/* default */.Z, {
|
|
|
|
|
style: {
|
|
|
|
|
color: "#333",
|
|
|
|
|
letterSpacing: "5px",
|
|
|
|
|
letterSpacing: props.coreCE == "CN" ? "5px" : "0px",
|
|
|
|
|
fontWeight: 600,
|
|
|
|
|
fontSize: "20px"
|
|
|
|
|
},
|
|
|
|
|
@ -547,7 +548,7 @@ var Page = function Page(_ref2) {
|
|
|
|
|
_coreCurriculum$Knowl = coreCurriculum.KnowledgeList,
|
|
|
|
|
subject_modules_en = _coreCurriculum$Knowl.subject_modules_en,
|
|
|
|
|
subject_modules_cn = _coreCurriculum$Knowl.subject_modules_cn;
|
|
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(false),
|
|
|
|
|
var _useState3 = (0,_react_17_0_2_react.useState)(true),
|
|
|
|
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
|
|
|
openAnchor = _useState4[0],
|
|
|
|
|
setOpenAnchor = _useState4[1];
|
|
|
|
|
@ -573,14 +574,13 @@ var Page = function Page(_ref2) {
|
|
|
|
|
maxCount: 1,
|
|
|
|
|
// accept: ".pdf, .docx, .doc, .xlsx, .xls, .ppt, .pptx, .zip,.jpg,.png",
|
|
|
|
|
accept: ".xlsx, .xls",
|
|
|
|
|
withCredentials: true,
|
|
|
|
|
beforeUpload: function beforeUpload(file) {
|
|
|
|
|
var fileSize = file.size / 1024 / 1024;
|
|
|
|
|
if (fileSize == 0) {
|
|
|
|
|
message/* default */.ZP.error("".concat(file.name, " \u65E0\u6CD5\u4E0A\u4F20\u3002").concat(fileSize == 0 ? "文件内容不能为空" : '超过图片大小限制(2MB)'));
|
|
|
|
|
return upload/* default */.Z.LIST_IGNORE;
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
return Promise.reject();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var Anchors = [{
|
|
|
|
|
@ -824,7 +824,7 @@ var Page = function Page(_ref2) {
|
|
|
|
|
title: coreCE == "CN" ? "知识点" : "List of Topics",
|
|
|
|
|
dataIndex: "knowledge_point",
|
|
|
|
|
align: "center",
|
|
|
|
|
width: 150
|
|
|
|
|
width: 200
|
|
|
|
|
}, {
|
|
|
|
|
title: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
@ -845,7 +845,7 @@ var Page = function Page(_ref2) {
|
|
|
|
|
title: coreCE == "CN" ? "参考学时" : "Suggested credit hours",
|
|
|
|
|
dataIndex: "class_hour",
|
|
|
|
|
align: "center",
|
|
|
|
|
width: 150
|
|
|
|
|
width: 120
|
|
|
|
|
}],
|
|
|
|
|
dataSource: item === null || item === void 0 ? void 0 : item.module_content,
|
|
|
|
|
pagination: false
|
|
|
|
|
@ -1012,8 +1012,33 @@ var Page = function Page(_ref2) {
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
}) : /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
name: "file",
|
|
|
|
|
label: "\u4E0A\u4F20\u6587\u4EF6",
|
|
|
|
|
rules: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请上传文件'
|
|
|
|
|
}],
|
|
|
|
|
valuePropName: "fileList",
|
|
|
|
|
getValueFromEvent: function getValueFromEvent(e) {
|
|
|
|
|
if (Array.isArray(e)) {
|
|
|
|
|
return e;
|
|
|
|
|
}
|
|
|
|
|
return e === null || e === void 0 ? void 0 : e.fileList;
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(upload/* default */.Z, objectSpread2_default()(objectSpread2_default()({}, uploadProps), {}, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
|
|
|
|
|
style: {
|
|
|
|
|
borderRadius: "2px"
|
|
|
|
|
},
|
|
|
|
|
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-shangchuan3"
|
|
|
|
|
}),
|
|
|
|
|
children: "\u9009\u62E9\u6587\u4EF6"
|
|
|
|
|
})
|
|
|
|
|
}))
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
marginLeft: "80px"
|
|
|
|
|
},
|
|
|
|
|
@ -1030,7 +1055,7 @@ var Page = function Page(_ref2) {
|
|
|
|
|
children: "\u70B9\u51FB\u4E0B\u8F7D\u6A21\u677F"
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
}, {
|
|
|
|
|
@ -1192,7 +1217,8 @@ var Page = function Page(_ref2) {
|
|
|
|
|
index: item.key,
|
|
|
|
|
id: item.key,
|
|
|
|
|
title: item.title,
|
|
|
|
|
UseEdit: item.UseEdit
|
|
|
|
|
UseEdit: item.UseEdit,
|
|
|
|
|
coreCE: coreCE
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
width: 1200,
|
|
|
|
|
@ -1202,7 +1228,7 @@ var Page = function Page(_ref2) {
|
|
|
|
|
children: item.content
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_modal/* default */.Z, {
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
|
|
|
|
|
title: formModal === null || formModal === void 0 ? void 0 : formModal.title,
|
|
|
|
|
open: isEdit,
|
|
|
|
|
destroyOnClose: true,
|
|
|
|
|
@ -1222,17 +1248,7 @@ var Page = function Page(_ref2) {
|
|
|
|
|
onOk: function onOk() {
|
|
|
|
|
form.submit();
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(upload/* default */.Z, objectSpread2_default()(objectSpread2_default()({}, uploadProps), {}, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
|
|
|
|
|
style: {
|
|
|
|
|
borderRadius: "2px"
|
|
|
|
|
},
|
|
|
|
|
icon: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "iconfont icon-shangchuan3"
|
|
|
|
|
}),
|
|
|
|
|
children: "\u9009\u62E9\u6587\u4EF6"
|
|
|
|
|
})
|
|
|
|
|
})), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z, {
|
|
|
|
|
form: form,
|
|
|
|
|
style: {
|
|
|
|
|
maxHeight: 700
|
|
|
|
|
@ -1250,25 +1266,26 @@ var Page = function Page(_ref2) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
console.log(ValueAll);
|
|
|
|
|
if (!["core-orientation", "core-target", "core-design"].includes(formModal === null || formModal === void 0 ? void 0 : formModal.formKey)) {
|
|
|
|
|
_context2.next = 4;
|
|
|
|
|
_context2.next = 5;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
_context2.next = 3;
|
|
|
|
|
_context2.next = 4;
|
|
|
|
|
return dispatch({
|
|
|
|
|
type: 'coreCurriculum/putCoreSubjectOverview',
|
|
|
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, ValueAll), {}, {
|
|
|
|
|
id: params === null || params === void 0 ? void 0 : params.coreId
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
case 3:
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
case 4:
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
case 5:
|
|
|
|
|
if (!((formModal === null || formModal === void 0 ? void 0 : formModal.formKey) == "core-school")) {
|
|
|
|
|
_context2.next = 8;
|
|
|
|
|
_context2.next = 9;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
_context2.next = 7;
|
|
|
|
|
_context2.next = 8;
|
|
|
|
|
return dispatch({
|
|
|
|
|
type: 'coreCurriculum/putCooperateInfo',
|
|
|
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, ValueAll), {}, {
|
|
|
|
|
@ -1276,26 +1293,26 @@ var Page = function Page(_ref2) {
|
|
|
|
|
cooperate_members: []
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
case 7:
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
case 8:
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
case 9:
|
|
|
|
|
if (!((formModal === null || formModal === void 0 ? void 0 : formModal.formKey) == "core-knowledge")) {
|
|
|
|
|
_context2.next = 24;
|
|
|
|
|
_context2.next = 25;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (!((ValueAll === null || ValueAll === void 0 ? void 0 : ValueAll.design) == "import")) {
|
|
|
|
|
_context2.next = 19;
|
|
|
|
|
_context2.next = 20;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
formData = new FormData();
|
|
|
|
|
formData.append('file', ValueAll === null || ValueAll === void 0 || (_ValueAll$file = ValueAll.file) === null || _ValueAll$file === void 0 || (_ValueAll$file = _ValueAll$file.file) === null || _ValueAll$file === void 0 ? void 0 : _ValueAll$file.originFileObj);
|
|
|
|
|
formData.append('file', ValueAll === null || ValueAll === void 0 || (_ValueAll$file = ValueAll.file) === null || _ValueAll$file === void 0 || (_ValueAll$file = _ValueAll$file[0]) === null || _ValueAll$file === void 0 ? void 0 : _ValueAll$file.originFileObj);
|
|
|
|
|
formData.append('language', ValueAll === null || ValueAll === void 0 ? void 0 : ValueAll.language);
|
|
|
|
|
_context2.next = 15;
|
|
|
|
|
_context2.next = 16;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/core_subjects/".concat(params === null || params === void 0 ? void 0 : params.coreId, "/core_subject_knowledge_systems/batch_import.json"), {
|
|
|
|
|
method: 'post',
|
|
|
|
|
body: formData
|
|
|
|
|
}, true);
|
|
|
|
|
case 15:
|
|
|
|
|
case 16:
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
if (((_res = res) === null || _res === void 0 ? void 0 : _res.status) == 0) {
|
|
|
|
|
modal = es_modal/* default */.Z.confirm({
|
|
|
|
|
@ -1330,12 +1347,12 @@ var Page = function Page(_ref2) {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
_context2.next = 24;
|
|
|
|
|
_context2.next = 25;
|
|
|
|
|
break;
|
|
|
|
|
case 19:
|
|
|
|
|
case 20:
|
|
|
|
|
type = formModal.isEdit ? "coreCurriculum/putKnowledgePoint" : "coreCurriculum/postKnowledgePoint";
|
|
|
|
|
ValueAll.module_content = (ValueAll === null || ValueAll === void 0 ? void 0 : ValueAll.module_content) || [];
|
|
|
|
|
_context2.next = 23;
|
|
|
|
|
_context2.next = 24;
|
|
|
|
|
return dispatch({
|
|
|
|
|
type: type,
|
|
|
|
|
payload: objectSpread2_default()(objectSpread2_default()({}, ValueAll), {}, {
|
|
|
|
|
@ -1343,9 +1360,9 @@ var Page = function Page(_ref2) {
|
|
|
|
|
module_id: ValueAll === null || ValueAll === void 0 ? void 0 : ValueAll.subject_module_id
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
case 23:
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
case 24:
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
case 25:
|
|
|
|
|
if (((_res5 = res) === null || _res5 === void 0 ? void 0 : _res5.status) == 0) {
|
|
|
|
|
message/* default */.ZP.success((formModal === null || formModal === void 0 ? void 0 : formModal.formKey) == "core-knowledge" ? (ValueAll === null || ValueAll === void 0 ? void 0 : ValueAll.design) == "import" ? "导入成功" : formModal.isEdit ? "修改成功" : "新增成功" : "修改成功");
|
|
|
|
|
setIsEdit(false);
|
|
|
|
|
@ -1356,7 +1373,7 @@ var Page = function Page(_ref2) {
|
|
|
|
|
});
|
|
|
|
|
getData();
|
|
|
|
|
}
|
|
|
|
|
case 25:
|
|
|
|
|
case 26:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|
|
|
|
|
@ -1369,7 +1386,7 @@ var Page = function Page(_ref2) {
|
|
|
|
|
children: Anchors === null || Anchors === void 0 || (_Anchors$find = Anchors.find(function (item) {
|
|
|
|
|
return item.key === (formModal === null || formModal === void 0 ? void 0 : formModal.formKey);
|
|
|
|
|
})) === null || _Anchors$find === void 0 ? void 0 : _Anchors$find.FormDiv
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|