super-page-runtime 2.2.91 → 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/charts/chart-util.js +26 -32
- package/dist/es/components/runtime/utils/common-util.js +1 -1
- package/dist/es/components/runtime/utils/events/event-util.js +111 -110
- package/dist/es/components/runtime/utils/events/print-label.js +53 -40
- package/dist/es/components/runtime/utils/events/standard-event.js +133 -122
- 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 +17 -17
- package/dist/es/components/runtime/utils/page-permission-util.js +6 -6
- package/dist/es/components/runtime/utils/table-utils.js +5 -1
- 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 +198 -192
- 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/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +24 -24
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +51 -55
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +1 -1
- package/dist/es/style.css +3 -3
- 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"), 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;
|
|
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: e2.isWorkflowEntity, allChartUuids: e2.allChartUuids, entity: { data: {}, task: {}, request: {}, page: {}, context: e2.contextParam, system: e2.systemParam } };
|
|
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);
|
|
@@ -136,21 +136,21 @@ function C(s2, i2, n2) {
|
|
|
136
136
|
const I = ["button-detail", "print-label"];
|
|
137
137
|
function O(e2, t2) {
|
|
138
138
|
var _a, _b;
|
|
139
|
-
const s2 = t2.props && t2.props.base ? t2.props.base.prop : null;
|
|
140
|
-
let
|
|
141
|
-
if (
|
|
139
|
+
const s2 = t2.props && t2.props.base ? t2.props.base.prop : null, n2 = p(e2);
|
|
140
|
+
let o2 = false;
|
|
141
|
+
if (n2 && I.indexOf(t2.name) < 0 && e2.fieldPermissionMap) {
|
|
142
142
|
const s3 = e2.fieldPermissionMap.get("all_fields");
|
|
143
|
-
false === (s3 == null ? void 0 : s3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled",
|
|
143
|
+
false === (s3 == null ? void 0 : s3.canEdit) && ((_a = t2.runtime) == null ? void 0 : _a.props) && (t2.runtime.props.state = "disabled", o2 = true);
|
|
144
144
|
}
|
|
145
145
|
if (s2) {
|
|
146
|
-
const
|
|
147
|
-
if (e2.rules || (e2.rules = {}), t2.props.rules && t2.props.rules.length > 0 && (e2.rules[
|
|
146
|
+
const r2 = i(s2);
|
|
147
|
+
if (e2.rules || (e2.rules = {}), t2.props.rules && t2.props.rules.length > 0 && (e2.rules[r2] || (e2.rules[r2] = []), t2.props.rules.forEach((e3) => {
|
|
148
148
|
d(e3);
|
|
149
|
-
}), e2.rules[
|
|
150
|
-
const s3 = e2.fieldPermissionMap.get(
|
|
149
|
+
}), e2.rules[r2] = t2.props.rules), n2 && !o2 && "button-detail" !== t2.name && e2.fieldPermissionMap) {
|
|
150
|
+
const s3 = e2.fieldPermissionMap.get(r2);
|
|
151
151
|
t2.runtime.props || (t2.runtime.props = {}), s3 ? false === s3.canEdit ? t2.runtime.props.state = "disabled" : s3.canEdit && (t2.runtime.props.state = "", t2.runtime.props.required = true) : t2.runtime.props.state = "";
|
|
152
152
|
}
|
|
153
|
-
((_b = t2.props) == null ? void 0 : _b.customRuleEvents) && (e2.customRuleEvents || (e2.customRuleEvents = []), e2.customRuleEvents.push({ prop:
|
|
153
|
+
((_b = t2.props) == null ? void 0 : _b.customRuleEvents) && (e2.customRuleEvents || (e2.customRuleEvents = []), e2.customRuleEvents.push({ prop: r2, events: t2.props.customRuleEvents }));
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
function _(e2, t2) {
|
|
@@ -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,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
var o = ((o2) => (o2.AUTHENTICATED = "AUTHENTICATED", o2.ANONYMOUS = "ANONYMOUS", o2.AUTHORIZED = "AUTHORIZED", o2))(o || {});
|
|
2
|
-
const e = { page: { label: "页面", functions: [{ label: "页面", path: "temp" }] }, gets: { group: "表单标准功能", label: "获取表单数据", functions: [{ funcType: "AUTHENTICATED", path: "/commons/gets$POST" }] }, workflowGets: { group: "标准流程", label: "获取表单及流程数据", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/gets$POST" }] }, save: { group: "表单标准功能", label: "暂存", functions: [{ code: "create", label: "暂存", path: "/commons$POST" }, { code: "update", label: "修改", path: "/commons$POST" }] }, submit: { group: "表单标准功能", label: "提交", functions: [{ path: "/commons/submits$POST" }] }, exportForm: { group: "表单标准功能", label: "导出报告", functions: [{ path: "/commons/export-reports$POST" }] }, exportPDF: { group: "表单标准功能", label: "导出PDF", functions: [{ path: "/commons/exportPDF$POST" }] }, agree: { group: "表单标准功能", label: "同意", functions: [{ path: "/commons/approves$POST" }] }, disagree: { group: "表单标准功能", label: "不同意", functions: [{ path: "/commons/refuses$POST" }] }, back: { group: "表单标准功能", label: "返回", functions: [] }, workflowSave: { group: "流程表单功能", label: "暂存", functions: [{ label: "暂存", code: "save", funcType: "AUTHENTICATED", path: "/workflow-commons$POST" }, { label: "修改", code: "update", funcType: "AUTHENTICATED", path: "/workflow-commons$PUT" }] }, submitProcess: { group: "流程表单功能", label: "提交流程", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/submit$POST" }] }, submitTask: { group: "流程表单功能", label: "提交任务", functions: [{ funcType: "AUTHENTICATED", code: "completeTask.submit", path: "/workflow-commons/complete-tasks$POST" }] }, approve: { group: "流程表单功能", label: "同意", functions: [{ funcType: "AUTHENTICATED", code: "completeTask.approve", path: "/workflow-commons/complete-tasks$POST" }] }, refuse: { group: "流程表单功能", label: "不同意", functions: [{ funcType: "AUTHENTICATED", code: "completeTask.refuse", path: "/workflow-commons/complete-tasks$POST" }] }, assign: { group: "流程表单功能", label: "指派", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/assigns$POST" }] }, drawTask: { group: "流程表单功能", label: "领取", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/draw-tasks$POST" }] }, abandonReceive: { group: "流程表单功能", label: "放弃领取", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/abandon-receives$POST" }] }, readed: { group: "流程表单功能", label: "已阅", functions: [{ funcType: "AUTHENTICATED", code: "completeTask.readed", path: "/workflow-commons/complete-tasks$POST" }] }, agreement: { group: "流程表单功能", label: "赞成", functions: [{ funcType: "AUTHENTICATED", code: "completeTask.agreement", path: "/workflow-commons/complete-tasks$POST" }] }, oppose: { group: "流程表单功能", label: "反对", functions: [{ funcType: "AUTHENTICATED", code: "completeTask.oppose", path: "/workflow-commons/complete-tasks$POST" }] }, kiken: { group: "流程表单功能", label: "弃权", functions: [{ funcType: "AUTHENTICATED", code: "completeTask.kiken", path: "/workflow-commons/complete-tasks$POST" }] }, addSigner: { group: "流程表单功能", label: "加签", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/add-signers$POST" }] }, removeSigner: { group: "流程表单功能", label: "减签", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/abandon-receives$POST" }, { code: "getRemoveSigners", label: "获取可减签人员", funcType: "AUTHENTICATED", path: "/workflow-commons/get-remove-signers$POST" }] }, copyTask: { group: "流程表单功能", label: "抄送", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/copies$POST" }] }, retrieveTask: { group: "流程表单功能", label: "取回", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/retrieves$POST" }] }, returnToPreviousTask: { group: "流程表单功能", label: "驳回", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/
|
|
2
|
+
const e = { page: { label: "页面", functions: [{ label: "页面", path: "temp" }] }, gets: { group: "表单标准功能", label: "获取表单数据", functions: [{ funcType: "AUTHENTICATED", path: "/commons/gets$POST" }] }, workflowGets: { group: "标准流程", label: "获取表单及流程数据", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/gets$POST" }] }, save: { group: "表单标准功能", label: "暂存", functions: [{ code: "create", label: "暂存", path: "/commons$POST" }, { code: "update", label: "修改", path: "/commons$POST" }] }, submit: { group: "表单标准功能", label: "提交", functions: [{ path: "/commons/submits$POST" }] }, exportForm: { group: "表单标准功能", label: "导出报告", functions: [{ path: "/commons/export-reports$POST" }] }, exportPDF: { group: "表单标准功能", label: "导出PDF", functions: [{ path: "/commons/exportPDF$POST" }] }, agree: { group: "表单标准功能", label: "同意", functions: [{ path: "/commons/approves$POST" }] }, disagree: { group: "表单标准功能", label: "不同意", functions: [{ path: "/commons/refuses$POST" }] }, back: { group: "表单标准功能", label: "返回", functions: [] }, workflowSave: { group: "流程表单功能", label: "暂存", functions: [{ label: "暂存", code: "save", funcType: "AUTHENTICATED", path: "/workflow-commons$POST" }, { label: "修改", code: "update", funcType: "AUTHENTICATED", path: "/workflow-commons$PUT" }] }, submitProcess: { group: "流程表单功能", label: "提交流程", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/submit$POST" }] }, submitTask: { group: "流程表单功能", label: "提交任务", functions: [{ funcType: "AUTHENTICATED", code: "completeTask.submit", path: "/workflow-commons/complete-tasks$POST" }] }, approve: { group: "流程表单功能", label: "同意", functions: [{ funcType: "AUTHENTICATED", code: "completeTask.approve", path: "/workflow-commons/complete-tasks$POST" }] }, refuse: { group: "流程表单功能", label: "不同意", functions: [{ funcType: "AUTHENTICATED", code: "completeTask.refuse", path: "/workflow-commons/complete-tasks$POST" }] }, assign: { group: "流程表单功能", label: "指派", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/assigns$POST" }] }, drawTask: { group: "流程表单功能", label: "领取", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/draw-tasks$POST" }] }, abandonReceive: { group: "流程表单功能", label: "放弃领取", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/abandon-receives$POST" }] }, readed: { group: "流程表单功能", label: "已阅", functions: [{ funcType: "AUTHENTICATED", code: "completeTask.readed", path: "/workflow-commons/complete-tasks$POST" }] }, agreement: { group: "流程表单功能", label: "赞成", functions: [{ funcType: "AUTHENTICATED", code: "completeTask.agreement", path: "/workflow-commons/complete-tasks$POST" }] }, oppose: { group: "流程表单功能", label: "反对", functions: [{ funcType: "AUTHENTICATED", code: "completeTask.oppose", path: "/workflow-commons/complete-tasks$POST" }] }, kiken: { group: "流程表单功能", label: "弃权", functions: [{ funcType: "AUTHENTICATED", code: "completeTask.kiken", path: "/workflow-commons/complete-tasks$POST" }] }, addSigner: { group: "流程表单功能", label: "加签", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/add-signers$POST" }] }, removeSigner: { group: "流程表单功能", label: "减签", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/abandon-receives$POST" }, { code: "getRemoveSigners", label: "获取可减签人员", funcType: "AUTHENTICATED", path: "/workflow-commons/get-remove-signers$POST" }] }, copyTask: { group: "流程表单功能", label: "抄送", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/copies$POST" }] }, retrieveTask: { group: "流程表单功能", label: "取回", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/retrieves$POST" }] }, returnToPreviousTask: { group: "流程表单功能", label: "驳回", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/return-to-previous-tasks$POST" }] }, returnTaskTo: { group: "流程表单功能", label: "退回", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/returnTaskTo$POST" }, { code: "returnableTaskInformation", label: "获取可退回环节信息", funcType: "AUTHENTICATED", path: "/workflow-commons/returnable-task/{taskId}$POST" }] }, endInstance: { group: "流程表单功能", label: "强制结束", functions: [{ funcType: "AUTHENTICATED", path: "/workflow-commons/end-instance$POST" }] }, listData: { group: "列表功能", label: "列表数据", functions: [{ funcType: "AUTHENTICATED", path: "/commons/list$POST" }] }, listSubData: { group: "列表功能", label: "列表子级", functions: [{ funcType: "AUTHENTICATED", path: "/commons/list-subs$POST" }] }, saveList: { group: "列表功能", label: "暂存", props: { base: { type: "info", plain: true } }, functions: [{ code: "create", label: "暂存", path: "/commons$POST" }, { funcType: "AUTHENTICATED", code: "update", label: "修改", path: "/commons$POST" }] }, delete: { group: "列表功能", label: "删除", props: { base: { type: "danger", plain: true } }, functions: [{ path: "/commons/{tableName}$DELETE" }] }, submitList: { group: "列表功能", label: "提交", props: { base: { type: "primary" } }, functions: [{ path: "/commons/batch-submits$POST" }] }, agreeList: { group: "列表功能", label: "同意", props: { base: { type: "success", plain: true } }, functions: [{ path: "/commons/batch-approves$POST" }] }, disagreeList: { group: "列表功能", label: "不同意", props: { base: { type: "danger", plain: true } }, functions: [{ path: "/commons/batch-refuses$POST" }] }, import: { group: "列表功能", label: "导入", props: { base: { type: "primary", plain: true } }, functions: [{ path: "/commons/import-data$POST" }] }, export: { group: "列表功能", label: "导出", props: { base: { type: "success", plain: true } }, functions: [{ path: "/commons/export-list-data$POST" }] }, search: { group: "列表功能", label: "查询", functions: [] }, showMobileSearch: { group: "列表功能", label: "显示移动端查询区域", functions: [] }, downloadTemplate: { group: "列表功能", label: "下载导入模板", functions: [{ path: "/commons/download-files$GET" }] }, lineEditCreate: { group: "列表行编辑功能", label: "新建", props: { base: { type: "primary" } }, functions: [{ code: "create", label: "暂存", path: "/commons$POST" }] }, lineEditSave: { group: "列表行编辑功能", label: "保存", props: { base: { type: "success", text: true } }, functions: [{ code: "create", label: "保存", path: "/commons$POST" }, { code: "update", label: "修改", path: "/commons$POST" }] }, lineEditDelete: { group: "列表行编辑功能", label: "删除", props: { base: { type: "danger", text: true } }, functions: [{ code: "delete", path: "/commons/{tableName}$DELETE" }] }, lineEditUpdate: { group: "列表行编辑功能", label: "修改", props: { base: { type: "primary", text: true } }, functions: [{ code: "update", label: "修改", path: "/commons$POST" }] }, restoreEdit: { group: "列表行编辑功能", label: "取消", props: { base: { type: "info", text: true } }, functions: [] } }, s = {};
|
|
3
3
|
function n(o2) {
|
|
4
4
|
return o2 ? e[o2] : void 0;
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function a(o2) {
|
|
7
7
|
if (!o2) return;
|
|
8
8
|
let n2 = s[o2];
|
|
9
9
|
if (null == n2) {
|
|
10
10
|
for (const s2 in e) {
|
|
11
|
-
const
|
|
12
|
-
if (
|
|
13
|
-
for (const e2 of
|
|
11
|
+
const a2 = e[s2].functions;
|
|
12
|
+
if (a2) {
|
|
13
|
+
for (const e2 of a2) {
|
|
14
14
|
if (o2 === (e2.code ? e2.code : s2)) {
|
|
15
15
|
n2 = e2;
|
|
16
16
|
break;
|
|
@@ -25,6 +25,6 @@ function t(o2) {
|
|
|
25
25
|
}
|
|
26
26
|
export {
|
|
27
27
|
o as FuncType,
|
|
28
|
-
|
|
28
|
+
a as getFunctionInfo,
|
|
29
29
|
n as getStandPermissionInfo
|
|
30
30
|
};
|
|
@@ -24,7 +24,11 @@ function u(t2, i2, s2, n2) {
|
|
|
24
24
|
const o2 = e(i3, t2);
|
|
25
25
|
o2 && (u3.permission = o2);
|
|
26
26
|
}
|
|
27
|
-
u3.label = o(u3.title), u3.sourceButton = { uuid: i3.uuid }, r3.props = u3, void 0 !== n2
|
|
27
|
+
if (u3.label = o(u3.title), u3.sourceButton = { uuid: i3.uuid }, r3.props = u3, void 0 !== n2) {
|
|
28
|
+
const t3 = n2(i3);
|
|
29
|
+
r3.onClick = (t3 == null ? void 0 : t3.onClick) ?? t3, r3.eventName = t3 == null ? void 0 : t3.eventName;
|
|
30
|
+
}
|
|
31
|
+
s2.push(r3);
|
|
28
32
|
});
|
|
29
33
|
}
|
|
30
34
|
function l(t2, e2, o2, n2) {
|
|
@@ -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 {
|