unify-external-plugin-platform 0.0.3-1 → 0.0.3-11

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.
@@ -84029,8 +84029,8 @@ var scanner_cameravue_type_template_id_00e9072f_scoped_true_render = function re
84029
84029
  };
84030
84030
  var scanner_cameravue_type_template_id_00e9072f_scoped_true_staticRenderFns = [];
84031
84031
 
84032
- ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=template&id=dc9fa1f2&scoped=true&
84033
- var scanner_camera_componentvue_type_template_id_dc9fa1f2_scoped_true_render = function render() {
84032
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=template&id=4394461f&scoped=true&
84033
+ var scanner_camera_componentvue_type_template_id_4394461f_scoped_true_render = function render() {
84034
84034
  var _vm = this,
84035
84035
  _c = _vm._self._c;
84036
84036
  return _c('div', {
@@ -84094,7 +84094,7 @@ var scanner_camera_componentvue_type_template_id_dc9fa1f2_scoped_true_render = f
84094
84094
  }, [_vm._v(_vm._s(item.label))]) : _vm._e()];
84095
84095
  }), _vm._t("action")]], 2)])]);
84096
84096
  };
84097
- var scanner_camera_componentvue_type_template_id_dc9fa1f2_scoped_true_staticRenderFns = [];
84097
+ var scanner_camera_componentvue_type_template_id_4394461f_scoped_true_staticRenderFns = [];
84098
84098
 
84099
84099
  ;// CONCATENATED MODULE: ./packages/utils/custom-axios.ts
84100
84100
  /**
@@ -84161,10 +84161,17 @@ class custom_axios_CustomAxios {
84161
84161
 
84162
84162
  var eloam_plugin_service_ELoamMethodCode;
84163
84163
  (function (ELoamMethodCode) {
84164
+ ELoamMethodCode["ScannerCameraLinuxInit"] = "ScannerCameraLinuxInit";
84165
+ /** 打开摄像头linux*/
84166
+ ELoamMethodCode["ScannerCameraLinuxStartPreview"] = "ScannerCameraLinuxStartPreview";
84167
+ /** 获取视频帧 linux*/
84168
+ ELoamMethodCode["ScannerCameraLinuxGetFrame"] = "ScannerCameraLinuxGetFrame";
84164
84169
  /** 糾偏 */
84165
84170
  ELoamMethodCode["ScannerCameraDeskew_Base64"] = "ScannerCameraDeskew_Base64";
84166
84171
  /** 合并*/
84167
84172
  ELoamMethodCode["ScannerCameraMerge_Base64"] = "ScannerCameraMerge_Base64";
84173
+ /** 旋转 */
84174
+ ELoamMethodCode["ScannerCameraRotate"] = "ScannerCameraRotate";
84168
84175
  /** 扫描-主摄像头 */
84169
84176
  ELoamMethodCode["ScannerMainCamera_Base64"] = "ScannerMainCamera_Base64";
84170
84177
  /** 扫描-副摄像头 */
@@ -84180,71 +84187,118 @@ const eloam_plugin_service_ELoamMethodDesc = {
84180
84187
  class eloam_plugin_service_ELoamPassService {
84181
84188
  /** 主摄像头地址 */
84182
84189
  static get mainCameraUrl() {
84183
- return this.baseServiceUrl + '/video=stream&camidx=0';
84190
+ if (this._isLinux) {
84191
+ return this.baseLinuxServiceUrl + '/StartPreview?dev_idx=0&res_id=0';
84192
+ } else {
84193
+ return this.baseServiceUrl + '/video=stream&camidx=0';
84194
+ }
84184
84195
  }
84185
84196
  /** 副摄像头地址 */
84186
84197
  static get secondaryCameraUrl() {
84187
- return this.baseServiceUrl + '/video=stream&camidx=1';
84198
+ if (this._isLinux) {
84199
+ return this.baseLinuxServiceUrl + '/StartPreview?dev_idx=1&res_id=0';
84200
+ } else {
84201
+ return this.baseServiceUrl + '/video=stream&camidx=1';
84202
+ }
84188
84203
  }
84189
84204
  static async read(method, data) {
84190
84205
  let param = {},
84191
84206
  url = '',
84192
84207
  requestType = '';
84193
84208
  switch (method) {
84194
- case eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64:
84195
- // 开启纠偏裁边
84196
- url = this.baseServiceUrl + '/dvideo=cameradeskew';
84209
+ case eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxInit:
84210
+ url = `${this.baseLinuxServiceUrl}/GetAllDisplayInfo`;
84211
+ requestType = 'get';
84212
+ break;
84213
+ case eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxStartPreview:
84214
+ url = `${this.baseLinuxServiceUrl}/StartPreview?dev_idx=${data}&res_id=0`;
84215
+ requestType = 'get';
84216
+ break;
84217
+ case eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxGetFrame:
84218
+ url = `${this.baseLinuxServiceUrl}/getFrame`;
84219
+ requestType = 'get';
84220
+ break;
84221
+ case eloam_plugin_service_ELoamMethodCode.ScannerCameraRotate:
84222
+ url = this.baseServiceUrl + '/video=rotate';
84197
84223
  param = {
84198
84224
  camidx: "0",
84199
- open: "1"
84225
+ rotate: data.toString()
84200
84226
  };
84201
84227
  requestType = 'post';
84202
84228
  break;
84229
+ case eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64:
84230
+ // 纠偏
84231
+ if (eloam_plugin_service_ELoamPassService._isLinux) {
84232
+ url = `${this.baseLinuxServiceUrl}/EnableDeskImage?enable=${data}`;
84233
+ requestType = 'get';
84234
+ } else {
84235
+ // 开启纠偏裁边
84236
+ url = this.baseServiceUrl + '/dvideo=cameradeskew';
84237
+ param = {
84238
+ camidx: "0",
84239
+ open: data
84240
+ };
84241
+ requestType = 'post';
84242
+ }
84243
+ break;
84203
84244
  case eloam_plugin_service_ELoamMethodCode.ScannerCameraMerge_Base64:
84204
84245
  // 合并
84205
- url = this.baseServiceUrl + '/compose=photos';
84206
- // outputfilepath 输出文件保存地址。例:D://res.jpg
84207
- // outputmaxwidth 合成后文件最大宽度。例:3000px
84208
- // inputimagetype 待合成文件类型:0:file;1:base64
84209
- // outputimagetype 合成后文件类型:0:jpg;1:PDF
84210
- param = {
84211
- outputfilepath: "",
84212
- outputmaxwidth: "3000",
84213
- inputimagetype: "1",
84214
- outputimagetype: "0",
84215
- imagelist: data.toString()
84216
- };
84217
- requestType = 'post';
84246
+ if (this._isLinux) {
84247
+ // 国产
84248
+ url = `${this.baseLinuxServiceUrl}/composeIDcardPic?image1=${data.list[0]}&image2=${data.list[1]}`;
84249
+ requestType = 'get';
84250
+ } else {
84251
+ url = this.baseServiceUrl + '/compose=photos';
84252
+ param = {
84253
+ outputfilepath: "",
84254
+ outputmaxwidth: "3000",
84255
+ inputimagetype: "1",
84256
+ outputimagetype: "0",
84257
+ isIDCardCompose: data.type,
84258
+ imagelist: data.list.toString()
84259
+ };
84260
+ requestType = 'post';
84261
+ }
84218
84262
  break;
84219
84263
  case eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64:
84220
84264
  // rotate: 旋转角度;deskew:纠偏,主摄像头1,副摄像头0 camidx:主摄像头0,副摄像头1;ColorMode:quality
84221
- url = this.baseServiceUrl + '/video=grabimage';
84222
- param = {
84223
- filepath: "",
84224
- rotate: "0",
84225
- deskew: "0",
84226
- deskewval: "0",
84227
- camidx: "0",
84228
- ColorMode: "0",
84229
- quality: "0",
84230
- bIsPrint1to1: "0"
84231
- };
84232
- requestType = 'post';
84265
+ if (this._isLinux) {
84266
+ url = this.baseLinuxServiceUrl + '/getPic?filepath=/tmp';
84267
+ requestType = 'get';
84268
+ } else {
84269
+ url = this.baseServiceUrl + '/video=grabimage';
84270
+ param = {
84271
+ filepath: "base64",
84272
+ rotate: "0",
84273
+ deskew: data,
84274
+ deskewval: "20",
84275
+ camidx: "0",
84276
+ ColorMode: "0",
84277
+ quality: "0",
84278
+ bIsPrint1to1: "0"
84279
+ };
84280
+ requestType = 'post';
84281
+ }
84233
84282
  break;
84234
84283
  case eloam_plugin_service_ELoamMethodCode.ScannerSecondaryCamera_Base64:
84235
- // rotate: 旋转角度,;deskew:纠偏,主摄像头1,副摄像头0 camidx:主摄像头0,副摄像头1;ColorMode:quality
84236
- url = this.baseServiceUrl + '/video=grabimage';
84237
- param = {
84238
- filepath: "",
84239
- rotate: "0",
84240
- deskew: "0",
84241
- deskewval: "0",
84242
- camidx: "1",
84243
- ColorMode: "0",
84244
- quality: "0",
84245
- bIsPrint1to1: "0"
84246
- };
84247
- requestType = 'post';
84284
+ if (this._isLinux) {
84285
+ url = this.baseLinuxServiceUrl + '/getPic?filepath=/tmp';
84286
+ requestType = 'get';
84287
+ } else {
84288
+ // rotate: 旋转角度,;deskew:纠偏,主摄像头1,副摄像头0 camidx:主摄像头0,副摄像头1;ColorMode:quality
84289
+ url = this.baseServiceUrl + '/video=grabimage';
84290
+ param = {
84291
+ filepath: "",
84292
+ rotate: "0",
84293
+ deskew: "0",
84294
+ deskewval: "0",
84295
+ camidx: "1",
84296
+ ColorMode: "0",
84297
+ quality: "0",
84298
+ bIsPrint1to1: "0"
84299
+ };
84300
+ requestType = 'post';
84301
+ }
84248
84302
  break;
84249
84303
  case eloam_plugin_service_ELoamMethodCode.ReadIDCard_Base64:
84250
84304
  url = this.baseServiceUrl + '/card=idcard';
@@ -84254,24 +84308,44 @@ class eloam_plugin_service_ELoamPassService {
84254
84308
  let res = await custom_axios_CustomAxios[requestType](url, param);
84255
84309
  return res;
84256
84310
  }
84311
+ static async initLinuxCamera() {
84312
+ await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxInit);
84313
+ }
84314
+ static async startPreview(data) {
84315
+ return await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxStartPreview, data);
84316
+ }
84317
+ static async getEloamFrame() {
84318
+ return await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxGetFrame);
84319
+ }
84257
84320
  /** 主摄像头拍照 */
84258
- static async scanByMainCamera() {
84259
- const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64);
84260
- return res.photoBase64;
84321
+ static async scanByMainCamera(deskew) {
84322
+ const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64, deskew);
84323
+ if (this._isLinux) {
84324
+ return res.data.img; // 国产
84325
+ } else {
84326
+ return res.photoBase64;
84327
+ }
84261
84328
  }
84262
84329
  /** 副摄像头拍照 */
84263
84330
  static async scanBySecondaryCamera() {
84264
84331
  const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerSecondaryCamera_Base64);
84265
- return res.photoBase64;
84332
+ if (this._isLinux) {
84333
+ return res.data.img; // 国产
84334
+ } else {
84335
+ return res.photoBase64;
84336
+ }
84266
84337
  }
84267
- static async mergeImage(list) {
84268
- const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraMerge_Base64, list);
84269
- return res.base64;
84338
+ static async mergeImage(list, type) {
84339
+ const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraMerge_Base64, {
84340
+ list,
84341
+ type
84342
+ });
84343
+ return res.base64 || res.data;
84270
84344
  }
84271
- static async scanByCamera(type) {
84345
+ static async scanByCamera(type, deskew) {
84272
84346
  switch (type) {
84273
84347
  case "main":
84274
- return this.scanByMainCamera();
84348
+ return this.scanByMainCamera(deskew);
84275
84349
  case 'vice':
84276
84350
  return this.scanBySecondaryCamera();
84277
84351
  }
@@ -84332,6 +84406,8 @@ class eloam_plugin_service_ELoamPassService {
84332
84406
  }
84333
84407
  }
84334
84408
  _defineProperty(eloam_plugin_service_ELoamPassService, "baseServiceUrl", 'http://127.0.0.1:38088');
84409
+ _defineProperty(eloam_plugin_service_ELoamPassService, "baseLinuxServiceUrl", 'http://127.0.0.1:6543');
84410
+ _defineProperty(eloam_plugin_service_ELoamPassService, "_isLinux", String(navigator.platform).indexOf("Linux") > -1);
84335
84411
  ;// CONCATENATED MODULE: ./packages/model/common-message.ts
84336
84412
 
84337
84413
  /**
@@ -85479,13 +85555,26 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85479
85555
  name: '照片',
85480
85556
  value: 1
85481
85557
  }],
85558
+ deskewStatus: '0',
85559
+ rotateDeg: 0,
85482
85560
  buttonList: [{
85483
85561
  label: '拍照',
85484
85562
  name: 'take-pictures'
85485
85563
  }, {
85486
- label: '合并拍照',
85564
+ label: '图片合并',
85487
85565
  name: 'take-pictures-merge'
85566
+ }, {
85567
+ label: '证件合并',
85568
+ name: 'take-idCard-pictures-merge'
85569
+ }, {
85570
+ label: '纠偏裁边',
85571
+ name: 'open-deskew'
85572
+ }, {
85573
+ label: '旋转',
85574
+ name: 'rotate-video'
85488
85575
  }],
85576
+ _isLinux: String(navigator.platform).indexOf("Linux") > -1,
85577
+ eloamLinuxFrameTimer: {},
85489
85578
  mergeImageList: []
85490
85579
  };
85491
85580
  },
@@ -85552,10 +85641,10 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85552
85641
  {
85553
85642
  // 良田
85554
85643
  let type = this.camera === 0 ? 'main' : 'vice';
85555
- const res = await eloam_plugin_service_ELoamPassService.scanByCamera(type);
85556
- console.log('良田=>', res);
85644
+ const res = await eloam_plugin_service_ELoamPassService.scanByCamera(type, this.deskewStatus);
85557
85645
  if (res) {
85558
- this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res}`);
85646
+ let path = String(navigator.platform).indexOf("Linux") > -1 ? res.photoBase64 : res;
85647
+ this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${path}`);
85559
85648
  } else {
85560
85649
  this.$message.error('拍照出错,请检查设备是否连接成功');
85561
85650
  }
@@ -85589,10 +85678,15 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85589
85678
  break;
85590
85679
  case 5:
85591
85680
  // 良田高拍仪
85592
- this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
85593
- setTimeout(() => {
85594
- eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64); // 开启纠偏裁边
85595
- }, 2000);
85681
+ if (!(String(navigator.platform).indexOf("Linux") > -1)) {
85682
+ this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
85683
+ } else {
85684
+ await eloam_plugin_service_ELoamPassService.initLinuxCamera();
85685
+ let res = await eloam_plugin_service_ELoamPassService.startPreview('0');
85686
+ if (res.returnCode == "0" || res.returnCode == "2") {
85687
+ this.eloamLinuxFrameTimer = setInterval(this.getEloamFrame, 300);
85688
+ }
85689
+ }
85596
85690
  break;
85597
85691
  case 6:
85598
85692
  // 国产客户端一体机
@@ -85600,6 +85694,15 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85600
85694
  break;
85601
85695
  }
85602
85696
  },
85697
+ async getEloamFrame() {
85698
+ let res = await eloam_plugin_service_ELoamPassService.getEloamFrame();
85699
+ if (res.returnCode == "1") {
85700
+ clearInterval(this.eloamLinuxFrameTimer);
85701
+ return;
85702
+ }
85703
+ if (res.data.img == "") return;
85704
+ this.scannerVideoSrc = `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res.data.img}`;
85705
+ },
85603
85706
  /**
85604
85707
  * 副摄像头
85605
85708
  */
@@ -85619,7 +85722,13 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85619
85722
  break;
85620
85723
  case 5:
85621
85724
  // 良田
85622
- this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.secondaryCameraUrl;
85725
+ if (!(String(navigator.platform).indexOf("Linux") > -1)) {
85726
+ this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
85727
+ } else {
85728
+ await eloam_plugin_service_ELoamPassService.initLinuxCamera();
85729
+ await eloam_plugin_service_ELoamPassService.startPreview('1');
85730
+ this.eloamLinuxFrameTimer = setInterval(this.getEloamFrame, 300);
85731
+ }
85623
85732
  break;
85624
85733
  case 6:
85625
85734
  // 国产客户端一体机
@@ -85627,13 +85736,15 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85627
85736
  break;
85628
85737
  }
85629
85738
  },
85630
- async takePictureMerge() {
85631
- const res = await eloam_plugin_service_ELoamPassService.scanByCamera('main');
85739
+ async takePictureMerge(type) {
85740
+ if (type === '1' && this.deskewStatus === '0') return this.$message.warning('请先开启纠偏');
85741
+ const res = await eloam_plugin_service_ELoamPassService.scanByCamera('main', this.deskewStatus);
85632
85742
  if (res) {
85633
- this.mergeImageList.push(res);
85743
+ let path = String(navigator.platform).indexOf("Linux") > -1 ? res.filepath : res;
85744
+ this.mergeImageList.push(path);
85634
85745
  if (this.mergeImageList.length === 1) this.$message.success('第一张拍摄成功,请拍第二张');
85635
85746
  if (this.mergeImageList.length === 2) {
85636
- let result = await eloam_plugin_service_ELoamPassService.mergeImage(this.mergeImageList);
85747
+ let result = await eloam_plugin_service_ELoamPassService.mergeImage(this.mergeImageList, type);
85637
85748
  this.mergeImageList = [];
85638
85749
  this.$message.success('合并成功');
85639
85750
  this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${result}`);
@@ -85645,6 +85756,9 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85645
85756
  _isShowButton(name) {
85646
85757
  switch (name) {
85647
85758
  case 'take-pictures-merge':
85759
+ case 'take-idCard-pictures-merge':
85760
+ case 'open-deskew': // 纠偏裁边
85761
+ case 'rotate-video':
85648
85762
  return this.machineType === 5;
85649
85763
  // 良田显示合并拍照
85650
85764
  default:
@@ -85667,18 +85781,35 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85667
85781
  break;
85668
85782
  case 'take-pictures-merge':
85669
85783
  // 拍照合并
85670
- this.takePictureMerge();
85784
+ this.takePictureMerge('0');
85671
85785
  break;
85786
+ case 'take-idCard-pictures-merge':
85787
+ // 合并拍照身份证
85788
+ this.takePictureMerge('1');
85789
+ break;
85790
+ case 'rotate-video':
85791
+ if (String(navigator.platform).indexOf("Linux") > -1) {
85792
+ this.rotateDeg += 90;
85793
+ if (this.rotateDeg === 360) this.rotateDeg = 0;
85794
+ } else {
85795
+ this.rotateDeg = 90;
85796
+ }
85797
+ eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraRotate, this.rotateDeg); // 选装
85798
+ break;
85799
+ case 'open-deskew':
85800
+ this.deskewStatus = this.deskewStatus === '1' ? '0' : '1';
85801
+ eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64, this.deskewStatus);
85802
+ // 开启纠偏裁边
85672
85803
  }
85673
85804
  }
85674
85805
  }
85675
85806
  });
85676
85807
  ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=script&lang=js&
85677
85808
  /* harmony default export */ var component_scanner_camera_componentvue_type_script_lang_js_ = (scanner_camera_componentvue_type_script_lang_js_);
85678
- ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.use[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=dc9fa1f2&prod&scoped=true&lang=scss&
85809
+ ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.use[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=4394461f&prod&scoped=true&lang=scss&
85679
85810
  // extracted by mini-css-extract-plugin
85680
85811
 
85681
- ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=dc9fa1f2&prod&scoped=true&lang=scss&
85812
+ ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=4394461f&prod&scoped=true&lang=scss&
85682
85813
 
85683
85814
  ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue
85684
85815
 
@@ -85691,11 +85822,11 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85691
85822
 
85692
85823
  var scanner_camera_component_component = normalizeComponent(
85693
85824
  component_scanner_camera_componentvue_type_script_lang_js_,
85694
- scanner_camera_componentvue_type_template_id_dc9fa1f2_scoped_true_render,
85695
- scanner_camera_componentvue_type_template_id_dc9fa1f2_scoped_true_staticRenderFns,
85825
+ scanner_camera_componentvue_type_template_id_4394461f_scoped_true_render,
85826
+ scanner_camera_componentvue_type_template_id_4394461f_scoped_true_staticRenderFns,
85696
85827
  false,
85697
85828
  null,
85698
- "dc9fa1f2",
85829
+ "4394461f",
85699
85830
  null
85700
85831
 
85701
85832
  )
@@ -87554,6 +87685,257 @@ var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpac
87554
87685
  * @date: 2023-10-12
87555
87686
  * @description:华视电子读卡器
87556
87687
  */
87688
+ const NationalityEnum = {
87689
+ AND: "安道尔",
87690
+ AFG: "阿富汗",
87691
+ ATG: "安提瓜和巴布达",
87692
+ AIA: "安圭拉",
87693
+ ALB: "阿尔巴尼亚",
87694
+ ARM: "亚美尼亚",
87695
+ AGO: "安哥拉",
87696
+ ATA: "南极洲",
87697
+ ARG: "阿根廷",
87698
+ ASM: "美属萨摩亚",
87699
+ AUT: "奥地利",
87700
+ AUS: "澳大利亚",
87701
+ ABW: "阿鲁巴",
87702
+ ALA: "奥兰群岛",
87703
+ AZE: "阿塞拜疆",
87704
+ BIH: "波黑",
87705
+ BRB: "巴巴多斯",
87706
+ BGD: "孟加拉",
87707
+ BEL: "比利时",
87708
+ BFA: "布基纳法索",
87709
+ BGR: "保加利亚",
87710
+ BHR: "巴林",
87711
+ BDI: "布隆迪",
87712
+ BEN: "贝宁",
87713
+ BLM: "圣巴泰勒米岛",
87714
+ BMU: "百慕大",
87715
+ BRN: "文莱",
87716
+ BOL: "玻利维亚",
87717
+ BES: "荷兰加勒比区",
87718
+ BRA: "巴西",
87719
+ BHS: "巴哈马",
87720
+ BTN: "不丹",
87721
+ BVT: "布韦岛",
87722
+ BWA: "博茨瓦纳",
87723
+ BLR: "白俄罗斯",
87724
+ BLZ: "伯利兹",
87725
+ CAN: "加拿大",
87726
+ CCK: "科科斯群岛",
87727
+ CAF: "中非",
87728
+ CHE: "瑞士",
87729
+ CHL: "智利",
87730
+ CMR: "喀麦隆",
87731
+ COL: "哥伦比亚",
87732
+ CRI: "哥斯达黎加",
87733
+ CUB: "古巴",
87734
+ CPV: "佛得角",
87735
+ CXR: "圣诞岛",
87736
+ CYP: "塞浦路斯",
87737
+ CZE: "捷克",
87738
+ DEU: "德国",
87739
+ DJI: "吉布提",
87740
+ DNK: "丹麦",
87741
+ DMA: "多米尼克",
87742
+ DOM: "多米尼加",
87743
+ DZA: "阿尔及利亚",
87744
+ ECU: "厄瓜多尔",
87745
+ EST: "爱沙尼亚",
87746
+ EGY: "埃及",
87747
+ ESH: "西撒哈拉",
87748
+ ERI: "厄立特里亚",
87749
+ ESP: "西班牙",
87750
+ FIN: "芬兰",
87751
+ FJI: "斐济群岛",
87752
+ FLK: "马尔维纳斯群岛(福克兰)",
87753
+ FSM: "密克罗尼西亚联邦",
87754
+ FRO: "法罗群岛",
87755
+ FRA: "法国",
87756
+ GAB: "加蓬",
87757
+ GRD: "格林纳达",
87758
+ GEO: "格鲁吉亚",
87759
+ GUF: "法属圭亚那",
87760
+ GHA: "加纳",
87761
+ GIB: "直布罗陀",
87762
+ GRL: "格陵兰",
87763
+ GIN: "几内亚",
87764
+ GLP: "瓜德罗普",
87765
+ GNQ: "赤道几内亚",
87766
+ GRC: "希腊",
87767
+ SGS: "南乔治亚岛和南桑威奇群岛",
87768
+ GTM: "危地马拉",
87769
+ GUM: "关岛",
87770
+ GNB: "几内亚比绍",
87771
+ GUY: "圭亚那",
87772
+ HKG: "香港",
87773
+ HMD: "赫德岛和麦克唐纳群岛",
87774
+ HND: "洪都拉斯",
87775
+ HRV: "克罗地亚",
87776
+ HTI: "海地",
87777
+ HUN: "匈牙利",
87778
+ IDN: "印尼",
87779
+ IRL: "爱尔兰",
87780
+ ISR: "以色列",
87781
+ IMN: "马恩岛",
87782
+ IND: "印度",
87783
+ IOT: "英属印度洋领地",
87784
+ IRQ: "伊拉克",
87785
+ IRN: "伊朗",
87786
+ ISL: "冰岛",
87787
+ ITA: "意大利",
87788
+ JEY: "泽西岛",
87789
+ JAM: "牙买加",
87790
+ JOR: "约旦",
87791
+ JPN: "日本",
87792
+ KHM: "柬埔寨",
87793
+ KIR: "基里巴斯",
87794
+ COM: "科摩罗",
87795
+ KWT: "科威特",
87796
+ CYM: "开曼群岛",
87797
+ LBN: "黎巴嫩",
87798
+ LIE: "列支敦士登",
87799
+ LKA: "斯里兰卡",
87800
+ LBR: "利比里亚",
87801
+ LSO: "莱索托",
87802
+ LTU: "立陶宛",
87803
+ LUX: "卢森堡",
87804
+ LVA: "拉脱维亚",
87805
+ LBY: "利比亚",
87806
+ MAR: "摩洛哥",
87807
+ MCO: "摩纳哥",
87808
+ MDA: "摩尔多瓦",
87809
+ MNE: "黑山",
87810
+ MAF: "法属圣马丁",
87811
+ MDG: "马达加斯加",
87812
+ MHL: "马绍尔群岛",
87813
+ MKD: "马其顿",
87814
+ MLI: "马里",
87815
+ MMR: "缅甸",
87816
+ MAC: "澳门",
87817
+ MTQ: "马提尼克",
87818
+ MRT: "毛里塔尼亚",
87819
+ MSR: "蒙塞拉特岛",
87820
+ MLT: "马耳他",
87821
+ MDV: "马尔代夫",
87822
+ MWI: "马拉维",
87823
+ MEX: "墨西哥",
87824
+ MYS: "马来西亚",
87825
+ NAM: "纳米比亚",
87826
+ NER: "尼日尔",
87827
+ NFK: "诺福克岛",
87828
+ NGA: "尼日利亚",
87829
+ NIC: "尼加拉瓜",
87830
+ NLD: "荷兰",
87831
+ NOR: "挪威",
87832
+ NPL: "尼泊尔",
87833
+ NRU: "瑙鲁",
87834
+ OMN: "阿曼",
87835
+ PAN: "巴拿马",
87836
+ PER: "秘鲁",
87837
+ PYF: "法属波利尼西亚",
87838
+ PNG: "巴布亚新几内亚",
87839
+ PHL: "菲律宾",
87840
+ PAK: "巴基斯坦",
87841
+ POL: "波兰",
87842
+ PCN: "皮特凯恩群岛",
87843
+ PRI: "波多黎各",
87844
+ PSE: "巴勒斯坦",
87845
+ PLW: "帕劳",
87846
+ PRY: "巴拉圭",
87847
+ QAT: "卡塔尔",
87848
+ REU: "留尼汪",
87849
+ ROU: "罗马尼亚",
87850
+ SRB: "塞尔维亚",
87851
+ RUS: "俄罗斯",
87852
+ RWA: "卢旺达",
87853
+ SLB: "所罗门群岛",
87854
+ SYC: "塞舌尔",
87855
+ SDN: "苏丹",
87856
+ SWE: "瑞典",
87857
+ SGP: "新加坡",
87858
+ SVN: "斯洛文尼亚",
87859
+ SJM: "斯瓦尔巴群岛和 扬马延岛",
87860
+ SVK: "斯洛伐克",
87861
+ SLE: "塞拉利昂",
87862
+ SMR: "圣马力诺",
87863
+ SEN: "塞内加尔",
87864
+ SOM: "索马里",
87865
+ SUR: "苏里南",
87866
+ SSD: "南苏丹",
87867
+ STP: "圣多美和普林西比",
87868
+ SLV: "萨尔瓦多",
87869
+ SYR: "叙利亚",
87870
+ SWZ: "斯威士兰",
87871
+ TCA: "特克斯和凯科斯群岛",
87872
+ TCD: "乍得",
87873
+ TGO: "多哥",
87874
+ THA: "泰国",
87875
+ TKL: "托克劳",
87876
+ TLS: "东帝汶",
87877
+ TUN: "突尼斯",
87878
+ TON: "汤加",
87879
+ TUR: "土耳其",
87880
+ TUV: "图瓦卢",
87881
+ TZA: "坦桑尼亚",
87882
+ UKR: "乌克兰",
87883
+ UGA: "乌干达",
87884
+ USA: "美国",
87885
+ URY: "乌拉圭",
87886
+ VAT: "梵蒂冈",
87887
+ VEN: "委内瑞拉",
87888
+ VGB: "英属维尔京群岛",
87889
+ VIR: "美属维尔京群岛",
87890
+ VNM: "越南",
87891
+ WLF: "瓦利斯和富图纳",
87892
+ WSM: "萨摩亚",
87893
+ YEM: "也门",
87894
+ MYT: "马约特",
87895
+ ZAF: "南非",
87896
+ ZMB: "赞比亚",
87897
+ ZWE: "津巴布韦",
87898
+ CHN: "中国",
87899
+ COG: "刚果(布)",
87900
+ COD: "刚果(金)",
87901
+ MOZ: "莫桑比克",
87902
+ GGY: "根西岛",
87903
+ GMB: "冈比亚",
87904
+ MNP: "北马里亚纳群岛",
87905
+ ETH: "埃塞俄比亚",
87906
+ NCL: "新喀里多尼亚",
87907
+ VUT: "瓦努阿图",
87908
+ ATF: "法属南部领地",
87909
+ NIU: "纽埃",
87910
+ UMI: "美国本土外小岛屿",
87911
+ COK: "库克群岛",
87912
+ GBR: "英国",
87913
+ TTO: "特立尼达和多巴哥",
87914
+ VCT: "圣文森特和格林纳丁斯",
87915
+ TWN: "台湾",
87916
+ NZL: "新西兰",
87917
+ SAU: "沙特阿拉伯",
87918
+ LAO: "老挝",
87919
+ PRK: "朝鲜",
87920
+ KOR: "韩国",
87921
+ PRT: "葡萄牙",
87922
+ KGZ: "吉尔吉斯斯坦",
87923
+ KAZ: "哈萨克斯坦",
87924
+ TJK: "塔吉克斯坦",
87925
+ TKM: "土库曼斯坦",
87926
+ UZB: "乌兹别克斯坦",
87927
+ KNA: "圣基茨和尼维斯",
87928
+ SPM: "圣皮埃尔和密克隆",
87929
+ SHN: "圣赫勒拿",
87930
+ LCA: "圣卢西亚",
87931
+ MUS: "毛里求斯",
87932
+ CIV: "科特迪瓦",
87933
+ KEN: "肯尼亚",
87934
+ MNG: "蒙古国"
87935
+ };
87936
+ function convertNationality(nationality) {
87937
+ return NationalityEnum[nationality];
87938
+ }
87557
87939
  class HuaShiService {
87558
87940
  static startConnect() {
87559
87941
  if (this.ws && this.ws.readyState === WebSocket.CONNECTING) {
@@ -87629,23 +88011,55 @@ class HuaShiService {
87629
88011
  const readData = await HuaShiService.read();
87630
88012
  if (readData) {
87631
88013
  // 身份证|姓名|性别|民族|生日|地址|证件号|派出所|有效期起|有效期止||证件照 中间好多占位
87632
- let [type, name, sex, nation, birthday, address, cardId, police, validStart, validEnd] = readData.split('|');
87633
- let base64_ID = readData.split('|')[17];
87634
- const IDCardData = {
87635
- info: {
87636
- name,
87637
- sex,
87638
- birthday,
87639
- address,
87640
- cardId,
87641
- nation,
87642
- police,
87643
- validStart,
87644
- validEnd
87645
- },
87646
- headImage: base64_ID
87647
- };
87648
- return IDCardData;
88014
+ // 永居证|姓名|性别|永居证证件号|国籍代码|中文姓名|有效期起|有效期止|生日|证件版本号|受理机关代码|证件类别|照片内容 中间好多占位
88015
+ // 永居证|姓名|性别|永居证证件号|国籍代码|中文姓名|有效期起|有效期止|生日|换证次数|旧证件号|证件类别|照片内容 中间好多占位
88016
+ // 港澳台|姓名|性别|生日|住址|证件号|派出所|有效期起|有效期止|通行证号码|签发次数|证件类别|照片内容 中间好多占位
88017
+ let [model, placeholder, type, name, sex, nation, birthday, address, cardId, police, validStart, validEnd] = readData.split('|');
88018
+ let base64_ID = readData.split('|')[19];
88019
+ let NationCode = readData.split('|')[18];
88020
+ if (NationCode === '1') {
88021
+ // 身份证
88022
+ const IDCardData = {
88023
+ info: {
88024
+ cardType: '1',
88025
+ name,
88026
+ chineseName: '',
88027
+ englishName: '',
88028
+ sex,
88029
+ birthday,
88030
+ address,
88031
+ cardId,
88032
+ nationality: '中国',
88033
+ nation,
88034
+ police,
88035
+ validStart,
88036
+ validEnd
88037
+ },
88038
+ headImage: base64_ID
88039
+ };
88040
+ return IDCardData;
88041
+ } else {
88042
+ let chineseName = readData.split('|')[16] || '无中文姓名';
88043
+ const IDCardData = {
88044
+ info: {
88045
+ cardType: '9',
88046
+ name: chineseName === '无中文姓名' ? name : chineseName || name,
88047
+ chineseName,
88048
+ englishName: name,
88049
+ sex,
88050
+ birthday,
88051
+ address,
88052
+ cardId,
88053
+ nationality: convertNationality(NationCode),
88054
+ nation: '',
88055
+ police: '中华人民共和国国家移民管理局',
88056
+ validStart,
88057
+ validEnd
88058
+ },
88059
+ headImage: base64_ID
88060
+ };
88061
+ return IDCardData;
88062
+ }
87649
88063
  } else {
87650
88064
  throw Error('未匹配可用的读卡器');
87651
88065
  }
@@ -87933,7 +88347,7 @@ var ExitAndEntryMethodCode;
87933
88347
  /** 获取识别结果 */
87934
88348
  ExitAndEntryMethodCode["GetReadResult"] = "GetReadResult";
87935
88349
  })(ExitAndEntryMethodCode || (ExitAndEntryMethodCode = {}));
87936
- const NationalityEnum = {
88350
+ const exit_and_entry_plugin_service_NationalityEnum = {
87937
88351
  AND: "安道尔",
87938
88352
  AFG: "阿富汗",
87939
88353
  ATG: "安提瓜和巴布达",
@@ -88017,7 +88431,7 @@ const NationalityEnum = {
88017
88431
  GUM: "关岛",
88018
88432
  GNB: "几内亚比绍",
88019
88433
  GUY: "圭亚那",
88020
- HKG: "中国",
88434
+ HKG: "香港",
88021
88435
  HMD: "赫德岛和麦克唐纳群岛",
88022
88436
  HND: "洪都拉斯",
88023
88437
  HRV: "克罗地亚",
@@ -88061,7 +88475,7 @@ const NationalityEnum = {
88061
88475
  MKD: "马其顿",
88062
88476
  MLI: "马里",
88063
88477
  MMR: "缅甸",
88064
- MAC: "中国",
88478
+ MAC: "澳门",
88065
88479
  MTQ: "马提尼克",
88066
88480
  MRT: "毛里塔尼亚",
88067
88481
  MSR: "蒙塞拉特岛",
@@ -88160,7 +88574,7 @@ const NationalityEnum = {
88160
88574
  GBR: "英国",
88161
88575
  TTO: "特立尼达和多巴哥",
88162
88576
  VCT: "圣文森特和格林纳丁斯",
88163
- TWN: "中国",
88577
+ TWN: "台湾",
88164
88578
  NZL: "新西兰",
88165
88579
  SAU: "沙特阿拉伯",
88166
88580
  LAO: "老挝",
@@ -88186,8 +88600,8 @@ var SexEnum;
88186
88600
  SexEnum["MALE"] = "\u7537";
88187
88601
  SexEnum["FEMALE"] = "\u5973";
88188
88602
  })(SexEnum || (SexEnum = {}));
88189
- function convertNationality(nationality) {
88190
- return NationalityEnum[nationality];
88603
+ function exit_and_entry_plugin_service_convertNationality(nationality) {
88604
+ return exit_and_entry_plugin_service_NationalityEnum[nationality];
88191
88605
  }
88192
88606
  function urlToBase64(url) {
88193
88607
  return new Promise((resolve, reject) => {
@@ -88250,7 +88664,7 @@ async function formatNFCResult(data) {
88250
88664
  sex: SexEnum[sex] || '未知',
88251
88665
  cardId: doc_number,
88252
88666
  birthday: birth_DateFormat.replace('-', '').replace('-', ''),
88253
- nationality: convertNationality(state),
88667
+ nationality: exit_and_entry_plugin_service_convertNationality(state),
88254
88668
  validEnd: expired_DateFormat.replace('-', '').replace('-', ''),
88255
88669
  headImage: img.replace('data:image/png;base64,', '')
88256
88670
  };
@@ -88334,7 +88748,7 @@ async function formatPermanentResidencePermit(data) {
88334
88748
  sex: xbdm.replace('性', ''),
88335
88749
  cardId: zjhm || yjjlzhm,
88336
88750
  birthday: csrq,
88337
- nationality: convertNationality(gjdm),
88751
+ nationality: exit_and_entry_plugin_service_convertNationality(gjdm),
88338
88752
  validStart: yxqqsrq || zjqfrq,
88339
88753
  validEnd: yxqjzrq || zjzzrq,
88340
88754
  police: '中华人民共和国国家移民管理局',