@ibiz-template/runtime 0.7.41-alpha.116 → 0.7.41-alpha.118
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 +141 -39
- package/dist/index.system.min.js +1 -1
- package/out/controller/common/control/md-control.controller.d.ts +4 -3
- package/out/controller/common/control/md-control.controller.d.ts.map +1 -1
- package/out/controller/common/control/md-control.controller.js +2 -1
- package/out/controller/control/grid/grid/grid.controller.d.ts +3 -2
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +28 -7
- 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 +28 -7
- package/out/controller/control/toolbar/toolbar.controller.d.ts.map +1 -1
- package/out/controller/control/toolbar/toolbar.controller.js +33 -18
- package/out/interface/api/common/i-api-export-params.d.ts +24 -0
- package/out/interface/api/common/i-api-export-params.d.ts.map +1 -1
- package/out/interface/api/controller/control/i-api-tree-grid.controller.d.ts +3 -3
- package/out/interface/api/controller/control/i-api-tree-grid.controller.d.ts.map +1 -1
- 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/interface/controller/controller/control/i-grid.controller.d.ts +3 -3
- package/out/interface/controller/controller/control/i-grid.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-md-control.controller.d.ts +4 -3
- package/out/interface/controller/controller/control/i-md-control.controller.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 +34 -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 +7 -2
- package/src/controller/control/grid/grid/grid.controller.ts +38 -7
- package/src/controller/control/md-ctrl/md-ctrl.controller.ts +36 -6
- package/src/controller/control/toolbar/toolbar.controller.ts +41 -21
- package/src/interface/api/common/i-api-export-params.ts +28 -0
- package/src/interface/api/controller/control/i-api-tree-grid.controller.ts +2 -2
- package/src/interface/api/state/control/i-api-md-control.state.ts +8 -0
- package/src/interface/controller/controller/control/i-grid.controller.ts +3 -3
- package/src/interface/controller/controller/control/i-md-control.controller.ts +6 -2
- 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 +37 -0
- package/src/ui-action/provider/ui-action-provider-base.ts +6 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"md-control.service.d.ts","sourceRoot":"","sources":["../../../../src/service/service/control/md-control.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBAAa,gBAAgB,CAC3B,CAAC,SAAS,cAAc,GAAG,cAAc,CACzC,SAAQ,cAAc,CAAC,CAAC,CAAC;IACzB
|
|
1
|
+
{"version":3,"file":"md-control.service.d.ts","sourceRoot":"","sources":["../../../../src/service/service/control/md-control.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBAAa,gBAAgB,CAC3B,CAAC,SAAS,cAAc,GAAG,cAAc,CACzC,SAAQ,cAAc,CAAC,CAAC,CAAC;IACzB;;;;;;;;;OASG;IACG,KAAK,CACT,OAAO,EAAE,QAAQ,EACjB,MAAM,GAAE,OAAY,EACpB,IAAI,GAAE,OAAY,GACjB,OAAO,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC,CAAC;IAYtC;;;;;;;;OAQG;IACG,GAAG,CACP,OAAO,EAAE,QAAQ,EACjB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAOpC;;;;;;;;OAQG;IACG,QAAQ,CACZ,OAAO,EAAE,QAAQ,EACjB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAQpC;;;;;;;;OAQG;IACG,MAAM,CACV,OAAO,EAAE,QAAQ,EACjB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,aAAa,CAAC;IAOzB;;;;;;;;OAQG;IACG,MAAM,CACV,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,SAAS,GACd,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAQpC;;;;;;;;OAQG;IACG,MAAM,CACV,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,SAAS,GACd,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAQpC;;;;;;;;OAQG;IACG,WAAW,CACf,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,SAAS,EAAE,GAChB,OAAO,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC,CAAC;IAYtC;;;;;;;OAOG;IACG,UAAU,CACd,UAAU,EAAE,gBAAgB,EAC5B,OAAO,EAAE,QAAQ,EACjB,MAAM,GAAE,OAAY,GACnB,OAAO,CAAC,OAAO,CAAC;IAoBnB;;;;;;;OAOG;IACH,cAAc,CAAC,QAAQ,EAAE,aAAa,GAAG,aAAa;CA8BvD"}
|
|
@@ -8,11 +8,16 @@ export class MDControlService extends ControlService {
|
|
|
8
8
|
* @date 2022-08-31 17:08:41
|
|
9
9
|
* @param {IContext} context 上下文
|
|
10
10
|
* @param {IParams} [params={}] 视图参数
|
|
11
|
+
* @param {IParams} [args={}] 额外参数
|
|
11
12
|
* @returns {*} {Promise<IHttpResponse>}
|
|
12
13
|
*/
|
|
13
|
-
async fetch(context, params = {}) {
|
|
14
|
+
async fetch(context, params = {}, args = {}) {
|
|
14
15
|
var _a;
|
|
15
|
-
|
|
16
|
+
let fetchAction = ((_a = this.model.fetchControlAction) === null || _a === void 0 ? void 0 : _a.appDEMethodId) || 'fetchdefault';
|
|
17
|
+
// 识别用户定义参数导出数据集合
|
|
18
|
+
if (args.srfexportdataset) {
|
|
19
|
+
fetchAction = args.srfexportdataset;
|
|
20
|
+
}
|
|
16
21
|
let res = await this.exec(fetchAction, context, params);
|
|
17
22
|
res = this.handleResponse(res);
|
|
18
23
|
return res;
|
|
@@ -122,8 +127,13 @@ export class MDControlService extends ControlService {
|
|
|
122
127
|
*/
|
|
123
128
|
async exportData(dataExport, context, params = {}) {
|
|
124
129
|
const entityService = await this.app.deService.getService(context, this.model.appDataEntityId);
|
|
125
|
-
|
|
126
|
-
this.model.fetchControlAction.appDEMethodId
|
|
130
|
+
let tempFetchAction = dataExport.appDEDataSetId ||
|
|
131
|
+
this.model.fetchControlAction.appDEMethodId;
|
|
132
|
+
// 识别用户定义的视图参数导出数据集合
|
|
133
|
+
if (params.srfexportdataset) {
|
|
134
|
+
tempFetchAction = params.srfexportdataset;
|
|
135
|
+
}
|
|
136
|
+
return entityService.file.export(dataExport, tempFetchAction, context, params);
|
|
127
137
|
}
|
|
128
138
|
/**
|
|
129
139
|
* 处理响应
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"front-ui-action-provider.d.ts","sourceRoot":"","sources":["../../../src/ui-action/provider/front-ui-action-provider.ts"],"names":[],"mappings":"AAOA,OAAO,EAEL,WAAW,EAEX,aAAa,EACb,cAAc,EACf,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAIL,cAAc,EACd,eAAe,EAEhB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAKjE;;;;;;GAMG;AACH,qBAAa,qBAAsB,SAAQ,oBAAoB;IACvD,UAAU,CACd,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,eAAe,CAAC;IAgG3B;;;;;;;;OAQG;cACa,OAAO,CACrB,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,eAAe,CAAC;IAkC3B;;;;;;OAMG;cACa,YAAY,CAC1B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,IAAI,CAAC;IAkEhB;;;;;;OAMG;cACa,iBAAiB,CAC/B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,eAAe,CAAC;IA6B3B;;;;;;OAMG;cACa,iBAAiB,CAC/B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"front-ui-action-provider.d.ts","sourceRoot":"","sources":["../../../src/ui-action/provider/front-ui-action-provider.ts"],"names":[],"mappings":"AAOA,OAAO,EAEL,WAAW,EAEX,aAAa,EACb,cAAc,EACf,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAIL,cAAc,EACd,eAAe,EAEhB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAKjE;;;;;;GAMG;AACH,qBAAa,qBAAsB,SAAQ,oBAAoB;IACvD,UAAU,CACd,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,eAAe,CAAC;IAgG3B;;;;;;;;OAQG;cACa,OAAO,CACrB,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,eAAe,CAAC;IAkC3B;;;;;;OAMG;cACa,YAAY,CAC1B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,IAAI,CAAC;IAkEhB;;;;;;OAMG;cACa,iBAAiB,CAC/B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,eAAe,CAAC;IA6B3B;;;;;;OAMG;cACa,iBAAiB,CAC/B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,IAAI,CAAC;IAiHhB;;;;;;;;OAQG;cACa,YAAY,CAC1B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,eAAe,CAAC;IA+D3B;;;;;;;;OAQG;cACa,aAAa,CAC3B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,eAAe,CAAC;IAuD3B;;;;;;;;OAQG;IACH,SAAS,CAAC,kBAAkB,CAC1B,SAAS,EAAE,WAAW,GAAG,SAAS,EAClC,WAAW,CAAC,EAAE,aAAa,GAC1B,WAAW,GAAG,SAAS;IAc1B;;;;;;;;OAQG;cACa,UAAU,CACxB,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,eAAe,CAAC;CA0B5B"}
|
|
@@ -243,6 +243,40 @@ export class FrontUIActionProvider extends UIActionProviderBase {
|
|
|
243
243
|
const params = Object.assign(Object.assign({ page: 0, size: appDEDataExport.maxRowCount
|
|
244
244
|
? appDEDataExport.maxRowCount
|
|
245
245
|
: ibiz.config.common.maxExportRowsDefault }, args.params), resultParams);
|
|
246
|
+
// 多项数据和多项数据主键如果没有选择全部界面参数则认为导出选中行
|
|
247
|
+
const { actionTarget } = action;
|
|
248
|
+
if ((actionTarget === 'MULTIDATA' || actionTarget === 'MULTIKEY') &&
|
|
249
|
+
args.view) {
|
|
250
|
+
const srfexportdatakey = presetParams.srfexportdatakey || 'srfkey';
|
|
251
|
+
if (!args.params.srfallselected) {
|
|
252
|
+
await args.view.call(SysUIActionTag.EXPORT_EXCEL, {
|
|
253
|
+
params: {
|
|
254
|
+
type: 'selectedRows',
|
|
255
|
+
srfexportdatakey,
|
|
256
|
+
srfexportdataset: exportDatasetCodeName,
|
|
257
|
+
srfdataexport: appDEDataExport,
|
|
258
|
+
srfdatatype: resultContext.srfdatatype,
|
|
259
|
+
},
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
await args.view.call(SysUIActionTag.EXPORT_EXCEL, {
|
|
264
|
+
params: {
|
|
265
|
+
type: 'maxRowCount',
|
|
266
|
+
srfexportdatakey,
|
|
267
|
+
srfexportdataset: exportDatasetCodeName,
|
|
268
|
+
srfdataexport: appDEDataExport,
|
|
269
|
+
srfdatatype: resultContext.srfdatatype,
|
|
270
|
+
},
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
// 如果srfallselected存在需要删除,规范化参数
|
|
276
|
+
if (params &&
|
|
277
|
+
Object.prototype.hasOwnProperty.call(params, 'srfallselected')) {
|
|
278
|
+
delete params.srfallselected;
|
|
279
|
+
}
|
|
246
280
|
// 异步导出时只发消息不下载
|
|
247
281
|
if (isAsyncAction) {
|
|
248
282
|
const app = await ibiz.hub.getAppAsync(action.appId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui-action-provider-base.d.ts","sourceRoot":"","sources":["../../../src/ui-action/provider/ui-action-provider-base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAgC,MAAM,kBAAkB,CAAC;AAChF,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAMzB;;;;;;;GAOG;AACH,8BAAsB,oBAAqB,YAAW,iBAAiB;IACrE;;;;;;;OAOG;IACG,IAAI,CACR,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,eAAe,CAAC;IA+H3B;;;;;;;;OAQG;IACH,SAAS,CAAC,iBAAiB,CACzB,IAAI,EAAE,cAAc,EACpB,MAAM,EAAE,eAAe,GACtB,cAAc;IASjB;;;;;;;;OAQG;IACH,SAAS,CAAC,WAAW,CACnB,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,eAAe,GACpB,eAAe;IAUlB;;;;;;;OAOG;IACG,SAAS,CACb,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,OAAO,CAAC;IAWnB;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,UAAU,CACjB,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,eAAe,CAAC;IAE3B;;;;;;;;;;;OAWG;IACG,YAAY,CAChB,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAOvC;;;;;;;;;;;;;;;;OAgBG;cACa,YAAY,CAC1B,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EAAE,EACb,MAAM,EAAE,OAAO,GACd,OAAO,CAAC;QACT,aAAa,EAAE,QAAQ,CAAC;QACxB,UAAU,EAAE,KAAK,EAAE,CAAC;QACpB,YAAY,EAAE,OAAO,CAAC;QACtB,YAAY,EAAE,OAAO,CAAC;KACvB,CAAC;
|
|
1
|
+
{"version":3,"file":"ui-action-provider-base.d.ts","sourceRoot":"","sources":["../../../src/ui-action/provider/ui-action-provider-base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAgC,MAAM,kBAAkB,CAAC;AAChF,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,eAAe,EAChB,MAAM,iBAAiB,CAAC;AAMzB;;;;;;;GAOG;AACH,8BAAsB,oBAAqB,YAAW,iBAAiB;IACrE;;;;;;;OAOG;IACG,IAAI,CACR,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,eAAe,CAAC;IA+H3B;;;;;;;;OAQG;IACH,SAAS,CAAC,iBAAiB,CACzB,IAAI,EAAE,cAAc,EACpB,MAAM,EAAE,eAAe,GACtB,cAAc;IASjB;;;;;;;;OAQG;IACH,SAAS,CAAC,WAAW,CACnB,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,eAAe,GACpB,eAAe;IAUlB;;;;;;;OAOG;IACG,SAAS,CACb,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,OAAO,CAAC;IAWnB;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,UAAU,CACjB,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,eAAe,CAAC;IAE3B;;;;;;;;;;;OAWG;IACG,YAAY,CAChB,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAOvC;;;;;;;;;;;;;;;;OAgBG;cACa,YAAY,CAC1B,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,KAAK,EAAE,EACb,MAAM,EAAE,OAAO,GACd,OAAO,CAAC;QACT,aAAa,EAAE,QAAQ,CAAC;QACxB,UAAU,EAAE,KAAK,EAAE,CAAC;QACpB,YAAY,EAAE,OAAO,CAAC;QACtB,YAAY,EAAE,OAAO,CAAC;KACvB,CAAC;IAwIF;;;;;;;;;OASG;IACH,SAAS,CAAC,WAAW,CACnB,IAAI,EAAE,SAAS,GAAG,SAAS,EAC3B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,cAAc,GACnB,MAAM,GAAG,SAAS;IA4CrB;;;;;;;;OAQG;IACH,sBAAsB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK;CAc5C"}
|
|
@@ -276,6 +276,11 @@ export class UIActionProviderBase {
|
|
|
276
276
|
presetParams.srfexportdataset = resultParams.srfexportdataset;
|
|
277
277
|
delete resultParams.srfexportdataset;
|
|
278
278
|
}
|
|
279
|
+
// srfexportdatakey(指定数据导出传入数据主键属性)
|
|
280
|
+
if (resultParams.hasOwnProperty('srfexportdatakey')) {
|
|
281
|
+
presetParams.srfexportdatakey = resultParams.srfexportdatakey;
|
|
282
|
+
delete resultParams.srfexportdatakey;
|
|
283
|
+
}
|
|
279
284
|
// srfasyncaction(指定当前界面行为是否异步(目前仅数据导出使用))
|
|
280
285
|
if (resultParams.hasOwnProperty('srfasyncaction')) {
|
|
281
286
|
presetParams.srfasyncaction = resultParams.srfasyncaction;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/runtime",
|
|
3
|
-
"version": "0.7.41-alpha.
|
|
3
|
+
"version": "0.7.41-alpha.118",
|
|
4
4
|
"description": "运行时逻辑库",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "out/index.js",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"jsencrypt": "^3.3.2"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@ibiz-template/core": "^0.7.41-alpha.
|
|
43
|
-
"@ibiz/model-core": "^0.1.
|
|
42
|
+
"@ibiz-template/core": "^0.7.41-alpha.117",
|
|
43
|
+
"@ibiz/model-core": "^0.1.89",
|
|
44
44
|
"@types/animejs": "^3.1.12",
|
|
45
45
|
"@types/path-browserify": "^1.0.2",
|
|
46
46
|
"@types/qs": "^6.9.11",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"@ibiz-template/core": "^0.6.0",
|
|
61
|
-
"@ibiz/model-core": "^0.1.
|
|
61
|
+
"@ibiz/model-core": "^0.1.89",
|
|
62
62
|
"async-validator": "^4.2.5",
|
|
63
63
|
"dayjs": "^1.11.7",
|
|
64
64
|
"echarts": "^5.4.3",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"qx-util": "^0.4.8",
|
|
71
71
|
"ramda": "^0.29.0"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "6e2a655f863bd0aa39183fd376020560aae9c479"
|
|
74
74
|
}
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
MDCtrlRemoveParams,
|
|
25
25
|
IToolbarController,
|
|
26
26
|
IMDControlController,
|
|
27
|
+
IApiExportParams,
|
|
27
28
|
} from '../../../interface';
|
|
28
29
|
import { calcDeCodeNameById } from '../../../model';
|
|
29
30
|
import { MDControlService, Srfuf } from '../../../service';
|
|
@@ -187,6 +188,7 @@ export class MDControlController<
|
|
|
187
188
|
this.state.groups = [];
|
|
188
189
|
this.state.hideNoDataImage = false;
|
|
189
190
|
this.state.enableGroup = !!(this.model as IData).enableGroup;
|
|
191
|
+
this.state.isSelectedAll = false;
|
|
190
192
|
}
|
|
191
193
|
|
|
192
194
|
/**
|
|
@@ -873,11 +875,14 @@ export class MDControlController<
|
|
|
873
875
|
/**
|
|
874
876
|
* 数据导出
|
|
875
877
|
*
|
|
876
|
-
* @param {MouseEvent}
|
|
878
|
+
* @param {{ event?: MouseEvent; params?: IApiExportParams }} _args 导出参数
|
|
877
879
|
* @returns {*} {Promise<void>}
|
|
878
880
|
* @memberof MDControlController
|
|
879
881
|
*/
|
|
880
|
-
async exportData(_args: {
|
|
882
|
+
async exportData(_args: {
|
|
883
|
+
event?: MouseEvent;
|
|
884
|
+
params?: IApiExportParams;
|
|
885
|
+
}): Promise<void> {
|
|
881
886
|
// const { dataExport, appEntity } = this.model;
|
|
882
887
|
// if (!dataExport) {
|
|
883
888
|
// throw new DefectModelError(this.model.source, '没有配置实体导出模型!');
|
|
@@ -1571,10 +1571,14 @@ export class GridController<
|
|
|
1571
1571
|
* @author zk
|
|
1572
1572
|
* @date 2023-07-20 04:07:49
|
|
1573
1573
|
* @param {MDCtrlLoadParams} args
|
|
1574
|
+
* @param {IParams} [fetchArgs={}] 透传给 service.fetch 的额外参数,如 srfexportdataset
|
|
1574
1575
|
* @return {*}
|
|
1575
1576
|
* @memberof GridController
|
|
1576
1577
|
*/
|
|
1577
|
-
async loadData(
|
|
1578
|
+
async loadData(
|
|
1579
|
+
args: MDCtrlLoadParams,
|
|
1580
|
+
fetchArgs: IParams = {},
|
|
1581
|
+
): Promise<ControlVO[]> {
|
|
1578
1582
|
// *查询参数处理
|
|
1579
1583
|
const { context } = this.handlerAbilityParams(args);
|
|
1580
1584
|
const params = await this.getFetchParams(args?.viewParam);
|
|
@@ -1582,7 +1586,7 @@ export class GridController<
|
|
|
1582
1586
|
// *发起请求
|
|
1583
1587
|
await this.startLoading();
|
|
1584
1588
|
try {
|
|
1585
|
-
res = await this.service.fetch(context, params);
|
|
1589
|
+
res = await this.service.fetch(context, params, fetchArgs);
|
|
1586
1590
|
} finally {
|
|
1587
1591
|
await this.endLoading();
|
|
1588
1592
|
}
|
|
@@ -1786,7 +1790,14 @@ export class GridController<
|
|
|
1786
1790
|
ibiz.config.common.maxExportRowsDefault,
|
|
1787
1791
|
page: 0,
|
|
1788
1792
|
};
|
|
1789
|
-
|
|
1793
|
+
// 识别用户定义的视图参数导出数据集合
|
|
1794
|
+
data = await this.loadData(
|
|
1795
|
+
{ viewParam },
|
|
1796
|
+
{
|
|
1797
|
+
srfexportdataset:
|
|
1798
|
+
params.srfexportdataset || this.params.srfexportdataset,
|
|
1799
|
+
},
|
|
1800
|
+
);
|
|
1790
1801
|
} else if (type === 'selectedRows') {
|
|
1791
1802
|
data = this.getData();
|
|
1792
1803
|
}
|
|
@@ -1803,6 +1814,11 @@ export class GridController<
|
|
|
1803
1814
|
* @param params 额外参数
|
|
1804
1815
|
*/
|
|
1805
1816
|
async excuteBackendExport(params: IApiExportParams): Promise<void> {
|
|
1817
|
+
// 构建导出模型
|
|
1818
|
+
let tempDataExport = this.dataExport;
|
|
1819
|
+
if (params.srfdataexport) {
|
|
1820
|
+
tempDataExport = params.srfdataexport as IAppDEDataExport;
|
|
1821
|
+
}
|
|
1806
1822
|
// 准备参数
|
|
1807
1823
|
const fetchParams = await this.getFetchParams({ ...this.params });
|
|
1808
1824
|
let tempParams: IParams = {};
|
|
@@ -1820,9 +1836,12 @@ export class GridController<
|
|
|
1820
1836
|
ibiz.i18n.t('runtime.controller.control.grid.exported'),
|
|
1821
1837
|
);
|
|
1822
1838
|
}
|
|
1839
|
+
// 用户通过视图参数srfexportdatakey指定导出选中数据的数据主键属性
|
|
1840
|
+
const srfexportdatakey =
|
|
1841
|
+
params.srfexportdatakey || this.params.srfexportdatakey || 'srfkey';
|
|
1823
1842
|
tempParams = {
|
|
1824
1843
|
page: 0,
|
|
1825
|
-
srfkeys: selectedData.map(data => data
|
|
1844
|
+
srfkeys: selectedData.map(data => data[srfexportdatakey]).join(','),
|
|
1826
1845
|
};
|
|
1827
1846
|
} else if (type === 'maxRowCount' || type === 'customPage') {
|
|
1828
1847
|
const { size } = this.state;
|
|
@@ -1836,14 +1855,26 @@ export class GridController<
|
|
|
1836
1855
|
}
|
|
1837
1856
|
: {
|
|
1838
1857
|
size:
|
|
1839
|
-
|
|
1858
|
+
tempDataExport?.maxRowCount ||
|
|
1840
1859
|
ibiz.config.common.maxExportRowsDefault,
|
|
1841
1860
|
page: 0,
|
|
1842
1861
|
};
|
|
1843
1862
|
}
|
|
1863
|
+
// 自定义导出数据集,优先使用外部传入,避免被上面分支的整体赋值覆盖
|
|
1864
|
+
if (params.srfexportdataset) {
|
|
1865
|
+
tempParams.srfexportdataset = params.srfexportdataset;
|
|
1866
|
+
}
|
|
1844
1867
|
Object.assign(fetchParams, tempParams);
|
|
1868
|
+
|
|
1869
|
+
// 构建上下文
|
|
1870
|
+
const tempContext = clone(this.context);
|
|
1871
|
+
if (params.srfdatatype) {
|
|
1872
|
+
Object.assign(tempContext, {
|
|
1873
|
+
srfdatatype: params.srfdatatype,
|
|
1874
|
+
});
|
|
1875
|
+
}
|
|
1845
1876
|
// 执行导出
|
|
1846
|
-
await this.service.exportData(
|
|
1877
|
+
await this.service.exportData(tempDataExport!, tempContext, fetchParams);
|
|
1847
1878
|
}
|
|
1848
1879
|
|
|
1849
1880
|
/**
|
|
@@ -1854,7 +1885,7 @@ export class GridController<
|
|
|
1854
1885
|
*/
|
|
1855
1886
|
async exportData(args: {
|
|
1856
1887
|
params: IApiExportParams;
|
|
1857
|
-
event
|
|
1888
|
+
event?: MouseEvent;
|
|
1858
1889
|
}): Promise<void> {
|
|
1859
1890
|
if (this.dataExport?.enableBackend) {
|
|
1860
1891
|
await this.excuteBackendExport(args.params);
|
|
@@ -645,10 +645,14 @@ export class MDCtrlController
|
|
|
645
645
|
/**
|
|
646
646
|
* @description 加载数据(只加载数据 不做其他操作)
|
|
647
647
|
* @param {MDCtrlLoadParams} args
|
|
648
|
+
* @param {IParams} [fetchArgs={}] 透传给 service.fetch 的额外参数,如 srfexportdataset
|
|
648
649
|
* @returns {*} {Promise<IData[]>}
|
|
649
650
|
* @memberof MDCtrlController
|
|
650
651
|
*/
|
|
651
|
-
async loadData(
|
|
652
|
+
async loadData(
|
|
653
|
+
args: MDCtrlLoadParams,
|
|
654
|
+
fetchArgs: IParams = {},
|
|
655
|
+
): Promise<IData[]> {
|
|
652
656
|
// *查询参数处理
|
|
653
657
|
const { context } = this.handlerAbilityParams(args);
|
|
654
658
|
const params = await this.getFetchParams(args?.viewParam);
|
|
@@ -656,7 +660,7 @@ export class MDCtrlController
|
|
|
656
660
|
// *发起请求
|
|
657
661
|
await this.startLoading();
|
|
658
662
|
try {
|
|
659
|
-
res = await this.service.fetch(context, params);
|
|
663
|
+
res = await this.service.fetch(context, params, fetchArgs);
|
|
660
664
|
} finally {
|
|
661
665
|
await this.endLoading();
|
|
662
666
|
}
|
|
@@ -691,7 +695,14 @@ export class MDCtrlController
|
|
|
691
695
|
ibiz.config.common.maxExportRowsDefault,
|
|
692
696
|
page: 0,
|
|
693
697
|
};
|
|
694
|
-
|
|
698
|
+
// 识别用户定义的视图参数导出数据集合
|
|
699
|
+
data = await this.loadData(
|
|
700
|
+
{ viewParam },
|
|
701
|
+
{
|
|
702
|
+
srfexportdataset:
|
|
703
|
+
params.srfexportdataset || this.params.srfexportdataset,
|
|
704
|
+
},
|
|
705
|
+
);
|
|
695
706
|
} else if (type === 'selectedRows') {
|
|
696
707
|
data = this.getData();
|
|
697
708
|
}
|
|
@@ -760,6 +771,11 @@ export class MDCtrlController
|
|
|
760
771
|
* @memberof MDCtrlController
|
|
761
772
|
*/
|
|
762
773
|
async excuteBackendExport(params: IApiExportParams): Promise<void> {
|
|
774
|
+
// 构建导出模型
|
|
775
|
+
let tempDataExport = this.dataExport;
|
|
776
|
+
if (params.srfdataexport) {
|
|
777
|
+
tempDataExport = params.srfdataexport as IAppDEDataExport;
|
|
778
|
+
}
|
|
763
779
|
// 准备参数
|
|
764
780
|
const fetchParams = await this.getFetchParams({ ...this.params });
|
|
765
781
|
let tempParams: IParams = {};
|
|
@@ -777,9 +793,12 @@ export class MDCtrlController
|
|
|
777
793
|
ibiz.i18n.t('runtime.controller.common.md.exported'),
|
|
778
794
|
);
|
|
779
795
|
}
|
|
796
|
+
// 用户通过视图参数srfexportdatakey指定导出选中数据的数据主键属性
|
|
797
|
+
const srfexportdatakey =
|
|
798
|
+
params.srfexportdatakey || this.params.srfexportdatakey || 'srfkey';
|
|
780
799
|
tempParams = {
|
|
781
800
|
page: 0,
|
|
782
|
-
srfkeys: selectedData.map(data => data
|
|
801
|
+
srfkeys: selectedData.map(data => data[srfexportdatakey]).join(','),
|
|
783
802
|
};
|
|
784
803
|
} else if (type === 'maxRowCount' || type === 'customPage') {
|
|
785
804
|
const { size } = this.state;
|
|
@@ -793,14 +812,25 @@ export class MDCtrlController
|
|
|
793
812
|
}
|
|
794
813
|
: {
|
|
795
814
|
size:
|
|
796
|
-
|
|
815
|
+
tempDataExport?.maxRowCount ||
|
|
797
816
|
ibiz.config.common.maxExportRowsDefault,
|
|
798
817
|
page: 0,
|
|
799
818
|
};
|
|
800
819
|
}
|
|
820
|
+
// 自定义导出数据集,优先使用外部传入,避免被上面分支的整体赋值覆盖
|
|
821
|
+
if (params.srfexportdataset) {
|
|
822
|
+
tempParams.srfexportdataset = params.srfexportdataset;
|
|
823
|
+
}
|
|
801
824
|
Object.assign(fetchParams, tempParams);
|
|
825
|
+
// 构建上下文
|
|
826
|
+
const tempContext = clone(this.context);
|
|
827
|
+
if (params.srfdatatype) {
|
|
828
|
+
Object.assign(tempContext, {
|
|
829
|
+
srfdatatype: params.srfdatatype,
|
|
830
|
+
});
|
|
831
|
+
}
|
|
802
832
|
// 执行导出
|
|
803
|
-
await this.service.exportData(
|
|
833
|
+
await this.service.exportData(tempDataExport!, tempContext, fetchParams);
|
|
804
834
|
}
|
|
805
835
|
|
|
806
836
|
/**
|
|
@@ -228,9 +228,18 @@ export class ToolbarController<
|
|
|
228
228
|
*/
|
|
229
229
|
async getToolbarEventArgs(): Promise<Omit<EventBase, 'eventName'>> {
|
|
230
230
|
const result = this.getEventArgs();
|
|
231
|
+
const newParams = {
|
|
232
|
+
...result.params,
|
|
233
|
+
};
|
|
231
234
|
let data: IData[] = [];
|
|
232
235
|
if (this.xdataControl) {
|
|
233
236
|
data = this.xdataControl?.getData() || [];
|
|
237
|
+
// 数据导出界面行为需要界面是否选择全部状态,选择全部则导出全部,否则按选中数据导出
|
|
238
|
+
if ((this.xdataControl as IData).state?.isSelectedAll) {
|
|
239
|
+
Object.assign(newParams, {
|
|
240
|
+
srfallselected: true,
|
|
241
|
+
});
|
|
242
|
+
}
|
|
234
243
|
} else {
|
|
235
244
|
data = (await this.ctx.view.call(ViewCallTag.GET_DATA)) || [];
|
|
236
245
|
}
|
|
@@ -238,6 +247,7 @@ export class ToolbarController<
|
|
|
238
247
|
...result,
|
|
239
248
|
data,
|
|
240
249
|
ctrl: this,
|
|
250
|
+
params: newParams,
|
|
241
251
|
};
|
|
242
252
|
}
|
|
243
253
|
|
|
@@ -460,6 +470,8 @@ export class ToolbarController<
|
|
|
460
470
|
appDeId?: string,
|
|
461
471
|
_params: IParams = {},
|
|
462
472
|
): Promise<void> {
|
|
473
|
+
const app = await ibiz.hub.getApp(this.context.srfappid);
|
|
474
|
+
|
|
463
475
|
let _data = data;
|
|
464
476
|
if (data && data instanceof ControlVO) {
|
|
465
477
|
_data = data.getOrigin();
|
|
@@ -477,23 +489,23 @@ export class ToolbarController<
|
|
|
477
489
|
itemState.visible = false;
|
|
478
490
|
}
|
|
479
491
|
});
|
|
480
|
-
|
|
481
|
-
if (
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
this.
|
|
492
|
-
(
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
492
|
+
const logicParams: IData = {};
|
|
493
|
+
if (_params) {
|
|
494
|
+
Object.assign(logicParams, { ..._params });
|
|
495
|
+
}
|
|
496
|
+
if (_data) {
|
|
497
|
+
logicParams.data = [_data];
|
|
498
|
+
}
|
|
499
|
+
// 遍历所有的项
|
|
500
|
+
recursiveIterate(
|
|
501
|
+
this.model,
|
|
502
|
+
(item: IDEToolbarItem) => {
|
|
503
|
+
const itemState = this.state.buttonsState[item.id!] as IButtonState;
|
|
504
|
+
if (!itemState) {
|
|
505
|
+
return;
|
|
506
|
+
}
|
|
507
|
+
// 计算菜单项逻辑的预置逻辑
|
|
508
|
+
if (this.scheduler) {
|
|
497
509
|
// 计算项显示逻辑
|
|
498
510
|
if (itemState.visible) {
|
|
499
511
|
const dynaVisible = this.scheduler!.triggerItemVisible(
|
|
@@ -515,10 +527,18 @@ export class ToolbarController<
|
|
|
515
527
|
itemState.disabled = !dynaEnable;
|
|
516
528
|
}
|
|
517
529
|
}
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
// 如果有统一资源且当前项显示,无权限则隐藏
|
|
533
|
+
if (item.accessKey && itemState.visible) {
|
|
534
|
+
const permitted = app.authority.calcByResCode(item.accessKey);
|
|
535
|
+
if (!permitted) {
|
|
536
|
+
itemState.visible = false;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
{ childrenFields: ['detoolbarItems'] },
|
|
541
|
+
);
|
|
522
542
|
this.state.hideSeparator = formatSeparator(
|
|
523
543
|
'TOOLBAR',
|
|
524
544
|
this.model.detoolbarItems,
|
|
@@ -24,4 +24,32 @@ export interface IApiExportParams {
|
|
|
24
24
|
* @memberof IApiExportParams
|
|
25
25
|
*/
|
|
26
26
|
endPage?: number;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @description 自定义导出数据主键属性
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof IApiExportParams
|
|
32
|
+
*/
|
|
33
|
+
srfexportdatakey?: string;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @description 自定义导出数据集
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof IApiExportParams
|
|
39
|
+
*/
|
|
40
|
+
srfexportdataset?: string;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @description 自定义导出模型对象
|
|
44
|
+
* @type {IData}
|
|
45
|
+
* @memberof IApiExportParams
|
|
46
|
+
*/
|
|
47
|
+
srfdataexport?: IData;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @description 自定义导出数据类型
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof IApiExportParams
|
|
53
|
+
*/
|
|
54
|
+
srfdatatype?: string;
|
|
27
55
|
}
|
|
@@ -37,9 +37,9 @@ export interface IApiTreeGridController<
|
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* @description 数据导出
|
|
40
|
-
* @param {{ event
|
|
40
|
+
* @param {{ event?: MouseEvent; params?: IApiExportParams }} _args 导出参数
|
|
41
41
|
* @returns {*} {Promise<void>}
|
|
42
42
|
* @memberof IApiTreeGridController
|
|
43
43
|
*/
|
|
44
|
-
exportData(_args: {event
|
|
44
|
+
exportData(_args: {event?: MouseEvent;params?: IApiExportParams}): Promise<void>;
|
|
45
45
|
}
|
|
@@ -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
|
/**
|
|
@@ -58,13 +58,13 @@ export interface IGridController<
|
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* @description 导出数据
|
|
61
|
-
* @param {{ event
|
|
61
|
+
* @param {{ event?: MouseEvent; params: IApiExportParams }} args
|
|
62
62
|
* @returns {*} {Promise<void>}
|
|
63
63
|
* @memberof IGridController
|
|
64
64
|
*/
|
|
65
65
|
exportData(args: {
|
|
66
|
-
event
|
|
67
|
-
params
|
|
66
|
+
event?: MouseEvent;
|
|
67
|
+
params?: IApiExportParams;
|
|
68
68
|
}): Promise<void>;
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
IApiMDControlController,
|
|
8
8
|
IApiMDCtrlLoadParams,
|
|
9
9
|
IApiMDCtrlRemoveParams,
|
|
10
|
+
IApiExportParams,
|
|
10
11
|
} from '../../../api';
|
|
11
12
|
import { IViewController } from '../view';
|
|
12
13
|
/**
|
|
@@ -69,9 +70,12 @@ export interface IMDControlController<
|
|
|
69
70
|
|
|
70
71
|
/**
|
|
71
72
|
* @description 导出数据
|
|
72
|
-
* @param {{ event
|
|
73
|
+
* @param {{ event?: MouseEvent; params?: IApiExportParams }} _args
|
|
73
74
|
* @returns {*} {Promise<void>}
|
|
74
75
|
* @memberof IMDControlController
|
|
75
76
|
*/
|
|
76
|
-
exportData(_args: {
|
|
77
|
+
exportData(_args: {
|
|
78
|
+
event?: MouseEvent;
|
|
79
|
+
params?: IApiExportParams;
|
|
80
|
+
}): Promise<void>;
|
|
77
81
|
}
|
|
@@ -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
|
);
|