agilebuilder-ui 1.1.65-tmp30 → 1.1.65-tmp32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/chat-embed/src/index.vue.mjs +1 -1
- package/es/chat-embed/src/index.vue2.mjs +104 -100
- package/es/chat-embed/src/voice/js/crypto-js.mjs +46 -50
- package/es/chat-embed/src/voice/voice.vue.mjs +8 -11
- package/es/date-picker-range/index.vue.mjs +1 -1
- package/es/date-picker-range/index.vue2.mjs +41 -33
- package/es/department-tree-inline/src/department-tree-service.mjs +0 -1
- package/es/department-user-tree-inline/src/department-user-multiple-tree-inline.vue.mjs +14 -11
- package/es/department-user-tree-inline/src/department-user-single-tree-inline.vue.mjs +6 -6
- package/es/department-user-tree-inline/src/department-user-tree-multi-service.mjs +19 -20
- package/es/department-user-tree-inline/src/department-user-tree-single-service.mjs +0 -1
- package/es/department-user-tree-inline/src/search-result.vue.mjs +4 -4
- package/es/department-user-tree-mobile/src/department-user-tree-inline-app.vue.mjs +2 -2
- package/es/dynamic-source-select/src/dynamic-source-select.vue.mjs +86 -85
- package/es/fs-preview/src/fs-preview.vue.mjs +73 -59
- package/es/fs-upload/src/fs-upload-multi.vue.mjs +3 -3
- package/es/fs-upload-list/src/fs-upload-list.vue.mjs +5 -6
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-app.vue.mjs +15 -17
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue.mjs +19 -19
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-component.vue2.mjs +2 -2
- package/es/fs-upload-new/src/fs-preview-new.vue.mjs +1 -1
- package/es/fs-upload-new/src/fs-preview-new.vue2.mjs +50 -50
- package/es/i18n-setting/index.mjs +7 -0
- package/es/i18n-setting/src/i18n-setting-dialog.vue.mjs +23 -0
- package/es/i18n-setting/src/i18n-setting.mjs +14 -0
- package/es/i18n-setting/src/index.vue.mjs +47 -0
- package/es/index.mjs +46 -41
- package/es/multipart-upload/src/multipart-upload-form.vue.mjs +5 -5
- package/es/multipart-upload/src/multipart-upload-list.vue.mjs +6 -6
- package/es/organization-input/src/organization-input.vue.mjs +58 -58
- package/es/remove-department/src/remove-dept-service.mjs +4 -5
- package/es/remove-user/src/remove-user-service.mjs +0 -1
- package/es/remove-workgroup/src/remove-workgroup-service.mjs +0 -1
- package/es/rich-editor/index.vue.mjs +43 -84
- package/es/scan-code-input/src/scan-code-input.vue.mjs +1 -1
- package/es/scan-code-input-browser/src/scan-code-input.vue.mjs +20 -9
- package/es/src/api/sso-service.mjs +0 -1
- package/es/src/i18n/langs/cn.mjs +1 -1
- package/es/src/i18n/langs/en.mjs +1 -1
- package/es/src/permission.mjs +7 -10
- package/es/src/router/index.mjs +0 -1
- package/es/src/store/index.mjs +0 -1
- package/es/src/store/modules/app.mjs +0 -1
- package/es/src/utils/common-util.mjs +143 -143
- package/es/src/utils/i18n-util.mjs +32 -30
- package/es/src/utils/iconUtils.mjs +0 -1
- package/es/src/utils/jump-page-utils.mjs +1 -1
- package/es/src/utils/permission.mjs +25 -26
- package/es/src/utils/permissionAuth.mjs +0 -1
- package/es/src/utils/restful-interface-utils.mjs +5 -6
- package/es/src/utils/watermark.mjs +2 -7
- package/es/src/utils/workflow-util.mjs +6 -6
- package/es/src/views/dsc-component/Sidebar/Item.vue.mjs +1 -1
- package/es/src/views/dsc-component/Sidebar/Item.vue2.mjs +1 -1
- package/es/src/views/layout/components/Menubar/Item.vue.mjs +1 -1
- package/es/src/views/layout/components/Menubar/Item.vue2.mjs +8 -8
- package/es/src/views/layout/components/Menubar/SidebarItem.vue.mjs +11 -11
- package/es/style.css +1 -3103
- package/es/super-grid/src/apis.mjs +155 -151
- package/es/super-grid/src/components/mobile-table-card.mjs +14 -10
- package/es/super-grid/src/components/select-input.vue.mjs +66 -66
- package/es/super-grid/src/custom-formatter.mjs +5 -6
- package/es/super-grid/src/dynamic-input.vue.mjs +31 -39
- package/es/super-grid/src/formValidatorUtil.mjs +0 -1
- package/es/super-grid/src/normal-column-content.vue.mjs +1 -2
- package/es/super-grid/src/normal-column.vue.mjs +12 -10
- package/es/super-grid/src/row-operation.vue.mjs +3 -3
- package/es/super-grid/src/search-form-item.vue.mjs +18 -14
- package/es/super-grid/src/search-form-number.vue.mjs +7 -6
- package/es/super-grid/src/search-form-open.vue.mjs +3 -2
- package/es/super-grid/src/search-form-open.vue2.mjs +4 -0
- package/es/super-grid/src/search-form-ordinarySearch.vue.mjs +1 -1
- package/es/super-grid/src/super-grid.vue.mjs +254 -242
- package/es/super-grid/src/utils.mjs +6 -6
- package/es/super-grid/src/view-image-dialog.vue.mjs +5 -5
- package/es/super-nine-grid/src/super-nine-grid.vue.mjs +89 -83
- package/es/utils/utils.mjs +0 -1
- package/es/utils/value-set.mjs +0 -1
- package/es/workflow-history-list/src/workflow-history-list.vue.mjs +11 -10
- package/es/workgroup-tree-inline/src/workgroup-tree-service.mjs +0 -1
- package/es/workgroup-user-tree-inline/src/workgroup-tree-inline-service.mjs +0 -1
- package/es/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue.mjs +2 -2
- package/package.json +6 -2
- package/src/styles/index.scss +4 -0
- package/src/styles/theme/dark-blue/select.scss +27 -1
- package/src/styles/theme/forest-green/select.scss +27 -1
- package/src/styles/theme/green/select.scss +27 -1
- package/src/styles/theme/ocean-blue/select.scss +27 -1
- package/src/styles/theme/tiffany-blue-mobile/select.scss +29 -2
- package/.eslintrc.cjs +0 -28
- package/.prettierrc.json +0 -12
- package/dist/favicon.svg +0 -29
- package/dist/index.full.min.js +0 -16659
- package/dist/style.css +0 -3104
- package/index.html +0 -19
- package/lib/IntervalSelection/index.cjs +0 -5
- package/lib/IntervalSelection/src/sectionDate.vue.cjs +0 -45
- package/lib/IntervalSelection/src/sectionDate.vue2.cjs +0 -2
- package/lib/_virtual/__vite-browser-external.cjs +0 -2
- package/lib/_virtual/_plugin-vue_export-helper.cjs +0 -7
- package/lib/breadcrumb/index.cjs +0 -5
- package/lib/breadcrumb/src/breadcrumb.vue.cjs +0 -37
- package/lib/breadcrumb/src/breadcrumb.vue2.cjs +0 -2
- package/lib/chat-embed/index.cjs +0 -5
- package/lib/chat-embed/src/chat-addition-data.vue.cjs +0 -5
- package/lib/chat-embed/src/chat-addition-data.vue2.cjs +0 -15
- package/lib/chat-embed/src/chat-addition-data.vue3.cjs +0 -2
- package/lib/chat-embed/src/chat-ai-answer-tip.vue.cjs +0 -5
- package/lib/chat-embed/src/chat-ai-answer-tip.vue2.cjs +0 -26
- package/lib/chat-embed/src/chat-ai-answer-tip.vue3.cjs +0 -2
- package/lib/chat-embed/src/chat-bubble-footer.vue.cjs +0 -5
- package/lib/chat-embed/src/chat-bubble-footer.vue2.cjs +0 -28
- package/lib/chat-embed/src/chat-bubble-footer.vue3.cjs +0 -2
- package/lib/chat-embed/src/chat-embed-message.cjs +0 -16
- package/lib/chat-embed/src/chat-sender.vue.cjs +0 -5
- package/lib/chat-embed/src/chat-sender.vue2.cjs +0 -145
- package/lib/chat-embed/src/chat-sender.vue3.cjs +0 -2
- package/lib/chat-embed/src/components/answer-auto-chart.vue.cjs +0 -5
- package/lib/chat-embed/src/components/answer-auto-chart.vue2.cjs +0 -50
- package/lib/chat-embed/src/components/answer-auto-chart.vue3.cjs +0 -2
- package/lib/chat-embed/src/components/answer-home-chart.vue.cjs +0 -5
- package/lib/chat-embed/src/components/answer-home-chart.vue2.cjs +0 -3
- package/lib/chat-embed/src/components/answer-home-chart.vue3.cjs +0 -2
- package/lib/chat-embed/src/components/answer-interaction-data.vue.cjs +0 -5
- package/lib/chat-embed/src/components/answer-interaction-data.vue2.cjs +0 -107
- package/lib/chat-embed/src/components/answer-interaction-data.vue3.cjs +0 -2
- package/lib/chat-embed/src/components/history-detail.vue.cjs +0 -5
- package/lib/chat-embed/src/components/history-detail.vue2.cjs +0 -50
- package/lib/chat-embed/src/components/history-detail.vue3.cjs +0 -2
- package/lib/chat-embed/src/header.vue.cjs +0 -5
- package/lib/chat-embed/src/header.vue2.cjs +0 -39
- package/lib/chat-embed/src/header.vue3.cjs +0 -2
- package/lib/chat-embed/src/index.vue.cjs +0 -5
- package/lib/chat-embed/src/index.vue2.cjs +0 -281
- package/lib/chat-embed/src/index.vue3.cjs +0 -2
- package/lib/chat-embed/src/recommendation-message.vue.cjs +0 -5
- package/lib/chat-embed/src/recommendation-message.vue2.cjs +0 -8
- package/lib/chat-embed/src/recommendation-message.vue3.cjs +0 -2
- package/lib/chat-embed/src/sidebar-item.vue.cjs +0 -5
- package/lib/chat-embed/src/sidebar-item.vue2.cjs +0 -109
- package/lib/chat-embed/src/sidebar-item.vue3.cjs +0 -2
- package/lib/chat-embed/src/type.cjs +0 -3
- package/lib/chat-embed/src/util/chat-embed-util.cjs +0 -51
- package/lib/chat-embed/src/util/history-message-util.cjs +0 -74
- package/lib/chat-embed/src/util/mcp-utils.cjs +0 -50
- package/lib/chat-embed/src/util/text-file-util.cjs +0 -8
- package/lib/chat-embed/src/voice/index.cjs +0 -5
- package/lib/chat-embed/src/voice/js/crypto-js.cjs +0 -1005
- package/lib/chat-embed/src/voice/js/processor/index.umd.cjs +0 -170
- package/lib/chat-embed/src/voice/js/timer.cjs +0 -8
- package/lib/chat-embed/src/voice/voice.vue.cjs +0 -96
- package/lib/date-picker-range/index.cjs +0 -5
- package/lib/date-picker-range/index.vue.cjs +0 -5
- package/lib/date-picker-range/index.vue2.cjs +0 -89
- package/lib/date-picker-range/index.vue3.cjs +0 -2
- package/lib/department-tree/index.cjs +0 -5
- package/lib/department-tree/src/department-tree.vue.cjs +0 -17
- package/lib/department-tree-inline/index.cjs +0 -5
- package/lib/department-tree-inline/src/department-multi-tree-inline.vue.cjs +0 -81
- package/lib/department-tree-inline/src/department-multi-tree-inline.vue2.cjs +0 -2
- package/lib/department-tree-inline/src/department-single-tree-inline.vue.cjs +0 -54
- package/lib/department-tree-inline/src/department-single-tree-inline.vue2.cjs +0 -2
- package/lib/department-tree-inline/src/department-tree-inline.vue.cjs +0 -12
- package/lib/department-tree-inline/src/department-tree-service.cjs +0 -106
- package/lib/department-tree-inline/src/search-result.vue.cjs +0 -36
- package/lib/department-tree-inline/src/search-result.vue2.cjs +0 -2
- package/lib/department-tree-mobile/index.cjs +0 -5
- package/lib/department-tree-mobile/src/department-tree-app.vue.cjs +0 -13
- package/lib/department-tree-mobile/src/department-tree-app.vue2.cjs +0 -2
- package/lib/department-tree-mobile/src/department-tree-app.vue3.cjs +0 -3
- package/lib/department-tree-mobile/src/department-tree-inline-app.vue.cjs +0 -110
- package/lib/department-tree-mobile/src/department-tree-inline-app.vue2.cjs +0 -3
- package/lib/department-tree-mobile/src/department-tree-service.cjs +0 -47
- package/lib/department-tree-mobile/src/dept-path.vue.cjs +0 -13
- package/lib/department-tree-mobile/src/dept-path.vue2.cjs +0 -3
- package/lib/department-tree-mobile/src/dept-result.vue.cjs +0 -14
- package/lib/department-tree-mobile/src/dept-result.vue2.cjs +0 -3
- package/lib/department-user-tree/index.cjs +0 -5
- package/lib/department-user-tree/src/department-user-multiple-tree.vue.cjs +0 -16
- package/lib/department-user-tree/src/department-user-multiple-tree.vue2.cjs +0 -2
- package/lib/department-user-tree/src/department-user-single-tree.vue.cjs +0 -14
- package/lib/department-user-tree/src/department-user-tree.vue.cjs +0 -21
- package/lib/department-user-tree-inline/index.cjs +0 -5
- package/lib/department-user-tree-inline/src/department-user-multiple-tree-inline.vue.cjs +0 -154
- package/lib/department-user-tree-inline/src/department-user-multiple-tree-inline.vue2.cjs +0 -2
- package/lib/department-user-tree-inline/src/department-user-single-tree-inline.vue.cjs +0 -57
- package/lib/department-user-tree-inline/src/department-user-single-tree-inline.vue2.cjs +0 -2
- package/lib/department-user-tree-inline/src/department-user-tree-inline.vue.cjs +0 -11
- package/lib/department-user-tree-inline/src/department-user-tree-multi-service.cjs +0 -78
- package/lib/department-user-tree-inline/src/department-user-tree-single-service.cjs +0 -51
- package/lib/department-user-tree-inline/src/group-user/group-input.vue.cjs +0 -34
- package/lib/department-user-tree-inline/src/group-user/group-list.vue.cjs +0 -22
- package/lib/department-user-tree-inline/src/group-user/group-user.vue.cjs +0 -10
- package/lib/department-user-tree-inline/src/group-user-multiple-tree.vue.cjs +0 -72
- package/lib/department-user-tree-inline/src/group-user-single-tree.vue.cjs +0 -28
- package/lib/department-user-tree-inline/src/group-user-tree-service.cjs +0 -33
- package/lib/department-user-tree-inline/src/search-result.vue.cjs +0 -38
- package/lib/department-user-tree-inline/src/search-result.vue2.cjs +0 -2
- package/lib/department-user-tree-mobile/index.cjs +0 -5
- package/lib/department-user-tree-mobile/src/department-user-tree-app.vue.cjs +0 -13
- package/lib/department-user-tree-mobile/src/department-user-tree-app.vue2.cjs +0 -2
- package/lib/department-user-tree-mobile/src/department-user-tree-app.vue3.cjs +0 -3
- package/lib/department-user-tree-mobile/src/department-user-tree-inline-app.vue.cjs +0 -124
- package/lib/department-user-tree-mobile/src/department-user-tree-inline-app.vue2.cjs +0 -3
- package/lib/department-user-tree-mobile/src/department-user-tree-service.cjs +0 -28
- package/lib/department-user-tree-mobile/src/dept-path.vue.cjs +0 -13
- package/lib/department-user-tree-mobile/src/dept-path.vue2.cjs +0 -3
- package/lib/department-user-tree-mobile/src/dept-result.vue.cjs +0 -14
- package/lib/department-user-tree-mobile/src/dept-result.vue2.cjs +0 -3
- package/lib/directives/prevent-reclick.cjs +0 -14
- package/lib/dynamic-source-select/index.cjs +0 -5
- package/lib/dynamic-source-select/src/dynamic-source-select-service.cjs +0 -30
- package/lib/dynamic-source-select/src/dynamic-source-select.vue.cjs +0 -266
- package/lib/dynamic-source-select/src/dynamic-source-select.vue2.cjs +0 -2
- package/lib/dynamic-source-select/src/dynamic-source-select.vue3.cjs +0 -2
- package/lib/dynamic-source-select/src/events.cjs +0 -28
- package/lib/empty-state/index.vue.cjs +0 -6
- package/lib/empty-state/index.vue2.cjs +0 -3
- package/lib/favicon.svg +0 -29
- package/lib/fs-preview/index.cjs +0 -5
- package/lib/fs-preview/src/fs-preview.vue.cjs +0 -119
- package/lib/fs-preview/src/fs-preview.vue2.cjs +0 -2
- package/lib/fs-upload/index.cjs +0 -5
- package/lib/fs-upload/src/fs-upload-multi.vue.cjs +0 -63
- package/lib/fs-upload/src/fs-upload-single.vue.cjs +0 -64
- package/lib/fs-upload/src/fs-upload.vue.cjs +0 -18
- package/lib/fs-upload/src/see-big-picture.vue.cjs +0 -9
- package/lib/fs-upload-list/index.cjs +0 -5
- package/lib/fs-upload-list/src/fs-upload-list.vue.cjs +0 -91
- package/lib/fs-upload-list/src/fs-upload-list.vue2.cjs +0 -2
- package/lib/fs-upload-new/index.cjs +0 -5
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-app.vue.cjs +0 -57
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-app.vue2.cjs +0 -3
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue.cjs +0 -170
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue2.cjs +0 -3
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-component.vue.cjs +0 -5
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-component.vue2.cjs +0 -32
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-component.vue3.cjs +0 -2
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-input.vue.cjs +0 -41
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-input.vue2.cjs +0 -3
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload.vue.cjs +0 -29
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload.vue2.cjs +0 -3
- package/lib/fs-upload-new/src/fs-button-upload.vue.cjs +0 -5
- package/lib/fs-upload-new/src/fs-button-upload.vue2.cjs +0 -55
- package/lib/fs-upload-new/src/fs-button-upload.vue3.cjs +0 -2
- package/lib/fs-upload-new/src/fs-drag-upload.vue.cjs +0 -5
- package/lib/fs-upload-new/src/fs-drag-upload.vue2.cjs +0 -55
- package/lib/fs-upload-new/src/fs-drag-upload.vue3.cjs +0 -2
- package/lib/fs-upload-new/src/fs-preview-new.vue.cjs +0 -5
- package/lib/fs-upload-new/src/fs-preview-new.vue2.cjs +0 -84
- package/lib/fs-upload-new/src/fs-preview-new.vue3.cjs +0 -2
- package/lib/fs-upload-new/src/fs-preview-new.vue4.cjs +0 -2
- package/lib/fs-upload-new/src/fs-upload-new.vue.cjs +0 -54
- package/lib/fs-upload-new/src/fs-upload-new.vue2.cjs +0 -3
- package/lib/hamburger/index.cjs +0 -5
- package/lib/hamburger/src/hamburger.vue.cjs +0 -11
- package/lib/hamburger/src/hamburger.vue2.cjs +0 -2
- package/lib/index.cjs +0 -41
- package/lib/json-view/json-view-dialog.vue.cjs +0 -16
- package/lib/json-view/json-view-dialog.vue2.cjs +0 -3
- package/lib/json-view/json-view.vue.cjs +0 -3
- package/lib/json-view/json-view.vue2.cjs +0 -32
- package/lib/multipart-upload/index.cjs +0 -5
- package/lib/multipart-upload/src/index.vue.cjs +0 -10
- package/lib/multipart-upload/src/multipart-upload-form.vue.cjs +0 -73
- package/lib/multipart-upload/src/multipart-upload-list.vue.cjs +0 -96
- package/lib/organization-input/index.cjs +0 -5
- package/lib/organization-input/src/organization-input.vue.cjs +0 -218
- package/lib/organization-input/src/organization-input.vue2.cjs +0 -2
- package/lib/plugins/export-data-new.cjs +0 -229
- package/lib/plugins/export-data.cjs +0 -173
- package/lib/plugins/index.cjs +0 -5
- package/lib/plugins/public-method.cjs +0 -13
- package/lib/remove-department/index.cjs +0 -5
- package/lib/remove-department/src/remove-department.vue.cjs +0 -27
- package/lib/remove-department/src/remove-dept-service.cjs +0 -12
- package/lib/remove-user/index.cjs +0 -5
- package/lib/remove-user/src/remove-user-service.cjs +0 -12
- package/lib/remove-user/src/remove-user.vue.cjs +0 -29
- package/lib/remove-workgroup/index.cjs +0 -5
- package/lib/remove-workgroup/src/remove-workgroup-service.cjs +0 -12
- package/lib/remove-workgroup/src/remove-workgroup.vue.cjs +0 -25
- package/lib/rich-editor/index.cjs +0 -5
- package/lib/rich-editor/index.vue.cjs +0 -67
- package/lib/rich-editor/tinymce/zh_CN.cjs +0 -2
- package/lib/rich-editor/viewer.vue.cjs +0 -24
- package/lib/row-form/index.cjs +0 -5
- package/lib/row-form/index.vue.cjs +0 -5
- package/lib/row-form/index.vue2.cjs +0 -56
- package/lib/row-form/index.vue3.cjs +0 -2
- package/lib/row-form/operation.vue.cjs +0 -28
- package/lib/row-form/operation.vue2.cjs +0 -3
- package/lib/scan-code-input/index.cjs +0 -5
- package/lib/scan-code-input/src/events.cjs +0 -13
- package/lib/scan-code-input/src/scan-code-input.vue.cjs +0 -26
- package/lib/scan-code-input-browser/index.cjs +0 -5
- package/lib/scan-code-input-browser/src/scan-code-input.vue.cjs +0 -34
- package/lib/secret-info/index.cjs +0 -5
- package/lib/secret-info/index.vue.cjs +0 -13
- package/lib/src/api/sso-service.cjs +0 -55
- package/lib/src/api/tab.cjs +0 -14
- package/lib/src/assets/401/401.gif.cjs +0 -2
- package/lib/src/assets/404/404-cloud.png.cjs +0 -2
- package/lib/src/assets/404/404.png.cjs +0 -2
- package/lib/src/assets/chat-embed/robot.gif.cjs +0 -2
- package/lib/src/assets/chat-embed/robot.svg.cjs +0 -2
- package/lib/src/assets/nonemessage.png.cjs +0 -2
- package/lib/src/components/Affix/index.vue.cjs +0 -5
- package/lib/src/components/Affix/index.vue2.cjs +0 -81
- package/lib/src/components/Affix/index.vue3.cjs +0 -2
- package/lib/src/components/Card/index.cjs +0 -46
- package/lib/src/components/Scrollbar/index.vue.cjs +0 -48
- package/lib/src/components/Scrollbar/index.vue2.cjs +0 -2
- package/lib/src/directives/permission/index.cjs +0 -5
- package/lib/src/directives/permission/permission.cjs +0 -9
- package/lib/src/i18n/i18n.cjs +0 -3
- package/lib/src/i18n/langs/cn.cjs +0 -2
- package/lib/src/i18n/langs/en.cjs +0 -2
- package/lib/src/mixins/resizeMixin.cjs +0 -20
- package/lib/src/permission.cjs +0 -76
- package/lib/src/router/index.cjs +0 -16
- package/lib/src/store/getters.cjs +0 -2
- package/lib/src/store/index.cjs +0 -16
- package/lib/src/store/modules/app.cjs +0 -40
- package/lib/src/store/modules/chat-ai-store.cjs +0 -33
- package/lib/src/store/modules/permission.cjs +0 -30
- package/lib/src/store/modules/system.cjs +0 -10
- package/lib/src/store/modules/tab-content.cjs +0 -18
- package/lib/src/store/modules/table.cjs +0 -17
- package/lib/src/store/modules/user.cjs +0 -133
- package/lib/src/utils/auth-api.cjs +0 -132
- package/lib/src/utils/auth.cjs +0 -86
- package/lib/src/utils/calculator/calculator-factory-wf.cjs +0 -166
- package/lib/src/utils/calculator/calculator-factory.cjs +0 -92
- package/lib/src/utils/calculator/calculator-util.cjs +0 -53
- package/lib/src/utils/chat-ai-util.cjs +0 -26
- package/lib/src/utils/common-util.cjs +0 -362
- package/lib/src/utils/eventBus.cjs +0 -3
- package/lib/src/utils/file-util.cjs +0 -22
- package/lib/src/utils/global-prop.cjs +0 -22
- package/lib/src/utils/guid.cjs +0 -7
- package/lib/src/utils/i18n-util.cjs +0 -62
- package/lib/src/utils/iconUtils.cjs +0 -19
- package/lib/src/utils/index.cjs +0 -32
- package/lib/src/utils/insert_css.cjs +0 -18
- package/lib/src/utils/json-util.cjs +0 -45
- package/lib/src/utils/jump-page-utils.cjs +0 -256
- package/lib/src/utils/local-storage.cjs +0 -18
- package/lib/src/utils/menu.cjs +0 -13
- package/lib/src/utils/permission.cjs +0 -41
- package/lib/src/utils/permissionAuth.cjs +0 -120
- package/lib/src/utils/range-selector.cjs +0 -101
- package/lib/src/utils/request.cjs +0 -131
- package/lib/src/utils/resize.cjs +0 -11
- package/lib/src/utils/restful-interface-utils.cjs +0 -15
- package/lib/src/utils/util.cjs +0 -341
- package/lib/src/utils/validate.cjs +0 -12
- package/lib/src/utils/voice-setting-cache.cjs +0 -199
- package/lib/src/utils/watermark-cache.cjs +0 -10
- package/lib/src/utils/watermark.cjs +0 -33
- package/lib/src/utils/workflow-util.cjs +0 -41
- package/lib/src/views/dsc-component/Sidebar/Item.vue.cjs +0 -5
- package/lib/src/views/dsc-component/Sidebar/Item.vue2.cjs +0 -9
- package/lib/src/views/dsc-component/Sidebar/Item.vue3.cjs +0 -2
- package/lib/src/views/dsc-component/Sidebar/Link.vue.cjs +0 -11
- package/lib/src/views/dsc-component/Sidebar/SidebarItem.vue.cjs +0 -46
- package/lib/src/views/dsc-component/Sidebar/SidebarItem.vue2.cjs +0 -2
- package/lib/src/views/dsc-component/Sidebar/index.vue.cjs +0 -103
- package/lib/src/views/dsc-component/tabs/tab-content.vue.cjs +0 -61
- package/lib/src/views/dsc-component/tabs/tab-content.vue2.cjs +0 -2
- package/lib/src/views/dsc-component/tabs/tab-content.vue3.cjs +0 -2
- package/lib/src/views/error-page/401.vue.cjs +0 -11
- package/lib/src/views/error-page/401.vue2.cjs +0 -2
- package/lib/src/views/error-page/404.vue.cjs +0 -8
- package/lib/src/views/error-page/404.vue2.cjs +0 -2
- package/lib/src/views/layout/EmptyLayout.vue.cjs +0 -7
- package/lib/src/views/layout/Layout.vue.cjs +0 -21
- package/lib/src/views/layout/Layout.vue2.cjs +0 -2
- package/lib/src/views/layout/NewLayout.vue.cjs +0 -7
- package/lib/src/views/layout/components/AppMain.vue.cjs +0 -11
- package/lib/src/views/layout/components/AppMain.vue2.cjs +0 -2
- package/lib/src/views/layout/components/Breadcrumb/index.vue.cjs +0 -56
- package/lib/src/views/layout/components/Breadcrumb/index.vue2.cjs +0 -2
- package/lib/src/views/layout/components/Menubar/Item.vue.cjs +0 -5
- package/lib/src/views/layout/components/Menubar/Item.vue2.cjs +0 -13
- package/lib/src/views/layout/components/Menubar/Item.vue3.cjs +0 -2
- package/lib/src/views/layout/components/Menubar/Link.vue.cjs +0 -11
- package/lib/src/views/layout/components/Menubar/SidebarItem.vue.cjs +0 -47
- package/lib/src/views/layout/components/Menubar/SidebarItem.vue2.cjs +0 -2
- package/lib/src/views/layout/components/Menubar/index.vue.cjs +0 -79
- package/lib/src/views/layout/components/Sidebar/Item.vue.cjs +0 -7
- package/lib/src/views/layout/components/Sidebar/Item.vue2.cjs +0 -3
- package/lib/src/views/layout/components/Sidebar/Link.vue.cjs +0 -9
- package/lib/src/views/layout/components/Sidebar/SidebarItem.vue.cjs +0 -16
- package/lib/src/views/layout/components/Sidebar/SidebarItem.vue2.cjs +0 -2
- package/lib/src/views/layout/components/Sidebar/index.vue.cjs +0 -51
- package/lib/src/views/layout/components/iframe-page.vue.cjs +0 -12
- package/lib/src/views/layout/components/iframe-page.vue2.cjs +0 -2
- package/lib/src/views/layout/components/tabs/tab-content.vue.cjs +0 -60
- package/lib/src/views/layout/components/tabs/tab-content.vue2.cjs +0 -2
- package/lib/src/views/layout/components/tabs/tab-content.vue3.cjs +0 -2
- package/lib/src/views/layout/mixin/ResizeHandler.cjs +0 -14
- package/lib/src/views/layout/tab-content-iframe-index.vue.cjs +0 -12
- package/lib/src/views/layout/tab-content-iframe-index.vue2.cjs +0 -2
- package/lib/src/views/layout/tab-content-index.vue.cjs +0 -22
- package/lib/src/views/layout/tab-content-index.vue2.cjs +0 -2
- package/lib/src/views/login/authredirect.vue.cjs +0 -6
- package/lib/src/views/redirect/index.vue.cjs +0 -17
- package/lib/src/views/super-icon/index.cjs +0 -5
- package/lib/src/views/super-icon/src/index.vue.cjs +0 -5
- package/lib/src/views/super-icon/src/index.vue2.cjs +0 -10
- package/lib/src/views/super-icon/src/index.vue3.cjs +0 -2
- package/lib/src/views/svg-icon/src/svg-icon.vue.cjs +0 -2
- package/lib/src/views/svg-icon/src/svg-icon.vue2.cjs +0 -12
- package/lib/src/views/wf-history/tache-subprocess-history.vue.cjs +0 -12
- package/lib/src/views/wf-history/tache-subprocess-history.vue2.cjs +0 -2
- package/lib/style.css +0 -3103
- package/lib/super-grid/index.cjs +0 -5
- package/lib/super-grid/src/apis.cjs +0 -477
- package/lib/super-grid/src/columns-config.vue.cjs +0 -76
- package/lib/super-grid/src/components/grid-icon.vue.cjs +0 -39
- package/lib/super-grid/src/components/grid-radio-input.vue.cjs +0 -22
- package/lib/super-grid/src/components/grid-radio-input.vue2.cjs +0 -3
- package/lib/super-grid/src/components/mobile-table-card.cjs +0 -99
- package/lib/super-grid/src/components/select-input.vue.cjs +0 -141
- package/lib/super-grid/src/components/select-input.vue2.cjs +0 -3
- package/lib/super-grid/src/custom-formatter.cjs +0 -163
- package/lib/super-grid/src/dynamic-input.vue.cjs +0 -465
- package/lib/super-grid/src/eventBus.cjs +0 -3
- package/lib/super-grid/src/events.cjs +0 -35
- package/lib/super-grid/src/formValidatorUtil.cjs +0 -106
- package/lib/super-grid/src/formatter.cjs +0 -69
- package/lib/super-grid/src/group-column.vue.cjs +0 -19
- package/lib/super-grid/src/header-context-menu.vue.cjs +0 -12
- package/lib/super-grid/src/header-context-menu.vue2.cjs +0 -2
- package/lib/super-grid/src/index-column.vue.cjs +0 -19
- package/lib/super-grid/src/normal-column-content.vue.cjs +0 -303
- package/lib/super-grid/src/normal-column-content.vue2.cjs +0 -2
- package/lib/super-grid/src/normal-column.vue.cjs +0 -90
- package/lib/super-grid/src/normal-column.vue2.cjs +0 -2
- package/lib/super-grid/src/public-methods.cjs +0 -20
- package/lib/super-grid/src/row-detail.vue.cjs +0 -11
- package/lib/super-grid/src/row-operation.vue.cjs +0 -82
- package/lib/super-grid/src/row-operation.vue2.cjs +0 -2
- package/lib/super-grid/src/scan-util.cjs +0 -98
- package/lib/super-grid/src/search-button.vue.cjs +0 -20
- package/lib/super-grid/src/search-condition-input.vue.cjs +0 -13
- package/lib/super-grid/src/search-condition-list.vue.cjs +0 -17
- package/lib/super-grid/src/search-form-advancedQuery.vue.cjs +0 -106
- package/lib/super-grid/src/search-form-advancedQuery.vue2.cjs +0 -2
- package/lib/super-grid/src/search-form-dialog.vue.cjs +0 -23
- package/lib/super-grid/src/search-form-item.vue.cjs +0 -120
- package/lib/super-grid/src/search-form-item.vue2.cjs +0 -2
- package/lib/super-grid/src/search-form-mobile.vue.cjs +0 -32
- package/lib/super-grid/src/search-form-mobile.vue2.cjs +0 -2
- package/lib/super-grid/src/search-form-number.vue.cjs +0 -21
- package/lib/super-grid/src/search-form-open.vue.cjs +0 -46
- package/lib/super-grid/src/search-form-ordinarySearch.vue.cjs +0 -33
- package/lib/super-grid/src/search-form-ordinarySearch.vue2.cjs +0 -2
- package/lib/super-grid/src/search-form.vue.cjs +0 -194
- package/lib/super-grid/src/search-form.vue2.cjs +0 -2
- package/lib/super-grid/src/search-methods.cjs +0 -163
- package/lib/super-grid/src/selection-column.vue.cjs +0 -9
- package/lib/super-grid/src/store.cjs +0 -3
- package/lib/super-grid/src/super-grid-service.cjs +0 -253
- package/lib/super-grid/src/super-grid.vue.cjs +0 -1083
- package/lib/super-grid/src/super-grid.vue2.cjs +0 -2
- package/lib/super-grid/src/utils.cjs +0 -373
- package/lib/super-grid/src/view-image-dialog.vue.cjs +0 -60
- package/lib/super-icon/index.cjs +0 -5
- package/lib/super-icon/src/index.vue.cjs +0 -5
- package/lib/super-icon/src/index.vue2.cjs +0 -10
- package/lib/super-icon/src/index.vue3.cjs +0 -2
- package/lib/super-nine-grid/index.cjs +0 -5
- package/lib/super-nine-grid/src/apis.cjs +0 -33
- package/lib/super-nine-grid/src/custom-formatter.cjs +0 -33
- package/lib/super-nine-grid/src/formatter.cjs +0 -36
- package/lib/super-nine-grid/src/search-form-number.vue.cjs +0 -9
- package/lib/super-nine-grid/src/search-form.vue.cjs +0 -84
- package/lib/super-nine-grid/src/search-form.vue2.cjs +0 -2
- package/lib/super-nine-grid/src/search-methods.cjs +0 -47
- package/lib/super-nine-grid/src/store.cjs +0 -3
- package/lib/super-nine-grid/src/super-grid-service.cjs +0 -35
- package/lib/super-nine-grid/src/super-nine-grid.vue.cjs +0 -215
- package/lib/super-nine-grid/src/super-nine-grid.vue2.cjs +0 -2
- package/lib/super-nine-grid/src/utils.cjs +0 -36
- package/lib/svg-icon/index.cjs +0 -5
- package/lib/svg-icon/src/svg-icon.vue.cjs +0 -12
- package/lib/svg-icon/src/svg-icon.vue2.cjs +0 -2
- package/lib/utils/gogocodeTransfer.cjs +0 -28
- package/lib/utils/memory-cache-utils.cjs +0 -28
- package/lib/utils/organization.cjs +0 -55
- package/lib/utils/utils.cjs +0 -85
- package/lib/utils/value-set.cjs +0 -92
- package/lib/valid-code/index.cjs +0 -5
- package/lib/valid-code/src/valid-code.vue.cjs +0 -20
- package/lib/valid-code/src/valid-code.vue2.cjs +0 -2
- package/lib/workflow-button/index.cjs +0 -5
- package/lib/workflow-button/src/workflow-button.vue.cjs +0 -80
- package/lib/workflow-history-list/index.cjs +0 -5
- package/lib/workflow-history-list/src/api.cjs +0 -5
- package/lib/workflow-history-list/src/workflow-history-list.vue.cjs +0 -83
- package/lib/workflow-history-list/src/workflow-history-list.vue2.cjs +0 -2
- package/lib/workgroup-tree/index.cjs +0 -5
- package/lib/workgroup-tree/src/workgroup-tree.vue.cjs +0 -17
- package/lib/workgroup-tree-inline/index.cjs +0 -5
- package/lib/workgroup-tree-inline/src/search-result.vue.cjs +0 -35
- package/lib/workgroup-tree-inline/src/search-result.vue2.cjs +0 -2
- package/lib/workgroup-tree-inline/src/workgroup-tree-inline.vue.cjs +0 -119
- package/lib/workgroup-tree-inline/src/workgroup-tree-inline.vue2.cjs +0 -2
- package/lib/workgroup-tree-inline/src/workgroup-tree-service.cjs +0 -33
- package/lib/workgroup-tree-mobile/index.cjs +0 -5
- package/lib/workgroup-tree-mobile/src/dept-result.vue.cjs +0 -14
- package/lib/workgroup-tree-mobile/src/dept-result.vue2.cjs +0 -3
- package/lib/workgroup-tree-mobile/src/workgroup-tree-app.vue.cjs +0 -13
- package/lib/workgroup-tree-mobile/src/workgroup-tree-app.vue2.cjs +0 -2
- package/lib/workgroup-tree-mobile/src/workgroup-tree-app.vue3.cjs +0 -3
- package/lib/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue.cjs +0 -99
- package/lib/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue2.cjs +0 -3
- package/lib/workgroup-tree-mobile/src/workgroup-tree-service.cjs +0 -25
- package/lib/workgroup-user-tree/index.cjs +0 -5
- package/lib/workgroup-user-tree/src/workgroup-user-tree.vue.cjs +0 -17
- package/lib/workgroup-user-tree-inline/index.cjs +0 -5
- package/lib/workgroup-user-tree-inline/src/search-result.vue.cjs +0 -35
- package/lib/workgroup-user-tree-inline/src/search-result.vue2.cjs +0 -2
- package/lib/workgroup-user-tree-inline/src/workgroup-tree-inline-service.cjs +0 -71
- package/lib/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue.cjs +0 -163
- package/lib/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue2.cjs +0 -2
- package/lib/workgroup-user-tree-mobile/src/dept-path.vue.cjs +0 -13
- package/lib/workgroup-user-tree-mobile/src/dept-path.vue2.cjs +0 -3
- package/lib/workgroup-user-tree-mobile/src/dept-result.vue.cjs +0 -14
- package/lib/workgroup-user-tree-mobile/src/dept-result.vue2.cjs +0 -3
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue.cjs +0 -13
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue2.cjs +0 -2
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue3.cjs +0 -3
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue.cjs +0 -124
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue2.cjs +0 -3
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-service.cjs +0 -20
- package/lib/year-range-picker/index.cjs +0 -5
- package/lib/year-range-picker/src/year-range-picker.vue.cjs +0 -11
- package/src/api/sso-service.js +0 -222
- package/src/api/tab.js +0 -36
- package/src/assets/401/401.gif +0 -0
- package/src/assets/404/404-cloud.png +0 -0
- package/src/assets/404/404.png +0 -0
- package/src/assets/chat-embed/background.png +0 -0
- package/src/assets/chat-embed/robot.gif +0 -0
- package/src/assets/chat-embed/robot.svg +0 -32
- package/src/assets/cloud.png +0 -0
- package/src/assets/nonemessage.png +0 -0
- package/src/assets/tab-selectWhite.png +0 -0
- package/src/components/Affix/index.vue +0 -272
- package/src/components/Card/index.jsx +0 -227
- package/src/components/Scrollbar/index.vue +0 -224
- package/src/directives/permission/index.js +0 -14
- package/src/directives/permission/permission.js +0 -27
- package/src/i18n/i18n.js +0 -16
- package/src/i18n/langs/cn.js +0 -344
- package/src/i18n/langs/en.js +0 -344
- package/src/index.js +0 -22
- package/src/mixins/resizeMixin.js +0 -49
- package/src/permission.js +0 -252
- package/src/plugins.js +0 -18
- package/src/router/index.js +0 -92
- package/src/store/getters.js +0 -26
- package/src/store/index.js +0 -23
- package/src/store/modules/app.js +0 -96
- package/src/store/modules/chat-ai-store.ts +0 -85
- package/src/store/modules/permission.js +0 -143
- package/src/store/modules/system.js +0 -35
- package/src/store/modules/tab-content.js +0 -42
- package/src/store/modules/table.js +0 -76
- package/src/store/modules/user.js +0 -448
- package/src/utils/auth-api.js +0 -370
- package/src/utils/auth.js +0 -194
- package/src/utils/calculator/calculator-factory-wf.js +0 -465
- package/src/utils/calculator/calculator-factory.js +0 -133
- package/src/utils/calculator/calculator-util.js +0 -184
- package/src/utils/chat-ai-util.ts +0 -41
- package/src/utils/common-util.js +0 -1019
- package/src/utils/dingtalk-util.ts +0 -43
- package/src/utils/eventBus.js +0 -10
- package/src/utils/file-util.ts +0 -42
- package/src/utils/global-prop.ts +0 -44
- package/src/utils/guid.js +0 -13
- package/src/utils/i18n-util.js +0 -145
- package/src/utils/iconUtils.js +0 -37
- package/src/utils/iframe-communicator.js +0 -234
- package/src/utils/index.js +0 -102
- package/src/utils/insert_css.js +0 -47
- package/src/utils/json-util.ts +0 -85
- package/src/utils/jump-page-utils.js +0 -829
- package/src/utils/local-storage.js +0 -33
- package/src/utils/menu.js +0 -19
- package/src/utils/permission.js +0 -126
- package/src/utils/permissionAuth.js +0 -311
- package/src/utils/range-selector.js +0 -204
- package/src/utils/request.js +0 -407
- package/src/utils/resize.js +0 -19
- package/src/utils/restful-interface-utils.js +0 -57
- package/src/utils/util.js +0 -1000
- package/src/utils/validate.js +0 -34
- package/src/utils/voice-setting-cache.js +0 -497
- package/src/utils/watermark-cache.js +0 -13
- package/src/utils/watermark.js +0 -119
- package/src/utils/workflow-util.js +0 -107
- package/src/views/404.vue +0 -248
- package/src/views/dsc-component/Sidebar/Item.vue +0 -95
- package/src/views/dsc-component/Sidebar/Link.vue +0 -38
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +0 -245
- package/src/views/dsc-component/Sidebar/index.vue +0 -258
- package/src/views/dsc-component/tabs/tab-content.vue +0 -230
- package/src/views/error-page/401.vue +0 -106
- package/src/views/error-page/404.vue +0 -248
- package/src/views/layout/EmptyLayout.vue +0 -3
- package/src/views/layout/Layout.vue +0 -85
- package/src/views/layout/NewLayout.vue +0 -18
- package/src/views/layout/components/AppMain.vue +0 -46
- package/src/views/layout/components/Breadcrumb/index.vue +0 -158
- package/src/views/layout/components/Menubar/Item.vue +0 -125
- package/src/views/layout/components/Menubar/Link.vue +0 -38
- package/src/views/layout/components/Menubar/SidebarItem.vue +0 -333
- package/src/views/layout/components/Menubar/index.vue +0 -250
- package/src/views/layout/components/Sidebar/Item.vue +0 -33
- package/src/views/layout/components/Sidebar/Link.vue +0 -38
- package/src/views/layout/components/Sidebar/SidebarItem.vue +0 -179
- package/src/views/layout/components/Sidebar/index.vue +0 -141
- package/src/views/layout/components/iframe-page.vue +0 -38
- package/src/views/layout/components/index.js +0 -4
- package/src/views/layout/components/tabs/tab-content.vue +0 -273
- package/src/views/layout/mixin/ResizeHandler.js +0 -41
- package/src/views/layout/tab-content-iframe-index.vue +0 -38
- package/src/views/layout/tab-content-index.vue +0 -92
- package/src/views/login/authredirect.vue +0 -10
- package/src/views/login/index.vue +0 -296
- package/src/views/login/update-password.vue +0 -246
- package/src/views/redirect/index.vue +0 -14
- package/src/views/super-icon/index.js +0 -6
- package/src/views/super-icon/src/index.vue +0 -52
- package/src/views/svg-icon/index.js +0 -6
- package/src/views/svg-icon/src/svg-icon.vue +0 -43
- package/src/views/wf-history/tache-subprocess-history.vue +0 -45
- package/vite.config.js +0 -103
package/src/utils/validate.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Created by jiachenpan on 16/11/18.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export function validUsername(str) {
|
|
6
|
-
// const valid_map = ['admin', 'editor']
|
|
7
|
-
// return valid_map.indexOf(str.trim()) >= 0
|
|
8
|
-
return true
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/* 合法uri*/
|
|
12
|
-
export function validateURL(textval) {
|
|
13
|
-
const urlregex =
|
|
14
|
-
/^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
|
|
15
|
-
return urlregex.test(textval)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/* 小写字母*/
|
|
19
|
-
export function validateLowerCase(str) {
|
|
20
|
-
const reg = /^[a-z]+$/
|
|
21
|
-
return reg.test(str)
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/* 大写字母*/
|
|
25
|
-
export function validateUpperCase(str) {
|
|
26
|
-
const reg = /^[A-Z]+$/
|
|
27
|
-
return reg.test(str)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/* 大小写字母*/
|
|
31
|
-
export function validateAlphabets(str) {
|
|
32
|
-
const reg = /^[A-Za-z]+$/
|
|
33
|
-
return reg.test(str)
|
|
34
|
-
}
|
|
@@ -1,497 +0,0 @@
|
|
|
1
|
-
import { formatDate, isValidDate } from './common-util'
|
|
2
|
-
const voiceSetting = 'AMB_VOICE_SETTING'
|
|
3
|
-
const voiceLeafMenu = 'AMB_VOICE_LEAF_MENU'
|
|
4
|
-
|
|
5
|
-
let voiceLeafMenuCache = null
|
|
6
|
-
export function removeVoiceCache() {
|
|
7
|
-
removeVoiceLeafMenu()
|
|
8
|
-
removeVoiceSetting()
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function getVoiceLeafMenuCache() {
|
|
12
|
-
return localStorage.getItem(voiceLeafMenu)
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function cacheVoiceLeafMenu(value) {
|
|
16
|
-
localStorage.setItem(voiceLeafMenu, value)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function removeVoiceLeafMenu() {
|
|
20
|
-
localStorage.removeItem(voiceLeafMenu)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function getVoiceSettingCache() {
|
|
24
|
-
return localStorage.getItem(voiceSetting)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export function cacheVoiceSetting(value) {
|
|
28
|
-
localStorage.setItem(voiceSetting, value)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function removeVoiceSetting() {
|
|
32
|
-
localStorage.removeItem(voiceSetting)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// 获得语音配置信息,格式是:
|
|
36
|
-
/**
|
|
37
|
-
[{
|
|
38
|
-
command:'不合格品表单',
|
|
39
|
-
url:'http://27.154.58.46:23888/iqc/#/dsc-full-screen/page?customSystem=iqc&pageCode=2e14dc3b-c82e-48fe-9e9b-785509f1aece&jumpMode=newTab&_systemName_=%E8%BF%9B%E6%96%99%E6%A3%80%E9%AA%8C%E7%AE%A1%E7%90%86&isNewPage=true',
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
command:'不合格品台账',
|
|
44
|
-
url:'xxxx'
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
command:'不合格品处理柏拉图',
|
|
48
|
-
params:[
|
|
49
|
-
{
|
|
50
|
-
name:'param1',
|
|
51
|
-
title:'统计日期',
|
|
52
|
-
dataType:'dateRange',
|
|
53
|
-
|
|
54
|
-
format:'YYYY-MM-DD/YYYY-MM-DD HH:mm:ss',
|
|
55
|
-
example:'请说 最近1周 或 最近1个月等和时间相关的语句'
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
name:'param2',
|
|
59
|
-
title:'基地',
|
|
60
|
-
dataType:'number',
|
|
61
|
-
options:{'安必兴':0,'数据分析':2176}
|
|
62
|
-
}
|
|
63
|
-
],
|
|
64
|
-
url:'http://27.154.58.46:23888/iqc/#/dsc/page?pageCode=6a4be508-f0c2-47ab-acc4-5dcc82f26237&isNewPage=true&customSystem=iqc&_menuCode=6a4be508-f0c2-47ab-acc4-5dcc82f26237&_menuName=%E4%B8%8D%E5%90%88%E6%A0%BC%E5%A4%84%E7%90%86%E6%9F%8F%E6%8B%89%E5%9B%BE'
|
|
65
|
-
}]
|
|
66
|
-
*/
|
|
67
|
-
export function getVoiceSetting() {
|
|
68
|
-
return new Promise((resolve, reject) => {
|
|
69
|
-
let voiceSetting = getVoiceSettingCache()
|
|
70
|
-
if (!voiceSetting || voiceSetting === 'EMPTY_VALUE') {
|
|
71
|
-
resolve()
|
|
72
|
-
// window.$vueApp.config.globalProperties.$http.get(window.$vueApp.config.globalProperties.baseAPI + '/component/watermark').then((data)=>{
|
|
73
|
-
// if(data){
|
|
74
|
-
// voiceSetting = data
|
|
75
|
-
// cacheVoiceSetting(JSON.stringify(voiceSetting))
|
|
76
|
-
// resolve(voiceSetting)
|
|
77
|
-
// } else {
|
|
78
|
-
// cacheVoiceSetting('EMPTY_VALUE')
|
|
79
|
-
// resolve()
|
|
80
|
-
// }
|
|
81
|
-
// })
|
|
82
|
-
} else {
|
|
83
|
-
try {
|
|
84
|
-
voiceSetting = JSON.parse(voiceSetting)
|
|
85
|
-
resolve(voiceSetting)
|
|
86
|
-
} catch (error) {
|
|
87
|
-
console.error('voiceSetting content error.', error)
|
|
88
|
-
resolve()
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
})
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* voiceSetting的格式为:
|
|
96
|
-
[{
|
|
97
|
-
command:'不合格品表单',
|
|
98
|
-
url:'http://27.154.58.46:23888/iqc/#/dsc-full-screen/page?customSystem=iqc&pageCode=2e14dc3b-c82e-48fe-9e9b-785509f1aece&jumpMode=newTab&_systemName_=%E8%BF%9B%E6%96%99%E6%A3%80%E9%AA%8C%E7%AE%A1%E7%90%86&isNewPage=true',
|
|
99
|
-
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
command:'不合格品台账',
|
|
103
|
-
url:'xxxx'
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
command:'不合格品处理柏拉图',
|
|
107
|
-
params:[
|
|
108
|
-
{
|
|
109
|
-
name:'param1',
|
|
110
|
-
title:'统计日期',
|
|
111
|
-
dataType:'dateRange',
|
|
112
|
-
format:'YYYY-MM-DD/YYYY-MM-DD HH:mm:ss',
|
|
113
|
-
example:'请说 最近1周 或 最近1个月等和时间相关的语句'
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
name:'param2',
|
|
117
|
-
title:'基地',
|
|
118
|
-
dataType:'number',
|
|
119
|
-
options:{'安必兴':0,'数据分析':2176}
|
|
120
|
-
}
|
|
121
|
-
],
|
|
122
|
-
url:'http://27.154.58.46:23888/iqc/#/dsc/page?pageCode=6a4be508-f0c2-47ab-acc4-5dcc82f26237&isNewPage=true&customSystem=iqc&_menuCode=6a4be508-f0c2-47ab-acc4-5dcc82f26237&_menuName=%E4%B8%8D%E5%90%88%E6%A0%BC%E5%A4%84%E7%90%86%E6%9F%8F%E6%8B%89%E5%9B%BE'
|
|
123
|
-
}]
|
|
124
|
-
*/
|
|
125
|
-
// voiceMsg:识别到的语音内容或ai对话框输入的内容
|
|
126
|
-
// voiceSetting:配置对象数组
|
|
127
|
-
// settingItemInfo:解析到的指定命令的配置信息
|
|
128
|
-
// paramInfo 参数配置对象
|
|
129
|
-
// params 指定命令的参数值对象,key是参数name,value是解析获得的值
|
|
130
|
-
export function parseVoiceMsg(voiceMsg, voiceSetting, settingItemInfo, paramInfo, paramsValue) {
|
|
131
|
-
return new Promise((resolve, reject) => {
|
|
132
|
-
if (!voiceSetting) {
|
|
133
|
-
resolve({ status: 'fail', commandResult: '未获得命令配置信息,请联系运维人员进行维护' })
|
|
134
|
-
}
|
|
135
|
-
if (!voiceMsg) {
|
|
136
|
-
resolve({ status: 'fail', commandResult: '未获得录入的信息,请重新录入信息' })
|
|
137
|
-
}
|
|
138
|
-
// let matchedCommandItem = []
|
|
139
|
-
let settingItem = null
|
|
140
|
-
if (voiceSetting && voiceMsg) {
|
|
141
|
-
// if (settingItemInfo && Array.isArray(settingItemInfo) && settingItemInfo.length > 1) {
|
|
142
|
-
// // 表示上次匹配到了多条命令, 本次交互用户选择执行哪条命令
|
|
143
|
-
// try {
|
|
144
|
-
// const as = parseInt(voiceMsg)
|
|
145
|
-
// if (!isNaN(as)) {
|
|
146
|
-
// matchedCommandItem = [settingItemInfo[as - 1]]
|
|
147
|
-
// }
|
|
148
|
-
// } catch (error) {
|
|
149
|
-
// matchedCommandItem = settingItemInfo
|
|
150
|
-
// }
|
|
151
|
-
// }
|
|
152
|
-
// if (matchedCommandItem.length === 0) {
|
|
153
|
-
// for (let i = 0; i < voiceSetting.length; i++) {
|
|
154
|
-
// const item = voiceSetting[i]
|
|
155
|
-
// if (item.command && voiceMsg.indexOf(item.command) >= 0) {
|
|
156
|
-
// // 表示匹配到了命令
|
|
157
|
-
// matchedCommandItem.push(item)
|
|
158
|
-
// }
|
|
159
|
-
// }
|
|
160
|
-
// }
|
|
161
|
-
|
|
162
|
-
// 获取匹配到的最长的命令
|
|
163
|
-
let maxCommandLength = 0
|
|
164
|
-
for (let i = 0; i < voiceSetting.length; i++) {
|
|
165
|
-
const item = voiceSetting[i]
|
|
166
|
-
if (item.command && voiceMsg.indexOf(item.command) >= 0 && item.command.length > maxCommandLength) {
|
|
167
|
-
// 表示匹配到了命令
|
|
168
|
-
settingItem = item
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
if (settingItem) {
|
|
172
|
-
// 表示匹配到了命令
|
|
173
|
-
// 重新封装参数
|
|
174
|
-
paramsValue = {}
|
|
175
|
-
// if (matchedCommandItem.length > 1) {
|
|
176
|
-
// // 表示匹配到了多个命令
|
|
177
|
-
// let msg = `匹配到多个命令,请选择命令编号,例如语音输入“1”表示选择第一个命令【${matchedCommandItem[0].command}】:<br/>`
|
|
178
|
-
// matchedCommandItem.forEach((item, index) => {
|
|
179
|
-
// msg += `${index + 1}. ${item.command}<br/>`
|
|
180
|
-
// })
|
|
181
|
-
// msg += ''
|
|
182
|
-
// resolve({ status: 'ok', commandResult: msg, settingItem: matchedCommandItem })
|
|
183
|
-
// return
|
|
184
|
-
// } else {
|
|
185
|
-
// const settingItem = matchedCommandItem[0]
|
|
186
|
-
if (settingItem.params && settingItem.params.length > 0) {
|
|
187
|
-
// 表示需要解析参数
|
|
188
|
-
let msg = '匹配到命令【' + settingItem.command + '】,该命令需要的参数有'
|
|
189
|
-
settingItem.params.forEach((item) => {
|
|
190
|
-
msg = msg + '【' + item.title + '】'
|
|
191
|
-
})
|
|
192
|
-
msg = msg + ',请录入第一个参数【' + settingItem.params[0].title + '】,如果跳过该参数,请说‘跳过’'
|
|
193
|
-
let param0 = settingItem.params[0]
|
|
194
|
-
param0.index = 0
|
|
195
|
-
resolve({ status: 'ok', commandResult: msg, settingItem, paramInfo: param0 })
|
|
196
|
-
} else {
|
|
197
|
-
// 表示不需要解析参数,直接跳转页面就行
|
|
198
|
-
let msg = '匹配到命令【' + settingItem.command + '】,跳转到该页面'
|
|
199
|
-
resolve({ status: 'ok', commandResult: msg, url: settingItem.url, command: settingItem.command })
|
|
200
|
-
}
|
|
201
|
-
// }
|
|
202
|
-
} else if (paramInfo && paramInfo.name) {
|
|
203
|
-
// 表示不是命令,可能是参数
|
|
204
|
-
let paramsArr = []
|
|
205
|
-
if (settingItemInfo && settingItemInfo.params) {
|
|
206
|
-
paramsArr = settingItemInfo.params
|
|
207
|
-
}
|
|
208
|
-
if (voiceMsg.indexOf('跳过') >= 0) {
|
|
209
|
-
const val = '_jump_param'
|
|
210
|
-
paramInfo.value = val
|
|
211
|
-
paramsValue[paramInfo.name] = val
|
|
212
|
-
const paramResult = packageSuccessParamResult(paramsArr, paramInfo, paramsValue, settingItemInfo)
|
|
213
|
-
resolve(paramResult)
|
|
214
|
-
} else if (paramInfo.options && Object.keys(paramInfo.options).length > 0) {
|
|
215
|
-
// 表示从选项值中获得
|
|
216
|
-
console.log('parseVoiceMsg----paramInfo.options=', paramInfo.options)
|
|
217
|
-
let val
|
|
218
|
-
for (let key in paramInfo.options) {
|
|
219
|
-
const optionVal = paramInfo.options[key]
|
|
220
|
-
if (voiceMsg.indexOf(key) >= 0 || (optionVal + '').indexOf(key) >= 0) {
|
|
221
|
-
val = optionVal
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
console.log('parseVoiceMsg----voiceMsg=', voiceMsg, 'val=', val)
|
|
225
|
-
if (val === undefined || val === null) {
|
|
226
|
-
// 表示参数值无效,重新录入该参数
|
|
227
|
-
const paramResult = packageFailParamResult(paramInfo)
|
|
228
|
-
resolve(paramResult)
|
|
229
|
-
} else {
|
|
230
|
-
paramInfo.value = val
|
|
231
|
-
paramsValue[paramInfo.name] = val
|
|
232
|
-
const paramResult = packageSuccessParamResult(paramsArr, paramInfo, paramsValue, settingItemInfo)
|
|
233
|
-
resolve(paramResult)
|
|
234
|
-
}
|
|
235
|
-
} else if (paramInfo.dataType && (paramInfo.dataType === 'date' || paramInfo.dataType === 'dateRange')) {
|
|
236
|
-
// 表示是日期,需要走ai接口返回实际日期值
|
|
237
|
-
let format = 'yyyy-MM-dd'
|
|
238
|
-
if (paramInfo.format) {
|
|
239
|
-
format = paramInfo.format
|
|
240
|
-
}
|
|
241
|
-
paramInfo.orgMsg = voiceMsg
|
|
242
|
-
const today = new Date()
|
|
243
|
-
const todayStr = formatDate(today, 'yyyy-MM-dd')
|
|
244
|
-
paramInfo.msg =
|
|
245
|
-
'今天是' +
|
|
246
|
-
todayStr +
|
|
247
|
-
'日,“' +
|
|
248
|
-
voiceMsg +
|
|
249
|
-
'”,请从这句话中提取出时间或时间范围,日期格式为' +
|
|
250
|
-
format +
|
|
251
|
-
',请直接给出答案,时间范围之间以~分隔,如果原句未指定时间或时间范围,请直接回答null'
|
|
252
|
-
executeAi(paramInfo)
|
|
253
|
-
.then((result) => {
|
|
254
|
-
let formatDateResult
|
|
255
|
-
if (result && result != 'null') {
|
|
256
|
-
formatDateResult = formatAiDateResult(result, format, paramInfo.props, paramInfo.name)
|
|
257
|
-
}
|
|
258
|
-
if (formatDateResult) {
|
|
259
|
-
paramInfo.value = formatDateResult
|
|
260
|
-
paramsValue[paramInfo.name] = formatDateResult
|
|
261
|
-
const paramResult = packageSuccessParamResult(paramsArr, paramInfo, paramsValue, settingItemInfo)
|
|
262
|
-
resolve(paramResult)
|
|
263
|
-
} else {
|
|
264
|
-
let example = '请说:最近1周、最近1个月等和时间相关的语句'
|
|
265
|
-
if (paramInfo.example) {
|
|
266
|
-
example = paramInfo.example
|
|
267
|
-
}
|
|
268
|
-
paramInfo.example = example
|
|
269
|
-
const paramResult = packageFailParamResult(paramInfo)
|
|
270
|
-
resolve(paramResult)
|
|
271
|
-
}
|
|
272
|
-
})
|
|
273
|
-
.catch((error) => {
|
|
274
|
-
console.error('解析日期参数失败')
|
|
275
|
-
reject(error)
|
|
276
|
-
})
|
|
277
|
-
} else {
|
|
278
|
-
paramInfo.value = voiceMsg
|
|
279
|
-
paramsValue[paramInfo.name] = voiceMsg
|
|
280
|
-
const paramResult = packageSuccessParamResult(paramsArr, paramInfo, paramsValue, settingItemInfo)
|
|
281
|
-
resolve(paramResult)
|
|
282
|
-
}
|
|
283
|
-
} else {
|
|
284
|
-
if (!voiceLeafMenuCache) {
|
|
285
|
-
const cache = getVoiceLeafMenuCache()
|
|
286
|
-
if (cache) {
|
|
287
|
-
try {
|
|
288
|
-
voiceLeafMenuCache = JSON.parse(cache)
|
|
289
|
-
} catch (error) {
|
|
290
|
-
voiceLeafMenuCache = []
|
|
291
|
-
}
|
|
292
|
-
} else {
|
|
293
|
-
voiceLeafMenuCache = []
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
if (!voiceLeafMenuCache || voiceLeafMenuCache.length === 0) {
|
|
297
|
-
resolve({ status: 'fail', commandResult: '未解析到有效命令,请重新录入命令' })
|
|
298
|
-
}
|
|
299
|
-
const matchMenuItems = []
|
|
300
|
-
// 表示未匹配到任何命令,尝试调用后台接口进行模糊匹配
|
|
301
|
-
for (let i = 0; i < voiceLeafMenuCache.length; i++) {
|
|
302
|
-
if (voiceMsg.indexOf(voiceLeafMenuCache[i].name) >= 0) {
|
|
303
|
-
matchMenuItems.push(voiceLeafMenuCache[i].id)
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
if (matchMenuItems.length === 0) {
|
|
307
|
-
resolve({ status: 'fail', commandResult: '未解析到有效命令,请重新录入命令' })
|
|
308
|
-
return
|
|
309
|
-
}
|
|
310
|
-
window.$http
|
|
311
|
-
.post(
|
|
312
|
-
window.$vueApp.config.globalProperties.baseAPI + '/bs/ai-voice-command/command/match-menu',
|
|
313
|
-
matchMenuItems
|
|
314
|
-
)
|
|
315
|
-
.then((res) => {
|
|
316
|
-
console.log('voice.command.........', res)
|
|
317
|
-
if (res && Object.keys(res).length > 0) {
|
|
318
|
-
if (Object.keys(res).length === 1) {
|
|
319
|
-
const item = res[Object.keys(res)[0]]
|
|
320
|
-
// 表示不需要解析参数,直接跳转页面就行
|
|
321
|
-
let msg = '匹配到菜单【' + item.name + '】,跳转到该页面'
|
|
322
|
-
resolve({ status: 'ok', commandResult: msg, url: item.url, command: item.name })
|
|
323
|
-
} else {
|
|
324
|
-
let msg = '匹配到多个菜单,请点击下面的链接跳转到对应页面:<br/>'
|
|
325
|
-
Object.keys(res).forEach((key) => {
|
|
326
|
-
const item = res[key]
|
|
327
|
-
msg += `<amb-alink href="${item.url}" target="_blank" rel="noopener noreferrer" text="【${item.name}】"></amb-alink> <br/>`
|
|
328
|
-
})
|
|
329
|
-
resolve({ status: 'ok', commandResult: msg })
|
|
330
|
-
}
|
|
331
|
-
} else {
|
|
332
|
-
resolve({ status: 'fail', commandResult: '未解析到有效命令,请重新录入命令' })
|
|
333
|
-
}
|
|
334
|
-
})
|
|
335
|
-
.catch((error) => {
|
|
336
|
-
console.error('获取语音命令失败', error)
|
|
337
|
-
resolve({ status: 'fail', commandResult: '未解析到有效命令,请重新录入命令' })
|
|
338
|
-
})
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
})
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
function formatAiDateResult(dateResult, format, propsName, paramName) {
|
|
345
|
-
if (!format) {
|
|
346
|
-
format = 'yyyy-MM-dd'
|
|
347
|
-
}
|
|
348
|
-
let isValid = false
|
|
349
|
-
if (dateResult) {
|
|
350
|
-
if (dateResult.indexOf('~') >= 0) {
|
|
351
|
-
// 表示是区间
|
|
352
|
-
const dateArr = dateResult.split('~')
|
|
353
|
-
isValid = isValidDate(dateArr[0])
|
|
354
|
-
if (isValid) {
|
|
355
|
-
isValid = isValidDate(dateArr[1])
|
|
356
|
-
}
|
|
357
|
-
if (isValid) {
|
|
358
|
-
const date1 = new Date(dateArr[0])
|
|
359
|
-
const date2 = new Date(dateArr[1])
|
|
360
|
-
if (propsName) {
|
|
361
|
-
propsName = propsName.join(',')
|
|
362
|
-
} else {
|
|
363
|
-
propsName = paramName
|
|
364
|
-
}
|
|
365
|
-
return formatDate(date1, format) + '~' + formatDate(date2, format) + '~' + propsName
|
|
366
|
-
}
|
|
367
|
-
} else {
|
|
368
|
-
// 表示是日期
|
|
369
|
-
isValid = isValidDate(dateResult)
|
|
370
|
-
if (isValid) {
|
|
371
|
-
const date1 = new Date(dateResult)
|
|
372
|
-
return formatDate(date1, format)
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
return isValid
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
// 根据父级code和资产名称查询资产code
|
|
380
|
-
function executeAi(data) {
|
|
381
|
-
return window.$vueApp.config.globalProperties.$http.post(
|
|
382
|
-
window.$vueApp.config.globalProperties.baseAPI + '/component/ai/analyzeParam',
|
|
383
|
-
data
|
|
384
|
-
)
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
function getNextParamInfo(paramsArr, currentParamIndex) {
|
|
388
|
-
console.log('getNextParamInfo---currentParamIndex=', currentParamIndex, 'paramsArr=', paramsArr)
|
|
389
|
-
if (currentParamIndex === undefined && currentParamIndex === null) {
|
|
390
|
-
currentParamIndex = 1
|
|
391
|
-
}
|
|
392
|
-
if (paramsArr) {
|
|
393
|
-
const nextParamIndex = currentParamIndex + 1
|
|
394
|
-
console.log(
|
|
395
|
-
'getNextParamInfo---nextParamIndex=',
|
|
396
|
-
nextParamIndex,
|
|
397
|
-
'paramsArr=',
|
|
398
|
-
paramsArr,
|
|
399
|
-
'paramsArr.length=',
|
|
400
|
-
paramsArr.length
|
|
401
|
-
)
|
|
402
|
-
if (paramsArr.length > nextParamIndex) {
|
|
403
|
-
let nextParam = paramsArr[nextParamIndex]
|
|
404
|
-
nextParam['index'] = nextParamIndex
|
|
405
|
-
console.log('getNextParamInfo---nextParam=', nextParam)
|
|
406
|
-
return nextParam
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
function packageSuccessParamResult(paramsArr, paramInfo, paramsValue, settingItemInfo) {
|
|
412
|
-
let nextParam
|
|
413
|
-
let successParamResult = {}
|
|
414
|
-
// 已经有值的参数个数
|
|
415
|
-
const hasValueParamsLength = Object.keys(paramsValue).length
|
|
416
|
-
console.log(
|
|
417
|
-
'packageSuccessParamResult---paramsArr=',
|
|
418
|
-
paramsArr,
|
|
419
|
-
'paramInfo=',
|
|
420
|
-
paramInfo,
|
|
421
|
-
'paramsValue=',
|
|
422
|
-
paramsValue,
|
|
423
|
-
'hasValueParamsLength=',
|
|
424
|
-
hasValueParamsLength
|
|
425
|
-
)
|
|
426
|
-
let paramMsg = ''
|
|
427
|
-
let isEndParam = false
|
|
428
|
-
let url
|
|
429
|
-
if (paramsArr.length === hasValueParamsLength) {
|
|
430
|
-
// 表示参数都解析完了,不需要继续解析参数,该命令解析结束
|
|
431
|
-
isEndParam = true
|
|
432
|
-
url = settingItemInfo.url
|
|
433
|
-
paramMsg = ',所有参数解析完毕,跳转到指定页面'
|
|
434
|
-
} else if (paramsArr.length > hasValueParamsLength) {
|
|
435
|
-
// 表示仍有未解析的参数,需要继续解析参数
|
|
436
|
-
nextParam = getNextParamInfo(paramsArr, paramInfo['index'])
|
|
437
|
-
console.log('packageSuccessParamResult---nextParam=', nextParam)
|
|
438
|
-
if (nextParam && (paramsValue[nextParam.name] === undefined || paramsValue[nextParam.name] === null)) {
|
|
439
|
-
// 表示存在下一个参数,并且下一个参数没有值
|
|
440
|
-
isEndParam = false
|
|
441
|
-
let optionMsg = ''
|
|
442
|
-
if (nextParam.options) {
|
|
443
|
-
const optionKeys = Object.keys(nextParam.options)
|
|
444
|
-
if (optionKeys.length > 0) {
|
|
445
|
-
optionMsg = ',该参数可选项有'
|
|
446
|
-
optionKeys.forEach((item) => {
|
|
447
|
-
optionMsg = optionMsg + '【' + item + '】'
|
|
448
|
-
})
|
|
449
|
-
optionMsg = optionMsg + ',请选择一个选项'
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
paramMsg = ',继续解析下一个参数【' + nextParam.title + '】' + optionMsg + '。如果跳过该参数,请说‘跳过’'
|
|
453
|
-
} else {
|
|
454
|
-
isEndParam = true
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
let paramTitleMsg
|
|
458
|
-
if (paramInfo.value && paramInfo.value === '_jump_param') {
|
|
459
|
-
// 表示跳过该参数
|
|
460
|
-
paramTitleMsg = '跳过'
|
|
461
|
-
} else {
|
|
462
|
-
// 表示解析成功该参数
|
|
463
|
-
let paramVal = paramInfo.value
|
|
464
|
-
if (paramInfo.dataType) {
|
|
465
|
-
if (paramInfo.dataType === 'dateRange' && paramVal && paramVal.indexOf('~') > 0) {
|
|
466
|
-
// 表示是日期区间 paramVal格式为 2025-09-17~2025-09-24~param1StartDate,param1EndDate
|
|
467
|
-
// 截取去掉最后的参数名信息
|
|
468
|
-
paramVal = paramVal.substring(0, paramVal.lastIndexOf('~'))
|
|
469
|
-
} else if (paramInfo.dataType === 'date') {
|
|
470
|
-
// 表示是日期区间 paramVal格式为 2025-09-17~2025-09-24~param1StartDate,param1EndDate
|
|
471
|
-
// 截取去掉最后的参数名信息
|
|
472
|
-
paramVal = paramVal.substring(0, paramVal.lastIndexOf('~'))
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
paramTitleMsg = '解析成功,解析到的值是【' + paramVal + '】'
|
|
476
|
-
}
|
|
477
|
-
successParamResult.status = 'ok'
|
|
478
|
-
successParamResult.paramResult = '参数【' + paramInfo.title + '】' + paramTitleMsg + paramMsg
|
|
479
|
-
successParamResult.isEndParam = isEndParam
|
|
480
|
-
successParamResult.paramInfo = nextParam
|
|
481
|
-
successParamResult.url = url
|
|
482
|
-
successParamResult.command = settingItemInfo ? settingItemInfo.command : undefined
|
|
483
|
-
return successParamResult
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
function packageFailParamResult(paramInfo) {
|
|
487
|
-
let failParamResult = {}
|
|
488
|
-
failParamResult.status = 'fail'
|
|
489
|
-
let example = ''
|
|
490
|
-
if (paramInfo.example) {
|
|
491
|
-
example = paramInfo.example
|
|
492
|
-
}
|
|
493
|
-
failParamResult.paramResult =
|
|
494
|
-
'参数【' + paramInfo.title + '】解析失败,请重新录入参数值,如果跳过该参数,请说‘跳过’。' + example
|
|
495
|
-
failParamResult.paramInfo = paramInfo
|
|
496
|
-
return failParamResult
|
|
497
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const watermarkSetting = 'AMB_WATERMARK_SETTING'
|
|
2
|
-
|
|
3
|
-
export function getWatermark() {
|
|
4
|
-
return localStorage.getItem(watermarkSetting)
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export function cacheWatermark(value) {
|
|
8
|
-
localStorage.setItem(watermarkSetting, value)
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function removeWatermark() {
|
|
12
|
-
localStorage.removeItem(watermarkSetting)
|
|
13
|
-
}
|
package/src/utils/watermark.js
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import {getWatermark, cacheWatermark, removeWatermark} from './watermark-cache'
|
|
2
|
-
import { formatDate } from './common-util'
|
|
3
|
-
const watermark = {}
|
|
4
|
-
|
|
5
|
-
const setWatermark = (str, parma, paramId) => {
|
|
6
|
-
let id = '1.23452384164.123412415'
|
|
7
|
-
if (paramId) {
|
|
8
|
-
id = paramId
|
|
9
|
-
}
|
|
10
|
-
if (document.getElementById(id) !== null) {
|
|
11
|
-
if (document.getElementById('pdfDom')) {
|
|
12
|
-
var cell1 = document.getElementById('pdfDom')
|
|
13
|
-
cell1.removeChild(document.getElementById(id))
|
|
14
|
-
} else {
|
|
15
|
-
document.body.removeChild(document.getElementById(id))
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
const can = document.createElement('canvas')
|
|
19
|
-
can.width = parma && parma.width && parma.width !== '' ? parma.width : '400' // 单个水印的宽高
|
|
20
|
-
can.height =
|
|
21
|
-
parma && parma.height && parma.height !== '' ? parma.height : '200'
|
|
22
|
-
|
|
23
|
-
const cans = can.getContext('2d')
|
|
24
|
-
cans.rotate((20 * Math.PI) / 160) // 水印偏转角度
|
|
25
|
-
cans.font =
|
|
26
|
-
parma && parma.font && parma.font !== '' ? parma.font : '17px Vedana' // 设置样式
|
|
27
|
-
cans.fillStyle =
|
|
28
|
-
parma && parma.color && parma.color !== ''
|
|
29
|
-
? parma.color
|
|
30
|
-
: 'rgba(200, 200, 200, 0.40)' // 水印字体颜色
|
|
31
|
-
cans.textAlign = 'left'
|
|
32
|
-
cans.textBaseline = 'Middle'
|
|
33
|
-
cans.fillText(str, 60, 40)
|
|
34
|
-
|
|
35
|
-
const div = document.createElement('div')
|
|
36
|
-
div.id = id
|
|
37
|
-
div.style.pointerEvents = 'none'
|
|
38
|
-
div.style.top = '10px' // 80px
|
|
39
|
-
div.style.left = '0px' // 200px
|
|
40
|
-
div.style.position = 'fixed'
|
|
41
|
-
div.style.zIndex = '10000'
|
|
42
|
-
div.style.width = '100%' // 70%
|
|
43
|
-
div.style.height = '100%' // 80%
|
|
44
|
-
div.style.background =
|
|
45
|
-
'url(' + can.toDataURL('image/png') + ') left top repeat'
|
|
46
|
-
|
|
47
|
-
if (document.getElementById('pdfDom')) {
|
|
48
|
-
var cell = document.getElementById('pdfDom')
|
|
49
|
-
cell.appendChild(div)
|
|
50
|
-
} else {
|
|
51
|
-
document.body.appendChild(div)
|
|
52
|
-
}
|
|
53
|
-
return id
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// 该方法只允许调用一次
|
|
57
|
-
function showWatermark(label, parma, user, paramId) {
|
|
58
|
-
var date = new Date()
|
|
59
|
-
date = formatDate(date, 'yyyy-MM-dd')
|
|
60
|
-
setTimeout(() => {
|
|
61
|
-
var str =
|
|
62
|
-
label && label !== '' ? label : user ? user.name + ' ' + date : date
|
|
63
|
-
let id = setWatermark(str, parma, paramId)
|
|
64
|
-
setInterval(() => {
|
|
65
|
-
if (document.getElementById(id) === null) {
|
|
66
|
-
id = setWatermark(str, parma, paramId)
|
|
67
|
-
}
|
|
68
|
-
}, 500)
|
|
69
|
-
window.onresize = () => {
|
|
70
|
-
setWatermark(str, parma, paramId)
|
|
71
|
-
}
|
|
72
|
-
})
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// 获得水印维护信息
|
|
76
|
-
export function getWatermarkSetting(){
|
|
77
|
-
return new Promise((resolve,reject)=>{
|
|
78
|
-
let watermark = getWatermark()
|
|
79
|
-
if(!watermark || watermark === 'EMPTY_VALUE'){
|
|
80
|
-
window.$vueApp.config.globalProperties.$http.get(window.$vueApp.config.globalProperties.baseAPI + '/component/watermark').then((data)=>{
|
|
81
|
-
if(data){
|
|
82
|
-
watermark = data
|
|
83
|
-
cacheWatermark(JSON.stringify(watermark))
|
|
84
|
-
// 兼容之前的代码
|
|
85
|
-
watermark.font = watermark.fontStyle
|
|
86
|
-
watermark.color = watermark.fontColor
|
|
87
|
-
resolve(watermark)
|
|
88
|
-
} else {
|
|
89
|
-
cacheWatermark('EMPTY_VALUE')
|
|
90
|
-
resolve()
|
|
91
|
-
}
|
|
92
|
-
})
|
|
93
|
-
} else {
|
|
94
|
-
try{
|
|
95
|
-
watermark = JSON.parse(watermark)
|
|
96
|
-
// 兼容之前的代码
|
|
97
|
-
watermark.font = watermark.fontStyle
|
|
98
|
-
watermark.color = watermark.fontColor
|
|
99
|
-
resolve(watermark)
|
|
100
|
-
}catch(error){
|
|
101
|
-
console.error('watermark content error.',error)
|
|
102
|
-
resolve()
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
})
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// 该方法只允许调用一次
|
|
109
|
-
export function showWatermarkNew() {
|
|
110
|
-
getWatermarkSetting().then((watermark)=>{
|
|
111
|
-
if(watermark && watermark.useRange && watermark.useRange.indexOf('page')>=0){
|
|
112
|
-
// 表示影响范围有页面,则页面显示水印
|
|
113
|
-
setWatermark(watermark.content, watermark)
|
|
114
|
-
}
|
|
115
|
-
})
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
export default watermark
|