@ibiz-template/model-helper 0.7.15 → 0.7.16-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js
CHANGED
|
@@ -15870,6 +15870,15 @@ var ServicePathUtil = class {
|
|
|
15870
15870
|
* @type {Map<string, ServicePathItem[][]>}
|
|
15871
15871
|
*/
|
|
15872
15872
|
this.entityRsPathMap = /* @__PURE__ */ new Map();
|
|
15873
|
+
/**
|
|
15874
|
+
* 实体资源加载状态关系
|
|
15875
|
+
*
|
|
15876
|
+
* @author tony001
|
|
15877
|
+
* @date 2024-05-20 16:05:41
|
|
15878
|
+
* @protected
|
|
15879
|
+
* @type {Map<string, boolean>}
|
|
15880
|
+
*/
|
|
15881
|
+
this.entityRsLoadMap = /* @__PURE__ */ new Map();
|
|
15873
15882
|
}
|
|
15874
15883
|
/**
|
|
15875
15884
|
* 根据应用主实体过滤从关系集合
|
|
@@ -15924,7 +15933,10 @@ var ServicePathUtil = class {
|
|
|
15924
15933
|
throw new Error("\u672A\u627E\u5230\u5B9E\u4F53 ".concat(id));
|
|
15925
15934
|
}
|
|
15926
15935
|
const { codeName } = entityRef;
|
|
15927
|
-
if (this.
|
|
15936
|
+
if (!this.entityRsLoadMap.has(codeName)) {
|
|
15937
|
+
this.entityRsLoadMap.set(codeName, false);
|
|
15938
|
+
}
|
|
15939
|
+
if (this.entityRsPathMap.has(codeName) && this.entityRsLoadMap.get(codeName)) {
|
|
15928
15940
|
return this.entityRsPathMap.get(codeName);
|
|
15929
15941
|
}
|
|
15930
15942
|
const deRss = this.filterDERSs(id);
|
|
@@ -15936,9 +15948,11 @@ var ServicePathUtil = class {
|
|
|
15936
15948
|
if (paths) {
|
|
15937
15949
|
paths = this.sortPath(paths);
|
|
15938
15950
|
this.entityRsPathMap.set(codeName, paths);
|
|
15951
|
+
this.entityRsLoadMap.set(codeName, true);
|
|
15939
15952
|
return paths;
|
|
15940
15953
|
}
|
|
15941
15954
|
}
|
|
15955
|
+
this.entityRsLoadMap.set(codeName, true);
|
|
15942
15956
|
return [];
|
|
15943
15957
|
}
|
|
15944
15958
|
/**
|
|
@@ -16005,22 +16019,30 @@ var ServicePathUtil = class {
|
|
|
16005
16019
|
const rsServiceApiItems = await this.getServiceApiItems([
|
|
16006
16020
|
rs.majorDECodeName
|
|
16007
16021
|
]);
|
|
16008
|
-
|
|
16009
|
-
|
|
16010
|
-
|
|
16011
|
-
|
|
16012
|
-
|
|
16013
|
-
|
|
16014
|
-
|
|
16015
|
-
|
|
16016
|
-
|
|
16017
|
-
|
|
16018
|
-
|
|
16019
|
-
|
|
16020
|
-
|
|
16021
|
-
|
|
16022
|
-
|
|
16023
|
-
|
|
16022
|
+
const tempArr = [
|
|
16023
|
+
...pathNames.map((pathName, index) => {
|
|
16024
|
+
return {
|
|
16025
|
+
codeName: pathName,
|
|
16026
|
+
lower: pathName.toLowerCase(),
|
|
16027
|
+
plural: serviceApiItems[index].deApiCodeName2
|
|
16028
|
+
};
|
|
16029
|
+
}),
|
|
16030
|
+
{
|
|
16031
|
+
codeName: rs.majorDECodeName,
|
|
16032
|
+
lower: rs.majorDECodeName.toLowerCase(),
|
|
16033
|
+
plural: rsServiceApiItems[0].deApiCodeName2
|
|
16034
|
+
}
|
|
16035
|
+
].reverse();
|
|
16036
|
+
const targetIndex = arr.findIndex((ele) => {
|
|
16037
|
+
return ele.map((val) => {
|
|
16038
|
+
return val.codeName;
|
|
16039
|
+
}).join("/") === tempArr.map((temp) => {
|
|
16040
|
+
return temp.codeName;
|
|
16041
|
+
}).join("/");
|
|
16042
|
+
});
|
|
16043
|
+
if (targetIndex === -1) {
|
|
16044
|
+
arr.push(tempArr);
|
|
16045
|
+
}
|
|
16024
16046
|
}
|
|
16025
16047
|
}
|
|
16026
16048
|
/**
|