@das-fed/upf-utils 6.4.0-dev.166 → 6.4.0-dev.168
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.
- package/api-services/index.js +903 -921
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +818 -836
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +821 -839
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +818 -836
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +836 -818
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +634 -630
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +819 -837
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +836 -818
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +838 -820
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +838 -820
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +818 -836
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +818 -836
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/common-tools/handle-data/index.js +65 -38
- package/common-tools/handle-data/index.js.gz +0 -0
- package/create-api-service/index.js +788 -802
- package/create-api-service/index.js.gz +0 -0
- package/package.json +4 -4
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
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 b = (n) => n === null || typeof n > "u" || n === "", U = [
|
|
|
15
15
|
"nl-NL",
|
|
16
16
|
"vi-VN",
|
|
17
17
|
"tr-TR"
|
|
18
|
-
],
|
|
18
|
+
], u = {
|
|
19
19
|
3: "zh-HK",
|
|
20
20
|
4: "zh-TW",
|
|
21
21
|
6: "ru-RU",
|
|
@@ -29,49 +29,76 @@ const b = (n) => n === null || typeof n > "u" || n === "", U = [
|
|
|
29
29
|
14: "nl-NL",
|
|
30
30
|
15: "vi-VN",
|
|
31
31
|
16: "tr-TR"
|
|
32
|
-
},
|
|
33
|
-
const
|
|
34
|
-
return
|
|
35
|
-
([
|
|
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
|
-
},
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
}, b = ["zh-CN", "zh-MO", "en-US", "10"], g = async (e) => {
|
|
38
|
+
const c = e || {};
|
|
39
|
+
let {
|
|
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 = ""
|
|
48
|
+
} = c;
|
|
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 + "/");
|
|
50
|
+
const i = {
|
|
51
|
+
frontEnd: null,
|
|
52
|
+
dasUiEnd: null,
|
|
53
|
+
backMsg: null
|
|
54
|
+
};
|
|
55
|
+
let l = !1;
|
|
56
|
+
const E = async (o, d, y = "资源") => {
|
|
57
|
+
try {
|
|
58
|
+
const f = await import(
|
|
49
59
|
/* @vite-ignore */
|
|
50
|
-
`${
|
|
60
|
+
`${o}`
|
|
51
61
|
);
|
|
52
|
-
|
|
62
|
+
return (f == null ? void 0 : f.default) ?? null;
|
|
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;
|
|
53
74
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const o =
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
}
|
|
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);
|
|
63
87
|
}
|
|
64
|
-
|
|
65
|
-
|
|
88
|
+
if (!l)
|
|
89
|
+
throw new Error("语言包加载失败");
|
|
90
|
+
return i;
|
|
91
|
+
}, z = async (e = "front-end") => {
|
|
92
|
+
let c = {}, a = await import(
|
|
66
93
|
/* @vite-ignore */
|
|
67
|
-
`/i18n/${
|
|
94
|
+
`/i18n/${e}/global.js`
|
|
68
95
|
);
|
|
69
|
-
return
|
|
96
|
+
return c = (a == null ? void 0 : a.default) || {}, c;
|
|
70
97
|
};
|
|
71
98
|
export {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
99
|
+
b as getCurrentSysLang,
|
|
100
|
+
w as getSysLangArr,
|
|
101
|
+
z as handleGlobalI18n,
|
|
102
|
+
g as handleI18nData,
|
|
103
|
+
k as isEmpty
|
|
77
104
|
};
|
|
Binary file
|