@ibiz-template/model-helper 0.7.41-alpha.33 → 0.7.41-alpha.34

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 CHANGED
@@ -19191,11 +19191,15 @@ var MergeSubModelHelper = class {
19191
19191
  if (forms.length === 0)
19192
19192
  return;
19193
19193
  forms.forEach((dstForm) => {
19194
- const ids = dstForm.id.split(".");
19194
+ var _a, _b;
19195
+ const appDataEntityId = (_b = (_a = dstForm.appDataEntityId) == null ? void 0 : _a.split(
19196
+ "."
19197
+ )) == null ? void 0 : _b[1];
19198
+ const { codeName } = dstForm;
19195
19199
  const dataRelationTags = getFormdataRelationTags(dstForm);
19196
19200
  for (let i = 0; i < subAppRefs.length; i++) {
19197
19201
  const srcForm = ibiz.hub.getSubAppControl(
19198
- ids[1] + ids[2],
19202
+ appDataEntityId + codeName,
19199
19203
  subAppRefs[i].appId
19200
19204
  );
19201
19205
  if (srcForm) {
@@ -19205,7 +19209,7 @@ var MergeSubModelHelper = class {
19205
19209
  for (let j = 0; j < dataRelationTags.length; j++) {
19206
19210
  const dataRelationTag = dataRelationTags[j];
19207
19211
  const dataRelationForm = ibiz.hub.getSubAppControl(
19208
- ids[1] + dataRelationTag,
19212
+ appDataEntityId + dataRelationTag,
19209
19213
  subAppRefs[i].appId
19210
19214
  );
19211
19215
  if (dataRelationForm) {
@@ -19238,6 +19242,34 @@ var MergeSubModelHelper = class {
19238
19242
  }
19239
19243
  }
19240
19244
  }
19245
+ /**
19246
+ * @description 合并子应用AC自填模式界面行为组
19247
+ * @param {(IAppDEACMode[] | undefined)} acModes
19248
+ * @param {ISubAppRef[]} subAppRefs
19249
+ * @returns {*} {void}
19250
+ * @memberof MergeSubModelHelper
19251
+ */
19252
+ mergeSubAppDEACModesActionGroup(acModes, subAppRefs) {
19253
+ if (!acModes || !acModes.length || !subAppRefs || !subAppRefs.length)
19254
+ return;
19255
+ for (let index = 0; index < acModes.length; index++) {
19256
+ const { deuiactionGroup } = acModes[index];
19257
+ if (deuiactionGroup) {
19258
+ for (let j = 0; j < subAppRefs.length; j++) {
19259
+ const srcAppDEUIActionGroup = ibiz.hub.getSubAppDEUIActionGroups(
19260
+ deuiactionGroup.uniqueTag,
19261
+ subAppRefs[j].appId
19262
+ );
19263
+ if (srcAppDEUIActionGroup) {
19264
+ mergeAppDEUIActionGroup(
19265
+ deuiactionGroup,
19266
+ srcAppDEUIActionGroup
19267
+ );
19268
+ }
19269
+ }
19270
+ }
19271
+ }
19272
+ }
19241
19273
  };
19242
19274
 
19243
19275
  // src/model/PSSYSAPP.ts
@@ -20035,6 +20067,18 @@ var ModelHelper = class {
20035
20067
  getAppStyle(appId) {
20036
20068
  return this.getModelUtil(appId).getAppStyle();
20037
20069
  }
20070
+ /**
20071
+ * @description 计算应用实体需要合并的子应用模型
20072
+ * @protected
20073
+ * @param {IAppDataEntity} appDataEntity
20074
+ * @memberof ModelHelper
20075
+ */
20076
+ calcAppDataEntitySubAppModel(appDataEntity) {
20077
+ this.merge.mergeSubAppDEACModesActionGroup(
20078
+ appDataEntity.appDEACModes,
20079
+ this.subAppRefs
20080
+ );
20081
+ }
20038
20082
  /**
20039
20083
  * 根据应用实体 codeName 获取应用实体模型
20040
20084
  *
@@ -20049,6 +20093,7 @@ var ModelHelper = class {
20049
20093
  const util = this.getModelUtil(appId);
20050
20094
  const model = await util.getAppDataEntityModel(name, isId, true);
20051
20095
  const dsl = this.dsl.appDataEntity(model);
20096
+ this.calcAppDataEntitySubAppModel(dsl);
20052
20097
  const list = await util.servicePathUtil.calcRequestPaths(dsl.id);
20053
20098
  dsl.requestPaths = list;
20054
20099
  dsl.codeName2 = plural(dsl.codeName.toLowerCase());