@das-fed/utils 6.4.0-dev.9 → 6.4.0-dev.91

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.
Files changed (106) hide show
  1. package/api-services/i18n/index.d.ts +53 -0
  2. package/api-services/i18n/index.js +27 -0
  3. package/api-services/i18n/index.js.gz +0 -0
  4. package/api-services/index.js +1290 -1640
  5. package/api-services/index.js.gz +0 -0
  6. package/api-services/modules/app-manage/index.js +1083 -1463
  7. package/api-services/modules/app-manage/index.js.gz +0 -0
  8. package/api-services/modules/authentication/index.js +1083 -1463
  9. package/api-services/modules/authentication/index.js.gz +0 -0
  10. package/api-services/modules/bems/index.js +1086 -1466
  11. package/api-services/modules/bems/index.js.gz +0 -0
  12. package/api-services/modules/contract/index.js +1083 -1463
  13. package/api-services/modules/contract/index.js.gz +0 -0
  14. package/api-services/modules/duty-manage/index.js +1087 -1467
  15. package/api-services/modules/duty-manage/index.js.gz +0 -0
  16. package/api-services/modules/enterpriseright/index.js +1083 -1463
  17. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  18. package/api-services/modules/file/index.d.ts +1 -0
  19. package/api-services/modules/file/index.js +2973 -429
  20. package/api-services/modules/file/index.js.gz +0 -0
  21. package/api-services/modules/gateway-edge/index.js +1083 -1463
  22. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  23. package/api-services/modules/index.js +1489 -1864
  24. package/api-services/modules/index.js.gz +0 -0
  25. package/api-services/modules/iot/index.d.ts +1 -0
  26. package/api-services/modules/iot/index.js +1166 -1545
  27. package/api-services/modules/iot/index.js.gz +0 -0
  28. package/api-services/modules/justauth/index.js +1084 -1464
  29. package/api-services/modules/justauth/index.js.gz +0 -0
  30. package/api-services/modules/knowledge/index.js +1083 -1463
  31. package/api-services/modules/knowledge/index.js.gz +0 -0
  32. package/api-services/modules/link/index.js +1083 -1463
  33. package/api-services/modules/link/index.js.gz +0 -0
  34. package/api-services/modules/permission/index.js +1083 -1463
  35. package/api-services/modules/permission/index.js.gz +0 -0
  36. package/api-services/modules/platformManage/index.js +1125 -1505
  37. package/api-services/modules/platformManage/index.js.gz +0 -0
  38. package/api-services/modules/portal/index.js +1083 -1463
  39. package/api-services/modules/portal/index.js.gz +0 -0
  40. package/api-services/modules/space-manage/index.js +1083 -1463
  41. package/api-services/modules/space-manage/index.js.gz +0 -0
  42. package/api-services/modules/super-admin/index.js +1085 -1465
  43. package/api-services/modules/super-admin/index.js.gz +0 -0
  44. package/api-services/modules/supplier/index.js +1114 -1494
  45. package/api-services/modules/supplier/index.js.gz +0 -0
  46. package/api-services/modules/supplychain-manage/index.js +1083 -1463
  47. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  48. package/api-services/modules/systemConfiguration/index.js +1083 -1463
  49. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  50. package/api-services/modules/tool/index.js +1083 -1463
  51. package/api-services/modules/tool/index.js.gz +0 -0
  52. package/api-services/src/create-service/index.js +1111 -1491
  53. package/api-services/src/create-service/index.js.gz +0 -0
  54. package/common-info/getInfoFromUrl/index.js.gz +0 -0
  55. package/common-info/index.d.ts +9 -3
  56. package/common-info/index.js +110 -55
  57. package/common-info/index.js.gz +0 -0
  58. package/common-info/set-personal-info/index.js +16 -12
  59. package/common-info/set-personal-info/index.js.gz +0 -0
  60. package/common-info/type.d.ts +214 -104
  61. package/common-tools/calc-text-width/index.d.ts +1 -0
  62. package/common-tools/calc-text-width/index.js +10 -0
  63. package/common-tools/extract-file-name/index.d.ts +1 -0
  64. package/common-tools/extract-file-name/index.js +1449 -0
  65. package/common-tools/extract-file-name/index.js.gz +0 -0
  66. package/common-tools/get-url-params/index.js.gz +0 -0
  67. package/common-tools/index.d.ts +3 -0
  68. package/common-tools/index.js +3 -0
  69. package/common-tools/nest-tree-format/index.d.ts +1 -1
  70. package/common-tools/nest-tree-format/index.js +15 -15
  71. package/common-tools/platform-tools/index.d.ts +2 -1
  72. package/common-tools/platform-tools/index.js +16 -11
  73. package/common-tools/setHtmlMinWH/index.js +4 -8
  74. package/common-tools/update-browser-title/index.d.ts +1 -0
  75. package/common-tools/update-browser-title/index.js +12 -0
  76. package/common-tools/update-fav-icon/index.js +15 -14
  77. package/create-api-service/i18n/index.d.ts +33 -0
  78. package/create-api-service/i18n/index.js +15 -0
  79. package/create-api-service/index.js +1111 -1491
  80. package/create-api-service/index.js.gz +0 -0
  81. package/create-api-service/sso/index.d.ts +0 -2
  82. package/create-api-service/sso/index.js +716 -620
  83. package/create-api-service/sso/index.js.gz +0 -0
  84. package/curring-http/index.js.gz +0 -0
  85. package/curring-http/type.d.ts +87 -87
  86. package/directive/auth/index.js.gz +0 -0
  87. package/directive/hoverInside/index.d.ts +1 -1
  88. package/dom-check-in/index.js +2 -2
  89. package/dom-watcher/index.d.ts +1 -1
  90. package/esm-map.json +8 -2
  91. package/hooks/popup-manager/use-zindex/index.d.ts +0 -2
  92. package/hooks/popup-manager/use-zindex/index.js +7 -20
  93. package/hooks/use-get-auth/index.js.gz +0 -0
  94. package/nextTiken/index.js.gz +0 -0
  95. package/package.json +4 -4
  96. package/pinyin-first-character/index.js +6 -1
  97. package/pinyin-first-character/index.js.gz +0 -0
  98. package/style/index.js.gz +0 -0
  99. package/token-tools/index.d.ts +6 -6
  100. package/token-tools/index.js +8 -84
  101. package/use-low-code/index.js +11 -11
  102. package/use-low-code/index.js.gz +0 -0
  103. package/use-low-code/style.css +1 -1
  104. package/webSocket-service/index.js.gz +0 -0
  105. package/webSocket-service/type.d.ts +28 -28
  106. package/token-tools/index.js.gz +0 -0
@@ -1,4 +1,4 @@
1
- import { UserInfo, PersonalInfo, TenantInfo, HomeInfo, ProjectInfo, SubAppsInfo, TabInfo, permissionBtnInfo } from './type';
1
+ import { UserInfo, PersonalInfo, TenantInfo, HomeInfo, PersonalConfigInfo, ProjectInfo, ProjectMessage, SubAppsInfo, TabInfo, permissionBtnInfo } from './type';
2
2
 
3
3
  /** 获取token */
4
4
  export declare const getToken: any;
@@ -13,15 +13,21 @@ export declare const getTenantInfo: () => TenantInfo;
13
13
  * @returns 项目信息
14
14
  */
15
15
  export declare const getProjectInfo: () => ProjectInfo;
16
+ /**
17
+ * 获取项目信息
18
+ * @returns 项目信息
19
+ */
20
+ export declare const getProjectMessage: () => ProjectMessage;
16
21
  /** 获取首页信息 */
17
22
  export declare const getHomeInfo: () => HomeInfo;
23
+ export declare const getPersonalConfig: () => PersonalConfigInfo;
18
24
  /**
19
25
  * 可用于判断菜单或者按钮权限
20
26
  * @param menuCode 菜单编码
21
27
  * @param applicationCode 应用编码
22
- * @returns undefined(无菜单权限);空数组(无按钮权限)
28
+ * @returns 无菜单权限返回undefined,有菜单权限但是没有任何按钮权限返回空数组
23
29
  */
24
- export declare const getPageAuth: (menuCode?: string, applicationCode?: string) => any;
30
+ export declare const getPageAuth: (menuCode?: string, applicationCode?: string) => undefined | any[];
25
31
  /**
26
32
  * 获取指定菜单的按钮权限数据
27
33
  * @param menuCode 菜单编码
@@ -1,48 +1,91 @@
1
- import { getConfig as i } from "@das-fed/utils/config";
2
- import { getUrlParams as p } from "@das-fed/utils/common-tools";
1
+ import { getConfig as u } from "@das-fed/utils/config";
2
+ import { getUrlParams as d } from "@das-fed/utils/common-tools";
3
3
  import { getAccessToken as I } from "@das-fed/utils/token-tools";
4
- import { getTokenFromQuery as m, getProjectInfoFromQuery as d } from "@das-fed/utils/common-info/getInfoFromUrl";
5
- const S = I, C = () => {
6
- var n;
4
+ import { getTokenFromQuery as S, getProjectInfoFromQuery as y } from "@das-fed/utils/common-info/getInfoFromUrl";
5
+ const N = I, A = () => {
6
+ var r;
7
7
  let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
8
8
  return {
9
9
  id: e.id ?? "",
10
10
  name: e.userName ?? "",
11
11
  flag: e.flag ?? null,
12
- tenantId: ((n = e == null ? void 0 : e.tenant) == null ? void 0 : n.id) ?? ""
12
+ tenantId: ((r = e == null ? void 0 : e.tenant) == null ? void 0 : r.id) ?? ""
13
13
  };
14
- }, P = () => {
14
+ }, J = () => {
15
15
  let e = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
16
- const t = i();
16
+ const t = u();
17
17
  return JSON.stringify(e) === "{}" && t.personalInfo && (e = t.personalInfo), {
18
18
  id: e.id ?? "",
19
19
  name: e.name ?? "",
20
- phone: e.phone ?? "",
21
20
  userName: e.userName ?? "",
21
+ phone: e.phone ?? "",
22
22
  email: e.email ?? "",
23
23
  headPicture: e.headPicture ?? ""
24
24
  };
25
- }, y = () => {
25
+ }, O = () => {
26
26
  let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
27
27
  return {
28
28
  userId: e.id ?? "",
29
29
  userName: e.userName ?? "",
30
30
  name: e.name ?? "",
31
31
  areaCode: e.areaCode ?? "",
32
+ region: e.region ?? "",
32
33
  phone: e.phone ?? "",
34
+ email: e.email ?? "",
33
35
  flag: e.flag ?? null,
34
- tenant: e.tenant ?? {}
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 ?? ""
35
46
  };
36
- }, b = () => {
47
+ }, C = () => {
37
48
  let e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}");
38
- const t = i();
49
+ const t = u();
39
50
  return JSON.stringify(e) === "{}" && t.projectInfo && (e = t.projectInfo), {
40
51
  id: (e == null ? void 0 : e.id) ?? 0,
41
- parentId: (e == null ? void 0 : e.parentId) ?? "",
52
+ code: (e == null ? void 0 : e.code) ?? 0,
42
53
  name: (e == null ? void 0 : e.name) ?? "",
43
- tenantId: (e == null ? void 0 : e.tenant) ?? ""
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
44
62
  };
45
63
  }, M = () => {
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
+ }, v = () => {
46
89
  const e = JSON.parse(sessionStorage.getItem("home-config") || "{}");
47
90
  return {
48
91
  applicationCode: (e == null ? void 0 : e.applicationCode) ?? "",
@@ -50,37 +93,47 @@ const S = I, C = () => {
50
93
  enable: (e == null ? void 0 : e.enable) ?? !1,
51
94
  originalCode: (e == null ? void 0 : e.originalCode) ?? "",
52
95
  routeUrl: (e == null ? void 0 : e.routeUrl) ?? "",
96
+ displayPosition: (e == null ? void 0 : e.displayPosition) ?? 1,
53
97
  type: (e == null ? void 0 : e.type) ?? null
54
98
  };
55
- }, h = (e, t) => {
56
- const n = "permission-btn", s = f(), a = p(location.href, "app") || "", o = t || a || s.currentSubAppCode;
57
- if (!o) return;
58
- const r = p(location.href, "menu") || "", g = e || r || s.currentSubApp.currentMenuCode, c = JSON.parse(sessionStorage.getItem(n) || "{}");
99
+ }, f = () => {
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) || "{}");
59
110
  if (!c || JSON.stringify(c) === "{}") return;
60
- const u = c[o][g];
61
- return u && u.length ? u : c[o]["origin-auth"] ? c[o]["origin-auth"][g] ?? [] : [];
62
- }, T = (e, t) => h(e, t) ?? [], f = () => {
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
+ }, k = (e, t) => j(e, t) ?? [], m = () => {
63
115
  const e = JSON.parse(sessionStorage.getItem("subApps") || "{}");
64
116
  return {
65
117
  appcategorys: e.appcategorys ?? [],
66
118
  currentSubApp: e.currentSubApp ?? {},
67
119
  currentSubAppCode: e.currentSubAppCode ?? "",
68
- subAppList: e.subAppList ?? []
120
+ subAppList: e.subAppList ?? [],
121
+ menuCollapses: e.menuCollapses ?? []
69
122
  };
70
- }, j = (e, t = !1) => {
71
- var s, a;
72
- const n = f().subAppList;
123
+ }, D = (e, t = !1) => {
124
+ var a, o;
125
+ const r = m().subAppList;
73
126
  if (e)
74
- return t ? ((s = n == null ? void 0 : n.find((o) => o.code === e)) == null ? void 0 : s.originalMenus) ?? [] : ((a = n == null ? void 0 : n.find((o) => o.code === e)) == null ? void 0 : a.menus) ?? [];
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) ?? [];
75
128
  {
76
- let o = {};
77
- return t ? n == null || n.forEach((r) => {
78
- o[r.code] = r.originalMenus ?? [];
79
- }) : n == null || n.forEach((r) => {
80
- o[r.code] = r.menus ?? [];
81
- }), o;
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;
82
135
  }
83
- }, v = () => {
136
+ }, U = () => {
84
137
  const e = JSON.parse(sessionStorage.getItem("tabs") || "{}");
85
138
  return {
86
139
  currentCode: e.currentCode ?? "",
@@ -88,28 +141,30 @@ const S = I, C = () => {
88
141
  tabMap: e.tabMap ?? {},
89
142
  preTab: e.preTab ?? {}
90
143
  };
91
- }, U = () => {
92
- const e = i(), t = sessionStorage.getItem("minioAddress");
144
+ }, E = () => {
145
+ const e = u(), t = sessionStorage.getItem("minioAddress");
93
146
  return t || (e.baseURL ? e.baseURL : location.origin);
94
- }, k = () => ({
147
+ }, z = () => ({
95
148
  instanceInfo: JSON.parse(sessionStorage.getItem("instance") || "{}").instanceInfo ?? {}
96
- }), E = () => localStorage.getItem("fav-icon") || "";
97
- S() || m();
98
- var l;
99
- (l = b()) != null && l.id || d();
149
+ }), x = () => localStorage.getItem("fav-icon") || "./logo.svg";
150
+ N() || S();
151
+ var i;
152
+ (i = C()) != null && i.id || y();
100
153
  export {
101
- E as getFavIcon,
102
- M as getHomeInfo,
103
- k as getInstanceInfo,
104
- j as getMenus,
105
- U as getMinioAddress,
106
- h as getPageAuth,
107
- T as getPageAuthBtn,
108
- P as getPersonalInfo,
109
- b as getProjectInfo,
110
- f as getSubApps,
111
- v as getTabInfo,
112
- y as getTenantInfo,
113
- S as getToken,
114
- C as getUserInfo
154
+ x as getFavIcon,
155
+ v as getHomeInfo,
156
+ z as getInstanceInfo,
157
+ D as getMenus,
158
+ E as getMinioAddress,
159
+ j as getPageAuth,
160
+ k as getPageAuthBtn,
161
+ f as getPersonalConfig,
162
+ J as getPersonalInfo,
163
+ C as getProjectInfo,
164
+ M as getProjectMessage,
165
+ m as getSubApps,
166
+ U as getTabInfo,
167
+ O as getTenantInfo,
168
+ N as getToken,
169
+ A as getUserInfo
115
170
  };
Binary file
@@ -1430,20 +1430,24 @@ y.getAdapter = Fe.getAdapter;
1430
1430
  y.HttpStatusCode = v;
1431
1431
  y.default = y;
1432
1432
  const Zt = async (e) => {
1433
- var r;
1433
+ var n;
1434
1434
  const t = {
1435
1435
  personalInfo: "/api/personal-center/personal-server/v1/info"
1436
- }, n = await y.create().get(t.personalInfo, {
1437
- baseURL: Ue().baseURL,
1438
- params: {
1439
- project: (r = Le()) == null ? void 0 : r.id,
1440
- timestamp: (/* @__PURE__ */ new Date()).getTime()
1441
- },
1442
- headers: {
1443
- Authorization: `Bearer ${e}`
1444
- }
1445
- });
1446
- n != null && n.data && sessionStorage.setItem("userInfo", JSON.stringify(n.data));
1436
+ };
1437
+ try {
1438
+ const r = await y.create().get(t.personalInfo, {
1439
+ baseURL: Ue().baseURL,
1440
+ params: {
1441
+ project: (n = Le()) == null ? void 0 : n.id,
1442
+ timestamp: (/* @__PURE__ */ new Date()).getTime()
1443
+ },
1444
+ headers: {
1445
+ Authorization: `Bearer ${e}`
1446
+ }
1447
+ });
1448
+ r != null && r.data && sessionStorage.setItem("userInfo", JSON.stringify(r.data));
1449
+ } catch {
1450
+ }
1447
1451
  };
1448
1452
  export {
1449
1453
  Zt as setPersonalInfo
@@ -1,104 +1,214 @@
1
- export interface UserInfo {
2
- /** 用户id */
3
- id: string
4
- /** 用户名称 */
5
- name: string
6
- /** 用户标识 2 - B端身份, 4 - C 端身份, 6 - B+C 端身份 */
7
- flag: number
8
- /** 租户id */
9
- tenantId: string
10
- }
11
-
12
- export interface PersonalInfo {
13
- /** id */
14
- id: string
15
- /** 名称 */
16
- name: string
17
- /** 手机号 */
18
- phone: string
19
- /** 用户名称 */
20
- userName: string
21
- /** 邮箱 */
22
- email: string
23
- /** 头像 */
24
- headPicture: string
25
- }
26
-
27
- export interface TenantInfo {
28
- /** 用户ID */
29
- userId: string
30
- /** 用户名 */
31
- userName: string
32
- name: string
33
- /** 租户信息 */
34
- tenant: {
35
- id: string
36
- name: string
37
- adminUserId: string
38
- description: string
39
- domain: string
40
- }
41
- /** 用户标识 2 - B端身份, 4 - C 端身份, 6 - B+C 端身份 */
42
- flag: number
43
- areaCode: string
44
- /** 手机号 */
45
- phone: string
46
- }
47
-
48
- export interface HomeInfo {
49
- applicationCode: string
50
- applicationPath: string
51
- enable: boolean
52
- originalCode: string
53
- routeUrl: string
54
- type: number | null
55
- }
56
-
57
- export interface ProjectInfo {
58
- /** 项目id */
59
- id: string | number
60
- /** 父级id */
61
- parentId?: string
62
- /** 项目名称 */
63
- name: string
64
- /** 租户id */
65
- tenantId?: string
66
- }
67
-
68
- export interface SubAppsInfo {
69
- /** 所有应用信息 */
70
- appcategorys?: any[]
71
- /** 当前应用完整信息 */
72
- currentSubApp?: any
73
- /** 所有应用 */
74
- flatSubAppList?: any[]
75
- /** 当前应用code */
76
- currentSubAppCode?: string
77
- /** 当前打开的应用 */
78
- subAppList?: any[]
79
- }
80
-
81
- interface TabItem {
82
- /** 当前应用url */
83
- currentApplication: string
84
- /** 当前加载的应用 */
85
- applicationPath: string
86
- applicationCode: string
87
- menuId: string
88
- name: string
89
- path: string
90
- code: string
91
- query?: any
92
- }
93
- export interface TabInfo {
94
- /** 当前tabs key */
95
- currentCode?: string
96
- /** 当前tabs */
97
- currentTab?: TabItem
98
- /** 用于记录该应用上次开启的tab */
99
- preTab?: Record<string, TabItem>
100
- /** 当前打开的tabs(微前端环境会存入) */
101
- tabMap?: Record<string, TabItem[]>
102
- }
103
-
104
- export type permissionBtnInfo = { code?: string; name?: string }[]
1
+ export interface UserInfo {
2
+ /** 用户id */
3
+ id: string
4
+ /** 用户名称 */
5
+ name: string
6
+ /** 用户标识 2 - B端身份, 4 - C 端身份, 6 - B+C 端身份 */
7
+ flag: number
8
+ /** 租户id */
9
+ tenantId: string
10
+ }
11
+
12
+ export interface PersonalInfo {
13
+ /** id */
14
+ id: string
15
+ /** 名称 */
16
+ name: string
17
+ /** 手机号 */
18
+ phone: string
19
+ /** 用户名称 */
20
+ userName: string
21
+ /** 邮箱 */
22
+ email: string
23
+ /** 头像 */
24
+ headPicture: string
25
+ }
26
+
27
+ export interface TenantInfo {
28
+ /** 用户ID */
29
+ userId: string
30
+ /** 用户名 */
31
+ userName: string
32
+ /** 用户名称 */
33
+ name: string
34
+ /** 昵称 */
35
+ nickName: string
36
+ /** 手机号 */
37
+ phone: string
38
+ /** 邮箱 */
39
+ email: string
40
+ /** 性别 1 男 2 女 */
41
+ gender: number
42
+ /** 用户状态 1 正常 2 锁定 3 禁用*/
43
+ status: number
44
+ /** 状态名称 */
45
+ statusName: string
46
+ /** 用户类型。0:普通 1:管理员 */
47
+ type: number
48
+ /** 租户信息 */
49
+ tenant: {
50
+ /** 租户ID */
51
+ id: string
52
+ /** 租户名 */
53
+ name: string
54
+ /** 域,如:qq,das */
55
+ domain: string
56
+ /** 管理员用户ID */
57
+ adminUserId: string
58
+ /** 租户描述 */
59
+ description: string
60
+ /** 是否开通三员权限管理,0表示未开通,1表示已开通。 */
61
+ thirdManaged: number
62
+ }
63
+ /** 用户标识 2 - B端身份, 4 - C 端身份, 6 - B+C 端身份 */
64
+ flag: number
65
+ /** 当前区号 */
66
+ areaCode: string
67
+ /** 地区 */
68
+ region: string
69
+ /** 地址 */
70
+ address: string
71
+ /** 描述 */
72
+ description: string
73
+
74
+ /** 头像 */
75
+ headPicture: string
76
+ /** 用户标签 */
77
+ tags: {
78
+ id: number
79
+ key: string
80
+ value: string
81
+ desc: string
82
+ }[]
83
+ }
84
+
85
+ export interface HomeInfo {
86
+ /** 应用code */
87
+ applicationCode: string
88
+ /** 应用path */
89
+ applicationPath: string
90
+ /** 是否启用 */
91
+ enable: boolean
92
+ originalCode: string
93
+ routeUrl: string
94
+ /** 首页展示位置 1在应用中心左侧 2在应用中心右侧 */
95
+ displayPosition: 1 | 2
96
+ type: number | null
97
+ }
98
+
99
+ export interface PersonalConfigInfo {
100
+ /** 侧边栏菜单风格(1:弹出式;2:内嵌式 )*/
101
+ style: 1 | 2
102
+ /** 皮肤风格 (default:默认皮肤;kjl:科技蓝;cjb:纯净白;ssl:深邃蓝)*/
103
+ skinStyle: 'default' | 'kjl' | 'cjb' | 'ssl'
104
+ }
105
+
106
+ export interface ProjectInfo {
107
+ /** 项目id */
108
+ id: string
109
+ /** 项目编码 */
110
+ code: string
111
+ /** 项目名称 */
112
+ name: string
113
+ /** 项目类型: 1: 集团、 2:公司、3: 区域、4: 分公司、 5: 子公司、6: 管理中心、 7: 项目、8: 部门、 9: 组 */
114
+ type: string
115
+ /** 父级id */
116
+ parentId?: string
117
+ /** 父级名称 */
118
+ parentName?: string
119
+ /** 父级项目类型:1: 集团、 2:公司、3: 区域、4: 分公司、 5: 子公司、6: 管理中心、 7: 项目、8: 部门、 9: 组 */
120
+ parentType?: number
121
+ /** 租户id */
122
+ tenantId?: string
123
+ /** 是否父级节点 */
124
+ isParent?: boolean
125
+ /** 是否叶子节点 */
126
+ leaf?: boolean
127
+ /** 是否可用 */
128
+ optional?: boolean
129
+ }
130
+
131
+ export interface ProjectMessage {
132
+ /** 主键id */
133
+ id: number | string
134
+ /** 项目名称 */
135
+ projectName: string
136
+ /** 省级(省份、直辖市、自治区)编码 */
137
+ provinceCode: string
138
+ /** 地级(城市)编码 */
139
+ cityCode: string
140
+ /** 县级(区县)编码 */
141
+ areaCode: string
142
+ /** 详细位置 */
143
+ address: string
144
+ /** 项目简介 */
145
+ projectDesc: string
146
+ /** 项目图片路径 */
147
+ logoPath: string
148
+ /** 项目类型 */
149
+ projectType: string
150
+ /** 项目类型code */
151
+ projectTypeCode: string
152
+ /** 经度 */
153
+ longitude: string
154
+ /** 纬度 */
155
+ latitude: string
156
+ /** 项目开始时间 */
157
+ projectStartDate: string
158
+ /** 项目有效期 */
159
+ projectExpiryDate: string
160
+ /** 项目编码 */
161
+ projectCode: string
162
+ /** 地图配置是否开启 */
163
+ mapConfiguration: boolean
164
+ /** 地级(城市)名称 */
165
+ cityName: string
166
+ /** 地级(城市)名称拼音 */
167
+ cityNamePinyin: string
168
+ /** 时区ID */
169
+ timezone: string
170
+ /** 是否自动设定时区 */
171
+ autoTimezone: boolean
172
+ /** 货币信息(currencyCode:ISO 4217货币编码(例:CNY);currencyUnit:货币单位,例:元(中文),CNY(英文);currencySymbol:货币符号,例:¥) */
173
+ currency: Record<'currencyCode' | 'currencyUnit' | 'currencySymbol', string>
174
+ }
175
+
176
+ export interface SubAppsInfo {
177
+ /** 所有应用信息 */
178
+ appcategorys?: any[]
179
+ /** 当前应用完整信息 */
180
+ currentSubApp?: any
181
+ /** 所有应用 */
182
+ flatSubAppList?: any[]
183
+ /** 当前应用code */
184
+ currentSubAppCode?: string
185
+ /** 当前打开的应用 */
186
+ subAppList?: any[]
187
+ /** 当前菜单折叠的应用key集合 */
188
+ menuCollapses?: any[]
189
+ }
190
+
191
+ interface TabItem {
192
+ /** 当前应用url */
193
+ currentApplication: string
194
+ /** 当前加载的应用 */
195
+ applicationPath: string
196
+ applicationCode: string
197
+ menuId: string
198
+ name: string
199
+ path: string
200
+ code: string
201
+ query?: any
202
+ }
203
+ export interface TabInfo {
204
+ /** 当前tabs key */
205
+ currentCode?: string
206
+ /** 当前tabs */
207
+ currentTab?: TabItem
208
+ /** 用于记录该应用上次开启的tab */
209
+ preTab?: Record<string, TabItem>
210
+ /** 当前打开的tabs(微前端环境会存入) */
211
+ tabMap?: Record<string, TabItem[]>
212
+ }
213
+
214
+ export type permissionBtnInfo = { code?: string; name?: string }[]
@@ -0,0 +1 @@
1
+ export declare const calcTextWidth: (text: string, fontSize: number) => any;
@@ -0,0 +1,10 @@
1
+ const n = (t, i) => {
2
+ if (!t) return 0;
3
+ const e = document.createElement("div");
4
+ e.style.visibility = "hidden", e.style.whiteSpace = "pre", e.style.display = "inline-block", e.style.fontSize = i + "px", e.textContent = t, document.body.appendChild(e);
5
+ const d = e.offsetWidth;
6
+ return document.body.removeChild(e), d;
7
+ };
8
+ export {
9
+ n as calcTextWidth
10
+ };
@@ -0,0 +1 @@
1
+ export declare const extractFilename: (fileUrl: string) => unknown;