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
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
let api = localStorage
|
|
2
|
-
api = {
|
|
3
|
-
get length() {
|
|
4
|
-
return localStorage.length
|
|
5
|
-
},
|
|
6
|
-
getItem: localStorage.getItem.bind(localStorage),
|
|
7
|
-
setItem: localStorage.setItem.bind(localStorage),
|
|
8
|
-
removeItem: localStorage.removeItem.bind(localStorage),
|
|
9
|
-
key: localStorage.key.bind(localStorage),
|
|
10
|
-
clear: localStorage.clear.bind(localStorage),
|
|
11
|
-
setObject: function (key, object) {
|
|
12
|
-
if (typeof object !== 'object') {
|
|
13
|
-
return this.setItem(key, object)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return this.setItem(key, JSON.stringify(object))
|
|
17
|
-
},
|
|
18
|
-
getObject: function (key) {
|
|
19
|
-
var item = this.getItem(key)
|
|
20
|
-
|
|
21
|
-
if (!item) {
|
|
22
|
-
return null
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
try {
|
|
26
|
-
return JSON.parse(item)
|
|
27
|
-
} catch (e) {
|
|
28
|
-
return item
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export default api
|
package/src/utils/menu.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { getLanguageWithLocale } from './util'
|
|
2
|
-
|
|
3
|
-
export function getI18nName(menu) {
|
|
4
|
-
if (!menu) {
|
|
5
|
-
return
|
|
6
|
-
}
|
|
7
|
-
if (menu.i18Names) {
|
|
8
|
-
const language = getLanguageWithLocale()
|
|
9
|
-
const i18Names = JSON.parse(menu.i18Names)
|
|
10
|
-
if (i18Names[language]) {
|
|
11
|
-
return i18Names[language]
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
if (menu.i18nValue) {
|
|
15
|
-
return menu.i18nValue
|
|
16
|
-
} else {
|
|
17
|
-
return menu.name
|
|
18
|
-
}
|
|
19
|
-
}
|
package/src/utils/permission.js
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import 'nprogress/nprogress.css' // Progress 进度条样式
|
|
2
|
-
import { getTotalPermissions, isDevpAccess } from './permissionAuth'
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @param {String} permission 多个资源编码以逗号隔开
|
|
6
|
-
* @returns {Boolean}
|
|
7
|
-
*/
|
|
8
|
-
export default function checkPermission(permission, systemCode) {
|
|
9
|
-
if (permission && permission === 'true') {
|
|
10
|
-
return true
|
|
11
|
-
}
|
|
12
|
-
if (permission) {
|
|
13
|
-
// 是否是预览项目时开发平台用户
|
|
14
|
-
const isDevpPermission = isDevpAccess()
|
|
15
|
-
// console.log('checkPermission---------permission=', permission, 'isDevpPermission=', isDevpPermission)
|
|
16
|
-
if (isDevpPermission) {
|
|
17
|
-
return true
|
|
18
|
-
}
|
|
19
|
-
let hasPermission = false
|
|
20
|
-
const storeCurrentUserPermissions = getTotalPermissions(systemCode)
|
|
21
|
-
if (typeof storeCurrentUserPermissions !== 'undefined' && storeCurrentUserPermissions !== null) {
|
|
22
|
-
const permissions = permission.split(',')
|
|
23
|
-
for (let i = 0; i < permissions.length; i++) {
|
|
24
|
-
const permissionItem = permissions[i]
|
|
25
|
-
const isPermission = isHasPermission(permissionItem, storeCurrentUserPermissions)
|
|
26
|
-
if (isPermission !== undefined && isPermission === true) {
|
|
27
|
-
hasPermission = true
|
|
28
|
-
break
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return hasPermission
|
|
34
|
-
} else {
|
|
35
|
-
console.error(`need permission2! Like v-permission="acs.department.save"`)
|
|
36
|
-
return true
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function isHasPermission(permission, storeCurrentUserPermissions) {
|
|
41
|
-
const currentPermission = permission.replace(/\./g, '__')
|
|
42
|
-
const permissionResult = storeCurrentUserPermissions[currentPermission]
|
|
43
|
-
// console.log('iMatrix-checkPermission-storeCurrentUserPermissions-result==orgPermission=', permission, '===currentPermission', currentPermission, '==permissionResult=', permissionResult)
|
|
44
|
-
if (permissionResult !== undefined && permissionResult === true) {
|
|
45
|
-
return true
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function getPermissionCodes(configure, pageContext) {
|
|
50
|
-
// if (!pageContext || !configure || pageContext.isTest) {
|
|
51
|
-
// // 如果是预览时
|
|
52
|
-
// return 'true'
|
|
53
|
-
// }
|
|
54
|
-
const codes = []
|
|
55
|
-
//默认生成的资源编码 固定为标准
|
|
56
|
-
if (configure.autoPermissions) {
|
|
57
|
-
for (const p of configure.autoPermissions) {
|
|
58
|
-
codes.push(pageContext.code + '.' + p.simpleCode)
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
//检查是否有手动选择绑定
|
|
62
|
-
if (configure.functionCodes) {
|
|
63
|
-
const sourceTypes = configure.sourceTypes ? configure.sourceTypes : []
|
|
64
|
-
const functionCodes = configure.functionCodes
|
|
65
|
-
for (let i = 0; i < functionCodes.length; i++) {
|
|
66
|
-
const functionCode = functionCodes[i]
|
|
67
|
-
const sourceType = i < sourceTypes.length ? sourceTypes[i] : ''
|
|
68
|
-
//服务时不加前缀
|
|
69
|
-
let newCode = ''
|
|
70
|
-
if (sourceType == 'service') {
|
|
71
|
-
newCode = functionCode
|
|
72
|
-
} else {
|
|
73
|
-
if (sourceType === 'standard') {
|
|
74
|
-
newCode = pageContext.code + '.' + functionCode
|
|
75
|
-
} else {
|
|
76
|
-
const permissionObject = getPagePermissionObjectBySimpleCode(functionCode, pageContext)
|
|
77
|
-
if (permissionObject.type === 'custom') {
|
|
78
|
-
newCode = functionCode
|
|
79
|
-
} else {
|
|
80
|
-
newCode = pageContext.code + '.' + functionCode
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
if (!codes.includes(newCode)) {
|
|
85
|
-
codes.push(newCode)
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
return codes.join(',')
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function getPagePermissionObjectBySimpleCode(persmissionCode, pageContext) {
|
|
93
|
-
const pagePermissions = pageContext.pagePermissions
|
|
94
|
-
if (pagePermissions && pagePermissions.length > 0) {
|
|
95
|
-
for (let i = 0; i < pagePermissions.length; i++) {
|
|
96
|
-
if (pagePermissions[i].simpleCode === persmissionCode) {
|
|
97
|
-
return pagePermissions[i]
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return null
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* 检查字段是否有分支字段权限
|
|
106
|
-
* @param {Object} branchFieldsMap - 分支字段权限
|
|
107
|
-
* @param {string} fieldName - 字段名
|
|
108
|
-
* @returns {boolean} - 是否有权限
|
|
109
|
-
*/
|
|
110
|
-
function isFieldHasBranchAuth(branchFieldsMap, fieldName) {
|
|
111
|
-
if (branchFieldsMap) {
|
|
112
|
-
const hasAuthFields = branchFieldsMap.hasAuthFields
|
|
113
|
-
if (hasAuthFields && hasAuthFields.includes(fieldName)) {
|
|
114
|
-
// 说明分支配置了该字段的权限
|
|
115
|
-
return true
|
|
116
|
-
}
|
|
117
|
-
const allAuthFields = branchFieldsMap.allAuthFields
|
|
118
|
-
if (allAuthFields && allAuthFields.includes(fieldName)) {
|
|
119
|
-
// 说明分支没有配置该分支字段权限
|
|
120
|
-
return false
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return true
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export { checkPermission, getPermissionCodes, isFieldHasBranchAuth }
|
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
import * as Vue from 'vue'
|
|
2
|
-
import { getSessionCache, getRunInfoKey, getUsername, getRunCurrentRole } from './auth'
|
|
3
|
-
import { isMobileBrowser } from './common-util'
|
|
4
|
-
|
|
5
|
-
const permissionKey = 'PERMISSION-'
|
|
6
|
-
const permissionMenuKey = 'PERMISSION_MENU-'
|
|
7
|
-
const systemDefaultMenuKey = 'SYSTEM_DEFAULT_MENU_CODE-'
|
|
8
|
-
const customMenuKey = 'CUSTOM_MENU-'
|
|
9
|
-
const _RUN_PERMISSION = '_RUN_PERMISSION'
|
|
10
|
-
|
|
11
|
-
const permissionAllSystemKey = 'PERMISSION_All_SYSTSEM_KEY'
|
|
12
|
-
const mobilePermissionKey = 'PERMISSION-MOBILE-WEB'
|
|
13
|
-
export function getSystemCode() {
|
|
14
|
-
let systemCode
|
|
15
|
-
if (window.$vueApp.config.globalProperties.customSystem) {
|
|
16
|
-
systemCode = window.$vueApp.config.globalProperties.customSystem
|
|
17
|
-
} else if (window.$vueApp.config.globalProperties.currentSystem) {
|
|
18
|
-
systemCode = window.$vueApp.config.globalProperties.currentSystem
|
|
19
|
-
} else {
|
|
20
|
-
systemCode = window.$vueApp.config.globalProperties.systemCode
|
|
21
|
-
}
|
|
22
|
-
// let systemCode = window.$vueApp.config.globalProperties.systemCode
|
|
23
|
-
// if (window.$vueApp.config.globalProperties.customSystem) {
|
|
24
|
-
// systemCode = window.$vueApp.config.globalProperties.customSystem
|
|
25
|
-
// }
|
|
26
|
-
return systemCode
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function getPermissions(systemCode) {
|
|
30
|
-
let totalPermissions = null
|
|
31
|
-
if (!systemCode || systemCode + '' === 'null') {
|
|
32
|
-
systemCode = getSystemCode()
|
|
33
|
-
}
|
|
34
|
-
let permissions = localStorage.getItem(permissionKey + systemCode)
|
|
35
|
-
if (permissions) {
|
|
36
|
-
if (!totalPermissions) {
|
|
37
|
-
totalPermissions = {}
|
|
38
|
-
}
|
|
39
|
-
Object.assign(totalPermissions, JSON.parse(permissions))
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const isMobile = isMobileBrowser()
|
|
43
|
-
if (isMobile) {
|
|
44
|
-
const permissions = localStorage.getItem(mobilePermissionKey)
|
|
45
|
-
if (permissions) {
|
|
46
|
-
if (!totalPermissions) {
|
|
47
|
-
totalPermissions = {}
|
|
48
|
-
}
|
|
49
|
-
Object.assign(totalPermissions, JSON.parse(permissions))
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return totalPermissions
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export function getTotalPermissions(systemCode) {
|
|
56
|
-
const a = new Date().getTime()
|
|
57
|
-
let runPermissionsObj
|
|
58
|
-
const runPermissions = getSessionCache(_RUN_PERMISSION)
|
|
59
|
-
if (runPermissions) {
|
|
60
|
-
runPermissionsObj = JSON.parse(runPermissions)
|
|
61
|
-
}
|
|
62
|
-
let sysetemPermissionsObj
|
|
63
|
-
if (!systemCode || systemCode + '' === 'null') {
|
|
64
|
-
systemCode = getSystemCode()
|
|
65
|
-
}
|
|
66
|
-
const sysetemPermissions = localStorage.getItem(permissionKey + systemCode)
|
|
67
|
-
if (sysetemPermissions) {
|
|
68
|
-
sysetemPermissionsObj = JSON.parse(sysetemPermissions)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
let mobilePermissionsObj
|
|
72
|
-
const isMobile = isMobileBrowser()
|
|
73
|
-
if (isMobile) {
|
|
74
|
-
const mobilePermissions = localStorage.getItem(mobilePermissionKey)
|
|
75
|
-
if (mobilePermissions) {
|
|
76
|
-
mobilePermissionsObj = JSON.parse(mobilePermissions)
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
const b = new Date().getTime()
|
|
80
|
-
if (runPermissionsObj || sysetemPermissionsObj || mobilePermissionsObj) {
|
|
81
|
-
let permissions = {}
|
|
82
|
-
if (runPermissionsObj) {
|
|
83
|
-
Object.assign(permissions, runPermissionsObj)
|
|
84
|
-
}
|
|
85
|
-
if (sysetemPermissionsObj) {
|
|
86
|
-
Object.assign(permissions, sysetemPermissionsObj)
|
|
87
|
-
}
|
|
88
|
-
if (mobilePermissionsObj) {
|
|
89
|
-
Object.assign(permissions, mobilePermissionsObj)
|
|
90
|
-
}
|
|
91
|
-
// console.log('getTotalPermissions----permissions=', permissions )
|
|
92
|
-
return permissions
|
|
93
|
-
}
|
|
94
|
-
return null
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export function setPermissions(permissions, systemCode) {
|
|
98
|
-
console.log(
|
|
99
|
-
'setPermissions==========systemCode=',
|
|
100
|
-
systemCode,
|
|
101
|
-
'isHasPlatPermission----permissions[0]=',
|
|
102
|
-
permissions && permissions.length > 0 ? permissions[0] : null
|
|
103
|
-
)
|
|
104
|
-
const isMobile = isMobileBrowser()
|
|
105
|
-
let key
|
|
106
|
-
const permissionObjs = getPermissionObjs(permissions)
|
|
107
|
-
if (isMobile) {
|
|
108
|
-
key = mobilePermissionKey
|
|
109
|
-
} else {
|
|
110
|
-
if (!systemCode || systemCode + '' === 'null') {
|
|
111
|
-
systemCode = getSystemCode()
|
|
112
|
-
}
|
|
113
|
-
key = permissionKey + systemCode
|
|
114
|
-
}
|
|
115
|
-
console.log('setPermissions==========systemCode=', systemCode, 'key=', key)
|
|
116
|
-
localStorage.setItem(key, JSON.stringify(permissionObjs))
|
|
117
|
-
setPermissionAllSystemKey(key)
|
|
118
|
-
return permissionObjs
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
function getPermissionObjs(permissions) {
|
|
122
|
-
const permissionObjs = {}
|
|
123
|
-
for (let i = 0; i < permissions.length; i++) {
|
|
124
|
-
const functionCode = permissions[i]
|
|
125
|
-
if (functionCode) {
|
|
126
|
-
const permission = permissions[i].replace(/\./g, '__')
|
|
127
|
-
permissionObjs[permission] = true
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
return permissionObjs
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export function getMenus(systemCode) {
|
|
134
|
-
if (!systemCode || systemCode + '' === 'null') {
|
|
135
|
-
systemCode = getSystemCode()
|
|
136
|
-
}
|
|
137
|
-
const myPermissionMenuKey = getRunInfoKey(permissionMenuKey)
|
|
138
|
-
const permissions = localStorage.getItem(myPermissionMenuKey + systemCode)
|
|
139
|
-
if (permissions) {
|
|
140
|
-
return JSON.parse(permissions)
|
|
141
|
-
}
|
|
142
|
-
return null
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export function getDefaultMenuCode(systemCode) {
|
|
146
|
-
if (!systemCode || systemCode + '' === 'null') {
|
|
147
|
-
systemCode = getSystemCode()
|
|
148
|
-
}
|
|
149
|
-
const defaultMenuCode = localStorage.getItem(systemDefaultMenuKey + systemCode)
|
|
150
|
-
return defaultMenuCode
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export function getCustomMenus(systemCode) {
|
|
154
|
-
const customMenusKey = customMenuKey + systemCode
|
|
155
|
-
const customMenus = JSON.parse(localStorage.getItem(customMenusKey))
|
|
156
|
-
if (customMenus) {
|
|
157
|
-
return customMenus
|
|
158
|
-
}
|
|
159
|
-
return null
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export function setCustomMenus(menus, systemCode) {
|
|
163
|
-
const customMenusKey = customMenuKey + systemCode
|
|
164
|
-
localStorage.setItem(customMenusKey, JSON.stringify(menus))
|
|
165
|
-
setPermissionAllSystemKey(customMenusKey)
|
|
166
|
-
return menus
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
export function setMenus(menus, systemCode) {
|
|
170
|
-
if (menus) {
|
|
171
|
-
if (!systemCode || systemCode + '' === 'null') {
|
|
172
|
-
systemCode = getSystemCode()
|
|
173
|
-
}
|
|
174
|
-
removeCustomMenus(systemCode)
|
|
175
|
-
const myPermissionMenuKey = getRunInfoKey(permissionMenuKey)
|
|
176
|
-
const key = myPermissionMenuKey + systemCode
|
|
177
|
-
localStorage.setItem(key, JSON.stringify(menus))
|
|
178
|
-
setPermissionAllSystemKey(key)
|
|
179
|
-
return menus
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export function setDefaultMenuCode(defaultMenuCode, systemCode) {
|
|
184
|
-
if (defaultMenuCode) {
|
|
185
|
-
if (!systemCode || systemCode + '' === 'null') {
|
|
186
|
-
systemCode = getSystemCode()
|
|
187
|
-
}
|
|
188
|
-
const key = systemDefaultMenuKey + systemCode
|
|
189
|
-
localStorage.setItem(key, defaultMenuCode)
|
|
190
|
-
setPermissionAllSystemKey(key)
|
|
191
|
-
return defaultMenuCode
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
export function removeCustomMenus(systemCode) {
|
|
196
|
-
const customMenusKey = customMenuKey + systemCode
|
|
197
|
-
localStorage.removeItem(customMenusKey)
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
export function removeMenus(systemCode) {
|
|
201
|
-
if (!systemCode || systemCode + '' === 'null') {
|
|
202
|
-
systemCode = getSystemCode()
|
|
203
|
-
}
|
|
204
|
-
removeCustomMenus(systemCode)
|
|
205
|
-
const myPermissionMenuKey = getRunInfoKey(permissionMenuKey)
|
|
206
|
-
localStorage.removeItem(myPermissionMenuKey + systemCode)
|
|
207
|
-
for (var i = 0; i < localStorage.length; i++) {
|
|
208
|
-
var key = localStorage.key(i)
|
|
209
|
-
if (key.indexOf(myPermissionMenuKey) >= 0 || key.indexOf(permissionMenuKey) >= 0) {
|
|
210
|
-
localStorage.removeItem(key)
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
export function removeDefaultMenuCode(systemCode) {
|
|
215
|
-
if (!systemCode || systemCode + '' === 'null') {
|
|
216
|
-
systemCode = getSystemCode()
|
|
217
|
-
}
|
|
218
|
-
localStorage.removeItem(systemDefaultMenuKey + systemCode)
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
function setPermissionAllSystemKey(systemPermissionKey) {
|
|
222
|
-
const permissionAllSystems = getPermissionAllSystemKey()
|
|
223
|
-
if (permissionAllSystems.indexOf(systemPermissionKey) < 0) {
|
|
224
|
-
permissionAllSystems.push(systemPermissionKey)
|
|
225
|
-
}
|
|
226
|
-
localStorage.setItem(permissionAllSystemKey, permissionAllSystems.join(','))
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
function getPermissionAllSystemKey() {
|
|
230
|
-
let permissionAllSystems = localStorage.getItem(permissionAllSystemKey)
|
|
231
|
-
if (permissionAllSystems) {
|
|
232
|
-
permissionAllSystems = permissionAllSystems.split(',')
|
|
233
|
-
}
|
|
234
|
-
if (!permissionAllSystems) {
|
|
235
|
-
permissionAllSystems = []
|
|
236
|
-
}
|
|
237
|
-
return permissionAllSystems
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
function removePermissionSystemKey() {
|
|
241
|
-
localStorage.removeItem(permissionAllSystemKey)
|
|
242
|
-
}
|
|
243
|
-
function rtrim(str) {
|
|
244
|
-
// 删除右边的空格
|
|
245
|
-
return str.replace(/(\s*$)/g, '')
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
// 删除缓存的资源和菜单
|
|
249
|
-
export function removeAllSystemPermissions() {
|
|
250
|
-
localStorage.removeItem(mobilePermissionKey)
|
|
251
|
-
const systemCode = getSystemCode()
|
|
252
|
-
localStorage.removeItem(permissionKey + systemCode)
|
|
253
|
-
const myPermissionMenuKey = getRunInfoKey(permissionMenuKey)
|
|
254
|
-
localStorage.removeItem(myPermissionMenuKey + systemCode)
|
|
255
|
-
localStorage.removeItem(customMenuKey + systemCode)
|
|
256
|
-
localStorage.removeItem(systemDefaultMenuKey + systemCode)
|
|
257
|
-
const permissionAllSystems = getPermissionAllSystemKey()
|
|
258
|
-
permissionAllSystems.forEach((key) => {
|
|
259
|
-
key = rtrim(key)
|
|
260
|
-
localStorage.removeItem(key)
|
|
261
|
-
})
|
|
262
|
-
removePermissionSystemKey()
|
|
263
|
-
}
|
|
264
|
-
// 开发平台项目负责人角色编码
|
|
265
|
-
const DEV_ROLE_PROJECT_ADMIN_CODE = 'PROJECT_ADMIN'
|
|
266
|
-
// 开发平台项目开发者角色编码
|
|
267
|
-
const DEV_ROLE_PROJECT_DEVELOPER_CODE = 'PROJECT_DEVELOPER'
|
|
268
|
-
// 开发平台项目观察者角色编码
|
|
269
|
-
const DEV_ROLE_PROJECT_VIEWER_CODE = 'PROJECT_VIEWER'
|
|
270
|
-
|
|
271
|
-
/**
|
|
272
|
-
* 预览项目时查询应用权限使用。
|
|
273
|
-
* 负责人岗位和观察者岗位
|
|
274
|
-
* @return
|
|
275
|
-
*/
|
|
276
|
-
export function isDevpAccess() {
|
|
277
|
-
const username = getUsername()
|
|
278
|
-
// console.log("isDevpAccess-----username=",username);
|
|
279
|
-
const DEVP_APP_ID = '0bba9791-d4f1-47ca-b5e6-1fc840b54f3a'
|
|
280
|
-
if (username && username === DEVP_APP_ID) {
|
|
281
|
-
// 开发环境的角色编码,运行环境中是岗位
|
|
282
|
-
const postManagementCodes = getPostManagementCodes()
|
|
283
|
-
// console.log("isDevAccess----postManagementCodes=",postManagementCodes);
|
|
284
|
-
if (
|
|
285
|
-
(postManagementCodes && postManagementCodes.indexOf(DEV_ROLE_PROJECT_ADMIN_CODE) >= 0) ||
|
|
286
|
-
postManagementCodes.indexOf(DEV_ROLE_PROJECT_VIEWER_CODE) >= 0
|
|
287
|
-
) {
|
|
288
|
-
// 表示是项目负责人岗位或观察者岗位或平台管理员,且当前登录用户是 devp的应用id
|
|
289
|
-
return true
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
return false
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
function getPostManagementCodes() {
|
|
296
|
-
const devpPostManagements = getRunCurrentRole()
|
|
297
|
-
if (devpPostManagements) {
|
|
298
|
-
let postCodes = []
|
|
299
|
-
const devpCodes = devpPostManagements.split(',')
|
|
300
|
-
devpCodes.forEach((code) => {
|
|
301
|
-
let roleCode = code
|
|
302
|
-
if (code === DEV_ROLE_PROJECT_ADMIN_CODE || code === DEV_ROLE_PROJECT_DEVELOPER_CODE) {
|
|
303
|
-
roleCode = DEV_ROLE_PROJECT_ADMIN_CODE
|
|
304
|
-
}
|
|
305
|
-
if (postCodes.indexOf(roleCode) < 0) {
|
|
306
|
-
postCodes.push(roleCode)
|
|
307
|
-
}
|
|
308
|
-
})
|
|
309
|
-
return postCodes
|
|
310
|
-
}
|
|
311
|
-
}
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import {getLastNDate} from './util'
|
|
2
|
-
export function getFirstDayOfSeason(date) {
|
|
3
|
-
var month = new Date(date).getMonth()
|
|
4
|
-
if (month < 3) {
|
|
5
|
-
date.setMonth(0)
|
|
6
|
-
} else if (month > 2 && month < 6) {
|
|
7
|
-
date.setMonth(3)
|
|
8
|
-
} else if (month > 5 && month < 9) {
|
|
9
|
-
date.setMonth(6)
|
|
10
|
-
} else if (month > 8 && month < 11) {
|
|
11
|
-
date.setMonth(9)
|
|
12
|
-
}
|
|
13
|
-
date.setDate(1)
|
|
14
|
-
return formatDate(date)
|
|
15
|
-
}
|
|
16
|
-
export function getWeekOfSeason(date) {
|
|
17
|
-
const weekTime = date.getDay() - 1
|
|
18
|
-
if (weekTime === -1) {
|
|
19
|
-
return date.getTime() - 6 * 24 * 60 * 60 * 1000
|
|
20
|
-
} else {
|
|
21
|
-
return date.getTime() - weekTime * 24 * 60 * 60 * 1000
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function formatDate(time) {
|
|
26
|
-
const date = new Date(time) // 创建Date对象
|
|
27
|
-
const year = date.getFullYear() // 获取年份
|
|
28
|
-
const month = date.getMonth() + 1 // 获取月份,记得+1
|
|
29
|
-
const day = date.getDate() // 获取日期
|
|
30
|
-
return `${year}-${month}-${day}` // 返回格式化后的日期字符串
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export function formatTimefn(format, dateTime) {
|
|
34
|
-
if (format === undefined || format === null || format === '') {
|
|
35
|
-
let val = dateTime
|
|
36
|
-
// if(typeof dateTime === 'number') {
|
|
37
|
-
// // 表示是毫秒值
|
|
38
|
-
// val = new Date(dateTime)
|
|
39
|
-
// }
|
|
40
|
-
return val
|
|
41
|
-
}
|
|
42
|
-
const nowTime = new Date(dateTime)
|
|
43
|
-
const year = nowTime.getFullYear()
|
|
44
|
-
const month = nowTime.getMonth() + 1
|
|
45
|
-
const date = nowTime.getDate()
|
|
46
|
-
const hour = nowTime.getHours()
|
|
47
|
-
const minute = nowTime.getMinutes()
|
|
48
|
-
const second = nowTime.getSeconds()
|
|
49
|
-
|
|
50
|
-
function getCharCount(char) {
|
|
51
|
-
var regex = new RegExp(char, 'g') // 使用g表示整个字符串都要匹配
|
|
52
|
-
var result = format.match(regex) // match方法可在字符串内检索指定的值,或找到一个或多个正则表达式的匹配。
|
|
53
|
-
var count = !result ? 0 : result.length
|
|
54
|
-
return count
|
|
55
|
-
}
|
|
56
|
-
function setDateItem(oneUnit, twoUnit, itemDate) {
|
|
57
|
-
if (getCharCount(oneUnit) === 1) {
|
|
58
|
-
format = format.replace(oneUnit, itemDate)
|
|
59
|
-
} else if (getCharCount(oneUnit) === 2 && itemDate < 10) {
|
|
60
|
-
format = format.replace(twoUnit, '0' + itemDate)
|
|
61
|
-
} else {
|
|
62
|
-
format = format.replace(twoUnit, itemDate)
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
// 获取第几周
|
|
66
|
-
function getYearWeek(a, b, c) {
|
|
67
|
-
// a为年 b为月 c为日
|
|
68
|
-
var date1 = new Date(a, parseInt(b) - 1, c)
|
|
69
|
-
var date2 = new Date(a, 0, 1)
|
|
70
|
-
var d = Math.round((date1.valueOf() - date2.valueOf()) / 86400000)
|
|
71
|
-
return Math.ceil((d + (date2.getDay() + 1 - 1)) / 7)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
if (format.indexOf('y') !== -1) {
|
|
75
|
-
format = format.replace('yyyy', year)
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
if (format.indexOf('M') !== -1) {
|
|
79
|
-
setDateItem('M', 'MM', month)
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (format.indexOf('W') !== -1) {
|
|
83
|
-
const week = getYearWeek(year, month, date)
|
|
84
|
-
setDateItem('W', 'WW', week)
|
|
85
|
-
}
|
|
86
|
-
if (format.indexOf('d') !== -1) {
|
|
87
|
-
setDateItem('d', 'dd', date)
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
if (format.indexOf('H') !== -1) {
|
|
91
|
-
setDateItem('H', 'HH', hour)
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
if (format.indexOf('m') !== -1) {
|
|
95
|
-
setDateItem('m', 'mm', minute)
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
if (format.indexOf('s') !== -1) {
|
|
99
|
-
setDateItem('s', 'ss', second)
|
|
100
|
-
}
|
|
101
|
-
return format
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export function getDateRangeSelectorDefaultValue(stareScopeTimeType, format, defaultValueSetting) {
|
|
105
|
-
let Staretime = ''
|
|
106
|
-
let endTime = new Date()
|
|
107
|
-
const computeTime = new Date()
|
|
108
|
-
if (stareScopeTimeType === 'oneYear') {
|
|
109
|
-
// 近一年
|
|
110
|
-
const yearTime = endTime.getFullYear()
|
|
111
|
-
computeTime.setFullYear(yearTime)
|
|
112
|
-
computeTime.setMonth(0)
|
|
113
|
-
Staretime = computeTime.setDate(1)
|
|
114
|
-
} else if (stareScopeTimeType === 'twoYear') {
|
|
115
|
-
// 近两年
|
|
116
|
-
const yearTime = endTime.getFullYear() - 1
|
|
117
|
-
computeTime.setFullYear(yearTime)
|
|
118
|
-
computeTime.setMonth(0)
|
|
119
|
-
Staretime = computeTime.setDate(1)
|
|
120
|
-
} else if (stareScopeTimeType === 'oneQuarter') {
|
|
121
|
-
// 近一个季度
|
|
122
|
-
Staretime = new Date(getFirstDayOfSeason(computeTime))
|
|
123
|
-
} else if (stareScopeTimeType === 'twoQuarter') {
|
|
124
|
-
// 近两个季度
|
|
125
|
-
const timeMonth = computeTime.getMonth()
|
|
126
|
-
if (endTime.getMonth < 3) {
|
|
127
|
-
const yeaNum = computeTime.getFullYear() - 1
|
|
128
|
-
computeTime.setFullYear(yeaNum)
|
|
129
|
-
computeTime.setMonth(10)
|
|
130
|
-
} else {
|
|
131
|
-
computeTime.setMonth(timeMonth - 3)
|
|
132
|
-
}
|
|
133
|
-
Staretime = new Date(getFirstDayOfSeason(computeTime))
|
|
134
|
-
} else if (stareScopeTimeType === 'threeQuarter') {
|
|
135
|
-
// 近三个季度
|
|
136
|
-
const timeMonth = computeTime.getMonth()
|
|
137
|
-
if (endTime.getMonth < 8 && endTime.getMonth > 2) {
|
|
138
|
-
const yeaNum = computeTime.getFullYear() - 1
|
|
139
|
-
computeTime.setFullYear(yeaNum)
|
|
140
|
-
computeTime.setMonth(8)
|
|
141
|
-
} else if (endTime.getMonth < 3) {
|
|
142
|
-
const yeaNum = computeTime.getFullYear() - 1
|
|
143
|
-
computeTime.setFullYear(yeaNum)
|
|
144
|
-
computeTime.setMonth(5)
|
|
145
|
-
} else {
|
|
146
|
-
computeTime.setMonth(timeMonth - 6)
|
|
147
|
-
}
|
|
148
|
-
Staretime = new Date(getFirstDayOfSeason(computeTime))
|
|
149
|
-
} else if (stareScopeTimeType === 'oneMonth') {
|
|
150
|
-
// 近一个月
|
|
151
|
-
Staretime = computeTime.setDate(1)
|
|
152
|
-
} else if (stareScopeTimeType === 'twoMonth') {
|
|
153
|
-
// 近两个月
|
|
154
|
-
const monthNum = endTime.getMonth() - 1
|
|
155
|
-
if (monthNum > -1) {
|
|
156
|
-
computeTime.setMonth(monthNum)
|
|
157
|
-
} else {
|
|
158
|
-
const yeartime = endTime.getFullYear() - 1
|
|
159
|
-
computeTime.setFullYear(yeartime)
|
|
160
|
-
computeTime.setMonth(11)
|
|
161
|
-
}
|
|
162
|
-
Staretime = computeTime.setDate(1)
|
|
163
|
-
} else if (stareScopeTimeType === 'threeMonth') {
|
|
164
|
-
// 近三个月
|
|
165
|
-
const monthTime = endTime.getMonth() - 2
|
|
166
|
-
if (monthTime > -1) {
|
|
167
|
-
computeTime.setMonth(monthTime)
|
|
168
|
-
} else {
|
|
169
|
-
const yeartime = endTime.getFullYear() - 1
|
|
170
|
-
computeTime.setFullYear(yeartime)
|
|
171
|
-
computeTime.setMonth(10)
|
|
172
|
-
}
|
|
173
|
-
Staretime = computeTime.setDate(1)
|
|
174
|
-
} else if (stareScopeTimeType === 'oneWeek') {
|
|
175
|
-
// 近一周
|
|
176
|
-
const MondayTime = getWeekOfSeason(computeTime)
|
|
177
|
-
Staretime = new Date(MondayTime)
|
|
178
|
-
} else if (stareScopeTimeType === 'twoWeek') {
|
|
179
|
-
// 近两周
|
|
180
|
-
const MondayTime = getWeekOfSeason(computeTime)
|
|
181
|
-
Staretime = new Date(MondayTime - 7 * 24 * 60 * 60 * 1000)
|
|
182
|
-
} else if (stareScopeTimeType === 'threeWeek') {
|
|
183
|
-
// 近三周
|
|
184
|
-
const MondayTime = getWeekOfSeason(computeTime)
|
|
185
|
-
Staretime = new Date(MondayTime - 14 * 24 * 60 * 60 * 1000)
|
|
186
|
-
} else {
|
|
187
|
-
if (defaultValueSetting && defaultValueSetting.includes('${context.')) {
|
|
188
|
-
defaultValueSetting = defaultValueSetting.replace('${context.', '').replace('}', '')
|
|
189
|
-
const dates = getLastNDate(defaultValueSetting)
|
|
190
|
-
if(dates && Array.isArray(dates)) {
|
|
191
|
-
// 表示是区间范围组件需要的值
|
|
192
|
-
Staretime = dates[0]
|
|
193
|
-
endTime = dates[1]
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
if (Staretime) {
|
|
198
|
-
const startTimeTemp = new Date(Staretime).getTime()
|
|
199
|
-
const endTimeTemp = endTime.getTime()
|
|
200
|
-
const startDate = formatTimefn(format, startTimeTemp)
|
|
201
|
-
const endDate = formatTimefn(format, endTimeTemp)
|
|
202
|
-
return { startTimeTemp, endTimeTemp, startDate, endDate }
|
|
203
|
-
}
|
|
204
|
-
}
|