@ibiz-template/runtime 0.6.0 → 0.6.1-dev.0
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 +343 -83
- package/dist/index.system.min.js +1 -1
- package/out/command/app/open-app-view/open-app-view.d.ts +1 -1
- package/out/command/app/open-app-view/open-app-view.d.ts.map +1 -1
- package/out/command/app/open-app-view/open-app-view.js +3 -3
- package/out/controller/constant/control/tree-grid-ex/tree-grid-ex-notify.state.d.ts +2 -1
- package/out/controller/constant/control/tree-grid-ex/tree-grid-ex-notify.state.d.ts.map +1 -1
- package/out/controller/constant/control/tree-grid-ex/tree-grid-ex-notify.state.js +1 -0
- package/out/controller/control/app-menu/app-menu.controller.d.ts +1 -1
- package/out/controller/control/app-menu/app-menu.controller.d.ts.map +1 -1
- package/out/controller/control/app-menu/app-menu.controller.js +2 -2
- package/out/controller/control/gantt/gantt.controller.d.ts +50 -14
- package/out/controller/control/gantt/gantt.controller.d.ts.map +1 -1
- package/out/controller/control/gantt/gantt.controller.js +285 -41
- package/out/controller/control/gantt/gantt.service.d.ts +7 -9
- package/out/controller/control/gantt/gantt.service.d.ts.map +1 -1
- package/out/controller/control/gantt/gantt.service.js +29 -9
- package/out/controller/control/tab-exp-panel/tab-exp-panel.controller.d.ts.map +1 -1
- package/out/controller/control/tab-exp-panel/tab-exp-panel.controller.js +1 -0
- package/out/controller/notification/internal-message.controller.d.ts.map +1 -1
- package/out/controller/notification/internal-message.controller.js +2 -3
- package/out/engine/view-base.engine.d.ts.map +1 -1
- package/out/engine/view-base.engine.js +8 -3
- package/out/interface/controller/common/i-nav-view-msg/i-nav-view-msg.d.ts +9 -0
- package/out/interface/controller/common/i-nav-view-msg/i-nav-view-msg.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-gantt.event.d.ts +10 -0
- package/out/interface/controller/event/control/i-gantt.event.d.ts.map +1 -1
- package/out/interface/util/i-open-view-util/i-open-view-util.d.ts +1 -1
- package/out/interface/util/i-open-view-util/i-open-view-util.d.ts.map +1 -1
- package/out/service/vo/gantt-node-data/gantt-node-data-util.js +1 -1
- package/package.json +2 -2
- package/src/command/app/open-app-view/open-app-view.ts +3 -2
- package/src/controller/constant/control/tree-grid-ex/tree-grid-ex-notify.state.ts +1 -0
- package/src/controller/control/app-menu/app-menu.controller.ts +2 -0
- package/src/controller/control/gantt/gantt.controller.ts +354 -53
- package/src/controller/control/gantt/gantt.service.ts +38 -17
- package/src/controller/control/tab-exp-panel/tab-exp-panel.controller.ts +1 -0
- package/src/controller/notification/internal-message.controller.ts +2 -3
- package/src/engine/view-base.engine.ts +10 -3
- package/src/interface/controller/common/i-nav-view-msg/i-nav-view-msg.ts +10 -0
- package/src/interface/controller/event/control/i-gantt.event.ts +8 -1
- package/src/interface/util/i-open-view-util/i-open-view-util.ts +1 -0
- package/src/service/vo/gantt-node-data/gantt-node-data-util.ts +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -12267,7 +12267,7 @@ var calcDataItemValue = (fieldCodeName, nodeModel, data = {}) => {
|
|
|
12267
12267
|
return nodeDataItem.detreeColumnId === fieldCodeName;
|
|
12268
12268
|
});
|
|
12269
12269
|
if (targetTreeNodeDataItem && targetTreeNodeDataItem.appDEFieldId) {
|
|
12270
|
-
result = data[targetTreeNodeDataItem.appDEFieldId];
|
|
12270
|
+
result = data[targetTreeNodeDataItem.appDEFieldId.toLowerCase()];
|
|
12271
12271
|
}
|
|
12272
12272
|
return result;
|
|
12273
12273
|
};
|
|
@@ -12689,7 +12689,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
12689
12689
|
this.openIndexViewTab(appView, context, params);
|
|
12690
12690
|
return { ok: true };
|
|
12691
12691
|
}
|
|
12692
|
-
return this.openIndexViewTab(appView, context, params);
|
|
12692
|
+
return this.openIndexViewTab(appView, context, params, opts);
|
|
12693
12693
|
case "INDEXVIEWTAB_POPUPMODAL":
|
|
12694
12694
|
return this.openIndexViewTabByModal(appView, context, params);
|
|
12695
12695
|
case "POPUP":
|
|
@@ -12721,8 +12721,8 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
12721
12721
|
* @param {IContext} [context]
|
|
12722
12722
|
* @param {IParams} [params={}]
|
|
12723
12723
|
*/
|
|
12724
|
-
openIndexViewTab(appView, context, params = {}) {
|
|
12725
|
-
return ibiz.openView.root(appView.id, context, params);
|
|
12724
|
+
openIndexViewTab(appView, context, params = {}, modalOptions = {}) {
|
|
12725
|
+
return ibiz.openView.root(appView.id, context, params, modalOptions);
|
|
12726
12726
|
}
|
|
12727
12727
|
/**
|
|
12728
12728
|
* 模态路由打开视图,路由拼接于当前视图路由后。再由特殊解析呈现
|
|
@@ -12941,7 +12941,7 @@ function installCommand() {
|
|
|
12941
12941
|
}
|
|
12942
12942
|
|
|
12943
12943
|
// src/app-hub.ts
|
|
12944
|
-
import { RuntimeError as
|
|
12944
|
+
import { RuntimeError as RuntimeError66 } from "@ibiz-template/core";
|
|
12945
12945
|
|
|
12946
12946
|
// src/application.ts
|
|
12947
12947
|
import { Net, getToken } from "@ibiz-template/core";
|
|
@@ -13273,6 +13273,7 @@ var PanelNotifyState = /* @__PURE__ */ ((PanelNotifyState2) => {
|
|
|
13273
13273
|
var TreeGridExNotifyState = /* @__PURE__ */ ((TreeGridExNotifyState2) => {
|
|
13274
13274
|
TreeGridExNotifyState2["LOAD"] = "LOAD";
|
|
13275
13275
|
TreeGridExNotifyState2["SAVE"] = "SAVE";
|
|
13276
|
+
TreeGridExNotifyState2["DRAFT"] = "DRAFT";
|
|
13276
13277
|
return TreeGridExNotifyState2;
|
|
13277
13278
|
})(TreeGridExNotifyState || {});
|
|
13278
13279
|
|
|
@@ -16159,7 +16160,7 @@ var AppMenuController = class extends ControlController {
|
|
|
16159
16160
|
* @param {string} id
|
|
16160
16161
|
* @return {*} {Promise<void>}
|
|
16161
16162
|
*/
|
|
16162
|
-
async onClickMenuItem(id, event, useDepth = true) {
|
|
16163
|
+
async onClickMenuItem(id, event, useDepth = true, opts = {}) {
|
|
16163
16164
|
const menuItem = findRecursiveChild(this.model, id, {
|
|
16164
16165
|
compareField: "id",
|
|
16165
16166
|
childrenFields: ["appMenuItems"]
|
|
@@ -16189,7 +16190,8 @@ var AppMenuController = class extends ControlController {
|
|
|
16189
16190
|
AppFuncCommand.TAG,
|
|
16190
16191
|
menuItem.appFuncId,
|
|
16191
16192
|
tempContext,
|
|
16192
|
-
this.params
|
|
16193
|
+
this.params,
|
|
16194
|
+
opts
|
|
16193
16195
|
);
|
|
16194
16196
|
}
|
|
16195
16197
|
/**
|
|
@@ -29097,7 +29099,8 @@ var TabExpPanelController = class extends ControlController {
|
|
|
29097
29099
|
context,
|
|
29098
29100
|
params,
|
|
29099
29101
|
viewId: tabViewPanel.embeddedAppDEViewId,
|
|
29100
|
-
isCache: this.isCache
|
|
29102
|
+
isCache: this.isCache,
|
|
29103
|
+
modalOptions: { replace: true }
|
|
29101
29104
|
};
|
|
29102
29105
|
}
|
|
29103
29106
|
};
|
|
@@ -33169,27 +33172,47 @@ var ReportPanelController = class extends ControlController {
|
|
|
33169
33172
|
}
|
|
33170
33173
|
};
|
|
33171
33174
|
|
|
33175
|
+
// src/controller/control/gantt/gantt.controller.ts
|
|
33176
|
+
import { awaitTimeout as awaitTimeout4, RuntimeError as RuntimeError65 } from "@ibiz-template/core";
|
|
33177
|
+
|
|
33172
33178
|
// src/controller/control/gantt/gantt.service.ts
|
|
33173
33179
|
import { ModelError as ModelError31 } from "@ibiz-template/core";
|
|
33174
33180
|
var GanttService = class extends TreeService {
|
|
33175
33181
|
/**
|
|
33176
|
-
*
|
|
33182
|
+
* 获取节点草稿
|
|
33177
33183
|
*
|
|
33178
|
-
* @
|
|
33179
|
-
* @param {
|
|
33180
|
-
* @param {
|
|
33181
|
-
* @param {
|
|
33182
|
-
* @
|
|
33183
|
-
* @return {*} {Promise<IHttpResponse<IData>>}
|
|
33184
|
+
* @param {IDETreeDataSetNode} nodeModel
|
|
33185
|
+
* @param {(IDETreeNodeRS | undefined)} nodeRS
|
|
33186
|
+
* @param {(IGanttNodeData | undefined)} parentNodeData
|
|
33187
|
+
* @param {TreeFetchOpts} opts
|
|
33188
|
+
* @return {*} {Promise<IGanttNodeData>}
|
|
33184
33189
|
* @memberof GanttService
|
|
33185
33190
|
*/
|
|
33186
|
-
|
|
33187
|
-
|
|
33191
|
+
async getNodeDraft(nodeModel, nodeRS, parentNodeData, opts) {
|
|
33192
|
+
var _a;
|
|
33193
|
+
const { appDataEntityId } = nodeModel;
|
|
33194
|
+
const { context, params, navContext, navParams } = nodeRS ? this.getNodeRSFilterParams(nodeRS, parentNodeData, opts) : {
|
|
33195
|
+
context: opts.context,
|
|
33196
|
+
params: opts.params,
|
|
33197
|
+
navContext: {},
|
|
33198
|
+
navParams: {}
|
|
33199
|
+
};
|
|
33200
|
+
const response = await this.app.deService.exec(
|
|
33188
33201
|
appDataEntityId,
|
|
33189
|
-
|
|
33202
|
+
"getdraft",
|
|
33190
33203
|
context,
|
|
33191
33204
|
params
|
|
33192
33205
|
);
|
|
33206
|
+
const { data } = response;
|
|
33207
|
+
if (((_a = nodeRS == null ? void 0 : nodeRS.parentDER1N) == null ? void 0 : _a.pickupDEFName) && parentNodeData) {
|
|
33208
|
+
data[nodeRS.parentDER1N.pickupDEFName] = parentNodeData._value;
|
|
33209
|
+
}
|
|
33210
|
+
return new GanttDataSetNodeData(this.model, nodeModel, parentNodeData, {
|
|
33211
|
+
data: response.data,
|
|
33212
|
+
leaf: true,
|
|
33213
|
+
navContext,
|
|
33214
|
+
navParams
|
|
33215
|
+
});
|
|
33193
33216
|
}
|
|
33194
33217
|
/**
|
|
33195
33218
|
* 获取子节点数据
|
|
@@ -33423,6 +33446,9 @@ var GanttService = class extends TreeService {
|
|
|
33423
33446
|
|
|
33424
33447
|
// src/controller/control/gantt/gantt.controller.ts
|
|
33425
33448
|
var GanttController = class extends TreeGridExController {
|
|
33449
|
+
get _evt() {
|
|
33450
|
+
return this.evt;
|
|
33451
|
+
}
|
|
33426
33452
|
/**
|
|
33427
33453
|
* 初始化状态
|
|
33428
33454
|
*
|
|
@@ -33464,59 +33490,289 @@ var GanttController = class extends TreeGridExController {
|
|
|
33464
33490
|
this.state.ganttStyle = style;
|
|
33465
33491
|
}
|
|
33466
33492
|
/**
|
|
33467
|
-
*
|
|
33468
|
-
*
|
|
33469
|
-
* @param {
|
|
33470
|
-
* @param {
|
|
33493
|
+
* 设置行属性的值
|
|
33494
|
+
*
|
|
33495
|
+
* @param {TreeGridExRowState} row
|
|
33496
|
+
* @param {string} name
|
|
33497
|
+
* @param {unknown} value
|
|
33498
|
+
* @return {*} {Promise<void>}
|
|
33471
33499
|
* @memberof GanttController
|
|
33472
33500
|
*/
|
|
33473
|
-
|
|
33474
|
-
|
|
33475
|
-
|
|
33476
|
-
|
|
33477
|
-
|
|
33478
|
-
|
|
33479
|
-
|
|
33480
|
-
|
|
33481
|
-
|
|
33482
|
-
|
|
33483
|
-
|
|
33501
|
+
async setRowValue(row, name, value) {
|
|
33502
|
+
const { beginDataItemName, endDataItemName } = this.model;
|
|
33503
|
+
if (Object.prototype.hasOwnProperty.call(row.data, name) && !isValueChange(row.data[name], value)) {
|
|
33504
|
+
return;
|
|
33505
|
+
}
|
|
33506
|
+
row.data[name] = value;
|
|
33507
|
+
if (name === beginDataItemName) {
|
|
33508
|
+
row.data._beginDataItemValue = value;
|
|
33509
|
+
} else if (name === endDataItemName) {
|
|
33510
|
+
row.data._endDataItemValue = value;
|
|
33511
|
+
}
|
|
33512
|
+
row.modified = true;
|
|
33513
|
+
row.processing = true;
|
|
33514
|
+
try {
|
|
33515
|
+
await this.dataChangeNotify(row, [name]);
|
|
33516
|
+
} finally {
|
|
33517
|
+
row.processing = false;
|
|
33518
|
+
}
|
|
33484
33519
|
}
|
|
33485
33520
|
/**
|
|
33486
|
-
*
|
|
33521
|
+
* 修改节点时间
|
|
33487
33522
|
*
|
|
33488
|
-
* @param {
|
|
33489
|
-
* @param {IData} data 更新数据
|
|
33490
|
-
* @param {boolean} [isTransformData=false] 是否转化数据项
|
|
33491
|
-
* @return {*}
|
|
33523
|
+
* @param {IGanttNodeData} nodeData
|
|
33492
33524
|
* @memberof GanttController
|
|
33493
33525
|
*/
|
|
33494
|
-
async
|
|
33495
|
-
|
|
33496
|
-
|
|
33497
|
-
|
|
33498
|
-
);
|
|
33499
|
-
if (!
|
|
33500
|
-
|
|
33526
|
+
async modifyNodeTime(nodeData, { begin, end }) {
|
|
33527
|
+
if (nodeData._nodeType !== "DE") {
|
|
33528
|
+
throw new RuntimeError65("\u4E0D\u662F\u5B9E\u4F53\u7518\u7279\u8282\u70B9\u6570\u636E");
|
|
33529
|
+
}
|
|
33530
|
+
const rowState = this.getRowState(nodeData._id);
|
|
33531
|
+
if (!rowState) {
|
|
33532
|
+
throw new RuntimeError65("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
33533
|
+
}
|
|
33534
|
+
const { beginDataItemName, endDataItemName } = this.model;
|
|
33535
|
+
this.setRowValue(rowState, beginDataItemName, begin);
|
|
33536
|
+
this.setRowValue(rowState, endDataItemName, end);
|
|
33537
|
+
await this.save(rowState.data);
|
|
33538
|
+
}
|
|
33539
|
+
/**
|
|
33540
|
+
* 保存
|
|
33541
|
+
*
|
|
33542
|
+
* @param {ITreeNodeData} nodeData
|
|
33543
|
+
* @return {*} {Promise<void>}
|
|
33544
|
+
* @memberof GanttController
|
|
33545
|
+
*/
|
|
33546
|
+
async save(nodeData) {
|
|
33547
|
+
if (this.state.isSimple) {
|
|
33548
|
+
ibiz.log.debug("\u7B80\u5355\u6A21\u5F0F\uFF0C\u4E0D\u4FDD\u5B58");
|
|
33501
33549
|
return;
|
|
33502
33550
|
}
|
|
33503
|
-
|
|
33504
|
-
|
|
33505
|
-
|
|
33506
|
-
|
|
33507
|
-
|
|
33508
|
-
|
|
33509
|
-
|
|
33551
|
+
if (nodeData._nodeType !== "DE") {
|
|
33552
|
+
throw new RuntimeError65("\u975E\u5B9E\u4F53\u8282\u70B9\u6570\u636E\u4E0D\u80FD\u4FDD\u5B58");
|
|
33553
|
+
}
|
|
33554
|
+
const rowState = this.state.rows[nodeData._uuid];
|
|
33555
|
+
if (!rowState) {
|
|
33556
|
+
throw new RuntimeError65("\u884C\u6570\u636E\u4E0D\u5B58\u5728");
|
|
33557
|
+
}
|
|
33558
|
+
if (!rowState.modified) {
|
|
33559
|
+
ibiz.log.debug("\u503C\u6CA1\u6709\u53D1\u751F\u6539\u53D8");
|
|
33560
|
+
return;
|
|
33561
|
+
}
|
|
33562
|
+
if (rowState.processing) {
|
|
33563
|
+
await awaitTimeout4(500, this.save.bind(this), [nodeData]);
|
|
33564
|
+
return;
|
|
33565
|
+
}
|
|
33566
|
+
const nodeModel = this.getNodeModel(nodeData._nodeId);
|
|
33567
|
+
const { appDataEntityId } = nodeModel;
|
|
33568
|
+
const isCreate = nodeData._deData.srfuf === 0 /* CREATE */;
|
|
33569
|
+
if (isCreate) {
|
|
33570
|
+
return;
|
|
33571
|
+
}
|
|
33572
|
+
const deName = calcDeCodeNameById(appDataEntityId);
|
|
33573
|
+
const tempContext = this.context.clone();
|
|
33574
|
+
tempContext[deName] = nodeData._deData.srfkey;
|
|
33575
|
+
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
33576
|
+
let res;
|
|
33577
|
+
try {
|
|
33578
|
+
res = await app.deService.exec(
|
|
33579
|
+
appDataEntityId,
|
|
33580
|
+
isCreate ? "create" : "update",
|
|
33581
|
+
tempContext,
|
|
33582
|
+
nodeData._deData
|
|
33583
|
+
);
|
|
33584
|
+
} catch (error) {
|
|
33585
|
+
await this._evt.emit("onSaveError", void 0);
|
|
33586
|
+
this.actionNotification("".concat(isCreate ? "CREATE" : "UPDATE", "ERROR"), {
|
|
33587
|
+
error,
|
|
33588
|
+
data: rowState.data
|
|
33589
|
+
});
|
|
33590
|
+
throw error;
|
|
33591
|
+
}
|
|
33592
|
+
rowState.data._deData = res.data;
|
|
33593
|
+
rowState.modified = false;
|
|
33594
|
+
this.gridStateNotify(rowState, "SAVE" /* SAVE */);
|
|
33595
|
+
await this._evt.emit("onSaveSuccess", void 0);
|
|
33596
|
+
}
|
|
33597
|
+
/**
|
|
33598
|
+
* 删除
|
|
33599
|
+
*
|
|
33600
|
+
* @param {MDCtrlRemoveParams} [args]
|
|
33601
|
+
* @return {*} {Promise<void>}
|
|
33602
|
+
* @memberof GanttController
|
|
33603
|
+
*/
|
|
33604
|
+
async remove(args) {
|
|
33605
|
+
const { context, params, data } = this.handlerAbilityParams(args);
|
|
33606
|
+
if (!(data == null ? void 0 : data.length)) {
|
|
33607
|
+
throw new RuntimeError65("\u672A\u9009\u4E2D\u6570\u636E");
|
|
33608
|
+
}
|
|
33609
|
+
if ((args == null ? void 0 : args.silent) !== true) {
|
|
33610
|
+
const del = await ibiz.confirm.error({
|
|
33611
|
+
title: "\u6570\u636E\u5220\u9664",
|
|
33612
|
+
desc: "\u786E\u8BA4\u5220\u9664\u6570\u636E\uFF1F"
|
|
33613
|
+
});
|
|
33614
|
+
if (!del) {
|
|
33615
|
+
return;
|
|
33616
|
+
}
|
|
33617
|
+
}
|
|
33618
|
+
await this._evt.emit("onBeforeRemove", void 0);
|
|
33619
|
+
await this.startLoading();
|
|
33620
|
+
let needRefresh = false;
|
|
33621
|
+
let refreshNode;
|
|
33622
|
+
try {
|
|
33623
|
+
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
33624
|
+
await handleAllSettled(
|
|
33625
|
+
data.map(async (item) => {
|
|
33626
|
+
if (item._nodeType === "DE") {
|
|
33627
|
+
const tempContext = context.clone();
|
|
33628
|
+
const nodeModel = this.getNodeModel(item._nodeId);
|
|
33629
|
+
if (nodeModel && item._deData.srfuf !== 0 /* CREATE */) {
|
|
33630
|
+
const { appDataEntityId } = nodeModel;
|
|
33631
|
+
const deName = calcDeCodeNameById(appDataEntityId);
|
|
33632
|
+
tempContext[deName] = item.srfkey;
|
|
33633
|
+
await app.deService.exec(
|
|
33634
|
+
appDataEntityId,
|
|
33635
|
+
"remove",
|
|
33636
|
+
tempContext,
|
|
33637
|
+
params
|
|
33638
|
+
);
|
|
33639
|
+
if (refreshNode) {
|
|
33640
|
+
refreshNode = item;
|
|
33641
|
+
}
|
|
33642
|
+
needRefresh = true;
|
|
33643
|
+
}
|
|
33644
|
+
this.afterRemove(item);
|
|
33645
|
+
}
|
|
33646
|
+
})
|
|
33647
|
+
);
|
|
33648
|
+
if ((args == null ? void 0 : args.silent) !== true) {
|
|
33649
|
+
this.actionNotification("REMOVESUCCESS", {
|
|
33650
|
+
data,
|
|
33651
|
+
default: "\u6570\u636E[".concat(data.map((item) => item.srfmajortext).join("\u3001"), "]\u5220\u9664\u6210\u529F!")
|
|
33510
33652
|
});
|
|
33511
|
-
|
|
33512
|
-
|
|
33513
|
-
|
|
33514
|
-
|
|
33515
|
-
|
|
33516
|
-
|
|
33517
|
-
|
|
33518
|
-
|
|
33653
|
+
}
|
|
33654
|
+
if (needRefresh && !(args == null ? void 0 : args.notRefresh)) {
|
|
33655
|
+
await this.refreshNodeChildren(refreshNode, true);
|
|
33656
|
+
}
|
|
33657
|
+
} catch (error) {
|
|
33658
|
+
await this._evt.emit("onRemoveError", void 0);
|
|
33659
|
+
this.actionNotification("REMOVEERROR", {
|
|
33660
|
+
error,
|
|
33661
|
+
data
|
|
33662
|
+
});
|
|
33663
|
+
throw error;
|
|
33664
|
+
} finally {
|
|
33665
|
+
await this.endLoading();
|
|
33666
|
+
}
|
|
33667
|
+
this.state.selectedData = [];
|
|
33668
|
+
await this._evt.emit("onRemoveSuccess", void 0);
|
|
33669
|
+
}
|
|
33670
|
+
/**
|
|
33671
|
+
* 后台删除结束后界面删除逻辑
|
|
33672
|
+
*
|
|
33673
|
+
* @param {GanttDataSetNodeData} data
|
|
33674
|
+
* @memberof GanttController
|
|
33675
|
+
*/
|
|
33676
|
+
afterRemove(data) {
|
|
33677
|
+
var _a;
|
|
33678
|
+
const index = this.state.items.findIndex((item) => item._uuid === data._uuid);
|
|
33679
|
+
if (index !== -1) {
|
|
33680
|
+
this.state.items.splice(index, 1);
|
|
33681
|
+
}
|
|
33682
|
+
if (this.state.rows[data._uuid]) {
|
|
33683
|
+
delete this.state.rows[data._uuid];
|
|
33684
|
+
}
|
|
33685
|
+
if (data._deData.srfuf === 0 /* CREATE */ && data._parent) {
|
|
33686
|
+
const parentNodeData = this.getNodeData(
|
|
33687
|
+
data._parent._id
|
|
33688
|
+
);
|
|
33689
|
+
const childIndex = parentNodeData._children.findIndex(
|
|
33690
|
+
(child) => child._uuid === data._uuid
|
|
33691
|
+
);
|
|
33692
|
+
if (childIndex !== -1) {
|
|
33693
|
+
(_a = parentNodeData._children) == null ? void 0 : _a.splice(childIndex, 1);
|
|
33694
|
+
}
|
|
33695
|
+
}
|
|
33696
|
+
}
|
|
33697
|
+
/**
|
|
33698
|
+
* 新建行
|
|
33699
|
+
*
|
|
33700
|
+
* @param {MDCtrlLoadParams} [args={}]
|
|
33701
|
+
* @return {*} {Promise<void>}
|
|
33702
|
+
* @memberof GanttController
|
|
33703
|
+
*/
|
|
33704
|
+
async newRow(args = {}) {
|
|
33705
|
+
var _a;
|
|
33706
|
+
const { data } = args;
|
|
33707
|
+
const { editShowMode } = ibiz.config.grid;
|
|
33708
|
+
if (editShowMode === "row") {
|
|
33709
|
+
const editingRow = Object.values(this.state.rows).find(
|
|
33710
|
+
(item) => item.showRowEdit
|
|
33711
|
+
);
|
|
33712
|
+
if (editingRow) {
|
|
33713
|
+
throw new RuntimeError65("\u8BF7\u5148\u5B8C\u6210\u5F53\u524D\u884C\u7F16\u8F91\u4E2D\u7684\u884C\u7684\u64CD\u4F5C");
|
|
33714
|
+
}
|
|
33715
|
+
}
|
|
33716
|
+
let parentModel;
|
|
33717
|
+
let parentNodeData;
|
|
33718
|
+
if (data) {
|
|
33719
|
+
const item = Array.isArray(data) ? data[0] : data;
|
|
33720
|
+
parentNodeData = this.getNodeData(item._id);
|
|
33721
|
+
parentModel = this.getNodeModel(parentNodeData._nodeId);
|
|
33722
|
+
} else {
|
|
33723
|
+
parentNodeData = this.state.rootNodes[0];
|
|
33724
|
+
parentModel = getRootNode(this.model);
|
|
33725
|
+
}
|
|
33726
|
+
if (parentModel) {
|
|
33727
|
+
const nodeRSs = getChildNodeRSs(this.model, {
|
|
33728
|
+
parentId: parentModel.id,
|
|
33729
|
+
hasQuery: false
|
|
33730
|
+
});
|
|
33731
|
+
let nodeRS;
|
|
33732
|
+
let nodeModel;
|
|
33733
|
+
nodeRSs.forEach((_nodeRS) => {
|
|
33734
|
+
const childNode = this.getNodeModel(_nodeRS.childDETreeNodeId);
|
|
33735
|
+
if ((childNode == null ? void 0 : childNode.treeNodeType) === "DE" && childNode.appDataEntityId) {
|
|
33736
|
+
nodeRS = _nodeRS;
|
|
33737
|
+
nodeModel = childNode;
|
|
33738
|
+
}
|
|
33739
|
+
});
|
|
33740
|
+
if (nodeModel) {
|
|
33741
|
+
let draftData;
|
|
33742
|
+
try {
|
|
33743
|
+
draftData = await this.service.getNodeDraft(
|
|
33744
|
+
nodeModel,
|
|
33745
|
+
nodeRS,
|
|
33746
|
+
parentNodeData,
|
|
33747
|
+
{
|
|
33748
|
+
hasQuery: false,
|
|
33749
|
+
context: this.context.clone(),
|
|
33750
|
+
params: this.params
|
|
33751
|
+
}
|
|
33752
|
+
);
|
|
33753
|
+
} catch (error) {
|
|
33754
|
+
this.actionNotification("GETDRAFTERROR", {
|
|
33755
|
+
error
|
|
33756
|
+
});
|
|
33757
|
+
throw error;
|
|
33519
33758
|
}
|
|
33759
|
+
const defaultVal = this.calcDefaultValue(draftData, true);
|
|
33760
|
+
Object.assign(draftData, defaultVal);
|
|
33761
|
+
const parentRow = this.getRowState(parentNodeData._id);
|
|
33762
|
+
if ((_a = parentNodeData._children) == null ? void 0 : _a.length) {
|
|
33763
|
+
parentNodeData._children.push(draftData);
|
|
33764
|
+
} else {
|
|
33765
|
+
parentNodeData._children = [draftData];
|
|
33766
|
+
}
|
|
33767
|
+
this.state.items.push(draftData);
|
|
33768
|
+
const rowState = new TreeGridExRowState(draftData, this);
|
|
33769
|
+
this.state.rows[draftData._uuid] = rowState;
|
|
33770
|
+
this.gridStateNotify(rowState, "DRAFT" /* DRAFT */);
|
|
33771
|
+
if (editShowMode === "row") {
|
|
33772
|
+
this.switchRowEdit(rowState, true);
|
|
33773
|
+
}
|
|
33774
|
+
this._evt.emit("onNewRow", { row: parentRow });
|
|
33775
|
+
this.actionNotification("GETDRAFTSUCCESS", { data: draftData });
|
|
33520
33776
|
}
|
|
33521
33777
|
}
|
|
33522
33778
|
}
|
|
@@ -33816,6 +34072,8 @@ var InternalMessageController = class {
|
|
|
33816
34072
|
return;
|
|
33817
34073
|
}
|
|
33818
34074
|
await this.service.markRead(message.id);
|
|
34075
|
+
find.status = "READ";
|
|
34076
|
+
this.unreadCount -= 1;
|
|
33819
34077
|
this.evt.emit("unreadCountChange", this.unreadCount);
|
|
33820
34078
|
this.evt.emit("dataChange");
|
|
33821
34079
|
}
|
|
@@ -34053,7 +34311,7 @@ var AppHub = class {
|
|
|
34053
34311
|
this.registerAppView(appView);
|
|
34054
34312
|
return appView;
|
|
34055
34313
|
}
|
|
34056
|
-
throw new
|
|
34314
|
+
throw new RuntimeError66("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
34057
34315
|
}
|
|
34058
34316
|
/**
|
|
34059
34317
|
* 根据视图模型路径,加参数重新计算视图模型
|
|
@@ -34074,7 +34332,7 @@ var AppHub = class {
|
|
|
34074
34332
|
);
|
|
34075
34333
|
return model;
|
|
34076
34334
|
}
|
|
34077
|
-
throw new
|
|
34335
|
+
throw new RuntimeError66("\u89C6\u56FE[".concat(modelPath, "]\u4E0D\u5B58\u5728"));
|
|
34078
34336
|
}
|
|
34079
34337
|
/**
|
|
34080
34338
|
* 根据应用实体代码名称查找应用视图
|
|
@@ -34105,7 +34363,7 @@ var AppHub = class {
|
|
|
34105
34363
|
this.registerAppDataEntity(entity, appId2);
|
|
34106
34364
|
return entity;
|
|
34107
34365
|
}
|
|
34108
|
-
throw new
|
|
34366
|
+
throw new RuntimeError66("\u672A\u627E\u5230\u5E94\u7528\u5B9E\u4F53[".concat(id, "]"));
|
|
34109
34367
|
}
|
|
34110
34368
|
/**
|
|
34111
34369
|
* 新建 hub 应用
|
|
@@ -34120,7 +34378,7 @@ var AppHub = class {
|
|
|
34120
34378
|
return this.appMap.get(id);
|
|
34121
34379
|
}
|
|
34122
34380
|
if (!this.modelLoaderProvider) {
|
|
34123
|
-
throw new
|
|
34381
|
+
throw new RuntimeError66("\u8BF7\u5148\u6CE8\u518C\u6A21\u578B\u52A0\u8F7D\u9002\u914D\u5668");
|
|
34124
34382
|
}
|
|
34125
34383
|
const appModel = await this.modelLoaderProvider.getApp(id);
|
|
34126
34384
|
const app = new Application(appModel);
|
|
@@ -34251,7 +34509,7 @@ var EngineFactory = class {
|
|
|
34251
34509
|
};
|
|
34252
34510
|
|
|
34253
34511
|
// src/engine/view-base.engine.ts
|
|
34254
|
-
import { RuntimeError as
|
|
34512
|
+
import { RuntimeError as RuntimeError67, findRecursiveChild as findRecursiveChild3 } from "@ibiz-template/core";
|
|
34255
34513
|
var ViewEngineBase = class {
|
|
34256
34514
|
/**
|
|
34257
34515
|
* 构造函数在视图控制器的构造函数逻辑内部执行
|
|
@@ -34359,9 +34617,6 @@ var ViewEngineBase = class {
|
|
|
34359
34617
|
if (model.showCaptionBar === false) {
|
|
34360
34618
|
names.push("view_captionbar");
|
|
34361
34619
|
}
|
|
34362
|
-
if (!getControl(model, "toolbar")) {
|
|
34363
|
-
names.push("view_toolbar", "toolbar");
|
|
34364
|
-
}
|
|
34365
34620
|
const toolBarList = ["lefttoolbar", "righttoolbar", "footertoolbar"];
|
|
34366
34621
|
toolBarList.forEach((name) => {
|
|
34367
34622
|
if (!getControl(model, name)) {
|
|
@@ -34375,6 +34630,11 @@ var ViewEngineBase = class {
|
|
|
34375
34630
|
if (!this.calcViewFooterVisible()) {
|
|
34376
34631
|
names.push("view_footer");
|
|
34377
34632
|
}
|
|
34633
|
+
if (!this.isExistAndInLayout("lefttoolbar") && !this.isExistAndInLayout("righttoolbar") && model.showCaptionBar === false) {
|
|
34634
|
+
names.push("view_toolbar");
|
|
34635
|
+
}
|
|
34636
|
+
} else if (!getControl(model, "toolbar")) {
|
|
34637
|
+
names.push("view_toolbar", "toolbar");
|
|
34378
34638
|
}
|
|
34379
34639
|
return names;
|
|
34380
34640
|
}
|
|
@@ -34504,7 +34764,7 @@ var ViewEngineBase = class {
|
|
|
34504
34764
|
const { appDataEntityId } = this.view.model;
|
|
34505
34765
|
const { evt, context, params } = this.view;
|
|
34506
34766
|
if (!appDataEntityId) {
|
|
34507
|
-
throw new
|
|
34767
|
+
throw new RuntimeError67("\u8BE5\u89C6\u56FE\u6CA1\u6709\u5B9E\u4F53\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u5B9E\u4F53\u6570\u636E");
|
|
34508
34768
|
}
|
|
34509
34769
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
34510
34770
|
const res = await app.deService.exec(
|
|
@@ -35028,7 +35288,7 @@ var GlobalUtil = class {
|
|
|
35028
35288
|
};
|
|
35029
35289
|
|
|
35030
35290
|
// src/logic-scheduler/executor/logic-executor.ts
|
|
35031
|
-
import { RuntimeError as
|
|
35291
|
+
import { RuntimeError as RuntimeError68 } from "@ibiz-template/core";
|
|
35032
35292
|
var LogicExecutor = class {
|
|
35033
35293
|
/**
|
|
35034
35294
|
* @author lxm
|
|
@@ -35049,7 +35309,7 @@ var LogicExecutor = class {
|
|
|
35049
35309
|
*/
|
|
35050
35310
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
35051
35311
|
execute(_executeParams) {
|
|
35052
|
-
throw new
|
|
35312
|
+
throw new RuntimeError68("Method not implemented.");
|
|
35053
35313
|
}
|
|
35054
35314
|
/**
|
|
35055
35315
|
* 销毁方法
|
|
@@ -35486,7 +35746,7 @@ var LogicSchedulerCenter = class {
|
|
|
35486
35746
|
};
|
|
35487
35747
|
|
|
35488
35748
|
// src/logic-scheduler/trigger/logic-trigger.ts
|
|
35489
|
-
import { RuntimeError as
|
|
35749
|
+
import { RuntimeError as RuntimeError69 } from "@ibiz-template/core";
|
|
35490
35750
|
var LogicTrigger = class {
|
|
35491
35751
|
/**
|
|
35492
35752
|
* @author lxm
|
|
@@ -35546,7 +35806,7 @@ var LogicTrigger = class {
|
|
|
35546
35806
|
if (this.executor) {
|
|
35547
35807
|
return this.executor.execute(executeParams);
|
|
35548
35808
|
}
|
|
35549
|
-
throw new
|
|
35809
|
+
throw new RuntimeError69("".concat(this.logic.id, "\u6CA1\u6709\u7ED1\u5B9Aexecutor"));
|
|
35550
35810
|
}
|
|
35551
35811
|
/**
|
|
35552
35812
|
* 销毁方法
|
|
@@ -35563,12 +35823,12 @@ var CustomTrigger = class extends LogicTrigger {
|
|
|
35563
35823
|
};
|
|
35564
35824
|
|
|
35565
35825
|
// src/logic-scheduler/trigger/item-dyna-logic-trigger.ts
|
|
35566
|
-
import { RuntimeError as
|
|
35826
|
+
import { RuntimeError as RuntimeError70 } from "@ibiz-template/core";
|
|
35567
35827
|
var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
35568
35828
|
bindExecutor(executor) {
|
|
35569
35829
|
super.bindExecutor(executor);
|
|
35570
35830
|
if (this.executor.type !== "SCRIPT") {
|
|
35571
|
-
throw new
|
|
35831
|
+
throw new RuntimeError70(
|
|
35572
35832
|
"\u9884\u5B9A\u4E49\u903B\u8F91\u7C7B\u578B".concat(this.type, "\u7684\u89E6\u53D1\u5668\u7C7B\u578B\u53EA\u80FD\u662F\u811A\u672C")
|
|
35573
35833
|
);
|
|
35574
35834
|
}
|
|
@@ -35604,7 +35864,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
35604
35864
|
};
|
|
35605
35865
|
|
|
35606
35866
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
35607
|
-
import { RuntimeError as
|
|
35867
|
+
import { RuntimeError as RuntimeError71, RuntimeModelError as RuntimeModelError72 } from "@ibiz-template/core";
|
|
35608
35868
|
var TimerTrigger = class extends LogicTrigger {
|
|
35609
35869
|
constructor() {
|
|
35610
35870
|
super(...arguments);
|
|
@@ -35616,7 +35876,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
35616
35876
|
}
|
|
35617
35877
|
this.timer = setInterval(() => {
|
|
35618
35878
|
if (!this.scheduler.defaultParamsCb) {
|
|
35619
|
-
throw new
|
|
35879
|
+
throw new RuntimeError71("\u5B9A\u65F6\u5668\u7F3A\u5C11\u9ED8\u8BA4\u53C2\u6570\u56DE\u8C03");
|
|
35620
35880
|
}
|
|
35621
35881
|
const params = this.scheduler.defaultParamsCb();
|
|
35622
35882
|
this.executor.execute(params);
|
|
@@ -35633,7 +35893,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
35633
35893
|
// src/logic-scheduler/executor/app-ui-logic-executor.ts
|
|
35634
35894
|
import {
|
|
35635
35895
|
ModelError as ModelError34,
|
|
35636
|
-
RuntimeError as
|
|
35896
|
+
RuntimeError as RuntimeError72,
|
|
35637
35897
|
RuntimeModelError as RuntimeModelError73
|
|
35638
35898
|
} from "@ibiz-template/core";
|
|
35639
35899
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
@@ -35671,7 +35931,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
35671
35931
|
const { context, params, ...rest } = parameters;
|
|
35672
35932
|
const { data } = parameters;
|
|
35673
35933
|
if (!(data == null ? void 0 : data[0])) {
|
|
35674
|
-
throw new
|
|
35934
|
+
throw new RuntimeError72("opendata\u6CA1\u6709\u53EF\u64CD\u4F5C\u6570\u636E\uFF01");
|
|
35675
35935
|
}
|
|
35676
35936
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
35677
35937
|
let openViewRef;
|
|
@@ -35731,7 +35991,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
35731
35991
|
const openViewRefs = appUILogic.openDataAppViews;
|
|
35732
35992
|
const findView = openViewRefs == null ? void 0 : openViewRefs.find((item) => item.refMode === formTypeValue);
|
|
35733
35993
|
if (!findView) {
|
|
35734
|
-
throw new
|
|
35994
|
+
throw new RuntimeError72(
|
|
35735
35995
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B".concat(formTypeValue, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
35736
35996
|
);
|
|
35737
35997
|
}
|
|
@@ -35856,7 +36116,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
35856
36116
|
}
|
|
35857
36117
|
const selectData = (_a = result.data) == null ? void 0 : _a[0];
|
|
35858
36118
|
if (!selectData) {
|
|
35859
|
-
throw new
|
|
36119
|
+
throw new RuntimeError72("\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E");
|
|
35860
36120
|
}
|
|
35861
36121
|
const indexType = selectData.srfkey;
|
|
35862
36122
|
const findView = newDataAppViews == null ? void 0 : newDataAppViews.find(
|
|
@@ -35866,7 +36126,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
35866
36126
|
}
|
|
35867
36127
|
);
|
|
35868
36128
|
if (!findView) {
|
|
35869
|
-
throw new
|
|
36129
|
+
throw new RuntimeError72(
|
|
35870
36130
|
"\u6CA1\u6709\u627E\u5230\u4E0E\u7D22\u5F15\u7C7B\u578B".concat(indexType, "\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE")
|
|
35871
36131
|
);
|
|
35872
36132
|
}
|
|
@@ -35903,7 +36163,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
35903
36163
|
}
|
|
35904
36164
|
});
|
|
35905
36165
|
if (pickParentFieldName === void 0) {
|
|
35906
|
-
throw new
|
|
36166
|
+
throw new RuntimeError72(
|
|
35907
36167
|
"\u6CA1\u6709\u627E\u5230".concat(pickParentDeName, "\u5728\u5F53\u524D\u5B9E\u4F53\u7684\u5916\u952E\u5C5E\u6027")
|
|
35908
36168
|
);
|
|
35909
36169
|
}
|