aldehyde 0.2.97 → 0.2.99
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 +1 -1
- package/lib/controls/action/index.d.ts +16 -7
- package/lib/controls/action/index.d.ts.map +1 -1
- package/lib/controls/action/index.js +64 -48
- package/lib/controls/action/index.js.map +1 -1
- package/lib/controls/action/utils.d.ts +1 -1
- package/lib/controls/action/utils.d.ts.map +1 -1
- package/lib/controls/action/utils.js +6 -4
- package/lib/controls/action/utils.js.map +1 -1
- package/lib/controls/auto-complete/index.d.ts +1 -1
- package/lib/controls/auto-complete/index.d.ts.map +1 -1
- package/lib/controls/auto-complete/index.js +12 -6
- package/lib/controls/auto-complete/index.js.map +1 -1
- package/lib/controls/chemstruc/graph.d.ts +13 -4
- package/lib/controls/chemstruc/graph.d.ts.map +1 -1
- package/lib/controls/chemstruc/graph.js +40 -27
- package/lib/controls/chemstruc/graph.js.map +1 -1
- package/lib/controls/color-picker/index.d.ts +11 -2
- package/lib/controls/color-picker/index.d.ts.map +1 -1
- package/lib/controls/color-picker/index.js +23 -19
- package/lib/controls/color-picker/index.js.map +1 -1
- package/lib/controls/cquery/cquick-button.d.ts +11 -2
- package/lib/controls/cquery/cquick-button.d.ts.map +1 -1
- package/lib/controls/cquery/cquick-button.js +30 -28
- package/lib/controls/cquery/cquick-button.js.map +1 -1
- package/lib/controls/entity-select/entity-select.d.ts +12 -3
- package/lib/controls/entity-select/entity-select.d.ts.map +1 -1
- package/lib/controls/entity-select/entity-select.js +66 -64
- package/lib/controls/entity-select/entity-select.js.map +1 -1
- package/lib/controls/entity-select/lab-tree-select.d.ts +11 -2
- package/lib/controls/entity-select/lab-tree-select.d.ts.map +1 -1
- package/lib/controls/entity-select/lab-tree-select.js +26 -21
- package/lib/controls/entity-select/lab-tree-select.js.map +1 -1
- package/lib/controls/entity-select/popover-entity-select.d.ts +11 -2
- package/lib/controls/entity-select/popover-entity-select.d.ts.map +1 -1
- package/lib/controls/entity-select/popover-entity-select.js +30 -26
- package/lib/controls/entity-select/popover-entity-select.js.map +1 -1
- package/lib/controls/entry-control.d.ts +1 -1
- package/lib/controls/entry-control.d.ts.map +1 -1
- package/lib/controls/entry-control.js +152 -98
- package/lib/controls/entry-control.js.map +1 -1
- package/lib/controls/html-editor/tinymce.d.ts.map +1 -1
- package/lib/controls/input-number/index.d.ts +1 -1
- package/lib/controls/input-number/index.d.ts.map +1 -1
- package/lib/controls/input-number/index.js +31 -23
- package/lib/controls/input-number/index.js.map +1 -1
- package/lib/controls/input-range/index.d.ts +1 -1
- package/lib/controls/input-range/index.d.ts.map +1 -1
- package/lib/controls/input-range/index.js +9 -8
- package/lib/controls/input-range/index.js.map +1 -1
- package/lib/controls/password-setter/index.d.ts +9 -3
- package/lib/controls/password-setter/index.d.ts.map +1 -1
- package/lib/controls/password-setter/index.js +22 -14
- package/lib/controls/password-setter/index.js.map +1 -1
- package/lib/controls/progress/index.d.ts +1 -1
- package/lib/controls/progress/index.d.ts.map +1 -1
- package/lib/controls/progress/index.js +13 -6
- package/lib/controls/progress/index.js.map +1 -1
- package/lib/controls/relation-existion/index.d.ts +11 -2
- package/lib/controls/relation-existion/index.d.ts.map +1 -1
- package/lib/controls/relation-existion/index.js +30 -18
- package/lib/controls/relation-existion/index.js.map +1 -1
- package/lib/controls/rfield/index.d.ts +11 -2
- package/lib/controls/rfield/index.d.ts.map +1 -1
- package/lib/controls/rfield/index.js +33 -35
- package/lib/controls/rfield/index.js.map +1 -1
- package/lib/controls/signature/index.d.ts +10 -1
- package/lib/controls/signature/index.d.ts.map +1 -1
- package/lib/controls/signature/index.js +56 -31
- package/lib/controls/signature/index.js.map +1 -1
- package/lib/controls/steps/index.d.ts +1 -1
- package/lib/controls/steps/index.d.ts.map +1 -1
- package/lib/controls/steps/index.js +8 -6
- package/lib/controls/steps/index.js.map +1 -1
- package/lib/controls/text/ellipsis-text.d.ts +9 -0
- package/lib/controls/text/ellipsis-text.d.ts.map +1 -1
- package/lib/controls/text/ellipsis-text.js +13 -11
- package/lib/controls/text/ellipsis-text.js.map +1 -1
- package/lib/controls/upload/index.d.ts +10 -1
- package/lib/controls/upload/index.d.ts.map +1 -1
- package/lib/controls/upload/index.js +30 -21
- package/lib/controls/upload/index.js.map +1 -1
- package/lib/controls/view-control.d.ts +1 -1
- package/lib/controls/view-control.d.ts.map +1 -1
- package/lib/controls/view-control.js +118 -85
- package/lib/controls/view-control.js.map +1 -1
- package/lib/custom-page/def-custom-page.d.ts +5 -6
- package/lib/custom-page/def-custom-page.d.ts.map +1 -1
- package/lib/custom-page/def-custom-page.js +13 -12
- package/lib/custom-page/def-custom-page.js.map +1 -1
- package/lib/custom-page/dtmpl-custom-edit-modal-page.d.ts +10 -1
- package/lib/custom-page/dtmpl-custom-edit-modal-page.d.ts.map +1 -1
- package/lib/custom-page/dtmpl-custom-edit-modal-page.js +19 -7
- package/lib/custom-page/dtmpl-custom-edit-modal-page.js.map +1 -1
- package/lib/detail/button/bottom-submit-button-bar.d.ts +11 -2
- package/lib/detail/button/bottom-submit-button-bar.d.ts.map +1 -1
- package/lib/detail/button/bottom-submit-button-bar.js +20 -12
- package/lib/detail/button/bottom-submit-button-bar.js.map +1 -1
- package/lib/detail/button/cquery-button-bar.d.ts +12 -3
- package/lib/detail/button/cquery-button-bar.d.ts.map +1 -1
- package/lib/detail/button/cquery-button-bar.js +22 -18
- package/lib/detail/button/cquery-button-bar.js.map +1 -1
- package/lib/detail/button/fix-right-submit-button-bar.d.ts +11 -2
- package/lib/detail/button/fix-right-submit-button-bar.d.ts.map +1 -1
- package/lib/detail/button/fix-right-submit-button-bar.js +28 -23
- package/lib/detail/button/fix-right-submit-button-bar.js.map +1 -1
- package/lib/detail/edit/fields-edit-card.d.ts +11 -2
- package/lib/detail/edit/fields-edit-card.d.ts.map +1 -1
- package/lib/detail/edit/fields-edit-card.js +18 -19
- package/lib/detail/edit/fields-edit-card.js.map +1 -1
- package/lib/detail/edit/modal-row-edit.d.ts +11 -2
- package/lib/detail/edit/modal-row-edit.d.ts.map +1 -1
- package/lib/detail/edit/modal-row-edit.js +14 -11
- package/lib/detail/edit/modal-row-edit.js.map +1 -1
- package/lib/detail/edit/post-result/index.d.ts +1 -1
- package/lib/detail/edit/post-result/index.d.ts.map +1 -1
- package/lib/detail/edit/post-result/index.js +17 -12
- package/lib/detail/edit/post-result/index.js.map +1 -1
- package/lib/detail/edit/row-edit-card.d.ts +11 -2
- package/lib/detail/edit/row-edit-card.d.ts.map +1 -1
- package/lib/detail/edit/row-edit-card.js +23 -23
- package/lib/detail/edit/row-edit-card.js.map +1 -1
- package/lib/detail/rightbar/index.d.ts +12 -3
- package/lib/detail/rightbar/index.d.ts.map +1 -1
- package/lib/detail/rightbar/index.js +16 -9
- package/lib/detail/rightbar/index.js.map +1 -1
- package/lib/detail/view/act-dtmpl-view.d.ts +11 -2
- package/lib/detail/view/act-dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/act-dtmpl-view.js +26 -25
- package/lib/detail/view/act-dtmpl-view.js.map +1 -1
- package/lib/detail/view/dtmpl-view.d.ts +2 -2
- package/lib/detail/view/dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/dtmpl-view.js +40 -40
- package/lib/detail/view/dtmpl-view.js.map +1 -1
- package/lib/detail/view/modal-dtmpl-view.d.ts +10 -1
- package/lib/detail/view/modal-dtmpl-view.d.ts.map +1 -1
- package/lib/detail/view/modal-dtmpl-view.js +11 -8
- package/lib/detail/view/modal-dtmpl-view.js.map +1 -1
- package/lib/detail/view/snapshot-timeline.d.ts +11 -2
- package/lib/detail/view/snapshot-timeline.d.ts.map +1 -1
- package/lib/detail/view/snapshot-timeline.js +18 -16
- package/lib/detail/view/snapshot-timeline.js.map +1 -1
- package/lib/exportor/export-frame.d.ts +11 -2
- package/lib/exportor/export-frame.d.ts.map +1 -1
- package/lib/exportor/export-frame.js +41 -42
- package/lib/exportor/export-frame.js.map +1 -1
- package/lib/form/criteria-form.d.ts +2 -2
- package/lib/form/criteria-form.d.ts.map +1 -1
- package/lib/form/criteria-form.js +58 -45
- package/lib/form/criteria-form.js.map +1 -1
- package/lib/form/dtmpl-form.d.ts +11 -2
- package/lib/form/dtmpl-form.d.ts.map +1 -1
- package/lib/form/dtmpl-form.js +76 -61
- package/lib/form/dtmpl-form.js.map +1 -1
- package/lib/form/field-group-form.d.ts +12 -3
- package/lib/form/field-group-form.d.ts.map +1 -1
- package/lib/form/field-group-form.js +26 -18
- package/lib/form/field-group-form.js.map +1 -1
- package/lib/form/form-Item-group.d.ts +10 -1
- package/lib/form/form-Item-group.d.ts.map +1 -1
- package/lib/form/form-Item-group.js +43 -26
- package/lib/form/form-Item-group.js.map +1 -1
- package/lib/import/excel-import.d.ts +12 -3
- package/lib/import/excel-import.d.ts.map +1 -1
- package/lib/import/excel-import.js +69 -55
- package/lib/import/excel-import.js.map +1 -1
- package/lib/index.d.ts +42 -39
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +43 -39
- package/lib/index.js.map +1 -1
- package/lib/layout/MainPage.d.ts +1 -1
- package/lib/layout/MainPage.d.ts.map +1 -1
- package/lib/layout/MainPage.js +46 -36
- package/lib/layout/MainPage.js.map +1 -1
- package/lib/layout/footer/index.d.ts.map +1 -1
- package/lib/layout/header/index.d.ts +1 -1
- package/lib/layout/header/index.d.ts.map +1 -1
- package/lib/layout/header/index.js +16 -14
- package/lib/layout/header/index.js.map +1 -1
- package/lib/layout/menu/l2menu-quick-bar.d.ts +11 -2
- package/lib/layout/menu/l2menu-quick-bar.d.ts.map +1 -1
- package/lib/layout/menu/l2menu-quick-bar.js +24 -19
- package/lib/layout/menu/l2menu-quick-bar.js.map +1 -1
- package/lib/layout/menu/reset-password.d.ts +12 -3
- package/lib/layout/menu/reset-password.d.ts.map +1 -1
- package/lib/layout/menu/reset-password.js +52 -36
- package/lib/layout/menu/reset-password.js.map +1 -1
- package/lib/layout/menu/user-bar.d.ts +12 -3
- package/lib/layout/menu/user-bar.d.ts.map +1 -1
- package/lib/layout/menu/user-bar.js +72 -42
- package/lib/layout/menu/user-bar.js.map +1 -1
- package/lib/layout/menu/userinfo-bar.d.ts +10 -1
- package/lib/layout/menu/userinfo-bar.d.ts.map +1 -1
- package/lib/layout/menu/userinfo-bar.js +11 -10
- package/lib/layout/menu/userinfo-bar.js.map +1 -1
- package/lib/layout/sidebar/index.css +15 -4
- package/lib/layout/sidebar/index.d.ts +2 -2
- package/lib/layout/sidebar/index.d.ts.map +1 -1
- package/lib/layout/sidebar/index.js +19 -13
- package/lib/layout/sidebar/index.js.map +1 -1
- package/lib/locale/LocaleButton.d.ts +4 -0
- package/lib/locale/LocaleButton.d.ts.map +1 -0
- package/lib/locale/LocaleButton.js +24 -0
- package/lib/locale/LocaleButton.js.map +1 -0
- package/lib/locale/LocaleProvider.d.ts +13 -0
- package/lib/locale/LocaleProvider.d.ts.map +1 -0
- package/lib/locale/LocaleProvider.js +135 -0
- package/lib/locale/LocaleProvider.js.map +1 -0
- package/lib/locale/langMp.d.ts +16 -0
- package/lib/locale/langMp.d.ts.map +1 -0
- package/lib/locale/langMp.js +29 -0
- package/lib/locale/langMp.js.map +1 -0
- package/lib/locale/translate.d.ts +3 -0
- package/lib/locale/translate.d.ts.map +1 -0
- package/lib/locale/translate.js +74 -0
- package/lib/locale/translate.js.map +1 -0
- package/lib/locale/useLocale.d.ts +14 -0
- package/lib/locale/useLocale.d.ts.map +1 -0
- package/lib/locale/useLocale.js +34 -0
- package/lib/locale/useLocale.js.map +1 -0
- package/lib/login/login.d.ts +13 -3
- package/lib/login/login.d.ts.map +1 -1
- package/lib/login/login.js +38 -25
- package/lib/login/login.js.map +1 -1
- package/lib/login/router-login.d.ts +2 -2
- package/lib/login/router-login.d.ts.map +1 -1
- package/lib/login/router-login.js +33 -19
- package/lib/login/router-login.js.map +1 -1
- package/lib/module/dtmpl-edit-card.d.ts +11 -2
- package/lib/module/dtmpl-edit-card.d.ts.map +1 -1
- package/lib/module/dtmpl-edit-card.js +21 -13
- package/lib/module/dtmpl-edit-card.js.map +1 -1
- package/lib/module/dtmpl-edit-page.d.ts +12 -3
- package/lib/module/dtmpl-edit-page.d.ts.map +1 -1
- package/lib/module/dtmpl-edit-page.js +42 -31
- package/lib/module/dtmpl-edit-page.js.map +1 -1
- package/lib/module/ltmpl-modal.d.ts +10 -1
- package/lib/module/ltmpl-modal.d.ts.map +1 -1
- package/lib/module/ltmpl-modal.js +15 -8
- package/lib/module/ltmpl-modal.js.map +1 -1
- package/lib/module/ltmpl-table.d.ts +11 -2
- package/lib/module/ltmpl-table.d.ts.map +1 -1
- package/lib/module/ltmpl-table.js +39 -39
- package/lib/module/ltmpl-table.js.map +1 -1
- package/lib/table/act-table.d.ts +12 -3
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/act-table.js +256 -205
- package/lib/table/act-table.js.map +1 -1
- package/lib/table/control-table-x-axis-wrapper.d.ts +5 -0
- package/lib/table/control-table-x-axis-wrapper.d.ts.map +1 -0
- package/lib/table/control-table-x-axis-wrapper.js +60 -0
- package/lib/table/control-table-x-axis-wrapper.js.map +1 -0
- package/lib/table/l2-act-table.d.ts +1 -1
- package/lib/table/pagination.d.ts +11 -2
- package/lib/table/pagination.d.ts.map +1 -1
- package/lib/table/pagination.js +13 -12
- package/lib/table/pagination.js.map +1 -1
- package/lib/table/query-table.d.ts.map +1 -1
- package/lib/table/query-table.js +2 -1
- package/lib/table/query-table.js.map +1 -1
- package/lib/table/relation-table.d.ts +13 -4
- package/lib/table/relation-table.d.ts.map +1 -1
- package/lib/table/relation-table.js +117 -108
- package/lib/table/relation-table.js.map +1 -1
- package/lib/table/selected-rows-card.d.ts +10 -1
- package/lib/table/selected-rows-card.d.ts.map +1 -1
- package/lib/table/selected-rows-card.js +10 -9
- package/lib/table/selected-rows-card.js.map +1 -1
- package/lib/table/stat/restat.d.ts +10 -1
- package/lib/table/stat/restat.d.ts.map +1 -1
- package/lib/table/stat/restat.js +10 -9
- package/lib/table/stat/restat.js.map +1 -1
- package/lib/tmpl/hc-data-source.d.ts.map +1 -1
- package/lib/tmpl/hc-data-source.js +21 -14
- package/lib/tmpl/hc-data-source.js.map +1 -1
- package/lib/tmpl/hcservice-v3.d.ts +2 -0
- package/lib/tmpl/hcservice-v3.d.ts.map +1 -1
- package/lib/tmpl/hcservice-v3.js +127 -100
- package/lib/tmpl/hcservice-v3.js.map +1 -1
- package/lib/tmpl/model-struc-v3.d.ts.map +1 -1
- package/lib/tmpl/model-struc-v3.js +19 -18
- package/lib/tmpl/model-struc-v3.js.map +1 -1
- package/lib/tmpl/superagent.d.ts +2 -2
- package/lib/tmpl/superagent.d.ts.map +1 -1
- package/lib/tmpl/superagent.js +28 -23
- package/lib/tmpl/superagent.js.map +1 -1
- package/lib/tree/act-tree.d.ts +10 -1
- package/lib/tree/act-tree.d.ts.map +1 -1
- package/lib/tree/act-tree.js +26 -20
- package/lib/tree/act-tree.js.map +1 -1
- package/lib/tree/tmpl-tree.d.ts +11 -2
- package/lib/tree/tmpl-tree.d.ts.map +1 -1
- package/lib/tree/tmpl-tree.js +76 -58
- package/lib/tree/tmpl-tree.js.map +1 -1
- package/lib/units/index.d.ts.map +1 -1
- package/lib/welcome/HCWelcome.js +7 -23
- package/lib/welcome/HCWelcome.js.map +1 -1
- package/lib/welcome/HCWelcome1.d.ts +4 -0
- package/lib/welcome/HCWelcome1.d.ts.map +1 -0
- package/lib/welcome/HCWelcome1.js +192 -0
- package/lib/welcome/HCWelcome1.js.map +1 -0
- package/lib/welcome/quick-entrance.d.ts +12 -3
- package/lib/welcome/quick-entrance.d.ts.map +1 -1
- package/lib/welcome/quick-entrance.js +21 -17
- package/lib/welcome/quick-entrance.js.map +1 -1
- package/lib/welcome/workbench.d.ts +12 -3
- package/lib/welcome/workbench.d.ts.map +1 -1
- package/lib/welcome/workbench.js +23 -19
- package/lib/welcome/workbench.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/action/index.tsx +328 -221
- package/src/aldehyde/controls/action/utils.tsx +6 -4
- package/src/aldehyde/controls/auto-complete/index.tsx +64 -60
- package/src/aldehyde/controls/chemstruc/graph.tsx +175 -139
- package/src/aldehyde/controls/color-picker/index.tsx +107 -78
- package/src/aldehyde/controls/cquery/cquick-button.tsx +129 -89
- package/src/aldehyde/controls/entity-select/entity-select.tsx +643 -521
- package/src/aldehyde/controls/entity-select/lab-tree-select.tsx +140 -131
- package/src/aldehyde/controls/entity-select/popover-entity-select.tsx +178 -133
- package/src/aldehyde/controls/entry-control.tsx +373 -248
- package/src/aldehyde/controls/input-number/index.tsx +131 -86
- package/src/aldehyde/controls/input-range/index.tsx +51 -40
- package/src/aldehyde/controls/password-setter/index.js +81 -63
- package/src/aldehyde/controls/progress/index.tsx +59 -46
- package/src/aldehyde/controls/relation-existion/index.tsx +125 -87
- package/src/aldehyde/controls/rfield/index.tsx +178 -151
- package/src/aldehyde/controls/signature/index.tsx +215 -151
- package/src/aldehyde/controls/steps/index.tsx +44 -42
- package/src/aldehyde/controls/text/ellipsis-text.tsx +79 -53
- package/src/aldehyde/controls/upload/index.tsx +125 -109
- package/src/aldehyde/controls/view-control.tsx +250 -188
- package/src/aldehyde/custom-page/def-custom-page.tsx +17 -0
- package/src/aldehyde/custom-page/dtmpl-custom-edit-modal-page.tsx +75 -66
- package/src/aldehyde/detail/button/bottom-submit-button-bar.tsx +79 -43
- package/src/aldehyde/detail/button/cquery-button-bar.tsx +129 -98
- package/src/aldehyde/detail/button/fix-right-submit-button-bar.tsx +161 -113
- package/src/aldehyde/detail/edit/fields-edit-card.tsx +124 -87
- package/src/aldehyde/detail/edit/modal-row-edit.tsx +81 -60
- package/src/aldehyde/detail/edit/post-result/index.tsx +80 -47
- package/src/aldehyde/detail/edit/row-edit-card.tsx +158 -107
- package/src/aldehyde/detail/rightbar/index.tsx +79 -63
- package/src/aldehyde/detail/view/act-dtmpl-view.tsx +177 -124
- package/src/aldehyde/detail/view/dtmpl-view.tsx +284 -178
- package/src/aldehyde/detail/view/modal-dtmpl-view.tsx +67 -54
- package/src/aldehyde/detail/view/snapshot-timeline.tsx +143 -110
- package/src/aldehyde/exportor/export-frame.tsx +258 -200
- package/src/aldehyde/form/criteria-form.tsx +309 -201
- package/src/aldehyde/form/dtmpl-form.tsx +460 -305
- package/src/aldehyde/form/field-group-form.tsx +87 -66
- package/src/aldehyde/form/form-Item-group.tsx +190 -132
- package/src/aldehyde/import/excel-import.tsx +414 -331
- package/src/aldehyde/index.tsx +90 -45
- package/src/aldehyde/layout/MainPage.tsx +280 -245
- package/src/aldehyde/layout/header/index.tsx +59 -53
- package/src/aldehyde/layout/menu/l2menu-quick-bar.tsx +137 -118
- package/src/aldehyde/layout/menu/reset-password.tsx +213 -162
- package/src/aldehyde/layout/menu/user-bar.tsx +216 -147
- package/src/aldehyde/layout/menu/userinfo-bar.tsx +58 -41
- package/src/aldehyde/layout/sidebar/index.css +15 -4
- package/src/aldehyde/layout/sidebar/index.tsx +66 -38
- package/src/aldehyde/locale/LocaleButton.tsx +31 -0
- package/src/aldehyde/locale/LocaleProvider.tsx +165 -0
- package/src/aldehyde/locale/langMp.ts +33 -0
- package/src/aldehyde/locale/translate.ts +78 -0
- package/src/aldehyde/locale/useLocale.ts +50 -0
- package/src/aldehyde/login/login.tsx +192 -141
- package/src/aldehyde/login/router-login.tsx +54 -21
- package/src/aldehyde/module/dtmpl-edit-card.tsx +225 -160
- package/src/aldehyde/module/dtmpl-edit-page.tsx +334 -212
- package/src/aldehyde/module/ltmpl-modal.tsx +57 -53
- package/src/aldehyde/module/ltmpl-table.tsx +329 -240
- package/src/aldehyde/table/act-table.tsx +1226 -794
- package/src/aldehyde/table/control-table-x-axis-wrapper.tsx +52 -0
- package/src/aldehyde/table/pagination.tsx +66 -59
- package/src/aldehyde/table/query-table.tsx +2 -1
- package/src/aldehyde/table/relation-table.tsx +781 -571
- package/src/aldehyde/table/selected-rows-card.tsx +61 -48
- package/src/aldehyde/table/stat/restat.tsx +112 -69
- package/src/aldehyde/tmpl/hc-data-source.tsx +381 -296
- package/src/aldehyde/tmpl/hcservice-v3.tsx +991 -796
- package/src/aldehyde/tmpl/model-struc-v3.tsx +95 -91
- package/src/aldehyde/tmpl/superagent.js +148 -142
- package/src/aldehyde/tree/act-tree.tsx +206 -138
- package/src/aldehyde/tree/tmpl-tree.tsx +611 -353
- package/src/aldehyde/welcome/HCWelcome.js +78 -110
- package/src/aldehyde/welcome/HCWelcome1.js +260 -0
- package/src/aldehyde/welcome/quick-entrance.tsx +82 -71
- package/src/aldehyde/welcome/workbench.tsx +83 -68
- package/src/aldehyde/custom-page/def-custom-page.js +0 -18
|
@@ -1,565 +1,687 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import {Button, Col, Divider, message, Row, Select, Spin, Tag} from
|
|
3
|
-
import {EControlProps, LtmplConfig, PageInfo, QueryData, QueryKey,} from "../../tmpl/interface";
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Button, Col, Divider, message, Row, Select, Spin, Tag } from "antd";
|
|
4
3
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
EControlProps,
|
|
5
|
+
LtmplConfig,
|
|
6
|
+
PageInfo,
|
|
7
|
+
QueryData,
|
|
8
|
+
QueryKey,
|
|
9
|
+
} from "../../tmpl/interface";
|
|
10
|
+
import {
|
|
11
|
+
AlignLeftOutlined,
|
|
12
|
+
EditOutlined,
|
|
13
|
+
PlusOutlined,
|
|
14
|
+
RedoOutlined,
|
|
15
|
+
SearchOutlined,
|
|
16
|
+
TableOutlined,
|
|
17
|
+
} from "@ant-design/icons";
|
|
18
|
+
import debounce from "lodash/debounce";
|
|
19
|
+
import "./index.css";
|
|
14
20
|
import HcserviceV3 from "../../tmpl/hcservice-v3";
|
|
15
21
|
import HCDataSource from "../../tmpl/hc-data-source";
|
|
16
22
|
import DtmplViewDrawer from "../../module/dtmpl-view-drawer";
|
|
17
23
|
import DtmplEditPage from "../../module/dtmpl-edit-page";
|
|
18
|
-
import {CustomTagProps} from
|
|
24
|
+
import { CustomTagProps } from "rc-select/lib/BaseSelect";
|
|
19
25
|
import DtmplCustomEditModalPage from "../../custom-page/dtmpl-custom-edit-modal-page";
|
|
20
|
-
import {LtmplModal} from "../../index";
|
|
21
|
-
|
|
26
|
+
import { LtmplModal } from "../../index";
|
|
27
|
+
import { LocaleContext } from "../../locale/LocaleProvider";
|
|
22
28
|
|
|
23
29
|
interface InnerEntitySelectProps extends EControlProps {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
30
|
+
maxSelected?: number;
|
|
31
|
+
onEntityClick?: (code: string) => void;
|
|
32
|
+
baseCriteria: object;
|
|
33
|
+
}
|
|
29
34
|
|
|
30
35
|
interface InnerEntitySelectState {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
36
|
+
titleId?: string;
|
|
37
|
+
optionCacheKey?: string;
|
|
38
|
+
pageNo?: number;
|
|
39
|
+
loading?: boolean;
|
|
40
|
+
optionsCache?: object;
|
|
41
|
+
codeLabel?: object;
|
|
42
|
+
ltmplConfig?: LtmplConfig;
|
|
43
|
+
showView?: boolean;
|
|
44
|
+
drawCode?: string;
|
|
45
|
+
showEdit?: boolean;
|
|
46
|
+
showTable?: boolean;
|
|
47
|
+
preMainCode?: string;
|
|
48
|
+
}
|
|
44
49
|
|
|
45
50
|
type OptionCache = {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
51
|
+
queryKey?: QueryKey;
|
|
52
|
+
pageInfo?: PageInfo;
|
|
53
|
+
touchEnd?: boolean;
|
|
54
|
+
options?: any;
|
|
55
|
+
searchValue?: string;
|
|
56
|
+
optionCacheKey?: string;
|
|
57
|
+
};
|
|
53
58
|
|
|
54
59
|
type LoadDataSource = {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export default class EntitySelect extends React.PureComponent<InnerEntitySelectProps, InnerEntitySelectState> {
|
|
60
|
+
options: any[];
|
|
61
|
+
touchEnd: boolean;
|
|
62
|
+
};
|
|
61
63
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
export default class EntitySelect extends React.PureComponent<
|
|
65
|
+
InnerEntitySelectProps,
|
|
66
|
+
InnerEntitySelectState
|
|
67
|
+
> {
|
|
68
|
+
static defaultProps = {
|
|
69
|
+
maxSelected: 100,
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
state = {
|
|
73
|
+
titleId: undefined,
|
|
74
|
+
optionCacheKey: undefined,
|
|
75
|
+
pageNo: 1,
|
|
76
|
+
loading: false,
|
|
77
|
+
optionsCache: {},
|
|
78
|
+
codeLabel: {},
|
|
79
|
+
ltmplConfig: undefined,
|
|
80
|
+
showView: false,
|
|
81
|
+
showEdit: false,
|
|
82
|
+
showTable: false,
|
|
83
|
+
drawCode: undefined,
|
|
84
|
+
preMainCode: undefined,
|
|
85
|
+
};
|
|
86
|
+
static contextType = LocaleContext;
|
|
87
|
+
context: React.ContextType<typeof LocaleContext>;
|
|
88
|
+
|
|
89
|
+
dropdownRender = (menu) => {
|
|
90
|
+
const { fieldConfig } = this.props;
|
|
91
|
+
const { actions } = fieldConfig;
|
|
92
|
+
// console.log("menu",menu);
|
|
93
|
+
return (
|
|
94
|
+
<>
|
|
95
|
+
{menu}
|
|
96
|
+
{
|
|
97
|
+
<>
|
|
98
|
+
<Divider style={{ margin: "8px 0" }} />
|
|
99
|
+
<Row justify="end">
|
|
100
|
+
{actions && actions.indexOf("table") >= 0 ? (
|
|
101
|
+
<Col>
|
|
102
|
+
<Button
|
|
103
|
+
type="text"
|
|
104
|
+
icon={<TableOutlined style={{ color: "#0958d9" }} />}
|
|
105
|
+
onClick={() => this.showTable()}
|
|
106
|
+
></Button>
|
|
107
|
+
</Col>
|
|
108
|
+
) : null}
|
|
109
|
+
{actions && actions.indexOf("add") >= 0 ? (
|
|
110
|
+
<Col>
|
|
111
|
+
<Button
|
|
112
|
+
type="text"
|
|
113
|
+
icon={<PlusOutlined style={{ color: "#0958d9" }} />}
|
|
114
|
+
onClick={() => this.editItem()}
|
|
115
|
+
></Button>
|
|
116
|
+
</Col>
|
|
117
|
+
) : null}
|
|
118
|
+
<Col>
|
|
119
|
+
<Button
|
|
120
|
+
type="text"
|
|
121
|
+
icon={<RedoOutlined style={{ color: "#0958d9" }} />}
|
|
122
|
+
onClick={() => this.initCache()}
|
|
123
|
+
></Button>
|
|
124
|
+
</Col>
|
|
125
|
+
</Row>
|
|
126
|
+
</>
|
|
127
|
+
}
|
|
128
|
+
</>
|
|
129
|
+
);
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
editItem = async (code?) => {
|
|
133
|
+
let ltmplConfig = await this.loadLtmplConfig();
|
|
134
|
+
this.setState({
|
|
135
|
+
showEdit: true,
|
|
136
|
+
showTable: false,
|
|
137
|
+
showView: false,
|
|
138
|
+
drawCode: code,
|
|
139
|
+
ltmplConfig,
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
showTable = async () => {
|
|
144
|
+
this.setState({
|
|
145
|
+
showEdit: false,
|
|
146
|
+
showTable: true,
|
|
147
|
+
showView: false,
|
|
148
|
+
drawCode: undefined,
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
loadLtmplConfig = async () => {
|
|
153
|
+
const { fieldConfig, serverKey } = this.props;
|
|
154
|
+
const { ltmplConfig } = this.state;
|
|
155
|
+
let ltmplConfig_ = ltmplConfig;
|
|
156
|
+
if (!ltmplConfig_) {
|
|
157
|
+
ltmplConfig_ = (
|
|
158
|
+
await HCDataSource.requestLtmplConfig(
|
|
159
|
+
fieldConfig.serverKey ? fieldConfig.serverKey : serverKey,
|
|
160
|
+
fieldConfig.sourceId ? fieldConfig.sourceId : fieldConfig.id
|
|
161
|
+
)
|
|
162
|
+
).ltmplConfig;
|
|
64
163
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
164
|
+
this.setState({
|
|
165
|
+
ltmplConfig: ltmplConfig_,
|
|
166
|
+
});
|
|
167
|
+
return ltmplConfig_;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
showItem = async (code) => {
|
|
171
|
+
let ltmplConfig = await this.loadLtmplConfig();
|
|
172
|
+
|
|
173
|
+
this.setState({
|
|
174
|
+
showEdit: false,
|
|
175
|
+
showTable: false,
|
|
176
|
+
showView: true,
|
|
177
|
+
drawCode: code,
|
|
178
|
+
ltmplConfig,
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
componentDidUpdate(prevProps) {
|
|
183
|
+
const { baseCriteria, mainCode, fieldConfig } = this.props;
|
|
184
|
+
let {
|
|
185
|
+
baseCriteria: preBaseCriteria,
|
|
186
|
+
mainCode: preMainCode,
|
|
187
|
+
fieldConfig: preFieldConfig,
|
|
188
|
+
} = prevProps;
|
|
189
|
+
if (
|
|
190
|
+
(baseCriteria &&
|
|
191
|
+
JSON.stringify(baseCriteria) != JSON.stringify(preBaseCriteria)) ||
|
|
192
|
+
(mainCode && mainCode != preMainCode) ||
|
|
193
|
+
(fieldConfig && preFieldConfig && fieldConfig.id != preFieldConfig.id)
|
|
194
|
+
) {
|
|
195
|
+
this.initCache();
|
|
79
196
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
initCache = () => {
|
|
200
|
+
this.setState({
|
|
201
|
+
optionsCache: {},
|
|
202
|
+
codeLabel: {},
|
|
203
|
+
});
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
// componentWillUnmount(): void {
|
|
207
|
+
// this.setState=(state,callback)=>{
|
|
208
|
+
// return
|
|
209
|
+
// }
|
|
210
|
+
// }
|
|
211
|
+
|
|
212
|
+
toOption = (code: string, title: string, onEntityClick) => {
|
|
213
|
+
const { fieldConfig } = this.props;
|
|
214
|
+
const { actions } = fieldConfig;
|
|
215
|
+
const { codeLabel } = this.state;
|
|
216
|
+
codeLabel[code] = title;
|
|
217
|
+
let option = {
|
|
218
|
+
value: code,
|
|
219
|
+
label: (
|
|
220
|
+
<>
|
|
221
|
+
{title}
|
|
222
|
+
{actions && actions.indexOf("detail") >= 0 ? (
|
|
223
|
+
<Button
|
|
224
|
+
size={"small"}
|
|
225
|
+
type={"text"}
|
|
226
|
+
onClick={(event) => {
|
|
227
|
+
event.stopPropagation();
|
|
228
|
+
this.showItem(code);
|
|
229
|
+
}}
|
|
230
|
+
>
|
|
231
|
+
<AlignLeftOutlined style={{ color: "#0958d9" }} />
|
|
232
|
+
</Button>
|
|
233
|
+
) : null}
|
|
234
|
+
|
|
235
|
+
{actions && actions.indexOf("edit") >= 0 ? (
|
|
236
|
+
<Button
|
|
237
|
+
size={"small"}
|
|
238
|
+
type={"text"}
|
|
239
|
+
onClick={(event) => {
|
|
240
|
+
event.stopPropagation();
|
|
241
|
+
this.editItem(code);
|
|
242
|
+
}}
|
|
243
|
+
>
|
|
244
|
+
<EditOutlined style={{ color: "#0958d9" }} />
|
|
245
|
+
</Button>
|
|
246
|
+
) : null}
|
|
108
247
|
</>
|
|
248
|
+
),
|
|
109
249
|
};
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
250
|
+
return option;
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
doClose = () => {
|
|
254
|
+
this.setState({
|
|
255
|
+
drawCode: undefined,
|
|
256
|
+
showEdit: false,
|
|
257
|
+
showView: false,
|
|
258
|
+
showTable: false,
|
|
259
|
+
});
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
drawSubmited = () => {
|
|
263
|
+
this.initCache();
|
|
264
|
+
this.doClose();
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
closeTable = () => {
|
|
268
|
+
this.drawSubmited();
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
toValueArray = (value) => {
|
|
272
|
+
let result = [];
|
|
273
|
+
let valueArray = this.toArray(value);
|
|
274
|
+
for (let v of valueArray) {
|
|
275
|
+
if (v) {
|
|
276
|
+
let vs = v.split("@R@");
|
|
277
|
+
if (vs[1] != "null") {
|
|
278
|
+
result.push(vs[0]);
|
|
137
279
|
}
|
|
138
|
-
|
|
139
|
-
ltmplConfig: ltmplConfig_
|
|
140
|
-
});
|
|
141
|
-
return ltmplConfig_;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
showItem = async (code) => {
|
|
145
|
-
|
|
146
|
-
let ltmplConfig = await this.loadLtmplConfig();
|
|
147
|
-
|
|
148
|
-
this.setState({
|
|
149
|
-
showEdit: false,
|
|
150
|
-
showTable: false,
|
|
151
|
-
showView: true,
|
|
152
|
-
drawCode: code,
|
|
153
|
-
ltmplConfig,
|
|
154
|
-
});
|
|
280
|
+
}
|
|
155
281
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
282
|
+
return result;
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
toArray = (value) => {
|
|
286
|
+
let valueArray: string[] = [];
|
|
287
|
+
if (value instanceof Array) {
|
|
288
|
+
valueArray = value;
|
|
289
|
+
} else {
|
|
290
|
+
if (value) {
|
|
291
|
+
valueArray = value.split(",");
|
|
292
|
+
} else {
|
|
293
|
+
valueArray = [];
|
|
294
|
+
}
|
|
165
295
|
}
|
|
166
296
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
optionsCache: {},
|
|
170
|
-
codeLabel: {}
|
|
171
|
-
})
|
|
172
|
-
}
|
|
297
|
+
return valueArray;
|
|
298
|
+
};
|
|
173
299
|
|
|
300
|
+
toOptions = (value, onEntityClick) => {
|
|
301
|
+
const { fieldConfig } = this.props;
|
|
302
|
+
let options: object[] = [];
|
|
303
|
+
//console.log('options value', value);
|
|
174
304
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
toOption = (code: string, title: string, onEntityClick) => {
|
|
183
|
-
const {fieldConfig} = this.props;
|
|
184
|
-
const {actions} = fieldConfig;
|
|
185
|
-
const {codeLabel} = this.state;
|
|
186
|
-
codeLabel[code] = title;
|
|
187
|
-
let option = {
|
|
188
|
-
value: code,
|
|
189
|
-
label: <>
|
|
190
|
-
{title}
|
|
191
|
-
{actions && actions.indexOf("detail") >= 0 ?
|
|
192
|
-
<Button size={'small'} type={'text'} onClick={(event) => {
|
|
193
|
-
event.stopPropagation();
|
|
194
|
-
this.showItem(code);
|
|
195
|
-
}}><AlignLeftOutlined style={{color: '#0958d9'}}/></Button> : null}
|
|
196
|
-
|
|
197
|
-
{actions && actions.indexOf("edit") >= 0 ?
|
|
198
|
-
<Button size={'small'} type={'text'} onClick={(event) => {
|
|
199
|
-
event.stopPropagation();
|
|
200
|
-
this.editItem(code);
|
|
201
|
-
}}><EditOutlined style={{color: '#0958d9'}}/></Button>
|
|
202
|
-
: null}
|
|
203
|
-
</>,
|
|
204
|
-
};
|
|
205
|
-
return option;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
doClose = () => {
|
|
209
|
-
this.setState({
|
|
210
|
-
drawCode: undefined,
|
|
211
|
-
showEdit: false,
|
|
212
|
-
showView: false,
|
|
213
|
-
showTable: false,
|
|
214
|
-
})
|
|
215
|
-
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
drawSubmited = () => {
|
|
219
|
-
this.initCache();
|
|
220
|
-
this.doClose();
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
closeTable = () => {
|
|
224
|
-
this.drawSubmited();
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
toValueArray = (value) => {
|
|
228
|
-
let result = [];
|
|
229
|
-
let valueArray = this.toArray(value);
|
|
230
|
-
for (let v of valueArray) {
|
|
231
|
-
if (v) {
|
|
232
|
-
let vs = v.split("@R@");
|
|
233
|
-
if (vs[1] != 'null') {
|
|
234
|
-
result.push(vs[0]);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
305
|
+
let valueArray: string[] = this.toArray(value);
|
|
306
|
+
for (let v of valueArray) {
|
|
307
|
+
if (v) {
|
|
308
|
+
let vs = v.split("@R@");
|
|
309
|
+
if (vs[1] != "null") {
|
|
310
|
+
options.push(this.toOption(vs[0], vs[1], onEntityClick));
|
|
237
311
|
}
|
|
238
|
-
|
|
312
|
+
}
|
|
239
313
|
}
|
|
240
314
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
315
|
+
//添加补充项
|
|
316
|
+
if (fieldConfig.suppleOptions) {
|
|
317
|
+
fieldConfig.suppleOptions.forEach((o) => {
|
|
318
|
+
let had = false;
|
|
319
|
+
options.forEach((s) => {
|
|
320
|
+
if (s["value"] == o.code) {
|
|
321
|
+
had = true;
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
if (!had) {
|
|
326
|
+
options.push(this.toOption(o.code, o.title, undefined));
|
|
251
327
|
}
|
|
252
|
-
|
|
253
|
-
return valueArray;
|
|
328
|
+
});
|
|
254
329
|
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
had = true;
|
|
278
|
-
return;
|
|
279
|
-
}
|
|
280
|
-
})
|
|
281
|
-
if (!had) {
|
|
282
|
-
options.push(this.toOption(o.code, o.title, undefined));
|
|
283
|
-
}
|
|
284
|
-
})
|
|
285
|
-
}
|
|
286
|
-
//console.log('options', options);
|
|
287
|
-
return options;
|
|
330
|
+
//console.log('options', options);
|
|
331
|
+
return options;
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
fetchNextPage = async () => {
|
|
335
|
+
const { optionCacheKey, titleId, optionsCache } = this.state;
|
|
336
|
+
let optionCache = optionsCache[optionCacheKey];
|
|
337
|
+
let pageInfo = optionCache.pageInfo;
|
|
338
|
+
if (!optionCache.touchEnd) {
|
|
339
|
+
pageInfo.pageNo = pageInfo.pageNo + 1;
|
|
340
|
+
let dataSource = await this.loadData(
|
|
341
|
+
optionCache.queryKey.key,
|
|
342
|
+
{ ...pageInfo },
|
|
343
|
+
titleId
|
|
344
|
+
);
|
|
345
|
+
if (dataSource) {
|
|
346
|
+
optionCache.options = [...optionCache.options, ...dataSource.options];
|
|
347
|
+
optionCache.touchEnd = dataSource.touchEnd;
|
|
348
|
+
}
|
|
349
|
+
this.setState({
|
|
350
|
+
pageNo: pageInfo.pageNo,
|
|
351
|
+
});
|
|
288
352
|
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
optionCache.touchEnd = dataSource.touchEnd;
|
|
300
|
-
}
|
|
301
|
-
this.setState({
|
|
302
|
-
pageNo: pageInfo.pageNo,
|
|
303
|
-
})
|
|
304
|
-
}
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
fetchOptions = async (searchText) => {
|
|
356
|
+
const { fieldConfig, mainCode, baseCriteria, serverKey } = this.props;
|
|
357
|
+
const { optionsCache, ltmplConfig, preMainCode } = this.state;
|
|
358
|
+
const currentMainCode = mainCode ? mainCode : fieldConfig.mainCode;
|
|
359
|
+
if (preMainCode != currentMainCode) {
|
|
360
|
+
this.setState({ preMainCode: currentMainCode.toString() });
|
|
361
|
+
//清空,
|
|
362
|
+
this.initCache();
|
|
305
363
|
}
|
|
306
364
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
if (preMainCode != currentMainCode) {
|
|
312
|
-
this.setState({preMainCode: currentMainCode.toString()})
|
|
313
|
-
//清空,
|
|
314
|
-
this.initCache();
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
let optionCacheKey = "withoutValue";
|
|
318
|
-
//先从缓存里拿
|
|
319
|
-
if (searchText) {
|
|
320
|
-
optionCacheKey = searchText;
|
|
321
|
-
}
|
|
322
|
-
let titleId = this.state.titleId;
|
|
323
|
-
let optionCache = optionsCache[optionCacheKey];
|
|
324
|
-
if (!optionCache) {
|
|
325
|
-
this.setState({
|
|
326
|
-
loading: true,
|
|
327
|
-
})
|
|
328
|
-
let ltmplConfig_ = ltmplConfig;
|
|
329
|
-
if (!ltmplConfig_) {
|
|
330
|
-
ltmplConfig_ = await this.loadLtmplConfig();
|
|
331
|
-
}
|
|
332
|
-
if(!ltmplConfig_){
|
|
333
|
-
message.error("请配置正确查询页面");
|
|
334
|
-
return;
|
|
335
|
-
}
|
|
336
|
-
let pageInfo = {
|
|
337
|
-
pageNo: 1,
|
|
338
|
-
pageSize: 6,
|
|
339
|
-
virtualEndPageNo: undefined,
|
|
340
|
-
};
|
|
341
|
-
titleId = ltmplConfig_.primaryColumn.id;
|
|
342
|
-
//得到第一个过滤条件
|
|
343
|
-
let firstCriteria = ltmplConfig_.primaryCriteria;
|
|
344
|
-
let formItemName = 'undefinedCriteria';
|
|
345
|
-
if (firstCriteria) {
|
|
346
|
-
formItemName = 'c_' + firstCriteria.id;
|
|
347
|
-
}
|
|
348
|
-
const {defaultPageSize} = ltmplConfig_;
|
|
349
|
-
if (defaultPageSize) {
|
|
350
|
-
pageInfo.pageSize = defaultPageSize;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
/** 构建 dataSource **/
|
|
354
|
-
//构建过滤条件
|
|
355
|
-
let criteriaData = {};
|
|
356
|
-
if (baseCriteria) {
|
|
357
|
-
criteriaData = {...baseCriteria}
|
|
358
|
-
}
|
|
359
|
-
// let mainCode_ = mainCode;
|
|
360
|
-
// if (baseCriteria) {
|
|
361
|
-
// criteriaData = {...baseCriteria}
|
|
362
|
-
// if (!mainCode) {
|
|
363
|
-
// mainCode_ = baseCriteria['mainCode']; //当只在条件中设置mainCode时,保证生效不被设置为null
|
|
364
|
-
// }
|
|
365
|
-
// }
|
|
366
|
-
criteriaData[formItemName] = searchText;
|
|
367
|
-
let queryKey: QueryKey = await HcserviceV3.requestLtmplQueryKey(fieldConfig.serverKey ? fieldConfig.serverKey : serverKey, fieldConfig.sourceId, {
|
|
368
|
-
...criteriaData, ...pageInfo,
|
|
369
|
-
mainCode: currentMainCode
|
|
370
|
-
});
|
|
371
|
-
let sourceData = await this.loadData(queryKey.key, pageInfo, titleId);
|
|
372
|
-
|
|
373
|
-
optionCache = {
|
|
374
|
-
options: sourceData.options,
|
|
375
|
-
pageInfo,
|
|
376
|
-
queryKey,
|
|
377
|
-
searchValue: searchText,
|
|
378
|
-
touchEnd: sourceData.touchEnd
|
|
379
|
-
};
|
|
380
|
-
optionsCache[optionCacheKey] = optionCache;
|
|
381
|
-
this.setState({
|
|
382
|
-
optionCacheKey,
|
|
383
|
-
titleId,
|
|
384
|
-
optionsCache: {...optionsCache},
|
|
385
|
-
loading: false,
|
|
386
|
-
})
|
|
387
|
-
} else {
|
|
388
|
-
if (this.state.optionCacheKey == optionCacheKey && optionCacheKey == 'withoutValue') {
|
|
389
|
-
this.setState({
|
|
390
|
-
loading: false,
|
|
391
|
-
optionCacheKey,
|
|
392
|
-
})
|
|
393
|
-
} else {
|
|
394
|
-
debounce(() => {
|
|
395
|
-
this.setState({
|
|
396
|
-
loading: false,
|
|
397
|
-
optionCacheKey,
|
|
398
|
-
})
|
|
399
|
-
}, 500)();
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
|
|
365
|
+
let optionCacheKey = "withoutValue";
|
|
366
|
+
//先从缓存里拿
|
|
367
|
+
if (searchText) {
|
|
368
|
+
optionCacheKey = searchText;
|
|
403
369
|
}
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
370
|
+
let titleId = this.state.titleId;
|
|
371
|
+
let optionCache = optionsCache[optionCacheKey];
|
|
372
|
+
if (!optionCache) {
|
|
373
|
+
this.setState({
|
|
374
|
+
loading: true,
|
|
375
|
+
});
|
|
376
|
+
let ltmplConfig_ = ltmplConfig;
|
|
377
|
+
if (!ltmplConfig_) {
|
|
378
|
+
ltmplConfig_ = await this.loadLtmplConfig();
|
|
379
|
+
}
|
|
380
|
+
if (!ltmplConfig_) {
|
|
381
|
+
message.error("请配置正确查询页面");
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
let pageInfo = {
|
|
385
|
+
pageNo: 1,
|
|
386
|
+
pageSize: 6,
|
|
387
|
+
virtualEndPageNo: undefined,
|
|
388
|
+
};
|
|
389
|
+
titleId = ltmplConfig_.primaryColumn.id;
|
|
390
|
+
//得到第一个过滤条件
|
|
391
|
+
let firstCriteria = ltmplConfig_.primaryCriteria;
|
|
392
|
+
let formItemName = "undefinedCriteria";
|
|
393
|
+
if (firstCriteria) {
|
|
394
|
+
formItemName = "c_" + firstCriteria.id;
|
|
395
|
+
}
|
|
396
|
+
const { defaultPageSize } = ltmplConfig_;
|
|
397
|
+
if (defaultPageSize) {
|
|
398
|
+
pageInfo.pageSize = defaultPageSize;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/** 构建 dataSource **/
|
|
402
|
+
//构建过滤条件
|
|
403
|
+
let criteriaData = {};
|
|
404
|
+
if (baseCriteria) {
|
|
405
|
+
criteriaData = { ...baseCriteria };
|
|
406
|
+
}
|
|
407
|
+
// let mainCode_ = mainCode;
|
|
408
|
+
// if (baseCriteria) {
|
|
409
|
+
// criteriaData = {...baseCriteria}
|
|
410
|
+
// if (!mainCode) {
|
|
411
|
+
// mainCode_ = baseCriteria['mainCode']; //当只在条件中设置mainCode时,保证生效不被设置为null
|
|
412
|
+
// }
|
|
413
|
+
// }
|
|
414
|
+
criteriaData[formItemName] = searchText;
|
|
415
|
+
let queryKey: QueryKey = await HcserviceV3.requestLtmplQueryKey(
|
|
416
|
+
fieldConfig.serverKey ? fieldConfig.serverKey : serverKey,
|
|
417
|
+
fieldConfig.sourceId,
|
|
418
|
+
{
|
|
419
|
+
...criteriaData,
|
|
420
|
+
...pageInfo,
|
|
421
|
+
mainCode: currentMainCode,
|
|
410
422
|
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
423
|
+
);
|
|
424
|
+
let sourceData = await this.loadData(queryKey.key, pageInfo, titleId);
|
|
425
|
+
|
|
426
|
+
optionCache = {
|
|
427
|
+
options: sourceData.options,
|
|
428
|
+
pageInfo,
|
|
429
|
+
queryKey,
|
|
430
|
+
searchValue: searchText,
|
|
431
|
+
touchEnd: sourceData.touchEnd,
|
|
432
|
+
};
|
|
433
|
+
optionsCache[optionCacheKey] = optionCache;
|
|
434
|
+
this.setState({
|
|
435
|
+
optionCacheKey,
|
|
436
|
+
titleId,
|
|
437
|
+
optionsCache: { ...optionsCache },
|
|
438
|
+
loading: false,
|
|
439
|
+
});
|
|
440
|
+
} else {
|
|
441
|
+
if (
|
|
442
|
+
this.state.optionCacheKey == optionCacheKey &&
|
|
443
|
+
optionCacheKey == "withoutValue"
|
|
444
|
+
) {
|
|
445
|
+
this.setState({
|
|
446
|
+
loading: false,
|
|
447
|
+
optionCacheKey,
|
|
448
|
+
});
|
|
449
|
+
} else {
|
|
450
|
+
debounce(() => {
|
|
451
|
+
this.setState({
|
|
452
|
+
loading: false,
|
|
453
|
+
optionCacheKey,
|
|
454
|
+
});
|
|
455
|
+
}, 500)();
|
|
456
|
+
}
|
|
420
457
|
}
|
|
458
|
+
};
|
|
421
459
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
};
|
|
428
|
-
return (
|
|
429
|
-
<Tag
|
|
430
|
-
onMouseDown={onPreventMouseDown}
|
|
431
|
-
closable={closable}
|
|
432
|
-
onClose={onClose}
|
|
433
|
-
style={{marginRight: 3}}
|
|
434
|
-
>
|
|
435
|
-
{label}
|
|
436
|
-
</Tag>
|
|
437
|
-
);
|
|
438
|
-
};
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
loadData = async (queryKey: string, pageInfo: PageInfo, titleId: string): Promise<LoadDataSource> => {
|
|
442
|
-
const {onEntityClick, baseCriteria, serverKey, fieldConfig} = this.props;
|
|
443
|
-
|
|
444
|
-
let queryData: QueryData = await HcserviceV3.requestQueryData(fieldConfig.serverKey ? fieldConfig.serverKey : serverKey, queryKey, pageInfo);
|
|
445
|
-
let options: object[] = [];
|
|
446
|
-
pageInfo = queryData.pageInfo;
|
|
447
|
-
queryData.entities.forEach((item, index) => {
|
|
448
|
-
let title = item.fieldMap[titleId];
|
|
449
|
-
//放入全局对象缓存
|
|
450
|
-
//这个缓存后续还需要完善,因为太多了,容易爆掉
|
|
451
|
-
HCDataSource.cache(item);
|
|
452
|
-
if (title) {
|
|
453
|
-
let ts = title.split('@R@');
|
|
454
|
-
let t = ts && ts.length > 0 ? ts[ts.length - 1] : title;
|
|
455
|
-
if (t != 'null') {
|
|
456
|
-
let option = this.toOption(item.code, t, onEntityClick);
|
|
457
|
-
options.push(option);
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
})
|
|
461
|
-
return {options, touchEnd: queryData.touchEnd};
|
|
460
|
+
onChange = (values: any[]) => {
|
|
461
|
+
const { codeLabel } = this.state;
|
|
462
|
+
let newValues: Array<string> = [...values];
|
|
463
|
+
if (values && values.length > this.props.maxSelected) {
|
|
464
|
+
newValues.shift();
|
|
462
465
|
}
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
466
|
+
let formValues: Array<string> = [];
|
|
467
|
+
newValues.forEach((c) => {
|
|
468
|
+
if (c.indexOf("@R@") > 0) {
|
|
469
|
+
formValues.push(c);
|
|
470
|
+
} else {
|
|
471
|
+
formValues.push(c + "@R@" + codeLabel[c]);
|
|
472
|
+
}
|
|
473
|
+
});
|
|
474
|
+
this.props.onChange(formValues);
|
|
475
|
+
};
|
|
476
|
+
|
|
477
|
+
tagRender = (props: CustomTagProps) => {
|
|
478
|
+
const { label, closable, onClose } = props;
|
|
479
|
+
const onPreventMouseDown = (event: React.MouseEvent<HTMLSpanElement>) => {
|
|
480
|
+
event.preventDefault();
|
|
481
|
+
event.stopPropagation();
|
|
469
482
|
};
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
483
|
+
return (
|
|
484
|
+
<Tag
|
|
485
|
+
onMouseDown={onPreventMouseDown}
|
|
486
|
+
closable={closable}
|
|
487
|
+
onClose={onClose}
|
|
488
|
+
style={{ marginRight: 3 }}
|
|
489
|
+
>
|
|
490
|
+
{label}
|
|
491
|
+
</Tag>
|
|
492
|
+
);
|
|
493
|
+
};
|
|
494
|
+
|
|
495
|
+
loadData = async (
|
|
496
|
+
queryKey: string,
|
|
497
|
+
pageInfo: PageInfo,
|
|
498
|
+
titleId: string
|
|
499
|
+
): Promise<LoadDataSource> => {
|
|
500
|
+
const { onEntityClick, baseCriteria, serverKey, fieldConfig } = this.props;
|
|
501
|
+
|
|
502
|
+
let queryData: QueryData = await HcserviceV3.requestQueryData(
|
|
503
|
+
fieldConfig.serverKey ? fieldConfig.serverKey : serverKey,
|
|
504
|
+
queryKey,
|
|
505
|
+
pageInfo
|
|
506
|
+
);
|
|
507
|
+
let options: object[] = [];
|
|
508
|
+
pageInfo = queryData.pageInfo;
|
|
509
|
+
queryData.entities.forEach((item, index) => {
|
|
510
|
+
let title = item.fieldMap[titleId];
|
|
511
|
+
//放入全局对象缓存
|
|
512
|
+
//这个缓存后续还需要完善,因为太多了,容易爆掉
|
|
513
|
+
HCDataSource.cache(item);
|
|
514
|
+
if (title) {
|
|
515
|
+
let ts = title.split("@R@");
|
|
516
|
+
let t = ts && ts.length > 0 ? ts[ts.length - 1] : title;
|
|
517
|
+
if (t != "null") {
|
|
518
|
+
let option = this.toOption(item.code, t, onEntityClick);
|
|
519
|
+
options.push(option);
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
});
|
|
523
|
+
return { options, touchEnd: queryData.touchEnd };
|
|
524
|
+
};
|
|
525
|
+
|
|
526
|
+
debounceFetcher = () => {
|
|
527
|
+
const loadOptions = (val) => {
|
|
528
|
+
this.fetchOptions(val);
|
|
529
|
+
};
|
|
530
|
+
return debounce(loadOptions, 800);
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
debounceFetchNextPage = () => {
|
|
534
|
+
// this.setState({
|
|
535
|
+
// loading: true,
|
|
536
|
+
// })
|
|
537
|
+
debounce(this.fetchNextPage, 200)();
|
|
538
|
+
// this.setState({
|
|
539
|
+
// loading: false,
|
|
540
|
+
// })
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
render() {
|
|
544
|
+
const {
|
|
545
|
+
id,
|
|
546
|
+
value,
|
|
547
|
+
fieldConfig,
|
|
548
|
+
onChange,
|
|
549
|
+
disabled,
|
|
550
|
+
style,
|
|
551
|
+
maxSelected,
|
|
552
|
+
onEntityClick,
|
|
553
|
+
mainCode,
|
|
554
|
+
serverKey: pServerKey,
|
|
555
|
+
} = this.props;
|
|
556
|
+
const { actions } = fieldConfig;
|
|
557
|
+
const {
|
|
558
|
+
optionCacheKey,
|
|
559
|
+
loading,
|
|
560
|
+
optionsCache,
|
|
561
|
+
drawCode,
|
|
562
|
+
showEdit,
|
|
563
|
+
showView,
|
|
564
|
+
showTable,
|
|
565
|
+
ltmplConfig,
|
|
566
|
+
} = this.state;
|
|
567
|
+
const { translate } = this.context;
|
|
568
|
+
|
|
569
|
+
let serverKey = fieldConfig.serverKey ? fieldConfig.serverKey : pServerKey;
|
|
570
|
+
|
|
571
|
+
let initOptions = this.toOptions(value, onEntityClick);
|
|
572
|
+
let exists;
|
|
573
|
+
let properOptions = [...initOptions];
|
|
574
|
+
let listHeight = 256;
|
|
575
|
+
if (optionCacheKey && optionsCache[optionCacheKey]) {
|
|
576
|
+
let optionCache = optionsCache[optionCacheKey];
|
|
577
|
+
if (optionCache["pageInfo"] && optionCache.pageInfo.pageSize < 8) {
|
|
578
|
+
listHeight = 32 * optionCache["pageInfo"].pageSize - 10;
|
|
579
|
+
}
|
|
580
|
+
for (let option of optionCache.options) {
|
|
581
|
+
exists = false;
|
|
582
|
+
for (let init of initOptions) {
|
|
583
|
+
if (init["value"] == option["value"]) {
|
|
584
|
+
exists = true;
|
|
585
|
+
//用查询的覆盖之前的
|
|
586
|
+
init["label"] = option["label"];
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
if (!exists) {
|
|
590
|
+
properOptions.push(option);
|
|
591
|
+
}
|
|
592
|
+
}
|
|
479
593
|
}
|
|
480
594
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
595
|
+
return (
|
|
596
|
+
<>
|
|
597
|
+
<Select
|
|
598
|
+
disabled={disabled}
|
|
599
|
+
id={id}
|
|
600
|
+
listHeight={listHeight}
|
|
601
|
+
style={{ ...style }}
|
|
602
|
+
onChange={this.onChange}
|
|
603
|
+
value={this.toValueArray(value)}
|
|
604
|
+
mode="multiple"
|
|
605
|
+
placeholder={translate("${请选择}${" + fieldConfig.title + "}")}
|
|
606
|
+
notFoundContent={
|
|
607
|
+
loading ? <Spin size={"small"}></Spin> : translate("${无数据}")
|
|
608
|
+
}
|
|
609
|
+
allowClear={true}
|
|
610
|
+
showArrow={true}
|
|
611
|
+
suffixIcon={<SearchOutlined />}
|
|
612
|
+
filterOption={false}
|
|
613
|
+
dropdownRender={this.dropdownRender}
|
|
614
|
+
tagRender={
|
|
615
|
+
actions &&
|
|
616
|
+
(actions.indexOf("detail") >= 0 || actions.indexOf("edit") >= 0)
|
|
617
|
+
? this.tagRender
|
|
618
|
+
: undefined
|
|
619
|
+
}
|
|
620
|
+
onSearch={this.debounceFetcher()}
|
|
621
|
+
onClick={
|
|
622
|
+
disabled
|
|
623
|
+
? null
|
|
624
|
+
: () => {
|
|
625
|
+
debounce(this.fetchOptions, 100)(undefined);
|
|
508
626
|
}
|
|
627
|
+
}
|
|
628
|
+
options={loading ? [] : properOptions}
|
|
629
|
+
onPopupScroll={(e) => {
|
|
630
|
+
const { target } = e;
|
|
631
|
+
if (
|
|
632
|
+
target["scrollTop"] + target["offsetHeight"] + 1 >=
|
|
633
|
+
target["scrollHeight"]
|
|
634
|
+
) {
|
|
635
|
+
this.debounceFetchNextPage();
|
|
509
636
|
}
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
|
|
637
|
+
}}
|
|
638
|
+
></Select>
|
|
639
|
+
{showView && drawCode ? (
|
|
640
|
+
<DtmplViewDrawer
|
|
641
|
+
serverKey={serverKey}
|
|
642
|
+
placement={"left"}
|
|
643
|
+
onClose={this.doClose}
|
|
644
|
+
open={showView}
|
|
645
|
+
sourceId={fieldConfig.sourceId}
|
|
646
|
+
code={drawCode}
|
|
647
|
+
></DtmplViewDrawer>
|
|
648
|
+
) : null}
|
|
649
|
+
{showEdit && ltmplConfig ? (
|
|
650
|
+
ltmplConfig.customEditPagePath ? (
|
|
651
|
+
<DtmplCustomEditModalPage
|
|
652
|
+
open={showEdit}
|
|
653
|
+
onOk={() => {
|
|
654
|
+
this.drawSubmited();
|
|
655
|
+
}}
|
|
656
|
+
customPath={ltmplConfig.customEditPagePath}
|
|
657
|
+
sourceId={fieldConfig.sourceId}
|
|
658
|
+
mainCode={mainCode}
|
|
659
|
+
code={drawCode}
|
|
660
|
+
/>
|
|
661
|
+
) : (
|
|
662
|
+
<DtmplEditPage
|
|
663
|
+
serverKey={serverKey}
|
|
664
|
+
pageType={"modal"}
|
|
665
|
+
open={showEdit}
|
|
666
|
+
onCancel={this.doClose}
|
|
667
|
+
mainCode={mainCode}
|
|
668
|
+
sourceId={fieldConfig.sourceId}
|
|
669
|
+
code={drawCode}
|
|
670
|
+
onOk={this.drawSubmited}
|
|
671
|
+
/>
|
|
672
|
+
)
|
|
673
|
+
) : null}
|
|
674
|
+
{showTable ? (
|
|
675
|
+
<LtmplModal
|
|
676
|
+
serverKey={serverKey}
|
|
677
|
+
open={showTable}
|
|
678
|
+
height={"76vh"}
|
|
679
|
+
onCancel={this.closeTable}
|
|
680
|
+
sourceId={fieldConfig.sourceId}
|
|
681
|
+
mainCode={mainCode}
|
|
682
|
+
/>
|
|
683
|
+
) : null}
|
|
684
|
+
</>
|
|
685
|
+
);
|
|
686
|
+
}
|
|
563
687
|
}
|
|
564
|
-
|
|
565
|
-
|