agilebuilder-ui 1.1.65-tmp30 → 1.1.65-tmp31
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 +5 -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/common-util.js
DELETED
|
@@ -1,1019 +0,0 @@
|
|
|
1
|
-
import * as Vue from 'vue'
|
|
2
|
-
import { getToken, getLanguage, getAllLanguages, setAllLanguages } from './auth'
|
|
3
|
-
import { v4 as uuidv4 } from 'uuid'
|
|
4
|
-
import { getCookieCache } from './auth'
|
|
5
|
-
import i18nUtil from './i18n-util'
|
|
6
|
-
import { Base64 } from 'js-base64'
|
|
7
|
-
import { getWatermarkSetting } from './watermark'
|
|
8
|
-
import { cacheAllGlobalPropCache, GLOBAL_PROP } from './global-prop'
|
|
9
|
-
import { removeAllSystemPermissions, setPermissions } from './permissionAuth'
|
|
10
|
-
import ssoService from '../api/sso-service'
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 获得相对地址
|
|
14
|
-
*/
|
|
15
|
-
export function getRelativeBaseUrl(originalBaseUrl) {
|
|
16
|
-
if (!originalBaseUrl) {
|
|
17
|
-
return originalBaseUrl
|
|
18
|
-
}
|
|
19
|
-
if (
|
|
20
|
-
window.$vueApp.config.globalProperties.projectModel === undefined ||
|
|
21
|
-
window.$vueApp.config.globalProperties.projectModel !== 'developing.model'
|
|
22
|
-
) {
|
|
23
|
-
// 表示是产品模式,使用相对地址访问后台
|
|
24
|
-
let relativeUrl = getUrlPrefix(location.href)
|
|
25
|
-
window.sessionStorage.setItem('relativeUrl', relativeUrl)
|
|
26
|
-
// console.log('getRelativeBaseUrl--relativeUrl---originalBaseUrl=',relativeUrl,originalBaseUrl)
|
|
27
|
-
if (relativeUrl && originalBaseUrl) {
|
|
28
|
-
// console.log('getRelativeBaseUrl---originalBaseUrl=',originalBaseUrl)
|
|
29
|
-
let baseUrlSuffix = ''
|
|
30
|
-
const baseUrls = originalBaseUrl.split('/')
|
|
31
|
-
// console.log('getRelativeBaseUrl---baseUrls=',baseUrls)
|
|
32
|
-
if (baseUrls.length >= 3) {
|
|
33
|
-
const baseUrlPrefix = baseUrls[0] + '//' + baseUrls[2]
|
|
34
|
-
// console.log('getRelativeBaseUrl---baseUrlPrefix=',baseUrlPrefix)
|
|
35
|
-
baseUrlSuffix = originalBaseUrl.substring(originalBaseUrl.indexOf(baseUrlPrefix) + baseUrlPrefix.length)
|
|
36
|
-
// console.log('getRelativeBaseUrl---baseUrlSuffix=',baseUrlSuffix)
|
|
37
|
-
}
|
|
38
|
-
if (relativeUrl.lastIndexOf('/') === relativeUrl.length - 1) {
|
|
39
|
-
// 表示以“/”结尾,去掉最后一个“/”
|
|
40
|
-
relativeUrl = relativeUrl.substring(0, relativeUrl.lastIndexOf('/'))
|
|
41
|
-
}
|
|
42
|
-
// console.log('getRelativeBaseUrl---relativeUrl=',relativeUrl)
|
|
43
|
-
if (baseUrlSuffix) {
|
|
44
|
-
return relativeUrl + baseUrlSuffix
|
|
45
|
-
} else {
|
|
46
|
-
return relativeUrl
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return originalBaseUrl
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* 获得url前缀,
|
|
55
|
-
* 例如地址栏地址为:http://localhost:8080/demo/#/
|
|
56
|
-
* 返回的应该是http://localhost:8080
|
|
57
|
-
*/
|
|
58
|
-
function getUrlPrefix(url) {
|
|
59
|
-
// console.log('getUrlPrefix---url=',url)
|
|
60
|
-
const hrefs = url.split('#')
|
|
61
|
-
if (hrefs.length > 0) {
|
|
62
|
-
// 前端url,例如:http://localhost:8080/demo/
|
|
63
|
-
const frontUrl = hrefs[0]
|
|
64
|
-
let rootUrl = frontUrl
|
|
65
|
-
const frontUrls = frontUrl.split('/')
|
|
66
|
-
if (frontUrls.length >= 3) {
|
|
67
|
-
// 获得http://localhost:8080
|
|
68
|
-
rootUrl = frontUrls[0] + '//' + frontUrls[2] + '/'
|
|
69
|
-
}
|
|
70
|
-
// console.log('getUrlPrefix---rootUrl1=',rootUrl)
|
|
71
|
-
return rootUrl
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* 替换路径前缀,例如:http://localhost/demo/#/notice/task需要替换为http://127.0.0.1/demo/#/notice/task
|
|
77
|
-
* @param {*} originalUrl 原地址
|
|
78
|
-
* @param {*} locationUrl 地址栏的地址
|
|
79
|
-
*/
|
|
80
|
-
export function replacePrefix(originalUrl) {
|
|
81
|
-
if (
|
|
82
|
-
window.$vueApp.config.globalProperties.projectModel === undefined ||
|
|
83
|
-
window.$vueApp.config.globalProperties.projectModel !== 'developing.model'
|
|
84
|
-
) {
|
|
85
|
-
const locationUrl = location.href
|
|
86
|
-
let newUrl = originalUrl
|
|
87
|
-
// console.log('replacePrefix---originalUrl=',originalUrl)
|
|
88
|
-
const orginalPrefixUrl = getUrlPrefix(originalUrl)
|
|
89
|
-
// console.log('replacePrefix---orginalPrefixUrl=',orginalPrefixUrl)
|
|
90
|
-
let locationPrefixUrl = getUrlPrefix(locationUrl)
|
|
91
|
-
// console.log('replacePrefix---locationPrefixUrl=',locationPrefixUrl)
|
|
92
|
-
if (orginalPrefixUrl !== locationPrefixUrl) {
|
|
93
|
-
// 获得/demo/#/notice/task需要替换为http://127.0.0.1/demo/#/notice/task
|
|
94
|
-
let suffixUrl = originalUrl.substring(originalUrl.indexOf(orginalPrefixUrl) + orginalPrefixUrl.length)
|
|
95
|
-
if (suffixUrl.indexOf('/') !== 0) {
|
|
96
|
-
suffixUrl = '/' + suffixUrl
|
|
97
|
-
}
|
|
98
|
-
// console.log('replacePrefix---suffixUrl=',suffixUrl)
|
|
99
|
-
if (locationPrefixUrl.lastIndexOf('/') === locationPrefixUrl.length - 1) {
|
|
100
|
-
// 表示以“/”结尾,去掉最后一个“/”
|
|
101
|
-
locationPrefixUrl = locationPrefixUrl.substring(0, locationPrefixUrl.lastIndexOf('/'))
|
|
102
|
-
}
|
|
103
|
-
// console.log('replacePrefix---locationPrefixUrl2=',locationPrefixUrl)
|
|
104
|
-
newUrl = locationPrefixUrl + suffixUrl
|
|
105
|
-
}
|
|
106
|
-
// console.log('replacePrefix---newUrl=',newUrl)
|
|
107
|
-
return newUrl
|
|
108
|
-
}
|
|
109
|
-
return originalUrl
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// 获得门户前端访问路径
|
|
113
|
-
function getPortalFrontendUrl() {
|
|
114
|
-
return window.$vueApp.config.globalProperties.$http.get(
|
|
115
|
-
window.$vueApp.config.globalProperties.baseAPI + '/api/portal-frontend-url'
|
|
116
|
-
)
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// 获得登录页面地址
|
|
120
|
-
export function getLoginUrl() {
|
|
121
|
-
return new Promise((resolve, reject) => {
|
|
122
|
-
const href = window.location.href
|
|
123
|
-
let systemPath = href
|
|
124
|
-
let routerPath = ''
|
|
125
|
-
let param = ''
|
|
126
|
-
if (href.indexOf('#/') > 0 && href.indexOf('#/login') < 0) {
|
|
127
|
-
systemPath = href.substring(0, href.indexOf('#'))
|
|
128
|
-
const suffix = href.substring(href.indexOf('#') + 1)
|
|
129
|
-
routerPath = suffix
|
|
130
|
-
if (suffix.indexOf('?') > 0) {
|
|
131
|
-
// 如果包含参数,则需要截取参数
|
|
132
|
-
routerPath = suffix.substring(0, suffix.indexOf('?'))
|
|
133
|
-
param = suffix.substring(suffix.indexOf('?') + 1)
|
|
134
|
-
}
|
|
135
|
-
} else {
|
|
136
|
-
systemPath = null
|
|
137
|
-
}
|
|
138
|
-
const buildLoginUrl = (portalUrl = '') => {
|
|
139
|
-
let loginUrl = portalUrl + '#/login'
|
|
140
|
-
if (systemPath) {
|
|
141
|
-
loginUrl = loginUrl + '?systemPath=' + systemPath
|
|
142
|
-
}
|
|
143
|
-
if (routerPath) {
|
|
144
|
-
if (loginUrl.indexOf('?') > 0) {
|
|
145
|
-
loginUrl = loginUrl + '&routerPath=' + routerPath
|
|
146
|
-
} else {
|
|
147
|
-
loginUrl = loginUrl + '?routerPath=' + routerPath
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
if (param) {
|
|
151
|
-
if (loginUrl.indexOf('?') > 0) {
|
|
152
|
-
loginUrl = loginUrl + '&' + param
|
|
153
|
-
} else {
|
|
154
|
-
loginUrl = loginUrl + '?' + param
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
return replacePrefix(loginUrl)
|
|
158
|
-
}
|
|
159
|
-
if (import.meta.env.DEV) {
|
|
160
|
-
resolve(buildLoginUrl())
|
|
161
|
-
} else {
|
|
162
|
-
getPortalFrontendUrl()
|
|
163
|
-
.then((portalUrl) => resolve(buildLoginUrl(portalUrl)))
|
|
164
|
-
.catch((error) => {
|
|
165
|
-
reject(error)
|
|
166
|
-
})
|
|
167
|
-
}
|
|
168
|
-
})
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
export function isShowMenuRoute() {
|
|
172
|
-
// 是否显示菜单路径,默认是不显示
|
|
173
|
-
let showMenuRoute = window.$vueApp.config.globalProperties.showMenuRoute
|
|
174
|
-
if (showMenuRoute === undefined) {
|
|
175
|
-
showMenuRoute = 'false'
|
|
176
|
-
}
|
|
177
|
-
return showMenuRoute === 'true'
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
export function isShowSystemMenu() {
|
|
181
|
-
// 左侧菜单最上方是否显示系统菜单,默认是不显示
|
|
182
|
-
let showSystemMenu = window.$vueApp.config.globalProperties.showSystemMenu
|
|
183
|
-
if (showSystemMenu === undefined) {
|
|
184
|
-
showSystemMenu = 'false'
|
|
185
|
-
}
|
|
186
|
-
return showSystemMenu === 'true'
|
|
187
|
-
}
|
|
188
|
-
// 页面配置跳转页面使用的该方法,开发模式时需要用这个方法,否则跳转的页面是服务器页面
|
|
189
|
-
export function getSystemFrontendUrl(frontendUrl) {
|
|
190
|
-
if (
|
|
191
|
-
window.$vueApp.config.globalProperties.projectModel &&
|
|
192
|
-
window.$vueApp.config.globalProperties.projectModel === 'developing.model' &&
|
|
193
|
-
window.$vueApp.config.globalProperties.frontUrl
|
|
194
|
-
) {
|
|
195
|
-
return window.$vueApp.config.globalProperties.frontUrl
|
|
196
|
-
} else {
|
|
197
|
-
return getRelativeBaseUrl(frontendUrl)
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// 开发模式时,传进来的路径是什么,就返回什么。附件预览时会需要,传进来的是portalUrl,返回portalUrl就行了。
|
|
202
|
-
export function getSystemFrontendUrlWith(frontendUrl) {
|
|
203
|
-
if (
|
|
204
|
-
window.$vueApp.config.globalProperties.projectModel &&
|
|
205
|
-
window.$vueApp.config.globalProperties.projectModel === 'developing.model'
|
|
206
|
-
) {
|
|
207
|
-
if(frontendUrl){
|
|
208
|
-
return frontendUrl
|
|
209
|
-
} else {
|
|
210
|
-
return window.$vueApp.config.globalProperties.frontUrl
|
|
211
|
-
}
|
|
212
|
-
} else {
|
|
213
|
-
return getRelativeBaseUrl(frontendUrl)
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
export function getSystemBackendUrl(backendUrl) {
|
|
218
|
-
if (
|
|
219
|
-
window.$vueApp.config.globalProperties.projectModel &&
|
|
220
|
-
window.$vueApp.config.globalProperties.projectModel === 'developing.model' &&
|
|
221
|
-
window.$vueApp.config.globalProperties.baseURL
|
|
222
|
-
) {
|
|
223
|
-
return window.$vueApp.config.globalProperties.baseURL
|
|
224
|
-
} else {
|
|
225
|
-
return getRelativeBaseUrl(backendUrl)
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
/**
|
|
229
|
-
* 是否是平台系统
|
|
230
|
-
* @param {*} systemCode
|
|
231
|
-
* @returns
|
|
232
|
-
*/
|
|
233
|
-
export function isPlateSys(systemCode) {
|
|
234
|
-
if (
|
|
235
|
-
systemCode &&
|
|
236
|
-
(systemCode === 'agilebuilder' ||
|
|
237
|
-
systemCode === 'portal' ||
|
|
238
|
-
systemCode === 'mms' ||
|
|
239
|
-
systemCode === 'task' ||
|
|
240
|
-
systemCode === 'wf' ||
|
|
241
|
-
systemCode === 'dc' ||
|
|
242
|
-
systemCode === 'mc' ||
|
|
243
|
-
systemCode === 'mobile' ||
|
|
244
|
-
systemCode === 'acs' ||
|
|
245
|
-
systemCode === 'bs' ||
|
|
246
|
-
systemCode === 'pcm' ||
|
|
247
|
-
systemCode === 'hc' ||
|
|
248
|
-
systemCode === 'devp')
|
|
249
|
-
) {
|
|
250
|
-
return true
|
|
251
|
-
} else {
|
|
252
|
-
return false
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
export function getServerConfigUtil(http) {
|
|
257
|
-
return new Promise((resolve, reject) => {
|
|
258
|
-
let timestamp = '1'
|
|
259
|
-
try {
|
|
260
|
-
if (__BUILD_TIME__) {
|
|
261
|
-
timestamp = __BUILD_TIME__
|
|
262
|
-
}
|
|
263
|
-
} catch (error) {
|
|
264
|
-
console.log('__BUILD_TIME__ not define')
|
|
265
|
-
}
|
|
266
|
-
http.get('./server-config.json?t=' + timestamp).then((result) => {
|
|
267
|
-
const config = result
|
|
268
|
-
for (const key in config) {
|
|
269
|
-
window.$vueApp.config.globalProperties[key] = config[key]
|
|
270
|
-
}
|
|
271
|
-
window.$vueApp.config.globalProperties.baseURL = getRelativeBaseUrl(
|
|
272
|
-
window.$vueApp.config.globalProperties.baseURL
|
|
273
|
-
)
|
|
274
|
-
window.$vueApp.config.globalProperties.baseAPI = getRelativeBaseUrl(
|
|
275
|
-
window.$vueApp.config.globalProperties.baseAPI
|
|
276
|
-
)
|
|
277
|
-
localStorage.setItem('_baseAPI_', window.$vueApp.config.globalProperties.baseAPI)
|
|
278
|
-
localStorage.setItem('_amb_projectModel_', window.$vueApp.config.globalProperties.projectModel)
|
|
279
|
-
// 插入图标css样式文件
|
|
280
|
-
insertFontIconCss(config)
|
|
281
|
-
// 第3方集成js
|
|
282
|
-
insertThirdLoginJs(config)
|
|
283
|
-
resolve()
|
|
284
|
-
})
|
|
285
|
-
})
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
export function insertFontIconCss(config) {
|
|
289
|
-
if (!window.insertCssFile) {
|
|
290
|
-
return
|
|
291
|
-
}
|
|
292
|
-
if (!config) {
|
|
293
|
-
config = window.$vueApp.config.globalProperties
|
|
294
|
-
}
|
|
295
|
-
let timestamp = '1'
|
|
296
|
-
try {
|
|
297
|
-
if (__BUILD_TIME__) {
|
|
298
|
-
timestamp = __BUILD_TIME__
|
|
299
|
-
}
|
|
300
|
-
} catch (error) {
|
|
301
|
-
console.log('__BUILD_TIME__ not define')
|
|
302
|
-
}
|
|
303
|
-
if (config.fontIconAddress && window.insertCssFile) {
|
|
304
|
-
window.insertCssFile(`${config.fontIconAddress}/iconfont.css?t=${timestamp}`)
|
|
305
|
-
}
|
|
306
|
-
if (config.fontIconAddress && window.insertCssFile) {
|
|
307
|
-
window.insertCssFile(`${config.fontIconAddress}-color/iconfont.css?t=${timestamp}`)
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
export function insertThirdLoginJs(config) {
|
|
312
|
-
if (!window.insertJsFile) {
|
|
313
|
-
return
|
|
314
|
-
}
|
|
315
|
-
if (!config) {
|
|
316
|
-
config = window.$vueApp.config.globalProperties
|
|
317
|
-
}
|
|
318
|
-
if (!config || (config.systemCode !== 'portal' && config.systemCode !== 'devp')) {
|
|
319
|
-
return
|
|
320
|
-
}
|
|
321
|
-
// 只有portal和devp需要动态添加这些js
|
|
322
|
-
// userName,dingtalk,feishu,qiwei
|
|
323
|
-
if (!config.loginMethod || config.loginMethod.indexOf('dingtalk') >= 0) {
|
|
324
|
-
window.insertJsFile(`https://g.alicdn.com/dingding/h5-dingtalk-login/0.21.0/ddlogin.js`)
|
|
325
|
-
}
|
|
326
|
-
if (!config.loginMethod || config.loginMethod.indexOf('feishu') >= 0) {
|
|
327
|
-
window.insertJsFile(
|
|
328
|
-
`https://lf-package-cn.feishucdn.com/obj/feishu-static/lark/passport/qrcode/LarkSSOSDKWebQRCode-1.0.3.js`
|
|
329
|
-
)
|
|
330
|
-
}
|
|
331
|
-
if (!config.loginMethod || config.loginMethod.indexOf('qiwei') >= 0) {
|
|
332
|
-
window.insertJsFile(`https://wwcdn.weixin.qq.com/node/open/js/wecom-jssdk-2.3.1.js`)
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* postmessage跨域传message时获得orign路径使用
|
|
337
|
-
* @returns orign路径
|
|
338
|
-
*/
|
|
339
|
-
export function getOrignUrl() {
|
|
340
|
-
const url = window.location.href
|
|
341
|
-
let orignUrl
|
|
342
|
-
if (url && url.indexOf('/') > 0) {
|
|
343
|
-
const urls = url.split('/')
|
|
344
|
-
orignUrl = urls[0] + '//' + urls[2]
|
|
345
|
-
}
|
|
346
|
-
return orignUrl
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
export function isPromise(p) {
|
|
350
|
-
return p && Object.prototype.toString.call(p) === '[object Promise]'
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* 获得UTC时区
|
|
354
|
-
* @returns 时区
|
|
355
|
-
*/
|
|
356
|
-
export function getTimeZone() {
|
|
357
|
-
const dateStr = new Date() + ''
|
|
358
|
-
let timeZone = ''
|
|
359
|
-
if (dateStr.indexOf('GMT') > 0) {
|
|
360
|
-
const timeZoneSuffix = dateStr.substring(dateStr.indexOf('GMT') + 3, dateStr.indexOf('(')).trim()
|
|
361
|
-
const partPrefix = timeZoneSuffix.substring(0, timeZoneSuffix.length - 2)
|
|
362
|
-
const partSuffix = timeZoneSuffix.substring(timeZoneSuffix.length - 2)
|
|
363
|
-
timeZone = 'UTC' + partPrefix + ':' + partSuffix
|
|
364
|
-
} else if (dateStr.indexOf('UTC') > 0) {
|
|
365
|
-
timeZone = 'UTC' + dateStr.substring(dateStr.indexOf('UTC') + 3, dateStr.indexOf('(')).trim()
|
|
366
|
-
}
|
|
367
|
-
return timeZone
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
export function setCustomSystemBackendUrl(customSystem) {
|
|
371
|
-
// 重新缓存系统后台路径
|
|
372
|
-
if (
|
|
373
|
-
!window.$vueApp.config.globalProperties.projectModel ||
|
|
374
|
-
window.$vueApp.config.globalProperties.projectModel !== 'developing.model'
|
|
375
|
-
) {
|
|
376
|
-
// 表示是生产环境时,需要根据数据库配置获得对应的后端地址
|
|
377
|
-
const backendUrl = window.$authApi.getSystemCacheUrlByCode(customSystem)
|
|
378
|
-
if (backendUrl) {
|
|
379
|
-
window.$vueApp.config.globalProperties.baseURL = getRelativeBaseUrl(backendUrl)
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
export function pushCustomControlValidatorRef(pageCode, refName, ref) {
|
|
385
|
-
console.log('pushCustomControlValidatorRef----', pageCode, refName, ref)
|
|
386
|
-
if (!window.customValidatorRef) {
|
|
387
|
-
window.customValidatorRef = new Map()
|
|
388
|
-
}
|
|
389
|
-
let pageCustomControlRef = window.customValidatorRef.get(pageCode)
|
|
390
|
-
if (!pageCustomControlRef) {
|
|
391
|
-
pageCustomControlRef = new Map()
|
|
392
|
-
window.customValidatorRef.set(pageCode, pageCustomControlRef)
|
|
393
|
-
}
|
|
394
|
-
pageCustomControlRef.set(refName, ref)
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
export function removeCustomControlValidatorRef(pageCode, refName) {
|
|
398
|
-
if (window.customValidatorRef) {
|
|
399
|
-
const pageCustomControlRef = window.customValidatorRef.get(pageCode)
|
|
400
|
-
if (pageCustomControlRef) {
|
|
401
|
-
pageCustomControlRef.delete(refName)
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
export function isMobileBrowser() {
|
|
407
|
-
console.log('isMobileBrowser---navigator.userAgent=', navigator.userAgent,'navigator.maxTouchPoints=',navigator.maxTouchPoints)
|
|
408
|
-
// isMobileBrowser---navigator.userAgent= Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.3 苹果电脑
|
|
409
|
-
// isMobileBrowser---navigator.userAgent= Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Safari/605.1.15 ipad Air
|
|
410
|
-
// isMobileBrowser---navigator.userAgent= Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Safari/605.1.15 ipad pro
|
|
411
|
-
if (
|
|
412
|
-
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Opera Mobi|Windows CE|Symbian|Windows Phone|POLARIS|lgtelecom|nokia|SonyEricsson|LG|SAMSUNG|Samsung|Mobile/i.test(
|
|
413
|
-
navigator.userAgent
|
|
414
|
-
)
|
|
415
|
-
) {
|
|
416
|
-
//移动端浏览器
|
|
417
|
-
return true
|
|
418
|
-
} else if (
|
|
419
|
-
/Macintosh/i.test(navigator.userAgent) && navigator.maxTouchPoints !== undefined && navigator.maxTouchPoints >= 1
|
|
420
|
-
) {
|
|
421
|
-
//苹果设备时,ipad prop或ipad Air浏览器。通过navigator.maxTouchPoints是否支持触摸来判断
|
|
422
|
-
return true
|
|
423
|
-
} else {
|
|
424
|
-
//PC浏览器
|
|
425
|
-
return false
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
export function getLocaleByLang(lang) {
|
|
430
|
-
return i18nUtil.getLocaleByLang(lang)
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
export function cacheLangs(langs) {
|
|
434
|
-
let langResult
|
|
435
|
-
if (langs) {
|
|
436
|
-
langResult = JSON.stringify(langs)
|
|
437
|
-
}
|
|
438
|
-
return setAllLanguages(langResult)
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
export function getLangs() {
|
|
442
|
-
return getAllLanguages()
|
|
443
|
-
}
|
|
444
|
-
/**
|
|
445
|
-
*
|
|
446
|
-
* @param {*} langShort 例如:cn或en
|
|
447
|
-
* @returns 例如:zh_CN或en_US
|
|
448
|
-
*/
|
|
449
|
-
export function getLangByShort(langShort) {
|
|
450
|
-
let lang
|
|
451
|
-
const langResultJson = getLangs()
|
|
452
|
-
if (langResultJson) {
|
|
453
|
-
const langObj = JSON.parse(langResultJson)
|
|
454
|
-
lang = langObj[langShort]
|
|
455
|
-
}
|
|
456
|
-
if (!lang) {
|
|
457
|
-
lang = 'zh_CN'
|
|
458
|
-
}
|
|
459
|
-
return lang
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
// 首次加载业务系统时,缓存所有语言
|
|
463
|
-
export function cacheAllLanguagesUtil(http) {
|
|
464
|
-
return new Promise((resolve, reject) => {
|
|
465
|
-
const token = getToken()
|
|
466
|
-
if (token) {
|
|
467
|
-
const cookieCacheLangs = getLangs()
|
|
468
|
-
if (cookieCacheLangs) {
|
|
469
|
-
setAllLanguages(cookieCacheLangs)
|
|
470
|
-
resolve()
|
|
471
|
-
} else {
|
|
472
|
-
http.get(window.$vueApp.config.globalProperties.baseAPI + '/component/all-languages').then((langList) => {
|
|
473
|
-
const langResult = {}
|
|
474
|
-
if (langList) {
|
|
475
|
-
langList.forEach((item) => {
|
|
476
|
-
// 例如:zh_CN、en_US
|
|
477
|
-
const lang = item.value
|
|
478
|
-
let langShort
|
|
479
|
-
if (lang.indexOf('_') > 0) {
|
|
480
|
-
langShort = lang.substring(0, lang.indexOf('_'))
|
|
481
|
-
}
|
|
482
|
-
if (langShort && langShort === 'zh') {
|
|
483
|
-
// 中文处理,为了兼容历史逻辑
|
|
484
|
-
langShort = 'cn'
|
|
485
|
-
}
|
|
486
|
-
if (langShort) {
|
|
487
|
-
langResult[langShort] = lang
|
|
488
|
-
}
|
|
489
|
-
})
|
|
490
|
-
}
|
|
491
|
-
cacheLangs(langResult)
|
|
492
|
-
resolve()
|
|
493
|
-
})
|
|
494
|
-
}
|
|
495
|
-
} else {
|
|
496
|
-
resolve()
|
|
497
|
-
}
|
|
498
|
-
})
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
function getOpenUrl(originalTaskUrl) {
|
|
502
|
-
return replacePrefix(originalTaskUrl)
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
export function windowOpenUrl(url, projectModel) {
|
|
506
|
-
let taskUrl = getOpenUrl(url)
|
|
507
|
-
if (!projectModel) {
|
|
508
|
-
projectModel = window.$vueApp.config.globalProperties.projectModel
|
|
509
|
-
}
|
|
510
|
-
const systemNameCn = 'QMS质量管理系统'
|
|
511
|
-
const systemNameEn = 'QMS Quality Management System'
|
|
512
|
-
let systemName = systemNameCn
|
|
513
|
-
if (window.$locale && window.$locale !== 'cn') {
|
|
514
|
-
systemName = systemNameEn
|
|
515
|
-
}
|
|
516
|
-
if (projectModel === null || projectModel === undefined || projectModel !== 'developing.model') {
|
|
517
|
-
// 表示是产品模式,因为会有跳转到应用根路由的问题,所以改成使用nginx代理的静态页面实现
|
|
518
|
-
const systemFrontUrl = taskUrl.substring(0, taskUrl.indexOf('#'))
|
|
519
|
-
const routeUrl = taskUrl.substring(taskUrl.indexOf('#') + 1, taskUrl.indexOf('?'))
|
|
520
|
-
const param = taskUrl.substring(taskUrl.indexOf('?') + 1)
|
|
521
|
-
let jumpUrl = '/jumpPage/jump-page.html?systemFrontUrl=' + systemFrontUrl + '&routeUrl=' + routeUrl
|
|
522
|
-
// _systemName_参数用于设置浏览器页签名的,国际化使用,在imatrix ui的beforeEach中有使用这个参数
|
|
523
|
-
if (param) {
|
|
524
|
-
jumpUrl += '&' + param
|
|
525
|
-
}
|
|
526
|
-
if (jumpUrl.indexOf('_systemName_=') === -1) {
|
|
527
|
-
jumpUrl += '&_systemName_=' + systemName
|
|
528
|
-
}
|
|
529
|
-
window.open(jumpUrl)
|
|
530
|
-
} else {
|
|
531
|
-
// 开发模式
|
|
532
|
-
if (taskUrl.indexOf('_systemName_=') === -1) {
|
|
533
|
-
if (taskUrl.indexOf('?') > 0) {
|
|
534
|
-
taskUrl += '&_systemName_=' + systemName
|
|
535
|
-
} else {
|
|
536
|
-
taskUrl += '?_systemName_=' + systemName
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
window.open(taskUrl)
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
// 首次加载业务系统时,缓存当前用户语言
|
|
544
|
-
export function cacheCurrentLanguageUtil(http) {
|
|
545
|
-
return new Promise((resolve, reject) => {
|
|
546
|
-
const token = getToken()
|
|
547
|
-
if (!token) {
|
|
548
|
-
// 默认是中文
|
|
549
|
-
resolve('zh_CN')
|
|
550
|
-
}
|
|
551
|
-
const currentLanguage = getLanguage()
|
|
552
|
-
const systemCode = getCurrentSystemCode()
|
|
553
|
-
if (isPlateSys(systemCode)) {
|
|
554
|
-
// 平台系统不需要加载国际化文件
|
|
555
|
-
if (currentLanguage && currentLanguage !== 'undefined') {
|
|
556
|
-
resolve(currentLanguage)
|
|
557
|
-
} else {
|
|
558
|
-
// 如果没有缓存当前用户的语言,则需要获取
|
|
559
|
-
const params = { systemCode: systemCode }
|
|
560
|
-
http
|
|
561
|
-
.post(window.$vueApp.config.globalProperties.baseAPI + '/acs/user/i18n-languages', params)
|
|
562
|
-
.then((langInfo) => {
|
|
563
|
-
resolve(langInfo.language ? langInfo.language : 'zh_CN')
|
|
564
|
-
})
|
|
565
|
-
.catch(() => {
|
|
566
|
-
resolve('zh_CN')
|
|
567
|
-
})
|
|
568
|
-
}
|
|
569
|
-
} else {
|
|
570
|
-
// 业务系统是否启用了国际化
|
|
571
|
-
const enableI18n = i18nUtil.getEnableI18nState(systemCode)
|
|
572
|
-
if (enableI18n === false && currentLanguage && currentLanguage !== 'undefined') {
|
|
573
|
-
// 如果没有开启国际化, 并且已经缓存了当前用户的语言,则直接返回
|
|
574
|
-
resolve(currentLanguage)
|
|
575
|
-
} else {
|
|
576
|
-
// 启用了国际化并且当前已经加载过了国际化json文件,则需要检查是否是最新的国际化文件
|
|
577
|
-
// 没有加载过国际化文件,则不用传递checkLastestI18nFile参数,后台会返回最新的国际化文件路径和用户当前语言
|
|
578
|
-
let url = i18nUtil.getLangFileUrl(systemCode, currentLanguage)
|
|
579
|
-
const params = { systemCode: systemCode }
|
|
580
|
-
if (url && currentLanguage && currentLanguage !== 'undefined' && enableI18n) {
|
|
581
|
-
params.checkLastestI18nFile = true
|
|
582
|
-
params.i18nFileVersion = i18nUtil.getI18nFileVersion()
|
|
583
|
-
}
|
|
584
|
-
http
|
|
585
|
-
.post(window.$vueApp.config.globalProperties.baseAPI + '/acs/user/i18n-languages', params)
|
|
586
|
-
.then((langInfo) => {
|
|
587
|
-
const i18nCurrentVersion = i18nUtil.getI18nFileVersion()
|
|
588
|
-
i18nUtil.setI18nFileVersion(langInfo.i18nFileVersion)
|
|
589
|
-
if (!url && langInfo.i18nFileUrls[langInfo.language]) {
|
|
590
|
-
url = langInfo.i18nFileUrls[langInfo.language] + '?_t_=' + new Date().getTime()
|
|
591
|
-
i18nUtil.setLangFileUrl(systemCode, langInfo.language, url)
|
|
592
|
-
}
|
|
593
|
-
if (i18nCurrentVersion && Number(i18nCurrentVersion) === langInfo.i18nFileVersion) {
|
|
594
|
-
// 表示是最新的国际化文件,可以直接加载使用
|
|
595
|
-
i18nUtil
|
|
596
|
-
.loadLangFile(systemCode, url, currentLanguage)
|
|
597
|
-
.then(() => {
|
|
598
|
-
resolve(currentLanguage)
|
|
599
|
-
})
|
|
600
|
-
.catch(() => {
|
|
601
|
-
resolve(currentLanguage)
|
|
602
|
-
})
|
|
603
|
-
} else {
|
|
604
|
-
// 不是最新的国际化文件或者没有加载过国际化文件,则后端会返回最新的国际化文件路径和用户当前语言
|
|
605
|
-
i18nUtil.setEnableI18nState(systemCode, langInfo.enableI18n ? true : false)
|
|
606
|
-
if (langInfo.enableI18n && langInfo.i18nFileUrls[langInfo.language]) {
|
|
607
|
-
const url = langInfo.i18nFileUrls[langInfo.language] + '?_t_=' + new Date().getTime()
|
|
608
|
-
i18nUtil.setLangFileUrl(systemCode, langInfo.language, url)
|
|
609
|
-
i18nUtil
|
|
610
|
-
.loadLangFile(systemCode, url, langInfo.language)
|
|
611
|
-
.then(() => {
|
|
612
|
-
resolve(langInfo.language)
|
|
613
|
-
})
|
|
614
|
-
.catch(() => {
|
|
615
|
-
resolve(langInfo.language ? langInfo.language : 'zh_CN')
|
|
616
|
-
})
|
|
617
|
-
} else {
|
|
618
|
-
// 如果没有开启国际化
|
|
619
|
-
resolve(langInfo.language)
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
})
|
|
623
|
-
.catch(() => {
|
|
624
|
-
resolve('zh_CN')
|
|
625
|
-
})
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
})
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
async function handlePlateSysLang(currentLanguage) {
|
|
632
|
-
if (currentLanguage && currentLanguage !== 'undefined') {
|
|
633
|
-
return currentLanguage
|
|
634
|
-
} else {
|
|
635
|
-
const params = { systemCode: getCurrentSystemCode() }
|
|
636
|
-
try {
|
|
637
|
-
const langInfo = await http.post(
|
|
638
|
-
window.$vueApp.config.globalProperties.baseAPI + '/acs/user/i18n-languages',
|
|
639
|
-
params
|
|
640
|
-
)
|
|
641
|
-
return langInfo.language ? langInfo.language : 'zh_CN'
|
|
642
|
-
} catch {
|
|
643
|
-
return 'zh_CN'
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
// 缓存项目设值信息
|
|
648
|
-
export function cacheProjectSetting() {
|
|
649
|
-
return new Promise((resolve, reject) => {
|
|
650
|
-
const projectSettingCache = localStorage.getItem('PROJECT_SETTINGS')
|
|
651
|
-
let projectSettings = null
|
|
652
|
-
if (projectSettingCache && projectSettingCache === '_EMPTY_VALUE') {
|
|
653
|
-
resolve(projectSettings)
|
|
654
|
-
} else if (projectSettingCache) {
|
|
655
|
-
projectSettings = JSON.parse(projectSettingCache)
|
|
656
|
-
setBrowserFavicon(projectSettings)
|
|
657
|
-
resolve(projectSettings)
|
|
658
|
-
} else {
|
|
659
|
-
window.$vueApp.config.globalProperties.$http
|
|
660
|
-
.get(window.$vueApp.config.globalProperties.baseAPI + '/cfg/project-settings')
|
|
661
|
-
.then((data) => {
|
|
662
|
-
if (data) {
|
|
663
|
-
localStorage.setItem('PROJECT_SETTINGS', JSON.stringify(data))
|
|
664
|
-
projectSettings = data
|
|
665
|
-
setBrowserFavicon(projectSettings)
|
|
666
|
-
} else {
|
|
667
|
-
localStorage.setItem('PROJECT_SETTINGS', '_EMPTY_VALUE')
|
|
668
|
-
}
|
|
669
|
-
resolve(projectSettings)
|
|
670
|
-
})
|
|
671
|
-
.catch((error) => {
|
|
672
|
-
reject(error)
|
|
673
|
-
})
|
|
674
|
-
}
|
|
675
|
-
})
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
function setBrowserFavicon(projectSettings) {
|
|
679
|
-
const linkElement = document.getElementById('ambBrowserIcon')
|
|
680
|
-
if (!linkElement) {
|
|
681
|
-
return
|
|
682
|
-
}
|
|
683
|
-
if (projectSettings) {
|
|
684
|
-
const browserIconUrl =
|
|
685
|
-
window.$vueApp.config.globalProperties.baseAPI + '/cfg/project/icon/browserIcon?t=' + __BUILD_TIME__
|
|
686
|
-
if (projectSettings.browserImageUuid && (!linkElement.href || linkElement.href !== browserIconUrl)) {
|
|
687
|
-
linkElement.href = browserIconUrl
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
if (!linkElement.href) {
|
|
691
|
-
linkElement.href = 'favicon.svg?t=' + __BUILD_TIME__
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
// 动态加载css
|
|
696
|
-
export function loadCSS() {
|
|
697
|
-
var theme
|
|
698
|
-
if (!theme) {
|
|
699
|
-
theme = localStorage.getItem('CURRENT_THEME')
|
|
700
|
-
}
|
|
701
|
-
if (!theme) {
|
|
702
|
-
console.error('皮肤主题为空!')
|
|
703
|
-
return
|
|
704
|
-
}
|
|
705
|
-
const baseAPI = localStorage.getItem('_baseAPI_')
|
|
706
|
-
if (baseAPI) {
|
|
707
|
-
const href = replacePrefix(baseAPI) + '/component/theme/load-theme?theme=' + theme + '&_t_=' + new Date().getTime()
|
|
708
|
-
let isHasLink = true
|
|
709
|
-
let cssLink = document.getElementById('_loadTheme_')
|
|
710
|
-
if (!cssLink) {
|
|
711
|
-
cssLink = document.createElement('link')
|
|
712
|
-
isHasLink = false
|
|
713
|
-
}
|
|
714
|
-
cssLink.rel = 'stylesheet'
|
|
715
|
-
cssLink.type = 'text/css'
|
|
716
|
-
cssLink.id = '_loadTheme_'
|
|
717
|
-
cssLink.href = href
|
|
718
|
-
if (!isHasLink) {
|
|
719
|
-
document.getElementsByTagName('head')[0].appendChild(cssLink)
|
|
720
|
-
}
|
|
721
|
-
}
|
|
722
|
-
const body = document.querySelector('body')
|
|
723
|
-
if (body) {
|
|
724
|
-
body.setAttribute('class', theme)
|
|
725
|
-
}
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
* 获取UUID,去掉破折号
|
|
730
|
-
* @returns
|
|
731
|
-
*/
|
|
732
|
-
export function getUuidv4() {
|
|
733
|
-
return uuidv4().replace(/-/g, '')
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
export function replacePlaceholders(template, ...args) {
|
|
737
|
-
return template.replace(/{(\d+)}/g, (match, index) => {
|
|
738
|
-
return typeof args[index] !== 'undefined' ? args[index] : match
|
|
739
|
-
})
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
function isOpenMobileGateway() {
|
|
743
|
-
// 系统参数设置中配置的是否开启移动网关,没有配置默认是开启的
|
|
744
|
-
let isOpenMobileGatewayCache = getCookieCache('IS_OPEN_MOBILE_GATEWAY')
|
|
745
|
-
if (isOpenMobileGatewayCache === undefined || isOpenMobileGatewayCache === null) {
|
|
746
|
-
isOpenMobileGatewayCache = 'true'
|
|
747
|
-
}
|
|
748
|
-
return isOpenMobileGatewayCache
|
|
749
|
-
}
|
|
750
|
-
/**
|
|
751
|
-
* 获得替换域名后的url
|
|
752
|
-
* @param {*} url
|
|
753
|
-
* @returns
|
|
754
|
-
*/
|
|
755
|
-
export function getReplaceUrlDomain(url) {
|
|
756
|
-
const isOpenMobileGatewayCache = isOpenMobileGateway()
|
|
757
|
-
console.log('===getReplaceUrlDomain==isOpenMobileGatewayCache=', isOpenMobileGatewayCache)
|
|
758
|
-
if (isOpenMobileGatewayCache === 'true' && url !== undefined && window.$vueApp.config.globalProperties.replaceUrl) {
|
|
759
|
-
// 表示需要替换url中的"https://域名"
|
|
760
|
-
const baseApi = uswindow.$vueApp.config.globalProperties.baseAPI
|
|
761
|
-
if (
|
|
762
|
-
(url + '').indexOf(uswindow.$vueApp.config.globalProperties.replaceUrl + '/') < 0 &&
|
|
763
|
-
(url + '').indexOf('://') > 0
|
|
764
|
-
) {
|
|
765
|
-
// 表示路径还未替换
|
|
766
|
-
console.log('===getReplaceUrlDomain==url.indexOf(uswindow.$vueApp.config.globalProperties.replaceUrl) !== 0')
|
|
767
|
-
const prefixUrl1 = baseApi.substring(0, baseApi.indexOf('://'))
|
|
768
|
-
const urlSuffix1 = baseApi.substring(baseApi.indexOf('://') + 3)
|
|
769
|
-
const domainUrl1 = urlSuffix1.substring(0, urlSuffix1.indexOf('/'))
|
|
770
|
-
const prefixUrlBase = prefixUrl1 + '://' + domainUrl1
|
|
771
|
-
const prefixUrl2 = baseApi.substring(0, baseApi.indexOf('://'))
|
|
772
|
-
let urlSuffix = url.substring(url.indexOf('://') + 3)
|
|
773
|
-
const domainUrl2 = urlSuffix.substring(0, urlSuffix.indexOf('/'))
|
|
774
|
-
const prefixUrl = prefixUrl2 + '://' + domainUrl2
|
|
775
|
-
if (prefixUrl === prefixUrlBase) {
|
|
776
|
-
urlSuffix = urlSuffix.substring(urlSuffix.indexOf('/'))
|
|
777
|
-
url = uswindow.$vueApp.config.globalProperties.replaceUrl + urlSuffix
|
|
778
|
-
console.log('===getReplaceUrlDomain==url=', url)
|
|
779
|
-
}
|
|
780
|
-
} else {
|
|
781
|
-
console.log('===getReplaceUrlDomain==has-replace-url=', url)
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
return url
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
export function formatFileName(fileName) {
|
|
788
|
-
if (fileName) {
|
|
789
|
-
fileName = fileName.replace('#', '~~').replace('?', '~$').replace('&', '$')
|
|
790
|
-
}
|
|
791
|
-
return fileName
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
export function getCurrentSystemCode() {
|
|
795
|
-
if (window.$vueApp.config.globalProperties.currentSystem) {
|
|
796
|
-
return window.$vueApp.config.globalProperties.currentSystem
|
|
797
|
-
} else {
|
|
798
|
-
return window.$vueApp.config.globalProperties.systemCode
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
export function isLogoutTimeout(event) {
|
|
803
|
-
let isTimeout = false
|
|
804
|
-
if (event && typeof event.data === 'string' && event.data.indexOf('loginTimeout') >= 0) {
|
|
805
|
-
if (event && typeof event.data === 'string' && event.data.indexOf('loginTimeout') >= 0) {
|
|
806
|
-
// removeToken()
|
|
807
|
-
// this.$router.replace({
|
|
808
|
-
// path: '/login'
|
|
809
|
-
// })
|
|
810
|
-
isTimeout = true
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
return isTimeout
|
|
814
|
-
}
|
|
815
|
-
|
|
816
|
-
export function cacheSystemUrl() {
|
|
817
|
-
return new Promise((resolve, reject) => {
|
|
818
|
-
const systemUrls = window.$authApi.getSystemCacheUrl()
|
|
819
|
-
if (!systemUrls) {
|
|
820
|
-
window.$vueApp.config.globalProperties.$http
|
|
821
|
-
.get(window.$vueApp.config.globalProperties.baseAPI + '/component/business-systems/without-plate')
|
|
822
|
-
.then((urlMap) => {
|
|
823
|
-
if (urlMap) {
|
|
824
|
-
window.$authApi.setSystemCacheUrl(urlMap)
|
|
825
|
-
}
|
|
826
|
-
resolve()
|
|
827
|
-
})
|
|
828
|
-
} else {
|
|
829
|
-
resolve()
|
|
830
|
-
}
|
|
831
|
-
})
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
export function getCacheSystemUrlWithSystemCode(systemCode) {
|
|
835
|
-
return new Promise((resolve, reject) => {
|
|
836
|
-
const systemUrls = window.$authApi.getSystemCacheUrl()
|
|
837
|
-
if (!systemUrls) {
|
|
838
|
-
cacheSystemUrl().then(()=>{
|
|
839
|
-
resolve(window.$authApi.getSystemCacheFrontendUrlByCode(systemCode))
|
|
840
|
-
})
|
|
841
|
-
} else {
|
|
842
|
-
resolve(window.$authApi.getSystemCacheFrontendUrlByCode(systemCode))
|
|
843
|
-
}
|
|
844
|
-
})
|
|
845
|
-
}
|
|
846
|
-
/**
|
|
847
|
-
* 登录源是哪种方式,例如:portal、dingtalk、weixin、mobile等
|
|
848
|
-
*/
|
|
849
|
-
export function getAuthSource() {
|
|
850
|
-
return window.localStorage.getItem('auth_source')
|
|
851
|
-
}
|
|
852
|
-
/**
|
|
853
|
-
* 是否是钉钉环境,比如:钉钉工作台。钉钉单点登录不算。
|
|
854
|
-
* @returns
|
|
855
|
-
*/
|
|
856
|
-
export function isDingTalkEnv() {
|
|
857
|
-
const authSource = getAuthSource()
|
|
858
|
-
if (authSource && authSource === 'dingtalk' && window.top && window.top.$dd) {
|
|
859
|
-
console.log('当前是钉钉环境')
|
|
860
|
-
// 如果是钉钉环境 并且已经加载了钉钉jsapi
|
|
861
|
-
return true
|
|
862
|
-
}
|
|
863
|
-
return false
|
|
864
|
-
}
|
|
865
|
-
/**
|
|
866
|
-
* 把路径中的参数转为对象
|
|
867
|
-
* @param {*} fullPath 全路径。例如:hash路径:http://xx:8090/#/sss/dd?p1=1&p2=2 或 普通路径:http://xx:8090/sss/dd?p1=1&p2=2
|
|
868
|
-
* @returns
|
|
869
|
-
*/
|
|
870
|
-
export function getURLSearchParamObj(fullPath) {
|
|
871
|
-
try {
|
|
872
|
-
// 提取hash部分
|
|
873
|
-
const hash = fullPath.includes('#') ? fullPath.split('#')[1] : fullPath
|
|
874
|
-
// 提取查询参数
|
|
875
|
-
const queryString = hash.includes('?') ? hash.split('?')[1] : hash
|
|
876
|
-
// 解析参数
|
|
877
|
-
const params = new URLSearchParams(queryString)
|
|
878
|
-
// 转换为普通对象
|
|
879
|
-
return Object.fromEntries(params)
|
|
880
|
-
} catch (error) {
|
|
881
|
-
console.error('error===', error)
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
// 获得KKFileView预览url,处理水印
|
|
886
|
-
export function getKkFilePreviewUrl(previewUrl) {
|
|
887
|
-
previewUrl = previewUrl + '&isShowWatermark=false'
|
|
888
|
-
let myPreviewUrl = getKkFileBackendUrl() + '?url=' + encodeURIComponent(Base64.encode(previewUrl))
|
|
889
|
-
return new Promise((resolve, reject) => {
|
|
890
|
-
getWatermarkSetting()
|
|
891
|
-
.then((watermark) => {
|
|
892
|
-
if (watermark && watermark.useRange && watermark.useRange.indexOf('annex') >= 0) {
|
|
893
|
-
// 表示适用范围有附件时
|
|
894
|
-
myPreviewUrl =
|
|
895
|
-
myPreviewUrl +
|
|
896
|
-
'&watermarkTxt=' +
|
|
897
|
-
watermark.content +
|
|
898
|
-
'&watermarkXSpace=60&watermarkYSpace=100&watermarkWidth=500&watermarkHeight=100'
|
|
899
|
-
}
|
|
900
|
-
resolve(myPreviewUrl)
|
|
901
|
-
})
|
|
902
|
-
.catch((error) => {
|
|
903
|
-
console.error('获得水印失败', error)
|
|
904
|
-
resolve(myPreviewUrl)
|
|
905
|
-
})
|
|
906
|
-
})
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
function getKkFileBackendUrl() {
|
|
910
|
-
let kkFileViewUrl = window.$vueApp.config.globalProperties.kkFileViewUrl
|
|
911
|
-
let kkFileViewUrlResult = kkFileViewUrl
|
|
912
|
-
let baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
913
|
-
if (kkFileViewUrl && baseURL) {
|
|
914
|
-
let baseUrls = baseURL.split('/')
|
|
915
|
-
let prefixUrl = baseUrls[0] + '//' + baseUrls[2]
|
|
916
|
-
let kkFileViewUrls = kkFileViewUrl.split('/')
|
|
917
|
-
let kkFilePrefixUrl = kkFileViewUrls[0] + '//' + kkFileViewUrls[2]
|
|
918
|
-
if (prefixUrl === kkFilePrefixUrl) {
|
|
919
|
-
// 如果baseURL和kkFileViewUrl的ip和端口一致,则表示kkFileView服务被nginx代理了,此时需要做内网、外网域名替换,例如:西安西开项目
|
|
920
|
-
// 如果baseURL和kkFileViewUrl的ip和端口不一致,则表示kkFileView服务没有被nginx代理,此时不需要处理kkFileViewUrl路径,例如:公司产品项目
|
|
921
|
-
kkFileViewUrlResult = getRelativeBaseUrl(kkFileViewUrl)
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
console.log('获得kkFile服务部署路径', kkFileViewUrlResult)
|
|
925
|
-
return kkFileViewUrlResult
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
export function cacheAllEnableGlobalPropUtil() {
|
|
929
|
-
const hasLoadState = localStorage.getItem(GLOBAL_PROP.loadState)
|
|
930
|
-
if (hasLoadState && hasLoadState === 'true') {
|
|
931
|
-
return
|
|
932
|
-
}
|
|
933
|
-
window.$http
|
|
934
|
-
.get(window.$vueApp.config.globalProperties.baseAPI + '/component/common/prop-setting')
|
|
935
|
-
.then((propMap) => {
|
|
936
|
-
if (propMap) {
|
|
937
|
-
cacheAllGlobalPropCache(propMap)
|
|
938
|
-
}
|
|
939
|
-
})
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
export function formatDate(date, fmt){
|
|
943
|
-
if (/(y+)/.test(fmt)) {
|
|
944
|
-
fmt = fmt.replace(
|
|
945
|
-
RegExp.$1,
|
|
946
|
-
(date.getFullYear() + '').substr(4 - RegExp.$1.length)
|
|
947
|
-
)
|
|
948
|
-
}
|
|
949
|
-
const o = {
|
|
950
|
-
'M+': date.getMonth() + 1,
|
|
951
|
-
'd+': date.getDate(),
|
|
952
|
-
'H+': date.getHours(),
|
|
953
|
-
'm+': date.getMinutes(),
|
|
954
|
-
's+': date.getSeconds(),
|
|
955
|
-
}
|
|
956
|
-
for (const k in o) {
|
|
957
|
-
if (new RegExp(`(${k})`).test(fmt)) {
|
|
958
|
-
const str = o[k] + ''
|
|
959
|
-
fmt = fmt.replace(
|
|
960
|
-
RegExp.$1,
|
|
961
|
-
RegExp.$1.length === 1 ? str : padLeftZero(str)
|
|
962
|
-
)
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
return fmt
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
function padLeftZero(str) {
|
|
969
|
-
return ('00' + str).substr(str.length)
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
/**
|
|
973
|
-
* 日期字符串是否合并
|
|
974
|
-
* @param {*} dateString
|
|
975
|
-
* @returns true表示合法
|
|
976
|
-
*/
|
|
977
|
-
export function isValidDate(dateString) {
|
|
978
|
-
const date = new Date(dateString)
|
|
979
|
-
return !isNaN(date.getTime())
|
|
980
|
-
}
|
|
981
|
-
/**
|
|
982
|
-
* 获得超时信息
|
|
983
|
-
* @returns
|
|
984
|
-
*/
|
|
985
|
-
export function getLoginTimeoutUrlInfo(){
|
|
986
|
-
const url = window.location.href
|
|
987
|
-
const paramObj = getURLSearchParamObj(url)
|
|
988
|
-
let customSystem
|
|
989
|
-
if(paramObj && paramObj.customSystem) {
|
|
990
|
-
customSystem = paramObj.customSystem
|
|
991
|
-
}
|
|
992
|
-
let msgObj = {loginTimeout:url}
|
|
993
|
-
if(customSystem){
|
|
994
|
-
msgObj.customSystem = customSystem
|
|
995
|
-
}
|
|
996
|
-
return msgObj
|
|
997
|
-
}
|
|
998
|
-
/**
|
|
999
|
-
* 根据token登录时,缓存资源
|
|
1000
|
-
* @param {} loginName
|
|
1001
|
-
* @returns
|
|
1002
|
-
*/
|
|
1003
|
-
export function cachePermissionsWhenLoginWithToken(loginName, systemCode){
|
|
1004
|
-
return new Promise((resolve, reject) => {
|
|
1005
|
-
// 登录时清除缓存的资源
|
|
1006
|
-
removeAllSystemPermissions()
|
|
1007
|
-
ssoService
|
|
1008
|
-
.getCurrentUserPermissionsBySystem(loginName, systemCode)
|
|
1009
|
-
.then((permissions) => {
|
|
1010
|
-
let currentPermissions = ['index']
|
|
1011
|
-
currentPermissions = currentPermissions.concat(permissions)
|
|
1012
|
-
setPermissions(currentPermissions)
|
|
1013
|
-
resolve()
|
|
1014
|
-
})
|
|
1015
|
-
.catch((error) => {
|
|
1016
|
-
reject(error)
|
|
1017
|
-
})
|
|
1018
|
-
})
|
|
1019
|
-
}
|