@ibiz-template/runtime 0.5.3-beta.7 → 0.5.3-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -6013,14 +6013,12 @@ var MethodDto = class {
6013
6013
  * @param {IAppDataEntity} entity
6014
6014
  * @param {boolean} [isLocalMode]
6015
6015
  * @param {IAppDEMethodDTO} [dto]
6016
- * @param {boolean} [inSelfLoop] 是否在自关系循环中
6017
6016
  */
6018
- constructor(service, entity, isLocalMode, dto, inSelfLoop) {
6017
+ constructor(service, entity, isLocalMode, dto) {
6019
6018
  this.service = service;
6020
6019
  this.entity = entity;
6021
6020
  this.isLocalMode = isLocalMode;
6022
6021
  this.dto = dto;
6023
- this.inSelfLoop = inSelfLoop;
6024
6022
  this.dtoMap = /* @__PURE__ */ new Map();
6025
6023
  if (dto) {
6026
6024
  this.app = ibiz.hub.getApp(entity.appId);
@@ -6150,9 +6148,6 @@ var MethodDto = class {
6150
6148
  * @return {*} {Promise<IDataEntity[]>}
6151
6149
  */
6152
6150
  async sets(context, data) {
6153
- if (this.isLocalMode && !this.inSelfLoop) {
6154
- this.service.local.clear();
6155
- }
6156
6151
  const uiDomain = ibiz.uiDomainManager.get(context.srfsessionid);
6157
6152
  if (uiDomain && uiDomain.state.rsInit !== true) {
6158
6153
  await this.calcRs(context);
@@ -6252,12 +6247,10 @@ var MethodDto = class {
6252
6247
  entity.appDEMethodDTOs || [],
6253
6248
  field.refAppDEMethodDTOId
6254
6249
  );
6255
- const inSelfLoop = this.entity.codeName === entity.codeName;
6256
6250
  const service = await this.app.deService.getService(context, entity.id);
6257
6251
  service.isLocalMode = true;
6258
6252
  const dto = service.createMethodDto(methodDto, {
6259
- isLocalMode: true,
6260
- inSelfLoop
6253
+ isLocalMode: true
6261
6254
  });
6262
6255
  this.dtoMap.set(field.codeName, dto);
6263
6256
  return dto;
@@ -6503,13 +6496,7 @@ var DEService = class {
6503
6496
  this.local.clear();
6504
6497
  }
6505
6498
  createMethodDto(dto, opts) {
6506
- return new MethodDto(
6507
- this,
6508
- this.model,
6509
- opts == null ? void 0 : opts.isLocalMode,
6510
- dto,
6511
- opts == null ? void 0 : opts.inSelfLoop
6512
- );
6499
+ return new MethodDto(this, this.model, opts == null ? void 0 : opts.isLocalMode, dto);
6513
6500
  }
6514
6501
  };
6515
6502
 
@@ -7408,6 +7395,11 @@ var MethodReturn = class {
7408
7395
  */
7409
7396
  async handle(context, data) {
7410
7397
  if (this.dto) {
7398
+ const app = ibiz.hub.getApp(this.entity.appId);
7399
+ app.deService.clearTempCache({
7400
+ srfappid: app.appId,
7401
+ srfsessionid: context.srfsessionid
7402
+ });
7411
7403
  const items = await this.dto.sets(context, [data]);
7412
7404
  return items[0];
7413
7405
  }