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
package/lib/table/act-table.js
CHANGED
|
@@ -1,533 +1,530 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import React from 'react';
|
|
11
|
-
import { Button, Card, Checkbox, Col, Collapse, Divider, Popconfirm, Popover, Row, Space, Table, Tooltip } from 'antd';
|
|
12
|
-
import { AlignCenterOutlined, AlignLeftOutlined, CopyOutlined, DeleteOutlined, DownloadOutlined, EditOutlined, EyeInvisibleOutlined, EyeOutlined, FormOutlined, FundOutlined, LineChartOutlined, MenuOutlined, PlusCircleOutlined, PlusOutlined, ReloadOutlined, RetweetOutlined, SearchOutlined, TableOutlined, UploadOutlined } from '@ant-design/icons';
|
|
13
|
-
import "./index.css";
|
|
14
|
-
import TableUnits from "./table-util";
|
|
15
|
-
import SupportInputTypes from '../tmpl/control-type-supportor';
|
|
16
|
-
import HcserviceV3 from "../tmpl/hcservice-v3";
|
|
17
|
-
import QueryTable from './query-table';
|
|
18
|
-
import CriteriaForm from "./../form/criteria-form";
|
|
19
|
-
import ViewControl from "../controls/view-control";
|
|
20
|
-
import Units from "../units";
|
|
21
|
-
import ColumnSelector from './column/column-selector';
|
|
22
|
-
import ExportFrame from '../exportor/export-frame';
|
|
23
|
-
import { SortableHandle } from 'react-sortable-hoc';
|
|
24
|
-
import L2ActTable from "./l2-act-table";
|
|
25
|
-
//import StatViewL2Chart from '../chart/statview-l2-chart'
|
|
26
|
-
import Action from '../controls/action';
|
|
27
|
-
import Restat from "./stat/restat";
|
|
28
|
-
import ActionUtils from '../controls/action/utils';
|
|
29
|
-
import CquickButton from "../controls/cquery/cquick-button";
|
|
30
|
-
import CollapseCard from "../controls/collapse-card";
|
|
31
|
-
const DragHandle = SortableHandle(() => React.createElement(MenuOutlined, { style: { cursor: 'grab', color: '#999' } }));
|
|
32
|
-
const { Panel } = Collapse;
|
|
33
|
-
const defaultDisabledColIds = ['20000', '10000'];
|
|
34
|
-
;
|
|
35
|
-
;
|
|
36
|
-
class ActTable extends React.PureComponent {
|
|
37
|
-
constructor() {
|
|
38
|
-
super(...arguments);
|
|
39
|
-
this.state = {
|
|
40
|
-
tableColumns: undefined,
|
|
41
|
-
sortedColConfigs: undefined,
|
|
42
|
-
queryKey: undefined,
|
|
43
|
-
loading: true,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
// console.log('acttable
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
let
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
let
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
column['
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
s
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
column['
|
|
145
|
-
column['
|
|
146
|
-
column['
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
column['
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
column['
|
|
162
|
-
column['
|
|
163
|
-
column['
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
: "",
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
});
|
|
313
|
-
this.
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
let {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
:
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
React.createElement(Col, { span: 24 },
|
|
391
|
-
React.createElement(Checkbox, { value: '
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
}
|
|
462
|
-
this.
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
if (
|
|
481
|
-
displayCriteriaCard =
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
React.createElement(
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
initCollapse: false,
|
|
531
|
-
};
|
|
532
|
-
export default ActTable;
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { Button, Card, Checkbox, Col, Collapse, Divider, Popconfirm, Popover, Row, Space, Table, Tooltip } from 'antd';
|
|
12
|
+
import { AlignCenterOutlined, AlignLeftOutlined, CopyOutlined, DeleteOutlined, DownloadOutlined, EditOutlined, EyeInvisibleOutlined, EyeOutlined, FormOutlined, FundOutlined, LineChartOutlined, MenuOutlined, PlusCircleOutlined, PlusOutlined, ReloadOutlined, RetweetOutlined, SearchOutlined, TableOutlined, UploadOutlined } from '@ant-design/icons';
|
|
13
|
+
import "./index.css";
|
|
14
|
+
import TableUnits from "./table-util";
|
|
15
|
+
import SupportInputTypes from '../tmpl/control-type-supportor';
|
|
16
|
+
import HcserviceV3 from "../tmpl/hcservice-v3";
|
|
17
|
+
import QueryTable from './query-table';
|
|
18
|
+
import CriteriaForm from "./../form/criteria-form";
|
|
19
|
+
import ViewControl from "../controls/view-control";
|
|
20
|
+
import Units from "../units";
|
|
21
|
+
import ColumnSelector from './column/column-selector';
|
|
22
|
+
import ExportFrame from '../exportor/export-frame';
|
|
23
|
+
import { SortableHandle } from 'react-sortable-hoc';
|
|
24
|
+
import L2ActTable from "./l2-act-table";
|
|
25
|
+
//import StatViewL2Chart from '../chart/statview-l2-chart'
|
|
26
|
+
import Action from '../controls/action';
|
|
27
|
+
import Restat from "./stat/restat";
|
|
28
|
+
import ActionUtils from '../controls/action/utils';
|
|
29
|
+
import CquickButton from "../controls/cquery/cquick-button";
|
|
30
|
+
import CollapseCard from "../controls/collapse-card";
|
|
31
|
+
const DragHandle = SortableHandle(() => React.createElement(MenuOutlined, { style: { cursor: 'grab', color: '#999' } }));
|
|
32
|
+
const { Panel } = Collapse;
|
|
33
|
+
const defaultDisabledColIds = ['20000', '10000'];
|
|
34
|
+
;
|
|
35
|
+
;
|
|
36
|
+
class ActTable extends React.PureComponent {
|
|
37
|
+
constructor() {
|
|
38
|
+
super(...arguments);
|
|
39
|
+
this.state = {
|
|
40
|
+
tableColumns: undefined,
|
|
41
|
+
sortedColConfigs: undefined,
|
|
42
|
+
queryKey: undefined,
|
|
43
|
+
loading: true,
|
|
44
|
+
disableCols: undefined,
|
|
45
|
+
hiddenColIds: defaultDisabledColIds,
|
|
46
|
+
selectedRows: [],
|
|
47
|
+
selectedDatas: [],
|
|
48
|
+
hiddenRowCodes: [],
|
|
49
|
+
viewModels: [],
|
|
50
|
+
drillingColIds: undefined,
|
|
51
|
+
disabledColIds: undefined,
|
|
52
|
+
showL2ActTable: false,
|
|
53
|
+
showL2Chart: false,
|
|
54
|
+
};
|
|
55
|
+
this.loadData = (hiddenColIds, hiddenRowCodes, sortedColConfigs) => __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
const { sourceId, criteriaData, ltmplConfig, mainCode, level, pageNo, pageSize } = this.props;
|
|
57
|
+
if (!ltmplConfig) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
// console.log('acttable location criteriaData:', criteriaData);
|
|
61
|
+
// console.log('acttable ltmplConfig:', ltmplConfig);
|
|
62
|
+
this.setState({
|
|
63
|
+
loading: true,
|
|
64
|
+
});
|
|
65
|
+
let disabledColIds = [];
|
|
66
|
+
let hiddenColIds_ = [...hiddenColIds];
|
|
67
|
+
if (criteriaData && criteriaData['drillingColIds']) {
|
|
68
|
+
let dColIds = [...criteriaData['drillingColIds']];
|
|
69
|
+
ltmplConfig.columns.forEach((item) => {
|
|
70
|
+
if (item.statColType == 'dimension' && !dColIds.includes(item.id) && !hiddenColIds_.includes(item.id)) {
|
|
71
|
+
hiddenColIds_.push(item.id);
|
|
72
|
+
disabledColIds.push(item.id);
|
|
73
|
+
}
|
|
74
|
+
if (item.statColType == 'dimension' && !dColIds.includes(item.id) && !disabledColIds.includes(item.id)) {
|
|
75
|
+
disabledColIds.push(item.id);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
hiddenColIds_ = hiddenColIds_.filter((id) => {
|
|
79
|
+
return !dColIds.includes(id);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/** 构建column **/
|
|
83
|
+
let tableColumns = this.buildTableColumns(ltmplConfig, hiddenColIds_, hiddenRowCodes, sortedColConfigs);
|
|
84
|
+
const { defaultPageSize } = ltmplConfig;
|
|
85
|
+
let pageInfo = {
|
|
86
|
+
pageNo: pageNo ? pageNo : 1,
|
|
87
|
+
pageSize: pageSize ? pageSize : defaultPageSize ? defaultPageSize : 10,
|
|
88
|
+
virtualEndPageNo: undefined,
|
|
89
|
+
};
|
|
90
|
+
/** 构建 dataSource **/
|
|
91
|
+
//构建过滤条件
|
|
92
|
+
let queryKey;
|
|
93
|
+
if (level && level == 'l2') {
|
|
94
|
+
queryKey = yield HcserviceV3.requestL2LtmplQueryKey(sourceId, Object.assign(Object.assign(Object.assign({}, criteriaData), pageInfo), { mainCode }));
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
queryKey = yield HcserviceV3.requestLtmplQueryKey(sourceId, Object.assign(Object.assign(Object.assign({}, criteriaData), pageInfo), { mainCode }));
|
|
98
|
+
}
|
|
99
|
+
this.setState({
|
|
100
|
+
disabledColIds,
|
|
101
|
+
hiddenColIds: hiddenColIds_,
|
|
102
|
+
hiddenRowCodes,
|
|
103
|
+
sortedColConfigs,
|
|
104
|
+
tableColumns,
|
|
105
|
+
queryKey,
|
|
106
|
+
loading: false,
|
|
107
|
+
showL2Chart: false,
|
|
108
|
+
selectedRows: [],
|
|
109
|
+
selectedDatas: [],
|
|
110
|
+
viewModels: (this.state.viewModels.length > 0 ? this.state.viewModels : ['table']),
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
this.buildTableColumns = (ltmplConfig, hiddenColIds, hiddenRowCodes, sortedColConfigs) => {
|
|
114
|
+
const { showView, doEdit, doRAction } = this.props;
|
|
115
|
+
const { buttons } = ltmplConfig;
|
|
116
|
+
let tableColumns = [];
|
|
117
|
+
let s = 0;
|
|
118
|
+
let colConfigs = sortedColConfigs ? sortedColConfigs : ltmplConfig.columns;
|
|
119
|
+
colConfigs.forEach((item) => {
|
|
120
|
+
let column = {};
|
|
121
|
+
if (!hiddenColIds || !hiddenColIds.includes(item.id)) {
|
|
122
|
+
tableColumns.push(column);
|
|
123
|
+
}
|
|
124
|
+
column['title'] = item.title;
|
|
125
|
+
column['dataIndex'] = item.id;
|
|
126
|
+
// column['ellipsis']= true;
|
|
127
|
+
s++;
|
|
128
|
+
let itemType = SupportInputTypes.getSupportControlType(item);
|
|
129
|
+
if (s < 10 && item.title != '操作' && item.title != '序号') {
|
|
130
|
+
if (hiddenColIds.includes('10000')) {
|
|
131
|
+
TableUnits.sort(column, itemType);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
//特殊列处理
|
|
135
|
+
//序号
|
|
136
|
+
if (item.title === "序号") {
|
|
137
|
+
//item.fixed='left';
|
|
138
|
+
column['render'] = (text, record, index) => (React.createElement("label", null, index + 1));
|
|
139
|
+
item['sorter'] = undefined;
|
|
140
|
+
}
|
|
141
|
+
else if (item.id == '10000') {
|
|
142
|
+
column['title'] = React.createElement(Tooltip, { title: '拖拽排序' }, item.title);
|
|
143
|
+
column['width'] = 30;
|
|
144
|
+
column['dataIndex'] = item.id;
|
|
145
|
+
column['className'] = 'drag-visible';
|
|
146
|
+
column['render'] = () => React.createElement(DragHandle, null);
|
|
147
|
+
}
|
|
148
|
+
else if (item.id == '20000') { //隐藏
|
|
149
|
+
column['align'] = 'center';
|
|
150
|
+
column['width'] = 14;
|
|
151
|
+
column['title'] = React.createElement(React.Fragment, null, hiddenRowCodes.length > 0 ?
|
|
152
|
+
React.createElement(Tooltip, { title: '取消隐藏' },
|
|
153
|
+
React.createElement(Button, { style: { marginRight: '0px' }, size: "small", shape: 'circle', icon: React.createElement(EyeOutlined, null), type: 'text', onClick: () => this.unHiden() })) : '');
|
|
154
|
+
column['render'] = (text, record) => (React.createElement(Tooltip, { title: '隐藏' },
|
|
155
|
+
" ",
|
|
156
|
+
React.createElement(Button, { style: { marginRight: '0px' }, icon: React.createElement(EyeInvisibleOutlined, null), type: "dashed", size: "small", onClick: () => this.onHide(record.code) })));
|
|
157
|
+
}
|
|
158
|
+
else if (item.title === "操作") {
|
|
159
|
+
column['fixed'] = 'right';
|
|
160
|
+
column['align'] = 'center';
|
|
161
|
+
column['className'] = 'opsColumn';
|
|
162
|
+
column['title'] = React.createElement(React.Fragment, null, "\u64CD \u4F5C");
|
|
163
|
+
column['render'] = (text, record) => (React.createElement(Space, { size: [0, 4], wrap: true },
|
|
164
|
+
buttons.includes('detail') && showView ?
|
|
165
|
+
React.createElement(Button, { size: "small", type: "primary", icon: React.createElement(AlignLeftOutlined, null), onClick: () => showView(record.code) })
|
|
166
|
+
: "",
|
|
167
|
+
buttons.includes('customDetail') && showView ?
|
|
168
|
+
React.createElement(Button, { size: "small", type: "primary", icon: React.createElement(AlignCenterOutlined, null), onClick: () => showView(record.code, true) })
|
|
169
|
+
: "",
|
|
170
|
+
buttons.includes('dtmplEdit') && doEdit
|
|
171
|
+
&& (!ltmplConfig.editAction || ActionUtils.isShow(ltmplConfig.editAction, [record], undefined)) ?
|
|
172
|
+
React.createElement(Button, { size: "small", type: "dashed", icon: React.createElement(EditOutlined, null), onClick: () => doEdit(record.code, 'update') }) : "",
|
|
173
|
+
buttons.includes('dtmplCustomEdit') && doEdit
|
|
174
|
+
&& (!ltmplConfig.editAction || ActionUtils.isShow(ltmplConfig.editAction, [record], undefined)) ?
|
|
175
|
+
React.createElement(Button, { size: "small", type: "dashed", icon: React.createElement(FormOutlined, null), onClick: () => doEdit(record.code, 'update', true) }) : "",
|
|
176
|
+
buttons.includes('copy') && doEdit
|
|
177
|
+
?
|
|
178
|
+
React.createElement(Tooltip, { title: '复制' },
|
|
179
|
+
React.createElement(Button, { size: "small", type: "dashed", icon: React.createElement(CopyOutlined, null), onClick: () => doEdit(record.code, 'copy') })) : "",
|
|
180
|
+
ltmplConfig.ractions ? ltmplConfig.ractions.map((raction) => {
|
|
181
|
+
return React.createElement(Button, { key: raction.id, size: "small", type: "dashed", onClick: () => doRAction(raction.id, record.code) }, raction.title);
|
|
182
|
+
}) : "",
|
|
183
|
+
ltmplConfig.rowActions && ltmplConfig.rowActions.length > 0 ?
|
|
184
|
+
ltmplConfig.rowActions.map((action) => {
|
|
185
|
+
return React.createElement(Action, { iconType: 'icon', key: action.id, data: [record], actionConfig: action, doAction: this.doRowAction, buttonSize: 'small', serial: 1 });
|
|
186
|
+
}) : "",
|
|
187
|
+
ltmplConfig.jumps && ltmplConfig.jumps.length > 0 ?
|
|
188
|
+
ltmplConfig.jumps.map((jump) => {
|
|
189
|
+
return React.createElement(Button, { key: jump.id, size: "small", type: "dashed", onClick: () => this.doRowJump(jump.id, record.code) }, jump.title);
|
|
190
|
+
}) : "",
|
|
191
|
+
ltmplConfig.rowCQuerys && ltmplConfig.rowCQuerys.length > 0 ?
|
|
192
|
+
ltmplConfig.rowCQuerys.map((cquery) => {
|
|
193
|
+
// console.log("record record", record);
|
|
194
|
+
return React.createElement(CquickButton, { key: cquery.id, size: "small", pageType: 'drawer',
|
|
195
|
+
// onClick={() => doCQuery(cquery.id)}
|
|
196
|
+
cQueryConfig: cquery, mainCode: cquery.mainCodeColId ? record[cquery.mainCodeColId] : record.code });
|
|
197
|
+
}) : "",
|
|
198
|
+
buttons.includes('singleDelete') && (!ltmplConfig.deleteAction || ActionUtils.isShow(ltmplConfig.deleteAction, [record], undefined)) ?
|
|
199
|
+
React.createElement(Popconfirm, { placement: "rightBottom", title: '确定要【删除】此数据吗?', onConfirm: () => {
|
|
200
|
+
this.doDeleteByCode(record.code);
|
|
201
|
+
}, okText: "\u786E\u5B9A", cancelText: "\u53D6\u6D88", okType: "danger" },
|
|
202
|
+
React.createElement(Button, { size: "small", type: "dashed", danger: true },
|
|
203
|
+
React.createElement(DeleteOutlined, null)))
|
|
204
|
+
: ""));
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
column['className'] = 'opsColumn';
|
|
208
|
+
column['render'] = (text, record) => {
|
|
209
|
+
return React.createElement(ViewControl, { fieldConfig: item, value: record[item.id], holderType: 'table' });
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
return tableColumns;
|
|
214
|
+
};
|
|
215
|
+
this.handleShowChart = () => {
|
|
216
|
+
this.setState({
|
|
217
|
+
showL2Chart: !this.state.showL2Chart
|
|
218
|
+
});
|
|
219
|
+
};
|
|
220
|
+
this.handleDataAnalysis = () => {
|
|
221
|
+
this.setState({
|
|
222
|
+
showL2ActTable: !this.state.showL2ActTable,
|
|
223
|
+
});
|
|
224
|
+
};
|
|
225
|
+
this.unHiden = () => {
|
|
226
|
+
const { ltmplConfig, } = this.props;
|
|
227
|
+
const { hiddenColIds, sortedColConfigs } = this.state;
|
|
228
|
+
this.setState({
|
|
229
|
+
hiddenRowCodes: [],
|
|
230
|
+
tableColumns: this.buildTableColumns(ltmplConfig, hiddenColIds, [], sortedColConfigs),
|
|
231
|
+
});
|
|
232
|
+
};
|
|
233
|
+
this.onHide = (code) => {
|
|
234
|
+
const { ltmplConfig, } = this.props;
|
|
235
|
+
const { hiddenRowCodes, hiddenColIds, sortedColConfigs } = this.state;
|
|
236
|
+
let hiddenCodes = [...hiddenRowCodes, code];
|
|
237
|
+
this.setState({
|
|
238
|
+
hiddenRowCodes: hiddenCodes,
|
|
239
|
+
tableColumns: this.buildTableColumns(ltmplConfig, hiddenColIds, hiddenCodes, sortedColConfigs),
|
|
240
|
+
});
|
|
241
|
+
};
|
|
242
|
+
this.changeViewModel = (viewModels) => {
|
|
243
|
+
this.setState({
|
|
244
|
+
viewModels
|
|
245
|
+
});
|
|
246
|
+
};
|
|
247
|
+
this.changeHiddenColumns = (hiddenColIds) => {
|
|
248
|
+
const { ltmplConfig } = this.props;
|
|
249
|
+
const { hiddenRowCodes, sortedColConfigs } = this.state;
|
|
250
|
+
this.setState({
|
|
251
|
+
showL2Chart: false,
|
|
252
|
+
hiddenColIds,
|
|
253
|
+
tableColumns: this.buildTableColumns(ltmplConfig, hiddenColIds, hiddenRowCodes, sortedColConfigs),
|
|
254
|
+
});
|
|
255
|
+
};
|
|
256
|
+
this.doSelectedAction = (actionId, codes, params) => __awaiter(this, void 0, void 0, function* () {
|
|
257
|
+
const { selectedRows } = this.state;
|
|
258
|
+
this.doAction(actionId, selectedRows, params);
|
|
259
|
+
});
|
|
260
|
+
this.doAction = (actionId, selectedRows, params) => __awaiter(this, void 0, void 0, function* () {
|
|
261
|
+
const { sourceId } = this.props;
|
|
262
|
+
const { hiddenColIds, hiddenRowCodes, sortedColConfigs } = this.state;
|
|
263
|
+
this.setState({
|
|
264
|
+
loading: true,
|
|
265
|
+
});
|
|
266
|
+
let result = yield HcserviceV3.postActions(actionId, selectedRows, params);
|
|
267
|
+
if (result) { //重新加载数据
|
|
268
|
+
this.loadData(hiddenColIds, hiddenRowCodes, sortedColConfigs);
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
this.setState({
|
|
272
|
+
loading: false,
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
this.doRowAction = (actionId, codes, params) => __awaiter(this, void 0, void 0, function* () {
|
|
277
|
+
this.doAction(actionId, [{ title: undefined, code: codes[0] }], params);
|
|
278
|
+
});
|
|
279
|
+
this.doDelete = () => __awaiter(this, void 0, void 0, function* () {
|
|
280
|
+
const { sourceId } = this.props;
|
|
281
|
+
const { selectedRows, hiddenColIds, hiddenRowCodes, sortedColConfigs } = this.state;
|
|
282
|
+
this.setState({
|
|
283
|
+
loading: true,
|
|
284
|
+
});
|
|
285
|
+
let result = yield HcserviceV3.deleteData(sourceId, selectedRows);
|
|
286
|
+
if (result) { //重新加载数据
|
|
287
|
+
this.loadData(hiddenColIds, hiddenRowCodes, sortedColConfigs);
|
|
288
|
+
}
|
|
289
|
+
else {
|
|
290
|
+
this.setState({
|
|
291
|
+
loading: false,
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
this.doDeleteByCode = (code) => __awaiter(this, void 0, void 0, function* () {
|
|
296
|
+
const { sourceId } = this.props;
|
|
297
|
+
const { hiddenColIds, hiddenRowCodes, sortedColConfigs } = this.state;
|
|
298
|
+
this.setState({
|
|
299
|
+
loading: true,
|
|
300
|
+
});
|
|
301
|
+
let result = yield HcserviceV3.deleteByCode(sourceId, [code]);
|
|
302
|
+
if (result) { //重新加载数据
|
|
303
|
+
this.loadData(hiddenColIds, hiddenRowCodes, sortedColConfigs);
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
this.setState({
|
|
307
|
+
loading: false,
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
this.doSelectedCQuery = (cqueryId) => __awaiter(this, void 0, void 0, function* () {
|
|
312
|
+
});
|
|
313
|
+
this.doJump = (jumpId, code) => __awaiter(this, void 0, void 0, function* () {
|
|
314
|
+
// const { sourceId} = this.props;
|
|
315
|
+
// const {hiddenColIds, hiddenRowCodes, sortedColConfigs} = this.state;
|
|
316
|
+
let result = yield HcserviceV3.postJumps(jumpId, code);
|
|
317
|
+
if (result.status === "success") {
|
|
318
|
+
let hydrocarbonToken = Units.hydrocarbonToken();
|
|
319
|
+
let url = result.url + "hydrocarbon_token=" + Units.hydrocarbonToken();
|
|
320
|
+
// console.log(url);
|
|
321
|
+
window.open(url);
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
this.doRowJump = (jumpId, code) => __awaiter(this, void 0, void 0, function* () {
|
|
325
|
+
this.doJump(jumpId, code);
|
|
326
|
+
});
|
|
327
|
+
this.doSelectedJump = (jumpId) => __awaiter(this, void 0, void 0, function* () {
|
|
328
|
+
const { selectedRows } = this.state;
|
|
329
|
+
if (selectedRows.length == 1) {
|
|
330
|
+
this.doJump(jumpId, selectedRows[0].code);
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
this.changeRowSelection = (selectedRows, selectedDatas) => {
|
|
334
|
+
this.setState({
|
|
335
|
+
selectedRows,
|
|
336
|
+
selectedDatas,
|
|
337
|
+
});
|
|
338
|
+
};
|
|
339
|
+
this.onChangeColSort = (sortedColConfigs) => {
|
|
340
|
+
const { ltmplConfig } = this.props;
|
|
341
|
+
const { hiddenRowCodes, hiddenColIds } = this.state;
|
|
342
|
+
this.setState({
|
|
343
|
+
sortedColConfigs,
|
|
344
|
+
tableColumns: this.buildTableColumns(ltmplConfig, hiddenColIds, hiddenRowCodes, sortedColConfigs),
|
|
345
|
+
});
|
|
346
|
+
};
|
|
347
|
+
this.renderHeaderButtons = () => {
|
|
348
|
+
let { hiddenColIds, queryKey, viewModels, sortedColConfigs, disabledColIds, showL2Chart, showL2ActTable } = this.state;
|
|
349
|
+
const { ltmplConfig, sourceId, doCreate, doSearch, menuId, funcMode } = this.props;
|
|
350
|
+
let { buttons } = ltmplConfig;
|
|
351
|
+
return React.createElement(React.Fragment, null,
|
|
352
|
+
funcMode == "common" && this.criteriaFormUseful() ?
|
|
353
|
+
React.createElement(Popover, { trigger: "click", content: this.renderCriteriaForm() },
|
|
354
|
+
React.createElement(Button, null,
|
|
355
|
+
React.createElement(SearchOutlined, null)))
|
|
356
|
+
: null,
|
|
357
|
+
buttons.includes("dtmplAdd") && doCreate ?
|
|
358
|
+
React.createElement(Tooltip, { title: '创建' },
|
|
359
|
+
React.createElement(Button, { onClick: () => doCreate() },
|
|
360
|
+
React.createElement(PlusOutlined, null)),
|
|
361
|
+
" ") : '',
|
|
362
|
+
buttons.includes("dtmplCustomAdd") && doCreate ?
|
|
363
|
+
React.createElement(Tooltip, { title: '创建' },
|
|
364
|
+
React.createElement(Button, { onClick: () => doCreate(true) },
|
|
365
|
+
React.createElement(PlusCircleOutlined, null)),
|
|
366
|
+
" ") : '',
|
|
367
|
+
buttons.includes("importLtmplExcel") ? React.createElement(Tooltip, { title: '导入' },
|
|
368
|
+
" ",
|
|
369
|
+
React.createElement(Button, { href: `#/${sourceId}/importer?menuId=${menuId}`, target: '_blank' },
|
|
370
|
+
React.createElement(UploadOutlined, null))) : '',
|
|
371
|
+
React.createElement(Popover, { content: React.createElement(ExportFrame //导出组件
|
|
372
|
+
, { queryKey: queryKey, title: ltmplConfig.title }), title: "导出", placement: "bottomRight", trigger: "click" },
|
|
373
|
+
React.createElement(Tooltip, { title: '导出' },
|
|
374
|
+
React.createElement(Button, { style: {
|
|
375
|
+
display: buttons.includes("exportLtmplExcel") ? "inline" : "none",
|
|
376
|
+
marginLeft: '5px'
|
|
377
|
+
} },
|
|
378
|
+
React.createElement(DownloadOutlined, null)))),
|
|
379
|
+
buttons.includes("showChart") ? React.createElement(Tooltip, { title: showL2Chart ? '隐藏图表' : '展示图表' },
|
|
380
|
+
React.createElement(Button, { onClick: this.handleShowChart },
|
|
381
|
+
React.createElement(LineChartOutlined, null))) : "",
|
|
382
|
+
buttons.includes("analysis") ? React.createElement(Tooltip, { title: showL2ActTable ? '隐藏数据分析' : '展示数据分析' },
|
|
383
|
+
React.createElement(Button, { onClick: this.handleDataAnalysis },
|
|
384
|
+
React.createElement(FundOutlined, null))) : "",
|
|
385
|
+
buttons.includes("reStat") ? React.createElement(Restat, { fields: ltmplConfig.reStatParams, sourceId: sourceId, onfinish: () => doSearch(null) }) : "",
|
|
386
|
+
React.createElement(Popover, { content: React.createElement(Checkbox.Group, { value: viewModels, onChange: this.changeViewModel },
|
|
387
|
+
React.createElement(Row, { style: { width: '120px' } },
|
|
388
|
+
React.createElement(Col, { span: 24 },
|
|
389
|
+
React.createElement(Checkbox, { value: 'table' }, "\u8868\u683C")),
|
|
390
|
+
React.createElement(Col, { span: 24 },
|
|
391
|
+
React.createElement(Checkbox, { value: 'verticalList' }, "\u7EB5\u5411\u5217\u8868")))), title: "\u89C6\u56FE", placement: "bottomRight", trigger: "click" },
|
|
392
|
+
React.createElement(Tooltip, { title: '选择视图' },
|
|
393
|
+
React.createElement(Button, null,
|
|
394
|
+
React.createElement(RetweetOutlined, null)))),
|
|
395
|
+
React.createElement(Popover, { content: React.createElement(ColumnSelector, { columns: sortedColConfigs, disabledColIds: disabledColIds, hiddenColIds: hiddenColIds, onChangeColSort: this.onChangeColSort, onChangeHiddenCols: this.changeHiddenColumns }), title: '排序和选择列', placement: "bottomRight", trigger: "click" },
|
|
396
|
+
React.createElement(Tooltip, { title: '点击排序和选择列' },
|
|
397
|
+
React.createElement(Button, null,
|
|
398
|
+
React.createElement(TableOutlined, null)))),
|
|
399
|
+
doSearch ?
|
|
400
|
+
React.createElement(Button, { className: "hoverbig", title: "\u5237\u65B0", onClick: () => {
|
|
401
|
+
doSearch(null);
|
|
402
|
+
} },
|
|
403
|
+
React.createElement(ReloadOutlined, null)) : "");
|
|
404
|
+
};
|
|
405
|
+
this.criteriaFormUseful = () => {
|
|
406
|
+
const { ltmplConfig } = this.props;
|
|
407
|
+
let { buttons, criterias, jumps, actions } = ltmplConfig;
|
|
408
|
+
if ((buttons.includes('query') && ((criterias && criterias.length > 0) || buttons.includes('drilling'))) ||
|
|
409
|
+
this.checkBoxUseful()) {
|
|
410
|
+
return true;
|
|
411
|
+
}
|
|
412
|
+
else {
|
|
413
|
+
return false;
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
this.checkBoxUseful = () => {
|
|
417
|
+
const { ltmplConfig } = this.props;
|
|
418
|
+
let { buttons, jumps, actions } = ltmplConfig;
|
|
419
|
+
if (buttons.includes('batchDelete') ||
|
|
420
|
+
(actions && actions.length > 0) || (jumps && jumps.length > 0)) {
|
|
421
|
+
return true;
|
|
422
|
+
}
|
|
423
|
+
else {
|
|
424
|
+
return false;
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
this.renderCriteriaForm = () => {
|
|
428
|
+
let { loading, selectedRows, selectedDatas } = this.state;
|
|
429
|
+
let { ltmplConfig, doSearch, criteriaData } = this.props;
|
|
430
|
+
return React.createElement(CriteriaForm, { loading: loading, selectedDatas: selectedDatas, selectedRows: selectedRows, ltmplConfig: ltmplConfig, data: criteriaData, doCQuery: this.doSelectedCQuery, doAction: this.doSelectedAction, doDelete: this.doDelete, doJump: this.doSelectedJump, doSearch: doSearch });
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
componentDidMount() {
|
|
434
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
435
|
+
const { ltmplConfig } = this.props;
|
|
436
|
+
let sortedColConfigs = undefined;
|
|
437
|
+
if (ltmplConfig) {
|
|
438
|
+
sortedColConfigs = [{ id: '10000', title: '排序' }, ...ltmplConfig.columns, { id: '20000', title: '隐藏' }];
|
|
439
|
+
}
|
|
440
|
+
this.loadData(defaultDisabledColIds, [], sortedColConfigs);
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
componentDidUpdate(prevProps) {
|
|
444
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
445
|
+
const { sourceId, criteriaData, ltmplConfig } = this.props;
|
|
446
|
+
let { ltmplConfig: preLtmplConfig, criteriaData: preCriteriaData, sourceId: preSourceId } = prevProps;
|
|
447
|
+
let { hiddenColIds, sortedColConfigs } = this.state;
|
|
448
|
+
if ((sourceId && preSourceId != sourceId) ||
|
|
449
|
+
(ltmplConfig && (!preLtmplConfig || ltmplConfig.id != preLtmplConfig.id)) ||
|
|
450
|
+
(Units.transQueryParamsToStr(criteriaData) != Units.transQueryParamsToStr(preCriteriaData))) {
|
|
451
|
+
if (ltmplConfig.id == preLtmplConfig.id) {
|
|
452
|
+
this.loadData(hiddenColIds, [], sortedColConfigs);
|
|
453
|
+
}
|
|
454
|
+
else {
|
|
455
|
+
let sColConfigs = undefined;
|
|
456
|
+
if (ltmplConfig) {
|
|
457
|
+
sColConfigs = [{ id: '10000', title: '排序' }, ...ltmplConfig.columns, { id: '20000', title: '隐藏' }];
|
|
458
|
+
}
|
|
459
|
+
this.setState({
|
|
460
|
+
viewModels: ['table'],
|
|
461
|
+
});
|
|
462
|
+
this.loadData(defaultDisabledColIds, [], sColConfigs);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
renderContent() {
|
|
468
|
+
let { queryKey, tableColumns, loading, selectedRows, hiddenRowCodes, viewModels, sortedColConfigs, hiddenColIds, showL2ActTable } = this.state;
|
|
469
|
+
let { sourceId, ltmplConfig, funcMode, title, collapsible, pageSize, pageNo, onChangePage } = this.props;
|
|
470
|
+
if (!ltmplConfig || !sourceId) {
|
|
471
|
+
return React.createElement(React.Fragment, null,
|
|
472
|
+
React.createElement(Card, { loading: loading }),
|
|
473
|
+
React.createElement(Table, { loading: loading }));
|
|
474
|
+
}
|
|
475
|
+
let { buttons } = ltmplConfig;
|
|
476
|
+
let displayCriteriaCard = false;
|
|
477
|
+
if (funcMode == 'simple' || funcMode == 'common') {
|
|
478
|
+
displayCriteriaCard = false;
|
|
479
|
+
}
|
|
480
|
+
else if (this.criteriaFormUseful()) {
|
|
481
|
+
displayCriteriaCard = true;
|
|
482
|
+
}
|
|
483
|
+
let columnConfigs = [];
|
|
484
|
+
if (sortedColConfigs) {
|
|
485
|
+
for (let colConfig of sortedColConfigs) {
|
|
486
|
+
if (!hiddenColIds.includes(colConfig.id)) {
|
|
487
|
+
columnConfigs.push(colConfig);
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
return (React.createElement(React.Fragment, null,
|
|
492
|
+
buttons.includes("analysis") && showL2ActTable ? React.createElement("div", null,
|
|
493
|
+
React.createElement(L2ActTable, { innerQueryKey: queryKey.key, sourceId: sourceId }),
|
|
494
|
+
React.createElement(Divider, { dashed: true, style: { borderTopColor: "#40a9ff", }, plain: true })) : "",
|
|
495
|
+
React.createElement("div", { className: "actTable" },
|
|
496
|
+
funcMode == 'complete' || funcMode == 'common' ?
|
|
497
|
+
collapsible ? null :
|
|
498
|
+
React.createElement("h3", null,
|
|
499
|
+
title ? title : ltmplConfig.title,
|
|
500
|
+
React.createElement("p", { className: "fr" }, this.renderHeaderButtons())) : null,
|
|
501
|
+
displayCriteriaCard ?
|
|
502
|
+
this.renderCriteriaForm() : null,
|
|
503
|
+
loading ? "" :
|
|
504
|
+
React.createElement(QueryTable, { onChangePage: onChangePage, viewModels: viewModels, columnConfigs: columnConfigs, maxSelectedRows: this.checkBoxUseful() ? 10000 : -1, selectedRows: selectedRows, columns: tableColumns, hiddenRowCodes: hiddenRowCodes, pageInfo: { pageNo: pageNo ? pageNo : 1, pageSize: pageSize ? pageSize : ltmplConfig.defaultPageSize }, queryKey: queryKey, onChangeRowSelection: this.changeRowSelection }))));
|
|
505
|
+
}
|
|
506
|
+
render() {
|
|
507
|
+
let { queryKey, loading } = this.state;
|
|
508
|
+
let { sourceId, ltmplConfig, title, collapsible, initCollapse } = this.props;
|
|
509
|
+
if (!ltmplConfig || !sourceId) {
|
|
510
|
+
return React.createElement(React.Fragment, null,
|
|
511
|
+
React.createElement(Card, { loading: loading }),
|
|
512
|
+
React.createElement(Table, { loading: loading }));
|
|
513
|
+
}
|
|
514
|
+
return React.createElement(React.Fragment, null,
|
|
515
|
+
" ",
|
|
516
|
+
collapsible ?
|
|
517
|
+
React.createElement(CollapseCard, { initCollapse: initCollapse, title: title ? title : ltmplConfig.title, id: queryKey + ltmplConfig.id, className: `hoverable`, headStyle: { background: "#f2f4f5" }, loading: loading, bodyStyle: { padding: '6px' },
|
|
518
|
+
//暂时注释掉,后续要支持配置。
|
|
519
|
+
extra: this.renderHeaderButtons() }, this.renderContent()) :
|
|
520
|
+
React.createElement(React.Fragment, null, this.renderContent()));
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
ActTable.defaultProps = {
|
|
524
|
+
criteriaData: {},
|
|
525
|
+
funcMode: 'complete',
|
|
526
|
+
collapsible: false,
|
|
527
|
+
initCollapse: false,
|
|
528
|
+
};
|
|
529
|
+
export default ActTable;
|
|
533
530
|
//# sourceMappingURL=act-table.js.map
|