@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,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,CAwGrB;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,CA4CjB"}
|
|
@@ -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: [] };
|
|
@@ -145,13 +146,14 @@ export async function openDERedirectView(appView, context, params = {}, data = [
|
|
|
145
146
|
// 所有重定向引用视图
|
|
146
147
|
const allRefViews = appView.redirectAppViewRefs;
|
|
147
148
|
const refView = allRefViews === null || allRefViews === void 0 ? void 0 : allRefViews.find(view => {
|
|
149
|
+
const matchKey = view.name || view.id;
|
|
148
150
|
// 特殊补充 wfRdTag 匹配,子流程应用特殊模式
|
|
149
|
-
return
|
|
151
|
+
return matchKey === deRdTag || matchKey === rdTag || matchKey === wfRdTag;
|
|
150
152
|
});
|
|
151
153
|
if (refView) {
|
|
152
154
|
const viewId = refView.refAppViewId;
|
|
153
155
|
if (viewId) {
|
|
154
|
-
const result = await ibiz.commands.execute(OpenAppViewCommand.TAG, viewId, context, params, { data: [curData] });
|
|
156
|
+
const result = await ibiz.commands.execute(OpenAppViewCommand.TAG, viewId, context, params, Object.assign(Object.assign({}, opts), { data: [curData] }));
|
|
155
157
|
if (result) {
|
|
156
158
|
return result;
|
|
157
159
|
}
|
|
@@ -184,16 +186,6 @@ export async function openDERedirectView(appView, context, params = {}, data = [
|
|
|
184
186
|
*/
|
|
185
187
|
export async function calcDERdTag(entity, rdView, params, data) {
|
|
186
188
|
let rdTag = '';
|
|
187
|
-
const defView = `${ibiz.env.isMob ? 'MOB' : ''}EDITVIEW`;
|
|
188
|
-
// 如果流程步骤存在,按照工作流优先
|
|
189
|
-
const srfWf = params.srfwf;
|
|
190
|
-
if (notNilEmpty(srfWf)) {
|
|
191
|
-
if (notNilEmpty(params.wf)) {
|
|
192
|
-
return `${defView}:${srfWf.toUpperCase()}:${params.wf.toUpperCase()}`;
|
|
193
|
-
}
|
|
194
|
-
return `${defView}:${srfWf.toUpperCase()}`;
|
|
195
|
-
}
|
|
196
|
-
let typeValue = '';
|
|
197
189
|
// 重定向视图自定义类别属性
|
|
198
190
|
const typeFieldId = rdView.typeAppDEFieldId;
|
|
199
191
|
// 自定义重定向
|
|
@@ -201,15 +193,24 @@ export async function calcDERdTag(entity, rdView, params, data) {
|
|
|
201
193
|
const { codeName } = findFieldById(entity, typeFieldId);
|
|
202
194
|
const value = data[codeName.toLowerCase()];
|
|
203
195
|
if (notNilEmpty(value)) {
|
|
204
|
-
|
|
196
|
+
return `${value}`;
|
|
205
197
|
}
|
|
198
|
+
ibiz.log.warn(`重定向视图[${rdView.name}]自定义类别属性[${typeFieldId}]值为空`, data);
|
|
206
199
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
200
|
+
const defView = `${ibiz.env.isMob ? 'MOB' : ''}EDITVIEW`;
|
|
201
|
+
// 如果流程步骤存在,按照工作流优先
|
|
202
|
+
const srfWf = params.srfwf;
|
|
203
|
+
if (notNilEmpty(srfWf)) {
|
|
204
|
+
if (notNilEmpty(params.wf)) {
|
|
205
|
+
return `${defView}:${srfWf.toUpperCase()}:${params.wf.toUpperCase()}`;
|
|
212
206
|
}
|
|
207
|
+
return `${defView}:${srfWf.toUpperCase()}`;
|
|
208
|
+
}
|
|
209
|
+
let typeValue = '';
|
|
210
|
+
// 从索引属性获取重定向视图类型
|
|
211
|
+
if (entity.indexTypeAppDEFieldId) {
|
|
212
|
+
const { codeName } = findFieldById(entity, entity.indexTypeAppDEFieldId);
|
|
213
|
+
typeValue = data[codeName.toLowerCase()];
|
|
213
214
|
}
|
|
214
215
|
if (isNilOrEmpty(typeValue)) {
|
|
215
216
|
// 从多表单属性判断重定向视图类型
|
|
@@ -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}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"script-function.d.ts","sourceRoot":"","sources":["../../../src/utils/script/script-function.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAQtD,qBAAa,cAAc;IACzB,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAE7B,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,CAAM;IAEjC,SAAS,CAAC,OAAO,EAAE,mBAAmB,CAAC;gBAGrC,OAAO,EAAE,MAAM,EAAE,EACjB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,mBAAoC;
|
|
1
|
+
{"version":3,"file":"script-function.d.ts","sourceRoot":"","sources":["../../../src/utils/script/script-function.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAQtD,qBAAa,cAAc;IACzB,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAE7B,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,CAAM;IAEjC,SAAS,CAAC,OAAO,EAAE,mBAAmB,CAAC;gBAGrC,OAAO,EAAE,MAAM,EAAE,EACjB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,mBAAoC;IAW/C;;;;;;;;OAQG;IACH,SAAS,CAAC,UAAU,CAClB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,mBAAmB,GAC3B,MAAM;IAQT;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,mBAAmB,GAAG,IAAI;IAS5E;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,GAAG,GAAG,EAAE;IAoB7C;;;;;;OAMG;IACH,IAAI,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO;CAI/B"}
|
|
@@ -13,7 +13,10 @@ export class ScriptFunction {
|
|
|
13
13
|
this.options = options;
|
|
14
14
|
const code = this.formatCode(scriptCode, options);
|
|
15
15
|
this.calcArgKeys(argKeys, options);
|
|
16
|
-
|
|
16
|
+
const fn = new Function(...this.argKeys, code);
|
|
17
|
+
this.scriptFn = function callBack(...args) {
|
|
18
|
+
return fn.apply({}, args);
|
|
19
|
+
};
|
|
17
20
|
}
|
|
18
21
|
/**
|
|
19
22
|
* 格式化脚本
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/runtime",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
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.8",
|
|
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": "cb6f466a8477cdcf184a8be03b8c26bd67324a70"
|
|
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
|
|
|
@@ -143,6 +143,14 @@ export enum SysUIActionTag {
|
|
|
143
143
|
* 行编辑
|
|
144
144
|
*/
|
|
145
145
|
'TOGGLE_ROW_EDIT' = 'ToggleRowEdit',
|
|
146
|
+
/**
|
|
147
|
+
* 树界面_刷新全部操作
|
|
148
|
+
*/
|
|
149
|
+
'REFRESH_ALL' = 'RefreshAll',
|
|
150
|
+
/**
|
|
151
|
+
* 树界面_刷新父节点操作
|
|
152
|
+
*/
|
|
153
|
+
'REFRESH_PARENT' = 'RefreshParent',
|
|
146
154
|
|
|
147
155
|
// 非预置界面行为 Start
|
|
148
156
|
|
|
@@ -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
|
|
|
@@ -60,16 +60,25 @@ export class MDControlController<
|
|
|
60
60
|
this.state.groups = [];
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
protected async onCreated(): Promise<void> {
|
|
64
|
+
await super.onCreated();
|
|
65
|
+
// 设置默认排序
|
|
66
|
+
this.setSort();
|
|
67
|
+
}
|
|
68
|
+
|
|
63
69
|
/**
|
|
64
70
|
* 设置排序
|
|
71
|
+
* 无参数时设置的是默认排序。
|
|
65
72
|
*
|
|
66
73
|
* @author lxm
|
|
67
74
|
* @date 2022-09-28 13:09:44
|
|
68
75
|
* @param {string} key 排序字段
|
|
69
76
|
* @param {string} order 排序顺序
|
|
70
77
|
*/
|
|
71
|
-
setSort(key
|
|
72
|
-
|
|
78
|
+
setSort(key?: string, order?: 'asc' | 'desc'): void {
|
|
79
|
+
if (key && order) {
|
|
80
|
+
this.state.sortQuery = `${key},${order}`;
|
|
81
|
+
}
|
|
73
82
|
}
|
|
74
83
|
|
|
75
84
|
/**
|
|
@@ -189,14 +198,20 @@ export class MDControlController<
|
|
|
189
198
|
if (!data?.length) {
|
|
190
199
|
throw new RuntimeError('未选中数据');
|
|
191
200
|
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
201
|
+
|
|
202
|
+
// 删除确认提示
|
|
203
|
+
if (args?.silent !== true) {
|
|
204
|
+
const del = await ibiz.confirm.error({
|
|
205
|
+
title: '数据删除',
|
|
206
|
+
desc: '确认删除数据?',
|
|
207
|
+
});
|
|
208
|
+
if (!del) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
198
211
|
}
|
|
212
|
+
|
|
199
213
|
await this.startLoading();
|
|
214
|
+
let needRefresh = false;
|
|
200
215
|
try {
|
|
201
216
|
const deName = calcDeCodeNameById(this.model.appDataEntityId!);
|
|
202
217
|
await Promise.allSettled(
|
|
@@ -207,17 +222,25 @@ export class MDControlController<
|
|
|
207
222
|
tempContext[deName] = item.srfkey;
|
|
208
223
|
// 删除后台的数据
|
|
209
224
|
await this.service.remove(tempContext, params);
|
|
225
|
+
needRefresh = true;
|
|
210
226
|
}
|
|
211
227
|
|
|
212
228
|
this.afterRemove(data);
|
|
213
229
|
}),
|
|
214
230
|
);
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
231
|
+
|
|
232
|
+
if (args?.silent !== true) {
|
|
233
|
+
ibiz.notification.success({
|
|
234
|
+
desc: `数据[${data
|
|
235
|
+
.map(item => item.srfmajortext)
|
|
236
|
+
.join('、')}]删除成功!`,
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// 刷新数据,补全这一页缺少的数据
|
|
241
|
+
if (needRefresh) {
|
|
242
|
+
this.refresh();
|
|
243
|
+
}
|
|
221
244
|
} finally {
|
|
222
245
|
await this.endLoading();
|
|
223
246
|
}
|
|
@@ -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
|
* 当前视图控制器集合(包含自身视图控制器,部件控制器,和下一层级的视图的控制器)
|
|
@@ -142,11 +142,11 @@ export class MDViewEngine extends ViewEngineBase {
|
|
|
142
142
|
return null;
|
|
143
143
|
}
|
|
144
144
|
if (key === SysUIActionTag.EDIT || key === SysUIActionTag.VIEW) {
|
|
145
|
-
this.openData(args!);
|
|
145
|
+
await this.openData(args!);
|
|
146
146
|
return null;
|
|
147
147
|
}
|
|
148
148
|
if (key === SysUIActionTag.NEW) {
|
|
149
|
-
this.newData(args!);
|
|
149
|
+
await this.newData(args!);
|
|
150
150
|
return null;
|
|
151
151
|
}
|
|
152
152
|
if (key === SysUIActionTag.REMOVE) {
|
|
@@ -300,10 +300,19 @@ export class MDViewEngine extends ViewEngineBase {
|
|
|
300
300
|
// 有搜索表单的整合相关参数
|
|
301
301
|
if (this.searchForm) {
|
|
302
302
|
const addParams = this.searchForm.getData()[0];
|
|
303
|
-
Object.
|
|
303
|
+
const filteredParams = Object.entries(addParams).reduce(
|
|
304
|
+
(result: IData, [key, value]) => {
|
|
305
|
+
if (value !== null && value !== undefined && value !== '') {
|
|
306
|
+
result[key] = value;
|
|
307
|
+
}
|
|
308
|
+
return result;
|
|
309
|
+
},
|
|
310
|
+
{},
|
|
311
|
+
);
|
|
312
|
+
Object.assign(params, filteredParams);
|
|
304
313
|
}
|
|
305
314
|
// 有搜索栏的整合相关参数
|
|
306
|
-
if (this.searchBar) {
|
|
315
|
+
if (this.searchBar && this.searchBar.state.query) {
|
|
307
316
|
const addParams = {
|
|
308
317
|
query: this.searchBar.state.query,
|
|
309
318
|
};
|
package/src/install.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GlobalConfig } from './config/global-config';
|
|
2
2
|
import { RegisterCenter } from './register/register-center';
|
|
3
3
|
import { installCommand } from './command';
|
|
4
|
-
import {
|
|
4
|
+
import { V7AuthService } from './service';
|
|
5
5
|
import { AppHub } from './app-hub';
|
|
6
6
|
import { EngineFactory } from './engine';
|
|
7
7
|
import { GlobalUtil } from './global';
|
|
@@ -26,7 +26,7 @@ export function install(): void {
|
|
|
26
26
|
// 初始化全局配置
|
|
27
27
|
ibiz.config = new GlobalConfig();
|
|
28
28
|
// 挂载认证服务
|
|
29
|
-
ibiz.auth = new
|
|
29
|
+
ibiz.auth = new V7AuthService();
|
|
30
30
|
// 挂载引擎工厂
|
|
31
31
|
ibiz.engine = new EngineFactory();
|
|
32
32
|
// 安装默认指令
|
|
@@ -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
|
+
}
|
|
@@ -24,7 +24,7 @@ export interface IGridController
|
|
|
24
24
|
newRow(): Promise<void>;
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* 保存单条数据
|
|
28
28
|
*
|
|
29
29
|
* @author zk
|
|
30
30
|
* @date 2023-07-31 02:07:52
|
|
@@ -33,13 +33,21 @@ export interface IGridController
|
|
|
33
33
|
save(data: ControlVO): Promise<void>;
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* 保存表格所有数据
|
|
37
37
|
*
|
|
38
38
|
* @author zk
|
|
39
|
-
* @date 2023-07-31 02:07:
|
|
39
|
+
* @date 2023-07-31 02:07:52
|
|
40
40
|
* @memberof IGridController
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
saveAll(): Promise<void>;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 切换表格的行编辑开启关闭状态
|
|
46
|
+
* @author lxm
|
|
47
|
+
* @date 2023-08-16 10:18:14
|
|
48
|
+
* @param {IData} [rowData] 行数据
|
|
49
|
+
*/
|
|
50
|
+
toggleRowEdit(): void;
|
|
43
51
|
|
|
44
52
|
/**
|
|
45
53
|
* 数据导出
|
|
@@ -20,7 +20,15 @@ export interface MDCtrlLoadParams extends IDataAbilityParams {
|
|
|
20
20
|
isLoadMore?: boolean;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export interface MDCtrlRemoveParams extends IDataAbilityParams {
|
|
23
|
+
export interface MDCtrlRemoveParams extends IDataAbilityParams {
|
|
24
|
+
/**
|
|
25
|
+
* 是否静默删除
|
|
26
|
+
* @author lxm
|
|
27
|
+
* @date 2023-08-17 06:04:23
|
|
28
|
+
* @type {boolean}
|
|
29
|
+
*/
|
|
30
|
+
silent?: boolean;
|
|
31
|
+
}
|
|
24
32
|
|
|
25
33
|
/**
|
|
26
34
|
* 多数据部件控制器
|
|
@@ -44,4 +44,12 @@ export interface ITreeController
|
|
|
44
44
|
nodeData: ITreeNodeData,
|
|
45
45
|
event: MouseEvent,
|
|
46
46
|
): Promise<void>;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 刷新父节点数据
|
|
50
|
+
* @author lxm
|
|
51
|
+
* @date 2023-08-18 01:49:59
|
|
52
|
+
* @param {ITreeNodeData} parentNode
|
|
53
|
+
*/
|
|
54
|
+
refreshParent(parentData: ITreeNodeData | IData): void;
|
|
47
55
|
}
|
|
@@ -6,3 +6,4 @@ export { CloseViewEvent } from './close-view.event';
|
|
|
6
6
|
export { UIActionEvent } from './uiaction.event';
|
|
7
7
|
export { ControlTriggerEvent } from './control-trigger.event';
|
|
8
8
|
export { NavViewChangeEvent } from './nav-view-change.event';
|
|
9
|
+
export { RowEditChangeEvent } from './row-edit-change.event';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IGridRowState } from '../../state';
|
|
2
|
+
import { EventBase } from './base.event';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 行编辑切换事件
|
|
6
|
+
* @author lxm
|
|
7
|
+
* @date 2023-03-26 02:07:11
|
|
8
|
+
* @export
|
|
9
|
+
* @interface RowEditChangeEvent
|
|
10
|
+
* @extends {EventBase}
|
|
11
|
+
*/
|
|
12
|
+
export interface RowEditChangeEvent extends EventBase {
|
|
13
|
+
/**
|
|
14
|
+
* 行状态对象
|
|
15
|
+
* @author lxm
|
|
16
|
+
* @date 2023-08-17 06:58:15
|
|
17
|
+
* @type {IGridRowState}
|
|
18
|
+
*/
|
|
19
|
+
row: IGridRowState;
|
|
20
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PartialWithObject } from '@ibiz-template/core';
|
|
2
|
+
import { EventBase, RowEditChangeEvent } from '../..';
|
|
2
3
|
import { IMDControlEvent } from './i-md-control.event';
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -21,4 +22,16 @@ export interface IGridEvent extends IMDControlEvent {
|
|
|
21
22
|
event: EventBase;
|
|
22
23
|
emitArgs: { data: IData[] };
|
|
23
24
|
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 表格行编辑切换事件
|
|
28
|
+
* @author lxm
|
|
29
|
+
* @date 2023-03-26 06:15:06
|
|
30
|
+
* @param {emitArgs} undefined
|
|
31
|
+
* @return {*} {Promise<void>}
|
|
32
|
+
*/
|
|
33
|
+
onRowEditChange: {
|
|
34
|
+
event: RowEditChangeEvent;
|
|
35
|
+
emitArgs: PartialWithObject<RowEditChangeEvent, EventBase>;
|
|
36
|
+
};
|
|
24
37
|
}
|