@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
|
|
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
|
|
4
|
-
const s = [
|
|
5
|
-
s.forEach((
|
|
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
|
-
|
|
9
|
+
c as StimulsoftFactory,
|
|
10
|
+
r as YzDesginer,
|
|
9
11
|
e as YzLayout,
|
|
10
|
-
|
|
11
|
-
|
|
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
|
|
3
|
-
import { YzDesginer as
|
|
4
|
-
import { YzMessage as
|
|
5
|
-
import { YzLayout as
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
s as StimulsoftFactory,
|
|
8
|
+
a as YzDesginer,
|
|
9
|
+
i as YzLayout,
|
|
10
|
+
p as YzMessage,
|
|
10
11
|
o as default,
|
|
11
|
-
|
|
12
|
+
e as install
|
|
12
13
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import s from "lodash";
|
|
2
2
|
import "../../node_modules/stimulsoft-reports-js-vuejs/designer.js";
|
|
3
|
-
import { Stimulsoft as
|
|
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
|
-
|
|
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) => (
|
|
20
|
-
getReport = () => (this.report.dataSources.clear(),
|
|
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
|
|
28
|
+
const a = new o.System.Data.DataSet("网络打印");
|
|
23
29
|
for (let e = 0; e < t.length; e++) {
|
|
24
|
-
const i = t[e],
|
|
25
|
-
this.listItem2DataTable(
|
|
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 (
|
|
38
|
+
if (s.isEmpty(i.printVal))
|
|
33
39
|
continue;
|
|
34
|
-
const
|
|
35
|
-
t.columns.add(
|
|
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],
|
|
41
|
-
t.addRow(
|
|
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
|
|
47
|
-
const l = a[
|
|
48
|
-
|
|
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
|
|
2
|
-
|
|
3
|
-
|
|
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
|
|
6
|
+
const c = o, i = m;
|
|
6
7
|
export {
|
|
7
|
-
|
|
8
|
+
i as StimulsoftFactory,
|
|
9
|
+
c as YzDesginer
|
|
8
10
|
};
|
package/package.json
CHANGED
|
@@ -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[]) =>
|
|
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;
|