unify-external-plugin-platform 0.0.3-1 → 0.0.3-10
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=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
|
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,50 +84187,87 @@ const eloam_plugin_service_ELoamMethodDesc = {
|
|
84180
84187
|
class eloam_plugin_service_ELoamPassService {
|
84181
84188
|
/** 主摄像头地址 */
|
84182
84189
|
static get mainCameraUrl() {
|
84183
|
-
|
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
|
-
|
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.
|
84195
|
-
|
84196
|
-
|
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
|
-
|
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
|
-
|
84206
|
-
|
84207
|
-
|
84208
|
-
|
84209
|
-
|
84210
|
-
|
84211
|
-
|
84212
|
-
|
84213
|
-
|
84214
|
-
|
84215
|
-
|
84216
|
-
|
84217
|
-
|
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
84265
|
url = this.baseServiceUrl + '/video=grabimage';
|
84222
84266
|
param = {
|
84223
|
-
filepath: "",
|
84267
|
+
filepath: "base64",
|
84224
84268
|
rotate: "0",
|
84225
|
-
deskew:
|
84226
|
-
deskewval: "
|
84269
|
+
deskew: data,
|
84270
|
+
deskewval: "20",
|
84227
84271
|
camidx: "0",
|
84228
84272
|
ColorMode: "0",
|
84229
84273
|
quality: "0",
|
@@ -84254,24 +84298,40 @@ class eloam_plugin_service_ELoamPassService {
|
|
84254
84298
|
let res = await custom_axios_CustomAxios[requestType](url, param);
|
84255
84299
|
return res;
|
84256
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
|
+
}
|
84257
84310
|
/** 主摄像头拍照 */
|
84258
|
-
static async scanByMainCamera() {
|
84259
|
-
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64);
|
84260
|
-
|
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; // 国产
|
84315
|
+
} else {
|
84316
|
+
return res.photoBase64;
|
84317
|
+
}
|
84261
84318
|
}
|
84262
84319
|
/** 副摄像头拍照 */
|
84263
84320
|
static async scanBySecondaryCamera() {
|
84264
84321
|
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerSecondaryCamera_Base64);
|
84265
84322
|
return res.photoBase64;
|
84266
84323
|
}
|
84267
|
-
static async mergeImage(list) {
|
84268
|
-
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraMerge_Base64,
|
84269
|
-
|
84324
|
+
static async mergeImage(list, type) {
|
84325
|
+
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraMerge_Base64, {
|
84326
|
+
list,
|
84327
|
+
type
|
84328
|
+
});
|
84329
|
+
return res.base64 || res.data;
|
84270
84330
|
}
|
84271
|
-
static async scanByCamera(type) {
|
84331
|
+
static async scanByCamera(type, deskew) {
|
84272
84332
|
switch (type) {
|
84273
84333
|
case "main":
|
84274
|
-
return this.scanByMainCamera();
|
84334
|
+
return this.scanByMainCamera(deskew);
|
84275
84335
|
case 'vice':
|
84276
84336
|
return this.scanBySecondaryCamera();
|
84277
84337
|
}
|
@@ -84332,6 +84392,8 @@ class eloam_plugin_service_ELoamPassService {
|
|
84332
84392
|
}
|
84333
84393
|
}
|
84334
84394
|
_defineProperty(eloam_plugin_service_ELoamPassService, "baseServiceUrl", 'http://127.0.0.1:38088');
|
84395
|
+
_defineProperty(eloam_plugin_service_ELoamPassService, "baseLinuxServiceUrl", 'http://127.0.0.1:6543');
|
84396
|
+
_defineProperty(eloam_plugin_service_ELoamPassService, "_isLinux", String(navigator.platform).indexOf("Linux") > -1);
|
84335
84397
|
;// CONCATENATED MODULE: ./packages/model/common-message.ts
|
84336
84398
|
|
84337
84399
|
/**
|
@@ -85479,13 +85541,26 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85479
85541
|
name: '照片',
|
85480
85542
|
value: 1
|
85481
85543
|
}],
|
85544
|
+
deskewStatus: '0',
|
85545
|
+
rotateDeg: 0,
|
85482
85546
|
buttonList: [{
|
85483
85547
|
label: '拍照',
|
85484
85548
|
name: 'take-pictures'
|
85485
85549
|
}, {
|
85486
|
-
label: '
|
85550
|
+
label: '图片合并',
|
85487
85551
|
name: 'take-pictures-merge'
|
85552
|
+
}, {
|
85553
|
+
label: '证件合并',
|
85554
|
+
name: 'take-idCard-pictures-merge'
|
85555
|
+
}, {
|
85556
|
+
label: '纠偏裁边',
|
85557
|
+
name: 'open-deskew'
|
85558
|
+
}, {
|
85559
|
+
label: '旋转',
|
85560
|
+
name: 'rotate-video'
|
85488
85561
|
}],
|
85562
|
+
_isLinux: String(navigator.platform).indexOf("Linux") > -1,
|
85563
|
+
eloamLinuxFrameTimer: {},
|
85489
85564
|
mergeImageList: []
|
85490
85565
|
};
|
85491
85566
|
},
|
@@ -85552,10 +85627,10 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85552
85627
|
{
|
85553
85628
|
// 良田
|
85554
85629
|
let type = this.camera === 0 ? 'main' : 'vice';
|
85555
|
-
const res = await eloam_plugin_service_ELoamPassService.scanByCamera(type);
|
85556
|
-
console.log('良田=>', res);
|
85630
|
+
const res = await eloam_plugin_service_ELoamPassService.scanByCamera(type, this.deskewStatus);
|
85557
85631
|
if (res) {
|
85558
|
-
|
85632
|
+
let path = String(navigator.platform).indexOf("Linux") > -1 ? res.photoBase64 : res;
|
85633
|
+
this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${path}`);
|
85559
85634
|
} else {
|
85560
85635
|
this.$message.error('拍照出错,请检查设备是否连接成功');
|
85561
85636
|
}
|
@@ -85589,10 +85664,15 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85589
85664
|
break;
|
85590
85665
|
case 5:
|
85591
85666
|
// 良田高拍仪
|
85592
|
-
|
85593
|
-
|
85594
|
-
|
85595
|
-
|
85667
|
+
if (!(String(navigator.platform).indexOf("Linux") > -1)) {
|
85668
|
+
this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
|
85669
|
+
} else {
|
85670
|
+
await eloam_plugin_service_ELoamPassService.initLinuxCamera();
|
85671
|
+
let res = await eloam_plugin_service_ELoamPassService.startPreview('0');
|
85672
|
+
if (res.returnCode == "0" || res.returnCode == "2") {
|
85673
|
+
this.eloamLinuxFrameTimer = setInterval(this.getEloamFrame, 300);
|
85674
|
+
}
|
85675
|
+
}
|
85596
85676
|
break;
|
85597
85677
|
case 6:
|
85598
85678
|
// 国产客户端一体机
|
@@ -85600,6 +85680,15 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85600
85680
|
break;
|
85601
85681
|
}
|
85602
85682
|
},
|
85683
|
+
async getEloamFrame() {
|
85684
|
+
let res = await eloam_plugin_service_ELoamPassService.getEloamFrame();
|
85685
|
+
if (res.returnCode == "1") {
|
85686
|
+
clearInterval(this.eloamLinuxFrameTimer);
|
85687
|
+
return;
|
85688
|
+
}
|
85689
|
+
if (res.data.img == "") return;
|
85690
|
+
this.scannerVideoSrc = `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res.data.img}`;
|
85691
|
+
},
|
85603
85692
|
/**
|
85604
85693
|
* 副摄像头
|
85605
85694
|
*/
|
@@ -85619,7 +85708,13 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85619
85708
|
break;
|
85620
85709
|
case 5:
|
85621
85710
|
// 良田
|
85622
|
-
|
85711
|
+
if (!(String(navigator.platform).indexOf("Linux") > -1)) {
|
85712
|
+
this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
|
85713
|
+
} else {
|
85714
|
+
await eloam_plugin_service_ELoamPassService.initLinuxCamera();
|
85715
|
+
await eloam_plugin_service_ELoamPassService.startPreview('1');
|
85716
|
+
this.eloamLinuxFrameTimer = setInterval(this.getEloamFrame, 300);
|
85717
|
+
}
|
85623
85718
|
break;
|
85624
85719
|
case 6:
|
85625
85720
|
// 国产客户端一体机
|
@@ -85627,13 +85722,15 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85627
85722
|
break;
|
85628
85723
|
}
|
85629
85724
|
},
|
85630
|
-
async takePictureMerge() {
|
85631
|
-
|
85725
|
+
async takePictureMerge(type) {
|
85726
|
+
if (type === '1' && this.deskewStatus === '0') return this.$message.warning('请先开启纠偏');
|
85727
|
+
const res = await eloam_plugin_service_ELoamPassService.scanByCamera('main', this.deskewStatus);
|
85632
85728
|
if (res) {
|
85633
|
-
|
85729
|
+
let path = String(navigator.platform).indexOf("Linux") > -1 ? res.filepath : res;
|
85730
|
+
this.mergeImageList.push(path);
|
85634
85731
|
if (this.mergeImageList.length === 1) this.$message.success('第一张拍摄成功,请拍第二张');
|
85635
85732
|
if (this.mergeImageList.length === 2) {
|
85636
|
-
let result = await eloam_plugin_service_ELoamPassService.mergeImage(this.mergeImageList);
|
85733
|
+
let result = await eloam_plugin_service_ELoamPassService.mergeImage(this.mergeImageList, type);
|
85637
85734
|
this.mergeImageList = [];
|
85638
85735
|
this.$message.success('合并成功');
|
85639
85736
|
this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${result}`);
|
@@ -85645,6 +85742,9 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85645
85742
|
_isShowButton(name) {
|
85646
85743
|
switch (name) {
|
85647
85744
|
case 'take-pictures-merge':
|
85745
|
+
case 'take-idCard-pictures-merge':
|
85746
|
+
case 'open-deskew': // 纠偏裁边
|
85747
|
+
case 'rotate-video':
|
85648
85748
|
return this.machineType === 5;
|
85649
85749
|
// 良田显示合并拍照
|
85650
85750
|
default:
|
@@ -85667,18 +85767,35 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85667
85767
|
break;
|
85668
85768
|
case 'take-pictures-merge':
|
85669
85769
|
// 拍照合并
|
85670
|
-
this.takePictureMerge();
|
85770
|
+
this.takePictureMerge('0');
|
85771
|
+
break;
|
85772
|
+
case 'take-idCard-pictures-merge':
|
85773
|
+
// 合并拍照身份证
|
85774
|
+
this.takePictureMerge('1');
|
85775
|
+
break;
|
85776
|
+
case 'rotate-video':
|
85777
|
+
if (String(navigator.platform).indexOf("Linux") > -1) {
|
85778
|
+
this.rotateDeg += 90;
|
85779
|
+
if (this.rotateDeg === 360) this.rotateDeg = 0;
|
85780
|
+
} else {
|
85781
|
+
this.rotateDeg = 90;
|
85782
|
+
}
|
85783
|
+
eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraRotate, this.rotateDeg); // 选装
|
85671
85784
|
break;
|
85785
|
+
case 'open-deskew':
|
85786
|
+
this.deskewStatus = this.deskewStatus === '1' ? '0' : '1';
|
85787
|
+
eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64, this.deskewStatus);
|
85788
|
+
// 开启纠偏裁边
|
85672
85789
|
}
|
85673
85790
|
}
|
85674
85791
|
}
|
85675
85792
|
});
|
85676
85793
|
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=script&lang=js&
|
85677
85794
|
/* 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=
|
85795
|
+
;// 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
85796
|
// extracted by mini-css-extract-plugin
|
85680
85797
|
|
85681
|
-
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=
|
85798
|
+
;// 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
85799
|
|
85683
85800
|
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue
|
85684
85801
|
|
@@ -85691,11 +85808,11 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85691
85808
|
|
85692
85809
|
var scanner_camera_component_component = normalizeComponent(
|
85693
85810
|
component_scanner_camera_componentvue_type_script_lang_js_,
|
85694
|
-
|
85695
|
-
|
85811
|
+
scanner_camera_componentvue_type_template_id_4394461f_scoped_true_render,
|
85812
|
+
scanner_camera_componentvue_type_template_id_4394461f_scoped_true_staticRenderFns,
|
85696
85813
|
false,
|
85697
85814
|
null,
|
85698
|
-
"
|
85815
|
+
"4394461f",
|
85699
85816
|
null
|
85700
85817
|
|
85701
85818
|
)
|
@@ -87554,6 +87671,257 @@ var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpac
|
|
87554
87671
|
* @date: 2023-10-12
|
87555
87672
|
* @description:华视电子读卡器
|
87556
87673
|
*/
|
87674
|
+
const NationalityEnum = {
|
87675
|
+
AND: "安道尔",
|
87676
|
+
AFG: "阿富汗",
|
87677
|
+
ATG: "安提瓜和巴布达",
|
87678
|
+
AIA: "安圭拉",
|
87679
|
+
ALB: "阿尔巴尼亚",
|
87680
|
+
ARM: "亚美尼亚",
|
87681
|
+
AGO: "安哥拉",
|
87682
|
+
ATA: "南极洲",
|
87683
|
+
ARG: "阿根廷",
|
87684
|
+
ASM: "美属萨摩亚",
|
87685
|
+
AUT: "奥地利",
|
87686
|
+
AUS: "澳大利亚",
|
87687
|
+
ABW: "阿鲁巴",
|
87688
|
+
ALA: "奥兰群岛",
|
87689
|
+
AZE: "阿塞拜疆",
|
87690
|
+
BIH: "波黑",
|
87691
|
+
BRB: "巴巴多斯",
|
87692
|
+
BGD: "孟加拉",
|
87693
|
+
BEL: "比利时",
|
87694
|
+
BFA: "布基纳法索",
|
87695
|
+
BGR: "保加利亚",
|
87696
|
+
BHR: "巴林",
|
87697
|
+
BDI: "布隆迪",
|
87698
|
+
BEN: "贝宁",
|
87699
|
+
BLM: "圣巴泰勒米岛",
|
87700
|
+
BMU: "百慕大",
|
87701
|
+
BRN: "文莱",
|
87702
|
+
BOL: "玻利维亚",
|
87703
|
+
BES: "荷兰加勒比区",
|
87704
|
+
BRA: "巴西",
|
87705
|
+
BHS: "巴哈马",
|
87706
|
+
BTN: "不丹",
|
87707
|
+
BVT: "布韦岛",
|
87708
|
+
BWA: "博茨瓦纳",
|
87709
|
+
BLR: "白俄罗斯",
|
87710
|
+
BLZ: "伯利兹",
|
87711
|
+
CAN: "加拿大",
|
87712
|
+
CCK: "科科斯群岛",
|
87713
|
+
CAF: "中非",
|
87714
|
+
CHE: "瑞士",
|
87715
|
+
CHL: "智利",
|
87716
|
+
CMR: "喀麦隆",
|
87717
|
+
COL: "哥伦比亚",
|
87718
|
+
CRI: "哥斯达黎加",
|
87719
|
+
CUB: "古巴",
|
87720
|
+
CPV: "佛得角",
|
87721
|
+
CXR: "圣诞岛",
|
87722
|
+
CYP: "塞浦路斯",
|
87723
|
+
CZE: "捷克",
|
87724
|
+
DEU: "德国",
|
87725
|
+
DJI: "吉布提",
|
87726
|
+
DNK: "丹麦",
|
87727
|
+
DMA: "多米尼克",
|
87728
|
+
DOM: "多米尼加",
|
87729
|
+
DZA: "阿尔及利亚",
|
87730
|
+
ECU: "厄瓜多尔",
|
87731
|
+
EST: "爱沙尼亚",
|
87732
|
+
EGY: "埃及",
|
87733
|
+
ESH: "西撒哈拉",
|
87734
|
+
ERI: "厄立特里亚",
|
87735
|
+
ESP: "西班牙",
|
87736
|
+
FIN: "芬兰",
|
87737
|
+
FJI: "斐济群岛",
|
87738
|
+
FLK: "马尔维纳斯群岛(福克兰)",
|
87739
|
+
FSM: "密克罗尼西亚联邦",
|
87740
|
+
FRO: "法罗群岛",
|
87741
|
+
FRA: "法国",
|
87742
|
+
GAB: "加蓬",
|
87743
|
+
GRD: "格林纳达",
|
87744
|
+
GEO: "格鲁吉亚",
|
87745
|
+
GUF: "法属圭亚那",
|
87746
|
+
GHA: "加纳",
|
87747
|
+
GIB: "直布罗陀",
|
87748
|
+
GRL: "格陵兰",
|
87749
|
+
GIN: "几内亚",
|
87750
|
+
GLP: "瓜德罗普",
|
87751
|
+
GNQ: "赤道几内亚",
|
87752
|
+
GRC: "希腊",
|
87753
|
+
SGS: "南乔治亚岛和南桑威奇群岛",
|
87754
|
+
GTM: "危地马拉",
|
87755
|
+
GUM: "关岛",
|
87756
|
+
GNB: "几内亚比绍",
|
87757
|
+
GUY: "圭亚那",
|
87758
|
+
HKG: "香港",
|
87759
|
+
HMD: "赫德岛和麦克唐纳群岛",
|
87760
|
+
HND: "洪都拉斯",
|
87761
|
+
HRV: "克罗地亚",
|
87762
|
+
HTI: "海地",
|
87763
|
+
HUN: "匈牙利",
|
87764
|
+
IDN: "印尼",
|
87765
|
+
IRL: "爱尔兰",
|
87766
|
+
ISR: "以色列",
|
87767
|
+
IMN: "马恩岛",
|
87768
|
+
IND: "印度",
|
87769
|
+
IOT: "英属印度洋领地",
|
87770
|
+
IRQ: "伊拉克",
|
87771
|
+
IRN: "伊朗",
|
87772
|
+
ISL: "冰岛",
|
87773
|
+
ITA: "意大利",
|
87774
|
+
JEY: "泽西岛",
|
87775
|
+
JAM: "牙买加",
|
87776
|
+
JOR: "约旦",
|
87777
|
+
JPN: "日本",
|
87778
|
+
KHM: "柬埔寨",
|
87779
|
+
KIR: "基里巴斯",
|
87780
|
+
COM: "科摩罗",
|
87781
|
+
KWT: "科威特",
|
87782
|
+
CYM: "开曼群岛",
|
87783
|
+
LBN: "黎巴嫩",
|
87784
|
+
LIE: "列支敦士登",
|
87785
|
+
LKA: "斯里兰卡",
|
87786
|
+
LBR: "利比里亚",
|
87787
|
+
LSO: "莱索托",
|
87788
|
+
LTU: "立陶宛",
|
87789
|
+
LUX: "卢森堡",
|
87790
|
+
LVA: "拉脱维亚",
|
87791
|
+
LBY: "利比亚",
|
87792
|
+
MAR: "摩洛哥",
|
87793
|
+
MCO: "摩纳哥",
|
87794
|
+
MDA: "摩尔多瓦",
|
87795
|
+
MNE: "黑山",
|
87796
|
+
MAF: "法属圣马丁",
|
87797
|
+
MDG: "马达加斯加",
|
87798
|
+
MHL: "马绍尔群岛",
|
87799
|
+
MKD: "马其顿",
|
87800
|
+
MLI: "马里",
|
87801
|
+
MMR: "缅甸",
|
87802
|
+
MAC: "澳门",
|
87803
|
+
MTQ: "马提尼克",
|
87804
|
+
MRT: "毛里塔尼亚",
|
87805
|
+
MSR: "蒙塞拉特岛",
|
87806
|
+
MLT: "马耳他",
|
87807
|
+
MDV: "马尔代夫",
|
87808
|
+
MWI: "马拉维",
|
87809
|
+
MEX: "墨西哥",
|
87810
|
+
MYS: "马来西亚",
|
87811
|
+
NAM: "纳米比亚",
|
87812
|
+
NER: "尼日尔",
|
87813
|
+
NFK: "诺福克岛",
|
87814
|
+
NGA: "尼日利亚",
|
87815
|
+
NIC: "尼加拉瓜",
|
87816
|
+
NLD: "荷兰",
|
87817
|
+
NOR: "挪威",
|
87818
|
+
NPL: "尼泊尔",
|
87819
|
+
NRU: "瑙鲁",
|
87820
|
+
OMN: "阿曼",
|
87821
|
+
PAN: "巴拿马",
|
87822
|
+
PER: "秘鲁",
|
87823
|
+
PYF: "法属波利尼西亚",
|
87824
|
+
PNG: "巴布亚新几内亚",
|
87825
|
+
PHL: "菲律宾",
|
87826
|
+
PAK: "巴基斯坦",
|
87827
|
+
POL: "波兰",
|
87828
|
+
PCN: "皮特凯恩群岛",
|
87829
|
+
PRI: "波多黎各",
|
87830
|
+
PSE: "巴勒斯坦",
|
87831
|
+
PLW: "帕劳",
|
87832
|
+
PRY: "巴拉圭",
|
87833
|
+
QAT: "卡塔尔",
|
87834
|
+
REU: "留尼汪",
|
87835
|
+
ROU: "罗马尼亚",
|
87836
|
+
SRB: "塞尔维亚",
|
87837
|
+
RUS: "俄罗斯",
|
87838
|
+
RWA: "卢旺达",
|
87839
|
+
SLB: "所罗门群岛",
|
87840
|
+
SYC: "塞舌尔",
|
87841
|
+
SDN: "苏丹",
|
87842
|
+
SWE: "瑞典",
|
87843
|
+
SGP: "新加坡",
|
87844
|
+
SVN: "斯洛文尼亚",
|
87845
|
+
SJM: "斯瓦尔巴群岛和 扬马延岛",
|
87846
|
+
SVK: "斯洛伐克",
|
87847
|
+
SLE: "塞拉利昂",
|
87848
|
+
SMR: "圣马力诺",
|
87849
|
+
SEN: "塞内加尔",
|
87850
|
+
SOM: "索马里",
|
87851
|
+
SUR: "苏里南",
|
87852
|
+
SSD: "南苏丹",
|
87853
|
+
STP: "圣多美和普林西比",
|
87854
|
+
SLV: "萨尔瓦多",
|
87855
|
+
SYR: "叙利亚",
|
87856
|
+
SWZ: "斯威士兰",
|
87857
|
+
TCA: "特克斯和凯科斯群岛",
|
87858
|
+
TCD: "乍得",
|
87859
|
+
TGO: "多哥",
|
87860
|
+
THA: "泰国",
|
87861
|
+
TKL: "托克劳",
|
87862
|
+
TLS: "东帝汶",
|
87863
|
+
TUN: "突尼斯",
|
87864
|
+
TON: "汤加",
|
87865
|
+
TUR: "土耳其",
|
87866
|
+
TUV: "图瓦卢",
|
87867
|
+
TZA: "坦桑尼亚",
|
87868
|
+
UKR: "乌克兰",
|
87869
|
+
UGA: "乌干达",
|
87870
|
+
USA: "美国",
|
87871
|
+
URY: "乌拉圭",
|
87872
|
+
VAT: "梵蒂冈",
|
87873
|
+
VEN: "委内瑞拉",
|
87874
|
+
VGB: "英属维尔京群岛",
|
87875
|
+
VIR: "美属维尔京群岛",
|
87876
|
+
VNM: "越南",
|
87877
|
+
WLF: "瓦利斯和富图纳",
|
87878
|
+
WSM: "萨摩亚",
|
87879
|
+
YEM: "也门",
|
87880
|
+
MYT: "马约特",
|
87881
|
+
ZAF: "南非",
|
87882
|
+
ZMB: "赞比亚",
|
87883
|
+
ZWE: "津巴布韦",
|
87884
|
+
CHN: "中国",
|
87885
|
+
COG: "刚果(布)",
|
87886
|
+
COD: "刚果(金)",
|
87887
|
+
MOZ: "莫桑比克",
|
87888
|
+
GGY: "根西岛",
|
87889
|
+
GMB: "冈比亚",
|
87890
|
+
MNP: "北马里亚纳群岛",
|
87891
|
+
ETH: "埃塞俄比亚",
|
87892
|
+
NCL: "新喀里多尼亚",
|
87893
|
+
VUT: "瓦努阿图",
|
87894
|
+
ATF: "法属南部领地",
|
87895
|
+
NIU: "纽埃",
|
87896
|
+
UMI: "美国本土外小岛屿",
|
87897
|
+
COK: "库克群岛",
|
87898
|
+
GBR: "英国",
|
87899
|
+
TTO: "特立尼达和多巴哥",
|
87900
|
+
VCT: "圣文森特和格林纳丁斯",
|
87901
|
+
TWN: "台湾",
|
87902
|
+
NZL: "新西兰",
|
87903
|
+
SAU: "沙特阿拉伯",
|
87904
|
+
LAO: "老挝",
|
87905
|
+
PRK: "朝鲜",
|
87906
|
+
KOR: "韩国",
|
87907
|
+
PRT: "葡萄牙",
|
87908
|
+
KGZ: "吉尔吉斯斯坦",
|
87909
|
+
KAZ: "哈萨克斯坦",
|
87910
|
+
TJK: "塔吉克斯坦",
|
87911
|
+
TKM: "土库曼斯坦",
|
87912
|
+
UZB: "乌兹别克斯坦",
|
87913
|
+
KNA: "圣基茨和尼维斯",
|
87914
|
+
SPM: "圣皮埃尔和密克隆",
|
87915
|
+
SHN: "圣赫勒拿",
|
87916
|
+
LCA: "圣卢西亚",
|
87917
|
+
MUS: "毛里求斯",
|
87918
|
+
CIV: "科特迪瓦",
|
87919
|
+
KEN: "肯尼亚",
|
87920
|
+
MNG: "蒙古国"
|
87921
|
+
};
|
87922
|
+
function convertNationality(nationality) {
|
87923
|
+
return NationalityEnum[nationality];
|
87924
|
+
}
|
87557
87925
|
class HuaShiService {
|
87558
87926
|
static startConnect() {
|
87559
87927
|
if (this.ws && this.ws.readyState === WebSocket.CONNECTING) {
|
@@ -87629,23 +87997,55 @@ class HuaShiService {
|
|
87629
87997
|
const readData = await HuaShiService.read();
|
87630
87998
|
if (readData) {
|
87631
87999
|
// 身份证|姓名|性别|民族|生日|地址|证件号|派出所|有效期起|有效期止||证件照 中间好多占位
|
87632
|
-
|
87633
|
-
|
87634
|
-
|
87635
|
-
|
87636
|
-
|
87637
|
-
|
87638
|
-
|
87639
|
-
|
87640
|
-
|
87641
|
-
|
87642
|
-
|
87643
|
-
|
87644
|
-
|
87645
|
-
|
87646
|
-
|
87647
|
-
|
87648
|
-
|
88000
|
+
// 永居证|姓名|性别|永居证证件号|国籍代码|中文姓名|有效期起|有效期止|生日|证件版本号|受理机关代码|证件类别|照片内容 中间好多占位
|
88001
|
+
// 永居证|姓名|性别|永居证证件号|国籍代码|中文姓名|有效期起|有效期止|生日|换证次数|旧证件号|证件类别|照片内容 中间好多占位
|
88002
|
+
// 港澳台|姓名|性别|生日|住址|证件号|派出所|有效期起|有效期止|通行证号码|签发次数|证件类别|照片内容 中间好多占位
|
88003
|
+
let [model, placeholder, type, name, sex, nation, birthday, address, cardId, police, validStart, validEnd] = readData.split('|');
|
88004
|
+
let base64_ID = readData.split('|')[19];
|
88005
|
+
let NationCode = readData.split('|')[18];
|
88006
|
+
if (NationCode === '1') {
|
88007
|
+
// 身份证
|
88008
|
+
const IDCardData = {
|
88009
|
+
info: {
|
88010
|
+
cardType: '1',
|
88011
|
+
name,
|
88012
|
+
chineseName: '',
|
88013
|
+
englishName: '',
|
88014
|
+
sex,
|
88015
|
+
birthday,
|
88016
|
+
address,
|
88017
|
+
cardId,
|
88018
|
+
nationality: '中国',
|
88019
|
+
nation,
|
88020
|
+
police,
|
88021
|
+
validStart,
|
88022
|
+
validEnd
|
88023
|
+
},
|
88024
|
+
headImage: base64_ID
|
88025
|
+
};
|
88026
|
+
return IDCardData;
|
88027
|
+
} else {
|
88028
|
+
let chineseName = readData.split('|')[16] || '无中文姓名';
|
88029
|
+
const IDCardData = {
|
88030
|
+
info: {
|
88031
|
+
cardType: '9',
|
88032
|
+
name: chineseName === '无中文姓名' ? name : chineseName || name,
|
88033
|
+
chineseName,
|
88034
|
+
englishName: name,
|
88035
|
+
sex,
|
88036
|
+
birthday,
|
88037
|
+
address,
|
88038
|
+
cardId,
|
88039
|
+
nationality: convertNationality(NationCode),
|
88040
|
+
nation: '',
|
88041
|
+
police: '中华人民共和国国家移民管理局',
|
88042
|
+
validStart,
|
88043
|
+
validEnd
|
88044
|
+
},
|
88045
|
+
headImage: base64_ID
|
88046
|
+
};
|
88047
|
+
return IDCardData;
|
88048
|
+
}
|
87649
88049
|
} else {
|
87650
88050
|
throw Error('未匹配可用的读卡器');
|
87651
88051
|
}
|
@@ -87933,7 +88333,7 @@ var ExitAndEntryMethodCode;
|
|
87933
88333
|
/** 获取识别结果 */
|
87934
88334
|
ExitAndEntryMethodCode["GetReadResult"] = "GetReadResult";
|
87935
88335
|
})(ExitAndEntryMethodCode || (ExitAndEntryMethodCode = {}));
|
87936
|
-
const
|
88336
|
+
const exit_and_entry_plugin_service_NationalityEnum = {
|
87937
88337
|
AND: "安道尔",
|
87938
88338
|
AFG: "阿富汗",
|
87939
88339
|
ATG: "安提瓜和巴布达",
|
@@ -88017,7 +88417,7 @@ const NationalityEnum = {
|
|
88017
88417
|
GUM: "关岛",
|
88018
88418
|
GNB: "几内亚比绍",
|
88019
88419
|
GUY: "圭亚那",
|
88020
|
-
HKG: "
|
88420
|
+
HKG: "香港",
|
88021
88421
|
HMD: "赫德岛和麦克唐纳群岛",
|
88022
88422
|
HND: "洪都拉斯",
|
88023
88423
|
HRV: "克罗地亚",
|
@@ -88061,7 +88461,7 @@ const NationalityEnum = {
|
|
88061
88461
|
MKD: "马其顿",
|
88062
88462
|
MLI: "马里",
|
88063
88463
|
MMR: "缅甸",
|
88064
|
-
MAC: "
|
88464
|
+
MAC: "澳门",
|
88065
88465
|
MTQ: "马提尼克",
|
88066
88466
|
MRT: "毛里塔尼亚",
|
88067
88467
|
MSR: "蒙塞拉特岛",
|
@@ -88160,7 +88560,7 @@ const NationalityEnum = {
|
|
88160
88560
|
GBR: "英国",
|
88161
88561
|
TTO: "特立尼达和多巴哥",
|
88162
88562
|
VCT: "圣文森特和格林纳丁斯",
|
88163
|
-
TWN: "
|
88563
|
+
TWN: "台湾",
|
88164
88564
|
NZL: "新西兰",
|
88165
88565
|
SAU: "沙特阿拉伯",
|
88166
88566
|
LAO: "老挝",
|
@@ -88186,8 +88586,8 @@ var SexEnum;
|
|
88186
88586
|
SexEnum["MALE"] = "\u7537";
|
88187
88587
|
SexEnum["FEMALE"] = "\u5973";
|
88188
88588
|
})(SexEnum || (SexEnum = {}));
|
88189
|
-
function
|
88190
|
-
return
|
88589
|
+
function exit_and_entry_plugin_service_convertNationality(nationality) {
|
88590
|
+
return exit_and_entry_plugin_service_NationalityEnum[nationality];
|
88191
88591
|
}
|
88192
88592
|
function urlToBase64(url) {
|
88193
88593
|
return new Promise((resolve, reject) => {
|
@@ -88250,7 +88650,7 @@ async function formatNFCResult(data) {
|
|
88250
88650
|
sex: SexEnum[sex] || '未知',
|
88251
88651
|
cardId: doc_number,
|
88252
88652
|
birthday: birth_DateFormat.replace('-', '').replace('-', ''),
|
88253
|
-
nationality:
|
88653
|
+
nationality: exit_and_entry_plugin_service_convertNationality(state),
|
88254
88654
|
validEnd: expired_DateFormat.replace('-', '').replace('-', ''),
|
88255
88655
|
headImage: img.replace('data:image/png;base64,', '')
|
88256
88656
|
};
|
@@ -88334,7 +88734,7 @@ async function formatPermanentResidencePermit(data) {
|
|
88334
88734
|
sex: xbdm.replace('性', ''),
|
88335
88735
|
cardId: zjhm || yjjlzhm,
|
88336
88736
|
birthday: csrq,
|
88337
|
-
nationality:
|
88737
|
+
nationality: exit_and_entry_plugin_service_convertNationality(gjdm),
|
88338
88738
|
validStart: yxqqsrq || zjqfrq,
|
88339
88739
|
validEnd: yxqjzrq || zjzzrq,
|
88340
88740
|
police: '中华人民共和国国家移民管理局',
|