super-page-runtime 2.3.6 → 2.3.7-sit1
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 +50 -50
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +76 -76
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +26 -24
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +59 -58
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +38 -37
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +28 -27
- package/dist/es/components/runtime/utils/charts/chart-util.d.ts +1 -0
- package/dist/es/components/runtime/utils/charts/chart-util.js +30 -23
- package/dist/es/components/runtime/utils/events/event-util.js +3 -3
- package/dist/es/components/runtime/utils/events/print-label.js +25 -26
- package/dist/es/components/runtime/utils/events/standard-event.js +18 -18
- package/dist/es/components/runtime/utils/events/validator-util.js +1 -1
- package/dist/es/components/runtime/utils/page-init-util.js +24 -25
- package/dist/es/components/runtime/utils/page-store.js +10 -10
- package/dist/es/components/runtime/utils/table-utils.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +4 -4
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +6 -10
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +6 -8
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +15 -15
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +7 -7
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +8 -8
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +7 -7
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +11 -12
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +7 -7
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +9 -11
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +0 -2
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +10 -12
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +19 -17
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +32 -29
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +4 -4
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +32 -32
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +45 -46
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +3 -5
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +0 -1
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +0 -1
- package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +0 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +11 -12
- package/dist/es/style.css +30 -0
- package/package.json +2 -2
- package/dist/es.zip +0 -0
|
@@ -1,54 +1,55 @@
|
|
|
1
1
|
import { getValueFromSource as e } from "../page-helper-util.js";
|
|
2
2
|
import { deepCopy as o } from "../common-util.js";
|
|
3
|
-
import {
|
|
4
|
-
function
|
|
5
|
-
if (!
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
import { setDefaultGrid as i, caculateFormulaValue as t, executeChartFormula as a } from "./chart-util.js";
|
|
4
|
+
function s(s2, r, l, u) {
|
|
5
|
+
if (!u || !u.result) return;
|
|
6
|
+
i(l);
|
|
7
|
+
const f = u && u.result ? u.result : {}, d = r.serviceDataField;
|
|
8
|
+
let n = null;
|
|
9
|
+
d ? n = f[d] : f && (n = Array.isArray(f) ? f : [f]), n || (n = []);
|
|
10
|
+
const c = r.items ? r.items : [], p = [], m = {}, x = [], v = t(c, n, x);
|
|
11
|
+
for (const e2 of c) {
|
|
11
12
|
const o2 = e2.props ? e2.props : {}, i2 = o2.yaxisSource, t2 = o2.yaxisField;
|
|
12
|
-
let
|
|
13
|
+
let a2 = null;
|
|
13
14
|
if (!t2 || i2 && "variable" != i2) if ("formula" == i2) {
|
|
14
15
|
let i3 = o2.formula ? o2.formula : "";
|
|
15
|
-
for (const e3 in
|
|
16
|
-
|
|
17
|
-
} else
|
|
18
|
-
else
|
|
19
|
-
|
|
16
|
+
for (const e3 in v) i3 = i3.replace(new RegExp(e3.replace("$", "\\$"), "g"), v[e3]);
|
|
17
|
+
a2 = { uuid: e2.uuid, type: "formula", formula: i3, data: [] };
|
|
18
|
+
} else a2 = { uuid: e2.uuid, type: "fixed", field: o2.yaxisFix, data: [] };
|
|
19
|
+
else a2 = { uuid: e2.uuid, type: "variable", field: t2, data: [] };
|
|
20
|
+
a2 && (p.push(a2), m[a2.uuid] = a2);
|
|
20
21
|
}
|
|
21
|
-
const
|
|
22
|
-
for (const o2 of
|
|
22
|
+
const y = r.props ? r.props : {}, h = y.nameField, F = y.maxSource, b = y.maxField, g = y.maxFixed, j = [], S = {};
|
|
23
|
+
for (const o2 of n) {
|
|
23
24
|
if (!o2) continue;
|
|
24
|
-
const i2 = e(o2,
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
for (const i3 of
|
|
28
|
-
const
|
|
29
|
-
let
|
|
30
|
-
void 0 ===
|
|
25
|
+
const i2 = e(o2, h, void 0);
|
|
26
|
+
let t2 = null;
|
|
27
|
+
t2 = F && "variable" != F ? g : e(o2, b, void 0), j.push({ text: i2, max: t2 });
|
|
28
|
+
for (const i3 of x) {
|
|
29
|
+
const t3 = e(o2, i3, void 0);
|
|
30
|
+
let a2 = S[i3];
|
|
31
|
+
void 0 === t3 || isNaN(t3) || (void 0 === a2 ? a2 = t3 : a2 += t3), S[i3] = a2;
|
|
31
32
|
}
|
|
32
|
-
for (const i3 of
|
|
33
|
-
const
|
|
34
|
-
if ("fixed" == i3.type)
|
|
33
|
+
for (const i3 of p) {
|
|
34
|
+
const t3 = i3.data;
|
|
35
|
+
if ("fixed" == i3.type) t3.push(i3.field);
|
|
35
36
|
else if ("variable" == i3.type) {
|
|
36
|
-
const
|
|
37
|
-
|
|
37
|
+
const a2 = e(o2, i3.field, void 0);
|
|
38
|
+
t3.push(a2);
|
|
38
39
|
} else if ("formula" == i3.type) {
|
|
39
|
-
const e2 =
|
|
40
|
-
|
|
41
|
-
} else
|
|
40
|
+
const e2 = a(i3.formula, S, o2, s2);
|
|
41
|
+
t3.push(e2);
|
|
42
|
+
} else t3.push(void 0);
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
for (const e2 of
|
|
47
|
-
const o2 =
|
|
45
|
+
l.radar[0].indicator = j;
|
|
46
|
+
const w = r.defaultSeries, A = o(w), D = A[0].data;
|
|
47
|
+
for (const e2 of D) {
|
|
48
|
+
const o2 = m[e2.uuid];
|
|
48
49
|
e2.value = o2.data;
|
|
49
50
|
}
|
|
50
|
-
|
|
51
|
+
l.series = A, r.cacheDatas = n, r.rawResult = u;
|
|
51
52
|
}
|
|
52
53
|
export {
|
|
53
|
-
|
|
54
|
+
s as updateChartOption
|
|
54
55
|
};
|
|
@@ -1,45 +1,46 @@
|
|
|
1
1
|
import { getValueFromSource as o } from "../page-helper-util.js";
|
|
2
2
|
import { deepCopy as s } from "../common-util.js";
|
|
3
|
-
import {
|
|
4
|
-
function
|
|
5
|
-
if (!
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
import { setDefaultGrid as i, caculateFormulaValue as e, executeChartFormula as r } from "./chart-util.js";
|
|
4
|
+
function t(t2, a, l, u) {
|
|
5
|
+
if (!u || !u.result) return;
|
|
6
|
+
i(l);
|
|
7
|
+
const f = u && u.result ? u.result : {}, c = a.serviceDataField;
|
|
8
|
+
let d = null;
|
|
9
|
+
c ? d = f[c] : f && (d = Array.isArray(f) ? f : [f]), d || (d = []);
|
|
10
|
+
const n = a.items ? a.items : [], p = [], m = {};
|
|
11
|
+
for (const o2 of n) {
|
|
12
|
+
const s2 = o2.props ? o2.props : {}, i2 = o2.props ? o2.style : {}, e2 = s2.xaxisField, r2 = s2.sizeField, t3 = { uuid: o2.uuid, xaxisField: e2, yaxisField: s2.yaxisField, yaxisSource: s2.yaxisSource, formula: s2.formula, sizeField: r2, symbolSize: i2.symbolSize, data: [] };
|
|
13
|
+
p.push(t3), m[t3.uuid] = t3;
|
|
13
14
|
}
|
|
14
|
-
const
|
|
15
|
-
for (const o2 of
|
|
15
|
+
const x = [], y = e(n, d, x);
|
|
16
|
+
for (const o2 of p) if ("formula" === o2.yaxisSource) {
|
|
16
17
|
let s2 = o2.formula ? o2.formula : "";
|
|
17
|
-
for (const o3 in
|
|
18
|
+
for (const o3 in y) s2 = s2.replace(new RegExp(o3.replace("$", "\\$"), "g"), y[o3]);
|
|
18
19
|
o2.formula = s2;
|
|
19
20
|
}
|
|
20
|
-
const
|
|
21
|
-
for (const s2 of
|
|
22
|
-
for (const i2 of
|
|
21
|
+
const F = {};
|
|
22
|
+
for (const s2 of d) if (s2) {
|
|
23
|
+
for (const i2 of x) {
|
|
23
24
|
const e2 = o(s2, i2, void 0);
|
|
24
|
-
let
|
|
25
|
-
void 0 === e2 || isNaN(e2) || (void 0 ===
|
|
25
|
+
let r2 = F[i2];
|
|
26
|
+
void 0 === e2 || isNaN(e2) || (void 0 === r2 ? r2 = e2 : r2 += e2), F[i2] = r2;
|
|
26
27
|
}
|
|
27
|
-
for (const i2 of
|
|
28
|
-
const
|
|
28
|
+
for (const i2 of p) {
|
|
29
|
+
const e2 = i2.data, a2 = [];
|
|
29
30
|
if (a2.push(o(s2, i2.xaxisField, void 0)), "formula" === i2.yaxisSource) {
|
|
30
|
-
const o2 =
|
|
31
|
+
const o2 = r(i2.formula, F, s2, t2);
|
|
31
32
|
a2.push(o2);
|
|
32
33
|
} else a2.push(o(s2, i2.yaxisField, void 0));
|
|
33
|
-
i2.sizeField ? a2.push(o(s2, i2.xaxisField, void 0)) : a2.push(i2.symbolSize),
|
|
34
|
+
i2.sizeField ? a2.push(o(s2, i2.xaxisField, void 0)) : a2.push(i2.symbolSize), e2.push(a2);
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
|
-
const
|
|
37
|
-
for (const o2 of
|
|
38
|
-
const s2 =
|
|
37
|
+
const h = a.defaultSeries, S = s(h);
|
|
38
|
+
for (const o2 of S) {
|
|
39
|
+
const s2 = m[o2.uuid];
|
|
39
40
|
o2.data = s2.data;
|
|
40
41
|
}
|
|
41
|
-
|
|
42
|
+
l.series = S, a.cacheDatas = d, a.rawResult = u;
|
|
42
43
|
}
|
|
43
44
|
export {
|
|
44
|
-
|
|
45
|
+
t as updateChartOption
|
|
45
46
|
};
|
|
@@ -110,3 +110,4 @@ export declare function exportCommonChart(chartRef: any): {
|
|
|
110
110
|
fileSize: string;
|
|
111
111
|
};
|
|
112
112
|
export declare function setHomeChartInitConfigValue(initConfig: any, tempContext: any, homeChartSettingUserId: any): void;
|
|
113
|
+
export declare function setDefaultGrid(chartOption: any): void;
|
|
@@ -2,7 +2,7 @@ import t from "../../../../assets/chart-themes/theme1.js";
|
|
|
2
2
|
import e from "../../../../assets/chart-themes/theme2.js";
|
|
3
3
|
import n from "../../../../assets/chart-themes/theme3.js";
|
|
4
4
|
import { getDefaultValue as i } from "../page-init-util.js";
|
|
5
|
-
import { getValueFromSource as s, setValueForVariableName as o, getParamNames as r, formatVariableValue as
|
|
5
|
+
import { getValueFromSource as s, setValueForVariableName as o, getParamNames as r, formatVariableValue as l, getValueFromVariable as a, setVariableValue as c } from "../page-helper-util.js";
|
|
6
6
|
import { appendDefaultMethods as f } from "../events/event-util.js";
|
|
7
7
|
var u = ((t2) => (t2.X_FIELD_NAME = "__x", t2.Y_TEMP_NAME = "__y", t2))(u || {});
|
|
8
8
|
const d = { theme1: t, theme2: e, theme3: n };
|
|
@@ -14,7 +14,7 @@ function h() {
|
|
|
14
14
|
}
|
|
15
15
|
function m(t2, e2, n2, i2, s2) {
|
|
16
16
|
return function(o2) {
|
|
17
|
-
let r2 = o2.value;
|
|
17
|
+
let r2 = o2 == null ? void 0 : o2.value;
|
|
18
18
|
if (s2 && (r2 = o2), null == r2 || null == r2) return r2;
|
|
19
19
|
if (Array.isArray(r2)) return r2;
|
|
20
20
|
if (isNaN(r2) || !t2 || !t2.indexOf) return r2;
|
|
@@ -22,10 +22,10 @@ function m(t2, e2, n2, i2, s2) {
|
|
|
22
22
|
let t3 = parseInt(e2);
|
|
23
23
|
(null == t3 || isNaN(t3)) && (t3 = 2), r2 = parseFloat(parseFloat(r2).toFixed(t3));
|
|
24
24
|
}
|
|
25
|
-
let a2 = "";
|
|
26
|
-
t2.indexOf("prefix") > -1 && n2 && (a2 = n2);
|
|
27
25
|
let l2 = "";
|
|
28
|
-
|
|
26
|
+
t2.indexOf("prefix") > -1 && n2 && (l2 = n2);
|
|
27
|
+
let a2 = "";
|
|
28
|
+
return t2.indexOf("append") > -1 && i2 && (a2 = i2), l2 + r2.toLocaleString() + a2;
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
function g(t2, e2) {
|
|
@@ -54,15 +54,15 @@ function x(t2, e2, n2) {
|
|
|
54
54
|
let o2 = e2.highlightInfos ? e2.highlightInfos : [], r2 = -1;
|
|
55
55
|
if (o2) {
|
|
56
56
|
const t3 = [];
|
|
57
|
-
for (let
|
|
58
|
-
const
|
|
57
|
+
for (let l2 = 0; l2 < o2.length; l2++) {
|
|
58
|
+
const a2 = o2[l2], c2 = a2.seriesIndex === s2.seriesIndex && a2.dataIndex === s2.dataIndex;
|
|
59
59
|
if (c2 || !i2.multiple) {
|
|
60
60
|
if (i2.selected) {
|
|
61
61
|
const t4 = "chart-pie" === e2.name ? "unselect" : "downplay";
|
|
62
|
-
n2.dispatchAction({ type: t4, seriesIndex:
|
|
62
|
+
n2.dispatchAction({ type: t4, seriesIndex: a2.seriesIndex, dataIndex: a2.dataIndex });
|
|
63
63
|
}
|
|
64
|
-
} else t3.push(
|
|
65
|
-
c2 && (r2 =
|
|
64
|
+
} else t3.push(a2);
|
|
65
|
+
c2 && (r2 = l2);
|
|
66
66
|
}
|
|
67
67
|
o2 = t3;
|
|
68
68
|
}
|
|
@@ -89,12 +89,12 @@ function b(t2, e2) {
|
|
|
89
89
|
if (!e2.clickSet) return;
|
|
90
90
|
const n2 = e2.clickSet, i2 = n2.variables;
|
|
91
91
|
if (!i2 || 0 == i2.length) return;
|
|
92
|
-
const r2 = e2.highlightInfos ? e2.highlightInfos : [],
|
|
93
|
-
for (const t3 of r2) c2.includes(t3.dataIndex) || (c2.push(t3.dataIndex), t3.dataIndex <
|
|
92
|
+
const r2 = e2.highlightInfos ? e2.highlightInfos : [], l2 = e2.cacheDatas ? e2.cacheDatas : [], a2 = [], c2 = [];
|
|
93
|
+
for (const t3 of r2) c2.includes(t3.dataIndex) || (c2.push(t3.dataIndex), t3.dataIndex < l2.length && a2.push(l2[t3.dataIndex]));
|
|
94
94
|
for (const e3 of i2) {
|
|
95
95
|
if (!e3.fieldName || !e3.variable) continue;
|
|
96
96
|
const i3 = [];
|
|
97
|
-
for (const t3 of
|
|
97
|
+
for (const t3 of a2) {
|
|
98
98
|
const n3 = s(t3, e3.fieldName, void 0);
|
|
99
99
|
null != n3 && i3.push(n3);
|
|
100
100
|
}
|
|
@@ -115,11 +115,11 @@ function v(t2, e2, n2) {
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
if (!r2) return;
|
|
118
|
-
const
|
|
118
|
+
const a2 = e2.props ? e2.props.orderSource : "";
|
|
119
119
|
let c2 = e2.props ? e2.props.orderFix : "";
|
|
120
|
-
if ("variable" ==
|
|
120
|
+
if ("variable" == a2) {
|
|
121
121
|
const n3 = e2.props ? e2.props.orderVariable : "";
|
|
122
|
-
c2 =
|
|
122
|
+
c2 = l(t2, n3);
|
|
123
123
|
}
|
|
124
124
|
c2 = "desc" == c2 || "DESC" == c2 ? "desc" : "asc", n2.sort((t3, e3) => {
|
|
125
125
|
const n3 = s(t3, r2, void 0), i3 = s(e3, r2, void 0);
|
|
@@ -130,14 +130,14 @@ function N(t2, e2, n2, i2, o2) {
|
|
|
130
130
|
if (!n2) return n2;
|
|
131
131
|
const r2 = e2.props ? e2.props : {};
|
|
132
132
|
if (!r2.limitQuantity) return n2;
|
|
133
|
-
let
|
|
134
|
-
if (r2.itemNumVariable ? (
|
|
135
|
-
if (n2.length <
|
|
133
|
+
let a2 = null;
|
|
134
|
+
if (r2.itemNumVariable ? (a2 = l(t2, r2.itemNumVariable), a2 = parseInt(a2)) : a2 = r2.itemNumFix ? r2.itemNumFix : 10, null == a2 || null == a2 || isNaN(a2)) return n2;
|
|
135
|
+
if (n2.length < a2) return n2;
|
|
136
136
|
const c2 = r2.overItemAlias, f2 = [], u2 = {};
|
|
137
137
|
i2 = i2 || [], o2 = o2 || [];
|
|
138
138
|
for (let t3 = 0; t3 < n2.length; t3++) {
|
|
139
139
|
const e3 = n2[t3];
|
|
140
|
-
if (t3 <
|
|
140
|
+
if (t3 < a2) f2.push(e3);
|
|
141
141
|
else {
|
|
142
142
|
if (!c2) break;
|
|
143
143
|
for (const t4 of i2) {
|
|
@@ -212,11 +212,11 @@ function k(t2, e2, n2, i2) {
|
|
|
212
212
|
const o2 = r(t2);
|
|
213
213
|
for (const e3 of o2) {
|
|
214
214
|
let o3 = null;
|
|
215
|
-
o3 = e3.startsWith("${row.") ? s(n2, e3.substring(6, e3.length - 1), null) :
|
|
215
|
+
o3 = e3.startsWith("${row.") ? s(n2, e3.substring(6, e3.length - 1), null) : a(i2.entity, e3), t2 = t2.replace(new RegExp(e3.replace("$", "\\$"), "g"), o3);
|
|
216
216
|
}
|
|
217
217
|
t2.includes("return ") || (t2 = "return " + t2);
|
|
218
|
-
const
|
|
219
|
-
return f(
|
|
218
|
+
const l2 = new Function("params", t2);
|
|
219
|
+
return f(l2, i2), l2({ pageContext: i2, row: n2 });
|
|
220
220
|
}
|
|
221
221
|
function M(t2) {
|
|
222
222
|
if (!t2 || !t2.$el) return;
|
|
@@ -245,6 +245,12 @@ function $(t2, e2, n2) {
|
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
|
+
function w(t2) {
|
|
249
|
+
if (t2 == null ? void 0 : t2.grid) {
|
|
250
|
+
const e2 = t2.grid, n2 = (t3) => !t3 || "0" === t3;
|
|
251
|
+
n2(e2.top) && n2(e2.right) && n2(e2.bottom) && n2(e2.left) && Object.assign(e2, { right: "10%", bottom: "60", left: "10%" });
|
|
252
|
+
}
|
|
253
|
+
}
|
|
248
254
|
export {
|
|
249
255
|
u as CommonName,
|
|
250
256
|
y as caculateFormulaValue,
|
|
@@ -261,6 +267,7 @@ export {
|
|
|
261
267
|
g as initChartOption,
|
|
262
268
|
N as limitDatas,
|
|
263
269
|
x as monitorChartClickToVariable,
|
|
270
|
+
w as setDefaultGrid,
|
|
264
271
|
$ as setHomeChartInitConfigValue,
|
|
265
272
|
v as sortDatas,
|
|
266
273
|
b as updateClickVariablesForSelected
|
|
@@ -146,10 +146,10 @@ function F(e2, t2, i2) {
|
|
|
146
146
|
r3 ? n(r3) ? r3.then((n2) => {
|
|
147
147
|
n2 ? A(e2, t2, c2, i2) : e2.canClick = true;
|
|
148
148
|
}).catch((n2) => {
|
|
149
|
-
|
|
149
|
+
e2.canClick = true;
|
|
150
150
|
}) : A(e2, t2, c2, i2) : e2.canClick = true;
|
|
151
151
|
}).catch((n2) => {
|
|
152
|
-
|
|
152
|
+
e2.canClick = true;
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
155
|
function T(e2, n2, t2, i2, o2) {
|
|
@@ -214,7 +214,7 @@ function A(e2, t2, i2, o2) {
|
|
|
214
214
|
n(a2) ? a2.then((n2) => {
|
|
215
215
|
n2 ? q(e3, t3, o3, c2, n2, u3) : e3.canClick = true;
|
|
216
216
|
}).catch((n2) => {
|
|
217
|
-
|
|
217
|
+
e3.canClick = true;
|
|
218
218
|
}) : q(e3, t3, o3, c2, a2, u3);
|
|
219
219
|
} else q(e3, t3, o3, false, null, u3);
|
|
220
220
|
}(e2, t2, i2, o2);
|
|
@@ -3,27 +3,26 @@ 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
|
|
12
|
+
const l = new t.PrintTemplate({ template: a3 }), r = { callback: () => {
|
|
13
13
|
}, styleHandler: () => "" }, c = { leftOffset: -1, topOffset: -1 }, f = {};
|
|
14
14
|
a3.panels[0].printElements.forEach((e3) => {
|
|
15
15
|
if ("datetime" === e3.options.dataType && e3.options.field) {
|
|
16
16
|
const t2 = e3.options.field.substring(6);
|
|
17
17
|
f[t2] = e3.options.dateFormat;
|
|
18
18
|
}
|
|
19
|
-
}), n2.pageContext.pageType ? "list" === n2.pageContext.pageType ? function(e3, t2, n3, a4, s2,
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
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
22
|
Object.keys(t2).forEach((t3) => {
|
|
23
23
|
if (e4[t3] && "number" == typeof e4[t3] && !isNaN(e4[t3])) try {
|
|
24
24
|
e4[t3] = new Date(e4[t3]);
|
|
25
25
|
} catch (e5) {
|
|
26
|
-
console.error(`日期格式化失败: ${e5}`);
|
|
27
26
|
}
|
|
28
27
|
});
|
|
29
28
|
}), n3.length > 0) {
|
|
@@ -31,51 +30,51 @@ function a(n2, a2) {
|
|
|
31
30
|
n3.forEach((t3) => {
|
|
32
31
|
e4.push(function(e5, t4) {
|
|
33
32
|
return new Promise((n4, a5) => {
|
|
34
|
-
const s3 = e5.field.split("."),
|
|
33
|
+
const s3 = e5.field.split("."), i4 = [];
|
|
35
34
|
s3.length < 2 && n4([]);
|
|
36
35
|
try {
|
|
37
36
|
p(s3[1]).then((e6) => {
|
|
38
37
|
t4.forEach((t5, n5) => {
|
|
39
38
|
const a6 = { type: s3[0], name: s3[1], value: null, index: n5 };
|
|
40
|
-
a6.value = o(JSON.parse(e6.barcodeModelItems), t5),
|
|
41
|
-
}), n4(
|
|
39
|
+
a6.value = o(JSON.parse(e6.barcodeModelItems), t5), i4.push(a6);
|
|
40
|
+
}), n4(i4);
|
|
42
41
|
});
|
|
43
42
|
} catch (e6) {
|
|
44
|
-
|
|
43
|
+
n4([]);
|
|
45
44
|
}
|
|
46
45
|
});
|
|
47
|
-
}(t3,
|
|
46
|
+
}(t3, l2));
|
|
48
47
|
}), Promise.all(e4).then((e5) => {
|
|
49
48
|
e5.forEach((e6) => {
|
|
50
49
|
e6.forEach((e7) => {
|
|
51
|
-
const t3 = e7.index, n4 =
|
|
50
|
+
const t3 = e7.index, n4 = l2[t3];
|
|
52
51
|
n4[e7.type] || (n4[e7.type] = {}), n4[e7.type][e7.name] = e7.value;
|
|
53
52
|
});
|
|
54
|
-
}), a4.print(
|
|
53
|
+
}), a4.print(l2, s2, i3);
|
|
55
54
|
});
|
|
56
|
-
} else a4.print(
|
|
57
|
-
}(n2, f,
|
|
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);
|
|
58
57
|
});
|
|
59
58
|
}
|
|
60
59
|
function s(e2, t2, n2, a2, s2) {
|
|
61
60
|
if (t2.length > 0) {
|
|
62
|
-
const
|
|
61
|
+
const i2 = [];
|
|
63
62
|
t2.forEach((t3) => {
|
|
64
|
-
|
|
63
|
+
i2.push(function(e3, t4) {
|
|
65
64
|
return new Promise((n3, a3) => {
|
|
66
|
-
const s3 = t4.field.split("."),
|
|
67
|
-
s3.length < 2 && n3(
|
|
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];
|
|
68
67
|
try {
|
|
69
|
-
p(
|
|
68
|
+
p(i3.name).then((t5) => {
|
|
70
69
|
const a4 = JSON.parse(t5.barcodeModelItems);
|
|
71
|
-
|
|
70
|
+
i3.value = o(a4, e3.entity.data), n3(i3);
|
|
72
71
|
});
|
|
73
72
|
} catch (e4) {
|
|
74
|
-
|
|
73
|
+
n3(i3);
|
|
75
74
|
}
|
|
76
75
|
});
|
|
77
76
|
}(e2.pageContext, t3));
|
|
78
|
-
}), Promise.all(
|
|
77
|
+
}), Promise.all(i2).then((t3) => {
|
|
79
78
|
const o2 = {};
|
|
80
79
|
t3.forEach((e3) => {
|
|
81
80
|
e3.type && e3.name && e3.value && (o2[e3.type] || (o2[e3.type] = {}), o2[e3.type][e3.name] = e3.value);
|
|
@@ -93,8 +92,8 @@ function p(t2) {
|
|
|
93
92
|
return e.get(window.$vueApp.config.globalProperties.baseAPI + `/dc/setting-barcode-models/by-name?name=${n2}`);
|
|
94
93
|
}
|
|
95
94
|
n();
|
|
96
|
-
const
|
|
95
|
+
const i = { printLabel: a };
|
|
97
96
|
export {
|
|
98
|
-
|
|
97
|
+
i as default,
|
|
99
98
|
a as printLabel
|
|
100
99
|
};
|
|
@@ -8,8 +8,8 @@ import C from "../eventBus.js";
|
|
|
8
8
|
import T from "axios";
|
|
9
9
|
import { handleEvent as y, getTableUuid as h, doAfterClickEvent as P } from "./event-util.js";
|
|
10
10
|
import { setStoreInfo as w } from "../store-util.js";
|
|
11
|
-
import { getPermissionCodes as k, getDefaultValue as R, getModelFields as
|
|
12
|
-
import { updateChartDatasources as
|
|
11
|
+
import { getPermissionCodes as k, getDefaultValue as R, getModelFields as N } from "../page-init-util.js";
|
|
12
|
+
import { updateChartDatasources as M, caculateShowCondition as v, getVariableValue as S, setVariableValue as I } from "../page-helper-util.js";
|
|
13
13
|
import x from "./print-label.js";
|
|
14
14
|
import { getTableNameByTableUuid as A } from "../table-utils.js";
|
|
15
15
|
import { getWorkflowRules as O, packageCustomRules as U } from "./validator-util.js";
|
|
@@ -226,8 +226,7 @@ const j = { save: function(e2) {
|
|
|
226
226
|
let t2 = null;
|
|
227
227
|
try {
|
|
228
228
|
if (t2 = e3.menuItem ? e3.menuItem.templateUuid : e3.configureObj.props.base.template[0].templateUuid, !t2) throw new Error("未找到模板");
|
|
229
|
-
} catch (
|
|
230
|
-
console.error("打印标签失败,未在配置中找到找到模板", t3, e3);
|
|
229
|
+
} catch (e4) {
|
|
231
230
|
}
|
|
232
231
|
x.printLabel(e3, t2);
|
|
233
232
|
}(e2);
|
|
@@ -280,7 +279,7 @@ function D(e2) {
|
|
|
280
279
|
let o2 = null;
|
|
281
280
|
n2 && n2.runtime && (o2 = n2.runtime.props);
|
|
282
281
|
const i2 = o2 ? o2.state : void 0;
|
|
283
|
-
o2 && (o2.state = "disabled"),
|
|
282
|
+
o2 && (o2.state = "disabled"), M(t2, s2, void 0, e2.isInitChart).then(() => {
|
|
284
283
|
o2 && (o2.state = i2);
|
|
285
284
|
}).catch(() => {
|
|
286
285
|
o2 && (o2.state = i2);
|
|
@@ -380,10 +379,11 @@ function q(t2, s2, n2, o2, i2) {
|
|
|
380
379
|
let i3 = s3.props.base.successOperation;
|
|
381
380
|
const a3 = s3.props.base.isNeedValueMapping, r2 = h(t3, s3);
|
|
382
381
|
i3 || z.includes(s3.name) || (i3 = "refresh");
|
|
383
|
-
if ("refresh" === i3)
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
382
|
+
if ("refresh" === i3) {
|
|
383
|
+
if (r2) {
|
|
384
|
+
b(t3, r2).refresh();
|
|
385
|
+
}
|
|
386
|
+
} else if ("closeWindow" === i3 || "closeWindowAndRefresh" === i3) {
|
|
387
387
|
const o4 = e(t3.entity.page);
|
|
388
388
|
let i4 = n3;
|
|
389
389
|
i4 || (i4 = {}), Object.assign(o4, i4), J(t3, s3, o4, a3);
|
|
@@ -437,7 +437,7 @@ function Y(e2, t2, s2, n2, o2) {
|
|
|
437
437
|
Array.isArray(e3) && e3.length > 0 && (n3 = e3[0]), t3.forEach((e4) => {
|
|
438
438
|
const t4 = e4.source;
|
|
439
439
|
if (!t4) return;
|
|
440
|
-
const o3 = t4.split("."), i3 = S(n3, o3), a2 = e4.target, r2 =
|
|
440
|
+
const o3 = t4.split("."), i3 = S(n3, o3), a2 = e4.target, r2 = N(null, a2);
|
|
441
441
|
I(s3.entity, r2, i3);
|
|
442
442
|
});
|
|
443
443
|
}
|
|
@@ -455,7 +455,7 @@ function K(e2, t2, s2, n2) {
|
|
|
455
455
|
const s3 = h(e2, t2);
|
|
456
456
|
if (s3) {
|
|
457
457
|
b(e2, s3).refresh();
|
|
458
|
-
}
|
|
458
|
+
}
|
|
459
459
|
} else if (i2 && "form" === i2) {
|
|
460
460
|
const t3 = e2.entity.data;
|
|
461
461
|
fe(e2, t3.ID ? t3.ID : t3.id);
|
|
@@ -516,10 +516,10 @@ function X(e2, s2) {
|
|
|
516
516
|
null != w2 && f2.append("isWorkflowEntity", w2 + "");
|
|
517
517
|
const R2 = k(a2, i2);
|
|
518
518
|
R2 && f2.append("functionCode", R2);
|
|
519
|
-
const
|
|
520
|
-
f2.append("additionalParamMapStr", JSON.stringify(
|
|
521
|
-
const
|
|
522
|
-
f2.append("isPermission",
|
|
519
|
+
const N2 = ie(i2);
|
|
520
|
+
f2.append("additionalParamMapStr", JSON.stringify(N2));
|
|
521
|
+
const M2 = void 0 === p2.isPermission || "true" === p2.isPermission || p2.isPermission;
|
|
522
|
+
f2.append("isPermission", M2 + "");
|
|
523
523
|
const v2 = i2.systemCode;
|
|
524
524
|
v2 && f2.append("systemCode", v2);
|
|
525
525
|
const S2 = i2.backendUrl;
|
|
@@ -556,7 +556,7 @@ function ee(e2) {
|
|
|
556
556
|
const p2 = (_a = n2.props.base) == null ? void 0 : _a.logSetting;
|
|
557
557
|
p2 && (c2.logSettingText = p2.join("")), c2.systemCode || (c2.systemCode = i2);
|
|
558
558
|
const d2 = ie(t2);
|
|
559
|
-
c2.additionalParamMap = d2, d2.ids && d2.ids.length > 0 && ("string" == typeof d2.ids ? c2.ids = d2.ids.split(",") : Array.isArray(d2.ids) ? c2.ids = d2.ids : "number" == typeof ids
|
|
559
|
+
c2.additionalParamMap = d2, d2.ids && d2.ids.length > 0 && ("string" == typeof d2.ids ? c2.ids = d2.ids.split(",") : Array.isArray(d2.ids) ? c2.ids = d2.ids : "number" == typeof ids && (c2.ids = [d2.ids]));
|
|
560
560
|
const m2 = n2.props.base.successOperation;
|
|
561
561
|
return m2 && "noOperation" === m2 && (c2.unControlVersion = true), c2.isWorkflowEntity = true, c2;
|
|
562
562
|
}
|
|
@@ -809,7 +809,7 @@ function ge(e2, s2, o2) {
|
|
|
809
809
|
let d2 = t2 || null, f2 = t2 ? [t2] : null;
|
|
810
810
|
void 0 === s3 || s3 ? (d2 || (d2 = p2 && p2.id ? p2.id : null), f2 || (f2 = p2 ? p2.ids : null)) : (d2 = null, f2 = null, p2._id = p2.id, p2.id = null);
|
|
811
811
|
const g2 = p2 ? p2.taskId : null, b2 = u2, C2 = { pageCode: u2, pageVersion: l2, tableName: e3.tableName, formNoRuleCode: e3.formNoRuleCode, isWorkflowEntity: true, systemCode: a2, functionCode: b2 + ".workflowGets", listCodesMap: e3.listCodesMap };
|
|
812
|
-
if (
|
|
812
|
+
if ((!e3.listCodesMap || 0 === Object.keys(e3.listCodesMap).length) && e3.tableUuids) {
|
|
813
813
|
const t3 = {};
|
|
814
814
|
e3.tableUuids.forEach((e4) => {
|
|
815
815
|
const s4 = r(u2, l2, e4);
|
|
@@ -862,7 +862,7 @@ function ge(e2, s2, o2) {
|
|
|
862
862
|
let d2 = t2 || null, f2 = t2 ? [t2] : null;
|
|
863
863
|
void 0 === s3 || s3 ? (d2 || (d2 = p2 && p2.id ? p2.id : null), f2 || (f2 = p2 ? p2.ids : null)) : (d2 = null, f2 = null, p2._id = p2.id, p2.id = null);
|
|
864
864
|
const g2 = p2 ? p2.taskId : null, b2 = u2, C2 = n(e3.backendUrl, e3.isTest), T2 = { pageCode: u2, pageVersion: l2, tableName: e3.tableName, formNoRuleCode: e3.formNoRuleCode, id: d2, systemCode: a2, functionCode: b2 + ".gets", listCodesMap: e3.listCodesMap };
|
|
865
|
-
if (!T2.id && p2 && p2._t_ && m(p2._t_ + "_id") && (T2.id = m(p2._t_ + "_id")), f2 && (T2.ids = be(f2)), e3.notIdInitializationList && (T2.noIdAndTaskIdInitSetting = JSON.stringify(e3.notIdInitializationList)), p2 && (T2.additionalParamMap = p2), e3.beanName && (T2.beanName = e3.beanName), g2 && (T2.taskId = g2),
|
|
865
|
+
if (!T2.id && p2 && p2._t_ && m(p2._t_ + "_id") && (T2.id = m(p2._t_ + "_id")), f2 && (T2.ids = be(f2)), e3.notIdInitializationList && (T2.noIdAndTaskIdInitSetting = JSON.stringify(e3.notIdInitializationList)), p2 && (T2.additionalParamMap = p2), e3.beanName && (T2.beanName = e3.beanName), g2 && (T2.taskId = g2), (!e3.listCodesMap || 0 === Object.keys(e3.listCodesMap).length) && e3.tableUuids) {
|
|
866
866
|
const t3 = {};
|
|
867
867
|
e3.tableUuids.forEach((e4) => {
|
|
868
868
|
const s4 = r(u2, l2, e4);
|
|
@@ -136,7 +136,7 @@ function b(e2, t2, n2) {
|
|
|
136
136
|
}), r3.includes(false) && e6(false), s2.length > 0 ? Promise.all(s2).then((t4) => {
|
|
137
137
|
t4.includes(false) ? e6(false) : e6(true);
|
|
138
138
|
}).catch((t4) => {
|
|
139
|
-
|
|
139
|
+
e6(false);
|
|
140
140
|
}) : e6(true);
|
|
141
141
|
});
|
|
142
142
|
return null;
|