@ningboyz/vue 1.0.85 → 1.0.87

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
- import { Stimulsoft as r } from "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.engine.js";
1
+ import { Stimulsoft as n } from "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.engine.js";
2
2
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.chart.js";
3
3
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.export.js";
4
4
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.import.xlsx.js";
5
5
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.maps.js";
6
6
  import p from "../dataUtils/stimulsoftData.js";
7
- import n from "lodash";
8
- class z {
7
+ import o from "lodash";
8
+ class d {
9
9
  reports = [];
10
10
  report;
11
11
  printData;
@@ -16,24 +16,24 @@ class z {
16
16
  * @param listData
17
17
  */
18
18
  constructor(t) {
19
- this.printData = t, this.report = new r.Report.StiReport();
19
+ this.printData = t, this.report = new n.Report.StiReport();
20
20
  }
21
21
  /**
22
22
  * 初始化license
23
23
  * @returns
24
24
  */
25
- setLicense = () => (r.Base.StiLicense.key = "6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHnoqRsTjn3r4gCjGmI4zigyx1/jykQLu0NAARASnJjAQSyt52+ehldWEiMsZr8vWwzgXL/3VIlNgijvFXFLs34gS6703afT96ozRsf6Vk6R8lFE8TtNzZOAhDQhIaA4KA8LyCDq5CDwl1tnSZ8le+Kjo5dpbeydmKhuvCwtPDzdkT4SH72amyuwPw5V/JY3q7Qx+hoRwJ+po3nwnUuNXvhMzSLf6u4dICb1ZwoTBLzLrb3nI59GOzt4GZxTtP+YxmhrqgNz/qjx5INz7xiWya1qSyaV5kwYzc/PC5TBBzNqNIdWEjceObbxhZlYe8ftibTERDpdzgNLpvlqtc4T5hsuW+QF90lcDcFrAjLcb3qXSaWyolq8pu5YV72jtvwvSKx08MK79u+tHbg8+Sp4hFdeTfPBY+ASAEYmbTHksa3a3yhKnmm8Ukc5YDOqLtjE7rRqqVnbfDOJAJwFveTgcBS/jqPnOxiyYn5moz0Ql7THTomnaO+D1q31yZEKr8MmdaEj1beofSS8loVhbU76FRnMfKCxGFRVa0RWT2lDBHuBmf7WDciO6KYgiMLSGeN3yvvDY+5Miavh6vQqGZUoIN3BTog+V04NiiLWYF4NYAi/63mM0/FnlWLgPwMnChfNstWL9Q8LFIEy1HepHGbq6i5kwx2nANiJBnMnPJEB4Tdd8wAP5HN1LHG71xwV5XHEkghmgn2BPC8XOtHaRw0NpHWa", r.Base.Localization.StiLocalization.addLocalizationFile("./localizations/zh.xml", !1, "中文"), r.Base.Localization.StiLocalization.cultureName = "中文", this);
25
+ setLicense = () => (p.initStimulsoft(), this);
26
26
  /**
27
- * 初始化报销
27
+ * 初始化报表
28
28
  * @returns
29
29
  */
30
30
  initReport = () => {
31
31
  for (let t = 0; t < this.printData.length; t++) {
32
- const i = this.printData[t];
33
- for (let e = 0; e < i.jsonTemplates.length; e++) {
34
- const a = i.jsonTemplates[e];
35
- for (let o = 0; o < i.listData.length; o++) {
36
- const l = i.listData[o], s = new r.Report.StiReport();
32
+ const r = this.printData[t];
33
+ for (let e = 0; e < r.jsonTemplates.length; e++) {
34
+ const a = r.jsonTemplates[e];
35
+ for (let i = 0; i < r.listData.length; i++) {
36
+ const l = r.listData[i], s = new n.Report.StiReport();
37
37
  s.load(a), p.createDataSet(s, l), this.reports.push(s);
38
38
  }
39
39
  }
@@ -46,19 +46,19 @@ class z {
46
46
  */
47
47
  mergeReport = async () => {
48
48
  for (let t = 0; t < this.reports.length; t++) {
49
- const i = this.reports[t];
50
- i.render(), t === 0 ? this.report = i : i.renderedPages.toList().forEach((e) => {
49
+ const r = this.reports[t];
50
+ r.render(), t === 0 ? this.report = r : r.renderedPages.toList().forEach((e) => {
51
51
  this.report.renderedPages.add(e.clone());
52
52
  });
53
53
  }
54
54
  return this;
55
55
  };
56
56
  print() {
57
- n.isNil(this.printData) || this.printData.length === 0 || (this.printData.forEach((t) => {
58
- n.isNil(t.jsonTemplates) || t.jsonTemplates.length === 0 || n.isNil(t.listData) || t.listData.length;
57
+ o.isNil(this.printData) || this.printData.length === 0 || (this.printData.forEach((t) => {
58
+ o.isNil(t.jsonTemplates) || t.jsonTemplates.length === 0 || o.isNil(t.listData) || t.listData.length;
59
59
  }), this.setLicense(), this.initReport(), this.mergeReport(), this.report.print());
60
60
  }
61
61
  }
62
62
  export {
63
- z as default
63
+ d as default
64
64
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ningboyz/vue",
3
- "version": "1.0.85",
3
+ "version": "1.0.87",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "宁波甬政vue-ui库",
@@ -19,5 +19,6 @@ export * from "./components/core/core";
19
19
  export * from "./stimulsoft/desginer/desginer";
20
20
  export * from "./stimulsoft/desginer/factory";
21
21
  export * from "./stimulsoft/printer/printer";
22
+ export * from "./stimulsoft/dataUtils/StimulsoftData";
22
23
  export * from "./message/message";
23
24
  export * from "./layout/layout";
@@ -0,0 +1,14 @@
1
+ import { TWldy } from "@ningboyz/types";
2
+ import { Stimulsoft } from "stimulsoft-reports-js-vuejs/designer";
3
+ declare class StimulsoftData {
4
+ private static DATA_SET_NAME: string;
5
+ public loadLicense: () => void;
6
+ public loadLanguage: () => void;
7
+ public createDataSet: (report: Stimulsoft.Report.StiReport, listData: TWldy.IWldyDataResponse[]) => void;
8
+ private getDataSet: (report: Stimulsoft.Report.StiReport, listData: TWldy.IWldyDataResponse[]) => void;
9
+ private listItem2DataTable: (dataTable: Stimulsoft.System.Data.DataTable, wldyData: TWldy.IWldyDataResponse) => void;
10
+ private listData2DataTable: (dataTable: Stimulsoft.System.Data.DataTable, wldyData: TWldy.IWldyDataResponse) => void;
11
+ private getRow: (dataTable: Stimulsoft.System.Data.DataTable, listItem: TWldy.IWldyItemResponse[], data: any) => void;
12
+ private execJsMethod: (jsMethod: string, value: any) => any;
13
+ }
14
+ export default StimulsoftData;
@@ -7,10 +7,6 @@ export declare const YzDesginer: YzComponentApp<YzDesginerProps, {}, YzDesginerS
7
7
  export type YzDesginerProps = {
8
8
  templateJson?: string;
9
9
  listData?: TWldy.IWldyDataResponse[];
10
- registerTable?: (report: Stimulsoft.Report.StiReport) => Promise<{
11
- table: Stimulsoft.Report.Components.Table.StiTable;
12
- index: number;
13
- }>;
14
10
  };
15
11
 
16
12
  export type YzDesginerMethod = {
@@ -1,15 +1,14 @@
1
1
  import { TWldy } from "@ningboyz/types";
2
2
  import { Stimulsoft } from "stimulsoft-reports-js-vuejs/designer";
3
3
  declare class Factory {
4
- private listData: TWldy.IWldyDataResponse[];
4
+ private jsonTemplate?: string;
5
+ private listData?: TWldy.IWldyDataResponse[];
5
6
  private report: Stimulsoft.Report.StiReport;
6
- constructor(listData?: TWldy.IWldyDataResponse[]);
7
- initLicense: () => Factory;
8
- setListData: (listData: TWldy.IWldyDataResponse[]) => Factory;
9
- loadJson: (json: string | undefined) => Factory;
10
- getReport: () => Stimulsoft.Report.StiReport;
11
- print: () => Factory;
12
- printToPdf: () => Factory;
7
+ constructor(ljsonTemplate?: string, listData?: TWldy.IWldyDataResponse[]);
8
+ private setLicense: () => Factory;
9
+ private loadJson: () => Factory;
10
+ private loadData: () => Factory;
11
+ public getReport: () => Stimulsoft.Report.StiReport;
13
12
  }
14
13
  export default Factory;
15
14