@ibiz-template/runtime 0.1.32 → 0.1.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 +448 -235
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/out/controller/common/control/control.controller.d.ts +1 -0
- package/out/controller/common/control/control.controller.d.ts.map +1 -1
- package/out/controller/common/control/control.controller.js +21 -1
- package/out/controller/common/control/md-control.controller.js +2 -2
- package/out/controller/common/editor/code-list-editor.controller.d.ts.map +1 -1
- package/out/controller/common/editor/code-list-editor.controller.js +1 -1
- package/out/controller/common/editor/editor.controller.d.ts.map +1 -1
- package/out/controller/common/editor/editor.controller.js +1 -2
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +2 -1
- package/out/controller/control/calendar/calendar.controller.js +1 -1
- package/out/controller/control/data-view/data-view.controller.js +5 -3
- package/out/controller/control/form/edit-form/edit-form.controller.d.ts +7 -7
- package/out/controller/control/form/edit-form/edit-form.controller.d.ts.map +1 -1
- package/out/controller/control/form/edit-form/edit-form.controller.js +22 -16
- package/out/controller/control/form/search-form/search-form.service.d.ts +8 -0
- package/out/controller/control/form/search-form/search-form.service.d.ts.map +1 -1
- package/out/controller/control/form/search-form/search-form.service.js +19 -2
- package/out/controller/control/grid/grid/grid.controller.js +2 -2
- package/out/controller/control/panel/panel/panel-item.controller.d.ts +6 -0
- package/out/controller/control/panel/panel/panel-item.controller.d.ts.map +1 -1
- package/out/controller/control/panel/panel/panel-item.controller.js +11 -0
- package/out/controller/control/panel/panel/panel.controller.d.ts +3 -0
- package/out/controller/control/panel/panel/panel.controller.d.ts.map +1 -1
- package/out/controller/control/panel/panel/panel.controller.js +13 -0
- package/out/controller/control/panel/view-layout-panel/view-layout-panel.controller.d.ts.map +1 -1
- package/out/controller/control/panel/view-layout-panel/view-layout-panel.controller.js +7 -0
- package/out/controller/control/tree/tree.controller.d.ts.map +1 -1
- package/out/controller/control/tree/tree.controller.js +15 -7
- package/out/interface/common/i-data-ability-params/i-data-ability-params.d.ts +4 -4
- package/out/interface/common/i-data-ability-params/i-data-ability-params.d.ts.map +1 -1
- package/out/interface/common/i-float-window-options/i-float-window-options.d.ts +75 -0
- package/out/interface/common/i-float-window-options/i-float-window-options.d.ts.map +1 -0
- package/out/interface/common/i-float-window-options/i-float-window-options.js +1 -0
- package/out/interface/common/index.d.ts +1 -0
- package/out/interface/common/index.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-control.controller.d.ts +1 -1
- package/out/interface/controller/controller/control/i-edit-form.controller.d.ts +6 -5
- package/out/interface/controller/controller/control/i-edit-form.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/i.controller.d.ts +1 -1
- package/out/interface/controller/event/argument/index.d.ts +1 -0
- package/out/interface/controller/event/argument/index.d.ts.map +1 -1
- package/out/interface/controller/event/argument/panel-item.event.d.ts +26 -0
- package/out/interface/controller/event/argument/panel-item.event.d.ts.map +1 -0
- package/out/interface/controller/event/argument/panel-item.event.js +1 -0
- package/out/interface/controller/event/control/i-panel.event.d.ts +12 -1
- package/out/interface/controller/event/control/i-panel.event.d.ts.map +1 -1
- package/out/interface/logic-scheduler/i-scheduler-logic.d.ts +7 -0
- package/out/interface/logic-scheduler/i-scheduler-logic.d.ts.map +1 -1
- package/out/interface/service/service/i-app-de.service.d.ts +24 -0
- package/out/interface/service/service/i-app-de.service.d.ts.map +1 -1
- package/out/interface/util/i-overlay-controller/i-overlay-controller.d.ts +24 -1
- package/out/interface/util/i-overlay-controller/i-overlay-controller.d.ts.map +1 -1
- package/out/logic-scheduler/executor/app-ui-action-executor.d.ts +15 -0
- package/out/logic-scheduler/executor/app-ui-action-executor.d.ts.map +1 -0
- package/out/logic-scheduler/executor/app-ui-action-executor.js +16 -0
- package/out/logic-scheduler/index.d.ts.map +1 -1
- package/out/logic-scheduler/index.js +6 -0
- package/out/logic-scheduler/scheduler/control-logic-scheduler.d.ts.map +1 -1
- package/out/logic-scheduler/scheduler/control-logic-scheduler.js +6 -0
- package/out/logic-scheduler/scheduler/logic-scheduler.d.ts +2 -2
- package/out/logic-scheduler/scheduler/logic-scheduler.d.ts.map +1 -1
- package/out/logic-scheduler/scheduler/logic-scheduler.js +3 -3
- package/out/logic-scheduler/trigger/control-event-trigger.d.ts.map +1 -1
- package/out/logic-scheduler/trigger/control-event-trigger.js +3 -1
- package/out/service/service/entity/de.service.d.ts +36 -2
- package/out/service/service/entity/de.service.d.ts.map +1 -1
- package/out/service/service/entity/de.service.js +79 -7
- package/out/service/service/entity/method/ac-fetch.d.ts +14 -0
- package/out/service/service/entity/method/ac-fetch.d.ts.map +1 -0
- package/out/service/service/entity/method/ac-fetch.js +15 -0
- package/out/service/service/entity/method/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +2 -1
- package/out/service/service/entity/method/method.d.ts +1 -0
- package/out/service/service/entity/method/method.d.ts.map +1 -1
- package/out/service/service/entity/method/method.js +7 -4
- package/out/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.js +12 -5
- package/out/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.js +16 -2
- package/out/ui-logic/ui-logic-param/ui-logic-param.d.ts.map +1 -1
- package/out/ui-logic/ui-logic-param/ui-logic-param.js +5 -0
- package/package.json +5 -5
- package/src/controller/common/control/control.controller.ts +25 -1
- package/src/controller/common/control/md-control.controller.ts +2 -2
- package/src/controller/common/editor/code-list-editor.controller.ts +4 -1
- package/src/controller/common/editor/editor.controller.ts +1 -2
- package/src/controller/common/view/view.controller.ts +2 -0
- package/src/controller/control/calendar/calendar.controller.ts +1 -1
- package/src/controller/control/data-view/data-view.controller.ts +3 -3
- package/src/controller/control/form/edit-form/edit-form.controller.ts +27 -30
- package/src/controller/control/form/search-form/search-form.service.ts +20 -2
- package/src/controller/control/grid/grid/grid.controller.ts +2 -2
- package/src/controller/control/panel/panel/panel-item.controller.ts +12 -0
- package/src/controller/control/panel/panel/panel.controller.ts +20 -0
- package/src/controller/control/panel/view-layout-panel/view-layout-panel.controller.ts +11 -0
- package/src/controller/control/tree/tree.controller.ts +15 -8
- package/src/interface/common/i-data-ability-params/i-data-ability-params.ts +4 -4
- package/src/interface/common/i-float-window-options/i-float-window-options.ts +74 -0
- package/src/interface/common/index.ts +1 -0
- package/src/interface/controller/controller/control/i-control.controller.ts +1 -1
- package/src/interface/controller/controller/control/i-edit-form.controller.ts +6 -5
- package/src/interface/controller/controller/i.controller.ts +1 -1
- package/src/interface/controller/event/argument/index.ts +1 -0
- package/src/interface/controller/event/argument/panel-item.event.ts +27 -0
- package/src/interface/controller/event/control/i-panel.event.ts +13 -1
- package/src/interface/logic-scheduler/i-scheduler-logic.ts +8 -0
- package/src/interface/service/service/i-app-de.service.ts +36 -0
- package/src/interface/util/i-overlay-controller/i-overlay-controller.ts +39 -1
- package/src/logic-scheduler/executor/app-ui-action-executor.ts +20 -0
- package/src/logic-scheduler/index.ts +12 -0
- package/src/logic-scheduler/scheduler/control-logic-scheduler.ts +6 -0
- package/src/logic-scheduler/scheduler/logic-scheduler.ts +7 -4
- package/src/logic-scheduler/trigger/control-event-trigger.ts +3 -1
- package/src/service/service/entity/de.service.ts +97 -7
- package/src/service/service/entity/method/ac-fetch.ts +16 -0
- package/src/service/service/entity/method/de-action.ts +7 -1
- package/src/service/service/entity/method/method.ts +11 -4
- package/src/ui-logic/ui-logic-link/ui-logic-link-single-cond/ui-logic-link-single-cond.ts +12 -5
- package/src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts +24 -2
- package/src/ui-logic/ui-logic-param/ui-logic-param.ts +7 -0
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
IViewController,
|
|
16
16
|
IEditViewState,
|
|
17
17
|
IEditViewEvent,
|
|
18
|
+
IDataAbilityParams,
|
|
18
19
|
} from '../../../../interface';
|
|
19
20
|
import { calcDeCodeNameById, hasDeCodeName } from '../../../../model';
|
|
20
21
|
import { Srfuf, ControlVO } from '../../../../service';
|
|
@@ -87,8 +88,8 @@ export class EditFormController
|
|
|
87
88
|
* @date 2023-08-25 02:45:11
|
|
88
89
|
* @return {*} {Promise<IData>}
|
|
89
90
|
*/
|
|
90
|
-
async loadDraft(): Promise<IData> {
|
|
91
|
-
const queryParams =
|
|
91
|
+
async loadDraft(args?: IDataAbilityParams): Promise<IData> {
|
|
92
|
+
const { context, params: queryParams } = this.handlerAbilityParams(args);
|
|
92
93
|
// 新建默认值给到graft接口,接口会回来
|
|
93
94
|
const params = await this.getDraftParams(); // 新建默认值
|
|
94
95
|
Object.assign(queryParams, params);
|
|
@@ -97,7 +98,7 @@ export class EditFormController
|
|
|
97
98
|
try {
|
|
98
99
|
await this.startLoading();
|
|
99
100
|
await this.evt.emit('onBeforeLoadDraft', { params: queryParams });
|
|
100
|
-
res = await this.service.getDraft(
|
|
101
|
+
res = await this.service.getDraft(context, queryParams);
|
|
101
102
|
} catch (error) {
|
|
102
103
|
await this.evt.emit('onLoadDraftError', undefined);
|
|
103
104
|
this.actionNotification('GETDRAFTERROR', {
|
|
@@ -177,7 +178,7 @@ export class EditFormController
|
|
|
177
178
|
* @author lxm
|
|
178
179
|
* @date 2022-08-19 14:08:50
|
|
179
180
|
*/
|
|
180
|
-
async load(): Promise<IData> {
|
|
181
|
+
async load(args?: IDataAbilityParams): Promise<IData> {
|
|
181
182
|
// 复制模式独立处理
|
|
182
183
|
const copyMode = this.params.srfcopymode;
|
|
183
184
|
if (copyMode) {
|
|
@@ -192,13 +193,15 @@ export class EditFormController
|
|
|
192
193
|
return this.loadDraft();
|
|
193
194
|
}
|
|
194
195
|
|
|
195
|
-
const
|
|
196
|
+
const { context, params } = this.handlerAbilityParams(args);
|
|
197
|
+
|
|
198
|
+
const queryParams = clone(params);
|
|
196
199
|
|
|
197
200
|
let res;
|
|
198
201
|
try {
|
|
199
202
|
await this.startLoading();
|
|
200
203
|
await this.evt.emit('onBeforeLoad', undefined);
|
|
201
|
-
res = await this.service.get(
|
|
204
|
+
res = await this.service.get(context, queryParams);
|
|
202
205
|
} catch (error) {
|
|
203
206
|
await this.evt.emit('onLoadError', undefined);
|
|
204
207
|
this.actionNotification('GETERROR', {
|
|
@@ -225,7 +228,7 @@ export class EditFormController
|
|
|
225
228
|
* @author lxm
|
|
226
229
|
* @date 2022-08-31 22:08:40
|
|
227
230
|
*/
|
|
228
|
-
async save(): Promise<IData> {
|
|
231
|
+
async save(args?: IDataAbilityParams): Promise<IData> {
|
|
229
232
|
// 如果数据正在处理中,则延迟保存
|
|
230
233
|
if (this.state.processing) {
|
|
231
234
|
const data = await awaitTimeout(500, this.save.bind(this));
|
|
@@ -238,12 +241,16 @@ export class EditFormController
|
|
|
238
241
|
}
|
|
239
242
|
await this.startLoading();
|
|
240
243
|
await this.evt.emit('onBeforeSave', undefined);
|
|
241
|
-
|
|
244
|
+
|
|
245
|
+
const { context, data } = this.handlerAbilityParams(args);
|
|
246
|
+
const saveData = data[0];
|
|
247
|
+
|
|
248
|
+
const isCreate = saveData.srfuf === Srfuf.CREATE;
|
|
242
249
|
let res;
|
|
243
250
|
try {
|
|
244
251
|
res = isCreate
|
|
245
|
-
? await this.service.create(
|
|
246
|
-
: await this.service.update(
|
|
252
|
+
? await this.service.create(context, saveData)
|
|
253
|
+
: await this.service.update(context, saveData);
|
|
247
254
|
} catch (error) {
|
|
248
255
|
await this.evt.emit('onSaveError', undefined);
|
|
249
256
|
this.actionNotification(`${isCreate ? 'CREATE' : 'UPDATE'}ERROR`, {
|
|
@@ -279,7 +286,8 @@ export class EditFormController
|
|
|
279
286
|
* @date 2022-09-01 09:09:36
|
|
280
287
|
* @returns {*}
|
|
281
288
|
*/
|
|
282
|
-
async remove(): Promise<boolean> {
|
|
289
|
+
async remove(args?: IDataAbilityParams): Promise<boolean> {
|
|
290
|
+
const { context, params } = this.handlerAbilityParams(args);
|
|
283
291
|
// 新建数据清空数据
|
|
284
292
|
let res: IHttpResponse | undefined;
|
|
285
293
|
let ok: boolean = false;
|
|
@@ -296,7 +304,7 @@ export class EditFormController
|
|
|
296
304
|
}
|
|
297
305
|
await this.startLoading();
|
|
298
306
|
try {
|
|
299
|
-
res = await this.service.remove(
|
|
307
|
+
res = await this.service.remove(context, params);
|
|
300
308
|
} catch (error) {
|
|
301
309
|
await this.evt.emit('onRemoveError', undefined);
|
|
302
310
|
this.actionNotification('REMOVEERROR', {
|
|
@@ -406,21 +414,15 @@ export class EditFormController
|
|
|
406
414
|
* @param {IParams} [extraParams={}] 不走工作流启动视图时使用
|
|
407
415
|
* @returns {*} {Promise<void>}
|
|
408
416
|
*/
|
|
409
|
-
async wfStart(
|
|
417
|
+
async wfStart(args?: IDataAbilityParams): Promise<void> {
|
|
410
418
|
const isValid = await this.validate();
|
|
411
419
|
if (!isValid) {
|
|
412
420
|
throw new RuntimeError('请检查表单填写!');
|
|
413
421
|
}
|
|
414
422
|
await this.startLoading();
|
|
423
|
+
const { context, params } = this.handlerAbilityParams(args);
|
|
415
424
|
try {
|
|
416
|
-
await this.service.wfStart(
|
|
417
|
-
this.context,
|
|
418
|
-
{
|
|
419
|
-
...this.params,
|
|
420
|
-
...extraParams,
|
|
421
|
-
},
|
|
422
|
-
this.data,
|
|
423
|
-
);
|
|
425
|
+
await this.service.wfStart(context, params, this.data);
|
|
424
426
|
} catch (error) {
|
|
425
427
|
this.actionNotification('WFSTARTERROR', {
|
|
426
428
|
error: error as Error,
|
|
@@ -440,21 +442,16 @@ export class EditFormController
|
|
|
440
442
|
* @param {IParams} [extraParams={}] 不走工作流操作视图时使用
|
|
441
443
|
* @returns {*} {Promise<void>}
|
|
442
444
|
*/
|
|
443
|
-
async wfSubmit(
|
|
445
|
+
async wfSubmit(args?: IDataAbilityParams): Promise<void> {
|
|
444
446
|
const isValid = await this.validate();
|
|
445
447
|
if (!isValid) {
|
|
446
448
|
throw new RuntimeError('请检查表单填写!');
|
|
447
449
|
}
|
|
450
|
+
|
|
448
451
|
await this.startLoading();
|
|
452
|
+
const { context, params } = this.handlerAbilityParams(args);
|
|
449
453
|
try {
|
|
450
|
-
await this.service.wfSubmit(
|
|
451
|
-
this.context,
|
|
452
|
-
{
|
|
453
|
-
...this.params,
|
|
454
|
-
...extraParams,
|
|
455
|
-
},
|
|
456
|
-
this.data,
|
|
457
|
-
);
|
|
454
|
+
await this.service.wfSubmit(context, params, this.data);
|
|
458
455
|
} catch (error) {
|
|
459
456
|
this.actionNotification('WFSUBMITERROR', {
|
|
460
457
|
error: error as Error,
|
|
@@ -28,7 +28,8 @@ export class SearchFormService<
|
|
|
28
28
|
_context: IParams,
|
|
29
29
|
params: IParams = {},
|
|
30
30
|
): Promise<IHttpResponse<ControlVO>> {
|
|
31
|
-
|
|
31
|
+
const tempData = this.getFilteredData({ ...params });
|
|
32
|
+
let res = { ok: true, status: 200, data: tempData } as IHttpResponse;
|
|
32
33
|
res = this.handleResponse(res);
|
|
33
34
|
return res as IHttpResponse<ControlVO>;
|
|
34
35
|
}
|
|
@@ -50,7 +51,7 @@ export class SearchFormService<
|
|
|
50
51
|
}
|
|
51
52
|
},
|
|
52
53
|
{
|
|
53
|
-
childrenFields: ['deformPages', 'deformDetails'],
|
|
54
|
+
childrenFields: ['deformPages', 'deformTabPages', 'deformDetails'],
|
|
54
55
|
},
|
|
55
56
|
);
|
|
56
57
|
}
|
|
@@ -70,4 +71,21 @@ export class SearchFormService<
|
|
|
70
71
|
}
|
|
71
72
|
return res as IHttpResponse<ControlVO>;
|
|
72
73
|
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 根据表单项过滤出数据
|
|
77
|
+
*
|
|
78
|
+
* @return {*}
|
|
79
|
+
* @author: zhujiamin
|
|
80
|
+
* @Date: 2023-09-01 10:04:25
|
|
81
|
+
*/
|
|
82
|
+
getFilteredData(data: IData): IData {
|
|
83
|
+
const tempData: IData = {};
|
|
84
|
+
this.dataUIMap.forEach(dataUI => {
|
|
85
|
+
if (data[dataUI.dataKey] !== undefined) {
|
|
86
|
+
tempData[dataUI.dataKey] = data[dataUI.dataKey];
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
return tempData;
|
|
90
|
+
}
|
|
73
91
|
}
|
|
@@ -893,7 +893,7 @@ export class GridController
|
|
|
893
893
|
async loadData(args: MDCtrlLoadParams): Promise<ControlVO[]> {
|
|
894
894
|
// *查询参数处理
|
|
895
895
|
const { context } = this.handlerAbilityParams(args);
|
|
896
|
-
const params = await this.getFetchParams(args?.
|
|
896
|
+
const params = await this.getFetchParams(args?.viewParam);
|
|
897
897
|
let res;
|
|
898
898
|
// *发起请求
|
|
899
899
|
await this.startLoading();
|
|
@@ -959,7 +959,7 @@ export class GridController
|
|
|
959
959
|
size: (endPage - startPage + 1) * size,
|
|
960
960
|
}
|
|
961
961
|
: { size: 1000, page: 0 };
|
|
962
|
-
data = await this.loadData({ params });
|
|
962
|
+
data = await this.loadData({ viewParam: params });
|
|
963
963
|
}
|
|
964
964
|
if (type === 'selectedRows') {
|
|
965
965
|
data = this.getData();
|
|
@@ -341,4 +341,16 @@ export class PanelItemController<T extends IPanelItem = IPanelItem>
|
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* 点击事件
|
|
347
|
+
* @author lxm
|
|
348
|
+
* @date 2023-10-11 05:03:26
|
|
349
|
+
*/
|
|
350
|
+
onClick(): void {
|
|
351
|
+
this.panel.evt.emit('onPanelItemEvent', {
|
|
352
|
+
panelItemName: this.model.id!,
|
|
353
|
+
panelItemEventName: 'onClick',
|
|
354
|
+
});
|
|
355
|
+
}
|
|
344
356
|
}
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
import { getPanelItemProvider } from '../../../../register';
|
|
20
20
|
import { ControlController } from '../../../common';
|
|
21
21
|
import { PanelNotifyState } from '../../../constant';
|
|
22
|
+
import { ControllerEvent } from '../../../utils';
|
|
22
23
|
|
|
23
24
|
/**
|
|
24
25
|
* 面板部件控制器
|
|
@@ -37,6 +38,10 @@ export class PanelController<
|
|
|
37
38
|
extends ControlController<T, S, E>
|
|
38
39
|
implements IPanelController<T, S, E>
|
|
39
40
|
{
|
|
41
|
+
protected get _evt(): ControllerEvent<IPanelEvent> {
|
|
42
|
+
return this.evt;
|
|
43
|
+
}
|
|
44
|
+
|
|
40
45
|
/**
|
|
41
46
|
* 所有面板成员的控制器
|
|
42
47
|
*
|
|
@@ -86,9 +91,24 @@ export class PanelController<
|
|
|
86
91
|
this.inputData = data;
|
|
87
92
|
}
|
|
88
93
|
|
|
94
|
+
getData(): IData[] {
|
|
95
|
+
return [this.data];
|
|
96
|
+
}
|
|
97
|
+
|
|
89
98
|
protected async onCreated(): Promise<void> {
|
|
90
99
|
await super.onCreated();
|
|
91
100
|
await this.initPanelItemControllers();
|
|
101
|
+
|
|
102
|
+
if (this.scheduler?.hasControlEventTrigger) {
|
|
103
|
+
// 监听部件事件触发部件事件触发器
|
|
104
|
+
this._evt.on('onPanelItemEvent', event => {
|
|
105
|
+
this.scheduler!.triggerControlEvent(
|
|
106
|
+
event.panelItemName,
|
|
107
|
+
event.panelItemEventName,
|
|
108
|
+
event,
|
|
109
|
+
);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
92
112
|
}
|
|
93
113
|
|
|
94
114
|
protected async onMounted(): Promise<void> {
|
|
@@ -30,6 +30,17 @@ export class ViewLayoutPanelController
|
|
|
30
30
|
protected async onCreated(): Promise<void> {
|
|
31
31
|
this.preprocessModel();
|
|
32
32
|
await super.onCreated();
|
|
33
|
+
|
|
34
|
+
if (this.scheduler?.hasControlEventTrigger) {
|
|
35
|
+
// 监听部件事件触发部件事件触发器
|
|
36
|
+
this.evt.on('onControlEvent', event => {
|
|
37
|
+
this.scheduler!.triggerControlEvent(
|
|
38
|
+
event.triggerControlName,
|
|
39
|
+
event.triggerEventName,
|
|
40
|
+
event.triggerEvent,
|
|
41
|
+
);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
33
44
|
}
|
|
34
45
|
|
|
35
46
|
protected registerToCtx(): void {
|
|
@@ -109,14 +109,21 @@ export class TreeController
|
|
|
109
109
|
const params = await this.getFetchParams();
|
|
110
110
|
const hasQuery = !!params.query;
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
112
|
+
this.state.isLoading = true;
|
|
113
|
+
|
|
114
|
+
let nodes;
|
|
115
|
+
try {
|
|
116
|
+
// 请求服务获取子节点数据
|
|
117
|
+
nodes =
|
|
118
|
+
(await this.service.fetchChildNodes(parentNode, {
|
|
119
|
+
context: this.context.clone(),
|
|
120
|
+
params,
|
|
121
|
+
hasQuery,
|
|
122
|
+
defaultExpandedKeys: this.state.expandedKeys,
|
|
123
|
+
})) || [];
|
|
124
|
+
} finally {
|
|
125
|
+
this.state.isLoading = false;
|
|
126
|
+
}
|
|
120
127
|
|
|
121
128
|
// 有父节点绑定到父节点数据上,无父节点替换rootNodes
|
|
122
129
|
if (parentNode) {
|
|
@@ -10,9 +10,9 @@ export interface IDataAbilityParams {
|
|
|
10
10
|
* 当前这次操作附加的上下文参数
|
|
11
11
|
* @author lxm
|
|
12
12
|
* @date 2023-03-21 05:53:33
|
|
13
|
-
* @type {
|
|
13
|
+
* @type {IParams}
|
|
14
14
|
*/
|
|
15
|
-
context?:
|
|
15
|
+
context?: IParams;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* 当前这次操作附加的视图参数
|
|
@@ -20,7 +20,7 @@ export interface IDataAbilityParams {
|
|
|
20
20
|
* @date 2023-03-21 05:54:23
|
|
21
21
|
* @type {IParams}
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
viewParam?: IParams;
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* 执行能力使用的数据集合
|
|
@@ -29,5 +29,5 @@ export interface IDataAbilityParams {
|
|
|
29
29
|
* @date 2023-03-21 05:54:33
|
|
30
30
|
* @type {IData[]}
|
|
31
31
|
*/
|
|
32
|
-
data?: IData[];
|
|
32
|
+
data?: IData[] | IData;
|
|
33
33
|
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 全局悬浮窗口配置项
|
|
3
|
+
*
|
|
4
|
+
* @author chitanda
|
|
5
|
+
* @date 2023-10-11 21:10:18
|
|
6
|
+
* @export
|
|
7
|
+
* @interface IFloatWindowOptions
|
|
8
|
+
*/
|
|
9
|
+
export interface IFloatWindowOptions {
|
|
10
|
+
/**
|
|
11
|
+
* 初始宽度,单位 px
|
|
12
|
+
*
|
|
13
|
+
* @author chitanda
|
|
14
|
+
* @date 2023-10-11 21:10:10
|
|
15
|
+
* @type {number}
|
|
16
|
+
*/
|
|
17
|
+
width?: number;
|
|
18
|
+
/**
|
|
19
|
+
* 初始高度,单位 px
|
|
20
|
+
*
|
|
21
|
+
* @author chitanda
|
|
22
|
+
* @date 2023-10-11 21:10:19
|
|
23
|
+
* @type {number}
|
|
24
|
+
*/
|
|
25
|
+
height?: number;
|
|
26
|
+
/**
|
|
27
|
+
* 最小宽度,单位 px
|
|
28
|
+
*
|
|
29
|
+
* @author chitanda
|
|
30
|
+
* @date 2023-10-11 22:10:18
|
|
31
|
+
* @type {number}
|
|
32
|
+
*/
|
|
33
|
+
minWidth?: number;
|
|
34
|
+
/**
|
|
35
|
+
* 最小高度,单位 px
|
|
36
|
+
*
|
|
37
|
+
* @author chitanda
|
|
38
|
+
* @date 2023-10-11 22:10:25
|
|
39
|
+
* @type {number}
|
|
40
|
+
*/
|
|
41
|
+
minHeight?: number;
|
|
42
|
+
/**
|
|
43
|
+
* 初始 x 坐标,单位 px
|
|
44
|
+
*
|
|
45
|
+
* @author chitanda
|
|
46
|
+
* @date 2023-10-11 21:10:29
|
|
47
|
+
* @type {number}
|
|
48
|
+
*/
|
|
49
|
+
x?: number;
|
|
50
|
+
/**
|
|
51
|
+
* 初始 y 坐标,单位 px
|
|
52
|
+
*
|
|
53
|
+
* @author chitanda
|
|
54
|
+
* @date 2023-10-11 21:10:38
|
|
55
|
+
* @type {number}
|
|
56
|
+
*/
|
|
57
|
+
y?: number;
|
|
58
|
+
/**
|
|
59
|
+
* 附加样式,用于自定义样式
|
|
60
|
+
*
|
|
61
|
+
* @author chitanda
|
|
62
|
+
* @date 2023-10-11 21:10:22
|
|
63
|
+
* @type {string}
|
|
64
|
+
*/
|
|
65
|
+
windowClass?: string;
|
|
66
|
+
/**
|
|
67
|
+
* 是否默认全屏
|
|
68
|
+
*
|
|
69
|
+
* @author chitanda
|
|
70
|
+
* @date 2023-10-11 21:10:49
|
|
71
|
+
* @type {boolean}
|
|
72
|
+
*/
|
|
73
|
+
fullscreen?: boolean;
|
|
74
|
+
}
|
|
@@ -30,3 +30,4 @@ export type {
|
|
|
30
30
|
} from './i-app-view-config-service/i-app-view-config-service';
|
|
31
31
|
export type { IOpenViewOptions } from './i-open-view-options/i-open-view-options';
|
|
32
32
|
export type { IErrorHandler } from './i-error-handler/i-error-handler';
|
|
33
|
+
export type { IFloatWindowOptions } from './i-float-window-options/i-float-window-options';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IDEEditForm } from '@ibiz/model-core';
|
|
2
|
+
import { IDataAbilityParams } from '../../../common';
|
|
2
3
|
import { IEditFormEvent } from '../../event';
|
|
3
4
|
import { IEditFormState } from '../../state';
|
|
4
5
|
import { IFormController } from './i-form.controller';
|
|
@@ -19,7 +20,7 @@ export interface IEditFormController
|
|
|
19
20
|
* @date 2023-05-16 11:08:45
|
|
20
21
|
* @return {*} {Promise<IData>}
|
|
21
22
|
*/
|
|
22
|
-
load(): Promise<IData>;
|
|
23
|
+
load(args?: IDataAbilityParams): Promise<IData>;
|
|
23
24
|
|
|
24
25
|
/**
|
|
25
26
|
* 保存表单数据
|
|
@@ -27,7 +28,7 @@ export interface IEditFormController
|
|
|
27
28
|
* @date 2023-05-16 12:59:03
|
|
28
29
|
* @return {*} {Promise<IData>}
|
|
29
30
|
*/
|
|
30
|
-
save(): Promise<IData>;
|
|
31
|
+
save(args?: IDataAbilityParams): Promise<IData>;
|
|
31
32
|
|
|
32
33
|
/**
|
|
33
34
|
* 删除表单数据
|
|
@@ -37,7 +38,7 @@ export interface IEditFormController
|
|
|
37
38
|
* @return {*} {Promise<boolean>}
|
|
38
39
|
* @memberof IEditFormController
|
|
39
40
|
*/
|
|
40
|
-
remove(): Promise<boolean>;
|
|
41
|
+
remove(args?: IDataAbilityParams): Promise<boolean>;
|
|
41
42
|
|
|
42
43
|
/**
|
|
43
44
|
* 工作流提交(调用前先确保调用保存)
|
|
@@ -47,7 +48,7 @@ export interface IEditFormController
|
|
|
47
48
|
* @param {IParams} [extraParams={}] 不走工作流操作视图时使用
|
|
48
49
|
* @returns {*} {Promise<void>}
|
|
49
50
|
*/
|
|
50
|
-
wfSubmit(
|
|
51
|
+
wfSubmit(args?: IDataAbilityParams): Promise<void>;
|
|
51
52
|
|
|
52
53
|
/**
|
|
53
54
|
* 工作流启动(调用前先确保调用保存)
|
|
@@ -57,5 +58,5 @@ export interface IEditFormController
|
|
|
57
58
|
* @param {IParams} [extraParams={}] 不走工作流启动视图时使用
|
|
58
59
|
* @returns {*} {Promise<void>}
|
|
59
60
|
*/
|
|
60
|
-
wfStart(
|
|
61
|
+
wfStart(args?: IDataAbilityParams): Promise<void>;
|
|
61
62
|
}
|
|
@@ -7,3 +7,4 @@ export { UIActionEvent } from './uiaction.event';
|
|
|
7
7
|
export { ControlTriggerEvent } from './control-trigger.event';
|
|
8
8
|
export { NavViewChangeEvent } from './nav-view-change.event';
|
|
9
9
|
export { RowEditChangeEvent } from './row-edit-change.event';
|
|
10
|
+
export { PanelItemEvent } from './panel-item.event';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EventBase } from './base.event';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 面板成员事件
|
|
5
|
+
* @author lxm
|
|
6
|
+
* @date 2023-08-09 10:52:48
|
|
7
|
+
* @export
|
|
8
|
+
* @interface PanelItemEvent
|
|
9
|
+
* @extends {EventBase}
|
|
10
|
+
*/
|
|
11
|
+
export interface PanelItemEvent extends EventBase {
|
|
12
|
+
/**
|
|
13
|
+
* 触发的面板成员名称
|
|
14
|
+
* @author lxm
|
|
15
|
+
* @date 2023-03-26 02:02:16
|
|
16
|
+
* @type {string}
|
|
17
|
+
*/
|
|
18
|
+
panelItemName: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 触发的面板成员事件的名称
|
|
22
|
+
* @author lxm
|
|
23
|
+
* @date 2023-07-26 11:00:37
|
|
24
|
+
* @type {string}
|
|
25
|
+
*/
|
|
26
|
+
panelItemEventName: string;
|
|
27
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PartialWithObject } from '@ibiz-template/core';
|
|
2
|
-
import { ControlTriggerEvent, EventBase } from '../argument';
|
|
2
|
+
import { ControlTriggerEvent, EventBase, PanelItemEvent } from '../argument';
|
|
3
3
|
import { IControlEvent } from './i-control.event';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -22,4 +22,16 @@ export interface IPanelEvent extends IControlEvent {
|
|
|
22
22
|
event: ControlTriggerEvent;
|
|
23
23
|
emitArgs: PartialWithObject<ControlTriggerEvent, EventBase>;
|
|
24
24
|
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 面板里的面板成员事件监听
|
|
28
|
+
* @author lxm
|
|
29
|
+
* @date 2023-03-26 06:15:06
|
|
30
|
+
* @param {EventBase} event
|
|
31
|
+
* @return {*} {Promise<void>}
|
|
32
|
+
*/
|
|
33
|
+
onPanelItemEvent: {
|
|
34
|
+
event: PanelItemEvent;
|
|
35
|
+
emitArgs: PartialWithObject<PanelItemEvent, EventBase>;
|
|
36
|
+
};
|
|
25
37
|
}
|
|
@@ -66,4 +66,40 @@ export interface IAppDEService {
|
|
|
66
66
|
params?: IData | IData[],
|
|
67
67
|
params2?: IParams,
|
|
68
68
|
): Promise<IHttpResponse>;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 触发实体服务方法 ac 模式
|
|
72
|
+
*
|
|
73
|
+
* @author chitanda
|
|
74
|
+
* @date 2023-10-12 17:10:27
|
|
75
|
+
* @param {string} id
|
|
76
|
+
* @param {IParams} context
|
|
77
|
+
* @param {(IData | IData[])} [params]
|
|
78
|
+
* @param {IParams} [params2]
|
|
79
|
+
* @return {*} {Promise<IHttpResponse>}
|
|
80
|
+
*/
|
|
81
|
+
execAc(
|
|
82
|
+
id: string,
|
|
83
|
+
context: IParams,
|
|
84
|
+
params?: IData | IData[],
|
|
85
|
+
params2?: IParams,
|
|
86
|
+
): Promise<IHttpResponse>;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* 实体级别 AI 聊天单次会话
|
|
90
|
+
*
|
|
91
|
+
* @author chitanda
|
|
92
|
+
* @date 2023-10-12 16:10:03
|
|
93
|
+
* @param {(data: unknown) => void} onmessage
|
|
94
|
+
* @param {IParams} context
|
|
95
|
+
* @param {IParams} [params]
|
|
96
|
+
* @param {IData} [data]
|
|
97
|
+
* @return {*} {Promise<void>}
|
|
98
|
+
*/
|
|
99
|
+
aiChatSse(
|
|
100
|
+
onmessage: (data: unknown) => void,
|
|
101
|
+
context: IParams,
|
|
102
|
+
params?: IParams,
|
|
103
|
+
data?: IData,
|
|
104
|
+
): Promise<void>;
|
|
69
105
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
IPopoverOptions,
|
|
3
|
+
IDrawerOptions,
|
|
4
|
+
IModalOptions,
|
|
5
|
+
IFloatWindowOptions,
|
|
6
|
+
} from '../../common';
|
|
2
7
|
import { IOverlayContainer } from '../i-overlay-container/i-overlay-container';
|
|
3
8
|
import { IOverlayPopoverContainer } from '../i-overlay-popover-container/i-overlay-popover-container';
|
|
4
9
|
|
|
@@ -111,4 +116,37 @@ export interface IOverlayController {
|
|
|
111
116
|
props?: IParams,
|
|
112
117
|
opts?: IModalOptions,
|
|
113
118
|
): IOverlayContainer;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* 模态
|
|
122
|
+
*
|
|
123
|
+
* @author chitanda
|
|
124
|
+
* @date 2022-11-08 15:11:40
|
|
125
|
+
* @template T
|
|
126
|
+
* @param {unknown} component 组件名称,组件对象,或者绘制函数
|
|
127
|
+
* @param {IParams} [props] 组件props
|
|
128
|
+
* @param {IFloatWindowOptions} [opts]
|
|
129
|
+
* @return {*} {Promise<T>}
|
|
130
|
+
*/
|
|
131
|
+
floatWindow<T = void>(
|
|
132
|
+
component: unknown,
|
|
133
|
+
props?: IParams,
|
|
134
|
+
opts?: IFloatWindowOptions,
|
|
135
|
+
): Promise<T>;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* 创建全局模态容器
|
|
139
|
+
*
|
|
140
|
+
* @author chitanda
|
|
141
|
+
* @date 2022-11-09 15:11:58
|
|
142
|
+
* @param {unknown} component 组件名称,组件对象,或者绘制函数
|
|
143
|
+
* @param {IParams} [props] 组件props
|
|
144
|
+
* @param {IFloatWindowOptions} [opts]
|
|
145
|
+
* @return {*} {IOverlayContainer}
|
|
146
|
+
*/
|
|
147
|
+
createFloatWindow(
|
|
148
|
+
component: unknown,
|
|
149
|
+
props?: IParams,
|
|
150
|
+
opts?: IFloatWindowOptions,
|
|
151
|
+
): IOverlayContainer;
|
|
114
152
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IUILogicParams } from '../../interface';
|
|
2
|
+
import { UIActionUtil } from '../../ui-action';
|
|
3
|
+
import { LogicExecutor } from './logic-executor';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 应用界面行为执行
|
|
7
|
+
* @author lxm
|
|
8
|
+
* @date 2023-07-17 01:57:27
|
|
9
|
+
* @export
|
|
10
|
+
* @class AppUILogicExecutor
|
|
11
|
+
* @extends {LogicExecutor}
|
|
12
|
+
*/
|
|
13
|
+
export class AppDEUIActionExecutor extends LogicExecutor {
|
|
14
|
+
declare type: 'APPDEUIACTION';
|
|
15
|
+
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
17
|
+
execute(executeParams: IUILogicParams): any {
|
|
18
|
+
UIActionUtil.execAndResolved(this.logic.appDEUIActionId!, executeParams);
|
|
19
|
+
}
|
|
20
|
+
}
|