@ibiz-template/runtime 0.2.8 → 0.2.9
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 +619 -305
- 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.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +16 -21
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.d.ts +11 -11
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.js +22 -16
- package/out/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.d.ts +1 -1
- package/out/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.js +2 -2
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-content-type.controller.js +4 -2
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.d.ts +20 -0
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.js +57 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.state.d.ts +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.state.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +19 -32
- package/out/controller/control/map/map.controller.d.ts +6 -0
- package/out/controller/control/map/map.controller.d.ts.map +1 -1
- package/out/controller/control/map/map.controller.js +35 -1
- package/out/controller/control/panel/panel/panel.controller.d.ts.map +1 -1
- package/out/controller/control/panel/panel/panel.controller.js +4 -20
- package/out/controller/utils/data-file-util/data-file-util.d.ts +45 -0
- package/out/controller/utils/data-file-util/data-file-util.d.ts.map +1 -0
- package/out/controller/utils/data-file-util/data-file-util.js +121 -0
- package/out/controller/utils/index.d.ts +1 -0
- package/out/controller/utils/index.d.ts.map +1 -1
- package/out/controller/utils/index.js +1 -0
- package/out/global/global-util/global-util.d.ts +2 -2
- package/out/global/global-util/global-util.d.ts.map +1 -1
- package/out/interface/controller/controller/control/panel-item/i-panel-data-container.controller.d.ts +1 -1
- package/out/interface/controller/controller/control/panel-item/i-panel-data-container.controller.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-map.state.d.ts +21 -0
- package/out/interface/controller/state/control/i-map.state.d.ts.map +1 -1
- package/out/interface/index.d.ts +2 -1
- package/out/interface/index.d.ts.map +1 -1
- package/out/interface/index.js +2 -1
- package/out/interface/provider/i-ui-login-node.provider.d.ts +23 -0
- package/out/interface/provider/i-ui-login-node.provider.d.ts.map +1 -0
- package/out/interface/provider/index.d.ts +1 -0
- package/out/interface/provider/index.d.ts.map +1 -1
- package/out/interface/ui-login/i-ui-logic-context.d.ts +85 -0
- package/out/interface/ui-login/i-ui-logic-context.d.ts.map +1 -0
- package/out/interface/ui-login/i-ui-logic-context.js +1 -0
- package/out/interface/ui-login/index.d.ts +2 -0
- package/out/interface/ui-login/index.d.ts.map +1 -0
- package/out/interface/ui-login/index.js +1 -0
- package/out/interface/util/{i-export-excel/i-export-excel.d.ts → i-excel-util/i-excel-util.d.ts} +4 -4
- package/out/interface/util/i-excel-util/i-excel-util.d.ts.map +1 -0
- package/out/interface/util/i-excel-util/i-excel-util.js +1 -0
- package/out/interface/util/index.d.ts +1 -1
- package/out/interface/util/index.d.ts.map +1 -1
- package/out/model/panel/index.d.ts +1 -0
- package/out/model/panel/index.d.ts.map +1 -1
- package/out/model/panel/index.js +1 -0
- package/out/model/panel/panel-field.d.ts +11 -0
- package/out/model/panel/panel-field.d.ts.map +1 -0
- package/out/model/panel/panel-field.js +35 -0
- package/out/model/utils/util.d.ts +12 -1
- package/out/model/utils/util.d.ts.map +1 -1
- package/out/model/utils/util.js +18 -0
- package/out/register/helper/common-register.js +1 -1
- package/out/register/helper/index.d.ts +3 -2
- package/out/register/helper/index.d.ts.map +1 -1
- package/out/register/helper/index.js +3 -2
- package/out/register/helper/ui-logic-node-register.d.ts +25 -0
- package/out/register/helper/ui-logic-node-register.d.ts.map +1 -0
- package/out/register/helper/ui-logic-node-register.js +37 -0
- package/out/service/service/entity/method/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +3 -0
- package/out/service/service/entity/method/fetch.d.ts.map +1 -1
- package/out/service/service/entity/method/fetch.js +1 -1
- package/out/service/vo/index.d.ts +1 -0
- package/out/service/vo/index.d.ts.map +1 -1
- package/out/service/vo/index.js +1 -0
- package/out/service/vo/panel-data/index.d.ts +2 -0
- package/out/service/vo/panel-data/index.d.ts.map +1 -0
- package/out/service/vo/panel-data/index.js +1 -0
- package/out/service/vo/panel-data/panel-data.d.ts +21 -0
- package/out/service/vo/panel-data/panel-data.d.ts.map +1 -0
- package/out/service/vo/panel-data/panel-data.js +73 -0
- 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 +6 -2
- package/out/ui-logic/ui-logic-context.d.ts +7 -2
- package/out/ui-logic/ui-logic-context.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-context.js +5 -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-node/pf-plugin-node/pf-plugin-node.d.ts +17 -0
- package/out/ui-logic/ui-logic-node/pf-plugin-node/pf-plugin-node.d.ts.map +1 -0
- package/out/ui-logic/ui-logic-node/pf-plugin-node/pf-plugin-node.js +19 -0
- package/out/ui-logic/ui-logic.d.ts.map +1 -1
- package/out/ui-logic/ui-logic.js +3 -1
- package/package.json +2 -2
- package/src/controller/common/control/md-control.controller.ts +22 -22
- package/src/controller/control/form/form-detail/form-detail/form-detail.controller.ts +35 -25
- package/src/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.ts +2 -2
- package/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-content-type.controller.ts +2 -2
- package/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.ts +66 -1
- package/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl.state.ts +1 -1
- package/src/controller/control/grid/grid/grid.controller.ts +20 -32
- package/src/controller/control/map/map.controller.ts +38 -1
- package/src/controller/control/panel/panel/panel.controller.ts +4 -21
- package/src/controller/utils/data-file-util/data-file-util.ts +156 -0
- package/src/controller/utils/index.ts +1 -0
- package/src/global/global-util/global-util.ts +2 -2
- package/src/interface/controller/controller/control/panel-item/i-panel-data-container.controller.ts +1 -1
- package/src/interface/controller/state/control/i-map.state.ts +24 -0
- package/src/interface/index.ts +2 -1
- package/src/interface/provider/i-ui-login-node.provider.ts +23 -0
- package/src/interface/provider/index.ts +1 -0
- package/src/interface/ui-login/i-ui-logic-context.ts +95 -0
- package/src/interface/ui-login/index.ts +1 -0
- package/src/interface/util/{i-export-excel/i-export-excel.ts → i-excel-util/i-excel-util.ts} +3 -3
- package/src/interface/util/index.ts +1 -1
- package/src/model/panel/index.ts +1 -0
- package/src/model/panel/panel-field.ts +49 -0
- package/src/model/utils/util.ts +20 -0
- package/src/register/helper/common-register.ts +1 -1
- package/src/register/helper/index.ts +3 -2
- package/src/register/helper/ui-logic-node-register.ts +52 -0
- package/src/service/service/entity/method/de-action.ts +4 -1
- package/src/service/service/entity/method/fetch.ts +7 -1
- package/src/service/vo/index.ts +1 -0
- package/src/service/vo/panel-data/index.ts +1 -0
- package/src/service/vo/panel-data/panel-data.ts +93 -0
- package/src/service/vo/tree-node-data/tree-data-set-node-data.ts +6 -2
- package/src/ui-logic/ui-logic-context.ts +7 -2
- package/src/ui-logic/ui-logic-node/index.ts +1 -0
- package/src/ui-logic/ui-logic-node/pf-plugin-node/pf-plugin-node.ts +24 -0
- package/src/ui-logic/ui-logic.ts +3 -0
- package/out/interface/util/i-export-excel/i-export-excel.d.ts.map +0 -1
- /package/out/interface/{util/i-export-excel/i-export-excel.js → provider/i-ui-login-node.provider.js} +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { RuntimeError } from '@ibiz-template/core';
|
|
2
|
+
import { getPluginRegisterKey } from './common-register';
|
|
3
|
+
/** 界面逻辑节点适配器前缀 */
|
|
4
|
+
export const UILOGINNODE_PROVIDER_PREFIX = 'UI_LOGIN_NODE';
|
|
5
|
+
/**
|
|
6
|
+
* 注册界面逻辑节点适配器
|
|
7
|
+
*
|
|
8
|
+
* @author lxm
|
|
9
|
+
* @date 2023-05-06 09:14:16
|
|
10
|
+
* @export
|
|
11
|
+
* @param {string} key
|
|
12
|
+
* @param {() => IUILogicNodeProvider} callback 生成界面行为适配器的回调
|
|
13
|
+
*/
|
|
14
|
+
export function registerUILogicNodeProvider(key, callback) {
|
|
15
|
+
ibiz.register.register(`${UILOGINNODE_PROVIDER_PREFIX}_${key}`, callback);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* 获取界面逻辑节点适配器
|
|
19
|
+
*
|
|
20
|
+
* @author chitanda
|
|
21
|
+
* @date 2023-11-01 17:11:43
|
|
22
|
+
* @export
|
|
23
|
+
* @param {IDEUIPFPluginLogic} model
|
|
24
|
+
* @return {*} {Promise<IUILogicNodeProvider>}
|
|
25
|
+
*/
|
|
26
|
+
export async function getUILogicNodeProvider(model) {
|
|
27
|
+
let provider;
|
|
28
|
+
const { sysPFPluginId, appId } = model;
|
|
29
|
+
const pluginKey = await getPluginRegisterKey(sysPFPluginId, appId);
|
|
30
|
+
if (pluginKey) {
|
|
31
|
+
provider = ibiz.register.get(`${UILOGINNODE_PROVIDER_PREFIX}_${pluginKey}`);
|
|
32
|
+
if (provider) {
|
|
33
|
+
return provider;
|
|
34
|
+
}
|
|
35
|
+
throw new RuntimeError(`找不到界面逻辑前端插件节点,插件${pluginKey}对应的适配器`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -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,EAGd,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;IAED;;;;;;;OAOG;IACG,WAAW,CACf,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,KAAK,GAAG,KAAK,EAAE,GACpB,OAAO,CAAC,KAAK,GAAG,KAAK,EAAE,CAAC;IAQrB,IAAI,CACR,OAAO,EAAE,OAAO,EAChB,IAAI,CAAC,EAAE,KAAK,GAAG,KAAK,EAAE,EACtB,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,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,EAGd,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,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G;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,GAAG,KAAK,EAAE,GACtB,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IAqBtC;;;;;;;;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"}
|
|
@@ -42,6 +42,9 @@ export class DEActionMethod extends Method {
|
|
|
42
42
|
return this.input.handle(context, data);
|
|
43
43
|
}
|
|
44
44
|
async exec(context, data, params) {
|
|
45
|
+
if (data) {
|
|
46
|
+
await execFieldLogics(this.entity, 'change', context, data, params);
|
|
47
|
+
}
|
|
45
48
|
// 实体逻辑处理
|
|
46
49
|
if (this.method.actionType === 'DELOGIC') {
|
|
47
50
|
const deLogic = findDELogic(this.method.appDELogicId, this.entity);
|
|
@@ -1 +1 @@
|
|
|
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;AAEjD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAA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G,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"}
|
|
@@ -49,7 +49,7 @@ export class FetchMethod extends Method {
|
|
|
49
49
|
res.data = items.map(item => this.createEntity(item));
|
|
50
50
|
// 计算属性逻辑,每条数据走一遍
|
|
51
51
|
if (res.data) {
|
|
52
|
-
execFieldLogics(this.entity, 'compute', context, res.data, searchParams);
|
|
52
|
+
await execFieldLogics(this.entity, 'compute', context, res.data, searchParams);
|
|
53
53
|
}
|
|
54
54
|
return res;
|
|
55
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/service/vo/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/service/vo/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC"}
|
package/out/service/vo/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/service/vo/panel-data/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PanelData } from './panel-data';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IPanelField } from '@ibiz/model-core';
|
|
2
|
+
/**
|
|
3
|
+
* 面板数据
|
|
4
|
+
* @author lxm
|
|
5
|
+
* @date 2023-11-01 05:13:53
|
|
6
|
+
* @export
|
|
7
|
+
* @class PanelData
|
|
8
|
+
*/
|
|
9
|
+
export declare class PanelData {
|
|
10
|
+
[key: string | symbol]: any;
|
|
11
|
+
/**
|
|
12
|
+
* 父视图参数
|
|
13
|
+
* @author lxm
|
|
14
|
+
* @date 2023-10-27 04:08:59
|
|
15
|
+
* @protected
|
|
16
|
+
* @type {IParams}
|
|
17
|
+
*/
|
|
18
|
+
protected _origin?: IParams;
|
|
19
|
+
constructor(fields: IPanelField[], origin: IParams);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=panel-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"panel-data.d.ts","sourceRoot":"","sources":["../../../../src/service/vo/panel-data/panel-data.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAgB/C;;;;;;GAMG;AACH,qBAAa,SAAS;IAEpB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC;IAE5B;;;;;;OAMG;IACH,UAAkB,OAAO,CAAC,EAAE,OAAO,CAAC;gBAExB,MAAM,EAAE,WAAW,EAAE,EAAE,MAAM,EAAE,OAAO;CAsDnD"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* eslint-disable no-constructor-return */
|
|
2
|
+
// 更新属性,缺的补充定义
|
|
3
|
+
function updateKeyDefine(target, keys) {
|
|
4
|
+
keys.forEach(key => {
|
|
5
|
+
if (!Object.prototype.hasOwnProperty.call(target, key)) {
|
|
6
|
+
Object.defineProperty(target, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
configurable: true,
|
|
9
|
+
writable: true,
|
|
10
|
+
value: undefined,
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 面板数据
|
|
17
|
+
* @author lxm
|
|
18
|
+
* @date 2023-11-01 05:13:53
|
|
19
|
+
* @export
|
|
20
|
+
* @class PanelData
|
|
21
|
+
*/
|
|
22
|
+
export class PanelData {
|
|
23
|
+
constructor(fields, origin) {
|
|
24
|
+
// 面板属性映射绑定项
|
|
25
|
+
const keyMap = {};
|
|
26
|
+
// 绑定项映射面板属性
|
|
27
|
+
const reverseKeyMap = {};
|
|
28
|
+
fields.forEach(field => {
|
|
29
|
+
var _a;
|
|
30
|
+
keyMap[field.id] = (_a = field.viewFieldName) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
31
|
+
if (field.viewFieldName) {
|
|
32
|
+
reverseKeyMap[field.viewFieldName.toLowerCase()] = field.id;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
return new Proxy(this, {
|
|
36
|
+
set(target, p, value) {
|
|
37
|
+
if (Object.prototype.hasOwnProperty.call(keyMap, p)) {
|
|
38
|
+
if (keyMap[p]) {
|
|
39
|
+
// 有面板属性有绑定数据项修改原始对象
|
|
40
|
+
origin[keyMap[p]] = value;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
// 有面板属性没有绑定数据项的改自身
|
|
44
|
+
target[p] = value;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
// 没有面板属性的直接修改原始对象,视图面板对象一开始就是空的,没有任何属性
|
|
49
|
+
origin[keyMap[p]] = value;
|
|
50
|
+
}
|
|
51
|
+
return true;
|
|
52
|
+
},
|
|
53
|
+
get(target, p, _receiver) {
|
|
54
|
+
// 有映射拿原始对象
|
|
55
|
+
if (keyMap[p]) {
|
|
56
|
+
return origin[keyMap[p]];
|
|
57
|
+
}
|
|
58
|
+
// 源对象的属性可以直接拿
|
|
59
|
+
if (Object.prototype.hasOwnProperty.call(origin, p)) {
|
|
60
|
+
return origin[p];
|
|
61
|
+
}
|
|
62
|
+
// 最后拿自身
|
|
63
|
+
return target[p];
|
|
64
|
+
},
|
|
65
|
+
ownKeys(target) {
|
|
66
|
+
// 只返回原始数据的键,自身的只是前端映射使用不需要在复制和后台传递时使用
|
|
67
|
+
const allKeys = Object.keys(origin);
|
|
68
|
+
updateKeyDefine(target, allKeys);
|
|
69
|
+
return allKeys;
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-data-set-node-data.d.ts","sourceRoot":"","sources":["../../../../src/service/vo/tree-node-data/tree-data-set-node-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAG1D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;;;;;;GAOG;AACH,qBAAa,mBAAoB,SAAQ,YAAa,YAAW,aAAa;IAC5E,IAAI,EAAE,MAAM,CAAC;IAEb,EAAE,EAAE,MAAM,CAAC;IAEX,KAAK,EAAE,MAAM,CAAC;IAEd,MAAM,EAAE,KAAK,CAAC;gBAGZ,KAAK,EAAE,kBAAkB,EACzB,cAAc,EAAE,aAAa,GAAG,SAAS,EACzC,IAAI,EAAE;QACJ,IAAI,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,OAAO,CAAC;QACd,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB;
|
|
1
|
+
{"version":3,"file":"tree-data-set-node-data.d.ts","sourceRoot":"","sources":["../../../../src/service/vo/tree-node-data/tree-data-set-node-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAG1D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;;;;;;GAOG;AACH,qBAAa,mBAAoB,SAAQ,YAAa,YAAW,aAAa;IAC5E,IAAI,EAAE,MAAM,CAAC;IAEb,EAAE,EAAE,MAAM,CAAC;IAEX,KAAK,EAAE,MAAM,CAAC;IAEd,MAAM,EAAE,KAAK,CAAC;gBAGZ,KAAK,EAAE,kBAAkB,EACzB,cAAc,EAAE,aAAa,GAAG,SAAS,EACzC,IAAI,EAAE;QACJ,IAAI,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,OAAO,CAAC;QACd,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB;IAgCH,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,kBAAkB,GAAG,KAAK,GAAG,SAAS;IAiBhE;;;;;;;OAOG;IACH,SAAS,CAAC,kBAAkB,CAC1B,QAAQ,EAAE,mBAAmB,GAC5B,MAAM,GAAG,SAAS;IAYrB;;;;;;;OAOG;IACH,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,kBAAkB,GAAG,MAAM,GAAG,SAAS;CAStE"}
|
|
@@ -14,8 +14,12 @@ export class TreeDataSetNodeData extends TreeNodeData {
|
|
|
14
14
|
super(model, parentNodeData, opts);
|
|
15
15
|
const { data } = opts;
|
|
16
16
|
this.deData = data;
|
|
17
|
-
this.text =
|
|
18
|
-
|
|
17
|
+
this.text = model.textAppDEFieldId
|
|
18
|
+
? data[model.textAppDEFieldId]
|
|
19
|
+
: data.srfmajortext;
|
|
20
|
+
this.value = model.idAppDEFieldId
|
|
21
|
+
? data[model.idAppDEFieldId]
|
|
22
|
+
: data.srfkey;
|
|
19
23
|
this.id = parentNodeData
|
|
20
24
|
? `${parentNodeData.id}:${model.id}@${data.srfkey}`
|
|
21
25
|
: model.id + data.srfkey;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IUILogicParams } from '../interface';
|
|
1
|
+
import { IUILogicContext, IUILogicParams } from '../interface';
|
|
2
2
|
import { UILogicParam } from './ui-logic-param/ui-logic-param';
|
|
3
3
|
/**
|
|
4
4
|
* 界面逻辑执行上下文
|
|
@@ -8,7 +8,7 @@ import { UILogicParam } from './ui-logic-param/ui-logic-param';
|
|
|
8
8
|
* @export
|
|
9
9
|
* @class UILogicContext
|
|
10
10
|
*/
|
|
11
|
-
export declare class UILogicContext {
|
|
11
|
+
export declare class UILogicContext implements IUILogicContext {
|
|
12
12
|
private deLogicParams;
|
|
13
13
|
parameters: IUILogicParams;
|
|
14
14
|
/**
|
|
@@ -74,6 +74,7 @@ export declare class UILogicContext {
|
|
|
74
74
|
defaultParamName: string;
|
|
75
75
|
/**
|
|
76
76
|
* 重置实体逻辑参数
|
|
77
|
+
*
|
|
77
78
|
* @author lxm
|
|
78
79
|
* @date 2023-03-24 09:18:02
|
|
79
80
|
* @param {string} name
|
|
@@ -81,6 +82,7 @@ export declare class UILogicContext {
|
|
|
81
82
|
resetParam(name: string): void;
|
|
82
83
|
/**
|
|
83
84
|
* 重新建立变量
|
|
85
|
+
*
|
|
84
86
|
* @author lxm
|
|
85
87
|
* @date 2023-03-24 09:20:24
|
|
86
88
|
* @param {string} name
|
|
@@ -88,6 +90,7 @@ export declare class UILogicContext {
|
|
|
88
90
|
renewParam(name: string): void;
|
|
89
91
|
/**
|
|
90
92
|
* 设置上一次返回值
|
|
93
|
+
*
|
|
91
94
|
* @author lxm
|
|
92
95
|
* @date 2023-09-04 09:23:52
|
|
93
96
|
* @param {unknown} value
|
|
@@ -95,6 +98,7 @@ export declare class UILogicContext {
|
|
|
95
98
|
setLastReturn(value: unknown): void;
|
|
96
99
|
/**
|
|
97
100
|
* 初始化上一次返回参数类型的逻辑参数
|
|
101
|
+
*
|
|
98
102
|
* @author lxm
|
|
99
103
|
* @date 2023-09-04 09:52:00
|
|
100
104
|
* @param {string} tag
|
|
@@ -102,6 +106,7 @@ export declare class UILogicContext {
|
|
|
102
106
|
initLastReturnParam(tag: string): void;
|
|
103
107
|
/**
|
|
104
108
|
* 是否是实体参数变量(即后台数据对象)
|
|
109
|
+
*
|
|
105
110
|
* @author lxm
|
|
106
111
|
* @date 2023-09-22 03:40:30
|
|
107
112
|
* @param {string} paramId
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-logic-context.d.ts","sourceRoot":"","sources":["../../src/ui-logic/ui-logic-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"ui-logic-context.d.ts","sourceRoot":"","sources":["../../src/ui-logic/ui-logic-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D;;;;;;;GAOG;AACH,qBAAa,cAAe,YAAW,eAAe;IA4ClD,OAAO,CAAC,aAAa;IACd,UAAU,EAAE,cAAc;IA5CnC;;;;;OAKG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,IAAI,OAAO,IAAI,QAAQ,CAKtB;IAED;;OAEG;IACH,IAAI,IAAI,IAAI,KAAK,CAEhB;IAED;;OAEG;IACH,IAAI,SAAS,IAAI,OAAO,CAKvB;IAED;;;;;;OAMG;gBAEO,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EACzC,UAAU,EAAE,cAAc;IAGnC;;;;;;;OAOG;IAEH,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAEjC;;;;;;OAMG;IACH,MAAM,EAAE,OAAO,CAAQ;IAEvB;;;;;;OAMG;IACH,SAAS,EAAE,OAAO,CAAS;IAE3B;;;;;;;OAOG;IACH,gBAAgB,EAAE,MAAM,CAAa;IAErC;;;;;;OAMG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI9B;;;;;;OAMG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI9B;;;;;;OAMG;IACH,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAInC;;;;;;OAMG;IACH,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAQtC;;;;;;;OAOG;IACH,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;CAIxC"}
|
|
@@ -79,6 +79,7 @@ export class UILogicContext {
|
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
81
|
* 重置实体逻辑参数
|
|
82
|
+
*
|
|
82
83
|
* @author lxm
|
|
83
84
|
* @date 2023-03-24 09:18:02
|
|
84
85
|
* @param {string} name
|
|
@@ -89,6 +90,7 @@ export class UILogicContext {
|
|
|
89
90
|
}
|
|
90
91
|
/**
|
|
91
92
|
* 重新建立变量
|
|
93
|
+
*
|
|
92
94
|
* @author lxm
|
|
93
95
|
* @date 2023-03-24 09:20:24
|
|
94
96
|
* @param {string} name
|
|
@@ -99,6 +101,7 @@ export class UILogicContext {
|
|
|
99
101
|
}
|
|
100
102
|
/**
|
|
101
103
|
* 设置上一次返回值
|
|
104
|
+
*
|
|
102
105
|
* @author lxm
|
|
103
106
|
* @date 2023-09-04 09:23:52
|
|
104
107
|
* @param {unknown} value
|
|
@@ -108,6 +111,7 @@ export class UILogicContext {
|
|
|
108
111
|
}
|
|
109
112
|
/**
|
|
110
113
|
* 初始化上一次返回参数类型的逻辑参数
|
|
114
|
+
*
|
|
111
115
|
* @author lxm
|
|
112
116
|
* @date 2023-09-04 09:52:00
|
|
113
117
|
* @param {string} tag
|
|
@@ -121,6 +125,7 @@ export class UILogicContext {
|
|
|
121
125
|
}
|
|
122
126
|
/**
|
|
123
127
|
* 是否是实体参数变量(即后台数据对象)
|
|
128
|
+
*
|
|
124
129
|
* @author lxm
|
|
125
130
|
* @date 2023-09-22 03:40:30
|
|
126
131
|
* @param {string} paramId
|
|
@@ -7,6 +7,7 @@ export { UILogicNode } from './ui-logic-node';
|
|
|
7
7
|
export { ViewCtrlInvokeNode } from './view-ctrl-invoke-node/view-ctrl-invoke-node';
|
|
8
8
|
export { BindParamNode } from './bind-param-node/bind-param-node';
|
|
9
9
|
export { MsgBoxNode } from './msg-box-node/msg-box-node';
|
|
10
|
+
export { PFPluginNode } from './pf-plugin-node/pf-plugin-node';
|
|
10
11
|
export { DebugParamNode } from './debug-param-node/debug-param-node';
|
|
11
12
|
export { ResetParamNode } from './reset-param-node/reset-param-node';
|
|
12
13
|
export { CopyParamNode } from './copy-param-node/copy-param-node';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui-logic/ui-logic-node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,E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AW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC"}
|
|
@@ -7,6 +7,7 @@ export { UILogicNode } from './ui-logic-node';
|
|
|
7
7
|
export { ViewCtrlInvokeNode } from './view-ctrl-invoke-node/view-ctrl-invoke-node';
|
|
8
8
|
export { BindParamNode } from './bind-param-node/bind-param-node';
|
|
9
9
|
export { MsgBoxNode } from './msg-box-node/msg-box-node';
|
|
10
|
+
export { PFPluginNode } from './pf-plugin-node/pf-plugin-node';
|
|
10
11
|
export { DebugParamNode } from './debug-param-node/debug-param-node';
|
|
11
12
|
export { ResetParamNode } from './reset-param-node/reset-param-node';
|
|
12
13
|
export { CopyParamNode } from './copy-param-node/copy-param-node';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IDEUIPFPluginLogic } from '@ibiz/model-core';
|
|
2
|
+
import { UILogicContext } from '../../ui-logic-context';
|
|
3
|
+
import { UILogicNode } from '../ui-logic-node';
|
|
4
|
+
/**
|
|
5
|
+
* 前端插件节点
|
|
6
|
+
*
|
|
7
|
+
* @author chitanda
|
|
8
|
+
* @date 2023-11-01 18:11:55
|
|
9
|
+
* @export
|
|
10
|
+
* @class PFPluginNode
|
|
11
|
+
* @extends {UILogicNode}
|
|
12
|
+
*/
|
|
13
|
+
export declare class PFPluginNode extends UILogicNode {
|
|
14
|
+
model: IDEUIPFPluginLogic;
|
|
15
|
+
exec(ctx: UILogicContext): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=pf-plugin-node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pf-plugin-node.d.ts","sourceRoot":"","sources":["../../../../src/ui-logic/ui-logic-node/pf-plugin-node/pf-plugin-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG/C;;;;;;;;GAQG;AACH,qBAAa,YAAa,SAAQ,WAAW;IACnC,KAAK,EAAE,kBAAkB,CAAC;IAE5B,IAAI,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAM/C"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UILogicNode } from '../ui-logic-node';
|
|
2
|
+
import { getUILogicNodeProvider } from '../../../register';
|
|
3
|
+
/**
|
|
4
|
+
* 前端插件节点
|
|
5
|
+
*
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2023-11-01 18:11:55
|
|
8
|
+
* @export
|
|
9
|
+
* @class PFPluginNode
|
|
10
|
+
* @extends {UILogicNode}
|
|
11
|
+
*/
|
|
12
|
+
export class PFPluginNode extends UILogicNode {
|
|
13
|
+
async exec(ctx) {
|
|
14
|
+
const provider = await getUILogicNodeProvider(this.model);
|
|
15
|
+
if (provider) {
|
|
16
|
+
await provider.exec(this.model, ctx);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-logic.d.ts","sourceRoot":"","sources":["../../src/ui-logic/ui-logic.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,
|
|
1
|
+
{"version":3,"file":"ui-logic.d.ts","sourceRoot":"","sources":["../../src/ui-logic/ui-logic.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAkBL,WAAW,EAGZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D;;;;;;;GAOG;AACH,qBAAa,OAAO;IA2BN,SAAS,CAAC,KAAK,EAAE,UAAU;IA1BvC;;;;;;;OAOG;IACH,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAa;IAEtD;;;;;;;OAOG;IACH,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAa;IAExD;;;;;OAKG;gBACmB,KAAK,EAAE,UAAU;IAoFvC;;;;;;;;;;OAUG;IACH,SAAS,CAAC,eAAe,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI;IASpD;;;;;;;;;OASG;IACG,IAAI,CAAC,UAAU,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IAmBxD;;;;;;;;;;;;;OAaG;cACa,QAAQ,CACtB,IAAI,EAAE,WAAW,EACjB,GAAG,EAAE,cAAc,GAClB,OAAO,CAAC,IAAI,CAAC;CAiBjB"}
|
package/out/ui-logic/ui-logic.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable no-await-in-loop */
|
|
2
2
|
import { ModelError, RuntimeModelError } from '@ibiz-template/core';
|
|
3
3
|
import { UILogicContext } from './ui-logic-context';
|
|
4
|
-
import { AppendParamNode, BindParamNode, CopyParamNode, DataSetNode, DEActionNode, DebugParamNode, DEUIActionNode, EndNode, ExecuteDELogicNode, MsgBoxNode, PrepareJSParamNode, RenewParamNode, ResetParamNode, SortParamNode, StartNode, ThrowExceptionNode, ViewCtrlFireEventNode, ViewCtrlInvokeNode, } from './ui-logic-node';
|
|
4
|
+
import { AppendParamNode, BindParamNode, CopyParamNode, DataSetNode, DEActionNode, DebugParamNode, DEUIActionNode, EndNode, ExecuteDELogicNode, MsgBoxNode, PFPluginNode, PrepareJSParamNode, RenewParamNode, ResetParamNode, SortParamNode, StartNode, ThrowExceptionNode, ViewCtrlFireEventNode, ViewCtrlInvokeNode, } from './ui-logic-node';
|
|
5
5
|
import { UILogicParam } from './ui-logic-param/ui-logic-param';
|
|
6
6
|
/**
|
|
7
7
|
* 界面逻辑
|
|
@@ -101,6 +101,8 @@ export class UILogic {
|
|
|
101
101
|
logicNode = new ExecuteDELogicNode(node);
|
|
102
102
|
break;
|
|
103
103
|
case 'PFPLUGIN': // 前端插件调用
|
|
104
|
+
logicNode = new PFPluginNode(node);
|
|
105
|
+
break;
|
|
104
106
|
default:
|
|
105
107
|
throw new ModelError(node, `未支持的逻辑节点类型: ${logicNodeType}`);
|
|
106
108
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/runtime",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
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": "1502d43393de4cc75f670d0ba22d901e158e0c00"
|
|
63
63
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable max-classes-per-file */
|
|
2
2
|
import { isElementSame, RuntimeError } from '@ibiz-template/core';
|
|
3
|
-
import { IAppDataEntity, IMDControl } from '@ibiz/model-core';
|
|
3
|
+
import { IAppDataEntity, IAppDEDataImport, IMDControl } from '@ibiz/model-core';
|
|
4
4
|
import { debounce } from 'lodash-es';
|
|
5
5
|
import {
|
|
6
6
|
IMDControlController,
|
|
@@ -428,27 +428,27 @@ export class MDControlController<
|
|
|
428
428
|
* @returns {*} {Promise<void>}
|
|
429
429
|
*/
|
|
430
430
|
async importData(): Promise<void> {
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
431
|
+
const { appDataEntityId, dedataImportId } = this.model;
|
|
432
|
+
const appDataEntity = await ibiz.hub.getAppDataEntity(appDataEntityId!);
|
|
433
|
+
const dataImport = appDataEntity.appDEDataImports?.find(
|
|
434
|
+
(importItem: IAppDEDataImport) => importItem.id === dedataImportId,
|
|
435
|
+
);
|
|
436
|
+
if (!dataImport) {
|
|
437
|
+
throw new RuntimeError('无导入模型!');
|
|
438
|
+
}
|
|
439
|
+
const modal = ibiz.overlay.createModal(
|
|
440
|
+
'DataImport',
|
|
441
|
+
{
|
|
442
|
+
dismiss: () => modal.dismiss(),
|
|
443
|
+
appDataEntity,
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
width: 'auto',
|
|
447
|
+
placement: 'center',
|
|
448
|
+
},
|
|
449
|
+
);
|
|
450
|
+
modal.present();
|
|
451
|
+
await modal.onWillDismiss();
|
|
452
452
|
}
|
|
453
453
|
|
|
454
454
|
/**
|
|
@@ -82,6 +82,22 @@ export class FormDetailController<T extends IDEFormDetail = IDEFormDetail>
|
|
|
82
82
|
return [...this.state.class.label, ...this.state.class.labelDyna];
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
/**
|
|
86
|
+
* 动态逻辑结果
|
|
87
|
+
* @author lxm
|
|
88
|
+
* @date 2023-09-21 03:36:37
|
|
89
|
+
* @protected
|
|
90
|
+
*/
|
|
91
|
+
protected dynaLogicResult: {
|
|
92
|
+
visible?: boolean;
|
|
93
|
+
disabled?: boolean;
|
|
94
|
+
required?: boolean;
|
|
95
|
+
} = {
|
|
96
|
+
visible: undefined,
|
|
97
|
+
disabled: undefined,
|
|
98
|
+
required: undefined,
|
|
99
|
+
};
|
|
100
|
+
|
|
85
101
|
/**
|
|
86
102
|
* Creates an instance of FormDetailController.
|
|
87
103
|
* @author lxm
|
|
@@ -267,20 +283,22 @@ export class FormDetailController<T extends IDEFormDetail = IDEFormDetail>
|
|
|
267
283
|
* @param {IData} data
|
|
268
284
|
*/
|
|
269
285
|
calcDetailDisabled(data: IData): void {
|
|
270
|
-
let
|
|
286
|
+
let { disabled } = this.dynaLogicResult;
|
|
271
287
|
|
|
272
288
|
// 上层计算为启用时计算预定义项启用逻辑
|
|
273
|
-
if (
|
|
289
|
+
if (disabled !== true && this.form.scheduler) {
|
|
274
290
|
const itemEnable = this.form.scheduler.triggerItemEnable(this.model.id!, {
|
|
275
291
|
data: [data],
|
|
276
292
|
});
|
|
277
293
|
if (itemEnable !== undefined) {
|
|
278
|
-
|
|
294
|
+
disabled = !itemEnable;
|
|
279
295
|
}
|
|
280
296
|
}
|
|
281
297
|
|
|
282
|
-
//
|
|
283
|
-
|
|
298
|
+
// 有值的时候才会去修改state
|
|
299
|
+
if (disabled !== undefined) {
|
|
300
|
+
this.state.disabled = disabled;
|
|
301
|
+
}
|
|
284
302
|
}
|
|
285
303
|
|
|
286
304
|
/**
|
|
@@ -292,7 +310,7 @@ export class FormDetailController<T extends IDEFormDetail = IDEFormDetail>
|
|
|
292
310
|
let { visible } = this.dynaLogicResult;
|
|
293
311
|
|
|
294
312
|
// 上层计算为显示时计算预定义项显示逻辑
|
|
295
|
-
if (visible && this.form.scheduler) {
|
|
313
|
+
if (visible !== false && this.form.scheduler) {
|
|
296
314
|
const itemVIsible = this.form.scheduler.triggerItemVisible(
|
|
297
315
|
this.model.id!,
|
|
298
316
|
{
|
|
@@ -304,8 +322,10 @@ export class FormDetailController<T extends IDEFormDetail = IDEFormDetail>
|
|
|
304
322
|
}
|
|
305
323
|
}
|
|
306
324
|
|
|
307
|
-
//
|
|
308
|
-
|
|
325
|
+
// 有值的时候才会去修改state
|
|
326
|
+
if (visible !== undefined) {
|
|
327
|
+
this.state.visible = visible;
|
|
328
|
+
}
|
|
309
329
|
}
|
|
310
330
|
|
|
311
331
|
/**
|
|
@@ -314,10 +334,10 @@ export class FormDetailController<T extends IDEFormDetail = IDEFormDetail>
|
|
|
314
334
|
* @param {IData} data
|
|
315
335
|
*/
|
|
316
336
|
calcDetailRequired(data: IData): void {
|
|
317
|
-
let
|
|
337
|
+
let { required } = this.dynaLogicResult;
|
|
318
338
|
|
|
319
339
|
// 上层计算为启用时计算预定义项空输入逻辑
|
|
320
|
-
if (
|
|
340
|
+
if (required !== true && this.form.scheduler) {
|
|
321
341
|
const itemAllowEmpty = this.form.scheduler.triggerItemBlank(
|
|
322
342
|
this.model.id!,
|
|
323
343
|
{
|
|
@@ -325,23 +345,13 @@ export class FormDetailController<T extends IDEFormDetail = IDEFormDetail>
|
|
|
325
345
|
},
|
|
326
346
|
);
|
|
327
347
|
if (itemAllowEmpty !== undefined) {
|
|
328
|
-
|
|
348
|
+
required = !itemAllowEmpty;
|
|
329
349
|
}
|
|
330
350
|
}
|
|
331
351
|
|
|
332
|
-
//
|
|
333
|
-
|
|
352
|
+
// 有值的时候才会去修改state
|
|
353
|
+
if (required !== undefined) {
|
|
354
|
+
this.state.required = required;
|
|
355
|
+
}
|
|
334
356
|
}
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* 动态逻辑结果
|
|
338
|
-
* @author lxm
|
|
339
|
-
* @date 2023-09-21 03:36:37
|
|
340
|
-
* @protected
|
|
341
|
-
*/
|
|
342
|
-
protected dynaLogicResult = {
|
|
343
|
-
visible: true,
|
|
344
|
-
disabled: false,
|
|
345
|
-
required: false,
|
|
346
|
-
};
|
|
347
357
|
}
|
package/src/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.ts
CHANGED
|
@@ -57,8 +57,8 @@ export class FormGroupPanelController<
|
|
|
57
57
|
await this.initActionStates();
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
async formStateNotify(
|
|
61
|
-
super.
|
|
60
|
+
async formStateNotify(state: FormNotifyState): Promise<void> {
|
|
61
|
+
super.formStateNotify(state);
|
|
62
62
|
// 只在加载后台数据之后,更新界面行为组状态
|
|
63
63
|
if (this.state.actionGroupState) {
|
|
64
64
|
this.state.actionGroupState.update(this.form.data.getOrigin());
|
package/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-content-type.controller.ts
CHANGED
|
@@ -86,7 +86,7 @@ export class FormMDCtrlContentTypeController {
|
|
|
86
86
|
if (index < 0) {
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
|
-
this.parent.state.contentCtrlData
|
|
89
|
+
this.parent.state.contentCtrlData?.splice(index, 1);
|
|
90
90
|
this.parent.setFormDataValue();
|
|
91
91
|
}
|
|
92
92
|
|
|
@@ -99,7 +99,7 @@ export class FormMDCtrlContentTypeController {
|
|
|
99
99
|
* @memberof FormMDCtrlContentTypeController
|
|
100
100
|
*/
|
|
101
101
|
onDataInsert(data?: IData): void {
|
|
102
|
-
this.parent.state.contentCtrlData
|
|
102
|
+
this.parent.state.contentCtrlData?.push(data || {});
|
|
103
103
|
this.parent.setFormDataValue();
|
|
104
104
|
}
|
|
105
105
|
|