588 lines
22 KiB
JavaScript
588 lines
22 KiB
JavaScript
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[0],{
|
|
|
|
/***/ "./resources/js/src/services/attachment.js":
|
|
/*!*************************************************!*\
|
|
!*** ./resources/js/src/services/attachment.js ***!
|
|
\*************************************************/
|
|
/*! exports provided: default */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
var resource = '/api/attachments';
|
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
all: function all() {
|
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
return axios.get("".concat(resource), {
|
|
params: params
|
|
});
|
|
},
|
|
get: function get(id) {
|
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
return axios.get("".concat(resource, "/").concat(id), {
|
|
params: params
|
|
});
|
|
},
|
|
create: function create(data) {
|
|
return axios.post("".concat(resource), data);
|
|
},
|
|
update: function update(data, id) {
|
|
return axios.put("".concat(resource, "/").concat(id), data);
|
|
},
|
|
"delete": function _delete(id) {
|
|
return axios["delete"]("".concat(resource, "/").concat(id));
|
|
},
|
|
download: function download(id, filename) {
|
|
return axios.get("/api/download/attachments/".concat(id), {
|
|
responseType: 'blob'
|
|
}).then(function (response) {
|
|
var fileURL = window.URL.createObjectURL(new Blob([response.data]));
|
|
var fileLink = document.createElement('a');
|
|
fileLink.href = fileURL;
|
|
fileLink.setAttribute('download', filename);
|
|
document.body.appendChild(fileLink);
|
|
fileLink.click();
|
|
return response;
|
|
});
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/src/services/book.js":
|
|
/*!*******************************************!*\
|
|
!*** ./resources/js/src/services/book.js ***!
|
|
\*******************************************/
|
|
/*! exports provided: default */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
var resource = '/api/books';
|
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
all: function all() {
|
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
return axios.get("".concat(resource), {
|
|
params: params
|
|
});
|
|
},
|
|
get: function get(id) {
|
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
return axios.get("".concat(resource, "/").concat(id), {
|
|
params: params
|
|
});
|
|
},
|
|
create: function create(data) {
|
|
return axios.post("".concat(resource), data);
|
|
},
|
|
update: function update(data, id) {
|
|
return axios.put("".concat(resource, "/").concat(id), data);
|
|
},
|
|
"delete": function _delete(id) {
|
|
return axios["delete"]("".concat(resource, "/").concat(id));
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/src/services/department.js":
|
|
/*!*************************************************!*\
|
|
!*** ./resources/js/src/services/department.js ***!
|
|
\*************************************************/
|
|
/*! exports provided: default */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
var resource = '/api/departments';
|
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
all: function all() {
|
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
return axios.get("".concat(resource), {
|
|
params: params
|
|
});
|
|
},
|
|
get: function get(id) {
|
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
return axios.get("".concat(resource, "/").concat(id), {
|
|
params: params
|
|
});
|
|
},
|
|
create: function create(data) {
|
|
return axios.post("".concat(resource), data);
|
|
},
|
|
update: function update(data, id) {
|
|
return axios.put("".concat(resource, "/").concat(id), data);
|
|
},
|
|
"delete": function _delete(id) {
|
|
return axios["delete"]("".concat(resource, "/").concat(id));
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/src/services/document.js":
|
|
/*!***********************************************!*\
|
|
!*** ./resources/js/src/services/document.js ***!
|
|
\***********************************************/
|
|
/*! exports provided: default */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
|
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
|
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
|
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
|
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
|
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
|
|
var resource = '/api/documents';
|
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
all: function all() {
|
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
return axios.get("".concat(resource), {
|
|
params: params
|
|
});
|
|
},
|
|
get: function get(id) {
|
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
return axios.get("".concat(resource, "/").concat(id), {
|
|
params: params
|
|
});
|
|
},
|
|
create: function create(data) {
|
|
return axios.post("".concat(resource), data);
|
|
},
|
|
update: function update(data, id) {
|
|
return axios.put("".concat(resource, "/").concat(id), data);
|
|
},
|
|
"delete": function _delete(id) {
|
|
return axios["delete"]("".concat(resource, "/").concat(id));
|
|
},
|
|
assignReceivers: function assignReceivers(id, receiverIds) {
|
|
return this.update({
|
|
action: 'attach',
|
|
params: JSON.stringify(["receivers"].concat(_toConsumableArray(receiverIds)))
|
|
}, id);
|
|
},
|
|
unassignReceivers: function unassignReceivers(id, receiverIds) {
|
|
return this.update({
|
|
action: 'detach',
|
|
params: JSON.stringify(["receivers"].concat(_toConsumableArray(receiverIds)))
|
|
}, id);
|
|
},
|
|
assignRecipients: function assignRecipients(id, organizeIds) {
|
|
return this.update({
|
|
action: 'attach',
|
|
params: JSON.stringify(["organizes"].concat(_toConsumableArray(organizeIds)))
|
|
}, id);
|
|
},
|
|
unassignRecipients: function unassignRecipients(id, organizeIds) {
|
|
return this.update({
|
|
action: 'detach',
|
|
params: JSON.stringify(["organizes"].concat(_toConsumableArray(organizeIds)))
|
|
}, id);
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/src/services/documentType.js":
|
|
/*!***************************************************!*\
|
|
!*** ./resources/js/src/services/documentType.js ***!
|
|
\***************************************************/
|
|
/*! exports provided: default */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
var resource = '/api/document-types';
|
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
all: function all() {
|
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
return axios.get("".concat(resource), {
|
|
params: params
|
|
});
|
|
},
|
|
get: function get(id) {
|
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
return axios.get("".concat(resource, "/").concat(id), {
|
|
params: params
|
|
});
|
|
},
|
|
create: function create(data) {
|
|
return axios.post("".concat(resource), data);
|
|
},
|
|
update: function update(data, id) {
|
|
return axios.put("".concat(resource, "/").concat(id), data);
|
|
},
|
|
"delete": function _delete(id) {
|
|
return axios["delete"]("".concat(resource, "/").concat(id));
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/src/services/factory.js":
|
|
/*!**********************************************!*\
|
|
!*** ./resources/js/src/services/factory.js ***!
|
|
\**********************************************/
|
|
/*! exports provided: default */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony import */ var _auth__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./auth */ "./resources/js/src/services/auth.js");
|
|
/* harmony import */ var _user__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./user */ "./resources/js/src/services/user.js");
|
|
/* harmony import */ var _title__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./title */ "./resources/js/src/services/title.js");
|
|
/* harmony import */ var _role__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./role */ "./resources/js/src/services/role.js");
|
|
/* harmony import */ var _permission__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./permission */ "./resources/js/src/services/permission.js");
|
|
/* harmony import */ var _department__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./department */ "./resources/js/src/services/department.js");
|
|
/* harmony import */ var _documentType__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./documentType */ "./resources/js/src/services/documentType.js");
|
|
/* harmony import */ var _book__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./book */ "./resources/js/src/services/book.js");
|
|
/* harmony import */ var _document__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./document */ "./resources/js/src/services/document.js");
|
|
/* harmony import */ var _signer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./signer */ "./resources/js/src/services/signer.js");
|
|
/* harmony import */ var _publisher__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./publisher */ "./resources/js/src/services/publisher.js");
|
|
/* harmony import */ var _attachment__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./attachment */ "./resources/js/src/services/attachment.js");
|
|
/* harmony import */ var _statistic__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./statistic */ "./resources/js/src/services/statistic.js");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
auth: _auth__WEBPACK_IMPORTED_MODULE_0__["default"],
|
|
user: _user__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
title: _title__WEBPACK_IMPORTED_MODULE_2__["default"],
|
|
role: _role__WEBPACK_IMPORTED_MODULE_3__["default"],
|
|
permission: _permission__WEBPACK_IMPORTED_MODULE_4__["default"],
|
|
department: _department__WEBPACK_IMPORTED_MODULE_5__["default"],
|
|
documentType: _documentType__WEBPACK_IMPORTED_MODULE_6__["default"],
|
|
book: _book__WEBPACK_IMPORTED_MODULE_7__["default"],
|
|
document: _document__WEBPACK_IMPORTED_MODULE_8__["default"],
|
|
signer: _signer__WEBPACK_IMPORTED_MODULE_9__["default"],
|
|
publisher: _publisher__WEBPACK_IMPORTED_MODULE_10__["default"],
|
|
attachment: _attachment__WEBPACK_IMPORTED_MODULE_11__["default"],
|
|
statistic: _statistic__WEBPACK_IMPORTED_MODULE_12__["default"]
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/src/services/permission.js":
|
|
/*!*************************************************!*\
|
|
!*** ./resources/js/src/services/permission.js ***!
|
|
\*************************************************/
|
|
/*! exports provided: default */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
var resource = '/api/permissions';
|
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
all: function all() {
|
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
return axios.get("".concat(resource), {
|
|
params: params
|
|
});
|
|
},
|
|
get: function get(id) {
|
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
return axios.get("".concat(resource, "/").concat(id), {
|
|
params: params
|
|
});
|
|
},
|
|
create: function create(data) {
|
|
return axios.post("".concat(resource), data);
|
|
},
|
|
update: function update(data, id) {
|
|
return axios.put("".concat(resource, "/").concat(id), data);
|
|
},
|
|
"delete": function _delete(id) {
|
|
return axios["delete"]("".concat(resource, "/").concat(id));
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/src/services/publisher.js":
|
|
/*!************************************************!*\
|
|
!*** ./resources/js/src/services/publisher.js ***!
|
|
\************************************************/
|
|
/*! exports provided: default */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
var resource = '/api/organizes';
|
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
all: function all() {
|
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
return axios.get("".concat(resource), {
|
|
params: params
|
|
});
|
|
},
|
|
get: function get(id) {
|
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
return axios.get("".concat(resource, "/").concat(id), {
|
|
params: params
|
|
});
|
|
},
|
|
create: function create(data) {
|
|
return axios.post("".concat(resource), data);
|
|
},
|
|
update: function update(data, id) {
|
|
return axios.put("".concat(resource, "/").concat(id), data);
|
|
},
|
|
"delete": function _delete(id) {
|
|
return axios["delete"]("".concat(resource, "/").concat(id));
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/src/services/role.js":
|
|
/*!*******************************************!*\
|
|
!*** ./resources/js/src/services/role.js ***!
|
|
\*******************************************/
|
|
/*! exports provided: default */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
var resource = '/api/roles';
|
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
all: function all() {
|
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
return axios.get("".concat(resource), {
|
|
params: params
|
|
});
|
|
},
|
|
get: function get(id) {
|
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
return axios.get("".concat(resource, "/").concat(id), {
|
|
params: params
|
|
});
|
|
},
|
|
create: function create(data) {
|
|
return axios.post("".concat(resource), data);
|
|
},
|
|
update: function update(data, id) {
|
|
return axios.put("".concat(resource, "/").concat(id), data);
|
|
},
|
|
"delete": function _delete(id) {
|
|
return axios["delete"]("".concat(resource, "/").concat(id));
|
|
},
|
|
givePermission: function givePermission(permission, id) {
|
|
return axios.post("".concat(resource, "/").concat(id, "/permissions/").concat(permission));
|
|
},
|
|
revokePermission: function revokePermission(permission, id) {
|
|
return axios["delete"]("".concat(resource, "/").concat(id, "/permissions/").concat(permission));
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/src/services/signer.js":
|
|
/*!*********************************************!*\
|
|
!*** ./resources/js/src/services/signer.js ***!
|
|
\*********************************************/
|
|
/*! exports provided: default */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
var resource = '/api/signers';
|
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
all: function all() {
|
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
return axios.get("".concat(resource), {
|
|
params: params
|
|
});
|
|
},
|
|
get: function get(id) {
|
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
return axios.get("".concat(resource, "/").concat(id), {
|
|
params: params
|
|
});
|
|
},
|
|
create: function create(data) {
|
|
return axios.post("".concat(resource), data);
|
|
},
|
|
update: function update(data, id) {
|
|
return axios.put("".concat(resource, "/").concat(id), data);
|
|
},
|
|
"delete": function _delete(id) {
|
|
return axios["delete"]("".concat(resource, "/").concat(id));
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/src/services/statistic.js":
|
|
/*!************************************************!*\
|
|
!*** ./resources/js/src/services/statistic.js ***!
|
|
\************************************************/
|
|
/*! exports provided: default */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
var resource = '/api/statistic';
|
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
download: function download(params, ext) {
|
|
return axios.get("".concat(resource), {
|
|
params: params,
|
|
responseType: 'blob'
|
|
}).then(function (response) {
|
|
var blob = new Blob([response.data]);
|
|
var url = window.URL.createObjectURL(blob);
|
|
var link = document.createElement('a');
|
|
link.href = url;
|
|
var contentDisposition = response.headers['content-disposition'];
|
|
var fileName = 'unknown';
|
|
|
|
if (contentDisposition) {
|
|
var fileNameMatch = contentDisposition.match(/filename="(.+)"/);
|
|
if (fileNameMatch.length === 2) fileName = fileNameMatch[1];
|
|
}
|
|
|
|
link.setAttribute('download', fileName);
|
|
document.body.appendChild(link);
|
|
link.click();
|
|
link.remove();
|
|
window.URL.revokeObjectURL(url);
|
|
return response;
|
|
});
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/src/services/title.js":
|
|
/*!********************************************!*\
|
|
!*** ./resources/js/src/services/title.js ***!
|
|
\********************************************/
|
|
/*! exports provided: default */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
var resource = '/api/titles';
|
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
all: function all() {
|
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
return axios.get("".concat(resource), {
|
|
params: params
|
|
});
|
|
},
|
|
get: function get(id) {
|
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
return axios.get("".concat(resource, "/").concat(id), {
|
|
params: params
|
|
});
|
|
},
|
|
create: function create(data) {
|
|
return axios.post("".concat(resource), data);
|
|
},
|
|
update: function update(data, id) {
|
|
return axios.put("".concat(resource, "/").concat(id), data);
|
|
},
|
|
"delete": function _delete(id) {
|
|
return axios["delete"]("".concat(resource, "/").concat(id));
|
|
}
|
|
});
|
|
|
|
/***/ }),
|
|
|
|
/***/ "./resources/js/src/services/user.js":
|
|
/*!*******************************************!*\
|
|
!*** ./resources/js/src/services/user.js ***!
|
|
\*******************************************/
|
|
/*! exports provided: default */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
var resource = '/api/users';
|
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
all: function all() {
|
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
return axios.get("".concat(resource), {
|
|
params: params
|
|
});
|
|
},
|
|
get: function get(id) {
|
|
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
return axios.get("".concat(resource, "/").concat(id), {
|
|
params: params
|
|
});
|
|
},
|
|
create: function create(data) {
|
|
return axios.post("".concat(resource), data);
|
|
},
|
|
update: function update(data, id) {
|
|
return axios.put("".concat(resource, "/").concat(id), data);
|
|
},
|
|
"delete": function _delete(id) {
|
|
return axios["delete"]("".concat(resource, "/").concat(id));
|
|
},
|
|
giveRole: function giveRole(role, id) {
|
|
return axios.post("".concat(resource, "/").concat(id, "/roles/").concat(role));
|
|
},
|
|
revokeRole: function revokeRole(role, id) {
|
|
return axios["delete"]("".concat(resource, "/").concat(id, "/roles/").concat(role));
|
|
},
|
|
givePermission: function givePermission(permission, id) {
|
|
return axios.post("".concat(resource, "/").concat(id, "/permissions/").concat(permission));
|
|
},
|
|
revokePermission: function revokePermission(permission, id) {
|
|
return axios["delete"]("".concat(resource, "/").concat(id, "/permissions/").concat(permission));
|
|
},
|
|
"import": function _import(data) {
|
|
return axios.post("".concat(resource, "/io/import"), data);
|
|
},
|
|
"export": function _export() {
|
|
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
return axios.get("".concat(resource, "/io/export"), {
|
|
params: params,
|
|
responseType: 'blob'
|
|
}).then(function (response) {
|
|
var blob = new Blob([response.data]);
|
|
var url = window.URL.createObjectURL(blob);
|
|
var link = document.createElement('a');
|
|
link.href = url;
|
|
var contentDisposition = response.headers['content-disposition'];
|
|
var fileName = 'unknown';
|
|
|
|
if (contentDisposition) {
|
|
var fileNameMatch = contentDisposition.match(/filename="(.+)"/);
|
|
if (fileNameMatch.length === 2) fileName = fileNameMatch[1];
|
|
}
|
|
|
|
link.setAttribute('download', fileName);
|
|
document.body.appendChild(link);
|
|
link.click();
|
|
link.remove();
|
|
window.URL.revokeObjectURL(url);
|
|
return response;
|
|
});
|
|
}
|
|
});
|
|
|
|
/***/ })
|
|
|
|
}]); |