@ibiz-template/runtime 0.7.30 → 0.7.31-alpha.1
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 +457 -112
- package/dist/index.system.min.js +1 -1
- package/out/command/app/open-app-view/open-app-view.d.ts +12 -0
- package/out/command/app/open-app-view/open-app-view.d.ts.map +1 -1
- package/out/command/app/open-app-view/open-app-view.js +15 -1
- package/out/controller/control/chart/chart.controller.d.ts +1 -1
- package/out/controller/control/chart/chart.controller.d.ts.map +1 -1
- package/out/controller/control/chart/chart.controller.js +52 -22
- package/out/controller/control/chart/generator/base-series-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/base-series-generator.js +47 -2
- package/out/controller/control/chart/generator/chart-options-generator.js +5 -5
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.d.ts +7 -0
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.js +17 -1
- package/out/controller/control/dashboard/portlet/report-portlet/report-portlet.controller.d.ts +10 -0
- package/out/controller/control/dashboard/portlet/report-portlet/report-portlet.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/portlet/report-portlet/report-portlet.controller.js +15 -0
- package/out/controller/control/dashboard/portlet/view-portlet/view-portlet.controller.d.ts +7 -0
- package/out/controller/control/dashboard/portlet/view-portlet/view-portlet.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/portlet/view-portlet/view-portlet.controller.js +17 -0
- package/out/controller/control/grid/grid/entity-schema.d.ts.map +1 -1
- package/out/controller/control/grid/grid/entity-schema.js +3 -0
- package/out/controller/control/search-bar/entity-schema.d.ts.map +1 -1
- package/out/controller/control/search-bar/entity-schema.js +3 -0
- package/out/controller/control/search-bar/search-bar.controller.d.ts +10 -1
- package/out/controller/control/search-bar/search-bar.controller.d.ts.map +1 -1
- package/out/controller/control/search-bar/search-bar.controller.js +82 -3
- package/out/controller/utils/code-list/code-list.d.ts +1 -1
- package/out/controller/utils/code-list/code-list.d.ts.map +1 -1
- package/out/interface/controller/state/control/search-bar/i-search-bar.state.d.ts +16 -0
- package/out/interface/controller/state/control/search-bar/i-search-bar.state.d.ts.map +1 -1
- package/out/interface/util/i-open-view-util/i-open-view-util.d.ts +11 -0
- package/out/interface/util/i-open-view-util/i-open-view-util.d.ts.map +1 -1
- package/out/service/de-service-util.d.ts +13 -0
- package/out/service/de-service-util.d.ts.map +1 -1
- package/out/service/de-service-util.js +59 -0
- package/out/service/service/code-list/code-list.service.d.ts +19 -0
- package/out/service/service/code-list/code-list.service.d.ts.map +1 -1
- package/out/service/service/code-list/code-list.service.js +49 -0
- package/out/service/service/entity/method/de-action.d.ts.map +1 -1
- package/out/service/service/entity/method/de-action.js +17 -0
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
|
@@ -5904,6 +5904,35 @@ async function calcDynaSysParams(appDataEntityId, context, opts = {}) {
|
|
|
5904
5904
|
|
|
5905
5905
|
// src/service/service/code-list/code-list.service.ts
|
|
5906
5906
|
import { RuntimeError as RuntimeError16 } from "@ibiz-template/core";
|
|
5907
|
+
import { isNumber } from "lodash-es";
|
|
5908
|
+
|
|
5909
|
+
// src/controller/utils/code-list/code-list.ts
|
|
5910
|
+
function calcThresholdRange(codelist, value) {
|
|
5911
|
+
return codelist.find((item) => {
|
|
5912
|
+
if (!item.beginValue && !item.endValue) {
|
|
5913
|
+
return item.value == value;
|
|
5914
|
+
}
|
|
5915
|
+
let beginCond = true;
|
|
5916
|
+
if (item.beginValue) {
|
|
5917
|
+
if (item.includeBeginValue) {
|
|
5918
|
+
beginCond = value >= item.beginValue;
|
|
5919
|
+
} else {
|
|
5920
|
+
beginCond = value > item.beginValue;
|
|
5921
|
+
}
|
|
5922
|
+
}
|
|
5923
|
+
let endCond = true;
|
|
5924
|
+
if (item.endValue) {
|
|
5925
|
+
if (item.includeEndValue) {
|
|
5926
|
+
endCond = value <= item.endValue;
|
|
5927
|
+
} else {
|
|
5928
|
+
endCond = value < item.endValue;
|
|
5929
|
+
}
|
|
5930
|
+
}
|
|
5931
|
+
return beginCond && endCond;
|
|
5932
|
+
});
|
|
5933
|
+
}
|
|
5934
|
+
|
|
5935
|
+
// src/service/service/code-list/code-list.service.ts
|
|
5907
5936
|
var CodeListService = class {
|
|
5908
5937
|
constructor(appModel) {
|
|
5909
5938
|
this.appModel = appModel;
|
|
@@ -6067,6 +6096,58 @@ var CodeListService = class {
|
|
|
6067
6096
|
}
|
|
6068
6097
|
return [];
|
|
6069
6098
|
}
|
|
6099
|
+
/**
|
|
6100
|
+
* 递归查找代码表项
|
|
6101
|
+
*
|
|
6102
|
+
* @param {IAppCodeList} codeList 代码表模型
|
|
6103
|
+
* @param {readonly CodeListItem[] | undefined} dataItems 代码表数据
|
|
6104
|
+
* @param {string | number} value 代码项值
|
|
6105
|
+
* @returns 代码表项|CodeListItem | undefined
|
|
6106
|
+
*/
|
|
6107
|
+
findCodeListItem(codeList, dataItems, value) {
|
|
6108
|
+
if (dataItems) {
|
|
6109
|
+
const { thresholdGroup } = codeList;
|
|
6110
|
+
if (thresholdGroup && isNumber(Number(value))) {
|
|
6111
|
+
const findItem2 = calcThresholdRange(dataItems, Number(value));
|
|
6112
|
+
if (findItem2) {
|
|
6113
|
+
return findItem2;
|
|
6114
|
+
}
|
|
6115
|
+
}
|
|
6116
|
+
const findItem = dataItems.find((item) => item.value === value);
|
|
6117
|
+
if (findItem) {
|
|
6118
|
+
return findItem;
|
|
6119
|
+
}
|
|
6120
|
+
for (let i = 0; i < dataItems.length; i++) {
|
|
6121
|
+
const childrenItem = this.findCodeListItem(
|
|
6122
|
+
codeList,
|
|
6123
|
+
dataItems[i].children,
|
|
6124
|
+
value
|
|
6125
|
+
);
|
|
6126
|
+
if (childrenItem) {
|
|
6127
|
+
return childrenItem;
|
|
6128
|
+
}
|
|
6129
|
+
}
|
|
6130
|
+
}
|
|
6131
|
+
}
|
|
6132
|
+
/**
|
|
6133
|
+
* 获取代码表项
|
|
6134
|
+
*
|
|
6135
|
+
* @param {string} tag 代码表标识
|
|
6136
|
+
* @param {string | number} value 代码表值
|
|
6137
|
+
* @param {IContext} context 上下文
|
|
6138
|
+
* @param {IParams} params 视图参数
|
|
6139
|
+
* @returns 代码表项|Promise<CodeListItem | undefined>
|
|
6140
|
+
*/
|
|
6141
|
+
async getItem(tag, value, context, params) {
|
|
6142
|
+
const codeList = this.allCodeLists.get(tag);
|
|
6143
|
+
if (!codeList) {
|
|
6144
|
+
throw new RuntimeError16(
|
|
6145
|
+
ibiz.i18n.t("runtime.service.noFindCodeList", { tag })
|
|
6146
|
+
);
|
|
6147
|
+
}
|
|
6148
|
+
const dataItems = await this.get(tag, context, params);
|
|
6149
|
+
return this.findCodeListItem(codeList, dataItems, value);
|
|
6150
|
+
}
|
|
6070
6151
|
/**
|
|
6071
6152
|
* 获取代码表实例对象(动态代码表返回具体实例,静态代码表返回undefined)
|
|
6072
6153
|
*
|
|
@@ -10195,6 +10276,17 @@ var DEActionMethod = class extends Method {
|
|
|
10195
10276
|
}
|
|
10196
10277
|
}
|
|
10197
10278
|
const methodTag = this.method.actionTag ? this.method.actionTag.toUpperCase() : this.method.codeName.toUpperCase();
|
|
10279
|
+
if (this.method.beforeCode) {
|
|
10280
|
+
await ScriptFactory.asyncExecScriptFn(
|
|
10281
|
+
{
|
|
10282
|
+
context,
|
|
10283
|
+
data,
|
|
10284
|
+
viewParam: params,
|
|
10285
|
+
activeData: header
|
|
10286
|
+
},
|
|
10287
|
+
this.method.beforeCode
|
|
10288
|
+
);
|
|
10289
|
+
}
|
|
10198
10290
|
switch (methodTag) {
|
|
10199
10291
|
case "CREATE":
|
|
10200
10292
|
result = await this.create(context, data, params || {}, header);
|
|
@@ -10249,6 +10341,17 @@ var DEActionMethod = class extends Method {
|
|
|
10249
10341
|
}
|
|
10250
10342
|
}
|
|
10251
10343
|
}
|
|
10344
|
+
if (this.method.afterCode) {
|
|
10345
|
+
await ScriptFactory.asyncExecScriptFn(
|
|
10346
|
+
{
|
|
10347
|
+
context,
|
|
10348
|
+
data: result.data,
|
|
10349
|
+
viewParam: params,
|
|
10350
|
+
activeData: header
|
|
10351
|
+
},
|
|
10352
|
+
this.method.afterCode
|
|
10353
|
+
);
|
|
10354
|
+
}
|
|
10252
10355
|
if (result.data) {
|
|
10253
10356
|
await execFieldLogics(
|
|
10254
10357
|
this.entity,
|
|
@@ -12160,6 +12263,14 @@ var _DEServiceUtil = class _DEServiceUtil {
|
|
|
12160
12263
|
* @return {*} {Promise<IAppDEService>}
|
|
12161
12264
|
*/
|
|
12162
12265
|
async getService(context, id) {
|
|
12266
|
+
const { targetApp, targetAppDataEntityId } = await this.computeAppDEMappingParam(context, id);
|
|
12267
|
+
if (targetApp && targetAppDataEntityId) {
|
|
12268
|
+
const targetService = await targetApp.deService.getService(
|
|
12269
|
+
context,
|
|
12270
|
+
targetAppDataEntityId
|
|
12271
|
+
);
|
|
12272
|
+
return targetService;
|
|
12273
|
+
}
|
|
12163
12274
|
const sandboxId = context.srfsessionid || "applocation";
|
|
12164
12275
|
if (!this.cache.has(sandboxId)) {
|
|
12165
12276
|
this.cache.set(sandboxId, /* @__PURE__ */ new Map());
|
|
@@ -12269,6 +12380,18 @@ var _DEServiceUtil = class _DEServiceUtil {
|
|
|
12269
12380
|
* @return {*} {Promise<IHttpResponse<IData>>}
|
|
12270
12381
|
*/
|
|
12271
12382
|
async exec(appDataEntityId, methodName, context, params, params2, header) {
|
|
12383
|
+
const { targetApp, targetAppDataEntityId } = await this.computeAppDEMappingParam(context, appDataEntityId);
|
|
12384
|
+
if (targetApp && targetAppDataEntityId) {
|
|
12385
|
+
const result = await targetApp.deService.exec(
|
|
12386
|
+
targetAppDataEntityId,
|
|
12387
|
+
methodName,
|
|
12388
|
+
context,
|
|
12389
|
+
params,
|
|
12390
|
+
params2,
|
|
12391
|
+
header
|
|
12392
|
+
);
|
|
12393
|
+
return result;
|
|
12394
|
+
}
|
|
12272
12395
|
const service = await this.getService(context, appDataEntityId);
|
|
12273
12396
|
try {
|
|
12274
12397
|
const result = await service.exec(
|
|
@@ -12286,6 +12409,46 @@ var _DEServiceUtil = class _DEServiceUtil {
|
|
|
12286
12409
|
throw error;
|
|
12287
12410
|
}
|
|
12288
12411
|
}
|
|
12412
|
+
/**
|
|
12413
|
+
* 计算应用实体服务映射参数
|
|
12414
|
+
* srfappdemapping:是否开启应用实体服务映射
|
|
12415
|
+
* srfappmappingmap:应用映射表,与srfappdemapping搭配使用,原应用标识:目标应用标识,以冒号分割,多个应用以逗号隔开
|
|
12416
|
+
* 如:logicdesign__logicdesign:ibizplm__plmweb
|
|
12417
|
+
*
|
|
12418
|
+
* @author tony001
|
|
12419
|
+
* @date 2024-07-19 15:07:31
|
|
12420
|
+
* @param {IContext} context
|
|
12421
|
+
* @param {string} appDataEntityId
|
|
12422
|
+
* @return {*} {Promise<IData>}
|
|
12423
|
+
*/
|
|
12424
|
+
async computeAppDEMappingParam(context, appDataEntityId) {
|
|
12425
|
+
const result = {};
|
|
12426
|
+
if (context.srfappdemapping && context.srfappdemapping === "true" && context.srfappmappingmap) {
|
|
12427
|
+
const { srfappmappingmap } = context;
|
|
12428
|
+
const appMap = /* @__PURE__ */ new Map();
|
|
12429
|
+
const appMappings = (srfappmappingmap == null ? void 0 : srfappmappingmap.split(",")) || [];
|
|
12430
|
+
for (const appMpping of appMappings) {
|
|
12431
|
+
const [sourceAppId, targetAppId] = appMpping.split(":");
|
|
12432
|
+
appMap.set(sourceAppId, targetAppId);
|
|
12433
|
+
}
|
|
12434
|
+
if (appMap.has(this.appModel.appId)) {
|
|
12435
|
+
const targetApp = ibiz.hub.getApp(appMap.get(this.appModel.appId));
|
|
12436
|
+
if (targetApp) {
|
|
12437
|
+
Object.assign(result, { targetApp });
|
|
12438
|
+
if (appDataEntityId.indexOf(".") !== -1) {
|
|
12439
|
+
Object.assign(result, {
|
|
12440
|
+
targetAppDataEntityId: "".concat(targetApp.model.id, ".").concat(appDataEntityId.split(".").pop())
|
|
12441
|
+
});
|
|
12442
|
+
} else {
|
|
12443
|
+
Object.assign(result, {
|
|
12444
|
+
targetAppDataEntityId: appDataEntityId
|
|
12445
|
+
});
|
|
12446
|
+
}
|
|
12447
|
+
}
|
|
12448
|
+
}
|
|
12449
|
+
}
|
|
12450
|
+
return result;
|
|
12451
|
+
}
|
|
12289
12452
|
};
|
|
12290
12453
|
/**
|
|
12291
12454
|
* 实体服务构造方法缓存
|
|
@@ -13113,8 +13276,8 @@ var baseStyle = {
|
|
|
13113
13276
|
position: "fixed",
|
|
13114
13277
|
zIndex: "10000"
|
|
13115
13278
|
};
|
|
13116
|
-
function cloneElement(
|
|
13117
|
-
const element = getAnimationElement(
|
|
13279
|
+
function cloneElement(clone41, teleport = document.body, isRemoveChild = true) {
|
|
13280
|
+
const element = getAnimationElement(clone41);
|
|
13118
13281
|
if (element == null) {
|
|
13119
13282
|
throw new Error(ibiz.i18n.t("runtime.utils.anime.noClone"));
|
|
13120
13283
|
}
|
|
@@ -13533,11 +13696,11 @@ function arrayContains(arr, val) {
|
|
|
13533
13696
|
});
|
|
13534
13697
|
}
|
|
13535
13698
|
function cloneObject(o) {
|
|
13536
|
-
var
|
|
13699
|
+
var clone41 = {};
|
|
13537
13700
|
for (var p in o) {
|
|
13538
|
-
|
|
13701
|
+
clone41[p] = o[p];
|
|
13539
13702
|
}
|
|
13540
|
-
return
|
|
13703
|
+
return clone41;
|
|
13541
13704
|
}
|
|
13542
13705
|
function replaceObjectProps(o1, o2) {
|
|
13543
13706
|
var o = cloneObject(o1);
|
|
@@ -15857,10 +16020,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
15857
16020
|
case "POPUPMODAL":
|
|
15858
16021
|
return this.openModal(appView, context, params);
|
|
15859
16022
|
case "POPUPAPP":
|
|
15860
|
-
|
|
15861
|
-
appView,
|
|
15862
|
-
ibiz.i18n.t("runtime.command.app.unsupportedPopupapp")
|
|
15863
|
-
);
|
|
16023
|
+
return this.openPopupApp(appView, context, params);
|
|
15864
16024
|
case "POPOVER":
|
|
15865
16025
|
return this.openPopover(appView, context, params, opts);
|
|
15866
16026
|
case "DRAWER_LEFT":
|
|
@@ -15963,6 +16123,20 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
15963
16123
|
async openUserCustom(appView, context, params = {}) {
|
|
15964
16124
|
return ibiz.openView.custom(appView.id, context, params);
|
|
15965
16125
|
}
|
|
16126
|
+
/**
|
|
16127
|
+
* 独立程序弹出
|
|
16128
|
+
*
|
|
16129
|
+
* @author zzq
|
|
16130
|
+
* @date 2024-07-19 20:07:55
|
|
16131
|
+
* @protected
|
|
16132
|
+
* @param {IViewConfig} appView
|
|
16133
|
+
* @param {IContext} [context]
|
|
16134
|
+
* @param {IParams} [params={}]
|
|
16135
|
+
* @return {*} {Promise<void>}
|
|
16136
|
+
*/
|
|
16137
|
+
async openPopupApp(appView, context, params = {}) {
|
|
16138
|
+
return ibiz.openView.popupApp(appView.id, context, params);
|
|
16139
|
+
}
|
|
15966
16140
|
};
|
|
15967
16141
|
_OpenAppViewCommand.TAG = "ibiz.app-view.open";
|
|
15968
16142
|
var OpenAppViewCommand = _OpenAppViewCommand;
|
|
@@ -17197,7 +17371,7 @@ function getOriginData(data) {
|
|
|
17197
17371
|
|
|
17198
17372
|
// src/controller/utils/value-rule/value-rule.ts
|
|
17199
17373
|
import { RuntimeError as RuntimeError31 } from "@ibiz-template/core";
|
|
17200
|
-
import { isNilOrEmpty as isNilOrEmpty6, isNumber } from "qx-util";
|
|
17374
|
+
import { isNilOrEmpty as isNilOrEmpty6, isNumber as isNumber2 } from "qx-util";
|
|
17201
17375
|
import { isNil as isNil18 } from "ramda";
|
|
17202
17376
|
function generateRules(itemVRs, name, valueItemName) {
|
|
17203
17377
|
const rules = [];
|
|
@@ -17296,7 +17470,7 @@ function generateEditorRules(editor) {
|
|
|
17296
17470
|
if (!isNil18(maxValue)) {
|
|
17297
17471
|
rules.push({
|
|
17298
17472
|
validator: (rule, value, callback) => {
|
|
17299
|
-
if (!isNil18(value) &&
|
|
17473
|
+
if (!isNil18(value) && isNumber2(value) && value > maxValue) {
|
|
17300
17474
|
callback(new Error("\u503C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E".concat(maxValue)));
|
|
17301
17475
|
} else {
|
|
17302
17476
|
return true;
|
|
@@ -17307,7 +17481,7 @@ function generateEditorRules(editor) {
|
|
|
17307
17481
|
if (!isNil18(minValue)) {
|
|
17308
17482
|
rules.push({
|
|
17309
17483
|
validator: (rule, value, callback) => {
|
|
17310
|
-
if (!isNil18(value) &&
|
|
17484
|
+
if (!isNil18(value) && isNumber2(value) && value < minValue) {
|
|
17311
17485
|
callback(new Error("\u503C\u5FC5\u987B\u5927\u4E8E\u7B49\u4E8E".concat(minValue)));
|
|
17312
17486
|
} else {
|
|
17313
17487
|
return true;
|
|
@@ -18137,32 +18311,6 @@ var ViewMsgController = class _ViewMsgController {
|
|
|
18137
18311
|
}
|
|
18138
18312
|
};
|
|
18139
18313
|
|
|
18140
|
-
// src/controller/utils/code-list/code-list.ts
|
|
18141
|
-
function calcThresholdRange(codelist, value) {
|
|
18142
|
-
return codelist.find((item) => {
|
|
18143
|
-
if (!item.beginValue && !item.endValue) {
|
|
18144
|
-
return item.value == value;
|
|
18145
|
-
}
|
|
18146
|
-
let beginCond = true;
|
|
18147
|
-
if (item.beginValue) {
|
|
18148
|
-
if (item.includeBeginValue) {
|
|
18149
|
-
beginCond = value >= item.beginValue;
|
|
18150
|
-
} else {
|
|
18151
|
-
beginCond = value > item.beginValue;
|
|
18152
|
-
}
|
|
18153
|
-
}
|
|
18154
|
-
let endCond = true;
|
|
18155
|
-
if (item.endValue) {
|
|
18156
|
-
if (item.includeEndValue) {
|
|
18157
|
-
endCond = value <= item.endValue;
|
|
18158
|
-
} else {
|
|
18159
|
-
endCond = value < item.endValue;
|
|
18160
|
-
}
|
|
18161
|
-
}
|
|
18162
|
-
return beginCond && endCond;
|
|
18163
|
-
});
|
|
18164
|
-
}
|
|
18165
|
-
|
|
18166
18314
|
// src/controller/common/base.controller.ts
|
|
18167
18315
|
var SELF_KEY = "__self";
|
|
18168
18316
|
var BaseController = class {
|
|
@@ -21196,7 +21344,6 @@ var CalendarController = class extends MDControlController {
|
|
|
21196
21344
|
|
|
21197
21345
|
// src/controller/control/chart/chart.controller.ts
|
|
21198
21346
|
import { RuntimeError as RuntimeError44 } from "@ibiz-template/core";
|
|
21199
|
-
import { clone as clone25 } from "ramda";
|
|
21200
21347
|
|
|
21201
21348
|
// src/controller/control/chart/generator/chart-options-generator.ts
|
|
21202
21349
|
import { clone as clone24, mergeDeepRight as mergeDeepRight3 } from "ramda";
|
|
@@ -21470,6 +21617,7 @@ var BaseSeriesGenerator = class {
|
|
|
21470
21617
|
const groupData = this.groupData;
|
|
21471
21618
|
const { seriesCodeListId, catalogCodeListId } = this.model;
|
|
21472
21619
|
data.forEach((item) => {
|
|
21620
|
+
var _a, _b;
|
|
21473
21621
|
let group = DEFAULT_GROUP;
|
|
21474
21622
|
if (this.groupField) {
|
|
21475
21623
|
const groupVal = this.translateVal(
|
|
@@ -21493,9 +21641,16 @@ var BaseSeriesGenerator = class {
|
|
|
21493
21641
|
tempCodeLists.push({ codename, codelist: clone22(codeListItems) });
|
|
21494
21642
|
} else if (mode === "field") {
|
|
21495
21643
|
const tempdata = data.map((_data) => {
|
|
21644
|
+
var _a2, _b2;
|
|
21645
|
+
let tempValue;
|
|
21646
|
+
if ((_a2 = _data.$origin) == null ? void 0 : _a2.$origin) {
|
|
21647
|
+
tempValue = _data.$origin.$origin[codename];
|
|
21648
|
+
} else {
|
|
21649
|
+
tempValue = (_b2 = _data.$origin) == null ? void 0 : _b2[codename];
|
|
21650
|
+
}
|
|
21496
21651
|
return {
|
|
21497
21652
|
text: _data[codename],
|
|
21498
|
-
value:
|
|
21653
|
+
value: tempValue
|
|
21499
21654
|
};
|
|
21500
21655
|
});
|
|
21501
21656
|
tempCodeLists.push({ codename, codelist: tempdata });
|
|
@@ -21523,6 +21678,7 @@ var BaseSeriesGenerator = class {
|
|
|
21523
21678
|
const codeListItems = this.chartGenerator.codeListMap.get(catalogCodeListId);
|
|
21524
21679
|
codeListItems.forEach((x) => {
|
|
21525
21680
|
groupData[group].set(x.text, { value: 0 });
|
|
21681
|
+
this.catalogMap.set(x.text, { [this.catalogField]: x.value });
|
|
21526
21682
|
this.prepareChartData(
|
|
21527
21683
|
groupData,
|
|
21528
21684
|
{
|
|
@@ -21563,6 +21719,17 @@ var BaseSeriesGenerator = class {
|
|
|
21563
21719
|
if (!catalog) {
|
|
21564
21720
|
return;
|
|
21565
21721
|
}
|
|
21722
|
+
if (!catalogCodeListId) {
|
|
21723
|
+
let tempValue;
|
|
21724
|
+
if ((_a = item.$origin) == null ? void 0 : _a.$origin) {
|
|
21725
|
+
tempValue = item.$origin.$origin[this.catalogField];
|
|
21726
|
+
} else {
|
|
21727
|
+
tempValue = (_b = item.$origin) == null ? void 0 : _b[this.catalogField];
|
|
21728
|
+
}
|
|
21729
|
+
this.catalogMap.set(item[this.catalogField], {
|
|
21730
|
+
[this.catalogField]: tempValue
|
|
21731
|
+
});
|
|
21732
|
+
}
|
|
21566
21733
|
if (!groupData[group].get(catalog)) {
|
|
21567
21734
|
groupData[group].set(catalog, { value: 0 });
|
|
21568
21735
|
}
|
|
@@ -21594,7 +21761,7 @@ var BaseSeriesGenerator = class {
|
|
|
21594
21761
|
* @return {*} {SeriesOption[]}
|
|
21595
21762
|
*/
|
|
21596
21763
|
calcGroupSeries(groupData) {
|
|
21597
|
-
|
|
21764
|
+
const tempSeries = Object.keys(groupData).map((group) => {
|
|
21598
21765
|
const catalogData = groupData[group];
|
|
21599
21766
|
const data = this.calcSeriesData(catalogData);
|
|
21600
21767
|
let options = { ...this.staticOptions, data };
|
|
@@ -21610,6 +21777,23 @@ var BaseSeriesGenerator = class {
|
|
|
21610
21777
|
}
|
|
21611
21778
|
return options;
|
|
21612
21779
|
});
|
|
21780
|
+
if (this.model.seriesCodeListId) {
|
|
21781
|
+
const codelist = this.chartGenerator.codeListMap.get(
|
|
21782
|
+
this.model.seriesCodeListId
|
|
21783
|
+
);
|
|
21784
|
+
if (codelist) {
|
|
21785
|
+
tempSeries.sort((a, b) => {
|
|
21786
|
+
const aIndex = codelist.findIndex((_code) => {
|
|
21787
|
+
return _code.text === a.name;
|
|
21788
|
+
});
|
|
21789
|
+
const bIndex = codelist.findIndex((_code) => {
|
|
21790
|
+
return _code.text === b.name;
|
|
21791
|
+
});
|
|
21792
|
+
return aIndex - bIndex;
|
|
21793
|
+
});
|
|
21794
|
+
}
|
|
21795
|
+
}
|
|
21796
|
+
return tempSeries;
|
|
21613
21797
|
}
|
|
21614
21798
|
/**
|
|
21615
21799
|
* 生成每条序列的data,由于不同图表类型格式不同所以为any
|
|
@@ -22432,10 +22616,10 @@ var ChartOptionsGenerator2 = class {
|
|
|
22432
22616
|
if (controlParam && ((_a = controlParam.ctrlParams) == null ? void 0 : _a.ZONE)) {
|
|
22433
22617
|
const length = (_b = this.model.dechartSerieses) == null ? void 0 : _b.length;
|
|
22434
22618
|
if (length) {
|
|
22435
|
-
const height =
|
|
22619
|
+
const height = 85 / length;
|
|
22436
22620
|
const items = [];
|
|
22437
22621
|
for (let i = 0; i < length; i++) {
|
|
22438
|
-
const top = i * height +
|
|
22622
|
+
const top = i * height + 10;
|
|
22439
22623
|
const bottom = 100 - (height + top);
|
|
22440
22624
|
items.push({
|
|
22441
22625
|
top: "".concat(top, "%"),
|
|
@@ -22499,7 +22683,7 @@ var ChartOptionsGenerator2 = class {
|
|
|
22499
22683
|
if (((_a2 = controlParam.ctrlParams) == null ? void 0 : _a2.MODE) === "ROW") {
|
|
22500
22684
|
const yAxisData = this.handleAxisLayout(
|
|
22501
22685
|
codeListItems,
|
|
22502
|
-
|
|
22686
|
+
60,
|
|
22503
22687
|
tempCatalogFields.length,
|
|
22504
22688
|
index
|
|
22505
22689
|
);
|
|
@@ -22563,7 +22747,7 @@ var ChartOptionsGenerator2 = class {
|
|
|
22563
22747
|
});
|
|
22564
22748
|
} else {
|
|
22565
22749
|
Object.assign(this.chartUserParam.grid, {
|
|
22566
|
-
left: (catalogLength + 1) *
|
|
22750
|
+
left: (catalogLength + 1) * 60
|
|
22567
22751
|
});
|
|
22568
22752
|
}
|
|
22569
22753
|
const tempyAxis = this.chartUserParam.yAxis;
|
|
@@ -22584,7 +22768,7 @@ var ChartOptionsGenerator2 = class {
|
|
|
22584
22768
|
{
|
|
22585
22769
|
value: mergeName.split("").join("\n"),
|
|
22586
22770
|
textStyle: {
|
|
22587
|
-
padding: [0, catalogLength *
|
|
22771
|
+
padding: [0, catalogLength * 50, 0, 0],
|
|
22588
22772
|
...nameTextStyle
|
|
22589
22773
|
}
|
|
22590
22774
|
}
|
|
@@ -22896,13 +23080,27 @@ var ChartController = class extends MDControlController {
|
|
|
22896
23080
|
* @memberof ChartController
|
|
22897
23081
|
*/
|
|
22898
23082
|
changeTooltipState(tag = true) {
|
|
22899
|
-
if (this.options && this.options.tooltip) {
|
|
23083
|
+
if (this.chart && this.options && this.options.tooltip) {
|
|
22900
23084
|
if (tag) {
|
|
22901
|
-
|
|
23085
|
+
this.chart.setOption(
|
|
23086
|
+
{
|
|
23087
|
+
tooltip: {
|
|
23088
|
+
show: this.tooltipState
|
|
23089
|
+
}
|
|
23090
|
+
},
|
|
23091
|
+
{ notMerge: false }
|
|
23092
|
+
);
|
|
22902
23093
|
} else {
|
|
22903
|
-
|
|
23094
|
+
this.chart.setOption(
|
|
23095
|
+
{
|
|
23096
|
+
tooltip: {
|
|
23097
|
+
show: false
|
|
23098
|
+
}
|
|
23099
|
+
},
|
|
23100
|
+
{ notMerge: false }
|
|
23101
|
+
);
|
|
22904
23102
|
}
|
|
22905
|
-
this.
|
|
23103
|
+
this.resizeChart();
|
|
22906
23104
|
}
|
|
22907
23105
|
}
|
|
22908
23106
|
/**
|
|
@@ -22915,10 +23113,19 @@ var ChartController = class extends MDControlController {
|
|
|
22915
23113
|
var _a;
|
|
22916
23114
|
const { data, seriesType } = arg;
|
|
22917
23115
|
let tempConfig = {};
|
|
22918
|
-
if (seriesType === "pie") {
|
|
23116
|
+
if (seriesType === "pie" || seriesType === "gauge") {
|
|
22919
23117
|
if (data && data.value && Array.isArray(data.value)) {
|
|
22920
23118
|
tempConfig = data.value.at(1);
|
|
22921
23119
|
}
|
|
23120
|
+
} else if (seriesType === "radar") {
|
|
23121
|
+
const { componentIndex, componentSubType, componentType, event } = arg;
|
|
23122
|
+
const index = event.topTarget.__dimIdx;
|
|
23123
|
+
if (componentType === "series" && (index || index === 0)) {
|
|
23124
|
+
const serieid2 = "".concat(componentSubType, "_").concat(componentIndex);
|
|
23125
|
+
tempConfig = {
|
|
23126
|
+
_seriesModelId: serieid2
|
|
23127
|
+
};
|
|
23128
|
+
}
|
|
22922
23129
|
} else if (data && Array.isArray(data)) {
|
|
22923
23130
|
tempConfig = data.at(2);
|
|
22924
23131
|
}
|
|
@@ -22929,36 +23136,39 @@ var ChartController = class extends MDControlController {
|
|
|
22929
23136
|
return targetSerie;
|
|
22930
23137
|
}
|
|
22931
23138
|
/**
|
|
22932
|
-
*
|
|
23139
|
+
* 计算查看明细参数
|
|
22933
23140
|
*
|
|
22934
23141
|
* @param {IData} arg
|
|
22935
23142
|
* @return {*}
|
|
22936
23143
|
* @memberof ChartController
|
|
22937
23144
|
*/
|
|
22938
23145
|
computedDrillDetailParam(arg) {
|
|
22939
|
-
var _a;
|
|
22940
|
-
const { seriesType
|
|
23146
|
+
var _a, _b;
|
|
23147
|
+
const { seriesType } = arg;
|
|
22941
23148
|
const targetSerie = this.computedClickSerieModel(arg);
|
|
22942
23149
|
let measureId = "";
|
|
22943
23150
|
const dimension = [];
|
|
22944
23151
|
if (targetSerie) {
|
|
22945
23152
|
measureId = targetSerie.valueField;
|
|
22946
|
-
if (seriesType === "
|
|
22947
|
-
|
|
22948
|
-
|
|
22949
|
-
|
|
22950
|
-
|
|
22951
|
-
|
|
23153
|
+
if (seriesType === "radar") {
|
|
23154
|
+
const { event } = arg;
|
|
23155
|
+
const index = event.topTarget.__dimIdx;
|
|
23156
|
+
const cataData = this.generator.radarMap.get(targetSerie.catalogField);
|
|
23157
|
+
if (cataData && cataData.indicatorKeys) {
|
|
23158
|
+
const cataValue = cataData.indicatorKeys[index];
|
|
23159
|
+
const tempDimension = (_a = this.generator.seriesGenerators) == null ? void 0 : _a[0].catalogMap.get(cataValue);
|
|
23160
|
+
if (tempDimension) {
|
|
23161
|
+
Object.keys(tempDimension).forEach((key) => {
|
|
22952
23162
|
dimension.push({
|
|
22953
23163
|
name: key,
|
|
22954
|
-
value:
|
|
23164
|
+
value: tempDimension[key]
|
|
22955
23165
|
});
|
|
22956
|
-
}
|
|
22957
|
-
}
|
|
23166
|
+
});
|
|
23167
|
+
}
|
|
22958
23168
|
}
|
|
22959
|
-
} else {
|
|
23169
|
+
} else if (seriesType !== "gauge") {
|
|
22960
23170
|
const value = arg.name;
|
|
22961
|
-
const tempDimension = (
|
|
23171
|
+
const tempDimension = (_b = this.generator.seriesGenerators) == null ? void 0 : _b[0].catalogMap.get(value);
|
|
22962
23172
|
if (tempDimension) {
|
|
22963
23173
|
Object.keys(tempDimension).forEach((key) => {
|
|
22964
23174
|
dimension.push({
|
|
@@ -22973,7 +23183,7 @@ var ChartController = class extends MDControlController {
|
|
|
22973
23183
|
measure: {
|
|
22974
23184
|
name: measureId
|
|
22975
23185
|
},
|
|
22976
|
-
dimension
|
|
23186
|
+
dimension: dimension.length > 0 ? dimension : void 0
|
|
22977
23187
|
};
|
|
22978
23188
|
}
|
|
22979
23189
|
/**
|
|
@@ -23411,7 +23621,7 @@ import { ModelError as ModelError19, RuntimeModelError as RuntimeModelError34 }
|
|
|
23411
23621
|
|
|
23412
23622
|
// src/ui-logic/utils/handle-src-val.ts
|
|
23413
23623
|
import { ModelError as ModelError18 } from "@ibiz-template/core";
|
|
23414
|
-
import { clone as
|
|
23624
|
+
import { clone as clone25 } from "ramda";
|
|
23415
23625
|
function handleSrcVal2(ctx, srcValParams) {
|
|
23416
23626
|
const { srcDEUILogicParamId, srcFieldName, srcValue } = srcValParams;
|
|
23417
23627
|
const srcValueType = srcValParams.srcValueType || "SRCDLPARAM";
|
|
@@ -23438,7 +23648,7 @@ function handleSrcVal2(ctx, srcValParams) {
|
|
|
23438
23648
|
value = ctx.parameters.context;
|
|
23439
23649
|
break;
|
|
23440
23650
|
case "ENVPARAM":
|
|
23441
|
-
value =
|
|
23651
|
+
value = clone25(ibiz.env);
|
|
23442
23652
|
break;
|
|
23443
23653
|
default:
|
|
23444
23654
|
throw new ModelError18(
|
|
@@ -23895,7 +24105,7 @@ var EndNode2 = class extends UILogicNode {
|
|
|
23895
24105
|
|
|
23896
24106
|
// src/ui-logic/ui-logic-node/prepare-js-param-node/prepare-js-param-node.ts
|
|
23897
24107
|
import { ModelError as ModelError22, RuntimeError as RuntimeError45 } from "@ibiz-template/core";
|
|
23898
|
-
import { clone as
|
|
24108
|
+
import { clone as clone26 } from "ramda";
|
|
23899
24109
|
var PrepareJSParamNode = class extends UILogicNode {
|
|
23900
24110
|
async exec(ctx) {
|
|
23901
24111
|
const nodeParams = this.model.deuilogicNodeParams;
|
|
@@ -23905,7 +24115,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
23905
24115
|
for (const nodeParam of nodeParams) {
|
|
23906
24116
|
let originValue;
|
|
23907
24117
|
if (nodeParam.dstDEUILogicParamId && ibiz.env.logLevel === "DEBUG") {
|
|
23908
|
-
originValue =
|
|
24118
|
+
originValue = clone26(ctx.params[nodeParam.dstDEUILogicParamId]);
|
|
23909
24119
|
}
|
|
23910
24120
|
switch (nodeParam.paramAction) {
|
|
23911
24121
|
case "SETPARAMVALUE":
|
|
@@ -24000,7 +24210,7 @@ var PrepareJSParamNode = class extends UILogicNode {
|
|
|
24000
24210
|
copyParam(nodeParam, ctx) {
|
|
24001
24211
|
const { dstDEUILogicParamId } = nodeParam;
|
|
24002
24212
|
const srcVal = handleSrcVal2(ctx, nodeParam);
|
|
24003
|
-
ctx.params[dstDEUILogicParamId] =
|
|
24213
|
+
ctx.params[dstDEUILogicParamId] = clone26(srcVal);
|
|
24004
24214
|
}
|
|
24005
24215
|
/**
|
|
24006
24216
|
* 绑定参数
|
|
@@ -24307,7 +24517,7 @@ var ResetParamNode2 = class extends UILogicNode {
|
|
|
24307
24517
|
|
|
24308
24518
|
// src/ui-logic/ui-logic-node/copy-param-node/copy-param-node.ts
|
|
24309
24519
|
import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
24310
|
-
import { clone as
|
|
24520
|
+
import { clone as clone27 } from "ramda";
|
|
24311
24521
|
var CopyParamNode2 = class extends UILogicNode {
|
|
24312
24522
|
async exec(ctx) {
|
|
24313
24523
|
const { dstDEUILogicParamId, srcDEUILogicParamId } = this.model;
|
|
@@ -24318,7 +24528,7 @@ var CopyParamNode2 = class extends UILogicNode {
|
|
|
24318
24528
|
);
|
|
24319
24529
|
}
|
|
24320
24530
|
const srcVal = handleSrcVal2(ctx, this.model);
|
|
24321
|
-
ctx.params[dstDEUILogicParamId] =
|
|
24531
|
+
ctx.params[dstDEUILogicParamId] = clone27(srcVal);
|
|
24322
24532
|
ctx.setLastReturn(ctx.params[dstDEUILogicParamId]);
|
|
24323
24533
|
ibiz.log.debug(
|
|
24324
24534
|
ibiz.i18n.t("runtime.uiLogic.copyParameter", {
|
|
@@ -26191,7 +26401,7 @@ var ContextMenuController = class extends ToolbarController {
|
|
|
26191
26401
|
};
|
|
26192
26402
|
|
|
26193
26403
|
// src/controller/control/dashboard/dashboard.controller.ts
|
|
26194
|
-
import { clone as
|
|
26404
|
+
import { clone as clone28 } from "ramda";
|
|
26195
26405
|
var DashboardController = class extends ControlController {
|
|
26196
26406
|
constructor() {
|
|
26197
26407
|
super(...arguments);
|
|
@@ -26374,7 +26584,7 @@ var DashboardController = class extends ControlController {
|
|
|
26374
26584
|
*/
|
|
26375
26585
|
async loadDynaPortletById(id) {
|
|
26376
26586
|
const app = ibiz.hub.getApp(ibiz.env.appId);
|
|
26377
|
-
const tempContext =
|
|
26587
|
+
const tempContext = clone28(this.context);
|
|
26378
26588
|
Object.assign(tempContext, { psappportlet: id });
|
|
26379
26589
|
const res = await app.deService.exec(
|
|
26380
26590
|
"psappportlet",
|
|
@@ -26645,7 +26855,7 @@ var CustomDashboardController = class {
|
|
|
26645
26855
|
|
|
26646
26856
|
// src/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.ts
|
|
26647
26857
|
import { merge } from "lodash-es";
|
|
26648
|
-
import { IBizContext as IBizContext5, IBizParams as IBizParams2 } from "@ibiz-template/core";
|
|
26858
|
+
import { IBizContext as IBizContext5, IBizParams as IBizParams2, Namespace as Namespace2 } from "@ibiz-template/core";
|
|
26649
26859
|
|
|
26650
26860
|
// src/controller/control/dashboard/portlet/portlet-part/portlet-part.state.ts
|
|
26651
26861
|
var PortletPartState = class {
|
|
@@ -26732,6 +26942,22 @@ var PortletPartController = class {
|
|
|
26732
26942
|
return this.dashboard.getController(contentControlId);
|
|
26733
26943
|
}
|
|
26734
26944
|
}
|
|
26945
|
+
/**
|
|
26946
|
+
* @description 内容元素
|
|
26947
|
+
* @readonly
|
|
26948
|
+
* @type {(HTMLDivElement | null)}
|
|
26949
|
+
* @memberof PortletPartController
|
|
26950
|
+
*/
|
|
26951
|
+
get contentElement() {
|
|
26952
|
+
if (this.contentController) {
|
|
26953
|
+
const { codeName = "" } = this.contentController.model;
|
|
26954
|
+
if (codeName) {
|
|
26955
|
+
const ns = new Namespace2("control", ibiz.env.namespace);
|
|
26956
|
+
return document.querySelector(".".concat(ns.m(codeName)));
|
|
26957
|
+
}
|
|
26958
|
+
}
|
|
26959
|
+
return null;
|
|
26960
|
+
}
|
|
26735
26961
|
/**
|
|
26736
26962
|
* 子类不可覆盖或重写此方法,在 init 时需要重写的使用 onInit 方法。
|
|
26737
26963
|
*
|
|
@@ -26946,6 +27172,7 @@ var ContainerPortletController = class extends PortletPartController {
|
|
|
26946
27172
|
};
|
|
26947
27173
|
|
|
26948
27174
|
// src/controller/control/dashboard/portlet/view-portlet/view-portlet.controller.ts
|
|
27175
|
+
import { Namespace as Namespace3 } from "@ibiz-template/core";
|
|
26949
27176
|
var ViewPortletController = class extends PortletPartController {
|
|
26950
27177
|
/**
|
|
26951
27178
|
* 内容控制器
|
|
@@ -26961,6 +27188,22 @@ var ViewPortletController = class extends PortletPartController {
|
|
|
26961
27188
|
return this.dashboard.getController(portletAppView.name);
|
|
26962
27189
|
}
|
|
26963
27190
|
}
|
|
27191
|
+
/**
|
|
27192
|
+
* @description 内容元素
|
|
27193
|
+
* @readonly
|
|
27194
|
+
* @type {(HTMLDivElement | null)}
|
|
27195
|
+
* @memberof PortletPartController
|
|
27196
|
+
*/
|
|
27197
|
+
get contentElement() {
|
|
27198
|
+
if (this.contentController) {
|
|
27199
|
+
const { codeName = "" } = this.contentController.model;
|
|
27200
|
+
if (codeName) {
|
|
27201
|
+
const ns = new Namespace3("view", ibiz.env.namespace);
|
|
27202
|
+
return document.querySelector(".".concat(ns.m(codeName)));
|
|
27203
|
+
}
|
|
27204
|
+
}
|
|
27205
|
+
return null;
|
|
27206
|
+
}
|
|
26964
27207
|
/**
|
|
26965
27208
|
* 刷新门户部件
|
|
26966
27209
|
*
|
|
@@ -27024,6 +27267,21 @@ var RawItemPortletController = class extends PortletPartController {
|
|
|
27024
27267
|
|
|
27025
27268
|
// src/controller/control/dashboard/portlet/report-portlet/report-portlet.controller.ts
|
|
27026
27269
|
var ReportPortletController = class extends PortletPartController {
|
|
27270
|
+
/**
|
|
27271
|
+
* 内容控制器
|
|
27272
|
+
*
|
|
27273
|
+
* @author tony001
|
|
27274
|
+
* @date 2024-05-07 14:05:02
|
|
27275
|
+
* @readonly
|
|
27276
|
+
* @type {(IController | undefined)}
|
|
27277
|
+
*/
|
|
27278
|
+
get contentController() {
|
|
27279
|
+
const { controls = [] } = this.model;
|
|
27280
|
+
const reportPanel = controls.find((x) => x.controlType === "REPORTPANEL");
|
|
27281
|
+
if (reportPanel && reportPanel.codeName) {
|
|
27282
|
+
return this.dashboard.getController(reportPanel.codeName);
|
|
27283
|
+
}
|
|
27284
|
+
}
|
|
27027
27285
|
/**
|
|
27028
27286
|
* 刷新报表部件
|
|
27029
27287
|
*
|
|
@@ -30707,7 +30965,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
30707
30965
|
|
|
30708
30966
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.ts
|
|
30709
30967
|
import { ModelError as ModelError28 } from "@ibiz-template/core";
|
|
30710
|
-
import { clone as
|
|
30968
|
+
import { clone as clone29 } from "ramda";
|
|
30711
30969
|
var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
30712
30970
|
constructor() {
|
|
30713
30971
|
super(...arguments);
|
|
@@ -30799,7 +31057,7 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
30799
31057
|
copyFields.forEach((key) => {
|
|
30800
31058
|
tempForm[key] = this.form.model[key];
|
|
30801
31059
|
});
|
|
30802
|
-
this.repeatedForm =
|
|
31060
|
+
this.repeatedForm = clone29(tempForm);
|
|
30803
31061
|
}
|
|
30804
31062
|
/**
|
|
30805
31063
|
* 设置重复器控制器
|
|
@@ -31007,7 +31265,7 @@ import {
|
|
|
31007
31265
|
} from "@ibiz-template/core";
|
|
31008
31266
|
import { debounce } from "lodash-es";
|
|
31009
31267
|
import { createUUID as createUUID12 } from "qx-util";
|
|
31010
|
-
import { clone as
|
|
31268
|
+
import { clone as clone30, isNil as isNil27 } from "ramda";
|
|
31011
31269
|
|
|
31012
31270
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
31013
31271
|
import {
|
|
@@ -31376,8 +31634,8 @@ var EditFormController = class extends FormController {
|
|
|
31376
31634
|
* @return {*} {Promise<IData>}
|
|
31377
31635
|
*/
|
|
31378
31636
|
async copy() {
|
|
31379
|
-
const context =
|
|
31380
|
-
const queryParams =
|
|
31637
|
+
const context = clone30(this.context);
|
|
31638
|
+
const queryParams = clone30(this.params);
|
|
31381
31639
|
const appDataEntity = await ibiz.hub.getAppDataEntity(
|
|
31382
31640
|
this.model.appDataEntityId,
|
|
31383
31641
|
this.model.appId
|
|
@@ -31434,7 +31692,7 @@ var EditFormController = class extends FormController {
|
|
|
31434
31692
|
return this.loadDraft();
|
|
31435
31693
|
}
|
|
31436
31694
|
const { context, params } = this.handlerAbilityParams(args);
|
|
31437
|
-
const queryParams =
|
|
31695
|
+
const queryParams = clone30(params);
|
|
31438
31696
|
let res;
|
|
31439
31697
|
try {
|
|
31440
31698
|
await this.startLoading();
|
|
@@ -32131,7 +32389,7 @@ import {
|
|
|
32131
32389
|
RuntimeError as RuntimeError59,
|
|
32132
32390
|
RuntimeModelError as RuntimeModelError63
|
|
32133
32391
|
} from "@ibiz-template/core";
|
|
32134
|
-
import { clone as
|
|
32392
|
+
import { clone as clone31, isNil as isNil28 } from "ramda";
|
|
32135
32393
|
import dayjs5 from "dayjs";
|
|
32136
32394
|
|
|
32137
32395
|
// src/controller/control/grid/grid/grid.service.ts
|
|
@@ -32275,6 +32533,9 @@ async function calcColumnModelBySchema(json, c) {
|
|
|
32275
32533
|
});
|
|
32276
32534
|
const addColumns = [];
|
|
32277
32535
|
const addDataItems = [];
|
|
32536
|
+
addFields.sort((a, b) => {
|
|
32537
|
+
return (a.description || "").localeCompare(b.description || "");
|
|
32538
|
+
});
|
|
32278
32539
|
addFields.forEach((item) => {
|
|
32279
32540
|
addColumns.push({
|
|
32280
32541
|
appId: c.model.appId,
|
|
@@ -32564,7 +32825,7 @@ var GridController = class extends MDControlController {
|
|
|
32564
32825
|
if (!this.addSchemaColumn) {
|
|
32565
32826
|
return;
|
|
32566
32827
|
}
|
|
32567
|
-
const tempParams =
|
|
32828
|
+
const tempParams = clone31(this.jsonSchemaParams);
|
|
32568
32829
|
Object.assign(tempParams, this.params);
|
|
32569
32830
|
const json = await getEntitySchema(
|
|
32570
32831
|
this.model.appDataEntityId,
|
|
@@ -32577,7 +32838,7 @@ var GridController = class extends MDControlController {
|
|
|
32577
32838
|
const result = await calcColumnModelBySchema(json, this);
|
|
32578
32839
|
if (result && result.degridColumns.length > 0) {
|
|
32579
32840
|
const { degridColumns, degridDataItems } = result;
|
|
32580
|
-
this.model =
|
|
32841
|
+
this.model = clone31(this.model);
|
|
32581
32842
|
this.model.degridColumns = [
|
|
32582
32843
|
...this.model.degridColumns || [],
|
|
32583
32844
|
...degridColumns
|
|
@@ -33289,7 +33550,7 @@ var GridController = class extends MDControlController {
|
|
|
33289
33550
|
);
|
|
33290
33551
|
}
|
|
33291
33552
|
if (row.data.srfuf === 1 /* UPDATE */) {
|
|
33292
|
-
row.cacheData =
|
|
33553
|
+
row.cacheData = clone31(row.data);
|
|
33293
33554
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
33294
33555
|
Object.assign(row.data, defaultVal);
|
|
33295
33556
|
}
|
|
@@ -33432,7 +33693,7 @@ var GridController = class extends MDControlController {
|
|
|
33432
33693
|
*/
|
|
33433
33694
|
formatExcelData(data) {
|
|
33434
33695
|
const { fields = [] } = this.dataExportParam;
|
|
33435
|
-
const cloneData =
|
|
33696
|
+
const cloneData = clone31(
|
|
33436
33697
|
data.map((item) => {
|
|
33437
33698
|
return fields.reduce((obj, key) => {
|
|
33438
33699
|
obj[key] = item[key];
|
|
@@ -33790,7 +34051,7 @@ import {
|
|
|
33790
34051
|
} from "@ibiz-template/core";
|
|
33791
34052
|
import dayjs6 from "dayjs";
|
|
33792
34053
|
import { debounce as debounce2 } from "lodash-es";
|
|
33793
|
-
import { clone as
|
|
34054
|
+
import { clone as clone32, isNil as isNil29 } from "ramda";
|
|
33794
34055
|
import { isNilOrEmpty as isNilOrEmpty8 } from "qx-util";
|
|
33795
34056
|
var GridFieldColumnController = class extends GridColumnController {
|
|
33796
34057
|
constructor() {
|
|
@@ -33934,7 +34195,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
33934
34195
|
srfkey: value,
|
|
33935
34196
|
...wfContext
|
|
33936
34197
|
});
|
|
33937
|
-
const tempParams =
|
|
34198
|
+
const tempParams = clone32(this.params);
|
|
33938
34199
|
const { context: newContext, params: newParams } = this.handlePublicParams(
|
|
33939
34200
|
row.data,
|
|
33940
34201
|
tempContext,
|
|
@@ -35479,7 +35740,7 @@ var PickupViewPanelController = class extends ControlController {
|
|
|
35479
35740
|
|
|
35480
35741
|
// src/controller/control/search-bar/search-bar.controller.ts
|
|
35481
35742
|
import { mergeInLeft as mergeInLeft3, recursiveIterate as recursiveIterate10 } from "@ibiz-template/core";
|
|
35482
|
-
import { clone as
|
|
35743
|
+
import { clone as clone34 } from "ramda";
|
|
35483
35744
|
import { isString as isString3 } from "lodash-es";
|
|
35484
35745
|
|
|
35485
35746
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
@@ -35937,6 +36198,9 @@ async function calcFilterModelBySchema(json, appDataEntityId, modelAppId) {
|
|
|
35937
36198
|
}
|
|
35938
36199
|
});
|
|
35939
36200
|
const addSearchBarFilters = [];
|
|
36201
|
+
addFields.sort((a, b) => {
|
|
36202
|
+
return (a.description || "").localeCompare(b.description || "");
|
|
36203
|
+
});
|
|
35940
36204
|
addFields.forEach((item) => {
|
|
35941
36205
|
const ops = typeToOPs[item.type];
|
|
35942
36206
|
if (!ops) {
|
|
@@ -35968,7 +36232,7 @@ async function calcFilterModelBySchema(json, appDataEntityId, modelAppId) {
|
|
|
35968
36232
|
|
|
35969
36233
|
// src/controller/control/search-bar/search-bar-filter-items.controller.ts
|
|
35970
36234
|
import { RuntimeError as RuntimeError62 } from "@ibiz-template/core";
|
|
35971
|
-
import { clone as
|
|
36235
|
+
import { clone as clone33 } from "ramda";
|
|
35972
36236
|
var SubFieldRegex2 = /^N_(.\w+)_(.\w+)$/;
|
|
35973
36237
|
var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
35974
36238
|
constructor(filterModels, appDataEntity, context, params) {
|
|
@@ -36053,7 +36317,7 @@ var SearchBarFilterItemsController = class extends SearchBarFilterController {
|
|
|
36053
36317
|
const matches = subStr.match(SubFieldRegex2);
|
|
36054
36318
|
const subField = matches[1];
|
|
36055
36319
|
const subOP = matches[2];
|
|
36056
|
-
const cloneItem =
|
|
36320
|
+
const cloneItem = clone33(item);
|
|
36057
36321
|
cloneItem.defsearchMode.valueOP = subOP;
|
|
36058
36322
|
cloneItem.id = subField;
|
|
36059
36323
|
const filterC = new SearchBarFilterController(
|
|
@@ -36474,6 +36738,8 @@ var SearchBarController = class extends ControlController {
|
|
|
36474
36738
|
this.state.quickSearchItems = [];
|
|
36475
36739
|
this.state.quickSearchFieldNames = [];
|
|
36476
36740
|
this.state.quickSearchPlaceHolder = "";
|
|
36741
|
+
this.state.filterMode = "default";
|
|
36742
|
+
this.state.customCond = "";
|
|
36477
36743
|
this.resetFilter();
|
|
36478
36744
|
this.state.visible = !!(this.model.enableQuickSearch || this.model.enableGroup || this.enableFilter);
|
|
36479
36745
|
}
|
|
@@ -36520,7 +36786,7 @@ var SearchBarController = class extends ControlController {
|
|
|
36520
36786
|
if (!this.addSchemaFilters) {
|
|
36521
36787
|
return;
|
|
36522
36788
|
}
|
|
36523
|
-
const tempParams =
|
|
36789
|
+
const tempParams = clone34(this.jsonSchemaParams);
|
|
36524
36790
|
Object.assign(tempParams, this.params);
|
|
36525
36791
|
const json = await getEntitySchema(
|
|
36526
36792
|
this.model.appDataEntityId,
|
|
@@ -36548,7 +36814,7 @@ var SearchBarController = class extends ControlController {
|
|
|
36548
36814
|
}
|
|
36549
36815
|
});
|
|
36550
36816
|
if (addSearchBarFilters.length > 0) {
|
|
36551
|
-
this.model =
|
|
36817
|
+
this.model = clone34(this.model);
|
|
36552
36818
|
this.model.searchBarFilters = addSearchBarFilters.concat(...mergeFilters);
|
|
36553
36819
|
this.model.enableFilter = true;
|
|
36554
36820
|
}
|
|
@@ -36717,6 +36983,42 @@ var SearchBarController = class extends ControlController {
|
|
|
36717
36983
|
);
|
|
36718
36984
|
}
|
|
36719
36985
|
}
|
|
36986
|
+
/**
|
|
36987
|
+
* 附加自定义条件
|
|
36988
|
+
*
|
|
36989
|
+
* @author zhanghengfeng
|
|
36990
|
+
* @date 2024-07-19 10:07:34
|
|
36991
|
+
* @param {IFilterNode[]} nodes
|
|
36992
|
+
* @return {*} {void}
|
|
36993
|
+
*/
|
|
36994
|
+
attachCustomCond(nodes) {
|
|
36995
|
+
if (!this.state.customCond) {
|
|
36996
|
+
return;
|
|
36997
|
+
}
|
|
36998
|
+
if (!nodes[0]) {
|
|
36999
|
+
nodes[0] = {
|
|
37000
|
+
nodeType: "GROUP",
|
|
37001
|
+
logicType: "AND",
|
|
37002
|
+
children: []
|
|
37003
|
+
};
|
|
37004
|
+
}
|
|
37005
|
+
const group = nodes[0];
|
|
37006
|
+
if (!Array.isArray(group.children)) {
|
|
37007
|
+
group.children = [];
|
|
37008
|
+
}
|
|
37009
|
+
const item = group.children.find(
|
|
37010
|
+
(child) => child.nodeType === "CUSTOM" && child.customType === "PQL"
|
|
37011
|
+
);
|
|
37012
|
+
if (item) {
|
|
37013
|
+
item.customCond = this.state.customCond;
|
|
37014
|
+
} else {
|
|
37015
|
+
group.children.push({
|
|
37016
|
+
nodeType: "CUSTOM",
|
|
37017
|
+
customType: "PQL",
|
|
37018
|
+
customCond: this.state.customCond
|
|
37019
|
+
});
|
|
37020
|
+
}
|
|
37021
|
+
}
|
|
36720
37022
|
/**
|
|
36721
37023
|
* 计算过滤项参数
|
|
36722
37024
|
* @author lxm
|
|
@@ -36727,7 +37029,9 @@ var SearchBarController = class extends ControlController {
|
|
|
36727
37029
|
if (!this.enableFilter) {
|
|
36728
37030
|
return;
|
|
36729
37031
|
}
|
|
36730
|
-
const
|
|
37032
|
+
const nodes = clone34(this.state.filterNodes);
|
|
37033
|
+
this.attachCustomCond(nodes);
|
|
37034
|
+
const searchconds = calcSearchConds(nodes, {
|
|
36731
37035
|
after: (node, cond) => {
|
|
36732
37036
|
if (node.nodeType === "FIELD" && isString3(node.value)) {
|
|
36733
37037
|
if (ScriptValueRegex2.test(node.value)) {
|
|
@@ -36741,6 +37045,17 @@ var SearchBarController = class extends ControlController {
|
|
|
36741
37045
|
}
|
|
36742
37046
|
}
|
|
36743
37047
|
});
|
|
37048
|
+
if (!searchconds) {
|
|
37049
|
+
const customNodes = [
|
|
37050
|
+
{
|
|
37051
|
+
nodeType: "GROUP",
|
|
37052
|
+
logicType: "AND",
|
|
37053
|
+
children: []
|
|
37054
|
+
}
|
|
37055
|
+
];
|
|
37056
|
+
this.attachCustomCond(customNodes);
|
|
37057
|
+
return calcSearchConds(customNodes);
|
|
37058
|
+
}
|
|
36744
37059
|
return searchconds;
|
|
36745
37060
|
}
|
|
36746
37061
|
/**
|
|
@@ -36894,7 +37209,20 @@ var SearchBarController = class extends ControlController {
|
|
|
36894
37209
|
*/
|
|
36895
37210
|
async handleSave() {
|
|
36896
37211
|
if (this.grid && this.state.selectedSearchGroupItem) {
|
|
36897
|
-
const
|
|
37212
|
+
const nodes = clone34(this.state.filterNodes);
|
|
37213
|
+
this.attachCustomCond(nodes);
|
|
37214
|
+
let filters = calcSearchCondExs(nodes);
|
|
37215
|
+
if (!filters) {
|
|
37216
|
+
const customNodes = [
|
|
37217
|
+
{
|
|
37218
|
+
nodeType: "GROUP",
|
|
37219
|
+
logicType: "AND",
|
|
37220
|
+
children: []
|
|
37221
|
+
}
|
|
37222
|
+
];
|
|
37223
|
+
this.attachCustomCond(customNodes);
|
|
37224
|
+
filters = calcSearchCondExs(customNodes);
|
|
37225
|
+
}
|
|
36898
37226
|
const saveParams = {
|
|
36899
37227
|
searchconds: filters,
|
|
36900
37228
|
sort: this.grid.state.sortQuery,
|
|
@@ -36940,7 +37268,7 @@ var SearchBarController = class extends ControlController {
|
|
|
36940
37268
|
* @Date: 2023-12-21 10:29:24
|
|
36941
37269
|
*/
|
|
36942
37270
|
async handleGroupClick(groupItem) {
|
|
36943
|
-
var _a;
|
|
37271
|
+
var _a, _b;
|
|
36944
37272
|
if (this.enableStorage) {
|
|
36945
37273
|
const key = (_a = this.storageKeyFn) == null ? void 0 : _a.call(this);
|
|
36946
37274
|
if (key && groupItem.name) {
|
|
@@ -36959,9 +37287,26 @@ var SearchBarController = class extends ControlController {
|
|
|
36959
37287
|
const filterNodes = groupItem.searchGroupData.searchconds.map(
|
|
36960
37288
|
(item) => SearchCondEx2filterNode(item)
|
|
36961
37289
|
);
|
|
37290
|
+
this.state.customCond = "";
|
|
37291
|
+
if (filterNodes && filterNodes[0]) {
|
|
37292
|
+
const group = filterNodes[0];
|
|
37293
|
+
const { children } = group;
|
|
37294
|
+
if (Array.isArray(children)) {
|
|
37295
|
+
const index = children.findIndex(
|
|
37296
|
+
(child) => child.nodeType === "CUSTOM" && child.customType === "PQL"
|
|
37297
|
+
);
|
|
37298
|
+
if (index !== -1) {
|
|
37299
|
+
const item = children.splice(index, 1);
|
|
37300
|
+
this.state.customCond = ((_b = item[0]) == null ? void 0 : _b.customCond) || "";
|
|
37301
|
+
}
|
|
37302
|
+
}
|
|
37303
|
+
}
|
|
37304
|
+
this.state.filterMode = "default";
|
|
36962
37305
|
this.state.filterNodes = filterNodes;
|
|
36963
37306
|
} else {
|
|
36964
37307
|
this.state.filterNodes = getOriginFilterNodes();
|
|
37308
|
+
this.state.customCond = "";
|
|
37309
|
+
this.state.filterMode = "default";
|
|
36965
37310
|
}
|
|
36966
37311
|
recursiveIterate10(this.state.filterNodes[0], (node) => {
|
|
36967
37312
|
if (node.nodeType === "FIELD") {
|
|
@@ -39172,10 +39517,10 @@ var MDCtrlController = class extends MDControlController {
|
|
|
39172
39517
|
|
|
39173
39518
|
// src/controller/control/kanban/kanban.controller.ts
|
|
39174
39519
|
import { RuntimeError as RuntimeError65, RuntimeModelError as RuntimeModelError68 } from "@ibiz-template/core";
|
|
39175
|
-
import { clone as
|
|
39520
|
+
import { clone as clone36, isNil as isNil33 } from "ramda";
|
|
39176
39521
|
|
|
39177
39522
|
// src/controller/control/kanban/kanban.service.ts
|
|
39178
|
-
import { clone as
|
|
39523
|
+
import { clone as clone35 } from "ramda";
|
|
39179
39524
|
var KanbanService = class extends DataViewControlService {
|
|
39180
39525
|
/**
|
|
39181
39526
|
* 更新分组数据
|
|
@@ -39204,7 +39549,7 @@ var KanbanService = class extends DataViewControlService {
|
|
|
39204
39549
|
*/
|
|
39205
39550
|
async moveOrderItem(context, data, args) {
|
|
39206
39551
|
const moveAction = this.model.moveControlAction.appDEMethodId;
|
|
39207
|
-
const params =
|
|
39552
|
+
const params = clone35(data.getOrigin());
|
|
39208
39553
|
Object.assign(params, args);
|
|
39209
39554
|
let res = await this.exec(moveAction, context, params, {
|
|
39210
39555
|
srfupdateitem: true
|
|
@@ -39536,7 +39881,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
39536
39881
|
}
|
|
39537
39882
|
return moveData;
|
|
39538
39883
|
};
|
|
39539
|
-
const draggedItem =
|
|
39884
|
+
const draggedItem = clone36(fromGroup.children[fromIndex]);
|
|
39540
39885
|
const removeItems = fromGroup.children.splice(fromIndex, 1);
|
|
39541
39886
|
toGroup.children.splice(toIndex, 0, ...removeItems);
|
|
39542
39887
|
if (info.from !== info.to) {
|
|
@@ -39809,7 +40154,7 @@ import {
|
|
|
39809
40154
|
awaitTimeout as awaitTimeout3,
|
|
39810
40155
|
recursiveIterate as recursiveIterate12
|
|
39811
40156
|
} from "@ibiz-template/core";
|
|
39812
|
-
import { clone as
|
|
40157
|
+
import { clone as clone37 } from "ramda";
|
|
39813
40158
|
|
|
39814
40159
|
// src/controller/control/tree-grid-ex/tree-grid-ex.service.ts
|
|
39815
40160
|
var TreeGridExService = class extends TreeService {
|
|
@@ -40281,7 +40626,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
40281
40626
|
);
|
|
40282
40627
|
}
|
|
40283
40628
|
if (row.data._deData.srfuf === 1 /* UPDATE */) {
|
|
40284
|
-
row.cacheData =
|
|
40629
|
+
row.cacheData = clone37(row.data);
|
|
40285
40630
|
const defaultVal = this.calcDefaultValue(row.data, false);
|
|
40286
40631
|
Object.assign(row.data, defaultVal);
|
|
40287
40632
|
}
|
|
@@ -40394,7 +40739,7 @@ import {
|
|
|
40394
40739
|
RuntimeError as RuntimeError67,
|
|
40395
40740
|
RuntimeModelError as RuntimeModelError70
|
|
40396
40741
|
} from "@ibiz-template/core";
|
|
40397
|
-
import { clone as
|
|
40742
|
+
import { clone as clone38 } from "ramda";
|
|
40398
40743
|
import dayjs7 from "dayjs";
|
|
40399
40744
|
var TreeGridExNodeColumnController = class {
|
|
40400
40745
|
/**
|
|
@@ -40611,7 +40956,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
40611
40956
|
srfkey: value,
|
|
40612
40957
|
...wfContext
|
|
40613
40958
|
});
|
|
40614
|
-
const tempParams =
|
|
40959
|
+
const tempParams = clone38(this.params);
|
|
40615
40960
|
const { userParam } = this.nodeColumn;
|
|
40616
40961
|
if (userParam) {
|
|
40617
40962
|
const { navigateContexts, navigateParams } = parseUserParams(userParam);
|
|
@@ -42764,8 +43109,8 @@ import { QXEvent as QXEvent11 } from "qx-util";
|
|
|
42764
43109
|
|
|
42765
43110
|
// src/controller/notification/async-action.controller.ts
|
|
42766
43111
|
import { QXEvent as QXEvent9 } from "qx-util";
|
|
42767
|
-
import { clone as
|
|
42768
|
-
import { isNil as isNil34, isNumber as
|
|
43112
|
+
import { clone as clone39 } from "ramda";
|
|
43113
|
+
import { isNil as isNil34, isNumber as isNumber3 } from "lodash-es";
|
|
42769
43114
|
import dayjs8 from "dayjs";
|
|
42770
43115
|
var AsyncActionController = class {
|
|
42771
43116
|
constructor() {
|
|
@@ -42839,7 +43184,7 @@ var AsyncActionController = class {
|
|
|
42839
43184
|
"updatedate"
|
|
42840
43185
|
];
|
|
42841
43186
|
dateFields.forEach((key) => {
|
|
42842
|
-
if (
|
|
43187
|
+
if (isNumber3(data[key])) {
|
|
42843
43188
|
data[key] = dayjs8(data[key]).format("YYYY-MM-DD HH:mm:ss");
|
|
42844
43189
|
}
|
|
42845
43190
|
});
|
|
@@ -42875,7 +43220,7 @@ var AsyncActionController = class {
|
|
|
42875
43220
|
} else {
|
|
42876
43221
|
this.noticeResult(action);
|
|
42877
43222
|
}
|
|
42878
|
-
this.evt.emit("add",
|
|
43223
|
+
this.evt.emit("add", clone39(action));
|
|
42879
43224
|
this.evt.emit("dataChange");
|
|
42880
43225
|
}
|
|
42881
43226
|
/**
|
|
@@ -42897,7 +43242,7 @@ var AsyncActionController = class {
|
|
|
42897
43242
|
}
|
|
42898
43243
|
this.noticeResult(action);
|
|
42899
43244
|
}
|
|
42900
|
-
this.evt.emit("change",
|
|
43245
|
+
this.evt.emit("change", clone39(action));
|
|
42901
43246
|
this.evt.emit("dataChange");
|
|
42902
43247
|
}
|
|
42903
43248
|
noticeResult(action) {
|
|
@@ -44062,7 +44407,7 @@ var ViewEngineBase = class {
|
|
|
44062
44407
|
|
|
44063
44408
|
// src/engine/md-view.engine.ts
|
|
44064
44409
|
import { RuntimeModelError as RuntimeModelError73 } from "@ibiz-template/core";
|
|
44065
|
-
import { clone as
|
|
44410
|
+
import { clone as clone40 } from "ramda";
|
|
44066
44411
|
var MDViewEngine = class extends ViewEngineBase {
|
|
44067
44412
|
/**
|
|
44068
44413
|
* 多数据部件名称
|
|
@@ -44317,7 +44662,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
44317
44662
|
ibiz.i18n.t("runtime.engine.logicNewdata")
|
|
44318
44663
|
);
|
|
44319
44664
|
}
|
|
44320
|
-
const params =
|
|
44665
|
+
const params = clone40(this.view.params);
|
|
44321
44666
|
if (copyMode) {
|
|
44322
44667
|
params.srfcopymode = copyMode;
|
|
44323
44668
|
}
|