ztxkutils 2.10.66-3 → 2.10.66-30

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 (75) hide show
  1. package/dist/businessTools.js +4 -3
  2. package/dist/dataModel-6c68c88f.js +26 -0
  3. package/dist/dataModel-914b6226.js +26 -0
  4. package/dist/dataModel-b3629ef3.js +26 -0
  5. package/dist/dataModel-f1ef06bc.js +26 -0
  6. package/dist/dataModel.js +2 -1
  7. package/dist/fileOperation.d.ts +19 -0
  8. package/dist/fileOperation.js +60 -18
  9. package/dist/hooks.js +34 -22
  10. package/dist/i18next.d.ts +2 -0
  11. package/dist/i18next.js +2401 -0
  12. package/dist/index.js +5 -4
  13. package/dist/myIndexDb.d.ts +1 -1
  14. package/dist/print.d.ts +2 -4
  15. package/dist/print.js +3 -2
  16. package/dist/reqUrl-ea7ef876.js +83 -0
  17. package/dist/reqUrl.js +1 -1
  18. package/dist/{request-dc69f021.js → request-1e442d5d.js} +26 -16
  19. package/dist/request-40e9ca7b.js +2982 -0
  20. package/dist/{request-87d93572.js → request-4c29d6de.js} +3 -0
  21. package/dist/request-80d1ac80.js +2992 -0
  22. package/dist/request-986d7090.js +2923 -0
  23. package/dist/{request-3c906c2d.js → request-c0970aae.js} +5 -1
  24. package/dist/request-d1972b41.js +2992 -0
  25. package/dist/request-d8d72b87.js +2982 -0
  26. package/dist/request-f600ad7a.js +2992 -0
  27. package/dist/request.js +2 -1
  28. package/dist/stompClient.js +21 -8
  29. package/dist/useHistory.js +7 -0
  30. package/dist/validate-21164759.js +260 -0
  31. package/dist/validate-2138d94a.js +263 -0
  32. package/dist/validate-21b58a69.js +260 -0
  33. package/dist/validate-2de5a28f.js +260 -0
  34. package/dist/validate-ab47ebe9.js +260 -0
  35. package/dist/validate.d.ts +1 -0
  36. package/dist/validate.js +2 -1
  37. package/dist/workflow.js +3 -5
  38. package/locales/en-US.json +64 -0
  39. package/locales/zh-CN.json +64 -0
  40. package/package.json +41 -4
  41. package/zti18n-cli/bin/index.js +3 -0
  42. package/zti18n-cli/index.js +23 -0
  43. package/zti18n-cli/src/command/collect.js +353 -0
  44. package/zti18n-cli/src/command/convert.js +17 -0
  45. package/zti18n-cli/src/command/convert2.js +35 -0
  46. package/zti18n-cli/src/command/initFileConf.js +133 -0
  47. package/zti18n-cli/src/command/publish.js +24 -0
  48. package/zti18n-cli/src/conf/BaseConf.js +21 -0
  49. package/zti18n-cli/src/conf/FileConf.js +116 -0
  50. package/zti18n-cli/src/index.js +75 -0
  51. package/zti18n-cli/src/translate/google.js +87 -0
  52. package/zti18n-cli/src/utils/isChinese.js +3 -0
  53. package/zti18n-cli/src/utils/log.js +8 -0
  54. package/zti18n-cli/src/utils/mergeOptions.js +45 -0
  55. package/zti18n-cli/src/utils/reactOptions.js +73 -0
  56. package/zti18n-cli/src/utils/vueOptions.js +69 -0
  57. package/zti18n-core/index.js +1 -0
  58. package/zti18n-core/src/index.js +5 -0
  59. package/zti18n-core/src/plugin/reactIntlToReactIntlUniversal.js +224 -0
  60. package/zti18n-core/src/plugin/reactIntlUniversalToDi18n.js +64 -0
  61. package/zti18n-core/src/transform/defaultPkMap.js +79 -0
  62. package/zti18n-core/src/transform/transformHtml.js +271 -0
  63. package/zti18n-core/src/transform/transformJs.js +489 -0
  64. package/zti18n-core/src/transform/transformPug.js +272 -0
  65. package/zti18n-core/src/transform/transformReactIntlToReactIntlUniversal.js +96 -0
  66. package/zti18n-core/src/transform/transformReactIntlUniveralToDi18n.js +90 -0
  67. package/zti18n-core/src/transform/transformToDi18n.js +22 -0
  68. package/zti18n-core/src/transform/transformTs.js +41 -0
  69. package/zti18n-core/src/transform/transformVue.js +126 -0
  70. package/zti18n-core/src/transform/transformZeroToDi18n.js +105 -0
  71. package/zti18n-core/src/translate/google.js +6 -0
  72. package/zti18n-core/src/utils/constants.js +3 -0
  73. package/zti18n-core/src/utils/getIgnoreLines.js +14 -0
  74. package/zti18n-core/src/utils/isChinese.js +3 -0
  75. package/zti18n-core/src/utils/log.js +8 -0
package/dist/index.js CHANGED
@@ -1,9 +1,10 @@
1
1
  export { d as authority } from './authority-7a91cb9f.js';
2
- export { d as dataModel } from './dataModel-1fbaff40.js';
2
+ export { d as dataModel } from './dataModel-f1ef06bc.js';
3
3
  export { t as tools } from './tools-390e3466.js';
4
- export { v as validate } from './validate-18e52490.js';
5
- export { r as request } from './request-87d93572.js';
6
- export { r as reqUrl } from './reqUrl-22b880a4.js';
4
+ export { v as validate } from './validate-2138d94a.js';
5
+ export { r as request } from './request-40e9ca7b.js';
6
+ export { r as reqUrl } from './reqUrl-ea7ef876.js';
7
+ import './i18next.js';
7
8
  import './tslib.es6-35653116.js';
8
9
  import 'dayjs';
9
10
  import 'axios';
@@ -1 +1 @@
1
- declare function openDB(dbName: string, version?: number): Promise<unknown>;
1
+ export {};
package/dist/print.d.ts CHANGED
@@ -66,10 +66,8 @@ export declare function htmlToPdfNoCanvas({ pageClassName, dom, isShowPage, file
66
66
  pdfName?: string;
67
67
  isDownload?: boolean;
68
68
  pdfOption?: IPdfOption;
69
- /** 是否添加水印 */
70
- isAddWater?: boolean;
71
- /** 水印base 64字符串 */
72
- waterBase64?: string;
69
+ /** 是否添加水印 */ isAddWater?: boolean;
70
+ /** 水印base 64字符串 */ waterBase64?: string;
73
71
  imgWidth?: number;
74
72
  imgHeight?: number;
75
73
  isCompress?: boolean;
package/dist/print.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { d as __spreadArray, _ as __assign, b as __awaiter, c as __generator } from './tslib.es6-35653116.js';
2
+ import instance from './i18next.js';
2
3
  import { jsPDF } from 'jspdf';
3
4
  import html2canvas from 'html2canvas';
4
5
 
@@ -74,7 +75,7 @@ function createWaterHandle(obj) {
74
75
  // console.log(err);
75
76
  // }
76
77
  // }
77
- var defaultWaterText = '浙商中拓';
78
+ var defaultWaterText = instance.t('浙商中拓');
78
79
  var _a = obj || {}, waterText = _a.waterText, opacity = _a.opacity, fontSize = _a.fontSize, cavansWidth = _a.cavansWidth, cavansHeight = _a.cavansHeight;
79
80
  var canvas = document.createElement('canvas');
80
81
  var defaultCanvasWidth = waterText
@@ -92,7 +93,7 @@ function createWaterHandle(obj) {
92
93
  var ctx = canvas.getContext('2d');
93
94
  if (ctx) {
94
95
  ctx.rotate((-10 * Math.PI) / 180); // 水印旋转角度
95
- ctx.font = (fontSize || '18px') + " \u5FAE\u8F6F\u96C5\u9ED1";
96
+ ctx.font = instance.t('{{slot0}} 微软雅黑', { slot0: fontSize || '18px' });
96
97
  ctx.fillStyle = "rgba(0,0,0," + (opacity ? opacity : '0.07') + ")";
97
98
  ctx.textAlign = 'center';
98
99
  ctx.textBaseline = 'middle';
@@ -0,0 +1,83 @@
1
+ /**
2
+ * @file 项目基本配置,包括各个环境的请求地址
3
+ */
4
+ // 环境变量
5
+ function getReqUrl(processObj) {
6
+ var ENV = processObj.REACT_APP_ENV;
7
+ // api服务器各个环境地址
8
+ var ZT_API_DEV = processObj.REACT_APP_ZT_API_DEV || window.location.origin; // 开发环境
9
+ var ZT_API_TEST = processObj.REACT_APP_ZT_API_TEST || window.location.origin; // 测试环境 https://192.168.0.135:8000
10
+ var ZT_API_STAGE = processObj.REACT_APP_ZT_API_STAGE || window.location.origin; // 阶段性环境 http://192.168.0.134:8000
11
+ var ZT_API_SIM = processObj.REACT_APP_ZT_API_SIM || window.location.origin; // 阶段性环境 http://192.168.0.134:8000
12
+ var ZT_API_PRODUCT = processObj.REACT_APP_ZT_API_PRODUCT || window.location.origin; // 生产环境 http://dz.zmd.com.cn
13
+ var ZT_API_PUBLIC_PRODUCT = processObj.REACT_APP_ZT_API_PUBLIC_PRODUCT ||
14
+ 'https://nportal.zmd.com.cn:18998'; // 生产环境外网api地址 https://m-portal.zmd.com.cn:18998 http://dz.zmd.com.cn:48000
15
+ // 文件服务器
16
+ var ZT_FILE_PREVIEW_DEV = processObj.REACT_APP_ZT_FILE_PREVIEW_DEV || 'http://192.168.0.83:88'; // 开发环境
17
+ var ZT_FILE_PREVIEW_TEST = processObj.REACT_APP_ZT_FILE_PREVIEW_TEST ||
18
+ 'http://preview-test.zmdms.com.cn:30079'; // 测试环境 http://172.55.5.101:33013
19
+ var ZT_FILE_PREVIEW_STAGE = processObj.REACT_APP_ZT_FILE_PREVIEW_STAGE ||
20
+ 'http://preview-stage.zmdms.com.cn:30079'; // 阶段性环境 https://dzfile-prod.zmd.com.cn/
21
+ var ZT_FILE_PREVIEW_SIM = processObj.REACT_APP_ZT_FILE_PREVIEW_SIM ||
22
+ 'https://dzfile-data.zmd.com.cn/'; // 阶段性环境 http://192.168.0.134:8012
23
+ var ZT_FILE_PREVIEW_PRODUCT = processObj.REACT_APP_ZT_FILE_PREVIEW_PRODUCT ||
24
+ 'https://dzfile.zmd.com.cn:8012'; // 生产环境
25
+ // 字体文件附件id
26
+ var ZT_FONTFAMILY_DEV = '1551733945007517697';
27
+ var ZT_FONTFAMILY_TEST = '1551836774183047169';
28
+ var ZT_FONTFAMILY_STAGE = '1551837561144905730';
29
+ var ZT_FONTFAMILY_SIM = '1562010976138207234';
30
+ var ZT_FONTFAMILY_PRODUCT = '1552851055372992513';
31
+ // 实际api请求地址
32
+ var ZT_API_BASEURL = ZT_API_DEV;
33
+ var ZT_API_PUBLICURL = ZT_API_PUBLIC_PRODUCT;
34
+ var ZT_FILE_BASEURL = ZT_FILE_PREVIEW_DEV;
35
+ var ZT_FONTFAMILY_BASEURL = ZT_FONTFAMILY_DEV;
36
+ if (ENV) {
37
+ switch (ENV.toLowerCase()) {
38
+ case 'zt-dev':
39
+ ZT_API_BASEURL = ZT_API_DEV;
40
+ ZT_API_PUBLICURL = ZT_API_DEV;
41
+ ZT_FILE_BASEURL = ZT_FILE_PREVIEW_DEV;
42
+ ZT_FONTFAMILY_BASEURL = ZT_FONTFAMILY_DEV;
43
+ break;
44
+ case 'zt-test':
45
+ ZT_API_BASEURL = ZT_API_TEST;
46
+ ZT_API_PUBLICURL = ZT_API_TEST;
47
+ ZT_FILE_BASEURL = ZT_FILE_PREVIEW_TEST;
48
+ ZT_FONTFAMILY_BASEURL = ZT_FONTFAMILY_TEST;
49
+ break;
50
+ case 'zt-stage':
51
+ ZT_API_BASEURL = ZT_API_STAGE;
52
+ ZT_API_PUBLICURL = ZT_API_STAGE;
53
+ ZT_FILE_BASEURL = ZT_FILE_PREVIEW_STAGE;
54
+ ZT_FONTFAMILY_BASEURL = ZT_FONTFAMILY_STAGE;
55
+ break;
56
+ case 'zt-sim':
57
+ ZT_API_BASEURL = ZT_API_SIM;
58
+ ZT_API_PUBLICURL = ZT_API_SIM;
59
+ ZT_FILE_BASEURL = ZT_FILE_PREVIEW_SIM;
60
+ ZT_FONTFAMILY_BASEURL = ZT_FONTFAMILY_SIM;
61
+ break;
62
+ case 'zt-product':
63
+ ZT_API_BASEURL = ZT_API_PRODUCT;
64
+ ZT_API_PUBLICURL = ZT_API_PUBLIC_PRODUCT;
65
+ ZT_FILE_BASEURL = ZT_FILE_PREVIEW_PRODUCT;
66
+ ZT_FONTFAMILY_BASEURL = ZT_FONTFAMILY_PRODUCT;
67
+ break;
68
+ }
69
+ }
70
+ return {
71
+ ZT_API_BASEURL: ZT_API_BASEURL,
72
+ ZT_FILE_BASEURL: ZT_FILE_BASEURL,
73
+ ZT_API_PUBLICURL: ZT_API_PUBLICURL,
74
+ ZT_FONTFAMILY_BASEURL: ZT_FONTFAMILY_BASEURL,
75
+ };
76
+ }
77
+
78
+ var reqUrl = /*#__PURE__*/Object.freeze({
79
+ __proto__: null,
80
+ getReqUrl: getReqUrl
81
+ });
82
+
83
+ export { getReqUrl as g, reqUrl as r };
package/dist/reqUrl.js CHANGED
@@ -1 +1 @@
1
- export { g as getReqUrl } from './reqUrl-22b880a4.js';
1
+ export { g as getReqUrl } from './reqUrl-ea7ef876.js';
@@ -1,4 +1,5 @@
1
1
  import { a as __rest, _ as __assign } from './tslib.es6-35653116.js';
2
+ import instance from './i18next.js';
2
3
  import axios from 'axios';
3
4
  import { Modal, message } from 'ztxkui';
4
5
  import { c as commonjsGlobal, a as crypto } from './crypto-c481f616.js';
@@ -2452,7 +2453,7 @@ var AxiosCancel = /** @class */ (function () {
2452
2453
  // 将token挂载到当前接口的请求头里面
2453
2454
  config.cancelToken = cancelTokenObj.token;
2454
2455
  if (this.pendingRequests.has(key)) {
2455
- this.pendingRequests.get(key).cancel('拦截重复请求');
2456
+ this.pendingRequests.get(key).cancel(instance.t('拦截重复请求'));
2456
2457
  this.pendingRequests.delete(key);
2457
2458
  }
2458
2459
  this.pendingRequests.set(key, {
@@ -2512,7 +2513,7 @@ function checkStatus(response, jumpCallback, otherOptions) {
2512
2513
  refreshTokenRequst(jumpCallback, InnerAuthorization);
2513
2514
  }
2514
2515
  else {
2515
- message.info("\u5237\u65B0token\u906D\u5230\u9891\u7E41\u8C03\u7528\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u67E5\u770B\u662F\u5426\u63A5\u53E3\u6743\u9650\u51FA\u73B0\u95EE\u9898\uFF0C\u53EF\u80FD\u662F" + (response === null || response === void 0 ? void 0 : response.config.url) + "\u63A5\u53E3\u51FA\u73B0\u95EE\u9898", 5);
2516
+ message.info(instance.t('刷新token遭到频繁调用,请联系管理员查看是否接口权限出现问题,可能是{{slot0}}接口出现问题', { slot0: response === null || response === void 0 ? void 0 : response.config.url }), 5);
2516
2517
  requestTokenEndTime = 0;
2517
2518
  }
2518
2519
  }
@@ -2560,6 +2561,7 @@ function refreshTokenRequst(jumpCallback, Authorization) {
2560
2561
  // 刷新成功 重置token 重置refresh-token
2561
2562
  setToken(data === null || data === void 0 ? void 0 : data.access_token);
2562
2563
  setRefreshToken(data === null || data === void 0 ? void 0 : data.refresh_token);
2564
+ message.info(instance.t('token已经刷新成功,请重新提交!', {}));
2563
2565
  onAccessTokenFetched();
2564
2566
  isRefreshing = true;
2565
2567
  }
@@ -2573,7 +2575,7 @@ function refreshTokenRequst(jumpCallback, Authorization) {
2573
2575
  jumpCallback(401);
2574
2576
  }
2575
2577
  else {
2576
- message.info("\u767B\u5F55\u8FC7\u671F\uFF01", 3.5, function () {
2578
+ message.info(instance.t('登录过期!', {}), 3.5, function () {
2577
2579
  isExpiration = false;
2578
2580
  });
2579
2581
  window.location.href = '/login';
@@ -2589,7 +2591,7 @@ function refreshTokenRequst(jumpCallback, Authorization) {
2589
2591
  jumpCallback(401);
2590
2592
  }
2591
2593
  else {
2592
- message.info("\u767B\u5F55\u8FC7\u671F\uFF01", 3.5, function () {
2594
+ message.info(instance.t('登录过期!', {}), 3.5, function () {
2593
2595
  isExpiration = false;
2594
2596
  });
2595
2597
  window.location.href = '/login';
@@ -2634,7 +2636,7 @@ function setInterceptorsResponse(jumpCallback, otherOptions) {
2634
2636
  return Promise.reject(response);
2635
2637
  }
2636
2638
  }, function (error) {
2637
- var _a, _b, _c, _d, _e;
2639
+ var _a, _b, _c, _d, _e, _f;
2638
2640
  // catchPromiseObj = [];
2639
2641
  console.error(error);
2640
2642
  var errRes = error === null || error === void 0 ? void 0 : error.response;
@@ -2649,8 +2651,9 @@ function setInterceptorsResponse(jumpCallback, otherOptions) {
2649
2651
  });
2650
2652
  });
2651
2653
  /** 如果接口出错了,清理掉这个错误的接口缓存 */
2652
- if (autonomousCatchingPromiseObj[error === null || error === void 0 ? void 0 : error.config.url]) {
2653
- autonomousCatchingPromiseObj[error === null || error === void 0 ? void 0 : error.config.url] = undefined;
2654
+ var autonomousCatchingKey = ((_a = error === null || error === void 0 ? void 0 : error.config) === null || _a === void 0 ? void 0 : _a.autonomousKey) || (error === null || error === void 0 ? void 0 : error.config.url);
2655
+ if (autonomousCatchingPromiseObj[autonomousCatchingKey]) {
2656
+ autonomousCatchingPromiseObj[autonomousCatchingKey] = undefined;
2654
2657
  }
2655
2658
  if (item !== -1) {
2656
2659
  catchPromiseObj.splice(item, 1);
@@ -2660,11 +2663,15 @@ function setInterceptorsResponse(jumpCallback, otherOptions) {
2660
2663
  // 超时异常统一处理,超时的异常没有response值,只能通过toString处理
2661
2664
  if (!errRes && error.toString().indexOf(timeoutNum + "ms") !== -1) {
2662
2665
  if (!isMessage) {
2663
- if (((_b = (_a = error === null || error === void 0 ? void 0 : error.config) === null || _a === void 0 ? void 0 : _a.method) === null || _b === void 0 ? void 0 : _b.toUpperCase()) === 'POST' &&
2666
+ if (((_c = (_b = error === null || error === void 0 ? void 0 : error.config) === null || _b === void 0 ? void 0 : _b.method) === null || _c === void 0 ? void 0 : _c.toUpperCase()) === 'POST' &&
2664
2667
  __isTimeoutMessage) {
2665
2668
  isMessage = true;
2666
2669
  Modal.confirm({
2667
- title: "\u8BF7\u6C42\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\uFF0C\u8BF7\u53BB\u5217\u8868\u786E\u8BA4\u6570\u636E\u662F\u5426\u63D2\u5165\u6210\u529F\uFF0C\u8BF7\u52FF\u91CD\u590D\u63D0\u4EA4\uFF01\n\u63A5\u53E3\u5730\u5740:" + ((_c = error === null || error === void 0 ? void 0 : error.config) === null || _c === void 0 ? void 0 : _c.url) + "\n\u8BF7\u6C42\u65B9\u5F0F:" + ((_d = error === null || error === void 0 ? void 0 : error.config) === null || _d === void 0 ? void 0 : _d.method) + "\n\u8BF7\u6C42\u8D85\u65F6\u65F6\u95F4:" + ((_e = error === null || error === void 0 ? void 0 : error.config) === null || _e === void 0 ? void 0 : _e.timeout),
2670
+ title: instance.t('请求超时,请稍后再试,请去列表确认数据是否插入成功,请勿重复提交! 接口地址:{{slot0}} 请求方式:{{slot1}} 请求超时时间:{{slot2}}', {
2671
+ slot0: (_d = error === null || error === void 0 ? void 0 : error.config) === null || _d === void 0 ? void 0 : _d.url,
2672
+ slot1: (_e = error === null || error === void 0 ? void 0 : error.config) === null || _e === void 0 ? void 0 : _e.method,
2673
+ slot2: (_f = error === null || error === void 0 ? void 0 : error.config) === null || _f === void 0 ? void 0 : _f.timeout,
2674
+ }),
2668
2675
  okCancel: false,
2669
2676
  onOk: function () {
2670
2677
  isMessage = false;
@@ -2678,7 +2685,7 @@ function setInterceptorsResponse(jumpCallback, otherOptions) {
2678
2685
  if ((errRes === null || errRes === void 0 ? void 0 : errRes.status) === 404) {
2679
2686
  if (!isNotFound) {
2680
2687
  isNotFound = true;
2681
- message.info("\u63A5\u53E3: " + errRes.config.url + " \u672A\u627E\u5230\uFF01", 3.5, function () {
2688
+ message.info(instance.t('接口: {{slot0}} 未找到!', { slot0: errRes.config.url }), 3.5, function () {
2682
2689
  isNotFound = false;
2683
2690
  });
2684
2691
  }
@@ -2694,7 +2701,7 @@ function setInterceptorsResponse(jumpCallback, otherOptions) {
2694
2701
  jumpCallback(errRes === null || errRes === void 0 ? void 0 : errRes.status);
2695
2702
  }
2696
2703
  else {
2697
- message.info("\u4F60\u7684\u8D26\u53F7\u5DF2\u5728\u5176\u4ED6\u5730\u65B9\u767B\u5F55\uFF01", 3.5, function () {
2704
+ message.info(instance.t('你的账号已在其他地方登录!', {}), 3.5, function () {
2698
2705
  isOffSite = false;
2699
2706
  });
2700
2707
  window.location.href = '/login';
@@ -2712,7 +2719,7 @@ function setInterceptorsResponse(jumpCallback, otherOptions) {
2712
2719
  jumpCallback(errRes === null || errRes === void 0 ? void 0 : errRes.status);
2713
2720
  }
2714
2721
  else {
2715
- message.info("\u767B\u5F55\u8FC7\u671F\uFF01", 3.5, function () {
2722
+ message.info(instance.t('登录过期!', {}), 3.5, function () {
2716
2723
  isExpiration = false;
2717
2724
  });
2718
2725
  window.location.href = '/login';
@@ -2778,7 +2785,7 @@ function request(myOptions, jumpCallback, otherOptions) {
2778
2785
  setInterceptorsResponse(jumpCallback, otherOptions);
2779
2786
  isFirstSet = true;
2780
2787
  }
2781
- var encryptionType = myOptions.encryptionType, isTimeoutMessage = myOptions.isTimeoutMessage, isForceRequest = myOptions.isForceRequest, _m = myOptions.noCatchUrl, noCatchUrl = _m === void 0 ? [] : _m, isCatch = myOptions.isCatch, mustCatch = myOptions.mustCatch, isAutonomousCatch = myOptions.isAutonomousCatch, _o = myOptions.autonomousCount, autonomousCount = _o === void 0 ? 1 : _o, options = __rest(myOptions, ["encryptionType", "isTimeoutMessage", "isForceRequest", "noCatchUrl", "isCatch", "mustCatch", "isAutonomousCatch", "autonomousCount"]);
2788
+ var encryptionType = myOptions.encryptionType, isTimeoutMessage = myOptions.isTimeoutMessage, isForceRequest = myOptions.isForceRequest, _m = myOptions.noCatchUrl, noCatchUrl = _m === void 0 ? [] : _m, isCatch = myOptions.isCatch, mustCatch = myOptions.mustCatch, isAutonomousCatch = myOptions.isAutonomousCatch, _o = myOptions.autonomousCount, autonomousCount = _o === void 0 ? 1 : _o, autonomousKey = myOptions.autonomousKey, options = __rest(myOptions, ["encryptionType", "isTimeoutMessage", "isForceRequest", "noCatchUrl", "isCatch", "mustCatch", "isAutonomousCatch", "autonomousCount", "autonomousKey"]);
2782
2789
  timeoutNum =
2783
2790
  typeof myOptions.timeout === 'number' ? myOptions.timeout : timeoutNum;
2784
2791
  __isTimeoutMessage = isTimeoutMessage;
@@ -2792,6 +2799,8 @@ function request(myOptions, jumpCallback, otherOptions) {
2792
2799
  'Zmdms-Auth': "bearer " + token,
2793
2800
  'Tenant-Id': '000000',
2794
2801
  Authorization: InnerAuthorization ? InnerAuthorization : Authorization,
2802
+ // 设置语言包请求头
2803
+ 'Zmdms-Lang': window.localStorage.getItem('languageType') || 'zh_CN',
2795
2804
  },
2796
2805
  };
2797
2806
  if ((_a = options.baseURL) === null || _a === void 0 ? void 0 : _a.endsWith('/')) {
@@ -2810,7 +2819,7 @@ function request(myOptions, jumpCallback, otherOptions) {
2810
2819
  options.params = transformObj(options.params);
2811
2820
  }
2812
2821
  // 将传入配置与默认配置混合
2813
- var newOptions = __assign(__assign(__assign({}, defaultOptions), options), { headers: __assign(__assign({}, defaultOptions.headers), options.headers) });
2822
+ var newOptions = __assign(__assign(__assign({}, defaultOptions), options), { autonomousKey: autonomousKey, headers: __assign(__assign({}, defaultOptions.headers), options.headers) });
2814
2823
  // 特殊请求处理
2815
2824
  if (((_e = newOptions.method) === null || _e === void 0 ? void 0 : _e.toUpperCase()) === 'POST' ||
2816
2825
  ((_f = newOptions.method) === null || _f === void 0 ? void 0 : _f.toUpperCase()) === 'PUT' ||
@@ -2856,11 +2865,12 @@ function request(myOptions, jumpCallback, otherOptions) {
2856
2865
  }
2857
2866
  // 自主缓存请求。默认这个缓存只会针对一个url缓存一次请求
2858
2867
  if (isAutonomousCatch) {
2859
- var item = autonomousCatchingPromiseObj[newOptions.url];
2868
+ var autonomousCatchingKey = autonomousKey || newOptions.url;
2869
+ var item = autonomousCatchingPromiseObj[autonomousCatchingKey];
2860
2870
  // 如果当前接口没有缓存 缓存住,并且返回接口结果
2861
2871
  if (!item || !Array.isArray(item)) {
2862
2872
  var result = axios(newOptions);
2863
- autonomousCatchingPromiseObj[newOptions.url] = [
2873
+ autonomousCatchingPromiseObj[autonomousCatchingKey] = [
2864
2874
  {
2865
2875
  params: newOptions.params,
2866
2876
  promiseObj: result,