super-page-runtime 2.1.93 → 2.1.97
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/_virtual/_plugin-vue_export-helper.js +6 -7
- package/dist/es/assets/chart-themes/theme1.js +2 -6
- package/dist/es/assets/chart-themes/theme2.js +2 -6
- package/dist/es/assets/chart-themes/theme3.js +2 -6
- package/dist/es/components/runtime/utils/api/api-util.js +4 -7
- package/dist/es/components/runtime/utils/api/page-expose-util.js +137 -433
- package/dist/es/components/runtime/utils/assemblys-config.js +12 -366
- package/dist/es/components/runtime/utils/barcode-util.js +10 -33
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +138 -304
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +29 -66
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +71 -147
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +52 -122
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +40 -98
- package/dist/es/components/runtime/utils/charts/chart-util.js +237 -478
- package/dist/es/components/runtime/utils/common-util.js +82 -152
- package/dist/es/components/runtime/utils/eventBus.js +3 -9
- package/dist/es/components/runtime/utils/events/event-util.js +361 -727
- package/dist/es/components/runtime/utils/events/print-label.js +73 -140
- package/dist/es/components/runtime/utils/events/standard-event.js +835 -2283
- package/dist/es/components/runtime/utils/events/validator-util.js +236 -555
- package/dist/es/components/runtime/utils/form/date-shortcuts.js +29 -88
- package/dist/es/components/runtime/utils/form/scan-util.js +60 -154
- package/dist/es/components/runtime/utils/global-refs.js +45 -69
- package/dist/es/components/runtime/utils/i18n-util.js +12 -20
- package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
- package/dist/es/components/runtime/utils/page-helper-util.js +299 -602
- package/dist/es/components/runtime/utils/page-init-util.js +134 -369
- package/dist/es/components/runtime/utils/page-permission-util.js +24 -531
- package/dist/es/components/runtime/utils/page-store.js +8 -12
- package/dist/es/components/runtime/utils/store-util.js +9 -13
- package/dist/es/components/runtime/utils/store.js +2 -2
- package/dist/es/components/runtime/utils/table-utils.js +49 -84
- package/dist/es/components/runtime/utils/tree-utils.js +18 -36
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +19 -75
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +14 -46
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +37 -132
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +4 -18
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +17 -107
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +54 -198
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +12 -42
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +7 -60
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +48 -169
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +32 -107
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +43 -164
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +32 -115
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +32 -116
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +208 -439
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +4 -42
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +8 -62
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +63 -226
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +13 -62
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +168 -513
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -139
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +23 -125
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +16 -102
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +18 -81
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +17 -82
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +14 -86
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +21 -79
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +16 -61
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +10 -37
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +38 -127
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +28 -76
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +61 -178
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +311 -800
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +251 -592
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +43 -115
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +56 -216
- package/dist/es/components/runtime/views/assemblys/error-render.vue.js +3 -21
- package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +44 -154
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +36 -98
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +54 -200
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +69 -239
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +28 -98
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +22 -59
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +52 -173
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +22 -103
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +58 -249
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +34 -174
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +28 -107
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +4 -4
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +13 -50
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +66 -189
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +91 -243
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +82 -261
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +13 -57
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +30 -155
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +41 -129
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +22 -107
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +133 -252
- package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +19 -46
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +22 -49
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +21 -58
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +16 -53
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +18 -134
- package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page.vue.js +232 -708
- package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
- package/dist/es/i18n/langs/cn.js +2 -55
- package/dist/es/i18n/langs/en.js +2 -55
- package/package.json +74 -73
|
@@ -4,688 +4,385 @@ 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
|
-
if (!
|
|
7
|
+
function getComponentOptionConfigs(t, e) {
|
|
8
|
+
if (!t.props || !t.props.dataOrigin)
|
|
9
9
|
return;
|
|
10
|
-
|
|
11
|
-
if (component.name && component.name === "table") {
|
|
10
|
+
if (t.name && "table" === t.name)
|
|
12
11
|
return;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
29
|
-
} else if (dataOriginInfo.optionValueSetType == "dataTable") {
|
|
30
|
-
infoObj.filterType = dataOriginInfo.filterType;
|
|
31
|
-
const tempObj = getTableQueryInfo(dataOriginInfo, pageContext2);
|
|
32
|
-
Object.assign(infoObj, tempObj);
|
|
33
|
-
} else if (dataOriginInfo.optionValueSetType == "service") {
|
|
34
|
-
infoObj.filterType = dataOriginInfo.filterType;
|
|
35
|
-
const tempObj = getServiceQueryInfo(dataOriginInfo, pageContext2);
|
|
36
|
-
Object.assign(infoObj, tempObj);
|
|
37
|
-
}
|
|
38
|
-
if (infoObj.type) {
|
|
39
|
-
return infoObj;
|
|
40
|
-
} else {
|
|
41
|
-
return void 0;
|
|
42
|
-
}
|
|
12
|
+
const o = t.props.dataOrigin, n = { uuid: t.uuid };
|
|
13
|
+
if ("optionGroup" == o.optionValueSetType)
|
|
14
|
+
n.type = "optionGroup", n.props = { code: o.optionGroup };
|
|
15
|
+
else if ("dynamicData" == o.optionValueSetType)
|
|
16
|
+
n.type = "dynamicData", n.filterType = o.filterType, n.props = { code: o.dynamicDataSourceCode };
|
|
17
|
+
else if ("dataTable" == o.optionValueSetType) {
|
|
18
|
+
n.filterType = o.filterType;
|
|
19
|
+
const t2 = getTableQueryInfo(o, e);
|
|
20
|
+
Object.assign(n, t2);
|
|
21
|
+
} else if ("service" == o.optionValueSetType) {
|
|
22
|
+
n.filterType = o.filterType;
|
|
23
|
+
const t2 = getServiceQueryInfo(o, e);
|
|
24
|
+
Object.assign(n, t2);
|
|
25
|
+
}
|
|
26
|
+
return n.type ? n : void 0;
|
|
43
27
|
}
|
|
44
|
-
function getTableQueryInfo(
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
prop: field.name,
|
|
58
|
-
order: field.type ? field.type : "asc"
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
infoObj.props.sorts = sortFields;
|
|
63
|
-
}
|
|
64
|
-
const autoMonitorFields = [];
|
|
65
|
-
if (dataOriginInfo.filterList) {
|
|
66
|
-
const searchForm = [];
|
|
67
|
-
for (const f of dataOriginInfo.filterList) {
|
|
68
|
-
if (!f.propName) {
|
|
28
|
+
function getTableQueryInfo(t, e) {
|
|
29
|
+
const o = { type: "dataTable" };
|
|
30
|
+
if (o.props = { tableName: t.tableName, systemCode: t.tableSysCode ? t.tableSysCode : e.systemCode, systemVersion: t.tableSysCode ? t.tableSysVersion : e.systemVersion }, t.sortFields) {
|
|
31
|
+
const e2 = [];
|
|
32
|
+
for (const o2 of t.sortFields)
|
|
33
|
+
o2.name && e2.push({ prop: o2.name, order: o2.type ? o2.type : "asc" });
|
|
34
|
+
o.props.sorts = e2;
|
|
35
|
+
}
|
|
36
|
+
const n = [];
|
|
37
|
+
if (t.filterList) {
|
|
38
|
+
const e2 = [];
|
|
39
|
+
for (const o2 of t.filterList) {
|
|
40
|
+
if (!o2.propName)
|
|
69
41
|
continue;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
searchForm.push(tempObj);
|
|
87
|
-
}
|
|
88
|
-
infoObj.props.searchForm = searchForm;
|
|
89
|
-
}
|
|
90
|
-
infoObj.props.monitorFields = autoMonitorFields;
|
|
91
|
-
const queryFields = [];
|
|
92
|
-
if (dataOriginInfo.tableValueField) {
|
|
93
|
-
infoObj.props.valueField = dataOriginInfo.tableValueField;
|
|
94
|
-
}
|
|
95
|
-
if (dataOriginInfo.tableLableField && queryFields.indexOf(dataOriginInfo.tableLableField) == -1) {
|
|
96
|
-
infoObj.props.lableField = dataOriginInfo.tableLableField;
|
|
97
|
-
}
|
|
98
|
-
if (dataOriginInfo.autoSets) {
|
|
99
|
-
for (const field of dataOriginInfo.autoSets) {
|
|
100
|
-
if (field.source && queryFields.indexOf(field.source) == -1) {
|
|
101
|
-
queryFields.push(field.source);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
infoObj.props.queryFields = queryFields;
|
|
106
|
-
infoObj.props.pageSize = dataOriginInfo.displayQuantity;
|
|
107
|
-
return infoObj;
|
|
42
|
+
o2.propDbName || (o2.propDbName = o2.propName);
|
|
43
|
+
const t2 = {};
|
|
44
|
+
Object.assign(t2, o2);
|
|
45
|
+
const a2 = getParamNames(o2.propValue);
|
|
46
|
+
for (const t3 of a2)
|
|
47
|
+
t3 && (t3.startsWith("${data.") || t3.startsWith("${task.") || t3.startsWith("${page.")) && (n.includes(t3) || n.push(t3));
|
|
48
|
+
o2.propValue, e2.push(t2);
|
|
49
|
+
}
|
|
50
|
+
o.props.searchForm = e2;
|
|
51
|
+
}
|
|
52
|
+
o.props.monitorFields = n;
|
|
53
|
+
const a = [];
|
|
54
|
+
if (t.tableValueField && (o.props.valueField = t.tableValueField), t.tableLableField && -1 == a.indexOf(t.tableLableField) && (o.props.lableField = t.tableLableField), t.autoSets)
|
|
55
|
+
for (const e2 of t.autoSets)
|
|
56
|
+
e2.source && -1 == a.indexOf(e2.source) && a.push(e2.source);
|
|
57
|
+
return o.props.queryFields = a, o.props.pageSize = t.displayQuantity, o;
|
|
108
58
|
}
|
|
109
|
-
function getServiceQueryInfo(
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
systemVersion: dataOriginInfo.tableSysCode ? dataOriginInfo.tableSysCode : pageContext2.systemCode
|
|
116
|
-
};
|
|
117
|
-
if (dataOriginInfo.serviceInputs) {
|
|
118
|
-
const searchForm = [];
|
|
119
|
-
for (const f of dataOriginInfo.serviceInputs) {
|
|
120
|
-
if (!f.name || f.value) {
|
|
59
|
+
function getServiceQueryInfo(t, e) {
|
|
60
|
+
const o = { type: "service" };
|
|
61
|
+
if (o.props = { serivceCode: t.serviceCode, systemCode: t.tableSysCode ? t.tableSysCode : e.systemCode, systemVersion: t.tableSysCode ? t.tableSysCode : e.systemCode }, t.serviceInputs) {
|
|
62
|
+
const e2 = [];
|
|
63
|
+
for (const o2 of t.serviceInputs) {
|
|
64
|
+
if (!o2.name || o2.value)
|
|
121
65
|
continue;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
Object.assign(tempObj, f);
|
|
125
|
-
searchForm.push(tempObj);
|
|
66
|
+
const t2 = {};
|
|
67
|
+
Object.assign(t2, o2), e2.push(t2);
|
|
126
68
|
}
|
|
127
|
-
|
|
69
|
+
o.props.inputs = e2;
|
|
128
70
|
}
|
|
129
|
-
|
|
130
|
-
infoObj.props.valueField = dataOriginInfo.serviceValueField;
|
|
131
|
-
infoObj.props.labelField = dataOriginInfo.serviceLabelField;
|
|
132
|
-
return infoObj;
|
|
71
|
+
return o.props.dataSetField = t.serviceDataSetField, o.props.valueField = t.serviceValueField, o.props.labelField = t.serviceLabelField, o;
|
|
133
72
|
}
|
|
134
|
-
function updateChartDatasources(
|
|
135
|
-
return new Promise((
|
|
136
|
-
if (!
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
const dataSourceConfsCopy = deepCopy(dataSourceConfs);
|
|
141
|
-
dataSourceConfsCopy.forEach((item) => {
|
|
73
|
+
function updateChartDatasources(t, e, o, n) {
|
|
74
|
+
return new Promise((a, r) => {
|
|
75
|
+
if (!e || 0 == e.length)
|
|
76
|
+
return void r(new Error("无需查询的统计图配置!"));
|
|
77
|
+
const s = deepCopy(e);
|
|
78
|
+
s.forEach((e2) => {
|
|
142
79
|
var _a;
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
serviceInputs.forEach((inParam) => {
|
|
153
|
-
const paramName = inParam.name;
|
|
154
|
-
const paramValue = inParam.value;
|
|
155
|
-
services[0].serviceInParams[paramName] = getValueFromVariable(pageContext2.entity, paramValue);
|
|
156
|
-
});
|
|
157
|
-
}
|
|
80
|
+
const o2 = e2.uuid, n2 = getComponentRef(t, o2);
|
|
81
|
+
if (n2) {
|
|
82
|
+
const o3 = n2.getConfigure(), a2 = (_a = o3 == null ? void 0 : o3.props.dataOrigin) == null ? void 0 : _a.serviceInputs;
|
|
83
|
+
if (a2) {
|
|
84
|
+
const o4 = e2.services;
|
|
85
|
+
o4 && o4.length > 0 && (o4[0].serviceInParams = {}, a2.forEach((e3) => {
|
|
86
|
+
const n3 = e3.name, a3 = e3.value;
|
|
87
|
+
o4[0].serviceInParams[n3] = getValueFromVariable(t.entity, a3);
|
|
88
|
+
}));
|
|
158
89
|
}
|
|
159
90
|
}
|
|
160
91
|
});
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
additionalParamMap,
|
|
179
|
-
taskMap,
|
|
180
|
-
dataSourceList: dataSourceConfsCopy,
|
|
181
|
-
systemCode: pageContext2.systemCode,
|
|
182
|
-
pageCode: pageContext2.code
|
|
183
|
-
};
|
|
184
|
-
const backendUrl = pageContext2.backendUrl;
|
|
185
|
-
const baseUrl = getBaseUrl(backendUrl, pageContext2.isTest);
|
|
186
|
-
const url = baseUrl + "/common/common-data/find-chart-datas";
|
|
187
|
-
http.post(url, param).then((result) => {
|
|
188
|
-
if (!pageContext2.chartDataSourceMap) {
|
|
189
|
-
pageContext2.chartDataSourceMap = {};
|
|
190
|
-
}
|
|
191
|
-
for (const uuid in result) {
|
|
192
|
-
pageContext2.chartDataSourceMap[uuid] = result[uuid];
|
|
193
|
-
const componentObj = getComponentRef(pageContext2, uuid);
|
|
194
|
-
if (componentObj) {
|
|
195
|
-
const chartConfig = componentObj.getConfigure();
|
|
196
|
-
if (!isInit || chartConfig && chartConfig.initializationQuery) {
|
|
197
|
-
if (componentObj.updateChartDatas) {
|
|
198
|
-
componentObj.updateChartDatas(result[uuid]);
|
|
199
|
-
}
|
|
92
|
+
const i = t.entity ? t.entity : {}, u = {};
|
|
93
|
+
i.request && Object.assign(u, i.request), i.page && Object.assign(u, i.page), o && Object.assign(u, o);
|
|
94
|
+
const l = {};
|
|
95
|
+
i.task && Object.assign(l, i.task);
|
|
96
|
+
const c = { entityMap: i.data, additionalParamMap: u, taskMap: l, dataSourceList: s, systemCode: t.systemCode, pageCode: t.code }, p = t.backendUrl, f = getBaseUrl(p, t.isTest) + "/common/common-data/find-chart-datas";
|
|
97
|
+
http.post(f, c).then((e2) => {
|
|
98
|
+
var _a, _b;
|
|
99
|
+
t.chartDataSourceMap || (t.chartDataSourceMap = {});
|
|
100
|
+
for (const o2 in e2) {
|
|
101
|
+
t.chartDataSourceMap[o2] = e2[o2];
|
|
102
|
+
const a2 = getComponentRef(t, o2);
|
|
103
|
+
if (a2) {
|
|
104
|
+
const r2 = a2.getConfigure();
|
|
105
|
+
if ((!n || r2 && r2.initializationQuery) && a2.updateChartDatas && (a2.updateChartDatas(e2[o2]), (_b = (_a = r2.runtime) == null ? void 0 : _a.dataConfig) == null ? void 0 : _b.resultSet)) {
|
|
106
|
+
const n2 = e2[o2] && e2[o2].length > 0 ? e2[o2][0] : {}, a3 = n2 && n2.result ? n2.result : {};
|
|
107
|
+
let s2 = null;
|
|
108
|
+
r2.serviceDataField ? s2 = a3[r2.serviceDataField] : a3 && (s2 = Array.isArray(a3) ? a3 : [a3]), s2 || (s2 = []), setValueForVariableName(t.entity, r2.runtime.dataConfig.resultSet, s2);
|
|
200
109
|
}
|
|
201
110
|
}
|
|
202
111
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
console.log("查询统计图数据失败", error);
|
|
207
|
-
reject(error);
|
|
112
|
+
a(e2);
|
|
113
|
+
}).catch((t2) => {
|
|
114
|
+
r(t2);
|
|
208
115
|
});
|
|
209
116
|
});
|
|
210
117
|
}
|
|
211
|
-
function updateChartDatasourcesByComponent(
|
|
212
|
-
const
|
|
213
|
-
|
|
214
|
-
);
|
|
215
|
-
if (chartDataSource) {
|
|
216
|
-
updateChartDatasources(pageContext2, [chartDataSource], null, false);
|
|
217
|
-
}
|
|
118
|
+
function updateChartDatasourcesByComponent(t, e) {
|
|
119
|
+
const o = t.initChartServiceConfigs.find((t2) => t2.uuid === e);
|
|
120
|
+
o && updateChartDatasources(t, [o], null, false);
|
|
218
121
|
}
|
|
219
|
-
function updateOptionDatasources(
|
|
220
|
-
return new Promise((
|
|
221
|
-
if (!
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
const
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
}
|
|
233
|
-
additionalParamMap.query = query;
|
|
234
|
-
const param = {
|
|
235
|
-
entityMap: entityData2.data,
|
|
236
|
-
additionalParamMap,
|
|
237
|
-
dataSourceList: dataSourceConfs,
|
|
238
|
-
systemCode: pageContext2.systemCode,
|
|
239
|
-
query
|
|
240
|
-
};
|
|
241
|
-
const backendUrl = pageContext2.backendUrl;
|
|
242
|
-
const baseUrl = getBaseUrl(backendUrl, pageContext2.isTest);
|
|
243
|
-
const url = baseUrl + "/common/common-data/find-datas";
|
|
244
|
-
http.post(url, param).then((result) => {
|
|
245
|
-
if (!pageContext2.optionSourceMap) {
|
|
246
|
-
pageContext2.optionSourceMap = {};
|
|
122
|
+
function updateOptionDatasources(t, e, o) {
|
|
123
|
+
return new Promise((n, a) => {
|
|
124
|
+
if (!e || 0 == e.length)
|
|
125
|
+
return void a(new Error("无需查询的配置!"));
|
|
126
|
+
const r = t.entity ? t.entity : {}, s = {};
|
|
127
|
+
r.request && Object.assign(s, r.request), r.page && Object.assign(s, r.page), s.query = o;
|
|
128
|
+
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";
|
|
129
|
+
http.post(l, i).then((e2) => {
|
|
130
|
+
t.optionSourceMap || (t.optionSourceMap = {});
|
|
131
|
+
for (const o2 in e2) {
|
|
132
|
+
t.optionSourceMap[o2] = e2[o2];
|
|
133
|
+
const n2 = getComponentRef(t, o2);
|
|
134
|
+
n2 && n2.updateOptions && n2.updateOptions(e2[o2]);
|
|
247
135
|
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
if (componentObj && componentObj.updateOptions) {
|
|
252
|
-
componentObj.updateOptions(result[uuid]);
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
console.log("查询选项数据完成", result);
|
|
256
|
-
resolve(result);
|
|
257
|
-
}).catch((error) => {
|
|
258
|
-
console.log("查询选项数据失败", error);
|
|
259
|
-
reject(error);
|
|
136
|
+
n(e2);
|
|
137
|
+
}).catch((t2) => {
|
|
138
|
+
a(t2);
|
|
260
139
|
});
|
|
261
140
|
});
|
|
262
141
|
}
|
|
263
|
-
function getOptionDatasFromPage(
|
|
264
|
-
return getComponentOptionDatasFromPage(
|
|
142
|
+
function getOptionDatasFromPage(t, e) {
|
|
143
|
+
return getComponentOptionDatasFromPage(t, e.uuid);
|
|
265
144
|
}
|
|
266
|
-
function getComponentOptionDatasFromPage(
|
|
267
|
-
const
|
|
268
|
-
|
|
269
|
-
return cacheOptions ? cacheOptions : [];
|
|
145
|
+
function getComponentOptionDatasFromPage(t, e) {
|
|
146
|
+
const o = getOptionDatasSourceMap(t)[e];
|
|
147
|
+
return o || [];
|
|
270
148
|
}
|
|
271
|
-
function getOptionDatasSourceMap(
|
|
272
|
-
if (!
|
|
149
|
+
function getOptionDatasSourceMap(t) {
|
|
150
|
+
if (!t || !t.optionSourceMap)
|
|
273
151
|
return {};
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
return cacheOptions ? cacheOptions : {};
|
|
152
|
+
const e = t.optionSourceMap;
|
|
153
|
+
return e || {};
|
|
277
154
|
}
|
|
278
|
-
function getChartDatasFromPage(
|
|
279
|
-
if (!
|
|
155
|
+
function getChartDatasFromPage(t, e) {
|
|
156
|
+
if (!t || !t.chartDataSourceMap || !e)
|
|
280
157
|
return null;
|
|
281
|
-
|
|
282
|
-
const cacheDatas = pageContext2.chartDataSourceMap[configure.uuid];
|
|
283
|
-
return cacheDatas;
|
|
158
|
+
return t.chartDataSourceMap[e.uuid];
|
|
284
159
|
}
|
|
285
|
-
function queryOptionDatasources(
|
|
286
|
-
return updateOptionDatasources(
|
|
160
|
+
function queryOptionDatasources(t, e, o) {
|
|
161
|
+
return updateOptionDatasources(t, e ? [e] : [], o);
|
|
287
162
|
}
|
|
288
|
-
function autoSetAfterSelect(
|
|
289
|
-
if (!
|
|
163
|
+
function autoSetAfterSelect(t, e, o, n) {
|
|
164
|
+
if (!o || 0 == o.length)
|
|
290
165
|
return;
|
|
291
|
-
}
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
if (!as.source || !as.target) {
|
|
166
|
+
const a = e.entity ? e.entity : {};
|
|
167
|
+
for (const t2 of o) {
|
|
168
|
+
if (!t2.source || !t2.target)
|
|
295
169
|
continue;
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
if (!targetField || !targetField.startsWith("${")) {
|
|
170
|
+
const e2 = getValuesByField(n, t2.source);
|
|
171
|
+
let o2 = t2.target;
|
|
172
|
+
if (!o2 || !o2.startsWith("${"))
|
|
300
173
|
continue;
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
const fields = targetField.split(".");
|
|
304
|
-
setVariableValue(entity, fields, values.join(","));
|
|
174
|
+
o2 = o2.substring(2, o2.length - 1);
|
|
175
|
+
setVariableValue(a, o2.split("."), e2.join(","));
|
|
305
176
|
}
|
|
306
177
|
}
|
|
307
|
-
function getValuesByField(
|
|
308
|
-
if (
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
let val = i[fieldName];
|
|
314
|
-
if (val == void 0 || val == null) {
|
|
315
|
-
val = "";
|
|
316
|
-
}
|
|
317
|
-
values.push(val);
|
|
178
|
+
function getValuesByField(t, e) {
|
|
179
|
+
if (t) {
|
|
180
|
+
const o = [];
|
|
181
|
+
for (const n of t) {
|
|
182
|
+
let t2 = n[e];
|
|
183
|
+
null != t2 && null != t2 || (t2 = ""), o.push(t2);
|
|
318
184
|
}
|
|
319
|
-
return
|
|
185
|
+
return o;
|
|
320
186
|
}
|
|
187
|
+
return [""];
|
|
321
188
|
}
|
|
322
|
-
function getVariableValue(
|
|
323
|
-
if (!
|
|
189
|
+
function getVariableValue(t, e) {
|
|
190
|
+
if (!t || !e || 0 == e.length)
|
|
324
191
|
return;
|
|
192
|
+
let o = t;
|
|
193
|
+
for (let t2 = 0; t2 < e.length; t2++) {
|
|
194
|
+
if (null == o)
|
|
195
|
+
return o;
|
|
196
|
+
o = o[e[t2]];
|
|
325
197
|
}
|
|
326
|
-
|
|
327
|
-
for (let i = 0; i < fields.length; i++) {
|
|
328
|
-
if (tempObj == void 0) {
|
|
329
|
-
return tempObj;
|
|
330
|
-
}
|
|
331
|
-
const fieldName = fields[i];
|
|
332
|
-
tempObj = tempObj[fieldName];
|
|
333
|
-
}
|
|
334
|
-
return tempObj;
|
|
198
|
+
return o;
|
|
335
199
|
}
|
|
336
|
-
function setValueForVariableName(
|
|
337
|
-
if (!
|
|
200
|
+
function setValueForVariableName(t, e, o) {
|
|
201
|
+
if (!e || !e.startsWith("${"))
|
|
338
202
|
return;
|
|
339
|
-
|
|
340
|
-
variableName = variableName.substring(2, variableName.length - 1);
|
|
341
|
-
const fields = variableName.split(".");
|
|
342
|
-
setVariableValue(entity, fields, newValue);
|
|
203
|
+
setVariableValue(t, (e = e.substring(2, e.length - 1)).split("."), o);
|
|
343
204
|
}
|
|
344
|
-
function setVariableValue(
|
|
345
|
-
if (!
|
|
205
|
+
function setVariableValue(t, e, o) {
|
|
206
|
+
if (!t || !e || 0 == e.length)
|
|
346
207
|
return;
|
|
347
|
-
|
|
348
|
-
let
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
if (i + 1 === fields.length) {
|
|
352
|
-
tempObj[fieldName] = newValue;
|
|
353
|
-
} else {
|
|
354
|
-
if (tempObj[fieldName] === void 0) {
|
|
355
|
-
tempObj[fieldName] = {};
|
|
356
|
-
}
|
|
357
|
-
tempObj = tempObj[fieldName];
|
|
358
|
-
}
|
|
208
|
+
let n = t;
|
|
209
|
+
for (let t2 = 0; t2 < e.length; t2++) {
|
|
210
|
+
const a = e[t2];
|
|
211
|
+
t2 + 1 === e.length ? n[a] = o : (void 0 === n[a] && (n[a] = {}), n = n[a]);
|
|
359
212
|
}
|
|
360
213
|
}
|
|
361
|
-
function setVariableValueWithProp(
|
|
362
|
-
if (!
|
|
214
|
+
function setVariableValueWithProp(t, e, o) {
|
|
215
|
+
if (!t || !e)
|
|
363
216
|
return;
|
|
364
|
-
|
|
365
|
-
const fields = prop.split(".");
|
|
366
|
-
setVariableValue(entity, fields, newValue);
|
|
217
|
+
setVariableValue(t, e.split("."), o);
|
|
367
218
|
}
|
|
368
|
-
function formatVariableValue(
|
|
369
|
-
if (!
|
|
370
|
-
return
|
|
371
|
-
}
|
|
372
|
-
const
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
variable = variable.replace(
|
|
378
|
-
param,
|
|
379
|
-
paramValue === void 0 || paramValue === null ? "" : paramValue
|
|
380
|
-
);
|
|
381
|
-
}
|
|
382
|
-
return variable;
|
|
219
|
+
function formatVariableValue(t, e) {
|
|
220
|
+
if (!t || "" == e || null == e || null == e)
|
|
221
|
+
return e;
|
|
222
|
+
const o = t.entity ? t.entity : {}, n = getParamNames(e);
|
|
223
|
+
for (const t2 in n) {
|
|
224
|
+
const a = n[t2], r = getValueFromVariable(o, a);
|
|
225
|
+
e = e.replace(a, null == r ? "" : r);
|
|
226
|
+
}
|
|
227
|
+
return e;
|
|
383
228
|
}
|
|
384
|
-
function getParamNames(
|
|
385
|
-
if (!
|
|
229
|
+
function getParamNames(t) {
|
|
230
|
+
if (!t)
|
|
386
231
|
return [];
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
const paramNames = variable.match(reg);
|
|
390
|
-
return paramNames ? paramNames : [];
|
|
232
|
+
const e = t.match(/\$\{[^\{|\}]+\}/g);
|
|
233
|
+
return e || [];
|
|
391
234
|
}
|
|
392
|
-
function formatValueByType(
|
|
393
|
-
if (!
|
|
394
|
-
return
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
if (isNaN(
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
}
|
|
406
|
-
value = parseFloat(value);
|
|
407
|
-
if (formatType == "percent") {
|
|
408
|
-
value = value * 100;
|
|
409
|
-
}
|
|
410
|
-
if (precision > -1) {
|
|
411
|
-
value = parseFloat(value.toFixed(precision));
|
|
412
|
-
}
|
|
413
|
-
if (formatType == "percent") {
|
|
414
|
-
value = value + "%";
|
|
415
|
-
} else {
|
|
416
|
-
if (formatInfo.thousandsSeparator) {
|
|
417
|
-
const parts = value.toString().split(".");
|
|
418
|
-
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
419
|
-
value = parts.length > 1 ? parts.join(".") : parts[0];
|
|
420
|
-
}
|
|
421
|
-
if (formatInfo.symbol) {
|
|
422
|
-
value = formatInfo.symbol + "" + value;
|
|
235
|
+
function formatValueByType(t, e, o) {
|
|
236
|
+
if (!e || "" == t || null == t || null == t)
|
|
237
|
+
return t;
|
|
238
|
+
if (o = o || {}, "number" == e || "percent" == e) {
|
|
239
|
+
if (isNaN(t))
|
|
240
|
+
return t;
|
|
241
|
+
let n = parseInt(o.decimalDigit);
|
|
242
|
+
if ((null == n || isNaN(n)) && (n = -1), t = parseFloat(t), "percent" == e && (t *= 100), n > -1 && (t = parseFloat(t.toFixed(n))), "percent" == e)
|
|
243
|
+
t += "%";
|
|
244
|
+
else {
|
|
245
|
+
if (o.thousandsSeparator) {
|
|
246
|
+
const e2 = t.toString().split(".");
|
|
247
|
+
e2[0] = e2[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), t = e2.length > 1 ? e2.join(".") : e2[0];
|
|
423
248
|
}
|
|
249
|
+
o.symbol && (t = o.symbol + "" + t);
|
|
424
250
|
}
|
|
425
|
-
return
|
|
426
|
-
} else if (formatType == "date" || formatType == "time") {
|
|
427
|
-
let formatStr = "";
|
|
428
|
-
if (formatType == "date") {
|
|
429
|
-
formatStr = formatInfo.dateFormat;
|
|
430
|
-
if (!formatStr) {
|
|
431
|
-
formatStr = "YYYY-MM-DD";
|
|
432
|
-
}
|
|
433
|
-
} else {
|
|
434
|
-
formatStr = formatInfo.timeFormat;
|
|
435
|
-
if (!formatStr) {
|
|
436
|
-
formatStr = "HH:mm:ss";
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
return dayjs(value).format(formatStr);
|
|
440
|
-
} else if (formatType == "custom" && formatInfo.formatEventUuid) {
|
|
441
|
-
console.log("自定义方法", formatInfo);
|
|
442
|
-
}
|
|
443
|
-
return value;
|
|
444
|
-
}
|
|
445
|
-
function getValueFromVariable(entity, variable, row2) {
|
|
446
|
-
if (variable == null || variable == void 0) {
|
|
447
|
-
return variable;
|
|
251
|
+
return t;
|
|
448
252
|
}
|
|
449
|
-
if (
|
|
450
|
-
let
|
|
451
|
-
|
|
452
|
-
let valueSource = null;
|
|
453
|
-
if (paramName.startsWith("data.")) {
|
|
454
|
-
paramName = paramName.substring(5);
|
|
455
|
-
valueSource = entity.data;
|
|
456
|
-
paramType = "data";
|
|
457
|
-
} else if (paramName.startsWith("page.")) {
|
|
458
|
-
paramName = paramName.substring(5);
|
|
459
|
-
paramType = "page";
|
|
460
|
-
valueSource = entity.page;
|
|
461
|
-
} else if (paramName.startsWith("task.")) {
|
|
462
|
-
paramName = paramName.substring(5);
|
|
463
|
-
paramType = "task";
|
|
464
|
-
valueSource = entity.task;
|
|
465
|
-
} else if (paramName.startsWith("request.")) {
|
|
466
|
-
paramName = paramName.substring(8);
|
|
467
|
-
paramType = "request";
|
|
468
|
-
valueSource = entity.request;
|
|
469
|
-
} else if (paramName.startsWith("context.")) {
|
|
470
|
-
paramName = paramName.substring(8);
|
|
471
|
-
paramType = "context";
|
|
472
|
-
valueSource = entity.context;
|
|
473
|
-
} else if (paramName.startsWith("system.")) {
|
|
474
|
-
paramName = paramName.substring(7);
|
|
475
|
-
paramType = "system";
|
|
476
|
-
valueSource = entity.system;
|
|
477
|
-
} else if (paramName.startsWith("fixed.")) {
|
|
478
|
-
return paramName.substring(6);
|
|
479
|
-
} else if (paramName.startsWith("row.")) {
|
|
480
|
-
paramName = paramName.substring(4);
|
|
481
|
-
valueSource = row2;
|
|
482
|
-
paramType = "row";
|
|
483
|
-
}
|
|
484
|
-
if (!paramName) {
|
|
485
|
-
console.log("获取变量失败", variable, entity);
|
|
486
|
-
return "";
|
|
487
|
-
}
|
|
488
|
-
return getValueFromSource(valueSource, paramName, paramType);
|
|
489
|
-
} else {
|
|
490
|
-
return variable;
|
|
253
|
+
if ("date" == e || "time" == e) {
|
|
254
|
+
let n = "";
|
|
255
|
+
return "date" == e ? (n = o.dateFormat, n || (n = "YYYY-MM-DD")) : (n = o.timeFormat, n || (n = "HH:mm:ss")), dayjs(t).format(n);
|
|
491
256
|
}
|
|
257
|
+
return "custom" == e && o.formatEventUuid, t;
|
|
492
258
|
}
|
|
493
|
-
function
|
|
494
|
-
if (
|
|
495
|
-
return
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
if (
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
259
|
+
function getValueFromVariable(t, e, o) {
|
|
260
|
+
if (null == e || null == e)
|
|
261
|
+
return e;
|
|
262
|
+
if (e.startsWith("${") && e.endsWith("}")) {
|
|
263
|
+
let n = e.substring(2, e.length - 1), a = null, r = null;
|
|
264
|
+
if (n.startsWith("data."))
|
|
265
|
+
n = n.substring(5), r = t.data, a = "data";
|
|
266
|
+
else if (n.startsWith("page."))
|
|
267
|
+
n = n.substring(5), a = "page", r = t.page;
|
|
268
|
+
else if (n.startsWith("task."))
|
|
269
|
+
n = n.substring(5), a = "task", r = t.task;
|
|
270
|
+
else if (n.startsWith("request."))
|
|
271
|
+
n = n.substring(8), a = "request", r = t.request;
|
|
272
|
+
else if (n.startsWith("context."))
|
|
273
|
+
n = n.substring(8), a = "context", r = t.context;
|
|
274
|
+
else if (n.startsWith("system."))
|
|
275
|
+
n = n.substring(7), a = "system", r = t.system;
|
|
276
|
+
else {
|
|
277
|
+
if (n.startsWith("fixed."))
|
|
278
|
+
return n.substring(6);
|
|
279
|
+
n.startsWith("row.") && (n = n.substring(4), r = o, a = "row");
|
|
280
|
+
}
|
|
281
|
+
return n ? getValueFromSource(r, n, a) : "";
|
|
282
|
+
}
|
|
283
|
+
return e;
|
|
284
|
+
}
|
|
285
|
+
function getValueFromSource(t, e, o) {
|
|
286
|
+
if ("context" != o && !t || !e)
|
|
287
|
+
return;
|
|
288
|
+
const n = e.indexOf(".");
|
|
289
|
+
if (n > -1) {
|
|
290
|
+
const a = e.substring(0, n), r = e.substring(n + 1);
|
|
291
|
+
let s = t[a];
|
|
292
|
+
return s && Array.isArray(s) && s.length > 0 && (s = s[0]), getValueFromSource(s, r, o);
|
|
293
|
+
}
|
|
294
|
+
if ("context" == o) {
|
|
295
|
+
if ("currentDate" == e || "currentTime" == e)
|
|
296
|
+
return /* @__PURE__ */ new Date();
|
|
297
|
+
if (e.startsWith("currentDate") && e.length > 11) {
|
|
298
|
+
const t2 = e.substring(11), o2 = t2.substring(0, 1);
|
|
299
|
+
let n2 = parseInt(t2.substring(1, t2.length - 1), 10);
|
|
300
|
+
const a = t2.substring(t2.length - 1), r = /* @__PURE__ */ new Date();
|
|
301
|
+
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;
|
|
302
|
+
}
|
|
303
|
+
if (!t)
|
|
304
|
+
return;
|
|
532
305
|
}
|
|
306
|
+
return t[e];
|
|
533
307
|
}
|
|
534
308
|
function caculateShowCondition(pageContext, showConditions, row) {
|
|
535
|
-
if (!showConditions || showConditions.length
|
|
309
|
+
if (!showConditions || 0 == showConditions.length || !pageContext || !pageContext.entity)
|
|
536
310
|
return true;
|
|
537
|
-
}
|
|
538
311
|
const entityData = pageContext.entity;
|
|
539
312
|
let conditions = "";
|
|
540
313
|
const maxLen = showConditions.length;
|
|
541
|
-
for (let
|
|
542
|
-
const
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
if (!propName || propName === "") {
|
|
314
|
+
for (let t = 0; t < maxLen; t++) {
|
|
315
|
+
const e = showConditions[t], o = e.propName;
|
|
316
|
+
let n = e.operator;
|
|
317
|
+
if (!o || "" === o)
|
|
546
318
|
continue;
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
let
|
|
553
|
-
|
|
554
|
-
if (operator == "CONTAIN" || operator == "NOT_CONTAIN") {
|
|
555
|
-
if (leftValue && !leftValue.includes) {
|
|
556
|
-
operator = operator == "CONTAIN" ? "EQ" : "NET";
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
let variableIsNullStr = condition.variableIsNull;
|
|
560
|
-
if (!variableIsNullStr) {
|
|
561
|
-
variableIsNullStr = "null";
|
|
562
|
-
}
|
|
563
|
-
let conditionResult = void 0;
|
|
564
|
-
if (propValue === void 0 || propValue === "") {
|
|
565
|
-
propValue = null;
|
|
566
|
-
if (variableIsNullStr === "null") {
|
|
567
|
-
operator = "IS_NULL";
|
|
568
|
-
} else if (variableIsNullStr === "notequal") {
|
|
569
|
-
operator = "IS_NOT_NULL";
|
|
570
|
-
} else {
|
|
571
|
-
conditionResult = true;
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
if (conditionResult == void 0) {
|
|
319
|
+
n || (n = "EQ");
|
|
320
|
+
const a = getValueFromVariable(entityData, o, row);
|
|
321
|
+
let r = getValueFromVariable(entityData, e.propValue, row);
|
|
322
|
+
const s = e.dataType;
|
|
323
|
+
"CONTAIN" != n && "NOT_CONTAIN" != n || a && !a.includes && (n = "CONTAIN" == n ? "EQ" : "NET");
|
|
324
|
+
let i = e.variableIsNull, u;
|
|
325
|
+
if (i || (i = "null"), void 0 !== r && "" !== r || (r = null, "null" === i ? n = "IS_NULL" : "notequal" === i ? n = "IS_NOT_NULL" : u = true), null == u)
|
|
575
326
|
try {
|
|
576
|
-
|
|
577
|
-
} catch (
|
|
578
|
-
|
|
579
|
-
conditionResult = false;
|
|
327
|
+
u = executeExpression(a, n, r, s);
|
|
328
|
+
} catch (t2) {
|
|
329
|
+
u = false;
|
|
580
330
|
}
|
|
331
|
+
const l = e.leftBracket, c = e.rightBracket;
|
|
332
|
+
let p = e.joinSign;
|
|
333
|
+
if (l && null !== l && "" !== l && (conditions += l, conditions += " "), conditions += u + " ", c && null !== c && "" !== c && (conditions += c, conditions += " "), t < maxLen - 1 && p && null !== p && "" !== p) {
|
|
334
|
+
const t2 = p.toLowerCase();
|
|
335
|
+
"and" === t2 ? p = t2.replace("and", "&&") : "or" === t2 && (p = t2.replace("or", "||")), conditions += p + " ";
|
|
581
336
|
}
|
|
582
|
-
const leftBracket = condition.leftBracket;
|
|
583
|
-
const rightBracket = condition.rightBracket;
|
|
584
|
-
let joinSign = condition.joinSign;
|
|
585
|
-
if (leftBracket && leftBracket !== null && leftBracket !== "") {
|
|
586
|
-
conditions = conditions + leftBracket;
|
|
587
|
-
conditions = conditions + " ";
|
|
588
|
-
}
|
|
589
|
-
conditions += conditionResult + " ";
|
|
590
|
-
if (rightBracket && rightBracket !== null && rightBracket !== "") {
|
|
591
|
-
conditions = conditions + rightBracket;
|
|
592
|
-
conditions = conditions + " ";
|
|
593
|
-
}
|
|
594
|
-
if (i < maxLen - 1) {
|
|
595
|
-
if (joinSign && joinSign !== null && joinSign !== "") {
|
|
596
|
-
const joinSignIgnoreCase = joinSign.toLowerCase();
|
|
597
|
-
if (joinSignIgnoreCase === "and") {
|
|
598
|
-
joinSign = joinSignIgnoreCase.replace("and", "&&");
|
|
599
|
-
} else if (joinSignIgnoreCase === "or") {
|
|
600
|
-
joinSign = joinSignIgnoreCase.replace("or", "||");
|
|
601
|
-
}
|
|
602
|
-
conditions += joinSign + " ";
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
if (conditions) {
|
|
607
|
-
return eval("(" + conditions + ")");
|
|
608
|
-
} else {
|
|
609
|
-
return true;
|
|
610
337
|
}
|
|
338
|
+
return !conditions || eval("(" + conditions + ")");
|
|
611
339
|
}
|
|
612
|
-
function monitorFieldChange(
|
|
613
|
-
if (!
|
|
340
|
+
function monitorFieldChange(t, e, o) {
|
|
341
|
+
if (!o || !t || !e || 0 == e.length)
|
|
614
342
|
return;
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
}
|
|
630
|
-
const entity = pageContext2.entity;
|
|
631
|
-
let firstValue = getMonitorFieldValues(monitorFieldInfos, entity);
|
|
632
|
-
let monitorTimeout = false;
|
|
633
|
-
for (const preField of preFields) {
|
|
634
|
-
watch(entity[preField], () => {
|
|
635
|
-
if (monitorTimeout) {
|
|
636
|
-
clearTimeout(monitorTimeout);
|
|
637
|
-
}
|
|
638
|
-
monitorTimeout = setTimeout(function() {
|
|
639
|
-
const newValue = getMonitorFieldValues(monitorFieldInfos, entity);
|
|
640
|
-
if (firstValue != newValue) {
|
|
641
|
-
firstValue = newValue;
|
|
642
|
-
triggerFunc();
|
|
643
|
-
}
|
|
343
|
+
const n = [], a = [];
|
|
344
|
+
for (let t2 of e)
|
|
345
|
+
if (t2.startsWith("${")) {
|
|
346
|
+
t2 = t2.substring(2, t2.length - 1);
|
|
347
|
+
const e2 = t2.split(".");
|
|
348
|
+
"page" !== e2[0] && "task" !== e2[0] && "data" !== e2[0] || (n.push(e2), a.includes(e2[0]) || a.push(e2[0]));
|
|
349
|
+
}
|
|
350
|
+
const r = t.entity;
|
|
351
|
+
let s = getMonitorFieldValues(n, r), i = false;
|
|
352
|
+
for (const t2 of a)
|
|
353
|
+
watch(r[t2], () => {
|
|
354
|
+
i && clearTimeout(i), i = setTimeout(function() {
|
|
355
|
+
const t3 = getMonitorFieldValues(n, r);
|
|
356
|
+
s != t3 && (s = t3, o());
|
|
644
357
|
}, 200);
|
|
645
358
|
});
|
|
646
|
-
}
|
|
647
359
|
}
|
|
648
|
-
function getMonitorFieldValues(
|
|
649
|
-
let
|
|
650
|
-
for (const
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
return values;
|
|
360
|
+
function getMonitorFieldValues(t, e) {
|
|
361
|
+
let o = "";
|
|
362
|
+
for (const n of t)
|
|
363
|
+
o += "_" + getVariableValue(e, n);
|
|
364
|
+
return o;
|
|
654
365
|
}
|
|
655
|
-
function getFormPropName(
|
|
656
|
-
|
|
657
|
-
return prop.substring(prop.indexOf(".") + 1, prop.lastIndexOf("}"));
|
|
658
|
-
} else {
|
|
659
|
-
return prop;
|
|
660
|
-
}
|
|
366
|
+
function getFormPropName(t) {
|
|
367
|
+
return t && t.indexOf("${") >= 0 ? t.substring(t.indexOf(".") + 1, t.lastIndexOf("}")) : t;
|
|
661
368
|
}
|
|
662
|
-
function getSizeConfig(
|
|
663
|
-
const
|
|
664
|
-
let
|
|
665
|
-
|
|
666
|
-
sizeConfig = configure.props.size[pageModeType];
|
|
667
|
-
}
|
|
668
|
-
if (!sizeConfig && configure.props && configure.props.size) {
|
|
669
|
-
sizeConfig = configure.props.size["pc"];
|
|
670
|
-
}
|
|
671
|
-
return sizeConfig;
|
|
369
|
+
function getSizeConfig(t, e) {
|
|
370
|
+
const o = getPageModeType(t);
|
|
371
|
+
let n;
|
|
372
|
+
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;
|
|
672
373
|
}
|
|
673
|
-
function getPageModeType(
|
|
674
|
-
let
|
|
675
|
-
|
|
676
|
-
dimensions = "pc";
|
|
677
|
-
}
|
|
678
|
-
return dimensions;
|
|
374
|
+
function getPageModeType(t) {
|
|
375
|
+
let e = t.dimensions;
|
|
376
|
+
return e || (e = "pc"), e;
|
|
679
377
|
}
|
|
680
|
-
function isPromise(
|
|
681
|
-
return
|
|
378
|
+
function isPromise(t) {
|
|
379
|
+
return t && "[object Promise]" === Object.prototype.toString.call(t);
|
|
682
380
|
}
|
|
683
|
-
function decomposeVariable(
|
|
684
|
-
if (!
|
|
381
|
+
function decomposeVariable(t) {
|
|
382
|
+
if (!t)
|
|
685
383
|
return [];
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
return paramNames ? paramNames[1].split(".") : [];
|
|
384
|
+
const e = t.match(/\${(.*?)}/);
|
|
385
|
+
return e ? e[1].split(".") : [];
|
|
689
386
|
}
|
|
690
387
|
export {
|
|
691
388
|
autoSetAfterSelect,
|