@icreate/ics-chromely-plugin-report-js-sdk
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -33,4 +33,5 @@ import icsChromelyRequest from '@icreate/ics-chromely-js-sdk'; | ||
} | ||
Report.prototype.OperateEx = function (url, data, method) { | ||
Report.prototype.OperateEx = function (url, data, method, headers) { | ||
if (method === void 0) { method = 'GET'; } | ||
if (headers === void 0) { headers = {}; } | ||
// let opts = | ||
@@ -40,3 +41,4 @@ return icsChromelyRequest.function({ | ||
method: method, | ||
data: __assign(__assign({}, data), { instanceId: this.instanceId }) | ||
data: __assign(__assign({}, data), { instanceId: this.instanceId }), | ||
headers: headers, | ||
}); | ||
@@ -64,5 +66,14 @@ }; | ||
}; | ||
// 导出pdf | ||
/** | ||
* 导出pdf | ||
* @param fileName 文件名称,如果不传则返回流 | ||
* @returns 文件地址或者文件流 | ||
*/ | ||
Report.prototype.ExportToPdf = function (fileName) { | ||
return this.OperateEx('ExportToPdf', { fileName: fileName }); | ||
if (fileName) { | ||
return this.OperateEx('ExportToPdf', { fileName: fileName }); | ||
} | ||
else { | ||
return this.OperateEx('ExportToPdfStream', null, "GET"); | ||
} | ||
}; | ||
@@ -69,0 +80,0 @@ // 导出html |
@@ -41,4 +41,5 @@ (function (global, factory) { | ||
} | ||
Report.prototype.OperateEx = function (url, data, method) { | ||
Report.prototype.OperateEx = function (url, data, method, headers) { | ||
if (method === void 0) { method = 'GET'; } | ||
if (headers === void 0) { headers = {}; } | ||
// let opts = | ||
@@ -48,3 +49,4 @@ return icsChromelyRequest__default["default"].function({ | ||
method: method, | ||
data: __assign(__assign({}, data), { instanceId: this.instanceId }) | ||
data: __assign(__assign({}, data), { instanceId: this.instanceId }), | ||
headers: headers, | ||
}); | ||
@@ -72,5 +74,14 @@ }; | ||
}; | ||
// 导出pdf | ||
/** | ||
* 导出pdf | ||
* @param fileName 文件名称,如果不传则返回流 | ||
* @returns 文件地址或者文件流 | ||
*/ | ||
Report.prototype.ExportToPdf = function (fileName) { | ||
return this.OperateEx('ExportToPdf', { fileName: fileName }); | ||
if (fileName) { | ||
return this.OperateEx('ExportToPdf', { fileName: fileName }); | ||
} | ||
else { | ||
return this.OperateEx('ExportToPdfStream', null, "GET"); | ||
} | ||
}; | ||
@@ -77,0 +88,0 @@ // 导出html |
@@ -17,4 +17,4 @@ "use strict"; | ||
* @Date: 2022-05-06 15:04:22 | ||
* @LastEditors: 文贝 | ||
* @LastEditTime: 2022-09-15 13:19:05 | ||
* @LastEditors: 陶慧灵 | ||
* @LastEditTime: 2022-12-10 23:50:25 | ||
* @Description: | ||
@@ -28,4 +28,5 @@ * @FilePath: \ics-chromely-plugin-report\src\core\report.ts | ||
} | ||
Report.prototype.OperateEx = function (url, data, method) { | ||
Report.prototype.OperateEx = function (url, data, method, headers) { | ||
if (method === void 0) { method = 'GET'; } | ||
if (headers === void 0) { headers = {}; } | ||
// let opts = | ||
@@ -35,3 +36,4 @@ return ics_chromely_js_sdk_1.default.function({ | ||
method: method, | ||
data: __assign(__assign({}, data), { instanceId: this.instanceId }) | ||
data: __assign(__assign({}, data), { instanceId: this.instanceId }), | ||
headers: headers, | ||
}); | ||
@@ -59,5 +61,14 @@ }; | ||
}; | ||
// 导出pdf | ||
/** | ||
* 导出pdf | ||
* @param fileName 文件名称,如果不传则返回流 | ||
* @returns 文件地址或者文件流 | ||
*/ | ||
Report.prototype.ExportToPdf = function (fileName) { | ||
return this.OperateEx('ExportToPdf', { fileName: fileName }); | ||
if (fileName) { | ||
return this.OperateEx('ExportToPdf', { fileName: fileName }); | ||
} | ||
else { | ||
return this.OperateEx('ExportToPdfStream', null, "GET"); | ||
} | ||
}; | ||
@@ -64,0 +75,0 @@ // 导出html |
@@ -10,2 +10,7 @@ export default class Report { | ||
loadFromId(reportId: string): Promise<any>; | ||
/** | ||
* 导出pdf | ||
* @param fileName 文件名称,如果不传则返回流 | ||
* @returns 文件地址或者文件流 | ||
*/ | ||
ExportToPdf(fileName: string): Promise<any>; | ||
@@ -12,0 +17,0 @@ exportToHtml(fileName: string): Promise<any>; |
{ | ||
"name": "@icreate/ics-chromely-plugin-report-js-sdk", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "提供报表设计、清空、预览、打印、注册数据源等功能", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
@@ -5,3 +5,3 @@ <!-- | ||
* @LastEditors: 文贝 | ||
* @LastEditTime: 2022-09-08 18:31:40 | ||
* @LastEditTime: 2022-09-15 13:25:42 | ||
* @Descripttion: | ||
@@ -18,2 +18,3 @@ * @FilePath: \ics-chromely-plugin-report\README.md | ||
``` | ||
0.0.7 修复打印和准备打印方法调用不传打印机名称时使用默认打印机 | ||
0.0.6 修改print和printPrepared的printerName允许为空 | ||
@@ -20,0 +21,0 @@ 0.0.5 增加打印准备报表printPrepared |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
39308
396
100