aldehyde 0.2.19 → 0.2.21
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/lib/controls/action/index.d.ts +50 -50
- package/lib/controls/action/index.d.ts.map +1 -1
- package/lib/controls/action/index.js +187 -187
- package/lib/controls/action/index.js.map +1 -1
- package/lib/controls/action/utils.d.ts +8 -8
- package/lib/controls/action/utils.js +109 -109
- package/lib/controls/auto-complete/index.d.ts +6 -6
- package/lib/controls/auto-complete/index.js +51 -51
- package/lib/controls/cascader/index.d.ts +22 -22
- package/lib/controls/cascader/index.d.ts.map +1 -1
- package/lib/controls/cascader/index.js +107 -106
- package/lib/controls/cascader/index.js.map +1 -1
- package/lib/controls/chemstruc/graph.d.ts +28 -28
- package/lib/controls/chemstruc/graph.d.ts.map +1 -1
- package/lib/controls/chemstruc/graph.js +120 -119
- package/lib/controls/chemstruc/graph.js.map +1 -1
- package/lib/controls/code-editor/sql-code-editor.d.ts +14 -14
- package/lib/controls/code-editor/sql-code-editor.js +52 -51
- package/lib/controls/code-editor/sql-code-editor.js.map +1 -1
- package/lib/controls/collapse-card/index.d.ts +19 -19
- package/lib/controls/collapse-card/index.d.ts.map +1 -1
- package/lib/controls/collapse-card/index.js +62 -62
- package/lib/controls/color-picker/index.d.ts +18 -18
- package/lib/controls/color-picker/index.d.ts.map +1 -1
- package/lib/controls/color-picker/index.js +59 -59
- package/lib/controls/counting-tag/index.d.ts +17 -17
- package/lib/controls/counting-tag/index.js +31 -30
- package/lib/controls/counting-tag/index.js.map +1 -1
- package/lib/controls/cquery/cquick-button.d.ts +23 -23
- package/lib/controls/cquery/cquick-button.d.ts.map +1 -1
- package/lib/controls/cquery/cquick-button.js +72 -72
- package/lib/controls/cquery/cquick-button.js.map +1 -1
- package/lib/controls/date-picker/index.d.ts +6 -6
- package/lib/controls/date-picker/index.js +83 -83
- package/lib/controls/entity-select/entity-select.d.ts +73 -73
- package/lib/controls/entity-select/entity-select.d.ts.map +1 -1
- package/lib/controls/entity-select/entity-select.js +427 -423
- package/lib/controls/entity-select/entity-select.js.map +1 -1
- package/lib/controls/entity-select/lab-tree-select.d.ts +24 -24
- package/lib/controls/entity-select/lab-tree-select.d.ts.map +1 -1
- package/lib/controls/entity-select/lab-tree-select.js +121 -120
- package/lib/controls/entity-select/lab-tree-select.js.map +1 -1
- package/lib/controls/entity-select/popover-entity-select.d.ts +19 -19
- package/lib/controls/entity-select/popover-entity-select.js +92 -91
- package/lib/controls/entity-select/popover-entity-select.js.map +1 -1
- package/lib/controls/entry-control.d.ts +12 -12
- package/lib/controls/entry-control.js +202 -202
- package/lib/controls/enum-badge/index.d.ts +6 -6
- package/lib/controls/enum-badge/index.js +13 -13
- package/lib/controls/enum-tag/index.d.ts +6 -6
- package/lib/controls/enum-tag/index.js +23 -23
- package/lib/controls/file-view/drawer-file-view.d.ts +21 -21
- package/lib/controls/file-view/drawer-file-view.d.ts.map +1 -1
- package/lib/controls/file-view/drawer-file-view.js +56 -55
- package/lib/controls/file-view/drawer-file-view.js.map +1 -1
- package/lib/controls/file-view/index.d.ts +27 -27
- package/lib/controls/file-view/index.d.ts.map +1 -1
- package/lib/controls/file-view/index.js +135 -134
- package/lib/controls/file-view/index.js.map +1 -1
- package/lib/controls/html-editor/draft.d.ts +21 -21
- package/lib/controls/html-editor/draft.d.ts.map +1 -1
- package/lib/controls/html-editor/draft.js +121 -121
- package/lib/controls/html-editor/draft.js.map +1 -1
- package/lib/controls/html-editor/tinymce.d.ts +12 -7
- package/lib/controls/html-editor/tinymce.d.ts.map +1 -1
- package/lib/controls/html-editor/tinymce.js +44 -43
- package/lib/controls/html-editor/tinymce.js.map +1 -1
- package/lib/controls/input-number/index.d.ts +6 -6
- package/lib/controls/input-number/index.js +68 -68
- package/lib/controls/input-range/index.d.ts +6 -6
- package/lib/controls/input-range/index.js +27 -27
- package/lib/controls/password-setter/index.d.ts +8 -7
- package/lib/controls/password-setter/index.d.ts.map +1 -1
- package/lib/controls/password-setter/index.js +50 -50
- package/lib/controls/progress/index.d.ts +6 -6
- package/lib/controls/progress/index.js +44 -44
- package/lib/controls/relation-existion/index.d.ts +19 -19
- package/lib/controls/relation-existion/index.d.ts.map +1 -1
- package/lib/controls/relation-existion/index.js +74 -74
- package/lib/controls/rfield/index.d.ts +28 -28
- package/lib/controls/rfield/index.d.ts.map +1 -1
- package/lib/controls/rfield/index.js +130 -130
- package/lib/controls/signature/index.d.ts +30 -30
- package/lib/controls/signature/index.d.ts.map +1 -1
- package/lib/controls/signature/index.js +129 -128
- package/lib/controls/signature/index.js.map +1 -1
- package/lib/controls/steps/index.d.ts +6 -6
- package/lib/controls/steps/index.js +41 -41
- package/lib/controls/text/ellipsis-text.d.ts +21 -21
- package/lib/controls/text/ellipsis-text.js +46 -45
- package/lib/controls/text/ellipsis-text.js.map +1 -1
- package/lib/controls/upload/index.d.ts +14 -14
- package/lib/controls/upload/index.js +99 -99
- package/lib/controls/view-control.d.ts +9 -9
- package/lib/controls/view-control.js +174 -174
- package/lib/custom-page/custom-page-router.d.ts +7 -22
- package/lib/custom-page/custom-page-router.d.ts.map +1 -1
- package/lib/custom-page/custom-page-router.js +66 -64
- package/lib/custom-page/custom-page-router.js.map +1 -1
- package/lib/custom-page/def-custom-page.d.ts +6 -5
- package/lib/custom-page/def-custom-page.d.ts.map +1 -1
- package/lib/custom-page/def-custom-page.js +13 -13
- package/lib/custom-page/dtmpl-custom-edit-modal-page.d.ts +42 -42
- package/lib/custom-page/dtmpl-custom-edit-modal-page.js +35 -34
- package/lib/custom-page/dtmpl-custom-edit-modal-page.js.map +1 -1
- package/lib/detail/button/cquery-button-bar.d.ts +15 -15
- package/lib/detail/button/cquery-button-bar.js +74 -74
- package/lib/detail/button/submit-button-bar.d.ts +18 -18
- package/lib/detail/button/submit-button-bar.d.ts.map +1 -1
- package/lib/detail/button/submit-button-bar.js +103 -104
- package/lib/detail/button/submit-button-bar.js.map +1 -1
- package/lib/detail/edit/dtmpl-edit.d.ts +47 -47
- package/lib/detail/edit/dtmpl-edit.d.ts.map +1 -1
- package/lib/detail/edit/dtmpl-edit.js +197 -196
- package/lib/detail/edit/dtmpl-edit.js.map +1 -1
- package/lib/detail/edit/fields-edit-card.d.ts +38 -38
- package/lib/detail/edit/fields-edit-card.js +64 -63
- package/lib/detail/edit/fields-edit-card.js.map +1 -1
- package/lib/detail/edit/modal-row-edit.d.ts +30 -30
- package/lib/detail/edit/modal-row-edit.js +56 -55
- package/lib/detail/edit/modal-row-edit.js.map +1 -1
- package/lib/detail/edit/post-result/index.d.ts +16 -16
- package/lib/detail/edit/post-result/index.js +27 -27
- package/lib/detail/edit/row-edit-card.d.ts +41 -41
- package/lib/detail/edit/row-edit-card.d.ts.map +1 -1
- package/lib/detail/edit/row-edit-card.js +84 -83
- package/lib/detail/edit/row-edit-card.js.map +1 -1
- package/lib/detail/edit/row-editor.d.ts +32 -32
- package/lib/detail/edit/row-editor.d.ts.map +1 -1
- package/lib/detail/edit/row-editor.js +56 -55
- package/lib/detail/edit/row-editor.js.map +1 -1
- package/lib/detail/rightbar/index.d.ts +19 -19
- package/lib/detail/rightbar/index.js +51 -50
- package/lib/detail/rightbar/index.js.map +1 -1
- package/lib/detail/view/act-dtmpl-view.d.ts +43 -43
- package/lib/detail/view/act-dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/act-dtmpl-view.js +96 -96
- package/lib/detail/view/act-dtmpl-view.js.map +1 -1
- package/lib/detail/view/dtmpl-view.d.ts +41 -41
- package/lib/detail/view/dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/dtmpl-view.js +115 -115
- package/lib/detail/view/dtmpl-view.js.map +1 -1
- package/lib/detail/view/field-view-group.d.ts +16 -16
- package/lib/detail/view/field-view-group.js +50 -50
- package/lib/detail/view/modal-dtmpl-view.d.ts +27 -27
- package/lib/detail/view/modal-dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/modal-dtmpl-view.js +32 -31
- package/lib/detail/view/modal-dtmpl-view.js.map +1 -1
- package/lib/detail/view/snapshot-timeline.d.ts +31 -31
- package/lib/detail/view/snapshot-timeline.d.ts.map +1 -1
- package/lib/detail/view/snapshot-timeline.js +89 -89
- package/lib/detail/view/snapshot-timeline.js.map +1 -1
- package/lib/exportor/export-frame.d.ts +49 -49
- package/lib/exportor/export-frame.d.ts.map +1 -1
- package/lib/exportor/export-frame.js +142 -141
- package/lib/exportor/export-frame.js.map +1 -1
- package/lib/exportor/index.d.ts +15 -15
- package/lib/exportor/index.js +43 -43
- package/lib/form/criteria-form.d.ts +19 -19
- package/lib/form/criteria-form.js +147 -147
- package/lib/form/dtmpl-form.d.ts +44 -44
- package/lib/form/dtmpl-form.d.ts.map +1 -1
- package/lib/form/dtmpl-form.js +204 -203
- package/lib/form/dtmpl-form.js.map +1 -1
- package/lib/form/field-group-form.d.ts +20 -20
- package/lib/form/field-group-form.js +57 -57
- package/lib/form/fields-form.d.ts +19 -19
- package/lib/form/fields-form.js +31 -31
- package/lib/form/form-Item-group.d.ts +29 -29
- package/lib/form/form-Item-group.d.ts.map +1 -1
- package/lib/form/form-Item-group.js +108 -107
- package/lib/form/form-Item-group.js.map +1 -1
- package/lib/icon/index.d.ts +10 -10
- package/lib/icon/index.js +21 -21
- package/lib/import/excel-import.d.ts +47 -47
- package/lib/import/excel-import.d.ts.map +1 -1
- package/lib/import/excel-import.js +234 -234
- package/lib/import/template-builder.d.ts +28 -20
- package/lib/import/template-builder.d.ts.map +1 -1
- package/lib/import/template-builder.js +425 -425
- package/lib/index.d.ts +41 -40
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +79 -78
- package/lib/index.js.map +1 -1
- package/lib/layout/MainPage.d.ts +4 -33
- package/lib/layout/MainPage.d.ts.map +1 -1
- package/lib/layout/MainPage.js +204 -204
- package/lib/layout/MainPage.js.map +1 -1
- package/lib/layout/footer/index.d.ts +6 -5
- package/lib/layout/footer/index.d.ts.map +1 -1
- package/lib/layout/footer/index.js +10 -10
- package/lib/layout/header/index.d.ts +14 -14
- package/lib/layout/header/index.js +35 -35
- package/lib/layout/menu/block.d.ts +16 -8
- package/lib/layout/menu/block.d.ts.map +1 -1
- package/lib/layout/menu/block.js +46 -47
- package/lib/layout/menu/block.js.map +1 -1
- package/lib/layout/menu/l2menu-message-bar.d.ts +23 -23
- package/lib/layout/menu/l2menu-message-bar.d.ts.map +1 -1
- package/lib/layout/menu/l2menu-message-bar.js +96 -96
- package/lib/layout/menu/l2menu-quick-bar.d.ts +29 -29
- package/lib/layout/menu/l2menu-quick-bar.d.ts.map +1 -1
- package/lib/layout/menu/l2menu-quick-bar.js +93 -93
- package/lib/layout/menu/menu-2layers.d.ts +13 -2
- package/lib/layout/menu/menu-2layers.d.ts.map +1 -1
- package/lib/layout/menu/menu-2layers.js +69 -70
- package/lib/layout/menu/menu-2layers.js.map +1 -1
- package/lib/layout/menu/menu-render.d.ts +8 -8
- package/lib/layout/menu/menu-render.js +74 -74
- package/lib/layout/menu/reset-password.d.ts +24 -24
- package/lib/layout/menu/reset-password.d.ts.map +1 -1
- package/lib/layout/menu/reset-password.js +113 -113
- package/lib/layout/menu/user-bar.d.ts +22 -22
- package/lib/layout/menu/user-bar.js +99 -99
- package/lib/layout/menu/userinfo-bar.d.ts +16 -16
- package/lib/layout/menu/userinfo-bar.d.ts.map +1 -1
- package/lib/layout/menu/userinfo-bar.js +43 -43
- package/lib/layout/sidebar/index.d.ts +11 -11
- package/lib/layout/sidebar/index.js +17 -17
- package/lib/login/context-setter.d.ts +23 -23
- package/lib/login/context-setter.d.ts.map +1 -1
- package/lib/login/context-setter.js +97 -97
- package/lib/login/context-setter.js.map +1 -1
- package/lib/login/login-context.d.ts +21 -10
- package/lib/login/login-context.d.ts.map +1 -1
- package/lib/login/login-context.js +126 -126
- package/lib/login/login.d.ts +2 -10
- package/lib/login/login.d.ts.map +1 -1
- package/lib/login/login.js +105 -101
- package/lib/login/login.js.map +1 -1
- package/lib/module/dtmpl-edit-card.d.ts +42 -42
- package/lib/module/dtmpl-edit-card.d.ts.map +1 -1
- package/lib/module/dtmpl-edit-card.js +162 -162
- package/lib/module/dtmpl-edit-card.js.map +1 -1
- package/lib/module/dtmpl-edit-drawer.d.ts +16 -16
- package/lib/module/dtmpl-edit-drawer.js +7 -7
- package/lib/module/dtmpl-edit-modal.d.ts +17 -17
- package/lib/module/dtmpl-edit-modal.js +7 -7
- package/lib/module/dtmpl-edit-page.d.ts +59 -59
- package/lib/module/dtmpl-edit-page.d.ts.map +1 -1
- package/lib/module/dtmpl-edit-page.js +191 -191
- package/lib/module/dtmpl-edit-page.js.map +1 -1
- package/lib/module/dtmpl-editor.d.ts +38 -38
- package/lib/module/dtmpl-editor.d.ts.map +1 -1
- package/lib/module/dtmpl-editor.js +146 -145
- package/lib/module/dtmpl-editor.js.map +1 -1
- package/lib/module/dtmpl-view-card.d.ts +18 -18
- package/lib/module/dtmpl-view-card.d.ts.map +1 -1
- package/lib/module/dtmpl-view-card.js +45 -45
- package/lib/module/dtmpl-view-drawer.d.ts +26 -26
- package/lib/module/dtmpl-view-drawer.js +39 -39
- package/lib/module/dtmpl-view-drawer.js.map +1 -1
- package/lib/module/dtmpl-view-modal.d.ts +27 -27
- package/lib/module/dtmpl-view-modal.js +35 -35
- package/lib/module/dtmpl-view-modal.js.map +1 -1
- package/lib/module/ltmpl-drawer.d.ts +28 -28
- package/lib/module/ltmpl-drawer.js +37 -36
- package/lib/module/ltmpl-drawer.js.map +1 -1
- package/lib/module/ltmpl-modal.d.ts +28 -28
- package/lib/module/ltmpl-modal.js +36 -35
- package/lib/module/ltmpl-modal.js.map +1 -1
- package/lib/module/ltmpl-table.d.ts +61 -56
- package/lib/module/ltmpl-table.d.ts.map +1 -1
- package/lib/module/ltmpl-table.js +217 -210
- package/lib/module/ltmpl-table.js.map +1 -1
- package/lib/routable/dtmpl-route.d.ts +9 -30
- package/lib/routable/dtmpl-route.d.ts.map +1 -1
- package/lib/routable/dtmpl-route.js +151 -154
- package/lib/routable/dtmpl-route.js.map +1 -1
- package/lib/routable/import-route.d.ts +5 -12
- package/lib/routable/import-route.d.ts.map +1 -1
- package/lib/routable/import-route.js +29 -28
- package/lib/routable/import-route.js.map +1 -1
- package/lib/routable/ltmpl-route.d.ts +10 -28
- package/lib/routable/ltmpl-route.d.ts.map +1 -1
- package/lib/routable/ltmpl-route.js +188 -169
- package/lib/routable/ltmpl-route.js.map +1 -1
- package/lib/routable/withroute.d.ts +3 -0
- package/lib/routable/withroute.d.ts.map +1 -0
- package/lib/routable/withroute.js +11 -0
- package/lib/routable/withroute.js.map +1 -0
- package/lib/table/act-table.d.ts +90 -89
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/act-table.js +529 -532
- package/lib/table/act-table.js.map +1 -1
- package/lib/table/column/column-selector.d.ts +24 -24
- package/lib/table/column/column-selector.js +59 -59
- package/lib/table/column/column-selector.js.map +1 -1
- package/lib/table/l2-act-table.d.ts +27 -22
- package/lib/table/l2-act-table.d.ts.map +1 -1
- package/lib/table/l2-act-table.js +86 -79
- package/lib/table/l2-act-table.js.map +1 -1
- package/lib/table/modal-select-table.d.ts +46 -41
- package/lib/table/modal-select-table.d.ts.map +1 -1
- package/lib/table/modal-select-table.js +215 -207
- package/lib/table/modal-select-table.js.map +1 -1
- package/lib/table/pagination.d.ts +16 -16
- package/lib/table/pagination.d.ts.map +1 -1
- package/lib/table/pagination.js +39 -39
- package/lib/table/pagination.js.map +1 -1
- package/lib/table/query-table.d.ts +73 -64
- package/lib/table/query-table.d.ts.map +1 -1
- package/lib/table/query-table.js +264 -256
- package/lib/table/query-table.js.map +1 -1
- package/lib/table/relation-table.d.ts +64 -64
- package/lib/table/relation-table.d.ts.map +1 -1
- package/lib/table/relation-table.js +425 -425
- package/lib/table/relation-table.js.map +1 -1
- package/lib/table/select-table.d.ts +45 -40
- package/lib/table/select-table.d.ts.map +1 -1
- package/lib/table/select-table.js +226 -220
- package/lib/table/select-table.js.map +1 -1
- package/lib/table/selected-rows-card.d.ts +15 -15
- package/lib/table/selected-rows-card.js +46 -46
- package/lib/table/stat/restat.d.ts +25 -25
- package/lib/table/stat/restat.d.ts.map +1 -1
- package/lib/table/stat/restat.js +60 -60
- package/lib/table/stat/restat.js.map +1 -1
- package/lib/table/table-util.d.ts +4 -4
- package/lib/table/table-util.js +25 -25
- package/lib/tmpl/control-type-supportor.d.ts +8 -8
- package/lib/tmpl/control-type-supportor.js +98 -98
- package/lib/tmpl/hc-data-source.d.ts +25 -25
- package/lib/tmpl/hc-data-source.js +331 -331
- package/lib/tmpl/hcservice-v3.d.ts +77 -76
- package/lib/tmpl/hcservice-v3.d.ts.map +1 -1
- package/lib/tmpl/hcservice-v3.js +803 -787
- package/lib/tmpl/hcservice-v3.js.map +1 -1
- package/lib/tmpl/interface.d.ts +272 -269
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tmpl/interface.js +3 -3
- package/lib/tmpl/interface.js.map +1 -1
- package/lib/tmpl/superagent.d.ts +9 -9
- package/lib/tmpl/superagent.js +142 -142
- package/lib/tmpl/tmpl-config-analysis.d.ts +6 -6
- package/lib/tmpl/tmpl-config-analysis.js +106 -106
- package/lib/units/EncryptUtils.d.ts +6 -6
- package/lib/units/EncryptUtils.js +30 -29
- package/lib/units/EncryptUtils.js.map +1 -1
- package/lib/units/index.d.ts +80 -81
- package/lib/units/index.d.ts.map +1 -1
- package/lib/units/index.js +747 -742
- package/lib/units/index.js.map +1 -1
- package/lib/units/storage.d.ts +2 -2
- package/lib/units/storage.js +1 -1
- package/lib/welcome/HCWelcome.d.ts +17 -13
- package/lib/welcome/HCWelcome.d.ts.map +1 -1
- package/lib/welcome/HCWelcome.js +199 -198
- package/lib/welcome/HCWelcome.js.map +1 -1
- package/lib/welcome/quick-entrance.d.ts +19 -19
- package/lib/welcome/quick-entrance.d.ts.map +1 -1
- package/lib/welcome/quick-entrance.js +78 -78
- package/lib/welcome/workbench.d.ts +19 -19
- package/lib/welcome/workbench.d.ts.map +1 -1
- package/lib/welcome/workbench.js +77 -77
- package/package.json +10 -10
- package/src/aldehyde/controls/action/index.tsx +2 -3
- package/src/aldehyde/controls/cascader/index.tsx +1 -1
- package/src/aldehyde/controls/chemstruc/graph.tsx +2 -2
- package/src/aldehyde/controls/collapse-card/index.tsx +1 -1
- package/src/aldehyde/controls/color-picker/index.tsx +1 -1
- package/src/aldehyde/controls/cquery/cquick-button.tsx +1 -1
- package/src/aldehyde/controls/entity-select/entity-select.tsx +17 -20
- package/src/aldehyde/controls/entity-select/lab-tree-select.tsx +1 -1
- package/src/aldehyde/controls/file-view/drawer-file-view.tsx +1 -1
- package/src/aldehyde/controls/file-view/index.tsx +1 -1
- package/src/aldehyde/controls/html-editor/draft.tsx +2 -2
- package/src/aldehyde/controls/relation-existion/index.tsx +1 -1
- package/src/aldehyde/controls/rfield/index.tsx +4 -4
- package/src/aldehyde/controls/signature/index.tsx +3 -3
- package/src/aldehyde/custom-page/custom-page-router.tsx +18 -15
- package/src/aldehyde/detail/button/submit-button-bar.tsx +1 -2
- package/src/aldehyde/detail/edit/dtmpl-edit.tsx +11 -11
- package/src/aldehyde/detail/edit/row-edit-card.tsx +1 -1
- package/src/aldehyde/detail/edit/row-editor.tsx +1 -1
- package/src/aldehyde/detail/view/act-dtmpl-view.tsx +6 -6
- package/src/aldehyde/detail/view/dtmpl-view.tsx +4 -4
- package/src/aldehyde/detail/view/modal-dtmpl-view.tsx +0 -2
- package/src/aldehyde/detail/view/snapshot-timeline.tsx +2 -2
- package/src/aldehyde/exportor/export-frame.tsx +11 -11
- package/src/aldehyde/form/dtmpl-form.tsx +3 -3
- package/src/aldehyde/form/form-Item-group.tsx +1 -1
- package/src/aldehyde/import/excel-import.tsx +11 -11
- package/src/aldehyde/index.tsx +4 -2
- package/src/aldehyde/layout/MainPage.tsx +17 -19
- package/src/aldehyde/layout/menu/block.tsx +3 -3
- package/src/aldehyde/layout/menu/l2menu-message-bar.tsx +3 -3
- package/src/aldehyde/layout/menu/l2menu-quick-bar.tsx +4 -4
- package/src/aldehyde/layout/menu/menu-2layers.tsx +3 -4
- package/src/aldehyde/layout/menu/menu-render.tsx +1 -1
- package/src/aldehyde/layout/menu/reset-password.tsx +3 -3
- package/src/aldehyde/layout/menu/userinfo-bar.tsx +1 -1
- package/src/aldehyde/login/context-setter.tsx +3 -3
- package/src/aldehyde/login/login.js +9 -2
- package/src/aldehyde/module/dtmpl-edit-card.tsx +8 -8
- package/src/aldehyde/module/dtmpl-edit-page.tsx +8 -8
- package/src/aldehyde/module/dtmpl-editor.tsx +5 -5
- package/src/aldehyde/module/dtmpl-view-card.tsx +1 -1
- package/src/aldehyde/module/ltmpl-table.tsx +22 -11
- package/src/aldehyde/routable/dtmpl-route.tsx +32 -34
- package/src/aldehyde/routable/import-route.tsx +4 -3
- package/src/aldehyde/routable/ltmpl-route.tsx +100 -75
- package/src/aldehyde/routable/withroute.tsx +22 -0
- package/src/aldehyde/table/act-table.tsx +31 -32
- package/src/aldehyde/table/l2-act-table.tsx +15 -8
- package/src/aldehyde/table/modal-select-table.tsx +22 -12
- package/src/aldehyde/table/pagination.tsx +3 -4
- package/src/aldehyde/table/query-table.tsx +63 -51
- package/src/aldehyde/table/relation-table.tsx +9 -9
- package/src/aldehyde/table/select-table.tsx +22 -10
- package/src/aldehyde/table/stat/restat.tsx +2 -2
- package/src/aldehyde/tmpl/hcservice-v3.tsx +15 -0
- package/src/aldehyde/tmpl/interface.tsx +5 -1
- package/src/aldehyde/units/index.tsx +18 -13
- package/src/aldehyde/welcome/quick-entrance.tsx +1 -1
- package/src/aldehyde/welcome/workbench.tsx +1 -1
|
@@ -61,6 +61,9 @@ const defaultDisabledColIds: string[] = ['20000', '10000']
|
|
|
61
61
|
|
|
62
62
|
interface ActTableProps extends TmplBaseProps {
|
|
63
63
|
criteriaData: object,
|
|
64
|
+
pageNo:number,
|
|
65
|
+
pageSize:number,
|
|
66
|
+
onChangePage:(pageNo:number,pageSize:number)=>void,
|
|
64
67
|
ltmplConfig: LtmplConfig,
|
|
65
68
|
menuId?: string,
|
|
66
69
|
showView?: (code: string, toCustomPage?: boolean) => void,
|
|
@@ -77,20 +80,19 @@ interface ActTableProps extends TmplBaseProps {
|
|
|
77
80
|
};
|
|
78
81
|
|
|
79
82
|
interface ActTableStat {
|
|
80
|
-
tableColumns
|
|
81
|
-
sortedColConfigs
|
|
82
|
-
queryKey
|
|
83
|
-
loading
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
selectedDatas: DtmplData[];
|
|
83
|
+
tableColumns?: object[];
|
|
84
|
+
sortedColConfigs?: ColumnConfig[];
|
|
85
|
+
queryKey?: QueryKey;
|
|
86
|
+
loading?: boolean;
|
|
87
|
+
selectedRows?: SelectedRow[];
|
|
88
|
+
selectedDatas?: DtmplData[];
|
|
87
89
|
hiddenColIds?: string[];
|
|
88
90
|
drillingColIds?: string[];
|
|
89
|
-
disabledColIds
|
|
91
|
+
disabledColIds?: string[];
|
|
90
92
|
hiddenRowCodes?: string[];
|
|
91
93
|
viewModels?: ActTableViewModel[];
|
|
92
|
-
showL2ActTable
|
|
93
|
-
showL2Chart
|
|
94
|
+
showL2ActTable?: boolean;
|
|
95
|
+
showL2Chart?: boolean;
|
|
94
96
|
};
|
|
95
97
|
|
|
96
98
|
class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
@@ -99,7 +101,6 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
99
101
|
sortedColConfigs: undefined,
|
|
100
102
|
queryKey: undefined,
|
|
101
103
|
loading: true,
|
|
102
|
-
criteriaData: undefined,
|
|
103
104
|
disableCols: undefined,
|
|
104
105
|
hiddenColIds: defaultDisabledColIds,
|
|
105
106
|
selectedRows: [],
|
|
@@ -120,7 +121,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
120
121
|
}
|
|
121
122
|
|
|
122
123
|
loadData = async (hiddenColIds: string[], hiddenRowCodes: string[], sortedColConfigs: ColumnConfig[]) => {
|
|
123
|
-
const {sourceId, criteriaData, ltmplConfig, mainCode, level} = this.props;
|
|
124
|
+
const {sourceId, criteriaData, ltmplConfig, mainCode, level,pageNo,pageSize} = this.props;
|
|
124
125
|
if (!ltmplConfig) {
|
|
125
126
|
return;
|
|
126
127
|
}
|
|
@@ -149,11 +150,11 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
149
150
|
/** 构建column **/
|
|
150
151
|
let tableColumns = this.buildTableColumns(ltmplConfig, hiddenColIds_, hiddenRowCodes, sortedColConfigs);
|
|
151
152
|
|
|
152
|
-
const {defaultPageSize
|
|
153
|
+
const {defaultPageSize} = ltmplConfig;
|
|
153
154
|
|
|
154
155
|
let pageInfo = {
|
|
155
|
-
pageNo:
|
|
156
|
-
pageSize:
|
|
156
|
+
pageNo:pageNo?pageNo:1,
|
|
157
|
+
pageSize:pageSize?pageSize:defaultPageSize ? defaultPageSize : 10,
|
|
157
158
|
virtualEndPageNo: undefined,
|
|
158
159
|
}
|
|
159
160
|
|
|
@@ -180,7 +181,6 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
180
181
|
sortedColConfigs,
|
|
181
182
|
tableColumns,
|
|
182
183
|
queryKey,
|
|
183
|
-
criteriaData,
|
|
184
184
|
loading: false,
|
|
185
185
|
showL2Chart: false,
|
|
186
186
|
selectedRows: [],
|
|
@@ -190,7 +190,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
buildTableColumns = (ltmplConfig: LtmplConfig, hiddenColIds: string[], hiddenRowCodes: string[], sortedColConfigs: ColumnConfig[]) => {
|
|
193
|
-
const {
|
|
193
|
+
const { showView, doEdit, doRAction} = this.props
|
|
194
194
|
const {buttons} = ltmplConfig;
|
|
195
195
|
let tableColumns = [];
|
|
196
196
|
let s = 0;
|
|
@@ -354,15 +354,14 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
354
354
|
}
|
|
355
355
|
|
|
356
356
|
async componentDidUpdate(prevProps) {
|
|
357
|
-
const {sourceId,
|
|
358
|
-
let {ltmplConfig: preLtmplConfig, criteriaData: preCriteriaData} = prevProps;
|
|
357
|
+
const {sourceId,criteriaData, ltmplConfig} = this.props;
|
|
358
|
+
let {ltmplConfig: preLtmplConfig, criteriaData: preCriteriaData,sourceId:preSourceId} = prevProps;
|
|
359
359
|
|
|
360
360
|
let {hiddenColIds, sortedColConfigs} = this.state;
|
|
361
361
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
if (ltmplConfig && (!preLtmplConfig || ltmplConfig.id != preLtmplConfig.id) || (Units.transQueryParamsToStr(criteriaData) != Units.transQueryParamsToStr(preCriteriaData))) {
|
|
362
|
+
if ((sourceId && preSourceId!=sourceId) ||
|
|
363
|
+
(ltmplConfig && (!preLtmplConfig || ltmplConfig.id != preLtmplConfig.id)) ||
|
|
364
|
+
(Units.transQueryParamsToStr(criteriaData) != Units.transQueryParamsToStr(preCriteriaData))) {
|
|
366
365
|
|
|
367
366
|
if (ltmplConfig.id == preLtmplConfig.id) {
|
|
368
367
|
this.loadData(hiddenColIds, [], sortedColConfigs);
|
|
@@ -647,8 +646,8 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
647
646
|
}
|
|
648
647
|
|
|
649
648
|
renderCriteriaForm = () => {
|
|
650
|
-
let {
|
|
651
|
-
let {ltmplConfig, doSearch} = this.props;
|
|
649
|
+
let { loading, selectedRows, selectedDatas} = this.state;
|
|
650
|
+
let {ltmplConfig, doSearch,criteriaData} = this.props;
|
|
652
651
|
return <CriteriaForm loading={loading} selectedDatas={selectedDatas} selectedRows={selectedRows}
|
|
653
652
|
ltmplConfig={ltmplConfig} data={criteriaData}
|
|
654
653
|
doCQuery={this.doSelectedCQuery}
|
|
@@ -659,8 +658,8 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
659
658
|
}
|
|
660
659
|
|
|
661
660
|
renderContent() {
|
|
662
|
-
let {queryKey, tableColumns,
|
|
663
|
-
let {sourceId, ltmplConfig,
|
|
661
|
+
let {queryKey, tableColumns, loading, selectedRows, hiddenRowCodes, viewModels, sortedColConfigs, hiddenColIds, showL2ActTable} = this.state;
|
|
662
|
+
let {sourceId, ltmplConfig, funcMode, title, collapsible,pageSize,pageNo,onChangePage} = this.props;
|
|
664
663
|
|
|
665
664
|
if (!ltmplConfig || !sourceId) {
|
|
666
665
|
return <>
|
|
@@ -670,7 +669,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
670
669
|
</Table>
|
|
671
670
|
</>
|
|
672
671
|
}
|
|
673
|
-
let {buttons
|
|
672
|
+
let {buttons} = ltmplConfig
|
|
674
673
|
let displayCriteriaCard: boolean = false;
|
|
675
674
|
if (funcMode == 'simple' || funcMode == 'common') {
|
|
676
675
|
displayCriteriaCard = false;
|
|
@@ -715,12 +714,12 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
715
714
|
}
|
|
716
715
|
{
|
|
717
716
|
loading ? "" :
|
|
718
|
-
<QueryTable viewModels={viewModels} columnConfigs={columnConfigs}
|
|
717
|
+
<QueryTable onChangePage={onChangePage} viewModels={viewModels} columnConfigs={columnConfigs}
|
|
719
718
|
maxSelectedRows={this.checkBoxUseful() ? 10000 : -1}
|
|
720
719
|
selectedRows={selectedRows}
|
|
721
720
|
columns={tableColumns}
|
|
722
721
|
hiddenRowCodes={hiddenRowCodes}
|
|
723
|
-
|
|
722
|
+
pageInfo={{pageNo:pageNo?pageNo:1,pageSize:pageSize?pageSize:ltmplConfig.defaultPageSize}}
|
|
724
723
|
queryKey={queryKey}
|
|
725
724
|
onChangeRowSelection={this.changeRowSelection}/>
|
|
726
725
|
}
|
|
@@ -730,8 +729,8 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
730
729
|
}
|
|
731
730
|
|
|
732
731
|
render() {
|
|
733
|
-
let {queryKey,
|
|
734
|
-
let {sourceId, ltmplConfig,
|
|
732
|
+
let {queryKey, loading} = this.state;
|
|
733
|
+
let {sourceId, ltmplConfig, title, collapsible,initCollapse} = this.props;
|
|
735
734
|
|
|
736
735
|
if (!ltmplConfig || !sourceId) {
|
|
737
736
|
return <>
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import {Card, Collapse, Table} from 'antd';
|
|
3
|
-
import {MenuOutlined} from '@ant-design/icons';
|
|
4
2
|
import "./index.css"
|
|
5
3
|
import {LtmplConfigRes, TmplBaseProps} from "../tmpl/interface";
|
|
6
|
-
import Units from "../units";
|
|
7
|
-
import {SortableHandle} from 'react-sortable-hoc';
|
|
8
4
|
import HCDataSource from "../tmpl/hc-data-source";
|
|
9
5
|
import ActTable from './act-table'
|
|
10
6
|
|
|
@@ -13,13 +9,17 @@ interface L2ActTableProps extends TmplBaseProps {
|
|
|
13
9
|
};
|
|
14
10
|
|
|
15
11
|
interface L2ActTableStat {
|
|
16
|
-
ltmplConfigRes
|
|
17
|
-
criteriaData
|
|
12
|
+
ltmplConfigRes?: LtmplConfigRes,
|
|
13
|
+
criteriaData?:object,
|
|
14
|
+
pageNo?:number,
|
|
15
|
+
pageSize?:number,
|
|
18
16
|
};
|
|
19
17
|
|
|
20
18
|
|
|
21
19
|
class L2ActTable extends React.PureComponent<L2ActTableProps, L2ActTableStat> {
|
|
22
20
|
state = {
|
|
21
|
+
pageNo:undefined,
|
|
22
|
+
pageSize:undefined,
|
|
23
23
|
ltmplConfigRes: undefined,
|
|
24
24
|
criteriaData:{},
|
|
25
25
|
}
|
|
@@ -71,12 +71,19 @@ class L2ActTable extends React.PureComponent<L2ActTableProps, L2ActTableStat> {
|
|
|
71
71
|
})
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
onChangePage=(pageNo,pageSize)=>{
|
|
75
|
+
this.setState({
|
|
76
|
+
pageNo,pageSize
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
}
|
|
80
|
+
|
|
74
81
|
render() {
|
|
75
|
-
let {ltmplConfigRes,criteriaData} = this.state;
|
|
82
|
+
let {ltmplConfigRes,criteriaData,pageNo,pageSize} = this.state;
|
|
76
83
|
let {sourceId} = this.props;
|
|
77
84
|
return (
|
|
78
85
|
ltmplConfigRes?
|
|
79
|
-
<ActTable doSearch={this.doSearch} level={'l2'} criteriaData={criteriaData} sourceId={sourceId}
|
|
86
|
+
<ActTable pageSize={pageSize} pageNo={pageNo} onChangePage={this.onChangePage} doSearch={this.doSearch} level={'l2'} criteriaData={criteriaData} sourceId={sourceId}
|
|
80
87
|
ltmplConfig={ltmplConfigRes.ltmplConfig} /> : ""
|
|
81
88
|
);
|
|
82
89
|
}
|
|
@@ -10,6 +10,7 @@ import QueryTable from './query-table';
|
|
|
10
10
|
import CriteriaForm from "../form/criteria-form";
|
|
11
11
|
import ViewControl from "../controls/view-control";
|
|
12
12
|
import SelectedRowsCard from './selected-rows-card'
|
|
13
|
+
import ActTable from "./act-table";
|
|
13
14
|
|
|
14
15
|
interface ModelSelectTableProps {
|
|
15
16
|
maxSelectedRows: number,
|
|
@@ -22,12 +23,14 @@ interface ModelSelectTableProps {
|
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
interface ModelSelectTableStat {
|
|
25
|
-
selectConfig
|
|
26
|
-
columns
|
|
27
|
-
queryKey
|
|
28
|
-
loading
|
|
29
|
-
criteriaData
|
|
30
|
-
|
|
26
|
+
selectConfig?: SelectConfig;
|
|
27
|
+
columns?: object[];
|
|
28
|
+
queryKey?: QueryKey;
|
|
29
|
+
loading?: boolean;
|
|
30
|
+
criteriaData?: object;
|
|
31
|
+
pageNo?:number,
|
|
32
|
+
pageSize?:number,
|
|
33
|
+
selectedRows?: SelectedRow[];
|
|
31
34
|
};
|
|
32
35
|
|
|
33
36
|
class ModelSelectTable extends React.PureComponent<ModelSelectTableProps, ModelSelectTableStat> {
|
|
@@ -37,6 +40,8 @@ class ModelSelectTable extends React.PureComponent<ModelSelectTableProps, ModelS
|
|
|
37
40
|
queryKey: undefined,
|
|
38
41
|
loading: true,
|
|
39
42
|
criteriaData: undefined,
|
|
43
|
+
pageNo:undefined,
|
|
44
|
+
pageSize:undefined,
|
|
40
45
|
disableCols: undefined,
|
|
41
46
|
selectedRows: [],
|
|
42
47
|
}
|
|
@@ -46,12 +51,12 @@ class ModelSelectTable extends React.PureComponent<ModelSelectTableProps, ModelS
|
|
|
46
51
|
this.setState({
|
|
47
52
|
loading: true,
|
|
48
53
|
})
|
|
49
|
-
|
|
54
|
+
const {pageNo,pageSize} = this.state;
|
|
50
55
|
const {defaultPageSize} = selectConfig;
|
|
51
56
|
|
|
52
57
|
let pageInfo = {
|
|
53
|
-
pageNo:
|
|
54
|
-
pageSize:
|
|
58
|
+
pageNo: pageNo,
|
|
59
|
+
pageSize:pageSize?pageSize: defaultPageSize,
|
|
55
60
|
virtualEndPageNo: undefined,
|
|
56
61
|
}
|
|
57
62
|
const {sourceId, exceptCodes,mainCode} = this.props;
|
|
@@ -139,6 +144,12 @@ class ModelSelectTable extends React.PureComponent<ModelSelectTableProps, ModelS
|
|
|
139
144
|
await this.loadData(selectConfig, params);
|
|
140
145
|
}
|
|
141
146
|
|
|
147
|
+
onChangePage=(pageNo,pageSize)=>{
|
|
148
|
+
this.setState({
|
|
149
|
+
pageNo,pageSize
|
|
150
|
+
})
|
|
151
|
+
}
|
|
152
|
+
|
|
142
153
|
handleOk = () => {
|
|
143
154
|
this.props.onOK(this.state.selectedRows);
|
|
144
155
|
this.setState({
|
|
@@ -206,7 +217,7 @@ class ModelSelectTable extends React.PureComponent<ModelSelectTableProps, ModelS
|
|
|
206
217
|
|
|
207
218
|
render() {
|
|
208
219
|
let {open, maxSelectedRows} = this.props;
|
|
209
|
-
let {queryKey, columns, selectConfig, criteriaData, loading, selectedRows} = this.state;
|
|
220
|
+
let {queryKey, columns, selectConfig, criteriaData, loading, selectedRows,pageSize,pageNo} = this.state;
|
|
210
221
|
|
|
211
222
|
if (!selectConfig) {
|
|
212
223
|
return <>
|
|
@@ -236,8 +247,7 @@ class ModelSelectTable extends React.PureComponent<ModelSelectTableProps, ModelS
|
|
|
236
247
|
<div className="actTable">
|
|
237
248
|
<CriteriaForm selectedRows={selectedRows} ltmplConfig={selectConfig} data={criteriaData}
|
|
238
249
|
doSearch={this.doSearch} loading={loading} />
|
|
239
|
-
<QueryTable maxSelectedRows={maxSelectedRows} selectedRows={selectedRows} columns={columns}
|
|
240
|
-
defaultPageSize={selectConfig.defaultPageSize}
|
|
250
|
+
<QueryTable pageInfo={{pageNo:pageNo?pageNo:1,pageSize:pageSize?pageSize:selectConfig.defaultPageSize}} onChangePage={this.onChangePage} maxSelectedRows={maxSelectedRows} selectedRows={selectedRows} columns={columns}
|
|
241
251
|
queryKey={queryKey}
|
|
242
252
|
onChangeRowSelection={this.changeRowSelection}/>
|
|
243
253
|
</div>
|
|
@@ -24,7 +24,6 @@ class Pagination extends React.PureComponent<PaginationProps, PaginationStat> {
|
|
|
24
24
|
if(!pageInfo){
|
|
25
25
|
return <></>
|
|
26
26
|
}
|
|
27
|
-
|
|
28
27
|
let virtualTotal;
|
|
29
28
|
let myTotal;
|
|
30
29
|
let sewTotal: boolean = true;
|
|
@@ -42,11 +41,11 @@ class Pagination extends React.PureComponent<PaginationProps, PaginationStat> {
|
|
|
42
41
|
seeTotalTitle = `点击查看总数`;
|
|
43
42
|
} else {//这里还有问题
|
|
44
43
|
sewTotal = false;
|
|
45
|
-
virtualTotal = pageInfo.virtualEndPageNo *
|
|
44
|
+
virtualTotal = pageInfo.virtualEndPageNo * pageInfo.pageSize + 1;
|
|
46
45
|
seeTotalTitle = `点击查看总数`;
|
|
47
46
|
}
|
|
48
47
|
|
|
49
|
-
return (virtualTotal<pageInfo.pageSize?"":
|
|
48
|
+
return (!virtualTotal || virtualTotal < pageInfo.pageSize?"":
|
|
50
49
|
<div className='Pagination'>
|
|
51
50
|
<span className={sewTotal ? 'sewTotal' : 'seeTotal'} onClick={queryTotal}>
|
|
52
51
|
{seeTotalTitle}
|
|
@@ -57,7 +56,7 @@ class Pagination extends React.PureComponent<PaginationProps, PaginationStat> {
|
|
|
57
56
|
showSizeChanger
|
|
58
57
|
pageSizeOptions={['5', '10', '20', '50', '100', '500']}
|
|
59
58
|
defaultCurrent={1}
|
|
60
|
-
current={pageInfo.pageNo}
|
|
59
|
+
current={parseInt(pageInfo.pageNo.toString())}
|
|
61
60
|
pageSize={pageInfo.pageSize}
|
|
62
61
|
onChange={(page, pageSize) => pageTo(page, pageSize)}
|
|
63
62
|
onShowSizeChange={(current, size) => pageTo(current, size)}
|
|
@@ -29,10 +29,15 @@ interface CacheData {
|
|
|
29
29
|
|
|
30
30
|
interface QueryTableProps {
|
|
31
31
|
viewModels?: ActTableViewModel[];
|
|
32
|
-
defaultPageSize?: number;
|
|
32
|
+
// defaultPageSize?: number;
|
|
33
|
+
pageInfo: {
|
|
34
|
+
pageNo: number,
|
|
35
|
+
pageSize: number
|
|
36
|
+
},
|
|
33
37
|
columns: any[];
|
|
34
38
|
queryKey: QueryKey;
|
|
35
|
-
|
|
39
|
+
onChangePage: (pageNo: number, pageSize: number) => void,
|
|
40
|
+
onChangeRowSelection?: (selectedRows: SelectedRow[], selectedDatas: DtmplData[], allRowKeys: string[]) => void;
|
|
36
41
|
maxSelectedRows?: number;
|
|
37
42
|
selectedRows?: SelectedRow[];
|
|
38
43
|
hiddenRowCodes?: string[],
|
|
@@ -42,17 +47,22 @@ interface QueryTableProps {
|
|
|
42
47
|
|
|
43
48
|
|
|
44
49
|
interface QueryTableStat {
|
|
45
|
-
queryDataCache
|
|
46
|
-
|
|
47
|
-
dataSource
|
|
48
|
-
loading
|
|
49
|
-
touchEnd
|
|
50
|
-
total
|
|
50
|
+
queryDataCache?: Map<string, CacheData>;
|
|
51
|
+
virtualEndPageNo?: number;
|
|
52
|
+
dataSource?: object[];
|
|
53
|
+
loading?: boolean;
|
|
54
|
+
touchEnd?: boolean;
|
|
55
|
+
total?: number;
|
|
51
56
|
};
|
|
52
57
|
|
|
53
58
|
class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
54
59
|
|
|
55
60
|
static defaultProps = {
|
|
61
|
+
pageInfo: {
|
|
62
|
+
pageNo: 1,
|
|
63
|
+
pageSize: 10,
|
|
64
|
+
virtualEndPageNo: undefined
|
|
65
|
+
},
|
|
56
66
|
hiddenRowCodes: [],
|
|
57
67
|
selectedRows: [],
|
|
58
68
|
viewModels: ['table']
|
|
@@ -60,7 +70,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
60
70
|
|
|
61
71
|
state = {
|
|
62
72
|
queryDataCache: undefined,
|
|
63
|
-
|
|
73
|
+
virtualEndPageNo: undefined,
|
|
64
74
|
dataSource: undefined,
|
|
65
75
|
loading: true,
|
|
66
76
|
touchEnd: undefined,
|
|
@@ -68,31 +78,30 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
68
78
|
}
|
|
69
79
|
|
|
70
80
|
async componentDidMount() {
|
|
71
|
-
const {
|
|
72
|
-
let pageInfo = {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
81
|
+
const { queryKey, pageInfo} = this.props;
|
|
82
|
+
// let pageInfo = {
|
|
83
|
+
// pageNo: 1,
|
|
84
|
+
// pageSize: defaultPageSize ? defaultPageSize : 10,
|
|
85
|
+
// virtualEndPageNo: undefined,
|
|
86
|
+
// }
|
|
77
87
|
if (queryKey) {
|
|
78
88
|
await this.loadData(queryKey.key, pageInfo);
|
|
79
89
|
}
|
|
80
90
|
}
|
|
81
91
|
|
|
82
92
|
componentWillUnmount() {
|
|
83
|
-
this.setState = ()=>false;
|
|
93
|
+
this.setState = () => false;
|
|
84
94
|
}
|
|
85
95
|
|
|
86
96
|
async componentDidUpdate(prevProps) {
|
|
87
|
-
const {queryKey: preQueryKey} = prevProps;
|
|
88
|
-
const {
|
|
89
|
-
if (queryKey
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
97
|
+
const {queryKey: preQueryKey, pageInfo: prePageInfo} = prevProps;
|
|
98
|
+
const {queryKey, pageInfo} = this.props;
|
|
99
|
+
if (queryKey) {
|
|
100
|
+
if (preQueryKey?.key != queryKey.key) {
|
|
101
|
+
await this.loadData(queryKey.key, pageInfo, true);
|
|
102
|
+
} else if (prePageInfo?.pageNo != pageInfo.pageNo || prePageInfo?.pageSize != pageInfo.pageSize) {
|
|
103
|
+
await this.loadData(queryKey.key, pageInfo, false);
|
|
94
104
|
}
|
|
95
|
-
await this.loadData(queryKey.key, pageInfo, true);
|
|
96
105
|
}
|
|
97
106
|
}
|
|
98
107
|
|
|
@@ -132,11 +141,11 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
132
141
|
this.setState({
|
|
133
142
|
loading: true,
|
|
134
143
|
})
|
|
135
|
-
|
|
136
144
|
let {queryDataCache} = this.state;
|
|
137
145
|
let queryCache: Map<string, CacheData>;
|
|
138
146
|
if (cleanCache || !queryDataCache) {
|
|
139
147
|
queryCache = new Map<string, CacheData>();
|
|
148
|
+
this.setState({total: undefined,})
|
|
140
149
|
} else {
|
|
141
150
|
queryCache = queryDataCache;
|
|
142
151
|
}
|
|
@@ -144,7 +153,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
144
153
|
let cacheData = queryCache.get(pageInfo.pageNo + "_" + pageInfo.pageSize);
|
|
145
154
|
this.setState({
|
|
146
155
|
dataSource: cacheData.dataSource,
|
|
147
|
-
|
|
156
|
+
virtualEndPageNo: cacheData.pageInfo.virtualEndPageNo,
|
|
148
157
|
loading: false,
|
|
149
158
|
})
|
|
150
159
|
} else {
|
|
@@ -165,23 +174,25 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
165
174
|
queryCache.set(pageInfo.pageNo + "_" + pageInfo.pageSize, {dataSource, pageInfo});
|
|
166
175
|
this.setState({
|
|
167
176
|
dataSource,
|
|
168
|
-
pageInfo,
|
|
177
|
+
virtualEndPageNo: pageInfo.virtualEndPageNo,
|
|
169
178
|
queryDataCache: queryCache,
|
|
170
179
|
touchEnd,
|
|
171
180
|
loading: false,
|
|
172
|
-
total: undefined,
|
|
173
181
|
})
|
|
174
182
|
}
|
|
175
183
|
}
|
|
176
184
|
|
|
177
185
|
pageTo = async (pageNo: number, pageSize: number) => {
|
|
186
|
+
const {onChangePage}=this.props
|
|
187
|
+
const {virtualEndPageNo} = this.state;
|
|
178
188
|
let pageInfo = {
|
|
179
189
|
pageNo,
|
|
180
190
|
pageSize: pageSize ? pageSize : 10,
|
|
181
|
-
virtualEndPageNo
|
|
191
|
+
virtualEndPageNo,
|
|
182
192
|
}
|
|
183
193
|
const {queryKey} = this.props;
|
|
184
194
|
await this.loadData(queryKey.key, pageInfo);
|
|
195
|
+
onChangePage(pageNo,pageSize);
|
|
185
196
|
}
|
|
186
197
|
|
|
187
198
|
queryTotal = async () => {
|
|
@@ -207,7 +218,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
207
218
|
allRowKeys.push(d.code);
|
|
208
219
|
}
|
|
209
220
|
}
|
|
210
|
-
if(maxSelectedRows
|
|
221
|
+
if (maxSelectedRows == -1) {
|
|
211
222
|
return null;
|
|
212
223
|
}
|
|
213
224
|
const rowSelection: TableRowSelection<any> = {
|
|
@@ -231,7 +242,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
231
242
|
selectedDatas.push(item);
|
|
232
243
|
})
|
|
233
244
|
if (onChangeRowSelection) {
|
|
234
|
-
onChangeRowSelection(selectedRows_,selectedDatas, allRowKeys);
|
|
245
|
+
onChangeRowSelection(selectedRows_, selectedDatas, allRowKeys);
|
|
235
246
|
}
|
|
236
247
|
}
|
|
237
248
|
}
|
|
@@ -259,11 +270,11 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
259
270
|
const formItemList = [];
|
|
260
271
|
if (columnConfigs.length > 0) {
|
|
261
272
|
columnConfigs.forEach((item, index) => {
|
|
262
|
-
if (item.id != '10000' && item.title != '操作' && item.id != '20000'
|
|
273
|
+
if (item.id != '10000' && item.title != '操作' && item.id != '20000') {
|
|
263
274
|
const title = item.title;
|
|
264
275
|
let fieldValue = data ? data[item.id] : undefined;
|
|
265
|
-
if(title=='序号'){
|
|
266
|
-
fieldValue=data.index;
|
|
276
|
+
if (title == '序号') {
|
|
277
|
+
fieldValue = data.index;
|
|
267
278
|
}
|
|
268
279
|
//fieldValue 没有值时不能为null 要为 undefined。antd input所限制
|
|
269
280
|
fieldValue = fieldValue ? fieldValue : item.defaultValue ? item.defaultValue : undefined;
|
|
@@ -283,28 +294,29 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
283
294
|
}
|
|
284
295
|
|
|
285
296
|
render() {
|
|
286
|
-
const {columns, viewModels} = this.props;
|
|
287
|
-
const {
|
|
297
|
+
const {pageInfo, columns, viewModels, onChangePage} = this.props;
|
|
298
|
+
const {touchEnd, total, loading, virtualEndPageNo} = this.state;
|
|
288
299
|
return (
|
|
289
300
|
<>
|
|
290
301
|
{viewModels.includes('table') ?
|
|
291
302
|
<Table size={'middle'}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
303
|
+
rowSelection={this.getRowSelection()}
|
|
304
|
+
columns={columns ? columns : []}
|
|
305
|
+
dataSource={this.getUnHidenDataSource()}
|
|
306
|
+
bordered
|
|
307
|
+
pagination={false}
|
|
308
|
+
style={{display: columns ? "block" : "none"}}
|
|
309
|
+
loading={loading}
|
|
310
|
+
components={{
|
|
311
|
+
body: {
|
|
312
|
+
wrapper: this.DraggableContainer,
|
|
313
|
+
row: this.DraggableBodyRow,
|
|
314
|
+
},
|
|
315
|
+
}}
|
|
305
316
|
>
|
|
306
317
|
</Table> : ""}
|
|
307
|
-
<Pagination touchEnd={touchEnd} pageInfo={pageInfo} pageTo={this.pageTo}
|
|
318
|
+
<Pagination touchEnd={touchEnd} pageInfo={{...pageInfo, virtualEndPageNo}} pageTo={this.pageTo}
|
|
319
|
+
queryTotal={this.queryTotal}
|
|
308
320
|
total={total}/>
|
|
309
321
|
{viewModels.includes('verticalList') ?
|
|
310
322
|
<Card style={{marginTop: '10px'}}>
|
|
@@ -312,7 +324,7 @@ class QueryTable extends React.PureComponent<QueryTableProps, QueryTableStat> {
|
|
|
312
324
|
dataSource={this.getUnHidenDataSource()}
|
|
313
325
|
renderItem={item => (
|
|
314
326
|
<List.Item key={item['id']}>
|
|
315
|
-
<Card size={'small'} bodyStyle={{padding:'4px'}}><Descriptions column={4}>
|
|
327
|
+
<Card size={'small'} bodyStyle={{padding: '4px'}}><Descriptions column={4}>
|
|
316
328
|
{this.initViewList(item)}
|
|
317
329
|
</Descriptions></Card>
|
|
318
330
|
</List.Item>
|
|
@@ -38,15 +38,15 @@ interface RelationTableProps {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
interface RelationTableStat {
|
|
41
|
-
selectedCode
|
|
42
|
-
showDtmplView
|
|
43
|
-
showDtmplEdit
|
|
44
|
-
showSelectTable
|
|
45
|
-
tableLoading
|
|
46
|
-
showRowEdit
|
|
47
|
-
selectedDtmplData
|
|
48
|
-
filterStr
|
|
49
|
-
pageSize
|
|
41
|
+
selectedCode?: string,
|
|
42
|
+
showDtmplView?: boolean,
|
|
43
|
+
showDtmplEdit?: boolean,
|
|
44
|
+
showSelectTable?: boolean,
|
|
45
|
+
tableLoading?: boolean,
|
|
46
|
+
showRowEdit?: boolean,
|
|
47
|
+
selectedDtmplData?: DtmplData,
|
|
48
|
+
filterStr?: string,
|
|
49
|
+
pageSize?: number,
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
|