@das-fed/upf-utils 6.4.0-dev.124
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/__VLS_types.d.ts +124 -0
- package/api-services/i18n/index.d.ts +53 -0
- package/api-services/i18n/index.js +27 -0
- package/api-services/i18n/index.js.gz +0 -0
- package/api-services/index.d.ts +2 -0
- package/api-services/index.js +3141 -0
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.d.ts +2 -0
- package/api-services/modules/app-manage/index.js +2827 -0
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.d.ts +2 -0
- package/api-services/modules/authentication/index.js +2827 -0
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.d.ts +6 -0
- package/api-services/modules/bems/index.js +2831 -0
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.d.ts +2 -0
- package/api-services/modules/contract/index.js +2827 -0
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.d.ts +7 -0
- package/api-services/modules/duty-manage/index.js +2836 -0
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.d.ts +2 -0
- package/api-services/modules/enterpriseright/index.js +2827 -0
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.d.ts +37 -0
- package/api-services/modules/file/index.js +3059 -0
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.d.ts +2 -0
- package/api-services/modules/gateway-edge/index.js +2827 -0
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.d.ts +21 -0
- package/api-services/modules/index.js +3115 -0
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.d.ts +16 -0
- package/api-services/modules/iot/index.js +2841 -0
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.d.ts +3 -0
- package/api-services/modules/justauth/index.js +2828 -0
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.d.ts +2 -0
- package/api-services/modules/knowledge/index.js +2827 -0
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.d.ts +2 -0
- package/api-services/modules/link/index.js +2827 -0
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.d.ts +2 -0
- package/api-services/modules/permission/index.js +2827 -0
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.d.ts +14 -0
- package/api-services/modules/platformManage/index.js +2835 -0
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.d.ts +2 -0
- package/api-services/modules/portal/index.js +2827 -0
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.d.ts +2 -0
- package/api-services/modules/space-manage/index.js +2827 -0
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.d.ts +8 -0
- package/api-services/modules/super-admin/index.js +2830 -0
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.d.ts +6 -0
- package/api-services/modules/supplier/index.js +2829 -0
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.d.ts +2 -0
- package/api-services/modules/supplychain-manage/index.js +2827 -0
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.d.ts +2 -0
- package/api-services/modules/systemConfiguration/index.js +2827 -0
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.d.ts +2 -0
- package/api-services/modules/tool/index.js +2827 -0
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.d.ts +1 -0
- package/api-services/src/create-service/index.js +2827 -0
- package/api-services/src/create-service/index.js.gz +0 -0
- package/atob/index.d.ts +2 -0
- package/atob/index.js +11 -0
- package/common-info/getIframeUrl/index.d.ts +9 -0
- package/common-info/getIframeUrl/index.js +10 -0
- package/common-info/getInfoFromUrl/index.d.ts +8 -0
- package/common-info/getInfoFromUrl/index.js +84 -0
- package/common-info/getInfoFromUrl/index.js.gz +0 -0
- package/common-info/index.d.ts +61 -0
- package/common-info/index.js +171 -0
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/index.d.ts +5 -0
- package/common-info/set-personal-info/index.js +1474 -0
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-info/type.d.ts +214 -0
- package/common-tools/arr-tools/index.d.ts +15 -0
- package/common-tools/arr-tools/index.js +8 -0
- package/common-tools/calc-text-width/index.d.ts +1 -0
- package/common-tools/calc-text-width/index.js +10 -0
- package/common-tools/date-format/index.d.ts +7 -0
- package/common-tools/date-format/index.js +19 -0
- package/common-tools/extract-file-name/index.d.ts +1 -0
- package/common-tools/extract-file-name/index.js +1466 -0
- package/common-tools/extract-file-name/index.js.gz +0 -0
- package/common-tools/get-file-extension/index.d.ts +6 -0
- package/common-tools/get-file-extension/index.js +7 -0
- package/common-tools/get-url-params/index.d.ts +46 -0
- package/common-tools/get-url-params/index.js +63 -0
- package/common-tools/get-url-params/index.js.gz +0 -0
- package/common-tools/handle-data/index.d.ts +6 -0
- package/common-tools/handle-data/index.js +4 -0
- package/common-tools/index.d.ts +14 -0
- package/common-tools/index.js +14 -0
- package/common-tools/nest-tree-format/index.d.ts +30 -0
- package/common-tools/nest-tree-format/index.js +24 -0
- package/common-tools/obj-tools/index.d.ts +7 -0
- package/common-tools/obj-tools/index.js +14 -0
- package/common-tools/platform-tools/index.d.ts +19 -0
- package/common-tools/platform-tools/index.js +19 -0
- package/common-tools/queue-promise/index.d.ts +6 -0
- package/common-tools/queue-promise/index.js +9 -0
- package/common-tools/setHtmlMinWH/index.d.ts +5 -0
- package/common-tools/setHtmlMinWH/index.js +7 -0
- package/common-tools/update-browser-title/index.d.ts +1 -0
- package/common-tools/update-browser-title/index.js +12 -0
- package/common-tools/update-fav-icon/index.d.ts +11 -0
- package/common-tools/update-fav-icon/index.js +22 -0
- package/config/index.d.ts +2 -0
- package/config/index.js +9 -0
- package/create-api-service/i18n/index.d.ts +33 -0
- package/create-api-service/i18n/index.js +15 -0
- package/create-api-service/index.d.ts +3 -0
- package/create-api-service/index.js +2827 -0
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/proxy-sso/index.d.ts +3 -0
- package/create-api-service/proxy-sso/index.js +21 -0
- package/create-api-service/sso/index.d.ts +21 -0
- package/create-api-service/sso/index.js +1845 -0
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/index.d.ts +12 -0
- package/curring-http/index.js +2002 -0
- package/curring-http/index.js.gz +0 -0
- package/curring-http/type.d.ts +89 -0
- package/dimple-canvas/index.d.ts +3 -0
- package/dimple-canvas/index.js +5 -0
- package/directive/auth/index.d.ts +8 -0
- package/directive/auth/index.js +62 -0
- package/directive/auth/index.js.gz +0 -0
- package/directive/clickOutside/index.d.ts +6 -0
- package/directive/clickOutside/index.js +27 -0
- package/directive/hoverInside/index.d.ts +6 -0
- package/directive/hoverInside/index.js +21 -0
- package/directive/index.d.ts +3 -0
- package/directive/index.js +8 -0
- package/directive/utils/index.d.ts +7 -0
- package/directive/utils/index.js +7 -0
- package/dom-check-in/index.d.ts +6 -0
- package/dom-check-in/index.js +8 -0
- package/dom-watcher/index.d.ts +25 -0
- package/dom-watcher/index.js +9 -0
- package/esm-map.json +146 -0
- package/hooks/popup-manager/use-zindex/index.d.ts +3 -0
- package/hooks/popup-manager/use-zindex/index.js +9 -0
- package/hooks/use-get-auth/apis.d.ts +4 -0
- package/hooks/use-get-auth/index.d.ts +9 -0
- package/hooks/use-get-auth/index.js +53 -0
- package/hooks/use-get-auth/index.js.gz +0 -0
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/load-js/index.d.ts +3 -0
- package/load-js/index.js +12 -0
- package/nextTiken/index.d.ts +12 -0
- package/nextTiken/index.js +45 -0
- package/nextTiken/index.js.gz +0 -0
- package/oss/index.d.ts +2 -0
- package/oss/index.js +11 -0
- package/package.json +49 -0
- package/pinyin-first-character/index.d.ts +2 -0
- package/pinyin-first-character/index.js +25022 -0
- package/pinyin-first-character/index.js.gz +0 -0
- package/process-engine-info/index.d.ts +13 -0
- package/process-engine-info/index.js +15 -0
- package/pure-image-src/index.d.ts +2 -0
- package/pure-image-src/index.js +4 -0
- package/size-watcher/index.d.ts +6 -0
- package/size-watcher/index.js +20 -0
- package/style/index.d.ts +2 -0
- package/style/index.js +70 -0
- package/style/index.js.gz +0 -0
- package/style/math.d.ts +9 -0
- package/style/style.d.ts +31 -0
- package/token-tools/index.d.ts +21 -0
- package/token-tools/index.js +11 -0
- package/use-low-code/index.d.ts +1 -0
- package/use-low-code/index.js +69 -0
- package/use-low-code/index.js.gz +0 -0
- package/use-low-code/low-code-iframe.vue.d.ts +2 -0
- package/use-low-code/style.css +1 -0
- package/vue/hooks/use-model-value/index.d.ts +9 -0
- package/vue/hooks/use-model-value/index.js +10 -0
- package/vue/index.d.ts +1 -0
- package/vue/index.js +4 -0
- package/webSocket-service/index.d.ts +41 -0
- package/webSocket-service/index.js +83 -0
- package/webSocket-service/index.js.gz +0 -0
- package/webSocket-service/type.d.ts +28 -0
- package/with-install/index.d.ts +11 -0
- package/with-install/index.js +6 -0
|
Binary file
|
package/atob/index.d.ts
ADDED
package/atob/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type pageType = 'editor' | 'editor3d' | 'editor2d3d' | 'preview' | 'preview3d';
|
|
2
|
+
/**
|
|
3
|
+
* 编辑器的路径和预览图纸的路径
|
|
4
|
+
* @param page 'editor' | 'editor3d' | 'editor2d3d' | 'preview' | 'preview3d'
|
|
5
|
+
* @param query 路由参数location.search
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare const getIframeUrl: (page: pageType, query?: Record<any, any>) => any;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getFullPath as n } from "@das-fed/upf-utils/common-tools";
|
|
2
|
+
const l = (r, t) => {
|
|
3
|
+
if (!r) return;
|
|
4
|
+
let e = {};
|
|
5
|
+
const i = "enterpriseadmin/iocvisual";
|
|
6
|
+
return (r === "preview" || r === "preview3d") && (e = { showLayout: !1 }), n("/" + i + "/" + r, { ...e, ...t });
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
l as getIframeUrl
|
|
10
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/*! js-cookie v3.0.5 | MIT */
|
|
2
|
+
function a(e) {
|
|
3
|
+
for (var o = 1; o < arguments.length; o++) {
|
|
4
|
+
var t = arguments[o];
|
|
5
|
+
for (var s in t)
|
|
6
|
+
e[s] = t[s];
|
|
7
|
+
}
|
|
8
|
+
return e;
|
|
9
|
+
}
|
|
10
|
+
var u = {
|
|
11
|
+
read: function(e) {
|
|
12
|
+
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
13
|
+
},
|
|
14
|
+
write: function(e) {
|
|
15
|
+
return encodeURIComponent(e).replace(
|
|
16
|
+
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
17
|
+
decodeURIComponent
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
function g(e, o) {
|
|
22
|
+
function t(n, f, r) {
|
|
23
|
+
if (!(typeof document > "u")) {
|
|
24
|
+
r = a({}, o, r), typeof r.expires == "number" && (r.expires = new Date(Date.now() + r.expires * 864e5)), r.expires && (r.expires = r.expires.toUTCString()), n = encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
25
|
+
var c = "";
|
|
26
|
+
for (var i in r)
|
|
27
|
+
r[i] && (c += "; " + i, r[i] !== !0 && (c += "=" + r[i].split(";")[0]));
|
|
28
|
+
return document.cookie = n + "=" + e.write(f, n) + c;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function s(n) {
|
|
32
|
+
if (!(typeof document > "u" || arguments.length && !n)) {
|
|
33
|
+
for (var f = document.cookie ? document.cookie.split("; ") : [], r = {}, c = 0; c < f.length; c++) {
|
|
34
|
+
var i = f[c].split("="), d = i.slice(1).join("=");
|
|
35
|
+
try {
|
|
36
|
+
var p = decodeURIComponent(i[0]);
|
|
37
|
+
if (r[p] = e.read(d, p), n === p)
|
|
38
|
+
break;
|
|
39
|
+
} catch {
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return n ? r[n] : r;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return Object.create(
|
|
46
|
+
{
|
|
47
|
+
set: t,
|
|
48
|
+
get: s,
|
|
49
|
+
remove: function(n, f) {
|
|
50
|
+
t(
|
|
51
|
+
n,
|
|
52
|
+
"",
|
|
53
|
+
a({}, f, {
|
|
54
|
+
expires: -1
|
|
55
|
+
})
|
|
56
|
+
);
|
|
57
|
+
},
|
|
58
|
+
withAttributes: function(n) {
|
|
59
|
+
return g(this.converter, a({}, this.attributes, n));
|
|
60
|
+
},
|
|
61
|
+
withConverter: function(n) {
|
|
62
|
+
return g(a({}, this.converter, n), this.attributes);
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
attributes: { value: Object.freeze(o) },
|
|
67
|
+
converter: { value: Object.freeze(e) }
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
var h = g(u, { path: "/" });
|
|
72
|
+
const v = () => {
|
|
73
|
+
const e = new URL(location.href).searchParams, o = e.get("token") || e.get("accessToken") || e.get("accesstoken") || "";
|
|
74
|
+
o && (JSON.stringify({ access_token: o }), h.set("accessToken", o));
|
|
75
|
+
}, I = () => {
|
|
76
|
+
const e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}"), o = new URL(location.href).searchParams, t = o.get("project") || o.get("projectId") || "";
|
|
77
|
+
if (!t) return;
|
|
78
|
+
const s = o.get("projectParent") || o.get("projectParentId") || (e == null ? void 0 : e.parentId) || "", n = o.get("projectName") || (e == null ? void 0 : e.name) || "";
|
|
79
|
+
sessionStorage.setItem("project", t), sessionStorage.setItem("projectInfo", JSON.stringify({ ...e, id: t, name: n, parentId: s }));
|
|
80
|
+
};
|
|
81
|
+
export {
|
|
82
|
+
I as getProjectInfoFromQuery,
|
|
83
|
+
v as getTokenFromQuery
|
|
84
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { UserInfo, PersonalInfo, TenantInfo, HomeInfo, PersonalConfigInfo, ProjectInfo, ProjectMessage, SubAppsInfo, TabInfo, permissionBtnInfo } from './type';
|
|
2
|
+
|
|
3
|
+
/** 获取token */
|
|
4
|
+
export declare const getToken: any;
|
|
5
|
+
/** 获取账户详情 */
|
|
6
|
+
export declare const getUserInfo: () => UserInfo;
|
|
7
|
+
/** 获取用户详情 */
|
|
8
|
+
export declare const getPersonalInfo: () => PersonalInfo;
|
|
9
|
+
/** 获取当前租户详情 */
|
|
10
|
+
export declare const getTenantInfo: () => TenantInfo;
|
|
11
|
+
/** 获取当前租户设置了多少个语言类型 */
|
|
12
|
+
export declare const getLanguages: () => any;
|
|
13
|
+
/**
|
|
14
|
+
* 获取项目信息
|
|
15
|
+
* @returns 项目信息
|
|
16
|
+
*/
|
|
17
|
+
export declare const getProjectInfo: () => ProjectInfo;
|
|
18
|
+
/**
|
|
19
|
+
* 获取项目信息
|
|
20
|
+
* @returns 项目信息
|
|
21
|
+
*/
|
|
22
|
+
export declare const getProjectMessage: () => ProjectMessage;
|
|
23
|
+
/** 获取首页信息 */
|
|
24
|
+
export declare const getHomeInfo: () => HomeInfo;
|
|
25
|
+
export declare const getPersonalConfig: () => PersonalConfigInfo;
|
|
26
|
+
/**
|
|
27
|
+
* 可用于判断菜单或者按钮权限
|
|
28
|
+
* @param menuCode 菜单编码
|
|
29
|
+
* @param applicationCode 应用编码
|
|
30
|
+
* @returns 无菜单权限返回undefined,有菜单权限但是没有任何按钮权限返回空数组
|
|
31
|
+
*/
|
|
32
|
+
export declare const getPageAuth: (menuCode?: string, applicationCode?: string) => undefined | any[];
|
|
33
|
+
/**
|
|
34
|
+
* 获取指定菜单的按钮权限数据
|
|
35
|
+
* @param menuCode 菜单编码
|
|
36
|
+
* @param applicationCode 应用编码
|
|
37
|
+
* @returns
|
|
38
|
+
*/
|
|
39
|
+
export declare const getPageAuthBtn: (menuCode?: string, applicationCode?: string) => permissionBtnInfo;
|
|
40
|
+
/**
|
|
41
|
+
* 获取应用信息
|
|
42
|
+
* @returns 应用信息
|
|
43
|
+
*/
|
|
44
|
+
export declare const getSubApps: () => SubAppsInfo;
|
|
45
|
+
/**
|
|
46
|
+
* 获取指定应用的菜单数据;支持不传入appCode获取所有菜单
|
|
47
|
+
* @param appCode 应用编码
|
|
48
|
+
* @param origin 是否获取原始菜单数据
|
|
49
|
+
* @returns
|
|
50
|
+
*/
|
|
51
|
+
export declare const getMenus: (appCode?: string, origin?: boolean) => any;
|
|
52
|
+
/** 获取tabs标签页 */
|
|
53
|
+
export declare const getTabInfo: () => TabInfo;
|
|
54
|
+
/** 获取minio地址 */
|
|
55
|
+
export declare const getMinioAddress: () => any;
|
|
56
|
+
/** 获取iot instanceinfo */
|
|
57
|
+
export declare const getInstanceInfo: () => {
|
|
58
|
+
instanceInfo: any;
|
|
59
|
+
};
|
|
60
|
+
/** 获取favIcon */
|
|
61
|
+
export declare const getFavIcon: () => any;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { getConfig as u } from "@das-fed/upf-utils/config";
|
|
2
|
+
import { getUrlParams as d } from "@das-fed/upf-utils/common-tools";
|
|
3
|
+
import { getAccessToken as I } from "@das-fed/upf-utils/token-tools";
|
|
4
|
+
import { getTokenFromQuery as S, getProjectInfoFromQuery as y } from "@das-fed/upf-utils/common-info/getInfoFromUrl";
|
|
5
|
+
const N = I, A = () => {
|
|
6
|
+
var r;
|
|
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: ((r = e == null ? void 0 : e.tenant) == null ? void 0 : r.id) ?? ""
|
|
13
|
+
};
|
|
14
|
+
}, J = () => {
|
|
15
|
+
let e = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
|
|
16
|
+
const t = u();
|
|
17
|
+
return JSON.stringify(e) === "{}" && t.personalInfo && (e = t.personalInfo), {
|
|
18
|
+
id: e.id ?? "",
|
|
19
|
+
name: e.name ?? "",
|
|
20
|
+
userName: e.userName ?? "",
|
|
21
|
+
phone: e.phone ?? "",
|
|
22
|
+
email: e.email ?? "",
|
|
23
|
+
headPicture: e.headPicture ?? ""
|
|
24
|
+
};
|
|
25
|
+
}, O = () => {
|
|
26
|
+
let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
|
|
27
|
+
return {
|
|
28
|
+
userId: e.id ?? "",
|
|
29
|
+
userName: e.userName ?? "",
|
|
30
|
+
name: e.name ?? "",
|
|
31
|
+
areaCode: e.areaCode ?? "",
|
|
32
|
+
region: e.region ?? "",
|
|
33
|
+
phone: e.phone ?? "",
|
|
34
|
+
email: e.email ?? "",
|
|
35
|
+
flag: e.flag ?? null,
|
|
36
|
+
tenant: e.tenant ?? {},
|
|
37
|
+
headPicture: e.headPicture ?? "",
|
|
38
|
+
nickName: e.nickName ?? "",
|
|
39
|
+
gender: e.gender ?? null,
|
|
40
|
+
status: e.status ?? null,
|
|
41
|
+
statusName: e.statusName ?? null,
|
|
42
|
+
tags: e.tags ?? [],
|
|
43
|
+
type: e.type ?? null,
|
|
44
|
+
address: e.address ?? "",
|
|
45
|
+
description: e.description ?? ""
|
|
46
|
+
};
|
|
47
|
+
}, M = () => sessionStorage.getItem("languages"), C = () => {
|
|
48
|
+
let e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}");
|
|
49
|
+
const t = u();
|
|
50
|
+
return JSON.stringify(e) === "{}" && t.projectInfo && (e = t.projectInfo), {
|
|
51
|
+
id: (e == null ? void 0 : e.id) ?? 0,
|
|
52
|
+
code: (e == null ? void 0 : e.code) ?? 0,
|
|
53
|
+
name: (e == null ? void 0 : e.name) ?? "",
|
|
54
|
+
type: (e == null ? void 0 : e.type) ?? null,
|
|
55
|
+
parentId: (e == null ? void 0 : e.parentId) ?? "",
|
|
56
|
+
parentName: (e == null ? void 0 : e.parentName) ?? "",
|
|
57
|
+
parentType: (e == null ? void 0 : e.parentType) ?? null,
|
|
58
|
+
tenantId: (e == null ? void 0 : e.tenant) ?? "",
|
|
59
|
+
isParent: (e == null ? void 0 : e.isParent) ?? !1,
|
|
60
|
+
leaf: (e == null ? void 0 : e.leaf) ?? !1,
|
|
61
|
+
optional: (e == null ? void 0 : e.leaf) ?? !0
|
|
62
|
+
};
|
|
63
|
+
}, v = () => {
|
|
64
|
+
let e = JSON.parse(sessionStorage.getItem("project-message") || "{}");
|
|
65
|
+
return {
|
|
66
|
+
id: (e == null ? void 0 : e.id) ?? 0,
|
|
67
|
+
projectName: (e == null ? void 0 : e.projectName) ?? "",
|
|
68
|
+
provinceCode: (e == null ? void 0 : e.provinceCode) ?? "",
|
|
69
|
+
cityCode: (e == null ? void 0 : e.cityCode) ?? "",
|
|
70
|
+
areaCode: (e == null ? void 0 : e.areaCode) ?? "",
|
|
71
|
+
address: (e == null ? void 0 : e.address) ?? "",
|
|
72
|
+
projectDesc: (e == null ? void 0 : e.projectDesc) ?? "",
|
|
73
|
+
logoPath: (e == null ? void 0 : e.logoPath) ?? "",
|
|
74
|
+
projectType: (e == null ? void 0 : e.projectType) ?? "",
|
|
75
|
+
projectTypeCode: (e == null ? void 0 : e.projectTypeCode) ?? "",
|
|
76
|
+
longitude: (e == null ? void 0 : e.longitude) ?? "",
|
|
77
|
+
latitude: (e == null ? void 0 : e.latitude) ?? "",
|
|
78
|
+
projectStartDate: (e == null ? void 0 : e.projectStartDate) ?? "",
|
|
79
|
+
projectExpiryDate: (e == null ? void 0 : e.projectExpiryDate) ?? "",
|
|
80
|
+
projectCode: (e == null ? void 0 : e.projectCode) ?? "",
|
|
81
|
+
mapConfiguration: (e == null ? void 0 : e.mapConfiguration) ?? !1,
|
|
82
|
+
cityName: (e == null ? void 0 : e.cityName) ?? "",
|
|
83
|
+
cityNamePinyin: (e == null ? void 0 : e.cityNamePinyin) ?? "",
|
|
84
|
+
timezone: (e == null ? void 0 : e.timezone) ?? "",
|
|
85
|
+
autoTimezone: (e == null ? void 0 : e.autoTimezone) ?? !1,
|
|
86
|
+
currency: (e == null ? void 0 : e.currency) ?? {}
|
|
87
|
+
};
|
|
88
|
+
}, f = () => {
|
|
89
|
+
const e = JSON.parse(sessionStorage.getItem("home-config") || "{}");
|
|
90
|
+
return {
|
|
91
|
+
applicationCode: (e == null ? void 0 : e.applicationCode) ?? "",
|
|
92
|
+
applicationPath: (e == null ? void 0 : e.applicationPath) ?? "",
|
|
93
|
+
enable: (e == null ? void 0 : e.enable) ?? !1,
|
|
94
|
+
originalCode: (e == null ? void 0 : e.originalCode) ?? "",
|
|
95
|
+
routeUrl: (e == null ? void 0 : e.routeUrl) ?? "",
|
|
96
|
+
displayPosition: (e == null ? void 0 : e.displayPosition) ?? 1,
|
|
97
|
+
type: (e == null ? void 0 : e.type) ?? null
|
|
98
|
+
};
|
|
99
|
+
}, k = () => {
|
|
100
|
+
const e = JSON.parse(sessionStorage.getItem("personal-config") || "{}");
|
|
101
|
+
return {
|
|
102
|
+
style: (e == null ? void 0 : e.style) ?? "",
|
|
103
|
+
skinStyle: (e == null ? void 0 : e.skinStyle) ?? ""
|
|
104
|
+
};
|
|
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 = () => {
|
|
115
|
+
const e = JSON.parse(sessionStorage.getItem("subApps") || "{}");
|
|
116
|
+
return {
|
|
117
|
+
appcategorys: e.appcategorys ?? [],
|
|
118
|
+
currentSubApp: e.currentSubApp ?? {},
|
|
119
|
+
currentSubAppCode: e.currentSubAppCode ?? "",
|
|
120
|
+
subAppList: e.subAppList ?? [],
|
|
121
|
+
menuCollapses: e.menuCollapses ?? []
|
|
122
|
+
};
|
|
123
|
+
}, U = (e, t = !1) => {
|
|
124
|
+
var a, o;
|
|
125
|
+
const r = m().subAppList;
|
|
126
|
+
if (e)
|
|
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) ?? [];
|
|
128
|
+
{
|
|
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;
|
|
135
|
+
}
|
|
136
|
+
}, E = () => {
|
|
137
|
+
const e = JSON.parse(sessionStorage.getItem("tabs") || "{}");
|
|
138
|
+
return {
|
|
139
|
+
currentCode: e.currentCode ?? "",
|
|
140
|
+
currentTab: e.currentTab ?? {},
|
|
141
|
+
tabMap: e.tabMap ?? {},
|
|
142
|
+
preTab: e.preTab ?? {}
|
|
143
|
+
};
|
|
144
|
+
}, z = () => {
|
|
145
|
+
const e = u(), t = sessionStorage.getItem("minioAddress");
|
|
146
|
+
return t || (e.baseURL ? e.baseURL : location.origin);
|
|
147
|
+
}, x = () => ({
|
|
148
|
+
instanceInfo: JSON.parse(sessionStorage.getItem("instance") || "{}").instanceInfo ?? {}
|
|
149
|
+
}), F = () => localStorage.getItem("fav-icon") || "./logo.svg";
|
|
150
|
+
N() || S();
|
|
151
|
+
var i;
|
|
152
|
+
(i = C()) != null && i.id || y();
|
|
153
|
+
export {
|
|
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,
|
|
168
|
+
O as getTenantInfo,
|
|
169
|
+
N as getToken,
|
|
170
|
+
A as getUserInfo
|
|
171
|
+
};
|
|
Binary file
|