@ibiz-template/runtime 0.7.41-alpha.111 → 0.7.41-alpha.112

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 (58) hide show
  1. package/dist/index.esm.js +304 -244
  2. package/dist/index.system.min.js +1 -1
  3. package/out/config/global-config.d.ts.map +1 -1
  4. package/out/config/global-config.js +1 -0
  5. package/out/controller/common/base.controller.js +2 -2
  6. package/out/controller/common/editor/editor.controller.d.ts.map +1 -1
  7. package/out/controller/common/editor/editor.controller.js +10 -1
  8. package/out/controller/common/view/view.controller.js +2 -2
  9. package/out/controller/control/calendar/calendar.controller.d.ts.map +1 -1
  10. package/out/controller/control/calendar/calendar.controller.js +15 -11
  11. package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts +6 -0
  12. package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts.map +1 -1
  13. package/out/controller/control/form/form-detail/form-item/form-item.controller.js +14 -1
  14. package/out/controller/control/form/form-detail/form-item/form-item.state.d.ts +7 -0
  15. package/out/controller/control/form/form-detail/form-item/form-item.state.d.ts.map +1 -1
  16. package/out/controller/control/form/form-detail/form-item/form-item.state.js +7 -0
  17. package/out/controller/control/form/form-detail/form-rawitem/form-rawitem.controller.d.ts +7 -0
  18. package/out/controller/control/form/form-detail/form-rawitem/form-rawitem.controller.d.ts.map +1 -1
  19. package/out/controller/control/form/form-detail/form-rawitem/form-rawitem.controller.js +15 -0
  20. package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
  21. package/out/controller/control/grid/grid/grid.controller.js +12 -2
  22. package/out/controller/control/report-panel/generator/bi-converter/base/grid-converter-base.js +9 -9
  23. package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
  24. package/out/controller/control/tree/tree.controller.js +14 -10
  25. package/out/engine/md-view.engine.d.ts.map +1 -1
  26. package/out/engine/md-view.engine.js +22 -20
  27. package/out/interface/api/common/global-config/i-api-global-common-config.d.ts +9 -0
  28. package/out/interface/api/common/global-config/i-api-global-common-config.d.ts.map +1 -1
  29. package/out/interface/api/state/control/form-detail/i-api-form-item.state.d.ts +6 -0
  30. package/out/interface/api/state/control/form-detail/i-api-form-item.state.d.ts.map +1 -1
  31. package/out/logic-scheduler/executor/app-ui-action-executor.js +1 -1
  32. package/out/logic-scheduler/scheduler/view-logic-scheduler.d.ts +3 -4
  33. package/out/logic-scheduler/scheduler/view-logic-scheduler.d.ts.map +1 -1
  34. package/out/logic-scheduler/scheduler/view-logic-scheduler.js +7 -5
  35. package/out/utils/handlebars/helpers/date-format/date-format.d.ts +14 -0
  36. package/out/utils/handlebars/helpers/date-format/date-format.d.ts.map +1 -0
  37. package/out/utils/handlebars/helpers/date-format/date-format.js +18 -0
  38. package/out/utils/handlebars/helpers/index.d.ts.map +1 -1
  39. package/out/utils/handlebars/helpers/index.js +2 -0
  40. package/package.json +4 -4
  41. package/src/config/global-config.ts +1 -0
  42. package/src/controller/common/base.controller.ts +2 -2
  43. package/src/controller/common/editor/editor.controller.ts +13 -1
  44. package/src/controller/common/view/view.controller.ts +2 -2
  45. package/src/controller/control/calendar/calendar.controller.ts +15 -17
  46. package/src/controller/control/form/form-detail/form-item/form-item.controller.ts +14 -1
  47. package/src/controller/control/form/form-detail/form-item/form-item.state.ts +8 -0
  48. package/src/controller/control/form/form-detail/form-rawitem/form-rawitem.controller.ts +15 -0
  49. package/src/controller/control/grid/grid/grid.controller.ts +13 -1
  50. package/src/controller/control/report-panel/generator/bi-converter/base/grid-converter-base.ts +9 -9
  51. package/src/controller/control/tree/tree.controller.ts +14 -16
  52. package/src/engine/md-view.engine.ts +22 -24
  53. package/src/interface/api/common/global-config/i-api-global-common-config.ts +10 -0
  54. package/src/interface/api/state/control/form-detail/i-api-form-item.state.ts +7 -0
  55. package/src/logic-scheduler/executor/app-ui-action-executor.ts +1 -1
  56. package/src/logic-scheduler/scheduler/view-logic-scheduler.ts +7 -5
  57. package/src/utils/handlebars/helpers/date-format/date-format.ts +20 -0
  58. package/src/utils/handlebars/helpers/index.ts +2 -0
@@ -1 +1 @@
1
- {"version":3,"file":"view-logic-scheduler.d.ts","sourceRoot":"","sources":["../../../src/logic-scheduler/scheduler/view-logic-scheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAmB,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;;;;;GAOG;AACH,qBAAa,kBAAmB,SAAQ,cAAc;gBACxC,MAAM,EAAE,eAAe,EAAE,EAAE,aAAa,GAAE,MAAM,EAAO;IAQnE;;;;;;;OAOG;IACH,gBAAgB,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;CAOzC"}
1
+ {"version":3,"file":"view-logic-scheduler.d.ts","sourceRoot":"","sources":["../../../src/logic-scheduler/scheduler/view-logic-scheduler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAmB,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;;;;;GAOG;AACH,qBAAa,kBAAmB,SAAQ,cAAc;gBACxC,MAAM,EAAE,eAAe,EAAE,EAAE,aAAa,GAAE,MAAM,EAAO;IAQnE;;;;;;OAMG;IACG,gBAAgB,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAUxD"}
@@ -19,15 +19,17 @@ export class ViewLogicScheduler extends LogicScheduler {
19
19
  * 触发视图事件
20
20
  * @author lxm
21
21
  * @date 2023-06-26 02:26:33
22
- * @param {string} itemName 子项名称
23
- * @param {Partial<IUILogicParams>} executeParams 执行参数
24
- * @return {*} {(boolean | undefined)}
22
+ * @param {EventBase} event 事件对象
23
+ * @return {*} {Promise<void>}
25
24
  */
26
- triggerViewEvent(event) {
25
+ async triggerViewEvent(event) {
27
26
  const matchParams = {
28
27
  eventName: event.eventName,
29
28
  triggerType: 'VIEWEVENT',
30
29
  };
31
- this.triggerAndExecute(matchParams, event);
30
+ const result = this.triggerAndExecute(matchParams, event);
31
+ if (result === null || result === void 0 ? void 0 : result.length) {
32
+ await Promise.all(result);
33
+ }
32
34
  }
33
35
  }
@@ -0,0 +1,14 @@
1
+ import { HelperBase } from '../helper-base';
2
+ /**
3
+ * @description 时间格式化,用法: 销售内示数据{{dateFormat now "YYYYMMDDHHmmss"}}.xlsx
4
+ * @author tony001
5
+ * @date 2026-07-06 15:07:49
6
+ * @export
7
+ * @class HelperDateFormat
8
+ * @extends {HelperBase}
9
+ */
10
+ export declare class HelperDateFormat extends HelperBase {
11
+ constructor(hbs: IData);
12
+ onExecute(date: Date, format: string): string;
13
+ }
14
+ //# sourceMappingURL=date-format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date-format.d.ts","sourceRoot":"","sources":["../../../../../src/utils/handlebars/helpers/date-format/date-format.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;;;;;;GAOG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;gBAClC,GAAG,EAAE,KAAK;IAItB,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;CAG9C"}
@@ -0,0 +1,18 @@
1
+ import dayjs from 'dayjs';
2
+ import { HelperBase } from '../helper-base';
3
+ /**
4
+ * @description 时间格式化,用法: 销售内示数据{{dateFormat now "YYYYMMDDHHmmss"}}.xlsx
5
+ * @author tony001
6
+ * @date 2026-07-06 15:07:49
7
+ * @export
8
+ * @class HelperDateFormat
9
+ * @extends {HelperBase}
10
+ */
11
+ export class HelperDateFormat extends HelperBase {
12
+ constructor(hbs) {
13
+ super(hbs, 'dateFormat');
14
+ }
15
+ onExecute(date, format) {
16
+ return dayjs(date).format(format);
17
+ }
18
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/handlebars/helpers/index.ts"],"names":[],"mappings":"AAqBA;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,CAqB/C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/handlebars/helpers/index.ts"],"names":[],"mappings":"AAsBA;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,CAsB/C"}
@@ -18,6 +18,7 @@ import { HelperSnakeCase } from './snake-case/snake-case';
18
18
  import { HelperSpinalCase } from './spinal-case/spinal-case';
19
19
  import { HelperUpperCase } from './upper-case/upper-case';
20
20
  import { HelperAbs } from './abs/abs';
21
+ import { HelperDateFormat } from './date-format/date-format';
21
22
  /**
22
23
  * 安装自定义助手
23
24
  *
@@ -46,4 +47,5 @@ export function installHelpers(hsb) {
46
47
  new HelperSpinalCase(hsb);
47
48
  new HelperUpperCase(hsb);
48
49
  new HelperEqPropertyValue(hsb);
50
+ new HelperDateFormat(hsb);
49
51
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/runtime",
3
- "version": "0.7.41-alpha.111",
3
+ "version": "0.7.41-alpha.112",
4
4
  "description": "运行时逻辑库",
5
5
  "type": "module",
6
6
  "main": "out/index.js",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "@ibiz-template/core": "^0.7.41-alpha.106",
43
- "@ibiz/model-core": "^0.1.87",
43
+ "@ibiz/model-core": "^0.1.88",
44
44
  "@types/animejs": "^3.1.12",
45
45
  "@types/path-browserify": "^1.0.2",
46
46
  "@types/qs": "^6.9.11",
@@ -58,7 +58,7 @@
58
58
  },
59
59
  "peerDependencies": {
60
60
  "@ibiz-template/core": "^0.6.0",
61
- "@ibiz/model-core": "^0.1.87",
61
+ "@ibiz/model-core": "^0.1.88",
62
62
  "async-validator": "^4.2.5",
63
63
  "dayjs": "^1.11.7",
64
64
  "echarts": "^5.4.3",
@@ -70,5 +70,5 @@
70
70
  "qx-util": "^0.4.8",
71
71
  "ramda": "^0.29.0"
72
72
  },
73
- "gitHead": "2c908d8a4d16897d7e1a1beea2f3ac9f4ac0bfdc"
73
+ "gitHead": "884c135f203cf1a0ae3977442b559b757acd6b47"
74
74
  }
@@ -129,6 +129,7 @@ export class GlobalConfig implements IGlobalConfig {
129
129
  aiChunkView: '',
130
130
  aiChunkEntity: '',
131
131
  counterMaxValue: 99,
132
+ enhancedUI: false,
132
133
  };
133
134
 
134
135
  // 全局分页流布局配置
@@ -156,12 +156,12 @@ export class BaseController<
156
156
  // 登记自身
157
157
  this.mountCounter.enroll(SELF_KEY);
158
158
  await this.onCreated();
159
+ ibiz.log.debug(`${this.constructor.name}:${this.name} onCreated`);
160
+ await this._evt.emit('onCreated', undefined);
159
161
  this.state.isCreated = true;
160
162
  this.force(() => {
161
163
  this.mountSelf();
162
164
  });
163
- ibiz.log.debug(`${this.constructor.name}:${this.name} onCreated`);
164
- this._evt.emit('onCreated', undefined);
165
165
  }
166
166
 
167
167
  /**
@@ -3,6 +3,7 @@ import {
3
3
  IEditor,
4
4
  IEditorItem,
5
5
  INavigateParamContainer,
6
+ IControlAttribute,
6
7
  } from '@ibiz/model-core';
7
8
  import { DataTypes } from '@ibiz-template/core';
8
9
  import dayjs from 'dayjs';
@@ -15,6 +16,7 @@ import {
15
16
  } from '../../../interface/controller';
16
17
  import { ValueExUtil } from '../../utils';
17
18
  import { ControlController } from '../control';
19
+ import { PredefinedAttributes } from '../../../constant';
18
20
 
19
21
  /**
20
22
  * 编辑器控制器基类
@@ -309,7 +311,17 @@ export class EditorController<T extends IEditor = IEditor>
309
311
  (item: IEditorItem) => item.id !== this.model.id,
310
312
  );
311
313
  }
312
-
314
+ // 合并语义化埋点属性
315
+ const controlAttributes =
316
+ (this.parent as IData).model?.controlAttributes?.filter(
317
+ (item: IControlAttribute) =>
318
+ PredefinedAttributes.CLASSNAMES === item.attrName ||
319
+ PredefinedAttributes.STYLES === item.attrName,
320
+ ) || [];
321
+ if (controlAttributes.length) {
322
+ if (!this.model.controlAttributes) this.model.controlAttributes = [];
323
+ this.model.controlAttributes.push(...controlAttributes);
324
+ }
313
325
  this.initExtraParams();
314
326
  }
315
327
 
@@ -483,8 +483,8 @@ export class ViewController<
483
483
  };
484
484
  if (this.scheduler.hasViewEventTrigger) {
485
485
  // 监听视图事件触发视图事件触发器
486
- this.evt.onAll((_eventName, event) => {
487
- this.scheduler!.triggerViewEvent(event);
486
+ this.evt.onAll(async (_eventName, event) => {
487
+ await this.scheduler!.triggerViewEvent(event);
488
488
  });
489
489
  }
490
490
  }
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable no-case-declarations */
2
2
  import dayjs from 'dayjs';
3
3
  import { ISysCalendar, ISysCalendarItem } from '@ibiz/model-core';
4
- import { RuntimeError, RuntimeModelError } from '@ibiz-template/core';
4
+ import { RuntimeError } from '@ibiz-template/core';
5
5
  import {
6
6
  CodeListItem,
7
7
  ICalendarState,
@@ -314,8 +314,8 @@ export class CalendarController
314
314
  };
315
315
  if (this.viewScheduler.hasViewEventTrigger) {
316
316
  // 监听视图事件触发视图事件触发器
317
- this.evt.onAll((_eventName, event) => {
318
- this.viewScheduler!.triggerViewEvent(event);
317
+ this.evt.onAll(async (_eventName, event) => {
318
+ await this.viewScheduler!.triggerViewEvent(event);
319
319
  });
320
320
  }
321
321
  }
@@ -379,13 +379,12 @@ export class CalendarController
379
379
  ctrl: this,
380
380
  },
381
381
  );
382
- if (result === -1)
383
- throw new RuntimeModelError(
384
- calendarItem,
385
- ibiz.i18n.t('runtime.controller.common.md.logicOpendata', {
386
- itemType: calendarItem.itemType!.toLowerCase(),
387
- }),
388
- );
382
+ if (result === -1) {
383
+ ibiz.log.error(ibiz.i18n.t('runtime.engine.logicOpendata'));
384
+ return {
385
+ cancel: true,
386
+ };
387
+ }
389
388
  return {
390
389
  cancel: result ? result.ok : true,
391
390
  };
@@ -415,13 +414,12 @@ export class CalendarController
415
414
  ctrl: this,
416
415
  },
417
416
  );
418
- if (result === -1)
419
- throw new RuntimeModelError(
420
- calendarItem,
421
- ibiz.i18n.t('runtime.controller.common.md.logicNewdata', {
422
- itemType: calendarItem.itemType!.toLowerCase(),
423
- }),
424
- );
417
+ if (result === -1) {
418
+ ibiz.log.error(ibiz.i18n.t('runtime.engine.logicNewdata'));
419
+ return {
420
+ cancel: true,
421
+ };
422
+ }
425
423
  return {
426
424
  cancel: result ? result.ok : true,
427
425
  };
@@ -17,7 +17,7 @@ import {
17
17
  } from '../../../../../interface';
18
18
  import { getEditorProvider } from '../../../../../register';
19
19
  import { Srfuf } from '../../../../../service';
20
- import { calcDeCodeNameById } from '../../../../../model';
20
+ import { calcDeCodeNameById, calcDynaClass } from '../../../../../model';
21
21
  import { filterValueRules } from '../../../../../utils';
22
22
  import { FormNotifyState } from '../../../../constant';
23
23
  import { generateEditorRules, generateRules } from '../../../../utils';
@@ -620,4 +620,17 @@ export class FormItemController
620
620
  clearTipsCache(): void {
621
621
  localStorage.removeItem(this.TIPS_CACHE);
622
622
  }
623
+
624
+ /**
625
+ * @description 计算动态样式表
626
+ * @param {IData} data
627
+ * @memberof FormItemController
628
+ */
629
+ protected calcDynaClass(data: IData): void {
630
+ super.calcDynaClass(data);
631
+ if (this.model.editor?.dynaClass) {
632
+ const dynaClass = calcDynaClass(this.model.editor.dynaClass, data);
633
+ this.state.editorClass = dynaClass;
634
+ }
635
+ }
623
636
  }
@@ -68,4 +68,12 @@ export class FormItemState
68
68
  * @memberof FormItemState
69
69
  */
70
70
  inputTipUrl: string | undefined = undefined;
71
+
72
+ /**
73
+ * 编辑器类名集合
74
+ *
75
+ * @type {string[]}
76
+ * @memberof FormItemState
77
+ */
78
+ editorClass: string[] = [];
71
79
  }
@@ -2,6 +2,7 @@ import { IDEFormRawItem } from '@ibiz/model-core';
2
2
  import { FormDetailController } from '../form-detail';
3
3
  import { FormRawItemState } from './form-rawitem.state';
4
4
  import { IApiFormRawItemController } from '../../../../../interface';
5
+ import { calcDynaClass } from '../../../../../model';
5
6
 
6
7
  /**
7
8
  * @description 表单直接内容控制器
@@ -19,4 +20,18 @@ export class FormRawItemController
19
20
  protected createState(): FormRawItemState {
20
21
  return new FormRawItemState(this.parent?.state);
21
22
  }
23
+
24
+ /**
25
+ * @description 计算动态样式表
26
+ * @protected
27
+ * @param {IData} data
28
+ * @memberof FormRawItemController
29
+ */
30
+ protected calcDynaClass(data: IData): void {
31
+ super.calcDynaClass(data);
32
+ if (this.model.rawItem?.dynaClass) {
33
+ const dynaClass = calcDynaClass(this.model.rawItem.dynaClass, data);
34
+ this.state.class.containerDyna = dynaClass;
35
+ }
36
+ }
22
37
  }
@@ -1840,10 +1840,22 @@ export class GridController<
1840
1840
  const data = await this.getExportData(args.params);
1841
1841
  const formatData = this.formatExcelData(data, fields);
1842
1842
  const table = formatData.map(v => Object.values(v));
1843
+
1844
+ // 获取导出文件名,如果有自定义文件名格式则使用自定义文件名格式
1845
+ let fileName = this.model.logicName!;
1846
+ if (this.dataExport?.fileNameFormat) {
1847
+ fileName = await ibiz.util.hbs.render(this.dataExport.fileNameFormat, {
1848
+ context: this.context,
1849
+ params: this.params,
1850
+ data: this.view.state.srfactiveviewdata,
1851
+ now: new Date(),
1852
+ });
1853
+ }
1854
+
1843
1855
  await ibiz.platform.frontExport({
1844
1856
  header,
1845
1857
  data: table,
1846
- fileName: this.model.logicName!,
1858
+ fileName,
1847
1859
  });
1848
1860
  }
1849
1861
 
@@ -35,24 +35,24 @@ export abstract class GridConverterBase extends ConverterBase {
35
35
  grid_function_setting,
36
36
  } = this.reportUIModel;
37
37
  result.vars = {
38
- '--ibiz-control-grid-header-align': grid_header_position,
39
- '--ibiz-control-grid-header-font-size': `${grid_header_fontsize}px`,
40
- '--ibiz-control-grid-header-text-color': grid_header_fontcolor,
41
- '--ibiz-control-grid-content-font-size': `${grid_body_fontsize}px`,
42
- '--ibiz-control-grid-content-text-color': grid_body_fontcolor,
38
+ '--ibiz-control-grid-header-cell-align': grid_header_position,
39
+ '--ibiz-control-grid-header-cell-font-size': `${grid_header_fontsize}px`,
40
+ '--ibiz-control-grid-header-cell-text-color': grid_header_fontcolor,
41
+ '--ibiz-control-grid-body-cell-font-size': `${grid_body_fontsize}px`,
42
+ '--ibiz-control-grid-body-cell-text-color': grid_body_fontcolor,
43
43
  };
44
44
  if (grid_header_fontstyle) {
45
45
  const key =
46
46
  grid_header_fontstyle === 'bold'
47
- ? '--ibiz-control-grid-header-font-weight'
48
- : '--ibiz-control-grid-header-font-style';
47
+ ? '--ibiz-control-grid-header-cell-font-weight'
48
+ : '--ibiz-control-grid-header-cell-font-style';
49
49
  result.vars[key] = grid_header_fontstyle;
50
50
  }
51
51
  if (grid_body_fontstyle) {
52
52
  const key =
53
53
  grid_body_fontstyle === 'bold'
54
- ? '--ibiz-control-grid-content-font-weight'
55
- : '--ibiz-control-grid-content-font-style';
54
+ ? '--ibiz-control-grid-body-cell-font-weight'
55
+ : '--ibiz-control-grid-body-cell-font-style';
56
56
  result.vars[key] = grid_body_fontstyle;
57
57
  }
58
58
  if (grid_show_agg == '1') {
@@ -255,8 +255,8 @@ export class TreeController<
255
255
  };
256
256
  if (this.viewScheduler.hasViewEventTrigger) {
257
257
  // 监听视图事件触发视图事件触发器
258
- this.evt.onAll((_eventName, event) => {
259
- this.viewScheduler!.triggerViewEvent(event);
258
+ this.evt.onAll(async (_eventName, event) => {
259
+ await this.viewScheduler!.triggerViewEvent(event);
260
260
  });
261
261
  }
262
262
  }
@@ -1493,13 +1493,12 @@ export class TreeController<
1493
1493
  },
1494
1494
  );
1495
1495
 
1496
- if (result === -1)
1497
- throw new RuntimeModelError(
1498
- nodeModel,
1499
- ibiz.i18n.t('runtime.controller.common.md.logicOpendata', {
1500
- itemType: nodeModel.id!.toLowerCase(),
1501
- }),
1502
- );
1496
+ if (result === -1) {
1497
+ ibiz.log.error(ibiz.i18n.t('runtime.engine.logicOpendata'));
1498
+ return {
1499
+ cancel: true,
1500
+ };
1501
+ }
1503
1502
 
1504
1503
  return {
1505
1504
  cancel: result ? !result.ok : true,
@@ -1537,13 +1536,12 @@ export class TreeController<
1537
1536
  },
1538
1537
  );
1539
1538
 
1540
- if (result === -1)
1541
- throw new RuntimeModelError(
1542
- nodeModel,
1543
- ibiz.i18n.t('runtime.controller.common.md.logicNewdata', {
1544
- itemType: nodeModel.id!.toLowerCase(),
1545
- }),
1546
- );
1539
+ if (result === -1) {
1540
+ ibiz.log.error(ibiz.i18n.t('runtime.engine.logicNewdata'));
1541
+ return {
1542
+ cancel: true,
1543
+ };
1544
+ }
1547
1545
 
1548
1546
  return {
1549
1547
  cancel: result ? !result.ok : true,
@@ -332,21 +332,20 @@ export class MDViewEngine extends ViewEngineBase {
332
332
  });
333
333
 
334
334
  if (result === -1) {
335
- throw new RuntimeModelError(
336
- this.view.model,
337
- ibiz.i18n.t('runtime.engine.logicOpendata'),
338
- );
339
- } else {
340
- if (result && result.ok && result.data && result.data.length > 0) {
341
- this.view.evt.emit('onDataChange', {
342
- data: result.data,
343
- actionType: 'EDIT',
344
- });
345
- }
335
+ ibiz.log.error(ibiz.i18n.t('runtime.engine.logicOpendata'));
346
336
  return {
347
- cancel: result ? !result.ok : true,
337
+ cancel: true,
348
338
  };
349
339
  }
340
+ if (result && result.ok && result.data && result.data.length > 0) {
341
+ this.view.evt.emit('onDataChange', {
342
+ data: result.data,
343
+ actionType: 'EDIT',
344
+ });
345
+ }
346
+ return {
347
+ cancel: result ? !result.ok : true,
348
+ };
350
349
  }
351
350
 
352
351
  /**
@@ -393,21 +392,20 @@ export class MDViewEngine extends ViewEngineBase {
393
392
  });
394
393
 
395
394
  if (result === -1) {
396
- throw new RuntimeModelError(
397
- this.view.model,
398
- ibiz.i18n.t('runtime.engine.logicNewdata'),
399
- );
400
- } else {
401
- if (result.ok && result.data && result.data.length > 0) {
402
- this.view.evt.emit('onDataChange', {
403
- data: result.data,
404
- actionType: 'NEW',
405
- });
406
- }
395
+ ibiz.log.error(ibiz.i18n.t('runtime.engine.logicNewdata'));
407
396
  return {
408
- cancel: result ? !result.ok : true,
397
+ cancel: true,
409
398
  };
410
399
  }
400
+ if (result.ok && result.data && result.data.length > 0) {
401
+ this.view.evt.emit('onDataChange', {
402
+ data: result.data,
403
+ actionType: 'NEW',
404
+ });
405
+ }
406
+ return {
407
+ cancel: result ? !result.ok : true,
408
+ };
411
409
  }
412
410
 
413
411
  /**
@@ -231,4 +231,14 @@ export interface IApiGlobalCommonConfig {
231
231
  * @memberof IApiGlobalCommonConfig
232
232
  */
233
233
  counterMaxValue: number;
234
+
235
+ /**
236
+ * @description 是否启用增强UI,非兼容性功能增强开关
237
+ * @type {boolean}
238
+ * @default false
239
+ * @platform web
240
+ * @platform mob
241
+ * @memberof IApiGlobalCommonConfig
242
+ */
243
+ enhancedUI: boolean;
234
244
  }
@@ -33,4 +33,11 @@ export interface IApiFormItemState extends IApiFormDetailState {
33
33
  * @memberof IApiFormItemState
34
34
  */
35
35
  inputTipUrl: string | undefined;
36
+
37
+ /**
38
+ * @description 编辑器类名集合
39
+ * @type {(string[])}
40
+ * @memberof IApiFormItemState
41
+ */
42
+ editorClass: string[];
36
43
  }
@@ -22,7 +22,7 @@ export class AppDEUIActionExecutor extends LogicExecutor {
22
22
  ibiz.i18n.t('runtime.logicScheduler.executor.missingTrigger'),
23
23
  );
24
24
  }
25
- UIActionUtil.execAndResolved(
25
+ return UIActionUtil.execAndResolved(
26
26
  this.logic.appDEUIActionId,
27
27
  executeParams,
28
28
  this.logic.appId,
@@ -23,15 +23,17 @@ export class ViewLogicScheduler extends LogicScheduler {
23
23
  * 触发视图事件
24
24
  * @author lxm
25
25
  * @date 2023-06-26 02:26:33
26
- * @param {string} itemName 子项名称
27
- * @param {Partial<IUILogicParams>} executeParams 执行参数
28
- * @return {*} {(boolean | undefined)}
26
+ * @param {EventBase} event 事件对象
27
+ * @return {*} {Promise<void>}
29
28
  */
30
- triggerViewEvent(event: EventBase): void {
29
+ async triggerViewEvent(event: EventBase): Promise<void> {
31
30
  const matchParams = {
32
31
  eventName: event.eventName,
33
32
  triggerType: 'VIEWEVENT',
34
33
  } as const;
35
- this.triggerAndExecute(matchParams, event);
34
+ const result = this.triggerAndExecute(matchParams, event);
35
+ if (result?.length) {
36
+ await Promise.all(result);
37
+ }
36
38
  }
37
39
  }
@@ -0,0 +1,20 @@
1
+ import dayjs from 'dayjs';
2
+ import { HelperBase } from '../helper-base';
3
+
4
+ /**
5
+ * @description 时间格式化,用法: 销售内示数据{{dateFormat now "YYYYMMDDHHmmss"}}.xlsx
6
+ * @author tony001
7
+ * @date 2026-07-06 15:07:49
8
+ * @export
9
+ * @class HelperDateFormat
10
+ * @extends {HelperBase}
11
+ */
12
+ export class HelperDateFormat extends HelperBase {
13
+ constructor(hbs: IData) {
14
+ super(hbs, 'dateFormat');
15
+ }
16
+
17
+ onExecute(date: Date, format: string): string {
18
+ return dayjs(date).format(format);
19
+ }
20
+ }
@@ -18,6 +18,7 @@ import { HelperSnakeCase } from './snake-case/snake-case';
18
18
  import { HelperSpinalCase } from './spinal-case/spinal-case';
19
19
  import { HelperUpperCase } from './upper-case/upper-case';
20
20
  import { HelperAbs } from './abs/abs';
21
+ import { HelperDateFormat } from './date-format/date-format';
21
22
 
22
23
  /**
23
24
  * 安装自定义助手
@@ -47,4 +48,5 @@ export function installHelpers(hsb: IData): void {
47
48
  new HelperSpinalCase(hsb);
48
49
  new HelperUpperCase(hsb);
49
50
  new HelperEqPropertyValue(hsb);
51
+ new HelperDateFormat(hsb);
50
52
  }