unify-external-plugin-platform 0.0.2-67 → 0.0.2-69
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.
- package/dist/external-plugin.common.js +1147 -605
- package/dist/external-plugin.common.js.map +1 -1
- package/dist/external-plugin.css +1 -1
- package/dist/external-plugin.umd.js +1147 -605
- package/dist/external-plugin.umd.js.map +1 -1
- package/dist/external-plugin.umd.min.js +3 -3
- package/dist/external-plugin.umd.min.js.map +1 -1
- package/package.json +1 -1
@@ -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=bc9cce92&scoped=true&
|
84033
|
+
var scanner_camera_componentvue_type_template_id_bc9cce92_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_65e6d7b8_scoped_true_render = f
|
|
84094
84094
|
}, [_vm._v(_vm._s(item.label))]), _vm._t("action")];
|
84095
84095
|
})], 2)])]);
|
84096
84096
|
};
|
84097
|
-
var
|
84097
|
+
var scanner_camera_componentvue_type_template_id_bc9cce92_scoped_true_staticRenderFns = [];
|
84098
84098
|
|
84099
84099
|
;// CONCATENATED MODULE: ./packages/utils/custom-axios.ts
|
84100
84100
|
/**
|
@@ -84380,10 +84380,6 @@ var JieYuMethodCode;
|
|
84380
84380
|
JieYuMethodCode["ScannerMainCamera_Base64"] = "main";
|
84381
84381
|
/** 扫描-副摄像头 */
|
84382
84382
|
JieYuMethodCode["ScannerSecondaryCamera_Base64"] = "vice";
|
84383
|
-
/** 自动寻边 */
|
84384
|
-
JieYuMethodCode["AutoFindEdge"] = "findEdge";
|
84385
|
-
/** 去黑边 */
|
84386
|
-
JieYuMethodCode["SetDelBlackTrimming"] = "setDelBlackTrimming";
|
84387
84383
|
/** 拍照 */
|
84388
84384
|
JieYuMethodCode["TakePhoto_Base64"] = "takePhoto";
|
84389
84385
|
/** 高拍仪读卡 */
|
@@ -84503,20 +84499,18 @@ class JieYueService {
|
|
84503
84499
|
switch (methodCode) {
|
84504
84500
|
case JieYuMethodCode.ScannerMainCamera_Base64:
|
84505
84501
|
// 主摄像头
|
84502
|
+
this.ws.send("vSetResolution(7)");
|
84503
|
+
this.ws.send("bStopPlay()");
|
84506
84504
|
this.ws.send('bStartPlay()');
|
84507
|
-
|
84505
|
+
this.ws.send('bSetMode(3)');
|
84506
|
+
method = 'vSetOpenInpain(1)';
|
84508
84507
|
break;
|
84509
84508
|
case JieYuMethodCode.ScannerSecondaryCamera_Base64:
|
84510
84509
|
// 副摄像头
|
84511
84510
|
method = 'bStartPlay2';
|
84512
84511
|
break;
|
84513
|
-
case JieYuMethodCode.AutoFindEdge:
|
84514
|
-
// 自动寻边
|
84515
|
-
method = 'bSetMode(3)';
|
84516
|
-
break;
|
84517
84512
|
case JieYuMethodCode.TakePhoto_Base64:
|
84518
84513
|
// 拍照
|
84519
|
-
this.ws.send('vSetDelHBFlag(true)');
|
84520
84514
|
method = 'bSaveJPGEx';
|
84521
84515
|
break;
|
84522
84516
|
case JieYuMethodCode.ScannerReadCard:
|
@@ -84605,10 +84599,7 @@ class JieYueService {
|
|
84605
84599
|
// 开启主摄像头/副摄像头
|
84606
84600
|
static async turnOnTheCamera(type) {
|
84607
84601
|
if (this.ws) this.ws.close();
|
84608
|
-
JieYueService.read(HardwareName.ScannerCamera, type);
|
84609
|
-
setTimeout(() => {
|
84610
|
-
JieYueService.read(HardwareName.ScannerCamera, JieYuMethodCode.AutoFindEdge);
|
84611
|
-
}, 1000);
|
84602
|
+
await JieYueService.read(HardwareName.ScannerCamera, type);
|
84612
84603
|
}
|
84613
84604
|
// 拍照
|
84614
84605
|
static async scanByCamera() {
|
@@ -85013,132 +85004,895 @@ class UdsPluginSocketService {
|
|
85013
85004
|
_defineProperty(UdsPluginSocketService, "scannerCameraUrl", 'ws://127.0.0.1:8341');
|
85014
85005
|
_defineProperty(UdsPluginSocketService, "ws", void 0);
|
85015
85006
|
_defineProperty(UdsPluginSocketService, "requestStore", []);
|
85016
|
-
;// CONCATENATED MODULE: ./
|
85017
|
-
|
85018
|
-
|
85007
|
+
;// CONCATENATED MODULE: ./packages/service/external-plugins/ewp-plugin-socket.service.ts
|
85019
85008
|
|
85020
85009
|
|
85010
|
+
/**
|
85011
|
+
* 沃斯德人证交互终端
|
85012
|
+
* E窗通WEBSOCKET服务
|
85013
|
+
*
|
85014
|
+
* */
|
85021
85015
|
|
85022
|
-
|
85023
|
-
|
85024
|
-
|
85025
|
-
|
85026
|
-
|
85027
|
-
|
85028
|
-
|
85029
|
-
|
85030
|
-
|
85031
|
-
|
85032
|
-
|
85016
|
+
var EWindowPassMethodCode;
|
85017
|
+
(function (EWindowPassMethodCode) {
|
85018
|
+
/** 读取社保卡 */
|
85019
|
+
EWindowPassMethodCode["iReadCardBas"] = "iReadCardBas";
|
85020
|
+
/** 获取签名*/
|
85021
|
+
EWindowPassMethodCode["GetSignName_Base64"] = "GetSignName_Base64";
|
85022
|
+
/** 读取二代身份证 */
|
85023
|
+
EWindowPassMethodCode["ReadIDCard_Base64"] = "ReadIDCard_Base64";
|
85024
|
+
/** 人证比对 */
|
85025
|
+
EWindowPassMethodCode["FaceValidateWithIdCard_Base64"] = "FaceValidateWithIdCard_Base64";
|
85026
|
+
/** 获取指纹 */
|
85027
|
+
EWindowPassMethodCode["FingerPrint_Base64"] = "FingerPrint_Base64";
|
85028
|
+
})(EWindowPassMethodCode || (EWindowPassMethodCode = {}));
|
85029
|
+
const EWindowPassMethodDesc = {
|
85030
|
+
[EWindowPassMethodCode.iReadCardBas]: '读取社保卡',
|
85031
|
+
[EWindowPassMethodCode.GetSignName_Base64]: '获取签名',
|
85032
|
+
[EWindowPassMethodCode.ReadIDCard_Base64]: '读取二代身份证',
|
85033
|
+
[EWindowPassMethodCode.FaceValidateWithIdCard_Base64]: '人证比对',
|
85034
|
+
[EWindowPassMethodCode.FingerPrint_Base64]: '获取指纹'
|
85035
|
+
};
|
85036
|
+
class EWindowPassService {
|
85037
|
+
static startConnect(method) {
|
85038
|
+
if (this.ws && this.ws.readyState === WebSocket.CONNECTING) {
|
85039
|
+
return this;
|
85033
85040
|
}
|
85034
|
-
|
85035
|
-
|
85036
|
-
|
85037
|
-
|
85038
|
-
|
85039
|
-
|
85040
|
-
|
85041
|
-
|
85042
|
-
name: '文档',
|
85043
|
-
value: 0
|
85044
|
-
}, {
|
85045
|
-
name: '照片',
|
85046
|
-
value: 1
|
85047
|
-
}],
|
85048
|
-
buttonList: [{
|
85049
|
-
label: '拍照',
|
85050
|
-
name: 'take-pictures'
|
85051
|
-
}]
|
85052
|
-
};
|
85053
|
-
},
|
85054
|
-
watch: {
|
85055
|
-
'machineType': function () {
|
85056
|
-
let handleName = this.camera === 1 ? 'start-vice' : 'start-main';
|
85057
|
-
this.handleAction(handleName);
|
85041
|
+
let webSocketUrl = '';
|
85042
|
+
switch (method) {
|
85043
|
+
case EWindowPassMethodCode.FingerPrint_Base64:
|
85044
|
+
webSocketUrl = this.fingerPrintBasWebSocketUrl;
|
85045
|
+
break;
|
85046
|
+
default:
|
85047
|
+
webSocketUrl = this.iReadCardBasWebSocketUrl;
|
85048
|
+
break;
|
85058
85049
|
}
|
85059
|
-
|
85060
|
-
|
85061
|
-
|
85062
|
-
|
85063
|
-
|
85064
|
-
|
85050
|
+
const ws = new WebSocket(webSocketUrl);
|
85051
|
+
let resolved;
|
85052
|
+
const onConnect = new Promise(resolve => {
|
85053
|
+
resolved = resolve;
|
85054
|
+
});
|
85055
|
+
ws.onopen = () => {
|
85056
|
+
resolved(true);
|
85057
|
+
};
|
85058
|
+
ws.onmessage = event => {
|
85059
|
+
if (method === EWindowPassMethodCode.FingerPrint_Base64) {
|
85060
|
+
// 指纹后端返回的是string
|
85061
|
+
event = {
|
85062
|
+
...event,
|
85063
|
+
data: JSON.stringify({
|
85064
|
+
fingerPrintInfo: event.data
|
85065
|
+
})
|
85066
|
+
};
|
85065
85067
|
}
|
85068
|
+
this.handleMessage(event);
|
85069
|
+
};
|
85070
|
+
ws.onclose = () => this.handleClose();
|
85071
|
+
ws.onerror = () => this.handleError();
|
85072
|
+
this.ws = ws;
|
85073
|
+
return onConnect;
|
85074
|
+
}
|
85075
|
+
static handleError() {
|
85076
|
+
for (const type in this.requestStore) {
|
85077
|
+
this.requestStore.forEach(({
|
85078
|
+
reject
|
85079
|
+
}) => {
|
85080
|
+
reject('handleError');
|
85081
|
+
});
|
85082
|
+
}
|
85083
|
+
throw Error('E窗通设备功能加载失败');
|
85084
|
+
}
|
85085
|
+
static handleClose() {
|
85086
|
+
for (const type in this.requestStore) {
|
85087
|
+
this.requestStore.forEach(({
|
85088
|
+
reject
|
85089
|
+
}) => {
|
85090
|
+
reject('close');
|
85091
|
+
});
|
85092
|
+
}
|
85093
|
+
}
|
85094
|
+
static handleMessage(msg) {
|
85095
|
+
let data = '';
|
85096
|
+
try {
|
85097
|
+
data = JSON.parse(msg.data);
|
85098
|
+
} catch (e) {
|
85099
|
+
data = '';
|
85100
|
+
}
|
85101
|
+
this.requestStore.forEach(({
|
85102
|
+
resolve
|
85103
|
+
}) => {
|
85104
|
+
resolve(data);
|
85066
85105
|
});
|
85067
|
-
|
85068
|
-
|
85069
|
-
|
85070
|
-
|
85071
|
-
|
85072
|
-
|
85073
|
-
|
85074
|
-
|
85075
|
-
|
85076
|
-
|
85077
|
-
|
85078
|
-
|
85079
|
-
|
85080
|
-
|
85081
|
-
|
85082
|
-
|
85083
|
-
|
85084
|
-
|
85085
|
-
|
85106
|
+
this.requestStore = [];
|
85107
|
+
this.ws.close();
|
85108
|
+
}
|
85109
|
+
static async read(method) {
|
85110
|
+
await this.startConnect(method);
|
85111
|
+
const methodDesc = EWindowPassMethodDesc[method];
|
85112
|
+
if (this.ws.readyState === 1) {
|
85113
|
+
if (method !== EWindowPassMethodCode.FingerPrint_Base64) console.log(methodDesc + '连接成功');
|
85114
|
+
let jsonString;
|
85115
|
+
// outTimes:超时时间(秒)
|
85116
|
+
switch (method) {
|
85117
|
+
case EWindowPassMethodCode.ReadIDCard_Base64:
|
85118
|
+
// cardReader:0 读卡器-USB;1 读卡器-COM
|
85119
|
+
jsonString = JSON.stringify({
|
85120
|
+
method,
|
85121
|
+
args: {
|
85122
|
+
outTimes: 30,
|
85123
|
+
cardReader: 1
|
85124
|
+
}
|
85125
|
+
});
|
85086
85126
|
break;
|
85087
|
-
case
|
85088
|
-
|
85089
|
-
|
85090
|
-
|
85091
|
-
|
85092
|
-
|
85093
|
-
|
85094
|
-
|
85095
|
-
|
85096
|
-
|
85097
|
-
break;
|
85098
|
-
}
|
85099
|
-
case 5:
|
85100
|
-
{
|
85101
|
-
// 良田
|
85102
|
-
let type = this.camera === 0 ? 'main' : 'vice';
|
85103
|
-
const res = await eloam_plugin_service_ELoamPassService.scanByCamera(type);
|
85104
|
-
this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res}`);
|
85105
|
-
break;
|
85106
|
-
}
|
85107
|
-
}
|
85108
|
-
},
|
85109
|
-
/**
|
85110
|
-
* 主摄像头
|
85111
|
-
*/
|
85112
|
-
async handleStartMain() {
|
85113
|
-
switch (this.machineType) {
|
85114
|
-
case 0:
|
85115
|
-
// 捷宇高拍仪
|
85116
|
-
await JieYueService.turnOnTheCamera('main');
|
85127
|
+
case EWindowPassMethodCode.FaceValidateWithIdCard_Base64:
|
85128
|
+
// cardReader:0 读卡器-USB;1 读卡器-COM
|
85129
|
+
jsonString = JSON.stringify({
|
85130
|
+
method,
|
85131
|
+
args: {
|
85132
|
+
outTimes: 30,
|
85133
|
+
cardReader: 1,
|
85134
|
+
cameraType: 0
|
85135
|
+
}
|
85136
|
+
});
|
85117
85137
|
break;
|
85118
|
-
case
|
85119
|
-
//
|
85120
|
-
|
85138
|
+
case EWindowPassMethodCode.iReadCardBas:
|
85139
|
+
// icType:1接触卡;2非接触卡;3自动(接触优先);4自动(非接优先)
|
85140
|
+
jsonString = JSON.stringify({
|
85141
|
+
method,
|
85142
|
+
args: {
|
85143
|
+
icType: '1'
|
85144
|
+
}
|
85145
|
+
});
|
85121
85146
|
break;
|
85122
|
-
case
|
85123
|
-
//
|
85124
|
-
|
85147
|
+
case EWindowPassMethodCode.FingerPrint_Base64:
|
85148
|
+
// 获取指纹:getimgae,颜色(0黑色 1红色), 质量(默认0), 图像大小(288,360),类型(0民用,1公安)
|
85149
|
+
jsonString = 'getimgae,1,0,288,0';
|
85125
85150
|
break;
|
85126
|
-
|
85127
|
-
|
85128
|
-
|
85151
|
+
default:
|
85152
|
+
jsonString = JSON.stringify({
|
85153
|
+
method,
|
85154
|
+
args: {
|
85155
|
+
outTimes: 30
|
85156
|
+
}
|
85157
|
+
});
|
85129
85158
|
break;
|
85130
85159
|
}
|
85131
|
-
|
85132
|
-
|
85133
|
-
|
85134
|
-
|
85135
|
-
|
85136
|
-
|
85137
|
-
|
85138
|
-
|
85139
|
-
|
85140
|
-
|
85141
|
-
|
85160
|
+
this.ws.send(jsonString);
|
85161
|
+
return new Promise((resolve, reject) => {
|
85162
|
+
if (!this.requestStore) {
|
85163
|
+
this.requestStore = [];
|
85164
|
+
}
|
85165
|
+
this.requestStore.push({
|
85166
|
+
resolve,
|
85167
|
+
reject
|
85168
|
+
});
|
85169
|
+
});
|
85170
|
+
} else {
|
85171
|
+
throw Error(methodDesc + '未准备完成');
|
85172
|
+
}
|
85173
|
+
}
|
85174
|
+
/**
|
85175
|
+
* 读取二代身份证
|
85176
|
+
* */
|
85177
|
+
static async idCardRead(method = EWindowPassMethodCode.ReadIDCard_Base64) {
|
85178
|
+
const readData = await EWindowPassService.read(EWindowPassMethodCode.ReadIDCard_Base64);
|
85179
|
+
console.log('读取二代身份证==>', readData);
|
85180
|
+
if (!readData) {
|
85181
|
+
throw Error('未匹配可用的E窗通读取设备');
|
85182
|
+
}
|
85183
|
+
if (readData.retVal !== 0) {
|
85184
|
+
throw Error("读取二代身份证失败,返回值:" + readData.retVal + ",错误信息:" + readData.errMsg);
|
85185
|
+
}
|
85186
|
+
const idInfo = readData.idInfo.data;
|
85187
|
+
const {
|
85188
|
+
name,
|
85189
|
+
sex,
|
85190
|
+
birthday,
|
85191
|
+
address,
|
85192
|
+
id_num,
|
85193
|
+
nations
|
85194
|
+
} = idInfo;
|
85195
|
+
const IDCardData = {
|
85196
|
+
info: {
|
85197
|
+
name,
|
85198
|
+
sex,
|
85199
|
+
birthday: birthday.replace('-', '').replace('-', ''),
|
85200
|
+
address,
|
85201
|
+
cardId: id_num,
|
85202
|
+
nation: nations
|
85203
|
+
},
|
85204
|
+
headImage: readData.idPhotoPicBase64
|
85205
|
+
};
|
85206
|
+
console.log('读取二代身份证结果==>', IDCardData);
|
85207
|
+
return IDCardData;
|
85208
|
+
}
|
85209
|
+
/**
|
85210
|
+
* 人证比对
|
85211
|
+
*/
|
85212
|
+
static async faceValidateWithIdCardRead() {
|
85213
|
+
const readData = await EWindowPassService.read(EWindowPassMethodCode.FaceValidateWithIdCard_Base64);
|
85214
|
+
console.log('人证比对==>', readData);
|
85215
|
+
if (!readData) {
|
85216
|
+
throw Error('未匹配可用的E窗通读取设备');
|
85217
|
+
}
|
85218
|
+
if (readData.retVal !== 0) {
|
85219
|
+
throw Error("人证比对失败,返回值:" + readData.retVal + ",错误信息:" + readData.errMsg);
|
85220
|
+
}
|
85221
|
+
const idInfo = readData.idInfo.data;
|
85222
|
+
const {
|
85223
|
+
name,
|
85224
|
+
sex,
|
85225
|
+
birth,
|
85226
|
+
address,
|
85227
|
+
idNo,
|
85228
|
+
nation
|
85229
|
+
} = idInfo;
|
85230
|
+
const IDCardData = {
|
85231
|
+
idCard: {
|
85232
|
+
info: {
|
85233
|
+
name,
|
85234
|
+
sex,
|
85235
|
+
birthday: birth.replace('-', '').replace('-', ''),
|
85236
|
+
address,
|
85237
|
+
cardId: idNo,
|
85238
|
+
nation
|
85239
|
+
},
|
85240
|
+
headImage: readData.idPhotoBase64
|
85241
|
+
},
|
85242
|
+
faceimg: readData.scenceBase64
|
85243
|
+
};
|
85244
|
+
console.log('人证比对结果==>', IDCardData);
|
85245
|
+
return IDCardData;
|
85246
|
+
}
|
85247
|
+
/** 读取社保卡 */
|
85248
|
+
static async socialSecurityCardRead() {
|
85249
|
+
const readData = await EWindowPassService.read(EWindowPassMethodCode.iReadCardBas);
|
85250
|
+
if (!readData) {
|
85251
|
+
throw Error('未匹配可用的E窗通读取设备');
|
85252
|
+
}
|
85253
|
+
if (readData.retVal !== 0) {
|
85254
|
+
throw Error("读取社保卡基本信息失败,返回值:" + readData.retVal + ",错误信息:" + readData.outInfo);
|
85255
|
+
}
|
85256
|
+
// 返回数据:330100|350781196403072943|W57681892|331100D10600000300657BCF88899F8E|张三|3B6D000000815444368660330100286BCF|1.00|2020-08-12|2030-08-12|1|SN00000000|(邮编|身份证号|卡号|社会保障号码|姓名|...不知道是什么信息了)
|
85257
|
+
const outInfo = readData.outInfo;
|
85258
|
+
const outInfoArray = outInfo.split('|');
|
85259
|
+
const cardId = outInfoArray[1];
|
85260
|
+
const birthday = IdCardCommonUtils.getBirthdayByIdNumber(cardId).replace('-', '').replace('-', '');
|
85261
|
+
const sex = IdCardCommonUtils.getGenderByIdNumber(cardId);
|
85262
|
+
const IDCardData = {
|
85263
|
+
info: {
|
85264
|
+
name: outInfoArray[4],
|
85265
|
+
sex,
|
85266
|
+
birthday,
|
85267
|
+
address: '',
|
85268
|
+
cardId
|
85269
|
+
},
|
85270
|
+
headImage: ''
|
85271
|
+
};
|
85272
|
+
console.log('读取社保卡==>', readData);
|
85273
|
+
return IDCardData;
|
85274
|
+
}
|
85275
|
+
/** 获取签名-base64 */
|
85276
|
+
static async signNameRead() {
|
85277
|
+
const readData = await EWindowPassService.read(EWindowPassMethodCode.GetSignName_Base64);
|
85278
|
+
if (!readData) {
|
85279
|
+
throw Error('未匹配可用的E窗通读取设备');
|
85280
|
+
}
|
85281
|
+
if (readData.retVal !== 0) {
|
85282
|
+
throw Error("读取签名失败,返回值:" + readData.retVal + ",错误信息:" + readData.errMsg);
|
85283
|
+
}
|
85284
|
+
console.log('获取签名==>', readData);
|
85285
|
+
return readData.signPicBase64;
|
85286
|
+
}
|
85287
|
+
/** 获取指纹*/
|
85288
|
+
static async fingerPrintRead() {
|
85289
|
+
let timeOver = 30;
|
85290
|
+
async function readFingerPrint() {
|
85291
|
+
const readData = await EWindowPassService.read(EWindowPassMethodCode.FingerPrint_Base64);
|
85292
|
+
if (!readData) {
|
85293
|
+
throw Error('未匹配可用的E窗通读取设备');
|
85294
|
+
}
|
85295
|
+
let list = readData.fingerPrintInfo.split("|");
|
85296
|
+
console.log(list);
|
85297
|
+
let ret = Number(list[1]);
|
85298
|
+
if (ret > 1) {
|
85299
|
+
if (timeOver > 0) {
|
85300
|
+
timeOver--;
|
85301
|
+
return await readFingerPrint();
|
85302
|
+
} else {
|
85303
|
+
return {
|
85304
|
+
status: 'error',
|
85305
|
+
data: '已超时,请重新操作,按压指纹'
|
85306
|
+
};
|
85307
|
+
}
|
85308
|
+
} else {
|
85309
|
+
return {
|
85310
|
+
status: 'success',
|
85311
|
+
data: readData.fingerPrintInfo
|
85312
|
+
};
|
85313
|
+
}
|
85314
|
+
}
|
85315
|
+
let {
|
85316
|
+
status,
|
85317
|
+
data
|
85318
|
+
} = await readFingerPrint();
|
85319
|
+
if (status === 'error') {
|
85320
|
+
throw Error(data);
|
85321
|
+
} else {
|
85322
|
+
let [method, result, quality, image, featureCode] = data.split('|');
|
85323
|
+
// getimgae|1|68|......|......
|
85324
|
+
// method:方法,result:返回的状态,quality:指纹图片质量,image:图片base64,featureCode:指纹特征码
|
85325
|
+
return {
|
85326
|
+
method,
|
85327
|
+
result,
|
85328
|
+
quality,
|
85329
|
+
image,
|
85330
|
+
featureCode
|
85331
|
+
};
|
85332
|
+
}
|
85333
|
+
}
|
85334
|
+
}
|
85335
|
+
_defineProperty(EWindowPassService, "iReadCardBasWebSocketUrl", 'ws://127.0.0.1:5847');
|
85336
|
+
_defineProperty(EWindowPassService, "fingerPrintBasWebSocketUrl", 'ws://127.0.0.1:9000');
|
85337
|
+
_defineProperty(EWindowPassService, "ws", void 0);
|
85338
|
+
_defineProperty(EWindowPassService, "requestStore", []);
|
85339
|
+
;// CONCATENATED MODULE: ./packages/service/external-plugins/wei-rong-plugin-socket.service.ts
|
85340
|
+
|
85341
|
+
|
85342
|
+
|
85343
|
+
|
85344
|
+
/**
|
85345
|
+
* @author: lvcy
|
85346
|
+
* @date: 2024-03-22
|
85347
|
+
* @description:国产客户端,硬件对接
|
85348
|
+
*/
|
85349
|
+
var WEIRONGMethodCode;
|
85350
|
+
(function (WEIRONGMethodCode) {
|
85351
|
+
/** 读卡 */
|
85352
|
+
WEIRONGMethodCode["ReadCard_Base64"] = "ReadCard_Base64";
|
85353
|
+
/** 开始签名*/
|
85354
|
+
WEIRONGMethodCode["StartSignName"] = "StartSignName";
|
85355
|
+
/** 获取签名状态*/
|
85356
|
+
WEIRONGMethodCode["GetSignNameStatus"] = "GetSignNameStatus";
|
85357
|
+
/** 获取签名*/
|
85358
|
+
WEIRONGMethodCode["GetSignName_Base64"] = "GetSignName_Base64";
|
85359
|
+
/** 人证比对 */
|
85360
|
+
WEIRONGMethodCode["FaceValidateWithIdCard_Base64"] = "FaceValidateWithIdCard_Base64";
|
85361
|
+
/** 打开高拍仪器*/
|
85362
|
+
WEIRONGMethodCode["TurnOnTheCamera"] = "TurnOnTheCamera";
|
85363
|
+
/** 拍照*/
|
85364
|
+
WEIRONGMethodCode["ScannerCamera"] = "ScannerCamera";
|
85365
|
+
})(WEIRONGMethodCode || (WEIRONGMethodCode = {}));
|
85366
|
+
const WEIRONGMethodDesc = {
|
85367
|
+
[WEIRONGMethodCode.ReadCard_Base64]: '读卡',
|
85368
|
+
[WEIRONGMethodCode.GetSignName_Base64]: '获取签名',
|
85369
|
+
[WEIRONGMethodCode.FaceValidateWithIdCard_Base64]: '人证比对'
|
85370
|
+
};
|
85371
|
+
class WeiRongPluginService {
|
85372
|
+
static startConnect(method) {
|
85373
|
+
console.log('startConnect', method, this.ws?.readyState, WebSocket.CONNECTING);
|
85374
|
+
if (this.ws && this.ws.readyState === WebSocket.OPEN) {
|
85375
|
+
return this;
|
85376
|
+
}
|
85377
|
+
console.log('重新链接');
|
85378
|
+
const ws = new WebSocket(this.webSocketUrl);
|
85379
|
+
let resolved;
|
85380
|
+
const onConnect = new Promise(resolve => {
|
85381
|
+
resolved = resolve;
|
85382
|
+
});
|
85383
|
+
ws.onopen = () => {
|
85384
|
+
resolved(true);
|
85385
|
+
};
|
85386
|
+
ws.onmessage = event => {
|
85387
|
+
if (method === EWindowPassMethodCode.FingerPrint_Base64) {
|
85388
|
+
// 指纹后端返回的是string
|
85389
|
+
event = {
|
85390
|
+
...event,
|
85391
|
+
data: JSON.stringify({
|
85392
|
+
fingerPrintInfo: event.data
|
85393
|
+
})
|
85394
|
+
};
|
85395
|
+
}
|
85396
|
+
this.handleMessage(event);
|
85397
|
+
};
|
85398
|
+
ws.onclose = () => this.handleClose();
|
85399
|
+
ws.onerror = () => this.handleError();
|
85400
|
+
this.ws = ws;
|
85401
|
+
return onConnect;
|
85402
|
+
}
|
85403
|
+
static handleError() {
|
85404
|
+
for (const type in this.requestStore) {
|
85405
|
+
this.requestStore.forEach(({
|
85406
|
+
reject
|
85407
|
+
}) => {
|
85408
|
+
reject('handleError');
|
85409
|
+
});
|
85410
|
+
}
|
85411
|
+
throw Error('设备功能加载失败');
|
85412
|
+
}
|
85413
|
+
static handleClose() {
|
85414
|
+
for (const type in this.requestStore) {
|
85415
|
+
this.requestStore.forEach(({
|
85416
|
+
reject
|
85417
|
+
}) => {
|
85418
|
+
reject('close');
|
85419
|
+
});
|
85420
|
+
}
|
85421
|
+
}
|
85422
|
+
static handleMessage(msg) {
|
85423
|
+
let data = '';
|
85424
|
+
try {
|
85425
|
+
data = JSON.parse(msg.data);
|
85426
|
+
} catch (e) {
|
85427
|
+
data = '';
|
85428
|
+
}
|
85429
|
+
if (data.method === 'FaceScreenStream' || data.method === 'VideoStream') {
|
85430
|
+
const event = new ScannerCameraRefreshPhotoEvent(data.imgBase64);
|
85431
|
+
return window.dispatchEvent(event);
|
85432
|
+
} else {
|
85433
|
+
this.requestStore.forEach(({
|
85434
|
+
resolve
|
85435
|
+
}) => {
|
85436
|
+
resolve(data);
|
85437
|
+
});
|
85438
|
+
this.requestStore = [];
|
85439
|
+
}
|
85440
|
+
// this.ws.close();
|
85441
|
+
}
|
85442
|
+
|
85443
|
+
static async read(method) {
|
85444
|
+
await this.startConnect(method);
|
85445
|
+
const methodDesc = WEIRONGMethodDesc[method];
|
85446
|
+
if (this.ws.readyState === 1) {
|
85447
|
+
let jsonString;
|
85448
|
+
switch (method) {
|
85449
|
+
case WEIRONGMethodCode.ReadCard_Base64:
|
85450
|
+
jsonString = JSON.stringify({
|
85451
|
+
method: 'ReadIDCard_Base64',
|
85452
|
+
args: {
|
85453
|
+
outTimes: 30,
|
85454
|
+
cardReader: 0
|
85455
|
+
}
|
85456
|
+
});
|
85457
|
+
break;
|
85458
|
+
case WEIRONGMethodCode.FaceValidateWithIdCard_Base64:
|
85459
|
+
jsonString = JSON.stringify({
|
85460
|
+
method: 'FaceValidateWithIdCard_Base64',
|
85461
|
+
args: {
|
85462
|
+
outTimes: 30,
|
85463
|
+
score: 75
|
85464
|
+
}
|
85465
|
+
});
|
85466
|
+
break;
|
85467
|
+
case WEIRONGMethodCode.StartSignName:
|
85468
|
+
jsonString = JSON.stringify({
|
85469
|
+
method: 'SignNameScreen_Start',
|
85470
|
+
args: {
|
85471
|
+
outTimes: 30
|
85472
|
+
}
|
85473
|
+
});
|
85474
|
+
break;
|
85475
|
+
case WEIRONGMethodCode.GetSignNameStatus:
|
85476
|
+
jsonString = JSON.stringify({
|
85477
|
+
method: 'SignNameScreen_Status',
|
85478
|
+
args: {}
|
85479
|
+
});
|
85480
|
+
break;
|
85481
|
+
case WEIRONGMethodCode.GetSignName_Base64:
|
85482
|
+
jsonString = JSON.stringify({
|
85483
|
+
method: 'SignNameScreen_Get',
|
85484
|
+
args: {}
|
85485
|
+
});
|
85486
|
+
break;
|
85487
|
+
case WEIRONGMethodCode.TurnOnTheCamera:
|
85488
|
+
jsonString = JSON.stringify({
|
85489
|
+
method: 'VideoStart',
|
85490
|
+
args: {}
|
85491
|
+
});
|
85492
|
+
break;
|
85493
|
+
case WEIRONGMethodCode.ScannerCamera:
|
85494
|
+
jsonString = JSON.stringify({
|
85495
|
+
method: 'GetCameraImage',
|
85496
|
+
args: {
|
85497
|
+
imagePath: ''
|
85498
|
+
}
|
85499
|
+
});
|
85500
|
+
break;
|
85501
|
+
}
|
85502
|
+
this.ws.send(jsonString);
|
85503
|
+
return new Promise((resolve, reject) => {
|
85504
|
+
if (!this.requestStore) {
|
85505
|
+
this.requestStore = [];
|
85506
|
+
}
|
85507
|
+
this.requestStore.push({
|
85508
|
+
resolve,
|
85509
|
+
reject
|
85510
|
+
});
|
85511
|
+
});
|
85512
|
+
} else {
|
85513
|
+
throw Error(methodDesc + '未准备完成');
|
85514
|
+
}
|
85515
|
+
}
|
85516
|
+
/** 读取身份证和永居证*/
|
85517
|
+
static async idCardRead() {
|
85518
|
+
const readData = await WeiRongPluginService.read(WEIRONGMethodCode.ReadCard_Base64);
|
85519
|
+
if (!readData) {
|
85520
|
+
throw Error('未匹配到可用的读取设备');
|
85521
|
+
}
|
85522
|
+
if (readData.retVal !== 0) {
|
85523
|
+
this.ws?.close();
|
85524
|
+
throw Error("读取二代身份证失败,返回值:" + readData.retVal + ",错误信息:" + readData.errMsg);
|
85525
|
+
}
|
85526
|
+
let idInfo = readData.idInfo;
|
85527
|
+
// name:姓名 "ENfullname":"英文姓名" sex:性别 nation:民族 number 身份证号码 birthday: 生日 address: 地址,
|
85528
|
+
// organs:签发机关 signdate:开始有效期 validterm: 结束有效期
|
85529
|
+
let {
|
85530
|
+
name,
|
85531
|
+
ENfullname: englishName,
|
85532
|
+
Nationality,
|
85533
|
+
sex,
|
85534
|
+
birthday,
|
85535
|
+
address,
|
85536
|
+
number,
|
85537
|
+
nation,
|
85538
|
+
organs: police,
|
85539
|
+
signdate: validStart,
|
85540
|
+
validterm: validEnd
|
85541
|
+
} = idInfo;
|
85542
|
+
let chineseName = '',
|
85543
|
+
cardType = '1',
|
85544
|
+
nationality = '中国';
|
85545
|
+
// 外国人永居证
|
85546
|
+
if (readData.cardType == 1 || readData.cardType == 2) {
|
85547
|
+
cardType = '9'; // 永居证
|
85548
|
+
chineseName = name;
|
85549
|
+
name = name || englishName; // 姓名,先读中文名,没有时读英文名
|
85550
|
+
police = police || '中华人民共和国国家移民管理局'; // 发证机关,读不到,默认
|
85551
|
+
nationality = Nationality; // 永居证国籍放在名族里面的
|
85552
|
+
nation = '';
|
85553
|
+
} else {
|
85554
|
+
// 身份证
|
85555
|
+
cardType = '1'; // 身份证
|
85556
|
+
}
|
85557
|
+
|
85558
|
+
const IDCardData = {
|
85559
|
+
info: {
|
85560
|
+
cardType,
|
85561
|
+
nationality,
|
85562
|
+
name,
|
85563
|
+
chineseName,
|
85564
|
+
englishName,
|
85565
|
+
sex,
|
85566
|
+
birthday: birthday.replace('-', '').replace('-', ''),
|
85567
|
+
address,
|
85568
|
+
cardId: number,
|
85569
|
+
nation,
|
85570
|
+
police,
|
85571
|
+
validStart,
|
85572
|
+
validEnd
|
85573
|
+
},
|
85574
|
+
headImage: readData.idPhotoBase64
|
85575
|
+
};
|
85576
|
+
this.ws?.close();
|
85577
|
+
return IDCardData;
|
85578
|
+
}
|
85579
|
+
/** 读取社保卡 */
|
85580
|
+
static async socialSecurityCardRead() {
|
85581
|
+
const readData = await WeiRongPluginService.read(WEIRONGMethodCode.ReadCard_Base64);
|
85582
|
+
if (!readData) {
|
85583
|
+
throw Error('未匹配可用的读取设备');
|
85584
|
+
}
|
85585
|
+
if (readData.retVal !== 0) {
|
85586
|
+
this.ws?.close();
|
85587
|
+
throw Error("读取社保卡基本信息失败,返回值:" + readData.retVal + ",错误信息:" + readData.idInfo);
|
85588
|
+
}
|
85589
|
+
// 返回数据:cardType 3 社保卡
|
85590
|
+
// idInfo: {
|
85591
|
+
// name:姓名
|
85592
|
+
// sex:性别
|
85593
|
+
// nation:民族
|
85594
|
+
// cardnumber:卡号
|
85595
|
+
// number:社会保障号码(身份证号)
|
85596
|
+
// birthday:出生日期"\
|
85597
|
+
// city:城市代码
|
85598
|
+
// signdate:开始有效期
|
85599
|
+
// validterm:结束有效期
|
85600
|
+
// cardveVrsion:社保卡版本
|
85601
|
+
// }
|
85602
|
+
const idInfo = readData.idInfo;
|
85603
|
+
let {
|
85604
|
+
name,
|
85605
|
+
sex,
|
85606
|
+
birthday,
|
85607
|
+
number: cardId,
|
85608
|
+
cardnumber
|
85609
|
+
} = idInfo;
|
85610
|
+
const IDCardData = {
|
85611
|
+
info: {
|
85612
|
+
name,
|
85613
|
+
sex,
|
85614
|
+
birthday,
|
85615
|
+
address: '',
|
85616
|
+
cardId,
|
85617
|
+
cardnumber
|
85618
|
+
},
|
85619
|
+
headImage: ''
|
85620
|
+
};
|
85621
|
+
this.ws?.close();
|
85622
|
+
return IDCardData;
|
85623
|
+
}
|
85624
|
+
// 港澳台居住证协议
|
85625
|
+
// {
|
85626
|
+
// "method": "ReadIDCard_Base64",
|
85627
|
+
// "retVal": 0,
|
85628
|
+
// "errMsg":"",
|
85629
|
+
// "cardType":"4",
|
85630
|
+
// "idInfo":{
|
85631
|
+
// "name":"中文姓名",
|
85632
|
+
// "sex":"性别",
|
85633
|
+
// "birthday":"出生日期",
|
85634
|
+
// "address":"(例:杭州市西湖区XXXX)",
|
85635
|
+
// "number":"证件号码",
|
85636
|
+
// "organs":"签发机关",
|
85637
|
+
// "signdate":"开始有效期",
|
85638
|
+
// "validterm":"结束有效期",
|
85639
|
+
// "signCount":"签证次数",
|
85640
|
+
// "passNu":"通行证号"
|
85641
|
+
// },
|
85642
|
+
// "idPhotoBase64":"小头像base64图片格式"
|
85643
|
+
// }
|
85644
|
+
/**
|
85645
|
+
* 人证比对
|
85646
|
+
*/
|
85647
|
+
static async faceValidateWithIdCardRead() {
|
85648
|
+
const readData = await WeiRongPluginService.read(WEIRONGMethodCode.FaceValidateWithIdCard_Base64);
|
85649
|
+
if (readData.method === 'FaceValidateWithIdCard_Base64' && readData.retVal == '0') {
|
85650
|
+
console.log('认证成功=>', readData);
|
85651
|
+
const idInfo = readData.idInfo;
|
85652
|
+
let {
|
85653
|
+
name,
|
85654
|
+
ENfullname: englishName,
|
85655
|
+
Nationality,
|
85656
|
+
sex,
|
85657
|
+
birthday,
|
85658
|
+
address,
|
85659
|
+
number,
|
85660
|
+
nation,
|
85661
|
+
organs: police,
|
85662
|
+
signdate: validStart,
|
85663
|
+
validterm: validEnd
|
85664
|
+
} = idInfo;
|
85665
|
+
let chineseName = '',
|
85666
|
+
cardType = '1',
|
85667
|
+
nationality = '中国';
|
85668
|
+
// 外国人永居证
|
85669
|
+
if (readData.cardType == 1 || readData.cardType == 2) {
|
85670
|
+
cardType = '9'; // 永居证
|
85671
|
+
chineseName = name;
|
85672
|
+
name = name || englishName; // 姓名,先读中文名,没有时读英文名
|
85673
|
+
police = police || '中华人民共和国国家移民管理局'; // 发证机关,读不到,默认
|
85674
|
+
nationality = Nationality; // 永居证国籍放在名族里面的
|
85675
|
+
nation = '';
|
85676
|
+
} else {
|
85677
|
+
// 身份证
|
85678
|
+
cardType = '1'; // 身份证
|
85679
|
+
}
|
85680
|
+
// idCard:身份证信息;faceimg,拍照照片;score:对比度
|
85681
|
+
const IDCardData = {
|
85682
|
+
idCard: {
|
85683
|
+
info: {
|
85684
|
+
cardType,
|
85685
|
+
nationality,
|
85686
|
+
name,
|
85687
|
+
chineseName,
|
85688
|
+
englishName,
|
85689
|
+
sex,
|
85690
|
+
birthday: birthday.replace('-', '').replace('-', ''),
|
85691
|
+
address,
|
85692
|
+
cardId: number,
|
85693
|
+
nation,
|
85694
|
+
police,
|
85695
|
+
validStart,
|
85696
|
+
validEnd
|
85697
|
+
},
|
85698
|
+
headImage: readData.idPhotoBase64
|
85699
|
+
},
|
85700
|
+
faceimg: readData.scenceBase64,
|
85701
|
+
score: readData.score
|
85702
|
+
};
|
85703
|
+
this.ws?.close();
|
85704
|
+
return IDCardData;
|
85705
|
+
} else {
|
85706
|
+
this.ws?.close();
|
85707
|
+
}
|
85708
|
+
}
|
85709
|
+
/** 签字*/
|
85710
|
+
static async signNameRead() {
|
85711
|
+
return new Promise(async (resolve, reject) => {
|
85712
|
+
const readData = await WeiRongPluginService.read(WEIRONGMethodCode.StartSignName);
|
85713
|
+
console.log('开始签名=>', readData);
|
85714
|
+
if (readData.method === 'SignNameScreen_Start') {
|
85715
|
+
if (readData.retVal !== 0) {
|
85716
|
+
this.ws?.close();
|
85717
|
+
reject(`开始签名失败,返回值:${readData.retVal},错误信息:${readData.errMsg}`);
|
85718
|
+
} else {
|
85719
|
+
if (!this.timer) {
|
85720
|
+
this.timer = setInterval(async () => {
|
85721
|
+
let status = await WeiRongPluginService.read(WEIRONGMethodCode.GetSignNameStatus);
|
85722
|
+
if (status.signScreenStatus == 2) {
|
85723
|
+
clearInterval(this.timer);
|
85724
|
+
this.timer = null;
|
85725
|
+
let res = await WeiRongPluginService.read(WEIRONGMethodCode.GetSignName_Base64);
|
85726
|
+
this.ws?.close();
|
85727
|
+
resolve(res.signPicBase64);
|
85728
|
+
} else if (status.retVal == 3) {
|
85729
|
+
clearInterval(this.timer);
|
85730
|
+
this.timer = null;
|
85731
|
+
this.ws?.close();
|
85732
|
+
reject('签字结果=>签字失败,或意外中断!');
|
85733
|
+
}
|
85734
|
+
}, 2000);
|
85735
|
+
}
|
85736
|
+
}
|
85737
|
+
}
|
85738
|
+
});
|
85739
|
+
}
|
85740
|
+
// 开启主摄像头/副摄像头
|
85741
|
+
static async turnOnTheCamera() {
|
85742
|
+
await WeiRongPluginService.read(WEIRONGMethodCode.TurnOnTheCamera);
|
85743
|
+
}
|
85744
|
+
// 拍照
|
85745
|
+
static async scanByCamera() {
|
85746
|
+
// if (this.ws) this.ws.close();
|
85747
|
+
let res = await WeiRongPluginService.read(WEIRONGMethodCode.ScannerCamera);
|
85748
|
+
if (res.method === 'GetCameraImage' && res.retVal == 0) {
|
85749
|
+
this.ws?.close();
|
85750
|
+
return res.cameraImgBase64;
|
85751
|
+
}
|
85752
|
+
}
|
85753
|
+
}
|
85754
|
+
_defineProperty(WeiRongPluginService, "webSocketUrl", 'ws://127.0.0.1:5847');
|
85755
|
+
_defineProperty(WeiRongPluginService, "ws", void 0);
|
85756
|
+
_defineProperty(WeiRongPluginService, "requestStore", []);
|
85757
|
+
_defineProperty(WeiRongPluginService, "timer", null);
|
85758
|
+
;// 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/index.js??vue-loader-options!./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=script&lang=js&
|
85759
|
+
|
85760
|
+
|
85761
|
+
|
85762
|
+
|
85763
|
+
|
85764
|
+
|
85765
|
+
const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/jpg;base64,';
|
85766
|
+
/* harmony default export */ var scanner_camera_componentvue_type_script_lang_js_ = ({
|
85767
|
+
name: "scanner-camera-component",
|
85768
|
+
props: {
|
85769
|
+
/**
|
85770
|
+
* 高拍仪型号 0-捷宇;3:方正高影仪;4:紫图速拍仪;5-良田
|
85771
|
+
*/
|
85772
|
+
machineType: {
|
85773
|
+
//
|
85774
|
+
default: 0,
|
85775
|
+
type: Number
|
85776
|
+
}
|
85777
|
+
},
|
85778
|
+
data: () => {
|
85779
|
+
return {
|
85780
|
+
scannerVideoSrc: '',
|
85781
|
+
scannerResultSrc: '',
|
85782
|
+
loadSuccess: true,
|
85783
|
+
camera: 0,
|
85784
|
+
cameras: [{
|
85785
|
+
name: '文档',
|
85786
|
+
value: 0
|
85787
|
+
}, {
|
85788
|
+
name: '照片',
|
85789
|
+
value: 1
|
85790
|
+
}],
|
85791
|
+
buttonList: [{
|
85792
|
+
label: '拍照',
|
85793
|
+
name: 'take-pictures'
|
85794
|
+
}]
|
85795
|
+
};
|
85796
|
+
},
|
85797
|
+
watch: {
|
85798
|
+
'machineType': function () {
|
85799
|
+
let handleName = this.camera === 1 ? 'start-vice' : 'start-main';
|
85800
|
+
this.handleAction(handleName);
|
85801
|
+
}
|
85802
|
+
},
|
85803
|
+
created() {
|
85804
|
+
this.handleAction('start-main');
|
85805
|
+
window.addEventListener(SCANNER_CAMERA_REFRESH_PHOTO_EVENT, message => {
|
85806
|
+
if (message.type === SCANNER_CAMERA_REFRESH_PHOTO_EVENT) {
|
85807
|
+
this.scannerVideoSrc = `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${message.scannerResultUrl}`;
|
85808
|
+
}
|
85809
|
+
});
|
85810
|
+
},
|
85811
|
+
methods: {
|
85812
|
+
/**
|
85813
|
+
* 切换扫描、拍照
|
85814
|
+
* @param val
|
85815
|
+
*/
|
85816
|
+
selectChange(val) {
|
85817
|
+
let handleName = val === 1 ? 'start-vice' : 'start-main';
|
85818
|
+
this.handleAction(handleName);
|
85819
|
+
},
|
85820
|
+
/**
|
85821
|
+
* 拍照
|
85822
|
+
*/
|
85823
|
+
async takePictures() {
|
85824
|
+
switch (this.machineType) {
|
85825
|
+
case 0:
|
85826
|
+
// 捷宇
|
85827
|
+
let res = await JieYueService.scanByCamera();
|
85828
|
+
this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res}`);
|
85829
|
+
break;
|
85830
|
+
case 3:
|
85831
|
+
{
|
85832
|
+
// 方正
|
85833
|
+
this.$emit('send-scanner-result', this.scannerVideoSrc);
|
85834
|
+
break;
|
85835
|
+
}
|
85836
|
+
case 4:
|
85837
|
+
{
|
85838
|
+
let res = await UdsPluginSocketService.scanByCamera();
|
85839
|
+
this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res}`);
|
85840
|
+
break;
|
85841
|
+
}
|
85842
|
+
case 5:
|
85843
|
+
{
|
85844
|
+
// 良田
|
85845
|
+
let type = this.camera === 0 ? 'main' : 'vice';
|
85846
|
+
const res = await eloam_plugin_service_ELoamPassService.scanByCamera(type);
|
85847
|
+
this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res}`);
|
85848
|
+
break;
|
85849
|
+
}
|
85850
|
+
case 6:
|
85851
|
+
{
|
85852
|
+
// 国产客户端一体机
|
85853
|
+
let res = await WeiRongPluginService.scanByCamera();
|
85854
|
+
this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res}`);
|
85855
|
+
break;
|
85856
|
+
}
|
85857
|
+
}
|
85858
|
+
},
|
85859
|
+
/**
|
85860
|
+
* 主摄像头
|
85861
|
+
*/
|
85862
|
+
async handleStartMain() {
|
85863
|
+
switch (this.machineType) {
|
85864
|
+
case 0:
|
85865
|
+
// 捷宇高拍仪
|
85866
|
+
await JieYueService.turnOnTheCamera('main');
|
85867
|
+
break;
|
85868
|
+
case 3:
|
85869
|
+
// 方正高影仪
|
85870
|
+
await FounderPluginSocketService.turnOnTheCamera();
|
85871
|
+
break;
|
85872
|
+
case 4:
|
85873
|
+
// 紫图速拍仪
|
85874
|
+
await UdsPluginSocketService.turnOnTheCamera();
|
85875
|
+
break;
|
85876
|
+
case 5:
|
85877
|
+
// 良田高拍仪
|
85878
|
+
this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
|
85879
|
+
break;
|
85880
|
+
case 6:
|
85881
|
+
// 国产客户端一体机
|
85882
|
+
await WeiRongPluginService.turnOnTheCamera();
|
85883
|
+
break;
|
85884
|
+
}
|
85885
|
+
},
|
85886
|
+
/**
|
85887
|
+
* 副摄像头
|
85888
|
+
*/
|
85889
|
+
async handleStartVice() {
|
85890
|
+
switch (this.machineType) {
|
85891
|
+
case 0:
|
85892
|
+
// 捷宇高拍仪
|
85893
|
+
await JieYueService.turnOnTheCamera('vice');
|
85894
|
+
break;
|
85895
|
+
case 3:
|
85142
85896
|
// 方正高影仪
|
85143
85897
|
await FounderPluginSocketService.turnOnTheCamera();
|
85144
85898
|
break;
|
@@ -85150,6 +85904,10 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85150
85904
|
// 良田
|
85151
85905
|
this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.secondaryCameraUrl;
|
85152
85906
|
break;
|
85907
|
+
case 6:
|
85908
|
+
// 国产客户端一体机
|
85909
|
+
await WeiRongPluginService.turnOnTheCamera();
|
85910
|
+
break;
|
85153
85911
|
}
|
85154
85912
|
},
|
85155
85913
|
handleAction(name) {
|
@@ -85172,10 +85930,10 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85172
85930
|
});
|
85173
85931
|
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=script&lang=js&
|
85174
85932
|
/* harmony default export */ var component_scanner_camera_componentvue_type_script_lang_js_ = (scanner_camera_componentvue_type_script_lang_js_);
|
85175
|
-
;// 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=
|
85933
|
+
;// 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=bc9cce92&prod&scoped=true&lang=scss&
|
85176
85934
|
// extracted by mini-css-extract-plugin
|
85177
85935
|
|
85178
|
-
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=
|
85936
|
+
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=bc9cce92&prod&scoped=true&lang=scss&
|
85179
85937
|
|
85180
85938
|
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue
|
85181
85939
|
|
@@ -85188,11 +85946,11 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85188
85946
|
|
85189
85947
|
var scanner_camera_component_component = normalizeComponent(
|
85190
85948
|
component_scanner_camera_componentvue_type_script_lang_js_,
|
85191
|
-
|
85192
|
-
|
85949
|
+
scanner_camera_componentvue_type_template_id_bc9cce92_scoped_true_render,
|
85950
|
+
scanner_camera_componentvue_type_template_id_bc9cce92_scoped_true_staticRenderFns,
|
85193
85951
|
false,
|
85194
85952
|
null,
|
85195
|
-
"
|
85953
|
+
"bc9cce92",
|
85196
85954
|
null
|
85197
85955
|
|
85198
85956
|
)
|
@@ -85487,8 +86245,8 @@ id_card_reader_eloam.install = Vue => {
|
|
85487
86245
|
Vue.component(id_card_reader_eloam.name, id_card_reader_eloam);
|
85488
86246
|
};
|
85489
86247
|
/* harmony default export */ var id_card_reader_id_card_reader_eloam = (id_card_reader_eloam);
|
85490
|
-
;// 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/id-card-reader/id-card-reader-button/src/id-card-reader-button.vue?vue&type=template&id=
|
85491
|
-
var
|
86248
|
+
;// 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/id-card-reader/id-card-reader-button/src/id-card-reader-button.vue?vue&type=template&id=19ae37ba&scoped=true&
|
86249
|
+
var id_card_reader_buttonvue_type_template_id_19ae37ba_scoped_true_render = function render() {
|
85492
86250
|
var _vm = this,
|
85493
86251
|
_c = _vm._self._c;
|
85494
86252
|
return _vm.tip ? _c('el-tooltip', {
|
@@ -85565,7 +86323,7 @@ var id_card_reader_buttonvue_type_template_id_5b90b226_scoped_true_render = func
|
|
85565
86323
|
}
|
85566
86324
|
})], 2);
|
85567
86325
|
};
|
85568
|
-
var
|
86326
|
+
var id_card_reader_buttonvue_type_template_id_19ae37ba_scoped_true_staticRenderFns = [];
|
85569
86327
|
|
85570
86328
|
;// CONCATENATED MODULE: ./packages/service/external-plugins/default-plugin-socket.service.ts
|
85571
86329
|
|
@@ -85585,191 +86343,24 @@ var PluginApiType;
|
|
85585
86343
|
PluginApiType["camera"] = "sxt";
|
85586
86344
|
/**有为签字 */
|
85587
86345
|
PluginApiType["ywSign"] = "yw";
|
85588
|
-
/**汉王签字 */
|
85589
|
-
PluginApiType["hwSign"] = "hwsign";
|
85590
|
-
})(PluginApiType || (PluginApiType = {}));
|
85591
|
-
class IdCardReadService {
|
85592
|
-
// 精伦身份证 JLSFZManage
|
85593
|
-
// 之前 SFZManage
|
85594
|
-
|
85595
|
-
static startConnect(type = PluginApiType.idcard) {
|
85596
|
-
if (this.ws && this.ws.readyState === WebSocket.CONNECTING) {
|
85597
|
-
return this;
|
85598
|
-
}
|
85599
|
-
let webSocketUrl = this.idcardWebSocketUrl;
|
85600
|
-
switch (type) {
|
85601
|
-
case PluginApiType.idcard:
|
85602
|
-
webSocketUrl = this.idcardWebSocketUrl;
|
85603
|
-
break;
|
85604
|
-
case PluginApiType.jlsfz:
|
85605
|
-
webSocketUrl = this.jlsfzWebSocketUrl;
|
85606
|
-
}
|
85607
|
-
const ws = new WebSocket(webSocketUrl);
|
85608
|
-
let resolved;
|
85609
|
-
const onConnect = new Promise(resolve => {
|
85610
|
-
resolved = resolve;
|
85611
|
-
});
|
85612
|
-
ws.onopen = () => {
|
85613
|
-
resolved(true);
|
85614
|
-
};
|
85615
|
-
ws.onmessage = event => this.handleMessage(event);
|
85616
|
-
ws.onclose = () => this.handleClose();
|
85617
|
-
ws.onerror = () => this.handleError();
|
85618
|
-
this.ws = ws;
|
85619
|
-
return onConnect;
|
85620
|
-
}
|
85621
|
-
static handleError() {
|
85622
|
-
for (const type in this.requestStore) {
|
85623
|
-
this.requestStore.forEach(({
|
85624
|
-
reject
|
85625
|
-
}) => {
|
85626
|
-
reject('handleError');
|
85627
|
-
});
|
85628
|
-
}
|
85629
|
-
throw Error('读取身份证功能加载失败');
|
85630
|
-
}
|
85631
|
-
static handleClose() {
|
85632
|
-
for (const type in this.requestStore) {
|
85633
|
-
this.requestStore.forEach(({
|
85634
|
-
reject
|
85635
|
-
}) => {
|
85636
|
-
reject('close');
|
85637
|
-
});
|
85638
|
-
}
|
85639
|
-
}
|
85640
|
-
static handleMessage(msg) {
|
85641
|
-
let data = '';
|
85642
|
-
try {
|
85643
|
-
data = JSON.parse(msg.data);
|
85644
|
-
} catch (e) {
|
85645
|
-
data = '';
|
85646
|
-
}
|
85647
|
-
this.requestStore.forEach(({
|
85648
|
-
resolve
|
85649
|
-
}) => {
|
85650
|
-
resolve(data);
|
85651
|
-
});
|
85652
|
-
this.requestStore = [];
|
85653
|
-
this.ws.close();
|
85654
|
-
}
|
85655
|
-
static async read(type = PluginApiType.idcard) {
|
85656
|
-
await this.startConnect(type);
|
85657
|
-
if (this.ws.readyState === 1) {
|
85658
|
-
this.ws.send(type);
|
85659
|
-
return new Promise((resolve, reject) => {
|
85660
|
-
if (!this.requestStore) {
|
85661
|
-
this.requestStore = [];
|
85662
|
-
}
|
85663
|
-
this.requestStore.push({
|
85664
|
-
resolve,
|
85665
|
-
reject
|
85666
|
-
});
|
85667
|
-
});
|
85668
|
-
} else {
|
85669
|
-
throw Error('读取身份证未准备完成');
|
85670
|
-
}
|
85671
|
-
}
|
85672
|
-
static async idCardCommonRead() {
|
85673
|
-
let idcardInfo;
|
85674
|
-
// 顺序不要调整,先连接精伦读卡器,最后连接普通读卡器(也就是PluginApiType.idcard,因为该项读卡失败不会返回消息)
|
85675
|
-
for (const t of [PluginApiType.jlsfz, PluginApiType.idcard]) {
|
85676
|
-
const readData = await IdCardReadService.read(t);
|
85677
|
-
if (readData && readData.hasOwnProperty('info')) {
|
85678
|
-
idcardInfo = readData;
|
85679
|
-
break;
|
85680
|
-
}
|
85681
|
-
}
|
85682
|
-
if (idcardInfo) {
|
85683
|
-
return idcardInfo;
|
85684
|
-
} else {
|
85685
|
-
throw Error('未匹配可用的读卡器');
|
85686
|
-
}
|
85687
|
-
}
|
85688
|
-
}
|
85689
|
-
_defineProperty(IdCardReadService, "idcardWebSocketUrl", 'ws://127.0.0.1:8152/SFZManage');
|
85690
|
-
_defineProperty(IdCardReadService, "jlsfzWebSocketUrl", 'ws://127.0.0.1:8152/JLSFZManage');
|
85691
|
-
_defineProperty(IdCardReadService, "ws", void 0);
|
85692
|
-
_defineProperty(IdCardReadService, "requestStore", []);
|
85693
|
-
class CameraReadService {
|
85694
|
-
static startConnect() {
|
85695
|
-
if (this.ws && this.ws.readyState === WebSocket.CONNECTING) {
|
85696
|
-
return this;
|
85697
|
-
}
|
85698
|
-
let webSocketUrl = this.cameraWebSocketUrl;
|
85699
|
-
const ws = new WebSocket(webSocketUrl);
|
85700
|
-
let resolved;
|
85701
|
-
const onConnect = new Promise(resolve => {
|
85702
|
-
resolved = resolve;
|
85703
|
-
});
|
85704
|
-
ws.onopen = () => {
|
85705
|
-
resolved(true);
|
85706
|
-
};
|
85707
|
-
ws.onmessage = event => this.handleMessage(event);
|
85708
|
-
ws.onclose = () => this.handleClose();
|
85709
|
-
ws.onerror = () => this.handleError();
|
85710
|
-
this.ws = ws;
|
85711
|
-
return onConnect;
|
85712
|
-
}
|
85713
|
-
static handleError() {
|
85714
|
-
for (const type in this.requestStore) {
|
85715
|
-
this.requestStore.forEach(({
|
85716
|
-
reject
|
85717
|
-
}) => {
|
85718
|
-
reject('handleError');
|
85719
|
-
});
|
85720
|
-
}
|
85721
|
-
throw Error('读取拍照功能加载失败');
|
85722
|
-
}
|
85723
|
-
static handleClose() {
|
85724
|
-
for (const type in this.requestStore) {
|
85725
|
-
this.requestStore.forEach(({
|
85726
|
-
reject
|
85727
|
-
}) => {
|
85728
|
-
reject('close');
|
85729
|
-
});
|
85730
|
-
}
|
85731
|
-
}
|
85732
|
-
static handleMessage(msg) {
|
85733
|
-
let data = msg.data;
|
85734
|
-
this.requestStore.forEach(({
|
85735
|
-
resolve
|
85736
|
-
}) => {
|
85737
|
-
resolve(data);
|
85738
|
-
});
|
85739
|
-
this.requestStore = [];
|
85740
|
-
this.ws.close();
|
85741
|
-
// this.ws = null;
|
85742
|
-
}
|
86346
|
+
/**汉王签字 */
|
86347
|
+
PluginApiType["hwSign"] = "hwsign";
|
86348
|
+
})(PluginApiType || (PluginApiType = {}));
|
86349
|
+
class IdCardReadService {
|
86350
|
+
// 精伦身份证 JLSFZManage
|
86351
|
+
// 之前 SFZManage
|
85743
86352
|
|
85744
|
-
static
|
85745
|
-
await this.startConnect();
|
85746
|
-
if (this.ws.readyState === 1) {
|
85747
|
-
this.ws.send(PluginApiType.camera);
|
85748
|
-
return new Promise((resolve, reject) => {
|
85749
|
-
if (!this.requestStore) {
|
85750
|
-
this.requestStore = [];
|
85751
|
-
}
|
85752
|
-
this.requestStore.push({
|
85753
|
-
resolve,
|
85754
|
-
reject
|
85755
|
-
});
|
85756
|
-
});
|
85757
|
-
} else {
|
85758
|
-
throw Error('读取拍照未准备完成');
|
85759
|
-
}
|
85760
|
-
}
|
85761
|
-
}
|
85762
|
-
_defineProperty(CameraReadService, "cameraWebSocketUrl", 'ws://127.0.0.1:8152/SXTManage');
|
85763
|
-
_defineProperty(CameraReadService, "ws", void 0);
|
85764
|
-
_defineProperty(CameraReadService, "requestStore", []);
|
85765
|
-
class SignReadService {
|
85766
|
-
static startConnect(signMode) {
|
86353
|
+
static startConnect(type = PluginApiType.idcard) {
|
85767
86354
|
if (this.ws && this.ws.readyState === WebSocket.CONNECTING) {
|
85768
86355
|
return this;
|
85769
86356
|
}
|
85770
|
-
let webSocketUrl = this.
|
85771
|
-
|
85772
|
-
|
86357
|
+
let webSocketUrl = this.idcardWebSocketUrl;
|
86358
|
+
switch (type) {
|
86359
|
+
case PluginApiType.idcard:
|
86360
|
+
webSocketUrl = this.idcardWebSocketUrl;
|
86361
|
+
break;
|
86362
|
+
case PluginApiType.jlsfz:
|
86363
|
+
webSocketUrl = this.jlsfzWebSocketUrl;
|
85773
86364
|
}
|
85774
86365
|
const ws = new WebSocket(webSocketUrl);
|
85775
86366
|
let resolved;
|
@@ -85793,7 +86384,7 @@ class SignReadService {
|
|
85793
86384
|
reject('handleError');
|
85794
86385
|
});
|
85795
86386
|
}
|
85796
|
-
throw Error('
|
86387
|
+
throw Error('读取身份证功能加载失败');
|
85797
86388
|
}
|
85798
86389
|
static handleClose() {
|
85799
86390
|
for (const type in this.requestStore) {
|
@@ -85805,7 +86396,12 @@ class SignReadService {
|
|
85805
86396
|
}
|
85806
86397
|
}
|
85807
86398
|
static handleMessage(msg) {
|
85808
|
-
let data =
|
86399
|
+
let data = '';
|
86400
|
+
try {
|
86401
|
+
data = JSON.parse(msg.data);
|
86402
|
+
} catch (e) {
|
86403
|
+
data = '';
|
86404
|
+
}
|
85809
86405
|
this.requestStore.forEach(({
|
85810
86406
|
resolve
|
85811
86407
|
}) => {
|
@@ -85814,11 +86410,10 @@ class SignReadService {
|
|
85814
86410
|
this.requestStore = [];
|
85815
86411
|
this.ws.close();
|
85816
86412
|
}
|
85817
|
-
static async read(
|
85818
|
-
await this.startConnect(
|
86413
|
+
static async read(type = PluginApiType.idcard) {
|
86414
|
+
await this.startConnect(type);
|
85819
86415
|
if (this.ws.readyState === 1) {
|
85820
|
-
|
85821
|
-
this.ws.send(signMode);
|
86416
|
+
this.ws.send(type);
|
85822
86417
|
return new Promise((resolve, reject) => {
|
85823
86418
|
if (!this.requestStore) {
|
85824
86419
|
this.requestStore = [];
|
@@ -85829,57 +86424,36 @@ class SignReadService {
|
|
85829
86424
|
});
|
85830
86425
|
});
|
85831
86426
|
} else {
|
85832
|
-
throw Error('
|
86427
|
+
throw Error('读取身份证未准备完成');
|
86428
|
+
}
|
86429
|
+
}
|
86430
|
+
static async idCardCommonRead() {
|
86431
|
+
let idcardInfo;
|
86432
|
+
// 顺序不要调整,先连接精伦读卡器,最后连接普通读卡器(也就是PluginApiType.idcard,因为该项读卡失败不会返回消息)
|
86433
|
+
for (const t of [PluginApiType.jlsfz, PluginApiType.idcard]) {
|
86434
|
+
const readData = await IdCardReadService.read(t);
|
86435
|
+
if (readData && readData.hasOwnProperty('info')) {
|
86436
|
+
idcardInfo = readData;
|
86437
|
+
break;
|
86438
|
+
}
|
86439
|
+
}
|
86440
|
+
if (idcardInfo) {
|
86441
|
+
return idcardInfo;
|
86442
|
+
} else {
|
86443
|
+
throw Error('未匹配可用的读卡器');
|
85833
86444
|
}
|
85834
86445
|
}
|
85835
86446
|
}
|
85836
|
-
_defineProperty(
|
85837
|
-
_defineProperty(
|
85838
|
-
_defineProperty(
|
85839
|
-
_defineProperty(
|
85840
|
-
|
85841
|
-
|
85842
|
-
|
85843
|
-
/**
|
85844
|
-
* 沃斯德人证交互终端
|
85845
|
-
* E窗通WEBSOCKET服务
|
85846
|
-
*
|
85847
|
-
* */
|
85848
|
-
|
85849
|
-
var EWindowPassMethodCode;
|
85850
|
-
(function (EWindowPassMethodCode) {
|
85851
|
-
/** 读取社保卡 */
|
85852
|
-
EWindowPassMethodCode["iReadCardBas"] = "iReadCardBas";
|
85853
|
-
/** 获取签名*/
|
85854
|
-
EWindowPassMethodCode["GetSignName_Base64"] = "GetSignName_Base64";
|
85855
|
-
/** 读取二代身份证 */
|
85856
|
-
EWindowPassMethodCode["ReadIDCard_Base64"] = "ReadIDCard_Base64";
|
85857
|
-
/** 人证比对 */
|
85858
|
-
EWindowPassMethodCode["FaceValidateWithIdCard_Base64"] = "FaceValidateWithIdCard_Base64";
|
85859
|
-
/** 获取指纹 */
|
85860
|
-
EWindowPassMethodCode["FingerPrint_Base64"] = "FingerPrint_Base64";
|
85861
|
-
})(EWindowPassMethodCode || (EWindowPassMethodCode = {}));
|
85862
|
-
const EWindowPassMethodDesc = {
|
85863
|
-
[EWindowPassMethodCode.iReadCardBas]: '读取社保卡',
|
85864
|
-
[EWindowPassMethodCode.GetSignName_Base64]: '获取签名',
|
85865
|
-
[EWindowPassMethodCode.ReadIDCard_Base64]: '读取二代身份证',
|
85866
|
-
[EWindowPassMethodCode.FaceValidateWithIdCard_Base64]: '人证比对',
|
85867
|
-
[EWindowPassMethodCode.FingerPrint_Base64]: '获取指纹'
|
85868
|
-
};
|
85869
|
-
class EWindowPassService {
|
85870
|
-
static startConnect(method) {
|
86447
|
+
_defineProperty(IdCardReadService, "idcardWebSocketUrl", 'ws://127.0.0.1:8152/SFZManage');
|
86448
|
+
_defineProperty(IdCardReadService, "jlsfzWebSocketUrl", 'ws://127.0.0.1:8152/JLSFZManage');
|
86449
|
+
_defineProperty(IdCardReadService, "ws", void 0);
|
86450
|
+
_defineProperty(IdCardReadService, "requestStore", []);
|
86451
|
+
class CameraReadService {
|
86452
|
+
static startConnect() {
|
85871
86453
|
if (this.ws && this.ws.readyState === WebSocket.CONNECTING) {
|
85872
86454
|
return this;
|
85873
86455
|
}
|
85874
|
-
let webSocketUrl =
|
85875
|
-
switch (method) {
|
85876
|
-
case EWindowPassMethodCode.FingerPrint_Base64:
|
85877
|
-
webSocketUrl = this.fingerPrintBasWebSocketUrl;
|
85878
|
-
break;
|
85879
|
-
default:
|
85880
|
-
webSocketUrl = this.iReadCardBasWebSocketUrl;
|
85881
|
-
break;
|
85882
|
-
}
|
86456
|
+
let webSocketUrl = this.cameraWebSocketUrl;
|
85883
86457
|
const ws = new WebSocket(webSocketUrl);
|
85884
86458
|
let resolved;
|
85885
86459
|
const onConnect = new Promise(resolve => {
|
@@ -85888,18 +86462,7 @@ class EWindowPassService {
|
|
85888
86462
|
ws.onopen = () => {
|
85889
86463
|
resolved(true);
|
85890
86464
|
};
|
85891
|
-
ws.onmessage = event =>
|
85892
|
-
if (method === EWindowPassMethodCode.FingerPrint_Base64) {
|
85893
|
-
// 指纹后端返回的是string
|
85894
|
-
event = {
|
85895
|
-
...event,
|
85896
|
-
data: JSON.stringify({
|
85897
|
-
fingerPrintInfo: event.data
|
85898
|
-
})
|
85899
|
-
};
|
85900
|
-
}
|
85901
|
-
this.handleMessage(event);
|
85902
|
-
};
|
86465
|
+
ws.onmessage = event => this.handleMessage(event);
|
85903
86466
|
ws.onclose = () => this.handleClose();
|
85904
86467
|
ws.onerror = () => this.handleError();
|
85905
86468
|
this.ws = ws;
|
@@ -85913,7 +86476,7 @@ class EWindowPassService {
|
|
85913
86476
|
reject('handleError');
|
85914
86477
|
});
|
85915
86478
|
}
|
85916
|
-
throw Error('
|
86479
|
+
throw Error('读取拍照功能加载失败');
|
85917
86480
|
}
|
85918
86481
|
static handleClose() {
|
85919
86482
|
for (const type in this.requestStore) {
|
@@ -85925,12 +86488,7 @@ class EWindowPassService {
|
|
85925
86488
|
}
|
85926
86489
|
}
|
85927
86490
|
static handleMessage(msg) {
|
85928
|
-
let data =
|
85929
|
-
try {
|
85930
|
-
data = JSON.parse(msg.data);
|
85931
|
-
} catch (e) {
|
85932
|
-
data = '';
|
85933
|
-
}
|
86491
|
+
let data = msg.data;
|
85934
86492
|
this.requestStore.forEach(({
|
85935
86493
|
resolve
|
85936
86494
|
}) => {
|
@@ -85938,237 +86496,105 @@ class EWindowPassService {
|
|
85938
86496
|
});
|
85939
86497
|
this.requestStore = [];
|
85940
86498
|
this.ws.close();
|
86499
|
+
// this.ws = null;
|
85941
86500
|
}
|
85942
|
-
|
85943
|
-
|
85944
|
-
|
86501
|
+
|
86502
|
+
static async read() {
|
86503
|
+
await this.startConnect();
|
85945
86504
|
if (this.ws.readyState === 1) {
|
85946
|
-
|
85947
|
-
let jsonString;
|
85948
|
-
// outTimes:超时时间(秒)
|
85949
|
-
switch (method) {
|
85950
|
-
case EWindowPassMethodCode.ReadIDCard_Base64:
|
85951
|
-
// cardReader:0 读卡器-USB;1 读卡器-COM
|
85952
|
-
jsonString = JSON.stringify({
|
85953
|
-
method,
|
85954
|
-
args: {
|
85955
|
-
outTimes: 30,
|
85956
|
-
cardReader: 1
|
85957
|
-
}
|
85958
|
-
});
|
85959
|
-
break;
|
85960
|
-
case EWindowPassMethodCode.FaceValidateWithIdCard_Base64:
|
85961
|
-
// cardReader:0 读卡器-USB;1 读卡器-COM
|
85962
|
-
jsonString = JSON.stringify({
|
85963
|
-
method,
|
85964
|
-
args: {
|
85965
|
-
outTimes: 30,
|
85966
|
-
cardReader: 1,
|
85967
|
-
cameraType: 0
|
85968
|
-
}
|
85969
|
-
});
|
85970
|
-
break;
|
85971
|
-
case EWindowPassMethodCode.iReadCardBas:
|
85972
|
-
// icType:1接触卡;2非接触卡;3自动(接触优先);4自动(非接优先)
|
85973
|
-
jsonString = JSON.stringify({
|
85974
|
-
method,
|
85975
|
-
args: {
|
85976
|
-
icType: '1'
|
85977
|
-
}
|
85978
|
-
});
|
85979
|
-
break;
|
85980
|
-
case EWindowPassMethodCode.FingerPrint_Base64:
|
85981
|
-
// 获取指纹:getimgae,颜色(0黑色 1红色), 质量(默认0), 图像大小(288,360),类型(0民用,1公安)
|
85982
|
-
jsonString = 'getimgae,1,0,288,0';
|
85983
|
-
break;
|
85984
|
-
default:
|
85985
|
-
jsonString = JSON.stringify({
|
85986
|
-
method,
|
85987
|
-
args: {
|
85988
|
-
outTimes: 30
|
85989
|
-
}
|
85990
|
-
});
|
85991
|
-
break;
|
85992
|
-
}
|
85993
|
-
this.ws.send(jsonString);
|
86505
|
+
this.ws.send(PluginApiType.camera);
|
85994
86506
|
return new Promise((resolve, reject) => {
|
85995
86507
|
if (!this.requestStore) {
|
85996
86508
|
this.requestStore = [];
|
85997
86509
|
}
|
85998
86510
|
this.requestStore.push({
|
85999
86511
|
resolve,
|
86000
|
-
reject
|
86001
|
-
});
|
86002
|
-
});
|
86003
|
-
} else {
|
86004
|
-
throw Error(
|
86005
|
-
}
|
86006
|
-
}
|
86007
|
-
/**
|
86008
|
-
* 读取二代身份证
|
86009
|
-
* */
|
86010
|
-
static async idCardRead(method = EWindowPassMethodCode.ReadIDCard_Base64) {
|
86011
|
-
const readData = await EWindowPassService.read(EWindowPassMethodCode.ReadIDCard_Base64);
|
86012
|
-
console.log('读取二代身份证==>', readData);
|
86013
|
-
if (!readData) {
|
86014
|
-
throw Error('未匹配可用的E窗通读取设备');
|
86015
|
-
}
|
86016
|
-
if (readData.retVal !== 0) {
|
86017
|
-
throw Error("读取二代身份证失败,返回值:" + readData.retVal + ",错误信息:" + readData.errMsg);
|
86018
|
-
}
|
86019
|
-
const idInfo = readData.idInfo.data;
|
86020
|
-
const {
|
86021
|
-
name,
|
86022
|
-
sex,
|
86023
|
-
birthday,
|
86024
|
-
address,
|
86025
|
-
id_num,
|
86026
|
-
nations
|
86027
|
-
} = idInfo;
|
86028
|
-
const IDCardData = {
|
86029
|
-
info: {
|
86030
|
-
name,
|
86031
|
-
sex,
|
86032
|
-
birthday: birthday.replace('-', '').replace('-', ''),
|
86033
|
-
address,
|
86034
|
-
cardId: id_num,
|
86035
|
-
nation: nations
|
86036
|
-
},
|
86037
|
-
headImage: readData.idPhotoPicBase64
|
86038
|
-
};
|
86039
|
-
console.log('读取二代身份证结果==>', IDCardData);
|
86040
|
-
return IDCardData;
|
86041
|
-
}
|
86042
|
-
/**
|
86043
|
-
* 人证比对
|
86044
|
-
*/
|
86045
|
-
static async faceValidateWithIdCardRead() {
|
86046
|
-
const readData = await EWindowPassService.read(EWindowPassMethodCode.FaceValidateWithIdCard_Base64);
|
86047
|
-
console.log('人证比对==>', readData);
|
86048
|
-
if (!readData) {
|
86049
|
-
throw Error('未匹配可用的E窗通读取设备');
|
86050
|
-
}
|
86051
|
-
if (readData.retVal !== 0) {
|
86052
|
-
throw Error("人证比对失败,返回值:" + readData.retVal + ",错误信息:" + readData.errMsg);
|
86512
|
+
reject
|
86513
|
+
});
|
86514
|
+
});
|
86515
|
+
} else {
|
86516
|
+
throw Error('读取拍照未准备完成');
|
86053
86517
|
}
|
86054
|
-
const idInfo = readData.idInfo.data;
|
86055
|
-
const {
|
86056
|
-
name,
|
86057
|
-
sex,
|
86058
|
-
birth,
|
86059
|
-
address,
|
86060
|
-
idNo,
|
86061
|
-
nation
|
86062
|
-
} = idInfo;
|
86063
|
-
const IDCardData = {
|
86064
|
-
idCard: {
|
86065
|
-
info: {
|
86066
|
-
name,
|
86067
|
-
sex,
|
86068
|
-
birthday: birth.replace('-', '').replace('-', ''),
|
86069
|
-
address,
|
86070
|
-
cardId: idNo,
|
86071
|
-
nation
|
86072
|
-
},
|
86073
|
-
headImage: readData.idPhotoBase64
|
86074
|
-
},
|
86075
|
-
faceimg: readData.scenceBase64
|
86076
|
-
};
|
86077
|
-
console.log('人证比对结果==>', IDCardData);
|
86078
|
-
return IDCardData;
|
86079
86518
|
}
|
86080
|
-
|
86081
|
-
|
86082
|
-
|
86083
|
-
|
86084
|
-
|
86519
|
+
}
|
86520
|
+
_defineProperty(CameraReadService, "cameraWebSocketUrl", 'ws://127.0.0.1:8152/SXTManage');
|
86521
|
+
_defineProperty(CameraReadService, "ws", void 0);
|
86522
|
+
_defineProperty(CameraReadService, "requestStore", []);
|
86523
|
+
class SignReadService {
|
86524
|
+
static startConnect(signMode) {
|
86525
|
+
if (this.ws && this.ws.readyState === WebSocket.CONNECTING) {
|
86526
|
+
return this;
|
86085
86527
|
}
|
86086
|
-
|
86087
|
-
|
86528
|
+
let webSocketUrl = this.signWebSocketUrl;
|
86529
|
+
if (signMode === PluginApiType.hwSign) {
|
86530
|
+
webSocketUrl = this.hwSignWebSocketUrl;
|
86088
86531
|
}
|
86089
|
-
|
86090
|
-
|
86091
|
-
const
|
86092
|
-
|
86093
|
-
|
86094
|
-
|
86095
|
-
|
86096
|
-
info: {
|
86097
|
-
name: outInfoArray[4],
|
86098
|
-
sex,
|
86099
|
-
birthday,
|
86100
|
-
address: '',
|
86101
|
-
cardId
|
86102
|
-
},
|
86103
|
-
headImage: ''
|
86532
|
+
const ws = new WebSocket(webSocketUrl);
|
86533
|
+
let resolved;
|
86534
|
+
const onConnect = new Promise(resolve => {
|
86535
|
+
resolved = resolve;
|
86536
|
+
});
|
86537
|
+
ws.onopen = () => {
|
86538
|
+
resolved(true);
|
86104
86539
|
};
|
86105
|
-
|
86106
|
-
|
86540
|
+
ws.onmessage = event => this.handleMessage(event);
|
86541
|
+
ws.onclose = () => this.handleClose();
|
86542
|
+
ws.onerror = () => this.handleError();
|
86543
|
+
this.ws = ws;
|
86544
|
+
return onConnect;
|
86107
86545
|
}
|
86108
|
-
|
86109
|
-
|
86110
|
-
|
86111
|
-
|
86112
|
-
|
86546
|
+
static handleError() {
|
86547
|
+
for (const type in this.requestStore) {
|
86548
|
+
this.requestStore.forEach(({
|
86549
|
+
reject
|
86550
|
+
}) => {
|
86551
|
+
reject('handleError');
|
86552
|
+
});
|
86113
86553
|
}
|
86114
|
-
|
86115
|
-
|
86554
|
+
throw Error('签字板加载失败');
|
86555
|
+
}
|
86556
|
+
static handleClose() {
|
86557
|
+
for (const type in this.requestStore) {
|
86558
|
+
this.requestStore.forEach(({
|
86559
|
+
reject
|
86560
|
+
}) => {
|
86561
|
+
reject('close');
|
86562
|
+
});
|
86116
86563
|
}
|
86117
|
-
console.log('获取签名==>', readData);
|
86118
|
-
return readData.signPicBase64;
|
86119
86564
|
}
|
86120
|
-
|
86121
|
-
|
86122
|
-
|
86123
|
-
|
86124
|
-
|
86125
|
-
|
86126
|
-
|
86127
|
-
|
86128
|
-
|
86129
|
-
|
86130
|
-
|
86131
|
-
|
86132
|
-
|
86133
|
-
|
86134
|
-
|
86135
|
-
|
86136
|
-
|
86137
|
-
|
86138
|
-
data: '已超时,请重新操作,按压指纹'
|
86139
|
-
};
|
86565
|
+
static handleMessage(msg) {
|
86566
|
+
let data = msg.data;
|
86567
|
+
this.requestStore.forEach(({
|
86568
|
+
resolve
|
86569
|
+
}) => {
|
86570
|
+
resolve(data);
|
86571
|
+
});
|
86572
|
+
this.requestStore = [];
|
86573
|
+
this.ws.close();
|
86574
|
+
}
|
86575
|
+
static async read(signMode = PluginApiType.ywSign) {
|
86576
|
+
await this.startConnect(signMode);
|
86577
|
+
if (this.ws.readyState === 1) {
|
86578
|
+
console.log('签字板连接成功');
|
86579
|
+
this.ws.send(signMode);
|
86580
|
+
return new Promise((resolve, reject) => {
|
86581
|
+
if (!this.requestStore) {
|
86582
|
+
this.requestStore = [];
|
86140
86583
|
}
|
86141
|
-
|
86142
|
-
|
86143
|
-
|
86144
|
-
|
86145
|
-
|
86146
|
-
}
|
86147
|
-
}
|
86148
|
-
let {
|
86149
|
-
status,
|
86150
|
-
data
|
86151
|
-
} = await readFingerPrint();
|
86152
|
-
if (status === 'error') {
|
86153
|
-
throw Error(data);
|
86584
|
+
this.requestStore.push({
|
86585
|
+
resolve,
|
86586
|
+
reject
|
86587
|
+
});
|
86588
|
+
});
|
86154
86589
|
} else {
|
86155
|
-
|
86156
|
-
// getimgae|1|68|......|......
|
86157
|
-
// method:方法,result:返回的状态,quality:指纹图片质量,image:图片base64,featureCode:指纹特征码
|
86158
|
-
return {
|
86159
|
-
method,
|
86160
|
-
result,
|
86161
|
-
quality,
|
86162
|
-
image,
|
86163
|
-
featureCode
|
86164
|
-
};
|
86590
|
+
throw Error('签字板未准备完成');
|
86165
86591
|
}
|
86166
86592
|
}
|
86167
86593
|
}
|
86168
|
-
_defineProperty(
|
86169
|
-
_defineProperty(
|
86170
|
-
_defineProperty(
|
86171
|
-
_defineProperty(
|
86594
|
+
_defineProperty(SignReadService, "signWebSocketUrl", 'ws://127.0.0.1:8152/chromeManage');
|
86595
|
+
_defineProperty(SignReadService, "hwSignWebSocketUrl", 'ws://127.0.0.1:8152/HWSIGNManage');
|
86596
|
+
_defineProperty(SignReadService, "ws", void 0);
|
86597
|
+
_defineProperty(SignReadService, "requestStore", []);
|
86172
86598
|
;// CONCATENATED MODULE: ./packages/service/external-plugins/huada-plugin-socket.service.ts
|
86173
86599
|
|
86174
86600
|
|
@@ -87330,6 +87756,87 @@ var default_take_photo_dialog_component = normalizeComponent(
|
|
87330
87756
|
)
|
87331
87757
|
|
87332
87758
|
/* harmony default export */ var default_take_photo_dialog = (default_take_photo_dialog_component.exports);
|
87759
|
+
;// 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/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue?vue&type=template&id=d49bc744&scoped=true&
|
87760
|
+
var wei_rong_face_auth_dialogvue_type_template_id_d49bc744_scoped_true_render = function render() {
|
87761
|
+
var _vm = this,
|
87762
|
+
_c = _vm._self._c;
|
87763
|
+
return _vm.visibility ? _c('el-dialog', {
|
87764
|
+
staticClass: "wei-rong-face-auth-dialog",
|
87765
|
+
attrs: {
|
87766
|
+
"title": "人脸识别",
|
87767
|
+
"top": '5vh',
|
87768
|
+
"width": "640px",
|
87769
|
+
"visible": _vm.visibility,
|
87770
|
+
"close-on-click-modal": false
|
87771
|
+
},
|
87772
|
+
on: {
|
87773
|
+
"update:visible": function ($event) {
|
87774
|
+
_vm.visibility = $event;
|
87775
|
+
}
|
87776
|
+
}
|
87777
|
+
}, [_c('div', {
|
87778
|
+
staticClass: "image-container"
|
87779
|
+
}, [_c('img', {
|
87780
|
+
staticStyle: {
|
87781
|
+
"width": "600px",
|
87782
|
+
"height": "450px"
|
87783
|
+
},
|
87784
|
+
attrs: {
|
87785
|
+
"id": "photo",
|
87786
|
+
"src": _vm.viewFaceImage
|
87787
|
+
}
|
87788
|
+
})])]) : _vm._e();
|
87789
|
+
};
|
87790
|
+
var wei_rong_face_auth_dialogvue_type_template_id_d49bc744_scoped_true_staticRenderFns = [];
|
87791
|
+
|
87792
|
+
;// 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/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue?vue&type=script&lang=js&
|
87793
|
+
|
87794
|
+
|
87795
|
+
const wei_rong_face_auth_dialogvue_type_script_lang_js_BEGIN_DATA = 'data:image/jpg;base64,';
|
87796
|
+
/* harmony default export */ var wei_rong_face_auth_dialogvue_type_script_lang_js_ = ({
|
87797
|
+
name: "wei-rong-face-auth-dialog",
|
87798
|
+
data: () => {
|
87799
|
+
return {
|
87800
|
+
visibility: true,
|
87801
|
+
viewFaceImage: ''
|
87802
|
+
};
|
87803
|
+
},
|
87804
|
+
async created() {
|
87805
|
+
console.log();
|
87806
|
+
window.addEventListener(SCANNER_CAMERA_REFRESH_PHOTO_EVENT, message => {
|
87807
|
+
if (message.type === SCANNER_CAMERA_REFRESH_PHOTO_EVENT) {
|
87808
|
+
this.viewFaceImage = `${wei_rong_face_auth_dialogvue_type_script_lang_js_BEGIN_DATA}${message.scannerResultUrl}`;
|
87809
|
+
}
|
87810
|
+
});
|
87811
|
+
let res = await WeiRongPluginService.faceValidateWithIdCardRead();
|
87812
|
+
this.$message.success('认证成功');
|
87813
|
+
setTimeout(() => {
|
87814
|
+
this.$emit('close', res);
|
87815
|
+
}, 1500);
|
87816
|
+
}
|
87817
|
+
});
|
87818
|
+
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue?vue&type=script&lang=js&
|
87819
|
+
/* harmony default export */ var dialog_wei_rong_face_auth_dialogvue_type_script_lang_js_ = (wei_rong_face_auth_dialogvue_type_script_lang_js_);
|
87820
|
+
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue
|
87821
|
+
|
87822
|
+
|
87823
|
+
|
87824
|
+
|
87825
|
+
|
87826
|
+
/* normalize component */
|
87827
|
+
;
|
87828
|
+
var wei_rong_face_auth_dialog_component = normalizeComponent(
|
87829
|
+
dialog_wei_rong_face_auth_dialogvue_type_script_lang_js_,
|
87830
|
+
wei_rong_face_auth_dialogvue_type_template_id_d49bc744_scoped_true_render,
|
87831
|
+
wei_rong_face_auth_dialogvue_type_template_id_d49bc744_scoped_true_staticRenderFns,
|
87832
|
+
false,
|
87833
|
+
null,
|
87834
|
+
"d49bc744",
|
87835
|
+
null
|
87836
|
+
|
87837
|
+
)
|
87838
|
+
|
87839
|
+
/* harmony default export */ var wei_rong_face_auth_dialog = (wei_rong_face_auth_dialog_component.exports);
|
87333
87840
|
;// 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/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/id-card-reader-button.vue?vue&type=script&lang=js&
|
87334
87841
|
|
87335
87842
|
|
@@ -87344,6 +87851,8 @@ var default_take_photo_dialog_component = normalizeComponent(
|
|
87344
87851
|
|
87345
87852
|
|
87346
87853
|
|
87854
|
+
|
87855
|
+
|
87347
87856
|
/* harmony default export */ var id_card_reader_buttonvue_type_script_lang_js_ = ({
|
87348
87857
|
name: 'id-card-reader-button',
|
87349
87858
|
props: {
|
@@ -87391,10 +87900,10 @@ var default_take_photo_dialog_component = normalizeComponent(
|
|
87391
87900
|
type: Boolean
|
87392
87901
|
},
|
87393
87902
|
/**
|
87394
|
-
* 读卡器:0-默认读卡器及精伦读卡器;1-丽水一体机;2-沃斯德人证交互终端;3-中正人脸识别;4-华大读卡器;5-良田;6-捷宇信息交互终端;7-太极云软/Z300;8-华视电子读卡器;9
|
87395
|
-
* 人脸识别:0-默认人脸识别(拍照);1-丽水一体机 2-沃斯德人证交互终端;3-中正人脸识别;5-良田;6
|
87396
|
-
* 读取社保卡:2-沃斯德人证交互终端;4
|
87397
|
-
* 签字版:0-有为签字版;1-汉王签字版;2-沃斯德人证交互终端签字;3-捷宇信息交互终端;4-太极云软签字/P-300;
|
87903
|
+
* 读卡器:0-默认读卡器及精伦读卡器;1-丽水一体机;2-沃斯德人证交互终端;3-中正人脸识别;4-华大读卡器;5-良田;6-捷宇信息交互终端;7-太极云软/Z300;8-华视电子读卡器;9-捷宇高拍仪读卡; 10-国产客户端一体机
|
87904
|
+
* 人脸识别:0-默认人脸识别(拍照);1-丽水一体机 2-沃斯德人证交互终端;3-中正人脸识别;5-良田;6-捷宇信息交互终端;10-国产客户端一体机
|
87905
|
+
* 读取社保卡:2-沃斯德人证交互终端;4-华大读卡器;5-国产客户端一体机
|
87906
|
+
* 签字版:0-有为签字版;1-汉王签字版;2-沃斯德人证交互终端签字;3-捷宇信息交互终端;4-太极云软签字/P-300;5:国产客户端签字版
|
87398
87907
|
*/
|
87399
87908
|
readMachineType: {
|
87400
87909
|
default: 0,
|
@@ -87507,6 +88016,10 @@ var default_take_photo_dialog_component = normalizeComponent(
|
|
87507
88016
|
idcardInfo = await JieYueService.idCardReadByScanner();
|
87508
88017
|
this.$emit('click', idcardInfo);
|
87509
88018
|
break;
|
88019
|
+
case 10:
|
88020
|
+
idcardInfo = await WeiRongPluginService.idCardRead();
|
88021
|
+
this.$emit('click', idcardInfo);
|
88022
|
+
break;
|
87510
88023
|
}
|
87511
88024
|
},
|
87512
88025
|
/**
|
@@ -87545,6 +88058,9 @@ var default_take_photo_dialog_component = normalizeComponent(
|
|
87545
88058
|
this.$emit('click', data);
|
87546
88059
|
break;
|
87547
88060
|
}
|
88061
|
+
case 10:
|
88062
|
+
this.openWEIRONGFaceValidateDialog();
|
88063
|
+
break;
|
87548
88064
|
}
|
87549
88065
|
},
|
87550
88066
|
/**
|
@@ -87560,6 +88076,9 @@ var default_take_photo_dialog_component = normalizeComponent(
|
|
87560
88076
|
case 4:
|
87561
88077
|
idcardInfo = await HuzReadService.socialSecurityCardRead();
|
87562
88078
|
break;
|
88079
|
+
case 5:
|
88080
|
+
idcardInfo = await WeiRongPluginService.socialSecurityCardRead();
|
88081
|
+
break;
|
87563
88082
|
}
|
87564
88083
|
this.$emit('click', idcardInfo);
|
87565
88084
|
} catch (e) {
|
@@ -87602,6 +88121,9 @@ var default_take_photo_dialog_component = normalizeComponent(
|
|
87602
88121
|
userSignature = SignName0;
|
87603
88122
|
}
|
87604
88123
|
break;
|
88124
|
+
case 5:
|
88125
|
+
userSignature = await WeiRongPluginService.signNameRead();
|
88126
|
+
break;
|
87605
88127
|
}
|
87606
88128
|
// 返回base64编码内容,无前缀
|
87607
88129
|
this.$emit('click', userSignature);
|
@@ -87633,6 +88155,26 @@ var default_take_photo_dialog_component = normalizeComponent(
|
|
87633
88155
|
parent: this
|
87634
88156
|
}).$mount(modalNode);
|
87635
88157
|
},
|
88158
|
+
openWEIRONGFaceValidateDialog() {
|
88159
|
+
console.log('打开人脸识别弹框');
|
88160
|
+
const modalNode = document.createElement('div');
|
88161
|
+
document.body.appendChild(modalNode);
|
88162
|
+
const vm = new (external_commonjs_vue_commonjs2_vue_root_Vue_default())({
|
88163
|
+
render: h => {
|
88164
|
+
return h(wei_rong_face_auth_dialog, {
|
88165
|
+
props: {},
|
88166
|
+
on: {
|
88167
|
+
close: data => {
|
88168
|
+
this.$emit('click', data);
|
88169
|
+
vm.$destroy();
|
88170
|
+
vm.$el.remove();
|
88171
|
+
}
|
88172
|
+
}
|
88173
|
+
});
|
88174
|
+
},
|
88175
|
+
parent: this
|
88176
|
+
}).$mount(modalNode);
|
88177
|
+
},
|
87636
88178
|
/** 良田拍照*/
|
87637
88179
|
readFacePhotoByELoam() {
|
87638
88180
|
const modalNode = document.createElement('div');
|
@@ -87705,11 +88247,11 @@ var default_take_photo_dialog_component = normalizeComponent(
|
|
87705
88247
|
;
|
87706
88248
|
var id_card_reader_button_component = normalizeComponent(
|
87707
88249
|
src_id_card_reader_buttonvue_type_script_lang_js_,
|
87708
|
-
|
87709
|
-
|
88250
|
+
id_card_reader_buttonvue_type_template_id_19ae37ba_scoped_true_render,
|
88251
|
+
id_card_reader_buttonvue_type_template_id_19ae37ba_scoped_true_staticRenderFns,
|
87710
88252
|
false,
|
87711
88253
|
null,
|
87712
|
-
"
|
88254
|
+
"19ae37ba",
|
87713
88255
|
null
|
87714
88256
|
|
87715
88257
|
)
|