@ibiz-template/runtime 0.7.41-alpha.112 → 0.7.41-alpha.114
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 +264 -44
- package/dist/index.system.min.js +1 -1
- package/out/config/global-config.d.ts.map +1 -1
- package/out/config/global-config.js +1 -0
- package/out/constant/predefined-attributes.d.ts +5 -1
- package/out/constant/predefined-attributes.d.ts.map +1 -1
- package/out/constant/predefined-attributes.js +4 -0
- package/out/controller/common/control/md-control.controller.js +1 -1
- package/out/controller/control/form/form/form.controller.d.ts +9 -1
- package/out/controller/control/form/form/form.controller.d.ts.map +1 -1
- package/out/controller/control/form/form/form.controller.js +54 -5
- 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 +5 -0
- package/out/controller/control/grid/grid/grid.controller.d.ts +4 -0
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +45 -8
- 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 +37 -6
- package/out/controller/control/medit-view-panel/medit-view-panel.controller.d.ts +16 -1
- package/out/controller/control/medit-view-panel/medit-view-panel.controller.d.ts.map +1 -1
- package/out/controller/control/medit-view-panel/medit-view-panel.controller.js +31 -0
- package/out/controller/utils/data-file-util/data-file-util.d.ts +2 -1
- package/out/controller/utils/data-file-util/data-file-util.d.ts.map +1 -1
- package/out/controller/utils/data-file-util/data-file-util.js +11 -6
- package/out/interface/api/call/i-api-medit-view9.call.d.ts +20 -0
- package/out/interface/api/call/i-api-medit-view9.call.d.ts.map +1 -1
- package/out/interface/api/common/global-config/i-api-global-common-config.d.ts +9 -0
- package/out/interface/api/common/global-config/i-api-global-common-config.d.ts.map +1 -1
- package/out/interface/api/controller/control/i-api-medit-view-panel.controller.d.ts +9 -0
- package/out/interface/api/controller/control/i-api-medit-view-panel.controller.d.ts.map +1 -1
- package/out/interface/api/util/i-api-excel-util.d.ts +53 -1
- package/out/interface/api/util/i-api-excel-util.d.ts.map +1 -1
- package/out/interface/controller/state/control/i-tree.state.d.ts +12 -0
- package/out/interface/controller/state/control/i-tree.state.d.ts.map +1 -1
- package/out/interface/provider/i-platform-provider.d.ts +54 -2
- package/out/interface/provider/i-platform-provider.d.ts.map +1 -1
- package/out/locale/en/index.d.ts +3 -0
- package/out/locale/en/index.d.ts.map +1 -1
- package/out/locale/en/index.js +3 -0
- package/out/locale/zh-CN/index.d.ts +3 -0
- package/out/locale/zh-CN/index.d.ts.map +1 -1
- package/out/locale/zh-CN/index.js +3 -0
- package/out/platform/provider/platform-provider-base.d.ts.map +1 -1
- package/out/platform/provider/platform-provider-base.js +1 -2
- package/out/service/vo/tree-node-data/tree-code-list-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-code-list-node-data.js +2 -0
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts +14 -0
- package/out/service/vo/tree-node-data/tree-data-set-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-data-set-node-data.js +33 -0
- package/out/service/vo/tree-node-data/tree-node-data.d.ts +16 -0
- package/out/service/vo/tree-node-data/tree-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-node-data.js +25 -0
- package/out/service/vo/tree-node-data/tree-static-node-data.d.ts.map +1 -1
- package/out/service/vo/tree-node-data/tree-static-node-data.js +2 -0
- package/out/ui-action/provider/front-ui-action-provider.d.ts.map +1 -1
- package/out/ui-action/provider/front-ui-action-provider.js +3 -1
- package/package.json +3 -3
- package/src/config/global-config.ts +1 -0
- package/src/constant/predefined-attributes.ts +5 -0
- package/src/controller/common/control/md-control.controller.ts +1 -1
- package/src/controller/control/form/form/form.controller.ts +58 -11
- package/src/controller/control/form/form-detail/form-druipart/form-druipart.controller.ts +3 -0
- package/src/controller/control/grid/grid/grid.controller.ts +63 -11
- package/src/controller/control/md-ctrl/md-ctrl.controller.ts +52 -7
- package/src/controller/control/medit-view-panel/medit-view-panel.controller.ts +39 -1
- package/src/controller/utils/data-file-util/data-file-util.ts +21 -9
- package/src/interface/api/call/i-api-medit-view9.call.ts +21 -0
- package/src/interface/api/common/global-config/i-api-global-common-config.ts +10 -0
- package/src/interface/api/controller/control/i-api-medit-view-panel.controller.ts +10 -0
- package/src/interface/api/util/i-api-excel-util.ts +38 -1
- package/src/interface/controller/state/control/i-tree.state.ts +14 -0
- package/src/interface/provider/i-platform-provider.ts +43 -2
- package/src/locale/en/index.ts +4 -0
- package/src/locale/zh-CN/index.ts +3 -0
- package/src/platform/provider/platform-provider-base.ts +1 -2
- package/src/service/vo/tree-node-data/tree-code-list-node-data.ts +2 -0
- package/src/service/vo/tree-node-data/tree-data-set-node-data.ts +35 -0
- package/src/service/vo/tree-node-data/tree-node-data.ts +33 -0
- package/src/service/vo/tree-node-data/tree-static-node-data.ts +2 -0
- package/src/ui-action/provider/front-ui-action-provider.ts +3 -1
package/dist/index.esm.js
CHANGED
|
@@ -20004,7 +20004,8 @@ var GlobalConfig = class {
|
|
|
20004
20004
|
aiChunkView: "",
|
|
20005
20005
|
aiChunkEntity: "",
|
|
20006
20006
|
counterMaxValue: 99,
|
|
20007
|
-
enhancedUI: false
|
|
20007
|
+
enhancedUI: false,
|
|
20008
|
+
maxExportRowsDefault: 1e3
|
|
20008
20009
|
};
|
|
20009
20010
|
// 全局分页流布局配置
|
|
20010
20011
|
this.drtab = {
|
|
@@ -21323,6 +21324,7 @@ var PredefinedControlRender = /* @__PURE__ */ ((PredefinedControlRender2) => {
|
|
|
21323
21324
|
var PredefinedAttributes = /* @__PURE__ */ ((PredefinedAttributes2) => {
|
|
21324
21325
|
PredefinedAttributes2["CLASSNAMES"] = "classNames";
|
|
21325
21326
|
PredefinedAttributes2["STYLES"] = "styles";
|
|
21327
|
+
PredefinedAttributes2["BEFORE_FRONT_EXPORT"] = "before-front-export";
|
|
21326
21328
|
return PredefinedAttributes2;
|
|
21327
21329
|
})(PredefinedAttributes || {});
|
|
21328
21330
|
|
|
@@ -26153,7 +26155,7 @@ async function importData2(opts) {
|
|
|
26153
26155
|
}
|
|
26154
26156
|
return result;
|
|
26155
26157
|
}
|
|
26156
|
-
async function exportData(
|
|
26158
|
+
async function exportData(args) {
|
|
26157
26159
|
if (!ibiz.util.getExcelUtil) {
|
|
26158
26160
|
throw new RuntimeError13(
|
|
26159
26161
|
ibiz.i18n.t("runtime.controller.utils.dataFileUtil.noExist")
|
|
@@ -26166,15 +26168,25 @@ async function exportData(header, data, fileName) {
|
|
|
26166
26168
|
);
|
|
26167
26169
|
}
|
|
26168
26170
|
try {
|
|
26169
|
-
|
|
26171
|
+
const {
|
|
26172
|
+
fileName,
|
|
26173
|
+
header,
|
|
26174
|
+
data,
|
|
26175
|
+
rowHeights,
|
|
26176
|
+
colWidths,
|
|
26177
|
+
multiHeader,
|
|
26178
|
+
merges,
|
|
26179
|
+
cellStyle
|
|
26180
|
+
} = args;
|
|
26181
|
+
exportExcel.exportJsonToExcelWithStyle({
|
|
26182
|
+
fileName,
|
|
26170
26183
|
header,
|
|
26171
|
-
// 表头内容 数组格式
|
|
26172
26184
|
data,
|
|
26173
|
-
|
|
26174
|
-
|
|
26175
|
-
|
|
26176
|
-
|
|
26177
|
-
|
|
26185
|
+
rowHeights,
|
|
26186
|
+
colWidths,
|
|
26187
|
+
multiHeader,
|
|
26188
|
+
merges,
|
|
26189
|
+
cellStyle
|
|
26178
26190
|
});
|
|
26179
26191
|
return { ok: true };
|
|
26180
26192
|
} catch (error) {
|
|
@@ -35464,7 +35476,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
35464
35476
|
}
|
|
35465
35477
|
const params = {
|
|
35466
35478
|
page: 0,
|
|
35467
|
-
size: appDEDataExport.maxRowCount ? appDEDataExport.maxRowCount :
|
|
35479
|
+
size: appDEDataExport.maxRowCount ? appDEDataExport.maxRowCount : ibiz.config.common.maxExportRowsDefault,
|
|
35468
35480
|
...args.params,
|
|
35469
35481
|
...resultParams
|
|
35470
35482
|
};
|
|
@@ -45923,12 +45935,18 @@ var FormController = class extends ControlController {
|
|
|
45923
45935
|
* @returns {*} {Promise<boolean>}
|
|
45924
45936
|
*/
|
|
45925
45937
|
async validate() {
|
|
45926
|
-
const
|
|
45927
|
-
|
|
45928
|
-
|
|
45929
|
-
|
|
45930
|
-
|
|
45931
|
-
|
|
45938
|
+
const details = [
|
|
45939
|
+
...this.formItems,
|
|
45940
|
+
...this.formMDCtrls,
|
|
45941
|
+
...this.formDruipart
|
|
45942
|
+
];
|
|
45943
|
+
const values = await Promise.all(details.map((detail) => detail.validate()));
|
|
45944
|
+
const result = values.findIndex((value) => !value) === -1;
|
|
45945
|
+
if (!result) {
|
|
45946
|
+
const failedDetails = details.filter((_, index) => !values[index]);
|
|
45947
|
+
this.logValidateFail(failedDetails);
|
|
45948
|
+
}
|
|
45949
|
+
return result;
|
|
45932
45950
|
}
|
|
45933
45951
|
/**
|
|
45934
45952
|
* @description 处理校验失败
|
|
@@ -45961,12 +45979,41 @@ var FormController = class extends ControlController {
|
|
|
45961
45979
|
* @memberof FormController
|
|
45962
45980
|
*/
|
|
45963
45981
|
async silentValidate() {
|
|
45982
|
+
const details = [
|
|
45983
|
+
...this.formItems,
|
|
45984
|
+
...this.formMDCtrls,
|
|
45985
|
+
...this.formDruipart
|
|
45986
|
+
];
|
|
45964
45987
|
const values = await Promise.all(
|
|
45965
|
-
|
|
45966
|
-
|
|
45967
|
-
|
|
45988
|
+
details.map((detail) => detail.silentValidate())
|
|
45989
|
+
);
|
|
45990
|
+
const result = values.findIndex((value) => !value) === -1;
|
|
45991
|
+
if (!result) {
|
|
45992
|
+
const failedDetails = details.filter((_, index) => !values[index]);
|
|
45993
|
+
this.logValidateFail(failedDetails);
|
|
45994
|
+
}
|
|
45995
|
+
return result;
|
|
45996
|
+
}
|
|
45997
|
+
/**
|
|
45998
|
+
* 输出校验失败的错误日志
|
|
45999
|
+
* @description 收集校验失败的表单成员名称,通过 ibiz.log.error 输出。名称使用表单成员标识
|
|
46000
|
+
* @protected
|
|
46001
|
+
* @param {FormDetailController[]} failedDetails 校验失败的表单成员集合
|
|
46002
|
+
* @memberof FormController
|
|
46003
|
+
*/
|
|
46004
|
+
logValidateFail(failedDetails) {
|
|
46005
|
+
const separator = ibiz.i18n.t(
|
|
46006
|
+
"runtime.controller.control.form.validateFailSeparator"
|
|
46007
|
+
);
|
|
46008
|
+
const names = failedDetails.map((detail) => detail.model.id || "").filter((name2) => !!name2);
|
|
46009
|
+
if (names.length === 0) {
|
|
46010
|
+
return;
|
|
46011
|
+
}
|
|
46012
|
+
ibiz.log.error(
|
|
46013
|
+
ibiz.i18n.t("runtime.controller.control.form.validateFail", {
|
|
46014
|
+
names: names.join(separator)
|
|
46015
|
+
})
|
|
45968
46016
|
);
|
|
45969
|
-
return values.findIndex((value) => !value) === -1;
|
|
45970
46017
|
}
|
|
45971
46018
|
/**
|
|
45972
46019
|
* 执行对应部件行为消息提示
|
|
@@ -46052,7 +46099,14 @@ var FormController = class extends ControlController {
|
|
|
46052
46099
|
* @memberof FormController
|
|
46053
46100
|
*/
|
|
46054
46101
|
setDetailError(name2, message) {
|
|
46055
|
-
|
|
46102
|
+
let detail = this.details[name2];
|
|
46103
|
+
if (!detail) {
|
|
46104
|
+
detail = Object.values(this.details).find((item) => {
|
|
46105
|
+
var _a3;
|
|
46106
|
+
const fieldId = (_a3 = item == null ? void 0 : item.model) == null ? void 0 : _a3.appDEFieldId;
|
|
46107
|
+
return !!fieldId && fieldId === name2;
|
|
46108
|
+
});
|
|
46109
|
+
}
|
|
46056
46110
|
const state = detail == null ? void 0 : detail.state;
|
|
46057
46111
|
if (state) {
|
|
46058
46112
|
state.error = message;
|
|
@@ -47560,9 +47614,12 @@ var FormDRUIPartController = class extends FormDetailController {
|
|
|
47560
47614
|
);
|
|
47561
47615
|
}
|
|
47562
47616
|
this.form.evt.on("onBeforeSave", async () => {
|
|
47617
|
+
var _a3;
|
|
47563
47618
|
if (this.isNeedSyncEmbed && this.embedView && this.embedDataService) {
|
|
47564
47619
|
await this.saveEmbedViewData();
|
|
47565
47620
|
await this.SyncEmbedDataToForm();
|
|
47621
|
+
} else if (this.model.needSave && this.embedView) {
|
|
47622
|
+
await ((_a3 = this.embedView) == null ? void 0 : _a3.call("Save" /* SAVE */));
|
|
47566
47623
|
}
|
|
47567
47624
|
});
|
|
47568
47625
|
}
|
|
@@ -53104,12 +53161,15 @@ var GridController = class extends MDControlController {
|
|
|
53104
53161
|
const { dedataExportId, degridColumns = [] } = this.model;
|
|
53105
53162
|
const excelModel = {
|
|
53106
53163
|
header: [],
|
|
53107
|
-
fields: []
|
|
53164
|
+
fields: [],
|
|
53165
|
+
exportColumns: [],
|
|
53166
|
+
colWidths: []
|
|
53108
53167
|
};
|
|
53109
53168
|
if (dedataExportId) {
|
|
53110
53169
|
if (this.allExportColumns.length) {
|
|
53111
53170
|
excelModel.fields = this.allExportColumns.map((x) => x.appDEFieldId);
|
|
53112
53171
|
excelModel.header = this.allExportColumns.map((x) => x.caption);
|
|
53172
|
+
excelModel.exportColumns = this.allExportColumns;
|
|
53113
53173
|
}
|
|
53114
53174
|
} else {
|
|
53115
53175
|
const exportColumns = this.state.columnStates.filter((column) => {
|
|
@@ -53125,6 +53185,12 @@ var GridController = class extends MDControlController {
|
|
|
53125
53185
|
});
|
|
53126
53186
|
excelModel.fields = exportColumns.map((item) => item.id);
|
|
53127
53187
|
excelModel.header = exportColumns.map((item) => item.caption);
|
|
53188
|
+
excelModel.colWidths = exportColumns.map((item) => {
|
|
53189
|
+
return {
|
|
53190
|
+
wpx: item.width || 150
|
|
53191
|
+
};
|
|
53192
|
+
});
|
|
53193
|
+
excelModel.exportColumns = exportColumns;
|
|
53128
53194
|
}
|
|
53129
53195
|
return excelModel;
|
|
53130
53196
|
}
|
|
@@ -53199,7 +53265,10 @@ var GridController = class extends MDControlController {
|
|
|
53199
53265
|
page: 0,
|
|
53200
53266
|
offset: (startPage - 1) * size,
|
|
53201
53267
|
size: (endPage - startPage + 1) * size
|
|
53202
|
-
} : {
|
|
53268
|
+
} : {
|
|
53269
|
+
size: ((_a3 = this.dataExport) == null ? void 0 : _a3.maxRowCount) || ibiz.config.common.maxExportRowsDefault,
|
|
53270
|
+
page: 0
|
|
53271
|
+
};
|
|
53203
53272
|
data = await this.loadData({ viewParam });
|
|
53204
53273
|
} else if (type === "selectedRows") {
|
|
53205
53274
|
data = this.getData();
|
|
@@ -53244,7 +53313,10 @@ var GridController = class extends MDControlController {
|
|
|
53244
53313
|
page: 0,
|
|
53245
53314
|
offset: (startPage - 1) * size,
|
|
53246
53315
|
size: (endPage - startPage + 1) * size
|
|
53247
|
-
} : {
|
|
53316
|
+
} : {
|
|
53317
|
+
size: ((_a3 = this.dataExport) == null ? void 0 : _a3.maxRowCount) || ibiz.config.common.maxExportRowsDefault,
|
|
53318
|
+
page: 0
|
|
53319
|
+
};
|
|
53248
53320
|
}
|
|
53249
53321
|
Object.assign(fetchParams, tempParams);
|
|
53250
53322
|
await this.service.exportData(this.dataExport, this.context, fetchParams);
|
|
@@ -53256,19 +53328,19 @@ var GridController = class extends MDControlController {
|
|
|
53256
53328
|
* @memberof GridController
|
|
53257
53329
|
*/
|
|
53258
53330
|
async exportData(args) {
|
|
53259
|
-
var _a3, _b2;
|
|
53331
|
+
var _a3, _b2, _c;
|
|
53260
53332
|
if ((_a3 = this.dataExport) == null ? void 0 : _a3.enableBackend) {
|
|
53261
53333
|
await this.excuteBackendExport(args.params);
|
|
53262
53334
|
return;
|
|
53263
53335
|
}
|
|
53264
|
-
|
|
53336
|
+
await this.fillExportCodelistMap();
|
|
53337
|
+
const data = await this.getExportData(args.params);
|
|
53338
|
+
const { header, fields, exportColumns, colWidths } = this.getDataExcelModel();
|
|
53265
53339
|
if (!header) {
|
|
53266
53340
|
throw new RuntimeError40(
|
|
53267
53341
|
ibiz.i18n.t("runtime.controller.control.grid.tabularColumns")
|
|
53268
53342
|
);
|
|
53269
53343
|
}
|
|
53270
|
-
await this.fillExportCodelistMap();
|
|
53271
|
-
const data = await this.getExportData(args.params);
|
|
53272
53344
|
const formatData = this.formatExcelData(data, fields);
|
|
53273
53345
|
const table = formatData.map((v) => Object.values(v));
|
|
53274
53346
|
let fileName = this.model.logicName;
|
|
@@ -53280,11 +53352,30 @@ var GridController = class extends MDControlController {
|
|
|
53280
53352
|
now: /* @__PURE__ */ new Date()
|
|
53281
53353
|
});
|
|
53282
53354
|
}
|
|
53283
|
-
|
|
53355
|
+
const frontExportParams = {
|
|
53284
53356
|
header,
|
|
53285
53357
|
data: table,
|
|
53286
|
-
fileName
|
|
53287
|
-
|
|
53358
|
+
fileName,
|
|
53359
|
+
colWidths: () => {
|
|
53360
|
+
return colWidths;
|
|
53361
|
+
}
|
|
53362
|
+
};
|
|
53363
|
+
const frontExportAttri = (_c = this.model.controlAttributes) == null ? void 0 : _c.find((item) => {
|
|
53364
|
+
return item.attrName === "before-front-export" /* BEFORE_FRONT_EXPORT */;
|
|
53365
|
+
});
|
|
53366
|
+
if (frontExportAttri) {
|
|
53367
|
+
const { attrValue } = frontExportAttri;
|
|
53368
|
+
if (attrValue) {
|
|
53369
|
+
const frontExportResult = await ScriptFactory.asyncExecScriptFn(
|
|
53370
|
+
{ exportColumns, data },
|
|
53371
|
+
attrValue
|
|
53372
|
+
);
|
|
53373
|
+
if (frontExportResult) {
|
|
53374
|
+
Object.assign(frontExportParams, frontExportResult);
|
|
53375
|
+
}
|
|
53376
|
+
}
|
|
53377
|
+
}
|
|
53378
|
+
await ibiz.platform.frontExport(frontExportParams);
|
|
53288
53379
|
}
|
|
53289
53380
|
/**
|
|
53290
53381
|
* 计算默认值并返回一个对象,对象里的属性就是要填充的默认值
|
|
@@ -55398,6 +55489,30 @@ var TreeNodeData = class {
|
|
|
55398
55489
|
}
|
|
55399
55490
|
return this._deData;
|
|
55400
55491
|
}
|
|
55492
|
+
/**
|
|
55493
|
+
* @description 计算动态样式表
|
|
55494
|
+
* @protected
|
|
55495
|
+
* @param {IDETreeNode} model
|
|
55496
|
+
* @memberof TreeNodeData
|
|
55497
|
+
*/
|
|
55498
|
+
calcDynaClass(model) {
|
|
55499
|
+
const data = this._deData || {};
|
|
55500
|
+
if (model.dynaClass) {
|
|
55501
|
+
this._dynaClass = calcDynaClass(model.dynaClass, data);
|
|
55502
|
+
}
|
|
55503
|
+
}
|
|
55504
|
+
/**
|
|
55505
|
+
* @description 计算图形动态样式表
|
|
55506
|
+
* @protected
|
|
55507
|
+
* @param {IDETreeNode} model
|
|
55508
|
+
* @memberof TreeNodeData
|
|
55509
|
+
*/
|
|
55510
|
+
calcShapeDynaClass(model) {
|
|
55511
|
+
const data = this._deData || {};
|
|
55512
|
+
if (model.shapeDynaClass) {
|
|
55513
|
+
this._shapeDynaClass = calcDynaClass(model.shapeDynaClass, data);
|
|
55514
|
+
}
|
|
55515
|
+
}
|
|
55401
55516
|
};
|
|
55402
55517
|
|
|
55403
55518
|
// src/service/vo/tree-node-data/tree-code-list-node-data.ts
|
|
@@ -55427,6 +55542,8 @@ var TreeCodeListNodeData = class extends TreeNodeData {
|
|
|
55427
55542
|
this.srfkey = this._value;
|
|
55428
55543
|
this.srfmajortext = this._text;
|
|
55429
55544
|
this._icon = this.calcIcon(model, data.sysImage);
|
|
55545
|
+
this.calcDynaClass(model);
|
|
55546
|
+
this.calcShapeDynaClass(model);
|
|
55430
55547
|
const getDeKey = (key) => {
|
|
55431
55548
|
if (Object.prototype.hasOwnProperty.call(this._deData, key)) {
|
|
55432
55549
|
return key;
|
|
@@ -55533,6 +55650,8 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
|
55533
55650
|
} else if (model.childCntAppDEFieldId) {
|
|
55534
55651
|
this._leaf = !fieldValueToBoolean(data[model.childCntAppDEFieldId]);
|
|
55535
55652
|
}
|
|
55653
|
+
this.calcDynaClass(model);
|
|
55654
|
+
this.calcShapeDynaClass(model);
|
|
55536
55655
|
const dataItemKeyMap = /* @__PURE__ */ new Map();
|
|
55537
55656
|
const dataItemDefaultMap = /* @__PURE__ */ new Map();
|
|
55538
55657
|
(_a3 = model.detreeNodeDataItems) == null ? void 0 : _a3.forEach((dataItem) => {
|
|
@@ -55688,6 +55807,36 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
|
55688
55807
|
}
|
|
55689
55808
|
return Object.values(icon).length > 0 ? icon : void 0;
|
|
55690
55809
|
}
|
|
55810
|
+
/**
|
|
55811
|
+
* @description 计算动态样式表(附加实体节点样式表属性)
|
|
55812
|
+
* @protected
|
|
55813
|
+
* @param {IDETreeDataSetNode} model
|
|
55814
|
+
* @memberof TreeDataSetNodeData
|
|
55815
|
+
*/
|
|
55816
|
+
calcDynaClass(model) {
|
|
55817
|
+
super.calcDynaClass(model);
|
|
55818
|
+
const { clsAppDEFieldId } = model;
|
|
55819
|
+
if (clsAppDEFieldId && this._deData[clsAppDEFieldId]) {
|
|
55820
|
+
const fieldValue = this._deData[clsAppDEFieldId];
|
|
55821
|
+
this._dynaClass || (this._dynaClass = []);
|
|
55822
|
+
this._dynaClass.push(String(fieldValue));
|
|
55823
|
+
}
|
|
55824
|
+
}
|
|
55825
|
+
/**
|
|
55826
|
+
* @description 计算图形动态样式表(附加实体节点图形样式表属性)
|
|
55827
|
+
* @protected
|
|
55828
|
+
* @param {IDETreeDataSetNode} model
|
|
55829
|
+
* @memberof TreeDataSetNodeData
|
|
55830
|
+
*/
|
|
55831
|
+
calcShapeDynaClass(model) {
|
|
55832
|
+
super.calcShapeDynaClass(model);
|
|
55833
|
+
const { shapeClsAppDEFieldId } = model;
|
|
55834
|
+
if (shapeClsAppDEFieldId && this._deData[shapeClsAppDEFieldId]) {
|
|
55835
|
+
const fieldValue = this._deData[shapeClsAppDEFieldId];
|
|
55836
|
+
this._shapeDynaClass || (this._shapeDynaClass = []);
|
|
55837
|
+
this._shapeDynaClass.push(String(fieldValue));
|
|
55838
|
+
}
|
|
55839
|
+
}
|
|
55691
55840
|
/**
|
|
55692
55841
|
* 计算节点数据项的自定义脚本内容
|
|
55693
55842
|
* @author lxm
|
|
@@ -55769,6 +55918,8 @@ var TreeStaticNodeData = class extends TreeNodeData {
|
|
|
55769
55918
|
this.srfkey = ((_a3 = this._deData) == null ? void 0 : _a3.srfkey) || this._value;
|
|
55770
55919
|
this.srfmajortext = ((_b2 = this._deData) == null ? void 0 : _b2.srfmajortext) || this._text;
|
|
55771
55920
|
this._icon = this.calcIcon(model);
|
|
55921
|
+
this.calcDynaClass(model);
|
|
55922
|
+
this.calcShapeDynaClass(model);
|
|
55772
55923
|
}
|
|
55773
55924
|
};
|
|
55774
55925
|
|
|
@@ -61009,19 +61160,21 @@ var MDCtrlController = class extends MDControlController {
|
|
|
61009
61160
|
}
|
|
61010
61161
|
/**
|
|
61011
61162
|
* @description 获取数据导出模型
|
|
61012
|
-
* @returns {*} {{ header: string[]
|
|
61163
|
+
* @returns {*} {{ header: string[], fields: string[], exportColumns: IData[] }}
|
|
61013
61164
|
* @memberof MDCtrlController
|
|
61014
61165
|
*/
|
|
61015
61166
|
getDataExcelModel() {
|
|
61016
61167
|
const { dedataExportId } = this.model;
|
|
61017
61168
|
const excelModel = {
|
|
61018
61169
|
header: [],
|
|
61019
|
-
fields: []
|
|
61170
|
+
fields: [],
|
|
61171
|
+
exportColumns: []
|
|
61020
61172
|
};
|
|
61021
61173
|
if (dedataExportId) {
|
|
61022
61174
|
if (this.allExportColumns.length) {
|
|
61023
61175
|
excelModel.fields = this.allExportColumns.map((x) => x.appDEFieldId);
|
|
61024
61176
|
excelModel.header = this.allExportColumns.map((x) => x.caption);
|
|
61177
|
+
excelModel.exportColumns = this.allExportColumns;
|
|
61025
61178
|
}
|
|
61026
61179
|
}
|
|
61027
61180
|
return excelModel;
|
|
@@ -61063,7 +61216,10 @@ var MDCtrlController = class extends MDControlController {
|
|
|
61063
61216
|
page: 0,
|
|
61064
61217
|
offset: (startPage - 1) * size,
|
|
61065
61218
|
size: (endPage - startPage + 1) * size
|
|
61066
|
-
} : {
|
|
61219
|
+
} : {
|
|
61220
|
+
size: ((_a3 = this.dataExport) == null ? void 0 : _a3.maxRowCount) || ibiz.config.common.maxExportRowsDefault,
|
|
61221
|
+
page: 0
|
|
61222
|
+
};
|
|
61067
61223
|
data = await this.loadData({ viewParam });
|
|
61068
61224
|
} else if (type === "selectedRows") {
|
|
61069
61225
|
data = this.getData();
|
|
@@ -61156,7 +61312,10 @@ var MDCtrlController = class extends MDControlController {
|
|
|
61156
61312
|
page: 0,
|
|
61157
61313
|
offset: (startPage - 1) * size,
|
|
61158
61314
|
size: (endPage - startPage + 1) * size
|
|
61159
|
-
} : {
|
|
61315
|
+
} : {
|
|
61316
|
+
size: ((_a3 = this.dataExport) == null ? void 0 : _a3.maxRowCount) || ibiz.config.common.maxExportRowsDefault,
|
|
61317
|
+
page: 0
|
|
61318
|
+
};
|
|
61160
61319
|
}
|
|
61161
61320
|
Object.assign(fetchParams, tempParams);
|
|
61162
61321
|
await this.service.exportData(this.dataExport, this.context, fetchParams);
|
|
@@ -61171,12 +61330,12 @@ var MDCtrlController = class extends MDControlController {
|
|
|
61171
61330
|
* @memberof MDCtrlController
|
|
61172
61331
|
*/
|
|
61173
61332
|
async exportData(args = {}) {
|
|
61174
|
-
var _a3;
|
|
61333
|
+
var _a3, _b2;
|
|
61175
61334
|
if ((_a3 = this.dataExport) == null ? void 0 : _a3.enableBackend) {
|
|
61176
61335
|
await this.excuteBackendExport(args.params || {});
|
|
61177
61336
|
return;
|
|
61178
61337
|
}
|
|
61179
|
-
const { header, fields } = this.getDataExcelModel();
|
|
61338
|
+
const { header, fields, exportColumns } = this.getDataExcelModel();
|
|
61180
61339
|
if (!header) {
|
|
61181
61340
|
throw new RuntimeError45(
|
|
61182
61341
|
ibiz.i18n.t("runtime.controller.common.md.tabularColumns")
|
|
@@ -61185,11 +61344,30 @@ var MDCtrlController = class extends MDControlController {
|
|
|
61185
61344
|
const data = await this.getExportData(args.params || {});
|
|
61186
61345
|
const formatData = this.formatExcelData(data, fields);
|
|
61187
61346
|
const table = formatData.map((v) => Object.values(v));
|
|
61188
|
-
|
|
61347
|
+
const frontExportParams = {
|
|
61189
61348
|
header,
|
|
61190
61349
|
data: table,
|
|
61191
|
-
fileName: this.model.logicName
|
|
61192
|
-
|
|
61350
|
+
fileName: this.model.logicName,
|
|
61351
|
+
colWidths: () => {
|
|
61352
|
+
return [];
|
|
61353
|
+
}
|
|
61354
|
+
};
|
|
61355
|
+
const frontExportAttri = (_b2 = this.model.controlAttributes) == null ? void 0 : _b2.find((item) => {
|
|
61356
|
+
return item.attrName === "before-front-export" /* BEFORE_FRONT_EXPORT */;
|
|
61357
|
+
});
|
|
61358
|
+
if (frontExportAttri) {
|
|
61359
|
+
const { attrValue } = frontExportAttri;
|
|
61360
|
+
if (attrValue) {
|
|
61361
|
+
const frontExportResult = await ScriptFactory.asyncExecScriptFn(
|
|
61362
|
+
{ exportColumns, data },
|
|
61363
|
+
attrValue
|
|
61364
|
+
);
|
|
61365
|
+
if (frontExportResult) {
|
|
61366
|
+
Object.assign(frontExportParams, frontExportResult);
|
|
61367
|
+
}
|
|
61368
|
+
}
|
|
61369
|
+
}
|
|
61370
|
+
await ibiz.platform.frontExport(frontExportParams);
|
|
61193
61371
|
}
|
|
61194
61372
|
};
|
|
61195
61373
|
|
|
@@ -63485,6 +63663,43 @@ var MEditViewPanelController = class extends MDControlController {
|
|
|
63485
63663
|
getActiveView() {
|
|
63486
63664
|
return this.embedViews.get(this.state.activeTab);
|
|
63487
63665
|
}
|
|
63666
|
+
/**
|
|
63667
|
+
* @description 检测实体数据变更,子视图数据变更不应该触发列表加载
|
|
63668
|
+
* @protected
|
|
63669
|
+
* @param {IPortalMessage} _msg
|
|
63670
|
+
* @memberof MEditViewPanelController
|
|
63671
|
+
*/
|
|
63672
|
+
onDEDataChange(_msg) {
|
|
63673
|
+
ibiz.log.debug(
|
|
63674
|
+
ibiz.i18n.t("runtime.controller.control.meditViewPanel.ignoreDataChange")
|
|
63675
|
+
);
|
|
63676
|
+
}
|
|
63677
|
+
/**
|
|
63678
|
+
* @description 保存数据
|
|
63679
|
+
* @param {IApiFormSaveParams} [args]
|
|
63680
|
+
* @returns {*} {Promise<IApiData[]>}
|
|
63681
|
+
* @memberof MEditViewPanelController
|
|
63682
|
+
*/
|
|
63683
|
+
async save(args = { silent: true }) {
|
|
63684
|
+
if (this.state.panelUiItems.length === 0) {
|
|
63685
|
+
return [];
|
|
63686
|
+
}
|
|
63687
|
+
const allViews = this.state.panelUiItems.map((item) => {
|
|
63688
|
+
return this.embedViews.get(item.id);
|
|
63689
|
+
});
|
|
63690
|
+
if (allViews.length === 0) {
|
|
63691
|
+
return [];
|
|
63692
|
+
}
|
|
63693
|
+
const result = await Promise.all(
|
|
63694
|
+
allViews.map(async (view) => {
|
|
63695
|
+
return view == null ? void 0 : view.call("Save" /* SAVE */, args);
|
|
63696
|
+
})
|
|
63697
|
+
);
|
|
63698
|
+
return result.flatMap((r) => {
|
|
63699
|
+
var _a3;
|
|
63700
|
+
return (_a3 = r == null ? void 0 : r.data) != null ? _a3 : [];
|
|
63701
|
+
});
|
|
63702
|
+
}
|
|
63488
63703
|
};
|
|
63489
63704
|
|
|
63490
63705
|
// src/controller/control/map/map.service.ts
|
|
@@ -68184,8 +68399,7 @@ var PlatformProviderBase = class {
|
|
|
68184
68399
|
* @memberof PlatformProviderBase
|
|
68185
68400
|
*/
|
|
68186
68401
|
async frontExport(args) {
|
|
68187
|
-
|
|
68188
|
-
await exportData(header, data, fileName);
|
|
68402
|
+
await exportData(args);
|
|
68189
68403
|
return true;
|
|
68190
68404
|
}
|
|
68191
68405
|
/**
|
|
@@ -91164,6 +91378,8 @@ var en = {
|
|
|
91164
91378
|
},
|
|
91165
91379
|
form: {
|
|
91166
91380
|
formCompletion: "Please check the form completion!",
|
|
91381
|
+
validateFail: "Form validation failed, failed fields include: {names}",
|
|
91382
|
+
validateFailSeparator: ", ",
|
|
91167
91383
|
savedSuccessfully: "{srfmajortext}Saved successfully!",
|
|
91168
91384
|
prompt: "prompt",
|
|
91169
91385
|
deletion: "Confirm deletion?",
|
|
@@ -91222,7 +91438,8 @@ var en = {
|
|
|
91222
91438
|
},
|
|
91223
91439
|
meditViewPanel: {
|
|
91224
91440
|
DraftNew: "Draft - New",
|
|
91225
|
-
dataExist: "Edit View Panel widget UI data does not exist"
|
|
91441
|
+
dataExist: "Edit View Panel widget UI data does not exist",
|
|
91442
|
+
ignoreDataChange: "Ignore data changes in the multi-edit panel"
|
|
91226
91443
|
},
|
|
91227
91444
|
panel: {
|
|
91228
91445
|
panelData: "Panel data not captured"
|
|
@@ -91851,6 +92068,8 @@ var zhCn = {
|
|
|
91851
92068
|
},
|
|
91852
92069
|
form: {
|
|
91853
92070
|
formCompletion: "\u8BF7\u68C0\u67E5\u8868\u5355\u586B\u5199\uFF01",
|
|
92071
|
+
validateFail: "\u8868\u5355\u6821\u9A8C\u5931\u8D25\uFF0C\u5931\u8D25\u8868\u5355\u6210\u5458\u5305\u542B: {names}",
|
|
92072
|
+
validateFailSeparator: "\u3001",
|
|
91854
92073
|
savedSuccessfully: "{srfmajortext}\u4FDD\u5B58\u6210\u529F",
|
|
91855
92074
|
prompt: "\u63D0\u793A",
|
|
91856
92075
|
deletion: "\u786E\u8BA4\u5220\u9664\u5417\uFF1F",
|
|
@@ -91909,7 +92128,8 @@ var zhCn = {
|
|
|
91909
92128
|
},
|
|
91910
92129
|
meditViewPanel: {
|
|
91911
92130
|
DraftNew: "\u8349\u7A3F--\u65B0\u5EFA",
|
|
91912
|
-
dataExist: "\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728"
|
|
92131
|
+
dataExist: "\u7F16\u8F91\u89C6\u56FE\u9762\u677F\u90E8\u4EF6UI\u6570\u636E\u4E0D\u5B58\u5728",
|
|
92132
|
+
ignoreDataChange: "\u591A\u7F16\u8F91\u9762\u677F\u5FFD\u7565\u6570\u636E\u53D8\u66F4"
|
|
91913
92133
|
},
|
|
91914
92134
|
panel: {
|
|
91915
92135
|
panelData: "\u672A\u83B7\u53D6\u5230\u9762\u677F\u6570\u636E"
|