agilebuilder-ui 1.1.65-tmp30 → 1.1.65-tmp32
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/es/chat-embed/src/index.vue.mjs +1 -1
- package/es/chat-embed/src/index.vue2.mjs +104 -100
- package/es/chat-embed/src/voice/js/crypto-js.mjs +46 -50
- package/es/chat-embed/src/voice/voice.vue.mjs +8 -11
- package/es/date-picker-range/index.vue.mjs +1 -1
- package/es/date-picker-range/index.vue2.mjs +41 -33
- package/es/department-tree-inline/src/department-tree-service.mjs +0 -1
- package/es/department-user-tree-inline/src/department-user-multiple-tree-inline.vue.mjs +14 -11
- package/es/department-user-tree-inline/src/department-user-single-tree-inline.vue.mjs +6 -6
- package/es/department-user-tree-inline/src/department-user-tree-multi-service.mjs +19 -20
- package/es/department-user-tree-inline/src/department-user-tree-single-service.mjs +0 -1
- package/es/department-user-tree-inline/src/search-result.vue.mjs +4 -4
- package/es/department-user-tree-mobile/src/department-user-tree-inline-app.vue.mjs +2 -2
- package/es/dynamic-source-select/src/dynamic-source-select.vue.mjs +86 -85
- package/es/fs-preview/src/fs-preview.vue.mjs +73 -59
- package/es/fs-upload/src/fs-upload-multi.vue.mjs +3 -3
- package/es/fs-upload-list/src/fs-upload-list.vue.mjs +5 -6
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-app.vue.mjs +15 -17
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue.mjs +19 -19
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-component.vue2.mjs +2 -2
- package/es/fs-upload-new/src/fs-preview-new.vue.mjs +1 -1
- package/es/fs-upload-new/src/fs-preview-new.vue2.mjs +50 -50
- package/es/i18n-setting/index.mjs +7 -0
- package/es/i18n-setting/src/i18n-setting-dialog.vue.mjs +23 -0
- package/es/i18n-setting/src/i18n-setting.mjs +14 -0
- package/es/i18n-setting/src/index.vue.mjs +47 -0
- package/es/index.mjs +46 -41
- package/es/multipart-upload/src/multipart-upload-form.vue.mjs +5 -5
- package/es/multipart-upload/src/multipart-upload-list.vue.mjs +6 -6
- package/es/organization-input/src/organization-input.vue.mjs +58 -58
- package/es/remove-department/src/remove-dept-service.mjs +4 -5
- package/es/remove-user/src/remove-user-service.mjs +0 -1
- package/es/remove-workgroup/src/remove-workgroup-service.mjs +0 -1
- package/es/rich-editor/index.vue.mjs +43 -84
- package/es/scan-code-input/src/scan-code-input.vue.mjs +1 -1
- package/es/scan-code-input-browser/src/scan-code-input.vue.mjs +20 -9
- package/es/src/api/sso-service.mjs +0 -1
- package/es/src/i18n/langs/cn.mjs +1 -1
- package/es/src/i18n/langs/en.mjs +1 -1
- package/es/src/permission.mjs +7 -10
- package/es/src/router/index.mjs +0 -1
- package/es/src/store/index.mjs +0 -1
- package/es/src/store/modules/app.mjs +0 -1
- package/es/src/utils/common-util.mjs +143 -143
- package/es/src/utils/i18n-util.mjs +32 -30
- package/es/src/utils/iconUtils.mjs +0 -1
- package/es/src/utils/jump-page-utils.mjs +1 -1
- package/es/src/utils/permission.mjs +25 -26
- package/es/src/utils/permissionAuth.mjs +0 -1
- package/es/src/utils/restful-interface-utils.mjs +5 -6
- package/es/src/utils/watermark.mjs +2 -7
- package/es/src/utils/workflow-util.mjs +6 -6
- package/es/src/views/dsc-component/Sidebar/Item.vue.mjs +1 -1
- package/es/src/views/dsc-component/Sidebar/Item.vue2.mjs +1 -1
- package/es/src/views/layout/components/Menubar/Item.vue.mjs +1 -1
- package/es/src/views/layout/components/Menubar/Item.vue2.mjs +8 -8
- package/es/src/views/layout/components/Menubar/SidebarItem.vue.mjs +11 -11
- package/es/style.css +1 -3103
- package/es/super-grid/src/apis.mjs +155 -151
- package/es/super-grid/src/components/mobile-table-card.mjs +14 -10
- package/es/super-grid/src/components/select-input.vue.mjs +66 -66
- package/es/super-grid/src/custom-formatter.mjs +5 -6
- package/es/super-grid/src/dynamic-input.vue.mjs +31 -39
- package/es/super-grid/src/formValidatorUtil.mjs +0 -1
- package/es/super-grid/src/normal-column-content.vue.mjs +1 -2
- package/es/super-grid/src/normal-column.vue.mjs +12 -10
- package/es/super-grid/src/row-operation.vue.mjs +3 -3
- package/es/super-grid/src/search-form-item.vue.mjs +18 -14
- package/es/super-grid/src/search-form-number.vue.mjs +7 -6
- package/es/super-grid/src/search-form-open.vue.mjs +3 -2
- package/es/super-grid/src/search-form-open.vue2.mjs +4 -0
- package/es/super-grid/src/search-form-ordinarySearch.vue.mjs +1 -1
- package/es/super-grid/src/super-grid.vue.mjs +254 -242
- package/es/super-grid/src/utils.mjs +6 -6
- package/es/super-grid/src/view-image-dialog.vue.mjs +5 -5
- package/es/super-nine-grid/src/super-nine-grid.vue.mjs +89 -83
- package/es/utils/utils.mjs +0 -1
- package/es/utils/value-set.mjs +0 -1
- package/es/workflow-history-list/src/workflow-history-list.vue.mjs +11 -10
- package/es/workgroup-tree-inline/src/workgroup-tree-service.mjs +0 -1
- package/es/workgroup-user-tree-inline/src/workgroup-tree-inline-service.mjs +0 -1
- package/es/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue.mjs +2 -2
- package/package.json +6 -2
- package/src/styles/index.scss +4 -0
- package/src/styles/theme/dark-blue/select.scss +27 -1
- package/src/styles/theme/forest-green/select.scss +27 -1
- package/src/styles/theme/green/select.scss +27 -1
- package/src/styles/theme/ocean-blue/select.scss +27 -1
- package/src/styles/theme/tiffany-blue-mobile/select.scss +29 -2
- package/.eslintrc.cjs +0 -28
- package/.prettierrc.json +0 -12
- package/dist/favicon.svg +0 -29
- package/dist/index.full.min.js +0 -16659
- package/dist/style.css +0 -3104
- package/index.html +0 -19
- package/lib/IntervalSelection/index.cjs +0 -5
- package/lib/IntervalSelection/src/sectionDate.vue.cjs +0 -45
- package/lib/IntervalSelection/src/sectionDate.vue2.cjs +0 -2
- package/lib/_virtual/__vite-browser-external.cjs +0 -2
- package/lib/_virtual/_plugin-vue_export-helper.cjs +0 -7
- package/lib/breadcrumb/index.cjs +0 -5
- package/lib/breadcrumb/src/breadcrumb.vue.cjs +0 -37
- package/lib/breadcrumb/src/breadcrumb.vue2.cjs +0 -2
- package/lib/chat-embed/index.cjs +0 -5
- package/lib/chat-embed/src/chat-addition-data.vue.cjs +0 -5
- package/lib/chat-embed/src/chat-addition-data.vue2.cjs +0 -15
- package/lib/chat-embed/src/chat-addition-data.vue3.cjs +0 -2
- package/lib/chat-embed/src/chat-ai-answer-tip.vue.cjs +0 -5
- package/lib/chat-embed/src/chat-ai-answer-tip.vue2.cjs +0 -26
- package/lib/chat-embed/src/chat-ai-answer-tip.vue3.cjs +0 -2
- package/lib/chat-embed/src/chat-bubble-footer.vue.cjs +0 -5
- package/lib/chat-embed/src/chat-bubble-footer.vue2.cjs +0 -28
- package/lib/chat-embed/src/chat-bubble-footer.vue3.cjs +0 -2
- package/lib/chat-embed/src/chat-embed-message.cjs +0 -16
- package/lib/chat-embed/src/chat-sender.vue.cjs +0 -5
- package/lib/chat-embed/src/chat-sender.vue2.cjs +0 -145
- package/lib/chat-embed/src/chat-sender.vue3.cjs +0 -2
- package/lib/chat-embed/src/components/answer-auto-chart.vue.cjs +0 -5
- package/lib/chat-embed/src/components/answer-auto-chart.vue2.cjs +0 -50
- package/lib/chat-embed/src/components/answer-auto-chart.vue3.cjs +0 -2
- package/lib/chat-embed/src/components/answer-home-chart.vue.cjs +0 -5
- package/lib/chat-embed/src/components/answer-home-chart.vue2.cjs +0 -3
- package/lib/chat-embed/src/components/answer-home-chart.vue3.cjs +0 -2
- package/lib/chat-embed/src/components/answer-interaction-data.vue.cjs +0 -5
- package/lib/chat-embed/src/components/answer-interaction-data.vue2.cjs +0 -107
- package/lib/chat-embed/src/components/answer-interaction-data.vue3.cjs +0 -2
- package/lib/chat-embed/src/components/history-detail.vue.cjs +0 -5
- package/lib/chat-embed/src/components/history-detail.vue2.cjs +0 -50
- package/lib/chat-embed/src/components/history-detail.vue3.cjs +0 -2
- package/lib/chat-embed/src/header.vue.cjs +0 -5
- package/lib/chat-embed/src/header.vue2.cjs +0 -39
- package/lib/chat-embed/src/header.vue3.cjs +0 -2
- package/lib/chat-embed/src/index.vue.cjs +0 -5
- package/lib/chat-embed/src/index.vue2.cjs +0 -281
- package/lib/chat-embed/src/index.vue3.cjs +0 -2
- package/lib/chat-embed/src/recommendation-message.vue.cjs +0 -5
- package/lib/chat-embed/src/recommendation-message.vue2.cjs +0 -8
- package/lib/chat-embed/src/recommendation-message.vue3.cjs +0 -2
- package/lib/chat-embed/src/sidebar-item.vue.cjs +0 -5
- package/lib/chat-embed/src/sidebar-item.vue2.cjs +0 -109
- package/lib/chat-embed/src/sidebar-item.vue3.cjs +0 -2
- package/lib/chat-embed/src/type.cjs +0 -3
- package/lib/chat-embed/src/util/chat-embed-util.cjs +0 -51
- package/lib/chat-embed/src/util/history-message-util.cjs +0 -74
- package/lib/chat-embed/src/util/mcp-utils.cjs +0 -50
- package/lib/chat-embed/src/util/text-file-util.cjs +0 -8
- package/lib/chat-embed/src/voice/index.cjs +0 -5
- package/lib/chat-embed/src/voice/js/crypto-js.cjs +0 -1005
- package/lib/chat-embed/src/voice/js/processor/index.umd.cjs +0 -170
- package/lib/chat-embed/src/voice/js/timer.cjs +0 -8
- package/lib/chat-embed/src/voice/voice.vue.cjs +0 -96
- package/lib/date-picker-range/index.cjs +0 -5
- package/lib/date-picker-range/index.vue.cjs +0 -5
- package/lib/date-picker-range/index.vue2.cjs +0 -89
- package/lib/date-picker-range/index.vue3.cjs +0 -2
- package/lib/department-tree/index.cjs +0 -5
- package/lib/department-tree/src/department-tree.vue.cjs +0 -17
- package/lib/department-tree-inline/index.cjs +0 -5
- package/lib/department-tree-inline/src/department-multi-tree-inline.vue.cjs +0 -81
- package/lib/department-tree-inline/src/department-multi-tree-inline.vue2.cjs +0 -2
- package/lib/department-tree-inline/src/department-single-tree-inline.vue.cjs +0 -54
- package/lib/department-tree-inline/src/department-single-tree-inline.vue2.cjs +0 -2
- package/lib/department-tree-inline/src/department-tree-inline.vue.cjs +0 -12
- package/lib/department-tree-inline/src/department-tree-service.cjs +0 -106
- package/lib/department-tree-inline/src/search-result.vue.cjs +0 -36
- package/lib/department-tree-inline/src/search-result.vue2.cjs +0 -2
- package/lib/department-tree-mobile/index.cjs +0 -5
- package/lib/department-tree-mobile/src/department-tree-app.vue.cjs +0 -13
- package/lib/department-tree-mobile/src/department-tree-app.vue2.cjs +0 -2
- package/lib/department-tree-mobile/src/department-tree-app.vue3.cjs +0 -3
- package/lib/department-tree-mobile/src/department-tree-inline-app.vue.cjs +0 -110
- package/lib/department-tree-mobile/src/department-tree-inline-app.vue2.cjs +0 -3
- package/lib/department-tree-mobile/src/department-tree-service.cjs +0 -47
- package/lib/department-tree-mobile/src/dept-path.vue.cjs +0 -13
- package/lib/department-tree-mobile/src/dept-path.vue2.cjs +0 -3
- package/lib/department-tree-mobile/src/dept-result.vue.cjs +0 -14
- package/lib/department-tree-mobile/src/dept-result.vue2.cjs +0 -3
- package/lib/department-user-tree/index.cjs +0 -5
- package/lib/department-user-tree/src/department-user-multiple-tree.vue.cjs +0 -16
- package/lib/department-user-tree/src/department-user-multiple-tree.vue2.cjs +0 -2
- package/lib/department-user-tree/src/department-user-single-tree.vue.cjs +0 -14
- package/lib/department-user-tree/src/department-user-tree.vue.cjs +0 -21
- package/lib/department-user-tree-inline/index.cjs +0 -5
- package/lib/department-user-tree-inline/src/department-user-multiple-tree-inline.vue.cjs +0 -154
- package/lib/department-user-tree-inline/src/department-user-multiple-tree-inline.vue2.cjs +0 -2
- package/lib/department-user-tree-inline/src/department-user-single-tree-inline.vue.cjs +0 -57
- package/lib/department-user-tree-inline/src/department-user-single-tree-inline.vue2.cjs +0 -2
- package/lib/department-user-tree-inline/src/department-user-tree-inline.vue.cjs +0 -11
- package/lib/department-user-tree-inline/src/department-user-tree-multi-service.cjs +0 -78
- package/lib/department-user-tree-inline/src/department-user-tree-single-service.cjs +0 -51
- package/lib/department-user-tree-inline/src/group-user/group-input.vue.cjs +0 -34
- package/lib/department-user-tree-inline/src/group-user/group-list.vue.cjs +0 -22
- package/lib/department-user-tree-inline/src/group-user/group-user.vue.cjs +0 -10
- package/lib/department-user-tree-inline/src/group-user-multiple-tree.vue.cjs +0 -72
- package/lib/department-user-tree-inline/src/group-user-single-tree.vue.cjs +0 -28
- package/lib/department-user-tree-inline/src/group-user-tree-service.cjs +0 -33
- package/lib/department-user-tree-inline/src/search-result.vue.cjs +0 -38
- package/lib/department-user-tree-inline/src/search-result.vue2.cjs +0 -2
- package/lib/department-user-tree-mobile/index.cjs +0 -5
- package/lib/department-user-tree-mobile/src/department-user-tree-app.vue.cjs +0 -13
- package/lib/department-user-tree-mobile/src/department-user-tree-app.vue2.cjs +0 -2
- package/lib/department-user-tree-mobile/src/department-user-tree-app.vue3.cjs +0 -3
- package/lib/department-user-tree-mobile/src/department-user-tree-inline-app.vue.cjs +0 -124
- package/lib/department-user-tree-mobile/src/department-user-tree-inline-app.vue2.cjs +0 -3
- package/lib/department-user-tree-mobile/src/department-user-tree-service.cjs +0 -28
- package/lib/department-user-tree-mobile/src/dept-path.vue.cjs +0 -13
- package/lib/department-user-tree-mobile/src/dept-path.vue2.cjs +0 -3
- package/lib/department-user-tree-mobile/src/dept-result.vue.cjs +0 -14
- package/lib/department-user-tree-mobile/src/dept-result.vue2.cjs +0 -3
- package/lib/directives/prevent-reclick.cjs +0 -14
- package/lib/dynamic-source-select/index.cjs +0 -5
- package/lib/dynamic-source-select/src/dynamic-source-select-service.cjs +0 -30
- package/lib/dynamic-source-select/src/dynamic-source-select.vue.cjs +0 -266
- package/lib/dynamic-source-select/src/dynamic-source-select.vue2.cjs +0 -2
- package/lib/dynamic-source-select/src/dynamic-source-select.vue3.cjs +0 -2
- package/lib/dynamic-source-select/src/events.cjs +0 -28
- package/lib/empty-state/index.vue.cjs +0 -6
- package/lib/empty-state/index.vue2.cjs +0 -3
- package/lib/favicon.svg +0 -29
- package/lib/fs-preview/index.cjs +0 -5
- package/lib/fs-preview/src/fs-preview.vue.cjs +0 -119
- package/lib/fs-preview/src/fs-preview.vue2.cjs +0 -2
- package/lib/fs-upload/index.cjs +0 -5
- package/lib/fs-upload/src/fs-upload-multi.vue.cjs +0 -63
- package/lib/fs-upload/src/fs-upload-single.vue.cjs +0 -64
- package/lib/fs-upload/src/fs-upload.vue.cjs +0 -18
- package/lib/fs-upload/src/see-big-picture.vue.cjs +0 -9
- package/lib/fs-upload-list/index.cjs +0 -5
- package/lib/fs-upload-list/src/fs-upload-list.vue.cjs +0 -91
- package/lib/fs-upload-list/src/fs-upload-list.vue2.cjs +0 -2
- package/lib/fs-upload-new/index.cjs +0 -5
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-app.vue.cjs +0 -57
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-app.vue2.cjs +0 -3
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue.cjs +0 -170
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue2.cjs +0 -3
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-component.vue.cjs +0 -5
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-component.vue2.cjs +0 -32
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-component.vue3.cjs +0 -2
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-input.vue.cjs +0 -41
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-input.vue2.cjs +0 -3
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload.vue.cjs +0 -29
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload.vue2.cjs +0 -3
- package/lib/fs-upload-new/src/fs-button-upload.vue.cjs +0 -5
- package/lib/fs-upload-new/src/fs-button-upload.vue2.cjs +0 -55
- package/lib/fs-upload-new/src/fs-button-upload.vue3.cjs +0 -2
- package/lib/fs-upload-new/src/fs-drag-upload.vue.cjs +0 -5
- package/lib/fs-upload-new/src/fs-drag-upload.vue2.cjs +0 -55
- package/lib/fs-upload-new/src/fs-drag-upload.vue3.cjs +0 -2
- package/lib/fs-upload-new/src/fs-preview-new.vue.cjs +0 -5
- package/lib/fs-upload-new/src/fs-preview-new.vue2.cjs +0 -84
- package/lib/fs-upload-new/src/fs-preview-new.vue3.cjs +0 -2
- package/lib/fs-upload-new/src/fs-preview-new.vue4.cjs +0 -2
- package/lib/fs-upload-new/src/fs-upload-new.vue.cjs +0 -54
- package/lib/fs-upload-new/src/fs-upload-new.vue2.cjs +0 -3
- package/lib/hamburger/index.cjs +0 -5
- package/lib/hamburger/src/hamburger.vue.cjs +0 -11
- package/lib/hamburger/src/hamburger.vue2.cjs +0 -2
- package/lib/index.cjs +0 -41
- package/lib/json-view/json-view-dialog.vue.cjs +0 -16
- package/lib/json-view/json-view-dialog.vue2.cjs +0 -3
- package/lib/json-view/json-view.vue.cjs +0 -3
- package/lib/json-view/json-view.vue2.cjs +0 -32
- package/lib/multipart-upload/index.cjs +0 -5
- package/lib/multipart-upload/src/index.vue.cjs +0 -10
- package/lib/multipart-upload/src/multipart-upload-form.vue.cjs +0 -73
- package/lib/multipart-upload/src/multipart-upload-list.vue.cjs +0 -96
- package/lib/organization-input/index.cjs +0 -5
- package/lib/organization-input/src/organization-input.vue.cjs +0 -218
- package/lib/organization-input/src/organization-input.vue2.cjs +0 -2
- package/lib/plugins/export-data-new.cjs +0 -229
- package/lib/plugins/export-data.cjs +0 -173
- package/lib/plugins/index.cjs +0 -5
- package/lib/plugins/public-method.cjs +0 -13
- package/lib/remove-department/index.cjs +0 -5
- package/lib/remove-department/src/remove-department.vue.cjs +0 -27
- package/lib/remove-department/src/remove-dept-service.cjs +0 -12
- package/lib/remove-user/index.cjs +0 -5
- package/lib/remove-user/src/remove-user-service.cjs +0 -12
- package/lib/remove-user/src/remove-user.vue.cjs +0 -29
- package/lib/remove-workgroup/index.cjs +0 -5
- package/lib/remove-workgroup/src/remove-workgroup-service.cjs +0 -12
- package/lib/remove-workgroup/src/remove-workgroup.vue.cjs +0 -25
- package/lib/rich-editor/index.cjs +0 -5
- package/lib/rich-editor/index.vue.cjs +0 -67
- package/lib/rich-editor/tinymce/zh_CN.cjs +0 -2
- package/lib/rich-editor/viewer.vue.cjs +0 -24
- package/lib/row-form/index.cjs +0 -5
- package/lib/row-form/index.vue.cjs +0 -5
- package/lib/row-form/index.vue2.cjs +0 -56
- package/lib/row-form/index.vue3.cjs +0 -2
- package/lib/row-form/operation.vue.cjs +0 -28
- package/lib/row-form/operation.vue2.cjs +0 -3
- package/lib/scan-code-input/index.cjs +0 -5
- package/lib/scan-code-input/src/events.cjs +0 -13
- package/lib/scan-code-input/src/scan-code-input.vue.cjs +0 -26
- package/lib/scan-code-input-browser/index.cjs +0 -5
- package/lib/scan-code-input-browser/src/scan-code-input.vue.cjs +0 -34
- package/lib/secret-info/index.cjs +0 -5
- package/lib/secret-info/index.vue.cjs +0 -13
- package/lib/src/api/sso-service.cjs +0 -55
- package/lib/src/api/tab.cjs +0 -14
- package/lib/src/assets/401/401.gif.cjs +0 -2
- package/lib/src/assets/404/404-cloud.png.cjs +0 -2
- package/lib/src/assets/404/404.png.cjs +0 -2
- package/lib/src/assets/chat-embed/robot.gif.cjs +0 -2
- package/lib/src/assets/chat-embed/robot.svg.cjs +0 -2
- package/lib/src/assets/nonemessage.png.cjs +0 -2
- package/lib/src/components/Affix/index.vue.cjs +0 -5
- package/lib/src/components/Affix/index.vue2.cjs +0 -81
- package/lib/src/components/Affix/index.vue3.cjs +0 -2
- package/lib/src/components/Card/index.cjs +0 -46
- package/lib/src/components/Scrollbar/index.vue.cjs +0 -48
- package/lib/src/components/Scrollbar/index.vue2.cjs +0 -2
- package/lib/src/directives/permission/index.cjs +0 -5
- package/lib/src/directives/permission/permission.cjs +0 -9
- package/lib/src/i18n/i18n.cjs +0 -3
- package/lib/src/i18n/langs/cn.cjs +0 -2
- package/lib/src/i18n/langs/en.cjs +0 -2
- package/lib/src/mixins/resizeMixin.cjs +0 -20
- package/lib/src/permission.cjs +0 -76
- package/lib/src/router/index.cjs +0 -16
- package/lib/src/store/getters.cjs +0 -2
- package/lib/src/store/index.cjs +0 -16
- package/lib/src/store/modules/app.cjs +0 -40
- package/lib/src/store/modules/chat-ai-store.cjs +0 -33
- package/lib/src/store/modules/permission.cjs +0 -30
- package/lib/src/store/modules/system.cjs +0 -10
- package/lib/src/store/modules/tab-content.cjs +0 -18
- package/lib/src/store/modules/table.cjs +0 -17
- package/lib/src/store/modules/user.cjs +0 -133
- package/lib/src/utils/auth-api.cjs +0 -132
- package/lib/src/utils/auth.cjs +0 -86
- package/lib/src/utils/calculator/calculator-factory-wf.cjs +0 -166
- package/lib/src/utils/calculator/calculator-factory.cjs +0 -92
- package/lib/src/utils/calculator/calculator-util.cjs +0 -53
- package/lib/src/utils/chat-ai-util.cjs +0 -26
- package/lib/src/utils/common-util.cjs +0 -362
- package/lib/src/utils/eventBus.cjs +0 -3
- package/lib/src/utils/file-util.cjs +0 -22
- package/lib/src/utils/global-prop.cjs +0 -22
- package/lib/src/utils/guid.cjs +0 -7
- package/lib/src/utils/i18n-util.cjs +0 -62
- package/lib/src/utils/iconUtils.cjs +0 -19
- package/lib/src/utils/index.cjs +0 -32
- package/lib/src/utils/insert_css.cjs +0 -18
- package/lib/src/utils/json-util.cjs +0 -45
- package/lib/src/utils/jump-page-utils.cjs +0 -256
- package/lib/src/utils/local-storage.cjs +0 -18
- package/lib/src/utils/menu.cjs +0 -13
- package/lib/src/utils/permission.cjs +0 -41
- package/lib/src/utils/permissionAuth.cjs +0 -120
- package/lib/src/utils/range-selector.cjs +0 -101
- package/lib/src/utils/request.cjs +0 -131
- package/lib/src/utils/resize.cjs +0 -11
- package/lib/src/utils/restful-interface-utils.cjs +0 -15
- package/lib/src/utils/util.cjs +0 -341
- package/lib/src/utils/validate.cjs +0 -12
- package/lib/src/utils/voice-setting-cache.cjs +0 -199
- package/lib/src/utils/watermark-cache.cjs +0 -10
- package/lib/src/utils/watermark.cjs +0 -33
- package/lib/src/utils/workflow-util.cjs +0 -41
- package/lib/src/views/dsc-component/Sidebar/Item.vue.cjs +0 -5
- package/lib/src/views/dsc-component/Sidebar/Item.vue2.cjs +0 -9
- package/lib/src/views/dsc-component/Sidebar/Item.vue3.cjs +0 -2
- package/lib/src/views/dsc-component/Sidebar/Link.vue.cjs +0 -11
- package/lib/src/views/dsc-component/Sidebar/SidebarItem.vue.cjs +0 -46
- package/lib/src/views/dsc-component/Sidebar/SidebarItem.vue2.cjs +0 -2
- package/lib/src/views/dsc-component/Sidebar/index.vue.cjs +0 -103
- package/lib/src/views/dsc-component/tabs/tab-content.vue.cjs +0 -61
- package/lib/src/views/dsc-component/tabs/tab-content.vue2.cjs +0 -2
- package/lib/src/views/dsc-component/tabs/tab-content.vue3.cjs +0 -2
- package/lib/src/views/error-page/401.vue.cjs +0 -11
- package/lib/src/views/error-page/401.vue2.cjs +0 -2
- package/lib/src/views/error-page/404.vue.cjs +0 -8
- package/lib/src/views/error-page/404.vue2.cjs +0 -2
- package/lib/src/views/layout/EmptyLayout.vue.cjs +0 -7
- package/lib/src/views/layout/Layout.vue.cjs +0 -21
- package/lib/src/views/layout/Layout.vue2.cjs +0 -2
- package/lib/src/views/layout/NewLayout.vue.cjs +0 -7
- package/lib/src/views/layout/components/AppMain.vue.cjs +0 -11
- package/lib/src/views/layout/components/AppMain.vue2.cjs +0 -2
- package/lib/src/views/layout/components/Breadcrumb/index.vue.cjs +0 -56
- package/lib/src/views/layout/components/Breadcrumb/index.vue2.cjs +0 -2
- package/lib/src/views/layout/components/Menubar/Item.vue.cjs +0 -5
- package/lib/src/views/layout/components/Menubar/Item.vue2.cjs +0 -13
- package/lib/src/views/layout/components/Menubar/Item.vue3.cjs +0 -2
- package/lib/src/views/layout/components/Menubar/Link.vue.cjs +0 -11
- package/lib/src/views/layout/components/Menubar/SidebarItem.vue.cjs +0 -47
- package/lib/src/views/layout/components/Menubar/SidebarItem.vue2.cjs +0 -2
- package/lib/src/views/layout/components/Menubar/index.vue.cjs +0 -79
- package/lib/src/views/layout/components/Sidebar/Item.vue.cjs +0 -7
- package/lib/src/views/layout/components/Sidebar/Item.vue2.cjs +0 -3
- package/lib/src/views/layout/components/Sidebar/Link.vue.cjs +0 -9
- package/lib/src/views/layout/components/Sidebar/SidebarItem.vue.cjs +0 -16
- package/lib/src/views/layout/components/Sidebar/SidebarItem.vue2.cjs +0 -2
- package/lib/src/views/layout/components/Sidebar/index.vue.cjs +0 -51
- package/lib/src/views/layout/components/iframe-page.vue.cjs +0 -12
- package/lib/src/views/layout/components/iframe-page.vue2.cjs +0 -2
- package/lib/src/views/layout/components/tabs/tab-content.vue.cjs +0 -60
- package/lib/src/views/layout/components/tabs/tab-content.vue2.cjs +0 -2
- package/lib/src/views/layout/components/tabs/tab-content.vue3.cjs +0 -2
- package/lib/src/views/layout/mixin/ResizeHandler.cjs +0 -14
- package/lib/src/views/layout/tab-content-iframe-index.vue.cjs +0 -12
- package/lib/src/views/layout/tab-content-iframe-index.vue2.cjs +0 -2
- package/lib/src/views/layout/tab-content-index.vue.cjs +0 -22
- package/lib/src/views/layout/tab-content-index.vue2.cjs +0 -2
- package/lib/src/views/login/authredirect.vue.cjs +0 -6
- package/lib/src/views/redirect/index.vue.cjs +0 -17
- package/lib/src/views/super-icon/index.cjs +0 -5
- package/lib/src/views/super-icon/src/index.vue.cjs +0 -5
- package/lib/src/views/super-icon/src/index.vue2.cjs +0 -10
- package/lib/src/views/super-icon/src/index.vue3.cjs +0 -2
- package/lib/src/views/svg-icon/src/svg-icon.vue.cjs +0 -2
- package/lib/src/views/svg-icon/src/svg-icon.vue2.cjs +0 -12
- package/lib/src/views/wf-history/tache-subprocess-history.vue.cjs +0 -12
- package/lib/src/views/wf-history/tache-subprocess-history.vue2.cjs +0 -2
- package/lib/style.css +0 -3103
- package/lib/super-grid/index.cjs +0 -5
- package/lib/super-grid/src/apis.cjs +0 -477
- package/lib/super-grid/src/columns-config.vue.cjs +0 -76
- package/lib/super-grid/src/components/grid-icon.vue.cjs +0 -39
- package/lib/super-grid/src/components/grid-radio-input.vue.cjs +0 -22
- package/lib/super-grid/src/components/grid-radio-input.vue2.cjs +0 -3
- package/lib/super-grid/src/components/mobile-table-card.cjs +0 -99
- package/lib/super-grid/src/components/select-input.vue.cjs +0 -141
- package/lib/super-grid/src/components/select-input.vue2.cjs +0 -3
- package/lib/super-grid/src/custom-formatter.cjs +0 -163
- package/lib/super-grid/src/dynamic-input.vue.cjs +0 -465
- package/lib/super-grid/src/eventBus.cjs +0 -3
- package/lib/super-grid/src/events.cjs +0 -35
- package/lib/super-grid/src/formValidatorUtil.cjs +0 -106
- package/lib/super-grid/src/formatter.cjs +0 -69
- package/lib/super-grid/src/group-column.vue.cjs +0 -19
- package/lib/super-grid/src/header-context-menu.vue.cjs +0 -12
- package/lib/super-grid/src/header-context-menu.vue2.cjs +0 -2
- package/lib/super-grid/src/index-column.vue.cjs +0 -19
- package/lib/super-grid/src/normal-column-content.vue.cjs +0 -303
- package/lib/super-grid/src/normal-column-content.vue2.cjs +0 -2
- package/lib/super-grid/src/normal-column.vue.cjs +0 -90
- package/lib/super-grid/src/normal-column.vue2.cjs +0 -2
- package/lib/super-grid/src/public-methods.cjs +0 -20
- package/lib/super-grid/src/row-detail.vue.cjs +0 -11
- package/lib/super-grid/src/row-operation.vue.cjs +0 -82
- package/lib/super-grid/src/row-operation.vue2.cjs +0 -2
- package/lib/super-grid/src/scan-util.cjs +0 -98
- package/lib/super-grid/src/search-button.vue.cjs +0 -20
- package/lib/super-grid/src/search-condition-input.vue.cjs +0 -13
- package/lib/super-grid/src/search-condition-list.vue.cjs +0 -17
- package/lib/super-grid/src/search-form-advancedQuery.vue.cjs +0 -106
- package/lib/super-grid/src/search-form-advancedQuery.vue2.cjs +0 -2
- package/lib/super-grid/src/search-form-dialog.vue.cjs +0 -23
- package/lib/super-grid/src/search-form-item.vue.cjs +0 -120
- package/lib/super-grid/src/search-form-item.vue2.cjs +0 -2
- package/lib/super-grid/src/search-form-mobile.vue.cjs +0 -32
- package/lib/super-grid/src/search-form-mobile.vue2.cjs +0 -2
- package/lib/super-grid/src/search-form-number.vue.cjs +0 -21
- package/lib/super-grid/src/search-form-open.vue.cjs +0 -46
- package/lib/super-grid/src/search-form-ordinarySearch.vue.cjs +0 -33
- package/lib/super-grid/src/search-form-ordinarySearch.vue2.cjs +0 -2
- package/lib/super-grid/src/search-form.vue.cjs +0 -194
- package/lib/super-grid/src/search-form.vue2.cjs +0 -2
- package/lib/super-grid/src/search-methods.cjs +0 -163
- package/lib/super-grid/src/selection-column.vue.cjs +0 -9
- package/lib/super-grid/src/store.cjs +0 -3
- package/lib/super-grid/src/super-grid-service.cjs +0 -253
- package/lib/super-grid/src/super-grid.vue.cjs +0 -1083
- package/lib/super-grid/src/super-grid.vue2.cjs +0 -2
- package/lib/super-grid/src/utils.cjs +0 -373
- package/lib/super-grid/src/view-image-dialog.vue.cjs +0 -60
- package/lib/super-icon/index.cjs +0 -5
- package/lib/super-icon/src/index.vue.cjs +0 -5
- package/lib/super-icon/src/index.vue2.cjs +0 -10
- package/lib/super-icon/src/index.vue3.cjs +0 -2
- package/lib/super-nine-grid/index.cjs +0 -5
- package/lib/super-nine-grid/src/apis.cjs +0 -33
- package/lib/super-nine-grid/src/custom-formatter.cjs +0 -33
- package/lib/super-nine-grid/src/formatter.cjs +0 -36
- package/lib/super-nine-grid/src/search-form-number.vue.cjs +0 -9
- package/lib/super-nine-grid/src/search-form.vue.cjs +0 -84
- package/lib/super-nine-grid/src/search-form.vue2.cjs +0 -2
- package/lib/super-nine-grid/src/search-methods.cjs +0 -47
- package/lib/super-nine-grid/src/store.cjs +0 -3
- package/lib/super-nine-grid/src/super-grid-service.cjs +0 -35
- package/lib/super-nine-grid/src/super-nine-grid.vue.cjs +0 -215
- package/lib/super-nine-grid/src/super-nine-grid.vue2.cjs +0 -2
- package/lib/super-nine-grid/src/utils.cjs +0 -36
- package/lib/svg-icon/index.cjs +0 -5
- package/lib/svg-icon/src/svg-icon.vue.cjs +0 -12
- package/lib/svg-icon/src/svg-icon.vue2.cjs +0 -2
- package/lib/utils/gogocodeTransfer.cjs +0 -28
- package/lib/utils/memory-cache-utils.cjs +0 -28
- package/lib/utils/organization.cjs +0 -55
- package/lib/utils/utils.cjs +0 -85
- package/lib/utils/value-set.cjs +0 -92
- package/lib/valid-code/index.cjs +0 -5
- package/lib/valid-code/src/valid-code.vue.cjs +0 -20
- package/lib/valid-code/src/valid-code.vue2.cjs +0 -2
- package/lib/workflow-button/index.cjs +0 -5
- package/lib/workflow-button/src/workflow-button.vue.cjs +0 -80
- package/lib/workflow-history-list/index.cjs +0 -5
- package/lib/workflow-history-list/src/api.cjs +0 -5
- package/lib/workflow-history-list/src/workflow-history-list.vue.cjs +0 -83
- package/lib/workflow-history-list/src/workflow-history-list.vue2.cjs +0 -2
- package/lib/workgroup-tree/index.cjs +0 -5
- package/lib/workgroup-tree/src/workgroup-tree.vue.cjs +0 -17
- package/lib/workgroup-tree-inline/index.cjs +0 -5
- package/lib/workgroup-tree-inline/src/search-result.vue.cjs +0 -35
- package/lib/workgroup-tree-inline/src/search-result.vue2.cjs +0 -2
- package/lib/workgroup-tree-inline/src/workgroup-tree-inline.vue.cjs +0 -119
- package/lib/workgroup-tree-inline/src/workgroup-tree-inline.vue2.cjs +0 -2
- package/lib/workgroup-tree-inline/src/workgroup-tree-service.cjs +0 -33
- package/lib/workgroup-tree-mobile/index.cjs +0 -5
- package/lib/workgroup-tree-mobile/src/dept-result.vue.cjs +0 -14
- package/lib/workgroup-tree-mobile/src/dept-result.vue2.cjs +0 -3
- package/lib/workgroup-tree-mobile/src/workgroup-tree-app.vue.cjs +0 -13
- package/lib/workgroup-tree-mobile/src/workgroup-tree-app.vue2.cjs +0 -2
- package/lib/workgroup-tree-mobile/src/workgroup-tree-app.vue3.cjs +0 -3
- package/lib/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue.cjs +0 -99
- package/lib/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue2.cjs +0 -3
- package/lib/workgroup-tree-mobile/src/workgroup-tree-service.cjs +0 -25
- package/lib/workgroup-user-tree/index.cjs +0 -5
- package/lib/workgroup-user-tree/src/workgroup-user-tree.vue.cjs +0 -17
- package/lib/workgroup-user-tree-inline/index.cjs +0 -5
- package/lib/workgroup-user-tree-inline/src/search-result.vue.cjs +0 -35
- package/lib/workgroup-user-tree-inline/src/search-result.vue2.cjs +0 -2
- package/lib/workgroup-user-tree-inline/src/workgroup-tree-inline-service.cjs +0 -71
- package/lib/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue.cjs +0 -163
- package/lib/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue2.cjs +0 -2
- package/lib/workgroup-user-tree-mobile/src/dept-path.vue.cjs +0 -13
- package/lib/workgroup-user-tree-mobile/src/dept-path.vue2.cjs +0 -3
- package/lib/workgroup-user-tree-mobile/src/dept-result.vue.cjs +0 -14
- package/lib/workgroup-user-tree-mobile/src/dept-result.vue2.cjs +0 -3
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue.cjs +0 -13
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue2.cjs +0 -2
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue3.cjs +0 -3
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue.cjs +0 -124
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue2.cjs +0 -3
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-service.cjs +0 -20
- package/lib/year-range-picker/index.cjs +0 -5
- package/lib/year-range-picker/src/year-range-picker.vue.cjs +0 -11
- package/src/api/sso-service.js +0 -222
- package/src/api/tab.js +0 -36
- package/src/assets/401/401.gif +0 -0
- package/src/assets/404/404-cloud.png +0 -0
- package/src/assets/404/404.png +0 -0
- package/src/assets/chat-embed/background.png +0 -0
- package/src/assets/chat-embed/robot.gif +0 -0
- package/src/assets/chat-embed/robot.svg +0 -32
- package/src/assets/cloud.png +0 -0
- package/src/assets/nonemessage.png +0 -0
- package/src/assets/tab-selectWhite.png +0 -0
- package/src/components/Affix/index.vue +0 -272
- package/src/components/Card/index.jsx +0 -227
- package/src/components/Scrollbar/index.vue +0 -224
- package/src/directives/permission/index.js +0 -14
- package/src/directives/permission/permission.js +0 -27
- package/src/i18n/i18n.js +0 -16
- package/src/i18n/langs/cn.js +0 -344
- package/src/i18n/langs/en.js +0 -344
- package/src/index.js +0 -22
- package/src/mixins/resizeMixin.js +0 -49
- package/src/permission.js +0 -252
- package/src/plugins.js +0 -18
- package/src/router/index.js +0 -92
- package/src/store/getters.js +0 -26
- package/src/store/index.js +0 -23
- package/src/store/modules/app.js +0 -96
- package/src/store/modules/chat-ai-store.ts +0 -85
- package/src/store/modules/permission.js +0 -143
- package/src/store/modules/system.js +0 -35
- package/src/store/modules/tab-content.js +0 -42
- package/src/store/modules/table.js +0 -76
- package/src/store/modules/user.js +0 -448
- package/src/utils/auth-api.js +0 -370
- package/src/utils/auth.js +0 -194
- package/src/utils/calculator/calculator-factory-wf.js +0 -465
- package/src/utils/calculator/calculator-factory.js +0 -133
- package/src/utils/calculator/calculator-util.js +0 -184
- package/src/utils/chat-ai-util.ts +0 -41
- package/src/utils/common-util.js +0 -1019
- package/src/utils/dingtalk-util.ts +0 -43
- package/src/utils/eventBus.js +0 -10
- package/src/utils/file-util.ts +0 -42
- package/src/utils/global-prop.ts +0 -44
- package/src/utils/guid.js +0 -13
- package/src/utils/i18n-util.js +0 -145
- package/src/utils/iconUtils.js +0 -37
- package/src/utils/iframe-communicator.js +0 -234
- package/src/utils/index.js +0 -102
- package/src/utils/insert_css.js +0 -47
- package/src/utils/json-util.ts +0 -85
- package/src/utils/jump-page-utils.js +0 -829
- package/src/utils/local-storage.js +0 -33
- package/src/utils/menu.js +0 -19
- package/src/utils/permission.js +0 -126
- package/src/utils/permissionAuth.js +0 -311
- package/src/utils/range-selector.js +0 -204
- package/src/utils/request.js +0 -407
- package/src/utils/resize.js +0 -19
- package/src/utils/restful-interface-utils.js +0 -57
- package/src/utils/util.js +0 -1000
- package/src/utils/validate.js +0 -34
- package/src/utils/voice-setting-cache.js +0 -497
- package/src/utils/watermark-cache.js +0 -13
- package/src/utils/watermark.js +0 -119
- package/src/utils/workflow-util.js +0 -107
- package/src/views/404.vue +0 -248
- package/src/views/dsc-component/Sidebar/Item.vue +0 -95
- package/src/views/dsc-component/Sidebar/Link.vue +0 -38
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +0 -245
- package/src/views/dsc-component/Sidebar/index.vue +0 -258
- package/src/views/dsc-component/tabs/tab-content.vue +0 -230
- package/src/views/error-page/401.vue +0 -106
- package/src/views/error-page/404.vue +0 -248
- package/src/views/layout/EmptyLayout.vue +0 -3
- package/src/views/layout/Layout.vue +0 -85
- package/src/views/layout/NewLayout.vue +0 -18
- package/src/views/layout/components/AppMain.vue +0 -46
- package/src/views/layout/components/Breadcrumb/index.vue +0 -158
- package/src/views/layout/components/Menubar/Item.vue +0 -125
- package/src/views/layout/components/Menubar/Link.vue +0 -38
- package/src/views/layout/components/Menubar/SidebarItem.vue +0 -333
- package/src/views/layout/components/Menubar/index.vue +0 -250
- package/src/views/layout/components/Sidebar/Item.vue +0 -33
- package/src/views/layout/components/Sidebar/Link.vue +0 -38
- package/src/views/layout/components/Sidebar/SidebarItem.vue +0 -179
- package/src/views/layout/components/Sidebar/index.vue +0 -141
- package/src/views/layout/components/iframe-page.vue +0 -38
- package/src/views/layout/components/index.js +0 -4
- package/src/views/layout/components/tabs/tab-content.vue +0 -273
- package/src/views/layout/mixin/ResizeHandler.js +0 -41
- package/src/views/layout/tab-content-iframe-index.vue +0 -38
- package/src/views/layout/tab-content-index.vue +0 -92
- package/src/views/login/authredirect.vue +0 -10
- package/src/views/login/index.vue +0 -296
- package/src/views/login/update-password.vue +0 -246
- package/src/views/redirect/index.vue +0 -14
- package/src/views/super-icon/index.js +0 -6
- package/src/views/super-icon/src/index.vue +0 -52
- package/src/views/svg-icon/index.js +0 -6
- package/src/views/svg-icon/src/svg-icon.vue +0 -43
- package/src/views/wf-history/tache-subprocess-history.vue +0 -45
- package/vite.config.js +0 -103
package/src/utils/util.js
DELETED
|
@@ -1,1000 +0,0 @@
|
|
|
1
|
-
import i18n from '../i18n/i18n'
|
|
2
|
-
import { executeExpression } from './calculator/calculator-util'
|
|
3
|
-
import { getLangByShort } from './common-util'
|
|
4
|
-
|
|
5
|
-
export function getI18n() {
|
|
6
|
-
let myI18n = window.$i18n
|
|
7
|
-
if (!myI18n) {
|
|
8
|
-
myI18n = i18n
|
|
9
|
-
}
|
|
10
|
-
if (!window.$locale) {
|
|
11
|
-
i18n.locale = 'cn'
|
|
12
|
-
} else {
|
|
13
|
-
i18n.locale = window.$locale
|
|
14
|
-
}
|
|
15
|
-
return myI18n.global
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export function getLanguageWithLocale() {
|
|
19
|
-
let currentLocale = window.$locale
|
|
20
|
-
if (!currentLocale || currentLocale === 'zh') {
|
|
21
|
-
currentLocale = 'cn'
|
|
22
|
-
}
|
|
23
|
-
return getLangByShort(currentLocale)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* 根据动态数据源获得下拉选的选项集合
|
|
28
|
-
* @param {*} dynamicSourceCode 动态数据源编码
|
|
29
|
-
* @param {*} searchText 查询的文本
|
|
30
|
-
* @param {*} entity 实体信息
|
|
31
|
-
* @returns
|
|
32
|
-
*/
|
|
33
|
-
export function findOptionsByDynamicDataSource(
|
|
34
|
-
dynamicSourceCode,
|
|
35
|
-
searchText,
|
|
36
|
-
entity,
|
|
37
|
-
additionalParameterStr,
|
|
38
|
-
searchParam
|
|
39
|
-
) {
|
|
40
|
-
return new Promise((resolve, reject) => {
|
|
41
|
-
findDynamicDataSourceByCode(dynamicSourceCode, searchText, entity, additionalParameterStr, searchParam)
|
|
42
|
-
.then((dynamicDataSourceDto) => {
|
|
43
|
-
let options = []
|
|
44
|
-
if (dynamicDataSourceDto && dynamicDataSourceDto.options) {
|
|
45
|
-
const setOptions = dynamicDataSourceDto.options
|
|
46
|
-
let valueAttribute
|
|
47
|
-
if (dynamicDataSourceDto.valueAttribute) {
|
|
48
|
-
valueAttribute = dynamicDataSourceDto.valueAttribute
|
|
49
|
-
}
|
|
50
|
-
if (!valueAttribute || valueAttribute === '[label]') {
|
|
51
|
-
valueAttribute = '_label_'
|
|
52
|
-
}
|
|
53
|
-
setOptions.forEach((item) => {
|
|
54
|
-
// 值
|
|
55
|
-
const value = item[valueAttribute]
|
|
56
|
-
// 显示的标签
|
|
57
|
-
const label = item['_label_']
|
|
58
|
-
options.push({
|
|
59
|
-
label,
|
|
60
|
-
value
|
|
61
|
-
})
|
|
62
|
-
})
|
|
63
|
-
}
|
|
64
|
-
if (!options) {
|
|
65
|
-
options = []
|
|
66
|
-
}
|
|
67
|
-
resolve(options)
|
|
68
|
-
})
|
|
69
|
-
.catch((error) => {
|
|
70
|
-
reject(error)
|
|
71
|
-
})
|
|
72
|
-
})
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* 根据动态数据源获得下拉选的选项对象集合
|
|
77
|
-
* @param {*} dynamicSourceCode 动态数据源编码
|
|
78
|
-
* @param {*} searchText 查询的文本
|
|
79
|
-
* @param {*} entity 实体信息
|
|
80
|
-
* @returns
|
|
81
|
-
*/
|
|
82
|
-
export function findDynamicDataSourceByCode(
|
|
83
|
-
dynamicSourceCode,
|
|
84
|
-
searchText,
|
|
85
|
-
entity,
|
|
86
|
-
additionalParameterStr,
|
|
87
|
-
searchParam
|
|
88
|
-
) {
|
|
89
|
-
let watchAttrValue
|
|
90
|
-
let parentEntity
|
|
91
|
-
let listCode
|
|
92
|
-
let formCode
|
|
93
|
-
let tableName
|
|
94
|
-
if (searchParam) {
|
|
95
|
-
watchAttrValue = searchParam.watchAttrValue
|
|
96
|
-
if (watchAttrValue === undefined || watchAttrValue === null) {
|
|
97
|
-
watchAttrValue = ''
|
|
98
|
-
}
|
|
99
|
-
parentEntity = searchParam.parent
|
|
100
|
-
listCode = searchParam._listCode
|
|
101
|
-
formCode = searchParam._formCode
|
|
102
|
-
tableName = searchParam._tableName
|
|
103
|
-
}
|
|
104
|
-
const params = {
|
|
105
|
-
searchText,
|
|
106
|
-
watchAttrValue,
|
|
107
|
-
parent: parentEntity
|
|
108
|
-
}
|
|
109
|
-
if (additionalParameterStr && typeof additionalParameterStr === 'object') {
|
|
110
|
-
params.additionalParamMap = additionalParameterStr
|
|
111
|
-
} else if (additionalParameterStr && typeof additionalParameterStr === 'string') {
|
|
112
|
-
params.additionalParamMap = JSON.parse(additionalParameterStr)
|
|
113
|
-
}
|
|
114
|
-
if (params.additionalParamMap === undefined) {
|
|
115
|
-
params.additionalParamMap = {}
|
|
116
|
-
}
|
|
117
|
-
if (listCode) {
|
|
118
|
-
params.additionalParamMap._listCode = listCode
|
|
119
|
-
}
|
|
120
|
-
if (formCode) {
|
|
121
|
-
params.additionalParamMap._formCode = formCode
|
|
122
|
-
}
|
|
123
|
-
if (tableName) {
|
|
124
|
-
params.additionalParamMap._tableName = tableName
|
|
125
|
-
}
|
|
126
|
-
if (entity && entity !== null) {
|
|
127
|
-
params.entity = entity
|
|
128
|
-
}
|
|
129
|
-
const backendUrl = window.$vueApp.config.globalProperties.baseURL
|
|
130
|
-
|
|
131
|
-
return new Promise((resolve, reject) => {
|
|
132
|
-
// 页面设计不请求动态数据源
|
|
133
|
-
if (
|
|
134
|
-
window.$vueApp.config.globalProperties.systemCode !== undefined &&
|
|
135
|
-
window.$vueApp.config.globalProperties.systemCode === 'agilebuilder'
|
|
136
|
-
) {
|
|
137
|
-
resolve()
|
|
138
|
-
} else {
|
|
139
|
-
window.$vueApp.config.globalProperties.$http
|
|
140
|
-
.post(backendUrl + '/common/dynamic-data-source/' + dynamicSourceCode, params)
|
|
141
|
-
.then((result) => {
|
|
142
|
-
if (result.backendUrl) {
|
|
143
|
-
// result.backendUrl表示需要使用动态数据源所属的系统路径重新获得一次数据
|
|
144
|
-
window.$vueApp.config.globalProperties.$http
|
|
145
|
-
.post(result.backendUrl + '/common/dynamic-data-source/' + dynamicSourceCode, params)
|
|
146
|
-
.then((finallyResult) => {
|
|
147
|
-
resolve(finallyResult)
|
|
148
|
-
})
|
|
149
|
-
.catch((error) => {
|
|
150
|
-
reject(error)
|
|
151
|
-
})
|
|
152
|
-
} else {
|
|
153
|
-
resolve(result)
|
|
154
|
-
}
|
|
155
|
-
})
|
|
156
|
-
.catch((error) => {
|
|
157
|
-
reject(error)
|
|
158
|
-
})
|
|
159
|
-
}
|
|
160
|
-
})
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* 解析是否可见的条件,例如:按钮是否按钮;列表单元格内容是否可见
|
|
165
|
-
* @param {*} conditionListJson
|
|
166
|
-
* @param {*} entity
|
|
167
|
-
* @param {*} additionalParameter
|
|
168
|
-
* @param {*} contextParameter
|
|
169
|
-
* @param {*} isSql
|
|
170
|
-
* @param {*} tableName
|
|
171
|
-
* @returns
|
|
172
|
-
*/
|
|
173
|
-
export function analysisCondition(
|
|
174
|
-
conditionListJson,
|
|
175
|
-
entity,
|
|
176
|
-
additionalParameter,
|
|
177
|
-
contextParameter,
|
|
178
|
-
isSql,
|
|
179
|
-
tableName,
|
|
180
|
-
parentFormData,
|
|
181
|
-
pageContext
|
|
182
|
-
) {
|
|
183
|
-
// console.log('analysisCondition判断条件conditionListJson', conditionListJson)
|
|
184
|
-
// console.log('analysisCondition判断条件entity', entity)
|
|
185
|
-
// console.log('analysisCondition判断条件additionalParameter', additionalParameter)
|
|
186
|
-
// console.log('analysisCondition判断条件contextParameter', contextParameter)
|
|
187
|
-
// console.log('analysisCondition判断条件isSql', isSql)
|
|
188
|
-
// console.log('analysisCondition判断条件tableName', tableName)
|
|
189
|
-
// console.log('analysisCondition判断条件parentFormData', parentFormData)
|
|
190
|
-
if (conditionListJson === undefined || conditionListJson === '' || conditionListJson === null) {
|
|
191
|
-
// 如果条件不存在,则默认返回true
|
|
192
|
-
return true
|
|
193
|
-
}
|
|
194
|
-
if (typeof isSql === 'undefined' || isSql === null) {
|
|
195
|
-
// 默认是定制开发时
|
|
196
|
-
isSql = false
|
|
197
|
-
}
|
|
198
|
-
// 页面附加参数
|
|
199
|
-
let additionalParameterMap = {}
|
|
200
|
-
if (additionalParameter && typeof additionalParameter === 'string' && additionalParameter !== '') {
|
|
201
|
-
additionalParameterMap = JSON.parse(additionalParameter)
|
|
202
|
-
} else if (additionalParameter && typeof additionalParameter === 'object') {
|
|
203
|
-
additionalParameterMap = additionalParameter
|
|
204
|
-
}
|
|
205
|
-
// 环境变量,例如:当前用户id、当前用户登录名等
|
|
206
|
-
let contextParameterMap = {}
|
|
207
|
-
if (contextParameter && typeof contextParameter === 'string' && contextParameter !== '') {
|
|
208
|
-
contextParameterMap = JSON.parse(contextParameter)
|
|
209
|
-
} else if (contextParameter && typeof contextParameter === 'object') {
|
|
210
|
-
contextParameterMap = contextParameter
|
|
211
|
-
}
|
|
212
|
-
let conditionList = []
|
|
213
|
-
if (conditionListJson && typeof conditionListJson === 'string' && conditionListJson !== '') {
|
|
214
|
-
// conditionList = eval('('+conditionListJson+')')
|
|
215
|
-
conditionList = JSON.parse(conditionListJson)
|
|
216
|
-
} else if (conditionListJson && Array.isArray(conditionListJson)) {
|
|
217
|
-
conditionList = conditionListJson
|
|
218
|
-
}
|
|
219
|
-
return parseCondition(
|
|
220
|
-
entity,
|
|
221
|
-
conditionList,
|
|
222
|
-
isSql,
|
|
223
|
-
tableName,
|
|
224
|
-
additionalParameterMap,
|
|
225
|
-
contextParameterMap,
|
|
226
|
-
parentFormData,
|
|
227
|
-
pageContext
|
|
228
|
-
)
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
function parseCondition(
|
|
232
|
-
entity,
|
|
233
|
-
conditionList,
|
|
234
|
-
isSql,
|
|
235
|
-
tableName,
|
|
236
|
-
additionalParamMap,
|
|
237
|
-
contextParameterMap,
|
|
238
|
-
parentFormData,
|
|
239
|
-
pageContext
|
|
240
|
-
) {
|
|
241
|
-
if (conditionList === undefined || conditionList === null || conditionList.length === 0) {
|
|
242
|
-
// 表示没有设置条件,默认是true
|
|
243
|
-
return true
|
|
244
|
-
}
|
|
245
|
-
// 条件封装的表达式
|
|
246
|
-
let conditions = ''
|
|
247
|
-
for (let i = 0; i < conditionList.length; i++) {
|
|
248
|
-
const condition = conditionList[i]
|
|
249
|
-
let propName = condition.propName
|
|
250
|
-
let propDbName = condition.propDbName
|
|
251
|
-
if ((!propName || propName === '') && (!propDbName || propDbName === '')) {
|
|
252
|
-
// 没有属性和字段名表示是无效的条件
|
|
253
|
-
continue
|
|
254
|
-
}
|
|
255
|
-
let leftValue
|
|
256
|
-
if (isSql && propDbName) {
|
|
257
|
-
if (propDbName.indexOf('parent_+_') !== -1) {
|
|
258
|
-
propDbName = propDbName.replace('parent_+_', '')
|
|
259
|
-
// 再获取属于那张表
|
|
260
|
-
const propDbNameArr = propDbName.split('_+_')
|
|
261
|
-
propDbName = propDbNameArr[1]
|
|
262
|
-
if (pageContext && propDbName && propDbName.indexOf('${') >= 0) {
|
|
263
|
-
leftValue = getPropValueNew(propDbName, pageContext, entity)
|
|
264
|
-
} else {
|
|
265
|
-
leftValue = getValue(parentFormData, propDbName, isSql)
|
|
266
|
-
}
|
|
267
|
-
// leftValue = getValue(parentFormData, propDbName, isSql)
|
|
268
|
-
} else {
|
|
269
|
-
if (pageContext && propDbName && propDbName.indexOf('${') >= 0) {
|
|
270
|
-
leftValue = getPropValueNew(propDbName, pageContext, entity)
|
|
271
|
-
} else {
|
|
272
|
-
leftValue = getValue(entity, propDbName, isSql)
|
|
273
|
-
}
|
|
274
|
-
// leftValue = getValue(entity, propDbName, isSql)
|
|
275
|
-
}
|
|
276
|
-
if (leftValue === undefined || leftValue === null) {
|
|
277
|
-
if (tableName && propDbName.toLowerCase().startsWith(tableName.toLowerCase() + '.')) {
|
|
278
|
-
// 表示是当前表的字段
|
|
279
|
-
const myProp = propDbName.substring(propDbName.indexOf('.'))
|
|
280
|
-
if (pageContext && myProp && myProp.indexOf('${') >= 0) {
|
|
281
|
-
leftValue = getPropValueNew(myProp, pageContext, entity)
|
|
282
|
-
} else {
|
|
283
|
-
leftValue = getValue(entity, myProp, isSql)
|
|
284
|
-
}
|
|
285
|
-
// leftValue = getValue(entity, myProp, isSql)
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
} else {
|
|
289
|
-
if (propName.indexOf('parent_+_') !== -1) {
|
|
290
|
-
propName = propName.replace('parent_+_', '')
|
|
291
|
-
const propNameArr = propName.split('_+_')
|
|
292
|
-
propName = propNameArr[1]
|
|
293
|
-
if (pageContext && propName && propName.indexOf('${') >= 0) {
|
|
294
|
-
leftValue = getPropValueNew(propName, pageContext, entity)
|
|
295
|
-
} else {
|
|
296
|
-
leftValue = getValue(parentFormData, propName, isSql)
|
|
297
|
-
}
|
|
298
|
-
// leftValue = getValue(parentFormData, propName, isSql)
|
|
299
|
-
} else {
|
|
300
|
-
if (pageContext && propName && propName.indexOf('${') >= 0) {
|
|
301
|
-
leftValue = getPropValueNew(propName, pageContext, entity)
|
|
302
|
-
} else {
|
|
303
|
-
leftValue = getValue(entity, propName, isSql)
|
|
304
|
-
}
|
|
305
|
-
// leftValue = getValue(entity, propName, isSql)
|
|
306
|
-
}
|
|
307
|
-
if (propDbName && (leftValue === undefined || leftValue === null)) {
|
|
308
|
-
if (pageContext && propDbName && propDbName.indexOf('${') >= 0) {
|
|
309
|
-
leftValue = getPropValueNew(propDbName, pageContext, entity)
|
|
310
|
-
} else {
|
|
311
|
-
leftValue = getValue(entity, propDbName, isSql)
|
|
312
|
-
}
|
|
313
|
-
// leftValue = getValue(entity, propDbName, isSql)
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
const operator = condition.operator
|
|
317
|
-
const propValue = condition.propValue
|
|
318
|
-
const dataType = condition.dataType
|
|
319
|
-
const variableIsNullStr = condition.variableIsNull
|
|
320
|
-
// 解析单个条件的值
|
|
321
|
-
// 判断value类型
|
|
322
|
-
let value
|
|
323
|
-
if (pageContext) {
|
|
324
|
-
value = getPropValueNew(propValue, pageContext, entity)
|
|
325
|
-
} else {
|
|
326
|
-
value = getPropValue(propValue, entity, additionalParamMap, contextParameterMap)
|
|
327
|
-
}
|
|
328
|
-
if (variableIsNullStr && variableIsNullStr === 'null') {
|
|
329
|
-
if (value === undefined || value === '') {
|
|
330
|
-
value = null
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
let conditionResult = executeExpression(leftValue, operator, value, dataType)
|
|
334
|
-
const leftBracket = condition.leftBracket
|
|
335
|
-
const rightBracket = condition.rightBracket
|
|
336
|
-
let joinSign = condition.joinSign
|
|
337
|
-
if (leftBracket && leftBracket !== null && leftBracket !== '') {
|
|
338
|
-
conditions = conditions + leftBracket
|
|
339
|
-
conditions = conditions + ' '
|
|
340
|
-
// conditions.append(leftBracket).append(' ')
|
|
341
|
-
}
|
|
342
|
-
if (variableIsNullStr && variableIsNullStr !== 'null') {
|
|
343
|
-
if (value === undefined || value === null || value + '' === '') {
|
|
344
|
-
if (variableIsNullStr === '1=1') {
|
|
345
|
-
conditionResult = true
|
|
346
|
-
} else {
|
|
347
|
-
conditionResult = false
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
conditions += conditionResult + ' '
|
|
352
|
-
if (rightBracket && rightBracket !== null && rightBracket !== '') {
|
|
353
|
-
conditions = conditions + rightBracket
|
|
354
|
-
conditions = conditions + ' '
|
|
355
|
-
// conditions.append(rightBracket).append(' ')
|
|
356
|
-
}
|
|
357
|
-
if (i < conditionList.length - 1) {
|
|
358
|
-
// 最后一个不拼接“连接符”
|
|
359
|
-
if (joinSign && joinSign !== null && joinSign !== '') {
|
|
360
|
-
const joinSignIgnoreCase = joinSign.toLowerCase()
|
|
361
|
-
if (joinSignIgnoreCase === 'and') {
|
|
362
|
-
joinSign = joinSignIgnoreCase.replace('and', '&&')
|
|
363
|
-
} else if (joinSignIgnoreCase === 'or') {
|
|
364
|
-
joinSign = joinSignIgnoreCase.replace('or', '||')
|
|
365
|
-
}
|
|
366
|
-
conditions += joinSign + ' '
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
console.log('parseCondition----conditions=', conditions)
|
|
371
|
-
if (conditions) {
|
|
372
|
-
// eslint-disable-next-line no-eval
|
|
373
|
-
return eval('(' + conditions + ')')
|
|
374
|
-
} else {
|
|
375
|
-
return true
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
const REPLACE_DOT = '__'
|
|
380
|
-
|
|
381
|
-
function getValue(entityData, fieldName, isSql) {
|
|
382
|
-
let value = null
|
|
383
|
-
if (entityData && entityData !== null) {
|
|
384
|
-
if (fieldName && fieldName !== null) {
|
|
385
|
-
value = getValueByField(entityData, fieldName)
|
|
386
|
-
if (value === undefined || value === null) {
|
|
387
|
-
if (isSql) {
|
|
388
|
-
if (value === undefined || value == null) {
|
|
389
|
-
if (fieldName.indexOf('.') > 0) {
|
|
390
|
-
// 将“.”替换为'__',列表组件中的entity中如果是'.',传过来的实体信息中的字段属性会是“__”
|
|
391
|
-
fieldName = fieldName.replace('.', REPLACE_DOT)
|
|
392
|
-
value = getValueByField(entityData, fieldName)
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
return value
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
export function getValueByField(entityData, fieldName) {
|
|
403
|
-
if (entityData && entityData !== null) {
|
|
404
|
-
let value
|
|
405
|
-
if (fieldName.indexOf('.') > 0) {
|
|
406
|
-
// 表示是子表字段
|
|
407
|
-
value = getSubEntityValue(entityData, fieldName)
|
|
408
|
-
} else {
|
|
409
|
-
value = entityData[fieldName.toUpperCase()]
|
|
410
|
-
if (value === undefined) {
|
|
411
|
-
value = entityData[fieldName.toLowerCase()]
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
return value
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
function getSubEntityValue(entityData, fieldName) {
|
|
419
|
-
let value = null
|
|
420
|
-
let subEntityData = entityData
|
|
421
|
-
const fieldNames = fieldName.split('\\.')
|
|
422
|
-
for (let i = 0; i < fieldNames.length; i++) {
|
|
423
|
-
const field = fieldNames[i]
|
|
424
|
-
if (i === fieldNames.length) {
|
|
425
|
-
value = getSubEntityFieldValue(subEntityData, field)
|
|
426
|
-
} else {
|
|
427
|
-
subEntityData = getSubEntityFieldValue(subEntityData, field)
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
return value
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
/**
|
|
434
|
-
* 获得关联表字段的值。
|
|
435
|
-
* 处理sql 或 实体情况。
|
|
436
|
-
* @param subEntityData
|
|
437
|
-
* @param fieldName
|
|
438
|
-
* @return
|
|
439
|
-
*/
|
|
440
|
-
function getSubEntityFieldValue(subEntityData, fieldName) {
|
|
441
|
-
if (subEntityData === undefined || subEntityData === null) {
|
|
442
|
-
return null
|
|
443
|
-
}
|
|
444
|
-
return subEntityData[fieldName]
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
function getContextValue(contextParameterMap, propValue) {
|
|
448
|
-
let value = getLastNDate(propValue)
|
|
449
|
-
if (contextParameterMap) {
|
|
450
|
-
value = contextParameterMap[propValue]
|
|
451
|
-
}
|
|
452
|
-
return value
|
|
453
|
-
}
|
|
454
|
-
/**
|
|
455
|
-
* 获得最近n天的开始日期和结束日期集合
|
|
456
|
-
* @param {*} propValue currentTime/currentWeek/currentMonth/currentQuarter/currentYear/lastNDay:n
|
|
457
|
-
* @returns [startDate,endDate],例如:[2024/2/26 00:00:00,2023/3/3 23:59:59]
|
|
458
|
-
*/
|
|
459
|
-
export function getLastNDate(propValue) {
|
|
460
|
-
let value
|
|
461
|
-
if (propValue && propValue === 'currentTime') {
|
|
462
|
-
// 当前时间
|
|
463
|
-
value = new Date()
|
|
464
|
-
}
|
|
465
|
-
if (propValue && propValue === 'currentWeek') {
|
|
466
|
-
// 本周
|
|
467
|
-
value = getCurrentWeek()
|
|
468
|
-
}
|
|
469
|
-
if (propValue && propValue === 'currentMonth') {
|
|
470
|
-
// 本月
|
|
471
|
-
value = getCurrentMonth()
|
|
472
|
-
}
|
|
473
|
-
if (propValue && propValue === 'currentQuarter') {
|
|
474
|
-
// 本季度
|
|
475
|
-
value = getCurrentQuarter()
|
|
476
|
-
}
|
|
477
|
-
if (propValue && propValue === 'currentYear') {
|
|
478
|
-
// 本年
|
|
479
|
-
value = getCurrentYear()
|
|
480
|
-
}
|
|
481
|
-
if (propValue && propValue.indexOf('lastNDay') >= 0) {
|
|
482
|
-
// 最近n天 lastNDay:n,例如:lastNDay:5,表示最近5天
|
|
483
|
-
const n = propValue.substring(propValue.indexOf(':') + 1)
|
|
484
|
-
value = getLastNDay(parseInt(n))
|
|
485
|
-
}
|
|
486
|
-
return value
|
|
487
|
-
}
|
|
488
|
-
/**
|
|
489
|
-
* 获得当前周的周一和周日的的日期
|
|
490
|
-
* 例如:[2024/2/26 00:00:00,2023/3/3 23:59:59]
|
|
491
|
-
* @returns
|
|
492
|
-
*/
|
|
493
|
-
function getCurrentWeek() {
|
|
494
|
-
const new_Date = new Date() //获取本周一周日期
|
|
495
|
-
const timesStamp = new_Date.getTime()
|
|
496
|
-
const currenDay = new_Date.getDay()
|
|
497
|
-
// 周一
|
|
498
|
-
const monday = new Date(timesStamp + 24 * 60 * 60 * 1000 * (0 - ((currenDay + 6) % 7)))
|
|
499
|
-
// 周日
|
|
500
|
-
const sunday = new Date(timesStamp + 24 * 60 * 60 * 1000 * (6 - ((currenDay + 6) % 7)))
|
|
501
|
-
const startDate = monday.toLocaleDateString() + ' ' + monday.toLocaleTimeString()
|
|
502
|
-
const endDate = sunday.toLocaleDateString() + ' ' + sunday.toLocaleTimeString()
|
|
503
|
-
console.log(`getCurrentMonth从 ${startDate} 开始,到 ${endDate} 结束`)
|
|
504
|
-
return [monday, sunday]
|
|
505
|
-
}
|
|
506
|
-
/**
|
|
507
|
-
* 获得当前月第1天和最后1天的日期
|
|
508
|
-
* 例如:[2023/1/1 00:00:00,2023/1/31 23:59:59]
|
|
509
|
-
* @returns [xxx,xxx]
|
|
510
|
-
*/
|
|
511
|
-
function getCurrentMonth() {
|
|
512
|
-
// 创建一个新的Date对象,表示当前时间
|
|
513
|
-
const currentDate = new Date()
|
|
514
|
-
|
|
515
|
-
// 获取当前年份和月份
|
|
516
|
-
const year = currentDate.getFullYear() // 获取完整的四位年份
|
|
517
|
-
const month = currentDate.getMonth() + 1 // getMonth返回值范围为0-11,因此加上1得到真正的月份
|
|
518
|
-
|
|
519
|
-
// 设置起始日期为本月第一天
|
|
520
|
-
currentDate.setDate(1)
|
|
521
|
-
|
|
522
|
-
// 将起始日期格式化成字符串形式(YYYY-MM-DD)
|
|
523
|
-
const startDateStr = `${year}/${month < 10 ? '0' : ''}${month}/01`
|
|
524
|
-
|
|
525
|
-
// 设置结束日期为下个月第一天的前一天
|
|
526
|
-
currentDate.setMonth(currentDate.getMonth() + 2)
|
|
527
|
-
currentDate.setDate(0)
|
|
528
|
-
|
|
529
|
-
// 将结束日期格式化成字符串形式(YYYY-MM-DD)
|
|
530
|
-
const endDateStr = `${currentDate.getFullYear()}/${currentDate.getMonth() < 9 ? '0' : ''}${
|
|
531
|
-
currentDate.getMonth() + 1
|
|
532
|
-
}/01`
|
|
533
|
-
const startDate11 = new Date(Date.parse(startDateStr))
|
|
534
|
-
const endDate11 = new Date(new Date(Date.parse(endDateStr)).getTime() - 1000)
|
|
535
|
-
const startDate = startDate11.toLocaleDateString() + ' ' + startDate11.toLocaleTimeString()
|
|
536
|
-
const endDate = endDate11.toLocaleDateString() + ' ' + endDate11.toLocaleTimeString()
|
|
537
|
-
console.log(`getCurrentMonth从 ${startDate} 开始,到 ${endDate} 结束`)
|
|
538
|
-
return [startDate11, endDate11]
|
|
539
|
-
}
|
|
540
|
-
/**
|
|
541
|
-
* 获得当前季度第1天和最后一天的日期
|
|
542
|
-
* 例如:[2023/1/1 00:00:00,2023/3/31 23:59:59]
|
|
543
|
-
* @returns
|
|
544
|
-
*/
|
|
545
|
-
function getCurrentQuarter() {
|
|
546
|
-
const currentDate = new Date()
|
|
547
|
-
const quarterStartIndex = (currentDate.getMonth() + 3) % 12
|
|
548
|
-
let firstDayOfQuarter // 存放第一天的Date对象
|
|
549
|
-
if (currentDate.getMonth() < quarterStartIndex + 2) {
|
|
550
|
-
firstDayOfQuarter = new Date(currentDate.getFullYear(), quarterStartIndex, 1)
|
|
551
|
-
} else {
|
|
552
|
-
firstDayOfQuarter = new Date(currentDate.getFullYear() + 1, quarterStartIndex, 1)
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
let lastDayOfQuarter // 存放最后一天的Date对象
|
|
556
|
-
if (firstDayOfQuarter.getMonth() === 11) {
|
|
557
|
-
lastDayOfQuarter = new Date(firstDayOfQuarter.getFullYear() + 1, 0, 0)
|
|
558
|
-
} else {
|
|
559
|
-
lastDayOfQuarter = new Date(firstDayOfQuarter.getFullYear(), firstDayOfQuarter.getMonth() + 3, 0)
|
|
560
|
-
}
|
|
561
|
-
lastDayOfQuarter = new Date(lastDayOfQuarter.getTime() + 24 * 60 * 60 * 1000 - 1000)
|
|
562
|
-
const startDate = firstDayOfQuarter.toLocaleDateString() + ' ' + firstDayOfQuarter.toLocaleTimeString()
|
|
563
|
-
const endDate = lastDayOfQuarter.toLocaleDateString() + ' ' + lastDayOfQuarter.toLocaleTimeString()
|
|
564
|
-
console.log(`getCurrentQuarter从 ${startDate} 开始,到 ${endDate} 结束`)
|
|
565
|
-
return [firstDayOfQuarter, lastDayOfQuarter]
|
|
566
|
-
}
|
|
567
|
-
/**
|
|
568
|
-
* 获得本年的第1天和最后一天的日期
|
|
569
|
-
* 例如:[2023/1/1 00:00:00,2023/12/31 23:59:59]
|
|
570
|
-
* @returns
|
|
571
|
-
*/
|
|
572
|
-
function getCurrentYear() {
|
|
573
|
-
// 创建一个新的日期对象
|
|
574
|
-
const currentYear = new Date().getFullYear() // 获取当前年份
|
|
575
|
-
|
|
576
|
-
// 设置为当前年的1月1号(第一天)
|
|
577
|
-
let firstDayOfCurrentYear = new Date(currentYear, 0)
|
|
578
|
-
firstDayOfCurrentYear.setMonth(0, 1) // 将月份设置为0表示1月
|
|
579
|
-
|
|
580
|
-
// 设置为下一年的12月31号(最后一天)
|
|
581
|
-
let lastDayOfCurrentYear = new Date(currentYear + 1, 0)
|
|
582
|
-
lastDayOfCurrentYear = lastDayOfCurrentYear.getTime() - 1000
|
|
583
|
-
lastDayOfCurrentYear = new Date(lastDayOfCurrentYear)
|
|
584
|
-
const startDate = firstDayOfCurrentYear.toLocaleDateString() + ' ' + firstDayOfCurrentYear.toLocaleTimeString()
|
|
585
|
-
const endDate = lastDayOfCurrentYear.toLocaleDateString() + ' ' + lastDayOfCurrentYear.toLocaleTimeString()
|
|
586
|
-
console.log(`getCurrentYear从 ${startDate} 开始,到 ${endDate} 结束`)
|
|
587
|
-
return [firstDayOfCurrentYear, lastDayOfCurrentYear]
|
|
588
|
-
}
|
|
589
|
-
/**
|
|
590
|
-
* 获得最近n天的日期[n天前,当前日期]。
|
|
591
|
-
* 例如:[2024/2/25 00:00:00,2024/2/29 23:59:59]
|
|
592
|
-
* @param {} n
|
|
593
|
-
*/
|
|
594
|
-
function getLastNDay(n) {
|
|
595
|
-
let currentDate = new Date() // 创建一个表示今天的Date对象
|
|
596
|
-
let year = currentDate.getFullYear() // 获取完整的四位年份
|
|
597
|
-
let month = currentDate.getMonth() + 1 // getMonth返回值范围为0-11,因此加上1得到真正的月份
|
|
598
|
-
let date = currentDate.getDate() // getMonth返回值范围为0-11,因此加上1得到真正的月份
|
|
599
|
-
let startDateStr = `${year}/${month < 10 ? '0' : ''}${month}/${date}`
|
|
600
|
-
currentDate = new Date(Date.parse(startDateStr))
|
|
601
|
-
currentDate.setDate(currentDate.getDate() + 1)
|
|
602
|
-
currentDate = new Date(currentDate.getTime() - 1000)
|
|
603
|
-
|
|
604
|
-
let lastNDay = new Date() // 创建一个表示今天的Date对象
|
|
605
|
-
lastNDay.setDate(lastNDay.getDate() - (n - 1))
|
|
606
|
-
const lastNYear = lastNDay.getFullYear() // 获取完整的四位年份
|
|
607
|
-
const lastNMonth = lastNDay.getMonth() + 1 // getMonth返回值范围为0-11,因此加上1得到真正的月份
|
|
608
|
-
const lastNDate = lastNDay.getDate() // getMonth返回值范围为0-11,因此加上1得到真正的月份
|
|
609
|
-
const endtDateStr = `${lastNYear}/${lastNMonth < 10 ? '0' : ''}${lastNMonth}/${lastNDate}`
|
|
610
|
-
lastNDay = new Date(Date.parse(endtDateStr))
|
|
611
|
-
|
|
612
|
-
const startDate = lastNDay.toLocaleDateString() + ' ' + lastNDay.toLocaleTimeString()
|
|
613
|
-
const endDate = currentDate.toLocaleDateString() + ' ' + currentDate.toLocaleTimeString()
|
|
614
|
-
console.log(`getLastNDay从 ${startDate} 开始,到 ${endDate} 结束`)
|
|
615
|
-
retur[(lastNDay, currentDate)]
|
|
616
|
-
}
|
|
617
|
-
export function getPropValue(
|
|
618
|
-
propValue,
|
|
619
|
-
entity,
|
|
620
|
-
additionalParamMap,
|
|
621
|
-
contextParameterMap,
|
|
622
|
-
parentEntity,
|
|
623
|
-
subEntity,
|
|
624
|
-
task
|
|
625
|
-
) {
|
|
626
|
-
const pageContext = {
|
|
627
|
-
entity: {
|
|
628
|
-
data: entity,
|
|
629
|
-
context: contextParameterMap,
|
|
630
|
-
request: additionalParamMap,
|
|
631
|
-
parent: parentEntity,
|
|
632
|
-
row: subEntity,
|
|
633
|
-
task: task
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
return getPropValueNew(propValue, pageContext)
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
function getAdditionalParamMap(pageContext) {
|
|
640
|
-
if (pageContext && pageContext.entity) {
|
|
641
|
-
let additionalParamMap = { ...pageContext.entity.page }
|
|
642
|
-
if (!additionalParamMap) {
|
|
643
|
-
additionalParamMap = {}
|
|
644
|
-
}
|
|
645
|
-
const requestMap = pageContext.entity.request
|
|
646
|
-
if (requestMap) {
|
|
647
|
-
Object.assign(additionalParamMap, requestMap)
|
|
648
|
-
}
|
|
649
|
-
return additionalParamMap
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
export function formatCustomParams(customParams, pageContext, row) {
|
|
654
|
-
const formatCustomParams = {}
|
|
655
|
-
if (customParams && customParams.length > 0) {
|
|
656
|
-
customParams.forEach((param) => {
|
|
657
|
-
if (param.paramValue && param.paramValue.indexOf('${') === 0) {
|
|
658
|
-
// 表示是动态变量
|
|
659
|
-
const dynamicValue = getPropValueNew(param.paramValue, pageContext, row)
|
|
660
|
-
if (dynamicValue !== undefined && dynamicValue !== null) {
|
|
661
|
-
formatCustomParams[param.paramName] = dynamicValue
|
|
662
|
-
} else {
|
|
663
|
-
formatCustomParams[param.paramName] = null
|
|
664
|
-
}
|
|
665
|
-
} else {
|
|
666
|
-
formatCustomParams[param.paramName] = param.paramValue
|
|
667
|
-
}
|
|
668
|
-
})
|
|
669
|
-
}
|
|
670
|
-
return formatCustomParams
|
|
671
|
-
}
|
|
672
|
-
export function getPropValueNew(propValue, pageContext, row) {
|
|
673
|
-
let value = null
|
|
674
|
-
if (propValue && propValue !== null && propValue !== '') {
|
|
675
|
-
const entity = pageContext && pageContext.entity ? pageContext.entity.data : null
|
|
676
|
-
const pageVar = pageContext && pageContext.entity ? pageContext.entity.page : null
|
|
677
|
-
const additionalParamMap = getAdditionalParamMap(pageContext)
|
|
678
|
-
const contextParameterMap = pageContext && pageContext.entity ? pageContext.entity.context : null
|
|
679
|
-
const parentEntity =
|
|
680
|
-
pageContext && pageContext.entity
|
|
681
|
-
? pageContext.entity.parent
|
|
682
|
-
? pageContext.entity.parent
|
|
683
|
-
: pageContext.entity.data
|
|
684
|
-
: null
|
|
685
|
-
const subEntity = pageContext && pageContext.entity ? pageContext.entity.row : null
|
|
686
|
-
const task = pageContext && pageContext.entity ? pageContext.entity.task : null
|
|
687
|
-
const system = pageContext && pageContext.entity ? pageContext.entity.system : null
|
|
688
|
-
if (propValue === 'null') {
|
|
689
|
-
value = null
|
|
690
|
-
} else if (propValue.startsWith('${row.')) {
|
|
691
|
-
// 处理表格行数据 ${row.fieldName}
|
|
692
|
-
if (row) {
|
|
693
|
-
const propName = propValue.replace('${row.', '').replace('}', '')
|
|
694
|
-
value = getEntityFieldValue(row, propName)
|
|
695
|
-
}
|
|
696
|
-
} else if (propValue.indexOf('${page.') === 0) {
|
|
697
|
-
const variable = propValue.replace('${page.', '').replace('}', '')
|
|
698
|
-
value = pageVar ? pageVar[variable] : null
|
|
699
|
-
} else if (
|
|
700
|
-
propValue.includes('${context.') ||
|
|
701
|
-
propValue.includes('${request.') ||
|
|
702
|
-
propValue.includes('${obj.') ||
|
|
703
|
-
propValue.includes('${data.')
|
|
704
|
-
) {
|
|
705
|
-
// 填写的固定值
|
|
706
|
-
if (propValue.includes('${context.')) {
|
|
707
|
-
propValue = propValue.replace('${context.', '').replace('}', '')
|
|
708
|
-
value = getContextValue(contextParameterMap, propValue)
|
|
709
|
-
} else if (propValue.includes('${request.') && propValue !== '${request.term}') {
|
|
710
|
-
// ${request.term}表示页面中手动输入的值
|
|
711
|
-
propValue = propValue.replace('${request.', '').replace('}', '')
|
|
712
|
-
if (
|
|
713
|
-
additionalParamMap &&
|
|
714
|
-
additionalParamMap != null &&
|
|
715
|
-
Object.keys(additionalParamMap).indexOf(propValue) >= 0 &&
|
|
716
|
-
additionalParamMap[propValue] &&
|
|
717
|
-
additionalParamMap[propValue] !== null
|
|
718
|
-
) {
|
|
719
|
-
value = additionalParamMap[propValue]
|
|
720
|
-
} else {
|
|
721
|
-
value = null
|
|
722
|
-
}
|
|
723
|
-
} else if (propValue.includes('${obj.')) {
|
|
724
|
-
if (entity === undefined || entity == null) {
|
|
725
|
-
value = null
|
|
726
|
-
} else {
|
|
727
|
-
const propName = propValue.replace('${obj.', '').replace('}', '')
|
|
728
|
-
value = getEntityFieldValue(entity, propName)
|
|
729
|
-
}
|
|
730
|
-
} else if (propValue.includes('${data.')) {
|
|
731
|
-
if (entity === undefined || entity == null) {
|
|
732
|
-
value = null
|
|
733
|
-
} else {
|
|
734
|
-
const propName = propValue.replace('${data.', '').replace('}', '')
|
|
735
|
-
value = getEntityFieldValue(entity, propName)
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
} else if (propValue.includes('${parent.')) {
|
|
739
|
-
if (parentEntity === undefined || parentEntity == null) {
|
|
740
|
-
value = null
|
|
741
|
-
} else {
|
|
742
|
-
const propName = propValue.replace('${parent.', '').replace('}', '')
|
|
743
|
-
value = getEntityFieldValue(parentEntity, propName)
|
|
744
|
-
}
|
|
745
|
-
} else if (propValue.includes('${system.')) {
|
|
746
|
-
if (system === undefined || system == null) {
|
|
747
|
-
value = null
|
|
748
|
-
} else {
|
|
749
|
-
const propName = propValue.replace('${system.', '').replace('}', '')
|
|
750
|
-
value = getEntityFieldValue(system, propName)
|
|
751
|
-
}
|
|
752
|
-
} else if (propValue.includes('${task.')) {
|
|
753
|
-
if (task === undefined || task == null) {
|
|
754
|
-
value = null
|
|
755
|
-
} else {
|
|
756
|
-
const propName = propValue.replace('${task.', '').replace('}', '')
|
|
757
|
-
value = getEntityFieldValue(task, propName)
|
|
758
|
-
}
|
|
759
|
-
} else if (propValue.includes('${subObj.')) {
|
|
760
|
-
if (subEntity === undefined || subEntity == null) {
|
|
761
|
-
value = null
|
|
762
|
-
} else {
|
|
763
|
-
const propName = propValue.replace('${subObj.', '').replace('}', '')
|
|
764
|
-
value = getEntityFieldValue(subEntity, propName)
|
|
765
|
-
}
|
|
766
|
-
} else if (propValue.includes('${input.')) {
|
|
767
|
-
value = propValue.replace('${input.', '').replace('}', '')
|
|
768
|
-
} else if (propValue.includes('${fixed.')) {
|
|
769
|
-
value = propValue.replace('${fixed.', '').replace('}', '')
|
|
770
|
-
} else {
|
|
771
|
-
value = propValue
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
return value
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
/**
|
|
778
|
-
* 解析条件,例如:${obj.menu_code}-#-#${input.---}-#-#${context.currentTransactor}
|
|
779
|
-
* @param {*} conditionValue
|
|
780
|
-
* @param {*} entity
|
|
781
|
-
* @param {*} additionalParameter
|
|
782
|
-
* @param {*} contextParameter
|
|
783
|
-
* @returns
|
|
784
|
-
*/
|
|
785
|
-
export function analysisValue(conditionValue, entity, additionalParameter, contextParameter, pageContext) {
|
|
786
|
-
if (!conditionValue) {
|
|
787
|
-
return
|
|
788
|
-
}
|
|
789
|
-
let label = ''
|
|
790
|
-
const split = conditionValue.split('-#-#')
|
|
791
|
-
if (split != null && split.length > 0) {
|
|
792
|
-
split.forEach((item) => {
|
|
793
|
-
let value
|
|
794
|
-
if (pageContext) {
|
|
795
|
-
value = getPropValueNew(item, pageContext, entity)
|
|
796
|
-
} else {
|
|
797
|
-
value = getPropValue(item, entity, additionalParameter, contextParameter)
|
|
798
|
-
}
|
|
799
|
-
if (!value || value === null) {
|
|
800
|
-
value = ''
|
|
801
|
-
}
|
|
802
|
-
label += value
|
|
803
|
-
})
|
|
804
|
-
}
|
|
805
|
-
return label
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
/**
|
|
809
|
-
* 设置entity中某属性的值,处理子对象的情况。使用该方法,性能可能有问题
|
|
810
|
-
* @param {*} entity
|
|
811
|
-
* @param {*} prop
|
|
812
|
-
* @param {*} value
|
|
813
|
-
*/
|
|
814
|
-
export function setEntityFieldValue(entity, prop, value) {
|
|
815
|
-
if (prop && entity) {
|
|
816
|
-
if (prop && prop.indexOf('.') > 0) {
|
|
817
|
-
const parentObj = getParentObjectUtil(prop, entity)
|
|
818
|
-
if (parentObj) {
|
|
819
|
-
const subProp = prop.substring(prop.lastIndexOf('.') + 1)
|
|
820
|
-
if (parentObj[subProp] === undefined) {
|
|
821
|
-
// 动态对象属性赋值,防止属性不存在,导致属性无法赋值问题
|
|
822
|
-
parentObj[prop.substring(prop.lastIndexOf('.') + 1)] = value
|
|
823
|
-
} else {
|
|
824
|
-
// 静态对象属性赋值,提高性能
|
|
825
|
-
parentObj[subProp] = value
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
} else {
|
|
829
|
-
if (entity[prop] === undefined || entity[prop] === null) {
|
|
830
|
-
// 动态对象属性赋值,防止属性不存在,导致属性无法赋值问题
|
|
831
|
-
entity[prop] = value
|
|
832
|
-
} else {
|
|
833
|
-
// 静态对象属性赋值,提高性能
|
|
834
|
-
entity[prop] = value
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
/**
|
|
841
|
-
* 获得字段的值,不需要处理大小写转换
|
|
842
|
-
* @param {*} entity
|
|
843
|
-
* @param {*} prop
|
|
844
|
-
* @returns
|
|
845
|
-
*/
|
|
846
|
-
export function getEntityFieldValueWithOutCase(entity, prop) {
|
|
847
|
-
if (prop && prop.indexOf('.') > 0) {
|
|
848
|
-
const parentOjbect = getParentObjectUtil(prop, entity)
|
|
849
|
-
const modelName = prop.substring(prop.lastIndexOf('.') + 1)
|
|
850
|
-
return parentOjbect[modelName]
|
|
851
|
-
} else {
|
|
852
|
-
return entity[prop]
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
/**
|
|
857
|
-
* 获得实体entity中某属性的值,处理子表对象的情况
|
|
858
|
-
* @param {*} entity
|
|
859
|
-
* @param {*} prop
|
|
860
|
-
* @returns
|
|
861
|
-
*/
|
|
862
|
-
export function getEntityFieldValue(entity, prop, isLowerCase) {
|
|
863
|
-
if (!prop) {
|
|
864
|
-
return null
|
|
865
|
-
}
|
|
866
|
-
let value = getEntityFieldValueWithCase(entity, prop)
|
|
867
|
-
if (value === undefined || value === null) {
|
|
868
|
-
// 兼容mysql数据库
|
|
869
|
-
value = getEntityFieldValueWithCase(entity, prop.toLowerCase())
|
|
870
|
-
}
|
|
871
|
-
if (value === undefined || (value === null && isLowerCase === undefined)) {
|
|
872
|
-
// 兼容oracle数据库
|
|
873
|
-
value = getEntityFieldValueWithCase(entity, prop.toUpperCase())
|
|
874
|
-
}
|
|
875
|
-
return value
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
function getEntityFieldValueWithCase(entity, prop) {
|
|
879
|
-
if (prop && prop.indexOf('.') > 0) {
|
|
880
|
-
const parentOjbect = getParentObjectUtil(prop, entity)
|
|
881
|
-
const modelName = prop.substring(prop.lastIndexOf('.') + 1)
|
|
882
|
-
return parentOjbect[modelName]
|
|
883
|
-
} else {
|
|
884
|
-
return entity[prop]
|
|
885
|
-
}
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
export function getParentObjectUtil(prop, entity) {
|
|
889
|
-
const nestedProp = prop.split('.')
|
|
890
|
-
// 属性只有一个时父对象就是models
|
|
891
|
-
if (nestedProp.length === 1) {
|
|
892
|
-
return entity
|
|
893
|
-
} else {
|
|
894
|
-
let parentObject
|
|
895
|
-
// 属性超过2个时先找到最后一层属性的父对象
|
|
896
|
-
for (let i = 0; i < nestedProp.length - 1; i++) {
|
|
897
|
-
if (i === 0) {
|
|
898
|
-
parentObject = getParentModelProp(nestedProp[i], entity)
|
|
899
|
-
} else {
|
|
900
|
-
parentObject = getParentModelProp(nestedProp[i], parentObject)
|
|
901
|
-
}
|
|
902
|
-
}
|
|
903
|
-
return parentObject
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
function getParentModelProp(prop, parentObj) {
|
|
908
|
-
let myPparentObject = getParentModelPropWithCase(prop, parentObj)
|
|
909
|
-
if (myPparentObject === undefined) {
|
|
910
|
-
// 兼容mysql数据库
|
|
911
|
-
myPparentObject = getParentModelPropWithCase(prop.toLowerCase(), parentObj)
|
|
912
|
-
}
|
|
913
|
-
if (myPparentObject === undefined) {
|
|
914
|
-
// 兼容oracle数据库
|
|
915
|
-
myPparentObject = getParentModelPropWithCase(prop.toUpperCase(), parentObj)
|
|
916
|
-
}
|
|
917
|
-
return myPparentObject
|
|
918
|
-
}
|
|
919
|
-
|
|
920
|
-
function getParentModelPropWithCase(prop, parentObj) {
|
|
921
|
-
if (!parentObj) {
|
|
922
|
-
parentObj = {}
|
|
923
|
-
}
|
|
924
|
-
if (!parentObj[prop] && !parentObj[prop.toUpperCase()]) {
|
|
925
|
-
parentObj[prop] = {}
|
|
926
|
-
}
|
|
927
|
-
return parentObj[prop]
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
/**
|
|
931
|
-
* 获得系统信息
|
|
932
|
-
* @param {*}} systemCode
|
|
933
|
-
* @returns
|
|
934
|
-
*/
|
|
935
|
-
export function findSystemInfoByCode(systemCode) {
|
|
936
|
-
return new Promise((resolve, reject) => {
|
|
937
|
-
if (!systemCode) {
|
|
938
|
-
systemCode = window.$vueApp.config.globalProperties.systemCode
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
window.$vueApp.config.globalProperties.$http
|
|
942
|
-
.get(window.$vueApp.config.globalProperties.baseAPI + '/component/business-systems/' + systemCode)
|
|
943
|
-
.then((system) => {
|
|
944
|
-
if (system) {
|
|
945
|
-
resolve({
|
|
946
|
-
zh_CN: system.name,
|
|
947
|
-
en_US: system.enName,
|
|
948
|
-
frontendUrl: system.frontendUrl
|
|
949
|
-
})
|
|
950
|
-
} else {
|
|
951
|
-
resolve('系统:' + systemCode + '不存在')
|
|
952
|
-
}
|
|
953
|
-
})
|
|
954
|
-
.catch((error) => {
|
|
955
|
-
reject(error)
|
|
956
|
-
})
|
|
957
|
-
})
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
export function getPropNameWhenJoinTable(prop, isJoinTable, tableName) {
|
|
961
|
-
if (prop && isJoinTable !== undefined && isJoinTable === true) {
|
|
962
|
-
// 关联表时将点改成下划线,如果没点,则表示是主表字段,拼接主表tableName,因为列表组件中是这样处理的
|
|
963
|
-
const replaceDot = '__'
|
|
964
|
-
if (prop.indexOf('.') > 0) {
|
|
965
|
-
prop = prop.replace('.', replaceDot)
|
|
966
|
-
} else {
|
|
967
|
-
if (tableName && tableName !== null && tableName !== '' && prop.indexOf(tableName + replaceDot) < 0) {
|
|
968
|
-
// 如果属性名没有拼接表名才需要拼接
|
|
969
|
-
prop = tableName + replaceDot + prop
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
}
|
|
973
|
-
return prop
|
|
974
|
-
}
|
|
975
|
-
|
|
976
|
-
export function isImage(fileName) {
|
|
977
|
-
// const fileType = fileName.substring(fileName.lastIndexOf('.'), fileName.length).toLowerCase()
|
|
978
|
-
// const imageTypes = ['.jpg', '.JPG', '.png', '.bmp', '.BMP', '.jpeg', '.gif', '.psd', '.tif', '.tga', '.svg', '.eps']
|
|
979
|
-
// const index = imageTypes.indexOf(fileType)
|
|
980
|
-
if (fileName && /\.(jpg|JPG|jpeg|JPEG|png|PNG|gif|GIF|bmp|BMP|psd|PSD|tif|TIF)$/.test(fileName)) {
|
|
981
|
-
return true
|
|
982
|
-
} else {
|
|
983
|
-
return false
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
export function watchPageContextDynamicVariable(that, pageContext, variable, callback) {
|
|
988
|
-
const match = variable.match(/\${(.*?)}/)
|
|
989
|
-
if (!match) return
|
|
990
|
-
const path = match ? match[1].split('.') : []
|
|
991
|
-
if (path && path.length > 0) {
|
|
992
|
-
// 监听 pageContext.entity[type][field][xxx]... 的变化
|
|
993
|
-
that.$watch(
|
|
994
|
-
() => path.reduce((obj, key) => obj[key], pageContext.entity),
|
|
995
|
-
(newVal, oldVal) => {
|
|
996
|
-
callback(newVal, oldVal)
|
|
997
|
-
}
|
|
998
|
-
)
|
|
999
|
-
}
|
|
1000
|
-
}
|