@ibiz-template/runtime 0.4.13 → 0.4.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 +453 -45
- package/dist/index.system.min.js +2 -2
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.d.ts +13 -0
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.js +24 -3
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-md.controller.d.ts +13 -0
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-md.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-md.controller.js +26 -2
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.d.ts +0 -8
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.js +0 -10
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.d.ts +8 -0
- 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 +10 -0
- package/out/controller/control/gantt/gantt.controller.d.ts +34 -1
- package/out/controller/control/gantt/gantt.controller.d.ts.map +1 -1
- package/out/controller/control/gantt/gantt.controller.js +74 -0
- package/out/controller/control/gantt/gantt.service.d.ts +13 -0
- package/out/controller/control/gantt/gantt.service.d.ts.map +1 -1
- package/out/controller/control/gantt/gantt.service.js +14 -0
- package/out/controller/control/kanban/kanban.controller.d.ts +104 -2
- package/out/controller/control/kanban/kanban.controller.d.ts.map +1 -1
- package/out/controller/control/kanban/kanban.controller.js +220 -0
- package/out/controller/control/tree/tree.controller.d.ts +15 -2
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +32 -2
- package/out/interface/controller/controller/control/i-kanban.controller.d.ts +27 -0
- package/out/interface/controller/controller/control/i-kanban.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-tree.controller.d.ts +1 -1
- package/out/interface/controller/controller/control/i-tree.controller.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-gantt.state.d.ts +23 -0
- package/out/interface/controller/state/control/i-gantt.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-kanban.state.d.ts +29 -0
- package/out/interface/controller/state/control/i-kanban.state.d.ts.map +1 -1
- package/out/interface/provider/i-grid-column.provider.d.ts +2 -3
- package/out/interface/provider/i-grid-column.provider.d.ts.map +1 -1
- package/out/model/index.d.ts +1 -0
- package/out/model/index.d.ts.map +1 -1
- package/out/model/index.js +1 -0
- package/out/model/toolbar/toolbar.d.ts +12 -0
- package/out/model/toolbar/toolbar.d.ts.map +1 -0
- package/out/model/toolbar/toolbar.js +22 -0
- package/out/service/dto/method.dto.js +1 -1
- package/package.json +4 -4
- package/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts +27 -3
- package/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-md.controller.ts +26 -2
- package/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts +0 -11
- package/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.ts +11 -0
- package/src/controller/control/gantt/gantt.controller.ts +91 -0
- package/src/controller/control/gantt/gantt.service.ts +26 -1
- package/src/controller/control/kanban/kanban.controller.ts +258 -1
- package/src/controller/control/tree/tree.controller.ts +46 -3
- package/src/interface/controller/controller/control/i-kanban.controller.ts +31 -1
- package/src/interface/controller/controller/control/i-tree.controller.ts +1 -1
- package/src/interface/controller/state/control/i-gantt.state.ts +26 -0
- package/src/interface/controller/state/control/i-kanban.state.ts +33 -0
- package/src/interface/provider/i-grid-column.provider.ts +7 -3
- package/src/model/index.ts +1 -0
- package/src/model/toolbar/toolbar.ts +35 -0
- package/src/service/dto/method.dto.ts +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1032,6 +1032,25 @@ function getAllPanelField(model) {
|
|
|
1032
1032
|
return _getAllPanelField(model);
|
|
1033
1033
|
}
|
|
1034
1034
|
|
|
1035
|
+
// src/model/toolbar/toolbar.ts
|
|
1036
|
+
import { recursiveIterate } from "@ibiz-template/core";
|
|
1037
|
+
function getUIActionItemsByActionLevel(toolbar, actionLevel) {
|
|
1038
|
+
const result = [];
|
|
1039
|
+
recursiveIterate(
|
|
1040
|
+
toolbar,
|
|
1041
|
+
(item) => {
|
|
1042
|
+
if (item.itemType === "DEUIACTION") {
|
|
1043
|
+
const uiItem = item;
|
|
1044
|
+
if (uiItem.actionLevel === actionLevel) {
|
|
1045
|
+
result.push(uiItem);
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
},
|
|
1049
|
+
{ childrenFields: ["detoolbarItems"] }
|
|
1050
|
+
);
|
|
1051
|
+
return result;
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1035
1054
|
// src/utils/open-redirect-view/open-redirect-view.ts
|
|
1036
1055
|
async function openRedirectView(appView, context, params = {}, opts = {}) {
|
|
1037
1056
|
return openDERedirectView(
|
|
@@ -6725,7 +6744,7 @@ var MethodDto = class _MethodDto {
|
|
|
6725
6744
|
field.refAppDataEntityId
|
|
6726
6745
|
);
|
|
6727
6746
|
const items = await service.selectLocal(context, {
|
|
6728
|
-
srfpkey: data[this.entity.keyAppDEFieldId]
|
|
6747
|
+
// srfpkey: data[this.entity.keyAppDEFieldId!],
|
|
6729
6748
|
});
|
|
6730
6749
|
if (items) {
|
|
6731
6750
|
const arr = [];
|
|
@@ -14313,7 +14332,7 @@ var CaptionBarController = class extends ControlController {
|
|
|
14313
14332
|
};
|
|
14314
14333
|
|
|
14315
14334
|
// src/controller/control/toolbar/toolbar.controllerr.ts
|
|
14316
|
-
import { recursiveIterate, RuntimeError as RuntimeError46 } from "@ibiz-template/core";
|
|
14335
|
+
import { recursiveIterate as recursiveIterate2, RuntimeError as RuntimeError46 } from "@ibiz-template/core";
|
|
14317
14336
|
|
|
14318
14337
|
// src/ui-action/provider/backend-ui-action-provider.ts
|
|
14319
14338
|
import { RuntimeModelError as RuntimeModelError47 } from "@ibiz-template/core";
|
|
@@ -16466,7 +16485,7 @@ var ToolbarController = class extends ControlController {
|
|
|
16466
16485
|
async onCreated() {
|
|
16467
16486
|
await super.onCreated();
|
|
16468
16487
|
this.state.viewMode = this.ctx.view.modal.mode;
|
|
16469
|
-
|
|
16488
|
+
recursiveIterate2(
|
|
16470
16489
|
this.model,
|
|
16471
16490
|
(item) => {
|
|
16472
16491
|
if (item.itemType === "DEUIACTION") {
|
|
@@ -16516,7 +16535,7 @@ var ToolbarController = class extends ControlController {
|
|
|
16516
16535
|
if (_data) {
|
|
16517
16536
|
logicParams.data = [_data];
|
|
16518
16537
|
}
|
|
16519
|
-
|
|
16538
|
+
recursiveIterate2(
|
|
16520
16539
|
this.model,
|
|
16521
16540
|
(item) => {
|
|
16522
16541
|
const itemState = this.state.buttonsState[item.id];
|
|
@@ -16561,7 +16580,7 @@ var ToolbarController = class extends ControlController {
|
|
|
16561
16580
|
}
|
|
16562
16581
|
initControlScheduler(logics = []) {
|
|
16563
16582
|
const actualLogics = [...logics];
|
|
16564
|
-
|
|
16583
|
+
recursiveIterate2(
|
|
16565
16584
|
this.model,
|
|
16566
16585
|
(item) => {
|
|
16567
16586
|
if (item.controlLogics) {
|
|
@@ -18243,7 +18262,7 @@ var ChartExpBarController = class extends ExpBarControlController {
|
|
|
18243
18262
|
import { RuntimeError as RuntimeError49 } from "@ibiz-template/core";
|
|
18244
18263
|
|
|
18245
18264
|
// src/controller/control/form/form/form.controller.ts
|
|
18246
|
-
import { debounceAndAsyncMerge, recursiveIterate as
|
|
18265
|
+
import { debounceAndAsyncMerge, recursiveIterate as recursiveIterate3 } from "@ibiz-template/core";
|
|
18247
18266
|
var FormController = class extends ControlController {
|
|
18248
18267
|
constructor() {
|
|
18249
18268
|
super(...arguments);
|
|
@@ -18455,7 +18474,7 @@ var FormController = class extends ControlController {
|
|
|
18455
18474
|
*/
|
|
18456
18475
|
initControlScheduler(logics = []) {
|
|
18457
18476
|
const actualLogics = [...logics];
|
|
18458
|
-
|
|
18477
|
+
recursiveIterate3(
|
|
18459
18478
|
this.model,
|
|
18460
18479
|
(item) => {
|
|
18461
18480
|
if (item.controlLogics) {
|
|
@@ -18471,10 +18490,10 @@ var FormController = class extends ControlController {
|
|
|
18471
18490
|
};
|
|
18472
18491
|
|
|
18473
18492
|
// src/controller/control/form/search-form/search-form.service.ts
|
|
18474
|
-
import { recursiveIterate as
|
|
18493
|
+
import { recursiveIterate as recursiveIterate5 } from "@ibiz-template/core";
|
|
18475
18494
|
|
|
18476
18495
|
// src/controller/control/form/form/form.service.ts
|
|
18477
|
-
import { recursiveIterate as
|
|
18496
|
+
import { recursiveIterate as recursiveIterate4 } from "@ibiz-template/core";
|
|
18478
18497
|
var FormService = class extends ControlService {
|
|
18479
18498
|
/**
|
|
18480
18499
|
* 设置表单项的默认值
|
|
@@ -18486,7 +18505,7 @@ var FormService = class extends ControlService {
|
|
|
18486
18505
|
* @param {('create' | 'update')} type 新建还是更新
|
|
18487
18506
|
*/
|
|
18488
18507
|
setDefault(data, context, params, type) {
|
|
18489
|
-
|
|
18508
|
+
recursiveIterate4(
|
|
18490
18509
|
this.model,
|
|
18491
18510
|
(item) => {
|
|
18492
18511
|
if (item.detailType === "FORMITEM") {
|
|
@@ -18542,7 +18561,7 @@ var SearchFormService = class extends FormService {
|
|
|
18542
18561
|
* @date 2022-08-31 18:08:37
|
|
18543
18562
|
*/
|
|
18544
18563
|
initUIDataMap() {
|
|
18545
|
-
|
|
18564
|
+
recursiveIterate5(
|
|
18546
18565
|
this.model,
|
|
18547
18566
|
(item) => {
|
|
18548
18567
|
if (item.detailType === "FORMITEM") {
|
|
@@ -19913,6 +19932,16 @@ var FormItemController = class extends FormDetailController {
|
|
|
19913
19932
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.ts
|
|
19914
19933
|
import { BitMask } from "@ibiz-template/core";
|
|
19915
19934
|
var FormMDCtrlController = class extends FormDetailController {
|
|
19935
|
+
/**
|
|
19936
|
+
* 名称
|
|
19937
|
+
* @author lxm
|
|
19938
|
+
* @date 2023-11-22 03:31:02
|
|
19939
|
+
* @readonly
|
|
19940
|
+
* @type {string}
|
|
19941
|
+
*/
|
|
19942
|
+
get name() {
|
|
19943
|
+
return this.model.id;
|
|
19944
|
+
}
|
|
19916
19945
|
/**
|
|
19917
19946
|
* 上下文
|
|
19918
19947
|
*
|
|
@@ -20001,6 +20030,15 @@ import {
|
|
|
20001
20030
|
RuntimeModelError as RuntimeModelError53
|
|
20002
20031
|
} from "@ibiz-template/core";
|
|
20003
20032
|
var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
20033
|
+
constructor() {
|
|
20034
|
+
super(...arguments);
|
|
20035
|
+
/**
|
|
20036
|
+
* 忽略下一次自身对应表单项数据变更
|
|
20037
|
+
* @author lxm
|
|
20038
|
+
* @date 2023-12-19 11:47:21
|
|
20039
|
+
*/
|
|
20040
|
+
this.ignoreNextSelfChange = false;
|
|
20041
|
+
}
|
|
20004
20042
|
/**
|
|
20005
20043
|
* 表单项名称
|
|
20006
20044
|
*
|
|
@@ -20037,10 +20075,10 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
20037
20075
|
setMDControl(controller) {
|
|
20038
20076
|
this.mdController = controller;
|
|
20039
20077
|
controller.evt.on("onSaveSuccess", () => {
|
|
20040
|
-
this.
|
|
20078
|
+
this.notifyFormDataChange();
|
|
20041
20079
|
});
|
|
20042
20080
|
controller.evt.on("onRemoveSuccess", () => {
|
|
20043
|
-
this.
|
|
20081
|
+
this.notifyFormDataChange();
|
|
20044
20082
|
});
|
|
20045
20083
|
}
|
|
20046
20084
|
updateFormItem() {
|
|
@@ -20089,11 +20127,26 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
20089
20127
|
this.refresh();
|
|
20090
20128
|
}
|
|
20091
20129
|
async dataChangeNotify(names) {
|
|
20130
|
+
if (names.includes(this.model.id) && this.ignoreNextSelfChange) {
|
|
20131
|
+
this.ignoreNextSelfChange = false;
|
|
20132
|
+
return;
|
|
20133
|
+
}
|
|
20092
20134
|
await super.dataChangeNotify(names);
|
|
20093
20135
|
if (names.includes(this.model.id)) {
|
|
20094
20136
|
this.refresh();
|
|
20095
20137
|
}
|
|
20096
20138
|
}
|
|
20139
|
+
/**
|
|
20140
|
+
* 通知表单多数据部件对应的表单项数据变更
|
|
20141
|
+
* @author lxm
|
|
20142
|
+
* @date 2023-12-19 11:46:13
|
|
20143
|
+
* @protected
|
|
20144
|
+
*/
|
|
20145
|
+
notifyFormDataChange() {
|
|
20146
|
+
this.updateFormItem();
|
|
20147
|
+
this.ignoreNextSelfChange = true;
|
|
20148
|
+
this.form.dataChangeNotify([this.name]);
|
|
20149
|
+
}
|
|
20097
20150
|
};
|
|
20098
20151
|
|
|
20099
20152
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
|
|
@@ -20108,6 +20161,12 @@ var FormMDCtrlFormState = class extends FormDetailState {
|
|
|
20108
20161
|
var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
20109
20162
|
constructor() {
|
|
20110
20163
|
super(...arguments);
|
|
20164
|
+
/**
|
|
20165
|
+
* 忽略下一次自身对应表单项数据变更
|
|
20166
|
+
* @author lxm
|
|
20167
|
+
* @date 2023-12-19 11:47:21
|
|
20168
|
+
*/
|
|
20169
|
+
this.ignoreNextSelfChange = false;
|
|
20111
20170
|
/**
|
|
20112
20171
|
* 表单控制器Map
|
|
20113
20172
|
* @author lxm
|
|
@@ -20173,7 +20232,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
20173
20232
|
*/
|
|
20174
20233
|
async formStateNotify(state) {
|
|
20175
20234
|
await super.formStateNotify(state);
|
|
20176
|
-
await this.
|
|
20235
|
+
await this.refresh();
|
|
20177
20236
|
}
|
|
20178
20237
|
/**
|
|
20179
20238
|
* 设置表单控制器
|
|
@@ -20192,10 +20251,10 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
20192
20251
|
item.context[this.deName] = formData.srfkey;
|
|
20193
20252
|
}
|
|
20194
20253
|
}
|
|
20195
|
-
this.
|
|
20254
|
+
this.notifyFormDataChange();
|
|
20196
20255
|
});
|
|
20197
20256
|
controller.evt.on("onRemoveSuccess", () => {
|
|
20198
|
-
this.
|
|
20257
|
+
this.notifyFormDataChange();
|
|
20199
20258
|
});
|
|
20200
20259
|
}
|
|
20201
20260
|
/**
|
|
@@ -20242,11 +20301,26 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
20242
20301
|
this.fetchData();
|
|
20243
20302
|
}
|
|
20244
20303
|
async dataChangeNotify(names) {
|
|
20304
|
+
if (names.includes(this.model.id) && this.ignoreNextSelfChange) {
|
|
20305
|
+
this.ignoreNextSelfChange = false;
|
|
20306
|
+
return;
|
|
20307
|
+
}
|
|
20245
20308
|
await super.dataChangeNotify(names);
|
|
20246
20309
|
if (names.includes(this.model.id)) {
|
|
20247
20310
|
this.refresh();
|
|
20248
20311
|
}
|
|
20249
20312
|
}
|
|
20313
|
+
/**
|
|
20314
|
+
* 通知表单多数据部件对应的表单项数据变更
|
|
20315
|
+
* @author lxm
|
|
20316
|
+
* @date 2023-12-19 11:46:13
|
|
20317
|
+
* @protected
|
|
20318
|
+
*/
|
|
20319
|
+
notifyFormDataChange() {
|
|
20320
|
+
this.updateFormItem();
|
|
20321
|
+
this.ignoreNextSelfChange = true;
|
|
20322
|
+
this.form.dataChangeNotify([this.name]);
|
|
20323
|
+
}
|
|
20250
20324
|
};
|
|
20251
20325
|
|
|
20252
20326
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
|
|
@@ -20270,16 +20344,6 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
20270
20344
|
*/
|
|
20271
20345
|
this.isSingleData = false;
|
|
20272
20346
|
}
|
|
20273
|
-
/**
|
|
20274
|
-
* 名称
|
|
20275
|
-
* @author lxm
|
|
20276
|
-
* @date 2023-11-22 03:31:02
|
|
20277
|
-
* @readonly
|
|
20278
|
-
* @type {string}
|
|
20279
|
-
*/
|
|
20280
|
-
get name() {
|
|
20281
|
-
return this.model.id;
|
|
20282
|
-
}
|
|
20283
20347
|
/**
|
|
20284
20348
|
* 多数据重复器对应的表单里的值
|
|
20285
20349
|
*
|
|
@@ -20479,7 +20543,7 @@ import { clone as clone21 } from "ramda";
|
|
|
20479
20543
|
|
|
20480
20544
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
20481
20545
|
import {
|
|
20482
|
-
recursiveIterate as
|
|
20546
|
+
recursiveIterate as recursiveIterate6,
|
|
20483
20547
|
RuntimeModelError as RuntimeModelError55
|
|
20484
20548
|
} from "@ibiz-template/core";
|
|
20485
20549
|
var EditFormService = class extends FormService {
|
|
@@ -20701,7 +20765,7 @@ var EditFormService = class extends FormService {
|
|
|
20701
20765
|
// 向导预置
|
|
20702
20766
|
"srfnextform"
|
|
20703
20767
|
];
|
|
20704
|
-
|
|
20768
|
+
recursiveIterate6(
|
|
20705
20769
|
this.model,
|
|
20706
20770
|
(item) => {
|
|
20707
20771
|
if (item.detailType === "FORMITEM" || item.detailType === "MDCTRL") {
|
|
@@ -21419,7 +21483,7 @@ import {
|
|
|
21419
21483
|
awaitTimeout as awaitTimeout2,
|
|
21420
21484
|
debounceAndAsyncMerge as debounceAndAsyncMerge2,
|
|
21421
21485
|
mergeDefaultInLeft,
|
|
21422
|
-
recursiveIterate as
|
|
21486
|
+
recursiveIterate as recursiveIterate7,
|
|
21423
21487
|
RuntimeError as RuntimeError52,
|
|
21424
21488
|
RuntimeModelError as RuntimeModelError57
|
|
21425
21489
|
} from "@ibiz-template/core";
|
|
@@ -21950,7 +22014,7 @@ var GridController = class extends MDControlController {
|
|
|
21950
22014
|
* @return {*} {Promise<void>}
|
|
21951
22015
|
*/
|
|
21952
22016
|
initColumnStates() {
|
|
21953
|
-
|
|
22017
|
+
recursiveIterate7(
|
|
21954
22018
|
this.model,
|
|
21955
22019
|
(column) => {
|
|
21956
22020
|
if (column.columnType !== "GROUPGRIDCOLUMN") {
|
|
@@ -23305,7 +23369,7 @@ var ListController = class extends MDControlController {
|
|
|
23305
23369
|
};
|
|
23306
23370
|
|
|
23307
23371
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
23308
|
-
import { recursiveIterate as
|
|
23372
|
+
import { recursiveIterate as recursiveIterate8, RuntimeError as RuntimeError54 } from "@ibiz-template/core";
|
|
23309
23373
|
var PanelController = class extends ControlController {
|
|
23310
23374
|
constructor(model, context, params, ctx, container) {
|
|
23311
23375
|
super(model, context, params, ctx);
|
|
@@ -23514,7 +23578,7 @@ var PanelController = class extends ControlController {
|
|
|
23514
23578
|
}
|
|
23515
23579
|
initControlScheduler(logics = []) {
|
|
23516
23580
|
const actualLogics = [...logics];
|
|
23517
|
-
|
|
23581
|
+
recursiveIterate8(
|
|
23518
23582
|
this.model,
|
|
23519
23583
|
(item) => {
|
|
23520
23584
|
if (item.controlLogics) {
|
|
@@ -24024,7 +24088,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
24024
24088
|
};
|
|
24025
24089
|
|
|
24026
24090
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
24027
|
-
import { recursiveIterate as
|
|
24091
|
+
import { recursiveIterate as recursiveIterate9 } from "@ibiz-template/core";
|
|
24028
24092
|
import { isNil as isNil23 } from "ramda";
|
|
24029
24093
|
|
|
24030
24094
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
@@ -24231,7 +24295,7 @@ var SearchBarController = class extends ControlController {
|
|
|
24231
24295
|
}
|
|
24232
24296
|
let hasFilter = false;
|
|
24233
24297
|
let hasError = false;
|
|
24234
|
-
|
|
24298
|
+
recursiveIterate9(this.state.filterNodes[0], (node) => {
|
|
24235
24299
|
if (node.leaf) {
|
|
24236
24300
|
if (node.field && node.valueOP && !isNil23(node.value)) {
|
|
24237
24301
|
hasFilter = true;
|
|
@@ -24510,7 +24574,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
24510
24574
|
import {
|
|
24511
24575
|
RuntimeError as RuntimeError55,
|
|
24512
24576
|
RuntimeModelError as RuntimeModelError60,
|
|
24513
|
-
recursiveIterate as
|
|
24577
|
+
recursiveIterate as recursiveIterate10
|
|
24514
24578
|
} from "@ibiz-template/core";
|
|
24515
24579
|
|
|
24516
24580
|
// src/controller/control/tree/tree.service.ts
|
|
@@ -24813,6 +24877,12 @@ var TreeController = class extends MDControlController {
|
|
|
24813
24877
|
* @date 2023-12-14 03:05:38
|
|
24814
24878
|
*/
|
|
24815
24879
|
this.dropNodeRss = /* @__PURE__ */ new Map();
|
|
24880
|
+
/**
|
|
24881
|
+
* 节点对应的上下文菜单里第一个行为级别为常用操作的项
|
|
24882
|
+
* @author lxm
|
|
24883
|
+
* @date 2023-12-19 03:14:03
|
|
24884
|
+
*/
|
|
24885
|
+
this.nodeClickTBUIActionItem = /* @__PURE__ */ new Map();
|
|
24816
24886
|
}
|
|
24817
24887
|
initState() {
|
|
24818
24888
|
super.initState();
|
|
@@ -24851,6 +24921,7 @@ var TreeController = class extends MDControlController {
|
|
|
24851
24921
|
}
|
|
24852
24922
|
}
|
|
24853
24923
|
this.initDropNodeRss();
|
|
24924
|
+
this.initNodeClickTBUIActionItem();
|
|
24854
24925
|
this.service = new TreeService(this.model);
|
|
24855
24926
|
await this.service.init(this.context);
|
|
24856
24927
|
this.model.detreeNodes.forEach((node) => {
|
|
@@ -24903,6 +24974,24 @@ var TreeController = class extends MDControlController {
|
|
|
24903
24974
|
}
|
|
24904
24975
|
});
|
|
24905
24976
|
}
|
|
24977
|
+
/**
|
|
24978
|
+
* 初始化节点点击后触发的第一个常用操作的上下文菜单项
|
|
24979
|
+
* @author lxm
|
|
24980
|
+
* @date 2023-12-19 03:18:43
|
|
24981
|
+
* @protected
|
|
24982
|
+
*/
|
|
24983
|
+
initNodeClickTBUIActionItem() {
|
|
24984
|
+
var _a;
|
|
24985
|
+
(_a = this.model.detreeNodes) == null ? void 0 : _a.forEach((node) => {
|
|
24986
|
+
var _a2, _b;
|
|
24987
|
+
if ((_b = (_a2 = node.decontextMenu) == null ? void 0 : _a2.detoolbarItems) == null ? void 0 : _b.length) {
|
|
24988
|
+
const items = getUIActionItemsByActionLevel(node.decontextMenu, 200);
|
|
24989
|
+
if (items.length > 0) {
|
|
24990
|
+
this.nodeClickTBUIActionItem.set(node.id, items[0]);
|
|
24991
|
+
}
|
|
24992
|
+
}
|
|
24993
|
+
});
|
|
24994
|
+
}
|
|
24906
24995
|
/**
|
|
24907
24996
|
* 树部件加载,从根节点开始重新加载
|
|
24908
24997
|
*
|
|
@@ -24964,7 +25053,7 @@ var TreeController = class extends MDControlController {
|
|
|
24964
25053
|
this.state.rootNodes = nodes;
|
|
24965
25054
|
}
|
|
24966
25055
|
this.state.items = [];
|
|
24967
|
-
|
|
25056
|
+
recursiveIterate10(
|
|
24968
25057
|
{ children: this.state.rootNodes },
|
|
24969
25058
|
(node) => {
|
|
24970
25059
|
this.state.items.push(node);
|
|
@@ -24980,7 +25069,11 @@ var TreeController = class extends MDControlController {
|
|
|
24980
25069
|
* @returns {*} {Promise<void>}
|
|
24981
25070
|
* @memberof TreeController
|
|
24982
25071
|
*/
|
|
24983
|
-
async onTreeNodeClick(nodeData) {
|
|
25072
|
+
async onTreeNodeClick(nodeData, event) {
|
|
25073
|
+
if (this.nodeClickTBUIActionItem.has(nodeData.nodeId)) {
|
|
25074
|
+
const item = this.nodeClickTBUIActionItem.get(nodeData.nodeId);
|
|
25075
|
+
return this.doUIAction(item.uiactionId, nodeData, event, item.appId);
|
|
25076
|
+
}
|
|
24984
25077
|
if (this.state.navigational) {
|
|
24985
25078
|
const nodeModel = this.getNodeModel(nodeData.nodeId);
|
|
24986
25079
|
if (!(nodeModel == null ? void 0 : nodeModel.navAppViewId)) {
|
|
@@ -25118,7 +25211,7 @@ var TreeController = class extends MDControlController {
|
|
|
25118
25211
|
*/
|
|
25119
25212
|
calcExpandedKeys(nodes) {
|
|
25120
25213
|
let expandedKeys = [...this.state.expandedKeys];
|
|
25121
|
-
|
|
25214
|
+
recursiveIterate10({ children: nodes }, (node) => {
|
|
25122
25215
|
var _a;
|
|
25123
25216
|
if ((_a = node.children) == null ? void 0 : _a.length) {
|
|
25124
25217
|
expandedKeys.push(node.id);
|
|
@@ -26106,6 +26199,8 @@ var KanbanController = class extends DataViewControlController {
|
|
|
26106
26199
|
super.initState();
|
|
26107
26200
|
this.state.size = this.model.pagingSize || 1e3;
|
|
26108
26201
|
this.state.updating = false;
|
|
26202
|
+
this.state.batching = false;
|
|
26203
|
+
this.state.selectGroupKey = "";
|
|
26109
26204
|
this.state.draggable = this.enableEditOrder || this.enableEditGroup;
|
|
26110
26205
|
}
|
|
26111
26206
|
/**
|
|
@@ -26117,6 +26212,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
26117
26212
|
*/
|
|
26118
26213
|
async onCreated() {
|
|
26119
26214
|
await super.onCreated();
|
|
26215
|
+
this.setToolbarHooks();
|
|
26120
26216
|
}
|
|
26121
26217
|
/**
|
|
26122
26218
|
* 本地排序items
|
|
@@ -26155,6 +26251,76 @@ var KanbanController = class extends DataViewControlController {
|
|
|
26155
26251
|
this.sortItems(this.state.items);
|
|
26156
26252
|
return super.afterLoad(args, items);
|
|
26157
26253
|
}
|
|
26254
|
+
/**
|
|
26255
|
+
* 当展开批操作工具栏时需进行行点击拦截
|
|
26256
|
+
*
|
|
26257
|
+
* @param {IData} data
|
|
26258
|
+
* @return {*} {Promise<void>}
|
|
26259
|
+
* @memberof KanbanController
|
|
26260
|
+
*/
|
|
26261
|
+
async onRowClick(data) {
|
|
26262
|
+
const { groupAppDEFieldId } = this.model;
|
|
26263
|
+
if (this.state.batching && groupAppDEFieldId) {
|
|
26264
|
+
const groupVal = data[groupAppDEFieldId];
|
|
26265
|
+
if (groupVal !== this.state.selectGroupKey) {
|
|
26266
|
+
if (this.state.mdctrlActiveMode === 1) {
|
|
26267
|
+
await this.setActive(data);
|
|
26268
|
+
}
|
|
26269
|
+
return;
|
|
26270
|
+
}
|
|
26271
|
+
}
|
|
26272
|
+
super.onRowClick(data);
|
|
26273
|
+
}
|
|
26274
|
+
/**
|
|
26275
|
+
* 点击新建时设置选中分组
|
|
26276
|
+
*
|
|
26277
|
+
* @param {MouseEvent} event
|
|
26278
|
+
* @param {(string | number)} group
|
|
26279
|
+
* @memberof KanbanController
|
|
26280
|
+
*/
|
|
26281
|
+
onClickNew(event, group) {
|
|
26282
|
+
this.setSelectGroup(group);
|
|
26283
|
+
super.onClickNew(event, group);
|
|
26284
|
+
}
|
|
26285
|
+
/**
|
|
26286
|
+
* 分组工具栏需设置选中分组
|
|
26287
|
+
*
|
|
26288
|
+
* @param {IUIActionGroupDetail} detail
|
|
26289
|
+
* @param {MouseEvent} event
|
|
26290
|
+
* @param {IKanbanGroupState} group
|
|
26291
|
+
* @return {*} {Promise<void>}
|
|
26292
|
+
* @memberof KanbanController
|
|
26293
|
+
*/
|
|
26294
|
+
async onGroupToolbarClick(detail, event, group) {
|
|
26295
|
+
this.setSelectGroup(group.key);
|
|
26296
|
+
super.onGroupToolbarClick(detail, event, group);
|
|
26297
|
+
}
|
|
26298
|
+
/**
|
|
26299
|
+
* 分组行为项点击,需携带分组标识
|
|
26300
|
+
*
|
|
26301
|
+
* @param {IUIActionGroupDetail} detail
|
|
26302
|
+
* @param {IData} item
|
|
26303
|
+
* @param {MouseEvent} event
|
|
26304
|
+
* @param {IKanbanGroupState} group
|
|
26305
|
+
* @return {*} {Promise<void>}
|
|
26306
|
+
* @memberof KanbanController
|
|
26307
|
+
*/
|
|
26308
|
+
async onGroupActionClick(detail, item, event, group) {
|
|
26309
|
+
this.setSelectGroup(group.key);
|
|
26310
|
+
const params = { ...this.params, srfgroup: group };
|
|
26311
|
+
const actionId = detail.uiactionId;
|
|
26312
|
+
await UIActionUtil.execAndResolved(
|
|
26313
|
+
actionId,
|
|
26314
|
+
{
|
|
26315
|
+
context: this.context,
|
|
26316
|
+
params,
|
|
26317
|
+
data: [item],
|
|
26318
|
+
view: this.view,
|
|
26319
|
+
event
|
|
26320
|
+
},
|
|
26321
|
+
detail.appId
|
|
26322
|
+
);
|
|
26323
|
+
}
|
|
26158
26324
|
handleDataGroup() {
|
|
26159
26325
|
if (!this.model.enableGroup || this.model.groupMode === "NONE") {
|
|
26160
26326
|
throw new RuntimeError57("\u770B\u677F\u90E8\u4EF6\u5FC5\u987B\u5F00\u542F\u5206\u7EC4");
|
|
@@ -26350,10 +26516,156 @@ var KanbanController = class extends DataViewControlController {
|
|
|
26350
26516
|
await this.afterLoad({}, this.state.items);
|
|
26351
26517
|
}
|
|
26352
26518
|
}
|
|
26519
|
+
/**
|
|
26520
|
+
* 获取是否全屏
|
|
26521
|
+
*
|
|
26522
|
+
* @return {*} {boolean}
|
|
26523
|
+
* @memberof KanbanController
|
|
26524
|
+
*/
|
|
26525
|
+
getFullscreen() {
|
|
26526
|
+
const value = document.isFullScreen || document.mozIsFullScreen || document.webkitIsFullScreen;
|
|
26527
|
+
return value;
|
|
26528
|
+
}
|
|
26529
|
+
/**
|
|
26530
|
+
* 触发全屏
|
|
26531
|
+
*
|
|
26532
|
+
* @param {IData} container
|
|
26533
|
+
* @memberof KanbanController
|
|
26534
|
+
*/
|
|
26535
|
+
onFullScreen(container) {
|
|
26536
|
+
const isFull = this.getFullscreen();
|
|
26537
|
+
if (!isFull) {
|
|
26538
|
+
if (container) {
|
|
26539
|
+
if (container.webkitRequestFullscreen) {
|
|
26540
|
+
container.webkitRequestFullscreen();
|
|
26541
|
+
} else if (container.mozRequestFullScreen) {
|
|
26542
|
+
container.mozRequestFullScreen();
|
|
26543
|
+
} else if (container.msRequestFullscreen) {
|
|
26544
|
+
container.msRequestFullscreen();
|
|
26545
|
+
} else if (container.requestFullscreen) {
|
|
26546
|
+
container.requestFullscreen();
|
|
26547
|
+
}
|
|
26548
|
+
}
|
|
26549
|
+
} else if (document.documentElement.requestFullScreen) {
|
|
26550
|
+
document.exitFullScreen();
|
|
26551
|
+
} else if (document.documentElement.webkitRequestFullScreen) {
|
|
26552
|
+
document.webkitCancelFullScreen();
|
|
26553
|
+
} else if (document.documentElement.mozRequestFullScreen) {
|
|
26554
|
+
document.mozCancelFullScreen();
|
|
26555
|
+
}
|
|
26556
|
+
return !isFull;
|
|
26557
|
+
}
|
|
26558
|
+
/**
|
|
26559
|
+
* 设置选中分组标识
|
|
26560
|
+
*
|
|
26561
|
+
* @param {(string | number)} key
|
|
26562
|
+
* @memberof KanbanController
|
|
26563
|
+
*/
|
|
26564
|
+
setSelectGroup(key) {
|
|
26565
|
+
if (!this.state.batching) {
|
|
26566
|
+
this.state.selectGroupKey = key;
|
|
26567
|
+
}
|
|
26568
|
+
}
|
|
26569
|
+
/**
|
|
26570
|
+
* 设置分组控制器
|
|
26571
|
+
*
|
|
26572
|
+
* @param {string} groupKey
|
|
26573
|
+
* @param {('quickToolbarController' | 'batchToolbarController')} name
|
|
26574
|
+
* @param {IToolbarController} c
|
|
26575
|
+
* @memberof KanbanController
|
|
26576
|
+
*/
|
|
26577
|
+
setGroupController(groupKey, name, c) {
|
|
26578
|
+
const group = this.state.groups.find((x) => x.key === groupKey);
|
|
26579
|
+
if (group) {
|
|
26580
|
+
group[name] = c;
|
|
26581
|
+
}
|
|
26582
|
+
}
|
|
26583
|
+
/**
|
|
26584
|
+
* 设置工具栏hook
|
|
26585
|
+
*
|
|
26586
|
+
* @memberof KanbanController
|
|
26587
|
+
*/
|
|
26588
|
+
setToolbarHooks() {
|
|
26589
|
+
this.listenNewController((name, c) => {
|
|
26590
|
+
if (name.startsWith("".concat(this.model.name, "_quicktoolbar")) || name.startsWith("".concat(this.model.name, "_groupquicktoolbar"))) {
|
|
26591
|
+
this.setQuickToolbarClickHook(name, c);
|
|
26592
|
+
}
|
|
26593
|
+
if (name.startsWith("".concat(this.model.name, "_batchtoolbar"))) {
|
|
26594
|
+
this.setBatchToolbarClickHook(name, c);
|
|
26595
|
+
}
|
|
26596
|
+
});
|
|
26597
|
+
}
|
|
26598
|
+
/**
|
|
26599
|
+
* 设置快捷工具栏点击事件hook
|
|
26600
|
+
*
|
|
26601
|
+
* @param {string} name
|
|
26602
|
+
* @param {IToolbarController} c
|
|
26603
|
+
* @memberof KanbanController
|
|
26604
|
+
*/
|
|
26605
|
+
setQuickToolbarClickHook(name, c) {
|
|
26606
|
+
const key = name.split("quicktoolbar_")[1];
|
|
26607
|
+
this.setGroupController(
|
|
26608
|
+
key,
|
|
26609
|
+
"quickToolbarController",
|
|
26610
|
+
c
|
|
26611
|
+
);
|
|
26612
|
+
c.evt.on("onClick", (event) => {
|
|
26613
|
+
const groupKey = event.targetName.split("quicktoolbar_")[1];
|
|
26614
|
+
this.setSelectGroup(groupKey);
|
|
26615
|
+
Object.assign(event.params, { srfgroup: groupKey });
|
|
26616
|
+
});
|
|
26617
|
+
}
|
|
26618
|
+
/**
|
|
26619
|
+
* 设置批工具栏点击事件hook
|
|
26620
|
+
*
|
|
26621
|
+
* @param {string} name
|
|
26622
|
+
* @param {IToolbarController} c
|
|
26623
|
+
* @memberof KanbanController
|
|
26624
|
+
*/
|
|
26625
|
+
setBatchToolbarClickHook(name, c) {
|
|
26626
|
+
const key = name.split("batchtoolbar_")[1];
|
|
26627
|
+
this.setGroupController(
|
|
26628
|
+
key,
|
|
26629
|
+
"batchToolbarController",
|
|
26630
|
+
c
|
|
26631
|
+
);
|
|
26632
|
+
c.evt.on("onClick", (event) => {
|
|
26633
|
+
const groupKey = event.targetName.split("batchtoolbar_")[1];
|
|
26634
|
+
this.setSelectGroup(groupKey);
|
|
26635
|
+
Object.assign(event.params, { srfgroup: groupKey });
|
|
26636
|
+
});
|
|
26637
|
+
}
|
|
26638
|
+
/**
|
|
26639
|
+
* 打开批操作工具栏
|
|
26640
|
+
*
|
|
26641
|
+
* @param {string} groupKey
|
|
26642
|
+
* @memberof KanbanController
|
|
26643
|
+
*/
|
|
26644
|
+
openBatch(groupKey) {
|
|
26645
|
+
this.state.selectGroupKey = groupKey;
|
|
26646
|
+
this.state.batching = true;
|
|
26647
|
+
this.state.selectedData = [];
|
|
26648
|
+
this.state.groups.forEach((group) => {
|
|
26649
|
+
group.selectedData = [];
|
|
26650
|
+
});
|
|
26651
|
+
}
|
|
26652
|
+
/**
|
|
26653
|
+
* 关闭批操作工具栏
|
|
26654
|
+
*
|
|
26655
|
+
* @memberof KanbanController
|
|
26656
|
+
*/
|
|
26657
|
+
closeBatch() {
|
|
26658
|
+
this.state.selectGroupKey = "";
|
|
26659
|
+
this.state.batching = false;
|
|
26660
|
+
this.state.selectedData = [];
|
|
26661
|
+
this.state.groups.forEach((group) => {
|
|
26662
|
+
group.selectedData = [];
|
|
26663
|
+
});
|
|
26664
|
+
}
|
|
26353
26665
|
};
|
|
26354
26666
|
|
|
26355
26667
|
// src/controller/control/tree-grid-ex/tree-grid-ex.controller.ts
|
|
26356
|
-
import { recursiveIterate as
|
|
26668
|
+
import { recursiveIterate as recursiveIterate11 } from "@ibiz-template/core";
|
|
26357
26669
|
|
|
26358
26670
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
26359
26671
|
import { isArray as isArray10 } from "qx-util";
|
|
@@ -26593,7 +26905,7 @@ var TreeGridExController = class extends MDControlController {
|
|
|
26593
26905
|
* @memberof TreeGridExController
|
|
26594
26906
|
*/
|
|
26595
26907
|
initColumnStates() {
|
|
26596
|
-
|
|
26908
|
+
recursiveIterate11(
|
|
26597
26909
|
this.model,
|
|
26598
26910
|
(column) => {
|
|
26599
26911
|
if (column.columnType !== "GROUPGRIDCOLUMN") {
|
|
@@ -26681,7 +26993,7 @@ var TreeGridExController = class extends MDControlController {
|
|
|
26681
26993
|
this.state.rootNodes = nodes;
|
|
26682
26994
|
}
|
|
26683
26995
|
this.state.items = [];
|
|
26684
|
-
|
|
26996
|
+
recursiveIterate11(
|
|
26685
26997
|
{ children: this.state.rootNodes },
|
|
26686
26998
|
(node) => {
|
|
26687
26999
|
this.state.items.push(node);
|
|
@@ -26700,7 +27012,7 @@ var TreeGridExController = class extends MDControlController {
|
|
|
26700
27012
|
*/
|
|
26701
27013
|
calcExpandedKeys(nodes) {
|
|
26702
27014
|
let expandedKeys = [];
|
|
26703
|
-
|
|
27015
|
+
recursiveIterate11({ children: nodes }, (node) => {
|
|
26704
27016
|
var _a;
|
|
26705
27017
|
if ((_a = node.children) == null ? void 0 : _a.length) {
|
|
26706
27018
|
expandedKeys.push(node.id);
|
|
@@ -27446,11 +27758,30 @@ var ReportPanelController = class extends ControlController {
|
|
|
27446
27758
|
};
|
|
27447
27759
|
|
|
27448
27760
|
// src/controller/control/gantt/gantt.controller.ts
|
|
27449
|
-
import { recursiveIterate as
|
|
27761
|
+
import { recursiveIterate as recursiveIterate12 } from "@ibiz-template/core";
|
|
27450
27762
|
|
|
27451
27763
|
// src/controller/control/gantt/gantt.service.ts
|
|
27452
27764
|
import { ModelError as ModelError30 } from "@ibiz-template/core";
|
|
27453
27765
|
var GanttService = class extends TreeService {
|
|
27766
|
+
/**
|
|
27767
|
+
* 执行实体服务
|
|
27768
|
+
*
|
|
27769
|
+
* @protected
|
|
27770
|
+
* @param {string} appDataEntityId 实体标识
|
|
27771
|
+
* @param {string} actionName 行为标识
|
|
27772
|
+
* @param {IContext} context 上下文
|
|
27773
|
+
* @param {IParams} params 参数
|
|
27774
|
+
* @return {*} {Promise<IHttpResponse<IData>>}
|
|
27775
|
+
* @memberof GanttService
|
|
27776
|
+
*/
|
|
27777
|
+
execDeService(appDataEntityId, actionName, context, params) {
|
|
27778
|
+
return this.app.deService.exec(
|
|
27779
|
+
appDataEntityId,
|
|
27780
|
+
actionName,
|
|
27781
|
+
context,
|
|
27782
|
+
params
|
|
27783
|
+
);
|
|
27784
|
+
}
|
|
27454
27785
|
/**
|
|
27455
27786
|
* 获取子节点数据
|
|
27456
27787
|
*
|
|
@@ -27743,6 +28074,16 @@ var GanttController = class extends MDControlController {
|
|
|
27743
28074
|
this.state.query = "";
|
|
27744
28075
|
this.state.columnStates = [];
|
|
27745
28076
|
this.state.rootNodes = [];
|
|
28077
|
+
this.state.ganttStyle = {};
|
|
28078
|
+
}
|
|
28079
|
+
/**
|
|
28080
|
+
* 当数据放生变更时,若为当前应用实体数据。则多数据部件进行刷新
|
|
28081
|
+
* 临时重写 防止错误刷新整个甘特图
|
|
28082
|
+
* @protected
|
|
28083
|
+
* @param {IData} msg
|
|
28084
|
+
* @memberof GanttController
|
|
28085
|
+
*/
|
|
28086
|
+
onDataChange(msg) {
|
|
27746
28087
|
}
|
|
27747
28088
|
async onCreated() {
|
|
27748
28089
|
var _a, _b;
|
|
@@ -27835,7 +28176,7 @@ var GanttController = class extends MDControlController {
|
|
|
27835
28176
|
* @memberof GanttController
|
|
27836
28177
|
*/
|
|
27837
28178
|
initColumnStates() {
|
|
27838
|
-
|
|
28179
|
+
recursiveIterate12(
|
|
27839
28180
|
this.model,
|
|
27840
28181
|
(column) => {
|
|
27841
28182
|
if (column.columnType !== "GROUPGRIDCOLUMN") {
|
|
@@ -27870,6 +28211,15 @@ var GanttController = class extends MDControlController {
|
|
|
27870
28211
|
}
|
|
27871
28212
|
});
|
|
27872
28213
|
}
|
|
28214
|
+
/**
|
|
28215
|
+
* 设置甘特图样式
|
|
28216
|
+
*
|
|
28217
|
+
* @param {IGanttStyle} style
|
|
28218
|
+
* @memberof GanttController
|
|
28219
|
+
*/
|
|
28220
|
+
setGanttStyle(style) {
|
|
28221
|
+
this.state.ganttStyle = style;
|
|
28222
|
+
}
|
|
27873
28223
|
/**
|
|
27874
28224
|
* 加载
|
|
27875
28225
|
*
|
|
@@ -27953,7 +28303,7 @@ var GanttController = class extends MDControlController {
|
|
|
27953
28303
|
this.state.rootNodes = nodes;
|
|
27954
28304
|
}
|
|
27955
28305
|
this.state.items = [];
|
|
27956
|
-
|
|
28306
|
+
recursiveIterate12(
|
|
27957
28307
|
{ children: this.state.rootNodes },
|
|
27958
28308
|
(node) => {
|
|
27959
28309
|
this.state.items.push(node);
|
|
@@ -28078,6 +28428,63 @@ var GanttController = class extends MDControlController {
|
|
|
28078
28428
|
params: { ...this.params, ...nodeData.params || {} }
|
|
28079
28429
|
};
|
|
28080
28430
|
}
|
|
28431
|
+
/**
|
|
28432
|
+
* 转化节点数据项
|
|
28433
|
+
* vo -> do
|
|
28434
|
+
* @param {IDETreeNode} nodeModel 节点模型
|
|
28435
|
+
* @param {IData} data 数据
|
|
28436
|
+
* @memberof GanttController
|
|
28437
|
+
*/
|
|
28438
|
+
transformNodeDataItem(nodeModel, data) {
|
|
28439
|
+
var _a;
|
|
28440
|
+
const dataItem = {};
|
|
28441
|
+
(_a = nodeModel.detreeNodeDataItems) == null ? void 0 : _a.forEach((item) => {
|
|
28442
|
+
if (item.id && item.appDEFieldId && data.hasOwnProperty(item.id.toLowerCase())) {
|
|
28443
|
+
Object.assign(dataItem, {
|
|
28444
|
+
[item.appDEFieldId.toLowerCase()]: data[item.id.toLowerCase()]
|
|
28445
|
+
});
|
|
28446
|
+
}
|
|
28447
|
+
});
|
|
28448
|
+
return dataItem;
|
|
28449
|
+
}
|
|
28450
|
+
/**
|
|
28451
|
+
* 更新节点数据
|
|
28452
|
+
*
|
|
28453
|
+
* @param {(IGanttNodeData | IData)} nodeData 节点数据
|
|
28454
|
+
* @param {IData} data 更新数据
|
|
28455
|
+
* @param {boolean} [isTransformData=false] 是否转化数据项
|
|
28456
|
+
* @return {*}
|
|
28457
|
+
* @memberof GanttController
|
|
28458
|
+
*/
|
|
28459
|
+
async updateNodeData(nodeData, data, isTransformData = false) {
|
|
28460
|
+
const key = nodeData.srfkey ? "srfkey" : "id";
|
|
28461
|
+
const currentNode = this.state.items.find(
|
|
28462
|
+
(item) => item[key] === nodeData[key]
|
|
28463
|
+
);
|
|
28464
|
+
if (!currentNode || !currentNode.srfkey) {
|
|
28465
|
+
ibiz.log.error("\u627E\u4E0D\u5230\u5BF9\u5E94\u7684\u52A8\u6001\u5B9E\u4F53\u6811\u8282\u70B9\u6570\u636E", nodeData);
|
|
28466
|
+
return;
|
|
28467
|
+
}
|
|
28468
|
+
const nodeModel = this.getNodeModel(currentNode.nodeId);
|
|
28469
|
+
if (nodeModel) {
|
|
28470
|
+
const newData = isTransformData ? this.transformNodeDataItem(nodeModel, data) : data;
|
|
28471
|
+
if (Object.keys(newData).length > 0) {
|
|
28472
|
+
const [, entityCodename] = nodeModel.appDataEntityId.split(".");
|
|
28473
|
+
const tempContext = Object.assign(this.context.clone(), {
|
|
28474
|
+
[entityCodename]: currentNode.srfkey
|
|
28475
|
+
});
|
|
28476
|
+
const response = await this.service.execDeService(
|
|
28477
|
+
nodeModel.appDataEntityId,
|
|
28478
|
+
"update",
|
|
28479
|
+
tempContext,
|
|
28480
|
+
newData
|
|
28481
|
+
);
|
|
28482
|
+
if (response.status === 200) {
|
|
28483
|
+
this.refreshNodeChildren(nodeData, true);
|
|
28484
|
+
}
|
|
28485
|
+
}
|
|
28486
|
+
}
|
|
28487
|
+
}
|
|
28081
28488
|
/**
|
|
28082
28489
|
* 刷新指定树节点的子节点数据
|
|
28083
28490
|
*
|
|
@@ -30563,6 +30970,7 @@ export {
|
|
|
30563
30970
|
getRootNode,
|
|
30564
30971
|
getTreeNode,
|
|
30565
30972
|
getUIActionById,
|
|
30973
|
+
getUIActionItemsByActionLevel,
|
|
30566
30974
|
getUIActionProvider,
|
|
30567
30975
|
getUILogicNodeProvider,
|
|
30568
30976
|
getViewEngines,
|