@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.
- package/api-services/index.js +903 -921
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +836 -818
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +836 -818
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +832 -814
- package/api-services/modules/duty-manage/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 +836 -818
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +971 -953
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +1094 -1076
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +818 -836
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +818 -836
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +836 -818
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +820 -838
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +836 -818
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +658 -662
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +818 -836
- package/api-services/modules/tool/index.js.gz +0 -0
- package/common-tools/handle-data/index.js +53 -45
- package/common-tools/handle-data/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 E = (e) => e === null || typeof e > "u" || e === "", 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,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
|
-
},
|
|
33
|
-
const c = [...e, ...Object.values(
|
|
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
|
-
},
|
|
37
|
+
}, b = ["zh-CN", "zh-MO", "en-US", "10"], g = async (e) => {
|
|
38
38
|
const c = e || {};
|
|
39
39
|
let {
|
|
40
|
-
currentLang:
|
|
41
|
-
baseUrl:
|
|
42
|
-
appName:
|
|
43
|
-
isPullBack:
|
|
44
|
-
isDasUI:
|
|
45
|
-
urlObj:
|
|
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
|
|
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
|
|
54
|
-
|
|
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
|
|
58
|
+
const f = await import(
|
|
74
59
|
/* @vite-ignore */
|
|
75
|
-
`${
|
|
60
|
+
`${o}`
|
|
76
61
|
);
|
|
77
|
-
|
|
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
|
-
|
|
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
|
-
},
|
|
84
|
-
let c = {},
|
|
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 = (
|
|
96
|
+
return c = (a == null ? void 0 : a.default) || {}, c;
|
|
89
97
|
};
|
|
90
98
|
export {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
99
|
+
b as getCurrentSysLang,
|
|
100
|
+
w as getSysLangArr,
|
|
101
|
+
z as handleGlobalI18n,
|
|
102
|
+
g as handleI18nData,
|
|
103
|
+
k as isEmpty
|
|
96
104
|
};
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@das-fed/upf-utils",
|
|
3
|
-
"version": "6.4.0-dev.
|
|
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.
|
|
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.
|
|
25
|
-
"@das-fed/upf-web": "6.4.0-dev.
|
|
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",
|