@das-fed/utils 6.4.0-hot.44 → 6.4.0-hot.45
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/i18n/index.js.gz +0 -0
- package/api-services/index.js +1504 -1820
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +1329 -1663
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +1318 -1634
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +1321 -1637
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +1311 -1623
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +1339 -1673
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +1318 -1634
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.js +1392 -1708
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +1318 -1634
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +1536 -1852
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +1363 -1661
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +1332 -1630
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +1339 -1655
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +1328 -1626
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +1318 -1634
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +1335 -1633
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +1328 -1626
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +1328 -1626
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +1334 -1632
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +1338 -1654
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +1319 -1631
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +1325 -1623
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +1339 -1655
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +1338 -1654
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/getInfoFromUrl/index.js.gz +0 -0
- package/common-info/index.d.ts +5 -1
- package/common-info/index.js +84 -58
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/index.js +593 -842
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-info/type.d.ts +14 -0
- package/common-tools/extract-file-name/index.js +785 -1034
- package/common-tools/extract-file-name/index.js.gz +0 -0
- package/common-tools/get-url-params/index.js.gz +0 -0
- package/create-api-service/index.js +1348 -1646
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/index.js +727 -976
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/index.js +1105 -1354
- package/curring-http/index.js.gz +0 -0
- package/directive/auth/index.js +41 -48
- package/directive/auth/index.js.gz +0 -0
- package/esm-map.json +3 -1
- package/hooks/use-get-auth/index.js.gz +0 -0
- package/nextTiken/index.js.gz +0 -0
- package/package.json +4 -4
- package/pinyin-first-character/index.js +21049 -19969
- package/pinyin-first-character/index.js.gz +0 -0
- package/style/index.js +2 -4
- package/style/index.js.gz +0 -0
- package/use-low-code/index.js.gz +0 -0
- package/vue/hooks/use-model-value/index.d.ts +5 -1
- package/webSocket-service/index.js.gz +0 -0
|
Binary file
|
|
Binary file
|
package/common-info/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { UserInfo, PersonalInfo, TenantInfo, HomeInfo, PersonalConfigInfo, ProjectInfo, ProjectMessage, SubAppsInfo, TabInfo, permissionBtnInfo } from './type';
|
|
1
|
+
import { UserInfo, PersonalInfo, TenantInfo, HomeInfo, PersonalConfigInfo, ProjectInfo, ProjectMessage, SubAppsInfo, TabInfo, permissionBtnInfo, menuItemTs } from './type';
|
|
2
2
|
|
|
3
|
+
/** 获取当前应用详情 */
|
|
4
|
+
export declare const getMenuItemInfo: (val?: any) => menuItemTs;
|
|
5
|
+
/** 获取所有权限code详情 */
|
|
6
|
+
export declare const getAuthobj: () => any;
|
|
3
7
|
/** 获取token */
|
|
4
8
|
export declare const getToken: any;
|
|
5
9
|
/** 获取账户详情 */
|
package/common-info/index.js
CHANGED
|
@@ -1,19 +1,52 @@
|
|
|
1
|
-
import { getConfig as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { getConfig as p } from "@das-fed/utils/config";
|
|
2
|
+
import { getAccessToken as g } from "@das-fed/utils/token-tools";
|
|
3
|
+
import { getTokenFromQuery as d, getProjectInfoFromQuery as i } from "@das-fed/utils/common-info/getInfoFromUrl";
|
|
4
|
+
const P = (e) => {
|
|
5
|
+
let t = e || JSON.parse(sessionStorage.getItem("menuItem") || "{}");
|
|
6
|
+
return {
|
|
7
|
+
authCodes: t.rightFuncCodes ?? [],
|
|
8
|
+
routeUrl: t.routeUrl ?? "",
|
|
9
|
+
parentId: t.parentId ?? "",
|
|
10
|
+
id: t.id ?? "",
|
|
11
|
+
appId: t.appId ?? "",
|
|
12
|
+
menuAppearance: t.menuAppearance ?? "",
|
|
13
|
+
name: t.name ?? "",
|
|
14
|
+
type: (t == null ? void 0 : t.type) ?? ""
|
|
15
|
+
};
|
|
16
|
+
}, m = () => {
|
|
17
|
+
const e = JSON.parse(sessionStorage.getItem("menuList") || "[]"), t = {};
|
|
18
|
+
return e.forEach((s) => {
|
|
19
|
+
s.routeUrl && (s.rightFuncCodes && s.rightFuncCodes.forEach((r) => t[r] = []), s.children && s.children.forEach((r) => {
|
|
20
|
+
if (r.rightFuncCodes && r.rightFuncCodes[0] && !r.children) {
|
|
21
|
+
const o = r.rightFuncCodes[0].lastIndexOf("."), n = r.rightFuncCodes[0].slice(0, o);
|
|
22
|
+
t[n] = [], r.rightFuncCodes.forEach((a) => {
|
|
23
|
+
const c = a.lastIndexOf(".");
|
|
24
|
+
t[n].push({ code: a.slice(c + 1) });
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
r.children && r.children.forEach((o) => {
|
|
28
|
+
if (o.rightFuncCodes) {
|
|
29
|
+
const n = o.rightFuncCodes[0].lastIndexOf("."), a = o.rightFuncCodes[0].slice(0, n);
|
|
30
|
+
t[a] = [], o.rightFuncCodes.forEach((c) => {
|
|
31
|
+
const l = c.lastIndexOf(".");
|
|
32
|
+
t[a].push({ code: c.slice(l + 1) });
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}));
|
|
37
|
+
}), t;
|
|
38
|
+
}, I = g, b = () => {
|
|
39
|
+
var s;
|
|
7
40
|
let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
|
|
8
41
|
return {
|
|
9
42
|
id: e.id ?? "",
|
|
10
43
|
name: e.userName ?? "",
|
|
11
44
|
flag: e.flag ?? null,
|
|
12
|
-
tenantId: ((
|
|
45
|
+
tenantId: ((s = e == null ? void 0 : e.tenant) == null ? void 0 : s.id) ?? ""
|
|
13
46
|
};
|
|
14
|
-
},
|
|
47
|
+
}, f = () => {
|
|
15
48
|
let e = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
|
|
16
|
-
const t =
|
|
49
|
+
const t = p();
|
|
17
50
|
return JSON.stringify(e) === "{}" && t.personalInfo && (e = t.personalInfo), {
|
|
18
51
|
id: e.id ?? "",
|
|
19
52
|
name: e.name ?? "",
|
|
@@ -44,9 +77,9 @@ const N = I, A = () => {
|
|
|
44
77
|
address: e.address ?? "",
|
|
45
78
|
description: e.description ?? ""
|
|
46
79
|
};
|
|
47
|
-
},
|
|
80
|
+
}, T = () => sessionStorage.getItem("languages"), y = () => {
|
|
48
81
|
let e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}");
|
|
49
|
-
const t =
|
|
82
|
+
const t = p();
|
|
50
83
|
return JSON.stringify(e) === "{}" && t.projectInfo && (e = t.projectInfo), {
|
|
51
84
|
id: (e == null ? void 0 : e.id) ?? 0,
|
|
52
85
|
code: (e == null ? void 0 : e.code) ?? 0,
|
|
@@ -60,7 +93,7 @@ const N = I, A = () => {
|
|
|
60
93
|
leaf: (e == null ? void 0 : e.leaf) ?? !1,
|
|
61
94
|
optional: (e == null ? void 0 : e.leaf) ?? !0
|
|
62
95
|
};
|
|
63
|
-
},
|
|
96
|
+
}, F = () => {
|
|
64
97
|
let e = JSON.parse(sessionStorage.getItem("project-message") || "{}");
|
|
65
98
|
return {
|
|
66
99
|
id: (e == null ? void 0 : e.id) ?? 0,
|
|
@@ -85,7 +118,7 @@ const N = I, A = () => {
|
|
|
85
118
|
autoTimezone: (e == null ? void 0 : e.autoTimezone) ?? !1,
|
|
86
119
|
currency: (e == null ? void 0 : e.currency) ?? {}
|
|
87
120
|
};
|
|
88
|
-
},
|
|
121
|
+
}, J = () => {
|
|
89
122
|
const e = JSON.parse(sessionStorage.getItem("home-config") || "{}");
|
|
90
123
|
return {
|
|
91
124
|
applicationCode: (e == null ? void 0 : e.applicationCode) ?? "",
|
|
@@ -96,22 +129,13 @@ const N = I, A = () => {
|
|
|
96
129
|
displayPosition: (e == null ? void 0 : e.displayPosition) ?? 1,
|
|
97
130
|
type: (e == null ? void 0 : e.type) ?? null
|
|
98
131
|
};
|
|
99
|
-
},
|
|
132
|
+
}, A = () => {
|
|
100
133
|
const e = JSON.parse(sessionStorage.getItem("personal-config") || "{}");
|
|
101
134
|
return {
|
|
102
135
|
style: (e == null ? void 0 : e.style) ?? "",
|
|
103
136
|
skinStyle: (e == null ? void 0 : e.skinStyle) ?? ""
|
|
104
137
|
};
|
|
105
|
-
},
|
|
106
|
-
var g;
|
|
107
|
-
const r = "permission-btn", a = m(), o = d(location.href, "app") || "", s = t || o || a.currentSubAppCode;
|
|
108
|
-
if (!s) return;
|
|
109
|
-
const n = d(location.href, "menu") || "", l = e || n || a.currentSubApp.currentMenuCode, c = JSON.parse(sessionStorage.getItem(r) || "{}");
|
|
110
|
-
if (!c || JSON.stringify(c) === "{}") return;
|
|
111
|
-
const p = (g = c[s]) == null ? void 0 : g[l];
|
|
112
|
-
if (p)
|
|
113
|
-
return p.length ? p : c[s]["origin-auth"] ? c[s]["origin-auth"][l] ?? [] : [];
|
|
114
|
-
}, D = (e, t) => j(e, t) ?? [], m = () => {
|
|
138
|
+
}, C = (e, t) => e ? m()[e] : void 0, x = (e, t) => C(e) ?? [], h = () => {
|
|
115
139
|
const e = JSON.parse(sessionStorage.getItem("subApps") || "{}");
|
|
116
140
|
return {
|
|
117
141
|
appcategorys: e.appcategorys ?? [],
|
|
@@ -120,20 +144,20 @@ const N = I, A = () => {
|
|
|
120
144
|
subAppList: e.subAppList ?? [],
|
|
121
145
|
menuCollapses: e.menuCollapses ?? []
|
|
122
146
|
};
|
|
123
|
-
},
|
|
124
|
-
var
|
|
125
|
-
const
|
|
147
|
+
}, E = (e, t = !1) => {
|
|
148
|
+
var r, o;
|
|
149
|
+
const s = h().subAppList;
|
|
126
150
|
if (e)
|
|
127
|
-
return t ? ((
|
|
151
|
+
return t ? ((r = s == null ? void 0 : s.find((n) => n.code === e)) == null ? void 0 : r.originalMenus) ?? [] : ((o = s == null ? void 0 : s.find((n) => n.code === e)) == null ? void 0 : o.menus) ?? [];
|
|
128
152
|
{
|
|
129
|
-
let
|
|
130
|
-
return t ?
|
|
131
|
-
|
|
132
|
-
}) :
|
|
133
|
-
|
|
134
|
-
}),
|
|
153
|
+
let n = {};
|
|
154
|
+
return t ? s == null || s.forEach((a) => {
|
|
155
|
+
n[a.code] = a.originalMenus ?? [];
|
|
156
|
+
}) : s == null || s.forEach((a) => {
|
|
157
|
+
n[a.code] = a.menus ?? [];
|
|
158
|
+
}), n;
|
|
135
159
|
}
|
|
136
|
-
},
|
|
160
|
+
}, M = () => {
|
|
137
161
|
const e = JSON.parse(sessionStorage.getItem("tabs") || "{}");
|
|
138
162
|
return {
|
|
139
163
|
currentCode: e.currentCode ?? "",
|
|
@@ -141,31 +165,33 @@ const N = I, A = () => {
|
|
|
141
165
|
tabMap: e.tabMap ?? {},
|
|
142
166
|
preTab: e.preTab ?? {}
|
|
143
167
|
};
|
|
144
|
-
},
|
|
145
|
-
const e =
|
|
168
|
+
}, k = () => {
|
|
169
|
+
const e = p(), t = sessionStorage.getItem("minioAddress");
|
|
146
170
|
return t || (e.baseURL ? e.baseURL : location.origin);
|
|
147
|
-
},
|
|
171
|
+
}, U = () => ({
|
|
148
172
|
instanceInfo: JSON.parse(sessionStorage.getItem("instance") || "{}").instanceInfo ?? {}
|
|
149
|
-
}),
|
|
150
|
-
|
|
151
|
-
var
|
|
152
|
-
(
|
|
173
|
+
}), v = () => localStorage.getItem("fav-icon") || "./logo.svg";
|
|
174
|
+
I() || d();
|
|
175
|
+
var u;
|
|
176
|
+
(u = y()) != null && u.id || i();
|
|
153
177
|
export {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
178
|
+
m as getAuthobj,
|
|
179
|
+
v as getFavIcon,
|
|
180
|
+
J as getHomeInfo,
|
|
181
|
+
U as getInstanceInfo,
|
|
182
|
+
T as getLanguages,
|
|
183
|
+
P as getMenuItemInfo,
|
|
184
|
+
E as getMenus,
|
|
185
|
+
k as getMinioAddress,
|
|
186
|
+
C as getPageAuth,
|
|
187
|
+
x as getPageAuthBtn,
|
|
188
|
+
A as getPersonalConfig,
|
|
189
|
+
f as getPersonalInfo,
|
|
190
|
+
y as getProjectInfo,
|
|
191
|
+
F as getProjectMessage,
|
|
192
|
+
h as getSubApps,
|
|
193
|
+
M as getTabInfo,
|
|
168
194
|
O as getTenantInfo,
|
|
169
|
-
|
|
170
|
-
|
|
195
|
+
I as getToken,
|
|
196
|
+
b as getUserInfo
|
|
171
197
|
};
|
package/common-info/index.js.gz
CHANGED
|
Binary file
|