@das-fed/utils 6.4.0-test.2 → 6.4.0-test.20

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 (82) 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 +1051 -986
  5. package/api-services/index.js.gz +0 -0
  6. package/api-services/modules/app-manage/index.js +896 -861
  7. package/api-services/modules/app-manage/index.js.gz +0 -0
  8. package/api-services/modules/authentication/index.js +896 -861
  9. package/api-services/modules/authentication/index.js.gz +0 -0
  10. package/api-services/modules/bems/index.js +893 -858
  11. package/api-services/modules/bems/index.js.gz +0 -0
  12. package/api-services/modules/contract/index.js +896 -861
  13. package/api-services/modules/contract/index.js.gz +0 -0
  14. package/api-services/modules/duty-manage/index.js +765 -730
  15. package/api-services/modules/duty-manage/index.js.gz +0 -0
  16. package/api-services/modules/enterpriseright/index.js +896 -861
  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 +2978 -154
  20. package/api-services/modules/file/index.js.gz +0 -0
  21. package/api-services/modules/gateway-edge/index.js +896 -861
  22. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  23. package/api-services/modules/index.js +1022 -982
  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 +837 -801
  27. package/api-services/modules/iot/index.js.gz +0 -0
  28. package/api-services/modules/justauth/index.js +770 -735
  29. package/api-services/modules/justauth/index.js.gz +0 -0
  30. package/api-services/modules/knowledge/index.js +901 -866
  31. package/api-services/modules/knowledge/index.js.gz +0 -0
  32. package/api-services/modules/link/index.js +896 -861
  33. package/api-services/modules/link/index.js.gz +0 -0
  34. package/api-services/modules/permission/index.js +896 -861
  35. package/api-services/modules/permission/index.js.gz +0 -0
  36. package/api-services/modules/platformManage/index.js +768 -733
  37. package/api-services/modules/platformManage/index.js.gz +0 -0
  38. package/api-services/modules/portal/index.js +896 -861
  39. package/api-services/modules/portal/index.js.gz +0 -0
  40. package/api-services/modules/space-manage/index.js +896 -861
  41. package/api-services/modules/space-manage/index.js.gz +0 -0
  42. package/api-services/modules/super-admin/index.js +764 -729
  43. package/api-services/modules/super-admin/index.js.gz +0 -0
  44. package/api-services/modules/supplier/index.js +898 -863
  45. package/api-services/modules/supplier/index.js.gz +0 -0
  46. package/api-services/modules/supplychain-manage/index.js +896 -861
  47. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  48. package/api-services/modules/systemConfiguration/index.js +896 -861
  49. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  50. package/api-services/modules/tool/index.js +896 -861
  51. package/api-services/modules/tool/index.js.gz +0 -0
  52. package/api-services/src/create-service/index.js +764 -729
  53. package/api-services/src/create-service/index.js.gz +0 -0
  54. package/common-info/index.d.ts +9 -3
  55. package/common-info/index.js +110 -55
  56. package/common-info/index.js.gz +0 -0
  57. package/common-info/set-personal-info/index.js +16 -12
  58. package/common-info/set-personal-info/index.js.gz +0 -0
  59. package/common-info/type.d.ts +116 -6
  60. package/common-tools/calc-text-width/index.d.ts +1 -0
  61. package/common-tools/calc-text-width/index.js +10 -0
  62. package/common-tools/index.d.ts +2 -0
  63. package/common-tools/index.js +2 -0
  64. package/common-tools/nest-tree-format/index.d.ts +1 -1
  65. package/common-tools/nest-tree-format/index.js +15 -15
  66. package/common-tools/update-browser-title/index.d.ts +1 -0
  67. package/common-tools/update-browser-title/index.js +12 -0
  68. package/create-api-service/i18n/index.d.ts +33 -0
  69. package/create-api-service/i18n/index.js +15 -0
  70. package/create-api-service/index.js +764 -729
  71. package/create-api-service/index.js.gz +0 -0
  72. package/create-api-service/sso/index.d.ts +0 -2
  73. package/create-api-service/sso/index.js +716 -620
  74. package/create-api-service/sso/index.js.gz +0 -0
  75. package/directive/hoverInside/index.d.ts +1 -1
  76. package/dom-check-in/index.js +2 -2
  77. package/dom-watcher/index.d.ts +1 -1
  78. package/esm-map.json +6 -2
  79. package/package.json +4 -3
  80. package/token-tools/index.d.ts +6 -6
  81. package/token-tools/index.js +8 -84
  82. 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
@@ -29,40 +29,148 @@ export interface TenantInfo {
29
29
  userId: string
30
30
  /** 用户名 */
31
31
  userName: string
32
+ /** 用户名称 */
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
33
48
  /** 租户信息 */
34
49
  tenant: {
50
+ /** 租户ID */
35
51
  id: string
52
+ /** 租户名 */
36
53
  name: string
54
+ /** 域,如:qq,das */
55
+ domain: string
56
+ /** 管理员用户ID */
37
57
  adminUserId: string
58
+ /** 租户描述 */
38
59
  description: string
39
- domain: string
60
+ /** 是否开通三员权限管理,0表示未开通,1表示已开通。 */
61
+ thirdManaged: number
40
62
  }
41
63
  /** 用户标识 2 - B端身份, 4 - C 端身份, 6 - B+C 端身份 */
42
64
  flag: number
65
+ /** 当前区号 */
43
66
  areaCode: string
44
- /** 手机号 */
45
- phone: 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
+ }[]
46
83
  }
47
84
 
48
85
  export interface HomeInfo {
86
+ /** 应用code */
49
87
  applicationCode: string
88
+ /** 应用path */
50
89
  applicationPath: string
90
+ /** 是否启用 */
51
91
  enable: boolean
52
92
  originalCode: string
53
93
  routeUrl: string
94
+ /** 首页展示位置 1在应用中心左侧 2在应用中心右侧 */
95
+ displayPosition: 1 | 2
54
96
  type: number | null
55
97
  }
56
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
+
57
106
  export interface ProjectInfo {
58
107
  /** 项目id */
59
- id: string | number
60
- /** 父级id */
61
- parentId?: string
108
+ id: string
109
+ /** 项目编码 */
110
+ code: string
62
111
  /** 项目名称 */
63
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
64
121
  /** 租户id */
65
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>
66
174
  }
67
175
 
68
176
  export interface SubAppsInfo {
@@ -76,6 +184,8 @@ export interface SubAppsInfo {
76
184
  currentSubAppCode?: string
77
185
  /** 当前打开的应用 */
78
186
  subAppList?: any[]
187
+ /** 当前菜单折叠的应用key集合 */
188
+ menuCollapses?: any[]
79
189
  }
80
190
 
81
191
  interface TabItem {
@@ -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
+ };
@@ -8,4 +8,6 @@ export * from '@das-fed/utils/common-tools/setHtmlMinWH';
8
8
  export * from '@das-fed/utils/common-tools/queue-promise';
9
9
  export * from '@das-fed/utils/common-tools/platform-tools';
10
10
  export * from '@das-fed/utils/common-tools/update-fav-icon';
11
+ export * from '@das-fed/utils/common-tools/update-browser-title';
11
12
  export * from '@das-fed/utils/common-tools/extract-file-name';
13
+ export * from '@das-fed/utils/common-tools/calc-text-width';
@@ -8,4 +8,6 @@ export * from "@das-fed/utils/common-tools/setHtmlMinWH";
8
8
  export * from "@das-fed/utils/common-tools/queue-promise";
9
9
  export * from "@das-fed/utils/common-tools/platform-tools";
10
10
  export * from "@das-fed/utils/common-tools/update-fav-icon";
11
+ export * from "@das-fed/utils/common-tools/update-browser-title";
11
12
  export * from "@das-fed/utils/common-tools/extract-file-name";
13
+ export * from "@das-fed/utils/common-tools/calc-text-width";
@@ -27,4 +27,4 @@ export declare const filterTreeArray: (tree: any[], predicate: (node: any) => bo
27
27
  * @param func 过滤条件,符合条件的节点保留(参数为函数,返回值为布尔值)
28
28
  * @returns 查找到的节点
29
29
  */
30
- export declare const treeFind: (tree: any[], func: (node: any) => boolean) => any;
30
+ export declare const treeFind: (tree: any[], func: (node: any) => boolean, children?: string) => any;
@@ -1,24 +1,24 @@
1
- const o = (n, t = "children") => {
1
+ const s = (n, t = "children") => {
2
2
  let r = [];
3
3
  for (let e = 0; e < n.length; e++)
4
- n[e][t] && n[e][t].length > 0 && (r.push(n[e]), r = r.concat(o(n[e][t])));
4
+ n[e][t] && n[e][t].length > 0 && (r.push(n[e]), r = r.concat(s(n[e][t])));
5
5
  return r;
6
- }, c = (n, t = "children", r = !0) => Array.isArray(n) && n.length ? n.reduce((e, f) => {
7
- let l = f[t], u = { ...f };
8
- return r && delete u[t], l && l.length ? e.concat(u, c(l, t, r)) : e.concat(u);
9
- }, []) : [], s = (n, t, r = "children") => n.filter((e) => t(e)).map((e) => (e = Object.assign({}, e), e[r] && (e[r] = s(e[r], t)), e)), h = (n, t) => {
10
- for (const r of n) {
11
- if (t(r)) return r;
12
- if (r != null && r.children && r.children.length) {
13
- const e = h(r.children, t);
14
- if (e) return e;
6
+ }, l = (n, t = "children", r = !0) => Array.isArray(n) && n.length ? n.reduce((e, u) => {
7
+ let f = u[t], o = { ...u };
8
+ return r && delete o[t], f && f.length ? e.concat(o, l(f, t, r)) : e.concat(o);
9
+ }, []) : [], c = (n, t, r = "children") => n.filter((e) => t(e)).map((e) => (e = Object.assign({}, e), e[r] && (e[r] = c(e[r], t)), e)), g = (n, t, r = "children") => {
10
+ for (const e of n) {
11
+ if (t(e)) return e;
12
+ if (e != null && e[r] && e[r].length) {
13
+ const u = g(e[r], t, r = "children");
14
+ if (u) return u;
15
15
  }
16
16
  }
17
17
  return null;
18
18
  };
19
19
  export {
20
- s as filterTreeArray,
21
- o as findNonEmptyChildrenItems,
22
- c as flatTree,
23
- h as treeFind
20
+ c as filterTreeArray,
21
+ s as findNonEmptyChildrenItems,
22
+ l as flatTree,
23
+ g as treeFind
24
24
  };
@@ -0,0 +1 @@
1
+ export declare const setBrowseTitle: (defaultTitle?: string) => any;
@@ -0,0 +1,12 @@
1
+ import { systemConfiguration as l } from "@das-fed/utils/api-services/modules";
2
+ const n = async (o = "AIoT智能物联网管控平台") => {
3
+ let t = localStorage.getItem("browser-title") ?? "";
4
+ if (!t) {
5
+ const i = l.get("/visitor/appearance/with-default", (r) => (r.public = !0, r)), [s, e] = await i().run();
6
+ e != null && e.browserTitle && (t = e.browserTitle);
7
+ }
8
+ document.title = t || o;
9
+ };
10
+ export {
11
+ n as setBrowseTitle
12
+ };
@@ -0,0 +1,33 @@
1
+ declare const _default: {
2
+ 参数校验错误: {
3
+ 'zh-CN': string;
4
+ en: string;
5
+ _appCode: string;
6
+ };
7
+ 接口地址未找到: {
8
+ 'zh-CN': string;
9
+ en: string;
10
+ _appCode: string;
11
+ };
12
+ 服务器内部错误: {
13
+ 'zh-CN': string;
14
+ en: string;
15
+ _appCode: string;
16
+ };
17
+ 解析错误: {
18
+ 'zh-CN': string;
19
+ en: string;
20
+ _appCode: string;
21
+ };
22
+ 请求配置异常: {
23
+ 'zh-CN': string;
24
+ en: string;
25
+ _appCode: string;
26
+ };
27
+ '\u7F51\u7EDC\u5F02\u5E38\uFF0C\u8BF7\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u60C5\u51B5': {
28
+ 'zh-CN': string;
29
+ en: string;
30
+ _appCode: string;
31
+ };
32
+ };
33
+ export default _default;
@@ -0,0 +1,15 @@
1
+ const r = {
2
+ 参数校验错误: { "zh-CN": "参数校验错误", en: "Parameter Validation Error", _appCode: "framework" },
3
+ 接口地址未找到: { "zh-CN": "接口地址未找到", en: "Api endpoint not found", _appCode: "framework" },
4
+ 服务器内部错误: { "zh-CN": "服务器内部错误", en: "Internal Server Error", _appCode: "framework" },
5
+ 解析错误: { "zh-CN": "解析错误", en: "Parsing Error", _appCode: "framework" },
6
+ 请求配置异常: { "zh-CN": "请求配置异常", en: "Request Configuration Error", _appCode: "framework" },
7
+ "网络异常,请检查您的网络情况": {
8
+ "zh-CN": "网络异常,请检查您的网络情况",
9
+ en: "Network error, please check your network status",
10
+ _appCode: "framework"
11
+ }
12
+ };
13
+ export {
14
+ r as default
15
+ };