@ibiz-template/runtime 0.7.31-alpha.0 → 0.7.34
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 +496 -67
- 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.map +1 -1
- package/out/controller/control/chart/chart.controller.js +25 -2
- package/out/controller/control/chart/generator/base-series-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/base-series-generator.js +26 -5
- package/out/controller/control/chart/generator/chart-options-generator.d.ts +2 -1
- package/out/controller/control/chart/generator/chart-options-generator.d.ts.map +1 -1
- package/out/controller/control/chart/generator/chart-options-generator.js +7 -6
- package/out/controller/control/dashboard/dashboard.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/dashboard.controller.js +0 -1
- package/out/controller/control/dashboard/portlet/chart-portlet/chart-portlet.controller.d.ts +5 -4
- package/out/controller/control/dashboard/portlet/chart-portlet/chart-portlet.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/portlet/chart-portlet/chart-portlet.controller.js +5 -4
- package/out/controller/control/dashboard/portlet/list-portlet/list-portlet.controller.d.ts +5 -4
- package/out/controller/control/dashboard/portlet/list-portlet/list-portlet.controller.d.ts.map +1 -1
- package/out/controller/control/dashboard/portlet/list-portlet/list-portlet.controller.js +5 -4
- package/out/controller/control/dashboard/portlet/portlet-part/portlet-part.controller.d.ts +5 -4
- 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 +5 -4
- package/out/controller/control/dashboard/portlet/report-portlet/report-portlet.controller.d.ts +3 -2
- 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 +11 -3
- package/out/controller/control/dashboard/portlet/view-portlet/view-portlet.controller.d.ts +4 -4
- 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 +4 -4
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +6 -8
- package/out/controller/control/search-bar/search-bar.controller.d.ts +16 -0
- package/out/controller/control/search-bar/search-bar.controller.d.ts.map +1 -1
- package/out/controller/control/search-bar/search-bar.controller.js +54 -1
- package/out/global/global-util/global-util.d.ts +8 -1
- package/out/global/global-util/global-util.d.ts.map +1 -1
- package/out/global/global-util/global-util.js +8 -1
- package/out/interface/controller/controller/control/i-control.controller.d.ts +8 -0
- package/out/interface/controller/controller/control/i-control.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/i-dashboard.controller.d.ts +10 -1
- package/out/interface/controller/controller/control/i-dashboard.controller.d.ts.map +1 -1
- package/out/interface/controller/controller/control/portlet/i-portlet.controller.d.ts +8 -0
- package/out/interface/controller/controller/control/portlet/i-portlet.controller.d.ts.map +1 -1
- package/out/interface/controller/event/control/i-dashboard.event.d.ts +19 -0
- package/out/interface/controller/event/control/i-dashboard.event.d.ts.map +1 -1
- package/out/interface/util/i-jsonschema-util/i-jsonschema-util.d.ts +35 -0
- package/out/interface/util/i-jsonschema-util/i-jsonschema-util.d.ts.map +1 -0
- package/out/interface/util/i-jsonschema-util/i-jsonschema-util.js +1 -0
- 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/interface/util/index.d.ts +1 -0
- package/out/interface/util/index.d.ts.map +1 -1
- package/out/locale/en/index.d.ts +0 -1
- package/out/locale/en/index.d.ts.map +1 -1
- package/out/locale/en/index.js +0 -1
- package/out/locale/zh-CN/index.d.ts +0 -1
- package/out/locale/zh-CN/index.d.ts.map +1 -1
- package/out/locale/zh-CN/index.js +0 -1
- package/out/service/de-service-util.d.ts +19 -0
- package/out/service/de-service-util.d.ts.map +1 -1
- package/out/service/de-service-util.js +42 -10
- package/out/service/vo/chart-data/chart-data.d.ts +2 -1
- package/out/service/vo/chart-data/chart-data.d.ts.map +1 -1
- package/out/service/vo/chart-data/chart-data.js +2 -1
- package/out/utils/index.d.ts +1 -0
- package/out/utils/index.d.ts.map +1 -1
- package/out/utils/index.js +1 -0
- package/out/utils/jsonschema-util/jsonschema-util.d.ts +108 -0
- package/out/utils/jsonschema-util/jsonschema-util.d.ts.map +1 -0
- package/out/utils/jsonschema-util/jsonschema-util.js +305 -0
- package/package.json +5 -5
package/dist/index.esm.js
CHANGED
|
@@ -11977,11 +11977,12 @@ function updateKeyDefine4(target, keys) {
|
|
|
11977
11977
|
});
|
|
11978
11978
|
}
|
|
11979
11979
|
var ChartData = class {
|
|
11980
|
-
constructor(deData, seriesModel, catalog, groupName) {
|
|
11980
|
+
constructor(deData, seriesModel, catalog, groupName, chartId) {
|
|
11981
11981
|
this._seriesModelId = seriesModel == null ? void 0 : seriesModel.id;
|
|
11982
11982
|
this._catalog = catalog;
|
|
11983
11983
|
this._groupName = groupName;
|
|
11984
11984
|
this._uuid = createUUID5();
|
|
11985
|
+
this._chartid = chartId;
|
|
11985
11986
|
return new Proxy(this, {
|
|
11986
11987
|
set(target, p, value) {
|
|
11987
11988
|
if (Object.prototype.hasOwnProperty.call(deData, p)) {
|
|
@@ -12241,6 +12242,15 @@ var _DEServiceUtil = class _DEServiceUtil {
|
|
|
12241
12242
|
* @type {Map<string, Map<string, IAppDEService>>} Map<域标识, Map<实体标识, 实体服务>>
|
|
12242
12243
|
*/
|
|
12243
12244
|
this.cache = /* @__PURE__ */ new Map();
|
|
12245
|
+
/**
|
|
12246
|
+
* 创建中缓存
|
|
12247
|
+
*
|
|
12248
|
+
* @author tony001
|
|
12249
|
+
* @date 2024-07-24 22:07:21
|
|
12250
|
+
* @protected
|
|
12251
|
+
* @type {Map<string, Promise<IAppDEService>>}
|
|
12252
|
+
*/
|
|
12253
|
+
this.creatingCache = /* @__PURE__ */ new Map();
|
|
12244
12254
|
}
|
|
12245
12255
|
/**
|
|
12246
12256
|
* 注册服务工厂方法
|
|
@@ -12277,24 +12287,46 @@ var _DEServiceUtil = class _DEServiceUtil {
|
|
|
12277
12287
|
}
|
|
12278
12288
|
const map = this.cache.get(sandboxId);
|
|
12279
12289
|
if (!map.has(id)) {
|
|
12280
|
-
const
|
|
12281
|
-
|
|
12282
|
-
|
|
12283
|
-
|
|
12284
|
-
if (!entityModel) {
|
|
12285
|
-
throw new RuntimeError23(ibiz.i18n.t("runtime.service.noFound", { id }));
|
|
12286
|
-
}
|
|
12287
|
-
const constructor = _DEServiceUtil.constructorCache.get(id.toUpperCase());
|
|
12288
|
-
let service;
|
|
12289
|
-
if (constructor) {
|
|
12290
|
-
service = await constructor(sandboxId, entityModel);
|
|
12290
|
+
const cacheKey = "".concat(sandboxId, "@").concat(id);
|
|
12291
|
+
let result;
|
|
12292
|
+
if (this.creatingCache.has(cacheKey)) {
|
|
12293
|
+
result = await this.creatingCache.get(cacheKey);
|
|
12291
12294
|
} else {
|
|
12292
|
-
service =
|
|
12295
|
+
const service = this.createServiceInstance(sandboxId, id);
|
|
12296
|
+
this.creatingCache.set(cacheKey, service);
|
|
12297
|
+
result = await service;
|
|
12298
|
+
this.creatingCache.delete(cacheKey);
|
|
12293
12299
|
}
|
|
12294
|
-
map.set(id,
|
|
12300
|
+
map.set(id, result);
|
|
12295
12301
|
}
|
|
12296
12302
|
return map.get(id);
|
|
12297
12303
|
}
|
|
12304
|
+
/**
|
|
12305
|
+
* 创建实体服务实例
|
|
12306
|
+
*
|
|
12307
|
+
* @author tony001
|
|
12308
|
+
* @date 2024-07-24 22:07:28
|
|
12309
|
+
* @param {string} sandboxId
|
|
12310
|
+
* @param {string} id
|
|
12311
|
+
* @return {*} {Promise<IAppDEService>}
|
|
12312
|
+
*/
|
|
12313
|
+
async createServiceInstance(sandboxId, id) {
|
|
12314
|
+
const entityModel = await ibiz.hub.getAppDataEntity(
|
|
12315
|
+
id,
|
|
12316
|
+
this.appModel.appId
|
|
12317
|
+
);
|
|
12318
|
+
if (!entityModel) {
|
|
12319
|
+
throw new RuntimeError23(ibiz.i18n.t("runtime.service.noFound", { id }));
|
|
12320
|
+
}
|
|
12321
|
+
const constructor = _DEServiceUtil.constructorCache.get(id.toUpperCase());
|
|
12322
|
+
let service;
|
|
12323
|
+
if (constructor) {
|
|
12324
|
+
service = await constructor(sandboxId, entityModel);
|
|
12325
|
+
} else {
|
|
12326
|
+
service = new DEService(sandboxId, entityModel);
|
|
12327
|
+
}
|
|
12328
|
+
return service;
|
|
12329
|
+
}
|
|
12298
12330
|
/**
|
|
12299
12331
|
* 重置服务, 删除指定域下的所有服务缓存
|
|
12300
12332
|
*
|
|
@@ -15888,6 +15920,274 @@ var RecordNavUtil = class {
|
|
|
15888
15920
|
}
|
|
15889
15921
|
};
|
|
15890
15922
|
|
|
15923
|
+
// src/utils/jsonschema-util/jsonschema-util.ts
|
|
15924
|
+
import qs3 from "qs";
|
|
15925
|
+
var JsonSchemaUtil = class {
|
|
15926
|
+
constructor() {
|
|
15927
|
+
/**
|
|
15928
|
+
* 值操作数组
|
|
15929
|
+
*
|
|
15930
|
+
* @author tony001
|
|
15931
|
+
* @date 2024-07-25 00:07:57
|
|
15932
|
+
* @private
|
|
15933
|
+
*/
|
|
15934
|
+
this.valueOPArray = [
|
|
15935
|
+
{ valueOP: "EQ" /* EQ */, label: "\u7B49\u4E8E", sqlOP: "=" },
|
|
15936
|
+
{ valueOP: "NOTEQ" /* NOT_EQ */, label: "\u4E0D\u7B49\u4E8E", sqlOP: "<>" },
|
|
15937
|
+
{ valueOP: "GT" /* GT */, label: "\u5927\u4E8E", sqlOP: ">" },
|
|
15938
|
+
{ valueOP: "GTANDEQ" /* GT_AND_EQ */, label: "\u5927\u4E8E\u7B49\u4E8E", sqlOP: ">=" },
|
|
15939
|
+
{ valueOP: "LT" /* LT */, label: "\u5C0F\u4E8E", sqlOP: "<" },
|
|
15940
|
+
{ valueOP: "LTANDEQ" /* LT_AND_EQ */, label: "\u5C0F\u4E8E\u7B49\u4E8E", sqlOP: "<=" },
|
|
15941
|
+
{ valueOP: "ISNULL" /* IS_NULL */, label: "\u4E3A\u7A7A", sqlOP: "IS NULL" },
|
|
15942
|
+
{ valueOP: "ISNOTNULL" /* IS_NOT_NULL */, label: "\u975E\u7A7A", sqlOP: "IS NOT NULL" },
|
|
15943
|
+
{ valueOP: "IN" /* IN */, label: "\u5C5E\u4E8E", sqlOP: "IN" },
|
|
15944
|
+
{ valueOP: "NOTIN" /* NOT_IN */, label: "\u4E0D\u5C5E\u4E8E", sqlOP: "NOT IN" },
|
|
15945
|
+
{ valueOP: "LIKE" /* LIKE */, label: "\u6587\u672C\u5305\u542B", sqlOP: "LIKE" },
|
|
15946
|
+
{ valueOP: "LIFTLIKE" /* LIFT_LIKE */, label: "\u6587\u672C\u5DE6\u5305\u542B", sqlOP: "" },
|
|
15947
|
+
{ valueOP: "RIGHT_LIKE" /* RIGHT_LIKE */, label: "\u6587\u672C\u53F3\u5305\u542B", sqlOP: "" },
|
|
15948
|
+
{ valueOP: "EXISTS" /* EXISTS */, label: "\u5B58\u5728", sqlOP: "" },
|
|
15949
|
+
{ valueOP: "NOTEXISTS" /* NOT_EXISTS */, label: "\u4E0D\u5B58\u5728", sqlOP: "" }
|
|
15950
|
+
];
|
|
15951
|
+
/**
|
|
15952
|
+
* 数据类型映射操作符
|
|
15953
|
+
*
|
|
15954
|
+
* @author tony001
|
|
15955
|
+
* @date 2024-07-25 00:07:31
|
|
15956
|
+
* @private
|
|
15957
|
+
* @type {{
|
|
15958
|
+
* [p: string]: ValueOP[];
|
|
15959
|
+
* }}
|
|
15960
|
+
*/
|
|
15961
|
+
this.DataTypeToOPs = {
|
|
15962
|
+
["STRING" /* STRING */]: [
|
|
15963
|
+
"EQ" /* EQ */,
|
|
15964
|
+
"NOTEQ" /* NOT_EQ */,
|
|
15965
|
+
"ISNULL" /* IS_NULL */,
|
|
15966
|
+
"ISNOTNULL" /* IS_NOT_NULL */,
|
|
15967
|
+
"USERLIKE" /* USER_LIKE */,
|
|
15968
|
+
"LIKE" /* LIKE */,
|
|
15969
|
+
"LIFTLIKE" /* LIFT_LIKE */,
|
|
15970
|
+
"RIGHT_LIKE" /* RIGHT_LIKE */
|
|
15971
|
+
],
|
|
15972
|
+
["NUMBER" /* NUMBER */]: [
|
|
15973
|
+
"EQ" /* EQ */,
|
|
15974
|
+
"GT" /* GT */,
|
|
15975
|
+
"GTANDEQ" /* GT_AND_EQ */,
|
|
15976
|
+
"LT" /* LT */,
|
|
15977
|
+
"LTANDEQ" /* LT_AND_EQ */,
|
|
15978
|
+
"NOTEQ" /* NOT_EQ */,
|
|
15979
|
+
"ISNULL" /* IS_NULL */,
|
|
15980
|
+
"ISNOTNULL" /* IS_NOT_NULL */,
|
|
15981
|
+
"IN" /* IN */,
|
|
15982
|
+
"NOTIN" /* NOT_IN */
|
|
15983
|
+
],
|
|
15984
|
+
["DATE" /* DATE */]: [
|
|
15985
|
+
"EQ" /* EQ */,
|
|
15986
|
+
"GT" /* GT */,
|
|
15987
|
+
"GTANDEQ" /* GT_AND_EQ */,
|
|
15988
|
+
"LT" /* LT */,
|
|
15989
|
+
"LTANDEQ" /* LT_AND_EQ */,
|
|
15990
|
+
"NOTEQ" /* NOT_EQ */,
|
|
15991
|
+
"ISNULL" /* IS_NULL */,
|
|
15992
|
+
"ISNOTNULL" /* IS_NOT_NULL */,
|
|
15993
|
+
"IN" /* IN */,
|
|
15994
|
+
"NOTIN" /* NOT_IN */
|
|
15995
|
+
],
|
|
15996
|
+
["CODELIST" /* CODELIST */]: [
|
|
15997
|
+
"EQ" /* EQ */,
|
|
15998
|
+
"NOTEQ" /* NOT_EQ */,
|
|
15999
|
+
"ISNULL" /* IS_NULL */,
|
|
16000
|
+
"ISNOTNULL" /* IS_NOT_NULL */,
|
|
16001
|
+
"IN" /* IN */,
|
|
16002
|
+
"NOTIN" /* NOT_IN */
|
|
16003
|
+
],
|
|
16004
|
+
["FOREIGNKEY" /* FOREIGNKEY */]: [
|
|
16005
|
+
"EQ" /* EQ */,
|
|
16006
|
+
"NOTEQ" /* NOT_EQ */,
|
|
16007
|
+
"ISNULL" /* IS_NULL */,
|
|
16008
|
+
"ISNOTNULL" /* IS_NOT_NULL */,
|
|
16009
|
+
"IN" /* IN */,
|
|
16010
|
+
"NOTIN" /* NOT_IN */
|
|
16011
|
+
],
|
|
16012
|
+
["CHILD" /* CHILD */]: ["EXISTS" /* EXISTS */, "NOTEXISTS" /* NOT_EXISTS */]
|
|
16013
|
+
};
|
|
16014
|
+
/**
|
|
16015
|
+
* 排除操作符
|
|
16016
|
+
*
|
|
16017
|
+
* @author tony001
|
|
16018
|
+
* @date 2024-07-25 17:07:51
|
|
16019
|
+
* @private
|
|
16020
|
+
* @type {string[]}
|
|
16021
|
+
*/
|
|
16022
|
+
this.excludeOPs = [
|
|
16023
|
+
"ISNULL" /* IS_NULL */,
|
|
16024
|
+
"ISNOTNULL" /* IS_NOT_NULL */,
|
|
16025
|
+
"EXISTS" /* EXISTS */,
|
|
16026
|
+
"NOTEXISTS" /* NOT_EXISTS */
|
|
16027
|
+
];
|
|
16028
|
+
/**
|
|
16029
|
+
* 数据类型映射编辑器
|
|
16030
|
+
*
|
|
16031
|
+
* @author tony001
|
|
16032
|
+
* @date 2024-07-25 00:07:07
|
|
16033
|
+
* @private
|
|
16034
|
+
* @type {({
|
|
16035
|
+
* [p: string]: IData| undefined;
|
|
16036
|
+
* })}
|
|
16037
|
+
*/
|
|
16038
|
+
this.DataTypeToEditor = {
|
|
16039
|
+
["STRING" /* STRING */]: {
|
|
16040
|
+
appId: "",
|
|
16041
|
+
editorType: "TEXTBOX"
|
|
16042
|
+
},
|
|
16043
|
+
["NUMBER" /* NUMBER */]: {
|
|
16044
|
+
appId: "",
|
|
16045
|
+
editorType: "NUMBER"
|
|
16046
|
+
},
|
|
16047
|
+
["DATE" /* DATE */]: {
|
|
16048
|
+
appId: "",
|
|
16049
|
+
editorType: "DATEPICKEREX",
|
|
16050
|
+
dateTimeFormat: "YYYY-MM-DD"
|
|
16051
|
+
},
|
|
16052
|
+
["CODELIST" /* CODELIST */]: {
|
|
16053
|
+
appId: "",
|
|
16054
|
+
valueType: "SIMPLE",
|
|
16055
|
+
editorType: "MDROPDOWNLIST",
|
|
16056
|
+
appCodeListId: "",
|
|
16057
|
+
editorParams: {
|
|
16058
|
+
overflowMode: "ellipsis"
|
|
16059
|
+
}
|
|
16060
|
+
},
|
|
16061
|
+
["FOREIGNKEY" /* FOREIGNKEY */]: {
|
|
16062
|
+
appId: "",
|
|
16063
|
+
editorType: "ADDRESSPICKUP",
|
|
16064
|
+
appDEDataSetId: "fetchdefault",
|
|
16065
|
+
objectIdField: "srfkey",
|
|
16066
|
+
objectNameField: "srfmajortext",
|
|
16067
|
+
valueType: "OBJECTS",
|
|
16068
|
+
editorParams: {
|
|
16069
|
+
overflowMode: "ellipsis"
|
|
16070
|
+
}
|
|
16071
|
+
},
|
|
16072
|
+
["CHILD" /* CHILD */]: void 0
|
|
16073
|
+
};
|
|
16074
|
+
}
|
|
16075
|
+
/**
|
|
16076
|
+
* 获取jsonschema属性数据
|
|
16077
|
+
*
|
|
16078
|
+
* @author tony001
|
|
16079
|
+
* @date 2024-07-25 00:07:49
|
|
16080
|
+
* @param {string} entityId
|
|
16081
|
+
* @param {IContext} context
|
|
16082
|
+
* @param {IParams} [params={}]
|
|
16083
|
+
* @return {*} {Promise<IData[]>}
|
|
16084
|
+
*/
|
|
16085
|
+
async getEntitySchemaFields(entityId, context, params = {}) {
|
|
16086
|
+
var _a;
|
|
16087
|
+
const result = [];
|
|
16088
|
+
const strParams = qs3.stringify(params);
|
|
16089
|
+
const app = ibiz.hub.getApp(context.srfappid);
|
|
16090
|
+
const entity = await ibiz.hub.getAppDataEntity(entityId, context.srfappid);
|
|
16091
|
+
let url = "/jsonschema/".concat(entity.name);
|
|
16092
|
+
if (entity.dynaSysMode === 0 && ibiz.appData) {
|
|
16093
|
+
url += "?dynamodeltag=".concat(ibiz.appData.dynamodeltag).concat(strParams ? "&".concat(strParams) : "");
|
|
16094
|
+
} else {
|
|
16095
|
+
url += "".concat(strParams ? "?".concat(strParams) : "");
|
|
16096
|
+
}
|
|
16097
|
+
const res = await app.net.get(url);
|
|
16098
|
+
const { data } = res;
|
|
16099
|
+
if (!data.properties) {
|
|
16100
|
+
return result;
|
|
16101
|
+
}
|
|
16102
|
+
const { properties } = data;
|
|
16103
|
+
if (!(Object.keys(properties).length > 0)) {
|
|
16104
|
+
return result;
|
|
16105
|
+
}
|
|
16106
|
+
for (let i = 0; i < Object.keys(properties).length; i++) {
|
|
16107
|
+
const key = Object.keys(properties)[i];
|
|
16108
|
+
const item = properties[key];
|
|
16109
|
+
let type = "STRING" /* STRING */;
|
|
16110
|
+
const originalType = item.type;
|
|
16111
|
+
if (originalType === "array" || item.extension) {
|
|
16112
|
+
break;
|
|
16113
|
+
}
|
|
16114
|
+
switch (originalType) {
|
|
16115
|
+
case "string":
|
|
16116
|
+
if (item.$ref) {
|
|
16117
|
+
type = "FOREIGNKEY" /* FOREIGNKEY */;
|
|
16118
|
+
}
|
|
16119
|
+
if (item.enumSource) {
|
|
16120
|
+
type = "CODELIST" /* CODELIST */;
|
|
16121
|
+
}
|
|
16122
|
+
if (item.format === "date-time") {
|
|
16123
|
+
type = "DATE" /* DATE */;
|
|
16124
|
+
}
|
|
16125
|
+
break;
|
|
16126
|
+
case "integer":
|
|
16127
|
+
case "number":
|
|
16128
|
+
type = "NUMBER" /* NUMBER */;
|
|
16129
|
+
if (item.enumSource) {
|
|
16130
|
+
type = "CODELIST" /* CODELIST */;
|
|
16131
|
+
}
|
|
16132
|
+
break;
|
|
16133
|
+
default:
|
|
16134
|
+
if (item.$ref) {
|
|
16135
|
+
type = "FOREIGNKEY" /* FOREIGNKEY */;
|
|
16136
|
+
}
|
|
16137
|
+
break;
|
|
16138
|
+
}
|
|
16139
|
+
result.push({
|
|
16140
|
+
type,
|
|
16141
|
+
originalType,
|
|
16142
|
+
appDEFieldId: key,
|
|
16143
|
+
caption: item.description,
|
|
16144
|
+
appCodeListId: item.enumSource,
|
|
16145
|
+
appDataEntityId: (_a = item.$ref) == null ? void 0 : _a.split(".")[0]
|
|
16146
|
+
});
|
|
16147
|
+
}
|
|
16148
|
+
return result;
|
|
16149
|
+
}
|
|
16150
|
+
/**
|
|
16151
|
+
* 通过数据类型获取可使用操作标识集合
|
|
16152
|
+
*
|
|
16153
|
+
* @author tony001
|
|
16154
|
+
* @date 2024-07-25 16:07:24
|
|
16155
|
+
* @param {string} dataType
|
|
16156
|
+
* @return {*} {IData[]}
|
|
16157
|
+
*/
|
|
16158
|
+
getValueOPsByDataType(dataType) {
|
|
16159
|
+
let result = [];
|
|
16160
|
+
result = this.valueOPArray.filter(
|
|
16161
|
+
(mode) => this.DataTypeToOPs[dataType].includes(mode.valueOP)
|
|
16162
|
+
);
|
|
16163
|
+
return result;
|
|
16164
|
+
}
|
|
16165
|
+
/**
|
|
16166
|
+
* 获取仿真编辑器
|
|
16167
|
+
*
|
|
16168
|
+
* @author tony001
|
|
16169
|
+
* @date 2024-07-25 17:07:11
|
|
16170
|
+
* @param {IContext} context
|
|
16171
|
+
* @param {IData} item
|
|
16172
|
+
* @return {*} {Promise<IData>}
|
|
16173
|
+
*/
|
|
16174
|
+
getMockEditor(context, item, valueOP) {
|
|
16175
|
+
if (valueOP && this.excludeOPs.includes(valueOP))
|
|
16176
|
+
return;
|
|
16177
|
+
const baseMockEditor = this.DataTypeToEditor[item.type];
|
|
16178
|
+
if (!baseMockEditor)
|
|
16179
|
+
return;
|
|
16180
|
+
baseMockEditor.appId = context.srfappid;
|
|
16181
|
+
if (item.type === "CODELIST" /* CODELIST */) {
|
|
16182
|
+
baseMockEditor.appCodeListId = item.appCodeListId;
|
|
16183
|
+
}
|
|
16184
|
+
if (item.type === "FOREIGNKEY" /* FOREIGNKEY */) {
|
|
16185
|
+
baseMockEditor.appDataEntityId = item.appDataEntityId;
|
|
16186
|
+
}
|
|
16187
|
+
return baseMockEditor;
|
|
16188
|
+
}
|
|
16189
|
+
};
|
|
16190
|
+
|
|
15891
16191
|
// src/utils/dr-ctrl-util/index.ts
|
|
15892
16192
|
function calcItemVisibleByCounter(item, counter) {
|
|
15893
16193
|
const { enableMode, counterId } = item;
|
|
@@ -16020,10 +16320,7 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
16020
16320
|
case "POPUPMODAL":
|
|
16021
16321
|
return this.openModal(appView, context, params);
|
|
16022
16322
|
case "POPUPAPP":
|
|
16023
|
-
|
|
16024
|
-
appView,
|
|
16025
|
-
ibiz.i18n.t("runtime.command.app.unsupportedPopupapp")
|
|
16026
|
-
);
|
|
16323
|
+
return this.openPopupApp(appView, context, params);
|
|
16027
16324
|
case "POPOVER":
|
|
16028
16325
|
return this.openPopover(appView, context, params, opts);
|
|
16029
16326
|
case "DRAWER_LEFT":
|
|
@@ -16126,6 +16423,20 @@ var _OpenAppViewCommand = class _OpenAppViewCommand {
|
|
|
16126
16423
|
async openUserCustom(appView, context, params = {}) {
|
|
16127
16424
|
return ibiz.openView.custom(appView.id, context, params);
|
|
16128
16425
|
}
|
|
16426
|
+
/**
|
|
16427
|
+
* 独立程序弹出
|
|
16428
|
+
*
|
|
16429
|
+
* @author zzq
|
|
16430
|
+
* @date 2024-07-19 20:07:55
|
|
16431
|
+
* @protected
|
|
16432
|
+
* @param {IViewConfig} appView
|
|
16433
|
+
* @param {IContext} [context]
|
|
16434
|
+
* @param {IParams} [params={}]
|
|
16435
|
+
* @return {*} {Promise<void>}
|
|
16436
|
+
*/
|
|
16437
|
+
async openPopupApp(appView, context, params = {}) {
|
|
16438
|
+
return ibiz.openView.popupApp(appView.id, context, params);
|
|
16439
|
+
}
|
|
16129
16440
|
};
|
|
16130
16441
|
_OpenAppViewCommand.TAG = "ibiz.app-view.open";
|
|
16131
16442
|
var OpenAppViewCommand = _OpenAppViewCommand;
|
|
@@ -17920,9 +18231,9 @@ async function fetchImportSchemas(opts) {
|
|
|
17920
18231
|
}
|
|
17921
18232
|
|
|
17922
18233
|
// src/controller/utils/jsonschema/entity.ts
|
|
17923
|
-
import
|
|
18234
|
+
import qs4 from "qs";
|
|
17924
18235
|
async function getEntitySchema(entityId, context, params = {}) {
|
|
17925
|
-
const strParams =
|
|
18236
|
+
const strParams = qs4.stringify(params);
|
|
17926
18237
|
const app = ibiz.hub.getApp(context.srfappid);
|
|
17927
18238
|
const entity = await ibiz.hub.getAppDataEntity(entityId, context.srfappid);
|
|
17928
18239
|
let url = "/jsonschema/".concat(entity.name);
|
|
@@ -21535,7 +21846,13 @@ var BaseSeriesGenerator = class {
|
|
|
21535
21846
|
deData["".concat(this.catalogField, "_value")] = deData[this.catalogField];
|
|
21536
21847
|
Object.assign(deData, { [this.catalogField]: catalog });
|
|
21537
21848
|
}
|
|
21538
|
-
const tempChartData = new ChartData(
|
|
21849
|
+
const tempChartData = new ChartData(
|
|
21850
|
+
deData,
|
|
21851
|
+
this.model,
|
|
21852
|
+
catalog,
|
|
21853
|
+
group,
|
|
21854
|
+
this.chartGenerator.extraArgs.chartId
|
|
21855
|
+
);
|
|
21539
21856
|
groupData[group].get(catalog).chartData = tempChartData;
|
|
21540
21857
|
(_a = this.chartDataArr) == null ? void 0 : _a.push(tempChartData);
|
|
21541
21858
|
}
|
|
@@ -21605,8 +21922,13 @@ var BaseSeriesGenerator = class {
|
|
|
21605
21922
|
this.chartDataArr = [];
|
|
21606
21923
|
const groupData = this.groupData;
|
|
21607
21924
|
const { seriesCodeListId, catalogCodeListId } = this.model;
|
|
21925
|
+
const getOrigin = (origin) => {
|
|
21926
|
+
if (origin && origin.$origin) {
|
|
21927
|
+
return getOrigin(origin.$origin);
|
|
21928
|
+
}
|
|
21929
|
+
return origin;
|
|
21930
|
+
};
|
|
21608
21931
|
data.forEach((item) => {
|
|
21609
|
-
var _a, _b;
|
|
21610
21932
|
let group = DEFAULT_GROUP;
|
|
21611
21933
|
if (this.groupField) {
|
|
21612
21934
|
const groupVal = this.translateVal(
|
|
@@ -21616,6 +21938,15 @@ var BaseSeriesGenerator = class {
|
|
|
21616
21938
|
if (isNil25(groupVal)) {
|
|
21617
21939
|
return;
|
|
21618
21940
|
}
|
|
21941
|
+
const tempOrigin = getOrigin(item.$origin);
|
|
21942
|
+
if (seriesCodeListId) {
|
|
21943
|
+
this.catalogMap.set(groupVal, tempOrigin[this.groupField]);
|
|
21944
|
+
} else {
|
|
21945
|
+
this.catalogMap.set(
|
|
21946
|
+
item[this.groupField],
|
|
21947
|
+
tempOrigin[this.groupField]
|
|
21948
|
+
);
|
|
21949
|
+
}
|
|
21619
21950
|
group = groupVal;
|
|
21620
21951
|
}
|
|
21621
21952
|
if (!groupData[group]) {
|
|
@@ -21630,10 +21961,14 @@ var BaseSeriesGenerator = class {
|
|
|
21630
21961
|
tempCodeLists.push({ codename, codelist: clone22(codeListItems) });
|
|
21631
21962
|
} else if (mode === "field") {
|
|
21632
21963
|
const tempdata = data.map((_data) => {
|
|
21633
|
-
|
|
21964
|
+
let tempValue;
|
|
21965
|
+
const tempOrigin = getOrigin(_data.$origin);
|
|
21966
|
+
if (tempOrigin) {
|
|
21967
|
+
tempValue = tempOrigin[codename];
|
|
21968
|
+
}
|
|
21634
21969
|
return {
|
|
21635
21970
|
text: _data[codename],
|
|
21636
|
-
value:
|
|
21971
|
+
value: tempValue
|
|
21637
21972
|
};
|
|
21638
21973
|
});
|
|
21639
21974
|
tempCodeLists.push({ codename, codelist: tempdata });
|
|
@@ -21703,8 +22038,13 @@ var BaseSeriesGenerator = class {
|
|
|
21703
22038
|
return;
|
|
21704
22039
|
}
|
|
21705
22040
|
if (!catalogCodeListId) {
|
|
22041
|
+
let tempValue;
|
|
22042
|
+
const tempOrigin = getOrigin(item.$origin);
|
|
22043
|
+
if (tempOrigin) {
|
|
22044
|
+
tempValue = tempOrigin[this.catalogField];
|
|
22045
|
+
}
|
|
21706
22046
|
this.catalogMap.set(item[this.catalogField], {
|
|
21707
|
-
[this.catalogField]:
|
|
22047
|
+
[this.catalogField]: tempValue
|
|
21708
22048
|
});
|
|
21709
22049
|
}
|
|
21710
22050
|
if (!groupData[group].get(catalog)) {
|
|
@@ -22297,8 +22637,9 @@ function parseUserParams2(userParams) {
|
|
|
22297
22637
|
return convertStringFunc(option);
|
|
22298
22638
|
}
|
|
22299
22639
|
var ChartOptionsGenerator2 = class {
|
|
22300
|
-
constructor(model) {
|
|
22640
|
+
constructor(model, extraArgs = {}) {
|
|
22301
22641
|
this.model = model;
|
|
22642
|
+
this.extraArgs = extraArgs;
|
|
22302
22643
|
/**
|
|
22303
22644
|
* 根据模型配置算出来的静态echarts配置
|
|
22304
22645
|
* @author lxm
|
|
@@ -22593,10 +22934,10 @@ var ChartOptionsGenerator2 = class {
|
|
|
22593
22934
|
if (controlParam && ((_a = controlParam.ctrlParams) == null ? void 0 : _a.ZONE)) {
|
|
22594
22935
|
const length = (_b = this.model.dechartSerieses) == null ? void 0 : _b.length;
|
|
22595
22936
|
if (length) {
|
|
22596
|
-
const height =
|
|
22937
|
+
const height = 85 / length;
|
|
22597
22938
|
const items = [];
|
|
22598
22939
|
for (let i = 0; i < length; i++) {
|
|
22599
|
-
const top = i * height +
|
|
22940
|
+
const top = i * height + 10;
|
|
22600
22941
|
const bottom = 100 - (height + top);
|
|
22601
22942
|
items.push({
|
|
22602
22943
|
top: "".concat(top, "%"),
|
|
@@ -22660,7 +23001,7 @@ var ChartOptionsGenerator2 = class {
|
|
|
22660
23001
|
if (((_a2 = controlParam.ctrlParams) == null ? void 0 : _a2.MODE) === "ROW") {
|
|
22661
23002
|
const yAxisData = this.handleAxisLayout(
|
|
22662
23003
|
codeListItems,
|
|
22663
|
-
|
|
23004
|
+
60,
|
|
22664
23005
|
tempCatalogFields.length,
|
|
22665
23006
|
index
|
|
22666
23007
|
);
|
|
@@ -22724,7 +23065,7 @@ var ChartOptionsGenerator2 = class {
|
|
|
22724
23065
|
});
|
|
22725
23066
|
} else {
|
|
22726
23067
|
Object.assign(this.chartUserParam.grid, {
|
|
22727
|
-
left: (catalogLength + 1) *
|
|
23068
|
+
left: (catalogLength + 1) * 60
|
|
22728
23069
|
});
|
|
22729
23070
|
}
|
|
22730
23071
|
const tempyAxis = this.chartUserParam.yAxis;
|
|
@@ -22745,7 +23086,7 @@ var ChartOptionsGenerator2 = class {
|
|
|
22745
23086
|
{
|
|
22746
23087
|
value: mergeName.split("").join("\n"),
|
|
22747
23088
|
textStyle: {
|
|
22748
|
-
padding: [0, catalogLength *
|
|
23089
|
+
padding: [0, catalogLength * 50, 0, 0],
|
|
22749
23090
|
...nameTextStyle
|
|
22750
23091
|
}
|
|
22751
23092
|
}
|
|
@@ -23036,7 +23377,9 @@ var ChartController = class extends MDControlController {
|
|
|
23036
23377
|
await super.onCreated();
|
|
23037
23378
|
this.service = new ChartService(this.model);
|
|
23038
23379
|
await this.service.init(this.context);
|
|
23039
|
-
this.generator = new ChartOptionsGenerator2(this.model
|
|
23380
|
+
this.generator = new ChartOptionsGenerator2(this.model, {
|
|
23381
|
+
chartId: this.controlParams.chartid
|
|
23382
|
+
});
|
|
23040
23383
|
await this.generator.init(this.context, this.params);
|
|
23041
23384
|
this.parseGridParam();
|
|
23042
23385
|
this.resizeChart = this.resizeChart.bind(this);
|
|
@@ -23120,7 +23463,7 @@ var ChartController = class extends MDControlController {
|
|
|
23120
23463
|
* @memberof ChartController
|
|
23121
23464
|
*/
|
|
23122
23465
|
computedDrillDetailParam(arg) {
|
|
23123
|
-
var _a, _b;
|
|
23466
|
+
var _a, _b, _c;
|
|
23124
23467
|
const { seriesType } = arg;
|
|
23125
23468
|
const targetSerie = this.computedClickSerieModel(arg);
|
|
23126
23469
|
let measureId = "";
|
|
@@ -23155,6 +23498,28 @@ var ChartController = class extends MDControlController {
|
|
|
23155
23498
|
});
|
|
23156
23499
|
}
|
|
23157
23500
|
}
|
|
23501
|
+
if (targetSerie.seriesField) {
|
|
23502
|
+
const group = arg.data[2];
|
|
23503
|
+
let tempValue;
|
|
23504
|
+
const getOrigin = (origin) => {
|
|
23505
|
+
if (origin && origin.$origin) {
|
|
23506
|
+
return getOrigin(origin.$origin);
|
|
23507
|
+
}
|
|
23508
|
+
return origin;
|
|
23509
|
+
};
|
|
23510
|
+
const tempOrigin = getOrigin(group.$origin);
|
|
23511
|
+
if (tempOrigin) {
|
|
23512
|
+
tempValue = tempOrigin[targetSerie.seriesField];
|
|
23513
|
+
} else {
|
|
23514
|
+
tempValue = (_c = this.generator.seriesGenerators) == null ? void 0 : _c[0].catalogMap.get(
|
|
23515
|
+
group[targetSerie.seriesField]
|
|
23516
|
+
);
|
|
23517
|
+
}
|
|
23518
|
+
dimension.push({
|
|
23519
|
+
name: targetSerie.seriesField,
|
|
23520
|
+
value: tempValue
|
|
23521
|
+
});
|
|
23522
|
+
}
|
|
23158
23523
|
}
|
|
23159
23524
|
return {
|
|
23160
23525
|
measure: {
|
|
@@ -26411,7 +26776,6 @@ var DashboardController = class extends ControlController {
|
|
|
26411
26776
|
super.initState();
|
|
26412
26777
|
}
|
|
26413
26778
|
async onCreated() {
|
|
26414
|
-
this.model.enableCustomized = true;
|
|
26415
26779
|
await super.onCreated();
|
|
26416
26780
|
await this.initPortlets(this.model.controls);
|
|
26417
26781
|
const { appDataEntityId } = this.view.model;
|
|
@@ -26976,12 +27340,13 @@ var PortletPartController = class {
|
|
|
26976
27340
|
return new PortletPartState();
|
|
26977
27341
|
}
|
|
26978
27342
|
/**
|
|
26979
|
-
*
|
|
27343
|
+
* 刷新
|
|
26980
27344
|
*
|
|
26981
|
-
* @author
|
|
26982
|
-
* @date 2024-
|
|
27345
|
+
* @author tony001
|
|
27346
|
+
* @date 2024-07-23 22:07:02
|
|
27347
|
+
* @return {*} {Promise<void>}
|
|
26983
27348
|
*/
|
|
26984
|
-
refresh() {
|
|
27349
|
+
async refresh() {
|
|
26985
27350
|
}
|
|
26986
27351
|
/**
|
|
26987
27352
|
* 设置配置数据
|
|
@@ -27182,12 +27547,12 @@ var ViewPortletController = class extends PortletPartController {
|
|
|
27182
27547
|
return null;
|
|
27183
27548
|
}
|
|
27184
27549
|
/**
|
|
27185
|
-
*
|
|
27550
|
+
* 刷新
|
|
27186
27551
|
*
|
|
27187
|
-
* @author
|
|
27188
|
-
* @date 2024-
|
|
27552
|
+
* @author tony001
|
|
27553
|
+
* @date 2024-07-23 22:07:30
|
|
27189
27554
|
*/
|
|
27190
|
-
refresh() {
|
|
27555
|
+
async refresh() {
|
|
27191
27556
|
if (this.contentController) {
|
|
27192
27557
|
this.contentController.callUIAction(
|
|
27193
27558
|
"Refresh" /* REFRESH */
|
|
@@ -27203,12 +27568,13 @@ var MenuPortletController = class extends PortletPartController {
|
|
|
27203
27568
|
// src/controller/control/dashboard/portlet/chart-portlet/chart-portlet.controller.ts
|
|
27204
27569
|
var ChartPortletController = class extends PortletPartController {
|
|
27205
27570
|
/**
|
|
27206
|
-
*
|
|
27571
|
+
* 刷新
|
|
27207
27572
|
*
|
|
27208
|
-
* @author
|
|
27209
|
-
* @date 2024-
|
|
27573
|
+
* @author tony001
|
|
27574
|
+
* @date 2024-07-23 22:07:01
|
|
27575
|
+
* @return {*} {Promise<void>}
|
|
27210
27576
|
*/
|
|
27211
|
-
refresh() {
|
|
27577
|
+
async refresh() {
|
|
27212
27578
|
if (this.contentController) {
|
|
27213
27579
|
this.contentController.refresh();
|
|
27214
27580
|
}
|
|
@@ -27226,12 +27592,13 @@ var HtmlPortletController = class extends PortletPartController {
|
|
|
27226
27592
|
// src/controller/control/dashboard/portlet/list-portlet/list-portlet.controller.ts
|
|
27227
27593
|
var ListPortletController = class extends PortletPartController {
|
|
27228
27594
|
/**
|
|
27229
|
-
*
|
|
27595
|
+
* 刷新
|
|
27230
27596
|
*
|
|
27231
|
-
* @author
|
|
27232
|
-
* @date 2024-
|
|
27597
|
+
* @author tony001
|
|
27598
|
+
* @date 2024-07-23 22:07:41
|
|
27599
|
+
* @return {*} {Promise<void>}
|
|
27233
27600
|
*/
|
|
27234
|
-
refresh() {
|
|
27601
|
+
async refresh() {
|
|
27235
27602
|
if (this.contentController) {
|
|
27236
27603
|
this.contentController.refresh();
|
|
27237
27604
|
}
|
|
@@ -27263,11 +27630,18 @@ var ReportPortletController = class extends PortletPartController {
|
|
|
27263
27630
|
* 刷新报表部件
|
|
27264
27631
|
*
|
|
27265
27632
|
* @author tony001
|
|
27266
|
-
* @date 2024-
|
|
27633
|
+
* @date 2024-07-23 22:07:16
|
|
27634
|
+
* @return {*} {Promise<void>}
|
|
27267
27635
|
*/
|
|
27268
|
-
refresh() {
|
|
27636
|
+
async refresh() {
|
|
27269
27637
|
if (this.contentController) {
|
|
27270
|
-
this.
|
|
27638
|
+
if (this.dashboard.controlParams.multimode === "true") {
|
|
27639
|
+
this.dashboard.evt.emit("onItemModelReset", {
|
|
27640
|
+
name: this.model.id
|
|
27641
|
+
});
|
|
27642
|
+
} else {
|
|
27643
|
+
this.contentController.refresh();
|
|
27644
|
+
}
|
|
27271
27645
|
}
|
|
27272
27646
|
}
|
|
27273
27647
|
};
|
|
@@ -32868,8 +33242,11 @@ var GridController = class extends MDControlController {
|
|
|
32868
33242
|
}
|
|
32869
33243
|
});
|
|
32870
33244
|
const { degridColumns = [] } = this.model;
|
|
32871
|
-
|
|
32872
|
-
|
|
33245
|
+
const exportColumns = degridColumns.filter(
|
|
33246
|
+
(x) => !x.hiddenDataItem && !x.hideDefault && x.hideMode !== 2
|
|
33247
|
+
);
|
|
33248
|
+
this.dataExportParam.fields = exportColumns.map((item) => item.id);
|
|
33249
|
+
this.dataExportParam.header = exportColumns.map((item) => item.caption);
|
|
32873
33250
|
}
|
|
32874
33251
|
}
|
|
32875
33252
|
/**
|
|
@@ -32924,14 +33301,6 @@ var GridController = class extends MDControlController {
|
|
|
32924
33301
|
);
|
|
32925
33302
|
}
|
|
32926
33303
|
const groupFieldName = this.groupFieldColumn.model.id;
|
|
32927
|
-
if (!this.groupFieldColumn.model.appCodeListId) {
|
|
32928
|
-
throw new RuntimeModelError63(
|
|
32929
|
-
this.groupFieldColumn.model,
|
|
32930
|
-
ibiz.i18n.t("runtime.controller.control.grid.noCodeTable", {
|
|
32931
|
-
groupFieldName
|
|
32932
|
-
})
|
|
32933
|
-
);
|
|
32934
|
-
}
|
|
32935
33304
|
const index = this.state.columnStates.findIndex(
|
|
32936
33305
|
(item) => item.key === this.groupFieldColumn.model.codeName
|
|
32937
33306
|
);
|
|
@@ -33073,7 +33442,8 @@ var GridController = class extends MDControlController {
|
|
|
33073
33442
|
});
|
|
33074
33443
|
this.state.groups = [];
|
|
33075
33444
|
groupMap.forEach((value, key) => {
|
|
33076
|
-
|
|
33445
|
+
var _a;
|
|
33446
|
+
const codeListItem = (_a = this.groupCodeListItems) == null ? void 0 : _a.find(
|
|
33077
33447
|
(item) => item.value === key
|
|
33078
33448
|
);
|
|
33079
33449
|
this.state.groups.push({
|
|
@@ -36659,6 +37029,13 @@ var SearchBarController = class extends ControlController {
|
|
|
36659
37029
|
* @type {IParams}
|
|
36660
37030
|
*/
|
|
36661
37031
|
this.jsonSchemaParams = {};
|
|
37032
|
+
/**
|
|
37033
|
+
* schema实体映射map
|
|
37034
|
+
*
|
|
37035
|
+
* @author zhanghengfeng
|
|
37036
|
+
* @date 2024-07-22 16:07:55
|
|
37037
|
+
*/
|
|
37038
|
+
this.schemaEntityMap = /* @__PURE__ */ new Map();
|
|
36662
37039
|
/**
|
|
36663
37040
|
* 是否启用存储
|
|
36664
37041
|
*
|
|
@@ -36752,6 +37129,29 @@ var SearchBarController = class extends ControlController {
|
|
|
36752
37129
|
await this.initSearchBarFilters();
|
|
36753
37130
|
await this.initSearBarGroups(true);
|
|
36754
37131
|
}
|
|
37132
|
+
/**
|
|
37133
|
+
* 初始化schema实体映射map
|
|
37134
|
+
*
|
|
37135
|
+
* @author zhanghengfeng
|
|
37136
|
+
* @date 2024-07-22 16:07:14
|
|
37137
|
+
* @param {IData} json
|
|
37138
|
+
* @return {*}
|
|
37139
|
+
*/
|
|
37140
|
+
async initSchemaEntityMap(json) {
|
|
37141
|
+
if (!json.properties) {
|
|
37142
|
+
return;
|
|
37143
|
+
}
|
|
37144
|
+
const { properties } = json;
|
|
37145
|
+
if (!(Object.keys(properties).length > 0)) {
|
|
37146
|
+
return;
|
|
37147
|
+
}
|
|
37148
|
+
const map = /* @__PURE__ */ new Map();
|
|
37149
|
+
Object.keys(properties).forEach((key) => {
|
|
37150
|
+
var _a, _b;
|
|
37151
|
+
map.set(key, (_b = (_a = properties[key]) == null ? void 0 : _a.$ref) == null ? void 0 : _b.split(".")[0]);
|
|
37152
|
+
});
|
|
37153
|
+
this.schemaEntityMap = map;
|
|
37154
|
+
}
|
|
36755
37155
|
/**
|
|
36756
37156
|
* 根据实体jsonschema初始化
|
|
36757
37157
|
* @author lxm
|
|
@@ -36773,6 +37173,7 @@ var SearchBarController = class extends ControlController {
|
|
|
36773
37173
|
if (!json) {
|
|
36774
37174
|
return;
|
|
36775
37175
|
}
|
|
37176
|
+
await this.initSchemaEntityMap(json);
|
|
36776
37177
|
const addSearchBarFilters = await calcFilterModelBySchema(
|
|
36777
37178
|
json,
|
|
36778
37179
|
this.model.appDataEntityId,
|
|
@@ -37022,6 +37423,17 @@ var SearchBarController = class extends ControlController {
|
|
|
37022
37423
|
}
|
|
37023
37424
|
}
|
|
37024
37425
|
});
|
|
37426
|
+
if (!searchconds) {
|
|
37427
|
+
const customNodes = [
|
|
37428
|
+
{
|
|
37429
|
+
nodeType: "GROUP",
|
|
37430
|
+
logicType: "AND",
|
|
37431
|
+
children: []
|
|
37432
|
+
}
|
|
37433
|
+
];
|
|
37434
|
+
this.attachCustomCond(customNodes);
|
|
37435
|
+
return calcSearchConds(customNodes);
|
|
37436
|
+
}
|
|
37025
37437
|
return searchconds;
|
|
37026
37438
|
}
|
|
37027
37439
|
/**
|
|
@@ -37177,7 +37589,18 @@ var SearchBarController = class extends ControlController {
|
|
|
37177
37589
|
if (this.grid && this.state.selectedSearchGroupItem) {
|
|
37178
37590
|
const nodes = clone34(this.state.filterNodes);
|
|
37179
37591
|
this.attachCustomCond(nodes);
|
|
37180
|
-
|
|
37592
|
+
let filters = calcSearchCondExs(nodes);
|
|
37593
|
+
if (!filters) {
|
|
37594
|
+
const customNodes = [
|
|
37595
|
+
{
|
|
37596
|
+
nodeType: "GROUP",
|
|
37597
|
+
logicType: "AND",
|
|
37598
|
+
children: []
|
|
37599
|
+
}
|
|
37600
|
+
];
|
|
37601
|
+
this.attachCustomCond(customNodes);
|
|
37602
|
+
filters = calcSearchCondExs(customNodes);
|
|
37603
|
+
}
|
|
37181
37604
|
const saveParams = {
|
|
37182
37605
|
searchconds: filters,
|
|
37183
37606
|
sort: this.grid.state.sortQuery,
|
|
@@ -44879,6 +45302,13 @@ var GlobalUtil = class {
|
|
|
44879
45302
|
* @date 2024-07-15 13:07:51
|
|
44880
45303
|
*/
|
|
44881
45304
|
this.record = new RecordNavUtil();
|
|
45305
|
+
/**
|
|
45306
|
+
* JsonSchema工具类
|
|
45307
|
+
*
|
|
45308
|
+
* @author tony001
|
|
45309
|
+
* @date 2024-07-25 00:07:31
|
|
45310
|
+
*/
|
|
45311
|
+
this.jsonSchema = new JsonSchemaUtil();
|
|
44882
45312
|
this.error.register(new DefaultErrorHandler());
|
|
44883
45313
|
}
|
|
44884
45314
|
/**
|
|
@@ -46268,7 +46698,6 @@ var en = {
|
|
|
46268
46698
|
grid: {
|
|
46269
46699
|
unsupported: "Unsupported types {type}",
|
|
46270
46700
|
attributeColumns: "Attribute columns with no grouping attributes configured",
|
|
46271
|
-
noCodeTable: "The attribute column {groupFieldName} of the grouping attribute does not have a configuration code table",
|
|
46272
46701
|
configureFirstColumn: "Please configure the grouping attribute column {groupFieldName} as the first column",
|
|
46273
46702
|
requiresCodeTable: "Code table grouping mode requires code table configuration",
|
|
46274
46703
|
noMatchCodeTable: "The grouping code table does not match the code table for the attribute column {groupFieldName}",
|
|
@@ -46858,7 +47287,6 @@ var zhCn = {
|
|
|
46858
47287
|
grid: {
|
|
46859
47288
|
unsupported: "\u672A\u652F\u6301\u7684\u7C7B\u578B{type}",
|
|
46860
47289
|
attributeColumns: "\u6CA1\u6709\u914D\u7F6E\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217",
|
|
46861
|
-
noCodeTable: "\u5206\u7EC4\u5C5E\u6027\u7684\u5C5E\u6027\u5217{groupFieldName}\u6CA1\u6709\u914D\u7F6E\u4EE3\u7801\u8868",
|
|
46862
47290
|
configureFirstColumn: "\u8BF7\u5C06\u5206\u7EC4\u5C5E\u6027\u5217{groupFieldName}\u914D\u7F6E\u4E3A\u7B2C\u4E00\u5217",
|
|
46863
47291
|
requiresCodeTable: "\u4EE3\u7801\u8868\u5206\u7EC4\u6A21\u5F0F\u9700\u8981\u914D\u7F6E\u4EE3\u7801\u8868",
|
|
46864
47292
|
noMatchCodeTable: "\u5206\u7EC4\u4EE3\u7801\u8868\u4E0E\u5C5E\u6027\u5217{groupFieldName}\u7684\u4EE3\u7801\u8868\u4E0D\u4E00\u81F4",
|
|
@@ -47456,6 +47884,7 @@ export {
|
|
|
47456
47884
|
INTERNAL_MESSAGE_PROVIDER_PREFIX,
|
|
47457
47885
|
InternalMessageService,
|
|
47458
47886
|
ItemsValueOPs,
|
|
47887
|
+
JsonSchemaUtil,
|
|
47459
47888
|
KanbanController,
|
|
47460
47889
|
KanbanService,
|
|
47461
47890
|
LayoutPanelUtil,
|