@ibiz-template/runtime 0.4.16 → 0.4.17-dev.1
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 +1183 -632
- 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 +13 -0
- 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/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/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/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/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-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 +49 -43
- 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 +26 -13
- package/out/service/de-service-util.d.ts.map +1 -1
- package/out/service/de-service-util.js +45 -16
- package/out/service/dto/method.dto.d.ts +20 -8
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +33 -15
- 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 +13 -13
- package/out/service/service/control/md-control.service.d.ts.map +1 -1
- package/out/service/service/control/md-control.service.js +7 -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 +46 -28
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +35 -71
- 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 +9 -21
- 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 +14 -0
- package/src/controller/common/base.controller.ts +3 -0
- 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/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/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/install.ts +3 -0
- package/src/interface/common/i-app-hub-service/i-app-hub-service.ts +9 -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 +51 -44
- 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 +59 -27
- package/src/service/dto/method.dto.ts +39 -19
- 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 +16 -13
- package/src/service/service/counter/counter.service.ts +3 -3
- package/src/service/service/entity/de.service.ts +57 -89
- 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 +12 -35
- 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
|
*/
|
|
@@ -5472,13 +5605,15 @@ var FileService = class {
|
|
|
5472
5605
|
// src/service/service/entity/de.service.ts
|
|
5473
5606
|
var DEService = class {
|
|
5474
5607
|
/**
|
|
5475
|
-
* Creates an instance of
|
|
5608
|
+
* Creates an instance of DEService.
|
|
5476
5609
|
*
|
|
5477
5610
|
* @author chitanda
|
|
5478
|
-
* @date
|
|
5479
|
-
* @param {
|
|
5611
|
+
* @date 2023-12-22 13:12:21
|
|
5612
|
+
* @param {string} srfSessionId 当前实体会话标识
|
|
5613
|
+
* @param {IAppDataEntity} model 实体模型
|
|
5480
5614
|
*/
|
|
5481
|
-
constructor(model) {
|
|
5615
|
+
constructor(srfSessionId, model) {
|
|
5616
|
+
this.srfSessionId = srfSessionId;
|
|
5482
5617
|
this.model = model;
|
|
5483
5618
|
/**
|
|
5484
5619
|
* 请求方法实例
|
|
@@ -5489,6 +5624,14 @@ var DEService = class {
|
|
|
5489
5624
|
* @type {Map<string, Method>}
|
|
5490
5625
|
*/
|
|
5491
5626
|
this.methodMap = /* @__PURE__ */ new Map();
|
|
5627
|
+
/**
|
|
5628
|
+
* 是否为本地模式(临时数据模式)服务
|
|
5629
|
+
*
|
|
5630
|
+
* @author chitanda
|
|
5631
|
+
* @date 2023-12-22 16:12:13
|
|
5632
|
+
* @type {boolean}
|
|
5633
|
+
*/
|
|
5634
|
+
this.isLocalMode = false;
|
|
5492
5635
|
this.local = new DECache(model);
|
|
5493
5636
|
this.configCache = new ConfigService(
|
|
5494
5637
|
model.appId,
|
|
@@ -5518,7 +5661,10 @@ var DEService = class {
|
|
|
5518
5661
|
if (!provider) {
|
|
5519
5662
|
throw new ModelError5(model, "\u672A\u652F\u6301\u7684\u670D\u52A1\u65B9\u6CD5\u7C7B\u578B: ".concat(model.methodType));
|
|
5520
5663
|
}
|
|
5521
|
-
const method = provider.create(this.model, model, {
|
|
5664
|
+
const method = provider.create(this, this.model, model, {
|
|
5665
|
+
acMode,
|
|
5666
|
+
localMode: this.isLocalMode
|
|
5667
|
+
});
|
|
5522
5668
|
this.methodMap.set(cacheId, method);
|
|
5523
5669
|
return method;
|
|
5524
5670
|
}
|
|
@@ -5528,7 +5674,7 @@ var DEService = class {
|
|
|
5528
5674
|
* @author chitanda
|
|
5529
5675
|
* @date 2022-09-13 19:09:55
|
|
5530
5676
|
* @param {string} id 执行服务方法标识
|
|
5531
|
-
* @param {
|
|
5677
|
+
* @param {IContext} context
|
|
5532
5678
|
* @param {IData} [params={}] 请求参数
|
|
5533
5679
|
* @param {IParams} [params2={}] 查询参数
|
|
5534
5680
|
* @return {*} {Promise<IHttpResponse>}
|
|
@@ -5579,51 +5725,12 @@ var DEService = class {
|
|
|
5579
5725
|
/**
|
|
5580
5726
|
* 查询本地数据,根据属性
|
|
5581
5727
|
*
|
|
5582
|
-
* @param {
|
|
5728
|
+
* @param {IContext} context
|
|
5583
5729
|
* @param {IParams} params 根据多实体属性查找,例:{ name: '张三', age: 18, parent: null }
|
|
5584
5730
|
* @return {*} {Promise<IDataEntity[]>}
|
|
5585
5731
|
*/
|
|
5586
5732
|
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;
|
|
5733
|
+
return this.local.select(context, params);
|
|
5627
5734
|
}
|
|
5628
5735
|
/**
|
|
5629
5736
|
* 执行服务方法 ac 模式
|
|
@@ -5631,7 +5738,7 @@ var DEService = class {
|
|
|
5631
5738
|
* @author chitanda
|
|
5632
5739
|
* @date 2022-09-13 19:09:55
|
|
5633
5740
|
* @param {string} id 执行服务方法标识
|
|
5634
|
-
* @param {
|
|
5741
|
+
* @param {IContext} context
|
|
5635
5742
|
* @param {IData} [params={}] 请求参数
|
|
5636
5743
|
* @param {IParams} [params2={}] 查询参数
|
|
5637
5744
|
* @return {*} {Promise<IHttpResponse>}
|
|
@@ -5649,7 +5756,7 @@ var DEService = class {
|
|
|
5649
5756
|
* @author chitanda
|
|
5650
5757
|
* @date 2023-10-16 16:10:16
|
|
5651
5758
|
* @param {(data: IPortalAsyncAction) => void} onmessage
|
|
5652
|
-
* @param {
|
|
5759
|
+
* @param {IContext} context
|
|
5653
5760
|
* @param {IParams} [params={}]
|
|
5654
5761
|
* @param {IData} [data={}]
|
|
5655
5762
|
* @return {*} {Promise<void>}
|
|
@@ -5687,7 +5794,7 @@ var DEService = class {
|
|
|
5687
5794
|
*
|
|
5688
5795
|
* @author chitanda
|
|
5689
5796
|
* @date 2023-10-26 14:10:58
|
|
5690
|
-
* @param {
|
|
5797
|
+
* @param {IContext} context
|
|
5691
5798
|
* @param {IParams} [params={}]
|
|
5692
5799
|
* @param {IData} [data={}]
|
|
5693
5800
|
* @return {*} {Promise<IHttpResponse>}
|
|
@@ -5703,7 +5810,7 @@ var DEService = class {
|
|
|
5703
5810
|
* @author chitanda
|
|
5704
5811
|
* @date 2023-10-26 14:10:25
|
|
5705
5812
|
* @protected
|
|
5706
|
-
* @param {
|
|
5813
|
+
* @param {IContext} context
|
|
5707
5814
|
* @param {boolean} [isHistories=false]
|
|
5708
5815
|
* @return {*} {string}
|
|
5709
5816
|
*/
|
|
@@ -5713,13 +5820,23 @@ var DEService = class {
|
|
|
5713
5820
|
const resPath = calcResPath(context, this.model);
|
|
5714
5821
|
return resPath + curPath;
|
|
5715
5822
|
}
|
|
5823
|
+
/**
|
|
5824
|
+
* 服务实例销毁
|
|
5825
|
+
*
|
|
5826
|
+
* @author chitanda
|
|
5827
|
+
* @date 2023-12-22 14:12:11
|
|
5828
|
+
* @return {*} {Promise<void>}
|
|
5829
|
+
*/
|
|
5830
|
+
async destroy() {
|
|
5831
|
+
this.local.clear();
|
|
5832
|
+
}
|
|
5716
5833
|
};
|
|
5717
5834
|
|
|
5718
5835
|
// src/service/service/control/control.service.ts
|
|
5719
5836
|
import { clone as clone6 } from "@ibiz-template/core";
|
|
5720
5837
|
|
|
5721
5838
|
// src/service/vo/control.vo.ts
|
|
5722
|
-
import { createUUID as
|
|
5839
|
+
import { createUUID as createUUID3 } from "qx-util";
|
|
5723
5840
|
import { clone as clone5, isNil as isNil7 } from "ramda";
|
|
5724
5841
|
|
|
5725
5842
|
// src/service/constant/srfuf.ts
|
|
@@ -5818,7 +5935,7 @@ var ControlVO = class _ControlVO {
|
|
|
5818
5935
|
enumerable: false,
|
|
5819
5936
|
configurable: true,
|
|
5820
5937
|
writable: true,
|
|
5821
|
-
value: isNil7(this.srfkey) ?
|
|
5938
|
+
value: isNil7(this.srfkey) ? createUUID3() : this.srfkey
|
|
5822
5939
|
});
|
|
5823
5940
|
}
|
|
5824
5941
|
Object.defineProperty(this, "srfuf", {
|
|
@@ -5971,7 +6088,7 @@ var ControlService = class {
|
|
|
5971
6088
|
* @author lxm
|
|
5972
6089
|
* @date 2022-08-31 17:08:41
|
|
5973
6090
|
* @param {string} methodName 方法名
|
|
5974
|
-
* @param {
|
|
6091
|
+
* @param {IContext} context 上下文
|
|
5975
6092
|
* @param {IParams} [params={}] 视图参数或数据
|
|
5976
6093
|
* @returns {*} {Promise<IHttpResponse>}
|
|
5977
6094
|
*/
|
|
@@ -6018,7 +6135,7 @@ var MDControlService = class extends ControlService {
|
|
|
6018
6135
|
*
|
|
6019
6136
|
* @author lxm
|
|
6020
6137
|
* @date 2022-08-31 17:08:41
|
|
6021
|
-
* @param {
|
|
6138
|
+
* @param {IContext} context 上下文
|
|
6022
6139
|
* @param {IParams} [params={}] 视图参数
|
|
6023
6140
|
* @returns {*} {Promise<IHttpResponse>}
|
|
6024
6141
|
*/
|
|
@@ -6034,7 +6151,7 @@ var MDControlService = class extends ControlService {
|
|
|
6034
6151
|
*
|
|
6035
6152
|
* @author lxm
|
|
6036
6153
|
* @date 2022-08-31 17:08:41
|
|
6037
|
-
* @param {
|
|
6154
|
+
* @param {IContext} context 上下文
|
|
6038
6155
|
* @param {IParams} [params={}] 视图参数
|
|
6039
6156
|
* @returns {*} {Promise<IHttpResponse>}
|
|
6040
6157
|
*/
|
|
@@ -6050,7 +6167,7 @@ var MDControlService = class extends ControlService {
|
|
|
6050
6167
|
*
|
|
6051
6168
|
* @author lxm
|
|
6052
6169
|
* @date 2022-08-31 17:08:41
|
|
6053
|
-
* @param {
|
|
6170
|
+
* @param {IContext} context 上下文
|
|
6054
6171
|
* @param {IParams} [params={}] 视图参数
|
|
6055
6172
|
* @returns {*} {Promise<IHttpResponse>}
|
|
6056
6173
|
*/
|
|
@@ -6066,7 +6183,7 @@ var MDControlService = class extends ControlService {
|
|
|
6066
6183
|
*
|
|
6067
6184
|
* @author lxm
|
|
6068
6185
|
* @date 2022-09-07 19:09:48
|
|
6069
|
-
* @param {
|
|
6186
|
+
* @param {IContext} context 上下文
|
|
6070
6187
|
* @param {IParams} [params={}] 视图参数
|
|
6071
6188
|
* @returns {*}
|
|
6072
6189
|
*/
|
|
@@ -6081,7 +6198,7 @@ var MDControlService = class extends ControlService {
|
|
|
6081
6198
|
*
|
|
6082
6199
|
* @author lxm
|
|
6083
6200
|
* @date 2022-09-07 19:09:11
|
|
6084
|
-
* @param {
|
|
6201
|
+
* @param {IContext} context 上下文
|
|
6085
6202
|
* @param {ControlVO} data 数据
|
|
6086
6203
|
* @returns {*}
|
|
6087
6204
|
*/
|
|
@@ -6097,7 +6214,7 @@ var MDControlService = class extends ControlService {
|
|
|
6097
6214
|
*
|
|
6098
6215
|
* @author lxm
|
|
6099
6216
|
* @date 2022-09-07 19:09:11
|
|
6100
|
-
* @param {
|
|
6217
|
+
* @param {IContext} context 上下文
|
|
6101
6218
|
* @param {ControlVO} data 数据
|
|
6102
6219
|
* @returns {*}
|
|
6103
6220
|
*/
|
|
@@ -6134,7 +6251,7 @@ var MDControlService = class extends ControlService {
|
|
|
6134
6251
|
* @author lxm
|
|
6135
6252
|
* @date 2022-11-25 14:11:09
|
|
6136
6253
|
* @param {IPSDEDataExport} dataExport 导出模型
|
|
6137
|
-
* @param {
|
|
6254
|
+
* @param {IContext} context 上下文
|
|
6138
6255
|
* @param {IParams} [params={}] 请求参数
|
|
6139
6256
|
* @returns {*} {Promise<IHttpResponse>}
|
|
6140
6257
|
*/
|
|
@@ -6300,7 +6417,7 @@ var AuthorityService = class {
|
|
|
6300
6417
|
* @author chitanda
|
|
6301
6418
|
* @date 2022-12-23 10:12:24
|
|
6302
6419
|
* @param {string} id 实体标识
|
|
6303
|
-
* @param {
|
|
6420
|
+
* @param {IContext} [context] 上下文,用于计算模型所属沙箱环境
|
|
6304
6421
|
* @return {*} {Promise<IAppDEService>}
|
|
6305
6422
|
*/
|
|
6306
6423
|
async getService(id) {
|
|
@@ -6498,7 +6615,7 @@ import { isArray as isArray4 } from "lodash-es";
|
|
|
6498
6615
|
// src/service/app-data-entity/app-data-entity.ts
|
|
6499
6616
|
import { clone as clone7, isNil as isNil9 } from "ramda";
|
|
6500
6617
|
import { DataTypes } from "@ibiz-template/core";
|
|
6501
|
-
import { createUUID as
|
|
6618
|
+
import { createUUID as createUUID4 } from "qx-util";
|
|
6502
6619
|
var AppDataEntity = class _AppDataEntity {
|
|
6503
6620
|
get srfuf() {
|
|
6504
6621
|
return this.srfkey === this.tempsrfkey ? 1 /* UPDATE */ : 0 /* CREATE */;
|
|
@@ -6580,7 +6697,7 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
6580
6697
|
enumerable: false,
|
|
6581
6698
|
configurable: true,
|
|
6582
6699
|
writable: true,
|
|
6583
|
-
value: isNil9(this.srfkey) ?
|
|
6700
|
+
value: isNil9(this.srfkey) ? createUUID4() : this.srfkey
|
|
6584
6701
|
});
|
|
6585
6702
|
this.defineProperties();
|
|
6586
6703
|
}
|
|
@@ -6688,9 +6805,10 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
6688
6805
|
// src/service/dto/method.dto.ts
|
|
6689
6806
|
import { ModelError as ModelError6 } from "@ibiz-template/core";
|
|
6690
6807
|
var MethodDto = class _MethodDto {
|
|
6691
|
-
constructor(entity,
|
|
6808
|
+
constructor(service, entity, isLocalMode, dto) {
|
|
6809
|
+
this.service = service;
|
|
6692
6810
|
this.entity = entity;
|
|
6693
|
-
this.isLocalMode =
|
|
6811
|
+
this.isLocalMode = isLocalMode;
|
|
6694
6812
|
this.dto = dto;
|
|
6695
6813
|
this.dtoMap = /* @__PURE__ */ new Map();
|
|
6696
6814
|
if (dto) {
|
|
@@ -6700,6 +6818,18 @@ var MethodDto = class _MethodDto {
|
|
|
6700
6818
|
this.fields = [];
|
|
6701
6819
|
}
|
|
6702
6820
|
}
|
|
6821
|
+
/**
|
|
6822
|
+
* 查找本地 DTO 存储数据
|
|
6823
|
+
*
|
|
6824
|
+
* @author chitanda
|
|
6825
|
+
* @date 2023-12-22 14:12:19
|
|
6826
|
+
* @param {IContext} context
|
|
6827
|
+
* @param {IParams} [params]
|
|
6828
|
+
* @return {*} {IDataEntity[]}
|
|
6829
|
+
*/
|
|
6830
|
+
select(context, params) {
|
|
6831
|
+
return this.service.local.select(context, params);
|
|
6832
|
+
}
|
|
6703
6833
|
/**
|
|
6704
6834
|
* 转换数组成ListMap
|
|
6705
6835
|
*
|
|
@@ -6732,7 +6862,7 @@ var MethodDto = class _MethodDto {
|
|
|
6732
6862
|
*
|
|
6733
6863
|
* @author chitanda
|
|
6734
6864
|
* @date 2022-10-10 23:10:33
|
|
6735
|
-
* @param {
|
|
6865
|
+
* @param {IContext} context
|
|
6736
6866
|
* @param {IData} data
|
|
6737
6867
|
* @return {*} {Promise<IData>}
|
|
6738
6868
|
*/
|
|
@@ -6759,13 +6889,12 @@ var MethodDto = class _MethodDto {
|
|
|
6759
6889
|
if (!field.refAppDataEntityId) {
|
|
6760
6890
|
break;
|
|
6761
6891
|
}
|
|
6762
|
-
const dto = await this.getFieldDto(field);
|
|
6763
|
-
const
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
});
|
|
6892
|
+
const dto = await this.getFieldDto(context, field);
|
|
6893
|
+
const filterParams = {};
|
|
6894
|
+
if (field.refPickupAppDEFieldId) {
|
|
6895
|
+
filterParams[field.refPickupAppDEFieldId] = data.srfkey;
|
|
6896
|
+
}
|
|
6897
|
+
const items = await dto.select(context, filterParams);
|
|
6769
6898
|
if (items) {
|
|
6770
6899
|
const arr = [];
|
|
6771
6900
|
for (let j = 0; j < items.length; j++) {
|
|
@@ -6790,14 +6919,13 @@ var MethodDto = class _MethodDto {
|
|
|
6790
6919
|
*
|
|
6791
6920
|
* @author chitanda
|
|
6792
6921
|
* @date 2022-10-10 23:10:50
|
|
6793
|
-
* @param {
|
|
6922
|
+
* @param {IContext} context
|
|
6794
6923
|
* @param {IData[]} data
|
|
6795
6924
|
* @return {*} {Promise<AppDataEntity[]>}
|
|
6796
6925
|
*/
|
|
6797
6926
|
async sets(context, data) {
|
|
6798
|
-
const service = await this.app.deService.getService(this.entity.id);
|
|
6799
6927
|
if (this.isLocalMode) {
|
|
6800
|
-
service.local.clear(
|
|
6928
|
+
this.service.local.clear();
|
|
6801
6929
|
}
|
|
6802
6930
|
return Promise.all(
|
|
6803
6931
|
data.map(async (datum) => {
|
|
@@ -6809,12 +6937,13 @@ var MethodDto = class _MethodDto {
|
|
|
6809
6937
|
if (!field.refAppDataEntityId) {
|
|
6810
6938
|
return;
|
|
6811
6939
|
}
|
|
6812
|
-
const dto = await this.getFieldDto(field);
|
|
6940
|
+
const dto = await this.getFieldDto(context, field);
|
|
6813
6941
|
const items = datum[key];
|
|
6814
6942
|
if (items) {
|
|
6815
6943
|
const pKey = datum[this.entity.keyAppDEFieldId];
|
|
6816
6944
|
items.forEach((item) => {
|
|
6817
6945
|
item.srfpkey = pKey;
|
|
6946
|
+
item[field.refPickupAppDEFieldId] = pKey;
|
|
6818
6947
|
});
|
|
6819
6948
|
await dto.sets(context, items);
|
|
6820
6949
|
} else {
|
|
@@ -6827,7 +6956,7 @@ var MethodDto = class _MethodDto {
|
|
|
6827
6956
|
}
|
|
6828
6957
|
const entityData = new AppDataEntity(this.entity, datum);
|
|
6829
6958
|
if (this.isLocalMode) {
|
|
6830
|
-
await service.local.add(context, entityData);
|
|
6959
|
+
await this.service.local.add(context, entityData);
|
|
6831
6960
|
}
|
|
6832
6961
|
return entityData;
|
|
6833
6962
|
})
|
|
@@ -6837,12 +6966,13 @@ var MethodDto = class _MethodDto {
|
|
|
6837
6966
|
* 获取子属性 DTO
|
|
6838
6967
|
*
|
|
6839
6968
|
* @author chitanda
|
|
6840
|
-
* @date
|
|
6969
|
+
* @date 2023-12-22 13:12:06
|
|
6841
6970
|
* @protected
|
|
6971
|
+
* @param {IContext} context
|
|
6842
6972
|
* @param {IAppDEMethodDTOField} field
|
|
6843
6973
|
* @return {*} {Promise<MethodDto>}
|
|
6844
6974
|
*/
|
|
6845
|
-
async getFieldDto(field) {
|
|
6975
|
+
async getFieldDto(context, field) {
|
|
6846
6976
|
if (this.dtoMap.has(field.codeName)) {
|
|
6847
6977
|
return this.dtoMap.get(field.codeName);
|
|
6848
6978
|
}
|
|
@@ -6854,29 +6984,31 @@ var MethodDto = class _MethodDto {
|
|
|
6854
6984
|
entity.appDEMethodDTOs || [],
|
|
6855
6985
|
field.refAppDEMethodDTOId
|
|
6856
6986
|
);
|
|
6857
|
-
const
|
|
6987
|
+
const service = await this.app.deService.getService(context, entity.id);
|
|
6988
|
+
service.isLocalMode = true;
|
|
6989
|
+
const dto = new _MethodDto(service, entity, true, methodDto);
|
|
6858
6990
|
this.dtoMap.set(field.codeName, dto);
|
|
6859
6991
|
return dto;
|
|
6860
6992
|
}
|
|
6861
6993
|
};
|
|
6862
6994
|
|
|
6863
|
-
// src/service/service/entity/util/util.ts
|
|
6864
|
-
function isLocalMode(method) {
|
|
6865
|
-
return method.actionType === "BUILTIN" || method.dataSetType === "DATAQUERY";
|
|
6866
|
-
}
|
|
6867
|
-
|
|
6868
6995
|
// src/service/service/entity/method/method-input.ts
|
|
6869
6996
|
var MethodInput = class {
|
|
6870
6997
|
/**
|
|
6871
6998
|
* Creates an instance of MethodInput.
|
|
6999
|
+
*
|
|
6872
7000
|
* @author chitanda
|
|
6873
|
-
* @date 2023-
|
|
7001
|
+
* @date 2023-12-22 13:12:57
|
|
7002
|
+
* @param {IAppDEService} service
|
|
6874
7003
|
* @param {IAppDataEntity} entity
|
|
6875
7004
|
* @param {IAppDEMethod} method
|
|
7005
|
+
* @param {boolean} [isLocalMode=false]
|
|
6876
7006
|
*/
|
|
6877
|
-
constructor(entity, method) {
|
|
7007
|
+
constructor(service, entity, method, isLocalMode = false) {
|
|
7008
|
+
this.service = service;
|
|
6878
7009
|
this.entity = entity;
|
|
6879
7010
|
this.method = method;
|
|
7011
|
+
this.isLocalMode = isLocalMode;
|
|
6880
7012
|
const input = method.appDEMethodInput;
|
|
6881
7013
|
if (input) {
|
|
6882
7014
|
const methodDto = findModelChild(
|
|
@@ -6884,19 +7016,16 @@ var MethodInput = class {
|
|
|
6884
7016
|
input.appDEMethodDTOId
|
|
6885
7017
|
);
|
|
6886
7018
|
if (methodDto) {
|
|
6887
|
-
this.dto = new MethodDto(entity, this.isLocalMode, methodDto);
|
|
7019
|
+
this.dto = new MethodDto(service, entity, this.isLocalMode, methodDto);
|
|
6888
7020
|
}
|
|
6889
7021
|
}
|
|
6890
7022
|
}
|
|
6891
|
-
get isLocalMode() {
|
|
6892
|
-
return isLocalMode(this.method);
|
|
6893
|
-
}
|
|
6894
7023
|
/**
|
|
6895
7024
|
* 处理请求发送参数
|
|
6896
7025
|
*
|
|
6897
7026
|
* @author chitanda
|
|
6898
7027
|
* @date 2022-10-11 14:10:22
|
|
6899
|
-
* @param {
|
|
7028
|
+
* @param {IContext} context
|
|
6900
7029
|
* @param {IData} data
|
|
6901
7030
|
* @return {*} {Promise<IData>}
|
|
6902
7031
|
*/
|
|
@@ -6913,15 +7042,19 @@ import { isNilOrEmpty as isNilOrEmpty5 } from "qx-util";
|
|
|
6913
7042
|
var MethodReturn = class {
|
|
6914
7043
|
/**
|
|
6915
7044
|
* Creates an instance of MethodReturn.
|
|
7045
|
+
*
|
|
6916
7046
|
* @author chitanda
|
|
6917
|
-
* @date 2023-
|
|
7047
|
+
* @date 2023-12-22 13:12:24
|
|
7048
|
+
* @param {IAppDEService} service
|
|
6918
7049
|
* @param {IAppDataEntity} entity
|
|
6919
7050
|
* @param {IAppDEMethod} method
|
|
6920
|
-
* @param {
|
|
7051
|
+
* @param {boolean} [isLocalMode=false]
|
|
6921
7052
|
*/
|
|
6922
|
-
constructor(entity, method) {
|
|
7053
|
+
constructor(service, entity, method, isLocalMode = false) {
|
|
7054
|
+
this.service = service;
|
|
6923
7055
|
this.entity = entity;
|
|
6924
7056
|
this.method = method;
|
|
7057
|
+
this.isLocalMode = isLocalMode;
|
|
6925
7058
|
const output = method.appDEMethodReturn;
|
|
6926
7059
|
if (output) {
|
|
6927
7060
|
const methodDto = findModelChild(
|
|
@@ -6929,19 +7062,16 @@ var MethodReturn = class {
|
|
|
6929
7062
|
output.appDEMethodDTOId
|
|
6930
7063
|
);
|
|
6931
7064
|
if (methodDto) {
|
|
6932
|
-
this.dto = new MethodDto(entity, this.isLocalMode, methodDto);
|
|
7065
|
+
this.dto = new MethodDto(service, entity, this.isLocalMode, methodDto);
|
|
6933
7066
|
}
|
|
6934
7067
|
}
|
|
6935
7068
|
}
|
|
6936
|
-
get isLocalMode() {
|
|
6937
|
-
return isLocalMode(this.method);
|
|
6938
|
-
}
|
|
6939
7069
|
/**
|
|
6940
7070
|
* 处理请求返回参数
|
|
6941
7071
|
*
|
|
6942
7072
|
* @author chitanda
|
|
6943
7073
|
* @date 2022-10-19 21:10:06
|
|
6944
|
-
* @param {
|
|
7074
|
+
* @param {IContext} context
|
|
6945
7075
|
* @param {IData} data
|
|
6946
7076
|
* @return {*} {Promise<IDataEntity>}
|
|
6947
7077
|
*/
|
|
@@ -6963,17 +7093,19 @@ var Method = class {
|
|
|
6963
7093
|
* Creates an instance of Method.
|
|
6964
7094
|
*
|
|
6965
7095
|
* @author chitanda
|
|
6966
|
-
* @date
|
|
7096
|
+
* @date 2023-12-22 12:12:06
|
|
7097
|
+
* @param {IAppDEService} service 当前服务实例
|
|
6967
7098
|
* @param {IAppDataEntity} entity
|
|
6968
7099
|
* @param {IAppDEMethod} method
|
|
6969
|
-
* @param {ServicePathItem[][]} paths
|
|
6970
7100
|
*/
|
|
6971
|
-
constructor(entity, method) {
|
|
7101
|
+
constructor(service, entity, method, isLocalMode = false) {
|
|
7102
|
+
this.service = service;
|
|
6972
7103
|
this.entity = entity;
|
|
6973
7104
|
this.method = method;
|
|
7105
|
+
this.isLocalMode = isLocalMode;
|
|
6974
7106
|
this.app = ibiz.hub.getApp(entity.appId);
|
|
6975
|
-
this.input = new MethodInput(entity, method);
|
|
6976
|
-
this.result = new MethodReturn(entity, method);
|
|
7107
|
+
this.input = new MethodInput(service, entity, method);
|
|
7108
|
+
this.result = new MethodReturn(service, entity, method);
|
|
6977
7109
|
}
|
|
6978
7110
|
/**
|
|
6979
7111
|
* 发送请求
|
|
@@ -6982,7 +7114,7 @@ var Method = class {
|
|
|
6982
7114
|
* @date 2022-10-10 17:10:44
|
|
6983
7115
|
* @protected
|
|
6984
7116
|
* @param {string} path
|
|
6985
|
-
* @param {
|
|
7117
|
+
* @param {IContext} context
|
|
6986
7118
|
* @param {IData} data
|
|
6987
7119
|
* @param {IParams} params
|
|
6988
7120
|
* @return {*} {Promise<HttpResponse<any>>}
|
|
@@ -7041,7 +7173,7 @@ var Method = class {
|
|
|
7041
7173
|
* @author chitanda
|
|
7042
7174
|
* @date 2022-08-24 18:08:46
|
|
7043
7175
|
* @protected
|
|
7044
|
-
* @param {
|
|
7176
|
+
* @param {IContext} context
|
|
7045
7177
|
* @return {*} {string} 拼接结果说明: /祖父实体/祖父实体主键/爷爷实体/爷爷实体主键/父实体/父实体主键/当前实体
|
|
7046
7178
|
*/
|
|
7047
7179
|
calcPath(context) {
|
|
@@ -7049,20 +7181,6 @@ var Method = class {
|
|
|
7049
7181
|
const resPath = calcResPath(context, this.entity);
|
|
7050
7182
|
return resPath + curPath;
|
|
7051
7183
|
}
|
|
7052
|
-
/**
|
|
7053
|
-
* 获取当前实体服务
|
|
7054
|
-
*
|
|
7055
|
-
* @author chitanda
|
|
7056
|
-
* @date 2022-10-11 21:10:12
|
|
7057
|
-
* @protected
|
|
7058
|
-
* @return {*} {Promise<IAppDEService>}
|
|
7059
|
-
*/
|
|
7060
|
-
async getService() {
|
|
7061
|
-
if (!this.service) {
|
|
7062
|
-
this.service = await this.app.deService.getService(this.entity.id);
|
|
7063
|
-
}
|
|
7064
|
-
return this.service;
|
|
7065
|
-
}
|
|
7066
7184
|
/**
|
|
7067
7185
|
* 创建实体
|
|
7068
7186
|
* @author lxm
|
|
@@ -7101,7 +7219,7 @@ var DELogicContext = class {
|
|
|
7101
7219
|
* @author lxm
|
|
7102
7220
|
* @date 2023-03-24 09:15:14
|
|
7103
7221
|
* @param {Map<string, DELogicParam>} deLogicParams 实体逻辑参数集合
|
|
7104
|
-
* @param {
|
|
7222
|
+
* @param {IContext} context 上下文
|
|
7105
7223
|
* @param {IData} data 数据对象
|
|
7106
7224
|
* @param {IParams} params 视图参数
|
|
7107
7225
|
*/
|
|
@@ -7271,7 +7389,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
|
|
|
7271
7389
|
* @author lxm
|
|
7272
7390
|
* @date 2023-02-15 18:02:05
|
|
7273
7391
|
* @param {DELogicContext} ctx
|
|
7274
|
-
* @param {
|
|
7392
|
+
* @param {IContext} context
|
|
7275
7393
|
* @param {IData} data
|
|
7276
7394
|
* @return {*} {boolean}
|
|
7277
7395
|
*/
|
|
@@ -7346,7 +7464,7 @@ var DELogicLinkGroupCond = class _DELogicLinkGroupCond extends DELogicLinkCond {
|
|
|
7346
7464
|
* @author lxm
|
|
7347
7465
|
* @date 2023-02-15 17:02:19
|
|
7348
7466
|
* @param {DELogicContext} ctx
|
|
7349
|
-
* @param {
|
|
7467
|
+
* @param {IContext} context
|
|
7350
7468
|
* @param {IData} data
|
|
7351
7469
|
* @return {*} {boolean}
|
|
7352
7470
|
*/
|
|
@@ -7417,7 +7535,7 @@ var DELogicLink = class {
|
|
|
7417
7535
|
* @author lxm
|
|
7418
7536
|
* @date 2023-02-08 22:02:18
|
|
7419
7537
|
* @param {DELogicContext} ctx
|
|
7420
|
-
* @param {
|
|
7538
|
+
* @param {IContext} context
|
|
7421
7539
|
* @param {IData} data
|
|
7422
7540
|
* @return {*} {Promise<boolean>} 是否连接成功
|
|
7423
7541
|
*/
|
|
@@ -7879,7 +7997,7 @@ var DELogicParam = class {
|
|
|
7879
7997
|
* @author lxm
|
|
7880
7998
|
* @date 2023-02-08 20:02:33
|
|
7881
7999
|
* @param {DELogicContext} ctx
|
|
7882
|
-
* @param {
|
|
8000
|
+
* @param {IContext} context
|
|
7883
8001
|
* @param {IData} data
|
|
7884
8002
|
* @param {IParams} [opt]
|
|
7885
8003
|
*/
|
|
@@ -8050,7 +8168,7 @@ var DELogic = class {
|
|
|
8050
8168
|
* @date 2023-02-08 21:02:58
|
|
8051
8169
|
* @protected
|
|
8052
8170
|
* @param {DELogicContext} ctx
|
|
8053
|
-
* @param {
|
|
8171
|
+
* @param {IContext} context
|
|
8054
8172
|
* @param {IData} data
|
|
8055
8173
|
* @param {IParams} [opt]
|
|
8056
8174
|
*/
|
|
@@ -8067,7 +8185,7 @@ var DELogic = class {
|
|
|
8067
8185
|
*
|
|
8068
8186
|
* @author lxm
|
|
8069
8187
|
* @date 2023-02-08 21:02:09
|
|
8070
|
-
* @param {
|
|
8188
|
+
* @param {IContext} context
|
|
8071
8189
|
* @param {IData} data
|
|
8072
8190
|
* @param {IParams} [opt]
|
|
8073
8191
|
* @return {*} {Promise<IData>}
|
|
@@ -8187,23 +8305,11 @@ async function execFieldLogics(entity, type, context, data, params = {}) {
|
|
|
8187
8305
|
|
|
8188
8306
|
// src/service/service/entity/method/de-action.ts
|
|
8189
8307
|
var DEActionMethod = class extends Method {
|
|
8190
|
-
/**
|
|
8191
|
-
* 是否为本地模式
|
|
8192
|
-
*
|
|
8193
|
-
* @author chitanda
|
|
8194
|
-
* @date 2023-04-19 16:04:46
|
|
8195
|
-
* @readonly
|
|
8196
|
-
* @protected
|
|
8197
|
-
* @type {boolean}
|
|
8198
|
-
*/
|
|
8199
|
-
get isLocalMode() {
|
|
8200
|
-
return isLocalMode(this.method);
|
|
8201
|
-
}
|
|
8202
8308
|
/**
|
|
8203
8309
|
* 处理请求发送参数
|
|
8204
8310
|
* @author lxm
|
|
8205
8311
|
* @date 2023-10-19 02:50:36
|
|
8206
|
-
* @param {
|
|
8312
|
+
* @param {IContext} context 上下文
|
|
8207
8313
|
* @param {(IData | IData[])} data 数据对象
|
|
8208
8314
|
* @return {*} {(Promise<IData | IData[]>)}
|
|
8209
8315
|
*/
|
|
@@ -8292,7 +8398,7 @@ var DEActionMethod = class extends Method {
|
|
|
8292
8398
|
*
|
|
8293
8399
|
* @author chitanda
|
|
8294
8400
|
* @date 2022-08-24 20:08:01
|
|
8295
|
-
* @param {
|
|
8401
|
+
* @param {IContext} context
|
|
8296
8402
|
* @param {IData} data
|
|
8297
8403
|
* @return {*} {Promise<IHttpResponse<IData>>}
|
|
8298
8404
|
*/
|
|
@@ -8313,7 +8419,7 @@ var DEActionMethod = class extends Method {
|
|
|
8313
8419
|
*
|
|
8314
8420
|
* @author chitanda
|
|
8315
8421
|
* @date 2022-08-24 20:08:56
|
|
8316
|
-
* @param {
|
|
8422
|
+
* @param {IContext} context
|
|
8317
8423
|
* @param {IParams} [params]
|
|
8318
8424
|
* @return {*} {Promise<IHttpResponse<IDataEntity>>}
|
|
8319
8425
|
*/
|
|
@@ -8333,7 +8439,7 @@ var DEActionMethod = class extends Method {
|
|
|
8333
8439
|
*
|
|
8334
8440
|
* @author chitanda
|
|
8335
8441
|
* @date 2022-09-13 19:09:39
|
|
8336
|
-
* @param {
|
|
8442
|
+
* @param {IContext} context
|
|
8337
8443
|
* @param {(IData | IDataEntity)} data
|
|
8338
8444
|
* @param {IParams} [params={}]
|
|
8339
8445
|
* @return {*} {Promise<IHttpResponse<IDataEntity>>}
|
|
@@ -8359,7 +8465,7 @@ var DEActionMethod = class extends Method {
|
|
|
8359
8465
|
*
|
|
8360
8466
|
* @author chitanda
|
|
8361
8467
|
* @date 2022-08-24 20:08:07
|
|
8362
|
-
* @param {
|
|
8468
|
+
* @param {IContext} context
|
|
8363
8469
|
* @param {IParams} [params]
|
|
8364
8470
|
* @return {*} {Promise<IHttpResponse<IDataEntity>>}
|
|
8365
8471
|
*/
|
|
@@ -8380,7 +8486,7 @@ var DEActionMethod = class extends Method {
|
|
|
8380
8486
|
*
|
|
8381
8487
|
* @author chitanda
|
|
8382
8488
|
* @date 2022-08-24 20:08:26
|
|
8383
|
-
* @param {
|
|
8489
|
+
* @param {IContext} context
|
|
8384
8490
|
* @param {IParams} [params]
|
|
8385
8491
|
* @return {*} {Promise<IHttpResponse<IData>>}
|
|
8386
8492
|
*/
|
|
@@ -8398,21 +8504,20 @@ var DEActionMethod = class extends Method {
|
|
|
8398
8504
|
*
|
|
8399
8505
|
* @author chitanda
|
|
8400
8506
|
* @date 2022-08-21 17:08:45
|
|
8401
|
-
* @param {
|
|
8507
|
+
* @param {IContext} context
|
|
8402
8508
|
* @param {IData} entity
|
|
8403
8509
|
* @return {*} {Promise<IHttpResponse<IDataEntity>>}
|
|
8404
8510
|
*/
|
|
8405
8511
|
async createTemp(context, entity) {
|
|
8406
8512
|
try {
|
|
8407
|
-
const s = await this.getService();
|
|
8408
8513
|
const addData = this.createEntity(entity);
|
|
8409
8514
|
let resultData;
|
|
8410
8515
|
if (isArray7(addData)) {
|
|
8411
8516
|
resultData = await Promise.all(
|
|
8412
|
-
addData.map((item) =>
|
|
8517
|
+
addData.map((item) => this.service.local.add(context, item))
|
|
8413
8518
|
);
|
|
8414
8519
|
} else {
|
|
8415
|
-
resultData = await
|
|
8520
|
+
resultData = await this.service.local.add(context, addData);
|
|
8416
8521
|
}
|
|
8417
8522
|
return new HttpResponse3(resultData);
|
|
8418
8523
|
} catch (err) {
|
|
@@ -8424,7 +8529,7 @@ var DEActionMethod = class extends Method {
|
|
|
8424
8529
|
*
|
|
8425
8530
|
* @author chitanda
|
|
8426
8531
|
* @date 2022-08-21 17:08:56
|
|
8427
|
-
* @param {
|
|
8532
|
+
* @param {IContext} context
|
|
8428
8533
|
* @param {IParams} [params]
|
|
8429
8534
|
* @return {*} {Promise<IHttpResponse<IDataEntity>>}
|
|
8430
8535
|
*/
|
|
@@ -8444,7 +8549,7 @@ var DEActionMethod = class extends Method {
|
|
|
8444
8549
|
*
|
|
8445
8550
|
* @author chitanda
|
|
8446
8551
|
* @date 2022-08-21 17:08:11
|
|
8447
|
-
* @param {
|
|
8552
|
+
* @param {IContext} context
|
|
8448
8553
|
* @param {IParams} [params]
|
|
8449
8554
|
* @return {*} {Promise<IHttpResponse<IDataEntity>>}
|
|
8450
8555
|
*/
|
|
@@ -8456,8 +8561,7 @@ var DEActionMethod = class extends Method {
|
|
|
8456
8561
|
if (!key && context) {
|
|
8457
8562
|
key = context[this.entity.codeName.toLowerCase()];
|
|
8458
8563
|
}
|
|
8459
|
-
const
|
|
8460
|
-
const data = s.local.delete(context, key);
|
|
8564
|
+
const data = this.service.local.delete(context, key);
|
|
8461
8565
|
if (data) {
|
|
8462
8566
|
return new HttpResponse3(data);
|
|
8463
8567
|
}
|
|
@@ -8471,21 +8575,20 @@ var DEActionMethod = class extends Method {
|
|
|
8471
8575
|
*
|
|
8472
8576
|
* @author chitanda
|
|
8473
8577
|
* @date 2022-08-21 17:08:17
|
|
8474
|
-
* @param {
|
|
8578
|
+
* @param {IContext} context
|
|
8475
8579
|
* @param {IData} entity
|
|
8476
8580
|
* @return {*} {Promise<IHttpResponse<IDataEntity>>}
|
|
8477
8581
|
*/
|
|
8478
8582
|
async updateTemp(context, entity) {
|
|
8479
8583
|
try {
|
|
8480
|
-
const s = await this.getService();
|
|
8481
8584
|
const updateData = this.createEntity(entity);
|
|
8482
8585
|
let resultData;
|
|
8483
8586
|
if (isArray7(updateData)) {
|
|
8484
8587
|
resultData = await Promise.all(
|
|
8485
|
-
updateData.map((item) =>
|
|
8588
|
+
updateData.map((item) => this.service.local.update(context, item))
|
|
8486
8589
|
);
|
|
8487
8590
|
} else {
|
|
8488
|
-
resultData = await
|
|
8591
|
+
resultData = await this.service.local.update(context, updateData);
|
|
8489
8592
|
}
|
|
8490
8593
|
if (resultData) {
|
|
8491
8594
|
return new HttpResponse3(resultData);
|
|
@@ -8500,7 +8603,7 @@ var DEActionMethod = class extends Method {
|
|
|
8500
8603
|
*
|
|
8501
8604
|
* @author chitanda
|
|
8502
8605
|
* @date 2022-08-21 17:08:23
|
|
8503
|
-
* @param {
|
|
8606
|
+
* @param {IContext} context
|
|
8504
8607
|
* @param {IParams} [params]
|
|
8505
8608
|
* @return {*} {Promise<IHttpResponse<IDataEntity>>}
|
|
8506
8609
|
*/
|
|
@@ -8512,8 +8615,7 @@ var DEActionMethod = class extends Method {
|
|
|
8512
8615
|
if (!key && context) {
|
|
8513
8616
|
key = context[this.entity.codeName.toLowerCase()];
|
|
8514
8617
|
}
|
|
8515
|
-
const
|
|
8516
|
-
const data = s.local.get(context, key);
|
|
8618
|
+
const data = this.service.local.get(context, key);
|
|
8517
8619
|
if (data) {
|
|
8518
8620
|
return new HttpResponse3(data);
|
|
8519
8621
|
}
|
|
@@ -8525,7 +8627,7 @@ var DEActionMethod = class extends Method {
|
|
|
8525
8627
|
/**
|
|
8526
8628
|
* 批量删除本地数据
|
|
8527
8629
|
*
|
|
8528
|
-
* @param {
|
|
8630
|
+
* @param {IContext} context
|
|
8529
8631
|
* @param {IParams} [params]
|
|
8530
8632
|
* @return {*} {Promise<IHttpResponse>}
|
|
8531
8633
|
*/
|
|
@@ -8536,8 +8638,8 @@ var DEActionMethod = class extends Method {
|
|
|
8536
8638
|
|
|
8537
8639
|
// src/service/service/entity/method/provider/de-action-de-method.provider.ts
|
|
8538
8640
|
var DeActionDeMethodProvider = class {
|
|
8539
|
-
create(entity, method,
|
|
8540
|
-
return new DEActionMethod(entity, method);
|
|
8641
|
+
create(service, entity, method, opts) {
|
|
8642
|
+
return new DEActionMethod(service, entity, method, opts.localMode);
|
|
8541
8643
|
}
|
|
8542
8644
|
};
|
|
8543
8645
|
|
|
@@ -8548,12 +8650,9 @@ import {
|
|
|
8548
8650
|
RuntimeModelError as RuntimeModelError20
|
|
8549
8651
|
} from "@ibiz-template/core";
|
|
8550
8652
|
import { isArray as isArray8 } from "lodash-es";
|
|
8551
|
-
import { clone as clone13, isEmpty as
|
|
8653
|
+
import { clone as clone13, isEmpty as isEmpty7, isNil as isNil11 } from "ramda";
|
|
8552
8654
|
import { ascSort as ascSort2, descSort } from "qx-util";
|
|
8553
8655
|
var FetchMethod = class extends Method {
|
|
8554
|
-
get isLocalMode() {
|
|
8555
|
-
return isLocalMode(this.method);
|
|
8556
|
-
}
|
|
8557
8656
|
async exec(context, params, params2) {
|
|
8558
8657
|
const searchParams = params && !isArray8(params) ? params : params2 || {};
|
|
8559
8658
|
if (this.isLocalMode) {
|
|
@@ -8606,15 +8705,14 @@ var FetchMethod = class extends Method {
|
|
|
8606
8705
|
* @return {*} {Promise<IDataEntity[]>}
|
|
8607
8706
|
*/
|
|
8608
8707
|
async searchLocal(cond, filter, queryParamKeys = this.entity.quickSearchAppDEFieldIds) {
|
|
8609
|
-
const service = await this.getService();
|
|
8610
8708
|
let list = [];
|
|
8611
8709
|
if (cond) {
|
|
8612
|
-
list = service.local.getList(
|
|
8710
|
+
list = this.service.local.getList();
|
|
8613
8711
|
if (list.length > 0) {
|
|
8614
8712
|
list = list.filter((obj) => cond.test(obj, filter));
|
|
8615
8713
|
}
|
|
8616
8714
|
} else {
|
|
8617
|
-
list = await service.
|
|
8715
|
+
list = await this.service.local.select(filter.context, filter.data);
|
|
8618
8716
|
if (list.length > 0) {
|
|
8619
8717
|
if (filter.query && filter.query !== "") {
|
|
8620
8718
|
if (queryParamKeys) {
|
|
@@ -8633,7 +8731,7 @@ var FetchMethod = class extends Method {
|
|
|
8633
8731
|
}
|
|
8634
8732
|
}
|
|
8635
8733
|
}
|
|
8636
|
-
if (!isNil11(filter.sortField) && !
|
|
8734
|
+
if (!isNil11(filter.sortField) && !isEmpty7(filter.sortField)) {
|
|
8637
8735
|
if (filter.sortMode === "DESC") {
|
|
8638
8736
|
list = descSort(list, filter.sortField);
|
|
8639
8737
|
} else {
|
|
@@ -8650,7 +8748,7 @@ var FetchMethod = class extends Method {
|
|
|
8650
8748
|
* 获取代码表数据来源的集合
|
|
8651
8749
|
* @author lxm
|
|
8652
8750
|
* @date 2023-08-03 02:55:00
|
|
8653
|
-
* @param {
|
|
8751
|
+
* @param {IContext} context
|
|
8654
8752
|
* @param {IParams} params
|
|
8655
8753
|
* @return {*} {Promise<HttpResponse<IData[]>>}
|
|
8656
8754
|
*/
|
|
@@ -8682,11 +8780,11 @@ var AcFetchMethod = class extends FetchMethod {
|
|
|
8682
8780
|
|
|
8683
8781
|
// src/service/service/entity/method/provider/fetch-de-method.provider.ts
|
|
8684
8782
|
var FetchDeMethodProvider = class {
|
|
8685
|
-
create(entity, method, opts) {
|
|
8783
|
+
create(service, entity, method, opts) {
|
|
8686
8784
|
if (opts.acMode) {
|
|
8687
|
-
return new AcFetchMethod(entity, method);
|
|
8785
|
+
return new AcFetchMethod(service, entity, method, opts.localMode);
|
|
8688
8786
|
}
|
|
8689
|
-
return new FetchMethod(entity, method);
|
|
8787
|
+
return new FetchMethod(service, entity, method, opts.localMode);
|
|
8690
8788
|
}
|
|
8691
8789
|
};
|
|
8692
8790
|
|
|
@@ -8700,13 +8798,14 @@ function presetDEMethodProvider() {
|
|
|
8700
8798
|
}
|
|
8701
8799
|
|
|
8702
8800
|
// src/service/vo/tree-node-data/tree-node-data.ts
|
|
8703
|
-
import { createUUID as
|
|
8801
|
+
import { createUUID as createUUID5 } from "qx-util";
|
|
8704
8802
|
var TreeNodeData = class {
|
|
8705
8803
|
constructor(model, parentNodeData, opts) {
|
|
8706
|
-
this._uuid =
|
|
8804
|
+
this._uuid = createUUID5();
|
|
8707
8805
|
this.leaf = false;
|
|
8708
8806
|
this.leaf = opts.leaf === true;
|
|
8709
8807
|
this.parent = parentNodeData;
|
|
8808
|
+
this._nodeType = model.treeNodeType;
|
|
8710
8809
|
if (this.parent) {
|
|
8711
8810
|
this.context = { ...this.parent.context };
|
|
8712
8811
|
}
|
|
@@ -8769,8 +8868,10 @@ var TreeCodeListNodeData = class extends TreeNodeData {
|
|
|
8769
8868
|
};
|
|
8770
8869
|
|
|
8771
8870
|
// src/service/vo/tree-node-data/tree-data-set-node-data.ts
|
|
8871
|
+
import { updateKeyDefine } from "@ibiz-template/core";
|
|
8772
8872
|
var TreeDataSetNodeData = class extends TreeNodeData {
|
|
8773
8873
|
constructor(model, parentNodeData, opts) {
|
|
8874
|
+
var _a;
|
|
8774
8875
|
super(model, parentNodeData, opts);
|
|
8775
8876
|
const { data } = opts;
|
|
8776
8877
|
this.deData = data;
|
|
@@ -8797,15 +8898,59 @@ var TreeDataSetNodeData = class extends TreeNodeData {
|
|
|
8797
8898
|
if (model.leafFlagAppDEFieldId) {
|
|
8798
8899
|
this.leaf = fieldValueToBoolean(data[model.leafFlagAppDEFieldId]);
|
|
8799
8900
|
}
|
|
8800
|
-
|
|
8801
|
-
|
|
8802
|
-
|
|
8803
|
-
|
|
8804
|
-
|
|
8805
|
-
|
|
8806
|
-
|
|
8807
|
-
|
|
8808
|
-
|
|
8901
|
+
const dataItemkeyMap = /* @__PURE__ */ new Map();
|
|
8902
|
+
const dataItemDefaults = {};
|
|
8903
|
+
(_a = model.detreeNodeDataItems) == null ? void 0 : _a.forEach((dataItem) => {
|
|
8904
|
+
const uiKey = dataItem.id.toLowerCase();
|
|
8905
|
+
const deFieldKey = dataItem.appDEFieldId.toLowerCase();
|
|
8906
|
+
dataItemkeyMap.set(uiKey, deFieldKey);
|
|
8907
|
+
if (dataItem.defaultValue) {
|
|
8908
|
+
dataItemDefaults[uiKey] = dataItem.defaultValue;
|
|
8909
|
+
}
|
|
8910
|
+
});
|
|
8911
|
+
return new Proxy(this, {
|
|
8912
|
+
set(target, p, value) {
|
|
8913
|
+
if (Object.prototype.hasOwnProperty.call(target.deData, p)) {
|
|
8914
|
+
target.deData[p] = value;
|
|
8915
|
+
} else if (dataItemkeyMap.has(p)) {
|
|
8916
|
+
target.deData[dataItemkeyMap.get(p)] = value;
|
|
8917
|
+
} else {
|
|
8918
|
+
target[p] = value;
|
|
8919
|
+
}
|
|
8920
|
+
return true;
|
|
8921
|
+
},
|
|
8922
|
+
get(target, p, _receiver) {
|
|
8923
|
+
if (target[p] !== void 0) {
|
|
8924
|
+
return target[p];
|
|
8925
|
+
}
|
|
8926
|
+
if (dataItemkeyMap.has(p)) {
|
|
8927
|
+
return target.deData[dataItemkeyMap.get(p)] || dataItemDefaults[p];
|
|
8928
|
+
}
|
|
8929
|
+
if (target.deData[p] !== void 0) {
|
|
8930
|
+
return target.deData[p];
|
|
8931
|
+
}
|
|
8932
|
+
},
|
|
8933
|
+
ownKeys(target) {
|
|
8934
|
+
const allKeys = [
|
|
8935
|
+
.../* @__PURE__ */ new Set([
|
|
8936
|
+
...Object.keys(target),
|
|
8937
|
+
...dataItemkeyMap.keys(),
|
|
8938
|
+
...Object.keys(target.deData)
|
|
8939
|
+
])
|
|
8940
|
+
];
|
|
8941
|
+
updateKeyDefine(target, allKeys);
|
|
8942
|
+
return allKeys;
|
|
8943
|
+
}
|
|
8944
|
+
});
|
|
8945
|
+
}
|
|
8946
|
+
calcIcon(model) {
|
|
8947
|
+
const icon = super.calcIcon(model) || {};
|
|
8948
|
+
const { iconAppDEFieldId, detreeNodeDataItems } = model;
|
|
8949
|
+
if (iconAppDEFieldId && this.deData[iconAppDEFieldId]) {
|
|
8950
|
+
icon.imagePath = this.deData[iconAppDEFieldId];
|
|
8951
|
+
}
|
|
8952
|
+
if (icon) {
|
|
8953
|
+
this.icon = icon;
|
|
8809
8954
|
}
|
|
8810
8955
|
const iconDataItem = detreeNodeDataItems == null ? void 0 : detreeNodeDataItems.find((item) => item.id === "icon");
|
|
8811
8956
|
if (iconDataItem) {
|
|
@@ -9001,7 +9146,7 @@ var CalendarItemData = class {
|
|
|
9001
9146
|
};
|
|
9002
9147
|
|
|
9003
9148
|
// src/service/vo/map-data/map-data.ts
|
|
9004
|
-
function
|
|
9149
|
+
function updateKeyDefine2(target, keys) {
|
|
9005
9150
|
keys.forEach((key) => {
|
|
9006
9151
|
if (!Object.prototype.hasOwnProperty.call(target, key)) {
|
|
9007
9152
|
Object.defineProperty(target, key, {
|
|
@@ -9087,7 +9232,7 @@ var MapData = class {
|
|
|
9087
9232
|
const allKeys = [
|
|
9088
9233
|
.../* @__PURE__ */ new Set([...Object.keys(target), ...Object.keys(deData)])
|
|
9089
9234
|
];
|
|
9090
|
-
|
|
9235
|
+
updateKeyDefine2(target, allKeys);
|
|
9091
9236
|
return allKeys;
|
|
9092
9237
|
}
|
|
9093
9238
|
});
|
|
@@ -9096,7 +9241,7 @@ var MapData = class {
|
|
|
9096
9241
|
|
|
9097
9242
|
// src/service/vo/panel-data/panel-data.ts
|
|
9098
9243
|
import { QXEvent as QXEvent2 } from "qx-util";
|
|
9099
|
-
function
|
|
9244
|
+
function updateKeyDefine3(target, keys) {
|
|
9100
9245
|
keys.forEach((key) => {
|
|
9101
9246
|
if (!Object.prototype.hasOwnProperty.call(target, key)) {
|
|
9102
9247
|
Object.defineProperty(target, key, {
|
|
@@ -9154,7 +9299,7 @@ var PanelData = class {
|
|
|
9154
9299
|
},
|
|
9155
9300
|
ownKeys(target) {
|
|
9156
9301
|
const allKeys = Object.keys(origin);
|
|
9157
|
-
|
|
9302
|
+
updateKeyDefine3(target, allKeys);
|
|
9158
9303
|
return allKeys;
|
|
9159
9304
|
}
|
|
9160
9305
|
});
|
|
@@ -9165,8 +9310,8 @@ var PanelData = class {
|
|
|
9165
9310
|
};
|
|
9166
9311
|
|
|
9167
9312
|
// src/service/vo/chart-data/chart-data.ts
|
|
9168
|
-
import { createUUID as
|
|
9169
|
-
function
|
|
9313
|
+
import { createUUID as createUUID6 } from "qx-util";
|
|
9314
|
+
function updateKeyDefine4(target, keys) {
|
|
9170
9315
|
keys.forEach((key) => {
|
|
9171
9316
|
if (!Object.prototype.hasOwnProperty.call(target, key)) {
|
|
9172
9317
|
Object.defineProperty(target, key, {
|
|
@@ -9183,7 +9328,7 @@ var ChartData = class {
|
|
|
9183
9328
|
this._seriesModelId = seriesModel == null ? void 0 : seriesModel.id;
|
|
9184
9329
|
this._catalog = catalog;
|
|
9185
9330
|
this._groupName = groupName;
|
|
9186
|
-
this._uuid =
|
|
9331
|
+
this._uuid = createUUID6();
|
|
9187
9332
|
return new Proxy(this, {
|
|
9188
9333
|
set(target, p, value) {
|
|
9189
9334
|
if (Object.prototype.hasOwnProperty.call(deData, p)) {
|
|
@@ -9205,7 +9350,7 @@ var ChartData = class {
|
|
|
9205
9350
|
const allKeys = [
|
|
9206
9351
|
.../* @__PURE__ */ new Set([...Object.keys(target), ...Object.keys(deData)])
|
|
9207
9352
|
];
|
|
9208
|
-
|
|
9353
|
+
updateKeyDefine4(target, allKeys);
|
|
9209
9354
|
return allKeys;
|
|
9210
9355
|
}
|
|
9211
9356
|
});
|
|
@@ -9342,7 +9487,7 @@ var GanttCodeListNodeData = class extends TreeCodeListNodeData {
|
|
|
9342
9487
|
};
|
|
9343
9488
|
|
|
9344
9489
|
// src/service/mqtt/mqtt.service.ts
|
|
9345
|
-
import { QXEvent as QXEvent3, createUUID as
|
|
9490
|
+
import { QXEvent as QXEvent3, createUUID as createUUID7, isNilOrEmpty as isNilOrEmpty6 } from "qx-util";
|
|
9346
9491
|
var MqttService = class {
|
|
9347
9492
|
/**
|
|
9348
9493
|
* Creates an instance of MqttService.
|
|
@@ -9376,7 +9521,7 @@ var MqttService = class {
|
|
|
9376
9521
|
// 超时时间
|
|
9377
9522
|
connectTimeout: 6e3,
|
|
9378
9523
|
// 认证信息
|
|
9379
|
-
clientId:
|
|
9524
|
+
clientId: createUUID7(),
|
|
9380
9525
|
username: "",
|
|
9381
9526
|
password: "",
|
|
9382
9527
|
// 心跳时间
|
|
@@ -9452,7 +9597,7 @@ var DEServiceUtil = class {
|
|
|
9452
9597
|
* @author chitanda
|
|
9453
9598
|
* @date 2022-08-17 23:08:36
|
|
9454
9599
|
* @protected
|
|
9455
|
-
* @type {Map<string, IAppDEService
|
|
9600
|
+
* @type {Map<string, Map<string, IAppDEService>>} Map<域标识, Map<实体标识, 实体服务>>
|
|
9456
9601
|
*/
|
|
9457
9602
|
this.cache = /* @__PURE__ */ new Map();
|
|
9458
9603
|
/**
|
|
@@ -9468,8 +9613,8 @@ var DEServiceUtil = class {
|
|
|
9468
9613
|
*
|
|
9469
9614
|
* @author chitanda
|
|
9470
9615
|
* @date 2023-06-14 10:06:31
|
|
9471
|
-
* @param {string} id
|
|
9472
|
-
* @param {
|
|
9616
|
+
* @param {string} id 实体标识
|
|
9617
|
+
* @param {DEServiceConstructor} constructor
|
|
9473
9618
|
*/
|
|
9474
9619
|
register(id, constructor) {
|
|
9475
9620
|
this.constructorCache.set(id, constructor);
|
|
@@ -9478,13 +9623,18 @@ var DEServiceUtil = class {
|
|
|
9478
9623
|
* 根据实体标识获取实体服务
|
|
9479
9624
|
*
|
|
9480
9625
|
* @author chitanda
|
|
9481
|
-
* @date
|
|
9626
|
+
* @date 2023-12-22 10:12:47
|
|
9627
|
+
* @param {IContext} context 上下文,用于计算模型所属沙箱环境
|
|
9482
9628
|
* @param {string} id 实体标识
|
|
9483
|
-
* @param {IParams} [context] 上下文,用于计算模型所属沙箱环境
|
|
9484
9629
|
* @return {*} {Promise<IAppDEService>}
|
|
9485
9630
|
*/
|
|
9486
|
-
async getService(id) {
|
|
9487
|
-
|
|
9631
|
+
async getService(context, id) {
|
|
9632
|
+
const sandboxId = context.srfsessionid;
|
|
9633
|
+
if (!this.cache.has(sandboxId)) {
|
|
9634
|
+
this.cache.set(sandboxId, /* @__PURE__ */ new Map());
|
|
9635
|
+
}
|
|
9636
|
+
const map = this.cache.get(sandboxId);
|
|
9637
|
+
if (!map.has(id)) {
|
|
9488
9638
|
const entityModel = await ibiz.hub.getAppDataEntity(
|
|
9489
9639
|
id,
|
|
9490
9640
|
this.appModel.appId
|
|
@@ -9495,13 +9645,32 @@ var DEServiceUtil = class {
|
|
|
9495
9645
|
const constructor = this.constructorCache.get(id);
|
|
9496
9646
|
let service;
|
|
9497
9647
|
if (constructor) {
|
|
9498
|
-
service = await constructor(entityModel);
|
|
9648
|
+
service = await constructor(sandboxId, entityModel);
|
|
9499
9649
|
} else {
|
|
9500
|
-
service = new DEService(entityModel);
|
|
9650
|
+
service = new DEService(sandboxId, entityModel);
|
|
9501
9651
|
}
|
|
9502
|
-
|
|
9652
|
+
map.set(id, service);
|
|
9503
9653
|
}
|
|
9504
|
-
return
|
|
9654
|
+
return map.get(id);
|
|
9655
|
+
}
|
|
9656
|
+
/**
|
|
9657
|
+
* 重置服务, 删除指定域下的所有服务缓存
|
|
9658
|
+
*
|
|
9659
|
+
* @author chitanda
|
|
9660
|
+
* @date 2023-12-22 13:12:47
|
|
9661
|
+
* @param {IContext} context
|
|
9662
|
+
* @return {*} {void}
|
|
9663
|
+
*/
|
|
9664
|
+
reset(context) {
|
|
9665
|
+
const sandboxId = context.srfsessionid;
|
|
9666
|
+
if (!this.cache.has(sandboxId)) {
|
|
9667
|
+
return;
|
|
9668
|
+
}
|
|
9669
|
+
const map = this.cache.get(sandboxId);
|
|
9670
|
+
map.forEach((service) => {
|
|
9671
|
+
service.destroy();
|
|
9672
|
+
});
|
|
9673
|
+
this.cache.delete(sandboxId);
|
|
9505
9674
|
}
|
|
9506
9675
|
/**
|
|
9507
9676
|
* 清理所有服务, 当前临时域下的所有临时数据缓存
|
|
@@ -9509,11 +9678,16 @@ var DEServiceUtil = class {
|
|
|
9509
9678
|
* @description 根据 srfsessionid 作为临时数据域
|
|
9510
9679
|
* @author chitanda
|
|
9511
9680
|
* @date 2022-08-18 14:08:48
|
|
9512
|
-
* @param {
|
|
9681
|
+
* @param {IContext} context
|
|
9513
9682
|
*/
|
|
9514
9683
|
clearTempCache(context) {
|
|
9515
|
-
|
|
9516
|
-
|
|
9684
|
+
const sandboxId = context.srfsessionid;
|
|
9685
|
+
if (!this.cache.has(sandboxId)) {
|
|
9686
|
+
return;
|
|
9687
|
+
}
|
|
9688
|
+
const map = this.cache.get(sandboxId);
|
|
9689
|
+
map.forEach((service) => {
|
|
9690
|
+
service.local.clear();
|
|
9517
9691
|
});
|
|
9518
9692
|
}
|
|
9519
9693
|
/**
|
|
@@ -9522,13 +9696,13 @@ var DEServiceUtil = class {
|
|
|
9522
9696
|
* @date 2023-04-26 02:02:43
|
|
9523
9697
|
* @param {string} appDataEntityId 实体名称
|
|
9524
9698
|
* @param {string} methodName 方法名
|
|
9525
|
-
* @param {
|
|
9699
|
+
* @param {IContext} context 上下文
|
|
9526
9700
|
* @param {(IData | undefined)} [params] 数据
|
|
9527
9701
|
* @param {(IParams | undefined)} [params2] 视图参数
|
|
9528
9702
|
* @return {*} {Promise<IHttpResponse<IData>>}
|
|
9529
9703
|
*/
|
|
9530
9704
|
async exec(appDataEntityId, methodName, context, params, params2) {
|
|
9531
|
-
const service = await this.getService(appDataEntityId);
|
|
9705
|
+
const service = await this.getService(context, appDataEntityId);
|
|
9532
9706
|
return service.exec(methodName, context, params, params2);
|
|
9533
9707
|
}
|
|
9534
9708
|
};
|
|
@@ -10105,9 +10279,9 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
10105
10279
|
})(PanelNotifyState || {});
|
|
10106
10280
|
|
|
10107
10281
|
// src/controller/common/view/view.controller.ts
|
|
10108
|
-
import {
|
|
10282
|
+
import { notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
10109
10283
|
import { IBizContext as IBizContext2, RuntimeError as RuntimeError31 } from "@ibiz-template/core";
|
|
10110
|
-
import { isEmpty as
|
|
10284
|
+
import { isEmpty as isEmpty8, isNil as isNil18, isNotNil as isNotNil2 } from "ramda";
|
|
10111
10285
|
|
|
10112
10286
|
// src/controller/utils/loading/loading.state.ts
|
|
10113
10287
|
import { NOOP } from "@ibiz-template/core";
|
|
@@ -10382,6 +10556,9 @@ var CTX = class {
|
|
|
10382
10556
|
}
|
|
10383
10557
|
};
|
|
10384
10558
|
|
|
10559
|
+
// src/controller/common/base.controller.ts
|
|
10560
|
+
import { createUUID as createUUID9 } from "qx-util";
|
|
10561
|
+
|
|
10385
10562
|
// src/controller/utils/counter/mounted-counter.ts
|
|
10386
10563
|
var ActivityCounter = class extends Counter {
|
|
10387
10564
|
constructor() {
|
|
@@ -10922,7 +11099,7 @@ var ValueExUtil = class {
|
|
|
10922
11099
|
// src/controller/utils/value-default/value-default.ts
|
|
10923
11100
|
import { RuntimeError as RuntimeError28, ModelError as ModelError16 } from "@ibiz-template/core";
|
|
10924
11101
|
import dayjs from "dayjs";
|
|
10925
|
-
import { createUUID as
|
|
11102
|
+
import { createUUID as createUUID8 } from "qx-util";
|
|
10926
11103
|
import { isNil as isNil16, isNotNil } from "ramda";
|
|
10927
11104
|
function getDefaultValue(opts, origins) {
|
|
10928
11105
|
var _a;
|
|
@@ -10967,7 +11144,7 @@ function getDefaultValue(opts, origins) {
|
|
|
10967
11144
|
case "CONTEXT":
|
|
10968
11145
|
return params[defaultValue];
|
|
10969
11146
|
case "UNIQUEID":
|
|
10970
|
-
return
|
|
11147
|
+
return createUUID8();
|
|
10971
11148
|
default:
|
|
10972
11149
|
throw new ModelError16({}, "\u9ED8\u8BA4\u503C\u7C7B\u578B[".concat(valueType, "]\u672A\u652F\u6301"));
|
|
10973
11150
|
}
|
|
@@ -11066,6 +11243,7 @@ var BaseController = class {
|
|
|
11066
11243
|
this.context = context;
|
|
11067
11244
|
this.params = params;
|
|
11068
11245
|
this.ctx = ctx;
|
|
11246
|
+
this.id = createUUID9();
|
|
11069
11247
|
this.state = {};
|
|
11070
11248
|
/**
|
|
11071
11249
|
* 控制器名称,作为检索控制器的唯一标识
|
|
@@ -11684,11 +11862,14 @@ var ViewController = class extends BaseController {
|
|
|
11684
11862
|
await Promise.all(this.engines.map((engine) => engine.onDestroyed()));
|
|
11685
11863
|
}
|
|
11686
11864
|
this.ctx.destroy();
|
|
11687
|
-
this.context.destroy();
|
|
11688
11865
|
this.engines = [];
|
|
11689
11866
|
if (this.scheduler) {
|
|
11690
11867
|
this.scheduler.destroy();
|
|
11691
11868
|
}
|
|
11869
|
+
if (this.id === this.context.srfsessionid) {
|
|
11870
|
+
ibiz.uiDomainManager.destroy(this.context.srfsessionid);
|
|
11871
|
+
}
|
|
11872
|
+
this.context.destroy();
|
|
11692
11873
|
ibiz.log.debug("\u89C6\u56FE[".concat(this.model.name, "](").concat(this.model.id, ")\u9500\u6BC1"));
|
|
11693
11874
|
}
|
|
11694
11875
|
/**
|
|
@@ -11700,8 +11881,9 @@ var ViewController = class extends BaseController {
|
|
|
11700
11881
|
*/
|
|
11701
11882
|
handleContextParams() {
|
|
11702
11883
|
this.context.srfappid = this.model.appId;
|
|
11703
|
-
if (isNil18(this.context.srfsessionid) ||
|
|
11704
|
-
|
|
11884
|
+
if (isNil18(this.context.srfsessionid) || isEmpty8(this.context.srfsessionid)) {
|
|
11885
|
+
const domain = ibiz.uiDomainManager.create(this.id);
|
|
11886
|
+
this.context.srfsessionid = domain.id;
|
|
11705
11887
|
}
|
|
11706
11888
|
const navContexts = this.model.appViewNavContexts;
|
|
11707
11889
|
let context = {};
|
|
@@ -11857,9 +12039,11 @@ var WFStepTraceViewController = class extends ViewController {
|
|
|
11857
12039
|
var _a;
|
|
11858
12040
|
await super.onCreated();
|
|
11859
12041
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
11860
|
-
|
|
12042
|
+
const view = (_a = this.ctx.parent) == null ? void 0 : _a.view;
|
|
12043
|
+
if (view && view.model.appDataEntityId) {
|
|
11861
12044
|
const entityService = await app.deService.getService(
|
|
11862
|
-
|
|
12045
|
+
view.context,
|
|
12046
|
+
view.model.appDataEntityId
|
|
11863
12047
|
);
|
|
11864
12048
|
const params = Object.assign(this.context.clone(), this.params);
|
|
11865
12049
|
const res = await entityService.wf.getWFHistory(params);
|
|
@@ -12947,7 +13131,7 @@ var CalendarService = class extends MDControlService {
|
|
|
12947
13131
|
*
|
|
12948
13132
|
* @author zk
|
|
12949
13133
|
* @date 2023-08-08 10:08:47
|
|
12950
|
-
* @param {
|
|
13134
|
+
* @param {IContext} context
|
|
12951
13135
|
* @param {IParams} [params={}]
|
|
12952
13136
|
* @return {*} Promise<ICalendarItemData[]>
|
|
12953
13137
|
* @memberof CalendarService
|
|
@@ -13006,7 +13190,7 @@ var CalendarService = class extends MDControlService {
|
|
|
13006
13190
|
* @author zk
|
|
13007
13191
|
* @date 2023-08-08 06:08:49
|
|
13008
13192
|
* @param {string} methodName
|
|
13009
|
-
* @param {
|
|
13193
|
+
* @param {IContext} context
|
|
13010
13194
|
* @param {IData} [data={}]
|
|
13011
13195
|
* @param {IParams} [params={}]
|
|
13012
13196
|
* @param {string} [appDataEntityId=this.model.appDataEntityId!]
|
|
@@ -15466,7 +15650,7 @@ var UILogicParam = class {
|
|
|
15466
15650
|
const m = this.model;
|
|
15467
15651
|
const { parameters } = ctx;
|
|
15468
15652
|
const { context, params, data } = parameters;
|
|
15469
|
-
const app = ibiz.hub.getApp(
|
|
15653
|
+
const app = ibiz.hub.getApp(m.appId);
|
|
15470
15654
|
if (m.codeName === "layoutPanel") {
|
|
15471
15655
|
ctx.params[tag] = parameters.view.layoutPanel.panelItems;
|
|
15472
15656
|
return;
|
|
@@ -18543,7 +18727,7 @@ var FormService = class extends ControlService {
|
|
|
18543
18727
|
* @author lxm
|
|
18544
18728
|
* @date 2023-12-13 03:16:19
|
|
18545
18729
|
* @param {IData} data 表单数据
|
|
18546
|
-
* @param {
|
|
18730
|
+
* @param {IContext} context 上下文
|
|
18547
18731
|
* @param {IParams} params 视图参数
|
|
18548
18732
|
* @param {('create' | 'update')} type 新建还是更新
|
|
18549
18733
|
*/
|
|
@@ -18584,7 +18768,7 @@ var SearchFormService = class extends FormService {
|
|
|
18584
18768
|
*
|
|
18585
18769
|
* @author lxm
|
|
18586
18770
|
* @date 2022-08-31 17:08:41
|
|
18587
|
-
* @param {
|
|
18771
|
+
* @param {IContext} context 上下文
|
|
18588
18772
|
* @param {IParams} [params={}] 视图参数
|
|
18589
18773
|
* @returns {*} {Promise<IHttpResponse>}
|
|
18590
18774
|
*/
|
|
@@ -19354,7 +19538,7 @@ var FormButtonController = class extends FormDetailController {
|
|
|
19354
19538
|
|
|
19355
19539
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts
|
|
19356
19540
|
import { isOverlap as isOverlap2 } from "@ibiz-template/core";
|
|
19357
|
-
import { createUUID as
|
|
19541
|
+
import { createUUID as createUUID10, notNilEmpty as notNilEmpty8 } from "qx-util";
|
|
19358
19542
|
|
|
19359
19543
|
// src/controller/control/form/form-detail/form-druipart/form-druipart.state.ts
|
|
19360
19544
|
var FormDruipartState = class extends FormDetailState {
|
|
@@ -19467,7 +19651,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
19467
19651
|
this.form.context
|
|
19468
19652
|
);
|
|
19469
19653
|
if (!this.state.viewComponentKey) {
|
|
19470
|
-
this.state.viewComponentKey =
|
|
19654
|
+
this.state.viewComponentKey = createUUID10();
|
|
19471
19655
|
this.navContext = newContext;
|
|
19472
19656
|
this.navParams = newParams;
|
|
19473
19657
|
} else if (JSON.stringify(this.navContext) !== JSON.stringify(newContext) || JSON.stringify(this.navParams) !== JSON.stringify(newParams)) {
|
|
@@ -20194,7 +20378,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
20194
20378
|
|
|
20195
20379
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
|
|
20196
20380
|
import { RuntimeError as RuntimeError50, RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
20197
|
-
import { createUUID as
|
|
20381
|
+
import { createUUID as createUUID11 } from "qx-util";
|
|
20198
20382
|
|
|
20199
20383
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
|
|
20200
20384
|
var FormMDCtrlFormState = class extends FormDetailState {
|
|
@@ -20330,7 +20514,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
20330
20514
|
this.state.items = [];
|
|
20331
20515
|
}
|
|
20332
20516
|
const item = {
|
|
20333
|
-
id:
|
|
20517
|
+
id: createUUID11(),
|
|
20334
20518
|
context,
|
|
20335
20519
|
params
|
|
20336
20520
|
};
|
|
@@ -20581,7 +20765,7 @@ import {
|
|
|
20581
20765
|
RuntimeError as RuntimeError51
|
|
20582
20766
|
} from "@ibiz-template/core";
|
|
20583
20767
|
import { debounce as debounce2 } from "lodash-es";
|
|
20584
|
-
import { createUUID as
|
|
20768
|
+
import { createUUID as createUUID12 } from "qx-util";
|
|
20585
20769
|
import { clone as clone21 } from "ramda";
|
|
20586
20770
|
|
|
20587
20771
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
@@ -20595,7 +20779,7 @@ var EditFormService = class extends FormService {
|
|
|
20595
20779
|
*
|
|
20596
20780
|
* @author lxm
|
|
20597
20781
|
* @date 2022-08-31 17:08:41
|
|
20598
|
-
* @param {
|
|
20782
|
+
* @param {IContext} context 上下文
|
|
20599
20783
|
* @param {IParams} [params={}] 视图参数
|
|
20600
20784
|
* @returns {*} {Promise<IHttpResponse>}
|
|
20601
20785
|
*/
|
|
@@ -20618,7 +20802,7 @@ var EditFormService = class extends FormService {
|
|
|
20618
20802
|
*
|
|
20619
20803
|
* @author lxm
|
|
20620
20804
|
* @date 2022-08-31 17:08:41
|
|
20621
|
-
* @param {
|
|
20805
|
+
* @param {IContext} context 上下文
|
|
20622
20806
|
* @param {IParams} [params={}] 视图参数
|
|
20623
20807
|
* @returns {*} {Promise<IHttpResponse>}
|
|
20624
20808
|
*/
|
|
@@ -20641,7 +20825,7 @@ var EditFormService = class extends FormService {
|
|
|
20641
20825
|
*
|
|
20642
20826
|
* @author lxm
|
|
20643
20827
|
* @date 2022-09-07 19:09:48
|
|
20644
|
-
* @param {
|
|
20828
|
+
* @param {IContext} context 上下文
|
|
20645
20829
|
* @param {IParams} [params={}] 视图参数
|
|
20646
20830
|
* @returns {*}
|
|
20647
20831
|
*/
|
|
@@ -20660,7 +20844,7 @@ var EditFormService = class extends FormService {
|
|
|
20660
20844
|
*
|
|
20661
20845
|
* @author lxm
|
|
20662
20846
|
* @date 2022-09-07 19:09:11
|
|
20663
|
-
* @param {
|
|
20847
|
+
* @param {IContext} context 上下文
|
|
20664
20848
|
* @param {IData} data 数据
|
|
20665
20849
|
* @returns {*}
|
|
20666
20850
|
*/
|
|
@@ -20681,7 +20865,7 @@ var EditFormService = class extends FormService {
|
|
|
20681
20865
|
*
|
|
20682
20866
|
* @author lxm
|
|
20683
20867
|
* @date 2022-09-07 19:09:11
|
|
20684
|
-
* @param {
|
|
20868
|
+
* @param {IContext} context 上下文
|
|
20685
20869
|
* @param {IData} data 数据
|
|
20686
20870
|
* @returns {*}
|
|
20687
20871
|
*/
|
|
@@ -20702,7 +20886,7 @@ var EditFormService = class extends FormService {
|
|
|
20702
20886
|
*
|
|
20703
20887
|
* @author lxm
|
|
20704
20888
|
* @date 2022-09-07 19:09:11
|
|
20705
|
-
* @param {
|
|
20889
|
+
* @param {IContext} context 上下文
|
|
20706
20890
|
* @param {IData} data 数据
|
|
20707
20891
|
* @returns {*}
|
|
20708
20892
|
*/
|
|
@@ -20727,7 +20911,7 @@ var EditFormService = class extends FormService {
|
|
|
20727
20911
|
* @author lxm
|
|
20728
20912
|
* @date 2022-09-15 21:09:34
|
|
20729
20913
|
* @param {string} methodName
|
|
20730
|
-
* @param {
|
|
20914
|
+
* @param {IContext} context
|
|
20731
20915
|
* @param {IParams} [params={}]
|
|
20732
20916
|
* @returns {*} {Promise<IHttpResponse<ControlVO>>}
|
|
20733
20917
|
*/
|
|
@@ -20741,7 +20925,7 @@ var EditFormService = class extends FormService {
|
|
|
20741
20925
|
*
|
|
20742
20926
|
* @author lxm
|
|
20743
20927
|
* @date 2022-09-07 19:09:11
|
|
20744
|
-
* @param {
|
|
20928
|
+
* @param {IContext} context 上下文
|
|
20745
20929
|
* @param {IData} data 数据
|
|
20746
20930
|
* @param {IParams} [params={}] 视图参数
|
|
20747
20931
|
* @returns {*}
|
|
@@ -20751,6 +20935,7 @@ var EditFormService = class extends FormService {
|
|
|
20751
20935
|
const wfForm = this.model;
|
|
20752
20936
|
const methodName = ((_a = wfForm.wfstartControlAction) == null ? void 0 : _a.appDEMethodId) || "wfstart";
|
|
20753
20937
|
const entityService = await this.app.deService.getService(
|
|
20938
|
+
context,
|
|
20754
20939
|
this.model.appDataEntityId
|
|
20755
20940
|
);
|
|
20756
20941
|
return entityService.wf.exec(
|
|
@@ -20765,7 +20950,7 @@ var EditFormService = class extends FormService {
|
|
|
20765
20950
|
*
|
|
20766
20951
|
* @author lxm
|
|
20767
20952
|
* @date 2022-09-07 19:09:11
|
|
20768
|
-
* @param {
|
|
20953
|
+
* @param {IContext} context 上下文
|
|
20769
20954
|
* @param {IData} data 数据
|
|
20770
20955
|
* @param {IParams} [params={}] 视图参数
|
|
20771
20956
|
* @returns {*}
|
|
@@ -20780,6 +20965,7 @@ var EditFormService = class extends FormService {
|
|
|
20780
20965
|
methodName = ((_a = wfForm.wfsubmitControlAction) == null ? void 0 : _a.appDEMethodId) || "wfsubmit";
|
|
20781
20966
|
}
|
|
20782
20967
|
const entityService = await this.app.deService.getService(
|
|
20968
|
+
context,
|
|
20783
20969
|
this.model.appDataEntityId
|
|
20784
20970
|
);
|
|
20785
20971
|
return entityService.wf.exec(
|
|
@@ -20962,7 +21148,7 @@ var EditFormController = class extends FormController {
|
|
|
20962
21148
|
await this.endLoading();
|
|
20963
21149
|
}
|
|
20964
21150
|
res.data.srfkey = void 0;
|
|
20965
|
-
res.data.tempsrfkey =
|
|
21151
|
+
res.data.tempsrfkey = createUUID12();
|
|
20966
21152
|
this.state.modified = false;
|
|
20967
21153
|
this.state.data = res.data;
|
|
20968
21154
|
this.formStateNotify("LOAD" /* LOAD */);
|
|
@@ -21579,12 +21765,13 @@ var GridService = class extends MDControlService {
|
|
|
21579
21765
|
* @author lxm
|
|
21580
21766
|
* @date 2022-09-15 21:09:34
|
|
21581
21767
|
* @param {string} methodName
|
|
21582
|
-
* @param {
|
|
21768
|
+
* @param {IContext} context
|
|
21583
21769
|
* @param {IParams} [params={}]
|
|
21584
21770
|
* @returns {*} {Promise<IHttpResponse<ControlVO>>}
|
|
21585
21771
|
*/
|
|
21586
21772
|
async updateGridEditItem(methodName, context, params = {}) {
|
|
21587
21773
|
const entityService = await this.app.deService.getService(
|
|
21774
|
+
context,
|
|
21588
21775
|
this.model.appDataEntityId
|
|
21589
21776
|
);
|
|
21590
21777
|
let res = await entityService.exec(methodName, context, params);
|
|
@@ -22331,7 +22518,8 @@ var GridController = class extends MDControlController {
|
|
|
22331
22518
|
if (item.codeListId) {
|
|
22332
22519
|
tempExportColumn.codeList = app.codeList.getCodeList(item.codeListId);
|
|
22333
22520
|
tempExportColumn.codeListItems = await app.codeList.get(
|
|
22334
|
-
item.codeListId
|
|
22521
|
+
item.codeListId,
|
|
22522
|
+
this.context
|
|
22335
22523
|
);
|
|
22336
22524
|
}
|
|
22337
22525
|
return tempExportColumn;
|
|
@@ -22541,6 +22729,36 @@ var GridController = class extends MDControlController {
|
|
|
22541
22729
|
convertColumnCaption(this.model.degridColumns);
|
|
22542
22730
|
}
|
|
22543
22731
|
}
|
|
22732
|
+
/**
|
|
22733
|
+
* 控制列显示
|
|
22734
|
+
* @param {IColumnState} columnState
|
|
22735
|
+
* @return {*}
|
|
22736
|
+
* @author: zhujiamin
|
|
22737
|
+
* @Date: 2023-12-19 16:02:14
|
|
22738
|
+
*/
|
|
22739
|
+
setColumnVisible(columnState) {
|
|
22740
|
+
columnState.hidden = !columnState.hidden;
|
|
22741
|
+
}
|
|
22742
|
+
/**
|
|
22743
|
+
* 设置点击分组后回显相关参数
|
|
22744
|
+
* @param {IData} data
|
|
22745
|
+
* @return {*}
|
|
22746
|
+
* @author: zhujiamin
|
|
22747
|
+
* @Date: 2023-12-21 10:54:45
|
|
22748
|
+
*/
|
|
22749
|
+
setGroupParams(data) {
|
|
22750
|
+
if (data.sort) {
|
|
22751
|
+
this.state.sortQuery = data.sort;
|
|
22752
|
+
} else {
|
|
22753
|
+
this.state.sortQuery = "";
|
|
22754
|
+
}
|
|
22755
|
+
if (data.columnstates) {
|
|
22756
|
+
this.state.columnStates = data.columnstates;
|
|
22757
|
+
} else {
|
|
22758
|
+
this.state.columnStates = [];
|
|
22759
|
+
this.initColumnStates();
|
|
22760
|
+
}
|
|
22761
|
+
}
|
|
22544
22762
|
};
|
|
22545
22763
|
|
|
22546
22764
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
@@ -24131,7 +24349,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
24131
24349
|
};
|
|
24132
24350
|
|
|
24133
24351
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
24134
|
-
import { recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
|
|
24352
|
+
import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
|
|
24135
24353
|
import { isNil as isNil23 } from "ramda";
|
|
24136
24354
|
|
|
24137
24355
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
@@ -24175,6 +24393,132 @@ var SearchBarFilterController = class {
|
|
|
24175
24393
|
}
|
|
24176
24394
|
};
|
|
24177
24395
|
|
|
24396
|
+
// src/controller/control/search-bar/search-bar.service.ts
|
|
24397
|
+
var SearchBarService = class {
|
|
24398
|
+
/**
|
|
24399
|
+
* Creates an instance of ControlService.
|
|
24400
|
+
*
|
|
24401
|
+
*/
|
|
24402
|
+
constructor(model, viewTag) {
|
|
24403
|
+
/**
|
|
24404
|
+
* 主题管理URL
|
|
24405
|
+
* @return {*}
|
|
24406
|
+
* @author: zhujiamin
|
|
24407
|
+
* @Date: 2023-12-22 10:51:49
|
|
24408
|
+
*/
|
|
24409
|
+
this.themeUrl = "/extension/app_view_themes";
|
|
24410
|
+
this.model = model;
|
|
24411
|
+
this.viewTag = viewTag;
|
|
24412
|
+
}
|
|
24413
|
+
async init(_context) {
|
|
24414
|
+
this.app = ibiz.hub.getApp(this.model.appId);
|
|
24415
|
+
}
|
|
24416
|
+
/**
|
|
24417
|
+
* 执行查询多条数据的方法
|
|
24418
|
+
*
|
|
24419
|
+
*/
|
|
24420
|
+
async fetch() {
|
|
24421
|
+
const res = await this.app.net.post("".concat(this.themeUrl, "/fetch_default"), {
|
|
24422
|
+
app_view_tag: this.viewTag,
|
|
24423
|
+
sort: "create_time,asc"
|
|
24424
|
+
});
|
|
24425
|
+
if (res.ok) {
|
|
24426
|
+
res.data = this.convertBackDataToFront(res.data);
|
|
24427
|
+
}
|
|
24428
|
+
return res;
|
|
24429
|
+
}
|
|
24430
|
+
/**
|
|
24431
|
+
* 执行获取单条数据方法
|
|
24432
|
+
*
|
|
24433
|
+
*/
|
|
24434
|
+
async get(id) {
|
|
24435
|
+
const res = await this.app.net.get("".concat(this.themeUrl, "/").concat(id), {
|
|
24436
|
+
app_view_tag: this.viewTag
|
|
24437
|
+
});
|
|
24438
|
+
if (res.ok) {
|
|
24439
|
+
[res.data] = this.convertBackDataToFront([res.data]);
|
|
24440
|
+
}
|
|
24441
|
+
return res;
|
|
24442
|
+
}
|
|
24443
|
+
/**
|
|
24444
|
+
* 删除单条数据
|
|
24445
|
+
*
|
|
24446
|
+
*/
|
|
24447
|
+
async remove(id) {
|
|
24448
|
+
const res = await this.app.net.delete("".concat(this.themeUrl, "/").concat(id), {
|
|
24449
|
+
app_view_tag: this.viewTag
|
|
24450
|
+
});
|
|
24451
|
+
return res;
|
|
24452
|
+
}
|
|
24453
|
+
/**
|
|
24454
|
+
* 新建数据
|
|
24455
|
+
*
|
|
24456
|
+
*/
|
|
24457
|
+
async create(caption) {
|
|
24458
|
+
const res = await this.app.net.post("".concat(this.themeUrl), {
|
|
24459
|
+
name: caption,
|
|
24460
|
+
app_view_tag: this.viewTag
|
|
24461
|
+
});
|
|
24462
|
+
return res;
|
|
24463
|
+
}
|
|
24464
|
+
/**
|
|
24465
|
+
* 新建数据(带参数,给平台配置建立的分组用)
|
|
24466
|
+
*
|
|
24467
|
+
*/
|
|
24468
|
+
async createWithParams(id, data) {
|
|
24469
|
+
const res = await this.app.net.post("".concat(this.themeUrl), {
|
|
24470
|
+
id,
|
|
24471
|
+
theme_model: JSON.stringify(data),
|
|
24472
|
+
app_view_tag: this.viewTag,
|
|
24473
|
+
show: data.show
|
|
24474
|
+
});
|
|
24475
|
+
return res;
|
|
24476
|
+
}
|
|
24477
|
+
/**
|
|
24478
|
+
* 更新数据
|
|
24479
|
+
*
|
|
24480
|
+
*/
|
|
24481
|
+
async update(id, data) {
|
|
24482
|
+
const updateParams = { app_view_tag: this.viewTag };
|
|
24483
|
+
if (data.theme_model) {
|
|
24484
|
+
Object.assign(updateParams, {
|
|
24485
|
+
theme_model: JSON.stringify(data.theme_model)
|
|
24486
|
+
});
|
|
24487
|
+
}
|
|
24488
|
+
if (data.caption) {
|
|
24489
|
+
Object.assign(updateParams, {
|
|
24490
|
+
name: data.caption
|
|
24491
|
+
});
|
|
24492
|
+
}
|
|
24493
|
+
if (typeof data.show === "boolean") {
|
|
24494
|
+
Object.assign(updateParams, {
|
|
24495
|
+
show: data.show
|
|
24496
|
+
});
|
|
24497
|
+
}
|
|
24498
|
+
const res = await this.app.net.put("".concat(this.themeUrl, "/").concat(id), updateParams);
|
|
24499
|
+
return res;
|
|
24500
|
+
}
|
|
24501
|
+
/**
|
|
24502
|
+
* 转换后台数据成前端需要的格式
|
|
24503
|
+
* @param {IData} data
|
|
24504
|
+
* @return {*}
|
|
24505
|
+
* @author: zhujiamin
|
|
24506
|
+
* @Date: 2023-12-22 11:19:50
|
|
24507
|
+
*/
|
|
24508
|
+
convertBackDataToFront(data) {
|
|
24509
|
+
return data.map((item) => {
|
|
24510
|
+
const tempItem = { ...item };
|
|
24511
|
+
if (item.name) {
|
|
24512
|
+
tempItem.caption = item.name;
|
|
24513
|
+
}
|
|
24514
|
+
if (item.theme_model) {
|
|
24515
|
+
tempItem.searchGroupData = JSON.parse(item.theme_model);
|
|
24516
|
+
}
|
|
24517
|
+
return tempItem;
|
|
24518
|
+
});
|
|
24519
|
+
}
|
|
24520
|
+
};
|
|
24521
|
+
|
|
24178
24522
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
24179
24523
|
var SearchBarController = class extends ControlController {
|
|
24180
24524
|
constructor() {
|
|
@@ -24193,6 +24537,29 @@ var SearchBarController = class extends ControlController {
|
|
|
24193
24537
|
* @type {SearchBarFilterController[]}
|
|
24194
24538
|
*/
|
|
24195
24539
|
this.filterControllers = [];
|
|
24540
|
+
/**
|
|
24541
|
+
* 当前编辑的分组
|
|
24542
|
+
* @return {*}
|
|
24543
|
+
* @author: zhujiamin
|
|
24544
|
+
* @Date: 2023-12-20 18:06:37
|
|
24545
|
+
*/
|
|
24546
|
+
this.currentEditGroup = null;
|
|
24547
|
+
/**
|
|
24548
|
+
* 是否为后台分组
|
|
24549
|
+
* @return {*}
|
|
24550
|
+
* @author: zhujiamin
|
|
24551
|
+
* @Date: 2023-12-21 10:17:43
|
|
24552
|
+
*/
|
|
24553
|
+
this.isBackendSearchGroup = true;
|
|
24554
|
+
}
|
|
24555
|
+
/**
|
|
24556
|
+
* 表格控制器
|
|
24557
|
+
* @return {*}
|
|
24558
|
+
* @author: zhujiamin
|
|
24559
|
+
* @Date: 2023-12-22 13:50:16
|
|
24560
|
+
*/
|
|
24561
|
+
get grid() {
|
|
24562
|
+
return this.ctx.getController("grid");
|
|
24196
24563
|
}
|
|
24197
24564
|
initState() {
|
|
24198
24565
|
super.initState();
|
|
@@ -24202,6 +24569,8 @@ var SearchBarController = class extends ControlController {
|
|
|
24202
24569
|
if (this.model.enableFilter) {
|
|
24203
24570
|
this.resetFilter();
|
|
24204
24571
|
}
|
|
24572
|
+
this.state.searchBarGroups = [];
|
|
24573
|
+
this.state.selectedSearchGroupItem = null;
|
|
24205
24574
|
}
|
|
24206
24575
|
async onCreated() {
|
|
24207
24576
|
await super.onCreated();
|
|
@@ -24213,7 +24582,12 @@ var SearchBarController = class extends ControlController {
|
|
|
24213
24582
|
this.appDataEntity = appDataEntity;
|
|
24214
24583
|
this.calcQuickSearchPlaceholder();
|
|
24215
24584
|
}
|
|
24585
|
+
if (this.isBackendSearchGroup && this.view.model.codeName) {
|
|
24586
|
+
this.service = new SearchBarService(this.model, this.view.model.codeName);
|
|
24587
|
+
await this.service.init(this.context);
|
|
24588
|
+
}
|
|
24216
24589
|
await this.initSearchBarFilters();
|
|
24590
|
+
await this.initSearBarGroups();
|
|
24217
24591
|
}
|
|
24218
24592
|
/**
|
|
24219
24593
|
* 计算快速搜索的占位
|
|
@@ -24279,7 +24653,7 @@ var SearchBarController = class extends ControlController {
|
|
|
24279
24653
|
if (this.state.query) {
|
|
24280
24654
|
params.query = this.state.query;
|
|
24281
24655
|
}
|
|
24282
|
-
if ((_a = this.state.selectedGroupItem) == null ? void 0 : _a.data) {
|
|
24656
|
+
if (((_a = this.state.selectedGroupItem) == null ? void 0 : _a.data) && typeof this.state.selectedGroupItem.data === "string") {
|
|
24283
24657
|
const navParams = ScriptFactory.execSingleLine(
|
|
24284
24658
|
this.state.selectedGroupItem.data
|
|
24285
24659
|
);
|
|
@@ -24298,13 +24672,7 @@ var SearchBarController = class extends ControlController {
|
|
|
24298
24672
|
* @date 2023-10-16 03:52:44
|
|
24299
24673
|
*/
|
|
24300
24674
|
resetFilter() {
|
|
24301
|
-
this.state.filterNodes =
|
|
24302
|
-
{
|
|
24303
|
-
leaf: false,
|
|
24304
|
-
logicType: "AND",
|
|
24305
|
-
children: [{ leaf: true, field: null, valueOP: null, value: null }]
|
|
24306
|
-
}
|
|
24307
|
-
];
|
|
24675
|
+
this.state.filterNodes = this.getOriginFilterNodes();
|
|
24308
24676
|
this.evt.emit("onSearch", void 0);
|
|
24309
24677
|
}
|
|
24310
24678
|
/**
|
|
@@ -24375,6 +24743,123 @@ var SearchBarController = class extends ControlController {
|
|
|
24375
24743
|
value: node.value
|
|
24376
24744
|
};
|
|
24377
24745
|
}
|
|
24746
|
+
/**
|
|
24747
|
+
* 获取初始过滤项树节点数据集合
|
|
24748
|
+
* @return {*}
|
|
24749
|
+
* @author: zhujiamin
|
|
24750
|
+
* @Date: 2023-12-21 17:29:47
|
|
24751
|
+
*/
|
|
24752
|
+
getOriginFilterNodes() {
|
|
24753
|
+
return [
|
|
24754
|
+
{
|
|
24755
|
+
leaf: false,
|
|
24756
|
+
logicType: "AND",
|
|
24757
|
+
children: [{ leaf: true, field: null, valueOP: null, value: null }]
|
|
24758
|
+
}
|
|
24759
|
+
];
|
|
24760
|
+
}
|
|
24761
|
+
/**
|
|
24762
|
+
* 初始化搜索栏分组项(获取后台分组清单并合并模型)
|
|
24763
|
+
* @return {*}
|
|
24764
|
+
* @author: zhujiamin
|
|
24765
|
+
* @Date: 2023-12-19 14:43:46
|
|
24766
|
+
*/
|
|
24767
|
+
async initSearBarGroups() {
|
|
24768
|
+
this.state.searchBarGroups = [];
|
|
24769
|
+
if (this.isBackendSearchGroup) {
|
|
24770
|
+
if (this.model.searchBarGroups && this.model.searchBarGroups.length > 0) {
|
|
24771
|
+
this.state.searchBarGroups = this.model.searchBarGroups.map((item) => ({
|
|
24772
|
+
...item,
|
|
24773
|
+
show: true,
|
|
24774
|
+
saved: false,
|
|
24775
|
+
searchGroupData: {}
|
|
24776
|
+
}));
|
|
24777
|
+
}
|
|
24778
|
+
const res = await this.service.fetch();
|
|
24779
|
+
if (res.ok) {
|
|
24780
|
+
res.data.forEach((group) => {
|
|
24781
|
+
const existGroup = this.state.searchBarGroups.find(
|
|
24782
|
+
(item) => item.id === group.id
|
|
24783
|
+
);
|
|
24784
|
+
if (existGroup) {
|
|
24785
|
+
mergeInLeft3(existGroup, group);
|
|
24786
|
+
existGroup.saved = true;
|
|
24787
|
+
} else {
|
|
24788
|
+
this.state.searchBarGroups.push({
|
|
24789
|
+
...group,
|
|
24790
|
+
appId: this.context.srfappid,
|
|
24791
|
+
show: true,
|
|
24792
|
+
saved: true,
|
|
24793
|
+
searchGroupData: {}
|
|
24794
|
+
});
|
|
24795
|
+
}
|
|
24796
|
+
});
|
|
24797
|
+
}
|
|
24798
|
+
}
|
|
24799
|
+
}
|
|
24800
|
+
/**
|
|
24801
|
+
* 处理保存
|
|
24802
|
+
* @return {*}
|
|
24803
|
+
* @author: zhujiamin
|
|
24804
|
+
* @Date: 2023-12-19 16:17:15
|
|
24805
|
+
*/
|
|
24806
|
+
async handleSave() {
|
|
24807
|
+
if (this.grid && this.state.selectedSearchGroupItem) {
|
|
24808
|
+
const filters = this.calcFilters();
|
|
24809
|
+
const saveParams = {
|
|
24810
|
+
filternodes: this.state.filterNodes,
|
|
24811
|
+
searchconds: filters,
|
|
24812
|
+
sort: this.grid.state.sortQuery,
|
|
24813
|
+
columnstates: this.grid.state.columnStates,
|
|
24814
|
+
show: this.state.selectedSearchGroupItem.show
|
|
24815
|
+
};
|
|
24816
|
+
if (this.state.selectedSearchGroupItem.saved) {
|
|
24817
|
+
await this.service.update(this.state.selectedSearchGroupItem.id, {
|
|
24818
|
+
theme_model: saveParams,
|
|
24819
|
+
show: this.state.selectedSearchGroupItem.show
|
|
24820
|
+
});
|
|
24821
|
+
ibiz.message.success("\u4FDD\u5B58\u6210\u529F");
|
|
24822
|
+
} else {
|
|
24823
|
+
const res = await this.service.createWithParams(
|
|
24824
|
+
this.state.selectedSearchGroupItem.id,
|
|
24825
|
+
saveParams
|
|
24826
|
+
);
|
|
24827
|
+
if (res.ok) {
|
|
24828
|
+
const savedGroup = this.state.searchBarGroups.find(
|
|
24829
|
+
(group) => group.id === res.data.id
|
|
24830
|
+
);
|
|
24831
|
+
if (savedGroup) {
|
|
24832
|
+
savedGroup.saved = true;
|
|
24833
|
+
}
|
|
24834
|
+
ibiz.message.success("\u4FDD\u5B58\u6210\u529F");
|
|
24835
|
+
}
|
|
24836
|
+
}
|
|
24837
|
+
}
|
|
24838
|
+
}
|
|
24839
|
+
/**
|
|
24840
|
+
* 处理点击后台分组
|
|
24841
|
+
* @return {*}
|
|
24842
|
+
* @author: zhujiamin
|
|
24843
|
+
* @Date: 2023-12-21 10:29:24
|
|
24844
|
+
*/
|
|
24845
|
+
async handleGroupClick(groupItem) {
|
|
24846
|
+
this.state.selectedSearchGroupItem = groupItem;
|
|
24847
|
+
if (groupItem.saved) {
|
|
24848
|
+
const res = await this.service.get(groupItem.id);
|
|
24849
|
+
if (res.ok) {
|
|
24850
|
+
mergeInLeft3(groupItem, res.data);
|
|
24851
|
+
}
|
|
24852
|
+
}
|
|
24853
|
+
if (groupItem.searchGroupData && groupItem.searchGroupData.filternodes) {
|
|
24854
|
+
this.state.filterNodes = groupItem.searchGroupData.filternodes;
|
|
24855
|
+
} else {
|
|
24856
|
+
this.state.filterNodes = this.getOriginFilterNodes();
|
|
24857
|
+
}
|
|
24858
|
+
if (this.grid && groupItem && groupItem.searchGroupData) {
|
|
24859
|
+
this.grid.setGroupParams(groupItem.searchGroupData);
|
|
24860
|
+
await this.grid.load({ isInitialLoad: true });
|
|
24861
|
+
}
|
|
24862
|
+
}
|
|
24378
24863
|
};
|
|
24379
24864
|
|
|
24380
24865
|
// src/controller/control/tab-exp-panel/tab-exp-panel.controller.ts
|
|
@@ -24927,8 +25412,11 @@ var TreeController = class extends MDControlController {
|
|
|
24927
25412
|
*/
|
|
24928
25413
|
this.nodeClickTBUIActionItem = /* @__PURE__ */ new Map();
|
|
24929
25414
|
}
|
|
24930
|
-
|
|
24931
|
-
|
|
25415
|
+
get _evt() {
|
|
25416
|
+
return this.evt;
|
|
25417
|
+
}
|
|
25418
|
+
initState() {
|
|
25419
|
+
super.initState();
|
|
24932
25420
|
this.state.defaultExpandedKeys = [];
|
|
24933
25421
|
this.state.expandedKeys = [];
|
|
24934
25422
|
this.state.navigational = false;
|
|
@@ -24965,8 +25453,7 @@ var TreeController = class extends MDControlController {
|
|
|
24965
25453
|
}
|
|
24966
25454
|
this.initDropNodeRss();
|
|
24967
25455
|
this.initNodeClickTBUIActionItem();
|
|
24968
|
-
this.
|
|
24969
|
-
await this.service.init(this.context);
|
|
25456
|
+
await this.initService();
|
|
24970
25457
|
this.model.detreeNodes.forEach((node) => {
|
|
24971
25458
|
var _a2, _b2;
|
|
24972
25459
|
if ((_b2 = (_a2 = node.decontextMenu) == null ? void 0 : _a2.detoolbarItems) == null ? void 0 : _b2.length) {
|
|
@@ -24982,6 +25469,17 @@ var TreeController = class extends MDControlController {
|
|
|
24982
25469
|
Object.values(this.contextMenus).map((menu) => menu.created())
|
|
24983
25470
|
);
|
|
24984
25471
|
}
|
|
25472
|
+
/**
|
|
25473
|
+
* 初始化对应类型的部件服务
|
|
25474
|
+
* @author lxm
|
|
25475
|
+
* @date 2023-12-21 11:25:33
|
|
25476
|
+
* @protected
|
|
25477
|
+
* @return {*} {Promise<void>}
|
|
25478
|
+
*/
|
|
25479
|
+
async initService() {
|
|
25480
|
+
this.service = new TreeService(this.model);
|
|
25481
|
+
await this.service.init(this.context);
|
|
25482
|
+
}
|
|
24985
25483
|
/**
|
|
24986
25484
|
* 初始化节点拖入关系处理
|
|
24987
25485
|
* @author lxm
|
|
@@ -25056,7 +25554,7 @@ var TreeController = class extends MDControlController {
|
|
|
25056
25554
|
}
|
|
25057
25555
|
await this.afterLoad(args, nodes);
|
|
25058
25556
|
this.state.isLoaded = true;
|
|
25059
|
-
await this.
|
|
25557
|
+
await this._evt.emit("onLoadSuccess", {
|
|
25060
25558
|
isInitialLoad
|
|
25061
25559
|
});
|
|
25062
25560
|
return nodes;
|
|
@@ -25095,6 +25593,17 @@ var TreeController = class extends MDControlController {
|
|
|
25095
25593
|
} else {
|
|
25096
25594
|
this.state.rootNodes = nodes;
|
|
25097
25595
|
}
|
|
25596
|
+
await this.afterLoadNodes(nodes);
|
|
25597
|
+
return nodes;
|
|
25598
|
+
}
|
|
25599
|
+
/**
|
|
25600
|
+
* loadNodes加载完子数据之后的处理
|
|
25601
|
+
* @author lxm
|
|
25602
|
+
* @date 2023-12-22 02:37:50
|
|
25603
|
+
* @param {ITreeNodeData[]} nodes 加载回来的子数据
|
|
25604
|
+
* @return {*} {Promise<void>}
|
|
25605
|
+
*/
|
|
25606
|
+
async afterLoadNodes(nodes) {
|
|
25098
25607
|
this.state.items = [];
|
|
25099
25608
|
recursiveIterate10(
|
|
25100
25609
|
{ children: this.state.rootNodes },
|
|
@@ -25103,7 +25612,6 @@ var TreeController = class extends MDControlController {
|
|
|
25103
25612
|
}
|
|
25104
25613
|
);
|
|
25105
25614
|
this.state.expandedKeys = this.calcExpandedKeys(nodes);
|
|
25106
|
-
return nodes;
|
|
25107
25615
|
}
|
|
25108
25616
|
/**
|
|
25109
25617
|
* 树节点点击事件
|
|
@@ -25170,7 +25678,7 @@ var TreeController = class extends MDControlController {
|
|
|
25170
25678
|
}
|
|
25171
25679
|
setActive(item) {
|
|
25172
25680
|
const nodeParams = this.parseTreeNodeData(item);
|
|
25173
|
-
return this.
|
|
25681
|
+
return this._evt.emit("onActive", { ...nodeParams, nodeData: item });
|
|
25174
25682
|
}
|
|
25175
25683
|
setSelection(selection) {
|
|
25176
25684
|
const selectionIds = selection.map((item) => item.id);
|
|
@@ -25190,6 +25698,20 @@ var TreeController = class extends MDControlController {
|
|
|
25190
25698
|
var _a;
|
|
25191
25699
|
return (_a = this.model.detreeNodes) == null ? void 0 : _a.find((item) => item.id === id);
|
|
25192
25700
|
}
|
|
25701
|
+
/**
|
|
25702
|
+
* 通过标识获取节点数据
|
|
25703
|
+
* @author lxm
|
|
25704
|
+
* @date 2023-12-22 02:21:38
|
|
25705
|
+
* @param {string} id 可以是节点id也可以是_uuid
|
|
25706
|
+
* @return {*} {(ITreeNodeData | undefined)}
|
|
25707
|
+
*/
|
|
25708
|
+
getNodeData(key) {
|
|
25709
|
+
const find = this.state.items.find((item) => item.id === key);
|
|
25710
|
+
if (find) {
|
|
25711
|
+
return find;
|
|
25712
|
+
}
|
|
25713
|
+
return this.state.items.find((item) => item._uuid === key);
|
|
25714
|
+
}
|
|
25193
25715
|
/**
|
|
25194
25716
|
* 执行界面行为
|
|
25195
25717
|
*
|
|
@@ -25289,7 +25811,7 @@ var TreeController = class extends MDControlController {
|
|
|
25289
25811
|
}
|
|
25290
25812
|
const targetNode = refreshParent ? currentNode.parent : currentNode;
|
|
25291
25813
|
const nodes = await this.loadNodes(targetNode);
|
|
25292
|
-
this.
|
|
25814
|
+
this._evt.emit("onAfterRefreshParent", {
|
|
25293
25815
|
parentNode: targetNode,
|
|
25294
25816
|
children: nodes
|
|
25295
25817
|
});
|
|
@@ -25459,7 +25981,7 @@ var TreeController = class extends MDControlController {
|
|
|
25459
25981
|
});
|
|
25460
25982
|
}
|
|
25461
25983
|
await this.updateDeNodeData(modifiedNodeDatas);
|
|
25462
|
-
this.
|
|
25984
|
+
this._evt.emit("onAfterNodeDrop", { isChangedParent });
|
|
25463
25985
|
}
|
|
25464
25986
|
/**
|
|
25465
25987
|
* 更新实体节点数据
|
|
@@ -25523,7 +26045,7 @@ var WizardPanelService = class extends ControlService {
|
|
|
25523
26045
|
*
|
|
25524
26046
|
* @author lxm
|
|
25525
26047
|
* @date 2022-08-31 17:08:41
|
|
25526
|
-
* @param {
|
|
26048
|
+
* @param {IContext} context 上下文
|
|
25527
26049
|
* @param {IParams} [params={}] 视图参数
|
|
25528
26050
|
* @returns {*} {Promise<IHttpResponse>}
|
|
25529
26051
|
*/
|
|
@@ -25539,7 +26061,7 @@ var WizardPanelService = class extends ControlService {
|
|
|
25539
26061
|
*
|
|
25540
26062
|
* @author lxm
|
|
25541
26063
|
* @date 2022-08-31 17:08:41
|
|
25542
|
-
* @param {
|
|
26064
|
+
* @param {IContext} context 上下文
|
|
25543
26065
|
* @param {IParams} [params={}] 视图参数
|
|
25544
26066
|
* @returns {*} {Promise<IHttpResponse>}
|
|
25545
26067
|
*/
|
|
@@ -26199,7 +26721,7 @@ var KanbanService = class extends DataViewControlService {
|
|
|
26199
26721
|
*
|
|
26200
26722
|
* @author lxm
|
|
26201
26723
|
* @date 2022-09-07 19:09:11
|
|
26202
|
-
* @param {
|
|
26724
|
+
* @param {IContext} context 上下文
|
|
26203
26725
|
* @param {ControlVO} data 数据
|
|
26204
26726
|
* @returns {*}
|
|
26205
26727
|
*/
|
|
@@ -26711,194 +27233,103 @@ var KanbanController = class extends DataViewControlController {
|
|
|
26711
27233
|
import { recursiveIterate as recursiveIterate11 } from "@ibiz-template/core";
|
|
26712
27234
|
|
|
26713
27235
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
26714
|
-
import { isArray as isArray10 } from "qx-util";
|
|
26715
27236
|
var TreeGridExService = class extends TreeService {
|
|
26716
|
-
|
|
26717
|
-
|
|
27237
|
+
};
|
|
27238
|
+
|
|
27239
|
+
// src/controller/control/tree-grid-ex/tree-grid-ex-row.state.ts
|
|
27240
|
+
var TreeGridExRowState = class {
|
|
27241
|
+
constructor(data, treeGrid) {
|
|
26718
27242
|
/**
|
|
26719
|
-
*
|
|
27243
|
+
* 操作列状态(p是操作列的标识)
|
|
26720
27244
|
*
|
|
26721
|
-
* @author
|
|
26722
|
-
* @date
|
|
26723
|
-
* @type {
|
|
26724
|
-
* @memberof TreeGridService
|
|
27245
|
+
* @author lxm
|
|
27246
|
+
* @date 2022-09-07 22:09:38
|
|
27247
|
+
* @type {({ [p: string]: IButtonContainerState })}
|
|
26725
27248
|
*/
|
|
26726
|
-
this.
|
|
26727
|
-
|
|
26728
|
-
|
|
26729
|
-
|
|
26730
|
-
*
|
|
26731
|
-
* @author lxm
|
|
26732
|
-
* @date 2022-08-31 18:08:37
|
|
26733
|
-
*/
|
|
26734
|
-
initUIDataMap() {
|
|
26735
|
-
var _a;
|
|
26736
|
-
super.initUIDataMap();
|
|
26737
|
-
(_a = this.model.detreeNodes) == null ? void 0 : _a.forEach((item) => {
|
|
26738
|
-
var _a2;
|
|
26739
|
-
const dataMap = /* @__PURE__ */ new Map();
|
|
26740
|
-
(_a2 = item.detreeNodeDataItems) == null ? void 0 : _a2.forEach((dataItem) => {
|
|
26741
|
-
const uiKey = dataItem.id.toLowerCase();
|
|
26742
|
-
const deField = dataItem.appDEFieldId;
|
|
26743
|
-
const deFieldKey = deField.toLowerCase();
|
|
26744
|
-
const mapField = new UIMapField(uiKey, deFieldKey, {
|
|
26745
|
-
isOriginField: true,
|
|
26746
|
-
dataType: dataItem.dataType
|
|
26747
|
-
});
|
|
26748
|
-
dataMap.set(uiKey, mapField);
|
|
26749
|
-
});
|
|
26750
|
-
this.multipleUiMap.set(item.id, dataMap);
|
|
27249
|
+
this.uaColStates = {};
|
|
27250
|
+
this.data = data;
|
|
27251
|
+
Object.values(treeGrid.uaColumns).forEach((column) => {
|
|
27252
|
+
column.initActionStates(this);
|
|
26751
27253
|
});
|
|
26752
27254
|
}
|
|
26753
|
-
/**
|
|
26754
|
-
* 获取实体数据集数据
|
|
26755
|
-
*
|
|
26756
|
-
* @protected
|
|
26757
|
-
* @param {TreeNodeRSModel} nodeRS
|
|
26758
|
-
* @param {TreeFetchOpts} opts
|
|
26759
|
-
* @returns {*}
|
|
26760
|
-
* @memberof TreeService
|
|
26761
|
-
*/
|
|
26762
|
-
async getDENodeDatas(nodeModel, nodeRS, parentNodeData, opts) {
|
|
26763
|
-
const { appDEDataSetId, appDataEntityId } = nodeModel;
|
|
26764
|
-
const { context, params, navContext, navParams } = nodeRS ? this.getNodeRSFilterParams(nodeRS, parentNodeData, opts) : {
|
|
26765
|
-
context: opts.context,
|
|
26766
|
-
params: opts.params,
|
|
26767
|
-
navContext: {},
|
|
26768
|
-
navParams: {}
|
|
26769
|
-
};
|
|
26770
|
-
params.size = nodeModel.maxSize || 1e3;
|
|
26771
|
-
if (nodeModel.sortAppDEFieldId && nodeModel.sortDir) {
|
|
26772
|
-
Object.assign(params, {
|
|
26773
|
-
sort: "".concat(nodeModel.sortAppDEFieldId.toLowerCase(), ",").concat(nodeModel.sortDir.toLowerCase())
|
|
26774
|
-
});
|
|
26775
|
-
}
|
|
26776
|
-
const response = await this.app.deService.exec(
|
|
26777
|
-
appDataEntityId,
|
|
26778
|
-
appDEDataSetId,
|
|
26779
|
-
context,
|
|
26780
|
-
params
|
|
26781
|
-
);
|
|
26782
|
-
if (response.data.length) {
|
|
26783
|
-
const { data } = this.handleResponseForMultiple(response, nodeModel.id);
|
|
26784
|
-
const nodeDatas = data.map((item) => {
|
|
26785
|
-
return new TreeDataSetNodeData(nodeModel, parentNodeData, {
|
|
26786
|
-
data: item,
|
|
26787
|
-
leaf: !!opts.leaf,
|
|
26788
|
-
navContext,
|
|
26789
|
-
navParams
|
|
26790
|
-
});
|
|
26791
|
-
});
|
|
26792
|
-
return nodeDatas;
|
|
26793
|
-
}
|
|
26794
|
-
return [];
|
|
26795
|
-
}
|
|
26796
|
-
/**
|
|
26797
|
-
* 处理多数据源响应
|
|
26798
|
-
*
|
|
26799
|
-
* @author zk
|
|
26800
|
-
* @date 2023-09-21 04:09:06
|
|
26801
|
-
* @param {IHttpResponse} response
|
|
26802
|
-
* @param {string} tag 多数据源dataUIMap标识
|
|
26803
|
-
* @return {*} {IHttpResponse}
|
|
26804
|
-
* @memberof TreeGridService
|
|
26805
|
-
*/
|
|
26806
|
-
handleResponseForMultiple(response, tag) {
|
|
26807
|
-
const res = super.handleResponse(response);
|
|
26808
|
-
if (res.headers) {
|
|
26809
|
-
if (res.headers["x-page"]) {
|
|
26810
|
-
res.page = Number(res.headers["x-page"]);
|
|
26811
|
-
}
|
|
26812
|
-
if (res.headers["x-per-page"]) {
|
|
26813
|
-
res.size = Number(res.headers["x-per-page"]);
|
|
26814
|
-
}
|
|
26815
|
-
if (res.headers["x-total"]) {
|
|
26816
|
-
res.total = Number(res.headers["x-total"]);
|
|
26817
|
-
}
|
|
26818
|
-
}
|
|
26819
|
-
if (res.ok) {
|
|
26820
|
-
if (isArray10(res.data)) {
|
|
26821
|
-
res.data = res.data.map(
|
|
26822
|
-
(item) => this.toUIDataForMultiple(item, tag)
|
|
26823
|
-
);
|
|
26824
|
-
} else {
|
|
26825
|
-
res.data = this.toUIDataForMultiple(res.data, tag);
|
|
26826
|
-
}
|
|
26827
|
-
}
|
|
26828
|
-
return res;
|
|
26829
|
-
}
|
|
26830
|
-
/**
|
|
26831
|
-
* 实体数据转ui数据
|
|
26832
|
-
*
|
|
26833
|
-
* @author zk
|
|
26834
|
-
* @date 2023-09-21 06:09:06
|
|
26835
|
-
* @param {IData} entityData 实体数据
|
|
26836
|
-
* @param {string} tag 多数据源dataUIMap标识
|
|
26837
|
-
* @return {*} {ControlVO}
|
|
26838
|
-
* @memberof TreeGridService
|
|
26839
|
-
*/
|
|
26840
|
-
toUIDataForMultiple(entityData, tag) {
|
|
26841
|
-
const dataUIMap = this.multipleUiMap.get(tag);
|
|
26842
|
-
return new ControlVO(entityData, dataUIMap);
|
|
26843
|
-
}
|
|
26844
27255
|
};
|
|
26845
27256
|
|
|
26846
27257
|
// src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
|
|
26847
|
-
var TreeGridExController = class extends
|
|
27258
|
+
var TreeGridExController = class extends TreeController {
|
|
26848
27259
|
constructor() {
|
|
26849
27260
|
super(...arguments);
|
|
26850
27261
|
/**
|
|
26851
|
-
*
|
|
27262
|
+
* 树表格(增强)列的适配器
|
|
26852
27263
|
*
|
|
26853
27264
|
* @author zk
|
|
26854
27265
|
* @date 2023-09-21 06:09:04
|
|
26855
|
-
* @type {{ [key: string]:
|
|
27266
|
+
* @type {{ [key: string]: ITreeGridExColumnProvider }}
|
|
26856
27267
|
* @memberof TreeGridExController
|
|
26857
27268
|
*/
|
|
26858
27269
|
this.providers = {};
|
|
26859
27270
|
/**
|
|
26860
|
-
*
|
|
27271
|
+
* 所有树表格(增强)列控制器集合
|
|
26861
27272
|
*
|
|
26862
27273
|
* @author zk
|
|
26863
27274
|
* @date 2023-09-21 06:09:10
|
|
26864
|
-
* @type {{ [key: string]:
|
|
27275
|
+
* @type {{ [key: string]: TreeGridExColumnController }}
|
|
26865
27276
|
* @memberof TreeGridExController
|
|
26866
27277
|
*/
|
|
26867
27278
|
this.columns = {};
|
|
26868
27279
|
/**
|
|
26869
|
-
*
|
|
27280
|
+
* 所有树表格(增强)属性列的控制器
|
|
26870
27281
|
*
|
|
26871
27282
|
* @author zk
|
|
26872
27283
|
* @date 2023-09-21 06:09:16
|
|
26873
|
-
* @type {{ [key: string]:
|
|
27284
|
+
* @type {{ [key: string]: TreeGridExFieldColumnController }}
|
|
26874
27285
|
* @memberof TreeGridExController
|
|
26875
27286
|
*/
|
|
26876
27287
|
this.fieldColumns = {};
|
|
26877
27288
|
/**
|
|
26878
|
-
*
|
|
27289
|
+
* 所有树表格(增强)操作列的控制器
|
|
26879
27290
|
*
|
|
26880
27291
|
* @author zk
|
|
26881
27292
|
* @date 2023-09-21 06:09:21
|
|
26882
|
-
* @type {{ [key: string]:
|
|
27293
|
+
* @type {{ [key: string]: TreeGridExUAColumnController }}
|
|
26883
27294
|
* @memberof TreeGridExController
|
|
26884
27295
|
*/
|
|
26885
27296
|
this.uaColumns = {};
|
|
26886
27297
|
}
|
|
27298
|
+
/**
|
|
27299
|
+
* 是否有配置宽度自适应列
|
|
27300
|
+
*
|
|
27301
|
+
* @type {boolean}
|
|
27302
|
+
* @memberof GridController
|
|
27303
|
+
*/
|
|
27304
|
+
get hasAdaptiveColumn() {
|
|
27305
|
+
return !!Object.values(this.columns).find((item) => item.isAdaptiveColumn);
|
|
27306
|
+
}
|
|
27307
|
+
/**
|
|
27308
|
+
* 单元格超出呈现模式
|
|
27309
|
+
* @author lxm
|
|
27310
|
+
* @date 2023-11-17 01:56:26
|
|
27311
|
+
* @readonly
|
|
27312
|
+
* @type {('wrap' | 'ellipsis')}
|
|
27313
|
+
*/
|
|
27314
|
+
get overflowMode() {
|
|
27315
|
+
return ibiz.config.grid.overflowMode;
|
|
27316
|
+
}
|
|
26887
27317
|
initState() {
|
|
26888
27318
|
super.initState();
|
|
26889
|
-
this.state.size = 0;
|
|
26890
27319
|
this.state.columnStates = [];
|
|
26891
|
-
this.state.
|
|
27320
|
+
this.state.rows = {};
|
|
26892
27321
|
}
|
|
26893
27322
|
async onCreated() {
|
|
26894
27323
|
await super.onCreated();
|
|
26895
|
-
this.service = new TreeGridExService(this.model);
|
|
26896
|
-
await this.service.init(this.context);
|
|
26897
27324
|
this.initColumnStates();
|
|
26898
27325
|
await this.initGridColumns();
|
|
26899
27326
|
}
|
|
27327
|
+
async initService() {
|
|
27328
|
+
this.service = new TreeGridExService(this.model);
|
|
27329
|
+
await this.service.init(this.context);
|
|
27330
|
+
}
|
|
26900
27331
|
/**
|
|
26901
|
-
*
|
|
27332
|
+
* 初始化树表格(增强)属性列,操作列,编辑项控制器
|
|
26902
27333
|
*
|
|
26903
27334
|
* @author zk
|
|
26904
27335
|
* @date 2023-09-21 06:09:28
|
|
@@ -26916,7 +27347,7 @@ var TreeGridExController = class extends MDControlController {
|
|
|
26916
27347
|
}
|
|
26917
27348
|
}
|
|
26918
27349
|
/**
|
|
26919
|
-
*
|
|
27350
|
+
* 初始化树表格(增强)属性列,操作列,编辑项控制器
|
|
26920
27351
|
*
|
|
26921
27352
|
* @author zk
|
|
26922
27353
|
* @date 2023-09-21 06:09:37
|
|
@@ -26926,7 +27357,7 @@ var TreeGridExController = class extends MDControlController {
|
|
|
26926
27357
|
* @memberof TreeGridExController
|
|
26927
27358
|
*/
|
|
26928
27359
|
async initColumnsController(column) {
|
|
26929
|
-
const provider = await
|
|
27360
|
+
const provider = await getTreeGridExColumnProvider(column);
|
|
26930
27361
|
if (!provider) {
|
|
26931
27362
|
return;
|
|
26932
27363
|
}
|
|
@@ -26940,7 +27371,7 @@ var TreeGridExController = class extends MDControlController {
|
|
|
26940
27371
|
}
|
|
26941
27372
|
}
|
|
26942
27373
|
/**
|
|
26943
|
-
*
|
|
27374
|
+
* 初始化树表格(增强)列状态
|
|
26944
27375
|
*
|
|
26945
27376
|
* @author zk
|
|
26946
27377
|
* @date 2023-09-21 06:09:43
|
|
@@ -26948,20 +27379,15 @@ var TreeGridExController = class extends MDControlController {
|
|
|
26948
27379
|
* @memberof TreeGridExController
|
|
26949
27380
|
*/
|
|
26950
27381
|
initColumnStates() {
|
|
26951
|
-
|
|
26952
|
-
|
|
26953
|
-
(
|
|
26954
|
-
|
|
26955
|
-
|
|
26956
|
-
|
|
26957
|
-
|
|
26958
|
-
|
|
26959
|
-
|
|
26960
|
-
});
|
|
26961
|
-
}
|
|
26962
|
-
},
|
|
26963
|
-
{ childrenFields: ["detreeColumns"] }
|
|
26964
|
-
);
|
|
27382
|
+
var _a;
|
|
27383
|
+
(_a = this.model.detreeColumns) == null ? void 0 : _a.forEach((column) => {
|
|
27384
|
+
this.state.columnStates.push({
|
|
27385
|
+
key: column.codeName,
|
|
27386
|
+
caption: column.caption,
|
|
27387
|
+
hidden: !!column.hideDefault,
|
|
27388
|
+
uaColumn: column.columnType === "UAGRIDCOLUMN"
|
|
27389
|
+
});
|
|
27390
|
+
});
|
|
26965
27391
|
this.calcColumnFixed();
|
|
26966
27392
|
}
|
|
26967
27393
|
/**
|
|
@@ -26980,92 +27406,194 @@ var TreeGridExController = class extends MDControlController {
|
|
|
26980
27406
|
showColumns.forEach((column, index) => {
|
|
26981
27407
|
if (column.uaColumn) {
|
|
26982
27408
|
column.fixed = index + 1 <= Math.floor(allNum / 2) ? "left" : "right";
|
|
26983
|
-
} else {
|
|
26984
|
-
column.fixed = "right";
|
|
26985
27409
|
}
|
|
26986
27410
|
});
|
|
26987
27411
|
}
|
|
26988
27412
|
/**
|
|
26989
|
-
*
|
|
26990
|
-
*
|
|
26991
|
-
* @
|
|
26992
|
-
* @
|
|
26993
|
-
* @
|
|
26994
|
-
* @return {*} {Promise<ITreeNodeData[]>}
|
|
26995
|
-
* @memberof TreeGridExController
|
|
27413
|
+
* 获取树表格行数据
|
|
27414
|
+
* @author lxm
|
|
27415
|
+
* @date 2023-12-22 02:23:44
|
|
27416
|
+
* @param {string} key 可以是节点id也可以是_uuid
|
|
27417
|
+
* @return {*} {(ITreeGridExRowState | undefined)}
|
|
26996
27418
|
*/
|
|
26997
|
-
|
|
26998
|
-
const
|
|
26999
|
-
|
|
27000
|
-
|
|
27001
|
-
|
|
27002
|
-
|
|
27003
|
-
|
|
27004
|
-
|
|
27419
|
+
getRowState(key) {
|
|
27420
|
+
const nodeData = this.getNodeData(key);
|
|
27421
|
+
if (nodeData) {
|
|
27422
|
+
return this.state.rows[nodeData._uuid];
|
|
27423
|
+
}
|
|
27424
|
+
}
|
|
27425
|
+
async afterLoadNodes(nodes) {
|
|
27426
|
+
await super.afterLoadNodes(nodes);
|
|
27427
|
+
recursiveIterate11({ children: nodes }, (node) => {
|
|
27428
|
+
this.state.rows[node._uuid] = new TreeGridExRowState(node, this);
|
|
27005
27429
|
});
|
|
27006
|
-
return nodes;
|
|
27007
27430
|
}
|
|
27008
27431
|
/**
|
|
27009
|
-
*
|
|
27432
|
+
* 转换各类多语言
|
|
27010
27433
|
*
|
|
27011
|
-
* @
|
|
27012
|
-
* @
|
|
27013
|
-
* @param {ITreeNodeData} [parentNode]
|
|
27014
|
-
* @return {*} {Promise<ITreeNodeData[]>}
|
|
27015
|
-
* @memberof TreeGridExController
|
|
27434
|
+
* @date 2023-05-18 02:57:00
|
|
27435
|
+
* @protected
|
|
27016
27436
|
*/
|
|
27017
|
-
|
|
27018
|
-
const
|
|
27019
|
-
|
|
27020
|
-
|
|
27021
|
-
|
|
27022
|
-
|
|
27023
|
-
|
|
27024
|
-
|
|
27025
|
-
|
|
27026
|
-
|
|
27027
|
-
|
|
27028
|
-
|
|
27029
|
-
|
|
27030
|
-
} finally {
|
|
27031
|
-
await this.endLoading();
|
|
27032
|
-
}
|
|
27033
|
-
if (parentNode) {
|
|
27034
|
-
parentNode.children = nodes;
|
|
27035
|
-
} else {
|
|
27036
|
-
this.state.rootNodes = nodes;
|
|
27437
|
+
convertMultipleLanguages() {
|
|
27438
|
+
const convertColumnCaption = (columns) => {
|
|
27439
|
+
columns.forEach((column) => {
|
|
27440
|
+
if (column.capLanguageRes && column.capLanguageRes.lanResTag) {
|
|
27441
|
+
column.caption = ibiz.i18n.t(
|
|
27442
|
+
column.capLanguageRes.lanResTag,
|
|
27443
|
+
column.caption
|
|
27444
|
+
);
|
|
27445
|
+
}
|
|
27446
|
+
});
|
|
27447
|
+
};
|
|
27448
|
+
if (this.model.detreeColumns && this.model.detreeColumns.length > 0) {
|
|
27449
|
+
convertColumnCaption(this.model.detreeColumns);
|
|
27037
27450
|
}
|
|
27038
|
-
|
|
27039
|
-
|
|
27040
|
-
|
|
27041
|
-
|
|
27042
|
-
|
|
27043
|
-
|
|
27451
|
+
}
|
|
27452
|
+
};
|
|
27453
|
+
|
|
27454
|
+
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.ts
|
|
27455
|
+
var TreeGridExColumnController = class {
|
|
27456
|
+
/**
|
|
27457
|
+
* Creates an instance of GridFieldColumnController.
|
|
27458
|
+
* @author lxm
|
|
27459
|
+
* @date 2022-08-24 20:08:22
|
|
27460
|
+
* @param {T} model
|
|
27461
|
+
*/
|
|
27462
|
+
constructor(model, treeGrid) {
|
|
27463
|
+
/**
|
|
27464
|
+
* 是否是自适应列
|
|
27465
|
+
* @author lxm
|
|
27466
|
+
* @date 2023-07-07 11:20:16
|
|
27467
|
+
* @type {boolean}
|
|
27468
|
+
*/
|
|
27469
|
+
this.isAdaptiveColumn = false;
|
|
27470
|
+
/**
|
|
27471
|
+
* 是否是脚本代码
|
|
27472
|
+
* @return {*}
|
|
27473
|
+
* @author: zhujiamin
|
|
27474
|
+
* @Date: 2023-08-15 10:51:25
|
|
27475
|
+
*/
|
|
27476
|
+
this.isCustomCode = false;
|
|
27477
|
+
this.model = model;
|
|
27478
|
+
this.treeGrid = treeGrid;
|
|
27479
|
+
this.isAdaptiveColumn = model.widthUnit === "STAR";
|
|
27480
|
+
}
|
|
27481
|
+
/**
|
|
27482
|
+
* 上下文
|
|
27483
|
+
*
|
|
27484
|
+
* @author lxm
|
|
27485
|
+
* @date 2022-09-05 19:09:24
|
|
27486
|
+
* @readonly
|
|
27487
|
+
* @type {IContext}
|
|
27488
|
+
*/
|
|
27489
|
+
get context() {
|
|
27490
|
+
return this.treeGrid.context;
|
|
27491
|
+
}
|
|
27492
|
+
/**
|
|
27493
|
+
* 视图参数
|
|
27494
|
+
*
|
|
27495
|
+
* @author lxm
|
|
27496
|
+
* @date 2022-09-05 19:09:00
|
|
27497
|
+
* @readonly
|
|
27498
|
+
* @type {IParams}
|
|
27499
|
+
*/
|
|
27500
|
+
get params() {
|
|
27501
|
+
return this.treeGrid.params;
|
|
27502
|
+
}
|
|
27503
|
+
/**
|
|
27504
|
+
* 是否是第一个显示的树表格列
|
|
27505
|
+
* @author lxm
|
|
27506
|
+
* @date 2023-12-22 03:28:10
|
|
27507
|
+
* @readonly
|
|
27508
|
+
* @type {boolean}
|
|
27509
|
+
*/
|
|
27510
|
+
get isFirstShowColumn() {
|
|
27511
|
+
const firstColumn = this.treeGrid.state.columnStates.find(
|
|
27512
|
+
(item) => !item.hidden
|
|
27044
27513
|
);
|
|
27045
|
-
return
|
|
27514
|
+
return (firstColumn == null ? void 0 : firstColumn.key) === this.model.codeName;
|
|
27046
27515
|
}
|
|
27047
27516
|
/**
|
|
27048
|
-
*
|
|
27517
|
+
* 子类不可覆盖或重写此方法,在 init 时需要重写的使用 onInit 方法。
|
|
27049
27518
|
*
|
|
27050
|
-
* @author
|
|
27051
|
-
* @date
|
|
27052
|
-
* @
|
|
27053
|
-
* @return {*} {string[]}
|
|
27054
|
-
* @memberof TreeGridExController
|
|
27519
|
+
* @author lxm
|
|
27520
|
+
* @date 2022-08-18 22:08:30
|
|
27521
|
+
* @returns {*} {Promise<void>}
|
|
27055
27522
|
*/
|
|
27056
|
-
|
|
27057
|
-
|
|
27058
|
-
|
|
27059
|
-
|
|
27060
|
-
|
|
27061
|
-
|
|
27523
|
+
async init() {
|
|
27524
|
+
await this.onInit();
|
|
27525
|
+
}
|
|
27526
|
+
/**
|
|
27527
|
+
* 初始化方法
|
|
27528
|
+
*
|
|
27529
|
+
* @author lxm
|
|
27530
|
+
* @date 2022-09-28 15:09:15
|
|
27531
|
+
* @protected
|
|
27532
|
+
* @returns {*} {Promise<void>}
|
|
27533
|
+
*/
|
|
27534
|
+
async onInit() {
|
|
27535
|
+
}
|
|
27536
|
+
};
|
|
27537
|
+
|
|
27538
|
+
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.ts
|
|
27539
|
+
var TreeGridExFieldColumnController = class extends TreeGridExColumnController {
|
|
27540
|
+
};
|
|
27541
|
+
|
|
27542
|
+
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts
|
|
27543
|
+
import { RuntimeModelError as RuntimeModelError63 } from "@ibiz-template/core";
|
|
27544
|
+
var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
27545
|
+
/**
|
|
27546
|
+
* 给rowController初始化操作列的状态
|
|
27547
|
+
*
|
|
27548
|
+
* @author lxm
|
|
27549
|
+
* @date 2022-09-07 21:09:43
|
|
27550
|
+
* @param {ITreeGridExRowState} row
|
|
27551
|
+
*/
|
|
27552
|
+
initActionStates(row) {
|
|
27553
|
+
var _a;
|
|
27554
|
+
const { deuiactionGroup } = this.model;
|
|
27555
|
+
if (!deuiactionGroup) {
|
|
27556
|
+
throw new RuntimeModelError63(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
27557
|
+
}
|
|
27558
|
+
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
27559
|
+
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
27560
|
+
return;
|
|
27561
|
+
}
|
|
27562
|
+
const containerState = new ButtonContainerState();
|
|
27563
|
+
deuiactionGroup.uiactionGroupDetails.forEach((detail) => {
|
|
27564
|
+
const actionid = detail.uiactionId;
|
|
27565
|
+
if (actionid) {
|
|
27566
|
+
const buttonState = new UIActionButtonState(
|
|
27567
|
+
detail.id,
|
|
27568
|
+
this.treeGrid.context.srfappid,
|
|
27569
|
+
actionid
|
|
27570
|
+
);
|
|
27571
|
+
containerState.addState(detail.id, buttonState);
|
|
27062
27572
|
}
|
|
27063
27573
|
});
|
|
27064
|
-
|
|
27065
|
-
|
|
27066
|
-
|
|
27067
|
-
|
|
27068
|
-
|
|
27574
|
+
row.uaColStates[this.model.codeName] = containerState;
|
|
27575
|
+
}
|
|
27576
|
+
/**
|
|
27577
|
+
* 触发操作列点击事件
|
|
27578
|
+
*
|
|
27579
|
+
* @author lxm
|
|
27580
|
+
* @date 2022-09-07 22:09:46
|
|
27581
|
+
* @param {IPSUIActionGroupDetail} detail
|
|
27582
|
+
* @param {MouseEvent} event
|
|
27583
|
+
*/
|
|
27584
|
+
async onActionClick(detail, row, event) {
|
|
27585
|
+
const actionId = detail.uiactionId;
|
|
27586
|
+
await UIActionUtil.execAndResolved(
|
|
27587
|
+
actionId,
|
|
27588
|
+
{
|
|
27589
|
+
context: this.context,
|
|
27590
|
+
params: this.params,
|
|
27591
|
+
data: [row.data],
|
|
27592
|
+
view: this.treeGrid.view,
|
|
27593
|
+
event
|
|
27594
|
+
},
|
|
27595
|
+
detail.appId
|
|
27596
|
+
);
|
|
27069
27597
|
}
|
|
27070
27598
|
};
|
|
27071
27599
|
|
|
@@ -27079,7 +27607,7 @@ var TreeGridService = class extends GridService {
|
|
|
27079
27607
|
|
|
27080
27608
|
// src/controller/control/medit-view-panel/medit-view-panel.controller.ts
|
|
27081
27609
|
import { RuntimeError as RuntimeError58 } from "@ibiz-template/core";
|
|
27082
|
-
import { createUUID as
|
|
27610
|
+
import { createUUID as createUUID13 } from "qx-util";
|
|
27083
27611
|
|
|
27084
27612
|
// src/controller/control/medit-view-panel/medit-view-panel.service.ts
|
|
27085
27613
|
var MEditViewPanelService = class extends MDControlService {
|
|
@@ -27166,7 +27694,7 @@ var MEditViewPanelController = class extends MDControlController {
|
|
|
27166
27694
|
*/
|
|
27167
27695
|
handlePanelItemParams(arg) {
|
|
27168
27696
|
const [{ parameterName }] = this.parameters;
|
|
27169
|
-
const id = arg[parameterName] ? arg[parameterName] : "mockId:".concat(
|
|
27697
|
+
const id = arg[parameterName] ? arg[parameterName] : "mockId:".concat(createUUID13());
|
|
27170
27698
|
const item = {
|
|
27171
27699
|
id,
|
|
27172
27700
|
context: this.context.clone(),
|
|
@@ -27318,7 +27846,7 @@ var MapService = class extends MDControlService {
|
|
|
27318
27846
|
* 加载所有地图项的数据
|
|
27319
27847
|
* @author lxm
|
|
27320
27848
|
* @date 2023-10-30 06:27:32
|
|
27321
|
-
* @param {
|
|
27849
|
+
* @param {IContext} context
|
|
27322
27850
|
* @param {IParams} [params={}]
|
|
27323
27851
|
* @return {*} {Promise<IHttpResponse<IMapData[]>>}
|
|
27324
27852
|
*/
|
|
@@ -27499,7 +28027,7 @@ var ReportPanelService = class extends ControlService {
|
|
|
27499
28027
|
/**
|
|
27500
28028
|
* 执行查询报表数据的方法
|
|
27501
28029
|
*
|
|
27502
|
-
* @param {
|
|
28030
|
+
* @param {IContext} context 上下文
|
|
27503
28031
|
* @param {IParams} [params={}] 视图参数
|
|
27504
28032
|
* @returns {*} {Promise<IHttpResponse>}
|
|
27505
28033
|
*/
|
|
@@ -28851,6 +29379,19 @@ var AppHub = class {
|
|
|
28851
29379
|
}
|
|
28852
29380
|
return this.appMap.get(key);
|
|
28853
29381
|
}
|
|
29382
|
+
/**
|
|
29383
|
+
* 获取所有应用实例
|
|
29384
|
+
*
|
|
29385
|
+
* @author chitanda
|
|
29386
|
+
* @date 2023-12-22 16:12:28
|
|
29387
|
+
* @return {*} {IAppService[]}
|
|
29388
|
+
*/
|
|
29389
|
+
getAllApps() {
|
|
29390
|
+
if (this.appMap.size > 0) {
|
|
29391
|
+
return Array.from(this.appMap.values());
|
|
29392
|
+
}
|
|
29393
|
+
return [];
|
|
29394
|
+
}
|
|
28854
29395
|
};
|
|
28855
29396
|
|
|
28856
29397
|
// src/engine/engine-factory.ts
|
|
@@ -29112,7 +29653,7 @@ var ViewEngineBase = class {
|
|
|
29112
29653
|
};
|
|
29113
29654
|
|
|
29114
29655
|
// src/engine/md-view.engine.ts
|
|
29115
|
-
import { RuntimeModelError as
|
|
29656
|
+
import { RuntimeModelError as RuntimeModelError64 } from "@ibiz-template/core";
|
|
29116
29657
|
import { clone as clone24 } from "ramda";
|
|
29117
29658
|
var MDViewEngine = class extends ViewEngineBase {
|
|
29118
29659
|
/**
|
|
@@ -29296,7 +29837,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
29296
29837
|
view: this.view
|
|
29297
29838
|
}));
|
|
29298
29839
|
if (result === -1) {
|
|
29299
|
-
throw new
|
|
29840
|
+
throw new RuntimeModelError64(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
29300
29841
|
} else {
|
|
29301
29842
|
return {
|
|
29302
29843
|
cancel: !result.ok
|
|
@@ -29319,7 +29860,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
29319
29860
|
(item) => item.id === "newdata"
|
|
29320
29861
|
);
|
|
29321
29862
|
if (!openAppViewLogic) {
|
|
29322
|
-
throw new
|
|
29863
|
+
throw new RuntimeModelError64(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
29323
29864
|
}
|
|
29324
29865
|
const params = clone24(this.view.params);
|
|
29325
29866
|
if (copyMode) {
|
|
@@ -29333,7 +29874,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
29333
29874
|
view: this.view
|
|
29334
29875
|
}));
|
|
29335
29876
|
if (result === -1) {
|
|
29336
|
-
throw new
|
|
29877
|
+
throw new RuntimeModelError64(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
29337
29878
|
} else {
|
|
29338
29879
|
return {
|
|
29339
29880
|
cancel: !result.ok
|
|
@@ -29452,7 +29993,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
29452
29993
|
|
|
29453
29994
|
// src/utils/error-handler/default-error-handler.ts
|
|
29454
29995
|
import {
|
|
29455
|
-
RuntimeModelError as
|
|
29996
|
+
RuntimeModelError as RuntimeModelError65,
|
|
29456
29997
|
ModelError as ModelError31,
|
|
29457
29998
|
HttpError as HttpError5,
|
|
29458
29999
|
NoticeError as NoticeError2,
|
|
@@ -29460,7 +30001,7 @@ import {
|
|
|
29460
30001
|
} from "@ibiz-template/core";
|
|
29461
30002
|
var DefaultErrorHandler = class {
|
|
29462
30003
|
handle(error) {
|
|
29463
|
-
if (error instanceof
|
|
30004
|
+
if (error instanceof RuntimeModelError65 || error instanceof ModelError31) {
|
|
29464
30005
|
ibiz.message.error(error.message, 10, true);
|
|
29465
30006
|
} else if (error instanceof HttpError5) {
|
|
29466
30007
|
if (error.status === 401) {
|
|
@@ -29728,13 +30269,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
29728
30269
|
};
|
|
29729
30270
|
|
|
29730
30271
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
29731
|
-
import { RuntimeModelError as
|
|
30272
|
+
import { RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
|
|
29732
30273
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
29733
30274
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29734
30275
|
execute(executeParams) {
|
|
29735
30276
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
29736
30277
|
if (!appDEUILogicId) {
|
|
29737
|
-
throw new
|
|
30278
|
+
throw new RuntimeModelError66(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
29738
30279
|
}
|
|
29739
30280
|
execUILogic(appDEUILogicId, appDataEntityId, executeParams);
|
|
29740
30281
|
}
|
|
@@ -30192,7 +30733,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
30192
30733
|
};
|
|
30193
30734
|
|
|
30194
30735
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
30195
|
-
import { RuntimeError as RuntimeError65, RuntimeModelError as
|
|
30736
|
+
import { RuntimeError as RuntimeError65, RuntimeModelError as RuntimeModelError67 } from "@ibiz-template/core";
|
|
30196
30737
|
var TimerTrigger = class extends LogicTrigger {
|
|
30197
30738
|
constructor() {
|
|
30198
30739
|
super(...arguments);
|
|
@@ -30200,7 +30741,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
30200
30741
|
}
|
|
30201
30742
|
start() {
|
|
30202
30743
|
if (!this.logic.timer) {
|
|
30203
|
-
throw new
|
|
30744
|
+
throw new RuntimeModelError67(this.logic, "\u5B9A\u65F6\u5668\u7F3A\u5C11\u5B9A\u65F6\u95F4\u9694");
|
|
30204
30745
|
}
|
|
30205
30746
|
this.timer = setInterval(() => {
|
|
30206
30747
|
if (!this.scheduler.defaultParamsCb) {
|
|
@@ -30222,7 +30763,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
30222
30763
|
import {
|
|
30223
30764
|
ModelError as ModelError34,
|
|
30224
30765
|
RuntimeError as RuntimeError66,
|
|
30225
|
-
RuntimeModelError as
|
|
30766
|
+
RuntimeModelError as RuntimeModelError68
|
|
30226
30767
|
} from "@ibiz-template/core";
|
|
30227
30768
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
30228
30769
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
@@ -30268,7 +30809,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30268
30809
|
} else {
|
|
30269
30810
|
openViewRef = appUILogic.openDataAppView;
|
|
30270
30811
|
if (!openViewRef) {
|
|
30271
|
-
throw new
|
|
30812
|
+
throw new RuntimeModelError68(
|
|
30272
30813
|
appUILogic,
|
|
30273
30814
|
"opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
|
|
30274
30815
|
);
|
|
@@ -30276,7 +30817,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30276
30817
|
}
|
|
30277
30818
|
const openView = openViewRef.refAppViewId;
|
|
30278
30819
|
if (!openView) {
|
|
30279
|
-
throw new
|
|
30820
|
+
throw new RuntimeModelError68(
|
|
30280
30821
|
appUILogic,
|
|
30281
30822
|
"opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
|
|
30282
30823
|
);
|
|
@@ -30306,7 +30847,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30306
30847
|
);
|
|
30307
30848
|
const typeFileName = appDataEntity.formTypeAppDEFieldId || appDataEntity.dataTypeAppDEFieldId;
|
|
30308
30849
|
if (!typeFileName) {
|
|
30309
|
-
throw new
|
|
30850
|
+
throw new RuntimeModelError68(
|
|
30310
30851
|
appUILogic,
|
|
30311
30852
|
"".concat(appDataEntity.codeName, "[\u591A\u8868\u5355\u5B9E\u4F53] or [\u7D22\u5F15\u5B9E\u4F53]\u7F3A\u5C11\u7C7B\u578B\u5C5E\u6027\u914D\u7F6E")
|
|
30312
30853
|
);
|
|
@@ -30314,7 +30855,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30314
30855
|
const { data } = parameters;
|
|
30315
30856
|
const formTypeValue = data[0][typeFileName];
|
|
30316
30857
|
if (!formTypeValue) {
|
|
30317
|
-
throw new
|
|
30858
|
+
throw new RuntimeModelError68(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
|
|
30318
30859
|
}
|
|
30319
30860
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
30320
30861
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
@@ -30356,7 +30897,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30356
30897
|
return viewRef.refMode.toLowerCase() !== parentDeName;
|
|
30357
30898
|
});
|
|
30358
30899
|
if (!newViewRef) {
|
|
30359
|
-
throw new
|
|
30900
|
+
throw new RuntimeModelError68(
|
|
30360
30901
|
appUILogic,
|
|
30361
30902
|
"\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE"
|
|
30362
30903
|
);
|
|
@@ -30366,7 +30907,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30366
30907
|
} else {
|
|
30367
30908
|
newViewRef = newDataAppView;
|
|
30368
30909
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
30369
|
-
throw new
|
|
30910
|
+
throw new RuntimeModelError68(
|
|
30370
30911
|
appUILogic,
|
|
30371
30912
|
"newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
|
|
30372
30913
|
);
|
|
@@ -30424,7 +30965,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30424
30965
|
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
30425
30966
|
const { context, params, ...rest } = parameters;
|
|
30426
30967
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
30427
|
-
throw new
|
|
30968
|
+
throw new RuntimeModelError68(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
|
|
30428
30969
|
}
|
|
30429
30970
|
const result = await ibiz.commands.execute(
|
|
30430
30971
|
OpenAppViewCommand.TAG,
|
|
@@ -30475,7 +31016,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
30475
31016
|
const minorDERs = selfDe.minorAppDERSs;
|
|
30476
31017
|
const pickParentDeName = newViewRef.refMode.toLowerCase();
|
|
30477
31018
|
if (!minorDERs) {
|
|
30478
|
-
throw new
|
|
31019
|
+
throw new RuntimeModelError68(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
|
|
30479
31020
|
}
|
|
30480
31021
|
let pickParentFieldName;
|
|
30481
31022
|
minorDERs == null ? void 0 : minorDERs.forEach((item) => {
|
|
@@ -30574,12 +31115,12 @@ var ControlEventTrigger = class extends LogicTrigger {
|
|
|
30574
31115
|
};
|
|
30575
31116
|
|
|
30576
31117
|
// src/logic-scheduler/executor/app-ui-action-executor.ts
|
|
30577
|
-
import { RuntimeModelError as
|
|
31118
|
+
import { RuntimeModelError as RuntimeModelError69 } from "@ibiz-template/core";
|
|
30578
31119
|
var AppDEUIActionExecutor = class extends LogicExecutor {
|
|
30579
31120
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30580
31121
|
execute(executeParams) {
|
|
30581
31122
|
if (!this.logic.appDEUIActionId) {
|
|
30582
|
-
throw new
|
|
31123
|
+
throw new RuntimeModelError69(
|
|
30583
31124
|
this.logic,
|
|
30584
31125
|
"\u903B\u8F91\u4E2D\u7F3A\u5C11\u89E6\u53D1\u5E94\u7528\u5B9E\u4F53\u754C\u9762\u884C\u4E3Aid"
|
|
30585
31126
|
);
|
|
@@ -30655,6 +31196,7 @@ function install2() {
|
|
|
30655
31196
|
ibiz2.auth = new V7AuthService();
|
|
30656
31197
|
ibiz2.asyncAction = new AsyncActionService();
|
|
30657
31198
|
ibiz2.engine = new EngineFactory();
|
|
31199
|
+
ibiz2.uiDomainManager = new UIDomainManager();
|
|
30658
31200
|
installCommand();
|
|
30659
31201
|
presetUIActionProvider();
|
|
30660
31202
|
presetDEMethodProvider();
|
|
@@ -30919,6 +31461,7 @@ export {
|
|
|
30919
31461
|
StudioViewEvents,
|
|
30920
31462
|
SysUIActionProvider,
|
|
30921
31463
|
SysUIActionTag,
|
|
31464
|
+
TREEGRIDEX_COLUMN_PROVIDER_PREFIX,
|
|
30922
31465
|
TabExpPanelController,
|
|
30923
31466
|
TextUtil,
|
|
30924
31467
|
ThemeUtil,
|
|
@@ -30928,8 +31471,12 @@ export {
|
|
|
30928
31471
|
TreeDataSetNodeData,
|
|
30929
31472
|
TreeExpBarController,
|
|
30930
31473
|
TreeGridController,
|
|
31474
|
+
TreeGridExColumnController,
|
|
30931
31475
|
TreeGridExController,
|
|
31476
|
+
TreeGridExFieldColumnController,
|
|
31477
|
+
TreeGridExRowState,
|
|
30932
31478
|
TreeGridExService,
|
|
31479
|
+
TreeGridExUAColumnController,
|
|
30933
31480
|
TreeGridService,
|
|
30934
31481
|
TreeNodeData,
|
|
30935
31482
|
TreeService,
|
|
@@ -30938,6 +31485,8 @@ export {
|
|
|
30938
31485
|
UIActionButtonState,
|
|
30939
31486
|
UIActionProviderBase,
|
|
30940
31487
|
UIActionUtil,
|
|
31488
|
+
UIDomain,
|
|
31489
|
+
UIDomainManager,
|
|
30941
31490
|
UILOGINNODE_PROVIDER_PREFIX,
|
|
30942
31491
|
UIMapField,
|
|
30943
31492
|
V7AuthService,
|
|
@@ -31011,6 +31560,7 @@ export {
|
|
|
31011
31560
|
getPlatformType,
|
|
31012
31561
|
getPortletProvider,
|
|
31013
31562
|
getRootNode,
|
|
31563
|
+
getTreeGridExColumnProvider,
|
|
31014
31564
|
getTreeNode,
|
|
31015
31565
|
getUIActionById,
|
|
31016
31566
|
getUIActionItemsByActionLevel,
|
|
@@ -31046,6 +31596,7 @@ export {
|
|
|
31046
31596
|
registerPanelItemProvider,
|
|
31047
31597
|
registerPlatformProvider,
|
|
31048
31598
|
registerPortletProvider,
|
|
31599
|
+
registerTreeGridExColumnProvider,
|
|
31049
31600
|
registerUIActionProvider,
|
|
31050
31601
|
registerUILogicNodeProvider,
|
|
31051
31602
|
registerViewProvider,
|