@ibiz-template/runtime 0.4.15 → 0.4.17-beta.0
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/dist/index.esm.js +1533 -926
- package/dist/index.system.min.js +2 -2
- package/out/app-hub.d.ts +8 -0
- package/out/app-hub.d.ts.map +1 -1
- package/out/app-hub.js +14 -1
- package/out/controller/common/base.controller.d.ts +1 -0
- package/out/controller/common/base.controller.d.ts.map +1 -1
- package/out/controller/common/base.controller.js +2 -0
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +7 -2
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +9 -3
- package/out/controller/common/view/wf-step-trace-view.controller.d.ts.map +1 -1
- package/out/controller/common/view/wf-step-trace-view.controller.js +3 -2
- package/out/controller/control/calendar/calendar.service.d.ts +3 -3
- package/out/controller/control/calendar/calendar.service.d.ts.map +1 -1
- package/out/controller/control/calendar/calendar.service.js +2 -2
- package/out/controller/control/form/edit-form/edit-form.service.d.ts +18 -18
- package/out/controller/control/form/edit-form/edit-form.service.d.ts.map +1 -1
- package/out/controller/control/form/edit-form/edit-form.service.js +11 -11
- package/out/controller/control/form/form/form.service.d.ts +2 -2
- package/out/controller/control/form/form/form.service.d.ts.map +1 -1
- package/out/controller/control/form/form/form.service.js +1 -1
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.js +2 -6
- package/out/controller/control/form/search-form/search-form.service.d.ts +2 -2
- package/out/controller/control/form/search-form/search-form.service.d.ts.map +1 -1
- package/out/controller/control/form/search-form/search-form.service.js +1 -1
- package/out/controller/control/gantt/gantt.controller.d.ts.map +1 -1
- package/out/controller/control/gantt/gantt.controller.js +1 -0
- package/out/controller/control/grid/grid/grid-column.controller.d.ts +2 -1
- package/out/controller/control/grid/grid/grid-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.d.ts +17 -1
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +33 -1
- package/out/controller/control/grid/grid/grid.service.d.ts +2 -2
- package/out/controller/control/grid/grid/grid.service.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.service.js +2 -2
- package/out/controller/control/kanban/kanban.service.d.ts +2 -2
- package/out/controller/control/kanban/kanban.service.d.ts.map +1 -1
- package/out/controller/control/kanban/kanban.service.js +1 -1
- package/out/controller/control/map/map.service.d.ts +1 -1
- package/out/controller/control/map/map.service.js +1 -1
- package/out/controller/control/md-ctrl/md-ctrl.controller.js +1 -1
- package/out/controller/control/report-panel/report-panel.service.d.ts +2 -2
- package/out/controller/control/report-panel/report-panel.service.d.ts.map +1 -1
- package/out/controller/control/report-panel/report-panel.service.js +1 -1
- package/out/controller/control/search-bar/search-bar.controller.d.ts +59 -2
- package/out/controller/control/search-bar/search-bar.controller.d.ts.map +1 -1
- package/out/controller/control/search-bar/search-bar.controller.js +142 -9
- package/out/controller/control/search-bar/search-bar.service.d.ts +78 -0
- package/out/controller/control/search-bar/search-bar.service.d.ts.map +1 -0
- package/out/controller/control/search-bar/search-bar.service.js +130 -0
- package/out/controller/control/tree/tree.controller.d.ts +27 -1
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +45 -7
- package/out/controller/control/tree/tree.service.d.ts +3 -3
- package/out/controller/control/tree/tree.service.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/index.d.ts +2 -0
- package/out/controller/control/tree-grid-ex/index.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/index.js +2 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/index.d.ts +4 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/index.d.ts.map +1 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/index.js +3 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.d.ts +93 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.d.ts.map +1 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.js +89 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.d.ts +13 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.d.ts.map +1 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.js +11 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.d.ts +31 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.d.ts.map +1 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.js +61 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-row.state.d.ts +26 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-row.state.d.ts.map +1 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-row.state.js +26 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.d.ts +48 -46
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.js +85 -114
- package/out/controller/control/tree-grid-ex/tree-grid-ex.service.d.ts +8 -58
- package/out/controller/control/tree-grid-ex/tree-grid-ex.service.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex.service.js +5 -135
- package/out/controller/control/wizard-panel/wizard-panel.service.d.ts +4 -4
- package/out/controller/control/wizard-panel/wizard-panel.service.d.ts.map +1 -1
- package/out/controller/control/wizard-panel/wizard-panel.service.js +2 -2
- package/out/controller/utils/value-default/value-default.d.ts +1 -1
- package/out/controller/utils/value-default/value-default.d.ts.map +1 -1
- package/out/de-logic/de-logic-context.d.ts +5 -5
- package/out/de-logic/de-logic-context.d.ts.map +1 -1
- package/out/de-logic/de-logic-context.js +1 -1
- package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.d.ts +2 -2
- package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.d.ts.map +1 -1
- package/out/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.js +1 -1
- package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.d.ts +2 -2
- package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.d.ts.map +1 -1
- package/out/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.js +1 -1
- package/out/de-logic/de-logic-link/de-logic-link.d.ts +1 -1
- package/out/de-logic/de-logic-link/de-logic-link.js +1 -1
- package/out/de-logic/de-logic-node/de-logic-node.d.ts +1 -1
- package/out/de-logic/de-logic-param/de-logic-param.d.ts +1 -1
- package/out/de-logic/de-logic-param/de-logic-param.js +1 -1
- package/out/de-logic/de-logic.d.ts +3 -3
- package/out/de-logic/de-logic.d.ts.map +1 -1
- package/out/de-logic/de-logic.js +2 -2
- package/out/de-logic/index.d.ts +8 -8
- package/out/de-logic/index.d.ts.map +1 -1
- package/out/de-logic/index.js +5 -5
- package/out/hub/config/app-config-service.d.ts +1 -0
- package/out/hub/config/app-config-service.d.ts.map +1 -1
- package/out/hub/config/app-config-service.js +1 -0
- package/out/hub/config/app-view-config-service.d.ts +20 -1
- package/out/hub/config/app-view-config-service.d.ts.map +1 -1
- package/out/hub/config/app-view-config-service.js +39 -6
- package/out/install.d.ts.map +1 -1
- package/out/install.js +3 -0
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +8 -0
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
- package/out/interface/common/i-app-view-config-service/i-app-view-config-service.d.ts +8 -0
- package/out/interface/common/i-app-view-config-service/i-app-view-config-service.d.ts.map +1 -1
- package/out/interface/common/i-data-ability-params/i-data-ability-params.d.ts +1 -1
- package/out/interface/common/i-data-ability-params/i-data-ability-params.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-grid.controller.d.ts +8 -0
- package/out/interface/controller/controller/control/i-grid.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-tree-grid-ex.controller.d.ts +7 -7
- package/out/interface/controller/controller/control/i-tree-grid-ex.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-tree.controller.d.ts +1 -1
- package/out/interface/controller/controller/control/i-tree.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/index.d.ts +1 -0
- package/out/interface/controller/controller/control/index.d.ts.map +1 -1
- package/out/interface/controller/controller/control/index.js +1 -0
- package/out/interface/controller/controller/control/tree-grid-ex-column/i-tree-grid-ex-column.controller.d.ts +12 -0
- package/out/interface/controller/controller/control/tree-grid-ex-column/i-tree-grid-ex-column.controller.d.ts.map +1 -0
- package/out/interface/controller/controller/control/tree-grid-ex-column/i-tree-grid-ex-column.controller.js +1 -0
- package/out/interface/controller/controller/control/tree-grid-ex-column/index.d.ts +2 -0
- package/out/interface/controller/controller/control/tree-grid-ex-column/index.d.ts.map +1 -0
- package/out/interface/controller/controller/control/tree-grid-ex-column/index.js +1 -0
- package/out/interface/controller/controller/i.controller.d.ts +8 -0
- package/out/interface/controller/controller/i.controller.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-tree-grid-ex.event.d.ts +2 -2
- package/out/interface/controller/event/control/i-tree-grid-ex.event.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-search-bar.state.d.ts +64 -0
- package/out/interface/controller/state/control/i-search-bar.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-tree-grid-ex.state.d.ts +31 -23
- package/out/interface/controller/state/control/i-tree-grid-ex.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-tree.state.d.ts +8 -1
- package/out/interface/controller/state/control/i-tree.state.d.ts.map +1 -1
- package/out/interface/provider/i-de-method.provider.d.ts +10 -1
- package/out/interface/provider/i-de-method.provider.d.ts.map +1 -1
- package/out/interface/provider/i-grid-column.provider.d.ts +2 -2
- package/out/interface/provider/i-grid-column.provider.d.ts.map +1 -1
- package/out/interface/provider/i-tree-grid-ex-column.provider.d.ts +31 -0
- package/out/interface/provider/i-tree-grid-ex-column.provider.d.ts.map +1 -0
- package/out/interface/provider/i-tree-grid-ex-column.provider.js +1 -0
- package/out/interface/provider/index.d.ts +1 -0
- package/out/interface/provider/index.d.ts.map +1 -1
- package/out/interface/service/service/i-app-de.service.d.ts +58 -42
- package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
- package/out/interface/service/service/i-file.service.d.ts +2 -2
- package/out/interface/service/service/i-file.service.d.ts.map +1 -1
- package/out/interface/service/service/i-wf.service.d.ts +12 -12
- package/out/interface/service/service/i-wf.service.d.ts.map +1 -1
- package/out/register/helper/grid-column-register.d.ts +2 -2
- package/out/register/helper/grid-column-register.d.ts.map +1 -1
- package/out/register/helper/grid-column-register.js +0 -14
- package/out/register/helper/index.d.ts +1 -0
- package/out/register/helper/index.d.ts.map +1 -1
- package/out/register/helper/index.js +1 -0
- package/out/register/helper/tree-grid-ex-column-register.d.ts +23 -0
- package/out/register/helper/tree-grid-ex-column-register.d.ts.map +1 -0
- package/out/register/helper/tree-grid-ex-column-register.js +50 -0
- package/out/service/de-service-util.d.ts +27 -13
- package/out/service/de-service-util.d.ts.map +1 -1
- package/out/service/de-service-util.js +56 -26
- package/out/service/dto/method.dto.d.ts +21 -10
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +36 -19
- package/out/service/service/authority/authority.service.d.ts +1 -1
- package/out/service/service/authority/authority.service.js +1 -1
- package/out/service/service/code-list/code-list.service.d.ts +3 -3
- package/out/service/service/code-list/code-list.service.d.ts.map +1 -1
- package/out/service/service/code-list/code-list.service.js +2 -2
- package/out/service/service/control/control.service.d.ts +2 -2
- package/out/service/service/control/control.service.d.ts.map +1 -1
- package/out/service/service/control/control.service.js +1 -1
- package/out/service/service/control/md-control.service.d.ts +23 -13
- package/out/service/service/control/md-control.service.d.ts.map +1 -1
- package/out/service/service/control/md-control.service.js +23 -7
- package/out/service/service/counter/counter.service.d.ts +3 -3
- package/out/service/service/counter/counter.service.d.ts.map +1 -1
- package/out/service/service/counter/counter.service.js +1 -1
- package/out/service/service/entity/de.service.d.ts +56 -28
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +57 -72
- package/out/service/service/entity/method/de-action.d.ts +23 -33
- package/out/service/service/entity/method/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +18 -35
- package/out/service/service/entity/method/fetch.d.ts +3 -4
- package/out/service/service/entity/method/fetch.d.ts.map +1 -1
- package/out/service/service/entity/method/fetch.js +3 -8
- package/out/service/service/entity/method/method-input.d.ts +10 -5
- package/out/service/service/entity/method/method-input.d.ts.map +1 -1
- package/out/service/service/entity/method/method-input.js +9 -8
- package/out/service/service/entity/method/method-renturn.d.ts +10 -7
- package/out/service/service/entity/method/method-renturn.d.ts.map +1 -1
- package/out/service/service/entity/method/method-renturn.js +9 -9
- package/out/service/service/entity/method/method.d.ts +11 -27
- package/out/service/service/entity/method/method.d.ts.map +1 -1
- package/out/service/service/entity/method/method.js +10 -33
- package/out/service/service/entity/method/provider/de-action-de-method.provider.d.ts +2 -2
- package/out/service/service/entity/method/provider/de-action-de-method.provider.d.ts.map +1 -1
- package/out/service/service/entity/method/provider/de-action-de-method.provider.js +2 -2
- package/out/service/service/entity/method/provider/fetch-de-method.provider.d.ts +2 -2
- package/out/service/service/entity/method/provider/fetch-de-method.provider.d.ts.map +1 -1
- package/out/service/service/entity/method/provider/fetch-de-method.provider.js +3 -3
- package/out/service/service/file/file.service.d.ts +2 -2
- package/out/service/service/file/file.service.d.ts.map +1 -1
- package/out/service/service/file/file.service.js +1 -1
- package/out/service/service/work-flow/work-flow.service.d.ts +28 -28
- package/out/service/service/work-flow/work-flow.service.d.ts.map +1 -1
- package/out/service/service/work-flow/work-flow.service.js +15 -15
- package/out/service/utils/app-counter/app-counter.d.ts +7 -7
- package/out/service/utils/app-counter/app-counter.d.ts.map +1 -1
- package/out/service/utils/app-counter/app-counter.js +3 -3
- package/out/service/utils/app-counter/app-de-counter.d.ts +2 -2
- package/out/service/utils/app-counter/app-de-counter.d.ts.map +1 -1
- package/out/service/utils/app-counter/app-de-counter.js +1 -1
- package/out/service/utils/de-cache/de-cache.d.ts +44 -39
- package/out/service/utils/de-cache/de-cache.d.ts.map +1 -1
- package/out/service/utils/de-cache/de-cache.js +115 -75
- package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts +2 -2
- package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts.map +1 -1
- package/out/service/utils/dynamic-code-list/dynamic-code-list.js +2 -2
- package/out/service/utils/res-path/res-path.d.ts +4 -4
- package/out/service/utils/res-path/res-path.d.ts.map +1 -1
- package/out/service/utils/res-path/res-path.js +2 -2
- package/out/service/utils/search-filter/search-filter.d.ts +2 -2
- package/out/service/utils/search-filter/search-filter.d.ts.map +1 -1
- package/out/service/utils/service-exist-util/service-exist-util.d.ts +2 -2
- package/out/service/utils/service-exist-util/service-exist-util.d.ts.map +1 -1
- package/out/service/utils/service-exist-util/service-exist-util.js +1 -1
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-data-set-node-data.js +51 -0
- package/out/service/vo/tree-node-data/tree-node-data.d.ts +2 -0
- package/out/service/vo/tree-node-data/tree-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-node-data.js +1 -0
- package/out/types.d.ts +9 -0
- package/out/types.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-param/ui-logic-param.js +1 -1
- package/out/utils/index.d.ts +2 -0
- package/out/utils/index.d.ts.map +1 -1
- package/out/utils/index.js +2 -0
- package/out/utils/nav-params/calc-nav-params.d.ts +2 -2
- package/out/utils/nav-params/calc-nav-params.d.ts.map +1 -1
- package/out/utils/nav-params/calc-nav-params.js +1 -1
- package/out/utils/open-redirect-view/open-redirect-view.js +1 -1
- package/out/utils/ui-domain/ui-domain.d.ts +35 -0
- package/out/utils/ui-domain/ui-domain.d.ts.map +1 -0
- package/out/utils/ui-domain/ui-domain.js +42 -0
- package/out/utils/ui-domain-manager/ui-domain-manager.d.ts +47 -0
- package/out/utils/ui-domain-manager/ui-domain-manager.d.ts.map +1 -0
- package/out/utils/ui-domain-manager/ui-domain-manager.js +62 -0
- package/package.json +3 -3
- package/src/app-hub.ts +15 -1
- package/src/controller/common/base.controller.ts +3 -0
- package/src/controller/common/control/md-control.controller.ts +7 -2
- package/src/controller/common/view/view.controller.ts +9 -3
- package/src/controller/common/view/wf-step-trace-view.controller.ts +4 -2
- package/src/controller/control/calendar/calendar.service.ts +4 -4
- package/src/controller/control/form/edit-form/edit-form.service.ts +23 -18
- package/src/controller/control/form/form/form.service.ts +2 -2
- package/src/controller/control/form/form-detail/form-detail/form-detail.controller.ts +2 -6
- package/src/controller/control/form/search-form/search-form.service.ts +2 -2
- package/src/controller/control/gantt/gantt.controller.ts +2 -1
- package/src/controller/control/grid/grid/grid-column.controller.ts +4 -1
- package/src/controller/control/grid/grid/grid.controller.ts +35 -0
- package/src/controller/control/grid/grid/grid.service.ts +3 -2
- package/src/controller/control/kanban/kanban.service.ts +2 -2
- package/src/controller/control/map/map.service.ts +1 -1
- package/src/controller/control/md-ctrl/md-ctrl.controller.ts +1 -1
- package/src/controller/control/report-panel/report-panel.service.ts +2 -2
- package/src/controller/control/search-bar/search-bar.controller.ts +178 -10
- package/src/controller/control/search-bar/search-bar.service.ts +161 -0
- package/src/controller/control/tree/tree.controller.ts +58 -11
- package/src/controller/control/tree/tree.service.ts +5 -3
- package/src/controller/control/tree-grid-ex/index.ts +2 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/index.ts +3 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.ts +121 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.ts +13 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts +76 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex-row.state.ts +37 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts +115 -138
- package/src/controller/control/tree-grid-ex/tree-grid-ex.service.ts +10 -165
- package/src/controller/control/wizard-panel/wizard-panel.service.ts +4 -4
- package/src/controller/utils/value-default/value-default.ts +1 -1
- package/src/de-logic/de-logic-context.ts +5 -5
- package/src/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.ts +2 -2
- package/src/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.ts +2 -2
- package/src/de-logic/de-logic-link/de-logic-link.ts +1 -1
- package/src/de-logic/de-logic-node/de-logic-node.ts +1 -1
- package/src/de-logic/de-logic-param/de-logic-param.ts +1 -1
- package/src/de-logic/de-logic.ts +3 -3
- package/src/de-logic/index.ts +10 -10
- package/src/hub/config/app-config-service.ts +1 -0
- package/src/hub/config/app-view-config-service.ts +39 -6
- package/src/install.ts +3 -0
- package/src/interface/common/i-app-hub-service/i-app-hub-service.ts +9 -0
- package/src/interface/common/i-app-view-config-service/i-app-view-config-service.ts +8 -0
- package/src/interface/common/i-data-ability-params/i-data-ability-params.ts +1 -1
- package/src/interface/controller/controller/control/i-grid.controller.ts +9 -0
- package/src/interface/controller/controller/control/i-tree-grid-ex.controller.ts +11 -12
- package/src/interface/controller/controller/control/i-tree.controller.ts +5 -2
- package/src/interface/controller/controller/control/index.ts +1 -0
- package/src/interface/controller/controller/control/tree-grid-ex-column/i-tree-grid-ex-column.controller.ts +12 -0
- package/src/interface/controller/controller/control/tree-grid-ex-column/index.ts +1 -0
- package/src/interface/controller/controller/i.controller.ts +9 -0
- package/src/interface/controller/event/control/i-tree-grid-ex.event.ts +2 -2
- package/src/interface/controller/state/control/i-search-bar.state.ts +73 -0
- package/src/interface/controller/state/control/i-tree-grid-ex.state.ts +27 -24
- package/src/interface/controller/state/control/i-tree.state.ts +9 -1
- package/src/interface/provider/i-de-method.provider.ts +10 -0
- package/src/interface/provider/i-grid-column.provider.ts +2 -7
- package/src/interface/provider/i-tree-grid-ex-column.provider.ts +39 -0
- package/src/interface/provider/index.ts +1 -0
- package/src/interface/service/service/i-app-de.service.ts +63 -43
- package/src/interface/service/service/i-file.service.ts +2 -2
- package/src/interface/service/service/i-wf.service.ts +12 -12
- package/src/register/helper/grid-column-register.ts +2 -17
- package/src/register/helper/index.ts +1 -0
- package/src/register/helper/tree-grid-ex-column-register.ts +67 -0
- package/src/service/de-service-util.ts +63 -29
- package/src/service/dto/method.dto.ts +42 -23
- package/src/service/service/authority/authority.service.ts +1 -1
- package/src/service/service/code-list/code-list.service.ts +3 -3
- package/src/service/service/control/control.service.ts +2 -2
- package/src/service/service/control/md-control.service.ts +40 -13
- package/src/service/service/counter/counter.service.ts +3 -3
- package/src/service/service/entity/de.service.ts +83 -90
- package/src/service/service/entity/method/de-action.ts +29 -47
- package/src/service/service/entity/method/fetch.ts +5 -11
- package/src/service/service/entity/method/method-input.ts +10 -9
- package/src/service/service/entity/method/method-renturn.ts +10 -11
- package/src/service/service/entity/method/method.ts +13 -48
- package/src/service/service/entity/method/provider/de-action-de-method.provider.ts +4 -2
- package/src/service/service/entity/method/provider/fetch-de-method.provider.ts +4 -2
- package/src/service/service/file/file.service.ts +2 -2
- package/src/service/service/work-flow/work-flow.service.ts +30 -30
- package/src/service/utils/app-counter/app-counter.ts +7 -7
- package/src/service/utils/app-counter/app-de-counter.ts +2 -2
- package/src/service/utils/de-cache/de-cache.ts +124 -85
- package/src/service/utils/dynamic-code-list/dynamic-code-list.ts +2 -5
- package/src/service/utils/res-path/res-path.ts +4 -4
- package/src/service/utils/search-filter/search-filter.ts +2 -2
- package/src/service/utils/service-exist-util/service-exist-util.ts +2 -2
- package/src/service/vo/tree-node-data/tree-data-set-node-data.ts +53 -0
- package/src/service/vo/tree-node-data/tree-node-data.ts +6 -0
- package/src/types.ts +10 -0
- package/src/ui-logic/ui-logic-param/ui-logic-param.ts +1 -1
- package/src/utils/index.ts +2 -0
- package/src/utils/nav-params/calc-nav-params.ts +2 -2
- package/src/utils/open-redirect-view/open-redirect-view.ts +1 -1
- package/src/utils/ui-domain/ui-domain.ts +52 -0
- package/src/utils/ui-domain-manager/ui-domain-manager.ts +64 -0
- package/out/service/service/entity/util/util.d.ts +0 -13
- package/out/service/service/entity/util/util.d.ts.map +0 -1
- package/out/service/service/entity/util/util.js +0 -14
- package/src/service/service/entity/util/util.ts +0 -18
package/dist/index.esm.js
CHANGED
|
@@ -1113,7 +1113,7 @@ async function openDERedirectView(appView, context, params = {}, opts = {}) {
|
|
|
1113
1113
|
context[key] = curData[key] || context[key] || params[key];
|
|
1114
1114
|
const actionId = appView.getDataAppDEActionId;
|
|
1115
1115
|
const app = ibiz.hub.getApp(appView.appId);
|
|
1116
|
-
const service = await app.deService.getService(entityId);
|
|
1116
|
+
const service = await app.deService.getService(context, entityId);
|
|
1117
1117
|
ibiz.loading.showRedirect();
|
|
1118
1118
|
try {
|
|
1119
1119
|
const res = await service.exec(actionId || "get", context, params);
|
|
@@ -2697,6 +2697,96 @@ var ThemeUtil = class {
|
|
|
2697
2697
|
}
|
|
2698
2698
|
};
|
|
2699
2699
|
|
|
2700
|
+
// src/utils/ui-domain/ui-domain.ts
|
|
2701
|
+
import { createUUID } from "qx-util";
|
|
2702
|
+
var UIDomain = class {
|
|
2703
|
+
/**
|
|
2704
|
+
* Creates an instance of UIDomain.
|
|
2705
|
+
*
|
|
2706
|
+
* @author chitanda
|
|
2707
|
+
* @date 2023-12-22 16:12:03
|
|
2708
|
+
* @param {string} appId
|
|
2709
|
+
* @param {string} [id]
|
|
2710
|
+
*/
|
|
2711
|
+
constructor(id) {
|
|
2712
|
+
if (id) {
|
|
2713
|
+
this.id = id;
|
|
2714
|
+
} else {
|
|
2715
|
+
this.id = createUUID();
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
2718
|
+
/**
|
|
2719
|
+
* 界面域销毁
|
|
2720
|
+
*
|
|
2721
|
+
* @author chitanda
|
|
2722
|
+
* @date 2023-12-22 15:12:49
|
|
2723
|
+
*/
|
|
2724
|
+
destroy() {
|
|
2725
|
+
const apps = ibiz.hub.getAllApps();
|
|
2726
|
+
apps.forEach((app) => {
|
|
2727
|
+
app.deService.reset({
|
|
2728
|
+
srfappid: app.appId,
|
|
2729
|
+
srfsessionid: this.id
|
|
2730
|
+
});
|
|
2731
|
+
});
|
|
2732
|
+
}
|
|
2733
|
+
};
|
|
2734
|
+
|
|
2735
|
+
// src/utils/ui-domain-manager/ui-domain-manager.ts
|
|
2736
|
+
var UIDomainManager = class {
|
|
2737
|
+
constructor() {
|
|
2738
|
+
/**
|
|
2739
|
+
* 界面域实例缓存
|
|
2740
|
+
*
|
|
2741
|
+
* @author chitanda
|
|
2742
|
+
* @date 2023-12-22 15:12:53
|
|
2743
|
+
* @protected
|
|
2744
|
+
* @type {Map<string, UIDomain>}
|
|
2745
|
+
*/
|
|
2746
|
+
this.domainMap = /* @__PURE__ */ new Map();
|
|
2747
|
+
}
|
|
2748
|
+
/**
|
|
2749
|
+
* 创建域
|
|
2750
|
+
*
|
|
2751
|
+
* @author chitanda
|
|
2752
|
+
* @date 2023-12-22 16:12:44
|
|
2753
|
+
* @param {string} [id] 可选,不传则自动生成
|
|
2754
|
+
* @return {*} {UIDomain}
|
|
2755
|
+
*/
|
|
2756
|
+
create(id) {
|
|
2757
|
+
const domain = new UIDomain(id);
|
|
2758
|
+
this.domainMap.set(domain.id, domain);
|
|
2759
|
+
return domain;
|
|
2760
|
+
}
|
|
2761
|
+
/**
|
|
2762
|
+
* 获取域
|
|
2763
|
+
*
|
|
2764
|
+
* @author chitanda
|
|
2765
|
+
* @date 2023-12-22 15:12:17
|
|
2766
|
+
* @param {string} id
|
|
2767
|
+
* @return {*} {UIDomain}
|
|
2768
|
+
*/
|
|
2769
|
+
get(id) {
|
|
2770
|
+
if (this.domainMap.has(id)) {
|
|
2771
|
+
return this.domainMap.get(id);
|
|
2772
|
+
}
|
|
2773
|
+
throw new Error("\u65E0\u6548\u7684\u754C\u9762\u57DF\u6807\u8BC6[".concat(id, "]"));
|
|
2774
|
+
}
|
|
2775
|
+
/**
|
|
2776
|
+
* 销毁域
|
|
2777
|
+
*
|
|
2778
|
+
* @author chitanda
|
|
2779
|
+
* @date 2023-12-22 15:12:03
|
|
2780
|
+
* @param {string} id
|
|
2781
|
+
*/
|
|
2782
|
+
destroy(id) {
|
|
2783
|
+
if (this.domainMap.has(id)) {
|
|
2784
|
+
this.domainMap.get(id).destroy();
|
|
2785
|
+
this.domainMap.delete(id);
|
|
2786
|
+
}
|
|
2787
|
+
}
|
|
2788
|
+
};
|
|
2789
|
+
|
|
2700
2790
|
// src/utils/raw-value-util/raw-value-util.ts
|
|
2701
2791
|
var RawValueUtil = class {
|
|
2702
2792
|
/**
|
|
@@ -3340,7 +3430,6 @@ function getProvider5(key) {
|
|
|
3340
3430
|
async function getGridColumnProvider(model) {
|
|
3341
3431
|
let provider;
|
|
3342
3432
|
const { columnType, enableRowEdit, sysPFPluginId, appId } = model;
|
|
3343
|
-
const { renderSysPFPluginId } = model;
|
|
3344
3433
|
if (sysPFPluginId) {
|
|
3345
3434
|
const pluginKey = await getPluginRegisterKey(sysPFPluginId, appId);
|
|
3346
3435
|
if (pluginKey) {
|
|
@@ -3352,17 +3441,6 @@ async function getGridColumnProvider(model) {
|
|
|
3352
3441
|
return provider;
|
|
3353
3442
|
}
|
|
3354
3443
|
}
|
|
3355
|
-
if (renderSysPFPluginId) {
|
|
3356
|
-
const pluginKey = await getPluginRegisterKey(renderSysPFPluginId, appId);
|
|
3357
|
-
if (pluginKey) {
|
|
3358
|
-
provider = getProvider5(pluginKey);
|
|
3359
|
-
}
|
|
3360
|
-
if (!provider) {
|
|
3361
|
-
ibiz.log.error("\u627E\u4E0D\u5230\u6811\u8868\u683C\u5217\u63D2\u4EF6".concat(pluginKey, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
3362
|
-
} else {
|
|
3363
|
-
return provider;
|
|
3364
|
-
}
|
|
3365
|
-
}
|
|
3366
3444
|
const key = enableRowEdit ? "".concat(columnType, "_EDIT") : columnType;
|
|
3367
3445
|
provider = getProvider5(key);
|
|
3368
3446
|
if (!provider) {
|
|
@@ -3726,6 +3804,41 @@ async function getDEMethodProvider(model) {
|
|
|
3726
3804
|
}
|
|
3727
3805
|
}
|
|
3728
3806
|
|
|
3807
|
+
// src/register/helper/tree-grid-ex-column-register.ts
|
|
3808
|
+
var TREEGRIDEX_COLUMN_PROVIDER_PREFIX = "TREEGRIDEX_COLUMN";
|
|
3809
|
+
function registerTreeGridExColumnProvider(key, callback) {
|
|
3810
|
+
ibiz.register.register(
|
|
3811
|
+
"".concat(TREEGRIDEX_COLUMN_PROVIDER_PREFIX, "_").concat(key),
|
|
3812
|
+
callback
|
|
3813
|
+
);
|
|
3814
|
+
}
|
|
3815
|
+
function getProvider13(key) {
|
|
3816
|
+
return ibiz.register.get(
|
|
3817
|
+
"".concat(TREEGRIDEX_COLUMN_PROVIDER_PREFIX, "_").concat(key)
|
|
3818
|
+
);
|
|
3819
|
+
}
|
|
3820
|
+
async function getTreeGridExColumnProvider(model) {
|
|
3821
|
+
let provider;
|
|
3822
|
+
const { columnType, appId, renderSysPFPluginId } = model;
|
|
3823
|
+
if (renderSysPFPluginId) {
|
|
3824
|
+
const pluginKey = await getPluginRegisterKey(renderSysPFPluginId, appId);
|
|
3825
|
+
if (pluginKey) {
|
|
3826
|
+
provider = getProvider13(pluginKey);
|
|
3827
|
+
}
|
|
3828
|
+
if (!provider) {
|
|
3829
|
+
ibiz.log.error("\u627E\u4E0D\u5230\u6811\u8868\u683C\u5217\u63D2\u4EF6".concat(pluginKey, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
3830
|
+
} else {
|
|
3831
|
+
return provider;
|
|
3832
|
+
}
|
|
3833
|
+
}
|
|
3834
|
+
provider = getProvider13(columnType);
|
|
3835
|
+
if (!provider) {
|
|
3836
|
+
ibiz.log.error("\u627E\u4E0D\u5230\u8868\u683C\u5217\u7C7B\u578B".concat(columnType, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
3837
|
+
} else {
|
|
3838
|
+
return provider;
|
|
3839
|
+
}
|
|
3840
|
+
}
|
|
3841
|
+
|
|
3729
3842
|
// src/service/utils/app-counter/app-counter.ts
|
|
3730
3843
|
import { IBizContext, RuntimeError as RuntimeError11 } from "@ibiz-template/core";
|
|
3731
3844
|
import { notNilEmpty as notNilEmpty5, QXEvent } from "qx-util";
|
|
@@ -3770,7 +3883,7 @@ var AppCounter = class {
|
|
|
3770
3883
|
*
|
|
3771
3884
|
* @author chitanda
|
|
3772
3885
|
* @date 2022-10-26 19:10:24
|
|
3773
|
-
* @param {
|
|
3886
|
+
* @param {IContext} [context]
|
|
3774
3887
|
* @param {IParams} [params]
|
|
3775
3888
|
*/
|
|
3776
3889
|
async init(context, params) {
|
|
@@ -3784,7 +3897,7 @@ var AppCounter = class {
|
|
|
3784
3897
|
* @author chitanda
|
|
3785
3898
|
* @date 2022-10-26 19:10:58
|
|
3786
3899
|
* @protected
|
|
3787
|
-
* @param {
|
|
3900
|
+
* @param {IContext} [context]
|
|
3788
3901
|
* @param {IParams} [params]
|
|
3789
3902
|
*/
|
|
3790
3903
|
setParams(context, params) {
|
|
@@ -3839,7 +3952,7 @@ var AppCounter = class {
|
|
|
3839
3952
|
*
|
|
3840
3953
|
* @author chitanda
|
|
3841
3954
|
* @date 2022-10-26 19:10:46
|
|
3842
|
-
* @param {
|
|
3955
|
+
* @param {IContext} [context]
|
|
3843
3956
|
* @param {IParams} [params]
|
|
3844
3957
|
* @return {*} {Promise<IData>}
|
|
3845
3958
|
*/
|
|
@@ -3904,7 +4017,7 @@ var AppDECounter = class extends AppCounter {
|
|
|
3904
4017
|
*
|
|
3905
4018
|
* @author chitanda
|
|
3906
4019
|
* @date 2022-10-26 19:10:24
|
|
3907
|
-
* @param {
|
|
4020
|
+
* @param {IContext} [context]
|
|
3908
4021
|
* @param {IParams} [params]
|
|
3909
4022
|
*/
|
|
3910
4023
|
async init(context, params) {
|
|
@@ -4142,7 +4255,7 @@ var DynamicCodeListCache = class {
|
|
|
4142
4255
|
* @param {IParams} [params={}]
|
|
4143
4256
|
* @returns {*} {Promise<CodeListItem[]>}
|
|
4144
4257
|
*/
|
|
4145
|
-
async load(context
|
|
4258
|
+
async load(context, params = {}) {
|
|
4146
4259
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
4147
4260
|
const {
|
|
4148
4261
|
appDataEntityId,
|
|
@@ -4236,7 +4349,7 @@ var DynamicCodeListCache = class {
|
|
|
4236
4349
|
* @param {IParams} [params={}]
|
|
4237
4350
|
* @returns {*} {Promise<IData[]>}
|
|
4238
4351
|
*/
|
|
4239
|
-
async get(context
|
|
4352
|
+
async get(context, params = {}) {
|
|
4240
4353
|
if (this.initPromise) {
|
|
4241
4354
|
await this.initPromise;
|
|
4242
4355
|
}
|
|
@@ -4268,7 +4381,7 @@ var DynamicCodeListCache = class {
|
|
|
4268
4381
|
|
|
4269
4382
|
// src/service/utils/de-cache/de-cache.ts
|
|
4270
4383
|
import { where, equals, clone as clone4, isNil as isNil5, isEmpty as isEmpty5 } from "ramda";
|
|
4271
|
-
import { createUUID } from "qx-util";
|
|
4384
|
+
import { ascSort, createUUID as createUUID2 } from "qx-util";
|
|
4272
4385
|
import { RuntimeError as RuntimeError13 } from "@ibiz-template/core";
|
|
4273
4386
|
|
|
4274
4387
|
// src/service/utils/service-exist-util/service-exist-util.ts
|
|
@@ -4293,6 +4406,13 @@ function isExistSessionId(funcName, context) {
|
|
|
4293
4406
|
|
|
4294
4407
|
// src/service/utils/de-cache/de-cache.ts
|
|
4295
4408
|
var DECache = class {
|
|
4409
|
+
/**
|
|
4410
|
+
* Creates an instance of DECache.
|
|
4411
|
+
*
|
|
4412
|
+
* @author chitanda
|
|
4413
|
+
* @date 2023-12-22 13:12:40
|
|
4414
|
+
* @param {IAppDataEntity} entity 应用实体模型
|
|
4415
|
+
*/
|
|
4296
4416
|
constructor(entity) {
|
|
4297
4417
|
this.entity = entity;
|
|
4298
4418
|
/**
|
|
@@ -4300,7 +4420,7 @@ var DECache = class {
|
|
|
4300
4420
|
*
|
|
4301
4421
|
* @author chitanda
|
|
4302
4422
|
* @date 2022-08-17 23:08:08
|
|
4303
|
-
* @type {Map<string,
|
|
4423
|
+
* @type {Map<string, IDataEntity>}
|
|
4304
4424
|
*/
|
|
4305
4425
|
this.cacheMap = /* @__PURE__ */ new Map();
|
|
4306
4426
|
}
|
|
@@ -4321,12 +4441,11 @@ var DECache = class {
|
|
|
4321
4441
|
*
|
|
4322
4442
|
* @author chitanda
|
|
4323
4443
|
* @date 2022-05-10 17:05:45
|
|
4324
|
-
* @param {
|
|
4444
|
+
* @param {IContext} context
|
|
4325
4445
|
* @param {IDataEntity} entity
|
|
4326
4446
|
*/
|
|
4327
|
-
forceAdd(
|
|
4328
|
-
const
|
|
4329
|
-
const data = map.get(entity.srfkey);
|
|
4447
|
+
forceAdd(_context, entity) {
|
|
4448
|
+
const data = this.cacheMap.get(entity.srfkey);
|
|
4330
4449
|
if (data) {
|
|
4331
4450
|
data.assign(entity);
|
|
4332
4451
|
ibiz.log.warn("forceAdd", entity.srfkey, entity);
|
|
@@ -4337,12 +4456,11 @@ var DECache = class {
|
|
|
4337
4456
|
*
|
|
4338
4457
|
* @author chitanda
|
|
4339
4458
|
* @date 2022-05-10 17:05:27
|
|
4340
|
-
* @param {
|
|
4459
|
+
* @param {IContext} context
|
|
4341
4460
|
* @param {IDataEntity} entity
|
|
4342
4461
|
*/
|
|
4343
|
-
forceUpdate(
|
|
4344
|
-
|
|
4345
|
-
map.set(entity.srfkey, clone4(entity));
|
|
4462
|
+
forceUpdate(_context, entity) {
|
|
4463
|
+
this.cacheMap.set(entity.srfkey, clone4(entity));
|
|
4346
4464
|
ibiz.log.warn("forceUpdate", entity.srfkey, entity);
|
|
4347
4465
|
}
|
|
4348
4466
|
/**
|
|
@@ -4350,12 +4468,11 @@ var DECache = class {
|
|
|
4350
4468
|
*
|
|
4351
4469
|
* @author chitanda
|
|
4352
4470
|
* @date 2022-05-10 17:05:08
|
|
4353
|
-
* @param {
|
|
4471
|
+
* @param {IContext} context
|
|
4354
4472
|
* @param {string} srfKey
|
|
4355
4473
|
*/
|
|
4356
|
-
forceDelete(
|
|
4357
|
-
|
|
4358
|
-
map.delete(srfKey);
|
|
4474
|
+
forceDelete(_context, srfKey) {
|
|
4475
|
+
this.cacheMap.delete(srfKey);
|
|
4359
4476
|
ibiz.log.warn("forceDelete", srfKey);
|
|
4360
4477
|
}
|
|
4361
4478
|
/**
|
|
@@ -4378,11 +4495,10 @@ var DECache = class {
|
|
|
4378
4495
|
try {
|
|
4379
4496
|
isExistSessionId("add", context);
|
|
4380
4497
|
if (isNil5(entity.srfkey) || isEmpty5(entity.srfkey)) {
|
|
4381
|
-
entity.srfkey =
|
|
4498
|
+
entity.srfkey = createUUID2();
|
|
4382
4499
|
}
|
|
4383
4500
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
4384
|
-
|
|
4385
|
-
map.set(entity.srfkey, clone4(entity));
|
|
4501
|
+
this.cacheMap.set(entity.srfkey, clone4(entity));
|
|
4386
4502
|
ibiz.log.warn("add", entity.srfkey, entity);
|
|
4387
4503
|
return entity;
|
|
4388
4504
|
} catch (err) {
|
|
@@ -4401,8 +4517,7 @@ var DECache = class {
|
|
|
4401
4517
|
get(context, srfKey) {
|
|
4402
4518
|
try {
|
|
4403
4519
|
isExistSessionId("get", context);
|
|
4404
|
-
const
|
|
4405
|
-
const data = map.get(srfKey);
|
|
4520
|
+
const data = this.cacheMap.get(srfKey);
|
|
4406
4521
|
ibiz.log.warn("get", srfKey, data);
|
|
4407
4522
|
return clone4(data);
|
|
4408
4523
|
} catch (err) {
|
|
@@ -4413,7 +4528,7 @@ var DECache = class {
|
|
|
4413
4528
|
/**
|
|
4414
4529
|
* 更新数据
|
|
4415
4530
|
*
|
|
4416
|
-
* @param {
|
|
4531
|
+
* @param {IContext} context
|
|
4417
4532
|
* @param {IDataEntity} entity
|
|
4418
4533
|
* @return {*} {IDataEntity}
|
|
4419
4534
|
* @memberof EntityCache
|
|
@@ -4432,11 +4547,10 @@ var DECache = class {
|
|
|
4432
4547
|
isExistSessionId("update", context);
|
|
4433
4548
|
isExistSrfKey("update", entity);
|
|
4434
4549
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
4435
|
-
const
|
|
4436
|
-
const data = map.get(oldKey);
|
|
4550
|
+
const data = this.cacheMap.get(oldKey);
|
|
4437
4551
|
if (data) {
|
|
4438
4552
|
data.assign(entity);
|
|
4439
|
-
|
|
4553
|
+
this.cacheMap.set(oldKey, data);
|
|
4440
4554
|
ibiz.log.warn("update", oldKey, entity);
|
|
4441
4555
|
return clone4(data);
|
|
4442
4556
|
}
|
|
@@ -4449,7 +4563,7 @@ var DECache = class {
|
|
|
4449
4563
|
/**
|
|
4450
4564
|
* 删除数据
|
|
4451
4565
|
*
|
|
4452
|
-
* @param {
|
|
4566
|
+
* @param {IContext} context
|
|
4453
4567
|
* @param {string} srfKey
|
|
4454
4568
|
* @return {*} {(IDataEntity | null)}
|
|
4455
4569
|
* @memberof EntityCache
|
|
@@ -4457,12 +4571,11 @@ var DECache = class {
|
|
|
4457
4571
|
delete(context, srfKey) {
|
|
4458
4572
|
try {
|
|
4459
4573
|
isExistSessionId("delete", context);
|
|
4460
|
-
const map = this.getCacheByTag(context);
|
|
4461
4574
|
const key = srfKey;
|
|
4462
|
-
if (
|
|
4463
|
-
const data =
|
|
4575
|
+
if (this.cacheMap.has(key)) {
|
|
4576
|
+
const data = this.cacheMap.get(key);
|
|
4464
4577
|
data.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
4465
|
-
|
|
4578
|
+
this.cacheMap.delete(key);
|
|
4466
4579
|
ibiz.log.warn("delete", key);
|
|
4467
4580
|
return data;
|
|
4468
4581
|
}
|
|
@@ -4477,22 +4590,21 @@ var DECache = class {
|
|
|
4477
4590
|
*
|
|
4478
4591
|
* @author chitanda
|
|
4479
4592
|
* @date 2022-03-23 11:03:52
|
|
4480
|
-
* @param {
|
|
4593
|
+
* @param {IContext} context
|
|
4481
4594
|
* @param {IDataEntity[]} entities
|
|
4482
4595
|
* @return {*} {IDataEntity[]}
|
|
4483
4596
|
*/
|
|
4484
4597
|
createBatch(context, entities) {
|
|
4485
4598
|
try {
|
|
4486
4599
|
isExistSessionId("add", context);
|
|
4487
|
-
const map = this.getCacheByTag(context);
|
|
4488
4600
|
for (let i = 0; i < entities.length; i++) {
|
|
4489
4601
|
const entity = entities[i];
|
|
4490
4602
|
if (isNil5(entity.srfkey) || isEmpty5(entity.srfkey)) {
|
|
4491
|
-
entity.srfkey =
|
|
4603
|
+
entity.srfkey = createUUID2();
|
|
4492
4604
|
}
|
|
4493
4605
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
4494
4606
|
const data = clone4(entity);
|
|
4495
|
-
|
|
4607
|
+
this.cacheMap.set(entity.srfkey, data);
|
|
4496
4608
|
entities[i] = data;
|
|
4497
4609
|
ibiz.log.warn("add", entity.srfkey, entity);
|
|
4498
4610
|
}
|
|
@@ -4507,22 +4619,21 @@ var DECache = class {
|
|
|
4507
4619
|
*
|
|
4508
4620
|
* @author chitanda
|
|
4509
4621
|
* @date 2022-03-23 10:03:17
|
|
4510
|
-
* @param {
|
|
4622
|
+
* @param {IContext} context
|
|
4511
4623
|
* @param {IDataEntity[]} entities
|
|
4512
4624
|
* @return {*} {IDataEntity[]}
|
|
4513
4625
|
*/
|
|
4514
4626
|
updateBatch(context, entities) {
|
|
4515
4627
|
try {
|
|
4516
4628
|
isExistSessionId("update", context);
|
|
4517
|
-
const map = this.getCacheByTag(context);
|
|
4518
4629
|
for (let i = 0; i < entities.length; i++) {
|
|
4519
4630
|
const entity = entities[i];
|
|
4520
4631
|
isExistSrfKey("update", entity);
|
|
4521
4632
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
4522
|
-
const data =
|
|
4633
|
+
const data = this.cacheMap.get(entity.srfkey);
|
|
4523
4634
|
if (data) {
|
|
4524
4635
|
data.assign(entity);
|
|
4525
|
-
|
|
4636
|
+
this.cacheMap.set(entity.srfkey, data);
|
|
4526
4637
|
ibiz.log.warn("update", entity.srfkey, entity);
|
|
4527
4638
|
entities[i] = clone4(data);
|
|
4528
4639
|
} else {
|
|
@@ -4542,7 +4653,7 @@ var DECache = class {
|
|
|
4542
4653
|
*
|
|
4543
4654
|
* @author chitanda
|
|
4544
4655
|
* @date 2022-03-23 10:03:40
|
|
4545
|
-
* @param {
|
|
4656
|
+
* @param {IContext} context 上下文
|
|
4546
4657
|
* @param {string[]} srfKeys 需要删除的数据主键
|
|
4547
4658
|
* @return {*} {string[]} 未能删除的数据主键
|
|
4548
4659
|
*/
|
|
@@ -4553,11 +4664,10 @@ var DECache = class {
|
|
|
4553
4664
|
ibiz.log.error(err);
|
|
4554
4665
|
return srfKeys;
|
|
4555
4666
|
}
|
|
4556
|
-
const map = this.getCacheByTag(context);
|
|
4557
4667
|
const notRemoveKeys = [];
|
|
4558
4668
|
for (let i = 0; i < srfKeys.length; i++) {
|
|
4559
4669
|
const key = srfKeys[i];
|
|
4560
|
-
if (!
|
|
4670
|
+
if (!this.cacheMap.has(key)) {
|
|
4561
4671
|
notRemoveKeys.push(key);
|
|
4562
4672
|
}
|
|
4563
4673
|
}
|
|
@@ -4568,7 +4678,7 @@ var DECache = class {
|
|
|
4568
4678
|
}
|
|
4569
4679
|
for (let i = 0; i < srfKeys.length; i++) {
|
|
4570
4680
|
const key = srfKeys[i];
|
|
4571
|
-
|
|
4681
|
+
this.cacheMap.delete(key);
|
|
4572
4682
|
ibiz.log.warn("delete", key);
|
|
4573
4683
|
}
|
|
4574
4684
|
return [];
|
|
@@ -4578,32 +4688,77 @@ var DECache = class {
|
|
|
4578
4688
|
*
|
|
4579
4689
|
* @author chitanda
|
|
4580
4690
|
* @date 2022-08-17 23:08:06
|
|
4581
|
-
* @param {
|
|
4691
|
+
* @param {IContext} context
|
|
4582
4692
|
* @param {string} srfkey
|
|
4583
4693
|
* @return {*} {boolean}
|
|
4584
4694
|
*/
|
|
4585
|
-
checkData(
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4695
|
+
checkData(_context, srfkey) {
|
|
4696
|
+
return !!this.cacheMap.get(srfkey);
|
|
4697
|
+
}
|
|
4698
|
+
/**
|
|
4699
|
+
* 获取当前已经缓存的数据
|
|
4700
|
+
*
|
|
4701
|
+
* @author chitanda
|
|
4702
|
+
* @date 2023-12-22 14:12:57
|
|
4703
|
+
* @return {*} {IDataEntity[]}
|
|
4704
|
+
*/
|
|
4705
|
+
getList() {
|
|
4706
|
+
const values = this.cacheMap.values();
|
|
4707
|
+
return Array.from(values);
|
|
4589
4708
|
}
|
|
4590
4709
|
/**
|
|
4591
4710
|
* 根据条件查找数据,未设置条件默认返回全部
|
|
4592
4711
|
*
|
|
4593
4712
|
* @author chitanda
|
|
4594
|
-
* @date
|
|
4595
|
-
* @param {
|
|
4713
|
+
* @date 2023-12-22 13:12:28
|
|
4714
|
+
* @param {IContext} context
|
|
4715
|
+
* @param {IParams} [params={}]
|
|
4596
4716
|
* @return {*} {IDataEntity[]}
|
|
4597
4717
|
*/
|
|
4598
|
-
|
|
4718
|
+
select(context, params = {}) {
|
|
4599
4719
|
try {
|
|
4600
4720
|
isExistSessionId("getList", context);
|
|
4601
|
-
const
|
|
4602
|
-
|
|
4603
|
-
|
|
4721
|
+
const values = this.cacheMap.values();
|
|
4722
|
+
let items = Array.from(values);
|
|
4723
|
+
items = ascSort(items, "srfordervalue");
|
|
4724
|
+
const data = {};
|
|
4725
|
+
const nullData = {};
|
|
4726
|
+
const undefinedData = {};
|
|
4727
|
+
const emptyData = {};
|
|
4728
|
+
if (params.srfkey) {
|
|
4729
|
+
data.srfkey = equals(params.srfkey);
|
|
4730
|
+
delete params.srfkey;
|
|
4731
|
+
}
|
|
4732
|
+
for (const key in params) {
|
|
4733
|
+
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
4734
|
+
const val = params[key];
|
|
4735
|
+
if (val == null) {
|
|
4736
|
+
nullData[key] = equals(null);
|
|
4737
|
+
undefinedData[key] = equals(void 0);
|
|
4738
|
+
emptyData[key] = equals("");
|
|
4739
|
+
} else {
|
|
4740
|
+
data[key] = equals(val);
|
|
4741
|
+
}
|
|
4742
|
+
}
|
|
4604
4743
|
}
|
|
4605
|
-
|
|
4606
|
-
|
|
4744
|
+
if (!isEmpty5(data)) {
|
|
4745
|
+
const pred = where(data);
|
|
4746
|
+
const nullPred = where(nullData);
|
|
4747
|
+
const undefinedPred = where(undefinedData);
|
|
4748
|
+
const emptyPred = where(emptyData);
|
|
4749
|
+
items = items.filter((obj) => {
|
|
4750
|
+
if (isEmpty5(nullData)) {
|
|
4751
|
+
if (pred(obj)) {
|
|
4752
|
+
return true;
|
|
4753
|
+
}
|
|
4754
|
+
} else if (pred(obj) && (nullPred(obj) || undefinedPred(obj) || emptyPred(obj))) {
|
|
4755
|
+
return true;
|
|
4756
|
+
}
|
|
4757
|
+
return false;
|
|
4758
|
+
});
|
|
4759
|
+
}
|
|
4760
|
+
const list = items.map((obj) => obj.clone());
|
|
4761
|
+
return list;
|
|
4607
4762
|
} catch (err) {
|
|
4608
4763
|
ibiz.log.error(err);
|
|
4609
4764
|
return [];
|
|
@@ -4632,33 +4787,13 @@ var DECache = class {
|
|
|
4632
4787
|
return where(data);
|
|
4633
4788
|
}
|
|
4634
4789
|
/**
|
|
4635
|
-
*
|
|
4636
|
-
*
|
|
4637
|
-
* @author chitanda
|
|
4638
|
-
* @date 2022-08-17 23:08:54
|
|
4639
|
-
* @param {IParams} context
|
|
4640
|
-
*/
|
|
4641
|
-
clear(context) {
|
|
4642
|
-
const tag = context.srfsessionid;
|
|
4643
|
-
if (this.cacheMap.size > 0) {
|
|
4644
|
-
this.cacheMap.delete(tag);
|
|
4645
|
-
}
|
|
4646
|
-
}
|
|
4647
|
-
/**
|
|
4648
|
-
* 根据标识获取map组
|
|
4790
|
+
* 清空缓存
|
|
4649
4791
|
*
|
|
4650
4792
|
* @author chitanda
|
|
4651
|
-
* @date
|
|
4652
|
-
* @private
|
|
4653
|
-
* @param {IParams} context
|
|
4654
|
-
* @return {*} {Map<string, IDataEntity>}
|
|
4793
|
+
* @date 2023-12-22 13:12:17
|
|
4655
4794
|
*/
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
if (!this.cacheMap.has(tag)) {
|
|
4659
|
-
this.cacheMap.set(tag, /* @__PURE__ */ new Map());
|
|
4660
|
-
}
|
|
4661
|
-
return this.cacheMap.get(tag);
|
|
4795
|
+
clear() {
|
|
4796
|
+
this.cacheMap.clear();
|
|
4662
4797
|
}
|
|
4663
4798
|
/**
|
|
4664
4799
|
* 根据联合键值计算主键并赋值
|
|
@@ -4957,7 +5092,7 @@ var CodeListService = class {
|
|
|
4957
5092
|
* @param {IAppCodeList} codeList
|
|
4958
5093
|
* @returns {*} {IData[]}
|
|
4959
5094
|
*/
|
|
4960
|
-
async getDynamicCodeList(codeList, context
|
|
5095
|
+
async getDynamicCodeList(codeList, context, params = {}) {
|
|
4961
5096
|
let dynamicCache;
|
|
4962
5097
|
const codeName = codeList.codeName;
|
|
4963
5098
|
if (this.cache.has(codeName)) {
|
|
@@ -4975,7 +5110,7 @@ var CodeListService = class {
|
|
|
4975
5110
|
* @author chitanda
|
|
4976
5111
|
* @date 2022-08-25 15:08:45
|
|
4977
5112
|
* @param {string} tag
|
|
4978
|
-
* @param {
|
|
5113
|
+
* @param {IContext} [context]
|
|
4979
5114
|
* @param {IParams} [params]
|
|
4980
5115
|
* @return {*} {Promise<CodeListItem[]>}
|
|
4981
5116
|
*/
|
|
@@ -5078,7 +5213,7 @@ var CounterService = class {
|
|
|
5078
5213
|
* @date 2022-10-26 20:10:20
|
|
5079
5214
|
* @static
|
|
5080
5215
|
* @param {IAppCounterRef} model
|
|
5081
|
-
* @param {
|
|
5216
|
+
* @param {IContext} context
|
|
5082
5217
|
* @param {IParams} params
|
|
5083
5218
|
* @return {*} {Promise<AppCounter>}
|
|
5084
5219
|
*/
|
|
@@ -5106,8 +5241,6 @@ import {
|
|
|
5106
5241
|
ModelError as ModelError5,
|
|
5107
5242
|
RuntimeError as RuntimeError16
|
|
5108
5243
|
} from "@ibiz-template/core";
|
|
5109
|
-
import { equals as equals2, isEmpty as isEmpty7, where as where2 } from "ramda";
|
|
5110
|
-
import { ascSort } from "qx-util";
|
|
5111
5244
|
|
|
5112
5245
|
// src/service/service/work-flow/work-flow.service.ts
|
|
5113
5246
|
import { RuntimeError as RuntimeError15 } from "@ibiz-template/core";
|
|
@@ -5149,7 +5282,7 @@ var WorkFlowService = class {
|
|
|
5149
5282
|
*
|
|
5150
5283
|
* @private
|
|
5151
5284
|
* @param {IData} data
|
|
5152
|
-
* @param {
|
|
5285
|
+
* @param {IContext} context
|
|
5153
5286
|
* @returns {*}
|
|
5154
5287
|
* @memberof WorkFlowService
|
|
5155
5288
|
*/
|
|
@@ -5165,7 +5298,7 @@ var WorkFlowService = class {
|
|
|
5165
5298
|
* @author zk
|
|
5166
5299
|
* @date 2023-11-06 06:11:07
|
|
5167
5300
|
* @private
|
|
5168
|
-
* @param {
|
|
5301
|
+
* @param {IContext} context
|
|
5169
5302
|
* @return {*} {string}
|
|
5170
5303
|
* @memberof WorkFlowService
|
|
5171
5304
|
*/
|
|
@@ -5177,7 +5310,7 @@ var WorkFlowService = class {
|
|
|
5177
5310
|
*
|
|
5178
5311
|
* @author lxm
|
|
5179
5312
|
* @date 2022-09-29 14:09:45
|
|
5180
|
-
* @param {
|
|
5313
|
+
* @param {IContext} context
|
|
5181
5314
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
5182
5315
|
*/
|
|
5183
5316
|
async getWFStep(context) {
|
|
@@ -5191,7 +5324,7 @@ var WorkFlowService = class {
|
|
|
5191
5324
|
*
|
|
5192
5325
|
* @author lxm
|
|
5193
5326
|
* @date 2022-09-29 14:09:52
|
|
5194
|
-
* @param {
|
|
5327
|
+
* @param {IContext} context 路径参数
|
|
5195
5328
|
* @param {IData} data 数据
|
|
5196
5329
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
5197
5330
|
*/
|
|
@@ -5208,7 +5341,7 @@ var WorkFlowService = class {
|
|
|
5208
5341
|
*
|
|
5209
5342
|
* @author lxm
|
|
5210
5343
|
* @date 2022-09-29 14:09:45
|
|
5211
|
-
* @param {
|
|
5344
|
+
* @param {IContext} context
|
|
5212
5345
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
5213
5346
|
*/
|
|
5214
5347
|
async getWFHistory(context) {
|
|
@@ -5224,7 +5357,7 @@ var WorkFlowService = class {
|
|
|
5224
5357
|
*
|
|
5225
5358
|
* @author lxm
|
|
5226
5359
|
* @date 2022-10-27 16:10:13
|
|
5227
|
-
* @param {
|
|
5360
|
+
* @param {IContext} context
|
|
5228
5361
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
5229
5362
|
*/
|
|
5230
5363
|
async getWFProcessDiagram(context) {
|
|
@@ -5255,7 +5388,7 @@ var WorkFlowService = class {
|
|
|
5255
5388
|
*
|
|
5256
5389
|
* @author lxm
|
|
5257
5390
|
* @date 2022-09-30 17:09:51
|
|
5258
|
-
* @param {
|
|
5391
|
+
* @param {IContext} context 路径参数
|
|
5259
5392
|
* @param {IParams} params 请求参数
|
|
5260
5393
|
* @param {IData} data 数据
|
|
5261
5394
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
@@ -5274,7 +5407,7 @@ var WorkFlowService = class {
|
|
|
5274
5407
|
*
|
|
5275
5408
|
* @author lxm
|
|
5276
5409
|
* @date 2022-09-30 17:09:51
|
|
5277
|
-
* @param {
|
|
5410
|
+
* @param {IContext} context 路径参数
|
|
5278
5411
|
* @param {IParams} params 请求参数
|
|
5279
5412
|
* @param {IData} data 数据
|
|
5280
5413
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
@@ -5293,7 +5426,7 @@ var WorkFlowService = class {
|
|
|
5293
5426
|
*
|
|
5294
5427
|
* @author lxm
|
|
5295
5428
|
* @date 2022-09-30 17:09:51
|
|
5296
|
-
* @param {
|
|
5429
|
+
* @param {IContext} context 路径参数
|
|
5297
5430
|
* @param {IParams} params 请求参数
|
|
5298
5431
|
* @param {IData} data 数据
|
|
5299
5432
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
@@ -5312,7 +5445,7 @@ var WorkFlowService = class {
|
|
|
5312
5445
|
*
|
|
5313
5446
|
* @author lxm
|
|
5314
5447
|
* @date 2022-09-30 17:09:51
|
|
5315
|
-
* @param {
|
|
5448
|
+
* @param {IContext} context 路径参数
|
|
5316
5449
|
* @param {IParams} params 请求参数
|
|
5317
5450
|
* @param {IData} data 数据
|
|
5318
5451
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
@@ -5331,7 +5464,7 @@ var WorkFlowService = class {
|
|
|
5331
5464
|
*
|
|
5332
5465
|
* @author lxm
|
|
5333
5466
|
* @date 2022-09-30 17:09:51
|
|
5334
|
-
* @param {
|
|
5467
|
+
* @param {IContext} context 路径参数
|
|
5335
5468
|
* @param {IParams} params 请求参数
|
|
5336
5469
|
* @param {IData} data 数据
|
|
5337
5470
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
@@ -5350,7 +5483,7 @@ var WorkFlowService = class {
|
|
|
5350
5483
|
*
|
|
5351
5484
|
* @author lxm
|
|
5352
5485
|
* @date 2022-09-30 17:09:51
|
|
5353
|
-
* @param {
|
|
5486
|
+
* @param {IContext} context 路径参数
|
|
5354
5487
|
* @param {IParams} params 请求参数
|
|
5355
5488
|
* @param {IData} data 数据
|
|
5356
5489
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
@@ -5369,7 +5502,7 @@ var WorkFlowService = class {
|
|
|
5369
5502
|
*
|
|
5370
5503
|
* @author lxm
|
|
5371
5504
|
* @date 2022-09-30 17:09:51
|
|
5372
|
-
* @param {
|
|
5505
|
+
* @param {IContext} context 路径参数
|
|
5373
5506
|
* @param {IParams} params 请求参数
|
|
5374
5507
|
* @param {IData} data 数据
|
|
5375
5508
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
@@ -5388,7 +5521,7 @@ var WorkFlowService = class {
|
|
|
5388
5521
|
*
|
|
5389
5522
|
* @author lxm
|
|
5390
5523
|
* @date 2022-09-30 17:09:51
|
|
5391
|
-
* @param {
|
|
5524
|
+
* @param {IContext} context 路径参数
|
|
5392
5525
|
* @param {IParams} params 请求参数
|
|
5393
5526
|
* @param {IData} data 数据
|
|
5394
5527
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
@@ -5408,7 +5541,7 @@ var WorkFlowService = class {
|
|
|
5408
5541
|
* @author lxm
|
|
5409
5542
|
* @date 2022-09-30 17:09:38
|
|
5410
5543
|
* @param {string} methodName 接口名称
|
|
5411
|
-
* @param {
|
|
5544
|
+
* @param {IContext} context 路径参数
|
|
5412
5545
|
* @param {IParams} [params={}] 查询参数
|
|
5413
5546
|
* @param {IData} [data={}] 主数据数据
|
|
5414
5547
|
* @returns {*} {Promise<IHttpResponse<IData>>}
|
|
@@ -5454,7 +5587,7 @@ var FileService = class {
|
|
|
5454
5587
|
* @date 2022-11-25 14:11:53
|
|
5455
5588
|
* @param {IDEDataExport} dataExport 导出模型
|
|
5456
5589
|
* @param {string} fetchAction 查询方法
|
|
5457
|
-
* @param {
|
|
5590
|
+
* @param {IContext} context 上下文
|
|
5458
5591
|
* @param {IParams} params 请求参数
|
|
5459
5592
|
* @returns {*} {Promise<IHttpResponse<Blob>>}
|
|
5460
5593
|
*/
|
|
@@ -5469,56 +5602,268 @@ var FileService = class {
|
|
|
5469
5602
|
}
|
|
5470
5603
|
};
|
|
5471
5604
|
|
|
5472
|
-
// src/service/
|
|
5473
|
-
|
|
5605
|
+
// src/service/app-data-entity/app-data-entity.ts
|
|
5606
|
+
import { clone as clone5, isNil as isNil7 } from "ramda";
|
|
5607
|
+
import { DataTypes } from "@ibiz-template/core";
|
|
5608
|
+
import { createUUID as createUUID3 } from "qx-util";
|
|
5609
|
+
|
|
5610
|
+
// src/service/constant/srfuf.ts
|
|
5611
|
+
var Srfuf = /* @__PURE__ */ ((Srfuf2) => {
|
|
5612
|
+
Srfuf2[Srfuf2["CREATE"] = 0] = "CREATE";
|
|
5613
|
+
Srfuf2[Srfuf2["UPDATE"] = 1] = "UPDATE";
|
|
5614
|
+
return Srfuf2;
|
|
5615
|
+
})(Srfuf || {});
|
|
5616
|
+
|
|
5617
|
+
// src/service/app-data-entity/app-data-entity.ts
|
|
5618
|
+
var AppDataEntity = class _AppDataEntity {
|
|
5619
|
+
get srfuf() {
|
|
5620
|
+
return this.srfkey === this.tempsrfkey ? 1 /* UPDATE */ : 0 /* CREATE */;
|
|
5621
|
+
}
|
|
5474
5622
|
/**
|
|
5475
|
-
* Creates an instance of
|
|
5623
|
+
* Creates an instance of AppDataEntity.
|
|
5476
5624
|
*
|
|
5477
5625
|
* @author chitanda
|
|
5478
|
-
* @date
|
|
5479
|
-
* @param {IAppDataEntity}
|
|
5626
|
+
* @date 2023-11-16 15:11:08
|
|
5627
|
+
* @param {IAppDataEntity} entity
|
|
5628
|
+
* @param {(IData | AppDataEntity)} [data={}]
|
|
5480
5629
|
*/
|
|
5481
|
-
constructor(
|
|
5482
|
-
this
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
this
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5630
|
+
constructor(entity, data = {}) {
|
|
5631
|
+
Object.defineProperty(this, "_entity", {
|
|
5632
|
+
enumerable: false,
|
|
5633
|
+
configurable: true,
|
|
5634
|
+
value: entity
|
|
5635
|
+
});
|
|
5636
|
+
Object.defineProperty(this, "_data", {
|
|
5637
|
+
enumerable: false,
|
|
5638
|
+
configurable: true,
|
|
5639
|
+
value: data instanceof _AppDataEntity ? clone5(data._data) : clone5(data)
|
|
5640
|
+
});
|
|
5641
|
+
Object.defineProperty(this, "srfdeid", {
|
|
5642
|
+
get() {
|
|
5643
|
+
return entity.id;
|
|
5644
|
+
}
|
|
5645
|
+
});
|
|
5646
|
+
Object.defineProperty(this, "srfdecodename", {
|
|
5647
|
+
get() {
|
|
5648
|
+
return entity.codeName;
|
|
5649
|
+
}
|
|
5650
|
+
});
|
|
5651
|
+
const keyAppField = findModelChild(
|
|
5652
|
+
entity.appDEFields || [],
|
|
5653
|
+
entity.keyAppDEFieldId
|
|
5497
5654
|
);
|
|
5498
|
-
|
|
5499
|
-
|
|
5655
|
+
if (keyAppField) {
|
|
5656
|
+
const key = keyAppField.codeName.toLowerCase();
|
|
5657
|
+
Object.defineProperty(this, "srfkeyfield", {
|
|
5658
|
+
get() {
|
|
5659
|
+
return key;
|
|
5660
|
+
}
|
|
5661
|
+
});
|
|
5662
|
+
Object.defineProperty(this, "srfkey", {
|
|
5663
|
+
set(val) {
|
|
5664
|
+
this._data[key] = val;
|
|
5665
|
+
},
|
|
5666
|
+
get() {
|
|
5667
|
+
return this._data[key];
|
|
5668
|
+
}
|
|
5669
|
+
});
|
|
5670
|
+
} else {
|
|
5671
|
+
ibiz.log.warn("\u5B9E\u4F53[".concat(entity.codeName, "]\u672A\u914D\u7F6E\u4E3B\u952E\u5B57\u6BB5"));
|
|
5672
|
+
}
|
|
5673
|
+
const majorAppField = findModelChild(
|
|
5674
|
+
entity.appDEFields || [],
|
|
5675
|
+
entity.majorAppDEFieldId
|
|
5676
|
+
);
|
|
5677
|
+
if (majorAppField) {
|
|
5678
|
+
const major = majorAppField.codeName.toLowerCase();
|
|
5679
|
+
Object.defineProperty(this, "srfmajorfield", {
|
|
5680
|
+
get() {
|
|
5681
|
+
return major;
|
|
5682
|
+
}
|
|
5683
|
+
});
|
|
5684
|
+
Object.defineProperty(this, "srfmajortext", {
|
|
5685
|
+
set(val) {
|
|
5686
|
+
this._data[major] = val;
|
|
5687
|
+
},
|
|
5688
|
+
get() {
|
|
5689
|
+
return this._data[major];
|
|
5690
|
+
}
|
|
5691
|
+
});
|
|
5692
|
+
} else {
|
|
5693
|
+
ibiz.log.warn("\u5B9E\u4F53[".concat(entity.codeName, "]\u672A\u914D\u7F6E\u4E3B\u6587\u672C\u5B57\u6BB5"));
|
|
5694
|
+
}
|
|
5695
|
+
Object.defineProperty(this, "tempsrfkey", {
|
|
5696
|
+
enumerable: false,
|
|
5697
|
+
configurable: true,
|
|
5698
|
+
writable: true,
|
|
5699
|
+
value: isNil7(this.srfkey) ? createUUID3() : this.srfkey
|
|
5700
|
+
});
|
|
5701
|
+
this.defineProperties();
|
|
5500
5702
|
}
|
|
5501
5703
|
/**
|
|
5502
|
-
*
|
|
5704
|
+
* 代理实际数据
|
|
5503
5705
|
*
|
|
5504
5706
|
* @author chitanda
|
|
5505
|
-
* @date
|
|
5707
|
+
* @date 2022-10-11 22:10:55
|
|
5506
5708
|
* @protected
|
|
5507
|
-
* @param {string} id
|
|
5508
|
-
* @param {boolean} [acMode=false]
|
|
5509
|
-
* @return {*} {Method}
|
|
5510
5709
|
*/
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5710
|
+
defineProperties() {
|
|
5711
|
+
var _a;
|
|
5712
|
+
const { _data, convertVal } = this;
|
|
5713
|
+
const properties = {};
|
|
5714
|
+
const keys = Object.keys(_data);
|
|
5715
|
+
keys.forEach((key) => {
|
|
5716
|
+
properties[key] = {
|
|
5717
|
+
enumerable: true,
|
|
5718
|
+
set(val) {
|
|
5719
|
+
_data[key] = val;
|
|
5720
|
+
},
|
|
5721
|
+
get() {
|
|
5722
|
+
return _data[key];
|
|
5723
|
+
}
|
|
5724
|
+
};
|
|
5725
|
+
});
|
|
5726
|
+
(_a = this._entity.appDEFields) == null ? void 0 : _a.forEach((field) => {
|
|
5727
|
+
const key = field.codeName.toLowerCase();
|
|
5728
|
+
properties[key] = {
|
|
5729
|
+
enumerable: true,
|
|
5730
|
+
set(val) {
|
|
5731
|
+
_data[key] = convertVal(val, field.stdDataType);
|
|
5732
|
+
},
|
|
5733
|
+
get() {
|
|
5734
|
+
return _data[key];
|
|
5735
|
+
}
|
|
5736
|
+
};
|
|
5737
|
+
_data[key] = convertVal(_data[key], field.stdDataType);
|
|
5738
|
+
});
|
|
5739
|
+
Object.defineProperties(this, properties);
|
|
5740
|
+
}
|
|
5741
|
+
/**
|
|
5742
|
+
* 克隆数据
|
|
5743
|
+
*
|
|
5744
|
+
* @author chitanda
|
|
5745
|
+
* @date 2022-10-11 00:10:15
|
|
5746
|
+
* @return {*} {AppDataEntity}
|
|
5747
|
+
*/
|
|
5748
|
+
clone() {
|
|
5749
|
+
const entity = new _AppDataEntity(this._entity, this._data);
|
|
5750
|
+
entity.srfkey = this.srfkey;
|
|
5751
|
+
return entity;
|
|
5752
|
+
}
|
|
5753
|
+
/**
|
|
5754
|
+
* 合并参数
|
|
5755
|
+
*
|
|
5756
|
+
* @author chitanda
|
|
5757
|
+
* @date 2022-10-19 11:10:25
|
|
5758
|
+
* @param {(IData | AppDataEntity)} data
|
|
5759
|
+
* @return {*} {AppDataEntity}
|
|
5760
|
+
*/
|
|
5761
|
+
assign(data) {
|
|
5762
|
+
let _data = {};
|
|
5763
|
+
if (data instanceof _AppDataEntity) {
|
|
5764
|
+
_data = data._data;
|
|
5765
|
+
} else {
|
|
5766
|
+
_data = data;
|
|
5767
|
+
}
|
|
5768
|
+
Object.keys(_data).forEach((key) => {
|
|
5769
|
+
if (_data[key] === void 0) {
|
|
5770
|
+
delete _data[key];
|
|
5771
|
+
}
|
|
5772
|
+
});
|
|
5773
|
+
Object.assign(this._data, _data);
|
|
5774
|
+
return this;
|
|
5775
|
+
}
|
|
5776
|
+
/**
|
|
5777
|
+
* 根据属性的数据类型转换值
|
|
5778
|
+
* @author lxm
|
|
5779
|
+
* @date 2023-09-25 03:37:28
|
|
5780
|
+
* @protected
|
|
5781
|
+
* @param {unknown} value
|
|
5782
|
+
* @param {(number | undefined)} dataType
|
|
5783
|
+
* @return {*} {unknown}
|
|
5784
|
+
*/
|
|
5785
|
+
convertVal(value, dataType) {
|
|
5786
|
+
if (value == null) {
|
|
5787
|
+
return value;
|
|
5788
|
+
}
|
|
5789
|
+
if (isNil7(dataType)) {
|
|
5790
|
+
return value;
|
|
5791
|
+
}
|
|
5792
|
+
if (DataTypes.isNumber(dataType)) {
|
|
5793
|
+
const numVal = !isNil7(value) && value !== "" ? Number(value) : value;
|
|
5794
|
+
if (Number.isNaN(numVal)) {
|
|
5795
|
+
ibiz.log.debug("".concat(value, "\u4E0D\u80FD\u8F6C\u6362\u6210\u6570\u5B57"));
|
|
5796
|
+
return value;
|
|
5797
|
+
}
|
|
5798
|
+
return numVal;
|
|
5799
|
+
}
|
|
5800
|
+
return value;
|
|
5801
|
+
}
|
|
5802
|
+
};
|
|
5803
|
+
|
|
5804
|
+
// src/service/service/entity/de.service.ts
|
|
5805
|
+
var DEService = class {
|
|
5806
|
+
/**
|
|
5807
|
+
* Creates an instance of DEService.
|
|
5808
|
+
*
|
|
5809
|
+
* @author chitanda
|
|
5810
|
+
* @date 2023-12-22 13:12:21
|
|
5811
|
+
* @param {string} srfSessionId 当前实体会话标识
|
|
5812
|
+
* @param {IAppDataEntity} model 实体模型
|
|
5813
|
+
*/
|
|
5814
|
+
constructor(srfSessionId, model) {
|
|
5815
|
+
this.srfSessionId = srfSessionId;
|
|
5816
|
+
this.model = model;
|
|
5817
|
+
/**
|
|
5818
|
+
* 请求方法实例
|
|
5819
|
+
*
|
|
5820
|
+
* @author chitanda
|
|
5821
|
+
* @date 2022-10-10 12:10:13
|
|
5822
|
+
* @protected
|
|
5823
|
+
* @type {Map<string, Method>}
|
|
5824
|
+
*/
|
|
5825
|
+
this.methodMap = /* @__PURE__ */ new Map();
|
|
5826
|
+
/**
|
|
5827
|
+
* 是否为本地模式(临时数据模式)服务
|
|
5828
|
+
*
|
|
5829
|
+
* @author chitanda
|
|
5830
|
+
* @date 2023-12-22 16:12:13
|
|
5831
|
+
* @type {boolean}
|
|
5832
|
+
*/
|
|
5833
|
+
this.isLocalMode = false;
|
|
5834
|
+
this.local = new DECache(model);
|
|
5835
|
+
this.configCache = new ConfigService(
|
|
5836
|
+
model.appId,
|
|
5837
|
+
"PSAppDataEntity",
|
|
5838
|
+
model.codeName
|
|
5839
|
+
);
|
|
5840
|
+
this.wf = new WorkFlowService(model);
|
|
5841
|
+
this.file = new FileService(model);
|
|
5842
|
+
}
|
|
5843
|
+
/**
|
|
5844
|
+
* 获取实体服务方法实例
|
|
5845
|
+
*
|
|
5846
|
+
* @author chitanda
|
|
5847
|
+
* @date 2023-10-12 17:10:10
|
|
5848
|
+
* @protected
|
|
5849
|
+
* @param {string} id
|
|
5850
|
+
* @param {boolean} [acMode=false]
|
|
5851
|
+
* @return {*} {Method}
|
|
5852
|
+
*/
|
|
5853
|
+
async getMethod(id, acMode = false) {
|
|
5854
|
+
const cacheId = acMode ? "ac-".concat(id) : id;
|
|
5855
|
+
if (this.methodMap.has(cacheId)) {
|
|
5856
|
+
return this.methodMap.get(cacheId);
|
|
5515
5857
|
}
|
|
5516
5858
|
const model = findModelChild(this.model.appDEMethods, id);
|
|
5517
5859
|
const provider = await getDEMethodProvider(model);
|
|
5518
5860
|
if (!provider) {
|
|
5519
5861
|
throw new ModelError5(model, "\u672A\u652F\u6301\u7684\u670D\u52A1\u65B9\u6CD5\u7C7B\u578B: ".concat(model.methodType));
|
|
5520
5862
|
}
|
|
5521
|
-
const method = provider.create(this.model, model, {
|
|
5863
|
+
const method = provider.create(this, this.model, model, {
|
|
5864
|
+
acMode,
|
|
5865
|
+
localMode: this.isLocalMode
|
|
5866
|
+
});
|
|
5522
5867
|
this.methodMap.set(cacheId, method);
|
|
5523
5868
|
return method;
|
|
5524
5869
|
}
|
|
@@ -5528,7 +5873,7 @@ var DEService = class {
|
|
|
5528
5873
|
* @author chitanda
|
|
5529
5874
|
* @date 2022-09-13 19:09:55
|
|
5530
5875
|
* @param {string} id 执行服务方法标识
|
|
5531
|
-
* @param {
|
|
5876
|
+
* @param {IContext} context
|
|
5532
5877
|
* @param {IData} [params={}] 请求参数
|
|
5533
5878
|
* @param {IParams} [params2={}] 查询参数
|
|
5534
5879
|
* @return {*} {Promise<IHttpResponse>}
|
|
@@ -5579,51 +5924,12 @@ var DEService = class {
|
|
|
5579
5924
|
/**
|
|
5580
5925
|
* 查询本地数据,根据属性
|
|
5581
5926
|
*
|
|
5582
|
-
* @param {
|
|
5927
|
+
* @param {IContext} context
|
|
5583
5928
|
* @param {IParams} params 根据多实体属性查找,例:{ name: '张三', age: 18, parent: null }
|
|
5584
5929
|
* @return {*} {Promise<IDataEntity[]>}
|
|
5585
5930
|
*/
|
|
5586
5931
|
async selectLocal(context, params = {}) {
|
|
5587
|
-
|
|
5588
|
-
items = ascSort(items, "srfordervalue");
|
|
5589
|
-
const data = {};
|
|
5590
|
-
const nullData = {};
|
|
5591
|
-
const undefinedData = {};
|
|
5592
|
-
const emptyData = {};
|
|
5593
|
-
if (params.srfkey) {
|
|
5594
|
-
data.srfkey = equals2(params.srfkey);
|
|
5595
|
-
delete params.srfkey;
|
|
5596
|
-
}
|
|
5597
|
-
for (const key in params) {
|
|
5598
|
-
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
5599
|
-
const val = params[key];
|
|
5600
|
-
if (val == null) {
|
|
5601
|
-
nullData[key] = equals2(null);
|
|
5602
|
-
undefinedData[key] = equals2(void 0);
|
|
5603
|
-
emptyData[key] = equals2("");
|
|
5604
|
-
} else {
|
|
5605
|
-
data[key] = equals2(val);
|
|
5606
|
-
}
|
|
5607
|
-
}
|
|
5608
|
-
}
|
|
5609
|
-
if (!isEmpty7(data)) {
|
|
5610
|
-
const pred = where2(data);
|
|
5611
|
-
const nullPred = where2(nullData);
|
|
5612
|
-
const undefinedPred = where2(undefinedData);
|
|
5613
|
-
const emptyPred = where2(emptyData);
|
|
5614
|
-
items = items.filter((obj) => {
|
|
5615
|
-
if (isEmpty7(nullData)) {
|
|
5616
|
-
if (pred(obj)) {
|
|
5617
|
-
return true;
|
|
5618
|
-
}
|
|
5619
|
-
} else if (pred(obj) && (nullPred(obj) || undefinedPred(obj) || emptyPred(obj))) {
|
|
5620
|
-
return true;
|
|
5621
|
-
}
|
|
5622
|
-
return false;
|
|
5623
|
-
});
|
|
5624
|
-
}
|
|
5625
|
-
const list = items.map((obj) => obj.clone());
|
|
5626
|
-
return list;
|
|
5932
|
+
return this.local.select(context, params);
|
|
5627
5933
|
}
|
|
5628
5934
|
/**
|
|
5629
5935
|
* 执行服务方法 ac 模式
|
|
@@ -5631,7 +5937,7 @@ var DEService = class {
|
|
|
5631
5937
|
* @author chitanda
|
|
5632
5938
|
* @date 2022-09-13 19:09:55
|
|
5633
5939
|
* @param {string} id 执行服务方法标识
|
|
5634
|
-
* @param {
|
|
5940
|
+
* @param {IContext} context
|
|
5635
5941
|
* @param {IData} [params={}] 请求参数
|
|
5636
5942
|
* @param {IParams} [params2={}] 查询参数
|
|
5637
5943
|
* @return {*} {Promise<IHttpResponse>}
|
|
@@ -5649,7 +5955,7 @@ var DEService = class {
|
|
|
5649
5955
|
* @author chitanda
|
|
5650
5956
|
* @date 2023-10-16 16:10:16
|
|
5651
5957
|
* @param {(data: IPortalAsyncAction) => void} onmessage
|
|
5652
|
-
* @param {
|
|
5958
|
+
* @param {IContext} context
|
|
5653
5959
|
* @param {IParams} [params={}]
|
|
5654
5960
|
* @param {IData} [data={}]
|
|
5655
5961
|
* @return {*} {Promise<void>}
|
|
@@ -5687,7 +5993,7 @@ var DEService = class {
|
|
|
5687
5993
|
*
|
|
5688
5994
|
* @author chitanda
|
|
5689
5995
|
* @date 2023-10-26 14:10:58
|
|
5690
|
-
* @param {
|
|
5996
|
+
* @param {IContext} context
|
|
5691
5997
|
* @param {IParams} [params={}]
|
|
5692
5998
|
* @param {IData} [data={}]
|
|
5693
5999
|
* @return {*} {Promise<IHttpResponse>}
|
|
@@ -5703,7 +6009,7 @@ var DEService = class {
|
|
|
5703
6009
|
* @author chitanda
|
|
5704
6010
|
* @date 2023-10-26 14:10:25
|
|
5705
6011
|
* @protected
|
|
5706
|
-
* @param {
|
|
6012
|
+
* @param {IContext} context
|
|
5707
6013
|
* @param {boolean} [isHistories=false]
|
|
5708
6014
|
* @return {*} {string}
|
|
5709
6015
|
*/
|
|
@@ -5713,23 +6019,44 @@ var DEService = class {
|
|
|
5713
6019
|
const resPath = calcResPath(context, this.model);
|
|
5714
6020
|
return resPath + curPath;
|
|
5715
6021
|
}
|
|
6022
|
+
newEntity(data) {
|
|
6023
|
+
if (data instanceof AppDataEntity) {
|
|
6024
|
+
return data.clone();
|
|
6025
|
+
}
|
|
6026
|
+
return new AppDataEntity(this.model, data);
|
|
6027
|
+
}
|
|
6028
|
+
/**
|
|
6029
|
+
* 创建数据对象实例
|
|
6030
|
+
*
|
|
6031
|
+
* @author chitanda
|
|
6032
|
+
* @date 2023-12-23 19:12:57
|
|
6033
|
+
* @param {(IData[] | IDataEntity[] | IData | IDataEntity)} data
|
|
6034
|
+
* @return {*} {(IDataEntity | IDataEntity[])}
|
|
6035
|
+
*/
|
|
6036
|
+
createEntity(data) {
|
|
6037
|
+
if (Array.isArray(data)) {
|
|
6038
|
+
return data.map((item) => this.newEntity(item));
|
|
6039
|
+
}
|
|
6040
|
+
return this.newEntity(data);
|
|
6041
|
+
}
|
|
6042
|
+
/**
|
|
6043
|
+
* 服务实例销毁
|
|
6044
|
+
*
|
|
6045
|
+
* @author chitanda
|
|
6046
|
+
* @date 2023-12-22 14:12:11
|
|
6047
|
+
* @return {*} {Promise<void>}
|
|
6048
|
+
*/
|
|
6049
|
+
async destroy() {
|
|
6050
|
+
this.local.clear();
|
|
6051
|
+
}
|
|
5716
6052
|
};
|
|
5717
6053
|
|
|
5718
6054
|
// src/service/service/control/control.service.ts
|
|
5719
|
-
import { clone as
|
|
5720
|
-
|
|
5721
|
-
// src/service/vo/control.vo.ts
|
|
5722
|
-
import { createUUID as createUUID2 } from "qx-util";
|
|
5723
|
-
import { clone as clone5, isNil as isNil7 } from "ramda";
|
|
5724
|
-
|
|
5725
|
-
// src/service/constant/srfuf.ts
|
|
5726
|
-
var Srfuf = /* @__PURE__ */ ((Srfuf2) => {
|
|
5727
|
-
Srfuf2[Srfuf2["CREATE"] = 0] = "CREATE";
|
|
5728
|
-
Srfuf2[Srfuf2["UPDATE"] = 1] = "UPDATE";
|
|
5729
|
-
return Srfuf2;
|
|
5730
|
-
})(Srfuf || {});
|
|
6055
|
+
import { clone as clone7 } from "@ibiz-template/core";
|
|
5731
6056
|
|
|
5732
6057
|
// src/service/vo/control.vo.ts
|
|
6058
|
+
import { createUUID as createUUID4 } from "qx-util";
|
|
6059
|
+
import { clone as clone6, isNil as isNil8 } from "ramda";
|
|
5733
6060
|
var BuildInKeys = [
|
|
5734
6061
|
"srfkey",
|
|
5735
6062
|
"srfmajortext",
|
|
@@ -5818,7 +6145,7 @@ var ControlVO = class _ControlVO {
|
|
|
5818
6145
|
enumerable: false,
|
|
5819
6146
|
configurable: true,
|
|
5820
6147
|
writable: true,
|
|
5821
|
-
value:
|
|
6148
|
+
value: isNil8(this.srfkey) ? createUUID4() : this.srfkey
|
|
5822
6149
|
});
|
|
5823
6150
|
}
|
|
5824
6151
|
Object.defineProperty(this, "srfuf", {
|
|
@@ -5917,7 +6244,7 @@ var ControlVO = class _ControlVO {
|
|
|
5917
6244
|
* @return {*} {ControlVO}
|
|
5918
6245
|
*/
|
|
5919
6246
|
clone() {
|
|
5920
|
-
const cloneOrigin =
|
|
6247
|
+
const cloneOrigin = clone6(this.$origin);
|
|
5921
6248
|
const newVal = new _ControlVO(cloneOrigin, this.$dataUIMap);
|
|
5922
6249
|
Object.keys(this).forEach((key) => {
|
|
5923
6250
|
newVal[key] = this[key];
|
|
@@ -5971,7 +6298,7 @@ var ControlService = class {
|
|
|
5971
6298
|
* @author lxm
|
|
5972
6299
|
* @date 2022-08-31 17:08:41
|
|
5973
6300
|
* @param {string} methodName 方法名
|
|
5974
|
-
* @param {
|
|
6301
|
+
* @param {IContext} context 上下文
|
|
5975
6302
|
* @param {IParams} [params={}] 视图参数或数据
|
|
5976
6303
|
* @returns {*} {Promise<IHttpResponse>}
|
|
5977
6304
|
*/
|
|
@@ -5994,7 +6321,7 @@ var ControlService = class {
|
|
|
5994
6321
|
* @returns {*} {IHttpResponse}
|
|
5995
6322
|
*/
|
|
5996
6323
|
handleResponse(res) {
|
|
5997
|
-
return
|
|
6324
|
+
return clone7(res);
|
|
5998
6325
|
}
|
|
5999
6326
|
/**
|
|
6000
6327
|
* 实体数据转ui数据
|
|
@@ -6018,7 +6345,7 @@ var MDControlService = class extends ControlService {
|
|
|
6018
6345
|
*
|
|
6019
6346
|
* @author lxm
|
|
6020
6347
|
* @date 2022-08-31 17:08:41
|
|
6021
|
-
* @param {
|
|
6348
|
+
* @param {IContext} context 上下文
|
|
6022
6349
|
* @param {IParams} [params={}] 视图参数
|
|
6023
6350
|
* @returns {*} {Promise<IHttpResponse>}
|
|
6024
6351
|
*/
|
|
@@ -6034,7 +6361,7 @@ var MDControlService = class extends ControlService {
|
|
|
6034
6361
|
*
|
|
6035
6362
|
* @author lxm
|
|
6036
6363
|
* @date 2022-08-31 17:08:41
|
|
6037
|
-
* @param {
|
|
6364
|
+
* @param {IContext} context 上下文
|
|
6038
6365
|
* @param {IParams} [params={}] 视图参数
|
|
6039
6366
|
* @returns {*} {Promise<IHttpResponse>}
|
|
6040
6367
|
*/
|
|
@@ -6050,7 +6377,7 @@ var MDControlService = class extends ControlService {
|
|
|
6050
6377
|
*
|
|
6051
6378
|
* @author lxm
|
|
6052
6379
|
* @date 2022-08-31 17:08:41
|
|
6053
|
-
* @param {
|
|
6380
|
+
* @param {IContext} context 上下文
|
|
6054
6381
|
* @param {IParams} [params={}] 视图参数
|
|
6055
6382
|
* @returns {*} {Promise<IHttpResponse>}
|
|
6056
6383
|
*/
|
|
@@ -6066,7 +6393,7 @@ var MDControlService = class extends ControlService {
|
|
|
6066
6393
|
*
|
|
6067
6394
|
* @author lxm
|
|
6068
6395
|
* @date 2022-09-07 19:09:48
|
|
6069
|
-
* @param {
|
|
6396
|
+
* @param {IContext} context 上下文
|
|
6070
6397
|
* @param {IParams} [params={}] 视图参数
|
|
6071
6398
|
* @returns {*}
|
|
6072
6399
|
*/
|
|
@@ -6081,7 +6408,7 @@ var MDControlService = class extends ControlService {
|
|
|
6081
6408
|
*
|
|
6082
6409
|
* @author lxm
|
|
6083
6410
|
* @date 2022-09-07 19:09:11
|
|
6084
|
-
* @param {
|
|
6411
|
+
* @param {IContext} context 上下文
|
|
6085
6412
|
* @param {ControlVO} data 数据
|
|
6086
6413
|
* @returns {*}
|
|
6087
6414
|
*/
|
|
@@ -6097,7 +6424,7 @@ var MDControlService = class extends ControlService {
|
|
|
6097
6424
|
*
|
|
6098
6425
|
* @author lxm
|
|
6099
6426
|
* @date 2022-09-07 19:09:11
|
|
6100
|
-
* @param {
|
|
6427
|
+
* @param {IContext} context 上下文
|
|
6101
6428
|
* @param {ControlVO} data 数据
|
|
6102
6429
|
* @returns {*}
|
|
6103
6430
|
*/
|
|
@@ -6108,13 +6435,33 @@ var MDControlService = class extends ControlService {
|
|
|
6108
6435
|
res = this.handleResponse(res);
|
|
6109
6436
|
return res;
|
|
6110
6437
|
}
|
|
6438
|
+
/**
|
|
6439
|
+
* 批量更新数据
|
|
6440
|
+
*
|
|
6441
|
+
* @author chitanda
|
|
6442
|
+
* @date 2023-12-21 10:12:09
|
|
6443
|
+
* @param {IContext} context
|
|
6444
|
+
* @param {ControlVO[]} data
|
|
6445
|
+
* @return {*} {Promise<void>}
|
|
6446
|
+
*/
|
|
6447
|
+
async updateBatch(context, data) {
|
|
6448
|
+
var _a;
|
|
6449
|
+
const updateAction = ((_a = this.model.updateControlAction) == null ? void 0 : _a.appDEMethodId) || "update";
|
|
6450
|
+
let res = await this.exec(
|
|
6451
|
+
updateAction,
|
|
6452
|
+
context,
|
|
6453
|
+
data.map((item) => item.getOrigin())
|
|
6454
|
+
);
|
|
6455
|
+
res = this.handleResponse(res);
|
|
6456
|
+
return res;
|
|
6457
|
+
}
|
|
6111
6458
|
/**
|
|
6112
6459
|
* 导出数据
|
|
6113
6460
|
*
|
|
6114
6461
|
* @author lxm
|
|
6115
6462
|
* @date 2022-11-25 14:11:09
|
|
6116
6463
|
* @param {IPSDEDataExport} dataExport 导出模型
|
|
6117
|
-
* @param {
|
|
6464
|
+
* @param {IContext} context 上下文
|
|
6118
6465
|
* @param {IParams} [params={}] 请求参数
|
|
6119
6466
|
* @returns {*} {Promise<IHttpResponse>}
|
|
6120
6467
|
*/
|
|
@@ -6280,7 +6627,7 @@ var AuthorityService = class {
|
|
|
6280
6627
|
* @author chitanda
|
|
6281
6628
|
* @date 2022-12-23 10:12:24
|
|
6282
6629
|
* @param {string} id 实体标识
|
|
6283
|
-
* @param {
|
|
6630
|
+
* @param {IContext} [context] 上下文,用于计算模型所属沙箱环境
|
|
6284
6631
|
* @return {*} {Promise<IAppDEService>}
|
|
6285
6632
|
*/
|
|
6286
6633
|
async getService(id) {
|
|
@@ -6433,7 +6780,7 @@ var V7AuthService = class {
|
|
|
6433
6780
|
};
|
|
6434
6781
|
|
|
6435
6782
|
// src/service/service/async-action/async-action.service.ts
|
|
6436
|
-
import { isNil as
|
|
6783
|
+
import { isNil as isNil9 } from "ramda";
|
|
6437
6784
|
var AsyncActionService = class {
|
|
6438
6785
|
/**
|
|
6439
6786
|
* 获取异步操作的集合
|
|
@@ -6444,7 +6791,7 @@ var AsyncActionService = class {
|
|
|
6444
6791
|
*/
|
|
6445
6792
|
async fetch(params = {}) {
|
|
6446
6793
|
const res = await ibiz.net.post("/portal/asyncaction/all", params);
|
|
6447
|
-
if (
|
|
6794
|
+
if (isNil9(res.data)) {
|
|
6448
6795
|
res.data = [];
|
|
6449
6796
|
}
|
|
6450
6797
|
return res;
|
|
@@ -6469,208 +6816,18 @@ import {
|
|
|
6469
6816
|
RuntimeError as RuntimeError20,
|
|
6470
6817
|
RuntimeModelError as RuntimeModelError19
|
|
6471
6818
|
} from "@ibiz-template/core";
|
|
6472
|
-
import { isArray as
|
|
6819
|
+
import { isArray as isArray6, isNil as isNil10 } from "lodash-es";
|
|
6473
6820
|
|
|
6474
6821
|
// src/service/service/entity/method/method.ts
|
|
6475
6822
|
import { RuntimeModelError as RuntimeModelError8 } from "@ibiz-template/core";
|
|
6476
|
-
import { isArray as isArray4 } from "lodash-es";
|
|
6477
|
-
|
|
6478
|
-
// src/service/app-data-entity/app-data-entity.ts
|
|
6479
|
-
import { clone as clone7, isNil as isNil9 } from "ramda";
|
|
6480
|
-
import { DataTypes } from "@ibiz-template/core";
|
|
6481
|
-
import { createUUID as createUUID3 } from "qx-util";
|
|
6482
|
-
var AppDataEntity = class _AppDataEntity {
|
|
6483
|
-
get srfuf() {
|
|
6484
|
-
return this.srfkey === this.tempsrfkey ? 1 /* UPDATE */ : 0 /* CREATE */;
|
|
6485
|
-
}
|
|
6486
|
-
/**
|
|
6487
|
-
* Creates an instance of AppDataEntity.
|
|
6488
|
-
*
|
|
6489
|
-
* @author chitanda
|
|
6490
|
-
* @date 2023-11-16 15:11:08
|
|
6491
|
-
* @param {IAppDataEntity} entity
|
|
6492
|
-
* @param {(IData | AppDataEntity)} [data={}]
|
|
6493
|
-
*/
|
|
6494
|
-
constructor(entity, data = {}) {
|
|
6495
|
-
Object.defineProperty(this, "_entity", {
|
|
6496
|
-
enumerable: false,
|
|
6497
|
-
configurable: true,
|
|
6498
|
-
value: entity
|
|
6499
|
-
});
|
|
6500
|
-
Object.defineProperty(this, "_data", {
|
|
6501
|
-
enumerable: false,
|
|
6502
|
-
configurable: true,
|
|
6503
|
-
value: data instanceof _AppDataEntity ? clone7(data._data) : clone7(data)
|
|
6504
|
-
});
|
|
6505
|
-
Object.defineProperty(this, "srfdeid", {
|
|
6506
|
-
get() {
|
|
6507
|
-
return entity.id;
|
|
6508
|
-
}
|
|
6509
|
-
});
|
|
6510
|
-
Object.defineProperty(this, "srfdecodename", {
|
|
6511
|
-
get() {
|
|
6512
|
-
return entity.codeName;
|
|
6513
|
-
}
|
|
6514
|
-
});
|
|
6515
|
-
const keyAppField = findModelChild(
|
|
6516
|
-
entity.appDEFields || [],
|
|
6517
|
-
entity.keyAppDEFieldId
|
|
6518
|
-
);
|
|
6519
|
-
if (keyAppField) {
|
|
6520
|
-
const key = keyAppField.codeName.toLowerCase();
|
|
6521
|
-
Object.defineProperty(this, "srfkeyfield", {
|
|
6522
|
-
get() {
|
|
6523
|
-
return key;
|
|
6524
|
-
}
|
|
6525
|
-
});
|
|
6526
|
-
Object.defineProperty(this, "srfkey", {
|
|
6527
|
-
set(val) {
|
|
6528
|
-
this._data[key] = val;
|
|
6529
|
-
},
|
|
6530
|
-
get() {
|
|
6531
|
-
return this._data[key];
|
|
6532
|
-
}
|
|
6533
|
-
});
|
|
6534
|
-
} else {
|
|
6535
|
-
ibiz.log.warn("\u5B9E\u4F53[".concat(entity.codeName, "]\u672A\u914D\u7F6E\u4E3B\u952E\u5B57\u6BB5"));
|
|
6536
|
-
}
|
|
6537
|
-
const majorAppField = findModelChild(
|
|
6538
|
-
entity.appDEFields || [],
|
|
6539
|
-
entity.majorAppDEFieldId
|
|
6540
|
-
);
|
|
6541
|
-
if (majorAppField) {
|
|
6542
|
-
const major = majorAppField.codeName.toLowerCase();
|
|
6543
|
-
Object.defineProperty(this, "srfmajorfield", {
|
|
6544
|
-
get() {
|
|
6545
|
-
return major;
|
|
6546
|
-
}
|
|
6547
|
-
});
|
|
6548
|
-
Object.defineProperty(this, "srfmajortext", {
|
|
6549
|
-
set(val) {
|
|
6550
|
-
this._data[major] = val;
|
|
6551
|
-
},
|
|
6552
|
-
get() {
|
|
6553
|
-
return this._data[major];
|
|
6554
|
-
}
|
|
6555
|
-
});
|
|
6556
|
-
} else {
|
|
6557
|
-
ibiz.log.warn("\u5B9E\u4F53[".concat(entity.codeName, "]\u672A\u914D\u7F6E\u4E3B\u6587\u672C\u5B57\u6BB5"));
|
|
6558
|
-
}
|
|
6559
|
-
Object.defineProperty(this, "tempsrfkey", {
|
|
6560
|
-
enumerable: false,
|
|
6561
|
-
configurable: true,
|
|
6562
|
-
writable: true,
|
|
6563
|
-
value: isNil9(this.srfkey) ? createUUID3() : this.srfkey
|
|
6564
|
-
});
|
|
6565
|
-
this.defineProperties();
|
|
6566
|
-
}
|
|
6567
|
-
/**
|
|
6568
|
-
* 代理实际数据
|
|
6569
|
-
*
|
|
6570
|
-
* @author chitanda
|
|
6571
|
-
* @date 2022-10-11 22:10:55
|
|
6572
|
-
* @protected
|
|
6573
|
-
*/
|
|
6574
|
-
defineProperties() {
|
|
6575
|
-
var _a;
|
|
6576
|
-
const { _data, convertVal } = this;
|
|
6577
|
-
const properties = {};
|
|
6578
|
-
const keys = Object.keys(_data);
|
|
6579
|
-
keys.forEach((key) => {
|
|
6580
|
-
properties[key] = {
|
|
6581
|
-
enumerable: true,
|
|
6582
|
-
set(val) {
|
|
6583
|
-
_data[key] = val;
|
|
6584
|
-
},
|
|
6585
|
-
get() {
|
|
6586
|
-
return _data[key];
|
|
6587
|
-
}
|
|
6588
|
-
};
|
|
6589
|
-
});
|
|
6590
|
-
(_a = this._entity.appDEFields) == null ? void 0 : _a.forEach((field) => {
|
|
6591
|
-
const key = field.codeName.toLowerCase();
|
|
6592
|
-
properties[key] = {
|
|
6593
|
-
enumerable: true,
|
|
6594
|
-
set(val) {
|
|
6595
|
-
_data[key] = convertVal(val, field.stdDataType);
|
|
6596
|
-
},
|
|
6597
|
-
get() {
|
|
6598
|
-
return _data[key];
|
|
6599
|
-
}
|
|
6600
|
-
};
|
|
6601
|
-
_data[key] = convertVal(_data[key], field.stdDataType);
|
|
6602
|
-
});
|
|
6603
|
-
Object.defineProperties(this, properties);
|
|
6604
|
-
}
|
|
6605
|
-
/**
|
|
6606
|
-
* 克隆数据
|
|
6607
|
-
*
|
|
6608
|
-
* @author chitanda
|
|
6609
|
-
* @date 2022-10-11 00:10:15
|
|
6610
|
-
* @return {*} {AppDataEntity}
|
|
6611
|
-
*/
|
|
6612
|
-
clone() {
|
|
6613
|
-
const entity = new _AppDataEntity(this._entity, this._data);
|
|
6614
|
-
entity.srfkey = this.srfkey;
|
|
6615
|
-
return entity;
|
|
6616
|
-
}
|
|
6617
|
-
/**
|
|
6618
|
-
* 合并参数
|
|
6619
|
-
*
|
|
6620
|
-
* @author chitanda
|
|
6621
|
-
* @date 2022-10-19 11:10:25
|
|
6622
|
-
* @param {(IData | AppDataEntity)} data
|
|
6623
|
-
* @return {*} {AppDataEntity}
|
|
6624
|
-
*/
|
|
6625
|
-
assign(data) {
|
|
6626
|
-
let _data = {};
|
|
6627
|
-
if (data instanceof _AppDataEntity) {
|
|
6628
|
-
_data = data._data;
|
|
6629
|
-
} else {
|
|
6630
|
-
_data = data;
|
|
6631
|
-
}
|
|
6632
|
-
Object.keys(_data).forEach((key) => {
|
|
6633
|
-
if (_data[key] === void 0) {
|
|
6634
|
-
delete _data[key];
|
|
6635
|
-
}
|
|
6636
|
-
});
|
|
6637
|
-
Object.assign(this._data, _data);
|
|
6638
|
-
return this;
|
|
6639
|
-
}
|
|
6640
|
-
/**
|
|
6641
|
-
* 根据属性的数据类型转换值
|
|
6642
|
-
* @author lxm
|
|
6643
|
-
* @date 2023-09-25 03:37:28
|
|
6644
|
-
* @protected
|
|
6645
|
-
* @param {unknown} value
|
|
6646
|
-
* @param {(number | undefined)} dataType
|
|
6647
|
-
* @return {*} {unknown}
|
|
6648
|
-
*/
|
|
6649
|
-
convertVal(value, dataType) {
|
|
6650
|
-
if (value == null) {
|
|
6651
|
-
return value;
|
|
6652
|
-
}
|
|
6653
|
-
if (isNil9(dataType)) {
|
|
6654
|
-
return value;
|
|
6655
|
-
}
|
|
6656
|
-
if (DataTypes.isNumber(dataType)) {
|
|
6657
|
-
const numVal = !isNil9(value) && value !== "" ? Number(value) : value;
|
|
6658
|
-
if (Number.isNaN(numVal)) {
|
|
6659
|
-
ibiz.log.debug("".concat(value, "\u4E0D\u80FD\u8F6C\u6362\u6210\u6570\u5B57"));
|
|
6660
|
-
return value;
|
|
6661
|
-
}
|
|
6662
|
-
return numVal;
|
|
6663
|
-
}
|
|
6664
|
-
return value;
|
|
6665
|
-
}
|
|
6666
|
-
};
|
|
6667
6823
|
|
|
6668
6824
|
// src/service/dto/method.dto.ts
|
|
6669
6825
|
import { ModelError as ModelError6 } from "@ibiz-template/core";
|
|
6670
6826
|
var MethodDto = class _MethodDto {
|
|
6671
|
-
constructor(entity,
|
|
6827
|
+
constructor(service, entity, isLocalMode, dto) {
|
|
6828
|
+
this.service = service;
|
|
6672
6829
|
this.entity = entity;
|
|
6673
|
-
this.isLocalMode =
|
|
6830
|
+
this.isLocalMode = isLocalMode;
|
|
6674
6831
|
this.dto = dto;
|
|
6675
6832
|
this.dtoMap = /* @__PURE__ */ new Map();
|
|
6676
6833
|
if (dto) {
|
|
@@ -6680,6 +6837,18 @@ var MethodDto = class _MethodDto {
|
|
|
6680
6837
|
this.fields = [];
|
|
6681
6838
|
}
|
|
6682
6839
|
}
|
|
6840
|
+
/**
|
|
6841
|
+
* 查找本地 DTO 存储数据
|
|
6842
|
+
*
|
|
6843
|
+
* @author chitanda
|
|
6844
|
+
* @date 2023-12-22 14:12:19
|
|
6845
|
+
* @param {IContext} context
|
|
6846
|
+
* @param {IParams} [params]
|
|
6847
|
+
* @return {*} {IDataEntity[]}
|
|
6848
|
+
*/
|
|
6849
|
+
select(context, params) {
|
|
6850
|
+
return this.service.local.select(context, params);
|
|
6851
|
+
}
|
|
6683
6852
|
/**
|
|
6684
6853
|
* 转换数组成ListMap
|
|
6685
6854
|
*
|
|
@@ -6712,7 +6881,7 @@ var MethodDto = class _MethodDto {
|
|
|
6712
6881
|
*
|
|
6713
6882
|
* @author chitanda
|
|
6714
6883
|
* @date 2022-10-10 23:10:33
|
|
6715
|
-
* @param {
|
|
6884
|
+
* @param {IContext} context
|
|
6716
6885
|
* @param {IData} data
|
|
6717
6886
|
* @return {*} {Promise<IData>}
|
|
6718
6887
|
*/
|
|
@@ -6739,13 +6908,12 @@ var MethodDto = class _MethodDto {
|
|
|
6739
6908
|
if (!field.refAppDataEntityId) {
|
|
6740
6909
|
break;
|
|
6741
6910
|
}
|
|
6742
|
-
const dto = await this.getFieldDto(field);
|
|
6743
|
-
const
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
});
|
|
6911
|
+
const dto = await this.getFieldDto(context, field);
|
|
6912
|
+
const filterParams = {};
|
|
6913
|
+
if (field.refPickupAppDEFieldId) {
|
|
6914
|
+
filterParams[field.refPickupAppDEFieldId] = data.srfkey;
|
|
6915
|
+
}
|
|
6916
|
+
const items = await dto.select(context, filterParams);
|
|
6749
6917
|
if (items) {
|
|
6750
6918
|
const arr = [];
|
|
6751
6919
|
for (let j = 0; j < items.length; j++) {
|
|
@@ -6770,14 +6938,13 @@ var MethodDto = class _MethodDto {
|
|
|
6770
6938
|
*
|
|
6771
6939
|
* @author chitanda
|
|
6772
6940
|
* @date 2022-10-10 23:10:50
|
|
6773
|
-
* @param {
|
|
6941
|
+
* @param {IContext} context
|
|
6774
6942
|
* @param {IData[]} data
|
|
6775
|
-
* @return {*} {Promise<
|
|
6943
|
+
* @return {*} {Promise<IDataEntity[]>}
|
|
6776
6944
|
*/
|
|
6777
6945
|
async sets(context, data) {
|
|
6778
|
-
const service = await this.app.deService.getService(this.entity.id);
|
|
6779
6946
|
if (this.isLocalMode) {
|
|
6780
|
-
service.local.clear(
|
|
6947
|
+
this.service.local.clear();
|
|
6781
6948
|
}
|
|
6782
6949
|
return Promise.all(
|
|
6783
6950
|
data.map(async (datum) => {
|
|
@@ -6789,14 +6956,15 @@ var MethodDto = class _MethodDto {
|
|
|
6789
6956
|
if (!field.refAppDataEntityId) {
|
|
6790
6957
|
return;
|
|
6791
6958
|
}
|
|
6792
|
-
const dto = await this.getFieldDto(field);
|
|
6959
|
+
const dto = await this.getFieldDto(context, field);
|
|
6793
6960
|
const items = datum[key];
|
|
6794
6961
|
if (items) {
|
|
6795
6962
|
const pKey = datum[this.entity.keyAppDEFieldId];
|
|
6796
6963
|
items.forEach((item) => {
|
|
6797
|
-
item.
|
|
6964
|
+
item[field.refPickupAppDEFieldId] = pKey;
|
|
6798
6965
|
});
|
|
6799
6966
|
await dto.sets(context, items);
|
|
6967
|
+
delete datum[key];
|
|
6800
6968
|
} else {
|
|
6801
6969
|
await dto.sets(context, []);
|
|
6802
6970
|
}
|
|
@@ -6805,9 +6973,9 @@ var MethodDto = class _MethodDto {
|
|
|
6805
6973
|
for (let i = 0; i < all.length; i++) {
|
|
6806
6974
|
await all[i];
|
|
6807
6975
|
}
|
|
6808
|
-
const entityData =
|
|
6976
|
+
const entityData = this.service.createEntity(datum);
|
|
6809
6977
|
if (this.isLocalMode) {
|
|
6810
|
-
await service.local.add(context, entityData);
|
|
6978
|
+
await this.service.local.add(context, entityData);
|
|
6811
6979
|
}
|
|
6812
6980
|
return entityData;
|
|
6813
6981
|
})
|
|
@@ -6817,12 +6985,13 @@ var MethodDto = class _MethodDto {
|
|
|
6817
6985
|
* 获取子属性 DTO
|
|
6818
6986
|
*
|
|
6819
6987
|
* @author chitanda
|
|
6820
|
-
* @date
|
|
6988
|
+
* @date 2023-12-22 13:12:06
|
|
6821
6989
|
* @protected
|
|
6990
|
+
* @param {IContext} context
|
|
6822
6991
|
* @param {IAppDEMethodDTOField} field
|
|
6823
6992
|
* @return {*} {Promise<MethodDto>}
|
|
6824
6993
|
*/
|
|
6825
|
-
async getFieldDto(field) {
|
|
6994
|
+
async getFieldDto(context, field) {
|
|
6826
6995
|
if (this.dtoMap.has(field.codeName)) {
|
|
6827
6996
|
return this.dtoMap.get(field.codeName);
|
|
6828
6997
|
}
|
|
@@ -6834,29 +7003,31 @@ var MethodDto = class _MethodDto {
|
|
|
6834
7003
|
entity.appDEMethodDTOs || [],
|
|
6835
7004
|
field.refAppDEMethodDTOId
|
|
6836
7005
|
);
|
|
6837
|
-
const
|
|
7006
|
+
const service = await this.app.deService.getService(context, entity.id);
|
|
7007
|
+
service.isLocalMode = true;
|
|
7008
|
+
const dto = new _MethodDto(service, entity, true, methodDto);
|
|
6838
7009
|
this.dtoMap.set(field.codeName, dto);
|
|
6839
7010
|
return dto;
|
|
6840
7011
|
}
|
|
6841
7012
|
};
|
|
6842
7013
|
|
|
6843
|
-
// src/service/service/entity/util/util.ts
|
|
6844
|
-
function isLocalMode(method) {
|
|
6845
|
-
return method.actionType === "BUILTIN" || method.dataSetType === "DATAQUERY";
|
|
6846
|
-
}
|
|
6847
|
-
|
|
6848
7014
|
// src/service/service/entity/method/method-input.ts
|
|
6849
7015
|
var MethodInput = class {
|
|
6850
7016
|
/**
|
|
6851
7017
|
* Creates an instance of MethodInput.
|
|
7018
|
+
*
|
|
6852
7019
|
* @author chitanda
|
|
6853
|
-
* @date 2023-
|
|
7020
|
+
* @date 2023-12-22 13:12:57
|
|
7021
|
+
* @param {IAppDEService} service
|
|
6854
7022
|
* @param {IAppDataEntity} entity
|
|
6855
7023
|
* @param {IAppDEMethod} method
|
|
7024
|
+
* @param {boolean} [isLocalMode=false]
|
|
6856
7025
|
*/
|
|
6857
|
-
constructor(entity, method) {
|
|
7026
|
+
constructor(service, entity, method, isLocalMode = false) {
|
|
7027
|
+
this.service = service;
|
|
6858
7028
|
this.entity = entity;
|
|
6859
7029
|
this.method = method;
|
|
7030
|
+
this.isLocalMode = isLocalMode;
|
|
6860
7031
|
const input = method.appDEMethodInput;
|
|
6861
7032
|
if (input) {
|
|
6862
7033
|
const methodDto = findModelChild(
|
|
@@ -6864,19 +7035,16 @@ var MethodInput = class {
|
|
|
6864
7035
|
input.appDEMethodDTOId
|
|
6865
7036
|
);
|
|
6866
7037
|
if (methodDto) {
|
|
6867
|
-
this.dto = new MethodDto(entity, this.isLocalMode, methodDto);
|
|
7038
|
+
this.dto = new MethodDto(service, entity, this.isLocalMode, methodDto);
|
|
6868
7039
|
}
|
|
6869
7040
|
}
|
|
6870
7041
|
}
|
|
6871
|
-
get isLocalMode() {
|
|
6872
|
-
return isLocalMode(this.method);
|
|
6873
|
-
}
|
|
6874
7042
|
/**
|
|
6875
7043
|
* 处理请求发送参数
|
|
6876
7044
|
*
|
|
6877
7045
|
* @author chitanda
|
|
6878
7046
|
* @date 2022-10-11 14:10:22
|
|
6879
|
-
* @param {
|
|
7047
|
+
* @param {IContext} context
|
|
6880
7048
|
* @param {IData} data
|
|
6881
7049
|
* @return {*} {Promise<IData>}
|
|
6882
7050
|
*/
|
|
@@ -6893,15 +7061,19 @@ import { isNilOrEmpty as isNilOrEmpty5 } from "qx-util";
|
|
|
6893
7061
|
var MethodReturn = class {
|
|
6894
7062
|
/**
|
|
6895
7063
|
* Creates an instance of MethodReturn.
|
|
7064
|
+
*
|
|
6896
7065
|
* @author chitanda
|
|
6897
|
-
* @date 2023-
|
|
7066
|
+
* @date 2023-12-22 13:12:24
|
|
7067
|
+
* @param {IAppDEService} service
|
|
6898
7068
|
* @param {IAppDataEntity} entity
|
|
6899
7069
|
* @param {IAppDEMethod} method
|
|
6900
|
-
* @param {
|
|
7070
|
+
* @param {boolean} [isLocalMode=false]
|
|
6901
7071
|
*/
|
|
6902
|
-
constructor(entity, method) {
|
|
7072
|
+
constructor(service, entity, method, isLocalMode = false) {
|
|
7073
|
+
this.service = service;
|
|
6903
7074
|
this.entity = entity;
|
|
6904
7075
|
this.method = method;
|
|
7076
|
+
this.isLocalMode = isLocalMode;
|
|
6905
7077
|
const output = method.appDEMethodReturn;
|
|
6906
7078
|
if (output) {
|
|
6907
7079
|
const methodDto = findModelChild(
|
|
@@ -6909,19 +7081,16 @@ var MethodReturn = class {
|
|
|
6909
7081
|
output.appDEMethodDTOId
|
|
6910
7082
|
);
|
|
6911
7083
|
if (methodDto) {
|
|
6912
|
-
this.dto = new MethodDto(entity, this.isLocalMode, methodDto);
|
|
7084
|
+
this.dto = new MethodDto(service, entity, this.isLocalMode, methodDto);
|
|
6913
7085
|
}
|
|
6914
7086
|
}
|
|
6915
7087
|
}
|
|
6916
|
-
get isLocalMode() {
|
|
6917
|
-
return isLocalMode(this.method);
|
|
6918
|
-
}
|
|
6919
7088
|
/**
|
|
6920
7089
|
* 处理请求返回参数
|
|
6921
7090
|
*
|
|
6922
7091
|
* @author chitanda
|
|
6923
7092
|
* @date 2022-10-19 21:10:06
|
|
6924
|
-
* @param {
|
|
7093
|
+
* @param {IContext} context
|
|
6925
7094
|
* @param {IData} data
|
|
6926
7095
|
* @return {*} {Promise<IDataEntity>}
|
|
6927
7096
|
*/
|
|
@@ -6943,17 +7112,19 @@ var Method = class {
|
|
|
6943
7112
|
* Creates an instance of Method.
|
|
6944
7113
|
*
|
|
6945
7114
|
* @author chitanda
|
|
6946
|
-
* @date
|
|
7115
|
+
* @date 2023-12-22 12:12:06
|
|
7116
|
+
* @param {IAppDEService} service 当前服务实例
|
|
6947
7117
|
* @param {IAppDataEntity} entity
|
|
6948
7118
|
* @param {IAppDEMethod} method
|
|
6949
|
-
* @param {ServicePathItem[][]} paths
|
|
6950
7119
|
*/
|
|
6951
|
-
constructor(entity, method) {
|
|
7120
|
+
constructor(service, entity, method, isLocalMode = false) {
|
|
7121
|
+
this.service = service;
|
|
6952
7122
|
this.entity = entity;
|
|
6953
7123
|
this.method = method;
|
|
7124
|
+
this.isLocalMode = isLocalMode;
|
|
6954
7125
|
this.app = ibiz.hub.getApp(entity.appId);
|
|
6955
|
-
this.input = new MethodInput(entity, method);
|
|
6956
|
-
this.result = new MethodReturn(entity, method);
|
|
7126
|
+
this.input = new MethodInput(service, entity, method);
|
|
7127
|
+
this.result = new MethodReturn(service, entity, method);
|
|
6957
7128
|
}
|
|
6958
7129
|
/**
|
|
6959
7130
|
* 发送请求
|
|
@@ -6962,7 +7133,7 @@ var Method = class {
|
|
|
6962
7133
|
* @date 2022-10-10 17:10:44
|
|
6963
7134
|
* @protected
|
|
6964
7135
|
* @param {string} path
|
|
6965
|
-
* @param {
|
|
7136
|
+
* @param {IContext} context
|
|
6966
7137
|
* @param {IData} data
|
|
6967
7138
|
* @param {IParams} params
|
|
6968
7139
|
* @return {*} {Promise<HttpResponse<any>>}
|
|
@@ -7021,7 +7192,7 @@ var Method = class {
|
|
|
7021
7192
|
* @author chitanda
|
|
7022
7193
|
* @date 2022-08-24 18:08:46
|
|
7023
7194
|
* @protected
|
|
7024
|
-
* @param {
|
|
7195
|
+
* @param {IContext} context
|
|
7025
7196
|
* @return {*} {string} 拼接结果说明: /祖父实体/祖父实体主键/爷爷实体/爷爷实体主键/父实体/父实体主键/当前实体
|
|
7026
7197
|
*/
|
|
7027
7198
|
calcPath(context) {
|
|
@@ -7029,20 +7200,6 @@ var Method = class {
|
|
|
7029
7200
|
const resPath = calcResPath(context, this.entity);
|
|
7030
7201
|
return resPath + curPath;
|
|
7031
7202
|
}
|
|
7032
|
-
/**
|
|
7033
|
-
* 获取当前实体服务
|
|
7034
|
-
*
|
|
7035
|
-
* @author chitanda
|
|
7036
|
-
* @date 2022-10-11 21:10:12
|
|
7037
|
-
* @protected
|
|
7038
|
-
* @return {*} {Promise<IAppDEService>}
|
|
7039
|
-
*/
|
|
7040
|
-
async getService() {
|
|
7041
|
-
if (!this.service) {
|
|
7042
|
-
this.service = await this.app.deService.getService(this.entity.id);
|
|
7043
|
-
}
|
|
7044
|
-
return this.service;
|
|
7045
|
-
}
|
|
7046
7203
|
/**
|
|
7047
7204
|
* 创建实体
|
|
7048
7205
|
* @author lxm
|
|
@@ -7052,36 +7209,27 @@ var Method = class {
|
|
|
7052
7209
|
* @return {*} {(IDataEntity | IDataEntity[])}
|
|
7053
7210
|
*/
|
|
7054
7211
|
createEntity(data) {
|
|
7055
|
-
|
|
7056
|
-
if (single instanceof AppDataEntity) {
|
|
7057
|
-
return single.clone();
|
|
7058
|
-
}
|
|
7059
|
-
return new AppDataEntity(this.entity, single);
|
|
7060
|
-
};
|
|
7061
|
-
if (isArray4(data)) {
|
|
7062
|
-
return data.map((item) => toEntity(item));
|
|
7063
|
-
}
|
|
7064
|
-
return toEntity(data);
|
|
7212
|
+
return this.service.createEntity(data);
|
|
7065
7213
|
}
|
|
7066
7214
|
};
|
|
7067
7215
|
|
|
7068
7216
|
// src/de-logic/index.ts
|
|
7069
7217
|
import { HttpError as HttpError3, HttpResponse as HttpResponse2, RuntimeError as RuntimeError19 } from "@ibiz-template/core";
|
|
7070
|
-
import { isArray as
|
|
7218
|
+
import { isArray as isArray5 } from "lodash-es";
|
|
7071
7219
|
import { clone as clone12 } from "ramda";
|
|
7072
7220
|
|
|
7073
7221
|
// src/de-logic/de-logic.ts
|
|
7074
7222
|
import { ModelError as ModelError12, RuntimeModelError as RuntimeModelError18 } from "@ibiz-template/core";
|
|
7075
7223
|
|
|
7076
7224
|
// src/de-logic/de-logic-context.ts
|
|
7077
|
-
import { isArray as
|
|
7225
|
+
import { isArray as isArray4 } from "lodash-es";
|
|
7078
7226
|
var DELogicContext = class {
|
|
7079
7227
|
/**
|
|
7080
7228
|
* Creates an instance of DELogicContext.
|
|
7081
7229
|
* @author lxm
|
|
7082
7230
|
* @date 2023-03-24 09:15:14
|
|
7083
7231
|
* @param {Map<string, DELogicParam>} deLogicParams 实体逻辑参数集合
|
|
7084
|
-
* @param {
|
|
7232
|
+
* @param {IContext} context 上下文
|
|
7085
7233
|
* @param {IData} data 数据对象
|
|
7086
7234
|
* @param {IParams} params 视图参数
|
|
7087
7235
|
*/
|
|
@@ -7121,7 +7269,7 @@ var DELogicContext = class {
|
|
|
7121
7269
|
* @type {string}
|
|
7122
7270
|
*/
|
|
7123
7271
|
this.defaultParamName = "Default";
|
|
7124
|
-
this.parameters = { context, data:
|
|
7272
|
+
this.parameters = { context, data: isArray4(data) ? data : [data], params };
|
|
7125
7273
|
}
|
|
7126
7274
|
/**
|
|
7127
7275
|
* 上下文
|
|
@@ -7251,7 +7399,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
|
|
|
7251
7399
|
* @author lxm
|
|
7252
7400
|
* @date 2023-02-15 18:02:05
|
|
7253
7401
|
* @param {DELogicContext} ctx
|
|
7254
|
-
* @param {
|
|
7402
|
+
* @param {IContext} context
|
|
7255
7403
|
* @param {IData} data
|
|
7256
7404
|
* @return {*} {boolean}
|
|
7257
7405
|
*/
|
|
@@ -7326,7 +7474,7 @@ var DELogicLinkGroupCond = class _DELogicLinkGroupCond extends DELogicLinkCond {
|
|
|
7326
7474
|
* @author lxm
|
|
7327
7475
|
* @date 2023-02-15 17:02:19
|
|
7328
7476
|
* @param {DELogicContext} ctx
|
|
7329
|
-
* @param {
|
|
7477
|
+
* @param {IContext} context
|
|
7330
7478
|
* @param {IData} data
|
|
7331
7479
|
* @return {*} {boolean}
|
|
7332
7480
|
*/
|
|
@@ -7397,7 +7545,7 @@ var DELogicLink = class {
|
|
|
7397
7545
|
* @author lxm
|
|
7398
7546
|
* @date 2023-02-08 22:02:18
|
|
7399
7547
|
* @param {DELogicContext} ctx
|
|
7400
|
-
* @param {
|
|
7548
|
+
* @param {IContext} context
|
|
7401
7549
|
* @param {IData} data
|
|
7402
7550
|
* @return {*} {Promise<boolean>} 是否连接成功
|
|
7403
7551
|
*/
|
|
@@ -7859,7 +8007,7 @@ var DELogicParam = class {
|
|
|
7859
8007
|
* @author lxm
|
|
7860
8008
|
* @date 2023-02-08 20:02:33
|
|
7861
8009
|
* @param {DELogicContext} ctx
|
|
7862
|
-
* @param {
|
|
8010
|
+
* @param {IContext} context
|
|
7863
8011
|
* @param {IData} data
|
|
7864
8012
|
* @param {IParams} [opt]
|
|
7865
8013
|
*/
|
|
@@ -8030,7 +8178,7 @@ var DELogic = class {
|
|
|
8030
8178
|
* @date 2023-02-08 21:02:58
|
|
8031
8179
|
* @protected
|
|
8032
8180
|
* @param {DELogicContext} ctx
|
|
8033
|
-
* @param {
|
|
8181
|
+
* @param {IContext} context
|
|
8034
8182
|
* @param {IData} data
|
|
8035
8183
|
* @param {IParams} [opt]
|
|
8036
8184
|
*/
|
|
@@ -8047,7 +8195,7 @@ var DELogic = class {
|
|
|
8047
8195
|
*
|
|
8048
8196
|
* @author lxm
|
|
8049
8197
|
* @date 2023-02-08 21:02:09
|
|
8050
|
-
* @param {
|
|
8198
|
+
* @param {IContext} context
|
|
8051
8199
|
* @param {IData} data
|
|
8052
8200
|
* @param {IParams} [opt]
|
|
8053
8201
|
* @return {*} {Promise<IData>}
|
|
@@ -8154,7 +8302,7 @@ async function execFieldLogics(entity, type, context, data, params = {}) {
|
|
|
8154
8302
|
if (!data) {
|
|
8155
8303
|
return;
|
|
8156
8304
|
}
|
|
8157
|
-
if (
|
|
8305
|
+
if (isArray5(data)) {
|
|
8158
8306
|
await Promise.all(
|
|
8159
8307
|
data.map(
|
|
8160
8308
|
(item) => execSingleFieldLogics(entity, type, context, item, params)
|
|
@@ -8167,28 +8315,16 @@ async function execFieldLogics(entity, type, context, data, params = {}) {
|
|
|
8167
8315
|
|
|
8168
8316
|
// src/service/service/entity/method/de-action.ts
|
|
8169
8317
|
var DEActionMethod = class extends Method {
|
|
8170
|
-
/**
|
|
8171
|
-
* 是否为本地模式
|
|
8172
|
-
*
|
|
8173
|
-
* @author chitanda
|
|
8174
|
-
* @date 2023-04-19 16:04:46
|
|
8175
|
-
* @readonly
|
|
8176
|
-
* @protected
|
|
8177
|
-
* @type {boolean}
|
|
8178
|
-
*/
|
|
8179
|
-
get isLocalMode() {
|
|
8180
|
-
return isLocalMode(this.method);
|
|
8181
|
-
}
|
|
8182
8318
|
/**
|
|
8183
8319
|
* 处理请求发送参数
|
|
8184
8320
|
* @author lxm
|
|
8185
8321
|
* @date 2023-10-19 02:50:36
|
|
8186
|
-
* @param {
|
|
8322
|
+
* @param {IContext} context 上下文
|
|
8187
8323
|
* @param {(IData | IData[])} data 数据对象
|
|
8188
8324
|
* @return {*} {(Promise<IData | IData[]>)}
|
|
8189
8325
|
*/
|
|
8190
8326
|
async inputHandle(context, data) {
|
|
8191
|
-
if (
|
|
8327
|
+
if (isArray6(data)) {
|
|
8192
8328
|
return data;
|
|
8193
8329
|
}
|
|
8194
8330
|
return this.input.handle(context, data);
|
|
@@ -8247,7 +8383,7 @@ var DEActionMethod = class extends Method {
|
|
|
8247
8383
|
if (this.method.needResourceKey) {
|
|
8248
8384
|
let srfkey = context[this.entity.codeName.toLowerCase()];
|
|
8249
8385
|
if (isNil10(srfkey)) {
|
|
8250
|
-
srfkey =
|
|
8386
|
+
srfkey = isArray6(data) ? null : data == null ? void 0 : data[this.entity.keyAppDEFieldId];
|
|
8251
8387
|
}
|
|
8252
8388
|
path2 = "".concat(path2, "/").concat(srfkey);
|
|
8253
8389
|
}
|
|
@@ -8272,7 +8408,7 @@ var DEActionMethod = class extends Method {
|
|
|
8272
8408
|
*
|
|
8273
8409
|
* @author chitanda
|
|
8274
8410
|
* @date 2022-08-24 20:08:01
|
|
8275
|
-
* @param {
|
|
8411
|
+
* @param {IContext} context
|
|
8276
8412
|
* @param {IData} data
|
|
8277
8413
|
* @return {*} {Promise<IHttpResponse<IData>>}
|
|
8278
8414
|
*/
|
|
@@ -8293,7 +8429,7 @@ var DEActionMethod = class extends Method {
|
|
|
8293
8429
|
*
|
|
8294
8430
|
* @author chitanda
|
|
8295
8431
|
* @date 2022-08-24 20:08:56
|
|
8296
|
-
* @param {
|
|
8432
|
+
* @param {IContext} context
|
|
8297
8433
|
* @param {IParams} [params]
|
|
8298
8434
|
* @return {*} {Promise<IHttpResponse<IDataEntity>>}
|
|
8299
8435
|
*/
|
|
@@ -8313,7 +8449,7 @@ var DEActionMethod = class extends Method {
|
|
|
8313
8449
|
*
|
|
8314
8450
|
* @author chitanda
|
|
8315
8451
|
* @date 2022-09-13 19:09:39
|
|
8316
|
-
* @param {
|
|
8452
|
+
* @param {IContext} context
|
|
8317
8453
|
* @param {(IData | IDataEntity)} data
|
|
8318
8454
|
* @param {IParams} [params={}]
|
|
8319
8455
|
* @return {*} {Promise<IHttpResponse<IDataEntity>>}
|
|
@@ -8339,7 +8475,7 @@ var DEActionMethod = class extends Method {
|
|
|
8339
8475
|
*
|
|
8340
8476
|
* @author chitanda
|
|
8341
8477
|
* @date 2022-08-24 20:08:07
|
|
8342
|
-
* @param {
|
|
8478
|
+
* @param {IContext} context
|
|
8343
8479
|
* @param {IParams} [params]
|
|
8344
8480
|
* @return {*} {Promise<IHttpResponse<IDataEntity>>}
|
|
8345
8481
|
*/
|
|
@@ -8360,7 +8496,7 @@ var DEActionMethod = class extends Method {
|
|
|
8360
8496
|
*
|
|
8361
8497
|
* @author chitanda
|
|
8362
8498
|
* @date 2022-08-24 20:08:26
|
|
8363
|
-
* @param {
|
|
8499
|
+
* @param {IContext} context
|
|
8364
8500
|
* @param {IParams} [params]
|
|
8365
8501
|
* @return {*} {Promise<IHttpResponse<IData>>}
|
|
8366
8502
|
*/
|
|
@@ -8378,21 +8514,20 @@ var DEActionMethod = class extends Method {
|
|
|
8378
8514
|
*
|
|
8379
8515
|
* @author chitanda
|
|
8380
8516
|
* @date 2022-08-21 17:08:45
|
|
8381
|
-
* @param {
|
|
8517
|
+
* @param {IContext} context
|
|
8382
8518
|
* @param {IData} entity
|
|
8383
8519
|
* @return {*} {Promise<IHttpResponse<IDataEntity>>}
|
|
8384
8520
|
*/
|
|
8385
8521
|
async createTemp(context, entity) {
|
|
8386
8522
|
try {
|
|
8387
|
-
const s = await this.getService();
|
|
8388
8523
|
const addData = this.createEntity(entity);
|
|
8389
8524
|
let resultData;
|
|
8390
|
-
if (
|
|
8525
|
+
if (isArray6(addData)) {
|
|
8391
8526
|
resultData = await Promise.all(
|
|
8392
|
-
addData.map((item) =>
|
|
8527
|
+
addData.map((item) => this.service.local.add(context, item))
|
|
8393
8528
|
);
|
|
8394
8529
|
} else {
|
|
8395
|
-
resultData = await
|
|
8530
|
+
resultData = await this.service.local.add(context, addData);
|
|
8396
8531
|
}
|
|
8397
8532
|
return new HttpResponse3(resultData);
|
|
8398
8533
|
} catch (err) {
|
|
@@ -8404,7 +8539,7 @@ var DEActionMethod = class extends Method {
|
|
|
8404
8539
|
*
|
|
8405
8540
|
* @author chitanda
|
|
8406
8541
|
* @date 2022-08-21 17:08:56
|
|
8407
|
-
* @param {
|
|
8542
|
+
* @param {IContext} context
|
|
8408
8543
|
* @param {IParams} [params]
|
|
8409
8544
|
* @return {*} {Promise<IHttpResponse<IDataEntity>>}
|
|
8410
8545
|
*/
|
|
@@ -8424,7 +8559,7 @@ var DEActionMethod = class extends Method {
|
|
|
8424
8559
|
*
|
|
8425
8560
|
* @author chitanda
|
|
8426
8561
|
* @date 2022-08-21 17:08:11
|
|
8427
|
-
* @param {
|
|
8562
|
+
* @param {IContext} context
|
|
8428
8563
|
* @param {IParams} [params]
|
|
8429
8564
|
* @return {*} {Promise<IHttpResponse<IDataEntity>>}
|
|
8430
8565
|
*/
|
|
@@ -8436,8 +8571,7 @@ var DEActionMethod = class extends Method {
|
|
|
8436
8571
|
if (!key && context) {
|
|
8437
8572
|
key = context[this.entity.codeName.toLowerCase()];
|
|
8438
8573
|
}
|
|
8439
|
-
const
|
|
8440
|
-
const data = s.local.delete(context, key);
|
|
8574
|
+
const data = this.service.local.delete(context, key);
|
|
8441
8575
|
if (data) {
|
|
8442
8576
|
return new HttpResponse3(data);
|
|
8443
8577
|
}
|
|
@@ -8451,21 +8585,20 @@ var DEActionMethod = class extends Method {
|
|
|
8451
8585
|
*
|
|
8452
8586
|
* @author chitanda
|
|
8453
8587
|
* @date 2022-08-21 17:08:17
|
|
8454
|
-
* @param {
|
|
8588
|
+
* @param {IContext} context
|
|
8455
8589
|
* @param {IData} entity
|
|
8456
8590
|
* @return {*} {Promise<IHttpResponse<IDataEntity>>}
|
|
8457
8591
|
*/
|
|
8458
8592
|
async updateTemp(context, entity) {
|
|
8459
8593
|
try {
|
|
8460
|
-
const s = await this.getService();
|
|
8461
8594
|
const updateData = this.createEntity(entity);
|
|
8462
8595
|
let resultData;
|
|
8463
|
-
if (
|
|
8596
|
+
if (isArray6(updateData)) {
|
|
8464
8597
|
resultData = await Promise.all(
|
|
8465
|
-
updateData.map((item) =>
|
|
8598
|
+
updateData.map((item) => this.service.local.update(context, item))
|
|
8466
8599
|
);
|
|
8467
8600
|
} else {
|
|
8468
|
-
resultData = await
|
|
8601
|
+
resultData = await this.service.local.update(context, updateData);
|
|
8469
8602
|
}
|
|
8470
8603
|
if (resultData) {
|
|
8471
8604
|
return new HttpResponse3(resultData);
|
|
@@ -8480,7 +8613,7 @@ var DEActionMethod = class extends Method {
|
|
|
8480
8613
|
*
|
|
8481
8614
|
* @author chitanda
|
|
8482
8615
|
* @date 2022-08-21 17:08:23
|
|
8483
|
-
* @param {
|
|
8616
|
+
* @param {IContext} context
|
|
8484
8617
|
* @param {IParams} [params]
|
|
8485
8618
|
* @return {*} {Promise<IHttpResponse<IDataEntity>>}
|
|
8486
8619
|
*/
|
|
@@ -8492,8 +8625,7 @@ var DEActionMethod = class extends Method {
|
|
|
8492
8625
|
if (!key && context) {
|
|
8493
8626
|
key = context[this.entity.codeName.toLowerCase()];
|
|
8494
8627
|
}
|
|
8495
|
-
const
|
|
8496
|
-
const data = s.local.get(context, key);
|
|
8628
|
+
const data = this.service.local.get(context, key);
|
|
8497
8629
|
if (data) {
|
|
8498
8630
|
return new HttpResponse3(data);
|
|
8499
8631
|
}
|
|
@@ -8505,7 +8637,7 @@ var DEActionMethod = class extends Method {
|
|
|
8505
8637
|
/**
|
|
8506
8638
|
* 批量删除本地数据
|
|
8507
8639
|
*
|
|
8508
|
-
* @param {
|
|
8640
|
+
* @param {IContext} context
|
|
8509
8641
|
* @param {IParams} [params]
|
|
8510
8642
|
* @return {*} {Promise<IHttpResponse>}
|
|
8511
8643
|
*/
|
|
@@ -8516,8 +8648,8 @@ var DEActionMethod = class extends Method {
|
|
|
8516
8648
|
|
|
8517
8649
|
// src/service/service/entity/method/provider/de-action-de-method.provider.ts
|
|
8518
8650
|
var DeActionDeMethodProvider = class {
|
|
8519
|
-
create(entity, method,
|
|
8520
|
-
return new DEActionMethod(entity, method);
|
|
8651
|
+
create(service, entity, method, opts) {
|
|
8652
|
+
return new DEActionMethod(service, entity, method, opts.localMode);
|
|
8521
8653
|
}
|
|
8522
8654
|
};
|
|
8523
8655
|
|
|
@@ -8527,15 +8659,12 @@ import {
|
|
|
8527
8659
|
ModelError as ModelError13,
|
|
8528
8660
|
RuntimeModelError as RuntimeModelError20
|
|
8529
8661
|
} from "@ibiz-template/core";
|
|
8530
|
-
import { isArray as
|
|
8531
|
-
import { clone as clone13, isEmpty as
|
|
8662
|
+
import { isArray as isArray7 } from "lodash-es";
|
|
8663
|
+
import { clone as clone13, isEmpty as isEmpty7, isNil as isNil11 } from "ramda";
|
|
8532
8664
|
import { ascSort as ascSort2, descSort } from "qx-util";
|
|
8533
8665
|
var FetchMethod = class extends Method {
|
|
8534
|
-
get isLocalMode() {
|
|
8535
|
-
return isLocalMode(this.method);
|
|
8536
|
-
}
|
|
8537
8666
|
async exec(context, params, params2) {
|
|
8538
|
-
const searchParams = params && !
|
|
8667
|
+
const searchParams = params && !isArray7(params) ? params : params2 || {};
|
|
8539
8668
|
if (this.isLocalMode) {
|
|
8540
8669
|
const items2 = await this.searchLocal(
|
|
8541
8670
|
null,
|
|
@@ -8586,15 +8715,14 @@ var FetchMethod = class extends Method {
|
|
|
8586
8715
|
* @return {*} {Promise<IDataEntity[]>}
|
|
8587
8716
|
*/
|
|
8588
8717
|
async searchLocal(cond, filter, queryParamKeys = this.entity.quickSearchAppDEFieldIds) {
|
|
8589
|
-
const service = await this.getService();
|
|
8590
8718
|
let list = [];
|
|
8591
8719
|
if (cond) {
|
|
8592
|
-
list = service.local.getList(
|
|
8720
|
+
list = this.service.local.getList();
|
|
8593
8721
|
if (list.length > 0) {
|
|
8594
8722
|
list = list.filter((obj) => cond.test(obj, filter));
|
|
8595
8723
|
}
|
|
8596
8724
|
} else {
|
|
8597
|
-
list = await service.
|
|
8725
|
+
list = await this.service.local.select(filter.context, filter.data);
|
|
8598
8726
|
if (list.length > 0) {
|
|
8599
8727
|
if (filter.query && filter.query !== "") {
|
|
8600
8728
|
if (queryParamKeys) {
|
|
@@ -8613,7 +8741,7 @@ var FetchMethod = class extends Method {
|
|
|
8613
8741
|
}
|
|
8614
8742
|
}
|
|
8615
8743
|
}
|
|
8616
|
-
if (!isNil11(filter.sortField) && !
|
|
8744
|
+
if (!isNil11(filter.sortField) && !isEmpty7(filter.sortField)) {
|
|
8617
8745
|
if (filter.sortMode === "DESC") {
|
|
8618
8746
|
list = descSort(list, filter.sortField);
|
|
8619
8747
|
} else {
|
|
@@ -8630,7 +8758,7 @@ var FetchMethod = class extends Method {
|
|
|
8630
8758
|
* 获取代码表数据来源的集合
|
|
8631
8759
|
* @author lxm
|
|
8632
8760
|
* @date 2023-08-03 02:55:00
|
|
8633
|
-
* @param {
|
|
8761
|
+
* @param {IContext} context
|
|
8634
8762
|
* @param {IParams} params
|
|
8635
8763
|
* @return {*} {Promise<HttpResponse<IData[]>>}
|
|
8636
8764
|
*/
|
|
@@ -8662,11 +8790,11 @@ var AcFetchMethod = class extends FetchMethod {
|
|
|
8662
8790
|
|
|
8663
8791
|
// src/service/service/entity/method/provider/fetch-de-method.provider.ts
|
|
8664
8792
|
var FetchDeMethodProvider = class {
|
|
8665
|
-
create(entity, method, opts) {
|
|
8793
|
+
create(service, entity, method, opts) {
|
|
8666
8794
|
if (opts.acMode) {
|
|
8667
|
-
return new AcFetchMethod(entity, method);
|
|
8795
|
+
return new AcFetchMethod(service, entity, method, opts.localMode);
|
|
8668
8796
|
}
|
|
8669
|
-
return new FetchMethod(entity, method);
|
|
8797
|
+
return new FetchMethod(service, entity, method, opts.localMode);
|
|
8670
8798
|
}
|
|
8671
8799
|
};
|
|
8672
8800
|
|
|
@@ -8680,13 +8808,14 @@ function presetDEMethodProvider() {
|
|
|
8680
8808
|
}
|
|
8681
8809
|
|
|
8682
8810
|
// src/service/vo/tree-node-data/tree-node-data.ts
|
|
8683
|
-
import { createUUID as
|
|
8811
|
+
import { createUUID as createUUID5 } from "qx-util";
|
|
8684
8812
|
var TreeNodeData = class {
|
|
8685
8813
|
constructor(model, parentNodeData, opts) {
|
|
8686
|
-
this._uuid =
|
|
8814
|
+
this._uuid = createUUID5();
|
|
8687
8815
|
this.leaf = false;
|
|
8688
8816
|
this.leaf = opts.leaf === true;
|
|
8689
8817
|
this.parent = parentNodeData;
|
|
8818
|
+
this._nodeType = model.treeNodeType;
|
|
8690
8819
|
if (this.parent) {
|
|
8691
8820
|
this.context = { ...this.parent.context };
|
|
8692
8821
|
}
|
|
@@ -8749,8 +8878,10 @@ var TreeCodeListNodeData = class extends TreeNodeData {
|
|
|
8749
8878
|
};
|
|
8750
8879
|
|
|
8751
8880
|
// src/service/vo/tree-node-data/tree-data-set-node-data.ts
|
|
8881
|
+
import { updateKeyDefine } from "@ibiz-template/core";
|
|
8752
8882
|
var TreeDataSetNodeData = class extends TreeNodeData {
|
|
8753
8883
|
constructor(model, parentNodeData, opts) {
|
|
8884
|
+
var _a;
|
|
8754
8885
|
super(model, parentNodeData, opts);
|
|
8755
8886
|
const { data } = opts;
|
|
8756
8887
|
this.deData = data;
|
|
@@ -8777,6 +8908,50 @@ var TreeDataSetNodeData = class extends TreeNodeData {
|
|
|
8777
8908
|
if (model.leafFlagAppDEFieldId) {
|
|
8778
8909
|
this.leaf = fieldValueToBoolean(data[model.leafFlagAppDEFieldId]);
|
|
8779
8910
|
}
|
|
8911
|
+
const dataItemkeyMap = /* @__PURE__ */ new Map();
|
|
8912
|
+
const dataItemDefaults = {};
|
|
8913
|
+
(_a = model.detreeNodeDataItems) == null ? void 0 : _a.forEach((dataItem) => {
|
|
8914
|
+
const uiKey = dataItem.id.toLowerCase();
|
|
8915
|
+
const deFieldKey = dataItem.appDEFieldId.toLowerCase();
|
|
8916
|
+
dataItemkeyMap.set(uiKey, deFieldKey);
|
|
8917
|
+
if (dataItem.defaultValue) {
|
|
8918
|
+
dataItemDefaults[uiKey] = dataItem.defaultValue;
|
|
8919
|
+
}
|
|
8920
|
+
});
|
|
8921
|
+
return new Proxy(this, {
|
|
8922
|
+
set(target, p, value) {
|
|
8923
|
+
if (Object.prototype.hasOwnProperty.call(target.deData, p)) {
|
|
8924
|
+
target.deData[p] = value;
|
|
8925
|
+
} else if (dataItemkeyMap.has(p)) {
|
|
8926
|
+
target.deData[dataItemkeyMap.get(p)] = value;
|
|
8927
|
+
} else {
|
|
8928
|
+
target[p] = value;
|
|
8929
|
+
}
|
|
8930
|
+
return true;
|
|
8931
|
+
},
|
|
8932
|
+
get(target, p, _receiver) {
|
|
8933
|
+
if (target[p] !== void 0) {
|
|
8934
|
+
return target[p];
|
|
8935
|
+
}
|
|
8936
|
+
if (dataItemkeyMap.has(p)) {
|
|
8937
|
+
return target.deData[dataItemkeyMap.get(p)] || dataItemDefaults[p];
|
|
8938
|
+
}
|
|
8939
|
+
if (target.deData[p] !== void 0) {
|
|
8940
|
+
return target.deData[p];
|
|
8941
|
+
}
|
|
8942
|
+
},
|
|
8943
|
+
ownKeys(target) {
|
|
8944
|
+
const allKeys = [
|
|
8945
|
+
.../* @__PURE__ */ new Set([
|
|
8946
|
+
...Object.keys(target),
|
|
8947
|
+
...dataItemkeyMap.keys(),
|
|
8948
|
+
...Object.keys(target.deData)
|
|
8949
|
+
])
|
|
8950
|
+
];
|
|
8951
|
+
updateKeyDefine(target, allKeys);
|
|
8952
|
+
return allKeys;
|
|
8953
|
+
}
|
|
8954
|
+
});
|
|
8780
8955
|
}
|
|
8781
8956
|
calcIcon(model) {
|
|
8782
8957
|
const icon = super.calcIcon(model) || {};
|
|
@@ -8981,7 +9156,7 @@ var CalendarItemData = class {
|
|
|
8981
9156
|
};
|
|
8982
9157
|
|
|
8983
9158
|
// src/service/vo/map-data/map-data.ts
|
|
8984
|
-
function
|
|
9159
|
+
function updateKeyDefine2(target, keys) {
|
|
8985
9160
|
keys.forEach((key) => {
|
|
8986
9161
|
if (!Object.prototype.hasOwnProperty.call(target, key)) {
|
|
8987
9162
|
Object.defineProperty(target, key, {
|
|
@@ -9067,7 +9242,7 @@ var MapData = class {
|
|
|
9067
9242
|
const allKeys = [
|
|
9068
9243
|
.../* @__PURE__ */ new Set([...Object.keys(target), ...Object.keys(deData)])
|
|
9069
9244
|
];
|
|
9070
|
-
|
|
9245
|
+
updateKeyDefine2(target, allKeys);
|
|
9071
9246
|
return allKeys;
|
|
9072
9247
|
}
|
|
9073
9248
|
});
|
|
@@ -9076,7 +9251,7 @@ var MapData = class {
|
|
|
9076
9251
|
|
|
9077
9252
|
// src/service/vo/panel-data/panel-data.ts
|
|
9078
9253
|
import { QXEvent as QXEvent2 } from "qx-util";
|
|
9079
|
-
function
|
|
9254
|
+
function updateKeyDefine3(target, keys) {
|
|
9080
9255
|
keys.forEach((key) => {
|
|
9081
9256
|
if (!Object.prototype.hasOwnProperty.call(target, key)) {
|
|
9082
9257
|
Object.defineProperty(target, key, {
|
|
@@ -9134,7 +9309,7 @@ var PanelData = class {
|
|
|
9134
9309
|
},
|
|
9135
9310
|
ownKeys(target) {
|
|
9136
9311
|
const allKeys = Object.keys(origin);
|
|
9137
|
-
|
|
9312
|
+
updateKeyDefine3(target, allKeys);
|
|
9138
9313
|
return allKeys;
|
|
9139
9314
|
}
|
|
9140
9315
|
});
|
|
@@ -9145,8 +9320,8 @@ var PanelData = class {
|
|
|
9145
9320
|
};
|
|
9146
9321
|
|
|
9147
9322
|
// src/service/vo/chart-data/chart-data.ts
|
|
9148
|
-
import { createUUID as
|
|
9149
|
-
function
|
|
9323
|
+
import { createUUID as createUUID6 } from "qx-util";
|
|
9324
|
+
function updateKeyDefine4(target, keys) {
|
|
9150
9325
|
keys.forEach((key) => {
|
|
9151
9326
|
if (!Object.prototype.hasOwnProperty.call(target, key)) {
|
|
9152
9327
|
Object.defineProperty(target, key, {
|
|
@@ -9163,7 +9338,7 @@ var ChartData = class {
|
|
|
9163
9338
|
this._seriesModelId = seriesModel == null ? void 0 : seriesModel.id;
|
|
9164
9339
|
this._catalog = catalog;
|
|
9165
9340
|
this._groupName = groupName;
|
|
9166
|
-
this._uuid =
|
|
9341
|
+
this._uuid = createUUID6();
|
|
9167
9342
|
return new Proxy(this, {
|
|
9168
9343
|
set(target, p, value) {
|
|
9169
9344
|
if (Object.prototype.hasOwnProperty.call(deData, p)) {
|
|
@@ -9185,7 +9360,7 @@ var ChartData = class {
|
|
|
9185
9360
|
const allKeys = [
|
|
9186
9361
|
.../* @__PURE__ */ new Set([...Object.keys(target), ...Object.keys(deData)])
|
|
9187
9362
|
];
|
|
9188
|
-
|
|
9363
|
+
updateKeyDefine4(target, allKeys);
|
|
9189
9364
|
return allKeys;
|
|
9190
9365
|
}
|
|
9191
9366
|
});
|
|
@@ -9322,7 +9497,7 @@ var GanttCodeListNodeData = class extends TreeCodeListNodeData {
|
|
|
9322
9497
|
};
|
|
9323
9498
|
|
|
9324
9499
|
// src/service/mqtt/mqtt.service.ts
|
|
9325
|
-
import { QXEvent as QXEvent3, createUUID as
|
|
9500
|
+
import { QXEvent as QXEvent3, createUUID as createUUID7, isNilOrEmpty as isNilOrEmpty6 } from "qx-util";
|
|
9326
9501
|
var MqttService = class {
|
|
9327
9502
|
/**
|
|
9328
9503
|
* Creates an instance of MqttService.
|
|
@@ -9356,7 +9531,7 @@ var MqttService = class {
|
|
|
9356
9531
|
// 超时时间
|
|
9357
9532
|
connectTimeout: 6e3,
|
|
9358
9533
|
// 认证信息
|
|
9359
|
-
clientId:
|
|
9534
|
+
clientId: createUUID7(),
|
|
9360
9535
|
username: "",
|
|
9361
9536
|
password: "",
|
|
9362
9537
|
// 心跳时间
|
|
@@ -9416,7 +9591,7 @@ var MqttService = class {
|
|
|
9416
9591
|
|
|
9417
9592
|
// src/service/de-service-util.ts
|
|
9418
9593
|
import { RuntimeError as RuntimeError21 } from "@ibiz-template/core";
|
|
9419
|
-
var
|
|
9594
|
+
var _DEServiceUtil = class _DEServiceUtil {
|
|
9420
9595
|
/**
|
|
9421
9596
|
* Creates an instance of DEServiceUtil.
|
|
9422
9597
|
*
|
|
@@ -9432,39 +9607,37 @@ var DEServiceUtil = class {
|
|
|
9432
9607
|
* @author chitanda
|
|
9433
9608
|
* @date 2022-08-17 23:08:36
|
|
9434
9609
|
* @protected
|
|
9435
|
-
* @type {Map<string, IAppDEService
|
|
9610
|
+
* @type {Map<string, Map<string, IAppDEService>>} Map<域标识, Map<实体标识, 实体服务>>
|
|
9436
9611
|
*/
|
|
9437
9612
|
this.cache = /* @__PURE__ */ new Map();
|
|
9438
|
-
/**
|
|
9439
|
-
* 实体服务构造方法缓存
|
|
9440
|
-
* @author lxm
|
|
9441
|
-
* @date 2023-05-15 08:37:13
|
|
9442
|
-
* @protected
|
|
9443
|
-
*/
|
|
9444
|
-
this.constructorCache = /* @__PURE__ */ new Map();
|
|
9445
9613
|
}
|
|
9446
9614
|
/**
|
|
9447
9615
|
* 注册服务工厂方法
|
|
9448
9616
|
*
|
|
9449
9617
|
* @author chitanda
|
|
9450
9618
|
* @date 2023-06-14 10:06:31
|
|
9451
|
-
* @param {string} id
|
|
9452
|
-
* @param {
|
|
9619
|
+
* @param {string} id 实体标识
|
|
9620
|
+
* @param {DEServiceConstructor} constructor
|
|
9453
9621
|
*/
|
|
9454
|
-
register(id, constructor) {
|
|
9455
|
-
this.constructorCache.set(id, constructor);
|
|
9622
|
+
static register(id, constructor) {
|
|
9623
|
+
this.constructorCache.set(id.toUpperCase(), constructor);
|
|
9456
9624
|
}
|
|
9457
9625
|
/**
|
|
9458
9626
|
* 根据实体标识获取实体服务
|
|
9459
9627
|
*
|
|
9460
9628
|
* @author chitanda
|
|
9461
|
-
* @date
|
|
9629
|
+
* @date 2023-12-22 10:12:47
|
|
9630
|
+
* @param {IContext} context 上下文,用于计算模型所属沙箱环境
|
|
9462
9631
|
* @param {string} id 实体标识
|
|
9463
|
-
* @param {IParams} [context] 上下文,用于计算模型所属沙箱环境
|
|
9464
9632
|
* @return {*} {Promise<IAppDEService>}
|
|
9465
9633
|
*/
|
|
9466
|
-
async getService(id) {
|
|
9467
|
-
|
|
9634
|
+
async getService(context, id) {
|
|
9635
|
+
const sandboxId = context.srfsessionid;
|
|
9636
|
+
if (!this.cache.has(sandboxId)) {
|
|
9637
|
+
this.cache.set(sandboxId, /* @__PURE__ */ new Map());
|
|
9638
|
+
}
|
|
9639
|
+
const map = this.cache.get(sandboxId);
|
|
9640
|
+
if (!map.has(id)) {
|
|
9468
9641
|
const entityModel = await ibiz.hub.getAppDataEntity(
|
|
9469
9642
|
id,
|
|
9470
9643
|
this.appModel.appId
|
|
@@ -9472,16 +9645,35 @@ var DEServiceUtil = class {
|
|
|
9472
9645
|
if (!entityModel) {
|
|
9473
9646
|
throw new RuntimeError21("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
9474
9647
|
}
|
|
9475
|
-
const constructor =
|
|
9648
|
+
const constructor = _DEServiceUtil.constructorCache.get(id.toUpperCase());
|
|
9476
9649
|
let service;
|
|
9477
9650
|
if (constructor) {
|
|
9478
|
-
service = await constructor(entityModel);
|
|
9651
|
+
service = await constructor(sandboxId, entityModel);
|
|
9479
9652
|
} else {
|
|
9480
|
-
service = new DEService(entityModel);
|
|
9653
|
+
service = new DEService(sandboxId, entityModel);
|
|
9481
9654
|
}
|
|
9482
|
-
|
|
9655
|
+
map.set(id, service);
|
|
9483
9656
|
}
|
|
9484
|
-
return
|
|
9657
|
+
return map.get(id);
|
|
9658
|
+
}
|
|
9659
|
+
/**
|
|
9660
|
+
* 重置服务, 删除指定域下的所有服务缓存
|
|
9661
|
+
*
|
|
9662
|
+
* @author chitanda
|
|
9663
|
+
* @date 2023-12-22 13:12:47
|
|
9664
|
+
* @param {IContext} context
|
|
9665
|
+
* @return {*} {void}
|
|
9666
|
+
*/
|
|
9667
|
+
reset(context) {
|
|
9668
|
+
const sandboxId = context.srfsessionid;
|
|
9669
|
+
if (!this.cache.has(sandboxId)) {
|
|
9670
|
+
return;
|
|
9671
|
+
}
|
|
9672
|
+
const map = this.cache.get(sandboxId);
|
|
9673
|
+
map.forEach((service) => {
|
|
9674
|
+
service.destroy();
|
|
9675
|
+
});
|
|
9676
|
+
this.cache.delete(sandboxId);
|
|
9485
9677
|
}
|
|
9486
9678
|
/**
|
|
9487
9679
|
* 清理所有服务, 当前临时域下的所有临时数据缓存
|
|
@@ -9489,11 +9681,16 @@ var DEServiceUtil = class {
|
|
|
9489
9681
|
* @description 根据 srfsessionid 作为临时数据域
|
|
9490
9682
|
* @author chitanda
|
|
9491
9683
|
* @date 2022-08-18 14:08:48
|
|
9492
|
-
* @param {
|
|
9684
|
+
* @param {IContext} context
|
|
9493
9685
|
*/
|
|
9494
9686
|
clearTempCache(context) {
|
|
9495
|
-
|
|
9496
|
-
|
|
9687
|
+
const sandboxId = context.srfsessionid;
|
|
9688
|
+
if (!this.cache.has(sandboxId)) {
|
|
9689
|
+
return;
|
|
9690
|
+
}
|
|
9691
|
+
const map = this.cache.get(sandboxId);
|
|
9692
|
+
map.forEach((service) => {
|
|
9693
|
+
service.local.clear();
|
|
9497
9694
|
});
|
|
9498
9695
|
}
|
|
9499
9696
|
/**
|
|
@@ -9502,16 +9699,25 @@ var DEServiceUtil = class {
|
|
|
9502
9699
|
* @date 2023-04-26 02:02:43
|
|
9503
9700
|
* @param {string} appDataEntityId 实体名称
|
|
9504
9701
|
* @param {string} methodName 方法名
|
|
9505
|
-
* @param {
|
|
9702
|
+
* @param {IContext} context 上下文
|
|
9506
9703
|
* @param {(IData | undefined)} [params] 数据
|
|
9507
9704
|
* @param {(IParams | undefined)} [params2] 视图参数
|
|
9508
9705
|
* @return {*} {Promise<IHttpResponse<IData>>}
|
|
9509
9706
|
*/
|
|
9510
9707
|
async exec(appDataEntityId, methodName, context, params, params2) {
|
|
9511
|
-
const service = await this.getService(appDataEntityId);
|
|
9708
|
+
const service = await this.getService(context, appDataEntityId);
|
|
9512
9709
|
return service.exec(methodName, context, params, params2);
|
|
9513
9710
|
}
|
|
9514
9711
|
};
|
|
9712
|
+
/**
|
|
9713
|
+
* 实体服务构造方法缓存
|
|
9714
|
+
*
|
|
9715
|
+
* @author lxm
|
|
9716
|
+
* @date 2023-05-15 08:37:13
|
|
9717
|
+
* @protected
|
|
9718
|
+
*/
|
|
9719
|
+
_DEServiceUtil.constructorCache = /* @__PURE__ */ new Map();
|
|
9720
|
+
var DEServiceUtil = _DEServiceUtil;
|
|
9515
9721
|
|
|
9516
9722
|
// src/command/app/open-app-view/open-app-view.ts
|
|
9517
9723
|
var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
@@ -9997,20 +10203,43 @@ var AppViewConfigService = class {
|
|
|
9997
10203
|
*/
|
|
9998
10204
|
this.viewConfigs = /* @__PURE__ */ new Map();
|
|
9999
10205
|
}
|
|
10206
|
+
/**
|
|
10207
|
+
* 计算应用视图 标识
|
|
10208
|
+
*
|
|
10209
|
+
* @author chitanda
|
|
10210
|
+
* @date 2023-04-20 18:04:48
|
|
10211
|
+
* @protected
|
|
10212
|
+
* @param {string} tag
|
|
10213
|
+
* @return {*} {string}
|
|
10214
|
+
*/
|
|
10215
|
+
calcAppViewId(tag) {
|
|
10216
|
+
let id = "";
|
|
10217
|
+
if (tag.indexOf(".") !== -1) {
|
|
10218
|
+
const ids = tag.split(".");
|
|
10219
|
+
id = ids[ids.length - 1];
|
|
10220
|
+
} else {
|
|
10221
|
+
id = tag.toLowerCase();
|
|
10222
|
+
}
|
|
10223
|
+
return id;
|
|
10224
|
+
}
|
|
10000
10225
|
has(key) {
|
|
10001
|
-
|
|
10226
|
+
const id = this.calcAppViewId(key);
|
|
10227
|
+
return this.viewConfigs.has(id);
|
|
10002
10228
|
}
|
|
10003
|
-
set(
|
|
10229
|
+
set(key, viewConfig) {
|
|
10230
|
+
const id = this.calcAppViewId(key);
|
|
10004
10231
|
this.viewConfigs.set(id, viewConfig);
|
|
10005
10232
|
}
|
|
10006
10233
|
async get(key) {
|
|
10007
|
-
|
|
10008
|
-
|
|
10234
|
+
const id = this.calcAppViewId(key);
|
|
10235
|
+
if (!this.viewConfigs.has(id)) {
|
|
10236
|
+
const model = await ibiz.hub.getAppView(id);
|
|
10009
10237
|
if (!model) {
|
|
10010
|
-
throw new RuntimeError24("\u89C6\u56FE[".concat(
|
|
10238
|
+
throw new RuntimeError24("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
10011
10239
|
}
|
|
10012
10240
|
this.set(model.id, {
|
|
10013
10241
|
id: model.id,
|
|
10242
|
+
appId: model.appId,
|
|
10014
10243
|
codeName: model.codeName,
|
|
10015
10244
|
openMode: model.openMode,
|
|
10016
10245
|
viewType: model.viewType,
|
|
@@ -10020,7 +10249,7 @@ var AppViewConfigService = class {
|
|
|
10020
10249
|
redirectView: model.redirectView
|
|
10021
10250
|
});
|
|
10022
10251
|
}
|
|
10023
|
-
return this.viewConfigs.get(
|
|
10252
|
+
return this.viewConfigs.get(id);
|
|
10024
10253
|
}
|
|
10025
10254
|
getSync(key) {
|
|
10026
10255
|
if (this.viewConfigs.has(key)) {
|
|
@@ -10062,9 +10291,9 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
10062
10291
|
})(PanelNotifyState || {});
|
|
10063
10292
|
|
|
10064
10293
|
// src/controller/common/view/view.controller.ts
|
|
10065
|
-
import {
|
|
10294
|
+
import { notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
10066
10295
|
import { IBizContext as IBizContext2, RuntimeError as RuntimeError31 } from "@ibiz-template/core";
|
|
10067
|
-
import { isEmpty as
|
|
10296
|
+
import { isEmpty as isEmpty8, isNil as isNil18, isNotNil as isNotNil2 } from "ramda";
|
|
10068
10297
|
|
|
10069
10298
|
// src/controller/utils/loading/loading.state.ts
|
|
10070
10299
|
import { NOOP } from "@ibiz-template/core";
|
|
@@ -10339,6 +10568,9 @@ var CTX = class {
|
|
|
10339
10568
|
}
|
|
10340
10569
|
};
|
|
10341
10570
|
|
|
10571
|
+
// src/controller/common/base.controller.ts
|
|
10572
|
+
import { createUUID as createUUID9 } from "qx-util";
|
|
10573
|
+
|
|
10342
10574
|
// src/controller/utils/counter/mounted-counter.ts
|
|
10343
10575
|
var ActivityCounter = class extends Counter {
|
|
10344
10576
|
constructor() {
|
|
@@ -10879,7 +11111,7 @@ var ValueExUtil = class {
|
|
|
10879
11111
|
// src/controller/utils/value-default/value-default.ts
|
|
10880
11112
|
import { RuntimeError as RuntimeError28, ModelError as ModelError16 } from "@ibiz-template/core";
|
|
10881
11113
|
import dayjs from "dayjs";
|
|
10882
|
-
import { createUUID as
|
|
11114
|
+
import { createUUID as createUUID8 } from "qx-util";
|
|
10883
11115
|
import { isNil as isNil16, isNotNil } from "ramda";
|
|
10884
11116
|
function getDefaultValue(opts, origins) {
|
|
10885
11117
|
var _a;
|
|
@@ -10924,7 +11156,7 @@ function getDefaultValue(opts, origins) {
|
|
|
10924
11156
|
case "CONTEXT":
|
|
10925
11157
|
return params[defaultValue];
|
|
10926
11158
|
case "UNIQUEID":
|
|
10927
|
-
return
|
|
11159
|
+
return createUUID8();
|
|
10928
11160
|
default:
|
|
10929
11161
|
throw new ModelError16({}, "\u9ED8\u8BA4\u503C\u7C7B\u578B[".concat(valueType, "]\u672A\u652F\u6301"));
|
|
10930
11162
|
}
|
|
@@ -11023,6 +11255,7 @@ var BaseController = class {
|
|
|
11023
11255
|
this.context = context;
|
|
11024
11256
|
this.params = params;
|
|
11025
11257
|
this.ctx = ctx;
|
|
11258
|
+
this.id = createUUID9();
|
|
11026
11259
|
this.state = {};
|
|
11027
11260
|
/**
|
|
11028
11261
|
* 控制器名称,作为检索控制器的唯一标识
|
|
@@ -11641,11 +11874,14 @@ var ViewController = class extends BaseController {
|
|
|
11641
11874
|
await Promise.all(this.engines.map((engine) => engine.onDestroyed()));
|
|
11642
11875
|
}
|
|
11643
11876
|
this.ctx.destroy();
|
|
11644
|
-
this.context.destroy();
|
|
11645
11877
|
this.engines = [];
|
|
11646
11878
|
if (this.scheduler) {
|
|
11647
11879
|
this.scheduler.destroy();
|
|
11648
11880
|
}
|
|
11881
|
+
if (this.id === this.context.srfsessionid) {
|
|
11882
|
+
ibiz.uiDomainManager.destroy(this.context.srfsessionid);
|
|
11883
|
+
}
|
|
11884
|
+
this.context.destroy();
|
|
11649
11885
|
ibiz.log.debug("\u89C6\u56FE[".concat(this.model.name, "](").concat(this.model.id, ")\u9500\u6BC1"));
|
|
11650
11886
|
}
|
|
11651
11887
|
/**
|
|
@@ -11657,8 +11893,9 @@ var ViewController = class extends BaseController {
|
|
|
11657
11893
|
*/
|
|
11658
11894
|
handleContextParams() {
|
|
11659
11895
|
this.context.srfappid = this.model.appId;
|
|
11660
|
-
if (isNil18(this.context.srfsessionid) ||
|
|
11661
|
-
|
|
11896
|
+
if (isNil18(this.context.srfsessionid) || isEmpty8(this.context.srfsessionid)) {
|
|
11897
|
+
const domain = ibiz.uiDomainManager.create(this.id);
|
|
11898
|
+
this.context.srfsessionid = domain.id;
|
|
11662
11899
|
}
|
|
11663
11900
|
const navContexts = this.model.appViewNavContexts;
|
|
11664
11901
|
let context = {};
|
|
@@ -11814,9 +12051,11 @@ var WFStepTraceViewController = class extends ViewController {
|
|
|
11814
12051
|
var _a;
|
|
11815
12052
|
await super.onCreated();
|
|
11816
12053
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
11817
|
-
|
|
12054
|
+
const view = (_a = this.ctx.parent) == null ? void 0 : _a.view;
|
|
12055
|
+
if (view && view.model.appDataEntityId) {
|
|
11818
12056
|
const entityService = await app.deService.getService(
|
|
11819
|
-
|
|
12057
|
+
view.context,
|
|
12058
|
+
view.model.appDataEntityId
|
|
11820
12059
|
);
|
|
11821
12060
|
const params = Object.assign(this.context.clone(), this.params);
|
|
11822
12061
|
const res = await entityService.wf.getWFHistory(params);
|
|
@@ -12460,7 +12699,10 @@ var MDControlController = class extends ControlController {
|
|
|
12460
12699
|
if (this.state.isSimple) {
|
|
12461
12700
|
return [];
|
|
12462
12701
|
}
|
|
12463
|
-
|
|
12702
|
+
const silent = args.silent === true;
|
|
12703
|
+
if (!silent) {
|
|
12704
|
+
await this.startLoading();
|
|
12705
|
+
}
|
|
12464
12706
|
try {
|
|
12465
12707
|
const isInitialLoad = args.isInitialLoad === true;
|
|
12466
12708
|
const isLoadMore = args.isLoadMore === true;
|
|
@@ -12492,7 +12734,9 @@ var MDControlController = class extends ControlController {
|
|
|
12492
12734
|
});
|
|
12493
12735
|
throw error;
|
|
12494
12736
|
} finally {
|
|
12495
|
-
|
|
12737
|
+
if (!silent) {
|
|
12738
|
+
await this.endLoading();
|
|
12739
|
+
}
|
|
12496
12740
|
}
|
|
12497
12741
|
this.state.items.forEach((item, index) => {
|
|
12498
12742
|
item.srfserialnum = index + 1;
|
|
@@ -12904,7 +13148,7 @@ var CalendarService = class extends MDControlService {
|
|
|
12904
13148
|
*
|
|
12905
13149
|
* @author zk
|
|
12906
13150
|
* @date 2023-08-08 10:08:47
|
|
12907
|
-
* @param {
|
|
13151
|
+
* @param {IContext} context
|
|
12908
13152
|
* @param {IParams} [params={}]
|
|
12909
13153
|
* @return {*} Promise<ICalendarItemData[]>
|
|
12910
13154
|
* @memberof CalendarService
|
|
@@ -12963,7 +13207,7 @@ var CalendarService = class extends MDControlService {
|
|
|
12963
13207
|
* @author zk
|
|
12964
13208
|
* @date 2023-08-08 06:08:49
|
|
12965
13209
|
* @param {string} methodName
|
|
12966
|
-
* @param {
|
|
13210
|
+
* @param {IContext} context
|
|
12967
13211
|
* @param {IData} [data={}]
|
|
12968
13212
|
* @param {IParams} [params={}]
|
|
12969
13213
|
* @param {string} [appDataEntityId=this.model.appDataEntityId!]
|
|
@@ -14336,7 +14580,7 @@ import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError46 }
|
|
|
14336
14580
|
|
|
14337
14581
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
14338
14582
|
import { RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
|
|
14339
|
-
import { isArray as
|
|
14583
|
+
import { isArray as isArray8 } from "qx-util";
|
|
14340
14584
|
|
|
14341
14585
|
// src/ui-action/provider/ui-action-provider-base.ts
|
|
14342
14586
|
import { RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
|
|
@@ -15423,7 +15667,7 @@ var UILogicParam = class {
|
|
|
15423
15667
|
const m = this.model;
|
|
15424
15668
|
const { parameters } = ctx;
|
|
15425
15669
|
const { context, params, data } = parameters;
|
|
15426
|
-
const app = ibiz.hub.getApp(
|
|
15670
|
+
const app = ibiz.hub.getApp(m.appId);
|
|
15427
15671
|
if (m.codeName === "layoutPanel") {
|
|
15428
15672
|
ctx.params[tag] = parameters.view.layoutPanel.panelItems;
|
|
15429
15673
|
return;
|
|
@@ -16063,7 +16307,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
16063
16307
|
}
|
|
16064
16308
|
}
|
|
16065
16309
|
Object.assign(actionResult, {
|
|
16066
|
-
data:
|
|
16310
|
+
data: isArray8(res.data) ? res.data : [res.data],
|
|
16067
16311
|
nextContext: resultContext,
|
|
16068
16312
|
nextParams: tempParams
|
|
16069
16313
|
});
|
|
@@ -18500,7 +18744,7 @@ var FormService = class extends ControlService {
|
|
|
18500
18744
|
* @author lxm
|
|
18501
18745
|
* @date 2023-12-13 03:16:19
|
|
18502
18746
|
* @param {IData} data 表单数据
|
|
18503
|
-
* @param {
|
|
18747
|
+
* @param {IContext} context 上下文
|
|
18504
18748
|
* @param {IParams} params 视图参数
|
|
18505
18749
|
* @param {('create' | 'update')} type 新建还是更新
|
|
18506
18750
|
*/
|
|
@@ -18541,7 +18785,7 @@ var SearchFormService = class extends FormService {
|
|
|
18541
18785
|
*
|
|
18542
18786
|
* @author lxm
|
|
18543
18787
|
* @date 2022-08-31 17:08:41
|
|
18544
|
-
* @param {
|
|
18788
|
+
* @param {IContext} context 上下文
|
|
18545
18789
|
* @param {IParams} [params={}] 视图参数
|
|
18546
18790
|
* @returns {*} {Promise<IHttpResponse>}
|
|
18547
18791
|
*/
|
|
@@ -19142,15 +19386,11 @@ var FormDetailController = class {
|
|
|
19142
19386
|
calcDynaClass(data) {
|
|
19143
19387
|
if (this.model.dynaClass) {
|
|
19144
19388
|
const dynaClass = calcDynaClass(this.model.dynaClass, data);
|
|
19145
|
-
|
|
19146
|
-
this.state.class.containerDyna = dynaClass;
|
|
19147
|
-
}
|
|
19389
|
+
this.state.class.containerDyna = dynaClass;
|
|
19148
19390
|
}
|
|
19149
19391
|
if (this.model.labelDynaClass) {
|
|
19150
19392
|
const dynaClass = calcDynaClass(this.model.labelDynaClass, data);
|
|
19151
|
-
|
|
19152
|
-
this.state.class.labelDyna = dynaClass;
|
|
19153
|
-
}
|
|
19393
|
+
this.state.class.labelDyna = dynaClass;
|
|
19154
19394
|
}
|
|
19155
19395
|
}
|
|
19156
19396
|
/**
|
|
@@ -19311,7 +19551,7 @@ var FormButtonController = class extends FormDetailController {
|
|
|
19311
19551
|
|
|
19312
19552
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts
|
|
19313
19553
|
import { isOverlap as isOverlap2 } from "@ibiz-template/core";
|
|
19314
|
-
import { createUUID as
|
|
19554
|
+
import { createUUID as createUUID10, notNilEmpty as notNilEmpty8 } from "qx-util";
|
|
19315
19555
|
|
|
19316
19556
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.state.ts
|
|
19317
19557
|
var FormDruipartState = class extends FormDetailState {
|
|
@@ -19424,7 +19664,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
19424
19664
|
this.form.context
|
|
19425
19665
|
);
|
|
19426
19666
|
if (!this.state.viewComponentKey) {
|
|
19427
|
-
this.state.viewComponentKey =
|
|
19667
|
+
this.state.viewComponentKey = createUUID10();
|
|
19428
19668
|
this.navContext = newContext;
|
|
19429
19669
|
this.navParams = newParams;
|
|
19430
19670
|
} else if (JSON.stringify(this.navContext) !== JSON.stringify(newContext) || JSON.stringify(this.navParams) !== JSON.stringify(newParams)) {
|
|
@@ -20151,7 +20391,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
20151
20391
|
|
|
20152
20392
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
|
|
20153
20393
|
import { RuntimeError as RuntimeError50, RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
20154
|
-
import { createUUID as
|
|
20394
|
+
import { createUUID as createUUID11 } from "qx-util";
|
|
20155
20395
|
|
|
20156
20396
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
|
|
20157
20397
|
var FormMDCtrlFormState = class extends FormDetailState {
|
|
@@ -20287,7 +20527,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
20287
20527
|
this.state.items = [];
|
|
20288
20528
|
}
|
|
20289
20529
|
const item = {
|
|
20290
|
-
id:
|
|
20530
|
+
id: createUUID11(),
|
|
20291
20531
|
context,
|
|
20292
20532
|
params
|
|
20293
20533
|
};
|
|
@@ -20538,7 +20778,7 @@ import {
|
|
|
20538
20778
|
RuntimeError as RuntimeError51
|
|
20539
20779
|
} from "@ibiz-template/core";
|
|
20540
20780
|
import { debounce as debounce2 } from "lodash-es";
|
|
20541
|
-
import { createUUID as
|
|
20781
|
+
import { createUUID as createUUID12 } from "qx-util";
|
|
20542
20782
|
import { clone as clone21 } from "ramda";
|
|
20543
20783
|
|
|
20544
20784
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
@@ -20552,7 +20792,7 @@ var EditFormService = class extends FormService {
|
|
|
20552
20792
|
*
|
|
20553
20793
|
* @author lxm
|
|
20554
20794
|
* @date 2022-08-31 17:08:41
|
|
20555
|
-
* @param {
|
|
20795
|
+
* @param {IContext} context 上下文
|
|
20556
20796
|
* @param {IParams} [params={}] 视图参数
|
|
20557
20797
|
* @returns {*} {Promise<IHttpResponse>}
|
|
20558
20798
|
*/
|
|
@@ -20575,7 +20815,7 @@ var EditFormService = class extends FormService {
|
|
|
20575
20815
|
*
|
|
20576
20816
|
* @author lxm
|
|
20577
20817
|
* @date 2022-08-31 17:08:41
|
|
20578
|
-
* @param {
|
|
20818
|
+
* @param {IContext} context 上下文
|
|
20579
20819
|
* @param {IParams} [params={}] 视图参数
|
|
20580
20820
|
* @returns {*} {Promise<IHttpResponse>}
|
|
20581
20821
|
*/
|
|
@@ -20598,7 +20838,7 @@ var EditFormService = class extends FormService {
|
|
|
20598
20838
|
*
|
|
20599
20839
|
* @author lxm
|
|
20600
20840
|
* @date 2022-09-07 19:09:48
|
|
20601
|
-
* @param {
|
|
20841
|
+
* @param {IContext} context 上下文
|
|
20602
20842
|
* @param {IParams} [params={}] 视图参数
|
|
20603
20843
|
* @returns {*}
|
|
20604
20844
|
*/
|
|
@@ -20617,7 +20857,7 @@ var EditFormService = class extends FormService {
|
|
|
20617
20857
|
*
|
|
20618
20858
|
* @author lxm
|
|
20619
20859
|
* @date 2022-09-07 19:09:11
|
|
20620
|
-
* @param {
|
|
20860
|
+
* @param {IContext} context 上下文
|
|
20621
20861
|
* @param {IData} data 数据
|
|
20622
20862
|
* @returns {*}
|
|
20623
20863
|
*/
|
|
@@ -20638,7 +20878,7 @@ var EditFormService = class extends FormService {
|
|
|
20638
20878
|
*
|
|
20639
20879
|
* @author lxm
|
|
20640
20880
|
* @date 2022-09-07 19:09:11
|
|
20641
|
-
* @param {
|
|
20881
|
+
* @param {IContext} context 上下文
|
|
20642
20882
|
* @param {IData} data 数据
|
|
20643
20883
|
* @returns {*}
|
|
20644
20884
|
*/
|
|
@@ -20659,7 +20899,7 @@ var EditFormService = class extends FormService {
|
|
|
20659
20899
|
*
|
|
20660
20900
|
* @author lxm
|
|
20661
20901
|
* @date 2022-09-07 19:09:11
|
|
20662
|
-
* @param {
|
|
20902
|
+
* @param {IContext} context 上下文
|
|
20663
20903
|
* @param {IData} data 数据
|
|
20664
20904
|
* @returns {*}
|
|
20665
20905
|
*/
|
|
@@ -20684,7 +20924,7 @@ var EditFormService = class extends FormService {
|
|
|
20684
20924
|
* @author lxm
|
|
20685
20925
|
* @date 2022-09-15 21:09:34
|
|
20686
20926
|
* @param {string} methodName
|
|
20687
|
-
* @param {
|
|
20927
|
+
* @param {IContext} context
|
|
20688
20928
|
* @param {IParams} [params={}]
|
|
20689
20929
|
* @returns {*} {Promise<IHttpResponse<ControlVO>>}
|
|
20690
20930
|
*/
|
|
@@ -20698,7 +20938,7 @@ var EditFormService = class extends FormService {
|
|
|
20698
20938
|
*
|
|
20699
20939
|
* @author lxm
|
|
20700
20940
|
* @date 2022-09-07 19:09:11
|
|
20701
|
-
* @param {
|
|
20941
|
+
* @param {IContext} context 上下文
|
|
20702
20942
|
* @param {IData} data 数据
|
|
20703
20943
|
* @param {IParams} [params={}] 视图参数
|
|
20704
20944
|
* @returns {*}
|
|
@@ -20708,6 +20948,7 @@ var EditFormService = class extends FormService {
|
|
|
20708
20948
|
const wfForm = this.model;
|
|
20709
20949
|
const methodName = ((_a = wfForm.wfstartControlAction) == null ? void 0 : _a.appDEMethodId) || "wfstart";
|
|
20710
20950
|
const entityService = await this.app.deService.getService(
|
|
20951
|
+
context,
|
|
20711
20952
|
this.model.appDataEntityId
|
|
20712
20953
|
);
|
|
20713
20954
|
return entityService.wf.exec(
|
|
@@ -20722,7 +20963,7 @@ var EditFormService = class extends FormService {
|
|
|
20722
20963
|
*
|
|
20723
20964
|
* @author lxm
|
|
20724
20965
|
* @date 2022-09-07 19:09:11
|
|
20725
|
-
* @param {
|
|
20966
|
+
* @param {IContext} context 上下文
|
|
20726
20967
|
* @param {IData} data 数据
|
|
20727
20968
|
* @param {IParams} [params={}] 视图参数
|
|
20728
20969
|
* @returns {*}
|
|
@@ -20737,6 +20978,7 @@ var EditFormService = class extends FormService {
|
|
|
20737
20978
|
methodName = ((_a = wfForm.wfsubmitControlAction) == null ? void 0 : _a.appDEMethodId) || "wfsubmit";
|
|
20738
20979
|
}
|
|
20739
20980
|
const entityService = await this.app.deService.getService(
|
|
20981
|
+
context,
|
|
20740
20982
|
this.model.appDataEntityId
|
|
20741
20983
|
);
|
|
20742
20984
|
return entityService.wf.exec(
|
|
@@ -20919,7 +21161,7 @@ var EditFormController = class extends FormController {
|
|
|
20919
21161
|
await this.endLoading();
|
|
20920
21162
|
}
|
|
20921
21163
|
res.data.srfkey = void 0;
|
|
20922
|
-
res.data.tempsrfkey =
|
|
21164
|
+
res.data.tempsrfkey = createUUID12();
|
|
20923
21165
|
this.state.modified = false;
|
|
20924
21166
|
this.state.data = res.data;
|
|
20925
21167
|
this.formStateNotify("LOAD" /* LOAD */);
|
|
@@ -21536,12 +21778,13 @@ var GridService = class extends MDControlService {
|
|
|
21536
21778
|
* @author lxm
|
|
21537
21779
|
* @date 2022-09-15 21:09:34
|
|
21538
21780
|
* @param {string} methodName
|
|
21539
|
-
* @param {
|
|
21781
|
+
* @param {IContext} context
|
|
21540
21782
|
* @param {IParams} [params={}]
|
|
21541
21783
|
* @returns {*} {Promise<IHttpResponse<ControlVO>>}
|
|
21542
21784
|
*/
|
|
21543
21785
|
async updateGridEditItem(methodName, context, params = {}) {
|
|
21544
21786
|
const entityService = await this.app.deService.getService(
|
|
21787
|
+
context,
|
|
21545
21788
|
this.model.appDataEntityId
|
|
21546
21789
|
);
|
|
21547
21790
|
let res = await entityService.exec(methodName, context, params);
|
|
@@ -22288,7 +22531,8 @@ var GridController = class extends MDControlController {
|
|
|
22288
22531
|
if (item.codeListId) {
|
|
22289
22532
|
tempExportColumn.codeList = app.codeList.getCodeList(item.codeListId);
|
|
22290
22533
|
tempExportColumn.codeListItems = await app.codeList.get(
|
|
22291
|
-
item.codeListId
|
|
22534
|
+
item.codeListId,
|
|
22535
|
+
this.context
|
|
22292
22536
|
);
|
|
22293
22537
|
}
|
|
22294
22538
|
return tempExportColumn;
|
|
@@ -22498,6 +22742,36 @@ var GridController = class extends MDControlController {
|
|
|
22498
22742
|
convertColumnCaption(this.model.degridColumns);
|
|
22499
22743
|
}
|
|
22500
22744
|
}
|
|
22745
|
+
/**
|
|
22746
|
+
* 控制列显示
|
|
22747
|
+
* @param {IColumnState} columnState
|
|
22748
|
+
* @return {*}
|
|
22749
|
+
* @author: zhujiamin
|
|
22750
|
+
* @Date: 2023-12-19 16:02:14
|
|
22751
|
+
*/
|
|
22752
|
+
setColumnVisible(columnState) {
|
|
22753
|
+
columnState.hidden = !columnState.hidden;
|
|
22754
|
+
}
|
|
22755
|
+
/**
|
|
22756
|
+
* 设置点击分组后回显相关参数
|
|
22757
|
+
* @param {IData} data
|
|
22758
|
+
* @return {*}
|
|
22759
|
+
* @author: zhujiamin
|
|
22760
|
+
* @Date: 2023-12-21 10:54:45
|
|
22761
|
+
*/
|
|
22762
|
+
setGroupParams(data) {
|
|
22763
|
+
if (data.sort) {
|
|
22764
|
+
this.state.sortQuery = data.sort;
|
|
22765
|
+
} else {
|
|
22766
|
+
this.state.sortQuery = "";
|
|
22767
|
+
}
|
|
22768
|
+
if (data.columnstates) {
|
|
22769
|
+
this.state.columnStates = data.columnstates;
|
|
22770
|
+
} else {
|
|
22771
|
+
this.state.columnStates = [];
|
|
22772
|
+
this.initColumnStates();
|
|
22773
|
+
}
|
|
22774
|
+
}
|
|
22501
22775
|
};
|
|
22502
22776
|
|
|
22503
22777
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
@@ -24088,7 +24362,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
24088
24362
|
};
|
|
24089
24363
|
|
|
24090
24364
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
24091
|
-
import { recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
|
|
24365
|
+
import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
|
|
24092
24366
|
import { isNil as isNil23 } from "ramda";
|
|
24093
24367
|
|
|
24094
24368
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
@@ -24102,33 +24376,159 @@ var SearchBarFilterController = class {
|
|
|
24102
24376
|
if (model.appDEFieldId) {
|
|
24103
24377
|
field = findFieldById(searchBar.appDataEntity, model.appDEFieldId);
|
|
24104
24378
|
}
|
|
24105
|
-
this.fieldName = field ? field.codeName.toLowerCase() : model.id;
|
|
24106
|
-
this.label = model.caption || (field == null ? void 0 : field.logicName) || model.id;
|
|
24107
|
-
this.valueOP = (_a = model.defsearchMode) == null ? void 0 : _a.valueOP;
|
|
24379
|
+
this.fieldName = field ? field.codeName.toLowerCase() : model.id;
|
|
24380
|
+
this.label = model.caption || (field == null ? void 0 : field.logicName) || model.id;
|
|
24381
|
+
this.valueOP = (_a = model.defsearchMode) == null ? void 0 : _a.valueOP;
|
|
24382
|
+
}
|
|
24383
|
+
get context() {
|
|
24384
|
+
return this.searchBar.context;
|
|
24385
|
+
}
|
|
24386
|
+
get params() {
|
|
24387
|
+
return this.searchBar.params;
|
|
24388
|
+
}
|
|
24389
|
+
/**
|
|
24390
|
+
* 初始化
|
|
24391
|
+
* @author lxm
|
|
24392
|
+
* @date 2023-10-12 05:47:19
|
|
24393
|
+
* @return {*} {Promise<void>}
|
|
24394
|
+
*/
|
|
24395
|
+
async init() {
|
|
24396
|
+
if (!this.model.editor) {
|
|
24397
|
+
throw new RuntimeModelError59(this.model, "\u7F3A\u5C11\u7F16\u8F91\u5668\u6A21\u578B");
|
|
24398
|
+
}
|
|
24399
|
+
this.editorProvider = await getEditorProvider(this.model.editor);
|
|
24400
|
+
if (this.editorProvider) {
|
|
24401
|
+
this.editor = await this.editorProvider.createController(
|
|
24402
|
+
this.model.editor,
|
|
24403
|
+
this
|
|
24404
|
+
);
|
|
24405
|
+
}
|
|
24406
|
+
}
|
|
24407
|
+
};
|
|
24408
|
+
|
|
24409
|
+
// src/controller/control/search-bar/search-bar.service.ts
|
|
24410
|
+
var SearchBarService = class {
|
|
24411
|
+
/**
|
|
24412
|
+
* Creates an instance of ControlService.
|
|
24413
|
+
*
|
|
24414
|
+
*/
|
|
24415
|
+
constructor(model, viewTag) {
|
|
24416
|
+
/**
|
|
24417
|
+
* 主题管理URL
|
|
24418
|
+
* @return {*}
|
|
24419
|
+
* @author: zhujiamin
|
|
24420
|
+
* @Date: 2023-12-22 10:51:49
|
|
24421
|
+
*/
|
|
24422
|
+
this.themeUrl = "/extension/app_view_themes";
|
|
24423
|
+
this.model = model;
|
|
24424
|
+
this.viewTag = viewTag;
|
|
24425
|
+
}
|
|
24426
|
+
async init(_context) {
|
|
24427
|
+
this.app = ibiz.hub.getApp(this.model.appId);
|
|
24428
|
+
}
|
|
24429
|
+
/**
|
|
24430
|
+
* 执行查询多条数据的方法
|
|
24431
|
+
*
|
|
24432
|
+
*/
|
|
24433
|
+
async fetch() {
|
|
24434
|
+
const res = await this.app.net.post("".concat(this.themeUrl, "/fetch_default"), {
|
|
24435
|
+
app_view_tag: this.viewTag,
|
|
24436
|
+
sort: "create_time,asc"
|
|
24437
|
+
});
|
|
24438
|
+
if (res.ok) {
|
|
24439
|
+
res.data = this.convertBackDataToFront(res.data);
|
|
24440
|
+
}
|
|
24441
|
+
return res;
|
|
24442
|
+
}
|
|
24443
|
+
/**
|
|
24444
|
+
* 执行获取单条数据方法
|
|
24445
|
+
*
|
|
24446
|
+
*/
|
|
24447
|
+
async get(id) {
|
|
24448
|
+
const res = await this.app.net.get("".concat(this.themeUrl, "/").concat(id), {
|
|
24449
|
+
app_view_tag: this.viewTag
|
|
24450
|
+
});
|
|
24451
|
+
if (res.ok) {
|
|
24452
|
+
[res.data] = this.convertBackDataToFront([res.data]);
|
|
24453
|
+
}
|
|
24454
|
+
return res;
|
|
24108
24455
|
}
|
|
24109
|
-
|
|
24110
|
-
|
|
24456
|
+
/**
|
|
24457
|
+
* 删除单条数据
|
|
24458
|
+
*
|
|
24459
|
+
*/
|
|
24460
|
+
async remove(id) {
|
|
24461
|
+
const res = await this.app.net.delete("".concat(this.themeUrl, "/").concat(id), {
|
|
24462
|
+
app_view_tag: this.viewTag
|
|
24463
|
+
});
|
|
24464
|
+
return res;
|
|
24111
24465
|
}
|
|
24112
|
-
|
|
24113
|
-
|
|
24466
|
+
/**
|
|
24467
|
+
* 新建数据
|
|
24468
|
+
*
|
|
24469
|
+
*/
|
|
24470
|
+
async create(caption) {
|
|
24471
|
+
const res = await this.app.net.post("".concat(this.themeUrl), {
|
|
24472
|
+
name: caption,
|
|
24473
|
+
app_view_tag: this.viewTag
|
|
24474
|
+
});
|
|
24475
|
+
return res;
|
|
24114
24476
|
}
|
|
24115
24477
|
/**
|
|
24116
|
-
*
|
|
24117
|
-
*
|
|
24118
|
-
* @date 2023-10-12 05:47:19
|
|
24119
|
-
* @return {*} {Promise<void>}
|
|
24478
|
+
* 新建数据(带参数,给平台配置建立的分组用)
|
|
24479
|
+
*
|
|
24120
24480
|
*/
|
|
24121
|
-
async
|
|
24122
|
-
|
|
24123
|
-
|
|
24481
|
+
async createWithParams(id, data) {
|
|
24482
|
+
const res = await this.app.net.post("".concat(this.themeUrl), {
|
|
24483
|
+
id,
|
|
24484
|
+
theme_model: JSON.stringify(data),
|
|
24485
|
+
app_view_tag: this.viewTag,
|
|
24486
|
+
show: data.show
|
|
24487
|
+
});
|
|
24488
|
+
return res;
|
|
24489
|
+
}
|
|
24490
|
+
/**
|
|
24491
|
+
* 更新数据
|
|
24492
|
+
*
|
|
24493
|
+
*/
|
|
24494
|
+
async update(id, data) {
|
|
24495
|
+
const updateParams = { app_view_tag: this.viewTag };
|
|
24496
|
+
if (data.theme_model) {
|
|
24497
|
+
Object.assign(updateParams, {
|
|
24498
|
+
theme_model: JSON.stringify(data.theme_model)
|
|
24499
|
+
});
|
|
24124
24500
|
}
|
|
24125
|
-
|
|
24126
|
-
|
|
24127
|
-
|
|
24128
|
-
|
|
24129
|
-
|
|
24130
|
-
|
|
24501
|
+
if (data.caption) {
|
|
24502
|
+
Object.assign(updateParams, {
|
|
24503
|
+
name: data.caption
|
|
24504
|
+
});
|
|
24505
|
+
}
|
|
24506
|
+
if (typeof data.show === "boolean") {
|
|
24507
|
+
Object.assign(updateParams, {
|
|
24508
|
+
show: data.show
|
|
24509
|
+
});
|
|
24131
24510
|
}
|
|
24511
|
+
const res = await this.app.net.put("".concat(this.themeUrl, "/").concat(id), updateParams);
|
|
24512
|
+
return res;
|
|
24513
|
+
}
|
|
24514
|
+
/**
|
|
24515
|
+
* 转换后台数据成前端需要的格式
|
|
24516
|
+
* @param {IData} data
|
|
24517
|
+
* @return {*}
|
|
24518
|
+
* @author: zhujiamin
|
|
24519
|
+
* @Date: 2023-12-22 11:19:50
|
|
24520
|
+
*/
|
|
24521
|
+
convertBackDataToFront(data) {
|
|
24522
|
+
return data.map((item) => {
|
|
24523
|
+
const tempItem = { ...item };
|
|
24524
|
+
if (item.name) {
|
|
24525
|
+
tempItem.caption = item.name;
|
|
24526
|
+
}
|
|
24527
|
+
if (item.theme_model) {
|
|
24528
|
+
tempItem.searchGroupData = JSON.parse(item.theme_model);
|
|
24529
|
+
}
|
|
24530
|
+
return tempItem;
|
|
24531
|
+
});
|
|
24132
24532
|
}
|
|
24133
24533
|
};
|
|
24134
24534
|
|
|
@@ -24150,6 +24550,29 @@ var SearchBarController = class extends ControlController {
|
|
|
24150
24550
|
* @type {SearchBarFilterController[]}
|
|
24151
24551
|
*/
|
|
24152
24552
|
this.filterControllers = [];
|
|
24553
|
+
/**
|
|
24554
|
+
* 当前编辑的分组
|
|
24555
|
+
* @return {*}
|
|
24556
|
+
* @author: zhujiamin
|
|
24557
|
+
* @Date: 2023-12-20 18:06:37
|
|
24558
|
+
*/
|
|
24559
|
+
this.currentEditGroup = null;
|
|
24560
|
+
/**
|
|
24561
|
+
* 是否为后台分组
|
|
24562
|
+
* @return {*}
|
|
24563
|
+
* @author: zhujiamin
|
|
24564
|
+
* @Date: 2023-12-21 10:17:43
|
|
24565
|
+
*/
|
|
24566
|
+
this.isBackendSearchGroup = true;
|
|
24567
|
+
}
|
|
24568
|
+
/**
|
|
24569
|
+
* 表格控制器
|
|
24570
|
+
* @return {*}
|
|
24571
|
+
* @author: zhujiamin
|
|
24572
|
+
* @Date: 2023-12-22 13:50:16
|
|
24573
|
+
*/
|
|
24574
|
+
get grid() {
|
|
24575
|
+
return this.ctx.getController("grid");
|
|
24153
24576
|
}
|
|
24154
24577
|
initState() {
|
|
24155
24578
|
super.initState();
|
|
@@ -24159,6 +24582,8 @@ var SearchBarController = class extends ControlController {
|
|
|
24159
24582
|
if (this.model.enableFilter) {
|
|
24160
24583
|
this.resetFilter();
|
|
24161
24584
|
}
|
|
24585
|
+
this.state.searchBarGroups = [];
|
|
24586
|
+
this.state.selectedSearchGroupItem = null;
|
|
24162
24587
|
}
|
|
24163
24588
|
async onCreated() {
|
|
24164
24589
|
await super.onCreated();
|
|
@@ -24170,7 +24595,12 @@ var SearchBarController = class extends ControlController {
|
|
|
24170
24595
|
this.appDataEntity = appDataEntity;
|
|
24171
24596
|
this.calcQuickSearchPlaceholder();
|
|
24172
24597
|
}
|
|
24598
|
+
if (this.isBackendSearchGroup && this.view.model.codeName) {
|
|
24599
|
+
this.service = new SearchBarService(this.model, this.view.model.codeName);
|
|
24600
|
+
await this.service.init(this.context);
|
|
24601
|
+
}
|
|
24173
24602
|
await this.initSearchBarFilters();
|
|
24603
|
+
await this.initSearBarGroups();
|
|
24174
24604
|
}
|
|
24175
24605
|
/**
|
|
24176
24606
|
* 计算快速搜索的占位
|
|
@@ -24236,7 +24666,7 @@ var SearchBarController = class extends ControlController {
|
|
|
24236
24666
|
if (this.state.query) {
|
|
24237
24667
|
params.query = this.state.query;
|
|
24238
24668
|
}
|
|
24239
|
-
if ((_a = this.state.selectedGroupItem) == null ? void 0 : _a.data) {
|
|
24669
|
+
if (((_a = this.state.selectedGroupItem) == null ? void 0 : _a.data) && typeof this.state.selectedGroupItem.data === "string") {
|
|
24240
24670
|
const navParams = ScriptFactory.execSingleLine(
|
|
24241
24671
|
this.state.selectedGroupItem.data
|
|
24242
24672
|
);
|
|
@@ -24255,13 +24685,7 @@ var SearchBarController = class extends ControlController {
|
|
|
24255
24685
|
* @date 2023-10-16 03:52:44
|
|
24256
24686
|
*/
|
|
24257
24687
|
resetFilter() {
|
|
24258
|
-
this.state.filterNodes =
|
|
24259
|
-
{
|
|
24260
|
-
leaf: false,
|
|
24261
|
-
logicType: "AND",
|
|
24262
|
-
children: [{ leaf: true, field: null, valueOP: null, value: null }]
|
|
24263
|
-
}
|
|
24264
|
-
];
|
|
24688
|
+
this.state.filterNodes = this.getOriginFilterNodes();
|
|
24265
24689
|
this.evt.emit("onSearch", void 0);
|
|
24266
24690
|
}
|
|
24267
24691
|
/**
|
|
@@ -24332,6 +24756,123 @@ var SearchBarController = class extends ControlController {
|
|
|
24332
24756
|
value: node.value
|
|
24333
24757
|
};
|
|
24334
24758
|
}
|
|
24759
|
+
/**
|
|
24760
|
+
* 获取初始过滤项树节点数据集合
|
|
24761
|
+
* @return {*}
|
|
24762
|
+
* @author: zhujiamin
|
|
24763
|
+
* @Date: 2023-12-21 17:29:47
|
|
24764
|
+
*/
|
|
24765
|
+
getOriginFilterNodes() {
|
|
24766
|
+
return [
|
|
24767
|
+
{
|
|
24768
|
+
leaf: false,
|
|
24769
|
+
logicType: "AND",
|
|
24770
|
+
children: [{ leaf: true, field: null, valueOP: null, value: null }]
|
|
24771
|
+
}
|
|
24772
|
+
];
|
|
24773
|
+
}
|
|
24774
|
+
/**
|
|
24775
|
+
* 初始化搜索栏分组项(获取后台分组清单并合并模型)
|
|
24776
|
+
* @return {*}
|
|
24777
|
+
* @author: zhujiamin
|
|
24778
|
+
* @Date: 2023-12-19 14:43:46
|
|
24779
|
+
*/
|
|
24780
|
+
async initSearBarGroups() {
|
|
24781
|
+
this.state.searchBarGroups = [];
|
|
24782
|
+
if (this.isBackendSearchGroup) {
|
|
24783
|
+
if (this.model.searchBarGroups && this.model.searchBarGroups.length > 0) {
|
|
24784
|
+
this.state.searchBarGroups = this.model.searchBarGroups.map((item) => ({
|
|
24785
|
+
...item,
|
|
24786
|
+
show: true,
|
|
24787
|
+
saved: false,
|
|
24788
|
+
searchGroupData: {}
|
|
24789
|
+
}));
|
|
24790
|
+
}
|
|
24791
|
+
const res = await this.service.fetch();
|
|
24792
|
+
if (res.ok) {
|
|
24793
|
+
res.data.forEach((group) => {
|
|
24794
|
+
const existGroup = this.state.searchBarGroups.find(
|
|
24795
|
+
(item) => item.id === group.id
|
|
24796
|
+
);
|
|
24797
|
+
if (existGroup) {
|
|
24798
|
+
mergeInLeft3(existGroup, group);
|
|
24799
|
+
existGroup.saved = true;
|
|
24800
|
+
} else {
|
|
24801
|
+
this.state.searchBarGroups.push({
|
|
24802
|
+
...group,
|
|
24803
|
+
appId: this.context.srfappid,
|
|
24804
|
+
show: true,
|
|
24805
|
+
saved: true,
|
|
24806
|
+
searchGroupData: {}
|
|
24807
|
+
});
|
|
24808
|
+
}
|
|
24809
|
+
});
|
|
24810
|
+
}
|
|
24811
|
+
}
|
|
24812
|
+
}
|
|
24813
|
+
/**
|
|
24814
|
+
* 处理保存
|
|
24815
|
+
* @return {*}
|
|
24816
|
+
* @author: zhujiamin
|
|
24817
|
+
* @Date: 2023-12-19 16:17:15
|
|
24818
|
+
*/
|
|
24819
|
+
async handleSave() {
|
|
24820
|
+
if (this.grid && this.state.selectedSearchGroupItem) {
|
|
24821
|
+
const filters = this.calcFilters();
|
|
24822
|
+
const saveParams = {
|
|
24823
|
+
filternodes: this.state.filterNodes,
|
|
24824
|
+
searchconds: filters,
|
|
24825
|
+
sort: this.grid.state.sortQuery,
|
|
24826
|
+
columnstates: this.grid.state.columnStates,
|
|
24827
|
+
show: this.state.selectedSearchGroupItem.show
|
|
24828
|
+
};
|
|
24829
|
+
if (this.state.selectedSearchGroupItem.saved) {
|
|
24830
|
+
await this.service.update(this.state.selectedSearchGroupItem.id, {
|
|
24831
|
+
theme_model: saveParams,
|
|
24832
|
+
show: this.state.selectedSearchGroupItem.show
|
|
24833
|
+
});
|
|
24834
|
+
ibiz.message.success("\u4FDD\u5B58\u6210\u529F");
|
|
24835
|
+
} else {
|
|
24836
|
+
const res = await this.service.createWithParams(
|
|
24837
|
+
this.state.selectedSearchGroupItem.id,
|
|
24838
|
+
saveParams
|
|
24839
|
+
);
|
|
24840
|
+
if (res.ok) {
|
|
24841
|
+
const savedGroup = this.state.searchBarGroups.find(
|
|
24842
|
+
(group) => group.id === res.data.id
|
|
24843
|
+
);
|
|
24844
|
+
if (savedGroup) {
|
|
24845
|
+
savedGroup.saved = true;
|
|
24846
|
+
}
|
|
24847
|
+
ibiz.message.success("\u4FDD\u5B58\u6210\u529F");
|
|
24848
|
+
}
|
|
24849
|
+
}
|
|
24850
|
+
}
|
|
24851
|
+
}
|
|
24852
|
+
/**
|
|
24853
|
+
* 处理点击后台分组
|
|
24854
|
+
* @return {*}
|
|
24855
|
+
* @author: zhujiamin
|
|
24856
|
+
* @Date: 2023-12-21 10:29:24
|
|
24857
|
+
*/
|
|
24858
|
+
async handleGroupClick(groupItem) {
|
|
24859
|
+
this.state.selectedSearchGroupItem = groupItem;
|
|
24860
|
+
if (groupItem.saved) {
|
|
24861
|
+
const res = await this.service.get(groupItem.id);
|
|
24862
|
+
if (res.ok) {
|
|
24863
|
+
mergeInLeft3(groupItem, res.data);
|
|
24864
|
+
}
|
|
24865
|
+
}
|
|
24866
|
+
if (groupItem.searchGroupData && groupItem.searchGroupData.filternodes) {
|
|
24867
|
+
this.state.filterNodes = groupItem.searchGroupData.filternodes;
|
|
24868
|
+
} else {
|
|
24869
|
+
this.state.filterNodes = this.getOriginFilterNodes();
|
|
24870
|
+
}
|
|
24871
|
+
if (this.grid && groupItem && groupItem.searchGroupData) {
|
|
24872
|
+
this.grid.setGroupParams(groupItem.searchGroupData);
|
|
24873
|
+
await this.grid.load({ isInitialLoad: true });
|
|
24874
|
+
}
|
|
24875
|
+
}
|
|
24335
24876
|
};
|
|
24336
24877
|
|
|
24337
24878
|
// src/controller/control/tab-exp-panel/tab-exp-panel.controller.ts
|
|
@@ -24884,6 +25425,9 @@ var TreeController = class extends MDControlController {
|
|
|
24884
25425
|
*/
|
|
24885
25426
|
this.nodeClickTBUIActionItem = /* @__PURE__ */ new Map();
|
|
24886
25427
|
}
|
|
25428
|
+
get _evt() {
|
|
25429
|
+
return this.evt;
|
|
25430
|
+
}
|
|
24887
25431
|
initState() {
|
|
24888
25432
|
super.initState();
|
|
24889
25433
|
this.state.defaultExpandedKeys = [];
|
|
@@ -24922,8 +25466,7 @@ var TreeController = class extends MDControlController {
|
|
|
24922
25466
|
}
|
|
24923
25467
|
this.initDropNodeRss();
|
|
24924
25468
|
this.initNodeClickTBUIActionItem();
|
|
24925
|
-
this.
|
|
24926
|
-
await this.service.init(this.context);
|
|
25469
|
+
await this.initService();
|
|
24927
25470
|
this.model.detreeNodes.forEach((node) => {
|
|
24928
25471
|
var _a2, _b2;
|
|
24929
25472
|
if ((_b2 = (_a2 = node.decontextMenu) == null ? void 0 : _a2.detoolbarItems) == null ? void 0 : _b2.length) {
|
|
@@ -24939,6 +25482,17 @@ var TreeController = class extends MDControlController {
|
|
|
24939
25482
|
Object.values(this.contextMenus).map((menu) => menu.created())
|
|
24940
25483
|
);
|
|
24941
25484
|
}
|
|
25485
|
+
/**
|
|
25486
|
+
* 初始化对应类型的部件服务
|
|
25487
|
+
* @author lxm
|
|
25488
|
+
* @date 2023-12-21 11:25:33
|
|
25489
|
+
* @protected
|
|
25490
|
+
* @return {*} {Promise<void>}
|
|
25491
|
+
*/
|
|
25492
|
+
async initService() {
|
|
25493
|
+
this.service = new TreeService(this.model);
|
|
25494
|
+
await this.service.init(this.context);
|
|
25495
|
+
}
|
|
24942
25496
|
/**
|
|
24943
25497
|
* 初始化节点拖入关系处理
|
|
24944
25498
|
* @author lxm
|
|
@@ -25013,7 +25567,7 @@ var TreeController = class extends MDControlController {
|
|
|
25013
25567
|
}
|
|
25014
25568
|
await this.afterLoad(args, nodes);
|
|
25015
25569
|
this.state.isLoaded = true;
|
|
25016
|
-
await this.
|
|
25570
|
+
await this._evt.emit("onLoadSuccess", {
|
|
25017
25571
|
isInitialLoad
|
|
25018
25572
|
});
|
|
25019
25573
|
return nodes;
|
|
@@ -25052,6 +25606,17 @@ var TreeController = class extends MDControlController {
|
|
|
25052
25606
|
} else {
|
|
25053
25607
|
this.state.rootNodes = nodes;
|
|
25054
25608
|
}
|
|
25609
|
+
await this.afterLoadNodes(nodes);
|
|
25610
|
+
return nodes;
|
|
25611
|
+
}
|
|
25612
|
+
/**
|
|
25613
|
+
* loadNodes加载完子数据之后的处理
|
|
25614
|
+
* @author lxm
|
|
25615
|
+
* @date 2023-12-22 02:37:50
|
|
25616
|
+
* @param {ITreeNodeData[]} nodes 加载回来的子数据
|
|
25617
|
+
* @return {*} {Promise<void>}
|
|
25618
|
+
*/
|
|
25619
|
+
async afterLoadNodes(nodes) {
|
|
25055
25620
|
this.state.items = [];
|
|
25056
25621
|
recursiveIterate10(
|
|
25057
25622
|
{ children: this.state.rootNodes },
|
|
@@ -25060,7 +25625,6 @@ var TreeController = class extends MDControlController {
|
|
|
25060
25625
|
}
|
|
25061
25626
|
);
|
|
25062
25627
|
this.state.expandedKeys = this.calcExpandedKeys(nodes);
|
|
25063
|
-
return nodes;
|
|
25064
25628
|
}
|
|
25065
25629
|
/**
|
|
25066
25630
|
* 树节点点击事件
|
|
@@ -25127,7 +25691,7 @@ var TreeController = class extends MDControlController {
|
|
|
25127
25691
|
}
|
|
25128
25692
|
setActive(item) {
|
|
25129
25693
|
const nodeParams = this.parseTreeNodeData(item);
|
|
25130
|
-
return this.
|
|
25694
|
+
return this._evt.emit("onActive", { ...nodeParams, nodeData: item });
|
|
25131
25695
|
}
|
|
25132
25696
|
setSelection(selection) {
|
|
25133
25697
|
const selectionIds = selection.map((item) => item.id);
|
|
@@ -25147,6 +25711,20 @@ var TreeController = class extends MDControlController {
|
|
|
25147
25711
|
var _a;
|
|
25148
25712
|
return (_a = this.model.detreeNodes) == null ? void 0 : _a.find((item) => item.id === id);
|
|
25149
25713
|
}
|
|
25714
|
+
/**
|
|
25715
|
+
* 通过标识获取节点数据
|
|
25716
|
+
* @author lxm
|
|
25717
|
+
* @date 2023-12-22 02:21:38
|
|
25718
|
+
* @param {string} id 可以是节点id也可以是_uuid
|
|
25719
|
+
* @return {*} {(ITreeNodeData | undefined)}
|
|
25720
|
+
*/
|
|
25721
|
+
getNodeData(key) {
|
|
25722
|
+
const find = this.state.items.find((item) => item.id === key);
|
|
25723
|
+
if (find) {
|
|
25724
|
+
return find;
|
|
25725
|
+
}
|
|
25726
|
+
return this.state.items.find((item) => item._uuid === key);
|
|
25727
|
+
}
|
|
25150
25728
|
/**
|
|
25151
25729
|
* 执行界面行为
|
|
25152
25730
|
*
|
|
@@ -25246,7 +25824,7 @@ var TreeController = class extends MDControlController {
|
|
|
25246
25824
|
}
|
|
25247
25825
|
const targetNode = refreshParent ? currentNode.parent : currentNode;
|
|
25248
25826
|
const nodes = await this.loadNodes(targetNode);
|
|
25249
|
-
this.
|
|
25827
|
+
this._evt.emit("onAfterRefreshParent", {
|
|
25250
25828
|
parentNode: targetNode,
|
|
25251
25829
|
children: nodes
|
|
25252
25830
|
});
|
|
@@ -25416,7 +25994,7 @@ var TreeController = class extends MDControlController {
|
|
|
25416
25994
|
});
|
|
25417
25995
|
}
|
|
25418
25996
|
await this.updateDeNodeData(modifiedNodeDatas);
|
|
25419
|
-
this.
|
|
25997
|
+
this._evt.emit("onAfterNodeDrop", { isChangedParent });
|
|
25420
25998
|
}
|
|
25421
25999
|
/**
|
|
25422
26000
|
* 更新实体节点数据
|
|
@@ -25480,7 +26058,7 @@ var WizardPanelService = class extends ControlService {
|
|
|
25480
26058
|
*
|
|
25481
26059
|
* @author lxm
|
|
25482
26060
|
* @date 2022-08-31 17:08:41
|
|
25483
|
-
* @param {
|
|
26061
|
+
* @param {IContext} context 上下文
|
|
25484
26062
|
* @param {IParams} [params={}] 视图参数
|
|
25485
26063
|
* @returns {*} {Promise<IHttpResponse>}
|
|
25486
26064
|
*/
|
|
@@ -25496,7 +26074,7 @@ var WizardPanelService = class extends ControlService {
|
|
|
25496
26074
|
*
|
|
25497
26075
|
* @author lxm
|
|
25498
26076
|
* @date 2022-08-31 17:08:41
|
|
25499
|
-
* @param {
|
|
26077
|
+
* @param {IContext} context 上下文
|
|
25500
26078
|
* @param {IParams} [params={}] 视图参数
|
|
25501
26079
|
* @returns {*} {Promise<IHttpResponse>}
|
|
25502
26080
|
*/
|
|
@@ -25921,7 +26499,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
25921
26499
|
*/
|
|
25922
26500
|
async loadMore() {
|
|
25923
26501
|
if (this.state.total > this.state.items.length && !this.state.isLoading) {
|
|
25924
|
-
await this.load({ isLoadMore: true });
|
|
26502
|
+
await this.load({ isLoadMore: true, silent: true });
|
|
25925
26503
|
}
|
|
25926
26504
|
}
|
|
25927
26505
|
/**
|
|
@@ -26156,7 +26734,7 @@ var KanbanService = class extends DataViewControlService {
|
|
|
26156
26734
|
*
|
|
26157
26735
|
* @author lxm
|
|
26158
26736
|
* @date 2022-09-07 19:09:11
|
|
26159
|
-
* @param {
|
|
26737
|
+
* @param {IContext} context 上下文
|
|
26160
26738
|
* @param {ControlVO} data 数据
|
|
26161
26739
|
* @returns {*}
|
|
26162
26740
|
*/
|
|
@@ -26668,194 +27246,103 @@ var KanbanController = class extends DataViewControlController {
|
|
|
26668
27246
|
import { recursiveIterate as recursiveIterate11 } from "@ibiz-template/core";
|
|
26669
27247
|
|
|
26670
27248
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
26671
|
-
import { isArray as isArray10 } from "qx-util";
|
|
26672
27249
|
var TreeGridExService = class extends TreeService {
|
|
26673
|
-
|
|
26674
|
-
|
|
27250
|
+
};
|
|
27251
|
+
|
|
27252
|
+
// src/controller/control/tree-grid-ex/tree-grid-ex-row.state.ts
|
|
27253
|
+
var TreeGridExRowState = class {
|
|
27254
|
+
constructor(data, treeGrid) {
|
|
26675
27255
|
/**
|
|
26676
|
-
*
|
|
27256
|
+
* 操作列状态(p是操作列的标识)
|
|
26677
27257
|
*
|
|
26678
|
-
* @author
|
|
26679
|
-
* @date
|
|
26680
|
-
* @type {
|
|
26681
|
-
* @memberof TreeGridService
|
|
27258
|
+
* @author lxm
|
|
27259
|
+
* @date 2022-09-07 22:09:38
|
|
27260
|
+
* @type {({ [p: string]: IButtonContainerState })}
|
|
26682
27261
|
*/
|
|
26683
|
-
this.
|
|
26684
|
-
|
|
26685
|
-
|
|
26686
|
-
|
|
26687
|
-
*
|
|
26688
|
-
* @author lxm
|
|
26689
|
-
* @date 2022-08-31 18:08:37
|
|
26690
|
-
*/
|
|
26691
|
-
initUIDataMap() {
|
|
26692
|
-
var _a;
|
|
26693
|
-
super.initUIDataMap();
|
|
26694
|
-
(_a = this.model.detreeNodes) == null ? void 0 : _a.forEach((item) => {
|
|
26695
|
-
var _a2;
|
|
26696
|
-
const dataMap = /* @__PURE__ */ new Map();
|
|
26697
|
-
(_a2 = item.detreeNodeDataItems) == null ? void 0 : _a2.forEach((dataItem) => {
|
|
26698
|
-
const uiKey = dataItem.id.toLowerCase();
|
|
26699
|
-
const deField = dataItem.appDEFieldId;
|
|
26700
|
-
const deFieldKey = deField.toLowerCase();
|
|
26701
|
-
const mapField = new UIMapField(uiKey, deFieldKey, {
|
|
26702
|
-
isOriginField: true,
|
|
26703
|
-
dataType: dataItem.dataType
|
|
26704
|
-
});
|
|
26705
|
-
dataMap.set(uiKey, mapField);
|
|
26706
|
-
});
|
|
26707
|
-
this.multipleUiMap.set(item.id, dataMap);
|
|
27262
|
+
this.uaColStates = {};
|
|
27263
|
+
this.data = data;
|
|
27264
|
+
Object.values(treeGrid.uaColumns).forEach((column) => {
|
|
27265
|
+
column.initActionStates(this);
|
|
26708
27266
|
});
|
|
26709
27267
|
}
|
|
26710
|
-
/**
|
|
26711
|
-
* 获取实体数据集数据
|
|
26712
|
-
*
|
|
26713
|
-
* @protected
|
|
26714
|
-
* @param {TreeNodeRSModel} nodeRS
|
|
26715
|
-
* @param {TreeFetchOpts} opts
|
|
26716
|
-
* @returns {*}
|
|
26717
|
-
* @memberof TreeService
|
|
26718
|
-
*/
|
|
26719
|
-
async getDENodeDatas(nodeModel, nodeRS, parentNodeData, opts) {
|
|
26720
|
-
const { appDEDataSetId, appDataEntityId } = nodeModel;
|
|
26721
|
-
const { context, params, navContext, navParams } = nodeRS ? this.getNodeRSFilterParams(nodeRS, parentNodeData, opts) : {
|
|
26722
|
-
context: opts.context,
|
|
26723
|
-
params: opts.params,
|
|
26724
|
-
navContext: {},
|
|
26725
|
-
navParams: {}
|
|
26726
|
-
};
|
|
26727
|
-
params.size = nodeModel.maxSize || 1e3;
|
|
26728
|
-
if (nodeModel.sortAppDEFieldId && nodeModel.sortDir) {
|
|
26729
|
-
Object.assign(params, {
|
|
26730
|
-
sort: "".concat(nodeModel.sortAppDEFieldId.toLowerCase(), ",").concat(nodeModel.sortDir.toLowerCase())
|
|
26731
|
-
});
|
|
26732
|
-
}
|
|
26733
|
-
const response = await this.app.deService.exec(
|
|
26734
|
-
appDataEntityId,
|
|
26735
|
-
appDEDataSetId,
|
|
26736
|
-
context,
|
|
26737
|
-
params
|
|
26738
|
-
);
|
|
26739
|
-
if (response.data.length) {
|
|
26740
|
-
const { data } = this.handleResponseForMultiple(response, nodeModel.id);
|
|
26741
|
-
const nodeDatas = data.map((item) => {
|
|
26742
|
-
return new TreeDataSetNodeData(nodeModel, parentNodeData, {
|
|
26743
|
-
data: item,
|
|
26744
|
-
leaf: !!opts.leaf,
|
|
26745
|
-
navContext,
|
|
26746
|
-
navParams
|
|
26747
|
-
});
|
|
26748
|
-
});
|
|
26749
|
-
return nodeDatas;
|
|
26750
|
-
}
|
|
26751
|
-
return [];
|
|
26752
|
-
}
|
|
26753
|
-
/**
|
|
26754
|
-
* 处理多数据源响应
|
|
26755
|
-
*
|
|
26756
|
-
* @author zk
|
|
26757
|
-
* @date 2023-09-21 04:09:06
|
|
26758
|
-
* @param {IHttpResponse} response
|
|
26759
|
-
* @param {string} tag 多数据源dataUIMap标识
|
|
26760
|
-
* @return {*} {IHttpResponse}
|
|
26761
|
-
* @memberof TreeGridService
|
|
26762
|
-
*/
|
|
26763
|
-
handleResponseForMultiple(response, tag) {
|
|
26764
|
-
const res = super.handleResponse(response);
|
|
26765
|
-
if (res.headers) {
|
|
26766
|
-
if (res.headers["x-page"]) {
|
|
26767
|
-
res.page = Number(res.headers["x-page"]);
|
|
26768
|
-
}
|
|
26769
|
-
if (res.headers["x-per-page"]) {
|
|
26770
|
-
res.size = Number(res.headers["x-per-page"]);
|
|
26771
|
-
}
|
|
26772
|
-
if (res.headers["x-total"]) {
|
|
26773
|
-
res.total = Number(res.headers["x-total"]);
|
|
26774
|
-
}
|
|
26775
|
-
}
|
|
26776
|
-
if (res.ok) {
|
|
26777
|
-
if (isArray10(res.data)) {
|
|
26778
|
-
res.data = res.data.map(
|
|
26779
|
-
(item) => this.toUIDataForMultiple(item, tag)
|
|
26780
|
-
);
|
|
26781
|
-
} else {
|
|
26782
|
-
res.data = this.toUIDataForMultiple(res.data, tag);
|
|
26783
|
-
}
|
|
26784
|
-
}
|
|
26785
|
-
return res;
|
|
26786
|
-
}
|
|
26787
|
-
/**
|
|
26788
|
-
* 实体数据转ui数据
|
|
26789
|
-
*
|
|
26790
|
-
* @author zk
|
|
26791
|
-
* @date 2023-09-21 06:09:06
|
|
26792
|
-
* @param {IData} entityData 实体数据
|
|
26793
|
-
* @param {string} tag 多数据源dataUIMap标识
|
|
26794
|
-
* @return {*} {ControlVO}
|
|
26795
|
-
* @memberof TreeGridService
|
|
26796
|
-
*/
|
|
26797
|
-
toUIDataForMultiple(entityData, tag) {
|
|
26798
|
-
const dataUIMap = this.multipleUiMap.get(tag);
|
|
26799
|
-
return new ControlVO(entityData, dataUIMap);
|
|
26800
|
-
}
|
|
26801
27268
|
};
|
|
26802
27269
|
|
|
26803
27270
|
// src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
|
|
26804
|
-
var TreeGridExController = class extends
|
|
27271
|
+
var TreeGridExController = class extends TreeController {
|
|
26805
27272
|
constructor() {
|
|
26806
27273
|
super(...arguments);
|
|
26807
27274
|
/**
|
|
26808
|
-
*
|
|
27275
|
+
* 树表格(增强)列的适配器
|
|
26809
27276
|
*
|
|
26810
27277
|
* @author zk
|
|
26811
27278
|
* @date 2023-09-21 06:09:04
|
|
26812
|
-
* @type {{ [key: string]:
|
|
27279
|
+
* @type {{ [key: string]: ITreeGridExColumnProvider }}
|
|
26813
27280
|
* @memberof TreeGridExController
|
|
26814
27281
|
*/
|
|
26815
27282
|
this.providers = {};
|
|
26816
27283
|
/**
|
|
26817
|
-
*
|
|
27284
|
+
* 所有树表格(增强)列控制器集合
|
|
26818
27285
|
*
|
|
26819
27286
|
* @author zk
|
|
26820
27287
|
* @date 2023-09-21 06:09:10
|
|
26821
|
-
* @type {{ [key: string]:
|
|
27288
|
+
* @type {{ [key: string]: TreeGridExColumnController }}
|
|
26822
27289
|
* @memberof TreeGridExController
|
|
26823
27290
|
*/
|
|
26824
27291
|
this.columns = {};
|
|
26825
27292
|
/**
|
|
26826
|
-
*
|
|
27293
|
+
* 所有树表格(增强)属性列的控制器
|
|
26827
27294
|
*
|
|
26828
27295
|
* @author zk
|
|
26829
27296
|
* @date 2023-09-21 06:09:16
|
|
26830
|
-
* @type {{ [key: string]:
|
|
27297
|
+
* @type {{ [key: string]: TreeGridExFieldColumnController }}
|
|
26831
27298
|
* @memberof TreeGridExController
|
|
26832
27299
|
*/
|
|
26833
27300
|
this.fieldColumns = {};
|
|
26834
27301
|
/**
|
|
26835
|
-
*
|
|
27302
|
+
* 所有树表格(增强)操作列的控制器
|
|
26836
27303
|
*
|
|
26837
27304
|
* @author zk
|
|
26838
27305
|
* @date 2023-09-21 06:09:21
|
|
26839
|
-
* @type {{ [key: string]:
|
|
27306
|
+
* @type {{ [key: string]: TreeGridExUAColumnController }}
|
|
26840
27307
|
* @memberof TreeGridExController
|
|
26841
27308
|
*/
|
|
26842
27309
|
this.uaColumns = {};
|
|
26843
27310
|
}
|
|
27311
|
+
/**
|
|
27312
|
+
* 是否有配置宽度自适应列
|
|
27313
|
+
*
|
|
27314
|
+
* @type {boolean}
|
|
27315
|
+
* @memberof GridController
|
|
27316
|
+
*/
|
|
27317
|
+
get hasAdaptiveColumn() {
|
|
27318
|
+
return !!Object.values(this.columns).find((item) => item.isAdaptiveColumn);
|
|
27319
|
+
}
|
|
27320
|
+
/**
|
|
27321
|
+
* 单元格超出呈现模式
|
|
27322
|
+
* @author lxm
|
|
27323
|
+
* @date 2023-11-17 01:56:26
|
|
27324
|
+
* @readonly
|
|
27325
|
+
* @type {('wrap' | 'ellipsis')}
|
|
27326
|
+
*/
|
|
27327
|
+
get overflowMode() {
|
|
27328
|
+
return ibiz.config.grid.overflowMode;
|
|
27329
|
+
}
|
|
26844
27330
|
initState() {
|
|
26845
27331
|
super.initState();
|
|
26846
|
-
this.state.size = 0;
|
|
26847
27332
|
this.state.columnStates = [];
|
|
26848
|
-
this.state.
|
|
27333
|
+
this.state.rows = {};
|
|
26849
27334
|
}
|
|
26850
27335
|
async onCreated() {
|
|
26851
27336
|
await super.onCreated();
|
|
26852
|
-
this.service = new TreeGridExService(this.model);
|
|
26853
|
-
await this.service.init(this.context);
|
|
26854
27337
|
this.initColumnStates();
|
|
26855
27338
|
await this.initGridColumns();
|
|
26856
27339
|
}
|
|
27340
|
+
async initService() {
|
|
27341
|
+
this.service = new TreeGridExService(this.model);
|
|
27342
|
+
await this.service.init(this.context);
|
|
27343
|
+
}
|
|
26857
27344
|
/**
|
|
26858
|
-
*
|
|
27345
|
+
* 初始化树表格(增强)属性列,操作列,编辑项控制器
|
|
26859
27346
|
*
|
|
26860
27347
|
* @author zk
|
|
26861
27348
|
* @date 2023-09-21 06:09:28
|
|
@@ -26873,7 +27360,7 @@ var TreeGridExController = class extends MDControlController {
|
|
|
26873
27360
|
}
|
|
26874
27361
|
}
|
|
26875
27362
|
/**
|
|
26876
|
-
*
|
|
27363
|
+
* 初始化树表格(增强)属性列,操作列,编辑项控制器
|
|
26877
27364
|
*
|
|
26878
27365
|
* @author zk
|
|
26879
27366
|
* @date 2023-09-21 06:09:37
|
|
@@ -26883,7 +27370,7 @@ var TreeGridExController = class extends MDControlController {
|
|
|
26883
27370
|
* @memberof TreeGridExController
|
|
26884
27371
|
*/
|
|
26885
27372
|
async initColumnsController(column) {
|
|
26886
|
-
const provider = await
|
|
27373
|
+
const provider = await getTreeGridExColumnProvider(column);
|
|
26887
27374
|
if (!provider) {
|
|
26888
27375
|
return;
|
|
26889
27376
|
}
|
|
@@ -26897,7 +27384,7 @@ var TreeGridExController = class extends MDControlController {
|
|
|
26897
27384
|
}
|
|
26898
27385
|
}
|
|
26899
27386
|
/**
|
|
26900
|
-
*
|
|
27387
|
+
* 初始化树表格(增强)列状态
|
|
26901
27388
|
*
|
|
26902
27389
|
* @author zk
|
|
26903
27390
|
* @date 2023-09-21 06:09:43
|
|
@@ -26905,20 +27392,15 @@ var TreeGridExController = class extends MDControlController {
|
|
|
26905
27392
|
* @memberof TreeGridExController
|
|
26906
27393
|
*/
|
|
26907
27394
|
initColumnStates() {
|
|
26908
|
-
|
|
26909
|
-
|
|
26910
|
-
(
|
|
26911
|
-
|
|
26912
|
-
|
|
26913
|
-
|
|
26914
|
-
|
|
26915
|
-
|
|
26916
|
-
|
|
26917
|
-
});
|
|
26918
|
-
}
|
|
26919
|
-
},
|
|
26920
|
-
{ childrenFields: ["detreeColumns"] }
|
|
26921
|
-
);
|
|
27395
|
+
var _a;
|
|
27396
|
+
(_a = this.model.detreeColumns) == null ? void 0 : _a.forEach((column) => {
|
|
27397
|
+
this.state.columnStates.push({
|
|
27398
|
+
key: column.codeName,
|
|
27399
|
+
caption: column.caption,
|
|
27400
|
+
hidden: !!column.hideDefault,
|
|
27401
|
+
uaColumn: column.columnType === "UAGRIDCOLUMN"
|
|
27402
|
+
});
|
|
27403
|
+
});
|
|
26922
27404
|
this.calcColumnFixed();
|
|
26923
27405
|
}
|
|
26924
27406
|
/**
|
|
@@ -26937,92 +27419,194 @@ var TreeGridExController = class extends MDControlController {
|
|
|
26937
27419
|
showColumns.forEach((column, index) => {
|
|
26938
27420
|
if (column.uaColumn) {
|
|
26939
27421
|
column.fixed = index + 1 <= Math.floor(allNum / 2) ? "left" : "right";
|
|
26940
|
-
} else {
|
|
26941
|
-
column.fixed = "right";
|
|
26942
27422
|
}
|
|
26943
27423
|
});
|
|
26944
27424
|
}
|
|
26945
27425
|
/**
|
|
26946
|
-
*
|
|
26947
|
-
*
|
|
26948
|
-
* @
|
|
26949
|
-
* @
|
|
26950
|
-
* @
|
|
26951
|
-
* @return {*} {Promise<ITreeNodeData[]>}
|
|
26952
|
-
* @memberof TreeGridExController
|
|
27426
|
+
* 获取树表格行数据
|
|
27427
|
+
* @author lxm
|
|
27428
|
+
* @date 2023-12-22 02:23:44
|
|
27429
|
+
* @param {string} key 可以是节点id也可以是_uuid
|
|
27430
|
+
* @return {*} {(ITreeGridExRowState | undefined)}
|
|
26953
27431
|
*/
|
|
26954
|
-
|
|
26955
|
-
const
|
|
26956
|
-
|
|
26957
|
-
|
|
26958
|
-
|
|
26959
|
-
|
|
26960
|
-
|
|
26961
|
-
|
|
27432
|
+
getRowState(key) {
|
|
27433
|
+
const nodeData = this.getNodeData(key);
|
|
27434
|
+
if (nodeData) {
|
|
27435
|
+
return this.state.rows[nodeData._uuid];
|
|
27436
|
+
}
|
|
27437
|
+
}
|
|
27438
|
+
async afterLoadNodes(nodes) {
|
|
27439
|
+
await super.afterLoadNodes(nodes);
|
|
27440
|
+
recursiveIterate11({ children: nodes }, (node) => {
|
|
27441
|
+
this.state.rows[node._uuid] = new TreeGridExRowState(node, this);
|
|
26962
27442
|
});
|
|
26963
|
-
return nodes;
|
|
26964
27443
|
}
|
|
26965
27444
|
/**
|
|
26966
|
-
*
|
|
27445
|
+
* 转换各类多语言
|
|
26967
27446
|
*
|
|
26968
|
-
* @
|
|
26969
|
-
* @
|
|
26970
|
-
* @param {ITreeNodeData} [parentNode]
|
|
26971
|
-
* @return {*} {Promise<ITreeNodeData[]>}
|
|
26972
|
-
* @memberof TreeGridExController
|
|
27447
|
+
* @date 2023-05-18 02:57:00
|
|
27448
|
+
* @protected
|
|
26973
27449
|
*/
|
|
26974
|
-
|
|
26975
|
-
const
|
|
26976
|
-
|
|
26977
|
-
|
|
26978
|
-
|
|
26979
|
-
|
|
26980
|
-
|
|
26981
|
-
|
|
26982
|
-
|
|
26983
|
-
|
|
26984
|
-
|
|
26985
|
-
|
|
26986
|
-
|
|
26987
|
-
} finally {
|
|
26988
|
-
await this.endLoading();
|
|
26989
|
-
}
|
|
26990
|
-
if (parentNode) {
|
|
26991
|
-
parentNode.children = nodes;
|
|
26992
|
-
} else {
|
|
26993
|
-
this.state.rootNodes = nodes;
|
|
27450
|
+
convertMultipleLanguages() {
|
|
27451
|
+
const convertColumnCaption = (columns) => {
|
|
27452
|
+
columns.forEach((column) => {
|
|
27453
|
+
if (column.capLanguageRes && column.capLanguageRes.lanResTag) {
|
|
27454
|
+
column.caption = ibiz.i18n.t(
|
|
27455
|
+
column.capLanguageRes.lanResTag,
|
|
27456
|
+
column.caption
|
|
27457
|
+
);
|
|
27458
|
+
}
|
|
27459
|
+
});
|
|
27460
|
+
};
|
|
27461
|
+
if (this.model.detreeColumns && this.model.detreeColumns.length > 0) {
|
|
27462
|
+
convertColumnCaption(this.model.detreeColumns);
|
|
26994
27463
|
}
|
|
26995
|
-
|
|
26996
|
-
|
|
26997
|
-
|
|
26998
|
-
|
|
26999
|
-
|
|
27000
|
-
|
|
27464
|
+
}
|
|
27465
|
+
};
|
|
27466
|
+
|
|
27467
|
+
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.ts
|
|
27468
|
+
var TreeGridExColumnController = class {
|
|
27469
|
+
/**
|
|
27470
|
+
* Creates an instance of GridFieldColumnController.
|
|
27471
|
+
* @author lxm
|
|
27472
|
+
* @date 2022-08-24 20:08:22
|
|
27473
|
+
* @param {T} model
|
|
27474
|
+
*/
|
|
27475
|
+
constructor(model, treeGrid) {
|
|
27476
|
+
/**
|
|
27477
|
+
* 是否是自适应列
|
|
27478
|
+
* @author lxm
|
|
27479
|
+
* @date 2023-07-07 11:20:16
|
|
27480
|
+
* @type {boolean}
|
|
27481
|
+
*/
|
|
27482
|
+
this.isAdaptiveColumn = false;
|
|
27483
|
+
/**
|
|
27484
|
+
* 是否是脚本代码
|
|
27485
|
+
* @return {*}
|
|
27486
|
+
* @author: zhujiamin
|
|
27487
|
+
* @Date: 2023-08-15 10:51:25
|
|
27488
|
+
*/
|
|
27489
|
+
this.isCustomCode = false;
|
|
27490
|
+
this.model = model;
|
|
27491
|
+
this.treeGrid = treeGrid;
|
|
27492
|
+
this.isAdaptiveColumn = model.widthUnit === "STAR";
|
|
27493
|
+
}
|
|
27494
|
+
/**
|
|
27495
|
+
* 上下文
|
|
27496
|
+
*
|
|
27497
|
+
* @author lxm
|
|
27498
|
+
* @date 2022-09-05 19:09:24
|
|
27499
|
+
* @readonly
|
|
27500
|
+
* @type {IContext}
|
|
27501
|
+
*/
|
|
27502
|
+
get context() {
|
|
27503
|
+
return this.treeGrid.context;
|
|
27504
|
+
}
|
|
27505
|
+
/**
|
|
27506
|
+
* 视图参数
|
|
27507
|
+
*
|
|
27508
|
+
* @author lxm
|
|
27509
|
+
* @date 2022-09-05 19:09:00
|
|
27510
|
+
* @readonly
|
|
27511
|
+
* @type {IParams}
|
|
27512
|
+
*/
|
|
27513
|
+
get params() {
|
|
27514
|
+
return this.treeGrid.params;
|
|
27515
|
+
}
|
|
27516
|
+
/**
|
|
27517
|
+
* 是否是第一个显示的树表格列
|
|
27518
|
+
* @author lxm
|
|
27519
|
+
* @date 2023-12-22 03:28:10
|
|
27520
|
+
* @readonly
|
|
27521
|
+
* @type {boolean}
|
|
27522
|
+
*/
|
|
27523
|
+
get isFirstShowColumn() {
|
|
27524
|
+
const firstColumn = this.treeGrid.state.columnStates.find(
|
|
27525
|
+
(item) => !item.hidden
|
|
27001
27526
|
);
|
|
27002
|
-
return
|
|
27527
|
+
return (firstColumn == null ? void 0 : firstColumn.key) === this.model.codeName;
|
|
27003
27528
|
}
|
|
27004
27529
|
/**
|
|
27005
|
-
*
|
|
27530
|
+
* 子类不可覆盖或重写此方法,在 init 时需要重写的使用 onInit 方法。
|
|
27006
27531
|
*
|
|
27007
|
-
* @author
|
|
27008
|
-
* @date
|
|
27009
|
-
* @
|
|
27010
|
-
* @return {*} {string[]}
|
|
27011
|
-
* @memberof TreeGridExController
|
|
27532
|
+
* @author lxm
|
|
27533
|
+
* @date 2022-08-18 22:08:30
|
|
27534
|
+
* @returns {*} {Promise<void>}
|
|
27012
27535
|
*/
|
|
27013
|
-
|
|
27014
|
-
|
|
27015
|
-
|
|
27016
|
-
|
|
27017
|
-
|
|
27018
|
-
|
|
27536
|
+
async init() {
|
|
27537
|
+
await this.onInit();
|
|
27538
|
+
}
|
|
27539
|
+
/**
|
|
27540
|
+
* 初始化方法
|
|
27541
|
+
*
|
|
27542
|
+
* @author lxm
|
|
27543
|
+
* @date 2022-09-28 15:09:15
|
|
27544
|
+
* @protected
|
|
27545
|
+
* @returns {*} {Promise<void>}
|
|
27546
|
+
*/
|
|
27547
|
+
async onInit() {
|
|
27548
|
+
}
|
|
27549
|
+
};
|
|
27550
|
+
|
|
27551
|
+
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.ts
|
|
27552
|
+
var TreeGridExFieldColumnController = class extends TreeGridExColumnController {
|
|
27553
|
+
};
|
|
27554
|
+
|
|
27555
|
+
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts
|
|
27556
|
+
import { RuntimeModelError as RuntimeModelError63 } from "@ibiz-template/core";
|
|
27557
|
+
var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
27558
|
+
/**
|
|
27559
|
+
* 给rowController初始化操作列的状态
|
|
27560
|
+
*
|
|
27561
|
+
* @author lxm
|
|
27562
|
+
* @date 2022-09-07 21:09:43
|
|
27563
|
+
* @param {ITreeGridExRowState} row
|
|
27564
|
+
*/
|
|
27565
|
+
initActionStates(row) {
|
|
27566
|
+
var _a;
|
|
27567
|
+
const { deuiactionGroup } = this.model;
|
|
27568
|
+
if (!deuiactionGroup) {
|
|
27569
|
+
throw new RuntimeModelError63(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
27570
|
+
}
|
|
27571
|
+
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
27572
|
+
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
27573
|
+
return;
|
|
27574
|
+
}
|
|
27575
|
+
const containerState = new ButtonContainerState();
|
|
27576
|
+
deuiactionGroup.uiactionGroupDetails.forEach((detail) => {
|
|
27577
|
+
const actionid = detail.uiactionId;
|
|
27578
|
+
if (actionid) {
|
|
27579
|
+
const buttonState = new UIActionButtonState(
|
|
27580
|
+
detail.id,
|
|
27581
|
+
this.treeGrid.context.srfappid,
|
|
27582
|
+
actionid
|
|
27583
|
+
);
|
|
27584
|
+
containerState.addState(detail.id, buttonState);
|
|
27019
27585
|
}
|
|
27020
27586
|
});
|
|
27021
|
-
|
|
27022
|
-
|
|
27023
|
-
|
|
27024
|
-
|
|
27025
|
-
|
|
27587
|
+
row.uaColStates[this.model.codeName] = containerState;
|
|
27588
|
+
}
|
|
27589
|
+
/**
|
|
27590
|
+
* 触发操作列点击事件
|
|
27591
|
+
*
|
|
27592
|
+
* @author lxm
|
|
27593
|
+
* @date 2022-09-07 22:09:46
|
|
27594
|
+
* @param {IPSUIActionGroupDetail} detail
|
|
27595
|
+
* @param {MouseEvent} event
|
|
27596
|
+
*/
|
|
27597
|
+
async onActionClick(detail, row, event) {
|
|
27598
|
+
const actionId = detail.uiactionId;
|
|
27599
|
+
await UIActionUtil.execAndResolved(
|
|
27600
|
+
actionId,
|
|
27601
|
+
{
|
|
27602
|
+
context: this.context,
|
|
27603
|
+
params: this.params,
|
|
27604
|
+
data: [row.data],
|
|
27605
|
+
view: this.treeGrid.view,
|
|
27606
|
+
event
|
|
27607
|
+
},
|
|
27608
|
+
detail.appId
|
|
27609
|
+
);
|
|
27026
27610
|
}
|
|
27027
27611
|
};
|
|
27028
27612
|
|
|
@@ -27036,7 +27620,7 @@ var TreeGridService = class extends GridService {
|
|
|
27036
27620
|
|
|
27037
27621
|
// src/controller/control/medit-view-panel/medit-view-panel.controller.ts
|
|
27038
27622
|
import { RuntimeError as RuntimeError58 } from "@ibiz-template/core";
|
|
27039
|
-
import { createUUID as
|
|
27623
|
+
import { createUUID as createUUID13 } from "qx-util";
|
|
27040
27624
|
|
|
27041
27625
|
// src/controller/control/medit-view-panel/medit-view-panel.service.ts
|
|
27042
27626
|
var MEditViewPanelService = class extends MDControlService {
|
|
@@ -27123,7 +27707,7 @@ var MEditViewPanelController = class extends MDControlController {
|
|
|
27123
27707
|
*/
|
|
27124
27708
|
handlePanelItemParams(arg) {
|
|
27125
27709
|
const [{ parameterName }] = this.parameters;
|
|
27126
|
-
const id = arg[parameterName] ? arg[parameterName] : "mockId:".concat(
|
|
27710
|
+
const id = arg[parameterName] ? arg[parameterName] : "mockId:".concat(createUUID13());
|
|
27127
27711
|
const item = {
|
|
27128
27712
|
id,
|
|
27129
27713
|
context: this.context.clone(),
|
|
@@ -27275,7 +27859,7 @@ var MapService = class extends MDControlService {
|
|
|
27275
27859
|
* 加载所有地图项的数据
|
|
27276
27860
|
* @author lxm
|
|
27277
27861
|
* @date 2023-10-30 06:27:32
|
|
27278
|
-
* @param {
|
|
27862
|
+
* @param {IContext} context
|
|
27279
27863
|
* @param {IParams} [params={}]
|
|
27280
27864
|
* @return {*} {Promise<IHttpResponse<IMapData[]>>}
|
|
27281
27865
|
*/
|
|
@@ -27456,7 +28040,7 @@ var ReportPanelService = class extends ControlService {
|
|
|
27456
28040
|
/**
|
|
27457
28041
|
* 执行查询报表数据的方法
|
|
27458
28042
|
*
|
|
27459
|
-
* @param {
|
|
28043
|
+
* @param {IContext} context 上下文
|
|
27460
28044
|
* @param {IParams} [params={}] 视图参数
|
|
27461
28045
|
* @returns {*} {Promise<IHttpResponse>}
|
|
27462
28046
|
*/
|
|
@@ -28637,7 +29221,7 @@ var AppHub = class {
|
|
|
28637
29221
|
* @param {IAppView} model
|
|
28638
29222
|
*/
|
|
28639
29223
|
registerAppView(model) {
|
|
28640
|
-
this.views.set(model.codeName, model);
|
|
29224
|
+
this.views.set(model.codeName.toLowerCase(), model);
|
|
28641
29225
|
}
|
|
28642
29226
|
/**
|
|
28643
29227
|
* 注册应用实体
|
|
@@ -28808,6 +29392,19 @@ var AppHub = class {
|
|
|
28808
29392
|
}
|
|
28809
29393
|
return this.appMap.get(key);
|
|
28810
29394
|
}
|
|
29395
|
+
/**
|
|
29396
|
+
* 获取所有应用实例
|
|
29397
|
+
*
|
|
29398
|
+
* @author chitanda
|
|
29399
|
+
* @date 2023-12-22 16:12:28
|
|
29400
|
+
* @return {*} {IAppService[]}
|
|
29401
|
+
*/
|
|
29402
|
+
getAllApps() {
|
|
29403
|
+
if (this.appMap.size > 0) {
|
|
29404
|
+
return Array.from(this.appMap.values());
|
|
29405
|
+
}
|
|
29406
|
+
return [];
|
|
29407
|
+
}
|
|
28811
29408
|
};
|
|
28812
29409
|
|
|
28813
29410
|
// src/engine/engine-factory.ts
|
|
@@ -29069,7 +29666,7 @@ var ViewEngineBase = class {
|
|
|
29069
29666
|
};
|
|
29070
29667
|
|
|
29071
29668
|
// src/engine/md-view.engine.ts
|
|
29072
|
-
import { RuntimeModelError as
|
|
29669
|
+
import { RuntimeModelError as RuntimeModelError64 } from "@ibiz-template/core";
|
|
29073
29670
|
import { clone as clone24 } from "ramda";
|
|
29074
29671
|
var MDViewEngine = class extends ViewEngineBase {
|
|
29075
29672
|
/**
|
|
@@ -29253,7 +29850,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
29253
29850
|
view: this.view
|
|
29254
29851
|
}));
|
|
29255
29852
|
if (result === -1) {
|
|
29256
|
-
throw new
|
|
29853
|
+
throw new RuntimeModelError64(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
29257
29854
|
} else {
|
|
29258
29855
|
return {
|
|
29259
29856
|
cancel: !result.ok
|
|
@@ -29276,7 +29873,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
29276
29873
|
(item) => item.id === "newdata"
|
|
29277
29874
|
);
|
|
29278
29875
|
if (!openAppViewLogic) {
|
|
29279
|
-
throw new
|
|
29876
|
+
throw new RuntimeModelError64(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
29280
29877
|
}
|
|
29281
29878
|
const params = clone24(this.view.params);
|
|
29282
29879
|
if (copyMode) {
|
|
@@ -29290,7 +29887,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
29290
29887
|
view: this.view
|
|
29291
29888
|
}));
|
|
29292
29889
|
if (result === -1) {
|
|
29293
|
-
throw new
|
|
29890
|
+
throw new RuntimeModelError64(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
29294
29891
|
} else {
|
|
29295
29892
|
return {
|
|
29296
29893
|
cancel: !result.ok
|
|
@@ -29409,7 +30006,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
29409
30006
|
|
|
29410
30007
|
// src/utils/error-handler/default-error-handler.ts
|
|
29411
30008
|
import {
|
|
29412
|
-
RuntimeModelError as
|
|
30009
|
+
RuntimeModelError as RuntimeModelError65,
|
|
29413
30010
|
ModelError as ModelError31,
|
|
29414
30011
|
HttpError as HttpError5,
|
|
29415
30012
|
NoticeError as NoticeError2,
|
|
@@ -29417,7 +30014,7 @@ import {
|
|
|
29417
30014
|
} from "@ibiz-template/core";
|
|
29418
30015
|
var DefaultErrorHandler = class {
|
|
29419
30016
|
handle(error) {
|
|
29420
|
-
if (error instanceof
|
|
30017
|
+
if (error instanceof RuntimeModelError65 || error instanceof ModelError31) {
|
|
29421
30018
|
ibiz.message.error(error.message, 10, true);
|
|
29422
30019
|
} else if (error instanceof HttpError5) {
|
|
29423
30020
|
if (error.status === 401) {
|
|
@@ -29685,13 +30282,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
29685
30282
|
};
|
|
29686
30283
|
|
|
29687
30284
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
29688
|
-
import { RuntimeModelError as
|
|
30285
|
+
import { RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
|
|
29689
30286
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
29690
30287
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29691
30288
|
execute(executeParams) {
|
|
29692
30289
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
29693
30290
|
if (!appDEUILogicId) {
|
|
29694
|
-
throw new
|
|
30291
|
+
throw new RuntimeModelError66(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
29695
30292
|
}
|
|
29696
30293
|
execUILogic(appDEUILogicId, appDataEntityId, executeParams);
|
|
29697
30294
|
}
|
|
@@ -30149,7 +30746,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
30149
30746
|
};
|
|
30150
30747
|
|
|
30151
30748
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
30152
|
-
import { RuntimeError as RuntimeError65, RuntimeModelError as
|
|
30749
|
+
import { RuntimeError as RuntimeError65, RuntimeModelError as RuntimeModelError67 } from "@ibiz-template/core";
|
|
30153
30750
|
var TimerTrigger = class extends LogicTrigger {
|
|
30154
30751
|
constructor() {
|
|
30155
30752
|
super(...arguments);
|
|
@@ -30157,7 +30754,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
30157
30754
|
}
|
|
30158
30755
|
start() {
|
|
30159
30756
|
if (!this.logic.timer) {
|
|
30160
|
-
throw new
|
|
30757
|
+
throw new RuntimeModelError67(this.logic, "\u5B9A\u65F6\u5668\u7F3A\u5C11\u5B9A\u65F6\u95F4\u9694");
|
|
30161
30758
|
}
|
|
30162
30759
|
this.timer = setInterval(() => {
|
|
30163
30760
|
if (!this.scheduler.defaultParamsCb) {
|
|
@@ -30179,7 +30776,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
30179
30776
|
import {
|
|
30180
30777
|
ModelError as ModelError34,
|
|
30181
30778
|
RuntimeError as RuntimeError66,
|
|
30182
|
-
RuntimeModelError as
|
|
30779
|
+
RuntimeModelError as RuntimeModelError68
|
|
30183
30780
|
} from "@ibiz-template/core";
|
|
30184
30781
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
30185
30782
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
@@ -30225,7 +30822,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30225
30822
|
} else {
|
|
30226
30823
|
openViewRef = appUILogic.openDataAppView;
|
|
30227
30824
|
if (!openViewRef) {
|
|
30228
|
-
throw new
|
|
30825
|
+
throw new RuntimeModelError68(
|
|
30229
30826
|
appUILogic,
|
|
30230
30827
|
"opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
|
|
30231
30828
|
);
|
|
@@ -30233,7 +30830,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30233
30830
|
}
|
|
30234
30831
|
const openView = openViewRef.refAppViewId;
|
|
30235
30832
|
if (!openView) {
|
|
30236
|
-
throw new
|
|
30833
|
+
throw new RuntimeModelError68(
|
|
30237
30834
|
appUILogic,
|
|
30238
30835
|
"opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
|
|
30239
30836
|
);
|
|
@@ -30263,7 +30860,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30263
30860
|
);
|
|
30264
30861
|
const typeFileName = appDataEntity.formTypeAppDEFieldId || appDataEntity.dataTypeAppDEFieldId;
|
|
30265
30862
|
if (!typeFileName) {
|
|
30266
|
-
throw new
|
|
30863
|
+
throw new RuntimeModelError68(
|
|
30267
30864
|
appUILogic,
|
|
30268
30865
|
"".concat(appDataEntity.codeName, "[\u591A\u8868\u5355\u5B9E\u4F53] or [\u7D22\u5F15\u5B9E\u4F53]\u7F3A\u5C11\u7C7B\u578B\u5C5E\u6027\u914D\u7F6E")
|
|
30269
30866
|
);
|
|
@@ -30271,7 +30868,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30271
30868
|
const { data } = parameters;
|
|
30272
30869
|
const formTypeValue = data[0][typeFileName];
|
|
30273
30870
|
if (!formTypeValue) {
|
|
30274
|
-
throw new
|
|
30871
|
+
throw new RuntimeModelError68(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
|
|
30275
30872
|
}
|
|
30276
30873
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
30277
30874
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
@@ -30313,7 +30910,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30313
30910
|
return viewRef.refMode.toLowerCase() !== parentDeName;
|
|
30314
30911
|
});
|
|
30315
30912
|
if (!newViewRef) {
|
|
30316
|
-
throw new
|
|
30913
|
+
throw new RuntimeModelError68(
|
|
30317
30914
|
appUILogic,
|
|
30318
30915
|
"\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE"
|
|
30319
30916
|
);
|
|
@@ -30323,7 +30920,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30323
30920
|
} else {
|
|
30324
30921
|
newViewRef = newDataAppView;
|
|
30325
30922
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
30326
|
-
throw new
|
|
30923
|
+
throw new RuntimeModelError68(
|
|
30327
30924
|
appUILogic,
|
|
30328
30925
|
"newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
|
|
30329
30926
|
);
|
|
@@ -30381,7 +30978,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30381
30978
|
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
30382
30979
|
const { context, params, ...rest } = parameters;
|
|
30383
30980
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
30384
|
-
throw new
|
|
30981
|
+
throw new RuntimeModelError68(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
|
|
30385
30982
|
}
|
|
30386
30983
|
const result = await ibiz.commands.execute(
|
|
30387
30984
|
OpenAppViewCommand.TAG,
|
|
@@ -30432,7 +31029,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30432
31029
|
const minorDERs = selfDe.minorAppDERSs;
|
|
30433
31030
|
const pickParentDeName = newViewRef.refMode.toLowerCase();
|
|
30434
31031
|
if (!minorDERs) {
|
|
30435
|
-
throw new
|
|
31032
|
+
throw new RuntimeModelError68(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
|
|
30436
31033
|
}
|
|
30437
31034
|
let pickParentFieldName;
|
|
30438
31035
|
minorDERs == null ? void 0 : minorDERs.forEach((item) => {
|
|
@@ -30531,12 +31128,12 @@ var ControlEventTrigger = class extends LogicTrigger {
|
|
|
30531
31128
|
};
|
|
30532
31129
|
|
|
30533
31130
|
// src/logic-scheduler/executor/app-ui-action-executor.ts
|
|
30534
|
-
import { RuntimeModelError as
|
|
31131
|
+
import { RuntimeModelError as RuntimeModelError69 } from "@ibiz-template/core";
|
|
30535
31132
|
var AppDEUIActionExecutor = class extends LogicExecutor {
|
|
30536
31133
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30537
31134
|
execute(executeParams) {
|
|
30538
31135
|
if (!this.logic.appDEUIActionId) {
|
|
30539
|
-
throw new
|
|
31136
|
+
throw new RuntimeModelError69(
|
|
30540
31137
|
this.logic,
|
|
30541
31138
|
"\u903B\u8F91\u4E2D\u7F3A\u5C11\u89E6\u53D1\u5E94\u7528\u5B9E\u4F53\u754C\u9762\u884C\u4E3Aid"
|
|
30542
31139
|
);
|
|
@@ -30612,6 +31209,7 @@ function install2() {
|
|
|
30612
31209
|
ibiz2.auth = new V7AuthService();
|
|
30613
31210
|
ibiz2.asyncAction = new AsyncActionService();
|
|
30614
31211
|
ibiz2.engine = new EngineFactory();
|
|
31212
|
+
ibiz2.uiDomainManager = new UIDomainManager();
|
|
30615
31213
|
installCommand();
|
|
30616
31214
|
presetUIActionProvider();
|
|
30617
31215
|
presetDEMethodProvider();
|
|
@@ -30876,6 +31474,7 @@ export {
|
|
|
30876
31474
|
StudioViewEvents,
|
|
30877
31475
|
SysUIActionProvider,
|
|
30878
31476
|
SysUIActionTag,
|
|
31477
|
+
TREEGRIDEX_COLUMN_PROVIDER_PREFIX,
|
|
30879
31478
|
TabExpPanelController,
|
|
30880
31479
|
TextUtil,
|
|
30881
31480
|
ThemeUtil,
|
|
@@ -30885,8 +31484,12 @@ export {
|
|
|
30885
31484
|
TreeDataSetNodeData,
|
|
30886
31485
|
TreeExpBarController,
|
|
30887
31486
|
TreeGridController,
|
|
31487
|
+
TreeGridExColumnController,
|
|
30888
31488
|
TreeGridExController,
|
|
31489
|
+
TreeGridExFieldColumnController,
|
|
31490
|
+
TreeGridExRowState,
|
|
30889
31491
|
TreeGridExService,
|
|
31492
|
+
TreeGridExUAColumnController,
|
|
30890
31493
|
TreeGridService,
|
|
30891
31494
|
TreeNodeData,
|
|
30892
31495
|
TreeService,
|
|
@@ -30895,6 +31498,8 @@ export {
|
|
|
30895
31498
|
UIActionButtonState,
|
|
30896
31499
|
UIActionProviderBase,
|
|
30897
31500
|
UIActionUtil,
|
|
31501
|
+
UIDomain,
|
|
31502
|
+
UIDomainManager,
|
|
30898
31503
|
UILOGINNODE_PROVIDER_PREFIX,
|
|
30899
31504
|
UIMapField,
|
|
30900
31505
|
V7AuthService,
|
|
@@ -30968,6 +31573,7 @@ export {
|
|
|
30968
31573
|
getPlatformType,
|
|
30969
31574
|
getPortletProvider,
|
|
30970
31575
|
getRootNode,
|
|
31576
|
+
getTreeGridExColumnProvider,
|
|
30971
31577
|
getTreeNode,
|
|
30972
31578
|
getUIActionById,
|
|
30973
31579
|
getUIActionItemsByActionLevel,
|
|
@@ -31003,6 +31609,7 @@ export {
|
|
|
31003
31609
|
registerPanelItemProvider,
|
|
31004
31610
|
registerPlatformProvider,
|
|
31005
31611
|
registerPortletProvider,
|
|
31612
|
+
registerTreeGridExColumnProvider,
|
|
31006
31613
|
registerUIActionProvider,
|
|
31007
31614
|
registerUILogicNodeProvider,
|
|
31008
31615
|
registerViewProvider,
|