unify-external-plugin-platform 0.0.3-1 → 0.0.3-3
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=
|
84033
|
-
var
|
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=755a80de&scoped=true&
|
84033
|
+
var scanner_camera_componentvue_type_template_id_755a80de_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
|
84097
|
+
var scanner_camera_componentvue_type_template_id_755a80de_scoped_true_staticRenderFns = [];
|
84098
84098
|
|
84099
84099
|
;// CONCATENATED MODULE: ./packages/utils/custom-axios.ts
|
84100
84100
|
/**
|
@@ -84161,10 +84161,13 @@ class custom_axios_CustomAxios {
|
|
84161
84161
|
|
84162
84162
|
var eloam_plugin_service_ELoamMethodCode;
|
84163
84163
|
(function (ELoamMethodCode) {
|
84164
|
+
ELoamMethodCode["ScannerCameraLinuxInit"] = "ScannerCameraLinuxInit";
|
84164
84165
|
/** 糾偏 */
|
84165
84166
|
ELoamMethodCode["ScannerCameraDeskew_Base64"] = "ScannerCameraDeskew_Base64";
|
84166
84167
|
/** 合并*/
|
84167
84168
|
ELoamMethodCode["ScannerCameraMerge_Base64"] = "ScannerCameraMerge_Base64";
|
84169
|
+
/** 旋转 */
|
84170
|
+
ELoamMethodCode["ScannerCameraRotate"] = "ScannerCameraRotate";
|
84168
84171
|
/** 扫描-主摄像头 */
|
84169
84172
|
ELoamMethodCode["ScannerMainCamera_Base64"] = "ScannerMainCamera_Base64";
|
84170
84173
|
/** 扫描-副摄像头 */
|
@@ -84191,39 +84194,60 @@ class eloam_plugin_service_ELoamPassService {
|
|
84191
84194
|
url = '',
|
84192
84195
|
requestType = '';
|
84193
84196
|
switch (method) {
|
84194
|
-
case eloam_plugin_service_ELoamMethodCode.
|
84195
|
-
|
84196
|
-
|
84197
|
+
case eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxInit:
|
84198
|
+
url = `${this.baseLinuxServiceUrl}/GetAllDisplayInfo`;
|
84199
|
+
requestType = 'get';
|
84200
|
+
break;
|
84201
|
+
case eloam_plugin_service_ELoamMethodCode.ScannerCameraRotate:
|
84202
|
+
url = this.baseServiceUrl + '/video=rotate';
|
84197
84203
|
param = {
|
84198
84204
|
camidx: "0",
|
84199
|
-
|
84205
|
+
rotate: data.toString()
|
84200
84206
|
};
|
84201
84207
|
requestType = 'post';
|
84202
84208
|
break;
|
84209
|
+
case eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64:
|
84210
|
+
// 纠偏
|
84211
|
+
if (eloam_plugin_service_ELoamPassService._isLinux) {
|
84212
|
+
url = `${this.baseLinuxServiceUrl}/EnableDeskImage?enable=${data}`;
|
84213
|
+
requestType = 'get';
|
84214
|
+
} else {
|
84215
|
+
// 开启纠偏裁边
|
84216
|
+
url = this.baseServiceUrl + '/dvideo=cameradeskew';
|
84217
|
+
param = {
|
84218
|
+
camidx: "0",
|
84219
|
+
open: data
|
84220
|
+
};
|
84221
|
+
requestType = 'post';
|
84222
|
+
}
|
84223
|
+
break;
|
84203
84224
|
case eloam_plugin_service_ELoamMethodCode.ScannerCameraMerge_Base64:
|
84204
84225
|
// 合并
|
84205
|
-
|
84206
|
-
|
84207
|
-
|
84208
|
-
|
84209
|
-
|
84210
|
-
|
84211
|
-
|
84212
|
-
|
84213
|
-
|
84214
|
-
|
84215
|
-
|
84216
|
-
|
84217
|
-
|
84226
|
+
if (this._isLinux) {
|
84227
|
+
// 国产
|
84228
|
+
url = `${this.baseLinuxServiceUrl}/composeIDcardPic?image1=${data.list[0]}&image2=${data.list[1]}`;
|
84229
|
+
requestType = 'get';
|
84230
|
+
} else {
|
84231
|
+
url = this.baseServiceUrl + '/compose=photos';
|
84232
|
+
param = {
|
84233
|
+
outputfilepath: "",
|
84234
|
+
outputmaxwidth: "3000",
|
84235
|
+
inputimagetype: "1",
|
84236
|
+
outputimagetype: "0",
|
84237
|
+
isIDCardCompose: data.type,
|
84238
|
+
imagelist: data.list.toString()
|
84239
|
+
};
|
84240
|
+
requestType = 'post';
|
84241
|
+
}
|
84218
84242
|
break;
|
84219
84243
|
case eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64:
|
84220
84244
|
// rotate: 旋转角度;deskew:纠偏,主摄像头1,副摄像头0 camidx:主摄像头0,副摄像头1;ColorMode:quality
|
84221
84245
|
url = this.baseServiceUrl + '/video=grabimage';
|
84222
84246
|
param = {
|
84223
|
-
filepath: "",
|
84247
|
+
filepath: "base64",
|
84224
84248
|
rotate: "0",
|
84225
|
-
deskew:
|
84226
|
-
deskewval: "
|
84249
|
+
deskew: data,
|
84250
|
+
deskewval: "20",
|
84227
84251
|
camidx: "0",
|
84228
84252
|
ColorMode: "0",
|
84229
84253
|
quality: "0",
|
@@ -84254,24 +84278,34 @@ class eloam_plugin_service_ELoamPassService {
|
|
84254
84278
|
let res = await custom_axios_CustomAxios[requestType](url, param);
|
84255
84279
|
return res;
|
84256
84280
|
}
|
84281
|
+
static async initLinuxCamera() {
|
84282
|
+
await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxInit);
|
84283
|
+
}
|
84257
84284
|
/** 主摄像头拍照 */
|
84258
|
-
static async scanByMainCamera() {
|
84259
|
-
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64);
|
84260
|
-
|
84285
|
+
static async scanByMainCamera(deskew) {
|
84286
|
+
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64, deskew);
|
84287
|
+
if (this._isLinux) {
|
84288
|
+
return res.filepath; // 国产
|
84289
|
+
} else {
|
84290
|
+
return res.photoBase64;
|
84291
|
+
}
|
84261
84292
|
}
|
84262
84293
|
/** 副摄像头拍照 */
|
84263
84294
|
static async scanBySecondaryCamera() {
|
84264
84295
|
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerSecondaryCamera_Base64);
|
84265
84296
|
return res.photoBase64;
|
84266
84297
|
}
|
84267
|
-
static async mergeImage(list) {
|
84268
|
-
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraMerge_Base64,
|
84298
|
+
static async mergeImage(list, type) {
|
84299
|
+
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraMerge_Base64, {
|
84300
|
+
list,
|
84301
|
+
type
|
84302
|
+
});
|
84269
84303
|
return res.base64;
|
84270
84304
|
}
|
84271
|
-
static async scanByCamera(type) {
|
84305
|
+
static async scanByCamera(type, deskew) {
|
84272
84306
|
switch (type) {
|
84273
84307
|
case "main":
|
84274
|
-
return this.scanByMainCamera();
|
84308
|
+
return this.scanByMainCamera(deskew);
|
84275
84309
|
case 'vice':
|
84276
84310
|
return this.scanBySecondaryCamera();
|
84277
84311
|
}
|
@@ -84332,6 +84366,8 @@ class eloam_plugin_service_ELoamPassService {
|
|
84332
84366
|
}
|
84333
84367
|
}
|
84334
84368
|
_defineProperty(eloam_plugin_service_ELoamPassService, "baseServiceUrl", 'http://127.0.0.1:38088');
|
84369
|
+
_defineProperty(eloam_plugin_service_ELoamPassService, "baseLinuxServiceUrl", 'http://127.0.0.1:6543');
|
84370
|
+
_defineProperty(eloam_plugin_service_ELoamPassService, "_isLinux", String(navigator.platform).indexOf("Linux") > -1);
|
84335
84371
|
;// CONCATENATED MODULE: ./packages/model/common-message.ts
|
84336
84372
|
|
84337
84373
|
/**
|
@@ -85479,13 +85515,25 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85479
85515
|
name: '照片',
|
85480
85516
|
value: 1
|
85481
85517
|
}],
|
85518
|
+
deskewStatus: '0',
|
85519
|
+
rotateDeg: 0,
|
85482
85520
|
buttonList: [{
|
85483
85521
|
label: '拍照',
|
85484
85522
|
name: 'take-pictures'
|
85485
85523
|
}, {
|
85486
|
-
label: '
|
85524
|
+
label: '图片合并',
|
85487
85525
|
name: 'take-pictures-merge'
|
85526
|
+
}, {
|
85527
|
+
label: '证件合并',
|
85528
|
+
name: 'take-idCard-pictures-merge'
|
85529
|
+
}, {
|
85530
|
+
label: '纠偏裁边',
|
85531
|
+
name: 'open-deskew'
|
85532
|
+
}, {
|
85533
|
+
label: '旋转',
|
85534
|
+
name: 'rotate-video'
|
85488
85535
|
}],
|
85536
|
+
_isLinux: String(navigator.platform).indexOf("Linux") > -1,
|
85489
85537
|
mergeImageList: []
|
85490
85538
|
};
|
85491
85539
|
},
|
@@ -85552,8 +85600,7 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85552
85600
|
{
|
85553
85601
|
// 良田
|
85554
85602
|
let type = this.camera === 0 ? 'main' : 'vice';
|
85555
|
-
const res = await eloam_plugin_service_ELoamPassService.scanByCamera(type);
|
85556
|
-
console.log('良田=>', res);
|
85603
|
+
const res = await eloam_plugin_service_ELoamPassService.scanByCamera(type, this.deskewStatus);
|
85557
85604
|
if (res) {
|
85558
85605
|
this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res}`);
|
85559
85606
|
} else {
|
@@ -85590,9 +85637,7 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85590
85637
|
case 5:
|
85591
85638
|
// 良田高拍仪
|
85592
85639
|
this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
|
85593
|
-
|
85594
|
-
eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64); // 开启纠偏裁边
|
85595
|
-
}, 2000);
|
85640
|
+
if (this._isLinux) await eloam_plugin_service_ELoamPassService.initLinuxCamera();
|
85596
85641
|
break;
|
85597
85642
|
case 6:
|
85598
85643
|
// 国产客户端一体机
|
@@ -85627,13 +85672,14 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85627
85672
|
break;
|
85628
85673
|
}
|
85629
85674
|
},
|
85630
|
-
async takePictureMerge() {
|
85631
|
-
|
85675
|
+
async takePictureMerge(type) {
|
85676
|
+
if (type === '1' && this.deskewStatus === '0') return this.$message.warning('请先开启纠偏');
|
85677
|
+
const res = await eloam_plugin_service_ELoamPassService.scanByCamera('main', this.deskewStatus);
|
85632
85678
|
if (res) {
|
85633
85679
|
this.mergeImageList.push(res);
|
85634
85680
|
if (this.mergeImageList.length === 1) this.$message.success('第一张拍摄成功,请拍第二张');
|
85635
85681
|
if (this.mergeImageList.length === 2) {
|
85636
|
-
let result = await eloam_plugin_service_ELoamPassService.mergeImage(this.mergeImageList);
|
85682
|
+
let result = await eloam_plugin_service_ELoamPassService.mergeImage(this.mergeImageList, type);
|
85637
85683
|
this.mergeImageList = [];
|
85638
85684
|
this.$message.success('合并成功');
|
85639
85685
|
this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${result}`);
|
@@ -85645,6 +85691,9 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85645
85691
|
_isShowButton(name) {
|
85646
85692
|
switch (name) {
|
85647
85693
|
case 'take-pictures-merge':
|
85694
|
+
case 'take-idCard-pictures-merge':
|
85695
|
+
case 'open-deskew': // 纠偏裁边
|
85696
|
+
case 'rotate-video':
|
85648
85697
|
return this.machineType === 5;
|
85649
85698
|
// 良田显示合并拍照
|
85650
85699
|
default:
|
@@ -85667,18 +85716,35 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85667
85716
|
break;
|
85668
85717
|
case 'take-pictures-merge':
|
85669
85718
|
// 拍照合并
|
85670
|
-
this.takePictureMerge();
|
85719
|
+
this.takePictureMerge('0');
|
85720
|
+
break;
|
85721
|
+
case 'take-idCard-pictures-merge':
|
85722
|
+
// 合并拍照身份证
|
85723
|
+
this.takePictureMerge('1');
|
85671
85724
|
break;
|
85725
|
+
case 'rotate-video':
|
85726
|
+
if (this._isLinux) {
|
85727
|
+
this.rotateDeg += 90;
|
85728
|
+
if (this.rotateDeg === 360) this.rotateDeg = 0;
|
85729
|
+
} else {
|
85730
|
+
this.rotateDeg = 90;
|
85731
|
+
}
|
85732
|
+
eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraRotate, this.rotateDeg); // 选装
|
85733
|
+
break;
|
85734
|
+
case 'open-deskew':
|
85735
|
+
this.deskewStatus = this.deskewStatus === '1' ? '0' : '1';
|
85736
|
+
eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64, this.deskewStatus);
|
85737
|
+
// 开启纠偏裁边
|
85672
85738
|
}
|
85673
85739
|
}
|
85674
85740
|
}
|
85675
85741
|
});
|
85676
85742
|
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=script&lang=js&
|
85677
85743
|
/* 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=
|
85744
|
+
;// 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=755a80de&prod&scoped=true&lang=scss&
|
85679
85745
|
// extracted by mini-css-extract-plugin
|
85680
85746
|
|
85681
|
-
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=
|
85747
|
+
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=755a80de&prod&scoped=true&lang=scss&
|
85682
85748
|
|
85683
85749
|
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue
|
85684
85750
|
|
@@ -85691,11 +85757,11 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85691
85757
|
|
85692
85758
|
var scanner_camera_component_component = normalizeComponent(
|
85693
85759
|
component_scanner_camera_componentvue_type_script_lang_js_,
|
85694
|
-
|
85695
|
-
|
85760
|
+
scanner_camera_componentvue_type_template_id_755a80de_scoped_true_render,
|
85761
|
+
scanner_camera_componentvue_type_template_id_755a80de_scoped_true_staticRenderFns,
|
85696
85762
|
false,
|
85697
85763
|
null,
|
85698
|
-
"
|
85764
|
+
"755a80de",
|
85699
85765
|
null
|
85700
85766
|
|
85701
85767
|
)
|