Auto Submit

dev_local_v9_xiangtandaxue
autosubmit 2 years ago
parent c6503d2b34
commit 7e0057c8be

@ -848,12 +848,12 @@ var Page = function Page(_ref) {
title: "\u5728\u7EBF\u7F16\u8F91",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee7() {
var res;
var res, officePath;
return regeneratorRuntime_default()().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
if (!["xlsx", "docx", "pptx"].includes(item === null || item === void 0 ? void 0 : item.type)) {
_context7.next = 7;
_context7.next = 8;
break;
}
_context7.next = 3;
@ -862,7 +862,8 @@ var Page = function Page(_ref) {
});
case 3:
res = _context7.sent;
window.open("/office.html?key=".concat(item.attachment_id, "&url=").concat(apiServer + (res === null || res === void 0 ? void 0 : res.url), "&callbackUrl=").concat(apiServer + (res === null || res === void 0 ? void 0 : res.callbackUrl), "&fileType=docx&title=").concat(res === null || res === void 0 ? void 0 : res.title, "&model=edit&officeServer=").concat(env/* default.ONLYOFFICE */.Z.ONLYOFFICE, "&disabledDownload=false"));
officePath = window.ENV === "build" ? "/react/build" : "";
window.open("".concat(officePath, "/office.html?key=").concat(item.attachment_id, "&url=").concat(apiServer + (res === null || res === void 0 ? void 0 : res.url), "&callbackUrl=").concat(apiServer + (res === null || res === void 0 ? void 0 : res.callbackUrl), "&fileType=docx&title=").concat(res === null || res === void 0 ? void 0 : res.title, "&model=edit&officeServer=").concat(env/* default.ONLYOFFICE */.Z.ONLYOFFICE, "&disabledDownload=false"));
// if(item?.type==='xlsx'){
// window.open(`${Env.OFFICE_SERVER}/x/_layouts/xlviewerinternal.aspx?WOPISrc=${Env.OFFICE_IP}/wopi/files/${item?.attachment_id}`)
// }
@ -873,12 +874,12 @@ var Page = function Page(_ref) {
// if(item?.type==='pptx'){
// window.open(`${Env.OFFICE_SERVER}/p/PowerPointFrame.aspx?WOPISrc=${Env.OFFICE_IP}/wopi/files/${item?.attachment_id}`)
// }
_context7.next = 9;
_context7.next = 10;
break;
case 7:
case 8:
message/* default.info */.ZP.info('当前文件不支持编辑');
return _context7.abrupt("return");
case 9:
case 10:
case "end":
return _context7.stop();
}

Loading…
Cancel
Save