@das-fed/utils 1.0.8 → 6.3.0-beta.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/api-services/index.d.ts +2 -1
- package/api-services/index.js +3 -2
- package/api-services/modules/app-manage.js +1 -1
- package/api-services/modules/authentication.js +1 -1
- package/api-services/modules/bems.js +1 -1
- package/api-services/modules/contract.js +1 -1
- package/api-services/modules/duty-manage.js +1 -1
- package/api-services/modules/enterpriseright.js +1 -1
- package/api-services/modules/file.d.ts +1 -1
- package/api-services/modules/file.js +355 -342
- package/api-services/modules/gateway-edge.js +1 -1
- package/api-services/modules/index.d.ts +21 -21
- package/api-services/modules/index.js +57 -558
- package/api-services/modules/iot.js +1 -1
- package/api-services/modules/justauth.js +1 -1
- package/api-services/modules/knowledge.js +1 -1
- package/api-services/modules/link.js +1 -1
- package/api-services/modules/permission.js +1 -1
- package/api-services/modules/platformManage.js +1 -1
- package/api-services/modules/portal.js +1 -1
- package/api-services/modules/space-manage.js +1 -1
- package/api-services/modules/super-admin.js +1 -1
- package/api-services/modules/supplier.js +1 -1
- package/api-services/modules/supplychain-manage.js +1 -1
- package/api-services/modules/systemConfiguration.js +1 -1
- package/api-services/modules/tool.js +1 -1
- package/api-services/src/create-service.d.ts +1 -1
- package/api-services/src/create-service.js +2 -3234
- package/common-info/{setInfoFromUrl.d.ts → getInfoFromUrl.d.ts} +1 -1
- package/common-info/{setInfoFromUrl.js → getInfoFromUrl.js} +26 -29
- package/common-info/index.d.ts +18 -7
- package/common-info/index.js +82 -143
- package/{api-services/src/sso.js → common-info/set-personal-info.js} +754 -667
- package/common-tools/get-url-params.d.ts +21 -8
- package/common-tools/get-url-params.js +26 -15
- package/common-tools/index.d.ts +3 -0
- package/common-tools/index.js +3 -0
- package/common-tools/obj-tools.d.ts +1 -1
- package/common-tools/platform-tools.d.ts +18 -0
- package/common-tools/platform-tools.js +15 -0
- package/common-tools/queue-promise.d.ts +6 -0
- package/common-tools/queue-promise.js +9 -0
- package/common-tools/setHtmlMinWH.js +8 -4
- package/common-tools/update-fav-icon.d.ts +10 -0
- package/common-tools/update-fav-icon.js +22 -0
- package/create-api-service/index.d.ts +1 -0
- package/create-api-service/index.js +3492 -0
- package/create-api-service/proxy-sso.d.ts +3 -0
- package/create-api-service/proxy-sso.js +21 -0
- package/create-api-service/sso.d.ts +23 -0
- package/create-api-service/sso.js +1969 -0
- package/curring-http/index.d.ts +3 -2
- package/curring-http/index.js +2872 -2662
- package/dimple-canvas/index.d.ts +1 -0
- package/dimple-canvas/use-dimple-canvas/core/antv-x6/index.d.ts +1 -0
- package/dimple-canvas/use-dimple-canvas/core/antv-x6/index.js +2244 -2265
- package/dimple-canvas/use-dimple-canvas/core/konva/index.d.ts +4 -3
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-object/index.d.ts +2 -1
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/find.d.ts +2 -1
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/guideline.d.ts +2 -1
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/lib.d.ts +2 -1
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/lib.js +1079 -1051
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/remove-object.d.ts +2 -1
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/transform-axis.d.ts +3 -2
- package/dimple-canvas/use-dimple-canvas/core/konva/utils/transformer.d.ts +2 -1
- package/dimple-canvas/use-dimple-canvas/index.d.ts +2 -1
- package/directive/auth.js +21 -21
- package/directive/clickOutside.d.ts +3 -2
- package/directive/hoverInside.d.ts +2 -1
- package/dom-check-in/index.js +5 -5
- package/hooks/popup-manager/use-zindex.js +8 -8
- package/hooks/use-get-auth/apis.d.ts +4 -0
- package/hooks/use-get-auth/apis.js +8 -0
- package/hooks/use-get-auth/index.d.ts +9 -0
- package/hooks/use-get-auth/index.js +57 -0
- package/nextTiken/index.d.ts +3 -4
- package/nextTiken/index.js +34 -46
- package/package.json +5 -4
- package/pinyin-first-character/index.js +19792 -20877
- package/process-engine-info/index.d.ts +5 -2
- package/process-engine-info/index.js +11 -6
- package/style/index.js +1 -1
- package/style/style.d.ts +2 -1
- package/style/style.js +1 -1
- package/token-tools/index.d.ts +10 -7
- package/token-tools/index.js +44 -59
- package/use-low-code/index.d.ts +1 -0
- package/use-low-code/index.js +70 -0
- package/use-low-code/low-code-iframe.vue.d.ts +2 -0
- package/use-low-code/style.css +1 -0
- package/webSocket-service/index.d.ts +2 -1
- package/with-install/index.d.ts +2 -1
- package/api-services/src/sso.d.ts +0 -29
- package/api-services/src/util.d.ts +0 -1
- package/api-services/src/util.js +0 -1466
- package/common-tools/throttled.d.ts +0 -7
- package/common-tools/throttled.js +0 -10
- package/micro-app/globalData.d.ts +0 -3
- package/micro-app/globalData.js +0 -11
- package/micro-app/index.d.ts +0 -5
- package/micro-app/index.js +0 -3699
- package/panel/index.d.ts +0 -31
- package/panel/index.js +0 -37
- package/set-personal-info/index.js +0 -1468
- /package/{set-personal-info/index.d.ts → common-info/set-personal-info.d.ts} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*! js-cookie v3.0.5 | MIT */
|
|
2
|
-
function
|
|
2
|
+
function p(e) {
|
|
3
3
|
for (var n = 1; n < arguments.length; n++) {
|
|
4
|
-
var
|
|
5
|
-
for (var i in
|
|
6
|
-
e[i] =
|
|
4
|
+
var t = arguments[n];
|
|
5
|
+
for (var i in t)
|
|
6
|
+
e[i] = t[i];
|
|
7
7
|
}
|
|
8
8
|
return e;
|
|
9
9
|
}
|
|
10
|
-
var
|
|
10
|
+
var u = {
|
|
11
11
|
read: function(e) {
|
|
12
12
|
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
13
13
|
},
|
|
@@ -19,47 +19,47 @@ var I = {
|
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
function g(e, n) {
|
|
22
|
-
function
|
|
22
|
+
function t(o, f, r) {
|
|
23
23
|
if (!(typeof document > "u")) {
|
|
24
|
-
|
|
24
|
+
r = p({}, n, r), typeof r.expires == "number" && (r.expires = new Date(Date.now() + r.expires * 864e5)), r.expires && (r.expires = r.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
25
25
|
var c = "";
|
|
26
|
-
for (var s in
|
|
27
|
-
|
|
26
|
+
for (var s in r)
|
|
27
|
+
r[s] && (c += "; " + s, r[s] !== !0 && (c += "=" + r[s].split(";")[0]));
|
|
28
28
|
return document.cookie = o + "=" + e.write(f, o) + c;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
function i(o) {
|
|
32
32
|
if (!(typeof document > "u" || arguments.length && !o)) {
|
|
33
|
-
for (var f = document.cookie ? document.cookie.split("; ") : [],
|
|
34
|
-
var s = f[c].split("="),
|
|
33
|
+
for (var f = document.cookie ? document.cookie.split("; ") : [], r = {}, c = 0; c < f.length; c++) {
|
|
34
|
+
var s = f[c].split("="), d = s.slice(1).join("=");
|
|
35
35
|
try {
|
|
36
|
-
var
|
|
37
|
-
if (
|
|
36
|
+
var a = decodeURIComponent(s[0]);
|
|
37
|
+
if (r[a] = e.read(d, a), o === a)
|
|
38
38
|
break;
|
|
39
39
|
} catch {
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
return o ?
|
|
42
|
+
return o ? r[o] : r;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
return Object.create(
|
|
46
46
|
{
|
|
47
|
-
set:
|
|
47
|
+
set: t,
|
|
48
48
|
get: i,
|
|
49
49
|
remove: function(o, f) {
|
|
50
|
-
|
|
50
|
+
t(
|
|
51
51
|
o,
|
|
52
52
|
"",
|
|
53
|
-
|
|
53
|
+
p({}, f, {
|
|
54
54
|
expires: -1
|
|
55
55
|
})
|
|
56
56
|
);
|
|
57
57
|
},
|
|
58
58
|
withAttributes: function(o) {
|
|
59
|
-
return g(this.converter,
|
|
59
|
+
return g(this.converter, p({}, this.attributes, o));
|
|
60
60
|
},
|
|
61
61
|
withConverter: function(o) {
|
|
62
|
-
return g(
|
|
62
|
+
return g(p({}, this.converter, o), this.attributes);
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
{
|
|
@@ -68,21 +68,18 @@ function g(e, n) {
|
|
|
68
68
|
}
|
|
69
69
|
);
|
|
70
70
|
}
|
|
71
|
-
var
|
|
72
|
-
const
|
|
71
|
+
var l = g(u, { path: "/" });
|
|
72
|
+
const m = () => {
|
|
73
73
|
const e = new URL(location.href).searchParams, n = e.get("token") || e.get("accessToken") || e.get("accesstoken") || "";
|
|
74
|
-
|
|
75
|
-
const r = JSON.stringify({ access_token: n });
|
|
76
|
-
sessionStorage.setItem("accessToken", n), sessionStorage.setItem("tokenInfo", r), d.set("accessToken", n), d.set("accessTokenInfo", r);
|
|
77
|
-
}
|
|
74
|
+
n && (console.log("从url上取token:", n), JSON.stringify({ access_token: n }), l.set("accessToken", n));
|
|
78
75
|
}, v = () => {
|
|
79
|
-
const e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}"), n = new URL(location.href).searchParams,
|
|
80
|
-
if (!
|
|
76
|
+
const e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}"), n = new URL(location.href).searchParams, t = n.get("project") || n.get("projectId") || "";
|
|
77
|
+
if (!t)
|
|
81
78
|
return;
|
|
82
79
|
const i = n.get("projectParent") || n.get("projectParentId") || (e == null ? void 0 : e.parentId) || "", o = n.get("projectName") || (e == null ? void 0 : e.name) || "";
|
|
83
|
-
sessionStorage.setItem("project",
|
|
80
|
+
console.log("从url上取project:", t), sessionStorage.setItem("project", t), sessionStorage.setItem("projectInfo", JSON.stringify({ ...e, id: t, name: o, parentId: i }));
|
|
84
81
|
};
|
|
85
82
|
export {
|
|
86
83
|
v as getProjectInfoFromQuery,
|
|
87
|
-
|
|
84
|
+
m as getTokenFromQuery
|
|
88
85
|
};
|
package/common-info/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { UserInfo, PersonalInfo, TenantInfo, HomeInfo, ProjectInfo, SubAppsInfo, TabInfo, permissionBtnInfo } from './type';
|
|
2
|
+
|
|
2
3
|
/** 获取token */
|
|
3
|
-
export declare const getToken:
|
|
4
|
-
/**
|
|
4
|
+
export declare const getToken: any;
|
|
5
|
+
/** 获取账户详情 */
|
|
5
6
|
export declare const getUserInfo: () => UserInfo;
|
|
6
7
|
/** 获取用户详情 */
|
|
7
8
|
export declare const getPersonalInfo: () => PersonalInfo;
|
|
@@ -12,6 +13,8 @@ export declare const getTenantInfo: () => TenantInfo;
|
|
|
12
13
|
* @returns 项目信息
|
|
13
14
|
*/
|
|
14
15
|
export declare const getProjectInfo: () => ProjectInfo;
|
|
16
|
+
/** 获取首页信息 */
|
|
17
|
+
export declare const getHomeInfo: () => HomeInfo;
|
|
15
18
|
/**
|
|
16
19
|
* 可用于判断菜单或者按钮权限
|
|
17
20
|
* @param menuCode 菜单编码
|
|
@@ -27,16 +30,24 @@ export declare const getPageAuth: (menuCode?: string, applicationCode?: string)
|
|
|
27
30
|
*/
|
|
28
31
|
export declare const getPageAuthBtn: (menuCode?: string, applicationCode?: string) => permissionBtnInfo;
|
|
29
32
|
/**
|
|
30
|
-
*
|
|
33
|
+
* 获取应用信息
|
|
31
34
|
* @returns 应用信息
|
|
32
35
|
*/
|
|
33
36
|
export declare const getSubApps: () => SubAppsInfo;
|
|
34
37
|
/**
|
|
35
|
-
*
|
|
38
|
+
* 获取指定应用的菜单数据;支持不传入appCode获取所有菜单
|
|
36
39
|
* @param appCode 应用编码
|
|
40
|
+
* @param origin 是否获取原始菜单数据
|
|
41
|
+
* @returns
|
|
37
42
|
*/
|
|
38
|
-
export declare const getMenus: (appCode?: string) => any;
|
|
39
|
-
/** 获取tabs
|
|
43
|
+
export declare const getMenus: (appCode?: string, origin?: boolean) => any;
|
|
44
|
+
/** 获取tabs标签页 */
|
|
40
45
|
export declare const getTabInfo: () => TabInfo;
|
|
41
46
|
/** 获取minio地址 */
|
|
42
47
|
export declare const getMinioAddress: () => any;
|
|
48
|
+
/** 获取iot instanceinfo */
|
|
49
|
+
export declare const getInstanceInfo: () => {
|
|
50
|
+
instanceInfo: any;
|
|
51
|
+
};
|
|
52
|
+
/** 获取favIcon */
|
|
53
|
+
export declare const getFavIcon: () => string;
|
package/common-info/index.js
CHANGED
|
@@ -1,92 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
var b = {
|
|
15
|
-
read: function(e) {
|
|
16
|
-
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
17
|
-
},
|
|
18
|
-
write: function(e) {
|
|
19
|
-
return encodeURIComponent(e).replace(
|
|
20
|
-
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
21
|
-
decodeURIComponent
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
function I(e, n) {
|
|
26
|
-
function r(o, a, t) {
|
|
27
|
-
if (!(typeof document > "u")) {
|
|
28
|
-
t = g({}, n, t), typeof t.expires == "number" && (t.expires = new Date(Date.now() + t.expires * 864e5)), t.expires && (t.expires = t.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
29
|
-
var i = "";
|
|
30
|
-
for (var c in t)
|
|
31
|
-
t[c] && (i += "; " + c, t[c] !== !0 && (i += "=" + t[c].split(";")[0]));
|
|
32
|
-
return document.cookie = o + "=" + e.write(a, o) + i;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
function s(o) {
|
|
36
|
-
if (!(typeof document > "u" || arguments.length && !o)) {
|
|
37
|
-
for (var a = document.cookie ? document.cookie.split("; ") : [], t = {}, i = 0; i < a.length; i++) {
|
|
38
|
-
var c = a[i].split("="), p = c.slice(1).join("=");
|
|
39
|
-
try {
|
|
40
|
-
var u = decodeURIComponent(c[0]);
|
|
41
|
-
if (t[u] = e.read(p, u), o === u)
|
|
42
|
-
break;
|
|
43
|
-
} catch {
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return o ? t[o] : t;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return Object.create(
|
|
50
|
-
{
|
|
51
|
-
set: r,
|
|
52
|
-
get: s,
|
|
53
|
-
remove: function(o, a) {
|
|
54
|
-
r(
|
|
55
|
-
o,
|
|
56
|
-
"",
|
|
57
|
-
g({}, a, {
|
|
58
|
-
expires: -1
|
|
59
|
-
})
|
|
60
|
-
);
|
|
61
|
-
},
|
|
62
|
-
withAttributes: function(o) {
|
|
63
|
-
return I(this.converter, g({}, this.attributes, o));
|
|
64
|
-
},
|
|
65
|
-
withConverter: function(o) {
|
|
66
|
-
return I(g({}, this.converter, o), this.attributes);
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
attributes: { value: Object.freeze(n) },
|
|
71
|
-
converter: { value: Object.freeze(e) }
|
|
72
|
-
}
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
var A = I(b, { path: "/" });
|
|
76
|
-
const h = () => A.get("accessToken") ?? "", w = () => {
|
|
77
|
-
var s;
|
|
78
|
-
let e = (s = l().getData()) == null ? void 0 : s.info;
|
|
79
|
-
const n = f();
|
|
80
|
-
return JSON.stringify(e) === "{}" && n.userInfo && (e = n.userInfo), {
|
|
81
|
-
id: e.sub ?? "",
|
|
82
|
-
name: e.name ?? "",
|
|
83
|
-
flag: e.flag,
|
|
84
|
-
tenantId: (e == null ? void 0 : e.tenant) ?? (e == null ? void 0 : e.tenantId) ?? ""
|
|
1
|
+
import { getConfig as i } from "@das-fed/utils/config";
|
|
2
|
+
import { getUrlParams as p } from "@das-fed/utils/common-tools";
|
|
3
|
+
import { getAccessToken as I } from "@das-fed/utils/token-tools";
|
|
4
|
+
import { getTokenFromQuery as m, getProjectInfoFromQuery as d } from "@das-fed/utils/common-info/getInfoFromUrl";
|
|
5
|
+
const S = I, C = () => {
|
|
6
|
+
var n;
|
|
7
|
+
let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
|
|
8
|
+
return {
|
|
9
|
+
id: e.id ?? "",
|
|
10
|
+
name: e.userName ?? "",
|
|
11
|
+
flag: e.flag ?? null,
|
|
12
|
+
tenantId: ((n = e == null ? void 0 : e.tenant) == null ? void 0 : n.id) ?? ""
|
|
85
13
|
};
|
|
86
|
-
},
|
|
14
|
+
}, P = () => {
|
|
87
15
|
let e = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
|
|
88
|
-
const
|
|
89
|
-
return JSON.stringify(e) === "{}" &&
|
|
16
|
+
const t = i();
|
|
17
|
+
return JSON.stringify(e) === "{}" && t.personalInfo && (e = t.personalInfo), {
|
|
90
18
|
id: e.id ?? "",
|
|
91
19
|
name: e.name ?? "",
|
|
92
20
|
phone: e.phone ?? "",
|
|
@@ -94,7 +22,7 @@ const h = () => A.get("accessToken") ?? "", w = () => {
|
|
|
94
22
|
email: e.email ?? "",
|
|
95
23
|
headPicture: e.headPicture ?? ""
|
|
96
24
|
};
|
|
97
|
-
},
|
|
25
|
+
}, y = () => {
|
|
98
26
|
let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
|
|
99
27
|
return {
|
|
100
28
|
userId: e.id ?? "",
|
|
@@ -105,74 +33,85 @@ const h = () => A.get("accessToken") ?? "", w = () => {
|
|
|
105
33
|
flag: e.flag ?? null,
|
|
106
34
|
tenant: e.tenant ?? {}
|
|
107
35
|
};
|
|
108
|
-
},
|
|
36
|
+
}, b = () => {
|
|
109
37
|
let e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}");
|
|
110
|
-
const
|
|
111
|
-
return JSON.stringify(e) === "{}" &&
|
|
112
|
-
id: (e == null ? void 0 : e.id) ??
|
|
38
|
+
const t = i();
|
|
39
|
+
return JSON.stringify(e) === "{}" && t.projectInfo && (e = t.projectInfo), {
|
|
40
|
+
id: (e == null ? void 0 : e.id) ?? 0,
|
|
113
41
|
parentId: (e == null ? void 0 : e.parentId) ?? "",
|
|
114
42
|
name: (e == null ? void 0 : e.name) ?? "",
|
|
115
43
|
tenantId: (e == null ? void 0 : e.tenant) ?? ""
|
|
116
44
|
};
|
|
117
|
-
},
|
|
118
|
-
const
|
|
119
|
-
|
|
45
|
+
}, M = () => {
|
|
46
|
+
const e = JSON.parse(sessionStorage.getItem("home-config") || "{}");
|
|
47
|
+
return {
|
|
48
|
+
applicationCode: (e == null ? void 0 : e.applicationCode) ?? "",
|
|
49
|
+
applicationPath: (e == null ? void 0 : e.applicationPath) ?? "",
|
|
50
|
+
enable: (e == null ? void 0 : e.enable) ?? !1,
|
|
51
|
+
originalCode: (e == null ? void 0 : e.originalCode) ?? "",
|
|
52
|
+
routeUrl: (e == null ? void 0 : e.routeUrl) ?? "",
|
|
53
|
+
type: (e == null ? void 0 : e.type) ?? null
|
|
54
|
+
};
|
|
55
|
+
}, h = (e, t) => {
|
|
56
|
+
const n = "permission-btn", s = f(), a = p(location.href, "app") || "", o = t || a || s.currentSubAppCode;
|
|
57
|
+
if (!o)
|
|
120
58
|
return;
|
|
121
|
-
const
|
|
122
|
-
if (!
|
|
59
|
+
const r = p(location.href, "menu") || "", g = e || r || s.currentSubApp.currentMenuCode, c = JSON.parse(sessionStorage.getItem(n) || "{}");
|
|
60
|
+
if (!c || JSON.stringify(c) === "{}")
|
|
123
61
|
return;
|
|
124
|
-
const u =
|
|
125
|
-
return u && u.length ? u :
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
if (!window.__IN_MICRO_APP__)
|
|
129
|
-
return {};
|
|
130
|
-
const e = JSON.parse(sessionStorage.getItem("subApps") || "{}"), n = ((s = e.appcategorys) == null ? void 0 : s.map((o) => o.apps).flat()) ?? [];
|
|
62
|
+
const u = c[o][g];
|
|
63
|
+
return u && u.length ? u : c[o]["origin-auth"] ? c[o]["origin-auth"][g] ?? [] : [];
|
|
64
|
+
}, T = (e, t) => h(e, t) ?? [], f = () => {
|
|
65
|
+
const e = JSON.parse(sessionStorage.getItem("subApps") || "{}");
|
|
131
66
|
return {
|
|
132
67
|
appcategorys: e.appcategorys ?? [],
|
|
133
68
|
currentSubApp: e.currentSubApp ?? {},
|
|
134
69
|
currentSubAppCode: e.currentSubAppCode ?? "",
|
|
135
|
-
flatSubAppList: n,
|
|
136
70
|
subAppList: e.subAppList ?? []
|
|
137
71
|
};
|
|
138
|
-
},
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
};
|
|
151
|
-
} else {
|
|
152
|
-
const r = JSON.parse(sessionStorage.getItem(`${e.title}-tabs`) || "{}");
|
|
153
|
-
n = {
|
|
154
|
-
activeKey: r.activeKey ?? "",
|
|
155
|
-
currentTab: r.currentTab ?? {},
|
|
156
|
-
tabList: r.tabList ?? []
|
|
157
|
-
};
|
|
72
|
+
}, j = (e, t = !1) => {
|
|
73
|
+
var s, a;
|
|
74
|
+
const n = f().subAppList;
|
|
75
|
+
if (e)
|
|
76
|
+
return t ? ((s = n == null ? void 0 : n.find((o) => o.code === e)) == null ? void 0 : s.originalMenus) ?? [] : ((a = n == null ? void 0 : n.find((o) => o.code === e)) == null ? void 0 : a.menus) ?? [];
|
|
77
|
+
{
|
|
78
|
+
let o = {};
|
|
79
|
+
return t ? n == null || n.forEach((r) => {
|
|
80
|
+
o[r.code] = r.originalMenus ?? [];
|
|
81
|
+
}) : n == null || n.forEach((r) => {
|
|
82
|
+
o[r.code] = r.menus ?? [];
|
|
83
|
+
}), o;
|
|
158
84
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
|
|
85
|
+
}, v = () => {
|
|
86
|
+
const e = JSON.parse(sessionStorage.getItem("tabs") || "{}");
|
|
87
|
+
return {
|
|
88
|
+
currentCode: e.currentCode ?? "",
|
|
89
|
+
currentTab: e.currentTab ?? {},
|
|
90
|
+
tabMap: e.tabMap ?? {},
|
|
91
|
+
preTab: e.preTab ?? {}
|
|
92
|
+
};
|
|
93
|
+
}, U = () => {
|
|
94
|
+
const e = i(), t = sessionStorage.getItem("minioAddress");
|
|
95
|
+
return t || (e.baseURL ? e.baseURL : location.origin);
|
|
96
|
+
}, k = () => ({
|
|
97
|
+
instanceInfo: JSON.parse(sessionStorage.getItem("instance") || "{}").instanceInfo ?? {}
|
|
98
|
+
}), E = () => localStorage.getItem("fav-icon") || "";
|
|
99
|
+
S() || m();
|
|
100
|
+
var l;
|
|
101
|
+
(l = b()) != null && l.id || d();
|
|
166
102
|
export {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
103
|
+
E as getFavIcon,
|
|
104
|
+
M as getHomeInfo,
|
|
105
|
+
k as getInstanceInfo,
|
|
106
|
+
j as getMenus,
|
|
107
|
+
U as getMinioAddress,
|
|
108
|
+
h as getPageAuth,
|
|
109
|
+
T as getPageAuthBtn,
|
|
110
|
+
P as getPersonalInfo,
|
|
111
|
+
b as getProjectInfo,
|
|
112
|
+
f as getSubApps,
|
|
113
|
+
v as getTabInfo,
|
|
114
|
+
y as getTenantInfo,
|
|
115
|
+
S as getToken,
|
|
116
|
+
C as getUserInfo
|
|
178
117
|
};
|