@das-fed/utils 7.0.2-beta.3 → 7.0.2-beta.4.1
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 +560 -541
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +350 -331
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +880 -843
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +867 -830
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +880 -843
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +356 -337
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +350 -331
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.js +573 -554
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +350 -331
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +1022 -985
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +865 -846
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +431 -412
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +350 -331
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +350 -331
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +350 -331
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +350 -331
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +350 -331
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +350 -331
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +849 -848
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +866 -829
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +880 -843
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +350 -331
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +350 -331
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +849 -848
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/getInfoFromUrl/index.js.gz +0 -0
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/index.js +243 -227
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-tools/extract-file-name/index.js +566 -550
- 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 +350 -331
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/index.js +620 -615
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/index.js +582 -566
- package/curring-http/index.js.gz +0 -0
- package/directive/auth/index.js.gz +0 -0
- package/hooks/use-get-auth/index.d.ts +1 -1
- package/hooks/use-get-auth/index.js +30 -30
- 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.gz +0 -0
- package/style/index.js +1 -1
- package/style/index.js.gz +0 -0
- package/use-low-code/index.js.gz +0 -0
- package/webSocket-service/index.js.gz +0 -0
package/curring-http/index.js.gz
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const useGetAuth: () => {
|
|
2
2
|
getApplication: (code?: string, appName?: "superadmin" | "enterpriseadmin") => unknown;
|
|
3
|
-
getMenu: (code: string, menuCode?: string
|
|
3
|
+
getMenu: (code: string, menuCode?: string, path?: string, appName?: "superadmin" | "enterpriseadmin") => unknown;
|
|
4
4
|
getAuth: (options: {
|
|
5
5
|
applicationCode: string;
|
|
6
6
|
menuCode: string;
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { flatTree as
|
|
2
|
-
import { projectNextTick as
|
|
3
|
-
import { vAuth as
|
|
4
|
-
import { portal as
|
|
5
|
-
const
|
|
1
|
+
import { flatTree as w } from "@das-fed/utils/common-tools";
|
|
2
|
+
import { projectNextTick as A } from "@das-fed/utils/nextTiken";
|
|
3
|
+
import { vAuth as M } from "@das-fed/utils/directive/auth";
|
|
4
|
+
import { portal as T, superadminPortal as y, enterpriseright as U } from "@das-fed/utils/api-services/modules";
|
|
5
|
+
const v = T.get("/appcategory"), B = y.get("/appcategory"), C = U.get("/permissionset/user-portal-menu"), L = y.get("/user-menu"), k = () => {
|
|
6
6
|
const d = async (r, i = "enterpriseadmin") => {
|
|
7
7
|
let t = null, s = {};
|
|
8
|
-
await
|
|
9
|
-
const [
|
|
10
|
-
if (
|
|
11
|
-
const
|
|
12
|
-
return r ?
|
|
13
|
-
}, g = async (r, i, t, s = "enterpriseadmin"
|
|
14
|
-
var
|
|
15
|
-
await
|
|
16
|
-
let
|
|
8
|
+
await A(), i === "superadmin" ? t = B().run : (s = { userType: 1 }, t = v().run);
|
|
9
|
+
const [a, l] = await t(s);
|
|
10
|
+
if (a || !l || !l.length) return null;
|
|
11
|
+
const f = l.map((o) => o.apps).flat();
|
|
12
|
+
return r ? f.find((o) => o.code === r) : f;
|
|
13
|
+
}, g = async (r, i, t, s = "enterpriseadmin") => {
|
|
14
|
+
var c;
|
|
15
|
+
await A();
|
|
16
|
+
let a = null, l = {
|
|
17
17
|
code: r,
|
|
18
18
|
showBtn: !0
|
|
19
19
|
};
|
|
20
|
-
s === "superadmin" ?
|
|
21
|
-
const [
|
|
22
|
-
if (
|
|
20
|
+
s === "superadmin" ? a = L().run : (l.userType = 1, a = C().run);
|
|
21
|
+
const [f, e] = await a(l);
|
|
22
|
+
if (f || !e || !e.length)
|
|
23
23
|
return i || t ? void 0 : [];
|
|
24
24
|
if (!i && !t) return e;
|
|
25
|
-
const
|
|
26
|
-
let
|
|
25
|
+
const o = e != null && e.length ? e.filter((n) => n.routeUrl) : [], m = e != null && e.length ? e.filter((n) => !n.routeUrl && n.children).map((n) => n.children).flat() : [], p = [...o, ...m];
|
|
26
|
+
let u;
|
|
27
27
|
if (i)
|
|
28
|
-
|
|
28
|
+
u = p.find((n) => n.code === i || n.originalCode === i);
|
|
29
29
|
else if (t) {
|
|
30
|
-
const n = t.replace(((
|
|
31
|
-
|
|
30
|
+
const n = t.replace(((c = p[0]) == null ? void 0 : c.applicationPath) ?? "", "").replace(/\/\//g, "/");
|
|
31
|
+
u = p.find((h) => h.routeUrl && h.routeUrl === n);
|
|
32
32
|
}
|
|
33
|
-
return
|
|
33
|
+
return u;
|
|
34
34
|
};
|
|
35
35
|
return {
|
|
36
36
|
getApplication: d,
|
|
37
37
|
getMenu: g,
|
|
38
38
|
getAuth: async (r, i = "enterpriseadmin") => {
|
|
39
|
-
var
|
|
40
|
-
const t = (r == null ? void 0 : r.applicationCode) ?? "", s = (r == null ? void 0 : r.menuCode) ?? "",
|
|
41
|
-
if (JSON.parse(sessionStorage.getItem("permission-btn") || "{}")[s]) return
|
|
39
|
+
var p;
|
|
40
|
+
const t = (r == null ? void 0 : r.applicationCode) ?? "", s = (r == null ? void 0 : r.menuCode) ?? "", a = (r == null ? void 0 : r.code) ?? "";
|
|
41
|
+
if (JSON.parse(sessionStorage.getItem("permission-btn") || "{}")[s]) return M(null, { applicationCode: t, menuCode: s, code: a });
|
|
42
42
|
if (!await d(t, i)) return !1;
|
|
43
|
-
const
|
|
44
|
-
return !
|
|
43
|
+
const e = await g(t, s, i);
|
|
44
|
+
return !e || !(e != null && e.children) || !((p = e.children) != null && p.length) ? !1 : !!w(e.children).find((u) => {
|
|
45
45
|
let c = (u == null ? void 0 : u.originalCode) ?? u.code;
|
|
46
|
-
return c.includes(s + ".") && (c = c.replace(s + ".", "").replaceAll(".", "-")), c ===
|
|
46
|
+
return c.includes(s + ".") && (c = c.replace(s + ".", "").replaceAll(".", "-")), c === a;
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
51
|
export {
|
|
52
|
-
|
|
52
|
+
k as useGetAuth
|
|
53
53
|
};
|
|
Binary file
|
package/nextTiken/index.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@das-fed/utils",
|
|
3
|
-
"version": "7.0.2-beta.
|
|
3
|
+
"version": "7.0.2-beta.4.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"license": "ISC",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@antv/x6": "^2.18.1",
|
|
12
|
-
"@das-fed/utils": "7.0.2-beta.
|
|
12
|
+
"@das-fed/utils": "7.0.2-beta.4.1",
|
|
13
13
|
"@vue/shared": "^3.4.21",
|
|
14
14
|
"@vueuse/core": "^9.6.0",
|
|
15
15
|
"axios": "^1.6.7",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"vue": "^3.4.21"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@das-fed/cli": "7.0.2-beta.
|
|
25
|
-
"@das-fed/web": "7.0.2-beta.
|
|
24
|
+
"@das-fed/cli": "7.0.2-beta.4.1",
|
|
25
|
+
"@das-fed/web": "7.0.2-beta.4.1",
|
|
26
26
|
"@types/js-cookie": "^3.0.6",
|
|
27
27
|
"@types/lodash-es": "^4.17.12",
|
|
28
28
|
"@types/qs": "^6.9.15",
|
|
Binary file
|
package/style/index.js
CHANGED
package/style/index.js.gz
CHANGED
|
Binary file
|
package/use-low-code/index.js.gz
CHANGED
|
Binary file
|
|
Binary file
|