@ibiz-template/runtime 0.2.12 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +183 -53
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +6 -0
- package/out/controller/control/calendar/calendar.controller.js +5 -5
- package/out/controller/control/chart/generator/base-series-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/base-series-generator.js +2 -2
- package/out/controller/control/exp-bar/calendar-exp-bar.controller.d.ts +1 -1
- package/out/controller/control/exp-bar/calendar-exp-bar.controller.d.ts.map +1 -1
- package/out/controller/control/exp-bar/calendar-exp-bar.controller.js +2 -2
- package/out/controller/control/exp-bar/exp-bar.controller.d.ts +3 -3
- package/out/controller/control/exp-bar/exp-bar.controller.d.ts.map +1 -1
- package/out/controller/control/exp-bar/exp-bar.controller.js +22 -11
- package/out/controller/control/exp-bar/tree-exp-bar.controller.d.ts +13 -1
- package/out/controller/control/exp-bar/tree-exp-bar.controller.d.ts.map +1 -1
- package/out/controller/control/exp-bar/tree-exp-bar.controller.js +29 -12
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.js +3 -3
- package/out/controller/control/tab-exp-panel/tab-exp-panel.controller.d.ts +11 -1
- 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 +27 -14
- package/out/controller/control/tree/tree.controller.d.ts +1 -0
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +25 -0
- package/out/controller/utils/index.d.ts +1 -0
- package/out/controller/utils/index.d.ts.map +1 -1
- package/out/controller/utils/index.js +1 -0
- package/out/controller/utils/route/route.d.ts +10 -0
- package/out/controller/utils/route/route.d.ts.map +1 -0
- package/out/controller/utils/route/route.js +11 -0
- package/out/controller/utils/view-msg/view-msg-controller.d.ts.map +1 -1
- package/out/controller/utils/view-msg/view-msg-controller.js +10 -1
- 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/common/view-message/i-view-message.d.ts +9 -0
- package/out/interface/controller/common/view-message/i-view-message.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-exp-bar-control.controller.d.ts +1 -1
- package/out/interface/controller/controller/control/i-exp-bar-control.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-tree.controller.d.ts +8 -0
- package/out/interface/controller/controller/control/i-tree.controller.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-tree.state.d.ts +7 -0
- package/out/interface/controller/state/control/i-tree.state.d.ts.map +1 -1
- package/out/logic-scheduler/executor/app-ui-action-executor.d.ts.map +1 -1
- package/out/logic-scheduler/executor/app-ui-action-executor.js +4 -0
- package/out/service/service/entity/util/util.d.ts +1 -0
- package/out/service/service/entity/util/util.d.ts.map +1 -1
- package/out/service/service/entity/util/util.js +1 -0
- package/out/service/service/work-flow/work-flow.service.d.ts +11 -0
- package/out/service/service/work-flow/work-flow.service.d.ts.map +1 -1
- package/out/service/service/work-flow/work-flow.service.js +15 -2
- package/out/service/vo/control.vo.d.ts.map +1 -1
- package/out/service/vo/control.vo.js +11 -0
- package/out/service/vo/tree-node-data/tree-code-list-node-data.d.ts +0 -1
- package/out/service/vo/tree-node-data/tree-code-list-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-code-list-node-data.js +0 -1
- package/out/ui-action/provider/backend-ui-action-provider.d.ts.map +1 -1
- package/out/ui-action/provider/backend-ui-action-provider.js +3 -1
- package/package.json +3 -4
- package/src/controller/common/view/view.controller.ts +6 -0
- package/src/controller/control/calendar/calendar.controller.ts +5 -5
- package/src/controller/control/chart/generator/base-series-generator.ts +5 -2
- package/src/controller/control/exp-bar/calendar-exp-bar.controller.ts +2 -2
- package/src/controller/control/exp-bar/exp-bar.controller.ts +23 -14
- package/src/controller/control/exp-bar/tree-exp-bar.controller.ts +30 -11
- package/src/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.ts +3 -3
- package/src/controller/control/tab-exp-panel/tab-exp-panel.controller.ts +31 -11
- package/src/controller/control/tree/tree.controller.ts +36 -0
- package/src/controller/utils/index.ts +1 -0
- package/src/controller/utils/route/route.ts +11 -0
- package/src/controller/utils/view-msg/view-msg-controller.ts +11 -1
- package/src/interface/controller/common/i-nav-view-msg/i-nav-view-msg.ts +10 -0
- package/src/interface/controller/common/view-message/i-view-message.ts +10 -0
- package/src/interface/controller/controller/control/i-exp-bar-control.controller.ts +1 -1
- package/src/interface/controller/controller/control/i-tree.controller.ts +9 -0
- package/src/interface/controller/state/control/i-tree.state.ts +8 -0
- package/src/logic-scheduler/executor/app-ui-action-executor.ts +8 -1
- package/src/service/service/entity/util/util.ts +1 -0
- package/src/service/service/work-flow/work-flow.service.ts +20 -2
- package/src/service/vo/control.vo.ts +12 -0
- package/src/service/vo/tree-node-data/tree-code-list-node-data.ts +0 -3
- package/src/ui-action/provider/backend-ui-action-provider.ts +5 -1
|
@@ -41,6 +41,7 @@ export class TreeController
|
|
|
41
41
|
// 根节点初始化
|
|
42
42
|
this.state.defaultExpandedKeys = [];
|
|
43
43
|
this.state.expandedKeys = [];
|
|
44
|
+
this.state.navigational = false;
|
|
44
45
|
this.state.size = 0;
|
|
45
46
|
}
|
|
46
47
|
|
|
@@ -154,6 +155,14 @@ export class TreeController
|
|
|
154
155
|
* @memberof TreeController
|
|
155
156
|
*/
|
|
156
157
|
async onTreeNodeClick(nodeData: ITreeNodeData): Promise<void> {
|
|
158
|
+
// 导航的时候,没有导航视图的时候,节点后续点击逻辑都不走,也不选中
|
|
159
|
+
if (this.state.navigational) {
|
|
160
|
+
const nodeModel = this.getNodeModel(nodeData.nodeId);
|
|
161
|
+
if (!nodeModel?.navAppViewId) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
157
166
|
// 单选时,单击才会触发选中逻辑
|
|
158
167
|
if (this.state.singleSelect) {
|
|
159
168
|
// 选中相关处理
|
|
@@ -363,4 +372,31 @@ export class TreeController
|
|
|
363
372
|
children: nodes,
|
|
364
373
|
});
|
|
365
374
|
}
|
|
375
|
+
|
|
376
|
+
async expandNodeByKey(expandKeys: string[]): Promise<void> {
|
|
377
|
+
const noExpandKeys = expandKeys.filter(
|
|
378
|
+
key => !this.state.expandedKeys.includes(key),
|
|
379
|
+
);
|
|
380
|
+
if (noExpandKeys.length === 0) {
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
// 找到已存在的要展开的节点
|
|
385
|
+
const existNodes = this.state.items.filter(item =>
|
|
386
|
+
noExpandKeys.includes(item.id),
|
|
387
|
+
);
|
|
388
|
+
|
|
389
|
+
// 补充所有未展开的节点标识,查询过程中会自动加载后续展开
|
|
390
|
+
this.state.expandedKeys.push(...noExpandKeys);
|
|
391
|
+
|
|
392
|
+
if (existNodes.length === 0) {
|
|
393
|
+
return;
|
|
394
|
+
}
|
|
395
|
+
// 展开加载节点
|
|
396
|
+
await Promise.all(
|
|
397
|
+
existNodes.map(node => {
|
|
398
|
+
return this.loadNodes(node);
|
|
399
|
+
}),
|
|
400
|
+
);
|
|
401
|
+
}
|
|
366
402
|
}
|
|
@@ -2,6 +2,7 @@ export * from './counter';
|
|
|
2
2
|
export * from './loading/loading.state';
|
|
3
3
|
export * from './button-state';
|
|
4
4
|
export * from './event';
|
|
5
|
+
export * from './route/route';
|
|
5
6
|
export * from './util/util';
|
|
6
7
|
export * from './value-rule/value-rule';
|
|
7
8
|
export * from './value-ex/value-ex';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 是否有子路由路径
|
|
3
|
+
* @author lxm
|
|
4
|
+
* @date 2023-11-08 10:12:54
|
|
5
|
+
* @export
|
|
6
|
+
* @param {number} routeDepth
|
|
7
|
+
* @return {*} {boolean}
|
|
8
|
+
*/
|
|
9
|
+
export function hasSubRoute(routeDepth: number): boolean {
|
|
10
|
+
return window.location.hash.split('/').length > routeDepth * 2 + 2;
|
|
11
|
+
}
|
|
@@ -146,13 +146,16 @@ export class ViewMsgController {
|
|
|
146
146
|
*/
|
|
147
147
|
protected calcStaticMsg(detail: IAppViewMsgGroupDetail): IViewMessage {
|
|
148
148
|
const { position: position1 } = detail;
|
|
149
|
+
const viewMsg = this.viewMsgMap.get(detail.appViewMsgId!)!;
|
|
149
150
|
const {
|
|
150
151
|
title,
|
|
151
152
|
message,
|
|
152
153
|
removeMode,
|
|
153
154
|
position: position2,
|
|
154
155
|
messageType,
|
|
155
|
-
} =
|
|
156
|
+
} = viewMsg;
|
|
157
|
+
const { userTag, userTag2, userTag3, userTag4 } = viewMsg as IData;
|
|
158
|
+
|
|
156
159
|
// detail里的位置优先
|
|
157
160
|
const position = position1 || position2;
|
|
158
161
|
return {
|
|
@@ -161,6 +164,13 @@ export class ViewMsgController {
|
|
|
161
164
|
position,
|
|
162
165
|
messageType,
|
|
163
166
|
removeMode,
|
|
167
|
+
// 额外参数
|
|
168
|
+
extraParams: {
|
|
169
|
+
userTag,
|
|
170
|
+
userTag2,
|
|
171
|
+
userTag3,
|
|
172
|
+
userTag4,
|
|
173
|
+
},
|
|
164
174
|
};
|
|
165
175
|
}
|
|
166
176
|
|
|
@@ -64,5 +64,5 @@ export interface IExpBarControlController<
|
|
|
64
64
|
* @date 2023-09-14 07:03:39
|
|
65
65
|
* @param {{ srfnav?: string; path: string }} info 当前系统的路由的从一级到最后一级的所有路径。
|
|
66
66
|
*/
|
|
67
|
-
onRouterChange(info: { srfnav: string; path: string }): void
|
|
67
|
+
onRouterChange(info: { srfnav: string; path: string }): Promise<void>;
|
|
68
68
|
}
|
|
@@ -57,4 +57,13 @@ export interface ITreeController
|
|
|
57
57
|
nodeData: ITreeNodeData | IData,
|
|
58
58
|
refreshParent?: boolean,
|
|
59
59
|
): Promise<void>;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* 展开并加载节点
|
|
63
|
+
* @author lxm
|
|
64
|
+
* @date 2023-11-07 03:00:54
|
|
65
|
+
* @param {string[]} expandedKeys 要展开的节点标识集合
|
|
66
|
+
* @return {*} {Promise<void>}
|
|
67
|
+
*/
|
|
68
|
+
expandNodeByKey(expandedKeys: string[]): Promise<void>;
|
|
60
69
|
}
|
|
@@ -37,6 +37,14 @@ export interface ITreeState extends IMDControlState {
|
|
|
37
37
|
* @type {string[]}
|
|
38
38
|
*/
|
|
39
39
|
expandedKeys: string[];
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* 是否是导航的(即树导航里的树)
|
|
43
|
+
* @author lxm
|
|
44
|
+
* @date 2023-11-08 03:25:21
|
|
45
|
+
* @type {boolean}
|
|
46
|
+
*/
|
|
47
|
+
navigational: boolean;
|
|
40
48
|
}
|
|
41
49
|
|
|
42
50
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RuntimeModelError } from '@ibiz-template/core';
|
|
1
2
|
import { IUILogicParams } from '../../interface';
|
|
2
3
|
import { UIActionUtil } from '../../ui-action';
|
|
3
4
|
import { LogicExecutor } from './logic-executor';
|
|
@@ -15,6 +16,12 @@ export class AppDEUIActionExecutor extends LogicExecutor {
|
|
|
15
16
|
|
|
16
17
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
18
|
execute(executeParams: IUILogicParams): any {
|
|
18
|
-
|
|
19
|
+
if (!this.logic.appDEUIActionId) {
|
|
20
|
+
throw new RuntimeModelError(
|
|
21
|
+
this.logic,
|
|
22
|
+
`逻辑中缺少触发应用实体界面行为id`,
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
UIActionUtil.execAndResolved(this.logic.appDEUIActionId, executeParams);
|
|
19
26
|
}
|
|
20
27
|
}
|
|
@@ -66,6 +66,20 @@ export class WorkFlowService implements IWorkFlowService {
|
|
|
66
66
|
return data;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
/**
|
|
70
|
+
* 获取工作流实例标记
|
|
71
|
+
*
|
|
72
|
+
* @author zk
|
|
73
|
+
* @date 2023-11-06 06:11:07
|
|
74
|
+
* @private
|
|
75
|
+
* @param {IParams} context
|
|
76
|
+
* @return {*} {string}
|
|
77
|
+
* @memberof WorkFlowService
|
|
78
|
+
*/
|
|
79
|
+
private getWFInstanceTag(context: IParams): string {
|
|
80
|
+
return context.srfprocessinstanceid || 'alls';
|
|
81
|
+
}
|
|
82
|
+
|
|
69
83
|
/**
|
|
70
84
|
* 根据当前步骤和任务获取工作流步骤数据(如:流程表单等)
|
|
71
85
|
*
|
|
@@ -113,7 +127,9 @@ export class WorkFlowService implements IWorkFlowService {
|
|
|
113
127
|
async getWFHistory(context: IParams): Promise<IHttpResponse<IData>> {
|
|
114
128
|
const deKeyValue = context[this.model.codeName!.toLowerCase()];
|
|
115
129
|
return this.app.net.get(
|
|
116
|
-
`${this.getBaseUrl()}/${deKeyValue}/process-instances
|
|
130
|
+
`${this.getBaseUrl()}/${deKeyValue}/process-instances/${this.getWFInstanceTag(
|
|
131
|
+
context,
|
|
132
|
+
)}/history`,
|
|
117
133
|
);
|
|
118
134
|
}
|
|
119
135
|
|
|
@@ -128,7 +144,9 @@ export class WorkFlowService implements IWorkFlowService {
|
|
|
128
144
|
async getWFProcessDiagram(context: IParams): Promise<IHttpResponse<IData>> {
|
|
129
145
|
const deKeyValue = context[this.model.codeName!.toLowerCase()];
|
|
130
146
|
return this.app.net.request(
|
|
131
|
-
`${this.getBaseUrl()}/${deKeyValue}/process-instances
|
|
147
|
+
`${this.getBaseUrl()}/${deKeyValue}/process-instances/${this.getWFInstanceTag(
|
|
148
|
+
context,
|
|
149
|
+
)}/processdiagram`,
|
|
132
150
|
{
|
|
133
151
|
method: 'post',
|
|
134
152
|
data: {},
|
|
@@ -142,6 +142,18 @@ export class ControlVO {
|
|
|
142
142
|
value: $dataUIMap || new Map(),
|
|
143
143
|
});
|
|
144
144
|
|
|
145
|
+
// srfactionparam属性改到源对象上去
|
|
146
|
+
Object.defineProperty(this, 'srfactionparam', {
|
|
147
|
+
get() {
|
|
148
|
+
return this.$origin.srfactionparam;
|
|
149
|
+
},
|
|
150
|
+
set(val: unknown) {
|
|
151
|
+
this.$origin.srfactionparam = val;
|
|
152
|
+
},
|
|
153
|
+
enumerable: true,
|
|
154
|
+
configurable: true,
|
|
155
|
+
});
|
|
156
|
+
|
|
145
157
|
// 可读写的预置属性,主键属性和主文本属性
|
|
146
158
|
['srfkey', 'srfmajortext'].forEach(key => {
|
|
147
159
|
if (Object.prototype.hasOwnProperty.call(this.$origin, key)) {
|
|
@@ -21,8 +21,6 @@ export class TreeCodeListNodeData
|
|
|
21
21
|
|
|
22
22
|
value: string;
|
|
23
23
|
|
|
24
|
-
deData: CodeListItem;
|
|
25
|
-
|
|
26
24
|
constructor(
|
|
27
25
|
model: IDETreeDataSetNode,
|
|
28
26
|
parentNodeData: ITreeNodeData | undefined,
|
|
@@ -35,7 +33,6 @@ export class TreeCodeListNodeData
|
|
|
35
33
|
) {
|
|
36
34
|
super(model, parentNodeData, opts);
|
|
37
35
|
const { data } = opts;
|
|
38
|
-
this.deData = data;
|
|
39
36
|
this.text = data.text;
|
|
40
37
|
this.value = data.value as string;
|
|
41
38
|
this.id = parentNodeData
|
|
@@ -54,8 +54,12 @@ export class BackendUIActionProvider extends UIActionProviderBase {
|
|
|
54
54
|
if (resultData.length === 0) {
|
|
55
55
|
resultData.push({});
|
|
56
56
|
}
|
|
57
|
+
// srfactionparam只传选中数据的后台属性
|
|
58
|
+
const actionData = res.data.map(
|
|
59
|
+
item => item.getOrigin?.() || item || {},
|
|
60
|
+
);
|
|
57
61
|
resultData.forEach(item => {
|
|
58
|
-
item.srfactionparam =
|
|
62
|
+
item.srfactionparam = actionData;
|
|
59
63
|
});
|
|
60
64
|
}
|
|
61
65
|
}
|