super-page-runtime 2.3.33 → 2.3.34
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/barcode-util.js +5 -5
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +46 -47
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +1 -3
- package/dist/es/components/runtime/utils/charts/chart-util.js +44 -46
- package/dist/es/components/runtime/utils/events/event-util.js +18 -18
- package/dist/es/components/runtime/utils/events/print-label.js +0 -1
- package/dist/es/components/runtime/utils/events/standard-event.js +708 -720
- package/dist/es/components/runtime/utils/events/validator-util.js +1 -1
- package/dist/es/components/runtime/utils/form/scan-util.js +3 -4
- package/dist/es/components/runtime/utils/page-helper-util.js +219 -219
- package/dist/es/components/runtime/utils/page-init-util.js +124 -127
- package/dist/es/components/runtime/utils/page-store.js +21 -21
- package/dist/es/components/runtime/utils/table-utils.js +4 -4
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +10 -14
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +6 -6
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +12 -13
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +14 -15
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +14 -15
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +15 -16
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +67 -67
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +22 -24
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +62 -62
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +20 -22
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +117 -120
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +39 -40
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +0 -1
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +26 -26
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +7 -7
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +52 -52
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +6 -6
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +10 -10
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +0 -1
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +13 -13
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +17 -17
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +5 -5
- package/dist/es/components/runtime/views/home-chart.vue.js +4 -4
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +4 -4
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +182 -182
- package/dist/es/style.css +76 -76
- package/package.json +2 -2
|
@@ -53,7 +53,7 @@ function p(n2, r2, i2, l2, o2, a2, u2) {
|
|
|
53
53
|
if (e2) {
|
|
54
54
|
f2 = e2[0].message, d2 = e2[0].field, t({ message: f2, showClose: true, type: "warning", duration: 3e3 });
|
|
55
55
|
const n3 = s(u2, d2);
|
|
56
|
-
n3 && n3.addRequiredClass && n3.addRequiredClass()
|
|
56
|
+
n3 && n3.addRequiredClass && n3.addRequiredClass();
|
|
57
57
|
} else f2 = true;
|
|
58
58
|
if (d2 && true === o2) {
|
|
59
59
|
if (/[A-Z]+/.test(d2) && void 0 !== n2[d2.toLowerCase()]) {
|
|
@@ -44,9 +44,8 @@ function analysisScanValue(scanValue, scanRuleSets) {
|
|
|
44
44
|
}
|
|
45
45
|
let res = false;
|
|
46
46
|
if (validStr) try {
|
|
47
|
-
|
|
47
|
+
res = eval("(" + validStr + ")");
|
|
48
48
|
} catch (e) {
|
|
49
|
-
console.log(e);
|
|
50
49
|
}
|
|
51
50
|
else res = true;
|
|
52
51
|
if (res) return executeAnalysisForScan(scanValue, scanSet);
|
|
@@ -63,11 +62,11 @@ function executeAnalysisForScan(e, t) {
|
|
|
63
62
|
let n = e;
|
|
64
63
|
if (t2.splitChar && t2.splitNum) {
|
|
65
64
|
const a3 = (t2.splitChar, t2.splitChar), s2 = e.split(a3), l = t2.splitNum < 1 ? 1 : t2.splitNum;
|
|
66
|
-
|
|
65
|
+
n = l <= s2.length ? s2[l - 1] : "";
|
|
67
66
|
}
|
|
68
67
|
if (t2.splitChar2 && t2.splitNum2) {
|
|
69
68
|
const e2 = (t2.splitChar2, t2.splitChar2), a3 = n.split(e2), s2 = t2.splitNum2 < 1 ? 1 : t2.splitNum2;
|
|
70
|
-
|
|
69
|
+
n = s2 <= a3.length ? a3[s2 - 1] : "";
|
|
71
70
|
}
|
|
72
71
|
if (n.length > 0) {
|
|
73
72
|
const e2 = _getScanIndexs(n, t2.startIndex, t2.endIndex), a3 = e2[0], s2 = e2[1];
|
|
@@ -4,355 +4,355 @@ 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(
|
|
8
|
-
return getComponentOptionConfigsBase(
|
|
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(
|
|
11
|
-
if (!
|
|
12
|
-
if (
|
|
13
|
-
const n =
|
|
10
|
+
function getComponentOptionConfigsBase(t, e, o) {
|
|
11
|
+
if (!t.props || !t.props.dataOrigin) return;
|
|
12
|
+
if (t.name && "table" === t.name) return;
|
|
13
|
+
const n = t.props.dataOrigin, a = { uuid: t.uuid };
|
|
14
14
|
if ("optionGroup" == n.optionValueSetType) a.type = "optionGroup", a.props = { code: n.optionGroup };
|
|
15
15
|
else if ("dynamicData" == n.optionValueSetType) a.type = "dynamicData", a.filterType = n.filterType, a.props = { code: n.dynamicDataSourceCode };
|
|
16
16
|
else if ("dataTable" == n.optionValueSetType) {
|
|
17
17
|
a.filterType = n.filterType;
|
|
18
|
-
const
|
|
19
|
-
Object.assign(a,
|
|
18
|
+
const t2 = getTableQueryInfo(n, e, o);
|
|
19
|
+
Object.assign(a, t2);
|
|
20
20
|
} else if ("service" == n.optionValueSetType) {
|
|
21
21
|
a.filterType = n.filterType;
|
|
22
|
-
const
|
|
23
|
-
Object.assign(a,
|
|
22
|
+
const t2 = getServiceQueryInfo(n, e, o);
|
|
23
|
+
Object.assign(a, t2);
|
|
24
24
|
}
|
|
25
25
|
return a.type ? a : void 0;
|
|
26
26
|
}
|
|
27
|
-
function getTableQueryInfo(
|
|
27
|
+
function getTableQueryInfo(t, e, o) {
|
|
28
28
|
const n = { type: "dataTable" };
|
|
29
|
-
if (n.valueLabelSwitch = !!
|
|
30
|
-
const
|
|
31
|
-
for (const o2 of
|
|
32
|
-
n.props.sorts =
|
|
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
|
+
const e2 = [];
|
|
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
|
-
if (
|
|
36
|
-
const
|
|
37
|
-
for (const o2 of
|
|
35
|
+
if (t.filterList) {
|
|
36
|
+
const e2 = [];
|
|
37
|
+
for (const o2 of t.filterList) {
|
|
38
38
|
if (!o2.propName) continue;
|
|
39
39
|
o2.propDbName || (o2.propDbName = o2.propName);
|
|
40
|
-
const
|
|
41
|
-
Object.assign(
|
|
40
|
+
const t2 = {};
|
|
41
|
+
Object.assign(t2, o2);
|
|
42
42
|
const n2 = getParamNames(o2.propValue);
|
|
43
|
-
for (const
|
|
44
|
-
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
|
-
n.props.searchForm =
|
|
46
|
+
n.props.searchForm = e2;
|
|
47
47
|
}
|
|
48
48
|
n.props.monitorFields = a;
|
|
49
49
|
const r = [];
|
|
50
|
-
if (
|
|
51
|
-
return n.props.queryFields = r, n.props.pageSize =
|
|
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(
|
|
53
|
+
function getServiceQueryInfo(t, e, o) {
|
|
54
54
|
const n = { type: "service" };
|
|
55
|
-
if (n.valueLabelSwitch = !!
|
|
56
|
-
const
|
|
57
|
-
for (const o2 of
|
|
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
|
+
const e2 = [];
|
|
57
|
+
for (const o2 of t.serviceInputs) {
|
|
58
58
|
if (!o2.name || o2.value) continue;
|
|
59
|
-
const
|
|
60
|
-
Object.assign(
|
|
59
|
+
const t2 = {};
|
|
60
|
+
Object.assign(t2, o2), e2.push(t2);
|
|
61
61
|
}
|
|
62
|
-
n.props.inputs =
|
|
62
|
+
n.props.inputs = e2;
|
|
63
63
|
}
|
|
64
|
-
return n.props.dataSetField =
|
|
64
|
+
return n.props.dataSetField = t.serviceDataSetField, n.props.valueField = t.serviceValueField, n.props.labelField = t.serviceLabelField, n;
|
|
65
65
|
}
|
|
66
|
-
function updateChartDatasources(
|
|
66
|
+
function updateChartDatasources(t, e, o, n) {
|
|
67
67
|
return new Promise((a, r) => {
|
|
68
|
-
if (!
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
const o2 =
|
|
68
|
+
if (!e || 0 == e.length) return void r(new Error("无需查询的统计图配置!"));
|
|
69
|
+
const i = deepCopy(e);
|
|
70
|
+
i.forEach((e2) => {
|
|
71
|
+
const o2 = e2.services;
|
|
72
72
|
if (o2 && o2.length > 0) {
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
const n2 =
|
|
76
|
-
o2[0].serviceInParams[n2] = getValueFromVariable(
|
|
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
77
|
}), delete o2[0].serviceInputs);
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
const c = { entityMap:
|
|
85
|
-
http.post(f, c, { headers: { customSystem:
|
|
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
|
+
const l = {};
|
|
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
|
+
http.post(f, c, { headers: { customSystem: t.systemCode } }).then((e2) => {
|
|
86
86
|
var _a, _b;
|
|
87
|
-
|
|
88
|
-
for (const o2 in
|
|
89
|
-
|
|
90
|
-
const a2 = getComponentRef(
|
|
87
|
+
t.chartDataSourceMap || (t.chartDataSourceMap = {});
|
|
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 ((!n || r2 && (void 0 === r2.initializationQuery || r2.initializationQuery)) && a2.updateChartDatas && (a2.updateChartDatas(
|
|
94
|
-
const n2 =
|
|
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
|
}
|
|
100
|
-
|
|
101
|
-
}).catch((
|
|
102
|
-
|
|
100
|
+
a(e2);
|
|
101
|
+
}).catch((t2) => {
|
|
102
|
+
r(t2);
|
|
103
103
|
});
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
|
-
function updateChartDatasourcesByComponent(
|
|
107
|
-
const o =
|
|
108
|
-
o && updateChartDatasources(
|
|
106
|
+
function updateChartDatasourcesByComponent(t, e) {
|
|
107
|
+
const o = t.initChartServiceConfigs.find((t2) => t2.uuid === e);
|
|
108
|
+
o && updateChartDatasources(t, [o], null, false);
|
|
109
109
|
}
|
|
110
|
-
function updateOptionDatasources(
|
|
110
|
+
function updateOptionDatasources(t, e, o) {
|
|
111
111
|
return new Promise((n, a) => {
|
|
112
|
-
if (!
|
|
113
|
-
const r =
|
|
114
|
-
r.request && Object.assign(
|
|
115
|
-
const
|
|
116
|
-
http.post(
|
|
117
|
-
|
|
118
|
-
for (const o2 in
|
|
119
|
-
|
|
120
|
-
const n2 = getComponentRef(
|
|
121
|
-
n2 && n2.updateOptions && n2.updateOptions(
|
|
112
|
+
if (!e || 0 == e.length) return void a(new Error("无需查询的配置!"));
|
|
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
|
+
t.optionSourceMap || (t.optionSourceMap = {});
|
|
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
|
-
|
|
124
|
-
}).catch((
|
|
125
|
-
|
|
123
|
+
n(e2);
|
|
124
|
+
}).catch((t2) => {
|
|
125
|
+
a(t2);
|
|
126
126
|
});
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
|
-
function getOptionDatasFromPage(
|
|
130
|
-
return getComponentOptionDatasFromPage(
|
|
129
|
+
function getOptionDatasFromPage(t, e) {
|
|
130
|
+
return getComponentOptionDatasFromPage(t, e.uuid);
|
|
131
131
|
}
|
|
132
|
-
function getComponentOptionDatasFromPage(
|
|
133
|
-
const o = getOptionDatasSourceMap(
|
|
132
|
+
function getComponentOptionDatasFromPage(t, e) {
|
|
133
|
+
const o = getOptionDatasSourceMap(t)[e];
|
|
134
134
|
return o || [];
|
|
135
135
|
}
|
|
136
|
-
function getOptionDatasSourceMap(
|
|
137
|
-
if (!
|
|
138
|
-
const
|
|
139
|
-
return
|
|
136
|
+
function getOptionDatasSourceMap(t) {
|
|
137
|
+
if (!t || !t.optionSourceMap) return {};
|
|
138
|
+
const e = t.optionSourceMap;
|
|
139
|
+
return e || {};
|
|
140
140
|
}
|
|
141
|
-
function getChartDatasFromPage(
|
|
142
|
-
if (!
|
|
143
|
-
return
|
|
141
|
+
function getChartDatasFromPage(t, e) {
|
|
142
|
+
if (!t || !t.chartDataSourceMap || !e) return null;
|
|
143
|
+
return t.chartDataSourceMap[e.uuid];
|
|
144
144
|
}
|
|
145
|
-
function queryOptionDatasources(
|
|
146
|
-
return updateOptionDatasources(
|
|
145
|
+
function queryOptionDatasources(t, e, o) {
|
|
146
|
+
return updateOptionDatasources(t, e ? [e] : [], o);
|
|
147
147
|
}
|
|
148
|
-
function autoSetAfterSelect(
|
|
148
|
+
function autoSetAfterSelect(t, e, o, n, a = []) {
|
|
149
149
|
if (!o || 0 == o.length) return;
|
|
150
|
-
const r =
|
|
151
|
-
for (const
|
|
152
|
-
if (!
|
|
153
|
-
const
|
|
154
|
-
let o2 =
|
|
150
|
+
const r = e.entity ? e.entity : {};
|
|
151
|
+
for (const t2 of o) {
|
|
152
|
+
if (!t2.source || !t2.target || a.includes(t2.target)) continue;
|
|
153
|
+
const e2 = getValuesByField(n, t2.source);
|
|
154
|
+
let o2 = t2.target;
|
|
155
155
|
if (!o2 || !o2.startsWith("${")) continue;
|
|
156
156
|
o2 = o2.substring(2, o2.length - 1);
|
|
157
|
-
const
|
|
158
|
-
setVariableValue(r,
|
|
157
|
+
const i = o2.split(".");
|
|
158
|
+
setVariableValue(r, i, null == e2 ? null : e2.join(","));
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
function getValuesByField(
|
|
162
|
-
if (
|
|
161
|
+
function getValuesByField(t, e) {
|
|
162
|
+
if (t) {
|
|
163
163
|
const o = [];
|
|
164
|
-
for (const n of
|
|
165
|
-
let
|
|
166
|
-
null !=
|
|
164
|
+
for (const n of t) {
|
|
165
|
+
let t2 = n[e];
|
|
166
|
+
null != t2 && null != t2 || (t2 = ""), o.push(t2);
|
|
167
167
|
}
|
|
168
168
|
return o;
|
|
169
169
|
}
|
|
170
170
|
return null;
|
|
171
171
|
}
|
|
172
|
-
function getVariableValue(
|
|
173
|
-
if (!
|
|
174
|
-
let o =
|
|
175
|
-
for (let
|
|
172
|
+
function getVariableValue(t, e) {
|
|
173
|
+
if (!t || !e || 0 == e.length) return;
|
|
174
|
+
let o = t;
|
|
175
|
+
for (let t2 = 0; t2 < e.length; t2++) {
|
|
176
176
|
if (null == o) return o;
|
|
177
|
-
o = o[
|
|
177
|
+
o = o[e[t2]];
|
|
178
178
|
}
|
|
179
179
|
return o;
|
|
180
180
|
}
|
|
181
|
-
function setValueForVariableName(
|
|
182
|
-
if (!
|
|
183
|
-
setVariableValue(
|
|
181
|
+
function setValueForVariableName(t, e, o) {
|
|
182
|
+
if (!e || !e.startsWith("${")) return;
|
|
183
|
+
setVariableValue(t, (e = e.substring(2, e.length - 1)).split("."), o);
|
|
184
184
|
}
|
|
185
|
-
function setVariableValue(
|
|
186
|
-
if (!
|
|
187
|
-
let n =
|
|
188
|
-
for (let
|
|
189
|
-
const a =
|
|
190
|
-
|
|
185
|
+
function setVariableValue(t, e, o) {
|
|
186
|
+
if (!t || !e || 0 == e.length) return;
|
|
187
|
+
let n = t;
|
|
188
|
+
for (let t2 = 0; t2 < e.length; t2++) {
|
|
189
|
+
const a = e[t2];
|
|
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(
|
|
194
|
-
if (!
|
|
195
|
-
setVariableValue(
|
|
193
|
+
function setVariableValueWithProp(t, e, o) {
|
|
194
|
+
if (!t || !e) return;
|
|
195
|
+
setVariableValue(t, e.split("."), o);
|
|
196
196
|
}
|
|
197
|
-
function formatVariableValue(
|
|
198
|
-
if (!
|
|
199
|
-
const o =
|
|
200
|
-
for (const
|
|
201
|
-
const a = n[
|
|
197
|
+
function formatVariableValue(t, e) {
|
|
198
|
+
if (!t || "" == e || null == e || null == e) return e;
|
|
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);
|
|
205
205
|
}
|
|
206
|
-
return
|
|
206
|
+
return e;
|
|
207
207
|
}
|
|
208
|
-
function getParamNames(
|
|
209
|
-
if (!
|
|
210
|
-
const
|
|
211
|
-
return
|
|
208
|
+
function getParamNames(t) {
|
|
209
|
+
if (!t) return [];
|
|
210
|
+
const e = t.match(/\$\{[^\{|\}]+\}/g);
|
|
211
|
+
return e || [];
|
|
212
212
|
}
|
|
213
|
-
function formatValueByType(
|
|
214
|
-
if (!
|
|
215
|
-
if (
|
|
216
|
-
if (isNaN(
|
|
213
|
+
function formatValueByType(t, e, o) {
|
|
214
|
+
if (!e || "" == t || null == t || null == t) return t;
|
|
215
|
+
if (o = o || {}, "number" == e || "percent" == e) {
|
|
216
|
+
if (isNaN(t)) return t;
|
|
217
217
|
let n = parseInt(o.decimalDigit);
|
|
218
|
-
if ((null == n || isNaN(n)) && (n = -1),
|
|
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
220
|
if (o.thousandsSeparator) {
|
|
221
|
-
const
|
|
222
|
-
|
|
221
|
+
const e2 = t.toString().split(".");
|
|
222
|
+
e2[0] = e2[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), t = e2.length > 1 ? e2.join(".") : e2[0];
|
|
223
223
|
}
|
|
224
|
-
o.symbol && (
|
|
224
|
+
o.symbol && (t = o.symbol + "" + t);
|
|
225
225
|
}
|
|
226
|
-
return
|
|
226
|
+
return t;
|
|
227
227
|
}
|
|
228
|
-
if ("date" ==
|
|
228
|
+
if ("date" == e || "time" == e) {
|
|
229
229
|
let n = "";
|
|
230
|
-
return "date" ==
|
|
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" ==
|
|
233
|
-
}
|
|
234
|
-
function getValueFromVariable(
|
|
235
|
-
if (null ==
|
|
236
|
-
if (
|
|
237
|
-
let n =
|
|
238
|
-
if (n.startsWith("data.")) n = n.substring(5), r =
|
|
239
|
-
else if (n.startsWith("page.")) n = n.substring(5), a = "page", r =
|
|
240
|
-
else if (n.startsWith("task.")) n = n.substring(5), a = "task", r =
|
|
241
|
-
else if (n.startsWith("request.")) n = n.substring(8), a = "request", r =
|
|
242
|
-
else if (n.startsWith("context.")) n = n.substring(8), a = "context", r =
|
|
243
|
-
else if (n.startsWith("system.")) n = n.substring(7), a = "system", r =
|
|
232
|
+
return "custom" == e && o.formatEventUuid, t;
|
|
233
|
+
}
|
|
234
|
+
function getValueFromVariable(t, e, o) {
|
|
235
|
+
if (null == e || null == e) return e;
|
|
236
|
+
if (e.startsWith("${") && e.endsWith("}")) {
|
|
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
245
|
if (n.startsWith("fixed.")) return n.substring(6);
|
|
246
246
|
n.startsWith("row.") && (n = n.substring(4), r = o, a = "row");
|
|
247
247
|
}
|
|
248
|
-
return n ? getValueFromSource(r, n, a) :
|
|
248
|
+
return n ? getValueFromSource(r, n, a) : "";
|
|
249
249
|
}
|
|
250
|
-
return
|
|
250
|
+
return e;
|
|
251
251
|
}
|
|
252
|
-
function getValueFromSource(
|
|
253
|
-
if ("context" != o && !
|
|
254
|
-
const n =
|
|
252
|
+
function getValueFromSource(t, e, o) {
|
|
253
|
+
if ("context" != o && !t || !e) return;
|
|
254
|
+
const n = e.indexOf(".");
|
|
255
255
|
if (n > -1) {
|
|
256
|
-
const a =
|
|
257
|
-
let
|
|
258
|
-
return
|
|
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
260
|
if ("context" == o) {
|
|
261
|
-
if ("currentDate" ==
|
|
262
|
-
if (
|
|
263
|
-
const
|
|
264
|
-
let n2 = parseInt(
|
|
265
|
-
const a =
|
|
261
|
+
if ("currentDate" == e || "currentTime" == e) return /* @__PURE__ */ new Date();
|
|
262
|
+
if (e.startsWith("currentDate") && e.length > 11) {
|
|
263
|
+
const t2 = e.substring(11), o2 = t2.substring(0, 1);
|
|
264
|
+
let n2 = parseInt(t2.substring(1, t2.length - 1), 10);
|
|
265
|
+
const a = t2.substring(t2.length - 1), r = /* @__PURE__ */ new Date();
|
|
266
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
|
-
if (!
|
|
268
|
+
if (!t) return;
|
|
269
269
|
}
|
|
270
|
-
return e
|
|
270
|
+
return t[e];
|
|
271
271
|
}
|
|
272
272
|
function caculateShowCondition(pageContext, showConditions, row) {
|
|
273
273
|
if (!showConditions || 0 == showConditions.length || !pageContext || !pageContext.entity) return true;
|
|
274
274
|
const entityData = pageContext.entity;
|
|
275
275
|
let conditions = "";
|
|
276
276
|
const maxLen = showConditions.length;
|
|
277
|
-
for (let
|
|
278
|
-
const
|
|
279
|
-
let n =
|
|
277
|
+
for (let t = 0; t < maxLen; t++) {
|
|
278
|
+
const e = showConditions[t], o = e.propName;
|
|
279
|
+
let n = e.operator;
|
|
280
280
|
if (!o || "" === o) continue;
|
|
281
281
|
n || (n = "EQ");
|
|
282
282
|
const a = getValueFromVariable(entityData, o, row);
|
|
283
|
-
let r = getValueFromVariable(entityData,
|
|
284
|
-
const
|
|
283
|
+
let r = getValueFromVariable(entityData, e.propValue, row);
|
|
284
|
+
const i = e.dataType;
|
|
285
285
|
"CONTAIN" != n && "NOT_CONTAIN" != n || a && !a.includes && (n = "CONTAIN" == n ? "EQ" : "NET");
|
|
286
|
-
let
|
|
287
|
-
if (
|
|
288
|
-
|
|
289
|
-
} catch (
|
|
290
|
-
|
|
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
|
+
} catch (t2) {
|
|
290
|
+
u = false;
|
|
291
291
|
}
|
|
292
|
-
const
|
|
293
|
-
let p =
|
|
294
|
-
if (
|
|
295
|
-
const
|
|
296
|
-
"and" ===
|
|
292
|
+
const l = e.leftBracket, c = e.rightBracket;
|
|
293
|
+
let p = e.joinSign;
|
|
294
|
+
if (l && null !== l && "" !== l && (conditions += l, conditions += " "), conditions += u + " ", c && null !== c && "" !== c && (conditions += c, conditions += " "), t < maxLen - 1 && p && null !== p && "" !== p) {
|
|
295
|
+
const t2 = p.toLowerCase();
|
|
296
|
+
"and" === t2 ? p = t2.replace("and", "&&") : "or" === t2 && (p = t2.replace("or", "||")), conditions += p + " ";
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
return !conditions || eval("(" + conditions + ")");
|
|
300
300
|
}
|
|
301
|
-
function monitorFieldChange(
|
|
302
|
-
if (!o || !
|
|
301
|
+
function monitorFieldChange(t, e, o) {
|
|
302
|
+
if (!o || !t || !e || 0 == e.length) return;
|
|
303
303
|
const n = [], a = [];
|
|
304
|
-
for (let
|
|
305
|
-
|
|
306
|
-
const
|
|
307
|
-
"page" !==
|
|
304
|
+
for (let t2 of e) if (t2.startsWith("${")) {
|
|
305
|
+
t2 = t2.substring(2, t2.length - 1);
|
|
306
|
+
const e2 = t2.split(".");
|
|
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(n,
|
|
310
|
-
for (const
|
|
311
|
-
|
|
312
|
-
const
|
|
313
|
-
r !=
|
|
309
|
+
let r = getMonitorFieldValues(n, t.entity), i = false;
|
|
310
|
+
for (const e2 of a) watch(t.entity[e2], () => {
|
|
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
|
-
function getMonitorFieldValues(
|
|
317
|
+
function getMonitorFieldValues(t, e) {
|
|
318
318
|
let o = "";
|
|
319
|
-
for (const n of
|
|
319
|
+
for (const n of t) o += "_" + getVariableValue(e, n);
|
|
320
320
|
return o;
|
|
321
321
|
}
|
|
322
|
-
function getFormPropName(
|
|
323
|
-
return
|
|
322
|
+
function getFormPropName(t) {
|
|
323
|
+
return t && t.indexOf("${") >= 0 ? t.substring(t.indexOf(".") + 1, t.lastIndexOf("}")) : t;
|
|
324
324
|
}
|
|
325
|
-
function getSizeConfig(
|
|
326
|
-
const o = getPageModeType(
|
|
325
|
+
function getSizeConfig(t, e) {
|
|
326
|
+
const o = getPageModeType(t);
|
|
327
327
|
let n;
|
|
328
|
-
return
|
|
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
|
-
function getPageModeType(
|
|
331
|
-
let
|
|
332
|
-
return
|
|
330
|
+
function getPageModeType(t) {
|
|
331
|
+
let e = t.dimensions;
|
|
332
|
+
return e || (e = "pc"), e;
|
|
333
333
|
}
|
|
334
|
-
function isPromise(
|
|
335
|
-
return
|
|
334
|
+
function isPromise(t) {
|
|
335
|
+
return t && "[object Promise]" === Object.prototype.toString.call(t);
|
|
336
336
|
}
|
|
337
|
-
function decomposeVariable(
|
|
338
|
-
if (!
|
|
339
|
-
const
|
|
340
|
-
return
|
|
337
|
+
function decomposeVariable(t) {
|
|
338
|
+
if (!t) return [];
|
|
339
|
+
const e = t.match(/\${(.*?)}/);
|
|
340
|
+
return e ? e[1].split(".") : [];
|
|
341
341
|
}
|
|
342
|
-
function getModelFieldFromPageContext(
|
|
343
|
-
if (!
|
|
342
|
+
function getModelFieldFromPageContext(t, e) {
|
|
343
|
+
if (!e.modelFieldsMap) return;
|
|
344
344
|
let o = null;
|
|
345
|
-
for (let n = 0; n <
|
|
346
|
-
const a =
|
|
347
|
-
n + 1 ===
|
|
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
349
|
return o;
|
|
350
350
|
}
|
|
351
|
-
function isNumberDataType(
|
|
352
|
-
return "INTEGER" ===
|
|
351
|
+
function isNumberDataType(t) {
|
|
352
|
+
return "INTEGER" === t || "LONG" === t || "DOUBLE" === t || "FLOAT_COM" === t;
|
|
353
353
|
}
|
|
354
|
-
function isDateDataType(
|
|
355
|
-
return "DATE" === (
|
|
354
|
+
function isDateDataType(t) {
|
|
355
|
+
return "DATE" === (t = t ? t.toUpperCase() : "") || "TIME" === t || "DATETIME" === t || "TIMESTAMP" === t;
|
|
356
356
|
}
|
|
357
357
|
export {
|
|
358
358
|
autoSetAfterSelect,
|