@ibiz-template/runtime 0.1.0 → 0.1.1
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 +193 -97
- 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.js +1 -1
- package/out/controller/utils/event/qx-event-ex.d.ts.map +1 -1
- package/out/controller/utils/event/qx-event-ex.js +5 -4
- package/out/engine/view-base.engine.d.ts.map +1 -1
- package/out/engine/view-base.engine.js +7 -6
- package/out/interface/controller/event/view/i-pickup-data-view.event.d.ts +27 -0
- package/out/interface/controller/event/view/i-pickup-data-view.event.d.ts.map +1 -0
- package/out/interface/controller/event/view/i-pickup-data-view.event.js +1 -0
- package/out/interface/controller/event/view/index.d.ts +1 -0
- package/out/interface/controller/event/view/index.d.ts.map +1 -1
- package/out/interface/controller/event/view/index.js +1 -0
- package/out/interface/controller/state/view/i-pickup-data-view.state.d.ts +22 -0
- package/out/interface/controller/state/view/i-pickup-data-view.state.d.ts.map +1 -0
- package/out/interface/controller/state/view/i-pickup-data-view.state.js +1 -0
- package/out/interface/controller/state/view/index.d.ts +1 -0
- package/out/interface/controller/state/view/index.d.ts.map +1 -1
- package/out/interface/controller/state/view/index.js +1 -0
- package/out/logic-scheduler/executor/app-ui-logic-executor.d.ts +13 -1
- package/out/logic-scheduler/executor/app-ui-logic-executor.d.ts.map +1 -1
- package/out/logic-scheduler/executor/app-ui-logic-executor.js +62 -18
- package/out/service/service/entity/method/fetch.d.ts +11 -0
- package/out/service/service/entity/method/fetch.d.ts.map +1 -1
- package/out/service/service/entity/method/fetch.js +40 -3
- package/package.json +8 -10
- package/src/command/app/open-app-view/open-app-view.ts +1 -1
- package/src/controller/utils/event/qx-event-ex.ts +5 -4
- package/src/engine/view-base.engine.ts +7 -6
- package/src/interface/controller/event/view/i-pickup-data-view.event.ts +25 -0
- package/src/interface/controller/event/view/index.ts +1 -0
- package/src/interface/controller/state/view/i-pickup-data-view.state.ts +22 -0
- package/src/interface/controller/state/view/index.ts +1 -0
- package/src/logic-scheduler/executor/app-ui-logic-executor.ts +86 -26
- package/src/service/service/entity/method/fetch.ts +62 -5
|
@@ -40,7 +40,7 @@ export class OpenAppViewCommand {
|
|
|
40
40
|
return openRedirectView(fullViewModel, context, params, opts.data);
|
|
41
41
|
}
|
|
42
42
|
const { openMode = 'INDEXVIEWTAB' } = appView;
|
|
43
|
-
switch (openMode) {
|
|
43
|
+
switch (opts.openMode || openMode) {
|
|
44
44
|
case 'INDEXVIEWTAB':
|
|
45
45
|
if (opts.noWaitRoute) {
|
|
46
46
|
this.openIndexViewTab(appView, context, params);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qx-event-ex.d.ts","sourceRoot":"","sources":["../../../../src/controller/utils/event/qx-event-ex.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,OAAO,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD;;;;;;;;GAQG;AACH,qBAAa,SAAS,CAAC,CAAC,SAAS,SAAS,CAAC,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;IAC/D,OAAO,CAAC,WAAW,CAEZ;IAEP;;;;;;OAMG;IACH,KAAK,CACH,EAAE,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,GACxE,IAAI;IAOP,IAAI,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI;IAO3D,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,EAC/B,IAAI,EAAE,CAAC,EACP,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACxB,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"qx-event-ex.d.ts","sourceRoot":"","sources":["../../../../src/controller/utils/event/qx-event-ex.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,OAAO,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD;;;;;;;;GAQG;AACH,qBAAa,SAAS,CAAC,CAAC,SAAS,SAAS,CAAC,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;IAC/D,OAAO,CAAC,WAAW,CAEZ;IAEP;;;;;;OAMG;IACH,KAAK,CACH,EAAE,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,GACxE,IAAI;IAOP,IAAI,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI;IAO3D,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,EAC/B,IAAI,EAAE,CAAC,EACP,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACxB,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAUvC,KAAK,IAAI,IAAI;CAId"}
|
|
@@ -34,12 +34,13 @@ export class QXEventEx extends QXEvent {
|
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
async asyncEmit(name, ...args) {
|
|
37
|
-
const
|
|
37
|
+
const resultPromise1 = super.asyncEmit(name, ...args);
|
|
38
38
|
// 任意事件监听回调执行,并把执行结果展开合并入原始结果集合
|
|
39
39
|
const all = this.anyEventFns.map(fn => fn(name, ...args));
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
const resultPromise2 = Promise.all(all);
|
|
41
|
+
const resultArr1 = await resultPromise1;
|
|
42
|
+
const resultArr2 = await resultPromise2;
|
|
43
|
+
return resultArr1.concat(...resultArr2);
|
|
43
44
|
}
|
|
44
45
|
reset() {
|
|
45
46
|
super.reset();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-base.engine.d.ts","sourceRoot":"","sources":["../../src/engine/view-base.engine.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,0BAA0B,EAC3B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD;;;;;;GAMG;AACH,qBAAa,cAAe,YAAW,WAAW;IAmEpC,SAAS,CAAC,IAAI,EAAE,eAAe;IAlE3C;;;;;;;OAOG;IACH,SAAS,KAAK,OAAO,IAAI,kBAAkB,GAAG,SAAS,CAEtD;IAED;;;;;;;OAOG;IACH,SAAS,KAAK,WAAW,IAAI,kBAAkB,GAAG,SAAS,CAE1D;IAED;;;;;;;OAOG;IACH,SAAS,KAAK,YAAY,IAAI,kBAAkB,GAAG,SAAS,CAE3D;IAED;;;;;;;OAOG;IACH,SAAS,KAAK,aAAa,IAAI,kBAAkB,GAAG,SAAS,CAE5D;IAED;;;;;;;OAOG;IACH,SAAS,KAAK,eAAe,IAAI,0BAA0B,GAAG,SAAS,CAEtE;IAED;;;;;OAKG;gBACmB,IAAI,EAAE,eAAe;IAIrC,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAK1B,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAyB1B,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,GAAG,SAAS,CAAC;IAOzE;;;;;OAKG;IACH,SAAS,CAAC,aAAa,IAAI,IAAI;IAI/B;;;;;OAKG;IACH,SAAS,CAAC,OAAO,IAAI,KAAK,EAAE;IAI5B;;;;;;;OAOG;IACH,SAAS,CAAC,qBAAqB,IAAI,OAAO;IAgD1C;;;;;;OAMG;IACH,SAAS,CAAC,qBAAqB,IAAI,OAAO;IAW1C;;;;;OAKG;IACG,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"view-base.engine.d.ts","sourceRoot":"","sources":["../../src/engine/view-base.engine.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,0BAA0B,EAC3B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD;;;;;;GAMG;AACH,qBAAa,cAAe,YAAW,WAAW;IAmEpC,SAAS,CAAC,IAAI,EAAE,eAAe;IAlE3C;;;;;;;OAOG;IACH,SAAS,KAAK,OAAO,IAAI,kBAAkB,GAAG,SAAS,CAEtD;IAED;;;;;;;OAOG;IACH,SAAS,KAAK,WAAW,IAAI,kBAAkB,GAAG,SAAS,CAE1D;IAED;;;;;;;OAOG;IACH,SAAS,KAAK,YAAY,IAAI,kBAAkB,GAAG,SAAS,CAE3D;IAED;;;;;;;OAOG;IACH,SAAS,KAAK,aAAa,IAAI,kBAAkB,GAAG,SAAS,CAE5D;IAED;;;;;;;OAOG;IACH,SAAS,KAAK,eAAe,IAAI,0BAA0B,GAAG,SAAS,CAEtE;IAED;;;;;OAKG;gBACmB,IAAI,EAAE,eAAe;IAIrC,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAK1B,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAyB1B,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,KAAK,GAAG,IAAI,GAAG,SAAS,CAAC;IAOzE;;;;;OAKG;IACH,SAAS,CAAC,aAAa,IAAI,IAAI;IAI/B;;;;;OAKG;IACH,SAAS,CAAC,OAAO,IAAI,KAAK,EAAE;IAI5B;;;;;;;OAOG;IACH,SAAS,CAAC,qBAAqB,IAAI,OAAO;IAgD1C;;;;;;OAMG;IACH,SAAS,CAAC,qBAAqB,IAAI,OAAO;IAW1C;;;;;OAKG;IACG,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;CAuBtC"}
|
|
@@ -212,12 +212,13 @@ export class ViewEngineBase {
|
|
|
212
212
|
}
|
|
213
213
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
214
214
|
const res = await app.deService.exec(appDataEntityId, 'get', context, params);
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
215
|
+
const { data } = res;
|
|
216
|
+
if (data) {
|
|
217
|
+
this.view.state.srfactiveviewdata = data;
|
|
218
|
+
evt.emit('onDataChange', { actionType: 'LOAD', data: [data] });
|
|
219
|
+
if (data.srfkey) {
|
|
220
|
+
evt.emit('onViewInfoChange', { dataInfo: data.srfmajortext || '' });
|
|
221
|
+
}
|
|
221
222
|
}
|
|
222
223
|
}
|
|
223
224
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EventBase } from '../argument';
|
|
2
|
+
import { IDataViewEvent } from './i-data-view.event';
|
|
3
|
+
/**
|
|
4
|
+
* 选择数据视图事件
|
|
5
|
+
*
|
|
6
|
+
* @author lxm
|
|
7
|
+
* @date 2022-09-13 10:09:00
|
|
8
|
+
* @export
|
|
9
|
+
* @interface IPickupDataViewEvent
|
|
10
|
+
* @extends {IGridViewEvent}
|
|
11
|
+
*/
|
|
12
|
+
export interface IPickupDataViewEvent extends IDataViewEvent {
|
|
13
|
+
/**
|
|
14
|
+
* 选中数据变更事件
|
|
15
|
+
*
|
|
16
|
+
* @author lxm
|
|
17
|
+
* @date 2022-08-31 14:08:12
|
|
18
|
+
* @param {IData[]} selection 选中的数据集合
|
|
19
|
+
*/
|
|
20
|
+
onSelectionChange: {
|
|
21
|
+
event: EventBase;
|
|
22
|
+
emitArgs: {
|
|
23
|
+
data: IData[];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=i-pickup-data-view.event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i-pickup-data-view.event.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/event/view/i-pickup-data-view.event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D;;;;;;OAMG;IACH,iBAAiB,EAAE;QACjB,KAAK,EAAE,SAAS,CAAC;QACjB,QAAQ,EAAE;YAAE,IAAI,EAAE,KAAK,EAAE,CAAA;SAAE,CAAC;KAC7B,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -12,6 +12,7 @@ export * from './i-tree-view.event';
|
|
|
12
12
|
export * from './i-pickup-view.event';
|
|
13
13
|
export * from './i-mpickup-view.event';
|
|
14
14
|
export * from './i-pickup-grid-view.event';
|
|
15
|
+
export * from './i-pickup-data-view.event';
|
|
15
16
|
export * from './i-wf-edit-view.event';
|
|
16
17
|
export * from './i-wf-dyna-edit-view.event';
|
|
17
18
|
export * from './i-wf-dyna-edit-view3.event';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/event/view/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/event/view/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC"}
|
|
@@ -12,6 +12,7 @@ export * from './i-tree-view.event';
|
|
|
12
12
|
export * from './i-pickup-view.event';
|
|
13
13
|
export * from './i-mpickup-view.event';
|
|
14
14
|
export * from './i-pickup-grid-view.event';
|
|
15
|
+
export * from './i-pickup-data-view.event';
|
|
15
16
|
export * from './i-wf-edit-view.event';
|
|
16
17
|
export * from './i-wf-dyna-edit-view.event';
|
|
17
18
|
export * from './i-wf-dyna-edit-view3.event';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IDataViewState } from './i-data-view.state';
|
|
2
|
+
/**
|
|
3
|
+
* 表格选择视图UI状态
|
|
4
|
+
*
|
|
5
|
+
* @author zk
|
|
6
|
+
* @date 2023-05-25 05:05:43
|
|
7
|
+
* @export
|
|
8
|
+
* @interface IPickupDataViewState
|
|
9
|
+
* @extends {IGridViewState}
|
|
10
|
+
*/
|
|
11
|
+
export interface IPickupDataViewState extends IDataViewState {
|
|
12
|
+
/**
|
|
13
|
+
* 是否单选
|
|
14
|
+
*
|
|
15
|
+
* @author zk
|
|
16
|
+
* @date 2023-05-26 05:05:02
|
|
17
|
+
* @type {boolean}
|
|
18
|
+
* @memberof IPickupDataViewState
|
|
19
|
+
*/
|
|
20
|
+
singleSelect: boolean;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=i-pickup-data-view.state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i-pickup-data-view.state.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/state/view/i-pickup-data-view.state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;;;;;GAQG;AACH,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D;;;;;;;OAOG;IACH,YAAY,EAAE,OAAO,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -9,6 +9,7 @@ export * from './i-opt-view.state';
|
|
|
9
9
|
export * from './i-mpickup-view.state';
|
|
10
10
|
export * from './i-pickup-view.state';
|
|
11
11
|
export * from './i-pickup-grid-view.state';
|
|
12
|
+
export * from './i-pickup-data-view.state';
|
|
12
13
|
export * from './i-tab-exp-view.state';
|
|
13
14
|
export * from './i-exp-view.state';
|
|
14
15
|
export * from './i-grid-exp-view.state';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/state/view/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/interface/controller/state/view/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC"}
|
|
@@ -9,6 +9,7 @@ export * from './i-opt-view.state';
|
|
|
9
9
|
export * from './i-mpickup-view.state';
|
|
10
10
|
export * from './i-pickup-view.state';
|
|
11
11
|
export * from './i-pickup-grid-view.state';
|
|
12
|
+
export * from './i-pickup-data-view.state';
|
|
12
13
|
export * from './i-tab-exp-view.state';
|
|
13
14
|
export * from './i-exp-view.state';
|
|
14
15
|
export * from './i-grid-exp-view.state';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IAppUIOpenDataLogic, IAppUINewDataLogic } from '@ibiz/model-core';
|
|
1
|
+
import { IAppUIOpenDataLogic, IAppUINewDataLogic, IAppUILogicRefViewBase } from '@ibiz/model-core';
|
|
2
2
|
import { IUILogicParams } from '../../interface';
|
|
3
3
|
import { LogicExecutor } from './logic-executor';
|
|
4
4
|
/**
|
|
@@ -38,5 +38,17 @@ export declare class AppUILogicExecutor extends LogicExecutor {
|
|
|
38
38
|
* @param {IData} [opts] 额外参数,event是js原生事件
|
|
39
39
|
*/
|
|
40
40
|
executeNewDataAppUILogic(appUILogic: IAppUINewDataLogic, parameters: IUILogicParams): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* 获取向导新建视图引用
|
|
43
|
+
* 返回undefined为取消操作
|
|
44
|
+
* 找不到会报错
|
|
45
|
+
* @author lxm
|
|
46
|
+
* @date 2023-08-03 06:37:22
|
|
47
|
+
* @protected
|
|
48
|
+
* @param {IAppUINewDataLogic} appUILogic
|
|
49
|
+
* @param {IUILogicParams} parameters
|
|
50
|
+
* @return {*} {(Promise<IAppUILogicRefViewBase | undefined>)}
|
|
51
|
+
*/
|
|
52
|
+
protected getWizardNewViewRef(appUILogic: IAppUINewDataLogic, parameters: IUILogicParams): Promise<IAppUILogicRefViewBase | undefined>;
|
|
41
53
|
}
|
|
42
54
|
//# sourceMappingURL=app-ui-logic-executor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-ui-logic-executor.d.ts","sourceRoot":"","sources":["../../../src/logic-scheduler/executor/app-ui-logic-executor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app-ui-logic-executor.d.ts","sourceRoot":"","sources":["../../../src/logic-scheduler/executor/app-ui-logic-executor.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,mBAAmB,EAEnB,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAc,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;;;;;;GAOG;AACH,qBAAa,kBAAmB,SAAQ,aAAa;IAC3C,IAAI,EAAE,YAAY,CAAC;IAG3B,OAAO,CAAC,aAAa,EAAE,cAAc,GAAG,GAAG;IAiB3C;;;;;;;;;;;OAWG;IACG,yBAAyB,CAC7B,UAAU,EAAE,mBAAmB,EAC/B,UAAU,EAAE,cAAc,GACzB,OAAO,CAAC,IAAI,CAAC;IA+ChB;;;;;;;;;;;OAWG;IACG,wBAAwB,CAC5B,UAAU,EAAE,kBAAkB,EAC9B,UAAU,EAAE,cAAc,GACzB,OAAO,CAAC,IAAI,CAAC;IA8DhB;;;;;;;;;;OAUG;cACa,mBAAmB,CACjC,UAAU,EAAE,kBAAkB,EAC9B,UAAU,EAAE,cAAc,GACzB,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAAC;CAkC/C"}
|
|
@@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import { RuntimeError, RuntimeModelError } from '@ibiz-template/core';
|
|
12
|
+
import { ModelError, RuntimeError, RuntimeModelError, } from '@ibiz-template/core';
|
|
13
13
|
import { notNilEmpty } from 'qx-util';
|
|
14
14
|
import { OpenAppViewCommand } from '../../command';
|
|
15
15
|
import { convertNavData } from '../../utils';
|
|
@@ -47,7 +47,8 @@ export class AppUILogicExecutor extends LogicExecutor {
|
|
|
47
47
|
* @param {IData} [opts] 额外参数,event是js原生事件
|
|
48
48
|
*/
|
|
49
49
|
async executeOpenDataAppUILogic(appUILogic, parameters) {
|
|
50
|
-
const { context, params
|
|
50
|
+
const { context, params } = parameters, rest = __rest(parameters, ["context", "params"]);
|
|
51
|
+
const { data } = parameters;
|
|
51
52
|
if (!(data === null || data === void 0 ? void 0 : data[0])) {
|
|
52
53
|
throw new RuntimeError('opendata没有可操作数据!');
|
|
53
54
|
}
|
|
@@ -86,15 +87,31 @@ export class AppUILogicExecutor extends LogicExecutor {
|
|
|
86
87
|
* @param {IData} [opts] 额外参数,event是js原生事件
|
|
87
88
|
*/
|
|
88
89
|
async executeNewDataAppUILogic(appUILogic, parameters) {
|
|
89
|
-
const { context, params
|
|
90
|
-
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
const { context, params } = parameters, rest = __rest(parameters, ["context", "params"]);
|
|
91
|
+
const { data } = parameters;
|
|
92
|
+
const { enableWizardAdd, enableBatchAdd, batchAddOnly, newDataAppView } = appUILogic;
|
|
93
|
+
let newViewRef;
|
|
94
|
+
if (enableWizardAdd) {
|
|
95
|
+
newViewRef = await this.getWizardNewViewRef(appUILogic, parameters);
|
|
96
|
+
if (!newViewRef) {
|
|
97
|
+
// 选择视图取消操作直接返回
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else if (enableBatchAdd) {
|
|
102
|
+
// todo 批添加
|
|
103
|
+
throw new ModelError(appUILogic, 'enableBatchAdd暂未支持');
|
|
104
|
+
}
|
|
105
|
+
else if (batchAddOnly) {
|
|
106
|
+
// todo 只支持批添加
|
|
107
|
+
throw new ModelError(appUILogic, 'batchAddOnly暂未支持');
|
|
94
108
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
109
|
+
else {
|
|
110
|
+
// 准备需要的模型
|
|
111
|
+
newViewRef = newDataAppView;
|
|
112
|
+
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
113
|
+
throw new RuntimeModelError(appUILogic, 'newdata视图逻辑没有配置默认新建数据视图');
|
|
114
|
+
}
|
|
98
115
|
}
|
|
99
116
|
// 处理导航参数
|
|
100
117
|
let tempContext = {};
|
|
@@ -115,16 +132,43 @@ export class AppUILogicExecutor extends LogicExecutor {
|
|
|
115
132
|
_data.srfkey = undefined;
|
|
116
133
|
tempParams = Object.assign(tempParams, _data.$origin);
|
|
117
134
|
}
|
|
118
|
-
|
|
119
|
-
|
|
135
|
+
// 打开视图
|
|
136
|
+
await ibiz.commands.execute(OpenAppViewCommand.TAG, newViewRef.refAppViewId, tempContext, tempParams, rest);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* 获取向导新建视图引用
|
|
140
|
+
* 返回undefined为取消操作
|
|
141
|
+
* 找不到会报错
|
|
142
|
+
* @author lxm
|
|
143
|
+
* @date 2023-08-03 06:37:22
|
|
144
|
+
* @protected
|
|
145
|
+
* @param {IAppUINewDataLogic} appUILogic
|
|
146
|
+
* @param {IUILogicParams} parameters
|
|
147
|
+
* @return {*} {(Promise<IAppUILogicRefViewBase | undefined>)}
|
|
148
|
+
*/
|
|
149
|
+
async getWizardNewViewRef(appUILogic, parameters) {
|
|
150
|
+
var _a;
|
|
151
|
+
const { wizardAppView, newDataAppViews } = appUILogic;
|
|
152
|
+
const { context, params } = parameters, rest = __rest(parameters, ["context", "params"]);
|
|
153
|
+
// 索引实体的向导添加
|
|
154
|
+
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
155
|
+
throw new RuntimeModelError(appUILogic, '缺少默认索引实体选择视图');
|
|
120
156
|
}
|
|
121
|
-
|
|
122
|
-
|
|
157
|
+
// 打开视图
|
|
158
|
+
const result = await ibiz.commands.execute(OpenAppViewCommand.TAG, wizardAppView.refAppViewId, context, params, Object.assign(Object.assign({}, rest), { openMode: 'POPUPMODAL' }));
|
|
159
|
+
if (!result.ok) {
|
|
160
|
+
// 取消
|
|
161
|
+
return;
|
|
123
162
|
}
|
|
124
|
-
|
|
125
|
-
|
|
163
|
+
const selectData = (_a = result.data) === null || _a === void 0 ? void 0 : _a[0];
|
|
164
|
+
if (!selectData) {
|
|
165
|
+
throw new RuntimeError('请选中一条数据');
|
|
126
166
|
}
|
|
127
|
-
|
|
128
|
-
|
|
167
|
+
const indexType = selectData.srfkey;
|
|
168
|
+
const findView = newDataAppViews === null || newDataAppViews === void 0 ? void 0 : newDataAppViews.find(item => item.refMode === indexType);
|
|
169
|
+
if (!findView) {
|
|
170
|
+
throw new RuntimeError(`没有找到与索引类型${indexType}相关的实体的编辑视图`);
|
|
171
|
+
}
|
|
172
|
+
return findView;
|
|
129
173
|
}
|
|
130
174
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { HttpResponse } from '@ibiz-template/core';
|
|
2
|
+
import { IAppDEDataSet } from '@ibiz/model-core';
|
|
2
3
|
import { PSDEDQCondEngine, SearchFilter } from '../../../utils';
|
|
3
4
|
import { Method } from './method';
|
|
4
5
|
import { IDataEntity } from '../../../../interface';
|
|
@@ -12,6 +13,7 @@ import { IDataEntity } from '../../../../interface';
|
|
|
12
13
|
* @extends {Method}
|
|
13
14
|
*/
|
|
14
15
|
export declare class FetchMethod extends Method {
|
|
16
|
+
method: IAppDEDataSet;
|
|
15
17
|
exec(context: IParams, data: IData, params: IParams): Promise<HttpResponse<IDataEntity[]>>;
|
|
16
18
|
/**
|
|
17
19
|
* 查询本地数据,根据属性
|
|
@@ -31,5 +33,14 @@ export declare class FetchMethod extends Method {
|
|
|
31
33
|
* @return {*} {Promise<IDataEntity[]>}
|
|
32
34
|
*/
|
|
33
35
|
protected searchLocal(cond: PSDEDQCondEngine | null, filter: SearchFilter, queryParamKeys?: string[]): Promise<IDataEntity[]>;
|
|
36
|
+
/**
|
|
37
|
+
* 获取代码表数据来源的集合
|
|
38
|
+
* @author lxm
|
|
39
|
+
* @date 2023-08-03 02:55:00
|
|
40
|
+
* @param {IParams} context
|
|
41
|
+
* @param {IParams} params
|
|
42
|
+
* @return {*} {Promise<HttpResponse<IData[]>>}
|
|
43
|
+
*/
|
|
44
|
+
protected fetchCodeListSet(context: IParams, params: IParams): Promise<HttpResponse<IData[]>>;
|
|
34
45
|
}
|
|
35
46
|
//# sourceMappingURL=fetch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../../../src/service/service/entity/method/fetch.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../../../src/service/service/entity/method/fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD;;;;;;;;GAQG;AACH,qBAAa,WAAY,SAAQ,MAAM;IAC7B,MAAM,EAAE,aAAa,CAAC;IAExB,IAAI,CACR,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,KAAK,EACX,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC,CAAC;IA6CvC;;;;;;OAMG;cACa,WAAW,CACzB,OAAO,EAAE,OAAO,EAChB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,WAAW,EAAE,CAAC;IA8DzB;;;;;;;;OAQG;cACa,WAAW,CACzB,IAAI,EAAE,gBAAgB,GAAG,IAAI,EAC7B,MAAM,EAAE,YAAY,EACpB,cAAc,GAAE,MAAM,EAA0C,GAC/D,OAAO,CAAC,WAAW,EAAE,CAAC;IA6CzB;;;;;;;OAOG;cACa,gBAAgB,CAC9B,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC,CAAC;CAkBlC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpResponse } from '@ibiz-template/core';
|
|
1
|
+
import { HttpResponse, ModelError, RuntimeModelError, } from '@ibiz-template/core';
|
|
2
2
|
import { ascSort, descSort } from 'qx-util';
|
|
3
3
|
import { clone, equals, isEmpty, isNil, where } from 'ramda';
|
|
4
4
|
import { SearchFilter } from '../../../utils';
|
|
@@ -16,11 +16,27 @@ import { execFieldLogics } from '../../../../de-logic';
|
|
|
16
16
|
export class FetchMethod extends Method {
|
|
17
17
|
async exec(context, data, params) {
|
|
18
18
|
if (this.isLocalMode) {
|
|
19
|
+
// 临时数据
|
|
19
20
|
const items = await this.searchLocal(null, new SearchFilter(context, data));
|
|
20
21
|
return new HttpResponse(items, 200);
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
// 根据数据集合来源查询数据
|
|
24
|
+
let res;
|
|
25
|
+
switch (this.method.dataSetType) {
|
|
26
|
+
case 'INDEXDE':
|
|
27
|
+
case 'CODELIST':
|
|
28
|
+
res = await this.fetchCodeListSet(context, params);
|
|
29
|
+
break;
|
|
30
|
+
case 'REMOTE':
|
|
31
|
+
{
|
|
32
|
+
const path = this.calcPath(context);
|
|
33
|
+
res = await this.request(path, context, data, params);
|
|
34
|
+
}
|
|
35
|
+
break;
|
|
36
|
+
default:
|
|
37
|
+
throw new ModelError(this.method, `数据来源类型${this.method.dataSetType}暂未支持`);
|
|
38
|
+
}
|
|
39
|
+
// 转换实体对象
|
|
24
40
|
const items = res.data || [];
|
|
25
41
|
res.data = items.map(item => this.createEntity(item));
|
|
26
42
|
// 计算属性逻辑,每条数据走一遍
|
|
@@ -152,4 +168,25 @@ export class FetchMethod extends Method {
|
|
|
152
168
|
const items = list.slice(start, end).map(item => clone(item));
|
|
153
169
|
return items;
|
|
154
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* 获取代码表数据来源的集合
|
|
173
|
+
* @author lxm
|
|
174
|
+
* @date 2023-08-03 02:55:00
|
|
175
|
+
* @param {IParams} context
|
|
176
|
+
* @param {IParams} params
|
|
177
|
+
* @return {*} {Promise<HttpResponse<IData[]>>}
|
|
178
|
+
*/
|
|
179
|
+
async fetchCodeListSet(context, params) {
|
|
180
|
+
const { appCodeListId } = this.method;
|
|
181
|
+
if (!appCodeListId) {
|
|
182
|
+
throw new RuntimeModelError(this.method, '没有指定数据来源代码表');
|
|
183
|
+
}
|
|
184
|
+
const codeItems = await this.app.codeList.get(appCodeListId, context, params);
|
|
185
|
+
const { keyAppDEFieldId, majorAppDEFieldId } = this.entity;
|
|
186
|
+
const dataSet = codeItems.map(item => ({
|
|
187
|
+
[keyAppDEFieldId]: item.value,
|
|
188
|
+
[majorAppDEFieldId]: item.text,
|
|
189
|
+
}));
|
|
190
|
+
return new HttpResponse(dataSet, 200);
|
|
191
|
+
}
|
|
155
192
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/runtime",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "控制器包",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "out/index.js",
|
|
@@ -21,16 +21,15 @@
|
|
|
21
21
|
"build:rollup": "rollup -c",
|
|
22
22
|
"lint": "eslint 'src/**/*.ts'",
|
|
23
23
|
"lint:fix": "eslint --fix 'src/**/*.ts'",
|
|
24
|
-
"
|
|
25
|
-
"publish:
|
|
26
|
-
"publish:
|
|
27
|
-
"publish:
|
|
28
|
-
"publish:npm": "npm publish --access public --registry=https://registry.npmjs.org/"
|
|
24
|
+
"publish:next": "npm run build && npm publish --access public --tag=next",
|
|
25
|
+
"publish:dev": "npm run build && npm publish --access public --tag=dev",
|
|
26
|
+
"publish:beta": "npm run build && npm publish --access public --tag=beta",
|
|
27
|
+
"publish:npm": "npm run build && npm publish --access public --registry=https://registry.npmjs.org/"
|
|
29
28
|
},
|
|
30
29
|
"author": "chitanda",
|
|
31
30
|
"license": "MIT",
|
|
32
31
|
"devDependencies": {
|
|
33
|
-
"@ibiz-template/core": "^0.1.
|
|
32
|
+
"@ibiz-template/core": "^0.1.1",
|
|
34
33
|
"@ibiz/model-core": "^0.0.14",
|
|
35
34
|
"@types/path-browserify": "^1.0.0",
|
|
36
35
|
"@types/qs": "^6.9.7",
|
|
@@ -44,7 +43,7 @@
|
|
|
44
43
|
"ramda": "^0.29.0"
|
|
45
44
|
},
|
|
46
45
|
"peerDependencies": {
|
|
47
|
-
"@ibiz-template/core": "^0.0
|
|
46
|
+
"@ibiz-template/core": "^0.1.0",
|
|
48
47
|
"@ibiz/model-core": "^0.0.14",
|
|
49
48
|
"async-validator": "^4.2.5",
|
|
50
49
|
"dayjs": "^1.11.7",
|
|
@@ -53,6 +52,5 @@
|
|
|
53
52
|
"qs": "^6.11.0",
|
|
54
53
|
"qx-util": "^0.4.8",
|
|
55
54
|
"ramda": "^0.29.0"
|
|
56
|
-
}
|
|
57
|
-
"gitHead": "764e1420d9056bd84442181ab3d68218c984515d"
|
|
55
|
+
}
|
|
58
56
|
}
|
|
@@ -58,7 +58,7 @@ export class OpenAppViewCommand {
|
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
60
|
const { openMode = 'INDEXVIEWTAB' } = appView;
|
|
61
|
-
switch (openMode) {
|
|
61
|
+
switch (opts.openMode || openMode) {
|
|
62
62
|
case 'INDEXVIEWTAB':
|
|
63
63
|
if (opts.noWaitRoute) {
|
|
64
64
|
this.openIndexViewTab(appView, context, params);
|
|
@@ -43,12 +43,13 @@ export class QXEventEx<T extends QXEmitter<T>> extends QXEvent<T> {
|
|
|
43
43
|
name: K,
|
|
44
44
|
...args: Parameters<T[K]>
|
|
45
45
|
): Promise<Awaited<ReturnType<T[K]>>[]> {
|
|
46
|
-
const
|
|
46
|
+
const resultPromise1 = super.asyncEmit(name, ...args);
|
|
47
47
|
// 任意事件监听回调执行,并把执行结果展开合并入原始结果集合
|
|
48
48
|
const all = this.anyEventFns.map(fn => fn(name, ...args));
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
const resultPromise2 = Promise.all(all);
|
|
50
|
+
const resultArr1 = await resultPromise1;
|
|
51
|
+
const resultArr2 = await resultPromise2;
|
|
52
|
+
return resultArr1.concat(...resultArr2);
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
reset(): void {
|
|
@@ -239,12 +239,13 @@ export class ViewEngineBase implements IViewEngine {
|
|
|
239
239
|
params,
|
|
240
240
|
);
|
|
241
241
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
242
|
+
const { data } = res;
|
|
243
|
+
if (data) {
|
|
244
|
+
this.view.state.srfactiveviewdata = data;
|
|
245
|
+
evt.emit('onDataChange', { actionType: 'LOAD', data: [data] });
|
|
246
|
+
if (data.srfkey) {
|
|
247
|
+
evt.emit('onViewInfoChange', { dataInfo: data.srfmajortext || '' });
|
|
248
|
+
}
|
|
248
249
|
}
|
|
249
250
|
}
|
|
250
251
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { EventBase } from '../argument';
|
|
2
|
+
import { IDataViewEvent } from './i-data-view.event';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 选择数据视图事件
|
|
6
|
+
*
|
|
7
|
+
* @author lxm
|
|
8
|
+
* @date 2022-09-13 10:09:00
|
|
9
|
+
* @export
|
|
10
|
+
* @interface IPickupDataViewEvent
|
|
11
|
+
* @extends {IGridViewEvent}
|
|
12
|
+
*/
|
|
13
|
+
export interface IPickupDataViewEvent extends IDataViewEvent {
|
|
14
|
+
/**
|
|
15
|
+
* 选中数据变更事件
|
|
16
|
+
*
|
|
17
|
+
* @author lxm
|
|
18
|
+
* @date 2022-08-31 14:08:12
|
|
19
|
+
* @param {IData[]} selection 选中的数据集合
|
|
20
|
+
*/
|
|
21
|
+
onSelectionChange: {
|
|
22
|
+
event: EventBase;
|
|
23
|
+
emitArgs: { data: IData[] };
|
|
24
|
+
};
|
|
25
|
+
}
|
|
@@ -12,6 +12,7 @@ export * from './i-tree-view.event';
|
|
|
12
12
|
export * from './i-pickup-view.event';
|
|
13
13
|
export * from './i-mpickup-view.event';
|
|
14
14
|
export * from './i-pickup-grid-view.event';
|
|
15
|
+
export * from './i-pickup-data-view.event';
|
|
15
16
|
export * from './i-wf-edit-view.event';
|
|
16
17
|
export * from './i-wf-dyna-edit-view.event';
|
|
17
18
|
export * from './i-wf-dyna-edit-view3.event';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IDataViewState } from './i-data-view.state';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 表格选择视图UI状态
|
|
5
|
+
*
|
|
6
|
+
* @author zk
|
|
7
|
+
* @date 2023-05-25 05:05:43
|
|
8
|
+
* @export
|
|
9
|
+
* @interface IPickupDataViewState
|
|
10
|
+
* @extends {IGridViewState}
|
|
11
|
+
*/
|
|
12
|
+
export interface IPickupDataViewState extends IDataViewState {
|
|
13
|
+
/**
|
|
14
|
+
* 是否单选
|
|
15
|
+
*
|
|
16
|
+
* @author zk
|
|
17
|
+
* @date 2023-05-26 05:05:02
|
|
18
|
+
* @type {boolean}
|
|
19
|
+
* @memberof IPickupDataViewState
|
|
20
|
+
*/
|
|
21
|
+
singleSelect: boolean;
|
|
22
|
+
}
|
|
@@ -9,6 +9,7 @@ export * from './i-opt-view.state';
|
|
|
9
9
|
export * from './i-mpickup-view.state';
|
|
10
10
|
export * from './i-pickup-view.state';
|
|
11
11
|
export * from './i-pickup-grid-view.state';
|
|
12
|
+
export * from './i-pickup-data-view.state';
|
|
12
13
|
export * from './i-tab-exp-view.state';
|
|
13
14
|
export * from './i-exp-view.state';
|
|
14
15
|
export * from './i-grid-exp-view.state';
|