@das-fed/upf-utils 6.4.0-dev.152 → 6.4.0-dev.154

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 (56) hide show
  1. package/api-services/index.js +2 -1
  2. package/api-services/index.js.gz +0 -0
  3. package/api-services/modules/app-manage/index.js +742 -727
  4. package/api-services/modules/app-manage/index.js.gz +0 -0
  5. package/api-services/modules/authentication/index.js +655 -650
  6. package/api-services/modules/authentication/index.js.gz +0 -0
  7. package/api-services/modules/bems/index.js +750 -731
  8. package/api-services/modules/bems/index.js.gz +0 -0
  9. package/api-services/modules/contract/index.js +2 -1
  10. package/api-services/modules/contract/index.js.gz +0 -0
  11. package/api-services/modules/duty-manage/index.js +726 -743
  12. package/api-services/modules/duty-manage/index.js.gz +0 -0
  13. package/api-services/modules/enterpriseright/index.js +747 -728
  14. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  15. package/api-services/modules/file/index.js +750 -767
  16. package/api-services/modules/file/index.js.gz +0 -0
  17. package/api-services/modules/gateway-edge/index.js +2 -1
  18. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  19. package/api-services/modules/index.js +2 -1
  20. package/api-services/modules/index.js.gz +0 -0
  21. package/api-services/modules/iot/index.js +726 -707
  22. package/api-services/modules/iot/index.js.gz +0 -0
  23. package/api-services/modules/justauth/index.js +748 -729
  24. package/api-services/modules/justauth/index.js.gz +0 -0
  25. package/api-services/modules/knowledge/index.js +2 -1
  26. package/api-services/modules/knowledge/index.js.gz +0 -0
  27. package/api-services/modules/link/index.js +747 -728
  28. package/api-services/modules/link/index.js.gz +0 -0
  29. package/api-services/modules/permission/index.js +747 -728
  30. package/api-services/modules/permission/index.js.gz +0 -0
  31. package/api-services/modules/platformManage/index.js +73 -72
  32. package/api-services/modules/platformManage/index.js.gz +0 -0
  33. package/api-services/modules/portal/index.js +747 -728
  34. package/api-services/modules/portal/index.js.gz +0 -0
  35. package/api-services/modules/space-manage/index.js +2 -1
  36. package/api-services/modules/space-manage/index.js.gz +0 -0
  37. package/api-services/modules/super-admin/index.js +2 -1
  38. package/api-services/modules/super-admin/index.js.gz +0 -0
  39. package/api-services/modules/supplier/index.js +749 -730
  40. package/api-services/modules/supplier/index.js.gz +0 -0
  41. package/api-services/modules/supplychain-manage/index.js +2 -1
  42. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  43. package/api-services/modules/systemConfiguration/index.js +747 -728
  44. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  45. package/api-services/modules/tool/index.js +729 -746
  46. package/api-services/modules/tool/index.js.gz +0 -0
  47. package/api-services/src/create-service/index.js +746 -727
  48. package/api-services/src/create-service/index.js.gz +0 -0
  49. package/common-tools/handle-data/index.d.ts +5 -0
  50. package/common-tools/handle-data/index.js +15 -2
  51. package/create-api-service/index.d.ts +5 -1
  52. package/create-api-service/index.js +2 -1
  53. package/create-api-service/index.js.gz +0 -0
  54. package/curring-http/type.d.ts +3 -0
  55. package/esm-map.json +2 -1
  56. package/package.json +4 -4
@@ -4,3 +4,8 @@
4
4
  * @returns
5
5
  */
6
6
  export declare const isEmpty: (value: any) => boolean;
7
+ /**
8
+ * 处理多语言在打包时的数据
9
+ * @param opt
10
+ */
11
+ export declare const handleI18nData: (opt: any) => unknown;
@@ -1,4 +1,17 @@
1
- const t = (n) => n === null || typeof n > "u" || n === "";
1
+ const s = (t) => t === null || typeof t > "u" || t === "", f = async (t) => {
2
+ let { pathname: o = "back-end", langArr: l = ["zh-CN", "en"] } = t || {}, r = "", n = {};
3
+ r = "/";
4
+ for (let e of l)
5
+ if (!n[e]) {
6
+ const a = await import(
7
+ /* @vite-ignore */
8
+ `${r}/i18n/${o}/${e}.js`
9
+ );
10
+ n[e] = (a == null ? void 0 : a.default) || {};
11
+ }
12
+ return n;
13
+ };
2
14
  export {
3
- t as isEmpty
15
+ f as handleI18nData,
16
+ s as isEmpty
4
17
  };
@@ -1,3 +1,7 @@
1
1
  import { CurringConfigFun } from '../curring-http/type';
2
-
2
+ declare global {
3
+ interface Window {
4
+ vueRouter: any;
5
+ }
6
+ }
3
7
  export declare const createService: (urlPrefix: string, customConfig?: CurringConfigFun) => any;
@@ -3198,9 +3198,10 @@ kn(Tl);
3198
3198
  Ut.extend(Vn);
3199
3199
  Ut.extend(Kn);
3200
3200
  const Vt = Ur(), Bn = Vt.sso ?? !0, xl = Vt.i18n ?? !0, Ln = Vt.noRedireLogin ?? !1, Un = () => {
3201
+ var e, n;
3201
3202
  if (Ln) return;
3202
3203
  const t = "/login";
3203
- location.pathname !== t && (window.sessionStorage.clear(), window.localStorage.clear(), window.__isAutoCloseApp = !1, location.replace(`/#${t}`));
3204
+ location.pathname !== t && (window.sessionStorage.clear(), window.localStorage.clear(), window.__isAutoCloseApp = !1, (n = (e = window.top) == null ? void 0 : e.vueRouter) == null || n.replace(t));
3204
3205
  }, Cl = async (t) => {
3205
3206
  var n;
3206
3207
  return ((n = t.config) == null ? void 0 : n.responseType) === "blob" ? t : t.data ?? t;
Binary file
@@ -54,6 +54,9 @@ export type CurringConfig = AxiosRequestConfig & {
54
54
 
55
55
  /** 开启CSRF安全选项 */
56
56
  csrf?: boolean
57
+
58
+ /** 是否启用国际化,默认为true */
59
+ i18n?: boolean
57
60
  }
58
61
 
59
62
  export type Method = 'get' | 'post' | 'put' | 'delete' | 'patch'
package/esm-map.json CHANGED
@@ -142,5 +142,6 @@
142
142
  "analyApi": "/api-services/modules/iot/index",
143
143
  "calcTextWidth": "/common-tools/calc-text-width/index",
144
144
  "getFileExtension": "/common-tools/get-file-extension/index",
145
- "getLanguages": "/common-info/index"
145
+ "getLanguages": "/common-info/index",
146
+ "handleI18nData": "/common-tools/handle-data/index"
146
147
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@das-fed/upf-utils",
3
- "version": "6.4.0-dev.152",
3
+ "version": "6.4.0-dev.154",
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.152",
12
+ "@das-fed/upf-utils": "6.4.0-dev.154",
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.152",
25
- "@das-fed/upf-web": "6.4.0-dev.152",
24
+ "@das-fed/upf-cli": "6.4.0-dev.154",
25
+ "@das-fed/upf-web": "6.4.0-dev.154",
26
26
  "@types/js-cookie": "^3.0.6",
27
27
  "@types/lodash-es": "^4.17.12",
28
28
  "@types/qs": "^6.9.15",