diff --git a/p__CoreCurriculum__Lists__Knowledge__index.async.js b/p__CoreCurriculum__Lists__Knowledge__index.async.js index 9078392209..8213e010d2 100644 --- a/p__CoreCurriculum__Lists__Knowledge__index.async.js +++ b/p__CoreCurriculum__Lists__Knowledge__index.async.js @@ -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: "" + }); + } + }) + }) })] }) }); diff --git a/p__CoreCurriculum__Lists__Overview__index.async.js b/p__CoreCurriculum__Lists__Overview__index.async.js index c15382aa7e..b06b33ca9d 100644 --- a/p__CoreCurriculum__Lists__Overview__index.async.js +++ b/p__CoreCurriculum__Lists__Overview__index.async.js @@ -2276,6 +2276,10 @@ var Page = function Page(_ref2) { data = _useState12[0], setData = _useState12[1]; var monacoValueRef = (0,_react_17_0_2_react.useRef)(); + var _useState13 = (0,_react_17_0_2_react.useState)(false), + _useState14 = slicedToArray_default()(_useState13, 2), + isPreviewAll = _useState14[0], + setIsPreviewAll = _useState14[1]; var uploadProps = { maxCount: 1, accept: ".xlsx, .xls", @@ -2348,8 +2352,8 @@ var Page = function Page(_ref2) { method: "get", headers: { "Content-Type": "application/xml" - }, - credentials: 'omit' + } + // credentials: 'omit', }); case 7: res = _context2.sent; @@ -2360,6 +2364,8 @@ var Page = function Page(_ref2) { content: result.url + "&nocredentials=true" }); case 10: + setIsPreviewAll(true); + case 11: case "end": return _context2.stop(); } @@ -3214,29 +3220,55 @@ var Page = function Page(_ref2) { return item.key === (formModal === null || formModal === void 0 ? void 0 : formModal.formKey); })) === null || _Anchors$find === void 0 ? void 0 : _Anchors$find.FormDiv }) - }), /*#__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: "" + }); + } + }) + }) })] }); }; diff --git a/umi.js b/umi.js index df10562be2..b746fe7e16 100644 --- a/umi.js +++ b/umi.js @@ -134838,10 +134838,10 @@ function _getRoutes() { return Promise.all(/*! import() | p__Classrooms__Lists__GroupHomework__Review__index */[__webpack_require__.e(28647), __webpack_require__.e(84728), __webpack_require__.e(6848), __webpack_require__.e(46573), __webpack_require__.e(50812), __webpack_require__.e(26588), __webpack_require__.e(34333), __webpack_require__.e(96232), __webpack_require__.e(24665), __webpack_require__.e(88652), __webpack_require__.e(20834), __webpack_require__.e(91857), __webpack_require__.e(5112), __webpack_require__.e(78241), __webpack_require__.e(89868), __webpack_require__.e(9029), __webpack_require__.e(93948), __webpack_require__.e(78273), __webpack_require__.e(85731), __webpack_require__.e(6557), __webpack_require__.e(72319), __webpack_require__.e(2360), __webpack_require__.e(66244), __webpack_require__.e(27415), __webpack_require__.e(4977), __webpack_require__.e(76329), __webpack_require__.e(11436), __webpack_require__.e(59741), __webpack_require__.e(40840), __webpack_require__.e(14662)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/Classrooms/Lists/GroupHomework/Review/index.tsx */ 65167)); }), '37': /*#__PURE__*/_react_17_0_2_react.lazy(function () { - return Promise.all(/*! import() | p__Classrooms__Lists__GroupHomework__SubmitWork__index */[__webpack_require__.e(28647), __webpack_require__.e(84728), __webpack_require__.e(6848), __webpack_require__.e(46573), __webpack_require__.e(50812), __webpack_require__.e(26588), __webpack_require__.e(34333), __webpack_require__.e(96232), __webpack_require__.e(24665), __webpack_require__.e(88652), __webpack_require__.e(20834), __webpack_require__.e(91857), __webpack_require__.e(5112), __webpack_require__.e(78241), __webpack_require__.e(89868), __webpack_require__.e(9029), __webpack_require__.e(93948), __webpack_require__.e(78273), __webpack_require__.e(85731), __webpack_require__.e(6557), __webpack_require__.e(72319), __webpack_require__.e(2360), __webpack_require__.e(99939), __webpack_require__.e(4977), __webpack_require__.e(76329), __webpack_require__.e(11436), __webpack_require__.e(59741), __webpack_require__.e(40840), __webpack_require__.e(28072)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/Classrooms/Lists/GroupHomework/SubmitWork/index.tsx */ 48467)); + return Promise.all(/*! import() | p__Classrooms__Lists__GroupHomework__SubmitWork__index */[__webpack_require__.e(28647), __webpack_require__.e(84728), __webpack_require__.e(6848), __webpack_require__.e(46573), __webpack_require__.e(50812), __webpack_require__.e(26588), __webpack_require__.e(34333), __webpack_require__.e(96232), __webpack_require__.e(24665), __webpack_require__.e(88652), __webpack_require__.e(20834), __webpack_require__.e(91857), __webpack_require__.e(5112), __webpack_require__.e(78241), __webpack_require__.e(89868), __webpack_require__.e(9029), __webpack_require__.e(93948), __webpack_require__.e(78273), __webpack_require__.e(85731), __webpack_require__.e(6557), __webpack_require__.e(72319), __webpack_require__.e(2360), __webpack_require__.e(48560), __webpack_require__.e(4977), __webpack_require__.e(76329), __webpack_require__.e(11436), __webpack_require__.e(59741), __webpack_require__.e(40840), __webpack_require__.e(28072)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/Classrooms/Lists/GroupHomework/SubmitWork/index.tsx */ 48467)); }), '38': /*#__PURE__*/_react_17_0_2_react.lazy(function () { - return Promise.all(/*! import() | p__Classrooms__Lists__GroupHomework__EditWork__index */[__webpack_require__.e(28647), __webpack_require__.e(84728), __webpack_require__.e(6848), __webpack_require__.e(46573), __webpack_require__.e(50812), __webpack_require__.e(26588), __webpack_require__.e(34333), __webpack_require__.e(96232), __webpack_require__.e(24665), __webpack_require__.e(88652), __webpack_require__.e(20834), __webpack_require__.e(91857), __webpack_require__.e(5112), __webpack_require__.e(78241), __webpack_require__.e(89868), __webpack_require__.e(9029), __webpack_require__.e(93948), __webpack_require__.e(78273), __webpack_require__.e(85731), __webpack_require__.e(6557), __webpack_require__.e(72319), __webpack_require__.e(2360), __webpack_require__.e(48560), __webpack_require__.e(4977), __webpack_require__.e(76329), __webpack_require__.e(11436), __webpack_require__.e(59741), __webpack_require__.e(40840), __webpack_require__.e(60479)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/Classrooms/Lists/GroupHomework/EditWork/index.tsx */ 29465)); + return Promise.all(/*! import() | p__Classrooms__Lists__GroupHomework__EditWork__index */[__webpack_require__.e(28647), __webpack_require__.e(84728), __webpack_require__.e(6848), __webpack_require__.e(46573), __webpack_require__.e(50812), __webpack_require__.e(26588), __webpack_require__.e(34333), __webpack_require__.e(96232), __webpack_require__.e(24665), __webpack_require__.e(88652), __webpack_require__.e(20834), __webpack_require__.e(91857), __webpack_require__.e(5112), __webpack_require__.e(78241), __webpack_require__.e(89868), __webpack_require__.e(9029), __webpack_require__.e(93948), __webpack_require__.e(78273), __webpack_require__.e(85731), __webpack_require__.e(6557), __webpack_require__.e(72319), __webpack_require__.e(2360), __webpack_require__.e(99939), __webpack_require__.e(4977), __webpack_require__.e(76329), __webpack_require__.e(11436), __webpack_require__.e(59741), __webpack_require__.e(40840), __webpack_require__.e(60479)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/Classrooms/Lists/GroupHomework/EditWork/index.tsx */ 29465)); }), '39': /*#__PURE__*/_react_17_0_2_react.lazy(function () { return Promise.all(/*! import() | p__Classrooms__Lists__Exercise__Detail__components__DuplicateChecking__CheckDetail__index */[__webpack_require__.e(28647), __webpack_require__.e(84728), __webpack_require__.e(6848), __webpack_require__.e(46573), __webpack_require__.e(50812), __webpack_require__.e(26588), __webpack_require__.e(34333), __webpack_require__.e(96232), __webpack_require__.e(24665), __webpack_require__.e(88652), __webpack_require__.e(20834), __webpack_require__.e(91857), __webpack_require__.e(5112), __webpack_require__.e(41867), __webpack_require__.e(78782), __webpack_require__.e(89868), __webpack_require__.e(69304), __webpack_require__.e(11561), __webpack_require__.e(72315), __webpack_require__.e(85731), __webpack_require__.e(76329), __webpack_require__.e(85297)]).then(__webpack_require__.bind(__webpack_require__, /*! @/pages/Classrooms/Lists/Exercise/Detail/components/DuplicateChecking/CheckDetail/index.tsx */ 57525));