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.
@@ -84019,8 +84019,8 @@ var scanner_cameravue_type_template_id_00e9072f_scoped_true_render = function re
84019
84019
  };
84020
84020
  var scanner_cameravue_type_template_id_00e9072f_scoped_true_staticRenderFns = [];
84021
84021
 
84022
- ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.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&
84023
- var scanner_camera_componentvue_type_template_id_dc9fa1f2_scoped_true_render = function render() {
84022
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.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&
84023
+ var scanner_camera_componentvue_type_template_id_4394461f_scoped_true_render = function render() {
84024
84024
  var _vm = this,
84025
84025
  _c = _vm._self._c;
84026
84026
  return _c('div', {
@@ -84084,7 +84084,7 @@ var scanner_camera_componentvue_type_template_id_dc9fa1f2_scoped_true_render = f
84084
84084
  }, [_vm._v(_vm._s(item.label))]) : _vm._e()];
84085
84085
  }), _vm._t("action")]], 2)])]);
84086
84086
  };
84087
- var scanner_camera_componentvue_type_template_id_dc9fa1f2_scoped_true_staticRenderFns = [];
84087
+ var scanner_camera_componentvue_type_template_id_4394461f_scoped_true_staticRenderFns = [];
84088
84088
 
84089
84089
  ;// CONCATENATED MODULE: ./packages/utils/custom-axios.ts
84090
84090
  /**
@@ -84151,10 +84151,17 @@ class custom_axios_CustomAxios {
84151
84151
 
84152
84152
  var eloam_plugin_service_ELoamMethodCode;
84153
84153
  (function (ELoamMethodCode) {
84154
+ ELoamMethodCode["ScannerCameraLinuxInit"] = "ScannerCameraLinuxInit";
84155
+ /** 打开摄像头linux*/
84156
+ ELoamMethodCode["ScannerCameraLinuxStartPreview"] = "ScannerCameraLinuxStartPreview";
84157
+ /** 获取视频帧 linux*/
84158
+ ELoamMethodCode["ScannerCameraLinuxGetFrame"] = "ScannerCameraLinuxGetFrame";
84154
84159
  /** 糾偏 */
84155
84160
  ELoamMethodCode["ScannerCameraDeskew_Base64"] = "ScannerCameraDeskew_Base64";
84156
84161
  /** 合并*/
84157
84162
  ELoamMethodCode["ScannerCameraMerge_Base64"] = "ScannerCameraMerge_Base64";
84163
+ /** 旋转 */
84164
+ ELoamMethodCode["ScannerCameraRotate"] = "ScannerCameraRotate";
84158
84165
  /** 扫描-主摄像头 */
84159
84166
  ELoamMethodCode["ScannerMainCamera_Base64"] = "ScannerMainCamera_Base64";
84160
84167
  /** 扫描-副摄像头 */
@@ -84170,71 +84177,118 @@ const eloam_plugin_service_ELoamMethodDesc = {
84170
84177
  class eloam_plugin_service_ELoamPassService {
84171
84178
  /** 主摄像头地址 */
84172
84179
  static get mainCameraUrl() {
84173
- return this.baseServiceUrl + '/video=stream&camidx=0';
84180
+ if (this._isLinux) {
84181
+ return this.baseLinuxServiceUrl + '/StartPreview?dev_idx=0&res_id=0';
84182
+ } else {
84183
+ return this.baseServiceUrl + '/video=stream&camidx=0';
84184
+ }
84174
84185
  }
84175
84186
  /** 副摄像头地址 */
84176
84187
  static get secondaryCameraUrl() {
84177
- return this.baseServiceUrl + '/video=stream&camidx=1';
84188
+ if (this._isLinux) {
84189
+ return this.baseLinuxServiceUrl + '/StartPreview?dev_idx=1&res_id=0';
84190
+ } else {
84191
+ return this.baseServiceUrl + '/video=stream&camidx=1';
84192
+ }
84178
84193
  }
84179
84194
  static async read(method, data) {
84180
84195
  let param = {},
84181
84196
  url = '',
84182
84197
  requestType = '';
84183
84198
  switch (method) {
84184
- case eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64:
84185
- // 开启纠偏裁边
84186
- url = this.baseServiceUrl + '/dvideo=cameradeskew';
84199
+ case eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxInit:
84200
+ url = `${this.baseLinuxServiceUrl}/GetAllDisplayInfo`;
84201
+ requestType = 'get';
84202
+ break;
84203
+ case eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxStartPreview:
84204
+ url = `${this.baseLinuxServiceUrl}/StartPreview?dev_idx=${data}&res_id=0`;
84205
+ requestType = 'get';
84206
+ break;
84207
+ case eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxGetFrame:
84208
+ url = `${this.baseLinuxServiceUrl}/getFrame`;
84209
+ requestType = 'get';
84210
+ break;
84211
+ case eloam_plugin_service_ELoamMethodCode.ScannerCameraRotate:
84212
+ url = this.baseServiceUrl + '/video=rotate';
84187
84213
  param = {
84188
84214
  camidx: "0",
84189
- open: "1"
84215
+ rotate: data.toString()
84190
84216
  };
84191
84217
  requestType = 'post';
84192
84218
  break;
84219
+ case eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64:
84220
+ // 纠偏
84221
+ if (eloam_plugin_service_ELoamPassService._isLinux) {
84222
+ url = `${this.baseLinuxServiceUrl}/EnableDeskImage?enable=${data}`;
84223
+ requestType = 'get';
84224
+ } else {
84225
+ // 开启纠偏裁边
84226
+ url = this.baseServiceUrl + '/dvideo=cameradeskew';
84227
+ param = {
84228
+ camidx: "0",
84229
+ open: data
84230
+ };
84231
+ requestType = 'post';
84232
+ }
84233
+ break;
84193
84234
  case eloam_plugin_service_ELoamMethodCode.ScannerCameraMerge_Base64:
84194
84235
  // 合并
84195
- url = this.baseServiceUrl + '/compose=photos';
84196
- // outputfilepath 输出文件保存地址。例:D://res.jpg
84197
- // outputmaxwidth 合成后文件最大宽度。例:3000px
84198
- // inputimagetype 待合成文件类型:0:file;1:base64
84199
- // outputimagetype 合成后文件类型:0:jpg;1:PDF
84200
- param = {
84201
- outputfilepath: "",
84202
- outputmaxwidth: "3000",
84203
- inputimagetype: "1",
84204
- outputimagetype: "0",
84205
- imagelist: data.toString()
84206
- };
84207
- requestType = 'post';
84236
+ if (this._isLinux) {
84237
+ // 国产
84238
+ url = `${this.baseLinuxServiceUrl}/composeIDcardPic?image1=${data.list[0]}&image2=${data.list[1]}`;
84239
+ requestType = 'get';
84240
+ } else {
84241
+ url = this.baseServiceUrl + '/compose=photos';
84242
+ param = {
84243
+ outputfilepath: "",
84244
+ outputmaxwidth: "3000",
84245
+ inputimagetype: "1",
84246
+ outputimagetype: "0",
84247
+ isIDCardCompose: data.type,
84248
+ imagelist: data.list.toString()
84249
+ };
84250
+ requestType = 'post';
84251
+ }
84208
84252
  break;
84209
84253
  case eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64:
84210
84254
  // rotate: 旋转角度;deskew:纠偏,主摄像头1,副摄像头0 camidx:主摄像头0,副摄像头1;ColorMode:quality
84211
- url = this.baseServiceUrl + '/video=grabimage';
84212
- param = {
84213
- filepath: "",
84214
- rotate: "0",
84215
- deskew: "0",
84216
- deskewval: "0",
84217
- camidx: "0",
84218
- ColorMode: "0",
84219
- quality: "0",
84220
- bIsPrint1to1: "0"
84221
- };
84222
- requestType = 'post';
84255
+ if (this._isLinux) {
84256
+ url = this.baseLinuxServiceUrl + '/getPic?filepath=/tmp';
84257
+ requestType = 'get';
84258
+ } else {
84259
+ url = this.baseServiceUrl + '/video=grabimage';
84260
+ param = {
84261
+ filepath: "base64",
84262
+ rotate: "0",
84263
+ deskew: data,
84264
+ deskewval: "20",
84265
+ camidx: "0",
84266
+ ColorMode: "0",
84267
+ quality: "0",
84268
+ bIsPrint1to1: "0"
84269
+ };
84270
+ requestType = 'post';
84271
+ }
84223
84272
  break;
84224
84273
  case eloam_plugin_service_ELoamMethodCode.ScannerSecondaryCamera_Base64:
84225
- // rotate: 旋转角度,;deskew:纠偏,主摄像头1,副摄像头0 camidx:主摄像头0,副摄像头1;ColorMode:quality
84226
- url = this.baseServiceUrl + '/video=grabimage';
84227
- param = {
84228
- filepath: "",
84229
- rotate: "0",
84230
- deskew: "0",
84231
- deskewval: "0",
84232
- camidx: "1",
84233
- ColorMode: "0",
84234
- quality: "0",
84235
- bIsPrint1to1: "0"
84236
- };
84237
- requestType = 'post';
84274
+ if (this._isLinux) {
84275
+ url = this.baseLinuxServiceUrl + '/getPic?filepath=/tmp';
84276
+ requestType = 'get';
84277
+ } else {
84278
+ // rotate: 旋转角度,;deskew:纠偏,主摄像头1,副摄像头0 camidx:主摄像头0,副摄像头1;ColorMode:quality
84279
+ url = this.baseServiceUrl + '/video=grabimage';
84280
+ param = {
84281
+ filepath: "",
84282
+ rotate: "0",
84283
+ deskew: "0",
84284
+ deskewval: "0",
84285
+ camidx: "1",
84286
+ ColorMode: "0",
84287
+ quality: "0",
84288
+ bIsPrint1to1: "0"
84289
+ };
84290
+ requestType = 'post';
84291
+ }
84238
84292
  break;
84239
84293
  case eloam_plugin_service_ELoamMethodCode.ReadIDCard_Base64:
84240
84294
  url = this.baseServiceUrl + '/card=idcard';
@@ -84244,24 +84298,44 @@ class eloam_plugin_service_ELoamPassService {
84244
84298
  let res = await custom_axios_CustomAxios[requestType](url, param);
84245
84299
  return res;
84246
84300
  }
84301
+ static async initLinuxCamera() {
84302
+ await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxInit);
84303
+ }
84304
+ static async startPreview(data) {
84305
+ return await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxStartPreview, data);
84306
+ }
84307
+ static async getEloamFrame() {
84308
+ return await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxGetFrame);
84309
+ }
84247
84310
  /** 主摄像头拍照 */
84248
- static async scanByMainCamera() {
84249
- const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64);
84250
- return res.photoBase64;
84311
+ static async scanByMainCamera(deskew) {
84312
+ const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64, deskew);
84313
+ if (this._isLinux) {
84314
+ return res.data.img; // 国产
84315
+ } else {
84316
+ return res.photoBase64;
84317
+ }
84251
84318
  }
84252
84319
  /** 副摄像头拍照 */
84253
84320
  static async scanBySecondaryCamera() {
84254
84321
  const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerSecondaryCamera_Base64);
84255
- return res.photoBase64;
84322
+ if (this._isLinux) {
84323
+ return res.data.img; // 国产
84324
+ } else {
84325
+ return res.photoBase64;
84326
+ }
84256
84327
  }
84257
- static async mergeImage(list) {
84258
- const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraMerge_Base64, list);
84259
- return res.base64;
84328
+ static async mergeImage(list, type) {
84329
+ const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraMerge_Base64, {
84330
+ list,
84331
+ type
84332
+ });
84333
+ return res.base64 || res.data;
84260
84334
  }
84261
- static async scanByCamera(type) {
84335
+ static async scanByCamera(type, deskew) {
84262
84336
  switch (type) {
84263
84337
  case "main":
84264
- return this.scanByMainCamera();
84338
+ return this.scanByMainCamera(deskew);
84265
84339
  case 'vice':
84266
84340
  return this.scanBySecondaryCamera();
84267
84341
  }
@@ -84322,6 +84396,8 @@ class eloam_plugin_service_ELoamPassService {
84322
84396
  }
84323
84397
  }
84324
84398
  _defineProperty(eloam_plugin_service_ELoamPassService, "baseServiceUrl", 'http://127.0.0.1:38088');
84399
+ _defineProperty(eloam_plugin_service_ELoamPassService, "baseLinuxServiceUrl", 'http://127.0.0.1:6543');
84400
+ _defineProperty(eloam_plugin_service_ELoamPassService, "_isLinux", String(navigator.platform).indexOf("Linux") > -1);
84325
84401
  ;// CONCATENATED MODULE: ./packages/model/common-message.ts
84326
84402
 
84327
84403
  /**
@@ -85469,13 +85545,26 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85469
85545
  name: '照片',
85470
85546
  value: 1
85471
85547
  }],
85548
+ deskewStatus: '0',
85549
+ rotateDeg: 0,
85472
85550
  buttonList: [{
85473
85551
  label: '拍照',
85474
85552
  name: 'take-pictures'
85475
85553
  }, {
85476
- label: '合并拍照',
85554
+ label: '图片合并',
85477
85555
  name: 'take-pictures-merge'
85556
+ }, {
85557
+ label: '证件合并',
85558
+ name: 'take-idCard-pictures-merge'
85559
+ }, {
85560
+ label: '纠偏裁边',
85561
+ name: 'open-deskew'
85562
+ }, {
85563
+ label: '旋转',
85564
+ name: 'rotate-video'
85478
85565
  }],
85566
+ _isLinux: String(navigator.platform).indexOf("Linux") > -1,
85567
+ eloamLinuxFrameTimer: {},
85479
85568
  mergeImageList: []
85480
85569
  };
85481
85570
  },
@@ -85542,10 +85631,10 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85542
85631
  {
85543
85632
  // 良田
85544
85633
  let type = this.camera === 0 ? 'main' : 'vice';
85545
- const res = await eloam_plugin_service_ELoamPassService.scanByCamera(type);
85546
- console.log('良田=>', res);
85634
+ const res = await eloam_plugin_service_ELoamPassService.scanByCamera(type, this.deskewStatus);
85547
85635
  if (res) {
85548
- this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res}`);
85636
+ let path = String(navigator.platform).indexOf("Linux") > -1 ? res.photoBase64 : res;
85637
+ this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${path}`);
85549
85638
  } else {
85550
85639
  this.$message.error('拍照出错,请检查设备是否连接成功');
85551
85640
  }
@@ -85579,10 +85668,15 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85579
85668
  break;
85580
85669
  case 5:
85581
85670
  // 良田高拍仪
85582
- this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
85583
- setTimeout(() => {
85584
- eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64); // 开启纠偏裁边
85585
- }, 2000);
85671
+ if (!(String(navigator.platform).indexOf("Linux") > -1)) {
85672
+ this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
85673
+ } else {
85674
+ await eloam_plugin_service_ELoamPassService.initLinuxCamera();
85675
+ let res = await eloam_plugin_service_ELoamPassService.startPreview('0');
85676
+ if (res.returnCode == "0" || res.returnCode == "2") {
85677
+ this.eloamLinuxFrameTimer = setInterval(this.getEloamFrame, 300);
85678
+ }
85679
+ }
85586
85680
  break;
85587
85681
  case 6:
85588
85682
  // 国产客户端一体机
@@ -85590,6 +85684,15 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85590
85684
  break;
85591
85685
  }
85592
85686
  },
85687
+ async getEloamFrame() {
85688
+ let res = await eloam_plugin_service_ELoamPassService.getEloamFrame();
85689
+ if (res.returnCode == "1") {
85690
+ clearInterval(this.eloamLinuxFrameTimer);
85691
+ return;
85692
+ }
85693
+ if (res.data.img == "") return;
85694
+ this.scannerVideoSrc = `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res.data.img}`;
85695
+ },
85593
85696
  /**
85594
85697
  * 副摄像头
85595
85698
  */
@@ -85609,7 +85712,13 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85609
85712
  break;
85610
85713
  case 5:
85611
85714
  // 良田
85612
- this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.secondaryCameraUrl;
85715
+ if (!(String(navigator.platform).indexOf("Linux") > -1)) {
85716
+ this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
85717
+ } else {
85718
+ await eloam_plugin_service_ELoamPassService.initLinuxCamera();
85719
+ await eloam_plugin_service_ELoamPassService.startPreview('1');
85720
+ this.eloamLinuxFrameTimer = setInterval(this.getEloamFrame, 300);
85721
+ }
85613
85722
  break;
85614
85723
  case 6:
85615
85724
  // 国产客户端一体机
@@ -85617,13 +85726,15 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85617
85726
  break;
85618
85727
  }
85619
85728
  },
85620
- async takePictureMerge() {
85621
- const res = await eloam_plugin_service_ELoamPassService.scanByCamera('main');
85729
+ async takePictureMerge(type) {
85730
+ if (type === '1' && this.deskewStatus === '0') return this.$message.warning('请先开启纠偏');
85731
+ const res = await eloam_plugin_service_ELoamPassService.scanByCamera('main', this.deskewStatus);
85622
85732
  if (res) {
85623
- this.mergeImageList.push(res);
85733
+ let path = String(navigator.platform).indexOf("Linux") > -1 ? res.filepath : res;
85734
+ this.mergeImageList.push(path);
85624
85735
  if (this.mergeImageList.length === 1) this.$message.success('第一张拍摄成功,请拍第二张');
85625
85736
  if (this.mergeImageList.length === 2) {
85626
- let result = await eloam_plugin_service_ELoamPassService.mergeImage(this.mergeImageList);
85737
+ let result = await eloam_plugin_service_ELoamPassService.mergeImage(this.mergeImageList, type);
85627
85738
  this.mergeImageList = [];
85628
85739
  this.$message.success('合并成功');
85629
85740
  this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${result}`);
@@ -85635,6 +85746,9 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85635
85746
  _isShowButton(name) {
85636
85747
  switch (name) {
85637
85748
  case 'take-pictures-merge':
85749
+ case 'take-idCard-pictures-merge':
85750
+ case 'open-deskew': // 纠偏裁边
85751
+ case 'rotate-video':
85638
85752
  return this.machineType === 5;
85639
85753
  // 良田显示合并拍照
85640
85754
  default:
@@ -85657,18 +85771,35 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85657
85771
  break;
85658
85772
  case 'take-pictures-merge':
85659
85773
  // 拍照合并
85660
- this.takePictureMerge();
85774
+ this.takePictureMerge('0');
85661
85775
  break;
85776
+ case 'take-idCard-pictures-merge':
85777
+ // 合并拍照身份证
85778
+ this.takePictureMerge('1');
85779
+ break;
85780
+ case 'rotate-video':
85781
+ if (String(navigator.platform).indexOf("Linux") > -1) {
85782
+ this.rotateDeg += 90;
85783
+ if (this.rotateDeg === 360) this.rotateDeg = 0;
85784
+ } else {
85785
+ this.rotateDeg = 90;
85786
+ }
85787
+ eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraRotate, this.rotateDeg); // 选装
85788
+ break;
85789
+ case 'open-deskew':
85790
+ this.deskewStatus = this.deskewStatus === '1' ? '0' : '1';
85791
+ eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64, this.deskewStatus);
85792
+ // 开启纠偏裁边
85662
85793
  }
85663
85794
  }
85664
85795
  }
85665
85796
  });
85666
85797
  ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=script&lang=js&
85667
85798
  /* harmony default export */ var component_scanner_camera_componentvue_type_script_lang_js_ = (scanner_camera_componentvue_type_script_lang_js_);
85668
- ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.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-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.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&
85799
+ ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.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-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.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&
85669
85800
  // extracted by mini-css-extract-plugin
85670
85801
 
85671
- ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=dc9fa1f2&prod&scoped=true&lang=scss&
85802
+ ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=4394461f&prod&scoped=true&lang=scss&
85672
85803
 
85673
85804
  ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue
85674
85805
 
@@ -85681,11 +85812,11 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85681
85812
 
85682
85813
  var scanner_camera_component_component = normalizeComponent(
85683
85814
  component_scanner_camera_componentvue_type_script_lang_js_,
85684
- scanner_camera_componentvue_type_template_id_dc9fa1f2_scoped_true_render,
85685
- scanner_camera_componentvue_type_template_id_dc9fa1f2_scoped_true_staticRenderFns,
85815
+ scanner_camera_componentvue_type_template_id_4394461f_scoped_true_render,
85816
+ scanner_camera_componentvue_type_template_id_4394461f_scoped_true_staticRenderFns,
85686
85817
  false,
85687
85818
  null,
85688
- "dc9fa1f2",
85819
+ "4394461f",
85689
85820
  null
85690
85821
 
85691
85822
  )
@@ -87544,6 +87675,257 @@ var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpac
87544
87675
  * @date: 2023-10-12
87545
87676
  * @description:华视电子读卡器
87546
87677
  */
87678
+ const NationalityEnum = {
87679
+ AND: "安道尔",
87680
+ AFG: "阿富汗",
87681
+ ATG: "安提瓜和巴布达",
87682
+ AIA: "安圭拉",
87683
+ ALB: "阿尔巴尼亚",
87684
+ ARM: "亚美尼亚",
87685
+ AGO: "安哥拉",
87686
+ ATA: "南极洲",
87687
+ ARG: "阿根廷",
87688
+ ASM: "美属萨摩亚",
87689
+ AUT: "奥地利",
87690
+ AUS: "澳大利亚",
87691
+ ABW: "阿鲁巴",
87692
+ ALA: "奥兰群岛",
87693
+ AZE: "阿塞拜疆",
87694
+ BIH: "波黑",
87695
+ BRB: "巴巴多斯",
87696
+ BGD: "孟加拉",
87697
+ BEL: "比利时",
87698
+ BFA: "布基纳法索",
87699
+ BGR: "保加利亚",
87700
+ BHR: "巴林",
87701
+ BDI: "布隆迪",
87702
+ BEN: "贝宁",
87703
+ BLM: "圣巴泰勒米岛",
87704
+ BMU: "百慕大",
87705
+ BRN: "文莱",
87706
+ BOL: "玻利维亚",
87707
+ BES: "荷兰加勒比区",
87708
+ BRA: "巴西",
87709
+ BHS: "巴哈马",
87710
+ BTN: "不丹",
87711
+ BVT: "布韦岛",
87712
+ BWA: "博茨瓦纳",
87713
+ BLR: "白俄罗斯",
87714
+ BLZ: "伯利兹",
87715
+ CAN: "加拿大",
87716
+ CCK: "科科斯群岛",
87717
+ CAF: "中非",
87718
+ CHE: "瑞士",
87719
+ CHL: "智利",
87720
+ CMR: "喀麦隆",
87721
+ COL: "哥伦比亚",
87722
+ CRI: "哥斯达黎加",
87723
+ CUB: "古巴",
87724
+ CPV: "佛得角",
87725
+ CXR: "圣诞岛",
87726
+ CYP: "塞浦路斯",
87727
+ CZE: "捷克",
87728
+ DEU: "德国",
87729
+ DJI: "吉布提",
87730
+ DNK: "丹麦",
87731
+ DMA: "多米尼克",
87732
+ DOM: "多米尼加",
87733
+ DZA: "阿尔及利亚",
87734
+ ECU: "厄瓜多尔",
87735
+ EST: "爱沙尼亚",
87736
+ EGY: "埃及",
87737
+ ESH: "西撒哈拉",
87738
+ ERI: "厄立特里亚",
87739
+ ESP: "西班牙",
87740
+ FIN: "芬兰",
87741
+ FJI: "斐济群岛",
87742
+ FLK: "马尔维纳斯群岛(福克兰)",
87743
+ FSM: "密克罗尼西亚联邦",
87744
+ FRO: "法罗群岛",
87745
+ FRA: "法国",
87746
+ GAB: "加蓬",
87747
+ GRD: "格林纳达",
87748
+ GEO: "格鲁吉亚",
87749
+ GUF: "法属圭亚那",
87750
+ GHA: "加纳",
87751
+ GIB: "直布罗陀",
87752
+ GRL: "格陵兰",
87753
+ GIN: "几内亚",
87754
+ GLP: "瓜德罗普",
87755
+ GNQ: "赤道几内亚",
87756
+ GRC: "希腊",
87757
+ SGS: "南乔治亚岛和南桑威奇群岛",
87758
+ GTM: "危地马拉",
87759
+ GUM: "关岛",
87760
+ GNB: "几内亚比绍",
87761
+ GUY: "圭亚那",
87762
+ HKG: "香港",
87763
+ HMD: "赫德岛和麦克唐纳群岛",
87764
+ HND: "洪都拉斯",
87765
+ HRV: "克罗地亚",
87766
+ HTI: "海地",
87767
+ HUN: "匈牙利",
87768
+ IDN: "印尼",
87769
+ IRL: "爱尔兰",
87770
+ ISR: "以色列",
87771
+ IMN: "马恩岛",
87772
+ IND: "印度",
87773
+ IOT: "英属印度洋领地",
87774
+ IRQ: "伊拉克",
87775
+ IRN: "伊朗",
87776
+ ISL: "冰岛",
87777
+ ITA: "意大利",
87778
+ JEY: "泽西岛",
87779
+ JAM: "牙买加",
87780
+ JOR: "约旦",
87781
+ JPN: "日本",
87782
+ KHM: "柬埔寨",
87783
+ KIR: "基里巴斯",
87784
+ COM: "科摩罗",
87785
+ KWT: "科威特",
87786
+ CYM: "开曼群岛",
87787
+ LBN: "黎巴嫩",
87788
+ LIE: "列支敦士登",
87789
+ LKA: "斯里兰卡",
87790
+ LBR: "利比里亚",
87791
+ LSO: "莱索托",
87792
+ LTU: "立陶宛",
87793
+ LUX: "卢森堡",
87794
+ LVA: "拉脱维亚",
87795
+ LBY: "利比亚",
87796
+ MAR: "摩洛哥",
87797
+ MCO: "摩纳哥",
87798
+ MDA: "摩尔多瓦",
87799
+ MNE: "黑山",
87800
+ MAF: "法属圣马丁",
87801
+ MDG: "马达加斯加",
87802
+ MHL: "马绍尔群岛",
87803
+ MKD: "马其顿",
87804
+ MLI: "马里",
87805
+ MMR: "缅甸",
87806
+ MAC: "澳门",
87807
+ MTQ: "马提尼克",
87808
+ MRT: "毛里塔尼亚",
87809
+ MSR: "蒙塞拉特岛",
87810
+ MLT: "马耳他",
87811
+ MDV: "马尔代夫",
87812
+ MWI: "马拉维",
87813
+ MEX: "墨西哥",
87814
+ MYS: "马来西亚",
87815
+ NAM: "纳米比亚",
87816
+ NER: "尼日尔",
87817
+ NFK: "诺福克岛",
87818
+ NGA: "尼日利亚",
87819
+ NIC: "尼加拉瓜",
87820
+ NLD: "荷兰",
87821
+ NOR: "挪威",
87822
+ NPL: "尼泊尔",
87823
+ NRU: "瑙鲁",
87824
+ OMN: "阿曼",
87825
+ PAN: "巴拿马",
87826
+ PER: "秘鲁",
87827
+ PYF: "法属波利尼西亚",
87828
+ PNG: "巴布亚新几内亚",
87829
+ PHL: "菲律宾",
87830
+ PAK: "巴基斯坦",
87831
+ POL: "波兰",
87832
+ PCN: "皮特凯恩群岛",
87833
+ PRI: "波多黎各",
87834
+ PSE: "巴勒斯坦",
87835
+ PLW: "帕劳",
87836
+ PRY: "巴拉圭",
87837
+ QAT: "卡塔尔",
87838
+ REU: "留尼汪",
87839
+ ROU: "罗马尼亚",
87840
+ SRB: "塞尔维亚",
87841
+ RUS: "俄罗斯",
87842
+ RWA: "卢旺达",
87843
+ SLB: "所罗门群岛",
87844
+ SYC: "塞舌尔",
87845
+ SDN: "苏丹",
87846
+ SWE: "瑞典",
87847
+ SGP: "新加坡",
87848
+ SVN: "斯洛文尼亚",
87849
+ SJM: "斯瓦尔巴群岛和 扬马延岛",
87850
+ SVK: "斯洛伐克",
87851
+ SLE: "塞拉利昂",
87852
+ SMR: "圣马力诺",
87853
+ SEN: "塞内加尔",
87854
+ SOM: "索马里",
87855
+ SUR: "苏里南",
87856
+ SSD: "南苏丹",
87857
+ STP: "圣多美和普林西比",
87858
+ SLV: "萨尔瓦多",
87859
+ SYR: "叙利亚",
87860
+ SWZ: "斯威士兰",
87861
+ TCA: "特克斯和凯科斯群岛",
87862
+ TCD: "乍得",
87863
+ TGO: "多哥",
87864
+ THA: "泰国",
87865
+ TKL: "托克劳",
87866
+ TLS: "东帝汶",
87867
+ TUN: "突尼斯",
87868
+ TON: "汤加",
87869
+ TUR: "土耳其",
87870
+ TUV: "图瓦卢",
87871
+ TZA: "坦桑尼亚",
87872
+ UKR: "乌克兰",
87873
+ UGA: "乌干达",
87874
+ USA: "美国",
87875
+ URY: "乌拉圭",
87876
+ VAT: "梵蒂冈",
87877
+ VEN: "委内瑞拉",
87878
+ VGB: "英属维尔京群岛",
87879
+ VIR: "美属维尔京群岛",
87880
+ VNM: "越南",
87881
+ WLF: "瓦利斯和富图纳",
87882
+ WSM: "萨摩亚",
87883
+ YEM: "也门",
87884
+ MYT: "马约特",
87885
+ ZAF: "南非",
87886
+ ZMB: "赞比亚",
87887
+ ZWE: "津巴布韦",
87888
+ CHN: "中国",
87889
+ COG: "刚果(布)",
87890
+ COD: "刚果(金)",
87891
+ MOZ: "莫桑比克",
87892
+ GGY: "根西岛",
87893
+ GMB: "冈比亚",
87894
+ MNP: "北马里亚纳群岛",
87895
+ ETH: "埃塞俄比亚",
87896
+ NCL: "新喀里多尼亚",
87897
+ VUT: "瓦努阿图",
87898
+ ATF: "法属南部领地",
87899
+ NIU: "纽埃",
87900
+ UMI: "美国本土外小岛屿",
87901
+ COK: "库克群岛",
87902
+ GBR: "英国",
87903
+ TTO: "特立尼达和多巴哥",
87904
+ VCT: "圣文森特和格林纳丁斯",
87905
+ TWN: "台湾",
87906
+ NZL: "新西兰",
87907
+ SAU: "沙特阿拉伯",
87908
+ LAO: "老挝",
87909
+ PRK: "朝鲜",
87910
+ KOR: "韩国",
87911
+ PRT: "葡萄牙",
87912
+ KGZ: "吉尔吉斯斯坦",
87913
+ KAZ: "哈萨克斯坦",
87914
+ TJK: "塔吉克斯坦",
87915
+ TKM: "土库曼斯坦",
87916
+ UZB: "乌兹别克斯坦",
87917
+ KNA: "圣基茨和尼维斯",
87918
+ SPM: "圣皮埃尔和密克隆",
87919
+ SHN: "圣赫勒拿",
87920
+ LCA: "圣卢西亚",
87921
+ MUS: "毛里求斯",
87922
+ CIV: "科特迪瓦",
87923
+ KEN: "肯尼亚",
87924
+ MNG: "蒙古国"
87925
+ };
87926
+ function convertNationality(nationality) {
87927
+ return NationalityEnum[nationality];
87928
+ }
87547
87929
  class HuaShiService {
87548
87930
  static startConnect() {
87549
87931
  if (this.ws && this.ws.readyState === WebSocket.CONNECTING) {
@@ -87619,23 +88001,55 @@ class HuaShiService {
87619
88001
  const readData = await HuaShiService.read();
87620
88002
  if (readData) {
87621
88003
  // 身份证|姓名|性别|民族|生日|地址|证件号|派出所|有效期起|有效期止||证件照 中间好多占位
87622
- let [type, name, sex, nation, birthday, address, cardId, police, validStart, validEnd] = readData.split('|');
87623
- let base64_ID = readData.split('|')[17];
87624
- const IDCardData = {
87625
- info: {
87626
- name,
87627
- sex,
87628
- birthday,
87629
- address,
87630
- cardId,
87631
- nation,
87632
- police,
87633
- validStart,
87634
- validEnd
87635
- },
87636
- headImage: base64_ID
87637
- };
87638
- return IDCardData;
88004
+ // 永居证|姓名|性别|永居证证件号|国籍代码|中文姓名|有效期起|有效期止|生日|证件版本号|受理机关代码|证件类别|照片内容 中间好多占位
88005
+ // 永居证|姓名|性别|永居证证件号|国籍代码|中文姓名|有效期起|有效期止|生日|换证次数|旧证件号|证件类别|照片内容 中间好多占位
88006
+ // 港澳台|姓名|性别|生日|住址|证件号|派出所|有效期起|有效期止|通行证号码|签发次数|证件类别|照片内容 中间好多占位
88007
+ let [model, placeholder, type, name, sex, nation, birthday, address, cardId, police, validStart, validEnd] = readData.split('|');
88008
+ let base64_ID = readData.split('|')[19];
88009
+ let NationCode = readData.split('|')[18];
88010
+ if (NationCode === '1') {
88011
+ // 身份证
88012
+ const IDCardData = {
88013
+ info: {
88014
+ cardType: '1',
88015
+ name,
88016
+ chineseName: '',
88017
+ englishName: '',
88018
+ sex,
88019
+ birthday,
88020
+ address,
88021
+ cardId,
88022
+ nationality: '中国',
88023
+ nation,
88024
+ police,
88025
+ validStart,
88026
+ validEnd
88027
+ },
88028
+ headImage: base64_ID
88029
+ };
88030
+ return IDCardData;
88031
+ } else {
88032
+ let chineseName = readData.split('|')[16] || '无中文姓名';
88033
+ const IDCardData = {
88034
+ info: {
88035
+ cardType: '9',
88036
+ name: chineseName === '无中文姓名' ? name : chineseName || name,
88037
+ chineseName,
88038
+ englishName: name,
88039
+ sex,
88040
+ birthday,
88041
+ address,
88042
+ cardId,
88043
+ nationality: convertNationality(NationCode),
88044
+ nation: '',
88045
+ police: '中华人民共和国国家移民管理局',
88046
+ validStart,
88047
+ validEnd
88048
+ },
88049
+ headImage: base64_ID
88050
+ };
88051
+ return IDCardData;
88052
+ }
87639
88053
  } else {
87640
88054
  throw Error('未匹配可用的读卡器');
87641
88055
  }
@@ -87923,7 +88337,7 @@ var ExitAndEntryMethodCode;
87923
88337
  /** 获取识别结果 */
87924
88338
  ExitAndEntryMethodCode["GetReadResult"] = "GetReadResult";
87925
88339
  })(ExitAndEntryMethodCode || (ExitAndEntryMethodCode = {}));
87926
- const NationalityEnum = {
88340
+ const exit_and_entry_plugin_service_NationalityEnum = {
87927
88341
  AND: "安道尔",
87928
88342
  AFG: "阿富汗",
87929
88343
  ATG: "安提瓜和巴布达",
@@ -88007,7 +88421,7 @@ const NationalityEnum = {
88007
88421
  GUM: "关岛",
88008
88422
  GNB: "几内亚比绍",
88009
88423
  GUY: "圭亚那",
88010
- HKG: "中国",
88424
+ HKG: "香港",
88011
88425
  HMD: "赫德岛和麦克唐纳群岛",
88012
88426
  HND: "洪都拉斯",
88013
88427
  HRV: "克罗地亚",
@@ -88051,7 +88465,7 @@ const NationalityEnum = {
88051
88465
  MKD: "马其顿",
88052
88466
  MLI: "马里",
88053
88467
  MMR: "缅甸",
88054
- MAC: "中国",
88468
+ MAC: "澳门",
88055
88469
  MTQ: "马提尼克",
88056
88470
  MRT: "毛里塔尼亚",
88057
88471
  MSR: "蒙塞拉特岛",
@@ -88150,7 +88564,7 @@ const NationalityEnum = {
88150
88564
  GBR: "英国",
88151
88565
  TTO: "特立尼达和多巴哥",
88152
88566
  VCT: "圣文森特和格林纳丁斯",
88153
- TWN: "中国",
88567
+ TWN: "台湾",
88154
88568
  NZL: "新西兰",
88155
88569
  SAU: "沙特阿拉伯",
88156
88570
  LAO: "老挝",
@@ -88176,8 +88590,8 @@ var SexEnum;
88176
88590
  SexEnum["MALE"] = "\u7537";
88177
88591
  SexEnum["FEMALE"] = "\u5973";
88178
88592
  })(SexEnum || (SexEnum = {}));
88179
- function convertNationality(nationality) {
88180
- return NationalityEnum[nationality];
88593
+ function exit_and_entry_plugin_service_convertNationality(nationality) {
88594
+ return exit_and_entry_plugin_service_NationalityEnum[nationality];
88181
88595
  }
88182
88596
  function urlToBase64(url) {
88183
88597
  return new Promise((resolve, reject) => {
@@ -88240,7 +88654,7 @@ async function formatNFCResult(data) {
88240
88654
  sex: SexEnum[sex] || '未知',
88241
88655
  cardId: doc_number,
88242
88656
  birthday: birth_DateFormat.replace('-', '').replace('-', ''),
88243
- nationality: convertNationality(state),
88657
+ nationality: exit_and_entry_plugin_service_convertNationality(state),
88244
88658
  validEnd: expired_DateFormat.replace('-', '').replace('-', ''),
88245
88659
  headImage: img.replace('data:image/png;base64,', '')
88246
88660
  };
@@ -88324,7 +88738,7 @@ async function formatPermanentResidencePermit(data) {
88324
88738
  sex: xbdm.replace('性', ''),
88325
88739
  cardId: zjhm || yjjlzhm,
88326
88740
  birthday: csrq,
88327
- nationality: convertNationality(gjdm),
88741
+ nationality: exit_and_entry_plugin_service_convertNationality(gjdm),
88328
88742
  validStart: yxqqsrq || zjqfrq,
88329
88743
  validEnd: yxqjzrq || zjzzrq,
88330
88744
  police: '中华人民共和国国家移民管理局',