super-page-runtime 2.2.29-tmp1 → 2.2.29-tmp2
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 +7 -5
- package/dist/es/assets/chart-themes/theme1.js +6 -2
- package/dist/es/assets/chart-themes/theme2.js +6 -2
- package/dist/es/assets/chart-themes/theme3.js +6 -2
- package/dist/es/components/runtime/utils/api/api-util.js +7 -4
- package/dist/es/components/runtime/utils/api/page-expose-util.js +443 -135
- package/dist/es/components/runtime/utils/assemblys-config.js +369 -13
- package/dist/es/components/runtime/utils/barcode-util.js +33 -9
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +306 -122
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +68 -29
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +152 -69
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +124 -46
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +99 -38
- package/dist/es/components/runtime/utils/charts/chart-util.js +522 -226
- package/dist/es/components/runtime/utils/common-util.js +156 -76
- package/dist/es/components/runtime/utils/eventBus.js +8 -3
- package/dist/es/components/runtime/utils/events/event-util.js +775 -362
- package/dist/es/components/runtime/utils/events/print-label.js +140 -73
- package/dist/es/components/runtime/utils/events/standard-event.js +2320 -820
- package/dist/es/components/runtime/utils/events/validator-util.js +560 -224
- package/dist/es/components/runtime/utils/form/date-shortcuts.js +88 -28
- package/dist/es/components/runtime/utils/form/scan-util.js +162 -62
- package/dist/es/components/runtime/utils/global-refs.js +84 -53
- package/dist/es/components/runtime/utils/i18n-util.js +20 -11
- package/dist/es/components/runtime/utils/interfaces/page-design-types.js +7 -2
- package/dist/es/components/runtime/utils/page-helper-util.js +660 -280
- package/dist/es/components/runtime/utils/page-init-util.js +405 -144
- package/dist/es/components/runtime/utils/page-permission-util.js +531 -22
- package/dist/es/components/runtime/utils/page-store.js +68 -23
- package/dist/es/components/runtime/utils/store-util.js +13 -9
- package/dist/es/components/runtime/utils/store.js +2 -2
- package/dist/es/components/runtime/utils/table-utils.js +81 -40
- package/dist/es/components/runtime/utils/tree-utils.js +37 -17
- 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 +83 -21
- 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 +46 -14
- 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 +132 -36
- 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 +18 -4
- 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 +107 -17
- 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 +198 -54
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +42 -12
- 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 +60 -11
- 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 +203 -54
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +4 -4
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +162 -46
- 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 +109 -33
- 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 +166 -44
- 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 +117 -33
- 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 +118 -33
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +599 -253
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +42 -4
- 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 +62 -8
- 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 +160 -29
- 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 +62 -13
- 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 +594 -213
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +139 -33
- 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 +125 -21
- 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 +102 -16
- 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 +81 -18
- 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 +82 -17
- 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 +86 -14
- 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 +79 -21
- 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 +61 -16
- 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 +37 -10
- 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 +127 -38
- 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 +76 -28
- 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 +178 -63
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +810 -305
- 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 +635 -265
- 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 +115 -40
- 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 +215 -56
- package/dist/es/components/runtime/views/assemblys/error-render.vue.js +21 -3
- 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 +154 -43
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +98 -34
- 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 +200 -52
- 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 +239 -70
- 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 +109 -31
- 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 +59 -21
- 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 +188 -56
- 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 +103 -22
- 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 +246 -59
- 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 +174 -34
- 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 +107 -29
- 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 +50 -13
- 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 +194 -65
- 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 +249 -89
- 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 +263 -80
- 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 +57 -13
- 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 +155 -30
- 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 +129 -40
- 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 +107 -22
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +188 -89
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +272 -133
- 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 +46 -18
- 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 +49 -21
- 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 +58 -20
- 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 +53 -16
- package/dist/es/components/runtime/views/home-chart.vue.js +160 -41
- package/dist/es/components/runtime/views/home-chart.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +139 -21
- package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page.vue.js +756 -230
- package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
- package/dist/es/i18n/langs/cn.js +55 -2
- package/dist/es/i18n/langs/en.js +55 -2
- package/package.json +2 -2
|
@@ -1,402 +1,815 @@
|
|
|
1
|
-
import { isMobileBrowser
|
|
2
|
-
import { getAdditionalParamMap
|
|
3
|
-
import { validateDataModelFunc
|
|
4
|
-
import { getComponentRef
|
|
5
|
-
import { ElMessage
|
|
6
|
-
import { analysisCondition
|
|
7
|
-
import { getListCode
|
|
8
|
-
import
|
|
9
|
-
import { getValueFromSource
|
|
10
|
-
import { expressJump
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
1
|
+
import { isMobileBrowser, isPromise } from "agilebuilder-ui/src/utils/common-util";
|
|
2
|
+
import { getAdditionalParamMap, standardEvents, judgeDataNumber, dealAfterOperate } from "./standard-event.js";
|
|
3
|
+
import { validateDataModelFunc } from "./validator-util.js";
|
|
4
|
+
import { getComponentRef, getComponentRefByCode } from "../global-refs.js";
|
|
5
|
+
import { ElMessage } from "element-plus";
|
|
6
|
+
import { analysisCondition } from "agilebuilder-ui/src/utils/util";
|
|
7
|
+
import { getListCode, deepCopy } from "../common-util.js";
|
|
8
|
+
import bus from "../eventBus.js";
|
|
9
|
+
import { getValueFromSource } from "../page-helper-util.js";
|
|
10
|
+
import { expressJump } from "../table-utils.js";
|
|
11
|
+
const skipValidateEvents = [
|
|
12
|
+
"downloadTemplate",
|
|
13
|
+
"back",
|
|
14
|
+
"exportForm",
|
|
15
|
+
"exportPDF",
|
|
16
|
+
"lineEditCreate",
|
|
17
|
+
"workflowSave"
|
|
18
|
+
];
|
|
19
|
+
const exportEvents = [
|
|
20
|
+
"downloadTemplate",
|
|
21
|
+
"exportForm",
|
|
22
|
+
"exportPDF",
|
|
23
|
+
"export",
|
|
24
|
+
"exportCharts"
|
|
25
|
+
];
|
|
26
|
+
const importEvents = [
|
|
27
|
+
"import"
|
|
28
|
+
];
|
|
29
|
+
function initPageEvents(pageDesign, pageContext) {
|
|
30
|
+
if (pageDesign && pageDesign.customEvents) {
|
|
31
|
+
const customEvents = transferToFunction(pageDesign.customEvents);
|
|
32
|
+
appendDefaultMethod(pageContext, customEvents);
|
|
33
|
+
console.log("initPage customEvents", customEvents);
|
|
34
|
+
pageContext.customEvents = customEvents;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function getCustomFunc(pageContext, funcName) {
|
|
38
|
+
if (pageContext.customEvents) {
|
|
39
|
+
return pageContext.customEvents[funcName];
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function appendDefaultMethod(pageContext, customEvents) {
|
|
43
|
+
if (!customEvents) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
for (const pro in customEvents) {
|
|
47
|
+
const func = customEvents[pro];
|
|
48
|
+
appendDefaultMethods(func, pageContext);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function appendDefaultMethods(func, pageContext) {
|
|
52
|
+
func.get = function(code) {
|
|
53
|
+
if (code) {
|
|
54
|
+
return getComponentRefByCode(pageContext, code);
|
|
55
|
+
} else {
|
|
56
|
+
return void 0;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
func.getByUuid = function(uuid) {
|
|
60
|
+
if (uuid) {
|
|
61
|
+
return getComponentRef(pageContext, uuid);
|
|
62
|
+
} else {
|
|
63
|
+
return void 0;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
func.getPageContext = function() {
|
|
67
|
+
return pageContext;
|
|
68
|
+
};
|
|
69
|
+
func.getContextValue = function(fieldName) {
|
|
70
|
+
let contextData = pageContext && pageContext.entity ? pageContext.entity.context : null;
|
|
71
|
+
contextData = contextData ? contextData : {};
|
|
72
|
+
return getValueFromSource(contextData, fieldName, "context");
|
|
73
|
+
};
|
|
74
|
+
func.getContext = function() {
|
|
75
|
+
return pageContext && pageContext.entity ? pageContext.entity.context : {};
|
|
76
|
+
};
|
|
77
|
+
func.getSystem = function() {
|
|
78
|
+
return pageContext && pageContext.entity ? pageContext.entity.system : {};
|
|
79
|
+
};
|
|
80
|
+
func.getTask = function() {
|
|
81
|
+
return pageContext && pageContext.entity ? pageContext.entity.task : {};
|
|
82
|
+
};
|
|
83
|
+
func.getRequest = function() {
|
|
84
|
+
return pageContext && pageContext.entity ? pageContext.entity.request : {};
|
|
85
|
+
};
|
|
86
|
+
func.getPage = function() {
|
|
87
|
+
return pageContext && pageContext.entity ? pageContext.entity.page : {};
|
|
88
|
+
};
|
|
89
|
+
func.getCustomFunc = function(funcName) {
|
|
90
|
+
return getCustomFunc(pageContext, funcName);
|
|
63
91
|
};
|
|
64
92
|
}
|
|
65
|
-
function
|
|
66
|
-
if (
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
93
|
+
function removeCustomFuncFromWindow(pageDesign) {
|
|
94
|
+
if (pageDesign && pageDesign.customEvents) {
|
|
95
|
+
const customEvents = pageDesign.customEvents;
|
|
96
|
+
const customFuncs = customEvents.filter((item) => item.name === "customFunc" && item.jsContent);
|
|
97
|
+
if (customFuncs && customFuncs.length > 0) {
|
|
98
|
+
customFuncs.forEach((event) => {
|
|
99
|
+
delete window["$page_" + event.eventName];
|
|
100
|
+
});
|
|
101
|
+
}
|
|
71
102
|
}
|
|
72
103
|
}
|
|
73
|
-
function
|
|
74
|
-
return
|
|
104
|
+
function handleEvent($event, pageContext, configure, eventType, otherParams) {
|
|
105
|
+
return handleEventUtil($event, pageContext, configure, eventType, true, otherParams, false);
|
|
75
106
|
}
|
|
76
|
-
function
|
|
107
|
+
function handleFormEvent($event, pageContext, configure, eventType, otherParams) {
|
|
77
108
|
var _a, _b;
|
|
78
|
-
if (
|
|
79
|
-
const
|
|
80
|
-
if (
|
|
81
|
-
|
|
82
|
-
|
|
109
|
+
if (eventType && eventType === "change") {
|
|
110
|
+
const subTableWatchProps = pageContext.subTableWatchProps;
|
|
111
|
+
if (subTableWatchProps) {
|
|
112
|
+
for (const tableUuid in subTableWatchProps) {
|
|
113
|
+
const mainFormProps = subTableWatchProps[tableUuid];
|
|
114
|
+
const propName = (_b = (_a = configure.props) == null ? void 0 : _a.base) == null ? void 0 : _b.prop;
|
|
115
|
+
if (mainFormProps && mainFormProps.indexOf(propName) >= 0) {
|
|
116
|
+
bus.$emit("_refreshSubTable_" + tableUuid, { propName });
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return handleEventUtil($event, pageContext, configure, eventType, true, otherParams, true);
|
|
122
|
+
}
|
|
123
|
+
function handleAfterInitEvent($event, pageContext, configure, otherParams) {
|
|
124
|
+
return handleFormEvent($event, pageContext, configure, "afterInit", otherParams);
|
|
125
|
+
}
|
|
126
|
+
function getHandleEvent($event, pageContext, configure, eventType, otherParams) {
|
|
127
|
+
return handleEventUtil($event, pageContext, configure, eventType, false, otherParams, false);
|
|
128
|
+
}
|
|
129
|
+
function handleEventUtil($event, pageContext, configure, eventType, isExecute, otherParams, skipValidate) {
|
|
130
|
+
const events = configure && configure.runtime && configure.runtime.events ? configure.runtime.events : [];
|
|
131
|
+
let eventFun;
|
|
132
|
+
if (!skipValidate && isClickEvent(eventType)) {
|
|
133
|
+
const eventParams = getDefaultEventParams($event, pageContext, configure, otherParams);
|
|
134
|
+
buttonClickEvent(pageContext, configure, eventParams);
|
|
135
|
+
} else {
|
|
136
|
+
eventFun = getEventFuncByType(pageContext, events, eventType);
|
|
137
|
+
if (isExecute) {
|
|
138
|
+
const eventParams = packageEventParams(pageContext, configure, $event, otherParams);
|
|
139
|
+
return callItemEvent(pageContext, configure, eventFun, eventParams);
|
|
140
|
+
} else {
|
|
141
|
+
return eventFun;
|
|
83
142
|
}
|
|
84
143
|
}
|
|
85
|
-
return N(e2, n2, t2, o2, true, i2, true);
|
|
86
144
|
}
|
|
87
|
-
function
|
|
88
|
-
return
|
|
145
|
+
function isClickEvent(eventType) {
|
|
146
|
+
return eventType && (eventType === "click" || eventType === "suffixClick" || eventType === "prefixClick");
|
|
89
147
|
}
|
|
90
|
-
function
|
|
91
|
-
return
|
|
148
|
+
function getTableUuid(pageContext, configure) {
|
|
149
|
+
return configure.props.base.tableUuid ? configure.props.base.tableUuid : pageContext.tableUuids && pageContext.tableUuids.length > 0 ? pageContext.tableUuids[0] : null;
|
|
92
150
|
}
|
|
93
|
-
function
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}(r2)) {
|
|
99
|
-
if (s2 = I(t2, a2, r2), u2) {
|
|
100
|
-
return z(t2, o2, s2, P(t2, o2, e2, c2));
|
|
151
|
+
function packageEventParams(pageContext, configureObj, $event, otherParams) {
|
|
152
|
+
const params = {};
|
|
153
|
+
if (otherParams) {
|
|
154
|
+
for (const key in otherParams) {
|
|
155
|
+
params[key] = otherParams[key];
|
|
101
156
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
157
|
+
}
|
|
158
|
+
if ($event !== void 0 && $event !== null) {
|
|
159
|
+
params["_value"] = $event;
|
|
160
|
+
}
|
|
161
|
+
if (pageContext) {
|
|
162
|
+
params["pageContext"] = pageContext;
|
|
163
|
+
}
|
|
164
|
+
if (configureObj) {
|
|
165
|
+
params["configureObj"] = configureObj;
|
|
166
|
+
}
|
|
167
|
+
return params;
|
|
168
|
+
}
|
|
169
|
+
function buttonClickEvent(pageContext, configure, eventParams) {
|
|
170
|
+
const judgeFlag = judgeDataNumber(configure, eventParams["ids"]);
|
|
171
|
+
if (!judgeFlag) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
if (pageContext.canClick !== void 0 && pageContext.canClick === false) {
|
|
175
|
+
console.log("不能重复点击");
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
canExecuteButton(eventParams).then((result) => {
|
|
179
|
+
if (result["canExecute"] === true) {
|
|
180
|
+
pageContext.clickUuid = configure.uuid;
|
|
181
|
+
pageContext.canClick = false;
|
|
182
|
+
const events = configure.runtime && configure.runtime.events ? configure.runtime.events : [];
|
|
183
|
+
const beforeValidateFormFunc = getEventFuncByType(pageContext, events, "beforeValidateForm");
|
|
184
|
+
let beforeValidateFormResult;
|
|
185
|
+
if (beforeValidateFormFunc) {
|
|
186
|
+
beforeValidateFormResult = callItemEvent(
|
|
187
|
+
pageContext,
|
|
188
|
+
configure,
|
|
189
|
+
beforeValidateFormFunc,
|
|
190
|
+
eventParams
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
if (beforeValidateFormResult === void 0) {
|
|
194
|
+
beforeValidateFormResult = true;
|
|
195
|
+
}
|
|
196
|
+
if (!beforeValidateFormResult) {
|
|
197
|
+
pageContext.canClick = true;
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
if (isPromise(beforeValidateFormResult)) {
|
|
201
|
+
beforeValidateFormResult.then((result2) => {
|
|
202
|
+
if (result2 && result2 === true) {
|
|
203
|
+
doValidateForm(pageContext, configure, eventParams);
|
|
204
|
+
} else {
|
|
205
|
+
pageContext.canClick = true;
|
|
206
|
+
}
|
|
207
|
+
}).catch((error) => {
|
|
208
|
+
console.log(error);
|
|
209
|
+
pageContext.canClick = true;
|
|
210
|
+
});
|
|
211
|
+
} else {
|
|
212
|
+
doValidateForm(pageContext, configure, eventParams);
|
|
119
213
|
}
|
|
120
|
-
}
|
|
121
|
-
}(t2, o2, T(e2, t2, o2, c2));
|
|
122
|
-
}
|
|
123
|
-
function S(e2, n2) {
|
|
124
|
-
return n2.props.base.tableUuid ? n2.props.base.tableUuid : e2.tableUuids && e2.tableUuids.length > 0 ? e2.tableUuids[0] : null;
|
|
125
|
-
}
|
|
126
|
-
function P(e2, n2, t2, o2) {
|
|
127
|
-
const i2 = {};
|
|
128
|
-
if (o2) for (const e3 in o2) i2[e3] = o2[e3];
|
|
129
|
-
return null != t2 && (i2._value = t2), e2 && (i2.pageContext = e2), n2 && (i2.configureObj = n2), i2;
|
|
130
|
-
}
|
|
131
|
-
function R(e2, t2, o2) {
|
|
132
|
-
const i2 = t2.runtime && t2.runtime.events ? t2.runtime.events : [];
|
|
133
|
-
let r2 = true;
|
|
134
|
-
console.log("doValidateForm---eventParams=", o2), (o2 == null ? void 0 : o2.skipValidate) && (r2 = false);
|
|
135
|
-
const c2 = $(e2, i2, "click");
|
|
136
|
-
if (c2) {
|
|
137
|
-
const e3 = function(e4, n2) {
|
|
138
|
-
return e4 && v.includes(n2.eventName);
|
|
139
|
-
}(c2.isStandard, c2.event);
|
|
140
|
-
e3 && (r2 = false);
|
|
141
|
-
}
|
|
142
|
-
u(e2, t2, r2).then((i3) => {
|
|
143
|
-
if (!i3) return void (e2.canClick = true);
|
|
144
|
-
const r3 = U(e2, t2, o2);
|
|
145
|
-
r3 ? n(r3) ? r3.then((n2) => {
|
|
146
|
-
n2 ? q(e2, t2, c2, o2) : e2.canClick = true;
|
|
147
|
-
}).catch((n2) => {
|
|
148
|
-
console.error(n2), e2.canClick = true;
|
|
149
|
-
}) : q(e2, t2, c2, o2) : e2.canClick = true;
|
|
150
|
-
}).catch((n2) => {
|
|
151
|
-
console.error(n2), e2.canClick = true;
|
|
214
|
+
}
|
|
152
215
|
});
|
|
153
216
|
}
|
|
154
|
-
function
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
function U(e2, n2, t2) {
|
|
170
|
-
const o2 = I(e2, n2.runtime && n2.runtime.events ? n2.runtime.events : [], "beforeClick");
|
|
171
|
-
let i2;
|
|
172
|
-
return o2 && (i2 = z(e2, n2, o2, null, t2)), void 0 === i2 || i2;
|
|
173
|
-
}
|
|
174
|
-
function D(e2, n2, t2) {
|
|
175
|
-
const o2 = e2.code + "_";
|
|
176
|
-
m.$emit(o2 + "open-dialog", { pageContext: e2, configureObj: n2, eventParams: t2 });
|
|
177
|
-
}
|
|
178
|
-
function L(e2, n2) {
|
|
179
|
-
return !(!e2.pageType || "list" !== e2.pageType);
|
|
180
|
-
}
|
|
181
|
-
function _(e2, t2, o2) {
|
|
182
|
-
const i2 = t2.runtime && t2.runtime.events ? t2.runtime.events : [], r2 = I(e2, i2, "afterClick");
|
|
183
|
-
if (r2) {
|
|
184
|
-
const i3 = z(e2, t2, r2, null, o2);
|
|
185
|
-
n(i3) ? i3.finally(() => {
|
|
186
|
-
e2.canClick = true;
|
|
187
|
-
}) : e2.canClick = true;
|
|
188
|
-
} else e2.canClick = true;
|
|
189
|
-
}
|
|
190
|
-
function V(e2, n2, t2, o2, i2, u2) {
|
|
191
|
-
o2 ? (e2.result = i2, e2.canClick = true) : r(e2, n2, i2, "", u2);
|
|
192
|
-
const c2 = I(e2, n2.runtime && n2.runtime.events ? n2.runtime.events : [], "afterClick");
|
|
193
|
-
c2 && z(e2, n2, c2, t2);
|
|
194
|
-
}
|
|
195
|
-
function q(e2, t2, o2, i2) {
|
|
196
|
-
let r2 = t2, u2 = t2.props.linkPage;
|
|
197
|
-
if (u2 && u2 instanceof Array) {
|
|
198
|
-
const n2 = function(e3) {
|
|
199
|
-
let n3 = e3 ? e3.row : null;
|
|
200
|
-
n3 || (n3 = e3 && e3.selections && e3.selections.length > 0 ? e3.selections[0] : null);
|
|
201
|
-
return n3;
|
|
202
|
-
}(i2), o3 = d(e2, t2, u2, n2);
|
|
203
|
-
let c2, l2 = false;
|
|
204
|
-
o3 && (l2 = o3.show, c2 = l2 ? o3.toPage : null), u2 = c2 ? c2.linkPage : null, u2 && (r2 = g(t2), r2.props.linkPage = u2);
|
|
205
|
-
}
|
|
206
|
-
u2 && u2.jumpPageUrl ? (e2.canClick = true, D(e2, r2, i2)) : function(e3, t3, o3, i3) {
|
|
207
|
-
const r3 = o3;
|
|
208
|
-
if (r3) {
|
|
209
|
-
const o4 = r3.func, u3 = r3.isStandard, c2 = r3.event, l2 = z(e3, t3, o4, i3), a2 = L(e3);
|
|
210
|
-
if (function(e4, n2) {
|
|
211
|
-
return e4 && ("exportForm" === n2.eventName || "exportPDF" === n2.eventName || "import" === n2.eventName || "assign" === n2.eventName || "copyTask" === n2.eventName || "addSigner" === n2.eventName || "returnTaskTo" === n2.eventName || "removeSigner" === n2.eventName);
|
|
212
|
-
}(u3, c2)) return void (e3.canClick = true);
|
|
213
|
-
n(l2) ? l2.then((n2) => {
|
|
214
|
-
n2 ? V(e3, t3, i3, u3, n2, a2) : e3.canClick = true;
|
|
215
|
-
}).catch((n2) => {
|
|
216
|
-
console.error(n2), e3.canClick = true;
|
|
217
|
-
}) : V(e3, t3, i3, u3, l2, a2);
|
|
218
|
-
} else e3.canClick = true;
|
|
219
|
-
}(e2, t2, o2, i2);
|
|
220
|
-
}
|
|
221
|
-
function A(e2, n2) {
|
|
222
|
-
const t2 = e2.customEvents;
|
|
223
|
-
if (t2 && n2) {
|
|
224
|
-
let e3 = "";
|
|
225
|
-
return e3 = "object" == typeof n2 ? n2.componentUuid + "_" + n2.name : n2, t2[e3];
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
function I(e2, n2, t2) {
|
|
229
|
-
if (n2 && t2) {
|
|
230
|
-
const i2 = n2.filter((e3) => e3.name === t2);
|
|
231
|
-
if (i2 && i2.length > 0) {
|
|
232
|
-
const n3 = i2[0];
|
|
233
|
-
return n3.isStandard ? o[n3.eventName] : A(e2, n3);
|
|
217
|
+
function doValidateForm(pageContext, configure, eventParams) {
|
|
218
|
+
const events = configure.runtime && configure.runtime.events ? configure.runtime.events : [];
|
|
219
|
+
let isEnableRequired = true;
|
|
220
|
+
console.log("doValidateForm---eventParams=", eventParams);
|
|
221
|
+
if (eventParams == null ? void 0 : eventParams.skipValidate) {
|
|
222
|
+
isEnableRequired = false;
|
|
223
|
+
}
|
|
224
|
+
const clickEventFunObj = getClickEventFuncByType(pageContext, events, "click");
|
|
225
|
+
if (clickEventFunObj) {
|
|
226
|
+
const isStandardEvent = clickEventFunObj.isStandard;
|
|
227
|
+
const event = clickEventFunObj.event;
|
|
228
|
+
const isNotNeedValidate = isNotNeedValidateRequired(isStandardEvent, event);
|
|
229
|
+
if (isNotNeedValidate) {
|
|
230
|
+
isEnableRequired = false;
|
|
234
231
|
}
|
|
235
232
|
}
|
|
233
|
+
validateDataModelFunc(pageContext, configure, isEnableRequired).then((validateReslut) => {
|
|
234
|
+
if (!validateReslut) {
|
|
235
|
+
pageContext.canClick = true;
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
const beforeClickResult = doBeforeClickEvent(pageContext, configure, eventParams);
|
|
239
|
+
if (!beforeClickResult) {
|
|
240
|
+
pageContext.canClick = true;
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
if (isPromise(beforeClickResult)) {
|
|
244
|
+
beforeClickResult.then((result) => {
|
|
245
|
+
if (result) {
|
|
246
|
+
doClickEvent(pageContext, configure, clickEventFunObj, eventParams);
|
|
247
|
+
} else {
|
|
248
|
+
pageContext.canClick = true;
|
|
249
|
+
}
|
|
250
|
+
}).catch((error) => {
|
|
251
|
+
console.error(error);
|
|
252
|
+
pageContext.canClick = true;
|
|
253
|
+
});
|
|
254
|
+
} else {
|
|
255
|
+
doClickEvent(pageContext, configure, clickEventFunObj, eventParams);
|
|
256
|
+
}
|
|
257
|
+
}).catch((error) => {
|
|
258
|
+
console.error(error);
|
|
259
|
+
pageContext.canClick = true;
|
|
260
|
+
});
|
|
236
261
|
}
|
|
237
|
-
function
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
262
|
+
function doSuffixOrPrefixClickEvent($event, pageContext, configure, eventType, otherParams) {
|
|
263
|
+
const eventParams = getDefaultEventParams($event, pageContext, configure, otherParams);
|
|
264
|
+
const events = configure.runtime && configure.runtime.events ? configure.runtime.events : [];
|
|
265
|
+
const clickEventFunObj = getClickEventFuncByType(pageContext, events, eventType);
|
|
266
|
+
doClickEvent(pageContext, configure, clickEventFunObj, eventParams);
|
|
267
|
+
}
|
|
268
|
+
function getDefaultEventParams($event, pageContext, configure, otherParams) {
|
|
269
|
+
const pageCode = pageContext.code;
|
|
270
|
+
const pageVersion = pageContext.version;
|
|
271
|
+
const tableUuid = getTableUuid(pageContext, configure);
|
|
272
|
+
if (tableUuid) {
|
|
273
|
+
const gridRef = getComponentRef(pageContext, tableUuid);
|
|
274
|
+
const selections = gridRef ? gridRef.getSelections() : null;
|
|
275
|
+
const selectionIds = gridRef ? gridRef.getSelectionIds() : null;
|
|
276
|
+
if (!otherParams) {
|
|
277
|
+
otherParams = {};
|
|
278
|
+
}
|
|
279
|
+
otherParams["tableUuid"] = tableUuid;
|
|
280
|
+
otherParams["listCode"] = getListCode(pageCode, pageVersion, tableUuid);
|
|
281
|
+
const isListButton = isListPage(pageContext);
|
|
282
|
+
if (isListButton) {
|
|
283
|
+
otherParams["selections"] = selections;
|
|
284
|
+
otherParams["id"] = selectionIds && selectionIds.length > 0 ? selectionIds[0] : null;
|
|
285
|
+
otherParams["ids"] = selectionIds;
|
|
242
286
|
}
|
|
287
|
+
const tableConfigure = gridRef ? gridRef.getTableConfigure() : null;
|
|
288
|
+
otherParams["tableConfigure"] = tableConfigure;
|
|
289
|
+
}
|
|
290
|
+
return packageEventParams(pageContext, configure, $event, otherParams);
|
|
291
|
+
}
|
|
292
|
+
function doBeforeClickEvent(pageContext, configure, otherParams) {
|
|
293
|
+
const events = configure.runtime && configure.runtime.events ? configure.runtime.events : [];
|
|
294
|
+
const beforeClickFunc = getEventFuncByType(pageContext, events, "beforeClick");
|
|
295
|
+
let beforeClickResult;
|
|
296
|
+
if (beforeClickFunc) {
|
|
297
|
+
beforeClickResult = callItemEvent(pageContext, configure, beforeClickFunc, null, otherParams);
|
|
298
|
+
}
|
|
299
|
+
if (beforeClickResult === void 0) {
|
|
300
|
+
return true;
|
|
301
|
+
}
|
|
302
|
+
return beforeClickResult;
|
|
303
|
+
}
|
|
304
|
+
function doClickJumpPageEvent(pageContext, configure, eventParams) {
|
|
305
|
+
const myPageCode = pageContext.code;
|
|
306
|
+
const eventPageInfo = myPageCode + "_";
|
|
307
|
+
bus.$emit(eventPageInfo + "open-dialog", {
|
|
308
|
+
pageContext,
|
|
309
|
+
configureObj: configure,
|
|
310
|
+
eventParams
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
function isListPage(pageContext, configure) {
|
|
314
|
+
return pageContext.pageType && pageContext.pageType === "list" ? true : false;
|
|
315
|
+
}
|
|
316
|
+
function doClickCustomEvent(pageContext, configure, clickEventFuncObj, eventParams) {
|
|
317
|
+
const eventFunObj = clickEventFuncObj;
|
|
318
|
+
if (eventFunObj) {
|
|
319
|
+
const eventFun = eventFunObj["func"];
|
|
320
|
+
const isStandardEvent = eventFunObj["isStandard"];
|
|
321
|
+
const event = eventFunObj["event"];
|
|
322
|
+
const clickResult = callItemEvent(pageContext, configure, eventFun, eventParams);
|
|
323
|
+
const isListButton = isListPage(pageContext);
|
|
324
|
+
if (isNotDoAfterClick(isStandardEvent, event)) {
|
|
325
|
+
pageContext.canClick = true;
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
if (isPromise(clickResult)) {
|
|
329
|
+
clickResult.then((result) => {
|
|
330
|
+
if (result) {
|
|
331
|
+
doAfterClickFunc(
|
|
332
|
+
pageContext,
|
|
333
|
+
configure,
|
|
334
|
+
eventParams,
|
|
335
|
+
isStandardEvent,
|
|
336
|
+
result,
|
|
337
|
+
isListButton
|
|
338
|
+
);
|
|
339
|
+
} else {
|
|
340
|
+
pageContext.canClick = true;
|
|
341
|
+
}
|
|
342
|
+
}).catch((error) => {
|
|
343
|
+
console.error(error);
|
|
344
|
+
pageContext.canClick = true;
|
|
345
|
+
});
|
|
346
|
+
} else {
|
|
347
|
+
doAfterClickFunc(
|
|
348
|
+
pageContext,
|
|
349
|
+
configure,
|
|
350
|
+
eventParams,
|
|
351
|
+
isStandardEvent,
|
|
352
|
+
clickResult,
|
|
353
|
+
isListButton
|
|
354
|
+
);
|
|
355
|
+
}
|
|
356
|
+
} else {
|
|
357
|
+
pageContext.canClick = true;
|
|
243
358
|
}
|
|
244
359
|
}
|
|
245
|
-
function
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
360
|
+
function isNotDoAfterClick(isStandardEvent, clickEvent) {
|
|
361
|
+
return isStandardEvent && (clickEvent.eventName === "exportForm" || clickEvent.eventName === "exportPDF" || clickEvent.eventName === "import" || clickEvent.eventName === "assign" || clickEvent.eventName === "copyTask" || clickEvent.eventName === "addSigner" || clickEvent.eventName === "returnTaskTo" || clickEvent.eventName === "removeSigner");
|
|
362
|
+
}
|
|
363
|
+
function isNotNeedValidateRequired(isStandardEvent, clickEvent) {
|
|
364
|
+
return isStandardEvent && skipValidateEvents.includes(clickEvent.eventName);
|
|
365
|
+
}
|
|
366
|
+
function doAfterClickEvent(pageContext, configure, otherParams) {
|
|
367
|
+
const events = configure.runtime && configure.runtime.events ? configure.runtime.events : [];
|
|
368
|
+
const afterClickFunc = getEventFuncByType(pageContext, events, "afterClick");
|
|
369
|
+
if (afterClickFunc) {
|
|
370
|
+
const afterFunc = callItemEvent(pageContext, configure, afterClickFunc, null, otherParams);
|
|
371
|
+
if (isPromise(afterFunc)) {
|
|
372
|
+
afterFunc.finally(() => {
|
|
373
|
+
pageContext.canClick = true;
|
|
374
|
+
});
|
|
375
|
+
} else {
|
|
376
|
+
pageContext.canClick = true;
|
|
251
377
|
}
|
|
378
|
+
} else {
|
|
379
|
+
pageContext.canClick = true;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
function doAfterClickFunc(pageContext, configure, eventParams, isStandardEvent, result, isListButton) {
|
|
383
|
+
if (!isStandardEvent) {
|
|
384
|
+
dealAfterOperate(
|
|
385
|
+
pageContext,
|
|
386
|
+
configure,
|
|
387
|
+
result,
|
|
388
|
+
"",
|
|
389
|
+
// superPageRuntimeMessage.successfulOperation 开发人员自己加事件
|
|
390
|
+
isListButton
|
|
391
|
+
);
|
|
392
|
+
} else {
|
|
393
|
+
pageContext.result = result;
|
|
394
|
+
pageContext.canClick = true;
|
|
395
|
+
}
|
|
396
|
+
const events = configure.runtime && configure.runtime.events ? configure.runtime.events : [];
|
|
397
|
+
const afterClickFunc = getEventFuncByType(pageContext, events, "afterClick");
|
|
398
|
+
if (afterClickFunc) {
|
|
399
|
+
callItemEvent(pageContext, configure, afterClickFunc, eventParams);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
function doClickEvent(pageContext, configure, clickEventFunObj, eventParams) {
|
|
403
|
+
let configureObj = configure;
|
|
404
|
+
let linkPage = configure.props.linkPage;
|
|
405
|
+
if (linkPage && linkPage instanceof Array) {
|
|
406
|
+
const row = getRowData(eventParams);
|
|
407
|
+
const result = expressJump(pageContext, configure, linkPage, row);
|
|
408
|
+
let show = false;
|
|
409
|
+
let toLinkPage;
|
|
410
|
+
if (result) {
|
|
411
|
+
show = result.show;
|
|
412
|
+
toLinkPage = show ? result.toPage : null;
|
|
413
|
+
}
|
|
414
|
+
linkPage = toLinkPage ? toLinkPage.linkPage : null;
|
|
415
|
+
if (linkPage) {
|
|
416
|
+
configureObj = deepCopy(configure);
|
|
417
|
+
configureObj.props.linkPage = linkPage;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
if (linkPage && linkPage.jumpPageUrl) {
|
|
421
|
+
pageContext.canClick = true;
|
|
422
|
+
doClickJumpPageEvent(pageContext, configureObj, eventParams);
|
|
423
|
+
} else {
|
|
424
|
+
doClickCustomEvent(pageContext, configure, clickEventFunObj, eventParams);
|
|
252
425
|
}
|
|
253
426
|
}
|
|
254
|
-
function
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
if (
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
427
|
+
function getRowData(eventParams) {
|
|
428
|
+
let row = eventParams ? eventParams.row : null;
|
|
429
|
+
if (!row) {
|
|
430
|
+
row = eventParams && eventParams.selections && eventParams.selections.length > 0 ? eventParams.selections[0] : null;
|
|
431
|
+
}
|
|
432
|
+
return row;
|
|
433
|
+
}
|
|
434
|
+
function getEventByEventName(pageContext, eventObj) {
|
|
435
|
+
const eventsObj = pageContext.customEvents;
|
|
436
|
+
if (eventsObj && eventObj) {
|
|
437
|
+
let key = "";
|
|
438
|
+
if (typeof eventObj === "object") {
|
|
439
|
+
key = eventObj.componentUuid + "_" + eventObj.name;
|
|
440
|
+
} else {
|
|
441
|
+
key = eventObj;
|
|
442
|
+
}
|
|
443
|
+
return eventsObj[key];
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
function getEventFuncByType(pageContext, events, eventType) {
|
|
447
|
+
if (events && eventType) {
|
|
448
|
+
const eventArr = events.filter((item) => item.name === eventType);
|
|
449
|
+
if (eventArr && eventArr.length > 0) {
|
|
450
|
+
const event = eventArr[0];
|
|
451
|
+
if (event.isStandard) {
|
|
452
|
+
return standardEvents[event.eventName];
|
|
453
|
+
} else {
|
|
454
|
+
return getEventByEventName(pageContext, event);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
function getEventNameByType(events, eventType) {
|
|
460
|
+
if (events && eventType) {
|
|
461
|
+
const eventArr = events.filter((item) => item.name === eventType);
|
|
462
|
+
if (eventArr && eventArr.length > 0) {
|
|
463
|
+
const event = eventArr[0];
|
|
464
|
+
return event.eventName;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
function getClickEventFuncByType(pageContext, events, eventType) {
|
|
469
|
+
if (events && eventType) {
|
|
470
|
+
const eventArr = events.filter((item) => item.name === eventType);
|
|
471
|
+
if (eventArr && eventArr.length > 0) {
|
|
472
|
+
const event = eventArr[0];
|
|
473
|
+
if (event.isStandard) {
|
|
474
|
+
return { func: standardEvents[event.eventName], isStandard: true, event };
|
|
475
|
+
} else {
|
|
476
|
+
return {
|
|
477
|
+
func: getEventByEventName(pageContext, event),
|
|
478
|
+
isStandard: false,
|
|
479
|
+
event
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
function callItemEvent(pageContext, configureObj, eventFun, eventParams, otherParams) {
|
|
486
|
+
if (!eventFun) {
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
if (!eventParams) {
|
|
490
|
+
eventParams = {
|
|
491
|
+
pageContext,
|
|
492
|
+
configureObj
|
|
493
|
+
// 组件配置信息,包含如:跳转页面配置、判重配置等
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
if (otherParams && eventParams) {
|
|
497
|
+
for (const key in otherParams) {
|
|
498
|
+
eventParams[key] = otherParams[key];
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
return eventFun.apply(eventFun, [eventParams]);
|
|
502
|
+
}
|
|
503
|
+
function transferToFunction(customEvents) {
|
|
504
|
+
const eventsObj = {};
|
|
505
|
+
customEvents.forEach((event) => {
|
|
506
|
+
if (!event.isStandard && event.jsContent) {
|
|
507
|
+
if (event.name === "customFunc") {
|
|
508
|
+
let newFunc = null;
|
|
509
|
+
if (event.funcParam) {
|
|
510
|
+
const args = event.funcParam.split(",");
|
|
511
|
+
newFunc = new Function(args, event.jsContent);
|
|
512
|
+
} else {
|
|
513
|
+
newFunc = new Function(event.jsContent);
|
|
514
|
+
}
|
|
515
|
+
eventsObj[event.eventName] = newFunc;
|
|
516
|
+
} else {
|
|
517
|
+
let key = event.componentUuid + "_";
|
|
518
|
+
key += event.name;
|
|
519
|
+
eventsObj[key] = new Function("params", event.jsContent);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
});
|
|
523
|
+
return eventsObj;
|
|
524
|
+
}
|
|
525
|
+
function canExecuteButton(params) {
|
|
526
|
+
const pageContext = params.pageContext;
|
|
527
|
+
const configureObj = params.configureObj;
|
|
528
|
+
const isListButton = isListPage(pageContext);
|
|
529
|
+
let entities = [];
|
|
530
|
+
if (isListButton) {
|
|
531
|
+
if (pageContext.editData) {
|
|
532
|
+
entities.push(pageContext.editData);
|
|
533
|
+
} else {
|
|
534
|
+
entities = params.selections;
|
|
535
|
+
}
|
|
536
|
+
} else {
|
|
537
|
+
const dataModel = pageContext.entity.data;
|
|
538
|
+
entities.push(dataModel);
|
|
539
|
+
}
|
|
540
|
+
const executableDataSetting = configureObj.props.base.condition;
|
|
541
|
+
return new Promise((resolve, reject) => {
|
|
542
|
+
if (executableDataSetting === void 0 || executableDataSetting === "" || entities === void 0 || entities.length === 0) {
|
|
543
|
+
resolve({
|
|
544
|
+
canExecute: true
|
|
545
|
+
});
|
|
546
|
+
} else {
|
|
547
|
+
const contextParameter = pageContext.entity.context;
|
|
548
|
+
const additionalParamMap = getAdditionalParamMap(pageContext);
|
|
549
|
+
const isSql = true;
|
|
550
|
+
const tableName = pageContext.tableName;
|
|
551
|
+
let isCanExecute = true;
|
|
552
|
+
let failMessage;
|
|
553
|
+
let failEntity;
|
|
554
|
+
for (let i = 0; i < entities.length; i++) {
|
|
555
|
+
const entity = entities[i];
|
|
556
|
+
for (let n = 0; n < executableDataSetting.length; n++) {
|
|
557
|
+
const conditionSetting = executableDataSetting[n];
|
|
558
|
+
const message = conditionSetting.toolTips;
|
|
559
|
+
const conditionList = conditionSetting.conditionList;
|
|
560
|
+
const canExecute = analysisCondition(
|
|
561
|
+
conditionList,
|
|
562
|
+
entity,
|
|
563
|
+
additionalParamMap,
|
|
564
|
+
contextParameter,
|
|
565
|
+
isSql,
|
|
566
|
+
tableName,
|
|
567
|
+
null,
|
|
568
|
+
pageContext
|
|
569
|
+
);
|
|
570
|
+
if (!canExecute) {
|
|
571
|
+
isCanExecute = false;
|
|
572
|
+
failMessage = message;
|
|
573
|
+
failEntity = entity;
|
|
280
574
|
break;
|
|
281
575
|
}
|
|
282
576
|
}
|
|
283
577
|
}
|
|
284
|
-
|
|
578
|
+
if (!isCanExecute) {
|
|
579
|
+
if (failMessage) {
|
|
580
|
+
ElMessage({
|
|
581
|
+
showClose: true,
|
|
582
|
+
type: "warning",
|
|
583
|
+
message: failMessage
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
resolve({
|
|
587
|
+
canExecute: false,
|
|
588
|
+
message: failMessage,
|
|
589
|
+
failEntity
|
|
590
|
+
});
|
|
591
|
+
} else {
|
|
592
|
+
resolve({
|
|
593
|
+
canExecute: true
|
|
594
|
+
});
|
|
595
|
+
}
|
|
285
596
|
}
|
|
286
597
|
});
|
|
287
598
|
}
|
|
288
|
-
function
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
return w(null, e3.pageContext, e3.configureObj, "resizeTableHeight", e3);
|
|
298
|
-
}({ pageContext: t2, configureObj: o2 }), e2), e2.lineEditOptions || (e2.lineEditOptions = {}), G("beforeInsertRow", function(e3) {
|
|
299
|
-
return w(null, e3.pageContext, e3.configureObj, "beforeAddRow", e3);
|
|
300
|
-
}({ pageContext: t2, configureObj: o2 }), e2.lineEditOptions), G("afterInsertRow", function(e3) {
|
|
301
|
-
return w(null, e3.pageContext, e3.configureObj, "afterAddRow", e3);
|
|
302
|
-
}({ pageContext: t2, configureObj: o2 }), e2.lineEditOptions), G("beforeDelete", function(e3) {
|
|
303
|
-
return w(null, e3.pageContext, e3.configureObj, "beforeRemoveRow", e3);
|
|
304
|
-
}({ pageContext: t2, configureObj: o2 }), e2.lineEditOptions), G("afterDelete", function(e3) {
|
|
305
|
-
return w(null, e3.pageContext, e3.configureObj, "afterRemoveRow", e3);
|
|
306
|
-
}({ pageContext: t2, configureObj: o2 }), e2.lineEditOptions), G("beforeEdit", function(e3) {
|
|
307
|
-
return w(null, e3.pageContext, e3.configureObj, "beforeEdit", e3);
|
|
308
|
-
}({ pageContext: t2, configureObj: o2 }), e2.lineEditOptions), G("beforeRestore", function(e3) {
|
|
309
|
-
return w(null, e3.pageContext, e3.configureObj, "beforeRestore", e3);
|
|
310
|
-
}({ pageContext: t2, configureObj: o2 }), e2.lineEditOptions), G("beforeRestoreValidate", function(e3) {
|
|
311
|
-
return w(null, e3.pageContext, e3.configureObj, "beforeRestoreValidate", e3);
|
|
312
|
-
}({ pageContext: t2, configureObj: o2 }), e2.lineEditOptions), function(e3, n3, t3) {
|
|
313
|
-
n3 && (t3[e3] = n3);
|
|
314
|
-
}("filterDataEvent", w(null, t2, o2, "filter-data", { pageContext: t2, configureObj: o2 }), e2));
|
|
315
|
-
}
|
|
316
|
-
function G(e2, n2, t2) {
|
|
317
|
-
n2 && (t2[e2] = n2);
|
|
318
|
-
}
|
|
319
|
-
function J(e2, n2, t2) {
|
|
320
|
-
return h(null, e2, n2, "select", t2);
|
|
321
|
-
}
|
|
322
|
-
function K(e2, n2, t2) {
|
|
323
|
-
return h(null, e2, n2, "select-all", t2);
|
|
324
|
-
}
|
|
325
|
-
function M(e2, n2, t2) {
|
|
326
|
-
return h(null, e2, n2, "selection-change", t2);
|
|
327
|
-
}
|
|
328
|
-
function Q(e2, n2, t2) {
|
|
329
|
-
return h(null, e2, n2, "cell-click", t2);
|
|
330
|
-
}
|
|
331
|
-
function X(e2, n2, t2) {
|
|
332
|
-
return h(null, e2, n2, "cell-dblclick", t2);
|
|
333
|
-
}
|
|
334
|
-
function Y(e2, n2, t2) {
|
|
335
|
-
return h(null, e2, n2, "row-click", t2);
|
|
336
|
-
}
|
|
337
|
-
function Z(e2, n2, t2) {
|
|
338
|
-
return h(null, e2, n2, "row-dblclick", t2);
|
|
339
|
-
}
|
|
340
|
-
function ee(e2, n2, t2) {
|
|
341
|
-
return h(null, e2, n2, "header-click", t2);
|
|
342
|
-
}
|
|
343
|
-
function ne(e2) {
|
|
344
|
-
return w(null, e2.pageContext, e2.configureObj, "before-upload", e2);
|
|
345
|
-
}
|
|
346
|
-
function te(n2) {
|
|
347
|
-
let t2 = true;
|
|
348
|
-
if (!e()) {
|
|
349
|
-
const e2 = n2 && n2.events ? n2.events : [];
|
|
350
|
-
if (e2) {
|
|
351
|
-
const n3 = e2.filter((e3) => "click" === e3.name && e3.isStandard && e3.eventName && "showSearch" === e3.eventName);
|
|
352
|
-
n3 && n3.length > 0 && (t2 = false);
|
|
599
|
+
function setTableEvents(options, tableEvents, pageContext, configureObj) {
|
|
600
|
+
if (tableEvents) {
|
|
601
|
+
addTableEvent("loadBeforeSend", loadBeforeSend({ pageContext, configureObj }), options);
|
|
602
|
+
addTableEvent("beforeRequest", beforeRequest({ pageContext, configureObj }), options);
|
|
603
|
+
addTableEvent("gridDataLoaded", gridDataLoaded({ pageContext, configureObj }), options);
|
|
604
|
+
addTableEvent("gridComplete", gridComplete({ pageContext, configureObj }), options);
|
|
605
|
+
addTableEvent("resizeHeight", resizeTableHeight({ pageContext, configureObj }), options);
|
|
606
|
+
if (!options["lineEditOptions"]) {
|
|
607
|
+
options["lineEditOptions"] = {};
|
|
353
608
|
}
|
|
609
|
+
addTableEvent(
|
|
610
|
+
"beforeInsertRow",
|
|
611
|
+
gridBeforeInsertRow({ pageContext, configureObj }),
|
|
612
|
+
options["lineEditOptions"]
|
|
613
|
+
);
|
|
614
|
+
addTableEvent(
|
|
615
|
+
"afterInsertRow",
|
|
616
|
+
gridAfterInsertRow({ pageContext, configureObj }),
|
|
617
|
+
options["lineEditOptions"]
|
|
618
|
+
);
|
|
619
|
+
addTableEvent(
|
|
620
|
+
"beforeDelete",
|
|
621
|
+
gridBeforeRemoveRow({ pageContext, configureObj }),
|
|
622
|
+
options["lineEditOptions"]
|
|
623
|
+
);
|
|
624
|
+
addTableEvent(
|
|
625
|
+
"afterDelete",
|
|
626
|
+
gridAfterRemoveRow({ pageContext, configureObj }),
|
|
627
|
+
options["lineEditOptions"]
|
|
628
|
+
);
|
|
629
|
+
addTableEvent(
|
|
630
|
+
"beforeEdit",
|
|
631
|
+
gridBeforeEdit({ pageContext, configureObj }),
|
|
632
|
+
options["lineEditOptions"]
|
|
633
|
+
);
|
|
634
|
+
addTableEvent(
|
|
635
|
+
"beforeRestore",
|
|
636
|
+
beforeRestore({ pageContext, configureObj }),
|
|
637
|
+
options["lineEditOptions"]
|
|
638
|
+
);
|
|
639
|
+
addTableEvent(
|
|
640
|
+
"beforeRestoreValidate",
|
|
641
|
+
beforeRestoreValidate({ pageContext, configureObj }),
|
|
642
|
+
options["lineEditOptions"]
|
|
643
|
+
);
|
|
644
|
+
filterDataEvent(
|
|
645
|
+
"filterDataEvent",
|
|
646
|
+
getHandleEvent(null, pageContext, configureObj, "filter-data", {
|
|
647
|
+
pageContext,
|
|
648
|
+
configureObj
|
|
649
|
+
}),
|
|
650
|
+
options
|
|
651
|
+
);
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
function filterDataEvent(gridEventType, eventFunc, options) {
|
|
655
|
+
if (eventFunc) {
|
|
656
|
+
options[gridEventType] = eventFunc;
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
function addTableEvent(gridEventType, eventFunc, options) {
|
|
660
|
+
if (eventFunc) {
|
|
661
|
+
options[gridEventType] = eventFunc;
|
|
354
662
|
}
|
|
355
|
-
return t2;
|
|
356
663
|
}
|
|
357
|
-
function
|
|
358
|
-
return
|
|
664
|
+
function loadBeforeSend(params) {
|
|
665
|
+
return getHandleEvent(null, params.pageContext, params.configureObj, "beforeListLoad", params);
|
|
666
|
+
}
|
|
667
|
+
function beforeRequest(params) {
|
|
668
|
+
return getHandleEvent(null, params.pageContext, params.configureObj, "beforeRequest", params);
|
|
669
|
+
}
|
|
670
|
+
function gridDataLoaded(params) {
|
|
671
|
+
return getHandleEvent(null, params.pageContext, params.configureObj, "onListLoad", params);
|
|
672
|
+
}
|
|
673
|
+
function gridComplete(params) {
|
|
674
|
+
return getHandleEvent(null, params.pageContext, params.configureObj, "afterListLoad", params);
|
|
675
|
+
}
|
|
676
|
+
function resizeTableHeight(params) {
|
|
677
|
+
return getHandleEvent(null, params.pageContext, params.configureObj, "resizeTableHeight", params);
|
|
678
|
+
}
|
|
679
|
+
function beforeRestoreValidate(params) {
|
|
680
|
+
return getHandleEvent(
|
|
681
|
+
null,
|
|
682
|
+
params.pageContext,
|
|
683
|
+
params.configureObj,
|
|
684
|
+
"beforeRestoreValidate",
|
|
685
|
+
params
|
|
686
|
+
);
|
|
687
|
+
}
|
|
688
|
+
function beforeRestore(params) {
|
|
689
|
+
return getHandleEvent(null, params.pageContext, params.configureObj, "beforeRestore", params);
|
|
690
|
+
}
|
|
691
|
+
function gridBeforeEdit(params) {
|
|
692
|
+
return getHandleEvent(null, params.pageContext, params.configureObj, "beforeEdit", params);
|
|
693
|
+
}
|
|
694
|
+
function gridBeforeInsertRow(params) {
|
|
695
|
+
return getHandleEvent(null, params.pageContext, params.configureObj, "beforeAddRow", params);
|
|
696
|
+
}
|
|
697
|
+
function gridAfterInsertRow(params) {
|
|
698
|
+
return getHandleEvent(null, params.pageContext, params.configureObj, "afterAddRow", params);
|
|
699
|
+
}
|
|
700
|
+
function gridBeforeRemoveRow(params) {
|
|
701
|
+
return getHandleEvent(null, params.pageContext, params.configureObj, "beforeRemoveRow", params);
|
|
702
|
+
}
|
|
703
|
+
function gridAfterRemoveRow(params) {
|
|
704
|
+
return getHandleEvent(null, params.pageContext, params.configureObj, "afterRemoveRow", params);
|
|
705
|
+
}
|
|
706
|
+
function gridSelectRecord(pageContext, configureObj, params) {
|
|
707
|
+
return handleEvent(null, pageContext, configureObj, "select", params);
|
|
708
|
+
}
|
|
709
|
+
function gridSelectAllRecords(pageContext, configureObj, params) {
|
|
710
|
+
return handleEvent(null, pageContext, configureObj, "select-all", params);
|
|
711
|
+
}
|
|
712
|
+
function gridSelectionChange(pageContext, configureObj, params) {
|
|
713
|
+
return handleEvent(null, pageContext, configureObj, "selection-change", params);
|
|
714
|
+
}
|
|
715
|
+
function cellClick(pageContext, configureObj, params) {
|
|
716
|
+
return handleEvent(null, pageContext, configureObj, "cell-click", params);
|
|
359
717
|
}
|
|
360
|
-
function
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
718
|
+
function cellDblClick(pageContext, configureObj, params) {
|
|
719
|
+
return handleEvent(null, pageContext, configureObj, "cell-dblclick", params);
|
|
720
|
+
}
|
|
721
|
+
function rowClick(pageContext, configureObj, params) {
|
|
722
|
+
return handleEvent(null, pageContext, configureObj, "row-click", params);
|
|
723
|
+
}
|
|
724
|
+
function rowDblClick(pageContext, configureObj, params) {
|
|
725
|
+
return handleEvent(null, pageContext, configureObj, "row-dblclick", params);
|
|
726
|
+
}
|
|
727
|
+
function headerClick(pageContext, configureObj, params) {
|
|
728
|
+
return handleEvent(null, pageContext, configureObj, "header-click", params);
|
|
729
|
+
}
|
|
730
|
+
function fileUploadBeforeUpload(params) {
|
|
731
|
+
return getHandleEvent(null, params.pageContext, params.configureObj, "before-upload", params);
|
|
732
|
+
}
|
|
733
|
+
function isShowComponent(configure) {
|
|
734
|
+
let isShow = true;
|
|
735
|
+
const isMobile = isMobileBrowser();
|
|
736
|
+
if (!isMobile) {
|
|
737
|
+
const events = configure && configure.events ? configure.events : [];
|
|
738
|
+
if (events) {
|
|
739
|
+
const eventArr = events.filter(
|
|
740
|
+
(item) => item.name === "click" && item.isStandard && item.eventName && item.eventName === "showSearch"
|
|
741
|
+
);
|
|
742
|
+
if (eventArr && eventArr.length > 0) {
|
|
743
|
+
isShow = false;
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
return isShow;
|
|
748
|
+
}
|
|
749
|
+
function handleChartEvent(pageContext, configure, eventType, chartOption, otherParams) {
|
|
750
|
+
const events = configure && configure.runtime && configure.runtime.events ? configure.runtime.events : [];
|
|
751
|
+
const eventFun = getEventFuncByType(pageContext, events, eventType);
|
|
752
|
+
return callItemEvent(pageContext, configure, eventFun, {
|
|
753
|
+
configure,
|
|
754
|
+
pageContext,
|
|
755
|
+
chartOption,
|
|
756
|
+
...otherParams
|
|
757
|
+
});
|
|
758
|
+
}
|
|
759
|
+
function isShowMobileEvent(pageContext, configure) {
|
|
760
|
+
let isShow = true;
|
|
761
|
+
const isMobile = isMobileBrowser();
|
|
762
|
+
if (isMobile) {
|
|
763
|
+
const events = configure && configure.runtime && configure.runtime.events ? configure.runtime.events : [];
|
|
764
|
+
const clickEventFunObj = getClickEventFuncByType(pageContext, events, "click");
|
|
765
|
+
if (clickEventFunObj) {
|
|
766
|
+
const isStandardEvent = clickEventFunObj.isStandard;
|
|
767
|
+
const event = clickEventFunObj.event;
|
|
768
|
+
const userAgentOrg = navigator ? navigator.userAgent : null;
|
|
769
|
+
if (isStandardEvent && userAgentOrg) {
|
|
770
|
+
if (userAgentOrg.indexOf(" uni-app ") > 0) {
|
|
771
|
+
if (exportEvents.includes(event.eventName) || importEvents.includes(event.eventName)) {
|
|
772
|
+
isShow = false;
|
|
773
|
+
}
|
|
774
|
+
} else {
|
|
775
|
+
if (importEvents.includes(event.eventName)) {
|
|
776
|
+
isShow = false;
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
}
|
|
367
780
|
}
|
|
368
781
|
}
|
|
369
|
-
return
|
|
782
|
+
return isShow;
|
|
370
783
|
}
|
|
371
784
|
export {
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
785
|
+
appendDefaultMethods,
|
|
786
|
+
canExecuteButton,
|
|
787
|
+
cellClick,
|
|
788
|
+
cellDblClick,
|
|
789
|
+
doAfterClickEvent,
|
|
790
|
+
doBeforeClickEvent,
|
|
791
|
+
doClickJumpPageEvent,
|
|
792
|
+
doSuffixOrPrefixClickEvent,
|
|
793
|
+
fileUploadBeforeUpload,
|
|
794
|
+
getClickEventFuncByType,
|
|
795
|
+
getCustomFunc,
|
|
796
|
+
getEventFuncByType,
|
|
797
|
+
getEventNameByType,
|
|
798
|
+
getHandleEvent,
|
|
799
|
+
getTableUuid,
|
|
800
|
+
gridSelectAllRecords,
|
|
801
|
+
gridSelectRecord,
|
|
802
|
+
gridSelectionChange,
|
|
803
|
+
handleAfterInitEvent,
|
|
804
|
+
handleChartEvent,
|
|
805
|
+
handleEvent,
|
|
806
|
+
handleFormEvent,
|
|
807
|
+
headerClick,
|
|
808
|
+
initPageEvents,
|
|
809
|
+
isShowComponent,
|
|
810
|
+
isShowMobileEvent,
|
|
811
|
+
removeCustomFuncFromWindow,
|
|
812
|
+
rowClick,
|
|
813
|
+
rowDblClick,
|
|
814
|
+
setTableEvents
|
|
402
815
|
};
|