super-page-runtime 2.3.43-sit2 → 2.3.44-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.
@@ -169,7 +169,7 @@ function w(e2, n2, r2, l2) {
169
169
  });
170
170
  s2.subRules && (Object.keys(s2.subRules).length > 0 ? s2.totalSubRules || (s2.totalSubRules = {}) : delete s2.subRules);
171
171
  return s2;
172
- }(u3, n4.hiddenNotValidatorCodes), y2 = window.$vueApp.config.globalProperties.$formValidator(e4, b2, m3, f3, d3, c3, g2, r6, { returnAllErrors: h2 }), o2 = y2 && Array.isArray(y2) ? 0 === y2.length || i().t("superPageRuntimeMessage.pleaseInputRequiredInfo") : !y2 || y2.msg;
172
+ }(u3, n4.hiddenNotValidatorCodes), y2 = window.$vueApp.config.globalProperties.$formValidator(e4, b2, m3, f3, d3, c3, g2, r6, { returnAllErrors: h2 }), o2 = y2 && Array.isArray(y2) ? 1 === y2.length && y2[0].message ? y2[0].message : 0 === y2.length || i().t("superPageRuntimeMessage.pleaseInputRequiredInfo") : !y2 || y2.msg;
173
173
  } else o2 = true;
174
174
  true !== o2 ? (t({ showClose: true, message: o2 + "", type: "warning" }), y2 && Array.isArray(y2) && y2.length > 0 ? (C(n4, y2), k(n4, P(n4, y2))) : y2.listCode ? (R(n4, y2), E(n4, y2)) : (R(n4, y2), v(n4, y2.field)), l4(false)) : (Object.keys(e4).indexOf("validateErrorField") >= 0 && delete e4.validateErrorField, l4(e4));
175
175
  } else u2(new Error(i().t("superPageRuntimeMessage.formDataVerificationFailed")).message);
@@ -37,7 +37,7 @@ export declare function getSummaryDataColumn(configure: Component, type: string)
37
37
  * @param pageContext 页面上下文
38
38
  * @returns
39
39
  */
40
- export declare function summaryStatistics(summaryColumn: any, data: any, prop: string, pageContext: PageContext): string;
40
+ export declare function summaryStatistics(summaryColumn: any, data: any, prop: string, pageContext: PageContext, columnsConfig: any): string;
41
41
  export declare function replacePlaceholders(template: string, data: {
42
42
  [key: string]: any;
43
43
  }): string;
@@ -118,35 +118,44 @@ function getSummaryDataColumn(e, t) {
118
118
  a && ("table" === t && a.props.base.tableSummary || "group" === t && a.props.base.groupSummary) && (r[o.prop] = o);
119
119
  }), r;
120
120
  }
121
- function summaryStatistics(e, t, r, o) {
122
- let a = "";
123
- const n = e.summaryMode, s = t.map((e2) => Number(e2[r])).filter((e2) => !Number.isNaN(e2));
124
- if (s.length > 0) if ("custom" === n) {
125
- const n2 = getCustomFunc(o, e.customFunc);
126
- if (n2) try {
127
- const e2 = n2.apply(n2, [{ data: t, prop: r }]);
128
- a = e2 ? ` ${e2}` : " N/A";
121
+ function summaryStatistics(e, t, r, o, a) {
122
+ let n = "";
123
+ const s = e.summaryMode, l = t.map((e2) => Number(e2[r])).filter((e2) => !Number.isNaN(e2));
124
+ if (l.length > 0) if ("custom" === s) {
125
+ const a2 = getCustomFunc(o, e.customFunc);
126
+ if (a2) try {
127
+ const e2 = a2.apply(a2, [{ data: t, prop: r }]);
128
+ n = e2 ? ` ${e2}` : " N/A";
129
129
  } catch (e2) {
130
130
  }
131
- else a = " N/A";
132
- } else switch (n) {
131
+ else n = " N/A";
132
+ } else switch (s) {
133
133
  case "sum":
134
- a = ` ${s.reduce((e2, t2) => e2 + t2, 0)}`;
134
+ n = `${l.reduce((e2, t2) => e2 + t2, 0)}`;
135
135
  break;
136
136
  case "avg":
137
- a = " " + s.reduce((e2, t2) => e2 + t2, 0) / s.length;
137
+ n = "" + l.reduce((e2, t2) => e2 + t2, 0) / l.length;
138
138
  break;
139
139
  case "min":
140
- a = ` ${Math.min(...s)}`;
140
+ n = `${Math.min(...l)}`;
141
141
  break;
142
142
  case "max":
143
- a = ` ${Math.max(...s)}`;
143
+ n = `${Math.max(...l)}`;
144
144
  break;
145
145
  default:
146
- a = " N/A";
146
+ n = "N/A";
147
147
  }
148
- else a = " N/A";
149
- return a;
148
+ else n = "N/A";
149
+ if (r && a) {
150
+ const e2 = a.findIndex((e3) => e3.props.base.prop === r);
151
+ if (-1 !== e2 && a[e2].props.format && a[e2].props.format.type) {
152
+ const t2 = {};
153
+ t2[r] = n;
154
+ const s2 = formatColContent(t2, a[e2].props.format, a[e2], o, {});
155
+ Number.isNaN(s2) || (n = ` ${s2}`);
156
+ }
157
+ }
158
+ return n;
150
159
  }
151
160
  function replacePlaceholders(e, t) {
152
161
  if (e) return e.replace(/\$\{row\.(\w+)\}/g, (e2, r) => Object.prototype.hasOwnProperty.call(t, r) ? t[r] : "");
@@ -1,7 +1,7 @@
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";
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
- 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";
3
+ import { getSizeConfig as x, getChartDatasFromPage as O, getValueFromVariable as S, caculateShowCondition as w, isPromise as E, setValueForVariableName as $, updateChartDatasourcesByComponent as T } from "../../../../utils/page-helper-util.js";
4
+ import { handleChartEvent as j, getCustomFunc as F } from "../../../../utils/events/event-util.js";
5
5
  import k from "./group-column.vue.js";
6
6
  import N from "./normal-column.vue.js";
7
7
  import I from "./table-pageination.vue.js";
@@ -9,10 +9,10 @@ import { getSummaryTitleColumn as R, getSummaryDataColumn as H, rowDataToColumn
9
9
  import { deepCopy as B } from "../../../../utils/common-util.js";
10
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 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 = [];
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), ne = o(X.props.isEnableGroupHeader), te = 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(() => ne.value ? ue.value.filter((e3) => !e3.isLeaf || De(pe[e3.columnUuid])) : ie.value.filter((e3) => De(e3))), ye = o(0);
13
+ let Ce = [];
14
14
  if (!Q.configure.props.modelCustom) {
15
- if (te.value) {
15
+ if (ne.value) {
16
16
  const e3 = [];
17
17
  Q.configure.props.groupHeaders.forEach((o2) => {
18
18
  o2.parentUuid || e3.push(o2);
@@ -32,42 +32,42 @@ const M = e({ __name: "table-runtime", props: { configure: { type: Object, defau
32
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
- const o2 = te.value ? ue.value : ve;
36
- $(Q.pageContext, Q.configure, "beforeUpdateChart", o2, { resultData: e3 }), function(e4) {
35
+ const o2 = ne.value ? ue.value : ve;
36
+ j(Q.pageContext, Q.configure, "beforeUpdateChart", o2, { resultData: e3 }), function(e4) {
37
37
  var _a2;
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) {
38
+ Je(e4), "service" === Q.configure.props.dataOrigin.dataSource && e4.result ? Ce = e4.result[Q.configure.props.dataOrigin.service.serviceDataField] : "variable" === Q.configure.props.dataOrigin.dataSource && (Ce = S(Q.pageContext.entity, Q.configure.props.dataOrigin.variable));
39
+ if (Ce) if (((_a2 = Q.configure.props) == null ? void 0 : _a2.dataOrigin.limitEnable) && Q.configure.props.dataOrigin.itemNumSource) {
40
40
  let o3 = 10;
41
41
  if ("fix" === Q.configure.props.dataOrigin.itemNumSource) o3 = Q.configure.props.dataOrigin.itemNumFix;
42
42
  else if ("variable" === Q.configure.props.dataOrigin.itemNumSource) {
43
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) => {
44
+ const r2 = Q.configure.props.dataOrigin.itemNumVariable.match(/\${(.*?)}/), n2 = r2 ? r2[1].split(".") : [], i2 = JSON.parse(JSON.stringify(Ce));
45
+ t(() => n2.reduce((e5, o4) => e5[o4], Q.pageContext.entity), (o4) => {
46
46
  Se(o4, i2, e4);
47
47
  });
48
48
  }
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 });
49
+ Se(o3, Ce, e4);
50
+ } else we(Ce, e4);
51
+ }(e3), e3.hasRender = true, ee && (ee.autoRefresh = false), j(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
- let t2 = [];
57
- if (((_a2 = Q.configure.props.dataOrigin.limitCountColumns) == null ? void 0 : _a2.length) > 0) t2 = Q.configure.props.dataOrigin.limitCountColumns;
56
+ let n2 = [];
57
+ if (((_a2 = Q.configure.props.dataOrigin.limitCountColumns) == null ? void 0 : _a2.length) > 0) n2 = Q.configure.props.dataOrigin.limitCountColumns;
58
58
  else {
59
59
  ie.value.filter((e4) => "number" === e4.props.base.dataType).forEach((e4) => {
60
- t2.push(e4.props.base.prop);
60
+ n2.push(e4.props.base.prop);
61
61
  });
62
62
  }
63
- if ((t2 == null ? void 0 : t2.length) > 0) {
64
- const r3 = o2.slice(e3 - 1, o2.length), n2 = {};
63
+ if ((n2 == null ? void 0 : n2.length) > 0) {
64
+ const r3 = o2.slice(e3 - 1, o2.length), t2 = {};
65
65
  let i2 = ie.value[0].props.base.prop;
66
66
  "$index" === i2 && (i2 = ie.value[1].props.base.prop), r3.forEach((e4) => {
67
- t2.forEach((o3) => {
68
- void 0 === n2[o3] && (n2[o3] = 0), n2[o3] = n2[o3] + e4[o3];
67
+ n2.forEach((o3) => {
68
+ void 0 === t2[o3] && (t2[o3] = 0), t2[o3] = t2[o3] + e4[o3];
69
69
  });
70
- }), o2.length > e3 && (o2 = o2.slice(0, e3 - 1)), n2[i2] = Q.configure.props.dataOrigin.overItemAlias, o2.push(n2);
70
+ }), o2.length > e3 && (o2 = o2.slice(0, e3 - 1)), t2[i2] = Q.configure.props.dataOrigin.overItemAlias, o2.push(t2);
71
71
  }
72
72
  we(o2, r2);
73
73
  } else we(o2, r2);
@@ -75,34 +75,34 @@ const M = 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(Q.configure.items)), e3 = D(e3, Q.configure, ae.value), !te.value) {
78
+ if (ae.value = JSON.parse(JSON.stringify(Q.configure.items)), e3 = D(e3, Q.configure, ae.value), !ne.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
+ const n2 = Q.configure.props.dataOrigin.rowToColumn.titleColumns, t2 = Q.configure.props.dataOrigin.rowToColumn.dataColumns, i2 = e4.props.dataOrigin.groupField;
82
82
  if ((!i2 || 0 === i2.length) && r2.length > 0) {
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) => {
83
+ const o5 = [], n3 = _("$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) && (n3.props.base.minWidth = e4.props.dataOrigin.rowToColumn.minTitleColumnWidth), o5.push(n3), Object.keys(r2[0]).forEach((r3, n4) => {
85
85
  var _a4, _b3, _c2, _d2, _e2, _f2;
86
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);
87
+ const t3 = _(r3, r3, n4 + 1, "string");
88
+ ((_b3 = (_a4 = e4.props.dataOrigin) == null ? void 0 : _a4.rowToColumn) == null ? void 0 : _b3.minDataColumnWidth) && (t3.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[t3.props.base.prop] = { cellStyle: (_f2 = (_e2 = e4.props.dataOrigin) == null ? void 0 : _e2.rowToColumn) == null ? void 0 : _f2.cellStyle }), o5.push(t3);
89
89
  }), o5;
90
90
  }
91
91
  {
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();
92
+ 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();
93
93
  return r2.forEach((e6) => {
94
94
  Object.keys(e6).forEach((e7) => {
95
- if (n2.some((o5) => e7.includes(o5))) {
95
+ if (t2.some((o5) => e7.includes(o5))) {
96
96
  const o5 = e7.split(i3)[0];
97
97
  a2.add(o5);
98
98
  }
99
99
  });
100
100
  }), a2.forEach((o5) => {
101
- n2.forEach((t3) => {
101
+ t2.forEach((n3) => {
102
102
  var _a4;
103
- let n3 = (_a4 = ie.value.find((e6) => e6.props.base.prop === t3)) == null ? void 0 : _a4.props.base.name;
104
- null == n3 && (n3 = "");
105
- const i4 = _(`${o5}${t3}`, `${o5}${n3}`, e5.length + 1, "number" == typeof r2[0][`${o5}${t3}`] ? "number" : "string");
103
+ let t3 = (_a4 = ie.value.find((e6) => e6.props.base.prop === n3)) == null ? void 0 : _a4.props.base.name;
104
+ null == t3 && (t3 = "");
105
+ const i4 = _(`${o5}${n3}`, `${o5}${t3}`, e5.length + 1, "number" == typeof r2[0][`${o5}${n3}`] ? "number" : "string");
106
106
  e5.push(i4);
107
107
  });
108
108
  }), e5;
@@ -110,7 +110,7 @@ const M = e({ __name: "table-runtime", props: { configure: { type: Object, defau
110
110
  }(Q.configure, ae.value, e3);
111
111
  ie.value = o3;
112
112
  }
113
- } else Ee("columnToRow") && (te.value || (ie.value = J(Q.configure)), e3 = U(e3, Q.configure));
113
+ } else Ee("columnToRow") && (ne.value || (ie.value = J(Q.configure)), e3 = U(e3, Q.configure));
114
114
  if ((_b = (_a2 = Q.configure.props) == null ? void 0 : _a2.dataOrigin) == null ? void 0 : _b.dataFormatting) {
115
115
  const o3 = F(Q.pageContext, Q.configure.props.dataOrigin.dataFormatting);
116
116
  if (o3) {
@@ -119,13 +119,13 @@ const M = e({ __name: "table-runtime", props: { configure: { type: Object, defau
119
119
  }
120
120
  }
121
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) {
122
+ "frontend" === Q.configure.pageination.type ? (ye.value = Ce.length, Re(1, Q.configure.pageination.pageSize)) : "backend" === Q.configure.pageination.type && (te.value = Ce, Q.configure.pageination.totalFrom && (ye.value = e4.result[Q.configure.pageination.totalFrom]));
123
+ }(o2) : te.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
124
  const e4 = Q.configure.props.highOrder.groupField;
125
- ne.value = function(e5, o3) {
125
+ te.value = function(e5, o3) {
126
126
  var _a3, _b2;
127
127
  if (0 === ge.value.length) return e5;
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 = {};
128
+ 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 = {};
129
129
  e5.forEach((e6) => {
130
130
  const r3 = o3.map((o4) => e6[o4]).join("|");
131
131
  i2[r3] || (i2[r3] = []), i2[r3].push(e6);
@@ -133,16 +133,16 @@ const M = e({ __name: "table-runtime", props: { configure: { type: Object, defau
133
133
  const a2 = Object.values(i2);
134
134
  for (let e6 = 0; e6 < a2.length; e6++) {
135
135
  const o4 = a2[e6], i3 = {};
136
- n2 == null ? void 0 : n2.forEach((e7) => {
137
- const r3 = e7.props.base.prop, t3 = z(ge.value[r3], o4, r3, Q.pageContext);
138
- i3[r3] = t3;
139
- }), r2.push(...o4), t2 == null ? void 0 : t2.forEach((e7) => {
136
+ t2 == null ? void 0 : t2.forEach((e7) => {
137
+ const r3 = e7.props.base.prop, n3 = z(ge.value[r3], o4, r3, Q.pageContext, ve.value);
138
+ i3[r3] = n3;
139
+ }), r2.push(...o4), n2 == null ? void 0 : n2.forEach((e7) => {
140
140
  const r3 = e7.props.base.prop;
141
141
  i3[r3] = A(e7.props.base.summaryTitle, o4[0]);
142
142
  }), r2.push(i3), fe.push(r2.length - 1);
143
143
  }
144
144
  return r2;
145
- }(ne.value, e4);
145
+ }(te.value, e4);
146
146
  }
147
147
  !function(e4) {
148
148
  if (Q.configure.props.base.showIndex && -1 === e4.findIndex((e5) => "$index" === e5.props.base.prop)) {
@@ -154,25 +154,25 @@ const M = e({ __name: "table-runtime", props: { configure: { type: Object, defau
154
154
  function Ee(e3) {
155
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;
156
156
  }
157
- function Te(e3) {
157
+ function $e(e3) {
158
158
  const o2 = me.value[e3.column.property] ? me.value[e3.column.property].titleStyle : null, r2 = Y == null ? void 0 : Y.titleStyle;
159
159
  return V(e3, { cellTitleStyle: o2, titleStyle: r2 }, Q);
160
160
  }
161
- function je(e3) {
161
+ function Te(e3) {
162
162
  return G(e3, fe, Q);
163
163
  }
164
- function $e(e3) {
164
+ function je(e3) {
165
165
  const o2 = me.value[e3.column.property] ? me.value[e3.column.property].cellStyle : null;
166
166
  return K(e3, o2, Q);
167
167
  }
168
- xe && xe.fixHeight && (be = xe.fixHeight), xe && xe.maxHeight && (be = xe.maxHeight), be && (be = Number(be + "")), t(() => {
168
+ xe && xe.fixHeight && (be = xe.fixHeight), xe && xe.maxHeight && (be = xe.maxHeight), be && (be = Number(be + "")), n(() => {
169
169
  const e3 = O(Q.pageContext, Q.configure);
170
170
  if (e3) Oe(e3);
171
171
  else if ("variable" === Q.configure.props.dataOrigin.dataSource) {
172
172
  !function() {
173
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
+ t(() => o3.reduce((e5, o4) => e5[o4], Q.pageContext.entity), (e5) => {
175
+ e5 ? Oe(JSON.parse(JSON.stringify(e5))) : (te.value = [], Q.configure.props.modelCustom ? Je(null) : ne.value ? ue.value = Q.configure.props.groupHeaders : ie.value = Q.configure.items);
176
176
  });
177
177
  }();
178
178
  const o2 = S(Q.pageContext.entity, Q.configure.props.dataOrigin.variable);
@@ -180,26 +180,28 @@ const M = e({ __name: "table-runtime", props: { configure: { type: Object, defau
180
180
  }
181
181
  });
182
182
  const Fe = (e3) => {
183
- const { columns: o2, data: r2 } = e3, t2 = [];
183
+ const { columns: o2, data: r2 } = e3, n2 = [];
184
184
  return o2.forEach((e4, o3) => {
185
- if (se.value[e4.property]) {
186
- const n2 = se.value[e4.property].label;
187
- t2[o3] = y("div", {}, [A(n2, r2)]);
185
+ if (se.value[e4.property] || "index" === e4.type && se.value.$index) {
186
+ let t2 = e4.property;
187
+ "index" === e4.type && (t2 = "$index");
188
+ const i2 = se.value[t2].label;
189
+ n2[o3] = C("div", {}, [A(i2, r2)]);
188
190
  } else if (ce.value[e4.property]) {
189
- const n2 = r2.filter((e5, o4) => !fe.includes(o4));
190
- t2[o3] = z(ce.value[e4.property], n2, e4.property, Q.pageContext);
191
+ const t2 = r2.filter((e5, o4) => !fe.includes(o4));
192
+ n2[o3] = z(ce.value[e4.property], t2, e4.property, Q.pageContext, ve.value);
191
193
  }
192
- }), t2;
194
+ }), n2;
193
195
  };
194
- function ke({ row: e3, column: o2, rowIndex: r2, columnIndex: t2 }) {
195
- const n2 = o2.property, i2 = Q.configure.props.highOrder;
196
+ function ke({ row: e3, column: o2, rowIndex: r2, columnIndex: n2 }) {
197
+ const t2 = o2.property, i2 = Q.configure.props.highOrder;
196
198
  if (i2.scopeFunc) {
197
- const n3 = F(Q.pageContext, i2.scopeFunc);
198
- if (n3) {
199
- const i3 = n3.apply(n3, [{ tableData: ne.value, row: e3, column: o2, rowIndex: r2, columnIndex: t2 }]);
199
+ const t3 = F(Q.pageContext, i2.scopeFunc);
200
+ if (t3) {
201
+ const i3 = t3.apply(t3, [{ tableData: te.value, row: e3, column: o2, rowIndex: r2, columnIndex: n2 }]);
200
202
  if (i3) return i3;
201
203
  }
202
- } else if (i2 && i2.mergeColumn, i2 && i2.mergeRow && i2.mergeRow.includes(n2)) return L(e3, o2, r2, n2, ne.value);
204
+ } else if (i2 && i2.mergeColumn, i2 && i2.mergeRow && i2.mergeRow.includes(t2)) return L(e3, o2, r2, t2, te.value);
203
205
  }
204
206
  function Ne(e3, o2) {
205
207
  "frontend" === Q.configure.pageination.type ? Re(e3, o2) : He(e3, o2);
@@ -208,10 +210,10 @@ const M = e({ __name: "table-runtime", props: { configure: { type: Object, defau
208
210
  "frontend" === Q.configure.pageination.type ? Re(e3, o2) : He(e3, o2);
209
211
  }
210
212
  function Re(e3, o2) {
211
- ye && (ne.value = ye.slice((e3 - 1) * o2, e3 * o2));
213
+ Ce && (te.value = Ce.slice((e3 - 1) * o2, e3 * o2));
212
214
  }
213
215
  function He(e3, o2) {
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);
216
+ Q.configure.pageination.currentPageSet && $(Q.pageContext.entity, Q.configure.pageination.currentPageSet, e3), Q.configure.pageination.pageSizeSet && $(Q.pageContext.entity, Q.configure.pageination.pageSizeSet, o2), T(Q.pageContext, Q.configure.uuid);
215
217
  }
216
218
  function De(e3) {
217
219
  const o2 = e3.showCondition;
@@ -230,19 +232,19 @@ const M = e({ __name: "table-runtime", props: { configure: { type: Object, defau
230
232
  }
231
233
  function Ue(e3, o2, r2) {
232
234
  e3.forEach((e4) => {
233
- const t2 = e4.props.base.prop, n2 = e4.props.base.name;
234
- let i2 = { name: t2, label: n2, i18nKey: n2 };
235
+ const n2 = e4.props.base.prop, t2 = e4.props.base.name;
236
+ let i2 = { name: n2, label: t2, i18nKey: t2 };
235
237
  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);
236
238
  });
237
239
  }
238
240
  return M2({ updateChartDatas: Oe, exportChart: function() {
239
241
  let e3 = [], o2 = [];
240
- o2 = te.value ? Q.configure.props.groupHeaders : ve.value;
242
+ o2 = ne.value ? Q.configure.props.groupHeaders : ve.value;
241
243
  let r2 = [];
242
244
  Ue(o2, e3, r2);
243
245
  return { isTable: true, dataArr: function(e4) {
244
246
  let o3 = [];
245
- ne.value && (o3 = B(ne.value), o3.forEach((o4) => {
247
+ te.value && (o3 = B(te.value), o3.forEach((o4) => {
246
248
  e4.forEach((e5) => {
247
249
  const r3 = q(o4, e5.props.format, e5, Q.pageContext, Q.configure);
248
250
  o4[e5.props.base.prop] = r3;
@@ -251,8 +253,8 @@ const M = e({ __name: "table-runtime", props: { configure: { type: Object, defau
251
253
  return o3;
252
254
  }(r2), columns: e3, title: oe == null ? void 0 : oe.title };
253
255
  } }), (o2, r2) => {
254
- const t2 = i("el-table");
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);
256
+ const n2 = i("el-table");
257
+ 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(n2, { ref_key: "gridRef", ref: he, data: te.value, style: { width: "100%" }, "max-height": s(be), "header-cell-style": $e, "row-style": Te, "cell-style": je, border: true, "show-summary": le.value, stripe: e2.configure.props.base.stripe, "summary-method": Fe, "span-method": ke }, { default: h(() => [ne.value ? (u(true), a(v, { key: 0 }, y(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 }, y(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": te.value, total: ye.value, onPageChange: Ne, onPageSizeChange: Ie }, null, 8, ["configure", "table-data", "total"])) : m("", true)], 6);
256
258
  };
257
259
  } });
258
260
  export {