@mu-cabin/opms-permission 0.9.14 → 0.9.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +17 -4
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +17 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -872,10 +872,23 @@ var Permission = class {
|
|
872
872
|
const { obj } = await this.api.queryOrgCustom({
|
873
873
|
orgCodes: missingOrgCodes
|
874
874
|
});
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
875
|
+
const list = iterateNestedArray(obj, (item) => {
|
876
|
+
return {
|
877
|
+
label: item.orgShortName,
|
878
|
+
value: item.orgCode,
|
879
|
+
title: item.orgShortName,
|
880
|
+
key: item.orgCode,
|
881
|
+
nodeLevel: item.nodeLevel,
|
882
|
+
children: item.children,
|
883
|
+
disabled: !item.hasPermission,
|
884
|
+
orgType: item.orgType,
|
885
|
+
orgId: item.orgId
|
886
|
+
};
|
887
|
+
});
|
888
|
+
for (const org of list) {
|
889
|
+
const value = org.value;
|
890
|
+
result[value] = org;
|
891
|
+
cachedOrgMap[value] = org;
|
879
892
|
}
|
880
893
|
this.storage.setItem(USER_ORG_NO_AUTH_KEY, cachedOrgMap, cacheTimeout);
|
881
894
|
} catch (error) {
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
@@ -823,10 +823,23 @@ var Permission = class {
|
|
823
823
|
const { obj } = await this.api.queryOrgCustom({
|
824
824
|
orgCodes: missingOrgCodes
|
825
825
|
});
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
826
|
+
const list = iterateNestedArray(obj, (item) => {
|
827
|
+
return {
|
828
|
+
label: item.orgShortName,
|
829
|
+
value: item.orgCode,
|
830
|
+
title: item.orgShortName,
|
831
|
+
key: item.orgCode,
|
832
|
+
nodeLevel: item.nodeLevel,
|
833
|
+
children: item.children,
|
834
|
+
disabled: !item.hasPermission,
|
835
|
+
orgType: item.orgType,
|
836
|
+
orgId: item.orgId
|
837
|
+
};
|
838
|
+
});
|
839
|
+
for (const org of list) {
|
840
|
+
const value = org.value;
|
841
|
+
result[value] = org;
|
842
|
+
cachedOrgMap[value] = org;
|
830
843
|
}
|
831
844
|
this.storage.setItem(USER_ORG_NO_AUTH_KEY, cachedOrgMap, cacheTimeout);
|
832
845
|
} catch (error) {
|