super-page-runtime 2.3.11 → 2.3.12-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-gauge-util.js +3 -3
- 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 +232 -226
- package/dist/es/components/runtime/utils/events/validator-util.d.ts +2 -1
- package/dist/es/components/runtime/utils/events/validator-util.js +13 -10
- 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 +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +8 -8
- 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 +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +8 -8
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +10 -10
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +1 -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 +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +11 -11
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.d.ts +1 -0
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +104 -94
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +144 -144
- 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 +16 -17
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +5 -2
- 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 +43 -41
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +34 -35
- 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 +14 -15
- 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 +5 -5
- package/package.json +2 -2
- package/dist/es.zip +0 -0
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
import { defineComponent as e, ref as o, computed as
|
|
1
|
+
import { defineComponent as e, ref as o, computed as r, onMounted as n, watch as t, resolveComponent as i, createElementBlock as a, openBlock as u, normalizeClass as p, normalizeStyle as l, unref as s, withDirectives as c, createVNode as g, createBlock as f, createCommentVNode as m, vShow as d, withCtx as h, Fragment as v, renderList as y, h as C } from "vue";
|
|
2
2
|
import b from "../common/common-chart-header.vue.js";
|
|
3
3
|
import { getSizeConfig as x, getChartDatasFromPage as O, getValueFromVariable as S, caculateShowCondition as w, isPromise as E, setValueForVariableName as j, updateChartDatasourcesByComponent as $ } from "../../../../utils/page-helper-util.js";
|
|
4
4
|
import { getCustomFunc as F } from "../../../../utils/events/event-util.js";
|
|
5
5
|
import k from "./group-column.vue.js";
|
|
6
6
|
import I from "./normal-column.vue.js";
|
|
7
7
|
import N from "./table-pageination.vue.js";
|
|
8
|
-
import { getSummaryTitleColumn as R, getSummaryDataColumn as T, rowDataToColumn as H, getColumnToRowTableConfig as _, colDataToRow as z, computeFormula as A, getNewColumnConfig as D, summaryStatistics as J, replacePlaceholders as P, getIndexColumn as U, getHeaderCellStyleUtil as V, getRowStyleUtil as G, getCellStyleUtil as K,
|
|
9
|
-
import { deepCopy as
|
|
10
|
-
const
|
|
8
|
+
import { getSummaryTitleColumn as R, getSummaryDataColumn as T, rowDataToColumn as H, getColumnToRowTableConfig as _, colDataToRow as z, computeFormula as A, getNewColumnConfig as D, summaryStatistics as J, replacePlaceholders as P, getIndexColumn as U, getHeaderCellStyleUtil as V, getRowStyleUtil as G, getCellStyleUtil as K, mergeRowByProperty as L, formatColContent as q } from "./chart-table-util.js";
|
|
9
|
+
import { deepCopy as B } from "../../../../utils/common-util.js";
|
|
10
|
+
const M = e({ __name: "table-runtime", props: { configure: { type: Object, default: () => ({}) }, pageContext: { type: Object, default: () => ({}) } }, setup(e2, { expose: M2 }) {
|
|
11
11
|
var _a;
|
|
12
|
-
const
|
|
13
|
-
let
|
|
14
|
-
if (!
|
|
15
|
-
if (
|
|
12
|
+
const Q = e2, W = Q.configure.runtime ? Q.configure.runtime : {}, X = W.style, Y = W.class, Z = W.dataConfig, ee = W.headerInfo ? W.headerInfo : {}, oe = o(null), re = o(W.props.isEnableGroupHeader), ne = o([]), te = o([]), ie = o([]), ae = o({}), ue = o(false), pe = o({}), le = o({}), se = o({}), ce = [], ge = o({}), fe = o({}), me = o(null), de = r(() => re.value ? ie.value.filter((e3) => !e3.isLeaf || Te(ae[e3.columnUuid])) : te.value.filter((e3) => Te(e3))), he = o(0);
|
|
13
|
+
let ve = [];
|
|
14
|
+
if (!Q.configure.props.modelCustom) {
|
|
15
|
+
if (re.value) {
|
|
16
16
|
const e3 = [];
|
|
17
|
-
|
|
17
|
+
Q.configure.props.groupHeaders.forEach((o2) => {
|
|
18
18
|
o2.parentUuid || e3.push(o2);
|
|
19
|
-
}), e3.sort((e4, o2) => e4.displayOrder - o2.displayOrder),
|
|
20
|
-
if (
|
|
21
|
-
|
|
19
|
+
}), e3.sort((e4, o2) => e4.displayOrder - o2.displayOrder), ie.value = e3, function() {
|
|
20
|
+
if (Q.configure.props.base.showIndex) {
|
|
21
|
+
ie.value.unshift({ columnUuid: "$index", displayOrder: 0, isLeaf: true, prop: "$index", titleText: "序号", uuid: "$index" });
|
|
22
22
|
const e4 = U();
|
|
23
|
-
e4 && (
|
|
23
|
+
e4 && (ae.value.$index = e4);
|
|
24
24
|
}
|
|
25
25
|
}();
|
|
26
|
-
} else
|
|
27
|
-
(_a =
|
|
28
|
-
|
|
26
|
+
} else te.value = Q.configure.items;
|
|
27
|
+
(_a = Q.configure.items) == null ? void 0 : _a.forEach((e3) => {
|
|
28
|
+
ae.value[e3.uuid] = e3, Object.keys(e3.style).length > 0 && (ge.value[e3.props.base.prop] = { cellStyle: e3.style, titleStyle: e3.titleStyle }), e3.formula && "" !== e3.formula.trim() && (fe.value[e3.props.base.prop] = e3.formula);
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
let
|
|
33
|
-
function
|
|
31
|
+
ue.value = Q.configure.props.base.showSummary, (ue.value || Q.configure.props.highOrder.groupField && Q.configure.props.highOrder.groupField.length > 0) && (pe.value = R(Q.configure), ue.value && (le.value = T(Q.configure, "table")), Q.configure.props.highOrder.groupField && Q.configure.props.highOrder.groupField.length > 0 && (se.value = T(Q.configure, "group")));
|
|
32
|
+
let ye = 300, Ce = x(Q.pageContext, Q.configure);
|
|
33
|
+
function be(e3) {
|
|
34
34
|
e3 || (e3 = []), Array.isArray(e3) && (e3 = e3.length > 0 ? e3[0] : {}), e3 || (e3 = {}), e3.hasRender ? e3.hasRender = true : (!function(e4) {
|
|
35
35
|
var _a2;
|
|
36
|
-
|
|
37
|
-
if (
|
|
36
|
+
He(e4), "service" === Q.configure.props.dataOrigin.dataSource && e4.result ? ve = e4.result[Q.configure.props.dataOrigin.service.serviceDataField] : "variable" === Q.configure.props.dataOrigin.dataSource && (ve = S(Q.pageContext.entity, Q.configure.props.dataOrigin.variable));
|
|
37
|
+
if (ve) if (((_a2 = Q.configure.props) == null ? void 0 : _a2.dataOrigin.limitEnable) && Q.configure.props.dataOrigin.itemNumSource) {
|
|
38
38
|
let o2 = 10;
|
|
39
|
-
if ("fix" ===
|
|
40
|
-
else if ("variable" ===
|
|
41
|
-
o2 = Number(S(
|
|
42
|
-
const
|
|
43
|
-
t(() =>
|
|
44
|
-
|
|
39
|
+
if ("fix" === Q.configure.props.dataOrigin.itemNumSource) o2 = Q.configure.props.dataOrigin.itemNumFix;
|
|
40
|
+
else if ("variable" === Q.configure.props.dataOrigin.itemNumSource) {
|
|
41
|
+
o2 = Number(S(Q.pageContext.entity, Q.configure.props.dataOrigin.itemNumVariable));
|
|
42
|
+
const r2 = Q.configure.props.dataOrigin.itemNumVariable.match(/\${(.*?)}/), n2 = r2 ? r2[1].split(".") : [], i2 = JSON.parse(JSON.stringify(ve));
|
|
43
|
+
t(() => n2.reduce((e5, o3) => e5[o3], Q.pageContext.entity), (o3) => {
|
|
44
|
+
xe(o3, i2, e4);
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
|
|
48
|
-
} else
|
|
49
|
-
}(e3), e3.hasRender = true,
|
|
47
|
+
xe(o2, ve, e4);
|
|
48
|
+
} else Oe(ve, e4);
|
|
49
|
+
}(e3), e3.hasRender = true, Z && (Z.autoRefresh = false));
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function xe(e3, o2, r2) {
|
|
52
52
|
var _a2;
|
|
53
53
|
if (e3 && e3 < o2.length) {
|
|
54
|
-
let
|
|
55
|
-
if (((_a2 =
|
|
54
|
+
let n2 = [];
|
|
55
|
+
if (((_a2 = Q.configure.props.dataOrigin.limitCountColumns) == null ? void 0 : _a2.length) > 0) n2 = Q.configure.props.dataOrigin.limitCountColumns;
|
|
56
56
|
else {
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
te.value.filter((e4) => "number" === e4.props.base.dataType).forEach((e4) => {
|
|
58
|
+
n2.push(e4.props.base.prop);
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
-
if ((
|
|
62
|
-
const
|
|
63
|
-
let i2 =
|
|
64
|
-
"$index" === i2 && (i2 =
|
|
65
|
-
|
|
61
|
+
if ((n2 == null ? void 0 : n2.length) > 0) {
|
|
62
|
+
const r3 = o2.slice(e3 - 1, o2.length), t2 = {};
|
|
63
|
+
let i2 = te.value[0].props.base.prop;
|
|
64
|
+
"$index" === i2 && (i2 = te.value[1].props.base.prop), r3.forEach((e4) => {
|
|
65
|
+
n2.forEach((o3) => {
|
|
66
66
|
void 0 === t2[o3] && (t2[o3] = 0), t2[o3] = t2[o3] + e4[o3];
|
|
67
67
|
});
|
|
68
|
-
}), o2.length > e3 && (o2 = o2.slice(0, e3 - 1)), t2[i2] =
|
|
68
|
+
}), o2.length > e3 && (o2 = o2.slice(0, e3 - 1)), t2[i2] = Q.configure.props.dataOrigin.overItemAlias, o2.push(t2);
|
|
69
69
|
}
|
|
70
|
-
|
|
71
|
-
} else
|
|
72
|
-
}
|
|
73
|
-
function
|
|
74
|
-
var _a2, _b, _c, _d,
|
|
75
|
-
if (
|
|
76
|
-
if (e3 = H(e3,
|
|
77
|
-
const o3 = function(e4, o4,
|
|
78
|
-
const
|
|
79
|
-
if ((!i2 || 0 === i2.length) &&
|
|
70
|
+
Oe(o2, r2);
|
|
71
|
+
} else Oe(o2, r2);
|
|
72
|
+
}
|
|
73
|
+
function Oe(e3, o2) {
|
|
74
|
+
var _a2, _b, _c, _d, _e2, _f, _g;
|
|
75
|
+
if (Se("rowToColumn")) {
|
|
76
|
+
if (e3 = H(e3, Q.configure, te.value), !re.value) {
|
|
77
|
+
const o3 = function(e4, o4, r2) {
|
|
78
|
+
const n2 = Q.configure.props.dataOrigin.rowToColumn.titleColumns, t2 = Q.configure.props.dataOrigin.rowToColumn.dataColumns, i2 = e4.props.dataOrigin.groupField;
|
|
79
|
+
if ((!i2 || 0 === i2.length) && r2.length > 0) {
|
|
80
80
|
const e5 = [];
|
|
81
|
-
return e5.push(D("$GroupColumn",
|
|
81
|
+
return e5.push(D("$GroupColumn", Q.configure.props.dataOrigin.rowToColumn.firstColumnTitle, 0, "string")), Object.keys(r2[0]).forEach((o5, r3) => {
|
|
82
82
|
if ("$GroupColumn" === o5) return;
|
|
83
|
-
const
|
|
84
|
-
e5.push(
|
|
83
|
+
const n3 = D(o5, o5, r3 + 1, "string");
|
|
84
|
+
e5.push(n3);
|
|
85
85
|
}), e5;
|
|
86
86
|
}
|
|
87
87
|
{
|
|
88
|
-
const e5 = [...o4].filter((e6) => !
|
|
89
|
-
return
|
|
88
|
+
const e5 = [...o4].filter((e6) => !n2.includes(e6.props.base.prop) && !t2.includes(e6.props.base.prop)), i3 = new RegExp(`(${t2.join("|")})$`), a2 = /* @__PURE__ */ new Set();
|
|
89
|
+
return r2.forEach((e6) => {
|
|
90
90
|
Object.keys(e6).forEach((e7) => {
|
|
91
91
|
if (t2.some((o5) => e7.includes(o5))) {
|
|
92
92
|
const o5 = e7.split(i3)[0];
|
|
@@ -94,161 +94,161 @@ const B = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
96
|
}), a2.forEach((o5) => {
|
|
97
|
-
t2.forEach((
|
|
97
|
+
t2.forEach((n3) => {
|
|
98
98
|
var _a3;
|
|
99
|
-
const t3 = (_a3 =
|
|
99
|
+
const t3 = (_a3 = te.value.find((e6) => e6.props.base.prop === n3)) == null ? void 0 : _a3.props.base.name, i4 = D(`${o5}${n3}`, `${o5}${t3}`, e5.length + 1, "number" == typeof r2[0][`${o5}${n3}`] ? "number" : "string");
|
|
100
100
|
e5.push(i4);
|
|
101
101
|
});
|
|
102
102
|
}), e5;
|
|
103
103
|
}
|
|
104
|
-
}(
|
|
105
|
-
|
|
104
|
+
}(Q.configure, te.value, e3);
|
|
105
|
+
te.value = o3;
|
|
106
106
|
}
|
|
107
|
-
} else
|
|
108
|
-
if ((_b = (_a2 =
|
|
109
|
-
const o3 = F(
|
|
107
|
+
} else Se("columnToRow") && (re.value || (te.value = _(Q.configure)), e3 = z(e3, Q.configure));
|
|
108
|
+
if ((_b = (_a2 = Q.configure.props) == null ? void 0 : _a2.dataOrigin) == null ? void 0 : _b.dataFormatting) {
|
|
109
|
+
const o3 = F(Q.pageContext, Q.configure.props.dataOrigin.dataFormatting);
|
|
110
110
|
if (o3) {
|
|
111
|
-
const
|
|
112
|
-
|
|
111
|
+
const r2 = o3.apply(o3, [{ tableData: e3 }]);
|
|
112
|
+
r2 && (e3 = r2);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
if (Object.keys(
|
|
116
|
-
"frontend" ===
|
|
117
|
-
}(o2) : ne.value = e3, ((
|
|
118
|
-
const e4 =
|
|
115
|
+
if (Object.keys(fe.value).length > 0 && e3 && e3.length > 0 && A(fe.value, e3, Q.pageContext.entity), ((_c = Q.configure.pageination) == null ? void 0 : _c.enable) ? function(e4) {
|
|
116
|
+
"frontend" === Q.configure.pageination.type ? (he.value = ve.length, Ne(1, Q.configure.pageination.pageSize)) : "backend" === Q.configure.pageination.type && (ne.value = ve, Q.configure.pageination.totalFrom && (he.value = e4.result[Q.configure.pageination.totalFrom]));
|
|
117
|
+
}(o2) : ne.value = e3, ((_e2 = (_d = Q.configure.props) == null ? void 0 : _d.highOrder) == null ? void 0 : _e2.groupField) && ((_g = (_f = Q.configure.props) == null ? void 0 : _f.highOrder) == null ? void 0 : _g.groupField.length) > 0) {
|
|
118
|
+
const e4 = Q.configure.props.highOrder.groupField;
|
|
119
119
|
ne.value = function(e5, o3) {
|
|
120
120
|
var _a3, _b2;
|
|
121
|
-
if (0 ===
|
|
122
|
-
const
|
|
121
|
+
if (0 === se.value.length) return e5;
|
|
122
|
+
const r2 = [], n2 = (_a3 = Q.configure.items) == null ? void 0 : _a3.filter((e6) => o3.includes(e6.props.base.prop)), t2 = (_b2 = Q.configure.items) == null ? void 0 : _b2.filter((e6) => true === e6.props.base.groupSummary), i2 = {};
|
|
123
123
|
e5.forEach((e6) => {
|
|
124
|
-
const
|
|
125
|
-
i2[
|
|
124
|
+
const r3 = o3.map((o4) => e6[o4]).join("|");
|
|
125
|
+
i2[r3] || (i2[r3] = []), i2[r3].push(e6);
|
|
126
126
|
});
|
|
127
127
|
const a2 = Object.values(i2);
|
|
128
128
|
for (let e6 = 0; e6 < a2.length; e6++) {
|
|
129
129
|
const o4 = a2[e6], i3 = {};
|
|
130
130
|
t2 == null ? void 0 : t2.forEach((e7) => {
|
|
131
|
-
const
|
|
132
|
-
i3[
|
|
133
|
-
}),
|
|
134
|
-
const
|
|
135
|
-
i3[
|
|
136
|
-
}),
|
|
131
|
+
const r3 = e7.props.base.prop, n3 = J(se.value[r3], o4, r3, Q.pageContext);
|
|
132
|
+
i3[r3] = n3;
|
|
133
|
+
}), r2.push(...o4), n2 == null ? void 0 : n2.forEach((e7) => {
|
|
134
|
+
const r3 = e7.props.base.prop;
|
|
135
|
+
i3[r3] = P(e7.props.base.summaryTitle, o4[0]);
|
|
136
|
+
}), r2.push(i3), ce.push(r2.length - 1);
|
|
137
137
|
}
|
|
138
|
-
return
|
|
138
|
+
return r2;
|
|
139
139
|
}(ne.value, e4);
|
|
140
140
|
}
|
|
141
141
|
!function(e4) {
|
|
142
|
-
if (
|
|
142
|
+
if (Q.configure.props.base.showIndex && -1 === e4.findIndex((e5) => "$index" === e5.props.base.prop)) {
|
|
143
143
|
const o3 = U();
|
|
144
144
|
o3 && e4.unshift(o3);
|
|
145
145
|
}
|
|
146
|
-
}(
|
|
147
|
-
}
|
|
148
|
-
function Oe(e3) {
|
|
149
|
-
return M.configure.props.dataOrigin.transition === e3 && M.configure.props.dataOrigin[e3].titleColumns && M.configure.props.dataOrigin[e3].titleColumns.length > 0 && M.configure.props.dataOrigin[e3].dataColumns && M.configure.props.dataOrigin[e3].dataColumns.length > 0;
|
|
146
|
+
}(te.value);
|
|
150
147
|
}
|
|
151
148
|
function Se(e3) {
|
|
152
|
-
|
|
153
|
-
return V(e3, { cellTitleStyle: o2, titleStyle: n2 }, M);
|
|
149
|
+
return Q.configure.props.dataOrigin.transition === e3 && Q.configure.props.dataOrigin[e3].titleColumns && Q.configure.props.dataOrigin[e3].titleColumns.length > 0 && Q.configure.props.dataOrigin[e3].dataColumns && Q.configure.props.dataOrigin[e3].dataColumns.length > 0;
|
|
154
150
|
}
|
|
155
151
|
function we(e3) {
|
|
156
|
-
|
|
152
|
+
const o2 = ge.value[e3.column.property] ? ge.value[e3.column.property].titleStyle : null, r2 = X == null ? void 0 : X.titleStyle;
|
|
153
|
+
return V(e3, { cellTitleStyle: o2, titleStyle: r2 }, Q);
|
|
157
154
|
}
|
|
158
155
|
function Ee(e3) {
|
|
159
|
-
|
|
160
|
-
|
|
156
|
+
return G(e3, ce, Q);
|
|
157
|
+
}
|
|
158
|
+
function je(e3) {
|
|
159
|
+
const o2 = ge.value[e3.column.property] ? ge.value[e3.column.property].cellStyle : null;
|
|
160
|
+
return K(e3, o2, Q);
|
|
161
161
|
}
|
|
162
|
-
|
|
163
|
-
const e3 = O(
|
|
164
|
-
if (e3)
|
|
165
|
-
else if ("variable" ===
|
|
162
|
+
Ce && Ce.fixHeight && (ye = Ce.fixHeight), Ce && Ce.maxHeight && (ye = Ce.maxHeight), ye && (ye = Number(ye + "")), n(() => {
|
|
163
|
+
const e3 = O(Q.pageContext, Q.configure);
|
|
164
|
+
if (e3) be(e3);
|
|
165
|
+
else if ("variable" === Q.configure.props.dataOrigin.dataSource) {
|
|
166
166
|
!function() {
|
|
167
|
-
const e4 =
|
|
168
|
-
t(() => o3.reduce((e5, o4) => e5[o4],
|
|
169
|
-
e5 ?
|
|
167
|
+
const e4 = Q.configure.props.dataOrigin.variable.match(/\${(.*?)}/), o3 = e4 ? e4[1].split(".") : [];
|
|
168
|
+
t(() => o3.reduce((e5, o4) => e5[o4], Q.pageContext.entity), (e5) => {
|
|
169
|
+
e5 ? be(JSON.parse(JSON.stringify(e5))) : (ne.value = [], Q.configure.props.modelCustom ? He(null) : re.value ? ie.value = Q.configure.props.groupHeaders : te.value = Q.configure.items);
|
|
170
170
|
});
|
|
171
171
|
}();
|
|
172
|
-
const o2 = S(
|
|
173
|
-
o2 &&
|
|
172
|
+
const o2 = S(Q.pageContext.entity, Q.configure.props.dataOrigin.variable);
|
|
173
|
+
o2 && Oe(o2, e3);
|
|
174
174
|
}
|
|
175
175
|
});
|
|
176
|
-
const
|
|
177
|
-
const { columns: o2, data:
|
|
176
|
+
const $e = (e3) => {
|
|
177
|
+
const { columns: o2, data: r2 } = e3, n2 = [];
|
|
178
178
|
return o2.forEach((e4, o3) => {
|
|
179
|
-
if (
|
|
180
|
-
const t2 =
|
|
181
|
-
|
|
182
|
-
} else if (
|
|
183
|
-
const t2 =
|
|
184
|
-
|
|
179
|
+
if (pe.value[e4.property]) {
|
|
180
|
+
const t2 = pe.value[e4.property].label;
|
|
181
|
+
n2[o3] = C("div", {}, [P(t2, r2)]);
|
|
182
|
+
} else if (le.value[e4.property]) {
|
|
183
|
+
const t2 = r2.filter((e5, o4) => !ce.includes(o4));
|
|
184
|
+
n2[o3] = J(le.value[e4.property], t2, e4.property, Q.pageContext);
|
|
185
185
|
}
|
|
186
|
-
}),
|
|
186
|
+
}), n2;
|
|
187
187
|
};
|
|
188
|
-
function
|
|
189
|
-
const t2 = o2.property, i2 =
|
|
188
|
+
function Fe({ row: e3, column: o2, rowIndex: r2, columnIndex: n2 }) {
|
|
189
|
+
const t2 = o2.property, i2 = Q.configure.props.highOrder;
|
|
190
190
|
if (i2.scopeFunc) {
|
|
191
|
-
const t3 = F(
|
|
191
|
+
const t3 = F(Q.pageContext, i2.scopeFunc);
|
|
192
192
|
if (t3) {
|
|
193
|
-
const i3 = t3.apply(t3, [{ tableData: ne.value, row: e3, column: o2, rowIndex:
|
|
193
|
+
const i3 = t3.apply(t3, [{ tableData: ne.value, row: e3, column: o2, rowIndex: r2, columnIndex: n2 }]);
|
|
194
194
|
if (i3) return i3;
|
|
195
195
|
}
|
|
196
|
-
} else if (i2 && i2.mergeColumn, i2 && i2.mergeRow && i2.mergeRow.includes(t2)
|
|
197
|
-
}
|
|
198
|
-
function Fe(e3, o2) {
|
|
199
|
-
"frontend" === M.configure.pageination.type ? Ie(e3, o2) : Ne(e3, o2);
|
|
196
|
+
} else if (i2 && i2.mergeColumn, i2 && i2.mergeRow && i2.mergeRow.includes(t2)) return L(e3, o2, r2, t2, ne.value);
|
|
200
197
|
}
|
|
201
198
|
function ke(e3, o2) {
|
|
202
|
-
"frontend" ===
|
|
199
|
+
"frontend" === Q.configure.pageination.type ? Ne(e3, o2) : Re(e3, o2);
|
|
203
200
|
}
|
|
204
201
|
function Ie(e3, o2) {
|
|
205
|
-
|
|
202
|
+
"frontend" === Q.configure.pageination.type ? Ne(e3, o2) : Re(e3, o2);
|
|
206
203
|
}
|
|
207
204
|
function Ne(e3, o2) {
|
|
208
|
-
|
|
205
|
+
ve && (ne.value = ve.slice((e3 - 1) * o2, e3 * o2));
|
|
209
206
|
}
|
|
210
|
-
function Re(e3) {
|
|
211
|
-
|
|
212
|
-
return w(M.pageContext, o2);
|
|
207
|
+
function Re(e3, o2) {
|
|
208
|
+
Q.configure.pageination.currentPageSet && j(Q.pageContext.entity, Q.configure.pageination.currentPageSet, e3), Q.configure.pageination.pageSizeSet && j(Q.pageContext.entity, Q.configure.pageination.pageSizeSet, o2), $(Q.pageContext, Q.configure.uuid);
|
|
213
209
|
}
|
|
214
210
|
function Te(e3) {
|
|
215
|
-
|
|
216
|
-
|
|
211
|
+
const o2 = e3.showCondition;
|
|
212
|
+
return w(Q.pageContext, o2);
|
|
213
|
+
}
|
|
214
|
+
function He(e3) {
|
|
215
|
+
if (Q.configure.props.modelCustom) {
|
|
216
|
+
const o2 = F(Q.pageContext, Q.configure.props.modelCustom);
|
|
217
217
|
if (o2) {
|
|
218
|
-
const
|
|
219
|
-
E(
|
|
220
|
-
|
|
221
|
-
}) :
|
|
218
|
+
const r2 = o2.apply(o2, [{ pageContext: Q.pageContext, configureObj: Q.configure, value: e3 }]);
|
|
219
|
+
E(r2) ? r2.then((e4) => {
|
|
220
|
+
te.value = e4.columns;
|
|
221
|
+
}) : te.value = r2.columns;
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function _e(e3, o2, r2) {
|
|
226
226
|
e3.forEach((e4) => {
|
|
227
|
-
const
|
|
228
|
-
let i2 = { name:
|
|
229
|
-
e4.children && e4.children.length > 0 && (i2.children = [],
|
|
227
|
+
const n2 = e4.props.base.prop, t2 = e4.props.base.name;
|
|
228
|
+
let i2 = { name: n2, label: t2, i18nKey: t2 };
|
|
229
|
+
e4.children && e4.children.length > 0 && (i2.children = [], _e(e4.children, i2.children, r2)), e4.props.format && e4.props.format.type && r2.push(e4), o2.push(i2);
|
|
230
230
|
});
|
|
231
231
|
}
|
|
232
|
-
return
|
|
232
|
+
return M2({ updateChartDatas: be, exportChart: function() {
|
|
233
233
|
let e3 = [], o2 = [];
|
|
234
|
-
o2 =
|
|
235
|
-
let
|
|
236
|
-
|
|
234
|
+
o2 = re.value ? Q.configure.props.groupHeaders : de.value;
|
|
235
|
+
let r2 = [];
|
|
236
|
+
_e(o2, e3, r2);
|
|
237
237
|
return { isTable: true, dataArr: function(e4) {
|
|
238
238
|
let o3 = [];
|
|
239
|
-
ne.value && (o3 =
|
|
239
|
+
ne.value && (o3 = B(ne.value), o3.forEach((o4) => {
|
|
240
240
|
e4.forEach((e5) => {
|
|
241
|
-
const
|
|
242
|
-
o4[e5.props.base.prop] =
|
|
241
|
+
const r3 = q(o4, e5.props.format, e5, Q.pageContext, Q.configure);
|
|
242
|
+
o4[e5.props.base.prop] = r3;
|
|
243
243
|
});
|
|
244
244
|
}));
|
|
245
245
|
return o3;
|
|
246
|
-
}(
|
|
247
|
-
} }), (o2,
|
|
248
|
-
const
|
|
249
|
-
return u(), a("div", { style: l(s(
|
|
246
|
+
}(r2), columns: e3 };
|
|
247
|
+
} }), (o2, r2) => {
|
|
248
|
+
const n2 = i("el-table");
|
|
249
|
+
return u(), a("div", { style: l(s(X)), class: p([s(Y), "amb-widget-chart amb-widget-flex"]), ref: "thisRef" }, [c(g(b, { ref_key: "headerRef", ref: oe, headerInfo: s(ee), configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["headerInfo", "configure", "pageContext"]), [[d, s(ee).showHeader || e2.pageContext.showHomepageSearch]]), g(n2, { ref_key: "gridRef", ref: me, data: ne.value, style: { width: "100%" }, "max-height": s(ye), "header-cell-style": we, "row-style": Ee, "cell-style": je, "show-summary": ue.value, stripe: e2.configure.props.base.stripe, "summary-method": $e, "span-method": Fe }, { default: h(() => [re.value ? (u(true), a(v, { key: 0 }, y(ie.value, (o3, r3) => (u(), a(v, { key: r3 }, [o3.isLeaf ? (u(), f(I, { key: 1, configure: e2.configure, pageContext: e2.pageContext, column: ae.value[o3.columnUuid] }, null, 8, ["configure", "pageContext", "column"])) : (u(), f(k, { key: 0, configure: e2.configure, pageContext: e2.pageContext, groupColumn: o3, columnsConfigKeyValues: ae.value }, null, 8, ["configure", "pageContext", "groupColumn", "columnsConfigKeyValues"]))], 64))), 128)) : (u(true), a(v, { key: 1 }, y(de.value, (o3, r3) => (u(), f(I, { key: r3, column: o3, configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["column", "configure", "pageContext"]))), 128))]), _: 1 }, 8, ["data", "max-height", "show-summary", "stripe"]), e2.configure.pageination && e2.configure.pageination.enable ? (u(), f(N, { key: 0, configure: e2.configure, "table-data": ne.value, total: he.value, onPageChange: ke, onPageSizeChange: Ie }, null, 8, ["configure", "table-data", "total"])) : m("", true)], 6);
|
|
250
250
|
};
|
|
251
251
|
} });
|
|
252
252
|
export {
|
|
253
|
-
|
|
253
|
+
M as default
|
|
254
254
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, onMounted as l, resolveComponent as a, createBlock as o, openBlock as u, withCtx as p, createVNode as
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as l, resolveComponent as a, createBlock as o, openBlock as u, withCtx as p, createVNode as s, createTextVNode as r, toDisplayString as n } from "vue";
|
|
2
2
|
import { packageTemplateFiles as i } from "../../../utils/common-util.js";
|
|
3
3
|
import { ElMessage as m } from "element-plus";
|
|
4
4
|
const c = "${", d = "}", g = e({ __name: "export-form-report-dialog", props: { configure: { type: Object, required: true }, pageContext: { type: Object, required: true } }, emits: ["export", "close"], setup(e2, { emit: g2 }) {
|
|
@@ -7,7 +7,7 @@ const c = "${", d = "}", g = e({ __name: "export-form-report-dialog", props: { c
|
|
|
7
7
|
function N(e3) {
|
|
8
8
|
let t2, l2, a2 = e3;
|
|
9
9
|
const o2 = a2.indexOf(c), u2 = a2.indexOf(d);
|
|
10
|
-
return -1 !== o2 && -1 !== u2 ? (o2 > u2 ? a2 = a2.substring(0, u2) + a2.substring(u2 + 1) : (t2 = a2.substring(o2 + 2, u2), l2 = a2.substring(o2, u2 + 1), x.value.push(t2),
|
|
10
|
+
return -1 !== o2 && -1 !== u2 ? (o2 > u2 ? a2 = a2.substring(0, u2) + a2.substring(u2 + 1) : (t2 = a2.substring(o2 + 2, u2), l2 = a2.substring(o2, u2 + 1), x.value.push(t2), a2 = a2.replace(l2, "")), N(a2)) : x.value;
|
|
11
11
|
}
|
|
12
12
|
function O(e3) {
|
|
13
13
|
v("export", f.configure, e3);
|
|
@@ -17,18 +17,16 @@ const c = "${", d = "}", g = e({ __name: "export-form-report-dialog", props: { c
|
|
|
17
17
|
}
|
|
18
18
|
return l(() => {
|
|
19
19
|
y.templateFiles && y.templateFiles.length > 0 ? h.value = i(y.templateFiles, f.pageContext, f.configure) : y.templateUuid && y.templateName && h.value.push({ templateUuid: y.templateUuid, templateName: y.templateName }), h.value.forEach((e3) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}), e4;
|
|
27
|
-
}(e3.templateName));
|
|
20
|
+
var t2;
|
|
21
|
+
e3 && e3.templateName && (e3.templateName = (N(t2 = e3.templateName).forEach((e4) => {
|
|
22
|
+
const l2 = c + e4 + d;
|
|
23
|
+
let a2;
|
|
24
|
+
-1 !== t2.indexOf(l2) && Object.prototype.hasOwnProperty.call(w, e4) && (a2 = w[e4] ? w[e4] : "", t2 = t2.replace(l2, a2));
|
|
25
|
+
}), t2));
|
|
28
26
|
}), h.value && 0 !== h.value.length || (m({ message: "无符合条件可导出的模板!", type: "warning" }), v("close")), 1 === (h == null ? void 0 : h.value.length) ? (O(h.value[0]), v("close")) : b.value = true;
|
|
29
27
|
}), (e3, t2) => {
|
|
30
28
|
const l2 = a("el-table-column"), i2 = a("el-button"), m2 = a("el-table"), c2 = a("el-dialog");
|
|
31
|
-
return u(), o(c2, { modelValue: b.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => b.value = e4), "show-close": true, "append-to-body": true, title: e3.$t("superPageRuntimeMessage.selectTemplate"), onClose: _ }, { default: p(() => [
|
|
29
|
+
return u(), o(c2, { modelValue: b.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => b.value = e4), "show-close": true, "append-to-body": true, title: e3.$t("superPageRuntimeMessage.selectTemplate"), onClose: _ }, { default: p(() => [s(m2, { data: h.value, style: { width: "100%" } }, { default: p(() => [s(l2, { label: e3.$t("superPageRuntimeMessage.temlpate"), prop: "templateShowPath" }, { default: p((e4) => [r(n(e4.row.templateName), 1)]), _: 1 }, 8, ["label"]), s(l2, { label: e3.$t("superPageRuntimeMessage.operating"), width: "200", fixed: "right" }, { default: p((t3) => [s(i2, { type: "text", size: "small", onClick: (e4) => O(t3.row) }, { default: p(() => [r(n(e3.$t("superPageRuntimeMessage.export")), 1)]), _: 2 }, 1032, ["onClick"])]), _: 1 }, 8, ["label"])]), _: 1 }, 8, ["data"])]), _: 1 }, 8, ["modelValue", "title"]);
|
|
32
30
|
};
|
|
33
31
|
} });
|
|
34
32
|
export {
|
|
@@ -19,7 +19,6 @@ const p = e({ __name: "YxAffix", props: { offset: { type: Number, default: 0 },
|
|
|
19
19
|
B.value = l2 ?? 0, R(n2 || i2 || false, e3);
|
|
20
20
|
}
|
|
21
21
|
} catch (e3) {
|
|
22
|
-
console.error(e3);
|
|
23
22
|
}
|
|
24
23
|
}, R = (e3, t2) => {
|
|
25
24
|
var _a;
|
|
@@ -56,7 +55,6 @@ const p = e({ __name: "YxAffix", props: { offset: { type: Number, default: 0 },
|
|
|
56
55
|
})();
|
|
57
56
|
b.value = e3, T.value = e3[0], b.value.forEach((e4) => e4.addEventListener("scroll", z)), window.addEventListener("resize", L), S();
|
|
58
57
|
} catch (e3) {
|
|
59
|
-
console.error(e3);
|
|
60
58
|
}
|
|
61
59
|
});
|
|
62
60
|
}, 100);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, computed as t, ref as
|
|
1
|
+
import { defineComponent as e, computed as t, ref as a, onMounted as r, watch as l, resolveComponent as o, createBlock as u, openBlock as n, normalizeStyle as i, normalizeClass as s, unref as p, withCtx as c, createElementBlock as m, createCommentVNode as f, toDisplayString as g } from "vue";
|
|
2
2
|
import d from "qrcode";
|
|
3
3
|
import v from "jsbarcode";
|
|
4
4
|
import { getFormModelFields as y } from "../../../../utils/page-init-util.js";
|
|
@@ -12,7 +12,7 @@ const j = ["src"], D = e({ __name: "barcode-runtime", props: { pageContext: {},
|
|
|
12
12
|
let k = y(q.pageContext, q.configure);
|
|
13
13
|
const A = t({ get: () => x(N, k), set(e3) {
|
|
14
14
|
h(N, k, e3);
|
|
15
|
-
} }), E = q.configure.runtime ? q.configure.runtime : {}, _ =
|
|
15
|
+
} }), E = q.configure.runtime ? q.configure.runtime : {}, _ = a(E.props ? E.props : {}), O = E.style, P = E.class, S = E.headerStyle, $ = a(""), I = a(null), Q = a(_.value.brCodeFormat ?? "CODE128"), V = a([]);
|
|
16
16
|
function F(e3) {
|
|
17
17
|
return h(N, k, e3);
|
|
18
18
|
}
|
|
@@ -22,32 +22,31 @@ const j = ["src"], D = e({ __name: "barcode-runtime", props: { pageContext: {},
|
|
|
22
22
|
function L(e3) {
|
|
23
23
|
var t2;
|
|
24
24
|
"QR-code" === _.value.type ? (t2 = e3, d.toDataURL(t2, (e4, t3) => {
|
|
25
|
-
e4
|
|
25
|
+
e4 || ($.value = t3);
|
|
26
26
|
})) : function(e4) {
|
|
27
27
|
try {
|
|
28
28
|
v(I.value, e4, { format: Q.value });
|
|
29
29
|
} catch (e5) {
|
|
30
|
-
console.error("生成条形码时发生错误:", e5);
|
|
31
30
|
}
|
|
32
31
|
}(e3);
|
|
33
32
|
}
|
|
34
|
-
return
|
|
33
|
+
return r(() => {
|
|
35
34
|
_.value.generateRule && ("fixed" === _.value.generateRuleType ? (V.value = Array.from(_.value.generateRule.matchAll(/\$\{(\w+)\}/g), (e3) => e3[1]), V.value.forEach((e3) => {
|
|
36
|
-
|
|
35
|
+
l(() => q.pageContext.entity.data[e3], (e4, t2) => {
|
|
37
36
|
null != e4 && function() {
|
|
38
37
|
let e5 = true;
|
|
39
38
|
V.value.forEach((t3) => {
|
|
40
39
|
q.pageContext.entity.data[t3] || (e5 = false);
|
|
41
40
|
}), e5 && J(function(e6, t3) {
|
|
42
|
-
const
|
|
43
|
-
return e6.replace(
|
|
41
|
+
const a2 = /\$\{(\w+)\}/g;
|
|
42
|
+
return e6.replace(a2, (e7, a3) => t3.hasOwnProperty(a3) ? t3[a3] : e7);
|
|
44
43
|
}(_.value.generateRule, q.pageContext.entity.data));
|
|
45
44
|
}();
|
|
46
45
|
});
|
|
47
46
|
})) : w.get(window.$vueApp.config.globalProperties.baseAPI + "/dc/setting-barcode-models/by-code/" + _.value.generateRule).then((e3) => {
|
|
48
47
|
const t2 = JSON.parse(e3.barcodeModelItems);
|
|
49
48
|
t2.forEach((e4) => {
|
|
50
|
-
"-1" !== e4.propDbName && -1 !== e4.propDbName && (V.value.push(e4.propDbName),
|
|
49
|
+
"-1" !== e4.propDbName && -1 !== e4.propDbName && (V.value.push(e4.propDbName), l(() => q.pageContext.entity.data[e4.propDbName], (e5, a2) => {
|
|
51
50
|
if (null != e5) {
|
|
52
51
|
const e6 = b(t2, q.pageContext.entity.data);
|
|
53
52
|
e6 && J(e6);
|
|
@@ -55,13 +54,12 @@ const j = ["src"], D = e({ __name: "barcode-runtime", props: { pageContext: {},
|
|
|
55
54
|
}));
|
|
56
55
|
});
|
|
57
56
|
}).catch((e3) => {
|
|
58
|
-
console.error("获取条码规则失败:", e3);
|
|
59
57
|
})), A.value && L(A.value);
|
|
60
58
|
}), D2({ getValue: function() {
|
|
61
59
|
return x(N, k);
|
|
62
60
|
}, setValue: F }), (e3, t2) => {
|
|
63
|
-
const
|
|
64
|
-
return
|
|
61
|
+
const a2 = o("el-form-item");
|
|
62
|
+
return n(), u(a2, { required: !!_.value.required, class: s(p(P)), "label-width": _.value.labelWidth, style: i(p(O)) }, { label: c(() => [_.value.tittleShow ? (n(), m("div", { key: 0, style: i({ ...p(S) }) }, g(p(R)(_.value.title)), 5)) : f("", true)]), default: c(() => ["QR-code" === _.value.type ? (n(), m("img", { key: 0, src: $.value }, null, 8, j)) : (n(), m("canvas", { key: 1, ref_key: "barcode", ref: I }, null, 512))]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
65
63
|
};
|
|
66
64
|
} });
|
|
67
65
|
export {
|