super-page-runtime 2.3.41-sit1 → 2.3.42-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/api-util.js +7 -4
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +22 -22
- package/dist/es/components/runtime/utils/events/event-util.js +45 -43
- package/dist/es/components/runtime/utils/events/standard-event.js +17 -17
- package/dist/es/components/runtime/utils/events/validator-util.js +1 -1
- package/dist/es/components/runtime/utils/page-init-util.js +20 -20
- package/dist/es/components/runtime/utils/page-store.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +94 -92
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +9 -8
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +56 -51
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +6 -6
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +58 -56
- package/dist/es/components/runtime/views/super-page.vue.d.ts +2 -0
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +166 -160
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/dist/es/style.css +86 -86
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as o, ref as e, resolveComponent as t, createBlock as r, openBlock as p, withCtx as l, createElementBlock as s, Fragment as n, createTextVNode as a, toDisplayString as i, resolveDynamicComponent as u, createVNode as
|
|
1
|
+
import { defineComponent as o, ref as e, resolveComponent as t, createBlock as r, openBlock as p, withCtx as l, createElementBlock as s, Fragment as n, createTextVNode as a, toDisplayString as i, resolveDynamicComponent as u, createVNode as m, createCommentVNode as c, createElementVNode as f, normalizeClass as g } from "vue";
|
|
2
2
|
import "agilebuilder-ui/src/utils/common-util";
|
|
3
3
|
import "agilebuilder-ui/src/utils/util";
|
|
4
4
|
import { formatColContent as d } from "./chart-table-util.js";
|
|
@@ -15,7 +15,7 @@ import { expressJump as b } from "../../../../utils/table-utils.js";
|
|
|
15
15
|
import "../../../../utils/events/print-label.js";
|
|
16
16
|
import "../../../../utils/page-store.js";
|
|
17
17
|
import "vue-i18n";
|
|
18
|
-
const k = { key: 0 },
|
|
18
|
+
const k = { key: 0 }, h = { key: 1 }, w = { key: 1 }, x = { key: 2 }, C = o({ __name: "normal-column", props: { configure: { type: Object, default: () => ({}) }, pageContext: { type: Object, default: () => ({}) }, column: { type: Object, default: () => ({}) } }, setup(o2) {
|
|
19
19
|
const C2 = o2, j = e(false);
|
|
20
20
|
let v = null;
|
|
21
21
|
function O(o3, e2, t2, r2) {
|
|
@@ -38,7 +38,7 @@ const k = { key: 0 }, w = { key: 1 }, h = { key: 1 }, x = { key: 2 }, C = o({ __
|
|
|
38
38
|
}
|
|
39
39
|
return C2.column.linkPage && C2.column.linkPage.length > 0 && (j.value = true), (e2, d2) => {
|
|
40
40
|
const y2 = t("el-table-column"), b2 = t("el-progress"), C3 = t("el-tag"), v2 = t("el-link");
|
|
41
|
-
return "$index" === o2.column.props.base.prop ? (p(), r(y2, { key: 0, label: o2.column.props.base.name, type: "index", align: "center", "header-align": "center", width: "80" }, null, 8, ["label"])) : (p(), r(y2, { key: 1, prop: o2.column.props.base.prop, width: o2.column.props.base.width ? o2.column.props.base.width : "", label: o2.column.props.base.name, "header-align": o2.column.props.base.headerAlign, align: o2.column.props.base.align, fixed: !!o2.column.props.base.fixed && o2.column.props.base.fixed, formatter: O }, { default: l((e3) => [o2.column.props.format && o2.column.props.format.type ? (p(), s(n, { key: 0 }, [a(i(o2.column.props.format.status) + " ", 1), "customControl" === o2.column.props.format.type ? (p(), r(u(o2.column.props.format.customControl), { key: 0, scope: e3, column: o2.column, configure: o2.configure, pageContext: o2.pageContext }, null, 8, ["scope", "column", "configure", "pageContext"])) : "progress" === o2.column.props.format.type ? (p(), r(b2, { key: 1, type: o2.column.props.format.progressType, percentage: e3.row[o2.column.props.base.prop], status: o2.column.props.format.status, "text-inside": o2.column.props.format.showText, "stroke-width": o2.column.props.format.strokeWidth, color: "custom" === o2.column.props.format.colorType ? o2.column.props.format.color : "" }, null, 8, ["type", "percentage", "status", "text-inside", "stroke-width", "color"])) : "icon" === o2.column.props.format.type ? (p(), s(n, { key: 2 }, [o2.column.props.format.isTag ? (p(), s("span", k, [
|
|
41
|
+
return "$index" === o2.column.props.base.prop ? (p(), r(y2, { key: 0, label: o2.column.props.base.name, type: "index", align: "center", "header-align": "center", width: "80" }, null, 8, ["label"])) : (p(), r(y2, { key: 1, prop: o2.column.props.base.prop, width: o2.column.props.base.width ? o2.column.props.base.width : "", "min-width": o2.column.props.base.minWidth ? o2.column.props.base.minWidth : "", label: o2.column.props.base.name, "header-align": o2.column.props.base.headerAlign, align: o2.column.props.base.align, fixed: !!o2.column.props.base.fixed && o2.column.props.base.fixed, formatter: O }, { default: l((e3) => [o2.column.props.format && o2.column.props.format.type ? (p(), s(n, { key: 0 }, [a(i(o2.column.props.format.status) + " ", 1), "customControl" === o2.column.props.format.type ? (p(), r(u(o2.column.props.format.customControl), { key: 0, scope: e3, column: o2.column, configure: o2.configure, pageContext: o2.pageContext }, null, 8, ["scope", "column", "configure", "pageContext"])) : "progress" === o2.column.props.format.type ? (p(), r(b2, { key: 1, type: o2.column.props.format.progressType, percentage: e3.row[o2.column.props.base.prop], status: o2.column.props.format.status, "text-inside": o2.column.props.format.showText, "stroke-width": o2.column.props.format.strokeWidth, color: "custom" === o2.column.props.format.colorType ? o2.column.props.format.color : "" }, null, 8, ["type", "percentage", "status", "text-inside", "stroke-width", "color"])) : "icon" === o2.column.props.format.type ? (p(), s(n, { key: 2 }, [o2.column.props.format.isTag ? (p(), s("span", k, [m(C3, { type: o2.column.props.format.tagType, effect: o2.column.props.format.tagEffect, hit: o2.column.props.format.hit, size: o2.column.props.format.size }, { default: l(() => [a(i(e3.row[o2.column.props.base.prop]), 1)]), _: 2 }, 1032, ["type", "effect", "hit", "size"])])) : (p(), s("span", h, ["pre" === o2.column.props.format.position ? (p(), s("i", { key: 0, class: g(o2.column.props.format.icon) }, null, 2)) : c("", true), f("span", null, i(e3.row[o2.column.props.base.prop]), 1), "suf" === o2.column.props.format.position ? (p(), s("i", { key: 1, class: g(o2.column.props.format.icon) }, null, 2)) : c("", true)]))], 64)) : (p(), s(n, { key: 3 }, [j.value && _(e3.row) ? (p(), r(v2, { key: 0, type: "primary", onClick: (o3) => P(e3.row) }, { default: l(() => [a(i(T(e3.row, o2.column.props.format)), 1)]), _: 2 }, 1032, ["onClick"])) : (p(), s("span", w, i(T(e3.row, o2.column.props.format)), 1))], 64))], 64)) : j.value && _(e3.row) ? (p(), r(v2, { key: 1, type: "primary", onClick: (o3) => P(e3.row) }, { default: l(() => [a(i(e3.row[o2.column.props.base.prop]), 1)]), _: 2 }, 1032, ["onClick"])) : (p(), s("span", x, i(e3.row[o2.column.props.base.prop]), 1))]), _: 1 }, 8, ["prop", "width", "min-width", "label", "header-align", "align", "fixed"]));
|
|
42
42
|
};
|
|
43
43
|
} });
|
|
44
44
|
export {
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { defineComponent as e, ref as o, computed as r, onMounted as t, watch as n, 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
|
|
1
|
+
import { defineComponent as e, ref as o, computed as r, onMounted as t, watch as n, 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 C, h as y } from "vue";
|
|
2
2
|
import b from "../common/common-chart-header.vue.js";
|
|
3
|
-
import { getSizeConfig as x, getChartDatasFromPage as O, getValueFromVariable as S, caculateShowCondition as w, isPromise as E, setValueForVariableName as
|
|
4
|
-
import { handleChartEvent as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { getSummaryTitleColumn as
|
|
9
|
-
import { deepCopy as
|
|
10
|
-
const
|
|
3
|
+
import { getSizeConfig as x, getChartDatasFromPage as O, getValueFromVariable as S, caculateShowCondition as w, isPromise as E, setValueForVariableName as T, updateChartDatasourcesByComponent as j } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { handleChartEvent as $, getCustomFunc as F } from "../../../../utils/events/event-util.js";
|
|
5
|
+
import k from "./group-column.vue.js";
|
|
6
|
+
import N from "./normal-column.vue.js";
|
|
7
|
+
import I from "./table-pageination.vue.js";
|
|
8
|
+
import { getSummaryTitleColumn as R, getSummaryDataColumn as H, rowDataToColumn as D, getColumnToRowTableConfig as J, colDataToRow as U, computeFormula as W, getNewColumnConfig as _, summaryStatistics as z, replacePlaceholders as A, getIndexColumn as P, 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 (!
|
|
12
|
+
const Q = e2, X = Q.configure.runtime ? Q.configure.runtime : {}, Y = X.style, Z = X.class, ee = X.dataConfig, oe = X.headerInfo ? X.headerInfo : {}, re = o(null), te = o(X.props.isEnableGroupHeader), ne = o([]), ie = o([]), ae = o([]), ue = o([]), pe = o({}), le = o(false), se = o({}), ce = o({}), ge = o({}), fe = [], me = o({}), de = o({}), he = o(null), ve = r(() => te.value ? ue.value.filter((e3) => !e3.isLeaf || De(pe[e3.columnUuid])) : ie.value.filter((e3) => De(e3))), Ce = o(0);
|
|
13
|
+
let ye = [];
|
|
14
|
+
if (!Q.configure.props.modelCustom) {
|
|
15
15
|
if (te.value) {
|
|
16
16
|
const e3 = [];
|
|
17
|
-
|
|
17
|
+
Q.configure.props.groupHeaders.forEach((o2) => {
|
|
18
18
|
o2.parentUuid || e3.push(o2);
|
|
19
19
|
}), e3.sort((e4, o2) => e4.displayOrder - o2.displayOrder), ue.value = e3, function() {
|
|
20
|
-
if (
|
|
20
|
+
if (Q.configure.props.base.showIndex) {
|
|
21
21
|
ue.value.unshift({ columnUuid: "$index", displayOrder: 0, isLeaf: true, prop: "$index", titleText: "序号", uuid: "$index" });
|
|
22
|
-
const e4 =
|
|
22
|
+
const e4 = P();
|
|
23
23
|
e4 && (pe.value.$index = e4);
|
|
24
24
|
}
|
|
25
25
|
}();
|
|
26
|
-
} else ie.value =
|
|
27
|
-
(_a =
|
|
26
|
+
} else ie.value = Q.configure.items;
|
|
27
|
+
(_a = Q.configure.items) == null ? void 0 : _a.forEach((e3) => {
|
|
28
28
|
pe.value[e3.uuid] = e3, Object.keys(e3.style).length > 0 && (me.value[e3.props.base.prop] = { cellStyle: e3.style, titleStyle: e3.titleStyle }), e3.formula && "" !== e3.formula.trim() && (de.value[e3.props.base.prop] = e3.formula);
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
le.value =
|
|
32
|
-
let be = 300, xe = x(
|
|
31
|
+
le.value = Q.configure.props.base.showSummary, (le.value || Q.configure.props.highOrder.groupField && Q.configure.props.highOrder.groupField.length > 0) && (se.value = R(Q.configure), le.value && (ce.value = H(Q.configure, "table")), Q.configure.props.highOrder.groupField && Q.configure.props.highOrder.groupField.length > 0 && (ge.value = H(Q.configure, "group")));
|
|
32
|
+
let be = 300, xe = x(Q.pageContext, Q.configure);
|
|
33
33
|
function Oe(e3) {
|
|
34
34
|
if (e3 || (e3 = []), Array.isArray(e3) && (e3 = e3.length > 0 ? e3[0] : {}), e3 || (e3 = {}), e3.hasRender) return void (e3.hasRender = true);
|
|
35
35
|
const o2 = te.value ? ue.value : ve;
|
|
36
|
-
|
|
36
|
+
$(Q.pageContext, Q.configure, "beforeUpdateChart", o2, { resultData: e3 }), function(e4) {
|
|
37
37
|
var _a2;
|
|
38
|
-
Je(e4), "service" ===
|
|
39
|
-
if (
|
|
38
|
+
Je(e4), "service" === Q.configure.props.dataOrigin.dataSource && e4.result ? ye = e4.result[Q.configure.props.dataOrigin.service.serviceDataField] : "variable" === Q.configure.props.dataOrigin.dataSource && (ye = S(Q.pageContext.entity, Q.configure.props.dataOrigin.variable));
|
|
39
|
+
if (ye) if (((_a2 = Q.configure.props) == null ? void 0 : _a2.dataOrigin.limitEnable) && Q.configure.props.dataOrigin.itemNumSource) {
|
|
40
40
|
let o3 = 10;
|
|
41
|
-
if ("fix" ===
|
|
42
|
-
else if ("variable" ===
|
|
43
|
-
o3 = Number(S(
|
|
44
|
-
const r2 =
|
|
45
|
-
n(() => t2.reduce((e5, o4) => e5[o4],
|
|
41
|
+
if ("fix" === Q.configure.props.dataOrigin.itemNumSource) o3 = Q.configure.props.dataOrigin.itemNumFix;
|
|
42
|
+
else if ("variable" === Q.configure.props.dataOrigin.itemNumSource) {
|
|
43
|
+
o3 = Number(S(Q.pageContext.entity, Q.configure.props.dataOrigin.itemNumVariable));
|
|
44
|
+
const r2 = Q.configure.props.dataOrigin.itemNumVariable.match(/\${(.*?)}/), t2 = r2 ? r2[1].split(".") : [], i2 = JSON.parse(JSON.stringify(ye));
|
|
45
|
+
n(() => t2.reduce((e5, o4) => e5[o4], Q.pageContext.entity), (o4) => {
|
|
46
46
|
Se(o4, i2, e4);
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
Se(o3,
|
|
50
|
-
} else we(
|
|
51
|
-
}(e3), e3.hasRender = true, ee && (ee.autoRefresh = false),
|
|
49
|
+
Se(o3, ye, e4);
|
|
50
|
+
} else we(ye, e4);
|
|
51
|
+
}(e3), e3.hasRender = true, ee && (ee.autoRefresh = false), $(Q.pageContext, Q.configure, "afterUpdateChart", o2, { resultData: e3 });
|
|
52
52
|
}
|
|
53
53
|
function Se(e3, o2, r2) {
|
|
54
54
|
var _a2;
|
|
55
55
|
if (e3 && e3 < o2.length) {
|
|
56
56
|
let t2 = [];
|
|
57
|
-
if (((_a2 =
|
|
57
|
+
if (((_a2 = Q.configure.props.dataOrigin.limitCountColumns) == null ? void 0 : _a2.length) > 0) t2 = Q.configure.props.dataOrigin.limitCountColumns;
|
|
58
58
|
else {
|
|
59
59
|
ie.value.filter((e4) => "number" === e4.props.base.dataType).forEach((e4) => {
|
|
60
60
|
t2.push(e4.props.base.prop);
|
|
@@ -67,7 +67,7 @@ const Q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
67
67
|
t2.forEach((o3) => {
|
|
68
68
|
void 0 === n2[o3] && (n2[o3] = 0), n2[o3] = n2[o3] + e4[o3];
|
|
69
69
|
});
|
|
70
|
-
}), o2.length > e3 && (o2 = o2.slice(0, e3 - 1)), n2[i2] =
|
|
70
|
+
}), o2.length > e3 && (o2 = o2.slice(0, e3 - 1)), n2[i2] = Q.configure.props.dataOrigin.overItemAlias, o2.push(n2);
|
|
71
71
|
}
|
|
72
72
|
we(o2, r2);
|
|
73
73
|
} else we(o2, r2);
|
|
@@ -75,16 +75,18 @@ const Q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
75
75
|
function we(e3, o2) {
|
|
76
76
|
var _a2, _b, _c, _d, _e, _f, _g;
|
|
77
77
|
if (Ee("rowToColumn")) {
|
|
78
|
-
if (ae.value = JSON.parse(JSON.stringify(
|
|
78
|
+
if (ae.value = JSON.parse(JSON.stringify(Q.configure.items)), e3 = D(e3, Q.configure, ae.value), !te.value) {
|
|
79
79
|
const o3 = function(e4, o4, r2) {
|
|
80
|
-
|
|
80
|
+
var _a3, _b2;
|
|
81
|
+
const t2 = Q.configure.props.dataOrigin.rowToColumn.titleColumns, n2 = Q.configure.props.dataOrigin.rowToColumn.dataColumns, i2 = e4.props.dataOrigin.groupField;
|
|
81
82
|
if ((!i2 || 0 === i2.length) && r2.length > 0) {
|
|
82
|
-
const
|
|
83
|
-
return
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
const o5 = [], t3 = _("$GroupColumn", Q.configure.props.dataOrigin.rowToColumn.firstColumnTitle, 0, "string");
|
|
84
|
+
return ((_b2 = (_a3 = e4.props.dataOrigin) == null ? void 0 : _a3.rowToColumn) == null ? void 0 : _b2.minTitleColumnWidth) && (t3.props.base.minWidth = e4.props.dataOrigin.rowToColumn.minTitleColumnWidth), o5.push(t3), Object.keys(r2[0]).forEach((r3, t4) => {
|
|
85
|
+
var _a4, _b3, _c2, _d2, _e2, _f2;
|
|
86
|
+
if ("$GroupColumn" === r3) return;
|
|
87
|
+
const n3 = _(r3, r3, t4 + 1, "string");
|
|
88
|
+
((_b3 = (_a4 = e4.props.dataOrigin) == null ? void 0 : _a4.rowToColumn) == null ? void 0 : _b3.minDataColumnWidth) && (n3.props.base.minWidth = e4.props.dataOrigin.rowToColumn.minDataColumnWidth), ((_d2 = (_c2 = e4.props.dataOrigin) == null ? void 0 : _c2.rowToColumn) == null ? void 0 : _d2.cellStyle) && (me.value[n3.props.base.prop] = { cellStyle: (_f2 = (_e2 = e4.props.dataOrigin) == null ? void 0 : _e2.rowToColumn) == null ? void 0 : _f2.cellStyle }), o5.push(n3);
|
|
89
|
+
}), o5;
|
|
88
90
|
}
|
|
89
91
|
{
|
|
90
92
|
const e5 = [...o4].filter((e6) => !t2.includes(e6.props.base.prop) && !n2.includes(e6.props.base.prop)), i3 = new RegExp(`(${n2.join("|")})$`), a2 = /* @__PURE__ */ new Set();
|
|
@@ -97,33 +99,33 @@ const Q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
97
99
|
});
|
|
98
100
|
}), a2.forEach((o5) => {
|
|
99
101
|
n2.forEach((t3) => {
|
|
100
|
-
var
|
|
101
|
-
let n3 = (
|
|
102
|
+
var _a4;
|
|
103
|
+
let n3 = (_a4 = ie.value.find((e6) => e6.props.base.prop === t3)) == null ? void 0 : _a4.props.base.name;
|
|
102
104
|
null == n3 && (n3 = "");
|
|
103
|
-
const i4 =
|
|
105
|
+
const i4 = _(`${o5}${t3}`, `${o5}${n3}`, e5.length + 1, "number" == typeof r2[0][`${o5}${t3}`] ? "number" : "string");
|
|
104
106
|
e5.push(i4);
|
|
105
107
|
});
|
|
106
108
|
}), e5;
|
|
107
109
|
}
|
|
108
|
-
}(
|
|
110
|
+
}(Q.configure, ae.value, e3);
|
|
109
111
|
ie.value = o3;
|
|
110
112
|
}
|
|
111
|
-
} else Ee("columnToRow") && (te.value || (ie.value = J(
|
|
112
|
-
if ((_b = (_a2 =
|
|
113
|
-
const o3 =
|
|
113
|
+
} else Ee("columnToRow") && (te.value || (ie.value = J(Q.configure)), e3 = U(e3, Q.configure));
|
|
114
|
+
if ((_b = (_a2 = Q.configure.props) == null ? void 0 : _a2.dataOrigin) == null ? void 0 : _b.dataFormatting) {
|
|
115
|
+
const o3 = F(Q.pageContext, Q.configure.props.dataOrigin.dataFormatting);
|
|
114
116
|
if (o3) {
|
|
115
117
|
const r2 = o3.apply(o3, [{ tableData: e3 }]);
|
|
116
118
|
r2 && (e3 = r2);
|
|
117
119
|
}
|
|
118
120
|
}
|
|
119
|
-
if (Object.keys(de.value).length > 0 && e3 && e3.length > 0 &&
|
|
120
|
-
"frontend" ===
|
|
121
|
-
}(o2) : ne.value = e3, ((_e = (_d =
|
|
122
|
-
const e4 =
|
|
121
|
+
if (Object.keys(de.value).length > 0 && e3 && e3.length > 0 && W(de.value, e3, Q.pageContext.entity), ((_c = Q.configure.pageination) == null ? void 0 : _c.enable) ? function(e4) {
|
|
122
|
+
"frontend" === Q.configure.pageination.type ? (Ce.value = ye.length, Re(1, Q.configure.pageination.pageSize)) : "backend" === Q.configure.pageination.type && (ne.value = ye, Q.configure.pageination.totalFrom && (Ce.value = e4.result[Q.configure.pageination.totalFrom]));
|
|
123
|
+
}(o2) : ne.value = e3, ((_e = (_d = Q.configure.props) == null ? void 0 : _d.highOrder) == null ? void 0 : _e.groupField) && ((_g = (_f = Q.configure.props) == null ? void 0 : _f.highOrder) == null ? void 0 : _g.groupField.length) > 0) {
|
|
124
|
+
const e4 = Q.configure.props.highOrder.groupField;
|
|
123
125
|
ne.value = function(e5, o3) {
|
|
124
126
|
var _a3, _b2;
|
|
125
127
|
if (0 === ge.value.length) return e5;
|
|
126
|
-
const r2 = [], t2 = (_a3 =
|
|
128
|
+
const r2 = [], t2 = (_a3 = Q.configure.items) == null ? void 0 : _a3.filter((e6) => o3.includes(e6.props.base.prop)), n2 = (_b2 = Q.configure.items) == null ? void 0 : _b2.filter((e6) => true === e6.props.base.groupSummary), i2 = {};
|
|
127
129
|
e5.forEach((e6) => {
|
|
128
130
|
const r3 = o3.map((o4) => e6[o4]).join("|");
|
|
129
131
|
i2[r3] || (i2[r3] = []), i2[r3].push(e6);
|
|
@@ -132,94 +134,94 @@ const Q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
132
134
|
for (let e6 = 0; e6 < a2.length; e6++) {
|
|
133
135
|
const o4 = a2[e6], i3 = {};
|
|
134
136
|
n2 == null ? void 0 : n2.forEach((e7) => {
|
|
135
|
-
const r3 = e7.props.base.prop, t3 =
|
|
137
|
+
const r3 = e7.props.base.prop, t3 = z(ge.value[r3], o4, r3, Q.pageContext);
|
|
136
138
|
i3[r3] = t3;
|
|
137
139
|
}), r2.push(...o4), t2 == null ? void 0 : t2.forEach((e7) => {
|
|
138
140
|
const r3 = e7.props.base.prop;
|
|
139
|
-
i3[r3] =
|
|
141
|
+
i3[r3] = A(e7.props.base.summaryTitle, o4[0]);
|
|
140
142
|
}), r2.push(i3), fe.push(r2.length - 1);
|
|
141
143
|
}
|
|
142
144
|
return r2;
|
|
143
145
|
}(ne.value, e4);
|
|
144
146
|
}
|
|
145
147
|
!function(e4) {
|
|
146
|
-
if (
|
|
147
|
-
const o3 =
|
|
148
|
+
if (Q.configure.props.base.showIndex && -1 === e4.findIndex((e5) => "$index" === e5.props.base.prop)) {
|
|
149
|
+
const o3 = P();
|
|
148
150
|
o3 && e4.unshift(o3);
|
|
149
151
|
}
|
|
150
152
|
}(ie.value);
|
|
151
153
|
}
|
|
152
154
|
function Ee(e3) {
|
|
153
|
-
return
|
|
155
|
+
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
156
|
}
|
|
155
|
-
function
|
|
157
|
+
function Te(e3) {
|
|
156
158
|
const o2 = me.value[e3.column.property] ? me.value[e3.column.property].titleStyle : null, r2 = Y == null ? void 0 : Y.titleStyle;
|
|
157
|
-
return
|
|
159
|
+
return V(e3, { cellTitleStyle: o2, titleStyle: r2 }, Q);
|
|
158
160
|
}
|
|
159
|
-
function
|
|
160
|
-
return
|
|
161
|
+
function je(e3) {
|
|
162
|
+
return G(e3, fe, Q);
|
|
161
163
|
}
|
|
162
|
-
function
|
|
164
|
+
function $e(e3) {
|
|
163
165
|
const o2 = me.value[e3.column.property] ? me.value[e3.column.property].cellStyle : null;
|
|
164
|
-
return
|
|
166
|
+
return K(e3, o2, Q);
|
|
165
167
|
}
|
|
166
168
|
xe && xe.fixHeight && (be = xe.fixHeight), xe && xe.maxHeight && (be = xe.maxHeight), be && (be = Number(be + "")), t(() => {
|
|
167
|
-
const e3 = O(
|
|
169
|
+
const e3 = O(Q.pageContext, Q.configure);
|
|
168
170
|
if (e3) Oe(e3);
|
|
169
|
-
else if ("variable" ===
|
|
171
|
+
else if ("variable" === Q.configure.props.dataOrigin.dataSource) {
|
|
170
172
|
!function() {
|
|
171
|
-
const e4 =
|
|
172
|
-
n(() => o3.reduce((e5, o4) => e5[o4],
|
|
173
|
-
e5 ? Oe(JSON.parse(JSON.stringify(e5))) : (ne.value = [],
|
|
173
|
+
const e4 = Q.configure.props.dataOrigin.variable.match(/\${(.*?)}/), o3 = e4 ? e4[1].split(".") : [];
|
|
174
|
+
n(() => o3.reduce((e5, o4) => e5[o4], Q.pageContext.entity), (e5) => {
|
|
175
|
+
e5 ? Oe(JSON.parse(JSON.stringify(e5))) : (ne.value = [], Q.configure.props.modelCustom ? Je(null) : te.value ? ue.value = Q.configure.props.groupHeaders : ie.value = Q.configure.items);
|
|
174
176
|
});
|
|
175
177
|
}();
|
|
176
|
-
const o2 = S(
|
|
178
|
+
const o2 = S(Q.pageContext.entity, Q.configure.props.dataOrigin.variable);
|
|
177
179
|
o2 && we(o2, e3);
|
|
178
180
|
}
|
|
179
181
|
});
|
|
180
|
-
const
|
|
182
|
+
const Fe = (e3) => {
|
|
181
183
|
const { columns: o2, data: r2 } = e3, t2 = [];
|
|
182
184
|
return o2.forEach((e4, o3) => {
|
|
183
185
|
if (se.value[e4.property]) {
|
|
184
186
|
const n2 = se.value[e4.property].label;
|
|
185
|
-
t2[o3] =
|
|
187
|
+
t2[o3] = y("div", {}, [A(n2, r2)]);
|
|
186
188
|
} else if (ce.value[e4.property]) {
|
|
187
189
|
const n2 = r2.filter((e5, o4) => !fe.includes(o4));
|
|
188
|
-
t2[o3] =
|
|
190
|
+
t2[o3] = z(ce.value[e4.property], n2, e4.property, Q.pageContext);
|
|
189
191
|
}
|
|
190
192
|
}), t2;
|
|
191
193
|
};
|
|
192
|
-
function
|
|
193
|
-
const n2 = o2.property, i2 =
|
|
194
|
+
function ke({ row: e3, column: o2, rowIndex: r2, columnIndex: t2 }) {
|
|
195
|
+
const n2 = o2.property, i2 = Q.configure.props.highOrder;
|
|
194
196
|
if (i2.scopeFunc) {
|
|
195
|
-
const n3 =
|
|
197
|
+
const n3 = F(Q.pageContext, i2.scopeFunc);
|
|
196
198
|
if (n3) {
|
|
197
199
|
const i3 = n3.apply(n3, [{ tableData: ne.value, row: e3, column: o2, rowIndex: r2, columnIndex: t2 }]);
|
|
198
200
|
if (i3) return i3;
|
|
199
201
|
}
|
|
200
|
-
} else if (i2 && i2.mergeColumn, i2 && i2.mergeRow && i2.mergeRow.includes(n2)) return
|
|
202
|
+
} else if (i2 && i2.mergeColumn, i2 && i2.mergeRow && i2.mergeRow.includes(n2)) return L(e3, o2, r2, n2, ne.value);
|
|
203
|
+
}
|
|
204
|
+
function Ne(e3, o2) {
|
|
205
|
+
"frontend" === Q.configure.pageination.type ? Re(e3, o2) : He(e3, o2);
|
|
201
206
|
}
|
|
202
207
|
function Ie(e3, o2) {
|
|
203
|
-
"frontend" ===
|
|
208
|
+
"frontend" === Q.configure.pageination.type ? Re(e3, o2) : He(e3, o2);
|
|
204
209
|
}
|
|
205
210
|
function Re(e3, o2) {
|
|
206
|
-
|
|
207
|
-
}
|
|
208
|
-
function Te(e3, o2) {
|
|
209
|
-
Ce && (ne.value = Ce.slice((e3 - 1) * o2, e3 * o2));
|
|
211
|
+
ye && (ne.value = ye.slice((e3 - 1) * o2, e3 * o2));
|
|
210
212
|
}
|
|
211
213
|
function He(e3, o2) {
|
|
212
|
-
|
|
214
|
+
Q.configure.pageination.currentPageSet && T(Q.pageContext.entity, Q.configure.pageination.currentPageSet, e3), Q.configure.pageination.pageSizeSet && T(Q.pageContext.entity, Q.configure.pageination.pageSizeSet, o2), j(Q.pageContext, Q.configure.uuid);
|
|
213
215
|
}
|
|
214
216
|
function De(e3) {
|
|
215
217
|
const o2 = e3.showCondition;
|
|
216
|
-
return w(
|
|
218
|
+
return w(Q.pageContext, o2);
|
|
217
219
|
}
|
|
218
220
|
function Je(e3) {
|
|
219
|
-
if (
|
|
220
|
-
const o2 =
|
|
221
|
+
if (Q.configure.props.modelCustom) {
|
|
222
|
+
const o2 = F(Q.pageContext, Q.configure.props.modelCustom);
|
|
221
223
|
if (o2) {
|
|
222
|
-
const r2 = o2.apply(o2, [{ pageContext:
|
|
224
|
+
const r2 = o2.apply(o2, [{ pageContext: Q.pageContext, configureObj: Q.configure, value: e3 }]);
|
|
223
225
|
E(r2) ? r2.then((e4) => {
|
|
224
226
|
ie.value = e4.columns;
|
|
225
227
|
}) : ie.value = r2.columns;
|
|
@@ -233,16 +235,16 @@ const Q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
233
235
|
e4.children && e4.children.length > 0 && (i2.children = [], Ue(e4.children, i2.children, r2)), e4.props.format && e4.props.format.type && r2.push(e4), o2.push(i2);
|
|
234
236
|
});
|
|
235
237
|
}
|
|
236
|
-
return
|
|
238
|
+
return M2({ updateChartDatas: Oe, exportChart: function() {
|
|
237
239
|
let e3 = [], o2 = [];
|
|
238
|
-
o2 = te.value ?
|
|
240
|
+
o2 = te.value ? Q.configure.props.groupHeaders : ve.value;
|
|
239
241
|
let r2 = [];
|
|
240
242
|
Ue(o2, e3, r2);
|
|
241
243
|
return { isTable: true, dataArr: function(e4) {
|
|
242
244
|
let o3 = [];
|
|
243
|
-
ne.value && (o3 =
|
|
245
|
+
ne.value && (o3 = B(ne.value), o3.forEach((o4) => {
|
|
244
246
|
e4.forEach((e5) => {
|
|
245
|
-
const r3 =
|
|
247
|
+
const r3 = q(o4, e5.props.format, e5, Q.pageContext, Q.configure);
|
|
246
248
|
o4[e5.props.base.prop] = r3;
|
|
247
249
|
});
|
|
248
250
|
}));
|
|
@@ -250,9 +252,9 @@ const Q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
250
252
|
}(r2), columns: e3, title: oe == null ? void 0 : oe.title };
|
|
251
253
|
} }), (o2, r2) => {
|
|
252
254
|
const t2 = i("el-table");
|
|
253
|
-
return u(), a("div", { style: l(s(Y)), class: p([s(Z), "amb-widget-chart amb-widget-flex amb-chart-table"]), ref: "thisRef" }, [c(g(b, { ref_key: "headerRef", ref: re, headerInfo: s(oe), configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["headerInfo", "configure", "pageContext"]), [[d, s(oe).showHeader || e2.pageContext.showHomepageSearch]]), g(t2, { ref_key: "gridRef", ref: he, data: ne.value, style: { width: "100%" }, "max-height": s(be), "header-cell-style":
|
|
255
|
+
return u(), a("div", { style: l(s(Y)), class: p([s(Z), "amb-widget-chart amb-widget-flex amb-chart-table"]), ref: "thisRef" }, [c(g(b, { ref_key: "headerRef", ref: re, headerInfo: s(oe), configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["headerInfo", "configure", "pageContext"]), [[d, s(oe).showHeader || e2.pageContext.showHomepageSearch]]), g(t2, { ref_key: "gridRef", ref: he, data: ne.value, style: { width: "100%" }, "max-height": s(be), "header-cell-style": Te, "row-style": je, "cell-style": $e, border: true, "show-summary": le.value, stripe: e2.configure.props.base.stripe, "summary-method": Fe, "span-method": ke }, { default: h(() => [te.value ? (u(true), a(v, { key: 0 }, C(ue.value, (o3, r3) => (u(), a(v, { key: r3 }, [o3.isLeaf ? (u(), f(N, { key: 1, configure: e2.configure, pageContext: e2.pageContext, column: pe.value[o3.columnUuid] }, null, 8, ["configure", "pageContext", "column"])) : (u(), f(k, { key: 0, configure: e2.configure, pageContext: e2.pageContext, groupColumn: o3, columnsConfigKeyValues: pe.value }, null, 8, ["configure", "pageContext", "groupColumn", "columnsConfigKeyValues"]))], 64))), 128)) : (u(true), a(v, { key: 1 }, C(ve.value, (o3, r3) => (u(), f(N, { 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(I, { key: 0, configure: e2.configure, "table-data": ne.value, total: Ce.value, onPageChange: Ne, onPageSizeChange: Ie }, null, 8, ["configure", "table-data", "total"])) : m("", true)], 6);
|
|
254
256
|
};
|
|
255
257
|
} });
|
|
256
258
|
export {
|
|
257
|
-
|
|
259
|
+
M as default
|
|
258
260
|
};
|
|
@@ -6,7 +6,7 @@ import { isMobileBrowser as N, isPromise as P } from "agilebuilder-ui/src/utils/
|
|
|
6
6
|
import { getOperationButtons as B, popupToPage as F } from "../../../../utils/table-utils.js";
|
|
7
7
|
import H from "../../../../utils/eventBus.js";
|
|
8
8
|
import { getDefaultValue as U } from "../../../../utils/page-init-util.js";
|
|
9
|
-
import { getSizeConfig as M, caculateShowCondition as
|
|
9
|
+
import { getSizeConfig as M, caculateShowCondition as _, decomposeVariable as $ } from "../../../../utils/page-helper-util.js";
|
|
10
10
|
import { getComponentRefByCode as A } from "../../../../utils/global-refs.js";
|
|
11
11
|
import { getRowStyleUtil as L, getCellStyleUtil as G, getHeaderCellStyleUtil as z } from "../../chart/table/chart-table-util.js";
|
|
12
12
|
const W = ["id"], q = e({ __name: "main-table-runtime", props: { pageContext: {}, configure: {} }, emits: ["setSafeDeleteTableCode"], setup(e2, { expose: q2, emit: Q }) {
|
|
@@ -63,13 +63,13 @@ const W = ["id"], q = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
63
63
|
}(), pe = T(J.code, J.version, K.uuid), de = J.code + "_" + pe, fe = t([]), ge = J.entity.page, me = t({ data: [] }), ve = J.superGridItems, he = ve ? ve[K.uuid] : null, be = t(false), we = Q;
|
|
64
64
|
function Ce() {
|
|
65
65
|
K.props.linkages && K.props.linkages.length > 0 && (K.props.linkages.forEach((e3) => {
|
|
66
|
-
const t2 =
|
|
66
|
+
const t2 = $(e3.fieldName);
|
|
67
67
|
t2 && t2.length > 1 && le.push(t2[1]);
|
|
68
68
|
}), le.length > 0 && function() {
|
|
69
69
|
let e3 = [];
|
|
70
70
|
Y.pageContext.toolsInputComponents && Y.pageContext.toolsInputComponents.length > 0 && Y.pageContext.toolsInputComponents.forEach((t2) => {
|
|
71
71
|
if (K.props.linkages.some((e4) => e4.fieldName === t2.prop) && t2.defaultValue) {
|
|
72
|
-
const n2 =
|
|
72
|
+
const n2 = $(t2.prop);
|
|
73
73
|
n2 && n2.length > 1 && e3.push(n2[1]);
|
|
74
74
|
}
|
|
75
75
|
});
|
|
@@ -225,7 +225,8 @@ const W = ["id"], q = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
225
225
|
r2.props.base.tableUuid = u2.uuid, D(null, J, r2, "click", l2);
|
|
226
226
|
}
|
|
227
227
|
function Fe(e3) {
|
|
228
|
-
|
|
228
|
+
var _a, _b;
|
|
229
|
+
"close_open_win" === e3.data ? se.value && se.value.refresh() : "close_open_win" === ((_a = e3.data) == null ? void 0 : _a.type) && ((_b = e3.data.jumpFrom) == null ? void 0 : _b.uuid) === Y.configure.uuid && se.value && se.value.refresh();
|
|
229
230
|
}
|
|
230
231
|
function He(e3, t2) {
|
|
231
232
|
fe.value = e3;
|
|
@@ -238,10 +239,10 @@ const W = ["id"], q = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
238
239
|
function Me(e3) {
|
|
239
240
|
v(J, K, { newSelection: e3 });
|
|
240
241
|
}
|
|
241
|
-
function
|
|
242
|
+
function _e(e3, t2, n2, o2) {
|
|
242
243
|
h(J, K, { row: e3, column: t2, cell: n2, event: o2 });
|
|
243
244
|
}
|
|
244
|
-
function
|
|
245
|
+
function $e(e3, t2, n2, o2) {
|
|
245
246
|
b(J, K, { row: e3, column: t2, cell: n2, event: o2 });
|
|
246
247
|
}
|
|
247
248
|
function Ae(e3, t2, n2) {
|
|
@@ -309,7 +310,7 @@ const W = ["id"], q = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
309
310
|
};
|
|
310
311
|
function Ze({ row: e3, editConditions: t2 }) {
|
|
311
312
|
let n2 = true;
|
|
312
|
-
return t2 && t2.length > 0 && (n2 =
|
|
313
|
+
return t2 && t2.length > 0 && (n2 = _(Y.pageContext, t2, e3)), n2;
|
|
313
314
|
}
|
|
314
315
|
function et(e3, t2) {
|
|
315
316
|
const n2 = A(Y.pageContext, t2);
|
|
@@ -374,7 +375,7 @@ const W = ["id"], q = e({ __name: "main-table-runtime", props: { pageContext: {}
|
|
|
374
375
|
return (_a = se.value) == null ? void 0 : _a.getColumns();
|
|
375
376
|
} }), (e3, t2) => {
|
|
376
377
|
const n2 = a("super-grid");
|
|
377
|
-
return r(), l("div", { ref_key: "tableDivRef", ref: ue, id: u(pe) + "_tableDiv" }, [s(n2, { ref_key: "gridRef", ref: se, url: u(ce), options: re.value, code: u(pe), settings: u(he), "search-form-info": me.value, "list-toolbar-form-data": u(ge), isDialog: u(J).isDialog, onSelect: He, onSelectAll: Ue, onSelectionChange: Me, onCellClick:
|
|
378
|
+
return r(), l("div", { ref_key: "tableDivRef", ref: ue, id: u(pe) + "_tableDiv" }, [s(n2, { ref_key: "gridRef", ref: se, url: u(ce), options: re.value, code: u(pe), settings: u(he), "search-form-info": me.value, "list-toolbar-form-data": u(ge), isDialog: u(J).isDialog, onSelect: He, onSelectAll: Ue, onSelectionChange: Me, onCellClick: _e, onCellDblclick: $e, onRowClick: Ae, onRowDblclick: Le, onHeaderClick: Ge, onRefresh: ze, onNewOpenGridDialog: u(F), onCanShowMobileSearch: We, onGridOnmounted: Ce }, null, 8, ["url", "options", "code", "settings", "search-form-info", "list-toolbar-form-data", "isDialog", "onNewOpenGridDialog"])], 8, W);
|
|
378
379
|
};
|
|
379
380
|
} });
|
|
380
381
|
export {
|