@ibiz-template/runtime 0.7.28-alpha.1 → 0.7.29-alpha.0
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 +51 -27
- package/dist/index.system.min.js +1 -1
- package/out/command/app/app-func/app-func.d.ts.map +1 -1
- package/out/command/app/app-func/app-func.js +2 -3
- package/out/controller/control/dashboard/custom-dashboard.controller.d.ts +18 -2
- package/out/controller/control/dashboard/custom-dashboard.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/custom-dashboard.controller.js +28 -4
- package/out/utils/bi-report-util/bi-report-util.d.ts +0 -10
- package/out/utils/bi-report-util/bi-report-util.d.ts.map +1 -1
- package/out/utils/bi-report-util/bi-report-util.js +24 -22
- package/package.json +5 -5
package/dist/index.esm.js
CHANGED
|
@@ -15216,6 +15216,9 @@ var BIReportUtil = class {
|
|
|
15216
15216
|
if (biReportUIModel.filter) {
|
|
15217
15217
|
propertyData.data.filter = biReportUIModel.filter;
|
|
15218
15218
|
}
|
|
15219
|
+
if (biReportUIModel.period) {
|
|
15220
|
+
propertyData.data.period = biReportUIModel.period;
|
|
15221
|
+
}
|
|
15219
15222
|
config.propertyData = propertyData;
|
|
15220
15223
|
return config;
|
|
15221
15224
|
}
|
|
@@ -15250,7 +15253,12 @@ var BIReportUtil = class {
|
|
|
15250
15253
|
reportUIModelObj = JSON.parse(reportUIModel);
|
|
15251
15254
|
config.selectChartType = reportUIModelObj.selectChartType;
|
|
15252
15255
|
propertyData.style = reportUIModelObj.style;
|
|
15253
|
-
|
|
15256
|
+
if (reportUIModelObj.filter) {
|
|
15257
|
+
propertyData.data.filter = reportUIModelObj.filter;
|
|
15258
|
+
}
|
|
15259
|
+
if (reportUIModelObj.period) {
|
|
15260
|
+
propertyData.data.period = reportUIModelObj.period;
|
|
15261
|
+
}
|
|
15254
15262
|
} else {
|
|
15255
15263
|
config.selectChartType = "NUMBER";
|
|
15256
15264
|
}
|
|
@@ -15325,15 +15333,21 @@ var BIReportUtil = class {
|
|
|
15325
15333
|
async translateDataToAppBIReport(arg) {
|
|
15326
15334
|
const { reportTag, selectChartType, selectCubeId, caption, data, style } = arg;
|
|
15327
15335
|
const app = ibiz.hub.getApp(ibiz.env.appId);
|
|
15336
|
+
const tempUIReportModel = {
|
|
15337
|
+
selectChartType,
|
|
15338
|
+
style
|
|
15339
|
+
};
|
|
15340
|
+
if (data.filter) {
|
|
15341
|
+
Object.assign(tempUIReportModel, { filter: data.filter });
|
|
15342
|
+
}
|
|
15343
|
+
if (data.period) {
|
|
15344
|
+
Object.assign(tempUIReportModel, { period: data.period });
|
|
15345
|
+
}
|
|
15328
15346
|
const targetData = {
|
|
15329
15347
|
pssysbireportitems: [],
|
|
15330
15348
|
pssysbischemeid: selectCubeId.split(".")[0],
|
|
15331
15349
|
pssysbicubeid: selectCubeId,
|
|
15332
|
-
bireportuimodel: JSON.stringify(
|
|
15333
|
-
selectChartType,
|
|
15334
|
-
style,
|
|
15335
|
-
filter: data == null ? void 0 : data.filter
|
|
15336
|
-
}),
|
|
15350
|
+
bireportuimodel: JSON.stringify(tempUIReportModel),
|
|
15337
15351
|
pssysappid: app.model.codeName,
|
|
15338
15352
|
bireporttag: reportTag,
|
|
15339
15353
|
pssysbireportname: caption,
|
|
@@ -15384,9 +15398,6 @@ var BIReportUtil = class {
|
|
|
15384
15398
|
*/
|
|
15385
15399
|
async mergeSpecialParams(type, sourceData, targetData) {
|
|
15386
15400
|
switch (type) {
|
|
15387
|
-
case "NUMBER":
|
|
15388
|
-
await this.mergeNumberSpecialParams(sourceData, targetData);
|
|
15389
|
-
break;
|
|
15390
15401
|
case "CROSSTABLE":
|
|
15391
15402
|
await this.mergeCrosstableSpecialParams(sourceData, targetData);
|
|
15392
15403
|
break;
|
|
@@ -15404,18 +15415,6 @@ var BIReportUtil = class {
|
|
|
15404
15415
|
break;
|
|
15405
15416
|
}
|
|
15406
15417
|
}
|
|
15407
|
-
/**
|
|
15408
|
-
* 处理数字特殊参数(同环比)
|
|
15409
|
-
*
|
|
15410
|
-
* @author tony001
|
|
15411
|
-
* @date 2024-07-05 10:07:35
|
|
15412
|
-
* @param {IData} sourceData
|
|
15413
|
-
* @param {IData} targetData
|
|
15414
|
-
* @return {*} {Promise<void>}
|
|
15415
|
-
*/
|
|
15416
|
-
async mergeNumberSpecialParams(sourceData, targetData) {
|
|
15417
|
-
console.log(sourceData, targetData);
|
|
15418
|
-
}
|
|
15419
15418
|
/**
|
|
15420
15419
|
* 处理交叉表特殊参数(维度列)
|
|
15421
15420
|
*
|
|
@@ -15835,8 +15834,10 @@ var _AppFuncCommand = class _AppFuncCommand {
|
|
|
15835
15834
|
* @param {IParams} [params]
|
|
15836
15835
|
*/
|
|
15837
15836
|
executeJavaScript(appFunc, context, params) {
|
|
15838
|
-
|
|
15839
|
-
|
|
15837
|
+
ScriptFactory.execScriptFn(
|
|
15838
|
+
{ context, params, data: {}, el: null, view: null },
|
|
15839
|
+
appFunc.jscode
|
|
15840
|
+
);
|
|
15840
15841
|
}
|
|
15841
15842
|
/**
|
|
15842
15843
|
* 自定义应用功能
|
|
@@ -25958,7 +25959,7 @@ var CustomDashboardController = class {
|
|
|
25958
25959
|
*/
|
|
25959
25960
|
this.portletConfig = {};
|
|
25960
25961
|
/**
|
|
25961
|
-
* 自定义定制范围类型(public:公开,personal:个人,data
|
|
25962
|
+
* 自定义定制范围类型(public:公开,personal:个人,data:数据,默认是按照个人区分,配置了应用功能组件才生效)
|
|
25962
25963
|
*
|
|
25963
25964
|
* @author tony001
|
|
25964
25965
|
* @date 2024-04-24 19:04:47
|
|
@@ -25981,6 +25982,22 @@ var CustomDashboardController = class {
|
|
|
25981
25982
|
* @type {string}
|
|
25982
25983
|
*/
|
|
25983
25984
|
this.ownerId = "";
|
|
25985
|
+
/**
|
|
25986
|
+
* 多数据模式,启用时请求参数从上下文中获取srfdynadashboardid的值
|
|
25987
|
+
*
|
|
25988
|
+
* @author tony001
|
|
25989
|
+
* @date 2024-07-08 14:07:51
|
|
25990
|
+
* @type {boolean}
|
|
25991
|
+
*/
|
|
25992
|
+
this.multiMode = false;
|
|
25993
|
+
/**
|
|
25994
|
+
* 展示设计按钮,启用定制默认会展示
|
|
25995
|
+
*
|
|
25996
|
+
* @author tony001
|
|
25997
|
+
* @date 2024-07-08 14:07:15
|
|
25998
|
+
* @type {boolean}
|
|
25999
|
+
*/
|
|
26000
|
+
this.showDesignBtn = true;
|
|
25984
26001
|
this.context = dashboard.context;
|
|
25985
26002
|
this.params = dashboard.params;
|
|
25986
26003
|
this.init(dashboard.controlParams);
|
|
@@ -26006,7 +26023,10 @@ var CustomDashboardController = class {
|
|
|
26006
26023
|
this.ownerId = this.context[controlParams.owner_id];
|
|
26007
26024
|
}
|
|
26008
26025
|
if (controlParams.multimode === "true") {
|
|
26009
|
-
this.
|
|
26026
|
+
this.multiMode = true;
|
|
26027
|
+
}
|
|
26028
|
+
if (controlParams.showdesignbtn === "false") {
|
|
26029
|
+
this.showDesignBtn = false;
|
|
26010
26030
|
}
|
|
26011
26031
|
if (this.model.appDynaDashboardUtilId) {
|
|
26012
26032
|
const app = ibiz.hub.getApp(this.context.srfappid);
|
|
@@ -26031,14 +26051,15 @@ var CustomDashboardController = class {
|
|
|
26031
26051
|
*/
|
|
26032
26052
|
getResourceTag() {
|
|
26033
26053
|
var _a, _b;
|
|
26054
|
+
if (this.multiMode) {
|
|
26055
|
+
return this.context.srfdynadashboardid;
|
|
26056
|
+
}
|
|
26034
26057
|
const base = "".concat(this.context.srfappid, "_dashboard_").concat(((_a = this.model.appDataEntityId) == null ? void 0 : _a.toLowerCase()) || "app", "_").concat((_b = this.model.codeName) == null ? void 0 : _b.toLowerCase());
|
|
26035
26058
|
switch (this.type) {
|
|
26036
26059
|
case "personal":
|
|
26037
26060
|
return "".concat(base, "_").concat(this.context.srfpersonid);
|
|
26038
26061
|
case "data":
|
|
26039
26062
|
return "".concat(base, "_").concat(this.ownerType, "_").concat(this.ownerId);
|
|
26040
|
-
case "dynamic":
|
|
26041
|
-
return "".concat(this.context.srfdynadashboardid);
|
|
26042
26063
|
default:
|
|
26043
26064
|
return base;
|
|
26044
26065
|
}
|
|
@@ -26050,6 +26071,9 @@ var CustomDashboardController = class {
|
|
|
26050
26071
|
* @Date: 2023-09-20 16:22:49
|
|
26051
26072
|
*/
|
|
26052
26073
|
async loadCustomModelData() {
|
|
26074
|
+
if (this.multiMode && !this.context.srfdynadashboardid) {
|
|
26075
|
+
return { model: this.customModelData, config: this.portletConfig };
|
|
26076
|
+
}
|
|
26053
26077
|
let res;
|
|
26054
26078
|
if (this.util) {
|
|
26055
26079
|
res = await this.util.load(
|