@ibiz-template/runtime 0.7.2 → 0.7.3
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 +137 -7
- package/dist/index.system.min.js +1 -1
- package/out/controller/common/view/app-data-upload-view.controller.d.ts +14 -0
- package/out/controller/common/view/app-data-upload-view.controller.d.ts.map +1 -1
- package/out/controller/common/view/app-data-upload-view.controller.js +14 -1
- package/out/controller/common/view/view.controller.d.ts.map +1 -1
- package/out/controller/common/view/view.controller.js +5 -0
- package/out/controller/utils/data-file-util/data-file-util.d.ts +118 -0
- 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 +159 -0
- package/out/model/data-entity/data-entity.d.ts +10 -1
- package/out/model/data-entity/data-entity.d.ts.map +1 -1
- package/out/model/data-entity/data-entity.js +14 -0
- package/out/service/utils/dynamic-code-list/dynamic-code-list.js +2 -2
- 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 +7 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1036,6 +1036,14 @@ function findFieldById(entity, fieldId) {
|
|
|
1036
1036
|
var _a;
|
|
1037
1037
|
return (_a = entity.appDEFields) == null ? void 0 : _a.find((item) => item.id === fieldId);
|
|
1038
1038
|
}
|
|
1039
|
+
function getDefaultDataImport(entity) {
|
|
1040
|
+
var _a;
|
|
1041
|
+
if (entity.defaultAppDEDataImportId) {
|
|
1042
|
+
return (_a = entity.appDEDataImports) == null ? void 0 : _a.find(
|
|
1043
|
+
(item) => item.id === entity.defaultAppDEDataImportId
|
|
1044
|
+
);
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1039
1047
|
|
|
1040
1048
|
// src/model/ui-action/ui-action.ts
|
|
1041
1049
|
async function getUIActionById(id, appId2) {
|
|
@@ -6780,15 +6788,15 @@ var DynamicCodeListCache = class {
|
|
|
6780
6788
|
}
|
|
6781
6789
|
presetconvertData(data) {
|
|
6782
6790
|
const result = {};
|
|
6783
|
-
const { color, bkcolor, disabled, id, text,
|
|
6791
|
+
const { color, bkcolor, disabled, id, text, value, cls } = data;
|
|
6784
6792
|
result.value = value;
|
|
6785
6793
|
result.color = color;
|
|
6786
6794
|
result.bkcolor = bkcolor;
|
|
6787
6795
|
result.text = text;
|
|
6788
6796
|
result.id = id;
|
|
6789
|
-
result.id = label;
|
|
6790
6797
|
result.disableSelect = disabled;
|
|
6791
6798
|
result.cls = cls;
|
|
6799
|
+
result.data = data;
|
|
6792
6800
|
return result;
|
|
6793
6801
|
}
|
|
6794
6802
|
sortShoworder(arr) {
|
|
@@ -12670,7 +12678,12 @@ var TreeDataSetNodeData = class _TreeDataSetNodeData extends TreeNodeData {
|
|
|
12670
12678
|
const icon = super.calcIcon(model) || {};
|
|
12671
12679
|
const { iconAppDEFieldId, detreeNodeDataItems } = model;
|
|
12672
12680
|
if (iconAppDEFieldId && this._deData[iconAppDEFieldId]) {
|
|
12673
|
-
|
|
12681
|
+
const value = this._deData[iconAppDEFieldId];
|
|
12682
|
+
if (value.indexOf("fa-") !== -1) {
|
|
12683
|
+
icon.cssClass = value;
|
|
12684
|
+
} else {
|
|
12685
|
+
icon.imagePath = value;
|
|
12686
|
+
}
|
|
12674
12687
|
}
|
|
12675
12688
|
if (icon) {
|
|
12676
12689
|
this._icon = icon;
|
|
@@ -15004,6 +15017,7 @@ import {
|
|
|
15004
15017
|
RuntimeError as RuntimeError32,
|
|
15005
15018
|
selectFile
|
|
15006
15019
|
} from "@ibiz-template/core";
|
|
15020
|
+
import { mergeRight as mergeRight2 } from "ramda";
|
|
15007
15021
|
var asyncImportUrl = "asyncimportdata2";
|
|
15008
15022
|
var importUrl = "importdata2";
|
|
15009
15023
|
function listenAsyncAction(id) {
|
|
@@ -15231,6 +15245,91 @@ async function selectAndImport(opts) {
|
|
|
15231
15245
|
});
|
|
15232
15246
|
});
|
|
15233
15247
|
}
|
|
15248
|
+
async function asyncImportData2(opts) {
|
|
15249
|
+
var _a;
|
|
15250
|
+
let path2 = "/".concat(opts.appDataEntity.codeName2.toLowerCase());
|
|
15251
|
+
if (opts.context) {
|
|
15252
|
+
const resPath = calcResPath(opts.context, opts.appDataEntity);
|
|
15253
|
+
path2 = resPath + path2;
|
|
15254
|
+
}
|
|
15255
|
+
const url = "".concat(path2, "/asyncimportdata2");
|
|
15256
|
+
const queryData = {
|
|
15257
|
+
srfossfileid: opts.fileId,
|
|
15258
|
+
srfimportschemaid: opts.schemaId
|
|
15259
|
+
};
|
|
15260
|
+
const srfimporttag = ((_a = opts.dataImport) == null ? void 0 : _a.id) || opts.appDataEntity.defaultAppDEDataImportId;
|
|
15261
|
+
if (srfimporttag) {
|
|
15262
|
+
Object.assign(queryData, { srfimporttag });
|
|
15263
|
+
}
|
|
15264
|
+
await ibiz.net.request(url, {
|
|
15265
|
+
method: "get",
|
|
15266
|
+
params: queryData
|
|
15267
|
+
});
|
|
15268
|
+
ibiz.notification.info({
|
|
15269
|
+
desc: ibiz.i18n.t("component.dataImport.startImport")
|
|
15270
|
+
});
|
|
15271
|
+
}
|
|
15272
|
+
function calcImportSchemaData(opts) {
|
|
15273
|
+
var _a, _b, _c, _d;
|
|
15274
|
+
let data = {
|
|
15275
|
+
system_tag: (_a = ibiz.appData) == null ? void 0 : _a.context.srfsystemid,
|
|
15276
|
+
// 系统标记
|
|
15277
|
+
data_entity_tag: (_b = opts.appDataEntity) == null ? void 0 : _b.codeName,
|
|
15278
|
+
// 数据实体标记
|
|
15279
|
+
import_tag: ((_c = opts.dataImport) == null ? void 0 : _c.id) || ((_d = opts.appDataEntity) == null ? void 0 : _d.defaultAppDEDataImportId),
|
|
15280
|
+
// 导入标记 导入模型的代码名称
|
|
15281
|
+
owner_type: "PERSONAL"
|
|
15282
|
+
// 所有者类型
|
|
15283
|
+
};
|
|
15284
|
+
data = mergeRight2(data, opts.data);
|
|
15285
|
+
return data;
|
|
15286
|
+
}
|
|
15287
|
+
async function createImportSchema(opts) {
|
|
15288
|
+
const data = calcImportSchemaData(opts);
|
|
15289
|
+
const url = "extension/import_schemas";
|
|
15290
|
+
const res = await ibiz.net.request(url, {
|
|
15291
|
+
method: "post",
|
|
15292
|
+
data
|
|
15293
|
+
});
|
|
15294
|
+
return res;
|
|
15295
|
+
}
|
|
15296
|
+
async function updateImportSchema(opts) {
|
|
15297
|
+
const data = calcImportSchemaData(opts);
|
|
15298
|
+
const url = "extension/import_schemas/".concat(data.id);
|
|
15299
|
+
const res = await ibiz.net.request(url, {
|
|
15300
|
+
method: "put",
|
|
15301
|
+
data
|
|
15302
|
+
});
|
|
15303
|
+
return res;
|
|
15304
|
+
}
|
|
15305
|
+
async function getImportSchema(id) {
|
|
15306
|
+
const url = "extension/import_schemas/".concat(id);
|
|
15307
|
+
const res = await ibiz.net.request(url, {
|
|
15308
|
+
method: "get"
|
|
15309
|
+
});
|
|
15310
|
+
return res;
|
|
15311
|
+
}
|
|
15312
|
+
async function deleteImportSchema(id) {
|
|
15313
|
+
const url = "extension/import_schemas/".concat(id);
|
|
15314
|
+
const res = await ibiz.net.request(url, {
|
|
15315
|
+
method: "delete"
|
|
15316
|
+
});
|
|
15317
|
+
return res;
|
|
15318
|
+
}
|
|
15319
|
+
async function fetchImportSchemas(opts) {
|
|
15320
|
+
var _a;
|
|
15321
|
+
const params = {
|
|
15322
|
+
n_import_tag_eq: opts.appDataEntity.defaultAppDEDataImportId,
|
|
15323
|
+
n_system_tag_eq: (_a = ibiz.appData) == null ? void 0 : _a.context.srfsystemid,
|
|
15324
|
+
n_data_entity_tag_eq: opts.appDataEntity.codeName
|
|
15325
|
+
};
|
|
15326
|
+
const url = "extension/import_schemas/fetch_cur_user";
|
|
15327
|
+
const res = await ibiz.net.request(url, {
|
|
15328
|
+
method: "post",
|
|
15329
|
+
data: params
|
|
15330
|
+
});
|
|
15331
|
+
return res;
|
|
15332
|
+
}
|
|
15234
15333
|
|
|
15235
15334
|
// src/controller/utils/jsonschema/entity.ts
|
|
15236
15335
|
async function getEntitySchema(entityId, context) {
|
|
@@ -15484,7 +15583,7 @@ var BaseController = class {
|
|
|
15484
15583
|
|
|
15485
15584
|
// src/controller/utils/view-msg/view-msg-controller.ts
|
|
15486
15585
|
import { RuntimeError as RuntimeError33, RuntimeModelError as RuntimeModelError24 } from "@ibiz-template/core";
|
|
15487
|
-
import { isNil as isNil21, mergeRight as
|
|
15586
|
+
import { isNil as isNil21, mergeRight as mergeRight3 } from "ramda";
|
|
15488
15587
|
var ViewMsgController = class _ViewMsgController {
|
|
15489
15588
|
constructor(msgGroupId) {
|
|
15490
15589
|
this.msgGroupId = msgGroupId;
|
|
@@ -15684,7 +15783,7 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
15684
15783
|
if (removeModeField && !isNil21(item[removeModeField])) {
|
|
15685
15784
|
message.removeMode = item[removeModeField];
|
|
15686
15785
|
}
|
|
15687
|
-
return
|
|
15786
|
+
return mergeRight3(basicMsg, message);
|
|
15688
15787
|
});
|
|
15689
15788
|
return deViewMessages;
|
|
15690
15789
|
}
|
|
@@ -16038,6 +16137,11 @@ var ViewController = class extends BaseController {
|
|
|
16038
16137
|
const modalParams = {
|
|
16039
16138
|
title: message.title,
|
|
16040
16139
|
desc: message.message
|
|
16140
|
+
// todo 待模型修复
|
|
16141
|
+
// options: {
|
|
16142
|
+
// showClose: message.removeMode !== 0,
|
|
16143
|
+
// showConfirmButton: message.removeMode !== 0,
|
|
16144
|
+
// },
|
|
16041
16145
|
};
|
|
16042
16146
|
if (message.extraParams.userTag) {
|
|
16043
16147
|
Object.assign(modalParams, {
|
|
@@ -16113,6 +16217,24 @@ var AppDataUploadViewController = class extends ViewController {
|
|
|
16113
16217
|
}
|
|
16114
16218
|
return result;
|
|
16115
16219
|
}
|
|
16220
|
+
/**
|
|
16221
|
+
* 自定义导入数据方法
|
|
16222
|
+
* @author lxm
|
|
16223
|
+
* @date 2024-04-18 05:17:22
|
|
16224
|
+
* @param {{
|
|
16225
|
+
* fileId: string;
|
|
16226
|
+
* schemaId: string;
|
|
16227
|
+
* }} opts
|
|
16228
|
+
* @return {*} {Promise<void>}
|
|
16229
|
+
*/
|
|
16230
|
+
async asyncImportData2(opts) {
|
|
16231
|
+
return asyncImportData2({
|
|
16232
|
+
appDataEntity: this.state.appDataEntity,
|
|
16233
|
+
dataImport: this.state.deDataImport,
|
|
16234
|
+
context: this.context,
|
|
16235
|
+
...opts
|
|
16236
|
+
});
|
|
16237
|
+
}
|
|
16116
16238
|
};
|
|
16117
16239
|
|
|
16118
16240
|
// src/controller/common/view/mob-view.controller.ts
|
|
@@ -21243,7 +21365,7 @@ import {
|
|
|
21243
21365
|
ModelError as ModelError26,
|
|
21244
21366
|
RuntimeError as RuntimeError49
|
|
21245
21367
|
} from "@ibiz-template/core";
|
|
21246
|
-
import { mergeRight as
|
|
21368
|
+
import { mergeRight as mergeRight4 } from "ramda";
|
|
21247
21369
|
var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
21248
21370
|
async execAction(action, args) {
|
|
21249
21371
|
const { context, params, data, event, noWaitRoute } = args;
|
|
@@ -21495,7 +21617,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
|
|
|
21495
21617
|
params
|
|
21496
21618
|
);
|
|
21497
21619
|
const options = this.handleViewOptionParams(resultParams).modalOption || {};
|
|
21498
|
-
const popoverOpts =
|
|
21620
|
+
const popoverOpts = mergeRight4(
|
|
21499
21621
|
{
|
|
21500
21622
|
autoClose: true
|
|
21501
21623
|
},
|
|
@@ -39577,12 +39699,14 @@ export {
|
|
|
39577
39699
|
WizardPanelService,
|
|
39578
39700
|
WorkFlowService,
|
|
39579
39701
|
asyncImportData,
|
|
39702
|
+
asyncImportData2,
|
|
39580
39703
|
calcContentAlignStyle,
|
|
39581
39704
|
calcDeCodeNameById,
|
|
39582
39705
|
calcDynaClass,
|
|
39583
39706
|
calcDynaSysParams,
|
|
39584
39707
|
calcFilterModelBySchema,
|
|
39585
39708
|
calcGridLayoutPos,
|
|
39709
|
+
calcImportSchemaData,
|
|
39586
39710
|
calcLayoutHeightWidth,
|
|
39587
39711
|
calcMainStateOPPrivsStrs,
|
|
39588
39712
|
calcNavParams,
|
|
@@ -39595,6 +39719,8 @@ export {
|
|
|
39595
39719
|
convertNavData,
|
|
39596
39720
|
convertNavDataByArray,
|
|
39597
39721
|
convertObjectToNavParams,
|
|
39722
|
+
createImportSchema,
|
|
39723
|
+
deleteImportSchema,
|
|
39598
39724
|
downloadImportTemplate,
|
|
39599
39725
|
execDELogic,
|
|
39600
39726
|
execDELogicAction,
|
|
@@ -39602,6 +39728,7 @@ export {
|
|
|
39602
39728
|
execFieldLogics,
|
|
39603
39729
|
execUILogic,
|
|
39604
39730
|
exportData,
|
|
39731
|
+
fetchImportSchemas,
|
|
39605
39732
|
fieldValueToBoolean,
|
|
39606
39733
|
filterFieldLogics,
|
|
39607
39734
|
filterNode2SearchCond,
|
|
@@ -39631,12 +39758,14 @@ export {
|
|
|
39631
39758
|
getDERedirectToView,
|
|
39632
39759
|
getDataImportModels,
|
|
39633
39760
|
getDeACMode,
|
|
39761
|
+
getDefaultDataImport,
|
|
39634
39762
|
getDefaultValue,
|
|
39635
39763
|
getEditorProvider,
|
|
39636
39764
|
getEntitySchema,
|
|
39637
39765
|
getErrorViewProvider,
|
|
39638
39766
|
getFormDetailProvider,
|
|
39639
39767
|
getGridColumnProvider,
|
|
39768
|
+
getImportSchema,
|
|
39640
39769
|
getInternalMessageProvider,
|
|
39641
39770
|
getMatchResPath,
|
|
39642
39771
|
getOriginData,
|
|
@@ -39700,6 +39829,7 @@ export {
|
|
|
39700
39829
|
strContain,
|
|
39701
39830
|
testCond,
|
|
39702
39831
|
toLocalOpenWFRedirectView,
|
|
39832
|
+
updateImportSchema,
|
|
39703
39833
|
validateFilterNodes,
|
|
39704
39834
|
verifyDeRules,
|
|
39705
39835
|
verifyFormGroupLogic,
|