@icreate/ics-chromely-plugin-report-js-sdk
Advanced tools
Comparing version 0.0.9 to 0.0.10
import icsChromelyRequest from '@icreate/ics-chromely-js-sdk'; | ||
import { Chromely } from '@icreate/ics-chromely-plugin-core'; | ||
/****************************************************************************** | ||
Copyright (c) Microsoft Corporation. | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
PERFORMANCE OF THIS SOFTWARE. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
@@ -37,5 +38,5 @@ | ||
return icsChromelyRequest.function({ | ||
url: "Report/".concat(url), | ||
url: "Report/" + url, | ||
method: method, | ||
data: __assign(__assign({}, data), { instanceId: this.instanceId }), | ||
data: __assign(__assign({}, data), { instanceId: this.instanceId }) | ||
}); | ||
@@ -47,5 +48,13 @@ }; | ||
}; | ||
// 注册数据源 | ||
Report.prototype.registerData = function (name, data) { | ||
return this.OperateEx('RegisterData', { name: name, data: JSON.stringify(data) }, 'POST'); | ||
/** | ||
* 注册数据源 | ||
* @param name 数据源名称 | ||
* @param data 数据 | ||
* @param field 指定字段对应类型 默认所有字段类型为string | ||
* 可指定 string|bool|date|datetime|decimal|double|float|int|long|object|short | ||
* 格式: {"id":"string","flag":"int","birthday":"date","total":"decimal"} | ||
* @returns | ||
*/ | ||
Report.prototype.registerData = function (name, data, field) { | ||
return this.OperateEx('RegisterData', { name: name, data: JSON.stringify(data), field: JSON.stringify(field || {}) }, 'POST'); | ||
}; | ||
@@ -64,2 +73,6 @@ // 设置双面打印 | ||
}; | ||
// 根据Id加载报表 | ||
Report.prototype.loadFromString = function (content) { | ||
return this.OperateEx('loadFromString', { content: content !== null && content !== void 0 ? content : '' }, "POST"); | ||
}; | ||
/** | ||
@@ -91,21 +104,57 @@ * 导出pdf | ||
}; | ||
// 设计报表 | ||
Report.prototype.design = function () { | ||
return this.OperateEx('Design'); | ||
/** | ||
* 获取报表内容 | ||
* @returns 报表内容 | ||
*/ | ||
Report.prototype.content = function () { | ||
return this.OperateEx('Content'); | ||
}; | ||
/** | ||
* 设计报表 | ||
* @param saveAction 保存回调 | ||
* @returns | ||
*/ | ||
Report.prototype.design = function (saveAction) { | ||
var _this = this; | ||
if (saveAction) { | ||
Chromely.$on('on-report-save-click', function (data) { | ||
if (data.instanceId === _this.instanceId) { | ||
saveAction(data); | ||
} | ||
}); | ||
return this.OperateEx('Design', { customSave: true }); | ||
} | ||
else { | ||
return this.OperateEx('Design'); | ||
} | ||
}; | ||
// 预览报表 | ||
Report.prototype.show = function () { | ||
return this.OperateEx('Show'); | ||
Report.prototype.show = function (printerName, showPrintSettings, closeAfterPrint) { | ||
return this.OperateEx('Show', { | ||
printerName: printerName !== null && printerName !== void 0 ? printerName : '', | ||
showPrintSettings: showPrintSettings !== null && showPrintSettings !== void 0 ? showPrintSettings : false, | ||
closeAfterPrint: closeAfterPrint !== null && closeAfterPrint !== void 0 ? closeAfterPrint : false | ||
}); | ||
}; | ||
// 预览准备报表 | ||
Report.prototype.showPrepared = function () { | ||
return this.OperateEx('ShowPrepared'); | ||
Report.prototype.showPrepared = function (printerName, showPrintSettings, closeAfterPrint) { | ||
return this.OperateEx('ShowPrepared', { | ||
printerName: printerName !== null && printerName !== void 0 ? printerName : '', | ||
showPrintSettings: showPrintSettings !== null && showPrintSettings !== void 0 ? showPrintSettings : false, | ||
closeAfterPrint: closeAfterPrint !== null && closeAfterPrint !== void 0 ? closeAfterPrint : false | ||
}); | ||
}; | ||
// 打印报表 | ||
Report.prototype.print = function (printerName) { | ||
return this.OperateEx('Print', { printerName: printerName !== null && printerName !== void 0 ? printerName : '' }); | ||
Report.prototype.print = function (printerName, showPrintSettings) { | ||
return this.OperateEx('Print', { | ||
printerName: printerName !== null && printerName !== void 0 ? printerName : '', | ||
showPrintSettings: showPrintSettings !== null && showPrintSettings !== void 0 ? showPrintSettings : false | ||
}); | ||
}; | ||
// 打印准备报表 | ||
Report.prototype.printPrepared = function (printerName) { | ||
return this.OperateEx('PrintPrepared', { printerName: printerName !== null && printerName !== void 0 ? printerName : '' }); | ||
Report.prototype.printPrepared = function (printerName, showPrintSettings) { | ||
return this.OperateEx('PrintPrepared', { | ||
printerName: printerName !== null && printerName !== void 0 ? printerName : '', | ||
showPrintSettings: showPrintSettings !== null && showPrintSettings !== void 0 ? showPrintSettings : false | ||
}); | ||
}; | ||
@@ -119,12 +168,3 @@ // 释放报表 | ||
/* | ||
* @Author: 文贝 | ||
* @Date: 2022-02-11 23:21:34 | ||
* @LastEditors: 刘邓 | ||
* @LastEditTime: 2022-05-10 17:11:36 | ||
* @Descripttion: | ||
* @FilePath: \src\ics-chromely-plugin-report-js-sdk.ts | ||
*/ | ||
export { Report as default }; | ||
export default Report; | ||
//# sourceMappingURL=ics-chromely-plugin-report-js-sdk.es5.js.map |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@icreate/ics-chromely-js-sdk')) : | ||
typeof define === 'function' && define.amd ? define(['@icreate/ics-chromely-js-sdk'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.icsChromelyPluginReportJsSdk = factory(global.icsChromelyRequest)); | ||
})(this, (function (icsChromelyRequest) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@icreate/ics-chromely-js-sdk'), require('@icreate/ics-chromely-plugin-core')) : | ||
typeof define === 'function' && define.amd ? define(['@icreate/ics-chromely-js-sdk', '@icreate/ics-chromely-plugin-core'], factory) : | ||
(global.icsChromelyPluginReportJsSdk = factory(global.icsChromelyRequest,global.icsChromelyPluginCore)); | ||
}(this, (function (icsChromelyRequest,icsChromelyPluginCore) { 'use strict'; | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
icsChromelyRequest = icsChromelyRequest && icsChromelyRequest.hasOwnProperty('default') ? icsChromelyRequest['default'] : icsChromelyRequest; | ||
var icsChromelyRequest__default = /*#__PURE__*/_interopDefaultLegacy(icsChromelyRequest); | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
/****************************************************************************** | ||
Copyright (c) Microsoft Corporation. | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
PERFORMANCE OF THIS SOFTWARE. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
@@ -44,6 +42,6 @@ | ||
// let opts = | ||
return icsChromelyRequest__default["default"].function({ | ||
url: "Report/".concat(url), | ||
return icsChromelyRequest.function({ | ||
url: "Report/" + url, | ||
method: method, | ||
data: __assign(__assign({}, data), { instanceId: this.instanceId }), | ||
data: __assign(__assign({}, data), { instanceId: this.instanceId }) | ||
}); | ||
@@ -55,5 +53,13 @@ }; | ||
}; | ||
// 注册数据源 | ||
Report.prototype.registerData = function (name, data) { | ||
return this.OperateEx('RegisterData', { name: name, data: JSON.stringify(data) }, 'POST'); | ||
/** | ||
* 注册数据源 | ||
* @param name 数据源名称 | ||
* @param data 数据 | ||
* @param field 指定字段对应类型 默认所有字段类型为string | ||
* 可指定 string|bool|date|datetime|decimal|double|float|int|long|object|short | ||
* 格式: {"id":"string","flag":"int","birthday":"date","total":"decimal"} | ||
* @returns | ||
*/ | ||
Report.prototype.registerData = function (name, data, field) { | ||
return this.OperateEx('RegisterData', { name: name, data: JSON.stringify(data), field: JSON.stringify(field || {}) }, 'POST'); | ||
}; | ||
@@ -72,2 +78,6 @@ // 设置双面打印 | ||
}; | ||
// 根据Id加载报表 | ||
Report.prototype.loadFromString = function (content) { | ||
return this.OperateEx('loadFromString', { content: content !== null && content !== void 0 ? content : '' }, "POST"); | ||
}; | ||
/** | ||
@@ -99,21 +109,57 @@ * 导出pdf | ||
}; | ||
// 设计报表 | ||
Report.prototype.design = function () { | ||
return this.OperateEx('Design'); | ||
/** | ||
* 获取报表内容 | ||
* @returns 报表内容 | ||
*/ | ||
Report.prototype.content = function () { | ||
return this.OperateEx('Content'); | ||
}; | ||
/** | ||
* 设计报表 | ||
* @param saveAction 保存回调 | ||
* @returns | ||
*/ | ||
Report.prototype.design = function (saveAction) { | ||
var _this = this; | ||
if (saveAction) { | ||
icsChromelyPluginCore.Chromely.$on('on-report-save-click', function (data) { | ||
if (data.instanceId === _this.instanceId) { | ||
saveAction(data); | ||
} | ||
}); | ||
return this.OperateEx('Design', { customSave: true }); | ||
} | ||
else { | ||
return this.OperateEx('Design'); | ||
} | ||
}; | ||
// 预览报表 | ||
Report.prototype.show = function () { | ||
return this.OperateEx('Show'); | ||
Report.prototype.show = function (printerName, showPrintSettings, closeAfterPrint) { | ||
return this.OperateEx('Show', { | ||
printerName: printerName !== null && printerName !== void 0 ? printerName : '', | ||
showPrintSettings: showPrintSettings !== null && showPrintSettings !== void 0 ? showPrintSettings : false, | ||
closeAfterPrint: closeAfterPrint !== null && closeAfterPrint !== void 0 ? closeAfterPrint : false | ||
}); | ||
}; | ||
// 预览准备报表 | ||
Report.prototype.showPrepared = function () { | ||
return this.OperateEx('ShowPrepared'); | ||
Report.prototype.showPrepared = function (printerName, showPrintSettings, closeAfterPrint) { | ||
return this.OperateEx('ShowPrepared', { | ||
printerName: printerName !== null && printerName !== void 0 ? printerName : '', | ||
showPrintSettings: showPrintSettings !== null && showPrintSettings !== void 0 ? showPrintSettings : false, | ||
closeAfterPrint: closeAfterPrint !== null && closeAfterPrint !== void 0 ? closeAfterPrint : false | ||
}); | ||
}; | ||
// 打印报表 | ||
Report.prototype.print = function (printerName) { | ||
return this.OperateEx('Print', { printerName: printerName !== null && printerName !== void 0 ? printerName : '' }); | ||
Report.prototype.print = function (printerName, showPrintSettings) { | ||
return this.OperateEx('Print', { | ||
printerName: printerName !== null && printerName !== void 0 ? printerName : '', | ||
showPrintSettings: showPrintSettings !== null && showPrintSettings !== void 0 ? showPrintSettings : false | ||
}); | ||
}; | ||
// 打印准备报表 | ||
Report.prototype.printPrepared = function (printerName) { | ||
return this.OperateEx('PrintPrepared', { printerName: printerName !== null && printerName !== void 0 ? printerName : '' }); | ||
Report.prototype.printPrepared = function (printerName, showPrintSettings) { | ||
return this.OperateEx('PrintPrepared', { | ||
printerName: printerName !== null && printerName !== void 0 ? printerName : '', | ||
showPrintSettings: showPrintSettings !== null && showPrintSettings !== void 0 ? showPrintSettings : false | ||
}); | ||
}; | ||
@@ -127,14 +173,5 @@ // 释放报表 | ||
/* | ||
* @Author: 文贝 | ||
* @Date: 2022-02-11 23:21:34 | ||
* @LastEditors: 刘邓 | ||
* @LastEditTime: 2022-05-10 17:11:36 | ||
* @Descripttion: | ||
* @FilePath: \src\ics-chromely-plugin-report-js-sdk.ts | ||
*/ | ||
return Report; | ||
})); | ||
}))); | ||
//# sourceMappingURL=ics-chromely-plugin-report-js-sdk.umd.js.map |
@@ -23,2 +23,3 @@ "use strict"; | ||
var ics_chromely_js_sdk_1 = require("@icreate/ics-chromely-js-sdk"); | ||
var ics_chromely_plugin_core_1 = require("@icreate/ics-chromely-plugin-core"); | ||
var Report = /** @class */ (function () { | ||
@@ -32,5 +33,5 @@ function Report() { | ||
return ics_chromely_js_sdk_1.default.function({ | ||
url: "Report/".concat(url), | ||
url: "Report/" + url, | ||
method: method, | ||
data: __assign(__assign({}, data), { instanceId: this.instanceId }), | ||
data: __assign(__assign({}, data), { instanceId: this.instanceId }) | ||
}); | ||
@@ -42,5 +43,13 @@ }; | ||
}; | ||
// 注册数据源 | ||
Report.prototype.registerData = function (name, data) { | ||
return this.OperateEx('RegisterData', { name: name, data: JSON.stringify(data) }, 'POST'); | ||
/** | ||
* 注册数据源 | ||
* @param name 数据源名称 | ||
* @param data 数据 | ||
* @param field 指定字段对应类型 默认所有字段类型为string | ||
* 可指定 string|bool|date|datetime|decimal|double|float|int|long|object|short | ||
* 格式: {"id":"string","flag":"int","birthday":"date","total":"decimal"} | ||
* @returns | ||
*/ | ||
Report.prototype.registerData = function (name, data, field) { | ||
return this.OperateEx('RegisterData', { name: name, data: JSON.stringify(data), field: JSON.stringify(field || {}) }, 'POST'); | ||
}; | ||
@@ -59,2 +68,6 @@ // 设置双面打印 | ||
}; | ||
// 根据Id加载报表 | ||
Report.prototype.loadFromString = function (content) { | ||
return this.OperateEx('loadFromString', { content: content !== null && content !== void 0 ? content : '' }, "POST"); | ||
}; | ||
/** | ||
@@ -86,21 +99,57 @@ * 导出pdf | ||
}; | ||
// 设计报表 | ||
Report.prototype.design = function () { | ||
return this.OperateEx('Design'); | ||
/** | ||
* 获取报表内容 | ||
* @returns 报表内容 | ||
*/ | ||
Report.prototype.content = function () { | ||
return this.OperateEx('Content'); | ||
}; | ||
/** | ||
* 设计报表 | ||
* @param saveAction 保存回调 | ||
* @returns | ||
*/ | ||
Report.prototype.design = function (saveAction) { | ||
var _this = this; | ||
if (saveAction) { | ||
ics_chromely_plugin_core_1.Chromely.$on('on-report-save-click', function (data) { | ||
if (data.instanceId === _this.instanceId) { | ||
saveAction(data); | ||
} | ||
}); | ||
return this.OperateEx('Design', { customSave: true }); | ||
} | ||
else { | ||
return this.OperateEx('Design'); | ||
} | ||
}; | ||
// 预览报表 | ||
Report.prototype.show = function () { | ||
return this.OperateEx('Show'); | ||
Report.prototype.show = function (printerName, showPrintSettings, closeAfterPrint) { | ||
return this.OperateEx('Show', { | ||
printerName: printerName !== null && printerName !== void 0 ? printerName : '', | ||
showPrintSettings: showPrintSettings !== null && showPrintSettings !== void 0 ? showPrintSettings : false, | ||
closeAfterPrint: closeAfterPrint !== null && closeAfterPrint !== void 0 ? closeAfterPrint : false | ||
}); | ||
}; | ||
// 预览准备报表 | ||
Report.prototype.showPrepared = function () { | ||
return this.OperateEx('ShowPrepared'); | ||
Report.prototype.showPrepared = function (printerName, showPrintSettings, closeAfterPrint) { | ||
return this.OperateEx('ShowPrepared', { | ||
printerName: printerName !== null && printerName !== void 0 ? printerName : '', | ||
showPrintSettings: showPrintSettings !== null && showPrintSettings !== void 0 ? showPrintSettings : false, | ||
closeAfterPrint: closeAfterPrint !== null && closeAfterPrint !== void 0 ? closeAfterPrint : false | ||
}); | ||
}; | ||
// 打印报表 | ||
Report.prototype.print = function (printerName) { | ||
return this.OperateEx('Print', { printerName: printerName !== null && printerName !== void 0 ? printerName : '' }); | ||
Report.prototype.print = function (printerName, showPrintSettings) { | ||
return this.OperateEx('Print', { | ||
printerName: printerName !== null && printerName !== void 0 ? printerName : '', | ||
showPrintSettings: showPrintSettings !== null && showPrintSettings !== void 0 ? showPrintSettings : false | ||
}); | ||
}; | ||
// 打印准备报表 | ||
Report.prototype.printPrepared = function (printerName) { | ||
return this.OperateEx('PrintPrepared', { printerName: printerName !== null && printerName !== void 0 ? printerName : '' }); | ||
Report.prototype.printPrepared = function (printerName, showPrintSettings) { | ||
return this.OperateEx('PrintPrepared', { | ||
printerName: printerName !== null && printerName !== void 0 ? printerName : '', | ||
showPrintSettings: showPrintSettings !== null && showPrintSettings !== void 0 ? showPrintSettings : false | ||
}); | ||
}; | ||
@@ -107,0 +156,0 @@ // 释放报表 |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/* | ||
* @Author: 文贝 | ||
* @Date: 2022-02-11 23:21:34 | ||
* @LastEditors: 刘邓 | ||
* @LastEditTime: 2022-05-10 17:11:36 | ||
* @Descripttion: | ||
* @FilePath: \src\ics-chromely-plugin-report-js-sdk.ts | ||
*/ | ||
var report_1 = require("./core/report"); | ||
exports.default = report_1.default; | ||
//# sourceMappingURL=ics-chromely-plugin-report-js-sdk.js.map |
@@ -6,6 +6,16 @@ export default class Report { | ||
clearData(): Promise<any>; | ||
registerData(name: string, data: Array<any>): Promise<any>; | ||
/** | ||
* 注册数据源 | ||
* @param name 数据源名称 | ||
* @param data 数据 | ||
* @param field 指定字段对应类型 默认所有字段类型为string | ||
* 可指定 string|bool|date|datetime|decimal|double|float|int|long|object|short | ||
* 格式: {"id":"string","flag":"int","birthday":"date","total":"decimal"} | ||
* @returns | ||
*/ | ||
registerData(name: string, data: Array<any>, field: object): Promise<any>; | ||
doublePass(value: Boolean): Promise<any>; | ||
load(fileName: string): Promise<any>; | ||
loadFromId(reportId: string): Promise<any>; | ||
loadFromString(content: string): Promise<any>; | ||
/** | ||
@@ -20,8 +30,18 @@ * 导出pdf | ||
addParameter(name: string, value: string): Promise<any>; | ||
design(): Promise<any>; | ||
show(): Promise<any>; | ||
showPrepared(): Promise<any>; | ||
print(printerName?: string): Promise<any>; | ||
printPrepared(printerName?: string): Promise<any>; | ||
/** | ||
* 获取报表内容 | ||
* @returns 报表内容 | ||
*/ | ||
content(): Promise<any>; | ||
/** | ||
* 设计报表 | ||
* @param saveAction 保存回调 | ||
* @returns | ||
*/ | ||
design(saveAction: Function): Promise<any>; | ||
show(printerName?: string, showPrintSettings?: boolean, closeAfterPrint?: boolean): Promise<any>; | ||
showPrepared(printerName?: string, showPrintSettings?: boolean, closeAfterPrint?: boolean): Promise<any>; | ||
print(printerName?: string, showPrintSettings?: boolean): Promise<any>; | ||
printPrepared(printerName?: string, showPrintSettings?: boolean): Promise<any>; | ||
dispose(): Promise<any>; | ||
} |
{ | ||
"name": "@icreate/ics-chromely-plugin-report-js-sdk", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"description": "提供报表设计、清空、预览、打印、注册数据源等功能", | ||
@@ -122,4 +122,4 @@ "keywords": [], | ||
"dependencies": { | ||
"@icreate/core": "^0.0.15" | ||
"@icreate/ics-chromely-plugin-core": "^0.0.22" | ||
} | ||
} |
@@ -17,2 +17,3 @@ <!-- | ||
``` | ||
0.0.9-beta.1 注册数据源时允许指定字段类型 | ||
0.0.9 优化和完善导出pdf流 | ||
@@ -87,2 +88,37 @@ 0.0.8-beta.1 增加导出pdf流示例 | ||
### 指定字段类型示例 | ||
```javascript | ||
const reportHelper = new ReportHelper() | ||
await reportHelper.clearData() | ||
await reportHelper.load('xxxx.frx') | ||
//指定数据源中字段对应的类型,{id:"string",name:"string", birthday: "date"} | ||
//可指定 string|bool|date|datetime|decimal|double|float|int|long|object|short | ||
//格式: {"id":"string","flag":"int","birthday":"date","total":"decimal"} | ||
await reportHelper.registerData('患者基本信息',[{ id:"1",name:"张三",birthday:"1988-05-26"}],{id:"string",name:"string", birthday: "date"}) | ||
await reportHelper.design() //设计报表 | ||
await reportHelper.show() //预览报表 | ||
await reportHelper.print() //打印报表 | ||
``` | ||
#### 字段类型说明 | ||
| 类型 | 描述 | 范围 | 默认值 | | ||
| --- | --- | --- | --- | | ||
| bool | 布尔值 | True 或 False | FALSE | | ||
| byte | 8 位无符号整数 | 0 到 255 | 0 | | ||
| char | 16 位 Unicode 字符 | U +0000 到 U +ffff | '\\0' | | ||
| decimal | 128 位精确的十进制值,28-29 有效位数 | (-7.9 x 1028 到 7.9 x 1028) / 100 到 28 | 0.0M | | ||
| double | 64 位双精度浮点型 | (+/-)5.0 x 10-324 到 (+/-)1.7 x 10308 | 0.0D | | ||
| float | 32 位单精度浮点型 | -3.4 x 1038 到 + 3.4 x 1038 | 0.0F | | ||
| int | 32 位有符号整数类型 | -2,147,483,648 到 2,147,483,647 | 0 | | ||
| long | 64 位有符号整数类型 | -9,223,372,036,854,775,808 到 9,223,372,036,854,775,807 | 0L | | ||
| sbyte | 8 位有符号整数类型 | -128 到 127 | 0 | | ||
| short | 16 位有符号整数类型 | -32,768 到 32,767 | 0 | | ||
| uint | 32 位无符号整数类型 | 0 到 4,294,967,295 | 0 | | ||
| ulong | 64 位无符号整数类型 | 0 到 18,446,744,073,709,551,615 | 0 | | ||
| ushort | 16 位无符号整数类型 | 0 到 65,535 | 0 | | ||
| date | 日期 | 0001/1/1 00:00:00到9999/12/31 00:00:00之间 | 0001/1/1 0:00:00 | | ||
| datetime | 日期时间 | 0001/1/1 00:00:00到9999/12/31 23:59:59之间 | 0001/1/1 0:00:00 | | ||
### 合并打印示例 | ||
@@ -89,0 +125,0 @@ |
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54457
531
157
1
+ Added@icreate/core@0.0.26(transitive)
+ Added@icreate/ics-chromely-plugin-core@0.0.22(transitive)
- Removed@icreate/core@^0.0.15
- Removed@icreate/core@0.0.15(transitive)