@ningboyz/vue 1.0.63 → 1.0.65

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.
package/es/components.js CHANGED
@@ -1,12 +1,14 @@
1
- import { YzDesginer as t } from "./stimulsoft/desginer/index.js";
1
+ import { YzDesginer as r } from "./stimulsoft/desginer/index.js";
2
+ import { StimulsoftFactory as c } from "./stimulsoft/desginer/index.js";
2
3
  import { YzLayout as e } from "./layout/index.js";
3
- import { YzMessage as f } from "./message/index.js";
4
- const s = [t, e], p = (o) => {
5
- s.forEach((r) => o.use(r));
4
+ import { YzMessage as l } from "./message/index.js";
5
+ const s = [r, e], n = (o) => {
6
+ s.forEach((t) => o.use(t));
6
7
  };
7
8
  export {
8
- t as YzDesginer,
9
+ c as StimulsoftFactory,
10
+ r as YzDesginer,
9
11
  e as YzLayout,
10
- f as YzMessage,
11
- p as install
12
+ l as YzMessage,
13
+ n as install
12
14
  };
package/es/index.js CHANGED
@@ -1,12 +1,13 @@
1
1
  import * as o from "./components.js";
2
- import { install as t } from "./components.js";
3
- import { YzDesginer as p } from "./stimulsoft/desginer/index.js";
4
- import { YzMessage as a } from "./message/index.js";
5
- import { YzLayout as x } from "./layout/index.js";
2
+ import { install as e } from "./components.js";
3
+ import { StimulsoftFactory as s, YzDesginer as a } from "./stimulsoft/desginer/index.js";
4
+ import { YzMessage as p } from "./message/index.js";
5
+ import { YzLayout as i } from "./layout/index.js";
6
6
  export {
7
- p as YzDesginer,
8
- x as YzLayout,
9
- a as YzMessage,
7
+ s as StimulsoftFactory,
8
+ a as YzDesginer,
9
+ i as YzLayout,
10
+ p as YzMessage,
10
11
  o as default,
11
- t as install
12
+ e as install
12
13
  };
@@ -1,6 +1,6 @@
1
- import o from "lodash";
1
+ import s from "lodash";
2
2
  import "../../node_modules/stimulsoft-reports-js-vuejs/designer.js";
3
- import { Stimulsoft as r } from "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.engine.js";
3
+ import { Stimulsoft as o } 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";
@@ -8,7 +8,7 @@ class f {
8
8
  listData = void 0;
9
9
  report;
10
10
  constructor(t) {
11
- o.isNil(t) || (this.listData = t), this.report = new r.Report.StiReport();
11
+ s.isNil(t) || (this.listData = t), this.report = new o.Report.StiReport();
12
12
  }
13
13
  setListData = (t) => (this.listData = t, this);
14
14
  /**
@@ -16,36 +16,42 @@ class f {
16
16
  * @param json
17
17
  * @returns
18
18
  */
19
- loadJson = (t) => (o.isEmpty(t) || this.report.load(t), this);
20
- getReport = () => (this.report.dataSources.clear(), o.isNil(this.listData) || this.listData.length === 0 ? this.report : (this.getDataSet(this.listData), this.report));
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
+ };
21
27
  getDataSet = (t) => {
22
- const a = new r.System.Data.DataSet("网络打印");
28
+ const a = new o.System.Data.DataSet("网络打印");
23
29
  for (let e = 0; e < t.length; e++) {
24
- const i = t[e], s = new r.System.Data.DataTable(i.dataName);
25
- this.listItem2DataTable(s, i), this.listData2DataTable(s, i), a.tables.add(s), this.report.regData(a.dataSetName, a.dataSetName, a);
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);
26
32
  }
27
33
  this.report.dictionary.synchronize();
28
34
  };
29
35
  listItem2DataTable = (t, a) => {
30
36
  for (let e = 0; e < a.listItem.length; e++) {
31
37
  const i = a.listItem[e];
32
- if (o.isEmpty(i.printVal))
38
+ if (s.isEmpty(i.printVal))
33
39
  continue;
34
- const s = new r.System.Data.DataColumn(i.printVal);
35
- t.columns.add(s);
40
+ const r = new o.System.Data.DataColumn(i.printVal);
41
+ t.columns.add(r);
36
42
  }
37
43
  };
38
44
  listData2DataTable = (t, a) => {
39
45
  for (let e = 0; e < a.listData.length; e++) {
40
- const i = a.listData[e], s = this.getRow(t, a.listItem, i);
41
- t.addRow(s);
46
+ const i = a.listData[e], r = this.getRow(t, a.listItem, i);
47
+ t.addRow(r);
42
48
  }
43
49
  };
44
50
  getRow = (t, a, e) => {
45
51
  const i = t.newRow();
46
- for (let s = 0; s < a.length; s++) {
47
- const l = a[s];
48
- o.isEmpty(l.printVal) || i.setValue(l.printVal, Reflect.get(e, l.itemCode));
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
55
  }
50
56
  return i;
51
57
  };
@@ -1,8 +1,10 @@
1
- import n from "./desginer.vue.js";
2
- n.install = (o) => {
3
- o.component(n.name, n);
1
+ import o from "./desginer.vue.js";
2
+ import m from "./factory.js";
3
+ o.install = (t) => {
4
+ t.component(o.name, o);
4
5
  };
5
- const m = n;
6
+ const c = o, i = m;
6
7
  export {
7
- m as YzDesginer
8
+ i as StimulsoftFactory,
9
+ c as YzDesginer
8
10
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ningboyz/vue",
3
- "version": "1.0.63",
3
+ "version": "1.0.65",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "宁波甬政vue-ui库",
@@ -4,8 +4,11 @@ declare class Factory {
4
4
  private listData;
5
5
  private report;
6
6
  constructor(listData?: TWldy.IWldyDataResponse[]);
7
- setListData: (listData: TWldy.IWldyDataResponse[]) => void;
7
+ setListData: (listData: TWldy.IWldyDataResponse[]) => Stimulsoft.Report.StiReport;
8
+ loadJson = (json: string | undefined) => Stimulsoft.Report.StiReport;
8
9
  getReport: () => Stimulsoft.Report.StiReport;
10
+ print: () => void;
11
+ printToPdf: () => void;
9
12
  private getDataSet;
10
13
  private listItem2DataTable;
11
14
  private listData2DataTable;