super-page-runtime 1.0.16 → 2.0.1
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/assets/chart-themes/theme1.d.ts +4 -0
- package/{lib/src → dist/es}/assets/chart-themes/theme1.js +3 -2
- package/dist/es/assets/chart-themes/theme2.d.ts +4 -0
- package/{lib/src → dist/es}/assets/chart-themes/theme2.js +3 -2
- package/dist/es/assets/chart-themes/theme3.d.ts +4 -0
- package/{lib/src → dist/es}/assets/chart-themes/theme3.js +3 -2
- package/dist/es/components/runtime/index.d.ts +4 -0
- package/{lib/src → dist/es/components/runtime}/utils/api/api-util.js +15 -15
- package/dist/es/components/runtime/utils/assemblys-config.js +257 -0
- package/dist/es/components/runtime/utils/charts/chart-util.d.ts +11 -0
- package/dist/es/components/runtime/utils/charts/chart-util.js +28 -0
- package/{lib/src → dist/es/components/runtime}/utils/common-util.d.ts +5 -0
- package/{lib/src → dist/es/components/runtime}/utils/common-util.js +25 -12
- package/dist/es/components/runtime/utils/eventBus.d.ts +7 -0
- package/dist/es/components/runtime/utils/eventBus.js +11 -0
- package/{lib/src → dist/es/components/runtime}/utils/events/event-util.d.ts +1 -1
- package/{lib/src → dist/es/components/runtime}/utils/events/event-util.js +41 -40
- package/{lib/src → dist/es/components/runtime}/utils/events/standard-event.js +149 -148
- package/{lib/src → dist/es/components/runtime}/utils/events/validator-util.js +23 -23
- package/{lib/src → dist/es/components/runtime}/utils/global-refs.js +8 -8
- package/{lib/src → dist/es/components/runtime}/utils/interfaces/page-design-types.d.ts +2 -0
- package/{lib/src → dist/es/components/runtime}/utils/interfaces/page-design-types.js +3 -3
- package/{lib/src → dist/es/components/runtime}/utils/page-helper-util.d.ts +19 -0
- package/{lib/src → dist/es/components/runtime}/utils/page-helper-util.js +135 -19
- package/{lib/src → dist/es/components/runtime}/utils/page-init-util.js +18 -18
- package/dist/es/components/runtime/utils/page-permission-util.d.ts +26 -0
- package/dist/es/components/runtime/utils/page-permission-util.js +525 -0
- package/{lib/src → dist/es/components/runtime}/utils/store-util.js +5 -5
- package/{lib/src → dist/es/components/runtime}/utils/store.js +3 -2
- package/{lib/src → dist/es/components/runtime}/utils/table-utils.js +10 -9
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +55 -0
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +36 -0
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +111 -0
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +249 -0
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +62 -0
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +57 -0
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +50 -0
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +51 -0
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +51 -0
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +52 -0
- package/{lib → dist/es/components}/runtime/views/assemblys/common/export-form-report-dialog.vue.js +34 -27
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +4 -0
- package/{lib → dist/es/components}/runtime/views/assemblys/common/remove-signer-dialog.vue.js +33 -32
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +4 -0
- package/{lib → dist/es/components}/runtime/views/assemblys/common/task-informition-dialog.vue.js +30 -29
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +4 -0
- package/{lib → dist/es/components}/runtime/views/assemblys/container/card/card-runtime.vue2.js +24 -23
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +75 -0
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +80 -0
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +44 -0
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +45 -0
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +4 -0
- package/{lib → dist/es/components}/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +10 -8
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +70 -0
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +4 -0
- package/{lib → dist/es/components}/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +17 -15
- package/{lib → dist/es/components}/runtime/views/assemblys/data/table/main-table-runtime.vue.js +66 -63
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +4 -0
- package/{lib → dist/es/components}/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +40 -38
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +4 -0
- package/{lib → dist/es/components}/runtime/views/assemblys/data/table/table-runtime.vue2.js +17 -11
- package/dist/es/components/runtime/views/assemblys/error-render.vue.js +23 -0
- package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +4 -0
- package/{lib → dist/es/components}/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +36 -35
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +83 -0
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +64 -0
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +41 -0
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +75 -0
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +64 -0
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +128 -0
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +128 -0
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +78 -0
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +30 -0
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +4 -0
- package/{lib → dist/es/components}/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +37 -36
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +4 -0
- package/{lib → dist/es/components}/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +37 -48
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +4 -0
- package/{lib → dist/es/components}/runtime/views/assemblys/form/select/select-runtime.vue2.js +54 -53
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +64 -0
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +64 -0
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +66 -0
- package/{lib → dist/es}/components/runtime/views/assemblys/object-render.vue.d.ts +1 -1
- package/{lib → dist/es/components}/runtime/views/assemblys/object-render.vue.js +35 -34
- package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +4 -0
- package/{lib → dist/es/components}/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +17 -16
- package/{lib/super-page-dialog → dist/es/components/runtime/views}/super-page-dialog.vue.js +19 -17
- package/dist/es/components/runtime/views/super-page-dialog.vue2.js +4 -0
- package/{lib → dist/es}/components/runtime/views/super-page.vue.d.ts +1 -1
- package/{lib → dist/es/components}/runtime/views/super-page.vue.js +129 -112
- package/dist/es/components/runtime/views/super-page.vue2.js +4 -0
- package/dist/es/index.d.ts +8 -0
- package/dist/es/index.js +15 -0
- package/package.json +70 -67
- package/src/index.ts +15 -0
- package/.eslintrc.cjs +0 -26
- package/.prettierrc.json +0 -8
- package/App.vue +0 -9
- package/components/index.ts +0 -17
- package/components/runtime/index.ts +0 -2
- package/components/runtime/utils/assemblys-config.js +0 -294
- package/components/runtime/views/assemblys/button/button/button-runtime.vue +0 -49
- package/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue +0 -26
- package/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue +0 -93
- package/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue +0 -59
- package/components/runtime/views/assemblys/chart/common/common-attr-assistant.vue +0 -32
- package/components/runtime/views/assemblys/chart/common/common-attr-base.vue +0 -60
- package/components/runtime/views/assemblys/chart/common/common-attr-drill.vue +0 -39
- package/components/runtime/views/assemblys/chart/common/common-attr-groupby.vue +0 -104
- package/components/runtime/views/assemblys/chart/common/common-attr-serieslist.vue +0 -145
- package/components/runtime/views/assemblys/chart/common/common-attr-sortby.vue +0 -119
- package/components/runtime/views/assemblys/chart/common/common-style-custom.vue +0 -28
- package/components/runtime/views/assemblys/chart/common/common-style-datazoom.vue +0 -45
- package/components/runtime/views/assemblys/chart/common/common-style-font-subtitle.vue +0 -78
- package/components/runtime/views/assemblys/chart/common/common-style-font-title.vue +0 -56
- package/components/runtime/views/assemblys/chart/common/common-style-grid.vue +0 -70
- package/components/runtime/views/assemblys/chart/common/common-style-legend.vue +0 -70
- package/components/runtime/views/assemblys/chart/common/common-style-tooltip.vue +0 -140
- package/components/runtime/views/assemblys/chart/common/common-style-xaxis.vue +0 -58
- package/components/runtime/views/assemblys/chart/common/common-style-yaxis.vue +0 -125
- package/components/runtime/views/assemblys/chart/common-series/common-attr-dataset.vue +0 -67
- package/components/runtime/views/assemblys/chart/common-series/common-attr-dynamic.vue +0 -57
- package/components/runtime/views/assemblys/chart/common-series/common-attr-testdatas.vue +0 -23
- package/components/runtime/views/assemblys/chart/common-series/common-style-label.vue +0 -209
- package/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue +0 -46
- package/components/runtime/views/assemblys/chart/pie/pie-runtime.vue +0 -56
- package/components/runtime/views/assemblys/chart/radar/radar-runtime.vue +0 -55
- package/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue +0 -57
- package/components/runtime/views/assemblys/common/common-attr-cursor.vue +0 -23
- package/components/runtime/views/assemblys/common/common-attr-size.vue +0 -54
- package/components/runtime/views/assemblys/common/common-select-table.vue +0 -287
- package/components/runtime/views/assemblys/common/common-style-background.vue +0 -46
- package/components/runtime/views/assemblys/common/common-style-border.vue +0 -37
- package/components/runtime/views/assemblys/common/common-style-custom.vue +0 -35
- package/components/runtime/views/assemblys/common/common-style-font-head.vue +0 -53
- package/components/runtime/views/assemblys/common/common-style-font.vue +0 -53
- package/components/runtime/views/assemblys/common/common-style-margin.vue +0 -34
- package/components/runtime/views/assemblys/common/common-style-padding.vue +0 -34
- package/components/runtime/views/assemblys/common/common-style-position.vue +0 -39
- package/components/runtime/views/assemblys/common/common-style-shadow.vue +0 -37
- package/components/runtime/views/assemblys/common/export-form-report-dialog.vue +0 -108
- package/components/runtime/views/assemblys/common/remove-signer-dialog.vue +0 -99
- package/components/runtime/views/assemblys/common/task-informition-dialog.vue +0 -69
- package/components/runtime/views/assemblys/common-attr-events.vue +0 -46
- package/components/runtime/views/assemblys/container/card/card-runtime.vue +0 -59
- package/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue +0 -59
- package/components/runtime/views/assemblys/container/container/container-runtime.vue +0 -41
- package/components/runtime/views/assemblys/container/flex/flex-runtime.vue +0 -35
- package/components/runtime/views/assemblys/container/form/form-runtime.vue +0 -37
- package/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue +0 -32
- package/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue +0 -54
- package/components/runtime/views/assemblys/container/tools/tools-runtime.vue +0 -99
- package/components/runtime/views/assemblys/data/bar-code/barcode-attr-base.vue +0 -117
- package/components/runtime/views/assemblys/data/bar-code/barcode-attr-event.vue +0 -14
- package/components/runtime/views/assemblys/data/bar-code/barcode-attr-style.vue +0 -25
- package/components/runtime/views/assemblys/data/bar-code/barcode-attr.vue +0 -28
- package/components/runtime/views/assemblys/data/bar-code/barcode-design.vue +0 -103
- package/components/runtime/views/assemblys/data/component/attr-header.vue +0 -69
- package/components/runtime/views/assemblys/data/component/attr-style.vue +0 -64
- package/components/runtime/views/assemblys/data/component/column-config.vue +0 -171
- package/components/runtime/views/assemblys/data/component/combinedHeader.vue +0 -96
- package/components/runtime/views/assemblys/data/component/composite-header.vue +0 -257
- package/components/runtime/views/assemblys/data/component/configuration-value.vue +0 -206
- package/components/runtime/views/assemblys/data/component/data-origin-tree.vue +0 -117
- package/components/runtime/views/assemblys/data/component/data-origin.vue +0 -260
- package/components/runtime/views/assemblys/data/component/formatting.vue +0 -200
- package/components/runtime/views/assemblys/data/component/in-parameter.vue +0 -56
- package/components/runtime/views/assemblys/data/component/querySetting.vue +0 -52
- package/components/runtime/views/assemblys/data/component/return-set-table.vue +0 -91
- package/components/runtime/views/assemblys/data/component/row-backgroud-color.vue +0 -58
- package/components/runtime/views/assemblys/data/component/select-data-table.vue +0 -86
- package/components/runtime/views/assemblys/data/table/main-table-runtime.vue +0 -858
- package/components/runtime/views/assemblys/data/table/sub-table-runtime.vue +0 -625
- package/components/runtime/views/assemblys/data/table/table-runtime.vue +0 -93
- package/components/runtime/views/assemblys/data/tree/tree-attr-base.vue +0 -137
- package/components/runtime/views/assemblys/data/tree/tree-attr-event.vue +0 -14
- package/components/runtime/views/assemblys/data/tree/tree-attr-style.vue +0 -55
- package/components/runtime/views/assemblys/data/tree/tree-attr.vue +0 -28
- package/components/runtime/views/assemblys/data/tree/tree-design.vue +0 -125
- package/components/runtime/views/assemblys/error-attr.vue +0 -15
- package/components/runtime/views/assemblys/error-render.vue +0 -17
- package/components/runtime/views/assemblys/form/cascader/cascader-design.vue +0 -288
- package/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue +0 -198
- package/components/runtime/views/assemblys/form/colors/colors-design.vue +0 -16
- package/components/runtime/views/assemblys/form/common/analytic-rule.vue +0 -148
- package/components/runtime/views/assemblys/form/common/attr-event.vue +0 -82
- package/components/runtime/views/assemblys/form/common/attr-header.vue +0 -54
- package/components/runtime/views/assemblys/form/common/attr-style.vue +0 -44
- package/components/runtime/views/assemblys/form/common/bar-code-rule.vue +0 -104
- package/components/runtime/views/assemblys/form/common/condition.vue +0 -147
- package/components/runtime/views/assemblys/form/common/data-origin.vue +0 -81
- package/components/runtime/views/assemblys/form/common/data-orign-in-parameter.vue +0 -64
- package/components/runtime/views/assemblys/form/common/dataorigin-input-table.vue +0 -106
- package/components/runtime/views/assemblys/form/common/default-value-setting.vue +0 -362
- package/components/runtime/views/assemblys/form/common/dimension-input.vue +0 -68
- package/components/runtime/views/assemblys/form/common/dynamic-data-source-setting.vue +0 -115
- package/components/runtime/views/assemblys/form/common/formatting-label.vue +0 -81
- package/components/runtime/views/assemblys/form/common/grid-num-select.vue +0 -43
- package/components/runtime/views/assemblys/form/common/icon-set-dialog.vue +0 -144
- package/components/runtime/views/assemblys/form/common/linkage.vue +0 -21
- package/components/runtime/views/assemblys/form/common/overall-height.vue +0 -20
- package/components/runtime/views/assemblys/form/common/overall-width.vue +0 -48
- package/components/runtime/views/assemblys/form/common/pre-suffix.vue +0 -33
- package/components/runtime/views/assemblys/form/common/rich-text.vue +0 -100
- package/components/runtime/views/assemblys/form/common/row-ul-li.vue +0 -55
- package/components/runtime/views/assemblys/form/common/setoption-table.vue +0 -86
- package/components/runtime/views/assemblys/form/common/size-input.vue +0 -65
- package/components/runtime/views/assemblys/form/common/suffixmodule.vue +0 -82
- package/components/runtime/views/assemblys/form/common/title.vue +0 -20
- package/components/runtime/views/assemblys/form/common/uploading.vue +0 -34
- package/components/runtime/views/assemblys/form/common/verification.vue +0 -79
- package/components/runtime/views/assemblys/form/common/voluntarily.vue +0 -27
- package/components/runtime/views/assemblys/form/custom/custom-attr-base.vue +0 -81
- package/components/runtime/views/assemblys/form/custom/custom-attr-event.vue +0 -14
- package/components/runtime/views/assemblys/form/custom/custom-attr-style.vue +0 -14
- package/components/runtime/views/assemblys/form/custom/custom-attr.vue +0 -28
- package/components/runtime/views/assemblys/form/custom/custom-design.vue +0 -57
- package/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue +0 -80
- package/components/runtime/views/assemblys/form/datetime/datetime-design.vue +0 -19
- package/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue +0 -60
- package/components/runtime/views/assemblys/form/divider/divider-runtime.vue +0 -44
- package/components/runtime/views/assemblys/form/file-picture/picture-design.vue +0 -80
- package/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue +0 -79
- package/components/runtime/views/assemblys/form/image-thumbnail/imagethumbnail-attr-base.vue +0 -142
- package/components/runtime/views/assemblys/form/image-thumbnail/imagethumbnail-attr-event.vue +0 -14
- package/components/runtime/views/assemblys/form/image-thumbnail/imagethumbnail-attr-style.vue +0 -14
- package/components/runtime/views/assemblys/form/image-thumbnail/imagethumbnail-attr.vue +0 -28
- package/components/runtime/views/assemblys/form/image-thumbnail/imagethumbnail-design.vue +0 -104
- package/components/runtime/views/assemblys/form/image-upload/imageupload-attr-base.vue +0 -75
- package/components/runtime/views/assemblys/form/image-upload/imageupload-attr-event.vue +0 -13
- package/components/runtime/views/assemblys/form/image-upload/imageupload-attr-style.vue +0 -14
- package/components/runtime/views/assemblys/form/image-upload/imageupload-attr.vue +0 -28
- package/components/runtime/views/assemblys/form/image-upload/imageupload-design.vue +0 -76
- package/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue +0 -62
- package/components/runtime/views/assemblys/form/input-show/input-show-attr-base.vue +0 -68
- package/components/runtime/views/assemblys/form/input-show/input-show-attr-event.vue +0 -14
- package/components/runtime/views/assemblys/form/input-show/input-show-attr-style.vue +0 -70
- package/components/runtime/views/assemblys/form/input-show/input-show-attr.vue +0 -28
- package/components/runtime/views/assemblys/form/input-show/input-show-design.vue +0 -155
- package/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue +0 -142
- package/components/runtime/views/assemblys/form/label/label-runtime.vue +0 -143
- package/components/runtime/views/assemblys/form/link/link-runtime.vue +0 -70
- package/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue +0 -24
- package/components/runtime/views/assemblys/form/radio/radio-runtime.vue +0 -203
- package/components/runtime/views/assemblys/form/rate/rate-design.vue +0 -16
- package/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue +0 -169
- package/components/runtime/views/assemblys/form/select/select-runtime.vue +0 -247
- package/components/runtime/views/assemblys/form/slider/slider-design.vue +0 -16
- package/components/runtime/views/assemblys/form/switch/switch-runtime.vue +0 -63
- package/components/runtime/views/assemblys/form/tag/tag-runtime.vue +0 -65
- package/components/runtime/views/assemblys/form/text/text-design.vue +0 -19
- package/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue +0 -63
- package/components/runtime/views/assemblys/form/transfer/transfer-design.vue +0 -32
- package/components/runtime/views/assemblys/object-render.vue +0 -176
- package/components/runtime/views/assemblys/page/page-attr-base-20240429-1.vue +0 -179
- package/components/runtime/views/assemblys/page/page-attr-base.vue +0 -259
- package/components/runtime/views/assemblys/page/page-attr-events.vue +0 -50
- package/components/runtime/views/assemblys/page/page-attr-style.vue +0 -25
- package/components/runtime/views/assemblys/page/page-attr.vue +0 -84
- package/components/runtime/views/assemblys/page/variable-dialog.vue +0 -242
- package/components/runtime/views/assemblys/workflow/component/combination.vue +0 -206
- package/components/runtime/views/assemblys/workflow/component/condition-dialog.vue +0 -99
- package/components/runtime/views/assemblys/workflow/component/event-dialog.vue +0 -278
- package/components/runtime/views/assemblys/workflow/component/journal-set-dialog.vue +0 -174
- package/components/runtime/views/assemblys/workflow/component/logical-setup-dialog.vue +0 -155
- package/components/runtime/views/assemblys/workflow/component/rule-dialog.vue +0 -47
- package/components/runtime/views/assemblys/workflow/component/set-dialog.vue +0 -130
- package/components/runtime/views/assemblys/workflow/component/task-trigger-dialog.vue +0 -96
- package/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-attr-base.vue +0 -43
- package/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-attr-event.vue +0 -14
- package/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-attr-style.vue +0 -27
- package/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-attr.vue +0 -28
- package/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-design.vue +0 -17
- package/components/runtime/views/assemblys/workflow/text-history/texthistory-attr-base.vue +0 -60
- package/components/runtime/views/assemblys/workflow/text-history/texthistory-attr-event.vue +0 -14
- package/components/runtime/views/assemblys/workflow/text-history/texthistory-attr-style.vue +0 -27
- package/components/runtime/views/assemblys/workflow/text-history/texthistory-attr.vue +0 -28
- package/components/runtime/views/assemblys/workflow/text-history/texthistory-design.vue +0 -17
- package/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue +0 -64
- package/components/runtime/views/render/page-view.vue +0 -80
- package/components/runtime/views/super-page copy.vue +0 -61
- package/components/runtime/views/super-page.vue +0 -667
- package/components/super-page-dialog/index.ts +0 -2
- package/components/super-page-dialog/super-page-dialog.vue +0 -267
- package/components/wf-editor/index.ts +0 -2
- package/components/wf-editor/wf-editor.vue +0 -15
- package/cypress/e2e/example.cy.ts +0 -8
- package/cypress/e2e/tsconfig.json +0 -10
- package/cypress/fixtures/example.json +0 -5
- package/cypress/support/commands.ts +0 -39
- package/cypress/support/e2e.ts +0 -20
- package/cypress.config.ts +0 -8
- package/env.d.ts +0 -1
- package/index.html +0 -13
- package/lib/_virtual/_plugin-vue_export-helper.js +0 -9
- package/lib/components/index.d.ts +0 -5
- package/lib/components/runtime/index.d.ts +0 -3
- package/lib/components/super-page-dialog/index.d.ts +0 -3
- package/lib/components/wf-editor/index.d.ts +0 -3
- package/lib/components/wf-editor/wf-editor.vue.d.ts +0 -2
- package/lib/index.js +0 -8
- package/lib/runtime/index.js +0 -3
- package/lib/runtime/utils/assemblys-config.js +0 -258
- package/lib/runtime/views/assemblys/button/button/button-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/button/button/button-runtime.vue2.js +0 -54
- package/lib/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +0 -35
- package/lib/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +0 -110
- package/lib/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +0 -53
- package/lib/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +0 -42
- package/lib/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +0 -50
- package/lib/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +0 -50
- package/lib/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +0 -51
- package/lib/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +0 -3
- package/lib/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +0 -3
- package/lib/runtime/views/assemblys/common/task-informition-dialog.vue2.js +0 -3
- package/lib/runtime/views/assemblys/container/card/card-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +0 -73
- package/lib/runtime/views/assemblys/container/container/container-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/container/container/container-runtime.vue2.js +0 -78
- package/lib/runtime/views/assemblys/container/flex/flex-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +0 -42
- package/lib/runtime/views/assemblys/container/form/form-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/container/form/form-runtime.vue2.js +0 -43
- package/lib/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +0 -68
- package/lib/runtime/views/assemblys/container/tools/tools-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +0 -3
- package/lib/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +0 -3
- package/lib/runtime/views/assemblys/data/table/table-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/error-render.vue.js +0 -22
- package/lib/runtime/views/assemblys/error-render.vue2.js +0 -3
- package/lib/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +0 -82
- package/lib/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +0 -59
- package/lib/runtime/views/assemblys/form/divider/divider-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +0 -40
- package/lib/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +0 -74
- package/lib/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +0 -63
- package/lib/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +0 -127
- package/lib/runtime/views/assemblys/form/label/label-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/form/label/label-runtime.vue2.js +0 -133
- package/lib/runtime/views/assemblys/form/link/link-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/form/link/link-runtime.vue2.js +0 -77
- package/lib/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +0 -29
- package/lib/runtime/views/assemblys/form/radio/radio-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/form/select/select-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/form/switch/switch-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +0 -63
- package/lib/runtime/views/assemblys/form/tag/tag-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +0 -63
- package/lib/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +0 -3
- package/lib/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +0 -65
- package/lib/runtime/views/assemblys/object-render.vue2.js +0 -3
- package/lib/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +0 -3
- package/lib/runtime/views/super-page.vue2.js +0 -3
- package/lib/src/utils/charts/chart-util.js +0 -15
- package/lib/super-page-dialog/index.js +0 -3
- package/lib/super-page-dialog/super-page-dialog.vue2.js +0 -3
- package/lib/wf-editor/index.js +0 -3
- package/lib/wf-editor/wf-editor.css +0 -4
- package/lib/wf-editor/wf-editor.vue.js +0 -15
- package/main.ts +0 -11
- package/package-ws.json +0 -70
- package/public/favicon.ico +0 -0
- package/src/assets/base.css +0 -86
- package/src/assets/chart-themes/theme1.ts +0 -6
- package/src/assets/chart-themes/theme2.ts +0 -6
- package/src/assets/chart-themes/theme3.ts +0 -6
- package/src/assets/images/button/button-group.png +0 -0
- package/src/assets/images/button/button.png +0 -0
- package/src/assets/images/chart/chart-column.png +0 -0
- package/src/assets/images/chart/chart-gauge.png +0 -0
- package/src/assets/images/chart/chart-pie.png +0 -0
- package/src/assets/images/chart/chart-radar.png +0 -0
- package/src/assets/images/chart/chart-scatter.png +0 -0
- package/src/assets/images/container/container-card.png +0 -0
- package/src/assets/images/container/container-collapse.png +0 -0
- package/src/assets/images/container/container-container.png +0 -0
- package/src/assets/images/container/container-flex.png +0 -0
- package/src/assets/images/container/container-form.png +0 -0
- package/src/assets/images/container/container-iframe.png +0 -0
- package/src/assets/images/container/container-normal.png +0 -0
- package/src/assets/images/container/container-tabs.png +0 -0
- package/src/assets/images/container/container-tools.png +0 -0
- package/src/assets/images/data/data-process.png +0 -0
- package/src/assets/images/data/data-step.png +0 -0
- package/src/assets/images/data/data-table-column.png +0 -0
- package/src/assets/images/data/data-table.png +0 -0
- package/src/assets/images/data/data-timeline.png +0 -0
- package/src/assets/images/data/data-tree.png +0 -0
- package/src/assets/images/form/form-cascader.png +0 -0
- package/src/assets/images/form/form-check.png +0 -0
- package/src/assets/images/form/form-color.png +0 -0
- package/src/assets/images/form/form-count.png +0 -0
- package/src/assets/images/form/form-custom.png +0 -0
- package/src/assets/images/form/form-date.png +0 -0
- package/src/assets/images/form/form-dept.png +0 -0
- package/src/assets/images/form/form-divider.png +0 -0
- package/src/assets/images/form/form-file.png +0 -0
- package/src/assets/images/form/form-image-upload.png +0 -0
- package/src/assets/images/form/form-img.png +0 -0
- package/src/assets/images/form/form-input.png +0 -0
- package/src/assets/images/form/form-label.png +0 -0
- package/src/assets/images/form/form-link.png +0 -0
- package/src/assets/images/form/form-radio.png +0 -0
- package/src/assets/images/form/form-scan.png +0 -0
- package/src/assets/images/form/form-score.png +0 -0
- package/src/assets/images/form/form-select.png +0 -0
- package/src/assets/images/form/form-slider.png +0 -0
- package/src/assets/images/form/form-space.png +0 -0
- package/src/assets/images/form/form-switch.png +0 -0
- package/src/assets/images/form/form-text.png +0 -0
- package/src/assets/images/form/form-textarea.png +0 -0
- package/src/assets/images/form/form-transfer.png +0 -0
- package/src/assets/images/form/form-zoom.png +0 -0
- package/src/assets/images/group-button.png +0 -0
- package/src/assets/images/group-chart.png +0 -0
- package/src/assets/images/group-container.png +0 -0
- package/src/assets/images/group-data.png +0 -0
- package/src/assets/images/group-form.png +0 -0
- package/src/assets/images/group-workflow.png +0 -0
- package/src/assets/images/workflow/workflow-button.png +0 -0
- package/src/assets/images/workflow/workflow-history-texts.png +0 -0
- package/src/assets/images/workflow/workflow-history.png +0 -0
- package/src/assets/images/workflow/workflow-imagehistory.png +0 -0
- package/src/assets/images/workflow/workflow-texthistory .png +0 -0
- package/src/assets/logo.svg +0 -1
- package/src/assets/main.css +0 -1
- package/src/i18n/langs/cn.js +0 -52
- package/src/i18n/langs/en.js +0 -52
- package/src/stores/counter.ts +0 -12
- package/src/utils/api/api-util.ts +0 -176
- package/src/utils/charts/chart-util.ts +0 -41
- package/src/utils/common-util.ts +0 -96
- package/src/utils/container-style-util.ts +0 -237
- package/src/utils/eventBus.ts +0 -14
- package/src/utils/events/event-util.ts +0 -790
- package/src/utils/events/jump-page-util.ts +0 -0
- package/src/utils/events/standard-event.ts +0 -2075
- package/src/utils/events/validator-util.ts +0 -474
- package/src/utils/global-refs.ts +0 -160
- package/src/utils/interfaces/page-design-types.ts +0 -259
- package/src/utils/page-helper-util.ts +0 -850
- package/src/utils/page-init-util.ts +0 -291
- package/src/utils/page-permission-util.ts +0 -521
- package/src/utils/store-util.ts +0 -41
- package/src/utils/store.ts +0 -3
- package/src/utils/table-utils.ts +0 -31
- package/tsconfig copy.json +0 -17
- package/tsconfig.app copy.json +0 -14
- package/tsconfig.app.json +0 -14
- package/tsconfig.json +0 -17
- package/tsconfig.node copy.json +0 -19
- package/tsconfig.node.json +0 -19
- package/tsconfig.vitest copy.json +0 -11
- package/tsconfig.vitest.json +0 -11
- package/vite.config copy.ts +0 -109
- package/vite.config.ts +0 -86
- package/vitest.config.ts +0 -14
- /package/{lib/src → dist/es/components/runtime}/utils/api/api-util.d.ts +0 -0
- /package/{lib/src → dist/es/components/runtime}/utils/events/standard-event.d.ts +0 -0
- /package/{lib/src → dist/es/components/runtime}/utils/events/validator-util.d.ts +0 -0
- /package/{lib/src → dist/es/components/runtime}/utils/global-refs.d.ts +0 -0
- /package/{lib/src → dist/es/components/runtime}/utils/page-init-util.d.ts +0 -0
- /package/{lib/src → dist/es/components/runtime}/utils/store-util.d.ts +0 -0
- /package/{lib/src → dist/es/components/runtime}/utils/store.d.ts +0 -0
- /package/{lib → dist/es}/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +0 -0
- /package/{lib → dist/es}/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +0 -0
- /package/{lib → dist/es}/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +0 -0
- /package/{lib → dist/es}/components/runtime/views/assemblys/error-render.vue.d.ts +0 -0
- /package/{lib/components/super-page-dialog → dist/es/components/runtime/views}/super-page-dialog.vue.d.ts +0 -0
- /package/{lib → dist/es}/favicon.ico +0 -0
|
@@ -1,790 +0,0 @@
|
|
|
1
|
-
import type { Component, PageContext, PageDesign } from '../../utils/interfaces/page-design-types'
|
|
2
|
-
import { isPromise } from 'agilebuilder-ui/src/utils/common-util'
|
|
3
|
-
import { standardEvents, dealAfterOperate, judgeDataNumber } from './standard-event'
|
|
4
|
-
import { validateDataModelFunc } from './validator-util'
|
|
5
|
-
import { getComponentRef } from '../../utils/global-refs'
|
|
6
|
-
import { ElMessage } from 'element-plus'
|
|
7
|
-
import { analysisCondition } from 'agilebuilder-ui/src/utils/util'
|
|
8
|
-
import { getListCode } from '../common-util'
|
|
9
|
-
// import eventBus from '../eventBus'
|
|
10
|
-
/**
|
|
11
|
-
* 缓存页面事件,并转为Function对象,并绑定自定义方法到window对象上
|
|
12
|
-
* @param pageDesign
|
|
13
|
-
*/
|
|
14
|
-
export function initPageEvents(pageDesign: PageDesign, pageContext: PageContext) {
|
|
15
|
-
if (pageDesign && pageDesign.customEvents) {
|
|
16
|
-
// 将页面事件和自定义方法转为Function,并缓存起来
|
|
17
|
-
pageContext.customEvents = transferToFunction(pageDesign.customEvents)
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* 页面销毁时,将window上注册的函数移除掉
|
|
23
|
-
* @param pageDesign
|
|
24
|
-
*/
|
|
25
|
-
export function removeCustomFuncFromWindow(pageDesign: PageDesign) {
|
|
26
|
-
if (pageDesign && pageDesign.customEvents) {
|
|
27
|
-
const customEvents = pageDesign.customEvents
|
|
28
|
-
const customFuncs = customEvents.filter((item) => item.name === 'customFunc' && item.jsContent)
|
|
29
|
-
if (customFuncs && customFuncs.length > 0) {
|
|
30
|
-
customFuncs.forEach((event) => {
|
|
31
|
-
// 页面销毁时,将window上注册的函数移除掉
|
|
32
|
-
delete window['$page_' + event.eventName]
|
|
33
|
-
})
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
// 调用事件的方法
|
|
38
|
-
export function handleEvent(
|
|
39
|
-
$event: any,
|
|
40
|
-
pageContext: PageContext,
|
|
41
|
-
configure: Component,
|
|
42
|
-
eventType: string,
|
|
43
|
-
otherParams?: object
|
|
44
|
-
) {
|
|
45
|
-
return handleEventUtil($event, pageContext, configure, eventType, true, otherParams)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// 获得事件的方法定义
|
|
49
|
-
export function getHandleEvent(
|
|
50
|
-
$event: any,
|
|
51
|
-
pageContext: PageContext,
|
|
52
|
-
configure: Component,
|
|
53
|
-
eventType: string,
|
|
54
|
-
otherParams?: object
|
|
55
|
-
) {
|
|
56
|
-
return handleEventUtil($event, pageContext, configure, eventType, false, otherParams)
|
|
57
|
-
}
|
|
58
|
-
// 调用事件的方法
|
|
59
|
-
function handleEventUtil(
|
|
60
|
-
$event: any,
|
|
61
|
-
pageContext: PageContext,
|
|
62
|
-
configure: Component,
|
|
63
|
-
eventType: string,
|
|
64
|
-
isExecute: boolean,
|
|
65
|
-
otherParams?: object
|
|
66
|
-
) {
|
|
67
|
-
const pageCode = pageContext.code
|
|
68
|
-
const pageVersion = pageContext.version
|
|
69
|
-
const events = configure.events
|
|
70
|
-
const componentType = configure.name
|
|
71
|
-
let eventFun
|
|
72
|
-
if (eventType && eventType === 'click' && componentType === 'button-detail') {
|
|
73
|
-
// 按钮点击事件时,需要解析点击前
|
|
74
|
-
// 需要根据tableUuuid获得ref,获得选中记录集合和id集合
|
|
75
|
-
const tableUuid = configure.props.base.tableUuid
|
|
76
|
-
? configure.props.base.tableUuid
|
|
77
|
-
: pageContext.tableUuids && pageContext.tableUuids.length > 0
|
|
78
|
-
? pageContext.tableUuids[0]
|
|
79
|
-
: null
|
|
80
|
-
if (tableUuid) {
|
|
81
|
-
const gridRef = getComponentRef(pageContext, tableUuid)
|
|
82
|
-
const selections = gridRef.getSelections()
|
|
83
|
-
const selectionIds = gridRef.getSelectionIds()
|
|
84
|
-
if (!otherParams) {
|
|
85
|
-
otherParams = {}
|
|
86
|
-
}
|
|
87
|
-
otherParams['tableUuid'] = tableUuid
|
|
88
|
-
otherParams['listCode'] = getListCode(pageCode, pageVersion, tableUuid)
|
|
89
|
-
// 是否是列表页面的按钮
|
|
90
|
-
const isListButton = isListPage(pageContext, configure)
|
|
91
|
-
if (isListButton) {
|
|
92
|
-
otherParams['selections'] = selections
|
|
93
|
-
// 参数名要固定,保存等操作需要获得该参数
|
|
94
|
-
otherParams['ids'] = selectionIds
|
|
95
|
-
}
|
|
96
|
-
const tableConfigure = gridRef.getTableConfigure()
|
|
97
|
-
otherParams['tableConfigure'] = tableConfigure
|
|
98
|
-
}
|
|
99
|
-
const eventParams = packageEventParams(pageContext, configure, $event, otherParams)
|
|
100
|
-
buttonClickEvent(pageContext, configure, eventParams)
|
|
101
|
-
} else {
|
|
102
|
-
// 其它事件
|
|
103
|
-
eventFun = getEventFuncByType(pageContext, events, eventType)
|
|
104
|
-
if (isExecute) {
|
|
105
|
-
// 表示需要执行该方法
|
|
106
|
-
const eventParams = packageEventParams(pageContext, configure, $event, otherParams)
|
|
107
|
-
return callItemEvent(pageContext, configure, eventFun, eventParams)
|
|
108
|
-
} else {
|
|
109
|
-
// 表示需要返回该方法定义,在组件内call执行
|
|
110
|
-
return eventFun
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* 获得事件的参数
|
|
116
|
-
* @param pageContext
|
|
117
|
-
* @param configureObj
|
|
118
|
-
* @param $event
|
|
119
|
-
* @param otherParams
|
|
120
|
-
* @returns
|
|
121
|
-
*/
|
|
122
|
-
function packageEventParams(
|
|
123
|
-
pageContext: PageContext,
|
|
124
|
-
configureObj: Component,
|
|
125
|
-
$event: any,
|
|
126
|
-
otherParams?: object
|
|
127
|
-
) {
|
|
128
|
-
const params = {}
|
|
129
|
-
if (otherParams) {
|
|
130
|
-
// 例如列表工具栏或操作列按钮执行时:mainDefaultValueColumns?: Array<any>, dynamicColumnInfo?: Array<any>,ids:Array<any>
|
|
131
|
-
for (const key in otherParams) {
|
|
132
|
-
params[key] = otherParams[key]
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
if ($event !== undefined && $event !== null) {
|
|
136
|
-
params['_value'] = $event
|
|
137
|
-
}
|
|
138
|
-
params['pageContext'] = pageContext
|
|
139
|
-
params['configureObj'] = configureObj // 组件配置信息,包含如:跳转页面配置、判重配置等
|
|
140
|
-
return params
|
|
141
|
-
}
|
|
142
|
-
function buttonClickEvent(pageContext: PageContext, configure: Component, eventParams: object) {
|
|
143
|
-
const judgeFlag = judgeDataNumber(configure, eventParams['ids'])
|
|
144
|
-
if (!judgeFlag) {
|
|
145
|
-
// 表示不符合执行条件(无限制、只选一条、可选多行),不能执行点击事件
|
|
146
|
-
return
|
|
147
|
-
}
|
|
148
|
-
canExecuteButton(eventParams).then((result) => {
|
|
149
|
-
if (result['canExecute'] === true) {
|
|
150
|
-
// 表示按钮可执行解析条件成功
|
|
151
|
-
const events = configure.events
|
|
152
|
-
const beforeValidateFormFunc = getEventFuncByType(pageContext, events, 'beforeValidateForm')
|
|
153
|
-
let beforeValidateFormResult
|
|
154
|
-
if (beforeValidateFormFunc) {
|
|
155
|
-
// 表示配置了验证表单前事件
|
|
156
|
-
beforeValidateFormResult = callItemEvent(
|
|
157
|
-
pageContext,
|
|
158
|
-
configure,
|
|
159
|
-
beforeValidateFormFunc,
|
|
160
|
-
eventParams
|
|
161
|
-
)
|
|
162
|
-
}
|
|
163
|
-
if (beforeValidateFormResult === undefined) {
|
|
164
|
-
beforeValidateFormResult = true
|
|
165
|
-
}
|
|
166
|
-
if (!beforeValidateFormResult) {
|
|
167
|
-
return
|
|
168
|
-
}
|
|
169
|
-
if (isPromise(beforeValidateFormResult)) {
|
|
170
|
-
// 表示表单前事件返回的是promise函数
|
|
171
|
-
beforeValidateFormResult.then((result) => {
|
|
172
|
-
if (result && result === true) {
|
|
173
|
-
// 表示表单前事件返回的是true,则继续执行点击相关事件
|
|
174
|
-
doValidateForm(pageContext, configure, eventParams)
|
|
175
|
-
}
|
|
176
|
-
})
|
|
177
|
-
} else {
|
|
178
|
-
// 表示表单前事件返回的是true,则继续执行点击相关事件
|
|
179
|
-
doValidateForm(pageContext, configure, eventParams)
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
})
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* 继续验证表单,并执行一系列点击相关事件
|
|
186
|
-
* @param pageContext
|
|
187
|
-
* @param configure
|
|
188
|
-
* @param $event
|
|
189
|
-
* @param otherParams
|
|
190
|
-
*/
|
|
191
|
-
function doValidateForm(pageContext: PageContext, configure: Component, eventParams: object) {
|
|
192
|
-
const events = configure.events
|
|
193
|
-
let isEnableRequired
|
|
194
|
-
// 获得点击事件
|
|
195
|
-
const clickEventFunObj = getClickEventFuncByType(pageContext, events, 'click')
|
|
196
|
-
if (clickEventFunObj) {
|
|
197
|
-
const isStandardEvent = clickEventFunObj.isStandard
|
|
198
|
-
const event = clickEventFunObj.event
|
|
199
|
-
const isNotNeedValidate = isNotNeedValidateRequired(isStandardEvent, event)
|
|
200
|
-
if (isNotNeedValidate) {
|
|
201
|
-
// 不需要走验证,则必填验证标识为false
|
|
202
|
-
isEnableRequired = false
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
validateDataModelFunc(pageContext, configure, isEnableRequired).then(() => {
|
|
206
|
-
const beforeClickResult = doBeforeClickEvent(pageContext, configure, eventParams)
|
|
207
|
-
if (!beforeClickResult) {
|
|
208
|
-
return
|
|
209
|
-
}
|
|
210
|
-
if (isPromise(beforeClickResult)) {
|
|
211
|
-
// 表示点击前事件返回的是promise函数
|
|
212
|
-
beforeClickResult.then((result) => {
|
|
213
|
-
if (result) {
|
|
214
|
-
doClickEvent(pageContext, configure, clickEventFunObj, eventParams)
|
|
215
|
-
}
|
|
216
|
-
})
|
|
217
|
-
} else {
|
|
218
|
-
// 表示点击前事件返回的是true,则继续执行点击事件
|
|
219
|
-
doClickEvent(pageContext, configure, clickEventFunObj, eventParams)
|
|
220
|
-
}
|
|
221
|
-
})
|
|
222
|
-
}
|
|
223
|
-
// 执行点进前事件
|
|
224
|
-
export function doBeforeClickEvent(
|
|
225
|
-
pageContext: PageContext,
|
|
226
|
-
configure: Component,
|
|
227
|
-
otherParams?: object
|
|
228
|
-
): any {
|
|
229
|
-
let result = true
|
|
230
|
-
const events = configure.events
|
|
231
|
-
const beforeClickFunc = getEventFuncByType(pageContext, events, 'beforeClick')
|
|
232
|
-
let beforeClickResult
|
|
233
|
-
if (beforeClickFunc) {
|
|
234
|
-
// 表示配置了点击前事件
|
|
235
|
-
beforeClickResult = callItemEvent(pageContext, configure, beforeClickFunc, null, otherParams)
|
|
236
|
-
}
|
|
237
|
-
if (beforeClickResult === undefined) {
|
|
238
|
-
result = true
|
|
239
|
-
}
|
|
240
|
-
return result
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* TODO: 跳转页面功能
|
|
244
|
-
* 跳转页面功能
|
|
245
|
-
* @param $event
|
|
246
|
-
* @param pageContext
|
|
247
|
-
* @param configure
|
|
248
|
-
*/
|
|
249
|
-
function doClickJumpPageEvent(pageContext: PageContext, configure: Component, eventParams: object) {
|
|
250
|
-
const myPageCode = pageContext.code
|
|
251
|
-
const eventPageInfo = myPageCode + '_'
|
|
252
|
-
window['$eventBus'].$emit(eventPageInfo + 'open-dialog', {
|
|
253
|
-
pageContext,
|
|
254
|
-
configureObj: configure,
|
|
255
|
-
eventParams
|
|
256
|
-
})
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* 是否是列表页面的按钮
|
|
260
|
-
* @param pageContext
|
|
261
|
-
* @param configure
|
|
262
|
-
* @returns
|
|
263
|
-
*/
|
|
264
|
-
function isListPage(pageContext: PageContext, configure: Component) {
|
|
265
|
-
return pageContext.pageType && pageContext.pageType === 'list' ? true : false
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* 按钮点击自定义事件
|
|
269
|
-
* @param $event
|
|
270
|
-
* @param pageContext
|
|
271
|
-
* @param configure
|
|
272
|
-
*/
|
|
273
|
-
function doClickCustomEvent(
|
|
274
|
-
pageContext: PageContext,
|
|
275
|
-
configure: Component,
|
|
276
|
-
clickEventFuncObj: object,
|
|
277
|
-
eventParams: object
|
|
278
|
-
) {
|
|
279
|
-
// 获得点击事件
|
|
280
|
-
const eventFunObj = clickEventFuncObj
|
|
281
|
-
if (eventFunObj) {
|
|
282
|
-
const eventFun = eventFunObj['func']
|
|
283
|
-
const isStandardEvent = eventFunObj['isStandard']
|
|
284
|
-
const event = eventFunObj['event']
|
|
285
|
-
const clickResult = callItemEvent(pageContext, configure, eventFun, eventParams)
|
|
286
|
-
// 是否是列表页面的按钮
|
|
287
|
-
const isListButton = isListPage(pageContext, configure)
|
|
288
|
-
if (isNotDoAfterClick(isStandardEvent, event)) {
|
|
289
|
-
// 导出报告、导出PDF、导入、加签等事件的点击后事件在其它位置处理的,不能在此处处理
|
|
290
|
-
return
|
|
291
|
-
}
|
|
292
|
-
if (isPromise(clickResult)) {
|
|
293
|
-
// 表示点击事件返回的是promise函数
|
|
294
|
-
clickResult.then((result) => {
|
|
295
|
-
if (result) {
|
|
296
|
-
doAfterClickFunc(
|
|
297
|
-
pageContext,
|
|
298
|
-
configure,
|
|
299
|
-
eventParams,
|
|
300
|
-
isStandardEvent,
|
|
301
|
-
result,
|
|
302
|
-
isListButton
|
|
303
|
-
)
|
|
304
|
-
}
|
|
305
|
-
})
|
|
306
|
-
} else {
|
|
307
|
-
// 表示点击事件返回的不是promise函数
|
|
308
|
-
doAfterClickFunc(
|
|
309
|
-
pageContext,
|
|
310
|
-
configure,
|
|
311
|
-
eventParams,
|
|
312
|
-
isStandardEvent,
|
|
313
|
-
clickResult,
|
|
314
|
-
isListButton
|
|
315
|
-
)
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* 是否需要处理点击后事件。导出报告、导出PDF、导入、加签等事件的点击后事件在其它位置处理的,不能在此处处理
|
|
321
|
-
* @param isStandardEvent
|
|
322
|
-
* @param clickEvent
|
|
323
|
-
* @returns 返回true表示不需要执行afterClick事件
|
|
324
|
-
*/
|
|
325
|
-
function isNotDoAfterClick(isStandardEvent, clickEvent) {
|
|
326
|
-
return (
|
|
327
|
-
isStandardEvent &&
|
|
328
|
-
(clickEvent.eventName === 'exportForm' ||
|
|
329
|
-
clickEvent.eventName === 'exportPDF' ||
|
|
330
|
-
clickEvent.eventName === 'import' ||
|
|
331
|
-
clickEvent.eventName === 'assign' ||
|
|
332
|
-
clickEvent.eventName === 'copyTask' ||
|
|
333
|
-
clickEvent.eventName === 'addSigner' ||
|
|
334
|
-
clickEvent.eventName === 'returnTaskTo' ||
|
|
335
|
-
clickEvent.eventName === 'removeSigner')
|
|
336
|
-
)
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* 是否需要必填验证。特殊的标准事件不需要必填验证。
|
|
341
|
-
* @param isStandardEvent
|
|
342
|
-
* @param clickEvent
|
|
343
|
-
* @returns 返回true表示不需要执行必填验证
|
|
344
|
-
*/
|
|
345
|
-
function isNotNeedValidateRequired(isStandardEvent, clickEvent) {
|
|
346
|
-
return (
|
|
347
|
-
isStandardEvent &&
|
|
348
|
-
(clickEvent.eventName === 'downloadTemplate' ||
|
|
349
|
-
clickEvent.eventName === 'back' ||
|
|
350
|
-
clickEvent.eventName === 'exportForm' ||
|
|
351
|
-
clickEvent.eventName === 'exportPDF' ||
|
|
352
|
-
clickEvent.eventName === 'lineEditCreate')
|
|
353
|
-
)
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
// 导出报告时执行后事件使用
|
|
357
|
-
export function doAfterClickEvent(
|
|
358
|
-
pageContext: PageContext,
|
|
359
|
-
configure: Component,
|
|
360
|
-
otherParams?: object
|
|
361
|
-
) {
|
|
362
|
-
const events = configure.events
|
|
363
|
-
// 获得点击后事件
|
|
364
|
-
const afterClickFunc = getEventFuncByType(pageContext, events, 'afterClick')
|
|
365
|
-
if (afterClickFunc) {
|
|
366
|
-
// 表示配置了点击后事件事件
|
|
367
|
-
callItemEvent(pageContext, configure, afterClickFunc, null, otherParams)
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
function doAfterClickFunc(
|
|
372
|
-
pageContext: PageContext,
|
|
373
|
-
configure: Component,
|
|
374
|
-
eventParams?: object,
|
|
375
|
-
isStandardEvent?: boolean,
|
|
376
|
-
result?: any,
|
|
377
|
-
isListButton?: boolean
|
|
378
|
-
) {
|
|
379
|
-
if (!isStandardEvent) {
|
|
380
|
-
// 如果不是标准事件,才需要这样处理,标准事件的在事件内部处理了
|
|
381
|
-
dealAfterOperate(
|
|
382
|
-
pageContext,
|
|
383
|
-
configure,
|
|
384
|
-
result,
|
|
385
|
-
'superPageRuntimeMessage.successfulOperation',
|
|
386
|
-
isListButton
|
|
387
|
-
)
|
|
388
|
-
} else {
|
|
389
|
-
pageContext.result = result
|
|
390
|
-
}
|
|
391
|
-
const events = configure.events
|
|
392
|
-
// 获得点击后事件
|
|
393
|
-
const afterClickFunc = getEventFuncByType(pageContext, events, 'afterClick')
|
|
394
|
-
if (afterClickFunc) {
|
|
395
|
-
// 表示配置了点击后事件事件
|
|
396
|
-
callItemEvent(pageContext, configure, afterClickFunc, eventParams)
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
function doClickEvent(
|
|
401
|
-
pageContext: PageContext,
|
|
402
|
-
configure: Component,
|
|
403
|
-
clickEventFunObj: object,
|
|
404
|
-
eventParams: object
|
|
405
|
-
) {
|
|
406
|
-
const linkPage = configure.props.linkPage
|
|
407
|
-
if (linkPage && linkPage.jumpPageUrl) {
|
|
408
|
-
// 表示是跳转页面
|
|
409
|
-
// TODO: 跳转页面功能
|
|
410
|
-
doClickJumpPageEvent(pageContext, configure, eventParams)
|
|
411
|
-
} else {
|
|
412
|
-
// 表示点击事件
|
|
413
|
-
doClickCustomEvent(pageContext, configure, clickEventFunObj, eventParams)
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* 根据事件名称获取事件
|
|
419
|
-
* @param pageCode
|
|
420
|
-
* @param pageVersion
|
|
421
|
-
* @param eventName
|
|
422
|
-
* @returns
|
|
423
|
-
*/
|
|
424
|
-
function getEventByEventName(pageContext: PageContext, eventName: string) {
|
|
425
|
-
const eventsObj = pageContext.customEvents
|
|
426
|
-
if (eventsObj && eventsObj[eventName]) {
|
|
427
|
-
return eventsObj[eventName]
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
* 获得事件Function对象
|
|
432
|
-
* @param events 该组件所有事件集合
|
|
433
|
-
* @param eventType change、click等事件类型
|
|
434
|
-
*/
|
|
435
|
-
export function getEventFuncByType(
|
|
436
|
-
pageContext: PageContext,
|
|
437
|
-
events: Array<any>,
|
|
438
|
-
eventType: string
|
|
439
|
-
) {
|
|
440
|
-
if (events && eventType) {
|
|
441
|
-
const eventArr = events.filter((item) => item.name === eventType && item.eventName)
|
|
442
|
-
if (eventArr && eventArr.length > 0) {
|
|
443
|
-
const event = eventArr[0]
|
|
444
|
-
if (event.isStandard) {
|
|
445
|
-
// 标准事件
|
|
446
|
-
return standardEvents[event.eventName]
|
|
447
|
-
} else {
|
|
448
|
-
// 自定义事件
|
|
449
|
-
return getEventByEventName(pageContext, event.eventName)
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
/**
|
|
456
|
-
* 获得事件Function对象
|
|
457
|
-
* @param events 该组件所有事件集合
|
|
458
|
-
* @param eventType change、click等事件类型
|
|
459
|
-
*/
|
|
460
|
-
export function getClickEventFuncByType(
|
|
461
|
-
pageContext: PageContext,
|
|
462
|
-
events: Array<any>,
|
|
463
|
-
eventType: string
|
|
464
|
-
) {
|
|
465
|
-
if (events && eventType) {
|
|
466
|
-
const eventArr = events.filter((item) => item.name === eventType && item.eventName)
|
|
467
|
-
if (eventArr && eventArr.length > 0) {
|
|
468
|
-
const event = eventArr[0]
|
|
469
|
-
if (event.isStandard) {
|
|
470
|
-
// 标准事件
|
|
471
|
-
return { func: standardEvents[event.eventName], isStandard: true, event: event }
|
|
472
|
-
} else {
|
|
473
|
-
// 自定义事件
|
|
474
|
-
return {
|
|
475
|
-
func: getEventByEventName(pageContext, event.eventName),
|
|
476
|
-
isStandard: false,
|
|
477
|
-
event: event
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
// 调用事件
|
|
485
|
-
function callItemEvent(
|
|
486
|
-
pageContext,
|
|
487
|
-
configureObj,
|
|
488
|
-
eventFun,
|
|
489
|
-
eventParams: object,
|
|
490
|
-
otherParams?: object
|
|
491
|
-
) {
|
|
492
|
-
if (!eventFun) {
|
|
493
|
-
return
|
|
494
|
-
}
|
|
495
|
-
if (!eventParams) {
|
|
496
|
-
eventParams = {
|
|
497
|
-
pageContext: pageContext,
|
|
498
|
-
configureObj: configureObj // 组件配置信息,包含如:跳转页面配置、判重配置等
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
if (otherParams && eventParams) {
|
|
502
|
-
// 例如列表工具栏或操作列按钮执行时:mainDefaultValueColumns?: Array<any>, dynamicColumnInfo?: Array<any>,ids:Array<any>
|
|
503
|
-
for (const key in otherParams) {
|
|
504
|
-
eventParams[key] = otherParams[key]
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
return eventFun(eventParams)
|
|
508
|
-
}
|
|
509
|
-
// 将事件定义为Function
|
|
510
|
-
function transferToFunction(customEvents: Array<any>) {
|
|
511
|
-
const eventsObj = {}
|
|
512
|
-
customEvents.forEach((event) => {
|
|
513
|
-
if (event.jsContent) {
|
|
514
|
-
// eslint-disable-next-line no-new-func
|
|
515
|
-
eventsObj[event.eventName] = new Function('params', event.jsContent)
|
|
516
|
-
if (event.name === 'customFunc') {
|
|
517
|
-
// 表示是自定义方法,需要注册到window对象上
|
|
518
|
-
if (event.funcParam) {
|
|
519
|
-
// eslint-disable-next-line no-new-func
|
|
520
|
-
window['$page_' + event.eventName] = new Function(event.funcParam, event.jsContent)
|
|
521
|
-
} else {
|
|
522
|
-
// eslint-disable-next-line no-new-func
|
|
523
|
-
window['$page_' + event.eventName] = new Function(event.jsContent)
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
})
|
|
528
|
-
return eventsObj
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
/**
|
|
532
|
-
* 按钮是否可执行条件解析
|
|
533
|
-
* @param params
|
|
534
|
-
* @returns
|
|
535
|
-
*/
|
|
536
|
-
export function canExecuteButton(params) {
|
|
537
|
-
const pageContext = params.pageContext
|
|
538
|
-
const configureObj = params.configureObj
|
|
539
|
-
const isListButton = isListPage(pageContext, configureObj)
|
|
540
|
-
let entities = []
|
|
541
|
-
if (isListButton) {
|
|
542
|
-
// 列表页面时
|
|
543
|
-
if (pageContext.editData) {
|
|
544
|
-
// 行编辑操作列的按钮
|
|
545
|
-
entities.push(pageContext.editData)
|
|
546
|
-
} else {
|
|
547
|
-
// 不是操作列的按钮
|
|
548
|
-
entities = params.selections
|
|
549
|
-
}
|
|
550
|
-
} else {
|
|
551
|
-
const dataModel = pageContext.entity.data
|
|
552
|
-
entities.push(dataModel)
|
|
553
|
-
}
|
|
554
|
-
const executableDataSetting = configureObj.props.base.condition
|
|
555
|
-
return new Promise((resolve, reject) => {
|
|
556
|
-
if (
|
|
557
|
-
executableDataSetting === undefined ||
|
|
558
|
-
executableDataSetting === '' ||
|
|
559
|
-
entities === undefined ||
|
|
560
|
-
entities.length === 0
|
|
561
|
-
) {
|
|
562
|
-
// 表示没有设置“可执行条件” 且 没有“自动填写字段”设置 或 没有选择记录
|
|
563
|
-
resolve({
|
|
564
|
-
canExecute: true
|
|
565
|
-
})
|
|
566
|
-
} else {
|
|
567
|
-
const contextParameter = pageContext.entity.context
|
|
568
|
-
const additionalParamMap = pageContext.entity.request
|
|
569
|
-
const isSql = true
|
|
570
|
-
const tableName = pageContext.tableName
|
|
571
|
-
let isCanExecute = true
|
|
572
|
-
let failMessage
|
|
573
|
-
let failEntity
|
|
574
|
-
for (let i = 0; i < entities.length; i++) {
|
|
575
|
-
const entity = entities[i]
|
|
576
|
-
for (let n = 0; n < executableDataSetting.length; n++) {
|
|
577
|
-
const conditionSetting = executableDataSetting[n]
|
|
578
|
-
// 当失败时的提示信息
|
|
579
|
-
const message = conditionSetting.toolTips
|
|
580
|
-
const conditionList = conditionSetting.conditionList
|
|
581
|
-
const canExecute = analysisCondition(
|
|
582
|
-
conditionList,
|
|
583
|
-
entity,
|
|
584
|
-
additionalParamMap,
|
|
585
|
-
contextParameter,
|
|
586
|
-
isSql,
|
|
587
|
-
tableName,
|
|
588
|
-
null
|
|
589
|
-
)
|
|
590
|
-
if (!canExecute) {
|
|
591
|
-
// 表示不可执行,把解析结果返回回去
|
|
592
|
-
// result.put("canExecute",false);
|
|
593
|
-
// result.put("message",message);
|
|
594
|
-
// result.put("failEntity",entity);
|
|
595
|
-
isCanExecute = false
|
|
596
|
-
failMessage = message
|
|
597
|
-
failEntity = entity
|
|
598
|
-
break
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
if (!isCanExecute) {
|
|
603
|
-
if (failMessage) {
|
|
604
|
-
ElMessage({
|
|
605
|
-
showClose: true,
|
|
606
|
-
type: 'warning',
|
|
607
|
-
message: failMessage
|
|
608
|
-
})
|
|
609
|
-
}
|
|
610
|
-
resolve({
|
|
611
|
-
canExecute: false,
|
|
612
|
-
message: failMessage,
|
|
613
|
-
failEntity: failEntity
|
|
614
|
-
})
|
|
615
|
-
} else {
|
|
616
|
-
resolve({
|
|
617
|
-
canExecute: true
|
|
618
|
-
})
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
})
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
// 解析组件是否显示,例如:按钮是否显示
|
|
625
|
-
export function canVisibleComponent(params) {
|
|
626
|
-
return new Promise((resolve, reject) => {
|
|
627
|
-
const isSqlQuery = true
|
|
628
|
-
const pageContext = params.pageContext
|
|
629
|
-
const dataModel = pageContext.entity.data
|
|
630
|
-
const tableName = pageContext.tableName
|
|
631
|
-
const additionalParamMap = pageContext.entity.request
|
|
632
|
-
const configureObj = params.configureObj
|
|
633
|
-
const displayConditions = configureObj.props.base.showCondition
|
|
634
|
-
if (displayConditions && displayConditions.length > 0) {
|
|
635
|
-
// 表单页面才需要解析按钮显示条件
|
|
636
|
-
const contextParameter = pageContext.entity.context
|
|
637
|
-
// 返回值是true或false
|
|
638
|
-
const result = analysisCondition(
|
|
639
|
-
displayConditions,
|
|
640
|
-
dataModel,
|
|
641
|
-
additionalParamMap,
|
|
642
|
-
contextParameter,
|
|
643
|
-
isSqlQuery,
|
|
644
|
-
tableName,
|
|
645
|
-
null
|
|
646
|
-
)
|
|
647
|
-
resolve(result)
|
|
648
|
-
} else {
|
|
649
|
-
resolve(true)
|
|
650
|
-
}
|
|
651
|
-
})
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
// 设置表格事件
|
|
655
|
-
export function setTableEvents(options, tableEvents, pageContext, configureObj) {
|
|
656
|
-
if (tableEvents) {
|
|
657
|
-
addTableEvent('loadBeforeSend', loadBeforeSend({ pageContext, configureObj }), options)
|
|
658
|
-
addTableEvent('beforeRequest', beforeRequest({ pageContext, configureObj }), options)
|
|
659
|
-
addTableEvent('gridDataLoaded', gridDataLoaded({ pageContext, configureObj }), options)
|
|
660
|
-
addTableEvent('gridComplete', gridComplete({ pageContext, configureObj }), options)
|
|
661
|
-
addTableEvent('resizeHeight', resizeTableHeight({ pageContext, configureObj }), options)
|
|
662
|
-
|
|
663
|
-
if (!options['lineEditOptions']) {
|
|
664
|
-
options['lineEditOptions'] = {}
|
|
665
|
-
}
|
|
666
|
-
addTableEvent(
|
|
667
|
-
'beforeInsertRow',
|
|
668
|
-
gridBeforeInsertRow({ pageContext, configureObj }),
|
|
669
|
-
options['lineEditOptions']
|
|
670
|
-
)
|
|
671
|
-
addTableEvent(
|
|
672
|
-
'afterInsertRow',
|
|
673
|
-
gridAfterInsertRow({ pageContext, configureObj }),
|
|
674
|
-
options['lineEditOptions']
|
|
675
|
-
)
|
|
676
|
-
addTableEvent(
|
|
677
|
-
'beforeDelete',
|
|
678
|
-
gridBeforeRemoveRow({ pageContext, configureObj }),
|
|
679
|
-
options['lineEditOptions']
|
|
680
|
-
)
|
|
681
|
-
addTableEvent(
|
|
682
|
-
'afterDelete',
|
|
683
|
-
gridAfterRemoveRow({ pageContext, configureObj }),
|
|
684
|
-
options['lineEditOptions']
|
|
685
|
-
)
|
|
686
|
-
addTableEvent(
|
|
687
|
-
'beforeEdit',
|
|
688
|
-
gridBeforeEdit({ pageContext, configureObj }),
|
|
689
|
-
options['lineEditOptions']
|
|
690
|
-
)
|
|
691
|
-
addTableEvent(
|
|
692
|
-
'beforeRestore',
|
|
693
|
-
beforeRestore({ pageContext, configureObj }),
|
|
694
|
-
options['lineEditOptions']
|
|
695
|
-
)
|
|
696
|
-
addTableEvent(
|
|
697
|
-
'beforeRestoreValidate',
|
|
698
|
-
beforeRestoreValidate({ pageContext, configureObj }),
|
|
699
|
-
options['lineEditOptions']
|
|
700
|
-
)
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
function addTableEvent(gridEventType, eventFunc, options) {
|
|
705
|
-
if (eventFunc) {
|
|
706
|
-
options[gridEventType] = eventFunc
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
function loadBeforeSend(params) {
|
|
711
|
-
return getHandleEvent(null, params.pageContext, params.configureObj, 'beforeListLoad', params)
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
function beforeRequest(params) {
|
|
715
|
-
return getHandleEvent(null, params.pageContext, params.configureObj, 'beforeRequest', params)
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
function gridDataLoaded(params) {
|
|
719
|
-
return getHandleEvent(null, params.pageContext, params.configureObj, 'onListLoad', params)
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
function gridComplete(params) {
|
|
723
|
-
return getHandleEvent(null, params.pageContext, params.configureObj, 'afterListLoad', params)
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
function resizeTableHeight(params) {
|
|
727
|
-
return getHandleEvent(null, params.pageContext, params.configureObj, 'resizeTableHeight', params)
|
|
728
|
-
}
|
|
729
|
-
function beforeRestoreValidate(params) {
|
|
730
|
-
return getHandleEvent(
|
|
731
|
-
null,
|
|
732
|
-
params.pageContext,
|
|
733
|
-
params.configureObj,
|
|
734
|
-
'beforeRestoreValidate',
|
|
735
|
-
params
|
|
736
|
-
)
|
|
737
|
-
}
|
|
738
|
-
function beforeRestore(params) {
|
|
739
|
-
return getHandleEvent(null, params.pageContext, params.configureObj, 'beforeRestore', params)
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
function gridBeforeEdit(params) {
|
|
743
|
-
return getHandleEvent(null, params.pageContext, params.configureObj, 'beforeEdit', params)
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
function gridBeforeInsertRow(params) {
|
|
747
|
-
return getHandleEvent(null, params.pageContext, params.configureObj, 'beforeAddRow', params)
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
function gridAfterInsertRow(params) {
|
|
751
|
-
return getHandleEvent(null, params.pageContext, params.configureObj, 'afterAddRow', params)
|
|
752
|
-
}
|
|
753
|
-
function gridBeforeRemoveRow(params) {
|
|
754
|
-
return getHandleEvent(null, params.pageContext, params.configureObj, 'beforeRemoveRow', params)
|
|
755
|
-
}
|
|
756
|
-
function gridAfterRemoveRow(params) {
|
|
757
|
-
return getHandleEvent(null, params.pageContext, params.configureObj, 'afterRemoveRow', params)
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
export function gridSelectRecord(pageContext, configureObj, params) {
|
|
761
|
-
return handleEvent(null, pageContext, configureObj, 'select', params)
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
export function gridSelectAllRecords(pageContext, configureObj, params) {
|
|
765
|
-
return handleEvent(null, pageContext, configureObj, 'select-all', params)
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
export function gridSelectionChange(pageContext, configureObj, params) {
|
|
769
|
-
return handleEvent(null, pageContext, configureObj, 'selection-change', params)
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
export function cellClick(pageContext, configureObj, params) {
|
|
773
|
-
return handleEvent(null, pageContext, configureObj, 'cell-click', params)
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
export function cellDblClick(pageContext, configureObj, params) {
|
|
777
|
-
return handleEvent(null, pageContext, configureObj, 'cell-dblclick', params)
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
export function rowClick(pageContext, configureObj, params) {
|
|
781
|
-
return handleEvent(null, pageContext, configureObj, 'row-click', params)
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
export function rowDblClick(pageContext, configureObj, params) {
|
|
785
|
-
return handleEvent(null, pageContext, configureObj, 'row-dblclick', params)
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
export function headerClick(pageContext, configureObj, params) {
|
|
789
|
-
return handleEvent(null, pageContext, configureObj, 'header-click', params)
|
|
790
|
-
}
|