agilebuilder-ui 1.1.65-tmp3 → 1.1.65-tmp31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/IntervalSelection/index.mjs +7 -0
- package/es/IntervalSelection/src/sectionDate.vue.mjs +49 -0
- package/es/breadcrumb/index.mjs +7 -0
- package/es/breadcrumb/src/breadcrumb.vue.mjs +28 -0
- package/es/chat-embed/index.mjs +7 -0
- package/es/chat-embed/src/chat-addition-data.vue.mjs +7 -0
- package/es/chat-embed/src/chat-addition-data.vue2.mjs +17 -0
- package/es/chat-embed/src/chat-ai-answer-tip.vue.mjs +7 -0
- package/es/chat-embed/src/chat-ai-answer-tip.vue2.mjs +29 -0
- package/es/chat-embed/src/chat-bubble-footer.vue.mjs +7 -0
- package/es/chat-embed/src/chat-bubble-footer.vue2.mjs +33 -0
- package/es/chat-embed/src/chat-embed-message.mjs +22 -0
- package/es/chat-embed/src/chat-sender.vue.mjs +7 -0
- package/es/chat-embed/src/chat-sender.vue2.mjs +158 -0
- package/es/chat-embed/src/components/answer-auto-chart.vue.mjs +7 -0
- package/es/chat-embed/src/components/answer-auto-chart.vue2.mjs +58 -0
- package/es/chat-embed/src/components/answer-home-chart.vue.mjs +7 -0
- package/es/chat-embed/src/components/answer-interaction-data.vue.mjs +7 -0
- package/es/chat-embed/src/components/answer-interaction-data.vue2.mjs +117 -0
- package/es/chat-embed/src/components/history-detail.vue.mjs +7 -0
- package/es/chat-embed/src/components/history-detail.vue2.mjs +55 -0
- package/es/chat-embed/src/header.vue.mjs +7 -0
- package/es/chat-embed/src/header.vue2.mjs +46 -0
- package/es/chat-embed/src/index.vue.mjs +7 -0
- package/es/chat-embed/src/index.vue2.mjs +311 -0
- package/es/chat-embed/src/recommendation-message.vue.mjs +7 -0
- package/es/chat-embed/src/recommendation-message.vue2.mjs +11 -0
- package/es/chat-embed/src/sidebar-item.vue.mjs +7 -0
- package/es/chat-embed/src/sidebar-item.vue2.mjs +118 -0
- package/es/chat-embed/src/util/history-message-util.mjs +96 -0
- package/es/chat-embed/src/util/mcp-utils.mjs +53 -0
- package/es/chat-embed/src/voice/index.mjs +7 -0
- package/es/chat-embed/src/voice/js/crypto-js.mjs +1000 -0
- package/es/chat-embed/src/voice/js/processor/index.umd.mjs +169 -0
- package/es/chat-embed/src/voice/voice.vue.mjs +102 -0
- package/es/date-picker-range/index.mjs +7 -0
- package/es/date-picker-range/index.vue.mjs +7 -0
- package/es/date-picker-range/index.vue2.mjs +101 -0
- package/es/department-tree/index.mjs +7 -0
- package/es/department-tree/src/department-tree.vue.mjs +23 -0
- package/es/department-tree-inline/index.mjs +7 -0
- package/es/department-tree-inline/src/department-multi-tree-inline.vue.mjs +91 -0
- package/es/department-tree-inline/src/department-single-tree-inline.vue.mjs +64 -0
- package/es/department-tree-inline/src/department-tree-inline.vue.mjs +17 -0
- package/es/department-tree-inline/src/department-tree-service.mjs +107 -0
- package/es/department-tree-inline/src/search-result.vue.mjs +40 -0
- package/es/department-tree-mobile/index.mjs +8 -0
- package/es/department-tree-mobile/src/department-tree-app.vue.mjs +16 -0
- package/es/department-tree-mobile/src/department-tree-app.vue3.mjs +5 -0
- package/es/department-tree-mobile/src/department-tree-inline-app.vue.mjs +121 -0
- package/es/department-tree-mobile/src/department-tree-inline-app.vue2.mjs +4 -0
- package/es/department-tree-mobile/src/department-tree-service.mjs +57 -0
- package/es/department-tree-mobile/src/dept-path.vue.mjs +15 -0
- package/es/department-tree-mobile/src/dept-path.vue2.mjs +4 -0
- package/es/department-tree-mobile/src/dept-result.vue.mjs +18 -0
- package/es/department-tree-mobile/src/dept-result.vue2.mjs +4 -0
- package/es/department-user-tree/index.mjs +7 -0
- package/es/department-user-tree/src/department-user-multiple-tree.vue.mjs +20 -0
- package/es/department-user-tree/src/department-user-single-tree.vue.mjs +19 -0
- package/es/department-user-tree/src/department-user-tree.vue.mjs +27 -0
- package/es/department-user-tree-inline/index.mjs +7 -0
- package/es/department-user-tree-inline/src/department-user-multiple-tree-inline.vue.mjs +168 -0
- package/es/department-user-tree-inline/src/department-user-single-tree-inline.vue.mjs +69 -0
- package/es/department-user-tree-inline/src/department-user-tree-inline.vue.mjs +16 -0
- package/es/department-user-tree-inline/src/department-user-tree-multi-service.mjs +80 -0
- package/es/department-user-tree-inline/src/department-user-tree-single-service.mjs +53 -0
- package/es/department-user-tree-inline/src/group-user/group-input.vue.mjs +39 -0
- package/es/department-user-tree-inline/src/group-user/group-list.vue.mjs +27 -0
- package/es/department-user-tree-inline/src/group-user/group-user.vue.mjs +16 -0
- package/es/department-user-tree-inline/src/group-user-multiple-tree.vue.mjs +78 -0
- package/es/department-user-tree-inline/src/group-user-single-tree.vue.mjs +34 -0
- package/es/department-user-tree-inline/src/search-result.vue.mjs +41 -0
- package/es/department-user-tree-mobile/index.mjs +8 -0
- package/es/department-user-tree-mobile/src/department-user-tree-app.vue.mjs +16 -0
- package/es/department-user-tree-mobile/src/department-user-tree-app.vue3.mjs +5 -0
- package/es/department-user-tree-mobile/src/department-user-tree-inline-app.vue.mjs +135 -0
- package/es/department-user-tree-mobile/src/department-user-tree-inline-app.vue2.mjs +4 -0
- package/es/department-user-tree-mobile/src/dept-path.vue.mjs +15 -0
- package/es/department-user-tree-mobile/src/dept-path.vue2.mjs +4 -0
- package/es/department-user-tree-mobile/src/dept-result.vue.mjs +18 -0
- package/es/department-user-tree-mobile/src/dept-result.vue2.mjs +4 -0
- package/es/directives/prevent-reclick.mjs +15 -0
- package/es/dynamic-source-select/index.mjs +7 -0
- package/es/dynamic-source-select/src/dynamic-source-select-service.mjs +32 -0
- package/es/dynamic-source-select/src/dynamic-source-select.vue.mjs +277 -0
- package/es/empty-state/index.vue.mjs +9 -0
- package/es/empty-state/index.vue2.mjs +4 -0
- package/es/fs-preview/index.mjs +7 -0
- package/es/fs-preview/src/fs-preview.vue.mjs +142 -0
- package/es/fs-upload/index.mjs +7 -0
- package/es/fs-upload/src/fs-upload-multi.vue.mjs +71 -0
- package/es/fs-upload/src/fs-upload-single.vue.mjs +73 -0
- package/es/fs-upload/src/fs-upload.vue.mjs +24 -0
- package/es/fs-upload/src/see-big-picture.vue.mjs +12 -0
- package/es/fs-upload-list/index.mjs +7 -0
- package/es/fs-upload-list/src/fs-upload-list.vue.mjs +97 -0
- package/es/fs-upload-new/index.mjs +7 -0
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-app.vue.mjs +59 -0
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-app.vue2.mjs +4 -0
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue.mjs +178 -0
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue2.mjs +4 -0
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-component.vue.mjs +7 -0
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-component.vue2.mjs +39 -0
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-input.vue.mjs +45 -0
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-input.vue2.mjs +4 -0
- package/es/fs-upload-new/src/file-upload-mobile/file-upload.vue.mjs +35 -0
- package/es/fs-upload-new/src/file-upload-mobile/file-upload.vue2.mjs +4 -0
- package/es/fs-upload-new/src/fs-button-upload.vue.mjs +7 -0
- package/es/fs-upload-new/src/fs-button-upload.vue2.mjs +62 -0
- package/es/fs-upload-new/src/fs-drag-upload.vue.mjs +7 -0
- package/es/fs-upload-new/src/fs-drag-upload.vue2.mjs +63 -0
- package/es/fs-upload-new/src/fs-preview-new.vue.mjs +8 -0
- package/es/fs-upload-new/src/fs-preview-new.vue2.mjs +93 -0
- package/es/fs-upload-new/src/fs-upload-new.vue.mjs +64 -0
- package/es/fs-upload-new/src/fs-upload-new.vue2.mjs +4 -0
- package/es/hamburger/index.mjs +7 -0
- package/es/hamburger/src/hamburger.vue.mjs +15 -0
- 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 +393 -0
- package/es/json-view/json-view-dialog.vue.mjs +19 -0
- package/es/json-view/json-view-dialog.vue2.mjs +4 -0
- package/es/json-view/json-view.vue.mjs +4 -0
- package/es/json-view/json-view.vue2.mjs +36 -0
- package/es/multipart-upload/index.mjs +7 -0
- package/es/multipart-upload/src/index.vue.mjs +14 -0
- package/es/multipart-upload/src/multipart-upload-form.vue.mjs +82 -0
- package/es/multipart-upload/src/multipart-upload-list.vue.mjs +104 -0
- package/es/organization-input/index.mjs +7 -0
- package/es/organization-input/src/organization-input.vue.mjs +224 -0
- package/es/plugins/export-data-new.mjs +237 -0
- package/es/plugins/export-data.mjs +179 -0
- package/es/plugins/index.mjs +9 -0
- package/es/remove-department/index.mjs +7 -0
- package/es/remove-department/src/remove-department.vue.mjs +33 -0
- package/es/remove-department/src/remove-dept-service.mjs +12 -0
- package/es/remove-user/index.mjs +7 -0
- package/es/remove-user/src/remove-user-service.mjs +12 -0
- package/es/remove-user/src/remove-user.vue.mjs +35 -0
- package/es/remove-workgroup/index.mjs +7 -0
- package/es/remove-workgroup/src/remove-workgroup-service.mjs +12 -0
- package/es/remove-workgroup/src/remove-workgroup.vue.mjs +31 -0
- package/es/rich-editor/index.mjs +7 -0
- package/es/rich-editor/index.vue.mjs +74 -0
- package/es/rich-editor/viewer.vue.mjs +27 -0
- package/es/row-form/index.mjs +7 -0
- package/es/row-form/index.vue.mjs +7 -0
- package/es/row-form/index.vue2.mjs +62 -0
- package/es/row-form/operation.vue.mjs +32 -0
- package/es/row-form/operation.vue2.mjs +4 -0
- package/es/scan-code-input/index.mjs +7 -0
- package/es/scan-code-input/src/events.mjs +15 -0
- package/es/scan-code-input/src/scan-code-input.vue.mjs +32 -0
- package/es/scan-code-input-browser/index.mjs +7 -0
- package/es/scan-code-input-browser/src/scan-code-input.vue.mjs +50 -0
- package/es/secret-info/index.mjs +7 -0
- package/es/secret-info/index.vue.mjs +16 -0
- package/es/src/api/sso-service.mjs +56 -0
- package/es/src/api/tab.mjs +15 -0
- package/es/src/components/Affix/index.vue.mjs +7 -0
- package/es/src/components/Affix/index.vue2.mjs +83 -0
- package/es/src/components/Card/index.mjs +51 -0
- package/es/src/components/Scrollbar/index.vue.mjs +52 -0
- package/es/src/directives/permission/index.mjs +7 -0
- package/es/src/directives/permission/permission.mjs +11 -0
- package/es/src/i18n/i18n.mjs +7 -0
- package/es/src/i18n/langs/cn.mjs +4 -0
- package/es/src/i18n/langs/en.mjs +4 -0
- package/es/src/permission.mjs +76 -0
- package/es/src/router/index.mjs +9 -0
- package/es/src/store/index.mjs +12 -0
- package/es/src/store/modules/app.mjs +40 -0
- package/es/src/store/modules/permission.mjs +31 -0
- package/es/src/store/modules/system.mjs +12 -0
- package/es/src/store/modules/tab-content.mjs +20 -0
- package/es/src/store/modules/user.mjs +139 -0
- package/es/src/utils/auth.mjs +156 -0
- package/es/src/utils/calculator/calculator-util.mjs +56 -0
- package/es/src/utils/chat-ai-util.mjs +34 -0
- package/es/src/utils/common-util.mjs +448 -0
- package/es/src/utils/i18n-util.mjs +72 -0
- package/es/src/utils/iconUtils.mjs +25 -0
- package/es/src/utils/insert_css.mjs +17 -0
- package/es/src/utils/jump-page-utils.mjs +264 -0
- package/es/src/utils/menu.mjs +14 -0
- package/es/src/utils/permission.mjs +44 -0
- package/es/src/utils/permissionAuth.mjs +153 -0
- package/es/src/utils/range-selector.mjs +105 -0
- package/es/src/utils/request.mjs +140 -0
- package/es/src/utils/restful-interface-utils.mjs +17 -0
- package/es/src/utils/util.mjs +361 -0
- package/es/src/utils/voice-setting-cache.mjs +212 -0
- package/es/src/utils/watermark.mjs +35 -0
- package/es/src/utils/workflow-util.mjs +42 -0
- package/es/src/views/dsc-component/Sidebar/Item.vue.mjs +7 -0
- package/es/src/views/dsc-component/Sidebar/Item.vue2.mjs +12 -0
- package/es/src/views/dsc-component/Sidebar/Link.vue.mjs +14 -0
- package/es/src/views/dsc-component/Sidebar/SidebarItem.vue.mjs +53 -0
- package/es/src/views/dsc-component/Sidebar/index.vue.mjs +111 -0
- package/es/src/views/dsc-component/tabs/tab-content.vue.mjs +66 -0
- package/es/src/views/error-page/401.vue.mjs +15 -0
- package/es/src/views/error-page/404.vue.mjs +12 -0
- package/es/src/views/layout/EmptyLayout.vue.mjs +9 -0
- package/es/src/views/layout/Layout.vue.mjs +28 -0
- package/es/src/views/layout/NewLayout.vue.mjs +11 -0
- package/es/src/views/layout/components/AppMain.vue.mjs +13 -0
- package/es/src/views/layout/components/Breadcrumb/index.vue.mjs +49 -0
- package/es/src/views/layout/components/Menubar/Item.vue.mjs +7 -0
- package/es/src/views/layout/components/Menubar/Item.vue2.mjs +15 -0
- package/es/src/views/layout/components/Menubar/Link.vue.mjs +14 -0
- package/es/src/views/layout/components/Menubar/SidebarItem.vue.mjs +56 -0
- package/es/src/views/layout/components/Menubar/index.vue.mjs +90 -0
- package/es/src/views/layout/components/Sidebar/Item.vue2.mjs +4 -0
- package/es/src/views/layout/components/Sidebar/Link.vue.mjs +12 -0
- package/es/src/views/layout/components/Sidebar/SidebarItem.vue.mjs +22 -0
- package/es/src/views/layout/components/Sidebar/index.vue.mjs +58 -0
- package/es/src/views/layout/components/iframe-page.vue.mjs +14 -0
- package/es/src/views/layout/components/tabs/tab-content.vue.mjs +64 -0
- package/es/src/views/layout/mixin/ResizeHandler.mjs +16 -0
- package/es/src/views/layout/tab-content-iframe-index.vue.mjs +14 -0
- package/es/src/views/layout/tab-content-index.vue.mjs +28 -0
- package/es/src/views/super-icon/index.mjs +7 -0
- package/es/src/views/super-icon/src/index.vue.mjs +7 -0
- package/es/src/views/super-icon/src/index.vue2.mjs +13 -0
- package/es/src/views/svg-icon/src/svg-icon.vue2.mjs +14 -0
- package/es/src/views/wf-history/tache-subprocess-history.vue.mjs +14 -0
- package/es/style.css +1 -0
- package/es/super-grid/index.mjs +7 -0
- package/es/super-grid/src/apis.mjs +491 -0
- package/es/super-grid/src/columns-config.vue.mjs +82 -0
- package/es/super-grid/src/components/grid-icon.vue.mjs +47 -0
- package/es/super-grid/src/components/grid-radio-input.vue.mjs +25 -0
- package/es/super-grid/src/components/grid-radio-input.vue2.mjs +4 -0
- package/es/super-grid/src/components/mobile-table-card.mjs +113 -0
- package/es/super-grid/src/components/select-input.vue.mjs +149 -0
- package/es/super-grid/src/components/select-input.vue2.mjs +4 -0
- package/es/super-grid/src/custom-formatter.mjs +167 -0
- package/es/super-grid/src/dynamic-input.vue.mjs +474 -0
- package/es/super-grid/src/events.mjs +37 -0
- package/es/super-grid/src/formValidatorUtil.mjs +108 -0
- package/es/super-grid/src/group-column.vue.mjs +24 -0
- package/es/super-grid/src/header-context-menu.vue.mjs +15 -0
- package/es/super-grid/src/index-column.vue.mjs +22 -0
- package/es/super-grid/src/normal-column-content.vue.mjs +321 -0
- package/es/super-grid/src/normal-column.vue.mjs +107 -0
- package/es/super-grid/src/row-detail.vue.mjs +14 -0
- package/es/super-grid/src/row-operation.vue.mjs +89 -0
- package/es/super-grid/src/scan-util.mjs +100 -0
- package/es/super-grid/src/search-button.vue.mjs +25 -0
- package/es/super-grid/src/search-condition-input.vue.mjs +17 -0
- package/es/super-grid/src/search-condition-list.vue.mjs +20 -0
- package/es/super-grid/src/search-form-advancedQuery.vue.mjs +116 -0
- package/es/super-grid/src/search-form-dialog.vue.mjs +27 -0
- package/es/super-grid/src/search-form-item.vue.mjs +132 -0
- package/es/super-grid/src/search-form-mobile.vue.mjs +41 -0
- package/es/super-grid/src/search-form-number.vue.mjs +26 -0
- package/es/super-grid/src/search-form-open.vue.mjs +53 -0
- package/es/super-grid/src/search-form-ordinarySearch.vue.mjs +41 -0
- package/es/super-grid/src/search-form.vue.mjs +207 -0
- package/es/super-grid/src/selection-column.vue.mjs +11 -0
- package/es/super-grid/src/super-grid-service.mjs +260 -0
- package/es/super-grid/src/super-grid.vue.mjs +1126 -0
- package/es/super-grid/src/utils.mjs +401 -0
- package/es/super-grid/src/view-image-dialog.vue.mjs +67 -0
- package/es/super-icon/index.mjs +7 -0
- package/es/super-icon/src/index.vue.mjs +7 -0
- package/es/super-icon/src/index.vue2.mjs +13 -0
- package/es/super-nine-grid/index.mjs +7 -0
- package/es/super-nine-grid/src/apis.mjs +36 -0
- package/es/super-nine-grid/src/custom-formatter.mjs +35 -0
- package/es/super-nine-grid/src/search-form-number.vue.mjs +12 -0
- package/es/super-nine-grid/src/search-form.vue.mjs +91 -0
- package/es/super-nine-grid/src/super-grid-service.mjs +39 -0
- package/es/super-nine-grid/src/super-nine-grid.vue.mjs +231 -0
- package/es/super-nine-grid/src/utils.mjs +32 -0
- package/es/svg-icon/index.mjs +7 -0
- package/es/svg-icon/src/svg-icon.vue.mjs +14 -0
- package/es/utils/memory-cache-utils.mjs +30 -0
- package/es/utils/organization.mjs +70 -0
- package/es/utils/utils.mjs +86 -0
- package/es/utils/value-set.mjs +93 -0
- package/es/valid-code/index.mjs +7 -0
- package/es/valid-code/src/valid-code.vue.mjs +23 -0
- package/es/workflow-button/index.mjs +7 -0
- package/es/workflow-button/src/workflow-button.vue.mjs +85 -0
- package/es/workflow-history-list/index.mjs +7 -0
- package/es/workflow-history-list/src/workflow-history-list.vue.mjs +90 -0
- package/es/workgroup-tree/index.mjs +7 -0
- package/es/workgroup-tree/src/workgroup-tree.vue.mjs +23 -0
- package/es/workgroup-tree-inline/index.mjs +7 -0
- package/es/workgroup-tree-inline/src/search-result.vue.mjs +39 -0
- package/es/workgroup-tree-inline/src/workgroup-tree-inline.vue.mjs +128 -0
- package/es/workgroup-tree-inline/src/workgroup-tree-service.mjs +34 -0
- package/es/workgroup-tree-mobile/index.mjs +8 -0
- package/es/workgroup-tree-mobile/src/dept-result.vue.mjs +17 -0
- package/es/workgroup-tree-mobile/src/dept-result.vue2.mjs +4 -0
- package/es/workgroup-tree-mobile/src/workgroup-tree-app.vue.mjs +16 -0
- package/es/workgroup-tree-mobile/src/workgroup-tree-app.vue3.mjs +5 -0
- package/es/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue.mjs +109 -0
- package/es/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue2.mjs +4 -0
- package/es/workgroup-user-tree/index.mjs +7 -0
- package/es/workgroup-user-tree/src/workgroup-user-tree.vue.mjs +23 -0
- package/es/workgroup-user-tree-inline/index.mjs +7 -0
- package/es/workgroup-user-tree-inline/src/search-result.vue.mjs +39 -0
- package/es/workgroup-user-tree-inline/src/workgroup-tree-inline-service.mjs +72 -0
- package/es/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue.mjs +172 -0
- package/es/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue2.mjs +4 -0
- package/es/workgroup-user-tree-mobile/src/dept-path.vue.mjs +15 -0
- package/es/workgroup-user-tree-mobile/src/dept-path.vue2.mjs +4 -0
- package/es/workgroup-user-tree-mobile/src/dept-result.vue.mjs +18 -0
- package/es/workgroup-user-tree-mobile/src/dept-result.vue2.mjs +4 -0
- package/es/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue.mjs +16 -0
- package/es/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue2.mjs +4 -0
- package/es/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue3.mjs +5 -0
- package/es/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue.mjs +135 -0
- package/es/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue2.mjs +4 -0
- package/es/year-range-picker/index.mjs +7 -0
- package/es/year-range-picker/src/year-range-picker.vue.mjs +14 -0
- package/package.json +12 -7
- package/src/styles/index.scss +13 -2
- package/src/styles/theme/dark-blue/select.scss +27 -1
- package/src/styles/theme/default.scss +18 -13
- 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/home.scss +44 -1
- package/src/styles/theme/tiffany-blue-mobile/select.scss +29 -2
- package/.eslintrc.cjs +0 -28
- package/.prettierrc.json +0 -12
- package/index.html +0 -19
- package/lib/IntervalSelection/index.js +0 -7
- package/lib/IntervalSelection/src/sectionDate.vue.js +0 -49
- package/lib/breadcrumb/index.js +0 -7
- package/lib/breadcrumb/src/breadcrumb.vue.js +0 -28
- package/lib/chat-embed/index.js +0 -7
- package/lib/chat-embed/src/chat-addition-data.vue.js +0 -7
- package/lib/chat-embed/src/chat-addition-data.vue2.js +0 -14
- package/lib/chat-embed/src/chat-ai-answer-tip.vue.js +0 -7
- package/lib/chat-embed/src/chat-ai-answer-tip.vue2.js +0 -29
- package/lib/chat-embed/src/chat-bubble-footer.vue.js +0 -7
- package/lib/chat-embed/src/chat-bubble-footer.vue2.js +0 -33
- package/lib/chat-embed/src/chat-embed-message.js +0 -22
- package/lib/chat-embed/src/chat-sender.vue.js +0 -7
- package/lib/chat-embed/src/chat-sender.vue2.js +0 -157
- package/lib/chat-embed/src/components/answer-auto-chart.vue.js +0 -7
- package/lib/chat-embed/src/components/answer-auto-chart.vue2.js +0 -59
- package/lib/chat-embed/src/components/answer-home-chart.vue.js +0 -7
- package/lib/chat-embed/src/components/answer-interaction-data.vue.js +0 -7
- package/lib/chat-embed/src/components/answer-interaction-data.vue2.js +0 -118
- package/lib/chat-embed/src/components/history-detail.vue.js +0 -7
- package/lib/chat-embed/src/components/history-detail.vue2.js +0 -55
- package/lib/chat-embed/src/header.vue.js +0 -7
- package/lib/chat-embed/src/header.vue2.js +0 -46
- package/lib/chat-embed/src/index.vue.js +0 -7
- package/lib/chat-embed/src/index.vue2.js +0 -303
- package/lib/chat-embed/src/recommendation-message.vue.js +0 -7
- package/lib/chat-embed/src/recommendation-message.vue2.js +0 -8
- package/lib/chat-embed/src/sidebar-item.vue.js +0 -7
- package/lib/chat-embed/src/sidebar-item.vue2.js +0 -118
- package/lib/chat-embed/src/util/history-message-util.js +0 -96
- package/lib/chat-embed/src/util/mcp-utils.js +0 -53
- package/lib/chat-embed/src/voice/index.js +0 -7
- package/lib/chat-embed/src/voice/js/crypto-js.js +0 -1013
- package/lib/chat-embed/src/voice/js/processor/index.umd.js +0 -178
- package/lib/chat-embed/src/voice/voice.vue.js +0 -103
- package/lib/date-picker-range/index.js +0 -7
- package/lib/date-picker-range/index.vue.js +0 -7
- package/lib/date-picker-range/index.vue2.js +0 -93
- package/lib/department-tree/index.js +0 -7
- package/lib/department-tree/src/department-tree.vue.js +0 -23
- package/lib/department-tree-inline/index.js +0 -7
- package/lib/department-tree-inline/src/department-multi-tree-inline.vue.js +0 -91
- package/lib/department-tree-inline/src/department-single-tree-inline.vue.js +0 -64
- package/lib/department-tree-inline/src/department-tree-inline.vue.js +0 -17
- package/lib/department-tree-inline/src/department-tree-service.js +0 -108
- package/lib/department-tree-inline/src/search-result.vue.js +0 -39
- package/lib/department-tree-mobile/index.js +0 -8
- package/lib/department-tree-mobile/src/department-tree-app.vue.js +0 -15
- package/lib/department-tree-mobile/src/department-tree-app.vue3.js +0 -5
- package/lib/department-tree-mobile/src/department-tree-inline-app.vue.js +0 -121
- package/lib/department-tree-mobile/src/department-tree-inline-app.vue2.js +0 -4
- package/lib/department-tree-mobile/src/department-tree-service.js +0 -55
- package/lib/department-tree-mobile/src/dept-path.vue.js +0 -14
- package/lib/department-tree-mobile/src/dept-path.vue2.js +0 -4
- package/lib/department-tree-mobile/src/dept-result.vue.js +0 -16
- package/lib/department-tree-mobile/src/dept-result.vue2.js +0 -4
- package/lib/department-user-tree/index.js +0 -7
- package/lib/department-user-tree/src/department-user-multiple-tree.vue.js +0 -20
- package/lib/department-user-tree/src/department-user-single-tree.vue.js +0 -19
- package/lib/department-user-tree/src/department-user-tree.vue.js +0 -27
- package/lib/department-user-tree-inline/index.js +0 -7
- package/lib/department-user-tree-inline/src/department-user-multiple-tree-inline.vue.js +0 -165
- package/lib/department-user-tree-inline/src/department-user-single-tree-inline.vue.js +0 -69
- package/lib/department-user-tree-inline/src/department-user-tree-inline.vue.js +0 -16
- package/lib/department-user-tree-inline/src/department-user-tree-multi-service.js +0 -81
- package/lib/department-user-tree-inline/src/department-user-tree-single-service.js +0 -54
- package/lib/department-user-tree-inline/src/group-user/group-input.vue.js +0 -39
- package/lib/department-user-tree-inline/src/group-user/group-list.vue.js +0 -27
- package/lib/department-user-tree-inline/src/group-user/group-user.vue.js +0 -16
- package/lib/department-user-tree-inline/src/group-user-multiple-tree.vue.js +0 -78
- package/lib/department-user-tree-inline/src/group-user-single-tree.vue.js +0 -34
- package/lib/department-user-tree-inline/src/search-result.vue.js +0 -41
- package/lib/department-user-tree-mobile/index.js +0 -8
- package/lib/department-user-tree-mobile/src/department-user-tree-app.vue.js +0 -15
- package/lib/department-user-tree-mobile/src/department-user-tree-app.vue3.js +0 -5
- package/lib/department-user-tree-mobile/src/department-user-tree-inline-app.vue.js +0 -135
- package/lib/department-user-tree-mobile/src/department-user-tree-inline-app.vue2.js +0 -4
- package/lib/department-user-tree-mobile/src/dept-path.vue.js +0 -14
- package/lib/department-user-tree-mobile/src/dept-path.vue2.js +0 -4
- package/lib/department-user-tree-mobile/src/dept-result.vue.js +0 -17
- package/lib/department-user-tree-mobile/src/dept-result.vue2.js +0 -4
- package/lib/directives/prevent-reclick.js +0 -15
- package/lib/dynamic-source-select/index.js +0 -7
- package/lib/dynamic-source-select/src/dynamic-source-select-service.js +0 -32
- package/lib/dynamic-source-select/src/dynamic-source-select.vue.js +0 -275
- package/lib/empty-state/index.vue.js +0 -9
- package/lib/empty-state/index.vue2.js +0 -4
- package/lib/fs-preview/index.js +0 -7
- package/lib/fs-preview/src/fs-preview.vue.js +0 -120
- package/lib/fs-upload/index.js +0 -7
- package/lib/fs-upload/src/fs-upload-multi.vue.js +0 -71
- package/lib/fs-upload/src/fs-upload-single.vue.js +0 -73
- package/lib/fs-upload/src/fs-upload.vue.js +0 -24
- package/lib/fs-upload/src/see-big-picture.vue.js +0 -12
- package/lib/fs-upload-list/index.js +0 -7
- package/lib/fs-upload-list/src/fs-upload-list.vue.js +0 -97
- package/lib/fs-upload-new/index.js +0 -7
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-app.vue.js +0 -61
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-app.vue2.js +0 -4
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue.js +0 -178
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue2.js +0 -4
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-component.vue.js +0 -7
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-component.vue2.js +0 -38
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-input.vue.js +0 -45
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-input.vue2.js +0 -4
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload.vue.js +0 -35
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload.vue2.js +0 -4
- package/lib/fs-upload-new/src/fs-button-upload.vue.js +0 -7
- package/lib/fs-upload-new/src/fs-button-upload.vue2.js +0 -62
- package/lib/fs-upload-new/src/fs-drag-upload.vue.js +0 -7
- package/lib/fs-upload-new/src/fs-drag-upload.vue2.js +0 -63
- package/lib/fs-upload-new/src/fs-preview-new.vue.js +0 -8
- package/lib/fs-upload-new/src/fs-preview-new.vue2.js +0 -93
- package/lib/fs-upload-new/src/fs-upload-new.vue.js +0 -65
- package/lib/fs-upload-new/src/fs-upload-new.vue2.js +0 -4
- package/lib/hamburger/index.js +0 -7
- package/lib/hamburger/src/hamburger.vue.js +0 -15
- package/lib/index.js +0 -380
- package/lib/json-view/json-view-dialog.vue.js +0 -19
- package/lib/json-view/json-view-dialog.vue2.js +0 -4
- package/lib/json-view/json-view.vue.js +0 -4
- package/lib/json-view/json-view.vue2.js +0 -36
- package/lib/multipart-upload/index.js +0 -7
- package/lib/multipart-upload/src/index.vue.js +0 -13
- package/lib/multipart-upload/src/multipart-upload-form.vue.js +0 -82
- package/lib/multipart-upload/src/multipart-upload-list.vue.js +0 -101
- package/lib/organization-input/index.js +0 -7
- package/lib/organization-input/src/organization-input.vue.js +0 -224
- package/lib/plugins/export-data-new.js +0 -237
- package/lib/plugins/export-data.js +0 -179
- package/lib/plugins/index.js +0 -9
- package/lib/remove-department/index.js +0 -7
- package/lib/remove-department/src/remove-department.vue.js +0 -33
- package/lib/remove-department/src/remove-dept-service.js +0 -13
- package/lib/remove-user/index.js +0 -7
- package/lib/remove-user/src/remove-user-service.js +0 -13
- package/lib/remove-user/src/remove-user.vue.js +0 -35
- package/lib/remove-workgroup/index.js +0 -7
- package/lib/remove-workgroup/src/remove-workgroup-service.js +0 -13
- package/lib/remove-workgroup/src/remove-workgroup.vue.js +0 -31
- package/lib/rich-editor/index.js +0 -7
- package/lib/rich-editor/index.vue.js +0 -115
- package/lib/rich-editor/viewer.vue.js +0 -27
- package/lib/row-form/index.js +0 -7
- package/lib/row-form/index.vue.js +0 -7
- package/lib/row-form/index.vue2.js +0 -62
- package/lib/row-form/operation.vue.js +0 -32
- package/lib/row-form/operation.vue2.js +0 -4
- package/lib/scan-code-input/index.js +0 -7
- package/lib/scan-code-input/src/events.js +0 -15
- package/lib/scan-code-input/src/scan-code-input.vue.js +0 -32
- package/lib/scan-code-input-browser/index.js +0 -7
- package/lib/scan-code-input-browser/src/scan-code-input.vue.js +0 -39
- package/lib/secret-info/index.js +0 -7
- package/lib/secret-info/index.vue.js +0 -16
- package/lib/src/api/sso-service.js +0 -57
- package/lib/src/api/tab.js +0 -15
- package/lib/src/components/Affix/index.vue.js +0 -7
- package/lib/src/components/Affix/index.vue2.js +0 -81
- package/lib/src/components/Card/index.js +0 -48
- package/lib/src/components/Scrollbar/index.vue.js +0 -51
- package/lib/src/directives/permission/index.js +0 -7
- package/lib/src/directives/permission/permission.js +0 -11
- package/lib/src/i18n/i18n.js +0 -7
- package/lib/src/i18n/langs/cn.js +0 -4
- package/lib/src/i18n/langs/en.js +0 -4
- package/lib/src/permission.js +0 -78
- package/lib/src/router/index.js +0 -9
- package/lib/src/store/index.js +0 -13
- package/lib/src/store/modules/app.js +0 -41
- package/lib/src/store/modules/permission.js +0 -31
- package/lib/src/store/modules/system.js +0 -12
- package/lib/src/store/modules/tab-content.js +0 -20
- package/lib/src/store/modules/user.js +0 -139
- package/lib/src/utils/auth.js +0 -156
- package/lib/src/utils/calculator/calculator-util.js +0 -54
- package/lib/src/utils/chat-ai-util.js +0 -30
- package/lib/src/utils/common-util.js +0 -438
- package/lib/src/utils/i18n-util.js +0 -70
- package/lib/src/utils/iconUtils.js +0 -26
- package/lib/src/utils/insert_css.js +0 -16
- package/lib/src/utils/jump-page-utils.js +0 -264
- package/lib/src/utils/menu.js +0 -14
- package/lib/src/utils/permission.js +0 -45
- package/lib/src/utils/permissionAuth.js +0 -153
- package/lib/src/utils/range-selector.js +0 -105
- package/lib/src/utils/request.js +0 -140
- package/lib/src/utils/restful-interface-utils.js +0 -18
- package/lib/src/utils/util.js +0 -361
- package/lib/src/utils/voice-setting-cache.js +0 -211
- package/lib/src/utils/watermark.js +0 -40
- package/lib/src/utils/workflow-util.js +0 -42
- package/lib/src/views/dsc-component/Sidebar/Item.vue.js +0 -7
- package/lib/src/views/dsc-component/Sidebar/Item.vue2.js +0 -12
- package/lib/src/views/dsc-component/Sidebar/Link.vue.js +0 -14
- package/lib/src/views/dsc-component/Sidebar/SidebarItem.vue.js +0 -53
- package/lib/src/views/dsc-component/Sidebar/index.vue.js +0 -111
- package/lib/src/views/dsc-component/tabs/tab-content.vue.js +0 -63
- package/lib/src/views/error-page/401.vue.js +0 -15
- package/lib/src/views/error-page/404.vue.js +0 -12
- package/lib/src/views/layout/EmptyLayout.vue.js +0 -9
- package/lib/src/views/layout/Layout.vue.js +0 -28
- package/lib/src/views/layout/NewLayout.vue.js +0 -11
- package/lib/src/views/layout/components/AppMain.vue.js +0 -13
- package/lib/src/views/layout/components/Breadcrumb/index.vue.js +0 -48
- package/lib/src/views/layout/components/Menubar/Item.vue.js +0 -7
- package/lib/src/views/layout/components/Menubar/Item.vue2.js +0 -15
- package/lib/src/views/layout/components/Menubar/Link.vue.js +0 -14
- package/lib/src/views/layout/components/Menubar/SidebarItem.vue.js +0 -56
- package/lib/src/views/layout/components/Menubar/index.vue.js +0 -90
- package/lib/src/views/layout/components/Sidebar/Item.vue2.js +0 -4
- package/lib/src/views/layout/components/Sidebar/Link.vue.js +0 -12
- package/lib/src/views/layout/components/Sidebar/SidebarItem.vue.js +0 -22
- package/lib/src/views/layout/components/Sidebar/index.vue.js +0 -58
- package/lib/src/views/layout/components/iframe-page.vue.js +0 -14
- package/lib/src/views/layout/components/tabs/tab-content.vue.js +0 -62
- package/lib/src/views/layout/mixin/ResizeHandler.js +0 -16
- package/lib/src/views/layout/tab-content-iframe-index.vue.js +0 -14
- package/lib/src/views/layout/tab-content-index.vue.js +0 -28
- package/lib/src/views/wf-history/tache-subprocess-history.vue.js +0 -14
- package/lib/style.css +0 -3077
- package/lib/super-grid/index.js +0 -7
- package/lib/super-grid/src/apis.js +0 -458
- package/lib/super-grid/src/columns-config.vue.js +0 -81
- package/lib/super-grid/src/components/grid-icon.vue.js +0 -47
- package/lib/super-grid/src/components/grid-radio-input.vue.js +0 -25
- package/lib/super-grid/src/components/grid-radio-input.vue2.js +0 -4
- package/lib/super-grid/src/components/mobile-table-card.js +0 -109
- package/lib/super-grid/src/components/select-input.vue.js +0 -148
- package/lib/super-grid/src/components/select-input.vue2.js +0 -4
- package/lib/super-grid/src/custom-formatter.js +0 -167
- package/lib/super-grid/src/dynamic-input.vue.js +0 -481
- package/lib/super-grid/src/events.js +0 -37
- package/lib/super-grid/src/formValidatorUtil.js +0 -109
- package/lib/super-grid/src/group-column.vue.js +0 -24
- package/lib/super-grid/src/header-context-menu.vue.js +0 -14
- package/lib/super-grid/src/index-column.vue.js +0 -22
- package/lib/super-grid/src/normal-column-content.vue.js +0 -318
- package/lib/super-grid/src/normal-column.vue.js +0 -106
- package/lib/super-grid/src/row-detail.vue.js +0 -14
- package/lib/super-grid/src/row-operation.vue.js +0 -89
- package/lib/super-grid/src/scan-util.js +0 -100
- package/lib/super-grid/src/search-button.vue.js +0 -23
- package/lib/super-grid/src/search-condition-input.vue.js +0 -17
- package/lib/super-grid/src/search-condition-list.vue.js +0 -20
- package/lib/super-grid/src/search-form-advancedQuery.vue.js +0 -116
- package/lib/super-grid/src/search-form-dialog.vue.js +0 -16
- package/lib/super-grid/src/search-form-item.vue.js +0 -128
- package/lib/super-grid/src/search-form-mobile.vue.js +0 -41
- package/lib/super-grid/src/search-form-number.vue.js +0 -26
- package/lib/super-grid/src/search-form-open.vue.js +0 -50
- package/lib/super-grid/src/search-form-ordinarySearch.vue.js +0 -39
- package/lib/super-grid/src/search-form.vue.js +0 -201
- package/lib/super-grid/src/selection-column.vue.js +0 -11
- package/lib/super-grid/src/super-grid-service.js +0 -259
- package/lib/super-grid/src/super-grid.vue.js +0 -1052
- package/lib/super-grid/src/utils.js +0 -355
- package/lib/super-grid/src/view-image-dialog.vue.js +0 -67
- package/lib/super-icon/index.js +0 -7
- package/lib/super-icon/src/index.vue.js +0 -7
- package/lib/super-icon/src/index.vue2.js +0 -13
- package/lib/super-nine-grid/index.js +0 -7
- package/lib/super-nine-grid/src/apis.js +0 -36
- package/lib/super-nine-grid/src/custom-formatter.js +0 -35
- package/lib/super-nine-grid/src/search-form-number.vue.js +0 -13
- package/lib/super-nine-grid/src/search-form.vue.js +0 -91
- package/lib/super-nine-grid/src/super-grid-service.js +0 -39
- package/lib/super-nine-grid/src/super-nine-grid.vue.js +0 -225
- package/lib/super-nine-grid/src/utils.js +0 -32
- package/lib/svg-icon/index.js +0 -7
- package/lib/svg-icon/src/svg-icon.vue.js +0 -14
- package/lib/utils/memory-cache-utils.js +0 -30
- package/lib/utils/organization.js +0 -57
- package/lib/utils/utils.js +0 -87
- package/lib/utils/value-set.js +0 -94
- package/lib/valid-code/index.js +0 -7
- package/lib/valid-code/src/valid-code.vue.js +0 -23
- package/lib/workflow-button/index.js +0 -7
- package/lib/workflow-button/src/workflow-button.vue.js +0 -85
- package/lib/workflow-history-list/index.js +0 -7
- package/lib/workflow-history-list/src/workflow-history-list.vue.js +0 -89
- package/lib/workgroup-tree/index.js +0 -7
- package/lib/workgroup-tree/src/workgroup-tree.vue.js +0 -23
- package/lib/workgroup-tree-inline/index.js +0 -7
- package/lib/workgroup-tree-inline/src/search-result.vue.js +0 -39
- package/lib/workgroup-tree-inline/src/workgroup-tree-inline.vue.js +0 -128
- package/lib/workgroup-tree-inline/src/workgroup-tree-service.js +0 -35
- package/lib/workgroup-tree-mobile/index.js +0 -8
- package/lib/workgroup-tree-mobile/src/dept-result.vue.js +0 -16
- package/lib/workgroup-tree-mobile/src/dept-result.vue2.js +0 -4
- package/lib/workgroup-tree-mobile/src/workgroup-tree-app.vue.js +0 -15
- package/lib/workgroup-tree-mobile/src/workgroup-tree-app.vue3.js +0 -5
- package/lib/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue.js +0 -109
- package/lib/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue2.js +0 -4
- package/lib/workgroup-user-tree/index.js +0 -7
- package/lib/workgroup-user-tree/src/workgroup-user-tree.vue.js +0 -23
- package/lib/workgroup-user-tree-inline/index.js +0 -7
- package/lib/workgroup-user-tree-inline/src/search-result.vue.js +0 -39
- package/lib/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +0 -73
- package/lib/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue.js +0 -172
- package/lib/workgroup-user-tree-mobile/src/dept-path.vue.js +0 -14
- package/lib/workgroup-user-tree-mobile/src/dept-path.vue2.js +0 -4
- package/lib/workgroup-user-tree-mobile/src/dept-result.vue.js +0 -17
- package/lib/workgroup-user-tree-mobile/src/dept-result.vue2.js +0 -4
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue.js +0 -15
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue3.js +0 -5
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue.js +0 -135
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue2.js +0 -4
- package/lib/year-range-picker/index.js +0 -7
- package/lib/year-range-picker/src/year-range-picker.vue.js +0 -14
- package/packages/IntervalSelection/index.js +0 -6
- package/packages/IntervalSelection/src/quarterScope.vue +0 -405
- package/packages/IntervalSelection/src/sectionDate.vue +0 -475
- package/packages/breadcrumb/index.js +0 -6
- package/packages/breadcrumb/src/breadcrumb.vue +0 -81
- package/packages/chat-embed/index.ts +0 -6
- package/packages/chat-embed/src/chat-addition-data.vue +0 -64
- package/packages/chat-embed/src/chat-ai-answer-tip.vue +0 -81
- package/packages/chat-embed/src/chat-bubble-footer.vue +0 -81
- package/packages/chat-embed/src/chat-embed-message.ts +0 -76
- package/packages/chat-embed/src/chat-embed.css +0 -207
- package/packages/chat-embed/src/chat-sender.vue +0 -620
- package/packages/chat-embed/src/components/answer-auto-chart.vue +0 -365
- package/packages/chat-embed/src/components/answer-home-chart.vue +0 -42
- package/packages/chat-embed/src/components/answer-interaction-data.vue +0 -569
- package/packages/chat-embed/src/components/history-detail.vue +0 -150
- package/packages/chat-embed/src/header.vue +0 -147
- package/packages/chat-embed/src/index.vue +0 -926
- package/packages/chat-embed/src/recommendation-message.vue +0 -37
- package/packages/chat-embed/src/sender-attachments.vue +0 -1
- package/packages/chat-embed/src/sidebar-item.vue +0 -521
- package/packages/chat-embed/src/type.ts +0 -74
- package/packages/chat-embed/src/util/chat-embed-util.ts +0 -67
- package/packages/chat-embed/src/util/history-message-util.ts +0 -161
- package/packages/chat-embed/src/util/mcp-utils.ts +0 -131
- package/packages/chat-embed/src/util/text-file-util.ts +0 -33
- package/packages/chat-embed/src/voice/index.ts +0 -6
- package/packages/chat-embed/src/voice/js/ai.js +0 -4
- package/packages/chat-embed/src/voice/js/crypto-js.js +0 -5736
- package/packages/chat-embed/src/voice/js/processor/index.umd.js +0 -1
- package/packages/chat-embed/src/voice/js/timer.js +0 -18
- package/packages/chat-embed/src/voice/voice.vue +0 -320
- package/packages/date-picker-range/index.ts +0 -6
- package/packages/date-picker-range/index.vue +0 -240
- package/packages/department-tree/index.js +0 -6
- package/packages/department-tree/src/department-tree.vue +0 -140
- package/packages/department-tree-inline/index.js +0 -6
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +0 -472
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +0 -374
- package/packages/department-tree-inline/src/department-tree-inline.vue +0 -93
- package/packages/department-tree-inline/src/department-tree-service.js +0 -333
- package/packages/department-tree-inline/src/search-result.vue +0 -206
- package/packages/department-tree-mobile/index.js +0 -6
- package/packages/department-tree-mobile/src/department-tree-app.vue +0 -148
- package/packages/department-tree-mobile/src/department-tree-inline-app.vue +0 -418
- package/packages/department-tree-mobile/src/department-tree-service.ts +0 -124
- package/packages/department-tree-mobile/src/dept-path.vue +0 -36
- package/packages/department-tree-mobile/src/dept-result.vue +0 -51
- package/packages/department-user-tree/index.js +0 -6
- package/packages/department-user-tree/src/department-user-multiple-tree.vue +0 -131
- package/packages/department-user-tree/src/department-user-single-tree.vue +0 -93
- package/packages/department-user-tree/src/department-user-tree.vue +0 -138
- package/packages/department-user-tree-inline/index.js +0 -9
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +0 -779
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +0 -394
- package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +0 -94
- package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +0 -293
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +0 -158
- package/packages/department-user-tree-inline/src/group-user/group-input.vue +0 -162
- package/packages/department-user-tree-inline/src/group-user/group-list.vue +0 -106
- package/packages/department-user-tree-inline/src/group-user/group-user.vue +0 -38
- package/packages/department-user-tree-inline/src/group-user-multiple-tree.vue +0 -304
- package/packages/department-user-tree-inline/src/group-user-single-tree.vue +0 -155
- package/packages/department-user-tree-inline/src/group-user-tree-service.js +0 -80
- package/packages/department-user-tree-inline/src/search-result.vue +0 -274
- package/packages/department-user-tree-mobile/index.js +0 -6
- package/packages/department-user-tree-mobile/src/department-user-tree-app.vue +0 -147
- package/packages/department-user-tree-mobile/src/department-user-tree-inline-app.vue +0 -466
- package/packages/department-user-tree-mobile/src/department-user-tree-service.ts +0 -71
- package/packages/department-user-tree-mobile/src/dept-path.vue +0 -36
- package/packages/department-user-tree-mobile/src/dept-result.vue +0 -58
- package/packages/directives/prevent-reclick.js +0 -22
- package/packages/dynamic-source-select/index.js +0 -6
- package/packages/dynamic-source-select/src/dynamic-source-select-service.js +0 -134
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +0 -946
- package/packages/dynamic-source-select/src/events.js +0 -72
- package/packages/empty-state/index.vue +0 -28
- package/packages/fs-preview/index.js +0 -6
- package/packages/fs-preview/src/fs-preview.vue +0 -535
- package/packages/fs-upload/index.js +0 -6
- package/packages/fs-upload/src/fs-upload-multi.vue +0 -464
- package/packages/fs-upload/src/fs-upload-single.vue +0 -369
- package/packages/fs-upload/src/fs-upload.vue +0 -193
- package/packages/fs-upload/src/see-big-picture.vue +0 -70
- package/packages/fs-upload-list/index.js +0 -6
- package/packages/fs-upload-list/src/fs-upload-list.vue +0 -436
- package/packages/fs-upload-new/index.ts +0 -6
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-app.vue +0 -276
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue +0 -573
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-component.vue +0 -152
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload-input.vue +0 -265
- package/packages/fs-upload-new/src/file-upload-mobile/file-upload.vue +0 -262
- package/packages/fs-upload-new/src/fs-button-upload.vue +0 -312
- package/packages/fs-upload-new/src/fs-drag-upload.vue +0 -307
- package/packages/fs-upload-new/src/fs-preview-new.vue +0 -380
- package/packages/fs-upload-new/src/fs-upload-new.vue +0 -413
- package/packages/hamburger/index.js +0 -6
- package/packages/hamburger/src/hamburger.vue +0 -52
- package/packages/index.js +0 -274
- package/packages/json-view/index.ts +0 -3
- package/packages/json-view/json-view-dialog.vue +0 -53
- package/packages/json-view/json-view.vue +0 -126
- package/packages/multipart-upload/index.js +0 -6
- package/packages/multipart-upload/src/index.vue +0 -66
- package/packages/multipart-upload/src/multipart-upload-form.vue +0 -404
- package/packages/multipart-upload/src/multipart-upload-list.vue +0 -543
- package/packages/organization-input/index.js +0 -6
- package/packages/organization-input/src/organization-input.vue +0 -619
- package/packages/plugins/export-data-new.js +0 -667
- package/packages/plugins/export-data.js +0 -431
- package/packages/plugins/index.js +0 -15
- package/packages/plugins/public-method.js +0 -47
- package/packages/remove-department/index.js +0 -6
- package/packages/remove-department/src/remove-department.vue +0 -201
- package/packages/remove-department/src/remove-dept-service.js +0 -31
- package/packages/remove-user/index.js +0 -6
- package/packages/remove-user/src/remove-user-service.js +0 -31
- package/packages/remove-user/src/remove-user.vue +0 -227
- package/packages/remove-workgroup/index.js +0 -6
- package/packages/remove-workgroup/src/remove-workgroup-service.js +0 -31
- package/packages/remove-workgroup/src/remove-workgroup.vue +0 -184
- package/packages/rich-editor/index.js +0 -7
- package/packages/rich-editor/index.vue +0 -331
- package/packages/rich-editor/tinymce/icons/default/icons.min.js +0 -1
- package/packages/rich-editor/tinymce/langs/README.md +0 -3
- package/packages/rich-editor/tinymce/langs/zh-Hans.js +0 -1
- package/packages/rich-editor/tinymce/license.txt +0 -21
- package/packages/rich-editor/tinymce/models/dom/model.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/accordion/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/advlist/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/anchor/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/autolink/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/autoresize/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/autosave/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/charmap/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/code/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/codesample/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/directionality/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/emoticons/js/emojiimages.js +0 -1
- package/packages/rich-editor/tinymce/plugins/emoticons/js/emojiimages.min.js +0 -3
- package/packages/rich-editor/tinymce/plugins/emoticons/js/emojis.js +0 -1
- package/packages/rich-editor/tinymce/plugins/emoticons/js/emojis.min.js +0 -2
- package/packages/rich-editor/tinymce/plugins/emoticons/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/fullscreen/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/ar.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/ca.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/cs.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/da.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/de.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/el.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/en.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/es.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/eu.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/fa.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/fi.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/he_IL.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/hi.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/hr.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/id.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/it.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/ja.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/kk.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/ms.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/nl.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/pl.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/ro.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/ru.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/sk.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/th_TH.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/tr.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/uk.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/vi.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +0 -84
- package/packages/rich-editor/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +0 -90
- package/packages/rich-editor/tinymce/plugins/help/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/image/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/importcss/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/insertdatetime/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/link/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/lists/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/media/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/nonbreaking/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/pagebreak/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/preview/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/quickbars/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/save/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/searchreplace/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/table/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/template/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/visualblocks/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/visualchars/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/plugins/wordcount/plugin.min.js +0 -4
- package/packages/rich-editor/tinymce/skins/content/dark/content.js +0 -2
- package/packages/rich-editor/tinymce/skins/content/dark/content.min.css +0 -1
- package/packages/rich-editor/tinymce/skins/content/default/content.js +0 -2
- package/packages/rich-editor/tinymce/skins/content/default/content.min.css +0 -1
- package/packages/rich-editor/tinymce/skins/content/document/content.js +0 -2
- package/packages/rich-editor/tinymce/skins/content/document/content.min.css +0 -1
- package/packages/rich-editor/tinymce/skins/content/tinymce-5/content.js +0 -2
- package/packages/rich-editor/tinymce/skins/content/tinymce-5/content.min.css +0 -1
- package/packages/rich-editor/tinymce/skins/content/tinymce-5-dark/content.js +0 -2
- package/packages/rich-editor/tinymce/skins/content/tinymce-5-dark/content.min.css +0 -1
- package/packages/rich-editor/tinymce/skins/content/writer/content.js +0 -2
- package/packages/rich-editor/tinymce/skins/content/writer/content.min.css +0 -1
- package/packages/rich-editor/tinymce/skins/ui/oxide/content.inline.js +0 -2
- package/packages/rich-editor/tinymce/skins/ui/oxide/content.inline.min.css +0 -1
- package/packages/rich-editor/tinymce/skins/ui/oxide/content.js +0 -2
- package/packages/rich-editor/tinymce/skins/ui/oxide/content.min.css +0 -1
- package/packages/rich-editor/tinymce/skins/ui/oxide/skin.js +0 -2
- package/packages/rich-editor/tinymce/skins/ui/oxide/skin.min.css +0 -1
- package/packages/rich-editor/tinymce/skins/ui/oxide/skin.shadowdom.js +0 -2
- package/packages/rich-editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css +0 -1
- package/packages/rich-editor/tinymce/skins/ui/oxide-dark/content.inline.js +0 -2
- package/packages/rich-editor/tinymce/skins/ui/oxide-dark/content.inline.min.css +0 -1
- package/packages/rich-editor/tinymce/skins/ui/oxide-dark/content.js +0 -2
- package/packages/rich-editor/tinymce/skins/ui/oxide-dark/content.min.css +0 -1
- package/packages/rich-editor/tinymce/skins/ui/oxide-dark/skin.js +0 -2
- package/packages/rich-editor/tinymce/skins/ui/oxide-dark/skin.min.css +0 -1
- package/packages/rich-editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +0 -2
- package/packages/rich-editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +0 -1
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5/content.inline.js +0 -2
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5/content.inline.min.css +0 -1
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5/content.js +0 -2
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5/content.min.css +0 -1
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5/skin.js +0 -2
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5/skin.min.css +0 -1
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +0 -2
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +0 -1
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/content.inline.js +0 -2
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +0 -1
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/content.js +0 -2
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/content.min.css +0 -1
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/skin.js +0 -2
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/skin.min.css +0 -1
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +0 -2
- package/packages/rich-editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +0 -1
- package/packages/rich-editor/tinymce/themes/silver/theme.min.js +0 -4
- package/packages/rich-editor/tinymce/tinymce.d.ts +0 -3238
- package/packages/rich-editor/tinymce/tinymce.min.js +0 -4
- package/packages/rich-editor/tinymce/zh_CN.js +0 -418
- package/packages/rich-editor/viewer.vue +0 -105
- package/packages/row-form/index.js +0 -7
- package/packages/row-form/index.vue +0 -284
- package/packages/row-form/operation.vue +0 -151
- package/packages/scan-code-input/index.js +0 -6
- package/packages/scan-code-input/src/events.js +0 -34
- package/packages/scan-code-input/src/scan-code-input.vue +0 -164
- package/packages/scan-code-input-browser/index.js +0 -6
- package/packages/scan-code-input-browser/src/scan-code-input.vue +0 -113
- package/packages/secret-info/index.js +0 -7
- package/packages/secret-info/index.vue +0 -100
- package/packages/super-grid/index.js +0 -7
- package/packages/super-grid/src/apis.js +0 -1713
- package/packages/super-grid/src/columns-config.vue +0 -329
- package/packages/super-grid/src/components/grid-icon.vue +0 -157
- package/packages/super-grid/src/components/grid-radio-input.vue +0 -84
- package/packages/super-grid/src/components/hyperlinks.vue +0 -130
- package/packages/super-grid/src/components/mobile-table-card.jsx +0 -589
- package/packages/super-grid/src/components/select-input.vue +0 -520
- package/packages/super-grid/src/custom-formatter.js +0 -419
- package/packages/super-grid/src/dynamic-input.vue +0 -2158
- package/packages/super-grid/src/eventBus.js +0 -10
- package/packages/super-grid/src/events.js +0 -56
- package/packages/super-grid/src/formValidatorUtil.js +0 -362
- package/packages/super-grid/src/formatter.js +0 -200
- package/packages/super-grid/src/group-column.vue +0 -119
- package/packages/super-grid/src/header-context-menu.vue +0 -82
- package/packages/super-grid/src/index-column.vue +0 -78
- package/packages/super-grid/src/normal-column-content.vue +0 -1310
- package/packages/super-grid/src/normal-column.vue +0 -423
- package/packages/super-grid/src/public-methods.js +0 -30
- package/packages/super-grid/src/row-detail.vue +0 -50
- package/packages/super-grid/src/row-operation.vue +0 -315
- package/packages/super-grid/src/scan-util.ts +0 -243
- package/packages/super-grid/src/search-button.vue +0 -88
- package/packages/super-grid/src/search-condition-input.vue +0 -74
- package/packages/super-grid/src/search-condition-list.vue +0 -70
- package/packages/super-grid/src/search-form-advancedQuery.vue +0 -836
- package/packages/super-grid/src/search-form-dialog.vue +0 -77
- package/packages/super-grid/src/search-form-item.vue +0 -616
- package/packages/super-grid/src/search-form-mobile.vue +0 -255
- package/packages/super-grid/src/search-form-number.vue +0 -122
- package/packages/super-grid/src/search-form-open.vue +0 -175
- package/packages/super-grid/src/search-form-ordinarySearch.vue +0 -243
- package/packages/super-grid/src/search-form.vue +0 -795
- package/packages/super-grid/src/search-methods.js +0 -539
- package/packages/super-grid/src/selection-column.vue +0 -36
- package/packages/super-grid/src/store.js +0 -3
- package/packages/super-grid/src/super-grid-service.js +0 -800
- package/packages/super-grid/src/super-grid.vue +0 -3814
- package/packages/super-grid/src/utils.js +0 -946
- package/packages/super-grid/src/view-image-dialog.vue +0 -194
- package/packages/super-icon/index.js +0 -6
- package/packages/super-icon/src/index.vue +0 -52
- package/packages/super-nine-grid/index.js +0 -7
- package/packages/super-nine-grid/src/apis.js +0 -108
- package/packages/super-nine-grid/src/custom-formatter.js +0 -73
- package/packages/super-nine-grid/src/formatter.js +0 -134
- package/packages/super-nine-grid/src/search-form-number.vue +0 -35
- package/packages/super-nine-grid/src/search-form.vue +0 -514
- package/packages/super-nine-grid/src/search-methods.js +0 -151
- package/packages/super-nine-grid/src/store.js +0 -3
- package/packages/super-nine-grid/src/super-grid-service.js +0 -110
- package/packages/super-nine-grid/src/super-nine-grid.vue +0 -1112
- package/packages/super-nine-grid/src/utils.js +0 -264
- package/packages/svg-icon/index.js +0 -6
- package/packages/svg-icon/src/svg-icon.vue +0 -43
- package/packages/utils/date-util.js +0 -292
- package/packages/utils/dom.js +0 -227
- package/packages/utils/gogocodeTransfer.js +0 -59
- package/packages/utils/memory-cache-utils.js +0 -117
- package/packages/utils/organization.ts +0 -173
- package/packages/utils/utils.js +0 -198
- package/packages/utils/value-set.js +0 -282
- package/packages/valid-code/index.js +0 -7
- package/packages/valid-code/src/valid-code.vue +0 -104
- package/packages/workflow-button/index.js +0 -6
- package/packages/workflow-button/src/workflow-button.vue +0 -574
- package/packages/workflow-history-list/index.js +0 -6
- package/packages/workflow-history-list/src/api.js +0 -7
- package/packages/workflow-history-list/src/workflow-history-list.vue +0 -394
- package/packages/workgroup-tree/index.js +0 -6
- package/packages/workgroup-tree/src/workgroup-tree.vue +0 -127
- package/packages/workgroup-tree-inline/index.js +0 -6
- package/packages/workgroup-tree-inline/src/search-result.vue +0 -227
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +0 -557
- package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +0 -119
- package/packages/workgroup-tree-mobile/index.js +0 -6
- package/packages/workgroup-tree-mobile/src/dept-result.vue +0 -52
- package/packages/workgroup-tree-mobile/src/workgroup-tree-app.vue +0 -148
- package/packages/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue +0 -407
- package/packages/workgroup-tree-mobile/src/workgroup-tree-service.ts +0 -62
- package/packages/workgroup-user-tree/index.js +0 -6
- package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +0 -121
- package/packages/workgroup-user-tree-inline/index.js +0 -9
- package/packages/workgroup-user-tree-inline/src/search-result.vue +0 -271
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +0 -252
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +0 -665
- package/packages/workgroup-user-tree-mobile/index.js +0 -6
- package/packages/workgroup-user-tree-mobile/src/dept-path.vue +0 -36
- package/packages/workgroup-user-tree-mobile/src/dept-result.vue +0 -58
- package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue +0 -119
- package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue +0 -453
- package/packages/workgroup-user-tree-mobile/src/workgroup-user-tree-service.ts +0 -41
- package/packages/year-range-picker/index.js +0 -6
- package/packages/year-range-picker/src/year-range-picker.vue +0 -53
- package/public/favicon.svg +0 -29
- 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 -217
- package/src/components/Scrollbar/index.vue +0 -213
- 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 -336
- package/src/i18n/langs/en.js +0 -336
- 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 -369
- 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 -1006
- 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/svg-icon/index.js +0 -6
- package/src/views/svg-icon/src/svg-icon.vue +0 -46
- package/src/views/wf-history/tache-subprocess-history.vue +0 -45
- package/vite.config.js +0 -143
- /package/{lib/IntervalSelection/src/sectionDate.vue2.js → es/IntervalSelection/src/sectionDate.vue2.mjs} +0 -0
- /package/{lib/_virtual/__vite-browser-external.js → es/_virtual/__vite-browser-external.mjs} +0 -0
- /package/{lib/_virtual/_plugin-vue_export-helper.js → es/_virtual/_plugin-vue_export-helper.mjs} +0 -0
- /package/{lib/breadcrumb/src/breadcrumb.vue2.js → es/breadcrumb/src/breadcrumb.vue2.mjs} +0 -0
- /package/{lib/chat-embed/src/chat-addition-data.vue3.js → es/chat-embed/src/chat-addition-data.vue3.mjs} +0 -0
- /package/{lib/chat-embed/src/chat-ai-answer-tip.vue3.js → es/chat-embed/src/chat-ai-answer-tip.vue3.mjs} +0 -0
- /package/{lib/chat-embed/src/chat-bubble-footer.vue3.js → es/chat-embed/src/chat-bubble-footer.vue3.mjs} +0 -0
- /package/{lib/chat-embed/src/chat-sender.vue3.js → es/chat-embed/src/chat-sender.vue3.mjs} +0 -0
- /package/{lib/chat-embed/src/components/answer-auto-chart.vue3.js → es/chat-embed/src/components/answer-auto-chart.vue3.mjs} +0 -0
- /package/{lib/chat-embed/src/components/answer-home-chart.vue2.js → es/chat-embed/src/components/answer-home-chart.vue2.mjs} +0 -0
- /package/{lib/chat-embed/src/components/answer-home-chart.vue3.js → es/chat-embed/src/components/answer-home-chart.vue3.mjs} +0 -0
- /package/{lib/chat-embed/src/components/answer-interaction-data.vue3.js → es/chat-embed/src/components/answer-interaction-data.vue3.mjs} +0 -0
- /package/{lib/chat-embed/src/components/history-detail.vue3.js → es/chat-embed/src/components/history-detail.vue3.mjs} +0 -0
- /package/{lib/chat-embed/src/header.vue3.js → es/chat-embed/src/header.vue3.mjs} +0 -0
- /package/{lib/chat-embed/src/index.vue3.js → es/chat-embed/src/index.vue3.mjs} +0 -0
- /package/{lib/chat-embed/src/recommendation-message.vue3.js → es/chat-embed/src/recommendation-message.vue3.mjs} +0 -0
- /package/{lib/chat-embed/src/sidebar-item.vue3.js → es/chat-embed/src/sidebar-item.vue3.mjs} +0 -0
- /package/{lib/chat-embed/src/type.js → es/chat-embed/src/type.mjs} +0 -0
- /package/{lib/chat-embed/src/util/chat-embed-util.js → es/chat-embed/src/util/chat-embed-util.mjs} +0 -0
- /package/{lib/chat-embed/src/util/text-file-util.js → es/chat-embed/src/util/text-file-util.mjs} +0 -0
- /package/{lib/chat-embed/src/voice/js/timer.js → es/chat-embed/src/voice/js/timer.mjs} +0 -0
- /package/{lib/date-picker-range/index.vue3.js → es/date-picker-range/index.vue3.mjs} +0 -0
- /package/{lib/department-tree-inline/src/department-multi-tree-inline.vue2.js → es/department-tree-inline/src/department-multi-tree-inline.vue2.mjs} +0 -0
- /package/{lib/department-tree-inline/src/department-single-tree-inline.vue2.js → es/department-tree-inline/src/department-single-tree-inline.vue2.mjs} +0 -0
- /package/{lib/department-tree-inline/src/search-result.vue2.js → es/department-tree-inline/src/search-result.vue2.mjs} +0 -0
- /package/{lib/department-tree-mobile/src/department-tree-app.vue2.js → es/department-tree-mobile/src/department-tree-app.vue2.mjs} +0 -0
- /package/{lib/department-user-tree/src/department-user-multiple-tree.vue2.js → es/department-user-tree/src/department-user-multiple-tree.vue2.mjs} +0 -0
- /package/{lib/department-user-tree-inline/src/department-user-multiple-tree-inline.vue2.js → es/department-user-tree-inline/src/department-user-multiple-tree-inline.vue2.mjs} +0 -0
- /package/{lib/department-user-tree-inline/src/department-user-single-tree-inline.vue2.js → es/department-user-tree-inline/src/department-user-single-tree-inline.vue2.mjs} +0 -0
- /package/{lib/department-user-tree-inline/src/group-user-tree-service.js → es/department-user-tree-inline/src/group-user-tree-service.mjs} +0 -0
- /package/{lib/department-user-tree-inline/src/search-result.vue2.js → es/department-user-tree-inline/src/search-result.vue2.mjs} +0 -0
- /package/{lib/department-user-tree-mobile/src/department-user-tree-app.vue2.js → es/department-user-tree-mobile/src/department-user-tree-app.vue2.mjs} +0 -0
- /package/{lib/department-user-tree-mobile/src/department-user-tree-service.js → es/department-user-tree-mobile/src/department-user-tree-service.mjs} +0 -0
- /package/{lib/dynamic-source-select/src/dynamic-source-select.vue2.js → es/dynamic-source-select/src/dynamic-source-select.vue2.mjs} +0 -0
- /package/{lib/dynamic-source-select/src/dynamic-source-select.vue3.js → es/dynamic-source-select/src/dynamic-source-select.vue3.mjs} +0 -0
- /package/{lib/dynamic-source-select/src/events.js → es/dynamic-source-select/src/events.mjs} +0 -0
- /package/{lib → es}/favicon.svg +0 -0
- /package/{lib/fs-preview/src/fs-preview.vue2.js → es/fs-preview/src/fs-preview.vue2.mjs} +0 -0
- /package/{lib/fs-upload-list/src/fs-upload-list.vue2.js → es/fs-upload-list/src/fs-upload-list.vue2.mjs} +0 -0
- /package/{lib/fs-upload-new/src/file-upload-mobile/file-upload-component.vue3.js → es/fs-upload-new/src/file-upload-mobile/file-upload-component.vue3.mjs} +0 -0
- /package/{lib/fs-upload-new/src/fs-button-upload.vue3.js → es/fs-upload-new/src/fs-button-upload.vue3.mjs} +0 -0
- /package/{lib/fs-upload-new/src/fs-drag-upload.vue3.js → es/fs-upload-new/src/fs-drag-upload.vue3.mjs} +0 -0
- /package/{lib/fs-upload-new/src/fs-preview-new.vue3.js → es/fs-upload-new/src/fs-preview-new.vue3.mjs} +0 -0
- /package/{lib/fs-upload-new/src/fs-preview-new.vue4.js → es/fs-upload-new/src/fs-preview-new.vue4.mjs} +0 -0
- /package/{lib/hamburger/src/hamburger.vue2.js → es/hamburger/src/hamburger.vue2.mjs} +0 -0
- /package/{lib/organization-input/src/organization-input.vue2.js → es/organization-input/src/organization-input.vue2.mjs} +0 -0
- /package/{lib/plugins/public-method.js → es/plugins/public-method.mjs} +0 -0
- /package/{lib/rich-editor/tinymce/zh_CN.js → es/rich-editor/tinymce/zh_CN.mjs} +0 -0
- /package/{lib/row-form/index.vue3.js → es/row-form/index.vue3.mjs} +0 -0
- /package/{lib/src/assets/401/401.gif.js → es/src/assets/401/401.gif.mjs} +0 -0
- /package/{lib/src/assets/404/404-cloud.png.js → es/src/assets/404/404-cloud.png.mjs} +0 -0
- /package/{lib/src/assets/404/404.png.js → es/src/assets/404/404.png.mjs} +0 -0
- /package/{lib/src/assets/chat-embed/robot.gif.js → es/src/assets/chat-embed/robot.gif.mjs} +0 -0
- /package/{lib/src/assets/chat-embed/robot.svg.js → es/src/assets/chat-embed/robot.svg.mjs} +0 -0
- /package/{lib/src/assets/nonemessage.png.js → es/src/assets/nonemessage.png.mjs} +0 -0
- /package/{lib/src/components/Affix/index.vue3.js → es/src/components/Affix/index.vue3.mjs} +0 -0
- /package/{lib/src/components/Scrollbar/index.vue2.js → es/src/components/Scrollbar/index.vue2.mjs} +0 -0
- /package/{lib/src/mixins/resizeMixin.js → es/src/mixins/resizeMixin.mjs} +0 -0
- /package/{lib/src/store/getters.js → es/src/store/getters.mjs} +0 -0
- /package/{lib/src/store/modules/chat-ai-store.js → es/src/store/modules/chat-ai-store.mjs} +0 -0
- /package/{lib/src/store/modules/table.js → es/src/store/modules/table.mjs} +0 -0
- /package/{lib/src/utils/auth-api.js → es/src/utils/auth-api.mjs} +0 -0
- /package/{lib/src/utils/calculator/calculator-factory-wf.js → es/src/utils/calculator/calculator-factory-wf.mjs} +0 -0
- /package/{lib/src/utils/calculator/calculator-factory.js → es/src/utils/calculator/calculator-factory.mjs} +0 -0
- /package/{lib/src/utils/eventBus.js → es/src/utils/eventBus.mjs} +0 -0
- /package/{lib/src/utils/file-util.js → es/src/utils/file-util.mjs} +0 -0
- /package/{lib/src/utils/global-prop.js → es/src/utils/global-prop.mjs} +0 -0
- /package/{lib/src/utils/guid.js → es/src/utils/guid.mjs} +0 -0
- /package/{lib/src/utils/index.js → es/src/utils/index.mjs} +0 -0
- /package/{lib/src/utils/json-util.js → es/src/utils/json-util.mjs} +0 -0
- /package/{lib/src/utils/local-storage.js → es/src/utils/local-storage.mjs} +0 -0
- /package/{lib/src/utils/resize.js → es/src/utils/resize.mjs} +0 -0
- /package/{lib/src/utils/validate.js → es/src/utils/validate.mjs} +0 -0
- /package/{lib/src/utils/watermark-cache.js → es/src/utils/watermark-cache.mjs} +0 -0
- /package/{lib/src/views/dsc-component/Sidebar/Item.vue3.js → es/src/views/dsc-component/Sidebar/Item.vue3.mjs} +0 -0
- /package/{lib/src/views/dsc-component/Sidebar/SidebarItem.vue2.js → es/src/views/dsc-component/Sidebar/SidebarItem.vue2.mjs} +0 -0
- /package/{lib/src/views/dsc-component/tabs/tab-content.vue2.js → es/src/views/dsc-component/tabs/tab-content.vue2.mjs} +0 -0
- /package/{lib/src/views/dsc-component/tabs/tab-content.vue3.js → es/src/views/dsc-component/tabs/tab-content.vue3.mjs} +0 -0
- /package/{lib/src/views/error-page/401.vue2.js → es/src/views/error-page/401.vue2.mjs} +0 -0
- /package/{lib/src/views/error-page/404.vue2.js → es/src/views/error-page/404.vue2.mjs} +0 -0
- /package/{lib/src/views/layout/Layout.vue2.js → es/src/views/layout/Layout.vue2.mjs} +0 -0
- /package/{lib/src/views/layout/components/AppMain.vue2.js → es/src/views/layout/components/AppMain.vue2.mjs} +0 -0
- /package/{lib/src/views/layout/components/Breadcrumb/index.vue2.js → es/src/views/layout/components/Breadcrumb/index.vue2.mjs} +0 -0
- /package/{lib/src/views/layout/components/Menubar/Item.vue3.js → es/src/views/layout/components/Menubar/Item.vue3.mjs} +0 -0
- /package/{lib/src/views/layout/components/Menubar/SidebarItem.vue2.js → es/src/views/layout/components/Menubar/SidebarItem.vue2.mjs} +0 -0
- /package/{lib/src/views/layout/components/Sidebar/Item.vue.js → es/src/views/layout/components/Sidebar/Item.vue.mjs} +0 -0
- /package/{lib/src/views/layout/components/Sidebar/SidebarItem.vue2.js → es/src/views/layout/components/Sidebar/SidebarItem.vue2.mjs} +0 -0
- /package/{lib/src/views/layout/components/iframe-page.vue2.js → es/src/views/layout/components/iframe-page.vue2.mjs} +0 -0
- /package/{lib/src/views/layout/components/tabs/tab-content.vue2.js → es/src/views/layout/components/tabs/tab-content.vue2.mjs} +0 -0
- /package/{lib/src/views/layout/components/tabs/tab-content.vue3.js → es/src/views/layout/components/tabs/tab-content.vue3.mjs} +0 -0
- /package/{lib/src/views/layout/tab-content-iframe-index.vue2.js → es/src/views/layout/tab-content-iframe-index.vue2.mjs} +0 -0
- /package/{lib/src/views/layout/tab-content-index.vue2.js → es/src/views/layout/tab-content-index.vue2.mjs} +0 -0
- /package/{lib/src/views/login/authredirect.vue.js → es/src/views/login/authredirect.vue.mjs} +0 -0
- /package/{lib/src/views/redirect/index.vue.js → es/src/views/redirect/index.vue.mjs} +0 -0
- /package/{lib/src/views/svg-icon/src/svg-icon.vue.js → es/src/views/super-icon/src/index.vue3.mjs} +0 -0
- /package/{lib/src/views/wf-history/tache-subprocess-history.vue2.js → es/src/views/svg-icon/src/svg-icon.vue.mjs} +0 -0
- /package/{lib/super-grid/src/header-context-menu.vue2.js → es/src/views/wf-history/tache-subprocess-history.vue2.mjs} +0 -0
- /package/{lib/super-grid/src/eventBus.js → es/super-grid/src/eventBus.mjs} +0 -0
- /package/{lib/super-grid/src/formatter.js → es/super-grid/src/formatter.mjs} +0 -0
- /package/{lib/super-grid/src/normal-column-content.vue2.js → es/super-grid/src/header-context-menu.vue2.mjs} +0 -0
- /package/{lib/super-grid/src/normal-column.vue2.js → es/super-grid/src/normal-column-content.vue2.mjs} +0 -0
- /package/{lib/super-grid/src/row-operation.vue2.js → es/super-grid/src/normal-column.vue2.mjs} +0 -0
- /package/{lib/super-grid/src/public-methods.js → es/super-grid/src/public-methods.mjs} +0 -0
- /package/{lib/super-grid/src/search-form-advancedQuery.vue2.js → es/super-grid/src/row-operation.vue2.mjs} +0 -0
- /package/{lib/super-grid/src/search-form-item.vue2.js → es/super-grid/src/search-form-advancedQuery.vue2.mjs} +0 -0
- /package/{lib/super-grid/src/search-form-mobile.vue2.js → es/super-grid/src/search-form-item.vue2.mjs} +0 -0
- /package/{lib/super-grid/src/search-form-ordinarySearch.vue2.js → es/super-grid/src/search-form-mobile.vue2.mjs} +0 -0
- /package/{lib/super-grid/src/search-form.vue2.js → es/super-grid/src/search-form-open.vue2.mjs} +0 -0
- /package/{lib/super-grid/src/super-grid.vue2.js → es/super-grid/src/search-form-ordinarySearch.vue2.mjs} +0 -0
- /package/{lib/super-icon/src/index.vue3.js → es/super-grid/src/search-form.vue2.mjs} +0 -0
- /package/{lib/super-grid/src/search-methods.js → es/super-grid/src/search-methods.mjs} +0 -0
- /package/{lib/super-grid/src/store.js → es/super-grid/src/store.mjs} +0 -0
- /package/{lib/super-nine-grid/src/search-form.vue2.js → es/super-grid/src/super-grid.vue2.mjs} +0 -0
- /package/{lib/super-nine-grid/src/super-nine-grid.vue2.js → es/super-icon/src/index.vue3.mjs} +0 -0
- /package/{lib/super-nine-grid/src/formatter.js → es/super-nine-grid/src/formatter.mjs} +0 -0
- /package/{lib/svg-icon/src/svg-icon.vue2.js → es/super-nine-grid/src/search-form.vue2.mjs} +0 -0
- /package/{lib/super-nine-grid/src/search-methods.js → es/super-nine-grid/src/search-methods.mjs} +0 -0
- /package/{lib/super-nine-grid/src/store.js → es/super-nine-grid/src/store.mjs} +0 -0
- /package/{lib/valid-code/src/valid-code.vue2.js → es/super-nine-grid/src/super-nine-grid.vue2.mjs} +0 -0
- /package/{lib/workflow-history-list/src/workflow-history-list.vue2.js → es/svg-icon/src/svg-icon.vue2.mjs} +0 -0
- /package/{lib/utils/gogocodeTransfer.js → es/utils/gogocodeTransfer.mjs} +0 -0
- /package/{lib/workgroup-tree-inline/src/search-result.vue2.js → es/valid-code/src/valid-code.vue2.mjs} +0 -0
- /package/{lib/workflow-history-list/src/api.js → es/workflow-history-list/src/api.mjs} +0 -0
- /package/{lib/workgroup-tree-inline/src/workgroup-tree-inline.vue2.js → es/workflow-history-list/src/workflow-history-list.vue2.mjs} +0 -0
- /package/{lib/workgroup-tree-mobile/src/workgroup-tree-app.vue2.js → es/workgroup-tree-inline/src/search-result.vue2.mjs} +0 -0
- /package/{lib/workgroup-user-tree-inline/src/search-result.vue2.js → es/workgroup-tree-inline/src/workgroup-tree-inline.vue2.mjs} +0 -0
- /package/{lib/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue2.js → es/workgroup-tree-mobile/src/workgroup-tree-app.vue2.mjs} +0 -0
- /package/{lib/workgroup-tree-mobile/src/workgroup-tree-service.js → es/workgroup-tree-mobile/src/workgroup-tree-service.mjs} +0 -0
- /package/{lib/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue2.js → es/workgroup-user-tree-inline/src/search-result.vue2.mjs} +0 -0
- /package/{lib/workgroup-user-tree-mobile/src/workgroup-user-tree-service.js → es/workgroup-user-tree-mobile/src/workgroup-user-tree-service.mjs} +0 -0
|
@@ -1,3814 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div v-resize="onResize" data-v="1.0.0" class="super-grid-main-view" :style="subTableStyle" @click="onClickTableMain">
|
|
3
|
-
<search-form
|
|
4
|
-
v-if="!isFormSubTable && hasLoadedColumns && query && query.showType === 'embedded'"
|
|
5
|
-
v-show="!isMobile || (isMobile && isShowMobileSearch)"
|
|
6
|
-
ref="sf"
|
|
7
|
-
:columns="columns"
|
|
8
|
-
:code="code"
|
|
9
|
-
:url="url"
|
|
10
|
-
:pagination="pagination"
|
|
11
|
-
:query="query"
|
|
12
|
-
:search-form-info="searchFormInfo"
|
|
13
|
-
:search-param="searchFormContent"
|
|
14
|
-
:init-search-props="initSearchProps"
|
|
15
|
-
:list-toolbar-form-data="listToolbarFormData"
|
|
16
|
-
:load-complete-query="loadCompleteQuery"
|
|
17
|
-
class="super-grid-main-search-view"
|
|
18
|
-
@search="doSearch"
|
|
19
|
-
@reset="resetSearch"
|
|
20
|
-
@open-fold="openFold"
|
|
21
|
-
@can-show-mobile-search="$emit('can-show-mobile-search', code)"
|
|
22
|
-
@close-mobile-search="isShowMobileSearch = false"
|
|
23
|
-
/>
|
|
24
|
-
<search-form-dialog
|
|
25
|
-
v-if="hasLoadedColumns && query && query.showType === 'popup'"
|
|
26
|
-
ref="sfDialog"
|
|
27
|
-
:columns="columns"
|
|
28
|
-
:code="code"
|
|
29
|
-
:url="url"
|
|
30
|
-
:pagination="pagination"
|
|
31
|
-
:query="query"
|
|
32
|
-
:search-param="searchFormContent"
|
|
33
|
-
:init-search-props="initSearchProps"
|
|
34
|
-
@search="doSearchDialog"
|
|
35
|
-
@reset="resetSearch"
|
|
36
|
-
@close="closeSearchFormDialog"
|
|
37
|
-
/>
|
|
38
|
-
<div ref="superGridMain" :class="'grid-area ' + code" class="super-grid-main-body">
|
|
39
|
-
<MobileCard
|
|
40
|
-
v-if="isShowCard"
|
|
41
|
-
:selection="selectionTableData"
|
|
42
|
-
:columns="visibleColumns"
|
|
43
|
-
:listCode="code"
|
|
44
|
-
:getColumnComponentData="getColumnComponentData"
|
|
45
|
-
:data="tableDatas"
|
|
46
|
-
v-model:current-page="currentPage"
|
|
47
|
-
:page-size="pagination?.pageSizes?.[0]"
|
|
48
|
-
:page-total="pagination?.total"
|
|
49
|
-
class="super-grid-main-card-view"
|
|
50
|
-
@select="selectRecord"
|
|
51
|
-
@selection-change="cardSelectionChangeEvent"
|
|
52
|
-
@current-change="handleCurrentChange"
|
|
53
|
-
@row-click="rowClickEvent"
|
|
54
|
-
@row-dblclick="rowDblclickEvent"
|
|
55
|
-
/>
|
|
56
|
-
|
|
57
|
-
<el-table
|
|
58
|
-
v-else-if="refreshGrid && hasLoadedColumns && !isShowCard"
|
|
59
|
-
ref="superGrid"
|
|
60
|
-
:data="tableDatas"
|
|
61
|
-
:row-key="getRowKeyProp"
|
|
62
|
-
:show-summary="showSummary"
|
|
63
|
-
:summary-method="getSummaries"
|
|
64
|
-
:style="tableStyle"
|
|
65
|
-
:stripe="stripe"
|
|
66
|
-
:border="true"
|
|
67
|
-
:default-expand-all="defaultExpandAll"
|
|
68
|
-
:lazy="isLazy"
|
|
69
|
-
:load="loadChildren"
|
|
70
|
-
:row-style="changeRowStyle"
|
|
71
|
-
:cell-style="changeCellStyle"
|
|
72
|
-
:header-cell-style="changeHeaderStyle"
|
|
73
|
-
:highlight-current-row="true"
|
|
74
|
-
:span-method="rowSpan"
|
|
75
|
-
:max-height="hasMaxHeight"
|
|
76
|
-
:height="hasTableHeight"
|
|
77
|
-
:class="tableClass"
|
|
78
|
-
:tree-props="getTreeProps(parentProp, isSql, isLazy, dataSourceType)"
|
|
79
|
-
:scrollbar-always-on="scrollbarAlwaysOn"
|
|
80
|
-
class="super-grid-main-table-view"
|
|
81
|
-
@sort-change="handleSortChange"
|
|
82
|
-
@select="selectRecord"
|
|
83
|
-
@select-all="selectAllRecord"
|
|
84
|
-
@selection-change="selectionChangeEvent"
|
|
85
|
-
@row-click="rowClickEvent"
|
|
86
|
-
@row-dblclick="rowDblclickEvent"
|
|
87
|
-
@expand-change="expandChange"
|
|
88
|
-
@header-click="headerClickEvent"
|
|
89
|
-
@header-dragend="changeHederWidth"
|
|
90
|
-
@header-contextmenu="headerContextmenu"
|
|
91
|
-
@cell-click="selectCell"
|
|
92
|
-
@cell-dblclick="cellDblClick"
|
|
93
|
-
>
|
|
94
|
-
<row-detail v-if="detailColumn" :column="detailColumn" :list-code="code" @show-detail="openRowForm" />
|
|
95
|
-
<component
|
|
96
|
-
:is="getComponentType(column)"
|
|
97
|
-
v-for="({ column, ...item }, index) in visibleColumnsComponentData"
|
|
98
|
-
:ref="column.prop"
|
|
99
|
-
:key="column.label + index"
|
|
100
|
-
v-bind="item.$bind"
|
|
101
|
-
v-on="item.$on"
|
|
102
|
-
/>
|
|
103
|
-
</el-table>
|
|
104
|
-
<div v-if="showPagination && !isShowCard" class="super-grid-main-table-footer-view">
|
|
105
|
-
<div class="yx-flex-wrap" style="gap: 10px">
|
|
106
|
-
<div
|
|
107
|
-
v-if="basicInfo.customConfig && !isFormSubTable"
|
|
108
|
-
class="el-icon-setting"
|
|
109
|
-
:title="$t('superGrid.columnConfig')"
|
|
110
|
-
@click="configColumns"
|
|
111
|
-
>
|
|
112
|
-
<el-icon-setting style="width: 16px; height: 16px; color: #777; cursor: pointer" />
|
|
113
|
-
</div>
|
|
114
|
-
|
|
115
|
-
<div v-if="!isFormSubTable" class="el-icon-refresh" :title="$t('superGrid.refresh')" @click="refreshGridData">
|
|
116
|
-
<el-icon-refresh style="width: 16px; height: 16px; color: #777; cursor: pointer" />
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
<el-pagination
|
|
120
|
-
v-if="pagination && isShowPage"
|
|
121
|
-
v-model:current-page="currentPage"
|
|
122
|
-
v-model:page-size="pagination.pageSize"
|
|
123
|
-
background
|
|
124
|
-
:page-sizes="pagination.pageSizes"
|
|
125
|
-
:layout="pagination.layout"
|
|
126
|
-
:total="
|
|
127
|
-
pagination.showTotal
|
|
128
|
-
? pagination.total !== undefined && pagination.total !== '' && pagination.total !== null
|
|
129
|
-
? pagination.total
|
|
130
|
-
: 0
|
|
131
|
-
: 100000000000
|
|
132
|
-
"
|
|
133
|
-
@size-change="handleSizeChange"
|
|
134
|
-
@current-change="handleCurrentChange"
|
|
135
|
-
/>
|
|
136
|
-
</div>
|
|
137
|
-
</div>
|
|
138
|
-
|
|
139
|
-
<columns-config
|
|
140
|
-
v-if="showColumnConfig"
|
|
141
|
-
:visible-columns="visibleColumns"
|
|
142
|
-
:list-code="code"
|
|
143
|
-
:is-sql="isSql"
|
|
144
|
-
@close="closeCustomConfig($event)"
|
|
145
|
-
@reset="resetCustomConfig($event)"
|
|
146
|
-
/>
|
|
147
|
-
<header-context-menu
|
|
148
|
-
v-if="showHeaderContextmenu"
|
|
149
|
-
ref="headerMenu"
|
|
150
|
-
:buttom-arr="options.rightClickMenuArr"
|
|
151
|
-
:column="rightClickColumn"
|
|
152
|
-
@clearHeaderContextmenu="clearHeaderContextmenu"
|
|
153
|
-
/>
|
|
154
|
-
<row-form
|
|
155
|
-
v-if="showRowForm"
|
|
156
|
-
:parent-form-data="parentFormData"
|
|
157
|
-
:columns="visibleColumns"
|
|
158
|
-
:row-index="currentEditRowIndex"
|
|
159
|
-
:list-code="code"
|
|
160
|
-
:drag-column-prop="dragColumnProp"
|
|
161
|
-
:is-sql="isSql"
|
|
162
|
-
:base-url="baseURL"
|
|
163
|
-
:options="options"
|
|
164
|
-
:table-name="tableName"
|
|
165
|
-
:page-code="pageCode"
|
|
166
|
-
:list-toolbar-form-data="listToolbarFormData"
|
|
167
|
-
:list-name="listName"
|
|
168
|
-
:current-page="currentPage"
|
|
169
|
-
:grid-data="isSubTableShowPage ? subTableData : gridData"
|
|
170
|
-
:page-grid-data="isSubTableShowPage ? getSubTableGridData(subTableData) : gridData"
|
|
171
|
-
:line-edit="lineEdit"
|
|
172
|
-
:show-page="pagination && isShowPage"
|
|
173
|
-
:page-size="pagination ? pagination.pageSize : null"
|
|
174
|
-
@close="closeRowForm"
|
|
175
|
-
@refresData="refresData"
|
|
176
|
-
@refresPortData="refresPortData"
|
|
177
|
-
@refresPortsData="refresPortsData"
|
|
178
|
-
@refresMainTableFields="refresMainTableFields"
|
|
179
|
-
@open-page="openPageDialog"
|
|
180
|
-
@prohibitToEdit="prohibitToEdit"
|
|
181
|
-
@refreshList="refreshList"
|
|
182
|
-
/>
|
|
183
|
-
</div>
|
|
184
|
-
</template>
|
|
185
|
-
|
|
186
|
-
<script>
|
|
187
|
-
import { Refresh as ElIconRefresh, Setting as ElIconSetting } from '@element-plus/icons-vue'
|
|
188
|
-
import { $emit } from '../../utils/gogocodeTransfer'
|
|
189
|
-
import IndexColumn from './index-column.vue'
|
|
190
|
-
import SelectionColumn from './selection-column.vue'
|
|
191
|
-
import NormalColumn from './normal-column.vue'
|
|
192
|
-
import GroupColumn from './group-column.vue'
|
|
193
|
-
import ColumnsConfig from './columns-config.vue'
|
|
194
|
-
import SearchForm from './search-form.vue'
|
|
195
|
-
import searchFormDialog from './search-form-dialog.vue'
|
|
196
|
-
import RowDetail from './row-detail.vue'
|
|
197
|
-
import MobileCard from './components/mobile-table-card.jsx'
|
|
198
|
-
import { getEntityFieldValueWithOutCase, setEntityFieldValue } from '../../../src/utils/util'
|
|
199
|
-
import eventBus from './eventBus'
|
|
200
|
-
import {
|
|
201
|
-
addDynamicProp,
|
|
202
|
-
getControlConfig,
|
|
203
|
-
getExtraParam,
|
|
204
|
-
getFirstEditableColumn,
|
|
205
|
-
getGridParams,
|
|
206
|
-
getSpanValuesForColumn,
|
|
207
|
-
getTableHeight,
|
|
208
|
-
isCanRefreshGrid,
|
|
209
|
-
isEditOptionFunction,
|
|
210
|
-
isHasEditOption,
|
|
211
|
-
isHasOptionFunction,
|
|
212
|
-
isObjectValueEqual,
|
|
213
|
-
rowBeforeValidate,
|
|
214
|
-
getRowIndexPage,
|
|
215
|
-
parseSubTableActionCondition
|
|
216
|
-
} from './utils'
|
|
217
|
-
import Sortable from 'sortablejs'
|
|
218
|
-
import store from './store'
|
|
219
|
-
import events from './events'
|
|
220
|
-
import publicMethods from './public-methods'
|
|
221
|
-
import superGridService from './super-grid-service'
|
|
222
|
-
import formValidatorService from './formValidatorUtil'
|
|
223
|
-
import apis from './apis'
|
|
224
|
-
import headerContextMenu from './header-context-menu.vue'
|
|
225
|
-
import { isMobileBrowser, isPromise } from '../../../src/utils/common-util'
|
|
226
|
-
import { checkPermission } from '../../../src/utils/permission'
|
|
227
|
-
import { getGuId } from '../../../src/utils/guid.js'
|
|
228
|
-
// import resizeMixin from '../../../src/mixins/resizeMixin.js';
|
|
229
|
-
import storeVuex from '../../../src/store'
|
|
230
|
-
import { setPageInfoToChatStore, addListRefToStore } from '../../../src/utils/chat-ai-util.ts'
|
|
231
|
-
import searchMethods from './search-methods'
|
|
232
|
-
import { doFormat } from './formatter.js'
|
|
233
|
-
export default {
|
|
234
|
-
components: {
|
|
235
|
-
IndexColumn,
|
|
236
|
-
SelectionColumn,
|
|
237
|
-
NormalColumn,
|
|
238
|
-
GroupColumn,
|
|
239
|
-
ColumnsConfig,
|
|
240
|
-
SearchForm,
|
|
241
|
-
headerContextMenu,
|
|
242
|
-
searchFormDialog,
|
|
243
|
-
ElIconSetting,
|
|
244
|
-
ElIconRefresh,
|
|
245
|
-
RowDetail,
|
|
246
|
-
MobileCard
|
|
247
|
-
},
|
|
248
|
-
name: 'SuperGrid',
|
|
249
|
-
// mixins: [resizeMixin],
|
|
250
|
-
props: {
|
|
251
|
-
// 是否自适应卡片
|
|
252
|
-
isShowAutoCard: {
|
|
253
|
-
type: Boolean,
|
|
254
|
-
default: true
|
|
255
|
-
},
|
|
256
|
-
code: {
|
|
257
|
-
type: String,
|
|
258
|
-
default: ''
|
|
259
|
-
},
|
|
260
|
-
url: {
|
|
261
|
-
type: String,
|
|
262
|
-
default: ''
|
|
263
|
-
},
|
|
264
|
-
options: {
|
|
265
|
-
type: Object,
|
|
266
|
-
default: function () {
|
|
267
|
-
return {}
|
|
268
|
-
}
|
|
269
|
-
},
|
|
270
|
-
publishVersion: {
|
|
271
|
-
type: Number,
|
|
272
|
-
default: 0
|
|
273
|
-
},
|
|
274
|
-
// 为了兼容平台的旧写法,暂不删除以下属性
|
|
275
|
-
// 操作列、占位符列内容显示的函数,格式为:{'属性名':方法},例如:{'name':viewUser,'operation':showOperation}
|
|
276
|
-
customFormatter: {
|
|
277
|
-
type: Object,
|
|
278
|
-
default: null
|
|
279
|
-
},
|
|
280
|
-
searchFormInfo: {
|
|
281
|
-
type: Object,
|
|
282
|
-
default: () => {
|
|
283
|
-
return {}
|
|
284
|
-
}
|
|
285
|
-
},
|
|
286
|
-
// 是否显示分页器
|
|
287
|
-
showPagination: {
|
|
288
|
-
type: Boolean,
|
|
289
|
-
default: true
|
|
290
|
-
},
|
|
291
|
-
listToolbarFormData: {
|
|
292
|
-
type: Object,
|
|
293
|
-
default: null
|
|
294
|
-
},
|
|
295
|
-
// 列表配置信息,如果该属性有值,则不再根据listCode获得列表及字段配置
|
|
296
|
-
settings: {
|
|
297
|
-
type: Object,
|
|
298
|
-
default: null
|
|
299
|
-
},
|
|
300
|
-
additionalParamMap: {
|
|
301
|
-
type: Object,
|
|
302
|
-
default: null
|
|
303
|
-
},
|
|
304
|
-
// 手动控制高度偏移
|
|
305
|
-
manualHeightOffset: {
|
|
306
|
-
type: [undefined, Number],
|
|
307
|
-
default: undefined
|
|
308
|
-
},
|
|
309
|
-
isDialog: {
|
|
310
|
-
type: Boolean,
|
|
311
|
-
default: false
|
|
312
|
-
}
|
|
313
|
-
},
|
|
314
|
-
data() {
|
|
315
|
-
let parentProp
|
|
316
|
-
const parentPropSetting = this.options.parentProp
|
|
317
|
-
if (typeof parentPropSetting !== 'undefined' && parentPropSetting !== '' && parentPropSetting !== null) {
|
|
318
|
-
parentProp = parentPropSetting
|
|
319
|
-
}
|
|
320
|
-
let mergeFields = []
|
|
321
|
-
if (this.options && this.options.mergeFields && this.options.mergeFields !== '') {
|
|
322
|
-
mergeFields = this.options.mergeFields.split(',')
|
|
323
|
-
}
|
|
324
|
-
let optionTableHeight
|
|
325
|
-
if (this.options && this.options.optionTableHeight && this.options.optionTableHeight !== '') {
|
|
326
|
-
optionTableHeight = this.options.optionTableHeight
|
|
327
|
-
}
|
|
328
|
-
let pageCode
|
|
329
|
-
if (this.options && this.options.pageCode) {
|
|
330
|
-
pageCode = this.options.pageCode
|
|
331
|
-
}
|
|
332
|
-
let pageHeight
|
|
333
|
-
if (this.options && this.options.pageHeight) {
|
|
334
|
-
pageHeight = this.options.pageHeight
|
|
335
|
-
}
|
|
336
|
-
let isLazy = true
|
|
337
|
-
if (this.options && this.options.lazy !== undefined) {
|
|
338
|
-
isLazy = this.options.lazy
|
|
339
|
-
}
|
|
340
|
-
let defaultExpandAll = true
|
|
341
|
-
if (this.options && this.options.defaultExpandAll !== undefined) {
|
|
342
|
-
defaultExpandAll = this.options.defaultExpandAll
|
|
343
|
-
}
|
|
344
|
-
// 数据库类型,值为mysql、oracle、sqlserver,默认是mysql,树形表格时需要使用
|
|
345
|
-
let dataSourceType = 'mysql'
|
|
346
|
-
if (window.$vueApp.config.globalProperties.dataSourceType) {
|
|
347
|
-
dataSourceType = window.$vueApp.config.globalProperties.dataSourceType.toLowerCase()
|
|
348
|
-
}
|
|
349
|
-
let pageDevMode = this.options.pageDevMode
|
|
350
|
-
if (pageDevMode === undefined) {
|
|
351
|
-
pageDevMode = false
|
|
352
|
-
}
|
|
353
|
-
let tableStyle
|
|
354
|
-
if (this.options && this.options.tableStyle) {
|
|
355
|
-
tableStyle = this.options.tableStyle
|
|
356
|
-
}
|
|
357
|
-
if (!tableStyle) {
|
|
358
|
-
tableStyle = {}
|
|
359
|
-
}
|
|
360
|
-
tableStyle.width = '100%'
|
|
361
|
-
let tableClass
|
|
362
|
-
if (this.options && this.options.tableClass) {
|
|
363
|
-
tableClass = this.options.tableClass
|
|
364
|
-
}
|
|
365
|
-
if (!tableClass) {
|
|
366
|
-
tableClass = ''
|
|
367
|
-
}
|
|
368
|
-
tableClass += ' elTable'
|
|
369
|
-
let configureObj
|
|
370
|
-
if (this.options && this.options.configureObj) {
|
|
371
|
-
configureObj = this.options.configureObj
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
let pageContext
|
|
375
|
-
if (this.options && this.options.pageContext) {
|
|
376
|
-
pageContext = this.options.pageContext
|
|
377
|
-
}
|
|
378
|
-
const isMobile = isMobileBrowser()
|
|
379
|
-
let checkStrictly = false
|
|
380
|
-
if (this.options.checkStrictly) {
|
|
381
|
-
checkStrictly = true
|
|
382
|
-
}
|
|
383
|
-
return {
|
|
384
|
-
isLoading: false,
|
|
385
|
-
currentPage: 1,
|
|
386
|
-
showColumnConfig: false,
|
|
387
|
-
basicInfo: {
|
|
388
|
-
summary: 'no'
|
|
389
|
-
},
|
|
390
|
-
columns: [],
|
|
391
|
-
loadCompleteQuery: false,
|
|
392
|
-
pagination: null,
|
|
393
|
-
query: null,
|
|
394
|
-
lineEdit: null,
|
|
395
|
-
gridData: [],
|
|
396
|
-
summaries: null,
|
|
397
|
-
sortInfo: null,
|
|
398
|
-
pageSize: null,
|
|
399
|
-
showSearch: false,
|
|
400
|
-
myCustomFormatter: null,
|
|
401
|
-
height: null,
|
|
402
|
-
timer: null,
|
|
403
|
-
timer2: null,
|
|
404
|
-
isSql: false, // 是否是sql查询
|
|
405
|
-
parentProp, // 树状结构数据时,父字段名,默认是id
|
|
406
|
-
checkStrictly,
|
|
407
|
-
hasLoadData: false,
|
|
408
|
-
mergeFields,
|
|
409
|
-
newWidth: null,
|
|
410
|
-
dragColumnProp: null,
|
|
411
|
-
hasLoadedColumns: false, // 是否已经加载了列配置
|
|
412
|
-
backgroundColorMap: {},
|
|
413
|
-
showHeaderContextmenu: false,
|
|
414
|
-
rightClickColumn: null,
|
|
415
|
-
externalClickFlag: false, // 是否是外部点击
|
|
416
|
-
dataTableCode: null,
|
|
417
|
-
dynamicColumnInfo: null, // 列表管理/字段配置/动态列配置中解析的动态列集合,在获得列表数据和行编辑保存动态列时使用
|
|
418
|
-
mainDefaultValueColumns: null, // 当前列表对应的数据表的字段配置有默认值的字段集合,动态列insert插入主表记录时使用
|
|
419
|
-
dynamicServiceName: null, // 动态列展示及行编辑时数据保存的service处理类,可以不填,使用平台默认的处理类
|
|
420
|
-
searchFormContent: null,
|
|
421
|
-
initSearchProps: [], // 初始查询的字段属性名集合
|
|
422
|
-
refreshGrid: true, // 字段配置刷新列表时用于重新渲染列表的状态位
|
|
423
|
-
optionTableHeight, // option传递的table高度
|
|
424
|
-
isFormSubTable: false,
|
|
425
|
-
isShowPageDialog: false, // 是否显示弹框
|
|
426
|
-
jumpPageSetting: null,
|
|
427
|
-
pageCode,
|
|
428
|
-
maxHeight: undefined,
|
|
429
|
-
tableHeight: undefined,
|
|
430
|
-
pageHeight, // 页面高度
|
|
431
|
-
currentSelectCell: null,
|
|
432
|
-
isLazy, // 树形结构时是否懒加载,默认是懒加载的
|
|
433
|
-
defaultExpandAll, // 树形结构是否默认展开所有节点
|
|
434
|
-
parentFormData: null, // 父表单实体信息
|
|
435
|
-
stripe: true,
|
|
436
|
-
dataSourceType,
|
|
437
|
-
pageDevMode,
|
|
438
|
-
toolbarFieldParam: [],
|
|
439
|
-
tableName: null,
|
|
440
|
-
listName: null,
|
|
441
|
-
subTableData: [],
|
|
442
|
-
isShowPage: false, // 子表或普通列表是否显示分页
|
|
443
|
-
isSubTableShowPage: false, // 子表是否显示分页
|
|
444
|
-
isDelete: false, // 获取请求参数是否删除后
|
|
445
|
-
tableStyle, // 表格的style
|
|
446
|
-
tableClass, // 表格的class
|
|
447
|
-
pageContext, // 页面配置上下文
|
|
448
|
-
configureObj, // 表格配置信息
|
|
449
|
-
isMobile, // 是否是移动端
|
|
450
|
-
isShowMobileSearch: false, // 是否显示移动端查询区域
|
|
451
|
-
subTableStyle: {},
|
|
452
|
-
detailColumn: null, // 详情列。子表展开表单 配置使用。
|
|
453
|
-
currentEditRowIndex: null, // 当前查看的行记录号
|
|
454
|
-
showRowForm: false, // 是否显示行记录详情
|
|
455
|
-
baseURL: null,
|
|
456
|
-
hasFilterDataEvent: false, // 是否是表格过滤
|
|
457
|
-
selectionTableData: [], // 勾选数据
|
|
458
|
-
isScrollbarOnTop: false // 横向滚动条是否在顶部显示
|
|
459
|
-
}
|
|
460
|
-
},
|
|
461
|
-
computed: {
|
|
462
|
-
// 高度偏移
|
|
463
|
-
heightOffset() {
|
|
464
|
-
//去掉之前的偏移量33,解决偏移导致横向滚动条被遮住无法显示问题
|
|
465
|
-
return Number(this.manualHeightOffset ?? this.options?.configureObj?.props?.size?.pc?.heightOffset ?? 0)
|
|
466
|
-
// return Number(this.manualHeightOffset ?? this.options?.configureObj?.props?.size?.pc?.heightOffset ?? 33)
|
|
467
|
-
},
|
|
468
|
-
// 限制高度最低值
|
|
469
|
-
hasMaxHeight() {
|
|
470
|
-
if (this.maxHeight) {
|
|
471
|
-
return this.maxHeight <= 100 ? 100 : this.maxHeight + (this.heightOffset !== 0 ? this.heightOffset : 0)
|
|
472
|
-
}
|
|
473
|
-
return undefined
|
|
474
|
-
},
|
|
475
|
-
|
|
476
|
-
// 是指固定高度最低值
|
|
477
|
-
hasTableHeight() {
|
|
478
|
-
if (this.tableHeight) {
|
|
479
|
-
return this.tableHeight <= 100 ? 100 : this.tableHeight + (this.heightOffset !== 0 ? this.heightOffset : 30)
|
|
480
|
-
}
|
|
481
|
-
return undefined
|
|
482
|
-
},
|
|
483
|
-
isMobileListCard() {
|
|
484
|
-
return storeVuex.getters.isMobileListCard
|
|
485
|
-
},
|
|
486
|
-
// 是否显示卡片
|
|
487
|
-
isShowCard() {
|
|
488
|
-
return (
|
|
489
|
-
this.isShowAutoCard &&
|
|
490
|
-
this.isMobileListCard &&
|
|
491
|
-
!this.options.isAdministerListView &&
|
|
492
|
-
(this.options?.configureObj?.props?.base?.isMobileCard ?? true)
|
|
493
|
-
)
|
|
494
|
-
},
|
|
495
|
-
visibleColumns() {
|
|
496
|
-
const gridParams = store.get(this.code)
|
|
497
|
-
const operations = this.getOptionOperations()
|
|
498
|
-
gridParams.canntEdit = false
|
|
499
|
-
const setAttrs = (data) => data.map((item) => ({ property: item.prop, ...item }))
|
|
500
|
-
if (operations && operations.operation && operations.operation.length > 0) {
|
|
501
|
-
operations.operation.forEach((buttonInfo) => {
|
|
502
|
-
if (buttonInfo.props.code === 'lineEditUpdate') {
|
|
503
|
-
if (checkPermission(buttonInfo.props.functionCode, this.basicInfo.systemCode)) {
|
|
504
|
-
gridParams.canntEdit = true
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
})
|
|
508
|
-
}
|
|
509
|
-
if (
|
|
510
|
-
typeof this.options.isAdministerListView !== 'undefined' &&
|
|
511
|
-
this.options.isAdministerListView != null &&
|
|
512
|
-
this.options.isAdministerListView === true
|
|
513
|
-
) {
|
|
514
|
-
return setAttrs(this.columns)
|
|
515
|
-
} else {
|
|
516
|
-
return setAttrs(
|
|
517
|
-
this.columns.filter((column) => {
|
|
518
|
-
if (
|
|
519
|
-
typeof this.options.multiple !== 'undefined' &&
|
|
520
|
-
this.options.multiple === false &&
|
|
521
|
-
column.prop === '$selection'
|
|
522
|
-
) {
|
|
523
|
-
// 表示不显示“多选”列
|
|
524
|
-
return false
|
|
525
|
-
}
|
|
526
|
-
if (
|
|
527
|
-
typeof this.options.showIndex !== 'undefined' &&
|
|
528
|
-
this.options.showIndex === false &&
|
|
529
|
-
column.prop === '$index'
|
|
530
|
-
) {
|
|
531
|
-
// 表示不显示“序号”列
|
|
532
|
-
return false
|
|
533
|
-
}
|
|
534
|
-
// 存储有默认值的字段集合
|
|
535
|
-
this.storeHasDefaultValueColumns(column, gridParams)
|
|
536
|
-
let isVisible
|
|
537
|
-
if (column.show === undefined || column.show) {
|
|
538
|
-
isVisible = true
|
|
539
|
-
const hiddenColumns = this.options.hiddenColumns
|
|
540
|
-
if(column.children && column.children.length > 0){
|
|
541
|
-
this.packageHiddenColumnsWithChildren(column, hiddenColumns)
|
|
542
|
-
}
|
|
543
|
-
if (
|
|
544
|
-
hiddenColumns &&
|
|
545
|
-
hiddenColumns.length > 0 &&
|
|
546
|
-
column.prop &&
|
|
547
|
-
hiddenColumns.indexOf(column.prop) !== -1
|
|
548
|
-
) {
|
|
549
|
-
// 如果当前字段包含在隐藏字段集合中,则不显示该字段
|
|
550
|
-
isVisible = false
|
|
551
|
-
return isVisible
|
|
552
|
-
}
|
|
553
|
-
// 给列配置操作属性
|
|
554
|
-
this.initColumnOperation(column, operations)
|
|
555
|
-
if (!gridParams.$dataTypeMap) {
|
|
556
|
-
gridParams.$dataTypeMap = {}
|
|
557
|
-
}
|
|
558
|
-
// sql时行编辑保存后台代码需要
|
|
559
|
-
gridParams.$dataTypeMap[column.prop] = column.dataType
|
|
560
|
-
} else {
|
|
561
|
-
isVisible = false
|
|
562
|
-
}
|
|
563
|
-
return isVisible
|
|
564
|
-
})
|
|
565
|
-
)
|
|
566
|
-
}
|
|
567
|
-
},
|
|
568
|
-
visibleColumnsComponentData() {
|
|
569
|
-
return this.visibleColumns.map((data) => this.getColumnComponentData(data, this.myCustomFormatter))
|
|
570
|
-
},
|
|
571
|
-
mobileColumns() {
|
|
572
|
-
return 'Layout'
|
|
573
|
-
},
|
|
574
|
-
tableDatas() {
|
|
575
|
-
const gridParams = store.get(this.code)
|
|
576
|
-
const gridData = this.hasFilterDataEvent ? this.filterGridData : this.gridData
|
|
577
|
-
if(gridParams && gridParams.options && gridParams && gridParams.options.allEditable) {
|
|
578
|
-
gridData.forEach(item=>{
|
|
579
|
-
item.$editing = true
|
|
580
|
-
})
|
|
581
|
-
}
|
|
582
|
-
return gridData
|
|
583
|
-
},
|
|
584
|
-
spanArr() {
|
|
585
|
-
const spanArr = []
|
|
586
|
-
for (const column of this.columns) {
|
|
587
|
-
if (column.span || (this.mergeFields && this.mergeFields.indexOf(column.prop) !== -1)) {
|
|
588
|
-
spanArr[column.prop] = getSpanValuesForColumn(this.gridData, column.prop, column.mergerCellBasis)
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
return spanArr
|
|
592
|
-
},
|
|
593
|
-
showSummary() {
|
|
594
|
-
return this.basicInfo.summary !== undefined && this.basicInfo.summary !== 'no'
|
|
595
|
-
},
|
|
596
|
-
// 返回table用来确定唯一的字段。必须配置,否则树形结构时无法显示子集合。
|
|
597
|
-
getRowKeyProp() {
|
|
598
|
-
const gridParams = store.get(this.code)
|
|
599
|
-
if (gridParams && gridParams.options && gridParams.options.rowKeyProp) {
|
|
600
|
-
return gridParams.options.rowKeyProp
|
|
601
|
-
} else {
|
|
602
|
-
// 使用rowDataGuId作为唯一标识,解决台账显示或不显示id。
|
|
603
|
-
// 大小写、或(子表时id还不存在问题,导致行选择和push新数据后 3行数据,
|
|
604
|
-
// 在第二行插入数据,因为key问题3、4行数据变成一样的)
|
|
605
|
-
return '$rowDataGuId'
|
|
606
|
-
// if (this.dataSourceType === 'oracle') {
|
|
607
|
-
// return 'ID'
|
|
608
|
-
// } else {
|
|
609
|
-
// return 'id'
|
|
610
|
-
// }
|
|
611
|
-
}
|
|
612
|
-
},
|
|
613
|
-
filterGridData() {
|
|
614
|
-
if (this.hasFilterDataEvent) {
|
|
615
|
-
return this.filterData()
|
|
616
|
-
} else {
|
|
617
|
-
return this.gridData
|
|
618
|
-
}
|
|
619
|
-
},
|
|
620
|
-
scrollbarAlwaysOn() {
|
|
621
|
-
// 检查全局 Vue 应用配置中是否有 scrollbarAlwaysOn 属性
|
|
622
|
-
if (
|
|
623
|
-
window.$vueApp &&
|
|
624
|
-
window.$vueApp.config &&
|
|
625
|
-
window.$vueApp.config.globalProperties &&
|
|
626
|
-
window.$vueApp.config.globalProperties.scrollbarAlwaysOn !== undefined
|
|
627
|
-
) {
|
|
628
|
-
// 返回全局配置的值
|
|
629
|
-
return window.$vueApp.config.globalProperties.scrollbarAlwaysOn
|
|
630
|
-
}
|
|
631
|
-
// 默认返回 false
|
|
632
|
-
return false
|
|
633
|
-
}
|
|
634
|
-
// ,
|
|
635
|
-
// hasLoadMainTable() {
|
|
636
|
-
// const hasLoadMainTable = store.get('hasLoadMainTable')
|
|
637
|
-
// if (typeof (hasLoadMainTable) === 'undefined') {
|
|
638
|
-
// return false
|
|
639
|
-
// }
|
|
640
|
-
// return hasLoadMainTable
|
|
641
|
-
// }
|
|
642
|
-
},
|
|
643
|
-
watch: {
|
|
644
|
-
// 切换表格 与 卡片是否
|
|
645
|
-
isShowCard: {
|
|
646
|
-
deep: true,
|
|
647
|
-
handler(is) {
|
|
648
|
-
// 是否开启卡片,如果开启则平台切换时候重新回到第一页
|
|
649
|
-
if (this.isShowAutoCard) {
|
|
650
|
-
if (this.currentPage > 1) {
|
|
651
|
-
this.currentPage = 1
|
|
652
|
-
this.handleCurrentChange()
|
|
653
|
-
} else {
|
|
654
|
-
this.$nextTick()
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
if (!is) {
|
|
658
|
-
// 显示表格后重新格式化展示
|
|
659
|
-
this.$nextTick(() => {
|
|
660
|
-
this.resizeTableHeight()
|
|
661
|
-
this.$refs.superGrid?.doLayout()
|
|
662
|
-
})
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
},
|
|
666
|
-
tableDatas: {
|
|
667
|
-
deep: true,
|
|
668
|
-
immediate: true,
|
|
669
|
-
handler(a, b) {}
|
|
670
|
-
},
|
|
671
|
-
'options.SuperGrid': {
|
|
672
|
-
deep: true,
|
|
673
|
-
handler: function () {
|
|
674
|
-
this.externalClickFlag = true
|
|
675
|
-
this.initSetting()
|
|
676
|
-
this.initialize()
|
|
677
|
-
}
|
|
678
|
-
},
|
|
679
|
-
// 监控列表数据修改,列表作为表单编辑器中子表时使用
|
|
680
|
-
gridData: {
|
|
681
|
-
deep: true,
|
|
682
|
-
handler: function (Val) {
|
|
683
|
-
if (!this.isSubTableShowPage) {
|
|
684
|
-
// 列表子表不分页时使用
|
|
685
|
-
$emit(this, 'change-grid-data', this.gridData)
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
},
|
|
689
|
-
// 监控列表数据修改,列表作为表单编辑器中子表时使用
|
|
690
|
-
subTableData: {
|
|
691
|
-
deep: true,
|
|
692
|
-
immediate: true,
|
|
693
|
-
handler: function () {
|
|
694
|
-
if (this.isSubTableShowPage) {
|
|
695
|
-
// 列表子表分页时使用
|
|
696
|
-
const gridParams = store.get(this.code)
|
|
697
|
-
$emit(this, 'change-grid-data', this.subTableData)
|
|
698
|
-
if (
|
|
699
|
-
(gridParams.isChangePage !== undefined && gridParams.isChangePage) ||
|
|
700
|
-
(gridParams.isDelete !== undefined && gridParams.isDelete)
|
|
701
|
-
) {
|
|
702
|
-
// 表示新建记录 或 删除记录时
|
|
703
|
-
// 表示最后一页页码和当前页不同时需要切换页码
|
|
704
|
-
if (gridParams.isChangePage !== undefined && gridParams.isChangePage) {
|
|
705
|
-
// 新建记录 切换到新增记录所属的页码
|
|
706
|
-
const rowPage = getRowIndexPage(this.pageSize, gridParams.addRowIndex)
|
|
707
|
-
this.currentPage = rowPage
|
|
708
|
-
// 切换当前页码到最后一页的数据
|
|
709
|
-
this.changePage()
|
|
710
|
-
} else {
|
|
711
|
-
// 表示不需要切换页码
|
|
712
|
-
this.gridData = this.getSubTableGridData(this.subTableData)
|
|
713
|
-
gridParams.gridData = this.gridData // 完成深拷贝,复制一份对象,行编辑时使用
|
|
714
|
-
gridParams.orgGridData = [].concat(JSON.parse(JSON.stringify(this.gridData)))
|
|
715
|
-
}
|
|
716
|
-
if (gridParams.lineEdit.editingCell) {
|
|
717
|
-
gridParams.lineEdit.editingCell.row = this.gridData.length
|
|
718
|
-
}
|
|
719
|
-
// 使用完状态还原
|
|
720
|
-
gridParams.isChangePage = false
|
|
721
|
-
gridParams.isDelete = false
|
|
722
|
-
} else {
|
|
723
|
-
// 表示不是子表新建记录
|
|
724
|
-
this.gridData = this.getSubTableGridData(this.subTableData)
|
|
725
|
-
gridParams.gridData = this.gridData
|
|
726
|
-
// 完成深拷贝,复制一份对象,行编辑时使用
|
|
727
|
-
gridParams.orgGridData = [].concat(JSON.parse(JSON.stringify(this.gridData)))
|
|
728
|
-
// 使用完状态还原
|
|
729
|
-
gridParams.isChangePage = false
|
|
730
|
-
gridParams.isDelete = false
|
|
731
|
-
}
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
},
|
|
735
|
-
currentSelectCell: {
|
|
736
|
-
deep: true,
|
|
737
|
-
handler: function (newVal, oldVal) {
|
|
738
|
-
this.$nextTick(() => {
|
|
739
|
-
if (newVal) {
|
|
740
|
-
// 手动触发新单元格的点击事件
|
|
741
|
-
// 2025年5月28日 注释newVal.click(),这里会导致行点击事件触发两次,
|
|
742
|
-
// newVal.click()
|
|
743
|
-
}
|
|
744
|
-
if (oldVal) {
|
|
745
|
-
// 清空上一个单元格的选中样式
|
|
746
|
-
oldVal.style.border = ''
|
|
747
|
-
}
|
|
748
|
-
})
|
|
749
|
-
}
|
|
750
|
-
},
|
|
751
|
-
'options.validateRules': {
|
|
752
|
-
deep: true,
|
|
753
|
-
handler: function () {
|
|
754
|
-
this.externalClickFlag = true
|
|
755
|
-
const gridParams = store.get(this.code)
|
|
756
|
-
if (gridParams && gridParams.options) {
|
|
757
|
-
gridParams.options.validateRules = this.options.validateRules
|
|
758
|
-
store.set(this.code, gridParams)
|
|
759
|
-
}
|
|
760
|
-
// this.initSetting()
|
|
761
|
-
// this.initialize()
|
|
762
|
-
}
|
|
763
|
-
},
|
|
764
|
-
'options.subTableCanAdd': {
|
|
765
|
-
deep: true,
|
|
766
|
-
handler: function () {
|
|
767
|
-
const gridParams = store.get(this.code)
|
|
768
|
-
if (gridParams && gridParams.options) {
|
|
769
|
-
gridParams.options.subTableCanAdd = this.options.subTableCanAdd
|
|
770
|
-
store.set(this.code, gridParams)
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
},
|
|
774
|
-
// pageSize每页显示多少条,改变时抛出事件,配置出来的流程表单子表验证提示信息时使用,例如:“第x页第x条记录,xxx必填”,获得页数时需要使用
|
|
775
|
-
pageSize: {
|
|
776
|
-
deep: true,
|
|
777
|
-
|
|
778
|
-
handler(newValue, oldValue) {
|
|
779
|
-
$emit(this, 'change-rows-per-page', this.pageSize)
|
|
780
|
-
}
|
|
781
|
-
},
|
|
782
|
-
// 更新parent值
|
|
783
|
-
'options.extraParam.entityMap': {
|
|
784
|
-
deep: true,
|
|
785
|
-
handler(newValue, oldValue) {
|
|
786
|
-
this.parentFormData = newValue
|
|
787
|
-
this.$emit('change-form-data', this.parentFormData)
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
},
|
|
791
|
-
provide() {
|
|
792
|
-
return {}
|
|
793
|
-
},
|
|
794
|
-
created() {
|
|
795
|
-
storeVuex?.dispatch?.('startListeningToResize')
|
|
796
|
-
store.set(this.code, getGridParams())
|
|
797
|
-
store.set('_list_code', this.code)
|
|
798
|
-
this.initSetting()
|
|
799
|
-
this.judgeIsFormSubTable()
|
|
800
|
-
let stripe = true
|
|
801
|
-
if (isHasOptionFunction('rowStyleRender', this.code)) {
|
|
802
|
-
// 当行需要自定义样式时,斑马线样式会影响效果,所以需要去掉斑马线配置
|
|
803
|
-
stripe = false
|
|
804
|
-
}
|
|
805
|
-
this.stripe = stripe
|
|
806
|
-
if (isHasOptionFunction('filterDataEvent', this.code)) {
|
|
807
|
-
this.hasFilterDataEvent = true
|
|
808
|
-
}
|
|
809
|
-
// if (this.parentProp) {
|
|
810
|
-
// // 表示配置了树形配置
|
|
811
|
-
// this.treeProps = this.getTreeProps()
|
|
812
|
-
// }
|
|
813
|
-
// this.showDemo()
|
|
814
|
-
},
|
|
815
|
-
mounted() {
|
|
816
|
-
this.initialize().then(() => {
|
|
817
|
-
const gridParams = store.get(this.code)
|
|
818
|
-
if (gridParams && gridParams.basicInfo && gridParams.basicInfo.tableName) {
|
|
819
|
-
this.tableName = gridParams.basicInfo.tableName
|
|
820
|
-
}
|
|
821
|
-
if (gridParams && gridParams.basicInfo && gridParams.basicInfo.name) {
|
|
822
|
-
this.listName = gridParams.basicInfo.name
|
|
823
|
-
}
|
|
824
|
-
$emit(this, 'grid-onmounted')
|
|
825
|
-
this.$nextTick(() => {
|
|
826
|
-
// 将子表选项组值传递super-pages中,解决到处报告时子表选项组赋值问题
|
|
827
|
-
this.columns.forEach((column) => {
|
|
828
|
-
if (column.valueSet) {
|
|
829
|
-
$emit(this, 'set-select-options', {
|
|
830
|
-
prop: this.code + '.' + column.prop,
|
|
831
|
-
valueSet: column.valueSet
|
|
832
|
-
})
|
|
833
|
-
}
|
|
834
|
-
})
|
|
835
|
-
this.rowDrop()
|
|
836
|
-
this.columnDrop()
|
|
837
|
-
store.get(this.code).superGrid = this.$refs.superGrid
|
|
838
|
-
if (this.query && this.query.showType === 'embedded') {
|
|
839
|
-
// 嵌入查询时,刚进台账要计算一次列表高度
|
|
840
|
-
this.resizeTableHeight()
|
|
841
|
-
} else {
|
|
842
|
-
this.$watch(
|
|
843
|
-
'showSearch',
|
|
844
|
-
function (newVal, oldVal) {
|
|
845
|
-
this.resizeTableHeight()
|
|
846
|
-
},
|
|
847
|
-
{
|
|
848
|
-
immediate: true,
|
|
849
|
-
deep: true
|
|
850
|
-
}
|
|
851
|
-
)
|
|
852
|
-
}
|
|
853
|
-
window.addEventListener('resize', this.resizeTableHeight)
|
|
854
|
-
// 初始化滚动条位置检测 横向滚动条是否在顶部显示, 不确定有没有性能问题, 有的话可能需要去掉
|
|
855
|
-
if (this.isFormSubTable) {
|
|
856
|
-
this.initScrollbarPositionCheck()
|
|
857
|
-
}
|
|
858
|
-
this.$watch(
|
|
859
|
-
'hasLoadData',
|
|
860
|
-
function (newVal, oldVal) {
|
|
861
|
-
if (newVal === true) {
|
|
862
|
-
this.$nextTick(() => {
|
|
863
|
-
const gridParams = store.get(this.code)
|
|
864
|
-
if (isHasOptionFunction('gridComplete', this.code)) {
|
|
865
|
-
gridParams.options.gridComplete.call(this, {
|
|
866
|
-
gridData: this.isSubTableShowPage ? this.subTableData : this.gridData,
|
|
867
|
-
columns: gridParams.columns,
|
|
868
|
-
superGrid: this.$refs.superGrid,
|
|
869
|
-
pageGridData: this.isSubTableShowPage ? this.gridData : null,
|
|
870
|
-
listCode: this.code,
|
|
871
|
-
additionalParamMap: gridParams.additionalParamMap,
|
|
872
|
-
pageContext: this.pageContext,
|
|
873
|
-
configureObj: this.configureObj
|
|
874
|
-
})
|
|
875
|
-
}
|
|
876
|
-
this.$emit('gridComplete', {
|
|
877
|
-
gridData: this.isSubTableShowPage ? this.subTableData : this.gridData,
|
|
878
|
-
columns: gridParams.columns,
|
|
879
|
-
superGrid: this.$refs.superGrid,
|
|
880
|
-
isMobile: false,
|
|
881
|
-
listCode: this.code,
|
|
882
|
-
pageGridData: this.isSubTableShowPage ? this.gridData : null,
|
|
883
|
-
additionalParamMap: gridParams.additionalParamMap
|
|
884
|
-
})
|
|
885
|
-
})
|
|
886
|
-
}
|
|
887
|
-
},
|
|
888
|
-
{
|
|
889
|
-
immediate: true,
|
|
890
|
-
deep: true
|
|
891
|
-
}
|
|
892
|
-
)
|
|
893
|
-
|
|
894
|
-
const that = this
|
|
895
|
-
const isShowUserTreeDialog = document.querySelector('.user-tree') !== null
|
|
896
|
-
// 当前页面监视键盘输入
|
|
897
|
-
document.querySelector('.' + this.code).onkeydown = function (e) {
|
|
898
|
-
if (!that.isShowPageDialog && !isShowUserTreeDialog) {
|
|
899
|
-
// 当前列表页面没有弹框或选人弹框,才走键盘监视事件
|
|
900
|
-
// 事件对象兼容
|
|
901
|
-
// eslint-disable-next-line no-caller
|
|
902
|
-
const e1 = e || event || window.event || arguments.callee.caller.arguments[0]
|
|
903
|
-
// 处于行编辑状态时,左右上下箭头事件不需要生效
|
|
904
|
-
const isEdit = that.isEditRow(that)
|
|
905
|
-
// 键盘按键判断:左箭头-37;上箭头-38;右箭头-39;下箭头-40
|
|
906
|
-
// 左
|
|
907
|
-
if (e1 && e1.keyCode === 37) {
|
|
908
|
-
// 左箭头
|
|
909
|
-
if (!isEdit) {
|
|
910
|
-
that.selectLeftCell(that)
|
|
911
|
-
}
|
|
912
|
-
} else if (e1 && e1.keyCode === 38) {
|
|
913
|
-
// 上箭头
|
|
914
|
-
if (!isEdit) {
|
|
915
|
-
that.selectUpCell(that)
|
|
916
|
-
}
|
|
917
|
-
} else if (e1 && e1.keyCode === 39) {
|
|
918
|
-
// 右箭头
|
|
919
|
-
if (!isEdit) {
|
|
920
|
-
that.selectRightCell(that)
|
|
921
|
-
}
|
|
922
|
-
} else if (e1 && e1.keyCode === 40) {
|
|
923
|
-
// 下箭头
|
|
924
|
-
if (!isEdit) {
|
|
925
|
-
that.selectDownCell(that)
|
|
926
|
-
}
|
|
927
|
-
} else if (e1 && e1.keyCode === 13) {
|
|
928
|
-
// 回车
|
|
929
|
-
if (that.isCallEnterEvent(that)) {
|
|
930
|
-
// 不是子表时,才需要回车事件,子表时不处理回车事件,扫码枪回车事件和平台的回车事件冲突了。子表时用户一般不会主动回车取消行编辑。
|
|
931
|
-
that.enterOperation(that)
|
|
932
|
-
}
|
|
933
|
-
} else if (e1 && e1.keyCode === 27) {
|
|
934
|
-
// ESC
|
|
935
|
-
that.escOperation(that)
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
|
-
})
|
|
940
|
-
if (this.query && this.query.showType === 'popup') {
|
|
941
|
-
$emit(this, 'setSearchType', true)
|
|
942
|
-
}
|
|
943
|
-
this.$watch(
|
|
944
|
-
'options.extraParam',
|
|
945
|
-
function (newValue, oldVal) {
|
|
946
|
-
this.options['extraParam'] = newValue
|
|
947
|
-
const gridParams = store.get(this.code)
|
|
948
|
-
gridParams.options.extraParam = newValue
|
|
949
|
-
},
|
|
950
|
-
{
|
|
951
|
-
deep: true
|
|
952
|
-
}
|
|
953
|
-
)
|
|
954
|
-
if (!this.isFormSubTable) {
|
|
955
|
-
setPageInfoToChatStore(this.pageContext, {
|
|
956
|
-
listRefs: [
|
|
957
|
-
{
|
|
958
|
-
ref: this
|
|
959
|
-
}
|
|
960
|
-
],
|
|
961
|
-
pageType: 'list'
|
|
962
|
-
})
|
|
963
|
-
} else {
|
|
964
|
-
addListRefToStore(this.pageContext, this)
|
|
965
|
-
}
|
|
966
|
-
})
|
|
967
|
-
},
|
|
968
|
-
beforeDestroy() {
|
|
969
|
-
window.removeEventListener('resize', this.resizeTableHeight)
|
|
970
|
-
// 横向滚动条是否在顶部显示 横向滚动条是否在顶部显示, 不确定有没有性能问题, 有的话可能需要去掉
|
|
971
|
-
if (this.isFormSubTable) {
|
|
972
|
-
window.removeEventListener('scroll', this.checkScrollbarPosition, true)
|
|
973
|
-
window.removeEventListener('resize', this.checkScrollbarPosition)
|
|
974
|
-
}
|
|
975
|
-
},
|
|
976
|
-
methods: {
|
|
977
|
-
...events,
|
|
978
|
-
...publicMethods,
|
|
979
|
-
...superGridService,
|
|
980
|
-
...searchMethods,
|
|
981
|
-
...apis,
|
|
982
|
-
packageHiddenColumnsWithChildren(column, hiddenCols){
|
|
983
|
-
if(column.children && column.children.length > 0){
|
|
984
|
-
column.children.forEach(col=>{
|
|
985
|
-
if(col.show === undefined || col.show){
|
|
986
|
-
if(col.children && col.children.length > 0){
|
|
987
|
-
// 递归处理组合表头字段的隐藏
|
|
988
|
-
this.packageHiddenColumnsWithChildren(col, hiddenCols)
|
|
989
|
-
}
|
|
990
|
-
if (
|
|
991
|
-
hiddenCols &&
|
|
992
|
-
hiddenCols.length > 0 &&
|
|
993
|
-
col.prop &&
|
|
994
|
-
hiddenCols.indexOf(col.prop) !== -1
|
|
995
|
-
) {
|
|
996
|
-
// 如果当前字段包含在隐藏字段集合中,则不显示该字段
|
|
997
|
-
col.dyn_show = false
|
|
998
|
-
} else {
|
|
999
|
-
col.dyn_show = true
|
|
1000
|
-
}
|
|
1001
|
-
}
|
|
1002
|
-
})
|
|
1003
|
-
}
|
|
1004
|
-
},
|
|
1005
|
-
onResize(entry) {
|
|
1006
|
-
this.resizeTableHeight()
|
|
1007
|
-
// 横向滚动条是否在顶部显示, 不确定有没有性能问题, 有的话可能需要去掉
|
|
1008
|
-
if (this.isFormSubTable) {
|
|
1009
|
-
this.checkScrollbarPosition()
|
|
1010
|
-
}
|
|
1011
|
-
},
|
|
1012
|
-
// 初始化滚动条位置检测 横向滚动条是否在顶部显示, 不确定有没有性能问题, 有的话可能需要去掉
|
|
1013
|
-
initScrollbarPositionCheck() {
|
|
1014
|
-
this.$nextTick(() => {
|
|
1015
|
-
window.addEventListener('scroll', this.checkScrollbarPosition, true)
|
|
1016
|
-
window.addEventListener('resize', this.checkScrollbarPosition)
|
|
1017
|
-
this.checkScrollbarPosition()
|
|
1018
|
-
})
|
|
1019
|
-
},
|
|
1020
|
-
// 检查并更新滚动条位置 横向滚动条是否在顶部显示, 不确定有没有性能问题, 有的话可能需要去掉
|
|
1021
|
-
checkScrollbarPosition() {
|
|
1022
|
-
if (!this.$refs.superGrid) {
|
|
1023
|
-
this.isScrollbarOnTop = false
|
|
1024
|
-
return
|
|
1025
|
-
}
|
|
1026
|
-
const tableEl = this.$refs.superGrid.$el
|
|
1027
|
-
if (!tableEl) {
|
|
1028
|
-
this.isScrollbarOnTop = false
|
|
1029
|
-
return
|
|
1030
|
-
}
|
|
1031
|
-
const tableRect = tableEl.getBoundingClientRect()
|
|
1032
|
-
const viewportHeight = window.innerHeight
|
|
1033
|
-
// 判断表格底部是否超出视口(被遮挡)
|
|
1034
|
-
const isBottomHidden = tableRect.bottom > viewportHeight + 10 // 加10px容差
|
|
1035
|
-
if (this.isScrollbarOnTop !== isBottomHidden) {
|
|
1036
|
-
this.isScrollbarOnTop = isBottomHidden
|
|
1037
|
-
this.updateScrollbarPosition()
|
|
1038
|
-
}
|
|
1039
|
-
},
|
|
1040
|
-
// 更新滚动条DOM位置 横向滚动条是否在顶部显示, 不确定有没有性能问题, 有的话可能需要去掉
|
|
1041
|
-
updateScrollbarPosition() {
|
|
1042
|
-
const tableEl = this.$refs.superGrid?.$el
|
|
1043
|
-
if (!tableEl) return
|
|
1044
|
-
const bodyWrapper = tableEl.querySelector('.el-table__body-wrapper')
|
|
1045
|
-
if (!bodyWrapper) return
|
|
1046
|
-
if (this.isScrollbarOnTop) {
|
|
1047
|
-
bodyWrapper.classList.add('scrollbar-on-top')
|
|
1048
|
-
} else {
|
|
1049
|
-
bodyWrapper.classList.remove('scrollbar-on-top')
|
|
1050
|
-
}
|
|
1051
|
-
},
|
|
1052
|
-
onClickMain() {
|
|
1053
|
-
// 清理编辑选中
|
|
1054
|
-
storeVuex?.dispatch?.('clearAllEditing')
|
|
1055
|
-
},
|
|
1056
|
-
isDeleteChange(boole) {
|
|
1057
|
-
this.isDelete = boole
|
|
1058
|
-
},
|
|
1059
|
-
// 是否触发回车事件
|
|
1060
|
-
isCallEnterEvent(that) {
|
|
1061
|
-
let canCall = true
|
|
1062
|
-
if (that.options.isEnableEnterEvent !== undefined && that.options.isEnableEnterEvent === false) {
|
|
1063
|
-
canCall = false
|
|
1064
|
-
}
|
|
1065
|
-
const gridParams = store.get(that.code)
|
|
1066
|
-
if (canCall && gridParams.options && gridParams.options.isFormSubTable) {
|
|
1067
|
-
canCall = false
|
|
1068
|
-
}
|
|
1069
|
-
return canCall
|
|
1070
|
-
},
|
|
1071
|
-
isShowPageArea() {
|
|
1072
|
-
if (this.isFormSubTable) {
|
|
1073
|
-
return this.options.showPageArea !== undefined && this.options.showPageArea === true
|
|
1074
|
-
} else {
|
|
1075
|
-
return true
|
|
1076
|
-
}
|
|
1077
|
-
},
|
|
1078
|
-
resizeTableHeight() {
|
|
1079
|
-
this.$nextTick(() => {
|
|
1080
|
-
let tableHeight = getTableHeight(this.$refs.superGrid, this.code, this.pageHeight, this.isDialog)
|
|
1081
|
-
console.log('tempMaxHeight', tableHeight)
|
|
1082
|
-
|
|
1083
|
-
let tempMaxHeight = undefined
|
|
1084
|
-
const gridParams = store.get(this.code)
|
|
1085
|
-
if (isHasOptionFunction('resizeHeight', this.code)) {
|
|
1086
|
-
let searchHeight = 0
|
|
1087
|
-
if (this.$refs.sf && !this.isMobile) {
|
|
1088
|
-
// 获得查询区高度
|
|
1089
|
-
searchHeight = this.$refs.sf.$el.offsetHeight
|
|
1090
|
-
}
|
|
1091
|
-
const newHeight = gridParams.options.resizeHeight.call(this, {
|
|
1092
|
-
code: this.code,
|
|
1093
|
-
height: tableHeight,
|
|
1094
|
-
searchHeight: searchHeight,
|
|
1095
|
-
additionalParamMap: gridParams.additionalParamMap,
|
|
1096
|
-
pageContext: this.pageContext,
|
|
1097
|
-
configureObj: this.configureObj
|
|
1098
|
-
})
|
|
1099
|
-
if (newHeight) {
|
|
1100
|
-
tempMaxHeight = newHeight
|
|
1101
|
-
}
|
|
1102
|
-
}
|
|
1103
|
-
// 设置列表最大高度
|
|
1104
|
-
if (gridParams.options && gridParams.options.isFormSubTable && gridParams.options.isPdfEditor) {
|
|
1105
|
-
tempMaxHeight = undefined
|
|
1106
|
-
} else if (gridParams.options && gridParams.options.isFormSubTable && gridParams.options.formSetMaxHeight) {
|
|
1107
|
-
tempMaxHeight = gridParams.options.formSetMaxHeight
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
// 设置列表高度
|
|
1111
|
-
if (tempMaxHeight === undefined || tempMaxHeight === null) {
|
|
1112
|
-
if (this.optionTableHeight) {
|
|
1113
|
-
tempMaxHeight = this.optionTableHeight
|
|
1114
|
-
} else if (gridParams.options && gridParams.options.isFormSubTable && gridParams.options.isPdfEditor) {
|
|
1115
|
-
tempMaxHeight = undefined
|
|
1116
|
-
} else if (gridParams.options && gridParams.options.isFormSubTable && gridParams.options.formSetHeight) {
|
|
1117
|
-
tempMaxHeight = gridParams.options.formSetHeight
|
|
1118
|
-
} else {
|
|
1119
|
-
tempMaxHeight = tableHeight
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
if (tempMaxHeight === null) {
|
|
1123
|
-
// 高度是null会导致页面卡死
|
|
1124
|
-
tempMaxHeight = undefined
|
|
1125
|
-
}
|
|
1126
|
-
if (tempMaxHeight !== null && tempMaxHeight !== undefined && parseFloat(tempMaxHeight + '') < 100) {
|
|
1127
|
-
// 如果小于100时,高度给100
|
|
1128
|
-
tempMaxHeight = 100
|
|
1129
|
-
}
|
|
1130
|
-
if (tempMaxHeight !== null && tempMaxHeight !== undefined) {
|
|
1131
|
-
// 用parseFloat是因为tempMaxHeight的值有时是数字字符串
|
|
1132
|
-
tempMaxHeight = parseFloat(tempMaxHeight + '')
|
|
1133
|
-
}
|
|
1134
|
-
if (gridParams.options && gridParams.options.isFormSubTable) {
|
|
1135
|
-
// 表示表单页面子表时,不解析 显示效果了,直接使用高度就行了
|
|
1136
|
-
if (
|
|
1137
|
-
!this.basicInfo.displayEffect ||
|
|
1138
|
-
this.basicInfo.displayEffect === '' ||
|
|
1139
|
-
this.basicInfo.displayEffect === 'default'
|
|
1140
|
-
) {
|
|
1141
|
-
// default默认不铺满
|
|
1142
|
-
this.maxHeight = tempMaxHeight
|
|
1143
|
-
this.tableHeight = undefined
|
|
1144
|
-
} else {
|
|
1145
|
-
// 表示需要cover铺满
|
|
1146
|
-
this.tableHeight = tempMaxHeight
|
|
1147
|
-
this.maxHeight = undefined
|
|
1148
|
-
}
|
|
1149
|
-
} else {
|
|
1150
|
-
// 不是表单页面子表,默认铺满
|
|
1151
|
-
if (
|
|
1152
|
-
!this.basicInfo.displayEffect ||
|
|
1153
|
-
this.basicInfo.displayEffect === '' ||
|
|
1154
|
-
this.basicInfo.displayEffect === 'cover'
|
|
1155
|
-
) {
|
|
1156
|
-
// 表示需要cover铺满
|
|
1157
|
-
this.tableHeight = tempMaxHeight
|
|
1158
|
-
this.maxHeight = undefined
|
|
1159
|
-
} else {
|
|
1160
|
-
// default默认不铺满
|
|
1161
|
-
this.maxHeight = tempMaxHeight
|
|
1162
|
-
this.tableHeight = undefined
|
|
1163
|
-
}
|
|
1164
|
-
}
|
|
1165
|
-
})
|
|
1166
|
-
},
|
|
1167
|
-
// 回车键
|
|
1168
|
-
enterOperation(that) {
|
|
1169
|
-
const gridParams = store.get(that.code)
|
|
1170
|
-
if (gridParams.options && gridParams.options.isFormSubTable) {
|
|
1171
|
-
// 如果是子表,只是取消行编辑状态
|
|
1172
|
-
const editRow = gridParams.$editRow
|
|
1173
|
-
if (editRow) {
|
|
1174
|
-
setEntityFieldValue(editRow, '$editing', false)
|
|
1175
|
-
gridParams.$editRow = null
|
|
1176
|
-
}
|
|
1177
|
-
} else {
|
|
1178
|
-
// 不是子表
|
|
1179
|
-
if (gridParams.options && !gridParams.options.isFormSubTable) {
|
|
1180
|
-
const currentSelectCell = that.currentSelectCell
|
|
1181
|
-
if (currentSelectCell) {
|
|
1182
|
-
const textAreaCell = currentSelectCell.querySelector('.el-textarea')
|
|
1183
|
-
if (textAreaCell) {
|
|
1184
|
-
return
|
|
1185
|
-
}
|
|
1186
|
-
}
|
|
1187
|
-
// 表示不是表单子表时,才需要回车保存
|
|
1188
|
-
const rowIndex = gridParams.$rowIndex
|
|
1189
|
-
if (rowIndex !== undefined && rowIndex !== null) {
|
|
1190
|
-
const row = gridParams.gridData[rowIndex]
|
|
1191
|
-
if (isEditOptionFunction('enter', that.listCode)) {
|
|
1192
|
-
if (this.pageContext) {
|
|
1193
|
-
gridParams.options.lineEditOptions.enter.call(that, {
|
|
1194
|
-
rowIndex,
|
|
1195
|
-
column: that.column,
|
|
1196
|
-
row,
|
|
1197
|
-
orgRow: gridParams.orgGridData[rowIndex],
|
|
1198
|
-
additionalParamMap: gridParams.additionalParamMap,
|
|
1199
|
-
pageContext: gridParams.pageContext,
|
|
1200
|
-
configureObj: gridParams.configureObj
|
|
1201
|
-
})
|
|
1202
|
-
} else {
|
|
1203
|
-
gridParams.options.lineEditOptions.enter.call(
|
|
1204
|
-
that,
|
|
1205
|
-
rowIndex,
|
|
1206
|
-
that.column,
|
|
1207
|
-
row,
|
|
1208
|
-
gridParams.orgGridData[rowIndex],
|
|
1209
|
-
gridParams.additionalParamMap
|
|
1210
|
-
)
|
|
1211
|
-
}
|
|
1212
|
-
} else {
|
|
1213
|
-
that.saveRow(rowIndex, that.code)
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
1216
|
-
}
|
|
1217
|
-
}
|
|
1218
|
-
},
|
|
1219
|
-
// ESC键取消行编辑
|
|
1220
|
-
escOperation(that) {
|
|
1221
|
-
const gridParams = store.get(that.code)
|
|
1222
|
-
if (gridParams.options && !gridParams.options.isFormSubTable) {
|
|
1223
|
-
// 表示不是表单子表时,才需要处理ESC取消操作
|
|
1224
|
-
const rowIndex = gridParams.$rowIndex
|
|
1225
|
-
if (rowIndex !== undefined && rowIndex !== null) {
|
|
1226
|
-
that.restoreRow(rowIndex, that.code)
|
|
1227
|
-
const row = gridParams.gridData[rowIndex]
|
|
1228
|
-
if (isEditOptionFunction('esc', that.listCode)) {
|
|
1229
|
-
if (this.pageContext) {
|
|
1230
|
-
gridParams.options.lineEditOptions.esc.call(that, {
|
|
1231
|
-
rowIndex,
|
|
1232
|
-
column: that.column,
|
|
1233
|
-
row,
|
|
1234
|
-
row: gridParams.orgGridData[rowIndex],
|
|
1235
|
-
additionalParamMap: gridParams.additionalParamMap,
|
|
1236
|
-
pageContext: gridParams.pageContext,
|
|
1237
|
-
configureObj: gridParams.configureObj
|
|
1238
|
-
})
|
|
1239
|
-
} else {
|
|
1240
|
-
gridParams.options.lineEditOptions.esc.call(
|
|
1241
|
-
that,
|
|
1242
|
-
rowIndex,
|
|
1243
|
-
that.column,
|
|
1244
|
-
row,
|
|
1245
|
-
gridParams.orgGridData[rowIndex],
|
|
1246
|
-
gridParams.additionalParamMap
|
|
1247
|
-
)
|
|
1248
|
-
}
|
|
1249
|
-
} else {
|
|
1250
|
-
that.restoreRow(rowIndex, that.code)
|
|
1251
|
-
}
|
|
1252
|
-
}
|
|
1253
|
-
}
|
|
1254
|
-
},
|
|
1255
|
-
// 是否正在编辑行,如果正在编辑左右上下箭头事件不需要生效
|
|
1256
|
-
isEditRow(that) {
|
|
1257
|
-
const currentSelectCell = that.currentSelectCell
|
|
1258
|
-
if (currentSelectCell) {
|
|
1259
|
-
const inputInner = currentSelectCell.querySelector('.el-input__inner')
|
|
1260
|
-
if (inputInner) {
|
|
1261
|
-
return true
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
return false
|
|
1265
|
-
},
|
|
1266
|
-
// 选中上方单元格
|
|
1267
|
-
selectUpCell(that) {
|
|
1268
|
-
const currentSelectCell = that.currentSelectCell
|
|
1269
|
-
if (currentSelectCell) {
|
|
1270
|
-
const trDom = currentSelectCell.parentNode
|
|
1271
|
-
if (trDom) {
|
|
1272
|
-
let tdClass = null
|
|
1273
|
-
let classes = null
|
|
1274
|
-
const classObj = currentSelectCell.attributes['class']
|
|
1275
|
-
if (classObj) {
|
|
1276
|
-
classes = classObj['nodeValue']
|
|
1277
|
-
}
|
|
1278
|
-
if (classes && classes.indexOf(' ') > 0) {
|
|
1279
|
-
const classArr = classes.split(' ')
|
|
1280
|
-
tdClass = classArr[0]
|
|
1281
|
-
}
|
|
1282
|
-
const preTr = trDom['previousSibling']
|
|
1283
|
-
if (preTr) {
|
|
1284
|
-
const targetCell = preTr.querySelector('.' + tdClass)
|
|
1285
|
-
that.currentSelectCell = targetCell
|
|
1286
|
-
}
|
|
1287
|
-
}
|
|
1288
|
-
}
|
|
1289
|
-
},
|
|
1290
|
-
// 选中下方单元格
|
|
1291
|
-
selectDownCell(that) {
|
|
1292
|
-
const currentSelectCell = that.currentSelectCell
|
|
1293
|
-
if (currentSelectCell) {
|
|
1294
|
-
const trDom = currentSelectCell.parentNode
|
|
1295
|
-
if (trDom) {
|
|
1296
|
-
let tdClass = null
|
|
1297
|
-
let classes = null
|
|
1298
|
-
const classObj = currentSelectCell.attributes['class']
|
|
1299
|
-
if (classObj) {
|
|
1300
|
-
classes = classObj['nodeValue']
|
|
1301
|
-
}
|
|
1302
|
-
if (classes && classes.indexOf(' ') > 0) {
|
|
1303
|
-
const classArr = classes.split(' ')
|
|
1304
|
-
tdClass = classArr[0]
|
|
1305
|
-
}
|
|
1306
|
-
const preTr = trDom['nextSibling']
|
|
1307
|
-
if (preTr) {
|
|
1308
|
-
const targetCell = preTr.querySelector('.' + tdClass)
|
|
1309
|
-
that.currentSelectCell = targetCell
|
|
1310
|
-
}
|
|
1311
|
-
}
|
|
1312
|
-
}
|
|
1313
|
-
},
|
|
1314
|
-
// 选中右侧单元格
|
|
1315
|
-
selectRightCell(that) {
|
|
1316
|
-
if (that.currentSelectCell) {
|
|
1317
|
-
const nextCell = that.currentSelectCell['nextSibling']
|
|
1318
|
-
if (nextCell) {
|
|
1319
|
-
let classes
|
|
1320
|
-
const classObj = nextCell.attributes['class']
|
|
1321
|
-
if (classObj) {
|
|
1322
|
-
classes = classObj['nodeValue']
|
|
1323
|
-
}
|
|
1324
|
-
if (classes && classes.indexOf(' is-hidden') > 0) {
|
|
1325
|
-
// 表示需要处理冻结列情况
|
|
1326
|
-
that.getTargetCellWithFixTable(that, classes, nextCell)
|
|
1327
|
-
} else {
|
|
1328
|
-
that.currentSelectCell = nextCell
|
|
1329
|
-
}
|
|
1330
|
-
}
|
|
1331
|
-
}
|
|
1332
|
-
},
|
|
1333
|
-
// 选中左侧单元格
|
|
1334
|
-
selectLeftCell(that) {
|
|
1335
|
-
if (that.currentSelectCell) {
|
|
1336
|
-
const preCell = that.currentSelectCell['previousSibling']
|
|
1337
|
-
if (preCell) {
|
|
1338
|
-
let classes
|
|
1339
|
-
const classObj = preCell.attributes['class']
|
|
1340
|
-
if (classObj) {
|
|
1341
|
-
classes = classObj['nodeValue']
|
|
1342
|
-
}
|
|
1343
|
-
if (classes && classes.indexOf(' is-hidden') > 0) {
|
|
1344
|
-
// 表示需要处理冻结列情况
|
|
1345
|
-
that.getTargetCellWithFixTable(that, classes, preCell)
|
|
1346
|
-
} else {
|
|
1347
|
-
that.currentSelectCell = preCell
|
|
1348
|
-
}
|
|
1349
|
-
}
|
|
1350
|
-
}
|
|
1351
|
-
},
|
|
1352
|
-
// 左右箭头时,有冻结列时,获得目的单元格
|
|
1353
|
-
getTargetCellWithFixTable(that, classes, currentCell) {
|
|
1354
|
-
const tr = currentCell.parentNode
|
|
1355
|
-
if (tr) {
|
|
1356
|
-
const tbody = tr.parentNode
|
|
1357
|
-
if (tbody) {
|
|
1358
|
-
const table = tbody.parentNode
|
|
1359
|
-
if (table) {
|
|
1360
|
-
const tableDiv = table.parentNode
|
|
1361
|
-
if (tableDiv) {
|
|
1362
|
-
const classObj = tableDiv.attributes['class']
|
|
1363
|
-
if (classObj) {
|
|
1364
|
-
const tableDivClasses = classObj['nodeValue']
|
|
1365
|
-
if (tableDivClasses && tableDivClasses.indexOf('el-table__fixed-body-wrapper') >= 0) {
|
|
1366
|
-
// 表示当前单元格是冻结列中的,需要在非冻结列中获得该单元格
|
|
1367
|
-
let tdClass = null
|
|
1368
|
-
if (classes && classes.indexOf(' ') > 0) {
|
|
1369
|
-
const classArr = classes.split(' ')
|
|
1370
|
-
tdClass = classArr[0]
|
|
1371
|
-
}
|
|
1372
|
-
if (tdClass) {
|
|
1373
|
-
const targetCell = document.querySelector(
|
|
1374
|
-
'.' + this.code + ' .el-table__body-wrapper .current-row .' + tdClass
|
|
1375
|
-
)
|
|
1376
|
-
that.currentSelectCell = targetCell
|
|
1377
|
-
}
|
|
1378
|
-
} else if (tableDivClasses && tableDivClasses.indexOf('el-table__body-wrapper') >= 0) {
|
|
1379
|
-
// 表示当前单元格是非冻结列中的,需要在冻结列中获得该单元格
|
|
1380
|
-
let tdClass = null
|
|
1381
|
-
if (classes && classes.indexOf(' ') > 0) {
|
|
1382
|
-
const classArr = classes.split(' ')
|
|
1383
|
-
tdClass = classArr[0]
|
|
1384
|
-
}
|
|
1385
|
-
if (tdClass) {
|
|
1386
|
-
const targetCell = document.querySelector(
|
|
1387
|
-
'.' + this.code + ' .el-table__fixed-body-wrapper .current-row .' + tdClass
|
|
1388
|
-
)
|
|
1389
|
-
that.currentSelectCell = targetCell
|
|
1390
|
-
}
|
|
1391
|
-
}
|
|
1392
|
-
}
|
|
1393
|
-
}
|
|
1394
|
-
}
|
|
1395
|
-
}
|
|
1396
|
-
}
|
|
1397
|
-
},
|
|
1398
|
-
// 存储有默认值的字段集合
|
|
1399
|
-
storeHasDefaultValueColumns(column, gridParams) {
|
|
1400
|
-
if (column.defaultValue !== undefined && column.defaultValue !== null && column.defaultValue !== '') {
|
|
1401
|
-
if (gridParams.defaultValueColumns === undefined || gridParams.defaultValueColumns === null) {
|
|
1402
|
-
gridParams.defaultValueColumns = []
|
|
1403
|
-
}
|
|
1404
|
-
// 放到defaultValueColumns前要根据column.prop判断是否已经存在
|
|
1405
|
-
const hasColumn = gridParams.defaultValueColumns.find((item) => item.prop === column.prop)
|
|
1406
|
-
if (!hasColumn) {
|
|
1407
|
-
gridParams.defaultValueColumns.push(column)
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
},
|
|
1411
|
-
// 判断是不是表单子表的使用
|
|
1412
|
-
judgeIsFormSubTable() {
|
|
1413
|
-
// 没有分页
|
|
1414
|
-
// 没有排序
|
|
1415
|
-
const gridParams = store.get(this.code)
|
|
1416
|
-
if (
|
|
1417
|
-
gridParams &&
|
|
1418
|
-
gridParams.options &&
|
|
1419
|
-
gridParams.options.isFormSubTable !== undefined &&
|
|
1420
|
-
gridParams.options.isFormSubTable === true
|
|
1421
|
-
) {
|
|
1422
|
-
this.isFormSubTable = true
|
|
1423
|
-
this.subTableStyle = { width: '100%' }
|
|
1424
|
-
}
|
|
1425
|
-
},
|
|
1426
|
-
/**
|
|
1427
|
-
* 给列设置操作信息
|
|
1428
|
-
* @param operationSetting 操作列设置,{prop:[{按钮组件},{按钮组件},{link组件}],prop:[{},{}]}
|
|
1429
|
-
*/
|
|
1430
|
-
initColumnOperation(column, operationSetting) {
|
|
1431
|
-
if (operationSetting && operationSetting[column.prop]) {
|
|
1432
|
-
const prop = column.prop
|
|
1433
|
-
column.operations = operationSetting[prop]
|
|
1434
|
-
}
|
|
1435
|
-
},
|
|
1436
|
-
// 获得属性列操作信息
|
|
1437
|
-
getOptionOperations() {
|
|
1438
|
-
if (typeof this.options['operations'] !== 'undefined' && this.options['operations'] !== null) {
|
|
1439
|
-
return this.options['operations']
|
|
1440
|
-
}
|
|
1441
|
-
},
|
|
1442
|
-
initSetting() {
|
|
1443
|
-
const gridParams = store.get(this.code)
|
|
1444
|
-
if (typeof this.options !== 'undefined') {
|
|
1445
|
-
Object.assign(gridParams.options, this.options)
|
|
1446
|
-
if (!gridParams.options.lineEditOptions) {
|
|
1447
|
-
gridParams.options.lineEditOptions = gridParams.defaultLineEditOptions
|
|
1448
|
-
}
|
|
1449
|
-
if (typeof this.options['customFormatter'] !== 'undefined' && this.options['customFormatter'] !== null) {
|
|
1450
|
-
this.myCustomFormatter = this.options['customFormatter']
|
|
1451
|
-
}
|
|
1452
|
-
} else {
|
|
1453
|
-
gridParams.options = {}
|
|
1454
|
-
gridParams.options.lineEditOptions = gridParams.defaultLineEditOptions
|
|
1455
|
-
}
|
|
1456
|
-
if (!isHasEditOption('input', this.code)) {
|
|
1457
|
-
gridParams.options.lineEditOptions.input = gridParams.defaultLineEditOptions.input
|
|
1458
|
-
}
|
|
1459
|
-
if (!this.myCustomFormatter && typeof this.customFormatter !== 'undefined' && this.customFormatter !== null) {
|
|
1460
|
-
this.myCustomFormatter = this.customFormatter
|
|
1461
|
-
}
|
|
1462
|
-
if (this.options && this.options.dynamicServiceName && this.options.dynamicServiceName !== undefined) {
|
|
1463
|
-
this.dynamicServiceName = this.options.dynamicServiceName
|
|
1464
|
-
gridParams.dynamicServiceName = this.dynamicServiceName
|
|
1465
|
-
}
|
|
1466
|
-
if (this.options && this.options.system && this.options.system !== undefined) {
|
|
1467
|
-
gridParams.system = this.options.system
|
|
1468
|
-
}
|
|
1469
|
-
if (this.options && this.options.additionalParamMap && this.options.additionalParamMap !== undefined) {
|
|
1470
|
-
gridParams.additionalParamMap = this.options.additionalParamMap
|
|
1471
|
-
}
|
|
1472
|
-
|
|
1473
|
-
let baseURL
|
|
1474
|
-
if (gridParams.options && gridParams.options.backendUrl) {
|
|
1475
|
-
baseURL = gridParams.options.backendUrl
|
|
1476
|
-
}
|
|
1477
|
-
if (!baseURL) {
|
|
1478
|
-
baseURL = window.$vueApp.config.globalProperties.baseURL
|
|
1479
|
-
}
|
|
1480
|
-
this.baseURL = baseURL
|
|
1481
|
-
// 封装v10字段配置
|
|
1482
|
-
gridParams.colConfigureMap = this.packageListColumnSetting()
|
|
1483
|
-
},
|
|
1484
|
-
changeRowStyle(param) {
|
|
1485
|
-
// param的格式:{row, rowIndex}
|
|
1486
|
-
|
|
1487
|
-
// 新增表格编辑背景颜色
|
|
1488
|
-
if (param.row.$editing) {
|
|
1489
|
-
return { background: `var(--el-table-row-hover-bg-color)` }
|
|
1490
|
-
}
|
|
1491
|
-
const gridParams = store.get(this.code)
|
|
1492
|
-
if (this.lineEdit && this.lineEdit.editable) {
|
|
1493
|
-
if (param.rowIndex === gridParams.$rowIndex) {
|
|
1494
|
-
if (!isObjectValueEqual(param.row, gridParams.orgGridData[gridParams.$rowIndex])) {
|
|
1495
|
-
// return { 'background': 'rgb(245, 181, 203)' }
|
|
1496
|
-
}
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1499
|
-
if (isHasOptionFunction('rowStyleRender', this.code)) {
|
|
1500
|
-
param.additionalParamMap = gridParams.additionalParamMap
|
|
1501
|
-
param.pageContext = this.pageContext
|
|
1502
|
-
param.configureOb = this.configureObj
|
|
1503
|
-
if (param.row) {
|
|
1504
|
-
param.row = this.handRowKeyToUpperCase(param.row)
|
|
1505
|
-
}
|
|
1506
|
-
return gridParams.options.rowStyleRender.call(this, param)
|
|
1507
|
-
}
|
|
1508
|
-
if (this.options && this.options.renderRow && this.options.renderRow.hasOwnProperty(param.rowIndex)) {
|
|
1509
|
-
return { background: this.options.renderRow[param.rowIndex] }
|
|
1510
|
-
}
|
|
1511
|
-
},
|
|
1512
|
-
changeCellStyle(param) {
|
|
1513
|
-
const gridParams = store.get(this.code)
|
|
1514
|
-
let funName = null
|
|
1515
|
-
let columnOptions = null
|
|
1516
|
-
let columnStyleSetting = null
|
|
1517
|
-
if (param && param.column && param.column.property) {
|
|
1518
|
-
if (gridParams && gridParams.columnOptionMap) {
|
|
1519
|
-
if (gridParams.columnOptionMap[param.column.property]) {
|
|
1520
|
-
columnOptions = gridParams.columnOptionMap[param.column.property]
|
|
1521
|
-
if (columnOptions.events && columnOptions.events.cellStyle) {
|
|
1522
|
-
funName = columnOptions.events.cellStyle
|
|
1523
|
-
}
|
|
1524
|
-
const controlConfig = getControlConfig(columnOptions)
|
|
1525
|
-
if (controlConfig && controlConfig['cellStyle']) {
|
|
1526
|
-
columnStyleSetting = controlConfig['cellStyle']
|
|
1527
|
-
}
|
|
1528
|
-
}
|
|
1529
|
-
}
|
|
1530
|
-
}
|
|
1531
|
-
// {row, column, rowIndex, columnIndex}
|
|
1532
|
-
// 获取对应单元格配置
|
|
1533
|
-
if (isHasOptionFunction('cellStyleRender', this.code)) {
|
|
1534
|
-
param.additionalParamMap = gridParams.additionalParamMap
|
|
1535
|
-
param.pageContext = this.pageContext
|
|
1536
|
-
param.configureObj = this.configureObj
|
|
1537
|
-
param.cellStyle = columnStyleSetting
|
|
1538
|
-
if (param.row) {
|
|
1539
|
-
param.row = this.handRowKeyToUpperCase(param.row)
|
|
1540
|
-
}
|
|
1541
|
-
return gridParams.options.cellStyleRender.call(this, param)
|
|
1542
|
-
} else if (
|
|
1543
|
-
funName !== null &&
|
|
1544
|
-
columnOptions !== null &&
|
|
1545
|
-
gridParams.options &&
|
|
1546
|
-
gridParams.options['eventCallBack'] &&
|
|
1547
|
-
gridParams.options['eventCallBack'][funName] &&
|
|
1548
|
-
typeof gridParams.options['eventCallBack'][funName] === 'function'
|
|
1549
|
-
) {
|
|
1550
|
-
const params = {
|
|
1551
|
-
value: param.row[param.column.property],
|
|
1552
|
-
row: param.row,
|
|
1553
|
-
column: columnOptions,
|
|
1554
|
-
prop: param.column.property,
|
|
1555
|
-
additionalParamMap: gridParams.additionalParamMap,
|
|
1556
|
-
rowIndex: param.rowIndex,
|
|
1557
|
-
cellStyle: columnStyleSetting
|
|
1558
|
-
}
|
|
1559
|
-
if (params.row) {
|
|
1560
|
-
params.row = this.handRowKeyToUpperCase(params.row)
|
|
1561
|
-
}
|
|
1562
|
-
return gridParams.options['eventCallBack'][funName].call(this, params)
|
|
1563
|
-
}
|
|
1564
|
-
},
|
|
1565
|
-
changeHeaderStyle(param) {
|
|
1566
|
-
// param的格式:{row, column, rowIndex, columnIndex}
|
|
1567
|
-
// 区分是编辑模式还是应用模式
|
|
1568
|
-
if (
|
|
1569
|
-
typeof this.options.isAdministerListView !== 'undefined' &&
|
|
1570
|
-
this.options.isAdministerListView != null &&
|
|
1571
|
-
this.options.isAdministerListView === true
|
|
1572
|
-
) {
|
|
1573
|
-
// 编辑模式
|
|
1574
|
-
const column = param.column
|
|
1575
|
-
if (column.type === 'selection') {
|
|
1576
|
-
if (this.backgroundColorMap['$selection']) {
|
|
1577
|
-
return { background: this.backgroundColorMap['$selection'] }
|
|
1578
|
-
}
|
|
1579
|
-
} else if (column.type && column.type === 'default' && !column.property) {
|
|
1580
|
-
if (this.backgroundColorMap['$index']) {
|
|
1581
|
-
return { background: this.backgroundColorMap['$index'] }
|
|
1582
|
-
}
|
|
1583
|
-
} else {
|
|
1584
|
-
if (column.property && this.backgroundColorMap[column.property]) {
|
|
1585
|
-
return { background: this.backgroundColorMap[column.property] }
|
|
1586
|
-
}
|
|
1587
|
-
}
|
|
1588
|
-
} else {
|
|
1589
|
-
const gridParams = store.get(this.code)
|
|
1590
|
-
let funName = null
|
|
1591
|
-
let columnOptions = null
|
|
1592
|
-
let titleStyleSetting = null
|
|
1593
|
-
if (param && param.column && param.column.property) {
|
|
1594
|
-
if (gridParams && gridParams.columnOptionMap) {
|
|
1595
|
-
if (gridParams.columnOptionMap[param.column.property]) {
|
|
1596
|
-
columnOptions = gridParams.columnOptionMap[param.column.property]
|
|
1597
|
-
if (columnOptions.events && columnOptions.events.headerCellStyle) {
|
|
1598
|
-
funName = columnOptions.events.headerCellStyle
|
|
1599
|
-
}
|
|
1600
|
-
const controlConfig = getControlConfig(columnOptions)
|
|
1601
|
-
if (controlConfig && controlConfig['titleStyle']) {
|
|
1602
|
-
titleStyleSetting = controlConfig['titleStyle']
|
|
1603
|
-
}
|
|
1604
|
-
}
|
|
1605
|
-
}
|
|
1606
|
-
}
|
|
1607
|
-
// 应用模式
|
|
1608
|
-
// 修改表头样式,当某些字段需要编辑时,某些字段不需要编辑时,为了突出显示有权限编辑的字段,可以使用该功能
|
|
1609
|
-
if (isHasOptionFunction('titleStyleRender', this.code)) {
|
|
1610
|
-
param.additionalParamMap = gridParams.additionalParamMap
|
|
1611
|
-
param.pageContext = this.pageContext
|
|
1612
|
-
param.configureObj = this.configureObj
|
|
1613
|
-
param.titleStyle = titleStyleSetting
|
|
1614
|
-
return gridParams.options.titleStyleRender.call(this, param)
|
|
1615
|
-
} else if (gridParams.options.renderHeader && gridParams.options.renderHeader.props) {
|
|
1616
|
-
const column = param.column
|
|
1617
|
-
const props = gridParams.options.renderHeader.props
|
|
1618
|
-
const propsArr = props.split(',')
|
|
1619
|
-
for (let i = 0; i < propsArr.length; i++) {
|
|
1620
|
-
const prop = propsArr[i]
|
|
1621
|
-
if (column.property === prop.trim()) {
|
|
1622
|
-
let backgroundColor = '#c3f4e2'
|
|
1623
|
-
if (typeof gridParams.options.renderHeader.color !== 'undefined') {
|
|
1624
|
-
backgroundColor = gridParams.options.renderHeader.color
|
|
1625
|
-
}
|
|
1626
|
-
return { background: backgroundColor }
|
|
1627
|
-
}
|
|
1628
|
-
}
|
|
1629
|
-
} else if (
|
|
1630
|
-
funName !== null &&
|
|
1631
|
-
columnOptions !== null &&
|
|
1632
|
-
gridParams.options &&
|
|
1633
|
-
gridParams.options['eventCallBack'] &&
|
|
1634
|
-
gridParams.options['eventCallBack'][funName] &&
|
|
1635
|
-
typeof gridParams.options['eventCallBack'][funName] === 'function'
|
|
1636
|
-
) {
|
|
1637
|
-
// const param = { value: param.row[param.column.property], row: param.row, column: columnOptions, prop: param.column.property }
|
|
1638
|
-
param.additionalParamMap = gridParams.additionalParamMap
|
|
1639
|
-
param.titleStyle = titleStyleSetting
|
|
1640
|
-
return gridParams.options['eventCallBack'][funName].call(this, param)
|
|
1641
|
-
}
|
|
1642
|
-
}
|
|
1643
|
-
},
|
|
1644
|
-
fetchData(searchParam, isSearch, parentRowIds, resove) {
|
|
1645
|
-
const gridParams = store.get(this.code)
|
|
1646
|
-
// 查询数据需要区分,如果时列表管理编辑模式,使用静态数据
|
|
1647
|
-
if (gridParams.options && gridParams.options.isPageInfo) {
|
|
1648
|
-
// 预览模式且从表单子表进入
|
|
1649
|
-
} else {
|
|
1650
|
-
if (gridParams.options && gridParams.options.isAdministerListView) {
|
|
1651
|
-
// 根据类型生成静态数据
|
|
1652
|
-
if (gridParams.options.SuperGrid && gridParams.options.SuperGrid.simulationDate) {
|
|
1653
|
-
if (isHasOptionFunction('gridDataLoaded', this.code)) {
|
|
1654
|
-
const gridData = gridParams.options.gridDataLoaded.call(this, {
|
|
1655
|
-
gridData: gridParams.options.SuperGrid.simulationDate,
|
|
1656
|
-
columns: gridParams.columns,
|
|
1657
|
-
additionalParamMap: gridParams.additionalParamMap,
|
|
1658
|
-
pageContext: this.pageContext,
|
|
1659
|
-
configureObj: this.configureObj
|
|
1660
|
-
})
|
|
1661
|
-
if (gridData) {
|
|
1662
|
-
this.gridData = gridData
|
|
1663
|
-
} else {
|
|
1664
|
-
this.gridData = gridParams.options.SuperGrid.simulationDate
|
|
1665
|
-
}
|
|
1666
|
-
} else {
|
|
1667
|
-
this.gridData = gridParams.options.SuperGrid.simulationDate
|
|
1668
|
-
}
|
|
1669
|
-
gridParams.gridData = this.gridData
|
|
1670
|
-
}
|
|
1671
|
-
} else if (
|
|
1672
|
-
gridParams.options &&
|
|
1673
|
-
gridParams.options.isFormSubTable &&
|
|
1674
|
-
gridParams.options.subTableData &&
|
|
1675
|
-
gridParams.options.subTableData.length > 0
|
|
1676
|
-
) {
|
|
1677
|
-
this.packageSubTableData(gridParams, gridParams.options.subTableData)
|
|
1678
|
-
} else {
|
|
1679
|
-
const isCanRefreshTableData = this.canRefreshTableData(gridParams)
|
|
1680
|
-
if (isCanRefreshTableData) {
|
|
1681
|
-
// 可以刷新表格记录
|
|
1682
|
-
return this.fetchListData(searchParam, isSearch, parentRowIds, resove)
|
|
1683
|
-
} else {
|
|
1684
|
-
// 子表无记录时不需要刷新子表记录。表示是新建或修改时子表无记录,且不需要刷新子表。
|
|
1685
|
-
if (this.isSubTableEmpty(gridParams)) {
|
|
1686
|
-
// 表示是新建表单时,子表记录集合是空数组
|
|
1687
|
-
const subTableData = []
|
|
1688
|
-
this.packageSubTableData(gridParams, subTableData)
|
|
1689
|
-
}
|
|
1690
|
-
this.hasLoadData = true
|
|
1691
|
-
gridParams.loaded = true
|
|
1692
|
-
}
|
|
1693
|
-
}
|
|
1694
|
-
}
|
|
1695
|
-
},
|
|
1696
|
-
isSubTableEmpty(gridParams) {
|
|
1697
|
-
return (
|
|
1698
|
-
gridParams.options &&
|
|
1699
|
-
gridParams.options.isFormSubTable &&
|
|
1700
|
-
(gridParams.options.subTableData === undefined ||
|
|
1701
|
-
gridParams.options.subTableData === null ||
|
|
1702
|
-
gridParams.options.subTableData.length === 0)
|
|
1703
|
-
)
|
|
1704
|
-
},
|
|
1705
|
-
packageSubTableData(gridParams, initSubTableData) {
|
|
1706
|
-
this.hasLoadData = false
|
|
1707
|
-
gridParams.loaded = true
|
|
1708
|
-
let subTableData = []
|
|
1709
|
-
// 如果有子表数据,则展示传递的子表数据
|
|
1710
|
-
if (isHasOptionFunction('gridDataLoaded', this.code)) {
|
|
1711
|
-
const gridData = gridParams.options.gridDataLoaded.call(this, {
|
|
1712
|
-
gridData: initSubTableData,
|
|
1713
|
-
columns: gridParams.columns,
|
|
1714
|
-
additionalParamMap: gridParams.additionalParamMap,
|
|
1715
|
-
pageContext: this.pageContext,
|
|
1716
|
-
configureObj: this.configureObj
|
|
1717
|
-
})
|
|
1718
|
-
if (gridData) {
|
|
1719
|
-
subTableData = gridData
|
|
1720
|
-
this.hasLoadData = true
|
|
1721
|
-
} else {
|
|
1722
|
-
subTableData = initSubTableData
|
|
1723
|
-
this.hasLoadData = true
|
|
1724
|
-
}
|
|
1725
|
-
} else {
|
|
1726
|
-
subTableData = initSubTableData
|
|
1727
|
-
this.hasLoadData = true
|
|
1728
|
-
}
|
|
1729
|
-
if (subTableData) {
|
|
1730
|
-
// 子表时所有记录的所有字段设置默认值null,优化子表编辑时性能
|
|
1731
|
-
subTableData.forEach((item) => {
|
|
1732
|
-
this.setColumnsDefaultValue(gridParams.allColumns, item)
|
|
1733
|
-
})
|
|
1734
|
-
}
|
|
1735
|
-
if (this.pagination && this.isSubTableShowPage === true) {
|
|
1736
|
-
// 表示子表需要显示分页
|
|
1737
|
-
this.subTableData = subTableData
|
|
1738
|
-
// 更新记录总条数
|
|
1739
|
-
this.pagination.total = this.subTableData.length
|
|
1740
|
-
gridParams.subTableData = this.subTableData
|
|
1741
|
-
this.gridData = this.getSubTableGridData(this.subTableData)
|
|
1742
|
-
} else {
|
|
1743
|
-
this.subTableAddGuId(subTableData)
|
|
1744
|
-
this.gridData = subTableData
|
|
1745
|
-
}
|
|
1746
|
-
gridParams.gridData = this.gridData
|
|
1747
|
-
// 完成深拷贝,复制一份对象,行编辑时使用
|
|
1748
|
-
gridParams.orgGridData = [].concat(JSON.parse(JSON.stringify(this.gridData)))
|
|
1749
|
-
},
|
|
1750
|
-
canRefreshTableData(gridParams) {
|
|
1751
|
-
let isCanRefreshTableData = false
|
|
1752
|
-
if (gridParams.options && !gridParams.options.isFormSubTable) {
|
|
1753
|
-
// 如果不是子表时
|
|
1754
|
-
isCanRefreshTableData = true
|
|
1755
|
-
} else if (
|
|
1756
|
-
gridParams.options &&
|
|
1757
|
-
gridParams.options.isFormSubTable &&
|
|
1758
|
-
gridParams.options.canRrefreshSubtableData !== undefined &&
|
|
1759
|
-
gridParams.options.canRrefreshSubtableData === true
|
|
1760
|
-
) {
|
|
1761
|
-
// 是子表,且配置了子表无记录时更新子表记录集合
|
|
1762
|
-
isCanRefreshTableData = true
|
|
1763
|
-
}
|
|
1764
|
-
return isCanRefreshTableData
|
|
1765
|
-
},
|
|
1766
|
-
getSubTableGridData(subTableData, currentPage) {
|
|
1767
|
-
let gridData = subTableData
|
|
1768
|
-
if (this.isSubTableShowPage === true) {
|
|
1769
|
-
if (subTableData && subTableData.length > 0) {
|
|
1770
|
-
// const subTableData = JSON.parse(JSON.stringify(this.subTableData))
|
|
1771
|
-
this.pagination.total = subTableData.length
|
|
1772
|
-
// 当前是第几页
|
|
1773
|
-
let newCurrentPage = currentPage !== undefined && currentPage !== null ? currentPage : this.currentPage
|
|
1774
|
-
if (newCurrentPage === undefined || newCurrentPage === null) {
|
|
1775
|
-
newCurrentPage = 1
|
|
1776
|
-
}
|
|
1777
|
-
// 每页显示多少条记录
|
|
1778
|
-
let pageSize = this.pageSize
|
|
1779
|
-
if (pageSize === null && this.pagination) {
|
|
1780
|
-
pageSize = this.pagination.pageSize
|
|
1781
|
-
}
|
|
1782
|
-
if (pageSize === undefined || pageSize === null) {
|
|
1783
|
-
pageSize = 20
|
|
1784
|
-
}
|
|
1785
|
-
// 当前页的第一条记录的数组下标
|
|
1786
|
-
const startRowIndex = (newCurrentPage - 1) * pageSize
|
|
1787
|
-
// 当前页的最后一条记录的数组下标
|
|
1788
|
-
let lastRowIndex = startRowIndex + pageSize
|
|
1789
|
-
if (subTableData.length > startRowIndex) {
|
|
1790
|
-
// 表示当前页有记录
|
|
1791
|
-
if (lastRowIndex > subTableData.length) {
|
|
1792
|
-
// 表示最后一条记录超过下标了
|
|
1793
|
-
lastRowIndex = subTableData.length
|
|
1794
|
-
}
|
|
1795
|
-
// 前包,后不包
|
|
1796
|
-
gridData = subTableData.slice(startRowIndex, lastRowIndex)
|
|
1797
|
-
}
|
|
1798
|
-
}
|
|
1799
|
-
}
|
|
1800
|
-
if (gridData === undefined || gridData === null) {
|
|
1801
|
-
gridData = []
|
|
1802
|
-
}
|
|
1803
|
-
this.subTableAddGuId(gridData)
|
|
1804
|
-
return gridData
|
|
1805
|
-
},
|
|
1806
|
-
subTableAddGuId(data) {
|
|
1807
|
-
data.forEach((item) => {
|
|
1808
|
-
if (!item.$rowDataGuId) {
|
|
1809
|
-
item.$rowDataGuId = getGuId()
|
|
1810
|
-
}
|
|
1811
|
-
})
|
|
1812
|
-
},
|
|
1813
|
-
fetchListData(searchParam, isSearch, parentRowIds, resove) {
|
|
1814
|
-
this.isLoading = true
|
|
1815
|
-
this.hasLoadData = false
|
|
1816
|
-
// console.log('fetchData--isSearch--', isSearch)
|
|
1817
|
-
if (isSearch === undefined || isSearch === false) {
|
|
1818
|
-
// 如果不是查询时才需要从缓存中获得结果
|
|
1819
|
-
// 如果是刷新当前列表,则需要获得缓存中的window.sessionStorage
|
|
1820
|
-
const isRefreshList = window.sessionStorage.getItem('refreshList-' + this.code)
|
|
1821
|
-
// console.log('fetchData--isRefreshList--', isRefreshList)
|
|
1822
|
-
if (isRefreshList !== undefined && isRefreshList === 'true') {
|
|
1823
|
-
const searchParamJson = window.sessionStorage.getItem('searchParam-' + this.code)
|
|
1824
|
-
// console.log('fetchData--searchParamJson--', searchParamJson)
|
|
1825
|
-
// console.log('fetchData--pagination--', this.pagination)
|
|
1826
|
-
if (searchParamJson !== undefined && searchParamJson !== null && searchParamJson !== '') {
|
|
1827
|
-
searchParam = JSON.parse(searchParamJson)
|
|
1828
|
-
const pagination = searchParam.pagination
|
|
1829
|
-
if (pagination) {
|
|
1830
|
-
this.currentPage = pagination.currentPage
|
|
1831
|
-
this.pagination.pageSize = pagination.pageSize
|
|
1832
|
-
this.pagination.showTotal = pagination.showTotal
|
|
1833
|
-
}
|
|
1834
|
-
this.getInitSearchForm(searchParam.searchForm)
|
|
1835
|
-
// this.searchFormContent = searchParam.searchForm
|
|
1836
|
-
}
|
|
1837
|
-
}
|
|
1838
|
-
}
|
|
1839
|
-
window.sessionStorage.removeItem('refreshList-' + this.code)
|
|
1840
|
-
if (searchParam === undefined) {
|
|
1841
|
-
searchParam = this.getSearchParam()
|
|
1842
|
-
}
|
|
1843
|
-
const gridParams = store.get(this.code)
|
|
1844
|
-
let param = searchParam
|
|
1845
|
-
|
|
1846
|
-
this.resetAdditionalParamMap(param, gridParams)
|
|
1847
|
-
if (gridParams.options.extraParam || parentRowIds !== undefined) {
|
|
1848
|
-
param = getExtraParam(searchParam, gridParams)
|
|
1849
|
-
}
|
|
1850
|
-
// 导出需要这两个参数
|
|
1851
|
-
gridParams.searchParam = searchParam
|
|
1852
|
-
gridParams.url = this.url
|
|
1853
|
-
let requestUrl = this.url
|
|
1854
|
-
if (parentRowIds !== undefined && parentRowIds !== null) {
|
|
1855
|
-
// 表示是查询子集合时
|
|
1856
|
-
param = Object.assign({}, param)
|
|
1857
|
-
// 清空查询子集合时,分页信息,即不需要分页查询子集合
|
|
1858
|
-
param.searchParam.pagination = null
|
|
1859
|
-
// 父节点id传给后台
|
|
1860
|
-
param['parentIds'] = parentRowIds
|
|
1861
|
-
// 父级字段名,例如:parentId 或 fk_parent_id
|
|
1862
|
-
param['parentProp'] = this.parentProp
|
|
1863
|
-
// 传入系统code
|
|
1864
|
-
param.systemCode = this.basicInfo.systemCode
|
|
1865
|
-
|
|
1866
|
-
requestUrl = this.options.subRowUrl
|
|
1867
|
-
}
|
|
1868
|
-
// 解决新建后,查询,再点新建报“有未保存的行”问题,解决方案是一旦刷新列表,就还原这些状态
|
|
1869
|
-
gridParams.isCreateRow = false
|
|
1870
|
-
gridParams.isEditRow = false
|
|
1871
|
-
gridParams.$lastSaveRowIndex = null
|
|
1872
|
-
gridParams.$rowIndex = null
|
|
1873
|
-
gridParams.canSaveRow = true
|
|
1874
|
-
// 是否根据权限显示数据
|
|
1875
|
-
gridParams.withDataPermission = gridParams.options.isWithDataPermission
|
|
1876
|
-
// 对象是否是流程实体
|
|
1877
|
-
gridParams.isWorkflowEntity = gridParams.options.isWorkflowEntity
|
|
1878
|
-
// 缓存查询条件及当前页数
|
|
1879
|
-
window.sessionStorage.setItem('searchParam-' + this.code, JSON.stringify(param))
|
|
1880
|
-
if (this.parentProp && searchParam.searchForm && searchParam.searchForm.length > 0) {
|
|
1881
|
-
// 表示是树形列表的查询时,查询结果不需要树形显示,后台处理的数据没有加has_children来实现的
|
|
1882
|
-
param.listViewTreeSetting = null
|
|
1883
|
-
}
|
|
1884
|
-
let canFetchData = true
|
|
1885
|
-
if (isHasOptionFunction('beforeRequest', this.code)) {
|
|
1886
|
-
canFetchData = gridParams.options.beforeRequest.call(this, {
|
|
1887
|
-
columns: this.columns,
|
|
1888
|
-
gridParams,
|
|
1889
|
-
additionalParamMap: gridParams.additionalParamMap,
|
|
1890
|
-
requestParam: param,
|
|
1891
|
-
pageContext: this.pageContext,
|
|
1892
|
-
configureObj: this.configureObj
|
|
1893
|
-
})
|
|
1894
|
-
}
|
|
1895
|
-
// console.log('fetchData--canFetchData--', canFetchData, 'requestUrl=', requestUrl)
|
|
1896
|
-
return new Promise((resolve, reject) => {
|
|
1897
|
-
if (isPromise(canFetchData)) {
|
|
1898
|
-
canFetchData
|
|
1899
|
-
.then((result) => {
|
|
1900
|
-
if (result === undefined || result) {
|
|
1901
|
-
if (!requestUrl) {
|
|
1902
|
-
gridParams.loaded = true
|
|
1903
|
-
resolve()
|
|
1904
|
-
} else {
|
|
1905
|
-
this.doRequest(requestUrl, param, parentRowIds, gridParams, resove)
|
|
1906
|
-
.then(() => {
|
|
1907
|
-
resolve()
|
|
1908
|
-
})
|
|
1909
|
-
.catch((error) => {
|
|
1910
|
-
reject(error)
|
|
1911
|
-
})
|
|
1912
|
-
}
|
|
1913
|
-
} else {
|
|
1914
|
-
console.error('beforeRequest result is false!!')
|
|
1915
|
-
gridParams.loaded = true
|
|
1916
|
-
resolve()
|
|
1917
|
-
}
|
|
1918
|
-
})
|
|
1919
|
-
.catch((error) => {
|
|
1920
|
-
gridParams.loaded = true
|
|
1921
|
-
reject(error)
|
|
1922
|
-
})
|
|
1923
|
-
} else {
|
|
1924
|
-
if (canFetchData === undefined || canFetchData === true) {
|
|
1925
|
-
if (!requestUrl) {
|
|
1926
|
-
gridParams.loaded = true
|
|
1927
|
-
resolve()
|
|
1928
|
-
} else {
|
|
1929
|
-
this.doRequest(requestUrl, param, parentRowIds, gridParams, resove)
|
|
1930
|
-
.then(() => {
|
|
1931
|
-
gridParams.loaded = true
|
|
1932
|
-
resolve()
|
|
1933
|
-
})
|
|
1934
|
-
.catch((error) => {
|
|
1935
|
-
gridParams.loaded = true
|
|
1936
|
-
reject(error)
|
|
1937
|
-
})
|
|
1938
|
-
}
|
|
1939
|
-
} else {
|
|
1940
|
-
console.error('beforeRequest result is false!!')
|
|
1941
|
-
gridParams.loaded = true
|
|
1942
|
-
resolve()
|
|
1943
|
-
}
|
|
1944
|
-
}
|
|
1945
|
-
})
|
|
1946
|
-
},
|
|
1947
|
-
doRequest(requestUrl, param, parentRowIds, gridParams, resove) {
|
|
1948
|
-
return new Promise((resolve, reject) => {
|
|
1949
|
-
this.$http
|
|
1950
|
-
.post(requestUrl, param)
|
|
1951
|
-
.then((data) => {
|
|
1952
|
-
if (typeof parentRowIds === 'undefined' || parentRowIds === null) {
|
|
1953
|
-
// 当开启卡片的时候,则开启滚动分页
|
|
1954
|
-
const getChildren = (data) => {
|
|
1955
|
-
return (
|
|
1956
|
-
data?.map((item) => {
|
|
1957
|
-
return {
|
|
1958
|
-
$rowDataGuId: getGuId(),
|
|
1959
|
-
...item,
|
|
1960
|
-
...(item?.children?.length
|
|
1961
|
-
? {
|
|
1962
|
-
children: getChildren(item.children)
|
|
1963
|
-
}
|
|
1964
|
-
: {})
|
|
1965
|
-
}
|
|
1966
|
-
}) ?? []
|
|
1967
|
-
)
|
|
1968
|
-
}
|
|
1969
|
-
const dataList = [
|
|
1970
|
-
...(this.isShowCard && this.currentPage > 1 ? this.gridData : []),
|
|
1971
|
-
...getChildren(data?.data ?? [])
|
|
1972
|
-
]
|
|
1973
|
-
let tableData = []
|
|
1974
|
-
// 对数据做序列化,比如:处理xss攻击
|
|
1975
|
-
if (isHasOptionFunction('gridDataLoaded', this.code)) {
|
|
1976
|
-
const gridDataLoadedParam = {
|
|
1977
|
-
gridData: dataList,
|
|
1978
|
-
columns: gridParams.columns,
|
|
1979
|
-
additionalParamMap: gridParams.additionalParamMap,
|
|
1980
|
-
pageContext: this.pageContext,
|
|
1981
|
-
configureObj: this.configureObj
|
|
1982
|
-
}
|
|
1983
|
-
if (gridParams.searchParam) {
|
|
1984
|
-
gridDataLoadedParam.searchForm = gridParams.searchParam.searchForm
|
|
1985
|
-
gridDataLoadedParam.additionalParamMap = gridParams.searchParam.additionalParamMap
|
|
1986
|
-
}
|
|
1987
|
-
const gridData = gridParams.options.gridDataLoaded.call(this, gridDataLoadedParam)
|
|
1988
|
-
if (gridData) {
|
|
1989
|
-
tableData = gridData
|
|
1990
|
-
} else {
|
|
1991
|
-
tableData = dataList
|
|
1992
|
-
}
|
|
1993
|
-
} else {
|
|
1994
|
-
tableData = dataList
|
|
1995
|
-
}
|
|
1996
|
-
if (!tableData) {
|
|
1997
|
-
tableData = []
|
|
1998
|
-
}
|
|
1999
|
-
if (gridParams.options.isFormSubTable) {
|
|
2000
|
-
// 子表时默认不全部行编辑
|
|
2001
|
-
if (tableData) {
|
|
2002
|
-
// 子表时所有记录的所有字段设置默认值null,优化子表编辑时性能
|
|
2003
|
-
tableData.forEach((item) => {
|
|
2004
|
-
this.setColumnsDefaultValue(gridParams.allColumns, item)
|
|
2005
|
-
})
|
|
2006
|
-
}
|
|
2007
|
-
// console.log('子表数据循环', this.gridData)
|
|
2008
|
-
// this.gridData.forEach(item => {
|
|
2009
|
-
// item.$editing = true
|
|
2010
|
-
// })
|
|
2011
|
-
if (this.pagination && this.isSubTableShowPage === true) {
|
|
2012
|
-
// 表示子表需要显示分页
|
|
2013
|
-
this.subTableData = tableData
|
|
2014
|
-
this.gridData = this.getSubTableGridData(this.subTableData)
|
|
2015
|
-
gridParams.subTableData = this.subTableData
|
|
2016
|
-
} else {
|
|
2017
|
-
this.gridData = tableData
|
|
2018
|
-
}
|
|
2019
|
-
if (this.pagination) {
|
|
2020
|
-
this.pagination.total = tableData.length
|
|
2021
|
-
}
|
|
2022
|
-
} else {
|
|
2023
|
-
this.gridData = tableData
|
|
2024
|
-
|
|
2025
|
-
if (this.pagination) {
|
|
2026
|
-
this.pagination.total = data.total
|
|
2027
|
-
}
|
|
2028
|
-
}
|
|
2029
|
-
if (data.summaries && Object.keys(data.summaries).length > 0) {
|
|
2030
|
-
this.summaries = data.summaries
|
|
2031
|
-
}
|
|
2032
|
-
|
|
2033
|
-
gridParams.gridData = this.gridData
|
|
2034
|
-
|
|
2035
|
-
// 完成深拷贝,复制一份对象,行编辑时使用
|
|
2036
|
-
gridParams.orgGridData = [].concat(JSON.parse(JSON.stringify(this.gridData)))
|
|
2037
|
-
|
|
2038
|
-
gridParams.pagination = this.pagination
|
|
2039
|
-
gridParams.loaded = true
|
|
2040
|
-
|
|
2041
|
-
// TODO: 输入焦点默认停在第一个可编辑的单元格
|
|
2042
|
-
if (this.lineEdit && this.lineEdit.editable) {
|
|
2043
|
-
if (typeof isSearch === 'undefined' || isSearch === false) {
|
|
2044
|
-
// 不是查询时,才需要创建第一行记录
|
|
2045
|
-
if (this.gridData.length === 0) {
|
|
2046
|
-
if (
|
|
2047
|
-
this.options &&
|
|
2048
|
-
this.options.isDefaultShowEdit !== null &&
|
|
2049
|
-
this.options.isDefaultShowEdit !== undefined &&
|
|
2050
|
-
this.options.isDefaultShowEdit === true
|
|
2051
|
-
) {
|
|
2052
|
-
this.createRow(this.code, null, this.gridData)
|
|
2053
|
-
}
|
|
2054
|
-
}
|
|
2055
|
-
if (this.gridData.length > 0) {
|
|
2056
|
-
this.lineEdit['editingCell'] = {
|
|
2057
|
-
row: 0,
|
|
2058
|
-
prop: getFirstEditableColumn(this.code)
|
|
2059
|
-
}
|
|
2060
|
-
}
|
|
2061
|
-
}
|
|
2062
|
-
}
|
|
2063
|
-
this.hasLoadData = true
|
|
2064
|
-
} else {
|
|
2065
|
-
// 对数据做序列化,比如:处理xss攻击
|
|
2066
|
-
gridParams.loaded = true
|
|
2067
|
-
if (isHasOptionFunction('gridDataLoaded', this.code)) {
|
|
2068
|
-
gridParams.options.gridDataLoaded.call(this, {
|
|
2069
|
-
gridData: data,
|
|
2070
|
-
additionalParamMap: gridParams.additionalParamMap,
|
|
2071
|
-
pageContext: this.pageContext,
|
|
2072
|
-
configureObj: this.configureObj
|
|
2073
|
-
})
|
|
2074
|
-
}
|
|
2075
|
-
|
|
2076
|
-
if (isHasOptionFunction('loadChildrenComplete', this.code)) {
|
|
2077
|
-
gridParams.options.loadChildrenComplete.call(this, {
|
|
2078
|
-
parentRowIds: parentRowIds,
|
|
2079
|
-
gridData: data,
|
|
2080
|
-
columns: gridParams.columns,
|
|
2081
|
-
additionalParamMap: gridParams.additionalParamMap,
|
|
2082
|
-
pageContext: this.pageContext,
|
|
2083
|
-
configureObj: this.configureObj
|
|
2084
|
-
})
|
|
2085
|
-
}
|
|
2086
|
-
if (typeof resove !== 'undefined' && resove !== null) {
|
|
2087
|
-
// 首次加载或点击三角展开父节点时走该分支
|
|
2088
|
-
// 刷新数据后,移除该父节点下的所有已选中的子节点记录。
|
|
2089
|
-
// 必须调用该方法,否则在删除记录时,数据即使刷新了,已选中集合this.$refs.superGrid?.store.states.selection中仍会有该已删除记录,导致再次执行删除报id不存在
|
|
2090
|
-
this.removeGridStoreSelection(parentRowIds)
|
|
2091
|
-
resove(data[parentRowIds[0]])
|
|
2092
|
-
} else {
|
|
2093
|
-
// 刷新父记录对应的子记录集合时需要,例如:删除时
|
|
2094
|
-
parentRowIds.forEach((parentRowId) => {
|
|
2095
|
-
// 单行父记录id
|
|
2096
|
-
if (this.$refs.superGrid) {
|
|
2097
|
-
this.$refs.superGrid.store.states.lazyTreeNodeMap[parentRowId] = data[parentRowId]
|
|
2098
|
-
this.$refs.superGrid.store.states.treeData[parentRowId].children = data[parentRowId]
|
|
2099
|
-
}
|
|
2100
|
-
})
|
|
2101
|
-
// 刷新数据后,移除该父节点下的所有已选中的子节点记录
|
|
2102
|
-
// 必须调用该方法,否则在删除记录时,数据即使刷新了,已选中集合this.$refs.superGrid?.store.states.selection中仍会有该已删除记录,导致再次执行删除报id不存在
|
|
2103
|
-
this.removeGridStoreSelection(parentRowIds)
|
|
2104
|
-
}
|
|
2105
|
-
this.hasLoadData = true
|
|
2106
|
-
}
|
|
2107
|
-
resolve()
|
|
2108
|
-
})
|
|
2109
|
-
.catch((error) => {
|
|
2110
|
-
if (isHasOptionFunction('loadError', this.code)) {
|
|
2111
|
-
gridParams.options.loadError.call(this, this.code, error)
|
|
2112
|
-
}
|
|
2113
|
-
reject(error)
|
|
2114
|
-
})
|
|
2115
|
-
})
|
|
2116
|
-
},
|
|
2117
|
-
// 获得初始查询条件对象
|
|
2118
|
-
getInitSearchForm(searchFormArr) {
|
|
2119
|
-
const gridParams = store.get(this.code)
|
|
2120
|
-
if (searchFormArr && searchFormArr.length > 0) {
|
|
2121
|
-
this.searchFormContent = {}
|
|
2122
|
-
searchFormArr.forEach((item) => {
|
|
2123
|
-
// 获得的是"isDeleted"
|
|
2124
|
-
let prop = item.propName
|
|
2125
|
-
// 获得的是“deleted”
|
|
2126
|
-
const columnProp = item.columnProp
|
|
2127
|
-
const dataType = item.dataType
|
|
2128
|
-
if (dataType && dataType === 'BOOLEAN') {
|
|
2129
|
-
prop = columnProp
|
|
2130
|
-
}
|
|
2131
|
-
this.initSearchProps.push(prop)
|
|
2132
|
-
const propValue = item.propValue
|
|
2133
|
-
if (prop && prop.indexOf('.') > 0) {
|
|
2134
|
-
// 动态给searchForm添加属性,包括多级嵌套属性,属性的初始值都为 null
|
|
2135
|
-
addDynamicProp(this.searchFormContent, prop, propValue)
|
|
2136
|
-
} else {
|
|
2137
|
-
this.searchFormContent[prop] = propValue
|
|
2138
|
-
}
|
|
2139
|
-
})
|
|
2140
|
-
gridParams.searchForm = searchFormArr
|
|
2141
|
-
// 调用查询api方法,该方法中调用了@showSearch方法,用于控制“查询”按钮改名为“取消查询”
|
|
2142
|
-
this.showSearchForm()
|
|
2143
|
-
} else {
|
|
2144
|
-
gridParams.searchForm = null
|
|
2145
|
-
}
|
|
2146
|
-
},
|
|
2147
|
-
showDemo() {
|
|
2148
|
-
this.isLoading = true
|
|
2149
|
-
this.$http
|
|
2150
|
-
.get(this.url)
|
|
2151
|
-
.then((data) => {
|
|
2152
|
-
// 根据this.options.showColumns设置显示的字段
|
|
2153
|
-
this.getShowColumns(data)
|
|
2154
|
-
|
|
2155
|
-
Object.assign(this, data)
|
|
2156
|
-
const gridParams = store.get(this.code)
|
|
2157
|
-
gridParams.listCode = this.code
|
|
2158
|
-
|
|
2159
|
-
gridParams.columns = this.columns
|
|
2160
|
-
if (gridParams.columns && this.options.dynamicColumns) {
|
|
2161
|
-
for (var i = 0; i < this.options.dynamicColumns.length; i++) {
|
|
2162
|
-
this.options.dynamicColumns[i].dynamic = true
|
|
2163
|
-
gridParams.columns.push(this.options.dynamicColumns[i])
|
|
2164
|
-
}
|
|
2165
|
-
}
|
|
2166
|
-
gridParams.lineEdit = this.lineEdit
|
|
2167
|
-
gridParams.basicInfo = this.basicInfo
|
|
2168
|
-
gridParams.pagination = this.pagination
|
|
2169
|
-
gridParams.query = this.query
|
|
2170
|
-
|
|
2171
|
-
this.gridData = data.gridData
|
|
2172
|
-
// 对数据做序列化,比如:处理xss攻击
|
|
2173
|
-
if (isHasOptionFunction('gridDataLoaded', this.code)) {
|
|
2174
|
-
const gridData = gridParams.options.gridDataLoaded.call(this, {
|
|
2175
|
-
gridData: data.gridData,
|
|
2176
|
-
additionalParamMap: gridParams.additionalParamMap,
|
|
2177
|
-
pageContext: this.pageContext,
|
|
2178
|
-
configureObj: this.configureObj
|
|
2179
|
-
})
|
|
2180
|
-
if (gridData) {
|
|
2181
|
-
this.gridData = gridData
|
|
2182
|
-
} else {
|
|
2183
|
-
this.gridData = data.gridData
|
|
2184
|
-
}
|
|
2185
|
-
} else {
|
|
2186
|
-
this.gridData = data.gridData
|
|
2187
|
-
}
|
|
2188
|
-
|
|
2189
|
-
if (this.pagination) {
|
|
2190
|
-
this.pagination.total = data.total
|
|
2191
|
-
}
|
|
2192
|
-
if (!this.gridData) {
|
|
2193
|
-
this.gridData = []
|
|
2194
|
-
}
|
|
2195
|
-
gridParams.gridData = this.gridData
|
|
2196
|
-
// 完成深拷贝,复制一份对象,行编辑时使用
|
|
2197
|
-
gridParams.orgGridData = [].concat(JSON.parse(JSON.stringify(this.gridData)))
|
|
2198
|
-
gridParams.pagination = this.pagination
|
|
2199
|
-
|
|
2200
|
-
// TODO: 输入焦点默认停在第一个可编辑的单元格
|
|
2201
|
-
if (this.lineEdit.editable) {
|
|
2202
|
-
if (this.gridData.length === 0) {
|
|
2203
|
-
this.createRow(this.code, null, this.gridData)
|
|
2204
|
-
}
|
|
2205
|
-
this.lineEdit['editingCell'] = {
|
|
2206
|
-
row: 0,
|
|
2207
|
-
prop: getFirstEditableColumn(this.code)
|
|
2208
|
-
}
|
|
2209
|
-
}
|
|
2210
|
-
if (isHasOptionFunction('gridComplete', this.code)) {
|
|
2211
|
-
gridParams.options.gridComplete.call(
|
|
2212
|
-
this,
|
|
2213
|
-
this.gridData,
|
|
2214
|
-
gridParams.columns,
|
|
2215
|
-
this.pageContext,
|
|
2216
|
-
this.configureObj
|
|
2217
|
-
)
|
|
2218
|
-
}
|
|
2219
|
-
})
|
|
2220
|
-
.catch((error) => {
|
|
2221
|
-
if (isHasOptionFunction('loadError', this.code)) {
|
|
2222
|
-
const gridParams = store.get(this.code)
|
|
2223
|
-
gridParams.options.loadError.call(this, this.code, error)
|
|
2224
|
-
}
|
|
2225
|
-
})
|
|
2226
|
-
},
|
|
2227
|
-
doSearch(searchForm) {
|
|
2228
|
-
// 修改当前页为第1页
|
|
2229
|
-
this.currentPage = 1
|
|
2230
|
-
// 将toolbar 参数和查询表单参数合并
|
|
2231
|
-
if (searchForm && searchForm.length > 0) {
|
|
2232
|
-
if (this.toolbarFieldParam && this.toolbarFieldParam.length > 0) {
|
|
2233
|
-
if (searchForm.length === 1) {
|
|
2234
|
-
searchForm[0].leftBracket = '('
|
|
2235
|
-
searchForm[0].rightBracket = ')'
|
|
2236
|
-
}
|
|
2237
|
-
if (searchForm[searchForm.length - 1].joinSign === 'or') {
|
|
2238
|
-
searchForm[searchForm.length - 1].joinSign = 'and'
|
|
2239
|
-
}
|
|
2240
|
-
// 拼接
|
|
2241
|
-
// param.concat(toolbarFieldParam)
|
|
2242
|
-
Array.prototype.push.apply(searchForm, this.toolbarFieldParam)
|
|
2243
|
-
}
|
|
2244
|
-
} else {
|
|
2245
|
-
if (this.toolbarFieldParam && this.toolbarFieldParam.length > 0) {
|
|
2246
|
-
searchForm = this.toolbarFieldParam
|
|
2247
|
-
}
|
|
2248
|
-
}
|
|
2249
|
-
this.search(searchForm, true)
|
|
2250
|
-
},
|
|
2251
|
-
doSearchDialog(searchForm) {
|
|
2252
|
-
// 修改当前页为第1页
|
|
2253
|
-
this.currentPage = 1
|
|
2254
|
-
this.search(searchForm, true)
|
|
2255
|
-
this.closeSearchFormDialog()
|
|
2256
|
-
},
|
|
2257
|
-
// cs123
|
|
2258
|
-
search(searchForm, isSearch, parentRowIds) {
|
|
2259
|
-
// 重新查询列表数据时,抛出refresh事件,供父组件捕获做自己的业务处理
|
|
2260
|
-
$emit(this, 'refresh')
|
|
2261
|
-
const vm = this
|
|
2262
|
-
return new Promise((resolve, reject) => {
|
|
2263
|
-
const gridParams = store.get(vm.code)
|
|
2264
|
-
if (typeof searchForm !== 'undefined' && searchForm !== null) {
|
|
2265
|
-
gridParams.searchForm = searchForm
|
|
2266
|
-
} else {
|
|
2267
|
-
gridParams.searchForm = null
|
|
2268
|
-
}
|
|
2269
|
-
if (gridParams.options && gridParams.options.isAdministerListView) {
|
|
2270
|
-
// 根据类型生成静态数据
|
|
2271
|
-
if (gridParams.options.SuperGrid && gridParams.options.SuperGrid.simulationDate) {
|
|
2272
|
-
let gridData
|
|
2273
|
-
if (isHasOptionFunction('gridDataLoaded', vm.code)) {
|
|
2274
|
-
gridData = gridParams.options.gridDataLoaded.call(this, {
|
|
2275
|
-
gridData: gridParams.options.SuperGrid.simulationDate,
|
|
2276
|
-
columns: gridParams.columns,
|
|
2277
|
-
additionalParamMap: gridParams.additionalParamMap,
|
|
2278
|
-
pageContext: this.pageContext,
|
|
2279
|
-
configureObj: this.configureObj
|
|
2280
|
-
})
|
|
2281
|
-
if (!gridData) {
|
|
2282
|
-
gridData = gridParams.options.SuperGrid.simulationDate
|
|
2283
|
-
}
|
|
2284
|
-
} else {
|
|
2285
|
-
gridData = gridParams.options.SuperGrid.simulationDate
|
|
2286
|
-
}
|
|
2287
|
-
resolve(gridData)
|
|
2288
|
-
}
|
|
2289
|
-
} else if (
|
|
2290
|
-
gridParams.options &&
|
|
2291
|
-
gridParams.options.isFormSubTable &&
|
|
2292
|
-
gridParams.options.subTableData &&
|
|
2293
|
-
gridParams.options.subTableData.length > 0
|
|
2294
|
-
) {
|
|
2295
|
-
let gridData
|
|
2296
|
-
vm.hasLoadData = false
|
|
2297
|
-
gridParams.loaded = true
|
|
2298
|
-
// 如果有子表数据,则展示传递的子表数据
|
|
2299
|
-
if (isHasOptionFunction('gridDataLoaded', vm.code)) {
|
|
2300
|
-
gridData = gridParams.options.gridDataLoaded.call(this, {
|
|
2301
|
-
gridData: gridParams.options.subTableData,
|
|
2302
|
-
columns: gridParams.columns,
|
|
2303
|
-
additionalParamMap: gridParams.additionalParamMap,
|
|
2304
|
-
pageContext: this.pageContext,
|
|
2305
|
-
configureObj: this.configureObj
|
|
2306
|
-
})
|
|
2307
|
-
if (!gridData) {
|
|
2308
|
-
gridData = gridParams.options.subTableData
|
|
2309
|
-
vm.hasLoadData = true
|
|
2310
|
-
}
|
|
2311
|
-
} else {
|
|
2312
|
-
gridData = gridParams.options.subTableData
|
|
2313
|
-
vm.hasLoadData = true
|
|
2314
|
-
}
|
|
2315
|
-
resolve(gridData)
|
|
2316
|
-
} else {
|
|
2317
|
-
vm.fetchData(vm.getSearchParam(), isSearch, parentRowIds)
|
|
2318
|
-
.then((data) => {
|
|
2319
|
-
// console.log('打印1====', gridParams)
|
|
2320
|
-
if (
|
|
2321
|
-
gridParams !== undefined &&
|
|
2322
|
-
gridParams.options !== undefined &&
|
|
2323
|
-
gridParams.options.isHiddenSearchForm !== undefined &&
|
|
2324
|
-
gridParams.options.isHiddenSearchForm === true
|
|
2325
|
-
) {
|
|
2326
|
-
// 查询时,是否隐藏查询区域,默认是不隐藏查询区域
|
|
2327
|
-
// console.log('打印2====', vm)
|
|
2328
|
-
vm.showSearch = false
|
|
2329
|
-
$emit(vm, 'cancel-search')
|
|
2330
|
-
}
|
|
2331
|
-
// console.log('打印3====', vm)
|
|
2332
|
-
// console.log('打印4====', vm.$refs)
|
|
2333
|
-
if (vm.$refs && vm.$refs.sf) {
|
|
2334
|
-
// console.log('打印5====', vm.$refs.sf)
|
|
2335
|
-
vm.$refs.sf.loading = false
|
|
2336
|
-
vm.$refs.sf.searchComplete()
|
|
2337
|
-
}
|
|
2338
|
-
// console.log('打印6====', vm)
|
|
2339
|
-
// 重新计算列表高度
|
|
2340
|
-
this.resizeTableHeight()
|
|
2341
|
-
resolve(data)
|
|
2342
|
-
})
|
|
2343
|
-
.catch((error) => {
|
|
2344
|
-
if (vm.$refs.sf) {
|
|
2345
|
-
vm.$refs.sf.loading = false
|
|
2346
|
-
vm.$refs.sf.searchComplete()
|
|
2347
|
-
}
|
|
2348
|
-
reject(error)
|
|
2349
|
-
})
|
|
2350
|
-
}
|
|
2351
|
-
})
|
|
2352
|
-
},
|
|
2353
|
-
// addSearchParam(searchData) {
|
|
2354
|
-
// if (searchData && searchData.length > 0) {
|
|
2355
|
-
// const gridParams = store.get(this.code)
|
|
2356
|
-
// if (typeof (gridParams.searchForm) !== 'undefined') {
|
|
2357
|
-
// const searchForm = gridParams.searchForm
|
|
2358
|
-
// searchForm.concat()
|
|
2359
|
-
// searchParam.searchForm = gridParams.searchForm
|
|
2360
|
-
// } else {
|
|
2361
|
-
// searchParam.searchForm = []
|
|
2362
|
-
// }
|
|
2363
|
-
// }
|
|
2364
|
-
// },
|
|
2365
|
-
getPaginationInfo() {
|
|
2366
|
-
const gridParams = store.get(this.code)
|
|
2367
|
-
if (this.pagination) {
|
|
2368
|
-
// 判断是否删除后请求数据
|
|
2369
|
-
if (this.isDelete && this.currentPage > 1) {
|
|
2370
|
-
const pageNum = Math.ceil((this.pagination.total - this.gridData.length) / this.pagination.pageSize)
|
|
2371
|
-
this.currentPage = this.currentPage > pageNum ? pageNum : this.currentPage
|
|
2372
|
-
this.isDelete = false
|
|
2373
|
-
}
|
|
2374
|
-
const pagination = {
|
|
2375
|
-
currentPage: this.currentPage,
|
|
2376
|
-
pageSize: this.pagination.pageSize,
|
|
2377
|
-
showTotal: this.pagination.showTotal
|
|
2378
|
-
}
|
|
2379
|
-
if (this.pageSize !== null) {
|
|
2380
|
-
// 表示更改了每页显示的数据条数
|
|
2381
|
-
pagination.pageSize = this.pageSize
|
|
2382
|
-
}
|
|
2383
|
-
if (typeof gridParams.currentPage !== 'undefined' && gridParams.currentPage !== null) {
|
|
2384
|
-
// 保持页数时使用
|
|
2385
|
-
pagination.currentPage = gridParams.currentPage
|
|
2386
|
-
// 必须清空一下,否则会导致翻页有问题
|
|
2387
|
-
gridParams.currentPage = null
|
|
2388
|
-
}
|
|
2389
|
-
return pagination
|
|
2390
|
-
} else {
|
|
2391
|
-
// TODO 临时解决列表工具栏有默认值时触发查询,查询没有分页问题,
|
|
2392
|
-
// 因为获取页面默认值后触发查询时候,列表的配置信息,比如分页是否编辑等元数据还没有查询过来
|
|
2393
|
-
return {
|
|
2394
|
-
currentPage: 1,
|
|
2395
|
-
pageSize: 20,
|
|
2396
|
-
showTotal: true
|
|
2397
|
-
}
|
|
2398
|
-
}
|
|
2399
|
-
},
|
|
2400
|
-
getSearchParam() {
|
|
2401
|
-
const searchParam = {
|
|
2402
|
-
code: this.code,
|
|
2403
|
-
tableName: this.tableName
|
|
2404
|
-
}
|
|
2405
|
-
const gridParams = store.get(this.code)
|
|
2406
|
-
const pagination = this.getPaginationInfo()
|
|
2407
|
-
if (pagination && pagination !== null) {
|
|
2408
|
-
searchParam.pagination = pagination
|
|
2409
|
-
}
|
|
2410
|
-
// 排序信息
|
|
2411
|
-
if (this.sortInfo !== null) {
|
|
2412
|
-
// 表示更改了排序信息
|
|
2413
|
-
searchParam.sorts = this.sortInfo
|
|
2414
|
-
}
|
|
2415
|
-
if (this.mergeFields && this.mergeFields.length > 0) {
|
|
2416
|
-
if (!searchParam.sorts) {
|
|
2417
|
-
searchParam.sorts = []
|
|
2418
|
-
}
|
|
2419
|
-
const mergeFieldsArr = []
|
|
2420
|
-
for (const mergeField of this.mergeFields) {
|
|
2421
|
-
let flag = true
|
|
2422
|
-
for (const so of searchParam.sorts) {
|
|
2423
|
-
if (so.prop === mergeField) {
|
|
2424
|
-
flag = false
|
|
2425
|
-
break
|
|
2426
|
-
}
|
|
2427
|
-
}
|
|
2428
|
-
if (flag) {
|
|
2429
|
-
mergeFieldsArr.push({
|
|
2430
|
-
prop: mergeField,
|
|
2431
|
-
order: 'ascending'
|
|
2432
|
-
})
|
|
2433
|
-
}
|
|
2434
|
-
}
|
|
2435
|
-
mergeFieldsArr.push(...searchParam.sorts)
|
|
2436
|
-
searchParam.sorts = mergeFieldsArr
|
|
2437
|
-
}
|
|
2438
|
-
// 是否有初始过滤条件
|
|
2439
|
-
if (gridParams.options && typeof gridParams.options.initSearchForm !== 'undefined') {
|
|
2440
|
-
searchParam.initSearchForm = gridParams.options.initSearchForm
|
|
2441
|
-
}
|
|
2442
|
-
if (
|
|
2443
|
-
gridParams.query &&
|
|
2444
|
-
typeof gridParams.query.defaultQueryCriteria !== 'undefined' &&
|
|
2445
|
-
gridParams.query.defaultQueryCriteria !== ''
|
|
2446
|
-
) {
|
|
2447
|
-
// json字符串转数组
|
|
2448
|
-
searchParam.defaultQueryCriteria = JSON.parse(gridParams.query.defaultQueryCriteria)
|
|
2449
|
-
}
|
|
2450
|
-
if (typeof gridParams.searchForm !== 'undefined') {
|
|
2451
|
-
searchParam.searchForm = gridParams.searchForm
|
|
2452
|
-
} else {
|
|
2453
|
-
searchParam.searchForm = []
|
|
2454
|
-
}
|
|
2455
|
-
if (this.dynamicColumnInfo) {
|
|
2456
|
-
searchParam.dynamicColumnInfo = this.dynamicColumnInfo
|
|
2457
|
-
}
|
|
2458
|
-
if (this.dynamicServiceName) {
|
|
2459
|
-
searchParam.dynamicServiceName = this.dynamicServiceName
|
|
2460
|
-
}
|
|
2461
|
-
const additionalParamMap = gridParams.additionalParamMap
|
|
2462
|
-
if (additionalParamMap) {
|
|
2463
|
-
if (additionalParamMap && typeof additionalParamMap === 'object') {
|
|
2464
|
-
searchParam.additionalParamMap = additionalParamMap
|
|
2465
|
-
} else if (additionalParamMap && additionalParamMap !== '') {
|
|
2466
|
-
searchParam.additionalParamMap = JSON.parse(additionalParamMap)
|
|
2467
|
-
}
|
|
2468
|
-
}
|
|
2469
|
-
return searchParam
|
|
2470
|
-
},
|
|
2471
|
-
getComponentType(column) {
|
|
2472
|
-
const prop = column.prop
|
|
2473
|
-
let type = 'NormalColumn'
|
|
2474
|
-
if (prop === '$index') {
|
|
2475
|
-
type = 'IndexColumn'
|
|
2476
|
-
} else if (prop === '$selection') {
|
|
2477
|
-
// 设置选中行时使用
|
|
2478
|
-
store.get(this.code).isMulitiSelect = true
|
|
2479
|
-
type = 'SelectionColumn'
|
|
2480
|
-
} else if (prop === undefined && column.children && column.children.length > 0) {
|
|
2481
|
-
type = 'GroupColumn'
|
|
2482
|
-
}
|
|
2483
|
-
return type
|
|
2484
|
-
},
|
|
2485
|
-
focusOnFirstEditableInput() {
|
|
2486
|
-
if (this.basicInfo.editable) {
|
|
2487
|
-
this.lineEdit.editingCell.row = 0
|
|
2488
|
-
this.lineEdit.editingCell.prop = getFirstEditableColumn(this.code)
|
|
2489
|
-
}
|
|
2490
|
-
},
|
|
2491
|
-
handleSizeChange(val) {
|
|
2492
|
-
if (!this.options || !this.options.isPageShow) {
|
|
2493
|
-
this.currentPage = 1
|
|
2494
|
-
this.pageSize = val
|
|
2495
|
-
this.pagination.pageSize = val
|
|
2496
|
-
this.changePage()
|
|
2497
|
-
}
|
|
2498
|
-
},
|
|
2499
|
-
handleCurrentChange(val) {
|
|
2500
|
-
if (!this.options || !this.options.isPageShow) {
|
|
2501
|
-
// 翻页操作会导致筛选项发生变化,所以需要清空已有的
|
|
2502
|
-
this.changePage()
|
|
2503
|
-
}
|
|
2504
|
-
},
|
|
2505
|
-
changePage(currentPage) {
|
|
2506
|
-
console.log('点击了分页')
|
|
2507
|
-
// 翻页操作会导致筛选项发生变化,所以需要清空已有的
|
|
2508
|
-
this.$refs.superGrid?.clearFilter()
|
|
2509
|
-
// TODO: 把当前页数、每页条数、查询条件、排序信息传回后台
|
|
2510
|
-
if (this.isSubTableShowPage) {
|
|
2511
|
-
this.gridData = this.getSubTableGridData(this.subTableData, currentPage)
|
|
2512
|
-
const gridParams = store.get(this.code)
|
|
2513
|
-
gridParams.gridData = this.gridData
|
|
2514
|
-
// 完成深拷贝,复制一份对象,行编辑时使用
|
|
2515
|
-
gridParams.orgGridData = [].concat(JSON.parse(JSON.stringify(this.gridData)))
|
|
2516
|
-
} else {
|
|
2517
|
-
this.fetchData(this.getSearchParam())
|
|
2518
|
-
}
|
|
2519
|
-
},
|
|
2520
|
-
handleSortChange({ column, prop, order }) {
|
|
2521
|
-
if (!this.options || !this.options.isPageShow) {
|
|
2522
|
-
let columnSetting = null
|
|
2523
|
-
const items = this.visibleColumns.filter((item) => {
|
|
2524
|
-
return column.property === item.prop
|
|
2525
|
-
})
|
|
2526
|
-
if (items && items.length > 0) {
|
|
2527
|
-
columnSetting = items[0]
|
|
2528
|
-
}
|
|
2529
|
-
if (!isCanRefreshGrid(this.code)) {
|
|
2530
|
-
// 如果最后编辑行没有保存或撤销编辑,则给出提示
|
|
2531
|
-
const gridParams = store.get(this.code)
|
|
2532
|
-
console.log('请先保存或撤销编辑第' + gridParams.$rowIndex + 1 + '行记录,再排序')
|
|
2533
|
-
this.$refs.superGrid?.clearSort()
|
|
2534
|
-
} else {
|
|
2535
|
-
// TODO: 应该调用fetchData来获取信息,把当前页数、查询条件、排序信息传回后台
|
|
2536
|
-
if (prop !== null && columnSetting && columnSetting !== null) {
|
|
2537
|
-
// 当点击第3次时,prop会是空,表示清空排序字段,还原原顺序
|
|
2538
|
-
let orgProp = columnSetting.orgProp
|
|
2539
|
-
// sql查询时,会把点“.”改为两个下划线"__"
|
|
2540
|
-
const replaceDot = '__'
|
|
2541
|
-
if (orgProp && orgProp.indexOf(replaceDot) > 0) {
|
|
2542
|
-
// 表示包括点“.”,需要把两个下划线"__"重新改为点“.”,否则会导致查询报500错误
|
|
2543
|
-
orgProp = orgProp.replace(replaceDot, '.')
|
|
2544
|
-
}
|
|
2545
|
-
this.sortInfo = [
|
|
2546
|
-
{
|
|
2547
|
-
prop: orgProp,
|
|
2548
|
-
order: order
|
|
2549
|
-
}
|
|
2550
|
-
]
|
|
2551
|
-
} else {
|
|
2552
|
-
this.sortInfo = null
|
|
2553
|
-
}
|
|
2554
|
-
this.fetchData(this.getSearchParam())
|
|
2555
|
-
this.focusOnFirstEditableInput()
|
|
2556
|
-
$emit(this, 'sort-change', { columnSetting, prop, order, column })
|
|
2557
|
-
}
|
|
2558
|
-
}
|
|
2559
|
-
},
|
|
2560
|
-
isMergeable(prop) {
|
|
2561
|
-
for (const column of this.columns) {
|
|
2562
|
-
if (column.prop === prop) {
|
|
2563
|
-
if (this.mergeFields && this.mergeFields.indexOf(column.prop) !== -1) {
|
|
2564
|
-
return true
|
|
2565
|
-
} else {
|
|
2566
|
-
return column.span
|
|
2567
|
-
}
|
|
2568
|
-
}
|
|
2569
|
-
}
|
|
2570
|
-
},
|
|
2571
|
-
rowSpan({ row, column, rowIndex, columnIndex }) {
|
|
2572
|
-
if (this.isMergeable(column.property)) {
|
|
2573
|
-
const row = this.spanArr[column.property][rowIndex]
|
|
2574
|
-
const col = row > 0 ? 1 : 0
|
|
2575
|
-
return {
|
|
2576
|
-
rowspan: row,
|
|
2577
|
-
colspan: col
|
|
2578
|
-
}
|
|
2579
|
-
}
|
|
2580
|
-
},
|
|
2581
|
-
packageSummaryColumnProps() {
|
|
2582
|
-
const summaryColumnProps = []
|
|
2583
|
-
// this.visibleColumns.forEach((item) => {
|
|
2584
|
-
// if (item.total !== undefined && item.total === true) {
|
|
2585
|
-
// summaryColumnProps.push(item.prop)
|
|
2586
|
-
// } else if (item.groupHeader && item.children && item.children.length > 0) {
|
|
2587
|
-
// setGroupHeaderChildernSummary(item.children, summaryColumnProps)
|
|
2588
|
-
// }
|
|
2589
|
-
// })
|
|
2590
|
-
this.setGroupHeaderChildernSummary(this.visibleColumns, summaryColumnProps)
|
|
2591
|
-
return summaryColumnProps
|
|
2592
|
-
},
|
|
2593
|
-
setGroupHeaderChildernSummary(columns, summaryColumnProps) {
|
|
2594
|
-
columns.forEach((item) => {
|
|
2595
|
-
if (item.total !== undefined && item.total === true) {
|
|
2596
|
-
summaryColumnProps.push(item.prop)
|
|
2597
|
-
} else if (item.groupHeader && item.children && item.children.length > 0) {
|
|
2598
|
-
this.setGroupHeaderChildernSummary(item.children, summaryColumnProps)
|
|
2599
|
-
}
|
|
2600
|
-
})
|
|
2601
|
-
},
|
|
2602
|
-
getSummaries(param) {
|
|
2603
|
-
// 后台返回时需要处理好序号列和多选列
|
|
2604
|
-
if (this.basicInfo.summary !== 'no') {
|
|
2605
|
-
const summaryMap = this.summaries
|
|
2606
|
-
if (summaryMap) {
|
|
2607
|
-
return this.getCustomSummaries(param, summaryMap)
|
|
2608
|
-
} else {
|
|
2609
|
-
return this.getDefaultSummaries(param)
|
|
2610
|
-
}
|
|
2611
|
-
} else {
|
|
2612
|
-
return []
|
|
2613
|
-
}
|
|
2614
|
-
},
|
|
2615
|
-
getCustomSummaries(param, summaryMap) {
|
|
2616
|
-
// key为字段名,value为
|
|
2617
|
-
const { columns } = param
|
|
2618
|
-
const sums = []
|
|
2619
|
-
columns.forEach((column, index) => {
|
|
2620
|
-
const prop = column.property
|
|
2621
|
-
const summaryVal = summaryMap[prop]
|
|
2622
|
-
if (summaryVal !== undefined && summaryVal !== null) {
|
|
2623
|
-
sums[index] = summaryVal
|
|
2624
|
-
} else {
|
|
2625
|
-
sums[index] = ''
|
|
2626
|
-
}
|
|
2627
|
-
})
|
|
2628
|
-
return sums
|
|
2629
|
-
},
|
|
2630
|
-
getDefaultSummaries(param) {
|
|
2631
|
-
const sums = []
|
|
2632
|
-
const summaryColumnProps = this.packageSummaryColumnProps()
|
|
2633
|
-
if (summaryColumnProps.length > 0) {
|
|
2634
|
-
const { columns, data } = param
|
|
2635
|
-
let totalColIndex = null
|
|
2636
|
-
columns.forEach((column, index) => {
|
|
2637
|
-
let colTotal = 0
|
|
2638
|
-
const prop = column.property
|
|
2639
|
-
if (prop && prop !== '$selection' && prop !== '$index') {
|
|
2640
|
-
// 设置合计列
|
|
2641
|
-
if (totalColIndex === undefined || totalColIndex === null) {
|
|
2642
|
-
totalColIndex = index
|
|
2643
|
-
sums[index] = '合计'
|
|
2644
|
-
return
|
|
2645
|
-
}
|
|
2646
|
-
}
|
|
2647
|
-
if (summaryColumnProps.indexOf(prop) >= 0) {
|
|
2648
|
-
// 表示该列需要合计
|
|
2649
|
-
if (data) {
|
|
2650
|
-
data.forEach((row) => {
|
|
2651
|
-
let fieldValue = getEntityFieldValueWithOutCase(row, prop)
|
|
2652
|
-
let numberValue
|
|
2653
|
-
if (fieldValue !== undefined && fieldValue !== null) {
|
|
2654
|
-
// 表示值存在,不需要转换
|
|
2655
|
-
numberValue = Number(fieldValue)
|
|
2656
|
-
} else {
|
|
2657
|
-
// 表示值不存在,需要转小写,再获得一遍
|
|
2658
|
-
const reg1 = /[A-Z]+/ // 大写字母
|
|
2659
|
-
if (this.isSql && reg1.test(prop)) {
|
|
2660
|
-
fieldValue = getEntityFieldValueWithOutCase(row, prop.toLowerCase())
|
|
2661
|
-
if (fieldValue !== undefined && fieldValue !== null) {
|
|
2662
|
-
numberValue = Number(fieldValue)
|
|
2663
|
-
}
|
|
2664
|
-
}
|
|
2665
|
-
}
|
|
2666
|
-
if (numberValue !== undefined && numberValue !== null && !isNaN(numberValue)) {
|
|
2667
|
-
colTotal += numberValue
|
|
2668
|
-
}
|
|
2669
|
-
})
|
|
2670
|
-
}
|
|
2671
|
-
sums[index] = colTotal
|
|
2672
|
-
} else {
|
|
2673
|
-
sums[index] = ''
|
|
2674
|
-
}
|
|
2675
|
-
})
|
|
2676
|
-
}
|
|
2677
|
-
return sums
|
|
2678
|
-
},
|
|
2679
|
-
configColumns() {
|
|
2680
|
-
this.showColumnConfig = true
|
|
2681
|
-
// 完成深拷贝,复制一份对象,行编辑时使用
|
|
2682
|
-
this.orgColumnConfig = [].concat(JSON.parse(JSON.stringify(this.columns)))
|
|
2683
|
-
},
|
|
2684
|
-
// 行拖拽
|
|
2685
|
-
rowDrop() {
|
|
2686
|
-
if (this.lineEdit && this.lineEdit.urlToSaveOrder) {
|
|
2687
|
-
const tbody = document.querySelector('.el-table__body-wrapper tbody')
|
|
2688
|
-
if (tbody != null) {
|
|
2689
|
-
const vm = this
|
|
2690
|
-
Sortable.create(tbody, {
|
|
2691
|
-
onEnd({ newIndex, oldIndex }) {
|
|
2692
|
-
const params = {
|
|
2693
|
-
oldIndex: oldIndex,
|
|
2694
|
-
newIndex: newIndex
|
|
2695
|
-
}
|
|
2696
|
-
this.$http.post(this.lineEdit.urlToSaveOrder, params).then((data) => {
|
|
2697
|
-
const currRow = vm.gridData.splice(oldIndex, 1)[0]
|
|
2698
|
-
vm.gridData.splice(newIndex, 0, currRow)
|
|
2699
|
-
})
|
|
2700
|
-
}
|
|
2701
|
-
})
|
|
2702
|
-
}
|
|
2703
|
-
}
|
|
2704
|
-
},
|
|
2705
|
-
closeCustomConfig(isRefreshGrid) {
|
|
2706
|
-
if (isRefreshGrid !== undefined && isRefreshGrid === true) {
|
|
2707
|
-
this.refreshGridInitialize()
|
|
2708
|
-
}
|
|
2709
|
-
this.showColumnConfig = false
|
|
2710
|
-
},
|
|
2711
|
-
resetCustomConfig() {
|
|
2712
|
-
this.refreshGridInitialize()
|
|
2713
|
-
},
|
|
2714
|
-
refreshGridInitialize() {
|
|
2715
|
-
this.initialize().then(() => {
|
|
2716
|
-
// 添加该代码是为了解决保存字段个性化配置后,重新渲染列表问题,例如:列宽重新计算问题
|
|
2717
|
-
this.refreshGrid = false
|
|
2718
|
-
const vm = this
|
|
2719
|
-
setTimeout(function () {
|
|
2720
|
-
vm.refreshGrid = true
|
|
2721
|
-
}, 100)
|
|
2722
|
-
})
|
|
2723
|
-
},
|
|
2724
|
-
loadChildren(row, treeNode, resove) {
|
|
2725
|
-
if (this.isLazy) {
|
|
2726
|
-
this.loadChildrenNode(row, treeNode, resove)
|
|
2727
|
-
}
|
|
2728
|
-
},
|
|
2729
|
-
loadChildrenNode(row, treeNode, resove) {
|
|
2730
|
-
const subRowUrl = this.options.subRowUrl
|
|
2731
|
-
if (typeof subRowUrl !== 'undefined' && subRowUrl !== '' && subRowUrl !== null) {
|
|
2732
|
-
const parentRowIds = []
|
|
2733
|
-
parentRowIds.push(row.id ? row.id : row.ID)
|
|
2734
|
-
this.fetchData(this.getSearchParam(), false, parentRowIds, resove)
|
|
2735
|
-
}
|
|
2736
|
-
},
|
|
2737
|
-
expandChange(row, expanded) {
|
|
2738
|
-
if (this.isLazy) {
|
|
2739
|
-
// console.log('expandChange==row, expanded', row, expanded, this.$refs.superGrid?.store.states)
|
|
2740
|
-
if (expanded === false) {
|
|
2741
|
-
// 折叠时清空表格缓存的已加载的标识位,使其能够动态更新子集合
|
|
2742
|
-
// 必须添加这句,否则不会重新走load
|
|
2743
|
-
if (this.$refs.superGrid?.store.states.treeData) {
|
|
2744
|
-
this.$refs.superGrid.store.states.treeData[row.id ? row.id : row.ID].loaded = false
|
|
2745
|
-
}
|
|
2746
|
-
} else {
|
|
2747
|
-
// console.log('expandChange=this.$refs.superGrid?.store.states.lazyTreeNodeMap', this.$refs.superGrid?.store.states.lazyTreeNodeMap)
|
|
2748
|
-
// console.log('expandChange=this.$refs.superGrid?.store.states.treeData', this.$refs.superGrid?.store.states.treeData)
|
|
2749
|
-
// console.log('expandChange=this.$refs.superGrid?.store.states.selection', this.$refs.superGrid?.store.states.selection)
|
|
2750
|
-
}
|
|
2751
|
-
}
|
|
2752
|
-
},
|
|
2753
|
-
removeGridStoreSelection(parentRowIds) {
|
|
2754
|
-
let selection = []
|
|
2755
|
-
if (this.$refs.superGrid?.store.states.selection) {
|
|
2756
|
-
selection = [].concat(JSON.parse(JSON.stringify(this.$refs.superGrid?.store.states.selection)))
|
|
2757
|
-
}
|
|
2758
|
-
for (let i = 0; i < selection.length; i++) {
|
|
2759
|
-
if (parentRowIds && parentRowIds.indexOf(selection[i][this.parentProp]) >= 0) {
|
|
2760
|
-
// 移除第i个元素
|
|
2761
|
-
this.$refs.superGrid?.store.states.selection.splice(i, 1)
|
|
2762
|
-
if (this.$refs.superGrid?.store.states.selection.length > 0) {
|
|
2763
|
-
this.removeGridStoreSelection(parentRowIds)
|
|
2764
|
-
}
|
|
2765
|
-
break
|
|
2766
|
-
}
|
|
2767
|
-
}
|
|
2768
|
-
},
|
|
2769
|
-
changeHederWidth(newWidth, oldWidth, column, event) {
|
|
2770
|
-
const newCellWidth = newWidth - 5
|
|
2771
|
-
let myNewWidth = newCellWidth
|
|
2772
|
-
this.dragColumnProp = column.property
|
|
2773
|
-
const gridParams = store.get(this.code)
|
|
2774
|
-
if (isHasOptionFunction('resizeColumn', this.code)) {
|
|
2775
|
-
const newWidth = gridParams.options.resizeColumn.call(this, {
|
|
2776
|
-
code: this.code,
|
|
2777
|
-
newWidth: newWidth,
|
|
2778
|
-
oldWidth: oldWidth,
|
|
2779
|
-
column: column,
|
|
2780
|
-
additionalParamMap: gridParams.additionalParamMap,
|
|
2781
|
-
pageContext: this.pageContext,
|
|
2782
|
-
configureObj: this.configureObj
|
|
2783
|
-
})
|
|
2784
|
-
if (newWidth) {
|
|
2785
|
-
myNewWidth = newWidth
|
|
2786
|
-
}
|
|
2787
|
-
}
|
|
2788
|
-
this.newWidth = Math.ceil(myNewWidth)
|
|
2789
|
-
if (
|
|
2790
|
-
typeof this.options.isAdministerListView !== 'undefined' &&
|
|
2791
|
-
this.options.isAdministerListView != null &&
|
|
2792
|
-
this.options.isAdministerListView === true
|
|
2793
|
-
) {
|
|
2794
|
-
// 表示是列表字段配置时
|
|
2795
|
-
$emit(this, 'changeHederWidth', this.newWidth)
|
|
2796
|
-
} else {
|
|
2797
|
-
// 应用模式时
|
|
2798
|
-
// 保存拖动后的列宽
|
|
2799
|
-
this.saveColumnWidth(this.dragColumnProp, this.newWidth).then(() => {
|
|
2800
|
-
const items = this.getColumnByElementColumn(column)
|
|
2801
|
-
if (items && items.length > 0) {
|
|
2802
|
-
items[0].widthType = 'custom'
|
|
2803
|
-
items[0].width = this.newWidth + ''
|
|
2804
|
-
}
|
|
2805
|
-
})
|
|
2806
|
-
}
|
|
2807
|
-
},
|
|
2808
|
-
resetSearch() {
|
|
2809
|
-
let searchForm = null
|
|
2810
|
-
if (this.toolbarFieldParam && this.toolbarFieldParam.length > 0) {
|
|
2811
|
-
searchForm = this.toolbarFieldParam
|
|
2812
|
-
}
|
|
2813
|
-
// 修改当前页为第1页
|
|
2814
|
-
this.currentPage = 1
|
|
2815
|
-
this.search(searchForm, false)
|
|
2816
|
-
},
|
|
2817
|
-
// 获取列信息
|
|
2818
|
-
getColumnInformation() {
|
|
2819
|
-
return this.visibleColumns
|
|
2820
|
-
},
|
|
2821
|
-
// 点击表头触发回调
|
|
2822
|
-
headerClickEvent(column, event) {
|
|
2823
|
-
// 三种类型
|
|
2824
|
-
const items = this.getColumnByElementColumn(column)
|
|
2825
|
-
if (items && items.length > 0) {
|
|
2826
|
-
$emit(this, 'header-click-custom', items[0])
|
|
2827
|
-
this.changeHeaderStyleTwo(items[0])
|
|
2828
|
-
} else {
|
|
2829
|
-
$emit(this, 'header-click-custom', null)
|
|
2830
|
-
}
|
|
2831
|
-
this.clearHeaderContextmenu()
|
|
2832
|
-
this.headerClick(column, event)
|
|
2833
|
-
},
|
|
2834
|
-
changeHeaderStyleTwo(item) {
|
|
2835
|
-
// 改变options中的配置
|
|
2836
|
-
// 还原所有颜色(隐藏字段判断,设置为灰色;选中字段设置为蓝色)
|
|
2837
|
-
if (
|
|
2838
|
-
typeof this.options.isAdministerListView !== 'undefined' &&
|
|
2839
|
-
this.options.isAdministerListView != null &&
|
|
2840
|
-
this.options.isAdministerListView === true
|
|
2841
|
-
) {
|
|
2842
|
-
this.createBackgroundColorMap()
|
|
2843
|
-
this.backgroundColorMap[item.prop] = '#409EFF'
|
|
2844
|
-
if (this.$refs && this.$refs.superGrid) {
|
|
2845
|
-
this.$refs.superGrid?.doLayout()
|
|
2846
|
-
}
|
|
2847
|
-
}
|
|
2848
|
-
},
|
|
2849
|
-
// 编辑模式下创建一个对象,存储各个表头的背景色
|
|
2850
|
-
createBackgroundColorMap() {
|
|
2851
|
-
const items = this.getColumnInformation()
|
|
2852
|
-
const backgroundColorMap = {}
|
|
2853
|
-
if (items && items.length > 0) {
|
|
2854
|
-
for (var i = 0; i < items.length; i++) {
|
|
2855
|
-
const item = items[i]
|
|
2856
|
-
if (item.show === undefined || item.show) {
|
|
2857
|
-
// 表示显示
|
|
2858
|
-
} else {
|
|
2859
|
-
backgroundColorMap[item.prop] = '#808080'
|
|
2860
|
-
}
|
|
2861
|
-
if (this.backgroundColorMap && this.backgroundColorMap[item.prop] === '#409EFF' && this.externalClickFlag) {
|
|
2862
|
-
backgroundColorMap[item.prop] = '#409EFF'
|
|
2863
|
-
}
|
|
2864
|
-
}
|
|
2865
|
-
}
|
|
2866
|
-
this.backgroundColorMap = backgroundColorMap
|
|
2867
|
-
this.externalClickFlag = false
|
|
2868
|
-
if (this.$refs && this.$refs.superGrid) {
|
|
2869
|
-
this.$refs.superGrid?.doLayout()
|
|
2870
|
-
}
|
|
2871
|
-
},
|
|
2872
|
-
// 根据element事件传递的column来获取自定义封装的column
|
|
2873
|
-
getColumnByElementColumn(column) {
|
|
2874
|
-
let items = null
|
|
2875
|
-
if (column.type && column.type === 'selection') {
|
|
2876
|
-
// 表示为选择框
|
|
2877
|
-
items = this.visibleColumns.filter((item) => {
|
|
2878
|
-
return item.prop === '$selection'
|
|
2879
|
-
})
|
|
2880
|
-
} else if (column.type && column.type === 'default' && !column.property) {
|
|
2881
|
-
// 表示为序号
|
|
2882
|
-
items = this.visibleColumns.filter((item) => {
|
|
2883
|
-
return item.prop === '$index'
|
|
2884
|
-
})
|
|
2885
|
-
} else if (column.property) {
|
|
2886
|
-
// 表示为普通字段
|
|
2887
|
-
items = this.visibleColumns.filter((item) => {
|
|
2888
|
-
return column.property === item.prop
|
|
2889
|
-
})
|
|
2890
|
-
}
|
|
2891
|
-
return items
|
|
2892
|
-
},
|
|
2893
|
-
// 右键表头
|
|
2894
|
-
headerContextmenu(column, event) {
|
|
2895
|
-
// 阻止鼠标的默认事件
|
|
2896
|
-
event.preventDefault()
|
|
2897
|
-
const items = this.getColumnByElementColumn(column)
|
|
2898
|
-
if (items && items.length > 0) {
|
|
2899
|
-
const item = items[0]
|
|
2900
|
-
$emit(this, 'header-click', items[0])
|
|
2901
|
-
this.changeHeaderStyleTwo(items[0])
|
|
2902
|
-
this.showHeaderContextmenu = true
|
|
2903
|
-
this.rightClickColumn = item
|
|
2904
|
-
this.$nextTick(() => {
|
|
2905
|
-
const menu = this.$refs.headerMenu.$el
|
|
2906
|
-
const scrollTop = document.documentElement.scrollTop || document.body.scrollTop
|
|
2907
|
-
menu.style.display = 'block'
|
|
2908
|
-
menu.style.left = event.clientX + 'px'
|
|
2909
|
-
// 当滑动滚动条时也能准确获取菜单位置
|
|
2910
|
-
menu.style.top = event.clientY + scrollTop - 10 + 'px'
|
|
2911
|
-
})
|
|
2912
|
-
}
|
|
2913
|
-
},
|
|
2914
|
-
// 清除右键菜单显示
|
|
2915
|
-
clearHeaderContextmenu() {
|
|
2916
|
-
this.showHeaderContextmenu = false
|
|
2917
|
-
this.rightClickColumn = null
|
|
2918
|
-
},
|
|
2919
|
-
// 返回表单子表模式下数据
|
|
2920
|
-
validatorSunTableListData() {
|
|
2921
|
-
// 返回之前需要进行规则校验
|
|
2922
|
-
let gridData = this.gridData
|
|
2923
|
-
if (this.isSubTableShowPage) {
|
|
2924
|
-
gridData = this.subTableData
|
|
2925
|
-
}
|
|
2926
|
-
if (gridData && gridData.length > 0) {
|
|
2927
|
-
const gridParams = store.get(this.code)
|
|
2928
|
-
const customRules = gridParams.options.customRules
|
|
2929
|
-
const pageSize = this.pagination && this.pagination.pageSize
|
|
2930
|
-
const validateRules = formValidatorService.getValidator(this.code)
|
|
2931
|
-
for (let i = 0; i < gridData.length; i++) {
|
|
2932
|
-
const row = gridData[i]
|
|
2933
|
-
let rules = validateRules
|
|
2934
|
-
if (customRules) {
|
|
2935
|
-
const propNames = Object.keys(customRules)
|
|
2936
|
-
if (propNames.length > 0) {
|
|
2937
|
-
// 遍历customRules,判断customRules的规则是否有beforeValidate
|
|
2938
|
-
for (const propName of propNames) {
|
|
2939
|
-
if (customRules[propName].beforeValidate) {
|
|
2940
|
-
const result = rowBeforeValidate(customRules[propName], gridParams, row)
|
|
2941
|
-
if (result === false && rules[propName]) {
|
|
2942
|
-
rules = JSON.parse(JSON.stringify(validateRules))
|
|
2943
|
-
rules[propName] = []
|
|
2944
|
-
}
|
|
2945
|
-
}
|
|
2946
|
-
}
|
|
2947
|
-
}
|
|
2948
|
-
}
|
|
2949
|
-
// 取消最后一个编辑行的状态
|
|
2950
|
-
if (row.$editing !== undefined && row.$editing === true) {
|
|
2951
|
-
setEntityFieldValue(row, '$editing', false)
|
|
2952
|
-
// 取消上一行选中状态时,触发un-edit事件,处理下拉多选选项组问题
|
|
2953
|
-
$emit(eventBus, 'un-edit', { row: row })
|
|
2954
|
-
}
|
|
2955
|
-
let needValidate = true
|
|
2956
|
-
if (isHasEditOption('isEnableValidate', this.code)) {
|
|
2957
|
-
// 表示配置了是否启用必填验证
|
|
2958
|
-
needValidate = gridParams.options.lineEditOptions['isEnableValidate']
|
|
2959
|
-
}
|
|
2960
|
-
let validateResult = true
|
|
2961
|
-
if (needValidate === true) {
|
|
2962
|
-
let pageNum
|
|
2963
|
-
// 每页的记录下标,提示时使用
|
|
2964
|
-
let pageRowIndex
|
|
2965
|
-
if (this.isSubTableShowPage && pageSize !== undefined && pageSize > 0) {
|
|
2966
|
-
pageNum = Math.ceil((i + 1) / pageSize)
|
|
2967
|
-
pageRowIndex = i + 1 - (pageNum - 1) * pageSize
|
|
2968
|
-
}
|
|
2969
|
-
validateResult = formValidatorService.validator(
|
|
2970
|
-
row,
|
|
2971
|
-
this.code,
|
|
2972
|
-
i,
|
|
2973
|
-
rules,
|
|
2974
|
-
this.isSubTableShowPage,
|
|
2975
|
-
pageNum,
|
|
2976
|
-
pageRowIndex
|
|
2977
|
-
)
|
|
2978
|
-
}
|
|
2979
|
-
if (validateResult !== null && validateResult !== undefined) {
|
|
2980
|
-
if (typeof validateResult === 'string' || validateResult === false) {
|
|
2981
|
-
return false
|
|
2982
|
-
}
|
|
2983
|
-
}
|
|
2984
|
-
}
|
|
2985
|
-
return true
|
|
2986
|
-
}
|
|
2987
|
-
return true
|
|
2988
|
-
},
|
|
2989
|
-
getSunTableListData() {
|
|
2990
|
-
return this.isSubTableShowPage ? this.subTableData : this.gridData
|
|
2991
|
-
},
|
|
2992
|
-
rowDblclickEvent(row, column, event) {
|
|
2993
|
-
const gridParams = store.get(this.code)
|
|
2994
|
-
if (gridParams.options && gridParams.options.isFormSubTable && gridParams.options.isPdfEditor) {
|
|
2995
|
-
// 如果是子表并且是pdf模式
|
|
2996
|
-
} else if (this.isFormSubTable) {
|
|
2997
|
-
// 表示是表单的子表,点击时需要将当前行设为行编辑状态,并保存上一行的记录(不是保存到数据库,只是把编辑状态改为false)
|
|
2998
|
-
if (column.property && column.property !== 'operation') {
|
|
2999
|
-
let canEdit = true
|
|
3000
|
-
const gridParams = store.get(this.code)
|
|
3001
|
-
if (isEditOptionFunction('beforeEdit', this.code)) {
|
|
3002
|
-
const isSubTableShowPage = gridParams.isSubTableShowPage
|
|
3003
|
-
// 每页显示多少条
|
|
3004
|
-
const pageSize = gridParams.pagination && gridParams.pagination.pageSize
|
|
3005
|
-
canEdit = gridParams.options.lineEditOptions.beforeEdit.call(this, {
|
|
3006
|
-
gridData: isSubTableShowPage ? gridParams.subTableData : gridParams.gridData,
|
|
3007
|
-
listCode: this.code,
|
|
3008
|
-
entity: row,
|
|
3009
|
-
columns: gridParams.columns,
|
|
3010
|
-
isMobile: this.isMobile,
|
|
3011
|
-
pageGridData: isSubTableShowPage ? gridParams.gridData : null,
|
|
3012
|
-
pageSize,
|
|
3013
|
-
additionalParamMap: gridParams.additionalParamMap,
|
|
3014
|
-
pageContext: gridParams.pageContext,
|
|
3015
|
-
configureObj: gridParams.configureObj
|
|
3016
|
-
})
|
|
3017
|
-
}
|
|
3018
|
-
if (isPromise(canEdit)) {
|
|
3019
|
-
canEdit.then((result) => {
|
|
3020
|
-
if (result === undefined || result === true) {
|
|
3021
|
-
this.rowDbClickEditRow(gridParams, row)
|
|
3022
|
-
}
|
|
3023
|
-
})
|
|
3024
|
-
} else {
|
|
3025
|
-
if (canEdit === undefined || canEdit === true) {
|
|
3026
|
-
this.rowDbClickEditRow(gridParams, row)
|
|
3027
|
-
}
|
|
3028
|
-
}
|
|
3029
|
-
}
|
|
3030
|
-
} else {
|
|
3031
|
-
if (row) {
|
|
3032
|
-
if (gridParams && gridParams.lineEdit && gridParams.lineEdit.editable && gridParams.canntEdit) {
|
|
3033
|
-
let index = this.gridData.findIndex(function (item) {
|
|
3034
|
-
return (item.id && item.id === row.id) || (item.ID && item.ID === row.ID)
|
|
3035
|
-
})
|
|
3036
|
-
if (index < 0) {
|
|
3037
|
-
index = 0
|
|
3038
|
-
}
|
|
3039
|
-
this.editRow(index, this.code)
|
|
3040
|
-
}
|
|
3041
|
-
}
|
|
3042
|
-
}
|
|
3043
|
-
this.rowDblClick(row, column, event)
|
|
3044
|
-
},
|
|
3045
|
-
rowDbClickEditRow(gridParams, row) {
|
|
3046
|
-
// 取消上一行的编辑状态
|
|
3047
|
-
let editRows
|
|
3048
|
-
if (this.isSubTableShowPage) {
|
|
3049
|
-
editRows = this.subTableData.filter((row) => row.$editing !== undefined && row.$editing === true)
|
|
3050
|
-
} else {
|
|
3051
|
-
editRows = this.gridData.filter((row) => row.$editing !== undefined && row.$editing === true)
|
|
3052
|
-
}
|
|
3053
|
-
if (editRows && editRows.length > 0) {
|
|
3054
|
-
editRows.forEach((editRow) => {
|
|
3055
|
-
setEntityFieldValue(editRow, '$editing', false)
|
|
3056
|
-
// 取消上一行选中状态时,触发un-edit事件,处理下拉多选选项组问题
|
|
3057
|
-
eventBus.$emit('un-edit', { row: editRow })
|
|
3058
|
-
// this.$set(editRow, '$editing', false)
|
|
3059
|
-
})
|
|
3060
|
-
}
|
|
3061
|
-
gridParams.isEditRow = false
|
|
3062
|
-
const canEdit = parseSubTableActionCondition(
|
|
3063
|
-
gridParams,
|
|
3064
|
-
this.parentFormData,
|
|
3065
|
-
row,
|
|
3066
|
-
gridParams.options.actionPermission?.updateCondition
|
|
3067
|
-
)
|
|
3068
|
-
if (canEdit === false) {
|
|
3069
|
-
window.$vueApp.config.globalProperties.$message({
|
|
3070
|
-
showClose: true,
|
|
3071
|
-
message: this.$t('superGrid.rowCanntEditTip'),
|
|
3072
|
-
type: 'warning'
|
|
3073
|
-
})
|
|
3074
|
-
return
|
|
3075
|
-
}
|
|
3076
|
-
setEntityFieldValue(row, '$editing', true)
|
|
3077
|
-
gridParams.$editRow = row
|
|
3078
|
-
// this.$set(row, '$editing', true)
|
|
3079
|
-
gridParams.isEditRow = true
|
|
3080
|
-
},
|
|
3081
|
-
rowClickEvent(row, column, event) {
|
|
3082
|
-
// if (
|
|
3083
|
-
// this.isFormSubTable &&
|
|
3084
|
-
// column.property &&
|
|
3085
|
-
// column.property !== 'operation'
|
|
3086
|
-
// ) {
|
|
3087
|
-
// // 表示是表单的子表,点击时需要将当前行设为行编辑状态,并保存上一行的记录(不是保存到数据库,只是把编辑状态改为false)
|
|
3088
|
-
// // 取消上一行的编辑状态
|
|
3089
|
-
// const gridParams = store.get(this.code)
|
|
3090
|
-
// const editRows = this.gridData.filter(
|
|
3091
|
-
// row => row.$editing !== undefined && row.$editing === true
|
|
3092
|
-
// )
|
|
3093
|
-
// if (editRows && editRows.length > 0) {
|
|
3094
|
-
// editRows.forEach(editRow => {
|
|
3095
|
-
// this.$set(editRow, '$editing', false)
|
|
3096
|
-
// })
|
|
3097
|
-
// }
|
|
3098
|
-
// gridParams.isEditRow = false
|
|
3099
|
-
// this.$set(row, '$editing', true)
|
|
3100
|
-
// gridParams.isEditRow = true
|
|
3101
|
-
// }
|
|
3102
|
-
this.rowClick(row, column, event)
|
|
3103
|
-
},
|
|
3104
|
-
openPageDialog(openPageParams) {
|
|
3105
|
-
let jumpMode
|
|
3106
|
-
if (openPageParams) {
|
|
3107
|
-
jumpMode = openPageParams.jumpMode
|
|
3108
|
-
}
|
|
3109
|
-
const popPageSetting = openPageParams
|
|
3110
|
-
if (this.pageContext) {
|
|
3111
|
-
// 新页面设计组件中弹框或刷新区域时
|
|
3112
|
-
const isMobile = this.isMobile
|
|
3113
|
-
if (jumpMode === 'popup' || jumpMode === 'refresh' || (isMobile && jumpMode === 'newTab')) {
|
|
3114
|
-
// 弹出页面
|
|
3115
|
-
const gridParams = store.get(this.code)
|
|
3116
|
-
this.jumpPageSetting = popPageSetting
|
|
3117
|
-
const isSubTableShowPage = gridParams.isSubTableShowPage
|
|
3118
|
-
// 每页显示多少条
|
|
3119
|
-
const pageSize = gridParams.pagination && gridParams.pagination.pageSize
|
|
3120
|
-
const row = popPageSetting.row
|
|
3121
|
-
const eventParams = {
|
|
3122
|
-
position: popPageSetting._position,
|
|
3123
|
-
listCode: popPageSetting._listCode,
|
|
3124
|
-
rowIndex: popPageSetting._rowIndex,
|
|
3125
|
-
row: popPageSetting.row,
|
|
3126
|
-
columnProp: popPageSetting._columnProp,
|
|
3127
|
-
id: row ? (row.ID ? row.ID : row.id) : null,
|
|
3128
|
-
isMobile,
|
|
3129
|
-
gridData: isSubTableShowPage ? gridParams.subTableData : gridParams.gridData,
|
|
3130
|
-
pageGridData: isSubTableShowPage ? gridParams.gridData : null,
|
|
3131
|
-
pageSize
|
|
3132
|
-
}
|
|
3133
|
-
this.$emit('new-open-grid-dialog', {
|
|
3134
|
-
pageContext: this.pageContext,
|
|
3135
|
-
configureObj: this.configureObj,
|
|
3136
|
-
eventParams,
|
|
3137
|
-
jumpPageSetting: this.jumpPageSetting
|
|
3138
|
-
})
|
|
3139
|
-
}
|
|
3140
|
-
} else {
|
|
3141
|
-
if (jumpMode === 'popup') {
|
|
3142
|
-
// 弹出页面
|
|
3143
|
-
this.jumpPageSetting = popPageSetting
|
|
3144
|
-
this.$emit('open-grid-dialog', this.jumpPageSetting)
|
|
3145
|
-
this.isShowPageDialog = true
|
|
3146
|
-
} else if (jumpMode === 'refresh') {
|
|
3147
|
-
this.$router.push({ path: '/dsc/page', query: popPageSetting })
|
|
3148
|
-
}
|
|
3149
|
-
}
|
|
3150
|
-
},
|
|
3151
|
-
closeSearchFormDialog() {
|
|
3152
|
-
this.showSearch = false
|
|
3153
|
-
},
|
|
3154
|
-
// 获取当前列表的查询方式,page项目使用
|
|
3155
|
-
getQueryMode() {
|
|
3156
|
-
if (this.query && this.query.showType === 'popup') {
|
|
3157
|
-
return 'popup'
|
|
3158
|
-
} else {
|
|
3159
|
-
return 'embedded'
|
|
3160
|
-
}
|
|
3161
|
-
},
|
|
3162
|
-
selectCell(row, column, cell, event) {
|
|
3163
|
-
this.cellClick(row, column, cell, event)
|
|
3164
|
-
if (cell) {
|
|
3165
|
-
this.$nextTick(() => {
|
|
3166
|
-
// TODO: 有边框样式不好看,暂时去掉
|
|
3167
|
-
// cell.style['border'] = '2px solid #409EFF'
|
|
3168
|
-
this.currentSelectCell = cell
|
|
3169
|
-
})
|
|
3170
|
-
}
|
|
3171
|
-
},
|
|
3172
|
-
// 刷新列表数据
|
|
3173
|
-
refreshGridData() {
|
|
3174
|
-
this.refresh(false, true)
|
|
3175
|
-
},
|
|
3176
|
-
// 刷新列表数据
|
|
3177
|
-
refresData(data) {
|
|
3178
|
-
const gridParams = store.get(this.code)
|
|
3179
|
-
gridParams.gridData = data
|
|
3180
|
-
store.set(this.code, gridParams)
|
|
3181
|
-
if (this.parentFormData) {
|
|
3182
|
-
this.parentFormData[this.code] = data
|
|
3183
|
-
}
|
|
3184
|
-
this['gridData'] = data
|
|
3185
|
-
},
|
|
3186
|
-
refresPortData(port, value, index) {
|
|
3187
|
-
if (this.gridData[index]) {
|
|
3188
|
-
this.gridData[index][port] = value
|
|
3189
|
-
this.$forceUpdate()
|
|
3190
|
-
}
|
|
3191
|
-
},
|
|
3192
|
-
|
|
3193
|
-
refresPortsData(entity, index) {
|
|
3194
|
-
if (entity) {
|
|
3195
|
-
for (const key in entity) {
|
|
3196
|
-
if (this.gridData[index]) {
|
|
3197
|
-
this.gridData[index][key] = entity[key]
|
|
3198
|
-
this.$forceUpdate()
|
|
3199
|
-
console.log('this.$forceUpdate()', this.$refs[key])
|
|
3200
|
-
}
|
|
3201
|
-
}
|
|
3202
|
-
// entity.forEach(item => {
|
|
3203
|
-
// if (this.gridData[index]) {
|
|
3204
|
-
// this.$set(this.gridData[index], item.prop, item.value)
|
|
3205
|
-
// }
|
|
3206
|
-
// })
|
|
3207
|
-
}
|
|
3208
|
-
},
|
|
3209
|
-
refresMainTableFields(map) {
|
|
3210
|
-
$emit(this, 'refresMainTableFields', map)
|
|
3211
|
-
},
|
|
3212
|
-
openFold(isOpen) {
|
|
3213
|
-
this.resizeTableHeight()
|
|
3214
|
-
},
|
|
3215
|
-
/**
|
|
3216
|
-
* 设置字段禁止编辑。只能控制禁止编辑。不能控制必填
|
|
3217
|
-
* @param entity 格式如:{'NAME':false,"DYM_COLUMN":true}。表示NAME字段不可编辑,DYM_COLUMN可以被编辑
|
|
3218
|
-
*/
|
|
3219
|
-
fnProhibitToEdit(entity) {
|
|
3220
|
-
if (entity) {
|
|
3221
|
-
if (entity.isForceUpdate) {
|
|
3222
|
-
this.$emit('fn-prohibit-to-edit', entity)
|
|
3223
|
-
this.$emit('prohibitToEdit', entity)
|
|
3224
|
-
}
|
|
3225
|
-
for (const key in entity) {
|
|
3226
|
-
// console.log('key', key)
|
|
3227
|
-
// console.log('this.$refs[key]', this.$refs)
|
|
3228
|
-
if (this.$refs[key]) {
|
|
3229
|
-
this.$nextTick(() => {
|
|
3230
|
-
this.$refs[key][0].fnProhibitToEdit(entity[key])
|
|
3231
|
-
})
|
|
3232
|
-
}
|
|
3233
|
-
}
|
|
3234
|
-
}
|
|
3235
|
-
},
|
|
3236
|
-
/**
|
|
3237
|
-
* 设置字段禁止编辑。只能控制禁止编辑。不能控制必填
|
|
3238
|
-
* @param entity 格式如:{'NAME':false,"DYM_COLUMN":true}。表示NAME字段不可编辑,DYM_COLUMN可以被编辑
|
|
3239
|
-
*/
|
|
3240
|
-
prohibitToEdit(entity) {
|
|
3241
|
-
console.log('我执行了 prohibitToEdit=================================》', entity)
|
|
3242
|
-
this.fnProhibitToEdit(entity)
|
|
3243
|
-
},
|
|
3244
|
-
// 树形结构时数据展示
|
|
3245
|
-
getTreeProps(parentProp, isSql, isLazy, dataSourceType) {
|
|
3246
|
-
let treeProps = {
|
|
3247
|
-
children: 'children',
|
|
3248
|
-
hasChildren: '_has_children'
|
|
3249
|
-
}
|
|
3250
|
-
if (parentProp) {
|
|
3251
|
-
treeProps = {
|
|
3252
|
-
children: 'children'
|
|
3253
|
-
}
|
|
3254
|
-
let hasChildren = 'hasChildren'
|
|
3255
|
-
if (isLazy) {
|
|
3256
|
-
if (isSql) {
|
|
3257
|
-
if (dataSourceType === 'oracle') {
|
|
3258
|
-
hasChildren = 'HAS_CHILDREN'
|
|
3259
|
-
} else {
|
|
3260
|
-
hasChildren = 'has_children'
|
|
3261
|
-
}
|
|
3262
|
-
}
|
|
3263
|
-
}
|
|
3264
|
-
treeProps.hasChildren = hasChildren
|
|
3265
|
-
}
|
|
3266
|
-
if (this.checkStrictly) {
|
|
3267
|
-
treeProps.checkStrictly = true
|
|
3268
|
-
}
|
|
3269
|
-
return treeProps
|
|
3270
|
-
},
|
|
3271
|
-
refreshSubTableData(data) {
|
|
3272
|
-
const gridParams = store.get(this.code)
|
|
3273
|
-
gridParams.subTableData = data
|
|
3274
|
-
store.set(this.code, gridParams)
|
|
3275
|
-
this['subTableData'] = data
|
|
3276
|
-
},
|
|
3277
|
-
refreshList() {
|
|
3278
|
-
this.fetchData(this.getSearchParam())
|
|
3279
|
-
},
|
|
3280
|
-
// 选择记录
|
|
3281
|
-
selectRecord(selection, row) {
|
|
3282
|
-
this.selectionTableData = row
|
|
3283
|
-
let selectRecordEventResult = true
|
|
3284
|
-
const gridParams = store.get(this.code)
|
|
3285
|
-
if (isHasOptionFunction('selectRecord', this.code)) {
|
|
3286
|
-
selectRecordEventResult = gridParams.options.selectRecord.call(this, {
|
|
3287
|
-
gridData: this.isSubTableShowPage ? this.subTableData : this.gridData,
|
|
3288
|
-
columns: gridParams.columns,
|
|
3289
|
-
superGrid: this.$refs.superGrid,
|
|
3290
|
-
pageGridData: this.isSubTableShowPage ? this.gridData : null,
|
|
3291
|
-
additionalParamMap: gridParams.additionalParamMap,
|
|
3292
|
-
selection: selection,
|
|
3293
|
-
row: row,
|
|
3294
|
-
parentFormData: this.parentFormData,
|
|
3295
|
-
pageContext: this.pageContext,
|
|
3296
|
-
configureObj: this.configureObj
|
|
3297
|
-
})
|
|
3298
|
-
if (selectRecordEventResult !== undefined && selectRecordEventResult === false) {
|
|
3299
|
-
// 最后选中的记录取消选中状态
|
|
3300
|
-
this.$refs.superGrid?.toggleRowSelection(row, false)
|
|
3301
|
-
}
|
|
3302
|
-
}
|
|
3303
|
-
this.select(selection, row)
|
|
3304
|
-
},
|
|
3305
|
-
// 取消选择记录
|
|
3306
|
-
selectAllRecord(selection) {
|
|
3307
|
-
let selectAllRecordsEventResult = true
|
|
3308
|
-
const gridParams = store.get(this.code)
|
|
3309
|
-
if (isHasOptionFunction('selectAllRecords', this.code)) {
|
|
3310
|
-
selectAllRecordsEventResult = gridParams.options.selectAllRecords.call(this, {
|
|
3311
|
-
gridData: this.isSubTableShowPage ? this.subTableData : this.gridData,
|
|
3312
|
-
columns: gridParams.columns,
|
|
3313
|
-
superGrid: this.$refs.superGrid,
|
|
3314
|
-
pageGridData: this.isSubTableShowPage ? this.gridData : null,
|
|
3315
|
-
additionalParamMap: gridParams.additionalParamMap,
|
|
3316
|
-
selection: selection,
|
|
3317
|
-
parentFormData: this.parentFormData,
|
|
3318
|
-
pageContext: this.pageContext,
|
|
3319
|
-
configureObj: this.configureObj
|
|
3320
|
-
})
|
|
3321
|
-
if (selectAllRecordsEventResult !== undefined && selectAllRecordsEventResult === false) {
|
|
3322
|
-
// 取消所有记录选中状态
|
|
3323
|
-
this.$refs.superGrid?.toggleAllSelection()
|
|
3324
|
-
}
|
|
3325
|
-
}
|
|
3326
|
-
this.selectAll(selection)
|
|
3327
|
-
},
|
|
3328
|
-
cardSelectionChangeEvent(newSelection) {
|
|
3329
|
-
try {
|
|
3330
|
-
this.$refs.superGrid?.clearSelection()
|
|
3331
|
-
for (const i in newSelection) {
|
|
3332
|
-
const row = newSelection[i]
|
|
3333
|
-
this.$refs.superGrid?.toggleRowSelection(row, true)
|
|
3334
|
-
}
|
|
3335
|
-
} catch (error) {
|
|
3336
|
-
console.error(error)
|
|
3337
|
-
}
|
|
3338
|
-
this.selectionChangeEvent(newSelection)
|
|
3339
|
-
},
|
|
3340
|
-
// 选择记录发生改变时
|
|
3341
|
-
selectionChangeEvent(newSelection) {
|
|
3342
|
-
this.selectionTableData = newSelection
|
|
3343
|
-
const gridParams = store.get(this.code)
|
|
3344
|
-
if (isHasOptionFunction('selectionChange', this.code)) {
|
|
3345
|
-
gridParams.options.selectionChange.call(this, {
|
|
3346
|
-
gridData: this.isSubTableShowPage ? this.subTableData : this.gridData,
|
|
3347
|
-
columns: gridParams.columns,
|
|
3348
|
-
superGrid: this.$refs.superGrid,
|
|
3349
|
-
pageGridData: this.isSubTableShowPage ? this.gridData : null,
|
|
3350
|
-
additionalParamMap: gridParams.additionalParamMap,
|
|
3351
|
-
selection: newSelection,
|
|
3352
|
-
parentFormData: this.parentFormData,
|
|
3353
|
-
pageContext: this.pageContext,
|
|
3354
|
-
configureObj: this.configureObj
|
|
3355
|
-
})
|
|
3356
|
-
// if(selectionChangeEventResult !== undefined && selectionChangeEventResult=== false){
|
|
3357
|
-
// // 最后选中的记录取消选中状态
|
|
3358
|
-
// this.$refs.superGrid?.toggleRowSelection(newSelection[newSelection.length - 1], false)
|
|
3359
|
-
// }
|
|
3360
|
-
}
|
|
3361
|
-
this.selectionChange(newSelection)
|
|
3362
|
-
},
|
|
3363
|
-
// 显示移动端查询区域
|
|
3364
|
-
showMobileSearch() {
|
|
3365
|
-
console.log('showMobileSearch-----this.isShowMobileSearch=', this.isShowMobileSearch, 'isMobile=', this.isMobile)
|
|
3366
|
-
this.isShowMobileSearch = true
|
|
3367
|
-
if (this.$refs.sf) {
|
|
3368
|
-
// 获得查询区高度
|
|
3369
|
-
this.$refs.sf.showMobileSearch()
|
|
3370
|
-
}
|
|
3371
|
-
},
|
|
3372
|
-
// 移动端选择文件结束
|
|
3373
|
-
pickFileDone(data) {
|
|
3374
|
-
console.log(
|
|
3375
|
-
'superPage5555---pickFileDone--data.componentId=',
|
|
3376
|
-
data.componentId,
|
|
3377
|
-
'data.listCode=',
|
|
3378
|
-
data.listCode,
|
|
3379
|
-
'data=',
|
|
3380
|
-
data
|
|
3381
|
-
)
|
|
3382
|
-
if (data && data.componentId) {
|
|
3383
|
-
eventBus.$emit(data.componentId + '-pickFileDone', data)
|
|
3384
|
-
}
|
|
3385
|
-
},
|
|
3386
|
-
// 移动端上传文件结束
|
|
3387
|
-
uploadFileDone(data) {
|
|
3388
|
-
if (data && data.componentId) {
|
|
3389
|
-
eventBus.$emit(data.componentId + '-uploadFileDone', data)
|
|
3390
|
-
}
|
|
3391
|
-
},
|
|
3392
|
-
// 移动端扫描结束
|
|
3393
|
-
scanDone(data) {
|
|
3394
|
-
if (data && data.componentId) {
|
|
3395
|
-
eventBus.$emit(data.componentId + '-scanDone', data)
|
|
3396
|
-
}
|
|
3397
|
-
},
|
|
3398
|
-
openRowForm(rowIndex) {
|
|
3399
|
-
this.currentEditRowIndex = rowIndex
|
|
3400
|
-
this.showRowForm = true
|
|
3401
|
-
},
|
|
3402
|
-
closeRowForm() {
|
|
3403
|
-
this.showRowForm = false
|
|
3404
|
-
},
|
|
3405
|
-
filterData() {
|
|
3406
|
-
const gridParams = store.get(this.code)
|
|
3407
|
-
const params = {
|
|
3408
|
-
pageContext: this.pageContext,
|
|
3409
|
-
configureObj: this.configureObj,
|
|
3410
|
-
gridData: this.gridData
|
|
3411
|
-
}
|
|
3412
|
-
return gridParams.options.filterDataEvent.call(this, params)
|
|
3413
|
-
},
|
|
3414
|
-
resetAdditionalParamMap(param, gridParams) {
|
|
3415
|
-
if (this.pageContext && this.pageContext.entity) {
|
|
3416
|
-
let additionalParamMap = JSON.parse(JSON.stringify(this.pageContext.entity.page))
|
|
3417
|
-
if (!additionalParamMap) {
|
|
3418
|
-
additionalParamMap = {}
|
|
3419
|
-
}
|
|
3420
|
-
const requestMap = this.pageContext.entity.request
|
|
3421
|
-
if (requestMap) {
|
|
3422
|
-
Object.assign(additionalParamMap, requestMap)
|
|
3423
|
-
}
|
|
3424
|
-
this.ensureAdditionalParamMap(param, additionalParamMap)
|
|
3425
|
-
this.ensureAdditionalParamMap(gridParams, additionalParamMap)
|
|
3426
|
-
}
|
|
3427
|
-
},
|
|
3428
|
-
ensureAdditionalParamMap(params, additionalParamMap) {
|
|
3429
|
-
if (params) {
|
|
3430
|
-
params.additionalParamMap = params.additionalParamMap || {}
|
|
3431
|
-
Object.assign(params.additionalParamMap, additionalParamMap)
|
|
3432
|
-
}
|
|
3433
|
-
},
|
|
3434
|
-
// 封装v10字段配置,key是数据库字段名(属性名),value是该字段的配置
|
|
3435
|
-
packageListColumnSetting() {
|
|
3436
|
-
// key是属性名,value是字段配置
|
|
3437
|
-
let colConfigureMap = {}
|
|
3438
|
-
if (this.configureObj) {
|
|
3439
|
-
const colItems = this.configureObj.items
|
|
3440
|
-
if (colItems) {
|
|
3441
|
-
colItems.forEach((colConfigure) => {
|
|
3442
|
-
const propName = this.getFormPropName(colConfigure.props.base.prop)
|
|
3443
|
-
if (propName) {
|
|
3444
|
-
colConfigureMap[propName] = colConfigure
|
|
3445
|
-
}
|
|
3446
|
-
})
|
|
3447
|
-
}
|
|
3448
|
-
}
|
|
3449
|
-
return colConfigureMap
|
|
3450
|
-
},
|
|
3451
|
-
// prop的格式是${data.MY_NAME}
|
|
3452
|
-
getFormPropName(prop) {
|
|
3453
|
-
if (prop && prop.indexOf('${') >= 0) {
|
|
3454
|
-
return prop.substring(prop.indexOf('.') + 1, prop.lastIndexOf('}'))
|
|
3455
|
-
} else {
|
|
3456
|
-
return prop
|
|
3457
|
-
}
|
|
3458
|
-
},
|
|
3459
|
-
getColumnComponentData(column, myCustomFormatter) {
|
|
3460
|
-
try {
|
|
3461
|
-
// if (!['[object Object]'].includes(Object.prototype.toString.call(column))) throw new Error('no column');
|
|
3462
|
-
const componentType = this.getComponentType(column)
|
|
3463
|
-
return {
|
|
3464
|
-
column,
|
|
3465
|
-
getComponentType: this.getComponentType,
|
|
3466
|
-
customFormat: myCustomFormatter,
|
|
3467
|
-
// props + attrs 参数
|
|
3468
|
-
$bind: {
|
|
3469
|
-
column,
|
|
3470
|
-
ref: column.prop,
|
|
3471
|
-
// 'is': componentType,
|
|
3472
|
-
'is-sql': this.isSql,
|
|
3473
|
-
'list-code': this.code,
|
|
3474
|
-
'new-width': this.newWidth,
|
|
3475
|
-
'drag-column-prop': this.dragColumnProp,
|
|
3476
|
-
'right-click-menu-arr': this.options?.rightClickMenuArr,
|
|
3477
|
-
'table-name': this.tableName,
|
|
3478
|
-
'page-code': this.pageCode,
|
|
3479
|
-
'list-name': this.listName,
|
|
3480
|
-
options: this.options,
|
|
3481
|
-
'current-page': this.currentPage,
|
|
3482
|
-
pagination: this.pagination,
|
|
3483
|
-
'is-data-children': this.tableDatas.some((d) => Array.isArray(d?.children)),
|
|
3484
|
-
'grid-data': this.isSubTableShowPage ? this.subTableData : this.gridData,
|
|
3485
|
-
'page-grid-data': this.isSubTableShowPage ? this.getSubTableGridData(this.subTableData) : this.gridData,
|
|
3486
|
-
...(myCustomFormatter
|
|
3487
|
-
? {
|
|
3488
|
-
'custom-format': ['GroupColumn'].includes(componentType)
|
|
3489
|
-
? myCustomFormatter
|
|
3490
|
-
: myCustomFormatter[column.prop]
|
|
3491
|
-
}
|
|
3492
|
-
: {
|
|
3493
|
-
'is-line-edit': this.lineEdit?.editable ?? false,
|
|
3494
|
-
'list-toolbar-form-data': this.listToolbarFormData
|
|
3495
|
-
})
|
|
3496
|
-
},
|
|
3497
|
-
// 事件绑定
|
|
3498
|
-
$on: {
|
|
3499
|
-
'open-page': this.openPageDialog,
|
|
3500
|
-
refresData: this.refresData,
|
|
3501
|
-
'refresh-list': this.refreshList,
|
|
3502
|
-
refresPortData: this.refresPortData,
|
|
3503
|
-
refresPortsData: this.refresPortsData,
|
|
3504
|
-
refresMainTableFields: this.refresMainTableFields,
|
|
3505
|
-
prohibitToEdit: this.prohibitToEdit,
|
|
3506
|
-
batchDeleteSubTableRow: this.batchDeleteSubTableRow
|
|
3507
|
-
}
|
|
3508
|
-
}
|
|
3509
|
-
} catch (error) {
|
|
3510
|
-
console.error(error)
|
|
3511
|
-
return {
|
|
3512
|
-
column
|
|
3513
|
-
}
|
|
3514
|
-
}
|
|
3515
|
-
},
|
|
3516
|
-
changeOperationAddState(state) {
|
|
3517
|
-
eventBus.$emit('change-add-state', state)
|
|
3518
|
-
},
|
|
3519
|
-
scrollTo(options, yCoord) {
|
|
3520
|
-
this.$refs.superGrid?.scrollTo(options, yCoord)
|
|
3521
|
-
},
|
|
3522
|
-
setScrollTop(top) {
|
|
3523
|
-
this.$refs.superGrid?.setScrollTop(top)
|
|
3524
|
-
},
|
|
3525
|
-
setScrollLeft(left) {
|
|
3526
|
-
this.$refs.superGrid?.setScrollLeft(left)
|
|
3527
|
-
},
|
|
3528
|
-
setScrollTopByRowIndex(rowIndex) {
|
|
3529
|
-
if (this.$refs.superGrid) {
|
|
3530
|
-
const theTableRows = this.$refs.superGrid.$el.querySelectorAll('.el-table__body tbody .el-table__row')
|
|
3531
|
-
let scrollTop = 0
|
|
3532
|
-
for (let i = 0; i < theTableRows.length; i++) {
|
|
3533
|
-
if (i === rowIndex) {
|
|
3534
|
-
break
|
|
3535
|
-
}
|
|
3536
|
-
scrollTop += theTableRows[i].offsetHeight
|
|
3537
|
-
}
|
|
3538
|
-
this.$refs.superGrid.setScrollTop(scrollTop)
|
|
3539
|
-
}
|
|
3540
|
-
},
|
|
3541
|
-
setCurrentRowIndex(rowIndex) {
|
|
3542
|
-
// 选中行
|
|
3543
|
-
this.$refs.superGrid.setCurrentRow(this.tableDatas[rowIndex])
|
|
3544
|
-
},
|
|
3545
|
-
getSuperGridRef() {
|
|
3546
|
-
return this
|
|
3547
|
-
},
|
|
3548
|
-
getSuperGridTableRef() {
|
|
3549
|
-
return this.$refs.superGrid
|
|
3550
|
-
},
|
|
3551
|
-
getColumns() {
|
|
3552
|
-
return this.columns
|
|
3553
|
-
},
|
|
3554
|
-
getTableData() {
|
|
3555
|
-
return this.tableDatas
|
|
3556
|
-
},
|
|
3557
|
-
handRowKeyToUpperCase(row) {
|
|
3558
|
-
// 把row对象的所有key都转成大写
|
|
3559
|
-
if (row) {
|
|
3560
|
-
const newRow = {}
|
|
3561
|
-
try {
|
|
3562
|
-
for (const key in row) {
|
|
3563
|
-
if (Object.prototype.hasOwnProperty.call(row, key)) {
|
|
3564
|
-
newRow[key.toUpperCase()] = row[key]
|
|
3565
|
-
}
|
|
3566
|
-
}
|
|
3567
|
-
} catch (error) {
|
|
3568
|
-
console.error('handRowKeyToUpperCase error:', error)
|
|
3569
|
-
return row
|
|
3570
|
-
}
|
|
3571
|
-
return newRow
|
|
3572
|
-
}
|
|
3573
|
-
},
|
|
3574
|
-
batchDeleteSubTableRow() {
|
|
3575
|
-
const selectRows = this.$refs.superGrid.getSelectionRows()
|
|
3576
|
-
this.batchDeleteSubTableRowApi(this.code, selectRows, this.getRowKeyProp)
|
|
3577
|
-
},
|
|
3578
|
-
getAiChatListData() {
|
|
3579
|
-
if (!this.isFormSubTable) {
|
|
3580
|
-
if (this.selectionTableData && this.selectionTableData.length > 0) {
|
|
3581
|
-
return this.formatListData(this.selectionTableData)
|
|
3582
|
-
} else {
|
|
3583
|
-
return this.formatListData(this.tableDatas)
|
|
3584
|
-
}
|
|
3585
|
-
} else {
|
|
3586
|
-
return this.formatListData(this.getSunTableListData())
|
|
3587
|
-
}
|
|
3588
|
-
},
|
|
3589
|
-
formatListData(data) {
|
|
3590
|
-
const result = []
|
|
3591
|
-
const visibleColumns = this.visibleColumns
|
|
3592
|
-
data.forEach((item) => {
|
|
3593
|
-
const formattedItem = {}
|
|
3594
|
-
Object.keys(item).forEach((key) => {
|
|
3595
|
-
const column = visibleColumns.find((col) => col.orgProp === key)
|
|
3596
|
-
if (column) {
|
|
3597
|
-
formattedItem[column.label] = item[key]
|
|
3598
|
-
}
|
|
3599
|
-
})
|
|
3600
|
-
result.push(formattedItem)
|
|
3601
|
-
})
|
|
3602
|
-
return result
|
|
3603
|
-
},
|
|
3604
|
-
rowDoFormat (column, value) {
|
|
3605
|
-
return doFormat(column, value)
|
|
3606
|
-
}
|
|
3607
|
-
},
|
|
3608
|
-
emits: [
|
|
3609
|
-
'change-grid-data',
|
|
3610
|
-
'change-rows-per-page',
|
|
3611
|
-
'set-select-options',
|
|
3612
|
-
'setSearchType',
|
|
3613
|
-
'sort-change',
|
|
3614
|
-
'changeHederWidth',
|
|
3615
|
-
'header-click',
|
|
3616
|
-
'un-edit',
|
|
3617
|
-
'refresMainTableFields',
|
|
3618
|
-
'refresh',
|
|
3619
|
-
'cancel-search',
|
|
3620
|
-
'changeOperationAddState'
|
|
3621
|
-
]
|
|
3622
|
-
}
|
|
3623
|
-
</script>
|
|
3624
|
-
|
|
3625
|
-
<style lang="scss" rel="stylesheet/scss" scoped>
|
|
3626
|
-
.grid-area {
|
|
3627
|
-
.elTable th {
|
|
3628
|
-
padding: 2px 0 !important;
|
|
3629
|
-
}
|
|
3630
|
-
.elTable td {
|
|
3631
|
-
padding: 2px 0 !important;
|
|
3632
|
-
}
|
|
3633
|
-
}
|
|
3634
|
-
.el-table ::v-deep {
|
|
3635
|
-
& > .el-table__inner-wrapper {
|
|
3636
|
-
height: 100% !important;
|
|
3637
|
-
}
|
|
3638
|
-
}
|
|
3639
|
-
|
|
3640
|
-
.flex-gap-15 {
|
|
3641
|
-
display: flex;
|
|
3642
|
-
gap: var(--layout-form-flex-gap, 15px);
|
|
3643
|
-
align-items: center;
|
|
3644
|
-
|
|
3645
|
-
& .el-button {
|
|
3646
|
-
margin: 0;
|
|
3647
|
-
& + .el-button {
|
|
3648
|
-
margin: 0;
|
|
3649
|
-
}
|
|
3650
|
-
}
|
|
3651
|
-
}
|
|
3652
|
-
|
|
3653
|
-
.super-grid-main-view ::v-deep {
|
|
3654
|
-
display: flex;
|
|
3655
|
-
flex-direction: column;
|
|
3656
|
-
align-items: stretch;
|
|
3657
|
-
max-width: 100%;
|
|
3658
|
-
gap: var(--super-grid-main-view-gap, 10px);
|
|
3659
|
-
|
|
3660
|
-
.super-grid-main-search-view {
|
|
3661
|
-
width: 100%;
|
|
3662
|
-
.grid-search-row {
|
|
3663
|
-
@extend .flex-gap-15;
|
|
3664
|
-
flex-wrap: wrap;
|
|
3665
|
-
width: 100%;
|
|
3666
|
-
}
|
|
3667
|
-
[load-complete-query] {
|
|
3668
|
-
@extend .flex-gap-15;
|
|
3669
|
-
flex-direction: column;
|
|
3670
|
-
}
|
|
3671
|
-
.el-row {
|
|
3672
|
-
@extend .flex-gap-15;
|
|
3673
|
-
flex-wrap: wrap;
|
|
3674
|
-
margin: 0;
|
|
3675
|
-
padding: 0;
|
|
3676
|
-
flex: 1 1 auto;
|
|
3677
|
-
width: 100%;
|
|
3678
|
-
align-items: self-start;
|
|
3679
|
-
|
|
3680
|
-
.el-col {
|
|
3681
|
-
@extend .flex-gap-15;
|
|
3682
|
-
padding: 0;
|
|
3683
|
-
flex: 1 1 calc((100% - var(--layout-form-flex-gap, 15px) * 2) / 3);
|
|
3684
|
-
max-width: calc((100% - var(--layout-form-flex-gap, 15px) * 2) / 3);
|
|
3685
|
-
|
|
3686
|
-
&.el-col-6 {
|
|
3687
|
-
flex: 1 1 calc((100% - var(--layout-form-flex-gap, 15px) * 3) / 4);
|
|
3688
|
-
max-width: calc((100% - var(--layout-form-flex-gap, 15px) * 3) / 4);
|
|
3689
|
-
}
|
|
3690
|
-
|
|
3691
|
-
&.el-col-8 {
|
|
3692
|
-
flex: 1 1 calc((100% - var(--layout-form-flex-gap, 15px) * 2) / 3);
|
|
3693
|
-
max-width: calc((100% - var(--layout-form-flex-gap, 15px) * 2) / 3);
|
|
3694
|
-
}
|
|
3695
|
-
|
|
3696
|
-
&.el-col-12 {
|
|
3697
|
-
flex: 1 1 calc((100% - var(--layout-form-flex-gap, 15px) * 1) / 2);
|
|
3698
|
-
max-width: calc((100% - var(--layout-form-flex-gap, 15px) * 1) / 2);
|
|
3699
|
-
}
|
|
3700
|
-
|
|
3701
|
-
.el-form-item {
|
|
3702
|
-
width: 100%;
|
|
3703
|
-
align-items: center;
|
|
3704
|
-
|
|
3705
|
-
.el-form-item__label {
|
|
3706
|
-
display: block;
|
|
3707
|
-
width: 82px;
|
|
3708
|
-
height: auto;
|
|
3709
|
-
line-height: 1.2em;
|
|
3710
|
-
word-wrap: break-word !important;
|
|
3711
|
-
max-height: 2.4em;
|
|
3712
|
-
text-align: left;
|
|
3713
|
-
word-break: normal;
|
|
3714
|
-
white-space: normal;
|
|
3715
|
-
}
|
|
3716
|
-
|
|
3717
|
-
& > .el-form-item__content {
|
|
3718
|
-
& > .el-select,
|
|
3719
|
-
& > .el-input,
|
|
3720
|
-
& > .el-textarea {
|
|
3721
|
-
width: calc(100% - 1px);
|
|
3722
|
-
}
|
|
3723
|
-
}
|
|
3724
|
-
}
|
|
3725
|
-
|
|
3726
|
-
&.search-btns-view {
|
|
3727
|
-
&:not(.no-show-open) {
|
|
3728
|
-
margin-left: auto;
|
|
3729
|
-
margin-top: auto;
|
|
3730
|
-
max-width: none;
|
|
3731
|
-
}
|
|
3732
|
-
|
|
3733
|
-
&.no-search-button-auto {
|
|
3734
|
-
.search-button {
|
|
3735
|
-
margin-left: var(--layout-form-flex-gap, 15px);
|
|
3736
|
-
margin-top: 0;
|
|
3737
|
-
margin-right: auto;
|
|
3738
|
-
}
|
|
3739
|
-
}
|
|
3740
|
-
}
|
|
3741
|
-
}
|
|
3742
|
-
}
|
|
3743
|
-
|
|
3744
|
-
.search-button {
|
|
3745
|
-
@extend .flex-gap-15;
|
|
3746
|
-
gap: var(--super-grid-main-btn-view-gap, 10px);
|
|
3747
|
-
margin-left: auto;
|
|
3748
|
-
margin-top: auto;
|
|
3749
|
-
}
|
|
3750
|
-
}
|
|
3751
|
-
.el-table {
|
|
3752
|
-
.el-scrollbar__bar {
|
|
3753
|
-
&.is-horizontal {
|
|
3754
|
-
height: 8px;
|
|
3755
|
-
transition: top 0.2s ease, bottom 0.2s ease;
|
|
3756
|
-
}
|
|
3757
|
-
&.is-vertical {
|
|
3758
|
-
width: 8px;
|
|
3759
|
-
}
|
|
3760
|
-
}
|
|
3761
|
-
|
|
3762
|
-
// 当表格底部被遮挡时,滚动条显示在顶部
|
|
3763
|
-
.el-table__body-wrapper.scrollbar-on-top {
|
|
3764
|
-
.el-scrollbar {
|
|
3765
|
-
display: flex;
|
|
3766
|
-
flex-direction: column-reverse;
|
|
3767
|
-
|
|
3768
|
-
.el-scrollbar__wrap {
|
|
3769
|
-
flex: 1;
|
|
3770
|
-
}
|
|
3771
|
-
|
|
3772
|
-
.el-scrollbar__bar.is-horizontal {
|
|
3773
|
-
top: 0;
|
|
3774
|
-
bottom: auto;
|
|
3775
|
-
}
|
|
3776
|
-
}
|
|
3777
|
-
}
|
|
3778
|
-
}
|
|
3779
|
-
.super-grid-main-body {
|
|
3780
|
-
width: 100%;
|
|
3781
|
-
display: flex;
|
|
3782
|
-
flex-wrap: wrap;
|
|
3783
|
-
align-items: stretch;
|
|
3784
|
-
max-width: 100%;
|
|
3785
|
-
flex: 1 1 auto;
|
|
3786
|
-
gap: var(--super-grid-main-view-gap, 10px);
|
|
3787
|
-
|
|
3788
|
-
.super-grid-main-table-view {
|
|
3789
|
-
flex-grow: 1;
|
|
3790
|
-
flex-shrink: 1;
|
|
3791
|
-
flex-basis: auto;
|
|
3792
|
-
}
|
|
3793
|
-
|
|
3794
|
-
.super-grid-main-card-view {
|
|
3795
|
-
width: 100%;
|
|
3796
|
-
max-width: 100%;
|
|
3797
|
-
}
|
|
3798
|
-
.super-grid-main-table-footer-view {
|
|
3799
|
-
position: relative;
|
|
3800
|
-
display: flex;
|
|
3801
|
-
justify-content: space-between;
|
|
3802
|
-
align-items: center;
|
|
3803
|
-
flex-wrap: wrap;
|
|
3804
|
-
gap: var(--super-grid-main-view-gap, 10px);
|
|
3805
|
-
width: 100%;
|
|
3806
|
-
|
|
3807
|
-
.el-pagination {
|
|
3808
|
-
flex-wrap: wrap;
|
|
3809
|
-
gap: var(--layout-form-flex-gap, 15px) 0;
|
|
3810
|
-
}
|
|
3811
|
-
}
|
|
3812
|
-
}
|
|
3813
|
-
}
|
|
3814
|
-
</style>
|