super-page-runtime 2.3.31-sit1 → 2.3.31
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/api/page-expose-util.js +131 -131
- package/dist/es/components/runtime/utils/events/event-util.js +3 -3
- package/dist/es/components/runtime/utils/events/print-label.js +26 -25
- package/dist/es/components/runtime/utils/events/standard-event.js +135 -135
- package/dist/es/components/runtime/utils/events/validator-util.d.ts +0 -1
- package/dist/es/components/runtime/utils/events/validator-util.js +18 -14
- package/dist/es/components/runtime/utils/page-helper-util.js +162 -162
- package/dist/es/components/runtime/utils/page-init-util.js +41 -39
- package/dist/es/components/runtime/utils/table-utils.js +1 -1
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +10 -6
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +8 -6
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +98 -93
- package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue.js +13 -13
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +11 -9
- package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +2 -0
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +5 -5
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +12 -10
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +16 -16
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +6 -6
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +35 -35
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +4 -4
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +38 -37
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +7 -5
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +4 -3
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +48 -47
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +11 -11
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +16 -14
- package/dist/es/components/runtime/views/assemblys/page-bottom.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +4 -4
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime-dialog.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/home-chart.vue.js +7 -7
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +1 -0
- package/dist/es/components/runtime/views/super-page.vue2.js +32 -31
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/package.json +2 -2
|
@@ -16,7 +16,6 @@ export declare function getWorkflowRules(pageContext: any): any;
|
|
|
16
16
|
export declare function updateFormItemEditState(pageContext: PageContext, customRules: any[]): void;
|
|
17
17
|
export declare function disabledAllFields(pageContext: PageContext): void;
|
|
18
18
|
export declare function dynamicControlTableEdit(pageContext: PageContext, customRules: any[], tableCode?: any): void;
|
|
19
|
-
export declare function updateComponentDisplayState(ref: any, item: any): void;
|
|
20
19
|
/**
|
|
21
20
|
* 布尔型和日期校验需要自定义,为了兼容oracle和mysql数据库,
|
|
22
21
|
* 数字类型的校验,防止select、radio、checkbox传字符串类型的数字
|
|
@@ -187,7 +187,7 @@ function h(e2, s2, r2) {
|
|
|
187
187
|
}), r3.includes(false) && e6(false), n2.length > 0 ? Promise.all(n2).then((t3) => {
|
|
188
188
|
t3.includes(false) ? e6(false) : e6(true);
|
|
189
189
|
}).catch((t3) => {
|
|
190
|
-
e6(false);
|
|
190
|
+
console.error(t3), e6(false);
|
|
191
191
|
}) : e6(true);
|
|
192
192
|
});
|
|
193
193
|
return null;
|
|
@@ -258,7 +258,8 @@ function P(e2, t2) {
|
|
|
258
258
|
const r2 = t2.filter((e3) => "_all_fields" === e3.name);
|
|
259
259
|
r2 && r2.length > 0 && E(e2, r2[0]), t2.forEach((t3) => {
|
|
260
260
|
if ("_all_fields" !== t3.name) {
|
|
261
|
-
|
|
261
|
+
const n3 = s(e2, t3.name);
|
|
262
|
+
C(e2, n3, t3);
|
|
262
263
|
}
|
|
263
264
|
});
|
|
264
265
|
}
|
|
@@ -267,9 +268,9 @@ function k(e2) {
|
|
|
267
268
|
}
|
|
268
269
|
function E(e2, t2) {
|
|
269
270
|
const s2 = r(e2);
|
|
270
|
-
if (s2) for (const
|
|
271
|
-
const
|
|
272
|
-
C(
|
|
271
|
+
if (s2) for (const n2 in s2) {
|
|
272
|
+
const r2 = s2[n2];
|
|
273
|
+
C(e2, r2 ? r2.value : r2, t2);
|
|
273
274
|
}
|
|
274
275
|
}
|
|
275
276
|
function O(e2, t2, r2) {
|
|
@@ -285,11 +286,15 @@ function O(e2, t2, r2) {
|
|
|
285
286
|
}
|
|
286
287
|
i2.dynamicControlTableEdit(e2, t2, u2);
|
|
287
288
|
}
|
|
288
|
-
function C(e2, t2) {
|
|
289
|
+
function C(e2, t2, s2) {
|
|
289
290
|
var _a, _b, _c;
|
|
290
|
-
if (
|
|
291
|
-
const
|
|
292
|
-
void 0 !==
|
|
291
|
+
if (t2) {
|
|
292
|
+
const n2 = t2.getConfigure();
|
|
293
|
+
if (void 0 !== s2.show && (s2.show ? t2.show() : t2.hide()), void 0 !== s2.required && ((_a = n2 == null ? void 0 : n2.runtime) == null ? void 0 : _a.props) && (n2.runtime.props.required = s2.required), void 0 !== s2.readonly && ((_b = n2 == null ? void 0 : n2.runtime) == null ? void 0 : _b.props) && (s2.readonly ? n2.runtime.props.state = "readonly" : n2.runtime.props.state = "enabled"), void 0 !== s2.disabled && n2 && (((_c = n2 == null ? void 0 : n2.runtime) == null ? void 0 : _c.props) && (s2.disabled ? n2.runtime.props.state = "disabled" : n2.runtime.props.state = "enabled"), "table" === n2.name)) {
|
|
294
|
+
t2.changeOperationAddState(false);
|
|
295
|
+
const s3 = t2 ? t2.getTableUuid() : null, n3 = e2.code, r2 = e2.version, i2 = f(n3, r2, s3), l2 = [{ name: "_all_fields", disabled: true }];
|
|
296
|
+
t2.dynamicControlTableEdit(e2, l2, i2);
|
|
297
|
+
}
|
|
293
298
|
}
|
|
294
299
|
}
|
|
295
300
|
function j(e2) {
|
|
@@ -298,14 +303,14 @@ function j(e2) {
|
|
|
298
303
|
t2 && (e2.validator = t2.validator);
|
|
299
304
|
}
|
|
300
305
|
const x = { boolean: { validator: function(e2, t2, s2) {
|
|
301
|
-
return true ===
|
|
306
|
+
return true === T(e2, t2) && ("number" == typeof t2 && (1 === t2 || 0 === t2) || "boolean" == typeof t2 && (true === t2 || false === t2));
|
|
302
307
|
} }, date: { validator: function(e2, t2, s2) {
|
|
303
|
-
if (true !==
|
|
308
|
+
if (true !== T(e2, t2)) return false;
|
|
304
309
|
const n2 = new Date(t2);
|
|
305
310
|
return !isNaN(n2.getTime());
|
|
306
311
|
} }, number: { validator: function(e2, t2, s2) {
|
|
307
|
-
return true ===
|
|
308
|
-
} } },
|
|
312
|
+
return true === T(e2, t2) && (("string" != typeof t2 || "" !== t2.trim()) && ("number" == typeof t2 || !isNaN(Number(t2))));
|
|
313
|
+
} } }, T = (e2, t2) => null != t2 && "" !== t2 || !e2.required;
|
|
309
314
|
export {
|
|
310
315
|
k as disabledAllFields,
|
|
311
316
|
O as dynamicControlTableEdit,
|
|
@@ -315,7 +320,6 @@ export {
|
|
|
315
320
|
w as packageCustomRules,
|
|
316
321
|
j as packageCustomValidator,
|
|
317
322
|
c as setObjectPropRule,
|
|
318
|
-
C as updateComponentDisplayState,
|
|
319
323
|
P as updateFormItemEditState,
|
|
320
324
|
g as validateDataModelFunc,
|
|
321
325
|
d as validator
|
|
@@ -4,96 +4,96 @@ 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(t, e,
|
|
8
|
-
return getComponentOptionConfigsBase(t, (e == null ? void 0 : e.systemCode) ? e.systemCode :
|
|
7
|
+
function getComponentOptionConfigs(t, e, o, n) {
|
|
8
|
+
return getComponentOptionConfigsBase(t, (e == null ? void 0 : e.systemCode) ? e.systemCode : o, (e == null ? void 0 : e.systemVersion) ? e == null ? void 0 : e.systemVersion : n);
|
|
9
9
|
}
|
|
10
|
-
function getComponentOptionConfigsBase(t, e,
|
|
10
|
+
function getComponentOptionConfigsBase(t, e, o) {
|
|
11
11
|
if (!t.props || !t.props.dataOrigin) return;
|
|
12
12
|
if (t.name && "table" === t.name) return;
|
|
13
|
-
const
|
|
14
|
-
if ("optionGroup" ==
|
|
15
|
-
else if ("dynamicData" ==
|
|
16
|
-
else if ("dataTable" ==
|
|
17
|
-
a.filterType =
|
|
18
|
-
const t2 = getTableQueryInfo(
|
|
13
|
+
const n = t.props.dataOrigin, a = { uuid: t.uuid };
|
|
14
|
+
if ("optionGroup" == n.optionValueSetType) a.type = "optionGroup", a.props = { code: n.optionGroup };
|
|
15
|
+
else if ("dynamicData" == n.optionValueSetType) a.type = "dynamicData", a.filterType = n.filterType, a.props = { code: n.dynamicDataSourceCode };
|
|
16
|
+
else if ("dataTable" == n.optionValueSetType) {
|
|
17
|
+
a.filterType = n.filterType;
|
|
18
|
+
const t2 = getTableQueryInfo(n, e, o);
|
|
19
19
|
Object.assign(a, t2);
|
|
20
|
-
} else if ("service" ==
|
|
21
|
-
a.filterType =
|
|
22
|
-
const t2 = getServiceQueryInfo(
|
|
20
|
+
} else if ("service" == n.optionValueSetType) {
|
|
21
|
+
a.filterType = n.filterType;
|
|
22
|
+
const t2 = getServiceQueryInfo(n, e, o);
|
|
23
23
|
Object.assign(a, t2);
|
|
24
24
|
}
|
|
25
25
|
return a.type ? a : void 0;
|
|
26
26
|
}
|
|
27
|
-
function getTableQueryInfo(t, e,
|
|
28
|
-
const
|
|
29
|
-
if (
|
|
27
|
+
function getTableQueryInfo(t, e, o) {
|
|
28
|
+
const n = { type: "dataTable" };
|
|
29
|
+
if (n.valueLabelSwitch = !!t.valueLabelSwitch, n.importValidateSwitch = !!t.importValidateSwitch, n.props = { tableName: t.tableName, systemCode: t.tableSysCode ? t.tableSysCode : e, systemVersion: t.tableSysVersion ? t.tableSysVersion : o }, t.sortFields) {
|
|
30
30
|
const e2 = [];
|
|
31
|
-
for (const
|
|
32
|
-
|
|
31
|
+
for (const o2 of t.sortFields) o2.name && e2.push({ prop: o2.name, order: o2.type ? o2.type : "asc" });
|
|
32
|
+
n.props.sorts = e2;
|
|
33
33
|
}
|
|
34
34
|
const a = [];
|
|
35
35
|
if (t.filterList) {
|
|
36
36
|
const e2 = [];
|
|
37
|
-
for (const
|
|
38
|
-
if (!
|
|
39
|
-
|
|
37
|
+
for (const o2 of t.filterList) {
|
|
38
|
+
if (!o2.propName) continue;
|
|
39
|
+
o2.propDbName || (o2.propDbName = o2.propName);
|
|
40
40
|
const t2 = {};
|
|
41
|
-
Object.assign(t2,
|
|
42
|
-
const
|
|
43
|
-
for (const t3 of
|
|
44
|
-
|
|
41
|
+
Object.assign(t2, o2);
|
|
42
|
+
const n2 = getParamNames(o2.propValue);
|
|
43
|
+
for (const t3 of n2) t3 && (t3.startsWith("${data.") || t3.startsWith("${task.") || t3.startsWith("${page.")) && (a.includes(t3) || a.push(t3));
|
|
44
|
+
o2.propValue, e2.push(t2);
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
n.props.searchForm = e2;
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
n.props.monitorFields = a;
|
|
49
49
|
const r = [];
|
|
50
|
-
if (t.tableValueField && (
|
|
51
|
-
return
|
|
50
|
+
if (t.tableValueField && (n.props.valueField = t.tableValueField), t.tableLableField && -1 == r.indexOf(t.tableLableField) && (n.props.lableField = t.tableLableField), t.autoSets) for (const e2 of t.autoSets) e2.source && -1 == r.indexOf(e2.source) && r.push(e2.source);
|
|
51
|
+
return n.props.queryFields = r, n.props.pageSize = t.displayQuantity, n;
|
|
52
52
|
}
|
|
53
|
-
function getServiceQueryInfo(t, e,
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
53
|
+
function getServiceQueryInfo(t, e, o) {
|
|
54
|
+
const n = { type: "service" };
|
|
55
|
+
if (n.valueLabelSwitch = !!t.valueLabelSwitch, n.importValidateSwitch = !!t.importValidateSwitch, n.props = { serivceCode: t.serviceCode, systemCode: t.tableSysCode ? t.tableSysCode : e, systemVersion: t.tableSysVersion ? t.tableSysVersion : o }, t.serviceInputs) {
|
|
56
56
|
const e2 = [];
|
|
57
|
-
for (const
|
|
58
|
-
if (!
|
|
57
|
+
for (const o2 of t.serviceInputs) {
|
|
58
|
+
if (!o2.name || o2.value) continue;
|
|
59
59
|
const t2 = {};
|
|
60
|
-
Object.assign(t2,
|
|
60
|
+
Object.assign(t2, o2), e2.push(t2);
|
|
61
61
|
}
|
|
62
|
-
|
|
62
|
+
n.props.inputs = e2;
|
|
63
63
|
}
|
|
64
|
-
return
|
|
64
|
+
return n.props.dataSetField = t.serviceDataSetField, n.props.valueField = t.serviceValueField, n.props.labelField = t.serviceLabelField, n;
|
|
65
65
|
}
|
|
66
|
-
function updateChartDatasources(t, e,
|
|
66
|
+
function updateChartDatasources(t, e, o, n) {
|
|
67
67
|
return new Promise((a, r) => {
|
|
68
68
|
if (!e || 0 == e.length) return void r(new Error("无需查询的统计图配置!"));
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
73
|
-
const e3 =
|
|
74
|
-
e3 && (
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
}), delete
|
|
69
|
+
const i = deepCopy(e);
|
|
70
|
+
i.forEach((e2) => {
|
|
71
|
+
const o2 = e2.services;
|
|
72
|
+
if (o2 && o2.length > 0) {
|
|
73
|
+
const e3 = o2[0].serviceInputs;
|
|
74
|
+
e3 && (o2[0].serviceInParams = {}, e3.forEach((e4) => {
|
|
75
|
+
const n2 = e4.name, a2 = e4.value;
|
|
76
|
+
o2[0].serviceInParams[n2] = getValueFromVariable(t.entity, a2);
|
|
77
|
+
}), delete o2[0].serviceInputs);
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
|
-
const
|
|
81
|
-
|
|
80
|
+
const s = t.entity ? t.entity : {}, u = {};
|
|
81
|
+
s.request && Object.assign(u, s.request), s.page && Object.assign(u, s.page), o && Object.assign(u, o);
|
|
82
82
|
const l = {};
|
|
83
|
-
|
|
84
|
-
const c = { entityMap:
|
|
83
|
+
s.task && Object.assign(l, s.task);
|
|
84
|
+
const c = { entityMap: s.data, additionalParamMap: u, taskMap: l, dataSourceList: i, systemCode: t.systemCode, pageCode: t.code }, p = t.backendUrl, f = getBaseUrl(p, t.isTest) + "/common/common-data/find-chart-datas";
|
|
85
85
|
http.post(f, c, { headers: { customSystem: t.systemCode } }).then((e2) => {
|
|
86
86
|
var _a, _b;
|
|
87
87
|
t.chartDataSourceMap || (t.chartDataSourceMap = {});
|
|
88
|
-
for (const
|
|
89
|
-
t.chartDataSourceMap[
|
|
90
|
-
const a2 = getComponentRef(t,
|
|
88
|
+
for (const o2 in e2) {
|
|
89
|
+
t.chartDataSourceMap[o2] = e2[o2];
|
|
90
|
+
const a2 = getComponentRef(t, o2);
|
|
91
91
|
if (a2) {
|
|
92
92
|
const r2 = a2.getConfigure();
|
|
93
|
-
if ((!
|
|
94
|
-
const
|
|
95
|
-
let
|
|
96
|
-
r2.serviceDataField ?
|
|
93
|
+
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)) {
|
|
94
|
+
const n2 = e2[o2] && e2[o2].length > 0 ? e2[o2][0] : {}, a3 = n2 && n2.result ? n2.result : {};
|
|
95
|
+
let i2 = null;
|
|
96
|
+
r2.serviceDataField ? i2 = a3[r2.serviceDataField] : a3 && (i2 = Array.isArray(a3) ? a3 : [a3]), i2 || (i2 = []), setValueForVariableName(t.entity, r2.runtime.dataConfig.resultSet, i2);
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
}
|
|
@@ -104,23 +104,23 @@ function updateChartDatasources(t, e, n, o) {
|
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
function updateChartDatasourcesByComponent(t, e) {
|
|
107
|
-
const
|
|
108
|
-
|
|
107
|
+
const o = t.initChartServiceConfigs.find((t2) => t2.uuid === e);
|
|
108
|
+
o && updateChartDatasources(t, [o], null, false);
|
|
109
109
|
}
|
|
110
|
-
function updateOptionDatasources(t, e,
|
|
111
|
-
return new Promise((
|
|
110
|
+
function updateOptionDatasources(t, e, o) {
|
|
111
|
+
return new Promise((n, a) => {
|
|
112
112
|
if (!e || 0 == e.length) return void a(new Error("无需查询的配置!"));
|
|
113
|
-
const r = t.entity ? t.entity : {},
|
|
114
|
-
r.request && Object.assign(
|
|
115
|
-
const
|
|
116
|
-
http.post(l,
|
|
113
|
+
const r = t.entity ? t.entity : {}, i = {};
|
|
114
|
+
r.request && Object.assign(i, r.request), r.page && Object.assign(i, r.page), i.query = o;
|
|
115
|
+
const s = { entityMap: r.data, additionalParamMap: i, dataSourceList: e, systemCode: t.systemCode, query: o }, u = t.backendUrl, l = getBaseUrl(u, t.isTest) + "/common/common-data/find-datas";
|
|
116
|
+
http.post(l, s).then((e2) => {
|
|
117
117
|
t.optionSourceMap || (t.optionSourceMap = {});
|
|
118
|
-
for (const
|
|
119
|
-
t.optionSourceMap[
|
|
120
|
-
const
|
|
121
|
-
|
|
118
|
+
for (const o2 in e2) {
|
|
119
|
+
t.optionSourceMap[o2] = e2[o2];
|
|
120
|
+
const n2 = getComponentRef(t, o2);
|
|
121
|
+
n2 && n2.updateOptions && n2.updateOptions(e2[o2]);
|
|
122
122
|
}
|
|
123
|
-
|
|
123
|
+
n(e2);
|
|
124
124
|
}).catch((t2) => {
|
|
125
125
|
a(t2);
|
|
126
126
|
});
|
|
@@ -130,8 +130,8 @@ function getOptionDatasFromPage(t, e) {
|
|
|
130
130
|
return getComponentOptionDatasFromPage(t, e.uuid);
|
|
131
131
|
}
|
|
132
132
|
function getComponentOptionDatasFromPage(t, e) {
|
|
133
|
-
const
|
|
134
|
-
return
|
|
133
|
+
const o = getOptionDatasSourceMap(t)[e];
|
|
134
|
+
return o || [];
|
|
135
135
|
}
|
|
136
136
|
function getOptionDatasSourceMap(t) {
|
|
137
137
|
if (!t || !t.optionSourceMap) return {};
|
|
@@ -142,63 +142,63 @@ function getChartDatasFromPage(t, e) {
|
|
|
142
142
|
if (!t || !t.chartDataSourceMap || !e) return null;
|
|
143
143
|
return t.chartDataSourceMap[e.uuid];
|
|
144
144
|
}
|
|
145
|
-
function queryOptionDatasources(t, e,
|
|
146
|
-
return updateOptionDatasources(t, e ? [e] : [],
|
|
145
|
+
function queryOptionDatasources(t, e, o) {
|
|
146
|
+
return updateOptionDatasources(t, e ? [e] : [], o);
|
|
147
147
|
}
|
|
148
|
-
function autoSetAfterSelect(t, e,
|
|
149
|
-
if (!
|
|
148
|
+
function autoSetAfterSelect(t, e, o, n, a = []) {
|
|
149
|
+
if (!o || 0 == o.length) return;
|
|
150
150
|
const r = e.entity ? e.entity : {};
|
|
151
|
-
for (const t2 of
|
|
151
|
+
for (const t2 of o) {
|
|
152
152
|
if (!t2.source || !t2.target || a.includes(t2.target)) continue;
|
|
153
|
-
const e2 = getValuesByField(
|
|
154
|
-
let
|
|
155
|
-
if (!
|
|
156
|
-
|
|
157
|
-
const
|
|
158
|
-
setVariableValue(r,
|
|
153
|
+
const e2 = getValuesByField(n, t2.source);
|
|
154
|
+
let o2 = t2.target;
|
|
155
|
+
if (!o2 || !o2.startsWith("${")) continue;
|
|
156
|
+
o2 = o2.substring(2, o2.length - 1);
|
|
157
|
+
const i = o2.split(".");
|
|
158
|
+
setVariableValue(r, i, null == e2 ? null : e2.join(","));
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
function getValuesByField(t, e) {
|
|
162
162
|
if (t) {
|
|
163
|
-
const
|
|
164
|
-
for (const
|
|
165
|
-
let t2 =
|
|
166
|
-
null != t2 && null != t2 || (t2 = ""),
|
|
163
|
+
const o = [];
|
|
164
|
+
for (const n of t) {
|
|
165
|
+
let t2 = n[e];
|
|
166
|
+
null != t2 && null != t2 || (t2 = ""), o.push(t2);
|
|
167
167
|
}
|
|
168
|
-
return
|
|
168
|
+
return o;
|
|
169
169
|
}
|
|
170
170
|
return null;
|
|
171
171
|
}
|
|
172
172
|
function getVariableValue(t, e) {
|
|
173
173
|
if (!t || !e || 0 == e.length) return;
|
|
174
|
-
let
|
|
174
|
+
let o = t;
|
|
175
175
|
for (let t2 = 0; t2 < e.length; t2++) {
|
|
176
|
-
if (null ==
|
|
177
|
-
|
|
176
|
+
if (null == o) return o;
|
|
177
|
+
o = o[e[t2]];
|
|
178
178
|
}
|
|
179
|
-
return
|
|
179
|
+
return o;
|
|
180
180
|
}
|
|
181
|
-
function setValueForVariableName(t, e,
|
|
181
|
+
function setValueForVariableName(t, e, o) {
|
|
182
182
|
if (!e || !e.startsWith("${")) return;
|
|
183
|
-
setVariableValue(t, (e = e.substring(2, e.length - 1)).split("."),
|
|
183
|
+
setVariableValue(t, (e = e.substring(2, e.length - 1)).split("."), o);
|
|
184
184
|
}
|
|
185
|
-
function setVariableValue(t, e,
|
|
185
|
+
function setVariableValue(t, e, o) {
|
|
186
186
|
if (!t || !e || 0 == e.length) return;
|
|
187
|
-
let
|
|
187
|
+
let n = t;
|
|
188
188
|
for (let t2 = 0; t2 < e.length; t2++) {
|
|
189
189
|
const a = e[t2];
|
|
190
|
-
t2 + 1 === e.length ?
|
|
190
|
+
t2 + 1 === e.length ? n[a] = void 0 === o ? null : o : (void 0 === n[a] && (n[a] = {}), n = n[a]);
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
function setVariableValueWithProp(t, e,
|
|
193
|
+
function setVariableValueWithProp(t, e, o) {
|
|
194
194
|
if (!t || !e) return;
|
|
195
|
-
setVariableValue(t, e.split("."),
|
|
195
|
+
setVariableValue(t, e.split("."), o);
|
|
196
196
|
}
|
|
197
197
|
function formatVariableValue(t, e) {
|
|
198
198
|
if (!t || "" == e || null == e || null == e) return e;
|
|
199
|
-
const
|
|
200
|
-
for (const t2 in
|
|
201
|
-
const a =
|
|
199
|
+
const o = t.entity ? t.entity : {}, n = getParamNames(e);
|
|
200
|
+
for (const t2 in n) {
|
|
201
|
+
const a = n[t2], r = getValueFromVariable(o, a);
|
|
202
202
|
if (r && "[object Date]" === Object.prototype.toString.call(r)) return dayjs(r).format("YYYY-MM-DD HH:mm:ss");
|
|
203
203
|
if (r && "number" == typeof r) return r;
|
|
204
204
|
e = e.replace(a, null == r ? "" : r);
|
|
@@ -210,60 +210,60 @@ function getParamNames(t) {
|
|
|
210
210
|
const e = t.match(/\$\{[^\{|\}]+\}/g);
|
|
211
211
|
return e || [];
|
|
212
212
|
}
|
|
213
|
-
function formatValueByType(t, e,
|
|
213
|
+
function formatValueByType(t, e, o) {
|
|
214
214
|
if (!e || "" == t || null == t || null == t) return t;
|
|
215
|
-
if (
|
|
215
|
+
if (o = o || {}, "number" == e || "percent" == e) {
|
|
216
216
|
if (isNaN(t)) return t;
|
|
217
|
-
let
|
|
218
|
-
if ((null ==
|
|
217
|
+
let n = parseInt(o.decimalDigit);
|
|
218
|
+
if ((null == n || isNaN(n)) && (n = -1), t = parseFloat(t), "percent" == e && (t *= 100), n > -1 && (t = parseFloat(t.toFixed(n))), "percent" == e) t += "%";
|
|
219
219
|
else {
|
|
220
|
-
if (
|
|
220
|
+
if (o.thousandsSeparator) {
|
|
221
221
|
const e2 = t.toString().split(".");
|
|
222
222
|
e2[0] = e2[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), t = e2.length > 1 ? e2.join(".") : e2[0];
|
|
223
223
|
}
|
|
224
|
-
|
|
224
|
+
o.symbol && (t = o.symbol + "" + t);
|
|
225
225
|
}
|
|
226
226
|
return t;
|
|
227
227
|
}
|
|
228
228
|
if ("date" == e || "time" == e) {
|
|
229
|
-
let
|
|
230
|
-
return "date" == e ? (
|
|
229
|
+
let n = "";
|
|
230
|
+
return "date" == e ? (n = o.dateFormat, n || (n = "YYYY-MM-DD")) : (n = o.timeFormat, n || (n = "HH:mm:ss")), dayjs(t).format(n);
|
|
231
231
|
}
|
|
232
|
-
return "custom" == e &&
|
|
232
|
+
return "custom" == e && o.formatEventUuid, t;
|
|
233
233
|
}
|
|
234
|
-
function getValueFromVariable(t, e,
|
|
234
|
+
function getValueFromVariable(t, e, o) {
|
|
235
235
|
if (null == e || null == e) return e;
|
|
236
236
|
if (e.startsWith("${") && e.endsWith("}")) {
|
|
237
|
-
let
|
|
238
|
-
if (
|
|
239
|
-
else if (
|
|
240
|
-
else if (
|
|
241
|
-
else if (
|
|
242
|
-
else if (
|
|
243
|
-
else if (
|
|
237
|
+
let n = e.substring(2, e.length - 1), a = null, r = null;
|
|
238
|
+
if (n.startsWith("data.")) n = n.substring(5), r = t.data, a = "data";
|
|
239
|
+
else if (n.startsWith("page.")) n = n.substring(5), a = "page", r = t.page;
|
|
240
|
+
else if (n.startsWith("task.")) n = n.substring(5), a = "task", r = t.task;
|
|
241
|
+
else if (n.startsWith("request.")) n = n.substring(8), a = "request", r = t.request;
|
|
242
|
+
else if (n.startsWith("context.")) n = n.substring(8), a = "context", r = t.context;
|
|
243
|
+
else if (n.startsWith("system.")) n = n.substring(7), a = "system", r = t.system;
|
|
244
244
|
else {
|
|
245
|
-
if (
|
|
246
|
-
|
|
245
|
+
if (n.startsWith("fixed.")) return n.substring(6);
|
|
246
|
+
n.startsWith("row.") && (n = n.substring(4), r = o, a = "row");
|
|
247
247
|
}
|
|
248
|
-
return
|
|
248
|
+
return n ? getValueFromSource(r, n, a) : "";
|
|
249
249
|
}
|
|
250
250
|
return e;
|
|
251
251
|
}
|
|
252
|
-
function getValueFromSource(t, e,
|
|
253
|
-
if ("context" !=
|
|
254
|
-
const
|
|
255
|
-
if (
|
|
256
|
-
const a = e.substring(0,
|
|
257
|
-
let
|
|
258
|
-
return
|
|
252
|
+
function getValueFromSource(t, e, o) {
|
|
253
|
+
if ("context" != o && !t || !e) return;
|
|
254
|
+
const n = e.indexOf(".");
|
|
255
|
+
if (n > -1) {
|
|
256
|
+
const a = e.substring(0, n), r = e.substring(n + 1);
|
|
257
|
+
let i = t[a];
|
|
258
|
+
return i && Array.isArray(i) && i.length > 0 && (i = i[0]), getValueFromSource(i, r, o);
|
|
259
259
|
}
|
|
260
|
-
if ("context" ==
|
|
260
|
+
if ("context" == o) {
|
|
261
261
|
if ("currentDate" == e || "currentTime" == e) return /* @__PURE__ */ new Date();
|
|
262
262
|
if (e.startsWith("currentDate") && e.length > 11) {
|
|
263
|
-
const t2 = e.substring(11),
|
|
264
|
-
let
|
|
263
|
+
const t2 = e.substring(11), o2 = t2.substring(0, 1);
|
|
264
|
+
let n2 = parseInt(t2.substring(1, t2.length - 1), 10);
|
|
265
265
|
const a = t2.substring(t2.length - 1), r = /* @__PURE__ */ new Date();
|
|
266
|
-
return
|
|
266
|
+
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;
|
|
267
267
|
}
|
|
268
268
|
if (!t) return;
|
|
269
269
|
}
|
|
@@ -275,17 +275,17 @@ function caculateShowCondition(pageContext, showConditions, row) {
|
|
|
275
275
|
let conditions = "";
|
|
276
276
|
const maxLen = showConditions.length;
|
|
277
277
|
for (let t = 0; t < maxLen; t++) {
|
|
278
|
-
const e = showConditions[t],
|
|
279
|
-
let
|
|
280
|
-
if (!
|
|
281
|
-
|
|
282
|
-
const a = getValueFromVariable(entityData,
|
|
278
|
+
const e = showConditions[t], o = e.propName;
|
|
279
|
+
let n = e.operator;
|
|
280
|
+
if (!o || "" === o) continue;
|
|
281
|
+
n || (n = "EQ");
|
|
282
|
+
const a = getValueFromVariable(entityData, o, row);
|
|
283
283
|
let r = getValueFromVariable(entityData, e.propValue, row);
|
|
284
|
-
const
|
|
285
|
-
"CONTAIN" !=
|
|
286
|
-
let
|
|
287
|
-
if (
|
|
288
|
-
u = executeExpression(a,
|
|
284
|
+
const i = e.dataType;
|
|
285
|
+
"CONTAIN" != n && "NOT_CONTAIN" != n || a && !a.includes && (n = "CONTAIN" == n ? "EQ" : "NET");
|
|
286
|
+
let s = e.variableIsNull, u;
|
|
287
|
+
if (s || (s = "null"), "IS_NULL" !== n && "IS_NOT_NULL" !== n && (void 0 !== r && "" !== r || (r = null, "null" === s ? n = "IS_NULL" : "notequal" === s ? n = "IS_NOT_NULL" : u = true)), null == u) try {
|
|
288
|
+
u = executeExpression(a, n, r, i);
|
|
289
289
|
} catch (t2) {
|
|
290
290
|
u = false;
|
|
291
291
|
}
|
|
@@ -298,34 +298,34 @@ function caculateShowCondition(pageContext, showConditions, row) {
|
|
|
298
298
|
}
|
|
299
299
|
return !conditions || eval("(" + conditions + ")");
|
|
300
300
|
}
|
|
301
|
-
function monitorFieldChange(t, e,
|
|
302
|
-
if (!
|
|
303
|
-
const
|
|
301
|
+
function monitorFieldChange(t, e, o) {
|
|
302
|
+
if (!o || !t || !e || 0 == e.length) return;
|
|
303
|
+
const n = [], a = [];
|
|
304
304
|
for (let t2 of e) if (t2.startsWith("${")) {
|
|
305
305
|
t2 = t2.substring(2, t2.length - 1);
|
|
306
306
|
const e2 = t2.split(".");
|
|
307
|
-
"page" !== e2[0] && "task" !== e2[0] && "data" !== e2[0] || (
|
|
307
|
+
"page" !== e2[0] && "task" !== e2[0] && "data" !== e2[0] || (n.push(e2), a.includes(e2[0]) || a.push(e2[0]));
|
|
308
308
|
}
|
|
309
|
-
let r = getMonitorFieldValues(
|
|
309
|
+
let r = getMonitorFieldValues(n, t.entity), i = false;
|
|
310
310
|
for (const e2 of a) watch(t.entity[e2], () => {
|
|
311
|
-
|
|
312
|
-
const e3 = getMonitorFieldValues(
|
|
313
|
-
r != e3 && (r = e3,
|
|
311
|
+
i && clearTimeout(i), i = setTimeout(function() {
|
|
312
|
+
const e3 = getMonitorFieldValues(n, t.entity);
|
|
313
|
+
r != e3 && (r = e3, o());
|
|
314
314
|
}, 200);
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
317
|
function getMonitorFieldValues(t, e) {
|
|
318
|
-
let
|
|
319
|
-
for (const
|
|
320
|
-
return
|
|
318
|
+
let o = "";
|
|
319
|
+
for (const n of t) o += "_" + getVariableValue(e, n);
|
|
320
|
+
return o;
|
|
321
321
|
}
|
|
322
322
|
function getFormPropName(t) {
|
|
323
323
|
return t && t.indexOf("${") >= 0 ? t.substring(t.indexOf(".") + 1, t.lastIndexOf("}")) : t;
|
|
324
324
|
}
|
|
325
325
|
function getSizeConfig(t, e) {
|
|
326
|
-
const
|
|
327
|
-
let
|
|
328
|
-
return e.props && e.props.size && e.props.size[
|
|
326
|
+
const o = getPageModeType(t);
|
|
327
|
+
let n;
|
|
328
|
+
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;
|
|
329
329
|
}
|
|
330
330
|
function getPageModeType(t) {
|
|
331
331
|
let e = t.dimensions;
|
|
@@ -341,12 +341,12 @@ function decomposeVariable(t) {
|
|
|
341
341
|
}
|
|
342
342
|
function getModelFieldFromPageContext(t, e) {
|
|
343
343
|
if (!e.modelFieldsMap) return;
|
|
344
|
-
let
|
|
345
|
-
for (let
|
|
346
|
-
const a = t[
|
|
347
|
-
|
|
344
|
+
let o = null;
|
|
345
|
+
for (let n = 0; n < t.length; n++) {
|
|
346
|
+
const a = t[n];
|
|
347
|
+
n + 1 === t.length && (o = e.modelFieldsMap[a]);
|
|
348
348
|
}
|
|
349
|
-
return
|
|
349
|
+
return o;
|
|
350
350
|
}
|
|
351
351
|
function isNumberDataType(t) {
|
|
352
352
|
return "INTEGER" === t || "LONG" === t || "DOUBLE" === t || "FLOAT_COM" === t;
|