@das-fed/utils 7.0.4-test.3 → 7.0.5-test.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/modules/app-manage/index.js +717 -735
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +765 -747
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +738 -720
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +763 -745
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +717 -735
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +765 -747
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +735 -717
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +729 -715
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/index.js +12 -13
- package/common-info/index.js.gz +0 -0
- package/common-info/type.d.ts +0 -2
- package/create-api-service/sso/index.d.ts +1 -1
- package/create-api-service/sso/index.js +36 -33
- package/create-api-service/sso/index.js.gz +0 -0
- package/package.json +4 -4
- package/vue/hooks/use-model-value/index.d.ts +1 -5
|
Binary file
|
package/common-info/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { getConfig as u } from "@das-fed/utils/config";
|
|
|
2
2
|
import { getUrlParams as d } from "@das-fed/utils/common-tools";
|
|
3
3
|
import { getAccessToken as I } from "@das-fed/utils/token-tools";
|
|
4
4
|
import { getTokenFromQuery as S, getProjectInfoFromQuery as y } from "@das-fed/utils/common-info/getInfoFromUrl";
|
|
5
|
-
const N = I,
|
|
5
|
+
const N = I, A = () => {
|
|
6
6
|
var r;
|
|
7
7
|
let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
|
|
8
8
|
return {
|
|
@@ -60,7 +60,7 @@ const N = I, T = () => {
|
|
|
60
60
|
leaf: (e == null ? void 0 : e.leaf) ?? !1,
|
|
61
61
|
optional: (e == null ? void 0 : e.leaf) ?? !0
|
|
62
62
|
};
|
|
63
|
-
},
|
|
63
|
+
}, v = () => {
|
|
64
64
|
let e = JSON.parse(sessionStorage.getItem("project-message") || "{}");
|
|
65
65
|
return {
|
|
66
66
|
id: (e == null ? void 0 : e.id) ?? 0,
|
|
@@ -85,7 +85,7 @@ const N = I, T = () => {
|
|
|
85
85
|
autoTimezone: (e == null ? void 0 : e.autoTimezone) ?? !1,
|
|
86
86
|
currency: (e == null ? void 0 : e.currency) ?? {}
|
|
87
87
|
};
|
|
88
|
-
},
|
|
88
|
+
}, f = () => {
|
|
89
89
|
const e = JSON.parse(sessionStorage.getItem("home-config") || "{}");
|
|
90
90
|
return {
|
|
91
91
|
applicationCode: (e == null ? void 0 : e.applicationCode) ?? "",
|
|
@@ -118,7 +118,6 @@ const N = I, T = () => {
|
|
|
118
118
|
currentSubApp: e.currentSubApp ?? {},
|
|
119
119
|
currentSubAppCode: e.currentSubAppCode ?? "",
|
|
120
120
|
subAppList: e.subAppList ?? [],
|
|
121
|
-
fixedApps: e.fixedApps ?? [],
|
|
122
121
|
menuCollapses: e.menuCollapses ?? []
|
|
123
122
|
};
|
|
124
123
|
}, U = (e, t = !1) => {
|
|
@@ -134,7 +133,7 @@ const N = I, T = () => {
|
|
|
134
133
|
s[n.code] = n.menus ?? [];
|
|
135
134
|
}), s;
|
|
136
135
|
}
|
|
137
|
-
},
|
|
136
|
+
}, E = () => {
|
|
138
137
|
const e = JSON.parse(sessionStorage.getItem("tabs") || "{}");
|
|
139
138
|
return {
|
|
140
139
|
currentCode: e.currentCode ?? "",
|
|
@@ -142,10 +141,10 @@ const N = I, T = () => {
|
|
|
142
141
|
tabMap: e.tabMap ?? {},
|
|
143
142
|
preTab: e.preTab ?? {}
|
|
144
143
|
};
|
|
145
|
-
},
|
|
144
|
+
}, z = () => {
|
|
146
145
|
const e = u(), t = sessionStorage.getItem("minioAddress");
|
|
147
146
|
return t || (e.baseURL ? e.baseURL : location.origin);
|
|
148
|
-
},
|
|
147
|
+
}, x = () => ({
|
|
149
148
|
instanceInfo: JSON.parse(sessionStorage.getItem("instance") || "{}").instanceInfo ?? {}
|
|
150
149
|
}), F = () => localStorage.getItem("fav-icon") || "./logo.svg";
|
|
151
150
|
N() || S();
|
|
@@ -153,20 +152,20 @@ var i;
|
|
|
153
152
|
(i = C()) != null && i.id || y();
|
|
154
153
|
export {
|
|
155
154
|
F as getFavIcon,
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
f as getHomeInfo,
|
|
156
|
+
x as getInstanceInfo,
|
|
158
157
|
M as getLanguages,
|
|
159
158
|
U as getMenus,
|
|
160
|
-
|
|
159
|
+
z as getMinioAddress,
|
|
161
160
|
j as getPageAuth,
|
|
162
161
|
D as getPageAuthBtn,
|
|
163
162
|
k as getPersonalConfig,
|
|
164
163
|
J as getPersonalInfo,
|
|
165
164
|
C as getProjectInfo,
|
|
166
|
-
|
|
165
|
+
v as getProjectMessage,
|
|
167
166
|
m as getSubApps,
|
|
168
|
-
|
|
167
|
+
E as getTabInfo,
|
|
169
168
|
O as getTenantInfo,
|
|
170
169
|
N as getToken,
|
|
171
|
-
|
|
170
|
+
A as getUserInfo
|
|
172
171
|
};
|
package/common-info/index.js.gz
CHANGED
|
Binary file
|
package/common-info/type.d.ts
CHANGED
|
@@ -1683,22 +1683,22 @@ b.getAdapter = Tt.getAdapter;
|
|
|
1683
1683
|
b.HttpStatusCode = be;
|
|
1684
1684
|
b.default = b;
|
|
1685
1685
|
const {
|
|
1686
|
-
Axios:
|
|
1687
|
-
AxiosError:
|
|
1688
|
-
CanceledError:
|
|
1689
|
-
isCancel:
|
|
1690
|
-
CancelToken:
|
|
1691
|
-
VERSION:
|
|
1692
|
-
all:
|
|
1693
|
-
Cancel:
|
|
1694
|
-
isAxiosError:
|
|
1695
|
-
spread:
|
|
1696
|
-
toFormData:
|
|
1697
|
-
AxiosHeaders:
|
|
1698
|
-
HttpStatusCode:
|
|
1699
|
-
formToJSON:
|
|
1700
|
-
getAdapter:
|
|
1701
|
-
mergeConfig:
|
|
1686
|
+
Axios: Qr,
|
|
1687
|
+
AxiosError: Gr,
|
|
1688
|
+
CanceledError: Xr,
|
|
1689
|
+
isCancel: Zr,
|
|
1690
|
+
CancelToken: Yr,
|
|
1691
|
+
VERSION: eo,
|
|
1692
|
+
all: to,
|
|
1693
|
+
Cancel: no,
|
|
1694
|
+
isAxiosError: ro,
|
|
1695
|
+
spread: oo,
|
|
1696
|
+
toFormData: so,
|
|
1697
|
+
AxiosHeaders: io,
|
|
1698
|
+
HttpStatusCode: ao,
|
|
1699
|
+
formToJSON: co,
|
|
1700
|
+
getAdapter: uo,
|
|
1701
|
+
mergeConfig: lo
|
|
1702
1702
|
} = b;
|
|
1703
1703
|
/*! js-cookie v3.0.5 | MIT */
|
|
1704
1704
|
function Q(e) {
|
|
@@ -1923,7 +1923,7 @@ const Y = (e) => new URL(location.href).searchParams.get(e), I = {
|
|
|
1923
1923
|
// 清除登录信息
|
|
1924
1924
|
token: "/api/justauth/oauth-server/v1/visitor/oauth/token"
|
|
1925
1925
|
// 通过code获取token
|
|
1926
|
-
}, { baseURL: Ze, noRedireLogin: Fr = !1 } = Oe(),
|
|
1926
|
+
}, { baseURL: Ze, noRedireLogin: Fr = !1 } = Oe(), $ = location.origin + "/home", F = {
|
|
1927
1927
|
response_type: "code",
|
|
1928
1928
|
scope: "sever",
|
|
1929
1929
|
client_id: "sys",
|
|
@@ -1946,11 +1946,11 @@ const Y = (e) => new URL(location.href).searchParams.get(e), I = {
|
|
|
1946
1946
|
};
|
|
1947
1947
|
localStorage.getItem("idelTime") && Nt(Number(localStorage.getItem("idelTime")));
|
|
1948
1948
|
let et = "";
|
|
1949
|
-
const
|
|
1950
|
-
const e = Y("code") || "", t = Y("redirect_url") || "
|
|
1949
|
+
const Ir = async () => {
|
|
1950
|
+
const e = Y("code") || "", t = Y("redirect_url") || "", n = Y("kingdee_token") || "";
|
|
1951
1951
|
if (!e) return v();
|
|
1952
1952
|
if (e === et)
|
|
1953
|
-
return Ye(["code", "state", "kingdee_token", "redirect_url"]), window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t)), v();
|
|
1953
|
+
return Ye(["code", "state", "kingdee_token", "redirect_url"]), t && (window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t))), v();
|
|
1954
1954
|
et = e, Ye(["code", "state", "kingdee_token", "redirect_url"]);
|
|
1955
1955
|
let r = {};
|
|
1956
1956
|
const o = {
|
|
@@ -1992,7 +1992,7 @@ const Br = async () => {
|
|
|
1992
1992
|
} catch {
|
|
1993
1993
|
return z({ ...F, redirect_uri: $ });
|
|
1994
1994
|
}
|
|
1995
|
-
}, H = ee(!1),
|
|
1995
|
+
}, H = ee(!1), fo = async (e) => {
|
|
1996
1996
|
if (e.public) return "";
|
|
1997
1997
|
if (Lt.value) return z({ ...F, redirect_uri: $ });
|
|
1998
1998
|
if (H.value)
|
|
@@ -2013,15 +2013,15 @@ const Br = async () => {
|
|
|
2013
2013
|
let r = v();
|
|
2014
2014
|
H.value = !0;
|
|
2015
2015
|
try {
|
|
2016
|
-
typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (r = await
|
|
2016
|
+
typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (r = await qr(F)), r = await Ir(), H.value = !1;
|
|
2017
2017
|
} catch {
|
|
2018
2018
|
H.value = !1;
|
|
2019
2019
|
}
|
|
2020
2020
|
return r;
|
|
2021
|
-
},
|
|
2021
|
+
}, Br = () => {
|
|
2022
2022
|
let e = !1;
|
|
2023
2023
|
return localStorage.getItem("thirdLogouSource") === "zhongshen" && (e = !0), e;
|
|
2024
|
-
},
|
|
2024
|
+
}, jr = (e) => {
|
|
2025
2025
|
if (localStorage.getItem("thirdLogouSource") === "zhongshen") {
|
|
2026
2026
|
const r = `https://iam.shenyejituan.com:443/idp/profile/OAUTH2/Redirect/GLO?redirctToUrl=${encodeURIComponent(e)}&entityId=AIoT&redirectToLogin=true`;
|
|
2027
2027
|
localStorage.removeItem("thirdLogouSource"), location.href = r;
|
|
@@ -2032,8 +2032,8 @@ const Br = async () => {
|
|
|
2032
2032
|
if (Re) return Re(e);
|
|
2033
2033
|
e.logout = "true", n && (e.locale = "locale");
|
|
2034
2034
|
const r = Object.keys(e).filter((s) => s !== "client_secret").map((s) => `${s}=${e[s]}`).join("&"), o = `${t}${I.oauth}?${r}`;
|
|
2035
|
-
if (localStorage.removeItem("idelTime"), sessionStorage.clear(), J().remove(),
|
|
2036
|
-
|
|
2035
|
+
if (localStorage.removeItem("idelTime"), sessionStorage.clear(), J().remove(), Br())
|
|
2036
|
+
jr(o);
|
|
2037
2037
|
else {
|
|
2038
2038
|
try {
|
|
2039
2039
|
b.create().get(I.logoutCurpage, { baseURL: t });
|
|
@@ -2043,7 +2043,7 @@ const Br = async () => {
|
|
|
2043
2043
|
}
|
|
2044
2044
|
};
|
|
2045
2045
|
vr(z);
|
|
2046
|
-
const
|
|
2046
|
+
const qr = async (e) => {
|
|
2047
2047
|
const { baseURL: t } = Oe(), { refreshToken: n } = J().getData();
|
|
2048
2048
|
try {
|
|
2049
2049
|
await b.create().get(I.token, { baseURL: t });
|
|
@@ -2081,10 +2081,13 @@ const Hr = async (e) => {
|
|
|
2081
2081
|
refreshToken: ue("refreshToken")
|
|
2082
2082
|
}),
|
|
2083
2083
|
save: (e) => {
|
|
2084
|
-
Bt(
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2084
|
+
Bt(
|
|
2085
|
+
e.accessToken || "",
|
|
2086
|
+
{
|
|
2087
|
+
accessTokenExpiredAt: e.accessTokenExpiredAt,
|
|
2088
|
+
refreshToken: e.refreshToken
|
|
2089
|
+
}
|
|
2090
|
+
), qt(e);
|
|
2088
2091
|
},
|
|
2089
2092
|
remove: () => {
|
|
2090
2093
|
It(), jt();
|
|
@@ -2092,8 +2095,8 @@ const Hr = async (e) => {
|
|
|
2092
2095
|
});
|
|
2093
2096
|
export {
|
|
2094
2097
|
Y as getQuery,
|
|
2095
|
-
|
|
2096
|
-
|
|
2098
|
+
fo as getToken,
|
|
2099
|
+
Ir as getTokenFromCode,
|
|
2097
2100
|
F as getTokenParams,
|
|
2098
2101
|
z as login,
|
|
2099
2102
|
$ as real_uri,
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@das-fed/utils",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.5-test.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.
|
|
12
|
+
"@das-fed/utils": "7.0.5-test.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.
|
|
25
|
-
"@das-fed/web": "7.0.
|
|
24
|
+
"@das-fed/cli": "7.0.5-test.1",
|
|
25
|
+
"@das-fed/web": "7.0.5-test.1",
|
|
26
26
|
"@types/js-cookie": "^3.0.6",
|
|
27
27
|
"@types/lodash-es": "^4.17.12",
|
|
28
28
|
"@types/qs": "^6.9.15",
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
|
|
3
3
|
/** 简化组件内使用modelValue时的watch过程 */
|
|
4
|
-
declare const useModelValue: (
|
|
5
|
-
/** 组件的props */
|
|
6
|
-
props: any,
|
|
7
|
-
/** 组件props需要使用modelValue的key */
|
|
8
|
-
propKey: string) => Ref;
|
|
4
|
+
declare const useModelValue: (props: any, propKey: string) => Ref;
|
|
9
5
|
export { useModelValue };
|