@ibiz-template/runtime 0.5.5 → 0.5.7-alpha.0

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 (75) hide show
  1. package/dist/index.esm.js +580 -417
  2. package/dist/index.system.min.js +1 -1
  3. package/out/command/app/open-app-view/open-app-view.d.ts +12 -0
  4. package/out/command/app/open-app-view/open-app-view.d.ts.map +1 -1
  5. package/out/command/app/open-app-view/open-app-view.js +17 -0
  6. package/out/constant/index.d.ts +6 -5
  7. package/out/constant/index.d.ts.map +1 -1
  8. package/out/constant/index.js +6 -5
  9. package/out/constant/route.d.ts +15 -0
  10. package/out/constant/route.d.ts.map +1 -0
  11. package/out/constant/route.js +16 -0
  12. package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
  13. package/out/controller/control/tree/tree.controller.js +9 -3
  14. package/out/controller/control/tree/tree.service.d.ts.map +1 -1
  15. package/out/controller/control/tree/tree.service.js +7 -0
  16. package/out/install.d.ts.map +1 -1
  17. package/out/install.js +3 -1
  18. package/out/interface/provider/i-internal-message.provider.d.ts +28 -0
  19. package/out/interface/provider/i-internal-message.provider.d.ts.map +1 -0
  20. package/out/interface/provider/i-internal-message.provider.js +1 -0
  21. package/out/interface/provider/index.d.ts +1 -0
  22. package/out/interface/provider/index.d.ts.map +1 -1
  23. package/out/interface/service/service/i-internal-message.service.d.ts +28 -0
  24. package/out/interface/service/service/i-internal-message.service.d.ts.map +1 -0
  25. package/out/interface/service/service/i-internal-message.service.js +1 -0
  26. package/out/interface/service/service/index.d.ts +1 -0
  27. package/out/interface/service/service/index.d.ts.map +1 -1
  28. package/out/interface/util/i-open-view-util/i-open-view-util.d.ts +11 -0
  29. package/out/interface/util/i-open-view-util/i-open-view-util.d.ts.map +1 -1
  30. package/out/interface/util/i-view-stack/i-view-stack.d.ts +20 -0
  31. package/out/interface/util/i-view-stack/i-view-stack.d.ts.map +1 -1
  32. package/out/interface/util/index.d.ts +1 -1
  33. package/out/interface/util/index.d.ts.map +1 -1
  34. package/out/register/helper/index.d.ts +1 -0
  35. package/out/register/helper/index.d.ts.map +1 -1
  36. package/out/register/helper/index.js +1 -0
  37. package/out/register/helper/internal-message-register.d.ts +23 -0
  38. package/out/register/helper/internal-message-register.d.ts.map +1 -0
  39. package/out/register/helper/internal-message-register.js +35 -0
  40. package/out/service/service/index.d.ts +1 -0
  41. package/out/service/service/index.d.ts.map +1 -1
  42. package/out/service/service/index.js +1 -0
  43. package/out/service/service/internal-message/internal-message.service.d.ts +27 -0
  44. package/out/service/service/internal-message/internal-message.service.d.ts.map +1 -0
  45. package/out/service/service/internal-message/internal-message.service.js +63 -0
  46. package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts.map +1 -1
  47. package/out/service/vo/tree-node-data/tree-data-set-node-data.js +28 -3
  48. package/out/types.d.ts +9 -1
  49. package/out/types.d.ts.map +1 -1
  50. package/out/ui-logic/ui-logic-node/debug-param-node/debug-param-node.js +1 -1
  51. package/out/utils/view-stack/view-stack.d.ts +5 -3
  52. package/out/utils/view-stack/view-stack.d.ts.map +1 -1
  53. package/out/utils/view-stack/view-stack.js +20 -4
  54. package/package.json +6 -5
  55. package/src/command/app/open-app-view/open-app-view.ts +22 -0
  56. package/src/constant/index.ts +6 -5
  57. package/src/constant/route.ts +15 -0
  58. package/src/controller/control/tree/tree.controller.ts +8 -3
  59. package/src/controller/control/tree/tree.service.ts +12 -0
  60. package/src/install.ts +3 -0
  61. package/src/interface/provider/i-internal-message.provider.ts +30 -0
  62. package/src/interface/provider/index.ts +1 -0
  63. package/src/interface/service/service/i-internal-message.service.ts +29 -0
  64. package/src/interface/service/service/index.ts +1 -0
  65. package/src/interface/util/i-open-view-util/i-open-view-util.ts +16 -0
  66. package/src/interface/util/i-view-stack/i-view-stack.ts +22 -0
  67. package/src/interface/util/index.ts +1 -1
  68. package/src/register/helper/index.ts +1 -0
  69. package/src/register/helper/internal-message-register.ts +52 -0
  70. package/src/service/service/index.ts +1 -0
  71. package/src/service/service/internal-message/internal-message.service.ts +69 -0
  72. package/src/service/vo/tree-node-data/tree-data-set-node-data.ts +27 -3
  73. package/src/types.ts +10 -0
  74. package/src/ui-logic/ui-logic-node/debug-param-node/debug-param-node.ts +1 -1
  75. package/src/utils/view-stack/view-stack.ts +22 -4
@@ -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":"AACA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG3E,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAG1D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAMhD;;;;;;;GAOG;AACH,qBAAa,mBAAoB,SAAQ,YAAa,YAAW,aAAa;IACpE,KAAK,EAAE,MAAM,CAAC;IAEd,GAAG,EAAE,MAAM,CAAC;IAEZ,MAAM,EAAE,MAAM,CAAC;IAEf,OAAO,EAAE,KAAK,CAAC;IAEvB;;;;OAIG;IACK,KAAK,EAAE,MAAM,mBAAmB,CAAC;gBAGvC,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;IA4KH,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"}
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":"AACA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG3E,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAG1D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAMhD;;;;;;;GAOG;AACH,qBAAa,mBAAoB,SAAQ,YAAa,YAAW,aAAa;IACpE,KAAK,EAAE,MAAM,CAAC;IAEd,GAAG,EAAE,MAAM,CAAC;IAEZ,MAAM,EAAE,MAAM,CAAC;IAEf,OAAO,EAAE,KAAK,CAAC;IAEvB;;;;OAIG;IACK,KAAK,EAAE,MAAM,mBAAmB,CAAC;gBAGvC,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;IAoMH,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"}
@@ -33,8 +33,16 @@ export class TreeDataSetNodeData extends TreeNodeData {
33
33
  Object.defineProperty(this, '_text', {
34
34
  get() {
35
35
  return model.textAppDEFieldId
36
- ? data[model.textAppDEFieldId]
37
- : data.srfmajortext;
36
+ ? this._deData[model.textAppDEFieldId]
37
+ : this._deData.srfmajortext;
38
+ },
39
+ set(v) {
40
+ if (model.textAppDEFieldId) {
41
+ this._deData[model.textAppDEFieldId] = v;
42
+ }
43
+ else {
44
+ this._deData.srfmajortext = v;
45
+ }
38
46
  },
39
47
  enumerable: true,
40
48
  configurable: true,
@@ -42,7 +50,17 @@ export class TreeDataSetNodeData extends TreeNodeData {
42
50
  // value值
43
51
  Object.defineProperty(this, '_value', {
44
52
  get() {
45
- return model.idAppDEFieldId ? data[model.idAppDEFieldId] : data.srfkey;
53
+ return model.idAppDEFieldId
54
+ ? this._deData[model.idAppDEFieldId]
55
+ : this._deData.srfkey;
56
+ },
57
+ set(v) {
58
+ if (model.idAppDEFieldId) {
59
+ this._deData[model.idAppDEFieldId] = v;
60
+ }
61
+ else {
62
+ this._deData.srfkey = v;
63
+ }
46
64
  },
47
65
  enumerable: true,
48
66
  configurable: true,
@@ -85,6 +103,9 @@ export class TreeDataSetNodeData extends TreeNodeData {
85
103
  nodeColumnKeyMap.set(columnKey, dataItemKey);
86
104
  }
87
105
  });
106
+ /** 预置属性映射 */
107
+ const presetItemMap = new Map();
108
+ presetItemMap.set('srfuf', 'srfuf');
88
109
  /**
89
110
  * 获取对应key最终映射的实体属性字段,undefined就是没有映射实体属性
90
111
  * @author lxm
@@ -105,6 +126,10 @@ export class TreeDataSetNodeData extends TreeNodeData {
105
126
  if (Object.prototype.hasOwnProperty.call(this._deData, key)) {
106
127
  return key;
107
128
  }
129
+ // 预置属性映射,用于返回srfuf等get属性
130
+ if (presetItemMap.has(key)) {
131
+ return presetItemMap.get(key);
132
+ }
108
133
  };
109
134
  /**
110
135
  * 获取对应属性的默认值,纯显示用的
package/out/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { I18n } from '@ibiz-template/core/src/interface';
2
2
  import { EngineFactory } from './engine';
3
3
  import { GlobalUtil } from './global';
4
- import { IMessageUtil, INotificationUtil, IOpenViewUtil, IModalUtil, IConfirmUtil, ILoadingUtil, IPluginFactory, IOverlayController, IGlobalConfig, IAppHubService, IAuthService, IAsyncActionService, IPlatformProvider } from './interface';
4
+ import { IMessageUtil, INotificationUtil, IOpenViewUtil, IModalUtil, IConfirmUtil, ILoadingUtil, IPluginFactory, IOverlayController, IGlobalConfig, IAppHubService, IAuthService, IAsyncActionService, IPlatformProvider, IInternalMessageService } from './interface';
5
5
  import { LogicSchedulerCenter } from './logic-scheduler';
6
6
  import { RegisterCenter } from './register/register-center';
7
7
  import { UIDomainManager } from './utils';
@@ -116,6 +116,14 @@ declare module '@ibiz-template/core' {
116
116
  * @type {IAuthService}
117
117
  */
118
118
  asyncAction: IAsyncActionService;
119
+ /**
120
+ * 站内信服务
121
+ *
122
+ * @author chitanda
123
+ * @date 2022-07-20 10:07:33
124
+ * @type {IAuthService}
125
+ */
126
+ internalMessage: IInternalMessageService;
119
127
  /**
120
128
  * 引擎工厂
121
129
  * @author lxm
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mCAAmC,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,OAAO;QACf;;;;;;WAMG;QACH,OAAO,EAAE,YAAY,CAAC;QAEtB;;;;;;WAMG;QACH,GAAG,EAAE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;QACH,QAAQ,EAAE,iBAAiB,CAAC;QAE5B;;;;;;WAMG;QACH,eAAe,EAAE,eAAe,CAAC;KAClC;IAED,UAAU,YAAY;QACpB;;;;;;;WAOG;QACH,YAAY,CAAC,EAAE,aAAa,CAAC;KAC9B;CACF"}
@@ -16,6 +16,6 @@ export class DebugParamNode extends UILogicNode {
16
16
  throw new RuntimeModelError(this.model, '缺少目标参数对象配置');
17
17
  }
18
18
  const param = ctx.params[dstDEUILogicParamId];
19
- ibiz.log.debug(`逻辑节点${name}操作参数值:`, param);
19
+ ibiz.log.info(`逻辑节点${name}操作参数值:`, param);
20
20
  }
21
21
  }
@@ -1,5 +1,6 @@
1
1
  import { IAppView } from '@ibiz/model-core';
2
- import { IViewController, IViewEvent, IViewStack, IViewState } from '../../interface';
2
+ import { QXEvent } from 'qx-util';
3
+ import { IViewController, IViewEvent, IViewStack, IViewStackEvent, IViewState } from '../../interface';
3
4
  /**
4
5
  * 视图堆栈
5
6
  *
@@ -12,11 +13,12 @@ export declare class ViewStack implements IViewStack {
12
13
  private stackMap;
13
14
  private stack;
14
15
  private activeStack;
16
+ evt: QXEvent<IViewStackEvent>;
15
17
  add(id: string, view: IViewController<IAppView, IViewState, IViewEvent>): void;
16
18
  remove(id: string): void;
17
19
  getActives(): IViewController[];
18
- active(_id: string): void;
19
- deactivate(_id: string): void;
20
+ active(id: string): void;
21
+ deactivate(id: string): void;
20
22
  /**
21
23
  * 重新计算激活视图堆栈
22
24
  *
@@ -1 +1 @@
1
- {"version":3,"file":"view-stack.d.ts","sourceRoot":"","sources":["../../../src/utils/view-stack/view-stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,eAAe,EACf,UAAU,EACV,UAAU,EACV,UAAU,EACX,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;GAOG;AACH,qBAAa,SAAU,YAAW,UAAU;IAC1C,OAAO,CAAC,QAAQ,CAA2C;IAE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AAI,IAAI;CAGzC"}
@@ -1,3 +1,4 @@
1
+ import { QXEvent } from 'qx-util';
1
2
  /**
2
3
  * 视图堆栈
3
4
  *
@@ -11,11 +12,14 @@ export class ViewStack {
11
12
  this.stackMap = new Map();
12
13
  this.stack = [];
13
14
  this.activeStack = [];
15
+ this.evt = new QXEvent();
14
16
  }
15
17
  add(id, view) {
16
18
  this.stack.push(view);
17
19
  this.stackMap.set(id, view);
18
20
  this.recalculateActiveStack();
21
+ this.evt.emit('add', view);
22
+ this.evt.emit('change', { type: 'add', view });
19
23
  }
20
24
  remove(id) {
21
25
  const view = this.stackMap.get(id);
@@ -23,16 +27,28 @@ export class ViewStack {
23
27
  this.stack.splice(this.stack.indexOf(view), 1);
24
28
  this.stackMap.delete(id);
25
29
  this.recalculateActiveStack();
30
+ this.evt.emit('remove', view);
31
+ this.evt.emit('change', { type: 'remove', view });
26
32
  }
27
33
  }
28
34
  getActives() {
29
35
  return this.activeStack;
30
36
  }
31
- active(_id) {
32
- this.recalculateActiveStack();
37
+ active(id) {
38
+ const view = this.stackMap.get(id);
39
+ if (view) {
40
+ this.recalculateActiveStack();
41
+ this.evt.emit('active', view);
42
+ this.evt.emit('change', { type: 'active', view });
43
+ }
33
44
  }
34
- deactivate(_id) {
35
- this.recalculateActiveStack();
45
+ deactivate(id) {
46
+ const view = this.stackMap.get(id);
47
+ if (view) {
48
+ this.recalculateActiveStack();
49
+ this.evt.emit('deactivate', view);
50
+ this.evt.emit('change', { type: 'deactivate', view });
51
+ }
36
52
  }
37
53
  /**
38
54
  * 重新计算激活视图堆栈
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/runtime",
3
- "version": "0.5.5",
3
+ "version": "0.5.7-alpha.0",
4
4
  "description": "控制器包",
5
5
  "type": "module",
6
6
  "main": "out/index.js",
@@ -23,14 +23,15 @@
23
23
  "lint:fix": "eslint --fix 'src/**/*.ts'",
24
24
  "publish:next": "npm run build && npm publish --access public --tag=next --registry=https://registry.npmjs.org/",
25
25
  "publish:dev": "npm run build && npm publish --access public --tag=dev --registry=https://registry.npmjs.org/",
26
+ "publish:alpha": "npm run build && npm publish --access public --tag=alpha --registry=https://registry.npmjs.org/",
26
27
  "publish:beta": "npm run build && npm publish --access public --tag=beta --registry=https://registry.npmjs.org/",
27
28
  "publish:npm": "npm run build && npm publish --access public --registry=https://registry.npmjs.org/"
28
29
  },
29
30
  "author": "chitanda",
30
31
  "license": "MIT",
31
32
  "devDependencies": {
32
- "@ibiz-template/core": "^0.5.3",
33
- "@ibiz/model-core": "^0.1.5",
33
+ "@ibiz-template/core": "^0.5.7-alpha.0",
34
+ "@ibiz/model-core": "^0.1.6",
34
35
  "@types/path-browserify": "^1.0.2",
35
36
  "@types/qs": "^6.9.11",
36
37
  "@types/systemjs": "^6.13.5",
@@ -47,7 +48,7 @@
47
48
  },
48
49
  "peerDependencies": {
49
50
  "@ibiz-template/core": "^0.5.0-beta.0",
50
- "@ibiz/model-core": "^0.1.5",
51
+ "@ibiz/model-core": "^0.1.6",
51
52
  "async-validator": "^4.2.5",
52
53
  "dayjs": "^1.11.7",
53
54
  "echarts": "^5.4.3",
@@ -59,5 +60,5 @@
59
60
  "qx-util": "^0.4.8",
60
61
  "ramda": "^0.29.0"
61
62
  },
62
- "gitHead": "d576ffdb2391399e913e71473a2e54eb4d6c0791"
63
+ "gitHead": "d334b6bfb6f0869076ab2d09f9d959885eef71dc"
63
64
  }
@@ -80,11 +80,14 @@ export class OpenAppViewCommand {
80
80
  }
81
81
  switch (viewOpenMode) {
82
82
  case 'INDEXVIEWTAB':
83
+ case 'INDEXVIEWTAB_POPUP':
83
84
  if (opts.noWaitRoute) {
84
85
  this.openIndexViewTab(appView, context, params);
85
86
  return { ok: true };
86
87
  }
87
88
  return this.openIndexViewTab(appView, context, params);
89
+ case 'INDEXVIEWTAB_POPUPMODAL':
90
+ return this.openIndexViewTabByModal(appView, context, params);
88
91
  case 'POPUP':
89
92
  throw new ModelError(appView, '未支持的视图打开模式: POPUP');
90
93
  case 'POPUPMODAL':
@@ -123,6 +126,25 @@ export class OpenAppViewCommand {
123
126
  return ibiz.openView.root(appView.id, context, params);
124
127
  }
125
128
 
129
+ /**
130
+ * 模态路由打开视图,路由拼接于当前视图路由后。再由特殊解析呈现
131
+ *
132
+ * @author chitanda
133
+ * @date 2024-01-23 11:01:07
134
+ * @protected
135
+ * @param {IViewConfig} appView
136
+ * @param {IContext} context
137
+ * @param {IParams} [params={}]
138
+ * @return {*} {Promise<IModalData>}
139
+ */
140
+ protected openIndexViewTabByModal(
141
+ appView: IViewConfig,
142
+ context: IContext,
143
+ params: IParams = {},
144
+ ): Promise<IModalData> {
145
+ return ibiz.openView.rootByModal(appView.id, context, params);
146
+ }
147
+
126
148
  /**
127
149
  * 模态窗口打开
128
150
  *
@@ -1,8 +1,9 @@
1
1
  export { ControlType } from './control-type';
2
- export { ViewType } from './view-type';
3
- export { ViewMode } from './view-mode';
4
- export { SysUIActionTag } from './sys-uiaction-tag';
5
- export { ViewCallTag } from './view-call-tag';
6
- export { ValueOP } from './value-op';
7
2
  export { PlatformType } from './platform-type';
3
+ export { RouteConst } from './route';
8
4
  export * from './studio-event';
5
+ export { SysUIActionTag } from './sys-uiaction-tag';
6
+ export { ValueOP } from './value-op';
7
+ export { ViewCallTag } from './view-call-tag';
8
+ export { ViewMode } from './view-mode';
9
+ export { ViewType } from './view-type';
@@ -0,0 +1,15 @@
1
+ /* eslint-disable no-shadow */
2
+ /**
3
+ * 路由相关静态变量
4
+ *
5
+ * @author chitanda
6
+ * @date 2024-01-23 21:01:41
7
+ * @export
8
+ * @enum {number}
9
+ */
10
+ export enum RouteConst {
11
+ /**
12
+ * 路由模态标识
13
+ */
14
+ ROUTE_MODAL_TAG = 'route-modal',
15
+ }
@@ -561,8 +561,14 @@ export class TreeController<
561
561
  context: IContext;
562
562
  params: IParams;
563
563
  } {
564
+ let tempData = null;
565
+ if (nodeData._nodeType === 'DE') {
566
+ tempData = nodeData;
567
+ } else {
568
+ tempData = { ...nodeData, ...(nodeData._deData || {}) };
569
+ }
564
570
  return {
565
- data: [{ ...nodeData, ...(nodeData._deData || {}) }],
571
+ data: [tempData],
566
572
  context: Object.assign(this.context.clone(), nodeData._context || {}),
567
573
  params: { ...this.params, ...(nodeData._params || {}) },
568
574
  };
@@ -935,11 +941,10 @@ export class TreeController<
935
941
  if (!model.allowEditText) {
936
942
  throw new RuntimeModelError(model, '树节点没有配置编辑模式:名称');
937
943
  }
938
- if (!nodeData._deData) {
944
+ if (nodeData._nodeType !== 'DE') {
939
945
  throw new RuntimeError('不是实体树节点数据');
940
946
  }
941
947
  nodeData._text = text;
942
- nodeData._deData[model.textAppDEFieldId!] = text;
943
948
  await this.updateDeNodeData([nodeData]);
944
949
  }
945
950
  }
@@ -5,6 +5,7 @@ import {
5
5
  IDETreeDataSetNode,
6
6
  IDETreeNode,
7
7
  IDETreeNodeRS,
8
+ IDETreeStaticNode,
8
9
  } from '@ibiz/model-core';
9
10
  import { ITreeNodeData } from '../../../interface';
10
11
  import {
@@ -156,6 +157,17 @@ export class TreeService<
156
157
 
157
158
  // 根据类型查询节点数据
158
159
  let result: ITreeNodeData[] = [];
160
+
161
+ // 通过统一资源标识计算权限
162
+ if ((nodeModel as IDETreeStaticNode).accessKey) {
163
+ const permitted = this.app.authority.calcByResCode(
164
+ (nodeModel as IDETreeStaticNode).accessKey!,
165
+ );
166
+ if (!permitted) {
167
+ return result;
168
+ }
169
+ }
170
+
159
171
  switch (nodeModel.treeNodeType) {
160
172
  case 'STATIC':
161
173
  {
package/src/install.ts CHANGED
@@ -3,6 +3,7 @@ import { RegisterCenter } from './register/register-center';
3
3
  import { installCommand } from './command';
4
4
  import {
5
5
  AsyncActionService,
6
+ InternalMessageService,
6
7
  presetAppCounterProvider,
7
8
  presetDEMethodProvider,
8
9
  V7AuthService,
@@ -37,6 +38,8 @@ export function install(): void {
37
38
  ibiz.auth = new V7AuthService();
38
39
  // 挂载异步操作服务
39
40
  ibiz.asyncAction = new AsyncActionService();
41
+ // 挂载站内信服务
42
+ ibiz.internalMessage = new InternalMessageService();
40
43
  // 挂载引擎工厂
41
44
  ibiz.engine = new EngineFactory();
42
45
  // 挂载界面域管理
@@ -0,0 +1,30 @@
1
+ import { IInternalMessage } from '@ibiz-template/core';
2
+
3
+ /**
4
+ * 站内信适配器的接口
5
+ *
6
+ * @author lxm
7
+ * @date 2022-09-19 19:09:10
8
+ * @export
9
+ * @interface IInternalMessageProvider
10
+ */
11
+ export interface IInternalMessageProvider {
12
+ /**
13
+ * 绘制组件
14
+ * @author lxm
15
+ * @date 2022-09-20 10:09:50
16
+ * @type {unknown}
17
+ */
18
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
+ component: any;
20
+
21
+ /**
22
+ * 点击事件
23
+ * @author lxm
24
+ * @date 2024-01-15 12:47:22
25
+ * @param {IInternalMessage} asyncAction
26
+ * @param {MouseEvent} event
27
+ * @return {*} {boolean} 返回是否隐藏消息popover
28
+ */
29
+ onClick(asyncAction: IInternalMessage, event: MouseEvent): boolean;
30
+ }
@@ -18,3 +18,4 @@ export type {
18
18
  } from './i-de-method.provider';
19
19
  export type { ITreeGridExColumnProvider } from './i-tree-grid-ex-column.provider';
20
20
  export type { IAppMenuItemProvider } from './i-app-menu-item.provider';
21
+ export type { IInternalMessageProvider } from './i-internal-message.provider';
@@ -0,0 +1,29 @@
1
+ import { IHttpResponse, IInternalMessage } from '@ibiz-template/core';
2
+
3
+ /**
4
+ * 站内信消息服务
5
+ *
6
+ * @author lxm
7
+ * @date 2024-01-23 02:12:01
8
+ * @export
9
+ * @interface IInternalMessageService
10
+ */
11
+ export interface IInternalMessageService {
12
+ /**
13
+ * 获取站内信的集合
14
+ * @author lxm
15
+ * @date 2023-11-15 10:55:25
16
+ * @param {IParams} [params={}]
17
+ * @return {*} {Promise<IHttpResponse<IInternalMessage[]>>}
18
+ */
19
+ fetch(params?: IParams): Promise<IHttpResponse<IInternalMessage[]>>;
20
+
21
+ /**
22
+ * 获取单条站内信
23
+ * @author lxm
24
+ * @date 2023-11-15 10:57:08
25
+ * @param {string} actionID
26
+ * @return {*} {Promise<IHttpResponse<IInternalMessage[]>>}
27
+ */
28
+ get(actionID: string): Promise<IHttpResponse<IInternalMessage[]>>;
29
+ }
@@ -5,3 +5,4 @@ export type { IAuthService, IAuthInfo } from './i-auth.service';
5
5
  export type { IFileService } from './i-file.service';
6
6
  export type { IWorkFlowService } from './i-wf.service';
7
7
  export type { IAsyncActionService } from './i-async-action.service';
8
+ export type { IInternalMessageService } from './i-internal-message.service';
@@ -36,6 +36,22 @@ export interface IOpenViewUtil {
36
36
  params?: IParams,
37
37
  ): Promise<IModalData>;
38
38
 
39
+ /**
40
+ * 打开顶级视图(包含路由跳转后使用模态打开视图)
41
+ *
42
+ * @author chitanda
43
+ * @date 2024-01-23 11:01:32
44
+ * @param {string} appViewId
45
+ * @param {IContext} context
46
+ * @param {IParams} [params]
47
+ * @return {*} {Promise<IModalData>}
48
+ */
49
+ rootByModal(
50
+ appViewId: string,
51
+ context: IContext,
52
+ params?: IParams,
53
+ ): Promise<IModalData>;
54
+
39
55
  /**
40
56
  * 打开模态视图
41
57
  *
@@ -1,5 +1,17 @@
1
+ import { QXEvent } from 'qx-util';
1
2
  import { IViewController } from '../../controller';
2
3
 
4
+ export interface IViewStackEvent {
5
+ add: (view: IViewController) => void;
6
+ remove: (view: IViewController) => void;
7
+ active: (view: IViewController) => void;
8
+ deactivate: (view: IViewController) => void;
9
+ change: (msg: {
10
+ type: 'add' | 'remove' | 'active' | 'deactivate';
11
+ view: IViewController;
12
+ }) => void;
13
+ }
14
+
3
15
  /**
4
16
  * 视图堆栈
5
17
  *
@@ -9,6 +21,16 @@ import { IViewController } from '../../controller';
9
21
  * @interface IViewStack
10
22
  */
11
23
  export interface IViewStack {
24
+ /**
25
+ * 事件
26
+ *
27
+ * @author chitanda
28
+ * @date 2023-09-05 16:09:58
29
+ * @protected
30
+ * @type {QXEvent<MessageCenterEvent>}
31
+ */
32
+ evt: QXEvent<IViewStackEvent>;
33
+
12
34
  /**
13
35
  * 添加视图堆栈信息
14
36
  *
@@ -15,4 +15,4 @@ export type { IOverlayController } from './i-overlay-controller/i-overlay-contro
15
15
  export type { IOverlayPopoverContainer } from './i-overlay-popover-container/i-overlay-popover-container';
16
16
  export type { IScriptFunctionOpts } from './script/i-script-function';
17
17
  export type { IExcelUtil } from './i-excel-util/i-excel-util';
18
- export type { IViewStack } from './i-view-stack/i-view-stack';
18
+ export type { IViewStack, IViewStackEvent } from './i-view-stack/i-view-stack';
@@ -13,3 +13,4 @@ export * from './platform-register';
13
13
  export * from './de-method-register';
14
14
  export * from './tree-grid-ex-column-register';
15
15
  export * from './app-menu-item-register';
16
+ export * from './internal-message-register';
@@ -0,0 +1,52 @@
1
+ import { IInternalMessage, RuntimeError } from '@ibiz-template/core';
2
+ import { IInternalMessageProvider } from '../../interface';
3
+
4
+ /** 界面行为适配器前缀 */
5
+ export const INTERNAL_MESSAGE_PROVIDER_PREFIX = 'INTERNAL_MESSAGE';
6
+
7
+ /**
8
+ * 注册界面行为适配器
9
+ * @author lxm
10
+ * @date 2023-05-06 09:14:16
11
+ * @export
12
+ * @param {string} key
13
+ * @param {() => IInternalMessageProvider} callback 生成界面行为适配器的回调
14
+ */
15
+ export function registerInternalMessageProvider(
16
+ key: string,
17
+ callback: () => IInternalMessageProvider,
18
+ ): void {
19
+ ibiz.register.register(
20
+ `${INTERNAL_MESSAGE_PROVIDER_PREFIX}_${key}`,
21
+ callback,
22
+ );
23
+ }
24
+
25
+ function getProvider(key: string): IInternalMessageProvider | undefined {
26
+ return ibiz.register.get(
27
+ `${INTERNAL_MESSAGE_PROVIDER_PREFIX}_${key}`,
28
+ ) as IInternalMessageProvider;
29
+ }
30
+
31
+ /**
32
+ * 获取界面行为适配器
33
+ * @author lxm
34
+ * @date 2023-05-06 09:29:23
35
+ * @export
36
+ * @param {IAppView} model
37
+ * @return {*} {Promise<IInternalMessageProvider>}
38
+ */
39
+ export function getInternalMessageProvider(
40
+ msg: IInternalMessage,
41
+ ): IInternalMessageProvider {
42
+ const provider: IInternalMessageProvider | undefined = getProvider(
43
+ msg.message_type || 'DEFAULT',
44
+ );
45
+
46
+ // 找异步操作类型
47
+ if (!provider) {
48
+ throw new RuntimeError(`找不站内信类型${msg.message_type}对应的适配器`);
49
+ } else {
50
+ return provider;
51
+ }
52
+ }
@@ -8,3 +8,4 @@ export * from './authority';
8
8
  export { V7AuthService } from './auth/v7-auth.service';
9
9
  export { AsyncActionService } from './async-action/async-action.service';
10
10
  export * from './entity/method';
11
+ export { InternalMessageService } from './internal-message/internal-message.service';
@@ -0,0 +1,69 @@
1
+ import { IHttpResponse, IInternalMessage } from '@ibiz-template/core';
2
+ import { isNil } from 'ramda';
3
+ import { IInternalMessageService } from '../../../interface';
4
+
5
+ export class InternalMessageService implements IInternalMessageService {
6
+ /**
7
+ * 基础路径
8
+ * @author lxm
9
+ * @date 2024-01-23 02:06:47
10
+ */
11
+ baseUrl = '/extension/internal_messages';
12
+
13
+ /**
14
+ * 获取站内信的集合
15
+ * @author lxm
16
+ * @date 2023-11-15 10:55:25
17
+ * @param {IParams} [params={}]
18
+ * @return {*} {Promise<IHttpResponse<IInternalMessage[]>>}
19
+ */
20
+ async fetch(
21
+ params: IParams = {},
22
+ ): Promise<IHttpResponse<IInternalMessage[]>> {
23
+ // const res = await ibiz.net.post(
24
+ // `${this.baseUrl}/fetch_cur_receiver`,
25
+ // params,
26
+ // );
27
+ const res: IData = {
28
+ ok: true,
29
+ };
30
+ if (res.headers) {
31
+ if (res.headers['x-page']) {
32
+ res.page = Number(res.headers['x-page']);
33
+ }
34
+ if (res.headers['x-per-page']) {
35
+ res.size = Number(res.headers['x-per-page']);
36
+ }
37
+ if (res.headers['x-total']) {
38
+ res.total = Number(res.headers['x-total']);
39
+ }
40
+ }
41
+ if (isNil(res.data)) {
42
+ res.data = [];
43
+ }
44
+
45
+ res.page = params.page;
46
+ res.total = 34;
47
+ res.data = Array.from({ length: params.size }, (_, i) => ({
48
+ id: i + 1,
49
+ status: 'RECEIVED',
50
+ title: `标题${i + 1}`,
51
+ content: `内容${i + 1}长内容`,
52
+ short_content: `内容${i + 1}短内容`,
53
+ create_time: new Date().toISOString(),
54
+ }));
55
+ return res as IHttpResponse<IInternalMessage[]>;
56
+ }
57
+
58
+ /**
59
+ * 获取单条站内信
60
+ * @author lxm
61
+ * @date 2023-11-15 10:57:08
62
+ * @param {string} messageId
63
+ * @return {*} {Promise<IHttpResponse<IInternalMessage[]>>}
64
+ */
65
+ async get(messageId: string): Promise<IHttpResponse<IInternalMessage[]>> {
66
+ const res = await ibiz.net.get(`${this.baseUrl}/${messageId}`);
67
+ return res as IHttpResponse<IInternalMessage[]>;
68
+ }
69
+ }