super-page-runtime 2.2.86 → 2.2.89-sit10

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 (51) 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-pie-util.js +45 -46
  4. package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +14 -16
  5. package/dist/es/components/runtime/utils/charts/chart-util.js +2 -4
  6. package/dist/es/components/runtime/utils/events/event-util.js +113 -113
  7. package/dist/es/components/runtime/utils/events/print-label.js +42 -43
  8. package/dist/es/components/runtime/utils/events/standard-event.js +541 -543
  9. package/dist/es/components/runtime/utils/events/validator-util.js +32 -32
  10. package/dist/es/components/runtime/utils/form/scan-util.js +3 -4
  11. package/dist/es/components/runtime/utils/page-helper-util.js +210 -210
  12. package/dist/es/components/runtime/utils/page-init-util.js +43 -47
  13. package/dist/es/components/runtime/utils/page-store.js +1 -1
  14. package/dist/es/components/runtime/utils/table-utils.js +32 -27
  15. package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +6 -6
  16. package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +12 -16
  17. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +6 -10
  18. package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +9 -11
  19. package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +12 -13
  20. package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +13 -14
  21. package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +14 -15
  22. package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +16 -17
  23. package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +19 -13
  24. package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +18 -19
  25. package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +22 -26
  26. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue.js +1 -1
  27. package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +2 -4
  28. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +1 -1
  29. package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +11 -8
  30. package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +1 -1
  31. package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +10 -12
  32. package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +85 -88
  33. package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +108 -111
  34. package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +57 -58
  35. package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +0 -1
  36. package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +29 -29
  37. package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +50 -49
  38. package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +59 -51
  39. package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +41 -42
  40. package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +6 -8
  41. package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +9 -10
  42. package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +0 -1
  43. package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +0 -1
  44. package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +8 -8
  45. package/dist/es/components/runtime/views/assemblys/object-render.vue.js +1 -1
  46. package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
  47. package/dist/es/components/runtime/views/super-page-dialog.vue.js +6 -7
  48. package/dist/es/components/runtime/views/super-page.vue.js +1 -1
  49. package/dist/es/components/runtime/views/super-page.vue2.js +123 -125
  50. package/dist/es/style.css +101 -92
  51. package/package.json +2 -2
@@ -4,349 +4,349 @@ import { executeExpression } from "agilebuilder-ui/src/utils/calculator/calculat
4
4
  import { getComponentRef } from "./global-refs.js";
5
5
  import { watch } from "vue";
6
6
  import { deepCopy, getBaseUrl } from "./common-util.js";
7
- function getComponentOptionConfigs(e, t) {
8
- if (!e.props || !e.props.dataOrigin) return;
9
- if (e.name && "table" === e.name) return;
10
- const o = e.props.dataOrigin, n = { uuid: e.uuid };
7
+ function getComponentOptionConfigs(t, e) {
8
+ if (!t.props || !t.props.dataOrigin) return;
9
+ if (t.name && "table" === t.name) return;
10
+ const o = t.props.dataOrigin, n = { uuid: t.uuid };
11
11
  if ("optionGroup" == o.optionValueSetType) n.type = "optionGroup", n.props = { code: o.optionGroup };
12
12
  else if ("dynamicData" == o.optionValueSetType) n.type = "dynamicData", n.filterType = o.filterType, n.props = { code: o.dynamicDataSourceCode };
13
13
  else if ("dataTable" == o.optionValueSetType) {
14
14
  n.filterType = o.filterType;
15
- const e2 = getTableQueryInfo(o, t);
16
- Object.assign(n, e2);
15
+ const t2 = getTableQueryInfo(o, e);
16
+ Object.assign(n, t2);
17
17
  } else if ("service" == o.optionValueSetType) {
18
18
  n.filterType = o.filterType;
19
- const e2 = getServiceQueryInfo(o, t);
20
- Object.assign(n, e2);
19
+ const t2 = getServiceQueryInfo(o, e);
20
+ Object.assign(n, t2);
21
21
  }
22
22
  return n.type ? n : void 0;
23
23
  }
24
- function getTableQueryInfo(e, t) {
24
+ function getTableQueryInfo(t, e) {
25
25
  const o = { type: "dataTable" };
26
- if (o.props = { tableName: e.tableName, systemCode: e.tableSysCode ? e.tableSysCode : t.systemCode, systemVersion: e.tableSysCode ? e.tableSysVersion : t.systemVersion }, e.sortFields) {
27
- const t2 = [];
28
- for (const o2 of e.sortFields) o2.name && t2.push({ prop: o2.name, order: o2.type ? o2.type : "asc" });
29
- o.props.sorts = t2;
26
+ if (o.props = { tableName: t.tableName, systemCode: t.tableSysCode ? t.tableSysCode : e.systemCode, systemVersion: t.tableSysCode ? t.tableSysVersion : e.systemVersion }, t.sortFields) {
27
+ const e2 = [];
28
+ for (const o2 of t.sortFields) o2.name && e2.push({ prop: o2.name, order: o2.type ? o2.type : "asc" });
29
+ o.props.sorts = e2;
30
30
  }
31
31
  const n = [];
32
- if (e.filterList) {
33
- const t2 = [];
34
- for (const o2 of e.filterList) {
32
+ if (t.filterList) {
33
+ const e2 = [];
34
+ for (const o2 of t.filterList) {
35
35
  if (!o2.propName) continue;
36
36
  o2.propDbName || (o2.propDbName = o2.propName);
37
- const e2 = {};
38
- Object.assign(e2, o2);
37
+ const t2 = {};
38
+ Object.assign(t2, o2);
39
39
  const r2 = getParamNames(o2.propValue);
40
- for (const e3 of r2) e3 && (e3.startsWith("${data.") || e3.startsWith("${task.") || e3.startsWith("${page.")) && (n.includes(e3) || n.push(e3));
41
- o2.propValue, t2.push(e2);
40
+ for (const t3 of r2) t3 && (t3.startsWith("${data.") || t3.startsWith("${task.") || t3.startsWith("${page.")) && (n.includes(t3) || n.push(t3));
41
+ o2.propValue, e2.push(t2);
42
42
  }
43
- o.props.searchForm = t2;
43
+ o.props.searchForm = e2;
44
44
  }
45
45
  o.props.monitorFields = n;
46
46
  const r = [];
47
- if (e.tableValueField && (o.props.valueField = e.tableValueField), e.tableLableField && -1 == r.indexOf(e.tableLableField) && (o.props.lableField = e.tableLableField), e.autoSets) for (const t2 of e.autoSets) t2.source && -1 == r.indexOf(t2.source) && r.push(t2.source);
48
- return o.props.queryFields = r, o.props.pageSize = e.displayQuantity, o;
47
+ if (t.tableValueField && (o.props.valueField = t.tableValueField), t.tableLableField && -1 == r.indexOf(t.tableLableField) && (o.props.lableField = t.tableLableField), t.autoSets) for (const e2 of t.autoSets) e2.source && -1 == r.indexOf(e2.source) && r.push(e2.source);
48
+ return o.props.queryFields = r, o.props.pageSize = t.displayQuantity, o;
49
49
  }
50
- function getServiceQueryInfo(e, t) {
50
+ function getServiceQueryInfo(t, e) {
51
51
  const o = { type: "service" };
52
- if (o.props = { serivceCode: e.serviceCode, systemCode: e.tableSysCode ? e.tableSysCode : t.systemCode, systemVersion: e.tableSysCode ? e.tableSysCode : t.systemCode }, e.serviceInputs) {
53
- const t2 = [];
54
- for (const o2 of e.serviceInputs) {
52
+ if (o.props = { serivceCode: t.serviceCode, systemCode: t.tableSysCode ? t.tableSysCode : e.systemCode, systemVersion: t.tableSysCode ? t.tableSysCode : e.systemCode }, t.serviceInputs) {
53
+ const e2 = [];
54
+ for (const o2 of t.serviceInputs) {
55
55
  if (!o2.name || o2.value) continue;
56
- const e2 = {};
57
- Object.assign(e2, o2), t2.push(e2);
56
+ const t2 = {};
57
+ Object.assign(t2, o2), e2.push(t2);
58
58
  }
59
- o.props.inputs = t2;
59
+ o.props.inputs = e2;
60
60
  }
61
- return o.props.dataSetField = e.serviceDataSetField, o.props.valueField = e.serviceValueField, o.props.labelField = e.serviceLabelField, o;
61
+ return o.props.dataSetField = t.serviceDataSetField, o.props.valueField = t.serviceValueField, o.props.labelField = t.serviceLabelField, o;
62
62
  }
63
- function updateChartDatasources(e, t, o, n) {
63
+ function updateChartDatasources(t, e, o, n) {
64
64
  return new Promise((r, a) => {
65
- if (!t || 0 == t.length) return void a(new Error("无需查询的统计图配置!"));
66
- const s = deepCopy(t);
67
- s.forEach((t2) => {
68
- const o2 = t2.services;
65
+ if (!e || 0 == e.length) return void a(new Error("无需查询的统计图配置!"));
66
+ const s = deepCopy(e);
67
+ s.forEach((e2) => {
68
+ const o2 = e2.services;
69
69
  if (o2 && o2.length > 0) {
70
- const t3 = o2[0].serviceInputs;
71
- t3 && (o2[0].serviceInParams = {}, t3.forEach((t4) => {
72
- const n2 = t4.name, r2 = t4.value;
73
- o2[0].serviceInParams[n2] = getValueFromVariable(e.entity, r2);
70
+ const e3 = o2[0].serviceInputs;
71
+ e3 && (o2[0].serviceInParams = {}, e3.forEach((e4) => {
72
+ const n2 = e4.name, r2 = e4.value;
73
+ o2[0].serviceInParams[n2] = getValueFromVariable(t.entity, r2);
74
74
  }), delete o2[0].serviceInputs);
75
75
  }
76
76
  });
77
- const i = e.entity ? e.entity : {}, l = {};
78
- i.request && Object.assign(l, i.request), i.page && Object.assign(l, i.page), o && Object.assign(l, o);
79
- const u = {};
80
- i.task && Object.assign(u, i.task);
81
- const c = { entityMap: i.data, additionalParamMap: l, taskMap: u, dataSourceList: s, systemCode: e.systemCode, pageCode: e.code }, p = e.backendUrl, f = getBaseUrl(p, e.isTest) + "/common/common-data/find-chart-datas";
82
- http.post(f, c, { headers: { customSystem: e.systemCode } }).then((t2) => {
77
+ const i = t.entity ? t.entity : {}, u = {};
78
+ i.request && Object.assign(u, i.request), i.page && Object.assign(u, i.page), o && Object.assign(u, o);
79
+ const l = {};
80
+ i.task && Object.assign(l, i.task);
81
+ const c = { entityMap: i.data, additionalParamMap: u, taskMap: l, dataSourceList: s, systemCode: t.systemCode, pageCode: t.code }, p = t.backendUrl, f = getBaseUrl(p, t.isTest) + "/common/common-data/find-chart-datas";
82
+ http.post(f, c, { headers: { customSystem: t.systemCode } }).then((e2) => {
83
83
  var _a, _b;
84
- e.chartDataSourceMap || (e.chartDataSourceMap = {});
85
- for (const o2 in t2) {
86
- e.chartDataSourceMap[o2] = t2[o2];
87
- const r2 = getComponentRef(e, o2);
84
+ t.chartDataSourceMap || (t.chartDataSourceMap = {});
85
+ for (const o2 in e2) {
86
+ t.chartDataSourceMap[o2] = e2[o2];
87
+ const r2 = getComponentRef(t, o2);
88
88
  if (r2) {
89
89
  const a2 = r2.getConfigure();
90
- if ((!n || a2 && (void 0 === a2.initializationQuery || a2.initializationQuery)) && r2.updateChartDatas && (r2.updateChartDatas(t2[o2]), (_b = (_a = a2.runtime) == null ? void 0 : _a.dataConfig) == null ? void 0 : _b.resultSet)) {
91
- const n2 = t2[o2] && t2[o2].length > 0 ? t2[o2][0] : {}, r3 = n2 && n2.result ? n2.result : {};
90
+ if ((!n || a2 && (void 0 === a2.initializationQuery || a2.initializationQuery)) && r2.updateChartDatas && (r2.updateChartDatas(e2[o2]), (_b = (_a = a2.runtime) == null ? void 0 : _a.dataConfig) == null ? void 0 : _b.resultSet)) {
91
+ const n2 = e2[o2] && e2[o2].length > 0 ? e2[o2][0] : {}, r3 = n2 && n2.result ? n2.result : {};
92
92
  let s2 = null;
93
- a2.serviceDataField ? s2 = r3[a2.serviceDataField] : r3 && (s2 = Array.isArray(r3) ? r3 : [r3]), s2 || (s2 = []), setValueForVariableName(e.entity, a2.runtime.dataConfig.resultSet, s2);
93
+ a2.serviceDataField ? s2 = r3[a2.serviceDataField] : r3 && (s2 = Array.isArray(r3) ? r3 : [r3]), s2 || (s2 = []), setValueForVariableName(t.entity, a2.runtime.dataConfig.resultSet, s2);
94
94
  }
95
95
  }
96
96
  }
97
- console.log("查询统计图数据完成", t2), r(t2);
98
- }).catch((e2) => {
99
- console.log("查询统计图数据失败", e2), a(e2);
97
+ r(e2);
98
+ }).catch((t2) => {
99
+ a(t2);
100
100
  });
101
101
  });
102
102
  }
103
- function updateChartDatasourcesByComponent(e, t) {
104
- const o = e.initChartServiceConfigs.find((e2) => e2.uuid === t);
105
- o && updateChartDatasources(e, [o], null, false);
103
+ function updateChartDatasourcesByComponent(t, e) {
104
+ const o = t.initChartServiceConfigs.find((t2) => t2.uuid === e);
105
+ o && updateChartDatasources(t, [o], null, false);
106
106
  }
107
- function updateOptionDatasources(e, t, o) {
107
+ function updateOptionDatasources(t, e, o) {
108
108
  return new Promise((n, r) => {
109
- if (!t || 0 == t.length) return void r(new Error("无需查询的配置!"));
110
- const a = e.entity ? e.entity : {}, s = {};
109
+ if (!e || 0 == e.length) return void r(new Error("无需查询的配置!"));
110
+ const a = t.entity ? t.entity : {}, s = {};
111
111
  a.request && Object.assign(s, a.request), a.page && Object.assign(s, a.page), s.query = o;
112
- const i = { entityMap: a.data, additionalParamMap: s, dataSourceList: t, systemCode: e.systemCode, query: o }, l = e.backendUrl, u = getBaseUrl(l, e.isTest) + "/common/common-data/find-datas";
113
- http.post(u, i).then((t2) => {
114
- e.optionSourceMap || (e.optionSourceMap = {});
115
- for (const o2 in t2) {
116
- e.optionSourceMap[o2] = t2[o2];
117
- const n2 = getComponentRef(e, o2);
118
- n2 && n2.updateOptions && n2.updateOptions(t2[o2]);
112
+ const i = { entityMap: a.data, additionalParamMap: s, dataSourceList: e, systemCode: t.systemCode, query: o }, u = t.backendUrl, l = getBaseUrl(u, t.isTest) + "/common/common-data/find-datas";
113
+ http.post(l, i).then((e2) => {
114
+ t.optionSourceMap || (t.optionSourceMap = {});
115
+ for (const o2 in e2) {
116
+ t.optionSourceMap[o2] = e2[o2];
117
+ const n2 = getComponentRef(t, o2);
118
+ n2 && n2.updateOptions && n2.updateOptions(e2[o2]);
119
119
  }
120
- console.log("查询选项数据完成", t2), n(t2);
121
- }).catch((e2) => {
122
- console.log("查询选项数据失败", e2), r(e2);
120
+ n(e2);
121
+ }).catch((t2) => {
122
+ r(t2);
123
123
  });
124
124
  });
125
125
  }
126
- function getOptionDatasFromPage(e, t) {
127
- return getComponentOptionDatasFromPage(e, t.uuid);
126
+ function getOptionDatasFromPage(t, e) {
127
+ return getComponentOptionDatasFromPage(t, e.uuid);
128
128
  }
129
- function getComponentOptionDatasFromPage(e, t) {
130
- const o = getOptionDatasSourceMap(e)[t];
129
+ function getComponentOptionDatasFromPage(t, e) {
130
+ const o = getOptionDatasSourceMap(t)[e];
131
131
  return o || [];
132
132
  }
133
- function getOptionDatasSourceMap(e) {
134
- if (!e || !e.optionSourceMap) return {};
135
- const t = e.optionSourceMap;
136
- return t || {};
133
+ function getOptionDatasSourceMap(t) {
134
+ if (!t || !t.optionSourceMap) return {};
135
+ const e = t.optionSourceMap;
136
+ return e || {};
137
137
  }
138
- function getChartDatasFromPage(e, t) {
139
- if (!e || !e.chartDataSourceMap || !t) return null;
140
- return e.chartDataSourceMap[t.uuid];
138
+ function getChartDatasFromPage(t, e) {
139
+ if (!t || !t.chartDataSourceMap || !e) return null;
140
+ return t.chartDataSourceMap[e.uuid];
141
141
  }
142
- function queryOptionDatasources(e, t, o) {
143
- return updateOptionDatasources(e, t ? [t] : [], o);
142
+ function queryOptionDatasources(t, e, o) {
143
+ return updateOptionDatasources(t, e ? [e] : [], o);
144
144
  }
145
- function autoSetAfterSelect(e, t, o, n) {
145
+ function autoSetAfterSelect(t, e, o, n) {
146
146
  if (!o || 0 == o.length) return;
147
- const r = t.entity ? t.entity : {};
148
- for (const e2 of o) {
149
- if (!e2.source || !e2.target) continue;
150
- const t2 = getValuesByField(n, e2.source);
151
- let o2 = e2.target;
147
+ const r = e.entity ? e.entity : {};
148
+ for (const t2 of o) {
149
+ if (!t2.source || !t2.target) continue;
150
+ const e2 = getValuesByField(n, t2.source);
151
+ let o2 = t2.target;
152
152
  if (!o2 || !o2.startsWith("${")) continue;
153
153
  o2 = o2.substring(2, o2.length - 1);
154
- setVariableValue(r, o2.split("."), t2.join(","));
154
+ setVariableValue(r, o2.split("."), e2.join(","));
155
155
  }
156
156
  }
157
- function getValuesByField(e, t) {
158
- if (e) {
157
+ function getValuesByField(t, e) {
158
+ if (t) {
159
159
  const o = [];
160
- for (const n of e) {
161
- let e2 = n[t];
162
- null != e2 && null != e2 || (e2 = ""), o.push(e2);
160
+ for (const n of t) {
161
+ let t2 = n[e];
162
+ null != t2 && null != t2 || (t2 = ""), o.push(t2);
163
163
  }
164
164
  return o;
165
165
  }
166
166
  return [""];
167
167
  }
168
- function getVariableValue(e, t) {
169
- if (!e || !t || 0 == t.length) return;
170
- let o = e;
171
- for (let e2 = 0; e2 < t.length; e2++) {
168
+ function getVariableValue(t, e) {
169
+ if (!t || !e || 0 == e.length) return;
170
+ let o = t;
171
+ for (let t2 = 0; t2 < e.length; t2++) {
172
172
  if (null == o) return o;
173
- o = o[t[e2]];
173
+ o = o[e[t2]];
174
174
  }
175
175
  return o;
176
176
  }
177
- function setValueForVariableName(e, t, o) {
178
- if (!t || !t.startsWith("${")) return;
179
- setVariableValue(e, (t = t.substring(2, t.length - 1)).split("."), o);
177
+ function setValueForVariableName(t, e, o) {
178
+ if (!e || !e.startsWith("${")) return;
179
+ setVariableValue(t, (e = e.substring(2, e.length - 1)).split("."), o);
180
180
  }
181
- function setVariableValue(e, t, o) {
182
- if (!e || !t || 0 == t.length) return;
183
- let n = e;
184
- for (let e2 = 0; e2 < t.length; e2++) {
185
- const r = t[e2];
186
- e2 + 1 === t.length ? n[r] = o : (void 0 === n[r] && (n[r] = {}), n = n[r]);
181
+ function setVariableValue(t, e, o) {
182
+ if (!t || !e || 0 == e.length) return;
183
+ let n = t;
184
+ for (let t2 = 0; t2 < e.length; t2++) {
185
+ const r = e[t2];
186
+ t2 + 1 === e.length ? n[r] = o : (void 0 === n[r] && (n[r] = {}), n = n[r]);
187
187
  }
188
188
  }
189
- function setVariableValueWithProp(e, t, o) {
190
- if (!e || !t) return;
191
- setVariableValue(e, t.split("."), o);
189
+ function setVariableValueWithProp(t, e, o) {
190
+ if (!t || !e) return;
191
+ setVariableValue(t, e.split("."), o);
192
192
  }
193
- function formatVariableValue(e, t) {
194
- if (!e || "" == t || null == t || null == t) return t;
195
- const o = e.entity ? e.entity : {}, n = getParamNames(t);
196
- for (const e2 in n) {
197
- const r = n[e2], a = getValueFromVariable(o, r);
193
+ function formatVariableValue(t, e) {
194
+ if (!t || "" == e || null == e || null == e) return e;
195
+ const o = t.entity ? t.entity : {}, n = getParamNames(e);
196
+ for (const t2 in n) {
197
+ const r = n[t2], a = getValueFromVariable(o, r);
198
198
  if (a && "[object Date]" === Object.prototype.toString.call(a)) return dayjs(a).format("YYYY-MM-DD hh:mm:ss");
199
199
  if (a && "number" == typeof a) return a;
200
- t = t.replace(r, null == a ? "" : a);
200
+ e = e.replace(r, null == a ? "" : a);
201
201
  }
202
- return t;
202
+ return e;
203
203
  }
204
- function getParamNames(e) {
205
- if (!e) return [];
206
- const t = e.match(/\$\{[^\{|\}]+\}/g);
207
- return t || [];
204
+ function getParamNames(t) {
205
+ if (!t) return [];
206
+ const e = t.match(/\$\{[^\{|\}]+\}/g);
207
+ return e || [];
208
208
  }
209
- function formatValueByType(e, t, o) {
210
- if (!t || "" == e || null == e || null == e) return e;
211
- if (console.log("aaa", e, t, o), o = o || {}, "number" == t || "percent" == t) {
212
- if (isNaN(e)) return e;
209
+ function formatValueByType(t, e, o) {
210
+ if (!e || "" == t || null == t || null == t) return t;
211
+ if (o = o || {}, "number" == e || "percent" == e) {
212
+ if (isNaN(t)) return t;
213
213
  let n = parseInt(o.decimalDigit);
214
- if ((null == n || isNaN(n)) && (n = -1), e = parseFloat(e), "percent" == t && (e *= 100), n > -1 && (e = parseFloat(e.toFixed(n))), "percent" == t) e += "%";
214
+ if ((null == n || isNaN(n)) && (n = -1), t = parseFloat(t), "percent" == e && (t *= 100), n > -1 && (t = parseFloat(t.toFixed(n))), "percent" == e) t += "%";
215
215
  else {
216
216
  if (o.thousandsSeparator) {
217
- const t2 = e.toString().split(".");
218
- t2[0] = t2[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), e = t2.length > 1 ? t2.join(".") : t2[0];
217
+ const e2 = t.toString().split(".");
218
+ e2[0] = e2[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), t = e2.length > 1 ? e2.join(".") : e2[0];
219
219
  }
220
- o.symbol && (e = o.symbol + "" + e);
220
+ o.symbol && (t = o.symbol + "" + t);
221
221
  }
222
- return e;
222
+ return t;
223
223
  }
224
- if ("date" == t || "time" == t) {
224
+ if ("date" == e || "time" == e) {
225
225
  let n = "";
226
- return "date" == t ? (n = o.dateFormat, n || (n = "YYYY-MM-DD")) : (n = o.timeFormat, n || (n = "HH:mm:ss")), dayjs(e).format(n);
226
+ return "date" == e ? (n = o.dateFormat, n || (n = "YYYY-MM-DD")) : (n = o.timeFormat, n || (n = "HH:mm:ss")), dayjs(t).format(n);
227
227
  }
228
- return "custom" == t && o.formatEventUuid && console.log("自定义方法", o), e;
229
- }
230
- function getValueFromVariable(e, t, o) {
231
- if (null == t || null == t) return t;
232
- if (t.startsWith("${") && t.endsWith("}")) {
233
- let n = t.substring(2, t.length - 1), r = null, a = null;
234
- if (n.startsWith("data.")) n = n.substring(5), a = e.data, r = "data";
235
- else if (n.startsWith("page.")) n = n.substring(5), r = "page", a = e.page;
236
- else if (n.startsWith("task.")) n = n.substring(5), r = "task", a = e.task;
237
- else if (n.startsWith("request.")) n = n.substring(8), r = "request", a = e.request;
238
- else if (n.startsWith("context.")) n = n.substring(8), r = "context", a = e.context;
239
- else if (n.startsWith("system.")) n = n.substring(7), r = "system", a = e.system;
228
+ return "custom" == e && o.formatEventUuid, t;
229
+ }
230
+ function getValueFromVariable(t, e, o) {
231
+ if (null == e || null == e) return e;
232
+ if (e.startsWith("${") && e.endsWith("}")) {
233
+ let n = e.substring(2, e.length - 1), r = null, a = null;
234
+ if (n.startsWith("data.")) n = n.substring(5), a = t.data, r = "data";
235
+ else if (n.startsWith("page.")) n = n.substring(5), r = "page", a = t.page;
236
+ else if (n.startsWith("task.")) n = n.substring(5), r = "task", a = t.task;
237
+ else if (n.startsWith("request.")) n = n.substring(8), r = "request", a = t.request;
238
+ else if (n.startsWith("context.")) n = n.substring(8), r = "context", a = t.context;
239
+ else if (n.startsWith("system.")) n = n.substring(7), r = "system", a = t.system;
240
240
  else {
241
241
  if (n.startsWith("fixed.")) return n.substring(6);
242
242
  n.startsWith("row.") && (n = n.substring(4), a = o, r = "row");
243
243
  }
244
- return n ? getValueFromSource(a, n, r) : (console.log("获取变量失败", t, e), "");
244
+ return n ? getValueFromSource(a, n, r) : "";
245
245
  }
246
- return t;
246
+ return e;
247
247
  }
248
- function getValueFromSource(e, t, o) {
249
- if ("context" != o && !e || !t) return;
250
- const n = t.indexOf(".");
248
+ function getValueFromSource(t, e, o) {
249
+ if ("context" != o && !t || !e) return;
250
+ const n = e.indexOf(".");
251
251
  if (n > -1) {
252
- const r = t.substring(0, n), a = t.substring(n + 1);
253
- let s = e[r];
252
+ const r = e.substring(0, n), a = e.substring(n + 1);
253
+ let s = t[r];
254
254
  return s && Array.isArray(s) && s.length > 0 && (s = s[0]), getValueFromSource(s, a, o);
255
255
  }
256
256
  if ("context" == o) {
257
- if ("currentDate" == t || "currentTime" == t) return /* @__PURE__ */ new Date();
258
- if (t.startsWith("currentDate") && t.length > 11) {
259
- const e2 = t.substring(11), o2 = e2.substring(0, 1);
260
- let n2 = parseInt(e2.substring(1, e2.length - 1), 10);
261
- const r = e2.substring(e2.length - 1), a = /* @__PURE__ */ new Date();
257
+ if ("currentDate" == e || "currentTime" == e) return /* @__PURE__ */ new Date();
258
+ if (e.startsWith("currentDate") && e.length > 11) {
259
+ const t2 = e.substring(11), o2 = t2.substring(0, 1);
260
+ let n2 = parseInt(t2.substring(1, t2.length - 1), 10);
261
+ const r = t2.substring(t2.length - 1), a = /* @__PURE__ */ new Date();
262
262
  return n2 = "+" === o2 ? n2 : -n2, "d" === r || "w" === r ? (n2 = "w" === r ? 7 * n2 : n2, a.setDate(a.getDate() + n2)) : "m" === r ? a.setMonth(a.getMonth() + n2) : "y" === r && a.setFullYear(a.getFullYear() + n2), a;
263
263
  }
264
- if (!e) return;
264
+ if (!t) return;
265
265
  }
266
- return e[t];
266
+ return t[e];
267
267
  }
268
268
  function caculateShowCondition(pageContext, showConditions, row) {
269
269
  if (!showConditions || 0 == showConditions.length || !pageContext || !pageContext.entity) return true;
270
270
  const entityData = pageContext.entity;
271
271
  let conditions = "";
272
272
  const maxLen = showConditions.length;
273
- for (let e = 0; e < maxLen; e++) {
274
- const t = showConditions[e], o = t.propName;
275
- let n = t.operator;
273
+ for (let t = 0; t < maxLen; t++) {
274
+ const e = showConditions[t], o = e.propName;
275
+ let n = e.operator;
276
276
  if (!o || "" === o) continue;
277
277
  n || (n = "EQ");
278
278
  const r = getValueFromVariable(entityData, o, row);
279
- let a = getValueFromVariable(entityData, t.propValue, row);
280
- const s = t.dataType;
279
+ let a = getValueFromVariable(entityData, e.propValue, row);
280
+ const s = e.dataType;
281
281
  "CONTAIN" != n && "NOT_CONTAIN" != n || r && !r.includes && (n = "CONTAIN" == n ? "EQ" : "NET");
282
- let i = t.variableIsNull, l;
283
- if (i || (i = "null"), void 0 !== a && "" !== a || (a = null, "null" === i ? n = "IS_NULL" : "notequal" === i ? n = "IS_NOT_NULL" : l = true), null == l) try {
284
- l = executeExpression(r, n, a, s);
285
- } catch (e2) {
286
- console.log("executeExpression error", e2), l = false;
282
+ let i = e.variableIsNull, u;
283
+ if (i || (i = "null"), void 0 !== a && "" !== a || (a = null, "null" === i ? n = "IS_NULL" : "notequal" === i ? n = "IS_NOT_NULL" : u = true), null == u) try {
284
+ u = executeExpression(r, n, a, s);
285
+ } catch (t2) {
286
+ u = false;
287
287
  }
288
- const u = t.leftBracket, c = t.rightBracket;
289
- let p = t.joinSign;
290
- if (u && null !== u && "" !== u && (conditions += u, conditions += " "), conditions += l + " ", c && null !== c && "" !== c && (conditions += c, conditions += " "), e < maxLen - 1 && p && null !== p && "" !== p) {
291
- const e2 = p.toLowerCase();
292
- "and" === e2 ? p = e2.replace("and", "&&") : "or" === e2 && (p = e2.replace("or", "||")), conditions += p + " ";
288
+ const l = e.leftBracket, c = e.rightBracket;
289
+ let p = e.joinSign;
290
+ if (l && null !== l && "" !== l && (conditions += l, conditions += " "), conditions += u + " ", c && null !== c && "" !== c && (conditions += c, conditions += " "), t < maxLen - 1 && p && null !== p && "" !== p) {
291
+ const t2 = p.toLowerCase();
292
+ "and" === t2 ? p = t2.replace("and", "&&") : "or" === t2 && (p = t2.replace("or", "||")), conditions += p + " ";
293
293
  }
294
294
  }
295
295
  return !conditions || eval("(" + conditions + ")");
296
296
  }
297
- function monitorFieldChange(e, t, o) {
298
- if (!o || !e || !t || 0 == t.length) return;
297
+ function monitorFieldChange(t, e, o) {
298
+ if (!o || !t || !e || 0 == e.length) return;
299
299
  const n = [], r = [];
300
- for (let e2 of t) if (e2.startsWith("${")) {
301
- e2 = e2.substring(2, e2.length - 1);
302
- const t2 = e2.split(".");
303
- "page" !== t2[0] && "task" !== t2[0] && "data" !== t2[0] || (n.push(t2), r.includes(t2[0]) || r.push(t2[0]));
300
+ for (let t2 of e) if (t2.startsWith("${")) {
301
+ t2 = t2.substring(2, t2.length - 1);
302
+ const e2 = t2.split(".");
303
+ "page" !== e2[0] && "task" !== e2[0] && "data" !== e2[0] || (n.push(e2), r.includes(e2[0]) || r.push(e2[0]));
304
304
  }
305
- const a = e.entity;
305
+ const a = t.entity;
306
306
  let s = getMonitorFieldValues(n, a), i = false;
307
- for (const e2 of r) watch(a[e2], () => {
307
+ for (const t2 of r) watch(a[t2], () => {
308
308
  i && clearTimeout(i), i = setTimeout(function() {
309
- const e3 = getMonitorFieldValues(n, a);
310
- s != e3 && (s = e3, o());
309
+ const t3 = getMonitorFieldValues(n, a);
310
+ s != t3 && (s = t3, o());
311
311
  }, 200);
312
312
  });
313
313
  }
314
- function getMonitorFieldValues(e, t) {
314
+ function getMonitorFieldValues(t, e) {
315
315
  let o = "";
316
- for (const n of e) o += "_" + getVariableValue(t, n);
316
+ for (const n of t) o += "_" + getVariableValue(e, n);
317
317
  return o;
318
318
  }
319
- function getFormPropName(e) {
320
- return e && e.indexOf("${") >= 0 ? e.substring(e.indexOf(".") + 1, e.lastIndexOf("}")) : e;
319
+ function getFormPropName(t) {
320
+ return t && t.indexOf("${") >= 0 ? t.substring(t.indexOf(".") + 1, t.lastIndexOf("}")) : t;
321
321
  }
322
- function getSizeConfig(e, t) {
323
- const o = getPageModeType(e);
322
+ function getSizeConfig(t, e) {
323
+ const o = getPageModeType(t);
324
324
  let n;
325
- return t.props && t.props.size && t.props.size[o] && (n = t.props.size[o]), !n && t.props && t.props.size && (n = t.props.size.pc), n;
325
+ return e.props && e.props.size && e.props.size[o] && (n = e.props.size[o]), !n && e.props && e.props.size && (n = e.props.size.pc), n;
326
326
  }
327
- function getPageModeType(e) {
328
- let t = e.dimensions;
329
- return t || (t = "pc"), t;
327
+ function getPageModeType(t) {
328
+ let e = t.dimensions;
329
+ return e || (e = "pc"), e;
330
330
  }
331
- function isPromise(e) {
332
- return e && "[object Promise]" === Object.prototype.toString.call(e);
331
+ function isPromise(t) {
332
+ return t && "[object Promise]" === Object.prototype.toString.call(t);
333
333
  }
334
- function decomposeVariable(e) {
335
- if (!e) return [];
336
- const t = e.match(/\${(.*?)}/);
337
- return t ? t[1].split(".") : [];
334
+ function decomposeVariable(t) {
335
+ if (!t) return [];
336
+ const e = t.match(/\${(.*?)}/);
337
+ return e ? e[1].split(".") : [];
338
338
  }
339
- function getModelFieldFromPageContext(e, t) {
340
- if (!t.modelFieldsMap) return;
339
+ function getModelFieldFromPageContext(t, e) {
340
+ if (!e.modelFieldsMap) return;
341
341
  let o = null;
342
- for (let n = 0; n < e.length; n++) {
343
- const r = e[n];
344
- n + 1 === e.length && (o = t.modelFieldsMap[r]);
342
+ for (let n = 0; n < t.length; n++) {
343
+ const r = t[n];
344
+ n + 1 === t.length && (o = e.modelFieldsMap[r]);
345
345
  }
346
346
  return o;
347
347
  }
348
- function isNumberDataType(e) {
349
- return "INTEGER" === e || "LONG" === e || "DOUBLE" === e || "FLOAT_COM" === e;
348
+ function isNumberDataType(t) {
349
+ return "INTEGER" === t || "LONG" === t || "DOUBLE" === t || "FLOAT_COM" === t;
350
350
  }
351
351
  export {
352
352
  autoSetAfterSelect,