@ibiz-template/runtime 0.4.10 → 0.4.12
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 +996 -290
- package/dist/index.system.min.js +2 -2
- package/out/config/global-config.d.ts.map +1 -1
- package/out/config/global-config.js +1 -0
- package/out/controller/common/control/control.controller.d.ts +14 -0
- package/out/controller/common/control/control.controller.d.ts.map +1 -1
- package/out/controller/common/control/control.controller.js +21 -0
- package/out/controller/common/control/md-control.controller.d.ts +9 -0
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +20 -0
- package/out/controller/common/view/view.controller.d.ts +8 -1
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +12 -4
- 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 +36 -38
- package/out/controller/control/form/edit-form/edit-form.service.d.ts +3 -2
- package/out/controller/control/form/edit-form/edit-form.service.d.ts.map +1 -1
- package/out/controller/control/form/edit-form/edit-form.service.js +11 -2
- package/out/controller/control/form/form/form.controller.d.ts +0 -7
- package/out/controller/control/form/form/form.controller.d.ts.map +1 -1
- package/out/controller/control/form/form/form.controller.js +0 -11
- package/out/controller/control/form/form/form.service.d.ts +24 -0
- package/out/controller/control/form/form/form.service.d.ts.map +1 -0
- package/out/controller/control/form/form/form.service.js +45 -0
- package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.d.ts +1 -1
- package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.js +1 -1
- package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts +8 -0
- package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-item/form-item.controller.js +14 -5
- package/out/controller/control/form/search-form/search-form.controller.d.ts.map +1 -1
- package/out/controller/control/form/search-form/search-form.controller.js +1 -5
- package/out/controller/control/form/search-form/search-form.service.d.ts +4 -3
- package/out/controller/control/form/search-form/search-form.service.d.ts.map +1 -1
- package/out/controller/control/form/search-form/search-form.service.js +8 -3
- package/out/controller/control/gantt/gantt.controller.d.ts +55 -1
- package/out/controller/control/gantt/gantt.controller.d.ts.map +1 -1
- package/out/controller/control/gantt/gantt.controller.js +150 -0
- package/out/controller/control/gantt/gantt.service.d.ts +69 -6
- package/out/controller/control/gantt/gantt.service.d.ts.map +1 -1
- package/out/controller/control/gantt/gantt.service.js +196 -5
- package/out/controller/control/search-bar/search-bar.controller.d.ts.map +1 -1
- package/out/controller/control/search-bar/search-bar.controller.js +10 -6
- package/out/controller/control/wizard-panel/wizard-panel.controller.d.ts +8 -1
- package/out/controller/control/wizard-panel/wizard-panel.controller.d.ts.map +1 -1
- package/out/controller/control/wizard-panel/wizard-panel.controller.js +22 -7
- package/out/interface/common/i-global-config/i-global-view-config.d.ts +7 -0
- package/out/interface/common/i-global-config/i-global-view-config.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-control.controller.d.ts +14 -0
- package/out/interface/controller/controller/control/i-control.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-drbar.controller.d.ts +7 -0
- package/out/interface/controller/controller/control/i-drbar.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/view/i-view.controller.d.ts +14 -0
- package/out/interface/controller/controller/view/i-view.controller.d.ts.map +1 -1
- package/out/interface/controller/event/view/i-de-index-view.event.d.ts +12 -0
- package/out/interface/controller/event/view/i-de-index-view.event.d.ts.map +1 -0
- package/out/interface/controller/event/view/i-de-index-view.event.js +1 -0
- package/out/interface/controller/event/view/index.d.ts +1 -0
- package/out/interface/controller/event/view/index.d.ts.map +1 -1
- package/out/interface/controller/event/view/index.js +1 -0
- package/out/interface/controller/state/control/i-control.state.d.ts +8 -0
- package/out/interface/controller/state/control/i-control.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-drbar.state.d.ts +28 -7
- package/out/interface/controller/state/control/i-drbar.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-gantt.state.d.ts +94 -3
- package/out/interface/controller/state/control/i-gantt.state.d.ts.map +1 -1
- package/out/interface/controller/state/view/i-de-index-view.state.d.ts +19 -0
- package/out/interface/controller/state/view/i-de-index-view.state.d.ts.map +1 -0
- package/out/interface/controller/state/view/i-de-index-view.state.js +1 -0
- package/out/interface/controller/state/view/i-edit-view2.state.d.ts +8 -0
- package/out/interface/controller/state/view/i-edit-view2.state.d.ts.map +1 -1
- package/out/interface/controller/state/view/i-view.state.d.ts +8 -0
- package/out/interface/controller/state/view/i-view.state.d.ts.map +1 -1
- package/out/interface/controller/state/view/index.d.ts +1 -0
- package/out/interface/controller/state/view/index.d.ts.map +1 -1
- package/out/interface/controller/state/view/index.js +1 -0
- package/out/interface/service/service/i-auth.service.d.ts +3 -2
- package/out/interface/service/service/i-auth.service.d.ts.map +1 -1
- package/out/register/helper/ui-action-register.d.ts.map +1 -1
- package/out/register/helper/ui-action-register.js +6 -1
- package/out/service/service/auth/v7-auth.service.d.ts +1 -1
- package/out/service/service/auth/v7-auth.service.d.ts.map +1 -1
- package/out/service/service/auth/v7-auth.service.js +12 -7
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +1 -8
- package/out/service/service/entity/method/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +5 -5
- package/out/service/utils/de-cache/de-cache.d.ts +19 -0
- package/out/service/utils/de-cache/de-cache.d.ts.map +1 -1
- package/out/service/utils/de-cache/de-cache.js +54 -4
- package/out/service/vo/gantt-node-data/gantt-code-list-node-data.d.ts +19 -0
- package/out/service/vo/gantt-node-data/gantt-code-list-node-data.d.ts.map +1 -0
- package/out/service/vo/gantt-node-data/gantt-code-list-node-data.js +14 -0
- package/out/service/vo/gantt-node-data/gantt-data-set-node-data.d.ts +19 -0
- package/out/service/vo/gantt-node-data/gantt-data-set-node-data.d.ts.map +1 -0
- package/out/service/vo/gantt-node-data/gantt-data-set-node-data.js +14 -0
- package/out/service/vo/gantt-node-data/gantt-node-data-util.d.ts +9 -0
- package/out/service/vo/gantt-node-data/gantt-node-data-util.d.ts.map +1 -0
- package/out/service/vo/gantt-node-data/gantt-node-data-util.js +19 -0
- package/out/service/vo/gantt-node-data/gantt-static-node-data.d.ts +17 -0
- package/out/service/vo/gantt-node-data/gantt-static-node-data.d.ts.map +1 -0
- package/out/service/vo/gantt-node-data/gantt-static-node-data.js +13 -0
- package/out/service/vo/gantt-node-data/index.d.ts +4 -0
- package/out/service/vo/gantt-node-data/index.d.ts.map +1 -0
- package/out/service/vo/gantt-node-data/index.js +3 -0
- package/out/service/vo/index.d.ts +1 -0
- package/out/service/vo/index.d.ts.map +1 -1
- package/out/service/vo/index.js +1 -0
- package/out/ui-action/provider/index.d.ts.map +1 -1
- package/out/ui-action/provider/index.js +4 -0
- package/out/ui-action/provider/loginout-ui-action-provider.d.ts +16 -0
- package/out/ui-action/provider/loginout-ui-action-provider.d.ts.map +1 -0
- package/out/ui-action/provider/loginout-ui-action-provider.js +25 -0
- package/out/utils/layout-panel-util/layout-panel-util.d.ts.map +1 -1
- package/out/utils/layout-panel-util/layout-panel-util.js +16 -2
- package/package.json +3 -3
- package/src/config/global-config.ts +1 -0
- package/src/controller/common/control/control.controller.ts +23 -0
- package/src/controller/common/control/md-control.controller.ts +21 -0
- package/src/controller/common/view/view.controller.ts +12 -5
- package/src/controller/control/form/edit-form/edit-form.controller.ts +59 -58
- package/src/controller/control/form/edit-form/edit-form.service.ts +11 -2
- package/src/controller/control/form/form/form.controller.ts +0 -14
- package/src/controller/control/form/form/form.service.ts +63 -0
- package/src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts +1 -1
- package/src/controller/control/form/form-detail/form-item/form-item.controller.ts +15 -5
- package/src/controller/control/form/search-form/search-form.controller.ts +1 -5
- package/src/controller/control/form/search-form/search-form.service.ts +8 -3
- package/src/controller/control/gantt/gantt.controller.ts +179 -1
- package/src/controller/control/gantt/gantt.service.ts +305 -6
- package/src/controller/control/search-bar/search-bar.controller.ts +11 -8
- package/src/controller/control/wizard-panel/wizard-panel.controller.ts +27 -7
- package/src/interface/common/i-global-config/i-global-view-config.ts +8 -0
- package/src/interface/controller/controller/control/i-control.controller.ts +16 -0
- package/src/interface/controller/controller/control/i-drbar.controller.ts +8 -0
- package/src/interface/controller/controller/view/i-view.controller.ts +16 -0
- package/src/interface/controller/event/view/i-de-index-view.event.ts +12 -0
- package/src/interface/controller/event/view/index.ts +1 -0
- package/src/interface/controller/state/control/i-control.state.ts +9 -0
- package/src/interface/controller/state/control/i-drbar.state.ts +32 -8
- package/src/interface/controller/state/control/i-gantt.state.ts +106 -4
- package/src/interface/controller/state/view/i-de-index-view.state.ts +19 -0
- package/src/interface/controller/state/view/i-edit-view2.state.ts +10 -1
- package/src/interface/controller/state/view/i-view.state.ts +9 -0
- package/src/interface/controller/state/view/index.ts +1 -0
- package/src/interface/service/service/i-auth.service.ts +3 -2
- package/src/register/helper/ui-action-register.ts +7 -1
- package/src/service/service/auth/v7-auth.service.ts +18 -8
- package/src/service/service/entity/de.service.ts +2 -1
- package/src/service/service/entity/method/de-action.ts +5 -4
- package/src/service/utils/de-cache/de-cache.ts +64 -3
- package/src/service/vo/gantt-node-data/gantt-code-list-node-data.ts +68 -0
- package/src/service/vo/gantt-node-data/gantt-data-set-node-data.ts +68 -0
- package/src/service/vo/gantt-node-data/gantt-node-data-util.ts +26 -0
- package/src/service/vo/gantt-node-data/gantt-static-node-data.ts +50 -0
- package/src/service/vo/gantt-node-data/index.ts +3 -0
- package/src/service/vo/index.ts +1 -0
- package/src/ui-action/provider/index.ts +4 -0
- package/src/ui-action/provider/loginout-ui-action-provider.ts +31 -0
- package/src/utils/layout-panel-util/layout-panel-util.ts +17 -2
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { where, equals, clone, isNil, isEmpty } from 'ramda';
|
|
2
2
|
import { createUUID } from 'qx-util';
|
|
3
|
+
import { IAppDataEntity } from '@ibiz/model-core';
|
|
4
|
+
import { RuntimeError } from '@ibiz-template/core';
|
|
3
5
|
import {
|
|
4
6
|
isExistSessionId,
|
|
5
7
|
isExistSrfKey,
|
|
6
8
|
} from '../service-exist-util/service-exist-util';
|
|
7
9
|
import { IDataEntity } from '../../../interface';
|
|
10
|
+
import { findModelChild } from '../../../model';
|
|
8
11
|
|
|
9
12
|
/**
|
|
10
13
|
* 实体缓存工具类
|
|
@@ -15,6 +18,20 @@ import { IDataEntity } from '../../../interface';
|
|
|
15
18
|
* @class DECache
|
|
16
19
|
*/
|
|
17
20
|
export class DECache {
|
|
21
|
+
/**
|
|
22
|
+
* 是否是联合主键
|
|
23
|
+
* @author lxm
|
|
24
|
+
* @date 2023-12-12 02:47:18
|
|
25
|
+
* @readonly
|
|
26
|
+
* @protected
|
|
27
|
+
* @type {boolean}
|
|
28
|
+
*/
|
|
29
|
+
protected get isUnionKey(): boolean {
|
|
30
|
+
return !!this.entity.unionKeyValueAppDEFieldIds?.length;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
constructor(protected entity: IAppDataEntity) {}
|
|
34
|
+
|
|
18
35
|
/**
|
|
19
36
|
* 数据缓存
|
|
20
37
|
*
|
|
@@ -78,6 +95,16 @@ export class DECache {
|
|
|
78
95
|
* @memberof EntityCache
|
|
79
96
|
*/
|
|
80
97
|
add(context: IParams, entity: IDataEntity): IDataEntity | null {
|
|
98
|
+
// 联合主键相关数据处理
|
|
99
|
+
if (this.isUnionKey) {
|
|
100
|
+
this.calcUnionKey(entity);
|
|
101
|
+
if (this.checkData(context, entity.srfkey)) {
|
|
102
|
+
throw new RuntimeError(
|
|
103
|
+
`新建联合主键数据失败,已有主键为${entity.srfkey}的数据`,
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
81
108
|
try {
|
|
82
109
|
isExistSessionId('add', context);
|
|
83
110
|
if (isNil(entity.srfkey) || isEmpty(entity.srfkey)) {
|
|
@@ -124,16 +151,28 @@ export class DECache {
|
|
|
124
151
|
* @memberof EntityCache
|
|
125
152
|
*/
|
|
126
153
|
update(context: IParams, entity: IDataEntity): IDataEntity | null {
|
|
154
|
+
const oldKey = entity.srfkey!;
|
|
155
|
+
// 联合主键相关数据处理
|
|
156
|
+
if (this.isUnionKey) {
|
|
157
|
+
this.calcUnionKey(entity);
|
|
158
|
+
// 主键改变的时候,检测变更之后的主键是否已经存在
|
|
159
|
+
if (oldKey !== entity.srfkey && this.checkData(context, entity.srfkey)) {
|
|
160
|
+
throw new RuntimeError(
|
|
161
|
+
`更新联合主键数据失败,已有主键为${entity.srfkey}的数据`,
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
127
166
|
try {
|
|
128
167
|
isExistSessionId('update', context);
|
|
129
168
|
isExistSrfKey('update', entity);
|
|
130
169
|
entity.srftempdate = new Date().getTime();
|
|
131
170
|
const map = this.getCacheByTag(context);
|
|
132
|
-
const data = map.get(
|
|
171
|
+
const data = map.get(oldKey);
|
|
133
172
|
if (data) {
|
|
134
173
|
data.assign!(entity);
|
|
135
|
-
map.set(
|
|
136
|
-
ibiz.log.warn('update',
|
|
174
|
+
map.set(oldKey, data);
|
|
175
|
+
ibiz.log.warn('update', oldKey, entity);
|
|
137
176
|
return clone(data);
|
|
138
177
|
}
|
|
139
178
|
throw new Error('数据不存在,无法更新!');
|
|
@@ -366,4 +405,26 @@ export class DECache {
|
|
|
366
405
|
}
|
|
367
406
|
return this.cacheMap.get(tag)!;
|
|
368
407
|
}
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* 根据联合键值计算主键并赋值
|
|
411
|
+
* @author lxm
|
|
412
|
+
* @date 2023-12-12 03:06:30
|
|
413
|
+
* @param {(IDataEntity | IDataEntity[])} data 需要计算的数据或数据集合
|
|
414
|
+
*/
|
|
415
|
+
protected calcUnionKey(data: IDataEntity): void {
|
|
416
|
+
const unionKeys: string[] = this.entity.unionKeyValueAppDEFieldIds!.map(
|
|
417
|
+
id => {
|
|
418
|
+
const appField = findModelChild(this.entity.appDEFields || [], id);
|
|
419
|
+
return appField!.codeName!.toLowerCase();
|
|
420
|
+
},
|
|
421
|
+
);
|
|
422
|
+
const unionValues = unionKeys.map(key => {
|
|
423
|
+
if (isNil(data[key])) {
|
|
424
|
+
return `__empty__`;
|
|
425
|
+
}
|
|
426
|
+
return data[key];
|
|
427
|
+
});
|
|
428
|
+
data.srfkey = unionValues.join('||');
|
|
429
|
+
}
|
|
369
430
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { IDEGantt, IDETreeDataSetNode } from '@ibiz/model-core';
|
|
2
|
+
import { CodeListItem, IGanttNodeData } from '../../../interface';
|
|
3
|
+
import { TreeCodeListNodeData } from '../tree-node-data';
|
|
4
|
+
import { calcDataItemValue } from './gantt-node-data-util';
|
|
5
|
+
|
|
6
|
+
export class GanttCodeListNodeData
|
|
7
|
+
extends TreeCodeListNodeData
|
|
8
|
+
implements IGanttNodeData
|
|
9
|
+
{
|
|
10
|
+
sndataIteValue: string;
|
|
11
|
+
|
|
12
|
+
beginDataItemValue: string;
|
|
13
|
+
|
|
14
|
+
endDataItemValue: string;
|
|
15
|
+
|
|
16
|
+
prevDataItemValue: string | number;
|
|
17
|
+
|
|
18
|
+
finishDataItemValue: string | number;
|
|
19
|
+
|
|
20
|
+
totalDataItemValue: string | number;
|
|
21
|
+
|
|
22
|
+
children?: IGanttNodeData[] | undefined;
|
|
23
|
+
|
|
24
|
+
constructor(
|
|
25
|
+
model: IDEGantt,
|
|
26
|
+
nodeModel: IDETreeDataSetNode,
|
|
27
|
+
parentNodeData: IGanttNodeData | undefined,
|
|
28
|
+
opts: {
|
|
29
|
+
data: CodeListItem;
|
|
30
|
+
leaf: boolean;
|
|
31
|
+
navContext?: IParams;
|
|
32
|
+
navParams?: IParams;
|
|
33
|
+
},
|
|
34
|
+
) {
|
|
35
|
+
super(nodeModel, parentNodeData, opts);
|
|
36
|
+
const { data } = opts;
|
|
37
|
+
this.sndataIteValue = calcDataItemValue(
|
|
38
|
+
model.sndataItemName,
|
|
39
|
+
nodeModel,
|
|
40
|
+
data,
|
|
41
|
+
);
|
|
42
|
+
this.beginDataItemValue = calcDataItemValue(
|
|
43
|
+
model.beginDataItemName,
|
|
44
|
+
nodeModel,
|
|
45
|
+
data,
|
|
46
|
+
);
|
|
47
|
+
this.endDataItemValue = calcDataItemValue(
|
|
48
|
+
model.endDataItemName,
|
|
49
|
+
nodeModel,
|
|
50
|
+
data,
|
|
51
|
+
);
|
|
52
|
+
this.prevDataItemValue = calcDataItemValue(
|
|
53
|
+
model.prevDataItemName,
|
|
54
|
+
nodeModel,
|
|
55
|
+
data,
|
|
56
|
+
);
|
|
57
|
+
this.finishDataItemValue = calcDataItemValue(
|
|
58
|
+
model.finishDataItemName,
|
|
59
|
+
nodeModel,
|
|
60
|
+
data,
|
|
61
|
+
);
|
|
62
|
+
this.totalDataItemValue = calcDataItemValue(
|
|
63
|
+
model.totalDataItemName,
|
|
64
|
+
nodeModel,
|
|
65
|
+
data,
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { IDEGantt, IDETreeDataSetNode } from '@ibiz/model-core';
|
|
2
|
+
import { IGanttNodeData } from '../../../interface';
|
|
3
|
+
import { TreeDataSetNodeData } from '../tree-node-data';
|
|
4
|
+
import { calcDataItemValue } from './gantt-node-data-util';
|
|
5
|
+
|
|
6
|
+
export class GanttDataSetNodeData
|
|
7
|
+
extends TreeDataSetNodeData
|
|
8
|
+
implements IGanttNodeData
|
|
9
|
+
{
|
|
10
|
+
sndataIteValue: string;
|
|
11
|
+
|
|
12
|
+
beginDataItemValue: string;
|
|
13
|
+
|
|
14
|
+
endDataItemValue: string;
|
|
15
|
+
|
|
16
|
+
prevDataItemValue: string | number;
|
|
17
|
+
|
|
18
|
+
finishDataItemValue: string | number;
|
|
19
|
+
|
|
20
|
+
totalDataItemValue: string | number;
|
|
21
|
+
|
|
22
|
+
children?: IGanttNodeData[] | undefined;
|
|
23
|
+
|
|
24
|
+
constructor(
|
|
25
|
+
model: IDEGantt,
|
|
26
|
+
nodeModel: IDETreeDataSetNode,
|
|
27
|
+
parentNodeData: IGanttNodeData | undefined,
|
|
28
|
+
opts: {
|
|
29
|
+
data: IData;
|
|
30
|
+
leaf: boolean; // 是否有子节点关系
|
|
31
|
+
navContext?: IParams;
|
|
32
|
+
navParams?: IParams;
|
|
33
|
+
},
|
|
34
|
+
) {
|
|
35
|
+
super(nodeModel, parentNodeData, opts);
|
|
36
|
+
const { data } = opts;
|
|
37
|
+
this.sndataIteValue = calcDataItemValue(
|
|
38
|
+
model.sndataItemName,
|
|
39
|
+
nodeModel,
|
|
40
|
+
data,
|
|
41
|
+
);
|
|
42
|
+
this.beginDataItemValue = calcDataItemValue(
|
|
43
|
+
model.beginDataItemName,
|
|
44
|
+
nodeModel,
|
|
45
|
+
data,
|
|
46
|
+
);
|
|
47
|
+
this.endDataItemValue = calcDataItemValue(
|
|
48
|
+
model.endDataItemName,
|
|
49
|
+
nodeModel,
|
|
50
|
+
data,
|
|
51
|
+
);
|
|
52
|
+
this.prevDataItemValue = calcDataItemValue(
|
|
53
|
+
model.prevDataItemName,
|
|
54
|
+
nodeModel,
|
|
55
|
+
data,
|
|
56
|
+
);
|
|
57
|
+
this.finishDataItemValue = calcDataItemValue(
|
|
58
|
+
model.finishDataItemName,
|
|
59
|
+
nodeModel,
|
|
60
|
+
data,
|
|
61
|
+
);
|
|
62
|
+
this.totalDataItemValue = calcDataItemValue(
|
|
63
|
+
model.totalDataItemName,
|
|
64
|
+
nodeModel,
|
|
65
|
+
data,
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IDETreeNode, IDETreeNodeDataItem } from '@ibiz/model-core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 计算数据项
|
|
5
|
+
* @param nodeModel
|
|
6
|
+
* @param fieldCodeName
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export const calcDataItemValue = (
|
|
10
|
+
fieldCodeName: string | undefined,
|
|
11
|
+
nodeModel: IDETreeNode,
|
|
12
|
+
data: IData = {},
|
|
13
|
+
): string => {
|
|
14
|
+
let result: string = '';
|
|
15
|
+
if (!fieldCodeName || !nodeModel.detreeNodeDataItems) {
|
|
16
|
+
return result;
|
|
17
|
+
}
|
|
18
|
+
const targetTreeNodeDataItem: IDETreeNodeDataItem | undefined =
|
|
19
|
+
nodeModel.detreeNodeDataItems.find((nodeDataItem: IDETreeNodeDataItem) => {
|
|
20
|
+
return nodeDataItem.id === fieldCodeName;
|
|
21
|
+
});
|
|
22
|
+
if (targetTreeNodeDataItem && targetTreeNodeDataItem.appDEFieldId) {
|
|
23
|
+
result = data[targetTreeNodeDataItem.appDEFieldId];
|
|
24
|
+
}
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { IDEGantt, IDETreeNode } from '@ibiz/model-core';
|
|
2
|
+
import { IGanttNodeData } from '../../../interface';
|
|
3
|
+
import { TreeStaticNodeData } from '../tree-node-data';
|
|
4
|
+
import { calcDataItemValue } from './gantt-node-data-util';
|
|
5
|
+
|
|
6
|
+
export class GanttStaticNodeData
|
|
7
|
+
extends TreeStaticNodeData
|
|
8
|
+
implements IGanttNodeData
|
|
9
|
+
{
|
|
10
|
+
sndataIteValue: string;
|
|
11
|
+
|
|
12
|
+
beginDataItemValue: string;
|
|
13
|
+
|
|
14
|
+
endDataItemValue: string;
|
|
15
|
+
|
|
16
|
+
prevDataItemValue: string | number;
|
|
17
|
+
|
|
18
|
+
finishDataItemValue: string | number;
|
|
19
|
+
|
|
20
|
+
totalDataItemValue: string | number;
|
|
21
|
+
|
|
22
|
+
children?: IGanttNodeData[] | undefined;
|
|
23
|
+
|
|
24
|
+
constructor(
|
|
25
|
+
model: IDEGantt,
|
|
26
|
+
nodeModel: IDETreeNode,
|
|
27
|
+
parentNodeData: IGanttNodeData | undefined,
|
|
28
|
+
opts: { parentValueLevel?: number; leaf: boolean },
|
|
29
|
+
) {
|
|
30
|
+
super(nodeModel, parentNodeData, opts);
|
|
31
|
+
this.sndataIteValue = calcDataItemValue(model.sndataItemName, nodeModel);
|
|
32
|
+
this.beginDataItemValue = calcDataItemValue(
|
|
33
|
+
model.beginDataItemName,
|
|
34
|
+
nodeModel,
|
|
35
|
+
);
|
|
36
|
+
this.endDataItemValue = calcDataItemValue(model.endDataItemName, nodeModel);
|
|
37
|
+
this.prevDataItemValue = calcDataItemValue(
|
|
38
|
+
model.prevDataItemName,
|
|
39
|
+
nodeModel,
|
|
40
|
+
);
|
|
41
|
+
this.finishDataItemValue = calcDataItemValue(
|
|
42
|
+
model.finishDataItemName,
|
|
43
|
+
nodeModel,
|
|
44
|
+
);
|
|
45
|
+
this.totalDataItemValue = calcDataItemValue(
|
|
46
|
+
model.totalDataItemName,
|
|
47
|
+
nodeModel,
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
}
|
package/src/service/vo/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { SysUIActionProvider } from './sys-ui-action-provider';
|
|
|
4
4
|
import { FrontUIActionProvider } from './front-ui-action-provider';
|
|
5
5
|
import { WFWithdrawUIActionProvider } from './wf-withdraw-ui-action-provider';
|
|
6
6
|
import { UIActionProviderBase } from './ui-action-provider-base';
|
|
7
|
+
import { LoginOutUIActionProvider } from './loginout-ui-action-provider';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* 预置默认的界面行为适配器
|
|
@@ -30,6 +31,9 @@ export function presetUIActionProvider(): void {
|
|
|
30
31
|
'DEUIACTION_WFWithdraw',
|
|
31
32
|
() => wfWithdrawUIActionProvider,
|
|
32
33
|
);
|
|
34
|
+
// 预置登出界面行为适配器
|
|
35
|
+
const loginOutUIActionProvider = new LoginOutUIActionProvider();
|
|
36
|
+
registerUIActionProvider('SYS_Logout', () => loginOutUIActionProvider);
|
|
33
37
|
}
|
|
34
38
|
|
|
35
39
|
export {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { IAppDEUIAction } from '@ibiz/model-core';
|
|
2
|
+
import { IUIActionResult, IUILogicParams } from '../../interface';
|
|
3
|
+
import { UIActionProviderBase } from './ui-action-provider-base';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 系统登出界面行为适配器
|
|
7
|
+
*
|
|
8
|
+
* @author zk
|
|
9
|
+
* @date 2023-12-11 07:12:49
|
|
10
|
+
* @export
|
|
11
|
+
* @class LoginOutUIActionProvider
|
|
12
|
+
* @extends {UIActionProviderBase}
|
|
13
|
+
*/
|
|
14
|
+
export class LoginOutUIActionProvider extends UIActionProviderBase {
|
|
15
|
+
async execAction(
|
|
16
|
+
_action: IAppDEUIAction,
|
|
17
|
+
_params: IUILogicParams,
|
|
18
|
+
): Promise<IUIActionResult> {
|
|
19
|
+
const confirm = await ibiz.confirm.info({
|
|
20
|
+
title: '确认退出登录',
|
|
21
|
+
desc: '您确定要退出登录吗?退出后您将无法继续访问已登录状态的功能和信息,请确保您已保存所有未完成的操作。',
|
|
22
|
+
});
|
|
23
|
+
if (confirm) {
|
|
24
|
+
const bol = await ibiz.auth.logout();
|
|
25
|
+
if (bol) {
|
|
26
|
+
window.location.reload();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return {};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -120,9 +120,24 @@ export class LayoutPanelUtil {
|
|
|
120
120
|
} else if (mainMenuAlign) {
|
|
121
121
|
exTag = mainMenuAlign.toUpperCase();
|
|
122
122
|
}
|
|
123
|
+
// 计算面板标识
|
|
124
|
+
let key: string = '';
|
|
123
125
|
if (exTag !== '') {
|
|
124
|
-
|
|
126
|
+
key = `${viewType}_${viewStyle}_${exTag}`;
|
|
127
|
+
} else {
|
|
128
|
+
key = `${viewType}_${viewStyle}`;
|
|
125
129
|
}
|
|
126
|
-
|
|
130
|
+
// 首页不采用分页导航
|
|
131
|
+
if (
|
|
132
|
+
ibiz.config.view.noNavTabs &&
|
|
133
|
+
[
|
|
134
|
+
'APPINDEXVIEW_DEFAULT',
|
|
135
|
+
'APPINDEXVIEW_DEFAULT_LEFT',
|
|
136
|
+
'APPINDEXVIEW_DEFAULT_TOP',
|
|
137
|
+
].includes(key)
|
|
138
|
+
) {
|
|
139
|
+
key += '_NO_NAV';
|
|
140
|
+
}
|
|
141
|
+
return key;
|
|
127
142
|
}
|
|
128
143
|
}
|