@ibiz-template/runtime 0.5.3-beta.1 → 0.5.3-beta.11
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 +1870 -553
- package/dist/index.system.min.js +1 -1
- package/out/app-hub.d.ts +12 -2
- package/out/app-hub.d.ts.map +1 -1
- package/out/app-hub.js +22 -2
- package/out/application.js +1 -1
- package/out/command/app/open-app-view/open-app-view.d.ts.map +1 -1
- package/out/command/app/open-app-view/open-app-view.js +8 -1
- package/out/controller/common/editor/editor.controller.d.ts +24 -0
- package/out/controller/common/editor/editor.controller.d.ts.map +1 -1
- package/out/controller/common/editor/editor.controller.js +50 -0
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +5 -2
- package/out/controller/constant/control/index.d.ts +1 -0
- package/out/controller/constant/control/index.d.ts.map +1 -1
- package/out/controller/constant/control/index.js +1 -0
- package/out/controller/constant/control/tree-grid-ex/tree-grid-ex-notify.state.d.ts +5 -0
- package/out/controller/constant/control/tree-grid-ex/tree-grid-ex-notify.state.d.ts.map +1 -0
- package/out/controller/constant/control/tree-grid-ex/tree-grid-ex-notify.state.js +6 -0
- package/out/controller/control/chart/chart.controller.js +1 -1
- package/out/controller/control/form/edit-form/edit-form.controller.js +1 -1
- package/out/controller/control/form/form/form.controller.d.ts.map +1 -1
- package/out/controller/control/form/form/form.controller.js +4 -1
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.js +4 -0
- package/out/controller/control/form/form-detail/form-tab-page/form-tab-page.controller.d.ts +8 -0
- package/out/controller/control/form/form-detail/form-tab-page/form-tab-page.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-tab-page/form-tab-page.controller.js +10 -0
- package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.controller.d.ts +8 -0
- package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.controller.js +15 -0
- package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.state.d.ts +7 -0
- package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.state.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.state.js +10 -0
- package/out/controller/control/grid/grid/grid.service.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.service.js +1 -10
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts +7 -0
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.js +11 -2
- package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.d.ts +0 -7
- package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.js +0 -9
- package/out/controller/control/tree/tree.controller.d.ts +17 -0
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +22 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/index.d.ts +1 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/index.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/index.js +1 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.d.ts +10 -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 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.js +12 -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 +34 -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 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.js +68 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.d.ts +205 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-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-node-column.controller.js +345 -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 +3 -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 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.js +14 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-row.state.d.ts +16 -8
- package/out/controller/control/tree-grid-ex/tree-grid-ex-row.state.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-row.state.js +26 -12
- package/out/controller/control/tree-grid-ex/tree-grid-ex.controller.d.ts +59 -0
- 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 +240 -1
- package/out/controller/utils/jsonschema/entity.d.ts.map +1 -1
- package/out/controller/utils/jsonschema/entity.js +4 -1
- package/out/de-logic/utils/handle-src-val.d.ts +15 -0
- package/out/de-logic/utils/handle-src-val.d.ts.map +1 -1
- package/out/de-logic/utils/handle-src-val.js +10 -1
- package/out/global/global-util/global-util.d.ts +8 -1
- package/out/global/global-util/global-util.d.ts.map +1 -1
- package/out/global/global-util/global-util.js +8 -1
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts +4 -3
- package/out/interface/common/i-app-hub-service/i-app-hub-service.d.ts.map +1 -1
- package/out/interface/controller/common/i-icon/i-icon.d.ts +1 -0
- package/out/interface/controller/common/i-icon/i-icon.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-tree-grid-ex.controller.d.ts +23 -1
- package/out/interface/controller/controller/control/i-tree-grid-ex.controller.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-tree-grid-ex.event.d.ts +17 -0
- package/out/interface/controller/event/control/i-tree-grid-ex.event.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-drbar.state.d.ts +7 -0
- package/out/interface/controller/state/control/i-drbar.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-drtab.state.d.ts +7 -0
- package/out/interface/controller/state/control/i-drtab.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-tree-grid-ex.state.d.ts +60 -2
- package/out/interface/controller/state/control/i-tree-grid-ex.state.d.ts.map +1 -1
- package/out/interface/provider/i-async-action.provider.d.ts +3 -2
- package/out/interface/provider/i-async-action.provider.d.ts.map +1 -1
- package/out/interface/service/i-transaction/i-transaction.d.ts +83 -0
- package/out/interface/service/i-transaction/i-transaction.d.ts.map +1 -0
- package/out/interface/service/i-transaction/i-transaction.js +1 -0
- package/out/interface/service/index.d.ts +1 -0
- package/out/interface/service/index.d.ts.map +1 -1
- package/out/interface/service/service/i-app-de.service.d.ts +9 -3
- package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
- package/out/interface/util/i-view-stack/i-view-stack.d.ts +53 -0
- package/out/interface/util/i-view-stack/i-view-stack.d.ts.map +1 -0
- package/out/interface/util/i-view-stack/i-view-stack.js +1 -0
- package/out/interface/util/index.d.ts +1 -0
- package/out/interface/util/index.d.ts.map +1 -1
- package/out/plugin/index.d.ts +1 -1
- package/out/plugin/index.d.ts.map +1 -1
- package/out/plugin/remote-plugin-item/remote-plugin-item.d.ts +46 -0
- package/out/plugin/remote-plugin-item/remote-plugin-item.d.ts.map +1 -1
- package/out/register/helper/app-menu-item-register.d.ts.map +1 -1
- package/out/register/helper/app-menu-item-register.js +1 -6
- package/out/register/helper/panel-item-register.d.ts.map +1 -1
- package/out/register/helper/panel-item-register.js +36 -30
- package/out/service/dto/method.dto.d.ts +1 -12
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +8 -20
- package/out/service/mqtt/mqtt.service.js +2 -2
- package/out/service/service/auth/v7-auth.service.d.ts +1 -2
- package/out/service/service/auth/v7-auth.service.d.ts.map +1 -1
- package/out/service/service/auth/v7-auth.service.js +29 -7
- package/out/service/service/entity/de.service.d.ts +1 -2
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +5 -2
- package/out/service/service/entity/method/de-action.d.ts +13 -1
- package/out/service/service/entity/method/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +167 -59
- package/out/service/service/entity/method/fetch.d.ts.map +1 -1
- package/out/service/service/entity/method/fetch.js +24 -21
- package/out/service/service/entity/method/method-renturn.d.ts.map +1 -1
- package/out/service/service/entity/method/method-renturn.js +6 -0
- package/out/service/utils/de-cache/de-cache.d.ts +11 -1
- package/out/service/utils/de-cache/de-cache.d.ts.map +1 -1
- package/out/service/utils/de-cache/de-cache.js +122 -18
- package/out/service/utils/de-dq-cond/ps-model-cond-engine-base.d.ts.map +1 -1
- package/out/service/utils/de-dq-cond/ps-model-cond-engine-base.js +4 -0
- package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts +1 -1
- 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 +34 -27
- package/out/service/utils/res-path/res-path.d.ts +2 -2
- package/out/service/utils/res-path/res-path.d.ts.map +1 -1
- package/out/service/utils/res-path/res-path.js +1 -1
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts +6 -0
- 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 +93 -41
- 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 +3 -0
- package/out/ui-action/provider/front-ui-action-provider.d.ts +1 -1
- package/out/ui-action/provider/front-ui-action-provider.d.ts.map +1 -1
- package/out/ui-action/provider/front-ui-action-provider.js +5 -1
- package/out/ui-logic/ui-logic-node/debug-param-node/debug-param-node.js +1 -1
- package/out/ui-logic/ui-logic-node/raw-js-code-node/raw-js-code-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/raw-js-code-node/raw-js-code-node.js +0 -1
- package/out/utils/index.d.ts +1 -0
- package/out/utils/index.d.ts.map +1 -1
- package/out/utils/index.js +1 -0
- package/out/utils/script/script-function.js +1 -1
- package/out/utils/ui-domain/transaction.d.ts +66 -0
- package/out/utils/ui-domain/transaction.d.ts.map +1 -0
- package/out/utils/ui-domain/transaction.js +94 -0
- package/out/utils/ui-domain/ui-domain.d.ts +50 -6
- package/out/utils/ui-domain/ui-domain.d.ts.map +1 -1
- package/out/utils/ui-domain/ui-domain.js +68 -9
- package/out/utils/view-stack/view-stack.d.ts +29 -0
- package/out/utils/view-stack/view-stack.d.ts.map +1 -0
- package/out/utils/view-stack/view-stack.js +47 -0
- package/package.json +5 -5
- package/src/app-hub.ts +27 -2
- package/src/application.ts +1 -1
- package/src/command/app/open-app-view/open-app-view.ts +8 -1
- package/src/controller/common/editor/editor.controller.ts +54 -0
- package/src/controller/common/view/view.controller.ts +7 -2
- package/src/controller/constant/control/index.ts +1 -0
- package/src/controller/constant/control/tree-grid-ex/tree-grid-ex-notify.state.ts +5 -0
- package/src/controller/control/chart/chart.controller.ts +1 -1
- package/src/controller/control/form/edit-form/edit-form.controller.ts +1 -1
- package/src/controller/control/form/form/form.controller.ts +11 -1
- package/src/controller/control/form/form-detail/form-detail/form-detail.controller.ts +4 -0
- package/src/controller/control/form/form-detail/form-tab-page/form-tab-page.controller.ts +14 -0
- package/src/controller/control/form/form-detail/form-tab-panel/form-tab-panel.controller.ts +16 -0
- package/src/controller/control/form/form-detail/form-tab-panel/form-tab-panel.state.ts +9 -1
- package/src/controller/control/grid/grid/grid.service.ts +1 -11
- package/src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts +12 -2
- package/src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts +0 -10
- package/src/controller/control/tree/tree.controller.ts +35 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/index.ts +1 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.ts +22 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.ts +88 -2
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.ts +522 -0
- package/src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts +18 -1
- package/src/controller/control/tree-grid-ex/tree-grid-ex-row.state.ts +43 -12
- package/src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts +305 -2
- package/src/controller/utils/jsonschema/entity.ts +4 -1
- package/src/de-logic/utils/handle-src-val.ts +29 -1
- package/src/global/global-util/global-util.ts +9 -0
- package/src/interface/common/i-app-hub-service/i-app-hub-service.ts +4 -3
- package/src/interface/controller/common/i-icon/i-icon.ts +1 -0
- package/src/interface/controller/controller/control/i-tree-grid-ex.controller.ts +27 -2
- package/src/interface/controller/event/control/i-tree-grid-ex.event.ts +15 -1
- package/src/interface/controller/state/control/i-drbar.state.ts +8 -0
- package/src/interface/controller/state/control/i-drtab.state.ts +8 -0
- package/src/interface/controller/state/control/i-tree-grid-ex.state.ts +64 -2
- package/src/interface/provider/i-async-action.provider.ts +3 -2
- package/src/interface/service/i-transaction/i-transaction.ts +88 -0
- package/src/interface/service/index.ts +4 -0
- package/src/interface/service/service/i-app-de.service.ts +10 -3
- package/src/interface/util/i-view-stack/i-view-stack.ts +53 -0
- package/src/interface/util/index.ts +1 -0
- package/src/plugin/index.ts +4 -1
- package/src/plugin/remote-plugin-item/remote-plugin-item.ts +43 -0
- package/src/register/helper/app-menu-item-register.ts +1 -5
- package/src/register/helper/panel-item-register.ts +43 -37
- package/src/service/dto/method.dto.ts +7 -20
- package/src/service/mqtt/mqtt.service.ts +2 -2
- package/src/service/service/auth/v7-auth.service.ts +39 -19
- package/src/service/service/entity/de.service.ts +7 -9
- package/src/service/service/entity/method/de-action.ts +186 -64
- package/src/service/service/entity/method/fetch.ts +28 -29
- package/src/service/service/entity/method/method-renturn.ts +6 -0
- package/src/service/utils/de-cache/de-cache.ts +128 -19
- package/src/service/utils/de-dq-cond/ps-model-cond-engine-base.ts +4 -0
- package/src/service/utils/dynamic-code-list/dynamic-code-list.ts +35 -32
- package/src/service/utils/res-path/res-path.ts +2 -2
- package/src/service/vo/tree-node-data/tree-data-set-node-data.ts +111 -46
- package/src/service/vo/tree-node-data/tree-node-data.ts +3 -0
- package/src/ui-action/provider/front-ui-action-provider.ts +10 -1
- package/src/ui-logic/ui-logic-node/debug-param-node/debug-param-node.ts +1 -1
- package/src/ui-logic/ui-logic-node/raw-js-code-node/raw-js-code-node.ts +0 -1
- package/src/utils/index.ts +1 -0
- package/src/utils/script/script-function.ts +1 -1
- package/src/utils/ui-domain/transaction.ts +100 -0
- package/src/utils/ui-domain/ui-domain.ts +73 -9
- package/src/utils/view-stack/view-stack.ts +64 -0
package/dist/index.esm.js
CHANGED
|
@@ -1501,7 +1501,7 @@ var ScriptFunction = class {
|
|
|
1501
1501
|
try {
|
|
1502
1502
|
return fn.apply({}, args);
|
|
1503
1503
|
} catch (error) {
|
|
1504
|
-
|
|
1504
|
+
ibiz.log.error("\u62A5\u9519\u811A\u672C", code);
|
|
1505
1505
|
throw error;
|
|
1506
1506
|
}
|
|
1507
1507
|
};
|
|
@@ -2850,6 +2850,95 @@ var ThemeUtil = class {
|
|
|
2850
2850
|
|
|
2851
2851
|
// src/utils/ui-domain/ui-domain.ts
|
|
2852
2852
|
import { createUUID } from "qx-util";
|
|
2853
|
+
|
|
2854
|
+
// src/utils/ui-domain/transaction.ts
|
|
2855
|
+
var Transaction = class {
|
|
2856
|
+
constructor() {
|
|
2857
|
+
/**
|
|
2858
|
+
* 待提交队列
|
|
2859
|
+
*
|
|
2860
|
+
* @author chitanda
|
|
2861
|
+
* @date 2024-01-17 15:01:38
|
|
2862
|
+
* @protected
|
|
2863
|
+
*/
|
|
2864
|
+
this.commitQueue = /* @__PURE__ */ new Map();
|
|
2865
|
+
/**
|
|
2866
|
+
* 事务状态
|
|
2867
|
+
*
|
|
2868
|
+
* @author chitanda
|
|
2869
|
+
* @date 2024-01-17 15:01:45
|
|
2870
|
+
* @type {ITransactionState}
|
|
2871
|
+
*/
|
|
2872
|
+
this.state = {
|
|
2873
|
+
isOpen: false,
|
|
2874
|
+
isChange: false
|
|
2875
|
+
};
|
|
2876
|
+
}
|
|
2877
|
+
/**
|
|
2878
|
+
* 开启事务
|
|
2879
|
+
*
|
|
2880
|
+
* @description 事务开启后,所有的数据操作都会被缓存,直到事务提交或者回滚
|
|
2881
|
+
* @author chitanda
|
|
2882
|
+
* @date 2024-01-17 15:01:46
|
|
2883
|
+
*/
|
|
2884
|
+
open() {
|
|
2885
|
+
if (this.state.isOpen) {
|
|
2886
|
+
ibiz.log.warn("\u4E8B\u52A1\u5DF2\u7ECF\u5F00\u542F, \u5355\u4E2A\u754C\u9762\u57DF\u53EA\u80FD\u5F00\u542F\u4E00\u4E2A\u4E8B\u52A1");
|
|
2887
|
+
return;
|
|
2888
|
+
}
|
|
2889
|
+
this.state.isOpen = true;
|
|
2890
|
+
}
|
|
2891
|
+
/**
|
|
2892
|
+
* 新增变更事务回调,事务提交时会按照添加顺序倒序执行
|
|
2893
|
+
*
|
|
2894
|
+
* @author chitanda
|
|
2895
|
+
* @date 2024-01-17 16:01:50
|
|
2896
|
+
* @param {string} id 回调标识,用于去重。一个数据只能有一个回调
|
|
2897
|
+
* @param {() => void} commit
|
|
2898
|
+
*/
|
|
2899
|
+
change(id, commit) {
|
|
2900
|
+
this.state.isChange = true;
|
|
2901
|
+
this.commitQueue.set(id, commit);
|
|
2902
|
+
}
|
|
2903
|
+
/**
|
|
2904
|
+
* 提交事务
|
|
2905
|
+
*
|
|
2906
|
+
* @author chitanda
|
|
2907
|
+
* @date 2024-01-17 15:01:05
|
|
2908
|
+
*/
|
|
2909
|
+
commit() {
|
|
2910
|
+
const commitQueue = Array.from(this.commitQueue.values()).reverse();
|
|
2911
|
+
for (const commit of commitQueue) {
|
|
2912
|
+
commit();
|
|
2913
|
+
}
|
|
2914
|
+
this.commitQueue.clear();
|
|
2915
|
+
this.state.isChange = false;
|
|
2916
|
+
}
|
|
2917
|
+
/**
|
|
2918
|
+
* 回滚事务
|
|
2919
|
+
*
|
|
2920
|
+
* @author chitanda
|
|
2921
|
+
* @date 2024-01-17 19:01:43
|
|
2922
|
+
*/
|
|
2923
|
+
rollback() {
|
|
2924
|
+
this.commitQueue.clear();
|
|
2925
|
+
this.state.isChange = false;
|
|
2926
|
+
}
|
|
2927
|
+
/**
|
|
2928
|
+
* 关闭事务
|
|
2929
|
+
*
|
|
2930
|
+
* @author chitanda
|
|
2931
|
+
* @date 2024-01-17 15:01:02
|
|
2932
|
+
*/
|
|
2933
|
+
close() {
|
|
2934
|
+
if (this.state.isChange) {
|
|
2935
|
+
throw new Error("\u5F53\u524D\u4E8B\u52A1\u672A\u63D0\u4EA4\uFF0C\u4E0D\u53EF\u4EE5\u76F4\u63A5\u5173\u95ED\u4E8B\u52A1");
|
|
2936
|
+
}
|
|
2937
|
+
this.state.isOpen = false;
|
|
2938
|
+
}
|
|
2939
|
+
};
|
|
2940
|
+
|
|
2941
|
+
// src/utils/ui-domain/ui-domain.ts
|
|
2853
2942
|
var UIDomain = class {
|
|
2854
2943
|
/**
|
|
2855
2944
|
* Creates an instance of UIDomain.
|
|
@@ -2861,14 +2950,39 @@ var UIDomain = class {
|
|
|
2861
2950
|
*/
|
|
2862
2951
|
constructor(id) {
|
|
2863
2952
|
/**
|
|
2864
|
-
*
|
|
2953
|
+
* 状态
|
|
2954
|
+
*
|
|
2955
|
+
* @author chitanda
|
|
2956
|
+
* @date 2024-01-15 19:01:51
|
|
2957
|
+
* @type {{ rsInit: boolean }} 关系是否已经初始化
|
|
2958
|
+
*/
|
|
2959
|
+
this.state = { rsInit: false };
|
|
2960
|
+
/**
|
|
2961
|
+
* DTO 子父关系映射
|
|
2865
2962
|
*
|
|
2866
2963
|
* @author chitanda
|
|
2867
2964
|
* @date 2023-12-26 15:12:13
|
|
2868
2965
|
* @protected
|
|
2869
|
-
* @type {Map<string, IAppDERS[]>}
|
|
2966
|
+
* @type {Map<string, IAppDERS[]>} Map<子实体, 当前实体的父关系>
|
|
2870
2967
|
*/
|
|
2871
2968
|
this.rsMap = /* @__PURE__ */ new Map();
|
|
2969
|
+
/**
|
|
2970
|
+
* DTO 父子关系映射
|
|
2971
|
+
*
|
|
2972
|
+
* @author chitanda
|
|
2973
|
+
* @date 2024-01-15 17:01:42
|
|
2974
|
+
* @protected
|
|
2975
|
+
* @type {Map<string, IAppDERS[]>}
|
|
2976
|
+
*/
|
|
2977
|
+
this.rs2Map = /* @__PURE__ */ new Map();
|
|
2978
|
+
/**
|
|
2979
|
+
* 当前界面域下唯一事务
|
|
2980
|
+
*
|
|
2981
|
+
* @author chitanda
|
|
2982
|
+
* @date 2024-01-17 15:01:07
|
|
2983
|
+
* @type {Transaction}
|
|
2984
|
+
*/
|
|
2985
|
+
this.transaction = new Transaction();
|
|
2872
2986
|
if (id) {
|
|
2873
2987
|
this.id = id;
|
|
2874
2988
|
} else {
|
|
@@ -2880,26 +2994,59 @@ var UIDomain = class {
|
|
|
2880
2994
|
*
|
|
2881
2995
|
* @author chitanda
|
|
2882
2996
|
* @date 2023-12-26 15:12:31
|
|
2883
|
-
* @param {string}
|
|
2997
|
+
* @param {string} appDataEntityId
|
|
2884
2998
|
* @param {IAppDERS} configs
|
|
2885
2999
|
*/
|
|
2886
|
-
setDERConfig(
|
|
2887
|
-
this.rsMap.set(
|
|
3000
|
+
setDERConfig(appDataEntityId, configs) {
|
|
3001
|
+
this.rsMap.set(appDataEntityId, configs);
|
|
2888
3002
|
}
|
|
2889
3003
|
/**
|
|
2890
3004
|
* 获取当前界面域下,具体实体的关系(在数据加载完成之后才有值)
|
|
2891
3005
|
*
|
|
2892
3006
|
* @author chitanda
|
|
2893
3007
|
* @date 2023-12-26 16:12:07
|
|
2894
|
-
* @param {string}
|
|
3008
|
+
* @param {string} appDataEntityId
|
|
3009
|
+
* @return {*} {IAppDERS[]}
|
|
3010
|
+
*/
|
|
3011
|
+
getDERConfig(appDataEntityId) {
|
|
3012
|
+
if (this.rsMap.has(appDataEntityId)) {
|
|
3013
|
+
return this.rsMap.get(appDataEntityId);
|
|
3014
|
+
}
|
|
3015
|
+
return [];
|
|
3016
|
+
}
|
|
3017
|
+
/**
|
|
3018
|
+
* 查询指定主实体下的所有子实体关系
|
|
3019
|
+
*
|
|
3020
|
+
* @author chitanda
|
|
3021
|
+
* @date 2024-01-17 16:01:21
|
|
3022
|
+
* @param {string} appDataEntityId
|
|
2895
3023
|
* @return {*} {IAppDERS[]}
|
|
2896
3024
|
*/
|
|
2897
|
-
|
|
2898
|
-
if (this.
|
|
2899
|
-
return this.
|
|
3025
|
+
getDERConfigByMajor(appDataEntityId) {
|
|
3026
|
+
if (this.rs2Map.has(appDataEntityId)) {
|
|
3027
|
+
return this.rs2Map.get(appDataEntityId);
|
|
2900
3028
|
}
|
|
2901
3029
|
return [];
|
|
2902
3030
|
}
|
|
3031
|
+
/**
|
|
3032
|
+
* 根据模型给的子实体中的父关系模型,计算每个实体的子关系模型
|
|
3033
|
+
*
|
|
3034
|
+
* @author chitanda
|
|
3035
|
+
* @date 2024-01-15 19:01:49
|
|
3036
|
+
*/
|
|
3037
|
+
calcParentRs() {
|
|
3038
|
+
this.rs2Map.clear();
|
|
3039
|
+
this.rsMap.forEach((configs, appDataEntityId) => {
|
|
3040
|
+
configs.forEach((config) => {
|
|
3041
|
+
config.minorAppDataEntityId = appDataEntityId;
|
|
3042
|
+
const major = config.majorAppDataEntityId;
|
|
3043
|
+
if (!this.rs2Map.has(major)) {
|
|
3044
|
+
this.rs2Map.set(major, []);
|
|
3045
|
+
}
|
|
3046
|
+
this.rs2Map.get(major).push(config);
|
|
3047
|
+
});
|
|
3048
|
+
});
|
|
3049
|
+
}
|
|
2903
3050
|
/**
|
|
2904
3051
|
* 界面域销毁
|
|
2905
3052
|
*
|
|
@@ -3003,6 +3150,47 @@ var RawValueUtil = class {
|
|
|
3003
3150
|
}
|
|
3004
3151
|
};
|
|
3005
3152
|
|
|
3153
|
+
// src/utils/view-stack/view-stack.ts
|
|
3154
|
+
var ViewStack = class {
|
|
3155
|
+
constructor() {
|
|
3156
|
+
this.stackMap = /* @__PURE__ */ new Map();
|
|
3157
|
+
this.stack = [];
|
|
3158
|
+
this.activeStack = [];
|
|
3159
|
+
}
|
|
3160
|
+
add(id, view) {
|
|
3161
|
+
this.stack.push(view);
|
|
3162
|
+
this.stackMap.set(id, view);
|
|
3163
|
+
this.recalculateActiveStack();
|
|
3164
|
+
}
|
|
3165
|
+
remove(id) {
|
|
3166
|
+
const view = this.stackMap.get(id);
|
|
3167
|
+
if (view) {
|
|
3168
|
+
this.stack.splice(this.stack.indexOf(view), 1);
|
|
3169
|
+
this.stackMap.delete(id);
|
|
3170
|
+
this.recalculateActiveStack();
|
|
3171
|
+
}
|
|
3172
|
+
}
|
|
3173
|
+
getActives() {
|
|
3174
|
+
return this.activeStack;
|
|
3175
|
+
}
|
|
3176
|
+
active(_id) {
|
|
3177
|
+
this.recalculateActiveStack();
|
|
3178
|
+
}
|
|
3179
|
+
deactivate(_id) {
|
|
3180
|
+
this.recalculateActiveStack();
|
|
3181
|
+
}
|
|
3182
|
+
/**
|
|
3183
|
+
* 重新计算激活视图堆栈
|
|
3184
|
+
*
|
|
3185
|
+
* @author chitanda
|
|
3186
|
+
* @date 2024-01-18 14:01:23
|
|
3187
|
+
* @protected
|
|
3188
|
+
*/
|
|
3189
|
+
recalculateActiveStack() {
|
|
3190
|
+
this.activeStack = this.stack.filter((item) => item.isActive === true);
|
|
3191
|
+
}
|
|
3192
|
+
};
|
|
3193
|
+
|
|
3006
3194
|
// src/utils/promise/promise.ts
|
|
3007
3195
|
async function handleAllSettled(values, isThrow = true) {
|
|
3008
3196
|
const allResults = await Promise.allSettled(values);
|
|
@@ -3028,7 +3216,7 @@ async function handleAllSettled(values, isThrow = true) {
|
|
|
3028
3216
|
|
|
3029
3217
|
// src/command/app/open-app-view/open-app-view.ts
|
|
3030
3218
|
import { ModelError as ModelError15, RuntimeError as RuntimeError23 } from "@ibiz-template/core";
|
|
3031
|
-
import { clone as
|
|
3219
|
+
import { clone as clone17 } from "ramda";
|
|
3032
3220
|
|
|
3033
3221
|
// src/service/utils/de-dq-cond/ps-de-dq-cond-engine.ts
|
|
3034
3222
|
import { isEmpty as isEmpty3 } from "ramda";
|
|
@@ -3077,6 +3265,9 @@ var PSModelCondEngineBase = class {
|
|
|
3077
3265
|
return objValue != null;
|
|
3078
3266
|
}
|
|
3079
3267
|
if ("EQ" /* CONDOP_EQ */ === strCondOp || "ABSEQ" /* CONDOP_ABSEQ */ === strCondOp || "GT" /* CONDOP_GT */ === strCondOp || "GTANDEQ" /* CONDOP_GTANDEQ */ === strCondOp || "LT" /* CONDOP_LT */ === strCondOp || "LTANDEQ" /* CONDOP_LTANDEQ */ === strCondOp || "NOTEQ" /* CONDOP_NOTEQ */ === strCondOp) {
|
|
3268
|
+
if (objValue == null || objCondValue == null) {
|
|
3269
|
+
return false;
|
|
3270
|
+
}
|
|
3080
3271
|
let nRet = -1;
|
|
3081
3272
|
if (objValue == objCondValue) {
|
|
3082
3273
|
nRet = 0;
|
|
@@ -3652,7 +3843,7 @@ function getProvider6(key) {
|
|
|
3652
3843
|
async function getPanelItemProvider(model) {
|
|
3653
3844
|
var _a;
|
|
3654
3845
|
let provider;
|
|
3655
|
-
const { itemType, sysPFPluginId, appId: appId2 } = model;
|
|
3846
|
+
const { itemType, sysPFPluginId, appId: appId2, controlRenders } = model;
|
|
3656
3847
|
if (sysPFPluginId) {
|
|
3657
3848
|
const pluginKey = await getPluginRegisterKey(sysPFPluginId, appId2);
|
|
3658
3849
|
if (pluginKey) {
|
|
@@ -3664,41 +3855,45 @@ async function getPanelItemProvider(model) {
|
|
|
3664
3855
|
return provider;
|
|
3665
3856
|
}
|
|
3666
3857
|
}
|
|
3667
|
-
if (
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
)
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
const key = "RAWITEM_".concat(predefinedType);
|
|
3682
|
-
provider = getProvider6(key);
|
|
3683
|
-
if (!provider) {
|
|
3684
|
-
ibiz.log.error(
|
|
3685
|
-
"\u627E\u4E0D\u5230\u9762\u677F\u6210\u5458\u76F4\u63A5\u5185\u5BB9\u9884\u7F6E\u7C7B\u578B\u4E3A".concat(predefinedType, "\u7684\u9002\u914D\u5668\uFF0C\u6CE8\u518Ckey\u4E3A").concat(key)
|
|
3686
|
-
);
|
|
3687
|
-
} else {
|
|
3688
|
-
return provider;
|
|
3858
|
+
if (controlRenders && controlRenders.length > 0) {
|
|
3859
|
+
provider = getProvider6("PREDEFINE_RENDER");
|
|
3860
|
+
} else {
|
|
3861
|
+
if (itemType === "CONTAINER") {
|
|
3862
|
+
const predefinedType = model.predefinedType || "DEFAULT";
|
|
3863
|
+
const key = "CONTAINER_".concat(predefinedType);
|
|
3864
|
+
provider = getProvider6(key);
|
|
3865
|
+
if (!provider) {
|
|
3866
|
+
ibiz.log.error(
|
|
3867
|
+
"\u627E\u4E0D\u5230\u9762\u677F\u5BB9\u5668\u9884\u7F6E\u7C7B\u578B\u4E3A".concat(predefinedType, "\u7684\u9002\u914D\u5668\uFF0C\u6CE8\u518Ckey\u4E3A").concat(key)
|
|
3868
|
+
);
|
|
3869
|
+
} else {
|
|
3870
|
+
return provider;
|
|
3871
|
+
}
|
|
3689
3872
|
}
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
if (editor && editor.predefinedType) {
|
|
3694
|
-
const key = "FIELD_".concat(editor.predefinedType.toUpperCase());
|
|
3873
|
+
if (itemType === "RAWITEM") {
|
|
3874
|
+
const predefinedType = ((_a = model.rawItem) == null ? void 0 : _a.predefinedType) || "DEFAULT";
|
|
3875
|
+
const key = "RAWITEM_".concat(predefinedType);
|
|
3695
3876
|
provider = getProvider6(key);
|
|
3696
|
-
if (provider) {
|
|
3877
|
+
if (!provider) {
|
|
3878
|
+
ibiz.log.error(
|
|
3879
|
+
"\u627E\u4E0D\u5230\u9762\u677F\u6210\u5458\u76F4\u63A5\u5185\u5BB9\u9884\u7F6E\u7C7B\u578B\u4E3A".concat(predefinedType, "\u7684\u9002\u914D\u5668\uFF0C\u6CE8\u518Ckey\u4E3A").concat(key)
|
|
3880
|
+
);
|
|
3881
|
+
} else {
|
|
3697
3882
|
return provider;
|
|
3698
3883
|
}
|
|
3699
3884
|
}
|
|
3885
|
+
if (itemType === "FIELD") {
|
|
3886
|
+
const { editor } = model;
|
|
3887
|
+
if (editor && editor.predefinedType) {
|
|
3888
|
+
const key = "FIELD_".concat(editor.predefinedType.toUpperCase());
|
|
3889
|
+
provider = getProvider6(key);
|
|
3890
|
+
if (provider) {
|
|
3891
|
+
return provider;
|
|
3892
|
+
}
|
|
3893
|
+
}
|
|
3894
|
+
}
|
|
3895
|
+
provider = getProvider6(itemType);
|
|
3700
3896
|
}
|
|
3701
|
-
provider = getProvider6(itemType);
|
|
3702
3897
|
if (!provider) {
|
|
3703
3898
|
ibiz.log.error("\u627E\u4E0D\u5230\u9762\u677F\u6210\u5458\u7C7B\u578B".concat(itemType, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
3704
3899
|
} else {
|
|
@@ -4050,11 +4245,7 @@ async function getAppMenuItemProvider(model) {
|
|
|
4050
4245
|
}
|
|
4051
4246
|
}
|
|
4052
4247
|
provider = getProvider14(itemType);
|
|
4053
|
-
|
|
4054
|
-
ibiz.log.error("\u627E\u4E0D\u5230\u5E94\u7528\u83DC\u5355\u9879\u7C7B\u578B".concat(itemType, "\u5BF9\u5E94\u7684\u9002\u914D\u5668"));
|
|
4055
|
-
} else {
|
|
4056
|
-
return provider;
|
|
4057
|
-
}
|
|
4248
|
+
return provider;
|
|
4058
4249
|
}
|
|
4059
4250
|
|
|
4060
4251
|
// src/service/utils/app-counter/app-counter.ts
|
|
@@ -4439,7 +4630,9 @@ var DynamicCodeListCache = class {
|
|
|
4439
4630
|
iconPathAppDEFieldId,
|
|
4440
4631
|
iconPathXAppDEFieldId,
|
|
4441
4632
|
disableAppDEFieldId,
|
|
4442
|
-
dataAppDEFieldId
|
|
4633
|
+
dataAppDEFieldId,
|
|
4634
|
+
clsAppDEFieldId,
|
|
4635
|
+
colorAppDEFieldId
|
|
4443
4636
|
} = this.codeList;
|
|
4444
4637
|
const value = valueAppDEFieldId ? data[valueAppDEFieldId] : data.srfkey;
|
|
4445
4638
|
result.id = value;
|
|
@@ -4463,6 +4656,12 @@ var DynamicCodeListCache = class {
|
|
|
4463
4656
|
if (disableAppDEFieldId) {
|
|
4464
4657
|
result.disableSelect = fieldValueToBoolean(data[disableAppDEFieldId]);
|
|
4465
4658
|
}
|
|
4659
|
+
if (clsAppDEFieldId) {
|
|
4660
|
+
result.textCls = data[clsAppDEFieldId];
|
|
4661
|
+
}
|
|
4662
|
+
if (colorAppDEFieldId) {
|
|
4663
|
+
result.color = data[colorAppDEFieldId];
|
|
4664
|
+
}
|
|
4466
4665
|
if (dataAppDEFieldId && data[dataAppDEFieldId]) {
|
|
4467
4666
|
try {
|
|
4468
4667
|
result.data = ScriptFactory.execSingleLine(
|
|
@@ -4532,16 +4731,16 @@ var DynamicCodeListCache = class {
|
|
|
4532
4731
|
);
|
|
4533
4732
|
let resultItems = [];
|
|
4534
4733
|
if (res.data.length) {
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
resultItems = tempItems;
|
|
4540
|
-
}
|
|
4541
|
-
} else {
|
|
4542
|
-
resultItems.push(this.convertData(item));
|
|
4734
|
+
if (pvalueAppDEFieldId) {
|
|
4735
|
+
const tempItems = this.prepareTreeData(res.data);
|
|
4736
|
+
if (tempItems) {
|
|
4737
|
+
resultItems = tempItems;
|
|
4543
4738
|
}
|
|
4544
|
-
}
|
|
4739
|
+
} else {
|
|
4740
|
+
res.data.forEach((item) => {
|
|
4741
|
+
resultItems.push(this.convertData(item));
|
|
4742
|
+
});
|
|
4743
|
+
}
|
|
4545
4744
|
}
|
|
4546
4745
|
return Object.freeze(resultItems);
|
|
4547
4746
|
}
|
|
@@ -4550,26 +4749,23 @@ var DynamicCodeListCache = class {
|
|
|
4550
4749
|
*
|
|
4551
4750
|
* @return {codeListItem[] | undefined}
|
|
4552
4751
|
*/
|
|
4553
|
-
prepareTreeData(items
|
|
4554
|
-
const { pvalueAppDEFieldId } = this.codeList;
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4752
|
+
prepareTreeData(items) {
|
|
4753
|
+
const { valueAppDEFieldId, pvalueAppDEFieldId } = this.codeList;
|
|
4754
|
+
const map = {};
|
|
4755
|
+
const nestedList = [];
|
|
4756
|
+
items.forEach((data) => {
|
|
4757
|
+
map[data[valueAppDEFieldId]] = this.convertData(data);
|
|
4758
|
+
});
|
|
4759
|
+
items.forEach((data) => {
|
|
4760
|
+
const parent = map[data[pvalueAppDEFieldId]];
|
|
4761
|
+
if (parent) {
|
|
4762
|
+
parent.children = parent.children || [];
|
|
4763
|
+
parent.children.push(map[data[valueAppDEFieldId]]);
|
|
4764
|
+
} else {
|
|
4765
|
+
nestedList.push(map[data[valueAppDEFieldId]]);
|
|
4559
4766
|
}
|
|
4560
|
-
return !item[pvalueAppDEFieldId];
|
|
4561
|
-
});
|
|
4562
|
-
if (filteredData.length === 0) {
|
|
4563
|
-
return;
|
|
4564
|
-
}
|
|
4565
|
-
return filteredData.map((data) => {
|
|
4566
|
-
const tempCodeListItem = this.convertData(data);
|
|
4567
|
-
tempCodeListItem.children = this.prepareTreeData(
|
|
4568
|
-
items,
|
|
4569
|
-
tempCodeListItem.value
|
|
4570
|
-
);
|
|
4571
|
-
return tempCodeListItem;
|
|
4572
4767
|
});
|
|
4768
|
+
return nestedList;
|
|
4573
4769
|
}
|
|
4574
4770
|
/**
|
|
4575
4771
|
* 获取动态的代码项
|
|
@@ -4729,8 +4925,18 @@ var DECache = class {
|
|
|
4729
4925
|
entity.srfkey = createUUID2();
|
|
4730
4926
|
}
|
|
4731
4927
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
4732
|
-
|
|
4733
|
-
|
|
4928
|
+
const commit = () => {
|
|
4929
|
+
this.cacheMap.set(entity.srfkey, clone4(entity));
|
|
4930
|
+
ibiz.log.warn("add", entity.srfkey, entity);
|
|
4931
|
+
};
|
|
4932
|
+
const t = this.getTransaction(context);
|
|
4933
|
+
if (t) {
|
|
4934
|
+
t.change(entity.srfkey, () => {
|
|
4935
|
+
commit();
|
|
4936
|
+
});
|
|
4937
|
+
} else {
|
|
4938
|
+
commit();
|
|
4939
|
+
}
|
|
4734
4940
|
return entity;
|
|
4735
4941
|
} catch (err) {
|
|
4736
4942
|
ibiz.log.error(err);
|
|
@@ -4780,10 +4986,25 @@ var DECache = class {
|
|
|
4780
4986
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
4781
4987
|
const data = this.cacheMap.get(oldKey);
|
|
4782
4988
|
if (data) {
|
|
4783
|
-
data
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4989
|
+
const _data = clone4(data);
|
|
4990
|
+
_data.assign(entity);
|
|
4991
|
+
const commit = () => {
|
|
4992
|
+
data.assign(entity);
|
|
4993
|
+
if (oldKey !== entity.srfkey) {
|
|
4994
|
+
this.cacheMap.delete(oldKey);
|
|
4995
|
+
}
|
|
4996
|
+
this.cacheMap.set(entity.srfkey, data);
|
|
4997
|
+
ibiz.log.warn("update", entity.srfkey, entity);
|
|
4998
|
+
};
|
|
4999
|
+
const t = this.getTransaction(context);
|
|
5000
|
+
if (t) {
|
|
5001
|
+
t.change(entity.srfkey, () => {
|
|
5002
|
+
commit();
|
|
5003
|
+
});
|
|
5004
|
+
} else {
|
|
5005
|
+
commit();
|
|
5006
|
+
}
|
|
5007
|
+
return _data;
|
|
4787
5008
|
}
|
|
4788
5009
|
throw new Error("\u6570\u636E\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u66F4\u65B0!");
|
|
4789
5010
|
} catch (err) {
|
|
@@ -4805,9 +5026,18 @@ var DECache = class {
|
|
|
4805
5026
|
const key = srfKey;
|
|
4806
5027
|
if (this.cacheMap.has(key)) {
|
|
4807
5028
|
const data = this.cacheMap.get(key);
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
5029
|
+
const commit = () => {
|
|
5030
|
+
this.cacheMap.delete(key);
|
|
5031
|
+
ibiz.log.warn("delete", key);
|
|
5032
|
+
};
|
|
5033
|
+
const t = this.getTransaction(context);
|
|
5034
|
+
if (t) {
|
|
5035
|
+
t.change(key, () => {
|
|
5036
|
+
commit();
|
|
5037
|
+
});
|
|
5038
|
+
} else {
|
|
5039
|
+
commit();
|
|
5040
|
+
}
|
|
4811
5041
|
return data;
|
|
4812
5042
|
}
|
|
4813
5043
|
return null;
|
|
@@ -4828,6 +5058,11 @@ var DECache = class {
|
|
|
4828
5058
|
createBatch(context, entities) {
|
|
4829
5059
|
try {
|
|
4830
5060
|
isExistSessionId("add", context);
|
|
5061
|
+
const commit = (entity) => {
|
|
5062
|
+
this.cacheMap.set(entity.srfkey, entity);
|
|
5063
|
+
ibiz.log.warn("add", entity.srfkey, entity);
|
|
5064
|
+
};
|
|
5065
|
+
const t = this.getTransaction(context);
|
|
4831
5066
|
for (let i = 0; i < entities.length; i++) {
|
|
4832
5067
|
const entity = entities[i];
|
|
4833
5068
|
if (isNil5(entity.srfkey) || isEmpty5(entity.srfkey)) {
|
|
@@ -4835,9 +5070,13 @@ var DECache = class {
|
|
|
4835
5070
|
}
|
|
4836
5071
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
4837
5072
|
const data = clone4(entity);
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
5073
|
+
if (t) {
|
|
5074
|
+
t.change(data.srfkey, () => {
|
|
5075
|
+
commit(data);
|
|
5076
|
+
});
|
|
5077
|
+
} else {
|
|
5078
|
+
commit(data);
|
|
5079
|
+
}
|
|
4841
5080
|
}
|
|
4842
5081
|
return entities;
|
|
4843
5082
|
} catch (err) {
|
|
@@ -4857,16 +5096,41 @@ var DECache = class {
|
|
|
4857
5096
|
updateBatch(context, entities) {
|
|
4858
5097
|
try {
|
|
4859
5098
|
isExistSessionId("update", context);
|
|
5099
|
+
const commit = (entity, oldKey) => {
|
|
5100
|
+
if (oldKey !== entity.srfkey) {
|
|
5101
|
+
this.cacheMap.delete(oldKey);
|
|
5102
|
+
}
|
|
5103
|
+
this.cacheMap.set(entity.srfkey, entity);
|
|
5104
|
+
ibiz.log.warn("update", entity.srfkey, entity);
|
|
5105
|
+
};
|
|
5106
|
+
const t = this.getTransaction(context);
|
|
4860
5107
|
for (let i = 0; i < entities.length; i++) {
|
|
4861
5108
|
const entity = entities[i];
|
|
4862
5109
|
isExistSrfKey("update", entity);
|
|
5110
|
+
const oldKey = entity.srfkey;
|
|
5111
|
+
if (this.isUnionKey) {
|
|
5112
|
+
this.calcUnionKey(entity);
|
|
5113
|
+
if (oldKey !== entity.srfkey && this.checkData(context, entity.srfkey)) {
|
|
5114
|
+
throw new RuntimeError14(
|
|
5115
|
+
"\u66F4\u65B0\u8054\u5408\u4E3B\u952E\u6570\u636E\u5931\u8D25\uFF0C\u5DF2\u6709\u4E3B\u952E\u4E3A".concat(entity.srfkey, "\u7684\u6570\u636E")
|
|
5116
|
+
);
|
|
5117
|
+
}
|
|
5118
|
+
}
|
|
4863
5119
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
4864
5120
|
const data = this.cacheMap.get(entity.srfkey);
|
|
4865
5121
|
if (data) {
|
|
4866
|
-
data
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
5122
|
+
const _data = clone4(data);
|
|
5123
|
+
_data.assign(entity);
|
|
5124
|
+
entities[i] = _data;
|
|
5125
|
+
if (t) {
|
|
5126
|
+
t.change(entity.srfkey, () => {
|
|
5127
|
+
data.assign(entity);
|
|
5128
|
+
commit(data, oldKey);
|
|
5129
|
+
});
|
|
5130
|
+
} else {
|
|
5131
|
+
data.assign(entity);
|
|
5132
|
+
commit(data, oldKey);
|
|
5133
|
+
}
|
|
4870
5134
|
} else {
|
|
4871
5135
|
throw new Error(
|
|
4872
5136
|
"\u6570\u636E[".concat(entity.srfdename, "-").concat(entity.srfmajortext, "(").concat(entity.srfkey, ")]\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u66F4\u65B0!")
|
|
@@ -4907,10 +5171,20 @@ var DECache = class {
|
|
|
4907
5171
|
"\u672A\u627E\u5230\u4EE5\u4E0B\u6570\u636E\u300C".concat(notRemoveKeys.join("\u3001"), "\u300D\uFF0C\u65E0\u6CD5\u5220\u9664!")
|
|
4908
5172
|
);
|
|
4909
5173
|
}
|
|
4910
|
-
|
|
4911
|
-
const key = srfKeys[i];
|
|
5174
|
+
const commit = (key) => {
|
|
4912
5175
|
this.cacheMap.delete(key);
|
|
4913
5176
|
ibiz.log.warn("delete", key);
|
|
5177
|
+
};
|
|
5178
|
+
const t = this.getTransaction(context);
|
|
5179
|
+
for (let i = 0; i < srfKeys.length; i++) {
|
|
5180
|
+
const key = srfKeys[i];
|
|
5181
|
+
if (t) {
|
|
5182
|
+
t.change(key, () => {
|
|
5183
|
+
commit(key);
|
|
5184
|
+
});
|
|
5185
|
+
} else {
|
|
5186
|
+
commit(key);
|
|
5187
|
+
}
|
|
4914
5188
|
}
|
|
4915
5189
|
return [];
|
|
4916
5190
|
}
|
|
@@ -4989,6 +5263,22 @@ var DECache = class {
|
|
|
4989
5263
|
});
|
|
4990
5264
|
data.srfkey = unionValues.join("||");
|
|
4991
5265
|
}
|
|
5266
|
+
/**
|
|
5267
|
+
* 根据上下文,获取已经开启的事务
|
|
5268
|
+
*
|
|
5269
|
+
* @author chitanda
|
|
5270
|
+
* @date 2024-01-17 15:01:28
|
|
5271
|
+
* @protected
|
|
5272
|
+
* @param {IContext} context
|
|
5273
|
+
* @return {*} {(ITransaction | null)}
|
|
5274
|
+
*/
|
|
5275
|
+
getTransaction(context) {
|
|
5276
|
+
const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
|
|
5277
|
+
if (uiDomain && uiDomain.transaction.state.isOpen === true) {
|
|
5278
|
+
return uiDomain.transaction;
|
|
5279
|
+
}
|
|
5280
|
+
return null;
|
|
5281
|
+
}
|
|
4992
5282
|
};
|
|
4993
5283
|
|
|
4994
5284
|
// src/service/utils/res-path/res-path.ts
|
|
@@ -5404,7 +5694,8 @@ CounterService.counterMap = /* @__PURE__ */ new Map();
|
|
|
5404
5694
|
// src/service/service/entity/de.service.ts
|
|
5405
5695
|
import {
|
|
5406
5696
|
ModelError as ModelError7,
|
|
5407
|
-
RuntimeError as RuntimeError17
|
|
5697
|
+
RuntimeError as RuntimeError17,
|
|
5698
|
+
RuntimeModelError as RuntimeModelError10
|
|
5408
5699
|
} from "@ibiz-template/core";
|
|
5409
5700
|
|
|
5410
5701
|
// src/service/service/work-flow/work-flow.service.ts
|
|
@@ -5980,24 +6271,13 @@ var MethodDto = class {
|
|
|
5980
6271
|
* @param {IAppDataEntity} entity
|
|
5981
6272
|
* @param {boolean} [isLocalMode]
|
|
5982
6273
|
* @param {IAppDEMethodDTO} [dto]
|
|
5983
|
-
* @param {boolean} [inSelfLoop] 是否在自关系循环中
|
|
5984
6274
|
*/
|
|
5985
|
-
constructor(service, entity, isLocalMode, dto
|
|
6275
|
+
constructor(service, entity, isLocalMode, dto) {
|
|
5986
6276
|
this.service = service;
|
|
5987
6277
|
this.entity = entity;
|
|
5988
6278
|
this.isLocalMode = isLocalMode;
|
|
5989
6279
|
this.dto = dto;
|
|
5990
|
-
this.inSelfLoop = inSelfLoop;
|
|
5991
6280
|
this.dtoMap = /* @__PURE__ */ new Map();
|
|
5992
|
-
/**
|
|
5993
|
-
* 当前 DTO 是否已经计算过关系相关逻辑
|
|
5994
|
-
*
|
|
5995
|
-
* @link this.calcRs
|
|
5996
|
-
* @author chitanda
|
|
5997
|
-
* @date 2023-12-26 16:12:18
|
|
5998
|
-
* @protected
|
|
5999
|
-
*/
|
|
6000
|
-
this.isCalcRs = false;
|
|
6001
6281
|
if (dto) {
|
|
6002
6282
|
this.app = ibiz.hub.getApp(entity.appId);
|
|
6003
6283
|
this.fields = dto.appDEMethodDTOFields || [];
|
|
@@ -6126,10 +6406,12 @@ var MethodDto = class {
|
|
|
6126
6406
|
* @return {*} {Promise<IDataEntity[]>}
|
|
6127
6407
|
*/
|
|
6128
6408
|
async sets(context, data) {
|
|
6129
|
-
|
|
6130
|
-
|
|
6409
|
+
const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
|
|
6410
|
+
if (uiDomain && uiDomain.state.rsInit !== true) {
|
|
6411
|
+
await this.calcRs(context);
|
|
6412
|
+
uiDomain.calcParentRs();
|
|
6413
|
+
uiDomain.state.rsInit = true;
|
|
6131
6414
|
}
|
|
6132
|
-
await this.calcRs(context);
|
|
6133
6415
|
return Promise.all(
|
|
6134
6416
|
data.map(async (datum) => {
|
|
6135
6417
|
const all = this.fields.filter((field) => field.type === "DTOS").map(async (field) => {
|
|
@@ -6142,7 +6424,7 @@ var MethodDto = class {
|
|
|
6142
6424
|
}
|
|
6143
6425
|
const dto = await this.getFieldDto(context, field);
|
|
6144
6426
|
const items = datum[key];
|
|
6145
|
-
if (items) {
|
|
6427
|
+
if (items && items.length > 0) {
|
|
6146
6428
|
const pKey = datum[this.entity.keyAppDEFieldId];
|
|
6147
6429
|
if (field.refPickupAppDEFieldId) {
|
|
6148
6430
|
items.forEach((item) => {
|
|
@@ -6177,10 +6459,9 @@ var MethodDto = class {
|
|
|
6177
6459
|
* @return {*} {Promise<void>}
|
|
6178
6460
|
*/
|
|
6179
6461
|
async calcRs(context, depth = 0) {
|
|
6180
|
-
if (
|
|
6462
|
+
if (depth > 10) {
|
|
6181
6463
|
return;
|
|
6182
6464
|
}
|
|
6183
|
-
this.isCalcRs = true;
|
|
6184
6465
|
depth += 1;
|
|
6185
6466
|
const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
|
|
6186
6467
|
const dtoFields = this.fields.filter((field) => field.type === "DTOS");
|
|
@@ -6224,12 +6505,10 @@ var MethodDto = class {
|
|
|
6224
6505
|
entity.appDEMethodDTOs || [],
|
|
6225
6506
|
field.refAppDEMethodDTOId
|
|
6226
6507
|
);
|
|
6227
|
-
const inSelfLoop = this.entity.codeName === entity.codeName;
|
|
6228
6508
|
const service = await this.app.deService.getService(context, entity.id);
|
|
6229
6509
|
service.isLocalMode = true;
|
|
6230
6510
|
const dto = service.createMethodDto(methodDto, {
|
|
6231
|
-
isLocalMode: true
|
|
6232
|
-
inSelfLoop
|
|
6511
|
+
isLocalMode: true
|
|
6233
6512
|
});
|
|
6234
6513
|
this.dtoMap.set(field.codeName, dto);
|
|
6235
6514
|
return dto;
|
|
@@ -6291,6 +6570,9 @@ var DEService = class {
|
|
|
6291
6570
|
return this.methodMap.get(cacheId);
|
|
6292
6571
|
}
|
|
6293
6572
|
const model = findModelChild(this.model.appDEMethods, id);
|
|
6573
|
+
if (!model) {
|
|
6574
|
+
throw new RuntimeModelError10(this.model, "\u672A\u627E\u5230\u670D\u52A1\u65B9\u6CD5: ".concat(id));
|
|
6575
|
+
}
|
|
6294
6576
|
const provider = await getDEMethodProvider(model);
|
|
6295
6577
|
if (!provider) {
|
|
6296
6578
|
throw new ModelError7(model, "\u672A\u652F\u6301\u7684\u670D\u52A1\u65B9\u6CD5\u7C7B\u578B: ".concat(model.methodType));
|
|
@@ -6475,13 +6757,7 @@ var DEService = class {
|
|
|
6475
6757
|
this.local.clear();
|
|
6476
6758
|
}
|
|
6477
6759
|
createMethodDto(dto, opts) {
|
|
6478
|
-
return new MethodDto(
|
|
6479
|
-
this,
|
|
6480
|
-
this.model,
|
|
6481
|
-
opts == null ? void 0 : opts.isLocalMode,
|
|
6482
|
-
dto,
|
|
6483
|
-
opts == null ? void 0 : opts.inSelfLoop
|
|
6484
|
-
);
|
|
6760
|
+
return new MethodDto(this, this.model, opts == null ? void 0 : opts.isLocalMode, dto);
|
|
6485
6761
|
}
|
|
6486
6762
|
};
|
|
6487
6763
|
|
|
@@ -7157,9 +7433,13 @@ var V7AuthService = class {
|
|
|
7157
7433
|
const token = getCookie(CoreConst.TOKEN);
|
|
7158
7434
|
const expirein = getCookie(CoreConst.TOKEN_EXPIRES);
|
|
7159
7435
|
const remember = getCookie(CoreConst.TOKEN_REMEMBER);
|
|
7436
|
+
const refreshToken = getCookie(CoreConst.REFRESH_TOKEN);
|
|
7160
7437
|
setCookie(CoreConst.TOKEN, token, 0, true);
|
|
7161
7438
|
setCookie(CoreConst.TOKEN_EXPIRES, expirein, 0, true);
|
|
7162
7439
|
setCookie(CoreConst.TOKEN_REMEMBER, remember, 0, true);
|
|
7440
|
+
if (refreshToken) {
|
|
7441
|
+
setCookie(CoreConst.REFRESH_TOKEN, refreshToken, 0, true);
|
|
7442
|
+
}
|
|
7163
7443
|
}
|
|
7164
7444
|
return result;
|
|
7165
7445
|
}
|
|
@@ -7172,17 +7452,21 @@ var V7AuthService = class {
|
|
|
7172
7452
|
});
|
|
7173
7453
|
const { data } = res;
|
|
7174
7454
|
if (data && data.token) {
|
|
7455
|
+
const cacheDays = remember ? 7 : 0;
|
|
7175
7456
|
if (remember) {
|
|
7176
|
-
setCookie(CoreConst.TOKEN_REMEMBER, "1",
|
|
7457
|
+
setCookie(CoreConst.TOKEN_REMEMBER, "1", cacheDays, true);
|
|
7177
7458
|
}
|
|
7178
|
-
setCookie(CoreConst.TOKEN, data.token,
|
|
7459
|
+
setCookie(CoreConst.TOKEN, data.token, cacheDays, true);
|
|
7179
7460
|
const expiredDate = (/* @__PURE__ */ new Date()).getTime() + (data.expirein || 7199) * 1e3;
|
|
7180
|
-
setCookie(
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
|
|
7461
|
+
setCookie(CoreConst.TOKEN_EXPIRES, "".concat(expiredDate), cacheDays, true);
|
|
7462
|
+
if (data.refresh_token) {
|
|
7463
|
+
setCookie(
|
|
7464
|
+
CoreConst.REFRESH_TOKEN,
|
|
7465
|
+
data.refresh_token,
|
|
7466
|
+
cacheDays,
|
|
7467
|
+
true
|
|
7468
|
+
);
|
|
7469
|
+
}
|
|
7186
7470
|
clearCookie(CoreConst.IS_ANONYMOUS);
|
|
7187
7471
|
}
|
|
7188
7472
|
return true;
|
|
@@ -7200,7 +7484,10 @@ var V7AuthService = class {
|
|
|
7200
7484
|
clearCookie(CoreConst.TOKEN);
|
|
7201
7485
|
clearCookie(CoreConst.TOKEN_EXPIRES);
|
|
7202
7486
|
clearCookie(CoreConst.TOKEN_REMEMBER);
|
|
7487
|
+
clearCookie(CoreConst.REFRESH_TOKEN);
|
|
7203
7488
|
clearCookie(CoreConst.IS_ANONYMOUS);
|
|
7489
|
+
ibiz.appData = void 0;
|
|
7490
|
+
ibiz.orgData = void 0;
|
|
7204
7491
|
return true;
|
|
7205
7492
|
} catch (err) {
|
|
7206
7493
|
ibiz.notification.error({
|
|
@@ -7216,22 +7503,32 @@ var V7AuthService = class {
|
|
|
7216
7503
|
}
|
|
7217
7504
|
const token = getCookie(CoreConst.TOKEN);
|
|
7218
7505
|
const expirein = getCookie(CoreConst.TOKEN_EXPIRES);
|
|
7219
|
-
const remember = getCookie(CoreConst.TOKEN_REMEMBER);
|
|
7220
7506
|
if (token && expirein) {
|
|
7221
7507
|
let wait = Number(expirein) - (/* @__PURE__ */ new Date()).getTime();
|
|
7222
7508
|
const early = 5 * 60 * 1e3;
|
|
7223
7509
|
wait = wait > early ? wait - early : 0;
|
|
7224
7510
|
setTimeout(async () => {
|
|
7225
|
-
const
|
|
7511
|
+
const remember = getCookie(CoreConst.TOKEN_REMEMBER);
|
|
7512
|
+
const refreshToken = getCookie(CoreConst.REFRESH_TOKEN);
|
|
7513
|
+
const cacheDay = remember ? 7 : 0;
|
|
7514
|
+
let res;
|
|
7515
|
+
if (refreshToken != null && refreshToken !== "") {
|
|
7516
|
+
res = await ibiz.net.get("/uaa/refresh_token/".concat(refreshToken));
|
|
7517
|
+
} else {
|
|
7518
|
+
res = await ibiz.net.get("/uaa/refreshtoken2");
|
|
7519
|
+
}
|
|
7226
7520
|
if (res.ok) {
|
|
7227
|
-
setCookie(CoreConst.TOKEN, res.data.token,
|
|
7521
|
+
setCookie(CoreConst.TOKEN, res.data.token, cacheDay, true);
|
|
7228
7522
|
const expiredDate = (/* @__PURE__ */ new Date()).getTime() + (res.data.expirein || 7199) * 1e3;
|
|
7229
|
-
setCookie(
|
|
7230
|
-
|
|
7231
|
-
|
|
7232
|
-
|
|
7233
|
-
|
|
7234
|
-
|
|
7523
|
+
setCookie(CoreConst.TOKEN_EXPIRES, "".concat(expiredDate), cacheDay, true);
|
|
7524
|
+
if (res.data.refresh_token) {
|
|
7525
|
+
setCookie(
|
|
7526
|
+
CoreConst.REFRESH_TOKEN,
|
|
7527
|
+
res.data.refresh_token,
|
|
7528
|
+
cacheDay,
|
|
7529
|
+
true
|
|
7530
|
+
);
|
|
7531
|
+
}
|
|
7235
7532
|
}
|
|
7236
7533
|
this.extendLogin();
|
|
7237
7534
|
}, wait);
|
|
@@ -7282,12 +7579,14 @@ import {
|
|
|
7282
7579
|
HttpError as HttpError5,
|
|
7283
7580
|
HttpResponse as HttpResponse3,
|
|
7284
7581
|
RuntimeError as RuntimeError21,
|
|
7285
|
-
RuntimeModelError as
|
|
7582
|
+
RuntimeModelError as RuntimeModelError22
|
|
7286
7583
|
} from "@ibiz-template/core";
|
|
7287
7584
|
import { isArray as isArray6, isNil as isNil10 } from "lodash-es";
|
|
7585
|
+
import { ascSort } from "qx-util";
|
|
7586
|
+
import { clone as clone14 } from "ramda";
|
|
7288
7587
|
|
|
7289
7588
|
// src/service/service/entity/method/method.ts
|
|
7290
|
-
import { RuntimeModelError as
|
|
7589
|
+
import { RuntimeModelError as RuntimeModelError11 } from "@ibiz-template/core";
|
|
7291
7590
|
|
|
7292
7591
|
// src/service/service/entity/method/method-input.ts
|
|
7293
7592
|
var MethodInput = class {
|
|
@@ -7378,6 +7677,11 @@ var MethodReturn = class {
|
|
|
7378
7677
|
*/
|
|
7379
7678
|
async handle(context, data) {
|
|
7380
7679
|
if (this.dto) {
|
|
7680
|
+
const app = ibiz.hub.getApp(this.entity.appId);
|
|
7681
|
+
app.deService.clearTempCache({
|
|
7682
|
+
srfappid: app.appId,
|
|
7683
|
+
srfsessionid: context.srfsessionid
|
|
7684
|
+
});
|
|
7381
7685
|
const items = await this.dto.sets(context, [data]);
|
|
7382
7686
|
return items[0];
|
|
7383
7687
|
}
|
|
@@ -7453,17 +7757,17 @@ var Method = class {
|
|
|
7453
7757
|
break;
|
|
7454
7758
|
default:
|
|
7455
7759
|
if (requestMethod) {
|
|
7456
|
-
throw new
|
|
7760
|
+
throw new RuntimeModelError11(
|
|
7457
7761
|
this.method,
|
|
7458
7762
|
"\u672A\u652F\u6301\u7684\u8BF7\u6C42\u65B9\u5F0F: ".concat(requestMethod)
|
|
7459
7763
|
);
|
|
7460
7764
|
} else {
|
|
7461
|
-
throw new
|
|
7765
|
+
throw new RuntimeModelError11(this.method, "\u672A\u914D\u7F6E\u8BF7\u6C42\u65B9\u5F0F");
|
|
7462
7766
|
}
|
|
7463
7767
|
}
|
|
7464
7768
|
return res;
|
|
7465
7769
|
}
|
|
7466
|
-
throw new
|
|
7770
|
+
throw new RuntimeModelError11(this.method, "\u672A\u652F\u6301\u7684\u884C\u4E3A\u7C7B\u578B[".concat(actionType, "]"));
|
|
7467
7771
|
}
|
|
7468
7772
|
mergeRequestPath(path2, methodName) {
|
|
7469
7773
|
return "".concat(path2, "/").concat(methodName);
|
|
@@ -7501,7 +7805,7 @@ import { isArray as isArray5 } from "lodash-es";
|
|
|
7501
7805
|
import { clone as clone13 } from "ramda";
|
|
7502
7806
|
|
|
7503
7807
|
// src/de-logic/de-logic.ts
|
|
7504
|
-
import { ModelError as ModelError13, RuntimeModelError as
|
|
7808
|
+
import { ModelError as ModelError13, RuntimeModelError as RuntimeModelError21 } from "@ibiz-template/core";
|
|
7505
7809
|
|
|
7506
7810
|
// src/de-logic/de-logic-context.ts
|
|
7507
7811
|
import { isArray as isArray4 } from "lodash-es";
|
|
@@ -7633,17 +7937,17 @@ var DELogicContext = class {
|
|
|
7633
7937
|
};
|
|
7634
7938
|
|
|
7635
7939
|
// src/de-logic/de-logic-node/de-action-node/de-action-node.ts
|
|
7636
|
-
import { RuntimeModelError as
|
|
7940
|
+
import { RuntimeModelError as RuntimeModelError14 } from "@ibiz-template/core";
|
|
7637
7941
|
|
|
7638
7942
|
// src/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.ts
|
|
7639
|
-
import { RuntimeModelError as
|
|
7943
|
+
import { RuntimeModelError as RuntimeModelError13 } from "@ibiz-template/core";
|
|
7640
7944
|
|
|
7641
7945
|
// src/de-logic/de-logic-link/de-logic-link-cond/de-logic-link-cond.ts
|
|
7642
7946
|
var DELogicLinkCond = class {
|
|
7643
7947
|
};
|
|
7644
7948
|
|
|
7645
7949
|
// src/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.ts
|
|
7646
|
-
import { ModelError as ModelError8, RuntimeModelError as
|
|
7950
|
+
import { ModelError as ModelError8, RuntimeModelError as RuntimeModelError12 } from "@ibiz-template/core";
|
|
7647
7951
|
var DELogicLinkSingleCond = class extends DELogicLinkCond {
|
|
7648
7952
|
constructor(model) {
|
|
7649
7953
|
super();
|
|
@@ -7690,7 +7994,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
|
|
|
7690
7994
|
switch (this.type) {
|
|
7691
7995
|
case "ENTITYFIELD": {
|
|
7692
7996
|
if (!this.value) {
|
|
7693
|
-
throw new
|
|
7997
|
+
throw new RuntimeModelError12(
|
|
7694
7998
|
this.model,
|
|
7695
7999
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
7696
8000
|
);
|
|
@@ -7700,7 +8004,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
|
|
|
7700
8004
|
}
|
|
7701
8005
|
case "SRCENTITYFIELD": {
|
|
7702
8006
|
if (!this.value) {
|
|
7703
|
-
throw new
|
|
8007
|
+
throw new RuntimeModelError12(
|
|
7704
8008
|
this.model,
|
|
7705
8009
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
7706
8010
|
);
|
|
@@ -7763,7 +8067,7 @@ var DELogicLinkGroupCond = class _DELogicLinkGroupCond extends DELogicLinkCond {
|
|
|
7763
8067
|
test(ctx, context, data) {
|
|
7764
8068
|
let bol = true;
|
|
7765
8069
|
if (this.conds.length === 0) {
|
|
7766
|
-
throw new
|
|
8070
|
+
throw new RuntimeModelError13(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
|
|
7767
8071
|
}
|
|
7768
8072
|
for (let i = 0; i < this.conds.length; i++) {
|
|
7769
8073
|
const cond = this.conds[i];
|
|
@@ -7866,10 +8170,10 @@ var DEActionNode = class extends DELogicNode {
|
|
|
7866
8170
|
retDELogicParamId
|
|
7867
8171
|
} = this.model;
|
|
7868
8172
|
if (!dstAppDataEntityId) {
|
|
7869
|
-
throw new
|
|
8173
|
+
throw new RuntimeModelError14(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
|
|
7870
8174
|
}
|
|
7871
8175
|
if (!dstAppDEActionId) {
|
|
7872
|
-
throw new
|
|
8176
|
+
throw new RuntimeModelError14(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
|
|
7873
8177
|
}
|
|
7874
8178
|
const requestData = ctx.params[dstDELogicParamId];
|
|
7875
8179
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
@@ -7933,7 +8237,7 @@ import { clone as clone10 } from "ramda";
|
|
|
7933
8237
|
import { ModelError as ModelError10 } from "@ibiz-template/core";
|
|
7934
8238
|
import { clone as clone9 } from "ramda";
|
|
7935
8239
|
function handleSrcVal(ctx, srcValParams) {
|
|
7936
|
-
const { srcDELogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
8240
|
+
const { srcDELogicParamId, srcFieldName, srcValue, expression } = srcValParams;
|
|
7937
8241
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
7938
8242
|
let srcField = srcFieldName;
|
|
7939
8243
|
let value;
|
|
@@ -7963,6 +8267,15 @@ function handleSrcVal(ctx, srcValParams) {
|
|
|
7963
8267
|
case "ENVPARAM":
|
|
7964
8268
|
value = clone9(ibiz.env);
|
|
7965
8269
|
break;
|
|
8270
|
+
case "EXPRESSION":
|
|
8271
|
+
if (!expression) {
|
|
8272
|
+
throw new ModelError10(srcValParams, "\u8868\u8FBE\u5F0F\u4E3A\u7A7A");
|
|
8273
|
+
}
|
|
8274
|
+
value = ScriptFactory.execScriptFn(ctx, expression, {
|
|
8275
|
+
singleRowReturn: true,
|
|
8276
|
+
isAsync: false
|
|
8277
|
+
});
|
|
8278
|
+
break;
|
|
7966
8279
|
default:
|
|
7967
8280
|
throw new ModelError10(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
7968
8281
|
}
|
|
@@ -8153,12 +8466,12 @@ var DataSetNode = class extends DELogicNode {
|
|
|
8153
8466
|
};
|
|
8154
8467
|
|
|
8155
8468
|
// src/de-logic/de-logic-node/bind-param-node/bind-param-node.ts
|
|
8156
|
-
import { RuntimeModelError as
|
|
8469
|
+
import { RuntimeModelError as RuntimeModelError15 } from "@ibiz-template/core";
|
|
8157
8470
|
var BindParamNode = class extends DELogicNode {
|
|
8158
8471
|
async exec(ctx) {
|
|
8159
8472
|
const { dstDELogicParamId, srcDELogicParamId } = this.model;
|
|
8160
8473
|
if (!dstDELogicParamId || !srcDELogicParamId) {
|
|
8161
|
-
throw new
|
|
8474
|
+
throw new RuntimeModelError15(
|
|
8162
8475
|
this.model,
|
|
8163
8476
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
8164
8477
|
);
|
|
@@ -8169,37 +8482,37 @@ var BindParamNode = class extends DELogicNode {
|
|
|
8169
8482
|
};
|
|
8170
8483
|
|
|
8171
8484
|
// src/de-logic/de-logic-node/reset-param-node/reset-param-node.ts
|
|
8172
|
-
import { RuntimeModelError as
|
|
8485
|
+
import { RuntimeModelError as RuntimeModelError16 } from "@ibiz-template/core";
|
|
8173
8486
|
var ResetParamNode = class extends DELogicNode {
|
|
8174
8487
|
async exec(ctx) {
|
|
8175
8488
|
const { dstDELogicParamId } = this.model;
|
|
8176
8489
|
if (!dstDELogicParamId) {
|
|
8177
|
-
throw new
|
|
8490
|
+
throw new RuntimeModelError16(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
8178
8491
|
}
|
|
8179
8492
|
ctx.resetParam(dstDELogicParamId);
|
|
8180
8493
|
}
|
|
8181
8494
|
};
|
|
8182
8495
|
|
|
8183
8496
|
// src/de-logic/de-logic-node/renew-param-node/renew-param-node.ts
|
|
8184
|
-
import { RuntimeModelError as
|
|
8497
|
+
import { RuntimeModelError as RuntimeModelError17 } from "@ibiz-template/core";
|
|
8185
8498
|
var RenewParamNode = class extends DELogicNode {
|
|
8186
8499
|
async exec(ctx) {
|
|
8187
8500
|
const { dstDELogicParamId } = this.model;
|
|
8188
8501
|
if (!dstDELogicParamId) {
|
|
8189
|
-
throw new
|
|
8502
|
+
throw new RuntimeModelError17(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
8190
8503
|
}
|
|
8191
8504
|
ctx.renewParam(dstDELogicParamId);
|
|
8192
8505
|
}
|
|
8193
8506
|
};
|
|
8194
8507
|
|
|
8195
8508
|
// src/de-logic/de-logic-node/copy-param-node/copy-param-node.ts
|
|
8196
|
-
import { RuntimeModelError as
|
|
8509
|
+
import { RuntimeModelError as RuntimeModelError18 } from "@ibiz-template/core";
|
|
8197
8510
|
import { clone as clone11 } from "ramda";
|
|
8198
8511
|
var CopyParamNode = class extends DELogicNode {
|
|
8199
8512
|
async exec(ctx) {
|
|
8200
8513
|
const { dstDELogicParamId, srcDELogicParamId } = this.model;
|
|
8201
8514
|
if (!dstDELogicParamId || !srcDELogicParamId) {
|
|
8202
|
-
throw new
|
|
8515
|
+
throw new RuntimeModelError18(
|
|
8203
8516
|
this.model,
|
|
8204
8517
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
8205
8518
|
);
|
|
@@ -8210,12 +8523,12 @@ var CopyParamNode = class extends DELogicNode {
|
|
|
8210
8523
|
};
|
|
8211
8524
|
|
|
8212
8525
|
// src/de-logic/de-logic-node/sort-param-node/sort-param-node.ts
|
|
8213
|
-
import { RuntimeModelError as
|
|
8526
|
+
import { RuntimeModelError as RuntimeModelError19 } from "@ibiz-template/core";
|
|
8214
8527
|
var SortParamNode = class extends DELogicNode {
|
|
8215
8528
|
async exec(ctx) {
|
|
8216
8529
|
const { dstDELogicParamId, dstSortDir, dstFieldName } = this.model;
|
|
8217
8530
|
if (!dstDELogicParamId || !dstFieldName) {
|
|
8218
|
-
throw new
|
|
8531
|
+
throw new RuntimeModelError19(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
|
|
8219
8532
|
}
|
|
8220
8533
|
const key = dstFieldName.toLowerCase();
|
|
8221
8534
|
const arr = ctx.params[dstDELogicParamId];
|
|
@@ -8226,7 +8539,7 @@ var SortParamNode = class extends DELogicNode {
|
|
|
8226
8539
|
};
|
|
8227
8540
|
|
|
8228
8541
|
// src/de-logic/de-logic-node/append-param-node/append-param-node.ts
|
|
8229
|
-
import { RuntimeModelError as
|
|
8542
|
+
import { RuntimeModelError as RuntimeModelError20 } from "@ibiz-template/core";
|
|
8230
8543
|
var AppendParamNode = class extends DELogicNode {
|
|
8231
8544
|
async exec(ctx) {
|
|
8232
8545
|
const {
|
|
@@ -8237,7 +8550,7 @@ var AppendParamNode = class extends DELogicNode {
|
|
|
8237
8550
|
srcSize
|
|
8238
8551
|
} = this.model;
|
|
8239
8552
|
if (!dstDELogicParamId || !srcDELogicParamId) {
|
|
8240
|
-
throw new
|
|
8553
|
+
throw new RuntimeModelError20(
|
|
8241
8554
|
this.model,
|
|
8242
8555
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
8243
8556
|
);
|
|
@@ -8386,7 +8699,7 @@ var DELogic = class {
|
|
|
8386
8699
|
var _a, _b;
|
|
8387
8700
|
if (model.customCode) {
|
|
8388
8701
|
if (!model.scriptCode) {
|
|
8389
|
-
throw new
|
|
8702
|
+
throw new RuntimeModelError21(model, "\u811A\u672C\u4EE3\u7801\u6A21\u5F0F\u6CA1\u6709\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
8390
8703
|
}
|
|
8391
8704
|
this.scriptFn = ScriptFactory.createScriptFn([], model.scriptCode, {
|
|
8392
8705
|
isAsync: true
|
|
@@ -8394,7 +8707,7 @@ var DELogic = class {
|
|
|
8394
8707
|
return;
|
|
8395
8708
|
}
|
|
8396
8709
|
if (!((_a = model.delogicNodes) == null ? void 0 : _a.length)) {
|
|
8397
|
-
throw new
|
|
8710
|
+
throw new RuntimeModelError21(model, "\u5B9E\u4F53\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
8398
8711
|
}
|
|
8399
8712
|
model.delogicNodes.forEach((node) => {
|
|
8400
8713
|
const { logicNodeType } = node;
|
|
@@ -8493,7 +8806,7 @@ var DELogic = class {
|
|
|
8493
8806
|
const start = this.nodes.get(startDELogicNodeId);
|
|
8494
8807
|
await this.deepExec(start, ctx);
|
|
8495
8808
|
} else {
|
|
8496
|
-
throw new
|
|
8809
|
+
throw new RuntimeModelError21(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
8497
8810
|
}
|
|
8498
8811
|
if (ctx.isEndNode) {
|
|
8499
8812
|
return ctx.result;
|
|
@@ -8612,66 +8925,64 @@ var DEActionMethod = class extends Method {
|
|
|
8612
8925
|
return this.input.handle(context, data);
|
|
8613
8926
|
}
|
|
8614
8927
|
async exec(context, data, params) {
|
|
8615
|
-
|
|
8928
|
+
let result;
|
|
8929
|
+
if (data && !["READ", "GETDRAFT"].includes(this.method.actionMode)) {
|
|
8616
8930
|
await execFieldLogics(this.entity, "change", context, data, params);
|
|
8617
8931
|
}
|
|
8618
8932
|
if (this.method.actionType === "DELOGIC") {
|
|
8619
8933
|
const deLogic = findDELogic(this.method.appDELogicId, this.entity);
|
|
8620
8934
|
if (!deLogic) {
|
|
8621
|
-
throw new
|
|
8935
|
+
throw new RuntimeModelError22(this.method, "\u7F3A\u5C11\u5B9E\u4F53\u5904\u7406\u903B\u8F91");
|
|
8622
8936
|
}
|
|
8623
|
-
|
|
8624
|
-
}
|
|
8625
|
-
|
|
8626
|
-
|
|
8627
|
-
|
|
8628
|
-
|
|
8629
|
-
|
|
8630
|
-
|
|
8631
|
-
|
|
8632
|
-
|
|
8633
|
-
|
|
8634
|
-
|
|
8635
|
-
|
|
8636
|
-
|
|
8637
|
-
|
|
8638
|
-
|
|
8639
|
-
|
|
8640
|
-
|
|
8641
|
-
|
|
8642
|
-
|
|
8643
|
-
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
|
|
8647
|
-
|
|
8648
|
-
|
|
8649
|
-
|
|
8650
|
-
|
|
8651
|
-
|
|
8652
|
-
|
|
8653
|
-
|
|
8654
|
-
|
|
8655
|
-
|
|
8656
|
-
|
|
8657
|
-
|
|
8658
|
-
|
|
8659
|
-
|
|
8660
|
-
|
|
8661
|
-
|
|
8662
|
-
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
if (isNil10(srfkey)) {
|
|
8668
|
-
srfkey = isArray6(data) ? null : data == null ? void 0 : data[this.entity.keyAppDEFieldId];
|
|
8937
|
+
result = await execDELogicAction(deLogic, context, data, params);
|
|
8938
|
+
} else {
|
|
8939
|
+
if (data && !this.isLocalMode) {
|
|
8940
|
+
data = await this.inputHandle(context, data);
|
|
8941
|
+
}
|
|
8942
|
+
switch (this.method.codeName) {
|
|
8943
|
+
case "Create":
|
|
8944
|
+
result = await this.create(context, data, params || {});
|
|
8945
|
+
break;
|
|
8946
|
+
case "Get":
|
|
8947
|
+
result = await this.get(context, params);
|
|
8948
|
+
break;
|
|
8949
|
+
case "GetDraft":
|
|
8950
|
+
result = await this.getDraft(context, params);
|
|
8951
|
+
break;
|
|
8952
|
+
case "Remove":
|
|
8953
|
+
result = await this.remove(context, params);
|
|
8954
|
+
break;
|
|
8955
|
+
case "Update":
|
|
8956
|
+
result = await this.update(context, data, params);
|
|
8957
|
+
break;
|
|
8958
|
+
case "CreateTemp":
|
|
8959
|
+
result = await this.createTemp(context, data);
|
|
8960
|
+
break;
|
|
8961
|
+
case "GetTemp":
|
|
8962
|
+
result = await this.getTemp(context, data);
|
|
8963
|
+
break;
|
|
8964
|
+
case "GetDraftTemp":
|
|
8965
|
+
result = await this.getDraftTemp(context, params);
|
|
8966
|
+
break;
|
|
8967
|
+
case "RemoveTemp":
|
|
8968
|
+
result = await this.removeTemp(context, data);
|
|
8969
|
+
break;
|
|
8970
|
+
case "UpdateTemp":
|
|
8971
|
+
result = await this.updateTemp(context, data);
|
|
8972
|
+
break;
|
|
8973
|
+
default: {
|
|
8974
|
+
let path2 = this.calcPath(context);
|
|
8975
|
+
if (this.method.needResourceKey) {
|
|
8976
|
+
let srfkey = context[this.entity.codeName.toLowerCase()];
|
|
8977
|
+
if (isNil10(srfkey)) {
|
|
8978
|
+
srfkey = isArray6(data) ? null : data == null ? void 0 : data[this.entity.keyAppDEFieldId];
|
|
8979
|
+
}
|
|
8980
|
+
path2 = "".concat(path2, "/").concat(srfkey);
|
|
8669
8981
|
}
|
|
8670
|
-
|
|
8982
|
+
const res = await this.request(path2, context, data, params);
|
|
8983
|
+
res.data = await this.result.handle(context, res.data);
|
|
8984
|
+
result = res;
|
|
8671
8985
|
}
|
|
8672
|
-
const res = await this.request(path2, context, data, params);
|
|
8673
|
-
res.data = await this.result.handle(context, res.data);
|
|
8674
|
-
result = res;
|
|
8675
8986
|
}
|
|
8676
8987
|
}
|
|
8677
8988
|
if (result.data) {
|
|
@@ -8859,6 +9170,13 @@ var DEActionMethod = class extends Method {
|
|
|
8859
9170
|
if (!key && context) {
|
|
8860
9171
|
key = context[this.entity.codeName.toLowerCase()];
|
|
8861
9172
|
}
|
|
9173
|
+
try {
|
|
9174
|
+
await this.associationDeletion(key, context, params);
|
|
9175
|
+
} catch (error) {
|
|
9176
|
+
throw new HttpError5({
|
|
9177
|
+
response: new HttpResponse3(null, 500, error.message)
|
|
9178
|
+
});
|
|
9179
|
+
}
|
|
8862
9180
|
const data = this.service.local.delete(context, key);
|
|
8863
9181
|
if (data) {
|
|
8864
9182
|
return new HttpResponse3(data);
|
|
@@ -8868,6 +9186,100 @@ var DEActionMethod = class extends Method {
|
|
|
8868
9186
|
throw new HttpError5(err);
|
|
8869
9187
|
}
|
|
8870
9188
|
}
|
|
9189
|
+
/**
|
|
9190
|
+
* 关联删除
|
|
9191
|
+
*
|
|
9192
|
+
* @author chitanda
|
|
9193
|
+
* @date 2024-01-17 16:01:47
|
|
9194
|
+
* @protected
|
|
9195
|
+
* @param {string} key
|
|
9196
|
+
* @param {IContext} context
|
|
9197
|
+
* @param {IParams} [params]
|
|
9198
|
+
* @return {*} {Promise<void>}
|
|
9199
|
+
*/
|
|
9200
|
+
async associationDeletion(key, context, _params) {
|
|
9201
|
+
const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
|
|
9202
|
+
const t = uiDomain.transaction;
|
|
9203
|
+
let selfOpenTransaction = false;
|
|
9204
|
+
if (t.state.isOpen === false) {
|
|
9205
|
+
t.open();
|
|
9206
|
+
selfOpenTransaction = true;
|
|
9207
|
+
}
|
|
9208
|
+
try {
|
|
9209
|
+
let configs = uiDomain.getDERConfigByMajor(this.entity.id);
|
|
9210
|
+
if (configs.length > 0) {
|
|
9211
|
+
const data = this.service.local.get(context, key);
|
|
9212
|
+
configs = ascSort(configs, "removeOrder");
|
|
9213
|
+
for (const config of configs) {
|
|
9214
|
+
if (config.rstype !== "DER1N") {
|
|
9215
|
+
throw new RuntimeModelError22(
|
|
9216
|
+
config,
|
|
9217
|
+
"\u76EE\u524D\u53EA\u652F\u6301[DER1N]\u5173\u7CFB\u7C7B\u578B\u5173\u8054\u5220\u9664\u5220\u9664"
|
|
9218
|
+
);
|
|
9219
|
+
}
|
|
9220
|
+
const {
|
|
9221
|
+
removeActionType,
|
|
9222
|
+
removeRejectMsg,
|
|
9223
|
+
minorAppDataEntityId,
|
|
9224
|
+
nestedAppDEDataSetId = "FetchDefault"
|
|
9225
|
+
} = config;
|
|
9226
|
+
const app = ibiz.hub.getApp(this.entity.appId);
|
|
9227
|
+
const minorService = await app.deService.getService(
|
|
9228
|
+
context,
|
|
9229
|
+
minorAppDataEntityId
|
|
9230
|
+
);
|
|
9231
|
+
const _context = clone14(context);
|
|
9232
|
+
_context[this.entity.codeName.toLowerCase()] = key;
|
|
9233
|
+
const res = await minorService.exec(nestedAppDEDataSetId, _context);
|
|
9234
|
+
const items = res.data || [];
|
|
9235
|
+
switch (removeActionType) {
|
|
9236
|
+
case 1: {
|
|
9237
|
+
for (let i = 0; i < items.length; i++) {
|
|
9238
|
+
const item = items[i];
|
|
9239
|
+
_context[minorService.model.codeName.toLowerCase()] = item.srfkey;
|
|
9240
|
+
const res2 = await minorService.remove(_context, item);
|
|
9241
|
+
if (res2.ok === false) {
|
|
9242
|
+
throw new Error(res2.statusText);
|
|
9243
|
+
}
|
|
9244
|
+
}
|
|
9245
|
+
break;
|
|
9246
|
+
}
|
|
9247
|
+
case 2:
|
|
9248
|
+
for (let i = 0; i < items.length; i++) {
|
|
9249
|
+
const item = items[i];
|
|
9250
|
+
_context[minorService.model.codeName.toLowerCase()] = item.srfkey;
|
|
9251
|
+
item[config.parentAppDEFieldId.toLowerCase()] = void 0;
|
|
9252
|
+
const res2 = await minorService.updateTemp(_context, item);
|
|
9253
|
+
if (res2.ok === false) {
|
|
9254
|
+
throw new Error(res2.statusText);
|
|
9255
|
+
}
|
|
9256
|
+
}
|
|
9257
|
+
break;
|
|
9258
|
+
case 3:
|
|
9259
|
+
if (items.length > 0) {
|
|
9260
|
+
const msg = items.map((item) => item.srfmajortext).join("\u3001");
|
|
9261
|
+
const message = "\u65E0\u6CD5\u5220\u9664[".concat(this.entity.logicName, "-").concat(data.srfmajortext, "], \u6570\u636E\u88AB[").concat(minorService.model.logicName, "-").concat(msg, "]\u5F15\u7528");
|
|
9262
|
+
throw new Error(removeRejectMsg || message);
|
|
9263
|
+
}
|
|
9264
|
+
break;
|
|
9265
|
+
default:
|
|
9266
|
+
}
|
|
9267
|
+
}
|
|
9268
|
+
}
|
|
9269
|
+
if (selfOpenTransaction && t.state.isOpen) {
|
|
9270
|
+
t.commit();
|
|
9271
|
+
}
|
|
9272
|
+
} catch (error) {
|
|
9273
|
+
if (selfOpenTransaction && t.state.isOpen) {
|
|
9274
|
+
t.rollback();
|
|
9275
|
+
}
|
|
9276
|
+
throw error;
|
|
9277
|
+
} finally {
|
|
9278
|
+
if (selfOpenTransaction && t.state.isOpen) {
|
|
9279
|
+
t.close();
|
|
9280
|
+
}
|
|
9281
|
+
}
|
|
9282
|
+
}
|
|
8871
9283
|
/**
|
|
8872
9284
|
* 更新临时数据
|
|
8873
9285
|
*
|
|
@@ -8955,8 +9367,9 @@ var DEActionMethod = class extends Method {
|
|
|
8955
9367
|
if (configs.length > 0) {
|
|
8956
9368
|
configs.forEach((config) => {
|
|
8957
9369
|
if (config.parentAppDEFieldId) {
|
|
8958
|
-
const {
|
|
8959
|
-
const
|
|
9370
|
+
const { majorAppDataEntityId, parentAppDEFieldId } = config;
|
|
9371
|
+
const majorDECodeName = calcDeCodeNameById(majorAppDataEntityId);
|
|
9372
|
+
const majorLowerCodeName = majorDECodeName;
|
|
8960
9373
|
const pickupLowerDEFName = parentAppDEFieldId.toLowerCase();
|
|
8961
9374
|
const majorkey = context[majorLowerCodeName];
|
|
8962
9375
|
if (majorkey && majorkey !== data.srfkey) {
|
|
@@ -8980,43 +9393,42 @@ var DeActionDeMethodProvider = class {
|
|
|
8980
9393
|
import {
|
|
8981
9394
|
HttpResponse as HttpResponse4,
|
|
8982
9395
|
ModelError as ModelError14,
|
|
8983
|
-
RuntimeModelError as
|
|
9396
|
+
RuntimeModelError as RuntimeModelError23
|
|
8984
9397
|
} from "@ibiz-template/core";
|
|
8985
9398
|
import { isArray as isArray7 } from "lodash-es";
|
|
8986
|
-
import { clone as
|
|
8987
|
-
import { ascSort, descSort } from "qx-util";
|
|
9399
|
+
import { clone as clone15, isEmpty as isEmpty7, isNil as isNil11 } from "ramda";
|
|
9400
|
+
import { ascSort as ascSort2, descSort } from "qx-util";
|
|
8988
9401
|
var FetchMethod = class extends Method {
|
|
8989
9402
|
async exec(context, params, params2) {
|
|
8990
9403
|
const searchParams = params && !isArray7(params) ? params : params2 || {};
|
|
9404
|
+
let res;
|
|
8991
9405
|
if (this.isLocalMode) {
|
|
8992
9406
|
const cond = DEDQCondUtil.getCond(this.method);
|
|
8993
|
-
const
|
|
8994
|
-
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
|
|
9013
|
-
|
|
9014
|
-
|
|
9015
|
-
|
|
9016
|
-
|
|
9407
|
+
const filter = new SearchFilter(context, searchParams);
|
|
9408
|
+
const items = await this.searchLocal(cond, filter);
|
|
9409
|
+
res = new HttpResponse4(items, 200);
|
|
9410
|
+
} else {
|
|
9411
|
+
switch (this.method.dataSetType) {
|
|
9412
|
+
case "INDEXDE":
|
|
9413
|
+
case "CODELIST":
|
|
9414
|
+
case "MULTIFORM":
|
|
9415
|
+
res = await this.fetchCodeListSet(context, searchParams);
|
|
9416
|
+
break;
|
|
9417
|
+
case "REMOTE":
|
|
9418
|
+
{
|
|
9419
|
+
const path2 = this.calcPath(context);
|
|
9420
|
+
res = await this.request(path2, context, params, params2);
|
|
9421
|
+
}
|
|
9422
|
+
break;
|
|
9423
|
+
default:
|
|
9424
|
+
throw new ModelError14(
|
|
9425
|
+
this.method,
|
|
9426
|
+
"\u6570\u636E\u6765\u6E90\u7C7B\u578B".concat(this.method.dataSetType, "\u6682\u672A\u652F\u6301")
|
|
9427
|
+
);
|
|
9428
|
+
}
|
|
9429
|
+
const items = res.data || [];
|
|
9430
|
+
res.data = items.map((item) => this.createEntity(item));
|
|
9017
9431
|
}
|
|
9018
|
-
const items = res.data || [];
|
|
9019
|
-
res.data = items.map((item) => this.createEntity(item));
|
|
9020
9432
|
if (res.data) {
|
|
9021
9433
|
await execFieldLogics(
|
|
9022
9434
|
this.entity,
|
|
@@ -9065,13 +9477,13 @@ var FetchMethod = class extends Method {
|
|
|
9065
9477
|
if (filter.sortMode === "DESC") {
|
|
9066
9478
|
list = descSort(list, filter.sortField);
|
|
9067
9479
|
} else {
|
|
9068
|
-
list =
|
|
9480
|
+
list = ascSort2(list, filter.sortField);
|
|
9069
9481
|
}
|
|
9070
9482
|
}
|
|
9071
9483
|
const { page, size } = filter;
|
|
9072
9484
|
const start = page * size;
|
|
9073
9485
|
const end = (page + 1) * size - 1;
|
|
9074
|
-
const items = list.slice(start, end).map((item) =>
|
|
9486
|
+
const items = list.slice(start, end).map((item) => clone15(item));
|
|
9075
9487
|
return items;
|
|
9076
9488
|
}
|
|
9077
9489
|
/**
|
|
@@ -9085,7 +9497,7 @@ var FetchMethod = class extends Method {
|
|
|
9085
9497
|
async fetchCodeListSet(context, params) {
|
|
9086
9498
|
const { appCodeListId } = this.method;
|
|
9087
9499
|
if (!appCodeListId) {
|
|
9088
|
-
throw new
|
|
9500
|
+
throw new RuntimeModelError23(this.method, "\u6CA1\u6709\u6307\u5B9A\u6570\u636E\u6765\u6E90\u4EE3\u7801\u8868");
|
|
9089
9501
|
}
|
|
9090
9502
|
const codeItems = await this.app.codeList.get(
|
|
9091
9503
|
appCodeListId,
|
|
@@ -9165,6 +9577,9 @@ var TreeNodeData = class {
|
|
|
9165
9577
|
if (sysImage.imagePath) {
|
|
9166
9578
|
icon.imagePath = sysImage.imagePath;
|
|
9167
9579
|
}
|
|
9580
|
+
if (sysImage.rawContent) {
|
|
9581
|
+
icon.htmlStr = sysImage.rawContent;
|
|
9582
|
+
}
|
|
9168
9583
|
}
|
|
9169
9584
|
return Object.values(icon).length > 0 ? icon : void 0;
|
|
9170
9585
|
}
|
|
@@ -9199,15 +9614,14 @@ var TreeCodeListNodeData = class extends TreeNodeData {
|
|
|
9199
9614
|
|
|
9200
9615
|
// src/service/vo/tree-node-data/tree-data-set-node-data.ts
|
|
9201
9616
|
import { updateKeyDefine } from "@ibiz-template/core";
|
|
9202
|
-
import { isNil as isNil12 } from "ramda";
|
|
9203
|
-
var
|
|
9617
|
+
import { clone as clone16, isNil as isNil12 } from "ramda";
|
|
9618
|
+
var CloneExcludeKeys = ["_id", "_value", "_text", "_deData", "clone"];
|
|
9619
|
+
var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
9204
9620
|
constructor(model, parentNodeData, opts) {
|
|
9205
9621
|
var _a, _b;
|
|
9206
9622
|
super(model, parentNodeData, opts);
|
|
9207
9623
|
const { data } = opts;
|
|
9208
9624
|
this._deData = data;
|
|
9209
|
-
this._text = model.textAppDEFieldId ? data[model.textAppDEFieldId] : data.srfmajortext;
|
|
9210
|
-
this._value = model.idAppDEFieldId ? data[model.idAppDEFieldId] : data.srfkey;
|
|
9211
9625
|
const selfId = "".concat(model.id, "@").concat(data.srfkey).toLowerCase();
|
|
9212
9626
|
Object.defineProperty(this, "_id", {
|
|
9213
9627
|
get() {
|
|
@@ -9216,6 +9630,20 @@ var TreeDataSetNodeData = class extends TreeNodeData {
|
|
|
9216
9630
|
enumerable: true,
|
|
9217
9631
|
configurable: true
|
|
9218
9632
|
});
|
|
9633
|
+
Object.defineProperty(this, "_text", {
|
|
9634
|
+
get() {
|
|
9635
|
+
return model.textAppDEFieldId ? data[model.textAppDEFieldId] : data.srfmajortext;
|
|
9636
|
+
},
|
|
9637
|
+
enumerable: true,
|
|
9638
|
+
configurable: true
|
|
9639
|
+
});
|
|
9640
|
+
Object.defineProperty(this, "_value", {
|
|
9641
|
+
get() {
|
|
9642
|
+
return model.idAppDEFieldId ? data[model.idAppDEFieldId] : data.srfkey;
|
|
9643
|
+
},
|
|
9644
|
+
enumerable: true,
|
|
9645
|
+
configurable: true
|
|
9646
|
+
});
|
|
9219
9647
|
if (model.appDataEntityId) {
|
|
9220
9648
|
const deName = calcDeCodeNameById(model.appDataEntityId);
|
|
9221
9649
|
this._context = Object.assign(this._context || {}, {
|
|
@@ -9228,14 +9656,13 @@ var TreeDataSetNodeData = class extends TreeNodeData {
|
|
|
9228
9656
|
this._leaf = fieldValueToBoolean(data[model.leafFlagAppDEFieldId]);
|
|
9229
9657
|
}
|
|
9230
9658
|
const dataItemKeyMap = /* @__PURE__ */ new Map();
|
|
9231
|
-
|
|
9232
|
-
dataItemKeyMap.set("srfmajortext", "srfmajortext");
|
|
9659
|
+
const dataItemDefaultMap = /* @__PURE__ */ new Map();
|
|
9233
9660
|
(_a = model.detreeNodeDataItems) == null ? void 0 : _a.forEach((dataItem) => {
|
|
9234
|
-
const
|
|
9661
|
+
const dataItemKey = dataItem.id.toLowerCase();
|
|
9235
9662
|
const deFieldKey = dataItem.appDEFieldId.toLowerCase();
|
|
9236
|
-
dataItemKeyMap.set(
|
|
9237
|
-
if (dataItem.defaultValue
|
|
9238
|
-
|
|
9663
|
+
dataItemKeyMap.set(dataItemKey, deFieldKey);
|
|
9664
|
+
if (dataItem.defaultValue) {
|
|
9665
|
+
dataItemDefaultMap.set(dataItemKey, dataItem.defaultValue);
|
|
9239
9666
|
}
|
|
9240
9667
|
});
|
|
9241
9668
|
const nodeColumnKeyMap = /* @__PURE__ */ new Map();
|
|
@@ -9245,35 +9672,60 @@ var TreeDataSetNodeData = class extends TreeNodeData {
|
|
|
9245
9672
|
if (!columnKey || !dataItemKey) {
|
|
9246
9673
|
ibiz.log.error("\u6A21\u578B\u5F02\u5E38\u7F3A\u5C11detreeColumnId\u6216\u8005dataItemName", column);
|
|
9247
9674
|
} else {
|
|
9248
|
-
nodeColumnKeyMap.set(columnKey,
|
|
9675
|
+
nodeColumnKeyMap.set(columnKey, dataItemKey);
|
|
9249
9676
|
}
|
|
9250
9677
|
});
|
|
9678
|
+
const getDeKey = (key) => {
|
|
9679
|
+
if (nodeColumnKeyMap.has(key)) {
|
|
9680
|
+
return dataItemKeyMap.get(nodeColumnKeyMap.get(key));
|
|
9681
|
+
}
|
|
9682
|
+
if (dataItemKeyMap.has(key)) {
|
|
9683
|
+
return dataItemKeyMap.get(key);
|
|
9684
|
+
}
|
|
9685
|
+
if (Object.prototype.hasOwnProperty.call(this._deData, key)) {
|
|
9686
|
+
return key;
|
|
9687
|
+
}
|
|
9688
|
+
};
|
|
9689
|
+
const getKeyDefault = (key) => {
|
|
9690
|
+
if (nodeColumnKeyMap.has(key)) {
|
|
9691
|
+
return dataItemDefaultMap.get(nodeColumnKeyMap.get(key));
|
|
9692
|
+
}
|
|
9693
|
+
if (dataItemDefaultMap.has(key)) {
|
|
9694
|
+
return dataItemDefaultMap.get(key);
|
|
9695
|
+
}
|
|
9696
|
+
};
|
|
9697
|
+
this.clone = () => {
|
|
9698
|
+
const cloneData = clone16(this._deData);
|
|
9699
|
+
const cloneNodeData = new _TreeDataSetNodeData(model, this._parent, {
|
|
9700
|
+
data: cloneData,
|
|
9701
|
+
leaf: this._leaf,
|
|
9702
|
+
navContext: this._context,
|
|
9703
|
+
navParams: this._params
|
|
9704
|
+
});
|
|
9705
|
+
Object.keys(this).forEach((key) => {
|
|
9706
|
+
const deKey = getDeKey(key);
|
|
9707
|
+
if (isNil12(deKey) && !CloneExcludeKeys.includes(key)) {
|
|
9708
|
+
cloneNodeData[key] = this[key];
|
|
9709
|
+
}
|
|
9710
|
+
});
|
|
9711
|
+
return cloneNodeData;
|
|
9712
|
+
};
|
|
9251
9713
|
return new Proxy(this, {
|
|
9252
9714
|
set(target, p, value) {
|
|
9253
|
-
|
|
9254
|
-
|
|
9255
|
-
|
|
9256
|
-
target._deData[dataItemKeyMap.get(p)] = value;
|
|
9257
|
-
} else if (Object.prototype.hasOwnProperty.call(target._deData, p)) {
|
|
9258
|
-
target._deData[p] = value;
|
|
9715
|
+
const deKey = getDeKey(p);
|
|
9716
|
+
if (!isNil12(deKey)) {
|
|
9717
|
+
target._deData[deKey] = value;
|
|
9259
9718
|
} else {
|
|
9260
9719
|
target[p] = value;
|
|
9261
9720
|
}
|
|
9262
9721
|
return true;
|
|
9263
9722
|
},
|
|
9264
9723
|
get(target, p, _receiver) {
|
|
9265
|
-
|
|
9266
|
-
|
|
9267
|
-
|
|
9268
|
-
if (nodeColumnKeyMap.has(p)) {
|
|
9269
|
-
return target._deData[nodeColumnKeyMap.get(p)];
|
|
9270
|
-
}
|
|
9271
|
-
if (dataItemKeyMap.has(p)) {
|
|
9272
|
-
return target._deData[dataItemKeyMap.get(p)];
|
|
9273
|
-
}
|
|
9274
|
-
if (target._deData[p] !== void 0) {
|
|
9275
|
-
return target._deData[p];
|
|
9724
|
+
const deKey = getDeKey(p);
|
|
9725
|
+
if (!isNil12(deKey)) {
|
|
9726
|
+
return isNil12(target._deData[deKey]) ? getKeyDefault(p) : target._deData[deKey];
|
|
9276
9727
|
}
|
|
9728
|
+
return target[p];
|
|
9277
9729
|
},
|
|
9278
9730
|
ownKeys(target) {
|
|
9279
9731
|
const allKeys = [
|
|
@@ -9896,10 +10348,10 @@ var MqttService = class {
|
|
|
9896
10348
|
ibiz.log.debug("mqtt message", topic, payload.toString());
|
|
9897
10349
|
});
|
|
9898
10350
|
this.client.on("reconnect", () => {
|
|
9899
|
-
ibiz.log.
|
|
10351
|
+
ibiz.log.warn("mqtt reconnect");
|
|
9900
10352
|
});
|
|
9901
10353
|
this.client.on("close", () => {
|
|
9902
|
-
|
|
10354
|
+
ibiz.log.warn("mqtt close");
|
|
9903
10355
|
});
|
|
9904
10356
|
}
|
|
9905
10357
|
/**
|
|
@@ -10061,7 +10513,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
10061
10513
|
* @return {*} {(Promise<IModalData | void>)}
|
|
10062
10514
|
*/
|
|
10063
10515
|
async exec(appViewId, _context, params = {}, opts = {}) {
|
|
10064
|
-
const context =
|
|
10516
|
+
const context = clone17(_context);
|
|
10065
10517
|
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
10066
10518
|
if (!appView) {
|
|
10067
10519
|
throw new RuntimeError23("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
|
|
@@ -10087,7 +10539,13 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
10087
10539
|
);
|
|
10088
10540
|
}
|
|
10089
10541
|
const { openMode = "INDEXVIEWTAB" } = appView;
|
|
10090
|
-
|
|
10542
|
+
const viewOpenMode = opts.openMode || openMode;
|
|
10543
|
+
if (viewOpenMode !== void 0 && viewOpenMode !== "INDEXVIEWTAB") {
|
|
10544
|
+
if (context.toRouteDepth) {
|
|
10545
|
+
context.toRouteDepth = void 0;
|
|
10546
|
+
}
|
|
10547
|
+
}
|
|
10548
|
+
switch (viewOpenMode) {
|
|
10091
10549
|
case "INDEXVIEWTAB":
|
|
10092
10550
|
if (opts.noWaitRoute) {
|
|
10093
10551
|
this.openIndexViewTab(appView, context, params);
|
|
@@ -10326,7 +10784,7 @@ function installCommand() {
|
|
|
10326
10784
|
}
|
|
10327
10785
|
|
|
10328
10786
|
// src/app-hub.ts
|
|
10329
|
-
import { RuntimeError as
|
|
10787
|
+
import { RuntimeError as RuntimeError63 } from "@ibiz-template/core";
|
|
10330
10788
|
|
|
10331
10789
|
// src/application.ts
|
|
10332
10790
|
import { Net, getToken } from "@ibiz-template/core";
|
|
@@ -10381,7 +10839,7 @@ var Application = class {
|
|
|
10381
10839
|
async init() {
|
|
10382
10840
|
await this.authority.init();
|
|
10383
10841
|
await this.loadAppModelStyle();
|
|
10384
|
-
if (ibiz.env.enableMqtt && ibiz.appData) {
|
|
10842
|
+
if (ibiz.env.enableMqtt && ibiz.appData && ibiz.auth.isAnonymous !== true) {
|
|
10385
10843
|
this.mqtt = new MqttService(
|
|
10386
10844
|
ibiz.appData.mqtttopic,
|
|
10387
10845
|
getToken(),
|
|
@@ -10615,6 +11073,13 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
10615
11073
|
return PanelNotifyState2;
|
|
10616
11074
|
})(PanelNotifyState || {});
|
|
10617
11075
|
|
|
11076
|
+
// src/controller/constant/control/tree-grid-ex/tree-grid-ex-notify.state.ts
|
|
11077
|
+
var TreeGridExNotifyState = /* @__PURE__ */ ((TreeGridExNotifyState2) => {
|
|
11078
|
+
TreeGridExNotifyState2["LOAD"] = "LOAD";
|
|
11079
|
+
TreeGridExNotifyState2["SAVE"] = "SAVE";
|
|
11080
|
+
return TreeGridExNotifyState2;
|
|
11081
|
+
})(TreeGridExNotifyState || {});
|
|
11082
|
+
|
|
10618
11083
|
// src/controller/common/view/view.controller.ts
|
|
10619
11084
|
import { notNilEmpty as notNilEmpty6 } from "qx-util";
|
|
10620
11085
|
import { IBizContext as IBizContext2, RuntimeError as RuntimeError32 } from "@ibiz-template/core";
|
|
@@ -11570,7 +12035,10 @@ async function exportData(header, data, fileName) {
|
|
|
11570
12035
|
async function getEntitySchema(entityId, context) {
|
|
11571
12036
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
11572
12037
|
const entity = await ibiz.hub.getAppDataEntity(entityId, context.srfappid);
|
|
11573
|
-
|
|
12038
|
+
let url = "/jsonschema/".concat(entity.name);
|
|
12039
|
+
if (entity.dynaSysMode === 0 && ibiz.appData) {
|
|
12040
|
+
url += "?dynamodeltag=".concat(ibiz.appData.dynamodeltag);
|
|
12041
|
+
}
|
|
11574
12042
|
const res = await app.net.get(url);
|
|
11575
12043
|
return res.data;
|
|
11576
12044
|
}
|
|
@@ -11792,7 +12260,7 @@ var BaseController = class {
|
|
|
11792
12260
|
};
|
|
11793
12261
|
|
|
11794
12262
|
// src/controller/utils/view-msg/view-msg-controller.ts
|
|
11795
|
-
import { RuntimeError as RuntimeError31, RuntimeModelError as
|
|
12263
|
+
import { RuntimeError as RuntimeError31, RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
|
|
11796
12264
|
import { isNil as isNil18, mergeRight as mergeRight2 } from "ramda";
|
|
11797
12265
|
var ViewMsgController = class _ViewMsgController {
|
|
11798
12266
|
constructor(msgGroupId) {
|
|
@@ -11857,7 +12325,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
11857
12325
|
static async fetchDataSet(msgModel, context, params) {
|
|
11858
12326
|
const { appDataEntityId, appDEDataSetId } = msgModel;
|
|
11859
12327
|
if (!appDEDataSetId) {
|
|
11860
|
-
throw new
|
|
12328
|
+
throw new RuntimeModelError24(msgModel, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6570\u636E\u96C6");
|
|
11861
12329
|
}
|
|
11862
12330
|
const res = await ibiz.hub.getApp(context.srfappid).deService.exec(appDataEntityId, appDEDataSetId, context, params);
|
|
11863
12331
|
if (res.data.length) {
|
|
@@ -11951,7 +12419,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
11951
12419
|
msgPosAppDEFieldId
|
|
11952
12420
|
} = msgModel;
|
|
11953
12421
|
if (!appDataEntityId) {
|
|
11954
|
-
throw new
|
|
12422
|
+
throw new RuntimeModelError24(msgModel, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
|
|
11955
12423
|
}
|
|
11956
12424
|
const entity = await ibiz.hub.getAppDataEntity(
|
|
11957
12425
|
appDataEntityId,
|
|
@@ -12203,17 +12671,19 @@ var ViewController = class extends BaseController {
|
|
|
12203
12671
|
(_a = this.scheduler) == null ? void 0 : _a.startTimerTrigger();
|
|
12204
12672
|
}
|
|
12205
12673
|
async onDestroyed() {
|
|
12674
|
+
const srfSessionId = this.context.srfsessionid;
|
|
12206
12675
|
await super.onDestroyed();
|
|
12207
12676
|
if (this.engines.length) {
|
|
12208
12677
|
await Promise.all(this.engines.map((engine) => engine.onDestroyed()));
|
|
12209
12678
|
}
|
|
12679
|
+
Object.values(this.counters).forEach((counter) => counter.destroy());
|
|
12210
12680
|
this.ctx.destroy();
|
|
12211
12681
|
this.engines = [];
|
|
12212
12682
|
if (this.scheduler) {
|
|
12213
12683
|
this.scheduler.destroy();
|
|
12214
12684
|
}
|
|
12215
|
-
if (this.id ===
|
|
12216
|
-
ibiz.uiDomainManager.destroy(
|
|
12685
|
+
if (this.id === srfSessionId) {
|
|
12686
|
+
ibiz.uiDomainManager.destroy(srfSessionId);
|
|
12217
12687
|
}
|
|
12218
12688
|
this.context.destroy();
|
|
12219
12689
|
ibiz.log.debug("\u89C6\u56FE[".concat(this.model.name, "](").concat(this.model.id, ")\u9500\u6BC1"));
|
|
@@ -12401,6 +12871,8 @@ var WFStepTraceViewController = class extends ViewController {
|
|
|
12401
12871
|
};
|
|
12402
12872
|
|
|
12403
12873
|
// src/controller/common/editor/editor.controller.ts
|
|
12874
|
+
import { DataTypes as DataTypes3 } from "@ibiz-template/core";
|
|
12875
|
+
import dayjs2 from "dayjs";
|
|
12404
12876
|
var EditorController = class {
|
|
12405
12877
|
/**
|
|
12406
12878
|
* Creates an instance of EditorController.
|
|
@@ -12446,6 +12918,26 @@ var EditorController = class {
|
|
|
12446
12918
|
get readonly() {
|
|
12447
12919
|
return !!this.model.readOnly;
|
|
12448
12920
|
}
|
|
12921
|
+
/**
|
|
12922
|
+
* 值格式化
|
|
12923
|
+
* @author lxm
|
|
12924
|
+
* @date 2024-01-11 10:18:33
|
|
12925
|
+
* @readonly
|
|
12926
|
+
* @type {(string | undefined)}
|
|
12927
|
+
*/
|
|
12928
|
+
get valueFormat() {
|
|
12929
|
+
return this.parent.valueFormat;
|
|
12930
|
+
}
|
|
12931
|
+
/**
|
|
12932
|
+
* 数据类型
|
|
12933
|
+
* @author lxm
|
|
12934
|
+
* @date 2024-01-11 10:18:55
|
|
12935
|
+
* @readonly
|
|
12936
|
+
* @type {(number | undefined)}
|
|
12937
|
+
*/
|
|
12938
|
+
get dataType() {
|
|
12939
|
+
return this.parent.dataType;
|
|
12940
|
+
}
|
|
12449
12941
|
/**
|
|
12450
12942
|
* 子类不可覆盖或重写此方法,在 init 时需要重写的使用 onInit 方法。
|
|
12451
12943
|
*
|
|
@@ -12528,10 +13020,35 @@ var EditorController = class {
|
|
|
12528
13020
|
toBoolean(value) {
|
|
12529
13021
|
return Object.is("true", value);
|
|
12530
13022
|
}
|
|
13023
|
+
/**
|
|
13024
|
+
* 值格式化
|
|
13025
|
+
* @author lxm
|
|
13026
|
+
* @date 2023-08-25 05:18:11
|
|
13027
|
+
* @param {unknown} value
|
|
13028
|
+
* @return {*} {string}
|
|
13029
|
+
*/
|
|
13030
|
+
formatValue(value = "") {
|
|
13031
|
+
if (this.model.valueType !== "SIMPLE") {
|
|
13032
|
+
return ValueExUtil.toText(this.model, value);
|
|
13033
|
+
}
|
|
13034
|
+
const strVal = "".concat(value);
|
|
13035
|
+
if (!this.valueFormat) {
|
|
13036
|
+
return strVal;
|
|
13037
|
+
}
|
|
13038
|
+
const isDate = DataTypes3.isDate(this.dataType);
|
|
13039
|
+
if (isDate) {
|
|
13040
|
+
const formatVal = dayjs2(strVal).format(this.valueFormat);
|
|
13041
|
+
if (formatVal !== "Invalid Date") {
|
|
13042
|
+
return formatVal;
|
|
13043
|
+
}
|
|
13044
|
+
return strVal;
|
|
13045
|
+
}
|
|
13046
|
+
return ibiz.util.text.format(strVal, this.valueFormat);
|
|
13047
|
+
}
|
|
12531
13048
|
};
|
|
12532
13049
|
|
|
12533
13050
|
// src/controller/common/editor/code-list-editor.controller.ts
|
|
12534
|
-
import { RuntimeModelError as
|
|
13051
|
+
import { RuntimeModelError as RuntimeModelError25 } from "@ibiz-template/core";
|
|
12535
13052
|
var CodeListEditorController = class extends EditorController {
|
|
12536
13053
|
/**
|
|
12537
13054
|
* 加载代码表数据
|
|
@@ -12555,7 +13072,7 @@ var CodeListEditorController = class extends EditorController {
|
|
|
12555
13072
|
);
|
|
12556
13073
|
return dataItems;
|
|
12557
13074
|
}
|
|
12558
|
-
throw new
|
|
13075
|
+
throw new RuntimeModelError25(
|
|
12559
13076
|
this.model,
|
|
12560
13077
|
"\u7F16\u8F91\u5668\u7C7B\u578B[".concat(this.model.editorType, "]\uFF0C\u672A\u914D\u7F6E\u4EE3\u7801\u8868")
|
|
12561
13078
|
);
|
|
@@ -12564,7 +13081,7 @@ var CodeListEditorController = class extends EditorController {
|
|
|
12564
13081
|
|
|
12565
13082
|
// src/controller/common/control/control.controller.ts
|
|
12566
13083
|
import { IBizContext as IBizContext3, IBizParams, NoticeError as NoticeError2 } from "@ibiz-template/core";
|
|
12567
|
-
import { clone as
|
|
13084
|
+
import { clone as clone18, isNil as isNil20 } from "ramda";
|
|
12568
13085
|
import { notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
12569
13086
|
var ControlController = class extends BaseController {
|
|
12570
13087
|
/**
|
|
@@ -12606,7 +13123,7 @@ var ControlController = class extends BaseController {
|
|
|
12606
13123
|
"".concat(model.controlType, "_DEFAULT")
|
|
12607
13124
|
);
|
|
12608
13125
|
if (panelModel) {
|
|
12609
|
-
this.controlPanel =
|
|
13126
|
+
this.controlPanel = clone18(panelModel);
|
|
12610
13127
|
}
|
|
12611
13128
|
}
|
|
12612
13129
|
this.updateContextParams({});
|
|
@@ -13358,7 +13875,7 @@ var MDControlController = class extends ControlController {
|
|
|
13358
13875
|
import {
|
|
13359
13876
|
findRecursiveChild,
|
|
13360
13877
|
RuntimeError as RuntimeError34,
|
|
13361
|
-
RuntimeModelError as
|
|
13878
|
+
RuntimeModelError as RuntimeModelError26
|
|
13362
13879
|
} from "@ibiz-template/core";
|
|
13363
13880
|
var AppMenuController = class extends ControlController {
|
|
13364
13881
|
constructor(model, context, params, ctx) {
|
|
@@ -13437,7 +13954,7 @@ var AppMenuController = class extends ControlController {
|
|
|
13437
13954
|
return provider.onClick(menuItem, event, this);
|
|
13438
13955
|
}
|
|
13439
13956
|
if (!menuItem.appFuncId) {
|
|
13440
|
-
throw new
|
|
13957
|
+
throw new RuntimeModelError26(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
|
|
13441
13958
|
}
|
|
13442
13959
|
const tempContext = this.context.clone();
|
|
13443
13960
|
tempContext.srfappid = menuItem.appId;
|
|
@@ -13556,7 +14073,7 @@ var AppMenuController = class extends ControlController {
|
|
|
13556
14073
|
import {
|
|
13557
14074
|
findRecursiveChild as findRecursiveChild2,
|
|
13558
14075
|
RuntimeError as RuntimeError35,
|
|
13559
|
-
RuntimeModelError as
|
|
14076
|
+
RuntimeModelError as RuntimeModelError27
|
|
13560
14077
|
} from "@ibiz-template/core";
|
|
13561
14078
|
var AppMenuIconViewController = class extends AppMenuController {
|
|
13562
14079
|
async onClickMenuItem(id, event) {
|
|
@@ -13572,7 +14089,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
13572
14089
|
event
|
|
13573
14090
|
});
|
|
13574
14091
|
if (!menuItem.appFuncId) {
|
|
13575
|
-
throw new
|
|
14092
|
+
throw new RuntimeModelError27(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
|
|
13576
14093
|
}
|
|
13577
14094
|
const tempContext = this.context.clone();
|
|
13578
14095
|
if (this.routeDepth === 1) {
|
|
@@ -13590,7 +14107,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
13590
14107
|
};
|
|
13591
14108
|
|
|
13592
14109
|
// src/controller/control/calendar/calendar.controller.ts
|
|
13593
|
-
import
|
|
14110
|
+
import dayjs3 from "dayjs";
|
|
13594
14111
|
|
|
13595
14112
|
// src/controller/control/calendar/calendar.service.ts
|
|
13596
14113
|
import { RuntimeError as RuntimeError36 } from "@ibiz-template/core";
|
|
@@ -13748,9 +14265,9 @@ var CalendarController = class extends MDControlController {
|
|
|
13748
14265
|
const x = a.beginTime;
|
|
13749
14266
|
const y = b.beginTime;
|
|
13750
14267
|
let result = 0;
|
|
13751
|
-
if (
|
|
14268
|
+
if (dayjs3(x).isAfter(y)) {
|
|
13752
14269
|
result = -1;
|
|
13753
|
-
} else if (
|
|
14270
|
+
} else if (dayjs3(x).isBefore(y)) {
|
|
13754
14271
|
result = 1;
|
|
13755
14272
|
}
|
|
13756
14273
|
return result;
|
|
@@ -13782,8 +14299,8 @@ var CalendarController = class extends MDControlController {
|
|
|
13782
14299
|
1
|
|
13783
14300
|
);
|
|
13784
14301
|
return {
|
|
13785
|
-
srfstartdate:
|
|
13786
|
-
srfenddate:
|
|
14302
|
+
srfstartdate: dayjs3(firstDayOfMonth).format("YYYY-MM-DD HH:mm:ss"),
|
|
14303
|
+
srfenddate: dayjs3(lastDayOfMonth).format("YYYY-MM-DD HH:mm:ss")
|
|
13787
14304
|
};
|
|
13788
14305
|
}
|
|
13789
14306
|
return { srfstartdate, srfenddate };
|
|
@@ -13868,22 +14385,22 @@ import { mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
|
13868
14385
|
import { RuntimeError as RuntimeError37 } from "@ibiz-template/core";
|
|
13869
14386
|
|
|
13870
14387
|
// src/controller/control/chart/generator/line-series-generator.ts
|
|
13871
|
-
import { RuntimeModelError as
|
|
14388
|
+
import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
|
|
13872
14389
|
|
|
13873
14390
|
// src/controller/control/chart/generator/base-series-generator.ts
|
|
13874
|
-
import { plus, RuntimeModelError as
|
|
13875
|
-
import
|
|
14391
|
+
import { plus, RuntimeModelError as RuntimeModelError28, toNumberOrNil } from "@ibiz-template/core";
|
|
14392
|
+
import dayjs4 from "dayjs";
|
|
13876
14393
|
import minMax from "dayjs/plugin/minMax";
|
|
13877
14394
|
import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
13878
14395
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
13879
14396
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
13880
14397
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
13881
|
-
import { clone as
|
|
13882
|
-
|
|
13883
|
-
|
|
13884
|
-
|
|
13885
|
-
|
|
13886
|
-
|
|
14398
|
+
import { clone as clone19, isNil as isNil21, mergeDeepRight } from "ramda";
|
|
14399
|
+
dayjs4.extend(minMax);
|
|
14400
|
+
dayjs4.extend(isSameOrBefore);
|
|
14401
|
+
dayjs4.extend(quarterOfYear);
|
|
14402
|
+
dayjs4.extend(weekOfYear);
|
|
14403
|
+
dayjs4.extend(isoWeek);
|
|
13887
14404
|
var DEFAULT_GROUP = "$default_group";
|
|
13888
14405
|
var BaseSeriesGenerator = class {
|
|
13889
14406
|
/**
|
|
@@ -13921,10 +14438,10 @@ var BaseSeriesGenerator = class {
|
|
|
13921
14438
|
this.chartGenerator = chartGenerator;
|
|
13922
14439
|
const { chartSeriesEncode, caption, id, userParam } = model;
|
|
13923
14440
|
if (!model.catalogField) {
|
|
13924
|
-
throw new
|
|
14441
|
+
throw new RuntimeModelError28(model, "\u7F3A\u5C11\u5206\u7C7B\u5C5E\u6027\u914D\u7F6E");
|
|
13925
14442
|
}
|
|
13926
14443
|
if (!model.valueField) {
|
|
13927
|
-
throw new
|
|
14444
|
+
throw new RuntimeModelError28(model, "\u7F3A\u5C11\u503C\u5C5E\u6027\u914D\u7F6E");
|
|
13928
14445
|
}
|
|
13929
14446
|
this.catalogField = chartGenerator.getFieldKey(model.catalogField);
|
|
13930
14447
|
this.valueField = chartGenerator.getFieldKey(model.valueField);
|
|
@@ -14153,7 +14670,7 @@ var BaseSeriesGenerator = class {
|
|
|
14153
14670
|
dataPreprocess(data) {
|
|
14154
14671
|
const tempData = [];
|
|
14155
14672
|
data.forEach((singleData) => {
|
|
14156
|
-
tempData.push(
|
|
14673
|
+
tempData.push(clone19(singleData));
|
|
14157
14674
|
});
|
|
14158
14675
|
const { groupMode } = this.model;
|
|
14159
14676
|
if (groupMode) {
|
|
@@ -14168,25 +14685,25 @@ var BaseSeriesGenerator = class {
|
|
|
14168
14685
|
format = "YYYY-MM";
|
|
14169
14686
|
}
|
|
14170
14687
|
if (singleData[this.catalogField]) {
|
|
14171
|
-
const formattedDate =
|
|
14688
|
+
const formattedDate = dayjs4(singleData[this.catalogField]).format(
|
|
14172
14689
|
format
|
|
14173
14690
|
);
|
|
14174
14691
|
singleData[this.catalogField] = formattedDate;
|
|
14175
14692
|
}
|
|
14176
14693
|
} else if (groupMode === "QUARTER") {
|
|
14177
14694
|
if (singleData[this.catalogField]) {
|
|
14178
|
-
const formattedDate = "".concat(
|
|
14695
|
+
const formattedDate = "".concat(dayjs4(
|
|
14179
14696
|
singleData[this.catalogField]
|
|
14180
|
-
).format("YYYY"), "-").concat(
|
|
14697
|
+
).format("YYYY"), "-").concat(dayjs4(
|
|
14181
14698
|
singleData[this.catalogField]
|
|
14182
14699
|
).quarter());
|
|
14183
14700
|
singleData[this.catalogField] = formattedDate;
|
|
14184
14701
|
}
|
|
14185
14702
|
} else if (groupMode === "YEARWEEK") {
|
|
14186
14703
|
if (singleData[this.catalogField]) {
|
|
14187
|
-
const formattedDate = "".concat(
|
|
14704
|
+
const formattedDate = "".concat(dayjs4(
|
|
14188
14705
|
singleData[this.catalogField]
|
|
14189
|
-
).format("YYYY"), "-").concat(
|
|
14706
|
+
).format("YYYY"), "-").concat(dayjs4(singleData[this.catalogField]).week());
|
|
14190
14707
|
singleData[this.catalogField] = formattedDate;
|
|
14191
14708
|
}
|
|
14192
14709
|
}
|
|
@@ -14208,7 +14725,7 @@ var BaseSeriesGenerator = class {
|
|
|
14208
14725
|
let sortedKeys = [];
|
|
14209
14726
|
if (groupMode === "DAY" || groupMode === "YEAR" || groupMode === "MONTH") {
|
|
14210
14727
|
sortedKeys = Array.from(dateMap.keys()).sort(
|
|
14211
|
-
(a, b) =>
|
|
14728
|
+
(a, b) => dayjs4(a).diff(dayjs4(b))
|
|
14212
14729
|
);
|
|
14213
14730
|
} else if (groupMode === "QUARTER" || groupMode === "YEARWEEK") {
|
|
14214
14731
|
sortedKeys = Array.from(dateMap.keys()).sort((a, b) => {
|
|
@@ -14242,11 +14759,11 @@ var BaseSeriesGenerator = class {
|
|
|
14242
14759
|
const dates = [];
|
|
14243
14760
|
Object.keys(data).forEach((key) => {
|
|
14244
14761
|
data[key].forEach((_val, date) => {
|
|
14245
|
-
dates.push(
|
|
14762
|
+
dates.push(dayjs4(date));
|
|
14246
14763
|
});
|
|
14247
14764
|
});
|
|
14248
|
-
const maxDate =
|
|
14249
|
-
const minDate =
|
|
14765
|
+
const maxDate = dayjs4.max(dates);
|
|
14766
|
+
const minDate = dayjs4.min(dates);
|
|
14250
14767
|
if (groupMode === "DAY") {
|
|
14251
14768
|
let currentDate = minDate;
|
|
14252
14769
|
const endDate = maxDate;
|
|
@@ -14328,7 +14845,7 @@ var BaseSeriesGenerator = class {
|
|
|
14328
14845
|
const [minYear] = minYearWeek.split("-");
|
|
14329
14846
|
const [maxYear] = maxYearWeek.split("-");
|
|
14330
14847
|
for (let year = parseInt(minYear, 10); year <= parseInt(maxYear, 10); year++) {
|
|
14331
|
-
const numWeeks =
|
|
14848
|
+
const numWeeks = dayjs4("".concat(year, "-12-31")).isoWeek();
|
|
14332
14849
|
for (let week = 1; week <= numWeeks; week++) {
|
|
14333
14850
|
const yearWeek = "".concat(year, "-").concat(week);
|
|
14334
14851
|
Object.keys(data).forEach((key) => {
|
|
@@ -14347,10 +14864,10 @@ var BaseSeriesGenerator = class {
|
|
|
14347
14864
|
var LineSeriesGenerator = class extends BaseSeriesGenerator {
|
|
14348
14865
|
calcStaticOptions() {
|
|
14349
14866
|
if (this.xAxisIndex === void 0) {
|
|
14350
|
-
throw new
|
|
14867
|
+
throw new RuntimeModelError29(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
|
|
14351
14868
|
}
|
|
14352
14869
|
if (this.yAxisIndex === void 0) {
|
|
14353
|
-
throw new
|
|
14870
|
+
throw new RuntimeModelError29(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
|
|
14354
14871
|
}
|
|
14355
14872
|
const options = super.calcStaticOptions();
|
|
14356
14873
|
options.xAxisIndex = this.xAxisIndex;
|
|
@@ -14366,14 +14883,14 @@ var LineSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
14366
14883
|
};
|
|
14367
14884
|
|
|
14368
14885
|
// src/controller/control/chart/generator/bar-series-generator.ts
|
|
14369
|
-
import { RuntimeModelError as
|
|
14886
|
+
import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
|
|
14370
14887
|
var BarSeriesGenerator = class extends BaseSeriesGenerator {
|
|
14371
14888
|
calcStaticOptions() {
|
|
14372
14889
|
if (this.xAxisIndex === void 0) {
|
|
14373
|
-
throw new
|
|
14890
|
+
throw new RuntimeModelError30(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
|
|
14374
14891
|
}
|
|
14375
14892
|
if (this.yAxisIndex === void 0) {
|
|
14376
|
-
throw new
|
|
14893
|
+
throw new RuntimeModelError30(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
|
|
14377
14894
|
}
|
|
14378
14895
|
const options = super.calcStaticOptions();
|
|
14379
14896
|
options.xAxisIndex = this.xAxisIndex;
|
|
@@ -14426,14 +14943,14 @@ var PieSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
14426
14943
|
};
|
|
14427
14944
|
|
|
14428
14945
|
// src/controller/control/chart/generator/scatter-series-generator.ts
|
|
14429
|
-
import { RuntimeModelError as
|
|
14946
|
+
import { RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
|
|
14430
14947
|
var ScatterSeriesGenerator = class extends BaseSeriesGenerator {
|
|
14431
14948
|
calcStaticOptions() {
|
|
14432
14949
|
if (this.xAxisIndex === void 0) {
|
|
14433
|
-
throw new
|
|
14950
|
+
throw new RuntimeModelError31(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
|
|
14434
14951
|
}
|
|
14435
14952
|
if (this.yAxisIndex === void 0) {
|
|
14436
|
-
throw new
|
|
14953
|
+
throw new RuntimeModelError31(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
|
|
14437
14954
|
}
|
|
14438
14955
|
const options = super.calcStaticOptions();
|
|
14439
14956
|
options.xAxisIndex = this.xAxisIndex;
|
|
@@ -14992,7 +15509,7 @@ var ChartController = class extends MDControlController {
|
|
|
14992
15509
|
if (!this.options) {
|
|
14993
15510
|
throw new RuntimeError38("options\u8FD8\u6CA1\u8BA1\u7B97");
|
|
14994
15511
|
}
|
|
14995
|
-
this.chart.setOption(this.options);
|
|
15512
|
+
this.chart.setOption(this.options, { notMerge: true });
|
|
14996
15513
|
this.resizeChart();
|
|
14997
15514
|
}
|
|
14998
15515
|
/**
|
|
@@ -15031,17 +15548,17 @@ var CaptionBarController = class extends ControlController {
|
|
|
15031
15548
|
import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError47 } from "@ibiz-template/core";
|
|
15032
15549
|
|
|
15033
15550
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
15034
|
-
import { RuntimeModelError as
|
|
15551
|
+
import { RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
15035
15552
|
import { isArray as isArray8 } from "qx-util";
|
|
15036
15553
|
|
|
15037
15554
|
// src/ui-action/provider/ui-action-provider-base.ts
|
|
15038
|
-
import { RuntimeModelError as
|
|
15555
|
+
import { RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
|
|
15039
15556
|
|
|
15040
15557
|
// src/ui-logic/index.ts
|
|
15041
15558
|
import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
|
|
15042
15559
|
|
|
15043
15560
|
// src/ui-logic/ui-logic.ts
|
|
15044
|
-
import { ModelError as ModelError25, RuntimeModelError as
|
|
15561
|
+
import { ModelError as ModelError25, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
15045
15562
|
|
|
15046
15563
|
// src/ui-logic/ui-logic-context.ts
|
|
15047
15564
|
var UILogicContext = class {
|
|
@@ -15187,24 +15704,24 @@ var UILogicContext = class {
|
|
|
15187
15704
|
};
|
|
15188
15705
|
|
|
15189
15706
|
// src/ui-logic/ui-logic-node/de-action-node/de-action-node.ts
|
|
15190
|
-
import { RuntimeModelError as
|
|
15707
|
+
import { RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
|
|
15191
15708
|
|
|
15192
15709
|
// src/ui-logic/ui-logic-link/ui-logic-link.ts
|
|
15193
15710
|
import { ModelError as ModelError20 } from "@ibiz-template/core";
|
|
15194
15711
|
|
|
15195
15712
|
// src/ui-logic/ui-logic-link/ui-logic-link-group-cond/ui-logic-link-group-cond.ts
|
|
15196
|
-
import { RuntimeModelError as
|
|
15713
|
+
import { RuntimeModelError as RuntimeModelError33 } from "@ibiz-template/core";
|
|
15197
15714
|
|
|
15198
15715
|
// src/ui-logic/ui-logic-link/ui-logic-link-cond/ui-logic-link-cond.ts
|
|
15199
15716
|
var UILogicLinkCond = class {
|
|
15200
15717
|
};
|
|
15201
15718
|
|
|
15202
15719
|
// src/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.ts
|
|
15203
|
-
import { ModelError as ModelError19, RuntimeModelError as
|
|
15720
|
+
import { ModelError as ModelError19, RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
|
|
15204
15721
|
|
|
15205
15722
|
// src/ui-logic/utils/handle-src-val.ts
|
|
15206
15723
|
import { ModelError as ModelError18 } from "@ibiz-template/core";
|
|
15207
|
-
import { clone as
|
|
15724
|
+
import { clone as clone20 } from "ramda";
|
|
15208
15725
|
function handleSrcVal2(ctx, srcValParams) {
|
|
15209
15726
|
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
15210
15727
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
@@ -15231,7 +15748,7 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
15231
15748
|
value = ctx.parameters.context;
|
|
15232
15749
|
break;
|
|
15233
15750
|
case "ENVPARAM":
|
|
15234
|
-
value =
|
|
15751
|
+
value = clone20(ibiz.env);
|
|
15235
15752
|
break;
|
|
15236
15753
|
default:
|
|
15237
15754
|
throw new ModelError18(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
@@ -15296,7 +15813,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
15296
15813
|
switch (this.type) {
|
|
15297
15814
|
case "ENTITYFIELD": {
|
|
15298
15815
|
if (!this.value) {
|
|
15299
|
-
throw new
|
|
15816
|
+
throw new RuntimeModelError32(
|
|
15300
15817
|
this.model,
|
|
15301
15818
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
15302
15819
|
);
|
|
@@ -15306,7 +15823,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
15306
15823
|
}
|
|
15307
15824
|
case "SRCENTITYFIELD": {
|
|
15308
15825
|
if (!this.value) {
|
|
15309
|
-
throw new
|
|
15826
|
+
throw new RuntimeModelError32(
|
|
15310
15827
|
this.model,
|
|
15311
15828
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
15312
15829
|
);
|
|
@@ -15372,7 +15889,7 @@ var UILogicLinkGroupCond = class _UILogicLinkGroupCond extends UILogicLinkCond {
|
|
|
15372
15889
|
test(ctx, context, data) {
|
|
15373
15890
|
let bol = true;
|
|
15374
15891
|
if (this.conds.length === 0) {
|
|
15375
|
-
throw new
|
|
15892
|
+
throw new RuntimeModelError33(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
|
|
15376
15893
|
}
|
|
15377
15894
|
for (let i = 0; i < this.conds.length; i++) {
|
|
15378
15895
|
const cond = this.conds[i];
|
|
@@ -15498,10 +16015,10 @@ var DEActionNode2 = class extends UILogicNode {
|
|
|
15498
16015
|
retDEUILogicParamId
|
|
15499
16016
|
} = this.model;
|
|
15500
16017
|
if (!dstAppDataEntityId) {
|
|
15501
|
-
throw new
|
|
16018
|
+
throw new RuntimeModelError34(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
|
|
15502
16019
|
}
|
|
15503
16020
|
if (!dstAppDEActionId) {
|
|
15504
|
-
throw new
|
|
16021
|
+
throw new RuntimeModelError34(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
|
|
15505
16022
|
}
|
|
15506
16023
|
const requestData = ctx.params[dstDEUILogicParamId];
|
|
15507
16024
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
@@ -15519,13 +16036,13 @@ var DEActionNode2 = class extends UILogicNode {
|
|
|
15519
16036
|
};
|
|
15520
16037
|
|
|
15521
16038
|
// src/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.ts
|
|
15522
|
-
import { RuntimeModelError as
|
|
16039
|
+
import { RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
|
|
15523
16040
|
var DEUIActionNode = class extends UILogicNode {
|
|
15524
16041
|
async exec(ctx) {
|
|
15525
16042
|
const { dstAppDEUIActionId, dstDEUILogicParamId } = this.model;
|
|
15526
16043
|
const { data, parameters } = ctx;
|
|
15527
16044
|
if (!dstAppDEUIActionId) {
|
|
15528
|
-
throw new
|
|
16045
|
+
throw new RuntimeModelError35(this.model, "\u672A\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
15529
16046
|
}
|
|
15530
16047
|
let actionData = [data];
|
|
15531
16048
|
if (dstDEUILogicParamId) {
|
|
@@ -15590,7 +16107,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
15590
16107
|
|
|
15591
16108
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
15592
16109
|
import { ModelError as ModelError22, RuntimeError as RuntimeError39 } from "@ibiz-template/core";
|
|
15593
|
-
import { clone as
|
|
16110
|
+
import { clone as clone21 } from "ramda";
|
|
15594
16111
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
15595
16112
|
async exec(ctx) {
|
|
15596
16113
|
const nodeParams = this.model.deuilogicNodeParams;
|
|
@@ -15679,7 +16196,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
15679
16196
|
copyParam(nodeParam, ctx) {
|
|
15680
16197
|
const { dstDEUILogicParamId } = nodeParam;
|
|
15681
16198
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
15682
|
-
ctx.params[dstDEUILogicParamId] =
|
|
16199
|
+
ctx.params[dstDEUILogicParamId] = clone21(srcVal);
|
|
15683
16200
|
}
|
|
15684
16201
|
/**
|
|
15685
16202
|
* 绑定参数
|
|
@@ -15756,20 +16273,20 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
15756
16273
|
};
|
|
15757
16274
|
|
|
15758
16275
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
15759
|
-
import { RuntimeError as RuntimeError40, RuntimeModelError as
|
|
16276
|
+
import { RuntimeError as RuntimeError40, RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
|
|
15760
16277
|
import { isFunction } from "lodash-es";
|
|
15761
16278
|
var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
15762
16279
|
async exec(ctx) {
|
|
15763
16280
|
ctx.isEndNode = true;
|
|
15764
16281
|
const { invokeMethod, invokeCtrlId, invokeParamId } = this.model;
|
|
15765
16282
|
if (!invokeCtrlId) {
|
|
15766
|
-
throw new
|
|
16283
|
+
throw new RuntimeModelError36(this.model, "\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u5BF9\u8C61");
|
|
15767
16284
|
}
|
|
15768
16285
|
if (!invokeParamId) {
|
|
15769
|
-
throw new
|
|
16286
|
+
throw new RuntimeModelError36(this.model, "\u6CA1\u6709\u914D\u7F6E\u64CD\u4F5C\u53C2\u6570");
|
|
15770
16287
|
}
|
|
15771
16288
|
if (!invokeMethod) {
|
|
15772
|
-
throw new
|
|
16289
|
+
throw new RuntimeModelError36(this.model, "\u6CA1\u6709\u914D\u7F6E\u8C03\u7528\u65B9\u6CD5");
|
|
15773
16290
|
}
|
|
15774
16291
|
const invokeParam = ctx.params[invokeParamId];
|
|
15775
16292
|
if (!invokeParam) {
|
|
@@ -15787,12 +16304,12 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
15787
16304
|
};
|
|
15788
16305
|
|
|
15789
16306
|
// src/ui-logic/ui-logic-node/bind-param-node/bind-param-node.ts
|
|
15790
|
-
import { RuntimeModelError as
|
|
16307
|
+
import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
|
|
15791
16308
|
var BindParamNode2 = class extends UILogicNode {
|
|
15792
16309
|
async exec(ctx) {
|
|
15793
16310
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
15794
16311
|
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
15795
|
-
throw new
|
|
16312
|
+
throw new RuntimeModelError37(
|
|
15796
16313
|
this.model,
|
|
15797
16314
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
15798
16315
|
);
|
|
@@ -15803,7 +16320,7 @@ var BindParamNode2 = class extends UILogicNode {
|
|
|
15803
16320
|
};
|
|
15804
16321
|
|
|
15805
16322
|
// src/ui-logic/ui-logic-node/msg-box-node/msg-box-node.ts
|
|
15806
|
-
import { ModelError as ModelError23, RuntimeModelError as
|
|
16323
|
+
import { ModelError as ModelError23, RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
|
|
15807
16324
|
var MsgBoxNode = class extends UILogicNode {
|
|
15808
16325
|
constructor() {
|
|
15809
16326
|
super(...arguments);
|
|
@@ -15817,10 +16334,10 @@ var MsgBoxNode = class extends UILogicNode {
|
|
|
15817
16334
|
async exec(ctx) {
|
|
15818
16335
|
const { msgBoxType, buttonsType, msgBoxParamId } = this.model;
|
|
15819
16336
|
if (!msgBoxType) {
|
|
15820
|
-
throw new
|
|
16337
|
+
throw new RuntimeModelError38(this.model, "\u7F3A\u5C11\u6D88\u606F\u7C7B\u578B\u7684\u914D\u7F6E");
|
|
15821
16338
|
}
|
|
15822
16339
|
if (!buttonsType) {
|
|
15823
|
-
throw new
|
|
16340
|
+
throw new RuntimeModelError38(this.model, "\u7F3A\u5C11\u6309\u94AE\u7C7B\u578B\u7684\u914D\u7F6E");
|
|
15824
16341
|
}
|
|
15825
16342
|
let { title } = this.model;
|
|
15826
16343
|
let { message } = this.model;
|
|
@@ -15880,49 +16397,49 @@ var PFPluginNode = class extends UILogicNode {
|
|
|
15880
16397
|
};
|
|
15881
16398
|
|
|
15882
16399
|
// src/ui-logic/ui-logic-node/debug-param-node/debug-param-node.ts
|
|
15883
|
-
import { RuntimeModelError as
|
|
16400
|
+
import { RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
|
|
15884
16401
|
var DebugParamNode = class extends UILogicNode {
|
|
15885
16402
|
async exec(ctx) {
|
|
15886
16403
|
const { dstDEUILogicParamId, name } = this.model;
|
|
15887
16404
|
if (!dstDEUILogicParamId) {
|
|
15888
|
-
throw new
|
|
16405
|
+
throw new RuntimeModelError39(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
15889
16406
|
}
|
|
15890
16407
|
const param = ctx.params[dstDEUILogicParamId];
|
|
15891
|
-
|
|
16408
|
+
ibiz.log.debug("\u903B\u8F91\u8282\u70B9".concat(name, "\u64CD\u4F5C\u53C2\u6570\u503C:"), param);
|
|
15892
16409
|
}
|
|
15893
16410
|
};
|
|
15894
16411
|
|
|
15895
16412
|
// src/ui-logic/ui-logic-node/reset-param-node/reset-param-node.ts
|
|
15896
|
-
import { RuntimeModelError as
|
|
16413
|
+
import { RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
|
|
15897
16414
|
var ResetParamNode2 = class extends UILogicNode {
|
|
15898
16415
|
async exec(ctx) {
|
|
15899
16416
|
const { dstDEUILogicParamId } = this.model;
|
|
15900
16417
|
if (!dstDEUILogicParamId) {
|
|
15901
|
-
throw new
|
|
16418
|
+
throw new RuntimeModelError40(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
15902
16419
|
}
|
|
15903
16420
|
ctx.resetParam(dstDEUILogicParamId);
|
|
15904
16421
|
}
|
|
15905
16422
|
};
|
|
15906
16423
|
|
|
15907
16424
|
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
15908
|
-
import { RuntimeModelError as
|
|
15909
|
-
import { clone as
|
|
16425
|
+
import { RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
|
|
16426
|
+
import { clone as clone22 } from "ramda";
|
|
15910
16427
|
var CopyParamNode2 = class extends UILogicNode {
|
|
15911
16428
|
async exec(ctx) {
|
|
15912
16429
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
15913
16430
|
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
15914
|
-
throw new
|
|
16431
|
+
throw new RuntimeModelError41(
|
|
15915
16432
|
this.model,
|
|
15916
16433
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
15917
16434
|
);
|
|
15918
16435
|
}
|
|
15919
16436
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
15920
|
-
ctx.params[dstDEUILogicParamId] =
|
|
16437
|
+
ctx.params[dstDEUILogicParamId] = clone22(srcVal);
|
|
15921
16438
|
}
|
|
15922
16439
|
};
|
|
15923
16440
|
|
|
15924
16441
|
// src/ui-logic/ui-logic-node/append-param-node/append-param-node.ts
|
|
15925
|
-
import { RuntimeModelError as
|
|
16442
|
+
import { RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
|
|
15926
16443
|
var AppendParamNode2 = class extends UILogicNode {
|
|
15927
16444
|
async exec(ctx) {
|
|
15928
16445
|
const {
|
|
@@ -15933,7 +16450,7 @@ var AppendParamNode2 = class extends UILogicNode {
|
|
|
15933
16450
|
srcSize
|
|
15934
16451
|
} = this.model;
|
|
15935
16452
|
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
15936
|
-
throw new
|
|
16453
|
+
throw new RuntimeModelError42(
|
|
15937
16454
|
this.model,
|
|
15938
16455
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
15939
16456
|
);
|
|
@@ -15951,12 +16468,12 @@ var AppendParamNode2 = class extends UILogicNode {
|
|
|
15951
16468
|
};
|
|
15952
16469
|
|
|
15953
16470
|
// src/ui-logic/ui-logic-node/sort-param-node/sort-param-node.ts
|
|
15954
|
-
import { RuntimeModelError as
|
|
16471
|
+
import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
15955
16472
|
var SortParamNode2 = class extends UILogicNode {
|
|
15956
16473
|
async exec(ctx) {
|
|
15957
16474
|
const { dstDEUILogicParamId, dstSortDir, dstFieldName } = this.model;
|
|
15958
16475
|
if (!dstDEUILogicParamId || !dstFieldName) {
|
|
15959
|
-
throw new
|
|
16476
|
+
throw new RuntimeModelError43(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
|
|
15960
16477
|
}
|
|
15961
16478
|
const key = dstFieldName;
|
|
15962
16479
|
const arr = ctx.params[dstDEUILogicParamId];
|
|
@@ -15967,19 +16484,19 @@ var SortParamNode2 = class extends UILogicNode {
|
|
|
15967
16484
|
};
|
|
15968
16485
|
|
|
15969
16486
|
// src/ui-logic/ui-logic-node/renew-param-node/renew-param-node.ts
|
|
15970
|
-
import { RuntimeModelError as
|
|
16487
|
+
import { RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
|
|
15971
16488
|
var RenewParamNode2 = class extends UILogicNode {
|
|
15972
16489
|
async exec(ctx) {
|
|
15973
16490
|
const { dstDEUILogicParamId } = this.model;
|
|
15974
16491
|
if (!dstDEUILogicParamId) {
|
|
15975
|
-
throw new
|
|
16492
|
+
throw new RuntimeModelError44(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
15976
16493
|
}
|
|
15977
16494
|
ctx.renewParam(dstDEUILogicParamId);
|
|
15978
16495
|
}
|
|
15979
16496
|
};
|
|
15980
16497
|
|
|
15981
16498
|
// src/ui-logic/ui-logic-node/data-set-node/data-set-node.ts
|
|
15982
|
-
import { RuntimeModelError as
|
|
16499
|
+
import { RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
|
|
15983
16500
|
var DataSetNode2 = class extends UILogicNode {
|
|
15984
16501
|
async exec(ctx) {
|
|
15985
16502
|
const {
|
|
@@ -15989,7 +16506,7 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
15989
16506
|
retDEUILogicParamId
|
|
15990
16507
|
} = this.model;
|
|
15991
16508
|
if (!dstDEUILogicParamId) {
|
|
15992
|
-
throw new
|
|
16509
|
+
throw new RuntimeModelError45(this.model, "\u7F3A\u5C11\u914D\u7F6E\u8FC7\u6EE4\u53C2\u6570");
|
|
15993
16510
|
}
|
|
15994
16511
|
const queryParams = ctx.params[dstDEUILogicParamId];
|
|
15995
16512
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
@@ -16015,19 +16532,19 @@ var ThrowExceptionNode2 = class extends UILogicNode {
|
|
|
16015
16532
|
};
|
|
16016
16533
|
|
|
16017
16534
|
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
16018
|
-
import { RuntimeError as RuntimeError42, RuntimeModelError as
|
|
16535
|
+
import { RuntimeError as RuntimeError42, RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
|
|
16019
16536
|
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
16020
16537
|
async exec(ctx) {
|
|
16021
16538
|
ctx.isEndNode = true;
|
|
16022
16539
|
const { eventName, eventParamId, fireCtrlId } = this.model;
|
|
16023
16540
|
if (!fireCtrlId) {
|
|
16024
|
-
throw new
|
|
16541
|
+
throw new RuntimeModelError46(this.model, "\u6CA1\u6709\u914D\u7F6E\u89E6\u53D1\u5BF9\u8C61");
|
|
16025
16542
|
}
|
|
16026
16543
|
if (!eventName) {
|
|
16027
|
-
throw new
|
|
16544
|
+
throw new RuntimeModelError46(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u540D\u79F0\u53C2\u6570");
|
|
16028
16545
|
}
|
|
16029
16546
|
if (!eventParamId) {
|
|
16030
|
-
throw new
|
|
16547
|
+
throw new RuntimeModelError46(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u53C2\u6570");
|
|
16031
16548
|
}
|
|
16032
16549
|
const invokeCtrl = ctx.params[fireCtrlId];
|
|
16033
16550
|
if (!invokeCtrl) {
|
|
@@ -16042,7 +16559,7 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
16042
16559
|
};
|
|
16043
16560
|
|
|
16044
16561
|
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
16045
|
-
import { RuntimeError as RuntimeError43, RuntimeModelError as
|
|
16562
|
+
import { RuntimeError as RuntimeError43, RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
|
|
16046
16563
|
var ExecuteDELogicNode = class extends UILogicNode {
|
|
16047
16564
|
async exec(ctx) {
|
|
16048
16565
|
const {
|
|
@@ -16052,13 +16569,13 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
16052
16569
|
retDEUILogicParamId
|
|
16053
16570
|
} = this.model;
|
|
16054
16571
|
if (!dstAppDataEntityId) {
|
|
16055
|
-
throw new
|
|
16572
|
+
throw new RuntimeModelError47(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
|
|
16056
16573
|
}
|
|
16057
16574
|
if (!dstAppDELogicId) {
|
|
16058
|
-
throw new
|
|
16575
|
+
throw new RuntimeModelError47(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
|
|
16059
16576
|
}
|
|
16060
16577
|
if (!dstDEUILogicParamId) {
|
|
16061
|
-
throw new
|
|
16578
|
+
throw new RuntimeModelError47(this.model, "\u6CA1\u6709\u914D\u7F6E\u4F20\u5165\u903B\u8F91\u53C2\u6570");
|
|
16062
16579
|
}
|
|
16063
16580
|
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
16064
16581
|
if (!dstParam) {
|
|
@@ -16080,7 +16597,6 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
16080
16597
|
// src/ui-logic/ui-logic-node/raw-js-code-node/raw-js-code-node.ts
|
|
16081
16598
|
var RawJSCodeNode = class extends UILogicNode {
|
|
16082
16599
|
async exec(ctx) {
|
|
16083
|
-
console.log(ctx);
|
|
16084
16600
|
ScriptFactory.execScriptFn(
|
|
16085
16601
|
{
|
|
16086
16602
|
view: ctx.view,
|
|
@@ -16220,7 +16736,7 @@ var UILogic = class {
|
|
|
16220
16736
|
this.params = /* @__PURE__ */ new Map();
|
|
16221
16737
|
var _a;
|
|
16222
16738
|
if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
|
|
16223
|
-
throw new
|
|
16739
|
+
throw new RuntimeModelError48(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
16224
16740
|
}
|
|
16225
16741
|
model.deuilogicNodes.forEach((node) => {
|
|
16226
16742
|
const { logicNodeType } = node;
|
|
@@ -16340,7 +16856,7 @@ var UILogic = class {
|
|
|
16340
16856
|
const start = this.nodes.get(startDEUILogicNodeId);
|
|
16341
16857
|
await this.deepExec(start, ctx);
|
|
16342
16858
|
} else {
|
|
16343
|
-
throw new
|
|
16859
|
+
throw new RuntimeModelError48(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
16344
16860
|
}
|
|
16345
16861
|
if (ctx.isEndNode) {
|
|
16346
16862
|
return ctx.result;
|
|
@@ -16475,7 +16991,7 @@ var UIActionProviderBase = class {
|
|
|
16475
16991
|
const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
|
|
16476
16992
|
if (uilogicAttachMode === "REPLACE") {
|
|
16477
16993
|
if (!appDEUILogicId) {
|
|
16478
|
-
throw new
|
|
16994
|
+
throw new RuntimeModelError49(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
16479
16995
|
}
|
|
16480
16996
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
16481
16997
|
return result;
|
|
@@ -16490,7 +17006,7 @@ var UIActionProviderBase = class {
|
|
|
16490
17006
|
}
|
|
16491
17007
|
if (action.uilogicAttachMode === "AFTER") {
|
|
16492
17008
|
if (!appDEUILogicId) {
|
|
16493
|
-
throw new
|
|
17009
|
+
throw new RuntimeModelError49(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
16494
17010
|
}
|
|
16495
17011
|
await execUILogic(
|
|
16496
17012
|
appDEUILogicId,
|
|
@@ -16715,7 +17231,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
16715
17231
|
const entityName = action.appDataEntityId;
|
|
16716
17232
|
const methodName = action.appDEMethodId;
|
|
16717
17233
|
if (!entityName || !methodName) {
|
|
16718
|
-
throw new
|
|
17234
|
+
throw new RuntimeModelError50(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
|
|
16719
17235
|
}
|
|
16720
17236
|
const { resultContext, resultParams, resultData } = await this.handleParams(
|
|
16721
17237
|
action,
|
|
@@ -16840,7 +17356,7 @@ var SysUIActionProvider = class extends UIActionProviderBase {
|
|
|
16840
17356
|
// src/ui-action/provider/front-ui-action-provider.ts
|
|
16841
17357
|
import {
|
|
16842
17358
|
StringUtil,
|
|
16843
|
-
RuntimeModelError as
|
|
17359
|
+
RuntimeModelError as RuntimeModelError51,
|
|
16844
17360
|
ModelError as ModelError26,
|
|
16845
17361
|
RuntimeError as RuntimeError46
|
|
16846
17362
|
} from "@ibiz-template/core";
|
|
@@ -16858,7 +17374,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
16858
17374
|
case "WIZARD": {
|
|
16859
17375
|
const frontPSAppView = action.frontAppViewId;
|
|
16860
17376
|
if (!frontPSAppView) {
|
|
16861
|
-
throw new
|
|
17377
|
+
throw new RuntimeModelError51(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
|
|
16862
17378
|
}
|
|
16863
17379
|
const { resultContext, resultParams } = await this.handleParams(
|
|
16864
17380
|
action,
|
|
@@ -16923,7 +17439,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
16923
17439
|
);
|
|
16924
17440
|
return result || {};
|
|
16925
17441
|
}
|
|
16926
|
-
throw new
|
|
17442
|
+
throw new RuntimeModelError51(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
16927
17443
|
}
|
|
16928
17444
|
/**
|
|
16929
17445
|
* 执行打印行为
|
|
@@ -16992,8 +17508,14 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
16992
17508
|
* @param {IUILogicParams} args
|
|
16993
17509
|
* @return {*}
|
|
16994
17510
|
*/
|
|
16995
|
-
async executeDataImport(action,
|
|
17511
|
+
async executeDataImport(action, args) {
|
|
16996
17512
|
var _a;
|
|
17513
|
+
const { resultContext, resultParams } = await this.handleParams(
|
|
17514
|
+
action,
|
|
17515
|
+
args.context,
|
|
17516
|
+
args.data,
|
|
17517
|
+
args.params
|
|
17518
|
+
);
|
|
16997
17519
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
16998
17520
|
action.appDataEntityId,
|
|
16999
17521
|
action.appId
|
|
@@ -17011,7 +17533,9 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
17011
17533
|
{
|
|
17012
17534
|
dismiss: () => modal.dismiss(),
|
|
17013
17535
|
appDataEntity,
|
|
17014
|
-
dataImport: appDEDataImport
|
|
17536
|
+
dataImport: appDEDataImport,
|
|
17537
|
+
context: resultContext,
|
|
17538
|
+
params: resultParams
|
|
17015
17539
|
},
|
|
17016
17540
|
{
|
|
17017
17541
|
width: "auto",
|
|
@@ -17764,7 +18288,7 @@ var RawItemPortletController = class extends PortletPartController {
|
|
|
17764
18288
|
};
|
|
17765
18289
|
|
|
17766
18290
|
// src/controller/control/data-view/data-view.controller.ts
|
|
17767
|
-
import { RuntimeModelError as
|
|
18291
|
+
import { RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
|
|
17768
18292
|
import { isNil as isNil22 } from "ramda";
|
|
17769
18293
|
|
|
17770
18294
|
// src/controller/control/data-view/data-view.service.ts
|
|
@@ -17979,7 +18503,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
17979
18503
|
const optItemModel = this.getOptItemModel();
|
|
17980
18504
|
if (optItemModel) {
|
|
17981
18505
|
if (!optItemModel.deuiactionGroup) {
|
|
17982
|
-
throw new
|
|
18506
|
+
throw new RuntimeModelError52(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
17983
18507
|
}
|
|
17984
18508
|
if (!((_a = optItemModel.deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
17985
18509
|
ibiz.log.debug("\u64CD\u4F5C\u9879\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -18032,7 +18556,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
18032
18556
|
const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
|
|
18033
18557
|
if (enableGroup && groupMode) {
|
|
18034
18558
|
if (!groupAppDEFieldId) {
|
|
18035
|
-
throw new
|
|
18559
|
+
throw new RuntimeModelError52(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
|
|
18036
18560
|
}
|
|
18037
18561
|
if (groupMode === "AUTO") {
|
|
18038
18562
|
this.handleAutoGroup();
|
|
@@ -18099,7 +18623,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
18099
18623
|
async handleCodeListGroup() {
|
|
18100
18624
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
18101
18625
|
if (!groupCodeListId) {
|
|
18102
|
-
throw new
|
|
18626
|
+
throw new RuntimeModelError52(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
18103
18627
|
}
|
|
18104
18628
|
const { items } = this.state;
|
|
18105
18629
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -18205,7 +18729,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
18205
18729
|
caption = ibiz.i18n.t(item.capLanguageRes.lanResTag, item.caption);
|
|
18206
18730
|
}
|
|
18207
18731
|
if (!item.appDEFieldId) {
|
|
18208
|
-
throw new
|
|
18732
|
+
throw new RuntimeModelError52(item, "\u542F\u7528\u6392\u5E8F\u7684\u9879\u5FC5\u987B\u5173\u8054\u5B9E\u4F53\u5C5E\u6027");
|
|
18209
18733
|
}
|
|
18210
18734
|
const tempItem = {
|
|
18211
18735
|
caption,
|
|
@@ -18223,10 +18747,10 @@ var DataViewControlController = class extends MDControlController {
|
|
|
18223
18747
|
};
|
|
18224
18748
|
|
|
18225
18749
|
// src/controller/control/exp-bar/calendar-exp-bar.controller.ts
|
|
18226
|
-
import { RuntimeModelError as
|
|
18750
|
+
import { RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
18227
18751
|
|
|
18228
18752
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
18229
|
-
import { RuntimeError as RuntimeError48, RuntimeModelError as
|
|
18753
|
+
import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
|
|
18230
18754
|
var ExpBarControlController = class extends ControlController {
|
|
18231
18755
|
constructor() {
|
|
18232
18756
|
super(...arguments);
|
|
@@ -18281,7 +18805,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
18281
18805
|
get xDataController() {
|
|
18282
18806
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
18283
18807
|
if (!controller) {
|
|
18284
|
-
throw new
|
|
18808
|
+
throw new RuntimeModelError53(
|
|
18285
18809
|
this.model,
|
|
18286
18810
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
18287
18811
|
);
|
|
@@ -18640,7 +19164,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
18640
19164
|
get xDataController() {
|
|
18641
19165
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
18642
19166
|
if (!controller) {
|
|
18643
|
-
throw new
|
|
19167
|
+
throw new RuntimeModelError54(
|
|
18644
19168
|
this.model,
|
|
18645
19169
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
18646
19170
|
);
|
|
@@ -18695,7 +19219,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
18695
19219
|
};
|
|
18696
19220
|
|
|
18697
19221
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
18698
|
-
import { RuntimeError as RuntimeError49, RuntimeModelError as
|
|
19222
|
+
import { RuntimeError as RuntimeError49, RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
|
|
18699
19223
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
18700
19224
|
constructor() {
|
|
18701
19225
|
super(...arguments);
|
|
@@ -18718,7 +19242,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
18718
19242
|
get xDataController() {
|
|
18719
19243
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
18720
19244
|
if (!controller) {
|
|
18721
|
-
throw new
|
|
19245
|
+
throw new RuntimeModelError55(
|
|
18722
19246
|
this.model,
|
|
18723
19247
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
18724
19248
|
);
|
|
@@ -18963,7 +19487,11 @@ var ChartExpBarController = class extends ExpBarControlController {
|
|
|
18963
19487
|
import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
|
|
18964
19488
|
|
|
18965
19489
|
// src/controller/control/form/form/form.controller.ts
|
|
18966
|
-
import {
|
|
19490
|
+
import {
|
|
19491
|
+
RuntimeModelError as RuntimeModelError56,
|
|
19492
|
+
debounceAndAsyncMerge,
|
|
19493
|
+
recursiveIterate as recursiveIterate3
|
|
19494
|
+
} from "@ibiz-template/core";
|
|
18967
19495
|
var FormController = class extends ControlController {
|
|
18968
19496
|
constructor() {
|
|
18969
19497
|
super(...arguments);
|
|
@@ -19087,6 +19615,12 @@ var FormController = class extends ControlController {
|
|
|
19087
19615
|
if (!detailProvider) {
|
|
19088
19616
|
return;
|
|
19089
19617
|
}
|
|
19618
|
+
if (form.details[detail.id]) {
|
|
19619
|
+
throw new RuntimeModelError56(
|
|
19620
|
+
detail,
|
|
19621
|
+
"\u521D\u59CB\u5316\u5F02\u5E38: \u8868\u5355\u6210\u5458[".concat(detail.id, "](").concat(detail.detailType, ")\u5DF2\u5B58\u5728\uFF0C\u8868\u5355\u9879\u6807\u8BC6\u91CD\u590D\u8BF7\u68C0\u67E5\u914D\u7F6E")
|
|
19622
|
+
);
|
|
19623
|
+
}
|
|
19090
19624
|
form.providers[detail.id] = detailProvider;
|
|
19091
19625
|
const detailController = await detailProvider.createController(
|
|
19092
19626
|
detail,
|
|
@@ -19919,6 +20453,9 @@ var FormDetailController = class {
|
|
|
19919
20453
|
* @date 2023-10-11 05:03:26
|
|
19920
20454
|
*/
|
|
19921
20455
|
async onClick(event) {
|
|
20456
|
+
if (event) {
|
|
20457
|
+
event.stopPropagation();
|
|
20458
|
+
}
|
|
19922
20459
|
this.form.evt.emit("onFormDetailEvent", {
|
|
19923
20460
|
formDetailName: this.model.id,
|
|
19924
20461
|
formDetailEventName: "onClick" /* CLICK */,
|
|
@@ -20724,7 +21261,7 @@ var FormMDCtrlController = class extends FormDetailController {
|
|
|
20724
21261
|
import {
|
|
20725
21262
|
mergeInLeft,
|
|
20726
21263
|
ModelError as ModelError27,
|
|
20727
|
-
RuntimeModelError as
|
|
21264
|
+
RuntimeModelError as RuntimeModelError57
|
|
20728
21265
|
} from "@ibiz-template/core";
|
|
20729
21266
|
var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
20730
21267
|
constructor() {
|
|
@@ -20750,7 +21287,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
20750
21287
|
await super.onInit();
|
|
20751
21288
|
const { contentControl } = this.model;
|
|
20752
21289
|
if (!contentControl) {
|
|
20753
|
-
throw new
|
|
21290
|
+
throw new RuntimeModelError57(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
|
|
20754
21291
|
}
|
|
20755
21292
|
if (contentControl.controlType === "GRID") {
|
|
20756
21293
|
mergeInLeft(contentControl, {
|
|
@@ -20847,7 +21384,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
20847
21384
|
};
|
|
20848
21385
|
|
|
20849
21386
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
|
|
20850
|
-
import { RuntimeError as RuntimeError51, RuntimeModelError as
|
|
21387
|
+
import { RuntimeError as RuntimeError51, RuntimeModelError as RuntimeModelError58 } from "@ibiz-template/core";
|
|
20851
21388
|
import { createUUID as createUUID11 } from "qx-util";
|
|
20852
21389
|
|
|
20853
21390
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
|
|
@@ -20888,7 +21425,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
20888
21425
|
super.onInit();
|
|
20889
21426
|
const { contentControl } = this.model;
|
|
20890
21427
|
if (!contentControl) {
|
|
20891
|
-
throw new
|
|
21428
|
+
throw new RuntimeModelError58(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
|
|
20892
21429
|
}
|
|
20893
21430
|
contentControl.enableAutoSave = this.enableCreate || this.enableUpdate;
|
|
20894
21431
|
const controlProvider = await getControlProvider(contentControl);
|
|
@@ -21022,7 +21559,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
21022
21559
|
|
|
21023
21560
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
|
|
21024
21561
|
import { ModelError as ModelError28 } from "@ibiz-template/core";
|
|
21025
|
-
import { clone as
|
|
21562
|
+
import { clone as clone23 } from "ramda";
|
|
21026
21563
|
var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
21027
21564
|
constructor() {
|
|
21028
21565
|
super(...arguments);
|
|
@@ -21106,7 +21643,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
21106
21643
|
copyFields.forEach((key) => {
|
|
21107
21644
|
tempForm[key] = this.form.model[key];
|
|
21108
21645
|
});
|
|
21109
|
-
this.repeatedForm =
|
|
21646
|
+
this.repeatedForm = clone23(tempForm);
|
|
21110
21647
|
}
|
|
21111
21648
|
/**
|
|
21112
21649
|
* 设置重复器数据(修改主表单里重复器对应属性)
|
|
@@ -21214,10 +21751,30 @@ var FormTabPageController = class extends FormDetailController {
|
|
|
21214
21751
|
var _a;
|
|
21215
21752
|
return new FormTabPageState((_a = this.parent) == null ? void 0 : _a.state);
|
|
21216
21753
|
}
|
|
21754
|
+
/**
|
|
21755
|
+
* 是否激活的分页
|
|
21756
|
+
* @author lxm
|
|
21757
|
+
* @date 2024-01-17 03:16:24
|
|
21758
|
+
* @readonly
|
|
21759
|
+
* @type {boolean}
|
|
21760
|
+
*/
|
|
21761
|
+
get isActive() {
|
|
21762
|
+
return this.parent.state.activeTab === this.model.id;
|
|
21763
|
+
}
|
|
21217
21764
|
};
|
|
21218
21765
|
|
|
21219
21766
|
// src/controller/control/form/form-detail/form-tab-panel/form-tab-panel.state.ts
|
|
21220
21767
|
var FormTabPanelState = class extends FormDetailState {
|
|
21768
|
+
constructor() {
|
|
21769
|
+
super(...arguments);
|
|
21770
|
+
/**
|
|
21771
|
+
* 当前激活的分页
|
|
21772
|
+
* @author lxm
|
|
21773
|
+
* @date 2024-01-17 02:05:58
|
|
21774
|
+
* @type {string}
|
|
21775
|
+
*/
|
|
21776
|
+
this.activeTab = "";
|
|
21777
|
+
}
|
|
21221
21778
|
};
|
|
21222
21779
|
|
|
21223
21780
|
// src/controller/control/form/form-detail/form-tab-panel/form-tab-panel.controller.ts
|
|
@@ -21226,6 +21783,20 @@ var FormTabPanelController = class extends FormDetailController {
|
|
|
21226
21783
|
var _a;
|
|
21227
21784
|
return new FormTabPanelState((_a = this.parent) == null ? void 0 : _a.state);
|
|
21228
21785
|
}
|
|
21786
|
+
async onInit() {
|
|
21787
|
+
var _a;
|
|
21788
|
+
await super.onInit();
|
|
21789
|
+
this.state.activeTab = ((_a = this.model.deformTabPages) == null ? void 0 : _a[0].id) || "";
|
|
21790
|
+
}
|
|
21791
|
+
/**
|
|
21792
|
+
* 分页点击切换处理
|
|
21793
|
+
* @author lxm
|
|
21794
|
+
* @date 2024-01-17 02:59:38
|
|
21795
|
+
* @param {string} tabId
|
|
21796
|
+
*/
|
|
21797
|
+
onTabChange(tabId) {
|
|
21798
|
+
this.state.activeTab = tabId;
|
|
21799
|
+
}
|
|
21229
21800
|
};
|
|
21230
21801
|
|
|
21231
21802
|
// src/controller/control/form/edit-form/edit-form.controller.ts
|
|
@@ -21236,12 +21807,12 @@ import {
|
|
|
21236
21807
|
} from "@ibiz-template/core";
|
|
21237
21808
|
import { debounce as debounce2 } from "lodash-es";
|
|
21238
21809
|
import { createUUID as createUUID12 } from "qx-util";
|
|
21239
|
-
import { clone as
|
|
21810
|
+
import { clone as clone24 } from "ramda";
|
|
21240
21811
|
|
|
21241
21812
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
21242
21813
|
import {
|
|
21243
21814
|
recursiveIterate as recursiveIterate6,
|
|
21244
|
-
RuntimeModelError as
|
|
21815
|
+
RuntimeModelError as RuntimeModelError59
|
|
21245
21816
|
} from "@ibiz-template/core";
|
|
21246
21817
|
var EditFormService = class extends FormService {
|
|
21247
21818
|
/**
|
|
@@ -21365,7 +21936,7 @@ var EditFormService = class extends FormService {
|
|
|
21365
21936
|
const wizardForm = this.model;
|
|
21366
21937
|
const methodName = (_a = wizardForm.goBackControlAction) == null ? void 0 : _a.appDEMethodId;
|
|
21367
21938
|
if (!methodName) {
|
|
21368
|
-
throw new
|
|
21939
|
+
throw new RuntimeModelError59(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
|
|
21369
21940
|
}
|
|
21370
21941
|
let res = await this.exec(
|
|
21371
21942
|
methodName,
|
|
@@ -21601,8 +22172,8 @@ var EditFormController = class extends FormController {
|
|
|
21601
22172
|
* @return {*} {Promise<IData>}
|
|
21602
22173
|
*/
|
|
21603
22174
|
async copy() {
|
|
21604
|
-
const context =
|
|
21605
|
-
const queryParams =
|
|
22175
|
+
const context = clone24(this.context);
|
|
22176
|
+
const queryParams = clone24(this.params);
|
|
21606
22177
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
21607
22178
|
this.model.appDataEntityId,
|
|
21608
22179
|
this.model.appId
|
|
@@ -21659,7 +22230,7 @@ var EditFormController = class extends FormController {
|
|
|
21659
22230
|
return this.loadDraft();
|
|
21660
22231
|
}
|
|
21661
22232
|
const { context, params } = this.handlerAbilityParams(args);
|
|
21662
|
-
const queryParams =
|
|
22233
|
+
const queryParams = clone24(params);
|
|
21663
22234
|
let res;
|
|
21664
22235
|
try {
|
|
21665
22236
|
await this.startLoading();
|
|
@@ -21740,7 +22311,7 @@ var EditFormController = class extends FormController {
|
|
|
21740
22311
|
});
|
|
21741
22312
|
}
|
|
21742
22313
|
ibiz.mc.command.send(
|
|
21743
|
-
|
|
22314
|
+
res.data,
|
|
21744
22315
|
isCreate ? "OBJECTCREATED" : "OBJECTUPDATED"
|
|
21745
22316
|
);
|
|
21746
22317
|
return this.data;
|
|
@@ -22225,12 +22796,12 @@ import {
|
|
|
22225
22796
|
mergeDefaultInLeft,
|
|
22226
22797
|
recursiveIterate as recursiveIterate7,
|
|
22227
22798
|
RuntimeError as RuntimeError53,
|
|
22228
|
-
RuntimeModelError as
|
|
22799
|
+
RuntimeModelError as RuntimeModelError61
|
|
22229
22800
|
} from "@ibiz-template/core";
|
|
22230
|
-
import { clone as
|
|
22801
|
+
import { clone as clone25 } from "ramda";
|
|
22231
22802
|
|
|
22232
22803
|
// src/controller/control/grid/grid/grid.service.ts
|
|
22233
|
-
import { RuntimeModelError as
|
|
22804
|
+
import { RuntimeModelError as RuntimeModelError60 } from "@ibiz-template/core";
|
|
22234
22805
|
var GridService = class extends MDControlService {
|
|
22235
22806
|
/**
|
|
22236
22807
|
* 初始化属性映射
|
|
@@ -22258,7 +22829,7 @@ var GridService = class extends MDControlService {
|
|
|
22258
22829
|
dataType: dataItem.dataType
|
|
22259
22830
|
});
|
|
22260
22831
|
} else {
|
|
22261
|
-
throw new
|
|
22832
|
+
throw new RuntimeModelError60(
|
|
22262
22833
|
column,
|
|
22263
22834
|
"\u672A\u627E\u5230\u5BF9\u5E94\u7684\u8868\u683C\u6570\u636E\u9879[".concat(deField, "]")
|
|
22264
22835
|
);
|
|
@@ -22537,7 +23108,7 @@ var GridController = class extends MDControlController {
|
|
|
22537
23108
|
const result = await calcColumnModelBySchema(json, this);
|
|
22538
23109
|
if (result && result.degridColumns.length > 0) {
|
|
22539
23110
|
const { degridColumns, degridDataItems } = result;
|
|
22540
|
-
this.model =
|
|
23111
|
+
this.model = clone25(this.model);
|
|
22541
23112
|
this.model.degridColumns = [
|
|
22542
23113
|
...(this.model.degridColumns || []).filter((item) => {
|
|
22543
23114
|
return degridColumns.findIndex((x) => x.id === item.id) === -1;
|
|
@@ -22568,11 +23139,11 @@ var GridController = class extends MDControlController {
|
|
|
22568
23139
|
(item) => item.model.appDEFieldId === groupAppDEFieldId
|
|
22569
23140
|
);
|
|
22570
23141
|
if (!this.groupFieldColumn) {
|
|
22571
|
-
throw new
|
|
23142
|
+
throw new RuntimeModelError61(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
|
|
22572
23143
|
}
|
|
22573
23144
|
const groupFieldName = this.groupFieldColumn.model.id;
|
|
22574
23145
|
if (!this.groupFieldColumn.model.appCodeListId) {
|
|
22575
|
-
throw new
|
|
23146
|
+
throw new RuntimeModelError61(
|
|
22576
23147
|
this.groupFieldColumn.model,
|
|
22577
23148
|
"\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217".concat(groupFieldName, "\u6CA1\u6709\u914D\u7F6E\u4EE3\u7801\u8868")
|
|
22578
23149
|
);
|
|
@@ -22582,7 +23153,7 @@ var GridController = class extends MDControlController {
|
|
|
22582
23153
|
);
|
|
22583
23154
|
if (index !== -1 && index !== 0) {
|
|
22584
23155
|
if (this.isMultistageHeader) {
|
|
22585
|
-
throw new
|
|
23156
|
+
throw new RuntimeModelError61(
|
|
22586
23157
|
this.model,
|
|
22587
23158
|
"\u8BF7\u5C06\u5206\u7EC4\u5C5E\u6027\u5217".concat(groupFieldName, "\u914D\u7F6E\u4E3A\u7B2C\u4E00\u5217")
|
|
22588
23159
|
);
|
|
@@ -22592,10 +23163,10 @@ var GridController = class extends MDControlController {
|
|
|
22592
23163
|
}
|
|
22593
23164
|
if (groupMode === "CODELIST") {
|
|
22594
23165
|
if (!groupCodeListId) {
|
|
22595
|
-
throw new
|
|
23166
|
+
throw new RuntimeModelError61(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
|
|
22596
23167
|
}
|
|
22597
23168
|
if (this.groupFieldColumn.model.appCodeListId !== groupCodeListId) {
|
|
22598
|
-
throw new
|
|
23169
|
+
throw new RuntimeModelError61(
|
|
22599
23170
|
this.model,
|
|
22600
23171
|
"\u5206\u7EC4\u4EE3\u7801\u8868\u4E0E\u5C5E\u6027\u5217".concat(groupFieldName, "\u7684\u4EE3\u7801\u8868\u4E0D\u4E00\u81F4")
|
|
22601
23172
|
);
|
|
@@ -22682,7 +23253,7 @@ var GridController = class extends MDControlController {
|
|
|
22682
23253
|
return;
|
|
22683
23254
|
}
|
|
22684
23255
|
if (!aggAppDEDataSetId || !aggAppDataEntityId) {
|
|
22685
|
-
throw new
|
|
23256
|
+
throw new RuntimeModelError61(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
|
|
22686
23257
|
}
|
|
22687
23258
|
const params = await this.getFetchParams();
|
|
22688
23259
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
@@ -23052,7 +23623,7 @@ var GridController = class extends MDControlController {
|
|
|
23052
23623
|
throw new RuntimeError53("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
23053
23624
|
}
|
|
23054
23625
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
23055
|
-
row.cacheData =
|
|
23626
|
+
row.cacheData = clone25(row.data);
|
|
23056
23627
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
23057
23628
|
Object.assign(row.data, defaultVal);
|
|
23058
23629
|
}
|
|
@@ -23221,7 +23792,7 @@ var GridController = class extends MDControlController {
|
|
|
23221
23792
|
}
|
|
23222
23793
|
});
|
|
23223
23794
|
}
|
|
23224
|
-
const cloneData =
|
|
23795
|
+
const cloneData = clone25(
|
|
23225
23796
|
data2.map((item) => {
|
|
23226
23797
|
return item.getOrigin();
|
|
23227
23798
|
})
|
|
@@ -23456,10 +24027,10 @@ var GridController = class extends MDControlController {
|
|
|
23456
24027
|
};
|
|
23457
24028
|
|
|
23458
24029
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
23459
|
-
import { DataTypes as
|
|
23460
|
-
import
|
|
24030
|
+
import { DataTypes as DataTypes4, ModelError as ModelError29, plus as plus2 } from "@ibiz-template/core";
|
|
24031
|
+
import dayjs5 from "dayjs";
|
|
23461
24032
|
import { debounce as debounce3 } from "lodash-es";
|
|
23462
|
-
import { clone as
|
|
24033
|
+
import { clone as clone26, isNil as isNil23 } from "ramda";
|
|
23463
24034
|
var GridFieldColumnController = class extends GridColumnController {
|
|
23464
24035
|
constructor() {
|
|
23465
24036
|
super(...arguments);
|
|
@@ -23492,9 +24063,18 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23492
24063
|
get hasAction() {
|
|
23493
24064
|
return !!this.model.deuiactionId;
|
|
23494
24065
|
}
|
|
23495
|
-
|
|
23496
|
-
|
|
23497
|
-
|
|
24066
|
+
/**
|
|
24067
|
+
* 属性列对应值在数据里的属性字段名称
|
|
24068
|
+
* @author lxm
|
|
24069
|
+
* @date 2023-06-25 09:26:04
|
|
24070
|
+
* @readonly
|
|
24071
|
+
*/
|
|
24072
|
+
get fieldName() {
|
|
24073
|
+
return this.model.id.toLowerCase();
|
|
24074
|
+
}
|
|
24075
|
+
async onInit() {
|
|
24076
|
+
await super.onInit();
|
|
24077
|
+
this.loadCodeList = debounce3(this.loadCodeList, 300, {
|
|
23498
24078
|
leading: true,
|
|
23499
24079
|
trailing: false
|
|
23500
24080
|
});
|
|
@@ -23533,7 +24113,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23533
24113
|
* @readonly
|
|
23534
24114
|
*/
|
|
23535
24115
|
clickable(row) {
|
|
23536
|
-
const value = row.data[this.
|
|
24116
|
+
const value = row.data[this.fieldName];
|
|
23537
24117
|
return (this.isLinkColumn || this.hasAction) && value;
|
|
23538
24118
|
}
|
|
23539
24119
|
/**
|
|
@@ -23570,7 +24150,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23570
24150
|
* @returns {*} {Promise<void>}
|
|
23571
24151
|
*/
|
|
23572
24152
|
async openLinkView(row, event) {
|
|
23573
|
-
const curValue = row.data[this.
|
|
24153
|
+
const curValue = row.data[this.fieldName];
|
|
23574
24154
|
if (!curValue) {
|
|
23575
24155
|
return;
|
|
23576
24156
|
}
|
|
@@ -23588,7 +24168,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23588
24168
|
srfkey: value,
|
|
23589
24169
|
...wfContext
|
|
23590
24170
|
});
|
|
23591
|
-
const tempParams =
|
|
24171
|
+
const tempParams = clone26(this.params);
|
|
23592
24172
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
23593
24173
|
row.data,
|
|
23594
24174
|
tempContext,
|
|
@@ -23721,9 +24301,9 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23721
24301
|
if (!this.valueFormat) {
|
|
23722
24302
|
return strVal;
|
|
23723
24303
|
}
|
|
23724
|
-
const isDate =
|
|
24304
|
+
const isDate = DataTypes4.isDate(this.dataType);
|
|
23725
24305
|
if (isDate) {
|
|
23726
|
-
const formatVal =
|
|
24306
|
+
const formatVal = dayjs5(strVal).format(this.valueFormat);
|
|
23727
24307
|
if (formatVal !== "Invalid Date") {
|
|
23728
24308
|
return formatVal;
|
|
23729
24309
|
}
|
|
@@ -23759,7 +24339,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23759
24339
|
};
|
|
23760
24340
|
|
|
23761
24341
|
// src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts
|
|
23762
|
-
import { RuntimeModelError as
|
|
24342
|
+
import { RuntimeModelError as RuntimeModelError62 } from "@ibiz-template/core";
|
|
23763
24343
|
var GridUAColumnController = class extends GridColumnController {
|
|
23764
24344
|
/**
|
|
23765
24345
|
* 给rowController初始化操作列的状态
|
|
@@ -23772,7 +24352,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
23772
24352
|
var _a;
|
|
23773
24353
|
const { deuiactionGroup } = this.model;
|
|
23774
24354
|
if (!deuiactionGroup) {
|
|
23775
|
-
throw new
|
|
24355
|
+
throw new RuntimeModelError62(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
23776
24356
|
}
|
|
23777
24357
|
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
23778
24358
|
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -23865,15 +24445,6 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
23865
24445
|
}
|
|
23866
24446
|
return void 0;
|
|
23867
24447
|
}
|
|
23868
|
-
/**
|
|
23869
|
-
* 列数据属性字段名称
|
|
23870
|
-
* @author lxm
|
|
23871
|
-
* @date 2023-06-25 09:26:04
|
|
23872
|
-
* @readonly
|
|
23873
|
-
*/
|
|
23874
|
-
get fieldName() {
|
|
23875
|
-
return this.model.dataItemName;
|
|
23876
|
-
}
|
|
23877
24448
|
/**
|
|
23878
24449
|
* 初始化方法,生成表格编辑项控制器
|
|
23879
24450
|
*
|
|
@@ -24988,10 +25559,10 @@ import {
|
|
|
24988
25559
|
mergeInLeft as mergeInLeft3,
|
|
24989
25560
|
recursiveIterate as recursiveIterate9
|
|
24990
25561
|
} from "@ibiz-template/core";
|
|
24991
|
-
import { clone as
|
|
25562
|
+
import { clone as clone27, isNil as isNil24 } from "ramda";
|
|
24992
25563
|
|
|
24993
25564
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
24994
|
-
import { RuntimeModelError as
|
|
25565
|
+
import { RuntimeModelError as RuntimeModelError63 } from "@ibiz-template/core";
|
|
24995
25566
|
var ExcludeOPs = [
|
|
24996
25567
|
"ISNULL" /* IS_NULL */,
|
|
24997
25568
|
"ISNOTNULL" /* IS_NOT_NULL */
|
|
@@ -25032,7 +25603,7 @@ var SearchBarFilterController = class {
|
|
|
25032
25603
|
async init() {
|
|
25033
25604
|
if (!this.noEditor) {
|
|
25034
25605
|
if (!this.model.editor) {
|
|
25035
|
-
throw new
|
|
25606
|
+
throw new RuntimeModelError63(this.model, "\u7F3A\u5C11\u7F16\u8F91\u5668\u6A21\u578B");
|
|
25036
25607
|
}
|
|
25037
25608
|
this.editorProvider = await getEditorProvider(this.model.editor);
|
|
25038
25609
|
if (this.editorProvider) {
|
|
@@ -25492,7 +26063,7 @@ var SearchBarController = class extends ControlController {
|
|
|
25492
26063
|
}
|
|
25493
26064
|
});
|
|
25494
26065
|
if (addSearchBarFilters.length > 0) {
|
|
25495
|
-
this.model =
|
|
26066
|
+
this.model = clone27(this.model);
|
|
25496
26067
|
this.model.searchBarFilters = addSearchBarFilters.concat(...mergeFilters);
|
|
25497
26068
|
this.model.enableFilter = true;
|
|
25498
26069
|
}
|
|
@@ -26076,7 +26647,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
26076
26647
|
// src/controller/control/tree/tree.controller.ts
|
|
26077
26648
|
import {
|
|
26078
26649
|
RuntimeError as RuntimeError57,
|
|
26079
|
-
RuntimeModelError as
|
|
26650
|
+
RuntimeModelError as RuntimeModelError64,
|
|
26080
26651
|
recursiveIterate as recursiveIterate10
|
|
26081
26652
|
} from "@ibiz-template/core";
|
|
26082
26653
|
|
|
@@ -26429,6 +27000,7 @@ var TreeController = class extends MDControlController {
|
|
|
26429
27000
|
this.initDropNodeRss();
|
|
26430
27001
|
this.initNodeClickTBUIActionItem();
|
|
26431
27002
|
await this.initService();
|
|
27003
|
+
await this.initCounter();
|
|
26432
27004
|
this.model.detreeNodes.forEach((node) => {
|
|
26433
27005
|
var _a2, _b2;
|
|
26434
27006
|
if ((_b2 = (_a2 = node.decontextMenu) == null ? void 0 : _a2.detoolbarItems) == null ? void 0 : _b2.length) {
|
|
@@ -26444,6 +27016,12 @@ var TreeController = class extends MDControlController {
|
|
|
26444
27016
|
Object.values(this.contextMenus).map((menu) => menu.created())
|
|
26445
27017
|
);
|
|
26446
27018
|
}
|
|
27019
|
+
async onDestroyed() {
|
|
27020
|
+
await super.onDestroyed();
|
|
27021
|
+
if (this.counter) {
|
|
27022
|
+
this.counter.destroy();
|
|
27023
|
+
}
|
|
27024
|
+
}
|
|
26447
27025
|
/**
|
|
26448
27026
|
* 初始化对应类型的部件服务
|
|
26449
27027
|
* @author lxm
|
|
@@ -26455,6 +27033,23 @@ var TreeController = class extends MDControlController {
|
|
|
26455
27033
|
this.service = new TreeService(this.model);
|
|
26456
27034
|
await this.service.init(this.context);
|
|
26457
27035
|
}
|
|
27036
|
+
/**
|
|
27037
|
+
* 初始化计数器
|
|
27038
|
+
* @author lxm
|
|
27039
|
+
* @date 2024-01-18 05:12:02
|
|
27040
|
+
* @protected
|
|
27041
|
+
* @return {*} {Promise<void>}
|
|
27042
|
+
*/
|
|
27043
|
+
async initCounter() {
|
|
27044
|
+
const { appCounterRefs } = this.model;
|
|
27045
|
+
const appCounterRef = appCounterRefs == null ? void 0 : appCounterRefs[0];
|
|
27046
|
+
if (appCounterRef) {
|
|
27047
|
+
this.counter = await CounterService.getCounterByRef(
|
|
27048
|
+
appCounterRef,
|
|
27049
|
+
this.context
|
|
27050
|
+
);
|
|
27051
|
+
}
|
|
27052
|
+
}
|
|
26458
27053
|
/**
|
|
26459
27054
|
* 初始化节点拖入关系处理
|
|
26460
27055
|
* @author lxm
|
|
@@ -26947,7 +27542,7 @@ var TreeController = class extends MDControlController {
|
|
|
26947
27542
|
const { sortAppDEFieldId, sortDir, allowOrder } = orderNodeModel;
|
|
26948
27543
|
if (allowOrder === true) {
|
|
26949
27544
|
if (!sortAppDEFieldId) {
|
|
26950
|
-
throw new
|
|
27545
|
+
throw new RuntimeModelError64(orderNodeModel, "\u7F3A\u5C11\u914D\u7F6E\u6392\u5E8F\u5C5E\u6027");
|
|
26951
27546
|
}
|
|
26952
27547
|
const sortField = sortAppDEFieldId.toLowerCase();
|
|
26953
27548
|
const isAsc = sortDir === "ASC";
|
|
@@ -27028,7 +27623,7 @@ var TreeController = class extends MDControlController {
|
|
|
27028
27623
|
async modifyNodeText(nodeData, text) {
|
|
27029
27624
|
const model = this.getNodeModel(nodeData._nodeId);
|
|
27030
27625
|
if (!model.allowEditText) {
|
|
27031
|
-
throw new
|
|
27626
|
+
throw new RuntimeModelError64(model, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u7F16\u8F91\u6A21\u5F0F\uFF1A\u540D\u79F0");
|
|
27032
27627
|
}
|
|
27033
27628
|
if (!nodeData._deData) {
|
|
27034
27629
|
throw new RuntimeError57("\u4E0D\u662F\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E");
|
|
@@ -27392,7 +27987,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
27392
27987
|
};
|
|
27393
27988
|
|
|
27394
27989
|
// src/controller/control/md-ctrl/md-ctrl.controller.ts
|
|
27395
|
-
import { RuntimeModelError as
|
|
27990
|
+
import { RuntimeModelError as RuntimeModelError65 } from "@ibiz-template/core";
|
|
27396
27991
|
import { isNil as isNil25 } from "ramda";
|
|
27397
27992
|
|
|
27398
27993
|
// src/controller/control/md-ctrl/md-ctrl.service.ts
|
|
@@ -27599,7 +28194,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
27599
28194
|
const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
|
|
27600
28195
|
if (enableGroup && groupMode) {
|
|
27601
28196
|
if (!groupAppDEFieldId) {
|
|
27602
|
-
throw new
|
|
28197
|
+
throw new RuntimeModelError65(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
|
|
27603
28198
|
}
|
|
27604
28199
|
if (groupMode === "AUTO") {
|
|
27605
28200
|
this.handleAutoGroup();
|
|
@@ -27666,7 +28261,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
27666
28261
|
async handleCodeListGroup() {
|
|
27667
28262
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
27668
28263
|
if (!groupCodeListId) {
|
|
27669
|
-
throw new
|
|
28264
|
+
throw new RuntimeModelError65(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
27670
28265
|
}
|
|
27671
28266
|
const { items } = this.state;
|
|
27672
28267
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -27696,7 +28291,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
27696
28291
|
};
|
|
27697
28292
|
|
|
27698
28293
|
// src/controller/control/kanban/kanban.controller.ts
|
|
27699
|
-
import { RuntimeError as RuntimeError59, RuntimeModelError as
|
|
28294
|
+
import { RuntimeError as RuntimeError59, RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
|
|
27700
28295
|
import { isNil as isNil26 } from "ramda";
|
|
27701
28296
|
|
|
27702
28297
|
// src/controller/control/kanban/kanban.service.ts
|
|
@@ -27774,10 +28369,10 @@ var KanbanController = class extends DataViewControlController {
|
|
|
27774
28369
|
const sortField = this.model.minorSortAppDEFieldId;
|
|
27775
28370
|
const { minorSortDir } = this.model;
|
|
27776
28371
|
if (!sortField) {
|
|
27777
|
-
throw new
|
|
28372
|
+
throw new RuntimeModelError66(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
|
|
27778
28373
|
}
|
|
27779
28374
|
if (!minorSortDir) {
|
|
27780
|
-
throw new
|
|
28375
|
+
throw new RuntimeModelError66(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
|
|
27781
28376
|
}
|
|
27782
28377
|
const isAsc = minorSortDir === "ASC";
|
|
27783
28378
|
items.forEach((item) => {
|
|
@@ -27921,7 +28516,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
27921
28516
|
async handleCodeListGroup() {
|
|
27922
28517
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
27923
28518
|
if (!groupCodeListId) {
|
|
27924
|
-
throw new
|
|
28519
|
+
throw new RuntimeModelError66(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
27925
28520
|
}
|
|
27926
28521
|
const { items } = this.state;
|
|
27927
28522
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -28215,7 +28810,13 @@ var KanbanController = class extends DataViewControlController {
|
|
|
28215
28810
|
};
|
|
28216
28811
|
|
|
28217
28812
|
// src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
|
|
28218
|
-
import {
|
|
28813
|
+
import {
|
|
28814
|
+
RuntimeError as RuntimeError60,
|
|
28815
|
+
RuntimeModelError as RuntimeModelError67,
|
|
28816
|
+
awaitTimeout as awaitTimeout3,
|
|
28817
|
+
recursiveIterate as recursiveIterate11
|
|
28818
|
+
} from "@ibiz-template/core";
|
|
28819
|
+
import { clone as clone28 } from "ramda";
|
|
28219
28820
|
|
|
28220
28821
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
28221
28822
|
var TreeGridExService = class extends TreeService {
|
|
@@ -28224,18 +28825,29 @@ var TreeGridExService = class extends TreeService {
|
|
|
28224
28825
|
// src/controller/control/tree-grid-ex/tree-grid-ex-row.state.ts
|
|
28225
28826
|
var TreeGridExRowState = class {
|
|
28226
28827
|
constructor(data, treeGrid) {
|
|
28227
|
-
|
|
28228
|
-
|
|
28229
|
-
|
|
28230
|
-
|
|
28231
|
-
|
|
28232
|
-
|
|
28233
|
-
*/
|
|
28234
|
-
this.uaColStates = {};
|
|
28828
|
+
this.errors = {};
|
|
28829
|
+
this.columnActionsStates = {};
|
|
28830
|
+
this.editColStates = {};
|
|
28831
|
+
this.modified = false;
|
|
28832
|
+
this.showRowEdit = false;
|
|
28833
|
+
this.processing = false;
|
|
28235
28834
|
this.data = data;
|
|
28236
|
-
|
|
28237
|
-
|
|
28238
|
-
|
|
28835
|
+
if (data._nodeType === "DE") {
|
|
28836
|
+
Object.values(treeGrid.uaColumns).forEach((column) => {
|
|
28837
|
+
column.initActionStates(this);
|
|
28838
|
+
});
|
|
28839
|
+
Object.values(treeGrid.fieldColumns).forEach((column) => {
|
|
28840
|
+
column.initActionStates(this);
|
|
28841
|
+
});
|
|
28842
|
+
Object.values(treeGrid.fieldColumns).forEach((fieldColumn) => {
|
|
28843
|
+
this.editColStates[fieldColumn.name] = {
|
|
28844
|
+
disabled: false,
|
|
28845
|
+
readonly: false,
|
|
28846
|
+
editable: ibiz.config.grid.editShowMode === "all",
|
|
28847
|
+
required: false
|
|
28848
|
+
};
|
|
28849
|
+
});
|
|
28850
|
+
}
|
|
28239
28851
|
}
|
|
28240
28852
|
};
|
|
28241
28853
|
|
|
@@ -28280,6 +28892,9 @@ var TreeGridExController = class extends TreeController {
|
|
|
28280
28892
|
*/
|
|
28281
28893
|
this.uaColumns = {};
|
|
28282
28894
|
}
|
|
28895
|
+
get _evt() {
|
|
28896
|
+
return this.evt;
|
|
28897
|
+
}
|
|
28283
28898
|
/**
|
|
28284
28899
|
* 是否有配置宽度自适应列
|
|
28285
28900
|
*
|
|
@@ -28299,11 +28914,22 @@ var TreeGridExController = class extends TreeController {
|
|
|
28299
28914
|
get overflowMode() {
|
|
28300
28915
|
return ibiz.config.grid.overflowMode;
|
|
28301
28916
|
}
|
|
28917
|
+
/**
|
|
28918
|
+
* 允许使用行编辑
|
|
28919
|
+
* @author lxm
|
|
28920
|
+
* @date 2023-08-17 02:52:07
|
|
28921
|
+
* @readonly
|
|
28922
|
+
* @type {boolean}
|
|
28923
|
+
*/
|
|
28924
|
+
get allowRowEdit() {
|
|
28925
|
+
return this.state.rowEditOpen;
|
|
28926
|
+
}
|
|
28302
28927
|
initState() {
|
|
28303
28928
|
super.initState();
|
|
28304
28929
|
this.state.columnStates = [];
|
|
28305
28930
|
this.state.rootNodes = [];
|
|
28306
28931
|
this.state.rows = {};
|
|
28932
|
+
this.state.rowEditOpen = true;
|
|
28307
28933
|
}
|
|
28308
28934
|
async onCreated() {
|
|
28309
28935
|
await super.onCreated();
|
|
@@ -28439,6 +29065,204 @@ var TreeGridExController = class extends TreeController {
|
|
|
28439
29065
|
convertColumnCaption(this.model.detreeColumns);
|
|
28440
29066
|
}
|
|
28441
29067
|
}
|
|
29068
|
+
async save(nodeData) {
|
|
29069
|
+
if (this.state.isSimple) {
|
|
29070
|
+
ibiz.log.debug("\u7B80\u5355\u6A21\u5F0F\uFF0C\u4E0D\u4FDD\u5B58");
|
|
29071
|
+
return;
|
|
29072
|
+
}
|
|
29073
|
+
if (nodeData._nodeType !== "DE") {
|
|
29074
|
+
throw new RuntimeError60("\u975E\u5B9E\u4F53\u8282\u70B9\u6570\u636E\u4E0D\u80FD\u4FDD\u5B58");
|
|
29075
|
+
}
|
|
29076
|
+
const rowState = this.state.rows[nodeData._uuid];
|
|
29077
|
+
if (!rowState) {
|
|
29078
|
+
throw new RuntimeError60("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
29079
|
+
}
|
|
29080
|
+
if (!rowState.modified) {
|
|
29081
|
+
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
29082
|
+
return;
|
|
29083
|
+
}
|
|
29084
|
+
if (rowState.processing) {
|
|
29085
|
+
await awaitTimeout3(500, this.save.bind(this), [nodeData]);
|
|
29086
|
+
return;
|
|
29087
|
+
}
|
|
29088
|
+
const nodeModel = this.getNodeModel(nodeData._nodeId);
|
|
29089
|
+
const { appDataEntityId, updateAppDEActionId } = nodeModel;
|
|
29090
|
+
const isCreate = nodeData._deData.srfuf === 0 /* CREATE */;
|
|
29091
|
+
if (isCreate) {
|
|
29092
|
+
throw new RuntimeError60("\u6682\u4E0D\u652F\u6301\u65B0\u5EFA");
|
|
29093
|
+
}
|
|
29094
|
+
if (!updateAppDEActionId) {
|
|
29095
|
+
throw new RuntimeModelError67(nodeModel, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u66F4\u65B0\u5B9E\u4F53\u884C\u4E3A");
|
|
29096
|
+
}
|
|
29097
|
+
const deName = calcDeCodeNameById(appDataEntityId);
|
|
29098
|
+
const tempContext = this.context.clone();
|
|
29099
|
+
tempContext[deName] = nodeData._deData.srfkey;
|
|
29100
|
+
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
29101
|
+
let res;
|
|
29102
|
+
try {
|
|
29103
|
+
res = await app.deService.exec(
|
|
29104
|
+
appDataEntityId,
|
|
29105
|
+
updateAppDEActionId,
|
|
29106
|
+
tempContext,
|
|
29107
|
+
nodeData._deData
|
|
29108
|
+
);
|
|
29109
|
+
} catch (error) {
|
|
29110
|
+
await this._evt.emit("onSaveError", void 0);
|
|
29111
|
+
this.actionNotification("".concat(isCreate ? "CREATE" : "UPDATE", "ERROR"), {
|
|
29112
|
+
error,
|
|
29113
|
+
data: rowState.data
|
|
29114
|
+
});
|
|
29115
|
+
throw error;
|
|
29116
|
+
}
|
|
29117
|
+
rowState.data._deData = res.data;
|
|
29118
|
+
rowState.modified = false;
|
|
29119
|
+
this.gridStateNotify(rowState, "SAVE" /* SAVE */);
|
|
29120
|
+
await this._evt.emit("onSaveSuccess", void 0);
|
|
29121
|
+
}
|
|
29122
|
+
async saveAll() {
|
|
29123
|
+
const needSaveData = Object.values(this.state.rows).filter((row) => row.modified).map((row) => row.data);
|
|
29124
|
+
if (!needSaveData.length) {
|
|
29125
|
+
return;
|
|
29126
|
+
}
|
|
29127
|
+
await handleAllSettled(
|
|
29128
|
+
needSaveData.map((data) => {
|
|
29129
|
+
return this.save(data);
|
|
29130
|
+
})
|
|
29131
|
+
);
|
|
29132
|
+
}
|
|
29133
|
+
/**
|
|
29134
|
+
* 树表格状态变更通知
|
|
29135
|
+
*
|
|
29136
|
+
* @author lxm
|
|
29137
|
+
* @date 2022-09-20 18:09:07
|
|
29138
|
+
*/
|
|
29139
|
+
gridStateNotify(row, state) {
|
|
29140
|
+
Object.values(this.columns).forEach((column) => {
|
|
29141
|
+
column.gridStateNotify(row, state);
|
|
29142
|
+
});
|
|
29143
|
+
}
|
|
29144
|
+
/**
|
|
29145
|
+
* 设置行属性的值
|
|
29146
|
+
*
|
|
29147
|
+
* @author lxm
|
|
29148
|
+
* @date 2022-08-24 10:08:40
|
|
29149
|
+
* @param {GridRowState} row 行状态控制器
|
|
29150
|
+
* @param {unknown} value 要设置的值
|
|
29151
|
+
* @param {string} name 要设置的表单数据的属性名称
|
|
29152
|
+
*/
|
|
29153
|
+
async setRowValue(row, name, value) {
|
|
29154
|
+
if (Object.prototype.hasOwnProperty.call(row.data, name) && !isValueChange(row.data[name], value)) {
|
|
29155
|
+
return;
|
|
29156
|
+
}
|
|
29157
|
+
row.data[name] = value;
|
|
29158
|
+
row.modified = true;
|
|
29159
|
+
row.processing = true;
|
|
29160
|
+
try {
|
|
29161
|
+
await this.dataChangeNotify(row, [name]);
|
|
29162
|
+
} finally {
|
|
29163
|
+
row.processing = false;
|
|
29164
|
+
}
|
|
29165
|
+
}
|
|
29166
|
+
/**
|
|
29167
|
+
* 通知所有表格编辑项成员表格编辑项数据变更
|
|
29168
|
+
*
|
|
29169
|
+
* @author lxm
|
|
29170
|
+
* @date 2022-09-20 22:09:49
|
|
29171
|
+
* @param {GridRowState} row 行数据
|
|
29172
|
+
* @param {string[]} names 更新的属性
|
|
29173
|
+
*/
|
|
29174
|
+
async dataChangeNotify(row, names) {
|
|
29175
|
+
await handleAllSettled(
|
|
29176
|
+
Object.values(this.columns).map(async (column) => {
|
|
29177
|
+
return column.dataChangeNotify(row, names);
|
|
29178
|
+
})
|
|
29179
|
+
);
|
|
29180
|
+
}
|
|
29181
|
+
async toggleRowEdit() {
|
|
29182
|
+
this.state.rowEditOpen = !this.state.rowEditOpen;
|
|
29183
|
+
}
|
|
29184
|
+
/**
|
|
29185
|
+
* 计算默认值并返回一个对象,对象里的属性就是要填充的默认值
|
|
29186
|
+
* 没有的属性就是不需要填充默认值的属性
|
|
29187
|
+
* @author lxm
|
|
29188
|
+
* @date 2023-09-18 04:01:06
|
|
29189
|
+
* @param {IData} data
|
|
29190
|
+
* @param {boolean} isCreate
|
|
29191
|
+
* @return {*} {IData}
|
|
29192
|
+
*/
|
|
29193
|
+
calcDefaultValue(data, isCreate) {
|
|
29194
|
+
const result = {};
|
|
29195
|
+
Object.values(this.fieldColumns).forEach((c) => {
|
|
29196
|
+
const nodeColumn = c.nodeColumnControllerMap.get(data._nodeId);
|
|
29197
|
+
if (!nodeColumn || !nodeColumn.nodeEditItem) {
|
|
29198
|
+
return;
|
|
29199
|
+
}
|
|
29200
|
+
const { createDV, createDVT, updateDV, updateDVT } = nodeColumn.nodeEditItem;
|
|
29201
|
+
const valueType = isCreate ? createDVT : updateDVT;
|
|
29202
|
+
const defaultValue = isCreate ? createDV : updateDV;
|
|
29203
|
+
const defaultVal = getDefaultValue(
|
|
29204
|
+
{
|
|
29205
|
+
name: c.name,
|
|
29206
|
+
valueType,
|
|
29207
|
+
defaultValue,
|
|
29208
|
+
valueFormat: nodeColumn.valueFormat
|
|
29209
|
+
},
|
|
29210
|
+
{ data, context: this.context, params: this.params }
|
|
29211
|
+
);
|
|
29212
|
+
if (defaultVal !== void 0) {
|
|
29213
|
+
result[c.name] = defaultVal;
|
|
29214
|
+
}
|
|
29215
|
+
});
|
|
29216
|
+
return result;
|
|
29217
|
+
}
|
|
29218
|
+
/**
|
|
29219
|
+
* 切换单行的编辑状态
|
|
29220
|
+
* @author lxm
|
|
29221
|
+
* @date 2023-08-08 06:45:54
|
|
29222
|
+
* @param {GridRowState} row
|
|
29223
|
+
* @param {boolean} [editable]
|
|
29224
|
+
*/
|
|
29225
|
+
async switchRowEdit(row, editable, isSave = true) {
|
|
29226
|
+
if (!this.allowRowEdit) {
|
|
29227
|
+
return;
|
|
29228
|
+
}
|
|
29229
|
+
if (row.data._nodeType !== "DE") {
|
|
29230
|
+
return;
|
|
29231
|
+
}
|
|
29232
|
+
const toState = editable === void 0 ? !row.showRowEdit : editable;
|
|
29233
|
+
if (row.showRowEdit === toState) {
|
|
29234
|
+
return;
|
|
29235
|
+
}
|
|
29236
|
+
if (toState === false) {
|
|
29237
|
+
if (isSave) {
|
|
29238
|
+
await this.save(row.data);
|
|
29239
|
+
} else if (row.data._deData.srfuf === 0 /* CREATE */) {
|
|
29240
|
+
row.showRowEdit = false;
|
|
29241
|
+
this._evt.emit("onRowEditChange", { row });
|
|
29242
|
+
return this.remove({ data: [row.data], silent: true });
|
|
29243
|
+
} else if (row.cacheData) {
|
|
29244
|
+
row.data = row.cacheData;
|
|
29245
|
+
delete row.cacheData;
|
|
29246
|
+
}
|
|
29247
|
+
} else {
|
|
29248
|
+
const editingRow = Object.values(this.state.rows).find(
|
|
29249
|
+
(item) => item.showRowEdit
|
|
29250
|
+
);
|
|
29251
|
+
if (editingRow) {
|
|
29252
|
+
throw new RuntimeError60("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
29253
|
+
}
|
|
29254
|
+
if (row.data._deData.srfuf === 1 /* UPDATE */) {
|
|
29255
|
+
row.cacheData = clone28(row.data);
|
|
29256
|
+
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
29257
|
+
Object.assign(row.data, defaultVal);
|
|
29258
|
+
}
|
|
29259
|
+
}
|
|
29260
|
+
row.showRowEdit = toState;
|
|
29261
|
+
Object.values(this.fieldColumns).forEach((column) => {
|
|
29262
|
+
row.editColStates[column.name].editable = toState;
|
|
29263
|
+
});
|
|
29264
|
+
this._evt.emit("onRowEditChange", { row });
|
|
29265
|
+
}
|
|
28442
29266
|
};
|
|
28443
29267
|
|
|
28444
29268
|
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-column/tree-grid-ex-column.controller.ts
|
|
@@ -28523,30 +29347,485 @@ var TreeGridExColumnController = class {
|
|
|
28523
29347
|
*/
|
|
28524
29348
|
async onInit() {
|
|
28525
29349
|
}
|
|
29350
|
+
/**
|
|
29351
|
+
* 表格状态变更通知
|
|
29352
|
+
*
|
|
29353
|
+
* @author lxm
|
|
29354
|
+
* @date 2022-09-20 18:09:07
|
|
29355
|
+
*/
|
|
29356
|
+
gridStateNotify(_row, _state) {
|
|
29357
|
+
}
|
|
29358
|
+
async dataChangeNotify(_row, _names) {
|
|
29359
|
+
}
|
|
28526
29360
|
};
|
|
28527
29361
|
|
|
28528
|
-
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-
|
|
28529
|
-
|
|
28530
|
-
|
|
28531
|
-
|
|
28532
|
-
|
|
28533
|
-
|
|
28534
|
-
|
|
29362
|
+
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.ts
|
|
29363
|
+
import {
|
|
29364
|
+
DataTypes as DataTypes5,
|
|
29365
|
+
RuntimeError as RuntimeError61,
|
|
29366
|
+
RuntimeModelError as RuntimeModelError68
|
|
29367
|
+
} from "@ibiz-template/core";
|
|
29368
|
+
import { clone as clone29 } from "ramda";
|
|
29369
|
+
import dayjs6 from "dayjs";
|
|
29370
|
+
var TreeGridExNodeColumnController = class {
|
|
28535
29371
|
/**
|
|
28536
|
-
* 给rowController初始化操作列的状态
|
|
28537
|
-
*
|
|
28538
29372
|
* @author lxm
|
|
28539
|
-
* @date
|
|
28540
|
-
* @param {
|
|
29373
|
+
* @date 2024-01-09 10:04:05
|
|
29374
|
+
* @param {TreeGridExFieldColumnController} fieldColumn 树表格属性列控制器
|
|
29375
|
+
* @param {IDETreeNode} nodeModel 对应实体节点模型
|
|
28541
29376
|
*/
|
|
28542
|
-
|
|
28543
|
-
|
|
28544
|
-
|
|
28545
|
-
|
|
28546
|
-
|
|
28547
|
-
|
|
28548
|
-
|
|
28549
|
-
|
|
29377
|
+
constructor(fieldColumn, nodeModel) {
|
|
29378
|
+
this.fieldColumn = fieldColumn;
|
|
29379
|
+
this.nodeModel = nodeModel;
|
|
29380
|
+
/**
|
|
29381
|
+
* 代码表模型
|
|
29382
|
+
* @return {*}
|
|
29383
|
+
* @author: zhujiamin
|
|
29384
|
+
* @Date: 2023-05-24 10:55:50
|
|
29385
|
+
*/
|
|
29386
|
+
this.codeList = void 0;
|
|
29387
|
+
const { detreeNodeColumns, detreeNodeDataItems, detreeNodeEditItems } = nodeModel;
|
|
29388
|
+
const nodeColumn = detreeNodeColumns == null ? void 0 : detreeNodeColumns.find((column) => {
|
|
29389
|
+
return column.detreeColumnId === this.fieldColumn.model.id;
|
|
29390
|
+
});
|
|
29391
|
+
const nodeDataItem = detreeNodeDataItems == null ? void 0 : detreeNodeDataItems.find(
|
|
29392
|
+
(treeNodeDataItem) => {
|
|
29393
|
+
return treeNodeDataItem.id === nodeColumn.dataItemName;
|
|
29394
|
+
}
|
|
29395
|
+
);
|
|
29396
|
+
if (!nodeColumn || !nodeDataItem) {
|
|
29397
|
+
throw new RuntimeModelError68(
|
|
29398
|
+
nodeModel,
|
|
29399
|
+
"\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u5BF9\u5E94\u8868\u683C\u5217".concat(this.fieldColumn.name, "\u7684\u6570\u636E\u9879")
|
|
29400
|
+
);
|
|
29401
|
+
}
|
|
29402
|
+
this.nodeColumn = nodeColumn;
|
|
29403
|
+
this.nodeDataItem = nodeDataItem;
|
|
29404
|
+
if (nodeColumn.enableRowEdit) {
|
|
29405
|
+
const nodeEditItem = detreeNodeEditItems == null ? void 0 : detreeNodeEditItems.find(
|
|
29406
|
+
(treeNodeEditItem) => {
|
|
29407
|
+
return treeNodeEditItem.id === nodeColumn.id;
|
|
29408
|
+
}
|
|
29409
|
+
);
|
|
29410
|
+
if (!nodeEditItem) {
|
|
29411
|
+
throw new RuntimeModelError68(
|
|
29412
|
+
nodeModel,
|
|
29413
|
+
"\u6CA1\u6709\u627E\u5230\u5BF9\u5E94\u8868\u683C\u5217".concat(this.fieldColumn.name, "\u7684\u7F16\u8F91\u9879\u6A21\u578B")
|
|
29414
|
+
);
|
|
29415
|
+
}
|
|
29416
|
+
this.nodeEditItem = nodeEditItem;
|
|
29417
|
+
}
|
|
29418
|
+
}
|
|
29419
|
+
get unitName() {
|
|
29420
|
+
var _a;
|
|
29421
|
+
return (_a = this.nodeEditItem) == null ? void 0 : _a.unitName;
|
|
29422
|
+
}
|
|
29423
|
+
get valueFormat() {
|
|
29424
|
+
return this.nodeColumn.valueFormat;
|
|
29425
|
+
}
|
|
29426
|
+
get context() {
|
|
29427
|
+
return this.fieldColumn.context;
|
|
29428
|
+
}
|
|
29429
|
+
get params() {
|
|
29430
|
+
return this.fieldColumn.params;
|
|
29431
|
+
}
|
|
29432
|
+
get dataType() {
|
|
29433
|
+
var _a;
|
|
29434
|
+
return (_a = this.nodeDataItem) == null ? void 0 : _a.dataType;
|
|
29435
|
+
}
|
|
29436
|
+
/**
|
|
29437
|
+
* 树表格列标识(用于取数和各种比较判断)
|
|
29438
|
+
* @author lxm
|
|
29439
|
+
* @date 2024-01-09 11:33:37
|
|
29440
|
+
* @readonly
|
|
29441
|
+
* @type {string}
|
|
29442
|
+
*/
|
|
29443
|
+
get name() {
|
|
29444
|
+
return this.fieldColumn.name;
|
|
29445
|
+
}
|
|
29446
|
+
/**
|
|
29447
|
+
*树表格增强部件
|
|
29448
|
+
* @author lxm
|
|
29449
|
+
* @date 2024-01-10 11:49:23
|
|
29450
|
+
* @readonly
|
|
29451
|
+
* @type {TreeGridExController}
|
|
29452
|
+
*/
|
|
29453
|
+
get treeGrid() {
|
|
29454
|
+
return this.fieldColumn.treeGrid;
|
|
29455
|
+
}
|
|
29456
|
+
/**
|
|
29457
|
+
* 是否是链接列
|
|
29458
|
+
*
|
|
29459
|
+
* @author lxm
|
|
29460
|
+
* @date 2022-09-28 17:09:15
|
|
29461
|
+
* @returns {*}
|
|
29462
|
+
*/
|
|
29463
|
+
get isLinkColumn() {
|
|
29464
|
+
return !!this.nodeColumn.enableLinkView && !!this.nodeColumn.linkAppViewId;
|
|
29465
|
+
}
|
|
29466
|
+
/**
|
|
29467
|
+
* 是否有触发界面行为
|
|
29468
|
+
*
|
|
29469
|
+
* @author lxm
|
|
29470
|
+
* @date 2022-12-08 14:12:37
|
|
29471
|
+
* @readonly
|
|
29472
|
+
* @type {boolean}
|
|
29473
|
+
*/
|
|
29474
|
+
get hasClickAction() {
|
|
29475
|
+
return !!this.nodeColumn.deuiactionId;
|
|
29476
|
+
}
|
|
29477
|
+
/**
|
|
29478
|
+
* 单元格超出呈现模式
|
|
29479
|
+
* @author lxm
|
|
29480
|
+
* @date 2024-01-09 05:36:36
|
|
29481
|
+
* @readonly
|
|
29482
|
+
* @type {('wrap' | 'ellipsis')}
|
|
29483
|
+
*/
|
|
29484
|
+
get overflowMode() {
|
|
29485
|
+
return this.fieldColumn.treeGrid.overflowMode;
|
|
29486
|
+
}
|
|
29487
|
+
/**
|
|
29488
|
+
* 初始化
|
|
29489
|
+
* @author lxm
|
|
29490
|
+
* @date 2024-01-09 10:02:16
|
|
29491
|
+
* @return {*} {Promise<void>}
|
|
29492
|
+
*/
|
|
29493
|
+
async init() {
|
|
29494
|
+
var _a;
|
|
29495
|
+
if (((_a = this.nodeEditItem) == null ? void 0 : _a.editor) && this.nodeEditItem.editor.editorType !== "HIDDEN") {
|
|
29496
|
+
this.editorProvider = await getEditorProvider(this.nodeEditItem.editor);
|
|
29497
|
+
if (this.editorProvider) {
|
|
29498
|
+
this.editor = await this.editorProvider.createController(
|
|
29499
|
+
this.nodeEditItem.editor,
|
|
29500
|
+
this
|
|
29501
|
+
);
|
|
29502
|
+
}
|
|
29503
|
+
}
|
|
29504
|
+
if (!this.nodeEditItem) {
|
|
29505
|
+
await this.loadCodeList();
|
|
29506
|
+
}
|
|
29507
|
+
}
|
|
29508
|
+
/**
|
|
29509
|
+
* 初始化属性列界面行为组按钮状态
|
|
29510
|
+
*
|
|
29511
|
+
* @author lxm
|
|
29512
|
+
* @date 2022-09-07 21:09:43
|
|
29513
|
+
* @param {GridRowState} row
|
|
29514
|
+
*/
|
|
29515
|
+
initActionStates(row) {
|
|
29516
|
+
const { deuiactionGroup } = this.nodeColumn;
|
|
29517
|
+
if (deuiactionGroup && deuiactionGroup.uiactionGroupDetails) {
|
|
29518
|
+
const containerState = new ButtonContainerState();
|
|
29519
|
+
deuiactionGroup.uiactionGroupDetails.forEach((detail) => {
|
|
29520
|
+
const actionid = detail.uiactionId;
|
|
29521
|
+
if (actionid) {
|
|
29522
|
+
const buttonState = new UIActionButtonState(
|
|
29523
|
+
detail.id,
|
|
29524
|
+
this.context.srfappid,
|
|
29525
|
+
actionid
|
|
29526
|
+
);
|
|
29527
|
+
containerState.addState(detail.id, buttonState);
|
|
29528
|
+
}
|
|
29529
|
+
});
|
|
29530
|
+
row.columnActionsStates[this.name] = containerState;
|
|
29531
|
+
}
|
|
29532
|
+
}
|
|
29533
|
+
/**
|
|
29534
|
+
* 文本点击事件
|
|
29535
|
+
*
|
|
29536
|
+
* @author zk
|
|
29537
|
+
* @date 2023-07-13 12:07:53
|
|
29538
|
+
* @param {MouseEvent} event
|
|
29539
|
+
*/
|
|
29540
|
+
onTextClick(row, event) {
|
|
29541
|
+
if (this.isLinkColumn) {
|
|
29542
|
+
event.stopPropagation();
|
|
29543
|
+
this.openLinkView(row, event);
|
|
29544
|
+
} else if (this.hasClickAction) {
|
|
29545
|
+
event.stopPropagation();
|
|
29546
|
+
this.triggerAction(row, event);
|
|
29547
|
+
}
|
|
29548
|
+
}
|
|
29549
|
+
/**
|
|
29550
|
+
* 打开链接视图
|
|
29551
|
+
*
|
|
29552
|
+
* @author lxm
|
|
29553
|
+
* @date 2024-01-09 02:45:34
|
|
29554
|
+
* @param {ITreeGridExRowState} row
|
|
29555
|
+
* @param {MouseEvent} event
|
|
29556
|
+
* @return {*} {Promise<void>}
|
|
29557
|
+
*/
|
|
29558
|
+
async openLinkView(row, event) {
|
|
29559
|
+
const curValue = row.data[this.fieldColumn.name];
|
|
29560
|
+
if (!curValue) {
|
|
29561
|
+
return;
|
|
29562
|
+
}
|
|
29563
|
+
const valueItem = this.nodeColumn.linkValueItem || "srfkey";
|
|
29564
|
+
const value = row.data[valueItem];
|
|
29565
|
+
if (value == null) {
|
|
29566
|
+
throw new RuntimeError61("\u672A\u5728\u884C\u6570\u636E\u4E2D\u53D6\u5230 ".concat(valueItem, " \u7684\u503C"));
|
|
29567
|
+
}
|
|
29568
|
+
const { linkAppViewId } = this.nodeColumn;
|
|
29569
|
+
if (!linkAppViewId) {
|
|
29570
|
+
return;
|
|
29571
|
+
}
|
|
29572
|
+
const wfContext = getWFContext(row.data);
|
|
29573
|
+
const tempContext = Object.assign(this.context.clone(), {
|
|
29574
|
+
srfkey: value,
|
|
29575
|
+
...wfContext
|
|
29576
|
+
});
|
|
29577
|
+
const tempParams = clone29(this.params);
|
|
29578
|
+
const { userParam } = this.nodeColumn;
|
|
29579
|
+
if (userParam) {
|
|
29580
|
+
const { navigateContexts, navigateParams } = parseUserParams(userParam);
|
|
29581
|
+
let selfContext = {};
|
|
29582
|
+
if (navigateContexts && row.data) {
|
|
29583
|
+
selfContext = convertNavData(
|
|
29584
|
+
navigateContexts,
|
|
29585
|
+
row.data,
|
|
29586
|
+
tempParams,
|
|
29587
|
+
tempContext
|
|
29588
|
+
);
|
|
29589
|
+
}
|
|
29590
|
+
Object.assign(tempContext, selfContext);
|
|
29591
|
+
let selfParams = {};
|
|
29592
|
+
if (navigateParams && row.data) {
|
|
29593
|
+
selfParams = convertNavData(
|
|
29594
|
+
navigateParams,
|
|
29595
|
+
row.data,
|
|
29596
|
+
tempParams,
|
|
29597
|
+
tempContext
|
|
29598
|
+
);
|
|
29599
|
+
}
|
|
29600
|
+
Object.assign(tempParams, selfParams);
|
|
29601
|
+
}
|
|
29602
|
+
const res = await ibiz.commands.execute(
|
|
29603
|
+
OpenAppViewCommand.TAG,
|
|
29604
|
+
linkAppViewId,
|
|
29605
|
+
tempContext,
|
|
29606
|
+
tempParams,
|
|
29607
|
+
{ event }
|
|
29608
|
+
);
|
|
29609
|
+
if (res == null ? void 0 : res.ok) {
|
|
29610
|
+
this.fieldColumn.treeGrid.refresh();
|
|
29611
|
+
}
|
|
29612
|
+
}
|
|
29613
|
+
/**
|
|
29614
|
+
* 触发表格列附加界面行为
|
|
29615
|
+
*
|
|
29616
|
+
* @author lxm
|
|
29617
|
+
* @date 2022-12-08 15:12:35
|
|
29618
|
+
* @param {GridRowState} row 行数据
|
|
29619
|
+
* @param {MouseEvent} event 鼠标事件
|
|
29620
|
+
* @returns {*} {Promise<void>}
|
|
29621
|
+
*/
|
|
29622
|
+
async triggerAction(row, event) {
|
|
29623
|
+
const actionId = this.nodeColumn.deuiactionId;
|
|
29624
|
+
await UIActionUtil.execAndResolved(
|
|
29625
|
+
actionId,
|
|
29626
|
+
{
|
|
29627
|
+
context: this.context,
|
|
29628
|
+
params: this.params,
|
|
29629
|
+
data: [row.data],
|
|
29630
|
+
view: this.treeGrid.view,
|
|
29631
|
+
event
|
|
29632
|
+
},
|
|
29633
|
+
this.nodeColumn.appId
|
|
29634
|
+
);
|
|
29635
|
+
}
|
|
29636
|
+
/**
|
|
29637
|
+
* 触发界面行为组点击事件
|
|
29638
|
+
*
|
|
29639
|
+
* @author lxm
|
|
29640
|
+
* @date 2024-01-11 02:26:12
|
|
29641
|
+
* @param {IUIActionGroupDetail} detail
|
|
29642
|
+
* @param {ITreeGridExRowState} row
|
|
29643
|
+
* @param {MouseEvent} event
|
|
29644
|
+
* @return {*} {Promise<void>}
|
|
29645
|
+
*/
|
|
29646
|
+
async onActionClick(detail, row, event) {
|
|
29647
|
+
const actionId = detail.uiactionId;
|
|
29648
|
+
await UIActionUtil.execAndResolved(
|
|
29649
|
+
actionId,
|
|
29650
|
+
{
|
|
29651
|
+
context: this.context,
|
|
29652
|
+
params: this.params,
|
|
29653
|
+
data: [row.data],
|
|
29654
|
+
view: this.treeGrid.view,
|
|
29655
|
+
event
|
|
29656
|
+
},
|
|
29657
|
+
detail.appId
|
|
29658
|
+
);
|
|
29659
|
+
}
|
|
29660
|
+
/**
|
|
29661
|
+
* 值格式化
|
|
29662
|
+
* @author lxm
|
|
29663
|
+
* @date 2024-01-09 03:37:34
|
|
29664
|
+
* @param {unknown} [value='']
|
|
29665
|
+
* @return {*} {string}
|
|
29666
|
+
*/
|
|
29667
|
+
formatValue(value = "") {
|
|
29668
|
+
if (this.nodeColumn.valueType !== "SIMPLE") {
|
|
29669
|
+
return ValueExUtil.toText(this.nodeColumn, value);
|
|
29670
|
+
}
|
|
29671
|
+
const strVal = "".concat(value);
|
|
29672
|
+
if (!this.valueFormat) {
|
|
29673
|
+
return strVal;
|
|
29674
|
+
}
|
|
29675
|
+
const isDate = DataTypes5.isDate(this.dataType);
|
|
29676
|
+
if (isDate || this.fieldColumn.name === "createdate") {
|
|
29677
|
+
const formatVal = dayjs6(strVal).format(this.valueFormat);
|
|
29678
|
+
if (formatVal !== "Invalid Date") {
|
|
29679
|
+
return formatVal;
|
|
29680
|
+
}
|
|
29681
|
+
return strVal;
|
|
29682
|
+
}
|
|
29683
|
+
return ibiz.util.text.format(strVal, this.valueFormat);
|
|
29684
|
+
}
|
|
29685
|
+
/**
|
|
29686
|
+
* 加载代码表数据
|
|
29687
|
+
*
|
|
29688
|
+
* @author lxm
|
|
29689
|
+
* @date 2022-09-28 15:09:38
|
|
29690
|
+
* @returns {*}
|
|
29691
|
+
*/
|
|
29692
|
+
async loadCodeList() {
|
|
29693
|
+
const appCodeListId = this.nodeColumn.appCodeListId;
|
|
29694
|
+
if (!appCodeListId) {
|
|
29695
|
+
return;
|
|
29696
|
+
}
|
|
29697
|
+
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
29698
|
+
if (!this.codeList) {
|
|
29699
|
+
this.codeList = app.codeList.getCodeList(appCodeListId);
|
|
29700
|
+
}
|
|
29701
|
+
const dataItems = await app.codeList.get(
|
|
29702
|
+
appCodeListId,
|
|
29703
|
+
this.context,
|
|
29704
|
+
this.params
|
|
29705
|
+
);
|
|
29706
|
+
this.codeListItems = dataItems;
|
|
29707
|
+
return dataItems;
|
|
29708
|
+
}
|
|
29709
|
+
gridStateNotify(row, state) {
|
|
29710
|
+
if (state === "LOAD" /* LOAD */ || state === "SAVE" /* SAVE */) {
|
|
29711
|
+
const uaColState = row.columnActionsStates[this.name];
|
|
29712
|
+
if (uaColState && row.data._nodeType === "DE") {
|
|
29713
|
+
uaColState.update(row.data._deData);
|
|
29714
|
+
}
|
|
29715
|
+
}
|
|
29716
|
+
}
|
|
29717
|
+
/**
|
|
29718
|
+
* 设置行属性的值
|
|
29719
|
+
*
|
|
29720
|
+
* @author lxm
|
|
29721
|
+
* @date 2022-08-24 10:08:40
|
|
29722
|
+
* @param {GridRowState} row 行状态控制器
|
|
29723
|
+
* @param {unknown} value 要设置的值
|
|
29724
|
+
* @param {string} name 要设置的表单数据的属性名称
|
|
29725
|
+
*/
|
|
29726
|
+
async setRowValue(row, value, name) {
|
|
29727
|
+
name = name || this.name;
|
|
29728
|
+
await this.treeGrid.setRowValue(row, name, value);
|
|
29729
|
+
}
|
|
29730
|
+
};
|
|
29731
|
+
|
|
29732
|
+
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.controller.ts
|
|
29733
|
+
var TreeGridExFieldColumnController = class extends TreeGridExColumnController {
|
|
29734
|
+
constructor() {
|
|
29735
|
+
super(...arguments);
|
|
29736
|
+
/**
|
|
29737
|
+
* 该树表格列对应不同节点模型的节点列控制器
|
|
29738
|
+
* @author lxm
|
|
29739
|
+
* @date 2024-01-08 05:40:56
|
|
29740
|
+
* @type {Map<string, IDETreeNodeColumn>}
|
|
29741
|
+
*/
|
|
29742
|
+
this.nodeColumnControllerMap = /* @__PURE__ */ new Map();
|
|
29743
|
+
}
|
|
29744
|
+
/**
|
|
29745
|
+
* 树表格列标识(用于取数和各种比较判断)
|
|
29746
|
+
* @author lxm
|
|
29747
|
+
* @date 2024-01-09 11:33:37
|
|
29748
|
+
* @readonly
|
|
29749
|
+
* @type {string}
|
|
29750
|
+
*/
|
|
29751
|
+
get name() {
|
|
29752
|
+
return this.model.id;
|
|
29753
|
+
}
|
|
29754
|
+
async init() {
|
|
29755
|
+
await this.onInit();
|
|
29756
|
+
await this.initNodeColumnController();
|
|
29757
|
+
}
|
|
29758
|
+
/**
|
|
29759
|
+
* 解析模型并初始化相关属性
|
|
29760
|
+
* @author lxm
|
|
29761
|
+
* @date 2024-01-08 05:59:12
|
|
29762
|
+
* @return {*} {Promise<void>}
|
|
29763
|
+
*/
|
|
29764
|
+
async initNodeColumnController() {
|
|
29765
|
+
var _a;
|
|
29766
|
+
(_a = this.treeGrid.model.detreeNodes) == null ? void 0 : _a.forEach((node) => {
|
|
29767
|
+
var _a2;
|
|
29768
|
+
if (node.treeNodeType !== "DE") {
|
|
29769
|
+
return;
|
|
29770
|
+
}
|
|
29771
|
+
const nodeColumn = (_a2 = node.detreeNodeColumns) == null ? void 0 : _a2.find(
|
|
29772
|
+
(column) => {
|
|
29773
|
+
return column.detreeColumnId === this.model.id;
|
|
29774
|
+
}
|
|
29775
|
+
);
|
|
29776
|
+
if (nodeColumn) {
|
|
29777
|
+
this.nodeColumnControllerMap.set(
|
|
29778
|
+
node.id,
|
|
29779
|
+
new TreeGridExNodeColumnController(this, node)
|
|
29780
|
+
);
|
|
29781
|
+
}
|
|
29782
|
+
});
|
|
29783
|
+
await Promise.all(
|
|
29784
|
+
Array.from(this.nodeColumnControllerMap.values()).map(
|
|
29785
|
+
(controller) => controller.init()
|
|
29786
|
+
)
|
|
29787
|
+
);
|
|
29788
|
+
}
|
|
29789
|
+
/**
|
|
29790
|
+
* 初始化属性列界面行为组按钮状态
|
|
29791
|
+
* @author lxm
|
|
29792
|
+
* @date 2024-01-11 01:48:38
|
|
29793
|
+
* @param {ITreeGridExRowState} row
|
|
29794
|
+
*/
|
|
29795
|
+
initActionStates(row) {
|
|
29796
|
+
const nodeColumn = this.nodeColumnControllerMap.get(row.data._nodeId);
|
|
29797
|
+
if (nodeColumn) {
|
|
29798
|
+
nodeColumn.initActionStates(row);
|
|
29799
|
+
}
|
|
29800
|
+
}
|
|
29801
|
+
gridStateNotify(row, state) {
|
|
29802
|
+
super.gridStateNotify(row, state);
|
|
29803
|
+
const nodeColumn = this.nodeColumnControllerMap.get(row.data._nodeId);
|
|
29804
|
+
if (nodeColumn) {
|
|
29805
|
+
nodeColumn.gridStateNotify(row, state);
|
|
29806
|
+
}
|
|
29807
|
+
}
|
|
29808
|
+
};
|
|
29809
|
+
|
|
29810
|
+
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts
|
|
29811
|
+
import { RuntimeModelError as RuntimeModelError69 } from "@ibiz-template/core";
|
|
29812
|
+
var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
29813
|
+
/**
|
|
29814
|
+
* 给rowController初始化操作列的状态
|
|
29815
|
+
*
|
|
29816
|
+
* @author lxm
|
|
29817
|
+
* @date 2022-09-07 21:09:43
|
|
29818
|
+
* @param {ITreeGridExRowState} row
|
|
29819
|
+
*/
|
|
29820
|
+
initActionStates(row) {
|
|
29821
|
+
var _a;
|
|
29822
|
+
const { deuiactionGroup } = this.model;
|
|
29823
|
+
if (!deuiactionGroup) {
|
|
29824
|
+
return;
|
|
29825
|
+
throw new RuntimeModelError69(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
29826
|
+
}
|
|
29827
|
+
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
29828
|
+
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
28550
29829
|
return;
|
|
28551
29830
|
}
|
|
28552
29831
|
const containerState = new ButtonContainerState();
|
|
@@ -28561,7 +29840,7 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
|
28561
29840
|
containerState.addState(detail.id, buttonState);
|
|
28562
29841
|
}
|
|
28563
29842
|
});
|
|
28564
|
-
row.
|
|
29843
|
+
row.columnActionsStates[this.model.id] = containerState;
|
|
28565
29844
|
}
|
|
28566
29845
|
/**
|
|
28567
29846
|
* 触发操作列点击事件
|
|
@@ -28585,10 +29864,19 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
|
28585
29864
|
detail.appId
|
|
28586
29865
|
);
|
|
28587
29866
|
}
|
|
29867
|
+
gridStateNotify(row, state) {
|
|
29868
|
+
super.gridStateNotify(row, state);
|
|
29869
|
+
if (state === "LOAD" /* LOAD */ || state === "SAVE" /* SAVE */) {
|
|
29870
|
+
const uaColState = row.columnActionsStates[this.model.id];
|
|
29871
|
+
if (uaColState && row.data._nodeType === "DE") {
|
|
29872
|
+
uaColState.update(row.data._deData);
|
|
29873
|
+
}
|
|
29874
|
+
}
|
|
29875
|
+
}
|
|
28588
29876
|
};
|
|
28589
29877
|
|
|
28590
29878
|
// src/controller/control/tree-grid/tree-grid.controller.ts
|
|
28591
|
-
import { RuntimeModelError as
|
|
29879
|
+
import { RuntimeModelError as RuntimeModelError70 } from "@ibiz-template/core";
|
|
28592
29880
|
var TreeGridController = class extends GridController {
|
|
28593
29881
|
constructor() {
|
|
28594
29882
|
super(...arguments);
|
|
@@ -28633,10 +29921,10 @@ var TreeGridController = class extends GridController {
|
|
|
28633
29921
|
return item.treeColumnMode === 2 || item.treeColumnMode === 3;
|
|
28634
29922
|
});
|
|
28635
29923
|
if (!treeGridParent) {
|
|
28636
|
-
throw new
|
|
29924
|
+
throw new RuntimeModelError70(this.model, "\u6811\u8868\u683C\u65E0\u503C\u5217\u6A21\u5F0F");
|
|
28637
29925
|
}
|
|
28638
29926
|
if (!treeGridValue) {
|
|
28639
|
-
throw new
|
|
29927
|
+
throw new RuntimeModelError70(this.model, "\u6811\u8868\u683C\u65E0\u7236\u503C\u5217\u6A21\u5F0F");
|
|
28640
29928
|
}
|
|
28641
29929
|
this.treeGridValueField = treeGridValue.appDEFieldId.toLowerCase();
|
|
28642
29930
|
this.treeGridParentField = treeGridParent.appDEFieldId.toLowerCase();
|
|
@@ -28656,7 +29944,7 @@ var TreeGridService = class extends GridService {
|
|
|
28656
29944
|
};
|
|
28657
29945
|
|
|
28658
29946
|
// src/controller/control/medit-view-panel/medit-view-panel.controller.ts
|
|
28659
|
-
import { RuntimeError as
|
|
29947
|
+
import { RuntimeError as RuntimeError62 } from "@ibiz-template/core";
|
|
28660
29948
|
import { createUUID as createUUID13 } from "qx-util";
|
|
28661
29949
|
|
|
28662
29950
|
// src/controller/control/medit-view-panel/medit-view-panel.service.ts
|
|
@@ -28872,7 +30160,7 @@ var MEditViewPanelController = class extends MDControlController {
|
|
|
28872
30160
|
(item) => item.id === id
|
|
28873
30161
|
);
|
|
28874
30162
|
if (panelUiItemIndex < 0) {
|
|
28875
|
-
throw new
|
|
30163
|
+
throw new RuntimeError62("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
|
|
28876
30164
|
}
|
|
28877
30165
|
const tempUiItem = this.state.panelUiItems[panelUiItemIndex];
|
|
28878
30166
|
if (tempUiItem.id.startsWith("mockId:")) {
|
|
@@ -29788,6 +31076,15 @@ var AppHub = class {
|
|
|
29788
31076
|
* @type {Map<string, string>} Map<视图 id, 视图所属应用>
|
|
29789
31077
|
*/
|
|
29790
31078
|
this.view2appMap = /* @__PURE__ */ new Map();
|
|
31079
|
+
/**
|
|
31080
|
+
* 当前注册的应用视图优先级
|
|
31081
|
+
*
|
|
31082
|
+
* @author chitanda
|
|
31083
|
+
* @date 2024-01-15 15:01:57
|
|
31084
|
+
* @protected
|
|
31085
|
+
* @type {Map<string, number>}
|
|
31086
|
+
*/
|
|
31087
|
+
this.view2appPriorityMap = /* @__PURE__ */ new Map();
|
|
29791
31088
|
/**
|
|
29792
31089
|
* 实例化的应用视图模型
|
|
29793
31090
|
*
|
|
@@ -29879,13 +31176,23 @@ var AppHub = class {
|
|
|
29879
31176
|
* 设置应用视图所属应用
|
|
29880
31177
|
*
|
|
29881
31178
|
* @author chitanda
|
|
29882
|
-
* @date
|
|
31179
|
+
* @date 2024-01-15 15:01:41
|
|
29883
31180
|
* @param {string} tag 视图 codeName 或者视图 id
|
|
29884
31181
|
* @param {string} [appId=ibiz.env.appId]
|
|
31182
|
+
* @param {number} [priority=-1] 视图的优先级,值越小优先级越高。1为最高优先级
|
|
29885
31183
|
*/
|
|
29886
|
-
setAppView(tag, appId2 = ibiz.env.appId) {
|
|
31184
|
+
setAppView(tag, appId2 = ibiz.env.appId, priority = -1) {
|
|
29887
31185
|
const id = this.calcAppViewId(tag);
|
|
31186
|
+
if (this.view2appMap.has(id)) {
|
|
31187
|
+
const _priority = this.view2appPriorityMap.get(id);
|
|
31188
|
+
if (_priority && _priority < priority) {
|
|
31189
|
+
return;
|
|
31190
|
+
}
|
|
31191
|
+
}
|
|
29888
31192
|
this.view2appMap.set(id, appId2);
|
|
31193
|
+
if (priority !== -1) {
|
|
31194
|
+
this.view2appPriorityMap.set(id, priority);
|
|
31195
|
+
}
|
|
29889
31196
|
}
|
|
29890
31197
|
/**
|
|
29891
31198
|
* 判断应用视图是否存在
|
|
@@ -29935,7 +31242,7 @@ var AppHub = class {
|
|
|
29935
31242
|
this.registerAppView(appView);
|
|
29936
31243
|
return appView;
|
|
29937
31244
|
}
|
|
29938
|
-
throw new
|
|
31245
|
+
throw new RuntimeError63("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
29939
31246
|
}
|
|
29940
31247
|
/**
|
|
29941
31248
|
* 根据视图模型路径,加参数重新计算视图模型
|
|
@@ -29956,7 +31263,7 @@ var AppHub = class {
|
|
|
29956
31263
|
);
|
|
29957
31264
|
return model;
|
|
29958
31265
|
}
|
|
29959
|
-
throw new
|
|
31266
|
+
throw new RuntimeError63("\u89C6\u56FE[".concat(modelPath, "]\u4E0D\u5B58\u5728"));
|
|
29960
31267
|
}
|
|
29961
31268
|
/**
|
|
29962
31269
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -29987,7 +31294,7 @@ var AppHub = class {
|
|
|
29987
31294
|
this.registerAppDataEntity(entity, appId2);
|
|
29988
31295
|
return entity;
|
|
29989
31296
|
}
|
|
29990
|
-
throw new
|
|
31297
|
+
throw new RuntimeError63("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
29991
31298
|
}
|
|
29992
31299
|
/**
|
|
29993
31300
|
* 新建 hub 应用
|
|
@@ -30002,7 +31309,7 @@ var AppHub = class {
|
|
|
30002
31309
|
return this.appMap.get(id);
|
|
30003
31310
|
}
|
|
30004
31311
|
if (!this.modelLoaderProvider) {
|
|
30005
|
-
throw new
|
|
31312
|
+
throw new RuntimeError63("\u8BF7\u5148\u6CE8\u518C\u6A21\u578B\u52A0\u8F7D\u9002\u914D\u5668");
|
|
30006
31313
|
}
|
|
30007
31314
|
const appModel = await this.modelLoaderProvider.getApp(id);
|
|
30008
31315
|
const app = new Application(appModel);
|
|
@@ -30133,7 +31440,7 @@ var EngineFactory = class {
|
|
|
30133
31440
|
};
|
|
30134
31441
|
|
|
30135
31442
|
// src/engine/view-base.engine.ts
|
|
30136
|
-
import { RuntimeError as
|
|
31443
|
+
import { RuntimeError as RuntimeError64 } from "@ibiz-template/core";
|
|
30137
31444
|
var ViewEngineBase = class {
|
|
30138
31445
|
/**
|
|
30139
31446
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -30321,7 +31628,7 @@ var ViewEngineBase = class {
|
|
|
30321
31628
|
const { appDataEntityId } = this.view.model;
|
|
30322
31629
|
const { evt, context, params } = this.view;
|
|
30323
31630
|
if (!appDataEntityId) {
|
|
30324
|
-
throw new
|
|
31631
|
+
throw new RuntimeError64("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
30325
31632
|
}
|
|
30326
31633
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
30327
31634
|
const res = await app.deService.exec(
|
|
@@ -30342,8 +31649,8 @@ var ViewEngineBase = class {
|
|
|
30342
31649
|
};
|
|
30343
31650
|
|
|
30344
31651
|
// src/engine/md-view.engine.ts
|
|
30345
|
-
import { RuntimeModelError as
|
|
30346
|
-
import { clone as
|
|
31652
|
+
import { RuntimeModelError as RuntimeModelError71 } from "@ibiz-template/core";
|
|
31653
|
+
import { clone as clone30 } from "ramda";
|
|
30347
31654
|
var MDViewEngine = class extends ViewEngineBase {
|
|
30348
31655
|
/**
|
|
30349
31656
|
* 多数据部件名称
|
|
@@ -30526,7 +31833,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
30526
31833
|
view: this.view
|
|
30527
31834
|
}));
|
|
30528
31835
|
if (result === -1) {
|
|
30529
|
-
throw new
|
|
31836
|
+
throw new RuntimeModelError71(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
30530
31837
|
} else {
|
|
30531
31838
|
return {
|
|
30532
31839
|
cancel: !result.ok
|
|
@@ -30549,9 +31856,9 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
30549
31856
|
(item) => item.id === "newdata"
|
|
30550
31857
|
);
|
|
30551
31858
|
if (!openAppViewLogic) {
|
|
30552
|
-
throw new
|
|
31859
|
+
throw new RuntimeModelError71(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
30553
31860
|
}
|
|
30554
|
-
const params =
|
|
31861
|
+
const params = clone30(this.view.params);
|
|
30555
31862
|
if (copyMode) {
|
|
30556
31863
|
params.srfcopymode = copyMode;
|
|
30557
31864
|
}
|
|
@@ -30563,7 +31870,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
30563
31870
|
view: this.view
|
|
30564
31871
|
}));
|
|
30565
31872
|
if (result === -1) {
|
|
30566
|
-
throw new
|
|
31873
|
+
throw new RuntimeModelError71(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
30567
31874
|
} else {
|
|
30568
31875
|
return {
|
|
30569
31876
|
cancel: !result.ok
|
|
@@ -30731,6 +32038,13 @@ var GlobalUtil = class {
|
|
|
30731
32038
|
* @date 2023-09-26 05:04:26
|
|
30732
32039
|
*/
|
|
30733
32040
|
this.error = new ErrorHandlerCenter();
|
|
32041
|
+
/**
|
|
32042
|
+
* 视图堆栈
|
|
32043
|
+
*
|
|
32044
|
+
* @author chitanda
|
|
32045
|
+
* @date 2024-01-18 14:01:23
|
|
32046
|
+
*/
|
|
32047
|
+
this.viewStack = new ViewStack();
|
|
30734
32048
|
this.error.register(new DefaultErrorHandler());
|
|
30735
32049
|
}
|
|
30736
32050
|
/**
|
|
@@ -30762,7 +32076,7 @@ var GlobalUtil = class {
|
|
|
30762
32076
|
};
|
|
30763
32077
|
|
|
30764
32078
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
30765
|
-
import { RuntimeError as
|
|
32079
|
+
import { RuntimeError as RuntimeError65 } from "@ibiz-template/core";
|
|
30766
32080
|
var LogicExecutor = class {
|
|
30767
32081
|
/**
|
|
30768
32082
|
* @author lxm
|
|
@@ -30783,7 +32097,7 @@ var LogicExecutor = class {
|
|
|
30783
32097
|
*/
|
|
30784
32098
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30785
32099
|
execute(_executeParams) {
|
|
30786
|
-
throw new
|
|
32100
|
+
throw new RuntimeError65("Method not implemented.");
|
|
30787
32101
|
}
|
|
30788
32102
|
/**
|
|
30789
32103
|
* 销毁方法
|
|
@@ -30874,13 +32188,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
30874
32188
|
};
|
|
30875
32189
|
|
|
30876
32190
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
30877
|
-
import { RuntimeModelError as
|
|
32191
|
+
import { RuntimeModelError as RuntimeModelError72 } from "@ibiz-template/core";
|
|
30878
32192
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
30879
32193
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
30880
32194
|
execute(executeParams) {
|
|
30881
32195
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
30882
32196
|
if (!appDEUILogicId) {
|
|
30883
|
-
throw new
|
|
32197
|
+
throw new RuntimeModelError72(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
30884
32198
|
}
|
|
30885
32199
|
execUILogic(appDEUILogicId, appDataEntityId, executeParams);
|
|
30886
32200
|
}
|
|
@@ -31220,7 +32534,7 @@ var LogicSchedulerCenter = class {
|
|
|
31220
32534
|
};
|
|
31221
32535
|
|
|
31222
32536
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
31223
|
-
import { RuntimeError as
|
|
32537
|
+
import { RuntimeError as RuntimeError66 } from "@ibiz-template/core";
|
|
31224
32538
|
var LogicTrigger = class {
|
|
31225
32539
|
/**
|
|
31226
32540
|
* @author lxm
|
|
@@ -31280,7 +32594,7 @@ var LogicTrigger = class {
|
|
|
31280
32594
|
if (this.executor) {
|
|
31281
32595
|
return this.executor.execute(executeParams);
|
|
31282
32596
|
}
|
|
31283
|
-
throw new
|
|
32597
|
+
throw new RuntimeError66("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
31284
32598
|
}
|
|
31285
32599
|
/**
|
|
31286
32600
|
* 销毁方法
|
|
@@ -31297,12 +32611,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
31297
32611
|
};
|
|
31298
32612
|
|
|
31299
32613
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
31300
|
-
import { RuntimeError as
|
|
32614
|
+
import { RuntimeError as RuntimeError67 } from "@ibiz-template/core";
|
|
31301
32615
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
31302
32616
|
bindExecutor(executor) {
|
|
31303
32617
|
super.bindExecutor(executor);
|
|
31304
32618
|
if (this.executor.type !== "SCRIPT") {
|
|
31305
|
-
throw new
|
|
32619
|
+
throw new RuntimeError67(
|
|
31306
32620
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
31307
32621
|
);
|
|
31308
32622
|
}
|
|
@@ -31338,7 +32652,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
31338
32652
|
};
|
|
31339
32653
|
|
|
31340
32654
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
31341
|
-
import { RuntimeError as
|
|
32655
|
+
import { RuntimeError as RuntimeError68, RuntimeModelError as RuntimeModelError73 } from "@ibiz-template/core";
|
|
31342
32656
|
var TimerTrigger = class extends LogicTrigger {
|
|
31343
32657
|
constructor() {
|
|
31344
32658
|
super(...arguments);
|
|
@@ -31346,11 +32660,11 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
31346
32660
|
}
|
|
31347
32661
|
start() {
|
|
31348
32662
|
if (!this.logic.timer) {
|
|
31349
|
-
throw new
|
|
32663
|
+
throw new RuntimeModelError73(this.logic, "\u5B9A\u65F6\u5668\u7F3A\u5C11\u5B9A\u65F6\u95F4\u9694");
|
|
31350
32664
|
}
|
|
31351
32665
|
this.timer = setInterval(() => {
|
|
31352
32666
|
if (!this.scheduler.defaultParamsCb) {
|
|
31353
|
-
throw new
|
|
32667
|
+
throw new RuntimeError68("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
31354
32668
|
}
|
|
31355
32669
|
const params = this.scheduler.defaultParamsCb();
|
|
31356
32670
|
this.executor.execute(params);
|
|
@@ -31367,8 +32681,8 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
31367
32681
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
31368
32682
|
import {
|
|
31369
32683
|
ModelError as ModelError34,
|
|
31370
|
-
RuntimeError as
|
|
31371
|
-
RuntimeModelError as
|
|
32684
|
+
RuntimeError as RuntimeError69,
|
|
32685
|
+
RuntimeModelError as RuntimeModelError74
|
|
31372
32686
|
} from "@ibiz-template/core";
|
|
31373
32687
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
31374
32688
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
@@ -31405,7 +32719,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31405
32719
|
const { context, params, ...rest } = parameters;
|
|
31406
32720
|
const { data } = parameters;
|
|
31407
32721
|
if (!(data == null ? void 0 : data[0])) {
|
|
31408
|
-
throw new
|
|
32722
|
+
throw new RuntimeError69("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
31409
32723
|
}
|
|
31410
32724
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
31411
32725
|
let openViewRef;
|
|
@@ -31414,7 +32728,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31414
32728
|
} else {
|
|
31415
32729
|
openViewRef = appUILogic.openDataAppView;
|
|
31416
32730
|
if (!openViewRef) {
|
|
31417
|
-
throw new
|
|
32731
|
+
throw new RuntimeModelError74(
|
|
31418
32732
|
appUILogic,
|
|
31419
32733
|
"opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
|
|
31420
32734
|
);
|
|
@@ -31422,7 +32736,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31422
32736
|
}
|
|
31423
32737
|
const openView = openViewRef.refAppViewId;
|
|
31424
32738
|
if (!openView) {
|
|
31425
|
-
throw new
|
|
32739
|
+
throw new RuntimeModelError74(
|
|
31426
32740
|
appUILogic,
|
|
31427
32741
|
"opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
|
|
31428
32742
|
);
|
|
@@ -31452,7 +32766,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31452
32766
|
);
|
|
31453
32767
|
const typeFileName = appDataEntity.formTypeAppDEFieldId || appDataEntity.dataTypeAppDEFieldId;
|
|
31454
32768
|
if (!typeFileName) {
|
|
31455
|
-
throw new
|
|
32769
|
+
throw new RuntimeModelError74(
|
|
31456
32770
|
appUILogic,
|
|
31457
32771
|
"".concat(appDataEntity.codeName, "[\u591A\u8868\u5355\u5B9E\u4F53] or [\u7D22\u5F15\u5B9E\u4F53]\u7F3A\u5C11\u7C7B\u578B\u5C5E\u6027\u914D\u7F6E")
|
|
31458
32772
|
);
|
|
@@ -31460,12 +32774,12 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31460
32774
|
const { data } = parameters;
|
|
31461
32775
|
const formTypeValue = data[0][typeFileName];
|
|
31462
32776
|
if (!formTypeValue) {
|
|
31463
|
-
throw new
|
|
32777
|
+
throw new RuntimeModelError74(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
|
|
31464
32778
|
}
|
|
31465
32779
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
31466
32780
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
31467
32781
|
if (!findView) {
|
|
31468
|
-
throw new
|
|
32782
|
+
throw new RuntimeError69(
|
|
31469
32783
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
31470
32784
|
);
|
|
31471
32785
|
}
|
|
@@ -31502,7 +32816,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31502
32816
|
return viewRef.refMode.toLowerCase() !== parentDeName;
|
|
31503
32817
|
});
|
|
31504
32818
|
if (!newViewRef) {
|
|
31505
|
-
throw new
|
|
32819
|
+
throw new RuntimeModelError74(
|
|
31506
32820
|
appUILogic,
|
|
31507
32821
|
"\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE"
|
|
31508
32822
|
);
|
|
@@ -31512,7 +32826,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31512
32826
|
} else {
|
|
31513
32827
|
newViewRef = newDataAppView;
|
|
31514
32828
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
31515
|
-
throw new
|
|
32829
|
+
throw new RuntimeModelError74(
|
|
31516
32830
|
appUILogic,
|
|
31517
32831
|
"newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
|
|
31518
32832
|
);
|
|
@@ -31576,7 +32890,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31576
32890
|
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
31577
32891
|
const { context, params, ...rest } = parameters;
|
|
31578
32892
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
31579
|
-
throw new
|
|
32893
|
+
throw new RuntimeModelError74(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
|
|
31580
32894
|
}
|
|
31581
32895
|
const result = await ibiz.commands.execute(
|
|
31582
32896
|
OpenAppViewCommand.TAG,
|
|
@@ -31590,7 +32904,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31590
32904
|
}
|
|
31591
32905
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
31592
32906
|
if (!selectData) {
|
|
31593
|
-
throw new
|
|
32907
|
+
throw new RuntimeError69("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
31594
32908
|
}
|
|
31595
32909
|
const indexType = selectData.srfkey;
|
|
31596
32910
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find(
|
|
@@ -31600,7 +32914,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31600
32914
|
}
|
|
31601
32915
|
);
|
|
31602
32916
|
if (!findView) {
|
|
31603
|
-
throw new
|
|
32917
|
+
throw new RuntimeError69(
|
|
31604
32918
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
31605
32919
|
);
|
|
31606
32920
|
}
|
|
@@ -31627,7 +32941,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31627
32941
|
const minorDERs = selfDe.minorAppDERSs;
|
|
31628
32942
|
const pickParentDeName = newViewRef.refMode.toLowerCase();
|
|
31629
32943
|
if (!minorDERs) {
|
|
31630
|
-
throw new
|
|
32944
|
+
throw new RuntimeModelError74(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
|
|
31631
32945
|
}
|
|
31632
32946
|
let pickParentFieldName = "";
|
|
31633
32947
|
minorDERs == null ? void 0 : minorDERs.forEach((item) => {
|
|
@@ -31637,7 +32951,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
31637
32951
|
}
|
|
31638
32952
|
});
|
|
31639
32953
|
if (pickParentFieldName === void 0) {
|
|
31640
|
-
throw new
|
|
32954
|
+
throw new RuntimeError69(
|
|
31641
32955
|
"\u6CA1\u6709\u627E\u5230".concat(pickParentDeName, "\u5728\u5F53\u524D\u5B9E\u4F53\u7684\u5916\u952E\u5C5E\u6027")
|
|
31642
32956
|
);
|
|
31643
32957
|
}
|
|
@@ -31724,12 +33038,12 @@ var ControlEventTrigger = class extends LogicTrigger {
|
|
|
31724
33038
|
};
|
|
31725
33039
|
|
|
31726
33040
|
// src/logic-scheduler/executor/app-ui-action-executor.ts
|
|
31727
|
-
import { RuntimeModelError as
|
|
33041
|
+
import { RuntimeModelError as RuntimeModelError75 } from "@ibiz-template/core";
|
|
31728
33042
|
var AppDEUIActionExecutor = class extends LogicExecutor {
|
|
31729
33043
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31730
33044
|
execute(executeParams) {
|
|
31731
33045
|
if (!this.logic.appDEUIActionId) {
|
|
31732
|
-
throw new
|
|
33046
|
+
throw new RuntimeModelError75(
|
|
31733
33047
|
this.logic,
|
|
31734
33048
|
"\u903B\u8F91\u4E2D\u7F3A\u5C11\u89E6\u53D1\u5E94\u7528\u5B9E\u4F53\u754C\u9762\u884C\u4E3Aid"
|
|
31735
33049
|
);
|
|
@@ -32087,6 +33401,8 @@ export {
|
|
|
32087
33401
|
TreeGridExColumnController,
|
|
32088
33402
|
TreeGridExController,
|
|
32089
33403
|
TreeGridExFieldColumnController,
|
|
33404
|
+
TreeGridExNodeColumnController,
|
|
33405
|
+
TreeGridExNotifyState,
|
|
32090
33406
|
TreeGridExRowState,
|
|
32091
33407
|
TreeGridExService,
|
|
32092
33408
|
TreeGridExUAColumnController,
|
|
@@ -32112,6 +33428,7 @@ export {
|
|
|
32112
33428
|
ViewLayoutPanelController,
|
|
32113
33429
|
ViewMode,
|
|
32114
33430
|
ViewPortletController,
|
|
33431
|
+
ViewStack,
|
|
32115
33432
|
ViewType,
|
|
32116
33433
|
WFStepTraceViewController,
|
|
32117
33434
|
WFWithdrawUIActionProvider,
|