|
|
|
|
@ -777,6 +777,10 @@ var Page = function Page(_ref) {
|
|
|
|
|
data = _useState6[0],
|
|
|
|
|
setData = _useState6[1];
|
|
|
|
|
var monacoValueRef = (0,_react_17_0_2_react.useRef)();
|
|
|
|
|
var _useState7 = (0,_react_17_0_2_react.useState)(false),
|
|
|
|
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
|
|
|
isPreviewAll = _useState8[0],
|
|
|
|
|
setIsPreviewAll = _useState8[1];
|
|
|
|
|
var uploadProps = {
|
|
|
|
|
// accept: ".pdf, .docx, .doc, .xlsx, .xls, .ppt, .pptx, .zip,.jpg,.png",
|
|
|
|
|
beforeUpload: function beforeUpload(file) {
|
|
|
|
|
@ -850,8 +854,8 @@ var Page = function Page(_ref) {
|
|
|
|
|
method: "get",
|
|
|
|
|
headers: {
|
|
|
|
|
"Content-Type": "application/xml"
|
|
|
|
|
},
|
|
|
|
|
credentials: 'omit'
|
|
|
|
|
}
|
|
|
|
|
// credentials: 'omit',
|
|
|
|
|
});
|
|
|
|
|
case 7:
|
|
|
|
|
res = _context2.sent;
|
|
|
|
|
@ -862,6 +866,8 @@ var Page = function Page(_ref) {
|
|
|
|
|
content: result.url + "&nocredentials=true"
|
|
|
|
|
});
|
|
|
|
|
case 10:
|
|
|
|
|
setIsPreviewAll(true);
|
|
|
|
|
case 11:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|
|
|
|
|
@ -921,7 +927,7 @@ var Page = function Page(_ref) {
|
|
|
|
|
};
|
|
|
|
|
var getData = /*#__PURE__*/function () {
|
|
|
|
|
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
|
|
var _res$data;
|
|
|
|
|
var _res$data, _res$data2;
|
|
|
|
|
var res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
|
|
@ -935,7 +941,7 @@ var Page = function Page(_ref) {
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
res = _context3.sent;
|
|
|
|
|
getKnowledgeChartsPoint(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 || (_res$data = _res$data.module_names) === null || _res$data === void 0 ? void 0 : _res$data[0].id);
|
|
|
|
|
(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 || (_res$data = _res$data.module_names) === null || _res$data === void 0 || (_res$data = _res$data[0]) === null || _res$data === void 0 ? void 0 : _res$data.id) && getKnowledgeChartsPoint(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 || (_res$data2 = _res$data2.module_names) === null || _res$data2 === void 0 || (_res$data2 = _res$data2[0]) === null || _res$data2 === void 0 ? void 0 : _res$data2.id);
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context3.stop();
|
|
|
|
|
@ -1128,7 +1134,7 @@ var Page = function Page(_ref) {
|
|
|
|
|
dispatch({
|
|
|
|
|
type: 'coreCurriculum/save',
|
|
|
|
|
payload: {
|
|
|
|
|
KnowledgePointInfo: (KnowledgePointInfo === null || KnowledgePointInfo === void 0 ? void 0 : KnowledgePointInfo.id) == item.id ? null : item
|
|
|
|
|
KnowledgePointInfo: item
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
@ -1267,10 +1273,8 @@ var Page = function Page(_ref) {
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(col/* default */.Z, {
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
(0,util/* downLoadFile */.FH)("", (0,util/* setUrlQuery */.NY)({
|
|
|
|
|
url: "".concat(env/* default */.Z.IMG_SERVER).concat(item === null || item === void 0 ? void 0 : item.url),
|
|
|
|
|
query: {}
|
|
|
|
|
}));
|
|
|
|
|
getOpenFile(item === null || item === void 0 ? void 0 : item.id);
|
|
|
|
|
// downLoadFile("", setUrlQuery({ url: `${ENV.IMG_SERVER}${item?.url}`, query: {} }))
|
|
|
|
|
},
|
|
|
|
|
children: item === null || item === void 0 ? void 0 : item.title
|
|
|
|
|
})
|
|
|
|
|
@ -1595,7 +1599,7 @@ var Page = function Page(_ref) {
|
|
|
|
|
onFinish: /*#__PURE__*/function () {
|
|
|
|
|
var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8(ValueAll) {
|
|
|
|
|
var _ValueAll$file;
|
|
|
|
|
var formData, res, _res$data2, _res$data3, _res$data4, modal;
|
|
|
|
|
var formData, res, _res$data3, _res$data4, _res$data5, modal;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
|
|
|
|
|
while (1) switch (_context8.prev = _context8.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
@ -1613,10 +1617,10 @@ var Page = function Page(_ref) {
|
|
|
|
|
title: "上传结果",
|
|
|
|
|
icon: null,
|
|
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: ["\u6210\u529F\u4E0A\u4F20", res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 || (_res$data2 = _res$data2.result) === null || _res$data2 === void 0 ? void 0 : _res$data2.success, "\u6761\u6570\u636E\u3002", (res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 || (_res$data3 = _res$data3.result) === null || _res$data3 === void 0 || (_res$data3 = _res$data3.fail) === null || _res$data3 === void 0 ? void 0 : _res$data3.length) > 0 && "有部分失败数据,请点击下方按钮下载失败数据文件。", /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
|
|
|
|
|
children: ["\u6210\u529F\u4E0A\u4F20", res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 || (_res$data3 = _res$data3.result) === null || _res$data3 === void 0 ? void 0 : _res$data3.success, "\u6761\u6570\u636E\u3002", (res === null || res === void 0 || (_res$data4 = res.data) === null || _res$data4 === void 0 || (_res$data4 = _res$data4.result) === null || _res$data4 === void 0 || (_res$data4 = _res$data4.fail) === null || _res$data4 === void 0 ? void 0 : _res$data4.length) > 0 && "有部分失败数据,请点击下方按钮下载失败数据文件。", /*#__PURE__*/(0,jsx_runtime.jsx)(row/* default */.Z, {
|
|
|
|
|
align: "middle",
|
|
|
|
|
justify: "center",
|
|
|
|
|
children: (res === null || res === void 0 || (_res$data4 = res.data) === null || _res$data4 === void 0 || (_res$data4 = _res$data4.result) === null || _res$data4 === void 0 || (_res$data4 = _res$data4.fail) === null || _res$data4 === void 0 ? void 0 : _res$data4.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
|
|
|
|
|
children: (res === null || res === void 0 || (_res$data5 = res.data) === null || _res$data5 === void 0 || (_res$data5 = _res$data5.result) === null || _res$data5 === void 0 || (_res$data5 = _res$data5.fail) === null || _res$data5 === void 0 ? void 0 : _res$data5.length) > 0 && /*#__PURE__*/(0,jsx_runtime.jsx)(ui_customization/* CustomButton */.op, {
|
|
|
|
|
style: {
|
|
|
|
|
borderRadius: "2px"
|
|
|
|
|
},
|
|
|
|
|
@ -1697,29 +1701,55 @@ var Page = function Page(_ref) {
|
|
|
|
|
})]
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
|
|
|
|
|
data: data === null || data === void 0 ? void 0 : data.content,
|
|
|
|
|
type: data === null || data === void 0 ? void 0 : data.type,
|
|
|
|
|
disabledDownload: !(0,authority/* isLogin */.bg)(),
|
|
|
|
|
close: true,
|
|
|
|
|
monacoEditor: {
|
|
|
|
|
value: monacoValueRef.current,
|
|
|
|
|
language: "txt",
|
|
|
|
|
onChange: function onChange() {},
|
|
|
|
|
options: {
|
|
|
|
|
readOnly: true,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
minimap: {
|
|
|
|
|
enabled: false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onClose: function onClose() {
|
|
|
|
|
return setData({
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_modal/* default */.Z, {
|
|
|
|
|
title: "文件预览",
|
|
|
|
|
open: isPreviewAll,
|
|
|
|
|
destroyOnClose: true,
|
|
|
|
|
centered: true,
|
|
|
|
|
width: 1200,
|
|
|
|
|
footer: null,
|
|
|
|
|
onCancel: function onCancel() {
|
|
|
|
|
setIsPreviewAll(false);
|
|
|
|
|
setData({
|
|
|
|
|
content: "",
|
|
|
|
|
type: ""
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
height: 700,
|
|
|
|
|
overflow: "hidden",
|
|
|
|
|
position: "relative"
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
|
|
|
|
|
data: data === null || data === void 0 ? void 0 : data.content,
|
|
|
|
|
type: data === null || data === void 0 ? void 0 : data.type,
|
|
|
|
|
disabledDownload: !(0,authority/* isLogin */.bg)(),
|
|
|
|
|
style: {
|
|
|
|
|
position: 'absolute',
|
|
|
|
|
zIndex: 1,
|
|
|
|
|
alignItems: 'flex-start'
|
|
|
|
|
},
|
|
|
|
|
monacoEditor: {
|
|
|
|
|
value: monacoValueRef.current,
|
|
|
|
|
language: "txt",
|
|
|
|
|
onChange: function onChange() {},
|
|
|
|
|
options: {
|
|
|
|
|
readOnly: true,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
minimap: {
|
|
|
|
|
enabled: false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onClose: function onClose() {
|
|
|
|
|
return setData({
|
|
|
|
|
content: "",
|
|
|
|
|
type: ""
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|