@das-fed/utils 6.4.0-test.3.2 → 6.4.0-test.6

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 (68) hide show
  1. package/api-services/i18n/index.d.ts +68 -0
  2. package/api-services/i18n/index.js +26 -0
  3. package/api-services/i18n/index.js.gz +0 -0
  4. package/api-services/index.js +1070 -1011
  5. package/api-services/index.js.gz +0 -0
  6. package/api-services/modules/app-manage/index.js +671 -642
  7. package/api-services/modules/app-manage/index.js.gz +0 -0
  8. package/api-services/modules/authentication/index.js +671 -642
  9. package/api-services/modules/authentication/index.js.gz +0 -0
  10. package/api-services/modules/bems/index.js +671 -642
  11. package/api-services/modules/bems/index.js.gz +0 -0
  12. package/api-services/modules/contract/index.js +671 -642
  13. package/api-services/modules/contract/index.js.gz +0 -0
  14. package/api-services/modules/duty-manage/index.js +671 -642
  15. package/api-services/modules/duty-manage/index.js.gz +0 -0
  16. package/api-services/modules/enterpriseright/index.js +671 -642
  17. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  18. package/api-services/modules/file/index.js +967 -932
  19. package/api-services/modules/file/index.js.gz +0 -0
  20. package/api-services/modules/gateway-edge/index.js +671 -642
  21. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  22. package/api-services/modules/index.js +1002 -967
  23. package/api-services/modules/index.js.gz +0 -0
  24. package/api-services/modules/iot/index.js +672 -643
  25. package/api-services/modules/iot/index.js.gz +0 -0
  26. package/api-services/modules/justauth/index.js +675 -646
  27. package/api-services/modules/justauth/index.js.gz +0 -0
  28. package/api-services/modules/knowledge/index.js +668 -639
  29. package/api-services/modules/knowledge/index.js.gz +0 -0
  30. package/api-services/modules/link/index.js +671 -642
  31. package/api-services/modules/link/index.js.gz +0 -0
  32. package/api-services/modules/permission/index.js +671 -642
  33. package/api-services/modules/permission/index.js.gz +0 -0
  34. package/api-services/modules/platformManage/index.js +676 -647
  35. package/api-services/modules/platformManage/index.js.gz +0 -0
  36. package/api-services/modules/portal/index.js +671 -642
  37. package/api-services/modules/portal/index.js.gz +0 -0
  38. package/api-services/modules/space-manage/index.js +671 -642
  39. package/api-services/modules/space-manage/index.js.gz +0 -0
  40. package/api-services/modules/super-admin/index.js +669 -640
  41. package/api-services/modules/super-admin/index.js.gz +0 -0
  42. package/api-services/modules/supplier/index.js +669 -640
  43. package/api-services/modules/supplier/index.js.gz +0 -0
  44. package/api-services/modules/supplychain-manage/index.js +671 -642
  45. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  46. package/api-services/modules/systemConfiguration/index.js +671 -642
  47. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  48. package/api-services/modules/tool/index.js +671 -642
  49. package/api-services/modules/tool/index.js.gz +0 -0
  50. package/api-services/src/create-service/index.js +672 -643
  51. package/api-services/src/create-service/index.js.gz +0 -0
  52. package/common-info/index.d.ts +7 -1
  53. package/common-info/index.js +84 -51
  54. package/common-info/index.js.gz +0 -0
  55. package/common-info/type.d.ts +57 -2
  56. package/create-api-service/i18n/index.d.ts +33 -0
  57. package/create-api-service/i18n/index.js +15 -0
  58. package/create-api-service/index.js +672 -643
  59. package/create-api-service/index.js.gz +0 -0
  60. package/create-api-service/sso/index.js +55 -55
  61. package/create-api-service/sso/index.js.gz +0 -0
  62. package/dom-check-in/index.js +2 -2
  63. package/esm-map.json +3 -1
  64. package/package.json +4 -4
  65. package/token-tools/index.d.ts +6 -1
  66. package/token-tools/index.js +6 -6
  67. package/i18n-collection/en.js +0 -21
  68. package/i18n-collection/zh-CN.js +0 -21
@@ -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,8 +13,14 @@ 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 菜单编码
@@ -1,19 +1,19 @@
1
- import { getConfig as p } from "@das-fed/utils/config";
1
+ import { getConfig as u } from "@das-fed/utils/config";
2
2
  import { getUrlParams as g } from "@das-fed/utils/common-tools";
3
- import { getAccessToken as m } from "@das-fed/utils/token-tools";
4
- import { getTokenFromQuery as f, getProjectInfoFromQuery as d } from "@das-fed/utils/common-info/getInfoFromUrl";
5
- const S = m, J = () => {
6
- var n;
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 = () => {
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
- }, O = () => {
14
+ }, A = () => {
15
15
  let e = JSON.parse(sessionStorage.getItem("userInfo") || "{}");
16
- const t = p();
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 ?? "",
@@ -22,7 +22,7 @@ const S = m, J = () => {
22
22
  email: e.email ?? "",
23
23
  headPicture: e.headPicture ?? ""
24
24
  };
25
- }, P = () => {
25
+ }, J = () => {
26
26
  let e = JSON.parse(sessionStorage.getItem("tenantInfo") || "{}");
27
27
  return {
28
28
  userId: e.id ?? "",
@@ -33,9 +33,9 @@ const S = m, J = () => {
33
33
  flag: e.flag ?? null,
34
34
  tenant: e.tenant ?? {}
35
35
  };
36
- }, b = () => {
36
+ }, C = () => {
37
37
  let e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}");
38
- const t = p();
38
+ const t = u();
39
39
  return JSON.stringify(e) === "{}" && t.projectInfo && (e = t.projectInfo), {
40
40
  id: (e == null ? void 0 : e.id) ?? 0,
41
41
  code: (e == null ? void 0 : e.code) ?? 0,
@@ -49,7 +49,32 @@ const S = m, J = () => {
49
49
  leaf: (e == null ? void 0 : e.leaf) ?? !1,
50
50
  optional: (e == null ? void 0 : e.leaf) ?? !0
51
51
  };
52
- }, T = () => {
52
+ }, O = () => {
53
+ let e = JSON.parse(sessionStorage.getItem("project-message") || "{}");
54
+ return {
55
+ id: (e == null ? void 0 : e.id) ?? 0,
56
+ projectName: (e == null ? void 0 : e.projectName) ?? "",
57
+ provinceCode: (e == null ? void 0 : e.provinceCode) ?? "",
58
+ cityCode: (e == null ? void 0 : e.cityCode) ?? "",
59
+ areaCode: (e == null ? void 0 : e.areaCode) ?? "",
60
+ address: (e == null ? void 0 : e.address) ?? "",
61
+ projectDesc: (e == null ? void 0 : e.projectDesc) ?? "",
62
+ logoPath: (e == null ? void 0 : e.logoPath) ?? "",
63
+ projectType: (e == null ? void 0 : e.projectType) ?? "",
64
+ projectTypeCode: (e == null ? void 0 : e.projectTypeCode) ?? "",
65
+ longitude: (e == null ? void 0 : e.longitude) ?? "",
66
+ latitude: (e == null ? void 0 : e.latitude) ?? "",
67
+ projectStartDate: (e == null ? void 0 : e.projectStartDate) ?? "",
68
+ projectExpiryDate: (e == null ? void 0 : e.projectExpiryDate) ?? "",
69
+ projectCode: (e == null ? void 0 : e.projectCode) ?? "",
70
+ mapConfiguration: (e == null ? void 0 : e.mapConfiguration) ?? !1,
71
+ cityName: (e == null ? void 0 : e.cityName) ?? "",
72
+ cityNamePinyin: (e == null ? void 0 : e.cityNamePinyin) ?? "",
73
+ timezone: (e == null ? void 0 : e.timezone) ?? "",
74
+ autoTimezone: (e == null ? void 0 : e.autoTimezone) ?? !1,
75
+ currency: (e == null ? void 0 : e.currency) ?? {}
76
+ };
77
+ }, M = () => {
53
78
  const e = JSON.parse(sessionStorage.getItem("home-config") || "{}");
54
79
  return {
55
80
  applicationCode: (e == null ? void 0 : e.applicationCode) ?? "",
@@ -59,14 +84,20 @@ const S = m, J = () => {
59
84
  routeUrl: (e == null ? void 0 : e.routeUrl) ?? "",
60
85
  type: (e == null ? void 0 : e.type) ?? null
61
86
  };
62
- }, h = (e, t) => {
63
- const n = "permission-btn", s = I(), a = g(location.href, "app") || "", r = t || a || s.currentSubAppCode;
64
- if (!r) return;
65
- const o = g(location.href, "menu") || "", l = e || o || s.currentSubApp.currentMenuCode, c = JSON.parse(sessionStorage.getItem(n) || "{}");
87
+ }, f = () => {
88
+ const e = JSON.parse(sessionStorage.getItem("personal-config") || "{}");
89
+ return {
90
+ style: (e == null ? void 0 : e.style) ?? "",
91
+ skinStyle: (e == null ? void 0 : e.skinStyle) ?? ""
92
+ };
93
+ }, N = (e, t) => {
94
+ const r = "permission-btn", o = m(), a = g(location.href, "app") || "", n = t || a || o.currentSubAppCode;
95
+ if (!n) return;
96
+ const s = g(location.href, "menu") || "", l = e || s || o.currentSubApp.currentMenuCode, c = JSON.parse(sessionStorage.getItem(r) || "{}");
66
97
  if (!c || JSON.stringify(c) === "{}") return;
67
- const u = c[r][l];
68
- return u && u.length ? u : c[r]["origin-auth"] ? c[r]["origin-auth"][l] ?? [] : [];
69
- }, M = (e, t) => h(e, t) ?? [], I = () => {
98
+ const p = c[n][l];
99
+ return p && p.length ? p : c[n]["origin-auth"] ? c[n]["origin-auth"][l] ?? [] : [];
100
+ }, v = (e, t) => N(e, t) ?? [], m = () => {
70
101
  const e = JSON.parse(sessionStorage.getItem("subApps") || "{}");
71
102
  return {
72
103
  appcategorys: e.appcategorys ?? [],
@@ -75,20 +106,20 @@ const S = m, J = () => {
75
106
  subAppList: e.subAppList ?? [],
76
107
  menuCollapses: e.menuCollapses ?? []
77
108
  };
78
- }, j = (e, t = !1) => {
79
- var s, a;
80
- const n = I().subAppList;
109
+ }, D = (e, t = !1) => {
110
+ var o, a;
111
+ const r = m().subAppList;
81
112
  if (e)
82
- return t ? ((s = n == null ? void 0 : n.find((r) => r.code === e)) == null ? void 0 : s.originalMenus) ?? [] : ((a = n == null ? void 0 : n.find((r) => r.code === e)) == null ? void 0 : a.menus) ?? [];
113
+ return t ? ((o = r == null ? void 0 : r.find((n) => n.code === e)) == null ? void 0 : o.originalMenus) ?? [] : ((a = r == null ? void 0 : r.find((n) => n.code === e)) == null ? void 0 : a.menus) ?? [];
83
114
  {
84
- let r = {};
85
- return t ? n == null || n.forEach((o) => {
86
- r[o.code] = o.originalMenus ?? [];
87
- }) : n == null || n.forEach((o) => {
88
- r[o.code] = o.menus ?? [];
89
- }), r;
115
+ let n = {};
116
+ return t ? r == null || r.forEach((s) => {
117
+ n[s.code] = s.originalMenus ?? [];
118
+ }) : r == null || r.forEach((s) => {
119
+ n[s.code] = s.menus ?? [];
120
+ }), n;
90
121
  }
91
- }, v = () => {
122
+ }, U = () => {
92
123
  const e = JSON.parse(sessionStorage.getItem("tabs") || "{}");
93
124
  return {
94
125
  currentCode: e.currentCode ?? "",
@@ -96,28 +127,30 @@ const S = m, J = () => {
96
127
  tabMap: e.tabMap ?? {},
97
128
  preTab: e.preTab ?? {}
98
129
  };
99
- }, U = () => {
100
- const e = p(), t = sessionStorage.getItem("minioAddress");
130
+ }, k = () => {
131
+ const e = u(), t = sessionStorage.getItem("minioAddress");
101
132
  return t || (e.baseURL ? e.baseURL : location.origin);
102
- }, k = () => ({
133
+ }, E = () => ({
103
134
  instanceInfo: JSON.parse(sessionStorage.getItem("instance") || "{}").instanceInfo ?? {}
104
- }), E = () => localStorage.getItem("fav-icon") || "./logo.svg";
105
- S() || f();
106
- var i;
107
- (i = b()) != null && i.id || d();
135
+ }), z = () => localStorage.getItem("fav-icon") || "./logo.svg";
136
+ y() || I();
137
+ var d;
138
+ (d = C()) != null && d.id || S();
108
139
  export {
109
- E as getFavIcon,
110
- T as getHomeInfo,
111
- k as getInstanceInfo,
112
- j as getMenus,
113
- U as getMinioAddress,
114
- h as getPageAuth,
115
- M as getPageAuthBtn,
116
- O as getPersonalInfo,
117
- b as getProjectInfo,
118
- I as getSubApps,
119
- v as getTabInfo,
120
- P as getTenantInfo,
121
- S as getToken,
122
- J as getUserInfo
140
+ z as getFavIcon,
141
+ M as getHomeInfo,
142
+ E as getInstanceInfo,
143
+ D as getMenus,
144
+ k as getMinioAddress,
145
+ N as getPageAuth,
146
+ v as getPageAuthBtn,
147
+ f as getPersonalConfig,
148
+ A as getPersonalInfo,
149
+ C as getProjectInfo,
150
+ O as getProjectMessage,
151
+ m as getSubApps,
152
+ U as getTabInfo,
153
+ J as getTenantInfo,
154
+ y as getToken,
155
+ T as getUserInfo
123
156
  };
Binary file
@@ -46,14 +46,24 @@ export interface TenantInfo {
46
46
  }
47
47
 
48
48
  export interface HomeInfo {
49
+ /** 应用code */
49
50
  applicationCode: string
51
+ /** 应用path */
50
52
  applicationPath: string
53
+ /** 是否启用 */
51
54
  enable: boolean
52
55
  originalCode: string
53
56
  routeUrl: string
54
57
  type: number | null
55
58
  }
56
59
 
60
+ export interface PersonalConfigInfo {
61
+ /** 侧边栏菜单风格(1:弹出式;2:内嵌式 )*/
62
+ style: 1 | 2
63
+ /** 皮肤风格 (default:默认皮肤;kjl:科技蓝;cjb:纯净白;ssl:深邃蓝)*/
64
+ skinStyle: 'default' | 'kjl' | 'cjb' | 'ssl'
65
+ }
66
+
57
67
  export interface ProjectInfo {
58
68
  /** 项目id */
59
69
  id: string
@@ -61,13 +71,13 @@ export interface ProjectInfo {
61
71
  code: string
62
72
  /** 项目名称 */
63
73
  name: string
64
- /** 项目类型: 1: 集团、 2:公司、3: 区域、4: 分公司、 5: 子公司、6: 管理中心、 7: 项目、8: 部门、 9: 组 */
74
+ /** 项目类型: 1: 集团、 2:公司、3: 区域、4: 分公司、 5: 子公司、6: 管理中心、 7: 项目、8: 部门、 9: 组 */
65
75
  type: string
66
76
  /** 父级id */
67
77
  parentId?: string
68
78
  /** 父级名称 */
69
79
  parentName?: string
70
- /** 父级项目类型:1: 集团、 2:公司、3: 区域、4: 分公司、 5: 子公司、6: 管理中心、 7: 项目、8: 部门、 9: 组 */
80
+ /** 父级项目类型:1: 集团、 2:公司、3: 区域、4: 分公司、 5: 子公司、6: 管理中心、 7: 项目、8: 部门、 9: 组 */
71
81
  parentType?: number
72
82
  /** 租户id */
73
83
  tenantId?: string
@@ -79,6 +89,51 @@ export interface ProjectInfo {
79
89
  optional?: boolean
80
90
  }
81
91
 
92
+ export interface ProjectMessage {
93
+ /** 主键id */
94
+ id: number | string
95
+ /** 项目名称 */
96
+ projectName: string
97
+ /** 省级(省份、直辖市、自治区)编码 */
98
+ provinceCode: string
99
+ /** 地级(城市)编码 */
100
+ cityCode: string
101
+ /** 县级(区县)编码 */
102
+ areaCode: string
103
+ /** 详细位置 */
104
+ address: string
105
+ /** 项目简介 */
106
+ projectDesc: string
107
+ /** 项目图片路径 */
108
+ logoPath: string
109
+ /** 项目类型 */
110
+ projectType: string
111
+ /** 项目类型code */
112
+ projectTypeCode: string
113
+ /** 经度 */
114
+ longitude: string
115
+ /** 纬度 */
116
+ latitude: string
117
+ /** 项目开始时间 */
118
+ projectStartDate: string
119
+ /** 项目有效期 */
120
+ projectExpiryDate: string
121
+ /** 项目编码 */
122
+ projectCode: string
123
+ /** 地图配置是否开启 */
124
+ mapConfiguration: boolean
125
+ /** 地级(城市)名称 */
126
+ cityName: string
127
+ /** 地级(城市)名称拼音 */
128
+ cityNamePinyin: string
129
+ /** 时区ID */
130
+ timezone: string
131
+ /** 是否自动设定时区 */
132
+ autoTimezone: boolean
133
+ /** 货币信息(currencyCode:ISO 4217货币编码(例:CNY);currencyUnit:货币单位,例:元(中文),CNY(英文);currencySymbol:货币符号,例:¥) */
134
+ currency: Record<'currencyCode' | 'currencyUnit' | 'currencySymbol', string>
135
+ }
136
+
82
137
  export interface SubAppsInfo {
83
138
  /** 所有应用信息 */
84
139
  appcategorys?: any[]
@@ -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
+ };