@ibiz-template/runtime 0.5.3-beta.7 → 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 +654 -314
- 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 -3
- package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
- package/out/service/dto/method.dto.d.ts +1 -3
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +1 -8
- package/out/service/service/entity/de.service.d.ts +1 -2
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +5 -2
- package/out/service/service/entity/method/de-action.d.ts +13 -1
- package/out/service/service/entity/method/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +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/service/entity/method/method-renturn.d.ts.map +1 -1
- package/out/service/service/entity/method/method-renturn.js +6 -0
- package/out/service/utils/de-cache/de-cache.d.ts +11 -1
- package/out/service/utils/de-cache/de-cache.d.ts.map +1 -1
- package/out/service/utils/de-cache/de-cache.js +122 -18
- package/out/service/utils/de-dq-cond/ps-model-cond-engine-base.d.ts.map +1 -1
- package/out/service/utils/de-dq-cond/ps-model-cond-engine-base.js +4 -0
- package/out/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 -3
- package/src/service/dto/method.dto.ts +0 -7
- package/src/service/service/entity/de.service.ts +7 -9
- package/src/service/service/entity/method/de-action.ts +182 -61
- package/src/service/service/entity/method/fetch.ts +2 -4
- package/src/service/service/entity/method/method-renturn.ts +6 -0
- package/src/service/utils/de-cache/de-cache.ts +128 -19
- package/src/service/utils/de-dq-cond/ps-model-cond-engine-base.ts +4 -0
- package/src/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
|
|
@@ -6013,14 +6222,12 @@ var MethodDto = class {
|
|
|
6013
6222
|
* @param {IAppDataEntity} entity
|
|
6014
6223
|
* @param {boolean} [isLocalMode]
|
|
6015
6224
|
* @param {IAppDEMethodDTO} [dto]
|
|
6016
|
-
* @param {boolean} [inSelfLoop] 是否在自关系循环中
|
|
6017
6225
|
*/
|
|
6018
|
-
constructor(service, entity, isLocalMode, dto
|
|
6226
|
+
constructor(service, entity, isLocalMode, dto) {
|
|
6019
6227
|
this.service = service;
|
|
6020
6228
|
this.entity = entity;
|
|
6021
6229
|
this.isLocalMode = isLocalMode;
|
|
6022
6230
|
this.dto = dto;
|
|
6023
|
-
this.inSelfLoop = inSelfLoop;
|
|
6024
6231
|
this.dtoMap = /* @__PURE__ */ new Map();
|
|
6025
6232
|
if (dto) {
|
|
6026
6233
|
this.app = ibiz.hub.getApp(entity.appId);
|
|
@@ -6150,9 +6357,6 @@ var MethodDto = class {
|
|
|
6150
6357
|
* @return {*} {Promise<IDataEntity[]>}
|
|
6151
6358
|
*/
|
|
6152
6359
|
async sets(context, data) {
|
|
6153
|
-
if (this.isLocalMode && !this.inSelfLoop) {
|
|
6154
|
-
this.service.local.clear();
|
|
6155
|
-
}
|
|
6156
6360
|
const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
|
|
6157
6361
|
if (uiDomain && uiDomain.state.rsInit !== true) {
|
|
6158
6362
|
await this.calcRs(context);
|
|
@@ -6252,12 +6456,10 @@ var MethodDto = class {
|
|
|
6252
6456
|
entity.appDEMethodDTOs || [],
|
|
6253
6457
|
field.refAppDEMethodDTOId
|
|
6254
6458
|
);
|
|
6255
|
-
const inSelfLoop = this.entity.codeName === entity.codeName;
|
|
6256
6459
|
const service = await this.app.deService.getService(context, entity.id);
|
|
6257
6460
|
service.isLocalMode = true;
|
|
6258
6461
|
const dto = service.createMethodDto(methodDto, {
|
|
6259
|
-
isLocalMode: true
|
|
6260
|
-
inSelfLoop
|
|
6462
|
+
isLocalMode: true
|
|
6261
6463
|
});
|
|
6262
6464
|
this.dtoMap.set(field.codeName, dto);
|
|
6263
6465
|
return dto;
|
|
@@ -6319,6 +6521,9 @@ var DEService = class {
|
|
|
6319
6521
|
return this.methodMap.get(cacheId);
|
|
6320
6522
|
}
|
|
6321
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
|
+
}
|
|
6322
6527
|
const provider = await getDEMethodProvider(model);
|
|
6323
6528
|
if (!provider) {
|
|
6324
6529
|
throw new ModelError7(model, "\u672A\u652F\u6301\u7684\u670D\u52A1\u65B9\u6CD5\u7C7B\u578B: ".concat(model.methodType));
|
|
@@ -6503,13 +6708,7 @@ var DEService = class {
|
|
|
6503
6708
|
this.local.clear();
|
|
6504
6709
|
}
|
|
6505
6710
|
createMethodDto(dto, opts) {
|
|
6506
|
-
return new MethodDto(
|
|
6507
|
-
this,
|
|
6508
|
-
this.model,
|
|
6509
|
-
opts == null ? void 0 : opts.isLocalMode,
|
|
6510
|
-
dto,
|
|
6511
|
-
opts == null ? void 0 : opts.inSelfLoop
|
|
6512
|
-
);
|
|
6711
|
+
return new MethodDto(this, this.model, opts == null ? void 0 : opts.isLocalMode, dto);
|
|
6513
6712
|
}
|
|
6514
6713
|
};
|
|
6515
6714
|
|
|
@@ -7312,12 +7511,14 @@ import {
|
|
|
7312
7511
|
HttpError as HttpError5,
|
|
7313
7512
|
HttpResponse as HttpResponse3,
|
|
7314
7513
|
RuntimeError as RuntimeError21,
|
|
7315
|
-
RuntimeModelError as
|
|
7514
|
+
RuntimeModelError as RuntimeModelError22
|
|
7316
7515
|
} from "@ibiz-template/core";
|
|
7317
7516
|
import { isArray as isArray6, isNil as isNil10 } from "lodash-es";
|
|
7517
|
+
import { ascSort } from "qx-util";
|
|
7518
|
+
import { clone as clone14 } from "ramda";
|
|
7318
7519
|
|
|
7319
7520
|
// src/service/service/entity/method/method.ts
|
|
7320
|
-
import { RuntimeModelError as
|
|
7521
|
+
import { RuntimeModelError as RuntimeModelError11 } from "@ibiz-template/core";
|
|
7321
7522
|
|
|
7322
7523
|
// src/service/service/entity/method/method-input.ts
|
|
7323
7524
|
var MethodInput = class {
|
|
@@ -7408,6 +7609,11 @@ var MethodReturn = class {
|
|
|
7408
7609
|
*/
|
|
7409
7610
|
async handle(context, data) {
|
|
7410
7611
|
if (this.dto) {
|
|
7612
|
+
const app = ibiz.hub.getApp(this.entity.appId);
|
|
7613
|
+
app.deService.clearTempCache({
|
|
7614
|
+
srfappid: app.appId,
|
|
7615
|
+
srfsessionid: context.srfsessionid
|
|
7616
|
+
});
|
|
7411
7617
|
const items = await this.dto.sets(context, [data]);
|
|
7412
7618
|
return items[0];
|
|
7413
7619
|
}
|
|
@@ -7483,17 +7689,17 @@ var Method = class {
|
|
|
7483
7689
|
break;
|
|
7484
7690
|
default:
|
|
7485
7691
|
if (requestMethod) {
|
|
7486
|
-
throw new
|
|
7692
|
+
throw new RuntimeModelError11(
|
|
7487
7693
|
this.method,
|
|
7488
7694
|
"\u672A\u652F\u6301\u7684\u8BF7\u6C42\u65B9\u5F0F: ".concat(requestMethod)
|
|
7489
7695
|
);
|
|
7490
7696
|
} else {
|
|
7491
|
-
throw new
|
|
7697
|
+
throw new RuntimeModelError11(this.method, "\u672A\u914D\u7F6E\u8BF7\u6C42\u65B9\u5F0F");
|
|
7492
7698
|
}
|
|
7493
7699
|
}
|
|
7494
7700
|
return res;
|
|
7495
7701
|
}
|
|
7496
|
-
throw new
|
|
7702
|
+
throw new RuntimeModelError11(this.method, "\u672A\u652F\u6301\u7684\u884C\u4E3A\u7C7B\u578B[".concat(actionType, "]"));
|
|
7497
7703
|
}
|
|
7498
7704
|
mergeRequestPath(path2, methodName) {
|
|
7499
7705
|
return "".concat(path2, "/").concat(methodName);
|
|
@@ -7531,7 +7737,7 @@ import { isArray as isArray5 } from "lodash-es";
|
|
|
7531
7737
|
import { clone as clone13 } from "ramda";
|
|
7532
7738
|
|
|
7533
7739
|
// src/de-logic/de-logic.ts
|
|
7534
|
-
import { ModelError as ModelError13, RuntimeModelError as
|
|
7740
|
+
import { ModelError as ModelError13, RuntimeModelError as RuntimeModelError21 } from "@ibiz-template/core";
|
|
7535
7741
|
|
|
7536
7742
|
// src/de-logic/de-logic-context.ts
|
|
7537
7743
|
import { isArray as isArray4 } from "lodash-es";
|
|
@@ -7663,17 +7869,17 @@ var DELogicContext = class {
|
|
|
7663
7869
|
};
|
|
7664
7870
|
|
|
7665
7871
|
// src/de-logic/de-logic-node/de-action-node/de-action-node.ts
|
|
7666
|
-
import { RuntimeModelError as
|
|
7872
|
+
import { RuntimeModelError as RuntimeModelError14 } from "@ibiz-template/core";
|
|
7667
7873
|
|
|
7668
7874
|
// src/de-logic/de-logic-link/de-logic-link-group-cond/de-logic-link-group-cond.ts
|
|
7669
|
-
import { RuntimeModelError as
|
|
7875
|
+
import { RuntimeModelError as RuntimeModelError13 } from "@ibiz-template/core";
|
|
7670
7876
|
|
|
7671
7877
|
// src/de-logic/de-logic-link/de-logic-link-cond/de-logic-link-cond.ts
|
|
7672
7878
|
var DELogicLinkCond = class {
|
|
7673
7879
|
};
|
|
7674
7880
|
|
|
7675
7881
|
// src/de-logic/de-logic-link/de-logic-link-single-cond/de-logic-link-single-cond.ts
|
|
7676
|
-
import { ModelError as ModelError8, RuntimeModelError as
|
|
7882
|
+
import { ModelError as ModelError8, RuntimeModelError as RuntimeModelError12 } from "@ibiz-template/core";
|
|
7677
7883
|
var DELogicLinkSingleCond = class extends DELogicLinkCond {
|
|
7678
7884
|
constructor(model) {
|
|
7679
7885
|
super();
|
|
@@ -7720,7 +7926,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
|
|
|
7720
7926
|
switch (this.type) {
|
|
7721
7927
|
case "ENTITYFIELD": {
|
|
7722
7928
|
if (!this.value) {
|
|
7723
|
-
throw new
|
|
7929
|
+
throw new RuntimeModelError12(
|
|
7724
7930
|
this.model,
|
|
7725
7931
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
7726
7932
|
);
|
|
@@ -7730,7 +7936,7 @@ var DELogicLinkSingleCond = class extends DELogicLinkCond {
|
|
|
7730
7936
|
}
|
|
7731
7937
|
case "SRCENTITYFIELD": {
|
|
7732
7938
|
if (!this.value) {
|
|
7733
|
-
throw new
|
|
7939
|
+
throw new RuntimeModelError12(
|
|
7734
7940
|
this.model,
|
|
7735
7941
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
7736
7942
|
);
|
|
@@ -7793,7 +7999,7 @@ var DELogicLinkGroupCond = class _DELogicLinkGroupCond extends DELogicLinkCond {
|
|
|
7793
7999
|
test(ctx, context, data) {
|
|
7794
8000
|
let bol = true;
|
|
7795
8001
|
if (this.conds.length === 0) {
|
|
7796
|
-
throw new
|
|
8002
|
+
throw new RuntimeModelError13(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
|
|
7797
8003
|
}
|
|
7798
8004
|
for (let i = 0; i < this.conds.length; i++) {
|
|
7799
8005
|
const cond = this.conds[i];
|
|
@@ -7896,10 +8102,10 @@ var DEActionNode = class extends DELogicNode {
|
|
|
7896
8102
|
retDELogicParamId
|
|
7897
8103
|
} = this.model;
|
|
7898
8104
|
if (!dstAppDataEntityId) {
|
|
7899
|
-
throw new
|
|
8105
|
+
throw new RuntimeModelError14(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
|
|
7900
8106
|
}
|
|
7901
8107
|
if (!dstAppDEActionId) {
|
|
7902
|
-
throw new
|
|
8108
|
+
throw new RuntimeModelError14(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
|
|
7903
8109
|
}
|
|
7904
8110
|
const requestData = ctx.params[dstDELogicParamId];
|
|
7905
8111
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
@@ -8192,12 +8398,12 @@ var DataSetNode = class extends DELogicNode {
|
|
|
8192
8398
|
};
|
|
8193
8399
|
|
|
8194
8400
|
// src/de-logic/de-logic-node/bind-param-node/bind-param-node.ts
|
|
8195
|
-
import { RuntimeModelError as
|
|
8401
|
+
import { RuntimeModelError as RuntimeModelError15 } from "@ibiz-template/core";
|
|
8196
8402
|
var BindParamNode = class extends DELogicNode {
|
|
8197
8403
|
async exec(ctx) {
|
|
8198
8404
|
const { dstDELogicParamId, srcDELogicParamId } = this.model;
|
|
8199
8405
|
if (!dstDELogicParamId || !srcDELogicParamId) {
|
|
8200
|
-
throw new
|
|
8406
|
+
throw new RuntimeModelError15(
|
|
8201
8407
|
this.model,
|
|
8202
8408
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
8203
8409
|
);
|
|
@@ -8208,37 +8414,37 @@ var BindParamNode = class extends DELogicNode {
|
|
|
8208
8414
|
};
|
|
8209
8415
|
|
|
8210
8416
|
// src/de-logic/de-logic-node/reset-param-node/reset-param-node.ts
|
|
8211
|
-
import { RuntimeModelError as
|
|
8417
|
+
import { RuntimeModelError as RuntimeModelError16 } from "@ibiz-template/core";
|
|
8212
8418
|
var ResetParamNode = class extends DELogicNode {
|
|
8213
8419
|
async exec(ctx) {
|
|
8214
8420
|
const { dstDELogicParamId } = this.model;
|
|
8215
8421
|
if (!dstDELogicParamId) {
|
|
8216
|
-
throw new
|
|
8422
|
+
throw new RuntimeModelError16(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
8217
8423
|
}
|
|
8218
8424
|
ctx.resetParam(dstDELogicParamId);
|
|
8219
8425
|
}
|
|
8220
8426
|
};
|
|
8221
8427
|
|
|
8222
8428
|
// src/de-logic/de-logic-node/renew-param-node/renew-param-node.ts
|
|
8223
|
-
import { RuntimeModelError as
|
|
8429
|
+
import { RuntimeModelError as RuntimeModelError17 } from "@ibiz-template/core";
|
|
8224
8430
|
var RenewParamNode = class extends DELogicNode {
|
|
8225
8431
|
async exec(ctx) {
|
|
8226
8432
|
const { dstDELogicParamId } = this.model;
|
|
8227
8433
|
if (!dstDELogicParamId) {
|
|
8228
|
-
throw new
|
|
8434
|
+
throw new RuntimeModelError17(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
8229
8435
|
}
|
|
8230
8436
|
ctx.renewParam(dstDELogicParamId);
|
|
8231
8437
|
}
|
|
8232
8438
|
};
|
|
8233
8439
|
|
|
8234
8440
|
// src/de-logic/de-logic-node/copy-param-node/copy-param-node.ts
|
|
8235
|
-
import { RuntimeModelError as
|
|
8441
|
+
import { RuntimeModelError as RuntimeModelError18 } from "@ibiz-template/core";
|
|
8236
8442
|
import { clone as clone11 } from "ramda";
|
|
8237
8443
|
var CopyParamNode = class extends DELogicNode {
|
|
8238
8444
|
async exec(ctx) {
|
|
8239
8445
|
const { dstDELogicParamId, srcDELogicParamId } = this.model;
|
|
8240
8446
|
if (!dstDELogicParamId || !srcDELogicParamId) {
|
|
8241
|
-
throw new
|
|
8447
|
+
throw new RuntimeModelError18(
|
|
8242
8448
|
this.model,
|
|
8243
8449
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
8244
8450
|
);
|
|
@@ -8249,12 +8455,12 @@ var CopyParamNode = class extends DELogicNode {
|
|
|
8249
8455
|
};
|
|
8250
8456
|
|
|
8251
8457
|
// src/de-logic/de-logic-node/sort-param-node/sort-param-node.ts
|
|
8252
|
-
import { RuntimeModelError as
|
|
8458
|
+
import { RuntimeModelError as RuntimeModelError19 } from "@ibiz-template/core";
|
|
8253
8459
|
var SortParamNode = class extends DELogicNode {
|
|
8254
8460
|
async exec(ctx) {
|
|
8255
8461
|
const { dstDELogicParamId, dstSortDir, dstFieldName } = this.model;
|
|
8256
8462
|
if (!dstDELogicParamId || !dstFieldName) {
|
|
8257
|
-
throw new
|
|
8463
|
+
throw new RuntimeModelError19(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
|
|
8258
8464
|
}
|
|
8259
8465
|
const key = dstFieldName.toLowerCase();
|
|
8260
8466
|
const arr = ctx.params[dstDELogicParamId];
|
|
@@ -8265,7 +8471,7 @@ var SortParamNode = class extends DELogicNode {
|
|
|
8265
8471
|
};
|
|
8266
8472
|
|
|
8267
8473
|
// src/de-logic/de-logic-node/append-param-node/append-param-node.ts
|
|
8268
|
-
import { RuntimeModelError as
|
|
8474
|
+
import { RuntimeModelError as RuntimeModelError20 } from "@ibiz-template/core";
|
|
8269
8475
|
var AppendParamNode = class extends DELogicNode {
|
|
8270
8476
|
async exec(ctx) {
|
|
8271
8477
|
const {
|
|
@@ -8276,7 +8482,7 @@ var AppendParamNode = class extends DELogicNode {
|
|
|
8276
8482
|
srcSize
|
|
8277
8483
|
} = this.model;
|
|
8278
8484
|
if (!dstDELogicParamId || !srcDELogicParamId) {
|
|
8279
|
-
throw new
|
|
8485
|
+
throw new RuntimeModelError20(
|
|
8280
8486
|
this.model,
|
|
8281
8487
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
8282
8488
|
);
|
|
@@ -8425,7 +8631,7 @@ var DELogic = class {
|
|
|
8425
8631
|
var _a, _b;
|
|
8426
8632
|
if (model.customCode) {
|
|
8427
8633
|
if (!model.scriptCode) {
|
|
8428
|
-
throw new
|
|
8634
|
+
throw new RuntimeModelError21(model, "\u811A\u672C\u4EE3\u7801\u6A21\u5F0F\u6CA1\u6709\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
8429
8635
|
}
|
|
8430
8636
|
this.scriptFn = ScriptFactory.createScriptFn([], model.scriptCode, {
|
|
8431
8637
|
isAsync: true
|
|
@@ -8433,7 +8639,7 @@ var DELogic = class {
|
|
|
8433
8639
|
return;
|
|
8434
8640
|
}
|
|
8435
8641
|
if (!((_a = model.delogicNodes) == null ? void 0 : _a.length)) {
|
|
8436
|
-
throw new
|
|
8642
|
+
throw new RuntimeModelError21(model, "\u5B9E\u4F53\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
8437
8643
|
}
|
|
8438
8644
|
model.delogicNodes.forEach((node) => {
|
|
8439
8645
|
const { logicNodeType } = node;
|
|
@@ -8532,7 +8738,7 @@ var DELogic = class {
|
|
|
8532
8738
|
const start = this.nodes.get(startDELogicNodeId);
|
|
8533
8739
|
await this.deepExec(start, ctx);
|
|
8534
8740
|
} else {
|
|
8535
|
-
throw new
|
|
8741
|
+
throw new RuntimeModelError21(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
8536
8742
|
}
|
|
8537
8743
|
if (ctx.isEndNode) {
|
|
8538
8744
|
return ctx.result;
|
|
@@ -8651,66 +8857,64 @@ var DEActionMethod = class extends Method {
|
|
|
8651
8857
|
return this.input.handle(context, data);
|
|
8652
8858
|
}
|
|
8653
8859
|
async exec(context, data, params) {
|
|
8654
|
-
|
|
8860
|
+
let result;
|
|
8861
|
+
if (data && !["READ", "GETDRAFT"].includes(this.method.actionMode)) {
|
|
8655
8862
|
await execFieldLogics(this.entity, "change", context, data, params);
|
|
8656
8863
|
}
|
|
8657
8864
|
if (this.method.actionType === "DELOGIC") {
|
|
8658
8865
|
const deLogic = findDELogic(this.method.appDELogicId, this.entity);
|
|
8659
8866
|
if (!deLogic) {
|
|
8660
|
-
throw new
|
|
8867
|
+
throw new RuntimeModelError22(this.method, "\u7F3A\u5C11\u5B9E\u4F53\u5904\u7406\u903B\u8F91");
|
|
8661
8868
|
}
|
|
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
|
-
|
|
8699
|
-
|
|
8700
|
-
|
|
8701
|
-
|
|
8702
|
-
|
|
8703
|
-
|
|
8704
|
-
|
|
8705
|
-
|
|
8706
|
-
if (isNil10(srfkey)) {
|
|
8707
|
-
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);
|
|
8708
8913
|
}
|
|
8709
|
-
|
|
8914
|
+
const res = await this.request(path2, context, data, params);
|
|
8915
|
+
res.data = await this.result.handle(context, res.data);
|
|
8916
|
+
result = res;
|
|
8710
8917
|
}
|
|
8711
|
-
const res = await this.request(path2, context, data, params);
|
|
8712
|
-
res.data = await this.result.handle(context, res.data);
|
|
8713
|
-
result = res;
|
|
8714
8918
|
}
|
|
8715
8919
|
}
|
|
8716
8920
|
if (result.data) {
|
|
@@ -8898,6 +9102,13 @@ var DEActionMethod = class extends Method {
|
|
|
8898
9102
|
if (!key && context) {
|
|
8899
9103
|
key = context[this.entity.codeName.toLowerCase()];
|
|
8900
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
|
+
}
|
|
8901
9112
|
const data = this.service.local.delete(context, key);
|
|
8902
9113
|
if (data) {
|
|
8903
9114
|
return new HttpResponse3(data);
|
|
@@ -8907,6 +9118,100 @@ var DEActionMethod = class extends Method {
|
|
|
8907
9118
|
throw new HttpError5(err);
|
|
8908
9119
|
}
|
|
8909
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
|
+
}
|
|
8910
9215
|
/**
|
|
8911
9216
|
* 更新临时数据
|
|
8912
9217
|
*
|
|
@@ -9020,21 +9325,19 @@ var DeActionDeMethodProvider = class {
|
|
|
9020
9325
|
import {
|
|
9021
9326
|
HttpResponse as HttpResponse4,
|
|
9022
9327
|
ModelError as ModelError14,
|
|
9023
|
-
RuntimeModelError as
|
|
9328
|
+
RuntimeModelError as RuntimeModelError23
|
|
9024
9329
|
} from "@ibiz-template/core";
|
|
9025
9330
|
import { isArray as isArray7 } from "lodash-es";
|
|
9026
|
-
import { clone as
|
|
9027
|
-
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";
|
|
9028
9333
|
var FetchMethod = class extends Method {
|
|
9029
9334
|
async exec(context, params, params2) {
|
|
9030
9335
|
const searchParams = params && !isArray7(params) ? params : params2 || {};
|
|
9031
9336
|
let res;
|
|
9032
9337
|
if (this.isLocalMode) {
|
|
9033
9338
|
const cond = DEDQCondUtil.getCond(this.method);
|
|
9034
|
-
const
|
|
9035
|
-
|
|
9036
|
-
new SearchFilter(context, searchParams)
|
|
9037
|
-
);
|
|
9339
|
+
const filter = new SearchFilter(context, searchParams);
|
|
9340
|
+
const items = await this.searchLocal(cond, filter);
|
|
9038
9341
|
res = new HttpResponse4(items, 200);
|
|
9039
9342
|
} else {
|
|
9040
9343
|
switch (this.method.dataSetType) {
|
|
@@ -9106,13 +9409,13 @@ var FetchMethod = class extends Method {
|
|
|
9106
9409
|
if (filter.sortMode === "DESC") {
|
|
9107
9410
|
list = descSort(list, filter.sortField);
|
|
9108
9411
|
} else {
|
|
9109
|
-
list =
|
|
9412
|
+
list = ascSort2(list, filter.sortField);
|
|
9110
9413
|
}
|
|
9111
9414
|
}
|
|
9112
9415
|
const { page, size } = filter;
|
|
9113
9416
|
const start = page * size;
|
|
9114
9417
|
const end = (page + 1) * size - 1;
|
|
9115
|
-
const items = list.slice(start, end).map((item) =>
|
|
9418
|
+
const items = list.slice(start, end).map((item) => clone15(item));
|
|
9116
9419
|
return items;
|
|
9117
9420
|
}
|
|
9118
9421
|
/**
|
|
@@ -9126,7 +9429,7 @@ var FetchMethod = class extends Method {
|
|
|
9126
9429
|
async fetchCodeListSet(context, params) {
|
|
9127
9430
|
const { appCodeListId } = this.method;
|
|
9128
9431
|
if (!appCodeListId) {
|
|
9129
|
-
throw new
|
|
9432
|
+
throw new RuntimeModelError23(this.method, "\u6CA1\u6709\u6307\u5B9A\u6570\u636E\u6765\u6E90\u4EE3\u7801\u8868");
|
|
9130
9433
|
}
|
|
9131
9434
|
const codeItems = await this.app.codeList.get(
|
|
9132
9435
|
appCodeListId,
|
|
@@ -9240,7 +9543,7 @@ var TreeCodeListNodeData = class extends TreeNodeData {
|
|
|
9240
9543
|
|
|
9241
9544
|
// src/service/vo/tree-node-data/tree-data-set-node-data.ts
|
|
9242
9545
|
import { updateKeyDefine } from "@ibiz-template/core";
|
|
9243
|
-
import { clone as
|
|
9546
|
+
import { clone as clone16, isNil as isNil12 } from "ramda";
|
|
9244
9547
|
var CloneExcludeKeys = ["_id", "_value", "_text", "_deData", "clone"];
|
|
9245
9548
|
var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
9246
9549
|
constructor(model, parentNodeData, opts) {
|
|
@@ -9321,7 +9624,7 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
|
9321
9624
|
}
|
|
9322
9625
|
};
|
|
9323
9626
|
this.clone = () => {
|
|
9324
|
-
const cloneData =
|
|
9627
|
+
const cloneData = clone16(this._deData);
|
|
9325
9628
|
const cloneNodeData = new _TreeDataSetNodeData(model, this._parent, {
|
|
9326
9629
|
data: cloneData,
|
|
9327
9630
|
leaf: this._leaf,
|
|
@@ -10139,7 +10442,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
10139
10442
|
* @return {*} {(Promise<IModalData | void>)}
|
|
10140
10443
|
*/
|
|
10141
10444
|
async exec(appViewId, _context, params = {}, opts = {}) {
|
|
10142
|
-
const context =
|
|
10445
|
+
const context = clone17(_context);
|
|
10143
10446
|
const appView = await ibiz.hub.config.view.get(appViewId);
|
|
10144
10447
|
if (!appView) {
|
|
10145
10448
|
throw new RuntimeError23("\u5E94\u7528\u89C6\u56FE[".concat(appViewId, "]\u4E0D\u5B58\u5728"));
|
|
@@ -11883,7 +12186,7 @@ var BaseController = class {
|
|
|
11883
12186
|
};
|
|
11884
12187
|
|
|
11885
12188
|
// src/controller/utils/view-msg/view-msg-controller.ts
|
|
11886
|
-
import { RuntimeError as RuntimeError31, RuntimeModelError as
|
|
12189
|
+
import { RuntimeError as RuntimeError31, RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
|
|
11887
12190
|
import { isNil as isNil18, mergeRight as mergeRight2 } from "ramda";
|
|
11888
12191
|
var ViewMsgController = class _ViewMsgController {
|
|
11889
12192
|
constructor(msgGroupId) {
|
|
@@ -11948,7 +12251,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
11948
12251
|
static async fetchDataSet(msgModel, context, params) {
|
|
11949
12252
|
const { appDataEntityId, appDEDataSetId } = msgModel;
|
|
11950
12253
|
if (!appDEDataSetId) {
|
|
11951
|
-
throw new
|
|
12254
|
+
throw new RuntimeModelError24(msgModel, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6570\u636E\u96C6");
|
|
11952
12255
|
}
|
|
11953
12256
|
const res = await ibiz.hub.getApp(context.srfappid).deService.exec(appDataEntityId, appDEDataSetId, context, params);
|
|
11954
12257
|
if (res.data.length) {
|
|
@@ -12042,7 +12345,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
12042
12345
|
msgPosAppDEFieldId
|
|
12043
12346
|
} = msgModel;
|
|
12044
12347
|
if (!appDataEntityId) {
|
|
12045
|
-
throw new
|
|
12348
|
+
throw new RuntimeModelError24(msgModel, "\u672A\u914D\u7F6E\u5E94\u7528\u5B9E\u4F53");
|
|
12046
12349
|
}
|
|
12047
12350
|
const entity = await ibiz.hub.getAppDataEntity(
|
|
12048
12351
|
appDataEntityId,
|
|
@@ -12670,7 +12973,7 @@ var EditorController = class {
|
|
|
12670
12973
|
};
|
|
12671
12974
|
|
|
12672
12975
|
// src/controller/common/editor/code-list-editor.controller.ts
|
|
12673
|
-
import { RuntimeModelError as
|
|
12976
|
+
import { RuntimeModelError as RuntimeModelError25 } from "@ibiz-template/core";
|
|
12674
12977
|
var CodeListEditorController = class extends EditorController {
|
|
12675
12978
|
/**
|
|
12676
12979
|
* 加载代码表数据
|
|
@@ -12694,7 +12997,7 @@ var CodeListEditorController = class extends EditorController {
|
|
|
12694
12997
|
);
|
|
12695
12998
|
return dataItems;
|
|
12696
12999
|
}
|
|
12697
|
-
throw new
|
|
13000
|
+
throw new RuntimeModelError25(
|
|
12698
13001
|
this.model,
|
|
12699
13002
|
"\u7F16\u8F91\u5668\u7C7B\u578B[".concat(this.model.editorType, "]\uFF0C\u672A\u914D\u7F6E\u4EE3\u7801\u8868")
|
|
12700
13003
|
);
|
|
@@ -12703,7 +13006,7 @@ var CodeListEditorController = class extends EditorController {
|
|
|
12703
13006
|
|
|
12704
13007
|
// src/controller/common/control/control.controller.ts
|
|
12705
13008
|
import { IBizContext as IBizContext3, IBizParams, NoticeError as NoticeError2 } from "@ibiz-template/core";
|
|
12706
|
-
import { clone as
|
|
13009
|
+
import { clone as clone18, isNil as isNil20 } from "ramda";
|
|
12707
13010
|
import { notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
12708
13011
|
var ControlController = class extends BaseController {
|
|
12709
13012
|
/**
|
|
@@ -12745,7 +13048,7 @@ var ControlController = class extends BaseController {
|
|
|
12745
13048
|
"".concat(model.controlType, "_DEFAULT")
|
|
12746
13049
|
);
|
|
12747
13050
|
if (panelModel) {
|
|
12748
|
-
this.controlPanel =
|
|
13051
|
+
this.controlPanel = clone18(panelModel);
|
|
12749
13052
|
}
|
|
12750
13053
|
}
|
|
12751
13054
|
this.updateContextParams({});
|
|
@@ -13497,7 +13800,7 @@ var MDControlController = class extends ControlController {
|
|
|
13497
13800
|
import {
|
|
13498
13801
|
findRecursiveChild,
|
|
13499
13802
|
RuntimeError as RuntimeError34,
|
|
13500
|
-
RuntimeModelError as
|
|
13803
|
+
RuntimeModelError as RuntimeModelError26
|
|
13501
13804
|
} from "@ibiz-template/core";
|
|
13502
13805
|
var AppMenuController = class extends ControlController {
|
|
13503
13806
|
constructor(model, context, params, ctx) {
|
|
@@ -13576,7 +13879,7 @@ var AppMenuController = class extends ControlController {
|
|
|
13576
13879
|
return provider.onClick(menuItem, event, this);
|
|
13577
13880
|
}
|
|
13578
13881
|
if (!menuItem.appFuncId) {
|
|
13579
|
-
throw new
|
|
13882
|
+
throw new RuntimeModelError26(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
|
|
13580
13883
|
}
|
|
13581
13884
|
const tempContext = this.context.clone();
|
|
13582
13885
|
tempContext.srfappid = menuItem.appId;
|
|
@@ -13695,7 +13998,7 @@ var AppMenuController = class extends ControlController {
|
|
|
13695
13998
|
import {
|
|
13696
13999
|
findRecursiveChild as findRecursiveChild2,
|
|
13697
14000
|
RuntimeError as RuntimeError35,
|
|
13698
|
-
RuntimeModelError as
|
|
14001
|
+
RuntimeModelError as RuntimeModelError27
|
|
13699
14002
|
} from "@ibiz-template/core";
|
|
13700
14003
|
var AppMenuIconViewController = class extends AppMenuController {
|
|
13701
14004
|
async onClickMenuItem(id, event) {
|
|
@@ -13711,7 +14014,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
13711
14014
|
event
|
|
13712
14015
|
});
|
|
13713
14016
|
if (!menuItem.appFuncId) {
|
|
13714
|
-
throw new
|
|
14017
|
+
throw new RuntimeModelError27(menuItem, "\u6CA1\u6709\u914D\u7F6E\u5E94\u7528\u529F\u80FD");
|
|
13715
14018
|
}
|
|
13716
14019
|
const tempContext = this.context.clone();
|
|
13717
14020
|
if (this.routeDepth === 1) {
|
|
@@ -14007,17 +14310,17 @@ import { mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
|
14007
14310
|
import { RuntimeError as RuntimeError37 } from "@ibiz-template/core";
|
|
14008
14311
|
|
|
14009
14312
|
// src/controller/control/chart/generator/line-series-generator.ts
|
|
14010
|
-
import { RuntimeModelError as
|
|
14313
|
+
import { RuntimeModelError as RuntimeModelError29 } from "@ibiz-template/core";
|
|
14011
14314
|
|
|
14012
14315
|
// src/controller/control/chart/generator/base-series-generator.ts
|
|
14013
|
-
import { plus, RuntimeModelError as
|
|
14316
|
+
import { plus, RuntimeModelError as RuntimeModelError28, toNumberOrNil } from "@ibiz-template/core";
|
|
14014
14317
|
import dayjs4 from "dayjs";
|
|
14015
14318
|
import minMax from "dayjs/plugin/minMax";
|
|
14016
14319
|
import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
14017
14320
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
14018
14321
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
14019
14322
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
14020
|
-
import { clone as
|
|
14323
|
+
import { clone as clone19, isNil as isNil21, mergeDeepRight } from "ramda";
|
|
14021
14324
|
dayjs4.extend(minMax);
|
|
14022
14325
|
dayjs4.extend(isSameOrBefore);
|
|
14023
14326
|
dayjs4.extend(quarterOfYear);
|
|
@@ -14060,10 +14363,10 @@ var BaseSeriesGenerator = class {
|
|
|
14060
14363
|
this.chartGenerator = chartGenerator;
|
|
14061
14364
|
const { chartSeriesEncode, caption, id, userParam } = model;
|
|
14062
14365
|
if (!model.catalogField) {
|
|
14063
|
-
throw new
|
|
14366
|
+
throw new RuntimeModelError28(model, "\u7F3A\u5C11\u5206\u7C7B\u5C5E\u6027\u914D\u7F6E");
|
|
14064
14367
|
}
|
|
14065
14368
|
if (!model.valueField) {
|
|
14066
|
-
throw new
|
|
14369
|
+
throw new RuntimeModelError28(model, "\u7F3A\u5C11\u503C\u5C5E\u6027\u914D\u7F6E");
|
|
14067
14370
|
}
|
|
14068
14371
|
this.catalogField = chartGenerator.getFieldKey(model.catalogField);
|
|
14069
14372
|
this.valueField = chartGenerator.getFieldKey(model.valueField);
|
|
@@ -14292,7 +14595,7 @@ var BaseSeriesGenerator = class {
|
|
|
14292
14595
|
dataPreprocess(data) {
|
|
14293
14596
|
const tempData = [];
|
|
14294
14597
|
data.forEach((singleData) => {
|
|
14295
|
-
tempData.push(
|
|
14598
|
+
tempData.push(clone19(singleData));
|
|
14296
14599
|
});
|
|
14297
14600
|
const { groupMode } = this.model;
|
|
14298
14601
|
if (groupMode) {
|
|
@@ -14486,10 +14789,10 @@ var BaseSeriesGenerator = class {
|
|
|
14486
14789
|
var LineSeriesGenerator = class extends BaseSeriesGenerator {
|
|
14487
14790
|
calcStaticOptions() {
|
|
14488
14791
|
if (this.xAxisIndex === void 0) {
|
|
14489
|
-
throw new
|
|
14792
|
+
throw new RuntimeModelError29(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
|
|
14490
14793
|
}
|
|
14491
14794
|
if (this.yAxisIndex === void 0) {
|
|
14492
|
-
throw new
|
|
14795
|
+
throw new RuntimeModelError29(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
|
|
14493
14796
|
}
|
|
14494
14797
|
const options = super.calcStaticOptions();
|
|
14495
14798
|
options.xAxisIndex = this.xAxisIndex;
|
|
@@ -14505,14 +14808,14 @@ var LineSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
14505
14808
|
};
|
|
14506
14809
|
|
|
14507
14810
|
// src/controller/control/chart/generator/bar-series-generator.ts
|
|
14508
|
-
import { RuntimeModelError as
|
|
14811
|
+
import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
|
|
14509
14812
|
var BarSeriesGenerator = class extends BaseSeriesGenerator {
|
|
14510
14813
|
calcStaticOptions() {
|
|
14511
14814
|
if (this.xAxisIndex === void 0) {
|
|
14512
|
-
throw new
|
|
14815
|
+
throw new RuntimeModelError30(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
|
|
14513
14816
|
}
|
|
14514
14817
|
if (this.yAxisIndex === void 0) {
|
|
14515
|
-
throw new
|
|
14818
|
+
throw new RuntimeModelError30(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
|
|
14516
14819
|
}
|
|
14517
14820
|
const options = super.calcStaticOptions();
|
|
14518
14821
|
options.xAxisIndex = this.xAxisIndex;
|
|
@@ -14565,14 +14868,14 @@ var PieSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
14565
14868
|
};
|
|
14566
14869
|
|
|
14567
14870
|
// src/controller/control/chart/generator/scatter-series-generator.ts
|
|
14568
|
-
import { RuntimeModelError as
|
|
14871
|
+
import { RuntimeModelError as RuntimeModelError31 } from "@ibiz-template/core";
|
|
14569
14872
|
var ScatterSeriesGenerator = class extends BaseSeriesGenerator {
|
|
14570
14873
|
calcStaticOptions() {
|
|
14571
14874
|
if (this.xAxisIndex === void 0) {
|
|
14572
|
-
throw new
|
|
14875
|
+
throw new RuntimeModelError31(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EX\u5750\u6807\u8F74");
|
|
14573
14876
|
}
|
|
14574
14877
|
if (this.yAxisIndex === void 0) {
|
|
14575
|
-
throw new
|
|
14878
|
+
throw new RuntimeModelError31(this.model, "\u5E8F\u5217\u6CA1\u6709\u914D\u7F6EY\u5750\u6807\u8F74");
|
|
14576
14879
|
}
|
|
14577
14880
|
const options = super.calcStaticOptions();
|
|
14578
14881
|
options.xAxisIndex = this.xAxisIndex;
|
|
@@ -15170,17 +15473,17 @@ var CaptionBarController = class extends ControlController {
|
|
|
15170
15473
|
import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError47 } from "@ibiz-template/core";
|
|
15171
15474
|
|
|
15172
15475
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
15173
|
-
import { RuntimeModelError as
|
|
15476
|
+
import { RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
15174
15477
|
import { isArray as isArray8 } from "qx-util";
|
|
15175
15478
|
|
|
15176
15479
|
// src/ui-action/provider/ui-action-provider-base.ts
|
|
15177
|
-
import { RuntimeModelError as
|
|
15480
|
+
import { RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
|
|
15178
15481
|
|
|
15179
15482
|
// src/ui-logic/index.ts
|
|
15180
15483
|
import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
|
|
15181
15484
|
|
|
15182
15485
|
// src/ui-logic/ui-logic.ts
|
|
15183
|
-
import { ModelError as ModelError25, RuntimeModelError as
|
|
15486
|
+
import { ModelError as ModelError25, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
15184
15487
|
|
|
15185
15488
|
// src/ui-logic/ui-logic-context.ts
|
|
15186
15489
|
var UILogicContext = class {
|
|
@@ -15326,24 +15629,24 @@ var UILogicContext = class {
|
|
|
15326
15629
|
};
|
|
15327
15630
|
|
|
15328
15631
|
// src/ui-logic/ui-logic-node/de-action-node/de-action-node.ts
|
|
15329
|
-
import { RuntimeModelError as
|
|
15632
|
+
import { RuntimeModelError as RuntimeModelError34 } from "@ibiz-template/core";
|
|
15330
15633
|
|
|
15331
15634
|
// src/ui-logic/ui-logic-link/ui-logic-link.ts
|
|
15332
15635
|
import { ModelError as ModelError20 } from "@ibiz-template/core";
|
|
15333
15636
|
|
|
15334
15637
|
// src/ui-logic/ui-logic-link/ui-logic-link-group-cond/ui-logic-link-group-cond.ts
|
|
15335
|
-
import { RuntimeModelError as
|
|
15638
|
+
import { RuntimeModelError as RuntimeModelError33 } from "@ibiz-template/core";
|
|
15336
15639
|
|
|
15337
15640
|
// src/ui-logic/ui-logic-link/ui-logic-link-cond/ui-logic-link-cond.ts
|
|
15338
15641
|
var UILogicLinkCond = class {
|
|
15339
15642
|
};
|
|
15340
15643
|
|
|
15341
15644
|
// src/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.ts
|
|
15342
|
-
import { ModelError as ModelError19, RuntimeModelError as
|
|
15645
|
+
import { ModelError as ModelError19, RuntimeModelError as RuntimeModelError32 } from "@ibiz-template/core";
|
|
15343
15646
|
|
|
15344
15647
|
// src/ui-logic/utils/handle-src-val.ts
|
|
15345
15648
|
import { ModelError as ModelError18 } from "@ibiz-template/core";
|
|
15346
|
-
import { clone as
|
|
15649
|
+
import { clone as clone20 } from "ramda";
|
|
15347
15650
|
function handleSrcVal2(ctx, srcValParams) {
|
|
15348
15651
|
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
15349
15652
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
@@ -15370,7 +15673,7 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
15370
15673
|
value = ctx.parameters.context;
|
|
15371
15674
|
break;
|
|
15372
15675
|
case "ENVPARAM":
|
|
15373
|
-
value =
|
|
15676
|
+
value = clone20(ibiz.env);
|
|
15374
15677
|
break;
|
|
15375
15678
|
default:
|
|
15376
15679
|
throw new ModelError18(srcValParams, "\u6682\u672A\u652F\u6301\u6E90\u503C\u7C7B\u578B".concat(srcValueType));
|
|
@@ -15435,7 +15738,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
15435
15738
|
switch (this.type) {
|
|
15436
15739
|
case "ENTITYFIELD": {
|
|
15437
15740
|
if (!this.value) {
|
|
15438
|
-
throw new
|
|
15741
|
+
throw new RuntimeModelError32(
|
|
15439
15742
|
this.model,
|
|
15440
15743
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
15441
15744
|
);
|
|
@@ -15445,7 +15748,7 @@ var UILogicLinkSingleCond = class extends UILogicLinkCond {
|
|
|
15445
15748
|
}
|
|
15446
15749
|
case "SRCENTITYFIELD": {
|
|
15447
15750
|
if (!this.value) {
|
|
15448
|
-
throw new
|
|
15751
|
+
throw new RuntimeModelError32(
|
|
15449
15752
|
this.model,
|
|
15450
15753
|
"\u5F53\u524D\u6761\u4EF6\u503C\u7C7B\u578B\u4E3A[\u6E90\u6570\u636E\u5BF9\u8C61\u5C5E\u6027],\u7F3A\u5C11\u914D\u7F6E\u6761\u4EF6\u503C"
|
|
15451
15754
|
);
|
|
@@ -15511,7 +15814,7 @@ var UILogicLinkGroupCond = class _UILogicLinkGroupCond extends UILogicLinkCond {
|
|
|
15511
15814
|
test(ctx, context, data) {
|
|
15512
15815
|
let bol = true;
|
|
15513
15816
|
if (this.conds.length === 0) {
|
|
15514
|
-
throw new
|
|
15817
|
+
throw new RuntimeModelError33(this.model, "\u754C\u9762\u8FDE\u63A5\u6761\u4EF6\u903B\u8F91\u7EC4\u672A\u914D\u7F6E\u903B\u8F91\u9879");
|
|
15515
15818
|
}
|
|
15516
15819
|
for (let i = 0; i < this.conds.length; i++) {
|
|
15517
15820
|
const cond = this.conds[i];
|
|
@@ -15637,10 +15940,10 @@ var DEActionNode2 = class extends UILogicNode {
|
|
|
15637
15940
|
retDEUILogicParamId
|
|
15638
15941
|
} = this.model;
|
|
15639
15942
|
if (!dstAppDataEntityId) {
|
|
15640
|
-
throw new
|
|
15943
|
+
throw new RuntimeModelError34(this.model, "\u672A\u6307\u5B9A\u5E94\u7528\u5B9E\u4F53");
|
|
15641
15944
|
}
|
|
15642
15945
|
if (!dstAppDEActionId) {
|
|
15643
|
-
throw new
|
|
15946
|
+
throw new RuntimeModelError34(this.model, "\u672A\u6307\u5B9A\u5B9E\u4F53\u884C\u4E3A");
|
|
15644
15947
|
}
|
|
15645
15948
|
const requestData = ctx.params[dstDEUILogicParamId];
|
|
15646
15949
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
@@ -15658,13 +15961,13 @@ var DEActionNode2 = class extends UILogicNode {
|
|
|
15658
15961
|
};
|
|
15659
15962
|
|
|
15660
15963
|
// src/ui-logic/ui-logic-node/de-ui-action-node/de-ui-action-node.ts
|
|
15661
|
-
import { RuntimeModelError as
|
|
15964
|
+
import { RuntimeModelError as RuntimeModelError35 } from "@ibiz-template/core";
|
|
15662
15965
|
var DEUIActionNode = class extends UILogicNode {
|
|
15663
15966
|
async exec(ctx) {
|
|
15664
15967
|
const { dstAppDEUIActionId, dstDEUILogicParamId } = this.model;
|
|
15665
15968
|
const { data, parameters } = ctx;
|
|
15666
15969
|
if (!dstAppDEUIActionId) {
|
|
15667
|
-
throw new
|
|
15970
|
+
throw new RuntimeModelError35(this.model, "\u672A\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
15668
15971
|
}
|
|
15669
15972
|
let actionData = [data];
|
|
15670
15973
|
if (dstDEUILogicParamId) {
|
|
@@ -15729,7 +16032,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
15729
16032
|
|
|
15730
16033
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
15731
16034
|
import { ModelError as ModelError22, RuntimeError as RuntimeError39 } from "@ibiz-template/core";
|
|
15732
|
-
import { clone as
|
|
16035
|
+
import { clone as clone21 } from "ramda";
|
|
15733
16036
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
15734
16037
|
async exec(ctx) {
|
|
15735
16038
|
const nodeParams = this.model.deuilogicNodeParams;
|
|
@@ -15818,7 +16121,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
15818
16121
|
copyParam(nodeParam, ctx) {
|
|
15819
16122
|
const { dstDEUILogicParamId } = nodeParam;
|
|
15820
16123
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
15821
|
-
ctx.params[dstDEUILogicParamId] =
|
|
16124
|
+
ctx.params[dstDEUILogicParamId] = clone21(srcVal);
|
|
15822
16125
|
}
|
|
15823
16126
|
/**
|
|
15824
16127
|
* 绑定参数
|
|
@@ -15895,20 +16198,20 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
15895
16198
|
};
|
|
15896
16199
|
|
|
15897
16200
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
15898
|
-
import { RuntimeError as RuntimeError40, RuntimeModelError as
|
|
16201
|
+
import { RuntimeError as RuntimeError40, RuntimeModelError as RuntimeModelError36 } from "@ibiz-template/core";
|
|
15899
16202
|
import { isFunction } from "lodash-es";
|
|
15900
16203
|
var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
15901
16204
|
async exec(ctx) {
|
|
15902
16205
|
ctx.isEndNode = true;
|
|
15903
16206
|
const { invokeMethod, invokeCtrlId, invokeParamId } = this.model;
|
|
15904
16207
|
if (!invokeCtrlId) {
|
|
15905
|
-
throw new
|
|
16208
|
+
throw new RuntimeModelError36(this.model, "\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u5BF9\u8C61");
|
|
15906
16209
|
}
|
|
15907
16210
|
if (!invokeParamId) {
|
|
15908
|
-
throw new
|
|
16211
|
+
throw new RuntimeModelError36(this.model, "\u6CA1\u6709\u914D\u7F6E\u64CD\u4F5C\u53C2\u6570");
|
|
15909
16212
|
}
|
|
15910
16213
|
if (!invokeMethod) {
|
|
15911
|
-
throw new
|
|
16214
|
+
throw new RuntimeModelError36(this.model, "\u6CA1\u6709\u914D\u7F6E\u8C03\u7528\u65B9\u6CD5");
|
|
15912
16215
|
}
|
|
15913
16216
|
const invokeParam = ctx.params[invokeParamId];
|
|
15914
16217
|
if (!invokeParam) {
|
|
@@ -15926,12 +16229,12 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
15926
16229
|
};
|
|
15927
16230
|
|
|
15928
16231
|
// src/ui-logic/ui-logic-node/bind-param-node/bind-param-node.ts
|
|
15929
|
-
import { RuntimeModelError as
|
|
16232
|
+
import { RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
|
|
15930
16233
|
var BindParamNode2 = class extends UILogicNode {
|
|
15931
16234
|
async exec(ctx) {
|
|
15932
16235
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
15933
16236
|
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
15934
|
-
throw new
|
|
16237
|
+
throw new RuntimeModelError37(
|
|
15935
16238
|
this.model,
|
|
15936
16239
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
15937
16240
|
);
|
|
@@ -15942,7 +16245,7 @@ var BindParamNode2 = class extends UILogicNode {
|
|
|
15942
16245
|
};
|
|
15943
16246
|
|
|
15944
16247
|
// src/ui-logic/ui-logic-node/msg-box-node/msg-box-node.ts
|
|
15945
|
-
import { ModelError as ModelError23, RuntimeModelError as
|
|
16248
|
+
import { ModelError as ModelError23, RuntimeModelError as RuntimeModelError38 } from "@ibiz-template/core";
|
|
15946
16249
|
var MsgBoxNode = class extends UILogicNode {
|
|
15947
16250
|
constructor() {
|
|
15948
16251
|
super(...arguments);
|
|
@@ -15956,10 +16259,10 @@ var MsgBoxNode = class extends UILogicNode {
|
|
|
15956
16259
|
async exec(ctx) {
|
|
15957
16260
|
const { msgBoxType, buttonsType, msgBoxParamId } = this.model;
|
|
15958
16261
|
if (!msgBoxType) {
|
|
15959
|
-
throw new
|
|
16262
|
+
throw new RuntimeModelError38(this.model, "\u7F3A\u5C11\u6D88\u606F\u7C7B\u578B\u7684\u914D\u7F6E");
|
|
15960
16263
|
}
|
|
15961
16264
|
if (!buttonsType) {
|
|
15962
|
-
throw new
|
|
16265
|
+
throw new RuntimeModelError38(this.model, "\u7F3A\u5C11\u6309\u94AE\u7C7B\u578B\u7684\u914D\u7F6E");
|
|
15963
16266
|
}
|
|
15964
16267
|
let { title } = this.model;
|
|
15965
16268
|
let { message } = this.model;
|
|
@@ -16019,12 +16322,12 @@ var PFPluginNode = class extends UILogicNode {
|
|
|
16019
16322
|
};
|
|
16020
16323
|
|
|
16021
16324
|
// src/ui-logic/ui-logic-node/debug-param-node/debug-param-node.ts
|
|
16022
|
-
import { RuntimeModelError as
|
|
16325
|
+
import { RuntimeModelError as RuntimeModelError39 } from "@ibiz-template/core";
|
|
16023
16326
|
var DebugParamNode = class extends UILogicNode {
|
|
16024
16327
|
async exec(ctx) {
|
|
16025
16328
|
const { dstDEUILogicParamId, name } = this.model;
|
|
16026
16329
|
if (!dstDEUILogicParamId) {
|
|
16027
|
-
throw new
|
|
16330
|
+
throw new RuntimeModelError39(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
16028
16331
|
}
|
|
16029
16332
|
const param = ctx.params[dstDEUILogicParamId];
|
|
16030
16333
|
ibiz.log.debug("\u903B\u8F91\u8282\u70B9".concat(name, "\u64CD\u4F5C\u53C2\u6570\u503C:"), param);
|
|
@@ -16032,36 +16335,36 @@ var DebugParamNode = class extends UILogicNode {
|
|
|
16032
16335
|
};
|
|
16033
16336
|
|
|
16034
16337
|
// src/ui-logic/ui-logic-node/reset-param-node/reset-param-node.ts
|
|
16035
|
-
import { RuntimeModelError as
|
|
16338
|
+
import { RuntimeModelError as RuntimeModelError40 } from "@ibiz-template/core";
|
|
16036
16339
|
var ResetParamNode2 = class extends UILogicNode {
|
|
16037
16340
|
async exec(ctx) {
|
|
16038
16341
|
const { dstDEUILogicParamId } = this.model;
|
|
16039
16342
|
if (!dstDEUILogicParamId) {
|
|
16040
|
-
throw new
|
|
16343
|
+
throw new RuntimeModelError40(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
16041
16344
|
}
|
|
16042
16345
|
ctx.resetParam(dstDEUILogicParamId);
|
|
16043
16346
|
}
|
|
16044
16347
|
};
|
|
16045
16348
|
|
|
16046
16349
|
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
16047
|
-
import { RuntimeModelError as
|
|
16048
|
-
import { clone as
|
|
16350
|
+
import { RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
|
|
16351
|
+
import { clone as clone22 } from "ramda";
|
|
16049
16352
|
var CopyParamNode2 = class extends UILogicNode {
|
|
16050
16353
|
async exec(ctx) {
|
|
16051
16354
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
16052
16355
|
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
16053
|
-
throw new
|
|
16356
|
+
throw new RuntimeModelError41(
|
|
16054
16357
|
this.model,
|
|
16055
16358
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
16056
16359
|
);
|
|
16057
16360
|
}
|
|
16058
16361
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
16059
|
-
ctx.params[dstDEUILogicParamId] =
|
|
16362
|
+
ctx.params[dstDEUILogicParamId] = clone22(srcVal);
|
|
16060
16363
|
}
|
|
16061
16364
|
};
|
|
16062
16365
|
|
|
16063
16366
|
// src/ui-logic/ui-logic-node/append-param-node/append-param-node.ts
|
|
16064
|
-
import { RuntimeModelError as
|
|
16367
|
+
import { RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
|
|
16065
16368
|
var AppendParamNode2 = class extends UILogicNode {
|
|
16066
16369
|
async exec(ctx) {
|
|
16067
16370
|
const {
|
|
@@ -16072,7 +16375,7 @@ var AppendParamNode2 = class extends UILogicNode {
|
|
|
16072
16375
|
srcSize
|
|
16073
16376
|
} = this.model;
|
|
16074
16377
|
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
16075
|
-
throw new
|
|
16378
|
+
throw new RuntimeModelError42(
|
|
16076
16379
|
this.model,
|
|
16077
16380
|
"\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u8005\u6E90\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E"
|
|
16078
16381
|
);
|
|
@@ -16090,12 +16393,12 @@ var AppendParamNode2 = class extends UILogicNode {
|
|
|
16090
16393
|
};
|
|
16091
16394
|
|
|
16092
16395
|
// src/ui-logic/ui-logic-node/sort-param-node/sort-param-node.ts
|
|
16093
|
-
import { RuntimeModelError as
|
|
16396
|
+
import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
16094
16397
|
var SortParamNode2 = class extends UILogicNode {
|
|
16095
16398
|
async exec(ctx) {
|
|
16096
16399
|
const { dstDEUILogicParamId, dstSortDir, dstFieldName } = this.model;
|
|
16097
16400
|
if (!dstDEUILogicParamId || !dstFieldName) {
|
|
16098
|
-
throw new
|
|
16401
|
+
throw new RuntimeModelError43(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u6216\u76EE\u6807\u5C5E\u6027\u914D\u7F6E");
|
|
16099
16402
|
}
|
|
16100
16403
|
const key = dstFieldName;
|
|
16101
16404
|
const arr = ctx.params[dstDEUILogicParamId];
|
|
@@ -16106,19 +16409,19 @@ var SortParamNode2 = class extends UILogicNode {
|
|
|
16106
16409
|
};
|
|
16107
16410
|
|
|
16108
16411
|
// src/ui-logic/ui-logic-node/renew-param-node/renew-param-node.ts
|
|
16109
|
-
import { RuntimeModelError as
|
|
16412
|
+
import { RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
|
|
16110
16413
|
var RenewParamNode2 = class extends UILogicNode {
|
|
16111
16414
|
async exec(ctx) {
|
|
16112
16415
|
const { dstDEUILogicParamId } = this.model;
|
|
16113
16416
|
if (!dstDEUILogicParamId) {
|
|
16114
|
-
throw new
|
|
16417
|
+
throw new RuntimeModelError44(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
16115
16418
|
}
|
|
16116
16419
|
ctx.renewParam(dstDEUILogicParamId);
|
|
16117
16420
|
}
|
|
16118
16421
|
};
|
|
16119
16422
|
|
|
16120
16423
|
// src/ui-logic/ui-logic-node/data-set-node/data-set-node.ts
|
|
16121
|
-
import { RuntimeModelError as
|
|
16424
|
+
import { RuntimeModelError as RuntimeModelError45 } from "@ibiz-template/core";
|
|
16122
16425
|
var DataSetNode2 = class extends UILogicNode {
|
|
16123
16426
|
async exec(ctx) {
|
|
16124
16427
|
const {
|
|
@@ -16128,7 +16431,7 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
16128
16431
|
retDEUILogicParamId
|
|
16129
16432
|
} = this.model;
|
|
16130
16433
|
if (!dstDEUILogicParamId) {
|
|
16131
|
-
throw new
|
|
16434
|
+
throw new RuntimeModelError45(this.model, "\u7F3A\u5C11\u914D\u7F6E\u8FC7\u6EE4\u53C2\u6570");
|
|
16132
16435
|
}
|
|
16133
16436
|
const queryParams = ctx.params[dstDEUILogicParamId];
|
|
16134
16437
|
const app = ibiz.hub.getApp(ctx.context.srfappid);
|
|
@@ -16154,19 +16457,19 @@ var ThrowExceptionNode2 = class extends UILogicNode {
|
|
|
16154
16457
|
};
|
|
16155
16458
|
|
|
16156
16459
|
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
16157
|
-
import { RuntimeError as RuntimeError42, RuntimeModelError as
|
|
16460
|
+
import { RuntimeError as RuntimeError42, RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
|
|
16158
16461
|
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
16159
16462
|
async exec(ctx) {
|
|
16160
16463
|
ctx.isEndNode = true;
|
|
16161
16464
|
const { eventName, eventParamId, fireCtrlId } = this.model;
|
|
16162
16465
|
if (!fireCtrlId) {
|
|
16163
|
-
throw new
|
|
16466
|
+
throw new RuntimeModelError46(this.model, "\u6CA1\u6709\u914D\u7F6E\u89E6\u53D1\u5BF9\u8C61");
|
|
16164
16467
|
}
|
|
16165
16468
|
if (!eventName) {
|
|
16166
|
-
throw new
|
|
16469
|
+
throw new RuntimeModelError46(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u540D\u79F0\u53C2\u6570");
|
|
16167
16470
|
}
|
|
16168
16471
|
if (!eventParamId) {
|
|
16169
|
-
throw new
|
|
16472
|
+
throw new RuntimeModelError46(this.model, "\u6CA1\u6709\u914D\u7F6E\u4E8B\u4EF6\u53C2\u6570");
|
|
16170
16473
|
}
|
|
16171
16474
|
const invokeCtrl = ctx.params[fireCtrlId];
|
|
16172
16475
|
if (!invokeCtrl) {
|
|
@@ -16181,7 +16484,7 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
16181
16484
|
};
|
|
16182
16485
|
|
|
16183
16486
|
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
16184
|
-
import { RuntimeError as RuntimeError43, RuntimeModelError as
|
|
16487
|
+
import { RuntimeError as RuntimeError43, RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
|
|
16185
16488
|
var ExecuteDELogicNode = class extends UILogicNode {
|
|
16186
16489
|
async exec(ctx) {
|
|
16187
16490
|
const {
|
|
@@ -16191,13 +16494,13 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
16191
16494
|
retDEUILogicParamId
|
|
16192
16495
|
} = this.model;
|
|
16193
16496
|
if (!dstAppDataEntityId) {
|
|
16194
|
-
throw new
|
|
16497
|
+
throw new RuntimeModelError47(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53");
|
|
16195
16498
|
}
|
|
16196
16499
|
if (!dstAppDELogicId) {
|
|
16197
|
-
throw new
|
|
16500
|
+
throw new RuntimeModelError47(this.model, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u903B\u8F91");
|
|
16198
16501
|
}
|
|
16199
16502
|
if (!dstDEUILogicParamId) {
|
|
16200
|
-
throw new
|
|
16503
|
+
throw new RuntimeModelError47(this.model, "\u6CA1\u6709\u914D\u7F6E\u4F20\u5165\u903B\u8F91\u53C2\u6570");
|
|
16201
16504
|
}
|
|
16202
16505
|
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
16203
16506
|
if (!dstParam) {
|
|
@@ -16358,7 +16661,7 @@ var UILogic = class {
|
|
|
16358
16661
|
this.params = /* @__PURE__ */ new Map();
|
|
16359
16662
|
var _a;
|
|
16360
16663
|
if (!((_a = model.deuilogicNodes) == null ? void 0 : _a.length)) {
|
|
16361
|
-
throw new
|
|
16664
|
+
throw new RuntimeModelError48(model, "\u754C\u9762\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u903B\u8F91\u8282\u70B9");
|
|
16362
16665
|
}
|
|
16363
16666
|
model.deuilogicNodes.forEach((node) => {
|
|
16364
16667
|
const { logicNodeType } = node;
|
|
@@ -16478,7 +16781,7 @@ var UILogic = class {
|
|
|
16478
16781
|
const start = this.nodes.get(startDEUILogicNodeId);
|
|
16479
16782
|
await this.deepExec(start, ctx);
|
|
16480
16783
|
} else {
|
|
16481
|
-
throw new
|
|
16784
|
+
throw new RuntimeModelError48(this.model, "\u672A\u8BBE\u7F6E\u8D77\u59CB\u8282\u70B9");
|
|
16482
16785
|
}
|
|
16483
16786
|
if (ctx.isEndNode) {
|
|
16484
16787
|
return ctx.result;
|
|
@@ -16613,7 +16916,7 @@ var UIActionProviderBase = class {
|
|
|
16613
16916
|
const { appDEUILogicId, appDataEntityId, uilogicAttachMode } = action;
|
|
16614
16917
|
if (uilogicAttachMode === "REPLACE") {
|
|
16615
16918
|
if (!appDEUILogicId) {
|
|
16616
|
-
throw new
|
|
16919
|
+
throw new RuntimeModelError49(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
16617
16920
|
}
|
|
16618
16921
|
await execUILogic(appDEUILogicId, appDataEntityId, args);
|
|
16619
16922
|
return result;
|
|
@@ -16628,7 +16931,7 @@ var UIActionProviderBase = class {
|
|
|
16628
16931
|
}
|
|
16629
16932
|
if (action.uilogicAttachMode === "AFTER") {
|
|
16630
16933
|
if (!appDEUILogicId) {
|
|
16631
|
-
throw new
|
|
16934
|
+
throw new RuntimeModelError49(action, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
16632
16935
|
}
|
|
16633
16936
|
await execUILogic(
|
|
16634
16937
|
appDEUILogicId,
|
|
@@ -16853,7 +17156,7 @@ var BackendUIActionProvider = class extends UIActionProviderBase {
|
|
|
16853
17156
|
const entityName = action.appDataEntityId;
|
|
16854
17157
|
const methodName = action.appDEMethodId;
|
|
16855
17158
|
if (!entityName || !methodName) {
|
|
16856
|
-
throw new
|
|
17159
|
+
throw new RuntimeModelError50(action, "\u672A\u914D\u7F6E\u5B9E\u4F53\u6216\u5B9E\u4F53\u884C\u4E3A");
|
|
16857
17160
|
}
|
|
16858
17161
|
const { resultContext, resultParams, resultData } = await this.handleParams(
|
|
16859
17162
|
action,
|
|
@@ -16978,7 +17281,7 @@ var SysUIActionProvider = class extends UIActionProviderBase {
|
|
|
16978
17281
|
// src/ui-action/provider/front-ui-action-provider.ts
|
|
16979
17282
|
import {
|
|
16980
17283
|
StringUtil,
|
|
16981
|
-
RuntimeModelError as
|
|
17284
|
+
RuntimeModelError as RuntimeModelError51,
|
|
16982
17285
|
ModelError as ModelError26,
|
|
16983
17286
|
RuntimeError as RuntimeError46
|
|
16984
17287
|
} from "@ibiz-template/core";
|
|
@@ -16996,7 +17299,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
16996
17299
|
case "WIZARD": {
|
|
16997
17300
|
const frontPSAppView = action.frontAppViewId;
|
|
16998
17301
|
if (!frontPSAppView) {
|
|
16999
|
-
throw new
|
|
17302
|
+
throw new RuntimeModelError51(action, "\u672A\u914D\u7F6E\u6253\u5F00\u89C6\u56FE");
|
|
17000
17303
|
}
|
|
17001
17304
|
const { resultContext, resultParams } = await this.handleParams(
|
|
17002
17305
|
action,
|
|
@@ -17061,7 +17364,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
17061
17364
|
);
|
|
17062
17365
|
return result || {};
|
|
17063
17366
|
}
|
|
17064
|
-
throw new
|
|
17367
|
+
throw new RuntimeModelError51(action, "\u81EA\u5B9A\u4E49\u7C7B\u578B\u7F3A\u5C11\u914D\u7F6E\u811A\u672C\u4EE3\u7801");
|
|
17065
17368
|
}
|
|
17066
17369
|
/**
|
|
17067
17370
|
* 执行打印行为
|
|
@@ -17132,7 +17435,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
17132
17435
|
*/
|
|
17133
17436
|
async executeDataImport(action, args) {
|
|
17134
17437
|
var _a;
|
|
17135
|
-
const { resultParams } = await this.handleParams(
|
|
17438
|
+
const { resultContext, resultParams } = await this.handleParams(
|
|
17136
17439
|
action,
|
|
17137
17440
|
args.context,
|
|
17138
17441
|
args.data,
|
|
@@ -17156,6 +17459,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
17156
17459
|
dismiss: () => modal.dismiss(),
|
|
17157
17460
|
appDataEntity,
|
|
17158
17461
|
dataImport: appDEDataImport,
|
|
17462
|
+
context: resultContext,
|
|
17159
17463
|
params: resultParams
|
|
17160
17464
|
},
|
|
17161
17465
|
{
|
|
@@ -17909,7 +18213,7 @@ var RawItemPortletController = class extends PortletPartController {
|
|
|
17909
18213
|
};
|
|
17910
18214
|
|
|
17911
18215
|
// src/controller/control/data-view/data-view.controller.ts
|
|
17912
|
-
import { RuntimeModelError as
|
|
18216
|
+
import { RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
|
|
17913
18217
|
import { isNil as isNil22 } from "ramda";
|
|
17914
18218
|
|
|
17915
18219
|
// src/controller/control/data-view/data-view.service.ts
|
|
@@ -18124,7 +18428,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
18124
18428
|
const optItemModel = this.getOptItemModel();
|
|
18125
18429
|
if (optItemModel) {
|
|
18126
18430
|
if (!optItemModel.deuiactionGroup) {
|
|
18127
|
-
throw new
|
|
18431
|
+
throw new RuntimeModelError52(this.model, "\u64CD\u4F5C\u9879\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
18128
18432
|
}
|
|
18129
18433
|
if (!((_a = optItemModel.deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
18130
18434
|
ibiz.log.debug("\u64CD\u4F5C\u9879\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -18177,7 +18481,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
18177
18481
|
const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
|
|
18178
18482
|
if (enableGroup && groupMode) {
|
|
18179
18483
|
if (!groupAppDEFieldId) {
|
|
18180
|
-
throw new
|
|
18484
|
+
throw new RuntimeModelError52(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
|
|
18181
18485
|
}
|
|
18182
18486
|
if (groupMode === "AUTO") {
|
|
18183
18487
|
this.handleAutoGroup();
|
|
@@ -18244,7 +18548,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
18244
18548
|
async handleCodeListGroup() {
|
|
18245
18549
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
18246
18550
|
if (!groupCodeListId) {
|
|
18247
|
-
throw new
|
|
18551
|
+
throw new RuntimeModelError52(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
18248
18552
|
}
|
|
18249
18553
|
const { items } = this.state;
|
|
18250
18554
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -18350,7 +18654,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
18350
18654
|
caption = ibiz.i18n.t(item.capLanguageRes.lanResTag, item.caption);
|
|
18351
18655
|
}
|
|
18352
18656
|
if (!item.appDEFieldId) {
|
|
18353
|
-
throw new
|
|
18657
|
+
throw new RuntimeModelError52(item, "\u542F\u7528\u6392\u5E8F\u7684\u9879\u5FC5\u987B\u5173\u8054\u5B9E\u4F53\u5C5E\u6027");
|
|
18354
18658
|
}
|
|
18355
18659
|
const tempItem = {
|
|
18356
18660
|
caption,
|
|
@@ -18368,10 +18672,10 @@ var DataViewControlController = class extends MDControlController {
|
|
|
18368
18672
|
};
|
|
18369
18673
|
|
|
18370
18674
|
// src/controller/control/exp-bar/calendar-exp-bar.controller.ts
|
|
18371
|
-
import { RuntimeModelError as
|
|
18675
|
+
import { RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
18372
18676
|
|
|
18373
18677
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
18374
|
-
import { RuntimeError as RuntimeError48, RuntimeModelError as
|
|
18678
|
+
import { RuntimeError as RuntimeError48, RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
|
|
18375
18679
|
var ExpBarControlController = class extends ControlController {
|
|
18376
18680
|
constructor() {
|
|
18377
18681
|
super(...arguments);
|
|
@@ -18426,7 +18730,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
18426
18730
|
get xDataController() {
|
|
18427
18731
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
18428
18732
|
if (!controller) {
|
|
18429
|
-
throw new
|
|
18733
|
+
throw new RuntimeModelError53(
|
|
18430
18734
|
this.model,
|
|
18431
18735
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
18432
18736
|
);
|
|
@@ -18785,7 +19089,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
18785
19089
|
get xDataController() {
|
|
18786
19090
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
18787
19091
|
if (!controller) {
|
|
18788
|
-
throw new
|
|
19092
|
+
throw new RuntimeModelError54(
|
|
18789
19093
|
this.model,
|
|
18790
19094
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
18791
19095
|
);
|
|
@@ -18840,7 +19144,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
18840
19144
|
};
|
|
18841
19145
|
|
|
18842
19146
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
18843
|
-
import { RuntimeError as RuntimeError49, RuntimeModelError as
|
|
19147
|
+
import { RuntimeError as RuntimeError49, RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
|
|
18844
19148
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
18845
19149
|
constructor() {
|
|
18846
19150
|
super(...arguments);
|
|
@@ -18863,7 +19167,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
18863
19167
|
get xDataController() {
|
|
18864
19168
|
const controller = this.view.getController(this.model.xdataControlName);
|
|
18865
19169
|
if (!controller) {
|
|
18866
|
-
throw new
|
|
19170
|
+
throw new RuntimeModelError55(
|
|
18867
19171
|
this.model,
|
|
18868
19172
|
"\u65E0\u6CD5\u83B7\u53D6\u591A\u6570\u636E\u90E8\u4EF6[".concat(this.model.xdataControlName, "]\u63A7\u5236\u5668")
|
|
18869
19173
|
);
|
|
@@ -19109,7 +19413,7 @@ import { RuntimeError as RuntimeError50 } from "@ibiz-template/core";
|
|
|
19109
19413
|
|
|
19110
19414
|
// src/controller/control/form/form/form.controller.ts
|
|
19111
19415
|
import {
|
|
19112
|
-
RuntimeModelError as
|
|
19416
|
+
RuntimeModelError as RuntimeModelError56,
|
|
19113
19417
|
debounceAndAsyncMerge,
|
|
19114
19418
|
recursiveIterate as recursiveIterate3
|
|
19115
19419
|
} from "@ibiz-template/core";
|
|
@@ -19237,7 +19541,7 @@ var FormController = class extends ControlController {
|
|
|
19237
19541
|
return;
|
|
19238
19542
|
}
|
|
19239
19543
|
if (form.details[detail.id]) {
|
|
19240
|
-
throw new
|
|
19544
|
+
throw new RuntimeModelError56(
|
|
19241
19545
|
detail,
|
|
19242
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")
|
|
19243
19547
|
);
|
|
@@ -20074,6 +20378,9 @@ var FormDetailController = class {
|
|
|
20074
20378
|
* @date 2023-10-11 05:03:26
|
|
20075
20379
|
*/
|
|
20076
20380
|
async onClick(event) {
|
|
20381
|
+
if (event) {
|
|
20382
|
+
event.stopPropagation();
|
|
20383
|
+
}
|
|
20077
20384
|
this.form.evt.emit("onFormDetailEvent", {
|
|
20078
20385
|
formDetailName: this.model.id,
|
|
20079
20386
|
formDetailEventName: "onClick" /* CLICK */,
|
|
@@ -20879,7 +21186,7 @@ var FormMDCtrlController = class extends FormDetailController {
|
|
|
20879
21186
|
import {
|
|
20880
21187
|
mergeInLeft,
|
|
20881
21188
|
ModelError as ModelError27,
|
|
20882
|
-
RuntimeModelError as
|
|
21189
|
+
RuntimeModelError as RuntimeModelError57
|
|
20883
21190
|
} from "@ibiz-template/core";
|
|
20884
21191
|
var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
20885
21192
|
constructor() {
|
|
@@ -20905,7 +21212,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
20905
21212
|
await super.onInit();
|
|
20906
21213
|
const { contentControl } = this.model;
|
|
20907
21214
|
if (!contentControl) {
|
|
20908
|
-
throw new
|
|
21215
|
+
throw new RuntimeModelError57(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
|
|
20909
21216
|
}
|
|
20910
21217
|
if (contentControl.controlType === "GRID") {
|
|
20911
21218
|
mergeInLeft(contentControl, {
|
|
@@ -21002,7 +21309,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
21002
21309
|
};
|
|
21003
21310
|
|
|
21004
21311
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
|
|
21005
|
-
import { RuntimeError as RuntimeError51, RuntimeModelError as
|
|
21312
|
+
import { RuntimeError as RuntimeError51, RuntimeModelError as RuntimeModelError58 } from "@ibiz-template/core";
|
|
21006
21313
|
import { createUUID as createUUID11 } from "qx-util";
|
|
21007
21314
|
|
|
21008
21315
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
|
|
@@ -21043,7 +21350,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
21043
21350
|
super.onInit();
|
|
21044
21351
|
const { contentControl } = this.model;
|
|
21045
21352
|
if (!contentControl) {
|
|
21046
|
-
throw new
|
|
21353
|
+
throw new RuntimeModelError58(this.model, "\u591A\u6570\u636E\u90E8\u4EF6\u672A\u914D\u7F6E\u5185\u5BB9\u90E8\u4EF6");
|
|
21047
21354
|
}
|
|
21048
21355
|
contentControl.enableAutoSave = this.enableCreate || this.enableUpdate;
|
|
21049
21356
|
const controlProvider = await getControlProvider(contentControl);
|
|
@@ -21177,7 +21484,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
21177
21484
|
|
|
21178
21485
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
|
|
21179
21486
|
import { ModelError as ModelError28 } from "@ibiz-template/core";
|
|
21180
|
-
import { clone as
|
|
21487
|
+
import { clone as clone23 } from "ramda";
|
|
21181
21488
|
var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
21182
21489
|
constructor() {
|
|
21183
21490
|
super(...arguments);
|
|
@@ -21261,7 +21568,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
21261
21568
|
copyFields.forEach((key) => {
|
|
21262
21569
|
tempForm[key] = this.form.model[key];
|
|
21263
21570
|
});
|
|
21264
|
-
this.repeatedForm =
|
|
21571
|
+
this.repeatedForm = clone23(tempForm);
|
|
21265
21572
|
}
|
|
21266
21573
|
/**
|
|
21267
21574
|
* 设置重复器数据(修改主表单里重复器对应属性)
|
|
@@ -21369,10 +21676,30 @@ var FormTabPageController = class extends FormDetailController {
|
|
|
21369
21676
|
var _a;
|
|
21370
21677
|
return new FormTabPageState((_a = this.parent) == null ? void 0 : _a.state);
|
|
21371
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
|
+
}
|
|
21372
21689
|
};
|
|
21373
21690
|
|
|
21374
21691
|
// src/controller/control/form/form-detail/form-tab-panel/form-tab-panel.state.ts
|
|
21375
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
|
+
}
|
|
21376
21703
|
};
|
|
21377
21704
|
|
|
21378
21705
|
// src/controller/control/form/form-detail/form-tab-panel/form-tab-panel.controller.ts
|
|
@@ -21381,6 +21708,19 @@ var FormTabPanelController = class extends FormDetailController {
|
|
|
21381
21708
|
var _a;
|
|
21382
21709
|
return new FormTabPanelState((_a = this.parent) == null ? void 0 : _a.state);
|
|
21383
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
|
+
}
|
|
21384
21724
|
};
|
|
21385
21725
|
|
|
21386
21726
|
// src/controller/control/form/edit-form/edit-form.controller.ts
|
|
@@ -21391,12 +21731,12 @@ import {
|
|
|
21391
21731
|
} from "@ibiz-template/core";
|
|
21392
21732
|
import { debounce as debounce2 } from "lodash-es";
|
|
21393
21733
|
import { createUUID as createUUID12 } from "qx-util";
|
|
21394
|
-
import { clone as
|
|
21734
|
+
import { clone as clone24 } from "ramda";
|
|
21395
21735
|
|
|
21396
21736
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
21397
21737
|
import {
|
|
21398
21738
|
recursiveIterate as recursiveIterate6,
|
|
21399
|
-
RuntimeModelError as
|
|
21739
|
+
RuntimeModelError as RuntimeModelError59
|
|
21400
21740
|
} from "@ibiz-template/core";
|
|
21401
21741
|
var EditFormService = class extends FormService {
|
|
21402
21742
|
/**
|
|
@@ -21520,7 +21860,7 @@ var EditFormService = class extends FormService {
|
|
|
21520
21860
|
const wizardForm = this.model;
|
|
21521
21861
|
const methodName = (_a = wizardForm.goBackControlAction) == null ? void 0 : _a.appDEMethodId;
|
|
21522
21862
|
if (!methodName) {
|
|
21523
|
-
throw new
|
|
21863
|
+
throw new RuntimeModelError59(this.model, "\u7F3A\u5C11\u8FD4\u56DE\u64CD\u4F5C\u5B9E\u4F53\u884C\u4E3A");
|
|
21524
21864
|
}
|
|
21525
21865
|
let res = await this.exec(
|
|
21526
21866
|
methodName,
|
|
@@ -21756,8 +22096,8 @@ var EditFormController = class extends FormController {
|
|
|
21756
22096
|
* @return {*} {Promise<IData>}
|
|
21757
22097
|
*/
|
|
21758
22098
|
async copy() {
|
|
21759
|
-
const context =
|
|
21760
|
-
const queryParams =
|
|
22099
|
+
const context = clone24(this.context);
|
|
22100
|
+
const queryParams = clone24(this.params);
|
|
21761
22101
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
21762
22102
|
this.model.appDataEntityId,
|
|
21763
22103
|
this.model.appId
|
|
@@ -21814,7 +22154,7 @@ var EditFormController = class extends FormController {
|
|
|
21814
22154
|
return this.loadDraft();
|
|
21815
22155
|
}
|
|
21816
22156
|
const { context, params } = this.handlerAbilityParams(args);
|
|
21817
|
-
const queryParams =
|
|
22157
|
+
const queryParams = clone24(params);
|
|
21818
22158
|
let res;
|
|
21819
22159
|
try {
|
|
21820
22160
|
await this.startLoading();
|
|
@@ -22380,12 +22720,12 @@ import {
|
|
|
22380
22720
|
mergeDefaultInLeft,
|
|
22381
22721
|
recursiveIterate as recursiveIterate7,
|
|
22382
22722
|
RuntimeError as RuntimeError53,
|
|
22383
|
-
RuntimeModelError as
|
|
22723
|
+
RuntimeModelError as RuntimeModelError61
|
|
22384
22724
|
} from "@ibiz-template/core";
|
|
22385
|
-
import { clone as
|
|
22725
|
+
import { clone as clone25 } from "ramda";
|
|
22386
22726
|
|
|
22387
22727
|
// src/controller/control/grid/grid/grid.service.ts
|
|
22388
|
-
import { RuntimeModelError as
|
|
22728
|
+
import { RuntimeModelError as RuntimeModelError60 } from "@ibiz-template/core";
|
|
22389
22729
|
var GridService = class extends MDControlService {
|
|
22390
22730
|
/**
|
|
22391
22731
|
* 初始化属性映射
|
|
@@ -22413,7 +22753,7 @@ var GridService = class extends MDControlService {
|
|
|
22413
22753
|
dataType: dataItem.dataType
|
|
22414
22754
|
});
|
|
22415
22755
|
} else {
|
|
22416
|
-
throw new
|
|
22756
|
+
throw new RuntimeModelError60(
|
|
22417
22757
|
column,
|
|
22418
22758
|
"\u672A\u627E\u5230\u5BF9\u5E94\u7684\u8868\u683C\u6570\u636E\u9879[".concat(deField, "]")
|
|
22419
22759
|
);
|
|
@@ -22692,7 +23032,7 @@ var GridController = class extends MDControlController {
|
|
|
22692
23032
|
const result = await calcColumnModelBySchema(json, this);
|
|
22693
23033
|
if (result && result.degridColumns.length > 0) {
|
|
22694
23034
|
const { degridColumns, degridDataItems } = result;
|
|
22695
|
-
this.model =
|
|
23035
|
+
this.model = clone25(this.model);
|
|
22696
23036
|
this.model.degridColumns = [
|
|
22697
23037
|
...(this.model.degridColumns || []).filter((item) => {
|
|
22698
23038
|
return degridColumns.findIndex((x) => x.id === item.id) === -1;
|
|
@@ -22723,11 +23063,11 @@ var GridController = class extends MDControlController {
|
|
|
22723
23063
|
(item) => item.model.appDEFieldId === groupAppDEFieldId
|
|
22724
23064
|
);
|
|
22725
23065
|
if (!this.groupFieldColumn) {
|
|
22726
|
-
throw new
|
|
23066
|
+
throw new RuntimeModelError61(this.model, "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217");
|
|
22727
23067
|
}
|
|
22728
23068
|
const groupFieldName = this.groupFieldColumn.model.id;
|
|
22729
23069
|
if (!this.groupFieldColumn.model.appCodeListId) {
|
|
22730
|
-
throw new
|
|
23070
|
+
throw new RuntimeModelError61(
|
|
22731
23071
|
this.groupFieldColumn.model,
|
|
22732
23072
|
"\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217".concat(groupFieldName, "\u6CA1\u6709\u914D\u7F6E\u4EE3\u7801\u8868")
|
|
22733
23073
|
);
|
|
@@ -22737,7 +23077,7 @@ var GridController = class extends MDControlController {
|
|
|
22737
23077
|
);
|
|
22738
23078
|
if (index !== -1 && index !== 0) {
|
|
22739
23079
|
if (this.isMultistageHeader) {
|
|
22740
|
-
throw new
|
|
23080
|
+
throw new RuntimeModelError61(
|
|
22741
23081
|
this.model,
|
|
22742
23082
|
"\u8BF7\u5C06\u5206\u7EC4\u5C5E\u6027\u5217".concat(groupFieldName, "\u914D\u7F6E\u4E3A\u7B2C\u4E00\u5217")
|
|
22743
23083
|
);
|
|
@@ -22747,10 +23087,10 @@ var GridController = class extends MDControlController {
|
|
|
22747
23087
|
}
|
|
22748
23088
|
if (groupMode === "CODELIST") {
|
|
22749
23089
|
if (!groupCodeListId) {
|
|
22750
|
-
throw new
|
|
23090
|
+
throw new RuntimeModelError61(this.model, "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868");
|
|
22751
23091
|
}
|
|
22752
23092
|
if (this.groupFieldColumn.model.appCodeListId !== groupCodeListId) {
|
|
22753
|
-
throw new
|
|
23093
|
+
throw new RuntimeModelError61(
|
|
22754
23094
|
this.model,
|
|
22755
23095
|
"\u5206\u7EC4\u4EE3\u7801\u8868\u4E0E\u5C5E\u6027\u5217".concat(groupFieldName, "\u7684\u4EE3\u7801\u8868\u4E0D\u4E00\u81F4")
|
|
22756
23096
|
);
|
|
@@ -22837,7 +23177,7 @@ var GridController = class extends MDControlController {
|
|
|
22837
23177
|
return;
|
|
22838
23178
|
}
|
|
22839
23179
|
if (!aggAppDEDataSetId || !aggAppDataEntityId) {
|
|
22840
|
-
throw new
|
|
23180
|
+
throw new RuntimeModelError61(this.model, "\u7F3A\u5C11\u914D\u7F6E\u805A\u5408\u5B9E\u4F53\u6216\u805A\u5408\u6570\u636E\u96C6");
|
|
22841
23181
|
}
|
|
22842
23182
|
const params = await this.getFetchParams();
|
|
22843
23183
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
@@ -23207,7 +23547,7 @@ var GridController = class extends MDControlController {
|
|
|
23207
23547
|
throw new RuntimeError53("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
23208
23548
|
}
|
|
23209
23549
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
23210
|
-
row.cacheData =
|
|
23550
|
+
row.cacheData = clone25(row.data);
|
|
23211
23551
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
23212
23552
|
Object.assign(row.data, defaultVal);
|
|
23213
23553
|
}
|
|
@@ -23376,7 +23716,7 @@ var GridController = class extends MDControlController {
|
|
|
23376
23716
|
}
|
|
23377
23717
|
});
|
|
23378
23718
|
}
|
|
23379
|
-
const cloneData =
|
|
23719
|
+
const cloneData = clone25(
|
|
23380
23720
|
data2.map((item) => {
|
|
23381
23721
|
return item.getOrigin();
|
|
23382
23722
|
})
|
|
@@ -23614,7 +23954,7 @@ var GridController = class extends MDControlController {
|
|
|
23614
23954
|
import { DataTypes as DataTypes4, ModelError as ModelError29, plus as plus2 } from "@ibiz-template/core";
|
|
23615
23955
|
import dayjs5 from "dayjs";
|
|
23616
23956
|
import { debounce as debounce3 } from "lodash-es";
|
|
23617
|
-
import { clone as
|
|
23957
|
+
import { clone as clone26, isNil as isNil23 } from "ramda";
|
|
23618
23958
|
var GridFieldColumnController = class extends GridColumnController {
|
|
23619
23959
|
constructor() {
|
|
23620
23960
|
super(...arguments);
|
|
@@ -23647,6 +23987,15 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23647
23987
|
get hasAction() {
|
|
23648
23988
|
return !!this.model.deuiactionId;
|
|
23649
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
|
+
}
|
|
23650
23999
|
async onInit() {
|
|
23651
24000
|
await super.onInit();
|
|
23652
24001
|
this.loadCodeList = debounce3(this.loadCodeList, 300, {
|
|
@@ -23688,7 +24037,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23688
24037
|
* @readonly
|
|
23689
24038
|
*/
|
|
23690
24039
|
clickable(row) {
|
|
23691
|
-
const value = row.data[this.
|
|
24040
|
+
const value = row.data[this.fieldName];
|
|
23692
24041
|
return (this.isLinkColumn || this.hasAction) && value;
|
|
23693
24042
|
}
|
|
23694
24043
|
/**
|
|
@@ -23725,7 +24074,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23725
24074
|
* @returns {*} {Promise<void>}
|
|
23726
24075
|
*/
|
|
23727
24076
|
async openLinkView(row, event) {
|
|
23728
|
-
const curValue = row.data[this.
|
|
24077
|
+
const curValue = row.data[this.fieldName];
|
|
23729
24078
|
if (!curValue) {
|
|
23730
24079
|
return;
|
|
23731
24080
|
}
|
|
@@ -23743,7 +24092,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23743
24092
|
srfkey: value,
|
|
23744
24093
|
...wfContext
|
|
23745
24094
|
});
|
|
23746
|
-
const tempParams =
|
|
24095
|
+
const tempParams = clone26(this.params);
|
|
23747
24096
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
23748
24097
|
row.data,
|
|
23749
24098
|
tempContext,
|
|
@@ -23914,7 +24263,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
23914
24263
|
};
|
|
23915
24264
|
|
|
23916
24265
|
// src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts
|
|
23917
|
-
import { RuntimeModelError as
|
|
24266
|
+
import { RuntimeModelError as RuntimeModelError62 } from "@ibiz-template/core";
|
|
23918
24267
|
var GridUAColumnController = class extends GridColumnController {
|
|
23919
24268
|
/**
|
|
23920
24269
|
* 给rowController初始化操作列的状态
|
|
@@ -23927,7 +24276,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
23927
24276
|
var _a;
|
|
23928
24277
|
const { deuiactionGroup } = this.model;
|
|
23929
24278
|
if (!deuiactionGroup) {
|
|
23930
|
-
throw new
|
|
24279
|
+
throw new RuntimeModelError62(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
23931
24280
|
}
|
|
23932
24281
|
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
23933
24282
|
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -24020,15 +24369,6 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
24020
24369
|
}
|
|
24021
24370
|
return void 0;
|
|
24022
24371
|
}
|
|
24023
|
-
/**
|
|
24024
|
-
* 列数据属性字段名称
|
|
24025
|
-
* @author lxm
|
|
24026
|
-
* @date 2023-06-25 09:26:04
|
|
24027
|
-
* @readonly
|
|
24028
|
-
*/
|
|
24029
|
-
get fieldName() {
|
|
24030
|
-
return this.model.dataItemName;
|
|
24031
|
-
}
|
|
24032
24372
|
/**
|
|
24033
24373
|
* 初始化方法,生成表格编辑项控制器
|
|
24034
24374
|
*
|
|
@@ -25143,10 +25483,10 @@ import {
|
|
|
25143
25483
|
mergeInLeft as mergeInLeft3,
|
|
25144
25484
|
recursiveIterate as recursiveIterate9
|
|
25145
25485
|
} from "@ibiz-template/core";
|
|
25146
|
-
import { clone as
|
|
25486
|
+
import { clone as clone27, isNil as isNil24 } from "ramda";
|
|
25147
25487
|
|
|
25148
25488
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
25149
|
-
import { RuntimeModelError as
|
|
25489
|
+
import { RuntimeModelError as RuntimeModelError63 } from "@ibiz-template/core";
|
|
25150
25490
|
var ExcludeOPs = [
|
|
25151
25491
|
"ISNULL" /* IS_NULL */,
|
|
25152
25492
|
"ISNOTNULL" /* IS_NOT_NULL */
|
|
@@ -25187,7 +25527,7 @@ var SearchBarFilterController = class {
|
|
|
25187
25527
|
async init() {
|
|
25188
25528
|
if (!this.noEditor) {
|
|
25189
25529
|
if (!this.model.editor) {
|
|
25190
|
-
throw new
|
|
25530
|
+
throw new RuntimeModelError63(this.model, "\u7F3A\u5C11\u7F16\u8F91\u5668\u6A21\u578B");
|
|
25191
25531
|
}
|
|
25192
25532
|
this.editorProvider = await getEditorProvider(this.model.editor);
|
|
25193
25533
|
if (this.editorProvider) {
|
|
@@ -25647,7 +25987,7 @@ var SearchBarController = class extends ControlController {
|
|
|
25647
25987
|
}
|
|
25648
25988
|
});
|
|
25649
25989
|
if (addSearchBarFilters.length > 0) {
|
|
25650
|
-
this.model =
|
|
25990
|
+
this.model = clone27(this.model);
|
|
25651
25991
|
this.model.searchBarFilters = addSearchBarFilters.concat(...mergeFilters);
|
|
25652
25992
|
this.model.enableFilter = true;
|
|
25653
25993
|
}
|
|
@@ -26231,7 +26571,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
26231
26571
|
// src/controller/control/tree/tree.controller.ts
|
|
26232
26572
|
import {
|
|
26233
26573
|
RuntimeError as RuntimeError57,
|
|
26234
|
-
RuntimeModelError as
|
|
26574
|
+
RuntimeModelError as RuntimeModelError64,
|
|
26235
26575
|
recursiveIterate as recursiveIterate10
|
|
26236
26576
|
} from "@ibiz-template/core";
|
|
26237
26577
|
|
|
@@ -27102,7 +27442,7 @@ var TreeController = class extends MDControlController {
|
|
|
27102
27442
|
const { sortAppDEFieldId, sortDir, allowOrder } = orderNodeModel;
|
|
27103
27443
|
if (allowOrder === true) {
|
|
27104
27444
|
if (!sortAppDEFieldId) {
|
|
27105
|
-
throw new
|
|
27445
|
+
throw new RuntimeModelError64(orderNodeModel, "\u7F3A\u5C11\u914D\u7F6E\u6392\u5E8F\u5C5E\u6027");
|
|
27106
27446
|
}
|
|
27107
27447
|
const sortField = sortAppDEFieldId.toLowerCase();
|
|
27108
27448
|
const isAsc = sortDir === "ASC";
|
|
@@ -27183,7 +27523,7 @@ var TreeController = class extends MDControlController {
|
|
|
27183
27523
|
async modifyNodeText(nodeData, text) {
|
|
27184
27524
|
const model = this.getNodeModel(nodeData._nodeId);
|
|
27185
27525
|
if (!model.allowEditText) {
|
|
27186
|
-
throw new
|
|
27526
|
+
throw new RuntimeModelError64(model, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u7F16\u8F91\u6A21\u5F0F\uFF1A\u540D\u79F0");
|
|
27187
27527
|
}
|
|
27188
27528
|
if (!nodeData._deData) {
|
|
27189
27529
|
throw new RuntimeError57("\u4E0D\u662F\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E");
|
|
@@ -27547,7 +27887,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
27547
27887
|
};
|
|
27548
27888
|
|
|
27549
27889
|
// src/controller/control/md-ctrl/md-ctrl.controller.ts
|
|
27550
|
-
import { RuntimeModelError as
|
|
27890
|
+
import { RuntimeModelError as RuntimeModelError65 } from "@ibiz-template/core";
|
|
27551
27891
|
import { isNil as isNil25 } from "ramda";
|
|
27552
27892
|
|
|
27553
27893
|
// src/controller/control/md-ctrl/md-ctrl.service.ts
|
|
@@ -27754,7 +28094,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
27754
28094
|
const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
|
|
27755
28095
|
if (enableGroup && groupMode) {
|
|
27756
28096
|
if (!groupAppDEFieldId) {
|
|
27757
|
-
throw new
|
|
28097
|
+
throw new RuntimeModelError65(this.model, "\u5206\u7EC4\u5C5E\u6027\u6CA1\u6709\u914D\u7F6E");
|
|
27758
28098
|
}
|
|
27759
28099
|
if (groupMode === "AUTO") {
|
|
27760
28100
|
this.handleAutoGroup();
|
|
@@ -27821,7 +28161,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
27821
28161
|
async handleCodeListGroup() {
|
|
27822
28162
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
27823
28163
|
if (!groupCodeListId) {
|
|
27824
|
-
throw new
|
|
28164
|
+
throw new RuntimeModelError65(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
27825
28165
|
}
|
|
27826
28166
|
const { items } = this.state;
|
|
27827
28167
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -27851,7 +28191,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
27851
28191
|
};
|
|
27852
28192
|
|
|
27853
28193
|
// src/controller/control/kanban/kanban.controller.ts
|
|
27854
|
-
import { RuntimeError as RuntimeError59, RuntimeModelError as
|
|
28194
|
+
import { RuntimeError as RuntimeError59, RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
|
|
27855
28195
|
import { isNil as isNil26 } from "ramda";
|
|
27856
28196
|
|
|
27857
28197
|
// src/controller/control/kanban/kanban.service.ts
|
|
@@ -27929,10 +28269,10 @@ var KanbanController = class extends DataViewControlController {
|
|
|
27929
28269
|
const sortField = this.model.minorSortAppDEFieldId;
|
|
27930
28270
|
const { minorSortDir } = this.model;
|
|
27931
28271
|
if (!sortField) {
|
|
27932
|
-
throw new
|
|
28272
|
+
throw new RuntimeModelError66(this.model, "\u6392\u5E8F\u5C5E\u6027\u6CA1\u914D\u7F6E");
|
|
27933
28273
|
}
|
|
27934
28274
|
if (!minorSortDir) {
|
|
27935
|
-
throw new
|
|
28275
|
+
throw new RuntimeModelError66(this.model, "\u6392\u5E8F\u65B9\u5411\u6CA1\u914D\u7F6E");
|
|
27936
28276
|
}
|
|
27937
28277
|
const isAsc = minorSortDir === "ASC";
|
|
27938
28278
|
items.forEach((item) => {
|
|
@@ -28076,7 +28416,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
28076
28416
|
async handleCodeListGroup() {
|
|
28077
28417
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
28078
28418
|
if (!groupCodeListId) {
|
|
28079
|
-
throw new
|
|
28419
|
+
throw new RuntimeModelError66(this.model, "\u5206\u7EC4\u4EE3\u7801\u8868\u6CA1\u6709\u914D\u7F6E");
|
|
28080
28420
|
}
|
|
28081
28421
|
const { items } = this.state;
|
|
28082
28422
|
const groupMap = /* @__PURE__ */ new Map();
|
|
@@ -28375,7 +28715,7 @@ import {
|
|
|
28375
28715
|
awaitTimeout as awaitTimeout3,
|
|
28376
28716
|
recursiveIterate as recursiveIterate11
|
|
28377
28717
|
} from "@ibiz-template/core";
|
|
28378
|
-
import { clone as
|
|
28718
|
+
import { clone as clone28 } from "ramda";
|
|
28379
28719
|
|
|
28380
28720
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
28381
28721
|
var TreeGridExService = class extends TreeService {
|
|
@@ -28809,7 +29149,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
28809
29149
|
throw new RuntimeError60("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
28810
29150
|
}
|
|
28811
29151
|
if (row.data._deData.srfuf === 1 /* UPDATE */) {
|
|
28812
|
-
row.cacheData =
|
|
29152
|
+
row.cacheData = clone28(row.data);
|
|
28813
29153
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
28814
29154
|
Object.assign(row.data, defaultVal);
|
|
28815
29155
|
}
|
|
@@ -28920,9 +29260,9 @@ var TreeGridExColumnController = class {
|
|
|
28920
29260
|
import {
|
|
28921
29261
|
DataTypes as DataTypes5,
|
|
28922
29262
|
RuntimeError as RuntimeError61,
|
|
28923
|
-
RuntimeModelError as
|
|
29263
|
+
RuntimeModelError as RuntimeModelError67
|
|
28924
29264
|
} from "@ibiz-template/core";
|
|
28925
|
-
import { clone as
|
|
29265
|
+
import { clone as clone29 } from "ramda";
|
|
28926
29266
|
import dayjs6 from "dayjs";
|
|
28927
29267
|
var TreeGridExNodeColumnController = class {
|
|
28928
29268
|
/**
|
|
@@ -28951,7 +29291,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
28951
29291
|
}
|
|
28952
29292
|
);
|
|
28953
29293
|
if (!nodeColumn || !nodeDataItem) {
|
|
28954
|
-
throw new
|
|
29294
|
+
throw new RuntimeModelError67(
|
|
28955
29295
|
nodeModel,
|
|
28956
29296
|
"\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u5BF9\u5E94\u8868\u683C\u5217".concat(this.fieldColumn.name, "\u7684\u6570\u636E\u9879")
|
|
28957
29297
|
);
|
|
@@ -28965,7 +29305,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
28965
29305
|
}
|
|
28966
29306
|
);
|
|
28967
29307
|
if (!nodeEditItem) {
|
|
28968
|
-
throw new
|
|
29308
|
+
throw new RuntimeModelError67(
|
|
28969
29309
|
nodeModel,
|
|
28970
29310
|
"\u6CA1\u6709\u627E\u5230\u5BF9\u5E94\u8868\u683C\u5217".concat(this.fieldColumn.name, "\u7684\u7F16\u8F91\u9879\u6A21\u578B")
|
|
28971
29311
|
);
|
|
@@ -29131,7 +29471,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
29131
29471
|
srfkey: value,
|
|
29132
29472
|
...wfContext
|
|
29133
29473
|
});
|
|
29134
|
-
const tempParams =
|
|
29474
|
+
const tempParams = clone29(this.params);
|
|
29135
29475
|
const { userParam } = this.nodeColumn;
|
|
29136
29476
|
if (userParam) {
|
|
29137
29477
|
const { navigateContexts, navigateParams } = parseUserParams(userParam);
|
|
@@ -29365,7 +29705,7 @@ var TreeGridExFieldColumnController = class extends TreeGridExColumnController {
|
|
|
29365
29705
|
};
|
|
29366
29706
|
|
|
29367
29707
|
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.ts
|
|
29368
|
-
import { RuntimeModelError as
|
|
29708
|
+
import { RuntimeModelError as RuntimeModelError68 } from "@ibiz-template/core";
|
|
29369
29709
|
var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
29370
29710
|
/**
|
|
29371
29711
|
* 给rowController初始化操作列的状态
|
|
@@ -29379,7 +29719,7 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
|
29379
29719
|
const { deuiactionGroup } = this.model;
|
|
29380
29720
|
if (!deuiactionGroup) {
|
|
29381
29721
|
return;
|
|
29382
|
-
throw new
|
|
29722
|
+
throw new RuntimeModelError68(this.model, "\u64CD\u4F5C\u5217\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A\u7EC4");
|
|
29383
29723
|
}
|
|
29384
29724
|
if (!((_a = deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a.length)) {
|
|
29385
29725
|
ibiz.log.debug("\u64CD\u4F5C\u5217\u754C\u9762\u884C\u4E3A\u7EC4\u6CA1\u6709\u914D\u7F6E\u754C\u9762\u884C\u4E3A");
|
|
@@ -29433,7 +29773,7 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
|
29433
29773
|
};
|
|
29434
29774
|
|
|
29435
29775
|
// src/controller/control/tree-grid/tree-grid.controller.ts
|
|
29436
|
-
import { RuntimeModelError as
|
|
29776
|
+
import { RuntimeModelError as RuntimeModelError69 } from "@ibiz-template/core";
|
|
29437
29777
|
var TreeGridController = class extends GridController {
|
|
29438
29778
|
constructor() {
|
|
29439
29779
|
super(...arguments);
|
|
@@ -29478,10 +29818,10 @@ var TreeGridController = class extends GridController {
|
|
|
29478
29818
|
return item.treeColumnMode === 2 || item.treeColumnMode === 3;
|
|
29479
29819
|
});
|
|
29480
29820
|
if (!treeGridParent) {
|
|
29481
|
-
throw new
|
|
29821
|
+
throw new RuntimeModelError69(this.model, "\u6811\u8868\u683C\u65E0\u503C\u5217\u6A21\u5F0F");
|
|
29482
29822
|
}
|
|
29483
29823
|
if (!treeGridValue) {
|
|
29484
|
-
throw new
|
|
29824
|
+
throw new RuntimeModelError69(this.model, "\u6811\u8868\u683C\u65E0\u7236\u503C\u5217\u6A21\u5F0F");
|
|
29485
29825
|
}
|
|
29486
29826
|
this.treeGridValueField = treeGridValue.appDEFieldId.toLowerCase();
|
|
29487
29827
|
this.treeGridParentField = treeGridParent.appDEFieldId.toLowerCase();
|
|
@@ -31206,8 +31546,8 @@ var ViewEngineBase = class {
|
|
|
31206
31546
|
};
|
|
31207
31547
|
|
|
31208
31548
|
// src/engine/md-view.engine.ts
|
|
31209
|
-
import { RuntimeModelError as
|
|
31210
|
-
import { clone as
|
|
31549
|
+
import { RuntimeModelError as RuntimeModelError70 } from "@ibiz-template/core";
|
|
31550
|
+
import { clone as clone30 } from "ramda";
|
|
31211
31551
|
var MDViewEngine = class extends ViewEngineBase {
|
|
31212
31552
|
/**
|
|
31213
31553
|
* 多数据部件名称
|
|
@@ -31390,7 +31730,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
31390
31730
|
view: this.view
|
|
31391
31731
|
}));
|
|
31392
31732
|
if (result === -1) {
|
|
31393
|
-
throw new
|
|
31733
|
+
throw new RuntimeModelError70(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
31394
31734
|
} else {
|
|
31395
31735
|
return {
|
|
31396
31736
|
cancel: !result.ok
|
|
@@ -31413,9 +31753,9 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
31413
31753
|
(item) => item.id === "newdata"
|
|
31414
31754
|
);
|
|
31415
31755
|
if (!openAppViewLogic) {
|
|
31416
|
-
throw new
|
|
31756
|
+
throw new RuntimeModelError70(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
31417
31757
|
}
|
|
31418
|
-
const params =
|
|
31758
|
+
const params = clone30(this.view.params);
|
|
31419
31759
|
if (copyMode) {
|
|
31420
31760
|
params.srfcopymode = copyMode;
|
|
31421
31761
|
}
|
|
@@ -31427,7 +31767,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
31427
31767
|
view: this.view
|
|
31428
31768
|
}));
|
|
31429
31769
|
if (result === -1) {
|
|
31430
|
-
throw new
|
|
31770
|
+
throw new RuntimeModelError70(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
31431
31771
|
} else {
|
|
31432
31772
|
return {
|
|
31433
31773
|
cancel: !result.ok
|
|
@@ -31738,13 +32078,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
31738
32078
|
};
|
|
31739
32079
|
|
|
31740
32080
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
31741
|
-
import { RuntimeModelError as
|
|
32081
|
+
import { RuntimeModelError as RuntimeModelError71 } from "@ibiz-template/core";
|
|
31742
32082
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
31743
32083
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31744
32084
|
execute(executeParams) {
|
|
31745
32085
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
31746
32086
|
if (!appDEUILogicId) {
|
|
31747
|
-
throw new
|
|
32087
|
+
throw new RuntimeModelError71(this.logic, "\u6CA1\u6709\u914D\u7F6E\u5B9E\u4F53\u754C\u9762\u903B\u8F91");
|
|
31748
32088
|
}
|
|
31749
32089
|
execUILogic(appDEUILogicId, appDataEntityId, executeParams);
|
|
31750
32090
|
}
|
|
@@ -32202,7 +32542,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
32202
32542
|
};
|
|
32203
32543
|
|
|
32204
32544
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
32205
|
-
import { RuntimeError as RuntimeError68, RuntimeModelError as
|
|
32545
|
+
import { RuntimeError as RuntimeError68, RuntimeModelError as RuntimeModelError72 } from "@ibiz-template/core";
|
|
32206
32546
|
var TimerTrigger = class extends LogicTrigger {
|
|
32207
32547
|
constructor() {
|
|
32208
32548
|
super(...arguments);
|
|
@@ -32210,7 +32550,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
32210
32550
|
}
|
|
32211
32551
|
start() {
|
|
32212
32552
|
if (!this.logic.timer) {
|
|
32213
|
-
throw new
|
|
32553
|
+
throw new RuntimeModelError72(this.logic, "\u5B9A\u65F6\u5668\u7F3A\u5C11\u5B9A\u65F6\u95F4\u9694");
|
|
32214
32554
|
}
|
|
32215
32555
|
this.timer = setInterval(() => {
|
|
32216
32556
|
if (!this.scheduler.defaultParamsCb) {
|
|
@@ -32232,7 +32572,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
32232
32572
|
import {
|
|
32233
32573
|
ModelError as ModelError34,
|
|
32234
32574
|
RuntimeError as RuntimeError69,
|
|
32235
|
-
RuntimeModelError as
|
|
32575
|
+
RuntimeModelError as RuntimeModelError73
|
|
32236
32576
|
} from "@ibiz-template/core";
|
|
32237
32577
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
32238
32578
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
@@ -32278,7 +32618,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32278
32618
|
} else {
|
|
32279
32619
|
openViewRef = appUILogic.openDataAppView;
|
|
32280
32620
|
if (!openViewRef) {
|
|
32281
|
-
throw new
|
|
32621
|
+
throw new RuntimeModelError73(
|
|
32282
32622
|
appUILogic,
|
|
32283
32623
|
"opendata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE"
|
|
32284
32624
|
);
|
|
@@ -32286,7 +32626,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32286
32626
|
}
|
|
32287
32627
|
const openView = openViewRef.refAppViewId;
|
|
32288
32628
|
if (!openView) {
|
|
32289
|
-
throw new
|
|
32629
|
+
throw new RuntimeModelError73(
|
|
32290
32630
|
appUILogic,
|
|
32291
32631
|
"opendata\u89C6\u56FE\u903B\u8F91\u7684\u9ED8\u8BA4\u6253\u5F00\u89C6\u56FE\u6CA1\u6709\u5B9E\u9645\u5F15\u7528\u89C6\u56FE"
|
|
32292
32632
|
);
|
|
@@ -32316,7 +32656,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32316
32656
|
);
|
|
32317
32657
|
const typeFileName = appDataEntity.formTypeAppDEFieldId || appDataEntity.dataTypeAppDEFieldId;
|
|
32318
32658
|
if (!typeFileName) {
|
|
32319
|
-
throw new
|
|
32659
|
+
throw new RuntimeModelError73(
|
|
32320
32660
|
appUILogic,
|
|
32321
32661
|
"".concat(appDataEntity.codeName, "[\u591A\u8868\u5355\u5B9E\u4F53] or [\u7D22\u5F15\u5B9E\u4F53]\u7F3A\u5C11\u7C7B\u578B\u5C5E\u6027\u914D\u7F6E")
|
|
32322
32662
|
);
|
|
@@ -32324,7 +32664,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32324
32664
|
const { data } = parameters;
|
|
32325
32665
|
const formTypeValue = data[0][typeFileName];
|
|
32326
32666
|
if (!formTypeValue) {
|
|
32327
|
-
throw new
|
|
32667
|
+
throw new RuntimeModelError73(appUILogic, "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C");
|
|
32328
32668
|
}
|
|
32329
32669
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
32330
32670
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
@@ -32366,7 +32706,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32366
32706
|
return viewRef.refMode.toLowerCase() !== parentDeName;
|
|
32367
32707
|
});
|
|
32368
32708
|
if (!newViewRef) {
|
|
32369
|
-
throw new
|
|
32709
|
+
throw new RuntimeModelError73(
|
|
32370
32710
|
appUILogic,
|
|
32371
32711
|
"\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE"
|
|
32372
32712
|
);
|
|
@@ -32376,7 +32716,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32376
32716
|
} else {
|
|
32377
32717
|
newViewRef = newDataAppView;
|
|
32378
32718
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
32379
|
-
throw new
|
|
32719
|
+
throw new RuntimeModelError73(
|
|
32380
32720
|
appUILogic,
|
|
32381
32721
|
"newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE"
|
|
32382
32722
|
);
|
|
@@ -32440,7 +32780,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32440
32780
|
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
32441
32781
|
const { context, params, ...rest } = parameters;
|
|
32442
32782
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
32443
|
-
throw new
|
|
32783
|
+
throw new RuntimeModelError73(appUILogic, "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE");
|
|
32444
32784
|
}
|
|
32445
32785
|
const result = await ibiz.commands.execute(
|
|
32446
32786
|
OpenAppViewCommand.TAG,
|
|
@@ -32491,7 +32831,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
32491
32831
|
const minorDERs = selfDe.minorAppDERSs;
|
|
32492
32832
|
const pickParentDeName = newViewRef.refMode.toLowerCase();
|
|
32493
32833
|
if (!minorDERs) {
|
|
32494
|
-
throw new
|
|
32834
|
+
throw new RuntimeModelError73(selfDe, "\u5B9E\u4F53\u6CA1\u6709\u4ECE\u5173\u7CFB\u96C6\u5408\uFF01");
|
|
32495
32835
|
}
|
|
32496
32836
|
let pickParentFieldName = "";
|
|
32497
32837
|
minorDERs == null ? void 0 : minorDERs.forEach((item) => {
|
|
@@ -32588,12 +32928,12 @@ var ControlEventTrigger = class extends LogicTrigger {
|
|
|
32588
32928
|
};
|
|
32589
32929
|
|
|
32590
32930
|
// src/logic-scheduler/executor/app-ui-action-executor.ts
|
|
32591
|
-
import { RuntimeModelError as
|
|
32931
|
+
import { RuntimeModelError as RuntimeModelError74 } from "@ibiz-template/core";
|
|
32592
32932
|
var AppDEUIActionExecutor = class extends LogicExecutor {
|
|
32593
32933
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32594
32934
|
execute(executeParams) {
|
|
32595
32935
|
if (!this.logic.appDEUIActionId) {
|
|
32596
|
-
throw new
|
|
32936
|
+
throw new RuntimeModelError74(
|
|
32597
32937
|
this.logic,
|
|
32598
32938
|
"\u903B\u8F91\u4E2D\u7F3A\u5C11\u89E6\u53D1\u5E94\u7528\u5B9E\u4F53\u754C\u9762\u884C\u4E3Aid"
|
|
32599
32939
|
);
|