aldehyde 0.2.197 → 0.2.199
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/LICENSE +201 -201
- package/README.md +2 -2
- package/lib/custom-page/def-custom-page.d.ts.map +1 -1
- package/lib/custom-page/dtmpl-custom-edit-modal-page.d.ts.map +1 -1
- package/lib/detail/dtmpl.css +57 -57
- package/lib/export/export-frame.css +2 -2
- package/lib/export/export-frame.d.ts.map +1 -1
- package/lib/export/select-code-export-frame.d.ts.map +1 -1
- package/lib/form/dtmpl-form.css +3 -3
- package/lib/form/dtmpl-form.d.ts.map +1 -1
- package/lib/form/field-group-form.d.ts.map +1 -1
- package/lib/form/form-Item-group.d.ts.map +1 -1
- package/lib/form/index.css +12 -12
- package/lib/hooks/useVarCssColor.d.ts.map +1 -1
- package/lib/import/excel-import.d.ts.map +1 -1
- package/lib/import/index.css +53 -53
- package/lib/import/template.css +50 -50
- package/lib/layout/common.css +64 -64
- package/lib/layout/coverstyle.css +51 -51
- package/lib/layout2/LayoutContext.d.ts.map +1 -1
- package/lib/locale/LocaleButton.d.ts.map +1 -1
- package/lib/locale/LocaleProvider.d.ts.map +1 -1
- package/lib/locale/langMp.d.ts.map +1 -1
- package/lib/locale/translate.d.ts.map +1 -1
- package/lib/locale/useLocale.d.ts.map +1 -1
- package/lib/login/index.css +19 -19
- package/lib/login/login.d.ts.map +1 -1
- package/lib/login2/Login.d.ts.map +1 -1
- package/lib/module/dtmpl-edit-card.d.ts.map +1 -1
- package/lib/module/dtmpl-edit-page.d.ts.map +1 -1
- package/lib/module/dtmpl-editor.d.ts.map +1 -1
- package/lib/module/dtmpl-view-card.d.ts.map +1 -1
- package/lib/module/embed-dtmpl-edit-page.d.ts.map +1 -1
- package/lib/module/ltmpl-modal.d.ts.map +1 -1
- package/lib/module/ltmpl-table.d.ts.map +1 -1
- package/lib/routable/dtmpl-route.d.ts.map +1 -1
- package/lib/routable/dtmpl-route.js +1 -1
- package/lib/routable/dtmpl-route.js.map +1 -1
- package/lib/routable/withroute.d.ts.map +1 -1
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/act-table.js +2 -1
- package/lib/table/act-table.js.map +1 -1
- package/lib/table/control-table-x-axis-wrapper.d.ts +2 -11
- package/lib/table/control-table-x-axis-wrapper.d.ts.map +1 -1
- package/lib/table/index.css +71 -71
- package/lib/table/l2-act-table.d.ts.map +1 -1
- package/lib/table/modal-select-table.d.ts.map +1 -1
- package/lib/table/pagination.css +14 -14
- package/lib/table/pagination.d.ts.map +1 -1
- package/lib/table/query-table.d.ts.map +1 -1
- package/lib/table/relation-table.d.ts.map +1 -1
- package/lib/table/select-table.d.ts.map +1 -1
- package/lib/table/selected-rows-card.d.ts.map +1 -1
- package/lib/tmpl/control-type-supportor.d.ts.map +1 -1
- package/lib/tmpl/hc-data-source.d.ts.map +1 -1
- package/lib/tmpl/hcservice-v3.d.ts.map +1 -1
- package/lib/tmpl/interface.d.ts +1 -0
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tmpl/interface.js.map +1 -1
- package/lib/tmpl/tmpl-config-analysis.d.ts.map +1 -1
- package/lib/tree/act-tree.d.ts.map +1 -1
- package/lib/tree/block-menu-auth-tree.d.ts.map +1 -1
- package/lib/tree/index.css +20 -20
- package/lib/tree/tmpl-tree.d.ts.map +1 -1
- package/lib/tree/tree-node.d.ts.map +1 -1
- package/lib/tree/tree-utils.d.ts.map +1 -1
- package/lib/utils/dsu.d.ts.map +1 -1
- package/lib/welcome/index.css +13 -13
- package/lib/welcome/quick-entrance.d.ts.map +1 -1
- package/lib/welcome/workbench.d.ts.map +1 -1
- package/package.json +206 -206
- package/src/aldehyde/controls/action/index.css +8 -8
- package/src/aldehyde/controls/action/index.tsx +396 -401
- package/src/aldehyde/controls/action/utils.tsx +307 -307
- package/src/aldehyde/controls/auto-complete/index.tsx +82 -82
- package/src/aldehyde/controls/cascader/index.tsx +112 -112
- package/src/aldehyde/controls/chemstruc/graph.tsx +184 -184
- package/src/aldehyde/controls/chemstruc/index.css +28 -28
- package/src/aldehyde/controls/code-editor/sql-code-editor.tsx +73 -73
- package/src/aldehyde/controls/collapse-card/index.css +8 -8
- package/src/aldehyde/controls/collapse-card/index.tsx +109 -109
- package/src/aldehyde/controls/color-picker/index.css +26 -26
- package/src/aldehyde/controls/color-picker/index.tsx +114 -114
- package/src/aldehyde/controls/counting-tag/index.tsx +53 -53
- package/src/aldehyde/controls/cquery/cquick-button.tsx +144 -144
- package/src/aldehyde/controls/date-picker/index.tsx +146 -146
- package/src/aldehyde/controls/entity-select/entity-select.tsx +724 -723
- package/src/aldehyde/controls/entity-select/index.css +6 -6
- package/src/aldehyde/controls/entity-select/lab-tree-select.tsx +154 -154
- package/src/aldehyde/controls/entity-select/popover-entity-select.tsx +190 -190
- package/src/aldehyde/controls/entry-control.tsx +359 -359
- package/src/aldehyde/controls/enum-badge/index.tsx +31 -31
- package/src/aldehyde/controls/enum-tag/index.tsx +35 -35
- package/src/aldehyde/controls/field-history/index.tsx +81 -81
- package/src/aldehyde/controls/file-export/select-code-export.tsx +40 -40
- package/src/aldehyde/controls/file-view/drawer-file-view.tsx +75 -75
- package/src/aldehyde/controls/file-view/index.tsx +142 -142
- package/src/aldehyde/controls/file-view/newin-file-view.tsx +40 -40
- package/src/aldehyde/controls/html-editor/draft.tsx +161 -161
- package/src/aldehyde/controls/html-editor/tinymce.js +54 -54
- package/src/aldehyde/controls/input-number/index.tsx +148 -148
- package/src/aldehyde/controls/input-range/index.tsx +59 -59
- package/src/aldehyde/controls/password-setter/index.css +2 -2
- package/src/aldehyde/controls/password-setter/index.js +88 -88
- package/src/aldehyde/controls/progress/index.tsx +74 -74
- package/src/aldehyde/controls/relation-existion/index.css +4 -4
- package/src/aldehyde/controls/relation-existion/index.tsx +140 -140
- package/src/aldehyde/controls/rfield/index.css +4 -4
- package/src/aldehyde/controls/rfield/index.tsx +226 -226
- package/src/aldehyde/controls/select/index.tsx +211 -211
- package/src/aldehyde/controls/signature/index.tsx +226 -226
- package/src/aldehyde/controls/steps/index.tsx +59 -59
- package/src/aldehyde/controls/text/ellipsis-text.tsx +96 -96
- package/src/aldehyde/controls/upload/index.tsx +138 -138
- package/src/aldehyde/controls/view-control.tsx +284 -284
- package/src/aldehyde/custom-page/custom-page-router.tsx +75 -75
- package/src/aldehyde/custom-page/def-custom-page.tsx +17 -17
- package/src/aldehyde/custom-page/dtmpl-custom-edit-modal-page.tsx +87 -87
- package/src/aldehyde/detail/button/bottom-submit-button-bar.tsx +90 -90
- package/src/aldehyde/detail/button/cquery-button-bar.tsx +144 -144
- package/src/aldehyde/detail/button/edit-button.tsx +62 -62
- package/src/aldehyde/detail/button/fix-right-submit-button-bar.tsx +178 -178
- package/src/aldehyde/detail/button/index.css +42 -42
- package/src/aldehyde/detail/button/submit-button-bar.tsx +56 -56
- package/src/aldehyde/detail/button/view-button.tsx +61 -61
- package/src/aldehyde/detail/dtmpl.css +57 -57
- package/src/aldehyde/detail/edit/dtmpl-edit.tsx +267 -267
- package/src/aldehyde/detail/edit/fields-edit-card.tsx +143 -143
- package/src/aldehyde/detail/edit/modal-row-edit.tsx +94 -94
- package/src/aldehyde/detail/edit/post-result/index.tsx +85 -85
- package/src/aldehyde/detail/edit/row-edit-card.tsx +179 -179
- package/src/aldehyde/detail/edit/row-editor.tsx +72 -72
- package/src/aldehyde/detail/rightbar/index.css +34 -34
- package/src/aldehyde/detail/rightbar/index.tsx +92 -92
- package/src/aldehyde/detail/tooltipbar/index.tsx +32 -32
- package/src/aldehyde/detail/view/act-dtmpl-view.tsx +286 -271
- package/src/aldehyde/detail/view/dtmpl-view.tsx +319 -319
- package/src/aldehyde/detail/view/field-view-group.tsx +83 -83
- package/src/aldehyde/detail/view/modal-dtmpl-view.tsx +72 -72
- package/src/aldehyde/detail/view/snapshot-timeline.tsx +164 -164
- package/src/aldehyde/export/export-frame.css +2 -2
- package/src/aldehyde/export/export-frame.tsx +299 -299
- package/src/aldehyde/export/select-code-export-frame.tsx +218 -218
- package/src/aldehyde/form/criteria-form.tsx +488 -488
- package/src/aldehyde/form/dtmpl-form.css +3 -3
- package/src/aldehyde/form/dtmpl-form.tsx +502 -502
- package/src/aldehyde/form/field-group-form.tsx +98 -98
- package/src/aldehyde/form/fields-form.tsx +44 -44
- package/src/aldehyde/form/form-Item-group.tsx +211 -211
- package/src/aldehyde/form/index.css +12 -12
- package/src/aldehyde/hooks/useVarCssColor.ts +6 -6
- package/src/aldehyde/icon/index.tsx +28 -28
- package/src/aldehyde/import/excel-import.tsx +450 -450
- package/src/aldehyde/import/index.css +53 -53
- package/src/aldehyde/import/template.css +50 -50
- package/src/aldehyde/index.tsx +176 -176
- package/src/aldehyde/layout/MainPage.tsx +334 -334
- package/src/aldehyde/layout/common.css +64 -64
- package/src/aldehyde/layout/coverstyle.css +51 -51
- package/src/aldehyde/layout/footer/index.css +5 -5
- package/src/aldehyde/layout/footer/index.js +17 -17
- package/src/aldehyde/layout/header/index.css +122 -122
- package/src/aldehyde/layout/header/index.tsx +145 -145
- package/src/aldehyde/layout/menu/block.css +7 -7
- package/src/aldehyde/layout/menu/block.tsx +174 -174
- package/src/aldehyde/layout/menu/l2menu-message-bar.tsx +161 -161
- package/src/aldehyde/layout/menu/l2menu-quick-bar.tsx +159 -159
- package/src/aldehyde/layout/menu/menu-2layers.tsx +117 -117
- package/src/aldehyde/layout/menu/menu-render.tsx +165 -165
- package/src/aldehyde/layout/menu/reset-password.tsx +255 -255
- package/src/aldehyde/layout/menu/user-bar.tsx +258 -258
- package/src/aldehyde/layout/menu/userinfo-bar.tsx +69 -69
- package/src/aldehyde/layout/sidebar/index.css +57 -57
- package/src/aldehyde/layout/sidebar/index.tsx +85 -85
- package/src/aldehyde/layout2/LayoutContext.tsx +95 -95
- package/src/aldehyde/layout2/components/userButton.tsx +171 -171
- package/src/aldehyde/layout2/css/header.css +38 -38
- package/src/aldehyde/layout2/header.tsx +371 -371
- package/src/aldehyde/layout2/main.tsx +27 -27
- package/src/aldehyde/layout2/page.tsx +189 -189
- package/src/aldehyde/layout2/sider.tsx +335 -335
- package/src/aldehyde/layout2/type/layout.type.ts +10 -10
- package/src/aldehyde/layout2/util/menu.util.tsx +122 -122
- package/src/aldehyde/locale/LocaleButton.tsx +47 -47
- package/src/aldehyde/locale/LocaleProvider.tsx +204 -204
- package/src/aldehyde/locale/langMp.ts +45 -45
- package/src/aldehyde/locale/translate.ts +80 -80
- package/src/aldehyde/locale/useLocale.ts +56 -56
- package/src/aldehyde/login/context-setter.tsx +130 -130
- package/src/aldehyde/login/index.css +19 -19
- package/src/aldehyde/login/login.tsx +252 -252
- package/src/aldehyde/login/router-login.tsx +107 -107
- package/src/aldehyde/login/vertify/index.css +143 -143
- package/src/aldehyde/login/vertify/index.tsx +360 -360
- package/src/aldehyde/login/vertify/tool.ts +13 -13
- package/src/aldehyde/login2/Login.tsx +203 -203
- package/src/aldehyde/login2/LoginPage.tsx +64 -64
- package/src/aldehyde/login2/index.tsx +4 -4
- package/src/aldehyde/module/block-menu-tree-drawer.tsx +116 -116
- package/src/aldehyde/module/criteria-page.tsx1 +175 -175
- package/src/aldehyde/module/dtmpl-edit-card.tsx +313 -313
- package/src/aldehyde/module/dtmpl-edit-drawer.tsx +23 -23
- package/src/aldehyde/module/dtmpl-edit-modal.tsx +25 -25
- package/src/aldehyde/module/dtmpl-edit-page.tsx +396 -396
- package/src/aldehyde/module/dtmpl-editor.tsx +162 -162
- package/src/aldehyde/module/dtmpl-view-card.tsx +73 -73
- package/src/aldehyde/module/dtmpl-view-drawer.tsx +64 -64
- package/src/aldehyde/module/dtmpl-view-modal.tsx +53 -53
- package/src/aldehyde/module/embed-dtmpl-edit-page.tsx +137 -137
- package/src/aldehyde/module/ltmpl-drawer.tsx +57 -57
- package/src/aldehyde/module/ltmpl-modal.tsx +62 -62
- package/src/aldehyde/module/ltmpl-table.tsx +375 -375
- package/src/aldehyde/routable/dtmpl-route.tsx +166 -165
- package/src/aldehyde/routable/import-route.tsx +34 -34
- package/src/aldehyde/routable/ltmpl-route.tsx +436 -436
- package/src/aldehyde/routable/ttmpl-route.tsx +95 -95
- package/src/aldehyde/routable/withroute.tsx +25 -25
- package/src/aldehyde/table/act-table.tsx +1737 -1732
- package/src/aldehyde/table/column/column-selector.tsx +130 -130
- package/src/aldehyde/table/column/index.css +13 -13
- package/src/aldehyde/table/control-table-x-axis-wrapper.tsx +80 -80
- package/src/aldehyde/table/index.css +71 -71
- package/src/aldehyde/table/l2-act-table.tsx +91 -91
- package/src/aldehyde/table/modal-select-table.tsx +278 -278
- package/src/aldehyde/table/pagination.css +14 -14
- package/src/aldehyde/table/pagination.tsx +76 -76
- package/src/aldehyde/table/query-table.tsx +1421 -1421
- package/src/aldehyde/table/relation-table.tsx +855 -855
- package/src/aldehyde/table/select-table.tsx +272 -272
- package/src/aldehyde/table/selected-rows-card.tsx +75 -75
- package/src/aldehyde/table/stat/restat.tsx +123 -123
- package/src/aldehyde/table/table-util.tsx +25 -25
- package/src/aldehyde/tmpl/control-type-supportor.tsx +111 -111
- package/src/aldehyde/tmpl/hc-data-source.tsx +514 -514
- package/src/aldehyde/tmpl/hcservice-v3.tsx +1226 -1226
- package/src/aldehyde/tmpl/interface.tsx +614 -612
- package/src/aldehyde/tmpl/model-struc-v3.tsx +107 -107
- package/src/aldehyde/tmpl/superagent.js +165 -165
- package/src/aldehyde/tmpl/tmpl-config-analysis.tsx +342 -342
- package/src/aldehyde/tree/act-tree.tsx +220 -220
- package/src/aldehyde/tree/block-menu-auth-tree.tsx +187 -187
- package/src/aldehyde/tree/index.css +20 -20
- package/src/aldehyde/tree/tmpl-tree.tsx +678 -678
- package/src/aldehyde/tree/tree-node.tsx +73 -73
- package/src/aldehyde/tree/tree-utils.tsx +170 -170
- package/src/aldehyde/units/EncryptUtils.js +37 -37
- package/src/aldehyde/units/image.d.ts +7 -7
- package/src/aldehyde/units/index.tsx +978 -978
- package/src/aldehyde/units/storage.js +2 -2
- package/src/aldehyde/utils/dsu.ts +27 -27
- package/src/aldehyde/welcome/HCWelcome.js +321 -321
- package/src/aldehyde/welcome/HCWelcome1.js +259 -259
- package/src/aldehyde/welcome/index.css +13 -13
- package/src/aldehyde/welcome/quick-entrance.tsx +98 -98
- package/src/aldehyde/welcome/workbench.tsx +100 -100
- package/lib/controls/action/index.css +0 -9
- package/lib/controls/action/index.d.ts +0 -67
- package/lib/controls/action/index.d.ts.map +0 -1
- package/lib/controls/action/index.js +0 -243
- package/lib/controls/action/index.js.map +0 -1
- package/lib/controls/action/utils.d.ts +0 -15
- package/lib/controls/action/utils.d.ts.map +0 -1
- package/lib/controls/action/utils.js +0 -262
- package/lib/controls/action/utils.js.map +0 -1
- package/lib/controls/auto-complete/index.d.ts +0 -7
- package/lib/controls/auto-complete/index.d.ts.map +0 -1
- package/lib/controls/auto-complete/index.js +0 -58
- package/lib/controls/auto-complete/index.js.map +0 -1
- package/lib/controls/cascader/index.d.ts +0 -23
- package/lib/controls/cascader/index.d.ts.map +0 -1
- package/lib/controls/cascader/index.js +0 -108
- package/lib/controls/cascader/index.js.map +0 -1
- package/lib/controls/chemstruc/graph.d.ts +0 -40
- package/lib/controls/chemstruc/graph.d.ts.map +0 -1
- package/lib/controls/chemstruc/graph.js +0 -133
- package/lib/controls/chemstruc/graph.js.map +0 -1
- package/lib/controls/chemstruc/index.css +0 -28
- package/lib/controls/code-editor/sql-code-editor.d.ts +0 -15
- package/lib/controls/code-editor/sql-code-editor.d.ts.map +0 -1
- package/lib/controls/code-editor/sql-code-editor.js +0 -53
- package/lib/controls/code-editor/sql-code-editor.js.map +0 -1
- package/lib/controls/collapse-card/index.css +0 -9
- package/lib/controls/collapse-card/index.d.ts +0 -33
- package/lib/controls/collapse-card/index.d.ts.map +0 -1
- package/lib/controls/collapse-card/index.js +0 -74
- package/lib/controls/collapse-card/index.js.map +0 -1
- package/lib/controls/color-picker/index.css +0 -27
- package/lib/controls/color-picker/index.d.ts +0 -30
- package/lib/controls/color-picker/index.d.ts.map +0 -1
- package/lib/controls/color-picker/index.js +0 -64
- package/lib/controls/color-picker/index.js.map +0 -1
- package/lib/controls/counting-tag/index.d.ts +0 -20
- package/lib/controls/counting-tag/index.d.ts.map +0 -1
- package/lib/controls/counting-tag/index.js +0 -37
- package/lib/controls/counting-tag/index.js.map +0 -1
- package/lib/controls/cquery/cquick-button.d.ts +0 -36
- package/lib/controls/cquery/cquick-button.d.ts.map +0 -1
- package/lib/controls/cquery/cquick-button.js +0 -75
- package/lib/controls/cquery/cquick-button.js.map +0 -1
- package/lib/controls/date-picker/index.d.ts +0 -7
- package/lib/controls/date-picker/index.d.ts.map +0 -1
- package/lib/controls/date-picker/index.js +0 -91
- package/lib/controls/date-picker/index.js.map +0 -1
- package/lib/controls/entity-select/entity-select.d.ts +0 -87
- package/lib/controls/entity-select/entity-select.d.ts.map +0 -1
- package/lib/controls/entity-select/entity-select.js +0 -475
- package/lib/controls/entity-select/entity-select.js.map +0 -1
- package/lib/controls/entity-select/index.css +0 -6
- package/lib/controls/entity-select/lab-tree-select.d.ts +0 -36
- package/lib/controls/entity-select/lab-tree-select.d.ts.map +0 -1
- package/lib/controls/entity-select/lab-tree-select.js +0 -127
- package/lib/controls/entity-select/lab-tree-select.js.map +0 -1
- package/lib/controls/entity-select/popover-entity-select.d.ts +0 -33
- package/lib/controls/entity-select/popover-entity-select.d.ts.map +0 -1
- package/lib/controls/entity-select/popover-entity-select.js +0 -114
- package/lib/controls/entity-select/popover-entity-select.js.map +0 -1
- package/lib/controls/enum-badge/index.d.ts +0 -7
- package/lib/controls/enum-badge/index.d.ts.map +0 -1
- package/lib/controls/enum-badge/index.js +0 -14
- package/lib/controls/enum-badge/index.js.map +0 -1
- package/lib/controls/enum-tag/index.d.ts +0 -7
- package/lib/controls/enum-tag/index.d.ts.map +0 -1
- package/lib/controls/enum-tag/index.js +0 -27
- package/lib/controls/enum-tag/index.js.map +0 -1
- package/lib/controls/field-history/index.d.ts +0 -8
- package/lib/controls/field-history/index.d.ts.map +0 -1
- package/lib/controls/field-history/index.js +0 -67
- package/lib/controls/field-history/index.js.map +0 -1
- package/lib/controls/file-export/select-code-export.d.ts +0 -13
- package/lib/controls/file-export/select-code-export.d.ts.map +0 -1
- package/lib/controls/file-export/select-code-export.js +0 -14
- package/lib/controls/file-export/select-code-export.js.map +0 -1
- package/lib/controls/file-view/drawer-file-view.d.ts +0 -23
- package/lib/controls/file-view/drawer-file-view.d.ts.map +0 -1
- package/lib/controls/file-view/drawer-file-view.js +0 -49
- package/lib/controls/file-view/drawer-file-view.js.map +0 -1
- package/lib/controls/file-view/index.d.ts +0 -30
- package/lib/controls/file-view/index.d.ts.map +0 -1
- package/lib/controls/file-view/index.js +0 -122
- package/lib/controls/file-view/index.js.map +0 -1
- package/lib/controls/file-view/newin-file-view.d.ts +0 -18
- package/lib/controls/file-view/newin-file-view.d.ts.map +0 -1
- package/lib/controls/file-view/newin-file-view.js +0 -28
- package/lib/controls/file-view/newin-file-view.js.map +0 -1
- package/lib/controls/html-editor/draft.d.ts +0 -22
- package/lib/controls/html-editor/draft.d.ts.map +0 -1
- package/lib/controls/html-editor/draft.js +0 -122
- package/lib/controls/html-editor/draft.js.map +0 -1
- package/lib/controls/html-editor/tinymce.d.ts +0 -13
- package/lib/controls/html-editor/tinymce.d.ts.map +0 -1
- package/lib/controls/html-editor/tinymce.js +0 -47
- package/lib/controls/html-editor/tinymce.js.map +0 -1
- package/lib/controls/input-number/index.d.ts +0 -7
- package/lib/controls/input-number/index.d.ts.map +0 -1
- package/lib/controls/input-number/index.js +0 -77
- package/lib/controls/input-number/index.js.map +0 -1
- package/lib/controls/input-range/index.d.ts +0 -7
- package/lib/controls/input-range/index.d.ts.map +0 -1
- package/lib/controls/input-range/index.js +0 -29
- package/lib/controls/input-range/index.js.map +0 -1
- package/lib/controls/password-setter/index.css +0 -3
- package/lib/controls/password-setter/index.d.ts +0 -17
- package/lib/controls/password-setter/index.d.ts.map +0 -1
- package/lib/controls/password-setter/index.js +0 -59
- package/lib/controls/password-setter/index.js.map +0 -1
- package/lib/controls/progress/index.d.ts +0 -7
- package/lib/controls/progress/index.d.ts.map +0 -1
- package/lib/controls/progress/index.js +0 -52
- package/lib/controls/progress/index.js.map +0 -1
- package/lib/controls/relation-existion/index.css +0 -4
- package/lib/controls/relation-existion/index.d.ts +0 -31
- package/lib/controls/relation-existion/index.d.ts.map +0 -1
- package/lib/controls/relation-existion/index.js +0 -87
- package/lib/controls/relation-existion/index.js.map +0 -1
- package/lib/controls/rfield/index.css +0 -4
- package/lib/controls/rfield/index.d.ts +0 -41
- package/lib/controls/rfield/index.d.ts.map +0 -1
- package/lib/controls/rfield/index.js +0 -149
- package/lib/controls/rfield/index.js.map +0 -1
- package/lib/controls/select/index.d.ts +0 -30
- package/lib/controls/select/index.d.ts.map +0 -1
- package/lib/controls/select/index.js +0 -145
- package/lib/controls/select/index.js.map +0 -1
- package/lib/controls/signature/index.d.ts +0 -42
- package/lib/controls/signature/index.d.ts.map +0 -1
- package/lib/controls/signature/index.js +0 -155
- package/lib/controls/signature/index.js.map +0 -1
- package/lib/controls/steps/index.d.ts +0 -8
- package/lib/controls/steps/index.d.ts.map +0 -1
- package/lib/controls/steps/index.js +0 -47
- package/lib/controls/steps/index.js.map +0 -1
- package/lib/controls/text/ellipsis-text.d.ts +0 -31
- package/lib/controls/text/ellipsis-text.d.ts.map +0 -1
- package/lib/controls/text/ellipsis-text.js +0 -48
- package/lib/controls/text/ellipsis-text.js.map +0 -1
- package/lib/controls/upload/index.d.ts +0 -26
- package/lib/controls/upload/index.d.ts.map +0 -1
- package/lib/controls/upload/index.js +0 -109
- package/lib/controls/upload/index.js.map +0 -1
- package/lib/detail/button/bottom-submit-button-bar.d.ts +0 -24
- package/lib/detail/button/bottom-submit-button-bar.d.ts.map +0 -1
- package/lib/detail/button/bottom-submit-button-bar.js +0 -38
- package/lib/detail/button/bottom-submit-button-bar.js.map +0 -1
- package/lib/detail/button/cquery-button-bar.d.ts +0 -28
- package/lib/detail/button/cquery-button-bar.d.ts.map +0 -1
- package/lib/detail/button/cquery-button-bar.js +0 -79
- package/lib/detail/button/cquery-button-bar.js.map +0 -1
- package/lib/detail/button/edit-button.d.ts +0 -11
- package/lib/detail/button/edit-button.d.ts.map +0 -1
- package/lib/detail/button/edit-button.js +0 -29
- package/lib/detail/button/edit-button.js.map +0 -1
- package/lib/detail/button/fix-right-submit-button-bar.d.ts +0 -26
- package/lib/detail/button/fix-right-submit-button-bar.d.ts.map +0 -1
- package/lib/detail/button/fix-right-submit-button-bar.js +0 -93
- package/lib/detail/button/fix-right-submit-button-bar.js.map +0 -1
- package/lib/detail/button/index.css +0 -43
- package/lib/detail/button/submit-button-bar.d.ts +0 -22
- package/lib/detail/button/submit-button-bar.d.ts.map +0 -1
- package/lib/detail/button/submit-button-bar.js +0 -22
- package/lib/detail/button/submit-button-bar.js.map +0 -1
- package/lib/detail/button/view-button.d.ts +0 -11
- package/lib/detail/button/view-button.d.ts.map +0 -1
- package/lib/detail/button/view-button.js +0 -28
- package/lib/detail/button/view-button.js.map +0 -1
- package/lib/detail/edit/dtmpl-edit.d.ts +0 -48
- package/lib/detail/edit/dtmpl-edit.d.ts.map +0 -1
- package/lib/detail/edit/dtmpl-edit.js +0 -236
- package/lib/detail/edit/dtmpl-edit.js.map +0 -1
- package/lib/detail/edit/fields-edit-card.d.ts +0 -51
- package/lib/detail/edit/fields-edit-card.d.ts.map +0 -1
- package/lib/detail/edit/fields-edit-card.js +0 -63
- package/lib/detail/edit/fields-edit-card.js.map +0 -1
- package/lib/detail/edit/modal-row-edit.d.ts +0 -43
- package/lib/detail/edit/modal-row-edit.d.ts.map +0 -1
- package/lib/detail/edit/modal-row-edit.js +0 -60
- package/lib/detail/edit/modal-row-edit.js.map +0 -1
- package/lib/detail/edit/post-result/index.d.ts +0 -17
- package/lib/detail/edit/post-result/index.d.ts.map +0 -1
- package/lib/detail/edit/post-result/index.js +0 -33
- package/lib/detail/edit/post-result/index.js.map +0 -1
- package/lib/detail/edit/row-edit-card.d.ts +0 -54
- package/lib/detail/edit/row-edit-card.d.ts.map +0 -1
- package/lib/detail/edit/row-edit-card.js +0 -83
- package/lib/detail/edit/row-edit-card.js.map +0 -1
- package/lib/detail/edit/row-editor.d.ts +0 -33
- package/lib/detail/edit/row-editor.d.ts.map +0 -1
- package/lib/detail/edit/row-editor.js +0 -57
- package/lib/detail/edit/row-editor.js.map +0 -1
- package/lib/detail/rightbar/index.css +0 -35
- package/lib/detail/rightbar/index.d.ts +0 -31
- package/lib/detail/rightbar/index.d.ts.map +0 -1
- package/lib/detail/rightbar/index.js +0 -59
- package/lib/detail/rightbar/index.js.map +0 -1
- package/lib/detail/tooltipbar/index.d.ts +0 -19
- package/lib/detail/tooltipbar/index.d.ts.map +0 -1
- package/lib/detail/tooltipbar/index.js +0 -29
- package/lib/detail/tooltipbar/index.js.map +0 -1
- package/lib/detail/view/act-dtmpl-view.d.ts +0 -64
- package/lib/detail/view/act-dtmpl-view.d.ts.map +0 -1
- package/lib/detail/view/act-dtmpl-view.js +0 -152
- package/lib/detail/view/act-dtmpl-view.js.map +0 -1
- package/lib/detail/view/dtmpl-view.d.ts +0 -43
- package/lib/detail/view/dtmpl-view.d.ts.map +0 -1
- package/lib/detail/view/dtmpl-view.js +0 -164
- package/lib/detail/view/dtmpl-view.js.map +0 -1
- package/lib/detail/view/field-view-group.d.ts +0 -30
- package/lib/detail/view/field-view-group.d.ts.map +0 -1
- package/lib/detail/view/field-view-group.js +0 -45
- package/lib/detail/view/field-view-group.js.map +0 -1
- package/lib/detail/view/modal-dtmpl-view.d.ts +0 -40
- package/lib/detail/view/modal-dtmpl-view.d.ts.map +0 -1
- package/lib/detail/view/modal-dtmpl-view.js +0 -34
- package/lib/detail/view/modal-dtmpl-view.js.map +0 -1
- package/lib/detail/view/snapshot-timeline.d.ts +0 -44
- package/lib/detail/view/snapshot-timeline.d.ts.map +0 -1
- package/lib/detail/view/snapshot-timeline.js +0 -92
- package/lib/detail/view/snapshot-timeline.js.map +0 -1
- package/lib/index.d.ts +0 -51
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -116
- package/lib/index.js.map +0 -1
- package/lib/layout/footer/index.css +0 -6
- package/lib/layout/footer/index.d.ts +0 -7
- package/lib/layout/footer/index.d.ts.map +0 -1
- package/lib/layout/footer/index.js +0 -12
- package/lib/layout/footer/index.js.map +0 -1
- package/lib/layout/header/index.css +0 -122
- package/lib/layout/header/index.d.ts +0 -10
- package/lib/layout/header/index.d.ts.map +0 -1
- package/lib/layout/header/index.js +0 -62
- package/lib/layout/header/index.js.map +0 -1
- package/lib/layout/menu/block.css +0 -7
- package/lib/layout/menu/block.d.ts +0 -33
- package/lib/layout/menu/block.d.ts.map +0 -1
- package/lib/layout/menu/block.js +0 -128
- package/lib/layout/menu/block.js.map +0 -1
- package/lib/layout/menu/l2menu-message-bar.d.ts +0 -28
- package/lib/layout/menu/l2menu-message-bar.d.ts.map +0 -1
- package/lib/layout/menu/l2menu-message-bar.js +0 -114
- package/lib/layout/menu/l2menu-message-bar.js.map +0 -1
- package/lib/layout/menu/l2menu-quick-bar.d.ts +0 -45
- package/lib/layout/menu/l2menu-quick-bar.d.ts.map +0 -1
- package/lib/layout/menu/l2menu-quick-bar.js +0 -108
- package/lib/layout/menu/l2menu-quick-bar.js.map +0 -1
- package/lib/layout/menu/menu-2layers.d.ts +0 -26
- package/lib/layout/menu/menu-2layers.d.ts.map +0 -1
- package/lib/layout/menu/menu-2layers.js +0 -95
- package/lib/layout/menu/menu-2layers.js.map +0 -1
- package/lib/layout/menu/menu-render.d.ts +0 -14
- package/lib/layout/menu/menu-render.d.ts.map +0 -1
- package/lib/layout/menu/menu-render.js +0 -159
- package/lib/layout/menu/menu-render.js.map +0 -1
- package/lib/layout/menu/reset-password.d.ts +0 -38
- package/lib/layout/menu/reset-password.d.ts.map +0 -1
- package/lib/layout/menu/reset-password.js +0 -143
- package/lib/layout/menu/reset-password.js.map +0 -1
- package/lib/layout/menu/user-bar.d.ts +0 -50
- package/lib/layout/menu/user-bar.d.ts.map +0 -1
- package/lib/layout/menu/user-bar.js +0 -161
- package/lib/layout/menu/user-bar.js.map +0 -1
- package/lib/layout/menu/userinfo-bar.d.ts +0 -34
- package/lib/layout/menu/userinfo-bar.d.ts.map +0 -1
- package/lib/layout/menu/userinfo-bar.js +0 -49
- package/lib/layout/menu/userinfo-bar.js.map +0 -1
- package/lib/layout/sidebar/index.css +0 -57
- package/lib/layout/sidebar/index.d.ts +0 -12
- package/lib/layout/sidebar/index.d.ts.map +0 -1
- package/lib/layout/sidebar/index.js +0 -45
- package/lib/layout/sidebar/index.js.map +0 -1
- package/lib/layout/sidebar/logo.png +0 -0
- package/lib/layout2/components/userButton.d.ts +0 -5
- package/lib/layout2/components/userButton.d.ts.map +0 -1
- package/lib/layout2/components/userButton.js +0 -133
- package/lib/layout2/components/userButton.js.map +0 -1
- package/lib/layout2/css/header.css +0 -38
- package/lib/layout2/imgs/home.png +0 -0
- package/lib/layout2/type/layout.type.d.ts +0 -10
- package/lib/layout2/type/layout.type.d.ts.map +0 -1
- package/lib/layout2/type/layout.type.js +0 -2
- package/lib/layout2/type/layout.type.js.map +0 -1
- package/lib/layout2/util/menu.util.d.ts +0 -28
- package/lib/layout2/util/menu.util.d.ts.map +0 -1
- package/lib/layout2/util/menu.util.js +0 -85
- package/lib/layout2/util/menu.util.js.map +0 -1
- package/lib/login/vertify/index.css +0 -144
- package/lib/login/vertify/index.d.ts +0 -78
- package/lib/login/vertify/index.d.ts.map +0 -1
- package/lib/login/vertify/index.js +0 -210
- package/lib/login/vertify/index.js.map +0 -1
- package/lib/login/vertify/tool.d.ts +0 -5
- package/lib/login/vertify/tool.d.ts.map +0 -1
- package/lib/login/vertify/tool.js +0 -11
- package/lib/login/vertify/tool.js.map +0 -1
- package/lib/login2/img/login-bg.png +0 -0
- package/lib/table/column/column-selector.d.ts +0 -25
- package/lib/table/column/column-selector.d.ts.map +0 -1
- package/lib/table/column/column-selector.js +0 -62
- package/lib/table/column/column-selector.js.map +0 -1
- package/lib/table/column/index.css +0 -14
- package/lib/table/stat/restat.d.ts +0 -38
- package/lib/table/stat/restat.d.ts.map +0 -1
- package/lib/table/stat/restat.js +0 -62
- package/lib/table/stat/restat.js.map +0 -1
- package/lib/welcome/img/development.png +0 -0
- package/lib/welcome/img/pain-point.png +0 -0
- package/lib/welcome/img/target.png +0 -0
- package/lib/welcome/img/time-cost.png +0 -0
- package/lib/welcome/img/time-prograss.png +0 -0
- package/lib/welcome/img/welcome.png +0 -0
|
@@ -1,1732 +1,1737 @@
|
|
|
1
|
-
import React, { ReactNode, ReactDOM } from "react";
|
|
2
|
-
import {
|
|
3
|
-
Button,
|
|
4
|
-
Card,
|
|
5
|
-
Checkbox,
|
|
6
|
-
Col,
|
|
7
|
-
Collapse,
|
|
8
|
-
Divider,
|
|
9
|
-
Popconfirm,
|
|
10
|
-
Popover,
|
|
11
|
-
Row,
|
|
12
|
-
Space,
|
|
13
|
-
Drawer,
|
|
14
|
-
Modal,
|
|
15
|
-
Tooltip,
|
|
16
|
-
message,
|
|
17
|
-
} from "antd";
|
|
18
|
-
import HCService from "../tmpl/hcservice-v3";
|
|
19
|
-
import Table from "./control-table-x-axis-wrapper";
|
|
20
|
-
import {
|
|
21
|
-
AlignCenterOutlined,
|
|
22
|
-
AlignLeftOutlined,
|
|
23
|
-
CaretDownOutlined,
|
|
24
|
-
CaretUpOutlined,
|
|
25
|
-
CopyOutlined,
|
|
26
|
-
DeleteOutlined,
|
|
27
|
-
DownloadOutlined,
|
|
28
|
-
EditOutlined,
|
|
29
|
-
EyeInvisibleOutlined,
|
|
30
|
-
EyeOutlined,
|
|
31
|
-
FormOutlined,
|
|
32
|
-
FundOutlined,
|
|
33
|
-
KeyOutlined,
|
|
34
|
-
LineChartOutlined,
|
|
35
|
-
MenuOutlined,
|
|
36
|
-
PlusCircleOutlined,
|
|
37
|
-
PlusOutlined,
|
|
38
|
-
ReloadOutlined,
|
|
39
|
-
RetweetOutlined,
|
|
40
|
-
SearchOutlined,
|
|
41
|
-
TableOutlined,
|
|
42
|
-
UploadOutlined,
|
|
43
|
-
} from "@ant-design/icons";
|
|
44
|
-
import "./index.css";
|
|
45
|
-
import {
|
|
46
|
-
ActTableMode,
|
|
47
|
-
ActTableViewModel,
|
|
48
|
-
AddOrUpdate,
|
|
49
|
-
BuiltInButtonName,
|
|
50
|
-
ClassAddConfig,
|
|
51
|
-
ColumnConfig,
|
|
52
|
-
CustomButton,
|
|
53
|
-
DoEditParam,
|
|
54
|
-
DtmplData,
|
|
55
|
-
JumpConfig,
|
|
56
|
-
LtmplConfig,
|
|
57
|
-
QueryKey,
|
|
58
|
-
SelectedRow,
|
|
59
|
-
ShowViewParam,
|
|
60
|
-
TmplBaseProps,
|
|
61
|
-
} from "../tmpl/interface";
|
|
62
|
-
import TableUnits from "./table-util";
|
|
63
|
-
import SupportInputTypes from "../tmpl/control-type-supportor";
|
|
64
|
-
import HcserviceV3 from "../tmpl/hcservice-v3";
|
|
65
|
-
import QueryTable from "./query-table";
|
|
66
|
-
import CriteriaForm from "./../form/criteria-form";
|
|
67
|
-
import ViewControl from "../controls/view-control";
|
|
68
|
-
import Units from "../units";
|
|
69
|
-
import ColumnSelector from "./column/column-selector";
|
|
70
|
-
import ExportFrame, { ExportType } from "../export/export-frame";
|
|
71
|
-
import { SortableHandle } from "react-sortable-hoc";
|
|
72
|
-
import L2ActTable from "./l2-act-table";
|
|
73
|
-
|
|
74
|
-
import Action from "../controls/action";
|
|
75
|
-
import Restat from "./stat/restat";
|
|
76
|
-
import ActionUtils from "../controls/action/utils";
|
|
77
|
-
import CquickButton from "../controls/cquery/cquick-button";
|
|
78
|
-
import CollapseCard from "../controls/collapse-card";
|
|
79
|
-
import ToolTipBar from "../detail/tooltipbar";
|
|
80
|
-
import { LocaleContext } from "../locale/LocaleProvider";
|
|
81
|
-
import BlockMenuTreeDrawer from "../module/block-menu-tree-drawer";
|
|
82
|
-
import EditButton from "../detail/button/edit-button";
|
|
83
|
-
import ViewButton from "../detail/button/view-button";
|
|
84
|
-
import ProgramConfig from "../units";
|
|
85
|
-
import ModelSelectTable from "./../table/modal-select-table";
|
|
86
|
-
import NewinFileView from "../controls/file-view/newin-file-view";
|
|
87
|
-
|
|
88
|
-
const DragHandle = SortableHandle(() => (
|
|
89
|
-
<MenuOutlined style={{ cursor: "grab", color: "#999" }} />
|
|
90
|
-
));
|
|
91
|
-
const { Panel } = Collapse;
|
|
92
|
-
|
|
93
|
-
type Level = "l1" | "l2";
|
|
94
|
-
|
|
95
|
-
const defaultDisabledColIds: string[] = ["20000", "10000"];
|
|
96
|
-
let refresh = true;
|
|
97
|
-
|
|
98
|
-
interface ActTableProps extends TmplBaseProps {
|
|
99
|
-
criteriaData: object;
|
|
100
|
-
pageNo: number;
|
|
101
|
-
pageSize: number;
|
|
102
|
-
onChangePage: (pageNo: number, pageSize: number) => void;
|
|
103
|
-
ltmplConfig: LtmplConfig;
|
|
104
|
-
menuId?: string;
|
|
105
|
-
showView?: (showVievParam: ShowViewParam) => void;
|
|
106
|
-
doCreate?: (addtmplId: string, toCustomPage: boolean) => void;
|
|
107
|
-
customCreatable?: boolean;
|
|
108
|
-
doEdit?: (doEditParam: DoEditParam) => void;
|
|
109
|
-
customEditable?: boolean;
|
|
110
|
-
doDelete?: (code: string) => void;
|
|
111
|
-
doSearch?: (params: object) => void;
|
|
112
|
-
doRAction?: (ractionId: string, mainCode: string) => void;
|
|
113
|
-
level?: Level;
|
|
114
|
-
funcMode?: ActTableMode;
|
|
115
|
-
title?: ReactNode;
|
|
116
|
-
tip?: any;
|
|
117
|
-
collapsible?: boolean;
|
|
118
|
-
initCollapse?: boolean;
|
|
119
|
-
readOnly?: boolean;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
interface ActTableStat {
|
|
123
|
-
//tableColumns?: object[];
|
|
124
|
-
sortedColConfigs?: ColumnConfig[];
|
|
125
|
-
queryKey?: QueryKey;
|
|
126
|
-
loading?: boolean;
|
|
127
|
-
selectedRows?: SelectedRow[];
|
|
128
|
-
selectedDatas?: DtmplData[];
|
|
129
|
-
hiddenColIds?: string[];
|
|
130
|
-
drillingColIds?: string[];
|
|
131
|
-
disabledColIds?: string[];
|
|
132
|
-
hiddenRowCodes?: string[];
|
|
133
|
-
viewModels?: ActTableViewModel[];
|
|
134
|
-
showL2ActTable?: boolean;
|
|
135
|
-
showL2Chart?: boolean;
|
|
136
|
-
recordCode?: string;
|
|
137
|
-
blockMenuTreeDrawerOpen?: boolean;
|
|
138
|
-
showCustomCard?: boolean;
|
|
139
|
-
customButton?: CustomButton;
|
|
140
|
-
customButtonData?: DtmplData[];
|
|
141
|
-
showRatmplSelector?: boolean;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
145
|
-
state = {
|
|
146
|
-
//tableColumns: undefined,
|
|
147
|
-
sortedColConfigs: undefined,
|
|
148
|
-
queryKey: undefined,
|
|
149
|
-
loading: true,
|
|
150
|
-
disableCols: undefined,
|
|
151
|
-
hiddenColIds: defaultDisabledColIds,
|
|
152
|
-
selectedRows: [],
|
|
153
|
-
selectedDatas: [],
|
|
154
|
-
hiddenRowCodes: [],
|
|
155
|
-
viewModels: [],
|
|
156
|
-
drillingColIds: undefined,
|
|
157
|
-
disabledColIds: undefined,
|
|
158
|
-
showL2ActTable: false,
|
|
159
|
-
showL2Chart: false,
|
|
160
|
-
recordCode: undefined,
|
|
161
|
-
blockMenuTreeDrawerOpen: false,
|
|
162
|
-
showCustomCard: false,
|
|
163
|
-
customButtonData: undefined,
|
|
164
|
-
customButton: undefined,
|
|
165
|
-
showRatmplSelector: false,
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
static contextType = LocaleContext;
|
|
169
|
-
context: React.ContextType<typeof LocaleContext>;
|
|
170
|
-
|
|
171
|
-
static defaultProps = {
|
|
172
|
-
criteriaData: {},
|
|
173
|
-
funcMode: "complete",
|
|
174
|
-
collapsible: false,
|
|
175
|
-
initCollapse: false,
|
|
176
|
-
readOnly: false,
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
loadData = async (
|
|
180
|
-
hiddenColIds: string[],
|
|
181
|
-
hiddenRowCodes: string[],
|
|
182
|
-
sortedColConfigs: ColumnConfig[]
|
|
183
|
-
) => {
|
|
184
|
-
const {
|
|
185
|
-
sourceId,
|
|
186
|
-
criteriaData,
|
|
187
|
-
ltmplConfig,
|
|
188
|
-
mainCode,
|
|
189
|
-
level,
|
|
190
|
-
pageNo,
|
|
191
|
-
pageSize,
|
|
192
|
-
serverKey,
|
|
193
|
-
} = this.props;
|
|
194
|
-
|
|
195
|
-
if (!ltmplConfig) {
|
|
196
|
-
return;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
this.setState({
|
|
200
|
-
loading: true,
|
|
201
|
-
});
|
|
202
|
-
let disabledColIds: string[] = [];
|
|
203
|
-
let hiddenColIds_ = [...hiddenColIds];
|
|
204
|
-
if (criteriaData && criteriaData["drillingColIds"]) {
|
|
205
|
-
let dColIds = [...criteriaData["drillingColIds"]];
|
|
206
|
-
ltmplConfig.columns.forEach((item) => {
|
|
207
|
-
if (
|
|
208
|
-
item.statColType == "dimension" &&
|
|
209
|
-
!dColIds.includes(item.id) &&
|
|
210
|
-
!hiddenColIds_.includes(item.id)
|
|
211
|
-
) {
|
|
212
|
-
hiddenColIds_.push(item.id);
|
|
213
|
-
disabledColIds.push(item.id);
|
|
214
|
-
}
|
|
215
|
-
if (
|
|
216
|
-
item.statColType == "dimension" &&
|
|
217
|
-
!dColIds.includes(item.id) &&
|
|
218
|
-
!disabledColIds.includes(item.id)
|
|
219
|
-
) {
|
|
220
|
-
disabledColIds.push(item.id);
|
|
221
|
-
}
|
|
222
|
-
});
|
|
223
|
-
hiddenColIds_ = hiddenColIds_.filter((id) => {
|
|
224
|
-
return !dColIds.includes(id);
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
ltmplConfig.columns.forEach((item) => {
|
|
228
|
-
if (item.hidden) {
|
|
229
|
-
hiddenColIds_.push(item.id);
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
/** 构建column **/
|
|
233
|
-
// let tableColumns = this.buildTableColumns(ltmplConfig, hiddenColIds_, hiddenRowCodes, sortedColConfigs);
|
|
234
|
-
|
|
235
|
-
const { defaultPageSize } = ltmplConfig;
|
|
236
|
-
|
|
237
|
-
let pageInfo = {
|
|
238
|
-
pageNo: pageNo ? pageNo : 1,
|
|
239
|
-
pageSize: pageSize ? pageSize : defaultPageSize ? defaultPageSize : 10,
|
|
240
|
-
virtualEndPageNo: undefined,
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
/** 构建 dataSource **/
|
|
244
|
-
//构建过滤条件
|
|
245
|
-
let queryKey: QueryKey;
|
|
246
|
-
if (level && level == "l2") {
|
|
247
|
-
queryKey = await HcserviceV3.requestL2LtmplQueryKey(serverKey, sourceId, {
|
|
248
|
-
...criteriaData,
|
|
249
|
-
...pageInfo,
|
|
250
|
-
mainCode,
|
|
251
|
-
});
|
|
252
|
-
} else {
|
|
253
|
-
queryKey = await HcserviceV3.requestLtmplQueryKey(serverKey, sourceId, {
|
|
254
|
-
...criteriaData,
|
|
255
|
-
...pageInfo,
|
|
256
|
-
mainCode,
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
if (!queryKey.sourceId || queryKey.sourceId == this.props.sourceId) {
|
|
261
|
-
this.setState({
|
|
262
|
-
disabledColIds,
|
|
263
|
-
hiddenColIds: hiddenColIds_,
|
|
264
|
-
hiddenRowCodes,
|
|
265
|
-
sortedColConfigs,
|
|
266
|
-
queryKey,
|
|
267
|
-
showL2Chart: false,
|
|
268
|
-
selectedRows: [],
|
|
269
|
-
selectedDatas: [],
|
|
270
|
-
viewModels:
|
|
271
|
-
this.state.viewModels.length > 0 ? this.state.viewModels : ["table"],
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
this.setState({
|
|
275
|
-
loading: false,
|
|
276
|
-
});
|
|
277
|
-
};
|
|
278
|
-
|
|
279
|
-
doCustomButton = (customButton: CustomButton, records: DtmplData[]) => {
|
|
280
|
-
let page = ProgramConfig.getCustomPage(customButton.id);
|
|
281
|
-
if (!page) {
|
|
282
|
-
message.error("Not Found Custom Page");
|
|
283
|
-
} else {
|
|
284
|
-
//if(customButton.){
|
|
285
|
-
this.setState({
|
|
286
|
-
showCustomCard: true,
|
|
287
|
-
customButton,
|
|
288
|
-
customButtonData: records,
|
|
289
|
-
});
|
|
290
|
-
// }
|
|
291
|
-
}
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
renderAboveCustomPage = () => {
|
|
295
|
-
return this.renderCustomPage("above-table");
|
|
296
|
-
};
|
|
297
|
-
|
|
298
|
-
renderOhterCustomPage = () => {
|
|
299
|
-
return (
|
|
300
|
-
<>
|
|
301
|
-
{this.renderCustomPage("under-table")}
|
|
302
|
-
{this.renderCustomPage("modal-window")}
|
|
303
|
-
{this.renderCustomPage("left-drawer")}
|
|
304
|
-
{this.renderCustomPage("right-drawer")}
|
|
305
|
-
</>
|
|
306
|
-
);
|
|
307
|
-
};
|
|
308
|
-
|
|
309
|
-
renderCustomPage = (
|
|
310
|
-
windowPosition:
|
|
311
|
-
| "under-table"
|
|
312
|
-
| "above-table"
|
|
313
|
-
| "modal-window"
|
|
314
|
-
| "left-drawer"
|
|
315
|
-
| "right-drawer"
|
|
316
|
-
) => {
|
|
317
|
-
const { translate } = this.context;
|
|
318
|
-
const { customButton, customButtonData } = this.state;
|
|
319
|
-
|
|
320
|
-
if (!customButton) {
|
|
321
|
-
return "";
|
|
322
|
-
}
|
|
323
|
-
if (windowPosition && windowPosition != customButton.windowPosition) {
|
|
324
|
-
return "";
|
|
325
|
-
}
|
|
326
|
-
let customProps = { customButton: customButton, data: customButtonData };
|
|
327
|
-
let page = ProgramConfig.getCustomPage(customButton.id);
|
|
328
|
-
let customElement = React.createElement(page, customProps);
|
|
329
|
-
if (
|
|
330
|
-
customButton.windowPosition == "under-table" ||
|
|
331
|
-
customButton.windowPosition == "above-table"
|
|
332
|
-
) {
|
|
333
|
-
return (
|
|
334
|
-
<Card
|
|
335
|
-
id={"CustomCard" + customButton.id}
|
|
336
|
-
size={"small"}
|
|
337
|
-
style={{ marginTop: "6px" }}
|
|
338
|
-
extra={
|
|
339
|
-
<Button
|
|
340
|
-
size={"small"}
|
|
341
|
-
danger={true}
|
|
342
|
-
onClick={() => {
|
|
343
|
-
this.setState({ customButton: undefined });
|
|
344
|
-
}}
|
|
345
|
-
>
|
|
346
|
-
{" "}
|
|
347
|
-
{translate("${关闭}")}
|
|
348
|
-
</Button>
|
|
349
|
-
}
|
|
350
|
-
>
|
|
351
|
-
{customElement}
|
|
352
|
-
</Card>
|
|
353
|
-
);
|
|
354
|
-
} else if (
|
|
355
|
-
customButton.windowPosition == "left-drawer" ||
|
|
356
|
-
customButton.windowPosition == "right-drawer"
|
|
357
|
-
) {
|
|
358
|
-
return (
|
|
359
|
-
<Drawer
|
|
360
|
-
open={true}
|
|
361
|
-
id={"CustomCard" + customButton.id}
|
|
362
|
-
placement={
|
|
363
|
-
customButton.windowPosition == "right-drawer" ? "right" : "left"
|
|
364
|
-
}
|
|
365
|
-
width={customButton.windowWidth}
|
|
366
|
-
onClose={() => {
|
|
367
|
-
this.setState({ customButton: undefined });
|
|
368
|
-
}}
|
|
369
|
-
>
|
|
370
|
-
{customElement}
|
|
371
|
-
</Drawer>
|
|
372
|
-
);
|
|
373
|
-
} else if (customButton.windowPosition == "modal-window") {
|
|
374
|
-
return (
|
|
375
|
-
<Modal
|
|
376
|
-
open={true}
|
|
377
|
-
closable={true}
|
|
378
|
-
width={customButton.windowWidth}
|
|
379
|
-
style={{ height: customButton.windowHeight }}
|
|
380
|
-
onCancel={() => {
|
|
381
|
-
this.setState({ customButton: undefined });
|
|
382
|
-
}}
|
|
383
|
-
>
|
|
384
|
-
{customElement}
|
|
385
|
-
</Modal>
|
|
386
|
-
);
|
|
387
|
-
}
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
buildTableColumns = (
|
|
391
|
-
ltmplConfig: LtmplConfig,
|
|
392
|
-
hiddenColIds: string[],
|
|
393
|
-
hiddenRowCodes: string[],
|
|
394
|
-
sortedColConfigs: ColumnConfig[]
|
|
395
|
-
) => {
|
|
396
|
-
const {
|
|
397
|
-
showView,
|
|
398
|
-
doEdit,
|
|
399
|
-
doRAction,
|
|
400
|
-
customEditable,
|
|
401
|
-
serverKey,
|
|
402
|
-
readOnly,
|
|
403
|
-
sourceId,
|
|
404
|
-
} = this.props;
|
|
405
|
-
const { translate } = this.context;
|
|
406
|
-
const { buttons, builtInButtons } = ltmplConfig;
|
|
407
|
-
let tableColumns = [];
|
|
408
|
-
let s = 0;
|
|
409
|
-
let colConfigs = sortedColConfigs ? sortedColConfigs : ltmplConfig.columns;
|
|
410
|
-
|
|
411
|
-
let currentDataColIndex = 0;
|
|
412
|
-
|
|
413
|
-
colConfigs.forEach((item) => {
|
|
414
|
-
let column = {};
|
|
415
|
-
if (!hiddenColIds || !hiddenColIds.includes(item.id)) {
|
|
416
|
-
tableColumns.push(column);
|
|
417
|
-
}
|
|
418
|
-
column["title"] = item.title;
|
|
419
|
-
column["dataIndex"] = item.id;
|
|
420
|
-
if (item["colWidth"]) column["width"] = item["colWidth"];
|
|
421
|
-
if (item["statColType"]) column["statColType"] = item["statColType"];
|
|
422
|
-
if (item["aggFunc"]) column["cal"] = item["aggFunc"];
|
|
423
|
-
if (item["order"]) column["order"] = Number(item["order"]);
|
|
424
|
-
// column['ellipsis']= true;
|
|
425
|
-
s++;
|
|
426
|
-
let itemType = SupportInputTypes.getSupportControlType(item);
|
|
427
|
-
if (s < 12 && item.title != "操作" && item.title != "序号") {
|
|
428
|
-
if (hiddenColIds.includes("10000")) {
|
|
429
|
-
const order = this.handleColumnOrder(column["dataIndex"]);
|
|
430
|
-
|
|
431
|
-
if(item.sortable) {
|
|
432
|
-
TableUnits.sort(column, itemType, order);
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
//特殊列处理
|
|
438
|
-
//序号
|
|
439
|
-
if (item.title === "序号") {
|
|
440
|
-
column["width"] = item.colWidth ? item.colWidth : 50;
|
|
441
|
-
column["title"] = translate("${序号}");
|
|
442
|
-
column["align"] = item.valueAlign ? item.valueAlign : "center";
|
|
443
|
-
//item.fixed='left';
|
|
444
|
-
column["render"] = (text, record, index) => <label>{index + 1}</label>;
|
|
445
|
-
item["sorter"] = undefined;
|
|
446
|
-
} else if (item.id == "10000") {
|
|
447
|
-
column["title"] = (
|
|
448
|
-
<Tooltip title={translate("${拖拽排序}")}>
|
|
449
|
-
{translate("${" + item.title + "}")}
|
|
450
|
-
</Tooltip>
|
|
451
|
-
);
|
|
452
|
-
column["width"] = 30;
|
|
453
|
-
column["dataIndex"] = item.id;
|
|
454
|
-
column["className"] = "drag-visible";
|
|
455
|
-
column["render"] = () => <DragHandle />;
|
|
456
|
-
} else if (item.id == "20000") {
|
|
457
|
-
//隐藏
|
|
458
|
-
column["align"] = "center";
|
|
459
|
-
column["width"] = 40;
|
|
460
|
-
column["title"] = (
|
|
461
|
-
<>
|
|
462
|
-
{hiddenRowCodes.length > 0 ? (
|
|
463
|
-
<Tooltip title={translate("${取消隐藏}")}>
|
|
464
|
-
<Button
|
|
465
|
-
style={{ marginRight: "0px" }}
|
|
466
|
-
size="small"
|
|
467
|
-
shape={"circle"}
|
|
468
|
-
icon={<EyeOutlined />}
|
|
469
|
-
type={"text"}
|
|
470
|
-
onClick={() => this.unHiden()}
|
|
471
|
-
></Button>
|
|
472
|
-
</Tooltip>
|
|
473
|
-
) : (
|
|
474
|
-
""
|
|
475
|
-
)}
|
|
476
|
-
</>
|
|
477
|
-
);
|
|
478
|
-
column["render"] = (text, record) => (
|
|
479
|
-
<Tooltip title={translate("${隐藏}")}>
|
|
480
|
-
{" "}
|
|
481
|
-
<Button
|
|
482
|
-
style={{ marginRight: "0px" }}
|
|
483
|
-
icon={<EyeInvisibleOutlined />}
|
|
484
|
-
type="dashed"
|
|
485
|
-
size="small"
|
|
486
|
-
onClick={() => this.onHide(record.code)}
|
|
487
|
-
></Button>
|
|
488
|
-
</Tooltip>
|
|
489
|
-
);
|
|
490
|
-
} else if (item.title === "操作") {
|
|
491
|
-
column["fixed"] = "right";
|
|
492
|
-
column["align"] = "center";
|
|
493
|
-
column["width"] = item.colWidth ? item.colWidth : 160;
|
|
494
|
-
column["className"] = "opsColumn";
|
|
495
|
-
column["title"] = <>{translate("${操作}")}</>;
|
|
496
|
-
column["render"] = (text, record) => (
|
|
497
|
-
<Space size={[0, 4]} wrap>
|
|
498
|
-
{buttons.includes("detail") &&
|
|
499
|
-
showView &&
|
|
500
|
-
ActionUtils.isShow(
|
|
501
|
-
ltmplConfig.buttonViewAction?.preposes,
|
|
502
|
-
[record],
|
|
503
|
-
undefined
|
|
504
|
-
) ? (
|
|
505
|
-
<ViewButton
|
|
506
|
-
showView={showView}
|
|
507
|
-
data={record}
|
|
508
|
-
ltmplConfig={ltmplConfig}
|
|
509
|
-
></ViewButton>
|
|
510
|
-
) : (
|
|
511
|
-
""
|
|
512
|
-
)}
|
|
513
|
-
{buttons.includes("customDetail") &&
|
|
514
|
-
showView &&
|
|
515
|
-
ActionUtils.isShow(
|
|
516
|
-
ltmplConfig.buttonViewAction?.preposes,
|
|
517
|
-
[record],
|
|
518
|
-
undefined
|
|
519
|
-
) ? (
|
|
520
|
-
<Button
|
|
521
|
-
size="small"
|
|
522
|
-
type="primary"
|
|
523
|
-
icon={<AlignLeftOutlined />}
|
|
524
|
-
onClick={() => showView({ code: record.code })}
|
|
525
|
-
></Button>
|
|
526
|
-
) : (
|
|
527
|
-
""
|
|
528
|
-
)}
|
|
529
|
-
{buttons.includes("dtmplEdit") && doEdit && !readOnly ? (
|
|
530
|
-
<EditButton
|
|
531
|
-
doEdit={doEdit}
|
|
532
|
-
data={record}
|
|
533
|
-
ltmplConfig={ltmplConfig}
|
|
534
|
-
></EditButton>
|
|
535
|
-
) : (
|
|
536
|
-
""
|
|
537
|
-
)}
|
|
538
|
-
{builtInButtons?.includes("blockAuthMenuTree") && !readOnly ? (
|
|
539
|
-
<Button
|
|
540
|
-
size="small"
|
|
541
|
-
type="dashed"
|
|
542
|
-
icon={
|
|
543
|
-
<KeyOutlined
|
|
544
|
-
rotate={180}
|
|
545
|
-
style={{ color: "#f5222d", marginRight: "4px" }}
|
|
546
|
-
/>
|
|
547
|
-
}
|
|
548
|
-
onClick={() =>
|
|
549
|
-
this.setState({
|
|
550
|
-
blockMenuTreeDrawerOpen: true,
|
|
551
|
-
recordCode: record.code,
|
|
552
|
-
})
|
|
553
|
-
}
|
|
554
|
-
></Button>
|
|
555
|
-
) : (
|
|
556
|
-
""
|
|
557
|
-
)}
|
|
558
|
-
{(buttons.includes("dtmplCustomEdit") || customEditable) &&
|
|
559
|
-
doEdit &&
|
|
560
|
-
!readOnly &&
|
|
561
|
-
ActionUtils.isShow(
|
|
562
|
-
ltmplConfig.buttonEditAction?.preposes,
|
|
563
|
-
[record],
|
|
564
|
-
undefined
|
|
565
|
-
) ? (
|
|
566
|
-
<Button
|
|
567
|
-
size="small"
|
|
568
|
-
type="dashed"
|
|
569
|
-
icon={<FormOutlined />}
|
|
570
|
-
onClick={() =>
|
|
571
|
-
doEdit({
|
|
572
|
-
code: record.code,
|
|
573
|
-
mode: "update",
|
|
574
|
-
toCustomPage: true,
|
|
575
|
-
})
|
|
576
|
-
}
|
|
577
|
-
></Button>
|
|
578
|
-
) : (
|
|
579
|
-
""
|
|
580
|
-
)}
|
|
581
|
-
{buttons.includes("copy") && doEdit && !readOnly ? (
|
|
582
|
-
<Tooltip title={translate("${复制}")}>
|
|
583
|
-
<Button
|
|
584
|
-
size="small"
|
|
585
|
-
type="dashed"
|
|
586
|
-
icon={<CopyOutlined />}
|
|
587
|
-
onClick={async () => {
|
|
588
|
-
//先复制
|
|
589
|
-
let toCustomPage = false;
|
|
590
|
-
if (buttons.includes("dtmplCustomEdit") || customEditable) {
|
|
591
|
-
toCustomPage = true;
|
|
592
|
-
}
|
|
593
|
-
let code = await HcserviceV3.doCopy(
|
|
594
|
-
serverKey,
|
|
595
|
-
sourceId,
|
|
596
|
-
record.code
|
|
597
|
-
);
|
|
598
|
-
if (code) {
|
|
599
|
-
doEdit({ code, mode: "update", toCustomPage });
|
|
600
|
-
}
|
|
601
|
-
}}
|
|
602
|
-
></Button>
|
|
603
|
-
</Tooltip>
|
|
604
|
-
) : (
|
|
605
|
-
""
|
|
606
|
-
)}
|
|
607
|
-
{ltmplConfig.rowCustomButtons
|
|
608
|
-
? ltmplConfig.rowCustomButtons.map((customButton) => {
|
|
609
|
-
return (
|
|
610
|
-
<Button
|
|
611
|
-
key={customButton.id}
|
|
612
|
-
size="small"
|
|
613
|
-
type={
|
|
614
|
-
customButton.buttonType
|
|
615
|
-
? customButton.buttonType
|
|
616
|
-
: "dashed"
|
|
617
|
-
}
|
|
618
|
-
onClick={() =>
|
|
619
|
-
this.doCustomButton(customButton, [record])
|
|
620
|
-
}
|
|
621
|
-
>
|
|
622
|
-
{translate("${" + customButton.title + "}")}
|
|
623
|
-
</Button>
|
|
624
|
-
);
|
|
625
|
-
})
|
|
626
|
-
: ""}
|
|
627
|
-
{ltmplConfig.ractions && !readOnly
|
|
628
|
-
? ltmplConfig.ractions.map((raction) => {
|
|
629
|
-
return (
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
{
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
{
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
} =
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
};
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
const {
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
path
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
url.
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
const {
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
</
|
|
1213
|
-
) :
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
</Checkbox>
|
|
1324
|
-
</Col>
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
if (
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
}
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
{
|
|
1499
|
-
{/*}
|
|
1500
|
-
{
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
<
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
{
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
}
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
ltmplConfig.
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
{
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
this.setState({
|
|
1702
|
-
blockMenuTreeDrawerOpen: false,
|
|
1703
|
-
});
|
|
1704
|
-
}}
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1
|
+
import React, { ReactNode, ReactDOM } from "react";
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
Card,
|
|
5
|
+
Checkbox,
|
|
6
|
+
Col,
|
|
7
|
+
Collapse,
|
|
8
|
+
Divider,
|
|
9
|
+
Popconfirm,
|
|
10
|
+
Popover,
|
|
11
|
+
Row,
|
|
12
|
+
Space,
|
|
13
|
+
Drawer,
|
|
14
|
+
Modal,
|
|
15
|
+
Tooltip,
|
|
16
|
+
message,
|
|
17
|
+
} from "antd";
|
|
18
|
+
import HCService from "../tmpl/hcservice-v3";
|
|
19
|
+
import Table from "./control-table-x-axis-wrapper";
|
|
20
|
+
import {
|
|
21
|
+
AlignCenterOutlined,
|
|
22
|
+
AlignLeftOutlined,
|
|
23
|
+
CaretDownOutlined,
|
|
24
|
+
CaretUpOutlined,
|
|
25
|
+
CopyOutlined,
|
|
26
|
+
DeleteOutlined,
|
|
27
|
+
DownloadOutlined,
|
|
28
|
+
EditOutlined,
|
|
29
|
+
EyeInvisibleOutlined,
|
|
30
|
+
EyeOutlined,
|
|
31
|
+
FormOutlined,
|
|
32
|
+
FundOutlined,
|
|
33
|
+
KeyOutlined,
|
|
34
|
+
LineChartOutlined,
|
|
35
|
+
MenuOutlined,
|
|
36
|
+
PlusCircleOutlined,
|
|
37
|
+
PlusOutlined,
|
|
38
|
+
ReloadOutlined,
|
|
39
|
+
RetweetOutlined,
|
|
40
|
+
SearchOutlined,
|
|
41
|
+
TableOutlined,
|
|
42
|
+
UploadOutlined,
|
|
43
|
+
} from "@ant-design/icons";
|
|
44
|
+
import "./index.css";
|
|
45
|
+
import {
|
|
46
|
+
ActTableMode,
|
|
47
|
+
ActTableViewModel,
|
|
48
|
+
AddOrUpdate,
|
|
49
|
+
BuiltInButtonName,
|
|
50
|
+
ClassAddConfig,
|
|
51
|
+
ColumnConfig,
|
|
52
|
+
CustomButton,
|
|
53
|
+
DoEditParam,
|
|
54
|
+
DtmplData,
|
|
55
|
+
JumpConfig,
|
|
56
|
+
LtmplConfig,
|
|
57
|
+
QueryKey,
|
|
58
|
+
SelectedRow,
|
|
59
|
+
ShowViewParam,
|
|
60
|
+
TmplBaseProps,
|
|
61
|
+
} from "../tmpl/interface";
|
|
62
|
+
import TableUnits from "./table-util";
|
|
63
|
+
import SupportInputTypes from "../tmpl/control-type-supportor";
|
|
64
|
+
import HcserviceV3 from "../tmpl/hcservice-v3";
|
|
65
|
+
import QueryTable from "./query-table";
|
|
66
|
+
import CriteriaForm from "./../form/criteria-form";
|
|
67
|
+
import ViewControl from "../controls/view-control";
|
|
68
|
+
import Units from "../units";
|
|
69
|
+
import ColumnSelector from "./column/column-selector";
|
|
70
|
+
import ExportFrame, { ExportType } from "../export/export-frame";
|
|
71
|
+
import { SortableHandle } from "react-sortable-hoc";
|
|
72
|
+
import L2ActTable from "./l2-act-table";
|
|
73
|
+
|
|
74
|
+
import Action from "../controls/action";
|
|
75
|
+
import Restat from "./stat/restat";
|
|
76
|
+
import ActionUtils from "../controls/action/utils";
|
|
77
|
+
import CquickButton from "../controls/cquery/cquick-button";
|
|
78
|
+
import CollapseCard from "../controls/collapse-card";
|
|
79
|
+
import ToolTipBar from "../detail/tooltipbar";
|
|
80
|
+
import { LocaleContext } from "../locale/LocaleProvider";
|
|
81
|
+
import BlockMenuTreeDrawer from "../module/block-menu-tree-drawer";
|
|
82
|
+
import EditButton from "../detail/button/edit-button";
|
|
83
|
+
import ViewButton from "../detail/button/view-button";
|
|
84
|
+
import ProgramConfig from "../units";
|
|
85
|
+
import ModelSelectTable from "./../table/modal-select-table";
|
|
86
|
+
import NewinFileView from "../controls/file-view/newin-file-view";
|
|
87
|
+
|
|
88
|
+
const DragHandle = SortableHandle(() => (
|
|
89
|
+
<MenuOutlined style={{ cursor: "grab", color: "#999" }} />
|
|
90
|
+
));
|
|
91
|
+
const { Panel } = Collapse;
|
|
92
|
+
|
|
93
|
+
type Level = "l1" | "l2";
|
|
94
|
+
|
|
95
|
+
const defaultDisabledColIds: string[] = ["20000", "10000"];
|
|
96
|
+
let refresh = true;
|
|
97
|
+
|
|
98
|
+
interface ActTableProps extends TmplBaseProps {
|
|
99
|
+
criteriaData: object;
|
|
100
|
+
pageNo: number;
|
|
101
|
+
pageSize: number;
|
|
102
|
+
onChangePage: (pageNo: number, pageSize: number) => void;
|
|
103
|
+
ltmplConfig: LtmplConfig;
|
|
104
|
+
menuId?: string;
|
|
105
|
+
showView?: (showVievParam: ShowViewParam) => void;
|
|
106
|
+
doCreate?: (addtmplId: string, toCustomPage: boolean) => void;
|
|
107
|
+
customCreatable?: boolean;
|
|
108
|
+
doEdit?: (doEditParam: DoEditParam) => void;
|
|
109
|
+
customEditable?: boolean;
|
|
110
|
+
doDelete?: (code: string) => void;
|
|
111
|
+
doSearch?: (params: object) => void;
|
|
112
|
+
doRAction?: (ractionId: string, mainCode: string) => void;
|
|
113
|
+
level?: Level;
|
|
114
|
+
funcMode?: ActTableMode;
|
|
115
|
+
title?: ReactNode;
|
|
116
|
+
tip?: any;
|
|
117
|
+
collapsible?: boolean;
|
|
118
|
+
initCollapse?: boolean;
|
|
119
|
+
readOnly?: boolean;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
interface ActTableStat {
|
|
123
|
+
//tableColumns?: object[];
|
|
124
|
+
sortedColConfigs?: ColumnConfig[];
|
|
125
|
+
queryKey?: QueryKey;
|
|
126
|
+
loading?: boolean;
|
|
127
|
+
selectedRows?: SelectedRow[];
|
|
128
|
+
selectedDatas?: DtmplData[];
|
|
129
|
+
hiddenColIds?: string[];
|
|
130
|
+
drillingColIds?: string[];
|
|
131
|
+
disabledColIds?: string[];
|
|
132
|
+
hiddenRowCodes?: string[];
|
|
133
|
+
viewModels?: ActTableViewModel[];
|
|
134
|
+
showL2ActTable?: boolean;
|
|
135
|
+
showL2Chart?: boolean;
|
|
136
|
+
recordCode?: string;
|
|
137
|
+
blockMenuTreeDrawerOpen?: boolean;
|
|
138
|
+
showCustomCard?: boolean;
|
|
139
|
+
customButton?: CustomButton;
|
|
140
|
+
customButtonData?: DtmplData[];
|
|
141
|
+
showRatmplSelector?: boolean;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
145
|
+
state = {
|
|
146
|
+
//tableColumns: undefined,
|
|
147
|
+
sortedColConfigs: undefined,
|
|
148
|
+
queryKey: undefined,
|
|
149
|
+
loading: true,
|
|
150
|
+
disableCols: undefined,
|
|
151
|
+
hiddenColIds: defaultDisabledColIds,
|
|
152
|
+
selectedRows: [],
|
|
153
|
+
selectedDatas: [],
|
|
154
|
+
hiddenRowCodes: [],
|
|
155
|
+
viewModels: [],
|
|
156
|
+
drillingColIds: undefined,
|
|
157
|
+
disabledColIds: undefined,
|
|
158
|
+
showL2ActTable: false,
|
|
159
|
+
showL2Chart: false,
|
|
160
|
+
recordCode: undefined,
|
|
161
|
+
blockMenuTreeDrawerOpen: false,
|
|
162
|
+
showCustomCard: false,
|
|
163
|
+
customButtonData: undefined,
|
|
164
|
+
customButton: undefined,
|
|
165
|
+
showRatmplSelector: false,
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
static contextType = LocaleContext;
|
|
169
|
+
context: React.ContextType<typeof LocaleContext>;
|
|
170
|
+
|
|
171
|
+
static defaultProps = {
|
|
172
|
+
criteriaData: {},
|
|
173
|
+
funcMode: "complete",
|
|
174
|
+
collapsible: false,
|
|
175
|
+
initCollapse: false,
|
|
176
|
+
readOnly: false,
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
loadData = async (
|
|
180
|
+
hiddenColIds: string[],
|
|
181
|
+
hiddenRowCodes: string[],
|
|
182
|
+
sortedColConfigs: ColumnConfig[]
|
|
183
|
+
) => {
|
|
184
|
+
const {
|
|
185
|
+
sourceId,
|
|
186
|
+
criteriaData,
|
|
187
|
+
ltmplConfig,
|
|
188
|
+
mainCode,
|
|
189
|
+
level,
|
|
190
|
+
pageNo,
|
|
191
|
+
pageSize,
|
|
192
|
+
serverKey,
|
|
193
|
+
} = this.props;
|
|
194
|
+
|
|
195
|
+
if (!ltmplConfig) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
this.setState({
|
|
200
|
+
loading: true,
|
|
201
|
+
});
|
|
202
|
+
let disabledColIds: string[] = [];
|
|
203
|
+
let hiddenColIds_ = [...hiddenColIds];
|
|
204
|
+
if (criteriaData && criteriaData["drillingColIds"]) {
|
|
205
|
+
let dColIds = [...criteriaData["drillingColIds"]];
|
|
206
|
+
ltmplConfig.columns.forEach((item) => {
|
|
207
|
+
if (
|
|
208
|
+
item.statColType == "dimension" &&
|
|
209
|
+
!dColIds.includes(item.id) &&
|
|
210
|
+
!hiddenColIds_.includes(item.id)
|
|
211
|
+
) {
|
|
212
|
+
hiddenColIds_.push(item.id);
|
|
213
|
+
disabledColIds.push(item.id);
|
|
214
|
+
}
|
|
215
|
+
if (
|
|
216
|
+
item.statColType == "dimension" &&
|
|
217
|
+
!dColIds.includes(item.id) &&
|
|
218
|
+
!disabledColIds.includes(item.id)
|
|
219
|
+
) {
|
|
220
|
+
disabledColIds.push(item.id);
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
hiddenColIds_ = hiddenColIds_.filter((id) => {
|
|
224
|
+
return !dColIds.includes(id);
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
ltmplConfig.columns.forEach((item) => {
|
|
228
|
+
if (item.hidden) {
|
|
229
|
+
hiddenColIds_.push(item.id);
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
/** 构建column **/
|
|
233
|
+
// let tableColumns = this.buildTableColumns(ltmplConfig, hiddenColIds_, hiddenRowCodes, sortedColConfigs);
|
|
234
|
+
|
|
235
|
+
const { defaultPageSize } = ltmplConfig;
|
|
236
|
+
|
|
237
|
+
let pageInfo = {
|
|
238
|
+
pageNo: pageNo ? pageNo : 1,
|
|
239
|
+
pageSize: pageSize ? pageSize : defaultPageSize ? defaultPageSize : 10,
|
|
240
|
+
virtualEndPageNo: undefined,
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
/** 构建 dataSource **/
|
|
244
|
+
//构建过滤条件
|
|
245
|
+
let queryKey: QueryKey;
|
|
246
|
+
if (level && level == "l2") {
|
|
247
|
+
queryKey = await HcserviceV3.requestL2LtmplQueryKey(serverKey, sourceId, {
|
|
248
|
+
...criteriaData,
|
|
249
|
+
...pageInfo,
|
|
250
|
+
mainCode,
|
|
251
|
+
});
|
|
252
|
+
} else {
|
|
253
|
+
queryKey = await HcserviceV3.requestLtmplQueryKey(serverKey, sourceId, {
|
|
254
|
+
...criteriaData,
|
|
255
|
+
...pageInfo,
|
|
256
|
+
mainCode,
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
if (!queryKey.sourceId || queryKey.sourceId == this.props.sourceId) {
|
|
261
|
+
this.setState({
|
|
262
|
+
disabledColIds,
|
|
263
|
+
hiddenColIds: hiddenColIds_,
|
|
264
|
+
hiddenRowCodes,
|
|
265
|
+
sortedColConfigs,
|
|
266
|
+
queryKey,
|
|
267
|
+
showL2Chart: false,
|
|
268
|
+
selectedRows: [],
|
|
269
|
+
selectedDatas: [],
|
|
270
|
+
viewModels:
|
|
271
|
+
this.state.viewModels.length > 0 ? this.state.viewModels : ["table"],
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
this.setState({
|
|
275
|
+
loading: false,
|
|
276
|
+
});
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
doCustomButton = (customButton: CustomButton, records: DtmplData[]) => {
|
|
280
|
+
let page = ProgramConfig.getCustomPage(customButton.id);
|
|
281
|
+
if (!page) {
|
|
282
|
+
message.error("Not Found Custom Page");
|
|
283
|
+
} else {
|
|
284
|
+
//if(customButton.){
|
|
285
|
+
this.setState({
|
|
286
|
+
showCustomCard: true,
|
|
287
|
+
customButton,
|
|
288
|
+
customButtonData: records,
|
|
289
|
+
});
|
|
290
|
+
// }
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
renderAboveCustomPage = () => {
|
|
295
|
+
return this.renderCustomPage("above-table");
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
renderOhterCustomPage = () => {
|
|
299
|
+
return (
|
|
300
|
+
<>
|
|
301
|
+
{this.renderCustomPage("under-table")}
|
|
302
|
+
{this.renderCustomPage("modal-window")}
|
|
303
|
+
{this.renderCustomPage("left-drawer")}
|
|
304
|
+
{this.renderCustomPage("right-drawer")}
|
|
305
|
+
</>
|
|
306
|
+
);
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
renderCustomPage = (
|
|
310
|
+
windowPosition:
|
|
311
|
+
| "under-table"
|
|
312
|
+
| "above-table"
|
|
313
|
+
| "modal-window"
|
|
314
|
+
| "left-drawer"
|
|
315
|
+
| "right-drawer"
|
|
316
|
+
) => {
|
|
317
|
+
const { translate } = this.context;
|
|
318
|
+
const { customButton, customButtonData } = this.state;
|
|
319
|
+
|
|
320
|
+
if (!customButton) {
|
|
321
|
+
return "";
|
|
322
|
+
}
|
|
323
|
+
if (windowPosition && windowPosition != customButton.windowPosition) {
|
|
324
|
+
return "";
|
|
325
|
+
}
|
|
326
|
+
let customProps = { customButton: customButton, data: customButtonData };
|
|
327
|
+
let page = ProgramConfig.getCustomPage(customButton.id);
|
|
328
|
+
let customElement = React.createElement(page, customProps);
|
|
329
|
+
if (
|
|
330
|
+
customButton.windowPosition == "under-table" ||
|
|
331
|
+
customButton.windowPosition == "above-table"
|
|
332
|
+
) {
|
|
333
|
+
return (
|
|
334
|
+
<Card
|
|
335
|
+
id={"CustomCard" + customButton.id}
|
|
336
|
+
size={"small"}
|
|
337
|
+
style={{ marginTop: "6px" }}
|
|
338
|
+
extra={
|
|
339
|
+
<Button
|
|
340
|
+
size={"small"}
|
|
341
|
+
danger={true}
|
|
342
|
+
onClick={() => {
|
|
343
|
+
this.setState({ customButton: undefined });
|
|
344
|
+
}}
|
|
345
|
+
>
|
|
346
|
+
{" "}
|
|
347
|
+
{translate("${关闭}")}
|
|
348
|
+
</Button>
|
|
349
|
+
}
|
|
350
|
+
>
|
|
351
|
+
{customElement}
|
|
352
|
+
</Card>
|
|
353
|
+
);
|
|
354
|
+
} else if (
|
|
355
|
+
customButton.windowPosition == "left-drawer" ||
|
|
356
|
+
customButton.windowPosition == "right-drawer"
|
|
357
|
+
) {
|
|
358
|
+
return (
|
|
359
|
+
<Drawer
|
|
360
|
+
open={true}
|
|
361
|
+
id={"CustomCard" + customButton.id}
|
|
362
|
+
placement={
|
|
363
|
+
customButton.windowPosition == "right-drawer" ? "right" : "left"
|
|
364
|
+
}
|
|
365
|
+
width={customButton.windowWidth}
|
|
366
|
+
onClose={() => {
|
|
367
|
+
this.setState({ customButton: undefined });
|
|
368
|
+
}}
|
|
369
|
+
>
|
|
370
|
+
{customElement}
|
|
371
|
+
</Drawer>
|
|
372
|
+
);
|
|
373
|
+
} else if (customButton.windowPosition == "modal-window") {
|
|
374
|
+
return (
|
|
375
|
+
<Modal
|
|
376
|
+
open={true}
|
|
377
|
+
closable={true}
|
|
378
|
+
width={customButton.windowWidth}
|
|
379
|
+
style={{ height: customButton.windowHeight }}
|
|
380
|
+
onCancel={() => {
|
|
381
|
+
this.setState({ customButton: undefined });
|
|
382
|
+
}}
|
|
383
|
+
>
|
|
384
|
+
{customElement}
|
|
385
|
+
</Modal>
|
|
386
|
+
);
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
buildTableColumns = (
|
|
391
|
+
ltmplConfig: LtmplConfig,
|
|
392
|
+
hiddenColIds: string[],
|
|
393
|
+
hiddenRowCodes: string[],
|
|
394
|
+
sortedColConfigs: ColumnConfig[]
|
|
395
|
+
) => {
|
|
396
|
+
const {
|
|
397
|
+
showView,
|
|
398
|
+
doEdit,
|
|
399
|
+
doRAction,
|
|
400
|
+
customEditable,
|
|
401
|
+
serverKey,
|
|
402
|
+
readOnly,
|
|
403
|
+
sourceId,
|
|
404
|
+
} = this.props;
|
|
405
|
+
const { translate } = this.context;
|
|
406
|
+
const { buttons, builtInButtons } = ltmplConfig;
|
|
407
|
+
let tableColumns = [];
|
|
408
|
+
let s = 0;
|
|
409
|
+
let colConfigs = sortedColConfigs ? sortedColConfigs : ltmplConfig.columns;
|
|
410
|
+
|
|
411
|
+
let currentDataColIndex = 0;
|
|
412
|
+
|
|
413
|
+
colConfigs.forEach((item) => {
|
|
414
|
+
let column = {};
|
|
415
|
+
if (!hiddenColIds || !hiddenColIds.includes(item.id)) {
|
|
416
|
+
tableColumns.push(column);
|
|
417
|
+
}
|
|
418
|
+
column["title"] = item.title;
|
|
419
|
+
column["dataIndex"] = item.id;
|
|
420
|
+
if (item["colWidth"]) column["width"] = item["colWidth"];
|
|
421
|
+
if (item["statColType"]) column["statColType"] = item["statColType"];
|
|
422
|
+
if (item["aggFunc"]) column["cal"] = item["aggFunc"];
|
|
423
|
+
if (item["order"]) column["order"] = Number(item["order"]);
|
|
424
|
+
// column['ellipsis']= true;
|
|
425
|
+
s++;
|
|
426
|
+
let itemType = SupportInputTypes.getSupportControlType(item);
|
|
427
|
+
if (s < 12 && item.title != "操作" && item.title != "序号") {
|
|
428
|
+
if (hiddenColIds.includes("10000")) {
|
|
429
|
+
const order = this.handleColumnOrder(column["dataIndex"]);
|
|
430
|
+
|
|
431
|
+
if(item.sortable) {
|
|
432
|
+
TableUnits.sort(column, itemType, order);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
//特殊列处理
|
|
438
|
+
//序号
|
|
439
|
+
if (item.title === "序号") {
|
|
440
|
+
column["width"] = item.colWidth ? item.colWidth : 50;
|
|
441
|
+
column["title"] = translate("${序号}");
|
|
442
|
+
column["align"] = item.valueAlign ? item.valueAlign : "center";
|
|
443
|
+
//item.fixed='left';
|
|
444
|
+
column["render"] = (text, record, index) => <label>{index + 1}</label>;
|
|
445
|
+
item["sorter"] = undefined;
|
|
446
|
+
} else if (item.id == "10000") {
|
|
447
|
+
column["title"] = (
|
|
448
|
+
<Tooltip title={translate("${拖拽排序}")}>
|
|
449
|
+
{translate("${" + item.title + "}")}
|
|
450
|
+
</Tooltip>
|
|
451
|
+
);
|
|
452
|
+
column["width"] = 30;
|
|
453
|
+
column["dataIndex"] = item.id;
|
|
454
|
+
column["className"] = "drag-visible";
|
|
455
|
+
column["render"] = () => <DragHandle />;
|
|
456
|
+
} else if (item.id == "20000") {
|
|
457
|
+
//隐藏
|
|
458
|
+
column["align"] = "center";
|
|
459
|
+
column["width"] = 40;
|
|
460
|
+
column["title"] = (
|
|
461
|
+
<>
|
|
462
|
+
{hiddenRowCodes.length > 0 ? (
|
|
463
|
+
<Tooltip title={translate("${取消隐藏}")}>
|
|
464
|
+
<Button
|
|
465
|
+
style={{ marginRight: "0px" }}
|
|
466
|
+
size="small"
|
|
467
|
+
shape={"circle"}
|
|
468
|
+
icon={<EyeOutlined />}
|
|
469
|
+
type={"text"}
|
|
470
|
+
onClick={() => this.unHiden()}
|
|
471
|
+
></Button>
|
|
472
|
+
</Tooltip>
|
|
473
|
+
) : (
|
|
474
|
+
""
|
|
475
|
+
)}
|
|
476
|
+
</>
|
|
477
|
+
);
|
|
478
|
+
column["render"] = (text, record) => (
|
|
479
|
+
<Tooltip title={translate("${隐藏}")}>
|
|
480
|
+
{" "}
|
|
481
|
+
<Button
|
|
482
|
+
style={{ marginRight: "0px" }}
|
|
483
|
+
icon={<EyeInvisibleOutlined />}
|
|
484
|
+
type="dashed"
|
|
485
|
+
size="small"
|
|
486
|
+
onClick={() => this.onHide(record.code)}
|
|
487
|
+
></Button>
|
|
488
|
+
</Tooltip>
|
|
489
|
+
);
|
|
490
|
+
} else if (item.title === "操作") {
|
|
491
|
+
column["fixed"] = "right";
|
|
492
|
+
column["align"] = "center";
|
|
493
|
+
column["width"] = item.colWidth ? item.colWidth : 160;
|
|
494
|
+
column["className"] = "opsColumn";
|
|
495
|
+
column["title"] = <>{translate("${操作}")}</>;
|
|
496
|
+
column["render"] = (text, record) => (
|
|
497
|
+
<Space size={[0, 4]} wrap>
|
|
498
|
+
{buttons.includes("detail") &&
|
|
499
|
+
showView &&
|
|
500
|
+
ActionUtils.isShow(
|
|
501
|
+
ltmplConfig.buttonViewAction?.preposes,
|
|
502
|
+
[record],
|
|
503
|
+
undefined
|
|
504
|
+
) ? (
|
|
505
|
+
<ViewButton
|
|
506
|
+
showView={showView}
|
|
507
|
+
data={record}
|
|
508
|
+
ltmplConfig={ltmplConfig}
|
|
509
|
+
></ViewButton>
|
|
510
|
+
) : (
|
|
511
|
+
""
|
|
512
|
+
)}
|
|
513
|
+
{buttons.includes("customDetail") &&
|
|
514
|
+
showView &&
|
|
515
|
+
ActionUtils.isShow(
|
|
516
|
+
ltmplConfig.buttonViewAction?.preposes,
|
|
517
|
+
[record],
|
|
518
|
+
undefined
|
|
519
|
+
) ? (
|
|
520
|
+
<Button
|
|
521
|
+
size="small"
|
|
522
|
+
type="primary"
|
|
523
|
+
icon={<AlignLeftOutlined />}
|
|
524
|
+
onClick={() => showView({ code: record.code })}
|
|
525
|
+
></Button>
|
|
526
|
+
) : (
|
|
527
|
+
""
|
|
528
|
+
)}
|
|
529
|
+
{buttons.includes("dtmplEdit") && doEdit && !readOnly ? (
|
|
530
|
+
<EditButton
|
|
531
|
+
doEdit={doEdit}
|
|
532
|
+
data={record}
|
|
533
|
+
ltmplConfig={ltmplConfig}
|
|
534
|
+
></EditButton>
|
|
535
|
+
) : (
|
|
536
|
+
""
|
|
537
|
+
)}
|
|
538
|
+
{builtInButtons?.includes("blockAuthMenuTree") && !readOnly ? (
|
|
539
|
+
<Button
|
|
540
|
+
size="small"
|
|
541
|
+
type="dashed"
|
|
542
|
+
icon={
|
|
543
|
+
<KeyOutlined
|
|
544
|
+
rotate={180}
|
|
545
|
+
style={{ color: "#f5222d", marginRight: "4px" }}
|
|
546
|
+
/>
|
|
547
|
+
}
|
|
548
|
+
onClick={() =>
|
|
549
|
+
this.setState({
|
|
550
|
+
blockMenuTreeDrawerOpen: true,
|
|
551
|
+
recordCode: record.code,
|
|
552
|
+
})
|
|
553
|
+
}
|
|
554
|
+
></Button>
|
|
555
|
+
) : (
|
|
556
|
+
""
|
|
557
|
+
)}
|
|
558
|
+
{(buttons.includes("dtmplCustomEdit") || customEditable) &&
|
|
559
|
+
doEdit &&
|
|
560
|
+
!readOnly &&
|
|
561
|
+
ActionUtils.isShow(
|
|
562
|
+
ltmplConfig.buttonEditAction?.preposes,
|
|
563
|
+
[record],
|
|
564
|
+
undefined
|
|
565
|
+
) ? (
|
|
566
|
+
<Button
|
|
567
|
+
size="small"
|
|
568
|
+
type="dashed"
|
|
569
|
+
icon={<FormOutlined />}
|
|
570
|
+
onClick={() =>
|
|
571
|
+
doEdit({
|
|
572
|
+
code: record.code,
|
|
573
|
+
mode: "update",
|
|
574
|
+
toCustomPage: true,
|
|
575
|
+
})
|
|
576
|
+
}
|
|
577
|
+
></Button>
|
|
578
|
+
) : (
|
|
579
|
+
""
|
|
580
|
+
)}
|
|
581
|
+
{buttons.includes("copy") && doEdit && !readOnly ? (
|
|
582
|
+
<Tooltip title={translate("${复制}")}>
|
|
583
|
+
<Button
|
|
584
|
+
size="small"
|
|
585
|
+
type="dashed"
|
|
586
|
+
icon={<CopyOutlined />}
|
|
587
|
+
onClick={async () => {
|
|
588
|
+
//先复制
|
|
589
|
+
let toCustomPage = false;
|
|
590
|
+
if (buttons.includes("dtmplCustomEdit") || customEditable) {
|
|
591
|
+
toCustomPage = true;
|
|
592
|
+
}
|
|
593
|
+
let code = await HcserviceV3.doCopy(
|
|
594
|
+
serverKey,
|
|
595
|
+
sourceId,
|
|
596
|
+
record.code
|
|
597
|
+
);
|
|
598
|
+
if (code) {
|
|
599
|
+
doEdit({ code, mode: "update", toCustomPage });
|
|
600
|
+
}
|
|
601
|
+
}}
|
|
602
|
+
></Button>
|
|
603
|
+
</Tooltip>
|
|
604
|
+
) : (
|
|
605
|
+
""
|
|
606
|
+
)}
|
|
607
|
+
{ltmplConfig.rowCustomButtons
|
|
608
|
+
? ltmplConfig.rowCustomButtons.map((customButton) => {
|
|
609
|
+
return (
|
|
610
|
+
<Button
|
|
611
|
+
key={customButton.id}
|
|
612
|
+
size="small"
|
|
613
|
+
type={
|
|
614
|
+
customButton.buttonType
|
|
615
|
+
? customButton.buttonType
|
|
616
|
+
: "dashed"
|
|
617
|
+
}
|
|
618
|
+
onClick={() =>
|
|
619
|
+
this.doCustomButton(customButton, [record])
|
|
620
|
+
}
|
|
621
|
+
>
|
|
622
|
+
{translate("${" + customButton.title + "}")}
|
|
623
|
+
</Button>
|
|
624
|
+
);
|
|
625
|
+
})
|
|
626
|
+
: ""}
|
|
627
|
+
{ltmplConfig.ractions && !readOnly
|
|
628
|
+
? ltmplConfig.ractions.map((raction) => {
|
|
629
|
+
return (
|
|
630
|
+
ActionUtils.isShow(
|
|
631
|
+
raction?.preposes,
|
|
632
|
+
[record],
|
|
633
|
+
undefined
|
|
634
|
+
)?
|
|
635
|
+
<Button
|
|
636
|
+
key={raction.id}
|
|
637
|
+
size="small"
|
|
638
|
+
type="dashed"
|
|
639
|
+
onClick={() => doRAction(raction.id, record.code)}
|
|
640
|
+
>
|
|
641
|
+
{translate("${" + raction.title + "}")}
|
|
642
|
+
</Button>:""
|
|
643
|
+
);
|
|
644
|
+
})
|
|
645
|
+
: ""}
|
|
646
|
+
|
|
647
|
+
{ltmplConfig.rowActions &&
|
|
648
|
+
!readOnly &&
|
|
649
|
+
ltmplConfig.rowActions.length > 0
|
|
650
|
+
? ltmplConfig.rowActions.map((action) => {
|
|
651
|
+
return (
|
|
652
|
+
<Action
|
|
653
|
+
serverKey={serverKey}
|
|
654
|
+
iconType={"icon"}
|
|
655
|
+
key={action.id}
|
|
656
|
+
data={[record]}
|
|
657
|
+
actionConfig={action}
|
|
658
|
+
doAction={this.doRowAction}
|
|
659
|
+
buttonSize={"small"}
|
|
660
|
+
serial={1}
|
|
661
|
+
></Action>
|
|
662
|
+
);
|
|
663
|
+
})
|
|
664
|
+
: ""}
|
|
665
|
+
|
|
666
|
+
{ltmplConfig.rowJumps &&
|
|
667
|
+
ltmplConfig.rowJumps.length > 0 &&
|
|
668
|
+
!readOnly
|
|
669
|
+
? ltmplConfig.rowJumps.map((jump) => {
|
|
670
|
+
return (
|
|
671
|
+
<Button
|
|
672
|
+
key={jump.id}
|
|
673
|
+
size="small"
|
|
674
|
+
type="dashed"
|
|
675
|
+
onClick={() => this.doRowJump(jump, record)}
|
|
676
|
+
>
|
|
677
|
+
{translate("${" + jump.title + "}")}
|
|
678
|
+
</Button>
|
|
679
|
+
);
|
|
680
|
+
})
|
|
681
|
+
: ""}
|
|
682
|
+
{ltmplConfig.rowCQuerys &&
|
|
683
|
+
ltmplConfig.rowCQuerys.length > 0 &&
|
|
684
|
+
!readOnly
|
|
685
|
+
? ltmplConfig.rowCQuerys.map((cquery) => {
|
|
686
|
+
// console.log("record record", record);
|
|
687
|
+
return (
|
|
688
|
+
<CquickButton
|
|
689
|
+
serverKey={serverKey}
|
|
690
|
+
key={cquery.id}
|
|
691
|
+
size={"small"}
|
|
692
|
+
pageType={"drawer"}
|
|
693
|
+
// onClick={() => doCQuery(cquery.id)}
|
|
694
|
+
cQueryConfig={cquery}
|
|
695
|
+
mainCode={
|
|
696
|
+
cquery.mainCodeColId
|
|
697
|
+
? record[cquery.mainCodeColId]
|
|
698
|
+
: record.code
|
|
699
|
+
}
|
|
700
|
+
/>
|
|
701
|
+
);
|
|
702
|
+
})
|
|
703
|
+
: ""}
|
|
704
|
+
{ltmplConfig.rowFileButtons &&
|
|
705
|
+
ltmplConfig.rowFileButtons.length > 0
|
|
706
|
+
? ltmplConfig.rowFileButtons.map((openFileButton) => {
|
|
707
|
+
let v= record[openFileButton.fieldId];
|
|
708
|
+
if(v){
|
|
709
|
+
if(v instanceof Array){
|
|
710
|
+
v=v[0];
|
|
711
|
+
}
|
|
712
|
+
if(v.includes("@R@")>0){
|
|
713
|
+
v=v.split("@R@")[1];
|
|
714
|
+
}
|
|
715
|
+
return (
|
|
716
|
+
<NewinFileView
|
|
717
|
+
title={openFileButton.title}
|
|
718
|
+
filePath={HCService.toFilePath(v, serverKey)}
|
|
719
|
+
serverKey={serverKey}
|
|
720
|
+
key={openFileButton.id}
|
|
721
|
+
//size={"small"}
|
|
722
|
+
/>
|
|
723
|
+
);
|
|
724
|
+
}else{
|
|
725
|
+
return "";
|
|
726
|
+
}
|
|
727
|
+
})
|
|
728
|
+
: ""}
|
|
729
|
+
{buttons.includes("singleDelete") &&
|
|
730
|
+
!readOnly &&
|
|
731
|
+
ActionUtils.isShow(
|
|
732
|
+
ltmplConfig.buttonDeleteAction?.preposes,
|
|
733
|
+
[record],
|
|
734
|
+
undefined
|
|
735
|
+
) ? (
|
|
736
|
+
<Popconfirm
|
|
737
|
+
placement="rightBottom"
|
|
738
|
+
title={translate("${确定要[删除]此数据吗}?")}
|
|
739
|
+
onConfirm={() => {
|
|
740
|
+
this.doDeleteByCode(record.code);
|
|
741
|
+
}}
|
|
742
|
+
okText={translate("${确定}")}
|
|
743
|
+
cancelText={translate("${取消}")}
|
|
744
|
+
okType={"danger"}
|
|
745
|
+
>
|
|
746
|
+
<Button size="small" type="dashed" danger>
|
|
747
|
+
<DeleteOutlined />
|
|
748
|
+
</Button>
|
|
749
|
+
</Popconfirm>
|
|
750
|
+
) : (
|
|
751
|
+
""
|
|
752
|
+
)}
|
|
753
|
+
</Space>
|
|
754
|
+
);
|
|
755
|
+
} else {
|
|
756
|
+
currentDataColIndex++;
|
|
757
|
+
column["className"] = "opsColumn";
|
|
758
|
+
column["title"] = translate("${" + item.title + "}");
|
|
759
|
+
column["width"] = item.colWidth ? item.colWidth : 160;
|
|
760
|
+
column["ellipsis"] = { showTitle: true };
|
|
761
|
+
column["align"] = item.valueAlign ? item.valueAlign : "left";
|
|
762
|
+
if (
|
|
763
|
+
ltmplConfig.leftFixedCols &&
|
|
764
|
+
ltmplConfig.leftFixedCols >= currentDataColIndex
|
|
765
|
+
) {
|
|
766
|
+
column["fixed"] = "left";
|
|
767
|
+
} else {
|
|
768
|
+
column["fixed"] = item.colFixed
|
|
769
|
+
? item.colFixed == "right"
|
|
770
|
+
? "right"
|
|
771
|
+
: "left"
|
|
772
|
+
: false;
|
|
773
|
+
}
|
|
774
|
+
column["render"] = (text, record) => {
|
|
775
|
+
return (
|
|
776
|
+
<ViewControl
|
|
777
|
+
serverKey={serverKey}
|
|
778
|
+
fieldConfig={item}
|
|
779
|
+
value={record[item.id]}
|
|
780
|
+
holderType={"table"}
|
|
781
|
+
/>
|
|
782
|
+
);
|
|
783
|
+
};
|
|
784
|
+
}
|
|
785
|
+
});
|
|
786
|
+
|
|
787
|
+
console.log("columns", tableColumns);
|
|
788
|
+
|
|
789
|
+
return tableColumns;
|
|
790
|
+
};
|
|
791
|
+
|
|
792
|
+
async componentDidMount() {
|
|
793
|
+
const { ltmplConfig } = this.props;
|
|
794
|
+
const { translate } = this.context;
|
|
795
|
+
let sortedColConfigs = undefined;
|
|
796
|
+
if (ltmplConfig) {
|
|
797
|
+
sortedColConfigs = [
|
|
798
|
+
{ id: "10000", title: translate("${排序}") },
|
|
799
|
+
...ltmplConfig.columns,
|
|
800
|
+
{ id: "20000", title: translate("${隐藏}") },
|
|
801
|
+
];
|
|
802
|
+
}
|
|
803
|
+
this.loadData(defaultDisabledColIds, [], sortedColConfigs);
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
async componentDidUpdate(prevProps) {
|
|
807
|
+
const { sourceId, criteriaData, ltmplConfig } = this.props;
|
|
808
|
+
const { translate } = this.context;
|
|
809
|
+
let {
|
|
810
|
+
ltmplConfig: preLtmplConfig,
|
|
811
|
+
criteriaData: preCriteriaData,
|
|
812
|
+
sourceId: preSourceId,
|
|
813
|
+
} = prevProps;
|
|
814
|
+
|
|
815
|
+
let { hiddenColIds, sortedColConfigs } = this.state;
|
|
816
|
+
|
|
817
|
+
if (
|
|
818
|
+
(sourceId && preSourceId != sourceId) ||
|
|
819
|
+
(ltmplConfig &&
|
|
820
|
+
(!preLtmplConfig || ltmplConfig.id != preLtmplConfig.id)) ||
|
|
821
|
+
Units.transQueryParamsToStr(criteriaData, false, [
|
|
822
|
+
"pageSize",
|
|
823
|
+
"pageNo",
|
|
824
|
+
]) !=
|
|
825
|
+
Units.transQueryParamsToStr(preCriteriaData, false, [
|
|
826
|
+
"pageSize",
|
|
827
|
+
"pageNo",
|
|
828
|
+
])
|
|
829
|
+
) {
|
|
830
|
+
//5秒后允许再次请求数据
|
|
831
|
+
//refresh=false;
|
|
832
|
+
|
|
833
|
+
if (preLtmplConfig && ltmplConfig.id == preLtmplConfig.id) {
|
|
834
|
+
await this.loadData(hiddenColIds, [], sortedColConfigs);
|
|
835
|
+
} else {
|
|
836
|
+
let sColConfigs = undefined;
|
|
837
|
+
if (ltmplConfig) {
|
|
838
|
+
sColConfigs = [
|
|
839
|
+
{ id: "10000", title: translate("${排序}") },
|
|
840
|
+
...ltmplConfig.columns,
|
|
841
|
+
{ id: "20000", title: translate("${隐藏}") },
|
|
842
|
+
];
|
|
843
|
+
}
|
|
844
|
+
this.setState({
|
|
845
|
+
viewModels: ["table"],
|
|
846
|
+
});
|
|
847
|
+
await this.loadData(defaultDisabledColIds, [], sColConfigs);
|
|
848
|
+
}
|
|
849
|
+
// setTimeout( function() {
|
|
850
|
+
// refresh=true;
|
|
851
|
+
// },112000);
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
handleShowChart = () => {
|
|
856
|
+
this.setState({
|
|
857
|
+
showL2Chart: !this.state.showL2Chart,
|
|
858
|
+
});
|
|
859
|
+
};
|
|
860
|
+
|
|
861
|
+
handleDataAnalysis = () => {
|
|
862
|
+
this.setState({
|
|
863
|
+
showL2ActTable: !this.state.showL2ActTable,
|
|
864
|
+
});
|
|
865
|
+
};
|
|
866
|
+
|
|
867
|
+
unHiden = () => {
|
|
868
|
+
const { ltmplConfig } = this.props;
|
|
869
|
+
const { hiddenColIds, sortedColConfigs } = this.state;
|
|
870
|
+
this.setState({
|
|
871
|
+
hiddenRowCodes: [],
|
|
872
|
+
// tableColumns: this.buildTableColumns(ltmplConfig, hiddenColIds, [], sortedColConfigs),
|
|
873
|
+
});
|
|
874
|
+
};
|
|
875
|
+
|
|
876
|
+
onHide = (code: string) => {
|
|
877
|
+
const { ltmplConfig } = this.props;
|
|
878
|
+
const { hiddenRowCodes, hiddenColIds, sortedColConfigs } = this.state;
|
|
879
|
+
let hiddenCodes = [...hiddenRowCodes, code];
|
|
880
|
+
this.setState({
|
|
881
|
+
hiddenRowCodes: hiddenCodes,
|
|
882
|
+
// tableColumns: this.buildTableColumns(ltmplConfig, hiddenColIds, hiddenCodes, sortedColConfigs),
|
|
883
|
+
});
|
|
884
|
+
};
|
|
885
|
+
|
|
886
|
+
changeViewModel = (viewModels) => {
|
|
887
|
+
this.setState({
|
|
888
|
+
viewModels,
|
|
889
|
+
});
|
|
890
|
+
};
|
|
891
|
+
|
|
892
|
+
changeHiddenColumns = (hiddenColIds: string[]) => {
|
|
893
|
+
const {} = this.props;
|
|
894
|
+
const {} = this.state;
|
|
895
|
+
this.setState({
|
|
896
|
+
showL2Chart: false,
|
|
897
|
+
hiddenColIds,
|
|
898
|
+
// tableColumns: this.buildTableColumns(ltmplConfig, hiddenColIds, hiddenRowCodes, sortedColConfigs),
|
|
899
|
+
});
|
|
900
|
+
};
|
|
901
|
+
|
|
902
|
+
doSelectedAction = async (actionId: string, codes, params: object) => {
|
|
903
|
+
const { selectedRows } = this.state;
|
|
904
|
+
this.doAction(actionId, selectedRows, params);
|
|
905
|
+
};
|
|
906
|
+
|
|
907
|
+
doAction = async (actionId: string, selectedRows: SelectedRow[], params) => {
|
|
908
|
+
const { serverKey } = this.props;
|
|
909
|
+
const { hiddenColIds, hiddenRowCodes, sortedColConfigs } = this.state;
|
|
910
|
+
this.setState({
|
|
911
|
+
loading: true,
|
|
912
|
+
});
|
|
913
|
+
let result: boolean = await HcserviceV3.postActions(
|
|
914
|
+
serverKey,
|
|
915
|
+
actionId,
|
|
916
|
+
selectedRows,
|
|
917
|
+
params
|
|
918
|
+
);
|
|
919
|
+
if (result) {
|
|
920
|
+
//重新加载数据
|
|
921
|
+
this.loadData(hiddenColIds, hiddenRowCodes, sortedColConfigs);
|
|
922
|
+
} else {
|
|
923
|
+
this.setState({
|
|
924
|
+
loading: false,
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
};
|
|
928
|
+
|
|
929
|
+
doRowAction = async (actionId: string, codes: string[], params: object) => {
|
|
930
|
+
this.doAction(actionId, [{ title: undefined, code: codes[0] }], params);
|
|
931
|
+
};
|
|
932
|
+
|
|
933
|
+
doDelete = async () => {
|
|
934
|
+
const { sourceId, serverKey, mainCode } = this.props;
|
|
935
|
+
const {
|
|
936
|
+
selectedRows,
|
|
937
|
+
hiddenColIds,
|
|
938
|
+
hiddenRowCodes,
|
|
939
|
+
sortedColConfigs,
|
|
940
|
+
} = this.state;
|
|
941
|
+
this.setState({
|
|
942
|
+
loading: true,
|
|
943
|
+
});
|
|
944
|
+
let result: boolean = await HcserviceV3.deleteData(
|
|
945
|
+
serverKey,
|
|
946
|
+
sourceId,
|
|
947
|
+
selectedRows,
|
|
948
|
+
mainCode
|
|
949
|
+
);
|
|
950
|
+
if (result) {
|
|
951
|
+
//重新加载数据
|
|
952
|
+
this.loadData(hiddenColIds, hiddenRowCodes, sortedColConfigs);
|
|
953
|
+
} else {
|
|
954
|
+
this.setState({
|
|
955
|
+
loading: false,
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
};
|
|
959
|
+
|
|
960
|
+
doDeleteByCode = async (code: string) => {
|
|
961
|
+
const { sourceId, serverKey, mainCode } = this.props;
|
|
962
|
+
const { hiddenColIds, hiddenRowCodes, sortedColConfigs } = this.state;
|
|
963
|
+
this.setState({
|
|
964
|
+
loading: true,
|
|
965
|
+
});
|
|
966
|
+
let result: boolean = await HcserviceV3.deleteByCode(
|
|
967
|
+
serverKey,
|
|
968
|
+
sourceId,
|
|
969
|
+
[code],
|
|
970
|
+
mainCode
|
|
971
|
+
);
|
|
972
|
+
if (result) {
|
|
973
|
+
//重新加载数据
|
|
974
|
+
this.loadData(hiddenColIds, hiddenRowCodes, sortedColConfigs);
|
|
975
|
+
} else {
|
|
976
|
+
this.setState({
|
|
977
|
+
loading: false,
|
|
978
|
+
});
|
|
979
|
+
}
|
|
980
|
+
};
|
|
981
|
+
|
|
982
|
+
doSelectedCQuery = async (cqueryId: string) => {};
|
|
983
|
+
|
|
984
|
+
doJump = async (jump: JumpConfig, record_: DtmplData) => {
|
|
985
|
+
let record = record_.fieldMap ? record_.fieldMap : record_;
|
|
986
|
+
|
|
987
|
+
let url = null;
|
|
988
|
+
|
|
989
|
+
let path = jump.path;
|
|
990
|
+
if (!path) {
|
|
991
|
+
path = "/";
|
|
992
|
+
}
|
|
993
|
+
//是否以http开头
|
|
994
|
+
if (path.indexOf("#") == 0 || url.indexOf("/#") == 0) {
|
|
995
|
+
url = "";
|
|
996
|
+
} else if (
|
|
997
|
+
path.indexOf("http://") == 0 ||
|
|
998
|
+
path.indexOf("HTTP://") == 0 ||
|
|
999
|
+
path.indexOf("https://") == 0 ||
|
|
1000
|
+
path.indexOf("HTTPS://") == 0
|
|
1001
|
+
) {
|
|
1002
|
+
url = path.split("//")[0] + "//";
|
|
1003
|
+
path = path.split("//")[1];
|
|
1004
|
+
} else {
|
|
1005
|
+
url = new URL(window.location.href).pathname;
|
|
1006
|
+
}
|
|
1007
|
+
//处理路由参数
|
|
1008
|
+
let paths = path.split("/");
|
|
1009
|
+
|
|
1010
|
+
let routeParamConfigs = jump.routeParams;
|
|
1011
|
+
if (routeParamConfigs) {
|
|
1012
|
+
for (let i = 0; i < paths.length; i++) {
|
|
1013
|
+
if (paths[i].indexOf(":") == 0) {
|
|
1014
|
+
let pa = paths[i].substring(1);
|
|
1015
|
+
//根据参数名匹配参数
|
|
1016
|
+
for (let p of routeParamConfigs) {
|
|
1017
|
+
if (p && pa == p.title) {
|
|
1018
|
+
//赋值替换
|
|
1019
|
+
let v = record[p.id] ? record[p.id] : p.defaultValue;
|
|
1020
|
+
paths[i] = v;
|
|
1021
|
+
break;
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
url = Units.joinPath(url, paths.join("/"));
|
|
1027
|
+
} else {
|
|
1028
|
+
url = Units.joinPath(url, path);
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
//处理search 参数
|
|
1032
|
+
let searchParamConfigs = jump.searchParams;
|
|
1033
|
+
let searchs = [];
|
|
1034
|
+
//放入token
|
|
1035
|
+
if (jump.tokenName) {
|
|
1036
|
+
searchs[0] = jump.tokenName + "=" + Units.hydrocarbonToken();
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
if (searchParamConfigs) {
|
|
1040
|
+
let initSearchLength = searchs.length;
|
|
1041
|
+
for (let i = 0; i < searchParamConfigs.length; i++) {
|
|
1042
|
+
let p = searchParamConfigs[i];
|
|
1043
|
+
let v = record[p.id] ? record[p.id] : p.defaultValue;
|
|
1044
|
+
if (!v && p.title == "code") {
|
|
1045
|
+
v = record_.code;
|
|
1046
|
+
}
|
|
1047
|
+
searchs[initSearchLength + i] = p.title + "=" + v;
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
if (searchs.length > 0) {
|
|
1051
|
+
if (url.indexOf("?") != url.length - 1) {
|
|
1052
|
+
url = url + "?";
|
|
1053
|
+
}
|
|
1054
|
+
url = url + searchs.join("&");
|
|
1055
|
+
}
|
|
1056
|
+
if (
|
|
1057
|
+
url.indexOf("#") == 0 ||
|
|
1058
|
+
url.indexOf("/#") == 0 ||
|
|
1059
|
+
url.indexOf("//#") == 0
|
|
1060
|
+
) {
|
|
1061
|
+
window.location.hash = url.substring(url.indexOf("#") + 1);
|
|
1062
|
+
} else {
|
|
1063
|
+
window.open(url);
|
|
1064
|
+
}
|
|
1065
|
+
};
|
|
1066
|
+
|
|
1067
|
+
doRowJump = async (jump: JumpConfig, record: DtmplData) => {
|
|
1068
|
+
this.doJump(jump, record);
|
|
1069
|
+
};
|
|
1070
|
+
|
|
1071
|
+
renderExportButton = (title, type: ExportType, sourceId?: string) => {
|
|
1072
|
+
const { pageNo, pageSize, serverKey, ltmplConfig, readOnly } = this.props;
|
|
1073
|
+
|
|
1074
|
+
let buttons = ltmplConfig?.buttons;
|
|
1075
|
+
|
|
1076
|
+
const { queryKey } = this.state;
|
|
1077
|
+
const { translate } = this.context;
|
|
1078
|
+
return (
|
|
1079
|
+
<Popover
|
|
1080
|
+
content={
|
|
1081
|
+
<ExportFrame //导出组件
|
|
1082
|
+
currentPage={{
|
|
1083
|
+
pageNo: pageNo ? pageNo : 1,
|
|
1084
|
+
pageSize: pageSize ? pageSize : ltmplConfig.defaultPageSize,
|
|
1085
|
+
}}
|
|
1086
|
+
type={type}
|
|
1087
|
+
serverKey={serverKey}
|
|
1088
|
+
queryKey={queryKey}
|
|
1089
|
+
sourceId={sourceId}
|
|
1090
|
+
title={translate(
|
|
1091
|
+
"${" + ltmplConfig.title + "}" + "-" + "${" + title + "}"
|
|
1092
|
+
)}
|
|
1093
|
+
/>
|
|
1094
|
+
}
|
|
1095
|
+
title={translate("${" + title + "}")}
|
|
1096
|
+
placement="bottomRight"
|
|
1097
|
+
trigger="click"
|
|
1098
|
+
>
|
|
1099
|
+
<Tooltip title={translate("${" + title + "}")}>
|
|
1100
|
+
<Button
|
|
1101
|
+
style={{
|
|
1102
|
+
// display:
|
|
1103
|
+
// buttons.includes("exportLtmplExcel") && !readOnly
|
|
1104
|
+
// ? "inline"
|
|
1105
|
+
// : "none",
|
|
1106
|
+
marginLeft: "5px",
|
|
1107
|
+
}} //为了点击到没有导出模块,使组件不致销毁,丢失导出数据
|
|
1108
|
+
>
|
|
1109
|
+
{type == "ltmpl-data-excel" ? <DownloadOutlined /> : title}
|
|
1110
|
+
</Button>
|
|
1111
|
+
</Tooltip>
|
|
1112
|
+
</Popover>
|
|
1113
|
+
);
|
|
1114
|
+
};
|
|
1115
|
+
|
|
1116
|
+
renderFileExportButton = () => {
|
|
1117
|
+
const { ltmplConfig } = this.props;
|
|
1118
|
+
let fileExports = ltmplConfig?.topFileExports;
|
|
1119
|
+
if (fileExports) {
|
|
1120
|
+
return fileExports.map((fileExport) => {
|
|
1121
|
+
return this.renderExportButton(
|
|
1122
|
+
fileExport.title,
|
|
1123
|
+
"ltmpl-data-filedata",
|
|
1124
|
+
fileExport.id
|
|
1125
|
+
);
|
|
1126
|
+
});
|
|
1127
|
+
} else {
|
|
1128
|
+
return <></>;
|
|
1129
|
+
}
|
|
1130
|
+
};
|
|
1131
|
+
|
|
1132
|
+
doSelectedJump = async (jump: JumpConfig) => {
|
|
1133
|
+
const { selectedDatas } = this.state;
|
|
1134
|
+
if (selectedDatas.length == 1) {
|
|
1135
|
+
this.doJump(jump, selectedDatas[0]);
|
|
1136
|
+
}
|
|
1137
|
+
};
|
|
1138
|
+
|
|
1139
|
+
changeRowSelection = (
|
|
1140
|
+
selectedRows: SelectedRow[],
|
|
1141
|
+
selectedDatas: DtmplData[]
|
|
1142
|
+
) => {
|
|
1143
|
+
this.setState({
|
|
1144
|
+
selectedRows,
|
|
1145
|
+
selectedDatas,
|
|
1146
|
+
});
|
|
1147
|
+
};
|
|
1148
|
+
|
|
1149
|
+
onChangeColSort = (sortedColConfigs: ColumnConfig[]) => {
|
|
1150
|
+
const { ltmplConfig } = this.props;
|
|
1151
|
+
const { hiddenRowCodes, hiddenColIds } = this.state;
|
|
1152
|
+
this.setState({
|
|
1153
|
+
sortedColConfigs,
|
|
1154
|
+
// tableColumns: this.buildTableColumns(ltmplConfig, hiddenColIds, hiddenRowCodes, sortedColConfigs),
|
|
1155
|
+
});
|
|
1156
|
+
};
|
|
1157
|
+
|
|
1158
|
+
getAddTmplButton = (classAddConfigs: ClassAddConfig[]) => {
|
|
1159
|
+
const { translate } = this.context;
|
|
1160
|
+
if (classAddConfigs && classAddConfigs.length < 1) {
|
|
1161
|
+
return translate("${没有分类添加按钮}");
|
|
1162
|
+
}
|
|
1163
|
+
return classAddConfigs.map((config) => {
|
|
1164
|
+
return (
|
|
1165
|
+
<p>
|
|
1166
|
+
<Button
|
|
1167
|
+
size={"small"}
|
|
1168
|
+
type={"text"}
|
|
1169
|
+
onClick={() => this.props.doCreate(config.id, false)}
|
|
1170
|
+
>
|
|
1171
|
+
{config.title}
|
|
1172
|
+
</Button>
|
|
1173
|
+
</p>
|
|
1174
|
+
);
|
|
1175
|
+
});
|
|
1176
|
+
};
|
|
1177
|
+
|
|
1178
|
+
renderHeaderButtons = () => {
|
|
1179
|
+
let {
|
|
1180
|
+
hiddenColIds,
|
|
1181
|
+
queryKey,
|
|
1182
|
+
viewModels,
|
|
1183
|
+
sortedColConfigs,
|
|
1184
|
+
disabledColIds,
|
|
1185
|
+
showL2Chart,
|
|
1186
|
+
showL2ActTable,
|
|
1187
|
+
} = this.state;
|
|
1188
|
+
const {
|
|
1189
|
+
ltmplConfig,
|
|
1190
|
+
sourceId,
|
|
1191
|
+
doCreate,
|
|
1192
|
+
doSearch,
|
|
1193
|
+
menuId,
|
|
1194
|
+
funcMode,
|
|
1195
|
+
customCreatable,
|
|
1196
|
+
serverKey,
|
|
1197
|
+
readOnly,
|
|
1198
|
+
pageNo,
|
|
1199
|
+
pageSize,
|
|
1200
|
+
} = this.props;
|
|
1201
|
+
const { translate } = this.context;
|
|
1202
|
+
let { buttons } = ltmplConfig;
|
|
1203
|
+
|
|
1204
|
+
return (
|
|
1205
|
+
<>
|
|
1206
|
+
<Space>
|
|
1207
|
+
{funcMode == "common" && this.criteriaFormUseful() ? (
|
|
1208
|
+
<Popover trigger="click" content={this.renderCriteriaForm()}>
|
|
1209
|
+
<Button>
|
|
1210
|
+
<SearchOutlined />
|
|
1211
|
+
</Button>
|
|
1212
|
+
</Popover>
|
|
1213
|
+
) : null}
|
|
1214
|
+
{buttons.includes("ratmplSelect") ? (
|
|
1215
|
+
<Button onClick={() => this.setState({ showRatmplSelector: true })}>
|
|
1216
|
+
{translate("${选择}")}
|
|
1217
|
+
</Button>
|
|
1218
|
+
) : (
|
|
1219
|
+
""
|
|
1220
|
+
)}
|
|
1221
|
+
{buttons.includes("dtmplAdd") && doCreate && !readOnly ? (
|
|
1222
|
+
ltmplConfig.classAddConfigs &&
|
|
1223
|
+
ltmplConfig.classAddConfigs.length > 0 ? (
|
|
1224
|
+
<Popover
|
|
1225
|
+
arrow={false}
|
|
1226
|
+
content={this.getAddTmplButton(ltmplConfig.classAddConfigs)}
|
|
1227
|
+
placement="bottomRight"
|
|
1228
|
+
>
|
|
1229
|
+
<Tooltip>
|
|
1230
|
+
<Button>
|
|
1231
|
+
<PlusOutlined />
|
|
1232
|
+
</Button>
|
|
1233
|
+
</Tooltip>
|
|
1234
|
+
</Popover>
|
|
1235
|
+
) : (
|
|
1236
|
+
<Tooltip title={translate("${创建}")}>
|
|
1237
|
+
<Button onClick={() => doCreate(null, false)}>
|
|
1238
|
+
<PlusOutlined />
|
|
1239
|
+
</Button>{" "}
|
|
1240
|
+
</Tooltip>
|
|
1241
|
+
)
|
|
1242
|
+
) : (
|
|
1243
|
+
""
|
|
1244
|
+
)}
|
|
1245
|
+
{(buttons.includes("dtmplCustomAdd") || customCreatable) &&
|
|
1246
|
+
doCreate &&
|
|
1247
|
+
!readOnly ? (
|
|
1248
|
+
<Tooltip title={translate("${创建}")}>
|
|
1249
|
+
<Button onClick={() => doCreate(null, true)}>
|
|
1250
|
+
<PlusCircleOutlined />
|
|
1251
|
+
</Button>
|
|
1252
|
+
</Tooltip>
|
|
1253
|
+
) : (
|
|
1254
|
+
""
|
|
1255
|
+
)}
|
|
1256
|
+
{buttons.includes("importLtmplExcel") && !readOnly ? (
|
|
1257
|
+
<Tooltip title={translate("${导入}")}>
|
|
1258
|
+
{" "}
|
|
1259
|
+
<Button
|
|
1260
|
+
href={`#${
|
|
1261
|
+
localStorage.getItem("version") === "v2" ? "/v2" : ""
|
|
1262
|
+
}/${sourceId}/importer?menuId=${menuId}`}
|
|
1263
|
+
target={"_blank"}
|
|
1264
|
+
>
|
|
1265
|
+
<UploadOutlined />
|
|
1266
|
+
</Button>
|
|
1267
|
+
</Tooltip>
|
|
1268
|
+
) : (
|
|
1269
|
+
""
|
|
1270
|
+
)}
|
|
1271
|
+
{buttons.includes("exportLtmplExcel") && !readOnly
|
|
1272
|
+
? this.renderExportButton("导出", "ltmpl-data-excel")
|
|
1273
|
+
: ""}
|
|
1274
|
+
{this.renderFileExportButton()}
|
|
1275
|
+
{buttons.includes("showChart") ? (
|
|
1276
|
+
<Tooltip
|
|
1277
|
+
title={
|
|
1278
|
+
showL2Chart
|
|
1279
|
+
? translate("${隐藏}${图表}")
|
|
1280
|
+
: translate("${展示}${图表}")
|
|
1281
|
+
}
|
|
1282
|
+
>
|
|
1283
|
+
<Button onClick={this.handleShowChart}>
|
|
1284
|
+
<LineChartOutlined />
|
|
1285
|
+
</Button>
|
|
1286
|
+
</Tooltip>
|
|
1287
|
+
) : (
|
|
1288
|
+
""
|
|
1289
|
+
)}
|
|
1290
|
+
{buttons.includes("analysis") ? (
|
|
1291
|
+
<Tooltip
|
|
1292
|
+
title={
|
|
1293
|
+
showL2ActTable
|
|
1294
|
+
? translate("${隐藏}${数据分析}")
|
|
1295
|
+
: translate("${展示}${数据分析}")
|
|
1296
|
+
}
|
|
1297
|
+
>
|
|
1298
|
+
<Button onClick={this.handleDataAnalysis}>
|
|
1299
|
+
<FundOutlined />
|
|
1300
|
+
</Button>
|
|
1301
|
+
</Tooltip>
|
|
1302
|
+
) : (
|
|
1303
|
+
""
|
|
1304
|
+
)}
|
|
1305
|
+
{buttons.includes("reStat") && !readOnly ? (
|
|
1306
|
+
<Restat
|
|
1307
|
+
serverKey={serverKey}
|
|
1308
|
+
fields={ltmplConfig.reStatParams}
|
|
1309
|
+
sourceId={sourceId}
|
|
1310
|
+
onfinish={() => doSearch(null)}
|
|
1311
|
+
></Restat>
|
|
1312
|
+
) : (
|
|
1313
|
+
""
|
|
1314
|
+
)}
|
|
1315
|
+
<Popover
|
|
1316
|
+
content={
|
|
1317
|
+
<Checkbox.Group
|
|
1318
|
+
value={viewModels}
|
|
1319
|
+
onChange={this.changeViewModel}
|
|
1320
|
+
>
|
|
1321
|
+
<Row style={{ width: "120px" }}>
|
|
1322
|
+
<Col span={24}>
|
|
1323
|
+
<Checkbox value={"table"}>{translate("${表格}")}</Checkbox>
|
|
1324
|
+
</Col>
|
|
1325
|
+
<Col span={24}>
|
|
1326
|
+
<Checkbox value={"verticalList"}>
|
|
1327
|
+
{translate("${纵向列表}")}
|
|
1328
|
+
</Checkbox>
|
|
1329
|
+
</Col>
|
|
1330
|
+
{/*<Col span={24}><Checkbox value={'horizontalList'}>横向列表</Checkbox></Col>*/}
|
|
1331
|
+
</Row>
|
|
1332
|
+
</Checkbox.Group>
|
|
1333
|
+
}
|
|
1334
|
+
title={translate("${视图}")}
|
|
1335
|
+
placement="bottomRight"
|
|
1336
|
+
trigger="click"
|
|
1337
|
+
>
|
|
1338
|
+
<Tooltip title={translate("${选择视图}")}>
|
|
1339
|
+
<Button>
|
|
1340
|
+
<RetweetOutlined />
|
|
1341
|
+
</Button>
|
|
1342
|
+
</Tooltip>
|
|
1343
|
+
</Popover>
|
|
1344
|
+
<Popover
|
|
1345
|
+
content={
|
|
1346
|
+
<ColumnSelector
|
|
1347
|
+
columns={sortedColConfigs}
|
|
1348
|
+
disabledColIds={disabledColIds}
|
|
1349
|
+
hiddenColIds={hiddenColIds}
|
|
1350
|
+
onChangeColSort={this.onChangeColSort}
|
|
1351
|
+
onChangeHiddenCols={this.changeHiddenColumns}
|
|
1352
|
+
/>
|
|
1353
|
+
}
|
|
1354
|
+
title={translate("${排序和选择列}")}
|
|
1355
|
+
placement="bottomRight"
|
|
1356
|
+
trigger="click"
|
|
1357
|
+
>
|
|
1358
|
+
<Tooltip title={translate("${点击排序和选择列}")}>
|
|
1359
|
+
<Button>
|
|
1360
|
+
<TableOutlined />
|
|
1361
|
+
</Button>
|
|
1362
|
+
</Tooltip>
|
|
1363
|
+
</Popover>
|
|
1364
|
+
{doSearch ? (
|
|
1365
|
+
<Button
|
|
1366
|
+
className="hoverbig"
|
|
1367
|
+
title={translate("${刷新}")}
|
|
1368
|
+
onClick={() => {
|
|
1369
|
+
doSearch(null);
|
|
1370
|
+
}}
|
|
1371
|
+
>
|
|
1372
|
+
<ReloadOutlined />
|
|
1373
|
+
</Button>
|
|
1374
|
+
) : (
|
|
1375
|
+
""
|
|
1376
|
+
)}
|
|
1377
|
+
</Space>
|
|
1378
|
+
</>
|
|
1379
|
+
);
|
|
1380
|
+
};
|
|
1381
|
+
|
|
1382
|
+
criteriaFormUseful = () => {
|
|
1383
|
+
const { ltmplConfig } = this.props;
|
|
1384
|
+
let { buttons, criterias, updrillButtonConfigs } = ltmplConfig;
|
|
1385
|
+
if (
|
|
1386
|
+
((buttons.includes("query") ||
|
|
1387
|
+
(updrillButtonConfigs && updrillButtonConfigs.length > 0)) &&
|
|
1388
|
+
((criterias && criterias.length > 0) ||
|
|
1389
|
+
buttons.includes("drilling"))) ||
|
|
1390
|
+
this.checkBoxUseful()
|
|
1391
|
+
) {
|
|
1392
|
+
return true;
|
|
1393
|
+
} else {
|
|
1394
|
+
return false;
|
|
1395
|
+
}
|
|
1396
|
+
};
|
|
1397
|
+
|
|
1398
|
+
checkBoxUseful = () => {
|
|
1399
|
+
const { ltmplConfig } = this.props;
|
|
1400
|
+
let { buttons, jumps, actions,fileExports } = ltmplConfig;
|
|
1401
|
+
if (
|
|
1402
|
+
buttons.includes("batchDelete") ||
|
|
1403
|
+
(actions && actions.length > 0) ||
|
|
1404
|
+
(jumps && jumps.length > 0) || (fileExports && fileExports.length>0)
|
|
1405
|
+
) {
|
|
1406
|
+
return true;
|
|
1407
|
+
} else {
|
|
1408
|
+
return false;
|
|
1409
|
+
}
|
|
1410
|
+
};
|
|
1411
|
+
|
|
1412
|
+
renderCriteriaForm = () => {
|
|
1413
|
+
let { loading, selectedRows, selectedDatas } = this.state;
|
|
1414
|
+
let { ltmplConfig, doSearch, criteriaData, serverKey } = this.props;
|
|
1415
|
+
return (
|
|
1416
|
+
<CriteriaForm
|
|
1417
|
+
serverKey={serverKey}
|
|
1418
|
+
loading={loading}
|
|
1419
|
+
selectedDatas={selectedDatas}
|
|
1420
|
+
selectedRows={selectedRows}
|
|
1421
|
+
doCustomButton={this.doCustomButton}
|
|
1422
|
+
ltmplConfig={ltmplConfig}
|
|
1423
|
+
data={criteriaData}
|
|
1424
|
+
doCQuery={this.doSelectedCQuery}
|
|
1425
|
+
doAction={this.doSelectedAction}
|
|
1426
|
+
doDelete={this.doDelete}
|
|
1427
|
+
doJump={this.doSelectedJump}
|
|
1428
|
+
doSearch={doSearch}
|
|
1429
|
+
/>
|
|
1430
|
+
);
|
|
1431
|
+
};
|
|
1432
|
+
|
|
1433
|
+
renderContent = () => {
|
|
1434
|
+
let {
|
|
1435
|
+
queryKey,
|
|
1436
|
+
loading,
|
|
1437
|
+
selectedRows,
|
|
1438
|
+
hiddenRowCodes,
|
|
1439
|
+
viewModels,
|
|
1440
|
+
sortedColConfigs,
|
|
1441
|
+
hiddenColIds,
|
|
1442
|
+
showL2ActTable,
|
|
1443
|
+
} = this.state;
|
|
1444
|
+
let {
|
|
1445
|
+
sourceId,
|
|
1446
|
+
ltmplConfig,
|
|
1447
|
+
funcMode,
|
|
1448
|
+
title,
|
|
1449
|
+
collapsible,
|
|
1450
|
+
pageSize,
|
|
1451
|
+
pageNo,
|
|
1452
|
+
onChangePage,
|
|
1453
|
+
serverKey,
|
|
1454
|
+
doSearch,
|
|
1455
|
+
criteriaData,
|
|
1456
|
+
} = this.props;
|
|
1457
|
+
const { translate } = this.context;
|
|
1458
|
+
|
|
1459
|
+
if (!ltmplConfig || !sourceId) {
|
|
1460
|
+
return (
|
|
1461
|
+
<>
|
|
1462
|
+
<Card loading={loading}></Card>
|
|
1463
|
+
<Table loading={loading}></Table>
|
|
1464
|
+
</>
|
|
1465
|
+
);
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
let tableColumns = this.buildTableColumns(
|
|
1469
|
+
ltmplConfig,
|
|
1470
|
+
hiddenColIds,
|
|
1471
|
+
hiddenRowCodes,
|
|
1472
|
+
sortedColConfigs
|
|
1473
|
+
);
|
|
1474
|
+
|
|
1475
|
+
let { buttons } = ltmplConfig;
|
|
1476
|
+
let displayCriteriaCard: boolean = false;
|
|
1477
|
+
if (funcMode == "simple" || funcMode == "common") {
|
|
1478
|
+
displayCriteriaCard = false;
|
|
1479
|
+
} else if (this.criteriaFormUseful()) {
|
|
1480
|
+
displayCriteriaCard = true;
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
let columnConfigs = [];
|
|
1484
|
+
if (sortedColConfigs) {
|
|
1485
|
+
for (let colConfig of sortedColConfigs) {
|
|
1486
|
+
if (!hiddenColIds.includes(colConfig.id)) {
|
|
1487
|
+
columnConfigs.push(colConfig);
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
const sortColumnData = [];
|
|
1493
|
+
if (Array.isArray(criteriaData["sortColIds"])) {
|
|
1494
|
+
sortColumnData.push(...criteriaData["sortColIds"]);
|
|
1495
|
+
}
|
|
1496
|
+
return (
|
|
1497
|
+
<>
|
|
1498
|
+
{/*暂时不支持L2chart 后续用echart*/}
|
|
1499
|
+
{/*{buttons.includes("showChart") && showL2Chart ? <div>*/}
|
|
1500
|
+
{/* <StatViewL2Chart queryKey={queryKey.key} ltmplConfig={ltmplConfig} hiddenColIds={hiddenColIds}*/}
|
|
1501
|
+
{/* hiddenRowCodes={hiddenRowCodes}/>*/}
|
|
1502
|
+
{/* /!*<Divider dashed style={{borderTopColor: "#40a9ff",}} plain></Divider>*!/*/}
|
|
1503
|
+
{/*</div> : ""*/}
|
|
1504
|
+
{/*}*/}
|
|
1505
|
+
{buttons.includes("analysis") && showL2ActTable ? (
|
|
1506
|
+
<div>
|
|
1507
|
+
<L2ActTable
|
|
1508
|
+
serverKey={serverKey}
|
|
1509
|
+
innerQueryKey={queryKey.key}
|
|
1510
|
+
sourceId={sourceId}
|
|
1511
|
+
/>
|
|
1512
|
+
<Divider
|
|
1513
|
+
dashed
|
|
1514
|
+
style={{ borderTopColor: "#40a9ff" }}
|
|
1515
|
+
plain
|
|
1516
|
+
></Divider>
|
|
1517
|
+
</div>
|
|
1518
|
+
) : (
|
|
1519
|
+
""
|
|
1520
|
+
)}
|
|
1521
|
+
<div className="actTable">
|
|
1522
|
+
{funcMode == "complete" || funcMode == "common" ? (
|
|
1523
|
+
collapsible ? null : (
|
|
1524
|
+
<span>
|
|
1525
|
+
{ltmplConfig.header ? (
|
|
1526
|
+
<div
|
|
1527
|
+
style={{ padding: "6px" }}
|
|
1528
|
+
dangerouslySetInnerHTML={{ __html: ltmplConfig.header }}
|
|
1529
|
+
></div>
|
|
1530
|
+
) : null}
|
|
1531
|
+
<h3>
|
|
1532
|
+
{" "}
|
|
1533
|
+
{!title
|
|
1534
|
+
? translate("${" + ltmplConfig.title + "}")
|
|
1535
|
+
: typeof title == "string"
|
|
1536
|
+
? translate("${" + title + "}")
|
|
1537
|
+
: title}
|
|
1538
|
+
{/*{translate("${" + (title ? title : ltmplConfig.title) + "}")}*/}
|
|
1539
|
+
<p className="fr">{this.renderHeaderButtons()}</p>
|
|
1540
|
+
</h3>
|
|
1541
|
+
</span>
|
|
1542
|
+
)
|
|
1543
|
+
) : null}
|
|
1544
|
+
{displayCriteriaCard ? this.renderCriteriaForm() : null}
|
|
1545
|
+
{loading ? (
|
|
1546
|
+
<Table loading={loading}></Table>
|
|
1547
|
+
) : (
|
|
1548
|
+
<QueryTable
|
|
1549
|
+
tableProps={{scrollY:ltmplConfig.scrollY,clickDisplayTotal:!ltmplConfig.directShowTotal}}
|
|
1550
|
+
serverKey={serverKey}
|
|
1551
|
+
onChangePage={onChangePage}
|
|
1552
|
+
viewModels={viewModels}
|
|
1553
|
+
primaryColumn={ltmplConfig.primaryColumn}
|
|
1554
|
+
columnConfigs={columnConfigs}
|
|
1555
|
+
summaryConfigs={ltmplConfig.totalColumnConfigs}
|
|
1556
|
+
maxSelectedRows={this.checkBoxUseful() ? 10000 : -1}
|
|
1557
|
+
selectedRows={selectedRows}
|
|
1558
|
+
columns={tableColumns}
|
|
1559
|
+
hiddenRowCodes={hiddenRowCodes}
|
|
1560
|
+
pageInfo={{
|
|
1561
|
+
pageNo: pageNo ? pageNo : 1,
|
|
1562
|
+
pageSize: pageSize ? pageSize : ltmplConfig.defaultPageSize,
|
|
1563
|
+
}}
|
|
1564
|
+
queryKey={queryKey}
|
|
1565
|
+
onChangeRowSelection={this.changeRowSelection}
|
|
1566
|
+
subtotalXColumn={
|
|
1567
|
+
ltmplConfig.subtotalXColumn == null ||
|
|
1568
|
+
ltmplConfig.subtotalXColumn.length <= 0
|
|
1569
|
+
? null
|
|
1570
|
+
: ltmplConfig.subtotalXColumn
|
|
1571
|
+
}
|
|
1572
|
+
subtotalYColumn={
|
|
1573
|
+
ltmplConfig.subtotalYColumn == null ||
|
|
1574
|
+
ltmplConfig.subtotalYColumn.length <= 0
|
|
1575
|
+
? null
|
|
1576
|
+
: ltmplConfig.subtotalYColumn
|
|
1577
|
+
}
|
|
1578
|
+
groupIColumns={ltmplConfig.groupIColumns}
|
|
1579
|
+
doSearch={doSearch}
|
|
1580
|
+
sortColumnData={sortColumnData}
|
|
1581
|
+
/>
|
|
1582
|
+
)}
|
|
1583
|
+
{/*此处放页脚*/}
|
|
1584
|
+
{ltmplConfig.footer ? (
|
|
1585
|
+
<div
|
|
1586
|
+
style={{ padding: "6px" }}
|
|
1587
|
+
dangerouslySetInnerHTML={{ __html: ltmplConfig.footer }}
|
|
1588
|
+
></div>
|
|
1589
|
+
) : null}
|
|
1590
|
+
</div>
|
|
1591
|
+
</>
|
|
1592
|
+
);
|
|
1593
|
+
};
|
|
1594
|
+
|
|
1595
|
+
saveRatmplSelect = async (selectedRows: SelectedRow[]) => {
|
|
1596
|
+
this.setState({
|
|
1597
|
+
showRatmplSelector: false,
|
|
1598
|
+
});
|
|
1599
|
+
const { serverKey, sourceId, mainCode, doSearch } = this.props;
|
|
1600
|
+
if (!selectedRows || selectedRows.length <= 0) {
|
|
1601
|
+
return;
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
//查询
|
|
1605
|
+
const codes: string[] = [];
|
|
1606
|
+
for (let row of selectedRows) {
|
|
1607
|
+
codes.push(row.code);
|
|
1608
|
+
}
|
|
1609
|
+
await HcserviceV3.saveRatmplSelectCodes(
|
|
1610
|
+
serverKey,
|
|
1611
|
+
sourceId,
|
|
1612
|
+
mainCode,
|
|
1613
|
+
codes
|
|
1614
|
+
);
|
|
1615
|
+
doSearch(null);
|
|
1616
|
+
};
|
|
1617
|
+
|
|
1618
|
+
handleColumnOrder(columnId) {
|
|
1619
|
+
const sortColumns = this.props.criteriaData["sortColIds"];
|
|
1620
|
+
|
|
1621
|
+
if (!Array.isArray(sortColumns)) return undefined;
|
|
1622
|
+
|
|
1623
|
+
for (const column of sortColumns) {
|
|
1624
|
+
const [key, sort] = column.split("_");
|
|
1625
|
+
|
|
1626
|
+
if (key === columnId) {
|
|
1627
|
+
if (sort === "asc") return "ascend";
|
|
1628
|
+
if (sort === "desc") return "descend";
|
|
1629
|
+
continue;
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
return undefined;
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
|
|
1637
|
+
|
|
1638
|
+
render() {
|
|
1639
|
+
let {
|
|
1640
|
+
queryKey,
|
|
1641
|
+
loading,
|
|
1642
|
+
blockMenuTreeDrawerOpen,
|
|
1643
|
+
recordCode,
|
|
1644
|
+
showCustomCard,
|
|
1645
|
+
customButton,
|
|
1646
|
+
customButtonData,
|
|
1647
|
+
showRatmplSelector,
|
|
1648
|
+
} = this.state;
|
|
1649
|
+
let {
|
|
1650
|
+
sourceId,
|
|
1651
|
+
ltmplConfig,
|
|
1652
|
+
title,
|
|
1653
|
+
collapsible,
|
|
1654
|
+
initCollapse,
|
|
1655
|
+
tip,
|
|
1656
|
+
serverKey,
|
|
1657
|
+
mainCode,
|
|
1658
|
+
} = this.props;
|
|
1659
|
+
const { translate } = this.context;
|
|
1660
|
+
|
|
1661
|
+
if (!ltmplConfig || !sourceId) {
|
|
1662
|
+
return (
|
|
1663
|
+
<>
|
|
1664
|
+
<Card loading={loading}></Card>
|
|
1665
|
+
<Table loading={loading}></Table>
|
|
1666
|
+
</>
|
|
1667
|
+
);
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
return (
|
|
1671
|
+
<>
|
|
1672
|
+
{" "}
|
|
1673
|
+
{this.renderAboveCustomPage()}
|
|
1674
|
+
{collapsible ? (
|
|
1675
|
+
<CollapseCard
|
|
1676
|
+
initCollapse={initCollapse}
|
|
1677
|
+
title={
|
|
1678
|
+
<>
|
|
1679
|
+
{!title ? ltmplConfig.title : title}
|
|
1680
|
+
<ToolTipBar
|
|
1681
|
+
content={tip ? tip : ltmplConfig ? ltmplConfig.tip : null}
|
|
1682
|
+
/>
|
|
1683
|
+
</>
|
|
1684
|
+
}
|
|
1685
|
+
id={queryKey + ltmplConfig.id}
|
|
1686
|
+
className={`hoverable`}
|
|
1687
|
+
headStyle={{ background: "#f2f4f5" }}
|
|
1688
|
+
loading={loading}
|
|
1689
|
+
bodyStyle={{ padding: "6px" }}
|
|
1690
|
+
//暂时注释掉,后续要支持配置。
|
|
1691
|
+
extra={this.renderHeaderButtons()}
|
|
1692
|
+
>
|
|
1693
|
+
{this.renderContent()}
|
|
1694
|
+
</CollapseCard>
|
|
1695
|
+
) : (
|
|
1696
|
+
<>{this.renderContent()}</>
|
|
1697
|
+
)}
|
|
1698
|
+
{this.renderOhterCustomPage()}
|
|
1699
|
+
<BlockMenuTreeDrawer
|
|
1700
|
+
onOk={() => {
|
|
1701
|
+
this.setState({
|
|
1702
|
+
blockMenuTreeDrawerOpen: false,
|
|
1703
|
+
});
|
|
1704
|
+
}}
|
|
1705
|
+
onCancel={() => {
|
|
1706
|
+
this.setState({
|
|
1707
|
+
blockMenuTreeDrawerOpen: false,
|
|
1708
|
+
});
|
|
1709
|
+
}}
|
|
1710
|
+
open={blockMenuTreeDrawerOpen}
|
|
1711
|
+
roleCode={recordCode}
|
|
1712
|
+
/>
|
|
1713
|
+
{showRatmplSelector ? (
|
|
1714
|
+
<ModelSelectTable
|
|
1715
|
+
serverKey={serverKey}
|
|
1716
|
+
// defaultCriteriaValue={fieldGroupConfig.defaultCriteriaValue}
|
|
1717
|
+
// maxSelectedRows={fieldGroupConfig.max}
|
|
1718
|
+
open={showRatmplSelector}
|
|
1719
|
+
onOK={this.saveRatmplSelect}
|
|
1720
|
+
onCancel={() => {
|
|
1721
|
+
this.setState({ showRatmplSelector: false });
|
|
1722
|
+
}}
|
|
1723
|
+
mainCode={mainCode}
|
|
1724
|
+
sourceId={sourceId}
|
|
1725
|
+
existRelation={"false"}
|
|
1726
|
+
></ModelSelectTable>
|
|
1727
|
+
) : (
|
|
1728
|
+
""
|
|
1729
|
+
)}
|
|
1730
|
+
</>
|
|
1731
|
+
);
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
export default ActTable;
|