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