@ibiz-template/runtime 0.1.5 → 0.1.7
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 +188 -85
- 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/controller/common/base.controller.js +1 -1
- package/out/controller/common/control/control.controller.js +1 -1
- package/out/controller/common/control/md-control.controller.js +1 -1
- 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/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-nav-view-msg/i-nav-view-msg.d.ts +45 -0
- package/out/interface/controller/common/i-nav-view-msg/i-nav-view-msg.d.ts.map +1 -0
- package/out/interface/controller/common/i-nav-view-msg/i-nav-view-msg.js +1 -0
- package/out/interface/controller/common/index.d.ts +1 -0
- package/out/interface/controller/common/index.d.ts.map +1 -1
- package/out/interface/controller/common/index.js +1 -0
- package/out/interface/controller/controller/control/i-exp-bar-control.controller.d.ts +11 -0
- package/out/interface/controller/controller/control/i-exp-bar-control.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-tree-exp-bar.controller.d.ts +0 -11
- package/out/interface/controller/controller/control/i-tree-exp-bar.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/panel-item/i-panel-item-nav-pos.controller.d.ts +1 -46
- package/out/interface/controller/controller/control/panel-item/i-panel-item-nav-pos.controller.d.ts.map +1 -1
- package/out/interface/controller/event/argument/control-trigger.event.d.ts +33 -0
- package/out/interface/controller/event/argument/control-trigger.event.d.ts.map +1 -0
- package/out/interface/controller/event/argument/control-trigger.event.js +1 -0
- package/out/interface/controller/event/argument/index.d.ts +2 -0
- package/out/interface/controller/event/argument/index.d.ts.map +1 -1
- package/out/interface/controller/event/argument/nav-view-change.event.d.ts +20 -0
- package/out/interface/controller/event/argument/nav-view-change.event.d.ts.map +1 -0
- package/out/interface/controller/event/argument/nav-view-change.event.js +1 -0
- package/out/interface/controller/event/control/i-exp-bar-control.event.d.ts +11 -0
- package/out/interface/controller/event/control/i-exp-bar-control.event.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-panel.event.d.ts +15 -1
- package/out/interface/controller/event/control/i-panel.event.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-tab-exp-panel.event.d.ts +11 -0
- package/out/interface/controller/event/control/i-tab-exp-panel.event.d.ts.map +1 -1
- package/out/interface/controller/work-flow/wf-link.d.ts +4 -4
- 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/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/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/service/dto/method.dto.d.ts.map +1 -1
- package/out/service/dto/method.dto.js +3 -9
- 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/types.d.ts +19 -1
- 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 +10 -9
- package/out/utils/wf-helper/wf-helper.js +2 -2
- package/package.json +3 -3
- package/src/command/app/open-app-view/open-app-view.ts +8 -5
- package/src/controller/common/base.controller.ts +1 -1
- package/src/controller/common/control/control.controller.ts +1 -1
- package/src/controller/common/control/md-control.controller.ts +1 -1
- package/src/controller/common/view/view.controller.ts +16 -3
- package/src/controller/ctx/ctx.ts +1 -1
- 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-nav-view-msg/i-nav-view-msg.ts +48 -0
- package/src/interface/controller/common/index.ts +1 -0
- package/src/interface/controller/controller/control/i-exp-bar-control.controller.ts +12 -0
- package/src/interface/controller/controller/control/i-tree-exp-bar.controller.ts +1 -17
- package/src/interface/controller/controller/control/panel-item/i-panel-item-nav-pos.controller.ts +1 -52
- package/src/interface/controller/event/argument/control-trigger.event.ts +35 -0
- package/src/interface/controller/event/argument/index.ts +2 -0
- package/src/interface/controller/event/argument/nav-view-change.event.ts +20 -0
- package/src/interface/controller/event/control/i-exp-bar-control.event.ts +13 -1
- package/src/interface/controller/event/control/i-panel.event.ts +15 -1
- package/src/interface/controller/event/control/i-tab-exp-panel.event.ts +13 -1
- package/src/interface/controller/work-flow/wf-link.ts +4 -4
- 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/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/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/service/dto/method.dto.ts +3 -8
- package/src/service/service/code-list/code-list.service.ts +8 -1
- package/src/types.ts +21 -0
- 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 +10 -8
- package/src/utils/wf-helper/wf-helper.ts +2 -2
package/out/ui-logic/ui-logic.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable no-await-in-loop */
|
|
2
2
|
import { ModelError, RuntimeModelError } from '@ibiz-template/core';
|
|
3
3
|
import { UILogicContext } from './ui-logic-context';
|
|
4
|
-
import { DEActionNode, DEUIActionNode, EndNode, PrepareJSParamNode, StartNode, ViewCtrlInvokeNode, } from './ui-logic-node';
|
|
4
|
+
import { BindParamNode, DEActionNode, DEUIActionNode, EndNode, PrepareJSParamNode, StartNode, ViewCtrlInvokeNode, } from './ui-logic-node';
|
|
5
5
|
import { UILogicParam } from './ui-logic-param/ui-logic-param';
|
|
6
6
|
/**
|
|
7
7
|
* 界面逻辑
|
|
@@ -61,12 +61,14 @@ export class UILogic {
|
|
|
61
61
|
case 'PREPAREJSPARAM': // 准备参数
|
|
62
62
|
logicNode = new PrepareJSParamNode(node);
|
|
63
63
|
break;
|
|
64
|
-
case 'RESETPARAM': // 重置参数
|
|
65
|
-
case 'COPYPARAM': // 拷贝参数
|
|
66
64
|
case 'BINDPARAM': // 绑定参数
|
|
65
|
+
logicNode = new BindParamNode(node);
|
|
66
|
+
break;
|
|
67
67
|
case 'VIEWCTRLINVOKE': // 视图部件调用
|
|
68
68
|
logicNode = new ViewCtrlInvokeNode(node);
|
|
69
69
|
break;
|
|
70
|
+
case 'RESETPARAM': // 重置参数
|
|
71
|
+
case 'COPYPARAM': // 拷贝参数
|
|
70
72
|
case 'VIEWCTRLFIREEVENT': // 视图部件事件触发
|
|
71
73
|
case 'APPENDPARAM': // 附加到数组参数
|
|
72
74
|
case 'SORTPARAM': // 排序数组参数
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle-src-val.d.ts","sourceRoot":"","sources":["../../../src/ui-logic/utils/handle-src-val.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,KAAK,YAAY,GAAG;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,cAAc,EACnB,YAAY,EAAE,YAAY,GACzB,OAAO,
|
|
1
|
+
{"version":3,"file":"handle-src-val.d.ts","sourceRoot":"","sources":["../../../src/ui-logic/utils/handle-src-val.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,KAAK,YAAY,GAAG;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,cAAc,EACnB,YAAY,EAAE,YAAY,GACzB,OAAO,CA4CT"}
|
|
@@ -10,11 +10,9 @@ import { clone } from 'ramda';
|
|
|
10
10
|
* @return {*}
|
|
11
11
|
*/
|
|
12
12
|
export function handleSrcVal(ctx, srcValParams) {
|
|
13
|
-
const { srcDEUILogicParamId,
|
|
13
|
+
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
14
14
|
// 没有源值类型就是逻辑参数
|
|
15
|
-
|
|
16
|
-
srcValParams.srcValueType = 'SRCDLPARAM';
|
|
17
|
-
}
|
|
15
|
+
const srcValueType = srcValParams.srcValueType || 'SRCDLPARAM';
|
|
18
16
|
let value;
|
|
19
17
|
switch (srcValueType) {
|
|
20
18
|
// 源逻辑参数
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IAppDERedirectView, IAppDataEntity, IAppRedirectView } from '@ibiz/model-core';
|
|
2
|
-
import { IModalData } from '../../interface';
|
|
2
|
+
import { IModalData, IOpenViewOptions } from '../../interface';
|
|
3
3
|
/**
|
|
4
4
|
* 打开重定向视图
|
|
5
5
|
*
|
|
@@ -12,7 +12,7 @@ import { IModalData } from '../../interface';
|
|
|
12
12
|
* @param {IData} [data={}]
|
|
13
13
|
* @return {*} {Promise<IModalData>}
|
|
14
14
|
*/
|
|
15
|
-
export declare function openRedirectView(appView: IAppRedirectView, context: IContext, params?: IParams,
|
|
15
|
+
export declare function openRedirectView(appView: IAppRedirectView, context: IContext, params?: IParams, opts?: IOpenViewOptions): Promise<IModalData>;
|
|
16
16
|
/**
|
|
17
17
|
* 本地打开工作流重定向视图
|
|
18
18
|
*
|
|
@@ -24,7 +24,7 @@ export declare function openRedirectView(appView: IAppRedirectView, context: ICo
|
|
|
24
24
|
* @param {IContext} context
|
|
25
25
|
* @param {string} linkUrl
|
|
26
26
|
*/
|
|
27
|
-
export declare function toLocalOpenWFRedirectView(context: IContext, linkUrl: string): Promise<void>;
|
|
27
|
+
export declare function toLocalOpenWFRedirectView(context: IContext, linkUrl: string, opts?: IOpenViewOptions): Promise<void>;
|
|
28
28
|
/**
|
|
29
29
|
* 打开实体重定向视图
|
|
30
30
|
*
|
|
@@ -37,7 +37,7 @@ export declare function toLocalOpenWFRedirectView(context: IContext, linkUrl: st
|
|
|
37
37
|
* @param {IData[]} [data=[]]
|
|
38
38
|
* @return {*} {Promise<IModalData>}
|
|
39
39
|
*/
|
|
40
|
-
export declare function openDERedirectView(appView: IAppDERedirectView, context: IContext, params?: IParams,
|
|
40
|
+
export declare function openDERedirectView(appView: IAppDERedirectView, context: IContext, params?: IParams, opts?: IOpenViewOptions): Promise<IModalData>;
|
|
41
41
|
/**
|
|
42
42
|
* 计算重定向标识
|
|
43
43
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-redirect-view.d.ts","sourceRoot":"","sources":["../../../src/utils/open-redirect-view/open-redirect-view.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"open-redirect-view.d.ts","sourceRoot":"","sources":["../../../src/utils/open-redirect-view/open-redirect-view.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAK/D;;;;;;;;;;;GAWG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,QAAQ,EACjB,MAAM,GAAE,OAAY,EACpB,IAAI,GAAE,gBAAqB,GAC1B,OAAO,CAAC,UAAU,CAAC,CAOrB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,QAAQ,EACjB,OAAO,EAAE,MAAM,EACf,IAAI,GAAE,gBAAqB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAoDf;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,QAAQ,EACjB,MAAM,GAAE,OAAY,EACpB,IAAI,GAAE,gBAAqB,GAC1B,OAAO,CAAC,UAAU,CAAC,CAyGrB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,KAAK,GACV,OAAO,CAAC,MAAM,CAAC,CA0CjB"}
|
|
@@ -16,8 +16,8 @@ import { calcDeCodeNameById, findFieldById } from '../../model';
|
|
|
16
16
|
* @param {IData} [data={}]
|
|
17
17
|
* @return {*} {Promise<IModalData>}
|
|
18
18
|
*/
|
|
19
|
-
export async function openRedirectView(appView, context, params = {},
|
|
20
|
-
return openDERedirectView(appView, context, params,
|
|
19
|
+
export async function openRedirectView(appView, context, params = {}, opts = {}) {
|
|
20
|
+
return openDERedirectView(appView, context, params, opts);
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
23
|
* 本地打开工作流重定向视图
|
|
@@ -30,7 +30,7 @@ export async function openRedirectView(appView, context, params = {}, data = [])
|
|
|
30
30
|
* @param {IContext} context
|
|
31
31
|
* @param {string} linkUrl
|
|
32
32
|
*/
|
|
33
|
-
export async function toLocalOpenWFRedirectView(context, linkUrl) {
|
|
33
|
+
export async function toLocalOpenWFRedirectView(context, linkUrl, opts = {}) {
|
|
34
34
|
const i = linkUrl.lastIndexOf('?');
|
|
35
35
|
const queryStr = decodeURIComponent(linkUrl.substring(i + 1, linkUrl.length));
|
|
36
36
|
const params = qs.parse(queryStr, { delimiter: ';' });
|
|
@@ -65,7 +65,7 @@ export async function toLocalOpenWFRedirectView(context, linkUrl) {
|
|
|
65
65
|
context.srfprocessinstanceid = params.srfprocessinstanceid;
|
|
66
66
|
delete params.srfprocessinstanceid;
|
|
67
67
|
}
|
|
68
|
-
await ibiz.commands.execute(OpenAppViewCommand.TAG, deRdView.id, context, params);
|
|
68
|
+
await ibiz.commands.execute(OpenAppViewCommand.TAG, deRdView.id, context, params, opts);
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
71
71
|
* 打开实体重定向视图
|
|
@@ -79,7 +79,8 @@ export async function toLocalOpenWFRedirectView(context, linkUrl) {
|
|
|
79
79
|
* @param {IData[]} [data=[]]
|
|
80
80
|
* @return {*} {Promise<IModalData>}
|
|
81
81
|
*/
|
|
82
|
-
export async function openDERedirectView(appView, context, params = {},
|
|
82
|
+
export async function openDERedirectView(appView, context, params = {}, opts = {}) {
|
|
83
|
+
var _a;
|
|
83
84
|
// 计算重定向视图上下文参数转换
|
|
84
85
|
const navContext = appView.appViewNavContexts || [];
|
|
85
86
|
const navContextData = convertNavData(navContext, context, params);
|
|
@@ -91,7 +92,7 @@ export async function openDERedirectView(appView, context, params = {}, data = [
|
|
|
91
92
|
// 重定向视图对应应用实体
|
|
92
93
|
const entityId = appView.appDataEntityId;
|
|
93
94
|
const key = calcDeCodeNameById(entityId);
|
|
94
|
-
let curData = data[0] || {};
|
|
95
|
+
let curData = ((_a = opts.data) === null || _a === void 0 ? void 0 : _a[0]) || {};
|
|
95
96
|
// 将数据主键转换到上下文当中
|
|
96
97
|
context[key] = curData[key] || context[key] || params[key];
|
|
97
98
|
// 实体重定向视图获取数据行为
|
|
@@ -125,7 +126,7 @@ export async function openDERedirectView(appView, context, params = {}, data = [
|
|
|
125
126
|
});
|
|
126
127
|
}
|
|
127
128
|
if (linkUrl.startsWith('appredirectview?')) {
|
|
128
|
-
await toLocalOpenWFRedirectView(context, linkUrl);
|
|
129
|
+
await toLocalOpenWFRedirectView(context, linkUrl, opts);
|
|
129
130
|
return { ok: true, data: [] };
|
|
130
131
|
}
|
|
131
132
|
return { ok: false, data: [] };
|
|
@@ -151,7 +152,7 @@ export async function openDERedirectView(appView, context, params = {}, data = [
|
|
|
151
152
|
if (refView) {
|
|
152
153
|
const viewId = refView.refAppViewId;
|
|
153
154
|
if (viewId) {
|
|
154
|
-
const result = await ibiz.commands.execute(OpenAppViewCommand.TAG, viewId, context, params, { data: [curData] });
|
|
155
|
+
const result = await ibiz.commands.execute(OpenAppViewCommand.TAG, viewId, context, params, Object.assign(Object.assign({}, opts), { data: [curData] }));
|
|
155
156
|
if (result) {
|
|
156
157
|
return result;
|
|
157
158
|
}
|
|
@@ -219,7 +220,7 @@ export async function calcDERdTag(entity, rdView, params, data) {
|
|
|
219
220
|
}
|
|
220
221
|
}
|
|
221
222
|
if (notNilEmpty(typeValue)) {
|
|
222
|
-
rdTag = `${defView}:${typeValue.toUpperCase()}`;
|
|
223
|
+
rdTag = `${defView}:${typeValue.toString().toUpperCase()}`;
|
|
223
224
|
}
|
|
224
225
|
else {
|
|
225
226
|
rdTag = `${defView}`;
|
|
@@ -23,11 +23,11 @@ export function getWFContext(data) {
|
|
|
23
23
|
*/
|
|
24
24
|
export function getWFSubmitViewId(view, link) {
|
|
25
25
|
var _a;
|
|
26
|
-
const { type,
|
|
26
|
+
const { type, sequenceflowview, sequenceflowmobview } = link;
|
|
27
27
|
const appViewRefs = ((_a = view.viewLayoutPanel) === null || _a === void 0 ? void 0 : _a.appViewRefs) || view.appViewRefs;
|
|
28
28
|
const key = type
|
|
29
29
|
? `WFUTILACTION@${type.toUpperCase()}`
|
|
30
|
-
: `WFACTION@${ibiz.env.isMob ?
|
|
30
|
+
: `WFACTION@${ibiz.env.isMob ? sequenceflowmobview : sequenceflowview}`;
|
|
31
31
|
const submitViewRef = appViewRefs.find(viewRef => {
|
|
32
32
|
return viewRef.name === key;
|
|
33
33
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/runtime",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "控制器包",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "out/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"author": "chitanda",
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@ibiz-template/core": "^0.1.
|
|
32
|
+
"@ibiz-template/core": "^0.1.7",
|
|
33
33
|
"@ibiz/model-core": "^0.0.14",
|
|
34
34
|
"@types/path-browserify": "^1.0.0",
|
|
35
35
|
"@types/qs": "^6.9.7",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"qx-util": "^0.4.8",
|
|
54
54
|
"ramda": "^0.29.0"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "5e283e6c4cfad7a27402a60f96d4f628bf1dbb1a"
|
|
57
57
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ModelError, RuntimeError } from '@ibiz-template/core';
|
|
2
2
|
import { IAppRedirectView } from '@ibiz/model-core';
|
|
3
|
-
import { IModalData, IViewConfig } from '../../../interface';
|
|
3
|
+
import { IModalData, IOpenViewOptions, IViewConfig } from '../../../interface';
|
|
4
4
|
import { calcDeCodeNameById } from '../../../model';
|
|
5
5
|
import { openRedirectView } from '../../../utils';
|
|
6
6
|
|
|
@@ -34,7 +34,7 @@ export class OpenAppViewCommand {
|
|
|
34
34
|
appViewId: string,
|
|
35
35
|
context: IContext,
|
|
36
36
|
params: IParams = {},
|
|
37
|
-
opts:
|
|
37
|
+
opts: IOpenViewOptions = {},
|
|
38
38
|
): Promise<IModalData | void> {
|
|
39
39
|
const appView = await ibiz.hub.config.view.get(appViewId!);
|
|
40
40
|
if (!appView) {
|
|
@@ -54,7 +54,7 @@ export class OpenAppViewCommand {
|
|
|
54
54
|
fullViewModel as IAppRedirectView,
|
|
55
55
|
context,
|
|
56
56
|
params,
|
|
57
|
-
opts
|
|
57
|
+
opts,
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
60
|
const { openMode = 'INDEXVIEWTAB' } = appView;
|
|
@@ -72,7 +72,7 @@ export class OpenAppViewCommand {
|
|
|
72
72
|
case 'POPUPAPP':
|
|
73
73
|
throw new ModelError(appView, '未支持的视图打开模式: POPUPAPP');
|
|
74
74
|
case 'POPOVER':
|
|
75
|
-
return this.openPopover(appView, opts.event
|
|
75
|
+
return this.openPopover(appView, opts.event!, context, params);
|
|
76
76
|
case 'DRAWER_LEFT':
|
|
77
77
|
case 'DRAWER_RIGHT':
|
|
78
78
|
case 'DRAWER_TOP':
|
|
@@ -135,10 +135,13 @@ export class OpenAppViewCommand {
|
|
|
135
135
|
*/
|
|
136
136
|
protected async openPopover(
|
|
137
137
|
appView: IViewConfig,
|
|
138
|
-
event: MouseEvent,
|
|
138
|
+
event: MouseEvent | undefined,
|
|
139
139
|
context: IContext,
|
|
140
140
|
params: IParams = {},
|
|
141
141
|
): Promise<IModalData> {
|
|
142
|
+
if (!event) {
|
|
143
|
+
throw new RuntimeError('气泡打开缺少event');
|
|
144
|
+
}
|
|
142
145
|
return ibiz.openView.popover(appView, event, context, params);
|
|
143
146
|
}
|
|
144
147
|
|
|
@@ -200,7 +200,7 @@ export class BaseController<
|
|
|
200
200
|
async destroyed(): Promise<void> {
|
|
201
201
|
await this.onDestroyed();
|
|
202
202
|
ibiz.log.debug(`${this.constructor.name}:${this.name} onDestroyed`);
|
|
203
|
-
this._evt.emit('onDestroyed', undefined);
|
|
203
|
+
await this._evt.emit('onDestroyed', undefined);
|
|
204
204
|
this.evt.destroy();
|
|
205
205
|
}
|
|
206
206
|
|
|
@@ -252,9 +252,12 @@ export class ViewController<
|
|
|
252
252
|
this.scheduler.defaultParamsCb = (): IUILogicParams => {
|
|
253
253
|
return this.getEventArgs();
|
|
254
254
|
};
|
|
255
|
-
this.
|
|
256
|
-
|
|
257
|
-
|
|
255
|
+
if (this.scheduler.hasViewEventTrigger) {
|
|
256
|
+
// 监听视图事件触发视图事件触发器
|
|
257
|
+
this.evt.onAll((_eventName, event) => {
|
|
258
|
+
this.scheduler!.triggerViewEvent(event);
|
|
259
|
+
});
|
|
260
|
+
}
|
|
258
261
|
}
|
|
259
262
|
|
|
260
263
|
// 执行视图引擎的doCreated
|
|
@@ -380,5 +383,15 @@ export class ViewController<
|
|
|
380
383
|
this.mountCounter.attend(this.layoutPanel!.model.name!);
|
|
381
384
|
});
|
|
382
385
|
}
|
|
386
|
+
|
|
387
|
+
if (this.scheduler?.hasControlEventTrigger) {
|
|
388
|
+
// 监听部件事件触发部件事件触发器
|
|
389
|
+
panel.evt.on('onControlEvent', event => {
|
|
390
|
+
this.scheduler!.triggerControlEvent(
|
|
391
|
+
event.triggerControlName,
|
|
392
|
+
event.triggerEvent,
|
|
393
|
+
);
|
|
394
|
+
});
|
|
395
|
+
}
|
|
383
396
|
}
|
|
384
397
|
}
|
|
@@ -48,7 +48,7 @@ export class CTX<V extends IViewController = IViewController> {
|
|
|
48
48
|
* @date 2023-04-26 07:54:46
|
|
49
49
|
* @protected
|
|
50
50
|
*/
|
|
51
|
-
readonly evt = new QXEvent<CTXEvent>();
|
|
51
|
+
readonly evt = new QXEvent<CTXEvent>(3000);
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* 当前视图控制器集合(包含自身视图控制器,部件控制器,和下一层级的视图的控制器)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 打开视图额外参数
|
|
3
|
+
* @author lxm
|
|
4
|
+
* @date 2023-08-14 11:46:55
|
|
5
|
+
* @export
|
|
6
|
+
* @interface IOpenViewOptions
|
|
7
|
+
*/
|
|
8
|
+
export interface IOpenViewOptions {
|
|
9
|
+
/**
|
|
10
|
+
* 打开方式
|
|
11
|
+
* @author lxm
|
|
12
|
+
* @date 2023-08-14 01:40:27
|
|
13
|
+
* @type {string}
|
|
14
|
+
*/
|
|
15
|
+
openMode?: string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 不等待路由打开
|
|
19
|
+
* @author lxm
|
|
20
|
+
* @date 2023-07-28 02:23:13
|
|
21
|
+
* @type {boolean}
|
|
22
|
+
*/
|
|
23
|
+
noWaitRoute?: boolean;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 数据集合
|
|
27
|
+
* @author lxm
|
|
28
|
+
* @date 2023-08-14 01:40:14
|
|
29
|
+
* @type {IData[]}
|
|
30
|
+
*/
|
|
31
|
+
data?: IData[];
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 原生js事件
|
|
35
|
+
* @author lxm
|
|
36
|
+
* @date 2023-08-14 04:22:06
|
|
37
|
+
* @type {MouseEvent}
|
|
38
|
+
*/
|
|
39
|
+
event?: MouseEvent;
|
|
40
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 导航视图需要使用到的相关信息
|
|
3
|
+
* @author lxm
|
|
4
|
+
* @date 2023-08-10 05:46:21
|
|
5
|
+
* @export
|
|
6
|
+
* @interface INavViewMsg
|
|
7
|
+
*/
|
|
8
|
+
export interface INavViewMsg {
|
|
9
|
+
/**
|
|
10
|
+
* 视图唯一标识
|
|
11
|
+
* @author lxm
|
|
12
|
+
* @date 2023-05-25 07:01:28
|
|
13
|
+
* @type {string}
|
|
14
|
+
*/
|
|
15
|
+
key: string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 最新的路由全路径
|
|
19
|
+
* @author lxm
|
|
20
|
+
* @date 2023-05-25 07:03:29
|
|
21
|
+
* @type {string}
|
|
22
|
+
*/
|
|
23
|
+
fullPath?: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 上下文
|
|
27
|
+
* @author lxm
|
|
28
|
+
* @date 2023-05-25 07:04:39
|
|
29
|
+
* @type {IContext}
|
|
30
|
+
*/
|
|
31
|
+
context?: IContext;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 视图参数
|
|
35
|
+
* @author lxm
|
|
36
|
+
* @date 2023-05-25 07:04:38
|
|
37
|
+
* @type {IParams}
|
|
38
|
+
*/
|
|
39
|
+
params?: IParams;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* 视图模型
|
|
43
|
+
* @author lxm
|
|
44
|
+
* @date 2023-05-25 07:06:33
|
|
45
|
+
* @type {IAppView}
|
|
46
|
+
*/
|
|
47
|
+
viewId?: string;
|
|
48
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IExpBar } from '@ibiz/model-core';
|
|
2
|
+
import { INavViewMsg } from '../../common';
|
|
2
3
|
import { IExpBarControlEvent } from '../../event';
|
|
3
4
|
import { IExpBarControlState } from '../../state';
|
|
4
5
|
import { IControlController } from './i-control.controller';
|
|
@@ -45,4 +46,15 @@ export interface IExpBarControlController<
|
|
|
45
46
|
* @memberof IExpBarControlController
|
|
46
47
|
*/
|
|
47
48
|
load(): Promise<IData[]>;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 获取导航视图消息
|
|
52
|
+
*
|
|
53
|
+
* @author zk
|
|
54
|
+
* @date 2023-08-04 08:08:27
|
|
55
|
+
* @param {IData[]} data
|
|
56
|
+
* @return {*} {(INavViewMsg | undefined)}
|
|
57
|
+
* @memberof ITreeExpBarController
|
|
58
|
+
*/
|
|
59
|
+
getNavViewMsg(data: IData, context: IContext, params: IParams): INavViewMsg;
|
|
48
60
|
}
|
|
@@ -2,7 +2,6 @@ import { ITreeExpBar } from '@ibiz/model-core';
|
|
|
2
2
|
import { ITreeExpBarEvent } from '../../event';
|
|
3
3
|
import { ITreeExpBarState } from '../../state';
|
|
4
4
|
import { IExpBarControlController } from './i-exp-bar-control.controller';
|
|
5
|
-
import { INavViewMsg } from './panel-item';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* 树导航栏控制器
|
|
@@ -16,19 +15,4 @@ export interface ITreeExpBarController
|
|
|
16
15
|
ITreeExpBar,
|
|
17
16
|
ITreeExpBarState,
|
|
18
17
|
ITreeExpBarEvent
|
|
19
|
-
> {
|
|
20
|
-
/**
|
|
21
|
-
* 获取导航视图消息
|
|
22
|
-
*
|
|
23
|
-
* @author zk
|
|
24
|
-
* @date 2023-08-04 08:08:27
|
|
25
|
-
* @param {IData[]} data
|
|
26
|
-
* @return {*} {(INavViewMsg | undefined)}
|
|
27
|
-
* @memberof ITreeExpBarController
|
|
28
|
-
*/
|
|
29
|
-
getNavViewMsg(
|
|
30
|
-
data: IData[],
|
|
31
|
-
context: IContext,
|
|
32
|
-
params: IParams,
|
|
33
|
-
): INavViewMsg | undefined;
|
|
34
|
-
}
|
|
18
|
+
> {}
|
package/src/interface/controller/controller/control/panel-item/i-panel-item-nav-pos.controller.ts
CHANGED
|
@@ -1,47 +1,6 @@
|
|
|
1
|
+
import { INavViewMsg } from '../../../common';
|
|
1
2
|
import { IPanelItemController } from './i-panel-item.controller';
|
|
2
3
|
|
|
3
|
-
export interface INavViewMsg {
|
|
4
|
-
/**
|
|
5
|
-
* 视图唯一标识
|
|
6
|
-
* @author lxm
|
|
7
|
-
* @date 2023-05-25 07:01:28
|
|
8
|
-
* @type {string}
|
|
9
|
-
*/
|
|
10
|
-
key: string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* 最新的路由全路径
|
|
14
|
-
* @author lxm
|
|
15
|
-
* @date 2023-05-25 07:03:29
|
|
16
|
-
* @type {string}
|
|
17
|
-
*/
|
|
18
|
-
fullPath?: string;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* 上下文
|
|
22
|
-
* @author lxm
|
|
23
|
-
* @date 2023-05-25 07:04:39
|
|
24
|
-
* @type {IContext}
|
|
25
|
-
*/
|
|
26
|
-
context?: IContext;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* 视图参数
|
|
30
|
-
* @author lxm
|
|
31
|
-
* @date 2023-05-25 07:04:38
|
|
32
|
-
* @type {IParams}
|
|
33
|
-
*/
|
|
34
|
-
params?: IParams;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* 视图模型
|
|
38
|
-
* @author lxm
|
|
39
|
-
* @date 2023-05-25 07:06:33
|
|
40
|
-
* @type {IAppView}
|
|
41
|
-
*/
|
|
42
|
-
viewId?: string;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
4
|
/**
|
|
46
5
|
* 导航占位控制器接口
|
|
47
6
|
*
|
|
@@ -51,16 +10,6 @@ export interface INavViewMsg {
|
|
|
51
10
|
* @interface INavPosController
|
|
52
11
|
*/
|
|
53
12
|
export interface IPanelItemNavPosController extends IPanelItemController {
|
|
54
|
-
/**
|
|
55
|
-
* 设置默认打开视图
|
|
56
|
-
*
|
|
57
|
-
* @author zk
|
|
58
|
-
* @date 2023-07-11 09:07:46
|
|
59
|
-
* @param {INavViewMsg} navViewMsg
|
|
60
|
-
* @memberof INavPosController
|
|
61
|
-
*/
|
|
62
|
-
setDefaultOpenView(navViewMsg: INavViewMsg): void;
|
|
63
|
-
|
|
64
13
|
/**
|
|
65
14
|
* 打开视图
|
|
66
15
|
*
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { EventBase } from './base.event';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 部件事件
|
|
5
|
+
* @author lxm
|
|
6
|
+
* @date 2023-08-09 10:52:48
|
|
7
|
+
* @export
|
|
8
|
+
* @interface ControlTriggerEvent
|
|
9
|
+
* @extends {EventBase}
|
|
10
|
+
*/
|
|
11
|
+
export interface ControlTriggerEvent extends EventBase {
|
|
12
|
+
/**
|
|
13
|
+
* 触发的部件名称
|
|
14
|
+
* @author lxm
|
|
15
|
+
* @date 2023-03-26 02:02:16
|
|
16
|
+
* @type {string}
|
|
17
|
+
*/
|
|
18
|
+
triggerControlName: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 触发的部件事件的名称
|
|
22
|
+
* @author lxm
|
|
23
|
+
* @date 2023-07-26 11:00:37
|
|
24
|
+
* @type {string}
|
|
25
|
+
*/
|
|
26
|
+
triggerEventName: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 触发的部件事件的事件对象
|
|
30
|
+
* @author lxm
|
|
31
|
+
* @date 2023-08-09 07:02:28
|
|
32
|
+
* @type {EventBase}
|
|
33
|
+
*/
|
|
34
|
+
triggerEvent: EventBase;
|
|
35
|
+
}
|
|
@@ -4,3 +4,5 @@ export { DataChangeEvent } from './data-change.event';
|
|
|
4
4
|
export { ViewInfoEvent } from './view-info.event';
|
|
5
5
|
export { CloseViewEvent } from './close-view.event';
|
|
6
6
|
export { UIActionEvent } from './uiaction.event';
|
|
7
|
+
export { ControlTriggerEvent } from './control-trigger.event';
|
|
8
|
+
export { NavViewChangeEvent } from './nav-view-change.event';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { INavViewMsg } from '../../common';
|
|
2
|
+
import { EventBase } from './base.event';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 导航视图变更事件
|
|
6
|
+
* @author lxm
|
|
7
|
+
* @date 2023-08-09 10:52:48
|
|
8
|
+
* @export
|
|
9
|
+
* @interface NavViewChangeEvent
|
|
10
|
+
* @extends {EventBase}
|
|
11
|
+
*/
|
|
12
|
+
export interface NavViewChangeEvent extends EventBase {
|
|
13
|
+
/**
|
|
14
|
+
* 导航视图信息
|
|
15
|
+
* @author lxm
|
|
16
|
+
* @date 2023-08-09 07:35:50
|
|
17
|
+
* @type {INavViewMsg}
|
|
18
|
+
*/
|
|
19
|
+
navViewMsg: INavViewMsg;
|
|
20
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PartialWithObject } from '@ibiz-template/core';
|
|
2
|
+
import { EventBase, NavViewChangeEvent } from '../argument';
|
|
1
3
|
import { IControlEvent } from './i-control.event';
|
|
2
4
|
|
|
3
5
|
/**
|
|
@@ -9,4 +11,14 @@ import { IControlEvent } from './i-control.event';
|
|
|
9
11
|
* @interface IExpBarControlEvent
|
|
10
12
|
* @extends {IControlEvent}
|
|
11
13
|
*/
|
|
12
|
-
export interface IExpBarControlEvent extends IControlEvent {
|
|
14
|
+
export interface IExpBarControlEvent extends IControlEvent {
|
|
15
|
+
/**
|
|
16
|
+
* 导航视图变更事件
|
|
17
|
+
* @author lxm
|
|
18
|
+
* @date 2023-08-09 07:19:00
|
|
19
|
+
*/
|
|
20
|
+
onNavViewChange: {
|
|
21
|
+
event: NavViewChangeEvent;
|
|
22
|
+
emitArgs: PartialWithObject<NavViewChangeEvent, EventBase>;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PartialWithObject } from '@ibiz-template/core';
|
|
2
|
+
import { ControlTriggerEvent, EventBase } from '../argument';
|
|
1
3
|
import { IControlEvent } from './i-control.event';
|
|
2
4
|
|
|
3
5
|
/**
|
|
@@ -8,4 +10,16 @@ import { IControlEvent } from './i-control.event';
|
|
|
8
10
|
* @export
|
|
9
11
|
* @interface IPanelEvent
|
|
10
12
|
*/
|
|
11
|
-
export
|
|
13
|
+
export interface IPanelEvent extends IControlEvent {
|
|
14
|
+
/**
|
|
15
|
+
* 面板里的部件事件监听
|
|
16
|
+
* @author lxm
|
|
17
|
+
* @date 2023-03-26 06:15:06
|
|
18
|
+
* @param {EventBase} event
|
|
19
|
+
* @return {*} {Promise<void>}
|
|
20
|
+
*/
|
|
21
|
+
onControlEvent: {
|
|
22
|
+
event: ControlTriggerEvent;
|
|
23
|
+
emitArgs: PartialWithObject<ControlTriggerEvent, EventBase>;
|
|
24
|
+
};
|
|
25
|
+
}
|