@ibiz-template/runtime 0.7.41-alpha.116 → 0.7.41-alpha.117
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 +72 -13
- package/dist/index.system.min.js +1 -1
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +1 -0
- package/out/controller/control/grid/grid/grid.controller.d.ts +2 -1
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +8 -4
- package/out/controller/control/md-ctrl/md-ctrl.controller.d.ts +2 -1
- package/out/controller/control/md-ctrl/md-ctrl.controller.d.ts.map +1 -1
- package/out/controller/control/md-ctrl/md-ctrl.controller.js +8 -4
- package/out/controller/control/toolbar/toolbar.controller.d.ts.map +1 -1
- package/out/controller/control/toolbar/toolbar.controller.js +17 -2
- package/out/interface/api/state/control/i-api-md-control.state.d.ts +7 -0
- package/out/interface/api/state/control/i-api-md-control.state.d.ts.map +1 -1
- package/out/platform/provider/platform-provider-base.d.ts.map +1 -1
- package/out/platform/provider/platform-provider-base.js +9 -0
- package/out/service/service/control/md-control.service.d.ts +2 -1
- package/out/service/service/control/md-control.service.d.ts.map +1 -1
- package/out/service/service/control/md-control.service.js +14 -4
- package/out/ui-action/provider/front-ui-action-provider.d.ts.map +1 -1
- package/out/ui-action/provider/front-ui-action-provider.js +18 -0
- package/out/ui-action/provider/ui-action-provider-base.d.ts.map +1 -1
- package/out/ui-action/provider/ui-action-provider-base.js +5 -0
- package/package.json +5 -5
- package/src/controller/common/control/md-control.controller.ts +1 -0
- package/src/controller/control/grid/grid/grid.controller.ts +14 -4
- package/src/controller/control/md-ctrl/md-ctrl.controller.ts +14 -4
- package/src/controller/control/toolbar/toolbar.controller.ts +20 -0
- package/src/interface/api/state/control/i-api-md-control.state.ts +8 -0
- package/src/platform/provider/platform-provider-base.ts +15 -0
- package/src/service/service/control/md-control.service.ts +15 -3
- package/src/ui-action/provider/front-ui-action-provider.ts +22 -0
- package/src/ui-action/provider/ui-action-provider-base.ts +6 -0
|
@@ -175,6 +175,14 @@ export interface IApiMDControlState extends IApiControlState {
|
|
|
175
175
|
* @memberof IApiMDControlState
|
|
176
176
|
*/
|
|
177
177
|
enableGroup: boolean;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* @description 是否全选,该状态目前仅PC端表格使用。
|
|
181
|
+
* @type {boolean}
|
|
182
|
+
* @default false
|
|
183
|
+
* @memberof IApiMDControlState
|
|
184
|
+
*/
|
|
185
|
+
isSelectedAll: boolean;
|
|
178
186
|
}
|
|
179
187
|
|
|
180
188
|
/**
|
|
@@ -80,6 +80,21 @@ export abstract class PlatformProviderBase implements IPlatformProvider {
|
|
|
80
80
|
*/
|
|
81
81
|
async backendExport(args: IBackendExportParams): Promise<boolean> {
|
|
82
82
|
const { baseURL, url, method, params, data, newWindow } = args;
|
|
83
|
+
|
|
84
|
+
// 规范化参数
|
|
85
|
+
if (
|
|
86
|
+
data &&
|
|
87
|
+
Object.prototype.hasOwnProperty.call(data, 'srfexportdataset')
|
|
88
|
+
) {
|
|
89
|
+
delete data.srfexportdataset;
|
|
90
|
+
}
|
|
91
|
+
if (
|
|
92
|
+
data &&
|
|
93
|
+
Object.prototype.hasOwnProperty.call(data, 'srfexportdatakey')
|
|
94
|
+
) {
|
|
95
|
+
delete data.srfexportdatakey;
|
|
96
|
+
}
|
|
97
|
+
|
|
83
98
|
const response = await (ibiz.net.request(url, {
|
|
84
99
|
data,
|
|
85
100
|
method,
|
|
@@ -14,14 +14,20 @@ export class MDControlService<
|
|
|
14
14
|
* @date 2022-08-31 17:08:41
|
|
15
15
|
* @param {IContext} context 上下文
|
|
16
16
|
* @param {IParams} [params={}] 视图参数
|
|
17
|
+
* @param {IParams} [args={}] 额外参数
|
|
17
18
|
* @returns {*} {Promise<IHttpResponse>}
|
|
18
19
|
*/
|
|
19
20
|
async fetch(
|
|
20
21
|
context: IContext,
|
|
21
22
|
params: IParams = {},
|
|
23
|
+
args: IParams = {},
|
|
22
24
|
): Promise<IHttpResponse<ControlVO[]>> {
|
|
23
|
-
|
|
25
|
+
let fetchAction =
|
|
24
26
|
this.model.fetchControlAction?.appDEMethodId || 'fetchdefault';
|
|
27
|
+
// 识别用户定义参数导出数据集合
|
|
28
|
+
if (args.srfexportdataset) {
|
|
29
|
+
fetchAction = args.srfexportdataset;
|
|
30
|
+
}
|
|
25
31
|
let res = await this.exec(fetchAction, context, params);
|
|
26
32
|
res = this.handleResponse(res);
|
|
27
33
|
return res as IHttpResponse<ControlVO[]>;
|
|
@@ -166,10 +172,16 @@ export class MDControlService<
|
|
|
166
172
|
context,
|
|
167
173
|
this.model.appDataEntityId!,
|
|
168
174
|
);
|
|
175
|
+
let tempFetchAction =
|
|
176
|
+
dataExport.appDEDataSetId ||
|
|
177
|
+
this.model.fetchControlAction!.appDEMethodId!;
|
|
178
|
+
// 识别用户定义的视图参数导出数据集合
|
|
179
|
+
if (params.srfexportdataset) {
|
|
180
|
+
tempFetchAction = params.srfexportdataset;
|
|
181
|
+
}
|
|
169
182
|
return entityService.file.export(
|
|
170
183
|
dataExport,
|
|
171
|
-
|
|
172
|
-
this.model.fetchControlAction!.appDEMethodId!,
|
|
184
|
+
tempFetchAction,
|
|
173
185
|
context,
|
|
174
186
|
params,
|
|
175
187
|
);
|
|
@@ -357,6 +357,28 @@ export class FrontUIActionProvider extends UIActionProviderBase {
|
|
|
357
357
|
...args.params,
|
|
358
358
|
...resultParams,
|
|
359
359
|
};
|
|
360
|
+
// 多项数据和多项数据主键如果没有选择全部界面参数则认为导出选中行
|
|
361
|
+
const { actionTarget } = action;
|
|
362
|
+
if (
|
|
363
|
+
(actionTarget === 'MULTIDATA' || actionTarget === 'MULTIKEY') &&
|
|
364
|
+
!args.params.srfallselected
|
|
365
|
+
) {
|
|
366
|
+
const srfexportdatakey = presetParams.srfexportdatakey || 'srfkey';
|
|
367
|
+
const tempParams = {};
|
|
368
|
+
if (args && args.data && args.data.length > 0) {
|
|
369
|
+
Object.assign(tempParams, {
|
|
370
|
+
srfkeys: args.data.map(data => data[srfexportdatakey]).join(','),
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
Object.assign(params, tempParams);
|
|
374
|
+
}
|
|
375
|
+
// 如果srfallselected存在需要删除,规范化参数
|
|
376
|
+
if (
|
|
377
|
+
params &&
|
|
378
|
+
Object.prototype.hasOwnProperty.call(params, 'srfallselected')
|
|
379
|
+
) {
|
|
380
|
+
delete params.srfallselected;
|
|
381
|
+
}
|
|
360
382
|
|
|
361
383
|
// 异步导出时只发消息不下载
|
|
362
384
|
if (isAsyncAction) {
|
|
@@ -406,6 +406,12 @@ export abstract class UIActionProviderBase implements IUIActionProvider {
|
|
|
406
406
|
delete resultParams.srfexportdataset;
|
|
407
407
|
}
|
|
408
408
|
|
|
409
|
+
// srfexportdatakey(指定数据导出传入数据主键属性)
|
|
410
|
+
if (resultParams.hasOwnProperty('srfexportdatakey')) {
|
|
411
|
+
presetParams.srfexportdatakey = resultParams.srfexportdatakey;
|
|
412
|
+
delete resultParams.srfexportdatakey;
|
|
413
|
+
}
|
|
414
|
+
|
|
409
415
|
// srfasyncaction(指定当前界面行为是否异步(目前仅数据导出使用))
|
|
410
416
|
if (resultParams.hasOwnProperty('srfasyncaction')) {
|
|
411
417
|
presetParams.srfasyncaction = resultParams.srfasyncaction;
|