Auto Submit

dev_local_v9_test3
autosubmit 1 year ago
parent bf98cb53c4
commit f038555564

@ -27,7 +27,7 @@
display: block !important;
}
</style><script>if(document.domain !== "www.educoder.net") document.title = '';</script>
<script src="/react/build/umi.519466ed.js"></script>
<script src="/react/build/umi.15113fcf.js"></script>
<script src="/react/build/js/public.js"></script>
</body>
</html>

@ -1124,6 +1124,8 @@ var MultiUpload = __webpack_require__(86618);
var Submission_Journal = function Journal() {
var urlParams = (0,_umi_production_exports.useParams)();
var _useState = (0,_react_17_0_2_react.useState)(false),
@ -1156,29 +1158,37 @@ var Submission_Journal = function Journal() {
_useState12 = slicedToArray_default()(_useState11, 2),
params = _useState12[0],
setParams = _useState12[1];
var _useState13 = (0,_react_17_0_2_react.useState)(false),
var _useState13 = (0,_react_17_0_2_react.useState)({
content: "",
type: ""
}),
_useState14 = slicedToArray_default()(_useState13, 2),
timeLineVis = _useState14[0],
setTimeLineVis = _useState14[1];
var _useState15 = (0,_react_17_0_2_react.useState)([]),
previewData = _useState14[0],
setPreviewData = _useState14[1];
var monacoValueRef = (0,_react_17_0_2_react.useRef)();
var _useState15 = (0,_react_17_0_2_react.useState)(false),
_useState16 = slicedToArray_default()(_useState15, 2),
timeLineData = _useState16[0],
setTimeLineData = _useState16[1];
var _useState17 = (0,_react_17_0_2_react.useState)(false),
timeLineVis = _useState16[0],
setTimeLineVis = _useState16[1];
var _useState17 = (0,_react_17_0_2_react.useState)([]),
_useState18 = slicedToArray_default()(_useState17, 2),
modifyVis = _useState18[0],
setModify = _useState18[1];
timeLineData = _useState18[0],
setTimeLineData = _useState18[1];
var _useState19 = (0,_react_17_0_2_react.useState)(false),
_useState20 = slicedToArray_default()(_useState19, 2),
modifyBtnLoading = _useState20[0],
setModifyBtnLoading = _useState20[1];
modifyVis = _useState20[0],
setModify = _useState20[1];
var _useState21 = (0,_react_17_0_2_react.useState)(false),
_useState22 = slicedToArray_default()(_useState21, 2),
modifyBtnLoading = _useState22[0],
setModifyBtnLoading = _useState22[1];
var _Form$useForm3 = es_form/* default */.Z.useForm(),
_Form$useForm4 = slicedToArray_default()(_Form$useForm3, 1),
modifyForm = _Form$useForm4[0];
var _useState21 = (0,_react_17_0_2_react.useState)(),
_useState22 = slicedToArray_default()(_useState21, 2),
editId = _useState22[0],
setEditId = _useState22[1];
var _useState23 = (0,_react_17_0_2_react.useState)(),
_useState24 = slicedToArray_default()(_useState23, 2),
editId = _useState24[0],
setEditId = _useState24[1];
var getColumn = /*#__PURE__*/function () {
var _ref = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var res;
@ -1299,19 +1309,54 @@ var Submission_Journal = function Journal() {
return _ref4.apply(this, arguments);
};
}();
var getProgressData = /*#__PURE__*/function () {
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(article_id) {
var res, _res$data3, tempData;
var preview = /*#__PURE__*/function () {
var _ref5 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5(item) {
var res;
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
if (!((item === null || item === void 0 ? void 0 : item.file_type) === "txt")) {
_context5.next = 5;
break;
}
_context5.next = 3;
return (0,fetch/* default */.ZP)(item === null || item === void 0 ? void 0 : item.url, {
method: "get",
headers: {
"Content-Type": "application/xml"
}
});
case 3:
res = _context5.sent;
monacoValueRef.current = res;
case 5:
setPreviewData({
type: item === null || item === void 0 ? void 0 : item.file_type,
content: item === null || item === void 0 ? void 0 : item.url
});
case 6:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return function preview(_x3) {
return _ref5.apply(this, arguments);
};
}();
var getProgressData = /*#__PURE__*/function () {
var _ref6 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6(article_id) {
var res, _res$data3, tempData;
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return (0,magazine/* getReviewProgress */.lp)({
id: urlParams.id,
article_id: article_id
});
case 2:
res = _context5.sent;
res = _context6.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
tempData = res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.map(function (item, index) {
var color = (item === null || item === void 0 ? void 0 : item.status) == 'pending' ? '#3061D0' : (item === null || item === void 0 ? void 0 : item.status) == 'approved' ? '#00B187' : (item === null || item === void 0 ? void 0 : item.status) == 'rejected' ? '#ADB2B8' : (item === null || item === void 0 ? void 0 : item.status) == 'unstart' ? '#FA6400' : '#00CCFF';
@ -1356,12 +1401,12 @@ var Submission_Journal = function Journal() {
}
case 4:
case "end":
return _context5.stop();
return _context6.stop();
}
}, _callee5);
}, _callee6);
}));
return function getProgressData(_x3) {
return _ref5.apply(this, arguments);
return function getProgressData(_x4) {
return _ref6.apply(this, arguments);
};
}();
(0,_react_17_0_2_react.useEffect)(function () {
@ -1449,17 +1494,18 @@ var Submission_Journal = function Journal() {
width: 150,
ellipsis: true,
render: function render(text, record) {
var _record$attachment3;
var _record$attachment;
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000',
cursor: 'pointer'
},
onClick: function onClick() {
var _record$attachment, _record$attachment2;
if (record !== null && record !== void 0 && (_record$attachment = record.attachment) !== null && _record$attachment !== void 0 && _record$attachment.url) (0,util/* openNewWindow */.xg)(record === null || record === void 0 || (_record$attachment2 = record.attachment) === null || _record$attachment2 === void 0 ? void 0 : _record$attachment2.url);
// if (record?.attachment?.url)
// openNewWindow(record?.attachment?.url)
preview(record === null || record === void 0 ? void 0 : record.attachment);
},
children: (record === null || record === void 0 || (_record$attachment3 = record.attachment) === null || _record$attachment3 === void 0 ? void 0 : _record$attachment3.title) || '--'
children: (record === null || record === void 0 || (_record$attachment = record.attachment) === null || _record$attachment === void 0 ? void 0 : _record$attachment.title) || '--'
});
}
}, {
@ -1482,9 +1528,9 @@ var Submission_Journal = function Journal() {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [(record === null || record === void 0 ? void 0 : record.status) == 'rejected' && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "link",
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
modal/* default */.Z.confirm({
title: '查看原因',
@ -1502,9 +1548,9 @@ var Submission_Journal = function Journal() {
});
case 1:
case "end":
return _context6.stop();
return _context7.stop();
}
}, _callee6);
}, _callee7);
})),
children: "\u67E5\u770B\u539F\u56E0"
}), (record === null || record === void 0 ? void 0 : record.status) == 'unstart' && (0,util/* isCurrentUser */.$t)(record === null || record === void 0 ? void 0 : record.author_name) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
@ -1531,27 +1577,27 @@ var Submission_Journal = function Journal() {
okText: '确定',
cancelText: '取消',
onOk: function () {
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() {
var res;
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context7.next = 2;
_context8.next = 2;
return (0,magazine/* canclePost */.E)({
id: urlParams === null || urlParams === void 0 ? void 0 : urlParams.id,
article_id: record === null || record === void 0 ? void 0 : record.id
});
case 2:
res = _context7.sent;
res = _context8.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
message/* default */.ZP.success('操作成功');
getData();
}
case 4:
case "end":
return _context7.stop();
return _context8.stop();
}
}, _callee7);
}, _callee8);
}));
function onOk() {
return _onOk.apply(this, arguments);
@ -1569,19 +1615,19 @@ var Submission_Journal = function Journal() {
children: "\u53D6\u6D88"
}), (record === null || record === void 0 ? void 0 : record.status) == 'pending' && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "link",
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() {
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() {
return regeneratorRuntime_default()().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
_context8.next = 2;
_context9.next = 2;
return getProgressData(record === null || record === void 0 ? void 0 : record.id);
case 2:
setTimeLineVis(true);
case 3:
case "end":
return _context8.stop();
return _context9.stop();
}
}, _callee8);
}, _callee9);
})),
children: "\u67E5\u770B\u8FDB\u5EA6"
})]
@ -1719,19 +1765,19 @@ var Submission_Journal = function Journal() {
onCancel: function onCancel() {
setModify(false);
},
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee9() {
return regeneratorRuntime_default()().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee10() {
return regeneratorRuntime_default()().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
_context9.next = 2;
_context10.next = 2;
return modifyForm.submit();
case 2:
setModify(false);
case 3:
case "end":
return _context9.stop();
return _context10.stop();
}
}, _callee9);
}, _callee10);
})),
okButtonProps: {
loading: modifyBtnLoading
@ -1828,6 +1874,30 @@ var Submission_Journal = function Journal() {
children: "\u6682\u65E0\u6570\u636E\uFF5E"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: previewData === null || previewData === void 0 ? void 0 : previewData.content,
type: previewData === null || previewData === void 0 ? void 0 : previewData.type,
hasMask: true,
monacoEditor: {
value: monacoValueRef.current,
language: "txt",
onChange: function onChange() {},
options: {
readOnly: true,
fontSize: 14,
minimap: {
enabled: false
}
}
},
onImgDimensions: null,
onClose: function onClose() {
setPreviewData({
content: "",
type: ""
});
}
})]
})
});
@ -1851,6 +1921,7 @@ var Submission_Journal = function Journal() {
var Review_Journal = function Journal() {
var urlParams = (0,_umi_production_exports.useParams)();
var _useState = (0,_react_17_0_2_react.useState)(false),
@ -1887,6 +1958,14 @@ var Review_Journal = function Journal() {
_useState14 = slicedToArray_default()(_useState13, 2),
params = _useState14[0],
setParams = _useState14[1];
var _useState15 = (0,_react_17_0_2_react.useState)({
content: "",
type: ""
}),
_useState16 = slicedToArray_default()(_useState15, 2),
previewData = _useState16[0],
setPreviewData = _useState16[1];
var monacoValueRef = (0,_react_17_0_2_react.useRef)();
var getData = /*#__PURE__*/function () {
var _ref = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var res, _res$data, _res$data2;
@ -1983,20 +2062,55 @@ var Review_Journal = function Journal() {
(0,_react_17_0_2_react.useEffect)(function () {
getData();
}, []);
var approveOrRefuse = /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(id, status, reject_reason) {
var preview = /*#__PURE__*/function () {
var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3(item) {
var res;
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
if (!(item.file_type === "txt")) {
_context3.next = 5;
break;
}
_context3.next = 3;
return (0,fetch/* default */.ZP)(item.url, {
method: "get",
headers: {
"Content-Type": "application/xml"
}
});
case 3:
res = _context3.sent;
monacoValueRef.current = res;
case 5:
setPreviewData({
type: item.file_type,
content: item.url
});
case 6:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return function preview(_x2) {
return _ref3.apply(this, arguments);
};
}();
var approveOrRefuse = /*#__PURE__*/function () {
var _ref4 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4(id, status, reject_reason) {
var res;
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return (0,magazine/* getMagazinCheck */.BL)({
id: id,
reject_reason: reject_reason,
status: status
});
case 2:
res = _context3.sent;
res = _context4.sent;
if ((res === null || res === void 0 ? void 0 : res.status) === 0) {
message/* default */.ZP.success('操作成功');
setRefuseReason('');
@ -2004,12 +2118,12 @@ var Review_Journal = function Journal() {
}
case 4:
case "end":
return _context3.stop();
return _context4.stop();
}
}, _callee3);
}, _callee4);
}));
return function approveOrRefuse(_x2, _x3, _x4) {
return _ref3.apply(this, arguments);
return function approveOrRefuse(_x3, _x4, _x5) {
return _ref4.apply(this, arguments);
};
}();
var columns = [{
@ -2093,17 +2207,18 @@ var Review_Journal = function Journal() {
width: 150,
ellipsis: true,
render: function render(text, record) {
var _record$attachment3;
var _record$attachment;
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000',
cursor: 'pointer'
},
onClick: function onClick() {
var _record$attachment, _record$attachment2;
if (record !== null && record !== void 0 && (_record$attachment = record.attachment) !== null && _record$attachment !== void 0 && _record$attachment.url) (0,util/* openNewWindow */.xg)(record === null || record === void 0 || (_record$attachment2 = record.attachment) === null || _record$attachment2 === void 0 ? void 0 : _record$attachment2.url);
// if (record?.attachment?.url)
// openNewWindow(record?.attachment?.url)
preview(record === null || record === void 0 ? void 0 : record.attachment);
},
children: (record === null || record === void 0 || (_record$attachment3 = record.attachment) === null || _record$attachment3 === void 0 ? void 0 : _record$attachment3.title) || '--'
children: (record === null || record === void 0 || (_record$attachment = record.attachment) === null || _record$attachment === void 0 ? void 0 : _record$attachment.title) || '--'
});
}
}, {
@ -2126,9 +2241,9 @@ var Review_Journal = function Journal() {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [(record === null || record === void 0 ? void 0 : record.status) == 'rejected' && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "link",
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee4() {
return regeneratorRuntime_default()().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
modal/* default */.Z.confirm({
title: '查看原因',
@ -2147,26 +2262,26 @@ var Review_Journal = function Journal() {
});
case 1:
case "end":
return _context4.stop();
return _context5.stop();
}
}, _callee4);
}, _callee5);
})),
children: "\u67E5\u770B\u539F\u56E0"
}), (record === null || record === void 0 ? void 0 : record.status) == 'pending' && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "link",
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee5() {
return regeneratorRuntime_default()().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context5.next = 2;
_context6.next = 2;
return getProgressData(record === null || record === void 0 ? void 0 : record.id);
case 2:
setTimeLineVis(true);
case 3:
case "end":
return _context5.stop();
return _context6.stop();
}
}, _callee5);
}, _callee6);
})),
children: "\u67E5\u770B\u8FDB\u5EA6"
}), (record === null || record === void 0 ? void 0 : record.can_reviewed) && /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
@ -2181,17 +2296,17 @@ var Review_Journal = function Journal() {
okText: '确定',
cancelText: '取消',
onOk: function () {
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee6() {
return regeneratorRuntime_default()().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context6.next = 2;
_context7.next = 2;
return approveOrRefuse(record === null || record === void 0 ? void 0 : record.id, 'approved', '');
case 2:
case "end":
return _context6.stop();
return _context7.stop();
}
}, _callee6);
}, _callee7);
}));
function onOk() {
return _onOk.apply(this, arguments);
@ -2219,24 +2334,24 @@ var Review_Journal = function Journal() {
okText: '确定',
cancelText: '取消',
onOk: function () {
var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee8() {
return regeneratorRuntime_default()().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
if (refuseReason) {
_context7.next = 3;
_context8.next = 3;
break;
}
message/* default */.ZP.info('请输入拒绝原因');
return _context7.abrupt("return");
return _context8.abrupt("return");
case 3:
_context7.next = 5;
_context8.next = 5;
return approveOrRefuse(record === null || record === void 0 ? void 0 : record.id, 'rejected', refuseReason);
case 5:
case "end":
return _context7.stop();
return _context8.stop();
}
}, _callee7);
}, _callee8);
}));
function onOk() {
return _onOk2.apply(this, arguments);
@ -2341,6 +2456,30 @@ var Review_Journal = function Journal() {
children: "\u6682\u65E0\u6570\u636E\uFF5E"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: previewData === null || previewData === void 0 ? void 0 : previewData.content,
type: previewData === null || previewData === void 0 ? void 0 : previewData.type,
hasMask: true,
monacoEditor: {
value: monacoValueRef.current,
language: "txt",
onChange: function onChange() {},
options: {
readOnly: true,
fontSize: 14,
minimap: {
enabled: false
}
}
},
onImgDimensions: null,
onClose: function onClose() {
setPreviewData({
content: "",
type: ""
});
}
})]
})
});

@ -48,6 +48,8 @@ var magazine = __webpack_require__(20103);
var ui_customization = __webpack_require__(81001);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 3 modules
var PreviewAll = __webpack_require__(28872);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__(82710);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/MagazineVer/Index/index.tsx
@ -66,6 +68,7 @@ var jsx_runtime = __webpack_require__(37712);
var Message = function Message(_ref) {
objectDestructuringEmpty_default()(_ref);
var _useState = (0,_react_17_0_2_react.useState)([]),
@ -125,6 +128,7 @@ var Message = function Message(_ref) {
_useState18 = slicedToArray_default()(_useState17, 2),
previewData = _useState18[0],
setPreviewData = _useState18[1];
var monacoValueRef = (0,_react_17_0_2_react.useRef)();
(0,_react_17_0_2_react.useEffect)(function () {
getStatisticData();
getHotMagazin();
@ -267,6 +271,41 @@ var Message = function Message(_ref) {
return _ref7.apply(this, arguments);
};
}();
var preview = /*#__PURE__*/function () {
var _ref8 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7(item) {
var res;
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
if (!((item === null || item === void 0 ? void 0 : item.file_type) === "txt")) {
_context7.next = 5;
break;
}
_context7.next = 3;
return (0,fetch/* default */.ZP)(item.url, {
method: "get",
headers: {
"Content-Type": "application/xml"
}
});
case 3:
res = _context7.sent;
monacoValueRef.current = res;
case 5:
setPreviewData({
type: item === null || item === void 0 ? void 0 : item.file_type,
content: item === null || item === void 0 ? void 0 : item.url
});
case 6:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return function preview(_x) {
return _ref8.apply(this, arguments);
};
}();
return /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
spinning: loading,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
@ -538,13 +577,26 @@ var Message = function Message(_ref) {
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: previewData === null || previewData === void 0 ? void 0 : previewData.content,
type: previewData === null || previewData === void 0 ? void 0 : previewData.type
// style={{...stylesPrev}}
,
type: previewData === null || previewData === void 0 ? void 0 : previewData.type,
hasMask: true,
showNodata: true,
monacoEditor: {
value: monacoValueRef.current,
language: "txt",
onChange: function onChange() {},
options: {
readOnly: true,
fontSize: 14,
minimap: {
enabled: false
}
}
},
onImgDimensions: null,
onClose: function onClose() {
setPreviewData({
type: '',
content: ''
content: "",
type: ""
});
}
})]

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save