@ibiz-template/runtime 0.7.41-alpha.20 → 0.7.41-alpha.21
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 +363 -91
- package/dist/index.system.min.js +1 -1
- package/out/config/global-config.d.ts +7 -1
- package/out/config/global-config.d.ts.map +1 -1
- package/out/config/global-config.js +11 -0
- package/out/controller/common/control/control.controller.d.ts +3 -3
- package/out/controller/common/control/control.controller.d.ts.map +1 -1
- package/out/controller/common/control/control.controller.js +2 -1
- package/out/controller/common/editor/editor.controller.d.ts +13 -0
- package/out/controller/common/editor/editor.controller.d.ts.map +1 -1
- package/out/controller/common/editor/editor.controller.js +26 -0
- package/out/controller/control/caption-bar/caption-bar.controller.d.ts.map +1 -1
- package/out/controller/control/caption-bar/caption-bar.controller.js +6 -1
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.d.ts +1 -1
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.js +5 -5
- package/out/controller/control/data-view/data-view.controller.d.ts.map +1 -1
- package/out/controller/control/data-view/data-view.controller.js +8 -8
- package/out/controller/control/form/form/form.controller.d.ts +12 -0
- package/out/controller/control/form/form/form.controller.d.ts.map +1 -1
- package/out/controller/control/form/form/form.controller.js +17 -0
- package/out/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.js +4 -3
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.js +4 -3
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid-column/grid-field-column/grid-field-column.controller.js +14 -12
- package/out/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.js +3 -1
- package/out/controller/control/list/list.controller.d.ts +7 -0
- package/out/controller/control/list/list.controller.d.ts.map +1 -1
- package/out/controller/control/list/list.controller.js +64 -7
- package/out/controller/control/search-bar/search-bar.controller.d.ts +29 -1
- package/out/controller/control/search-bar/search-bar.controller.d.ts.map +1 -1
- package/out/controller/control/search-bar/search-bar.controller.js +49 -0
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.d.ts +2 -2
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-node-column.controller.js +14 -12
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.d.ts +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.d.ts.map +1 -1
- package/out/controller/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-ua-column/tree-grid-ex-ua-column.controller.js +3 -1
- package/out/controller/control/wizard-panel/wizard-panel.controller.js +1 -1
- package/out/interface/api/common/global-config/i-api-global-config.d.ts +7 -0
- package/out/interface/api/common/global-config/i-api-global-config.d.ts.map +1 -1
- package/out/interface/api/common/global-config/i-api-global-mob-config.d.ts +22 -0
- package/out/interface/api/common/global-config/i-api-global-mob-config.d.ts.map +1 -0
- package/out/interface/api/common/global-config/i-api-global-mob-config.js +1 -0
- package/out/interface/api/common/global-config/i-api-global-view-config.d.ts +14 -0
- package/out/interface/api/common/global-config/i-api-global-view-config.d.ts.map +1 -1
- package/out/interface/api/common/global-config/index.d.ts +1 -0
- package/out/interface/api/common/global-config/index.d.ts.map +1 -1
- package/out/interface/api/controller/control/i-api-calendar-exp-bar.controller.d.ts +1 -0
- package/out/interface/api/controller/control/i-api-calendar-exp-bar.controller.d.ts.map +1 -1
- package/out/interface/api/controller/control/i-api-chart-exp-bar.controller.d.ts +1 -0
- package/out/interface/api/controller/control/i-api-chart-exp-bar.controller.d.ts.map +1 -1
- package/out/interface/api/controller/control/i-api-drtab.controller.d.ts +1 -1
- package/out/interface/api/controller/control/i-api-edit-form.controller.d.ts +2 -2
- package/out/interface/api/controller/control/i-api-exp-bar-control.controller.d.ts +1 -1
- package/out/interface/api/controller/control/i-api-form.controller.d.ts +6 -0
- package/out/interface/api/controller/control/i-api-form.controller.d.ts.map +1 -1
- package/out/interface/api/controller/control/i-api-search-bar.controller.d.ts +1 -1
- package/out/interface/api/controller/control/i-api-tree-exp-bar.controller.d.ts +1 -0
- package/out/interface/api/controller/control/i-api-tree-exp-bar.controller.d.ts.map +1 -1
- package/out/interface/api/controller/control/i-api-tree.controller.d.ts +1 -1
- package/out/interface/api/state/control/i-api-control.state.d.ts +7 -0
- package/out/interface/api/state/control/i-api-control.state.d.ts.map +1 -1
- package/out/interface/api/state/control/i-api-form.state.d.ts +5 -0
- package/out/interface/api/state/control/i-api-form.state.d.ts.map +1 -1
- package/out/interface/api/state/control/i-api-grid.state.d.ts +0 -7
- package/out/interface/api/state/control/i-api-grid.state.d.ts.map +1 -1
- package/out/interface/api/state/control/i-api-md-control.state.d.ts +1 -0
- package/out/interface/api/state/control/i-api-md-control.state.d.ts.map +1 -1
- package/out/interface/api/state/control/search-bar/i-api-search-bar.state.d.ts +2 -2
- package/out/interface/api/util/i-api-file-util.d.ts +23 -6
- package/out/interface/api/util/i-api-file-util.d.ts.map +1 -1
- package/out/interface/common/i-global-config/i-global-mob-config.d.ts +10 -0
- package/out/interface/common/i-global-config/i-global-mob-config.d.ts.map +1 -0
- package/out/interface/common/i-global-config/i-global-mob-config.js +1 -0
- package/out/interface/common/i-global-config/index.d.ts +1 -0
- package/out/interface/common/i-global-config/index.d.ts.map +1 -1
- package/out/interface/common/i-global-config/index.js +1 -0
- package/out/interface/common/index.d.ts +1 -1
- package/out/interface/common/index.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-search-bar.event.d.ts +1 -1
- package/out/interface/controller/state/control/search-bar/i-search-bar-group.d.ts +12 -0
- package/out/interface/controller/state/control/search-bar/i-search-bar-group.d.ts.map +1 -1
- package/out/model/utils/util.d.ts +8 -1
- package/out/model/utils/util.d.ts.map +1 -1
- package/out/model/utils/util.js +25 -0
- package/out/platform/provider/platform-provider-base.d.ts.map +1 -1
- package/out/platform/provider/platform-provider-base.js +5 -1
- package/out/service/utils/app-counter/app-counter.d.ts.map +1 -1
- package/out/service/utils/app-counter/app-counter.js +3 -1
- package/out/utils/file-util/download-ticket/download-ticket-util.d.ts +7 -1
- package/out/utils/file-util/download-ticket/download-ticket-util.d.ts.map +1 -1
- package/out/utils/file-util/download-ticket/download-ticket-util.js +28 -5
- package/out/utils/file-util/file-util.d.ts +41 -8
- package/out/utils/file-util/file-util.d.ts.map +1 -1
- package/out/utils/file-util/file-util.js +45 -15
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
|
@@ -19166,7 +19166,9 @@ var GlobalConfig = class {
|
|
|
19166
19166
|
expCacheMode: "TABEXPPANEL:",
|
|
19167
19167
|
disableHomeTabs: false,
|
|
19168
19168
|
mobShowPresetBack: true,
|
|
19169
|
-
|
|
19169
|
+
mobShowViewHeader: true,
|
|
19170
|
+
timeoutDuration: 5 * 60 * 1e3,
|
|
19171
|
+
onlyShowDataInfo: false
|
|
19170
19172
|
};
|
|
19171
19173
|
// 全局表格配置
|
|
19172
19174
|
this.grid = {
|
|
@@ -19258,6 +19260,15 @@ var GlobalConfig = class {
|
|
|
19258
19260
|
strictProtect: false,
|
|
19259
19261
|
ensureRelative: true
|
|
19260
19262
|
};
|
|
19263
|
+
/**
|
|
19264
|
+
* @description 全局移动端配置
|
|
19265
|
+
* @type {IGlobalMobConfig}
|
|
19266
|
+
* @memberof GlobalConfig
|
|
19267
|
+
*/
|
|
19268
|
+
this.mob = {
|
|
19269
|
+
mobShowAppTitle: true,
|
|
19270
|
+
mobHomeRouteMode: "default"
|
|
19271
|
+
};
|
|
19261
19272
|
}
|
|
19262
19273
|
};
|
|
19263
19274
|
|
|
@@ -20581,6 +20592,23 @@ function getCtrlTeleportParams(control) {
|
|
|
20581
20592
|
teleportFlag
|
|
20582
20593
|
};
|
|
20583
20594
|
}
|
|
20595
|
+
function getAllUIActionItems(details = []) {
|
|
20596
|
+
const actions = [];
|
|
20597
|
+
const addAction = (items) => {
|
|
20598
|
+
items.forEach((item) => {
|
|
20599
|
+
var _a3;
|
|
20600
|
+
if (item.detailType === "DEUIACTIONGROUP") {
|
|
20601
|
+
const childrenDetails = (_a3 = item.refUIActionGroup) == null ? void 0 : _a3.uiactionGroupDetails;
|
|
20602
|
+
if (childrenDetails == null ? void 0 : childrenDetails.length)
|
|
20603
|
+
addAction(childrenDetails);
|
|
20604
|
+
} else {
|
|
20605
|
+
actions.push(item);
|
|
20606
|
+
}
|
|
20607
|
+
});
|
|
20608
|
+
};
|
|
20609
|
+
addAction(details);
|
|
20610
|
+
return actions;
|
|
20611
|
+
}
|
|
20584
20612
|
|
|
20585
20613
|
// src/model/layout/layout.ts
|
|
20586
20614
|
import { isArray as isArray2, isObject, isString } from "lodash-es";
|
|
@@ -23741,7 +23769,9 @@ var PlatformProviderBase = class {
|
|
|
23741
23769
|
} else {
|
|
23742
23770
|
tabTitle = this.sourceTitle;
|
|
23743
23771
|
}
|
|
23744
|
-
if (
|
|
23772
|
+
if (ibiz.env.isMob && !ibiz.config.mob.mobShowAppTitle) {
|
|
23773
|
+
document.title = title || tabTitle;
|
|
23774
|
+
} else if (title) {
|
|
23745
23775
|
document.title = "".concat(tabTitle, " - ").concat(title);
|
|
23746
23776
|
} else {
|
|
23747
23777
|
document.title = tabTitle;
|
|
@@ -24043,6 +24073,7 @@ async function getAcItemProvider(model) {
|
|
|
24043
24073
|
import { IBizContext, RuntimeError as RuntimeError13 } from "@ibiz-template/core";
|
|
24044
24074
|
import { notNilEmpty as notNilEmpty5, QXEvent } from "qx-util";
|
|
24045
24075
|
import { clone as clone2 } from "ramda";
|
|
24076
|
+
import { toNumber } from "lodash-es";
|
|
24046
24077
|
var AppCounter = class {
|
|
24047
24078
|
/**
|
|
24048
24079
|
* Creates an instance of AppCounter.
|
|
@@ -24216,7 +24247,8 @@ var AppCounter = class {
|
|
|
24216
24247
|
* @return {*} {number}
|
|
24217
24248
|
*/
|
|
24218
24249
|
getCounter(tag) {
|
|
24219
|
-
|
|
24250
|
+
const value = this.data[tag.toLowerCase()] || 0;
|
|
24251
|
+
return toNumber(value);
|
|
24220
24252
|
}
|
|
24221
24253
|
/**
|
|
24222
24254
|
* 销毁计数器
|
|
@@ -37116,6 +37148,32 @@ var EditorController = class {
|
|
|
37116
37148
|
}
|
|
37117
37149
|
return ibiz.config.common.emptyShowMode === "PLACEHOLDER";
|
|
37118
37150
|
}
|
|
37151
|
+
/**
|
|
37152
|
+
* @description 获取下载凭证参数
|
|
37153
|
+
* @readonly
|
|
37154
|
+
* @type {{
|
|
37155
|
+
* appEntityTag?: string;
|
|
37156
|
+
* dataFieldTag?: string;
|
|
37157
|
+
* }}
|
|
37158
|
+
* @memberof EditorController
|
|
37159
|
+
*/
|
|
37160
|
+
get downloadTicketParams() {
|
|
37161
|
+
const downloadTicketParams = {};
|
|
37162
|
+
if (!this.model.editorParams) {
|
|
37163
|
+
return downloadTicketParams;
|
|
37164
|
+
}
|
|
37165
|
+
if (this.model.editorParams.appentitytag) {
|
|
37166
|
+
Object.assign(downloadTicketParams, {
|
|
37167
|
+
appEntityTag: this.model.editorParams.appentitytag
|
|
37168
|
+
});
|
|
37169
|
+
}
|
|
37170
|
+
if (this.model.editorParams.datafieldtag) {
|
|
37171
|
+
Object.assign(downloadTicketParams, {
|
|
37172
|
+
dataFieldTag: this.model.editorParams.datafieldtag
|
|
37173
|
+
});
|
|
37174
|
+
}
|
|
37175
|
+
return downloadTicketParams;
|
|
37176
|
+
}
|
|
37119
37177
|
/**
|
|
37120
37178
|
* @description 当前视图
|
|
37121
37179
|
* @readonly
|
|
@@ -37391,11 +37449,11 @@ var CodeListEditorController = class extends EditorController {
|
|
|
37391
37449
|
// src/controller/common/control/control.controller.ts
|
|
37392
37450
|
import {
|
|
37393
37451
|
HttpError as HttpError8,
|
|
37394
|
-
|
|
37452
|
+
StringUtil as StringUtil2,
|
|
37395
37453
|
IBizParams,
|
|
37454
|
+
IBizContext as IBizContext5,
|
|
37396
37455
|
NoticeError as NoticeError2,
|
|
37397
|
-
RuntimeError as RuntimeError31
|
|
37398
|
-
StringUtil as StringUtil2
|
|
37456
|
+
RuntimeError as RuntimeError31
|
|
37399
37457
|
} from "@ibiz-template/core";
|
|
37400
37458
|
import { clone as clone20, isNil as isNil24 } from "ramda";
|
|
37401
37459
|
import { notNilEmpty as notNilEmpty9 } from "qx-util";
|
|
@@ -37523,6 +37581,7 @@ var ControlController = class extends BaseController {
|
|
|
37523
37581
|
this.state.isLoading = false;
|
|
37524
37582
|
this.state.disabled = false;
|
|
37525
37583
|
this.state.maskOption = { mode: "BLANK" };
|
|
37584
|
+
this.state.zIndex = void 0;
|
|
37526
37585
|
}
|
|
37527
37586
|
async onCreated() {
|
|
37528
37587
|
var _a3;
|
|
@@ -46115,7 +46174,11 @@ var CaptionBarController = class extends ControlController {
|
|
|
46115
46174
|
await super.onCreated();
|
|
46116
46175
|
this.view.evt.on("onViewInfoChange", ({ caption: _caption, dataInfo }) => {
|
|
46117
46176
|
const { showDataInfoBar } = this.view.model;
|
|
46118
|
-
|
|
46177
|
+
if (ibiz.config.view.onlyShowDataInfo && dataInfo) {
|
|
46178
|
+
this.state.caption = dataInfo;
|
|
46179
|
+
} else {
|
|
46180
|
+
this.state.caption = "".concat(this.view.model.caption).concat(showDataInfoBar && dataInfo ? "-".concat(dataInfo) : "");
|
|
46181
|
+
}
|
|
46119
46182
|
this.setBrowserTabTitle();
|
|
46120
46183
|
});
|
|
46121
46184
|
this.view.evt.on("onDataChange", ({ dataArg }) => {
|
|
@@ -47031,10 +47094,10 @@ var CustomDashboardController = class {
|
|
|
47031
47094
|
// src/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.ts
|
|
47032
47095
|
import { merge } from "lodash-es";
|
|
47033
47096
|
import {
|
|
47034
|
-
|
|
47097
|
+
Namespace as Namespace2,
|
|
47035
47098
|
IBizParams as IBizParams2,
|
|
47036
|
-
|
|
47037
|
-
|
|
47099
|
+
IBizContext as IBizContext7,
|
|
47100
|
+
listenJSEvent
|
|
47038
47101
|
} from "@ibiz-template/core";
|
|
47039
47102
|
|
|
47040
47103
|
// src/controller/control/dashboard/portlet/portlet-part/portlet-part.state.ts
|
|
@@ -47310,11 +47373,11 @@ var PortletPartController = class {
|
|
|
47310
47373
|
async initActionStates() {
|
|
47311
47374
|
var _a3;
|
|
47312
47375
|
const { uiactionGroup } = this.model;
|
|
47313
|
-
if (!((_a3 = uiactionGroup == null ? void 0 : uiactionGroup.uiactionGroupDetails) == null ? void 0 : _a3.length))
|
|
47376
|
+
if (!((_a3 = uiactionGroup == null ? void 0 : uiactionGroup.uiactionGroupDetails) == null ? void 0 : _a3.length))
|
|
47314
47377
|
return;
|
|
47315
|
-
}
|
|
47316
47378
|
const containerState = new ButtonContainerState();
|
|
47317
|
-
uiactionGroup.uiactionGroupDetails
|
|
47379
|
+
const actions = getAllUIActionItems(uiactionGroup.uiactionGroupDetails);
|
|
47380
|
+
actions.forEach((detail) => {
|
|
47318
47381
|
const actionid = detail.uiactionId;
|
|
47319
47382
|
if (actionid) {
|
|
47320
47383
|
const buttonState = new UIActionButtonState(
|
|
@@ -48656,6 +48719,7 @@ var SearchBarController = class extends ControlController {
|
|
|
48656
48719
|
this.enableStorage = this.controlParams.storage === "true";
|
|
48657
48720
|
await this.initByEntitySchema();
|
|
48658
48721
|
await super.onCreated();
|
|
48722
|
+
await this.initCounter();
|
|
48659
48723
|
if (this.model.appDataEntityId) {
|
|
48660
48724
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
48661
48725
|
this.model.appDataEntityId,
|
|
@@ -49013,7 +49077,9 @@ var SearchBarController = class extends ControlController {
|
|
|
49013
49077
|
searchGroupData: {},
|
|
49014
49078
|
order: (index + 1) * 100,
|
|
49015
49079
|
defaultSelect: false,
|
|
49016
|
-
noEdit: true
|
|
49080
|
+
noEdit: true,
|
|
49081
|
+
counterId: item.counterId,
|
|
49082
|
+
counterMode: item.counterMode
|
|
49017
49083
|
};
|
|
49018
49084
|
if (item.data) {
|
|
49019
49085
|
try {
|
|
@@ -49351,6 +49417,54 @@ var SearchBarController = class extends ControlController {
|
|
|
49351
49417
|
}
|
|
49352
49418
|
}
|
|
49353
49419
|
}
|
|
49420
|
+
/**
|
|
49421
|
+
* @description 计算计数器显示状态
|
|
49422
|
+
* @param {(IBackendSearchBarGroup | ISearchBarGroup)} item
|
|
49423
|
+
* @returns {*} {boolean}
|
|
49424
|
+
* @memberof SearchBarController
|
|
49425
|
+
*/
|
|
49426
|
+
calcCountVisible(item) {
|
|
49427
|
+
if (!this.counter) {
|
|
49428
|
+
return true;
|
|
49429
|
+
}
|
|
49430
|
+
const { counterId, counterMode } = item;
|
|
49431
|
+
if (counterId) {
|
|
49432
|
+
const count = this.counter.getCounter(counterId);
|
|
49433
|
+
if (counterMode === 1 && count === 0) {
|
|
49434
|
+
return false;
|
|
49435
|
+
}
|
|
49436
|
+
}
|
|
49437
|
+
return true;
|
|
49438
|
+
}
|
|
49439
|
+
/**
|
|
49440
|
+
* @description 初始化计数器
|
|
49441
|
+
* @protected
|
|
49442
|
+
* @returns {*} {Promise<void>}
|
|
49443
|
+
* @memberof SearchBarController
|
|
49444
|
+
*/
|
|
49445
|
+
async initCounter() {
|
|
49446
|
+
const { appCounterRefs } = this.model;
|
|
49447
|
+
const appCounterRef = appCounterRefs == null ? void 0 : appCounterRefs[0];
|
|
49448
|
+
if (appCounterRef) {
|
|
49449
|
+
this.counter = await CounterService.getCounterByRef(
|
|
49450
|
+
appCounterRef,
|
|
49451
|
+
this.context,
|
|
49452
|
+
{ ...this.params }
|
|
49453
|
+
);
|
|
49454
|
+
}
|
|
49455
|
+
}
|
|
49456
|
+
/**
|
|
49457
|
+
* @description 监听组件销毁
|
|
49458
|
+
* @protected
|
|
49459
|
+
* @returns {*} {Promise<void>}
|
|
49460
|
+
* @memberof SearchBarController
|
|
49461
|
+
*/
|
|
49462
|
+
async onDestroyed() {
|
|
49463
|
+
await super.onDestroyed();
|
|
49464
|
+
if (this.counter) {
|
|
49465
|
+
this.counter.destroy();
|
|
49466
|
+
}
|
|
49467
|
+
}
|
|
49354
49468
|
};
|
|
49355
49469
|
|
|
49356
49470
|
// src/controller/control/dashboard/portlet/filter-portlet/filter-portlet.controller.ts
|
|
@@ -49665,12 +49779,14 @@ var DataViewControlController = class extends MDControlController {
|
|
|
49665
49779
|
async initGroupActionStates() {
|
|
49666
49780
|
var _a3;
|
|
49667
49781
|
const { groupUIActionGroup } = this.model;
|
|
49668
|
-
if (!((_a3 = groupUIActionGroup == null ? void 0 : groupUIActionGroup.uiactionGroupDetails) == null ? void 0 : _a3.length))
|
|
49782
|
+
if (!((_a3 = groupUIActionGroup == null ? void 0 : groupUIActionGroup.uiactionGroupDetails) == null ? void 0 : _a3.length))
|
|
49669
49783
|
return;
|
|
49670
|
-
}
|
|
49671
49784
|
this.state.groups.forEach(async (group) => {
|
|
49672
49785
|
const containerState = new ButtonContainerState();
|
|
49673
|
-
|
|
49786
|
+
const actions = getAllUIActionItems(
|
|
49787
|
+
groupUIActionGroup.uiactionGroupDetails
|
|
49788
|
+
);
|
|
49789
|
+
actions.forEach((detail) => {
|
|
49674
49790
|
const actionid = detail.uiactionId;
|
|
49675
49791
|
if (actionid) {
|
|
49676
49792
|
const buttonState = new UIActionButtonState(
|
|
@@ -49700,9 +49816,8 @@ var DataViewControlController = class extends MDControlController {
|
|
|
49700
49816
|
async onRowClick(_data) {
|
|
49701
49817
|
var _a3;
|
|
49702
49818
|
const data = this.state.items.find((item) => item.srfkey === _data.srfkey);
|
|
49703
|
-
if (!data)
|
|
49819
|
+
if (!data)
|
|
49704
49820
|
return;
|
|
49705
|
-
}
|
|
49706
49821
|
super.onRowClick(data);
|
|
49707
49822
|
const { groupAppDEFieldId } = this.model;
|
|
49708
49823
|
if (groupAppDEFieldId) {
|
|
@@ -49837,11 +49952,12 @@ var DataViewControlController = class extends MDControlController {
|
|
|
49837
49952
|
* @memberof DataViewControlController
|
|
49838
49953
|
*/
|
|
49839
49954
|
async calcOptItemState(items) {
|
|
49840
|
-
const
|
|
49841
|
-
if (
|
|
49955
|
+
const details = this.getOptItemModel();
|
|
49956
|
+
if (details.length)
|
|
49842
49957
|
await Promise.all(
|
|
49843
49958
|
items.map(async (item) => {
|
|
49844
49959
|
const containerState = new ButtonContainerState();
|
|
49960
|
+
const actions = getAllUIActionItems(details);
|
|
49845
49961
|
actions.forEach((action) => {
|
|
49846
49962
|
const actionid = action.uiactionId;
|
|
49847
49963
|
if (actionid) {
|
|
@@ -51399,6 +51515,7 @@ var FormController = class extends ControlController {
|
|
|
51399
51515
|
this.state.modified = false;
|
|
51400
51516
|
this.state.formIsDestroyed = false;
|
|
51401
51517
|
this.state.simpleDataIndex = 0;
|
|
51518
|
+
this.state.mdCtrlFormIndex = 0;
|
|
51402
51519
|
}
|
|
51403
51520
|
/**
|
|
51404
51521
|
* 设置激活分页
|
|
@@ -51425,6 +51542,22 @@ var FormController = class extends ControlController {
|
|
|
51425
51542
|
getSimpleDataIndex() {
|
|
51426
51543
|
return this.state.simpleDataIndex;
|
|
51427
51544
|
}
|
|
51545
|
+
/**
|
|
51546
|
+
* @description 获取多数据部件表单模式下当前表单索引
|
|
51547
|
+
* @returns {*} {number}
|
|
51548
|
+
* @memberof FormController
|
|
51549
|
+
*/
|
|
51550
|
+
getMdCtrlFormIndex() {
|
|
51551
|
+
return this.state.mdCtrlFormIndex;
|
|
51552
|
+
}
|
|
51553
|
+
/**
|
|
51554
|
+
* @description 设置多数据部件表单模式下当前表单的索引
|
|
51555
|
+
* @param {number} index
|
|
51556
|
+
* @memberof FormController
|
|
51557
|
+
*/
|
|
51558
|
+
setMdCtrlFormIndex(index) {
|
|
51559
|
+
this.state.mdCtrlFormIndex = index;
|
|
51560
|
+
}
|
|
51428
51561
|
/**
|
|
51429
51562
|
* 更新表单分页面板
|
|
51430
51563
|
*
|
|
@@ -53322,11 +53455,11 @@ var FormGroupPanelController = class extends FormDetailController {
|
|
|
53322
53455
|
async initActionStates() {
|
|
53323
53456
|
var _a3;
|
|
53324
53457
|
const { uiactionGroup } = this.model;
|
|
53325
|
-
if (!((_a3 = uiactionGroup == null ? void 0 : uiactionGroup.uiactionGroupDetails) == null ? void 0 : _a3.length))
|
|
53458
|
+
if (!((_a3 = uiactionGroup == null ? void 0 : uiactionGroup.uiactionGroupDetails) == null ? void 0 : _a3.length))
|
|
53326
53459
|
return;
|
|
53327
|
-
}
|
|
53328
53460
|
const containerState = new ButtonContainerState();
|
|
53329
|
-
uiactionGroup.uiactionGroupDetails
|
|
53461
|
+
const actions = getAllUIActionItems(uiactionGroup.uiactionGroupDetails);
|
|
53462
|
+
actions.forEach((detail) => {
|
|
53330
53463
|
const actionid = detail.uiactionId;
|
|
53331
53464
|
if (actionid) {
|
|
53332
53465
|
const buttonState = new UIActionButtonState(
|
|
@@ -53958,11 +54091,11 @@ var FormMDCtrlController = class extends FormDetailController {
|
|
|
53958
54091
|
async initActionStates() {
|
|
53959
54092
|
var _a3;
|
|
53960
54093
|
const { uiactionGroup } = this.model;
|
|
53961
|
-
if (!((_a3 = uiactionGroup == null ? void 0 : uiactionGroup.uiactionGroupDetails) == null ? void 0 : _a3.length))
|
|
54094
|
+
if (!((_a3 = uiactionGroup == null ? void 0 : uiactionGroup.uiactionGroupDetails) == null ? void 0 : _a3.length))
|
|
53962
54095
|
return;
|
|
53963
|
-
}
|
|
53964
54096
|
const containerState = new ButtonContainerState();
|
|
53965
|
-
uiactionGroup.uiactionGroupDetails
|
|
54097
|
+
const actions = getAllUIActionItems(uiactionGroup.uiactionGroupDetails);
|
|
54098
|
+
actions.forEach((detail) => {
|
|
53966
54099
|
const actionid = detail.uiactionId;
|
|
53967
54100
|
if (actionid) {
|
|
53968
54101
|
const buttonState = new UIActionButtonState(
|
|
@@ -58923,23 +59056,25 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
58923
59056
|
* @param {GridRowState} row
|
|
58924
59057
|
*/
|
|
58925
59058
|
initActionStates(row) {
|
|
59059
|
+
var _a3;
|
|
58926
59060
|
const { deuiactionGroup } = this.model;
|
|
58927
|
-
if (deuiactionGroup
|
|
58928
|
-
|
|
58929
|
-
|
|
58930
|
-
|
|
58931
|
-
|
|
58932
|
-
|
|
58933
|
-
|
|
58934
|
-
|
|
58935
|
-
|
|
58936
|
-
|
|
58937
|
-
|
|
58938
|
-
|
|
58939
|
-
|
|
58940
|
-
|
|
58941
|
-
|
|
58942
|
-
}
|
|
59061
|
+
if (!((_a3 = deuiactionGroup == null ? void 0 : deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a3.length))
|
|
59062
|
+
return;
|
|
59063
|
+
const containerState = new ButtonContainerState();
|
|
59064
|
+
const actions = getAllUIActionItems(deuiactionGroup.uiactionGroupDetails);
|
|
59065
|
+
actions.forEach((detail) => {
|
|
59066
|
+
const actionid = detail.uiactionId;
|
|
59067
|
+
if (actionid) {
|
|
59068
|
+
const buttonState = new UIActionButtonState(
|
|
59069
|
+
detail.id,
|
|
59070
|
+
this.grid.context.srfappid,
|
|
59071
|
+
actionid,
|
|
59072
|
+
detail
|
|
59073
|
+
);
|
|
59074
|
+
containerState.addState(detail.id, buttonState);
|
|
59075
|
+
}
|
|
59076
|
+
});
|
|
59077
|
+
row.uiActionGroupStates[this.model.codeName] = containerState;
|
|
58943
59078
|
}
|
|
58944
59079
|
/**
|
|
58945
59080
|
* 行是否可点击(影响列的界面样式)
|
|
@@ -59252,7 +59387,8 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
59252
59387
|
return;
|
|
59253
59388
|
}
|
|
59254
59389
|
const containerState = new ButtonContainerState();
|
|
59255
|
-
deuiactionGroup.uiactionGroupDetails
|
|
59390
|
+
const actions = getAllUIActionItems(deuiactionGroup.uiactionGroupDetails);
|
|
59391
|
+
actions.forEach((detail) => {
|
|
59256
59392
|
const actionid = detail.uiactionId;
|
|
59257
59393
|
if (actionid) {
|
|
59258
59394
|
const buttonState = new UIActionButtonState(
|
|
@@ -59679,12 +59815,14 @@ var ListController = class extends MDControlController {
|
|
|
59679
59815
|
async initGroupActionStates() {
|
|
59680
59816
|
var _a3;
|
|
59681
59817
|
const { groupUIActionGroup } = this.model;
|
|
59682
|
-
if (!((_a3 = groupUIActionGroup == null ? void 0 : groupUIActionGroup.uiactionGroupDetails) == null ? void 0 : _a3.length))
|
|
59818
|
+
if (!((_a3 = groupUIActionGroup == null ? void 0 : groupUIActionGroup.uiactionGroupDetails) == null ? void 0 : _a3.length))
|
|
59683
59819
|
return;
|
|
59684
|
-
}
|
|
59685
59820
|
this.state.groups.forEach(async (group) => {
|
|
59686
59821
|
const containerState = new ButtonContainerState();
|
|
59687
|
-
|
|
59822
|
+
const actions = getAllUIActionItems(
|
|
59823
|
+
groupUIActionGroup.uiactionGroupDetails
|
|
59824
|
+
);
|
|
59825
|
+
actions.forEach((detail) => {
|
|
59688
59826
|
const actionid = detail.uiactionId;
|
|
59689
59827
|
if (actionid) {
|
|
59690
59828
|
const buttonState = new UIActionButtonState(
|
|
@@ -59821,11 +59959,12 @@ var ListController = class extends MDControlController {
|
|
|
59821
59959
|
* @memberof ListController
|
|
59822
59960
|
*/
|
|
59823
59961
|
async calcOptItemState(items) {
|
|
59824
|
-
const
|
|
59825
|
-
if (
|
|
59962
|
+
const details = this.getOptItemModel();
|
|
59963
|
+
if (details.length)
|
|
59826
59964
|
await Promise.all(
|
|
59827
59965
|
items.map(async (item) => {
|
|
59828
59966
|
const containerState = new ButtonContainerState();
|
|
59967
|
+
const actions = getAllUIActionItems(details);
|
|
59829
59968
|
actions.forEach((action) => {
|
|
59830
59969
|
const actionid = action.uiactionId;
|
|
59831
59970
|
if (actionid) {
|
|
@@ -60302,6 +60441,69 @@ var ListController = class extends MDControlController {
|
|
|
60302
60441
|
throw error;
|
|
60303
60442
|
}
|
|
60304
60443
|
}
|
|
60444
|
+
/**
|
|
60445
|
+
* @description 行单击
|
|
60446
|
+
* @param {IData} _data
|
|
60447
|
+
* @returns {*} {Promise<void>}
|
|
60448
|
+
* @memberof ListController
|
|
60449
|
+
*/
|
|
60450
|
+
async onRowClick(_data) {
|
|
60451
|
+
var _a3;
|
|
60452
|
+
const data = this.state.items.find((item) => item.srfkey === _data.srfkey);
|
|
60453
|
+
if (!data)
|
|
60454
|
+
return;
|
|
60455
|
+
super.onRowClick(data);
|
|
60456
|
+
const { groupAppDEFieldId } = this.model;
|
|
60457
|
+
if (groupAppDEFieldId) {
|
|
60458
|
+
this.state.groups.forEach((group) => {
|
|
60459
|
+
group.selectedData = [];
|
|
60460
|
+
});
|
|
60461
|
+
this.state.selectedData.forEach((select) => {
|
|
60462
|
+
const groupVal = select[groupAppDEFieldId];
|
|
60463
|
+
const selectGroup = this.state.groups.find(
|
|
60464
|
+
(group) => group.key === groupVal
|
|
60465
|
+
);
|
|
60466
|
+
if (selectGroup) {
|
|
60467
|
+
selectGroup.selectedData.push(select);
|
|
60468
|
+
}
|
|
60469
|
+
});
|
|
60470
|
+
if (this.state.singleSelect) {
|
|
60471
|
+
this.state.groups.forEach((group) => {
|
|
60472
|
+
var _a4, _b2;
|
|
60473
|
+
let tempData = data;
|
|
60474
|
+
if (group.selectedData.indexOf(tempData) !== -1) {
|
|
60475
|
+
if (tempData && tempData instanceof ControlVO) {
|
|
60476
|
+
tempData = tempData.getOrigin();
|
|
60477
|
+
}
|
|
60478
|
+
if (tempData) {
|
|
60479
|
+
(_a4 = group.groupActionGroupState) == null ? void 0 : _a4.update(
|
|
60480
|
+
this.context,
|
|
60481
|
+
tempData,
|
|
60482
|
+
this.model.appDataEntityId
|
|
60483
|
+
);
|
|
60484
|
+
}
|
|
60485
|
+
} else {
|
|
60486
|
+
(_b2 = group.groupActionGroupState) == null ? void 0 : _b2.update(
|
|
60487
|
+
this.context,
|
|
60488
|
+
void 0,
|
|
60489
|
+
this.model.appDataEntityId
|
|
60490
|
+
);
|
|
60491
|
+
}
|
|
60492
|
+
});
|
|
60493
|
+
} else {
|
|
60494
|
+
const actionGroup = this.state.groups.find((group) => {
|
|
60495
|
+
return group.children.indexOf(data) !== -1;
|
|
60496
|
+
});
|
|
60497
|
+
if (actionGroup) {
|
|
60498
|
+
(_a3 = actionGroup.groupActionGroupState) == null ? void 0 : _a3.update(
|
|
60499
|
+
this.context,
|
|
60500
|
+
actionGroup.selectedData[0],
|
|
60501
|
+
this.model.appDataEntityId
|
|
60502
|
+
);
|
|
60503
|
+
}
|
|
60504
|
+
}
|
|
60505
|
+
}
|
|
60506
|
+
}
|
|
60305
60507
|
};
|
|
60306
60508
|
|
|
60307
60509
|
// src/controller/control/panel/panel/panel.controller.ts
|
|
@@ -63577,7 +63779,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
63577
63779
|
}
|
|
63578
63780
|
const wizardForm = this.model.dewizard.dewizardForms.find(
|
|
63579
63781
|
(form) => {
|
|
63580
|
-
return form.
|
|
63782
|
+
return form.stepTag === tag;
|
|
63581
63783
|
}
|
|
63582
63784
|
);
|
|
63583
63785
|
if (!wizardForm) {
|
|
@@ -65599,23 +65801,25 @@ var TreeGridExNodeColumnController = class {
|
|
|
65599
65801
|
* @param {GridRowState} row
|
|
65600
65802
|
*/
|
|
65601
65803
|
initActionStates(row) {
|
|
65804
|
+
var _a3;
|
|
65602
65805
|
const { deuiactionGroup } = this.nodeColumn;
|
|
65603
|
-
if (deuiactionGroup
|
|
65604
|
-
|
|
65605
|
-
|
|
65606
|
-
|
|
65607
|
-
|
|
65608
|
-
|
|
65609
|
-
|
|
65610
|
-
|
|
65611
|
-
|
|
65612
|
-
|
|
65613
|
-
|
|
65614
|
-
|
|
65615
|
-
|
|
65616
|
-
|
|
65617
|
-
|
|
65618
|
-
}
|
|
65806
|
+
if (!((_a3 = deuiactionGroup == null ? void 0 : deuiactionGroup.uiactionGroupDetails) == null ? void 0 : _a3.length))
|
|
65807
|
+
return;
|
|
65808
|
+
const containerState = new ButtonContainerState();
|
|
65809
|
+
const actions = getAllUIActionItems(deuiactionGroup.uiactionGroupDetails);
|
|
65810
|
+
actions.forEach((detail) => {
|
|
65811
|
+
const actionid = detail.uiactionId;
|
|
65812
|
+
if (actionid) {
|
|
65813
|
+
const buttonState = new UIActionButtonState(
|
|
65814
|
+
detail.id,
|
|
65815
|
+
this.context.srfappid,
|
|
65816
|
+
actionid,
|
|
65817
|
+
detail
|
|
65818
|
+
);
|
|
65819
|
+
containerState.addState(detail.id, buttonState);
|
|
65820
|
+
}
|
|
65821
|
+
});
|
|
65822
|
+
row.columnActionsStates[this.name] = containerState;
|
|
65619
65823
|
}
|
|
65620
65824
|
/**
|
|
65621
65825
|
* 文本点击事件
|
|
@@ -65970,7 +66174,8 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
|
65970
66174
|
return;
|
|
65971
66175
|
}
|
|
65972
66176
|
const containerState = new ButtonContainerState();
|
|
65973
|
-
deuiactionGroup.uiactionGroupDetails
|
|
66177
|
+
const actions = getAllUIActionItems(deuiactionGroup.uiactionGroupDetails);
|
|
66178
|
+
actions.forEach((detail) => {
|
|
65974
66179
|
const actionid = detail.uiactionId;
|
|
65975
66180
|
if (actionid) {
|
|
65976
66181
|
const buttonState = new UIActionButtonState(
|
|
@@ -70021,12 +70226,12 @@ function anime(params) {
|
|
|
70021
70226
|
var progress = void 0;
|
|
70022
70227
|
for (var n = 0; n < toNumbersLength; n++) {
|
|
70023
70228
|
var value = void 0;
|
|
70024
|
-
var
|
|
70229
|
+
var toNumber2 = tween.to.numbers[n];
|
|
70025
70230
|
var fromNumber = tween.from.numbers[n] || 0;
|
|
70026
70231
|
if (!tween.isPath) {
|
|
70027
|
-
value = fromNumber + eased * (
|
|
70232
|
+
value = fromNumber + eased * (toNumber2 - fromNumber);
|
|
70028
70233
|
} else {
|
|
70029
|
-
value = getPathProgress(tween.value, eased *
|
|
70234
|
+
value = getPathProgress(tween.value, eased * toNumber2, tween.isPathTargetInsideSVG);
|
|
70030
70235
|
}
|
|
70031
70236
|
if (round) {
|
|
70032
70237
|
if (!(tween.isColor && n > 2)) {
|
|
@@ -70587,10 +70792,13 @@ var DownloadTicketUtil = class {
|
|
|
70587
70792
|
* @description 获取下载票据
|
|
70588
70793
|
* @param {string} fileId
|
|
70589
70794
|
* @param {IContext} context
|
|
70795
|
+
* @param {IParams} params
|
|
70796
|
+
* @param {IData} data
|
|
70797
|
+
* @param {{ appEntityTag?: string; dataFieldTag?: string }} [downloadTicketParams={}]
|
|
70590
70798
|
* @returns {*} {(Promise<DownloadTicket | undefined>)}
|
|
70591
70799
|
* @memberof DownloadTicketUtil
|
|
70592
70800
|
*/
|
|
70593
|
-
async getDownloadTicket(fileId, context) {
|
|
70801
|
+
async getDownloadTicket(fileId, context, params, data, downloadTicketParams = {}) {
|
|
70594
70802
|
const tryDownloadTicket = this.cache.get(fileId);
|
|
70595
70803
|
if (tryDownloadTicket && !tryDownloadTicket.isExpirein) {
|
|
70596
70804
|
return tryDownloadTicket;
|
|
@@ -70610,16 +70818,34 @@ var DownloadTicketUtil = class {
|
|
|
70610
70818
|
return;
|
|
70611
70819
|
}
|
|
70612
70820
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
70821
|
+
const resultContext = context.clone();
|
|
70822
|
+
const { appEntityTag, dataFieldTag } = downloadTicketParams;
|
|
70823
|
+
if (dataFieldTag) {
|
|
70824
|
+
const navContexts = [];
|
|
70825
|
+
const key = calcDeCodeNameById(
|
|
70826
|
+
appEntityTag || uiDomain.appDataEntityId
|
|
70827
|
+
);
|
|
70828
|
+
navContexts.push({
|
|
70829
|
+
key,
|
|
70830
|
+
value: dataFieldTag.toLowerCase(),
|
|
70831
|
+
rawValue: false
|
|
70832
|
+
});
|
|
70833
|
+
const tempContext = convertNavData(navContexts, data, context, params);
|
|
70834
|
+
Object.assign(resultContext, tempContext);
|
|
70835
|
+
}
|
|
70613
70836
|
const entityService = await app.deService.getService(
|
|
70614
|
-
|
|
70615
|
-
uiDomain.appDataEntityId
|
|
70837
|
+
resultContext,
|
|
70838
|
+
appEntityTag || uiDomain.appDataEntityId
|
|
70616
70839
|
);
|
|
70617
|
-
const res = entityService.createDownloadTicket(
|
|
70840
|
+
const res = entityService.createDownloadTicket(resultContext, {
|
|
70618
70841
|
srfossfileid: fileId
|
|
70619
70842
|
});
|
|
70620
70843
|
this.processCache.set(fileId, res);
|
|
70621
|
-
|
|
70622
|
-
|
|
70844
|
+
try {
|
|
70845
|
+
result = await res;
|
|
70846
|
+
} finally {
|
|
70847
|
+
this.processCache.delete(fileId);
|
|
70848
|
+
}
|
|
70623
70849
|
}
|
|
70624
70850
|
if (!result.ok || !result.data)
|
|
70625
70851
|
return;
|
|
@@ -70654,6 +70880,20 @@ var FileUtil = class {
|
|
|
70654
70880
|
setUploadHeaders(args) {
|
|
70655
70881
|
Object.assign(this.customUploadHeaders, args);
|
|
70656
70882
|
}
|
|
70883
|
+
/**
|
|
70884
|
+
* @description 获取是否启用下载凭证
|
|
70885
|
+
* @protected
|
|
70886
|
+
* @param {boolean} [enableDownloadTicket]
|
|
70887
|
+
* @returns {*} {boolean}
|
|
70888
|
+
* @memberof FileUtil
|
|
70889
|
+
*/
|
|
70890
|
+
getEnableDownloadTicket(enableDownloadTicket) {
|
|
70891
|
+
let tempEnableDownloadTicket = ibiz.config.common.enableDownloadTicket;
|
|
70892
|
+
if (enableDownloadTicket) {
|
|
70893
|
+
tempEnableDownloadTicket = enableDownloadTicket;
|
|
70894
|
+
}
|
|
70895
|
+
return tempEnableDownloadTicket;
|
|
70896
|
+
}
|
|
70657
70897
|
/**
|
|
70658
70898
|
* @description 获取文件上传请求头数据
|
|
70659
70899
|
* @returns {*} {Record<string, string>}
|
|
@@ -70730,12 +70970,21 @@ var FileUtil = class {
|
|
|
70730
70970
|
/**
|
|
70731
70971
|
* @description 获取下载凭证
|
|
70732
70972
|
* @param {IApiContext} context
|
|
70733
|
-
* @param {
|
|
70973
|
+
* @param {IParams} params
|
|
70974
|
+
* @param {IData} data
|
|
70975
|
+
* @param {({ fileId: string } & IData)} file
|
|
70976
|
+
* @param {{ appEntityTag?: string; dataFieldTag?: string }} [downloadTicketParams]
|
|
70734
70977
|
* @returns {*} {(Promise<IApiDownloadTicket | undefined>)}
|
|
70735
70978
|
* @memberof FileUtil
|
|
70736
70979
|
*/
|
|
70737
|
-
async getDownloadTicket(context, file) {
|
|
70738
|
-
return this.downloadTicketUtil.getDownloadTicket(
|
|
70980
|
+
async getDownloadTicket(context, params, data, file, downloadTicketParams = {}) {
|
|
70981
|
+
return this.downloadTicketUtil.getDownloadTicket(
|
|
70982
|
+
file.fileId,
|
|
70983
|
+
context,
|
|
70984
|
+
params,
|
|
70985
|
+
data,
|
|
70986
|
+
downloadTicketParams
|
|
70987
|
+
);
|
|
70739
70988
|
}
|
|
70740
70989
|
/**
|
|
70741
70990
|
* @description 设置下载票据
|
|
@@ -70753,20 +71002,36 @@ var FileUtil = class {
|
|
|
70753
71002
|
* @description 请求url获取文件流,并用JS触发文件下载
|
|
70754
71003
|
* @param {string} url
|
|
70755
71004
|
* @param {string} [name]
|
|
71005
|
+
* @param {({
|
|
71006
|
+
* context: IContext;
|
|
71007
|
+
* params: IParams;
|
|
71008
|
+
* data: IData;
|
|
71009
|
+
* file: { fileId: string } & IData;
|
|
71010
|
+
* extraParams?: IData;
|
|
71011
|
+
* downloadTicketParams?: { appEntityTag?: string; dataFieldTag?: string };
|
|
71012
|
+
* })} [downloadParams]
|
|
71013
|
+
* @param {boolean} [enableDownloadTicket]
|
|
70756
71014
|
* @returns {*} {Promise<void>}
|
|
70757
71015
|
* @memberof FileUtil
|
|
70758
71016
|
*/
|
|
70759
|
-
async fileDownload(url, name2, downloadParams) {
|
|
71017
|
+
async fileDownload(url, name2, downloadParams, enableDownloadTicket) {
|
|
71018
|
+
const tempEnableDownloadTicket = this.getEnableDownloadTicket(enableDownloadTicket);
|
|
70760
71019
|
let tempDownloadUrl = url;
|
|
70761
|
-
if (
|
|
70762
|
-
const { context, params, data, file, extraParams } = downloadParams;
|
|
71020
|
+
if (tempEnableDownloadTicket && downloadParams) {
|
|
71021
|
+
const { context, params, data, file, extraParams, downloadTicketParams } = downloadParams;
|
|
70763
71022
|
const { downloadUrl } = this.calcFileUpDownUrl(
|
|
70764
71023
|
context,
|
|
70765
71024
|
params,
|
|
70766
71025
|
data,
|
|
70767
71026
|
extraParams
|
|
70768
71027
|
);
|
|
70769
|
-
const downloadTicket = await this.getDownloadTicket(
|
|
71028
|
+
const downloadTicket = await this.getDownloadTicket(
|
|
71029
|
+
context,
|
|
71030
|
+
params,
|
|
71031
|
+
data,
|
|
71032
|
+
file,
|
|
71033
|
+
downloadTicketParams
|
|
71034
|
+
);
|
|
70770
71035
|
if (!downloadTicket) {
|
|
70771
71036
|
throw new RuntimeError65(
|
|
70772
71037
|
"runtime.utils.fileUtil.getDownloadTicketFailed"
|
|
@@ -70815,7 +71080,7 @@ var FileUtil = class {
|
|
|
70815
71080
|
);
|
|
70816
71081
|
}
|
|
70817
71082
|
const result = res.data;
|
|
70818
|
-
if (ibiz.config.common.enableDownloadTicket) {
|
|
71083
|
+
if (ibiz.config.common.enableDownloadTicket && result.ticket) {
|
|
70819
71084
|
ibiz.util.file.setDownloadTicket(result.id, result.ticket);
|
|
70820
71085
|
}
|
|
70821
71086
|
return result;
|
|
@@ -70905,22 +71170,25 @@ var FileUtil = class {
|
|
|
70905
71170
|
}
|
|
70906
71171
|
/**
|
|
70907
71172
|
* @description 通用请求文件方法,可自定义 responseType(默认获取Blob类型的文件流,responseType 的配置决定了请求服务时返回的文件数据格式)
|
|
70908
|
-
* @param {string} url
|
|
71173
|
+
* @param {string} url
|
|
71174
|
+
* @param {XMLHttpRequestResponseType} [responseType]
|
|
70909
71175
|
* @param {({
|
|
70910
71176
|
* context: IContext;
|
|
70911
71177
|
* params: IParams;
|
|
70912
71178
|
* data: IData;
|
|
70913
71179
|
* file: { fileId: string } & IData;
|
|
70914
71180
|
* extraParams?: IData;
|
|
70915
|
-
*
|
|
70916
|
-
*
|
|
71181
|
+
* downloadTicketParams?: { appEntityTag?: string; dataFieldTag?: string };
|
|
71182
|
+
* })} [downloadParams]
|
|
71183
|
+
* @param {boolean} [enableDownloadTicket]
|
|
70917
71184
|
* @returns {*} {Promise<IData>}
|
|
70918
71185
|
* @memberof FileUtil
|
|
70919
71186
|
*/
|
|
70920
|
-
async requestFile(url, responseType, downloadParams) {
|
|
71187
|
+
async requestFile(url, responseType, downloadParams, enableDownloadTicket) {
|
|
70921
71188
|
let tempDownloadUrl = url;
|
|
70922
|
-
|
|
70923
|
-
|
|
71189
|
+
const tempEnableDownloadTicket = this.getEnableDownloadTicket(enableDownloadTicket);
|
|
71190
|
+
if (tempEnableDownloadTicket && downloadParams) {
|
|
71191
|
+
const { context, params, data, file, extraParams, downloadTicketParams } = downloadParams;
|
|
70924
71192
|
const { downloadUrl } = ibiz.util.file.calcFileUpDownUrl(
|
|
70925
71193
|
context,
|
|
70926
71194
|
params,
|
|
@@ -70929,7 +71197,10 @@ var FileUtil = class {
|
|
|
70929
71197
|
);
|
|
70930
71198
|
const downloadTicket = await ibiz.util.file.getDownloadTicket(
|
|
70931
71199
|
context,
|
|
70932
|
-
|
|
71200
|
+
params,
|
|
71201
|
+
data,
|
|
71202
|
+
file,
|
|
71203
|
+
downloadTicketParams
|
|
70933
71204
|
);
|
|
70934
71205
|
if (!downloadTicket) {
|
|
70935
71206
|
throw new RuntimeError65(
|
|
@@ -83487,6 +83758,7 @@ export {
|
|
|
83487
83758
|
getAcItemProvider,
|
|
83488
83759
|
getAllItems,
|
|
83489
83760
|
getAllPanelField,
|
|
83761
|
+
getAllUIActionItems,
|
|
83490
83762
|
getAppCounterProvider,
|
|
83491
83763
|
getAppMenuItemProvider,
|
|
83492
83764
|
getAppViewRef,
|