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

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=0c4fd56a&scoped=true&
84023
+ var scanner_camera_componentvue_type_template_id_0c4fd56a_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_0c4fd56a_scoped_true_staticRenderFns = [];
84088
84088
 
84089
84089
  ;// CONCATENATED MODULE: ./packages/utils/custom-axios.ts
84090
84090
  /**
@@ -84151,10 +84151,13 @@ class custom_axios_CustomAxios {
84151
84151
 
84152
84152
  var eloam_plugin_service_ELoamMethodCode;
84153
84153
  (function (ELoamMethodCode) {
84154
+ ELoamMethodCode["ScannerCameraLinuxInit"] = "ScannerCameraLinuxInit";
84154
84155
  /** 糾偏 */
84155
84156
  ELoamMethodCode["ScannerCameraDeskew_Base64"] = "ScannerCameraDeskew_Base64";
84156
84157
  /** 合并*/
84157
84158
  ELoamMethodCode["ScannerCameraMerge_Base64"] = "ScannerCameraMerge_Base64";
84159
+ /** 旋转 */
84160
+ ELoamMethodCode["ScannerCameraRotate"] = "ScannerCameraRotate";
84158
84161
  /** 扫描-主摄像头 */
84159
84162
  ELoamMethodCode["ScannerMainCamera_Base64"] = "ScannerMainCamera_Base64";
84160
84163
  /** 扫描-副摄像头 */
@@ -84181,39 +84184,60 @@ class eloam_plugin_service_ELoamPassService {
84181
84184
  url = '',
84182
84185
  requestType = '';
84183
84186
  switch (method) {
84184
- case eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64:
84185
- // 开启纠偏裁边
84186
- url = this.baseServiceUrl + '/dvideo=cameradeskew';
84187
+ case eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxInit:
84188
+ url = `${this.baseLinuxServiceUrl}/GetAllDisplayInfo`;
84189
+ requestType = 'get';
84190
+ break;
84191
+ case eloam_plugin_service_ELoamMethodCode.ScannerCameraRotate:
84192
+ url = this.baseServiceUrl + '/video=rotate';
84187
84193
  param = {
84188
84194
  camidx: "0",
84189
- open: "1"
84195
+ rotate: data.toString()
84190
84196
  };
84191
84197
  requestType = 'post';
84192
84198
  break;
84199
+ case eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64:
84200
+ // 纠偏
84201
+ if (eloam_plugin_service_ELoamPassService._isLinux) {
84202
+ url = `${this.baseLinuxServiceUrl}/EnableDeskImage?enable=${data}`;
84203
+ requestType = 'get';
84204
+ } else {
84205
+ // 开启纠偏裁边
84206
+ url = this.baseServiceUrl + '/dvideo=cameradeskew';
84207
+ param = {
84208
+ camidx: "0",
84209
+ open: data
84210
+ };
84211
+ requestType = 'post';
84212
+ }
84213
+ break;
84193
84214
  case eloam_plugin_service_ELoamMethodCode.ScannerCameraMerge_Base64:
84194
84215
  // 合并
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';
84216
+ if (this._isLinux) {
84217
+ // 国产
84218
+ url = `${this.baseLinuxServiceUrl}/composeIDcardPic?image1=${data.list[0]}&image2=${data.list[1]}`;
84219
+ requestType = 'get';
84220
+ } else {
84221
+ url = this.baseServiceUrl + '/compose=photos';
84222
+ param = {
84223
+ outputfilepath: "",
84224
+ outputmaxwidth: "3000",
84225
+ inputimagetype: "1",
84226
+ outputimagetype: "0",
84227
+ isIDCardCompose: data.type,
84228
+ imagelist: data.list.toString()
84229
+ };
84230
+ requestType = 'post';
84231
+ }
84208
84232
  break;
84209
84233
  case eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64:
84210
84234
  // rotate: 旋转角度;deskew:纠偏,主摄像头1,副摄像头0 camidx:主摄像头0,副摄像头1;ColorMode:quality
84211
84235
  url = this.baseServiceUrl + '/video=grabimage';
84212
84236
  param = {
84213
- filepath: "",
84237
+ filepath: "base64",
84214
84238
  rotate: "0",
84215
- deskew: "0",
84216
- deskewval: "0",
84239
+ deskew: data,
84240
+ deskewval: "20",
84217
84241
  camidx: "0",
84218
84242
  ColorMode: "0",
84219
84243
  quality: "0",
@@ -84244,24 +84268,34 @@ class eloam_plugin_service_ELoamPassService {
84244
84268
  let res = await custom_axios_CustomAxios[requestType](url, param);
84245
84269
  return res;
84246
84270
  }
84271
+ static async initLinuxCamera() {
84272
+ await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxInit);
84273
+ }
84247
84274
  /** 主摄像头拍照 */
84248
- static async scanByMainCamera() {
84249
- const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64);
84250
- return res.photoBase64;
84275
+ static async scanByMainCamera(deskew) {
84276
+ const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64, deskew);
84277
+ if (this._isLinux) {
84278
+ return res.filepath; // 国产
84279
+ } else {
84280
+ return res.photoBase64;
84281
+ }
84251
84282
  }
84252
84283
  /** 副摄像头拍照 */
84253
84284
  static async scanBySecondaryCamera() {
84254
84285
  const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerSecondaryCamera_Base64);
84255
84286
  return res.photoBase64;
84256
84287
  }
84257
- static async mergeImage(list) {
84258
- const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraMerge_Base64, list);
84288
+ static async mergeImage(list, type) {
84289
+ const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraMerge_Base64, {
84290
+ list,
84291
+ type
84292
+ });
84259
84293
  return res.base64;
84260
84294
  }
84261
- static async scanByCamera(type) {
84295
+ static async scanByCamera(type, deskew) {
84262
84296
  switch (type) {
84263
84297
  case "main":
84264
- return this.scanByMainCamera();
84298
+ return this.scanByMainCamera(deskew);
84265
84299
  case 'vice':
84266
84300
  return this.scanBySecondaryCamera();
84267
84301
  }
@@ -84322,6 +84356,8 @@ class eloam_plugin_service_ELoamPassService {
84322
84356
  }
84323
84357
  }
84324
84358
  _defineProperty(eloam_plugin_service_ELoamPassService, "baseServiceUrl", 'http://127.0.0.1:38088');
84359
+ _defineProperty(eloam_plugin_service_ELoamPassService, "baseLinuxServiceUrl", 'http://127.0.0.1:6543');
84360
+ _defineProperty(eloam_plugin_service_ELoamPassService, "_isLinux", String(navigator.platform).indexOf("Linux") > -1);
84325
84361
  ;// CONCATENATED MODULE: ./packages/model/common-message.ts
84326
84362
 
84327
84363
  /**
@@ -85469,13 +85505,25 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85469
85505
  name: '照片',
85470
85506
  value: 1
85471
85507
  }],
85508
+ deskewStatus: '0',
85509
+ rotateDeg: 0,
85472
85510
  buttonList: [{
85473
85511
  label: '拍照',
85474
85512
  name: 'take-pictures'
85475
85513
  }, {
85476
- label: '合并拍照',
85514
+ label: '纠偏裁边',
85515
+ name: 'open-deskew'
85516
+ }, {
85517
+ label: '旋转',
85518
+ name: 'rotate-video'
85519
+ }, {
85520
+ label: '图片合并',
85477
85521
  name: 'take-pictures-merge'
85522
+ }, {
85523
+ label: '证件合并',
85524
+ name: 'take-idCard-pictures-merge'
85478
85525
  }],
85526
+ _isLinux: String(navigator.platform).indexOf("Linux") > -1,
85479
85527
  mergeImageList: []
85480
85528
  };
85481
85529
  },
@@ -85542,8 +85590,7 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85542
85590
  {
85543
85591
  // 良田
85544
85592
  let type = this.camera === 0 ? 'main' : 'vice';
85545
- const res = await eloam_plugin_service_ELoamPassService.scanByCamera(type);
85546
- console.log('良田=>', res);
85593
+ const res = await eloam_plugin_service_ELoamPassService.scanByCamera(type, this.deskewStatus);
85547
85594
  if (res) {
85548
85595
  this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res}`);
85549
85596
  } else {
@@ -85580,9 +85627,7 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85580
85627
  case 5:
85581
85628
  // 良田高拍仪
85582
85629
  this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
85583
- setTimeout(() => {
85584
- eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64); // 开启纠偏裁边
85585
- }, 2000);
85630
+ if (this._isLinux) await eloam_plugin_service_ELoamPassService.initLinuxCamera();
85586
85631
  break;
85587
85632
  case 6:
85588
85633
  // 国产客户端一体机
@@ -85617,13 +85662,14 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85617
85662
  break;
85618
85663
  }
85619
85664
  },
85620
- async takePictureMerge() {
85621
- const res = await eloam_plugin_service_ELoamPassService.scanByCamera('main');
85665
+ async takePictureMerge(type) {
85666
+ if (type === '1' && this.deskewStatus === '0') return this.$message.warning('请先开启纠偏');
85667
+ const res = await eloam_plugin_service_ELoamPassService.scanByCamera('main', this.deskewStatus);
85622
85668
  if (res) {
85623
85669
  this.mergeImageList.push(res);
85624
85670
  if (this.mergeImageList.length === 1) this.$message.success('第一张拍摄成功,请拍第二张');
85625
85671
  if (this.mergeImageList.length === 2) {
85626
- let result = await eloam_plugin_service_ELoamPassService.mergeImage(this.mergeImageList);
85672
+ let result = await eloam_plugin_service_ELoamPassService.mergeImage(this.mergeImageList, type);
85627
85673
  this.mergeImageList = [];
85628
85674
  this.$message.success('合并成功');
85629
85675
  this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${result}`);
@@ -85635,6 +85681,9 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85635
85681
  _isShowButton(name) {
85636
85682
  switch (name) {
85637
85683
  case 'take-pictures-merge':
85684
+ case 'take-idCard-pictures-merge':
85685
+ case 'open-deskew': // 纠偏裁边
85686
+ case 'rotate-video':
85638
85687
  return this.machineType === 5;
85639
85688
  // 良田显示合并拍照
85640
85689
  default:
@@ -85657,18 +85706,35 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85657
85706
  break;
85658
85707
  case 'take-pictures-merge':
85659
85708
  // 拍照合并
85660
- this.takePictureMerge();
85709
+ this.takePictureMerge('0');
85710
+ break;
85711
+ case 'take-idCard-pictures-merge':
85712
+ // 合并拍照身份证
85713
+ this.takePictureMerge('1');
85661
85714
  break;
85715
+ case 'rotate-video':
85716
+ if (this._isLinux) {
85717
+ this.rotateDeg += 90;
85718
+ if (this.rotateDeg === 360) this.rotateDeg = 0;
85719
+ } else {
85720
+ this.rotateDeg = 90;
85721
+ }
85722
+ eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraRotate, this.rotateDeg); // 选装
85723
+ break;
85724
+ case 'open-deskew':
85725
+ this.deskewStatus = this.deskewStatus === '1' ? '0' : '1';
85726
+ eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64, this.deskewStatus);
85727
+ // 开启纠偏裁边
85662
85728
  }
85663
85729
  }
85664
85730
  }
85665
85731
  });
85666
85732
  ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=script&lang=js&
85667
85733
  /* 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&
85734
+ ;// 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=0c4fd56a&prod&scoped=true&lang=scss&
85669
85735
  // extracted by mini-css-extract-plugin
85670
85736
 
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&
85737
+ ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=0c4fd56a&prod&scoped=true&lang=scss&
85672
85738
 
85673
85739
  ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue
85674
85740
 
@@ -85681,11 +85747,11 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85681
85747
 
85682
85748
  var scanner_camera_component_component = normalizeComponent(
85683
85749
  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,
85750
+ scanner_camera_componentvue_type_template_id_0c4fd56a_scoped_true_render,
85751
+ scanner_camera_componentvue_type_template_id_0c4fd56a_scoped_true_staticRenderFns,
85686
85752
  false,
85687
85753
  null,
85688
- "dc9fa1f2",
85754
+ "0c4fd56a",
85689
85755
  null
85690
85756
 
85691
85757
  )