@ibiz-template/runtime 0.2.8 → 0.2.10

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.
Files changed (156) hide show
  1. package/dist/index.esm.js +678 -336
  2. package/dist/index.system.min.js +1 -1
  3. package/dist/index.system.min.js.map +1 -1
  4. package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
  5. package/out/controller/common/control/md-control.controller.js +16 -21
  6. package/out/controller/control/form/form-detail/form-detail/form-detail.controller.d.ts +11 -11
  7. package/out/controller/control/form/form-detail/form-detail/form-detail.controller.d.ts.map +1 -1
  8. package/out/controller/control/form/form-detail/form-detail/form-detail.controller.js +22 -16
  9. package/out/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.d.ts +1 -1
  10. package/out/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.d.ts.map +1 -1
  11. package/out/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.js +2 -2
  12. package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-content-type.controller.js +4 -2
  13. package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.d.ts +20 -0
  14. package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.d.ts.map +1 -1
  15. package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.js +57 -1
  16. package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.state.d.ts +1 -1
  17. package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.state.d.ts.map +1 -1
  18. package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
  19. package/out/controller/control/grid/grid/grid.controller.js +19 -32
  20. package/out/controller/control/map/map.controller.d.ts +6 -0
  21. package/out/controller/control/map/map.controller.d.ts.map +1 -1
  22. package/out/controller/control/map/map.controller.js +37 -3
  23. package/out/controller/control/panel/panel/panel-item.controller.d.ts +1 -0
  24. package/out/controller/control/panel/panel/panel-item.controller.d.ts.map +1 -1
  25. package/out/controller/control/panel/panel/panel-item.controller.js +1 -0
  26. package/out/controller/control/panel/panel/panel.controller.d.ts +3 -1
  27. package/out/controller/control/panel/panel/panel.controller.d.ts.map +1 -1
  28. package/out/controller/control/panel/panel/panel.controller.js +23 -21
  29. package/out/controller/utils/data-file-util/data-file-util.d.ts +45 -0
  30. package/out/controller/utils/data-file-util/data-file-util.d.ts.map +1 -0
  31. package/out/controller/utils/data-file-util/data-file-util.js +121 -0
  32. package/out/controller/utils/index.d.ts +1 -0
  33. package/out/controller/utils/index.d.ts.map +1 -1
  34. package/out/controller/utils/index.js +1 -0
  35. package/out/global/global-util/global-util.d.ts +2 -2
  36. package/out/global/global-util/global-util.d.ts.map +1 -1
  37. package/out/interface/controller/controller/control/panel-item/i-panel-data-container.controller.d.ts +1 -1
  38. package/out/interface/controller/controller/control/panel-item/i-panel-data-container.controller.d.ts.map +1 -1
  39. package/out/interface/controller/controller/control/panel-item/i-panel-item.controller.d.ts +6 -0
  40. package/out/interface/controller/controller/control/panel-item/i-panel-item.controller.d.ts.map +1 -1
  41. package/out/interface/controller/state/control/i-map.state.d.ts +25 -4
  42. package/out/interface/controller/state/control/i-map.state.d.ts.map +1 -1
  43. package/out/interface/index.d.ts +2 -1
  44. package/out/interface/index.d.ts.map +1 -1
  45. package/out/interface/index.js +2 -1
  46. package/out/interface/provider/i-ui-login-node.provider.d.ts +23 -0
  47. package/out/interface/provider/i-ui-login-node.provider.d.ts.map +1 -0
  48. package/out/interface/provider/index.d.ts +1 -0
  49. package/out/interface/provider/index.d.ts.map +1 -1
  50. package/out/interface/ui-login/i-ui-logic-context.d.ts +85 -0
  51. package/out/interface/ui-login/i-ui-logic-context.d.ts.map +1 -0
  52. package/out/interface/ui-login/i-ui-logic-context.js +1 -0
  53. package/out/interface/ui-login/index.d.ts +2 -0
  54. package/out/interface/ui-login/index.d.ts.map +1 -0
  55. package/out/interface/ui-login/index.js +1 -0
  56. package/out/interface/util/{i-export-excel/i-export-excel.d.ts → i-excel-util/i-excel-util.d.ts} +4 -4
  57. package/out/interface/util/i-excel-util/i-excel-util.d.ts.map +1 -0
  58. package/out/interface/util/i-excel-util/i-excel-util.js +1 -0
  59. package/out/interface/util/index.d.ts +1 -1
  60. package/out/interface/util/index.d.ts.map +1 -1
  61. package/out/logic-scheduler/executor/app-ui-logic-executor.d.ts +6 -9
  62. package/out/logic-scheduler/executor/app-ui-logic-executor.d.ts.map +1 -1
  63. package/out/logic-scheduler/executor/app-ui-logic-executor.js +14 -16
  64. package/out/model/data-entity/data-entity.d.ts +0 -11
  65. package/out/model/data-entity/data-entity.d.ts.map +1 -1
  66. package/out/model/data-entity/data-entity.js +0 -14
  67. package/out/model/panel/index.d.ts +1 -0
  68. package/out/model/panel/index.d.ts.map +1 -1
  69. package/out/model/panel/index.js +1 -0
  70. package/out/model/panel/panel-field.d.ts +11 -0
  71. package/out/model/panel/panel-field.d.ts.map +1 -0
  72. package/out/model/panel/panel-field.js +35 -0
  73. package/out/model/utils/util.d.ts +12 -1
  74. package/out/model/utils/util.d.ts.map +1 -1
  75. package/out/model/utils/util.js +18 -0
  76. package/out/register/helper/common-register.js +1 -1
  77. package/out/register/helper/index.d.ts +3 -2
  78. package/out/register/helper/index.d.ts.map +1 -1
  79. package/out/register/helper/index.js +3 -2
  80. package/out/register/helper/ui-logic-node-register.d.ts +25 -0
  81. package/out/register/helper/ui-logic-node-register.d.ts.map +1 -0
  82. package/out/register/helper/ui-logic-node-register.js +37 -0
  83. package/out/service/service/entity/method/de-action.d.ts.map +1 -1
  84. package/out/service/service/entity/method/de-action.js +3 -0
  85. package/out/service/service/entity/method/fetch.d.ts.map +1 -1
  86. package/out/service/service/entity/method/fetch.js +1 -1
  87. package/out/service/vo/index.d.ts +1 -0
  88. package/out/service/vo/index.d.ts.map +1 -1
  89. package/out/service/vo/index.js +1 -0
  90. package/out/service/vo/map-data/map-data.d.ts +1 -1
  91. package/out/service/vo/map-data/map-data.d.ts.map +1 -1
  92. package/out/service/vo/map-data/map-data.js +4 -3
  93. package/out/service/vo/panel-data/index.d.ts +2 -0
  94. package/out/service/vo/panel-data/index.d.ts.map +1 -0
  95. package/out/service/vo/panel-data/index.js +1 -0
  96. package/out/service/vo/panel-data/panel-data.d.ts +26 -0
  97. package/out/service/vo/panel-data/panel-data.d.ts.map +1 -0
  98. package/out/service/vo/panel-data/panel-data.js +90 -0
  99. package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts.map +1 -1
  100. package/out/service/vo/tree-node-data/tree-data-set-node-data.js +6 -2
  101. package/out/ui-logic/ui-logic-context.d.ts +7 -2
  102. package/out/ui-logic/ui-logic-context.d.ts.map +1 -1
  103. package/out/ui-logic/ui-logic-context.js +5 -0
  104. package/out/ui-logic/ui-logic-node/index.d.ts +1 -0
  105. package/out/ui-logic/ui-logic-node/index.d.ts.map +1 -1
  106. package/out/ui-logic/ui-logic-node/index.js +1 -0
  107. package/out/ui-logic/ui-logic-node/pf-plugin-node/pf-plugin-node.d.ts +17 -0
  108. package/out/ui-logic/ui-logic-node/pf-plugin-node/pf-plugin-node.d.ts.map +1 -0
  109. package/out/ui-logic/ui-logic-node/pf-plugin-node/pf-plugin-node.js +19 -0
  110. package/out/ui-logic/ui-logic.d.ts.map +1 -1
  111. package/out/ui-logic/ui-logic.js +3 -1
  112. package/package.json +2 -2
  113. package/src/controller/common/control/md-control.controller.ts +22 -22
  114. package/src/controller/control/form/form-detail/form-detail/form-detail.controller.ts +35 -25
  115. package/src/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.ts +2 -2
  116. package/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-content-type.controller.ts +2 -2
  117. package/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.ts +66 -1
  118. package/src/controller/control/form/form-detail/form-mdctrl/form-mdctrl.state.ts +1 -1
  119. package/src/controller/control/grid/grid/grid.controller.ts +20 -32
  120. package/src/controller/control/map/map.controller.ts +40 -3
  121. package/src/controller/control/panel/panel/panel-item.controller.ts +2 -0
  122. package/src/controller/control/panel/panel/panel.controller.ts +23 -22
  123. package/src/controller/utils/data-file-util/data-file-util.ts +156 -0
  124. package/src/controller/utils/index.ts +1 -0
  125. package/src/global/global-util/global-util.ts +2 -2
  126. package/src/interface/controller/controller/control/panel-item/i-panel-data-container.controller.ts +1 -1
  127. package/src/interface/controller/controller/control/panel-item/i-panel-item.controller.ts +7 -0
  128. package/src/interface/controller/state/control/i-map.state.ts +28 -4
  129. package/src/interface/index.ts +2 -1
  130. package/src/interface/provider/i-ui-login-node.provider.ts +23 -0
  131. package/src/interface/provider/index.ts +1 -0
  132. package/src/interface/ui-login/i-ui-logic-context.ts +95 -0
  133. package/src/interface/ui-login/index.ts +1 -0
  134. package/src/interface/util/{i-export-excel/i-export-excel.ts → i-excel-util/i-excel-util.ts} +3 -3
  135. package/src/interface/util/index.ts +1 -1
  136. package/src/logic-scheduler/executor/app-ui-logic-executor.ts +17 -16
  137. package/src/model/data-entity/data-entity.ts +0 -17
  138. package/src/model/panel/index.ts +1 -0
  139. package/src/model/panel/panel-field.ts +49 -0
  140. package/src/model/utils/util.ts +20 -0
  141. package/src/register/helper/common-register.ts +1 -1
  142. package/src/register/helper/index.ts +3 -2
  143. package/src/register/helper/ui-logic-node-register.ts +52 -0
  144. package/src/service/service/entity/method/de-action.ts +4 -1
  145. package/src/service/service/entity/method/fetch.ts +7 -1
  146. package/src/service/vo/index.ts +1 -0
  147. package/src/service/vo/map-data/map-data.ts +6 -4
  148. package/src/service/vo/panel-data/index.ts +1 -0
  149. package/src/service/vo/panel-data/panel-data.ts +112 -0
  150. package/src/service/vo/tree-node-data/tree-data-set-node-data.ts +6 -2
  151. package/src/ui-logic/ui-logic-context.ts +7 -2
  152. package/src/ui-logic/ui-logic-node/index.ts +1 -0
  153. package/src/ui-logic/ui-logic-node/pf-plugin-node/pf-plugin-node.ts +24 -0
  154. package/src/ui-logic/ui-logic.ts +3 -0
  155. package/out/interface/util/i-export-excel/i-export-excel.d.ts.map +0 -1
  156. /package/out/interface/{util/i-export-excel/i-export-excel.js → provider/i-ui-login-node.provider.js} +0 -0
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  import { ModelError, RuntimeError, RuntimeModelError, } from '@ibiz-template/core';
13
13
  import { notNilEmpty } from 'qx-util';
14
14
  import { OpenAppViewCommand } from '../../command';
15
- import { calcDeCodeNameById, getFormTypeFieldName } from '../../model';
15
+ import { calcDeCodeNameById } from '../../model';
16
16
  import { convertNavData } from '../../utils';
17
17
  import { LogicExecutor } from './logic-executor';
18
18
  import { Srfuf } from '../../service';
@@ -37,16 +37,13 @@ export class AppUILogicExecutor extends LogicExecutor {
37
37
  }
38
38
  }
39
39
  /**
40
- * 执行应用预置界面逻辑opendata
40
+ * 执行应用预置界面逻辑 opendata
41
41
  *
42
- * @author lxm
43
- * @date 2022-08-22 14:08:03
44
- * @export
45
- * @param {IPSAppUIOpenDataLogic} appUILogic 应用预置界面逻辑opendata模型对象
46
- * @param {IContext} context 上下文参数
47
- * @param {(IData | null)} data 数据集合
48
- * @param {IParams} params 视图参数
49
- * @param {IData} [opts] 额外参数,event是js原生事件
42
+ * @author chitanda
43
+ * @date 2023-11-02 11:11:36
44
+ * @param {IAppUIOpenDataLogic} appUILogic 应用预置界面逻辑 opendata 模型对象
45
+ * @param {IUILogicParams} parameters
46
+ * @return {*} {Promise<IModalData>}
50
47
  */
51
48
  async executeOpenDataAppUILogic(appUILogic, parameters) {
52
49
  const { context, params } = parameters, rest = __rest(parameters, ["context", "params"]);
@@ -54,6 +51,7 @@ export class AppUILogicExecutor extends LogicExecutor {
54
51
  if (!(data === null || data === void 0 ? void 0 : data[0])) {
55
52
  throw new RuntimeError('opendata没有可操作数据!');
56
53
  }
54
+ // openDataAppViews 只有[索引实体]或[多表单实体]才会有值
57
55
  const openViewRefs = appUILogic.openDataAppViews;
58
56
  let openViewRef;
59
57
  if (openViewRefs) {
@@ -84,15 +82,15 @@ export class AppUILogicExecutor extends LogicExecutor {
84
82
  return ibiz.commands.execute(OpenAppViewCommand.TAG, openView, tempContext, tempParams, rest);
85
83
  }
86
84
  async calcOpenViewRef(appUILogic, parameters) {
87
- const appDataEntityId = parameters.view.model.appDataEntityId;
88
- // 表单类型属性
89
- const formTypeName = await getFormTypeFieldName(appDataEntityId);
90
- if (!formTypeName) {
91
- throw new RuntimeModelError(appUILogic, `${appDataEntityId}实体缺少表单类型应用实体属性`);
85
+ const appDataEntity = await ibiz.hub.getAppDataEntity(parameters.view.model.appDataEntityId);
86
+ // [多表单实体] or [索引实体]类型属性
87
+ const typeFileName = appDataEntity.formTypeAppDEFieldId || appDataEntity.dataTypeAppDEFieldId;
88
+ if (!typeFileName) {
89
+ throw new RuntimeModelError(appUILogic, `${appDataEntity.codeName}[多表单实体] or [索引实体]缺少类型属性配置`);
92
90
  }
93
91
  const { data } = parameters;
94
92
  // 表单类型值
95
- const formTypeValue = data[0][formTypeName];
93
+ const formTypeValue = data[0][typeFileName];
96
94
  if (!formTypeValue) {
97
95
  throw new RuntimeModelError(appUILogic, '数据源无表单类型应用实体属性值');
98
96
  }
@@ -26,17 +26,6 @@ export declare function hasDeCodeName(params: IParams, entityId: string): boolea
26
26
  * @Date: 2023-05-31 10:26:24
27
27
  */
28
28
  export declare function getDeACMode(appDEACModeId: string, entityId: string, srfappid?: string): Promise<IAppDEACMode | undefined>;
29
- /**
30
- * 从实体里找到表单类型应用实体属性
31
- *
32
- * @author zk
33
- * @date 2023-09-07 05:09:41
34
- * @export
35
- * @param {string} entityId
36
- * @param {string} [srfappid]
37
- * @return {*} {(Promise<string | undefined>)}
38
- */
39
- export declare function getFormTypeFieldName(entityId: string): Promise<string | undefined>;
40
29
  /**
41
30
  * 从实体里找到实体逻辑
42
31
  * @author lxm
@@ -1 +1 @@
1
- {"version":3,"file":"data-entity.d.ts","sourceRoot":"","sources":["../../../src/model/data-entity/data-entity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,YAAY,EACZ,WAAW,EACX,QAAQ,EACT,MAAM,kBAAkB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KG;AACH,wBAAsB,WAAW,CAC/B,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CAMnC;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CACzB,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,cAAc,GACrB,QAAQ,GAAG,SAAS,CAEtB;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,GACrC,QAAQ,EAAE,CAYZ;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,MAAM,GACd,WAAW,GAAG,SAAS,CAEzB"}
@@ -39,20 +39,6 @@ export async function getDeACMode(appDEACModeId, entityId, srfappid) {
39
39
  });
40
40
  return deACMode;
41
41
  }
42
- /**
43
- * 从实体里找到表单类型应用实体属性
44
- *
45
- * @author zk
46
- * @date 2023-09-07 05:09:41
47
- * @export
48
- * @param {string} entityId
49
- * @param {string} [srfappid]
50
- * @return {*} {(Promise<string | undefined>)}
51
- */
52
- export async function getFormTypeFieldName(entityId) {
53
- const appDataEntity = await ibiz.hub.getAppDataEntity(entityId);
54
- return appDataEntity.formTypeAppDEFieldId;
55
- }
56
42
  /**
57
43
  * 从实体里找到实体逻辑
58
44
  * @author lxm
@@ -1,2 +1,3 @@
1
1
  export * from './data-container';
2
+ export * from './panel-field';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/model/panel/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/model/panel/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC"}
@@ -1 +1,2 @@
1
1
  export * from './data-container';
2
+ export * from './panel-field';
@@ -0,0 +1,11 @@
1
+ import { IPanel, IPanelContainer, IPanelField } from '@ibiz/model-core';
2
+ /**
3
+ * 获取所有子面板属性模型
4
+ * @author lxm
5
+ * @date 2023-11-01 04:45:44
6
+ * @export
7
+ * @param {(IPanel | IPanelContainer)} model
8
+ * @return {*} {IPanelField[]}
9
+ */
10
+ export declare function getAllPanelField(model: IPanel | IPanelContainer): IPanelField[];
11
+ //# sourceMappingURL=panel-field.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panel-field.d.ts","sourceRoot":"","sources":["../../../src/model/panel/panel-field.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,eAAe,EACf,WAAW,EAEZ,MAAM,kBAAkB,CAAC;AA+B1B;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,GAAG,eAAe,GAC9B,WAAW,EAAE,CAEf"}
@@ -0,0 +1,35 @@
1
+ import { isDataContainer } from './data-container';
2
+ const ChildKeys = ['panelItems', 'panelTabPages', 'rootPanelItems'];
3
+ function _getAllPanelField(model) {
4
+ let childItems = [];
5
+ for (const key of ChildKeys) {
6
+ if (model[key]) {
7
+ childItems = model[key];
8
+ break;
9
+ }
10
+ }
11
+ const fields = [];
12
+ if (childItems.length) {
13
+ // 过滤出当前层级的子里面的所有面板属性
14
+ fields.push(...childItems.filter(item => item.itemType === 'FIELD'));
15
+ // 递归遍历拿子里面的成员
16
+ childItems.forEach(item => {
17
+ // 如果是数据容器则不往下找
18
+ if (!isDataContainer(item)) {
19
+ fields.push(..._getAllPanelField(item));
20
+ }
21
+ });
22
+ }
23
+ return fields;
24
+ }
25
+ /**
26
+ * 获取所有子面板属性模型
27
+ * @author lxm
28
+ * @date 2023-11-01 04:45:44
29
+ * @export
30
+ * @param {(IPanel | IPanelContainer)} model
31
+ * @return {*} {IPanelField[]}
32
+ */
33
+ export function getAllPanelField(model) {
34
+ return _getAllPanelField(model);
35
+ }
@@ -1,4 +1,4 @@
1
- import { IAppView, IAppViewRef, IControl, IModelObject } from '@ibiz/model-core';
1
+ import { IAppView, IAppViewRef, IApplication, IControl, IModelObject, ISysPFPlugin } from '@ibiz/model-core';
2
2
  /**
3
3
  * 在数据模型中查找对应 id 模型
4
4
  *
@@ -42,4 +42,15 @@ export declare function parseUserParams(userParams: Record<string, string>): {
42
42
  navigateParams: IParams;
43
43
  other: IParams;
44
44
  };
45
+ /**
46
+ * 从应用里面获取插件配置参数
47
+ *
48
+ * @author chitanda
49
+ * @date 2023-11-01 17:11:28
50
+ * @export
51
+ * @param {IApplication} app
52
+ * @param {string} id
53
+ * @return {*} {ISysPFPlugin}
54
+ */
55
+ export declare function getPFPlugin(app: IApplication, id: string): ISysPFPlugin;
45
56
  //# sourceMappingURL=util.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/model/utils/util.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,YAAY,EACb,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,YAAY,EAAE,EACtB,EAAE,EAAE,MAAM,GACT,YAAY,GAAG,IAAI,CAQrB;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAQ5E;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,QAAQ,EACd,GAAG,EAAE,MAAM,GACV,WAAW,GAAG,SAAS,CAQzB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG;IACnE,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,OAAO,CAAC;IACxB,KAAK,EAAE,OAAO,CAAC;CAChB,CAyBA"}
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/model/utils/util.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,YAAY,EACb,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,YAAY,EAAE,EACtB,EAAE,EAAE,MAAM,GACT,YAAY,GAAG,IAAI,CAQrB;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAQ5E;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,QAAQ,EACd,GAAG,EAAE,MAAM,GACV,WAAW,GAAG,SAAS,CAQzB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG;IACnE,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,OAAO,CAAC;IACxB,KAAK,EAAE,OAAO,CAAC;CAChB,CAyBA;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,GAAG,YAAY,CAMvE"}
@@ -87,3 +87,21 @@ export function parseUserParams(userParams) {
87
87
  }
88
88
  return { navigateContexts, navigateParams, other };
89
89
  }
90
+ /**
91
+ * 从应用里面获取插件配置参数
92
+ *
93
+ * @author chitanda
94
+ * @date 2023-11-01 17:11:28
95
+ * @export
96
+ * @param {IApplication} app
97
+ * @param {string} id
98
+ * @return {*} {ISysPFPlugin}
99
+ */
100
+ export function getPFPlugin(app, id) {
101
+ var _a;
102
+ const plugin = (_a = app.appPFPluginRefs) === null || _a === void 0 ? void 0 : _a.find(item => item.id === id);
103
+ if (!plugin) {
104
+ throw new Error(`未找到插件${id}`);
105
+ }
106
+ return plugin;
107
+ }
@@ -12,7 +12,7 @@ export async function getPluginRegisterKey(pluginId, appId) {
12
12
  const app = ibiz.hub.getApp(appId);
13
13
  const plugin = (_a = app.model.appPFPluginRefs) === null || _a === void 0 ? void 0 : _a.find(item => item.pluginCode.toLowerCase() === pluginId);
14
14
  if (!plugin) {
15
- ibiz.log.error(`找不到${pluginId}的插件模型`);
15
+ ibiz.log.error(`未匹配到插件[${pluginId}]模型`);
16
16
  return;
17
17
  }
18
18
  await ibiz.plugin.loadPlugin(plugin);
@@ -1,10 +1,11 @@
1
+ export * from './app-counter-register';
1
2
  export * from './control-register';
2
3
  export * from './editor-register';
3
4
  export * from './form-detail-register';
4
5
  export * from './grid-column-register';
5
6
  export * from './panel-item-register';
7
+ export * from './portlet-register';
6
8
  export * from './ui-action-register';
9
+ export * from './ui-logic-node-register';
7
10
  export * from './view-register';
8
- export * from './portlet-register';
9
- export * from './app-counter-register';
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/register/helper/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/register/helper/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC"}
@@ -1,9 +1,10 @@
1
+ export * from './app-counter-register';
1
2
  export * from './control-register';
2
3
  export * from './editor-register';
3
4
  export * from './form-detail-register';
4
5
  export * from './grid-column-register';
5
6
  export * from './panel-item-register';
7
+ export * from './portlet-register';
6
8
  export * from './ui-action-register';
9
+ export * from './ui-logic-node-register';
7
10
  export * from './view-register';
8
- export * from './portlet-register';
9
- export * from './app-counter-register';
@@ -0,0 +1,25 @@
1
+ import { IDEUIPFPluginLogic } from '@ibiz/model-core';
2
+ import { IUILogicNodeProvider } from '../../interface';
3
+ /** 界面逻辑节点适配器前缀 */
4
+ export declare 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 declare function registerUILogicNodeProvider(key: string, callback: () => IUILogicNodeProvider): void;
15
+ /**
16
+ * 获取界面逻辑节点适配器
17
+ *
18
+ * @author chitanda
19
+ * @date 2023-11-01 17:11:43
20
+ * @export
21
+ * @param {IDEUIPFPluginLogic} model
22
+ * @return {*} {Promise<IUILogicNodeProvider>}
23
+ */
24
+ export declare function getUILogicNodeProvider(model: IDEUIPFPluginLogic): Promise<IUILogicNodeProvider | undefined>;
25
+ //# sourceMappingURL=ui-logic-node-register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-logic-node-register.d.ts","sourceRoot":"","sources":["../../../src/register/helper/ui-logic-node-register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAGpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,kBAAkB;AAClB,eAAO,MAAM,2BAA2B,kBAAkB,CAAC;AAE3D;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,oBAAoB,GACnC,IAAI,CAEN;AAED;;;;;;;;GAQG;AACH,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,kBAAkB,GACxB,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC,CAgB3C"}
@@ -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/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O,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,GAAG,KAAK,EAAE,GACtB,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IAkBtC;;;;;;;;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,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"}
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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AO,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,GAAG,KAAK,EAAE,GACtB,OAAO,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IAkBtC;;;;;;;;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,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":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BAAgB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIpD;;;;;;;;GAQG;AACH,qBAAa,WAAY,SAAQ,MAAM;IAC7B,MAAM,EAAE,aAAa,CAAC;IAE9B,SAAS,KAAK,WAAW,IAAI,OAAO,CAEnC;IAEK,IAAI,CACR,OAAO,EAAE,OAAO,EAChB,MAAM,CAAC,EAAE,KAAK,GAAG,KAAK,EAAE,EACxB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC,CAAC;IAoDvC;;;;;;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"}
@@ -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
  }
@@ -3,4 +3,5 @@ export * from './tree-node-data';
3
3
  export * from './ui-map-field';
4
4
  export * from './calendar-item-data';
5
5
  export * from './map-data';
6
+ export * from './panel-data';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -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"}
@@ -3,3 +3,4 @@ export * from './tree-node-data';
3
3
  export * from './ui-map-field';
4
4
  export * from './calendar-item-data';
5
5
  export * from './map-data';
6
+ export * from './panel-data';
@@ -3,7 +3,7 @@ import { IMapData } from '../../../interface';
3
3
  export declare class MapData implements IMapData {
4
4
  [key: string | symbol]: any;
5
5
  _id: string;
6
- _type: 'point' | 'area';
6
+ _itemStyle: string;
7
7
  _mapItemId: string;
8
8
  _longitude?: string;
9
9
  _latitude?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"map-data.d.ts","sourceRoot":"","sources":["../../../../src/service/vo/map-data/map-data.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAgB9C,qBAAa,OAAQ,YAAW,QAAQ;IAEtC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC;IAE5B,GAAG,EAAE,MAAM,CAAC;IAEZ,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IAExB,UAAU,EAAE,MAAM,CAAC;IAEnB,UAAU,CAAC,EAAE,MAAM,CAAa;IAEhC,SAAS,CAAC,EAAE,MAAM,CAAa;IAE/B,SAAS,CAAC,EAAE,MAAM,CAAa;IAE/B,QAAQ,CAAC,EAAE,MAAM,CAAa;IAE9B,MAAM,CAAC,EAAE,MAAM,CAAa;IAE5B,KAAK,CAAC,EAAE,MAAM,CAAa;IAE3B,OAAO,CAAC,EAAE,MAAM,CAAa;gBAEjB,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW;CAgFhD"}
1
+ {"version":3,"file":"map-data.d.ts","sourceRoot":"","sources":["../../../../src/service/vo/map-data/map-data.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAkB9C,qBAAa,OAAQ,YAAW,QAAQ;IAEtC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC;IAE5B,GAAG,EAAE,MAAM,CAAC;IAEZ,UAAU,EAAE,MAAM,CAAC;IAEnB,UAAU,EAAE,MAAM,CAAC;IAEnB,UAAU,CAAC,EAAE,MAAM,CAAa;IAEhC,SAAS,CAAC,EAAE,MAAM,CAAa;IAE/B,SAAS,CAAC,EAAE,MAAM,CAAa;IAE/B,QAAQ,CAAC,EAAE,MAAM,CAAa;IAE9B,MAAM,CAAC,EAAE,MAAM,CAAa;IAE5B,KAAK,CAAC,EAAE,MAAM,CAAa;IAE3B,OAAO,CAAC,EAAE,MAAM,CAAa;gBAEjB,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW;CAgFhD"}
@@ -11,6 +11,7 @@ function updateKeyDefine(target, keys) {
11
11
  }
12
12
  });
13
13
  }
14
+ const AreaItemStyles = ['REGION', 'REGION2', 'REGION3', 'REGION4'];
14
15
  export class MapData {
15
16
  constructor(deData, mapItem) {
16
17
  this._longitude = undefined;
@@ -20,12 +21,12 @@ export class MapData {
20
21
  this._value = undefined;
21
22
  this._text = undefined;
22
23
  this._symbol = undefined;
23
- const { id, itemType, longitudeAppDEFieldId, latitudeAppDEFieldId, textAppDEFieldId, dataAppDEFieldId, tipsAppDEFieldId, sysImage, } = mapItem;
24
+ const { id, itemStyle, longitudeAppDEFieldId, latitudeAppDEFieldId, textAppDEFieldId, dataAppDEFieldId, tipsAppDEFieldId, sysImage, } = mapItem;
24
25
  const keyMap = new Map();
25
26
  this._id = id + deData.srfkey;
26
- this._type = itemType;
27
+ this._itemStyle = itemStyle;
27
28
  this._mapItemId = id;
28
- if (itemType === 'area') {
29
+ if (AreaItemStyles.includes(this._itemStyle)) {
29
30
  if (longitudeAppDEFieldId) {
30
31
  keyMap.set('_areaCode', longitudeAppDEFieldId);
31
32
  }
@@ -0,0 +1,2 @@
1
+ export { PanelData } from './panel-data';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -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,26 @@
1
+ import { IPanelField } from '@ibiz/model-core';
2
+ import { QXEvent } from 'qx-util';
3
+ type ChangeCallBack = (field: string) => void;
4
+ /**
5
+ * 面板数据
6
+ * @author lxm
7
+ * @date 2023-11-01 05:13:53
8
+ * @export
9
+ * @class PanelData
10
+ */
11
+ export declare class PanelData {
12
+ [key: string | symbol]: any;
13
+ /**
14
+ * 事件
15
+ * @author lxm
16
+ * @date 2023-11-02 02:35:33
17
+ * @protected
18
+ */
19
+ _evt: QXEvent<{
20
+ change: ChangeCallBack;
21
+ }>;
22
+ constructor(fields: IPanelField[], origin: IParams);
23
+ destroy(): void;
24
+ }
25
+ export {};
26
+ //# 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;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAgBlC,KAAK,cAAc,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;AAE9C;;;;;;GAMG;AACH,qBAAa,SAAS;IAEpB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC;IAE5B;;;;;OAKG;IACK,IAAI,EAAE,OAAO,CAAC;QAAE,MAAM,EAAE,cAAc,CAAA;KAAE,CAAC,CAAC;gBAEtC,MAAM,EAAE,WAAW,EAAE,EAAE,MAAM,EAAE,OAAO;IAoElD,OAAO,IAAI,IAAI;CAGhB"}
@@ -0,0 +1,90 @@
1
+ /* eslint-disable no-constructor-return */
2
+ import { QXEvent } from 'qx-util';
3
+ // 更新属性,缺的补充定义
4
+ function updateKeyDefine(target, keys) {
5
+ keys.forEach(key => {
6
+ if (!Object.prototype.hasOwnProperty.call(target, key)) {
7
+ Object.defineProperty(target, key, {
8
+ enumerable: true,
9
+ configurable: true,
10
+ writable: true,
11
+ value: undefined,
12
+ });
13
+ }
14
+ });
15
+ }
16
+ /**
17
+ * 面板数据
18
+ * @author lxm
19
+ * @date 2023-11-01 05:13:53
20
+ * @export
21
+ * @class PanelData
22
+ */
23
+ export class PanelData {
24
+ constructor(fields, origin) {
25
+ const _evt = new QXEvent();
26
+ // 面板属性映射绑定项
27
+ const keyMap = {};
28
+ // 绑定项映射面板属性
29
+ const reverseKeyMap = {};
30
+ fields.forEach(field => {
31
+ var _a;
32
+ keyMap[field.id] = (_a = field.viewFieldName) === null || _a === void 0 ? void 0 : _a.toLowerCase();
33
+ if (field.viewFieldName) {
34
+ reverseKeyMap[field.viewFieldName.toLowerCase()] = field.id;
35
+ }
36
+ });
37
+ return new Proxy(this, {
38
+ set(target, p, value) {
39
+ if (Object.prototype.hasOwnProperty.call(keyMap, p)) {
40
+ if (keyMap[p]) {
41
+ // 有面板属性有绑定数据项修改原始对象
42
+ origin[keyMap[p]] = value;
43
+ }
44
+ else {
45
+ // 有面板属性没有绑定数据项的改自身
46
+ target[p] = value;
47
+ }
48
+ }
49
+ else {
50
+ // 没有面板属性的直接修改原始对象,视图面板对象一开始就是空的,没有任何属性
51
+ origin[p] = value;
52
+ }
53
+ _evt.emit('change', p);
54
+ // 修改面板属性,同步抛原值变更
55
+ if (keyMap[p] && keyMap[p] !== p) {
56
+ _evt.emit('change', keyMap[p]);
57
+ }
58
+ // 修改原值变更,同时抛面板属性变更
59
+ if (reverseKeyMap[p] && reverseKeyMap[p] !== p) {
60
+ _evt.emit('change', reverseKeyMap[p]);
61
+ }
62
+ return true;
63
+ },
64
+ get(target, p, _receiver) {
65
+ if (p === '_evt') {
66
+ return _evt;
67
+ }
68
+ // 有映射拿原始对象
69
+ if (keyMap[p]) {
70
+ return origin[keyMap[p]];
71
+ }
72
+ // 源对象的属性可以直接拿
73
+ if (Object.prototype.hasOwnProperty.call(origin, p)) {
74
+ return origin[p];
75
+ }
76
+ // 最后拿自身
77
+ return target[p];
78
+ },
79
+ ownKeys(target) {
80
+ // 只返回原始数据的键,自身的只是前端映射使用不需要在复制和后台传递时使用
81
+ const allKeys = Object.keys(origin);
82
+ updateKeyDefine(target, allKeys);
83
+ return allKeys;
84
+ },
85
+ });
86
+ }
87
+ destroy() {
88
+ this._evt.reset();
89
+ }
90
+ }
@@ -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,MAA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S,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 = data.srfmajortext;
18
- this.value = data.srfkey;
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;