@ibiz-template/runtime 0.4.8-dev.0 → 0.4.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 +23 -13
- package/dist/index.system.min.js +1 -1
- package/out/logic-scheduler/executor/app-ui-logic-executor.d.ts +1 -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 +15 -8
- package/out/model/ui-action/ui-action.d.ts +4 -2
- package/out/model/ui-action/ui-action.d.ts.map +1 -1
- package/out/model/ui-action/ui-action.js +4 -2
- package/package.json +2 -2
- package/src/logic-scheduler/executor/app-ui-logic-executor.ts +22 -15
- package/src/model/ui-action/ui-action.ts +4 -2
|
@@ -11,7 +11,7 @@ import { LogicExecutor } from './logic-executor';
|
|
|
11
11
|
*/
|
|
12
12
|
export declare class AppUILogicExecutor extends LogicExecutor {
|
|
13
13
|
type: 'APPUILOGIC';
|
|
14
|
-
execute(executeParams: IUILogicParams): any
|
|
14
|
+
execute(executeParams: IUILogicParams): Promise<any>;
|
|
15
15
|
/**
|
|
16
16
|
* 执行应用预置界面逻辑 opendata
|
|
17
17
|
*
|
|
@@ -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":"AAKA,OAAO,EACL,mBAAmB,EAEnB,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAG7D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD;;;;;;;GAOG;AACH,qBAAa,kBAAmB,SAAQ,aAAa;IAC3C,IAAI,EAAE,YAAY,CAAC;
|
|
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,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAG7D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD;;;;;;;GAOG;AACH,qBAAa,kBAAmB,SAAQ,aAAa;IAC3C,IAAI,EAAE,YAAY,CAAC;IAGrB,OAAO,CAAC,aAAa,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;IAsB1D;;;;;;;;OAQG;IACG,yBAAyB,CAC7B,UAAU,EAAE,mBAAmB,EAC/B,UAAU,EAAE,cAAc,GACzB,OAAO,CAAC,UAAU,CAAC;cAsDN,eAAe,CAC7B,UAAU,EAAE,mBAAmB,EAC/B,UAAU,EAAE,cAAc,GACzB,OAAO,CAAC,sBAAsB,CAAC;IA+BlC;;;;;;;;;;;OAWG;IACG,wBAAwB,CAC5B,UAAU,EAAE,kBAAkB,EAC9B,UAAU,EAAE,cAAc,GACzB,OAAO,CAAC,UAAU,CAAC;IA0FtB;;;;;;;;;;OAUG;cACa,mBAAmB,CACjC,UAAU,EAAE,kBAAkB,EAC9B,UAAU,EAAE,cAAc,GACzB,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAAC;IAqC9C;;;;;;;;;;OAUG;cACa,UAAU,CACxB,UAAU,EAAE,mBAAmB,EAC/B,UAAU,EAAE,KAAK,EAAE,EACnB,OAAO,EAAE,QAAQ,EACjB,UAAU,EAAE,sBAAsB,GACjC,OAAO,CAAC,IAAI,CAAC;CA+DjB"}
|
|
@@ -26,15 +26,22 @@ import { Srfuf } from '../../service';
|
|
|
26
26
|
*/
|
|
27
27
|
export class AppUILogicExecutor extends LogicExecutor {
|
|
28
28
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29
|
-
execute(executeParams) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
async execute(executeParams) {
|
|
30
|
+
let result;
|
|
31
|
+
try {
|
|
32
|
+
if (this.logic.id === 'opendata' && this.logic.builtinAppUILogic) {
|
|
33
|
+
// 执行打开数据界面逻辑
|
|
34
|
+
result = await this.executeOpenDataAppUILogic(this.logic.builtinAppUILogic, executeParams);
|
|
35
|
+
}
|
|
36
|
+
else if (this.logic.id === 'newdata' && this.logic.builtinAppUILogic) {
|
|
37
|
+
// 执行新建数据逻辑
|
|
38
|
+
result = await this.executeNewDataAppUILogic(this.logic.builtinAppUILogic, executeParams);
|
|
39
|
+
}
|
|
33
40
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return this.executeNewDataAppUILogic(this.logic.builtinAppUILogic, executeParams);
|
|
41
|
+
catch (error) {
|
|
42
|
+
ibiz.log.error(error);
|
|
37
43
|
}
|
|
44
|
+
return result;
|
|
38
45
|
}
|
|
39
46
|
/**
|
|
40
47
|
* 执行应用预置界面逻辑 opendata
|
|
@@ -210,7 +217,7 @@ export class AppUILogicExecutor extends LogicExecutor {
|
|
|
210
217
|
throw new RuntimeError('请选中一条数据');
|
|
211
218
|
}
|
|
212
219
|
const indexType = selectData.srfkey;
|
|
213
|
-
const findView = newDataAppViews === null || newDataAppViews === void 0 ? void 0 : newDataAppViews.find(item => item.refMode === indexType);
|
|
220
|
+
const findView = newDataAppViews === null || newDataAppViews === void 0 ? void 0 : newDataAppViews.find(item => { var _a; return ((_a = item.refMode) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === indexType.toUpperCase(); });
|
|
214
221
|
if (!findView) {
|
|
215
222
|
throw new RuntimeError(`没有找到与索引类型${indexType}相关的实体的编辑视图`);
|
|
216
223
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { IAppDEUIAction } from '@ibiz/model-core';
|
|
2
2
|
/**
|
|
3
3
|
* 通过id获取界面行为模型方法
|
|
4
|
-
*
|
|
5
|
-
* @
|
|
4
|
+
*
|
|
5
|
+
* @author chitanda
|
|
6
|
+
* @date 2023-12-07 17:12:16
|
|
6
7
|
* @export
|
|
7
8
|
* @param {string} id
|
|
9
|
+
* @param {string} appId
|
|
8
10
|
* @return {*} {(Promise<IAppDEUIAction | undefined>)}
|
|
9
11
|
*/
|
|
10
12
|
export declare function getUIActionById(id: string, appId: string): Promise<IAppDEUIAction | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-action.d.ts","sourceRoot":"","sources":["../../../src/model/ui-action/ui-action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD
|
|
1
|
+
{"version":3,"file":"ui-action.d.ts","sourceRoot":"","sources":["../../../src/model/ui-action/ui-action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CACnC,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,CAGrC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 通过id获取界面行为模型方法
|
|
3
|
-
*
|
|
4
|
-
* @
|
|
3
|
+
*
|
|
4
|
+
* @author chitanda
|
|
5
|
+
* @date 2023-12-07 17:12:16
|
|
5
6
|
* @export
|
|
6
7
|
* @param {string} id
|
|
8
|
+
* @param {string} appId
|
|
7
9
|
* @return {*} {(Promise<IAppDEUIAction | undefined>)}
|
|
8
10
|
*/
|
|
9
11
|
export async function getUIActionById(id, appId) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/runtime",
|
|
3
|
-
"version": "0.4.8
|
|
3
|
+
"version": "0.4.8",
|
|
4
4
|
"description": "控制器包",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "out/index.js",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"qx-util": "^0.4.8",
|
|
60
60
|
"ramda": "^0.29.0"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "54f1322c5e90608479187318be4de3cfaea79f56"
|
|
63
63
|
}
|
|
@@ -29,21 +29,26 @@ export class AppUILogicExecutor extends LogicExecutor {
|
|
|
29
29
|
declare type: 'APPUILOGIC';
|
|
30
30
|
|
|
31
31
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32
|
-
execute(executeParams: IUILogicParams): any {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
this.
|
|
44
|
-
|
|
45
|
-
|
|
32
|
+
async execute(executeParams: IUILogicParams): Promise<any> {
|
|
33
|
+
let result;
|
|
34
|
+
try {
|
|
35
|
+
if (this.logic.id === 'opendata' && this.logic.builtinAppUILogic) {
|
|
36
|
+
// 执行打开数据界面逻辑
|
|
37
|
+
result = await this.executeOpenDataAppUILogic(
|
|
38
|
+
this.logic.builtinAppUILogic as IAppUIOpenDataLogic,
|
|
39
|
+
executeParams,
|
|
40
|
+
);
|
|
41
|
+
} else if (this.logic.id === 'newdata' && this.logic.builtinAppUILogic) {
|
|
42
|
+
// 执行新建数据逻辑
|
|
43
|
+
result = await this.executeNewDataAppUILogic(
|
|
44
|
+
this.logic.builtinAppUILogic as IAppUINewDataLogic,
|
|
45
|
+
executeParams,
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
} catch (error) {
|
|
49
|
+
ibiz.log.error(error);
|
|
46
50
|
}
|
|
51
|
+
return result;
|
|
47
52
|
}
|
|
48
53
|
|
|
49
54
|
/**
|
|
@@ -291,7 +296,9 @@ export class AppUILogicExecutor extends LogicExecutor {
|
|
|
291
296
|
throw new RuntimeError('请选中一条数据');
|
|
292
297
|
}
|
|
293
298
|
const indexType = selectData.srfkey;
|
|
294
|
-
const findView = newDataAppViews?.find(
|
|
299
|
+
const findView = newDataAppViews?.find(
|
|
300
|
+
item => item.refMode?.toUpperCase() === indexType.toUpperCase(),
|
|
301
|
+
);
|
|
295
302
|
if (!findView) {
|
|
296
303
|
throw new RuntimeError(
|
|
297
304
|
`没有找到与索引类型${indexType}相关的实体的编辑视图`,
|
|
@@ -2,10 +2,12 @@ import { IAppDEUIAction } from '@ibiz/model-core';
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* 通过id获取界面行为模型方法
|
|
5
|
-
*
|
|
6
|
-
* @
|
|
5
|
+
*
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2023-12-07 17:12:16
|
|
7
8
|
* @export
|
|
8
9
|
* @param {string} id
|
|
10
|
+
* @param {string} appId
|
|
9
11
|
* @return {*} {(Promise<IAppDEUIAction | undefined>)}
|
|
10
12
|
*/
|
|
11
13
|
export async function getUIActionById(
|