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,807 +1,1002 @@
|
|
|
1
|
-
import Units from
|
|
1
|
+
import Units from "../units";
|
|
2
2
|
import Super from "./superagent";
|
|
3
|
-
import {message} from 'antd'
|
|
4
|
-
import EncryptUtils from '../units/EncryptUtils'
|
|
5
|
-
import format from 'dayjs';
|
|
6
|
-
import {CodeSource, DtmplConfig, PageInfo, SelectedRow} from "./interface";
|
|
7
3
|
|
|
8
|
-
import {
|
|
4
|
+
import { message } from "antd";
|
|
5
|
+
import EncryptUtils from "../units/EncryptUtils";
|
|
6
|
+
import "dayjs/locale/en";
|
|
7
|
+
import dayjs from "dayjs";
|
|
8
|
+
import { CodeSource, DtmplConfig, PageInfo, SelectedRow } from "./interface";
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
static async requestEnum(serverKey:string,mstrucIds, path:string) {
|
|
13
|
-
if (!path) {
|
|
14
|
-
return await this.requestEnumWithPath(serverKey,mstrucIds, "/enum");
|
|
15
|
-
} else {
|
|
16
|
-
return await this.requestEnumWithPath(serverKey,mstrucIds, path);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
static async requestEnumWithPath(serverKey:string,mstrucIds, path) {
|
|
21
|
-
if (mstrucIds.length > 0) {
|
|
22
|
-
let res = await Super.super({
|
|
23
|
-
url:Units.joinPath( "/v3",path),
|
|
24
|
-
serverKey,
|
|
25
|
-
query: {
|
|
26
|
-
mstrucIds
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
return res.enumMap;
|
|
30
|
-
} else {
|
|
31
|
-
return {};
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
static async requestOptions(serverKey:string,mstrucId) { //有下拉菜单时,请求下拉选项操作
|
|
36
|
-
return await this.requestEnum(serverKey,[mstrucId],null);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
static async requestDtmplConfig(serverKey:string,sourceId: string,code:string) {
|
|
40
|
-
|
|
41
|
-
let url = `/v3/dtmpl/config`
|
|
42
|
-
let res = await Super.super({
|
|
43
|
-
url,
|
|
44
|
-
serverKey,
|
|
45
|
-
method: "GET",
|
|
46
|
-
query: {sourceId,code}
|
|
47
|
-
});
|
|
48
|
-
return res.dtmplConfig;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
static async requestTtmplConfig(serverKey:string,sourceId: string) {
|
|
52
|
-
|
|
53
|
-
let url = `/v3/ttmpl/config`
|
|
54
|
-
let res = await Super.super({
|
|
55
|
-
url,
|
|
56
|
-
serverKey,
|
|
57
|
-
method: "GET",
|
|
58
|
-
query: {sourceId}
|
|
59
|
-
});
|
|
60
|
-
return res.ttmplConfig;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
static async requestViewDtmplConfig(serverKey:string,sourceId: string) {
|
|
64
|
-
|
|
65
|
-
let url = `/v3/view-dtmpl/config`
|
|
66
|
-
let res = await Super.super({
|
|
67
|
-
url,
|
|
68
|
-
serverKey,
|
|
69
|
-
method: "GET",
|
|
70
|
-
query: {sourceId}
|
|
71
|
-
});
|
|
72
|
-
return res.dtmplConfig;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
static async requestAddDtmplConfig(serverKey:string,sourceId: string,addTmplId:string) {
|
|
76
|
-
|
|
77
|
-
let url = `/v3/add-dtmpl/config`
|
|
78
|
-
let res = await Super.super({
|
|
79
|
-
url,
|
|
80
|
-
serverKey,
|
|
81
|
-
method: "GET",
|
|
82
|
-
query: {sourceId,addTmplId}
|
|
83
|
-
});
|
|
84
|
-
return res.dtmplConfig;
|
|
85
|
-
}
|
|
86
|
-
static async requestSelectConfig(serverKey:string,sourceId) {
|
|
87
|
-
let url = `/v3/select/config`
|
|
88
|
-
let res = await Super.super({
|
|
89
|
-
url,
|
|
90
|
-
serverKey,
|
|
91
|
-
method: "GET",
|
|
92
|
-
query: {sourceId}
|
|
93
|
-
});
|
|
94
|
-
return res.selectConfig;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
static async requestLtmplConfig(serverKey:string,sourceId:string) {
|
|
98
|
-
let url = `/v3/ltmpl/config`
|
|
99
|
-
let res = await Super.super({
|
|
100
|
-
url,
|
|
101
|
-
serverKey,
|
|
102
|
-
method: "GET",
|
|
103
|
-
query: {sourceId}
|
|
104
|
-
});
|
|
105
|
-
return res;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
static async requestL2LtmplConfig(serverKey:string,sourceId) {
|
|
109
|
-
let url = `/v3/l2/ltmpl/config`
|
|
110
|
-
let res = await Super.super({
|
|
111
|
-
url,
|
|
112
|
-
serverKey,
|
|
113
|
-
method: "GET",
|
|
114
|
-
query: {sourceId}
|
|
115
|
-
});
|
|
116
|
-
return res;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
static async requestLtmplQueryKey(serverKey:string,sourceId:string, condition?) {
|
|
120
|
-
//console.log('condition:',condition);
|
|
121
|
-
let url = `/v3/ltmpl/query/key`
|
|
122
|
-
let res = await Super.super({
|
|
123
|
-
url: url,
|
|
124
|
-
serverKey,
|
|
125
|
-
method: 'GET',
|
|
126
|
-
query: {...condition, sourceId}
|
|
127
|
-
});
|
|
128
|
-
return res;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
static async requestLtmplQueryTop(serverKey:string,sourceId:string, condition) {
|
|
132
|
-
// console.log('condition:',condition);
|
|
133
|
-
let url = `/v3/ltmpl/top-data`
|
|
134
|
-
return await this.requestCommonLtmplQueryTop(serverKey,sourceId, condition, url);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
static async requestTtmplRootData(serverKey:string,sourceId:string, condition) {
|
|
138
|
-
let url = `/v3/ttmpl/root-data`
|
|
139
|
-
return await this.requestCommonLtmplQueryTop(serverKey,sourceId, condition, url);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
static async requestMstrucLtmplQueryTop(serverKey:string,sourceId:string, condition) {
|
|
143
|
-
//console.log('condition:',condition);
|
|
144
|
-
let url = `/v3/mstruc/ltmpl/top-data`
|
|
145
|
-
return await this.requestCommonLtmplQueryTop(serverKey,sourceId, condition, url);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
static async queryTop1(serverKey:string,sourceId:string){
|
|
149
|
-
let data= await this.requestMstrucLtmplQueryTop(serverKey,sourceId,{top:1});
|
|
150
|
-
let queriedCode=null;
|
|
151
|
-
if(data && data.entities && data.entities[0]){
|
|
152
|
-
queriedCode=data.entities[0].code
|
|
153
|
-
}
|
|
154
|
-
return queriedCode;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
static async requestCommonLtmplQueryTop(serverKey:string,sourceId:string, condition, url) {
|
|
158
|
-
|
|
159
|
-
if(!sourceId){
|
|
160
|
-
message.error("SourceId is undefined!");
|
|
161
|
-
}else{
|
|
162
|
-
let res = await Super.super({
|
|
163
|
-
url: url,
|
|
164
|
-
serverKey,
|
|
165
|
-
method: 'GET',
|
|
166
|
-
query: {...condition, sourceId}
|
|
167
|
-
});
|
|
168
|
-
return res;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
static async requestSelectedData(serverKey:string,sourceId:string, codes) {
|
|
174
|
-
if (!codes) {
|
|
175
|
-
message.warning("没有选择实体")
|
|
176
|
-
return null;
|
|
177
|
-
}
|
|
178
|
-
let url = `/v3/field-group/data/selected`;
|
|
179
|
-
|
|
180
|
-
let res = await Super.super({
|
|
181
|
-
url: url,
|
|
182
|
-
serverKey,
|
|
183
|
-
query: {codes, sourceId},
|
|
184
|
-
method: 'GET'
|
|
185
|
-
});
|
|
186
|
-
if (res.status === "success") {
|
|
187
|
-
return res.entities;
|
|
188
|
-
} else {
|
|
189
|
-
message.error("没有找到实体!")
|
|
190
|
-
return null;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
static async requestVersionList(serverKey:string,sourceId:string, code) {
|
|
195
|
-
let res = await Super.super({
|
|
196
|
-
url: `/v3/dtmpl/data/versions`,
|
|
197
|
-
serverKey,
|
|
198
|
-
query: {
|
|
199
|
-
pageNo: 1,
|
|
200
|
-
sourceId,
|
|
201
|
-
code
|
|
202
|
-
},
|
|
203
|
-
method: 'GET'
|
|
204
|
-
});
|
|
205
|
-
return res.versions;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
static async requestCommonDtmplData(serverKey:string,sourceId:string, code, versionId, url) {
|
|
210
|
-
// if(sourceId=="user"){
|
|
211
|
-
// return this.requestUserDtmplData();
|
|
212
|
-
// }
|
|
213
|
-
let res = await Super.super({
|
|
214
|
-
url,
|
|
215
|
-
serverKey,
|
|
216
|
-
query: {
|
|
217
|
-
code, versionId, sourceId
|
|
218
|
-
},
|
|
219
|
-
method: 'GET'
|
|
220
|
-
});
|
|
221
|
-
if (res.status === "success") {
|
|
222
|
-
return res.entity;
|
|
223
|
-
} else {
|
|
224
|
-
message.error("实体不存在!")
|
|
225
|
-
return null;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
static async requestDtmplData(serverKey:string,sourceId:string, code, versionId) {
|
|
230
|
-
let url = `/v3/dtmpl/data`;
|
|
231
|
-
return await this.requestCommonDtmplData(serverKey,sourceId, code, versionId, url)
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
static async getDtmplData(dtmplConfig:DtmplConfig,serverKey:string,sourceId:string, code) {
|
|
235
|
-
let dtmplData_;
|
|
236
|
-
if(dtmplConfig && dtmplConfig.dynamic){
|
|
237
|
-
dtmplData_=dtmplConfig.entity;
|
|
238
|
-
}
|
|
239
|
-
if(!dtmplData_){
|
|
240
|
-
dtmplData_ = await this.requestDtmplData(serverKey, sourceId, code, null);
|
|
241
|
-
}
|
|
242
|
-
return dtmplData_;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
static async requestMstrucDtmplData(serverKey:string,sourceId:string, code, versionId) {
|
|
246
|
-
let url = `/v3/mstruc/dtmpl/data`;
|
|
247
|
-
return await this.requestCommonDtmplData(serverKey,sourceId, code, versionId, url)
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
static async requestViewDtmplData(serverKey:string,sourceId:string, code, versionId) {
|
|
251
|
-
let url = `/v3/view-dtmpl/data`;
|
|
252
|
-
return await this.requestCommonDtmplData(serverKey,sourceId, code, versionId, url)
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
static async requestMstrucViewDtmplData(serverKey:string,sourceId, code, versionId) {
|
|
256
|
-
let url = `/v3/mstruc/view-dtmpl/data`;
|
|
257
|
-
return await this.requestCommonDtmplData(serverKey,sourceId, code, versionId, url)
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
static async postCommonDtmplData(serverKey:string,sourceId: string, formDataObj, message, url) {
|
|
262
|
-
const formData = new FormData();
|
|
263
|
-
for (let k in formDataObj) {
|
|
264
|
-
if (!k.startsWith("$virtual")) {
|
|
265
|
-
formData.append(k, formDataObj[k] || formDataObj[k] == 0 ? formDataObj[k] : "");
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
formData.append('sourceId', sourceId.toString())
|
|
269
|
-
let res = await Super.super({
|
|
270
|
-
url,
|
|
271
|
-
serverKey,
|
|
272
|
-
data: formData,
|
|
273
|
-
method: 'POST'
|
|
274
|
-
}, 'formdata')
|
|
275
|
-
let code = null;
|
|
276
|
-
if (res) {
|
|
277
|
-
if (res.status === "success") {
|
|
278
|
-
if (message) {
|
|
279
|
-
if (res.message) {
|
|
280
|
-
message.warning("保存成功! " + res.message, 4);
|
|
281
|
-
} else{
|
|
282
|
-
message.success("保存成功! ",1);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
code = res.entityCode ? res.entityCode : res.code;
|
|
286
|
-
}
|
|
287
|
-
// else {
|
|
288
|
-
// if (message) {
|
|
289
|
-
// message.error("保存失败");
|
|
290
|
-
// }
|
|
291
|
-
// }
|
|
292
|
-
} else {
|
|
293
|
-
if (message) {
|
|
294
|
-
message.error("保存失败");
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
return {code, status: res?res.status:'error'};
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
static async postDtmplData(serverKey:string,sourceId: string, formDataObj, message) {
|
|
301
|
-
let url = `/v3/dtmpl/data`;
|
|
302
|
-
return await this.postCommonDtmplData(serverKey,sourceId, formDataObj, message, url);
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
static async postMstrucDtmplData(serverKey:string,sourceId: string, formDataObj, message) {
|
|
306
|
-
let url = `/v3/mstruc/dtmpl/data`;
|
|
307
|
-
return await this.postCommonDtmplData(serverKey,sourceId, formDataObj, message, url);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
static postFileAction(serverKey:string,file) {
|
|
311
|
-
return Units.joinPath(Units.api(serverKey) , '/v3/upload');
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
// static async postFile(formData, message) {
|
|
315
|
-
// let res = await Super.super({
|
|
316
|
-
// url: `/v3/upload`,
|
|
317
|
-
// data: formData,
|
|
318
|
-
// method: 'POST'
|
|
319
|
-
// }, 'formdata')
|
|
320
|
-
// let fileKey = null;
|
|
321
|
-
// if (res) {
|
|
322
|
-
// if (res.status === "success") {
|
|
323
|
-
// if (message) {
|
|
324
|
-
// message.success("上传成功! ")
|
|
325
|
-
// }
|
|
326
|
-
// fileKey = res.fileKey;
|
|
327
|
-
// }
|
|
328
|
-
// } else {
|
|
329
|
-
// if (message) {
|
|
330
|
-
// message.error("上传失败!");
|
|
331
|
-
// }
|
|
332
|
-
// }
|
|
333
|
-
// return fileKey;
|
|
334
|
-
// }
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
static async requestL2LtmplQueryKey(serverKey:string,sourceId, condition) {
|
|
338
|
-
let url = `v3/l2/ltmpl/query/key`
|
|
339
|
-
let res = await Super.super({
|
|
340
|
-
url,
|
|
341
|
-
serverKey,
|
|
342
|
-
method: 'GET',
|
|
343
|
-
query: {...condition, sourceId}
|
|
344
|
-
});
|
|
345
|
-
return res;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
static async requestLtmplCount(serverKey:string,sourceId) {
|
|
350
|
-
let url = `/v3/ltmpl/data/count`;
|
|
351
|
-
let res = await Super.super({
|
|
352
|
-
url,
|
|
353
|
-
serverKey,
|
|
354
|
-
query: {sourceId},
|
|
355
|
-
method: 'GET',
|
|
356
|
-
});
|
|
357
|
-
return res.count;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
// static setCriteriasValue(criterias, criteriaValueMap) {
|
|
362
|
-
// criterias.forEach((item) => {
|
|
363
|
-
// for (let k in criteriaValueMap) {
|
|
364
|
-
// if (k === item.id) {
|
|
365
|
-
// item.value = criteriaValueMap[k]
|
|
366
|
-
// }
|
|
367
|
-
// }
|
|
368
|
-
// });
|
|
369
|
-
// return criterias;
|
|
370
|
-
// }
|
|
371
|
-
//
|
|
372
|
-
// static setCriteriasValueCondition(criterias, condition) {
|
|
373
|
-
// criterias.forEach((item) => {
|
|
374
|
-
// for (let k of Object.keys(condition)) {
|
|
375
|
-
// if (k == "c_" + item.id) {
|
|
376
|
-
// item.value = condition[k]
|
|
377
|
-
// }
|
|
378
|
-
// }
|
|
379
|
-
// });
|
|
380
|
-
// return criterias;
|
|
381
|
-
// }
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
static async requestQueryData(serverKey:string,queryKey: string, pageInfo: PageInfo) {
|
|
385
|
-
let res = await Super.super({
|
|
386
|
-
url: `/v3/ltmpl/query/data`,
|
|
387
|
-
serverKey,
|
|
388
|
-
method: 'GET',
|
|
389
|
-
query:
|
|
390
|
-
{queryKey, ...pageInfo}
|
|
391
|
-
});
|
|
392
|
-
return res;
|
|
393
|
-
}
|
|
10
|
+
import { ProgramConfig } from "../index";
|
|
11
|
+
import translate from "../locale/translate";
|
|
394
12
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
13
|
+
export default class HcserviceV3 {
|
|
14
|
+
static async requestEnum(serverKey: string, mstrucIds, path: string) {
|
|
15
|
+
if (!path) {
|
|
16
|
+
return await this.requestEnumWithPath(serverKey, mstrucIds, "/enum");
|
|
17
|
+
} else {
|
|
18
|
+
return await this.requestEnumWithPath(serverKey, mstrucIds, path);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
static async requestEnumWithPath(serverKey: string, mstrucIds, path) {
|
|
23
|
+
if (mstrucIds.length > 0) {
|
|
24
|
+
let res = await Super.super({
|
|
25
|
+
url: Units.joinPath("/v3", path),
|
|
26
|
+
serverKey,
|
|
27
|
+
query: {
|
|
28
|
+
mstrucIds,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
return res.enumMap;
|
|
32
|
+
} else {
|
|
33
|
+
return {};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
static async requestOptions(serverKey: string, mstrucId) {
|
|
38
|
+
//有下拉菜单时,请求下拉选项操作
|
|
39
|
+
return await this.requestEnum(serverKey, [mstrucId], null);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
static async requestDtmplConfig(
|
|
43
|
+
serverKey: string,
|
|
44
|
+
sourceId: string,
|
|
45
|
+
code: string
|
|
46
|
+
) {
|
|
47
|
+
let url = `/v3/dtmpl/config`;
|
|
48
|
+
let res = await Super.super({
|
|
49
|
+
url,
|
|
50
|
+
serverKey,
|
|
51
|
+
method: "GET",
|
|
52
|
+
query: { sourceId, code },
|
|
53
|
+
});
|
|
54
|
+
return res.dtmplConfig;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
static async requestTtmplConfig(serverKey: string, sourceId: string) {
|
|
58
|
+
let url = `/v3/ttmpl/config`;
|
|
59
|
+
let res = await Super.super({
|
|
60
|
+
url,
|
|
61
|
+
serverKey,
|
|
62
|
+
method: "GET",
|
|
63
|
+
query: { sourceId },
|
|
64
|
+
});
|
|
65
|
+
return res.ttmplConfig;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
static async requestViewDtmplConfig(serverKey: string, sourceId: string) {
|
|
69
|
+
let url = `/v3/view-dtmpl/config`;
|
|
70
|
+
let res = await Super.super({
|
|
71
|
+
url,
|
|
72
|
+
serverKey,
|
|
73
|
+
method: "GET",
|
|
74
|
+
query: { sourceId },
|
|
75
|
+
});
|
|
76
|
+
return res.dtmplConfig;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
static async requestAddDtmplConfig(
|
|
80
|
+
serverKey: string,
|
|
81
|
+
sourceId: string,
|
|
82
|
+
addTmplId: string
|
|
83
|
+
) {
|
|
84
|
+
let url = `/v3/add-dtmpl/config`;
|
|
85
|
+
let res = await Super.super({
|
|
86
|
+
url,
|
|
87
|
+
serverKey,
|
|
88
|
+
method: "GET",
|
|
89
|
+
query: { sourceId, addTmplId },
|
|
90
|
+
});
|
|
91
|
+
return res.dtmplConfig;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
static async requestSelectConfig(serverKey: string, sourceId) {
|
|
95
|
+
let url = `/v3/select/config`;
|
|
96
|
+
let res = await Super.super({
|
|
97
|
+
url,
|
|
98
|
+
serverKey,
|
|
99
|
+
method: "GET",
|
|
100
|
+
query: { sourceId },
|
|
101
|
+
});
|
|
102
|
+
return res.selectConfig;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
static async requestLtmplConfig(serverKey: string, sourceId: string) {
|
|
106
|
+
let url = `/v3/ltmpl/config`;
|
|
107
|
+
let res = await Super.super({
|
|
108
|
+
url,
|
|
109
|
+
serverKey,
|
|
110
|
+
method: "GET",
|
|
111
|
+
query: { sourceId },
|
|
112
|
+
});
|
|
113
|
+
return res;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
static async requestL2LtmplConfig(serverKey: string, sourceId) {
|
|
117
|
+
let url = `/v3/l2/ltmpl/config`;
|
|
118
|
+
let res = await Super.super({
|
|
119
|
+
url,
|
|
120
|
+
serverKey,
|
|
121
|
+
method: "GET",
|
|
122
|
+
query: { sourceId },
|
|
123
|
+
});
|
|
124
|
+
return res;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
static async requestLtmplQueryKey(
|
|
128
|
+
serverKey: string,
|
|
129
|
+
sourceId: string,
|
|
130
|
+
condition?
|
|
131
|
+
) {
|
|
132
|
+
//console.log('condition:',condition);
|
|
133
|
+
let url = `/v3/ltmpl/query/key`;
|
|
134
|
+
let res = await Super.super({
|
|
135
|
+
url: url,
|
|
136
|
+
serverKey,
|
|
137
|
+
method: "GET",
|
|
138
|
+
query: { ...condition, sourceId },
|
|
139
|
+
});
|
|
140
|
+
return res;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
static async requestLtmplQueryTop(
|
|
144
|
+
serverKey: string,
|
|
145
|
+
sourceId: string,
|
|
146
|
+
condition
|
|
147
|
+
) {
|
|
148
|
+
// console.log('condition:',condition);
|
|
149
|
+
let url = `/v3/ltmpl/top-data`;
|
|
150
|
+
return await this.requestCommonLtmplQueryTop(
|
|
151
|
+
serverKey,
|
|
152
|
+
sourceId,
|
|
153
|
+
condition,
|
|
154
|
+
url
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
static async requestTtmplRootData(
|
|
159
|
+
serverKey: string,
|
|
160
|
+
sourceId: string,
|
|
161
|
+
condition
|
|
162
|
+
) {
|
|
163
|
+
let url = `/v3/ttmpl/root-data`;
|
|
164
|
+
return await this.requestCommonLtmplQueryTop(
|
|
165
|
+
serverKey,
|
|
166
|
+
sourceId,
|
|
167
|
+
condition,
|
|
168
|
+
url
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
static async requestMstrucLtmplQueryTop(
|
|
173
|
+
serverKey: string,
|
|
174
|
+
sourceId: string,
|
|
175
|
+
condition
|
|
176
|
+
) {
|
|
177
|
+
//console.log('condition:',condition);
|
|
178
|
+
let url = `/v3/mstruc/ltmpl/top-data`;
|
|
179
|
+
return await this.requestCommonLtmplQueryTop(
|
|
180
|
+
serverKey,
|
|
181
|
+
sourceId,
|
|
182
|
+
condition,
|
|
183
|
+
url
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
static async queryTop1(serverKey: string, sourceId: string) {
|
|
188
|
+
let data = await this.requestMstrucLtmplQueryTop(serverKey, sourceId, {
|
|
189
|
+
top: 1,
|
|
190
|
+
});
|
|
191
|
+
let queriedCode = null;
|
|
192
|
+
if (data && data.entities && data.entities[0]) {
|
|
193
|
+
queriedCode = data.entities[0].code;
|
|
194
|
+
}
|
|
195
|
+
return queriedCode;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
static async requestCommonLtmplQueryTop(
|
|
199
|
+
serverKey: string,
|
|
200
|
+
sourceId: string,
|
|
201
|
+
condition,
|
|
202
|
+
url
|
|
203
|
+
) {
|
|
204
|
+
if (!sourceId) {
|
|
205
|
+
message.error("SourceId is undefined!");
|
|
206
|
+
} else {
|
|
207
|
+
let res = await Super.super({
|
|
208
|
+
url: url,
|
|
209
|
+
serverKey,
|
|
210
|
+
method: "GET",
|
|
211
|
+
query: { ...condition, sourceId },
|
|
212
|
+
});
|
|
213
|
+
return res;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
static async requestSelectedData(serverKey: string, sourceId: string, codes) {
|
|
218
|
+
if (!codes) {
|
|
219
|
+
message.warning(translate("${没有选择实体}"));
|
|
220
|
+
return null;
|
|
221
|
+
}
|
|
222
|
+
let url = `/v3/field-group/data/selected`;
|
|
223
|
+
|
|
224
|
+
let res = await Super.super({
|
|
225
|
+
url: url,
|
|
226
|
+
serverKey,
|
|
227
|
+
query: { codes, sourceId },
|
|
228
|
+
method: "GET",
|
|
229
|
+
});
|
|
230
|
+
if (res.status === "success") {
|
|
231
|
+
return res.entities;
|
|
232
|
+
} else {
|
|
233
|
+
message.error(translate("${没有找到实体}!"));
|
|
234
|
+
return null;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
static async requestVersionList(serverKey: string, sourceId: string, code) {
|
|
239
|
+
let res = await Super.super({
|
|
240
|
+
url: `/v3/dtmpl/data/versions`,
|
|
241
|
+
serverKey,
|
|
242
|
+
query: {
|
|
243
|
+
pageNo: 1,
|
|
244
|
+
sourceId,
|
|
245
|
+
code,
|
|
246
|
+
},
|
|
247
|
+
method: "GET",
|
|
248
|
+
});
|
|
249
|
+
return res.versions;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
static async requestCommonDtmplData(
|
|
253
|
+
serverKey: string,
|
|
254
|
+
sourceId: string,
|
|
255
|
+
code,
|
|
256
|
+
versionId,
|
|
257
|
+
url
|
|
258
|
+
) {
|
|
259
|
+
// if(sourceId=="user"){
|
|
260
|
+
// return this.requestUserDtmplData();
|
|
458
261
|
// }
|
|
459
262
|
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
263
|
+
let res = await Super.super({
|
|
264
|
+
url,
|
|
265
|
+
serverKey,
|
|
266
|
+
query: {
|
|
267
|
+
code,
|
|
268
|
+
versionId,
|
|
269
|
+
sourceId,
|
|
270
|
+
},
|
|
271
|
+
method: "GET",
|
|
272
|
+
});
|
|
273
|
+
if (res.status === "success") {
|
|
274
|
+
return res.entity;
|
|
275
|
+
} else {
|
|
276
|
+
message.error(translate("${实体不存在}!"));
|
|
277
|
+
return null;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
static async requestDtmplData(
|
|
282
|
+
serverKey: string,
|
|
283
|
+
sourceId: string,
|
|
284
|
+
code,
|
|
285
|
+
versionId
|
|
286
|
+
) {
|
|
287
|
+
let url = `/v3/dtmpl/data`;
|
|
288
|
+
return await this.requestCommonDtmplData(
|
|
289
|
+
serverKey,
|
|
290
|
+
sourceId,
|
|
291
|
+
code,
|
|
292
|
+
versionId,
|
|
293
|
+
url
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
static async getDtmplData(
|
|
298
|
+
dtmplConfig: DtmplConfig,
|
|
299
|
+
serverKey: string,
|
|
300
|
+
sourceId: string,
|
|
301
|
+
code
|
|
302
|
+
) {
|
|
303
|
+
let dtmplData_;
|
|
304
|
+
if (dtmplConfig && dtmplConfig.dynamic) {
|
|
305
|
+
dtmplData_ = dtmplConfig.entity;
|
|
306
|
+
}
|
|
307
|
+
if (!dtmplData_) {
|
|
308
|
+
dtmplData_ = await this.requestDtmplData(serverKey, sourceId, code, null);
|
|
309
|
+
}
|
|
310
|
+
return dtmplData_;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
static async requestMstrucDtmplData(
|
|
314
|
+
serverKey: string,
|
|
315
|
+
sourceId: string,
|
|
316
|
+
code,
|
|
317
|
+
versionId
|
|
318
|
+
) {
|
|
319
|
+
let url = `/v3/mstruc/dtmpl/data`;
|
|
320
|
+
return await this.requestCommonDtmplData(
|
|
321
|
+
serverKey,
|
|
322
|
+
sourceId,
|
|
323
|
+
code,
|
|
324
|
+
versionId,
|
|
325
|
+
url
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
static async requestViewDtmplData(
|
|
330
|
+
serverKey: string,
|
|
331
|
+
sourceId: string,
|
|
332
|
+
code,
|
|
333
|
+
versionId
|
|
334
|
+
) {
|
|
335
|
+
let url = `/v3/view-dtmpl/data`;
|
|
336
|
+
return await this.requestCommonDtmplData(
|
|
337
|
+
serverKey,
|
|
338
|
+
sourceId,
|
|
339
|
+
code,
|
|
340
|
+
versionId,
|
|
341
|
+
url
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
static async requestMstrucViewDtmplData(
|
|
346
|
+
serverKey: string,
|
|
347
|
+
sourceId,
|
|
348
|
+
code,
|
|
349
|
+
versionId
|
|
350
|
+
) {
|
|
351
|
+
let url = `/v3/mstruc/view-dtmpl/data`;
|
|
352
|
+
return await this.requestCommonDtmplData(
|
|
353
|
+
serverKey,
|
|
354
|
+
sourceId,
|
|
355
|
+
code,
|
|
356
|
+
versionId,
|
|
357
|
+
url
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
static async postCommonDtmplData(
|
|
362
|
+
serverKey: string,
|
|
363
|
+
sourceId: string,
|
|
364
|
+
formDataObj,
|
|
365
|
+
message,
|
|
366
|
+
url
|
|
367
|
+
) {
|
|
368
|
+
const formData = new FormData();
|
|
369
|
+
for (let k in formDataObj) {
|
|
370
|
+
if (!k.startsWith("$virtual")) {
|
|
371
|
+
formData.append(
|
|
372
|
+
k,
|
|
373
|
+
formDataObj[k] || formDataObj[k] == 0 ? formDataObj[k] : ""
|
|
374
|
+
);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
formData.append("sourceId", sourceId.toString());
|
|
378
|
+
let res = await Super.super(
|
|
379
|
+
{
|
|
380
|
+
url,
|
|
381
|
+
serverKey,
|
|
382
|
+
data: formData,
|
|
383
|
+
method: "POST",
|
|
384
|
+
},
|
|
385
|
+
"formdata"
|
|
386
|
+
);
|
|
387
|
+
let code = null;
|
|
388
|
+
if (res) {
|
|
389
|
+
if (res.status === "success") {
|
|
390
|
+
if (message) {
|
|
391
|
+
if (res.message) {
|
|
392
|
+
message.warning(translate("${保存成功}!") + res.message, 4);
|
|
393
|
+
} else {
|
|
394
|
+
message.success(translate("${保存成功}!"), 1);
|
|
395
|
+
}
|
|
465
396
|
}
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
397
|
+
code = res.entityCode ? res.entityCode : res.code;
|
|
398
|
+
}
|
|
399
|
+
// else {
|
|
400
|
+
// if (message) {
|
|
401
|
+
// message.error("保存失败");
|
|
402
|
+
// }
|
|
403
|
+
// }
|
|
404
|
+
} else {
|
|
405
|
+
if (message) {
|
|
406
|
+
message.error(translate("${保存失败}!"));
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
return { code, status: res ? res.status : "error" };
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
static async postDtmplData(
|
|
413
|
+
serverKey: string,
|
|
414
|
+
sourceId: string,
|
|
415
|
+
formDataObj,
|
|
416
|
+
message
|
|
417
|
+
) {
|
|
418
|
+
let url = `/v3/dtmpl/data`;
|
|
419
|
+
return await this.postCommonDtmplData(
|
|
420
|
+
serverKey,
|
|
421
|
+
sourceId,
|
|
422
|
+
formDataObj,
|
|
423
|
+
message,
|
|
424
|
+
url
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
static async postMstrucDtmplData(
|
|
429
|
+
serverKey: string,
|
|
430
|
+
sourceId: string,
|
|
431
|
+
formDataObj,
|
|
432
|
+
message
|
|
433
|
+
) {
|
|
434
|
+
let url = `/v3/mstruc/dtmpl/data`;
|
|
435
|
+
return await this.postCommonDtmplData(
|
|
436
|
+
serverKey,
|
|
437
|
+
sourceId,
|
|
438
|
+
formDataObj,
|
|
439
|
+
message,
|
|
440
|
+
url
|
|
441
|
+
);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
static postFileAction(serverKey: string, file) {
|
|
445
|
+
return Units.joinPath(Units.api(serverKey), "/v3/upload");
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
// static async postFile(formData, message) {
|
|
449
|
+
// let res = await Super.super({
|
|
450
|
+
// url: `/v3/upload`,
|
|
451
|
+
// data: formData,
|
|
452
|
+
// method: 'POST'
|
|
453
|
+
// }, 'formdata')
|
|
454
|
+
// let fileKey = null;
|
|
455
|
+
// if (res) {
|
|
456
|
+
// if (res.status === "success") {
|
|
457
|
+
// if (message) {
|
|
458
|
+
// message.success("上传成功! ")
|
|
459
|
+
// }
|
|
460
|
+
// fileKey = res.fileKey;
|
|
461
|
+
// }
|
|
462
|
+
// } else {
|
|
463
|
+
// if (message) {
|
|
464
|
+
// message.error("上传失败!");
|
|
465
|
+
// }
|
|
466
|
+
// }
|
|
467
|
+
// return fileKey;
|
|
468
|
+
// }
|
|
469
|
+
|
|
470
|
+
static async requestL2LtmplQueryKey(serverKey: string, sourceId, condition) {
|
|
471
|
+
let url = `v3/l2/ltmpl/query/key`;
|
|
472
|
+
let res = await Super.super({
|
|
473
|
+
url,
|
|
474
|
+
serverKey,
|
|
475
|
+
method: "GET",
|
|
476
|
+
query: { ...condition, sourceId },
|
|
477
|
+
});
|
|
478
|
+
return res;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
static async requestLtmplCount(serverKey: string, sourceId) {
|
|
482
|
+
let url = `/v3/ltmpl/data/count`;
|
|
483
|
+
let res = await Super.super({
|
|
484
|
+
url,
|
|
485
|
+
serverKey,
|
|
486
|
+
query: { sourceId },
|
|
487
|
+
method: "GET",
|
|
488
|
+
});
|
|
489
|
+
return res.count;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
// static setCriteriasValue(criterias, criteriaValueMap) {
|
|
493
|
+
// criterias.forEach((item) => {
|
|
494
|
+
// for (let k in criteriaValueMap) {
|
|
495
|
+
// if (k === item.id) {
|
|
496
|
+
// item.value = criteriaValueMap[k]
|
|
497
|
+
// }
|
|
498
|
+
// }
|
|
499
|
+
// });
|
|
500
|
+
// return criterias;
|
|
501
|
+
// }
|
|
502
|
+
//
|
|
503
|
+
// static setCriteriasValueCondition(criterias, condition) {
|
|
504
|
+
// criterias.forEach((item) => {
|
|
505
|
+
// for (let k of Object.keys(condition)) {
|
|
506
|
+
// if (k == "c_" + item.id) {
|
|
507
|
+
// item.value = condition[k]
|
|
508
|
+
// }
|
|
509
|
+
// }
|
|
510
|
+
// });
|
|
511
|
+
// return criterias;
|
|
512
|
+
// }
|
|
513
|
+
|
|
514
|
+
static async requestQueryData(
|
|
515
|
+
serverKey: string,
|
|
516
|
+
queryKey: string,
|
|
517
|
+
pageInfo: PageInfo
|
|
518
|
+
) {
|
|
519
|
+
let res = await Super.super({
|
|
520
|
+
url: `/v3/ltmpl/query/data`,
|
|
521
|
+
serverKey,
|
|
522
|
+
method: "GET",
|
|
523
|
+
query: { queryKey, ...pageInfo },
|
|
524
|
+
});
|
|
525
|
+
return res;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
static getCodesOfSelectedRows(selectedRows: SelectedRow[]) {
|
|
529
|
+
let codes: string[] = [];
|
|
530
|
+
if (!selectedRows || selectedRows.length < 1) {
|
|
531
|
+
return;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
for (let item of selectedRows) {
|
|
535
|
+
if (item.code) {
|
|
536
|
+
codes.push(item.code);
|
|
537
|
+
} else {
|
|
538
|
+
message.error(translate("${没找到所选数据的Code}!!"));
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
if (codes.length < 1) {
|
|
543
|
+
message.error(translate("${没找到所选数据的Code}!!"));
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
return codes;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
static async deleteData(
|
|
550
|
+
serverKey: string,
|
|
551
|
+
sourceId,
|
|
552
|
+
selectedRows: SelectedRow[]
|
|
553
|
+
) {
|
|
554
|
+
const codes = this.getCodesOfSelectedRows(selectedRows);
|
|
555
|
+
return await this.deleteByCode(serverKey, sourceId, codes);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
static async deleteByCode(serverKey: string, sourceId, codes: string[]) {
|
|
559
|
+
let res = await Super.super({
|
|
560
|
+
url: `/v3/ltmpl/data`,
|
|
561
|
+
serverKey,
|
|
562
|
+
data: {
|
|
563
|
+
codes,
|
|
564
|
+
sourceId,
|
|
565
|
+
},
|
|
566
|
+
method: "DELETE",
|
|
567
|
+
});
|
|
568
|
+
if (res.status == "success") {
|
|
569
|
+
message.success(translate("${删除成功}"), 1);
|
|
570
|
+
return true;
|
|
571
|
+
} else {
|
|
572
|
+
message.error(translate("${删除成功}"));
|
|
573
|
+
//console.log("删除失败消息",res.message);
|
|
574
|
+
return false;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
static async requestQueryCount(serverKey: string, queryKey: string) {
|
|
579
|
+
let res = await Super.super({
|
|
580
|
+
url: `/v3/ltmpl/query/count`,
|
|
581
|
+
serverKey,
|
|
582
|
+
method: "GET",
|
|
583
|
+
query: { queryKey },
|
|
584
|
+
});
|
|
585
|
+
return res.count;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
// static async requestFile(path) {
|
|
589
|
+
// let res = await Super.super({
|
|
590
|
+
// url: Units.joinPath("/v3/files/", path),
|
|
591
|
+
// method: "GET"
|
|
592
|
+
// });
|
|
593
|
+
// return res;
|
|
594
|
+
// }
|
|
595
|
+
|
|
596
|
+
static async postActions(
|
|
597
|
+
serverKey: string,
|
|
598
|
+
actionId: string,
|
|
599
|
+
selectedRows: SelectedRow[],
|
|
600
|
+
actionDataObj?: Object
|
|
601
|
+
) {
|
|
602
|
+
const codes = this.getCodesOfSelectedRows(selectedRows);
|
|
603
|
+
const formData = new FormData();
|
|
604
|
+
for (let k in actionDataObj) {
|
|
605
|
+
formData.append(k, actionDataObj[k] ? actionDataObj[k] : "");
|
|
606
|
+
}
|
|
607
|
+
formData.append("sourceId", actionId.toString());
|
|
608
|
+
formData.append("codes", codes.join(","));
|
|
609
|
+
let res = await Super.super(
|
|
610
|
+
{
|
|
611
|
+
url: `/v3/action`,
|
|
612
|
+
serverKey,
|
|
613
|
+
data: formData,
|
|
614
|
+
method: "POST",
|
|
615
|
+
},
|
|
616
|
+
"formdata",
|
|
617
|
+
null
|
|
618
|
+
);
|
|
619
|
+
return res;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
// static async postJumps(jumpId, code: string,sourceId:string) {
|
|
623
|
+
// let res = await Super.super({
|
|
624
|
+
// url: `/v3/jump`,
|
|
625
|
+
// query: {
|
|
626
|
+
// code,
|
|
627
|
+
// sourceId: jumpId,
|
|
628
|
+
// },
|
|
629
|
+
// method: "GET",
|
|
630
|
+
// },null,null,sourceId);
|
|
631
|
+
// return res;
|
|
632
|
+
// }
|
|
633
|
+
|
|
634
|
+
static async increCalc(serverKey: string, sourceId: string, params = {}) {
|
|
635
|
+
let res = await Super.super({
|
|
636
|
+
url: `/v3/stat/increcalc`,
|
|
637
|
+
serverKey,
|
|
638
|
+
method: "POST",
|
|
639
|
+
data: { ...params, sourceId },
|
|
640
|
+
});
|
|
641
|
+
if (res.status === "success") {
|
|
642
|
+
message.success(translate("${统计成功}"), 1);
|
|
643
|
+
} else {
|
|
644
|
+
message.error(translate("${统计失败}"));
|
|
645
|
+
}
|
|
646
|
+
return res;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
static async doCopy(
|
|
650
|
+
serverKey: string,
|
|
651
|
+
sourceId: string,
|
|
652
|
+
code: string,
|
|
653
|
+
copyRelation?,
|
|
654
|
+
copyOpp2One?
|
|
655
|
+
) {
|
|
656
|
+
let res = await Super.super(
|
|
657
|
+
{
|
|
658
|
+
url: `/v3/mstruc/copy-data`,
|
|
659
|
+
serverKey,
|
|
660
|
+
method: "POST",
|
|
661
|
+
query: {
|
|
662
|
+
sourceId,
|
|
663
|
+
code,
|
|
664
|
+
copyRelation,
|
|
665
|
+
copyOpp2One,
|
|
666
|
+
},
|
|
667
|
+
},
|
|
668
|
+
null,
|
|
669
|
+
null
|
|
670
|
+
);
|
|
671
|
+
if (res.status == "success") {
|
|
672
|
+
if (res.message) {
|
|
673
|
+
message.info("提示信息:" + res.message, 4);
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
return res.entityCode;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
// static downloadDetailExcel(sourceId, entityCode) {
|
|
680
|
+
// const hydrocarbonToken = Units.hydrocarbonToken();
|
|
681
|
+
// let url = Units.joinPath(Units.api(), `/v3/dtmpl/excel`)+`?sourceId=${sourceId}&code=${entityCode}&@token=${hydrocarbonToken}&@programToken=${Units.programCode()}`;
|
|
682
|
+
// Units.downloadFile(url, "详情");
|
|
683
|
+
// }
|
|
684
|
+
|
|
685
|
+
static async queryCode(
|
|
686
|
+
sourceId: string,
|
|
687
|
+
codeSource: CodeSource,
|
|
688
|
+
serverKey?: string
|
|
689
|
+
) {
|
|
690
|
+
let queriedCode = undefined;
|
|
691
|
+
if (codeSource) {
|
|
692
|
+
if (codeSource == "listop") {
|
|
693
|
+
queriedCode = await this.queryTop1(serverKey, sourceId);
|
|
694
|
+
if (!queriedCode) {
|
|
695
|
+
queriedCode = "bad-code";
|
|
500
696
|
}
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
697
|
+
} else if (codeSource == "listop-new") {
|
|
698
|
+
queriedCode = await this.queryTop1(serverKey, sourceId);
|
|
699
|
+
} else if (codeSource == "new") {
|
|
700
|
+
queriedCode = null;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
return queriedCode;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
static download(serverKey: string, path) {
|
|
707
|
+
let vars = path.split("/");
|
|
708
|
+
let fileName = vars[vars.length - 1];
|
|
709
|
+
Units.downloadFile(
|
|
710
|
+
this.getFileUrl(serverKey, path) + `&disposition=attachment`,
|
|
711
|
+
fileName
|
|
712
|
+
);
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
static openfile(serverKey: string, path, toolbar) {
|
|
716
|
+
let vars = path.split("/");
|
|
717
|
+
let fileName = vars[vars.length - 1];
|
|
718
|
+
Units.openFile(this.getFileUrl(serverKey, path), fileName, toolbar);
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
static getFileUrl(serverKey: string, path) {
|
|
722
|
+
const hydrocarbonToken = Units.hydrocarbonToken();
|
|
723
|
+
let url =
|
|
724
|
+
Units.joinPath(Units.api(serverKey), Units.joinPath("/v3/files", path)) +
|
|
725
|
+
`?@token=${hydrocarbonToken}&@programToken=${Units.programCode()}`;
|
|
726
|
+
return url;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
static getFileTxtUrl(serverKey: string, path) {
|
|
730
|
+
const hydrocarbonToken = Units.hydrocarbonToken();
|
|
731
|
+
let url =
|
|
732
|
+
Units.joinPath(
|
|
733
|
+
Units.api(serverKey),
|
|
734
|
+
Units.joinPath("/v3/files/text", path)
|
|
735
|
+
) + `?@token=${hydrocarbonToken}&@programToken=${Units.programCode()}`;
|
|
736
|
+
return url;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
static async loadFileTxt(serverKey: string, path) {
|
|
740
|
+
let res = await Super.super({
|
|
741
|
+
url: Units.joinPath("/v3/files/text", path),
|
|
742
|
+
serverKey,
|
|
743
|
+
method: "GET",
|
|
744
|
+
});
|
|
745
|
+
return res.text;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
// static async requestFaceplate_menu() {
|
|
749
|
+
// let url = `/v3/menu/faceplate`
|
|
750
|
+
// let res = await Super.super({
|
|
751
|
+
// url: url,
|
|
752
|
+
// method: "GET",
|
|
753
|
+
// });
|
|
754
|
+
// return res.l2Menus;
|
|
755
|
+
// }
|
|
756
|
+
|
|
757
|
+
// static async requestFaceplateStatistic_menu() {
|
|
758
|
+
// let url = `/v3/menu/faceplate-statistic`
|
|
759
|
+
// let res = await Super.super({
|
|
760
|
+
// url: url,
|
|
761
|
+
// method: "GET",
|
|
762
|
+
// });
|
|
763
|
+
// return res.l2Menus;
|
|
764
|
+
// }
|
|
765
|
+
|
|
766
|
+
static async requestBlocks(l2MenuId: string, blockId: string) {
|
|
767
|
+
let url = `/v3/menu/blocks`;
|
|
768
|
+
let res = await Super.super({
|
|
769
|
+
url: url,
|
|
770
|
+
method: "GET",
|
|
771
|
+
query: {
|
|
772
|
+
l2MenuId,
|
|
773
|
+
blockId,
|
|
774
|
+
},
|
|
775
|
+
});
|
|
776
|
+
return res;
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
static async logout() {
|
|
780
|
+
Super.super({
|
|
781
|
+
url: "/v3/auth/token",
|
|
782
|
+
method: "DELETE",
|
|
783
|
+
}).then((res) => {
|
|
784
|
+
Units.toLogin();
|
|
785
|
+
});
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
static async resetPassword(
|
|
789
|
+
serverKey: string,
|
|
790
|
+
oPassword: string,
|
|
791
|
+
nPassword: string,
|
|
792
|
+
pubkey
|
|
793
|
+
) {
|
|
794
|
+
let oldPassword = EncryptUtils.rsaEncrypt(oPassword, pubkey);
|
|
795
|
+
let newPassword = EncryptUtils.rsaEncrypt(nPassword, pubkey);
|
|
796
|
+
let res = await Super.super({
|
|
797
|
+
url: "/v3/auth/password",
|
|
798
|
+
serverKey,
|
|
799
|
+
query: {
|
|
800
|
+
oldPassword,
|
|
801
|
+
newPassword,
|
|
802
|
+
},
|
|
803
|
+
method: "POST",
|
|
804
|
+
});
|
|
805
|
+
|
|
806
|
+
return res;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
static async getContextSourceConfig() {
|
|
810
|
+
let res = await Super.super({
|
|
811
|
+
url: "/v3/context-source-config",
|
|
812
|
+
method: "GET",
|
|
813
|
+
});
|
|
814
|
+
if (res) {
|
|
815
|
+
return res.config;
|
|
816
|
+
} else {
|
|
817
|
+
return null;
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
static async getContextSourceValue() {
|
|
822
|
+
let res = await Super.super({
|
|
823
|
+
url: "/v3/auth/context-source-value",
|
|
824
|
+
method: "GET",
|
|
825
|
+
});
|
|
826
|
+
return res ? res.value : null;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
static async login(
|
|
830
|
+
json,
|
|
831
|
+
kaptchaToken,
|
|
832
|
+
kaptchaText,
|
|
833
|
+
pubkey,
|
|
834
|
+
programCode?: string
|
|
835
|
+
) {
|
|
836
|
+
let datetime = dayjs(new Date())
|
|
837
|
+
.tz("Europe/London")
|
|
838
|
+
.format("YYYY-MM-DD HH:mm:ss");
|
|
839
|
+
json["datetime"] = datetime;
|
|
840
|
+
|
|
841
|
+
let userInfo = EncryptUtils.rsaEncrypt(JSON.stringify(json), pubkey);
|
|
842
|
+
|
|
843
|
+
let res = await Super.super({
|
|
844
|
+
url: "/v3/auth/hctoken",
|
|
845
|
+
header: { programCode },
|
|
846
|
+
query: {
|
|
847
|
+
userInfo,
|
|
848
|
+
kaptchaToken,
|
|
849
|
+
kaptchaText,
|
|
850
|
+
},
|
|
851
|
+
method: "GET",
|
|
852
|
+
});
|
|
853
|
+
// if (res.status === 'success') {
|
|
854
|
+
// successHandle(res.token);
|
|
526
855
|
// }
|
|
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
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
static async getContextSourceValue() {
|
|
648
|
-
let res = await Super.super({
|
|
649
|
-
url: '/v3/auth/context-source-value',
|
|
650
|
-
method: "GET"
|
|
651
|
-
})
|
|
652
|
-
return res?res.value:null;
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
static async login(json, kaptchaToken, kaptchaText, pubkey,programCode?:string) {
|
|
656
|
-
|
|
657
|
-
let datetime = format(new Date()).format("YYYY-MM-DD HH:mm:ss")
|
|
658
|
-
json['datetime'] = datetime;
|
|
659
|
-
|
|
660
|
-
let userInfo = EncryptUtils.rsaEncrypt(JSON.stringify(json), pubkey);
|
|
661
|
-
|
|
662
|
-
let res = await Super.super({
|
|
663
|
-
url: '/v3/auth/hctoken',
|
|
664
|
-
header:{programCode},
|
|
665
|
-
query: {
|
|
666
|
-
userInfo, kaptchaToken, kaptchaText
|
|
667
|
-
},
|
|
668
|
-
method: "GET"
|
|
669
|
-
})
|
|
670
|
-
// if (res.status === 'success') {
|
|
671
|
-
// successHandle(res.token);
|
|
672
|
-
// }
|
|
673
|
-
return res;
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
static async setContext(json) {
|
|
677
|
-
const formData = new FormData();
|
|
678
|
-
formData.append("context", JSON.stringify(json));
|
|
679
|
-
let res = await Super.super({
|
|
680
|
-
url: '/v3/auth/context',
|
|
681
|
-
data: formData,
|
|
682
|
-
method: 'POST'
|
|
683
|
-
}, 'formdata')
|
|
684
|
-
|
|
685
|
-
if (res.status === 'success') {
|
|
686
|
-
window.location.hash = "#/home";
|
|
687
|
-
}
|
|
688
|
-
return res;
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
static async getKaptchaToken(programCode?:string) {
|
|
692
|
-
let res = await Super.super({
|
|
693
|
-
url: '/v3/auth/kaptcha',
|
|
694
|
-
header:{programCode},
|
|
695
|
-
method: "POST"
|
|
696
|
-
})
|
|
697
|
-
if (res.status === 'success') {
|
|
698
|
-
return res
|
|
699
|
-
} else {
|
|
700
|
-
return null;
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
static async getRasPubkey(serverKey?:string,programCode?:string) {
|
|
705
|
-
let res = await Super.super({
|
|
706
|
-
url: '/v3/auth/ras-pubkey',
|
|
707
|
-
header:{programCode},
|
|
708
|
-
serverKey,
|
|
709
|
-
method: "GET"
|
|
710
|
-
})
|
|
711
|
-
if (res.status === 'success') {
|
|
712
|
-
return res.rasPubkey;
|
|
856
|
+
return res;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
static async setContext(json) {
|
|
860
|
+
const formData = new FormData();
|
|
861
|
+
formData.append("context", JSON.stringify(json));
|
|
862
|
+
let res = await Super.super(
|
|
863
|
+
{
|
|
864
|
+
url: "/v3/auth/context",
|
|
865
|
+
data: formData,
|
|
866
|
+
method: "POST",
|
|
867
|
+
},
|
|
868
|
+
"formdata"
|
|
869
|
+
);
|
|
870
|
+
|
|
871
|
+
if (res.status === "success") {
|
|
872
|
+
window.location.hash = "#/home";
|
|
873
|
+
}
|
|
874
|
+
return res;
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
static async getKaptchaToken(programCode?: string) {
|
|
878
|
+
let res = await Super.super({
|
|
879
|
+
url: "/v3/auth/kaptcha",
|
|
880
|
+
header: { programCode },
|
|
881
|
+
method: "POST",
|
|
882
|
+
});
|
|
883
|
+
if (res.status === "success") {
|
|
884
|
+
return res;
|
|
885
|
+
} else {
|
|
886
|
+
return null;
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
static async getRasPubkey(serverKey?: string, programCode?: string) {
|
|
891
|
+
let res = await Super.super({
|
|
892
|
+
url: "/v3/auth/ras-pubkey",
|
|
893
|
+
header: { programCode },
|
|
894
|
+
serverKey,
|
|
895
|
+
method: "GET",
|
|
896
|
+
});
|
|
897
|
+
if (res.status === "success") {
|
|
898
|
+
return res.rasPubkey;
|
|
899
|
+
} else {
|
|
900
|
+
return null;
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
static async getUser(programCode?: string, hydrocarbonToken?: string) {
|
|
905
|
+
let res = await Super.super({
|
|
906
|
+
header: { programCode, hydrocarbonToken },
|
|
907
|
+
url: "/v3/current-user",
|
|
908
|
+
});
|
|
909
|
+
return res ? res.user : null;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
// static async requestMessagebar() {
|
|
913
|
+
// let url = `/v3/menu/messagebar`
|
|
914
|
+
// let res = await Super.super({
|
|
915
|
+
// url: url,
|
|
916
|
+
// method: "GET",
|
|
917
|
+
// })
|
|
918
|
+
// return res.l2Menus;
|
|
919
|
+
// }
|
|
920
|
+
|
|
921
|
+
// static async requestSimpleCharts() {
|
|
922
|
+
// let url = `/v3/menu/simple-charts`
|
|
923
|
+
// let res = await Super.super({
|
|
924
|
+
// url: url,
|
|
925
|
+
// method: "GET",
|
|
926
|
+
// })
|
|
927
|
+
// return res.l2Menus;
|
|
928
|
+
// }
|
|
929
|
+
|
|
930
|
+
static async requestFastMenu() {
|
|
931
|
+
let url = `/v3/menu/fast-menu`;
|
|
932
|
+
let res = await Super.super({
|
|
933
|
+
url: url,
|
|
934
|
+
method: "GET",
|
|
935
|
+
});
|
|
936
|
+
return res ? res.fastMenu : null;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
static async reload() {
|
|
940
|
+
let url = `/v3/tmpl/reload`;
|
|
941
|
+
let res = await Super.super({
|
|
942
|
+
url: url,
|
|
943
|
+
method: "GET",
|
|
944
|
+
});
|
|
945
|
+
return res;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
static async getLocale(lang) {
|
|
949
|
+
let url = "/v3/multilingual";
|
|
950
|
+
let res = await Super.super({
|
|
951
|
+
url: `${url}?language=${lang}`,
|
|
952
|
+
method: "GET",
|
|
953
|
+
});
|
|
954
|
+
return res;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
static async initProgramConfig(ProgramConfigJson) {
|
|
958
|
+
//设置项目配置信息
|
|
959
|
+
if (ProgramConfigJson["programCode"]) {
|
|
960
|
+
ProgramConfig.setProgramCode(ProgramConfigJson["programCode"]);
|
|
961
|
+
}
|
|
962
|
+
if (ProgramConfigJson["hydrocarbonServer"]) {
|
|
963
|
+
ProgramConfig.setHydrocarbonServer(
|
|
964
|
+
ProgramConfigJson["hydrocarbonServer"]
|
|
965
|
+
);
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
//注册扩展服务器
|
|
969
|
+
if (ProgramConfigJson["extendServer"]) {
|
|
970
|
+
let extend = ProgramConfigJson["extendServer"];
|
|
971
|
+
if (typeof extend == "object") {
|
|
972
|
+
let extendServers = [];
|
|
973
|
+
if (Array.isArray(extend)) {
|
|
974
|
+
extendServers = extend;
|
|
713
975
|
} else {
|
|
714
|
-
|
|
976
|
+
extendServers.push(extend);
|
|
715
977
|
}
|
|
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
|
-
// return res.l2Menus;
|
|
742
|
-
// }
|
|
743
|
-
|
|
744
|
-
static async requestFastMenu() {
|
|
745
|
-
let url = `/v3/menu/fast-menu`
|
|
746
|
-
let res = await Super.super({
|
|
747
|
-
url: url,
|
|
748
|
-
method: "GET",
|
|
749
|
-
})
|
|
750
|
-
return res?res.fastMenu:null;
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
static async reload() {
|
|
754
|
-
let url = `/v3/tmpl/reload`
|
|
755
|
-
let res = await Super.super({
|
|
756
|
-
url: url,
|
|
757
|
-
method: "GET",
|
|
758
|
-
});
|
|
759
|
-
return res;
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
static async initProgramConfig(ProgramConfigJson) {
|
|
765
|
-
//设置项目配置信息
|
|
766
|
-
if (ProgramConfigJson['programCode']) {
|
|
767
|
-
ProgramConfig.setProgramCode(ProgramConfigJson['programCode']);
|
|
768
|
-
}
|
|
769
|
-
if (ProgramConfigJson['hydrocarbonServer']) {
|
|
770
|
-
ProgramConfig.setHydrocarbonServer(ProgramConfigJson['hydrocarbonServer']);
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
//注册扩展服务器
|
|
774
|
-
if(ProgramConfigJson['extendServer']){
|
|
775
|
-
let extend=ProgramConfigJson['extendServer'];
|
|
776
|
-
if( typeof extend=="object" ){
|
|
777
|
-
let extendServers=[];
|
|
778
|
-
if(Array.isArray(extend)){
|
|
779
|
-
extendServers=extend;
|
|
780
|
-
}else{
|
|
781
|
-
extendServers.push(extend);
|
|
782
|
-
}
|
|
783
|
-
ProgramConfig.putExtendServers(extendServers);
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
ProgramConfig.setProgramName(ProgramConfigJson['programName'])
|
|
788
|
-
ProgramConfig.setProgramName_sub(ProgramConfigJson['programName_sub'])
|
|
789
|
-
ProgramConfig.setProgramName_NavLeft(ProgramConfigJson['programName_NavLeft'])
|
|
790
|
-
ProgramConfig.setProgramName_Logo(ProgramConfigJson['programName_Logo']);
|
|
791
|
-
|
|
792
|
-
let result = await Super.getProramConfig();
|
|
793
|
-
|
|
794
|
-
if(result){
|
|
795
|
-
//console.log('result',result)
|
|
796
|
-
//先放入programCode
|
|
797
|
-
ProgramConfig.setProgramCode(result.programCode);
|
|
798
|
-
ProgramConfig.setHydrocarbonServer(result.hydrocarbonServer);
|
|
799
|
-
ProgramConfig.setProgramName(result.programName)
|
|
800
|
-
ProgramConfig.setProgramName_sub(result.programName_NavLeft)
|
|
801
|
-
ProgramConfig.setProgramName_NavLeft(result.programName_NavLeft)
|
|
802
|
-
ProgramConfig.setProgramName_Logo(result.programName_Logo);
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
}
|
|
978
|
+
ProgramConfig.putExtendServers(extendServers);
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
ProgramConfig.setProgramName(ProgramConfigJson["programName"]);
|
|
983
|
+
ProgramConfig.setProgramName_sub(ProgramConfigJson["programName_sub"]);
|
|
984
|
+
ProgramConfig.setProgramName_NavLeft(
|
|
985
|
+
ProgramConfigJson["programName_NavLeft"]
|
|
986
|
+
);
|
|
987
|
+
ProgramConfig.setProgramName_Logo(ProgramConfigJson["programName_Logo"]);
|
|
988
|
+
|
|
989
|
+
let result = await Super.getProramConfig();
|
|
990
|
+
|
|
991
|
+
if (result) {
|
|
992
|
+
//console.log('result',result)
|
|
993
|
+
//先放入programCode
|
|
994
|
+
ProgramConfig.setProgramCode(result.programCode);
|
|
995
|
+
ProgramConfig.setHydrocarbonServer(result.hydrocarbonServer);
|
|
996
|
+
ProgramConfig.setProgramName(result.programName);
|
|
997
|
+
ProgramConfig.setProgramName_sub(result.programName_NavLeft);
|
|
998
|
+
ProgramConfig.setProgramName_NavLeft(result.programName_NavLeft);
|
|
999
|
+
ProgramConfig.setProgramName_Logo(result.programName_Logo);
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
}
|