super-page-runtime 2.3.11 → 2.3.12-rc2
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/charts/chart-gauge-util.js +3 -3
- package/dist/es/components/runtime/utils/events/standard-event.js +223 -217
- package/dist/es/components/runtime/utils/events/validator-util.d.ts +2 -1
- package/dist/es/components/runtime/utils/events/validator-util.js +12 -9
- 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/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 +15 -0
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +144 -144
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +10 -7
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +7 -4
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +43 -41
- 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,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as e, ref as t, onMounted as n, watch as o, onUnmounted as i, resolveComponent as a, createElementBlock as l, openBlock as r, unref as u, createVNode as s } from "vue";
|
|
2
|
-
import { setTableEvents as c, canExecuteButton as p, doAfterClickEvent as d, doBeforeClickEvent as f, gridSelectRecord as g, gridSelectAllRecords as m, gridSelectionChange as v, cellClick as h, cellDblClick as b, rowClick as
|
|
2
|
+
import { setTableEvents as c, canExecuteButton as p, doAfterClickEvent as d, doBeforeClickEvent as f, gridSelectRecord as g, gridSelectAllRecords as m, gridSelectionChange as v, cellClick as h, cellDblClick as b, rowClick as S, rowDblClick as w, headerClick as C, getEventNameByType as y, getEventFuncByType as x, getHandleEvent as D } from "../../../../utils/events/event-util.js";
|
|
3
3
|
import { getBaseUrl as E, getListCode as T, getRealRestApiPath as O, isWorkflowPage as R, isVariableInvalidValue as k } from "../../../../utils/common-util.js";
|
|
4
4
|
import { getAdditionalParamMap as I, getSaveFormRequestWithRow as V, standardEvents as j } from "../../../../utils/events/standard-event.js";
|
|
5
5
|
import { isPromise as N } from "agilebuilder-ui/src/utils/common-util";
|
|
@@ -22,7 +22,7 @@ const z = ["id"], W = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
22
22
|
const e3 = Y.systemCode, t2 = Y.code;
|
|
23
23
|
let n2 = J.props && J.props.dataOrigin && "[]" !== J.props.dataOrigin.sqlFilterCondition ? J.props.dataOrigin.sqlFilterCondition : null;
|
|
24
24
|
null == n2 && (n2 = []);
|
|
25
|
-
const o2 = { isSql: true, optionTableHeight: 0, rowKeyProp: J.props.dataOrigin.principalLinkage, extraParam: { beanName: Y.beanName, functionCode: t2 + ".listData", tableName: ne, systemCode: e3, pageCode: Y.code, pageVersion: Y.version }, initSearchForm: n2, lineEditOptions: { aftersaveIsCreateRow: false, autoSave: false, enter:
|
|
25
|
+
const o2 = { isSql: true, optionTableHeight: 0, rowKeyProp: J.props.dataOrigin.principalLinkage, extraParam: { beanName: Y.beanName, functionCode: t2 + ".listData", tableName: ne, systemCode: e3, pageCode: Y.code, pageVersion: Y.version }, initSearchForm: n2, lineEditOptions: { aftersaveIsCreateRow: false, autoSave: false, enter: we, esc: Ee }, indexContinuous: !(!J.props || !J.props.otherSettings) && J.props.otherSettings.serialNumberContinuous, initSearch: !J.props || false !== J.props.dataOrigin.initializationQuery, resizeHeight: je, pageCode: Y.code, pageVersion: Y.version, additionalParamMap: I(Y), showOverflowTooltip: !(!J.props || !J.props.otherSettings || void 0 !== J.props.otherSettings.isBreakLine && false !== J.props.otherSettings.isBreakLine), isEnableEnterEvent: J.props && J.props.otherSettings && J.props.otherSettings.isEnableEnterEvent, isWithDataPermission: !!(J.props && J.props.otherSettings && J.props.otherSettings.isWithDataPermission) && J.props.otherSettings.isWithDataPermission, pageDevMode: false, isWorkflowEntity: R(Y), tableClass: Z, tableStyle: X, pageContext: Y, configureObj: J, backendUrl: oe, cellStyleRender: qe, rowStyleRender: We, titleStyleRender: Qe, validateEitConditions: Xe };
|
|
26
26
|
return function(e4) {
|
|
27
27
|
var _a;
|
|
28
28
|
((_a = J.props.highOrder) == null ? void 0 : _a.mergeFields) && J.props.highOrder.mergeFields.length > 0 && (e4.mergeFields = J.props.highOrder.mergeFields.join(","));
|
|
@@ -59,7 +59,7 @@ const z = ["id"], W = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
59
59
|
e3 && (e3 = O(e3, ee, te, Y.isTest));
|
|
60
60
|
return e3;
|
|
61
61
|
}(), ce = T(Y.code, Y.version, J.uuid), pe = Y.code + "_" + ce, de = t([]), fe = Y.entity.page, ge = t({ data: [] }), me = Y.superGridItems, ve = me ? me[J.uuid] : null, he = t(false), be = q;
|
|
62
|
-
function
|
|
62
|
+
function Se() {
|
|
63
63
|
J.props.linkages && J.props.linkages.length > 0 && (J.props.linkages.forEach((e3) => {
|
|
64
64
|
const t2 = M(e3.fieldName);
|
|
65
65
|
t2 && t2.length > 1 && ae.push(t2[1]);
|
|
@@ -83,7 +83,7 @@ const z = ["id"], W = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
83
83
|
}
|
|
84
84
|
}());
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function we({ rowIndex: e3, column: t2, row: n2, orgRow: o2 }) {
|
|
87
87
|
Ce(null, null, n2, t2, e3);
|
|
88
88
|
}
|
|
89
89
|
function Ce(e3, t2, n2, o2, i2) {
|
|
@@ -244,10 +244,10 @@ const z = ["id"], W = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
244
244
|
b(Y, J, { row: e3, column: t2, cell: n2, event: o2 });
|
|
245
245
|
}
|
|
246
246
|
function $e(e3, t2, n2) {
|
|
247
|
-
|
|
247
|
+
S(Y, J, { row: e3, column: t2, event: n2 });
|
|
248
248
|
}
|
|
249
249
|
function _e(e3, t2, n2) {
|
|
250
|
-
|
|
250
|
+
w(Y, J, { row: e3, column: t2, event: n2 });
|
|
251
251
|
}
|
|
252
252
|
function Ae(e3, t2) {
|
|
253
253
|
C(Y, J, { column: e3, event: t2 });
|
|
@@ -365,9 +365,12 @@ const z = ["id"], W = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
365
365
|
}, getTableData: function() {
|
|
366
366
|
var _a;
|
|
367
367
|
return (_a = ue.value) == null ? void 0 : _a.getTableData();
|
|
368
|
+
}, handleSearch: function(e3, t2) {
|
|
369
|
+
var _a;
|
|
370
|
+
return (_a = ue.value) == null ? void 0 : _a.handleSearch(e3, t2);
|
|
368
371
|
} }), (e3, t2) => {
|
|
369
372
|
const n2 = a("super-grid");
|
|
370
|
-
return r(), l("div", { ref_key: "tableDivRef", ref: re, id: u(ce) + "_tableDiv" }, [s(n2, { ref_key: "gridRef", ref: ue, url: u(se), options: le.value, code: u(ce), settings: u(ve), "search-form-info": ge.value, "list-toolbar-form-data": u(fe), onSelect: Fe, onSelectAll: He, onSelectionChange: Ue, onCellClick: Le, onCellDblclick: Me, onRowClick: $e, onRowDblclick: _e, onHeaderClick: Ae, onRefresh: Ge, onNewOpenGridDialog: u(P), onCanShowMobileSearch: ze, onGridOnmounted:
|
|
373
|
+
return r(), l("div", { ref_key: "tableDivRef", ref: re, id: u(ce) + "_tableDiv" }, [s(n2, { ref_key: "gridRef", ref: ue, url: u(se), options: le.value, code: u(ce), settings: u(ve), "search-form-info": ge.value, "list-toolbar-form-data": u(fe), onSelect: Fe, onSelectAll: He, onSelectionChange: Ue, onCellClick: Le, onCellDblclick: Me, onRowClick: $e, onRowDblclick: _e, onHeaderClick: Ae, onRefresh: Ge, onNewOpenGridDialog: u(P), onCanShowMobileSearch: ze, onGridOnmounted: Se }, null, 8, ["url", "options", "code", "settings", "search-form-info", "list-toolbar-form-data", "onNewOpenGridDialog"])], 8, z);
|
|
371
374
|
};
|
|
372
375
|
} });
|
|
373
376
|
export {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, onUnmounted as n, createElementBlock as u, openBlock as
|
|
1
|
+
import { defineComponent as e, ref as t, onUnmounted as n, createElementBlock as u, openBlock as a, createBlock as o, createCommentVNode as l, unref as r } from "vue";
|
|
2
2
|
import i from "./sub-table-runtime.vue.js";
|
|
3
3
|
import c from "./main-table-runtime.vue.js";
|
|
4
4
|
const f = e({ __name: "table-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: f2 }) {
|
|
5
|
-
const s = e2, g = s.pageContext.pageType, d = t(null), v = s.configure.uuid,
|
|
6
|
-
d.value =
|
|
5
|
+
const s = e2, g = s.pageContext.pageType, d = t(null), v = s.configure.uuid, S = s.pageContext.superGridItems, p = S ? S[v] : null;
|
|
6
|
+
d.value = p ? p.configure ? JSON.parse(p.configure) : null : s.configure;
|
|
7
7
|
const T = s.configure.runtime ? s.configure.runtime : {};
|
|
8
8
|
T.style, T.class;
|
|
9
9
|
const C = t(true), b = t(null);
|
|
@@ -72,7 +72,10 @@ const f = e({ __name: "table-runtime", props: { pageContext: {}, configure: {} }
|
|
|
72
72
|
}, addRequiredClass: function(e3, t2, n2) {
|
|
73
73
|
var _a;
|
|
74
74
|
(_a = b.value) == null ? void 0 : _a.addRequiredClass(e3, t2, n2);
|
|
75
|
-
}
|
|
75
|
+
}, handleSearch: function(e3, t2) {
|
|
76
|
+
var _a;
|
|
77
|
+
(_a = b.value) == null ? void 0 : _a.handleSearch(e3, t2);
|
|
78
|
+
} }), (e3, t2) => (a(), u("div", null, [r(g) && "form" === r(g) && C.value ? (a(), o(i, { key: 0, ref_key: "gridRef", ref: b, pageContext: e3.pageContext, configure: d.value, onSetSafeDeleteTableCode: E }, null, 8, ["pageContext", "configure"])) : r(g) && "form" === r(g) ? l("", true) : (a(), o(c, { key: 1, ref_key: "gridRef", ref: b, pageContext: e3.pageContext, configure: d.value, onSetSafeDeleteTableCode: E }, null, 8, ["pageContext", "configure"]))]));
|
|
76
79
|
} });
|
|
77
80
|
export {
|
|
78
81
|
f as default
|