@ibiz-template/runtime 0.4.15 → 0.4.16
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 +50 -7
- package/dist/index.system.min.js +2 -2
- package/out/app-hub.js +1 -1
- package/out/hub/config/app-config-service.d.ts +1 -0
- package/out/hub/config/app-config-service.d.ts.map +1 -1
- package/out/hub/config/app-config-service.js +1 -0
- package/out/hub/config/app-view-config-service.d.ts +20 -1
- package/out/hub/config/app-view-config-service.d.ts.map +1 -1
- package/out/hub/config/app-view-config-service.js +39 -6
- package/out/interface/common/i-app-view-config-service/i-app-view-config-service.d.ts +8 -0
- package/out/interface/common/i-app-view-config-service/i-app-view-config-service.d.ts.map +1 -1
- package/out/service/service/control/md-control.service.d.ts +10 -0
- package/out/service/service/control/md-control.service.d.ts.map +1 -1
- package/out/service/service/control/md-control.service.js +16 -0
- package/package.json +2 -2
- package/src/app-hub.ts +1 -1
- package/src/hub/config/app-config-service.ts +1 -0
- package/src/hub/config/app-view-config-service.ts +39 -6
- package/src/interface/common/i-app-view-config-service/i-app-view-config-service.ts +8 -0
- package/src/service/service/control/md-control.service.ts +24 -0
package/dist/index.esm.js
CHANGED
|
@@ -6108,6 +6108,26 @@ var MDControlService = class extends ControlService {
|
|
|
6108
6108
|
res = this.handleResponse(res);
|
|
6109
6109
|
return res;
|
|
6110
6110
|
}
|
|
6111
|
+
/**
|
|
6112
|
+
* 批量更新数据
|
|
6113
|
+
*
|
|
6114
|
+
* @author chitanda
|
|
6115
|
+
* @date 2023-12-21 10:12:09
|
|
6116
|
+
* @param {IContext} context
|
|
6117
|
+
* @param {ControlVO[]} data
|
|
6118
|
+
* @return {*} {Promise<void>}
|
|
6119
|
+
*/
|
|
6120
|
+
async updateBatch(context, data) {
|
|
6121
|
+
var _a;
|
|
6122
|
+
const updateAction = ((_a = this.model.updateControlAction) == null ? void 0 : _a.appDEMethodId) || "update";
|
|
6123
|
+
let res = await this.exec(
|
|
6124
|
+
updateAction,
|
|
6125
|
+
context,
|
|
6126
|
+
data.map((item) => item.getOrigin())
|
|
6127
|
+
);
|
|
6128
|
+
res = this.handleResponse(res);
|
|
6129
|
+
return res;
|
|
6130
|
+
}
|
|
6111
6131
|
/**
|
|
6112
6132
|
* 导出数据
|
|
6113
6133
|
*
|
|
@@ -9997,20 +10017,43 @@ var AppViewConfigService = class {
|
|
|
9997
10017
|
*/
|
|
9998
10018
|
this.viewConfigs = /* @__PURE__ */ new Map();
|
|
9999
10019
|
}
|
|
10020
|
+
/**
|
|
10021
|
+
* 计算应用视图 标识
|
|
10022
|
+
*
|
|
10023
|
+
* @author chitanda
|
|
10024
|
+
* @date 2023-04-20 18:04:48
|
|
10025
|
+
* @protected
|
|
10026
|
+
* @param {string} tag
|
|
10027
|
+
* @return {*} {string}
|
|
10028
|
+
*/
|
|
10029
|
+
calcAppViewId(tag) {
|
|
10030
|
+
let id = "";
|
|
10031
|
+
if (tag.indexOf(".") !== -1) {
|
|
10032
|
+
const ids = tag.split(".");
|
|
10033
|
+
id = ids[ids.length - 1];
|
|
10034
|
+
} else {
|
|
10035
|
+
id = tag.toLowerCase();
|
|
10036
|
+
}
|
|
10037
|
+
return id;
|
|
10038
|
+
}
|
|
10000
10039
|
has(key) {
|
|
10001
|
-
|
|
10040
|
+
const id = this.calcAppViewId(key);
|
|
10041
|
+
return this.viewConfigs.has(id);
|
|
10002
10042
|
}
|
|
10003
|
-
set(
|
|
10043
|
+
set(key, viewConfig) {
|
|
10044
|
+
const id = this.calcAppViewId(key);
|
|
10004
10045
|
this.viewConfigs.set(id, viewConfig);
|
|
10005
10046
|
}
|
|
10006
10047
|
async get(key) {
|
|
10007
|
-
|
|
10008
|
-
|
|
10048
|
+
const id = this.calcAppViewId(key);
|
|
10049
|
+
if (!this.viewConfigs.has(id)) {
|
|
10050
|
+
const model = await ibiz.hub.getAppView(id);
|
|
10009
10051
|
if (!model) {
|
|
10010
|
-
throw new RuntimeError24("\u89C6\u56FE[".concat(
|
|
10052
|
+
throw new RuntimeError24("\u89C6\u56FE[".concat(id, "]\u4E0D\u5B58\u5728"));
|
|
10011
10053
|
}
|
|
10012
10054
|
this.set(model.id, {
|
|
10013
10055
|
id: model.id,
|
|
10056
|
+
appId: model.appId,
|
|
10014
10057
|
codeName: model.codeName,
|
|
10015
10058
|
openMode: model.openMode,
|
|
10016
10059
|
viewType: model.viewType,
|
|
@@ -10020,7 +10063,7 @@ var AppViewConfigService = class {
|
|
|
10020
10063
|
redirectView: model.redirectView
|
|
10021
10064
|
});
|
|
10022
10065
|
}
|
|
10023
|
-
return this.viewConfigs.get(
|
|
10066
|
+
return this.viewConfigs.get(id);
|
|
10024
10067
|
}
|
|
10025
10068
|
getSync(key) {
|
|
10026
10069
|
if (this.viewConfigs.has(key)) {
|
|
@@ -28637,7 +28680,7 @@ var AppHub = class {
|
|
|
28637
28680
|
* @param {IAppView} model
|
|
28638
28681
|
*/
|
|
28639
28682
|
registerAppView(model) {
|
|
28640
|
-
this.views.set(model.codeName, model);
|
|
28683
|
+
this.views.set(model.codeName.toLowerCase(), model);
|
|
28641
28684
|
}
|
|
28642
28685
|
/**
|
|
28643
28686
|
* 注册应用实体
|