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