@das-fed/upf-utils 6.4.0-dev.167 → 6.4.0-dev.169

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 (33) hide show
  1. package/api-services/index.js +903 -921
  2. package/api-services/index.js.gz +0 -0
  3. package/api-services/modules/authentication/index.js +836 -818
  4. package/api-services/modules/authentication/index.js.gz +0 -0
  5. package/api-services/modules/contract/index.js +836 -818
  6. package/api-services/modules/contract/index.js.gz +0 -0
  7. package/api-services/modules/duty-manage/index.js +832 -814
  8. package/api-services/modules/duty-manage/index.js.gz +0 -0
  9. package/api-services/modules/enterpriseright/index.js +836 -818
  10. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  11. package/api-services/modules/gateway-edge/index.js +836 -818
  12. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  13. package/api-services/modules/index.js +971 -953
  14. package/api-services/modules/index.js.gz +0 -0
  15. package/api-services/modules/iot/index.js +1094 -1076
  16. package/api-services/modules/iot/index.js.gz +0 -0
  17. package/api-services/modules/knowledge/index.js +818 -836
  18. package/api-services/modules/knowledge/index.js.gz +0 -0
  19. package/api-services/modules/link/index.js +818 -836
  20. package/api-services/modules/link/index.js.gz +0 -0
  21. package/api-services/modules/space-manage/index.js +836 -818
  22. package/api-services/modules/space-manage/index.js.gz +0 -0
  23. package/api-services/modules/supplier/index.js +820 -838
  24. package/api-services/modules/supplier/index.js.gz +0 -0
  25. package/api-services/modules/supplychain-manage/index.js +836 -818
  26. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  27. package/api-services/modules/systemConfiguration/index.js +658 -662
  28. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  29. package/api-services/modules/tool/index.js +818 -836
  30. package/api-services/modules/tool/index.js.gz +0 -0
  31. package/common-tools/handle-data/index.js +53 -45
  32. package/common-tools/handle-data/index.js.gz +0 -0
  33. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- const E = (e) => e === null || typeof e > "u" || e === "", u = [
1
+ const k = (e) => e === null || typeof e > "u" || e === "", p = [
2
2
  "zh-CN",
3
3
  "zh-TW",
4
4
  "zh-HK",
@@ -15,7 +15,7 @@ const E = (e) => e === null || typeof e > "u" || e === "", u = [
15
15
  "nl-NL",
16
16
  "vi-VN",
17
17
  "tr-TR"
18
- ], l = {
18
+ ], u = {
19
19
  3: "zh-HK",
20
20
  4: "zh-TW",
21
21
  6: "ru-RU",
@@ -29,68 +29,76 @@ const E = (e) => e === null || typeof e > "u" || e === "", u = [
29
29
  14: "nl-NL",
30
30
  15: "vi-VN",
31
31
  16: "tr-TR"
32
- }, h = (e) => {
33
- const c = [...e, ...Object.values(l).filter((n) => e.includes(n))];
34
- return u.filter((n) => c.includes(n) || Object.entries(l).some(
35
- ([t, a]) => e.includes(t) && n === a || e.includes(a) && n === a
32
+ }, w = (e) => {
33
+ const c = [...e, ...Object.values(u).filter((t) => e.includes(t))];
34
+ return p.filter((t) => c.includes(t) || Object.entries(u).some(
35
+ ([a, s]) => e.includes(a) && t === s || e.includes(s) && t === s
36
36
  ));
37
- }, p = ["zh-CN", "zh-MO", "en-US", "10"], y = async (e) => {
37
+ }, b = ["zh-CN", "zh-MO", "en-US", "10"], g = async (e) => {
38
38
  const c = e || {};
39
39
  let {
40
- currentLang: n = "zh-CN",
41
- baseUrl: t = "/",
42
- appName: a = "jc",
43
- isPullBack: o = !1,
44
- isDasUI: U = !1,
45
- urlObj: r = { frontEndUrl: "", backEndUrl: "", dasUiUrl: "" }
40
+ currentLang: t = "zh-CN",
41
+ baseUrl: a = "/",
42
+ appName: s = "jc",
43
+ isPullBack: h = !1,
44
+ isDasUI: $ = !1,
45
+ urlObj: n = { frontEndUrl: "", backEndUrl: "", dasUiUrl: "" },
46
+ // 新增:当主地址加载失败时,用于针对失败项的本地回退地址
47
+ fallbackBaseUrl: r = ""
46
48
  } = c;
47
- (typeof n != "string" || !n) && (n = "zh-CN"), (typeof a != "string" || !a) && (a = "jc"), typeof t != "string" && (t = "/"), t || (t = "/"), t.endsWith("/") || (t = t + "/");
49
+ (typeof t != "string" || !t) && (t = "zh-CN"), (typeof s != "string" || !s) && (s = "jc"), typeof a != "string" && (a = "/"), a || (a = "/"), a.endsWith("/") || (a = a + "/"), typeof r != "string" && (r = ""), r && !r.endsWith("/") && (r = r + "/");
48
50
  const i = {
49
51
  frontEnd: null,
50
52
  dasUiEnd: null,
51
53
  backMsg: null
52
54
  };
53
- let f = !1;
54
- try {
55
- const s = await import(
56
- /* @vite-ignore */
57
- `${(r == null ? void 0 : r.frontEndUrl) || `${t}web-front-end/i18n/${a}_${n}.js`}`
58
- );
59
- i.frontEnd = (s == null ? void 0 : s.default) ?? null, i.frontEnd && (f = !0);
60
- } catch {
61
- }
62
- if (o || r != null && r.backEndUrl)
63
- try {
64
- const s = await import(
65
- /* @vite-ignore */
66
- `${(r == null ? void 0 : r.backEndUrl) || `${t}web-back-end/i18n/${a}_${n}.js`}`
67
- );
68
- i.backMsg = (s == null ? void 0 : s.default) ?? null, i.backMsg && (f = !0);
69
- } catch {
70
- }
71
- if (U)
55
+ let l = !1;
56
+ const E = async (o, d, y = "资源") => {
72
57
  try {
73
- const s = await import(
58
+ const f = await import(
74
59
  /* @vite-ignore */
75
- `${(r == null ? void 0 : r.dasUiUrl) || `${t}web-front-end/i18n/dasui_${n}.js`}`
60
+ `${o}`
76
61
  );
77
- i.dasUiEnd = (s == null ? void 0 : s.default) ?? null, i.dasUiEnd && (f = !0);
62
+ return (f == null ? void 0 : f.default) ?? null;
78
63
  } catch {
64
+ if (d)
65
+ try {
66
+ const U = await import(
67
+ /* @vite-ignore */
68
+ `${d}`
69
+ );
70
+ return (U == null ? void 0 : U.default) ?? null;
71
+ } catch {
72
+ }
73
+ return null;
79
74
  }
80
- if (!f)
75
+ };
76
+ {
77
+ const o = (n == null ? void 0 : n.frontEndUrl) || `${a}web-front-end/i18n/${s}_${t}.js`, d = !(n != null && n.frontEndUrl) && r ? `${r}web-front-end/i18n/${s}_${t}.js` : void 0;
78
+ i.frontEnd = await E(o, d, "前端业务语言资源"), i.frontEnd && (l = !0);
79
+ }
80
+ if (h && i.frontEnd || n != null && n.backEndUrl) {
81
+ const o = (n == null ? void 0 : n.backEndUrl) || `${a}web-back-end/i18n/${s}_${t}.js`, d = !(n != null && n.backEndUrl) && r ? `${r}web-back-end/i18n/${s}_${t}.js` : void 0;
82
+ i.backMsg = await E(o, d, "后端语言资源"), i.backMsg && (l = !0);
83
+ }
84
+ if ($) {
85
+ const o = (n == null ? void 0 : n.dasUiUrl) || `${a}web-front-end/i18n/dasui_${t}.js`, d = !(n != null && n.dasUiUrl) && r ? `${r}web-front-end/i18n/dasui_${t}.js` : void 0;
86
+ i.dasUiEnd = await E(o, d, "UI组件库语言资源"), i.dasUiEnd && (l = !0);
87
+ }
88
+ if (!l)
81
89
  throw new Error("语言包加载失败");
82
90
  return i;
83
- }, $ = async (e = "front-end") => {
84
- let c = {}, t = await import(
91
+ }, z = async (e = "front-end") => {
92
+ let c = {}, a = await import(
85
93
  /* @vite-ignore */
86
94
  `/i18n/${e}/global.js`
87
95
  );
88
- return c = (t == null ? void 0 : t.default) || {}, c;
96
+ return c = (a == null ? void 0 : a.default) || {}, c;
89
97
  };
90
98
  export {
91
- p as getCurrentSysLang,
92
- h as getSysLangArr,
93
- $ as handleGlobalI18n,
94
- y as handleI18nData,
95
- E as isEmpty
99
+ b as getCurrentSysLang,
100
+ w as getSysLangArr,
101
+ z as handleGlobalI18n,
102
+ g as handleI18nData,
103
+ k as isEmpty
96
104
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@das-fed/upf-utils",
3
- "version": "6.4.0-dev.167",
3
+ "version": "6.4.0-dev.169",
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/upf-utils": "6.4.0-dev.167",
12
+ "@das-fed/upf-utils": "6.4.0-dev.169",
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/upf-cli": "6.4.0-dev.167",
25
- "@das-fed/upf-web": "6.4.0-dev.167",
24
+ "@das-fed/upf-cli": "6.4.0-dev.169",
25
+ "@das-fed/upf-web": "6.4.0-dev.169",
26
26
  "@types/js-cookie": "^3.0.6",
27
27
  "@types/lodash-es": "^4.17.12",
28
28
  "@types/qs": "^6.9.15",