@ibiz-template/runtime 0.7.41-alpha.4 → 0.7.41-alpha.6
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 +219 -66
- package/dist/index.system.min.js +1 -1
- package/out/controller/common/control/control.controller.d.ts +12 -1
- package/out/controller/common/control/control.controller.d.ts.map +1 -1
- package/out/controller/common/control/control.controller.js +19 -0
- package/out/controller/control/chart/generator/base-series-generator.d.ts +12 -5
- package/out/controller/control/chart/generator/base-series-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/base-series-generator.js +55 -24
- package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.d.ts +18 -6
- package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-druipart/form-druipart.controller.js +57 -25
- package/out/controller/control/form/form-detail/form-item/form-item.controller.js +2 -1
- package/out/controller/utils/util/util.d.ts +15 -0
- package/out/controller/utils/util/util.d.ts.map +1 -1
- package/out/controller/utils/util/util.js +57 -5
- package/out/engine/md-view.engine.d.ts +1 -1
- package/out/engine/md-view.engine.d.ts.map +1 -1
- package/out/engine/md-view.engine.js +13 -1
- package/out/interface/api/controller/common/i-api-mask-option.d.ts +20 -0
- package/out/interface/api/controller/common/i-api-mask-option.d.ts.map +1 -0
- package/out/interface/api/controller/common/i-api-mask-option.js +1 -0
- package/out/interface/api/controller/common/index.d.ts +1 -0
- package/out/interface/api/controller/common/index.d.ts.map +1 -1
- package/out/interface/api/controller/control/i-api-chart.controller.d.ts +1 -0
- package/out/interface/api/controller/control/i-api-chart.controller.d.ts.map +1 -1
- package/out/interface/api/controller/control/i-api-control.controller.d.ts +12 -0
- package/out/interface/api/controller/control/i-api-control.controller.d.ts.map +1 -1
- package/out/interface/api/state/control/i-api-control.state.d.ts +14 -0
- package/out/interface/api/state/control/i-api-control.state.d.ts.map +1 -1
- package/out/interface/api/util/i-api-file-util.d.ts +65 -4
- package/out/interface/api/util/i-api-file-util.d.ts.map +1 -1
- package/out/interface/controller/event/argument/data-change.event.d.ts +4 -5
- package/out/interface/controller/event/argument/data-change.event.d.ts.map +1 -1
- package/out/service/vo/code-list-data-item/code-list-data-item.d.ts.map +1 -1
- package/out/service/vo/code-list-data-item/code-list-data-item.js +8 -1
- package/out/utils/file-util/file-util.d.ts +20 -3
- package/out/utils/file-util/file-util.d.ts.map +1 -1
- package/out/utils/file-util/file-util.js +43 -12
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -25535,7 +25535,7 @@ var CodeListDataItem = class {
|
|
|
25535
25535
|
try {
|
|
25536
25536
|
this.data = ScriptFactory.execSingleLine(
|
|
25537
25537
|
dataAppDEFieldId,
|
|
25538
|
-
this.$origin
|
|
25538
|
+
this.$origin instanceof AppDataEntity ? clone5(this.$origin._data) : clone5(this.$origin)
|
|
25539
25539
|
);
|
|
25540
25540
|
} catch (error) {
|
|
25541
25541
|
ibiz.log.error(ibiz.i18n.t("runtime.service.dynamicCodeTable"));
|
|
@@ -25579,6 +25579,10 @@ var CodeListDataItem = class {
|
|
|
25579
25579
|
enumerable: true,
|
|
25580
25580
|
configurable: true
|
|
25581
25581
|
});
|
|
25582
|
+
this.children = void 0;
|
|
25583
|
+
this.cls = void 0;
|
|
25584
|
+
this.tooltip = void 0;
|
|
25585
|
+
this.userData = void 0;
|
|
25582
25586
|
Object.keys(
|
|
25583
25587
|
data instanceof AppDataEntity ? clone5(data._data) : clone5(data)
|
|
25584
25588
|
).forEach((key) => {
|
|
@@ -34588,20 +34592,18 @@ function formatDate(val, format) {
|
|
|
34588
34592
|
if (!val || isNaN(date.getTime()))
|
|
34589
34593
|
return value;
|
|
34590
34594
|
const year = dayjs(date).year();
|
|
34591
|
-
const month = dayjs(date).month() + 1;
|
|
34592
34595
|
switch (format) {
|
|
34593
34596
|
case "year":
|
|
34594
34597
|
value = "".concat(year);
|
|
34595
34598
|
break;
|
|
34596
34599
|
case "quarter":
|
|
34597
|
-
value = "".concat(year, " ").concat(
|
|
34600
|
+
value = "".concat(year, " ").concat(dayjs(date).quarter()).concat(ibiz.i18n.t("runtime.controller.utils.util.quarter"));
|
|
34598
34601
|
break;
|
|
34599
34602
|
case "month":
|
|
34600
|
-
value = "".concat(year, " ").concat(month).concat(ibiz.i18n.t("runtime.controller.utils.util.month"));
|
|
34603
|
+
value = "".concat(year, " ").concat(dayjs(date).month() + 1).concat(ibiz.i18n.t("runtime.controller.utils.util.month"));
|
|
34601
34604
|
break;
|
|
34602
34605
|
case "week":
|
|
34603
|
-
|
|
34604
|
-
value = "".concat(year, " ").concat(week).concat(ibiz.i18n.t("runtime.controller.utils.util.week"));
|
|
34606
|
+
value = "".concat(year, " ").concat(dayjs(date).week()).concat(ibiz.i18n.t("runtime.controller.utils.util.week"));
|
|
34605
34607
|
break;
|
|
34606
34608
|
case "day":
|
|
34607
34609
|
value = dayjs(date).format("YYYY-MM-DD");
|
|
@@ -34611,6 +34613,41 @@ function formatDate(val, format) {
|
|
|
34611
34613
|
}
|
|
34612
34614
|
return value;
|
|
34613
34615
|
}
|
|
34616
|
+
function getWeeksInYear(year) {
|
|
34617
|
+
const lastDayOfYear = dayjs("".concat(year, "-12-31"));
|
|
34618
|
+
const week = lastDayOfYear.isoWeek();
|
|
34619
|
+
return week === 1 ? 52 : week;
|
|
34620
|
+
}
|
|
34621
|
+
function generateYearWeekRange(minYearWeek, maxYearWeek, paddingWeeks = 0) {
|
|
34622
|
+
const [minYear, minWeek] = minYearWeek.split("-").map(Number);
|
|
34623
|
+
const [maxYear, maxWeek] = maxYearWeek.split("-").map(Number);
|
|
34624
|
+
let startYear = minYear;
|
|
34625
|
+
let startWeek = minWeek - paddingWeeks;
|
|
34626
|
+
while (startWeek < 1) {
|
|
34627
|
+
startYear--;
|
|
34628
|
+
startWeek += getWeeksInYear(startYear);
|
|
34629
|
+
}
|
|
34630
|
+
let endYear = maxYear;
|
|
34631
|
+
let endWeek = maxWeek + paddingWeeks;
|
|
34632
|
+
const maxWeeksInEndYear = getWeeksInYear(endYear);
|
|
34633
|
+
if (endWeek > maxWeeksInEndYear) {
|
|
34634
|
+
endWeek -= maxWeeksInEndYear;
|
|
34635
|
+
endYear++;
|
|
34636
|
+
}
|
|
34637
|
+
const yearWeeks = [];
|
|
34638
|
+
let currentYear = startYear;
|
|
34639
|
+
let currentWeek = startWeek;
|
|
34640
|
+
while (currentYear < endYear || currentYear === endYear && currentWeek <= endWeek) {
|
|
34641
|
+
yearWeeks.push("".concat(currentYear, "-").concat(currentWeek));
|
|
34642
|
+
currentWeek++;
|
|
34643
|
+
const weeksInCurrentYear = getWeeksInYear(currentYear);
|
|
34644
|
+
if (currentWeek > weeksInCurrentYear) {
|
|
34645
|
+
currentYear++;
|
|
34646
|
+
currentWeek = 1;
|
|
34647
|
+
}
|
|
34648
|
+
}
|
|
34649
|
+
return yearWeeks;
|
|
34650
|
+
}
|
|
34614
34651
|
|
|
34615
34652
|
// src/controller/utils/value-rule/value-rule.ts
|
|
34616
34653
|
import { RuntimeError as RuntimeError25 } from "@ibiz-template/core";
|
|
@@ -37025,6 +37062,8 @@ var ControlController = class extends BaseController {
|
|
|
37025
37062
|
super.initState();
|
|
37026
37063
|
this.state.activated = true;
|
|
37027
37064
|
this.state.isLoading = false;
|
|
37065
|
+
this.state.disabled = false;
|
|
37066
|
+
this.state.maskOption = { mode: "BLANK" };
|
|
37028
37067
|
}
|
|
37029
37068
|
async onCreated() {
|
|
37030
37069
|
var _a3;
|
|
@@ -37397,6 +37436,23 @@ var ControlController = class extends BaseController {
|
|
|
37397
37436
|
cb();
|
|
37398
37437
|
}
|
|
37399
37438
|
}
|
|
37439
|
+
/**
|
|
37440
|
+
* @description 取消部件禁用
|
|
37441
|
+
* @memberof ControlController
|
|
37442
|
+
*/
|
|
37443
|
+
enable() {
|
|
37444
|
+
this.state.disabled = false;
|
|
37445
|
+
this.state.maskOption = { mode: "BLANK" };
|
|
37446
|
+
}
|
|
37447
|
+
/**
|
|
37448
|
+
* @description 设置部件禁用
|
|
37449
|
+
* @param {IApiMaskOption} [options={ mode: 'BLANK' }]
|
|
37450
|
+
* @memberof ControlController
|
|
37451
|
+
*/
|
|
37452
|
+
disabled(options = { mode: "BLANK" }) {
|
|
37453
|
+
this.state.disabled = true;
|
|
37454
|
+
this.state.maskOption = options;
|
|
37455
|
+
}
|
|
37400
37456
|
};
|
|
37401
37457
|
|
|
37402
37458
|
// src/controller/common/control/md-control.controller.ts
|
|
@@ -43164,9 +43220,11 @@ var BaseSeriesGenerator = class {
|
|
|
43164
43220
|
* @return {*} {(SeriesOption[] | SeriesOption)}
|
|
43165
43221
|
*/
|
|
43166
43222
|
calcByData(data) {
|
|
43223
|
+
const { userParam, echartsType } = this.model;
|
|
43167
43224
|
const tempData = this.dataPreprocess(data);
|
|
43168
43225
|
const groupData = this.calcGroupData(tempData);
|
|
43169
|
-
|
|
43226
|
+
const noCompletionDate = (userParam == null ? void 0 : userParam.completiondate) === "false" || echartsType && ["pie", "gauge", "radar", "funnel"].includes(echartsType);
|
|
43227
|
+
noCompletionDate ? this.calcTimeData(groupData) : this.addTimeData(groupData);
|
|
43170
43228
|
return this.calcGroupSeries(groupData);
|
|
43171
43229
|
}
|
|
43172
43230
|
/**
|
|
@@ -43267,17 +43325,16 @@ var BaseSeriesGenerator = class {
|
|
|
43267
43325
|
});
|
|
43268
43326
|
}
|
|
43269
43327
|
/**
|
|
43270
|
-
*
|
|
43271
|
-
*
|
|
43272
|
-
* @
|
|
43273
|
-
* @
|
|
43274
|
-
* @
|
|
43328
|
+
* @description 根据分组模式补全时间数据
|
|
43329
|
+
* - 将最小日期和最大日期之间的数据补全,确保横坐标时间的连续性
|
|
43330
|
+
* @param {GroupData} data
|
|
43331
|
+
* @returns {*} {void}
|
|
43332
|
+
* @memberof BaseSeriesGenerator
|
|
43275
43333
|
*/
|
|
43276
43334
|
addTimeData(data) {
|
|
43277
43335
|
const { groupMode } = this.model;
|
|
43278
|
-
if (!groupMode || groupMode === "CODELIST")
|
|
43336
|
+
if (!groupMode || groupMode === "CODELIST")
|
|
43279
43337
|
return;
|
|
43280
|
-
}
|
|
43281
43338
|
const dates = [];
|
|
43282
43339
|
Object.keys(data).forEach((key) => {
|
|
43283
43340
|
data[key].forEach((_val, date) => {
|
|
@@ -43350,7 +43407,7 @@ var BaseSeriesGenerator = class {
|
|
|
43350
43407
|
}
|
|
43351
43408
|
}
|
|
43352
43409
|
} else if (groupMode === "YEARWEEK") {
|
|
43353
|
-
|
|
43410
|
+
let yearWeeks = [];
|
|
43354
43411
|
Object.keys(data).forEach((key) => {
|
|
43355
43412
|
data[key].forEach((_val, yearWeek) => {
|
|
43356
43413
|
yearWeeks.push(yearWeek);
|
|
@@ -43364,22 +43421,41 @@ var BaseSeriesGenerator = class {
|
|
|
43364
43421
|
(max2, current) => current > max2 ? current : max2,
|
|
43365
43422
|
yearWeeks[0]
|
|
43366
43423
|
);
|
|
43367
|
-
|
|
43368
|
-
|
|
43369
|
-
|
|
43370
|
-
|
|
43371
|
-
|
|
43372
|
-
|
|
43373
|
-
|
|
43374
|
-
|
|
43375
|
-
data[key].set(yearWeek, { value: 0 });
|
|
43376
|
-
}
|
|
43377
|
-
});
|
|
43378
|
-
}
|
|
43379
|
-
}
|
|
43424
|
+
yearWeeks = generateYearWeekRange(minYearWeek, maxYearWeek, 3);
|
|
43425
|
+
yearWeeks.forEach((yearWeek) => {
|
|
43426
|
+
Object.keys(data).forEach((key) => {
|
|
43427
|
+
if (!data[key].get(yearWeek)) {
|
|
43428
|
+
data[key].set(yearWeek, { value: 0 });
|
|
43429
|
+
}
|
|
43430
|
+
});
|
|
43431
|
+
});
|
|
43380
43432
|
}
|
|
43381
43433
|
this.sortTimeData(data);
|
|
43382
43434
|
}
|
|
43435
|
+
/**
|
|
43436
|
+
* @description 根据分组模式计算时间数据
|
|
43437
|
+
* - 只计算有值的日期,展示关键信息数据,多用于横轴日期显示跨度大的情况
|
|
43438
|
+
* @param {GroupData} data
|
|
43439
|
+
* @memberof BaseSeriesGenerator
|
|
43440
|
+
*/
|
|
43441
|
+
calcTimeData(data) {
|
|
43442
|
+
const { groupMode } = this.model;
|
|
43443
|
+
if (!groupMode || groupMode === "CODELIST")
|
|
43444
|
+
return;
|
|
43445
|
+
const dates = [];
|
|
43446
|
+
Object.keys(data).forEach((key) => {
|
|
43447
|
+
data[key].forEach((_val, date) => {
|
|
43448
|
+
dates.push(date);
|
|
43449
|
+
});
|
|
43450
|
+
});
|
|
43451
|
+
dates.forEach((date) => {
|
|
43452
|
+
Object.keys(data).forEach((key) => {
|
|
43453
|
+
if (!data[key].get(date))
|
|
43454
|
+
data[key].set(date, { value: 0 });
|
|
43455
|
+
});
|
|
43456
|
+
});
|
|
43457
|
+
this.sortTimeData(data);
|
|
43458
|
+
}
|
|
43383
43459
|
};
|
|
43384
43460
|
|
|
43385
43461
|
// src/controller/control/chart/generator/line-series-generator.ts
|
|
@@ -51811,6 +51887,12 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51811
51887
|
embedView.appDataEntityId
|
|
51812
51888
|
);
|
|
51813
51889
|
}
|
|
51890
|
+
this.form.evt.on("onBeforeSave", async () => {
|
|
51891
|
+
if (this.isNeedSyncEmbed && this.embedView && this.embedDataService) {
|
|
51892
|
+
await this.saveEmbedViewData();
|
|
51893
|
+
await this.SyncEmbedDataToForm();
|
|
51894
|
+
}
|
|
51895
|
+
});
|
|
51814
51896
|
}
|
|
51815
51897
|
/**
|
|
51816
51898
|
* @description 表单数据变更通知(由表单控制器调用)
|
|
@@ -51842,21 +51924,6 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51842
51924
|
this.calcViewParams();
|
|
51843
51925
|
}
|
|
51844
51926
|
}
|
|
51845
|
-
/**
|
|
51846
|
-
* @description 同步当前表单数据至子界面数据服务
|
|
51847
|
-
* @returns {*} {Promise<void>}
|
|
51848
|
-
* @memberof FormDRUIPartController
|
|
51849
|
-
*/
|
|
51850
|
-
async SyncDataToEmbedService() {
|
|
51851
|
-
if (this.isNeedSyncEmbed && this.embedDataService) {
|
|
51852
|
-
const tempContext = this.context.clone();
|
|
51853
|
-
tempContext.srfappid = this.model.appId;
|
|
51854
|
-
const originData = this.form.state.data.$origin;
|
|
51855
|
-
const res = await this.embedDataService.getTemp(tempContext);
|
|
51856
|
-
const syncAction = res.data ? "updateTemp" : "createTemp";
|
|
51857
|
-
await this.embedDataService[syncAction](tempContext, originData);
|
|
51858
|
-
}
|
|
51859
|
-
}
|
|
51860
51927
|
/**
|
|
51861
51928
|
* @description 计算视图上下文和视图参数, 调用该方法一定会刷新视图。
|
|
51862
51929
|
* @returns {*} {void}
|
|
@@ -51864,7 +51931,10 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51864
51931
|
*/
|
|
51865
51932
|
calcViewParams() {
|
|
51866
51933
|
let newContext = this.form.context.clone();
|
|
51867
|
-
|
|
51934
|
+
if (this.isNeedSyncEmbed) {
|
|
51935
|
+
newContext.srfignorechange = true;
|
|
51936
|
+
newContext.srfsilent = true;
|
|
51937
|
+
}
|
|
51868
51938
|
const navContexts = this.model.navigateContexts;
|
|
51869
51939
|
if (notNilEmpty10(navContexts)) {
|
|
51870
51940
|
newContext = Object.assign(
|
|
@@ -51923,14 +51993,7 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51923
51993
|
this.model.deformItemUpdateId
|
|
51924
51994
|
);
|
|
51925
51995
|
}
|
|
51926
|
-
|
|
51927
|
-
const tempContext = this.context.clone();
|
|
51928
|
-
tempContext.srfappid = this.model.appId;
|
|
51929
|
-
const res = await this.embedDataService.getTemp(tempContext);
|
|
51930
|
-
const childData = res.data || {};
|
|
51931
|
-
const exData = this.form.state.data.srfexdata || {};
|
|
51932
|
-
this.form.state.data.srfexdata = Object.assign(exData, childData);
|
|
51933
|
-
}
|
|
51996
|
+
await this.SyncEmbedDataToForm();
|
|
51934
51997
|
});
|
|
51935
51998
|
}
|
|
51936
51999
|
/**
|
|
@@ -51971,6 +52034,47 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
51971
52034
|
}
|
|
51972
52035
|
return true;
|
|
51973
52036
|
}
|
|
52037
|
+
/**
|
|
52038
|
+
* @description 同步当前表单数据至子界面数据服务
|
|
52039
|
+
* @returns {*} {Promise<void>}
|
|
52040
|
+
* @memberof FormDRUIPartController
|
|
52041
|
+
*/
|
|
52042
|
+
async SyncDataToEmbedService() {
|
|
52043
|
+
if (this.isNeedSyncEmbed && this.embedDataService) {
|
|
52044
|
+
const tempContext = this.context.clone();
|
|
52045
|
+
tempContext.srfappid = this.model.appId;
|
|
52046
|
+
const originData = this.form.state.data.$origin;
|
|
52047
|
+
const res = await this.embedDataService.getTemp(tempContext);
|
|
52048
|
+
const syncAction = res.data ? "updateTemp" : "createTemp";
|
|
52049
|
+
await this.embedDataService[syncAction](tempContext, originData);
|
|
52050
|
+
}
|
|
52051
|
+
}
|
|
52052
|
+
/**
|
|
52053
|
+
* @description 同步子界面数据至表单
|
|
52054
|
+
* @returns {*} {Promise<void>}
|
|
52055
|
+
* @memberof FormDRUIPartController
|
|
52056
|
+
*/
|
|
52057
|
+
async SyncEmbedDataToForm() {
|
|
52058
|
+
if (this.isNeedSyncEmbed && this.embedDataService) {
|
|
52059
|
+
const tempContext = this.context.clone();
|
|
52060
|
+
tempContext.srfappid = this.model.appId;
|
|
52061
|
+
const res = await this.embedDataService.getTemp(tempContext);
|
|
52062
|
+
const childData = res.data || {};
|
|
52063
|
+
const exData = this.form.state.data.srfexdata || {};
|
|
52064
|
+
this.form.state.data.srfexdata = Object.assign(exData, childData);
|
|
52065
|
+
}
|
|
52066
|
+
}
|
|
52067
|
+
/**
|
|
52068
|
+
* @description 保存嵌入视图数据
|
|
52069
|
+
* @returns {*} {Promise<void>}
|
|
52070
|
+
* @memberof FormDRUIPartController
|
|
52071
|
+
*/
|
|
52072
|
+
async saveEmbedViewData() {
|
|
52073
|
+
var _a3;
|
|
52074
|
+
if (this.isNeedSyncEmbed && this.embedView) {
|
|
52075
|
+
await ((_a3 = this.embedView) == null ? void 0 : _a3.call("Save" /* SAVE */));
|
|
52076
|
+
}
|
|
52077
|
+
}
|
|
51974
52078
|
};
|
|
51975
52079
|
|
|
51976
52080
|
// src/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.ts
|
|
@@ -52211,7 +52315,8 @@ var FormItemController = class extends FormDetailController {
|
|
|
52211
52315
|
* @type {unknown}
|
|
52212
52316
|
*/
|
|
52213
52317
|
get value() {
|
|
52214
|
-
|
|
52318
|
+
var _a3;
|
|
52319
|
+
return (_a3 = this.data) == null ? void 0 : _a3[this.name];
|
|
52215
52320
|
}
|
|
52216
52321
|
/**
|
|
52217
52322
|
* 值项
|
|
@@ -68221,6 +68326,43 @@ import {
|
|
|
68221
68326
|
} from "@ibiz-template/core";
|
|
68222
68327
|
import qs4 from "qs";
|
|
68223
68328
|
var FileUtil = class {
|
|
68329
|
+
constructor() {
|
|
68330
|
+
/**
|
|
68331
|
+
* @description 自定义文件上传请求头数据
|
|
68332
|
+
* @protected
|
|
68333
|
+
* @type {Record<string, string>}
|
|
68334
|
+
* @memberof FileUtil
|
|
68335
|
+
*/
|
|
68336
|
+
this.customUploadHeaders = {};
|
|
68337
|
+
}
|
|
68338
|
+
/**
|
|
68339
|
+
* @description 设置文件上传请求头数据
|
|
68340
|
+
* @param {Record<string, string>} args
|
|
68341
|
+
* @memberof FileUtil
|
|
68342
|
+
*/
|
|
68343
|
+
setUploadHeaders(args) {
|
|
68344
|
+
Object.assign(this.customUploadHeaders, args);
|
|
68345
|
+
}
|
|
68346
|
+
/**
|
|
68347
|
+
* @description 获取文件上传请求头数据
|
|
68348
|
+
* @returns {*} {Record<string, string>}
|
|
68349
|
+
* @memberof IApiFileUtil
|
|
68350
|
+
*/
|
|
68351
|
+
getUploadHeaders() {
|
|
68352
|
+
const uploadHeaders = {};
|
|
68353
|
+
const token = getAppCookie2(CoreConst3.TOKEN);
|
|
68354
|
+
if (token) {
|
|
68355
|
+
Object.assign(uploadHeaders, {
|
|
68356
|
+
["".concat(ibiz.env.tokenHeader, "Authorization")]: "".concat(ibiz.env.tokenPrefix, "Bearer ").concat(token)
|
|
68357
|
+
});
|
|
68358
|
+
}
|
|
68359
|
+
if (this.customUploadHeaders && Object.keys(this.customUploadHeaders).length > 0) {
|
|
68360
|
+
Object.assign(uploadHeaders, {
|
|
68361
|
+
...this.customUploadHeaders
|
|
68362
|
+
});
|
|
68363
|
+
}
|
|
68364
|
+
return uploadHeaders;
|
|
68365
|
+
}
|
|
68224
68366
|
/**
|
|
68225
68367
|
* @description 计算OSSCat参数
|
|
68226
68368
|
* @protected
|
|
@@ -68239,9 +68381,7 @@ var FileUtil = class {
|
|
|
68239
68381
|
return uploadUrl;
|
|
68240
68382
|
}
|
|
68241
68383
|
/**
|
|
68242
|
-
* @description
|
|
68243
|
-
* 下载路径文件id用%fileId%占位,替换即可
|
|
68244
|
-
* 配置编辑器参数uploadParams和exportParams时,会像导航参数一样动态添加对应的参数到url上
|
|
68384
|
+
* @description 计算文件的上传路径和下载路径,下载路径文件id用%fileId%占位,替换即可;配置编辑器参数uploadParams和exportParams时,会像导航参数一样动态添加对应的参数到url上
|
|
68245
68385
|
* @param {IContext} context
|
|
68246
68386
|
* @param {IParams} params
|
|
68247
68387
|
* @param {IData} [data={}]
|
|
@@ -68359,17 +68499,16 @@ var FileUtil = class {
|
|
|
68359
68499
|
* @memberof FileUtil
|
|
68360
68500
|
*/
|
|
68361
68501
|
async chooseFileAndUpload(context, params, data, option = {}) {
|
|
68362
|
-
const { accept, multiple, showUploadManager } = option;
|
|
68363
|
-
const urls = ibiz.util.file.calcFileUpDownUrl(
|
|
68502
|
+
const { accept, multiple, showUploadManager, extraParams } = option;
|
|
68503
|
+
const urls = ibiz.util.file.calcFileUpDownUrl(
|
|
68504
|
+
context,
|
|
68505
|
+
params,
|
|
68506
|
+
data,
|
|
68507
|
+
extraParams
|
|
68508
|
+
);
|
|
68364
68509
|
const files = await ibiz.util.file.chooseFile(accept, multiple);
|
|
68365
68510
|
let promises = [];
|
|
68366
|
-
const headers =
|
|
68367
|
-
const token = getAppCookie2(CoreConst3.TOKEN);
|
|
68368
|
-
if (token) {
|
|
68369
|
-
Object.assign(headers, {
|
|
68370
|
-
["".concat(ibiz.env.tokenHeader, "Authorization")]: "".concat(ibiz.env.tokenPrefix, "Bearer ").concat(token)
|
|
68371
|
-
});
|
|
68372
|
-
}
|
|
68511
|
+
const headers = this.getUploadHeaders();
|
|
68373
68512
|
if (showUploadManager) {
|
|
68374
68513
|
promises = await ibiz.notification.uploadManager({
|
|
68375
68514
|
uploadUrl: urls.uploadUrl,
|
|
@@ -76500,13 +76639,19 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
76500
76639
|
ibiz.i18n.t("runtime.engine.logicOpendata")
|
|
76501
76640
|
);
|
|
76502
76641
|
} else {
|
|
76642
|
+
if (result.ok && result.data && result.data.length > 0) {
|
|
76643
|
+
this.view.evt.emit("onDataChange", {
|
|
76644
|
+
data: result.data,
|
|
76645
|
+
actionType: "EDIT"
|
|
76646
|
+
});
|
|
76647
|
+
}
|
|
76503
76648
|
return {
|
|
76504
76649
|
cancel: result ? !result.ok : true
|
|
76505
76650
|
};
|
|
76506
76651
|
}
|
|
76507
76652
|
}
|
|
76508
76653
|
/**
|
|
76509
|
-
*
|
|
76654
|
+
* 打开新建数据视图
|
|
76510
76655
|
*
|
|
76511
76656
|
* @author lxm
|
|
76512
76657
|
* @date 2022-09-01 18:09:19
|
|
@@ -76543,6 +76688,12 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
76543
76688
|
ibiz.i18n.t("runtime.engine.logicNewdata")
|
|
76544
76689
|
);
|
|
76545
76690
|
} else {
|
|
76691
|
+
if (result.ok && result.data && result.data.length > 0) {
|
|
76692
|
+
this.view.evt.emit("onDataChange", {
|
|
76693
|
+
data: result.data,
|
|
76694
|
+
actionType: "NEW"
|
|
76695
|
+
});
|
|
76696
|
+
}
|
|
76546
76697
|
return {
|
|
76547
76698
|
cancel: result ? !result.ok : true
|
|
76548
76699
|
};
|
|
@@ -80123,6 +80274,7 @@ export {
|
|
|
80123
80274
|
generateCacheKy,
|
|
80124
80275
|
generateEditorRules,
|
|
80125
80276
|
generateRules,
|
|
80277
|
+
generateYearWeekRange,
|
|
80126
80278
|
getAcItemProvider,
|
|
80127
80279
|
getAllItems,
|
|
80128
80280
|
getAllPanelField,
|
|
@@ -80174,6 +80326,7 @@ export {
|
|
|
80174
80326
|
getViewProvider,
|
|
80175
80327
|
getWFContext,
|
|
80176
80328
|
getWFSubmitViewId,
|
|
80329
|
+
getWeeksInYear,
|
|
80177
80330
|
handleAllSettled,
|
|
80178
80331
|
hasDeCodeName,
|
|
80179
80332
|
hasSubRoute,
|