@ningboyz/vue 1.0.73 → 1.0.75

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,61 +1,60 @@
1
- import s from "lodash";
1
+ import r from "lodash";
2
2
  import "../../node_modules/stimulsoft-reports-js-vuejs/designer.js";
3
- import { Stimulsoft as o } from "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.engine.js";
3
+ import { Stimulsoft as s } from "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.engine.js";
4
4
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.viewer.js";
5
5
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.designer.js";
6
6
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.blockly.editor.js";
7
- class f {
7
+ class u {
8
8
  listData = void 0;
9
9
  report;
10
10
  constructor(t) {
11
- s.isNil(t) || (this.listData = t), this.report = new o.Report.StiReport();
11
+ r.isNil(t) || (this.listData = t), this.report = new s.Report.StiReport();
12
12
  }
13
+ initLicense = () => {
14
+ s.Base.StiLicense.key = "6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHkVaUjYnRU/wphl9h6TkK9UtvGvwIZ/qCzU7vjHmM5RWbvCAfAhZhn+eMayEo4PRtUFJINrdMkfnVj1/HeyPgSgAKdpQpP1wzGj2ri5UgGNU8p7Pi59UAegRyUxjTI96rT+khTJIcSoTTPkqZwt0uC+IGtEdehlDchk7madvSLA9guSEZZuSHsc+adQ93NZogak6uo7LbqRh2xC23iGH4sValMR9CBxAsjWUYJH0yrcXODeYrX6ARDlVCW40MGOMrYnx/2W3O8L26oTyAFEdQ1TN1KzYjP4zenjvu4KBAWIopWG6Gk2ydffI0zldxHaPeEl0Lt6U77ykFtsXqW5fN/9t040SfeZfzMAq2ZoVGXPXKCjBo+asFZHrxn7iLpsxF7zwWkYIto8ObpimosoY0on8aLx7At7Qo3VaUOST48gIdqBabUpVz3O9h8UULJa23nlwMVMXheIMMmp6ACD9Bupla/giERFXIYIfpE4eFCD93sR2Cq2f8jdm5Z9B/faB8j4iz0IugVhK4BYhw2q9jAufdWTIx3nsE2Qw7ah0jNsgkR9kWWnHQ3qI/lwFLcFr81SVgyNpFzZ/zcV6vM+xaqbuEMivQx5uFx9WLOMU/ZYkyV8Hi/IEmU+O72NObJtWDxnhUkl4iV0WsYT2V2EU8t0NZP9SBCrLU+rd0SERAdGnRUfoJrm8mXPgcN6+FGNyTgiw0Do8oLU/Skqa/TohVeT", s.Base.Localization.StiLocalization.addLocalizationFile("../localizations/zh.xml", !1, "中文"), s.Base.Localization.StiLocalization.cultureName = "中文";
15
+ };
13
16
  setListData = (t) => (this.listData = t, this);
14
17
  /**
15
18
  * 加载打印模版json
16
19
  * @param json
17
20
  * @returns
18
21
  */
19
- loadJson = (t) => (s.isEmpty(t) || this.report.load(t), this);
20
- getReport = () => (this.report.dataSources.clear(), s.isNil(this.listData) || this.listData.length === 0 ? this.report : (this.getDataSet(this.listData), this.report));
21
- print = () => {
22
- this.report.print();
23
- };
24
- printToPdf = () => {
25
- this.report.printToPdf();
26
- };
22
+ loadJson = (t) => (r.isEmpty(t) || this.report.load(t), this);
23
+ getReport = () => (this.report.dataSources.clear(), r.isNil(this.listData) || this.listData.length === 0 ? this.report : (this.getDataSet(this.listData), this.report));
24
+ print = () => (this.report.print(), this);
25
+ printToPdf = () => (this.report.printToPdf(), this);
27
26
  getDataSet = (t) => {
28
- const a = new o.System.Data.DataSet("网络打印");
29
- for (let e = 0; e < t.length; e++) {
30
- const i = t[e], r = new o.System.Data.DataTable(i.dataName);
31
- this.listItem2DataTable(r, i), this.listData2DataTable(r, i), a.tables.add(r), this.report.regData(a.dataSetName, a.dataSetName, a);
27
+ const a = new s.System.Data.DataSet("网络打印");
28
+ for (let i = 0; i < t.length; i++) {
29
+ const e = t[i], o = new s.System.Data.DataTable(e.dataName);
30
+ this.listItem2DataTable(o, e), this.listData2DataTable(o, e), a.tables.add(o), this.report.regData(a.dataSetName, a.dataSetName, a);
32
31
  }
33
32
  this.report.dictionary.synchronize();
34
33
  };
35
34
  listItem2DataTable = (t, a) => {
36
- for (let e = 0; e < a.listItem.length; e++) {
37
- const i = a.listItem[e];
38
- if (s.isEmpty(i.printVal))
35
+ for (let i = 0; i < a.listItem.length; i++) {
36
+ const e = a.listItem[i];
37
+ if (r.isEmpty(e.printVal))
39
38
  continue;
40
- const r = new o.System.Data.DataColumn(i.printVal);
41
- t.columns.add(r);
39
+ const o = new s.System.Data.DataColumn(e.printVal);
40
+ t.columns.add(o);
42
41
  }
43
42
  };
44
43
  listData2DataTable = (t, a) => {
45
- for (let e = 0; e < a.listData.length; e++) {
46
- const i = a.listData[e], r = this.getRow(t, a.listItem, i);
47
- t.addRow(r);
44
+ for (let i = 0; i < a.listData.length; i++) {
45
+ const e = a.listData[i], o = this.getRow(t, a.listItem, e);
46
+ t.addRow(o);
48
47
  }
49
48
  };
50
- getRow = (t, a, e) => {
51
- const i = t.newRow();
52
- for (let r = 0; r < a.length; r++) {
53
- const l = a[r];
54
- s.isEmpty(l.printVal) || i.setValue(l.printVal, Reflect.get(e, l.itemCode));
49
+ getRow = (t, a, i) => {
50
+ const e = t.newRow();
51
+ for (let o = 0; o < a.length; o++) {
52
+ const l = a[o];
53
+ r.isEmpty(l.printVal) || e.setValue(l.printVal, Reflect.get(i, l.itemCode));
55
54
  }
56
- return i;
55
+ return e;
57
56
  };
58
57
  }
59
58
  export {
60
- f as default
59
+ u as default
61
60
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ningboyz/vue",
3
- "version": "1.0.73",
3
+ "version": "1.0.75",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "宁波甬政vue-ui库",
@@ -4,11 +4,12 @@ declare class Factory {
4
4
  private listData;
5
5
  private report;
6
6
  constructor(listData?: TWldy.IWldyDataResponse[]);
7
- setListData: (listData: TWldy.IWldyDataResponse[]) => Stimulsoft.Report.StiReport;
8
- loadJson: (json: string | undefined) => Stimulsoft.Report.StiReport;
7
+ initLicense: () => void;
8
+ setListData: (listData: TWldy.IWldyDataResponse[]) => Factory;
9
+ loadJson: (json: string | undefined) => Factory;
9
10
  getReport: () => Stimulsoft.Report.StiReport;
10
- print: () => void;
11
- printToPdf: () => void;
11
+ print: () => Factory;
12
+ printToPdf: () => Factory;
12
13
  private getDataSet;
13
14
  private listItem2DataTable;
14
15
  private listData2DataTable;