@ningboyz/vue 1.0.83 → 1.0.85
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 +9 -7
- package/es/index.js +9 -7
- package/es/stimulsoft/dataUtils/stimulsoftData.js +66 -0
- package/es/stimulsoft/desginer/desginer.vue.js +24 -22
- package/es/stimulsoft/desginer/factory.js +7 -37
- package/es/stimulsoft/printer/index.js +5 -0
- package/es/stimulsoft/printer/printer.js +64 -0
- package/package.json +1 -1
- package/types/components.d.ts +1 -0
- package/types/stimulsoft/desginer/desginer.d.ts +8 -1
- package/types/stimulsoft/desginer/factory.d.ts +2 -6
- package/types/stimulsoft/printer/printer.d.ts +14 -0
package/es/components.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { YzDesginer as r } from "./stimulsoft/desginer/index.js";
|
|
2
|
-
import { StimulsoftFactory as
|
|
2
|
+
import { StimulsoftFactory as a } from "./stimulsoft/desginer/index.js";
|
|
3
3
|
import { YzLayout as e } from "./layout/index.js";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import { StimulsoftPrinter as l } from "./stimulsoft/printer/index.js";
|
|
5
|
+
import { YzMessage as x } from "./message/index.js";
|
|
6
|
+
const m = [r, e], i = (o) => {
|
|
7
|
+
m.forEach((t) => o.use(t));
|
|
7
8
|
};
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
+
a as StimulsoftFactory,
|
|
11
|
+
l as StimulsoftPrinter,
|
|
10
12
|
r as YzDesginer,
|
|
11
13
|
e as YzLayout,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
x as YzMessage,
|
|
15
|
+
i as install
|
|
14
16
|
};
|
package/es/index.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import * as o from "./components.js";
|
|
2
2
|
import { install as e } from "./components.js";
|
|
3
|
-
import { StimulsoftFactory as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { StimulsoftFactory as f, YzDesginer as s } from "./stimulsoft/desginer/index.js";
|
|
4
|
+
import { StimulsoftPrinter as a } from "./stimulsoft/printer/index.js";
|
|
5
|
+
import { YzMessage as x } from "./message/index.js";
|
|
6
|
+
import { YzLayout as n } from "./layout/index.js";
|
|
6
7
|
export {
|
|
7
|
-
|
|
8
|
-
a as
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
f as StimulsoftFactory,
|
|
9
|
+
a as StimulsoftPrinter,
|
|
10
|
+
s as YzDesginer,
|
|
11
|
+
n as YzLayout,
|
|
12
|
+
x as YzMessage,
|
|
11
13
|
o as default,
|
|
12
14
|
e as install
|
|
13
15
|
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { decode as m } from "js-base64";
|
|
2
|
+
import n from "lodash";
|
|
3
|
+
import { Stimulsoft as c } from "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.engine.js";
|
|
4
|
+
import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.chart.js";
|
|
5
|
+
import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.export.js";
|
|
6
|
+
import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.import.xlsx.js";
|
|
7
|
+
import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.maps.js";
|
|
8
|
+
class g {
|
|
9
|
+
static DATA_SET_NAME = "网络打印";
|
|
10
|
+
static createDataSet = (s, t) => {
|
|
11
|
+
this.getDataSet(s, t);
|
|
12
|
+
};
|
|
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);
|
|
18
|
+
}
|
|
19
|
+
s.dictionary.synchronize();
|
|
20
|
+
};
|
|
21
|
+
static listItem2DataTable = (s, t) => {
|
|
22
|
+
for (let a = 0; a < t.listItem.length; a++) {
|
|
23
|
+
const i = t.listItem[a];
|
|
24
|
+
if (n.isEmpty(i.printVal))
|
|
25
|
+
continue;
|
|
26
|
+
const e = new c.System.Data.DataColumn(i.printVal);
|
|
27
|
+
s.columns.add(e);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
static listData2DataTable = (s, t) => {
|
|
31
|
+
for (let a = 0; a < t.listData.length; a++) {
|
|
32
|
+
const i = t.listData[a], e = this.getRow(s, t.listItem, i);
|
|
33
|
+
s.addRow(e);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
static getRow = (s, t, a) => {
|
|
37
|
+
const i = s.newRow();
|
|
38
|
+
for (let e = 0; e < t.length; e++) {
|
|
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);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return i;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* 执行js语句
|
|
49
|
+
* @param jsMethod
|
|
50
|
+
* @param value
|
|
51
|
+
* @returns
|
|
52
|
+
*/
|
|
53
|
+
static execJsMethod = (s, t) => {
|
|
54
|
+
const a = m(s), i = new Function("value", a);
|
|
55
|
+
try {
|
|
56
|
+
const e = i(t);
|
|
57
|
+
n.isNil(e) || (t = e);
|
|
58
|
+
} catch (e) {
|
|
59
|
+
console.log(e.message);
|
|
60
|
+
}
|
|
61
|
+
return t;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export {
|
|
65
|
+
g as default
|
|
66
|
+
};
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Designer as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as g, ref as U, watch as S, createBlock as h, openBlock as L, unref as i } from "vue";
|
|
2
|
+
import { Designer as v } from "../../node_modules/stimulsoft-reports-js-vuejs/designer.js";
|
|
3
|
+
import z from "lodash";
|
|
4
|
+
import x from "./factory.js";
|
|
5
|
+
import { Stimulsoft as a } from "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.engine.js";
|
|
5
6
|
import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.viewer.js";
|
|
6
7
|
import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.designer.js";
|
|
7
8
|
import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.blockly.editor.js";
|
|
8
|
-
const
|
|
9
|
+
const N = /* @__PURE__ */ g({
|
|
9
10
|
__name: "desginer",
|
|
10
11
|
props: {
|
|
11
12
|
templateJson: {},
|
|
12
|
-
listData: {}
|
|
13
|
+
listData: {},
|
|
14
|
+
registerTable: { type: Function }
|
|
13
15
|
},
|
|
14
16
|
emits: ["saveReport"],
|
|
15
|
-
setup(p, { expose:
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
const m =
|
|
20
|
-
|
|
21
|
-
() => [
|
|
17
|
+
setup(p, { expose: c, emit: l }) {
|
|
18
|
+
a.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", a.Base.Localization.StiLocalization.addLocalizationFile("../localizations/zh.xml", !1, "中文"), a.Base.Localization.StiLocalization.cultureName = "中文";
|
|
19
|
+
const r = p, n = U(), s = new a.Designer.StiDesignerOptions();
|
|
20
|
+
s.appearance.fullScreenMode = !0;
|
|
21
|
+
const m = l;
|
|
22
|
+
S(
|
|
23
|
+
() => [r.templateJson, r.listData],
|
|
22
24
|
(e) => {
|
|
23
25
|
console.log(e);
|
|
24
26
|
const o = e[0], t = e[1];
|
|
@@ -32,23 +34,23 @@ const y = /* @__PURE__ */ u({
|
|
|
32
34
|
e.preventDefault = !0;
|
|
33
35
|
const o = e.report.saveToJsonString(), t = e.fileName;
|
|
34
36
|
m("saveReport", t, o);
|
|
35
|
-
}, d = async (e, o) => {
|
|
37
|
+
}, u = () => z.isNil(n.value) ? "" : "data:application/pdf;base64," + n.value.exportDocument(a.Report.StiExportFormat.Pdf).toString("base64"), d = async (e, o) => {
|
|
36
38
|
try {
|
|
37
|
-
const t = new
|
|
38
|
-
|
|
39
|
+
const t = new x();
|
|
40
|
+
n.value = t.setListData(o).loadJson(e).getReport();
|
|
39
41
|
} catch (t) {
|
|
40
42
|
console.log(t.message);
|
|
41
43
|
}
|
|
42
44
|
};
|
|
43
|
-
return
|
|
44
|
-
|
|
45
|
-
}), (e, o) => (L(), h(i(
|
|
46
|
-
report:
|
|
47
|
-
options: i(
|
|
45
|
+
return c({
|
|
46
|
+
getPdfBase64: u
|
|
47
|
+
}), (e, o) => (L(), h(i(v), {
|
|
48
|
+
report: n.value,
|
|
49
|
+
options: i(s),
|
|
48
50
|
onSaveReport: f
|
|
49
51
|
}, null, 8, ["report", "options"]));
|
|
50
52
|
}
|
|
51
53
|
});
|
|
52
54
|
export {
|
|
53
|
-
|
|
55
|
+
N as default
|
|
54
56
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import r from "lodash";
|
|
2
2
|
import "../../node_modules/stimulsoft-reports-js-vuejs/designer.js";
|
|
3
|
-
import
|
|
3
|
+
import o from "../dataUtils/stimulsoftData.js";
|
|
4
|
+
import { Stimulsoft as i } from "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.engine.js";
|
|
4
5
|
import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.viewer.js";
|
|
5
6
|
import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.designer.js";
|
|
6
7
|
import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.blockly.editor.js";
|
|
7
|
-
class
|
|
8
|
+
class f {
|
|
8
9
|
listData = void 0;
|
|
9
10
|
report;
|
|
10
11
|
constructor(t) {
|
|
11
|
-
r.isNil(t) || (this.listData = t), this.report = new
|
|
12
|
+
r.isNil(t) || (this.listData = t), this.report = new i.Report.StiReport();
|
|
12
13
|
}
|
|
13
|
-
initLicense = () => (
|
|
14
|
+
initLicense = () => (i.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", i.Base.Localization.StiLocalization.addLocalizationFile("../localizations/zh.xml", !1, "中文"), i.Base.Localization.StiLocalization.cultureName = "中文", this);
|
|
14
15
|
setListData = (t) => (this.listData = t, this);
|
|
15
16
|
/**
|
|
16
17
|
* 加载打印模版json
|
|
@@ -18,41 +19,10 @@ class u {
|
|
|
18
19
|
* @returns
|
|
19
20
|
*/
|
|
20
21
|
loadJson = (t) => (r.isEmpty(t) || this.report.load(t), this);
|
|
21
|
-
getReport = () => (this.report.dataSources.clear(), r.isNil(this.listData) || this.listData.length === 0 ? this.report : (
|
|
22
|
+
getReport = () => (this.report.dataSources.clear(), r.isNil(this.listData) || this.listData.length === 0 ? this.report : (o.createDataSet(this.report, this.listData), this.report));
|
|
22
23
|
print = () => (this.report.print(), this);
|
|
23
24
|
printToPdf = () => (this.report.printToPdf(), this);
|
|
24
|
-
getDataSet = (t) => {
|
|
25
|
-
const a = new s.System.Data.DataSet("网络打印");
|
|
26
|
-
for (let i = 0; i < t.length; i++) {
|
|
27
|
-
const e = t[i], o = new s.System.Data.DataTable(e.dataName);
|
|
28
|
-
this.listItem2DataTable(o, e), this.listData2DataTable(o, e), a.tables.add(o), this.report.regData(a.dataSetName, a.dataSetName, a);
|
|
29
|
-
}
|
|
30
|
-
this.report.dictionary.synchronize();
|
|
31
|
-
};
|
|
32
|
-
listItem2DataTable = (t, a) => {
|
|
33
|
-
for (let i = 0; i < a.listItem.length; i++) {
|
|
34
|
-
const e = a.listItem[i];
|
|
35
|
-
if (r.isEmpty(e.printVal))
|
|
36
|
-
continue;
|
|
37
|
-
const o = new s.System.Data.DataColumn(e.printVal);
|
|
38
|
-
t.columns.add(o);
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
listData2DataTable = (t, a) => {
|
|
42
|
-
for (let i = 0; i < a.listData.length; i++) {
|
|
43
|
-
const e = a.listData[i], o = this.getRow(t, a.listItem, e);
|
|
44
|
-
t.addRow(o);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
getRow = (t, a, i) => {
|
|
48
|
-
const e = t.newRow();
|
|
49
|
-
for (let o = 0; o < a.length; o++) {
|
|
50
|
-
const n = a[o];
|
|
51
|
-
r.isEmpty(n.printVal) || e.setValue(n.printVal, Reflect.get(i, n.itemCode));
|
|
52
|
-
}
|
|
53
|
-
return e;
|
|
54
|
-
};
|
|
55
25
|
}
|
|
56
26
|
export {
|
|
57
|
-
|
|
27
|
+
f as default
|
|
58
28
|
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Stimulsoft as r } from "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.engine.js";
|
|
2
|
+
import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.chart.js";
|
|
3
|
+
import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.export.js";
|
|
4
|
+
import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.import.xlsx.js";
|
|
5
|
+
import "../../node_modules/stimulsoft-reports-js-vuejs/stimulsoft.reports.maps.js";
|
|
6
|
+
import p from "../dataUtils/stimulsoftData.js";
|
|
7
|
+
import n from "lodash";
|
|
8
|
+
class z {
|
|
9
|
+
reports = [];
|
|
10
|
+
report;
|
|
11
|
+
printData;
|
|
12
|
+
/**
|
|
13
|
+
* json模版
|
|
14
|
+
* 打印数据
|
|
15
|
+
* @param jsonTemplate
|
|
16
|
+
* @param listData
|
|
17
|
+
*/
|
|
18
|
+
constructor(t) {
|
|
19
|
+
this.printData = t, this.report = new r.Report.StiReport();
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 初始化license
|
|
23
|
+
* @returns
|
|
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);
|
|
26
|
+
/**
|
|
27
|
+
* 初始化报销
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
30
|
+
initReport = () => {
|
|
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();
|
|
37
|
+
s.load(a), p.createDataSet(s, l), this.reports.push(s);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return this;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* 合并报表
|
|
45
|
+
* @returns
|
|
46
|
+
*/
|
|
47
|
+
mergeReport = async () => {
|
|
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) => {
|
|
51
|
+
this.report.renderedPages.add(e.clone());
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return this;
|
|
55
|
+
};
|
|
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;
|
|
59
|
+
}), this.setLicense(), this.initReport(), this.mergeReport(), this.report.print());
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
export {
|
|
63
|
+
z as default
|
|
64
|
+
};
|
package/package.json
CHANGED
package/types/components.d.ts
CHANGED
|
@@ -18,5 +18,6 @@ export {};
|
|
|
18
18
|
export * from "./components/core/core";
|
|
19
19
|
export * from "./stimulsoft/desginer/desginer";
|
|
20
20
|
export * from "./stimulsoft/desginer/factory";
|
|
21
|
+
export * from "./stimulsoft/printer/printer";
|
|
21
22
|
export * from "./message/message";
|
|
22
23
|
export * from "./layout/layout";
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { TWldy } from "@ningboyz/types";
|
|
2
2
|
import { YzComponentApp } from "../../components/core/core";
|
|
3
|
+
import { Stimulsoft } from "stimulsoft-reports-js-vuejs";
|
|
3
4
|
|
|
4
5
|
export declare const YzDesginer: YzComponentApp<YzDesginerProps, {}, YzDesginerSlots, YzDesginerMethod>;
|
|
5
6
|
|
|
6
7
|
export type YzDesginerProps = {
|
|
7
8
|
templateJson?: string;
|
|
8
9
|
listData?: TWldy.IWldyDataResponse[];
|
|
10
|
+
registerTable?: (report: Stimulsoft.Report.StiReport) => Promise<{
|
|
11
|
+
table: Stimulsoft.Report.Components.Table.StiTable;
|
|
12
|
+
index: number;
|
|
13
|
+
}>;
|
|
9
14
|
};
|
|
10
15
|
|
|
11
16
|
export type YzDesginerMethod = {
|
|
@@ -16,4 +21,6 @@ export interface YzDesginerSlots {
|
|
|
16
21
|
title?: () => any;
|
|
17
22
|
}
|
|
18
23
|
|
|
19
|
-
export type YzDesginerInstance = {
|
|
24
|
+
export type YzDesginerInstance = {
|
|
25
|
+
getPdfBase64: () => string;
|
|
26
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
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;
|
|
5
|
-
private report;
|
|
4
|
+
private listData: TWldy.IWldyDataResponse[];
|
|
5
|
+
private report: Stimulsoft.Report.StiReport;
|
|
6
6
|
constructor(listData?: TWldy.IWldyDataResponse[]);
|
|
7
7
|
initLicense: () => Factory;
|
|
8
8
|
setListData: (listData: TWldy.IWldyDataResponse[]) => Factory;
|
|
@@ -10,10 +10,6 @@ declare class Factory {
|
|
|
10
10
|
getReport: () => Stimulsoft.Report.StiReport;
|
|
11
11
|
print: () => Factory;
|
|
12
12
|
printToPdf: () => Factory;
|
|
13
|
-
private getDataSet;
|
|
14
|
-
private listItem2DataTable;
|
|
15
|
-
private listData2DataTable;
|
|
16
|
-
private getRow;
|
|
17
13
|
}
|
|
18
14
|
export default Factory;
|
|
19
15
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TWldy, TStim } from "@ningboyz/types";
|
|
2
|
+
import { Stimulsoft } from "stimulsoft-reports-js-vuejs/designer";
|
|
3
|
+
declare class Printer {
|
|
4
|
+
private printData: TStim.IStimulSoftData[];
|
|
5
|
+
private report: Stimulsoft.Report.StiReport;
|
|
6
|
+
constructor(printData: TStim.IStimulSoftData[]);
|
|
7
|
+
private setLicense: () => Printer;
|
|
8
|
+
private initReport: () => Printer;
|
|
9
|
+
private mergeReport: () => Printer;
|
|
10
|
+
public print: () => void;
|
|
11
|
+
}
|
|
12
|
+
export default Printer;
|
|
13
|
+
|
|
14
|
+
export const StimulsoftPrinter = Printer;
|