super-page-runtime 2.2.83 → 2.2.89

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.
Files changed (69) hide show
  1. package/dist/es/components/runtime/utils/api/page-expose-util.js +56 -56
  2. package/dist/es/components/runtime/utils/barcode-util.js +5 -5
  3. package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +74 -74
  4. package/dist/es/components/runtime/utils/charts/chart-pie-util.js +45 -46
  5. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +14 -16
  6. package/dist/es/components/runtime/utils/charts/chart-util.d.ts +1 -1
  7. package/dist/es/components/runtime/utils/charts/chart-util.js +7 -9
  8. package/dist/es/components/runtime/utils/events/event-util.js +113 -113
  9. package/dist/es/components/runtime/utils/events/print-label.js +37 -38
  10. package/dist/es/components/runtime/utils/events/standard-event.js +508 -524
  11. package/dist/es/components/runtime/utils/events/validator-util.js +72 -62
  12. package/dist/es/components/runtime/utils/form/scan-util.js +3 -4
  13. package/dist/es/components/runtime/utils/page-helper-util.js +210 -210
  14. package/dist/es/components/runtime/utils/page-init-util.js +47 -50
  15. package/dist/es/components/runtime/utils/page-permission-util.js +16 -16
  16. package/dist/es/components/runtime/utils/page-store.js +1 -1
  17. package/dist/es/components/runtime/utils/table-utils.js +23 -23
  18. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +16 -13
  19. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +4 -1
  20. package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +15 -11
  21. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +12 -16
  22. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +6 -10
  23. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +9 -11
  24. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +1 -1
  25. package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +1 -1
  26. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +12 -13
  27. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +13 -14
  28. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +14 -15
  29. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +16 -17
  30. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +131 -122
  31. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +90 -57
  32. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +22 -26
  33. package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +4 -4
  34. package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +1 -1
  35. package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +2 -2
  36. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +1 -1
  37. package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +6 -6
  38. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue.js +1 -1
  39. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +39 -36
  40. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +1 -1
  41. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +11 -8
  42. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +1 -1
  43. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +10 -12
  44. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +92 -94
  45. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +123 -124
  46. package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +16 -14
  47. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +1 -1
  48. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +80 -77
  49. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +0 -1
  50. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +34 -29
  51. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +39 -41
  52. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +22 -22
  53. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +50 -51
  54. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +6 -8
  55. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +9 -10
  56. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +0 -1
  57. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +0 -1
  58. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +8 -8
  59. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +5 -4
  60. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +4 -1
  61. package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +7 -7
  62. package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
  63. package/dist/es/components/runtime/views/super-page-dialog.vue.js +9 -10
  64. package/dist/es/components/runtime/views/{super-page-dialog.vue2.js → super-page-dialog.vue3.js} +1 -0
  65. package/dist/es/components/runtime/views/super-page.vue.js +1 -1
  66. package/dist/es/components/runtime/views/super-page.vue2.js +126 -126
  67. package/dist/es/index.js +1 -0
  68. package/dist/es/style.css +234 -99
  69. package/package.json +2 -2
@@ -2,20 +2,20 @@ import { getParamNames, getValueFromVariable } from "../../../../utils/page-help
2
2
  import { getCustomFunc } from "../../../../utils/events/event-util.js";
3
3
  import { getMinValue, getMaxValue, getSumValue, getAvgValue } from "../../../../utils/charts/chart-util.js";
4
4
  class ExpressionEvaluator {
5
- static evaluate(e, t, o) {
6
- const r = t.map((t2) => this.createExpression(e, t2, o)).join(" ");
7
- return this.evaluateExpression(r);
5
+ static evaluate(e, t, r) {
6
+ const o = t.map((t2) => this.createExpression(e, t2, r)).join(" ");
7
+ return this.evaluateExpression(o);
8
8
  }
9
- static createExpression(e, t, o) {
10
- const { propName: r, operator: a, propValue: n, leftBracket: s, rightBracket: l, joinSign: i, dataType: c } = t;
11
- if (!r || "" === r) return "";
12
- const u = getValueFromVariable(e.entity, r, o);
13
- let p = `${s} ${this.getComparisonExpression(u, a, getValueFromVariable(e.entity, n, o), c)} ${l}`;
9
+ static createExpression(e, t, r) {
10
+ const { propName: o, operator: a, propValue: n, leftBracket: s, rightBracket: l, joinSign: i, dataType: c } = t;
11
+ if (!o || "" === o) return "";
12
+ const u = getValueFromVariable(e.entity, o, r);
13
+ let p = `${s} ${this.getComparisonExpression(u, a, getValueFromVariable(e.entity, n, r), c)} ${l}`;
14
14
  return i && ("and" === i || "AND" === i ? p += "&&" : "or" !== i && "OR" !== i || (p += "||")), p.trim();
15
15
  }
16
- static getComparisonExpression(e, t, o, r) {
16
+ static getComparisonExpression(e, t, r, o) {
17
17
  t || (t = "EQ");
18
- const a = this.parseValue(e, r), n = this.parseValue(o, r);
18
+ const a = this.parseValue(e, o), n = this.parseValue(r, o);
19
19
  switch (t) {
20
20
  case "EQ":
21
21
  return `${a} === ${n}`;
@@ -37,6 +37,8 @@ class ExpressionEvaluator {
37
37
  return `${a} === null`;
38
38
  case "IS_NOT_NULL":
39
39
  return `${a} !== null`;
40
+ case "IN":
41
+ return `[${n}].includes(${a})`;
40
42
  default:
41
43
  throw new Error(`比较符号不匹配: ${t}`);
42
44
  }
@@ -48,7 +50,7 @@ class ExpressionEvaluator {
48
50
  static parseValue(e, t) {
49
51
  switch (t = this.changeDataType(t)) {
50
52
  case "number":
51
- return Number(e);
53
+ return getNumberValue(e);
52
54
  case "date":
53
55
  return new Date(e).getTime();
54
56
  case "string":
@@ -61,10 +63,22 @@ class ExpressionEvaluator {
61
63
  try {
62
64
  return eval(expression);
63
65
  } catch (e) {
64
- return console.error("表达式错误:", expression, e), false;
66
+ return false;
65
67
  }
66
68
  }
67
69
  }
70
+ function getNumberValue(e) {
71
+ if (isNumber(e)) return Number(e);
72
+ if (e && e.indexOf(",") > 0) {
73
+ const t = e.split(","), r = [];
74
+ for (let e2 = 0; e2 < t.length; e2++) r.push(Number(t[e2]));
75
+ return r;
76
+ }
77
+ return e;
78
+ }
79
+ function isNumber(e) {
80
+ return "number" == typeof e && !isNaN(e);
81
+ }
68
82
  function getSummaryTitleColumn(e) {
69
83
  var _a;
70
84
  const t = {};
@@ -74,23 +88,22 @@ function getSummaryTitleColumn(e) {
74
88
  }
75
89
  function getSummaryDataColumn(e, t) {
76
90
  var _a;
77
- const o = {};
78
- return ((_a = e.props.summaries) == null ? void 0 : _a.dataColumn) && e.props.summaries.dataColumn.length > 0 && e.props.summaries.dataColumn.forEach((r) => {
91
+ const r = {};
92
+ return ((_a = e.props.summaries) == null ? void 0 : _a.dataColumn) && e.props.summaries.dataColumn.length > 0 && e.props.summaries.dataColumn.forEach((o) => {
79
93
  var _a2;
80
- const a = (_a2 = e.items) == null ? void 0 : _a2.find((e2) => r.prop === e2.props.base.prop);
81
- a && ("table" === t && a.props.base.tableSummary || "group" === t && a.props.base.groupSummary) && (o[r.prop] = r);
82
- }), o;
94
+ const a = (_a2 = e.items) == null ? void 0 : _a2.find((e2) => o.prop === e2.props.base.prop);
95
+ a && ("table" === t && a.props.base.tableSummary || "group" === t && a.props.base.groupSummary) && (r[o.prop] = o);
96
+ }), r;
83
97
  }
84
- function summaryStatistics(e, t, o, r) {
98
+ function summaryStatistics(e, t, r, o) {
85
99
  let a = "";
86
- const n = e.summaryMode, s = t.map((e2) => Number(e2[o])).filter((e2) => !Number.isNaN(e2));
100
+ const n = e.summaryMode, s = t.map((e2) => Number(e2[r])).filter((e2) => !Number.isNaN(e2));
87
101
  if (s.length > 0) if ("custom" === n) {
88
- const n2 = getCustomFunc(r, e.customFunc);
102
+ const n2 = getCustomFunc(o, e.customFunc);
89
103
  if (n2) try {
90
- const e2 = n2.apply(n2, [{ data: t, prop: o }]);
104
+ const e2 = n2.apply(n2, [{ data: t, prop: r }]);
91
105
  a = e2 ? ` ${e2}` : " N/A";
92
106
  } catch (e2) {
93
- console.error("自定义函数脚本错误:", t, e2);
94
107
  }
95
108
  else a = " N/A";
96
109
  } else switch (n) {
@@ -113,67 +126,64 @@ function summaryStatistics(e, t, o, r) {
113
126
  return a;
114
127
  }
115
128
  function replacePlaceholders(e, t) {
116
- if (e) return e.replace(/\$\{row\.(\w+)\}/g, (e2, o) => Object.prototype.hasOwnProperty.call(t, o) ? t[o] : "");
129
+ if (e) return e.replace(/\$\{row\.(\w+)\}/g, (e2, r) => Object.prototype.hasOwnProperty.call(t, r) ? t[r] : "");
117
130
  }
118
- function getHeaderCellStyleUtil(e, t, o) {
131
+ function getHeaderCellStyleUtil(e, t, r) {
119
132
  var _a;
120
- const r = {};
133
+ const o = {};
121
134
  e.column.property && ((_a = t.titleStyle) == null ? void 0 : _a.forEach((t2) => {
122
135
  if (t2.field && t2.field.includes(e.column.property)) if (t2.scopeFunc) {
123
- const a2 = getCustomFunc(o.pageContext, t2.scopeFunc);
136
+ const a2 = getCustomFunc(r.pageContext, t2.scopeFunc);
124
137
  if (a2) try {
125
- false !== a2.apply(a2, [{ item: t2, data: e }]) && copyStyle(r, t2);
126
- } catch (o2) {
127
- console.error("自定义函数脚本错误:", t2, e, o2);
138
+ false !== a2.apply(a2, [{ item: t2, data: e }]) && copyStyle(o, t2);
139
+ } catch (e2) {
128
140
  }
129
- } else copyStyle(r, t2);
141
+ } else copyStyle(o, t2);
130
142
  }));
131
- const a = getCellStyleUtil(e, t.cellTitleStyle, o);
132
- return a && Object.assign(r, a), r;
143
+ const a = getCellStyleUtil(e, t.cellTitleStyle, r);
144
+ return a && Object.assign(o, a), o;
133
145
  }
134
- function getRowStyleUtil(e, t, o) {
135
- const r = {};
136
- if (o.configure.style.rowStyle) for (let t2 = 0; t2 < o.configure.style.rowStyle.length; t2++) {
137
- const a = o.configure.style.rowStyle[t2];
146
+ function getRowStyleUtil(e, t, r) {
147
+ const o = {};
148
+ if (r.configure.style.rowStyle) for (let t2 = 0; t2 < r.configure.style.rowStyle.length; t2++) {
149
+ const a = r.configure.style.rowStyle[t2];
138
150
  if (a.scopeFunc) {
139
- const t3 = getCustomFunc(o.pageContext, a.scopeFunc);
151
+ const t3 = getCustomFunc(r.pageContext, a.scopeFunc);
140
152
  if (t3) try {
141
- const o2 = t3.apply(t3, [{ data: e }]);
142
- null != o2 && false !== o2 && copyStyle(r, a);
143
- } catch (t4) {
144
- console.error("自定义函数脚本错误:", e, t4);
153
+ const r2 = t3.apply(t3, [{ data: e }]);
154
+ null != r2 && false !== r2 && copyStyle(o, a);
155
+ } catch (e2) {
145
156
  }
146
157
  } else if (a.matchingCondition) {
147
- const t3 = ExpressionEvaluator.evaluate(o.pageContext, a.matchingCondition, e.row);
148
- (t3 || void 0 === t3) && copyStyle(r, a);
149
- } else copyStyle(r, a);
158
+ const t3 = ExpressionEvaluator.evaluate(r.pageContext, a.matchingCondition, e.row);
159
+ (t3 || void 0 === t3) && copyStyle(o, a);
160
+ } else copyStyle(o, a);
150
161
  }
151
162
  if (t && t.length > 0 && -1 !== t.indexOf(e.rowIndex)) {
152
163
  const e2 = {};
153
- if (o.configure.style.collectStyle && o.configure.style.collectStyle.length > 0) for (let t2 = 0; t2 < o.configure.style.collectStyle.length; t2++) {
154
- copyStyle(e2, o.configure.style.collectStyle[t2]);
164
+ if (r.configure.style.collectStyle && r.configure.style.collectStyle.length > 0) for (let t2 = 0; t2 < r.configure.style.collectStyle.length; t2++) {
165
+ copyStyle(e2, r.configure.style.collectStyle[t2]);
155
166
  }
156
167
  return 0 === Object.keys(e2).length && (e2["background-color"] = "var(--el-table-row-hover-bg-color)"), e2;
157
168
  }
158
- return r;
169
+ return o;
159
170
  }
160
- function getCellStyleUtil(e, t, o) {
161
- const r = {};
171
+ function getCellStyleUtil(e, t, r) {
172
+ const o = {};
162
173
  if (t) for (let a = 0; a < t.length; a++) {
163
174
  const n = t[a];
164
175
  if (isSetStyle(n)) if (n.scopeFunc) {
165
- const t2 = getCustomFunc(o.pageContext, n.scopeFunc);
176
+ const t2 = getCustomFunc(r.pageContext, n.scopeFunc);
166
177
  if (t2) try {
167
- false !== t2.apply(t2, [{ data: e }]) && copyStyle(r, n);
168
- } catch (t3) {
169
- console.error("自定义函数脚本错误:", e, t3);
178
+ false !== t2.apply(t2, [{ data: e }]) && copyStyle(o, n);
179
+ } catch (e2) {
170
180
  }
171
181
  } else if (n.matchingCondition) {
172
- const t2 = ExpressionEvaluator.evaluate(o.pageContext, n.matchingCondition, e.row);
173
- (t2 || void 0 === t2) && copyStyle(r, n);
174
- } else copyStyle(r, n);
182
+ const t2 = ExpressionEvaluator.evaluate(r.pageContext, n.matchingCondition, e.row);
183
+ (t2 || void 0 === t2) && copyStyle(o, n);
184
+ } else copyStyle(o, n);
175
185
  }
176
- return r;
186
+ return o;
177
187
  }
178
188
  function isSetStyle(e) {
179
189
  let t;
@@ -182,96 +192,96 @@ function isSetStyle(e) {
182
192
  function copyStyle(e, t) {
183
193
  Object.assign(e, t.style), t.customStyle && Object.assign(e, JSON.parse(t.customStyle));
184
194
  }
185
- function rowDataToColumn(e, t, o) {
186
- const r = t.props.dataOrigin.groupField, a = t.props.dataOrigin.rowToColumn.titleColumns, n = t.props.dataOrigin.rowToColumn.dataColumns, s = [], l = {};
187
- if (r && r.length > 0) e.forEach((e2) => {
188
- const t2 = r.map((t3) => e2[t3]).join("|");
195
+ function rowDataToColumn(e, t, r) {
196
+ const o = t.props.dataOrigin.groupField, a = t.props.dataOrigin.rowToColumn.titleColumns, n = t.props.dataOrigin.rowToColumn.dataColumns, s = [], l = {};
197
+ if (o && o.length > 0) e.forEach((e2) => {
198
+ const t2 = o.map((t3) => e2[t3]).join("|");
189
199
  if (!l[t2]) {
190
- const o2 = {};
191
- r.forEach((t3) => o2[t3] = e2[t3]), l[t2] = o2, s.push(o2);
200
+ const r2 = {};
201
+ o.forEach((t3) => r2[t3] = e2[t3]), l[t2] = r2, s.push(r2);
192
202
  }
193
- n.forEach((o2) => {
194
- const r2 = `${a.map((t3) => e2[t3]).join("")}${o2}`;
195
- l[t2][r2] = e2[o2];
203
+ n.forEach((r2) => {
204
+ const o2 = `${a.map((t3) => e2[t3]).join("")}${r2}`;
205
+ l[t2][o2] = e2[r2];
196
206
  });
197
207
  });
198
208
  else {
199
209
  const t2 = [];
200
210
  e.forEach((e2) => {
201
- a.forEach((o2) => {
202
- e2[o2] && t2.push(e2[o2]);
211
+ a.forEach((r2) => {
212
+ e2[r2] && t2.push(e2[r2]);
203
213
  });
204
214
  }), n.forEach((t3) => {
205
- const r2 = {}, n2 = o.find((e2) => {
215
+ const o2 = {}, n2 = r.find((e2) => {
206
216
  var _a, _b;
207
217
  return ((_b = (_a = e2.props) == null ? void 0 : _a.base) == null ? void 0 : _b.prop) === t3;
208
218
  });
209
- n2 && (r2.$GroupColumn = n2.props.base.name), e.forEach((e2) => {
210
- a.forEach((o2) => {
211
- const a2 = e2[o2], n3 = e2[t3];
212
- r2[a2] = n3;
219
+ n2 && (o2.$GroupColumn = n2.props.base.name), e.forEach((e2) => {
220
+ a.forEach((r2) => {
221
+ const a2 = e2[r2], n3 = e2[t3];
222
+ o2[a2] = n3;
213
223
  });
214
- }), s.push(r2);
224
+ }), s.push(o2);
215
225
  });
216
226
  }
217
227
  return s;
218
228
  }
219
229
  function colDataToRow(e, t) {
220
- const o = t.props.dataOrigin.groupField, r = t.props.dataOrigin.columnToRow.titleColumns, a = t.props.dataOrigin.columnToRow.dataColumns, n = t.props.dataOrigin.columnToRow.transColumns, s = t.props.dataOrigin.columnToRow.dataColumnsMapping;
230
+ const r = t.props.dataOrigin.groupField, o = t.props.dataOrigin.columnToRow.titleColumns, a = t.props.dataOrigin.columnToRow.dataColumns, n = t.props.dataOrigin.columnToRow.transColumns, s = t.props.dataOrigin.columnToRow.dataColumnsMapping;
221
231
  if (0 === e.length) return e;
222
- const l = [], i = groupBy(e, o), c = a.reduce((e2, t2) => t2.columns.length > e2.columns.length ? t2 : e2, a[0]), u = a.reduce((e2, t2) => (t2.columns.forEach((o2) => {
223
- e2[o2] = t2.prop;
232
+ const l = [], i = groupBy(e, r), c = a.reduce((e2, t2) => t2.columns.length > e2.columns.length ? t2 : e2, a[0]), u = a.reduce((e2, t2) => (t2.columns.forEach((r2) => {
233
+ e2[r2] = t2.prop;
224
234
  }), e2), {});
225
235
  return i.forEach((e2) => {
226
236
  c.columns.forEach((t2) => {
227
237
  const i2 = c.prop, p = {};
228
- if (o.forEach((t3) => {
238
+ if (r.forEach((t3) => {
229
239
  p[t3] = e2[t3];
230
240
  }), p[i2] = e2[t2], a.length > 1) {
231
- const o2 = s.find((e3) => e3.props.includes(t2));
232
- o2 && o2.props.length > 1 && o2.props.forEach((o3) => {
233
- o3 !== t2 && u[o3] && (p[u[o3]] = e2[o3]);
241
+ const r2 = s.find((e3) => e3.props.includes(t2));
242
+ r2 && r2.props.length > 1 && r2.props.forEach((r3) => {
243
+ r3 !== t2 && u[r3] && (p[u[r3]] = e2[r3]);
234
244
  });
235
245
  }
236
- r.forEach((e3) => {
237
- const o2 = n.filter((t3) => t3.relatedTitle === e3.prop);
238
- let r2 = false;
239
- o2 && o2.length > 0 && o2.forEach((o3) => {
240
- if (o3.columns.includes(t2)) return p[e3.prop] = o3.label, void (r2 = true);
241
- }), r2 || (p[e3.prop] = t2);
246
+ o.forEach((e3) => {
247
+ const r2 = n.filter((t3) => t3.relatedTitle === e3.prop);
248
+ let o2 = false;
249
+ r2 && r2.length > 0 && r2.forEach((r3) => {
250
+ if (r3.columns.includes(t2)) return p[e3.prop] = r3.label, void (o2 = true);
251
+ }), o2 || (p[e3.prop] = t2);
242
252
  }), l.push(p);
243
253
  });
244
254
  }), l;
245
255
  }
246
256
  function getColumnToRowTableConfig(e) {
247
- const t = e.items, o = e.props.dataOrigin.groupField, r = e.props.dataOrigin.columnToRow.titleColumns, a = e.props.dataOrigin.columnToRow.dataColumns, n = [];
248
- o && o.length > 0 && o.forEach((e2) => {
257
+ const t = e.items, r = e.props.dataOrigin.groupField, o = e.props.dataOrigin.columnToRow.titleColumns, a = e.props.dataOrigin.columnToRow.dataColumns, n = [];
258
+ r && r.length > 0 && r.forEach((e2) => {
249
259
  if (t) {
250
- const o2 = t.find((t2) => t2.props.base.prop === e2);
251
- o2 && n.push(o2);
260
+ const r2 = t.find((t2) => t2.props.base.prop === e2);
261
+ r2 && n.push(r2);
252
262
  }
253
263
  });
254
- return [...r, ...a].forEach((e2) => {
264
+ return [...o, ...a].forEach((e2) => {
255
265
  if (t) {
256
- const o2 = t.find((t2) => t2.props.base.prop === e2);
257
- o2 ? n.push(o2) : n.push({ uuid: (/* @__PURE__ */ new Date()).getTime(), name: "", props: { base: { prop: e2.prop, name: e2.title, sortable: true, headerAlign: "center", align: "center", fixed: false, visible: true, dataType: "string" }, format: {}, size: { pc: {} } }, style: {}, componentIndex: 0, runtime: { common: { class: "", style: { pc_style: {}, pc_class: "" } } } });
266
+ const r2 = t.find((t2) => t2.props.base.prop === e2);
267
+ r2 ? n.push(r2) : n.push({ uuid: (/* @__PURE__ */ new Date()).getTime(), name: "", props: { base: { prop: e2.prop, name: e2.title, sortable: true, headerAlign: "center", align: "center", fixed: false, visible: true, dataType: "string" }, format: {}, size: { pc: {} } }, style: {}, componentIndex: 0, runtime: { common: { class: "", style: { pc_style: {}, pc_class: "" } } } });
258
268
  }
259
269
  }), n;
260
270
  }
261
271
  function groupBy(e, t) {
262
- const o = {};
272
+ const r = {};
263
273
  return e.forEach((e2) => {
264
- const r = t.map((t2) => e2[t2]).join("|");
265
- o[r] || (o[r] = { ...e2, records: [] }, t.forEach((t2, a) => {
266
- o[r][t2] = e2[t2];
267
- })), o[r].records.push(e2);
268
- }), Object.values(o).map((e2) => ({ ...e2, records: void 0 }));
274
+ const o = t.map((t2) => e2[t2]).join("|");
275
+ r[o] || (r[o] = { ...e2, records: [] }, t.forEach((t2, a) => {
276
+ r[o][t2] = e2[t2];
277
+ })), r[o].records.push(e2);
278
+ }), Object.values(r).map((e2) => ({ ...e2, records: void 0 }));
269
279
  }
270
280
  function getIndexColumn() {
271
281
  return { props: { base: { name: "序号", prop: "$index", columnWidth: 80, sortable: true, visible: true, displayOrder: 1, alignTitle: "center", alignContent: "center" } }, events: [], style: { titleFont: {}, contentFont: {}, width: {}, background: {}, tableCell: [{ type: "", model: "" }], conentPadding: {}, tittlePadding: {}, border: {}, shadow: {}, tittleClass: "" } };
272
282
  }
273
- function getNewColumnConfig(e, t, o, r) {
274
- return { uuid: (/* @__PURE__ */ new Date()).getTime(), name: "", props: { base: { prop: e, name: t, displayOrder: o, sortable: true, headerAlign: "center", align: "center", fixed: false, visible: true, dataType: r }, format: {}, size: { pc: {} } }, style: {}, componentIndex: 0, runtime: { common: { class: "", style: { pc_style: {}, pc_class: "" } } } };
283
+ function getNewColumnConfig(e, t, r, o) {
284
+ return { uuid: (/* @__PURE__ */ new Date()).getTime(), name: "", props: { base: { prop: e, name: t, displayOrder: r, sortable: true, headerAlign: "center", align: "center", fixed: false, visible: true, dataType: o }, format: {}, size: { pc: {} } }, style: {}, componentIndex: 0, runtime: { common: { class: "", style: { pc_style: {}, pc_class: "" } } } };
275
285
  }
276
286
  function computeFormula(itemConfs, datas, entity) {
277
287
  Object.keys(itemConfs).forEach((key) => {
@@ -284,15 +294,15 @@ function computeFormula(itemConfs, datas, entity) {
284
294
  else if (e.startsWith("${avg.")) totalValueMap[e] = getAvgValue(datas, getFieldName(e));
285
295
  else if (e.startsWith("${add.")) {
286
296
  const t = getFieldName(e);
287
- let o = 0;
297
+ let r = 0;
288
298
  try {
289
- o = Number(data[t]), datas.slice(0, index).forEach((e2) => {
290
- o += Number(e2[t]);
299
+ r = Number(data[t]), datas.slice(0, index).forEach((e2) => {
300
+ r += Number(e2[t]);
291
301
  });
292
302
  } catch (e2) {
293
- console.error("计算错误:", e2), o = 0;
303
+ r = 0;
294
304
  }
295
- totalValueMap[e] = o;
305
+ totalValueMap[e] = r;
296
306
  } else (e.startsWith("${page.") || e.startsWith("${data.") || e.startsWith("${row.") || e.startsWith("${request.") || e.startsWith("${context.") || e.startsWith("${system.") || e.startsWith("${fixed.")) && (totalValueMap[e] = getValueFromVariable(entity, e, data));
297
307
  let expr = itemConfs[key];
298
308
  Object.keys(totalValueMap).forEach((e) => {
@@ -302,7 +312,7 @@ function computeFormula(itemConfs, datas, entity) {
302
312
  try {
303
313
  data[key] = eval(expr);
304
314
  } catch (e) {
305
- console.error(itemConfs[key] + " 计算错误, 替换后表达式为:" + expr, e), data[key] = 0;
315
+ data[key] = 0;
306
316
  }
307
317
  });
308
318
  });
@@ -310,8 +320,8 @@ function computeFormula(itemConfs, datas, entity) {
310
320
  function getFieldName(e) {
311
321
  return e.substring(6, e.length - 1);
312
322
  }
313
- function formatColContent(e, t, o, r, a) {
314
- const n = e[o.props.base.prop];
323
+ function formatColContent(e, t, r, o, a) {
324
+ const n = e[r.props.base.prop];
315
325
  switch (t.type) {
316
326
  case "number":
317
327
  return formatNumber(n, t);
@@ -320,30 +330,29 @@ function formatColContent(e, t, o, r, a) {
320
330
  case "percent":
321
331
  return formatPercent(n, t);
322
332
  case "custom":
323
- return formatCustomFunc(e, t, o, r, a);
333
+ return formatCustomFunc(e, t, r, o, a);
324
334
  default:
325
335
  return n;
326
336
  }
327
337
  }
328
338
  function formatNumber(e, t) {
329
- let o = e;
330
- return o || (o = 0), t.scientific && (o = Number(e).toExponential(t.scientificNum)), t.decimalDigit && (o = Number(e).toFixed(t.decimalDigit)), t.thousandsSeparator && (o = o.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")), t.symbol && (o = `${t.symbol} ${o}`), o;
339
+ let r = e;
340
+ return r || (r = 0), t.scientific && (r = Number(e).toExponential(t.scientificNum)), t.decimalDigit && (r = Number(e).toFixed(t.decimalDigit)), t.thousandsSeparator && (r = r.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")), t.symbol && (r = `${t.symbol} ${r}`), r;
331
341
  }
332
342
  function formatCurrency(e, t) {
333
- let o = e;
334
- return o || (o = 0), t.decimalDigit && (o = Number(e).toFixed(t.decimalDigit)), t.symbol && (o = `${t.symbol} ${o}`), o;
343
+ let r = e;
344
+ return r || (r = 0), t.decimalDigit && (r = Number(e).toFixed(t.decimalDigit)), t.symbol && (r = `${t.symbol} ${r}`), r;
335
345
  }
336
346
  function formatPercent(e, t) {
337
- let o = e;
338
- return o || (o = 0), t.decimalDigit && (o = Number(e).toFixed(t.decimalDigit)), o + " %";
347
+ let r = e;
348
+ return r || (r = 0), t.decimalDigit && (r = Number(e).toFixed(t.decimalDigit)), r + " %";
339
349
  }
340
- function formatCustomFunc(e, t, o, r, a) {
341
- const n = getCustomFunc(r, t.customFunc);
350
+ function formatCustomFunc(e, t, r, o, a) {
351
+ const n = getCustomFunc(o, t.customFunc);
342
352
  if (n) {
343
353
  try {
344
- return n.apply(n, [{ pageContext: r, configureObj: a, row: e, prop: o.props.base.prop }]);
345
- } catch (t2) {
346
- console.error("自定义函数脚本错误:", e, t2);
354
+ return n.apply(n, [{ pageContext: o, configureObj: a, row: e, prop: r.props.base.prop }]);
355
+ } catch (e2) {
347
356
  }
348
357
  return "";
349
358
  }