super-page-runtime 2.2.92 → 2.3.0-sit10
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/dist/es/components/runtime/utils/api/page-expose-util.js +25 -25
- package/dist/es/components/runtime/utils/events/event-util.js +109 -108
- package/dist/es/components/runtime/utils/events/print-label.js +53 -40
- package/dist/es/components/runtime/utils/events/standard-event.js +127 -115
- package/dist/es/components/runtime/utils/page-helper-util.d.ts +13 -2
- package/dist/es/components/runtime/utils/page-helper-util.js +169 -162
- package/dist/es/components/runtime/utils/page-init-util.js +10 -7
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +22 -22
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +16 -16
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +21 -21
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +18 -18
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +17 -17
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +53 -54
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +206 -175
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +111 -91
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +31 -10
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +46 -38
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +41 -25
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +21 -21
- package/dist/es/index.d.ts +2 -2
- package/dist/es/index.js +2 -1
- package/package.json +2 -2
|
@@ -3,84 +3,97 @@ import { hiprint as t, disAutoConnect as n } from "vue-plugin-hiprint";
|
|
|
3
3
|
import { generateCodeByRule as o } from "../barcode-util.js";
|
|
4
4
|
function a(n2, a2) {
|
|
5
5
|
e.post(window.$vueApp.config.globalProperties.baseAPI + "/dc/print-models/by-codes", [a2]).then((e2) => {
|
|
6
|
-
const a3 = JSON.parse(e2[0].template),
|
|
6
|
+
const a3 = JSON.parse(e2[0].template), i2 = [];
|
|
7
7
|
a3.panels.forEach((e3) => {
|
|
8
8
|
e3.printElements.forEach((e4) => {
|
|
9
|
-
"barcode" !== e4.options.textType && "qrcode" !== e4.options.textType ||
|
|
9
|
+
"barcode" !== e4.options.textType && "qrcode" !== e4.options.textType || i2.push(e4.options);
|
|
10
10
|
});
|
|
11
11
|
});
|
|
12
|
-
const
|
|
13
|
-
}, styleHandler: () => "" }, c = { leftOffset: -1, topOffset: -1 };
|
|
14
|
-
|
|
15
|
-
if (
|
|
16
|
-
const
|
|
17
|
-
t2
|
|
18
|
-
|
|
12
|
+
const l = new t.PrintTemplate({ template: a3 }), r = { callback: () => {
|
|
13
|
+
}, styleHandler: () => "" }, c = { leftOffset: -1, topOffset: -1 }, f = {};
|
|
14
|
+
a3.panels[0].printElements.forEach((e3) => {
|
|
15
|
+
if ("datetime" === e3.options.dataType && e3.options.field) {
|
|
16
|
+
const t2 = e3.options.field.substring(6);
|
|
17
|
+
f[t2] = e3.options.dateFormat;
|
|
18
|
+
}
|
|
19
|
+
}), n2.pageContext.pageType ? "list" === n2.pageContext.pageType ? function(e3, t2, n3, a4, s2, i3) {
|
|
20
|
+
const l2 = JSON.parse(JSON.stringify(e3.selections));
|
|
21
|
+
if (l2.forEach((e4) => {
|
|
22
|
+
Object.keys(t2).forEach((t3) => {
|
|
23
|
+
if (e4[t3] && "number" == typeof e4[t3] && !isNaN(e4[t3])) try {
|
|
24
|
+
e4[t3] = new Date(e4[t3]);
|
|
25
|
+
} catch (e5) {
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}), n3.length > 0) {
|
|
29
|
+
const e4 = [];
|
|
30
|
+
n3.forEach((t3) => {
|
|
31
|
+
e4.push(function(e5, t4) {
|
|
19
32
|
return new Promise((n4, a5) => {
|
|
20
|
-
const
|
|
21
|
-
|
|
33
|
+
const s3 = e5.field.split("."), i4 = [];
|
|
34
|
+
s3.length < 2 && n4([]);
|
|
22
35
|
try {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const a6 = { type:
|
|
26
|
-
a6.value = o(JSON.parse(e6.barcodeModelItems),
|
|
27
|
-
}), n4(
|
|
36
|
+
p(s3[1]).then((e6) => {
|
|
37
|
+
t4.forEach((t5, n5) => {
|
|
38
|
+
const a6 = { type: s3[0], name: s3[1], value: null, index: n5 };
|
|
39
|
+
a6.value = o(JSON.parse(e6.barcodeModelItems), t5), i4.push(a6);
|
|
40
|
+
}), n4(i4);
|
|
28
41
|
});
|
|
29
42
|
} catch (e6) {
|
|
30
43
|
n4([]);
|
|
31
44
|
}
|
|
32
45
|
});
|
|
33
|
-
}(
|
|
34
|
-
}), Promise.all(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const t3 =
|
|
38
|
-
n4[
|
|
46
|
+
}(t3, l2));
|
|
47
|
+
}), Promise.all(e4).then((e5) => {
|
|
48
|
+
e5.forEach((e6) => {
|
|
49
|
+
e6.forEach((e7) => {
|
|
50
|
+
const t3 = e7.index, n4 = l2[t3];
|
|
51
|
+
n4[e7.type] || (n4[e7.type] = {}), n4[e7.type][e7.name] = e7.value;
|
|
39
52
|
});
|
|
40
|
-
}),
|
|
53
|
+
}), a4.print(l2, s2, i3);
|
|
41
54
|
});
|
|
42
|
-
} else
|
|
43
|
-
}(n2,
|
|
55
|
+
} else a4.print(l2, s2, i3);
|
|
56
|
+
}(n2, f, i2, l, c, r) : "form" === n2.pageContext.pageType && s(n2, i2, l, c, r) : s(n2, i2, l, c, r);
|
|
44
57
|
});
|
|
45
58
|
}
|
|
46
|
-
function
|
|
59
|
+
function s(e2, t2, n2, a2, s2) {
|
|
47
60
|
if (t2.length > 0) {
|
|
48
|
-
const
|
|
61
|
+
const i2 = [];
|
|
49
62
|
t2.forEach((t3) => {
|
|
50
|
-
|
|
63
|
+
i2.push(function(e3, t4) {
|
|
51
64
|
return new Promise((n3, a3) => {
|
|
52
|
-
const
|
|
53
|
-
|
|
65
|
+
const s3 = t4.field.split("."), i3 = { type: null, name: null, value: null };
|
|
66
|
+
s3.length < 2 && n3(i3), i3.type = s3[0], i3.name = s3[1];
|
|
54
67
|
try {
|
|
55
|
-
|
|
68
|
+
p(i3.name).then((t5) => {
|
|
56
69
|
const a4 = JSON.parse(t5.barcodeModelItems);
|
|
57
|
-
|
|
70
|
+
i3.value = o(a4, e3.entity.data), n3(i3);
|
|
58
71
|
});
|
|
59
72
|
} catch (e4) {
|
|
60
|
-
n3(
|
|
73
|
+
n3(i3);
|
|
61
74
|
}
|
|
62
75
|
});
|
|
63
76
|
}(e2.pageContext, t3));
|
|
64
|
-
}), Promise.all(
|
|
77
|
+
}), Promise.all(i2).then((t3) => {
|
|
65
78
|
const o2 = {};
|
|
66
79
|
t3.forEach((e3) => {
|
|
67
80
|
e3.type && e3.name && e3.value && (o2[e3.type] || (o2[e3.type] = {}), o2[e3.type][e3.name] = e3.value);
|
|
68
81
|
});
|
|
69
|
-
const
|
|
70
|
-
Object.assign(
|
|
82
|
+
const p2 = { table: {} };
|
|
83
|
+
Object.assign(p2, e2.pageContext.entity, o2), p2.table = e2.pageContext.entity.data, n2.print(p2, a2, s2);
|
|
71
84
|
});
|
|
72
85
|
} else {
|
|
73
86
|
const t3 = { table: {} };
|
|
74
|
-
Object.assign(t3, e2.pageContext.entity), t3.table = e2.pageContext.entity.data, n2.print(t3, a2,
|
|
87
|
+
Object.assign(t3, e2.pageContext.entity), t3.table = e2.pageContext.entity.data, n2.print(t3, a2, s2);
|
|
75
88
|
}
|
|
76
89
|
}
|
|
77
|
-
function
|
|
90
|
+
function p(t2) {
|
|
78
91
|
const n2 = encodeURIComponent(t2);
|
|
79
92
|
return e.get(window.$vueApp.config.globalProperties.baseAPI + `/dc/setting-barcode-models/by-name?name=${n2}`);
|
|
80
93
|
}
|
|
81
94
|
n();
|
|
82
|
-
const
|
|
95
|
+
const i = { printLabel: a };
|
|
83
96
|
export {
|
|
84
|
-
|
|
97
|
+
i as default,
|
|
85
98
|
a as printLabel
|
|
86
99
|
};
|