@ibiz-template/runtime 0.6.13 → 0.6.15
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 +580 -330
- package/dist/index.system.min.js +1 -1
- package/out/controller/common/control/control.controller.d.ts +58 -1
- package/out/controller/common/control/control.controller.d.ts.map +1 -1
- package/out/controller/common/control/control.controller.js +111 -2
- package/out/controller/common/control/md-control.controller.d.ts +16 -22
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +59 -48
- package/out/controller/control/chart/generator/base-series-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/base-series-generator.js +1 -0
- package/out/controller/control/form/edit-form/edit-form.controller.d.ts +11 -0
- package/out/controller/control/form/edit-form/edit-form.controller.d.ts.map +1 -1
- package/out/controller/control/form/edit-form/edit-form.controller.js +37 -7
- package/out/controller/control/form/form/form.controller.d.ts +1 -20
- package/out/controller/control/form/form/form.controller.d.ts.map +1 -1
- package/out/controller/control/form/form/form.controller.js +17 -91
- 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-detail/form-detail.state.d.ts +8 -0
- package/out/controller/control/form/form-detail/form-detail/form-detail.state.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-detail/form-detail.state.js +20 -0
- package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-item/form-item.controller.js +9 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.js +6 -3
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +2 -0
- 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 +4 -2
- package/out/controller/control/md-ctrl/md-ctrl.controller.d.ts.map +1 -1
- package/out/controller/control/md-ctrl/md-ctrl.controller.js +3 -1
- package/out/controller/control/panel/panel/panel-item.controller.d.ts.map +1 -1
- package/out/controller/control/panel/panel/panel-item.controller.js +4 -0
- package/out/controller/control/panel/panel/panel-item.state.d.ts +8 -0
- package/out/controller/control/panel/panel/panel-item.state.d.ts.map +1 -1
- package/out/controller/control/panel/panel/panel-item.state.js +20 -0
- package/out/controller/control/report-panel/report-panel.controller.d.ts.map +1 -1
- package/out/controller/control/report-panel/report-panel.controller.js +3 -1
- package/out/controller/control/tree/tree.controller.d.ts +11 -1
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +37 -3
- package/out/controller/utils/data-file-util/data-file-util.d.ts.map +1 -1
- package/out/controller/utils/data-file-util/data-file-util.js +1 -1
- package/out/engine/md-view.engine.d.ts +24 -1
- package/out/engine/md-view.engine.d.ts.map +1 -1
- package/out/engine/md-view.engine.js +60 -7
- package/out/engine/view-base.engine.d.ts +1 -1
- package/out/engine/view-base.engine.d.ts.map +1 -1
- package/out/engine/view-base.engine.js +7 -2
- package/out/interface/controller/state/control/i-tree.state.d.ts +21 -0
- package/out/interface/controller/state/control/i-tree.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/panel-item/i-panel-item.state.d.ts +8 -0
- package/out/interface/controller/state/control/panel-item/i-panel-item.state.d.ts.map +1 -1
- package/out/model/utils/util.d.ts +9 -0
- package/out/model/utils/util.d.ts.map +1 -1
- package/out/model/utils/util.js +12 -0
- package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts +1 -0
- package/out/service/utils/dynamic-code-list/dynamic-code-list.d.ts.map +1 -1
- package/out/service/utils/dynamic-code-list/dynamic-code-list.js +12 -5
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts +1 -0
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-data-set-node-data.js +1 -0
- package/out/service/vo/tree-node-data/tree-node-data.d.ts +10 -0
- package/out/service/vo/tree-node-data/tree-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-node-data.js +23 -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 +6 -2
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
|
@@ -831,6 +831,10 @@ function findAppDEMethod(appDataEntity, id) {
|
|
|
831
831
|
}
|
|
832
832
|
return null;
|
|
833
833
|
}
|
|
834
|
+
function getCtrlTeleportTag(control) {
|
|
835
|
+
var _a, _b;
|
|
836
|
+
return (_b = (_a = control.controlParam) == null ? void 0 : _a.ctrlParams) == null ? void 0 : _b.TELEPORTTAG;
|
|
837
|
+
}
|
|
834
838
|
|
|
835
839
|
// src/model/layout/layout.ts
|
|
836
840
|
import { isArray as isArray2, isObject, isString } from "lodash-es";
|
|
@@ -3327,8 +3331,8 @@ var baseStyle = {
|
|
|
3327
3331
|
position: "fixed",
|
|
3328
3332
|
zIndex: "10000"
|
|
3329
3333
|
};
|
|
3330
|
-
function cloneElement(
|
|
3331
|
-
const element = getAnimationElement(
|
|
3334
|
+
function cloneElement(clone34, teleport = document.body, isRemoveChild = true) {
|
|
3335
|
+
const element = getAnimationElement(clone34);
|
|
3332
3336
|
if (element == null) {
|
|
3333
3337
|
throw new Error("Cannot clone a null or undefined element.");
|
|
3334
3338
|
}
|
|
@@ -3747,11 +3751,11 @@ function arrayContains(arr, val) {
|
|
|
3747
3751
|
});
|
|
3748
3752
|
}
|
|
3749
3753
|
function cloneObject(o) {
|
|
3750
|
-
var
|
|
3754
|
+
var clone34 = {};
|
|
3751
3755
|
for (var p in o) {
|
|
3752
|
-
|
|
3756
|
+
clone34[p] = o[p];
|
|
3753
3757
|
}
|
|
3754
|
-
return
|
|
3758
|
+
return clone34;
|
|
3755
3759
|
}
|
|
3756
3760
|
function replaceObjectProps(o1, o2) {
|
|
3757
3761
|
var o = cloneObject(o1);
|
|
@@ -6581,6 +6585,14 @@ var DynamicCodeListCache = class {
|
|
|
6581
6585
|
result.cls = cls;
|
|
6582
6586
|
return result;
|
|
6583
6587
|
}
|
|
6588
|
+
sortShoworder(arr) {
|
|
6589
|
+
arr.forEach((item) => {
|
|
6590
|
+
if (!("showorder" in item)) {
|
|
6591
|
+
Object.assign(item, { showorder: 1e3 });
|
|
6592
|
+
}
|
|
6593
|
+
});
|
|
6594
|
+
return arr.sort((a, b) => a.showorder - b.showorder);
|
|
6595
|
+
}
|
|
6584
6596
|
/**
|
|
6585
6597
|
* 加载服务获取数据,返回代码项
|
|
6586
6598
|
*
|
|
@@ -6626,13 +6638,10 @@ var DynamicCodeListCache = class {
|
|
|
6626
6638
|
tempParams
|
|
6627
6639
|
);
|
|
6628
6640
|
const presetresultItems = [];
|
|
6629
|
-
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
)
|
|
6633
|
-
}
|
|
6634
|
-
if (res2.data.items.length) {
|
|
6635
|
-
res2.data.items.forEach((item) => {
|
|
6641
|
+
const { items } = res2.data;
|
|
6642
|
+
const sortItems = this.sortShoworder(items);
|
|
6643
|
+
if (sortItems.length) {
|
|
6644
|
+
items.forEach((item) => {
|
|
6636
6645
|
presetresultItems.push(this.presetconvertData(item));
|
|
6637
6646
|
});
|
|
6638
6647
|
}
|
|
@@ -12057,6 +12066,7 @@ var TreeNodeData = class {
|
|
|
12057
12066
|
this._parent = parentNodeData;
|
|
12058
12067
|
this._nodeType = model.treeNodeType;
|
|
12059
12068
|
this._disableSelect = model.disableSelect === true;
|
|
12069
|
+
this._changedOnly = model.enableRowEditChangedOnly === true;
|
|
12060
12070
|
if (this._parent) {
|
|
12061
12071
|
this._context = { ...this._parent._context };
|
|
12062
12072
|
}
|
|
@@ -12099,6 +12109,26 @@ var TreeNodeData = class {
|
|
|
12099
12109
|
}
|
|
12100
12110
|
return Object.values(icon).length > 0 ? icon : void 0;
|
|
12101
12111
|
}
|
|
12112
|
+
/**
|
|
12113
|
+
* 获取改变数据
|
|
12114
|
+
* @author zzq
|
|
12115
|
+
* @date 2024-03-25 14:24:55
|
|
12116
|
+
* @return {*} {(IData | undefined)}
|
|
12117
|
+
* @memberof TreeNodeData
|
|
12118
|
+
*/
|
|
12119
|
+
getDiffData() {
|
|
12120
|
+
if (this._deData && this._oldDeData) {
|
|
12121
|
+
const diffData = {};
|
|
12122
|
+
Object.keys(this._deData).forEach((key) => {
|
|
12123
|
+
if (this._deData[key] !== this._oldDeData[key] || key === this._deData.srfkeyfield) {
|
|
12124
|
+
diffData[key] = this._deData[key];
|
|
12125
|
+
}
|
|
12126
|
+
});
|
|
12127
|
+
diffData.srfkey = this._deData.srfkey;
|
|
12128
|
+
return diffData;
|
|
12129
|
+
}
|
|
12130
|
+
return this._deData;
|
|
12131
|
+
}
|
|
12102
12132
|
};
|
|
12103
12133
|
|
|
12104
12134
|
// src/service/vo/tree-node-data/tree-code-list-node-data.ts
|
|
@@ -12145,6 +12175,7 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
|
12145
12175
|
super(model, parentNodeData, opts);
|
|
12146
12176
|
const { data } = opts;
|
|
12147
12177
|
this._deData = data;
|
|
12178
|
+
this._oldDeData = data.clone();
|
|
12148
12179
|
const selfId = "".concat(model.id, "@").concat(data.srfkey).toLowerCase();
|
|
12149
12180
|
Object.defineProperty(this, "_id", {
|
|
12150
12181
|
get() {
|
|
@@ -13391,7 +13422,7 @@ function installCommand() {
|
|
|
13391
13422
|
}
|
|
13392
13423
|
|
|
13393
13424
|
// src/app-hub.ts
|
|
13394
|
-
import { RuntimeError as
|
|
13425
|
+
import { RuntimeError as RuntimeError68 } from "@ibiz-template/core";
|
|
13395
13426
|
|
|
13396
13427
|
// src/application.ts
|
|
13397
13428
|
import { Net, getToken } from "@ibiz-template/core";
|
|
@@ -14651,7 +14682,8 @@ async function asyncImportData(file, appDataEntity, dataImport, context) {
|
|
|
14651
14682
|
await listenAsyncAction(res.data.asyncacitonid);
|
|
14652
14683
|
ibiz.mc.command.send(
|
|
14653
14684
|
{ srfdecodename: appDataEntity.codeName },
|
|
14654
|
-
"OBJECTCREATED"
|
|
14685
|
+
"OBJECTCREATED",
|
|
14686
|
+
"DATAIMPORT"
|
|
14655
14687
|
);
|
|
14656
14688
|
}
|
|
14657
14689
|
async function importData(file, appDataEntity, dataImport, context) {
|
|
@@ -15781,7 +15813,8 @@ import {
|
|
|
15781
15813
|
HttpError as HttpError6,
|
|
15782
15814
|
IBizContext as IBizContext3,
|
|
15783
15815
|
IBizParams,
|
|
15784
|
-
NoticeError as NoticeError2
|
|
15816
|
+
NoticeError as NoticeError2,
|
|
15817
|
+
RuntimeError as RuntimeError35
|
|
15785
15818
|
} from "@ibiz-template/core";
|
|
15786
15819
|
import { clone as clone18, isNil as isNil23 } from "ramda";
|
|
15787
15820
|
import { notNilEmpty as notNilEmpty7 } from "qx-util";
|
|
@@ -15818,6 +15851,28 @@ var ControlController = class extends BaseController {
|
|
|
15818
15851
|
* @type {{ [key: string]: IProvider }}
|
|
15819
15852
|
*/
|
|
15820
15853
|
this.providers = {};
|
|
15854
|
+
/**
|
|
15855
|
+
* 触发源key
|
|
15856
|
+
*
|
|
15857
|
+
* @author tony001
|
|
15858
|
+
* @date 2024-03-28 17:03:03
|
|
15859
|
+
* @type {string}
|
|
15860
|
+
*/
|
|
15861
|
+
this.triggerKey = "";
|
|
15862
|
+
/**
|
|
15863
|
+
* 等到激活的回调函数集合
|
|
15864
|
+
*
|
|
15865
|
+
* @author tony001
|
|
15866
|
+
* @date 2024-03-28 17:03:15
|
|
15867
|
+
*/
|
|
15868
|
+
this.awaitActiveCbs = /* @__PURE__ */ new Map();
|
|
15869
|
+
/**
|
|
15870
|
+
* 延迟执行(防抖用)
|
|
15871
|
+
*
|
|
15872
|
+
* @author tony001
|
|
15873
|
+
* @date 2024-03-28 17:03:27
|
|
15874
|
+
*/
|
|
15875
|
+
this.delayCbs = /* @__PURE__ */ new Map();
|
|
15821
15876
|
this.registerToCtx();
|
|
15822
15877
|
this.controlPanel = getControlPanel(model);
|
|
15823
15878
|
if (!this.controlPanel) {
|
|
@@ -15883,6 +15938,12 @@ var ControlController = class extends BaseController {
|
|
|
15883
15938
|
);
|
|
15884
15939
|
});
|
|
15885
15940
|
}
|
|
15941
|
+
if (this.model.appDataEntityId) {
|
|
15942
|
+
const codeName = calcDeCodeNameById(this.model.appDataEntityId);
|
|
15943
|
+
this.triggerKey = "".concat(codeName, "@").concat(this.model.controlType, "@").concat(this.model.codeName);
|
|
15944
|
+
}
|
|
15945
|
+
this.onDEDataChange = this.onDEDataChange.bind(this);
|
|
15946
|
+
ibiz.mc.command.change.on(this.onDEDataChange);
|
|
15886
15947
|
}
|
|
15887
15948
|
async onMounted() {
|
|
15888
15949
|
var _a;
|
|
@@ -15890,6 +15951,7 @@ var ControlController = class extends BaseController {
|
|
|
15890
15951
|
(_a = this.scheduler) == null ? void 0 : _a.startTimerTrigger();
|
|
15891
15952
|
}
|
|
15892
15953
|
async onDestroyed() {
|
|
15954
|
+
ibiz.mc.command.change.off(this.onDEDataChange);
|
|
15893
15955
|
await super.onDestroyed();
|
|
15894
15956
|
if (this.scheduler) {
|
|
15895
15957
|
this.scheduler.destroy();
|
|
@@ -15970,6 +16032,12 @@ var ControlController = class extends BaseController {
|
|
|
15970
16032
|
*/
|
|
15971
16033
|
onActivated() {
|
|
15972
16034
|
this.state.activated = true;
|
|
16035
|
+
if (this.awaitActiveCbs.size > 0) {
|
|
16036
|
+
this.awaitActiveCbs.forEach((cb) => {
|
|
16037
|
+
cb();
|
|
16038
|
+
});
|
|
16039
|
+
}
|
|
16040
|
+
this.awaitActiveCbs.clear();
|
|
15973
16041
|
ibiz.log.debug("\u89C6\u56FE[".concat(this.model.name, "](").concat(this.model.id, ")\u6FC0\u6D3B"));
|
|
15974
16042
|
}
|
|
15975
16043
|
/**
|
|
@@ -16118,22 +16186,82 @@ var ControlController = class extends BaseController {
|
|
|
16118
16186
|
ibiz.message.success(message, duration, duration === 0);
|
|
16119
16187
|
}
|
|
16120
16188
|
}
|
|
16189
|
+
/**
|
|
16190
|
+
* 监听实体数据变更
|
|
16191
|
+
*
|
|
16192
|
+
* @author tony001
|
|
16193
|
+
* @date 2024-03-28 18:03:33
|
|
16194
|
+
* @protected
|
|
16195
|
+
* @param {IPortalMessage} msg
|
|
16196
|
+
*/
|
|
16197
|
+
onDEDataChange(msg) {
|
|
16198
|
+
ibiz.log.debug("onDEDataChange", msg);
|
|
16199
|
+
}
|
|
16200
|
+
/**
|
|
16201
|
+
* 触发实体数据变更的通知
|
|
16202
|
+
*
|
|
16203
|
+
* @author tony001
|
|
16204
|
+
* @date 2024-03-28 18:03:44
|
|
16205
|
+
* @param {('create' | 'update' | 'remove')} type
|
|
16206
|
+
* @param {IData} data
|
|
16207
|
+
*/
|
|
16208
|
+
emitDEDataChange(type, data) {
|
|
16209
|
+
const msg = data instanceof ControlVO ? data.$origin : data;
|
|
16210
|
+
const meta = { triggerKey: this.triggerKey };
|
|
16211
|
+
switch (type) {
|
|
16212
|
+
case "create":
|
|
16213
|
+
ibiz.mc.command.create.send(msg, meta);
|
|
16214
|
+
break;
|
|
16215
|
+
case "update":
|
|
16216
|
+
ibiz.mc.command.update.send(msg, meta);
|
|
16217
|
+
break;
|
|
16218
|
+
case "remove":
|
|
16219
|
+
ibiz.mc.command.remove.send(msg, meta);
|
|
16220
|
+
break;
|
|
16221
|
+
default:
|
|
16222
|
+
throw new RuntimeError35("\u4E0D\u652F\u6301\u7684\u5B9E\u4F53\u6570\u636E\u53D8\u66F4\u7C7B\u578B: ".concat(type));
|
|
16223
|
+
}
|
|
16224
|
+
}
|
|
16225
|
+
/**
|
|
16226
|
+
* 如果当前视图没有激活,则等待激活后执行回调函数
|
|
16227
|
+
* - 在执行之前key相同的会替换
|
|
16228
|
+
* 如果当前视图已经激活,则立即执行回调函数
|
|
16229
|
+
* - delay参数指定延迟执行时间,可以防抖
|
|
16230
|
+
*
|
|
16231
|
+
* @author tony001
|
|
16232
|
+
* @date 2024-03-28 18:03:00
|
|
16233
|
+
* @param {() => void} cb
|
|
16234
|
+
* @param {{ key: string; delay?: number }} opts
|
|
16235
|
+
*/
|
|
16236
|
+
doNextActive(cb, opts) {
|
|
16237
|
+
if (isNil23(opts.delay)) {
|
|
16238
|
+
opts.delay = 300;
|
|
16239
|
+
}
|
|
16240
|
+
if (this.state.activated === false) {
|
|
16241
|
+
this.awaitActiveCbs.set(opts.key, cb);
|
|
16242
|
+
} else if (opts.delay) {
|
|
16243
|
+
const _timer = this.delayCbs.get(opts.key);
|
|
16244
|
+
clearTimeout(_timer);
|
|
16245
|
+
const timer = setTimeout(() => {
|
|
16246
|
+
cb();
|
|
16247
|
+
clearTimeout(this.delayCbs.get(opts.key));
|
|
16248
|
+
}, opts.delay);
|
|
16249
|
+
this.delayCbs.set(opts.key, timer);
|
|
16250
|
+
} else {
|
|
16251
|
+
cb();
|
|
16252
|
+
}
|
|
16253
|
+
}
|
|
16121
16254
|
};
|
|
16122
16255
|
|
|
16123
16256
|
// src/controller/common/control/md-control.controller.ts
|
|
16124
|
-
import {
|
|
16125
|
-
|
|
16257
|
+
import {
|
|
16258
|
+
isElementSame,
|
|
16259
|
+
RuntimeError as RuntimeError36
|
|
16260
|
+
} from "@ibiz-template/core";
|
|
16261
|
+
import { isNil as isNil24 } from "ramda";
|
|
16126
16262
|
var MDControlController = class extends ControlController {
|
|
16127
16263
|
constructor() {
|
|
16128
16264
|
super(...arguments);
|
|
16129
|
-
/**
|
|
16130
|
-
* 在未激活时记录是否有 command 数据变更事件,有就记录。等待激活时刷新
|
|
16131
|
-
*
|
|
16132
|
-
* @author chitanda
|
|
16133
|
-
* @date 2023-12-13 11:12:19
|
|
16134
|
-
* @protected
|
|
16135
|
-
*/
|
|
16136
|
-
this.commandDataChange = false;
|
|
16137
16265
|
/**
|
|
16138
16266
|
* 是否设置过排序条件,比如searchBars默认点击分组时设置了
|
|
16139
16267
|
* @return {*}
|
|
@@ -16207,11 +16335,6 @@ var MDControlController = class extends ControlController {
|
|
|
16207
16335
|
(_a = this.dataEntity.appDEFields) == null ? void 0 : _a.forEach((field) => {
|
|
16208
16336
|
this.fieldIdNameMap.set(field.id, field.name);
|
|
16209
16337
|
});
|
|
16210
|
-
const fn = this.onDataChange.bind(this);
|
|
16211
|
-
this.onDataChange = debounce((msg) => {
|
|
16212
|
-
fn(msg);
|
|
16213
|
-
}, 300);
|
|
16214
|
-
ibiz.mc.command.change.on(this.onDataChange);
|
|
16215
16338
|
if (!this.isSetSort) {
|
|
16216
16339
|
this.setSort();
|
|
16217
16340
|
}
|
|
@@ -16222,34 +16345,6 @@ var MDControlController = class extends ControlController {
|
|
|
16222
16345
|
this.load({ isInitialLoad: true });
|
|
16223
16346
|
}
|
|
16224
16347
|
}
|
|
16225
|
-
onDestroyed() {
|
|
16226
|
-
ibiz.mc.command.change.off(this.onDataChange);
|
|
16227
|
-
return super.onDestroyed();
|
|
16228
|
-
}
|
|
16229
|
-
/**
|
|
16230
|
-
* 当数据放生变更时,若为当前应用实体数据。则多数据部件进行刷新
|
|
16231
|
-
*
|
|
16232
|
-
* @author chitanda
|
|
16233
|
-
* @date 2023-09-13 17:09:04
|
|
16234
|
-
* @protected
|
|
16235
|
-
* @param {IData} msg
|
|
16236
|
-
*/
|
|
16237
|
-
onDataChange(msg) {
|
|
16238
|
-
if (msg.data && msg.data.srfdecodename === this.dataEntity.codeName) {
|
|
16239
|
-
if (this.state.activated) {
|
|
16240
|
-
this.refresh();
|
|
16241
|
-
} else {
|
|
16242
|
-
this.commandDataChange = true;
|
|
16243
|
-
}
|
|
16244
|
-
}
|
|
16245
|
-
}
|
|
16246
|
-
onActivated() {
|
|
16247
|
-
super.onActivated();
|
|
16248
|
-
if (this.commandDataChange) {
|
|
16249
|
-
this.refresh();
|
|
16250
|
-
this.commandDataChange = false;
|
|
16251
|
-
}
|
|
16252
|
-
}
|
|
16253
16348
|
/**
|
|
16254
16349
|
* 获取部件默认排序模型
|
|
16255
16350
|
* @return {*}
|
|
@@ -16396,12 +16491,16 @@ var MDControlController = class extends ControlController {
|
|
|
16396
16491
|
return items;
|
|
16397
16492
|
}
|
|
16398
16493
|
/**
|
|
16399
|
-
* 部件刷新,走初始加载
|
|
16400
|
-
*
|
|
16401
|
-
* @
|
|
16494
|
+
* 部件刷新,走初始加载(规避预置后续刷新和通知刷新同时进行)
|
|
16495
|
+
*
|
|
16496
|
+
* @author tony001
|
|
16497
|
+
* @date 2024-03-28 18:03:00
|
|
16498
|
+
* @return {*} {Promise<void>}
|
|
16402
16499
|
*/
|
|
16403
16500
|
async refresh() {
|
|
16404
|
-
|
|
16501
|
+
this.doNextActive(() => this.load({ isInitialLoad: false }), {
|
|
16502
|
+
key: "refresh"
|
|
16503
|
+
});
|
|
16405
16504
|
}
|
|
16406
16505
|
/**
|
|
16407
16506
|
* 删除选中的数据
|
|
@@ -16413,7 +16512,7 @@ var MDControlController = class extends ControlController {
|
|
|
16413
16512
|
async remove(args) {
|
|
16414
16513
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
16415
16514
|
if (!(data == null ? void 0 : data.length)) {
|
|
16416
|
-
throw new
|
|
16515
|
+
throw new RuntimeError36("\u672A\u9009\u4E2D\u6570\u636E");
|
|
16417
16516
|
}
|
|
16418
16517
|
if ((args == null ? void 0 : args.silent) !== true) {
|
|
16419
16518
|
const del = await ibiz.confirm.error({
|
|
@@ -16455,6 +16554,9 @@ var MDControlController = class extends ControlController {
|
|
|
16455
16554
|
}
|
|
16456
16555
|
this.state.selectedData = [];
|
|
16457
16556
|
await this._evt.emit("onRemoveSuccess", void 0);
|
|
16557
|
+
data.forEach((item) => {
|
|
16558
|
+
this.emitDEDataChange("remove", item);
|
|
16559
|
+
});
|
|
16458
16560
|
}
|
|
16459
16561
|
/**
|
|
16460
16562
|
* 删除每一项
|
|
@@ -16573,7 +16675,7 @@ var MDControlController = class extends ControlController {
|
|
|
16573
16675
|
(importItem) => importItem.id === dedataImportId
|
|
16574
16676
|
);
|
|
16575
16677
|
if (!dataImport) {
|
|
16576
|
-
throw new
|
|
16678
|
+
throw new RuntimeError36("\u65E0\u5BFC\u5165\u6A21\u578B\uFF01");
|
|
16577
16679
|
}
|
|
16578
16680
|
let importName = "DataImport";
|
|
16579
16681
|
if (dataImport.enableCustomized) {
|
|
@@ -16605,12 +16707,53 @@ var MDControlController = class extends ControlController {
|
|
|
16605
16707
|
*/
|
|
16606
16708
|
async exportData(_args) {
|
|
16607
16709
|
}
|
|
16710
|
+
/**
|
|
16711
|
+
* 检测实体数据变更
|
|
16712
|
+
*
|
|
16713
|
+
* @author tony001
|
|
16714
|
+
* @date 2024-03-28 18:03:30
|
|
16715
|
+
* @protected
|
|
16716
|
+
* @param {IPortalMessage} msg
|
|
16717
|
+
* @return {*} {void}
|
|
16718
|
+
*/
|
|
16719
|
+
onDEDataChange(msg) {
|
|
16720
|
+
if (!isNil24(msg.triggerKey) && msg.triggerKey === this.triggerKey) {
|
|
16721
|
+
return;
|
|
16722
|
+
}
|
|
16723
|
+
if (!msg.data || msg.data.srfdecodename !== this.dataEntity.codeName) {
|
|
16724
|
+
return;
|
|
16725
|
+
}
|
|
16726
|
+
let isRefresh = false;
|
|
16727
|
+
const { srfkey } = msg.data;
|
|
16728
|
+
switch (msg.subtype) {
|
|
16729
|
+
case "OBJECTCREATED":
|
|
16730
|
+
isRefresh = true;
|
|
16731
|
+
break;
|
|
16732
|
+
case "OBJECTUPDATED":
|
|
16733
|
+
if (this.state.items.findIndex((item) => item.srfkey === srfkey) !== -1) {
|
|
16734
|
+
isRefresh = true;
|
|
16735
|
+
}
|
|
16736
|
+
break;
|
|
16737
|
+
case "OBJECTREMOVED":
|
|
16738
|
+
if (this.state.items.findIndex((item) => item.srfkey === srfkey) !== -1) {
|
|
16739
|
+
isRefresh = true;
|
|
16740
|
+
}
|
|
16741
|
+
break;
|
|
16742
|
+
default:
|
|
16743
|
+
break;
|
|
16744
|
+
}
|
|
16745
|
+
if (isRefresh) {
|
|
16746
|
+
this.doNextActive(() => this.load({ isInitialLoad: !!ibiz.env.isMob }), {
|
|
16747
|
+
key: "refresh"
|
|
16748
|
+
});
|
|
16749
|
+
}
|
|
16750
|
+
}
|
|
16608
16751
|
};
|
|
16609
16752
|
|
|
16610
16753
|
// src/controller/control/app-menu/app-menu.controller.ts
|
|
16611
16754
|
import {
|
|
16612
16755
|
findRecursiveChild,
|
|
16613
|
-
RuntimeError as
|
|
16756
|
+
RuntimeError as RuntimeError37,
|
|
16614
16757
|
RuntimeModelError as RuntimeModelError26
|
|
16615
16758
|
} from "@ibiz-template/core";
|
|
16616
16759
|
var AppMenuController = class extends ControlController {
|
|
@@ -16679,7 +16822,7 @@ var AppMenuController = class extends ControlController {
|
|
|
16679
16822
|
childrenFields: ["appMenuItems"]
|
|
16680
16823
|
});
|
|
16681
16824
|
if (!menuItem) {
|
|
16682
|
-
throw new
|
|
16825
|
+
throw new RuntimeError37("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
|
|
16683
16826
|
}
|
|
16684
16827
|
this.evt.emit("onClick", {
|
|
16685
16828
|
eventArg: id,
|
|
@@ -16809,7 +16952,7 @@ var AppMenuController = class extends ControlController {
|
|
|
16809
16952
|
// src/controller/control/app-menu-icon-view/app-menu-icon-view.controller.ts
|
|
16810
16953
|
import {
|
|
16811
16954
|
findRecursiveChild as findRecursiveChild2,
|
|
16812
|
-
RuntimeError as
|
|
16955
|
+
RuntimeError as RuntimeError38,
|
|
16813
16956
|
RuntimeModelError as RuntimeModelError27
|
|
16814
16957
|
} from "@ibiz-template/core";
|
|
16815
16958
|
var AppMenuIconViewController = class extends AppMenuController {
|
|
@@ -16819,7 +16962,7 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
16819
16962
|
childrenFields: ["appMenuItems"]
|
|
16820
16963
|
});
|
|
16821
16964
|
if (!menuItem) {
|
|
16822
|
-
throw new
|
|
16965
|
+
throw new RuntimeError38("\u627E\u4E0D\u5230\u540D\u4E3A".concat(id, "\u7684\u83DC\u5355\u9879"));
|
|
16823
16966
|
}
|
|
16824
16967
|
this.evt.emit("onClick", {
|
|
16825
16968
|
eventArg: id,
|
|
@@ -16848,7 +16991,7 @@ import dayjs3 from "dayjs";
|
|
|
16848
16991
|
import { RuntimeModelError as RuntimeModelError28 } from "@ibiz-template/core";
|
|
16849
16992
|
|
|
16850
16993
|
// src/controller/control/calendar/calendar.service.ts
|
|
16851
|
-
import { RuntimeError as
|
|
16994
|
+
import { RuntimeError as RuntimeError39 } from "@ibiz-template/core";
|
|
16852
16995
|
import { clone as clone19 } from "ramda";
|
|
16853
16996
|
var CalendarService = class extends MDControlService {
|
|
16854
16997
|
/**
|
|
@@ -16904,11 +17047,11 @@ var CalendarService = class extends MDControlService {
|
|
|
16904
17047
|
setCalendarConfigData(items, index) {
|
|
16905
17048
|
const { sysCalendarItems } = this.model;
|
|
16906
17049
|
if (!sysCalendarItems) {
|
|
16907
|
-
throw new
|
|
17050
|
+
throw new RuntimeError39("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
|
|
16908
17051
|
}
|
|
16909
17052
|
const calendarItem = sysCalendarItems[index];
|
|
16910
17053
|
if (!calendarItem) {
|
|
16911
|
-
throw new
|
|
17054
|
+
throw new RuntimeError39("\u672A\u627E\u5230\u65E5\u5386\u9879\u6A21\u578B");
|
|
16912
17055
|
}
|
|
16913
17056
|
return items.map((item) => {
|
|
16914
17057
|
return new CalendarItemData(calendarItem, item);
|
|
@@ -17189,11 +17332,11 @@ var CalendarController = class extends MDControlController {
|
|
|
17189
17332
|
};
|
|
17190
17333
|
|
|
17191
17334
|
// src/controller/control/chart/chart.controller.ts
|
|
17192
|
-
import { RuntimeError as
|
|
17335
|
+
import { RuntimeError as RuntimeError41 } from "@ibiz-template/core";
|
|
17193
17336
|
|
|
17194
17337
|
// src/controller/control/chart/generator/chart-options-generator.ts
|
|
17195
17338
|
import { mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
17196
|
-
import { RuntimeError as
|
|
17339
|
+
import { RuntimeError as RuntimeError40 } from "@ibiz-template/core";
|
|
17197
17340
|
|
|
17198
17341
|
// src/controller/control/chart/generator/line-series-generator.ts
|
|
17199
17342
|
import { RuntimeModelError as RuntimeModelError30 } from "@ibiz-template/core";
|
|
@@ -17206,7 +17349,7 @@ import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
|
17206
17349
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
17207
17350
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
17208
17351
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
17209
|
-
import { clone as clone20, isNil as
|
|
17352
|
+
import { clone as clone20, isNil as isNil25, mergeDeepRight } from "ramda";
|
|
17210
17353
|
dayjs4.extend(minMax2);
|
|
17211
17354
|
dayjs4.extend(isSameOrBefore);
|
|
17212
17355
|
dayjs4.extend(quarterOfYear);
|
|
@@ -17302,10 +17445,10 @@ var BaseSeriesGenerator = class {
|
|
|
17302
17445
|
* @return {*} {(string | undefined)}
|
|
17303
17446
|
*/
|
|
17304
17447
|
translateVal(codeListKey, val, isExclude = false) {
|
|
17305
|
-
if (
|
|
17448
|
+
if (isNil25(val)) {
|
|
17306
17449
|
return void 0;
|
|
17307
17450
|
}
|
|
17308
|
-
if (
|
|
17451
|
+
if (isNil25(codeListKey)) {
|
|
17309
17452
|
return val;
|
|
17310
17453
|
}
|
|
17311
17454
|
const codeListItems = this.chartGenerator.codeListMap.get(codeListKey);
|
|
@@ -17314,6 +17457,7 @@ var BaseSeriesGenerator = class {
|
|
|
17314
17457
|
if (find) {
|
|
17315
17458
|
return find.text;
|
|
17316
17459
|
}
|
|
17460
|
+
return "\u672A\u5B9A\u4E49";
|
|
17317
17461
|
}
|
|
17318
17462
|
return isExclude ? void 0 : val;
|
|
17319
17463
|
}
|
|
@@ -17354,7 +17498,7 @@ var BaseSeriesGenerator = class {
|
|
|
17354
17498
|
seriesCodeListId,
|
|
17355
17499
|
item[this.groupField]
|
|
17356
17500
|
);
|
|
17357
|
-
if (
|
|
17501
|
+
if (isNil25(groupVal)) {
|
|
17358
17502
|
return;
|
|
17359
17503
|
}
|
|
17360
17504
|
group = groupVal;
|
|
@@ -18202,7 +18346,7 @@ var ChartOptionsGenerator2 = class {
|
|
|
18202
18346
|
getChartDataByParams(params) {
|
|
18203
18347
|
const generator = this.seriesGeneratorIndexMap.get(params.seriesIndex);
|
|
18204
18348
|
if (!generator) {
|
|
18205
|
-
throw new
|
|
18349
|
+
throw new RuntimeError40("\u627E\u4E0D\u5230".concat(params.seriesIndex, "\u5E8F\u5217\u7684generator\uFF01"));
|
|
18206
18350
|
}
|
|
18207
18351
|
return generator.getChartDataByParams(params);
|
|
18208
18352
|
}
|
|
@@ -18316,10 +18460,10 @@ var ChartController = class extends MDControlController {
|
|
|
18316
18460
|
*/
|
|
18317
18461
|
updateChart() {
|
|
18318
18462
|
if (!this.chart) {
|
|
18319
|
-
throw new
|
|
18463
|
+
throw new RuntimeError41("chart\u5BF9\u8C61\u6CA1\u6709\u6B63\u786E\u521D\u59CB\u5316");
|
|
18320
18464
|
}
|
|
18321
18465
|
if (!this.options) {
|
|
18322
|
-
throw new
|
|
18466
|
+
throw new RuntimeError41("options\u8FD8\u6CA1\u8BA1\u7B97");
|
|
18323
18467
|
}
|
|
18324
18468
|
this.chart.setOption(this.options, { notMerge: true });
|
|
18325
18469
|
this.resizeChart();
|
|
@@ -18369,7 +18513,7 @@ var CaptionBarController = class extends ControlController {
|
|
|
18369
18513
|
};
|
|
18370
18514
|
|
|
18371
18515
|
// src/controller/control/toolbar/toolbar.controllerr.ts
|
|
18372
|
-
import { recursiveIterate as recursiveIterate2, RuntimeError as
|
|
18516
|
+
import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError50 } from "@ibiz-template/core";
|
|
18373
18517
|
|
|
18374
18518
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
18375
18519
|
import { RuntimeModelError as RuntimeModelError51 } from "@ibiz-template/core";
|
|
@@ -18379,7 +18523,7 @@ import { isArray as isArray8 } from "qx-util";
|
|
|
18379
18523
|
import { RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
18380
18524
|
|
|
18381
18525
|
// src/ui-logic/index.ts
|
|
18382
|
-
import { RuntimeError as
|
|
18526
|
+
import { RuntimeError as RuntimeError47 } from "@ibiz-template/core";
|
|
18383
18527
|
|
|
18384
18528
|
// src/ui-logic/ui-logic.ts
|
|
18385
18529
|
import { ModelError as ModelError25, RuntimeModelError as RuntimeModelError49 } from "@ibiz-template/core";
|
|
@@ -18965,7 +19109,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
18965
19109
|
};
|
|
18966
19110
|
|
|
18967
19111
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
18968
|
-
import { ModelError as ModelError22, RuntimeError as
|
|
19112
|
+
import { ModelError as ModelError22, RuntimeError as RuntimeError42 } from "@ibiz-template/core";
|
|
18969
19113
|
import { clone as clone22 } from "ramda";
|
|
18970
19114
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
18971
19115
|
async exec(ctx) {
|
|
@@ -19025,7 +19169,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
19025
19169
|
setParamValue(nodeParam, ctx) {
|
|
19026
19170
|
const { dstFieldName, dstDEUILogicParamId } = nodeParam;
|
|
19027
19171
|
if (!dstDEUILogicParamId) {
|
|
19028
|
-
throw new
|
|
19172
|
+
throw new RuntimeError42("\u6CA1\u6709\u76EE\u6807\u53C2\u6570\u5BF9\u8C61id");
|
|
19029
19173
|
}
|
|
19030
19174
|
let dstField = dstFieldName;
|
|
19031
19175
|
if (ctx.isEntityParam(dstDEUILogicParamId)) {
|
|
@@ -19142,7 +19286,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
19142
19286
|
};
|
|
19143
19287
|
|
|
19144
19288
|
// src/ui-logic/ui-logic-node/view-ctrl-invoke-node/view-ctrl-invoke-node.ts
|
|
19145
|
-
import { RuntimeError as
|
|
19289
|
+
import { RuntimeError as RuntimeError43, RuntimeModelError as RuntimeModelError37 } from "@ibiz-template/core";
|
|
19146
19290
|
import { isFunction } from "lodash-es";
|
|
19147
19291
|
var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
19148
19292
|
async exec(ctx) {
|
|
@@ -19159,14 +19303,14 @@ var ViewCtrlInvokeNode = class extends UILogicNode {
|
|
|
19159
19303
|
}
|
|
19160
19304
|
const invokeParam = ctx.params[invokeParamId];
|
|
19161
19305
|
if (!invokeParam) {
|
|
19162
|
-
throw new
|
|
19306
|
+
throw new RuntimeError43("\u6CA1\u6709\u627E\u5230\u64CD\u4F5C\u53C2\u6570".concat(invokeParamId));
|
|
19163
19307
|
}
|
|
19164
19308
|
const invokeCtrl = ctx.params[invokeCtrlId];
|
|
19165
19309
|
if (!invokeCtrl) {
|
|
19166
|
-
throw new
|
|
19310
|
+
throw new RuntimeError43("\u6CA1\u6709\u627E\u5230\u754C\u9762\u5BF9\u8C61".concat(invokeCtrlId));
|
|
19167
19311
|
}
|
|
19168
19312
|
if (!invokeCtrl[invokeMethod] || !isFunction(invokeCtrl[invokeMethod])) {
|
|
19169
|
-
throw new
|
|
19313
|
+
throw new RuntimeError43("\u6CA1\u6709\u627E\u5230\u8C03\u7528\u65B9\u6CD5".concat(invokeMethod));
|
|
19170
19314
|
}
|
|
19171
19315
|
ibiz.log.debug(
|
|
19172
19316
|
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u89C6\u56FE\u90E8\u4EF6\u8C03\u7528\uFF09\uFF1A".concat(this.model.id, "-\u8C03\u7528\u89C6\u56FE\u90E8\u4EF6\u540D\u79F0\uFF1A").concat(invokeCtrlId, "-\u8C03\u7528\u65B9\u6CD5\u540D\u79F0\uFF1A").concat(invokeMethod, "-\u89E6\u53D1\u53C2\u6570\uFF1A"),
|
|
@@ -19436,19 +19580,19 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
19436
19580
|
};
|
|
19437
19581
|
|
|
19438
19582
|
// src/ui-logic/ui-logic-node/throw-exception-node/throw-exception-node.ts
|
|
19439
|
-
import { RuntimeError as
|
|
19583
|
+
import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
|
|
19440
19584
|
var ThrowExceptionNode2 = class extends UILogicNode {
|
|
19441
19585
|
async exec(_ctx) {
|
|
19442
19586
|
const { errorInfo } = this.model;
|
|
19443
19587
|
ibiz.log.debug(
|
|
19444
19588
|
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u629B\u51FA\u5F02\u5E38\uFF09\uFF1A".concat(this.model.id, "-\u9519\u8BEF\u4FE1\u606F\uFF1A").concat(errorInfo)
|
|
19445
19589
|
);
|
|
19446
|
-
throw new
|
|
19590
|
+
throw new RuntimeError44(errorInfo);
|
|
19447
19591
|
}
|
|
19448
19592
|
};
|
|
19449
19593
|
|
|
19450
19594
|
// src/ui-logic/ui-logic-node/view-ctrl-fire-event-node/view-ctrl-fire-event-node.ts
|
|
19451
|
-
import { RuntimeError as
|
|
19595
|
+
import { RuntimeError as RuntimeError45, RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
|
|
19452
19596
|
var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
19453
19597
|
async exec(ctx) {
|
|
19454
19598
|
ctx.isEndNode = true;
|
|
@@ -19464,11 +19608,11 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
19464
19608
|
}
|
|
19465
19609
|
const invokeCtrl = ctx.params[fireCtrlId];
|
|
19466
19610
|
if (!invokeCtrl) {
|
|
19467
|
-
throw new
|
|
19611
|
+
throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u89E6\u53D1\u5BF9\u8C61".concat(fireCtrlId));
|
|
19468
19612
|
}
|
|
19469
19613
|
const eventParam = ctx.params[eventParamId];
|
|
19470
19614
|
if (!eventParam) {
|
|
19471
|
-
throw new
|
|
19615
|
+
throw new RuntimeError45("\u6CA1\u6709\u627E\u5230\u4E8B\u4EF6\u53C2\u6570\u5BF9\u8C61".concat(eventParamId));
|
|
19472
19616
|
}
|
|
19473
19617
|
ibiz.log.debug(
|
|
19474
19618
|
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u89C6\u56FE\u90E8\u4EF6\u4E8B\u4EF6\u89E6\u53D1\u903B\u8F91\uFF09\uFF1A".concat(this.model.id, "-\u8C03\u7528\u89C6\u56FE\u90E8\u4EF6\u540D\u79F0\uFF1A").concat(fireCtrlId, "-\u89E6\u53D1\u4E8B\u4EF6\u540D\u79F0\uFF1A").concat(eventName, "-\u89E6\u53D1\u53C2\u6570\uFF1A"),
|
|
@@ -19479,7 +19623,7 @@ var ViewCtrlFireEventNode = class extends UILogicNode {
|
|
|
19479
19623
|
};
|
|
19480
19624
|
|
|
19481
19625
|
// src/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.ts
|
|
19482
|
-
import { RuntimeError as
|
|
19626
|
+
import { RuntimeError as RuntimeError46, RuntimeModelError as RuntimeModelError48 } from "@ibiz-template/core";
|
|
19483
19627
|
var ExecuteDELogicNode = class extends UILogicNode {
|
|
19484
19628
|
async exec(ctx) {
|
|
19485
19629
|
const {
|
|
@@ -19499,7 +19643,7 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
19499
19643
|
}
|
|
19500
19644
|
const dstParam = ctx.params[dstDEUILogicParamId];
|
|
19501
19645
|
if (!dstParam) {
|
|
19502
|
-
throw new
|
|
19646
|
+
throw new RuntimeError46("\u6CA1\u6709\u627E\u5230\u4F20\u5165\u53C2\u6570".concat(dstDEUILogicParamId));
|
|
19503
19647
|
}
|
|
19504
19648
|
const result = await execDELogicById(
|
|
19505
19649
|
dstAppDELogicId,
|
|
@@ -19837,7 +19981,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
19837
19981
|
const app = ibiz.hub.getApp(parameters.context.srfappid);
|
|
19838
19982
|
const deUILogic = await app.getDEUILogic(deUILogicId, appDataEntityId);
|
|
19839
19983
|
if (!deUILogic) {
|
|
19840
|
-
throw new
|
|
19984
|
+
throw new RuntimeError47(
|
|
19841
19985
|
"\u627E\u4E0D\u5230\u5B9E\u4F53".concat(appDataEntityId, "\u7684\u754C\u9762\u903B\u8F91").concat(deUILogicId)
|
|
19842
19986
|
);
|
|
19843
19987
|
}
|
|
@@ -19856,7 +20000,7 @@ async function execUILogic(deUILogicId, appDataEntityId, parameters) {
|
|
|
19856
20000
|
}
|
|
19857
20001
|
|
|
19858
20002
|
// src/ui-action/uiaction-util.ts
|
|
19859
|
-
import { RuntimeError as
|
|
20003
|
+
import { RuntimeError as RuntimeError48 } from "@ibiz-template/core";
|
|
19860
20004
|
var UIActionUtil = class {
|
|
19861
20005
|
/**
|
|
19862
20006
|
* 执行界面行为
|
|
@@ -19871,7 +20015,7 @@ var UIActionUtil = class {
|
|
|
19871
20015
|
static async exec(actionId, params, appId2) {
|
|
19872
20016
|
const action = await getUIActionById(actionId, appId2);
|
|
19873
20017
|
if (!action) {
|
|
19874
|
-
throw new
|
|
20018
|
+
throw new RuntimeError48("\u6CA1\u627E\u5230".concat(actionId, "\u7684\u754C\u9762\u884C\u4E3A\u6A21\u578B"));
|
|
19875
20019
|
}
|
|
19876
20020
|
if (action.actionTarget === "SINGLEDATA") {
|
|
19877
20021
|
const validateResult = await params.view.call("Validate" /* VALIDATE */);
|
|
@@ -20363,7 +20507,7 @@ import {
|
|
|
20363
20507
|
StringUtil,
|
|
20364
20508
|
RuntimeModelError as RuntimeModelError52,
|
|
20365
20509
|
ModelError as ModelError26,
|
|
20366
|
-
RuntimeError as
|
|
20510
|
+
RuntimeError as RuntimeError49
|
|
20367
20511
|
} from "@ibiz-template/core";
|
|
20368
20512
|
import { mergeRight as mergeRight3 } from "ramda";
|
|
20369
20513
|
var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
@@ -20477,7 +20621,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
20477
20621
|
if (resultContext && resultContext[appDataEntity.codeName.toLowerCase()]) {
|
|
20478
20622
|
requestUrl += "/".concat(appDataEntity.deapicodeName2, "/printdata/").concat(resultContext[appDataEntity.codeName.toLowerCase()]);
|
|
20479
20623
|
} else {
|
|
20480
|
-
throw new
|
|
20624
|
+
throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u6570\u636E\u4E3B\u952E");
|
|
20481
20625
|
}
|
|
20482
20626
|
const res = await ibiz.net.request(requestUrl, {
|
|
20483
20627
|
method: "get",
|
|
@@ -20504,10 +20648,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
20504
20648
|
window.open(link, "_blank");
|
|
20505
20649
|
}
|
|
20506
20650
|
} else {
|
|
20507
|
-
throw new
|
|
20651
|
+
throw new RuntimeError49("\u6253\u5370\u5931\u8D25");
|
|
20508
20652
|
}
|
|
20509
20653
|
} else {
|
|
20510
|
-
throw new
|
|
20654
|
+
throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u6253\u5370\u9879");
|
|
20511
20655
|
}
|
|
20512
20656
|
}
|
|
20513
20657
|
/**
|
|
@@ -20558,7 +20702,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
20558
20702
|
refreshMode: 1
|
|
20559
20703
|
};
|
|
20560
20704
|
}
|
|
20561
|
-
throw new
|
|
20705
|
+
throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u5165\u9879");
|
|
20562
20706
|
}
|
|
20563
20707
|
/**
|
|
20564
20708
|
* 执行导出行为
|
|
@@ -20609,10 +20753,10 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
20609
20753
|
URL.revokeObjectURL(elink.href);
|
|
20610
20754
|
document.body.removeChild(elink);
|
|
20611
20755
|
} else {
|
|
20612
|
-
throw new
|
|
20756
|
+
throw new RuntimeError49("\u5BFC\u51FA\u8BF7\u6C42\u5931\u8D25");
|
|
20613
20757
|
}
|
|
20614
20758
|
} else {
|
|
20615
|
-
throw new
|
|
20759
|
+
throw new RuntimeError49("\u6CA1\u6709\u627E\u5230\u5B9E\u4F53\u5BFC\u51FA\u9879");
|
|
20616
20760
|
}
|
|
20617
20761
|
}
|
|
20618
20762
|
/**
|
|
@@ -20629,7 +20773,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
20629
20773
|
const actionResult = {};
|
|
20630
20774
|
const { context, params, data, event } = args;
|
|
20631
20775
|
if (!event) {
|
|
20632
|
-
throw new
|
|
20776
|
+
throw new RuntimeError49("\u7F3A\u5C11\u539F\u751FJS\u4E8B\u4EF6\u5BF9\u8C61");
|
|
20633
20777
|
}
|
|
20634
20778
|
const { resultContext, resultParams } = await this.handleParams(
|
|
20635
20779
|
action,
|
|
@@ -20645,20 +20789,23 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
20645
20789
|
options
|
|
20646
20790
|
);
|
|
20647
20791
|
let hasSave = false;
|
|
20648
|
-
|
|
20649
|
-
event.target,
|
|
20792
|
+
const overlay = ibiz.overlay.createPopover(
|
|
20650
20793
|
"IBizControlShell",
|
|
20651
20794
|
{
|
|
20652
20795
|
context: resultContext,
|
|
20653
20796
|
params: resultParams,
|
|
20654
20797
|
modelData: action.deeditForm,
|
|
20655
20798
|
onSaveSuccess: () => {
|
|
20656
|
-
|
|
20799
|
+
if (overlay) {
|
|
20800
|
+
overlay.dismiss();
|
|
20801
|
+
}
|
|
20657
20802
|
hasSave = true;
|
|
20658
20803
|
}
|
|
20659
20804
|
},
|
|
20660
20805
|
popoverOpts
|
|
20661
20806
|
);
|
|
20807
|
+
overlay.present(event.target);
|
|
20808
|
+
await overlay.onWillDismiss();
|
|
20662
20809
|
if (!hasSave) {
|
|
20663
20810
|
actionResult.cancel = true;
|
|
20664
20811
|
}
|
|
@@ -20748,7 +20895,7 @@ var ToolbarController = class extends ControlController {
|
|
|
20748
20895
|
const actionId = item.uiactionId;
|
|
20749
20896
|
const uiAction = await getUIActionById(actionId, item.appId);
|
|
20750
20897
|
if (!uiAction) {
|
|
20751
|
-
throw new
|
|
20898
|
+
throw new RuntimeError50("\u6CA1\u6709\u627E\u5230\u754C\u9762\u884C\u4E3A\u6A21\u578B".concat(actionId));
|
|
20752
20899
|
}
|
|
20753
20900
|
const enableLoading = ["SYS", "BACKEND", "WFBACKEND"].includes(uiAction.uiactionMode) && uiAction.showBusyIndicator !== false;
|
|
20754
20901
|
if (enableLoading) {
|
|
@@ -21362,7 +21509,7 @@ var RawItemPortletController = class extends PortletPartController {
|
|
|
21362
21509
|
|
|
21363
21510
|
// src/controller/control/data-view/data-view.controller.ts
|
|
21364
21511
|
import { RuntimeModelError as RuntimeModelError53 } from "@ibiz-template/core";
|
|
21365
|
-
import { isNil as
|
|
21512
|
+
import { isNil as isNil26 } from "ramda";
|
|
21366
21513
|
|
|
21367
21514
|
// src/controller/control/data-view/data-view.service.ts
|
|
21368
21515
|
var DataViewControlService = class extends MDControlService {
|
|
@@ -21653,7 +21800,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21653
21800
|
const groupMap = /* @__PURE__ */ new Map();
|
|
21654
21801
|
items.forEach((item) => {
|
|
21655
21802
|
const groupVal = item[groupAppDEFieldId];
|
|
21656
|
-
if (
|
|
21803
|
+
if (isNil26(groupVal)) {
|
|
21657
21804
|
return;
|
|
21658
21805
|
}
|
|
21659
21806
|
if (!groupMap.has(groupVal)) {
|
|
@@ -21826,7 +21973,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
21826
21973
|
import { RuntimeModelError as RuntimeModelError55 } from "@ibiz-template/core";
|
|
21827
21974
|
|
|
21828
21975
|
// src/controller/control/exp-bar/exp-bar.controller.ts
|
|
21829
|
-
import { RuntimeError as
|
|
21976
|
+
import { RuntimeError as RuntimeError51, RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
21830
21977
|
var ExpBarControlController = class extends ControlController {
|
|
21831
21978
|
constructor() {
|
|
21832
21979
|
super(...arguments);
|
|
@@ -22157,7 +22304,7 @@ var ExpBarControlController = class extends ControlController {
|
|
|
22157
22304
|
if (["GRID", "DATAVIEW", "LIST"].includes(((_a = this.XDataModel) == null ? void 0 : _a.controlType) || "")) {
|
|
22158
22305
|
return this.XDataModel.navAppViewId;
|
|
22159
22306
|
}
|
|
22160
|
-
throw new
|
|
22307
|
+
throw new RuntimeError51("\u591A\u8282\u70B9\u89C6\u56FE\u7531\u5B50\u7C7B\u5B9E\u73B0");
|
|
22161
22308
|
}
|
|
22162
22309
|
/**
|
|
22163
22310
|
* 获取导航视图
|
|
@@ -22300,7 +22447,7 @@ var CalendarExpBarController = class extends ExpBarControlController {
|
|
|
22300
22447
|
};
|
|
22301
22448
|
|
|
22302
22449
|
// src/controller/control/exp-bar/tree-exp-bar.controller.ts
|
|
22303
|
-
import { RuntimeError as
|
|
22450
|
+
import { RuntimeError as RuntimeError52, RuntimeModelError as RuntimeModelError56 } from "@ibiz-template/core";
|
|
22304
22451
|
var TreeExpBarController = class extends ExpBarControlController {
|
|
22305
22452
|
constructor() {
|
|
22306
22453
|
super(...arguments);
|
|
@@ -22389,7 +22536,7 @@ var TreeExpBarController = class extends ExpBarControlController {
|
|
|
22389
22536
|
const deData = node._deData || node;
|
|
22390
22537
|
const nodeModel = this.getNodeModel(node._nodeId);
|
|
22391
22538
|
if (!nodeModel) {
|
|
22392
|
-
throw new
|
|
22539
|
+
throw new RuntimeError52("\u627E\u4E0D\u5230".concat(node._nodeId, "\u7684\u8282\u70B9\u6A21\u578B"));
|
|
22393
22540
|
}
|
|
22394
22541
|
const result = this.prepareParams(nodeModel, deData, context, params);
|
|
22395
22542
|
result.context.currentSrfNav = nodeId;
|
|
@@ -22580,7 +22727,7 @@ var ChartExpBarController = class extends ExpBarControlController {
|
|
|
22580
22727
|
};
|
|
22581
22728
|
|
|
22582
22729
|
// src/controller/control/form/search-form/search-form.controller.ts
|
|
22583
|
-
import { RuntimeError as
|
|
22730
|
+
import { RuntimeError as RuntimeError53 } from "@ibiz-template/core";
|
|
22584
22731
|
|
|
22585
22732
|
// src/controller/control/form/form/form.controller.ts
|
|
22586
22733
|
import {
|
|
@@ -22588,13 +22735,9 @@ import {
|
|
|
22588
22735
|
debounceAndAsyncMerge,
|
|
22589
22736
|
recursiveIterate as recursiveIterate3
|
|
22590
22737
|
} from "@ibiz-template/core";
|
|
22591
|
-
import { clone as clone24 } from "ramda";
|
|
22592
22738
|
var FormController = class extends ControlController {
|
|
22593
|
-
constructor(
|
|
22594
|
-
|
|
22595
|
-
model = clone24(model);
|
|
22596
|
-
}
|
|
22597
|
-
super(model, context, params, ctx);
|
|
22739
|
+
constructor() {
|
|
22740
|
+
super(...arguments);
|
|
22598
22741
|
/**
|
|
22599
22742
|
* 所有表单项成员的控制器
|
|
22600
22743
|
*
|
|
@@ -22656,70 +22799,6 @@ var FormController = class extends ControlController {
|
|
|
22656
22799
|
this.state.processing = false;
|
|
22657
22800
|
this.state.modified = false;
|
|
22658
22801
|
}
|
|
22659
|
-
/**
|
|
22660
|
-
* 进行模型预处理
|
|
22661
|
-
*
|
|
22662
|
-
* @author chitanda
|
|
22663
|
-
* @date 2024-02-27 09:02:52
|
|
22664
|
-
* @protected
|
|
22665
|
-
*/
|
|
22666
|
-
preprocessModel(model) {
|
|
22667
|
-
if (this.context && (this.context.srfreadonly === true || this.context.srfreadonly === "true")) {
|
|
22668
|
-
const pages = model.deformPages;
|
|
22669
|
-
if (pages) {
|
|
22670
|
-
pages.forEach((page) => {
|
|
22671
|
-
page.infoGroupMode = true;
|
|
22672
|
-
if (page.deformDetails) {
|
|
22673
|
-
page.deformDetails.forEach((detail) => {
|
|
22674
|
-
this.deepPreprocessModel(detail);
|
|
22675
|
-
});
|
|
22676
|
-
}
|
|
22677
|
-
});
|
|
22678
|
-
}
|
|
22679
|
-
}
|
|
22680
|
-
}
|
|
22681
|
-
/**
|
|
22682
|
-
* 递归将表单模型修改为信息态
|
|
22683
|
-
*
|
|
22684
|
-
* @author chitanda
|
|
22685
|
-
* @date 2024-02-27 11:02:43
|
|
22686
|
-
* @protected
|
|
22687
|
-
* @param {IDEFormGroupBase} model
|
|
22688
|
-
*/
|
|
22689
|
-
deepPreprocessModel(model) {
|
|
22690
|
-
if (model.detailType === "GROUPPANEL") {
|
|
22691
|
-
model.infoGroupMode = true;
|
|
22692
|
-
} else if (model.detailType === "FORMITEM") {
|
|
22693
|
-
const { editor } = model;
|
|
22694
|
-
if (editor) {
|
|
22695
|
-
editor.readOnly = true;
|
|
22696
|
-
}
|
|
22697
|
-
}
|
|
22698
|
-
switch (model.detailType) {
|
|
22699
|
-
case "FORMITEM": {
|
|
22700
|
-
const { editor } = model;
|
|
22701
|
-
if (editor) {
|
|
22702
|
-
editor.readOnly = true;
|
|
22703
|
-
}
|
|
22704
|
-
break;
|
|
22705
|
-
}
|
|
22706
|
-
case "MDCTRL": {
|
|
22707
|
-
const detail = model;
|
|
22708
|
-
detail.buildInActions = 0;
|
|
22709
|
-
break;
|
|
22710
|
-
}
|
|
22711
|
-
case "GROUPPANEL":
|
|
22712
|
-
model.infoGroupMode = true;
|
|
22713
|
-
break;
|
|
22714
|
-
default:
|
|
22715
|
-
break;
|
|
22716
|
-
}
|
|
22717
|
-
if (model.deformDetails) {
|
|
22718
|
-
model.deformDetails.forEach((detail) => {
|
|
22719
|
-
this.deepPreprocessModel(detail);
|
|
22720
|
-
});
|
|
22721
|
-
}
|
|
22722
|
-
}
|
|
22723
22802
|
/**
|
|
22724
22803
|
* 通知所有表单成员表单操作过程中的数据变更
|
|
22725
22804
|
*
|
|
@@ -23257,7 +23336,7 @@ var SearchFormController = class extends FormController {
|
|
|
23257
23336
|
applyStoredFilter(index) {
|
|
23258
23337
|
const filter = this.state.storedFilters[index];
|
|
23259
23338
|
if (!filter) {
|
|
23260
|
-
throw new
|
|
23339
|
+
throw new RuntimeError53("\u6CA1\u6709\u627E\u5230\u53EF\u4EE5\u5E94\u7528\u7684\u641C\u7D22\u6761\u4EF6");
|
|
23261
23340
|
}
|
|
23262
23341
|
if (filter.data) {
|
|
23263
23342
|
Object.assign(this.data, filter.data);
|
|
@@ -23273,7 +23352,7 @@ var SearchFormController = class extends FormController {
|
|
|
23273
23352
|
async removeStoredFilter(index) {
|
|
23274
23353
|
const filter = this.state.storedFilters[index];
|
|
23275
23354
|
if (!filter) {
|
|
23276
|
-
throw new
|
|
23355
|
+
throw new RuntimeError53("\u6CA1\u6709\u627E\u5230\u4FDD\u5B58\u7684\u641C\u7D22\u6761\u4EF6");
|
|
23277
23356
|
}
|
|
23278
23357
|
this.state.storedFilters.splice(index, 1);
|
|
23279
23358
|
await this.saveConfig();
|
|
@@ -23313,6 +23392,14 @@ var FormDetailState = class {
|
|
|
23313
23392
|
* @type {(0 | 1 | 2)}
|
|
23314
23393
|
*/
|
|
23315
23394
|
this.showMoreMode = 0;
|
|
23395
|
+
/**
|
|
23396
|
+
* 是否只读
|
|
23397
|
+
*
|
|
23398
|
+
* @author zhanghengfeng
|
|
23399
|
+
* @date 2024-03-25 17:03:48
|
|
23400
|
+
* @type {boolean}
|
|
23401
|
+
*/
|
|
23402
|
+
this.readonly = false;
|
|
23316
23403
|
let $visible = true;
|
|
23317
23404
|
Object.defineProperty(this, "visible", {
|
|
23318
23405
|
enumerable: true,
|
|
@@ -23351,6 +23438,18 @@ var FormDetailState = class {
|
|
|
23351
23438
|
return true;
|
|
23352
23439
|
}
|
|
23353
23440
|
});
|
|
23441
|
+
let $readonly = false;
|
|
23442
|
+
Object.defineProperty(this, "readonly", {
|
|
23443
|
+
enumerable: true,
|
|
23444
|
+
configurable: true,
|
|
23445
|
+
get() {
|
|
23446
|
+
return $readonly;
|
|
23447
|
+
},
|
|
23448
|
+
set(val) {
|
|
23449
|
+
$readonly = val;
|
|
23450
|
+
return true;
|
|
23451
|
+
}
|
|
23452
|
+
});
|
|
23354
23453
|
}
|
|
23355
23454
|
};
|
|
23356
23455
|
|
|
@@ -23483,6 +23582,9 @@ var FormDetailController = class {
|
|
|
23483
23582
|
this.model.caption
|
|
23484
23583
|
);
|
|
23485
23584
|
}
|
|
23585
|
+
if (this.context.srfreadonly === true || this.context.srfreadonly === "true") {
|
|
23586
|
+
this.state.readonly = true;
|
|
23587
|
+
}
|
|
23486
23588
|
}
|
|
23487
23589
|
/**
|
|
23488
23590
|
* 创建表单状态对象
|
|
@@ -24235,12 +24337,16 @@ var FormItemController = class extends FormDetailController {
|
|
|
24235
24337
|
* @returns {*} {Promise<void>}
|
|
24236
24338
|
*/
|
|
24237
24339
|
async onInit() {
|
|
24340
|
+
var _a;
|
|
24238
24341
|
await super.onInit();
|
|
24239
24342
|
this.state.required = !this.model.allowEmpty;
|
|
24240
24343
|
const { enableCond } = this.model;
|
|
24241
24344
|
if (!enableCond) {
|
|
24242
24345
|
this.state.enableCondDisabled = true;
|
|
24243
24346
|
}
|
|
24347
|
+
if (this.context.srfreadonly !== true && this.context.srfreadonly !== "true") {
|
|
24348
|
+
this.state.readonly = ((_a = this.model.editor) == null ? void 0 : _a.readOnly) || false;
|
|
24349
|
+
}
|
|
24244
24350
|
if (this.model.editor && this.model.editor.editorType !== "HIDDEN") {
|
|
24245
24351
|
this.editorProvider = await getEditorProvider(this.model.editor);
|
|
24246
24352
|
if (this.editorProvider) {
|
|
@@ -24337,7 +24443,7 @@ var FormItemController = class extends FormDetailController {
|
|
|
24337
24443
|
this.state.error = null;
|
|
24338
24444
|
return true;
|
|
24339
24445
|
}
|
|
24340
|
-
if (this.state.required && isNilOrEmpty7(this.data[this.name])) {
|
|
24446
|
+
if (this.state.required && (typeof this.data[this.name] === "string" ? isNilOrEmpty7(this.data[this.name].trimEnd()) : isNilOrEmpty7(this.data[this.name]))) {
|
|
24341
24447
|
this.state.error = "\u8BF7\u586B\u5199".concat(this.model.caption || "");
|
|
24342
24448
|
return false;
|
|
24343
24449
|
}
|
|
@@ -24448,7 +24554,7 @@ var FormMDCtrlController = class extends FormDetailController {
|
|
|
24448
24554
|
* @type {boolean}
|
|
24449
24555
|
*/
|
|
24450
24556
|
get enableCreate() {
|
|
24451
|
-
return BitMask.checkPermission(this.model.buildInActions, 1);
|
|
24557
|
+
return !this.state.readonly && BitMask.checkPermission(this.model.buildInActions, 1);
|
|
24452
24558
|
}
|
|
24453
24559
|
/**
|
|
24454
24560
|
* 是否允许更新
|
|
@@ -24459,7 +24565,7 @@ var FormMDCtrlController = class extends FormDetailController {
|
|
|
24459
24565
|
* @type {boolean}
|
|
24460
24566
|
*/
|
|
24461
24567
|
get enableUpdate() {
|
|
24462
|
-
return BitMask.checkPermission(this.model.buildInActions, 2);
|
|
24568
|
+
return !this.state.readonly && BitMask.checkPermission(this.model.buildInActions, 2);
|
|
24463
24569
|
}
|
|
24464
24570
|
/**
|
|
24465
24571
|
* 是否允许删除
|
|
@@ -24469,7 +24575,7 @@ var FormMDCtrlController = class extends FormDetailController {
|
|
|
24469
24575
|
* @type {boolean}
|
|
24470
24576
|
*/
|
|
24471
24577
|
get enableDelete() {
|
|
24472
|
-
return BitMask.checkPermission(this.model.buildInActions, 4);
|
|
24578
|
+
return !this.state.readonly && BitMask.checkPermission(this.model.buildInActions, 4);
|
|
24473
24579
|
}
|
|
24474
24580
|
/**
|
|
24475
24581
|
* 如果配置了表单项更新,则执行表单项更新
|
|
@@ -24627,7 +24733,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
24627
24733
|
};
|
|
24628
24734
|
|
|
24629
24735
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
|
|
24630
|
-
import { RuntimeError as
|
|
24736
|
+
import { RuntimeError as RuntimeError54, RuntimeModelError as RuntimeModelError59 } from "@ibiz-template/core";
|
|
24631
24737
|
import { createUUID as createUUID11 } from "qx-util";
|
|
24632
24738
|
|
|
24633
24739
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
|
|
@@ -24744,7 +24850,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
24744
24850
|
async remove(id) {
|
|
24745
24851
|
const controller = this.formMap.get(id);
|
|
24746
24852
|
if (!controller) {
|
|
24747
|
-
throw new
|
|
24853
|
+
throw new RuntimeError54("\u6CA1\u6709\u627E\u5230\u5BF9\u5E94".concat(id, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
24748
24854
|
}
|
|
24749
24855
|
await controller.remove();
|
|
24750
24856
|
const index = this.state.items.findIndex((item) => item.id === id);
|
|
@@ -24802,7 +24908,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
24802
24908
|
|
|
24803
24909
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
|
|
24804
24910
|
import { ModelError as ModelError28 } from "@ibiz-template/core";
|
|
24805
|
-
import { clone as
|
|
24911
|
+
import { clone as clone24 } from "ramda";
|
|
24806
24912
|
var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
24807
24913
|
constructor() {
|
|
24808
24914
|
super(...arguments);
|
|
@@ -24886,7 +24992,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
24886
24992
|
copyFields.forEach((key) => {
|
|
24887
24993
|
tempForm[key] = this.form.model[key];
|
|
24888
24994
|
});
|
|
24889
|
-
this.repeatedForm =
|
|
24995
|
+
this.repeatedForm = clone24(tempForm);
|
|
24890
24996
|
}
|
|
24891
24997
|
/**
|
|
24892
24998
|
* 设置重复器数据(修改主表单里重复器对应属性)
|
|
@@ -25061,11 +25167,11 @@ import {
|
|
|
25061
25167
|
IBizContext as IBizContext4,
|
|
25062
25168
|
isElementSame as isElementSame2,
|
|
25063
25169
|
mergeInLeft as mergeInLeft2,
|
|
25064
|
-
RuntimeError as
|
|
25170
|
+
RuntimeError as RuntimeError55
|
|
25065
25171
|
} from "@ibiz-template/core";
|
|
25066
|
-
import { debounce
|
|
25172
|
+
import { debounce } from "lodash-es";
|
|
25067
25173
|
import { createUUID as createUUID12 } from "qx-util";
|
|
25068
|
-
import { clone as
|
|
25174
|
+
import { clone as clone25, isNil as isNil27 } from "ramda";
|
|
25069
25175
|
|
|
25070
25176
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
25071
25177
|
import {
|
|
@@ -25383,7 +25489,7 @@ var EditFormController = class extends FormController {
|
|
|
25383
25489
|
await super.onCreated();
|
|
25384
25490
|
this.service = new EditFormService(this.model);
|
|
25385
25491
|
await this.service.init(this.context);
|
|
25386
|
-
this.autoSave =
|
|
25492
|
+
this.autoSave = debounce(this.autoSave.bind(this), 500, {
|
|
25387
25493
|
trailing: true
|
|
25388
25494
|
});
|
|
25389
25495
|
}
|
|
@@ -25430,8 +25536,8 @@ var EditFormController = class extends FormController {
|
|
|
25430
25536
|
* @return {*} {Promise<IData>}
|
|
25431
25537
|
*/
|
|
25432
25538
|
async copy() {
|
|
25433
|
-
const context =
|
|
25434
|
-
const queryParams =
|
|
25539
|
+
const context = clone25(this.context);
|
|
25540
|
+
const queryParams = clone25(this.params);
|
|
25435
25541
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
25436
25542
|
this.model.appDataEntityId,
|
|
25437
25543
|
this.model.appId
|
|
@@ -25488,7 +25594,7 @@ var EditFormController = class extends FormController {
|
|
|
25488
25594
|
return this.loadDraft();
|
|
25489
25595
|
}
|
|
25490
25596
|
const { context, params } = this.handlerAbilityParams(args);
|
|
25491
|
-
const queryParams =
|
|
25597
|
+
const queryParams = clone25(params);
|
|
25492
25598
|
let res;
|
|
25493
25599
|
try {
|
|
25494
25600
|
await this.startLoading();
|
|
@@ -25526,7 +25632,7 @@ var EditFormController = class extends FormController {
|
|
|
25526
25632
|
}
|
|
25527
25633
|
const isValid = await this.validate();
|
|
25528
25634
|
if (!isValid) {
|
|
25529
|
-
throw new
|
|
25635
|
+
throw new RuntimeError55("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
25530
25636
|
}
|
|
25531
25637
|
if (!silent) {
|
|
25532
25638
|
await this.startLoading();
|
|
@@ -25570,10 +25676,7 @@ var EditFormController = class extends FormController {
|
|
|
25570
25676
|
default: "".concat(this.data.srfmajortext || "", "\u4FDD\u5B58\u6210\u529F")
|
|
25571
25677
|
});
|
|
25572
25678
|
}
|
|
25573
|
-
|
|
25574
|
-
res.data.$origin,
|
|
25575
|
-
isCreate ? "OBJECTCREATED" : "OBJECTUPDATED"
|
|
25576
|
-
);
|
|
25679
|
+
this.emitDEDataChange(isCreate ? "create" : "update", res.data);
|
|
25577
25680
|
return this.data;
|
|
25578
25681
|
}
|
|
25579
25682
|
/**
|
|
@@ -25610,11 +25713,11 @@ var EditFormController = class extends FormController {
|
|
|
25610
25713
|
}
|
|
25611
25714
|
ok = res.ok;
|
|
25612
25715
|
}
|
|
25716
|
+
this.emitDEDataChange("remove", this.data);
|
|
25613
25717
|
this.state.data = new ControlVO();
|
|
25614
25718
|
this.state.modified = false;
|
|
25615
25719
|
await this.evt.emit("onRemoveSuccess", void 0);
|
|
25616
25720
|
this.actionNotification("REMOVESUCCESS");
|
|
25617
|
-
ibiz.mc.command.send(this.data.$origin, "OBJECTREMOVED");
|
|
25618
25721
|
return ok;
|
|
25619
25722
|
}
|
|
25620
25723
|
/**
|
|
@@ -25651,7 +25754,7 @@ var EditFormController = class extends FormController {
|
|
|
25651
25754
|
(item) => item.id === formItemUpdateId
|
|
25652
25755
|
);
|
|
25653
25756
|
if (!formItemUpdate) {
|
|
25654
|
-
throw new
|
|
25757
|
+
throw new RuntimeError55("\u6CA1\u627E\u5230".concat(formItemUpdateId, "\u8868\u5355\u9879\u66F4\u65B0"));
|
|
25655
25758
|
}
|
|
25656
25759
|
const {
|
|
25657
25760
|
appDEMethodId,
|
|
@@ -25710,14 +25813,14 @@ var EditFormController = class extends FormController {
|
|
|
25710
25813
|
async wfStart(args) {
|
|
25711
25814
|
const isValid = await this.validate();
|
|
25712
25815
|
if (!isValid) {
|
|
25713
|
-
throw new
|
|
25816
|
+
throw new RuntimeError55("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
25714
25817
|
}
|
|
25715
25818
|
await this.startLoading();
|
|
25716
25819
|
const { context, params } = this.handlerAbilityParams(args);
|
|
25717
25820
|
try {
|
|
25718
25821
|
await this.service.wfStart(context, params, this.data);
|
|
25719
|
-
|
|
25720
|
-
|
|
25822
|
+
this.emitDEDataChange("update", this.data);
|
|
25823
|
+
this.emitDEDataChange("update", { srfdecodename: "SysTodo" });
|
|
25721
25824
|
} catch (error) {
|
|
25722
25825
|
this.actionNotification("WFSTARTERROR", {
|
|
25723
25826
|
error
|
|
@@ -25739,14 +25842,14 @@ var EditFormController = class extends FormController {
|
|
|
25739
25842
|
async wfSubmit(args) {
|
|
25740
25843
|
const isValid = await this.validate();
|
|
25741
25844
|
if (!isValid) {
|
|
25742
|
-
throw new
|
|
25845
|
+
throw new RuntimeError55("\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01");
|
|
25743
25846
|
}
|
|
25744
25847
|
await this.startLoading();
|
|
25745
25848
|
const { context, params } = this.handlerAbilityParams(args);
|
|
25746
25849
|
try {
|
|
25747
25850
|
await this.service.wfSubmit(context, params, this.data);
|
|
25748
|
-
|
|
25749
|
-
|
|
25851
|
+
this.emitDEDataChange("update", this.data);
|
|
25852
|
+
this.emitDEDataChange("update", { srfdecodename: "SysTodo" });
|
|
25750
25853
|
} catch (error) {
|
|
25751
25854
|
this.actionNotification("WFSUBMITERROR", {
|
|
25752
25855
|
error
|
|
@@ -25833,6 +25936,29 @@ var EditFormController = class extends FormController {
|
|
|
25833
25936
|
this.dataChangeNotify(Object.keys(this.state.data));
|
|
25834
25937
|
}
|
|
25835
25938
|
}
|
|
25939
|
+
/**
|
|
25940
|
+
* 检测实体数据变更
|
|
25941
|
+
*
|
|
25942
|
+
* @author tony001
|
|
25943
|
+
* @date 2024-03-28 18:03:14
|
|
25944
|
+
* @protected
|
|
25945
|
+
* @param {IPortalMessage} msg
|
|
25946
|
+
* @return {*} {void}
|
|
25947
|
+
*/
|
|
25948
|
+
onDEDataChange(msg) {
|
|
25949
|
+
var _a;
|
|
25950
|
+
if (msg.subtype !== "OBJECTUPDATED") {
|
|
25951
|
+
return;
|
|
25952
|
+
}
|
|
25953
|
+
if (!isNil27(msg.triggerKey) && msg.triggerKey === this.triggerKey) {
|
|
25954
|
+
return;
|
|
25955
|
+
}
|
|
25956
|
+
const dename = calcDeCodeNameById(this.model.appDataEntityId);
|
|
25957
|
+
if (!msg.data || ((_a = msg.data.srfdecodename) == null ? void 0 : _a.toLowerCase()) !== dename || msg.data.srfkey !== this.data.srfkey) {
|
|
25958
|
+
return;
|
|
25959
|
+
}
|
|
25960
|
+
this.doNextActive(() => this.load(), { key: "load" });
|
|
25961
|
+
}
|
|
25836
25962
|
};
|
|
25837
25963
|
|
|
25838
25964
|
// src/controller/control/grid/grid/grid-column.controller.ts
|
|
@@ -26075,10 +26201,10 @@ import {
|
|
|
26075
26201
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
26076
26202
|
mergeDefaultInLeft,
|
|
26077
26203
|
recursiveIterate as recursiveIterate7,
|
|
26078
|
-
RuntimeError as
|
|
26204
|
+
RuntimeError as RuntimeError56,
|
|
26079
26205
|
RuntimeModelError as RuntimeModelError62
|
|
26080
26206
|
} from "@ibiz-template/core";
|
|
26081
|
-
import { clone as
|
|
26207
|
+
import { clone as clone26 } from "ramda";
|
|
26082
26208
|
import dayjs5 from "dayjs";
|
|
26083
26209
|
|
|
26084
26210
|
// src/controller/control/grid/grid/grid.service.ts
|
|
@@ -26428,7 +26554,7 @@ var GridController = class extends MDControlController {
|
|
|
26428
26554
|
const result = await calcColumnModelBySchema(json, this);
|
|
26429
26555
|
if (result && result.degridColumns.length > 0) {
|
|
26430
26556
|
const { degridColumns, degridDataItems } = result;
|
|
26431
|
-
this.model =
|
|
26557
|
+
this.model = clone26(this.model);
|
|
26432
26558
|
this.model.degridColumns = [
|
|
26433
26559
|
...(this.model.degridColumns || []).filter((item) => {
|
|
26434
26560
|
return degridColumns.findIndex((x) => x.id === item.id) === -1;
|
|
@@ -26702,7 +26828,7 @@ var GridController = class extends MDControlController {
|
|
|
26702
26828
|
if (editShowMode === "row") {
|
|
26703
26829
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
26704
26830
|
if (editingRow) {
|
|
26705
|
-
throw new
|
|
26831
|
+
throw new RuntimeError56("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
|
|
26706
26832
|
}
|
|
26707
26833
|
}
|
|
26708
26834
|
const queryParams = { ...this.params };
|
|
@@ -26743,7 +26869,7 @@ var GridController = class extends MDControlController {
|
|
|
26743
26869
|
const isCreate = data.srfuf === 0 /* CREATE */;
|
|
26744
26870
|
const rowState = this.findRowState(data);
|
|
26745
26871
|
if (!rowState) {
|
|
26746
|
-
throw new
|
|
26872
|
+
throw new RuntimeError56("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
26747
26873
|
}
|
|
26748
26874
|
if (!rowState.modified) {
|
|
26749
26875
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -26755,7 +26881,7 @@ var GridController = class extends MDControlController {
|
|
|
26755
26881
|
}
|
|
26756
26882
|
const isValid = await this.validate(rowState);
|
|
26757
26883
|
if (!isValid) {
|
|
26758
|
-
throw new
|
|
26884
|
+
throw new RuntimeError56("\u884C\u6570\u636E\u6821\u9A8C\u4E0D\u901A\u8FC7\uFF0C\u4FDD\u5B58\u53D6\u6D88");
|
|
26759
26885
|
}
|
|
26760
26886
|
if (this.model.enableRowEditChangedOnly) {
|
|
26761
26887
|
data = rowState.getDiffData();
|
|
@@ -26781,6 +26907,7 @@ var GridController = class extends MDControlController {
|
|
|
26781
26907
|
rowState.modified = false;
|
|
26782
26908
|
this.gridStateNotify(rowState, "SAVE" /* SAVE */);
|
|
26783
26909
|
await this._evt.emit("onSaveSuccess", void 0);
|
|
26910
|
+
this.emitDEDataChange(isCreate ? "create" : "update", res.data);
|
|
26784
26911
|
}
|
|
26785
26912
|
async saveAll() {
|
|
26786
26913
|
const needSaveData = this.state.rows.filter((row) => row.modified).map((row) => row.data);
|
|
@@ -26977,7 +27104,7 @@ var GridController = class extends MDControlController {
|
|
|
26977
27104
|
}
|
|
26978
27105
|
async toggleRowEdit() {
|
|
26979
27106
|
if (!this.model.enableRowNew) {
|
|
26980
|
-
throw new
|
|
27107
|
+
throw new RuntimeError56("\u5F53\u524D\u8868\u683C\u4E0D\u652F\u6301\u884C\u7F16\u8F91\uFF0C\u65E0\u6CD5\u5207\u6362\u5F00\u542F\u884C\u7F16\u8F91");
|
|
26981
27108
|
}
|
|
26982
27109
|
this.state.rowEditOpen = !this.state.rowEditOpen;
|
|
26983
27110
|
}
|
|
@@ -27010,10 +27137,10 @@ var GridController = class extends MDControlController {
|
|
|
27010
27137
|
} else {
|
|
27011
27138
|
const editingRow = this.state.rows.find((item) => item.showRowEdit);
|
|
27012
27139
|
if (editingRow) {
|
|
27013
|
-
throw new
|
|
27140
|
+
throw new RuntimeError56("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
27014
27141
|
}
|
|
27015
27142
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
27016
|
-
row.cacheData =
|
|
27143
|
+
row.cacheData = clone26(row.data);
|
|
27017
27144
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
27018
27145
|
Object.assign(row.data, defaultVal);
|
|
27019
27146
|
}
|
|
@@ -27065,7 +27192,7 @@ var GridController = class extends MDControlController {
|
|
|
27065
27192
|
(item) => item.id === updateId
|
|
27066
27193
|
);
|
|
27067
27194
|
if (!findUpdate) {
|
|
27068
|
-
throw new
|
|
27195
|
+
throw new RuntimeError56("\u6CA1\u627E\u5230".concat(updateId, "\u7F16\u8F91\u5217\u66F4\u65B0"));
|
|
27069
27196
|
}
|
|
27070
27197
|
const { appDEMethodId, degeiupdateDetails, customCode, scriptCode } = findUpdate;
|
|
27071
27198
|
const updateItems = degeiupdateDetails.map((item) => item.id);
|
|
@@ -27152,7 +27279,7 @@ var GridController = class extends MDControlController {
|
|
|
27152
27279
|
*/
|
|
27153
27280
|
formatExcelData(data) {
|
|
27154
27281
|
const { fields = [] } = this.dataExportParam;
|
|
27155
|
-
const cloneData =
|
|
27282
|
+
const cloneData = clone26(
|
|
27156
27283
|
data.map((item) => {
|
|
27157
27284
|
return fields.reduce((obj, key) => {
|
|
27158
27285
|
obj[key] = item[key];
|
|
@@ -27205,7 +27332,7 @@ var GridController = class extends MDControlController {
|
|
|
27205
27332
|
data = this.getData();
|
|
27206
27333
|
}
|
|
27207
27334
|
if (data.length === 0) {
|
|
27208
|
-
throw new
|
|
27335
|
+
throw new RuntimeError56("\u65E0\u5BFC\u51FA\u6570\u636E");
|
|
27209
27336
|
}
|
|
27210
27337
|
return data;
|
|
27211
27338
|
}
|
|
@@ -27219,7 +27346,7 @@ var GridController = class extends MDControlController {
|
|
|
27219
27346
|
async exportData(args) {
|
|
27220
27347
|
const { header } = this.dataExportParam;
|
|
27221
27348
|
if (!header) {
|
|
27222
|
-
throw new
|
|
27349
|
+
throw new RuntimeError56("\u65E0\u8868\u683C\u5217");
|
|
27223
27350
|
}
|
|
27224
27351
|
const data = await this.getExportData(args.params);
|
|
27225
27352
|
const formatData = this.formatExcelData(data);
|
|
@@ -27397,8 +27524,8 @@ var GridController = class extends MDControlController {
|
|
|
27397
27524
|
// src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts
|
|
27398
27525
|
import { DataTypes as DataTypes4, ModelError as ModelError29, plus as plus2 } from "@ibiz-template/core";
|
|
27399
27526
|
import dayjs6 from "dayjs";
|
|
27400
|
-
import { debounce as
|
|
27401
|
-
import { clone as
|
|
27527
|
+
import { debounce as debounce2 } from "lodash-es";
|
|
27528
|
+
import { clone as clone27, isNil as isNil28 } from "ramda";
|
|
27402
27529
|
var GridFieldColumnController = class extends GridColumnController {
|
|
27403
27530
|
constructor() {
|
|
27404
27531
|
super(...arguments);
|
|
@@ -27442,7 +27569,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
27442
27569
|
}
|
|
27443
27570
|
async onInit() {
|
|
27444
27571
|
await super.onInit();
|
|
27445
|
-
this.loadCodeList =
|
|
27572
|
+
this.loadCodeList = debounce2(this.loadCodeList, 300, {
|
|
27446
27573
|
leading: true,
|
|
27447
27574
|
trailing: false
|
|
27448
27575
|
});
|
|
@@ -27536,7 +27663,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
27536
27663
|
srfkey: value,
|
|
27537
27664
|
...wfContext
|
|
27538
27665
|
});
|
|
27539
|
-
const tempParams =
|
|
27666
|
+
const tempParams = clone27(this.params);
|
|
27540
27667
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
27541
27668
|
row.data,
|
|
27542
27669
|
tempContext,
|
|
@@ -27610,11 +27737,11 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
27610
27737
|
*/
|
|
27611
27738
|
calcFieldAgg(items) {
|
|
27612
27739
|
const { aggField, aggMode, aggValueFormat, unitName } = this.model;
|
|
27613
|
-
if (
|
|
27740
|
+
if (isNil28(aggMode) || aggMode === "NONE") {
|
|
27614
27741
|
return;
|
|
27615
27742
|
}
|
|
27616
27743
|
const fieldName = aggField || this.model.id;
|
|
27617
|
-
items = items.filter((item) => !
|
|
27744
|
+
items = items.filter((item) => !isNil28(item[fieldName]));
|
|
27618
27745
|
let aggValue;
|
|
27619
27746
|
if (this.grid.model.aggMode === "PAGE") {
|
|
27620
27747
|
switch (aggMode) {
|
|
@@ -27765,7 +27892,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
27765
27892
|
};
|
|
27766
27893
|
|
|
27767
27894
|
// src/controller/control/grid/grid-column/grid-field-edit-column/grid-field-edit-column.controller.ts
|
|
27768
|
-
import { RuntimeError as
|
|
27895
|
+
import { RuntimeError as RuntimeError57 } from "@ibiz-template/core";
|
|
27769
27896
|
import Schema2 from "async-validator";
|
|
27770
27897
|
import { isNilOrEmpty as isNilOrEmpty8 } from "qx-util";
|
|
27771
27898
|
var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
@@ -27905,7 +28032,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
27905
28032
|
if (requiredChanged || names.includes(this.fieldName) || names.includes(this.valueItemName)) {
|
|
27906
28033
|
const result = await this.validate(row);
|
|
27907
28034
|
if (!result) {
|
|
27908
|
-
throw new
|
|
28035
|
+
throw new RuntimeError57(
|
|
27909
28036
|
"".concat(this.editItem.codeName, "\u6821\u9A8C\u62A5\u9519,").concat(row.errors[this.fieldName])
|
|
27910
28037
|
);
|
|
27911
28038
|
}
|
|
@@ -28006,7 +28133,7 @@ var GridFieldEditColumnController = class extends GridFieldColumnController {
|
|
|
28006
28133
|
*/
|
|
28007
28134
|
async validate(row) {
|
|
28008
28135
|
const editName = this.fieldName;
|
|
28009
|
-
if (ibiz.config.grid.editShowMode !== "cell" && row.editColStates[editName].required && isNilOrEmpty8(row.data[editName])) {
|
|
28136
|
+
if (ibiz.config.grid.editShowMode !== "cell" && row.editColStates[editName].required === true && (typeof row.data[editName] === "string" ? isNilOrEmpty8(row.data[editName].trimEnd()) : isNilOrEmpty8(row.data[editName]))) {
|
|
28010
28137
|
row.errors[editName] = "\u8BF7\u586B\u5199".concat(this.model.caption || "");
|
|
28011
28138
|
return false;
|
|
28012
28139
|
}
|
|
@@ -28203,7 +28330,7 @@ var ListController = class extends MDControlController {
|
|
|
28203
28330
|
};
|
|
28204
28331
|
|
|
28205
28332
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
28206
|
-
import { recursiveIterate as recursiveIterate8, RuntimeError as
|
|
28333
|
+
import { recursiveIterate as recursiveIterate8, RuntimeError as RuntimeError58 } from "@ibiz-template/core";
|
|
28207
28334
|
var PanelController = class extends ControlController {
|
|
28208
28335
|
constructor(model, context, params, ctx, container) {
|
|
28209
28336
|
super(model, context, params, ctx);
|
|
@@ -28327,7 +28454,7 @@ var PanelController = class extends ControlController {
|
|
|
28327
28454
|
var _a, _b;
|
|
28328
28455
|
const data = await this.prepareData();
|
|
28329
28456
|
if (!data) {
|
|
28330
|
-
throw new
|
|
28457
|
+
throw new RuntimeError58("\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E");
|
|
28331
28458
|
}
|
|
28332
28459
|
const panelData = this.convertData(data);
|
|
28333
28460
|
(_b = (_a = this.data).destroy) == null ? void 0 : _b.call(_a);
|
|
@@ -28506,6 +28633,14 @@ var PanelItemState = class {
|
|
|
28506
28633
|
* @type {boolean}
|
|
28507
28634
|
*/
|
|
28508
28635
|
this.required = false;
|
|
28636
|
+
/**
|
|
28637
|
+
* 是否只读
|
|
28638
|
+
*
|
|
28639
|
+
* @author zhanghengfeng
|
|
28640
|
+
* @date 2024-03-25 17:03:36
|
|
28641
|
+
* @type {boolean}
|
|
28642
|
+
*/
|
|
28643
|
+
this.readonly = false;
|
|
28509
28644
|
let $visible = true;
|
|
28510
28645
|
Object.defineProperty(this, "visible", {
|
|
28511
28646
|
enumerable: true,
|
|
@@ -28537,6 +28672,18 @@ var PanelItemState = class {
|
|
|
28537
28672
|
return true;
|
|
28538
28673
|
}
|
|
28539
28674
|
});
|
|
28675
|
+
let $readonly = false;
|
|
28676
|
+
Object.defineProperty(this, "readonly", {
|
|
28677
|
+
enumerable: true,
|
|
28678
|
+
configurable: true,
|
|
28679
|
+
get() {
|
|
28680
|
+
return $readonly;
|
|
28681
|
+
},
|
|
28682
|
+
set(val) {
|
|
28683
|
+
$readonly = val;
|
|
28684
|
+
return true;
|
|
28685
|
+
}
|
|
28686
|
+
});
|
|
28540
28687
|
}
|
|
28541
28688
|
};
|
|
28542
28689
|
|
|
@@ -28637,6 +28784,9 @@ var PanelItemController = class {
|
|
|
28637
28784
|
if (labelSysCss == null ? void 0 : labelSysCss.cssName) {
|
|
28638
28785
|
this.state.class.label.push(labelSysCss.cssName);
|
|
28639
28786
|
}
|
|
28787
|
+
if (this.panel.context.srfreadonly === true || this.panel.context.srfreadonly === "true") {
|
|
28788
|
+
this.state.readonly = true;
|
|
28789
|
+
}
|
|
28640
28790
|
}
|
|
28641
28791
|
destroy() {
|
|
28642
28792
|
}
|
|
@@ -28930,7 +29080,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
28930
29080
|
|
|
28931
29081
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
28932
29082
|
import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate10 } from "@ibiz-template/core";
|
|
28933
|
-
import { clone as
|
|
29083
|
+
import { clone as clone29, isNil as isNil30 } from "ramda";
|
|
28934
29084
|
import { isString as isString2 } from "lodash-es";
|
|
28935
29085
|
|
|
28936
29086
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
@@ -29373,8 +29523,8 @@ async function calcFilterModelBySchema(json, appDataEntityId, modelAppId) {
|
|
|
29373
29523
|
}
|
|
29374
29524
|
|
|
29375
29525
|
// src/controller/control/search-bar/use-searchcond.ts
|
|
29376
|
-
import { RuntimeError as
|
|
29377
|
-
import { isNil as
|
|
29526
|
+
import { RuntimeError as RuntimeError59, recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
|
|
29527
|
+
import { isNil as isNil29 } from "ramda";
|
|
29378
29528
|
var ExcludeOPs2 = ["ISNULL" /* IS_NULL */, "ISNOTNULL" /* IS_NOT_NULL */];
|
|
29379
29529
|
function getOriginFilterNodes() {
|
|
29380
29530
|
return [
|
|
@@ -29444,14 +29594,14 @@ function parseFilters(data) {
|
|
|
29444
29594
|
valueItem: data.valueItem || void 0
|
|
29445
29595
|
};
|
|
29446
29596
|
}
|
|
29447
|
-
throw new
|
|
29597
|
+
throw new RuntimeError59("\u65E0\u6548\u7684condtype:".concat(data.condtype));
|
|
29448
29598
|
}
|
|
29449
29599
|
function calcSearchConds(filterNodes) {
|
|
29450
29600
|
let hasFilter = false;
|
|
29451
29601
|
let hasError = false;
|
|
29452
29602
|
recursiveIterate9(filterNodes[0], (node) => {
|
|
29453
29603
|
if (node.leaf) {
|
|
29454
|
-
if (node.field && node.valueOP && !
|
|
29604
|
+
if (node.field && node.valueOP && !isNil29(node.value) || node.field && node.valueOP && ExcludeOPs2.includes(node.valueOP)) {
|
|
29455
29605
|
hasFilter = true;
|
|
29456
29606
|
} else {
|
|
29457
29607
|
hasError = true;
|
|
@@ -29465,8 +29615,8 @@ function calcSearchConds(filterNodes) {
|
|
|
29465
29615
|
}
|
|
29466
29616
|
|
|
29467
29617
|
// src/controller/control/search-bar/search-bar-filter-items.controller.ts
|
|
29468
|
-
import { RuntimeError as
|
|
29469
|
-
import { clone as
|
|
29618
|
+
import { RuntimeError as RuntimeError60 } from "@ibiz-template/core";
|
|
29619
|
+
import { clone as clone28 } from "ramda";
|
|
29470
29620
|
var ExcludeOPs3 = [
|
|
29471
29621
|
"ISNULL" /* IS_NULL */,
|
|
29472
29622
|
"ISNOTNULL" /* IS_NOT_NULL */
|
|
@@ -29527,7 +29677,7 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
|
29527
29677
|
return false;
|
|
29528
29678
|
});
|
|
29529
29679
|
if (!minorDEId) {
|
|
29530
|
-
throw new
|
|
29680
|
+
throw new RuntimeError60("\u627E\u4E0D\u5230\u5C5E\u6027".concat(targetField, "\u5BF9\u5E94\u7684\u5173\u8054\u5B9E\u4F53"));
|
|
29531
29681
|
}
|
|
29532
29682
|
this.minorAppDE = await ibiz.hub.getAppDataEntity(
|
|
29533
29683
|
minorDEId,
|
|
@@ -29558,7 +29708,7 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
|
29558
29708
|
});
|
|
29559
29709
|
}
|
|
29560
29710
|
fieldMap.get(subField).valueOPs.push(subOP);
|
|
29561
|
-
const cloneItem =
|
|
29711
|
+
const cloneItem = clone28(item);
|
|
29562
29712
|
cloneItem.defsearchMode.valueOP = subOP;
|
|
29563
29713
|
this.subFilterCMap.set(
|
|
29564
29714
|
this.calcKey(subField, subOP),
|
|
@@ -29738,7 +29888,7 @@ var SearchBarController = class extends ControlController {
|
|
|
29738
29888
|
}
|
|
29739
29889
|
});
|
|
29740
29890
|
if (addSearchBarFilters.length > 0) {
|
|
29741
|
-
this.model =
|
|
29891
|
+
this.model = clone29(this.model);
|
|
29742
29892
|
this.model.searchBarFilters = addSearchBarFilters.concat(...mergeFilters);
|
|
29743
29893
|
this.model.enableFilter = true;
|
|
29744
29894
|
}
|
|
@@ -29905,7 +30055,7 @@ var SearchBarController = class extends ControlController {
|
|
|
29905
30055
|
recursiveIterate10(
|
|
29906
30056
|
searchconds[0],
|
|
29907
30057
|
(node, parent) => {
|
|
29908
|
-
if (node.condtype === "DEFIELD" && !
|
|
30058
|
+
if (node.condtype === "DEFIELD" && !isNil30(node.value)) {
|
|
29909
30059
|
let controller = this.findFilterController(
|
|
29910
30060
|
node.fieldname,
|
|
29911
30061
|
node.condop
|
|
@@ -30364,10 +30514,11 @@ var TabExpPanelController = class extends ControlController {
|
|
|
30364
30514
|
|
|
30365
30515
|
// src/controller/control/tree/tree.controller.ts
|
|
30366
30516
|
import {
|
|
30367
|
-
RuntimeError as
|
|
30517
|
+
RuntimeError as RuntimeError61,
|
|
30368
30518
|
RuntimeModelError as RuntimeModelError65,
|
|
30369
30519
|
recursiveIterate as recursiveIterate11
|
|
30370
30520
|
} from "@ibiz-template/core";
|
|
30521
|
+
import { isNil as isNil31 } from "ramda";
|
|
30371
30522
|
|
|
30372
30523
|
// src/controller/control/tree/tree.service.ts
|
|
30373
30524
|
import { ModelError as ModelError30 } from "@ibiz-template/core";
|
|
@@ -31371,7 +31522,10 @@ var TreeController = class extends MDControlController {
|
|
|
31371
31522
|
await Promise.all(
|
|
31372
31523
|
nodeDatas.map(async (node) => {
|
|
31373
31524
|
const model = this.getNodeModel(node._nodeId);
|
|
31374
|
-
|
|
31525
|
+
let deData = node._deData;
|
|
31526
|
+
if (node._changedOnly) {
|
|
31527
|
+
deData = node.getDiffData();
|
|
31528
|
+
}
|
|
31375
31529
|
const deName = calcDeCodeNameById(model.appDataEntityId);
|
|
31376
31530
|
const tempContext = this.context.clone();
|
|
31377
31531
|
tempContext[deName] = deData.srfkey;
|
|
@@ -31383,6 +31537,7 @@ var TreeController = class extends MDControlController {
|
|
|
31383
31537
|
);
|
|
31384
31538
|
if (res.data) {
|
|
31385
31539
|
node._deData = res.data;
|
|
31540
|
+
node._oldDeData = res.data.clone();
|
|
31386
31541
|
}
|
|
31387
31542
|
})
|
|
31388
31543
|
);
|
|
@@ -31401,10 +31556,11 @@ var TreeController = class extends MDControlController {
|
|
|
31401
31556
|
throw new RuntimeModelError65(model, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u7F16\u8F91\u6A21\u5F0F\uFF1A\u540D\u79F0");
|
|
31402
31557
|
}
|
|
31403
31558
|
if (nodeData._nodeType !== "DE") {
|
|
31404
|
-
throw new
|
|
31559
|
+
throw new RuntimeError61("\u4E0D\u662F\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E");
|
|
31405
31560
|
}
|
|
31406
31561
|
nodeData._text = text;
|
|
31407
31562
|
await this.updateDeNodeData([nodeData]);
|
|
31563
|
+
this.emitDEDataChange("update", nodeData._deData);
|
|
31408
31564
|
}
|
|
31409
31565
|
/**
|
|
31410
31566
|
* 删除每一项
|
|
@@ -31416,7 +31572,7 @@ var TreeController = class extends MDControlController {
|
|
|
31416
31572
|
let needRefresh = false;
|
|
31417
31573
|
const treeNode = this.getNodeModel(item._nodeId);
|
|
31418
31574
|
if (!treeNode) {
|
|
31419
|
-
throw new
|
|
31575
|
+
throw new RuntimeError61("\u672A\u627E\u5230\u6811\u8282\u70B9");
|
|
31420
31576
|
}
|
|
31421
31577
|
const nodeAppDataEntityId = treeNode.appDataEntityId;
|
|
31422
31578
|
if (nodeAppDataEntityId) {
|
|
@@ -31430,12 +31586,37 @@ var TreeController = class extends MDControlController {
|
|
|
31430
31586
|
}
|
|
31431
31587
|
return needRefresh;
|
|
31432
31588
|
}
|
|
31433
|
-
|
|
31589
|
+
/**
|
|
31590
|
+
* 检测实体数据变更
|
|
31591
|
+
*
|
|
31592
|
+
* @author tony001
|
|
31593
|
+
* @date 2024-03-28 18:03:09
|
|
31594
|
+
* @protected
|
|
31595
|
+
* @param {IPortalMessage} msg
|
|
31596
|
+
* @return {*} {void}
|
|
31597
|
+
*/
|
|
31598
|
+
onDEDataChange(msg) {
|
|
31599
|
+
if (!isNil31(msg.triggerKey) && msg.triggerKey === this.triggerKey) {
|
|
31600
|
+
return;
|
|
31601
|
+
}
|
|
31602
|
+
if (msg.subtype === "OBJECTCREATED") {
|
|
31603
|
+
return;
|
|
31604
|
+
}
|
|
31605
|
+
const data = msg.data;
|
|
31606
|
+
const findNode = this.state.items.find(
|
|
31607
|
+
(item) => item._nodeType === "DE" && item._deData && item._deData.srfdecodename === data.srfdecodename && item._deData.srfkey === data.srfkey
|
|
31608
|
+
);
|
|
31609
|
+
if (!findNode) {
|
|
31610
|
+
return;
|
|
31611
|
+
}
|
|
31612
|
+
this.doNextActive(() => this.refreshNodeChildren(findNode, true), {
|
|
31613
|
+
key: "refresh".concat(findNode._id)
|
|
31614
|
+
});
|
|
31434
31615
|
}
|
|
31435
31616
|
};
|
|
31436
31617
|
|
|
31437
31618
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
31438
|
-
import { RuntimeError as
|
|
31619
|
+
import { RuntimeError as RuntimeError62 } from "@ibiz-template/core";
|
|
31439
31620
|
|
|
31440
31621
|
// src/controller/control/wizard-panel/wizard-panel.service.ts
|
|
31441
31622
|
var WizardPanelService = class extends ControlService {
|
|
@@ -31601,7 +31782,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
31601
31782
|
const { activeFormTag } = this.state;
|
|
31602
31783
|
const controller = this.formControllers.get(activeFormTag);
|
|
31603
31784
|
if (!controller) {
|
|
31604
|
-
throw new
|
|
31785
|
+
throw new RuntimeError62("\u627E\u4E0D\u5230".concat(activeFormTag, "\u7684\u8868\u5355\u63A7\u5236\u5668"));
|
|
31605
31786
|
}
|
|
31606
31787
|
return controller;
|
|
31607
31788
|
}
|
|
@@ -31643,7 +31824,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
31643
31824
|
getWizardFormByTag(tag) {
|
|
31644
31825
|
var _a;
|
|
31645
31826
|
if (!((_a = this.model.dewizard) == null ? void 0 : _a.dewizardForms)) {
|
|
31646
|
-
throw new
|
|
31827
|
+
throw new RuntimeError62("\u6CA1\u6709\u914D\u7F6E\u5411\u5BFC\u8868\u5355\u96C6\u5408");
|
|
31647
31828
|
return;
|
|
31648
31829
|
}
|
|
31649
31830
|
const wizardForm = this.model.dewizard.dewizardForms.find(
|
|
@@ -31652,7 +31833,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
31652
31833
|
}
|
|
31653
31834
|
);
|
|
31654
31835
|
if (!wizardForm) {
|
|
31655
|
-
throw new
|
|
31836
|
+
throw new RuntimeError62("\u627E\u4E0D\u5230\u6807\u8BC6\u4E3A".concat(tag, "\u7684\u5411\u5BFC\u8868\u5355"));
|
|
31656
31837
|
}
|
|
31657
31838
|
return wizardForm;
|
|
31658
31839
|
}
|
|
@@ -31723,7 +31904,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
31723
31904
|
prevTag = this.tagHistory[this.tagHistory.length - 1];
|
|
31724
31905
|
}
|
|
31725
31906
|
if (!prevTag) {
|
|
31726
|
-
throw new
|
|
31907
|
+
throw new RuntimeError62("\u6CA1\u6709\u4E0A\u4E00\u4E2A\u8868\u5355");
|
|
31727
31908
|
}
|
|
31728
31909
|
this.state.activeFormTag = prevTag;
|
|
31729
31910
|
}
|
|
@@ -31759,7 +31940,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
31759
31940
|
});
|
|
31760
31941
|
const nextWizardStep = wizardSteps[index + 1];
|
|
31761
31942
|
if (!nextWizardStep) {
|
|
31762
|
-
throw new
|
|
31943
|
+
throw new RuntimeError62("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u6B65\u9AA4");
|
|
31763
31944
|
}
|
|
31764
31945
|
const nextWizardForm = this.getWizardFormByTag(nextWizardStep.stepTag);
|
|
31765
31946
|
if (nextWizardForm && nextWizardForm.formTag) {
|
|
@@ -31768,7 +31949,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
31768
31949
|
}
|
|
31769
31950
|
}
|
|
31770
31951
|
if (!nextTag) {
|
|
31771
|
-
throw new
|
|
31952
|
+
throw new RuntimeError62("\u627E\u4E0D\u5230\u4E0B\u4E00\u4E2A\u5411\u5BFC\u8868\u5355");
|
|
31772
31953
|
}
|
|
31773
31954
|
this.state.activeFormTag = nextTag;
|
|
31774
31955
|
this.tagHistory.push(nextTag);
|
|
@@ -31788,7 +31969,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
31788
31969
|
|
|
31789
31970
|
// src/controller/control/md-ctrl/md-ctrl.controller.ts
|
|
31790
31971
|
import { RuntimeModelError as RuntimeModelError66 } from "@ibiz-template/core";
|
|
31791
|
-
import { isNil as
|
|
31972
|
+
import { isNil as isNil32 } from "ramda";
|
|
31792
31973
|
|
|
31793
31974
|
// src/controller/control/md-ctrl/md-ctrl.service.ts
|
|
31794
31975
|
var MDCtrlService = class extends MDControlService {
|
|
@@ -31878,7 +32059,9 @@ var MDCtrlController = class extends MDControlController {
|
|
|
31878
32059
|
* @memberof MDCtrlController
|
|
31879
32060
|
*/
|
|
31880
32061
|
async refresh() {
|
|
31881
|
-
|
|
32062
|
+
this.doNextActive(() => this.load({ isInitialLoad: true }), {
|
|
32063
|
+
key: "refresh"
|
|
32064
|
+
});
|
|
31882
32065
|
}
|
|
31883
32066
|
async afterLoad(args, items) {
|
|
31884
32067
|
if (args.isInitialLoad) {
|
|
@@ -32015,7 +32198,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
32015
32198
|
const groupMap = /* @__PURE__ */ new Map();
|
|
32016
32199
|
items.forEach((item) => {
|
|
32017
32200
|
const groupVal = item[groupAppDEFieldId];
|
|
32018
|
-
if (
|
|
32201
|
+
if (isNil32(groupVal)) {
|
|
32019
32202
|
return;
|
|
32020
32203
|
}
|
|
32021
32204
|
if (!groupMap.has(groupVal)) {
|
|
@@ -32091,8 +32274,8 @@ var MDCtrlController = class extends MDControlController {
|
|
|
32091
32274
|
};
|
|
32092
32275
|
|
|
32093
32276
|
// src/controller/control/kanban/kanban.controller.ts
|
|
32094
|
-
import { RuntimeError as
|
|
32095
|
-
import { isNil as
|
|
32277
|
+
import { RuntimeError as RuntimeError63, RuntimeModelError as RuntimeModelError67 } from "@ibiz-template/core";
|
|
32278
|
+
import { isNil as isNil33 } from "ramda";
|
|
32096
32279
|
|
|
32097
32280
|
// src/controller/control/kanban/kanban.service.ts
|
|
32098
32281
|
var KanbanService = class extends DataViewControlService {
|
|
@@ -32178,12 +32361,12 @@ var KanbanController = class extends DataViewControlController {
|
|
|
32178
32361
|
const isAsc = minorSortDir === "ASC";
|
|
32179
32362
|
items.forEach((item) => {
|
|
32180
32363
|
const sortValue = item[sortField];
|
|
32181
|
-
if (
|
|
32364
|
+
if (isNil33(sortValue)) {
|
|
32182
32365
|
item[sortField] = 0;
|
|
32183
32366
|
} else {
|
|
32184
32367
|
const toNum = Number(sortValue);
|
|
32185
32368
|
if (Number.isNaN(toNum)) {
|
|
32186
|
-
throw new
|
|
32369
|
+
throw new RuntimeError63(
|
|
32187
32370
|
"".concat(item.srfmajortext, "\u7684\u6392\u5E8F\u5C5E\u6027\u65E0\u6CD5\u8F6C\u6362\u6210\u6570\u503C")
|
|
32188
32371
|
);
|
|
32189
32372
|
}
|
|
@@ -32305,7 +32488,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
32305
32488
|
}
|
|
32306
32489
|
handleDataGroup() {
|
|
32307
32490
|
if (!this.model.enableGroup || this.model.groupMode === "NONE") {
|
|
32308
|
-
throw new
|
|
32491
|
+
throw new RuntimeError63("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
|
|
32309
32492
|
}
|
|
32310
32493
|
return super.handleDataGroup();
|
|
32311
32494
|
}
|
|
@@ -32321,7 +32504,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
32321
32504
|
const groupMap = /* @__PURE__ */ new Map();
|
|
32322
32505
|
items.forEach((item) => {
|
|
32323
32506
|
const groupVal = item[groupAppDEFieldId];
|
|
32324
|
-
if (
|
|
32507
|
+
if (isNil33(groupVal)) {
|
|
32325
32508
|
return;
|
|
32326
32509
|
}
|
|
32327
32510
|
if (!groupMap.has(groupVal)) {
|
|
@@ -32648,12 +32831,12 @@ var KanbanController = class extends DataViewControlController {
|
|
|
32648
32831
|
|
|
32649
32832
|
// src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
|
|
32650
32833
|
import {
|
|
32651
|
-
RuntimeError as
|
|
32834
|
+
RuntimeError as RuntimeError64,
|
|
32652
32835
|
RuntimeModelError as RuntimeModelError68,
|
|
32653
32836
|
awaitTimeout as awaitTimeout3,
|
|
32654
32837
|
recursiveIterate as recursiveIterate12
|
|
32655
32838
|
} from "@ibiz-template/core";
|
|
32656
|
-
import { clone as
|
|
32839
|
+
import { clone as clone30 } from "ramda";
|
|
32657
32840
|
|
|
32658
32841
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
32659
32842
|
var TreeGridExService = class extends TreeService {
|
|
@@ -32908,11 +33091,11 @@ var TreeGridExController = class extends TreeController {
|
|
|
32908
33091
|
return;
|
|
32909
33092
|
}
|
|
32910
33093
|
if (nodeData._nodeType !== "DE") {
|
|
32911
|
-
throw new
|
|
33094
|
+
throw new RuntimeError64("\u975E\u5B9E\u4F53\u8282\u70B9\u6570\u636E\u4E0D\u80FD\u4FDD\u5B58");
|
|
32912
33095
|
}
|
|
32913
33096
|
const rowState = this.state.rows[nodeData._uuid];
|
|
32914
33097
|
if (!rowState) {
|
|
32915
|
-
throw new
|
|
33098
|
+
throw new RuntimeError64("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
32916
33099
|
}
|
|
32917
33100
|
if (!rowState.modified) {
|
|
32918
33101
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -32926,7 +33109,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
32926
33109
|
const { appDataEntityId, updateAppDEActionId } = nodeModel;
|
|
32927
33110
|
const isCreate = nodeData._deData.srfuf === 0 /* CREATE */;
|
|
32928
33111
|
if (isCreate) {
|
|
32929
|
-
throw new
|
|
33112
|
+
throw new RuntimeError64("\u6682\u4E0D\u652F\u6301\u65B0\u5EFA");
|
|
32930
33113
|
}
|
|
32931
33114
|
if (!updateAppDEActionId) {
|
|
32932
33115
|
throw new RuntimeModelError68(nodeModel, "\u6811\u8282\u70B9\u6CA1\u6709\u914D\u7F6E\u66F4\u65B0\u5B9E\u4F53\u884C\u4E3A");
|
|
@@ -33086,10 +33269,10 @@ var TreeGridExController = class extends TreeController {
|
|
|
33086
33269
|
(item) => item.showRowEdit
|
|
33087
33270
|
);
|
|
33088
33271
|
if (editingRow) {
|
|
33089
|
-
throw new
|
|
33272
|
+
throw new RuntimeError64("\u540C\u65F6\u53EA\u80FD\u6709\u4E00\u884C\u5F00\u542F\u884C\u7F16\u8F91");
|
|
33090
33273
|
}
|
|
33091
33274
|
if (row.data._deData.srfuf === 1 /* UPDATE */) {
|
|
33092
|
-
row.cacheData =
|
|
33275
|
+
row.cacheData = clone30(row.data);
|
|
33093
33276
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
33094
33277
|
Object.assign(row.data, defaultVal);
|
|
33095
33278
|
}
|
|
@@ -33199,10 +33382,10 @@ var TreeGridExColumnController = class {
|
|
|
33199
33382
|
// src/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.ts
|
|
33200
33383
|
import {
|
|
33201
33384
|
DataTypes as DataTypes5,
|
|
33202
|
-
RuntimeError as
|
|
33385
|
+
RuntimeError as RuntimeError65,
|
|
33203
33386
|
RuntimeModelError as RuntimeModelError69
|
|
33204
33387
|
} from "@ibiz-template/core";
|
|
33205
|
-
import { clone as
|
|
33388
|
+
import { clone as clone31 } from "ramda";
|
|
33206
33389
|
import dayjs7 from "dayjs";
|
|
33207
33390
|
var TreeGridExNodeColumnController = class {
|
|
33208
33391
|
/**
|
|
@@ -33400,7 +33583,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
33400
33583
|
const valueItem = this.nodeColumn.linkValueItem || "srfkey";
|
|
33401
33584
|
const value = row.data[valueItem];
|
|
33402
33585
|
if (value == null) {
|
|
33403
|
-
throw new
|
|
33586
|
+
throw new RuntimeError65("\u672A\u5728\u884C\u6570\u636E\u4E2D\u53D6\u5230 ".concat(valueItem, " \u7684\u503C"));
|
|
33404
33587
|
}
|
|
33405
33588
|
const { linkAppViewId } = this.nodeColumn;
|
|
33406
33589
|
if (!linkAppViewId) {
|
|
@@ -33411,7 +33594,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
33411
33594
|
srfkey: value,
|
|
33412
33595
|
...wfContext
|
|
33413
33596
|
});
|
|
33414
|
-
const tempParams =
|
|
33597
|
+
const tempParams = clone31(this.params);
|
|
33415
33598
|
const { userParam } = this.nodeColumn;
|
|
33416
33599
|
if (userParam) {
|
|
33417
33600
|
const { navigateContexts, navigateParams } = parseUserParams(userParam);
|
|
@@ -33813,7 +33996,7 @@ var TreeGridService = class extends GridService {
|
|
|
33813
33996
|
};
|
|
33814
33997
|
|
|
33815
33998
|
// src/controller/control/medit-view-panel/medit-view-panel.controller.ts
|
|
33816
|
-
import { RuntimeError as
|
|
33999
|
+
import { RuntimeError as RuntimeError66 } from "@ibiz-template/core";
|
|
33817
34000
|
import { createUUID as createUUID14 } from "qx-util";
|
|
33818
34001
|
|
|
33819
34002
|
// src/controller/control/medit-view-panel/medit-view-panel.service.ts
|
|
@@ -34029,7 +34212,7 @@ var MEditViewPanelController = class extends MDControlController {
|
|
|
34029
34212
|
(item) => item.id === id
|
|
34030
34213
|
);
|
|
34031
34214
|
if (panelUiItemIndex < 0) {
|
|
34032
|
-
throw new
|
|
34215
|
+
throw new RuntimeError66("\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728");
|
|
34033
34216
|
}
|
|
34034
34217
|
const tempUiItem = this.state.panelUiItems[panelUiItemIndex];
|
|
34035
34218
|
if (tempUiItem.id.startsWith("mockId:")) {
|
|
@@ -34530,14 +34713,16 @@ var ReportPanelController = class extends ControlController {
|
|
|
34530
34713
|
* @date 2023-05-23 03:42:41
|
|
34531
34714
|
*/
|
|
34532
34715
|
async refresh() {
|
|
34533
|
-
|
|
34716
|
+
this.doNextActive(() => this.load({ isInitialLoad: false }), {
|
|
34717
|
+
key: "refresh"
|
|
34718
|
+
});
|
|
34534
34719
|
}
|
|
34535
34720
|
};
|
|
34536
34721
|
|
|
34537
34722
|
// src/controller/control/gantt/gantt.controller.ts
|
|
34538
34723
|
import {
|
|
34539
34724
|
awaitTimeout as awaitTimeout4,
|
|
34540
|
-
RuntimeError as
|
|
34725
|
+
RuntimeError as RuntimeError67,
|
|
34541
34726
|
RuntimeModelError as RuntimeModelError71
|
|
34542
34727
|
} from "@ibiz-template/core";
|
|
34543
34728
|
|
|
@@ -34981,11 +35166,11 @@ var GanttController = class extends TreeGridExController {
|
|
|
34981
35166
|
*/
|
|
34982
35167
|
async modifyNodeTime(nodeData, { begin, end }) {
|
|
34983
35168
|
if (nodeData._nodeType !== "DE") {
|
|
34984
|
-
throw new
|
|
35169
|
+
throw new RuntimeError67("\u4E0D\u662F\u5B9E\u4F53\u7518\u7279\u8282\u70B9\u6570\u636E");
|
|
34985
35170
|
}
|
|
34986
35171
|
const rowState = this.getRowState(nodeData._id);
|
|
34987
35172
|
if (!rowState) {
|
|
34988
|
-
throw new
|
|
35173
|
+
throw new RuntimeError67("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
34989
35174
|
}
|
|
34990
35175
|
const { beginDataItemName, endDataItemName } = this.model;
|
|
34991
35176
|
this.setRowValue(rowState, beginDataItemName, begin);
|
|
@@ -35005,11 +35190,11 @@ var GanttController = class extends TreeGridExController {
|
|
|
35005
35190
|
return;
|
|
35006
35191
|
}
|
|
35007
35192
|
if (nodeData._nodeType !== "DE") {
|
|
35008
|
-
throw new
|
|
35193
|
+
throw new RuntimeError67("\u975E\u5B9E\u4F53\u8282\u70B9\u6570\u636E\u4E0D\u80FD\u4FDD\u5B58");
|
|
35009
35194
|
}
|
|
35010
35195
|
const rowState = this.state.rows[nodeData._uuid];
|
|
35011
35196
|
if (!rowState) {
|
|
35012
|
-
throw new
|
|
35197
|
+
throw new RuntimeError67("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
35013
35198
|
}
|
|
35014
35199
|
if (!rowState.modified) {
|
|
35015
35200
|
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
@@ -35057,7 +35242,7 @@ var GanttController = class extends TreeGridExController {
|
|
|
35057
35242
|
async remove(args) {
|
|
35058
35243
|
const { context, params, data } = this.handlerAbilityParams(args);
|
|
35059
35244
|
if (!(data == null ? void 0 : data.length)) {
|
|
35060
|
-
throw new
|
|
35245
|
+
throw new RuntimeError67("\u672A\u9009\u4E2D\u6570\u636E");
|
|
35061
35246
|
}
|
|
35062
35247
|
if ((args == null ? void 0 : args.silent) !== true) {
|
|
35063
35248
|
const del = await ibiz.confirm.error({
|
|
@@ -35166,7 +35351,7 @@ var GanttController = class extends TreeGridExController {
|
|
|
35166
35351
|
(item) => item.showRowEdit
|
|
35167
35352
|
);
|
|
35168
35353
|
if (editingRow) {
|
|
35169
|
-
throw new
|
|
35354
|
+
throw new RuntimeError67("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
|
|
35170
35355
|
}
|
|
35171
35356
|
}
|
|
35172
35357
|
let parentModel;
|
|
@@ -35260,8 +35445,8 @@ import { QXEvent as QXEvent9 } from "qx-util";
|
|
|
35260
35445
|
|
|
35261
35446
|
// src/controller/notification/async-action.controller.ts
|
|
35262
35447
|
import { QXEvent as QXEvent7 } from "qx-util";
|
|
35263
|
-
import { clone as
|
|
35264
|
-
import { isNil as
|
|
35448
|
+
import { clone as clone32 } from "ramda";
|
|
35449
|
+
import { isNil as isNil34, isNumber as isNumber2 } from "lodash-es";
|
|
35265
35450
|
import dayjs8 from "dayjs";
|
|
35266
35451
|
var AsyncActionController = class {
|
|
35267
35452
|
constructor() {
|
|
@@ -35336,14 +35521,14 @@ var AsyncActionController = class {
|
|
|
35336
35521
|
data[key] = dayjs8(data[key]).format("YYYY-MM-DD HH:mm:ss");
|
|
35337
35522
|
}
|
|
35338
35523
|
});
|
|
35339
|
-
if (!
|
|
35524
|
+
if (!isNil34(data.actionresult)) {
|
|
35340
35525
|
try {
|
|
35341
35526
|
const json = JSON.parse(data.actionresult);
|
|
35342
35527
|
data.actionresult = json;
|
|
35343
35528
|
} catch (error) {
|
|
35344
35529
|
}
|
|
35345
35530
|
}
|
|
35346
|
-
if (!
|
|
35531
|
+
if (!isNil34(data.completionrate)) {
|
|
35347
35532
|
const num = Number(data.completionrate);
|
|
35348
35533
|
if (Number.isNaN(num)) {
|
|
35349
35534
|
data.completionrate = void 0;
|
|
@@ -35368,7 +35553,7 @@ var AsyncActionController = class {
|
|
|
35368
35553
|
} else {
|
|
35369
35554
|
this.noticeResult(action);
|
|
35370
35555
|
}
|
|
35371
|
-
this.evt.emit("add",
|
|
35556
|
+
this.evt.emit("add", clone32(action));
|
|
35372
35557
|
this.evt.emit("dataChange");
|
|
35373
35558
|
}
|
|
35374
35559
|
/**
|
|
@@ -35390,7 +35575,7 @@ var AsyncActionController = class {
|
|
|
35390
35575
|
}
|
|
35391
35576
|
this.noticeResult(action);
|
|
35392
35577
|
}
|
|
35393
|
-
this.evt.emit("change",
|
|
35578
|
+
this.evt.emit("change", clone32(action));
|
|
35394
35579
|
this.evt.emit("dataChange");
|
|
35395
35580
|
}
|
|
35396
35581
|
noticeResult(action) {
|
|
@@ -35786,7 +35971,7 @@ var AppHub = class {
|
|
|
35786
35971
|
this.registerAppView(appView);
|
|
35787
35972
|
return appView;
|
|
35788
35973
|
}
|
|
35789
|
-
throw new
|
|
35974
|
+
throw new RuntimeError68("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
35790
35975
|
}
|
|
35791
35976
|
/**
|
|
35792
35977
|
* 根据视图模型路径,加参数重新计算视图模型
|
|
@@ -35807,7 +35992,7 @@ var AppHub = class {
|
|
|
35807
35992
|
);
|
|
35808
35993
|
return model;
|
|
35809
35994
|
}
|
|
35810
|
-
throw new
|
|
35995
|
+
throw new RuntimeError68("\u89C6\u56FE[".concat(modelPath, "]\u4E0D\u5B58\u5728"));
|
|
35811
35996
|
}
|
|
35812
35997
|
/**
|
|
35813
35998
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -35838,7 +36023,7 @@ var AppHub = class {
|
|
|
35838
36023
|
this.registerAppDataEntity(entity, appId2);
|
|
35839
36024
|
return entity;
|
|
35840
36025
|
}
|
|
35841
|
-
throw new
|
|
36026
|
+
throw new RuntimeError68("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
35842
36027
|
}
|
|
35843
36028
|
/**
|
|
35844
36029
|
* 新建 hub 应用
|
|
@@ -35853,7 +36038,7 @@ var AppHub = class {
|
|
|
35853
36038
|
return this.appMap.get(id);
|
|
35854
36039
|
}
|
|
35855
36040
|
if (!this.modelLoaderProvider) {
|
|
35856
|
-
throw new
|
|
36041
|
+
throw new RuntimeError68("\u8BF7\u5148\u6CE8\u518C\u6A21\u578B\u52A0\u8F7D\u9002\u914D\u5668");
|
|
35857
36042
|
}
|
|
35858
36043
|
const appModel = await this.modelLoaderProvider.getApp(id);
|
|
35859
36044
|
const app = new Application(appModel);
|
|
@@ -35984,7 +36169,7 @@ var EngineFactory = class {
|
|
|
35984
36169
|
};
|
|
35985
36170
|
|
|
35986
36171
|
// src/engine/view-base.engine.ts
|
|
35987
|
-
import { RuntimeError as
|
|
36172
|
+
import { RuntimeError as RuntimeError69, findRecursiveChild as findRecursiveChild3 } from "@ibiz-template/core";
|
|
35988
36173
|
var ViewEngineBase = class {
|
|
35989
36174
|
/**
|
|
35990
36175
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -36208,7 +36393,7 @@ var ViewEngineBase = class {
|
|
|
36208
36393
|
}
|
|
36209
36394
|
/**
|
|
36210
36395
|
* 是否存在模型 并且 布局中有占位
|
|
36211
|
-
*
|
|
36396
|
+
* - 工具栏模型还需判断是否有工具栏项
|
|
36212
36397
|
* @author zk
|
|
36213
36398
|
* @date 2024-01-30 11:01:33
|
|
36214
36399
|
* @param {string} name
|
|
@@ -36226,7 +36411,12 @@ var ViewEngineBase = class {
|
|
|
36226
36411
|
});
|
|
36227
36412
|
const { model } = this.view;
|
|
36228
36413
|
const has = getControl(model, name);
|
|
36229
|
-
|
|
36414
|
+
let visible = !!(ins && has);
|
|
36415
|
+
if ((has == null ? void 0 : has.controlType) === "TOOLBAR") {
|
|
36416
|
+
const items = has.detoolbarItems;
|
|
36417
|
+
visible = !!(visible && items && items.length > 0);
|
|
36418
|
+
}
|
|
36419
|
+
return visible;
|
|
36230
36420
|
}
|
|
36231
36421
|
/**
|
|
36232
36422
|
* 计算底部的显示与否
|
|
@@ -36252,7 +36442,7 @@ var ViewEngineBase = class {
|
|
|
36252
36442
|
const { appDataEntityId } = this.view.model;
|
|
36253
36443
|
const { evt, context, params } = this.view;
|
|
36254
36444
|
if (!appDataEntityId) {
|
|
36255
|
-
throw new
|
|
36445
|
+
throw new RuntimeError69("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
36256
36446
|
}
|
|
36257
36447
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
36258
36448
|
const res = await app.deService.exec(
|
|
@@ -36274,7 +36464,7 @@ var ViewEngineBase = class {
|
|
|
36274
36464
|
|
|
36275
36465
|
// src/engine/md-view.engine.ts
|
|
36276
36466
|
import { RuntimeModelError as RuntimeModelError72 } from "@ibiz-template/core";
|
|
36277
|
-
import { clone as
|
|
36467
|
+
import { clone as clone33 } from "ramda";
|
|
36278
36468
|
var MDViewEngine = class extends ViewEngineBase {
|
|
36279
36469
|
/**
|
|
36280
36470
|
* 多数据部件名称
|
|
@@ -36304,6 +36494,35 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
36304
36494
|
get searchBar() {
|
|
36305
36495
|
return this.view.getController("searchbar");
|
|
36306
36496
|
}
|
|
36497
|
+
/**
|
|
36498
|
+
* 获取分页搜索视图上移的工具栏控制器
|
|
36499
|
+
* @author lxm
|
|
36500
|
+
* @date 2023-05-22 03:47:43
|
|
36501
|
+
* @readonly
|
|
36502
|
+
* @protected
|
|
36503
|
+
* @type {(IToolbarController | undefined)}
|
|
36504
|
+
*/
|
|
36505
|
+
get tabToolbar() {
|
|
36506
|
+
return this.view.getController("tabtoolbar");
|
|
36507
|
+
}
|
|
36508
|
+
/**
|
|
36509
|
+
* 获取分页搜索视图上移的搜索表单控制器
|
|
36510
|
+
* @author lxm
|
|
36511
|
+
* @date 2023-05-22 01:56:25
|
|
36512
|
+
* @readonly
|
|
36513
|
+
*/
|
|
36514
|
+
get tabSearchForm() {
|
|
36515
|
+
return this.view.getController("tabsearchform");
|
|
36516
|
+
}
|
|
36517
|
+
/**
|
|
36518
|
+
* 获取分页搜索视图上移的搜索栏控制器
|
|
36519
|
+
* @author lxm
|
|
36520
|
+
* @date 2023-05-22 01:56:25
|
|
36521
|
+
* @readonly
|
|
36522
|
+
*/
|
|
36523
|
+
get tabSearchBar() {
|
|
36524
|
+
return this.view.getController("tabsearchbar");
|
|
36525
|
+
}
|
|
36307
36526
|
/**
|
|
36308
36527
|
* 数据部件控制器(多数据)
|
|
36309
36528
|
* @author lxm
|
|
@@ -36319,7 +36538,14 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
36319
36538
|
async onCreated() {
|
|
36320
36539
|
await super.onCreated();
|
|
36321
36540
|
const { childNames } = this.view;
|
|
36322
|
-
childNames.push(
|
|
36541
|
+
childNames.push(
|
|
36542
|
+
this.xdataControlName,
|
|
36543
|
+
"searchform",
|
|
36544
|
+
"searchbar",
|
|
36545
|
+
"tabtoolbar",
|
|
36546
|
+
"tabsearchform",
|
|
36547
|
+
"tabsearchbar"
|
|
36548
|
+
);
|
|
36323
36549
|
if (this.xdataControlName) {
|
|
36324
36550
|
if (!this.view.slotProps[this.xdataControlName]) {
|
|
36325
36551
|
this.view.slotProps[this.xdataControlName] = {};
|
|
@@ -36332,11 +36558,15 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
36332
36558
|
const { model } = this.view;
|
|
36333
36559
|
this.xdataControl.evt.on("onActive", this.onXDataActive.bind(this));
|
|
36334
36560
|
this.xdataControl.evt.on("onSelectionChange", async (event) => {
|
|
36335
|
-
var _a;
|
|
36561
|
+
var _a, _b;
|
|
36336
36562
|
(_a = this.toolbar) == null ? void 0 : _a.calcButtonState(
|
|
36337
36563
|
event.data[0],
|
|
36338
36564
|
this.xdataControl.model.appDataEntityId
|
|
36339
36565
|
);
|
|
36566
|
+
(_b = this.tabToolbar) == null ? void 0 : _b.calcButtonState(
|
|
36567
|
+
event.data[0],
|
|
36568
|
+
this.xdataControl.model.appDataEntityId
|
|
36569
|
+
);
|
|
36340
36570
|
});
|
|
36341
36571
|
this.xdataControl.evt.on("onBeforeLoad", () => {
|
|
36342
36572
|
this.xdataControl.state.searchParams = this.getSearchParams();
|
|
@@ -36366,9 +36596,20 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
36366
36596
|
this.reLoad();
|
|
36367
36597
|
});
|
|
36368
36598
|
}
|
|
36599
|
+
if (this.tabSearchForm) {
|
|
36600
|
+
this.tabSearchForm.evt.on("onSearch", () => {
|
|
36601
|
+
this.reLoad();
|
|
36602
|
+
});
|
|
36603
|
+
}
|
|
36604
|
+
if (this.tabSearchBar) {
|
|
36605
|
+
this.tabSearchBar.evt.on("onSearch", () => {
|
|
36606
|
+
this.reLoad();
|
|
36607
|
+
});
|
|
36608
|
+
}
|
|
36369
36609
|
if (!this.view.state.noLoadDefault && model.loadDefault) {
|
|
36370
|
-
|
|
36371
|
-
|
|
36610
|
+
const searchbar = this.searchBar || this.tabSearchBar;
|
|
36611
|
+
if (searchbar && searchbar.hasDefaultSelect && (this.xdataControlName === "grid" || this.xdataControlName === "treegrid")) {
|
|
36612
|
+
searchbar.setDefaultSelect();
|
|
36372
36613
|
} else {
|
|
36373
36614
|
this.load();
|
|
36374
36615
|
}
|
|
@@ -36429,11 +36670,13 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
36429
36670
|
return null;
|
|
36430
36671
|
}
|
|
36431
36672
|
if (key === "Search" /* SEARCH */) {
|
|
36432
|
-
|
|
36673
|
+
const searchForm = this.searchForm || this.tabSearchForm;
|
|
36674
|
+
await searchForm.search();
|
|
36433
36675
|
return null;
|
|
36434
36676
|
}
|
|
36435
36677
|
if (key === "Reset" /* RESET */) {
|
|
36436
|
-
|
|
36678
|
+
const searchForm = this.searchForm || this.tabSearchForm;
|
|
36679
|
+
await searchForm.reset();
|
|
36437
36680
|
return null;
|
|
36438
36681
|
}
|
|
36439
36682
|
if (key === "Copy" /* COPY */) {
|
|
@@ -36498,7 +36741,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
36498
36741
|
if (!openAppViewLogic) {
|
|
36499
36742
|
throw new RuntimeModelError72(this.view.model, "\u7F3A\u5C11newdata\u7684\u89C6\u56FE\u903B\u8F91");
|
|
36500
36743
|
}
|
|
36501
|
-
const params =
|
|
36744
|
+
const params = clone33(this.view.params);
|
|
36502
36745
|
if (copyMode) {
|
|
36503
36746
|
params.srfcopymode = copyMode;
|
|
36504
36747
|
}
|
|
@@ -36568,6 +36811,12 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
36568
36811
|
if (this.searchBar) {
|
|
36569
36812
|
Object.assign(params, this.searchBar.getFilterParams());
|
|
36570
36813
|
}
|
|
36814
|
+
if (this.tabSearchForm) {
|
|
36815
|
+
Object.assign(params, this.tabSearchForm.getFilterParams());
|
|
36816
|
+
}
|
|
36817
|
+
if (this.tabSearchBar) {
|
|
36818
|
+
Object.assign(params, this.tabSearchBar.getFilterParams());
|
|
36819
|
+
}
|
|
36571
36820
|
return params;
|
|
36572
36821
|
}
|
|
36573
36822
|
/**
|
|
@@ -36796,7 +37045,7 @@ var GlobalUtil = class {
|
|
|
36796
37045
|
};
|
|
36797
37046
|
|
|
36798
37047
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
36799
|
-
import { RuntimeError as
|
|
37048
|
+
import { RuntimeError as RuntimeError70 } from "@ibiz-template/core";
|
|
36800
37049
|
var LogicExecutor = class {
|
|
36801
37050
|
/**
|
|
36802
37051
|
* @author lxm
|
|
@@ -36817,7 +37066,7 @@ var LogicExecutor = class {
|
|
|
36817
37066
|
*/
|
|
36818
37067
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
36819
37068
|
execute(_executeParams) {
|
|
36820
|
-
throw new
|
|
37069
|
+
throw new RuntimeError70("Method not implemented.");
|
|
36821
37070
|
}
|
|
36822
37071
|
/**
|
|
36823
37072
|
* 销毁方法
|
|
@@ -37254,7 +37503,7 @@ var LogicSchedulerCenter = class {
|
|
|
37254
37503
|
};
|
|
37255
37504
|
|
|
37256
37505
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
37257
|
-
import { RuntimeError as
|
|
37506
|
+
import { RuntimeError as RuntimeError71 } from "@ibiz-template/core";
|
|
37258
37507
|
var LogicTrigger = class {
|
|
37259
37508
|
/**
|
|
37260
37509
|
* @author lxm
|
|
@@ -37314,7 +37563,7 @@ var LogicTrigger = class {
|
|
|
37314
37563
|
if (this.executor) {
|
|
37315
37564
|
return this.executor.execute(executeParams);
|
|
37316
37565
|
}
|
|
37317
|
-
throw new
|
|
37566
|
+
throw new RuntimeError71("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
37318
37567
|
}
|
|
37319
37568
|
/**
|
|
37320
37569
|
* 销毁方法
|
|
@@ -37331,12 +37580,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
37331
37580
|
};
|
|
37332
37581
|
|
|
37333
37582
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
37334
|
-
import { RuntimeError as
|
|
37583
|
+
import { RuntimeError as RuntimeError72 } from "@ibiz-template/core";
|
|
37335
37584
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
37336
37585
|
bindExecutor(executor) {
|
|
37337
37586
|
super.bindExecutor(executor);
|
|
37338
37587
|
if (this.executor.type !== "SCRIPT") {
|
|
37339
|
-
throw new
|
|
37588
|
+
throw new RuntimeError72(
|
|
37340
37589
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
37341
37590
|
);
|
|
37342
37591
|
}
|
|
@@ -37373,7 +37622,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
37373
37622
|
};
|
|
37374
37623
|
|
|
37375
37624
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
37376
|
-
import { RuntimeError as
|
|
37625
|
+
import { RuntimeError as RuntimeError73, RuntimeModelError as RuntimeModelError74 } from "@ibiz-template/core";
|
|
37377
37626
|
var TimerTrigger = class extends LogicTrigger {
|
|
37378
37627
|
constructor() {
|
|
37379
37628
|
super(...arguments);
|
|
@@ -37385,7 +37634,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
37385
37634
|
}
|
|
37386
37635
|
this.timer = setInterval(() => {
|
|
37387
37636
|
if (!this.scheduler.defaultParamsCb) {
|
|
37388
|
-
throw new
|
|
37637
|
+
throw new RuntimeError73("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
37389
37638
|
}
|
|
37390
37639
|
const params = this.scheduler.defaultParamsCb();
|
|
37391
37640
|
this.executor.execute(params);
|
|
@@ -37402,7 +37651,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
37402
37651
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
37403
37652
|
import {
|
|
37404
37653
|
ModelError as ModelError34,
|
|
37405
|
-
RuntimeError as
|
|
37654
|
+
RuntimeError as RuntimeError74,
|
|
37406
37655
|
RuntimeModelError as RuntimeModelError75
|
|
37407
37656
|
} from "@ibiz-template/core";
|
|
37408
37657
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
@@ -37440,7 +37689,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
37440
37689
|
const { context, params, ...rest } = parameters;
|
|
37441
37690
|
const { data } = parameters;
|
|
37442
37691
|
if (!(data == null ? void 0 : data[0])) {
|
|
37443
|
-
throw new
|
|
37692
|
+
throw new RuntimeError74("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
37444
37693
|
}
|
|
37445
37694
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
37446
37695
|
let openViewRef;
|
|
@@ -37500,7 +37749,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
37500
37749
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
37501
37750
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
37502
37751
|
if (!findView) {
|
|
37503
|
-
throw new
|
|
37752
|
+
throw new RuntimeError74(
|
|
37504
37753
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
37505
37754
|
);
|
|
37506
37755
|
}
|
|
@@ -37625,7 +37874,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
37625
37874
|
}
|
|
37626
37875
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
37627
37876
|
if (!selectData) {
|
|
37628
|
-
throw new
|
|
37877
|
+
throw new RuntimeError74("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
37629
37878
|
}
|
|
37630
37879
|
const indexType = selectData.srfkey;
|
|
37631
37880
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find(
|
|
@@ -37635,7 +37884,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
37635
37884
|
}
|
|
37636
37885
|
);
|
|
37637
37886
|
if (!findView) {
|
|
37638
|
-
throw new
|
|
37887
|
+
throw new RuntimeError74(
|
|
37639
37888
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
37640
37889
|
);
|
|
37641
37890
|
}
|
|
@@ -37672,7 +37921,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
37672
37921
|
}
|
|
37673
37922
|
});
|
|
37674
37923
|
if (pickParentFieldName === void 0) {
|
|
37675
|
-
throw new
|
|
37924
|
+
throw new RuntimeError74(
|
|
37676
37925
|
"\u6CA1\u6709\u627E\u5230".concat(pickParentDeName, "\u5728\u5F53\u524D\u5B9E\u4F53\u7684\u5916\u952E\u5C5E\u6027")
|
|
37677
37926
|
);
|
|
37678
37927
|
}
|
|
@@ -38223,6 +38472,7 @@ export {
|
|
|
38223
38472
|
getControlPanel,
|
|
38224
38473
|
getControlProvider,
|
|
38225
38474
|
getControlsByView,
|
|
38475
|
+
getCtrlTeleportTag,
|
|
38226
38476
|
getDEMethodProvider,
|
|
38227
38477
|
getDERedirectToView,
|
|
38228
38478
|
getDeACMode,
|