@ibiz-template/runtime 0.1.6 → 0.1.8
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 +401 -161
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/command/app/open-app-view/open-app-view.d.ts +3 -3
- 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 +4 -1
- package/out/constant/sys-uiaction-tag.d.ts +8 -0
- package/out/constant/sys-uiaction-tag.d.ts.map +1 -1
- package/out/constant/sys-uiaction-tag.js +8 -0
- package/out/controller/common/base.controller.js +1 -1
- package/out/controller/common/control/md-control.controller.d.ts +3 -1
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +31 -13
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +13 -3
- package/out/controller/ctx/ctx.d.ts.map +1 -1
- package/out/controller/ctx/ctx.js +1 -1
- package/out/engine/md-view.engine.d.ts.map +1 -1
- package/out/engine/md-view.engine.js +10 -4
- package/out/install.js +2 -2
- package/out/interface/common/i-open-view-options/i-open-view-options.d.ts +38 -0
- package/out/interface/common/i-open-view-options/i-open-view-options.d.ts.map +1 -0
- package/out/interface/common/i-open-view-options/i-open-view-options.js +1 -0
- package/out/interface/common/index.d.ts +1 -0
- package/out/interface/common/index.d.ts.map +1 -1
- package/out/interface/controller/common/i-icon/i-icon.d.ts +7 -0
- package/out/interface/controller/common/i-icon/i-icon.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-grid.controller.d.ts +11 -4
- package/out/interface/controller/controller/control/i-grid.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-md-control.controller.d.ts +7 -0
- package/out/interface/controller/controller/control/i-md-control.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-tree.controller.d.ts +7 -0
- package/out/interface/controller/controller/control/i-tree.controller.d.ts.map +1 -1
- package/out/interface/controller/event/argument/index.d.ts +1 -0
- package/out/interface/controller/event/argument/index.d.ts.map +1 -1
- package/out/interface/controller/event/argument/row-edit-change.event.d.ts +20 -0
- package/out/interface/controller/event/argument/row-edit-change.event.d.ts.map +1 -0
- package/out/interface/controller/event/argument/row-edit-change.event.js +1 -0
- package/out/interface/controller/event/control/i-grid.event.d.ts +13 -1
- package/out/interface/controller/event/control/i-grid.event.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-tree.event.d.ts +19 -0
- package/out/interface/controller/event/control/i-tree.event.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-grid.state.d.ts +8 -0
- package/out/interface/controller/state/control/i-grid.state.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-tree.state.d.ts +16 -1
- package/out/interface/controller/state/control/i-tree.state.d.ts.map +1 -1
- package/out/interface/controller/work-flow/wf-link.d.ts +9 -0
- package/out/interface/controller/work-flow/wf-link.d.ts.map +1 -1
- package/out/interface/logic-scheduler/i-scheduler-logic.d.ts +5 -3
- package/out/interface/logic-scheduler/i-scheduler-logic.d.ts.map +1 -1
- package/out/interface/logic-scheduler/i-trigger-match-params.d.ts +5 -0
- package/out/interface/logic-scheduler/i-trigger-match-params.d.ts.map +1 -1
- package/out/interface/service/service/i-auth.service.d.ts +29 -0
- package/out/interface/service/service/i-auth.service.d.ts.map +1 -0
- package/out/interface/service/service/i-auth.service.js +1 -0
- package/out/interface/service/service/index.d.ts +5 -4
- package/out/interface/service/service/index.d.ts.map +1 -1
- package/out/interface/service/service/index.js +1 -4
- package/out/interface/util/i-confirm-util/i-confirm-util.d.ts +82 -0
- package/out/interface/util/i-confirm-util/i-confirm-util.d.ts.map +1 -0
- package/out/interface/util/i-confirm-util/i-confirm-util.js +1 -0
- package/out/interface/util/i-modal-util/i-modal-util.d.ts +8 -0
- package/out/interface/util/i-modal-util/i-modal-util.d.ts.map +1 -1
- package/out/interface/util/i-open-view-util/i-open-view-util.d.ts +9 -0
- package/out/interface/util/i-open-view-util/i-open-view-util.d.ts.map +1 -1
- package/out/interface/util/index.d.ts +1 -0
- package/out/interface/util/index.d.ts.map +1 -1
- package/out/logic-scheduler/index.d.ts.map +1 -1
- package/out/logic-scheduler/index.js +2 -0
- package/out/logic-scheduler/scheduler/logic-scheduler.d.ts +24 -1
- package/out/logic-scheduler/scheduler/logic-scheduler.d.ts.map +1 -1
- package/out/logic-scheduler/scheduler/logic-scheduler.js +39 -0
- package/out/logic-scheduler/trigger/control-event-trigger.d.ts +27 -0
- package/out/logic-scheduler/trigger/control-event-trigger.d.ts.map +1 -0
- package/out/logic-scheduler/trigger/control-event-trigger.js +33 -0
- package/out/logic-scheduler/trigger/view-event-trigger.d.ts +8 -0
- package/out/logic-scheduler/trigger/view-event-trigger.d.ts.map +1 -1
- package/out/logic-scheduler/trigger/view-event-trigger.js +8 -0
- package/out/register/helper/editor-register.d.ts.map +1 -1
- package/out/register/helper/editor-register.js +12 -1
- package/out/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +9 -15
- package/out/service/service/auth/v7-auth.service.d.ts +14 -0
- package/out/service/service/auth/v7-auth.service.d.ts.map +1 -0
- package/out/service/service/auth/v7-auth.service.js +47 -0
- package/out/service/service/code-list/code-list.service.d.ts.map +1 -1
- package/out/service/service/code-list/code-list.service.js +5 -1
- package/out/service/service/index.d.ts +1 -1
- package/out/service/service/index.d.ts.map +1 -1
- package/out/service/service/index.js +1 -1
- package/out/service/vo/control.vo.d.ts +8 -0
- package/out/service/vo/control.vo.d.ts.map +1 -1
- package/out/service/vo/control.vo.js +16 -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 +1 -0
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts +21 -2
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-data-set-node-data.js +48 -0
- package/out/service/vo/tree-node-data/tree-node-data.d.ts +12 -1
- package/out/service/vo/tree-node-data/tree-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-node-data.js +21 -2
- package/out/service/vo/tree-node-data/tree-static-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-static-node-data.js +1 -0
- package/out/types.d.ts +21 -4
- package/out/types.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/bind-param-node/bind-param-node.d.ts +17 -0
- package/out/ui-logic/ui-logic-node/bind-param-node/bind-param-node.d.ts.map +1 -0
- package/out/ui-logic/ui-logic-node/bind-param-node/bind-param-node.js +22 -0
- package/out/ui-logic/ui-logic-node/index.d.ts +1 -0
- package/out/ui-logic/ui-logic-node/index.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/index.js +1 -0
- package/out/ui-logic/ui-logic-param/ui-logic-param.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-param/ui-logic-param.js +2 -2
- package/out/ui-logic/ui-logic.d.ts.map +1 -1
- package/out/ui-logic/ui-logic.js +5 -3
- package/out/ui-logic/utils/handle-src-val.d.ts.map +1 -1
- package/out/ui-logic/utils/handle-src-val.js +2 -4
- package/out/utils/open-redirect-view/open-redirect-view.d.ts +4 -4
- package/out/utils/open-redirect-view/open-redirect-view.d.ts.map +1 -1
- package/out/utils/open-redirect-view/open-redirect-view.js +27 -26
- package/out/utils/script/script-function.d.ts.map +1 -1
- package/out/utils/script/script-function.js +4 -1
- package/package.json +3 -3
- package/src/command/app/open-app-view/open-app-view.ts +8 -5
- package/src/constant/sys-uiaction-tag.ts +8 -0
- package/src/controller/common/base.controller.ts +1 -1
- package/src/controller/common/control/md-control.controller.ts +37 -14
- package/src/controller/common/view/view.controller.ts +16 -3
- package/src/controller/ctx/ctx.ts +1 -1
- package/src/engine/md-view.engine.ts +13 -4
- package/src/install.ts +2 -2
- package/src/interface/common/i-open-view-options/i-open-view-options.ts +40 -0
- package/src/interface/common/index.ts +1 -0
- package/src/interface/controller/common/i-icon/i-icon.ts +8 -0
- package/src/interface/controller/controller/control/i-grid.controller.ts +12 -4
- package/src/interface/controller/controller/control/i-md-control.controller.ts +9 -1
- package/src/interface/controller/controller/control/i-tree.controller.ts +8 -0
- package/src/interface/controller/event/argument/index.ts +1 -0
- package/src/interface/controller/event/argument/row-edit-change.event.ts +20 -0
- package/src/interface/controller/event/control/i-grid.event.ts +14 -1
- package/src/interface/controller/event/control/i-tree.event.ts +14 -0
- package/src/interface/controller/state/control/i-grid.state.ts +9 -0
- package/src/interface/controller/state/control/i-tree.state.ts +19 -1
- package/src/interface/controller/work-flow/wf-link.ts +10 -0
- package/src/interface/logic-scheduler/i-scheduler-logic.ts +6 -3
- package/src/interface/logic-scheduler/i-trigger-match-params.ts +6 -0
- package/src/interface/service/service/i-auth.service.ts +29 -0
- package/src/interface/service/service/index.ts +5 -4
- package/src/interface/util/i-confirm-util/i-confirm-util.ts +82 -0
- package/src/interface/util/i-modal-util/i-modal-util.ts +8 -0
- package/src/interface/util/i-open-view-util/i-open-view-util.ts +10 -0
- package/src/interface/util/index.ts +1 -0
- package/src/logic-scheduler/index.ts +5 -0
- package/src/logic-scheduler/scheduler/logic-scheduler.ts +43 -0
- package/src/logic-scheduler/trigger/control-event-trigger.ts +45 -0
- package/src/logic-scheduler/trigger/view-event-trigger.ts +8 -0
- package/src/register/helper/editor-register.ts +17 -1
- package/src/service/dto/method.dto.ts +9 -13
- package/src/service/service/auth/v7-auth.service.ts +49 -0
- package/src/service/service/code-list/code-list.service.ts +8 -1
- package/src/service/service/index.ts +1 -1
- package/src/service/vo/control.vo.ts +17 -1
- package/src/service/vo/tree-node-data/tree-code-list-node-data.ts +2 -0
- package/src/service/vo/tree-node-data/tree-data-set-node-data.ts +60 -2
- package/src/service/vo/tree-node-data/tree-node-data.ts +27 -3
- package/src/service/vo/tree-node-data/tree-static-node-data.ts +2 -0
- package/src/types.ts +24 -3
- package/src/ui-action/provider/front-ui-action-provider.ts +1 -1
- package/src/ui-logic/ui-logic-node/bind-param-node/bind-param-node.ts +30 -0
- package/src/ui-logic/ui-logic-node/index.ts +1 -0
- package/src/ui-logic/ui-logic-param/ui-logic-param.ts +5 -2
- package/src/ui-logic/ui-logic.ts +5 -2
- package/src/ui-logic/utils/handle-src-val.ts +3 -6
- package/src/utils/open-redirect-view/open-redirect-view.ts +30 -27
- package/src/utils/script/script-function.ts +4 -1
- package/out/service/service/auth/auth.service.d.ts +0 -30
- package/out/service/service/auth/auth.service.d.ts.map +0 -1
- package/out/service/service/auth/auth.service.js +0 -37
- package/src/service/service/auth/auth.service.ts +0 -44
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { IDETreeDataSetNode } from '@ibiz/model-core';
|
|
2
|
-
import { ITreeNodeData } from '../../../interface';
|
|
1
|
+
import { IDETreeDataSetNode, IDETreeNodeDataItem } from '@ibiz/model-core';
|
|
2
|
+
import { IIcon, ITreeNodeData } from '../../../interface';
|
|
3
3
|
import { calcDeCodeNameById } from '../../../model';
|
|
4
|
+
import { ScriptFactory } from '../../../utils';
|
|
4
5
|
import { TreeNodeData } from './tree-node-data';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -51,5 +52,62 @@ export class TreeDataSetNodeData extends TreeNodeData implements ITreeNodeData {
|
|
|
51
52
|
|
|
52
53
|
this.srfkey = this.deData.srfkey;
|
|
53
54
|
this.srfmajortext = this.deData.srfmajortext;
|
|
55
|
+
|
|
56
|
+
this.icon = this.calcIcon(model);
|
|
57
|
+
this.textHtml = this.calcTextHtml(model);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
protected calcIcon(model: IDETreeDataSetNode): IIcon | undefined {
|
|
61
|
+
const icon = super.calcIcon(model) || {};
|
|
62
|
+
const { iconAppDEFieldId, detreeNodeDataItems } = model;
|
|
63
|
+
if (iconAppDEFieldId && this.deData[iconAppDEFieldId]) {
|
|
64
|
+
icon.imagePath = this.deData[iconAppDEFieldId];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (icon) {
|
|
68
|
+
this.icon = icon;
|
|
69
|
+
}
|
|
70
|
+
const iconDataItem = detreeNodeDataItems?.find(item => item.id === 'icon');
|
|
71
|
+
if (iconDataItem) {
|
|
72
|
+
icon.htmlStr = this.calcDataItemScript(iconDataItem);
|
|
73
|
+
}
|
|
74
|
+
return Object.values(icon).length > 0 ? icon : undefined;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* 计算节点数据项的自定义脚本内容
|
|
79
|
+
* @author lxm
|
|
80
|
+
* @date 2023-08-15 02:37:29
|
|
81
|
+
* @protected
|
|
82
|
+
* @param {IDETreeNodeDataItem} dataItem
|
|
83
|
+
* @return {*} {(string | undefined)}
|
|
84
|
+
*/
|
|
85
|
+
protected calcDataItemScript(
|
|
86
|
+
dataItem: IDETreeNodeDataItem,
|
|
87
|
+
): string | undefined {
|
|
88
|
+
if (dataItem.customCode && dataItem.scriptCode) {
|
|
89
|
+
return ScriptFactory.execScriptFn(
|
|
90
|
+
{ data: this.deData },
|
|
91
|
+
dataItem.scriptCode,
|
|
92
|
+
) as string;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* 计算节点文本html内容
|
|
98
|
+
* @author lxm
|
|
99
|
+
* @date 2023-08-15 02:41:31
|
|
100
|
+
* @protected
|
|
101
|
+
* @param {IDETreeDataSetNode} model
|
|
102
|
+
* @return {*} {(string | undefined)}
|
|
103
|
+
*/
|
|
104
|
+
protected calcTextHtml(model: IDETreeDataSetNode): string | undefined {
|
|
105
|
+
let html: string | undefined;
|
|
106
|
+
const { detreeNodeDataItems } = model;
|
|
107
|
+
const textDataItem = detreeNodeDataItems?.find(item => item.id === 'text');
|
|
108
|
+
if (textDataItem) {
|
|
109
|
+
html = this.calcDataItemScript(textDataItem);
|
|
110
|
+
}
|
|
111
|
+
return html;
|
|
54
112
|
}
|
|
55
113
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IDETreeNode } from '@ibiz/model-core';
|
|
2
|
-
import { ITreeNodeData } from '../../../interface';
|
|
2
|
+
import { IIcon, ITreeNodeData } from '../../../interface';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* 树节点数据基类
|
|
@@ -33,6 +33,10 @@ export abstract class TreeNodeData implements ITreeNodeData {
|
|
|
33
33
|
|
|
34
34
|
parent?: ITreeNodeData;
|
|
35
35
|
|
|
36
|
+
icon?: IIcon;
|
|
37
|
+
|
|
38
|
+
textHtml?: string;
|
|
39
|
+
|
|
36
40
|
constructor(
|
|
37
41
|
model: IDETreeNode,
|
|
38
42
|
parentNodeData: ITreeNodeData | undefined,
|
|
@@ -56,7 +60,27 @@ export abstract class TreeNodeData implements ITreeNodeData {
|
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
this.nodeId = model.id!;
|
|
59
|
-
|
|
60
|
-
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* 计算节点图标
|
|
67
|
+
* @author lxm
|
|
68
|
+
* @date 2023-08-15 02:24:55
|
|
69
|
+
* @protected
|
|
70
|
+
* @param {IDETreeNode} model
|
|
71
|
+
* @return {*} {(IIcon | undefined)}
|
|
72
|
+
*/
|
|
73
|
+
protected calcIcon(model: IDETreeNode): IIcon | undefined {
|
|
74
|
+
const { sysImage } = model;
|
|
75
|
+
const icon: IIcon = {};
|
|
76
|
+
if (sysImage) {
|
|
77
|
+
if (sysImage.cssClass) {
|
|
78
|
+
icon.cssClass = sysImage.cssClass;
|
|
79
|
+
}
|
|
80
|
+
if (sysImage.imagePath) {
|
|
81
|
+
icon.imagePath = sysImage.imagePath;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return Object.values(icon).length > 0 ? icon : undefined;
|
|
61
85
|
}
|
|
62
86
|
}
|
package/src/types.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { I18n } from '@ibiz-template/core/src/interface';
|
|
1
2
|
import { EngineFactory } from './engine';
|
|
2
3
|
import { GlobalUtil } from './global';
|
|
3
4
|
import {
|
|
@@ -5,15 +6,16 @@ import {
|
|
|
5
6
|
INotificationUtil,
|
|
6
7
|
IOpenViewUtil,
|
|
7
8
|
IModalUtil,
|
|
9
|
+
IConfirmUtil,
|
|
8
10
|
ILoadingUtil,
|
|
9
11
|
IPluginFactory,
|
|
10
12
|
IOverlayController,
|
|
11
13
|
IGlobalConfig,
|
|
12
14
|
IAppHubService,
|
|
15
|
+
IAuthService,
|
|
13
16
|
} from './interface';
|
|
14
17
|
import { LogicSchedulerCenter } from './logic-scheduler';
|
|
15
18
|
import { RegisterCenter } from './register/register-center';
|
|
16
|
-
import { AuthService } from './service';
|
|
17
19
|
|
|
18
20
|
declare module '@ibiz-template/core' {
|
|
19
21
|
interface IBizSys {
|
|
@@ -45,6 +47,16 @@ declare module '@ibiz-template/core' {
|
|
|
45
47
|
*/
|
|
46
48
|
modal: IModalUtil;
|
|
47
49
|
|
|
50
|
+
/**
|
|
51
|
+
* 确认框
|
|
52
|
+
*
|
|
53
|
+
* @description 需要用户确认收到提示消息时使用此工具
|
|
54
|
+
* @author chitanda
|
|
55
|
+
* @date 2022-08-17 16:08:10
|
|
56
|
+
* @type {IConfirmUtil}
|
|
57
|
+
*/
|
|
58
|
+
confirm: IConfirmUtil;
|
|
59
|
+
|
|
48
60
|
/**
|
|
49
61
|
* 消息通知
|
|
50
62
|
*
|
|
@@ -116,9 +128,9 @@ declare module '@ibiz-template/core' {
|
|
|
116
128
|
*
|
|
117
129
|
* @author chitanda
|
|
118
130
|
* @date 2022-07-20 10:07:33
|
|
119
|
-
* @type {
|
|
131
|
+
* @type {IAuthService}
|
|
120
132
|
*/
|
|
121
|
-
auth:
|
|
133
|
+
auth: IAuthService;
|
|
122
134
|
|
|
123
135
|
/**
|
|
124
136
|
* 引擎工厂
|
|
@@ -137,6 +149,15 @@ declare module '@ibiz-template/core' {
|
|
|
137
149
|
*/
|
|
138
150
|
util: GlobalUtil;
|
|
139
151
|
|
|
152
|
+
/**
|
|
153
|
+
* 多语言
|
|
154
|
+
*
|
|
155
|
+
* @author chitanda
|
|
156
|
+
* @date 2023-08-11 16:08:15
|
|
157
|
+
* @type {I18n}
|
|
158
|
+
*/
|
|
159
|
+
i18n: I18n;
|
|
160
|
+
|
|
140
161
|
/**
|
|
141
162
|
* 逻辑调度中心
|
|
142
163
|
* @author lxm
|
|
@@ -93,7 +93,7 @@ export class FrontUIActionProvider extends UIActionProviderBase {
|
|
|
93
93
|
const result = ScriptFactory.execScriptFn(
|
|
94
94
|
{ context, params, data, el: event?.target },
|
|
95
95
|
scriptCode,
|
|
96
|
-
);
|
|
96
|
+
) as IUIActionResult | undefined;
|
|
97
97
|
return result || {};
|
|
98
98
|
}
|
|
99
99
|
throw new RuntimeModelError(action, '自定义类型缺少配置脚本代码');
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { RuntimeModelError } from '@ibiz-template/core';
|
|
2
|
+
import { IDEUIBindParamLogic } from '@ibiz/model-core';
|
|
3
|
+
import { UILogicContext } from '../../ui-logic-context';
|
|
4
|
+
import { handleSrcVal } from '../../utils';
|
|
5
|
+
import { UILogicNode } from '../ui-logic-node';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 绑定参数
|
|
9
|
+
*
|
|
10
|
+
* @author lxm
|
|
11
|
+
* @date 2023-02-09 21:02:20
|
|
12
|
+
* @export
|
|
13
|
+
* @class BindParamNode
|
|
14
|
+
* @extends {UILogicNode}
|
|
15
|
+
*/
|
|
16
|
+
export class BindParamNode extends UILogicNode {
|
|
17
|
+
declare model: IDEUIBindParamLogic;
|
|
18
|
+
|
|
19
|
+
async exec(ctx: UILogicContext): Promise<void> {
|
|
20
|
+
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
21
|
+
if (!dstDEUILogicParamId || !srcDEUILogicParamId) {
|
|
22
|
+
throw new RuntimeModelError(
|
|
23
|
+
this.model,
|
|
24
|
+
'缺少目标参数对象或者源参数对象配置',
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
const srcVal = handleSrcVal(ctx, this.model);
|
|
28
|
+
ctx.params[dstDEUILogicParamId] = srcVal;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -5,3 +5,4 @@ export { EndNode } from './end-node/end-node';
|
|
|
5
5
|
export { PrepareJSParamNode } from './prepare-js-param-node/prepare-js-param-node';
|
|
6
6
|
export { UILogicNode } from './ui-logic-node';
|
|
7
7
|
export { ViewCtrlInvokeNode } from './view-ctrl-invoke-node/view-ctrl-invoke-node';
|
|
8
|
+
export { BindParamNode } from './bind-param-node/bind-param-node';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ModelError,
|
|
1
|
+
import { ModelError, RuntimeModelError } from '@ibiz-template/core';
|
|
2
2
|
import { IDEUILogicParam } from '@ibiz/model-core';
|
|
3
3
|
import { UILogicContext } from '../ui-logic-context';
|
|
4
4
|
|
|
@@ -46,7 +46,10 @@ export class UILogicParam {
|
|
|
46
46
|
if (control) {
|
|
47
47
|
ctx.params[tag] = control;
|
|
48
48
|
} else {
|
|
49
|
-
throw new
|
|
49
|
+
throw new RuntimeModelError(
|
|
50
|
+
this.model,
|
|
51
|
+
`视图逻辑初始化参数,未找到${m.codeName!}指定部件对象`,
|
|
52
|
+
);
|
|
50
53
|
}
|
|
51
54
|
} else if (m.activeViewParam) {
|
|
52
55
|
// 当前视图
|
package/src/ui-logic/ui-logic.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { IDEUILogic } from '@ibiz/model-core';
|
|
|
4
4
|
import { IUILogicParams } from '../interface';
|
|
5
5
|
import { UILogicContext } from './ui-logic-context';
|
|
6
6
|
import {
|
|
7
|
+
BindParamNode,
|
|
7
8
|
DEActionNode,
|
|
8
9
|
DEUIActionNode,
|
|
9
10
|
EndNode,
|
|
@@ -72,12 +73,14 @@ export class UILogic {
|
|
|
72
73
|
case 'PREPAREJSPARAM': // 准备参数
|
|
73
74
|
logicNode = new PrepareJSParamNode(node);
|
|
74
75
|
break;
|
|
75
|
-
case 'RESETPARAM': // 重置参数
|
|
76
|
-
case 'COPYPARAM': // 拷贝参数
|
|
77
76
|
case 'BINDPARAM': // 绑定参数
|
|
77
|
+
logicNode = new BindParamNode(node);
|
|
78
|
+
break;
|
|
78
79
|
case 'VIEWCTRLINVOKE': // 视图部件调用
|
|
79
80
|
logicNode = new ViewCtrlInvokeNode(node);
|
|
80
81
|
break;
|
|
82
|
+
case 'RESETPARAM': // 重置参数
|
|
83
|
+
case 'COPYPARAM': // 拷贝参数
|
|
81
84
|
case 'VIEWCTRLFIREEVENT': // 视图部件事件触发
|
|
82
85
|
case 'APPENDPARAM': // 附加到数组参数
|
|
83
86
|
case 'SORTPARAM': // 排序数组参数
|
|
@@ -34,13 +34,10 @@ export function handleSrcVal(
|
|
|
34
34
|
ctx: UILogicContext,
|
|
35
35
|
srcValParams: SrcValParams,
|
|
36
36
|
): unknown {
|
|
37
|
-
const { srcDEUILogicParamId,
|
|
38
|
-
srcValParams;
|
|
39
|
-
|
|
37
|
+
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
40
38
|
// 没有源值类型就是逻辑参数
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
39
|
+
const srcValueType = srcValParams.srcValueType || 'SRCDLPARAM';
|
|
40
|
+
|
|
44
41
|
let value: unknown;
|
|
45
42
|
switch (srcValueType) {
|
|
46
43
|
// 源逻辑参数
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import { RuntimeError, RuntimeModelError } from '@ibiz-template/core';
|
|
8
8
|
import { isNilOrEmpty, notNilEmpty } from 'qx-util';
|
|
9
9
|
import qs from 'qs';
|
|
10
|
-
import { IModalData } from '../../interface';
|
|
10
|
+
import { IModalData, IOpenViewOptions } from '../../interface';
|
|
11
11
|
import { OpenAppViewCommand } from '../../command';
|
|
12
12
|
import { convertNavData } from '../nav-params/nav-params';
|
|
13
13
|
import { calcDeCodeNameById, findFieldById } from '../../model';
|
|
@@ -28,13 +28,13 @@ export async function openRedirectView(
|
|
|
28
28
|
appView: IAppRedirectView,
|
|
29
29
|
context: IContext,
|
|
30
30
|
params: IParams = {},
|
|
31
|
-
|
|
31
|
+
opts: IOpenViewOptions = {},
|
|
32
32
|
): Promise<IModalData> {
|
|
33
33
|
return openDERedirectView(
|
|
34
34
|
appView as IAppDERedirectView,
|
|
35
35
|
context,
|
|
36
36
|
params,
|
|
37
|
-
|
|
37
|
+
opts,
|
|
38
38
|
);
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -52,6 +52,7 @@ export async function openRedirectView(
|
|
|
52
52
|
export async function toLocalOpenWFRedirectView(
|
|
53
53
|
context: IContext,
|
|
54
54
|
linkUrl: string,
|
|
55
|
+
opts: IOpenViewOptions = {},
|
|
55
56
|
): Promise<void> {
|
|
56
57
|
const i = linkUrl.lastIndexOf('?');
|
|
57
58
|
const queryStr: string = decodeURIComponent(
|
|
@@ -102,6 +103,7 @@ export async function toLocalOpenWFRedirectView(
|
|
|
102
103
|
deRdView.id,
|
|
103
104
|
context,
|
|
104
105
|
params,
|
|
106
|
+
opts,
|
|
105
107
|
);
|
|
106
108
|
}
|
|
107
109
|
|
|
@@ -121,7 +123,7 @@ export async function openDERedirectView(
|
|
|
121
123
|
appView: IAppDERedirectView,
|
|
122
124
|
context: IContext,
|
|
123
125
|
params: IParams = {},
|
|
124
|
-
|
|
126
|
+
opts: IOpenViewOptions = {},
|
|
125
127
|
): Promise<IModalData> {
|
|
126
128
|
// 计算重定向视图上下文参数转换
|
|
127
129
|
const navContext = appView.appViewNavContexts || [];
|
|
@@ -135,7 +137,7 @@ export async function openDERedirectView(
|
|
|
135
137
|
// 重定向视图对应应用实体
|
|
136
138
|
const entityId = appView.appDataEntityId!;
|
|
137
139
|
const key = calcDeCodeNameById(entityId);
|
|
138
|
-
let curData: IData = data[0] || {};
|
|
140
|
+
let curData: IData = opts.data?.[0] || {};
|
|
139
141
|
// 将数据主键转换到上下文当中
|
|
140
142
|
context[key] = curData[key] || context[key] || params[key];
|
|
141
143
|
// 实体重定向视图获取数据行为
|
|
@@ -171,7 +173,7 @@ export async function openDERedirectView(
|
|
|
171
173
|
});
|
|
172
174
|
}
|
|
173
175
|
if (linkUrl.startsWith('appredirectview?')) {
|
|
174
|
-
await toLocalOpenWFRedirectView(context, linkUrl);
|
|
176
|
+
await toLocalOpenWFRedirectView(context, linkUrl, opts);
|
|
175
177
|
return { ok: true, data: [] };
|
|
176
178
|
}
|
|
177
179
|
return { ok: false, data: [] };
|
|
@@ -191,10 +193,9 @@ export async function openDERedirectView(
|
|
|
191
193
|
// 所有重定向引用视图
|
|
192
194
|
const allRefViews = appView.redirectAppViewRefs;
|
|
193
195
|
const refView = allRefViews?.find(view => {
|
|
196
|
+
const matchKey = view.name || view.id;
|
|
194
197
|
// 特殊补充 wfRdTag 匹配,子流程应用特殊模式
|
|
195
|
-
return
|
|
196
|
-
view.name === deRdTag || view.name === rdTag || view.name === wfRdTag
|
|
197
|
-
);
|
|
198
|
+
return matchKey === deRdTag || matchKey === rdTag || matchKey === wfRdTag;
|
|
198
199
|
});
|
|
199
200
|
if (refView) {
|
|
200
201
|
const viewId = refView.refAppViewId;
|
|
@@ -204,7 +205,7 @@ export async function openDERedirectView(
|
|
|
204
205
|
viewId,
|
|
205
206
|
context,
|
|
206
207
|
params,
|
|
207
|
-
{ data: [curData] },
|
|
208
|
+
{ ...opts, data: [curData] },
|
|
208
209
|
);
|
|
209
210
|
if (result) {
|
|
210
211
|
return result;
|
|
@@ -248,16 +249,6 @@ export async function calcDERdTag(
|
|
|
248
249
|
data: IData,
|
|
249
250
|
): Promise<string> {
|
|
250
251
|
let rdTag = '';
|
|
251
|
-
const defView = `${ibiz.env.isMob ? 'MOB' : ''}EDITVIEW`;
|
|
252
|
-
// 如果流程步骤存在,按照工作流优先
|
|
253
|
-
const srfWf = params.srfwf;
|
|
254
|
-
if (notNilEmpty(srfWf)) {
|
|
255
|
-
if (notNilEmpty(params.wf)) {
|
|
256
|
-
return `${defView}:${srfWf.toUpperCase()}:${params.wf.toUpperCase()}`;
|
|
257
|
-
}
|
|
258
|
-
return `${defView}:${srfWf.toUpperCase()}`;
|
|
259
|
-
}
|
|
260
|
-
let typeValue = '';
|
|
261
252
|
// 重定向视图自定义类别属性
|
|
262
253
|
const typeFieldId = rdView.typeAppDEFieldId;
|
|
263
254
|
// 自定义重定向
|
|
@@ -265,15 +256,27 @@ export async function calcDERdTag(
|
|
|
265
256
|
const { codeName } = findFieldById(entity, typeFieldId)!;
|
|
266
257
|
const value = data[codeName!.toLowerCase()];
|
|
267
258
|
if (notNilEmpty(value)) {
|
|
268
|
-
|
|
259
|
+
return `${value}`;
|
|
269
260
|
}
|
|
261
|
+
ibiz.log.warn(
|
|
262
|
+
`重定向视图[${rdView.name}]自定义类别属性[${typeFieldId}]值为空`,
|
|
263
|
+
data,
|
|
264
|
+
);
|
|
270
265
|
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
266
|
+
const defView = `${ibiz.env.isMob ? 'MOB' : ''}EDITVIEW`;
|
|
267
|
+
// 如果流程步骤存在,按照工作流优先
|
|
268
|
+
const srfWf = params.srfwf;
|
|
269
|
+
if (notNilEmpty(srfWf)) {
|
|
270
|
+
if (notNilEmpty(params.wf)) {
|
|
271
|
+
return `${defView}:${srfWf.toUpperCase()}:${params.wf.toUpperCase()}`;
|
|
276
272
|
}
|
|
273
|
+
return `${defView}:${srfWf.toUpperCase()}`;
|
|
274
|
+
}
|
|
275
|
+
let typeValue = '';
|
|
276
|
+
// 从索引属性获取重定向视图类型
|
|
277
|
+
if (entity.indexTypeAppDEFieldId) {
|
|
278
|
+
const { codeName } = findFieldById(entity, entity.indexTypeAppDEFieldId)!;
|
|
279
|
+
typeValue = data[codeName!.toLowerCase()];
|
|
277
280
|
}
|
|
278
281
|
if (isNilOrEmpty(typeValue)) {
|
|
279
282
|
// 从多表单属性判断重定向视图类型
|
|
@@ -283,7 +286,7 @@ export async function calcDERdTag(
|
|
|
283
286
|
}
|
|
284
287
|
}
|
|
285
288
|
if (notNilEmpty(typeValue)) {
|
|
286
|
-
rdTag = `${defView}:${typeValue.toUpperCase()}`;
|
|
289
|
+
rdTag = `${defView}:${typeValue.toString().toUpperCase()}`;
|
|
287
290
|
} else {
|
|
288
291
|
rdTag = `${defView}`;
|
|
289
292
|
}
|
|
@@ -25,7 +25,10 @@ export class ScriptFunction {
|
|
|
25
25
|
this.options = options;
|
|
26
26
|
const code = this.formatCode(scriptCode, options);
|
|
27
27
|
this.calcArgKeys(argKeys, options);
|
|
28
|
-
|
|
28
|
+
const fn = new Function(...this.argKeys, code);
|
|
29
|
+
this.scriptFn = function callBack(...args: unknown[]): unknown {
|
|
30
|
+
return fn.apply({}, args);
|
|
31
|
+
};
|
|
29
32
|
}
|
|
30
33
|
|
|
31
34
|
/**
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { IHttpResponse } from '@ibiz-template/core';
|
|
2
|
-
/**
|
|
3
|
-
* 认证服务
|
|
4
|
-
*
|
|
5
|
-
* @author chitanda
|
|
6
|
-
* @date 2022-07-19 18:07:51
|
|
7
|
-
* @export
|
|
8
|
-
* @class AuthService
|
|
9
|
-
*/
|
|
10
|
-
export declare class AuthService {
|
|
11
|
-
/**
|
|
12
|
-
* v7 uaa 登录
|
|
13
|
-
*
|
|
14
|
-
* @author chitanda
|
|
15
|
-
* @date 2022-07-19 18:07:54
|
|
16
|
-
* @param {string} loginname
|
|
17
|
-
* @param {string} password
|
|
18
|
-
* @return {*} {Promise<IHttpResponse>}
|
|
19
|
-
*/
|
|
20
|
-
v7login(loginname: string, password: string): Promise<IHttpResponse>;
|
|
21
|
-
/**
|
|
22
|
-
* v7 uaa 登出
|
|
23
|
-
*
|
|
24
|
-
* @author chitanda
|
|
25
|
-
* @date 2022-09-14 18:07:54
|
|
26
|
-
* @return {*} {Promise<IHttpResponse>}
|
|
27
|
-
*/
|
|
28
|
-
v7logout(): Promise<IHttpResponse>;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=auth.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.service.d.ts","sourceRoot":"","sources":["../../../../src/service/service/auth/auth.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD;;;;;;;GAOG;AACH,qBAAa,WAAW;IACtB;;;;;;;;OAQG;IACG,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAa1E;;;;;;OAMG;IACG,QAAQ,IAAI,OAAO,CAAC,aAAa,CAAC;CAIzC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 认证服务
|
|
3
|
-
*
|
|
4
|
-
* @author chitanda
|
|
5
|
-
* @date 2022-07-19 18:07:51
|
|
6
|
-
* @export
|
|
7
|
-
* @class AuthService
|
|
8
|
-
*/
|
|
9
|
-
export class AuthService {
|
|
10
|
-
/**
|
|
11
|
-
* v7 uaa 登录
|
|
12
|
-
*
|
|
13
|
-
* @author chitanda
|
|
14
|
-
* @date 2022-07-19 18:07:54
|
|
15
|
-
* @param {string} loginname
|
|
16
|
-
* @param {string} password
|
|
17
|
-
* @return {*} {Promise<IHttpResponse>}
|
|
18
|
-
*/
|
|
19
|
-
async v7login(loginname, password) {
|
|
20
|
-
const res = await ibiz.net.post('/v7/login', { loginname, password }, {}, {
|
|
21
|
-
// sass 模式下,注册在 sassMgr 管理平台的应用中心系统标识
|
|
22
|
-
// srfdcsystem: ibiz.env.dcSystem,
|
|
23
|
-
});
|
|
24
|
-
return res;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* v7 uaa 登出
|
|
28
|
-
*
|
|
29
|
-
* @author chitanda
|
|
30
|
-
* @date 2022-09-14 18:07:54
|
|
31
|
-
* @return {*} {Promise<IHttpResponse>}
|
|
32
|
-
*/
|
|
33
|
-
async v7logout() {
|
|
34
|
-
const res = await ibiz.net.get('/v7/logout', {});
|
|
35
|
-
return res;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { IHttpResponse } from '@ibiz-template/core';
|
|
2
|
-
/**
|
|
3
|
-
* 认证服务
|
|
4
|
-
*
|
|
5
|
-
* @author chitanda
|
|
6
|
-
* @date 2022-07-19 18:07:51
|
|
7
|
-
* @export
|
|
8
|
-
* @class AuthService
|
|
9
|
-
*/
|
|
10
|
-
export class AuthService {
|
|
11
|
-
/**
|
|
12
|
-
* v7 uaa 登录
|
|
13
|
-
*
|
|
14
|
-
* @author chitanda
|
|
15
|
-
* @date 2022-07-19 18:07:54
|
|
16
|
-
* @param {string} loginname
|
|
17
|
-
* @param {string} password
|
|
18
|
-
* @return {*} {Promise<IHttpResponse>}
|
|
19
|
-
*/
|
|
20
|
-
async v7login(loginname: string, password: string): Promise<IHttpResponse> {
|
|
21
|
-
const res = await ibiz.net.post(
|
|
22
|
-
'/v7/login',
|
|
23
|
-
{ loginname, password },
|
|
24
|
-
{},
|
|
25
|
-
{
|
|
26
|
-
// sass 模式下,注册在 sassMgr 管理平台的应用中心系统标识
|
|
27
|
-
// srfdcsystem: ibiz.env.dcSystem,
|
|
28
|
-
},
|
|
29
|
-
);
|
|
30
|
-
return res;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* v7 uaa 登出
|
|
35
|
-
*
|
|
36
|
-
* @author chitanda
|
|
37
|
-
* @date 2022-09-14 18:07:54
|
|
38
|
-
* @return {*} {Promise<IHttpResponse>}
|
|
39
|
-
*/
|
|
40
|
-
async v7logout(): Promise<IHttpResponse> {
|
|
41
|
-
const res = await ibiz.net.get('/v7/logout', {});
|
|
42
|
-
return res;
|
|
43
|
-
}
|
|
44
|
-
}
|