super-page-runtime 2.2.91-sti9 → 2.2.92-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/events/event-util.js +109 -108
- package/dist/es/components/runtime/utils/events/print-label.js +53 -40
- package/dist/es/components/runtime/utils/events/standard-event.js +125 -114
- package/dist/es/components/runtime/utils/page-helper-util.d.ts +1 -0
- package/dist/es/components/runtime/utils/page-helper-util.js +63 -60
- package/dist/es/components/runtime/utils/page-init-util.js +8 -8
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +38 -39
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +172 -168
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +94 -90
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +49 -41
- package/package.json +2 -2
|
@@ -36,16 +36,16 @@ function getTableQueryInfo(t, e) {
|
|
|
36
36
|
o2.propDbName || (o2.propDbName = o2.propName);
|
|
37
37
|
const t2 = {};
|
|
38
38
|
Object.assign(t2, o2);
|
|
39
|
-
const
|
|
40
|
-
for (const t3 of
|
|
39
|
+
const a2 = getParamNames(o2.propValue);
|
|
40
|
+
for (const t3 of a2) t3 && (t3.startsWith("${data.") || t3.startsWith("${task.") || t3.startsWith("${page.")) && (n.includes(t3) || n.push(t3));
|
|
41
41
|
o2.propValue, e2.push(t2);
|
|
42
42
|
}
|
|
43
43
|
o.props.searchForm = e2;
|
|
44
44
|
}
|
|
45
45
|
o.props.monitorFields = n;
|
|
46
|
-
const
|
|
47
|
-
if (t.tableValueField && (o.props.valueField = t.tableValueField), t.tableLableField && -1 ==
|
|
48
|
-
return o.props.queryFields =
|
|
46
|
+
const a = [];
|
|
47
|
+
if (t.tableValueField && (o.props.valueField = t.tableValueField), t.tableLableField && -1 == a.indexOf(t.tableLableField) && (o.props.lableField = t.tableLableField), t.autoSets) for (const e2 of t.autoSets) e2.source && -1 == a.indexOf(e2.source) && a.push(e2.source);
|
|
48
|
+
return o.props.queryFields = a, o.props.pageSize = t.displayQuantity, o;
|
|
49
49
|
}
|
|
50
50
|
function getServiceQueryInfo(t, e) {
|
|
51
51
|
const o = { type: "service" };
|
|
@@ -61,16 +61,16 @@ function getServiceQueryInfo(t, e) {
|
|
|
61
61
|
return o.props.dataSetField = t.serviceDataSetField, o.props.valueField = t.serviceValueField, o.props.labelField = t.serviceLabelField, o;
|
|
62
62
|
}
|
|
63
63
|
function updateChartDatasources(t, e, o, n) {
|
|
64
|
-
return new Promise((
|
|
65
|
-
if (!e || 0 == e.length) return void
|
|
64
|
+
return new Promise((a, r) => {
|
|
65
|
+
if (!e || 0 == e.length) return void r(new Error("无需查询的统计图配置!"));
|
|
66
66
|
const s = deepCopy(e);
|
|
67
67
|
s.forEach((e2) => {
|
|
68
68
|
const o2 = e2.services;
|
|
69
69
|
if (o2 && o2.length > 0) {
|
|
70
70
|
const e3 = o2[0].serviceInputs;
|
|
71
71
|
e3 && (o2[0].serviceInParams = {}, e3.forEach((e4) => {
|
|
72
|
-
const n2 = e4.name,
|
|
73
|
-
o2[0].serviceInParams[n2] = getValueFromVariable(t.entity,
|
|
72
|
+
const n2 = e4.name, a2 = e4.value;
|
|
73
|
+
o2[0].serviceInParams[n2] = getValueFromVariable(t.entity, a2);
|
|
74
74
|
}), delete o2[0].serviceInputs);
|
|
75
75
|
}
|
|
76
76
|
});
|
|
@@ -84,19 +84,19 @@ function updateChartDatasources(t, e, o, n) {
|
|
|
84
84
|
t.chartDataSourceMap || (t.chartDataSourceMap = {});
|
|
85
85
|
for (const o2 in e2) {
|
|
86
86
|
t.chartDataSourceMap[o2] = e2[o2];
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
89
|
-
const
|
|
90
|
-
if ((!n ||
|
|
91
|
-
const n2 = e2[o2] && e2[o2].length > 0 ? e2[o2][0] : {},
|
|
87
|
+
const a2 = getComponentRef(t, o2);
|
|
88
|
+
if (a2) {
|
|
89
|
+
const r2 = a2.getConfigure();
|
|
90
|
+
if ((!n || r2 && (void 0 === r2.initializationQuery || r2.initializationQuery)) && a2.updateChartDatas && (a2.updateChartDatas(e2[o2]), (_b = (_a = r2.runtime) == null ? void 0 : _a.dataConfig) == null ? void 0 : _b.resultSet)) {
|
|
91
|
+
const n2 = e2[o2] && e2[o2].length > 0 ? e2[o2][0] : {}, a3 = n2 && n2.result ? n2.result : {};
|
|
92
92
|
let s2 = null;
|
|
93
|
-
|
|
93
|
+
r2.serviceDataField ? s2 = a3[r2.serviceDataField] : a3 && (s2 = Array.isArray(a3) ? a3 : [a3]), s2 || (s2 = []), setValueForVariableName(t.entity, r2.runtime.dataConfig.resultSet, s2);
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
|
|
97
|
+
a(e2);
|
|
98
98
|
}).catch((t2) => {
|
|
99
|
-
|
|
99
|
+
r(t2);
|
|
100
100
|
});
|
|
101
101
|
});
|
|
102
102
|
}
|
|
@@ -105,11 +105,11 @@ function updateChartDatasourcesByComponent(t, e) {
|
|
|
105
105
|
o && updateChartDatasources(t, [o], null, false);
|
|
106
106
|
}
|
|
107
107
|
function updateOptionDatasources(t, e, o) {
|
|
108
|
-
return new Promise((n,
|
|
109
|
-
if (!e || 0 == e.length) return void
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
const i = { entityMap:
|
|
108
|
+
return new Promise((n, a) => {
|
|
109
|
+
if (!e || 0 == e.length) return void a(new Error("无需查询的配置!"));
|
|
110
|
+
const r = t.entity ? t.entity : {}, s = {};
|
|
111
|
+
r.request && Object.assign(s, r.request), r.page && Object.assign(s, r.page), s.query = o;
|
|
112
|
+
const i = { entityMap: r.data, additionalParamMap: s, dataSourceList: e, systemCode: t.systemCode, query: o }, u = t.backendUrl, l = getBaseUrl(u, t.isTest) + "/common/common-data/find-datas";
|
|
113
113
|
http.post(l, i).then((e2) => {
|
|
114
114
|
t.optionSourceMap || (t.optionSourceMap = {});
|
|
115
115
|
for (const o2 in e2) {
|
|
@@ -119,7 +119,7 @@ function updateOptionDatasources(t, e, o) {
|
|
|
119
119
|
}
|
|
120
120
|
n(e2);
|
|
121
121
|
}).catch((t2) => {
|
|
122
|
-
|
|
122
|
+
a(t2);
|
|
123
123
|
});
|
|
124
124
|
});
|
|
125
125
|
}
|
|
@@ -144,14 +144,14 @@ function queryOptionDatasources(t, e, o) {
|
|
|
144
144
|
}
|
|
145
145
|
function autoSetAfterSelect(t, e, o, n) {
|
|
146
146
|
if (!o || 0 == o.length) return;
|
|
147
|
-
const
|
|
147
|
+
const a = e.entity ? e.entity : {};
|
|
148
148
|
for (const t2 of o) {
|
|
149
149
|
if (!t2.source || !t2.target) continue;
|
|
150
150
|
const e2 = getValuesByField(n, t2.source);
|
|
151
151
|
let o2 = t2.target;
|
|
152
152
|
if (!o2 || !o2.startsWith("${")) continue;
|
|
153
153
|
o2 = o2.substring(2, o2.length - 1);
|
|
154
|
-
setVariableValue(
|
|
154
|
+
setVariableValue(a, o2.split("."), e2.join(","));
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
function getValuesByField(t, e) {
|
|
@@ -182,8 +182,8 @@ function setVariableValue(t, e, o) {
|
|
|
182
182
|
if (!t || !e || 0 == e.length) return;
|
|
183
183
|
let n = t;
|
|
184
184
|
for (let t2 = 0; t2 < e.length; t2++) {
|
|
185
|
-
const
|
|
186
|
-
t2 + 1 === e.length ? n[
|
|
185
|
+
const a = e[t2];
|
|
186
|
+
t2 + 1 === e.length ? n[a] = o : (void 0 === n[a] && (n[a] = {}), n = n[a]);
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
function setVariableValueWithProp(t, e, o) {
|
|
@@ -194,10 +194,10 @@ function formatVariableValue(t, e) {
|
|
|
194
194
|
if (!t || "" == e || null == e || null == e) return e;
|
|
195
195
|
const o = t.entity ? t.entity : {}, n = getParamNames(e);
|
|
196
196
|
for (const t2 in n) {
|
|
197
|
-
const
|
|
198
|
-
if (
|
|
199
|
-
if (
|
|
200
|
-
e = e.replace(
|
|
197
|
+
const a = n[t2], r = getValueFromVariable(o, a);
|
|
198
|
+
if (r && "[object Date]" === Object.prototype.toString.call(r)) return dayjs(r).format("YYYY-MM-DD hh:mm:ss");
|
|
199
|
+
if (r && "number" == typeof r) return r;
|
|
200
|
+
e = e.replace(a, null == r ? "" : r);
|
|
201
201
|
}
|
|
202
202
|
return e;
|
|
203
203
|
}
|
|
@@ -230,18 +230,18 @@ function formatValueByType(t, e, o) {
|
|
|
230
230
|
function getValueFromVariable(t, e, o) {
|
|
231
231
|
if (null == e || null == e) return e;
|
|
232
232
|
if (e.startsWith("${") && e.endsWith("}")) {
|
|
233
|
-
let n = e.substring(2, e.length - 1),
|
|
234
|
-
if (n.startsWith("data.")) n = n.substring(5),
|
|
235
|
-
else if (n.startsWith("page.")) n = n.substring(5),
|
|
236
|
-
else if (n.startsWith("task.")) n = n.substring(5),
|
|
237
|
-
else if (n.startsWith("request.")) n = n.substring(8),
|
|
238
|
-
else if (n.startsWith("context.")) n = n.substring(8),
|
|
239
|
-
else if (n.startsWith("system.")) n = n.substring(7),
|
|
233
|
+
let n = e.substring(2, e.length - 1), a = null, r = null;
|
|
234
|
+
if (n.startsWith("data.")) n = n.substring(5), r = t.data, a = "data";
|
|
235
|
+
else if (n.startsWith("page.")) n = n.substring(5), a = "page", r = t.page;
|
|
236
|
+
else if (n.startsWith("task.")) n = n.substring(5), a = "task", r = t.task;
|
|
237
|
+
else if (n.startsWith("request.")) n = n.substring(8), a = "request", r = t.request;
|
|
238
|
+
else if (n.startsWith("context.")) n = n.substring(8), a = "context", r = t.context;
|
|
239
|
+
else if (n.startsWith("system.")) n = n.substring(7), a = "system", r = t.system;
|
|
240
240
|
else {
|
|
241
241
|
if (n.startsWith("fixed.")) return n.substring(6);
|
|
242
|
-
n.startsWith("row.") && (n = n.substring(4),
|
|
242
|
+
n.startsWith("row.") && (n = n.substring(4), r = o, a = "row");
|
|
243
243
|
}
|
|
244
|
-
return n ? getValueFromSource(
|
|
244
|
+
return n ? getValueFromSource(r, n, a) : "";
|
|
245
245
|
}
|
|
246
246
|
return e;
|
|
247
247
|
}
|
|
@@ -249,17 +249,17 @@ function getValueFromSource(t, e, o) {
|
|
|
249
249
|
if ("context" != o && !t || !e) return;
|
|
250
250
|
const n = e.indexOf(".");
|
|
251
251
|
if (n > -1) {
|
|
252
|
-
const
|
|
253
|
-
let s = t[
|
|
254
|
-
return s && Array.isArray(s) && s.length > 0 && (s = s[0]), getValueFromSource(s,
|
|
252
|
+
const a = e.substring(0, n), r = e.substring(n + 1);
|
|
253
|
+
let s = t[a];
|
|
254
|
+
return s && Array.isArray(s) && s.length > 0 && (s = s[0]), getValueFromSource(s, r, o);
|
|
255
255
|
}
|
|
256
256
|
if ("context" == o) {
|
|
257
257
|
if ("currentDate" == e || "currentTime" == e) return /* @__PURE__ */ new Date();
|
|
258
258
|
if (e.startsWith("currentDate") && e.length > 11) {
|
|
259
259
|
const t2 = e.substring(11), o2 = t2.substring(0, 1);
|
|
260
260
|
let n2 = parseInt(t2.substring(1, t2.length - 1), 10);
|
|
261
|
-
const
|
|
262
|
-
return n2 = "+" === o2 ? n2 : -n2, "d" ===
|
|
261
|
+
const a = t2.substring(t2.length - 1), r = /* @__PURE__ */ new Date();
|
|
262
|
+
return n2 = "+" === o2 ? n2 : -n2, "d" === a || "w" === a ? (n2 = "w" === a ? 7 * n2 : n2, r.setDate(r.getDate() + n2)) : "m" === a ? r.setMonth(r.getMonth() + n2) : "y" === a && r.setFullYear(r.getFullYear() + n2), r;
|
|
263
263
|
}
|
|
264
264
|
if (!t) return;
|
|
265
265
|
}
|
|
@@ -275,13 +275,13 @@ function caculateShowCondition(pageContext, showConditions, row) {
|
|
|
275
275
|
let n = e.operator;
|
|
276
276
|
if (!o || "" === o) continue;
|
|
277
277
|
n || (n = "EQ");
|
|
278
|
-
const
|
|
279
|
-
let
|
|
278
|
+
const a = getValueFromVariable(entityData, o, row);
|
|
279
|
+
let r = getValueFromVariable(entityData, e.propValue, row);
|
|
280
280
|
const s = e.dataType;
|
|
281
|
-
"CONTAIN" != n && "NOT_CONTAIN" != n ||
|
|
281
|
+
"CONTAIN" != n && "NOT_CONTAIN" != n || a && !a.includes && (n = "CONTAIN" == n ? "EQ" : "NET");
|
|
282
282
|
let i = e.variableIsNull, u;
|
|
283
|
-
if (i || (i = "null"), "IS_NULL" !== n && "IS_NOT_NULL" !== n && (void 0 !==
|
|
284
|
-
u = executeExpression(
|
|
283
|
+
if (i || (i = "null"), "IS_NULL" !== n && "IS_NOT_NULL" !== n && (void 0 !== r && "" !== r || (r = null, "null" === i ? n = "IS_NULL" : "notequal" === i ? n = "IS_NOT_NULL" : u = true)), null == u) try {
|
|
284
|
+
u = executeExpression(a, n, r, s);
|
|
285
285
|
} catch (t2) {
|
|
286
286
|
u = false;
|
|
287
287
|
}
|
|
@@ -296,18 +296,17 @@ function caculateShowCondition(pageContext, showConditions, row) {
|
|
|
296
296
|
}
|
|
297
297
|
function monitorFieldChange(t, e, o) {
|
|
298
298
|
if (!o || !t || !e || 0 == e.length) return;
|
|
299
|
-
const n = [],
|
|
299
|
+
const n = [], a = [];
|
|
300
300
|
for (let t2 of e) if (t2.startsWith("${")) {
|
|
301
301
|
t2 = t2.substring(2, t2.length - 1);
|
|
302
302
|
const e2 = t2.split(".");
|
|
303
|
-
"page" !== e2[0] && "task" !== e2[0] && "data" !== e2[0] || (n.push(e2),
|
|
303
|
+
"page" !== e2[0] && "task" !== e2[0] && "data" !== e2[0] || (n.push(e2), a.includes(e2[0]) || a.push(e2[0]));
|
|
304
304
|
}
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
s != t3 && (s = t3, o());
|
|
305
|
+
let r = getMonitorFieldValues(n, t.entity), s = false;
|
|
306
|
+
for (const e2 of a) watch(t.entity[e2], () => {
|
|
307
|
+
s && clearTimeout(s), s = setTimeout(function() {
|
|
308
|
+
const e3 = getMonitorFieldValues(n, t.entity);
|
|
309
|
+
r != e3 && (r = e3, o());
|
|
311
310
|
}, 200);
|
|
312
311
|
});
|
|
313
312
|
}
|
|
@@ -340,14 +339,17 @@ function getModelFieldFromPageContext(t, e) {
|
|
|
340
339
|
if (!e.modelFieldsMap) return;
|
|
341
340
|
let o = null;
|
|
342
341
|
for (let n = 0; n < t.length; n++) {
|
|
343
|
-
const
|
|
344
|
-
n + 1 === t.length && (o = e.modelFieldsMap[
|
|
342
|
+
const a = t[n];
|
|
343
|
+
n + 1 === t.length && (o = e.modelFieldsMap[a]);
|
|
345
344
|
}
|
|
346
345
|
return o;
|
|
347
346
|
}
|
|
348
347
|
function isNumberDataType(t) {
|
|
349
348
|
return "INTEGER" === t || "LONG" === t || "DOUBLE" === t || "FLOAT_COM" === t;
|
|
350
349
|
}
|
|
350
|
+
function isDateDataType(t) {
|
|
351
|
+
return "DATE" === (t = t ? t.toUpperCase() : "") || "TIME" === t || "DATETIME" === t || "TIMESTAMP" === t;
|
|
352
|
+
}
|
|
351
353
|
export {
|
|
352
354
|
autoSetAfterSelect,
|
|
353
355
|
caculateShowCondition,
|
|
@@ -366,6 +368,7 @@ export {
|
|
|
366
368
|
getValueFromSource,
|
|
367
369
|
getValueFromVariable,
|
|
368
370
|
getVariableValue,
|
|
371
|
+
isDateDataType,
|
|
369
372
|
isNumberDataType,
|
|
370
373
|
isPromise,
|
|
371
374
|
monitorFieldChange,
|
|
@@ -11,9 +11,9 @@ function f(t2) {
|
|
|
11
11
|
return e.get(window.$vueApp.config.globalProperties.baseAPI + "/component/super-page-design/runtime/" + t2);
|
|
12
12
|
}
|
|
13
13
|
function c(e2) {
|
|
14
|
-
var _a, _b;
|
|
14
|
+
var _a, _b, _c;
|
|
15
15
|
if (null == e2) return null;
|
|
16
|
-
const t2 = { uuid: e2.uuid, name: e2.name, label: e2.label, code: e2.code, version: e2.version, dimensions: e2.dimensions, systemCode: e2.systemCode, systemVersion: e2.systemVersion, backendUrl: e2.backendUrl, rules: {}, tableUuids: e2.tableUuids, listCodesMap: e2.listCodesMap, formNoRuleCode: e2.props ? e2.props.formNoRuleCode : null, judgeHeavyList: g(e2), pageType: e2.pageType, beanName: e2.props ? e2.props.beanName : null, importBeanName: e2.props ? e2.props.importBeanName : null, subTablePageInfo: e2.subTablePageInfo, workflowCode: e2.workflowCode, workflowVersion: e2.workflowVersion, refercePropMap: (_a = e2.runtime) == null ? void 0 : _a.refercePropMap, subTableWatchProps: e2.subTableWatchProps, dataTypeMaps: e2.dataTypeMaps, isWorkflowEntity:
|
|
16
|
+
const t2 = { uuid: e2.uuid, name: e2.name, label: e2.label, code: e2.code, version: e2.version, dimensions: e2.dimensions, systemCode: e2.systemCode, systemVersion: e2.systemVersion, backendUrl: e2.backendUrl, rules: {}, tableUuids: e2.tableUuids, listCodesMap: e2.listCodesMap, formNoRuleCode: e2.props ? e2.props.formNoRuleCode : null, judgeHeavyList: g(e2), pageType: e2.pageType, beanName: e2.props ? e2.props.beanName : null, importBeanName: e2.props ? e2.props.importBeanName : null, subTablePageInfo: e2.subTablePageInfo, workflowCode: e2.workflowCode, workflowVersion: e2.workflowVersion, refercePropMap: (_a = e2.runtime) == null ? void 0 : _a.refercePropMap, subTableWatchProps: e2.subTableWatchProps, dataTypeMaps: e2.dataTypeMaps, isWorkflowEntity: void 0 !== ((_b = e2.props) == null ? void 0 : _b.activeWorkflow) ? (_c = e2.props) == null ? void 0 : _c.activeWorkflow : e2.isWorkflowEntity, allChartUuids: e2.allChartUuids, entity: { data: {}, task: {}, request: {}, page: {}, context: e2.contextParam, system: e2.systemParam } };
|
|
17
17
|
if (e2.props && e2.props.notIdInitializationList) {
|
|
18
18
|
let s2 = e2.props.notIdInitializationList;
|
|
19
19
|
"string" == typeof s2 && (s2 = JSON.parse(s2)), s2.length > 0 && (t2.notIdInitializationList = s2);
|
|
@@ -57,16 +57,16 @@ function b(e2) {
|
|
|
57
57
|
function y(e2, t2) {
|
|
58
58
|
if (e2) {
|
|
59
59
|
Object.assign(t2, e2);
|
|
60
|
-
|
|
60
|
+
v(e2.paramStoreId, t2), delete e2.paramStoreId, e2.jumpMode && (t2.jumpMode = e2.jumpMode);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
function h(e2, t2) {
|
|
64
64
|
if (e2 && (e2.params && Object.assign(t2, e2.params), e2.query)) {
|
|
65
65
|
Object.assign(t2, e2.query);
|
|
66
|
-
|
|
66
|
+
v(e2.query.paramStoreId, t2);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function v(e2, t2) {
|
|
70
70
|
if (e2) {
|
|
71
71
|
const s2 = l(e2);
|
|
72
72
|
if (s2) {
|
|
@@ -75,14 +75,14 @@ function E(e2, t2) {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function E(e2, t2) {
|
|
79
79
|
let s2, i2 = t2;
|
|
80
80
|
t2 || (s2 = e2.props.base ? e2.props.base : {}, i2 = s2.prop);
|
|
81
81
|
let n2 = null;
|
|
82
82
|
return t2 && !t2.startsWith("${") ? n2 = ["data", t2] : !e2 || i2 && i2.startsWith("${") ? i2.startsWith("${") ? (i2 = i2.substring(2, i2.length - 1), n2 = i2.split("."), e2 && n2.length < 2 && (n2 = [e2.uuid])) : e2 && (n2 = ["page", e2.uuid]) : n2 = ["page", e2.uuid], n2 || e2 ? n2 : ["temp"];
|
|
83
83
|
}
|
|
84
84
|
function w(e2, t2, s2) {
|
|
85
|
-
const i2 =
|
|
85
|
+
const i2 = E(t2, s2), r2 = e2.entity;
|
|
86
86
|
if (null == r2.data.ID && null == r2.data.id) {
|
|
87
87
|
let l2, a2, p2 = false;
|
|
88
88
|
t2 && (l2 = t2.props.base ? t2.props.base : {}, a2 = t2.name, p2 = l2.multiple);
|
|
@@ -173,7 +173,7 @@ export {
|
|
|
173
173
|
c as convertToPageContext,
|
|
174
174
|
P as getDefaultValue,
|
|
175
175
|
w as getFormModelFields,
|
|
176
|
-
|
|
176
|
+
E as getModelFields,
|
|
177
177
|
M as getPermissionCodes,
|
|
178
178
|
b as packageAdditionalMapWithLocationSearch,
|
|
179
179
|
y as packageAdditionalMapWithPageRequest,
|
|
@@ -30,16 +30,10 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
30
30
|
}
|
|
31
31
|
ie.value = B.configure.props.base.showSummary, (ie.value || B.configure.props.highOrder.groupField && B.configure.props.highOrder.groupField.length > 0) && (ae.value = N(B.configure), ie.value && (ue.value = R(B.configure, "table")), B.configure.props.highOrder.groupField && B.configure.props.highOrder.groupField.length > 0 && (pe.value = R(B.configure, "group")));
|
|
32
32
|
let de = 300, he = b(B.pageContext, B.configure);
|
|
33
|
-
function ve() {
|
|
34
|
-
const e3 = B.configure.props.dataOrigin.variable.match(/\${(.*?)}/), o2 = e3 ? e3[1].split(".") : [];
|
|
35
|
-
r(() => o2.reduce((e4, o3) => e4[o3], B.pageContext.entity), (e4) => {
|
|
36
|
-
e4 ? ye(JSON.parse(JSON.stringify(e4))) : (oe.value = [], B.configure.props.modelCustom ? Re(null) : ee.value ? re.value = B.configure.props.groupHeaders : ne.value = B.configure.items);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
function ye(e3) {
|
|
33
|
+
function ve(e3) {
|
|
40
34
|
e3 || (e3 = []), (e3 = e3.length > 0 ? e3[0] : {}) || (e3 = {}), e3.hasRender ? e3.hasRender = true : (!function(e4) {
|
|
41
35
|
var _a2;
|
|
42
|
-
|
|
36
|
+
Ne(e4), "service" === B.configure.props.dataOrigin.dataSource && e4.result ? me = e4.result[B.configure.props.dataOrigin.service.serviceDataField] : "variable" === B.configure.props.dataOrigin.dataSource && (me = O(B.pageContext.entity, B.configure.props.dataOrigin.variable));
|
|
43
37
|
if (me) if (((_a2 = B.configure.props) == null ? void 0 : _a2.dataOrigin.limitEnable) && B.configure.props.dataOrigin.itemNumSource) {
|
|
44
38
|
let o2 = 10;
|
|
45
39
|
if ("fix" === B.configure.props.dataOrigin.itemNumSource) o2 = B.configure.props.dataOrigin.itemNumFix;
|
|
@@ -47,14 +41,14 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
47
41
|
o2 = Number(O(B.pageContext.entity, B.configure.props.dataOrigin.itemNumVariable));
|
|
48
42
|
const n2 = B.configure.props.dataOrigin.itemNumVariable.match(/\${(.*?)}/), t2 = n2 ? n2[1].split(".") : [], i2 = JSON.parse(JSON.stringify(me));
|
|
49
43
|
r(() => t2.reduce((e5, o3) => e5[o3], B.pageContext.entity), (o3) => {
|
|
50
|
-
|
|
44
|
+
ye(o3, i2, e4);
|
|
51
45
|
});
|
|
52
46
|
}
|
|
53
|
-
|
|
54
|
-
} else
|
|
47
|
+
ye(o2, me, e4);
|
|
48
|
+
} else Ce(me, e4);
|
|
55
49
|
}(e3), e3.hasRender = true, X && (X.autoRefresh = false));
|
|
56
50
|
}
|
|
57
|
-
function
|
|
51
|
+
function ye(e3, o2, n2) {
|
|
58
52
|
var _a2;
|
|
59
53
|
if (e3 && e3 < o2.length) {
|
|
60
54
|
let r2 = [];
|
|
@@ -73,12 +67,12 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
73
67
|
});
|
|
74
68
|
}), o2.length > e3 && (o2 = o2.slice(0, e3 - 1)), t2[i2] = B.configure.props.dataOrigin.overItemAlias, o2.push(t2);
|
|
75
69
|
}
|
|
76
|
-
|
|
77
|
-
} else
|
|
70
|
+
Ce(o2, n2);
|
|
71
|
+
} else Ce(o2, n2);
|
|
78
72
|
}
|
|
79
|
-
function
|
|
73
|
+
function Ce(e3, o2) {
|
|
80
74
|
var _a2;
|
|
81
|
-
if (
|
|
75
|
+
if (be("rowToColumn")) {
|
|
82
76
|
if (e3 = T(e3, B.configure, ne.value), !ee.value) {
|
|
83
77
|
const o3 = function(e4, o4, n2) {
|
|
84
78
|
const r2 = B.configure.props.dataOrigin.rowToColumn.titleColumns, t2 = B.configure.props.dataOrigin.rowToColumn.dataColumns, i2 = e4.props.dataOrigin.groupField;
|
|
@@ -110,7 +104,7 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
110
104
|
}(B.configure, ne.value, e3);
|
|
111
105
|
ne.value = o3;
|
|
112
106
|
}
|
|
113
|
-
} else
|
|
107
|
+
} else be("columnToRow") && (ee.value || (ne.value = H(B.configure)), e3 = _(e3, B.configure));
|
|
114
108
|
if (B.configure.props.dataOrigin.dataFormatting) {
|
|
115
109
|
const o3 = $(B.pageContext, B.configure.props.dataOrigin.dataFormatting);
|
|
116
110
|
if (o3) {
|
|
@@ -119,7 +113,7 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
119
113
|
}
|
|
120
114
|
}
|
|
121
115
|
if (Object.keys(ce.value).length > 0 && e3 && e3.length > 0 && z(ce.value, e3, B.pageContext.entity), ((_a2 = B.configure.pageination) == null ? void 0 : _a2.enable) ? function(e4) {
|
|
122
|
-
"frontend" === B.configure.pageination.type ? (fe.value = me.length,
|
|
116
|
+
"frontend" === B.configure.pageination.type ? (fe.value = me.length, Fe(1, B.configure.pageination.pageSize)) : "backend" === B.configure.pageination.type && (oe.value = me, B.configure.pageination.totalFrom && (fe.value = e4.result[B.configure.pageination.totalFrom]));
|
|
123
117
|
}(o2) : oe.value = e3, B.configure.props.highOrder.groupField && B.configure.props.highOrder.groupField.length > 0) {
|
|
124
118
|
const e4 = B.configure.props.highOrder.groupField;
|
|
125
119
|
oe.value = function(e5, o3) {
|
|
@@ -151,30 +145,35 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
151
145
|
}
|
|
152
146
|
}(ne.value);
|
|
153
147
|
}
|
|
154
|
-
function
|
|
148
|
+
function be(e3) {
|
|
155
149
|
return B.configure.props.dataOrigin.transition === e3 && B.configure.props.dataOrigin[e3].titleColumns && B.configure.props.dataOrigin[e3].titleColumns.length > 0 && B.configure.props.dataOrigin[e3].dataColumns && B.configure.props.dataOrigin[e3].dataColumns.length > 0;
|
|
156
150
|
}
|
|
157
|
-
function
|
|
151
|
+
function xe(e3) {
|
|
158
152
|
const o2 = se.value[e3.column.property] ? se.value[e3.column.property].titleStyle : null, n2 = Q == null ? void 0 : Q.titleStyle;
|
|
159
153
|
return V(e3, { cellTitleStyle: o2, titleStyle: n2 }, B);
|
|
160
154
|
}
|
|
161
|
-
function
|
|
155
|
+
function Oe(e3) {
|
|
162
156
|
return G(e3, le, B);
|
|
163
157
|
}
|
|
164
|
-
function
|
|
158
|
+
function Se(e3) {
|
|
165
159
|
const o2 = se.value[e3.column.property] ? se.value[e3.column.property].cellStyle : null;
|
|
166
160
|
return K(e3, o2, B);
|
|
167
161
|
}
|
|
168
162
|
he && he.fixHeight && (de = he.fixHeight), he && he.maxHeight && (de = he.maxHeight), de && (de = Number(de + "")), n(() => {
|
|
169
163
|
const e3 = x(B.pageContext, B.configure);
|
|
170
|
-
if (e3)
|
|
164
|
+
if (e3) ve(e3);
|
|
171
165
|
else if ("variable" === B.configure.props.dataOrigin.dataSource) {
|
|
172
|
-
|
|
166
|
+
!function() {
|
|
167
|
+
const e4 = B.configure.props.dataOrigin.variable.match(/\${(.*?)}/), o3 = e4 ? e4[1].split(".") : [];
|
|
168
|
+
r(() => o3.reduce((e5, o4) => e5[o4], B.pageContext.entity), (e5) => {
|
|
169
|
+
e5 ? ve(JSON.parse(JSON.stringify(e5))) : (oe.value = [], B.configure.props.modelCustom ? Ne(null) : ee.value ? re.value = B.configure.props.groupHeaders : ne.value = B.configure.items);
|
|
170
|
+
});
|
|
171
|
+
}();
|
|
173
172
|
const o2 = O(B.pageContext.entity, B.configure.props.dataOrigin.variable);
|
|
174
|
-
o2 &&
|
|
173
|
+
o2 && Ce(o2, e3);
|
|
175
174
|
}
|
|
176
175
|
});
|
|
177
|
-
const
|
|
176
|
+
const we = (e3) => {
|
|
178
177
|
const { columns: o2, data: n2 } = e3, r2 = [];
|
|
179
178
|
return o2.forEach((e4, o3) => {
|
|
180
179
|
if (ae.value[e4.property]) {
|
|
@@ -186,7 +185,7 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
186
185
|
}
|
|
187
186
|
}), r2;
|
|
188
187
|
};
|
|
189
|
-
function
|
|
188
|
+
function Ee({ row: e3, column: o2, rowIndex: n2, columnIndex: r2 }) {
|
|
190
189
|
const t2 = o2.property, i2 = B.configure.props.highOrder;
|
|
191
190
|
if (i2.scopeFunc) {
|
|
192
191
|
const t3 = $(B.pageContext, i2.scopeFunc);
|
|
@@ -196,23 +195,23 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
196
195
|
}
|
|
197
196
|
} else if (i2 && i2.mergeColumn, i2 && i2.mergeRow && i2.mergeRow.includes(t2) && 0 === n2) return { rowspan: oe.value.length, colspan: 1 };
|
|
198
197
|
}
|
|
198
|
+
function je(e3, o2) {
|
|
199
|
+
"frontend" === B.configure.pageination.type ? Fe(e3, o2) : ke(e3, o2);
|
|
200
|
+
}
|
|
199
201
|
function $e(e3, o2) {
|
|
200
|
-
"frontend" === B.configure.pageination.type ?
|
|
202
|
+
"frontend" === B.configure.pageination.type ? Fe(e3, o2) : ke(e3, o2);
|
|
201
203
|
}
|
|
202
204
|
function Fe(e3, o2) {
|
|
203
|
-
"frontend" === B.configure.pageination.type ? ke(e3, o2) : Ie(e3, o2);
|
|
204
|
-
}
|
|
205
|
-
function ke(e3, o2) {
|
|
206
205
|
me && (oe.value = me.slice((e3 - 1) * o2, e3 * o2));
|
|
207
206
|
}
|
|
208
|
-
function
|
|
207
|
+
function ke(e3, o2) {
|
|
209
208
|
B.configure.pageination.currentPageSet && w(B.pageContext.entity, B.configure.pageination.currentPageSet, e3), B.configure.pageination.pageSizeSet && w(B.pageContext.entity, B.configure.pageination.pageSizeSet, o2), E(B.pageContext, B.configure.uuid);
|
|
210
209
|
}
|
|
211
|
-
function
|
|
210
|
+
function Ie(e3) {
|
|
212
211
|
const o2 = e3.showCondition;
|
|
213
212
|
return j(B.pageContext, o2);
|
|
214
213
|
}
|
|
215
|
-
function
|
|
214
|
+
function Ne(e3) {
|
|
216
215
|
if (B.configure.props.modelCustom) {
|
|
217
216
|
const o2 = $(B.pageContext, B.configure.props.modelCustom);
|
|
218
217
|
if (o2) {
|
|
@@ -223,18 +222,18 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
223
222
|
}
|
|
224
223
|
}
|
|
225
224
|
}
|
|
226
|
-
function
|
|
225
|
+
function Re(e3, o2, n2) {
|
|
227
226
|
e3.forEach((e4) => {
|
|
228
227
|
const r2 = e4.props.base.prop, t2 = e4.props.base.name;
|
|
229
228
|
let i2 = { name: r2, label: t2, i18nKey: t2 };
|
|
230
|
-
e4.children && e4.childern.length > 0 && (i2.children = [],
|
|
229
|
+
e4.children && e4.childern.length > 0 && (i2.children = [], Re(e4.children, i2.children, n2)), e4.props.format && e4.props.format.type && n2.push(e4), o2.push(i2);
|
|
231
230
|
});
|
|
232
231
|
}
|
|
233
|
-
return q2({ updateChartDatas:
|
|
232
|
+
return q2({ updateChartDatas: ve, exportChart: function() {
|
|
234
233
|
let e3 = [], o2 = [];
|
|
235
234
|
o2 = ee.value ? B.configure.props.groupHeaders : B.configure.items;
|
|
236
235
|
let n2 = [];
|
|
237
|
-
|
|
236
|
+
Re(o2, e3, n2);
|
|
238
237
|
return { isTable: true, dataArr: function(e4) {
|
|
239
238
|
let o3 = [];
|
|
240
239
|
oe.value && (o3 = L(oe.value), o3.forEach((o4) => {
|
|
@@ -247,7 +246,7 @@ const q = e({ __name: "table-runtime", props: { configure: { type: Object, defau
|
|
|
247
246
|
}(n2), columns: e3 };
|
|
248
247
|
} }), (o2, n2) => {
|
|
249
248
|
const r2 = t("el-table");
|
|
250
|
-
return a(), i("div", { style: p(l(Q)), class: u([l(W), "amb-widget-chart amb-widget-flex"]), ref: "thisRef" }, [s(c(C, { ref_key: "headerRef", ref: Z, headerInfo: l(Y), configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["headerInfo", "configure", "pageContext"]), [[m, l(Y).showHeader || e2.pageContext.showHomepageSearch]]), c(r2, { ref_key: "gridRef", ref: ge, data: oe.value, style: { width: "100%" }, "max-height": l(de), "header-cell-style":
|
|
249
|
+
return a(), i("div", { style: p(l(Q)), class: u([l(W), "amb-widget-chart amb-widget-flex"]), ref: "thisRef" }, [s(c(C, { ref_key: "headerRef", ref: Z, headerInfo: l(Y), configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["headerInfo", "configure", "pageContext"]), [[m, l(Y).showHeader || e2.pageContext.showHomepageSearch]]), c(r2, { ref_key: "gridRef", ref: ge, data: oe.value, style: { width: "100%" }, "max-height": l(de), "header-cell-style": xe, "row-style": Oe, "cell-style": Se, "show-summary": ie.value, stripe: e2.configure.props.base.stripe, "summary-method": we, "span-method": Ee }, { default: d(() => [ee.value ? (a(true), i(h, { key: 0 }, v(re.value, (o3, n3) => (a(), i(h, { key: n3 }, [o3.isLeaf ? Ie(te.value[o3.columnUuid]) ? (a(), g(k, { key: 1, configure: e2.configure, pageContext: e2.pageContext, column: te.value[o3.columnUuid] }, null, 8, ["configure", "pageContext", "column"])) : f("", true) : (a(), g(F, { key: 0, configure: e2.configure, pageContext: e2.pageContext, groupColumn: o3, columnsConfigKeyValues: te.value }, null, 8, ["configure", "pageContext", "groupColumn", "columnsConfigKeyValues"]))], 64))), 128)) : (a(true), i(h, { key: 1 }, v(ne.value, (o3, n3) => (a(), i(h, { key: n3 }, [Ie(o3) ? (a(), g(k, { key: 0, column: o3, configure: e2.configure, pageContext: e2.pageContext }, null, 8, ["column", "configure", "pageContext"])) : f("", true)], 64))), 128))]), _: 1 }, 8, ["data", "max-height", "show-summary", "stripe"]), e2.configure.pageination && e2.configure.pageination.enable ? (a(), g(I, { key: 0, configure: e2.configure, "table-data": oe.value, total: fe.value, onPageChange: je, onPageSizeChange: $e }, null, 8, ["configure", "table-data", "total"])) : f("", true)], 6);
|
|
251
250
|
};
|
|
252
251
|
} });
|
|
253
252
|
export {
|