|
|
@ -2526,6 +2526,36 @@ var ProcessFile = /*#__PURE__*/function (_Vue) { |
|
|
|
|
|
|
|
return runSearchers; |
|
|
|
}() |
|
|
|
}, { |
|
|
|
key: "downloadOdt", |
|
|
|
value: function () { |
|
|
|
var _downloadOdt = _asyncToGenerator( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default().mark(function _callee4() { |
|
|
|
var response; |
|
|
|
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default().wrap(function _callee4$(_context4) { |
|
|
|
while (1) { |
|
|
|
switch (_context4.prev = _context4.next) { |
|
|
|
case 0: |
|
|
|
_context4.next = 2; |
|
|
|
return this.$api.convertFile(this.processedFileContent); |
|
|
|
|
|
|
|
case 2: |
|
|
|
response = _context4.sent; |
|
|
|
window.open('http://core.sandd/file/download/' + response.path); |
|
|
|
|
|
|
|
case 4: |
|
|
|
case "end": |
|
|
|
return _context4.stop(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, _callee4, this); |
|
|
|
})); |
|
|
|
|
|
|
|
function downloadOdt() { |
|
|
|
return _downloadOdt.apply(this, arguments); |
|
|
|
} |
|
|
|
|
|
|
|
return downloadOdt; |
|
|
|
}() |
|
|
|
}]); |
|
|
|
|
|
|
|
return ProcessFile; |
|
|
@ -2614,6 +2644,7 @@ var ApiService = /*#__PURE__*/function () { |
|
|
|
|
|
|
|
this.apiRoutes = { |
|
|
|
file: this.baseUrl + '/api/file', |
|
|
|
fileDownload: this.baseUrl + '/api/file/convert', |
|
|
|
searchAndDisplace: this.baseUrl + '/search-and-displace' |
|
|
|
}; |
|
|
|
} |
|
|
@ -2764,6 +2795,44 @@ var ApiService = /*#__PURE__*/function () { |
|
|
|
|
|
|
|
return filterDocument; |
|
|
|
}() |
|
|
|
}, { |
|
|
|
key: "convertFile", |
|
|
|
value: function () { |
|
|
|
var _convertFile = _asyncToGenerator( /*#__PURE__*/_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default().mark(function _callee4(content) { |
|
|
|
var response; |
|
|
|
return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default().wrap(function _callee4$(_context4) { |
|
|
|
while (1) { |
|
|
|
switch (_context4.prev = _context4.next) { |
|
|
|
case 0: |
|
|
|
_context4.prev = 0; |
|
|
|
_context4.next = 3; |
|
|
|
return axios__WEBPACK_IMPORTED_MODULE_1___default().post(this.apiRoutes.fileDownload, { |
|
|
|
'content': content |
|
|
|
}); |
|
|
|
|
|
|
|
case 3: |
|
|
|
response = _context4.sent; |
|
|
|
return _context4.abrupt("return", response.data); |
|
|
|
|
|
|
|
case 7: |
|
|
|
_context4.prev = 7; |
|
|
|
_context4.t0 = _context4["catch"](0); |
|
|
|
throw _context4.t0; |
|
|
|
|
|
|
|
case 10: |
|
|
|
case "end": |
|
|
|
return _context4.stop(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, _callee4, this, [[0, 7]]); |
|
|
|
})); |
|
|
|
|
|
|
|
function convertFile(_x5) { |
|
|
|
return _convertFile.apply(this, arguments); |
|
|
|
} |
|
|
|
|
|
|
|
return convertFile; |
|
|
|
}() |
|
|
|
}]); |
|
|
|
|
|
|
|
return ApiService; |
|
|
@ -31492,6 +31561,11 @@ var render = function() { |
|
|
|
attrs: { |
|
|
|
label: "Download document", |
|
|
|
icon: "pi pi-download" |
|
|
|
}, |
|
|
|
on: { |
|
|
|
click: function($event) { |
|
|
|
return _vm.downloadOdt() |
|
|
|
} |
|
|
|
} |
|
|
|
}), |
|
|
|
_vm._v(" "), |
|
|
|