@ibiz-template/runtime 0.4.10 → 0.4.12

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 (159) hide show
  1. package/dist/index.esm.js +996 -290
  2. package/dist/index.system.min.js +2 -2
  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/control/control.controller.d.ts +14 -0
  6. package/out/controller/common/control/control.controller.d.ts.map +1 -1
  7. package/out/controller/common/control/control.controller.js +21 -0
  8. package/out/controller/common/control/md-control.controller.d.ts +9 -0
  9. package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
  10. package/out/controller/common/control/md-control.controller.js +20 -0
  11. package/out/controller/common/view/view.controller.d.ts +8 -1
  12. package/out/controller/common/view/view.controller.d.ts.map +1 -1
  13. package/out/controller/common/view/view.controller.js +12 -4
  14. package/out/controller/control/form/edit-form/edit-form.controller.d.ts.map +1 -1
  15. package/out/controller/control/form/edit-form/edit-form.controller.js +36 -38
  16. package/out/controller/control/form/edit-form/edit-form.service.d.ts +3 -2
  17. package/out/controller/control/form/edit-form/edit-form.service.d.ts.map +1 -1
  18. package/out/controller/control/form/edit-form/edit-form.service.js +11 -2
  19. package/out/controller/control/form/form/form.controller.d.ts +0 -7
  20. package/out/controller/control/form/form/form.controller.d.ts.map +1 -1
  21. package/out/controller/control/form/form/form.controller.js +0 -11
  22. package/out/controller/control/form/form/form.service.d.ts +24 -0
  23. package/out/controller/control/form/form/form.service.d.ts.map +1 -0
  24. package/out/controller/control/form/form/form.service.js +45 -0
  25. package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.d.ts +1 -1
  26. package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.js +1 -1
  27. package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts +8 -0
  28. package/out/controller/control/form/form-detail/form-item/form-item.controller.d.ts.map +1 -1
  29. package/out/controller/control/form/form-detail/form-item/form-item.controller.js +14 -5
  30. package/out/controller/control/form/search-form/search-form.controller.d.ts.map +1 -1
  31. package/out/controller/control/form/search-form/search-form.controller.js +1 -5
  32. package/out/controller/control/form/search-form/search-form.service.d.ts +4 -3
  33. package/out/controller/control/form/search-form/search-form.service.d.ts.map +1 -1
  34. package/out/controller/control/form/search-form/search-form.service.js +8 -3
  35. package/out/controller/control/gantt/gantt.controller.d.ts +55 -1
  36. package/out/controller/control/gantt/gantt.controller.d.ts.map +1 -1
  37. package/out/controller/control/gantt/gantt.controller.js +150 -0
  38. package/out/controller/control/gantt/gantt.service.d.ts +69 -6
  39. package/out/controller/control/gantt/gantt.service.d.ts.map +1 -1
  40. package/out/controller/control/gantt/gantt.service.js +196 -5
  41. package/out/controller/control/search-bar/search-bar.controller.d.ts.map +1 -1
  42. package/out/controller/control/search-bar/search-bar.controller.js +10 -6
  43. package/out/controller/control/wizard-panel/wizard-panel.controller.d.ts +8 -1
  44. package/out/controller/control/wizard-panel/wizard-panel.controller.d.ts.map +1 -1
  45. package/out/controller/control/wizard-panel/wizard-panel.controller.js +22 -7
  46. package/out/interface/common/i-global-config/i-global-view-config.d.ts +7 -0
  47. package/out/interface/common/i-global-config/i-global-view-config.d.ts.map +1 -1
  48. package/out/interface/controller/controller/control/i-control.controller.d.ts +14 -0
  49. package/out/interface/controller/controller/control/i-control.controller.d.ts.map +1 -1
  50. package/out/interface/controller/controller/control/i-drbar.controller.d.ts +7 -0
  51. package/out/interface/controller/controller/control/i-drbar.controller.d.ts.map +1 -1
  52. package/out/interface/controller/controller/view/i-view.controller.d.ts +14 -0
  53. package/out/interface/controller/controller/view/i-view.controller.d.ts.map +1 -1
  54. package/out/interface/controller/event/view/i-de-index-view.event.d.ts +12 -0
  55. package/out/interface/controller/event/view/i-de-index-view.event.d.ts.map +1 -0
  56. package/out/interface/controller/event/view/i-de-index-view.event.js +1 -0
  57. package/out/interface/controller/event/view/index.d.ts +1 -0
  58. package/out/interface/controller/event/view/index.d.ts.map +1 -1
  59. package/out/interface/controller/event/view/index.js +1 -0
  60. package/out/interface/controller/state/control/i-control.state.d.ts +8 -0
  61. package/out/interface/controller/state/control/i-control.state.d.ts.map +1 -1
  62. package/out/interface/controller/state/control/i-drbar.state.d.ts +28 -7
  63. package/out/interface/controller/state/control/i-drbar.state.d.ts.map +1 -1
  64. package/out/interface/controller/state/control/i-gantt.state.d.ts +94 -3
  65. package/out/interface/controller/state/control/i-gantt.state.d.ts.map +1 -1
  66. package/out/interface/controller/state/view/i-de-index-view.state.d.ts +19 -0
  67. package/out/interface/controller/state/view/i-de-index-view.state.d.ts.map +1 -0
  68. package/out/interface/controller/state/view/i-de-index-view.state.js +1 -0
  69. package/out/interface/controller/state/view/i-edit-view2.state.d.ts +8 -0
  70. package/out/interface/controller/state/view/i-edit-view2.state.d.ts.map +1 -1
  71. package/out/interface/controller/state/view/i-view.state.d.ts +8 -0
  72. package/out/interface/controller/state/view/i-view.state.d.ts.map +1 -1
  73. package/out/interface/controller/state/view/index.d.ts +1 -0
  74. package/out/interface/controller/state/view/index.d.ts.map +1 -1
  75. package/out/interface/controller/state/view/index.js +1 -0
  76. package/out/interface/service/service/i-auth.service.d.ts +3 -2
  77. package/out/interface/service/service/i-auth.service.d.ts.map +1 -1
  78. package/out/register/helper/ui-action-register.d.ts.map +1 -1
  79. package/out/register/helper/ui-action-register.js +6 -1
  80. package/out/service/service/auth/v7-auth.service.d.ts +1 -1
  81. package/out/service/service/auth/v7-auth.service.d.ts.map +1 -1
  82. package/out/service/service/auth/v7-auth.service.js +12 -7
  83. package/out/service/service/entity/de.service.d.ts.map +1 -1
  84. package/out/service/service/entity/de.service.js +1 -8
  85. package/out/service/service/entity/method/de-action.d.ts.map +1 -1
  86. package/out/service/service/entity/method/de-action.js +5 -5
  87. package/out/service/utils/de-cache/de-cache.d.ts +19 -0
  88. package/out/service/utils/de-cache/de-cache.d.ts.map +1 -1
  89. package/out/service/utils/de-cache/de-cache.js +54 -4
  90. package/out/service/vo/gantt-node-data/gantt-code-list-node-data.d.ts +19 -0
  91. package/out/service/vo/gantt-node-data/gantt-code-list-node-data.d.ts.map +1 -0
  92. package/out/service/vo/gantt-node-data/gantt-code-list-node-data.js +14 -0
  93. package/out/service/vo/gantt-node-data/gantt-data-set-node-data.d.ts +19 -0
  94. package/out/service/vo/gantt-node-data/gantt-data-set-node-data.d.ts.map +1 -0
  95. package/out/service/vo/gantt-node-data/gantt-data-set-node-data.js +14 -0
  96. package/out/service/vo/gantt-node-data/gantt-node-data-util.d.ts +9 -0
  97. package/out/service/vo/gantt-node-data/gantt-node-data-util.d.ts.map +1 -0
  98. package/out/service/vo/gantt-node-data/gantt-node-data-util.js +19 -0
  99. package/out/service/vo/gantt-node-data/gantt-static-node-data.d.ts +17 -0
  100. package/out/service/vo/gantt-node-data/gantt-static-node-data.d.ts.map +1 -0
  101. package/out/service/vo/gantt-node-data/gantt-static-node-data.js +13 -0
  102. package/out/service/vo/gantt-node-data/index.d.ts +4 -0
  103. package/out/service/vo/gantt-node-data/index.d.ts.map +1 -0
  104. package/out/service/vo/gantt-node-data/index.js +3 -0
  105. package/out/service/vo/index.d.ts +1 -0
  106. package/out/service/vo/index.d.ts.map +1 -1
  107. package/out/service/vo/index.js +1 -0
  108. package/out/ui-action/provider/index.d.ts.map +1 -1
  109. package/out/ui-action/provider/index.js +4 -0
  110. package/out/ui-action/provider/loginout-ui-action-provider.d.ts +16 -0
  111. package/out/ui-action/provider/loginout-ui-action-provider.d.ts.map +1 -0
  112. package/out/ui-action/provider/loginout-ui-action-provider.js +25 -0
  113. package/out/utils/layout-panel-util/layout-panel-util.d.ts.map +1 -1
  114. package/out/utils/layout-panel-util/layout-panel-util.js +16 -2
  115. package/package.json +3 -3
  116. package/src/config/global-config.ts +1 -0
  117. package/src/controller/common/control/control.controller.ts +23 -0
  118. package/src/controller/common/control/md-control.controller.ts +21 -0
  119. package/src/controller/common/view/view.controller.ts +12 -5
  120. package/src/controller/control/form/edit-form/edit-form.controller.ts +59 -58
  121. package/src/controller/control/form/edit-form/edit-form.service.ts +11 -2
  122. package/src/controller/control/form/form/form.controller.ts +0 -14
  123. package/src/controller/control/form/form/form.service.ts +63 -0
  124. package/src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts +1 -1
  125. package/src/controller/control/form/form-detail/form-item/form-item.controller.ts +15 -5
  126. package/src/controller/control/form/search-form/search-form.controller.ts +1 -5
  127. package/src/controller/control/form/search-form/search-form.service.ts +8 -3
  128. package/src/controller/control/gantt/gantt.controller.ts +179 -1
  129. package/src/controller/control/gantt/gantt.service.ts +305 -6
  130. package/src/controller/control/search-bar/search-bar.controller.ts +11 -8
  131. package/src/controller/control/wizard-panel/wizard-panel.controller.ts +27 -7
  132. package/src/interface/common/i-global-config/i-global-view-config.ts +8 -0
  133. package/src/interface/controller/controller/control/i-control.controller.ts +16 -0
  134. package/src/interface/controller/controller/control/i-drbar.controller.ts +8 -0
  135. package/src/interface/controller/controller/view/i-view.controller.ts +16 -0
  136. package/src/interface/controller/event/view/i-de-index-view.event.ts +12 -0
  137. package/src/interface/controller/event/view/index.ts +1 -0
  138. package/src/interface/controller/state/control/i-control.state.ts +9 -0
  139. package/src/interface/controller/state/control/i-drbar.state.ts +32 -8
  140. package/src/interface/controller/state/control/i-gantt.state.ts +106 -4
  141. package/src/interface/controller/state/view/i-de-index-view.state.ts +19 -0
  142. package/src/interface/controller/state/view/i-edit-view2.state.ts +10 -1
  143. package/src/interface/controller/state/view/i-view.state.ts +9 -0
  144. package/src/interface/controller/state/view/index.ts +1 -0
  145. package/src/interface/service/service/i-auth.service.ts +3 -2
  146. package/src/register/helper/ui-action-register.ts +7 -1
  147. package/src/service/service/auth/v7-auth.service.ts +18 -8
  148. package/src/service/service/entity/de.service.ts +2 -1
  149. package/src/service/service/entity/method/de-action.ts +5 -4
  150. package/src/service/utils/de-cache/de-cache.ts +64 -3
  151. package/src/service/vo/gantt-node-data/gantt-code-list-node-data.ts +68 -0
  152. package/src/service/vo/gantt-node-data/gantt-data-set-node-data.ts +68 -0
  153. package/src/service/vo/gantt-node-data/gantt-node-data-util.ts +26 -0
  154. package/src/service/vo/gantt-node-data/gantt-static-node-data.ts +50 -0
  155. package/src/service/vo/gantt-node-data/index.ts +3 -0
  156. package/src/service/vo/index.ts +1 -0
  157. package/src/ui-action/provider/index.ts +4 -0
  158. package/src/ui-action/provider/loginout-ui-action-provider.ts +31 -0
  159. package/src/utils/layout-panel-util/layout-panel-util.ts +17 -2
@@ -93,6 +93,14 @@ export class WizardPanelController
93
93
  */
94
94
  stepTags: IData = {};
95
95
 
96
+ /**
97
+ * 向导表单数据
98
+ * @return {*}
99
+ * @author: zhujiamin
100
+ * @Date: 2023-12-12 13:43:07
101
+ */
102
+ formData: IData = {};
103
+
96
104
  protected initState(): void {
97
105
  super.initState();
98
106
  }
@@ -185,11 +193,12 @@ export class WizardPanelController
185
193
  * @author: zhujiamin
186
194
  * @Date: 2023-06-07 15:14:05
187
195
  */
188
- onFormMounted(activeFormTag: string, event: EventBase): void {
196
+ async onFormMounted(activeFormTag: string, event: EventBase): Promise<void> {
189
197
  const formController = event.ctrl as EditFormController;
190
198
  this.formControllers.set(activeFormTag, formController);
191
199
  // 调用表单的load加载一次数据
192
- formController.load();
200
+ const data = await formController.load();
201
+ Object.assign(this.formData, data);
193
202
  }
194
203
 
195
204
  /**
@@ -201,6 +210,7 @@ export class WizardPanelController
201
210
  */
202
211
  onFormSaved(event: EventBase): void {
203
212
  const data = event.data[0];
213
+ Object.assign(this.formData, data);
204
214
  const deName = calcDeCodeNameById(this.model.appDataEntityId!);
205
215
  if (!this.context[deName] && data && data.srfkey) {
206
216
  this.context[deName] = data.srfkey;
@@ -239,9 +249,10 @@ export class WizardPanelController
239
249
  async initialize(): Promise<void> {
240
250
  const initAction = this.model.initControlAction?.appDEMethodId;
241
251
  if (initAction) {
242
- const res = await this.service.initialize(this.context, this.params);
252
+ const res = await this.service.initialize(this.context, {}, this.params);
243
253
  const deName = calcDeCodeNameById(this.model.appDataEntityId!);
244
254
  if (res.data && res.data.srfkey) {
255
+ this.formData = res.data;
245
256
  this.context[deName] = res.data.srfkey;
246
257
  }
247
258
  // 初始化时状态向导面板根据状态属性去决定当前激活哪个表单
@@ -274,7 +285,7 @@ export class WizardPanelController
274
285
  * @memberof WizardPanelController
275
286
  */
276
287
  async finish(): Promise<void> {
277
- await this.service.finish(this.context, this.params);
288
+ await this.service.finish(this.context, this.formData, this.params);
278
289
  this.evt.emit('onFinishSuccess', undefined);
279
290
  }
280
291
 
@@ -286,11 +297,20 @@ export class WizardPanelController
286
297
  * @memberof WizardPanelController
287
298
  */
288
299
  async onPrevClick(): Promise<void> {
289
- // 先执行表单返回行为
290
- const data = await this.activeFormController.goBack();
300
+ // 状态向导先执行表单返回行为
301
+ let data;
302
+ if (
303
+ (this.activeFormController.model as IDEWizardEditForm).goBackControlAction
304
+ ) {
305
+ data = await this.activeFormController.goBack();
306
+ }
291
307
  let prevTag;
292
308
  // 返回上一个表单优先级 stateAppDEFieldId > tagHistory
293
- if (this.model.stateAppDEFieldId && data[this.model.stateAppDEFieldId]) {
309
+ if (
310
+ this.model.stateAppDEFieldId &&
311
+ data &&
312
+ data[this.model.stateAppDEFieldId]
313
+ ) {
294
314
  const wizardForm = this.getWizardFormByTag(
295
315
  data[this.model.stateAppDEFieldId],
296
316
  );
@@ -29,4 +29,12 @@ export interface IGlobalViewConfig {
29
29
  * @type {string}
30
30
  */
31
31
  expCacheMode: string;
32
+
33
+ /**
34
+ * 首页是否不采用分页导航模式
35
+ * @return {*}
36
+ * @author: zhujiamin
37
+ * @Date: 2023-12-12 17:40:44
38
+ */
39
+ noNavTabs: boolean;
32
40
  }
@@ -60,6 +60,22 @@ export interface IControlController<
60
60
  */
61
61
  endLoading(): Promise<void>;
62
62
 
63
+ /**
64
+ * 部件激活,主要用于用户可见时设置为激活状态
65
+ *
66
+ * @author chitanda
67
+ * @date 2023-12-13 11:12:04
68
+ */
69
+ onActivated(): void;
70
+
71
+ /**
72
+ * 部件暂停激活,主要用于用户不可见时设置为非激活状态
73
+ *
74
+ * @author chitanda
75
+ * @date 2023-12-13 11:12:06
76
+ */
77
+ onDeactivated(): void;
78
+
63
79
  /**
64
80
  * 在不改变引用的前提下,更新上下文和导航参数
65
81
  * 并处理如自定义导航参数的后续处理
@@ -19,4 +19,12 @@ export interface IDRBarController
19
19
  * @memberof IDRBarController
20
20
  */
21
21
  getData(): IData[];
22
+
23
+ /**
24
+ * 处理选中改变
25
+ *
26
+ * @param {string} key
27
+ * @memberof DRBarController
28
+ */
29
+ handleSelectChange(key: string): void;
22
30
  }
@@ -162,4 +162,20 @@ export interface IViewController<
162
162
  * @date 2022-09-19 14:09:09
163
163
  */
164
164
  endLoading(): void;
165
+
166
+ /**
167
+ * 视图激活,主要用于用户可见时设置为激活状态
168
+ *
169
+ * @author chitanda
170
+ * @date 2023-12-13 11:12:04
171
+ */
172
+ onActivated(): void;
173
+
174
+ /**
175
+ * 视图暂停激活,主要用于用户不可见时设置为非激活状态
176
+ *
177
+ * @author chitanda
178
+ * @date 2023-12-13 11:12:06
179
+ */
180
+ onDeactivated(): void;
165
181
  }
@@ -0,0 +1,12 @@
1
+ import { IViewEvent } from '.';
2
+
3
+ /**
4
+ * 实体首页视图事件
5
+ *
6
+ * @author lxm
7
+ * @date 2022-09-26 20:09:17
8
+ * @export
9
+ * @interface IDEIndexViewEvent
10
+ * @extends {IViewEvent}
11
+ */
12
+ export type IDEIndexViewEvent = IViewEvent;
@@ -44,3 +44,4 @@ export * from './i-chart-exp-view.event';
44
44
  export * from './i-map-view.event';
45
45
  export * from './i-report-view.event';
46
46
  export * from './i-gantt-view.event';
47
+ export * from './i-de-index-view.event';
@@ -1,6 +1,15 @@
1
1
  import { IControllerState } from '../common/i-controller.state';
2
2
 
3
3
  export interface IControlState extends IControllerState {
4
+ /**
5
+ * 当前部件是否为激活状态(缓存下的激活状态,一般与框架的生命周期相同)
6
+ *
7
+ * @author chitanda
8
+ * @date 2023-12-13 11:12:30
9
+ * @type {boolean}
10
+ */
11
+ activated: boolean;
12
+
4
13
  /**
5
14
  * 是否是简单模式
6
15
  * @author zjm
@@ -9,6 +9,38 @@ import { IControlState } from './i-control.state';
9
9
  * @extends {IControlState}
10
10
  */
11
11
  export interface IDRBarState extends IControlState {
12
+ /**
13
+ * 默认显示的项的id
14
+ * @author lxm
15
+ * @date 2023-12-11 05:53:27
16
+ * @type {string}
17
+ */
18
+ defaultItem: string;
19
+
20
+ /**
21
+ * 选中的项的id
22
+ * @author lxm
23
+ * @date 2023-12-11 07:10:05
24
+ * @type {string}
25
+ */
26
+ selectedItem: string;
27
+
28
+ /**
29
+ * 隐藏编辑项
30
+ * @type {boolean}
31
+ * @default false
32
+ * 来源 isHideEditItem
33
+ */
34
+ hideEditItem?: boolean;
35
+
36
+ /**
37
+ * 导航数据
38
+ * @author lxm
39
+ * @date 2023-12-11 05:52:57
40
+ * @type {string}
41
+ */
42
+ srfnav: string;
43
+
12
44
  /**
13
45
  * 关系项集合
14
46
  *
@@ -41,14 +73,6 @@ export interface IDRBarItemsState {
41
73
  */
42
74
  caption?: string;
43
75
 
44
- /**
45
- * 是否隐藏
46
- *
47
- * @type {boolean}
48
- * @memberof IDRBarItemsState
49
- */
50
- hidden: boolean;
51
-
52
76
  /**
53
77
  * 是否禁用
54
78
  *
@@ -1,12 +1,114 @@
1
1
  import { IMDControlState } from './i-md-control.state';
2
+ import { ITreeNodeData } from './i-tree.state';
2
3
 
3
4
  /**
4
5
  * 甘特图状态
5
6
  *
6
- * @author zhanghengfeng
7
- * @date 2023-12-08 15:12:40
7
+ * @author tony001
8
+ * @date 2023-12-11 17:12:57
8
9
  * @export
9
10
  * @interface IGanttState
10
- * @extends {IMDControlState}
11
+ * @extends {ITreeState}
11
12
  */
12
- export interface IGanttState extends IMDControlState {}
13
+ export interface IGanttState extends IMDControlState {
14
+ items: IGanttNodeData[];
15
+
16
+ /**
17
+ * 树的根节点
18
+ *
19
+ * @type {IGanttNodeData}
20
+ * @memberof IGanttState
21
+ */
22
+ rootNodes: IGanttNodeData[];
23
+
24
+ /**
25
+ * 查询条件
26
+ *
27
+ * @author tony001
28
+ * @date 2023-12-11 18:12:20
29
+ * @type {string}
30
+ */
31
+ query: string;
32
+
33
+ /**
34
+ * 快速搜索占位符
35
+ *
36
+ * @author tony001
37
+ * @date 2023-12-11 18:12:29
38
+ * @type {string}
39
+ */
40
+ placeHolder: string;
41
+ }
42
+
43
+ /**
44
+ * 甘特图节点数据格式
45
+ *
46
+ * @author tony001
47
+ * @date 2023-12-11 17:12:51
48
+ * @export
49
+ * @interface IGanttNodeData
50
+ */
51
+ export interface IGanttNodeData extends ITreeNodeData {
52
+ /**
53
+ * 编号
54
+ *
55
+ * @author tony001
56
+ * @date 2023-12-11 17:12:39
57
+ * @type {string}
58
+ */
59
+ sndataIteValue: string;
60
+
61
+ /**
62
+ * 开始时间
63
+ *
64
+ * @author tony001
65
+ * @date 2023-12-11 17:12:12
66
+ * @type {string}
67
+ */
68
+ beginDataItemValue: string;
69
+
70
+ /**
71
+ * 结束时间
72
+ *
73
+ * @author tony001
74
+ * @date 2023-12-11 17:12:52
75
+ * @type {string}
76
+ */
77
+ endDataItemValue: string;
78
+
79
+ /**
80
+ * 前置数据
81
+ *
82
+ * @author tony001
83
+ * @date 2023-12-11 17:12:13
84
+ * @type {(string | number)}
85
+ */
86
+ prevDataItemValue: string | number;
87
+
88
+ /**
89
+ * 完成量数据
90
+ *
91
+ * @author tony001
92
+ * @date 2023-12-11 17:12:26
93
+ * @type {(string | number)}
94
+ */
95
+ finishDataItemValue: string | number;
96
+
97
+ /**
98
+ * 总量数据项
99
+ *
100
+ * @author tony001
101
+ * @date 2023-12-11 17:12:43
102
+ * @type {(string | number)}
103
+ */
104
+ totalDataItemValue: string | number;
105
+
106
+ /**
107
+ * 子数据
108
+ *
109
+ * @author tony001
110
+ * @date 2023-12-11 18:12:16
111
+ * @type {(IGanttNodeData[] | undefined)}
112
+ */
113
+ children?: IGanttNodeData[] | undefined;
114
+ }
@@ -0,0 +1,19 @@
1
+ import { IViewState } from './i-view.state';
2
+
3
+ /**
4
+ * 实体首页视图UI状态
5
+ *
6
+ * @export
7
+ * @class IDEIndexViewState
8
+ * @extends {IViewState}
9
+ */
10
+ export interface IDEIndexViewState extends IViewState {
11
+ /**
12
+ * 导航数据
13
+ *
14
+ * @author lxm
15
+ * @date 2023-12-11 06:23:55
16
+ * @type {string}
17
+ */
18
+ srfnav: string;
19
+ }
@@ -7,4 +7,13 @@ import { IEditViewState } from './i-edit-view.state';
7
7
  * @interface IEditView2State
8
8
  * @extends {IViewState}
9
9
  */
10
- export interface IEditView2State extends IEditViewState {}
10
+ export interface IEditView2State extends IEditViewState {
11
+ /**
12
+ * 导航数据
13
+ *
14
+ * @author lxm
15
+ * @date 2023-12-11 06:23:55
16
+ * @type {string}
17
+ */
18
+ srfnav: string;
19
+ }
@@ -9,6 +9,15 @@ import { IControllerState } from '../common/i-controller.state';
9
9
  * @class ViewState
10
10
  */
11
11
  export interface IViewState extends IControllerState, IViewSession {
12
+ /**
13
+ * 当前视图是否为激活状态(缓存下的激活状态,一般与框架的生命周期相同)
14
+ *
15
+ * @author chitanda
16
+ * @date 2023-12-13 11:12:20
17
+ * @type {boolean}
18
+ */
19
+ activated: boolean;
20
+
12
21
  /**
13
22
  * 视图标题
14
23
  *
@@ -45,3 +45,4 @@ export * from './i-chart-exp-view.state';
45
45
  export * from './i-map-view.state';
46
46
  export * from './i-report-view.state';
47
47
  export * from './i-gantt-view.state';
48
+ export * from './i-de-index-view.state';
@@ -11,15 +11,16 @@ export interface IAuthService {
11
11
  * 登录
12
12
  *
13
13
  * @author chitanda
14
- * @date 2023-08-17 16:08:23
14
+ * @date 2023-12-13 15:12:16
15
15
  * @param {string} loginName
16
16
  * @param {string} password
17
+ * @param {boolean} [remember]
17
18
  * @return {*} {Promise<boolean>}
18
19
  */
19
20
  login(
20
21
  loginName: string,
21
22
  password: string,
22
- rememberme?: boolean,
23
+ remember?: boolean,
23
24
  ): Promise<boolean>;
24
25
 
25
26
  /**
@@ -39,7 +39,7 @@ export async function getUIActionProvider(
39
39
  model: IAppUIAction,
40
40
  ): Promise<IUIActionProvider> {
41
41
  let provider: IUIActionProvider | undefined;
42
- const { uiactionMode, sysPFPluginId, appId } =
42
+ const { uiactionMode, sysPFPluginId, appId, uiactionTag } =
43
43
  model as Required<IAppUIAction>;
44
44
 
45
45
  // 找插件适配器
@@ -55,6 +55,12 @@ export async function getUIActionProvider(
55
55
  }
56
56
  }
57
57
 
58
+ // 先通过uiactionTag找界面行为适配器
59
+ provider = getProvider(`${uiactionMode}_${uiactionTag}`);
60
+ if (provider) {
61
+ return provider;
62
+ }
63
+
58
64
  // 找界面行为类型
59
65
  provider = getProvider(uiactionMode);
60
66
  if (!provider) {
@@ -12,26 +12,29 @@ import { IAuthService } from '../../../interface';
12
12
  */
13
13
  export class V7AuthService implements IAuthService {
14
14
  async login(
15
- loginname: string,
15
+ loginName: string,
16
16
  password: string,
17
- rememberme?: boolean,
17
+ remember?: boolean,
18
18
  ): Promise<boolean> {
19
19
  // eslint-disable-next-line no-useless-catch
20
20
  try {
21
21
  const res = await ibiz.net.post('/v7/login', {
22
- loginname,
22
+ loginname: loginName,
23
23
  password,
24
- rememberme,
24
+ rememberme: remember,
25
25
  });
26
26
  const { data } = res;
27
27
  if (data && data.token) {
28
- setCookie(CoreConst.TOKEN, data.token, rememberme ? 7 : 0, true);
28
+ if (remember) {
29
+ setCookie(CoreConst.TOKEN_REMEMBER, '1', 7, true);
30
+ }
31
+ setCookie(CoreConst.TOKEN, data.token, remember ? 7 : 0, true);
29
32
  const expiredDate =
30
33
  new Date().getTime() + (data.expirein || 7199) * 1000;
31
34
  setCookie(
32
35
  CoreConst.TOKEN_EXPIRES,
33
36
  `${expiredDate}`,
34
- rememberme ? 7 : 0,
37
+ remember ? 7 : 0,
35
38
  true,
36
39
  );
37
40
  }
@@ -50,6 +53,7 @@ export class V7AuthService implements IAuthService {
50
53
  await ibiz.net.get('/v7/logout');
51
54
  clearCookie(CoreConst.TOKEN);
52
55
  clearCookie(CoreConst.TOKEN_EXPIRES);
56
+ clearCookie(CoreConst.TOKEN_REMEMBER);
53
57
  return true;
54
58
  } catch (err: unknown) {
55
59
  ibiz.notification.error({
@@ -63,6 +67,7 @@ export class V7AuthService implements IAuthService {
63
67
  async extendLogin(): Promise<void> {
64
68
  const token = getCookie(CoreConst.TOKEN);
65
69
  const expirein = getCookie(CoreConst.TOKEN_EXPIRES);
70
+ const remember = getCookie(CoreConst.TOKEN_REMEMBER);
66
71
  if (token && expirein) {
67
72
  // 计算到过期时间所需的延时毫秒数,预留提前量
68
73
  let wait = Number(expirein) - new Date().getTime();
@@ -71,10 +76,15 @@ export class V7AuthService implements IAuthService {
71
76
  setTimeout(async () => {
72
77
  const res = await ibiz.net.get(`/uaa/refreshtoken2`);
73
78
  if (res.ok) {
74
- setCookie(CoreConst.TOKEN, res.data.token, 0, true);
79
+ setCookie(CoreConst.TOKEN, res.data.token, remember ? 7 : 0, true);
75
80
  const expiredDate =
76
81
  new Date().getTime() + (res.data.expirein || 7199) * 1000;
77
- setCookie(CoreConst.TOKEN_EXPIRES, `${expiredDate}`, 0, true);
82
+ setCookie(
83
+ CoreConst.TOKEN_EXPIRES,
84
+ `${expiredDate}`,
85
+ remember ? 7 : 0,
86
+ true,
87
+ );
78
88
  }
79
89
  // 下一次延时做准备
80
90
  this.extendLogin();
@@ -67,7 +67,7 @@ export class DEService implements IAppDEService {
67
67
  * @date 2022-08-18 19:08:40
68
68
  * @type {DECache}
69
69
  */
70
- readonly local: DECache = new DECache();
70
+ readonly local: DECache;
71
71
 
72
72
  /**
73
73
  * Creates an instance of EntityService.
@@ -77,6 +77,7 @@ export class DEService implements IAppDEService {
77
77
  * @param {IAppDataEntity} model 应用实体模型
78
78
  */
79
79
  constructor(protected model: IAppDataEntity) {
80
+ this.local = new DECache(model);
80
81
  this.configCache = new ConfigService(
81
82
  model.appId!,
82
83
  'PSAppDataEntity',
@@ -1,4 +1,5 @@
1
1
  import {
2
+ HttpError,
2
3
  HttpResponse,
3
4
  IHttpResponse,
4
5
  RuntimeError,
@@ -300,7 +301,7 @@ export class DEActionMethod extends Method {
300
301
  }
301
302
  return new HttpResponse(resultData);
302
303
  } catch (err) {
303
- return new HttpResponse(err, 500);
304
+ throw new HttpError(err as Error);
304
305
  }
305
306
  }
306
307
 
@@ -357,7 +358,7 @@ export class DEActionMethod extends Method {
357
358
  }
358
359
  return new HttpResponse(data, 500);
359
360
  } catch (err) {
360
- return new HttpResponse(err, 500);
361
+ throw new HttpError(err as Error);
361
362
  }
362
363
  }
363
364
 
@@ -390,7 +391,7 @@ export class DEActionMethod extends Method {
390
391
  }
391
392
  return new HttpResponse(resultData, 500);
392
393
  } catch (err) {
393
- return new HttpResponse(err, 500);
394
+ throw new HttpError(err as Error);
394
395
  }
395
396
  }
396
397
 
@@ -423,7 +424,7 @@ export class DEActionMethod extends Method {
423
424
  }
424
425
  return new HttpResponse(data, 500);
425
426
  } catch (err) {
426
- return new HttpResponse(err, 500);
427
+ throw new HttpError(err as Error);
427
428
  }
428
429
  }
429
430