@ibiz-template/runtime 0.1.32 → 0.1.33
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 +166 -112
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/controller/common/control/md-control.controller.js +1 -1
- package/out/controller/common/editor/code-list-editor.controller.d.ts.map +1 -1
- package/out/controller/common/editor/code-list-editor.controller.js +1 -1
- package/out/controller/control/form/search-form/search-form.service.d.ts +8 -0
- package/out/controller/control/form/search-form/search-form.service.d.ts.map +1 -1
- package/out/controller/control/form/search-form/search-form.service.js +19 -2
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +15 -7
- package/out/service/service/entity/method/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +2 -1
- package/out/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.js +16 -2
- 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 +5 -0
- package/package.json +5 -5
- package/src/controller/common/control/md-control.controller.ts +1 -1
- package/src/controller/common/editor/code-list-editor.controller.ts +4 -1
- package/src/controller/control/form/search-form/search-form.service.ts +20 -2
- package/src/controller/control/tree/tree.controller.ts +15 -8
- package/src/service/service/entity/method/de-action.ts +7 -1
- package/src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts +24 -2
- package/src/ui-logic/ui-logic-param/ui-logic-param.ts +7 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-list-editor.controller.d.ts","sourceRoot":"","sources":["../../../../src/controller/common/editor/code-list-editor.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;;;;;GAQG;AACH,qBAAa,wBAAwB,CACnC,CAAC,SAAS,eAAe,GAAG,eAAe,CAC3C,SAAQ,gBAAgB,CAAC,CAAC,CAAC;IAC3B;;;;;OAKG;IACU,YAAY,CAAC,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC,SAAS,YAAY,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"code-list-editor.controller.d.ts","sourceRoot":"","sources":["../../../../src/controller/common/editor/code-list-editor.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;;;;;GAQG;AACH,qBAAa,wBAAwB,CACnC,CAAC,SAAS,eAAe,GAAG,eAAe,CAC3C,SAAQ,gBAAgB,CAAC,CAAC,CAAC;IAC3B;;;;;OAKG;IACU,YAAY,CAAC,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC,SAAS,YAAY,EAAE,CAAC;CAqBzE"}
|
|
@@ -24,6 +24,6 @@ export class CodeListEditorController extends EditorController {
|
|
|
24
24
|
dataItems = await app.codeList.get(this.model.appCodeListId, context, params);
|
|
25
25
|
return dataItems;
|
|
26
26
|
}
|
|
27
|
-
throw new RuntimeModelError(this.model,
|
|
27
|
+
throw new RuntimeModelError(this.model, `编辑器类型[${this.model.editorType}],未配置代码表`);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -38,5 +38,13 @@ export declare class SearchFormService<T extends IDESearchForm = IDESearchForm>
|
|
|
38
38
|
* @returns {*} {IHttpResponse}
|
|
39
39
|
*/
|
|
40
40
|
handleResponse(response: IHttpResponse): IHttpResponse<ControlVO>;
|
|
41
|
+
/**
|
|
42
|
+
* 根据表单项过滤出数据
|
|
43
|
+
*
|
|
44
|
+
* @return {*}
|
|
45
|
+
* @author: zhujiamin
|
|
46
|
+
* @Date: 2023-09-01 10:04:25
|
|
47
|
+
*/
|
|
48
|
+
getFilteredData(data: IData): IData;
|
|
41
49
|
}
|
|
42
50
|
//# sourceMappingURL=search-form.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-form.service.d.ts","sourceRoot":"","sources":["../../../../../src/controller/control/form/search-form/search-form.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAoB,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAiB,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,SAAS,EAAc,MAAM,qBAAqB,CAAC;AAE5E;;;;;;;;;GASG;AACH,qBAAa,iBAAiB,CAC5B,CAAC,SAAS,aAAa,GAAG,aAAa,CACvC,SAAQ,cAAc,CAAC,CAAC,CAAC;IACzB;;;;;;;;OAQG;IACG,QAAQ,CACZ,QAAQ,EAAE,OAAO,EACjB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"search-form.service.d.ts","sourceRoot":"","sources":["../../../../../src/controller/control/form/search-form/search-form.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAoB,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAiB,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,SAAS,EAAc,MAAM,qBAAqB,CAAC;AAE5E;;;;;;;;;GASG;AACH,qBAAa,iBAAiB,CAC5B,CAAC,SAAS,aAAa,GAAG,aAAa,CACvC,SAAQ,cAAc,CAAC,CAAC,CAAC;IACzB;;;;;;;;OAQG;IACG,QAAQ,CACZ,QAAQ,EAAE,OAAO,EACjB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAOpC;;;;;OAKG;IACH,SAAS,CAAC,aAAa,IAAI,IAAI;IAgB/B;;;;;;;OAOG;IACH,cAAc,CAAC,QAAQ,EAAE,aAAa,GAAG,aAAa,CAAC,SAAS,CAAC;IAQjE;;;;;;OAMG;IACH,eAAe,CAAC,IAAI,EAAE,KAAK,GAAG,KAAK;CASpC"}
|
|
@@ -21,7 +21,8 @@ export class SearchFormService extends ControlService {
|
|
|
21
21
|
* @returns {*} {Promise<IHttpResponse>}
|
|
22
22
|
*/
|
|
23
23
|
async getDraft(_context, params = {}) {
|
|
24
|
-
|
|
24
|
+
const tempData = this.getFilteredData(Object.assign({}, params));
|
|
25
|
+
let res = { ok: true, status: 200, data: tempData };
|
|
25
26
|
res = this.handleResponse(res);
|
|
26
27
|
return res;
|
|
27
28
|
}
|
|
@@ -39,7 +40,7 @@ export class SearchFormService extends ControlService {
|
|
|
39
40
|
this.dataUIMap.set(uiKey, new UIMapField(uiKey, uiKey));
|
|
40
41
|
}
|
|
41
42
|
}, {
|
|
42
|
-
childrenFields: ['deformPages', 'deformDetails'],
|
|
43
|
+
childrenFields: ['deformPages', 'deformTabPages', 'deformDetails'],
|
|
43
44
|
});
|
|
44
45
|
}
|
|
45
46
|
/**
|
|
@@ -57,4 +58,20 @@ export class SearchFormService extends ControlService {
|
|
|
57
58
|
}
|
|
58
59
|
return res;
|
|
59
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* 根据表单项过滤出数据
|
|
63
|
+
*
|
|
64
|
+
* @return {*}
|
|
65
|
+
* @author: zhujiamin
|
|
66
|
+
* @Date: 2023-09-01 10:04:25
|
|
67
|
+
*/
|
|
68
|
+
getFilteredData(data) {
|
|
69
|
+
const tempData = {};
|
|
70
|
+
this.dataUIMap.forEach(dataUI => {
|
|
71
|
+
if (data[dataUI.dataKey] !== undefined) {
|
|
72
|
+
tempData[dataUI.dataKey] = data[dataUI.dataKey];
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
return tempData;
|
|
76
|
+
}
|
|
60
77
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.controller.d.ts","sourceRoot":"","sources":["../../../../src/controller/control/tree/tree.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EACL,UAAU,EACV,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,aAAa,EACd,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;;;GAQG;AACH,qBAAa,cACX,SAAQ,mBAAmB,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAC3D,YAAW,eAAe;IAElB,OAAO,EAAE,WAAW,CAAC;IAE7B;;;;;OAKG;IACH,YAAY,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,qBAAqB,CAAA;KAAE,CAAM;IAE1D,SAAS,CAAC,SAAS,IAAI,IAAI;cAQX,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IA0B1C;;;;;OAKG;IACG,IAAI,CAAC,IAAI,GAAE,gBAAqB,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAsBjE;;;;;;OAMG;IACG,SAAS,CAAC,UAAU,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"tree.controller.d.ts","sourceRoot":"","sources":["../../../../src/controller/control/tree/tree.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EACL,UAAU,EACV,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,aAAa,EACd,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;;;GAQG;AACH,qBAAa,cACX,SAAQ,mBAAmB,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAC3D,YAAW,eAAe;IAElB,OAAO,EAAE,WAAW,CAAC;IAE7B;;;;;OAKG;IACH,YAAY,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,qBAAqB,CAAA;KAAE,CAAM;IAE1D,SAAS,CAAC,SAAS,IAAI,IAAI;cAQX,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IA0B1C;;;;;OAKG;IACG,IAAI,CAAC,IAAI,GAAE,gBAAqB,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAsBjE;;;;;;OAMG;IACG,SAAS,CAAC,UAAU,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAyCrE;;;;;;OAMG;IACG,eAAe,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAwB7D;;;;;;OAMG;IACH,cAAc,CAAC,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,GAAG,IAAI;IAYhE;;;;;;OAMG;IACG,iBAAiB,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAM/D,SAAS,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAK7C,YAAY,CAAC,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI;IAWtC;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAIjD;;;;;;;;OAQG;IACG,UAAU,CACd,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,aAAa,EACvB,KAAK,EAAE,UAAU,GAChB,OAAO,CAAC,IAAI,CAAC;IA6BhB;;;;;;OAMG;IACH,SAAS,CAAC,iBAAiB,CAAC,QAAQ,EAAE,aAAa,GAAG;QACpD,IAAI,EAAE,KAAK,EAAE,CAAC;QACd,OAAO,EAAE,QAAQ,CAAC;QAClB,MAAM,EAAE,OAAO,CAAC;KACjB;IAQD;;;;;;;OAOG;IACH,gBAAgB,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,MAAM,EAAE;IAgBlD;;;;;;;OAOG;IACG,mBAAmB,CACvB,QAAQ,EAAE,aAAa,GAAG,KAAK,EAC/B,aAAa,UAAQ,GACpB,OAAO,CAAC,IAAI,CAAC;CA+BjB"}
|
|
@@ -83,13 +83,21 @@ export class TreeController extends MDControlController {
|
|
|
83
83
|
async loadNodes(parentNode) {
|
|
84
84
|
const params = await this.getFetchParams();
|
|
85
85
|
const hasQuery = !!params.query;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
86
|
+
this.state.isLoading = true;
|
|
87
|
+
let nodes;
|
|
88
|
+
try {
|
|
89
|
+
// 请求服务获取子节点数据
|
|
90
|
+
nodes =
|
|
91
|
+
(await this.service.fetchChildNodes(parentNode, {
|
|
92
|
+
context: this.context.clone(),
|
|
93
|
+
params,
|
|
94
|
+
hasQuery,
|
|
95
|
+
defaultExpandedKeys: this.state.expandedKeys,
|
|
96
|
+
})) || [];
|
|
97
|
+
}
|
|
98
|
+
finally {
|
|
99
|
+
this.state.isLoading = false;
|
|
100
|
+
}
|
|
93
101
|
// 有父节点绑定到父节点数据上,无父节点替换rootNodes
|
|
94
102
|
if (parentNode) {
|
|
95
103
|
parentNode.children = nodes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"de-action.d.ts","sourceRoot":"","sources":["../../../../../src/service/service/entity/method/de-action.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EAEd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"de-action.d.ts","sourceRoot":"","sources":["../../../../../src/service/service/entity/method/de-action.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EAEd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAKpD;;;;;;;;GAQG;AACH,qBAAa,cAAe,SAAQ,MAAM;IAChC,MAAM,EAAE,YAAY,CAAC;IAE7B;;;;;;;;OAQG;IACH,SAAS,KAAK,WAAW,IAAI,OAAO,CAEnC;IAEK,IAAI,CACR,OAAO,EAAE,OAAO,EAChB,IAAI,CAAC,EAAE,KAAK,EACZ,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAmF/B;;;;;;;;OAQG;IACG,MAAM,CACV,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,KAAK,EACX,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IAUtC;;;;;;;;OAQG;IACG,MAAM,CACV,OAAO,EAAE,OAAO,EAChB,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IAYtC;;;;;;;;;OASG;IACG,MAAM,CACV,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,KAAK,GAAG,WAAW,EACzB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IActC;;;;;;;;OAQG;IACG,GAAG,CACP,OAAO,EAAE,OAAO,EAChB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IAatC;;;;;;;;OAQG;IACG,QAAQ,CACZ,OAAO,EAAE,OAAO,EAChB,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAUhC;;;;;;;;OAQG;IACG,UAAU,CACd,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,KAAK,GACZ,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IAUtC;;;;;;;;OAQG;IACG,YAAY,CAChB,QAAQ,EAAE,OAAO,EACjB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IAatC;;;;;;;;OAQG;IACG,UAAU,CACd,OAAO,EAAE,OAAO,EAChB,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IAoBtC;;;;;;;;OAQG;IACG,UAAU,CACd,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,KAAK,GACZ,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IAatC;;;;;;;;OAQG;IACG,OAAO,CACX,OAAO,EAAE,OAAO,EAChB,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IAqBtC;;;;;;OAMG;IACG,eAAe,CACnB,QAAQ,EAAE,OAAO,EACjB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,aAAa,CAAC;CAc1B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { HttpResponse, RuntimeModelError, } from '@ibiz-template/core';
|
|
2
|
+
import { clone } from 'ramda';
|
|
2
3
|
import { Method } from './method';
|
|
3
4
|
import { findDELogic } from '../../../../model';
|
|
4
5
|
import { execDELogicAction, execFieldLogics } from '../../../../de-logic';
|
|
@@ -32,7 +33,7 @@ export class DEActionMethod extends Method {
|
|
|
32
33
|
if (!deLogic) {
|
|
33
34
|
throw new RuntimeModelError(this.method, '缺少实体处理逻辑');
|
|
34
35
|
}
|
|
35
|
-
return execDELogicAction(deLogic, context, data
|
|
36
|
+
return execDELogicAction(deLogic, clone(context), data ? clone(data) : {}, params ? clone(params) : {});
|
|
36
37
|
}
|
|
37
38
|
if (data && !this.isLocalMode) {
|
|
38
39
|
data = await this.input.handle(context, data);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare-js-param-node.d.ts","sourceRoot":"","sources":["../../../../src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"prepare-js-param-node.d.ts","sourceRoot":"","sources":["../../../../src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;;;;;;;GAQG;AACH,qBAAa,kBAAmB,SAAQ,WAAW;IAC3C,IAAI,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IA4C9C;;;;;;;OAOG;IACH,SAAS,CAAC,aAAa,CACrB,SAAS,EAAE,mBAAmB,EAC9B,GAAG,EAAE,cAAc,GAClB,IAAI;IAwCP;;;;;;;;OAQG;IACH,SAAS,CAAC,SAAS,CACjB,SAAS,EAAE,mBAAmB,EAC9B,GAAG,EAAE,cAAc,GAClB,IAAI;IAMP;;;;;;;OAOG;IACH,SAAS,CAAC,SAAS,CACjB,SAAS,EAAE,mBAAmB,EAC9B,GAAG,EAAE,cAAc,GAClB,IAAI;IAKP;;;;;;;OAOG;IACH,SAAS,CAAC,UAAU,CAClB,SAAS,EAAE,mBAAmB,EAC9B,GAAG,EAAE,cAAc,GAClB,IAAI;IAKP;;;;;;;OAOG;IACH,SAAS,CAAC,UAAU,CAClB,SAAS,EAAE,mBAAmB,EAC9B,GAAG,EAAE,cAAc,GAClB,IAAI;IAKP;;;;;;;OAOG;IACH,SAAS,CAAC,WAAW,CACnB,SAAS,EAAE,mBAAmB,EAC9B,GAAG,EAAE,cAAc,GAClB,IAAI;IAaP;;;;;;;OAOG;IACH,SAAS,CAAC,SAAS,CACjB,SAAS,EAAE,mBAAmB,EAC9B,GAAG,EAAE,cAAc,GAClB,IAAI;CAQR"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable no-await-in-loop */
|
|
2
|
-
import { ModelError } from '@ibiz-template/core';
|
|
2
|
+
import { ModelError, RuntimeError } from '@ibiz-template/core';
|
|
3
3
|
import { clone } from 'ramda';
|
|
4
|
+
import { ScriptFactory } from '../../../utils';
|
|
4
5
|
import { handleSrcVal } from '../../utils';
|
|
5
6
|
import { UILogicNode } from '../ui-logic-node';
|
|
6
7
|
/**
|
|
@@ -63,6 +64,9 @@ export class PrepareJSParamNode extends UILogicNode {
|
|
|
63
64
|
*/
|
|
64
65
|
setParamValue(nodeParam, ctx) {
|
|
65
66
|
const { dstFieldName, dstDEUILogicParamId } = nodeParam;
|
|
67
|
+
if (!dstDEUILogicParamId) {
|
|
68
|
+
throw new RuntimeError('没有目标参数对象id');
|
|
69
|
+
}
|
|
66
70
|
// 目标参数
|
|
67
71
|
let dstField = dstFieldName;
|
|
68
72
|
// 实体参数对象转小写
|
|
@@ -72,7 +76,17 @@ export class PrepareJSParamNode extends UILogicNode {
|
|
|
72
76
|
// 源参数
|
|
73
77
|
const srcVal = handleSrcVal(ctx, nodeParam);
|
|
74
78
|
if (dstField) {
|
|
75
|
-
|
|
79
|
+
// 赋值属性的时候支持脚本写法
|
|
80
|
+
try {
|
|
81
|
+
ScriptFactory.execScriptFn({ srcVal, dstParam: ctx.params[dstDEUILogicParamId] }, `dstParam.${dstFieldName} = srcVal`, {
|
|
82
|
+
singleRowReturn: false,
|
|
83
|
+
isAsync: false,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
ibiz.log.error(`给目标参数属性${dstFieldName}赋值报错,目标参数:`, ctx.params[dstDEUILogicParamId]);
|
|
88
|
+
throw error;
|
|
89
|
+
}
|
|
76
90
|
}
|
|
77
91
|
else {
|
|
78
92
|
ctx.params[dstDEUILogicParamId] = srcVal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-logic-param.d.ts","sourceRoot":"","sources":["../../../src/ui-logic/ui-logic-param/ui-logic-param.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;;;;GAOG;AACH,qBAAa,YAAY;IAQJ,KAAK,EAAE,eAAe;IAPzC;;;;;;OAMG;gBACgB,KAAK,EAAE,eAAe;IAEzC;;;;;;OAMG;IACH,IAAI,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"ui-logic-param.d.ts","sourceRoot":"","sources":["../../../src/ui-logic/ui-logic-param/ui-logic-param.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;;;;GAOG;AACH,qBAAa,YAAY;IAQJ,KAAK,EAAE,eAAe;IAPzC;;;;;;OAMG;gBACgB,KAAK,EAAE,eAAe;IAEzC;;;;;;OAMG;IACH,IAAI,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI;IAqE/B;;;;;OAKG;IACH,KAAK,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI;CAWjC"}
|
|
@@ -30,6 +30,11 @@ export class UILogicParam {
|
|
|
30
30
|
const m = this.model;
|
|
31
31
|
const { context, viewParams, data, parameters } = ctx;
|
|
32
32
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
33
|
+
// 特殊变量的特殊处理
|
|
34
|
+
if (m.codeName === 'layoutPanel') {
|
|
35
|
+
ctx.params[tag] = parameters.view.layoutPanel.panelItems;
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
33
38
|
if (m.default) {
|
|
34
39
|
ctx.params[tag] = data && data.length > 0 ? data[0] : {};
|
|
35
40
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/runtime",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.33",
|
|
4
4
|
"description": "控制器包",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "out/index.js",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"author": "chitanda",
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@ibiz-template/core": "^0.1.
|
|
33
|
-
"@ibiz/model-core": "^0.0.
|
|
32
|
+
"@ibiz-template/core": "^0.1.33",
|
|
33
|
+
"@ibiz/model-core": "^0.0.19",
|
|
34
34
|
"@types/path-browserify": "^1.0.0",
|
|
35
35
|
"@types/qs": "^6.9.8",
|
|
36
36
|
"@types/systemjs": "^6.13.3",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@ibiz-template/core": "^0.1.0",
|
|
49
|
-
"@ibiz/model-core": "^0.0.
|
|
49
|
+
"@ibiz/model-core": "^0.0.19",
|
|
50
50
|
"async-validator": "^4.2.5",
|
|
51
51
|
"dayjs": "^1.11.7",
|
|
52
52
|
"echarts": "^5.4.3",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"qx-util": "^0.4.8",
|
|
58
58
|
"ramda": "^0.29.0"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "769acca4bc7229f5d27f57e803a9f1d3ea7172ac"
|
|
61
61
|
}
|
|
@@ -28,7 +28,8 @@ export class SearchFormService<
|
|
|
28
28
|
_context: IParams,
|
|
29
29
|
params: IParams = {},
|
|
30
30
|
): Promise<IHttpResponse<ControlVO>> {
|
|
31
|
-
|
|
31
|
+
const tempData = this.getFilteredData({ ...params });
|
|
32
|
+
let res = { ok: true, status: 200, data: tempData } as IHttpResponse;
|
|
32
33
|
res = this.handleResponse(res);
|
|
33
34
|
return res as IHttpResponse<ControlVO>;
|
|
34
35
|
}
|
|
@@ -50,7 +51,7 @@ export class SearchFormService<
|
|
|
50
51
|
}
|
|
51
52
|
},
|
|
52
53
|
{
|
|
53
|
-
childrenFields: ['deformPages', 'deformDetails'],
|
|
54
|
+
childrenFields: ['deformPages', 'deformTabPages', 'deformDetails'],
|
|
54
55
|
},
|
|
55
56
|
);
|
|
56
57
|
}
|
|
@@ -70,4 +71,21 @@ export class SearchFormService<
|
|
|
70
71
|
}
|
|
71
72
|
return res as IHttpResponse<ControlVO>;
|
|
72
73
|
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 根据表单项过滤出数据
|
|
77
|
+
*
|
|
78
|
+
* @return {*}
|
|
79
|
+
* @author: zhujiamin
|
|
80
|
+
* @Date: 2023-09-01 10:04:25
|
|
81
|
+
*/
|
|
82
|
+
getFilteredData(data: IData): IData {
|
|
83
|
+
const tempData: IData = {};
|
|
84
|
+
this.dataUIMap.forEach(dataUI => {
|
|
85
|
+
if (data[dataUI.dataKey] !== undefined) {
|
|
86
|
+
tempData[dataUI.dataKey] = data[dataUI.dataKey];
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
return tempData;
|
|
90
|
+
}
|
|
73
91
|
}
|
|
@@ -109,14 +109,21 @@ export class TreeController
|
|
|
109
109
|
const params = await this.getFetchParams();
|
|
110
110
|
const hasQuery = !!params.query;
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
112
|
+
this.state.isLoading = true;
|
|
113
|
+
|
|
114
|
+
let nodes;
|
|
115
|
+
try {
|
|
116
|
+
// 请求服务获取子节点数据
|
|
117
|
+
nodes =
|
|
118
|
+
(await this.service.fetchChildNodes(parentNode, {
|
|
119
|
+
context: this.context.clone(),
|
|
120
|
+
params,
|
|
121
|
+
hasQuery,
|
|
122
|
+
defaultExpandedKeys: this.state.expandedKeys,
|
|
123
|
+
})) || [];
|
|
124
|
+
} finally {
|
|
125
|
+
this.state.isLoading = false;
|
|
126
|
+
}
|
|
120
127
|
|
|
121
128
|
// 有父节点绑定到父节点数据上,无父节点替换rootNodes
|
|
122
129
|
if (parentNode) {
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
RuntimeModelError,
|
|
5
5
|
} from '@ibiz-template/core';
|
|
6
6
|
import { IAppDEAction } from '@ibiz/model-core';
|
|
7
|
+
import { clone } from 'ramda';
|
|
7
8
|
import { Method } from './method';
|
|
8
9
|
import { IDataEntity } from '../../../../interface';
|
|
9
10
|
import { findDELogic } from '../../../../model';
|
|
@@ -47,7 +48,12 @@ export class DEActionMethod extends Method {
|
|
|
47
48
|
if (!deLogic) {
|
|
48
49
|
throw new RuntimeModelError(this.method, '缺少实体处理逻辑');
|
|
49
50
|
}
|
|
50
|
-
return execDELogicAction(
|
|
51
|
+
return execDELogicAction(
|
|
52
|
+
deLogic,
|
|
53
|
+
clone(context),
|
|
54
|
+
data ? clone(data) : {},
|
|
55
|
+
params ? clone(params) : {},
|
|
56
|
+
);
|
|
51
57
|
}
|
|
52
58
|
|
|
53
59
|
if (data && !this.isLocalMode) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/* eslint-disable no-await-in-loop */
|
|
2
|
-
import { ModelError } from '@ibiz-template/core';
|
|
2
|
+
import { ModelError, RuntimeError } from '@ibiz-template/core';
|
|
3
3
|
import { IDEUILogicNodeParam } from '@ibiz/model-core';
|
|
4
4
|
import { clone } from 'ramda';
|
|
5
|
+
import { ScriptFactory } from '../../../utils';
|
|
5
6
|
import { UILogicContext } from '../../ui-logic-context';
|
|
6
7
|
import { handleSrcVal } from '../../utils';
|
|
7
8
|
import { UILogicNode } from '../ui-logic-node';
|
|
@@ -73,6 +74,11 @@ export class PrepareJSParamNode extends UILogicNode {
|
|
|
73
74
|
ctx: UILogicContext,
|
|
74
75
|
): void {
|
|
75
76
|
const { dstFieldName, dstDEUILogicParamId } = nodeParam;
|
|
77
|
+
|
|
78
|
+
if (!dstDEUILogicParamId) {
|
|
79
|
+
throw new RuntimeError('没有目标参数对象id');
|
|
80
|
+
}
|
|
81
|
+
|
|
76
82
|
// 目标参数
|
|
77
83
|
let dstField = dstFieldName;
|
|
78
84
|
|
|
@@ -84,7 +90,23 @@ export class PrepareJSParamNode extends UILogicNode {
|
|
|
84
90
|
// 源参数
|
|
85
91
|
const srcVal = handleSrcVal(ctx, nodeParam);
|
|
86
92
|
if (dstField) {
|
|
87
|
-
|
|
93
|
+
// 赋值属性的时候支持脚本写法
|
|
94
|
+
try {
|
|
95
|
+
ScriptFactory.execScriptFn(
|
|
96
|
+
{ srcVal, dstParam: ctx.params[dstDEUILogicParamId] },
|
|
97
|
+
`dstParam.${dstFieldName} = srcVal`,
|
|
98
|
+
{
|
|
99
|
+
singleRowReturn: false,
|
|
100
|
+
isAsync: false,
|
|
101
|
+
},
|
|
102
|
+
);
|
|
103
|
+
} catch (error) {
|
|
104
|
+
ibiz.log.error(
|
|
105
|
+
`给目标参数属性${dstFieldName}赋值报错,目标参数:`,
|
|
106
|
+
ctx.params[dstDEUILogicParamId],
|
|
107
|
+
);
|
|
108
|
+
throw error;
|
|
109
|
+
}
|
|
88
110
|
} else {
|
|
89
111
|
ctx.params[dstDEUILogicParamId!] = srcVal;
|
|
90
112
|
}
|
|
@@ -32,6 +32,13 @@ export class UILogicParam {
|
|
|
32
32
|
const m = this.model;
|
|
33
33
|
const { context, viewParams, data, parameters } = ctx;
|
|
34
34
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
35
|
+
|
|
36
|
+
// 特殊变量的特殊处理
|
|
37
|
+
if (m.codeName === 'layoutPanel') {
|
|
38
|
+
ctx.params[tag] = parameters.view.layoutPanel!.panelItems;
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
|
|
35
42
|
if (m.default) {
|
|
36
43
|
ctx.params[tag] = data && data.length > 0 ? data[0] : {};
|
|
37
44
|
} else if (m.activeContainerParam) {
|