@ningboyz/vue 1.0.87 → 1.0.88

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,51 +1,48 @@
1
1
  import { decode as m } from "js-base64";
2
2
  import n from "lodash";
3
- import { Stimulsoft as l } from "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.engine.js";
3
+ import { Stimulsoft as c } from "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.engine.js";
4
4
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.chart.js";
5
5
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.export.js";
6
6
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.import.xlsx.js";
7
7
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.maps.js";
8
8
  class g {
9
9
  static DATA_SET_NAME = "网络打印";
10
- static initStimulsoft = () => {
11
- l.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", l.Base.Localization.StiLocalization.addLocalizationFile("../localizations/zh.xml", !1, "中文"), l.Base.Localization.StiLocalization.cultureName = "中文";
10
+ static createDataSet = (s, t) => {
11
+ this.getDataSet(s, t);
12
12
  };
13
- static createDataSet = (i, t) => {
14
- this.getDataSet(i, t);
15
- };
16
- static getDataSet = (i, t) => {
17
- const a = new l.System.Data.DataSet(this.DATA_SET_NAME);
18
- for (let o = 0; o < t.length; o++) {
19
- const e = t[o], s = new l.System.Data.DataTable(e.dataName);
20
- this.listItem2DataTable(s, e), this.listData2DataTable(s, e), a.tables.add(s), i.regData(a.dataSetName, a.dataSetName, a);
13
+ static getDataSet = (s, t) => {
14
+ const a = new c.System.Data.DataSet(this.DATA_SET_NAME);
15
+ for (let i = 0; i < t.length; i++) {
16
+ const e = t[i], o = new c.System.Data.DataTable(e.dataName);
17
+ this.listItem2DataTable(o, e), this.listData2DataTable(o, e), a.tables.add(o), s.regData(a.dataSetName, a.dataSetName, a);
21
18
  }
22
- i.dictionary.synchronize();
19
+ s.dictionary.synchronize();
23
20
  };
24
- static listItem2DataTable = (i, t) => {
21
+ static listItem2DataTable = (s, t) => {
25
22
  for (let a = 0; a < t.listItem.length; a++) {
26
- const o = t.listItem[a];
27
- if (n.isEmpty(o.printVal))
23
+ const i = t.listItem[a];
24
+ if (n.isEmpty(i.printVal))
28
25
  continue;
29
- const e = new l.System.Data.DataColumn(o.printVal);
30
- i.columns.add(e);
26
+ const e = new c.System.Data.DataColumn(i.printVal);
27
+ s.columns.add(e);
31
28
  }
32
29
  };
33
- static listData2DataTable = (i, t) => {
30
+ static listData2DataTable = (s, t) => {
34
31
  for (let a = 0; a < t.listData.length; a++) {
35
- const o = t.listData[a], e = this.getRow(i, t.listItem, o);
36
- i.addRow(e);
32
+ const i = t.listData[a], e = this.getRow(s, t.listItem, i);
33
+ s.addRow(e);
37
34
  }
38
35
  };
39
- static getRow = (i, t, a) => {
40
- const o = i.newRow();
36
+ static getRow = (s, t, a) => {
37
+ const i = s.newRow();
41
38
  for (let e = 0; e < t.length; e++) {
42
- const s = t[e];
43
- if (!n.isEmpty(s.printVal)) {
44
- let c = Reflect.get(a, s.itemCode);
45
- n.isEmpty(s.jsMethod) || (c = this.execJsMethod(s.jsMethod, c)), o.setValue(s.printVal, c);
39
+ const o = t[e];
40
+ if (!n.isEmpty(o.printVal)) {
41
+ let l = Reflect.get(a, o.itemCode);
42
+ n.isEmpty(o.jsMethod) || (l = this.execJsMethod(o.jsMethod, l)), i.setValue(o.printVal, l);
46
43
  }
47
44
  }
48
- return o;
45
+ return i;
49
46
  };
50
47
  /**
51
48
  * 执行js语句
@@ -53,10 +50,10 @@ class g {
53
50
  * @param value
54
51
  * @returns
55
52
  */
56
- static execJsMethod = (i, t) => {
57
- const a = m(i), o = new Function("value", a);
53
+ static execJsMethod = (s, t) => {
54
+ const a = m(s), i = new Function("value", a);
58
55
  try {
59
- const e = o(t);
56
+ const e = i(t);
60
57
  n.isNil(e) || (t = e);
61
58
  } catch (e) {
62
59
  console.log(e.message);
@@ -1,31 +1,31 @@
1
- import t from "lodash";
1
+ import a from "lodash";
2
2
  import "../../node_modules/stimulsoft-reports-js-vuejs/designer.js";
3
- import i from "../dataUtils/stimulsoftData.js";
4
- import { Stimulsoft as o } from "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.engine.js";
3
+ import e from "../dataUtils/stimulsoftData.js";
4
+ import { Stimulsoft as t } from "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.engine.js";
5
5
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.viewer.js";
6
6
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.designer.js";
7
7
  import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.blockly.editor.js";
8
- class c {
8
+ class d {
9
9
  jsonTemplate;
10
10
  listData;
11
11
  report;
12
- constructor(s, r) {
13
- this.jsonTemplate = s, this.listData = r, this.report = new o.Report.StiReport();
12
+ constructor(i, o) {
13
+ this.jsonTemplate = i, this.listData = o, this.report = new t.Report.StiReport();
14
14
  }
15
- setLicense = () => (i.initStimulsoft(), this);
15
+ setLicense = () => (t.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", t.Base.Localization.StiLocalization.addLocalizationFile("../localizations/zh.xml", !1, "中文"), t.Base.Localization.StiLocalization.cultureName = "中文", this);
16
16
  /**
17
17
  * 加载打印模版json
18
18
  * @param json
19
19
  * @returns
20
20
  */
21
- loadJson = () => (t.isEmpty(this.jsonTemplate) || this.report.load(this.jsonTemplate), this);
21
+ loadJson = () => (a.isEmpty(this.jsonTemplate) || this.report.load(this.jsonTemplate), this);
22
22
  /**
23
23
  * 加在数据
24
24
  * @returns
25
25
  */
26
- loadData = () => (this.report.dataSources.clear(), !t.isNil(this.listData) && this.listData.length > 0 && i.createDataSet(this.report, this.listData), this);
26
+ loadData = () => (this.report.dataSources.clear(), !a.isNil(this.listData) && this.listData.length > 0 && e.createDataSet(this.report, this.listData), this);
27
27
  getReport = () => (this.setLicense().loadJson().loadData(), this.report);
28
28
  }
29
29
  export {
30
- c as default
30
+ d as default
31
31
  };
@@ -1,11 +1,11 @@
1
- import { Stimulsoft as n } from "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.engine.js";
1
+ import { Stimulsoft as r } 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
- import p from "../dataUtils/stimulsoftData.js";
7
- import o from "lodash";
8
- class d {
6
+ import l from "../dataUtils/stimulsoftData.js";
7
+ import a from "lodash";
8
+ class U {
9
9
  reports = [];
10
10
  report;
11
11
  printData;
@@ -16,25 +16,25 @@ class d {
16
16
  * @param listData
17
17
  */
18
18
  constructor(t) {
19
- this.printData = t, this.report = new n.Report.StiReport();
19
+ this.printData = t, this.report = new r.Report.StiReport();
20
20
  }
21
21
  /**
22
22
  * 初始化license
23
23
  * @returns
24
24
  */
25
- setLicense = () => (p.initStimulsoft(), this);
25
+ setLicense = () => (r.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", r.Base.Localization.StiLocalization.addLocalizationFile("../localizations/zh.xml", !1, "中文"), r.Base.Localization.StiLocalization.cultureName = "中文", 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 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
- s.load(a), p.createDataSet(s, l), this.reports.push(s);
32
+ const e = this.printData[t];
33
+ for (let i = 0; i < e.jsonTemplates.length; i++) {
34
+ const n = e.jsonTemplates[i];
35
+ for (let o = 0; o < e.listData.length; o++) {
36
+ const p = e.listData[o], s = new r.Report.StiReport();
37
+ s.load(n), l.createDataSet(s, p), this.reports.push(s);
38
38
  }
39
39
  }
40
40
  }
@@ -46,19 +46,19 @@ class d {
46
46
  */
47
47
  mergeReport = async () => {
48
48
  for (let t = 0; t < this.reports.length; t++) {
49
- const r = this.reports[t];
50
- r.render(), t === 0 ? this.report = r : r.renderedPages.toList().forEach((e) => {
51
- this.report.renderedPages.add(e.clone());
49
+ const e = this.reports[t];
50
+ e.render(), t === 0 ? this.report = e : e.renderedPages.toList().forEach((i) => {
51
+ this.report.renderedPages.add(i.clone());
52
52
  });
53
53
  }
54
54
  return this;
55
55
  };
56
56
  print() {
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;
57
+ a.isNil(this.printData) || this.printData.length === 0 || (this.printData.forEach((t) => {
58
+ a.isNil(t.jsonTemplates) || t.jsonTemplates.length === 0 || a.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
- d as default
63
+ U as default
64
64
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ningboyz/vue",
3
- "version": "1.0.87",
3
+ "version": "1.0.88",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "宁波甬政vue-ui库",