n20-common-lib 2.22.52 → 2.22.53

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 (97) hide show
  1. package/package.json +1 -1
  2. package/src/components/AIButton/index.vue +6 -5
  3. package/src/components/ApprovalButtons/index.vue +3 -3
  4. package/src/components/ApprovalButtons/indexApp.vue +10 -29
  5. package/src/components/ApprovalButtons/selectSpr.vue +1 -1
  6. package/src/components/ApprovalButtons/showAppOpi.vue +5 -5
  7. package/src/components/ApprovalButtons/showOtherAttr.vue +2 -2
  8. package/src/components/ApprovalButtons/showOtherAttrNew.vue +8 -6
  9. package/src/components/ApprovalCard/index.vue +6 -6
  10. package/src/components/ApprovalCard/indexApp.vue +2 -2
  11. package/src/components/ApprovalRecord/approvalImg.vue +1 -1
  12. package/src/components/ApprovalRecord/approvalImgPro/child.vue +3 -3
  13. package/src/components/ApprovalRecord/approvalImgPro/index.vue +3 -3
  14. package/src/components/AttachmentPass/index.vue +7 -7
  15. package/src/components/DateChoose/index.vue +41 -36
  16. package/src/components/DatePicker/index.vue +2 -2
  17. package/src/components/DateSelect/busiDate.vue +5 -4
  18. package/src/components/DateSelect/index.vue +9 -8
  19. package/src/components/DateSelect/quarterDatePicker.vue +12 -11
  20. package/src/components/Diff/index.vue +2 -1
  21. package/src/components/DynamicField/DynamicField.vue +1 -1
  22. package/src/components/DynamicField/DynamicFieldMixin.js +3 -2
  23. package/src/components/DynamicField/DynamicFieldOptions.vue +80 -58
  24. package/src/components/DynamicField/DynamicTable.vue +4 -4
  25. package/src/components/DynamicField/contentPop.vue +8 -6
  26. package/src/components/DynamicField/tableList.vue +7 -5
  27. package/src/components/DynamicField/tableView.vue +20 -6
  28. package/src/components/ElectronicArchive/index.vue +18 -16
  29. package/src/components/EventBubble/demo/c.vue +2 -1
  30. package/src/components/FileExportAsync/index.vue +11 -10
  31. package/src/components/FileImport/index.vue +2 -1
  32. package/src/components/FileUploadTable/FileUploadTableV3.vue +10 -11
  33. package/src/components/FileUploadTable/aiCheckDialog.vue +13 -11
  34. package/src/components/FileUploadTable/index.vue +15 -14
  35. package/src/components/Filters/indexO.vue +3 -2
  36. package/src/components/HandlingAdvice/index.vue +4 -3
  37. package/src/components/InputNumber/index.vue +2 -1
  38. package/src/components/Layout/HeaderWrap/changePwd.vue +8 -7
  39. package/src/components/Layout/HeaderWrap/index.vue +11 -10
  40. package/src/components/Layout/HeaderWrap/indexN.vue +21 -20
  41. package/src/components/Layout/HeaderWrap/noticePop.vue +8 -7
  42. package/src/components/Layout/HeaderWrap/switchUser.vue +1 -1
  43. package/src/components/Layout/index.vue +2 -1
  44. package/src/components/Layout/indexN.vue +2 -1
  45. package/src/components/LoginSetting/index.vue +14 -13
  46. package/src/components/LoginSetting/indexN.vue +11 -10
  47. package/src/components/LoginSetting/setItem.vue +22 -21
  48. package/src/components/LoginTemporary/form.vue +17 -16
  49. package/src/components/LoginTemporary/index.vue +5 -4
  50. package/src/components/LoginTemporary/indexN.vue +20 -19
  51. package/src/components/LoginTemporary/retrievePw.vue +11 -10
  52. package/src/components/PageHeader/index.vue +2 -1
  53. package/src/components/SelectDatePickerPro/busiDate.vue +6 -4
  54. package/src/components/SelectDatePickerPro/halfYearPicker.vue +3 -2
  55. package/src/components/SelectDatePickerPro/index.vue +13 -11
  56. package/src/components/SelectDatePickerPro/quarterDatePicker.vue +6 -4
  57. package/src/components/SelectTree/pro.vue +1 -1
  58. package/src/components/ShowColumn/index.vue +13 -12
  59. package/src/components/Stamp/index.vue +8 -7
  60. package/src/components/Statis/index.vue +9 -8
  61. package/src/components/Statis/statisItem.vue +4 -3
  62. package/src/components/Table/indexO.vue +2 -1
  63. package/src/components/TablePro/filterContent.vue +2 -2
  64. package/src/components/TablePro/filterContent_tree.vue +6 -5
  65. package/src/components/TablePro/index.js +2 -1
  66. package/src/components/TablePro/index.vue +2 -1
  67. package/src/components/TableTransfer/index.vue +2 -1
  68. package/src/components/Upload/index.vue +9 -8
  69. package/src/components/Upload/uploadMsg.vue +2 -1
  70. package/src/components/WornPagination/index.vue +3 -1
  71. package/src/components/operatingStatus/index.vue +9 -7
  72. package/src/i18n.json +5800 -714
  73. package/src/index.js +2 -2
  74. package/src/plugins/SetMenuTree/index.vue +1 -1
  75. package/src/plugins/SetMenuTree/setmenutree.vue +36 -34
  76. package/src/plugins/Sign/CaMap.js +12 -11
  77. package/src/plugins/Sign/Itrus/index.js +58 -56
  78. package/src/plugins/Sign/Itrus/sign_3720.js +53 -51
  79. package/src/plugins/Sign/NetSM3/index.js +12 -10
  80. package/src/plugins/Sign/NetV3/index.js +20 -18
  81. package/src/plugins/Sign/SkfSign/index.js +12 -10
  82. package/src/plugins/Sign/bjca/XTXSAB.js +17 -16
  83. package/src/plugins/Sign/bjca/index.js +19 -17
  84. package/src/plugins/Sign/cfca/index.js +11 -9
  85. package/src/plugins/Sign/codeMap.js +151 -150
  86. package/src/plugins/Sign/hnca/index.js +51 -49
  87. package/src/plugins/Sign/index.js +6 -4
  88. package/src/plugins/Sign/kySign/index.js +11 -9
  89. package/src/plugins/Sign/netca/index.js +9 -7
  90. package/src/plugins/Sign/netca/netca.base.1.1.0.js +29 -28
  91. package/src/plugins/Sign/sdca/index.js +17 -15
  92. package/src/plugins/Sign/sign.js +10 -8
  93. package/src/plugins/Sign/signV3/sign.js +14 -12
  94. package/src/plugins/Sign/sign_back.js +11 -9
  95. package/src/utils/amountInWords.js +8 -6
  96. package/src/utils/axios.js +9 -8
  97. package/src/utils/relaNo.js +3 -1
@@ -1,3 +1,4 @@
1
+ import { $lc } from '../../../utils/i18n/index.js'
1
2
  /*******************************************************
2
3
  *
3
4
  * 函数名称:Base64encode()
@@ -268,29 +269,29 @@ function _utf8_decode(utftext) {
268
269
  /**
269
270
  * 错误信息提示列表
270
271
  */
271
- var ERROR_MESSAGE_NOT_LOADLIBRARY = "控件加载失败,错误码:";
272
- var ERROR_MESSAGE_NOT_FIND_UKEY = "未找到UKey!\n1.请确认是否安装最新驱动!\n2.计算机是否插入湖南CA UKey!";
273
- var ERROR_MSSSAGE_FIND_MORE_UKEY = "计算机插入多个UKey,请拔除多余“湖南CA UKey”!";
274
- var ERROR_MESSAGE_NOT_INSTANCE_DEVICE = "USBKey实例化失败,请确认此UKey是否插入计算机!\n点击‘刷新’按钮,更新设备列表。\n错误码:";
275
- var ERROR_MESSAGE_USERPIN_LENGTH = "Ukey密码必须为4~16位!";
276
- var ERROR_MESSAGE_USERPIN_IS_ERROR = "UKey密码错误";
277
- var ERROR_MESSAGE_USERPIN_CHANGE_ERROR = "UKey密码修改失败";
278
- var ERROR_MESSAGE_KEY_NOT_EXIT = "UKey不存在,请确认此UKey是否插入计算机,并点击'刷新'按钮,更新设备列表!";
279
- var ERROR_MESSAGE_USERNAME_IS_NULL = "请点击‘刷新’按钮,更新设备列表并选择相应设备!";
280
- var ERROR_MESSAGE_KEY_EXPORT_CERT = "证书获取失败,请加检测Key中是否存在证书!";
281
- var ERROR_MESSAGE_SET_DIGEST_METHOD_ERROR = "设置摘要算法失败,请重新刷新浏览器!";
282
- var ERROR_MESSAGE_SET_USERID_ERROR = "设置用户ID失败,请重新刷新浏览器";
283
- var ERROR_MESSAGE_SIGN_ORIGINALDATA_IS_NULL = "签名失败,待签名原文不能为空";
284
- var ERROR_MESSAGE_SIGN_ERROR = "签名失败,返回错误码:";
285
- var ERROR_MESSAGE_USERNAMEGN_IS_NULL = "请点击‘刷新’按钮,更新设备列表并选择相应设备!";
286
- var ERROR_MESSAGE_USERNAMEGN_TO_USERNAME_ERROR = "证书G项信息转化证书名称失败,请点击“刷新”按钮!";
287
- var ERROR_MESSAGE_KEY_LIBRAY = "加载国密库失败!";
288
- var ERROR_MESSAGE_ENCRYPT_DATA_IS_NULL = "加密失败:待加密原文不能为空!";
289
- var ERROR_MESSAGE_DECRYPT_DATA_IS_NULL = "解密失败:待解密密文不能为空!";
290
- var ERROR_MESSAGE_DECRYPT_DATA_IS_ERROR = "解密失败:请确认密文是否完整!\n解密所采用的Ukey是否为加密时的Ukey!";
291
- var ERROR_MESSAGE_GET_REMOTEUNLOCKREQUEST_FAIL = "申请解锁请求失败!";
292
- var ERROR_MESSAGE_GET_REMOTEUNLOCKREQUEST_NOT_SUPPORT = "此型号Ukey不支持解锁!";
293
- var ERROR_MESSAGE_REMOTE_UNLOCK_FAIL = "Ukey解锁失败!";
272
+ var ERROR_MESSAGE_NOT_LOADLIBRARY = $lc("控件加载失败,错误码:");
273
+ var ERROR_MESSAGE_NOT_FIND_UKEY = $lc("未找到UKey!\n1.请确认是否安装最新驱动!\n2.计算机是否插入湖南CA UKey!");
274
+ var ERROR_MSSSAGE_FIND_MORE_UKEY = $lc("计算机插入多个UKey,请拔除多余“湖南CA UKey”!");
275
+ var ERROR_MESSAGE_NOT_INSTANCE_DEVICE = $lc("USBKey实例化失败,请确认此UKey是否插入计算机!\n点击‘刷新’按钮,更新设备列表。\n错误码:");
276
+ var ERROR_MESSAGE_USERPIN_LENGTH = $lc("Ukey密码必须为4~16位!");
277
+ var ERROR_MESSAGE_USERPIN_IS_ERROR = $lc("UKey密码错误");
278
+ var ERROR_MESSAGE_USERPIN_CHANGE_ERROR = $lc("UKey密码修改失败");
279
+ var ERROR_MESSAGE_KEY_NOT_EXIT = $lc("UKey不存在,请确认此UKey是否插入计算机,并点击'刷新'按钮,更新设备列表!");
280
+ var ERROR_MESSAGE_USERNAME_IS_NULL = $lc("请点击‘刷新’按钮,更新设备列表并选择相应设备!");
281
+ var ERROR_MESSAGE_KEY_EXPORT_CERT = $lc("证书获取失败,请加检测Key中是否存在证书!");
282
+ var ERROR_MESSAGE_SET_DIGEST_METHOD_ERROR = $lc("设置摘要算法失败,请重新刷新浏览器!");
283
+ var ERROR_MESSAGE_SET_USERID_ERROR = $lc("设置用户ID失败,请重新刷新浏览器");
284
+ var ERROR_MESSAGE_SIGN_ORIGINALDATA_IS_NULL = $lc("签名失败,待签名原文不能为空");
285
+ var ERROR_MESSAGE_SIGN_ERROR = $lc("签名失败,返回错误码:");
286
+ var ERROR_MESSAGE_USERNAMEGN_IS_NULL = $lc("请点击‘刷新’按钮,更新设备列表并选择相应设备!");
287
+ var ERROR_MESSAGE_USERNAMEGN_TO_USERNAME_ERROR = $lc("证书G项信息转化证书名称失败,请点击“刷新”按钮!");
288
+ var ERROR_MESSAGE_KEY_LIBRAY = $lc("加载国密库失败!");
289
+ var ERROR_MESSAGE_ENCRYPT_DATA_IS_NULL = $lc("加密失败:待加密原文不能为空!");
290
+ var ERROR_MESSAGE_DECRYPT_DATA_IS_NULL = $lc("解密失败:待解密密文不能为空!");
291
+ var ERROR_MESSAGE_DECRYPT_DATA_IS_ERROR = $lc("解密失败:请确认密文是否完整!\n解密所采用的Ukey是否为加密时的Ukey!");
292
+ var ERROR_MESSAGE_GET_REMOTEUNLOCKREQUEST_FAIL = $lc("申请解锁请求失败!");
293
+ var ERROR_MESSAGE_GET_REMOTEUNLOCKREQUEST_NOT_SUPPORT = $lc("此型号Ukey不支持解锁!");
294
+ var ERROR_MESSAGE_REMOTE_UNLOCK_FAIL = $lc("Ukey解锁失败!");
294
295
 
295
296
  /**
296
297
  * 私有变量
@@ -1067,7 +1068,7 @@ function _utf8_decode(utftext) {
1067
1068
  resData = _Base64decode(m_DecryptData);
1068
1069
  } catch (e) {
1069
1070
  resData = m_DecryptData;
1070
- LAST_ERRORSTRING = "解密失败:Base64解码失败";
1071
+ LAST_ERRORSTRING = $lc("解密失败:Base64解码失败");
1071
1072
  }
1072
1073
 
1073
1074
  return resData;
@@ -1249,7 +1250,7 @@ function _utf8_decode(utftext) {
1249
1250
  resData = _Base64decode(m_DecryptData);
1250
1251
  } catch (e) {
1251
1252
  resData = m_DecryptData;
1252
- LAST_ERRORSTRING = "解密失败:Base64解码失败";
1253
+ LAST_ERRORSTRING = $lc("解密失败:Base64解码失败");
1253
1254
  }
1254
1255
 
1255
1256
  return resData;
@@ -1318,7 +1319,7 @@ function _utf8_decode(utftext) {
1318
1319
 
1319
1320
  userList = token.SOF_GetUserList();
1320
1321
  if (null == userList || userList.length == 0) {
1321
- LAST_ERRORSTRING = "USBkey中未找到证书!";
1322
+ LAST_ERRORSTRING = $lc("USBkey中未找到证书!");
1322
1323
  return null;
1323
1324
  }
1324
1325
 
@@ -1348,9 +1349,9 @@ function _utf8_decode(utftext) {
1348
1349
  if (resultCode != 0) {
1349
1350
  RetryCount = SOF_GetPinRetryCount();
1350
1351
  if (RetryCount > 0) {
1351
- LAST_ERRORSTRING = ERROR_MESSAGE_USERPIN_IS_ERROR + ",还剩 " + RetryCount + " 次重试机会!";
1352
+ LAST_ERRORSTRING = ERROR_MESSAGE_USERPIN_IS_ERROR + $lc(",还剩") + RetryCount + $lc("次重试机会!");
1352
1353
  } else {
1353
- LAST_ERRORSTRING = "UKey已经锁死,请联系管理员进行解锁!"
1354
+ LAST_ERRORSTRING = $lc("UKey已经锁死,请联系管理员进行解锁!")
1354
1355
  }
1355
1356
  return false;
1356
1357
  }
@@ -1392,9 +1393,9 @@ function _utf8_decode(utftext) {
1392
1393
  if (resultCode != 0) {
1393
1394
  RetryCount = SOF_GetPinRetryCount();
1394
1395
  if (RetryCount > 0) {
1395
- LAST_ERRORSTRING = ERROR_MESSAGE_USERPIN_CHANGE_ERROR + ",还剩 " + RetryCount + " 次重试机会!";
1396
+ LAST_ERRORSTRING = ERROR_MESSAGE_USERPIN_CHANGE_ERROR + $lc(",还剩") + RetryCount + $lc("次重试机会!");
1396
1397
  } else {
1397
- LAST_ERRORSTRING = "UKey已经锁死,请联系管理员进行解锁!"
1398
+ LAST_ERRORSTRING = $lc("UKey已经锁死,请联系管理员进行解锁!")
1398
1399
  }
1399
1400
  return false;
1400
1401
  }
@@ -1440,7 +1441,7 @@ function _utf8_decode(utftext) {
1440
1441
  var resCode = 1;
1441
1442
 
1442
1443
  if (EncryptMethod == undefined || EncryptMethod == null) {
1443
- LAST_ERRORSTRING = "请设置加密方式!";
1444
+ LAST_ERRORSTRING = $lc("请设置加密方式!");
1444
1445
  return false;
1445
1446
  }
1446
1447
 
@@ -1501,7 +1502,7 @@ function _utf8_decode(utftext) {
1501
1502
  encryptData = token.SOF_EncryptDataPKCS7(Base64EncodeCert, inDataBase64, inData.length);
1502
1503
 
1503
1504
  if (encryptData == null || encryptData.length == 0) {
1504
- LAST_ERRORSTRING = "加密失败," + token.SOF_GetLastError();
1505
+ LAST_ERRORSTRING = $lc("加密失败,") + token.SOF_GetLastError();
1505
1506
  return "";
1506
1507
  }
1507
1508
  return encryptData;
@@ -1519,7 +1520,7 @@ function _utf8_decode(utftext) {
1519
1520
 
1520
1521
  m_EncrypedData = "" + encrypedData;
1521
1522
  if (containerName == null || containerName.length == 0) {
1522
- LAST_ERRORSTRING = "应用名称不能为空!";
1523
+ LAST_ERRORSTRING = $lc("应用名称不能为空!");
1523
1524
  return "";
1524
1525
  }
1525
1526
 
@@ -1550,7 +1551,7 @@ function _utf8_decode(utftext) {
1550
1551
  var encryptData = "";
1551
1552
  encryptData = token.SOF_EncryptFileToPKCS7(serial, InFile,OutFile,type);
1552
1553
  if (encryptData == null || encryptData.length == 0) {
1553
- LAST_ERRORSTRING = "加密失败," + token.SOF_GetLastError();
1554
+ LAST_ERRORSTRING = $lc("加密失败,") + token.SOF_GetLastError();
1554
1555
  return "";
1555
1556
  }
1556
1557
  return encryptData;
@@ -1565,7 +1566,7 @@ function _utf8_decode(utftext) {
1565
1566
  var encryptData = "";
1566
1567
  encryptData = token.SOF_DecryptFileToPKCS7(containerName, keySpec, Pkcs7Data,InFile,OutFile,type);
1567
1568
  if (encryptData == null || encryptData.length == 0) {
1568
- LAST_ERRORSTRING = "文件解密失败," + token.SOF_GetLastError();
1569
+ LAST_ERRORSTRING = $lc("文件解密失败,") + token.SOF_GetLastError();
1569
1570
  return "";
1570
1571
  }
1571
1572
  return encryptData;
@@ -1677,7 +1678,7 @@ function _utf8_decode(utftext) {
1677
1678
  var result = false;
1678
1679
 
1679
1680
  if (null == response || response.length == 0) {
1680
- LAST_ERRORSTRING = "解锁失败解:响应不能为空!";
1681
+ LAST_ERRORSTRING = $lc("解锁失败解:响应不能为空!");
1681
1682
  return false;
1682
1683
  }
1683
1684
 
@@ -2662,7 +2663,7 @@ function mTokenPlugin() {
2662
2663
 
2663
2664
  router = document.getElementById("id_mPluginV2Router");
2664
2665
  if (null == router) {
2665
- alert("无法获取到插件,请确认已经安装好插件!");
2666
+ alert($lc("无法获取到插件,请确认已经安装好插件!"));
2666
2667
  }
2667
2668
  /*
2668
2669
  if("https:" == document.location.protocol)
@@ -4979,6 +4980,7 @@ this.SOF_GenerateP10Request = function(_curDevName,container, dn, asymAlg, keySp
4979
4980
 
4980
4981
  import { Message, MessageBox } from 'element-ui'
4981
4982
 
4983
+
4982
4984
  var hnca = new hunca_mToken_core();
4983
4985
  //九恒星开发内容
4984
4986
  export function getCert(dn) {
@@ -4992,7 +4994,7 @@ export function getCert(dn) {
4992
4994
 
4993
4995
  devList = hnca.Hunca_GetUserListGN(); //枚举Ukey,获取证书G项信息列表
4994
4996
  if (null == devList || devList.length == 0) {
4995
- console.log('获取证书失败', hnca.Hunca_GetLastError());
4997
+ console.log($lc("获取证书失败"), hnca.Hunca_GetLastError());
4996
4998
  return 'dnListEmpty'
4997
4999
  }else{
4998
5000
 
@@ -5012,15 +5014,15 @@ export function getCert(dn) {
5012
5014
  dn = getDN()
5013
5015
  }
5014
5016
  if (!dn) {
5015
- Message.error('签名参数DN错误!')
5017
+ Message.error($lc("签名参数DN错误!"))
5016
5018
  return false
5017
5019
  }
5018
5020
  var devList = "";
5019
5021
 
5020
5022
  devList = hnca.Hunca_GetUserListGN(); //枚举Ukey,获取证书G项信息列表
5021
5023
  if (null == devList || devList.length == 0) {
5022
- console.log('获取证书失败', hnca.Hunca_GetLastError());
5023
- Message.warning('请检查key是否插入!')
5024
+ console.log($lc("获取证书失败"), hnca.Hunca_GetLastError());
5025
+ Message.warning($lc("请检查key是否插入!"))
5024
5026
  }else{
5025
5027
  var userName;
5026
5028
  for (var i = 0; i < devList.length; i++) {
@@ -5032,19 +5034,19 @@ export function getCert(dn) {
5032
5034
  }
5033
5035
  }
5034
5036
  if(!userName){
5035
- Message.warning('没有匹配到证书!')
5037
+ Message.warning($lc("没有匹配到证书!"))
5036
5038
  return false;
5037
5039
  }
5038
5040
  var signData;
5039
- await MessageBox.prompt('请输入PIN码', '提示', {
5040
- confirmButtonText: '确定',
5041
- cancelButtonText: '取消',
5041
+ await MessageBox.prompt($lc("请输入PIN码"), $lc("提示"), {
5042
+ confirmButtonText: $lc("确定"),
5043
+ cancelButtonText: $lc("取消"),
5042
5044
  closeOnClickModal: false,
5043
5045
  inputType: 'password'
5044
5046
  }).then(({ value:password }) => {
5045
- console.log('密码', password);
5047
+ console.log($lc("密码"), password);
5046
5048
  if (!hnca.Hunca_PKCS1(plain, userName, password)) {
5047
- Message.warning('证书签名失败:'+hnca.Hunca_GetLastError());
5049
+ Message.warning($lc("证书签名失败:")+hnca.Hunca_GetLastError());
5048
5050
  return false;
5049
5051
  }else{
5050
5052
  signData = hnca.Hunca_GetSignData();
@@ -5057,8 +5059,8 @@ export function getCert(dn) {
5057
5059
  }
5058
5060
 
5059
5061
  } catch (e) {
5060
- console.log('签名失败', e)
5061
- Message.error('签名失败!')
5062
+ console.log($lc("签名失败"), e)
5063
+ Message.error($lc("签名失败!"))
5062
5064
  }
5063
5065
  }
5064
5066
 
@@ -1,7 +1,9 @@
1
+ import { $lc } from '../../utils/i18n/index.js'
1
2
  import importG from '../../utils/importGlobal.js'
2
3
 
3
4
  import CaMap from './CaMap.js'
4
5
 
6
+
5
7
  /**
6
8
  * 统一处理签名逻辑
7
9
  * @param {Object} config - 签名配置
@@ -28,7 +30,7 @@ async function disposeSign(config, p1, p2, p3) {
28
30
  ) {
29
31
  // 确保CaMap中存在SkfSign配置
30
32
  if (!CaMap['SkfSign']) {
31
- console.warn('未找到SkfSign配置,将继续使用原始配置')
33
+ console.warn($lc("未找到SkfSign配置,将继续使用原始配置"))
32
34
  return
33
35
  }
34
36
  config = CaMap['SkfSign']
@@ -40,14 +42,14 @@ async function disposeSign(config, p1, p2, p3) {
40
42
  if (config.needAvailable) {
41
43
  await new Promise((resolve, reject) => {
42
44
  module.availableSign((available) => {
43
- available ? resolve() : reject(new Error('签名不可用'))
45
+ available ? resolve() : reject(new Error($lc("签名不可用")))
44
46
  }, systemIdentification())
45
47
  })
46
48
  }
47
49
 
48
50
  return await module.getSign(p1, p2, p3)
49
51
  } catch (error) {
50
- console.error('签名处理失败:', error)
52
+ console.error($lc("签名处理失败:"), error)
51
53
  throw error
52
54
  }
53
55
  }
@@ -75,7 +77,7 @@ function systemIdentification() {
75
77
  export async function getSign(p1, p2, p3) {
76
78
  let signType = window.sessionStorage.getItem('signType')
77
79
  if (!signType || !CaMap[signType]) {
78
- console.error('请设置签名服务公司sessionStorage.signType')
80
+ console.error($lc("请设置签名服务公司sessionStorage.signType"))
79
81
  signType = CaMap['null'] ? CaMap['null'].type : ''
80
82
  }
81
83
  // 是否使用信安3.0版本sdk (默认使用2.0版本)
@@ -1,8 +1,10 @@
1
+ import { $lc } from '../../../utils/i18n/index.js'
1
2
  import { Message, MessageBox, Notification } from 'element-ui'
2
3
  import { hexToBase64 } from './base64'
3
4
  import { stringToRawHex } from './hex'
4
5
  import SKF from './skf'
5
6
 
7
+
6
8
  /*
7
9
  获取证书列表接口:2.7.1 IWSASkfGetCertList (DllFilePath, SucceedFunction)
8
10
  Attached签名接口:2.7.2 IWSASkfSignData (PlainText, CertIndex, UsbKeyPin, DigestArithmetic, SucceedFunction)
@@ -52,10 +54,10 @@ export function availableSign(fn, url) {
52
54
  }
53
55
 
54
56
  function checkAvailable() {
55
- let name = window.NetSignDownloadName || '科友签名助手'
57
+ let name = window.NetSignDownloadName || $lc("科友签名助手")
56
58
  let url = '/portal/ukeyd_v2.0.17_386.exe'
57
59
  Notification({
58
- title: '提示',
60
+ title: $lc("提示"),
59
61
  dangerouslyUseHTMLString: true,
60
62
  message: `<div>检测到您的电脑中没有安装签名助手,为了不影响使用请使用管理员权限<a class="color-primary" href="${url}" download>下载安装</a>${name}</div>`,
61
63
  duration: 5000
@@ -66,7 +68,7 @@ function checkAvailable() {
66
68
  export async function getSign(plain, dn = getDN()) {
67
69
  // 验证DN参数
68
70
  if (!dn) {
69
- Message.error('签名参数DN错误!')
71
+ Message.error($lc("签名参数DN错误!"))
70
72
  return false
71
73
  }
72
74
  // 处理签名文本
@@ -80,9 +82,9 @@ export async function getSign(plain, dn = getDN()) {
80
82
  }
81
83
  // 获取PIN码并执行签名
82
84
  try {
83
- const { value: pin } = await MessageBox.prompt('请输入PIN码', '提示', {
84
- confirmButtonText: '确定',
85
- cancelButtonText: '取消',
85
+ const { value: pin } = await MessageBox.prompt($lc("请输入PIN码"), $lc("提示"), {
86
+ confirmButtonText: $lc("确定"),
87
+ cancelButtonText: $lc("取消"),
86
88
  closeOnClickModal: false,
87
89
  inputType: 'password'
88
90
  })
@@ -116,7 +118,7 @@ export async function getCertInfo(dn) {
116
118
  try {
117
119
  var rv = SKF_EnumDev(1) // 1: 获取ukey列表
118
120
  if (rv.DevList.length === 0) {
119
- Message.error('没有检测到Ukey!')
121
+ Message.error($lc("没有检测到Ukey!"))
120
122
  resolve(-1)
121
123
  return
122
124
  }
@@ -171,7 +173,7 @@ async function performSign(plainText, value, { Container, Application }) {
171
173
  var rv5 = SKF_VerifyPIN(Application, 1, value)
172
174
  console.log(rv5)
173
175
  if (rv5.Status !== 0) {
174
- Message.error('PIN码错误!')
176
+ Message.error($lc("PIN码错误!"))
175
177
  reject()
176
178
  return false
177
179
  }
@@ -179,7 +181,7 @@ async function performSign(plainText, value, { Container, Application }) {
179
181
  if (rv7.Status === 0) {
180
182
  resolve(rv7.Signature + '@@@' + Container)
181
183
  } else {
182
- Message.error('签名失败!')
184
+ Message.error($lc("签名失败!"))
183
185
  reject()
184
186
  }
185
187
  })
@@ -1,6 +1,8 @@
1
+ import { $lc } from '../../../utils/i18n/index.js'
1
2
  import NetcaPKI from './netca.base.1.1.0.js'
2
3
  import { Message } from 'element-ui'
3
4
 
5
+
4
6
  function utf8_to_b64(str) {
5
7
  return window.btoa(window.unescape(window.encodeURIComponent(str)))
6
8
  }
@@ -27,7 +29,7 @@ export async function getSign(plain, dn) {
27
29
  if (res.status == -11000) {
28
30
  resolve()
29
31
  } else {
30
- errMsg = '没有检测到签名驱动!'
32
+ errMsg = $lc("没有检测到签名驱动!")
31
33
  Message.error(errMsg)
32
34
  reject(errMsg)
33
35
  }
@@ -39,7 +41,7 @@ export async function getSign(plain, dn) {
39
41
  }
40
42
 
41
43
  if (!dn) {
42
- errMsg = '签名参数DN错误!'
44
+ errMsg = $lc("签名参数DN错误!")
43
45
  Message.error(errMsg)
44
46
  return Promise.reject(errMsg)
45
47
  }
@@ -61,13 +63,13 @@ export async function getSign(plain, dn) {
61
63
  CertIdList = res.certInfo
62
64
  resolve()
63
65
  } else {
64
- errMsg = '证书获取失败!'
66
+ errMsg = $lc("证书获取失败!")
65
67
  Message.error(errMsg)
66
68
  return reject(errMsg)
67
69
  }
68
70
  })
69
71
  .Catch(function (res) {
70
- errMsg = '证书获取失败!'
72
+ errMsg = $lc("证书获取失败!")
71
73
  Message.error(errMsg)
72
74
  return reject(errMsg)
73
75
  })
@@ -78,7 +80,7 @@ export async function getSign(plain, dn) {
78
80
  */
79
81
  let certInfo = CertIdList.find((c) => c.userCertServiceId === dn && c.keyUsage === 3)
80
82
  if (!certInfo) {
81
- errMsg = '参数dn信息不批匹配!'
83
+ errMsg = $lc("参数dn信息不批匹配!")
82
84
  Message.error(errMsg)
83
85
  return Promise.reject(errMsg)
84
86
  }
@@ -126,7 +128,7 @@ export async function getSign(plain, dn) {
126
128
  NetcaPKI.signedDataSign(params)
127
129
  .Then((res) => {
128
130
  if (res.result == -5 || res == -81) {
129
- errMsg = '签名失败,密码错误,密码重试次数为:' + res.retrynum
131
+ errMsg = $lc("签名失败,密码错误,密码重试次数为:") + res.retrynum
130
132
  Message.error(errMsg)
131
133
  reject(errMsg)
132
134
  } else {
@@ -134,7 +136,7 @@ export async function getSign(plain, dn) {
134
136
  }
135
137
  })
136
138
  .Catch((res) => {
137
- errMsg = '签名失败,' + res.msg
139
+ errMsg = $lc("签名失败,") + res.msg
138
140
  Message.error(errMsg)
139
141
  reject(errMsg)
140
142
  })
@@ -1,3 +1,4 @@
1
+ import { $lc } from '../../../utils/i18n/index.js'
1
2
  /*
2
3
  NetcaWebsocket 模块(V1.3.0)
3
4
  该模块主要提供核心实现和基础的PKI接口,对外入口为NetcaPKI。通过NetcaPKI.xx调用接口
@@ -114,7 +115,7 @@ var NetcaPKI = (function () {
114
115
  var messageItem = this._registerFunctionPromiseMap[obj.requestId]
115
116
  if (messageItem == null) {
116
117
  //没有办法定位是哪个实例,只是默认不处理该信息
117
- alert('调用证书服务发生异常' + e.message)
118
+ alert($lc("调用证书服务发生异常") + e.message)
118
119
  console.log(e + '_registerFunctionPromiseMap Fail ')
119
120
  } else {
120
121
  if (obj.responseResult.status == 0) {
@@ -125,13 +126,13 @@ var NetcaPKI = (function () {
125
126
  if (e.fileName) {
126
127
  // firefox
127
128
  alert(
128
- '错误文件:' +
129
+ $lc("错误文件:") +
129
130
  e.fileName +
130
- '; 行数:' +
131
+ $lc("; 行数:") +
131
132
  e.lineNumber +
132
- '; 错误类型:' +
133
+ $lc("; 错误类型:") +
133
134
  e.name +
134
- '; 错误信息:' +
135
+ $lc("; 错误信息:") +
135
136
  e.message
136
137
  )
137
138
  } else {
@@ -150,13 +151,13 @@ var NetcaPKI = (function () {
150
151
  if (e.fileName) {
151
152
  // firefox
152
153
  alert(
153
- '错误文件:' +
154
+ $lc("错误文件:") +
154
155
  e.fileName +
155
- '; 行数:' +
156
+ $lc("; 行数:") +
156
157
  e.lineNumber +
157
- '; 错误类型:' +
158
+ $lc("; 错误类型:") +
158
159
  e.name +
159
- '; 错误信息:' +
160
+ $lc("; 错误信息:") +
160
161
  e.message
161
162
  )
162
163
  } else {
@@ -172,7 +173,7 @@ var NetcaPKI = (function () {
172
173
  }
173
174
  } catch (e) {
174
175
  //没有办法定位是哪个实例,只是默认不处理该信息
175
- alert('调用中间件服务发生异常' + e.message)
176
+ alert($lc("调用中间件服务发生异常") + e.message)
176
177
  // 打印调用中间件服务发生的异常
177
178
  console.log(e.stack)
178
179
  }
@@ -180,7 +181,7 @@ var NetcaPKI = (function () {
180
181
 
181
182
  WebSocketManager.prototype.ProcessServiceConnectFailCallBack = function (jsonMessage, addMsg) {
182
183
  if (addMsg == null || addMsg == '') {
183
- addMsg = '数字证书服务连接失败,请确认已安装最新的数字证书驱动!'
184
+ addMsg = $lc("数字证书服务连接失败,请确认已安装最新的数字证书驱动!")
184
185
  }
185
186
 
186
187
  try {
@@ -214,7 +215,7 @@ var NetcaPKI = (function () {
214
215
  //这里应用设置了判断是否连接状态处理
215
216
 
216
217
  if (selfObject._wsObj != null && selfObject._isWsConnecting) {
217
- selfObject.ProcessServiceConnectFailCallBack(jsonMessage, '数字证书服务连接中,请稍后重试!')
218
+ selfObject.ProcessServiceConnectFailCallBack(jsonMessage, $lc("数字证书服务连接中,请稍后重试!"))
218
219
  //alert("数字证书服务连接中,请稍后重试!");
219
220
  return
220
221
  }
@@ -227,7 +228,7 @@ var NetcaPKI = (function () {
227
228
  selfObject._tryConnectIndex = 0
228
229
  selfObject.ProcessServiceConnectFailCallBack(
229
230
  jsonMessage,
230
- '数字证书服务连接失败,请确认已安装最新的数字证书驱动!'
231
+ $lc("数字证书服务连接失败,请确认已安装最新的数字证书驱动!")
231
232
  )
232
233
  // alert("数字证书服务连接失败,请确认已安装最新的数字证书驱动!");
233
234
  return
@@ -278,7 +279,7 @@ var NetcaPKI = (function () {
278
279
  //todo 经发现有时候长连接会断开 这里弹框影响用户体验
279
280
 
280
281
  //alert("连接数字证书服务失败,请刷新页面重试!");
281
- selfObject.ProcessServiceConnectFailCallBack(jsonMessage, '数字证书服务连接中,请稍后重试!')
282
+ selfObject.ProcessServiceConnectFailCallBack(jsonMessage, $lc("数字证书服务连接中,请稍后重试!"))
282
283
  } else {
283
284
  //其他地址连接试试
284
285
  selfObject.WebSocketDoSend(jsonMessage)
@@ -292,7 +293,7 @@ var NetcaPKI = (function () {
292
293
  if (connectInfoItem.canConnect == 1) {
293
294
  selfObject._tryConnectIndex = 0
294
295
  //todo 经发现有时候长连接会断开 这里弹框影响用户体验
295
- selfObject.ProcessServiceConnectFailCallBack(jsonMessage, '数字证书服务连接中,请稍后重试!')
296
+ selfObject.ProcessServiceConnectFailCallBack(jsonMessage, $lc("数字证书服务连接中,请稍后重试!"))
296
297
  //alert("连接数字证书服务失败,请刷新页面重试!");
297
298
  } else {
298
299
  //其他地址连接试试
@@ -313,7 +314,7 @@ var NetcaPKI = (function () {
313
314
  }
314
315
  } catch (e) {
315
316
  //没有办法定位是哪个实例,只是默认不处理该信息
316
- obj = JSON.parse('{"responseResult": {"status":-1,"msg": "响应的数据不是有效的JSON数据"}}')
317
+ obj = JSON.parse($lc("{\"responseResult\": {\"status\":-1,\"msg\": \"响应的数据不是有效的JSON数据\"}}"))
317
318
  // 打印调用中间件服务发生的异常
318
319
  console.log(e.stack)
319
320
  synpromise.FireEvent(null, obj.responseResult)
@@ -336,7 +337,7 @@ var NetcaPKI = (function () {
336
337
  } catch (e) {
337
338
  var NETCA_ERROR_WEBSOCKETCONNECTFAIL = -11000
338
339
  this.ProcessSynMessageCallBack(
339
- createSynCallBackJsonString('创建NetcaPki对象失败', NETCA_ERROR_WEBSOCKETCONNECTFAIL),
340
+ createSynCallBackJsonString($lc("创建NetcaPki对象失败"), NETCA_ERROR_WEBSOCKETCONNECTFAIL),
340
341
  retSynPromise
341
342
  )
342
343
  return retSynPromise
@@ -350,9 +351,9 @@ var NetcaPKI = (function () {
350
351
  var exceptionStr = ''
351
352
  if (e.number == -2146827850) {
352
353
  //对象不支持此属性或方法
353
- exceptionStr = '当前NETCA_Crypto版本可能过低,请确保版本正常'
354
+ exceptionStr = $lc("当前NETCA_Crypto版本可能过低,请确保版本正常")
354
355
  } else {
355
- exceptionStr = '调用NetcaPki.Utilities接口异常'
356
+ exceptionStr = $lc("调用NetcaPki.Utilities接口异常")
356
357
  }
357
358
 
358
359
  var NETCA_ERROR_WEBSOCKETCONNECTFAIL = -11000
@@ -435,7 +436,7 @@ var NetcaPKI = (function () {
435
436
  var NETCA_ERROR_WEBSOCKETCONNECTFAIL = -11000
436
437
  _PkiMgr.ProcessSynMessageCallBack(
437
438
  createSynCallBackJsonString(
438
- '数字证书服务连接失败(1),请确认已安装最新的数字证书驱动',
439
+ $lc("数字证书服务连接失败(1),请确认已安装最新的数字证书驱动"),
439
440
  NETCA_ERROR_WEBSOCKETCONNECTFAIL
440
441
  ),
441
442
  retSynPromise
@@ -452,7 +453,7 @@ var NetcaPKI = (function () {
452
453
  var NETCA_ERROR_WEBSOCKETCONNECTFAIL = -11000
453
454
  _PkiMgr.ProcessSynMessageCallBack(
454
455
  createSynCallBackJsonString(
455
- '数字证书服务连接失败(2),请确认已安装最新的数字证书驱动',
456
+ $lc("数字证书服务连接失败(2),请确认已安装最新的数字证书驱动"),
456
457
  NETCA_ERROR_WEBSOCKETCONNECTFAIL
457
458
  ),
458
459
  retSynPromise
@@ -1469,23 +1470,23 @@ function netca_verifyKeyPwd(password, certEncode, keySN, keyType, SuccessCallBac
1469
1470
  .Then(function (res) {
1470
1471
  if (res.result == 1) {
1471
1472
  var tip =
1472
- '密码验证成功,验证的设备类型为 ' +
1473
+ $lc("密码验证成功,验证的设备类型为") +
1473
1474
  res.type +
1474
- '; 验证的设备序列号为 ' +
1475
+ $lc("; 验证的设备序列号为") +
1475
1476
  res.sn +
1476
- '; 密码剩余重试次数为 ' +
1477
+ $lc("; 密码剩余重试次数为") +
1477
1478
  res.retrynum
1478
1479
 
1479
1480
  SuccessCallBack(res)
1480
1481
  } else {
1481
1482
  var tip =
1482
- '密码验证失败,错误码为' +
1483
+ $lc("密码验证失败,错误码为") +
1483
1484
  res.result +
1484
- '; 验证的设备类型为 ' +
1485
+ $lc("; 验证的设备类型为") +
1485
1486
  res.type +
1486
- '; 验证的设备序列号为 ' +
1487
+ $lc("; 验证的设备序列号为") +
1487
1488
  res.sn +
1488
- '; 密码剩余重试次数为 ' +
1489
+ $lc("; 密码剩余重试次数为") +
1489
1490
  res.retrynum
1490
1491
 
1491
1492
  FailedCallBack(res)