|
|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
"use strict";
|
|
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[48969],{
|
|
|
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[74873],{
|
|
|
|
|
|
|
|
|
|
/***/ 38331:
|
|
|
|
|
/*!******************************************************************************!*\
|
|
|
|
|
@ -113,26 +113,52 @@ var FormScreen = function FormScreen(_ref) {
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ 98898:
|
|
|
|
|
/*!*******************************************************************!*\
|
|
|
|
|
!*** ./src/pages/LegalResources/components/PreviewFile/index.tsx ***!
|
|
|
|
|
\*******************************************************************/
|
|
|
|
|
/***/ 63938:
|
|
|
|
|
/*!*******************************************************************************!*\
|
|
|
|
|
!*** ./src/pages/LegalResources/components/PreviewFile/index.tsx + 1 modules ***!
|
|
|
|
|
\*******************************************************************************/
|
|
|
|
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js */ 41498);
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js */ 79800);
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js */ 39647);
|
|
|
|
|
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
|
|
|
/* harmony import */ var _components_PreviewAll__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/components/PreviewAll */ 26965);
|
|
|
|
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ 59301);
|
|
|
|
|
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @/utils/fetch */ 14735);
|
|
|
|
|
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! antd */ 8591);
|
|
|
|
|
/* harmony import */ var _service_legalresources__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @/service/legalresources */ 76145);
|
|
|
|
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react/jsx-runtime */ 37712);
|
|
|
|
|
|
|
|
|
|
// EXPORTS
|
|
|
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
|
|
|
Z: function() { return /* binding */ PreviewFile; }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
|
|
var regeneratorRuntime = __webpack_require__(7557);
|
|
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
|
|
|
|
|
var asyncToGenerator = __webpack_require__(41498);
|
|
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
|
|
|
|
|
var slicedToArray = __webpack_require__(79800);
|
|
|
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectWithoutProperties.js
|
|
|
|
|
var objectWithoutProperties = __webpack_require__(39647);
|
|
|
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
|
|
|
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 3 modules
|
|
|
|
|
var PreviewAll = __webpack_require__(26965);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
|
|
|
|
|
var _react_17_0_2_react = __webpack_require__(59301);
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/fetch.ts
|
|
|
|
|
var fetch = __webpack_require__(14735);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
|
|
|
var message = __webpack_require__(8591);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
|
|
|
|
|
var tooltip = __webpack_require__(6848);
|
|
|
|
|
// EXTERNAL MODULE: ./src/service/legalresources.ts
|
|
|
|
|
var legalresources = __webpack_require__(76145);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/LegalResources/components/PreviewFile/index.less?modules
|
|
|
|
|
// extracted by mini-css-extract-plugin
|
|
|
|
|
/* harmony default export */ var PreviewFilemodules = ({"close":"close___uZgGc"});
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
|
|
|
var util = __webpack_require__(63834);
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
|
|
|
var env = __webpack_require__(33259);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
|
|
|
|
|
var jsx_runtime = __webpack_require__(37712);
|
|
|
|
|
;// CONCATENATED MODULE: ./src/pages/LegalResources/components/PreviewFile/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -146,28 +172,31 @@ var _excluded = ["disabledDownload", "activeModal", "onClose"];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Page = function Page(_ref) {
|
|
|
|
|
var disabledDownload = _ref.disabledDownload,
|
|
|
|
|
activeModal = _ref.activeModal,
|
|
|
|
|
_onClose = _ref.onClose,
|
|
|
|
|
props = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_3___default()(_ref, _excluded);
|
|
|
|
|
var monacoValueRef = (0,react__WEBPACK_IMPORTED_MODULE_5__.useRef)();
|
|
|
|
|
var _message$useMessage = antd__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .ZP.useMessage(),
|
|
|
|
|
_message$useMessage2 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default()(_message$useMessage, 2),
|
|
|
|
|
props = objectWithoutProperties_default()(_ref, _excluded);
|
|
|
|
|
var monacoValueRef = (0,_react_17_0_2_react.useRef)();
|
|
|
|
|
var _message$useMessage = message/* default */.ZP.useMessage(),
|
|
|
|
|
_message$useMessage2 = slicedToArray_default()(_message$useMessage, 2),
|
|
|
|
|
messageApi = _message$useMessage2[0],
|
|
|
|
|
contextHolder = _message$useMessage2[1];
|
|
|
|
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_5__.useState)({
|
|
|
|
|
var _useState = (0,_react_17_0_2_react.useState)({
|
|
|
|
|
content: "",
|
|
|
|
|
type: ""
|
|
|
|
|
}),
|
|
|
|
|
_useState2 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_slicedToArray_js__WEBPACK_IMPORTED_MODULE_2___default()(_useState, 2),
|
|
|
|
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
|
|
|
data = _useState2[0],
|
|
|
|
|
setData = _useState2[1];
|
|
|
|
|
var closeRef = (0,_react_17_0_2_react.useRef)();
|
|
|
|
|
var getOpenFile = /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_1___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee(id) {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(id) {
|
|
|
|
|
var _activeModal$data;
|
|
|
|
|
var result, res;
|
|
|
|
|
return _root_workspace_ppte5yg23_local_v9_test1_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
messageApi.open({
|
|
|
|
|
@ -176,13 +205,13 @@ var Page = function Page(_ref) {
|
|
|
|
|
duration: 0
|
|
|
|
|
});
|
|
|
|
|
_context.next = 3;
|
|
|
|
|
return (0,_service_legalresources__WEBPACK_IMPORTED_MODULE_7__/* .postAddFileQuantity */ .Qz)({
|
|
|
|
|
return (0,legalresources/* postAddFileQuantity */.Qz)({
|
|
|
|
|
legalDocId: activeModal === null || activeModal === void 0 || (_activeModal$data = activeModal.data) === null || _activeModal$data === void 0 ? void 0 : _activeModal$data.legalDocId,
|
|
|
|
|
type: 1
|
|
|
|
|
});
|
|
|
|
|
case 3:
|
|
|
|
|
_context.next = 5;
|
|
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .ZP)("/api/attachments/".concat(id, "/detail.json"), {
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/attachments/".concat(id, "/detail.json"), {
|
|
|
|
|
method: 'get'
|
|
|
|
|
});
|
|
|
|
|
case 5:
|
|
|
|
|
@ -196,7 +225,7 @@ var Page = function Page(_ref) {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
_context.next = 10;
|
|
|
|
|
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .ZP)(result.url, {
|
|
|
|
|
return (0,fetch/* default */.ZP)(result.url, {
|
|
|
|
|
method: "get",
|
|
|
|
|
headers: {
|
|
|
|
|
"Content-Type": "application/xml"
|
|
|
|
|
@ -210,7 +239,7 @@ var Page = function Page(_ref) {
|
|
|
|
|
messageApi.destroy();
|
|
|
|
|
setData({
|
|
|
|
|
type: result.file_type,
|
|
|
|
|
content: result.url + "&nocredentials=true"
|
|
|
|
|
content: env/* default */.Z.API_SERVER + result.url + "&nocredentials=true"
|
|
|
|
|
});
|
|
|
|
|
case 14:
|
|
|
|
|
case "end":
|
|
|
|
|
@ -222,23 +251,60 @@ var Page = function Page(_ref) {
|
|
|
|
|
return _ref2.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
(0,react__WEBPACK_IMPORTED_MODULE_5__.useEffect)(function () {
|
|
|
|
|
var handleDown = function handleDown() {
|
|
|
|
|
var _activeModal$data2;
|
|
|
|
|
(0,legalresources/* postAddFileQuantity */.Qz)({
|
|
|
|
|
legalDocId: activeModal === null || activeModal === void 0 || (_activeModal$data2 = activeModal.data) === null || _activeModal$data2 === void 0 ? void 0 : _activeModal$data2.legalDocId,
|
|
|
|
|
type: 2
|
|
|
|
|
});
|
|
|
|
|
(0,util/* downLoadLink */.Nd)("", decodeURIComponent(data === null || data === void 0 ? void 0 : data.content));
|
|
|
|
|
};
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
if ((activeModal === null || activeModal === void 0 ? void 0 : activeModal.title) == "文件预览") {
|
|
|
|
|
var _activeModal$data2;
|
|
|
|
|
getOpenFile(activeModal === null || activeModal === void 0 || (_activeModal$data2 = activeModal.data) === null || _activeModal$data2 === void 0 ? void 0 : _activeModal$data2.id);
|
|
|
|
|
var _activeModal$data3;
|
|
|
|
|
getOpenFile(activeModal === null || activeModal === void 0 || (_activeModal$data3 = activeModal.data) === null || _activeModal$data3 === void 0 ? void 0 : _activeModal$data3.id);
|
|
|
|
|
}
|
|
|
|
|
}, [activeModal === null || activeModal === void 0 ? void 0 : activeModal.title]);
|
|
|
|
|
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.Fragment, {
|
|
|
|
|
children: [contextHolder, /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_8__.jsx)(_components_PreviewAll__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, {
|
|
|
|
|
return (activeModal === null || activeModal === void 0 ? void 0 : activeModal.title) == "文件预览" && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
style: {
|
|
|
|
|
position: "fixed",
|
|
|
|
|
zIndex: 9999,
|
|
|
|
|
background: "rgba(0,0,0,.7)",
|
|
|
|
|
width: "100%",
|
|
|
|
|
height: "100%",
|
|
|
|
|
top: 0,
|
|
|
|
|
left: 0
|
|
|
|
|
},
|
|
|
|
|
children: [contextHolder, /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
className: PreviewFilemodules.close,
|
|
|
|
|
ref: closeRef,
|
|
|
|
|
children: [!disabledDownload && /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
|
|
title: "\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",
|
|
|
|
|
getPopupContainer: function getPopupContainer() {
|
|
|
|
|
return closeRef.current;
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
onClick: handleDown,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "icon-quxiaozhiding"
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
|
|
|
|
|
title: "\u5173\u95ED",
|
|
|
|
|
getPopupContainer: function getPopupContainer() {
|
|
|
|
|
return closeRef.current;
|
|
|
|
|
},
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
className: "",
|
|
|
|
|
onClick: _onClose,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
|
|
|
|
|
className: "icon-guanbi1"
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__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,
|
|
|
|
|
close: true,
|
|
|
|
|
style: {
|
|
|
|
|
position: "fixed",
|
|
|
|
|
zIndex: 9999,
|
|
|
|
|
background: "rgba(0,0,0,.7)"
|
|
|
|
|
},
|
|
|
|
|
disabledDownload: disabledDownload,
|
|
|
|
|
monacoEditor: {
|
|
|
|
|
value: monacoValueRef.current,
|
|
|
|
|
language: "txt",
|
|
|
|
|
@ -261,7 +327,7 @@ var Page = function Page(_ref) {
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/* harmony default export */ __webpack_exports__.Z = (Page);
|
|
|
|
|
/* harmony default export */ var PreviewFile = (Page);
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|