@ibiz-template/runtime 0.6.2 → 0.6.4
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 +183 -36
- package/dist/index.system.min.js +1 -1
- package/out/constant/view-mode.d.ts +4 -0
- package/out/constant/view-mode.d.ts.map +1 -1
- package/out/constant/view-mode.js +4 -0
- package/out/controller/control/caption-bar/caption-bar.controller.d.ts +7 -0
- package/out/controller/control/caption-bar/caption-bar.controller.d.ts.map +1 -1
- package/out/controller/control/caption-bar/caption-bar.controller.js +14 -3
- 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 +6 -3
- package/out/controller/control/form/form/form.controller.d.ts +19 -0
- package/out/controller/control/form/form/form.controller.d.ts.map +1 -1
- package/out/controller/control/form/form/form.controller.js +37 -1
- package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.controller.d.ts +8 -0
- package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-tab-panel/form-tab-panel.controller.js +13 -0
- package/out/controller/control/gantt/gantt.controller.d.ts.map +1 -1
- package/out/controller/control/gantt/gantt.controller.js +4 -4
- package/out/controller/control/toolbar/toolbar.controllerr.d.ts.map +1 -1
- package/out/controller/control/toolbar/toolbar.controllerr.js +12 -0
- package/out/controller/control/tree/tree.controller.d.ts +1 -0
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +3 -0
- package/out/controller/notification/internal-message.controller.d.ts +4 -2
- package/out/controller/notification/internal-message.controller.d.ts.map +1 -1
- package/out/controller/notification/internal-message.controller.js +6 -6
- package/out/de-logic/de-logic-param/de-logic-param.js +1 -1
- package/out/engine/md-view.engine.d.ts.map +1 -1
- package/out/engine/md-view.engine.js +4 -0
- package/out/engine/view-base.engine.d.ts.map +1 -1
- package/out/engine/view-base.engine.js +6 -1
- package/out/global/global-util/global-util.d.ts.map +1 -1
- package/out/global/global-util/global-util.js +12 -2
- package/out/interface/common/i-modal/i-modal.d.ts +1 -1
- package/out/interface/common/i-modal/i-modal.d.ts.map +1 -1
- package/out/interface/common/i-modal-options/i-modal-options.d.ts +8 -0
- package/out/interface/common/i-modal-options/i-modal-options.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-caption-bar.controller.d.ts +7 -0
- package/out/interface/controller/controller/control/i-caption-bar.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/notice/i-internal-message.controller.d.ts +16 -1
- package/out/interface/controller/controller/notice/i-internal-message.controller.d.ts.map +1 -1
- package/out/interface/provider/i-internal-message.provider.d.ts +8 -0
- package/out/interface/provider/i-internal-message.provider.d.ts.map +1 -1
- package/out/interface/util/i-notification-util/i-notification-util.d.ts +7 -0
- package/out/interface/util/i-notification-util/i-notification-util.d.ts.map +1 -1
- package/out/logic-scheduler/trigger/item-dyna-logic-trigger.d.ts.map +1 -1
- package/out/logic-scheduler/trigger/item-dyna-logic-trigger.js +3 -2
- package/out/model/panel/panel-field.js +1 -1
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +13 -0
- package/out/service/service/entity/method/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +15 -0
- package/out/service/service/entity/method/method-renturn.d.ts.map +1 -1
- package/out/service/service/entity/method/method-renturn.js +1 -0
- package/out/ui-logic/ui-logic-node/append-param-node/append-param-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/append-param-node/append-param-node.js +1 -0
- package/out/ui-logic/ui-logic-node/bind-param-node/bind-param-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/bind-param-node/bind-param-node.js +1 -0
- package/out/ui-logic/ui-logic-node/copy-param-node/copy-param-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/copy-param-node/copy-param-node.js +1 -0
- package/out/ui-logic/ui-logic-node/data-set-node/data-set-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/data-set-node/data-set-node.js +1 -0
- package/out/ui-logic/ui-logic-node/de-action-node/de-action-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/de-action-node/de-action-node.js +1 -0
- package/out/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/execute-de-logic-node/execute-de-logic-node.js +1 -0
- package/out/ui-logic/ui-logic-node/msg-box-node/msg-box-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/msg-box-node/msg-box-node.js +1 -2
- package/out/ui-logic/ui-logic-node/renew-param-node/renew-param-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/renew-param-node/renew-param-node.js +1 -0
- package/out/ui-logic/ui-logic-node/reset-param-node/reset-param-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/reset-param-node/reset-param-node.js +1 -0
- package/out/ui-logic/ui-logic-node/sort-param-node/sort-param-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/sort-param-node/sort-param-node.js +1 -0
- package/out/ui-logic/ui-logic-param/ui-logic-param.js +1 -1
- package/out/utils/modal/modal.d.ts +1 -1
- package/out/utils/modal/modal.d.ts.map +1 -1
- package/out/utils/modal/modal.js +2 -2
- package/out/utils/ui-domain/ui-domain.d.ts +22 -2
- package/out/utils/ui-domain/ui-domain.d.ts.map +1 -1
- package/out/utils/ui-domain/ui-domain.js +26 -2
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -1097,7 +1097,7 @@ var ChildKeys = ["panelItems", "panelTabPages", "rootPanelItems"];
|
|
|
1097
1097
|
function _getAllPanelField(model) {
|
|
1098
1098
|
let childItems = [];
|
|
1099
1099
|
for (const key of ChildKeys) {
|
|
1100
|
-
if (model[key]) {
|
|
1100
|
+
if (model[key] && model[key].length && model[key].length > 0) {
|
|
1101
1101
|
childItems = model[key];
|
|
1102
1102
|
break;
|
|
1103
1103
|
}
|
|
@@ -2495,6 +2495,7 @@ var ViewCallTag = /* @__PURE__ */ ((ViewCallTag2) => {
|
|
|
2495
2495
|
// src/constant/view-mode.ts
|
|
2496
2496
|
var ViewMode = /* @__PURE__ */ ((ViewMode2) => {
|
|
2497
2497
|
ViewMode2["ROUTE"] = "ROUTE";
|
|
2498
|
+
ViewMode2["ROUTE_MODAL"] = "ROUTE_MODAL";
|
|
2498
2499
|
ViewMode2["MODAL"] = "MODAL";
|
|
2499
2500
|
ViewMode2["DRAWER"] = "DRAWER";
|
|
2500
2501
|
ViewMode2["EMBED"] = "EMBED";
|
|
@@ -2719,11 +2720,11 @@ var Modal = class {
|
|
|
2719
2720
|
this._dismiss = dismiss;
|
|
2720
2721
|
}
|
|
2721
2722
|
async dismiss(data = { ok: false, data: [] }) {
|
|
2722
|
-
const context = {
|
|
2723
|
+
const context = {};
|
|
2723
2724
|
if (this.ignoreDismissCheck !== true) {
|
|
2724
2725
|
await this.hooks.shouldDismiss.call(context);
|
|
2725
2726
|
}
|
|
2726
|
-
if (
|
|
2727
|
+
if (context.allowClose === false) {
|
|
2727
2728
|
ibiz.log.debug("shouldDismiss\u7ED3\u679C\u4E3Afalse,\u5173\u95ED\u4E2D\u65AD\u3002");
|
|
2728
2729
|
return false;
|
|
2729
2730
|
}
|
|
@@ -2984,8 +2985,7 @@ var UIDomain = class {
|
|
|
2984
2985
|
* Creates an instance of UIDomain.
|
|
2985
2986
|
*
|
|
2986
2987
|
* @author chitanda
|
|
2987
|
-
* @date
|
|
2988
|
-
* @param {string} appId
|
|
2988
|
+
* @date 2024-03-04 13:03:29
|
|
2989
2989
|
* @param {string} [id]
|
|
2990
2990
|
*/
|
|
2991
2991
|
constructor(id) {
|
|
@@ -3023,12 +3023,37 @@ var UIDomain = class {
|
|
|
3023
3023
|
* @type {Transaction}
|
|
3024
3024
|
*/
|
|
3025
3025
|
this.transaction = new Transaction();
|
|
3026
|
+
/**
|
|
3027
|
+
* 界面域是否发生数据变更,在域下数据修改后改为 true ,在数据提交后改为 false
|
|
3028
|
+
*
|
|
3029
|
+
* @author chitanda
|
|
3030
|
+
* @date 2024-03-04 13:03:08
|
|
3031
|
+
*/
|
|
3032
|
+
this.dataModification = false;
|
|
3026
3033
|
if (id) {
|
|
3027
3034
|
this.id = id;
|
|
3028
3035
|
} else {
|
|
3029
3036
|
this.id = createUUID();
|
|
3030
3037
|
}
|
|
3031
3038
|
}
|
|
3039
|
+
/**
|
|
3040
|
+
* 界面域数据发生变更
|
|
3041
|
+
*
|
|
3042
|
+
* @author chitanda
|
|
3043
|
+
* @date 2024-03-04 14:03:06
|
|
3044
|
+
*/
|
|
3045
|
+
dataChange() {
|
|
3046
|
+
this.dataModification = true;
|
|
3047
|
+
}
|
|
3048
|
+
/**
|
|
3049
|
+
* 界面域数据变更已提交
|
|
3050
|
+
*
|
|
3051
|
+
* @author chitanda
|
|
3052
|
+
* @date 2024-03-04 14:03:15
|
|
3053
|
+
*/
|
|
3054
|
+
dataChangeCompleted() {
|
|
3055
|
+
this.dataModification = false;
|
|
3056
|
+
}
|
|
3032
3057
|
/**
|
|
3033
3058
|
* 设置当前界面域下,指定实体的相关父关系以及属性。在 DTO 包解析时设置此参数,销毁时清空
|
|
3034
3059
|
*
|
|
@@ -8176,6 +8201,9 @@ var MethodDto = class {
|
|
|
8176
8201
|
* @return {*} {Promise<IData>}
|
|
8177
8202
|
*/
|
|
8178
8203
|
async get(context, data, ignore = false) {
|
|
8204
|
+
if (context.srfsimple === true && this.isLocalMode === false) {
|
|
8205
|
+
return data;
|
|
8206
|
+
}
|
|
8179
8207
|
const params = {};
|
|
8180
8208
|
const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
|
|
8181
8209
|
for (let i = 0; i < this.fields.length; i++) {
|
|
@@ -8260,6 +8288,14 @@ var MethodDto = class {
|
|
|
8260
8288
|
* @return {*} {Promise<IDataEntity[]>}
|
|
8261
8289
|
*/
|
|
8262
8290
|
async sets(context, data) {
|
|
8291
|
+
if (context.srfsimple === true && this.isLocalMode === false) {
|
|
8292
|
+
if (data && data.length > 0) {
|
|
8293
|
+
return data.map((item) => {
|
|
8294
|
+
return this.service.createEntity(item);
|
|
8295
|
+
});
|
|
8296
|
+
}
|
|
8297
|
+
return [];
|
|
8298
|
+
}
|
|
8263
8299
|
const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
|
|
8264
8300
|
return Promise.all(
|
|
8265
8301
|
data.map(async (datum) => {
|
|
@@ -9573,6 +9609,7 @@ var MethodReturn = class {
|
|
|
9573
9609
|
uiDomain.calcParentRs();
|
|
9574
9610
|
uiDomain.state.rsInit = true;
|
|
9575
9611
|
}
|
|
9612
|
+
uiDomain.dataChangeCompleted();
|
|
9576
9613
|
app.deService.clearTempCacheByRs(
|
|
9577
9614
|
{
|
|
9578
9615
|
srfappid: app.appId,
|
|
@@ -10602,7 +10639,7 @@ var DELogicParam = class {
|
|
|
10602
10639
|
} else if (m.entityListParam) {
|
|
10603
10640
|
ctx.params[tag] = [];
|
|
10604
10641
|
} else if (m.entityPageParam) {
|
|
10605
|
-
|
|
10642
|
+
ctx.params[tag] = {};
|
|
10606
10643
|
} else if (m.entityParam) {
|
|
10607
10644
|
ctx.params[tag] = {};
|
|
10608
10645
|
} else if (m.lastReturnParam) {
|
|
@@ -11125,6 +11162,10 @@ var DEActionMethod = class extends Method {
|
|
|
11125
11162
|
this.attach(context, addData)
|
|
11126
11163
|
);
|
|
11127
11164
|
}
|
|
11165
|
+
const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
|
|
11166
|
+
if (uiDomain) {
|
|
11167
|
+
uiDomain.dataChange();
|
|
11168
|
+
}
|
|
11128
11169
|
return new HttpResponse3(resultData);
|
|
11129
11170
|
} catch (err) {
|
|
11130
11171
|
throw new HttpError5(err);
|
|
@@ -11177,6 +11218,10 @@ var DEActionMethod = class extends Method {
|
|
|
11177
11218
|
}
|
|
11178
11219
|
const data = this.service.local.delete(context, key);
|
|
11179
11220
|
if (data) {
|
|
11221
|
+
const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
|
|
11222
|
+
if (uiDomain) {
|
|
11223
|
+
uiDomain.dataChange();
|
|
11224
|
+
}
|
|
11180
11225
|
return new HttpResponse3(data);
|
|
11181
11226
|
}
|
|
11182
11227
|
return new HttpResponse3(data, 500);
|
|
@@ -11304,6 +11349,10 @@ var DEActionMethod = class extends Method {
|
|
|
11304
11349
|
);
|
|
11305
11350
|
}
|
|
11306
11351
|
if (resultData) {
|
|
11352
|
+
const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
|
|
11353
|
+
if (uiDomain) {
|
|
11354
|
+
uiDomain.dataChange();
|
|
11355
|
+
}
|
|
11307
11356
|
return new HttpResponse3(resultData);
|
|
11308
11357
|
}
|
|
11309
11358
|
return new HttpResponse3(resultData, 500);
|
|
@@ -17989,11 +18038,20 @@ var CaptionBarController = class extends ControlController {
|
|
|
17989
18038
|
await super.onCreated();
|
|
17990
18039
|
this.view.evt.on("onViewInfoChange", ({ caption: _caption, dataInfo }) => {
|
|
17991
18040
|
this.state.caption = "".concat(this.view.model.caption).concat(dataInfo ? "-".concat(dataInfo) : "");
|
|
17992
|
-
|
|
17993
|
-
ibiz.util.setBrowserTitle(this.state.caption);
|
|
17994
|
-
}
|
|
18041
|
+
this.setBrowserTabTitle();
|
|
17995
18042
|
});
|
|
17996
18043
|
}
|
|
18044
|
+
/**
|
|
18045
|
+
* 设置浏览器标签页标题
|
|
18046
|
+
*
|
|
18047
|
+
* @author chitanda
|
|
18048
|
+
* @date 2024-02-29 10:02:02
|
|
18049
|
+
*/
|
|
18050
|
+
setBrowserTabTitle() {
|
|
18051
|
+
if (this.view.modal.mode === "ROUTE" /* ROUTE */ || this.view.modal.mode === "ROUTE_MODAL" /* ROUTE_MODAL */) {
|
|
18052
|
+
ibiz.util.setBrowserTitle(this.state.caption);
|
|
18053
|
+
}
|
|
18054
|
+
}
|
|
17997
18055
|
};
|
|
17998
18056
|
|
|
17999
18057
|
// src/controller/control/toolbar/toolbar.controllerr.ts
|
|
@@ -18505,6 +18563,7 @@ var DEActionNode2 = class extends UILogicNode {
|
|
|
18505
18563
|
);
|
|
18506
18564
|
if (res.ok) {
|
|
18507
18565
|
ctx.params[retDEUILogicParamId] = res.data;
|
|
18566
|
+
ctx.setLastReturn(ctx.params[retDEUILogicParamId]);
|
|
18508
18567
|
}
|
|
18509
18568
|
ibiz.log.debug(
|
|
18510
18569
|
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u5B9E\u4F53\u884C\u4E3A\uFF09\uFF1A".concat(this.model.id, "-\u754C\u9762\u884C\u4E3A\u6240\u5C5E\u5B9E\u4F53\uFF1A").concat(dstAppDataEntityId, "-\u5B9E\u4F53\u884C\u4E3A\u6807\u8BC6\uFF1A").concat(dstAppDEActionId, "-\u53C2\u6570\u540D\u79F0\uFF1A").concat(retDEUILogicParamId, "-\u503C\uFF1A"),
|
|
@@ -18816,6 +18875,7 @@ var BindParamNode2 = class extends UILogicNode {
|
|
|
18816
18875
|
}
|
|
18817
18876
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
18818
18877
|
ctx.params[dstDEUILogicParamId] = srcVal;
|
|
18878
|
+
ctx.setLastReturn(ctx.params[dstDEUILogicParamId]);
|
|
18819
18879
|
ibiz.log.debug(
|
|
18820
18880
|
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u7ED1\u5B9A\u53C2\u6570\uFF09\uFF1A".concat(this.model.id, "-\u53C2\u6570\u540D\u79F0\uFF1A").concat(dstDEUILogicParamId, "-\u503C\uFF1A"),
|
|
18821
18881
|
srcVal
|
|
@@ -18843,8 +18903,7 @@ var MsgBoxNode = class extends UILogicNode {
|
|
|
18843
18903
|
if (!buttonsType) {
|
|
18844
18904
|
throw new RuntimeModelError39(this.model, "\u7F3A\u5C11\u6309\u94AE\u7C7B\u578B\u7684\u914D\u7F6E");
|
|
18845
18905
|
}
|
|
18846
|
-
let { title } = this.model;
|
|
18847
|
-
let { message } = this.model;
|
|
18906
|
+
let { title, message } = this.model;
|
|
18848
18907
|
if (msgBoxParamId) {
|
|
18849
18908
|
const param = ctx.params[msgBoxParamId];
|
|
18850
18909
|
if (param.title) {
|
|
@@ -18928,6 +18987,7 @@ var ResetParamNode2 = class extends UILogicNode {
|
|
|
18928
18987
|
throw new RuntimeModelError41(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
18929
18988
|
}
|
|
18930
18989
|
ctx.resetParam(dstDEUILogicParamId);
|
|
18990
|
+
ctx.setLastReturn(ctx.params[dstDEUILogicParamId]);
|
|
18931
18991
|
ibiz.log.debug(
|
|
18932
18992
|
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u91CD\u7F6E\u53C2\u6570\uFF09\uFF1A".concat(this.model.id, "-\u91CD\u7F6E\u53C2\u6570\uFF1A").concat(dstDEUILogicParamId)
|
|
18933
18993
|
);
|
|
@@ -18948,6 +19008,7 @@ var CopyParamNode2 = class extends UILogicNode {
|
|
|
18948
19008
|
}
|
|
18949
19009
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
18950
19010
|
ctx.params[dstDEUILogicParamId] = clone23(srcVal);
|
|
19011
|
+
ctx.setLastReturn(ctx.params[dstDEUILogicParamId]);
|
|
18951
19012
|
ibiz.log.debug(
|
|
18952
19013
|
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u62F7\u8D1D\u53C2\u6570\uFF09\uFF1A".concat(this.model.id, "-\u53C2\u6570\u540D\u79F0\uFF1A").concat(dstDEUILogicParamId, "-\u503C\uFF1A"),
|
|
18953
19014
|
srcVal
|
|
@@ -18981,6 +19042,7 @@ var AppendParamNode2 = class extends UILogicNode {
|
|
|
18981
19042
|
0,
|
|
18982
19043
|
...srcVal.slice(_srcIndex, _srcSize)
|
|
18983
19044
|
);
|
|
19045
|
+
ctx.setLastReturn(ctx.params[dstDEUILogicParamId]);
|
|
18984
19046
|
ibiz.log.debug(
|
|
18985
19047
|
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u9644\u52A0\u5230\u6570\u7EC4\uFF09\uFF1A".concat(this.model.id, "-\u9644\u52A0\u53C2\u6570\uFF1A"),
|
|
18986
19048
|
ctx.params,
|
|
@@ -19003,6 +19065,7 @@ var SortParamNode2 = class extends UILogicNode {
|
|
|
19003
19065
|
arr.sort((a, b) => {
|
|
19004
19066
|
return dstSortDir === "ASC" ? a[key] - b[key] : b[key] - a[key];
|
|
19005
19067
|
});
|
|
19068
|
+
ctx.setLastReturn(ctx.params[dstDEUILogicParamId]);
|
|
19006
19069
|
ibiz.log.debug(
|
|
19007
19070
|
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u6392\u5E8F\u6570\u7EC4\u53C2\u6570\uFF09\uFF1A".concat(this.model.id, "-\u6392\u5E8F\u5C5E\u6027\uFF1A").concat(dstFieldName, "-\u6392\u5E8F\u6A21\u5F0F\uFF1A").concat(dstSortDir, "-\u53C2\u6570\u540D\u79F0\uFF1A").concat(dstDEUILogicParamId, "-\u6392\u5E8F\u540E\u6570\u7EC4\uFF1A"),
|
|
19008
19071
|
arr
|
|
@@ -19019,6 +19082,7 @@ var RenewParamNode2 = class extends UILogicNode {
|
|
|
19019
19082
|
throw new RuntimeModelError45(this.model, "\u7F3A\u5C11\u76EE\u6807\u53C2\u6570\u5BF9\u8C61\u914D\u7F6E");
|
|
19020
19083
|
}
|
|
19021
19084
|
ctx.renewParam(dstDEUILogicParamId);
|
|
19085
|
+
ctx.setLastReturn(ctx.params[dstDEUILogicParamId]);
|
|
19022
19086
|
ibiz.log.debug(
|
|
19023
19087
|
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u91CD\u65B0\u5EFA\u7ACB\u53C2\u6570\uFF09\uFF1A".concat(this.model.id, "-\u91CD\u5EFA\u53C2\u6570\uFF1A").concat(dstDEUILogicParamId)
|
|
19024
19088
|
);
|
|
@@ -19048,6 +19112,7 @@ var DataSetNode2 = class extends UILogicNode {
|
|
|
19048
19112
|
);
|
|
19049
19113
|
if (res.ok) {
|
|
19050
19114
|
ctx.params[retDEUILogicParamId] = res.data;
|
|
19115
|
+
ctx.setLastReturn(ctx.params[dstDEUILogicParamId]);
|
|
19051
19116
|
}
|
|
19052
19117
|
ibiz.log.debug(
|
|
19053
19118
|
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u6570\u636E\u96C6\u5408\uFF09\uFF1A".concat(this.model.id, "-\u6570\u636E\u96C6\u5B9E\u4F53\u6807\u8BC6\uFF1A").concat(dstAppDataEntityId, "-\u6570\u636E\u96C6\u6807\u8BC6\uFF1A").concat(dstAppDEDataSetId, "-\u53C2\u6570\u540D\u79F0\uFF1A").concat(retDEUILogicParamId, "-\u503C\uFF1A"),
|
|
@@ -19131,6 +19196,7 @@ var ExecuteDELogicNode = class extends UILogicNode {
|
|
|
19131
19196
|
);
|
|
19132
19197
|
if (retDEUILogicParamId) {
|
|
19133
19198
|
ctx.params[retDEUILogicParamId] = result;
|
|
19199
|
+
ctx.setLastReturn(ctx.params[retDEUILogicParamId]);
|
|
19134
19200
|
}
|
|
19135
19201
|
ibiz.log.debug(
|
|
19136
19202
|
"\u754C\u9762\u903B\u8F91\u8282\u70B9\uFF08\u6267\u884C\u5B9E\u4F53\u903B\u8F91\uFF09\uFF1A".concat(this.model.id, "-\u5B9E\u4F53\u903B\u8F91\u6807\u8BC6\uFF1A").concat(dstAppDELogicId, "-\u5B9E\u4F53\u903B\u8F91\u6240\u5C5E\u5B9E\u4F53\uFF1A").concat(dstAppDataEntityId, "-\u53C2\u6570\u540D\u79F0\uFF1A").concat(retDEUILogicParamId, "-\u503C\uFF1A"),
|
|
@@ -19215,7 +19281,7 @@ var UILogicParam = class {
|
|
|
19215
19281
|
} else if (m.entityListParam) {
|
|
19216
19282
|
ctx.params[tag] = [];
|
|
19217
19283
|
} else if (m.entityPageParam) {
|
|
19218
|
-
|
|
19284
|
+
ctx.params[tag] = {};
|
|
19219
19285
|
} else if (m.entityParam) {
|
|
19220
19286
|
ctx.params[tag] = {};
|
|
19221
19287
|
} else if (m.lastReturnParam) {
|
|
@@ -20358,6 +20424,16 @@ var ToolbarController = class extends ControlController {
|
|
|
20358
20424
|
);
|
|
20359
20425
|
this.state.buttonsState.addState(uiItem.id, buttonState);
|
|
20360
20426
|
}
|
|
20427
|
+
if (item.controlLogics) {
|
|
20428
|
+
for (let i = 0; i < item.controlLogics.length; i++) {
|
|
20429
|
+
const controlLogic = item.controlLogics[i];
|
|
20430
|
+
const itemState = this.state.buttonsState[item.id];
|
|
20431
|
+
if (controlLogic.itemName === item.id && controlLogic.triggerType === "ITEMVISIBLE") {
|
|
20432
|
+
itemState.visible = false;
|
|
20433
|
+
break;
|
|
20434
|
+
}
|
|
20435
|
+
}
|
|
20436
|
+
}
|
|
20361
20437
|
},
|
|
20362
20438
|
{ childrenFields: ["detoolbarItems"] }
|
|
20363
20439
|
);
|
|
@@ -22177,6 +22253,13 @@ var FormController = class extends ControlController {
|
|
|
22177
22253
|
* @type {FormMDCtrlController[]}
|
|
22178
22254
|
*/
|
|
22179
22255
|
this.formMDCtrls = [];
|
|
22256
|
+
/**
|
|
22257
|
+
* 计数器对象
|
|
22258
|
+
* @author lxm
|
|
22259
|
+
* @date 2024-01-18 05:12:35
|
|
22260
|
+
* @type {AppCounter}
|
|
22261
|
+
*/
|
|
22262
|
+
this.counters = {};
|
|
22180
22263
|
}
|
|
22181
22264
|
get _evt() {
|
|
22182
22265
|
return this.evt;
|
|
@@ -22299,6 +22382,7 @@ var FormController = class extends ControlController {
|
|
|
22299
22382
|
async onCreated() {
|
|
22300
22383
|
await super.onCreated();
|
|
22301
22384
|
await this.initDetailControllers();
|
|
22385
|
+
await this.initCounter();
|
|
22302
22386
|
this.dataChangeNotify = debounceAndAsyncMerge(
|
|
22303
22387
|
this.dataChangeNotify.bind(this),
|
|
22304
22388
|
(arr1, arr2) => {
|
|
@@ -22436,6 +22520,36 @@ var FormController = class extends ControlController {
|
|
|
22436
22520
|
);
|
|
22437
22521
|
super.initControlScheduler(actualLogics);
|
|
22438
22522
|
}
|
|
22523
|
+
async onDestroyed() {
|
|
22524
|
+
await super.onDestroyed();
|
|
22525
|
+
Object.values(this.counters).forEach((counter) => counter.destroy());
|
|
22526
|
+
}
|
|
22527
|
+
/**
|
|
22528
|
+
* 初始化计数器
|
|
22529
|
+
* @author lxm
|
|
22530
|
+
* @date 2024-01-18 05:12:02
|
|
22531
|
+
* @protected
|
|
22532
|
+
* @return {*} {Promise<void>}
|
|
22533
|
+
*/
|
|
22534
|
+
async initCounter() {
|
|
22535
|
+
this.counters = {};
|
|
22536
|
+
const { appCounterRefs } = this.model;
|
|
22537
|
+
if (appCounterRefs && appCounterRefs.length > 0) {
|
|
22538
|
+
try {
|
|
22539
|
+
await Promise.all(
|
|
22540
|
+
appCounterRefs.map(async (counterRef) => {
|
|
22541
|
+
const counter = await CounterService.getCounterByRef(
|
|
22542
|
+
counterRef,
|
|
22543
|
+
this.context
|
|
22544
|
+
);
|
|
22545
|
+
this.counters[counterRef.id] = counter;
|
|
22546
|
+
})
|
|
22547
|
+
);
|
|
22548
|
+
} catch (error) {
|
|
22549
|
+
console.error(error);
|
|
22550
|
+
}
|
|
22551
|
+
}
|
|
22552
|
+
}
|
|
22439
22553
|
};
|
|
22440
22554
|
|
|
22441
22555
|
// src/controller/control/form/search-form/search-form.service.ts
|
|
@@ -24487,6 +24601,19 @@ var FormTabPanelController = class extends FormDetailController {
|
|
|
24487
24601
|
onTabChange(tabId) {
|
|
24488
24602
|
this.state.activeTab = tabId;
|
|
24489
24603
|
}
|
|
24604
|
+
/**
|
|
24605
|
+
* 根据id去表单控制器里取得计数器对象
|
|
24606
|
+
* @return {*}
|
|
24607
|
+
* @author: zhujiamin
|
|
24608
|
+
* @Date: 2023-07-10 15:14:21
|
|
24609
|
+
*/
|
|
24610
|
+
getCounter(id) {
|
|
24611
|
+
const { counters } = this.form;
|
|
24612
|
+
if (counters && counters[id]) {
|
|
24613
|
+
return counters[id];
|
|
24614
|
+
}
|
|
24615
|
+
return null;
|
|
24616
|
+
}
|
|
24490
24617
|
};
|
|
24491
24618
|
|
|
24492
24619
|
// src/controller/control/form/edit-form/edit-form.controller.ts
|
|
@@ -25203,10 +25330,13 @@ var EditFormController = class extends FormController {
|
|
|
25203
25330
|
if (!this.model.enableAutoSave) {
|
|
25204
25331
|
return;
|
|
25205
25332
|
}
|
|
25206
|
-
const {
|
|
25333
|
+
const { autoSaveMode } = this.model;
|
|
25207
25334
|
const saveParam = { silent: true, noFillBack: true };
|
|
25208
|
-
|
|
25209
|
-
|
|
25335
|
+
switch (autoSaveMode) {
|
|
25336
|
+
case 3:
|
|
25337
|
+
saveParam.data = this.getDiffData();
|
|
25338
|
+
break;
|
|
25339
|
+
default:
|
|
25210
25340
|
}
|
|
25211
25341
|
try {
|
|
25212
25342
|
await this.save(saveParam);
|
|
@@ -30574,6 +30704,8 @@ var TreeController = class extends MDControlController {
|
|
|
30574
30704
|
}
|
|
30575
30705
|
return needRefresh;
|
|
30576
30706
|
}
|
|
30707
|
+
onDataChange(_msg) {
|
|
30708
|
+
}
|
|
30577
30709
|
};
|
|
30578
30710
|
|
|
30579
30711
|
// src/controller/control/wizard-panel/wizard-panel.controller.ts
|
|
@@ -34023,13 +34155,13 @@ var GanttController = class extends TreeGridExController {
|
|
|
34023
34155
|
context,
|
|
34024
34156
|
params
|
|
34025
34157
|
}) {
|
|
34026
|
-
var _a;
|
|
34158
|
+
var _a, _b;
|
|
34027
34159
|
const nodeData = data[0];
|
|
34028
34160
|
const nodeModel = this.getNodeModel(nodeData._nodeId);
|
|
34029
34161
|
const { appDataEntityId } = nodeModel;
|
|
34030
34162
|
const deName = calcDeCodeNameById(appDataEntityId);
|
|
34031
|
-
context[deName.toLowerCase()] = nodeData.srfkey;
|
|
34032
|
-
const result = await ((
|
|
34163
|
+
context[deName.toLowerCase()] = (_a = nodeData._deData) == null ? void 0 : _a.srfkey;
|
|
34164
|
+
const result = await ((_b = this.viewScheduler) == null ? void 0 : _b.triggerCustom(
|
|
34033
34165
|
"".concat(nodeModel.id.toLowerCase(), "_opendata"),
|
|
34034
34166
|
{
|
|
34035
34167
|
context,
|
|
@@ -34041,7 +34173,10 @@ var GanttController = class extends TreeGridExController {
|
|
|
34041
34173
|
}
|
|
34042
34174
|
));
|
|
34043
34175
|
if (result === -1) {
|
|
34044
|
-
throw new RuntimeModelError71(
|
|
34176
|
+
throw new RuntimeModelError71(
|
|
34177
|
+
nodeModel,
|
|
34178
|
+
"\u7F3A\u5C11".concat(nodeModel.id.toLowerCase(), "_opendata\u7684\u89C6\u56FE\u903B\u8F91")
|
|
34179
|
+
);
|
|
34045
34180
|
} else {
|
|
34046
34181
|
return {
|
|
34047
34182
|
cancel: result ? result.ok : true
|
|
@@ -34502,9 +34637,6 @@ var AsyncActionController = class {
|
|
|
34502
34637
|
};
|
|
34503
34638
|
|
|
34504
34639
|
// src/controller/notification/internal-message.controller.ts
|
|
34505
|
-
import {
|
|
34506
|
-
IBizContext as IBizContext4
|
|
34507
|
-
} from "@ibiz-template/core";
|
|
34508
34640
|
import { QXEvent as QXEvent8 } from "qx-util";
|
|
34509
34641
|
function isHTML(str) {
|
|
34510
34642
|
if (str === "")
|
|
@@ -34528,6 +34660,8 @@ var InternalMessageController = class {
|
|
|
34528
34660
|
this.messages = [];
|
|
34529
34661
|
this.unreadOnly = false;
|
|
34530
34662
|
this.service = new InternalMessageService();
|
|
34663
|
+
this.ns = null;
|
|
34664
|
+
this.provider = null;
|
|
34531
34665
|
}
|
|
34532
34666
|
async init() {
|
|
34533
34667
|
this.listenMqtt();
|
|
@@ -34611,6 +34745,7 @@ var InternalMessageController = class {
|
|
|
34611
34745
|
*/
|
|
34612
34746
|
listenMqtt() {
|
|
34613
34747
|
ibiz.mc.command.internalMessage.on(async (msg) => {
|
|
34748
|
+
var _a;
|
|
34614
34749
|
ibiz.log.debug("mqtt internalMessage: ", msg);
|
|
34615
34750
|
if (msg.subtype !== "INTERNALMESSAGE") {
|
|
34616
34751
|
return;
|
|
@@ -34620,16 +34755,11 @@ var InternalMessageController = class {
|
|
|
34620
34755
|
isHtmlDesc: isHTML(msg.content),
|
|
34621
34756
|
desc: msg.content,
|
|
34622
34757
|
position: "bottom-right",
|
|
34758
|
+
class: (_a = this.ns) == null ? void 0 : _a.b("notice"),
|
|
34623
34759
|
onClick: () => {
|
|
34624
34760
|
const redirectUrl = ibiz.env.isMob ? msg.mobileurl : msg.url;
|
|
34625
|
-
if (
|
|
34626
|
-
|
|
34627
|
-
ibiz.commands.execute(
|
|
34628
|
-
OpenAppViewCommand.TAG,
|
|
34629
|
-
viewId,
|
|
34630
|
-
IBizContext4.create(context),
|
|
34631
|
-
params
|
|
34632
|
-
);
|
|
34761
|
+
if (this.provider) {
|
|
34762
|
+
this.provider.openViewByUrl(redirectUrl);
|
|
34633
34763
|
}
|
|
34634
34764
|
}
|
|
34635
34765
|
});
|
|
@@ -35170,7 +35300,12 @@ var ViewEngineBase = class {
|
|
|
35170
35300
|
init() {
|
|
35171
35301
|
}
|
|
35172
35302
|
async onCreated() {
|
|
35173
|
-
const { childNames } = this.view;
|
|
35303
|
+
const { childNames, modal } = this.view;
|
|
35304
|
+
modal.hooks.shouldDismiss.tapPromise(async (context) => {
|
|
35305
|
+
if (this.view.state.isLoading) {
|
|
35306
|
+
context.allowClose = false;
|
|
35307
|
+
}
|
|
35308
|
+
});
|
|
35174
35309
|
childNames.push("captionbar", "toolbar");
|
|
35175
35310
|
this.calcDynamicLayout();
|
|
35176
35311
|
}
|
|
@@ -35468,6 +35603,9 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
35468
35603
|
this.load();
|
|
35469
35604
|
}
|
|
35470
35605
|
}
|
|
35606
|
+
if (this.view.context.srfsimple == null) {
|
|
35607
|
+
this.view.context.srfsimple = true;
|
|
35608
|
+
}
|
|
35471
35609
|
}
|
|
35472
35610
|
/**
|
|
35473
35611
|
* 多数据部件激活事件处理
|
|
@@ -35862,10 +36000,18 @@ var GlobalUtil = class {
|
|
|
35862
36000
|
*/
|
|
35863
36001
|
setBrowserTitle(title) {
|
|
35864
36002
|
const app = ibiz.hub.getApp();
|
|
36003
|
+
let tabTitle = "";
|
|
36004
|
+
if (ibiz.env.AppTitle) {
|
|
36005
|
+
tabTitle = ibiz.env.AppTitle;
|
|
36006
|
+
} else if (app.model.title) {
|
|
36007
|
+
tabTitle = app.model.title;
|
|
36008
|
+
} else {
|
|
36009
|
+
tabTitle = sourceTitle;
|
|
36010
|
+
}
|
|
35865
36011
|
if (title) {
|
|
35866
|
-
document.title = "".concat(
|
|
36012
|
+
document.title = "".concat(tabTitle, " - ").concat(title);
|
|
35867
36013
|
} else {
|
|
35868
|
-
document.title =
|
|
36014
|
+
document.title = tabTitle;
|
|
35869
36015
|
}
|
|
35870
36016
|
}
|
|
35871
36017
|
};
|
|
@@ -36418,14 +36564,15 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
36418
36564
|
}
|
|
36419
36565
|
bindScriptExecutor(executor) {
|
|
36420
36566
|
executor.init(
|
|
36421
|
-
["context", "viewparams", "data", "env"],
|
|
36567
|
+
["context", "viewparams", "data", "env", "view"],
|
|
36422
36568
|
(executeParams) => {
|
|
36423
|
-
const { context, params, data } = executeParams;
|
|
36569
|
+
const { context, params, data, view } = executeParams;
|
|
36424
36570
|
return {
|
|
36425
36571
|
context,
|
|
36426
36572
|
params,
|
|
36427
36573
|
data: (data == null ? void 0 : data[0]) || {},
|
|
36428
|
-
env: ibiz.env
|
|
36574
|
+
env: ibiz.env,
|
|
36575
|
+
view
|
|
36429
36576
|
};
|
|
36430
36577
|
},
|
|
36431
36578
|
{
|