@ibiz-template/runtime 0.5.3-beta.8 → 0.5.3-beta.9
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 +646 -298
- package/dist/index.system.min.js +1 -1
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.js +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 +14 -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/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 -1
- package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.d.ts +1 -1
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +4 -1
- 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 +163 -56
- package/out/service/service/entity/method/fetch.d.ts.map +1 -1
- package/out/service/service/entity/method/fetch.js +2 -1
- 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/ui-action/provider/front-ui-action-provider.d.ts.map +1 -1
- package/out/ui-action/provider/front-ui-action-provider.js +2 -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 +18 -0
- package/out/utils/ui-domain/ui-domain.d.ts.map +1 -1
- package/out/utils/ui-domain/ui-domain.js +23 -0
- package/package.json +2 -2
- 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/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 -1
- package/src/service/service/entity/de.service.ts +6 -1
- package/src/service/service/entity/method/de-action.ts +182 -61
- package/src/service/service/entity/method/fetch.ts +2 -4
- 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/ui-action/provider/front-ui-action-provider.ts +2 -1
- package/src/utils/ui-domain/transaction.ts +100 -0
- package/src/utils/ui-domain/ui-domain.ts +25 -0
package/dist/index.esm.js
CHANGED
|
@@ -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.
|
|
@@ -2886,6 +2975,14 @@ var UIDomain = class {
|
|
|
2886
2975
|
* @type {Map<string, IAppDERS[]>}
|
|
2887
2976
|
*/
|
|
2888
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();
|
|
2889
2986
|
if (id) {
|
|
2890
2987
|
this.id = id;
|
|
2891
2988
|
} else {
|
|
@@ -2917,6 +3014,20 @@ var UIDomain = class {
|
|
|
2917
3014
|
}
|
|
2918
3015
|
return [];
|
|
2919
3016
|
}
|
|
3017
|
+
/**
|
|
3018
|
+
* 查询指定主实体下的所有子实体关系
|
|
3019
|
+
*
|
|
3020
|
+
* @author chitanda
|
|
3021
|
+
* @date 2024-01-17 16:01:21
|
|
3022
|
+
* @param {string} appDataEntityId
|
|
3023
|
+
* @return {*} {IAppDERS[]}
|
|
3024
|
+
*/
|
|
3025
|
+
getDERConfigByMajor(appDataEntityId) {
|
|
3026
|
+
if (this.rs2Map.has(appDataEntityId)) {
|
|
3027
|
+
return this.rs2Map.get(appDataEntityId);
|
|
3028
|
+
}
|
|
3029
|
+
return [];
|
|
3030
|
+
}
|
|
2920
3031
|
/**
|
|
2921
3032
|
* 根据模型给的子实体中的父关系模型,计算每个实体的子关系模型
|
|
2922
3033
|
*
|
|
@@ -3064,7 +3175,7 @@ async function handleAllSettled(values, isThrow = true) {
|
|
|
3064
3175
|
|
|
3065
3176
|
// src/command/app/open-app-view/open-app-view.ts
|
|
3066
3177
|
import { ModelError as ModelError15, RuntimeError as RuntimeError23 } from "@ibiz-template/core";
|
|
3067
|
-
import { clone as
|
|
3178
|
+
import { clone as clone17 } from "ramda";
|
|
3068
3179
|
|
|
3069
3180
|
// src/service/utils/de-dq-cond/ps-de-dq-cond-engine.ts
|
|
3070
3181
|
import { isEmpty as isEmpty3 } from "ramda";
|
|
@@ -3113,6 +3224,9 @@ var PSModelCondEngineBase = class {
|
|
|
3113
3224
|
return objValue != null;
|
|
3114
3225
|
}
|
|
3115
3226
|
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) {
|
|
3227
|
+
if (objValue == null || objCondValue == null) {
|
|
3228
|
+
return false;
|
|
3229
|
+
}
|
|
3116
3230
|
let nRet = -1;
|
|
3117
3231
|
if (objValue == objCondValue) {
|
|
3118
3232
|
nRet = 0;
|
|
@@ -4762,8 +4876,18 @@ var DECache = class {
|
|
|
4762
4876
|
entity.srfkey = createUUID2();
|
|
4763
4877
|
}
|
|
4764
4878
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
4765
|
-
|
|
4766
|
-
|
|
4879
|
+
const commit = () => {
|
|
4880
|
+
this.cacheMap.set(entity.srfkey, clone4(entity));
|
|
4881
|
+
ibiz.log.warn("add", entity.srfkey, entity);
|
|
4882
|
+
};
|
|
4883
|
+
const t = this.getTransaction(context);
|
|
4884
|
+
if (t) {
|
|
4885
|
+
t.change(entity.srfkey, () => {
|
|
4886
|
+
commit();
|
|
4887
|
+
});
|
|
4888
|
+
} else {
|
|
4889
|
+
commit();
|
|
4890
|
+
}
|
|
4767
4891
|
return entity;
|
|
4768
4892
|
} catch (err) {
|
|
4769
4893
|
ibiz.log.error(err);
|
|
@@ -4813,10 +4937,25 @@ var DECache = class {
|
|
|
4813
4937
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
4814
4938
|
const data = this.cacheMap.get(oldKey);
|
|
4815
4939
|
if (data) {
|
|
4816
|
-
data
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4940
|
+
const _data = clone4(data);
|
|
4941
|
+
_data.assign(entity);
|
|
4942
|
+
const commit = () => {
|
|
4943
|
+
data.assign(entity);
|
|
4944
|
+
if (oldKey !== entity.srfkey) {
|
|
4945
|
+
this.cacheMap.delete(oldKey);
|
|
4946
|
+
}
|
|
4947
|
+
this.cacheMap.set(entity.srfkey, data);
|
|
4948
|
+
ibiz.log.warn("update", entity.srfkey, entity);
|
|
4949
|
+
};
|
|
4950
|
+
const t = this.getTransaction(context);
|
|
4951
|
+
if (t) {
|
|
4952
|
+
t.change(entity.srfkey, () => {
|
|
4953
|
+
commit();
|
|
4954
|
+
});
|
|
4955
|
+
} else {
|
|
4956
|
+
commit();
|
|
4957
|
+
}
|
|
4958
|
+
return _data;
|
|
4820
4959
|
}
|
|
4821
4960
|
throw new Error("\u6570\u636E\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u66F4\u65B0!");
|
|
4822
4961
|
} catch (err) {
|
|
@@ -4838,9 +4977,18 @@ var DECache = class {
|
|
|
4838
4977
|
const key = srfKey;
|
|
4839
4978
|
if (this.cacheMap.has(key)) {
|
|
4840
4979
|
const data = this.cacheMap.get(key);
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4980
|
+
const commit = () => {
|
|
4981
|
+
this.cacheMap.delete(key);
|
|
4982
|
+
ibiz.log.warn("delete", key);
|
|
4983
|
+
};
|
|
4984
|
+
const t = this.getTransaction(context);
|
|
4985
|
+
if (t) {
|
|
4986
|
+
t.change(key, () => {
|
|
4987
|
+
commit();
|
|
4988
|
+
});
|
|
4989
|
+
} else {
|
|
4990
|
+
commit();
|
|
4991
|
+
}
|
|
4844
4992
|
return data;
|
|
4845
4993
|
}
|
|
4846
4994
|
return null;
|
|
@@ -4861,6 +5009,11 @@ var DECache = class {
|
|
|
4861
5009
|
createBatch(context, entities) {
|
|
4862
5010
|
try {
|
|
4863
5011
|
isExistSessionId("add", context);
|
|
5012
|
+
const commit = (entity) => {
|
|
5013
|
+
this.cacheMap.set(entity.srfkey, entity);
|
|
5014
|
+
ibiz.log.warn("add", entity.srfkey, entity);
|
|
5015
|
+
};
|
|
5016
|
+
const t = this.getTransaction(context);
|
|
4864
5017
|
for (let i = 0; i < entities.length; i++) {
|
|
4865
5018
|
const entity = entities[i];
|
|
4866
5019
|
if (isNil5(entity.srfkey) || isEmpty5(entity.srfkey)) {
|
|
@@ -4868,9 +5021,13 @@ var DECache = class {
|
|
|
4868
5021
|
}
|
|
4869
5022
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
4870
5023
|
const data = clone4(entity);
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
5024
|
+
if (t) {
|
|
5025
|
+
t.change(data.srfkey, () => {
|
|
5026
|
+
commit(data);
|
|
5027
|
+
});
|
|
5028
|
+
} else {
|
|
5029
|
+
commit(data);
|
|
5030
|
+
}
|
|
4874
5031
|
}
|
|
4875
5032
|
return entities;
|
|
4876
5033
|
} catch (err) {
|
|
@@ -4890,16 +5047,41 @@ var DECache = class {
|
|
|
4890
5047
|
updateBatch(context, entities) {
|
|
4891
5048
|
try {
|
|
4892
5049
|
isExistSessionId("update", context);
|
|
5050
|
+
const commit = (entity, oldKey) => {
|
|
5051
|
+
if (oldKey !== entity.srfkey) {
|
|
5052
|
+
this.cacheMap.delete(oldKey);
|
|
5053
|
+
}
|
|
5054
|
+
this.cacheMap.set(entity.srfkey, entity);
|
|
5055
|
+
ibiz.log.warn("update", entity.srfkey, entity);
|
|
5056
|
+
};
|
|
5057
|
+
const t = this.getTransaction(context);
|
|
4893
5058
|
for (let i = 0; i < entities.length; i++) {
|
|
4894
5059
|
const entity = entities[i];
|
|
4895
5060
|
isExistSrfKey("update", entity);
|
|
5061
|
+
const oldKey = entity.srfkey;
|
|
5062
|
+
if (this.isUnionKey) {
|
|
5063
|
+
this.calcUnionKey(entity);
|
|
5064
|
+
if (oldKey !== entity.srfkey && this.checkData(context, entity.srfkey)) {
|
|
5065
|
+
throw new RuntimeError14(
|
|
5066
|
+
"\u66F4\u65B0\u8054\u5408\u4E3B\u952E\u6570\u636E\u5931\u8D25\uFF0C\u5DF2\u6709\u4E3B\u952E\u4E3A".concat(entity.srfkey, "\u7684\u6570\u636E")
|
|
5067
|
+
);
|
|
5068
|
+
}
|
|
5069
|
+
}
|
|
4896
5070
|
entity.srftempdate = (/* @__PURE__ */ new Date()).getTime();
|
|
4897
5071
|
const data = this.cacheMap.get(entity.srfkey);
|
|
4898
5072
|
if (data) {
|
|
4899
|
-
data
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
5073
|
+
const _data = clone4(data);
|
|
5074
|
+
_data.assign(entity);
|
|
5075
|
+
entities[i] = _data;
|
|
5076
|
+
if (t) {
|
|
5077
|
+
t.change(entity.srfkey, () => {
|
|
5078
|
+
data.assign(entity);
|
|
5079
|
+
commit(data, oldKey);
|
|
5080
|
+
});
|
|
5081
|
+
} else {
|
|
5082
|
+
data.assign(entity);
|
|
5083
|
+
commit(data, oldKey);
|
|
5084
|
+
}
|
|
4903
5085
|
} else {
|
|
4904
5086
|
throw new Error(
|
|
4905
5087
|
"\u6570\u636E[".concat(entity.srfdename, "-").concat(entity.srfmajortext, "(").concat(entity.srfkey, ")]\u4E0D\u5B58\u5728\uFF0C\u65E0\u6CD5\u66F4\u65B0!")
|
|
@@ -4940,10 +5122,20 @@ var DECache = class {
|
|
|
4940
5122
|
"\u672A\u627E\u5230\u4EE5\u4E0B\u6570\u636E\u300C".concat(notRemoveKeys.join("\u3001"), "\u300D\uFF0C\u65E0\u6CD5\u5220\u9664!")
|
|
4941
5123
|
);
|
|
4942
5124
|
}
|
|
4943
|
-
|
|
4944
|
-
const key = srfKeys[i];
|
|
5125
|
+
const commit = (key) => {
|
|
4945
5126
|
this.cacheMap.delete(key);
|
|
4946
5127
|
ibiz.log.warn("delete", key);
|
|
5128
|
+
};
|
|
5129
|
+
const t = this.getTransaction(context);
|
|
5130
|
+
for (let i = 0; i < srfKeys.length; i++) {
|
|
5131
|
+
const key = srfKeys[i];
|
|
5132
|
+
if (t) {
|
|
5133
|
+
t.change(key, () => {
|
|
5134
|
+
commit(key);
|
|
5135
|
+
});
|
|
5136
|
+
} else {
|
|
5137
|
+
commit(key);
|
|
5138
|
+
}
|
|
4947
5139
|
}
|
|
4948
5140
|
return [];
|
|
4949
5141
|
}
|
|
@@ -5022,6 +5214,22 @@ var DECache = class {
|
|
|
5022
5214
|
});
|
|
5023
5215
|
data.srfkey = unionValues.join("||");
|
|
5024
5216
|
}
|
|
5217
|
+
/**
|
|
5218
|
+
* 根据上下文,获取已经开启的事务
|
|
5219
|
+
*
|
|
5220
|
+
* @author chitanda
|
|
5221
|
+
* @date 2024-01-17 15:01:28
|
|
5222
|
+
* @protected
|
|
5223
|
+
* @param {IContext} context
|
|
5224
|
+
* @return {*} {(ITransaction | null)}
|
|
5225
|
+
*/
|
|
5226
|
+
getTransaction(context) {
|
|
5227
|
+
const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
|
|
5228
|
+
if (uiDomain && uiDomain.transaction.state.isOpen === true) {
|
|
5229
|
+
return uiDomain.transaction;
|
|
5230
|
+
}
|
|
5231
|
+
return null;
|
|
5232
|
+
}
|
|
5025
5233
|
};
|
|
5026
5234
|
|
|
5027
5235
|
// src/service/utils/res-path/res-path.ts
|
|
@@ -5437,7 +5645,8 @@ CounterService.counterMap = /* @__PURE__ */ new Map();
|
|
|
5437
5645
|
// src/service/service/entity/de.service.ts
|
|
5438
5646
|
import {
|
|
5439
5647
|
ModelError as ModelError7,
|
|
5440
|
-
RuntimeError as RuntimeError17
|
|
5648
|
+
RuntimeError as RuntimeError17,
|
|
5649
|
+
RuntimeModelError as RuntimeModelError10
|
|
5441
5650
|
} from "@ibiz-template/core";
|
|
5442
5651
|
|
|
5443
5652
|
// src/service/service/work-flow/work-flow.service.ts
|
|
@@ -6312,6 +6521,9 @@ var DEService = class {
|
|
|
6312
6521
|
return this.methodMap.get(cacheId);
|
|
6313
6522
|
}
|
|
6314
6523
|
const model = findModelChild(this.model.appDEMethods, id);
|
|
6524
|
+
if (!model) {
|
|
6525
|
+
throw new RuntimeModelError10(this.model, "\u672A\u627E\u5230\u670D\u52A1\u65B9\u6CD5: ".concat(id));
|
|
6526
|
+
}
|
|
6315
6527
|
const provider = await getDEMethodProvider(model);
|
|
6316
6528
|
if (!provider) {
|
|
6317
6529
|
throw new ModelError7(model, "\u672A\u652F\u6301\u7684\u670D\u52A1\u65B9\u6CD5\u7C7B\u578B: ".concat(model.methodType));
|
|
@@ -7299,12 +7511,14 @@ import {
|
|
|
7299
7511
|
HttpError as HttpError5,
|
|
7300
7512
|
HttpResponse as HttpResponse3,
|
|
7301
7513
|
RuntimeError as RuntimeError21,
|
|
7302
|
-
RuntimeModelError as
|
|
7514
|
+
RuntimeModelError as RuntimeModelError22
|
|
7303
7515
|
} from "@ibiz-template/core";
|
|
7304
7516
|
import { isArray as isArray6, isNil as isNil10 } from "lodash-es";
|
|
7517
|
+
import { ascSort } from "qx-util";
|
|
7518
|
+
import { clone as clone14 } from "ramda";
|
|
7305
7519
|
|
|
7306
7520
|
// src/service/service/entity/method/method.ts
|
|
7307
|
-
import { RuntimeModelError as
|
|
7521
|
+
import { RuntimeModelError as RuntimeModelError11 } from "@ibiz-template/core";
|
|
7308
7522
|
|
|
7309
7523
|
// src/service/service/entity/method/method-input.ts
|
|
7310
7524
|
var MethodInput = class {
|
|
@@ -7475,17 +7689,17 @@ var Method = class {
|
|
|
7475
7689
|
break;
|
|
7476
7690
|
default:
|
|
7477
7691
|
if (requestMethod) {
|
|
7478
|
-
throw new
|
|
7692
|
+
throw new RuntimeModelError11(
|
|
7479
7693
|
this.method,
|
|
7480
7694
|
"\u672A\u652F\u6301\u7684\u8BF7\u6C42\u65B9\u5F0F: ".concat(requestMethod)
|
|
7481
7695
|
);
|
|
7482
7696
|
} else {
|
|
7483
|
-
throw new
|
|
7697
|
+
throw new RuntimeModelError11(this.method, "\u672A\u914D\u7F6E\u8BF7\u6C42\u65B9\u5F0F");
|
|
7484
7698
|
}
|
|
7485
7699
|
}
|
|
7486
7700
|
return res;
|
|
7487
7701
|
}
|
|
7488
|
-
throw new
|
|
7702
|
+
throw new RuntimeModelError11(this.method, "\u672A\u652F\u6301\u7684\u884C\u4E3A\u7C7B\u578B[".concat(actionType, "]"));
|
|
7489
7703
|
}
|
|
7490
7704
|
mergeRequestPath(path2, methodName) {
|
|
7491
7705
|
return "".concat(path2, "/").concat(methodName);
|
|
@@ -7523,7 +7737,7 @@ import { isArray as isArray5 } from "lodash-es";
|
|
|
7523
7737
|
import { clone as clone13 } from "ramda";
|
|
7524
7738
|
|
|
7525
7739
|
// src/de-logic/de-logic.ts
|
|
7526
|
-
import { ModelError as ModelError13, RuntimeModelError as
|
|
7740
|
+
import { ModelError as ModelError13, RuntimeModelError as RuntimeModelError21 } from "@ibiz-template/core";
|
|
7527
7741
|
|
|
7528
7742
|
// src/de-logic/de-logic-context.ts
|
|
7529
7743
|
import { isArray as isArray4 } from "lodash-es";
|
|
@@ -7655,17 +7869,17 @@ var DELogicContext = class {
|
|
|
7655
7869
|
};
|
|
7656
7870
|
|
|
7657
7871
|
// src/de-logic/de-logic-node/de-action-node/de-action-node.ts
|
|
7658
|
-
import { RuntimeModelError as
|
|
7872
|
+
import { RuntimeModelError as RuntimeModelError14 } from "@ibiz-template/core";
|
|
7659
7873
|
|
|
7660
7874
|
// src/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.ts
|
|
7661
|
-
import { RuntimeModelError as
|
|
7875
|
+
import { RuntimeModelError as RuntimeModelError13 } from "@ibiz-template/core";
|
|
7662
7876
|
|
|
7663
7877
|
// src/de-logic/de-logic-link/de-logic-link-cond/de-logic-link-cond.ts
|
|
7664
7878
|
var DELogicLinkCond = class {
|
|
7665
7879
|
};
|
|
7666
7880
|
|
|
7667
7881
|
// src/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.ts
|
|
7668
|
-
import { ModelError as ModelError8, RuntimeModelError as
|
|
7882
|
+
import { ModelError as ModelError8, RuntimeModelError as RuntimeModelError12 } from "@ibiz-template/core";
|
|
7669
7883
|
var DELogicLinkSingleCond = class extends DELogicLinkCond {
|
|
7670
7884
|
constructor(model) {
|
|
7671
7885
|
super();
|
|
@@ -7712,7 +7926,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
|
|
|
7712
7926
|
switch (this.type) {
|
|
7713
7927
|
case "ENTITYFIELD": {
|
|
7714
7928
|
if (!this.value) {
|
|
7715
|
-
throw new
|
|
7929
|
+
throw new RuntimeModelError12(
|
|
7716
7930
|
this.model,
|
|
7717
7931
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
7718
7932
|
);
|
|
@@ -7722,7 +7936,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
|
|
|
7722
7936
|
}
|
|
7723
7937
|
case "SRCENTITYFIELD": {
|
|
7724
7938
|
if (!this.value) {
|
|
7725
|
-
throw new
|
|
7939
|
+
throw new RuntimeModelError12(
|
|
7726
7940
|
this.model,
|
|
7727
7941
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
7728
7942
|
);
|
|
@@ -7785,7 +7999,7 @@ var DELogicLinkGroupCond = class _DELogicLinkGroupCond extends DELogicLinkCond {
|
|
|
7785
7999
|
test(ctx, context, data) {
|
|
7786
8000
|
let bol = true;
|
|
7787
8001
|
if (this.conds.length === 0) {
|
|
7788
|
-
throw new
|
|
8002
|
+
throw new RuntimeModelError13(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
|
|
7789
8003
|
}
|
|
7790
8004
|
for (let i = 0; i < this.conds.length; i++) {
|
|
7791
8005
|
const cond = this.conds[i];
|
|
@@ -7888,10 +8102,10 @@ var DEActionNode = class extends DELogicNode {
|
|
|
7888
8102
|
retDELogicParamId
|
|
7889
8103
|
} = this.model;
|
|
7890
8104
|
if (!dstAppDataEntityId) {
|
|
7891
|
-
throw new
|
|
8105
|
+
throw new RuntimeModelError14(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
|
|
7892
8106
|
}
|
|
7893
8107
|
if (!dstAppDEActionId) {
|
|
7894
|
-
throw new
|
|
8108
|
+
throw new RuntimeModelError14(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
|
|
7895
8109
|
}
|
|
7896
8110
|
const requestData = ctx.params[dstDELogicParamId];
|
|
7897
8111
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
@@ -8184,12 +8398,12 @@ var DataSetNode = class extends DELogicNode {
|
|
|
8184
8398
|
};
|
|
8185
8399
|
|
|
8186
8400
|
// src/de-logic/de-logic-node/bind-param-node/bind-param-node.ts
|
|
8187
|
-
import { RuntimeModelError as
|
|
8401
|
+
import { RuntimeModelError as RuntimeModelError15 } from "@ibiz-template/core";
|
|
8188
8402
|
var BindParamNode = class extends DELogicNode {
|
|
8189
8403
|
async exec(ctx) {
|
|
8190
8404
|
const { dstDELogicParamId, srcDELogicParamId } = this.model;
|
|
8191
8405
|
if (!dstDELogicParamId || !srcDELogicParamId) {
|
|
8192
|
-
throw new
|
|
8406
|
+
throw new RuntimeModelError15(
|
|
8193
8407
|
this.model,
|
|
8194
8408
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
8195
8409
|
);
|
|
@@ -8200,37 +8414,37 @@ var BindParamNode = class extends DELogicNode {
|
|
|
8200
8414
|
};
|
|
8201
8415
|
|
|
8202
8416
|
// src/de-logic/de-logic-node/reset-param-node/reset-param-node.ts
|
|
8203
|
-
import { RuntimeModelError as
|
|
8417
|
+
import { RuntimeModelError as RuntimeModelError16 } from "@ibiz-template/core";
|
|
8204
8418
|
var ResetParamNode = class extends DELogicNode {
|
|
8205
8419
|
async exec(ctx) {
|
|
8206
8420
|
const { dstDELogicParamId } = this.model;
|
|
8207
8421
|
if (!dstDELogicParamId) {
|
|
8208
|
-
throw new
|
|
8422
|
+
throw new RuntimeModelError16(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
8209
8423
|
}
|
|
8210
8424
|
ctx.resetParam(dstDELogicParamId);
|
|
8211
8425
|
}
|
|
8212
8426
|
};
|
|
8213
8427
|
|
|
8214
8428
|
// src/de-logic/de-logic-node/renew-param-node/renew-param-node.ts
|
|
8215
|
-
import { RuntimeModelError as
|
|
8429
|
+
import { RuntimeModelError as RuntimeModelError17 } from "@ibiz-template/core";
|
|
8216
8430
|
var RenewParamNode = class extends DELogicNode {
|
|
8217
8431
|
async exec(ctx) {
|
|
8218
8432
|
const { dstDELogicParamId } = this.model;
|
|
8219
8433
|
if (!dstDELogicParamId) {
|
|
8220
|
-
throw new
|
|
8434
|
+
throw new RuntimeModelError17(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
8221
8435
|
}
|
|
8222
8436
|
ctx.renewParam(dstDELogicParamId);
|
|
8223
8437
|
}
|
|
8224
8438
|
};
|
|
8225
8439
|
|
|
8226
8440
|
// src/de-logic/de-logic-node/copy-param-node/copy-param-node.ts
|
|
8227
|
-
import { RuntimeModelError as
|
|
8441
|
+
import { RuntimeModelError as RuntimeModelError18 } from "@ibiz-template/core";
|
|
8228
8442
|
import { clone as clone11 } from "ramda";
|
|
8229
8443
|
var CopyParamNode = class extends DELogicNode {
|
|
8230
8444
|
async exec(ctx) {
|
|
8231
8445
|
const { dstDELogicParamId, srcDELogicParamId } = this.model;
|
|
8232
8446
|
if (!dstDELogicParamId || !srcDELogicParamId) {
|
|
8233
|
-
throw new
|
|
8447
|
+
throw new RuntimeModelError18(
|
|
8234
8448
|
this.model,
|
|
8235
8449
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
8236
8450
|
);
|
|
@@ -8241,12 +8455,12 @@ var CopyParamNode = class extends DELogicNode {
|
|
|
8241
8455
|
};
|
|
8242
8456
|
|
|
8243
8457
|
// src/de-logic/de-logic-node/sort-param-node/sort-param-node.ts
|
|
8244
|
-
import { RuntimeModelError as
|
|
8458
|
+
import { RuntimeModelError as RuntimeModelError19 } from "@ibiz-template/core";
|
|
8245
8459
|
var SortParamNode = class extends DELogicNode {
|
|
8246
8460
|
async exec(ctx) {
|
|
8247
8461
|
const { dstDELogicParamId, dstSortDir, dstFieldName } = this.model;
|
|
8248
8462
|
if (!dstDELogicParamId || !dstFieldName) {
|
|
8249
|
-
throw new
|
|
8463
|
+
throw new RuntimeModelError19(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
|
|
8250
8464
|
}
|
|
8251
8465
|
const key = dstFieldName.toLowerCase();
|
|
8252
8466
|
const arr = ctx.params[dstDELogicParamId];
|
|
@@ -8257,7 +8471,7 @@ var SortParamNode = class extends DELogicNode {
|
|
|
8257
8471
|
};
|
|
8258
8472
|
|
|
8259
8473
|
// src/de-logic/de-logic-node/append-param-node/append-param-node.ts
|
|
8260
|
-
import { RuntimeModelError as
|
|
8474
|
+
import { RuntimeModelError as RuntimeModelError20 } from "@ibiz-template/core";
|
|
8261
8475
|
var AppendParamNode = class extends DELogicNode {
|
|
8262
8476
|
async exec(ctx) {
|
|
8263
8477
|
const {
|
|
@@ -8268,7 +8482,7 @@ var AppendParamNode = class extends DELogicNode {
|
|
|
8268
8482
|
srcSize
|
|
8269
8483
|
} = this.model;
|
|
8270
8484
|
if (!dstDELogicParamId || !srcDELogicParamId) {
|
|
8271
|
-
throw new
|
|
8485
|
+
throw new RuntimeModelError20(
|
|
8272
8486
|
this.model,
|
|
8273
8487
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
8274
8488
|
);
|
|
@@ -8417,7 +8631,7 @@ var DELogic = class {
|
|
|
8417
8631
|
var _a, _b;
|
|
8418
8632
|
if (model.customCode) {
|
|
8419
8633
|
if (!model.scriptCode) {
|
|
8420
|
-
throw new
|
|
8634
|
+
throw new RuntimeModelError21(model, "\u811A\u672C\u4EE3\u7801\u6A21\u5F0F\u6CA1\u6709\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
8421
8635
|
}
|
|
8422
8636
|
this.scriptFn = ScriptFactory.createScriptFn([], model.scriptCode, {
|
|
8423
8637
|
isAsync: true
|
|
@@ -8425,7 +8639,7 @@ var DELogic = class {
|
|
|
8425
8639
|
return;
|
|
8426
8640
|
}
|
|
8427
8641
|
if (!((_a = model.delogicNodes) == null ? void 0 : _a.length)) {
|
|
8428
|
-
throw new
|
|
8642
|
+
throw new RuntimeModelError21(model, "\u5B9E\u4F53\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
8429
8643
|
}
|
|
8430
8644
|
model.delogicNodes.forEach((node) => {
|
|
8431
8645
|
const { logicNodeType } = node;
|
|
@@ -8524,7 +8738,7 @@ var DELogic = class {
|
|
|
8524
8738
|
const start = this.nodes.get(startDELogicNodeId);
|
|
8525
8739
|
await this.deepExec(start, ctx);
|
|
8526
8740
|
} else {
|
|
8527
|
-
throw new
|
|
8741
|
+
throw new RuntimeModelError21(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
8528
8742
|
}
|
|
8529
8743
|
if (ctx.isEndNode) {
|
|
8530
8744
|
return ctx.result;
|
|
@@ -8643,66 +8857,64 @@ var DEActionMethod = class extends Method {
|
|
|
8643
8857
|
return this.input.handle(context, data);
|
|
8644
8858
|
}
|
|
8645
8859
|
async exec(context, data, params) {
|
|
8646
|
-
|
|
8860
|
+
let result;
|
|
8861
|
+
if (data && !["READ", "GETDRAFT"].includes(this.method.actionMode)) {
|
|
8647
8862
|
await execFieldLogics(this.entity, "change", context, data, params);
|
|
8648
8863
|
}
|
|
8649
8864
|
if (this.method.actionType === "DELOGIC") {
|
|
8650
8865
|
const deLogic = findDELogic(this.method.appDELogicId, this.entity);
|
|
8651
8866
|
if (!deLogic) {
|
|
8652
|
-
throw new
|
|
8867
|
+
throw new RuntimeModelError22(this.method, "\u7F3A\u5C11\u5B9E\u4F53\u5904\u7406\u903B\u8F91");
|
|
8653
8868
|
}
|
|
8654
|
-
|
|
8655
|
-
}
|
|
8656
|
-
|
|
8657
|
-
|
|
8658
|
-
|
|
8659
|
-
|
|
8660
|
-
|
|
8661
|
-
|
|
8662
|
-
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8668
|
-
|
|
8669
|
-
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
|
|
8683
|
-
|
|
8684
|
-
|
|
8685
|
-
|
|
8686
|
-
|
|
8687
|
-
|
|
8688
|
-
|
|
8689
|
-
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
if (isNil10(srfkey)) {
|
|
8699
|
-
srfkey = isArray6(data) ? null : data == null ? void 0 : data[this.entity.keyAppDEFieldId];
|
|
8869
|
+
result = await execDELogicAction(deLogic, context, data, params);
|
|
8870
|
+
} else {
|
|
8871
|
+
if (data && !this.isLocalMode) {
|
|
8872
|
+
data = await this.inputHandle(context, data);
|
|
8873
|
+
}
|
|
8874
|
+
switch (this.method.codeName) {
|
|
8875
|
+
case "Create":
|
|
8876
|
+
result = await this.create(context, data, params || {});
|
|
8877
|
+
break;
|
|
8878
|
+
case "Get":
|
|
8879
|
+
result = await this.get(context, params);
|
|
8880
|
+
break;
|
|
8881
|
+
case "GetDraft":
|
|
8882
|
+
result = await this.getDraft(context, params);
|
|
8883
|
+
break;
|
|
8884
|
+
case "Remove":
|
|
8885
|
+
result = await this.remove(context, params);
|
|
8886
|
+
break;
|
|
8887
|
+
case "Update":
|
|
8888
|
+
result = await this.update(context, data, params);
|
|
8889
|
+
break;
|
|
8890
|
+
case "CreateTemp":
|
|
8891
|
+
result = await this.createTemp(context, data);
|
|
8892
|
+
break;
|
|
8893
|
+
case "GetTemp":
|
|
8894
|
+
result = await this.getTemp(context, data);
|
|
8895
|
+
break;
|
|
8896
|
+
case "GetDraftTemp":
|
|
8897
|
+
result = await this.getDraftTemp(context, params);
|
|
8898
|
+
break;
|
|
8899
|
+
case "RemoveTemp":
|
|
8900
|
+
result = await this.removeTemp(context, data);
|
|
8901
|
+
break;
|
|
8902
|
+
case "UpdateTemp":
|
|
8903
|
+
result = await this.updateTemp(context, data);
|
|
8904
|
+
break;
|
|
8905
|
+
default: {
|
|
8906
|
+
let path2 = this.calcPath(context);
|
|
8907
|
+
if (this.method.needResourceKey) {
|
|
8908
|
+
let srfkey = context[this.entity.codeName.toLowerCase()];
|
|
8909
|
+
if (isNil10(srfkey)) {
|
|
8910
|
+
srfkey = isArray6(data) ? null : data == null ? void 0 : data[this.entity.keyAppDEFieldId];
|
|
8911
|
+
}
|
|
8912
|
+
path2 = "".concat(path2, "/").concat(srfkey);
|
|
8700
8913
|
}
|
|
8701
|
-
|
|
8914
|
+
const res = await this.request(path2, context, data, params);
|
|
8915
|
+
res.data = await this.result.handle(context, res.data);
|
|
8916
|
+
result = res;
|
|
8702
8917
|
}
|
|
8703
|
-
const res = await this.request(path2, context, data, params);
|
|
8704
|
-
res.data = await this.result.handle(context, res.data);
|
|
8705
|
-
result = res;
|
|
8706
8918
|
}
|
|
8707
8919
|
}
|
|
8708
8920
|
if (result.data) {
|
|
@@ -8890,6 +9102,13 @@ var DEActionMethod = class extends Method {
|
|
|
8890
9102
|
if (!key && context) {
|
|
8891
9103
|
key = context[this.entity.codeName.toLowerCase()];
|
|
8892
9104
|
}
|
|
9105
|
+
try {
|
|
9106
|
+
await this.associationDeletion(key, context, params);
|
|
9107
|
+
} catch (error) {
|
|
9108
|
+
throw new HttpError5({
|
|
9109
|
+
response: new HttpResponse3(null, 500, error.message)
|
|
9110
|
+
});
|
|
9111
|
+
}
|
|
8893
9112
|
const data = this.service.local.delete(context, key);
|
|
8894
9113
|
if (data) {
|
|
8895
9114
|
return new HttpResponse3(data);
|
|
@@ -8899,6 +9118,100 @@ var DEActionMethod = class extends Method {
|
|
|
8899
9118
|
throw new HttpError5(err);
|
|
8900
9119
|
}
|
|
8901
9120
|
}
|
|
9121
|
+
/**
|
|
9122
|
+
* 关联删除
|
|
9123
|
+
*
|
|
9124
|
+
* @author chitanda
|
|
9125
|
+
* @date 2024-01-17 16:01:47
|
|
9126
|
+
* @protected
|
|
9127
|
+
* @param {string} key
|
|
9128
|
+
* @param {IContext} context
|
|
9129
|
+
* @param {IParams} [params]
|
|
9130
|
+
* @return {*} {Promise<void>}
|
|
9131
|
+
*/
|
|
9132
|
+
async associationDeletion(key, context, _params) {
|
|
9133
|
+
const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
|
|
9134
|
+
const t = uiDomain.transaction;
|
|
9135
|
+
let selfOpenTransaction = false;
|
|
9136
|
+
if (t.state.isOpen === false) {
|
|
9137
|
+
t.open();
|
|
9138
|
+
selfOpenTransaction = true;
|
|
9139
|
+
}
|
|
9140
|
+
try {
|
|
9141
|
+
let configs = uiDomain.getDERConfigByMajor(this.entity.id);
|
|
9142
|
+
if (configs.length > 0) {
|
|
9143
|
+
const data = this.service.local.get(context, key);
|
|
9144
|
+
configs = ascSort(configs, "removeOrder");
|
|
9145
|
+
for (const config of configs) {
|
|
9146
|
+
if (config.rstype !== "DER1N") {
|
|
9147
|
+
throw new RuntimeModelError22(
|
|
9148
|
+
config,
|
|
9149
|
+
"\u76EE\u524D\u53EA\u652F\u6301[DER1N]\u5173\u7CFB\u7C7B\u578B\u5173\u8054\u5220\u9664\u5220\u9664"
|
|
9150
|
+
);
|
|
9151
|
+
}
|
|
9152
|
+
const {
|
|
9153
|
+
removeActionType,
|
|
9154
|
+
removeRejectMsg,
|
|
9155
|
+
minorAppDataEntityId,
|
|
9156
|
+
nestedAppDEDataSetId = "FetchDefault"
|
|
9157
|
+
} = config;
|
|
9158
|
+
const app = ibiz.hub.getApp(this.entity.appId);
|
|
9159
|
+
const minorService = await app.deService.getService(
|
|
9160
|
+
context,
|
|
9161
|
+
minorAppDataEntityId
|
|
9162
|
+
);
|
|
9163
|
+
const _context = clone14(context);
|
|
9164
|
+
_context[this.entity.codeName.toLowerCase()] = key;
|
|
9165
|
+
const res = await minorService.exec(nestedAppDEDataSetId, _context);
|
|
9166
|
+
const items = res.data || [];
|
|
9167
|
+
switch (removeActionType) {
|
|
9168
|
+
case 1: {
|
|
9169
|
+
for (let i = 0; i < items.length; i++) {
|
|
9170
|
+
const item = items[i];
|
|
9171
|
+
_context[minorService.model.codeName.toLowerCase()] = item.srfkey;
|
|
9172
|
+
const res2 = await minorService.remove(_context, item);
|
|
9173
|
+
if (res2.ok === false) {
|
|
9174
|
+
throw new Error(res2.statusText);
|
|
9175
|
+
}
|
|
9176
|
+
}
|
|
9177
|
+
break;
|
|
9178
|
+
}
|
|
9179
|
+
case 2:
|
|
9180
|
+
for (let i = 0; i < items.length; i++) {
|
|
9181
|
+
const item = items[i];
|
|
9182
|
+
_context[minorService.model.codeName.toLowerCase()] = item.srfkey;
|
|
9183
|
+
item[config.parentAppDEFieldId.toLowerCase()] = void 0;
|
|
9184
|
+
const res2 = await minorService.updateTemp(_context, item);
|
|
9185
|
+
if (res2.ok === false) {
|
|
9186
|
+
throw new Error(res2.statusText);
|
|
9187
|
+
}
|
|
9188
|
+
}
|
|
9189
|
+
break;
|
|
9190
|
+
case 3:
|
|
9191
|
+
if (items.length > 0) {
|
|
9192
|
+
const msg = items.map((item) => item.srfmajortext).join("\u3001");
|
|
9193
|
+
const message = "\u65E0\u6CD5\u5220\u9664[".concat(this.entity.logicName, "-").concat(data.srfmajortext, "], \u6570\u636E\u88AB[").concat(minorService.model.logicName, "-").concat(msg, "]\u5F15\u7528");
|
|
9194
|
+
throw new Error(removeRejectMsg || message);
|
|
9195
|
+
}
|
|
9196
|
+
break;
|
|
9197
|
+
default:
|
|
9198
|
+
}
|
|
9199
|
+
}
|
|
9200
|
+
}
|
|
9201
|
+
if (selfOpenTransaction && t.state.isOpen) {
|
|
9202
|
+
t.commit();
|
|
9203
|
+
}
|
|
9204
|
+
} catch (error) {
|
|
9205
|
+
if (selfOpenTransaction && t.state.isOpen) {
|
|
9206
|
+
t.rollback();
|
|
9207
|
+
}
|
|
9208
|
+
throw error;
|
|
9209
|
+
} finally {
|
|
9210
|
+
if (selfOpenTransaction && t.state.isOpen) {
|
|
9211
|
+
t.close();
|
|
9212
|
+
}
|
|
9213
|
+
}
|
|
9214
|
+
}
|
|
8902
9215
|
/**
|
|
8903
9216
|
* 更新临时数据
|
|
8904
9217
|
*
|
|
@@ -9012,21 +9325,19 @@ var DeActionDeMethodProvider = class {
|
|
|
9012
9325
|
import {
|
|
9013
9326
|
HttpResponse as HttpResponse4,
|
|
9014
9327
|
ModelError as ModelError14,
|
|
9015
|
-
RuntimeModelError as
|
|
9328
|
+
RuntimeModelError as RuntimeModelError23
|
|
9016
9329
|
} from "@ibiz-template/core";
|
|
9017
9330
|
import { isArray as isArray7 } from "lodash-es";
|
|
9018
|
-
import { clone as
|
|
9019
|
-
import { ascSort, descSort } from "qx-util";
|
|
9331
|
+
import { clone as clone15, isEmpty as isEmpty7, isNil as isNil11 } from "ramda";
|
|
9332
|
+
import { ascSort as ascSort2, descSort } from "qx-util";
|
|
9020
9333
|
var FetchMethod = class extends Method {
|
|
9021
9334
|
async exec(context, params, params2) {
|
|
9022
9335
|
const searchParams = params && !isArray7(params) ? params : params2 || {};
|
|
9023
9336
|
let res;
|
|
9024
9337
|
if (this.isLocalMode) {
|
|
9025
9338
|
const cond = DEDQCondUtil.getCond(this.method);
|
|
9026
|
-
const
|
|
9027
|
-
|
|
9028
|
-
new SearchFilter(context, searchParams)
|
|
9029
|
-
);
|
|
9339
|
+
const filter = new SearchFilter(context, searchParams);
|
|
9340
|
+
const items = await this.searchLocal(cond, filter);
|
|
9030
9341
|
res = new HttpResponse4(items, 200);
|
|
9031
9342
|
} else {
|
|
9032
9343
|
switch (this.method.dataSetType) {
|
|
@@ -9098,13 +9409,13 @@ var FetchMethod = class extends Method {
|
|
|
9098
9409
|
if (filter.sortMode === "DESC") {
|
|
9099
9410
|
list = descSort(list, filter.sortField);
|
|
9100
9411
|
} else {
|
|
9101
|
-
list =
|
|
9412
|
+
list = ascSort2(list, filter.sortField);
|
|
9102
9413
|
}
|
|
9103
9414
|
}
|
|
9104
9415
|
const { page, size } = filter;
|
|
9105
9416
|
const start = page * size;
|
|
9106
9417
|
const end = (page + 1) * size - 1;
|
|
9107
|
-
const items = list.slice(start, end).map((item) =>
|
|
9418
|
+
const items = list.slice(start, end).map((item) => clone15(item));
|
|
9108
9419
|
return items;
|
|
9109
9420
|
}
|
|
9110
9421
|
/**
|
|
@@ -9118,7 +9429,7 @@ var FetchMethod = class extends Method {
|
|
|
9118
9429
|
async fetchCodeListSet(context, params) {
|
|
9119
9430
|
const { appCodeListId } = this.method;
|
|
9120
9431
|
if (!appCodeListId) {
|
|
9121
|
-
throw new
|
|
9432
|
+
throw new RuntimeModelError23(this.method, "\u6CA1\u6709\u6307\u5B9A\u6570\u636E\u6765\u6E90\u4EE3\u7801\u8868");
|
|
9122
9433
|
}
|
|
9123
9434
|
const codeItems = await this.app.codeList.get(
|
|
9124
9435
|
appCodeListId,
|
|
@@ -9232,7 +9543,7 @@ var TreeCodeListNodeData = class extends TreeNodeData {
|
|
|
9232
9543
|
|
|
9233
9544
|
// src/service/vo/tree-node-data/tree-data-set-node-data.ts
|
|
9234
9545
|
import { updateKeyDefine } from "@ibiz-template/core";
|
|
9235
|
-
import { clone as
|
|
9546
|
+
import { clone as clone16, isNil as isNil12 } from "ramda";
|
|
9236
9547
|
var CloneExcludeKeys = ["_id", "_value", "_text", "_deData", "clone"];
|
|
9237
9548
|
var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
9238
9549
|
constructor(model, parentNodeData, opts) {
|
|
@@ -9313,7 +9624,7 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
|
9313
9624
|
}
|
|
9314
9625
|
};
|
|
9315
9626
|
this.clone = () => {
|
|
9316
|
-
const cloneData =
|
|
9627
|
+
const cloneData = clone16(this._deData);
|
|
9317
9628
|
const cloneNodeData = new _TreeDataSetNodeData(model, this._parent, {
|
|
9318
9629
|
data: cloneData,
|
|
9319
9630
|
leaf: this._leaf,
|
|
@@ -10131,7 +10442,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
10131
10442
|
* @return {*} {(Promise<IModalData | void>)}
|
|
10132
10443
|
*/
|
|
10133
10444
|
async exec(appViewId, _context, params = {}, opts = {}) {
|
|
10134
|
-
const context =
|
|
10445
|
+
const context = clone17(_context);
|
|
10135
10446
|
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
10136
10447
|
if (!appView) {
|
|
10137
10448
|
throw new RuntimeError23("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
|
|
@@ -11875,7 +12186,7 @@ var BaseController = class {
|
|
|
11875
12186
|
};
|
|
11876
12187
|
|
|
11877
12188
|
// src/controller/utils/view-msg/view-msg-controller.ts
|
|
11878
|
-
import { RuntimeError as RuntimeError31, RuntimeModelError as
|
|
12189
|
+
import { RuntimeError as RuntimeError31, RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
|
|
11879
12190
|
import { isNil as isNil18, mergeRight as mergeRight2 } from "ramda";
|
|
11880
12191
|
var ViewMsgController = class _ViewMsgController {
|
|
11881
12192
|
constructor(msgGroupId) {
|
|
@@ -11940,7 +12251,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
11940
12251
|
static async fetchDataSet(msgModel, context, params) {
|
|
11941
12252
|
const { appDataEntityId, appDEDataSetId } = msgModel;
|
|
11942
12253
|
if (!appDEDataSetId) {
|
|
11943
|
-
throw new
|
|
12254
|
+
throw new RuntimeModelError24(msgModel, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6570\u636E\u96C6");
|
|
11944
12255
|
}
|
|
11945
12256
|
const res = await ibiz.hub.getApp(context.srfappid).deService.exec(appDataEntityId, appDEDataSetId, context, params);
|
|
11946
12257
|
if (res.data.length) {
|
|
@@ -12034,7 +12345,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
12034
12345
|
msgPosAppDEFieldId
|
|
12035
12346
|
} = msgModel;
|
|
12036
12347
|
if (!appDataEntityId) {
|
|
12037
|
-
throw new
|
|
12348
|
+
throw new RuntimeModelError24(msgModel, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
|
|
12038
12349
|
}
|
|
12039
12350
|
const entity = await ibiz.hub.getAppDataEntity(
|
|
12040
12351
|
appDataEntityId,
|
|
@@ -12662,7 +12973,7 @@ var EditorController = class {
|
|
|
12662
12973
|
};
|
|
12663
12974
|
|
|
12664
12975
|
// src/controller/common/editor/code-list-editor.controller.ts
|
|
12665
|
-
import { RuntimeModelError as
|
|
12976
|
+
import { RuntimeModelError as RuntimeModelError25 } from "@ibiz-template/core";
|
|
12666
12977
|
var CodeListEditorController = class extends EditorController {
|
|
12667
12978
|
/**
|
|
12668
12979
|
* 加载代码表数据
|
|
@@ -12686,7 +12997,7 @@ var CodeListEditorController = class extends EditorController {
|
|
|
12686
12997
|
);
|
|
12687
12998
|
return dataItems;
|
|
12688
12999
|
}
|
|
12689
|
-
throw new
|
|
13000
|
+
throw new RuntimeModelError25(
|
|
12690
13001
|
this.model,
|
|
12691
13002
|
"\u7F16\u8F91\u5668\u7C7B\u578B[".concat(this.model.editorType, "]\uFF0C\u672A\u914D\u7F6E\u4EE3\u7801\u8868")
|
|
12692
13003
|
);
|
|
@@ -12695,7 +13006,7 @@ var CodeListEditorController = class extends EditorController {
|
|
|
12695
13006
|
|
|
12696
13007
|
// src/controller/common/control/control.controller.ts
|
|
12697
13008
|
import { IBizContext as IBizContext3, IBizParams, NoticeError as NoticeError2 } from "@ibiz-template/core";
|
|
12698
|
-
import { clone as
|
|
13009
|
+
import { clone as clone18, isNil as isNil20 } from "ramda";
|
|
12699
13010
|
import { notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
12700
13011
|
var ControlController = class extends BaseController {
|
|
12701
13012
|
/**
|
|
@@ -12737,7 +13048,7 @@ var ControlController = class extends BaseController {
|
|
|
12737
13048
|
"".concat(model.controlType, "_DEFAULT")
|
|
12738
13049
|
);
|
|
12739
13050
|
if (panelModel) {
|
|
12740
|
-
this.controlPanel =
|
|
13051
|
+
this.controlPanel = clone18(panelModel);
|
|
12741
13052
|
}
|
|
12742
13053
|
}
|
|
12743
13054
|
this.updateContextParams({});
|
|
@@ -13489,7 +13800,7 @@ var MDControlController = class extends ControlController {
|
|
|
13489
13800
|
import {
|
|
13490
13801
|
findRecursiveChild,
|
|
13491
13802
|
RuntimeError as RuntimeError34,
|
|
13492
|
-
RuntimeModelError as
|
|
13803
|
+
RuntimeModelError as RuntimeModelError26
|
|
13493
13804
|
} from "@ibiz-template/core";
|
|
13494
13805
|
var AppMenuController = class extends ControlController {
|
|
13495
13806
|
constructor(model, context, params, ctx) {
|
|
@@ -13568,7 +13879,7 @@ var AppMenuController = class extends ControlController {
|
|
|
13568
13879
|
return provider.onClick(menuItem, event, this);
|
|
13569
13880
|
}
|
|
13570
13881
|
if (!menuItem.appFuncId) {
|
|
13571
|
-
throw new
|
|
13882
|
+
throw new RuntimeModelError26(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
|
|
13572
13883
|
}
|
|
13573
13884
|
const tempContext = this.context.clone();
|
|
13574
13885
|
tempContext.srfappid = menuItem.appId;
|
|
@@ -13687,7 +13998,7 @@ var AppMenuController = class extends ControlController {
|
|
|
13687
13998
|
import {
|
|
13688
13999
|
findRecursiveChild as findRecursiveChild2,
|
|
13689
14000
|
RuntimeError as RuntimeError35,
|
|
13690
|
-
RuntimeModelError as
|
|
14001
|
+
RuntimeModelError as RuntimeModelError27
|
|
13691
14002
|
} from "@ibiz-template/core";
|
|
13692
14003
|
var AppMenuIconViewController = class extends AppMenuController {
|
|
13693
14004
|
async onClickMenuItem(id, event) {
|
|
@@ -13703,7 +14014,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
13703
14014
|
event
|
|
13704
14015
|
});
|
|
13705
14016
|
if (!menuItem.appFuncId) {
|
|
13706
|
-
throw new
|
|
14017
|
+
throw new RuntimeModelError27(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
|
|
13707
14018
|
}
|
|
13708
14019
|
const tempContext = this.context.clone();
|
|
13709
14020
|
if (this.routeDepth === 1) {
|
|
@@ -13999,17 +14310,17 @@ import { mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
|
13999
14310
|
import { RuntimeError as RuntimeError37 } from "@ibiz-template/core";
|
|
14000
14311
|
|
|
14001
14312
|
// src/controller/control/chart/generator/line-series-generator.ts
|
|
14002
|
-
import { RuntimeModelError as
|
|
14313
|
+
import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
|
|
14003
14314
|
|
|
14004
14315
|
// src/controller/control/chart/generator/base-series-generator.ts
|
|
14005
|
-
import { plus, RuntimeModelError as
|
|
14316
|
+
import { plus, RuntimeModelError as RuntimeModelError28, toNumberOrNil } from "@ibiz-template/core";
|
|
14006
14317
|
import dayjs4 from "dayjs";
|
|
14007
14318
|
import minMax from "dayjs/plugin/minMax";
|
|
14008
14319
|
import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
14009
14320
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
14010
14321
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
14011
14322
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
14012
|
-
import { clone as
|
|
14323
|
+
import { clone as clone19, isNil as isNil21, mergeDeepRight } from "ramda";
|
|
14013
14324
|
dayjs4.extend(minMax);
|
|
14014
14325
|
dayjs4.extend(isSameOrBefore);
|
|
14015
14326
|
dayjs4.extend(quarterOfYear);
|
|
@@ -14052,10 +14363,10 @@ var BaseSeriesGenerator = class {
|
|
|
14052
14363
|
this.chartGenerator = chartGenerator;
|
|
14053
14364
|
const { chartSeriesEncode, caption, id, userParam } = model;
|
|
14054
14365
|
if (!model.catalogField) {
|
|
14055
|
-
throw new
|
|
14366
|
+
throw new RuntimeModelError28(model, "\u7F3A\u5C11\u5206\u7C7B\u5C5E\u6027\u914D\u7F6E");
|
|
14056
14367
|
}
|
|
14057
14368
|
if (!model.valueField) {
|
|
14058
|
-
throw new
|
|
14369
|
+
throw new RuntimeModelError28(model, "\u7F3A\u5C11\u503C\u5C5E\u6027\u914D\u7F6E");
|
|
14059
14370
|
}
|
|
14060
14371
|
this.catalogField = chartGenerator.getFieldKey(model.catalogField);
|
|
14061
14372
|
this.valueField = chartGenerator.getFieldKey(model.valueField);
|
|
@@ -14284,7 +14595,7 @@ var BaseSeriesGenerator = class {
|
|
|
14284
14595
|
dataPreprocess(data) {
|
|
14285
14596
|
const tempData = [];
|
|
14286
14597
|
data.forEach((singleData) => {
|
|
14287
|
-
tempData.push(
|
|
14598
|
+
tempData.push(clone19(singleData));
|
|
14288
14599
|
});
|
|
14289
14600
|
const { groupMode } = this.model;
|
|
14290
14601
|
if (groupMode) {
|
|
@@ -14478,10 +14789,10 @@ var BaseSeriesGenerator = class {
|
|
|
14478
14789
|
var LineSeriesGenerator = class extends BaseSeriesGenerator {
|
|
14479
14790
|
calcStaticOptions() {
|
|
14480
14791
|
if (this.xAxisIndex === void 0) {
|
|
14481
|
-
throw new
|
|
14792
|
+
throw new RuntimeModelError29(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
|
|
14482
14793
|
}
|
|
14483
14794
|
if (this.yAxisIndex === void 0) {
|
|
14484
|
-
throw new
|
|
14795
|
+
throw new RuntimeModelError29(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
|
|
14485
14796
|
}
|
|
14486
14797
|
const options = super.calcStaticOptions();
|
|
14487
14798
|
options.xAxisIndex = this.xAxisIndex;
|
|
@@ -14497,14 +14808,14 @@ var LineSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
14497
14808
|
};
|
|
14498
14809
|
|
|
14499
14810
|
// src/controller/control/chart/generator/bar-series-generator.ts
|
|
14500
|
-
import { RuntimeModelError as
|
|
14811
|
+
import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
|
|
14501
14812
|
var BarSeriesGenerator = class extends BaseSeriesGenerator {
|
|
14502
14813
|
calcStaticOptions() {
|
|
14503
14814
|
if (this.xAxisIndex === void 0) {
|
|
14504
|
-
throw new
|
|
14815
|
+
throw new RuntimeModelError30(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
|
|
14505
14816
|
}
|
|
14506
14817
|
if (this.yAxisIndex === void 0) {
|
|
14507
|
-
throw new
|
|
14818
|
+
throw new RuntimeModelError30(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
|
|
14508
14819
|
}
|
|
14509
14820
|
const options = super.calcStaticOptions();
|
|
14510
14821
|
options.xAxisIndex = this.xAxisIndex;
|
|
@@ -14557,14 +14868,14 @@ var PieSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
14557
14868
|
};
|
|
14558
14869
|
|
|
14559
14870
|
// src/controller/control/chart/generator/scatter-series-generator.ts
|
|
14560
|
-
import { RuntimeModelError as
|
|
14871
|
+
import { RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
|
|
14561
14872
|
var ScatterSeriesGenerator = class extends BaseSeriesGenerator {
|
|
14562
14873
|
calcStaticOptions() {
|
|
14563
14874
|
if (this.xAxisIndex === void 0) {
|
|
14564
|
-
throw new
|
|
14875
|
+
throw new RuntimeModelError31(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
|
|
14565
14876
|
}
|
|
14566
14877
|
if (this.yAxisIndex === void 0) {
|
|
14567
|
-
throw new
|
|
14878
|
+
throw new RuntimeModelError31(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
|
|
14568
14879
|
}
|
|
14569
14880
|
const options = super.calcStaticOptions();
|
|
14570
14881
|
options.xAxisIndex = this.xAxisIndex;
|
|
@@ -15162,17 +15473,17 @@ var CaptionBarController = class extends ControlController {
|
|
|
15162
15473
|
import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError47 } from "@ibiz-template/core";
|
|
15163
15474
|
|
|
15164
15475
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
15165
|
-
import { RuntimeModelError as
|
|
15476
|
+
import { RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
15166
15477
|
import { isArray as isArray8 } from "qx-util";
|
|
15167
15478
|
|
|
15168
15479
|
// src/ui-action/provider/ui-action-provider-base.ts
|
|
15169
|
-
import { RuntimeModelError as
|
|
15480
|
+
import { RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
|
|
15170
15481
|
|
|
15171
15482
|
// src/ui-logic/index.ts
|
|
15172
15483
|
import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
|
|
15173
15484
|
|
|
15174
15485
|
// src/ui-logic/ui-logic.ts
|
|
15175
|
-
import { ModelError as ModelError25, RuntimeModelError as
|
|
15486
|
+
import { ModelError as ModelError25, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
15176
15487
|
|
|
15177
15488
|
// src/ui-logic/ui-logic-context.ts
|
|
15178
15489
|
var UILogicContext = class {
|
|
@@ -15318,24 +15629,24 @@ var UILogicContext = class {
|
|
|
15318
15629
|
};
|
|
15319
15630
|
|
|
15320
15631
|
// src/ui-logic/ui-logic-node/de-action-node/de-action-node.ts
|
|
15321
|
-
import { RuntimeModelError as
|
|
15632
|
+
import { RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
|
|
15322
15633
|
|
|
15323
15634
|
// src/ui-logic/ui-logic-link/ui-logic-link.ts
|
|
15324
15635
|
import { ModelError as ModelError20 } from "@ibiz-template/core";
|
|
15325
15636
|
|
|
15326
15637
|
// src/ui-logic/ui-logic-link/ui-logic-link-group-cond/ui-logic-link-group-cond.ts
|
|
15327
|
-
import { RuntimeModelError as
|
|
15638
|
+
import { RuntimeModelError as RuntimeModelError33 } from "@ibiz-template/core";
|
|
15328
15639
|
|
|
15329
15640
|
// src/ui-logic/ui-logic-link/ui-logic-link-cond/ui-logic-link-cond.ts
|
|
15330
15641
|
var UILogicLinkCond = class {
|
|
15331
15642
|
};
|
|
15332
15643
|
|
|
15333
15644
|
// src/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.ts
|
|
15334
|
-
import { ModelError as ModelError19, RuntimeModelError as
|
|
15645
|
+
import { ModelError as ModelError19, RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
|
|
15335
15646
|
|
|
15336
15647
|
// src/ui-logic/utils/handle-src-val.ts
|
|
15337
15648
|
import { ModelError as ModelError18 } from "@ibiz-template/core";
|
|
15338
|
-
import { clone as
|
|
15649
|
+
import { clone as clone20 } from "ramda";
|
|
15339
15650
|
function handleSrcVal2(ctx, srcValParams) {
|
|
15340
15651
|
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
15341
15652
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
@@ -15362,7 +15673,7 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
15362
15673
|
value = ctx.parameters.context;
|
|
15363
15674
|
break;
|
|
15364
15675
|
case "ENVPARAM":
|
|
15365
|
-
value =
|
|
15676
|
+
value = clone20(ibiz.env);
|
|
15366
15677
|
break;
|
|
15367
15678
|
default:
|
|
15368
15679
|
throw new ModelError18(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
@@ -15427,7 +15738,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
15427
15738
|
switch (this.type) {
|
|
15428
15739
|
case "ENTITYFIELD": {
|
|
15429
15740
|
if (!this.value) {
|
|
15430
|
-
throw new
|
|
15741
|
+
throw new RuntimeModelError32(
|
|
15431
15742
|
this.model,
|
|
15432
15743
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
15433
15744
|
);
|
|
@@ -15437,7 +15748,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
15437
15748
|
}
|
|
15438
15749
|
case "SRCENTITYFIELD": {
|
|
15439
15750
|
if (!this.value) {
|
|
15440
|
-
throw new
|
|
15751
|
+
throw new RuntimeModelError32(
|
|
15441
15752
|
this.model,
|
|
15442
15753
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
15443
15754
|
);
|
|
@@ -15503,7 +15814,7 @@ var UILogicLinkGroupCond = class _UILogicLinkGroupCond extends UILogicLinkCond {
|
|
|
15503
15814
|
test(ctx, context, data) {
|
|
15504
15815
|
let bol = true;
|
|
15505
15816
|
if (this.conds.length === 0) {
|
|
15506
|
-
throw new
|
|
15817
|
+
throw new RuntimeModelError33(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
|
|
15507
15818
|
}
|
|
15508
15819
|
for (let i = 0; i < this.conds.length; i++) {
|
|
15509
15820
|
const cond = this.conds[i];
|
|
@@ -15629,10 +15940,10 @@ var DEActionNode2 = class extends UILogicNode {
|
|
|
15629
15940
|
retDEUILogicParamId
|
|
15630
15941
|
} = this.model;
|
|
15631
15942
|
if (!dstAppDataEntityId) {
|
|
15632
|
-
throw new
|
|
15943
|
+
throw new RuntimeModelError34(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
|
|
15633
15944
|
}
|
|
15634
15945
|
if (!dstAppDEActionId) {
|
|
15635
|
-
throw new
|
|
15946
|
+
throw new RuntimeModelError34(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
|
|
15636
15947
|
}
|
|
15637
15948
|
const requestData = ctx.params[dstDEUILogicParamId];
|
|
15638
15949
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
@@ -15650,13 +15961,13 @@ var DEActionNode2 = class extends UILogicNode {
|
|
|
15650
15961
|
};
|
|
15651
15962
|
|
|
15652
15963
|
// src/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.ts
|
|
15653
|
-
import { RuntimeModelError as
|
|
15964
|
+
import { RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
|
|
15654
15965
|
var DEUIActionNode = class extends UILogicNode {
|
|
15655
15966
|
async exec(ctx) {
|
|
15656
15967
|
const { dstAppDEUIActionId, dstDEUILogicParamId } = this.model;
|
|
15657
15968
|
const { data, parameters } = ctx;
|
|
15658
15969
|
if (!dstAppDEUIActionId) {
|
|
15659
|
-
throw new
|
|
15970
|
+
throw new RuntimeModelError35(this.model, "\u672A\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
15660
15971
|
}
|
|
15661
15972
|
let actionData = [data];
|
|
15662
15973
|
if (dstDEUILogicParamId) {
|
|
@@ -15721,7 +16032,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
15721
16032
|
|
|
15722
16033
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
15723
16034
|
import { ModelError as ModelError22, RuntimeError as RuntimeError39 } from "@ibiz-template/core";
|
|
15724
|
-
import { clone as
|
|
16035
|
+
import { clone as clone21 } from "ramda";
|
|
15725
16036
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
15726
16037
|
async exec(ctx) {
|
|
15727
16038
|
const nodeParams = this.model.deuilogicNodeParams;
|
|
@@ -15810,7 +16121,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
15810
16121
|
copyParam(nodeParam, ctx) {
|
|
15811
16122
|
const { dstDEUILogicParamId } = nodeParam;
|
|
15812
16123
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
15813
|
-
ctx.params[dstDEUILogicParamId] =
|
|
16124
|
+
ctx.params[dstDEUILogicParamId] = clone21(srcVal);
|
|
15814
16125
|
}
|
|
15815
16126
|
/**
|
|
15816
16127
|
* 绑定参数
|
|
@@ -15887,20 +16198,20 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
15887
16198
|
};
|
|
15888
16199
|
|
|
15889
16200
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
15890
|
-
import { RuntimeError as RuntimeError40, RuntimeModelError as
|
|
16201
|
+
import { RuntimeError as RuntimeError40, RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
|
|
15891
16202
|
import { isFunction } from "lodash-es";
|
|
15892
16203
|
var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
15893
16204
|
async exec(ctx) {
|
|
15894
16205
|
ctx.isEndNode = true;
|
|
15895
16206
|
const { invokeMethod, invokeCtrlId, invokeParamId } = this.model;
|
|
15896
16207
|
if (!invokeCtrlId) {
|
|
15897
|
-
throw new
|
|
16208
|
+
throw new RuntimeModelError36(this.model, "\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u5BF9\u8C61");
|
|
15898
16209
|
}
|
|
15899
16210
|
if (!invokeParamId) {
|
|
15900
|
-
throw new
|
|
16211
|
+
throw new RuntimeModelError36(this.model, "\u6CA1\u6709\u914D\u7F6E\u64CD\u4F5C\u53C2\u6570");
|
|
15901
16212
|
}
|
|
15902
16213
|
if (!invokeMethod) {
|
|
15903
|
-
throw new
|
|
16214
|
+
throw new RuntimeModelError36(this.model, "\u6CA1\u6709\u914D\u7F6E\u8C03\u7528\u65B9\u6CD5");
|
|
15904
16215
|
}
|
|
15905
16216
|
const invokeParam = ctx.params[invokeParamId];
|
|
15906
16217
|
if (!invokeParam) {
|
|
@@ -15918,12 +16229,12 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
15918
16229
|
};
|
|
15919
16230
|
|
|
15920
16231
|
// src/ui-logic/ui-logic-node/bind-param-node/bind-param-node.ts
|
|
15921
|
-
import { RuntimeModelError as
|
|
16232
|
+
import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
|
|
15922
16233
|
var BindParamNode2 = class extends UILogicNode {
|
|
15923
16234
|
async exec(ctx) {
|
|
15924
16235
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
15925
16236
|
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
15926
|
-
throw new
|
|
16237
|
+
throw new RuntimeModelError37(
|
|
15927
16238
|
this.model,
|
|
15928
16239
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
15929
16240
|
);
|
|
@@ -15934,7 +16245,7 @@ var BindParamNode2 = class extends UILogicNode {
|
|
|
15934
16245
|
};
|
|
15935
16246
|
|
|
15936
16247
|
// src/ui-logic/ui-logic-node/msg-box-node/msg-box-node.ts
|
|
15937
|
-
import { ModelError as ModelError23, RuntimeModelError as
|
|
16248
|
+
import { ModelError as ModelError23, RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
|
|
15938
16249
|
var MsgBoxNode = class extends UILogicNode {
|
|
15939
16250
|
constructor() {
|
|
15940
16251
|
super(...arguments);
|
|
@@ -15948,10 +16259,10 @@ var MsgBoxNode = class extends UILogicNode {
|
|
|
15948
16259
|
async exec(ctx) {
|
|
15949
16260
|
const { msgBoxType, buttonsType, msgBoxParamId } = this.model;
|
|
15950
16261
|
if (!msgBoxType) {
|
|
15951
|
-
throw new
|
|
16262
|
+
throw new RuntimeModelError38(this.model, "\u7F3A\u5C11\u6D88\u606F\u7C7B\u578B\u7684\u914D\u7F6E");
|
|
15952
16263
|
}
|
|
15953
16264
|
if (!buttonsType) {
|
|
15954
|
-
throw new
|
|
16265
|
+
throw new RuntimeModelError38(this.model, "\u7F3A\u5C11\u6309\u94AE\u7C7B\u578B\u7684\u914D\u7F6E");
|
|
15955
16266
|
}
|
|
15956
16267
|
let { title } = this.model;
|
|
15957
16268
|
let { message } = this.model;
|
|
@@ -16011,12 +16322,12 @@ var PFPluginNode = class extends UILogicNode {
|
|
|
16011
16322
|
};
|
|
16012
16323
|
|
|
16013
16324
|
// src/ui-logic/ui-logic-node/debug-param-node/debug-param-node.ts
|
|
16014
|
-
import { RuntimeModelError as
|
|
16325
|
+
import { RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
|
|
16015
16326
|
var DebugParamNode = class extends UILogicNode {
|
|
16016
16327
|
async exec(ctx) {
|
|
16017
16328
|
const { dstDEUILogicParamId, name } = this.model;
|
|
16018
16329
|
if (!dstDEUILogicParamId) {
|
|
16019
|
-
throw new
|
|
16330
|
+
throw new RuntimeModelError39(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
16020
16331
|
}
|
|
16021
16332
|
const param = ctx.params[dstDEUILogicParamId];
|
|
16022
16333
|
ibiz.log.debug("\u903B\u8F91\u8282\u70B9".concat(name, "\u64CD\u4F5C\u53C2\u6570\u503C:"), param);
|
|
@@ -16024,36 +16335,36 @@ var DebugParamNode = class extends UILogicNode {
|
|
|
16024
16335
|
};
|
|
16025
16336
|
|
|
16026
16337
|
// src/ui-logic/ui-logic-node/reset-param-node/reset-param-node.ts
|
|
16027
|
-
import { RuntimeModelError as
|
|
16338
|
+
import { RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
|
|
16028
16339
|
var ResetParamNode2 = class extends UILogicNode {
|
|
16029
16340
|
async exec(ctx) {
|
|
16030
16341
|
const { dstDEUILogicParamId } = this.model;
|
|
16031
16342
|
if (!dstDEUILogicParamId) {
|
|
16032
|
-
throw new
|
|
16343
|
+
throw new RuntimeModelError40(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
16033
16344
|
}
|
|
16034
16345
|
ctx.resetParam(dstDEUILogicParamId);
|
|
16035
16346
|
}
|
|
16036
16347
|
};
|
|
16037
16348
|
|
|
16038
16349
|
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
16039
|
-
import { RuntimeModelError as
|
|
16040
|
-
import { clone as
|
|
16350
|
+
import { RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
|
|
16351
|
+
import { clone as clone22 } from "ramda";
|
|
16041
16352
|
var CopyParamNode2 = class extends UILogicNode {
|
|
16042
16353
|
async exec(ctx) {
|
|
16043
16354
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
16044
16355
|
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
16045
|
-
throw new
|
|
16356
|
+
throw new RuntimeModelError41(
|
|
16046
16357
|
this.model,
|
|
16047
16358
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
16048
16359
|
);
|
|
16049
16360
|
}
|
|
16050
16361
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
16051
|
-
ctx.params[dstDEUILogicParamId] =
|
|
16362
|
+
ctx.params[dstDEUILogicParamId] = clone22(srcVal);
|
|
16052
16363
|
}
|
|
16053
16364
|
};
|
|
16054
16365
|
|
|
16055
16366
|
// src/ui-logic/ui-logic-node/append-param-node/append-param-node.ts
|
|
16056
|
-
import { RuntimeModelError as
|
|
16367
|
+
import { RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
|
|
16057
16368
|
var AppendParamNode2 = class extends UILogicNode {
|
|
16058
16369
|
async exec(ctx) {
|
|
16059
16370
|
const {
|
|
@@ -16064,7 +16375,7 @@ var AppendParamNode2 = class extends UILogicNode {
|
|
|
16064
16375
|
srcSize
|
|
16065
16376
|
} = this.model;
|
|
16066
16377
|
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
16067
|
-
throw new
|
|
16378
|
+
throw new RuntimeModelError42(
|
|
16068
16379
|
this.model,
|
|
16069
16380
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
16070
16381
|
);
|
|
@@ -16082,12 +16393,12 @@ var AppendParamNode2 = class extends UILogicNode {
|
|
|
16082
16393
|
};
|
|
16083
16394
|
|
|
16084
16395
|
// src/ui-logic/ui-logic-node/sort-param-node/sort-param-node.ts
|
|
16085
|
-
import { RuntimeModelError as
|
|
16396
|
+
import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
16086
16397
|
var SortParamNode2 = class extends UILogicNode {
|
|
16087
16398
|
async exec(ctx) {
|
|
16088
16399
|
const { dstDEUILogicParamId, dstSortDir, dstFieldName } = this.model;
|
|
16089
16400
|
if (!dstDEUILogicParamId || !dstFieldName) {
|
|
16090
|
-
throw new
|
|
16401
|
+
throw new RuntimeModelError43(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
|
|
16091
16402
|
}
|
|
16092
16403
|
const key = dstFieldName;
|
|
16093
16404
|
const arr = ctx.params[dstDEUILogicParamId];
|
|
@@ -16098,19 +16409,19 @@ var SortParamNode2 = class extends UILogicNode {
|
|
|
16098
16409
|
};
|
|
16099
16410
|
|
|
16100
16411
|
// src/ui-logic/ui-logic-node/renew-param-node/renew-param-node.ts
|
|
16101
|
-
import { RuntimeModelError as
|
|
16412
|
+
import { RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
|
|
16102
16413
|
var RenewParamNode2 = class extends UILogicNode {
|
|
16103
16414
|
async exec(ctx) {
|
|
16104
16415
|
const { dstDEUILogicParamId } = this.model;
|
|
16105
16416
|
if (!dstDEUILogicParamId) {
|
|
16106
|
-
throw new
|
|
16417
|
+
throw new RuntimeModelError44(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
16107
16418
|
}
|
|
16108
16419
|
ctx.renewParam(dstDEUILogicParamId);
|
|
16109
16420
|
}
|
|
16110
16421
|
};
|
|
16111
16422
|
|
|
16112
16423
|
// src/ui-logic/ui-logic-node/data-set-node/data-set-node.ts
|
|
16113
|
-
import { RuntimeModelError as
|
|
16424
|
+
import { RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
|
|
16114
16425
|
var DataSetNode2 = class extends UILogicNode {
|
|
16115
16426
|
async exec(ctx) {
|
|
16116
16427
|
const {
|
|
@@ -16120,7 +16431,7 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
16120
16431
|
retDEUILogicParamId
|
|
16121
16432
|
} = this.model;
|
|
16122
16433
|
if (!dstDEUILogicParamId) {
|
|
16123
|
-
throw new
|
|
16434
|
+
throw new RuntimeModelError45(this.model, "\u7F3A\u5C11\u914D\u7F6E\u8FC7\u6EE4\u53C2\u6570");
|
|
16124
16435
|
}
|
|
16125
16436
|
const queryParams = ctx.params[dstDEUILogicParamId];
|
|
16126
16437
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
@@ -16146,19 +16457,19 @@ var ThrowExceptionNode2 = class extends UILogicNode {
|
|
|
16146
16457
|
};
|
|
16147
16458
|
|
|
16148
16459
|
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
16149
|
-
import { RuntimeError as RuntimeError42, RuntimeModelError as
|
|
16460
|
+
import { RuntimeError as RuntimeError42, RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
|
|
16150
16461
|
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
16151
16462
|
async exec(ctx) {
|
|
16152
16463
|
ctx.isEndNode = true;
|
|
16153
16464
|
const { eventName, eventParamId, fireCtrlId } = this.model;
|
|
16154
16465
|
if (!fireCtrlId) {
|
|
16155
|
-
throw new
|
|
16466
|
+
throw new RuntimeModelError46(this.model, "\u6CA1\u6709\u914D\u7F6E\u89E6\u53D1\u5BF9\u8C61");
|
|
16156
16467
|
}
|
|
16157
16468
|
if (!eventName) {
|
|
16158
|
-
throw new
|
|
16469
|
+
throw new RuntimeModelError46(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u540D\u79F0\u53C2\u6570");
|
|
16159
16470
|
}
|
|
16160
16471
|
if (!eventParamId) {
|
|
16161
|
-
throw new
|
|
16472
|
+
throw new RuntimeModelError46(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u53C2\u6570");
|
|
16162
16473
|
}
|
|
16163
16474
|
const invokeCtrl = ctx.params[fireCtrlId];
|
|
16164
16475
|
if (!invokeCtrl) {
|
|
@@ -16173,7 +16484,7 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
16173
16484
|
};
|
|
16174
16485
|
|
|
16175
16486
|
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
16176
|
-
import { RuntimeError as RuntimeError43, RuntimeModelError as
|
|
16487
|
+
import { RuntimeError as RuntimeError43, RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
|
|
16177
16488
|
var ExecuteDELogicNode = class extends UILogicNode {
|
|
16178
16489
|
async exec(ctx) {
|
|
16179
16490
|
const {
|
|
@@ -16183,13 +16494,13 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
16183
16494
|
retDEUILogicParamId
|
|
16184
16495
|
} = this.model;
|
|
16185
16496
|
if (!dstAppDataEntityId) {
|
|
16186
|
-
throw new
|
|
16497
|
+
throw new RuntimeModelError47(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
|
|
16187
16498
|
}
|
|
16188
16499
|
if (!dstAppDELogicId) {
|
|
16189
|
-
throw new
|
|
16500
|
+
throw new RuntimeModelError47(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
|
|
16190
16501
|
}
|
|
16191
16502
|
if (!dstDEUILogicParamId) {
|
|
16192
|
-
throw new
|
|
16503
|
+
throw new RuntimeModelError47(this.model, "\u6CA1\u6709\u914D\u7F6E\u4F20\u5165\u903B\u8F91\u53C2\u6570");
|
|
16193
16504
|
}
|
|
16194
16505
|
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
16195
16506
|
if (!dstParam) {
|
|
@@ -16350,7 +16661,7 @@ var UILogic = class {
|
|
|
16350
16661
|
this.params = /* @__PURE__ */ new Map();
|
|
16351
16662
|
var _a;
|
|
16352
16663
|
if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
|
|
16353
|
-
throw new
|
|
16664
|
+
throw new RuntimeModelError48(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
16354
16665
|
}
|
|
16355
16666
|
model.deuilogicNodes.forEach((node) => {
|
|
16356
16667
|
const { logicNodeType } = node;
|
|
@@ -16470,7 +16781,7 @@ var UILogic = class {
|
|
|
16470
16781
|
const start = this.nodes.get(startDEUILogicNodeId);
|
|
16471
16782
|
await this.deepExec(start, ctx);
|
|
16472
16783
|
} else {
|
|
16473
|
-
throw new
|
|
16784
|
+
throw new RuntimeModelError48(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
16474
16785
|
}
|
|
16475
16786
|
if (ctx.isEndNode) {
|
|
16476
16787
|
return ctx.result;
|
|
@@ -16605,7 +16916,7 @@ var UIActionProviderBase = class {
|
|
|
16605
16916
|
const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
|
|
16606
16917
|
if (uilogicAttachMode === "REPLACE") {
|
|
16607
16918
|
if (!appDEUILogicId) {
|
|
16608
|
-
throw new
|
|
16919
|
+
throw new RuntimeModelError49(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
16609
16920
|
}
|
|
16610
16921
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
16611
16922
|
return result;
|
|
@@ -16620,7 +16931,7 @@ var UIActionProviderBase = class {
|
|
|
16620
16931
|
}
|
|
16621
16932
|
if (action.uilogicAttachMode === "AFTER") {
|
|
16622
16933
|
if (!appDEUILogicId) {
|
|
16623
|
-
throw new
|
|
16934
|
+
throw new RuntimeModelError49(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
16624
16935
|
}
|
|
16625
16936
|
await execUILogic(
|
|
16626
16937
|
appDEUILogicId,
|
|
@@ -16845,7 +17156,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
16845
17156
|
const entityName = action.appDataEntityId;
|
|
16846
17157
|
const methodName = action.appDEMethodId;
|
|
16847
17158
|
if (!entityName || !methodName) {
|
|
16848
|
-
throw new
|
|
17159
|
+
throw new RuntimeModelError50(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
|
|
16849
17160
|
}
|
|
16850
17161
|
const { resultContext, resultParams, resultData } = await this.handleParams(
|
|
16851
17162
|
action,
|
|
@@ -16970,7 +17281,7 @@ var SysUIActionProvider = class extends UIActionProviderBase {
|
|
|
16970
17281
|
// src/ui-action/provider/front-ui-action-provider.ts
|
|
16971
17282
|
import {
|
|
16972
17283
|
StringUtil,
|
|
16973
|
-
RuntimeModelError as
|
|
17284
|
+
RuntimeModelError as RuntimeModelError51,
|
|
16974
17285
|
ModelError as ModelError26,
|
|
16975
17286
|
RuntimeError as RuntimeError46
|
|
16976
17287
|
} from "@ibiz-template/core";
|
|
@@ -16988,7 +17299,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
16988
17299
|
case "WIZARD": {
|
|
16989
17300
|
const frontPSAppView = action.frontAppViewId;
|
|
16990
17301
|
if (!frontPSAppView) {
|
|
16991
|
-
throw new
|
|
17302
|
+
throw new RuntimeModelError51(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
|
|
16992
17303
|
}
|
|
16993
17304
|
const { resultContext, resultParams } = await this.handleParams(
|
|
16994
17305
|
action,
|
|
@@ -17053,7 +17364,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
17053
17364
|
);
|
|
17054
17365
|
return result || {};
|
|
17055
17366
|
}
|
|
17056
|
-
throw new
|
|
17367
|
+
throw new RuntimeModelError51(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
17057
17368
|
}
|
|
17058
17369
|
/**
|
|
17059
17370
|
* 执行打印行为
|
|
@@ -17124,7 +17435,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
17124
17435
|
*/
|
|
17125
17436
|
async executeDataImport(action, args) {
|
|
17126
17437
|
var _a;
|
|
17127
|
-
const { resultParams } = await this.handleParams(
|
|
17438
|
+
const { resultContext, resultParams } = await this.handleParams(
|
|
17128
17439
|
action,
|
|
17129
17440
|
args.context,
|
|
17130
17441
|
args.data,
|
|
@@ -17148,6 +17459,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
17148
17459
|
dismiss: () => modal.dismiss(),
|
|
17149
17460
|
appDataEntity,
|
|
17150
17461
|
dataImport: appDEDataImport,
|
|
17462
|
+
context: resultContext,
|
|
17151
17463
|
params: resultParams
|
|
17152
17464
|
},
|
|
17153
17465
|
{
|
|
@@ -17901,7 +18213,7 @@ var RawItemPortletController = class extends PortletPartController {
|
|
|
17901
18213
|
};
|
|
17902
18214
|
|
|
17903
18215
|
// src/controller/control/data-view/data-view.controller.ts
|
|
17904
|
-
import { RuntimeModelError as
|
|
18216
|
+
import { RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
|
|
17905
18217
|
import { isNil as isNil22 } from "ramda";
|
|
17906
18218
|
|
|
17907
18219
|
// src/controller/control/data-view/data-view.service.ts
|
|
@@ -18116,7 +18428,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
18116
18428
|
const optItemModel = this.getOptItemModel();
|
|
18117
18429
|
if (optItemModel) {
|
|
18118
18430
|
if (!optItemModel.deuiactionGroup) {
|
|
18119
|
-
throw new
|
|
18431
|
+
throw new RuntimeModelError52(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
18120
18432
|
}
|
|
18121
18433
|
if (!((_a = optItemModel.deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
18122
18434
|
ibiz.log.debug("\u64CD\u4F5C\u9879\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -18169,7 +18481,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
18169
18481
|
const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
|
|
18170
18482
|
if (enableGroup && groupMode) {
|
|
18171
18483
|
if (!groupAppDEFieldId) {
|
|
18172
|
-
throw new
|
|
18484
|
+
throw new RuntimeModelError52(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
|
|
18173
18485
|
}
|
|
18174
18486
|
if (groupMode === "AUTO") {
|
|
18175
18487
|
this.handleAutoGroup();
|
|
@@ -18236,7 +18548,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
18236
18548
|
async handleCodeListGroup() {
|
|
18237
18549
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
18238
18550
|
if (!groupCodeListId) {
|
|
18239
|
-
throw new
|
|
18551
|
+
throw new RuntimeModelError52(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
18240
18552
|
}
|
|
18241
18553
|
const { items } = this.state;
|
|
18242
18554
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -18342,7 +18654,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
18342
18654
|
caption = ibiz.i18n.t(item.capLanguageRes.lanResTag, item.caption);
|
|
18343
18655
|
}
|
|
18344
18656
|
if (!item.appDEFieldId) {
|
|
18345
|
-
throw new
|
|
18657
|
+
throw new RuntimeModelError52(item, "\u542F\u7528\u6392\u5E8F\u7684\u9879\u5FC5\u987B\u5173\u8054\u5B9E\u4F53\u5C5E\u6027");
|
|
18346
18658
|
}
|
|
18347
18659
|
const tempItem = {
|
|
18348
18660
|
caption,
|
|
@@ -18360,10 +18672,10 @@ var DataViewControlController = class extends MDControlController {
|
|
|
18360
18672
|
};
|
|
18361
18673
|
|
|
18362
18674
|
// src/controller/control/exp-bar/calendar-exp-bar.controller.ts
|
|
18363
|
-
import { RuntimeModelError as
|
|
18675
|
+
import { RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
18364
18676
|
|
|
18365
18677
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
18366
|
-
import { RuntimeError as RuntimeError48, RuntimeModelError as
|
|
18678
|
+
import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
|
|
18367
18679
|
var ExpBarControlController = class extends ControlController {
|
|
18368
18680
|
constructor() {
|
|
18369
18681
|
super(...arguments);
|
|
@@ -18418,7 +18730,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
18418
18730
|
get xDataController() {
|
|
18419
18731
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
18420
18732
|
if (!controller) {
|
|
18421
|
-
throw new
|
|
18733
|
+
throw new RuntimeModelError53(
|
|
18422
18734
|
this.model,
|
|
18423
18735
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
18424
18736
|
);
|
|
@@ -18777,7 +19089,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
18777
19089
|
get xDataController() {
|
|
18778
19090
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
18779
19091
|
if (!controller) {
|
|
18780
|
-
throw new
|
|
19092
|
+
throw new RuntimeModelError54(
|
|
18781
19093
|
this.model,
|
|
18782
19094
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
18783
19095
|
);
|
|
@@ -18832,7 +19144,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
18832
19144
|
};
|
|
18833
19145
|
|
|
18834
19146
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
18835
|
-
import { RuntimeError as RuntimeError49, RuntimeModelError as
|
|
19147
|
+
import { RuntimeError as RuntimeError49, RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
|
|
18836
19148
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
18837
19149
|
constructor() {
|
|
18838
19150
|
super(...arguments);
|
|
@@ -18855,7 +19167,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
18855
19167
|
get xDataController() {
|
|
18856
19168
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
18857
19169
|
if (!controller) {
|
|
18858
|
-
throw new
|
|
19170
|
+
throw new RuntimeModelError55(
|
|
18859
19171
|
this.model,
|
|
18860
19172
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
18861
19173
|
);
|
|
@@ -19101,7 +19413,7 @@ import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
|
|
|
19101
19413
|
|
|
19102
19414
|
// src/controller/control/form/form/form.controller.ts
|
|
19103
19415
|
import {
|
|
19104
|
-
RuntimeModelError as
|
|
19416
|
+
RuntimeModelError as RuntimeModelError56,
|
|
19105
19417
|
debounceAndAsyncMerge,
|
|
19106
19418
|
recursiveIterate as recursiveIterate3
|
|
19107
19419
|
} from "@ibiz-template/core";
|
|
@@ -19229,7 +19541,7 @@ var FormController = class extends ControlController {
|
|
|
19229
19541
|
return;
|
|
19230
19542
|
}
|
|
19231
19543
|
if (form.details[detail.id]) {
|
|
19232
|
-
throw new
|
|
19544
|
+
throw new RuntimeModelError56(
|
|
19233
19545
|
detail,
|
|
19234
19546
|
"\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")
|
|
19235
19547
|
);
|
|
@@ -20066,6 +20378,9 @@ var FormDetailController = class {
|
|
|
20066
20378
|
* @date 2023-10-11 05:03:26
|
|
20067
20379
|
*/
|
|
20068
20380
|
async onClick(event) {
|
|
20381
|
+
if (event) {
|
|
20382
|
+
event.stopPropagation();
|
|
20383
|
+
}
|
|
20069
20384
|
this.form.evt.emit("onFormDetailEvent", {
|
|
20070
20385
|
formDetailName: this.model.id,
|
|
20071
20386
|
formDetailEventName: "onClick" /* CLICK */,
|
|
@@ -20871,7 +21186,7 @@ var FormMDCtrlController = class extends FormDetailController {
|
|
|
20871
21186
|
import {
|
|
20872
21187
|
mergeInLeft,
|
|
20873
21188
|
ModelError as ModelError27,
|
|
20874
|
-
RuntimeModelError as
|
|
21189
|
+
RuntimeModelError as RuntimeModelError57
|
|
20875
21190
|
} from "@ibiz-template/core";
|
|
20876
21191
|
var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
20877
21192
|
constructor() {
|
|
@@ -20897,7 +21212,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
20897
21212
|
await super.onInit();
|
|
20898
21213
|
const { contentControl } = this.model;
|
|
20899
21214
|
if (!contentControl) {
|
|
20900
|
-
throw new
|
|
21215
|
+
throw new RuntimeModelError57(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
|
|
20901
21216
|
}
|
|
20902
21217
|
if (contentControl.controlType === "GRID") {
|
|
20903
21218
|
mergeInLeft(contentControl, {
|
|
@@ -20994,7 +21309,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
20994
21309
|
};
|
|
20995
21310
|
|
|
20996
21311
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
|
|
20997
|
-
import { RuntimeError as RuntimeError51, RuntimeModelError as
|
|
21312
|
+
import { RuntimeError as RuntimeError51, RuntimeModelError as RuntimeModelError58 } from "@ibiz-template/core";
|
|
20998
21313
|
import { createUUID as createUUID11 } from "qx-util";
|
|
20999
21314
|
|
|
21000
21315
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
|
|
@@ -21035,7 +21350,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
21035
21350
|
super.onInit();
|
|
21036
21351
|
const { contentControl } = this.model;
|
|
21037
21352
|
if (!contentControl) {
|
|
21038
|
-
throw new
|
|
21353
|
+
throw new RuntimeModelError58(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
|
|
21039
21354
|
}
|
|
21040
21355
|
contentControl.enableAutoSave = this.enableCreate || this.enableUpdate;
|
|
21041
21356
|
const controlProvider = await getControlProvider(contentControl);
|
|
@@ -21169,7 +21484,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
21169
21484
|
|
|
21170
21485
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
|
|
21171
21486
|
import { ModelError as ModelError28 } from "@ibiz-template/core";
|
|
21172
|
-
import { clone as
|
|
21487
|
+
import { clone as clone23 } from "ramda";
|
|
21173
21488
|
var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
21174
21489
|
constructor() {
|
|
21175
21490
|
super(...arguments);
|
|
@@ -21253,7 +21568,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
21253
21568
|
copyFields.forEach((key) => {
|
|
21254
21569
|
tempForm[key] = this.form.model[key];
|
|
21255
21570
|
});
|
|
21256
|
-
this.repeatedForm =
|
|
21571
|
+
this.repeatedForm = clone23(tempForm);
|
|
21257
21572
|
}
|
|
21258
21573
|
/**
|
|
21259
21574
|
* 设置重复器数据(修改主表单里重复器对应属性)
|
|
@@ -21361,10 +21676,30 @@ var FormTabPageController = class extends FormDetailController {
|
|
|
21361
21676
|
var _a;
|
|
21362
21677
|
return new FormTabPageState((_a = this.parent) == null ? void 0 : _a.state);
|
|
21363
21678
|
}
|
|
21679
|
+
/**
|
|
21680
|
+
* 是否激活的分页
|
|
21681
|
+
* @author lxm
|
|
21682
|
+
* @date 2024-01-17 03:16:24
|
|
21683
|
+
* @readonly
|
|
21684
|
+
* @type {boolean}
|
|
21685
|
+
*/
|
|
21686
|
+
get isActive() {
|
|
21687
|
+
return this.parent.state.activeTab === this.model.id;
|
|
21688
|
+
}
|
|
21364
21689
|
};
|
|
21365
21690
|
|
|
21366
21691
|
// src/controller/control/form/form-detail/form-tab-panel/form-tab-panel.state.ts
|
|
21367
21692
|
var FormTabPanelState = class extends FormDetailState {
|
|
21693
|
+
constructor() {
|
|
21694
|
+
super(...arguments);
|
|
21695
|
+
/**
|
|
21696
|
+
* 当前激活的分页
|
|
21697
|
+
* @author lxm
|
|
21698
|
+
* @date 2024-01-17 02:05:58
|
|
21699
|
+
* @type {string}
|
|
21700
|
+
*/
|
|
21701
|
+
this.activeTab = "";
|
|
21702
|
+
}
|
|
21368
21703
|
};
|
|
21369
21704
|
|
|
21370
21705
|
// src/controller/control/form/form-detail/form-tab-panel/form-tab-panel.controller.ts
|
|
@@ -21373,6 +21708,19 @@ var FormTabPanelController = class extends FormDetailController {
|
|
|
21373
21708
|
var _a;
|
|
21374
21709
|
return new FormTabPanelState((_a = this.parent) == null ? void 0 : _a.state);
|
|
21375
21710
|
}
|
|
21711
|
+
async onInit() {
|
|
21712
|
+
await super.onInit();
|
|
21713
|
+
this.state.activeTab = this.model.deformTabPages[0].id;
|
|
21714
|
+
}
|
|
21715
|
+
/**
|
|
21716
|
+
* 分页点击切换处理
|
|
21717
|
+
* @author lxm
|
|
21718
|
+
* @date 2024-01-17 02:59:38
|
|
21719
|
+
* @param {string} tabId
|
|
21720
|
+
*/
|
|
21721
|
+
onTabChange(tabId) {
|
|
21722
|
+
this.state.activeTab = tabId;
|
|
21723
|
+
}
|
|
21376
21724
|
};
|
|
21377
21725
|
|
|
21378
21726
|
// src/controller/control/form/edit-form/edit-form.controller.ts
|
|
@@ -21383,12 +21731,12 @@ import {
|
|
|
21383
21731
|
} from "@ibiz-template/core";
|
|
21384
21732
|
import { debounce as debounce2 } from "lodash-es";
|
|
21385
21733
|
import { createUUID as createUUID12 } from "qx-util";
|
|
21386
|
-
import { clone as
|
|
21734
|
+
import { clone as clone24 } from "ramda";
|
|
21387
21735
|
|
|
21388
21736
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
21389
21737
|
import {
|
|
21390
21738
|
recursiveIterate as recursiveIterate6,
|
|
21391
|
-
RuntimeModelError as
|
|
21739
|
+
RuntimeModelError as RuntimeModelError59
|
|
21392
21740
|
} from "@ibiz-template/core";
|
|
21393
21741
|
var EditFormService = class extends FormService {
|
|
21394
21742
|
/**
|
|
@@ -21512,7 +21860,7 @@ var EditFormService = class extends FormService {
|
|
|
21512
21860
|
const wizardForm = this.model;
|
|
21513
21861
|
const methodName = (_a = wizardForm.goBackControlAction) == null ? void 0 : _a.appDEMethodId;
|
|
21514
21862
|
if (!methodName) {
|
|
21515
|
-
throw new
|
|
21863
|
+
throw new RuntimeModelError59(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
|
|
21516
21864
|
}
|
|
21517
21865
|
let res = await this.exec(
|
|
21518
21866
|
methodName,
|
|
@@ -21748,8 +22096,8 @@ var EditFormController = class extends FormController {
|
|
|
21748
22096
|
* @return {*} {Promise<IData>}
|
|
21749
22097
|
*/
|
|
21750
22098
|
async copy() {
|
|
21751
|
-
const context =
|
|
21752
|
-
const queryParams =
|
|
22099
|
+
const context = clone24(this.context);
|
|
22100
|
+
const queryParams = clone24(this.params);
|
|
21753
22101
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
21754
22102
|
this.model.appDataEntityId,
|
|
21755
22103
|
this.model.appId
|
|
@@ -21806,7 +22154,7 @@ var EditFormController = class extends FormController {
|
|
|
21806
22154
|
return this.loadDraft();
|
|
21807
22155
|
}
|
|
21808
22156
|
const { context, params } = this.handlerAbilityParams(args);
|
|
21809
|
-
const queryParams =
|
|
22157
|
+
const queryParams = clone24(params);
|
|
21810
22158
|
let res;
|
|
21811
22159
|
try {
|
|
21812
22160
|
await this.startLoading();
|
|
@@ -22372,12 +22720,12 @@ import {
|
|
|
22372
22720
|
mergeDefaultInLeft,
|
|
22373
22721
|
recursiveIterate as recursiveIterate7,
|
|
22374
22722
|
RuntimeError as RuntimeError53,
|
|
22375
|
-
RuntimeModelError as
|
|
22723
|
+
RuntimeModelError as RuntimeModelError61
|
|
22376
22724
|
} from "@ibiz-template/core";
|
|
22377
|
-
import { clone as
|
|
22725
|
+
import { clone as clone25 } from "ramda";
|
|
22378
22726
|
|
|
22379
22727
|
// src/controller/control/grid/grid/grid.service.ts
|
|
22380
|
-
import { RuntimeModelError as
|
|
22728
|
+
import { RuntimeModelError as RuntimeModelError60 } from "@ibiz-template/core";
|
|
22381
22729
|
var GridService = class extends MDControlService {
|
|
22382
22730
|
/**
|
|
22383
22731
|
* 初始化属性映射
|
|
@@ -22405,7 +22753,7 @@ var GridService = class extends MDControlService {
|
|
|
22405
22753
|
dataType: dataItem.dataType
|
|
22406
22754
|
});
|
|
22407
22755
|
} else {
|
|
22408
|
-
throw new
|
|
22756
|
+
throw new RuntimeModelError60(
|
|
22409
22757
|
column,
|
|
22410
22758
|
"\u672A\u627E\u5230\u5BF9\u5E94\u7684\u8868\u683C\u6570\u636E\u9879[".concat(deField, "]")
|
|
22411
22759
|
);
|
|
@@ -22684,7 +23032,7 @@ var GridController = class extends MDControlController {
|
|
|
22684
23032
|
const result = await calcColumnModelBySchema(json, this);
|
|
22685
23033
|
if (result && result.degridColumns.length > 0) {
|
|
22686
23034
|
const { degridColumns, degridDataItems } = result;
|
|
22687
|
-
this.model =
|
|
23035
|
+
this.model = clone25(this.model);
|
|
22688
23036
|
this.model.degridColumns = [
|
|
22689
23037
|
...(this.model.degridColumns || []).filter((item) => {
|
|
22690
23038
|
return degridColumns.findIndex((x) => x.id === item.id) === -1;
|
|
@@ -22715,11 +23063,11 @@ var GridController = class extends MDControlController {
|
|
|
22715
23063
|
(item) => item.model.appDEFieldId === groupAppDEFieldId
|
|
22716
23064
|
);
|
|
22717
23065
|
if (!this.groupFieldColumn) {
|
|
22718
|
-
throw new
|
|
23066
|
+
throw new RuntimeModelError61(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
|
|
22719
23067
|
}
|
|
22720
23068
|
const groupFieldName = this.groupFieldColumn.model.id;
|
|
22721
23069
|
if (!this.groupFieldColumn.model.appCodeListId) {
|
|
22722
|
-
throw new
|
|
23070
|
+
throw new RuntimeModelError61(
|
|
22723
23071
|
this.groupFieldColumn.model,
|
|
22724
23072
|
"\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217".concat(groupFieldName, "\u6CA1\u6709\u914D\u7F6E\u4EE3\u7801\u8868")
|
|
22725
23073
|
);
|
|
@@ -22729,7 +23077,7 @@ var GridController = class extends MDControlController {
|
|
|
22729
23077
|
);
|
|
22730
23078
|
if (index !== -1 && index !== 0) {
|
|
22731
23079
|
if (this.isMultistageHeader) {
|
|
22732
|
-
throw new
|
|
23080
|
+
throw new RuntimeModelError61(
|
|
22733
23081
|
this.model,
|
|
22734
23082
|
"\u8BF7\u5C06\u5206\u7EC4\u5C5E\u6027\u5217".concat(groupFieldName, "\u914D\u7F6E\u4E3A\u7B2C\u4E00\u5217")
|
|
22735
23083
|
);
|
|
@@ -22739,10 +23087,10 @@ var GridController = class extends MDControlController {
|
|
|
22739
23087
|
}
|
|
22740
23088
|
if (groupMode === "CODELIST") {
|
|
22741
23089
|
if (!groupCodeListId) {
|
|
22742
|
-
throw new
|
|
23090
|
+
throw new RuntimeModelError61(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
|
|
22743
23091
|
}
|
|
22744
23092
|
if (this.groupFieldColumn.model.appCodeListId !== groupCodeListId) {
|
|
22745
|
-
throw new
|
|
23093
|
+
throw new RuntimeModelError61(
|
|
22746
23094
|
this.model,
|
|
22747
23095
|
"\u5206\u7EC4\u4EE3\u7801\u8868\u4E0E\u5C5E\u6027\u5217".concat(groupFieldName, "\u7684\u4EE3\u7801\u8868\u4E0D\u4E00\u81F4")
|
|
22748
23096
|
);
|
|
@@ -22829,7 +23177,7 @@ var GridController = class extends MDControlController {
|
|
|
22829
23177
|
return;
|
|
22830
23178
|
}
|
|
22831
23179
|
if (!aggAppDEDataSetId || !aggAppDataEntityId) {
|
|
22832
|
-
throw new
|
|
23180
|
+
throw new RuntimeModelError61(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
|
|
22833
23181
|
}
|
|
22834
23182
|
const params = await this.getFetchParams();
|
|
22835
23183
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
@@ -23199,7 +23547,7 @@ var GridController = class extends MDControlController {
|
|
|
23199
23547
|
throw new RuntimeError53("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
23200
23548
|
}
|
|
23201
23549
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
23202
|
-
row.cacheData =
|
|
23550
|
+
row.cacheData = clone25(row.data);
|
|
23203
23551
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
23204
23552
|
Object.assign(row.data, defaultVal);
|
|
23205
23553
|
}
|
|
@@ -23368,7 +23716,7 @@ var GridController = class extends MDControlController {
|
|
|
23368
23716
|
}
|
|
23369
23717
|
});
|
|
23370
23718
|
}
|
|
23371
|
-
const cloneData =
|
|
23719
|
+
const cloneData = clone25(
|
|
23372
23720
|
data2.map((item) => {
|
|
23373
23721
|
return item.getOrigin();
|
|
23374
23722
|
})
|
|
@@ -23606,7 +23954,7 @@ var GridController = class extends MDControlController {
|
|
|
23606
23954
|
import { DataTypes as DataTypes4, ModelError as ModelError29, plus as plus2 } from "@ibiz-template/core";
|
|
23607
23955
|
import dayjs5 from "dayjs";
|
|
23608
23956
|
import { debounce as debounce3 } from "lodash-es";
|
|
23609
|
-
import { clone as
|
|
23957
|
+
import { clone as clone26, isNil as isNil23 } from "ramda";
|
|
23610
23958
|
var GridFieldColumnController = class extends GridColumnController {
|
|
23611
23959
|
constructor() {
|
|
23612
23960
|
super(...arguments);
|
|
@@ -23639,6 +23987,15 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23639
23987
|
get hasAction() {
|
|
23640
23988
|
return !!this.model.deuiactionId;
|
|
23641
23989
|
}
|
|
23990
|
+
/**
|
|
23991
|
+
* 属性列对应值在数据里的属性字段名称
|
|
23992
|
+
* @author lxm
|
|
23993
|
+
* @date 2023-06-25 09:26:04
|
|
23994
|
+
* @readonly
|
|
23995
|
+
*/
|
|
23996
|
+
get fieldName() {
|
|
23997
|
+
return this.model.id.toLowerCase();
|
|
23998
|
+
}
|
|
23642
23999
|
async onInit() {
|
|
23643
24000
|
await super.onInit();
|
|
23644
24001
|
this.loadCodeList = debounce3(this.loadCodeList, 300, {
|
|
@@ -23680,7 +24037,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23680
24037
|
* @readonly
|
|
23681
24038
|
*/
|
|
23682
24039
|
clickable(row) {
|
|
23683
|
-
const value = row.data[this.
|
|
24040
|
+
const value = row.data[this.fieldName];
|
|
23684
24041
|
return (this.isLinkColumn || this.hasAction) && value;
|
|
23685
24042
|
}
|
|
23686
24043
|
/**
|
|
@@ -23717,7 +24074,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23717
24074
|
* @returns {*} {Promise<void>}
|
|
23718
24075
|
*/
|
|
23719
24076
|
async openLinkView(row, event) {
|
|
23720
|
-
const curValue = row.data[this.
|
|
24077
|
+
const curValue = row.data[this.fieldName];
|
|
23721
24078
|
if (!curValue) {
|
|
23722
24079
|
return;
|
|
23723
24080
|
}
|
|
@@ -23735,7 +24092,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23735
24092
|
srfkey: value,
|
|
23736
24093
|
...wfContext
|
|
23737
24094
|
});
|
|
23738
|
-
const tempParams =
|
|
24095
|
+
const tempParams = clone26(this.params);
|
|
23739
24096
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
23740
24097
|
row.data,
|
|
23741
24098
|
tempContext,
|
|
@@ -23906,7 +24263,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23906
24263
|
};
|
|
23907
24264
|
|
|
23908
24265
|
// src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts
|
|
23909
|
-
import { RuntimeModelError as
|
|
24266
|
+
import { RuntimeModelError as RuntimeModelError62 } from "@ibiz-template/core";
|
|
23910
24267
|
var GridUAColumnController = class extends GridColumnController {
|
|
23911
24268
|
/**
|
|
23912
24269
|
* 给rowController初始化操作列的状态
|
|
@@ -23919,7 +24276,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
23919
24276
|
var _a;
|
|
23920
24277
|
const { deuiactionGroup } = this.model;
|
|
23921
24278
|
if (!deuiactionGroup) {
|
|
23922
|
-
throw new
|
|
24279
|
+
throw new RuntimeModelError62(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
23923
24280
|
}
|
|
23924
24281
|
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
23925
24282
|
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -24012,15 +24369,6 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
24012
24369
|
}
|
|
24013
24370
|
return void 0;
|
|
24014
24371
|
}
|
|
24015
|
-
/**
|
|
24016
|
-
* 列数据属性字段名称
|
|
24017
|
-
* @author lxm
|
|
24018
|
-
* @date 2023-06-25 09:26:04
|
|
24019
|
-
* @readonly
|
|
24020
|
-
*/
|
|
24021
|
-
get fieldName() {
|
|
24022
|
-
return this.model.dataItemName;
|
|
24023
|
-
}
|
|
24024
24372
|
/**
|
|
24025
24373
|
* 初始化方法,生成表格编辑项控制器
|
|
24026
24374
|
*
|
|
@@ -25135,10 +25483,10 @@ import {
|
|
|
25135
25483
|
mergeInLeft as mergeInLeft3,
|
|
25136
25484
|
recursiveIterate as recursiveIterate9
|
|
25137
25485
|
} from "@ibiz-template/core";
|
|
25138
|
-
import { clone as
|
|
25486
|
+
import { clone as clone27, isNil as isNil24 } from "ramda";
|
|
25139
25487
|
|
|
25140
25488
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
25141
|
-
import { RuntimeModelError as
|
|
25489
|
+
import { RuntimeModelError as RuntimeModelError63 } from "@ibiz-template/core";
|
|
25142
25490
|
var ExcludeOPs = [
|
|
25143
25491
|
"ISNULL" /* IS_NULL */,
|
|
25144
25492
|
"ISNOTNULL" /* IS_NOT_NULL */
|
|
@@ -25179,7 +25527,7 @@ var SearchBarFilterController = class {
|
|
|
25179
25527
|
async init() {
|
|
25180
25528
|
if (!this.noEditor) {
|
|
25181
25529
|
if (!this.model.editor) {
|
|
25182
|
-
throw new
|
|
25530
|
+
throw new RuntimeModelError63(this.model, "\u7F3A\u5C11\u7F16\u8F91\u5668\u6A21\u578B");
|
|
25183
25531
|
}
|
|
25184
25532
|
this.editorProvider = await getEditorProvider(this.model.editor);
|
|
25185
25533
|
if (this.editorProvider) {
|
|
@@ -25639,7 +25987,7 @@ var SearchBarController = class extends ControlController {
|
|
|
25639
25987
|
}
|
|
25640
25988
|
});
|
|
25641
25989
|
if (addSearchBarFilters.length > 0) {
|
|
25642
|
-
this.model =
|
|
25990
|
+
this.model = clone27(this.model);
|
|
25643
25991
|
this.model.searchBarFilters = addSearchBarFilters.concat(...mergeFilters);
|
|
25644
25992
|
this.model.enableFilter = true;
|
|
25645
25993
|
}
|
|
@@ -26223,7 +26571,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
26223
26571
|
// src/controller/control/tree/tree.controller.ts
|
|
26224
26572
|
import {
|
|
26225
26573
|
RuntimeError as RuntimeError57,
|
|
26226
|
-
RuntimeModelError as
|
|
26574
|
+
RuntimeModelError as RuntimeModelError64,
|
|
26227
26575
|
recursiveIterate as recursiveIterate10
|
|
26228
26576
|
} from "@ibiz-template/core";
|
|
26229
26577
|
|
|
@@ -27094,7 +27442,7 @@ var TreeController = class extends MDControlController {
|
|
|
27094
27442
|
const { sortAppDEFieldId, sortDir, allowOrder } = orderNodeModel;
|
|
27095
27443
|
if (allowOrder === true) {
|
|
27096
27444
|
if (!sortAppDEFieldId) {
|
|
27097
|
-
throw new
|
|
27445
|
+
throw new RuntimeModelError64(orderNodeModel, "\u7F3A\u5C11\u914D\u7F6E\u6392\u5E8F\u5C5E\u6027");
|
|
27098
27446
|
}
|
|
27099
27447
|
const sortField = sortAppDEFieldId.toLowerCase();
|
|
27100
27448
|
const isAsc = sortDir === "ASC";
|
|
@@ -27175,7 +27523,7 @@ var TreeController = class extends MDControlController {
|
|
|
27175
27523
|
async modifyNodeText(nodeData, text) {
|
|
27176
27524
|
const model = this.getNodeModel(nodeData._nodeId);
|
|
27177
27525
|
if (!model.allowEditText) {
|
|
27178
|
-
throw new
|
|
27526
|
+
throw new RuntimeModelError64(model, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u7F16\u8F91\u6A21\u5F0F\uFF1A\u540D\u79F0");
|
|
27179
27527
|
}
|
|
27180
27528
|
if (!nodeData._deData) {
|
|
27181
27529
|
throw new RuntimeError57("\u4E0D\u662F\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E");
|
|
@@ -27539,7 +27887,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
27539
27887
|
};
|
|
27540
27888
|
|
|
27541
27889
|
// src/controller/control/md-ctrl/md-ctrl.controller.ts
|
|
27542
|
-
import { RuntimeModelError as
|
|
27890
|
+
import { RuntimeModelError as RuntimeModelError65 } from "@ibiz-template/core";
|
|
27543
27891
|
import { isNil as isNil25 } from "ramda";
|
|
27544
27892
|
|
|
27545
27893
|
// src/controller/control/md-ctrl/md-ctrl.service.ts
|
|
@@ -27746,7 +28094,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
27746
28094
|
const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
|
|
27747
28095
|
if (enableGroup && groupMode) {
|
|
27748
28096
|
if (!groupAppDEFieldId) {
|
|
27749
|
-
throw new
|
|
28097
|
+
throw new RuntimeModelError65(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
|
|
27750
28098
|
}
|
|
27751
28099
|
if (groupMode === "AUTO") {
|
|
27752
28100
|
this.handleAutoGroup();
|
|
@@ -27813,7 +28161,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
27813
28161
|
async handleCodeListGroup() {
|
|
27814
28162
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
27815
28163
|
if (!groupCodeListId) {
|
|
27816
|
-
throw new
|
|
28164
|
+
throw new RuntimeModelError65(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
27817
28165
|
}
|
|
27818
28166
|
const { items } = this.state;
|
|
27819
28167
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -27843,7 +28191,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
27843
28191
|
};
|
|
27844
28192
|
|
|
27845
28193
|
// src/controller/control/kanban/kanban.controller.ts
|
|
27846
|
-
import { RuntimeError as RuntimeError59, RuntimeModelError as
|
|
28194
|
+
import { RuntimeError as RuntimeError59, RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
|
|
27847
28195
|
import { isNil as isNil26 } from "ramda";
|
|
27848
28196
|
|
|
27849
28197
|
// src/controller/control/kanban/kanban.service.ts
|
|
@@ -27921,10 +28269,10 @@ var KanbanController = class extends DataViewControlController {
|
|
|
27921
28269
|
const sortField = this.model.minorSortAppDEFieldId;
|
|
27922
28270
|
const { minorSortDir } = this.model;
|
|
27923
28271
|
if (!sortField) {
|
|
27924
|
-
throw new
|
|
28272
|
+
throw new RuntimeModelError66(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
|
|
27925
28273
|
}
|
|
27926
28274
|
if (!minorSortDir) {
|
|
27927
|
-
throw new
|
|
28275
|
+
throw new RuntimeModelError66(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
|
|
27928
28276
|
}
|
|
27929
28277
|
const isAsc = minorSortDir === "ASC";
|
|
27930
28278
|
items.forEach((item) => {
|
|
@@ -28068,7 +28416,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
28068
28416
|
async handleCodeListGroup() {
|
|
28069
28417
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
28070
28418
|
if (!groupCodeListId) {
|
|
28071
|
-
throw new
|
|
28419
|
+
throw new RuntimeModelError66(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
28072
28420
|
}
|
|
28073
28421
|
const { items } = this.state;
|
|
28074
28422
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -28367,7 +28715,7 @@ import {
|
|
|
28367
28715
|
awaitTimeout as awaitTimeout3,
|
|
28368
28716
|
recursiveIterate as recursiveIterate11
|
|
28369
28717
|
} from "@ibiz-template/core";
|
|
28370
|
-
import { clone as
|
|
28718
|
+
import { clone as clone28 } from "ramda";
|
|
28371
28719
|
|
|
28372
28720
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
28373
28721
|
var TreeGridExService = class extends TreeService {
|
|
@@ -28801,7 +29149,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
28801
29149
|
throw new RuntimeError60("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
28802
29150
|
}
|
|
28803
29151
|
if (row.data._deData.srfuf === 1 /* UPDATE */) {
|
|
28804
|
-
row.cacheData =
|
|
29152
|
+
row.cacheData = clone28(row.data);
|
|
28805
29153
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
28806
29154
|
Object.assign(row.data, defaultVal);
|
|
28807
29155
|
}
|
|
@@ -28912,9 +29260,9 @@ var TreeGridExColumnController = class {
|
|
|
28912
29260
|
import {
|
|
28913
29261
|
DataTypes as DataTypes5,
|
|
28914
29262
|
RuntimeError as RuntimeError61,
|
|
28915
|
-
RuntimeModelError as
|
|
29263
|
+
RuntimeModelError as RuntimeModelError67
|
|
28916
29264
|
} from "@ibiz-template/core";
|
|
28917
|
-
import { clone as
|
|
29265
|
+
import { clone as clone29 } from "ramda";
|
|
28918
29266
|
import dayjs6 from "dayjs";
|
|
28919
29267
|
var TreeGridExNodeColumnController = class {
|
|
28920
29268
|
/**
|
|
@@ -28943,7 +29291,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
28943
29291
|
}
|
|
28944
29292
|
);
|
|
28945
29293
|
if (!nodeColumn || !nodeDataItem) {
|
|
28946
|
-
throw new
|
|
29294
|
+
throw new RuntimeModelError67(
|
|
28947
29295
|
nodeModel,
|
|
28948
29296
|
"\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u5BF9\u5E94\u8868\u683C\u5217".concat(this.fieldColumn.name, "\u7684\u6570\u636E\u9879")
|
|
28949
29297
|
);
|
|
@@ -28957,7 +29305,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
28957
29305
|
}
|
|
28958
29306
|
);
|
|
28959
29307
|
if (!nodeEditItem) {
|
|
28960
|
-
throw new
|
|
29308
|
+
throw new RuntimeModelError67(
|
|
28961
29309
|
nodeModel,
|
|
28962
29310
|
"\u6CA1\u6709\u627E\u5230\u5BF9\u5E94\u8868\u683C\u5217".concat(this.fieldColumn.name, "\u7684\u7F16\u8F91\u9879\u6A21\u578B")
|
|
28963
29311
|
);
|
|
@@ -29123,7 +29471,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
29123
29471
|
srfkey: value,
|
|
29124
29472
|
...wfContext
|
|
29125
29473
|
});
|
|
29126
|
-
const tempParams =
|
|
29474
|
+
const tempParams = clone29(this.params);
|
|
29127
29475
|
const { userParam } = this.nodeColumn;
|
|
29128
29476
|
if (userParam) {
|
|
29129
29477
|
const { navigateContexts, navigateParams } = parseUserParams(userParam);
|
|
@@ -29357,7 +29705,7 @@ var TreeGridExFieldColumnController = class extends TreeGridExColumnController {
|
|
|
29357
29705
|
};
|
|
29358
29706
|
|
|
29359
29707
|
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts
|
|
29360
|
-
import { RuntimeModelError as
|
|
29708
|
+
import { RuntimeModelError as RuntimeModelError68 } from "@ibiz-template/core";
|
|
29361
29709
|
var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
29362
29710
|
/**
|
|
29363
29711
|
* 给rowController初始化操作列的状态
|
|
@@ -29371,7 +29719,7 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
|
29371
29719
|
const { deuiactionGroup } = this.model;
|
|
29372
29720
|
if (!deuiactionGroup) {
|
|
29373
29721
|
return;
|
|
29374
|
-
throw new
|
|
29722
|
+
throw new RuntimeModelError68(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
29375
29723
|
}
|
|
29376
29724
|
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
29377
29725
|
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -29425,7 +29773,7 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
|
29425
29773
|
};
|
|
29426
29774
|
|
|
29427
29775
|
// src/controller/control/tree-grid/tree-grid.controller.ts
|
|
29428
|
-
import { RuntimeModelError as
|
|
29776
|
+
import { RuntimeModelError as RuntimeModelError69 } from "@ibiz-template/core";
|
|
29429
29777
|
var TreeGridController = class extends GridController {
|
|
29430
29778
|
constructor() {
|
|
29431
29779
|
super(...arguments);
|
|
@@ -29470,10 +29818,10 @@ var TreeGridController = class extends GridController {
|
|
|
29470
29818
|
return item.treeColumnMode === 2 || item.treeColumnMode === 3;
|
|
29471
29819
|
});
|
|
29472
29820
|
if (!treeGridParent) {
|
|
29473
|
-
throw new
|
|
29821
|
+
throw new RuntimeModelError69(this.model, "\u6811\u8868\u683C\u65E0\u503C\u5217\u6A21\u5F0F");
|
|
29474
29822
|
}
|
|
29475
29823
|
if (!treeGridValue) {
|
|
29476
|
-
throw new
|
|
29824
|
+
throw new RuntimeModelError69(this.model, "\u6811\u8868\u683C\u65E0\u7236\u503C\u5217\u6A21\u5F0F");
|
|
29477
29825
|
}
|
|
29478
29826
|
this.treeGridValueField = treeGridValue.appDEFieldId.toLowerCase();
|
|
29479
29827
|
this.treeGridParentField = treeGridParent.appDEFieldId.toLowerCase();
|
|
@@ -31198,8 +31546,8 @@ var ViewEngineBase = class {
|
|
|
31198
31546
|
};
|
|
31199
31547
|
|
|
31200
31548
|
// src/engine/md-view.engine.ts
|
|
31201
|
-
import { RuntimeModelError as
|
|
31202
|
-
import { clone as
|
|
31549
|
+
import { RuntimeModelError as RuntimeModelError70 } from "@ibiz-template/core";
|
|
31550
|
+
import { clone as clone30 } from "ramda";
|
|
31203
31551
|
var MDViewEngine = class extends ViewEngineBase {
|
|
31204
31552
|
/**
|
|
31205
31553
|
* 多数据部件名称
|
|
@@ -31382,7 +31730,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
31382
31730
|
view: this.view
|
|
31383
31731
|
}));
|
|
31384
31732
|
if (result === -1) {
|
|
31385
|
-
throw new
|
|
31733
|
+
throw new RuntimeModelError70(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
31386
31734
|
} else {
|
|
31387
31735
|
return {
|
|
31388
31736
|
cancel: !result.ok
|
|
@@ -31405,9 +31753,9 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
31405
31753
|
(item) => item.id === "newdata"
|
|
31406
31754
|
);
|
|
31407
31755
|
if (!openAppViewLogic) {
|
|
31408
|
-
throw new
|
|
31756
|
+
throw new RuntimeModelError70(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
31409
31757
|
}
|
|
31410
|
-
const params =
|
|
31758
|
+
const params = clone30(this.view.params);
|
|
31411
31759
|
if (copyMode) {
|
|
31412
31760
|
params.srfcopymode = copyMode;
|
|
31413
31761
|
}
|
|
@@ -31419,7 +31767,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
31419
31767
|
view: this.view
|
|
31420
31768
|
}));
|
|
31421
31769
|
if (result === -1) {
|
|
31422
|
-
throw new
|
|
31770
|
+
throw new RuntimeModelError70(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
31423
31771
|
} else {
|
|
31424
31772
|
return {
|
|
31425
31773
|
cancel: !result.ok
|
|
@@ -31730,13 +32078,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
31730
32078
|
};
|
|
31731
32079
|
|
|
31732
32080
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
31733
|
-
import { RuntimeModelError as
|
|
32081
|
+
import { RuntimeModelError as RuntimeModelError71 } from "@ibiz-template/core";
|
|
31734
32082
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
31735
32083
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31736
32084
|
execute(executeParams) {
|
|
31737
32085
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
31738
32086
|
if (!appDEUILogicId) {
|
|
31739
|
-
throw new
|
|
32087
|
+
throw new RuntimeModelError71(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
31740
32088
|
}
|
|
31741
32089
|
execUILogic(appDEUILogicId, appDataEntityId, executeParams);
|
|
31742
32090
|
}
|
|
@@ -32194,7 +32542,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
32194
32542
|
};
|
|
32195
32543
|
|
|
32196
32544
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
32197
|
-
import { RuntimeError as RuntimeError68, RuntimeModelError as
|
|
32545
|
+
import { RuntimeError as RuntimeError68, RuntimeModelError as RuntimeModelError72 } from "@ibiz-template/core";
|
|
32198
32546
|
var TimerTrigger = class extends LogicTrigger {
|
|
32199
32547
|
constructor() {
|
|
32200
32548
|
super(...arguments);
|
|
@@ -32202,7 +32550,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
32202
32550
|
}
|
|
32203
32551
|
start() {
|
|
32204
32552
|
if (!this.logic.timer) {
|
|
32205
|
-
throw new
|
|
32553
|
+
throw new RuntimeModelError72(this.logic, "\u5B9A\u65F6\u5668\u7F3A\u5C11\u5B9A\u65F6\u95F4\u9694");
|
|
32206
32554
|
}
|
|
32207
32555
|
this.timer = setInterval(() => {
|
|
32208
32556
|
if (!this.scheduler.defaultParamsCb) {
|
|
@@ -32224,7 +32572,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
32224
32572
|
import {
|
|
32225
32573
|
ModelError as ModelError34,
|
|
32226
32574
|
RuntimeError as RuntimeError69,
|
|
32227
|
-
RuntimeModelError as
|
|
32575
|
+
RuntimeModelError as RuntimeModelError73
|
|
32228
32576
|
} from "@ibiz-template/core";
|
|
32229
32577
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
32230
32578
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
@@ -32270,7 +32618,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32270
32618
|
} else {
|
|
32271
32619
|
openViewRef = appUILogic.openDataAppView;
|
|
32272
32620
|
if (!openViewRef) {
|
|
32273
|
-
throw new
|
|
32621
|
+
throw new RuntimeModelError73(
|
|
32274
32622
|
appUILogic,
|
|
32275
32623
|
"opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
|
|
32276
32624
|
);
|
|
@@ -32278,7 +32626,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32278
32626
|
}
|
|
32279
32627
|
const openView = openViewRef.refAppViewId;
|
|
32280
32628
|
if (!openView) {
|
|
32281
|
-
throw new
|
|
32629
|
+
throw new RuntimeModelError73(
|
|
32282
32630
|
appUILogic,
|
|
32283
32631
|
"opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
|
|
32284
32632
|
);
|
|
@@ -32308,7 +32656,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32308
32656
|
);
|
|
32309
32657
|
const typeFileName = appDataEntity.formTypeAppDEFieldId || appDataEntity.dataTypeAppDEFieldId;
|
|
32310
32658
|
if (!typeFileName) {
|
|
32311
|
-
throw new
|
|
32659
|
+
throw new RuntimeModelError73(
|
|
32312
32660
|
appUILogic,
|
|
32313
32661
|
"".concat(appDataEntity.codeName, "[\u591A\u8868\u5355\u5B9E\u4F53] or [\u7D22\u5F15\u5B9E\u4F53]\u7F3A\u5C11\u7C7B\u578B\u5C5E\u6027\u914D\u7F6E")
|
|
32314
32662
|
);
|
|
@@ -32316,7 +32664,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32316
32664
|
const { data } = parameters;
|
|
32317
32665
|
const formTypeValue = data[0][typeFileName];
|
|
32318
32666
|
if (!formTypeValue) {
|
|
32319
|
-
throw new
|
|
32667
|
+
throw new RuntimeModelError73(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
|
|
32320
32668
|
}
|
|
32321
32669
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
32322
32670
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
@@ -32358,7 +32706,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32358
32706
|
return viewRef.refMode.toLowerCase() !== parentDeName;
|
|
32359
32707
|
});
|
|
32360
32708
|
if (!newViewRef) {
|
|
32361
|
-
throw new
|
|
32709
|
+
throw new RuntimeModelError73(
|
|
32362
32710
|
appUILogic,
|
|
32363
32711
|
"\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE"
|
|
32364
32712
|
);
|
|
@@ -32368,7 +32716,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32368
32716
|
} else {
|
|
32369
32717
|
newViewRef = newDataAppView;
|
|
32370
32718
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
32371
|
-
throw new
|
|
32719
|
+
throw new RuntimeModelError73(
|
|
32372
32720
|
appUILogic,
|
|
32373
32721
|
"newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
|
|
32374
32722
|
);
|
|
@@ -32432,7 +32780,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32432
32780
|
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
32433
32781
|
const { context, params, ...rest } = parameters;
|
|
32434
32782
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
32435
|
-
throw new
|
|
32783
|
+
throw new RuntimeModelError73(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
|
|
32436
32784
|
}
|
|
32437
32785
|
const result = await ibiz.commands.execute(
|
|
32438
32786
|
OpenAppViewCommand.TAG,
|
|
@@ -32483,7 +32831,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32483
32831
|
const minorDERs = selfDe.minorAppDERSs;
|
|
32484
32832
|
const pickParentDeName = newViewRef.refMode.toLowerCase();
|
|
32485
32833
|
if (!minorDERs) {
|
|
32486
|
-
throw new
|
|
32834
|
+
throw new RuntimeModelError73(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
|
|
32487
32835
|
}
|
|
32488
32836
|
let pickParentFieldName = "";
|
|
32489
32837
|
minorDERs == null ? void 0 : minorDERs.forEach((item) => {
|
|
@@ -32580,12 +32928,12 @@ var ControlEventTrigger = class extends LogicTrigger {
|
|
|
32580
32928
|
};
|
|
32581
32929
|
|
|
32582
32930
|
// src/logic-scheduler/executor/app-ui-action-executor.ts
|
|
32583
|
-
import { RuntimeModelError as
|
|
32931
|
+
import { RuntimeModelError as RuntimeModelError74 } from "@ibiz-template/core";
|
|
32584
32932
|
var AppDEUIActionExecutor = class extends LogicExecutor {
|
|
32585
32933
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32586
32934
|
execute(executeParams) {
|
|
32587
32935
|
if (!this.logic.appDEUIActionId) {
|
|
32588
|
-
throw new
|
|
32936
|
+
throw new RuntimeModelError74(
|
|
32589
32937
|
this.logic,
|
|
32590
32938
|
"\u903B\u8F91\u4E2D\u7F3A\u5C11\u89E6\u53D1\u5E94\u7528\u5B9E\u4F53\u754C\u9762\u884C\u4E3Aid"
|
|
32591
32939
|
);
|