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,253 +1,360 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import {RefObject} from
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { RefObject } from "react";
|
|
3
|
+
import {
|
|
4
|
+
Button,
|
|
5
|
+
Checkbox as AntdCheckbox,
|
|
6
|
+
Popconfirm,
|
|
7
|
+
Popover,
|
|
8
|
+
Tooltip,
|
|
9
|
+
} from "antd";
|
|
10
|
+
import "./index.css";
|
|
11
|
+
import { ActionConfig, DtmplData } from "../../tmpl/interface";
|
|
12
|
+
import { FormInstance } from "antd/lib/form/hooks/useForm";
|
|
13
|
+
import FieldsEditCard from "../../detail/edit/fields-edit-card";
|
|
14
|
+
import { SizeType } from "antd/lib/config-provider/SizeContext";
|
|
15
|
+
import ActionUtils from "./utils";
|
|
16
|
+
import Icon from "../../icon";
|
|
17
|
+
import { ButtonType } from "antd/lib/button";
|
|
18
|
+
import { LocaleContext } from "../../locale/LocaleProvider";
|
|
19
|
+
|
|
20
|
+
export type ActionButtonIconType = "icon" | "icon-title" | "title";
|
|
21
|
+
export type ActionButtonType = "primary-block" | "dashed" | "primary";
|
|
22
|
+
export type ActionButtonHiddenType = "hidden" | "disabled";
|
|
16
23
|
|
|
17
24
|
interface ActionProps {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
25
|
+
serverKey?: string;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
actionConfig: ActionConfig;
|
|
28
|
+
data?: DtmplData[] | object[];
|
|
29
|
+
formRef?: RefObject<FormInstance>;
|
|
30
|
+
doAction: (string, Array, object) => void;
|
|
31
|
+
serial?: number;
|
|
32
|
+
buttonType?: ActionButtonType;
|
|
33
|
+
hiddenType?: ActionButtonHiddenType;
|
|
34
|
+
buttonSize?: SizeType;
|
|
35
|
+
iconType: ActionButtonIconType;
|
|
36
|
+
}
|
|
30
37
|
|
|
31
38
|
interface ActionState {
|
|
32
|
-
|
|
39
|
+
popoverOpen?: boolean;
|
|
40
|
+
}
|
|
33
41
|
|
|
34
|
-
|
|
42
|
+
export default class Action extends React.PureComponent<
|
|
43
|
+
ActionProps,
|
|
44
|
+
ActionState
|
|
45
|
+
> {
|
|
46
|
+
static defaultProps = {
|
|
47
|
+
hiddenType: "hidden",
|
|
48
|
+
buttonSize: undefined,
|
|
49
|
+
iconType: "icon-title",
|
|
50
|
+
};
|
|
51
|
+
static contextType = LocaleContext;
|
|
52
|
+
context: React.ContextType<typeof LocaleContext>;
|
|
35
53
|
|
|
36
|
-
|
|
54
|
+
state = {
|
|
55
|
+
popoverOpen: false,
|
|
56
|
+
};
|
|
37
57
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
58
|
+
componentDidMount() {
|
|
59
|
+
const {} = this.props;
|
|
60
|
+
this.setState({});
|
|
61
|
+
}
|
|
43
62
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
componentDidMount() {
|
|
49
|
-
const {} = this.props;
|
|
50
|
-
this.setState({})
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
componentDidUpdate(prevProps) {
|
|
54
|
-
const {} = this.props;
|
|
55
|
-
if (this.props != prevProps) {
|
|
56
|
-
// this.setState({collapse:!this.state.collapse})
|
|
57
|
-
}
|
|
63
|
+
componentDidUpdate(prevProps) {
|
|
64
|
+
const {} = this.props;
|
|
65
|
+
if (this.props != prevProps) {
|
|
66
|
+
// this.setState({collapse:!this.state.collapse})
|
|
58
67
|
}
|
|
68
|
+
}
|
|
59
69
|
|
|
70
|
+
isShow = () => {
|
|
71
|
+
const { actionConfig, data, formRef } = this.props;
|
|
72
|
+
return ActionUtils.isShow(actionConfig, data, formRef);
|
|
73
|
+
};
|
|
60
74
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}else{
|
|
91
|
-
if(dtmplValue) {
|
|
92
|
-
if (dtmplValue['fieldMap']) {
|
|
93
|
-
value[fieldConfig.id] = dtmplValue ? dtmplValue['fieldMap'][fieldConfig.id] : undefined;
|
|
94
|
-
} else {
|
|
95
|
-
value[fieldConfig.id] = dtmplValue ? dtmplValue[fieldConfig.id] : undefined;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
75
|
+
getValue = () => {
|
|
76
|
+
const { data, formRef, actionConfig } = this.props;
|
|
77
|
+
let value = {};
|
|
78
|
+
//从 dtmplData 与 ref
|
|
79
|
+
//dtmplData取第一个
|
|
80
|
+
let dtmplValue = data ? data[0] : undefined;
|
|
81
|
+
let upperFormValue = formRef ? formRef.current : undefined;
|
|
82
|
+
for (let fieldConfig of actionConfig.writes) {
|
|
83
|
+
if (!fieldConfig) {
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
if (upperFormValue) {
|
|
87
|
+
if (upperFormValue.getFieldValue(fieldConfig.id)) {
|
|
88
|
+
value[fieldConfig.id] = ActionUtils.getFormRefValue(
|
|
89
|
+
formRef.current,
|
|
90
|
+
fieldConfig.id
|
|
91
|
+
);
|
|
92
|
+
} else {
|
|
93
|
+
if (dtmplValue) {
|
|
94
|
+
if (dtmplValue["fieldMap"]) {
|
|
95
|
+
value[fieldConfig.id] = dtmplValue
|
|
96
|
+
? dtmplValue["fieldMap"][fieldConfig.id]
|
|
97
|
+
: undefined;
|
|
98
|
+
} else {
|
|
99
|
+
value[fieldConfig.id] = dtmplValue
|
|
100
|
+
? dtmplValue[fieldConfig.id]
|
|
101
|
+
: undefined;
|
|
98
102
|
}
|
|
103
|
+
}
|
|
99
104
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
onCancel = () => {
|
|
112
|
-
this.setState({
|
|
113
|
-
popoverOpen: false,
|
|
114
|
-
})
|
|
115
|
-
}
|
|
116
|
-
onValuesChange = (value: object) => {
|
|
117
|
-
const {formRef} = this.props;
|
|
118
|
-
if (formRef && formRef.current) {
|
|
119
|
-
formRef.current.setFieldsValue(value);
|
|
105
|
+
} else {
|
|
106
|
+
if (dtmplValue) {
|
|
107
|
+
if (dtmplValue["fieldMap"]) {
|
|
108
|
+
value[fieldConfig.id] = dtmplValue
|
|
109
|
+
? dtmplValue["fieldMap"][fieldConfig.id]
|
|
110
|
+
: undefined;
|
|
111
|
+
} else {
|
|
112
|
+
value[fieldConfig.id] = dtmplValue
|
|
113
|
+
? dtmplValue[fieldConfig.id]
|
|
114
|
+
: undefined;
|
|
115
|
+
}
|
|
120
116
|
}
|
|
117
|
+
}
|
|
121
118
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
119
|
+
console.log("actionValue:", value);
|
|
120
|
+
return value;
|
|
121
|
+
};
|
|
122
|
+
onOk = (value: object) => {
|
|
123
|
+
console.log("action form value:", value);
|
|
124
|
+
const { actionConfig, doAction } = this.props;
|
|
125
|
+
this.setState({
|
|
126
|
+
popoverOpen: false,
|
|
127
|
+
});
|
|
128
|
+
doAction(actionConfig.id, this.getCodes(), value);
|
|
129
|
+
};
|
|
130
|
+
onCancel = () => {
|
|
131
|
+
this.setState({
|
|
132
|
+
popoverOpen: false,
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
onValuesChange = (value: object) => {
|
|
136
|
+
const { formRef } = this.props;
|
|
137
|
+
if (formRef && formRef.current) {
|
|
138
|
+
formRef.current.setFieldsValue(value);
|
|
128
139
|
}
|
|
140
|
+
};
|
|
129
141
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
142
|
+
getButtonType = () => {
|
|
143
|
+
const { buttonType, actionConfig } = this.props;
|
|
144
|
+
let bType: ButtonType = !buttonType
|
|
145
|
+
? "dashed"
|
|
146
|
+
: buttonType.split("-")[0] == "dashed"
|
|
147
|
+
? "dashed"
|
|
148
|
+
: "primary";
|
|
149
|
+
return buttonType
|
|
150
|
+
? bType
|
|
151
|
+
: actionConfig.buttonType
|
|
152
|
+
? actionConfig.buttonType
|
|
153
|
+
: "dashed";
|
|
154
|
+
};
|
|
135
155
|
|
|
156
|
+
blockButton = (): boolean => {
|
|
157
|
+
const { buttonType } = this.props;
|
|
158
|
+
let block = buttonType && buttonType.includes("block");
|
|
159
|
+
return block;
|
|
160
|
+
};
|
|
136
161
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
onClick={() => this.setState({popoverOpen: !popoverOpen})}
|
|
154
|
-
disabled={disabled_} >{this.getTitle()}</Button>
|
|
155
|
-
</Popover>
|
|
162
|
+
formButton = () => {
|
|
163
|
+
const { popoverOpen } = this.state;
|
|
164
|
+
const {
|
|
165
|
+
actionConfig,
|
|
166
|
+
disabled,
|
|
167
|
+
hiddenType,
|
|
168
|
+
buttonSize,
|
|
169
|
+
serverKey,
|
|
170
|
+
} = this.props;
|
|
171
|
+
let disabled_ = disabled;
|
|
172
|
+
if (!this.isShow()) {
|
|
173
|
+
if (!hiddenType || hiddenType == "hidden") {
|
|
174
|
+
return null;
|
|
175
|
+
} else {
|
|
176
|
+
disabled_ = true;
|
|
177
|
+
}
|
|
156
178
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
|
|
179
|
+
return (
|
|
180
|
+
<Popover
|
|
181
|
+
placement="top"
|
|
182
|
+
open={popoverOpen}
|
|
183
|
+
trigger="click"
|
|
184
|
+
content={
|
|
185
|
+
<FieldsEditCard
|
|
186
|
+
serverKey={serverKey}
|
|
187
|
+
okDanger={actionConfig.beforeExeConfirm == "danger"}
|
|
188
|
+
needConfirm={true}
|
|
189
|
+
title={actionConfig.title}
|
|
190
|
+
onCancel={() => this.onCancel()}
|
|
191
|
+
fields={actionConfig.writes}
|
|
192
|
+
value={this.getValue()}
|
|
193
|
+
onOk={this.onOk}
|
|
194
|
+
onValuesChange={this.onValuesChange}
|
|
195
|
+
/>
|
|
171
196
|
}
|
|
197
|
+
>
|
|
198
|
+
<Button
|
|
199
|
+
danger={actionConfig.danger}
|
|
200
|
+
type={this.getButtonType()}
|
|
201
|
+
shape={actionConfig.buttonShape}
|
|
202
|
+
block={this.blockButton()}
|
|
203
|
+
size={buttonSize}
|
|
204
|
+
onClick={() => this.setState({ popoverOpen: !popoverOpen })}
|
|
205
|
+
disabled={disabled_}
|
|
206
|
+
>
|
|
207
|
+
{this.getTitle()}
|
|
208
|
+
</Button>
|
|
209
|
+
</Popover>
|
|
210
|
+
);
|
|
211
|
+
};
|
|
172
212
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
213
|
+
getTitle = () => {
|
|
214
|
+
const { actionConfig, iconType } = this.props;
|
|
215
|
+
let title = null;
|
|
216
|
+
if (actionConfig.icon) {
|
|
217
|
+
if (iconType == "icon-title") {
|
|
218
|
+
title = (
|
|
219
|
+
<>
|
|
220
|
+
<Icon type={actionConfig.icon}></Icon>
|
|
221
|
+
{actionConfig.title}
|
|
222
|
+
</>
|
|
223
|
+
);
|
|
224
|
+
} else if (iconType == "icon") {
|
|
225
|
+
title = (
|
|
226
|
+
<Tooltip placement="top" title={actionConfig.title}>
|
|
227
|
+
<Icon type={actionConfig.icon}></Icon>
|
|
228
|
+
{""}
|
|
229
|
+
</Tooltip>
|
|
230
|
+
);
|
|
231
|
+
} else {
|
|
232
|
+
title = actionConfig.title;
|
|
233
|
+
}
|
|
234
|
+
} else {
|
|
235
|
+
title = actionConfig.title;
|
|
178
236
|
}
|
|
179
237
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
for (let d of data) {
|
|
187
|
-
if (d) {
|
|
188
|
-
codes.push(d['code']);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
return codes;
|
|
238
|
+
if (actionConfig.tip && iconType != "icon") {
|
|
239
|
+
title = (
|
|
240
|
+
<>
|
|
241
|
+
<Tooltip title={actionConfig.tip}>{title}</Tooltip>
|
|
242
|
+
</>
|
|
243
|
+
);
|
|
194
244
|
}
|
|
195
245
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
246
|
+
return title;
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
getCodes = () => {
|
|
250
|
+
const { data } = this.props;
|
|
251
|
+
let codes = [];
|
|
252
|
+
if (data) {
|
|
253
|
+
if (data instanceof Array) {
|
|
254
|
+
for (let d of data) {
|
|
255
|
+
if (d) {
|
|
256
|
+
codes.push(d["code"]);
|
|
257
|
+
}
|
|
205
258
|
}
|
|
206
|
-
|
|
207
|
-
let block = this.blockButton();
|
|
208
|
-
let bType = this.getButtonType();
|
|
209
|
-
return !actionConfig.beforeExeConfirm || actionConfig.beforeExeConfirm == 'default' ?
|
|
210
|
-
<Popconfirm key={actionConfig.id}
|
|
211
|
-
placement="rightBottom"
|
|
212
|
-
title={`确定要执行【${actionConfig.title}】吗?`}
|
|
213
|
-
onConfirm={() => {
|
|
214
|
-
doAction(actionConfig.id, codes, {})
|
|
215
|
-
}}
|
|
216
|
-
disabled={disabled_}
|
|
217
|
-
okText="确定"
|
|
218
|
-
cancelText="取消"
|
|
219
|
-
>
|
|
220
|
-
<Button size={buttonSize} danger={actionConfig.danger } type={bType} shape={actionConfig.buttonShape} block={block} disabled={disabled_}
|
|
221
|
-
>{this.getTitle()}</Button>
|
|
222
|
-
</Popconfirm> :
|
|
223
|
-
actionConfig.beforeExeConfirm == 'danger' ?
|
|
224
|
-
<Popconfirm key={actionConfig.id}
|
|
225
|
-
placement="rightBottom"
|
|
226
|
-
title={`确定要执行【${actionConfig.title}】吗?`}
|
|
227
|
-
onConfirm={() => {
|
|
228
|
-
doAction(actionConfig.id, codes, {})
|
|
229
|
-
}}
|
|
230
|
-
disabled={disabled_}
|
|
231
|
-
okText="确定"
|
|
232
|
-
cancelText="取消"
|
|
233
|
-
okType={'danger'}
|
|
234
|
-
>
|
|
235
|
-
<Button type={bType} block={block} danger={true} shape={actionConfig.buttonShape} size={buttonSize} disabled={disabled_}
|
|
236
|
-
>{this.getTitle()}</Button>
|
|
237
|
-
</Popconfirm> :
|
|
238
|
-
<Button type={bType} block={block} size={buttonSize} shape={actionConfig.buttonShape} danger={actionConfig.danger}
|
|
239
|
-
onClick={() => doAction(actionConfig.id, codes, {})}
|
|
240
|
-
disabled={disabled_}
|
|
241
|
-
>{this.getTitle()}</Button>
|
|
259
|
+
}
|
|
242
260
|
}
|
|
261
|
+
return codes;
|
|
262
|
+
};
|
|
243
263
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
264
|
+
withoutFormButton = () => {
|
|
265
|
+
const {
|
|
266
|
+
actionConfig,
|
|
267
|
+
doAction,
|
|
268
|
+
data,
|
|
269
|
+
disabled,
|
|
270
|
+
buttonType,
|
|
271
|
+
hiddenType,
|
|
272
|
+
buttonSize,
|
|
273
|
+
} = this.props;
|
|
274
|
+
const { translate } = this.context;
|
|
275
|
+
let disabled_ = disabled;
|
|
276
|
+
if (!this.isShow()) {
|
|
277
|
+
if (!hiddenType || hiddenType == "hidden") {
|
|
278
|
+
return null;
|
|
279
|
+
} else {
|
|
280
|
+
disabled_ = true;
|
|
281
|
+
}
|
|
251
282
|
}
|
|
283
|
+
let codes = this.getCodes();
|
|
284
|
+
let block = this.blockButton();
|
|
285
|
+
let bType = this.getButtonType();
|
|
286
|
+
return !actionConfig.beforeExeConfirm ||
|
|
287
|
+
actionConfig.beforeExeConfirm == "default" ? (
|
|
288
|
+
<Popconfirm
|
|
289
|
+
key={actionConfig.id}
|
|
290
|
+
placement="rightBottom"
|
|
291
|
+
title={translate("${确定要执行}【${" + actionConfig.title + "}】?")}
|
|
292
|
+
onConfirm={() => {
|
|
293
|
+
doAction(actionConfig.id, codes, {});
|
|
294
|
+
}}
|
|
295
|
+
disabled={disabled_}
|
|
296
|
+
okText={translate("${确定}")}
|
|
297
|
+
cancelText={translate("${取消}")}
|
|
298
|
+
>
|
|
299
|
+
<Button
|
|
300
|
+
size={buttonSize}
|
|
301
|
+
danger={actionConfig.danger}
|
|
302
|
+
type={bType}
|
|
303
|
+
shape={actionConfig.buttonShape}
|
|
304
|
+
block={block}
|
|
305
|
+
disabled={disabled_}
|
|
306
|
+
>
|
|
307
|
+
{this.getTitle()}
|
|
308
|
+
</Button>
|
|
309
|
+
</Popconfirm>
|
|
310
|
+
) : actionConfig.beforeExeConfirm == "danger" ? (
|
|
311
|
+
<Popconfirm
|
|
312
|
+
key={actionConfig.id}
|
|
313
|
+
placement="rightBottom"
|
|
314
|
+
title={translate("${确定要执行}【${" + actionConfig.title + "}】?")}
|
|
315
|
+
onConfirm={() => {
|
|
316
|
+
doAction(actionConfig.id, codes, {});
|
|
317
|
+
}}
|
|
318
|
+
disabled={disabled_}
|
|
319
|
+
okText={translate("${确定}")}
|
|
320
|
+
cancelText={translate("${取消}")}
|
|
321
|
+
okType={"danger"}
|
|
322
|
+
>
|
|
323
|
+
<Button
|
|
324
|
+
type={bType}
|
|
325
|
+
block={block}
|
|
326
|
+
danger={true}
|
|
327
|
+
shape={actionConfig.buttonShape}
|
|
328
|
+
size={buttonSize}
|
|
329
|
+
disabled={disabled_}
|
|
330
|
+
>
|
|
331
|
+
{this.getTitle()}
|
|
332
|
+
</Button>
|
|
333
|
+
</Popconfirm>
|
|
334
|
+
) : (
|
|
335
|
+
<Button
|
|
336
|
+
type={bType}
|
|
337
|
+
block={block}
|
|
338
|
+
size={buttonSize}
|
|
339
|
+
shape={actionConfig.buttonShape}
|
|
340
|
+
danger={actionConfig.danger}
|
|
341
|
+
onClick={() => doAction(actionConfig.id, codes, {})}
|
|
342
|
+
disabled={disabled_}
|
|
343
|
+
>
|
|
344
|
+
{this.getTitle()}
|
|
345
|
+
</Button>
|
|
346
|
+
);
|
|
347
|
+
};
|
|
252
348
|
|
|
349
|
+
render() {
|
|
350
|
+
const {} = this.state;
|
|
351
|
+
const { actionConfig } = this.props;
|
|
352
|
+
return (
|
|
353
|
+
<>
|
|
354
|
+
{actionConfig.writes && actionConfig.writes.length > 0
|
|
355
|
+
? this.formButton()
|
|
356
|
+
: this.withoutFormButton()}
|
|
357
|
+
</>
|
|
358
|
+
);
|
|
359
|
+
}
|
|
253
360
|
}
|
|
@@ -16,6 +16,7 @@ export default class ActionUtils {
|
|
|
16
16
|
|
|
17
17
|
static isMatch(fieldConfigs: FieldConfig[], data: DtmplData[] | object[], formInstance: FormInstance, dtmplConfig: DtmplConfig) {
|
|
18
18
|
|
|
19
|
+
debugger
|
|
19
20
|
//所有data都必须满足条件才能显示
|
|
20
21
|
//let comparator=actionConfig.comparator;
|
|
21
22
|
//debugger
|
|
@@ -39,17 +40,17 @@ export default class ActionUtils {
|
|
|
39
40
|
}
|
|
40
41
|
}
|
|
41
42
|
if(isMatch && tempConfigs.length>0){//若果之前判断成功,则继续判断
|
|
42
|
-
isMatch = this.matchDtmplData(tempConfigs, data);
|
|
43
|
+
isMatch = this.matchDtmplData(tempConfigs, data,dtmplConfig);
|
|
43
44
|
}
|
|
44
45
|
} else if (data) {
|
|
45
|
-
isMatch = this.matchDtmplData(fieldConfigs, data);
|
|
46
|
+
isMatch = this.matchDtmplData(fieldConfigs, data,dtmplConfig);
|
|
46
47
|
} else {
|
|
47
48
|
isMatch = false;
|
|
48
49
|
}
|
|
49
50
|
return isMatch;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
static matchDtmplData(fieldConfigs: FieldConfig[], data: DtmplData[] | object[]) {
|
|
53
|
+
static matchDtmplData(fieldConfigs: FieldConfig[], data: DtmplData[] | object[],dtmplConfig: DtmplConfig) {
|
|
53
54
|
let isMatch = true;
|
|
54
55
|
if(!data){
|
|
55
56
|
return false;
|
|
@@ -65,7 +66,8 @@ export default class ActionUtils {
|
|
|
65
66
|
|
|
66
67
|
for (let fieldConfig of fieldConfigs) {
|
|
67
68
|
if (d['fieldMap']) {
|
|
68
|
-
|
|
69
|
+
let fieldId=dtmplConfig ? TmplConfigAnalysis.getFieldId(dtmplConfig, fieldConfig.mstrucId) : fieldConfig.id;
|
|
70
|
+
if (!this.comparator(fieldConfig.comparator, d['fieldMap'][fieldId], fieldConfig.defaultValue)) {
|
|
69
71
|
isMatch = false;
|
|
70
72
|
break;
|
|
71
73
|
}
|