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
  function Certificate(r) {
2
3
  var t = {}
3
4
  if (
@@ -511,7 +512,7 @@ function TCACErr(r) {
511
512
  }),
512
513
  (this.toStr = function () {
513
514
  for (var r = '', t = 0; t < this._errarr.length; t++)
514
- r += this._errarr[t].msg + ', 错误码:0x' + this._errarr[t].code + ', \r\n'
515
+ r += this._errarr[t].msg + $lc(", 错误码:0x") + this._errarr[t].code + ', \r\n'
515
516
  return r.substr(0, r.length - 4)
516
517
  })
517
518
  }
@@ -878,10 +879,10 @@ var TCA = {}
878
879
  }
879
880
  }),
880
881
  (TCA.showOpenDialog = function (r, t, e) {
881
- ;(r !== null && r !== '') || (r = '打开'), TCA.doFileDialog(r, t, e, !0)
882
+ ;(r !== null && r !== '') || (r = $lc("打开")), TCA.doFileDialog(r, t, e, !0)
882
883
  }),
883
884
  (TCA.showSaveDialog = function (r, t, e) {
884
- ;(r !== null && r !== '') || (r = '关闭'), TCA.doFileDialog(r, t, e, !1)
885
+ ;(r !== null && r !== '') || (r = $lc("关闭")), TCA.doFileDialog(r, t, e, !1)
885
886
  })
886
887
  var TCACore = (function () {
887
888
  function saveConfig(r) {
@@ -1208,147 +1209,147 @@ var TCACore = (function () {
1208
1209
  var ERRMAP_ZHCN = {
1209
1210
  CERTSTORE_INIT_WRONGTYPE: {
1210
1211
  code: 16777217,
1211
- msg: 'CertStore实例初始化失败,参数类型不匹配'
1212
+ msg: $lc("CertStore实例初始化失败,参数类型不匹配")
1212
1213
  },
1213
1214
  LIST_STORE_ERROR: {
1214
1215
  code: 16777218,
1215
- msg: '列举密钥库错误'
1216
+ msg: $lc("列举密钥库错误")
1216
1217
  },
1217
1218
  BY_CERT_ERR_TYPE: {
1218
1219
  code: 16777219,
1219
- msg: '根据证书获取CertStore实例时失败,参数类型不匹配'
1220
+ msg: $lc("根据证书获取CertStore实例时失败,参数类型不匹配")
1220
1221
  },
1221
1222
  LIST_CERT_ERROR: {
1222
1223
  code: 16777220,
1223
- msg: '列举证书错误'
1224
+ msg: $lc("列举证书错误")
1224
1225
  },
1225
1226
  GEN_CSR_ERROR_PARAMS: {
1226
1227
  code: 16777221,
1227
- msg: '产生CSR失败,输入参数错误'
1228
+ msg: $lc("产生CSR失败,输入参数错误")
1228
1229
  },
1229
1230
  GEN_CSR_ERR_PUBKEY_ALG: {
1230
1231
  code: 16777222,
1231
- msg: '产生CSR失败,未知的证书公钥算法'
1232
+ msg: $lc("产生CSR失败,未知的证书公钥算法")
1232
1233
  },
1233
1234
  GEN_CSR_ERROR: {
1234
1235
  code: 16777223,
1235
- msg: '产生CSR失败'
1236
+ msg: $lc("产生CSR失败")
1236
1237
  },
1237
1238
  INSTALL_CERT_ERR_PARAMS: {
1238
1239
  code: 16777224,
1239
- msg: '安装证书失败,输入参数错误'
1240
+ msg: $lc("安装证书失败,输入参数错误")
1240
1241
  },
1241
1242
  INSTALL_CERT_ERR_UNKNOWN_SYMMALG: {
1242
1243
  code: 16777225,
1243
- msg: '安装加密证书失败,未知的对称加密算法'
1244
+ msg: $lc("安装加密证书失败,未知的对称加密算法")
1244
1245
  },
1245
1246
  INSTALL_CERT_ERR: {
1246
1247
  code: 16777226,
1247
- msg: '安装证书失败'
1248
+ msg: $lc("安装证书失败")
1248
1249
  },
1249
1250
  CERTIFICATE_INIT_WRONGTYPE: {
1250
1251
  code: 33554433,
1251
- msg: 'Certificate实例初始化失败,参数类型不匹配'
1252
+ msg: $lc("Certificate实例初始化失败,参数类型不匹配")
1252
1253
  },
1253
1254
  CERTIFICATE_PARSE_ERROR: {
1254
1255
  code: 33554434,
1255
- msg: '从Base64解析证书失败'
1256
+ msg: $lc("从Base64解析证书失败")
1256
1257
  },
1257
1258
  CERTIFICATE_DELETE_ERROR: {
1258
1259
  code: 33554435,
1259
- msg: '删除证书失败'
1260
+ msg: $lc("删除证书失败")
1260
1261
  },
1261
1262
  CERT_SET_INIT_ERROR_TYPE: {
1262
1263
  code: 50331649,
1263
- msg: '初始化CertSet实例失败,错误的输入类型'
1264
+ msg: $lc("初始化CertSet实例失败,错误的输入类型")
1264
1265
  },
1265
1266
  CERT_SET_INIT_ERROR_TYPE_2: {
1266
1267
  code: 50331650,
1267
- msg: '初始化CertSet实例失败,错误的输入类型'
1268
+ msg: $lc("初始化CertSet实例失败,错误的输入类型")
1268
1269
  },
1269
1270
  CERT_SET_INIT_ERROR_TYPE_3: {
1270
1271
  code: 50331651,
1271
- msg: '初始化CertSet实例失败,错误的输入类型'
1272
+ msg: $lc("初始化CertSet实例失败,错误的输入类型")
1272
1273
  },
1273
1274
  CERT_SET_FILTER_KEYUSAGE_ERROR: {
1274
1275
  code: 50331652,
1275
- msg: '通过密钥用法过滤失败,错误的输入类型'
1276
+ msg: $lc("通过密钥用法过滤失败,错误的输入类型")
1276
1277
  },
1277
1278
  CSR_INIT_ERROR_TYPE: {
1278
1279
  code: 67108865,
1279
- msg: '初始化Csr实例失败,错误的输入类型'
1280
+ msg: $lc("初始化Csr实例失败,错误的输入类型")
1280
1281
  },
1281
1282
  PKCS7_INIT_ERROR_TYPE: {
1282
1283
  code: 83886081,
1283
- msg: '初始化Pkcs7实例失败,错误的输入类型'
1284
+ msg: $lc("初始化Pkcs7实例失败,错误的输入类型")
1284
1285
  },
1285
1286
  PKCS7_INIT_PARSE_ERROR: {
1286
1287
  code: 83886082,
1287
- msg: '初始化Pkcs7实例失败,解析Pkcs7数据失败'
1288
+ msg: $lc("初始化Pkcs7实例失败,解析Pkcs7数据失败")
1288
1289
  },
1289
1290
  SIGN_ERROR: {
1290
1291
  code: 2684354561,
1291
- msg: '签名操作失败'
1292
+ msg: $lc("签名操作失败")
1292
1293
  },
1293
1294
  SIGN_ERROR_HASH_ALG: {
1294
1295
  code: 100663297,
1295
- msg: '哈希算法与签名算法不匹配'
1296
+ msg: $lc("哈希算法与签名算法不匹配")
1296
1297
  },
1297
1298
  VERIFY_ERROR: {
1298
1299
  code: 2684354562,
1299
- msg: '验证签名操作失败'
1300
+ msg: $lc("验证签名操作失败")
1300
1301
  },
1301
1302
  ENCRYPT_ERROR: {
1302
1303
  code: 2684354563,
1303
- msg: '加密操作失败'
1304
+ msg: $lc("加密操作失败")
1304
1305
  },
1305
1306
  DECRYPT_ERROR: {
1306
1307
  code: 2684354564,
1307
- msg: '解密操作失败'
1308
+ msg: $lc("解密操作失败")
1308
1309
  },
1309
1310
  ERROR_HASH_ALG: {
1310
1311
  code: 2952790017,
1311
- msg: '指定了错误的Hash算法算法'
1312
+ msg: $lc("指定了错误的Hash算法算法")
1312
1313
  },
1313
1314
  ERROR_JSON_TYPE: {
1314
1315
  code: 2952790018,
1315
- msg: '错误的json类型'
1316
+ msg: $lc("错误的json类型")
1316
1317
  },
1317
1318
  ERROR_CALL_SRV_VER: {
1318
1319
  code: 2952790019,
1319
- msg: '查询服务版本失败'
1320
+ msg: $lc("查询服务版本失败")
1320
1321
  },
1321
1322
  CALL_HTTP_CLIENT_ERR: {
1322
1323
  code: 4026531841,
1323
- msg: '执行本地方法失败'
1324
+ msg: $lc("执行本地方法失败")
1324
1325
  },
1325
1326
  INVALID_LICENSE: {
1326
1327
  code: 4026531842,
1327
- msg: '使用了无效的License'
1328
+ msg: $lc("使用了无效的License")
1328
1329
  },
1329
1330
  INVALID_CERTKIT_VER: {
1330
1331
  code: 4026531843,
1331
- msg: '不匹配的CertKit版本'
1332
+ msg: $lc("不匹配的CertKit版本")
1332
1333
  },
1333
1334
  CALL_ACTIVEX_ERR: {
1334
1335
  code: 4026531844,
1335
- msg: '执行本地方法失败'
1336
+ msg: $lc("执行本地方法失败")
1336
1337
  },
1337
1338
  CALL_ACTIVEX_ERR_METHOD: {
1338
1339
  code: 4026531845,
1339
- msg: '执行操作失败'
1340
+ msg: $lc("执行操作失败")
1340
1341
  },
1341
1342
  INSTALL_ACTIVEX_ERR: {
1342
1343
  code: 4026531846,
1343
- msg: '无法加载ActiveX控件'
1344
+ msg: $lc("无法加载ActiveX控件")
1344
1345
  },
1345
1346
  INVALID_LICENSE_2: {
1346
1347
  code: 4026531847,
1347
- msg: '使用了无效的License'
1348
+ msg: $lc("使用了无效的License")
1348
1349
  },
1349
1350
  INVALID_CONFIG: {
1350
1351
  code: 4026531848,
1351
- msg: '无效的配置'
1352
+ msg: $lc("无效的配置")
1352
1353
  },
1353
1354
  AUTOAUTH_ERROR: {
1354
1355
  code: 4026531849,
@@ -1360,19 +1361,19 @@ var ERRMAP_ZHCN = {
1360
1361
  },
1361
1362
  ERROR_FILE_DIALOG: {
1362
1363
  code: 218103810,
1363
- msg: '打开对话框失败'
1364
+ msg: $lc("打开对话框失败")
1364
1365
  },
1365
1366
  UNIMPLEMENTED: {
1366
1367
  code: 1,
1367
- msg: '未实现的方法'
1368
+ msg: $lc("未实现的方法")
1368
1369
  },
1369
1370
  BIG_ERROR: {
1370
1371
  code: 4294967295,
1371
- msg: '错误'
1372
+ msg: $lc("错误")
1372
1373
  },
1373
1374
  SUPER_SUCCESS: {
1374
1375
  code: 0,
1375
- msg: '成功'
1376
+ msg: $lc("成功")
1376
1377
  }
1377
1378
  },
1378
1379
  ERRMAP = ERRMAP_ZHCN
@@ -1755,19 +1756,20 @@ var ERRMAP_ZHCN = {
1755
1756
  * 自行开发:签名部分
1756
1757
  */
1757
1758
  import { Message, Notification } from 'element-ui'
1759
+
1758
1760
  function initCertList() {
1759
1761
  try {
1760
1762
  let certs = CertStore.listAllCerts()
1761
1763
  if (certs.size() > 0) {
1762
- console.warn('签名初始化成功!')
1764
+ console.warn($lc("签名初始化成功!"))
1763
1765
  } else {
1764
- Message.warning('没有检测到证书!')
1766
+ Message.warning($lc("没有检测到证书!"))
1765
1767
  }
1766
1768
  } catch (e) {
1767
1769
  if (e instanceof TCACErr) {
1768
1770
  Message.warning(e.toStr())
1769
1771
  } else {
1770
- Message.warning('没有检测到证书!')
1772
+ Message.warning($lc("没有检测到证书!"))
1771
1773
  }
1772
1774
  }
1773
1775
  }
@@ -1785,7 +1787,7 @@ try {
1785
1787
  TCA.config(config)
1786
1788
  } catch (error) {
1787
1789
  Notification({
1788
- title: '提示',
1790
+ title: $lc("提示"),
1789
1791
  dangerouslyUseHTMLString: true,
1790
1792
  message: `<div>检测到您的电脑中没有安装签名助手,为了不影响使用请使用管理员权限<a class="color-primary" href="/portal/TopESA3.7.2.0.exe" download>下载安装</a>天诚安信数字证书助手</div>`,
1791
1793
  duration: 5000
@@ -1815,7 +1817,7 @@ export function getSign(plain, dn) {
1815
1817
  dn = getDN()
1816
1818
  }
1817
1819
  if (!dn) {
1818
- Message.error('签名参数DN错误!')
1820
+ Message.error($lc("签名参数DN错误!"))
1819
1821
  return false
1820
1822
  }
1821
1823
  let certs = CertStore.listAllCerts()
@@ -1832,16 +1834,16 @@ export function getSign(plain, dn) {
1832
1834
  if (sginCert) {
1833
1835
  return sginCert.signMessage(plainText, false)
1834
1836
  } else {
1835
- Message.warning('没有匹配到证书!')
1837
+ Message.warning($lc("没有匹配到证书!"))
1836
1838
  }
1837
1839
  } else {
1838
- Message.warning('请检查key是否插入!')
1840
+ Message.warning($lc("请检查key是否插入!"))
1839
1841
  }
1840
1842
  } catch (e) {
1841
1843
  if (e instanceof TCACErr) {
1842
1844
  Message.error(e.toStr())
1843
1845
  } else {
1844
- Message.error('签名失败!')
1846
+ Message.error($lc("签名失败!"))
1845
1847
  }
1846
1848
  }
1847
1849
  }
@@ -1,6 +1,8 @@
1
+ import { $lc } from '../../../utils/i18n/index.js'
1
2
  import { Message, MessageBox, Notification } from 'element-ui'
2
3
  import { codeDate } from '../codeMap.js'
3
4
  import { IWSAgent } from './InfosecNetSignCNGAgent.min.js'
5
+
4
6
  /*
5
7
  获取证书列表接口:2.7.1 IWSASkfGetCertList (DllFilePath, SucceedFunction)
6
8
  Attached签名接口:2.7.2 IWSASkfSignData (PlainText, CertIndex, UsbKeyPin, DigestArithmetic, SucceedFunction)
@@ -41,14 +43,14 @@ export function availableSign(fn, url) {
41
43
  }
42
44
 
43
45
  function checkAvailable(fn, url, count) {
44
- let name = window.NetSignDownloadName || 'NetSignCNG签名助手'
46
+ let name = window.NetSignDownloadName || $lc("NetSignCNG签名助手")
45
47
  let available = IWSAGetAvailable()
46
48
  if (available) {
47
49
  fn && fn(available)
48
50
  } else if (count == 10) {
49
51
  fn && fn(available)
50
52
  Notification({
51
- title: '提示',
53
+ title: $lc("提示"),
52
54
  dangerouslyUseHTMLString: true,
53
55
  message: `<div>检测到您的电脑中没有安装签名助手,为了不影响使用请使用管理员权限<a class="color-primary" href="${url}" download>下载安装</a>${name}</div>`,
54
56
  duration: 5000
@@ -90,7 +92,7 @@ export async function getSign(plain, dn) {
90
92
  dn = getDN()
91
93
  }
92
94
  if (!dn) {
93
- Message.error('签名参数DN错误!')
95
+ Message.error($lc("签名参数DN错误!"))
94
96
  return false
95
97
  }
96
98
  let plainText = ''
@@ -105,23 +107,23 @@ export async function getSign(plain, dn) {
105
107
  if (checkRes === -1 || ['dnListEmpty', 'dnIsEmpty', 'Empty'].includes(checkRes)) {
106
108
  switch (checkRes) {
107
109
  case 'dnListEmpty':
108
- Message.warning('没有匹配到证书!')
110
+ Message.warning($lc("没有匹配到证书!"))
109
111
  break
110
112
  case 'dnIsEmpty':
111
- Message.warning('DN参数为空!')
113
+ Message.warning($lc("DN参数为空!"))
112
114
  break
113
115
  case 'Empty':
114
- Message.warning('当前Ukey不匹配!')
116
+ Message.warning($lc("当前Ukey不匹配!"))
115
117
  break
116
118
  default:
117
- Message.warning('没有匹配到证书!')
119
+ Message.warning($lc("没有匹配到证书!"))
118
120
  }
119
121
  return ''
120
122
  }
121
123
  // 签名
122
- await MessageBox.prompt('请输入PIN码', '提示', {
123
- confirmButtonText: '确定',
124
- cancelButtonText: '取消',
124
+ await MessageBox.prompt($lc("请输入PIN码"), $lc("提示"), {
125
+ confirmButtonText: $lc("确定"),
126
+ cancelButtonText: $lc("取消"),
125
127
  closeOnClickModal: false,
126
128
  inputType: 'password'
127
129
  }).then(({ value }) => {
@@ -1,6 +1,8 @@
1
+ import { $lc } from '../../../utils/i18n/index.js'
1
2
  import { Message, MessageBox } from 'element-ui'
2
3
  import axios from '../../../utils/axios.js'
3
4
  import { IWSAgent } from './InfosecNetSignCNGAgent.min.js'
5
+
4
6
  let {
5
7
  IWSAGetVersion, // 获取版本号,
6
8
  IWSASetTimeOut,
@@ -82,10 +84,10 @@ function buildCertDTO(certData, p10Result) {
82
84
  */
83
85
  function handleCertImportResult(certCode) {
84
86
  if (certCode === '0') {
85
- Message.success('证书导入成功')
87
+ Message.success($lc("证书导入成功"))
86
88
  return true
87
89
  } else {
88
- Message.error('导入证书失败,错误码:' + certCode)
90
+ Message.error($lc("导入证书失败,错误码:") + certCode)
89
91
  return false
90
92
  }
91
93
  }
@@ -103,7 +105,7 @@ async function syncDnValidDate(dn, dnExpiryDate) {
103
105
  dnValidDate: dnExpiryDate
104
106
  })
105
107
  } catch (error) {
106
- console.error('同步证书到期日失败:', error)
108
+ console.error($lc("同步证书到期日失败:"), error)
107
109
  }
108
110
  }
109
111
 
@@ -131,7 +133,7 @@ async function generateRSACert(certData, dn) {
131
133
  */
132
134
  const res = IWSA_rsa_csp_genContainerP10('true', alg, '', '', '', '', 'false', 'false')
133
135
  if (res[0] !== '0') {
134
- Message.error('产生 P10失败,错误码:' + res[0])
136
+ Message.error($lc("产生 P10失败,错误码:") + res[0])
135
137
  return
136
138
  }
137
139
 
@@ -161,26 +163,26 @@ async function generateSM2Cert(certData, dn) {
161
163
 
162
164
  const providerList = IWSA_sm2_skf_getProviderList()
163
165
  if (providerList.length === 0) {
164
- Message.error('请检查ukey是否正常')
166
+ Message.error($lc("请检查ukey是否正常"))
165
167
  return
166
168
  }
167
169
  const deviceList = IWSA_sm2_skf_getDeviceList(providerList[0].Provider)
168
170
  if (deviceList.length === 0) {
169
- Message.error('未获取到SM2设备')
171
+ Message.error($lc("未获取到SM2设备"))
170
172
  return
171
173
  }
172
174
  const applicationList = IWSA_sm2_skf_getApplicationList(providerList[0].Provider, deviceList[0].Device)
173
175
  if (applicationList.length === 0) {
174
- Message.error('未获取到SM2应用')
176
+ Message.error($lc("未获取到SM2应用"))
175
177
  return
176
178
  }
177
179
  IWSA_sm2_skf_setDevice(providerList[0].Provider, deviceList[0].Device, applicationList[0].Application)
178
180
 
179
181
  let pin
180
182
  try {
181
- const result = await MessageBox.prompt('请输入PIN码', '提示', {
182
- confirmButtonText: '确定',
183
- cancelButtonText: '取消',
183
+ const result = await MessageBox.prompt($lc("请输入PIN码"), $lc("提示"), {
184
+ confirmButtonText: $lc("确定"),
185
+ cancelButtonText: $lc("取消"),
184
186
  closeOnClickModal: false,
185
187
  inputType: 'password'
186
188
  })
@@ -196,7 +198,7 @@ async function generateSM2Cert(certData, dn) {
196
198
  */
197
199
  const res = IWSA_sm2_skf_genContainerP10(pin, '', '', 'true')
198
200
  if (res[0] !== '0') {
199
- Message.error('产生 P10失败,错误码:' + res[0])
201
+ Message.error($lc("产生 P10失败,错误码:") + res[0])
200
202
  return
201
203
  }
202
204
 
@@ -242,7 +244,7 @@ export function updateCert(cspName, onSuccess, dnInfo) {
242
244
  IWSASetAsyncMode(false)
243
245
  let dn = dnInfo || getDN()
244
246
  if (!dn) {
245
- Message.error('未获取到Dn信息')
247
+ Message.error($lc("未获取到Dn信息"))
246
248
  return
247
249
  }
248
250
  //获取当前证书的容器
@@ -276,25 +278,25 @@ export function updateCert(cspName, onSuccess, dnInfo) {
276
278
  if (oldContainer != '') {
277
279
  IWSA_rsa_csp_deleteContainer(oldContainer)
278
280
  }
279
- Message.success('证书导入成功')
281
+ Message.success($lc("证书导入成功"))
280
282
  if (typeof onSuccess === 'function') {
281
283
  onSuccess()
282
284
  }
283
285
  } else {
284
286
  IWSA_rsa_csp_deleteContainer(res[1])
285
- Message.error('证书导入失败,请联系管理员,错误码为' + code)
287
+ Message.error($lc("证书导入失败,请联系管理员,错误码为") + code)
286
288
  }
287
289
  } else {
288
290
  IWSA_rsa_csp_deleteContainer(res[1])
289
- Message.error('证书下载失败,请联系管理员,错误码为' + list[0]?.errNum)
291
+ Message.error($lc("证书下载失败,请联系管理员,错误码为") + list[0]?.errNum)
290
292
  }
291
293
  } else {
292
294
  IWSA_rsa_csp_deleteContainer(res[1])
293
- Message.error('证书下载服务出错,请重试或联系管理员')
295
+ Message.error($lc("证书下载服务出错,请重试或联系管理员"))
294
296
  }
295
297
  })
296
298
  } else {
297
- Message.error('容器生成失败,请联系管理员,错误码为' + res[0])
299
+ Message.error($lc("容器生成失败,请联系管理员,错误码为") + res[0])
298
300
  }
299
301
  }
300
302
  /**
@@ -304,7 +306,7 @@ export function updateCert(cspName, onSuccess, dnInfo) {
304
306
  */
305
307
  export function updateCertHG(uno) {
306
308
  return getUserCert(uno).catch((error) => {
307
- console.error('海港证书更新失败:', error)
309
+ console.error($lc("海港证书更新失败:"), error)
308
310
  })
309
311
  }
310
312
 
@@ -1,6 +1,8 @@
1
+ import { $lc } from '../../../utils/i18n/index.js'
1
2
  import { Message, MessageBox, Notification } from 'element-ui'
2
3
  import { codeDate } from '../codeMap.js'
3
4
  import { IWSAgent } from './InfosecNetSignCNGAgent.min.js'
5
+
4
6
  /*
5
7
  获取证书列表接口:2.7.1 IWSASkfGetCertList (DllFilePath, SucceedFunction)
6
8
  Attached签名接口:2.7.2 IWSASkfSignData (PlainText, CertIndex, UsbKeyPin, DigestArithmetic, SucceedFunction)
@@ -42,13 +44,13 @@ export function availableSign(fn, url) {
42
44
 
43
45
  function checkAvailable(fn, url, count) {
44
46
  let available = IWSAGetAvailable()
45
- let name = window.NetSignDownloadName || 'NetSignCNG签名助手'
47
+ let name = window.NetSignDownloadName || $lc("NetSignCNG签名助手")
46
48
  if (available) {
47
49
  fn && fn(available)
48
50
  } else if (count == 10) {
49
51
  fn && fn(available)
50
52
  Notification({
51
- title: '提示',
53
+ title: $lc("提示"),
52
54
  dangerouslyUseHTMLString: true,
53
55
  message: `<div>检测到您的电脑中没有安装签名助手,为了不影响使用请使用管理员权限<a class="color-primary" href="${url}" download>下载安装</a>${name}</div>`,
54
56
  duration: 5000
@@ -87,7 +89,7 @@ function verifyDn(dnList, dn) {
87
89
  export async function getSign(plain, dn = getDN()) {
88
90
  // 验证DN参数
89
91
  if (!dn) {
90
- Message.error('签名参数DN错误!')
92
+ Message.error($lc("签名参数DN错误!"))
91
93
  return false
92
94
  }
93
95
 
@@ -99,21 +101,21 @@ export async function getSign(plain, dn = getDN()) {
99
101
 
100
102
  // 证书验证错误处理
101
103
  const errorMessages = {
102
- dnListEmpty: '没有匹配到证书!',
103
- dnIsEmpty: 'DN参数为空!',
104
- Empty: '当前Ukey不匹配!'
104
+ dnListEmpty: $lc("没有匹配到证书!"),
105
+ dnIsEmpty: $lc("DN参数为空!"),
106
+ Empty: $lc("当前Ukey不匹配!")
105
107
  }
106
108
 
107
109
  if (checkRes === -1 || Object.keys(errorMessages).includes(checkRes)) {
108
- Message.warning(errorMessages[checkRes] || '没有匹配到证书!')
110
+ Message.warning(errorMessages[checkRes] || $lc("没有匹配到证书!"))
109
111
  return ''
110
112
  }
111
113
 
112
114
  // 获取PIN码并执行签名
113
115
  try {
114
- const { value: pin } = await MessageBox.prompt('请输入PIN码', '提示', {
115
- confirmButtonText: '确定',
116
- cancelButtonText: '取消',
116
+ const { value: pin } = await MessageBox.prompt($lc("请输入PIN码"), $lc("提示"), {
117
+ confirmButtonText: $lc("确定"),
118
+ cancelButtonText: $lc("取消"),
117
119
  closeOnClickModal: false,
118
120
  inputType: 'password'
119
121
  })
@@ -1,4 +1,5 @@
1
- /* eslint-disable */
1
+ import { $lc } from '../../../utils/i18n/index.js'
2
+ /* eslint-disable */
2
3
 
3
4
  /*--------------------------------------------------------------------------
4
5
  *
@@ -336,7 +337,7 @@ function $myErrorRtnFunc(retVal, cb, ctx) {
336
337
 
337
338
  function $loginSignRandomCallBack(retObj) {
338
339
  if (retObj.retVal == '') {
339
- $XTXAlert('客户端签名失败!')
340
+ $XTXAlert($lc("客户端签名失败!"))
340
341
  return
341
342
  }
342
343
  var objForm = retObj.ctx.objForm
@@ -348,7 +349,7 @@ function $loginSignRandomCallBack(retObj) {
348
349
 
349
350
  function $loginVerifyServerSignatureCallBack(retObj) {
350
351
  if (!retObj.retVal) {
351
- $XTXAlert('验证服务器端信息失败!')
352
+ $XTXAlert($lc("验证服务器端信息失败!"))
352
353
  return
353
354
  }
354
355
 
@@ -359,25 +360,25 @@ function $loginCheckCertValidNotAfter(retObj) {
359
360
  var notAfterDate = GetDateNotAfter(retObj.retVal)
360
361
  var milliseconds = notAfterDate.getTime() - new Date().getTime()
361
362
  if (milliseconds < 0) {
362
- $XTXAlert('您的证书已过期,请尽快到北京数字证书认证中心办理证书更新手续!')
363
+ $XTXAlert($lc("您的证书已过期,请尽快到北京数字证书认证中心办理证书更新手续!"))
363
364
  return
364
365
  }
365
366
 
366
367
  days = parseInt(milliseconds / (1000 * 60 * 60 * 24))
367
368
  if (days > 0 && days <= 60) {
368
- $XTXAlert('您的证书还有' + days + '天过期\n请您尽快到北京数字证书认证中心办理证书更新手续!')
369
+ $XTXAlert($lc("您的证书还有") + days + $lc("天过期\n请您尽快到北京数字证书认证中心办理证书更新手续!"))
369
370
  } else if (days == 0) {
370
371
  // 证书有效期天数小于1天
371
372
  var hours = parseInt(milliseconds / (1000 * 60 * 60))
372
373
  if (hours > 0) {
373
- $XTXAlert('您的证书还有' + hours + '小时过期\n您尽快到北京数字证书认证中心办理证书更新手续!')
374
+ $XTXAlert($lc("您的证书还有") + hours + $lc("小时过期\n您尽快到北京数字证书认证中心办理证书更新手续!"))
374
375
  }
375
376
  // 证书有效期小于1小时
376
377
  var minutes = parseInt(milliseconds / (1000 * 60))
377
378
  if (minutes > 1) {
378
- $XTXAlert('您的证书还有' + minutes + '分钟过期\n您尽快到北京数字证书认证中心办理证书更新手续!')
379
+ $XTXAlert($lc("您的证书还有") + minutes + $lc("分钟过期\n您尽快到北京数字证书认证中心办理证书更新手续!"))
379
380
  } else {
380
- $XTXAlert('您的证书已过期,请尽快到北京数字证书认证中心办理证书更新手续!')
381
+ $XTXAlert($lc("您的证书已过期,请尽快到北京数字证书认证中心办理证书更新手续!"))
381
382
  return
382
383
  }
383
384
  }
@@ -389,7 +390,7 @@ function $loginCheckCertValidNotBefore(retObj) {
389
390
  var notBeforeDate = GetDateNotBefore(retObj.retVal)
390
391
  var days = parseInt((notBeforeDate.getTime() - new Date().getTime()) / (1000 * 60 * 60 * 24))
391
392
  if (days > 0) {
392
- $XTXAlert('您的证书尚未生效!距离生效日期还剩' + days + '天!')
393
+ $XTXAlert($lc("您的证书尚未生效!距离生效日期还剩") + days + $lc("天!"))
393
394
  return
394
395
  }
395
396
 
@@ -400,7 +401,7 @@ function $loginCheckCertValidNotBefore(retObj) {
400
401
  function $loginGetSignCertCallBack(retObj) {
401
402
  var strUserCert = retObj.retVal
402
403
  if (strUserCert == '') {
403
- $XTXAlert('导出用户证书失败!')
404
+ $XTXAlert($lc("导出用户证书失败!"))
404
405
  return
405
406
  }
406
407
  retObj.ctx.objForm.UserCert.value = strUserCert
@@ -411,13 +412,13 @@ function $loginGetSignCertCallBack(retObj) {
411
412
  function $loginGetPINRetryCallBack(retObj) {
412
413
  var retryCount = Number(retObj.retVal)
413
414
  if (retryCount > 0) {
414
- $XTXAlert('校验证书密码失败!您还有' + retryCount + '次机会重试!')
415
+ $XTXAlert($lc("校验证书密码失败!您还有") + retryCount + $lc("次机会重试!"))
415
416
  return
416
417
  } else if (retryCount == 0) {
417
- $XTXAlert('您的证书密码已被锁死,请联系BJCA进行解锁!')
418
+ $XTXAlert($lc("您的证书密码已被锁死,请联系BJCA进行解锁!"))
418
419
  return
419
420
  } else {
420
- $XTXAlert('登录失败!')
421
+ $XTXAlert($lc("登录失败!"))
421
422
  return
422
423
  }
423
424
  }
@@ -445,15 +446,15 @@ function Logout(certid, cb, ctx) {
445
446
  function Login(formName, strCertID, strPin, strAction) {
446
447
  var objForm = eval(formName)
447
448
  if (objForm == null) {
448
- $XTXAlert('表单错误!')
449
+ $XTXAlert($lc("表单错误!"))
449
450
  return
450
451
  }
451
452
  if (strCertID == null || strCertID == '') {
452
- $XTXAlert('请输入证书密码!')
453
+ $XTXAlert($lc("请输入证书密码!"))
453
454
  return
454
455
  }
455
456
  if (strPin == null || strPin == '') {
456
- $XTXAlert('请输入证书密码!')
457
+ $XTXAlert($lc("请输入证书密码!"))
457
458
  return
458
459
  }
459
460