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