@das-fed/utils 6.4.0-dev.71 → 6.4.0-dev.73

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 (50) hide show
  1. package/api-services/i18n/index.js.gz +0 -0
  2. package/api-services/index.js.gz +0 -0
  3. package/api-services/modules/app-manage/index.js.gz +0 -0
  4. package/api-services/modules/authentication/index.js.gz +0 -0
  5. package/api-services/modules/bems/index.js.gz +0 -0
  6. package/api-services/modules/contract/index.js.gz +0 -0
  7. package/api-services/modules/duty-manage/index.js.gz +0 -0
  8. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  9. package/api-services/modules/file/index.js.gz +0 -0
  10. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  11. package/api-services/modules/index.js.gz +0 -0
  12. package/api-services/modules/iot/index.js.gz +0 -0
  13. package/api-services/modules/justauth/index.js.gz +0 -0
  14. package/api-services/modules/knowledge/index.js.gz +0 -0
  15. package/api-services/modules/link/index.js.gz +0 -0
  16. package/api-services/modules/permission/index.js.gz +0 -0
  17. package/api-services/modules/platformManage/index.js.gz +0 -0
  18. package/api-services/modules/portal/index.js.gz +0 -0
  19. package/api-services/modules/space-manage/index.js.gz +0 -0
  20. package/api-services/modules/super-admin/index.js.gz +0 -0
  21. package/api-services/modules/supplier/index.js.gz +0 -0
  22. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  23. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  24. package/api-services/modules/tool/index.js.gz +0 -0
  25. package/api-services/src/create-service/index.js.gz +0 -0
  26. package/common-info/getInfoFromUrl/index.js.gz +0 -0
  27. package/common-info/index.d.ts +2 -2
  28. package/common-info/index.js +41 -39
  29. package/common-info/index.js.gz +0 -0
  30. package/common-info/set-personal-info/index.js +16 -12
  31. package/common-info/set-personal-info/index.js.gz +0 -0
  32. package/common-info/type.d.ts +214 -214
  33. package/common-tools/extract-file-name/index.js.gz +0 -0
  34. package/common-tools/get-url-params/index.js.gz +0 -0
  35. package/create-api-service/index.js.gz +0 -0
  36. package/create-api-service/sso/index.js +6 -1
  37. package/create-api-service/sso/index.js.gz +0 -0
  38. package/curring-http/index.js.gz +0 -0
  39. package/curring-http/type.d.ts +87 -87
  40. package/directive/auth/index.js.gz +0 -0
  41. package/hooks/use-get-auth/index.js.gz +0 -0
  42. package/nextTiken/index.js.gz +0 -0
  43. package/package.json +4 -4
  44. package/pinyin-first-character/index.js.gz +0 -0
  45. package/style/index.js.gz +0 -0
  46. package/use-low-code/index.js +3 -3
  47. package/use-low-code/index.js.gz +0 -0
  48. package/use-low-code/style.css +1 -1
  49. package/webSocket-service/index.js.gz +0 -0
  50. package/webSocket-service/type.d.ts +28 -28
Binary file
Binary file
Binary file
@@ -25,9 +25,9 @@ export declare const getPersonalConfig: () => PersonalConfigInfo;
25
25
  * 可用于判断菜单或者按钮权限
26
26
  * @param menuCode 菜单编码
27
27
  * @param applicationCode 应用编码
28
- * @returns undefined(无菜单权限);空数组(无按钮权限)
28
+ * @returns 无菜单权限返回undefined,有菜单权限但是没有任何按钮权限返回空数组
29
29
  */
30
- export declare const getPageAuth: (menuCode?: string, applicationCode?: string) => any;
30
+ export declare const getPageAuth: (menuCode?: string, applicationCode?: string) => undefined | any[];
31
31
  /**
32
32
  * 获取指定菜单的按钮权限数据
33
33
  * @param menuCode 菜单编码
@@ -1,8 +1,8 @@
1
1
  import { getConfig as u } from "@das-fed/utils/config";
2
- import { getUrlParams as g } from "@das-fed/utils/common-tools";
3
- import { getAccessToken as i } from "@das-fed/utils/token-tools";
4
- import { getTokenFromQuery as I, getProjectInfoFromQuery as S } from "@das-fed/utils/common-info/getInfoFromUrl";
5
- const y = i, T = () => {
2
+ import { getUrlParams as d } from "@das-fed/utils/common-tools";
3
+ import { getAccessToken as I } from "@das-fed/utils/token-tools";
4
+ import { getTokenFromQuery as S, getProjectInfoFromQuery as y } from "@das-fed/utils/common-info/getInfoFromUrl";
5
+ const N = I, A = () => {
6
6
  var r;
7
7
  let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
8
8
  return {
@@ -11,7 +11,7 @@ const y = i, T = () => {
11
11
  flag: e.flag ?? null,
12
12
  tenantId: ((r = e == null ? void 0 : e.tenant) == null ? void 0 : r.id) ?? ""
13
13
  };
14
- }, A = () => {
14
+ }, J = () => {
15
15
  let e = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
16
16
  const t = u();
17
17
  return JSON.stringify(e) === "{}" && t.personalInfo && (e = t.personalInfo), {
@@ -22,7 +22,7 @@ const y = i, T = () => {
22
22
  email: e.email ?? "",
23
23
  headPicture: e.headPicture ?? ""
24
24
  };
25
- }, J = () => {
25
+ }, O = () => {
26
26
  let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
27
27
  return {
28
28
  userId: e.id ?? "",
@@ -44,7 +44,7 @@ const y = i, T = () => {
44
44
  address: e.address ?? "",
45
45
  description: e.description ?? ""
46
46
  };
47
- }, N = () => {
47
+ }, C = () => {
48
48
  let e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}");
49
49
  const t = u();
50
50
  return JSON.stringify(e) === "{}" && t.projectInfo && (e = t.projectInfo), {
@@ -60,7 +60,7 @@ const y = 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
- }, O = () => {
63
+ }, M = () => {
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 y = i, T = () => {
85
85
  autoTimezone: (e == null ? void 0 : e.autoTimezone) ?? !1,
86
86
  currency: (e == null ? void 0 : e.currency) ?? {}
87
87
  };
88
- }, M = () => {
88
+ }, v = () => {
89
89
  const e = JSON.parse(sessionStorage.getItem("home-config") || "{}");
90
90
  return {
91
91
  applicationCode: (e == null ? void 0 : e.applicationCode) ?? "",
@@ -96,20 +96,22 @@ const y = i, T = () => {
96
96
  displayPosition: (e == null ? void 0 : e.displayPosition) ?? 1,
97
97
  type: (e == null ? void 0 : e.type) ?? null
98
98
  };
99
- }, v = () => {
99
+ }, f = () => {
100
100
  const e = JSON.parse(sessionStorage.getItem("personal-config") || "{}");
101
101
  return {
102
102
  style: (e == null ? void 0 : e.style) ?? "",
103
103
  skinStyle: (e == null ? void 0 : e.skinStyle) ?? ""
104
104
  };
105
- }, C = (e, t) => {
106
- const r = "permission-btn", a = m(), o = g(location.href, "app") || "", s = t || o || a.currentSubAppCode;
105
+ }, j = (e, t) => {
106
+ var g;
107
+ const r = "permission-btn", a = m(), o = d(location.href, "app") || "", s = t || o || a.currentSubAppCode;
107
108
  if (!s) return;
108
- const n = g(location.href, "menu") || "", l = e || n || a.currentSubApp.currentMenuCode, c = JSON.parse(sessionStorage.getItem(r) || "{}");
109
+ const n = d(location.href, "menu") || "", l = e || n || a.currentSubApp.currentMenuCode, c = JSON.parse(sessionStorage.getItem(r) || "{}");
109
110
  if (!c || JSON.stringify(c) === "{}") return;
110
- const p = c[s][l];
111
- return p && p.length ? p : c[s]["origin-auth"] ? c[s]["origin-auth"][l] ?? [] : [];
112
- }, f = (e, t) => C(e, t) ?? [], m = () => {
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 = () => {
113
115
  const e = JSON.parse(sessionStorage.getItem("subApps") || "{}");
114
116
  return {
115
117
  appcategorys: e.appcategorys ?? [],
@@ -118,7 +120,7 @@ const y = i, T = () => {
118
120
  subAppList: e.subAppList ?? [],
119
121
  menuCollapses: e.menuCollapses ?? []
120
122
  };
121
- }, k = (e, t = !1) => {
123
+ }, D = (e, t = !1) => {
122
124
  var a, o;
123
125
  const r = m().subAppList;
124
126
  if (e)
@@ -131,7 +133,7 @@ const y = i, T = () => {
131
133
  s[n.code] = n.menus ?? [];
132
134
  }), s;
133
135
  }
134
- }, D = () => {
136
+ }, U = () => {
135
137
  const e = JSON.parse(sessionStorage.getItem("tabs") || "{}");
136
138
  return {
137
139
  currentCode: e.currentCode ?? "",
@@ -139,30 +141,30 @@ const y = i, T = () => {
139
141
  tabMap: e.tabMap ?? {},
140
142
  preTab: e.preTab ?? {}
141
143
  };
142
- }, U = () => {
144
+ }, E = () => {
143
145
  const e = u(), t = sessionStorage.getItem("minioAddress");
144
146
  return t || (e.baseURL ? e.baseURL : location.origin);
145
- }, E = () => ({
147
+ }, z = () => ({
146
148
  instanceInfo: JSON.parse(sessionStorage.getItem("instance") || "{}").instanceInfo ?? {}
147
- }), z = () => localStorage.getItem("fav-icon") || "./logo.svg";
148
- y() || I();
149
- var d;
150
- (d = N()) != null && d.id || S();
149
+ }), x = () => localStorage.getItem("fav-icon") || "./logo.svg";
150
+ N() || S();
151
+ var i;
152
+ (i = C()) != null && i.id || y();
151
153
  export {
152
- z as getFavIcon,
153
- M as getHomeInfo,
154
- E as getInstanceInfo,
155
- k as getMenus,
156
- U as getMinioAddress,
157
- C as getPageAuth,
158
- f as getPageAuthBtn,
159
- v as getPersonalConfig,
160
- A as getPersonalInfo,
161
- N as getProjectInfo,
162
- O as getProjectMessage,
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,
163
165
  m as getSubApps,
164
- D as getTabInfo,
165
- J as getTenantInfo,
166
- y as getToken,
167
- T as getUserInfo
166
+ U as getTabInfo,
167
+ O as getTenantInfo,
168
+ N as getToken,
169
+ A as getUserInfo
168
170
  };
Binary file
@@ -1697,20 +1697,24 @@ E.getAdapter = Ge.getAdapter;
1697
1697
  E.HttpStatusCode = ae;
1698
1698
  E.default = E;
1699
1699
  const Ln = async (e) => {
1700
- var r;
1700
+ var n;
1701
1701
  const t = {
1702
1702
  personalInfo: "/api/personal-center/personal-server/v1/info"
1703
- }, n = await E.create().get(t.personalInfo, {
1704
- baseURL: Ye().baseURL,
1705
- params: {
1706
- project: (r = Ze()) == null ? void 0 : r.id,
1707
- timestamp: (/* @__PURE__ */ new Date()).getTime()
1708
- },
1709
- headers: {
1710
- Authorization: `Bearer ${e}`
1711
- }
1712
- });
1713
- n != null && n.data && sessionStorage.setItem("userInfo", JSON.stringify(n.data));
1703
+ };
1704
+ try {
1705
+ const r = await E.create().get(t.personalInfo, {
1706
+ baseURL: Ye().baseURL,
1707
+ params: {
1708
+ project: (n = Ze()) == null ? void 0 : n.id,
1709
+ timestamp: (/* @__PURE__ */ new Date()).getTime()
1710
+ },
1711
+ headers: {
1712
+ Authorization: `Bearer ${e}`
1713
+ }
1714
+ });
1715
+ r != null && r.data && sessionStorage.setItem("userInfo", JSON.stringify(r.data));
1716
+ } catch {
1717
+ }
1714
1718
  };
1715
1719
  export {
1716
1720
  Ln as setPersonalInfo
@@ -1,214 +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
- /** 用户名称 */
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 }[]
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 }[]
Binary file
@@ -2025,7 +2025,12 @@ const Br = async () => {
2025
2025
  if (Ee) return Ee(e);
2026
2026
  e.logout = "true", n && (e.locale = "locale");
2027
2027
  const r = Object.keys(e).filter((s) => s !== "client_secret").map((s) => `${s}=${e[s]}`).join("&"), o = `${t}${F.oauth}?${r}`;
2028
- localStorage.removeItem("idelTime"), sessionStorage.clear(), J().remove(), b.create().get(F.logoutCurpage, { baseURL: t }), window.__isAutoCloseApp = !1, location.replace(o);
2028
+ localStorage.removeItem("idelTime"), sessionStorage.clear(), J().remove();
2029
+ try {
2030
+ b.create().get(F.logoutCurpage, { baseURL: t });
2031
+ } catch {
2032
+ }
2033
+ window.__isAutoCloseApp = !1, location.replace(o);
2029
2034
  };
2030
2035
  Dr($);
2031
2036
  const Ir = async (e) => {
Binary file
Binary file
@@ -1,89 +1,89 @@
1
1
  import { AxiosInstance, AxiosRequestConfig, AxiosError } from 'axios';
2
2
  import { Ref } from 'vue';
3
-
4
-
5
- /** 请求工具配置项 */
6
- export type CurringConfig = AxiosRequestConfig & {
7
- /** 请求实例 */
8
- axiosInstance?: AxiosInstance
9
-
10
- /** 请求方法 */
11
- method?: Method
12
-
13
- /** 请求的body数据 */
14
- data?: any
15
-
16
- /** 请求的query数据 */
17
- params?: any
18
-
19
- /** 接口地址前缀 */
20
- urlPrefix?: string
21
-
22
- /** 标记为公共接口,不需要鉴权,默认为false */
23
- public?: boolean
24
-
25
- /** 请求成功执行的回调 */
26
- onSuccess?: (res: any, config: CurringConfig) => Promise<any>
27
-
28
- /** 请求失败执行的回调 */
29
- onError?: (error: any, config: CurringConfig) => Promise<any>
30
-
31
- /** 自定义处理请求失败执行的回调 */
32
- onCustomError?: (error: any, config: CurringConfig) => Promise<any>
33
-
34
- /** 不管请求成功或失败都会执行的回调 */
35
- finally?: (config: CurringConfig) => any
36
-
37
- /** 每次请求之前都会执行的函数 */
38
- beforeRun?: (config: CurringConfig) => Promise<CurringConfig>
39
-
40
- /** 自定义错误信息 */
41
- customErrorMessage?: (
42
- /** 原始错误信息 */
43
- message: string,
44
-
45
- /** 原始错误对象 */
46
- error: any,
47
- ) => string | null | undefined
48
-
49
- /** 忽略错误提示 */
50
- ignoreErrorMessage?: boolean
51
-
52
- /** 接口401是否重定向到登录页 */
53
- noRedireLogin?: boolean
54
-
55
- /** 开启CSRF安全选项 */
56
- csrf?: boolean
57
- }
58
-
59
- export type Method = 'get' | 'post' | 'put' | 'delete' | 'patch'
60
-
61
- export type CurringConfigFun = (config: CurringConfig) => CurringConfig | Promise<CurringConfig>
62
-
63
- export type CurringRes = {
64
- /** 请求时返回的接口数据 */
65
- data: Ref<any>
66
-
67
- /** 请求时的错误信息 */
68
- error: Ref<any>
69
-
70
- /** 请求时的loading */
71
- loading: Ref<boolean>
72
-
73
- /** 发起请求 返回格式 [ error, data ] */
74
- run: (payload?: any, config?: CurringConfig) => CurringRunRes
75
-
76
- /** 取消请求控制器 */
77
- abortController: Ref<AbortController | null>
78
- }
79
-
80
- /** 返回为数组 [error, data], 请求成功error为null,请求失败data为null */
81
- export type CurringRunRes = Promise<
82
- [
83
- /** 请求返回的错误信息,请求成功时为null,请求失败时为错误信息 */
84
- error: { code: string | number; msg: string; error: AxiosError } | null,
85
-
86
- /** 请求返回的接口数据,请求成功时为后端数据,请求失败时为null */
87
- data: any | null,
88
- ]
89
- >
3
+
4
+
5
+ /** 请求工具配置项 */
6
+ export type CurringConfig = AxiosRequestConfig & {
7
+ /** 请求实例 */
8
+ axiosInstance?: AxiosInstance
9
+
10
+ /** 请求方法 */
11
+ method?: Method
12
+
13
+ /** 请求的body数据 */
14
+ data?: any
15
+
16
+ /** 请求的query数据 */
17
+ params?: any
18
+
19
+ /** 接口地址前缀 */
20
+ urlPrefix?: string
21
+
22
+ /** 标记为公共接口,不需要鉴权,默认为false */
23
+ public?: boolean
24
+
25
+ /** 请求成功执行的回调 */
26
+ onSuccess?: (res: any, config: CurringConfig) => Promise<any>
27
+
28
+ /** 请求失败执行的回调 */
29
+ onError?: (error: any, config: CurringConfig) => Promise<any>
30
+
31
+ /** 自定义处理请求失败执行的回调 */
32
+ onCustomError?: (error: any, config: CurringConfig) => Promise<any>
33
+
34
+ /** 不管请求成功或失败都会执行的回调 */
35
+ finally?: (config: CurringConfig) => any
36
+
37
+ /** 每次请求之前都会执行的函数 */
38
+ beforeRun?: (config: CurringConfig) => Promise<CurringConfig>
39
+
40
+ /** 自定义错误信息 */
41
+ customErrorMessage?: (
42
+ /** 原始错误信息 */
43
+ message: string,
44
+
45
+ /** 原始错误对象 */
46
+ error: any,
47
+ ) => string | null | undefined
48
+
49
+ /** 忽略错误提示 */
50
+ ignoreErrorMessage?: boolean
51
+
52
+ /** 接口401是否重定向到登录页 */
53
+ noRedireLogin?: boolean
54
+
55
+ /** 开启CSRF安全选项 */
56
+ csrf?: boolean
57
+ }
58
+
59
+ export type Method = 'get' | 'post' | 'put' | 'delete' | 'patch'
60
+
61
+ export type CurringConfigFun = (config: CurringConfig) => CurringConfig | Promise<CurringConfig>
62
+
63
+ export type CurringRes = {
64
+ /** 请求时返回的接口数据 */
65
+ data: Ref<any>
66
+
67
+ /** 请求时的错误信息 */
68
+ error: Ref<any>
69
+
70
+ /** 请求时的loading */
71
+ loading: Ref<boolean>
72
+
73
+ /** 发起请求 返回格式 [ error, data ] */
74
+ run: (payload?: any, config?: CurringConfig) => CurringRunRes
75
+
76
+ /** 取消请求控制器 */
77
+ abortController: Ref<AbortController | null>
78
+ }
79
+
80
+ /** 返回为数组 [error, data], 请求成功error为null,请求失败data为null */
81
+ export type CurringRunRes = Promise<
82
+ [
83
+ /** 请求返回的错误信息,请求成功时为null,请求失败时为错误信息 */
84
+ error: { code: string | number; msg: string; error: AxiosError } | null,
85
+
86
+ /** 请求返回的接口数据,请求成功时为后端数据,请求失败时为null */
87
+ data: any | null,
88
+ ]
89
+ >
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@das-fed/utils",
3
- "version": "6.4.0-dev.71",
3
+ "version": "6.4.0-dev.73",
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": "6.4.0-dev.71",
12
+ "@das-fed/utils": "6.4.0-dev.73",
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": "6.4.0-dev.71",
25
- "@das-fed/web": "6.4.0-dev.71",
24
+ "@das-fed/cli": "6.4.0-dev.73",
25
+ "@das-fed/web": "6.4.0-dev.73",
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.gz CHANGED
Binary file
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as v, computed as u, onMounted as g, onBeforeUnmount as _, ref as L, openBlock as y, createElementBlock as h } from "vue";
2
- const x = ["src"], b = /* @__PURE__ */ v({
2
+ const x = ["src"], C = /* @__PURE__ */ v({
3
3
  __name: "low-code-iframe",
4
4
  props: {
5
5
  app: {},
@@ -58,12 +58,12 @@ const x = ["src"], b = /* @__PURE__ */ v({
58
58
  onLoad: w
59
59
  }, null, 40, x));
60
60
  }
61
- }), C = (n, c) => {
61
+ }), M = (n, c) => {
62
62
  const s = n.__vccOpts || n;
63
63
  for (const [a, r] of c)
64
64
  s[a] = r;
65
65
  return s;
66
- }, B = /* @__PURE__ */ C(b, [["__scopeId", "data-v-c5870bec"]]);
66
+ }, B = /* @__PURE__ */ M(C, [["__scopeId", "data-v-67190e50"]]);
67
67
  export {
68
68
  B as LowCode
69
69
  };
Binary file
@@ -1 +1 @@
1
- .low-code-iframe[data-v-c5870bec]{padding:0;margin:0;border:none;outline:none;height:100%;width:100%;min-height:100px;min-width:100px}
1
+ .low-code-iframe[data-v-67190e50]{padding:0;margin:0;border:none;outline:none;height:100%;width:100%;min-height:100px;min-width:100px}
Binary file
@@ -1,28 +1,28 @@
1
- export type socketConfig = {
2
- /** 请求地址 */
3
- url: string
4
-
5
- /** 请求参数 */
6
- params?: Record<string, any>
7
-
8
- /** websocket连接成功回调 */
9
- opened?: (event: any) => void
10
-
11
- /** websocket关闭连接回调 */
12
- close?: (event: any) => void
13
-
14
- /** websocket接收到消息回调 */
15
- message?: (event: any) => void
16
-
17
- /** websocket连接异常回调 */
18
- error?: (event: any) => void
19
-
20
- /** 是否重连,默认开启 */
21
- ifReconnect?: boolean
22
-
23
- /** 连接close关闭时是否重连,默认关闭 */
24
- reconnectWhenClose?: boolean
25
-
26
- /** 重连次数,默认为3,-1 表示一直重连 */
27
- reconnectNum?: number
28
- }
1
+ export type socketConfig = {
2
+ /** 请求地址 */
3
+ url: string
4
+
5
+ /** 请求参数 */
6
+ params?: Record<string, any>
7
+
8
+ /** websocket连接成功回调 */
9
+ opened?: (event: any) => void
10
+
11
+ /** websocket关闭连接回调 */
12
+ close?: (event: any) => void
13
+
14
+ /** websocket接收到消息回调 */
15
+ message?: (event: any) => void
16
+
17
+ /** websocket连接异常回调 */
18
+ error?: (event: any) => void
19
+
20
+ /** 是否重连,默认开启 */
21
+ ifReconnect?: boolean
22
+
23
+ /** 连接close关闭时是否重连,默认关闭 */
24
+ reconnectWhenClose?: boolean
25
+
26
+ /** 重连次数,默认为3,-1 表示一直重连 */
27
+ reconnectNum?: number
28
+ }