unify-external-plugin-platform 0.0.2-38 → 0.0.2-39

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.
@@ -83918,6 +83918,776 @@ scanner_eloam.install = Vue => {
83918
83918
  Vue.component(scanner_eloam.name, scanner_eloam);
83919
83919
  };
83920
83920
  /* harmony default export */ var scanner_scanner_eloam = (scanner_eloam);
83921
+ ;// 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/scanner-camera.vue?vue&type=template&id=00e9072f&scoped=true&
83922
+ var scanner_cameravue_type_template_id_00e9072f_scoped_true_render = function render() {
83923
+ var _vm = this,
83924
+ _c = _vm._self._c;
83925
+ return _c('div', {
83926
+ staticClass: "scanner-camera-container"
83927
+ }, [_vm.openMode === 'dialog' ? _c('div', {
83928
+ staticClass: "scanner-camera-button"
83929
+ }, [_vm.tip ? _c('el-tooltip', {
83930
+ staticClass: "id-card-reader-demo",
83931
+ attrs: {
83932
+ "content": _vm.tip,
83933
+ "placement": "top"
83934
+ }
83935
+ }, [_c('el-button', _vm._b({
83936
+ on: {
83937
+ "click": _vm.openScanDialog
83938
+ }
83939
+ }, 'el-button', {
83940
+ disabled: _vm.disabled,
83941
+ icon: _vm.icon,
83942
+ loading: _vm.loading,
83943
+ plain: _vm.plain,
83944
+ round: _vm.round,
83945
+ size: _vm.size,
83946
+ type: _vm.type,
83947
+ class: _vm._className
83948
+ }, false), [_vm._t("default", function () {
83949
+ return [_vm._v(_vm._s(_vm.label))];
83950
+ })], 2)], 1) : _c('el-button', _vm._b({
83951
+ on: {
83952
+ "click": _vm.openScanDialog
83953
+ }
83954
+ }, 'el-button', {
83955
+ disabled: _vm.disabled,
83956
+ icon: _vm.icon,
83957
+ loading: _vm.loading,
83958
+ plain: _vm.plain,
83959
+ round: _vm.round,
83960
+ size: _vm.size,
83961
+ type: _vm.type,
83962
+ class: _vm._className
83963
+ }, false), [_vm._t("default", function () {
83964
+ return [_vm._v(_vm._s(_vm.label))];
83965
+ })], 2), _c('el-dialog', {
83966
+ staticClass: "scanner-camera-dialog",
83967
+ attrs: {
83968
+ "title": "影像扫描",
83969
+ "visible": _vm.dialogVisible,
83970
+ "width": "60%"
83971
+ },
83972
+ on: {
83973
+ "update:visible": function ($event) {
83974
+ _vm.dialogVisible = $event;
83975
+ }
83976
+ }
83977
+ }, [_vm.dialogVisible ? _c('scanner-camera-component', {
83978
+ attrs: {
83979
+ "machine-type": _vm.machineType
83980
+ },
83981
+ on: {
83982
+ "send-scanner-result": _vm.setScannerResult
83983
+ },
83984
+ scopedSlots: _vm._u([{
83985
+ key: "action",
83986
+ fn: function () {
83987
+ return [_vm._t("right-action")];
83988
+ },
83989
+ proxy: true
83990
+ }], null, true)
83991
+ }) : _vm._e(), _c('span', {
83992
+ staticClass: "dialog-footer",
83993
+ attrs: {
83994
+ "slot": "footer"
83995
+ },
83996
+ slot: "footer"
83997
+ }, [_c('el-button', {
83998
+ attrs: {
83999
+ "size": "small"
84000
+ },
84001
+ on: {
84002
+ "click": function ($event) {
84003
+ _vm.dialogVisible = false;
84004
+ }
84005
+ }
84006
+ }, [_vm._v("取 消")]), _c('el-button', {
84007
+ attrs: {
84008
+ "size": "small",
84009
+ "type": "primary"
84010
+ },
84011
+ on: {
84012
+ "click": _vm.sendScannerResult
84013
+ }
84014
+ }, [_vm._v("确 定")])], 1)], 1)], 1) : _c('scanner-camera-component', {
84015
+ attrs: {
84016
+ "machine-type": _vm.machineType
84017
+ },
84018
+ on: {
84019
+ "send-scanner-result": _vm.setScannerResult
84020
+ },
84021
+ scopedSlots: _vm._u([{
84022
+ key: "action",
84023
+ fn: function () {
84024
+ return [_vm._t("right-action")];
84025
+ },
84026
+ proxy: true
84027
+ }], null, true)
84028
+ })], 1);
84029
+ };
84030
+ var scanner_cameravue_type_template_id_00e9072f_scoped_true_staticRenderFns = [];
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=5be6f09e&scoped=true&
84033
+ var scanner_camera_componentvue_type_template_id_5be6f09e_scoped_true_render = function render() {
84034
+ var _vm = this,
84035
+ _c = _vm._self._c;
84036
+ return _c('div', {
84037
+ staticClass: "scanner-high-camera-component"
84038
+ }, [_c('div', {
84039
+ staticClass: "scanner-result-content"
84040
+ }, [_c('div', {
84041
+ staticClass: "content-main flex-1"
84042
+ }, [_vm.loadSuccess ? _c('div', {
84043
+ staticClass: "load-success"
84044
+ }, [_c('img', {
84045
+ staticStyle: {
84046
+ "width": "800px",
84047
+ "height": "600px"
84048
+ },
84049
+ attrs: {
84050
+ "id": "photo",
84051
+ "src": _vm.scannerVideoSrc
84052
+ }
84053
+ })]) : _c('div', {
84054
+ staticClass: "load-error"
84055
+ }, [_c('i', {
84056
+ staticClass: "el-icon-s-cooperation"
84057
+ }), _c('p', [_vm._v("请先安装插件")])])]), _c('div', {
84058
+ staticClass: "handle-action"
84059
+ }, [_c('el-select', {
84060
+ staticClass: "select",
84061
+ attrs: {
84062
+ "size": "small"
84063
+ },
84064
+ on: {
84065
+ "change": _vm.selectChange
84066
+ },
84067
+ model: {
84068
+ value: _vm.camera,
84069
+ callback: function ($$v) {
84070
+ _vm.camera = $$v;
84071
+ },
84072
+ expression: "camera"
84073
+ }
84074
+ }, _vm._l(_vm.cameras, function (item) {
84075
+ return _c('el-option', {
84076
+ key: item.value,
84077
+ attrs: {
84078
+ "label": item.name,
84079
+ "value": item.value
84080
+ }
84081
+ });
84082
+ }), 1), _vm._l(_vm.buttonList, function (item) {
84083
+ return [_c('el-button', {
84084
+ key: item.name,
84085
+ attrs: {
84086
+ "type": "primary",
84087
+ "size": "small"
84088
+ },
84089
+ on: {
84090
+ "click": function ($event) {
84091
+ return _vm.handleAction(item.name);
84092
+ }
84093
+ }
84094
+ }, [_vm._v(_vm._s(item.label))]), _vm._t("action")];
84095
+ })], 2)])]);
84096
+ };
84097
+ var scanner_camera_componentvue_type_template_id_5be6f09e_scoped_true_staticRenderFns = [];
84098
+
84099
+ ;// CONCATENATED MODULE: ./packages/utils/custom-axios.ts
84100
+ /**
84101
+ * @author: lvcy
84102
+ * @date: 2023-06-21
84103
+ * @description:custom-axios
84104
+ */
84105
+ class custom_axios_CustomAxios {
84106
+ static startConnect(method, url, data = {}) {
84107
+ return new Promise((resolve, reject) => {
84108
+ let xhr = new XMLHttpRequest();
84109
+ method = method.toUpperCase();
84110
+ if (method == 'GET') {
84111
+ let param = ''; //数据拼接字符串
84112
+ Object.keys(data).forEach(key => {
84113
+ param += `${key}=${data[key]}&`;
84114
+ });
84115
+ param = param.substring(0, param.lastIndexOf('&'));
84116
+ url = url + '?' + param;
84117
+ } else if (method == 'POST') {} else {
84118
+ reject('error method: Currently only supported GET or POST method!');
84119
+ }
84120
+ xhr.open(method, url, true);
84121
+ xhr.setRequestHeader('Accept', 'application/json');
84122
+ if (method === 'GET') {
84123
+ xhr.send();
84124
+ } else {
84125
+ xhr.send(JSON.stringify(data));
84126
+ }
84127
+ xhr.onreadystatechange = function () {
84128
+ if (this.readyState !== 4) {
84129
+ return;
84130
+ }
84131
+ if (this.status === 200) {
84132
+ let obj = this.response;
84133
+ if (typeof obj !== 'object') {
84134
+ obj = JSON.parse(obj);
84135
+ }
84136
+ resolve(obj);
84137
+ } else {
84138
+ reject(xhr);
84139
+ }
84140
+ };
84141
+ });
84142
+ }
84143
+ static async get(url) {
84144
+ let res = await custom_axios_CustomAxios.startConnect('GET', url);
84145
+ return res;
84146
+ }
84147
+ static async post(url, data) {
84148
+ let res = await custom_axios_CustomAxios.startConnect('POST', url, data);
84149
+ return res;
84150
+ }
84151
+ }
84152
+ ;// CONCATENATED MODULE: ./packages/service/external-plugins/eloam-plugin.service.ts
84153
+
84154
+ /**
84155
+ * @author: lvcy
84156
+ * @date: 2023-06-21
84157
+ * @description:良田高拍仪
84158
+ */
84159
+
84160
+ var eloam_plugin_service_ELoamMethodCode;
84161
+ (function (ELoamMethodCode) {
84162
+ /** 扫描-主摄像头 */
84163
+ ELoamMethodCode["ScannerMainCamera_Base64"] = "ScannerMainCamera_Base64";
84164
+ /** 扫描-副摄像头 */
84165
+ ELoamMethodCode["ScannerSecondaryCamera_Base64"] = "ScannerSecondaryCamera_Base64";
84166
+ /** 读取二代身份证 */
84167
+ ELoamMethodCode["ReadIDCard_Base64"] = "ReadIDCard_Base64";
84168
+ })(eloam_plugin_service_ELoamMethodCode || (eloam_plugin_service_ELoamMethodCode = {}));
84169
+ const eloam_plugin_service_ELoamMethodDesc = {
84170
+ [eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64]: '扫描',
84171
+ [eloam_plugin_service_ELoamMethodCode.ScannerSecondaryCamera_Base64]: '拍照',
84172
+ [eloam_plugin_service_ELoamMethodCode.ReadIDCard_Base64]: '读取二代身份证'
84173
+ };
84174
+ class eloam_plugin_service_ELoamPassService {
84175
+ /** 主摄像头地址 */
84176
+ static get mainCameraUrl() {
84177
+ return this.baseServiceUrl + '/video=stream&camidx=0';
84178
+ }
84179
+ /** 副摄像头地址 */
84180
+ static get secondaryCameraUrl() {
84181
+ return this.baseServiceUrl + '/video=stream&camidx=1';
84182
+ }
84183
+ static async read(method) {
84184
+ let param = {},
84185
+ url = '';
84186
+ switch (method) {
84187
+ case eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64:
84188
+ // rotate: 旋转角度;deskew:纠偏,主摄像头1,副摄像头0 camidx:主摄像头0,副摄像头1;ColorMode:quality
84189
+ url = this.baseServiceUrl + '/video=grabimage';
84190
+ param = {
84191
+ filepath: "base64",
84192
+ rotate: "0",
84193
+ deskew: "1",
84194
+ camidx: "0",
84195
+ ColorMode: "0",
84196
+ quality: "0"
84197
+ };
84198
+ break;
84199
+ case eloam_plugin_service_ELoamMethodCode.ScannerSecondaryCamera_Base64:
84200
+ // rotate: 旋转角度,;deskew:纠偏,主摄像头1,副摄像头0 camidx:主摄像头0,副摄像头1;ColorMode:quality
84201
+ url = this.baseServiceUrl + '/video=grabimage';
84202
+ param = {
84203
+ filepath: "base64",
84204
+ rotate: "0",
84205
+ deskew: "0",
84206
+ camidx: "1",
84207
+ ColorMode: "0",
84208
+ quality: "0"
84209
+ };
84210
+ break;
84211
+ case eloam_plugin_service_ELoamMethodCode.ReadIDCard_Base64:
84212
+ url = this.baseServiceUrl + '/card=idcard';
84213
+ break;
84214
+ }
84215
+ let res = await custom_axios_CustomAxios.post(url, param);
84216
+ return res;
84217
+ }
84218
+ /** 主摄像头拍照 */
84219
+ static async scanByMainCamera() {
84220
+ const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64);
84221
+ return res.photoBase64;
84222
+ }
84223
+ /** 副摄像头拍照 */
84224
+ static async scanBySecondaryCamera() {
84225
+ const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerSecondaryCamera_Base64);
84226
+ return res.photoBase64;
84227
+ }
84228
+ static async scanByCamera(type) {
84229
+ switch (type) {
84230
+ case "main":
84231
+ return this.scanByMainCamera();
84232
+ case 'vice':
84233
+ return this.scanBySecondaryCamera();
84234
+ }
84235
+ }
84236
+ /** 读取身份证 */
84237
+ static async idCardRead() {
84238
+ const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ReadIDCard_Base64);
84239
+ let {
84240
+ name,
84241
+ sex,
84242
+ birthday,
84243
+ address,
84244
+ cardID,
84245
+ nationCode,
84246
+ photoBase64,
84247
+ issueOrgan,
84248
+ validStart,
84249
+ validEnd
84250
+ } = res.IDCardInfo;
84251
+ const IDCardData = {
84252
+ info: {
84253
+ name,
84254
+ sex,
84255
+ birthday: birthday.replace('-', '').replace('-', ''),
84256
+ address,
84257
+ cardId: cardID,
84258
+ nation: nationCode,
84259
+ police: issueOrgan,
84260
+ validStart,
84261
+ validEnd
84262
+ },
84263
+ headImage: photoBase64
84264
+ };
84265
+ return IDCardData;
84266
+ }
84267
+ }
84268
+ _defineProperty(eloam_plugin_service_ELoamPassService, "baseServiceUrl", 'http://127.0.0.1:38088');
84269
+ ;// CONCATENATED MODULE: ./packages/model/common-message.ts
84270
+
84271
+ /**
84272
+ * @author: lvcy
84273
+ * @date: 2023-07-25
84274
+ * @description:common-message
84275
+ */
84276
+ const SCANNER_CAMERA_REFRESH_PHOTO_EVENT = 'scanner-camera-refresh-photo-event';
84277
+ class ScannerCameraRefreshPhotoEvent extends Event {
84278
+ constructor(url) {
84279
+ super(SCANNER_CAMERA_REFRESH_PHOTO_EVENT);
84280
+ _defineProperty(this, "scannerResultUrl", '');
84281
+ this.scannerResultUrl = url;
84282
+ }
84283
+ }
84284
+ ;// CONCATENATED MODULE: ./packages/service/external-plugins/jie-yu-plugin.service.ts
84285
+
84286
+
84287
+
84288
+ /**
84289
+ * @author: lvcy
84290
+ * @date: 2023-07-24
84291
+ * @description:捷宇高拍仪
84292
+ */
84293
+ var JieYuMethodCode;
84294
+ (function (JieYuMethodCode) {
84295
+ /** 扫描-主摄像头 */
84296
+ JieYuMethodCode["ScannerMainCamera_Base64"] = "vSetResolution(8)";
84297
+ /** 扫描-副摄像头 */
84298
+ JieYuMethodCode["ScannerSecondaryCamera_Base64"] = "bStartPlay2";
84299
+ JieYuMethodCode["TakePhoto_Base64"] = "bSaveJPG(D:\\,Photo)";
84300
+ })(JieYuMethodCode || (JieYuMethodCode = {}));
84301
+ const JieYuMethodDesc = {
84302
+ [JieYuMethodCode.ScannerMainCamera_Base64]: '扫描',
84303
+ [JieYuMethodCode.ScannerSecondaryCamera_Base64]: '拍照'
84304
+ };
84305
+ class JieYueService {
84306
+ static startConnect() {
84307
+ if (this.ws && this.ws.readyState === WebSocket.CONNECTING) {
84308
+ return this;
84309
+ }
84310
+ const ws = new WebSocket(this.scannerCameraUrl);
84311
+ let resolved;
84312
+ const onConnect = new Promise(resolve => {
84313
+ resolved = resolve;
84314
+ });
84315
+ ws.onopen = () => {
84316
+ resolved(true);
84317
+ };
84318
+ ws.onmessage = event => {
84319
+ this.handleMessage(event);
84320
+ };
84321
+ ws.onclose = () => this.handleClose();
84322
+ ws.onerror = () => this.handleError();
84323
+ this.ws = ws;
84324
+ return onConnect;
84325
+ }
84326
+ static handleError() {
84327
+ for (const type in this.requestStore) {
84328
+ this.requestStore.forEach(({
84329
+ reject
84330
+ }) => {
84331
+ reject('handleError');
84332
+ });
84333
+ }
84334
+ throw Error('捷宇高拍仪设备功能加载失败');
84335
+ }
84336
+ static handleClose() {
84337
+ for (const type in this.requestStore) {
84338
+ this.requestStore.forEach(({
84339
+ reject
84340
+ }) => {
84341
+ reject('close');
84342
+ });
84343
+ }
84344
+ }
84345
+ static handleMessage(msg) {
84346
+ let data = msg.data;
84347
+ if (!data.startsWith('BarCode') && !data.startsWith('Begin')) {
84348
+ const event = new ScannerCameraRefreshPhotoEvent(data);
84349
+ return window.dispatchEvent(event);
84350
+ }
84351
+ //
84352
+ //
84353
+ // this.requestStore.forEach(({ resolve }: PromiseStore) => {
84354
+ // resolve(data)
84355
+ // });
84356
+ // this.requestStore = [];
84357
+ }
84358
+ /**
84359
+ * 发送请求
84360
+ */
84361
+ static async read(type) {
84362
+ await this.startConnect();
84363
+ if (this.ws.readyState === 1) {
84364
+ let method = '';
84365
+ switch (type) {
84366
+ case 'main':
84367
+ this.ws.send('bStartPlay()');
84368
+ method = JieYuMethodCode.ScannerMainCamera_Base64;
84369
+ break;
84370
+ case 'vice':
84371
+ method = JieYuMethodCode.ScannerSecondaryCamera_Base64;
84372
+ break;
84373
+ case 'takePhoto':
84374
+ method = JieYuMethodCode.TakePhoto_Base64;
84375
+ }
84376
+ this.ws.send(method);
84377
+ return new Promise((resolve, reject) => {
84378
+ if (!this.requestStore) {
84379
+ this.requestStore = [];
84380
+ }
84381
+ this.requestStore.push({
84382
+ resolve,
84383
+ reject
84384
+ });
84385
+ });
84386
+ } else {
84387
+ throw Error('设备未准备完成');
84388
+ }
84389
+ }
84390
+ static async turnOnTheCamera(type) {
84391
+ if (this.ws) this.ws.close();
84392
+ await JieYueService.read(type);
84393
+ }
84394
+ static async scanByCamera() {
84395
+ console.log(this.ws);
84396
+ if (this.ws) this.ws.close();
84397
+ await JieYueService.read('takePhoto');
84398
+ }
84399
+ }
84400
+ _defineProperty(JieYueService, "scannerCameraUrl", 'ws://127.0.0.1:1818');
84401
+ _defineProperty(JieYueService, "ws", void 0);
84402
+ _defineProperty(JieYueService, "requestStore", []);
84403
+ ;// 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&
84404
+
84405
+
84406
+
84407
+ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/jpg;base64,';
84408
+ /* harmony default export */ var scanner_camera_componentvue_type_script_lang_js_ = ({
84409
+ name: "scanner-camera-component",
84410
+ props: {
84411
+ /**
84412
+ * 0-捷宇;5-良田
84413
+ */
84414
+ machineType: {
84415
+ //
84416
+ default: 0,
84417
+ type: Number
84418
+ }
84419
+ },
84420
+ data: () => {
84421
+ return {
84422
+ scannerVideoSrc: '',
84423
+ scannerResultSrc: '',
84424
+ loadSuccess: true,
84425
+ camera: 0,
84426
+ cameras: [{
84427
+ name: '文档',
84428
+ value: 0
84429
+ }, {
84430
+ name: '照片',
84431
+ value: 1
84432
+ }],
84433
+ buttonList: [{
84434
+ label: '拍照',
84435
+ name: 'take-pictures'
84436
+ }]
84437
+ };
84438
+ },
84439
+ watch: {
84440
+ 'machineType': function () {
84441
+ let handleName = this.camera === 1 ? 'start-vice' : 'start-main';
84442
+ this.handleAction(handleName);
84443
+ }
84444
+ },
84445
+ created() {
84446
+ this.handleAction('start-main');
84447
+ window.addEventListener(SCANNER_CAMERA_REFRESH_PHOTO_EVENT, message => {
84448
+ if (message.type === SCANNER_CAMERA_REFRESH_PHOTO_EVENT) {
84449
+ this.scannerVideoSrc = `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${message.scannerResultUrl}`;
84450
+ }
84451
+ });
84452
+ },
84453
+ methods: {
84454
+ /**
84455
+ * 切换扫描、拍照
84456
+ * @param val
84457
+ */
84458
+ selectChange(val) {
84459
+ let handleName = val === 1 ? 'start-vice' : 'start-main';
84460
+ this.handleAction(handleName);
84461
+ },
84462
+ /**
84463
+ * 拍照
84464
+ */
84465
+ async takePictures() {
84466
+ switch (this.machineType) {
84467
+ case 0:
84468
+ {
84469
+ await JieYueService.scanByCamera();
84470
+ console.log('拍照');
84471
+ this.$emit('send-scanner-result', this.scannerVideoSrc);
84472
+ }
84473
+ break;
84474
+ case 5:
84475
+ {
84476
+ let type = this.camera === 0 ? 'main' : 'vice';
84477
+ const res = await eloam_plugin_service_ELoamPassService.scanByCamera(type);
84478
+ this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res}`);
84479
+ }
84480
+ }
84481
+ },
84482
+ /**
84483
+ * 主摄像头
84484
+ */
84485
+ async handleStartMain() {
84486
+ switch (this.machineType) {
84487
+ case 0:
84488
+ await JieYueService.turnOnTheCamera('main');
84489
+ break;
84490
+ case 5:
84491
+ // 良田
84492
+ this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
84493
+ break;
84494
+ }
84495
+ },
84496
+ /**
84497
+ * 副摄像头
84498
+ */
84499
+ async handleStartVice() {
84500
+ switch (this.machineType) {
84501
+ case 0:
84502
+ await JieYueService.turnOnTheCamera('vice');
84503
+ break;
84504
+ case 5:
84505
+ // 良田
84506
+ this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.secondaryCameraUrl;
84507
+ break;
84508
+ }
84509
+ },
84510
+ handleAction(name) {
84511
+ switch (name) {
84512
+ case 'start-main':
84513
+ // 主摄像头
84514
+ this.handleStartMain();
84515
+ break;
84516
+ case 'start-vice':
84517
+ // 副摄像头
84518
+ this.handleStartVice();
84519
+ break;
84520
+ case 'take-pictures':
84521
+ // 拍照
84522
+ this.takePictures();
84523
+ break;
84524
+ }
84525
+ }
84526
+ }
84527
+ });
84528
+ ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=script&lang=js&
84529
+ /* harmony default export */ var component_scanner_camera_componentvue_type_script_lang_js_ = (scanner_camera_componentvue_type_script_lang_js_);
84530
+ ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue
84531
+
84532
+
84533
+
84534
+
84535
+
84536
+ /* normalize component */
84537
+ ;
84538
+ var scanner_camera_component_component = normalizeComponent(
84539
+ component_scanner_camera_componentvue_type_script_lang_js_,
84540
+ scanner_camera_componentvue_type_template_id_5be6f09e_scoped_true_render,
84541
+ scanner_camera_componentvue_type_template_id_5be6f09e_scoped_true_staticRenderFns,
84542
+ false,
84543
+ null,
84544
+ "5be6f09e",
84545
+ null
84546
+
84547
+ )
84548
+
84549
+ /* harmony default export */ var scanner_camera_component = (scanner_camera_component_component.exports);
84550
+ ;// 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/scanner-camera.vue?vue&type=script&lang=js&
84551
+
84552
+
84553
+ /* harmony default export */ var scanner_cameravue_type_script_lang_js_ = ({
84554
+ name: "scanner-camera",
84555
+ components: {
84556
+ ScannerCameraComponent: scanner_camera_component
84557
+ },
84558
+ props: {
84559
+ /**
84560
+ * 0-捷宇;5-良田
84561
+ */
84562
+ machineType: {
84563
+ //
84564
+ default: 0,
84565
+ type: Number
84566
+ },
84567
+ openMode: {
84568
+ default: '',
84569
+ type: String
84570
+ },
84571
+ label: {
84572
+ default: '',
84573
+ type: String
84574
+ },
84575
+ tip: {
84576
+ default: '',
84577
+ type: String
84578
+ },
84579
+ className: {
84580
+ default: '',
84581
+ type: String
84582
+ },
84583
+ size: {
84584
+ default: '',
84585
+ type: String
84586
+ },
84587
+ type: {
84588
+ default: '',
84589
+ type: String
84590
+ },
84591
+ plain: {
84592
+ default: false,
84593
+ type: Boolean
84594
+ },
84595
+ round: {
84596
+ default: false,
84597
+ type: Boolean
84598
+ },
84599
+ loading: {
84600
+ default: false,
84601
+ type: Boolean
84602
+ },
84603
+ icon: {
84604
+ default: '',
84605
+ type: String
84606
+ },
84607
+ disabled: {
84608
+ default: false,
84609
+ type: Boolean
84610
+ }
84611
+ },
84612
+ data: () => {
84613
+ return {
84614
+ dialogVisible: false,
84615
+ scannerResult: ''
84616
+ };
84617
+ },
84618
+ computed: {
84619
+ _className() {
84620
+ const classBase = ['z-button'];
84621
+ if (this.type === 'text') {
84622
+ classBase.push('i-font-size');
84623
+ }
84624
+ if (!this.className) {
84625
+ return classBase;
84626
+ } else if (typeof this.className === 'string') {
84627
+ classBase.push(this.className);
84628
+ } else {
84629
+ classBase.push(...this.className);
84630
+ }
84631
+ return classBase;
84632
+ }
84633
+ },
84634
+ methods: {
84635
+ openScanDialog() {
84636
+ this.dialogVisible = true;
84637
+ },
84638
+ setScannerResult(src) {
84639
+ this.scannerResult = src;
84640
+ if (this.openMode !== 'dialog') {
84641
+ this.$emit('send-scanner-result', this.scannerResult);
84642
+ }
84643
+ },
84644
+ sendScannerResult() {
84645
+ if (this.scannerResult) {
84646
+ this.$emit('send-scanner-result', this.scannerResult);
84647
+ this.dialogVisible = false;
84648
+ }
84649
+ }
84650
+ }
84651
+ });
84652
+ ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/scanner-camera.vue?vue&type=script&lang=js&
84653
+ /* harmony default export */ var src_scanner_cameravue_type_script_lang_js_ = (scanner_cameravue_type_script_lang_js_);
84654
+ ;// 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/scanner-camera.vue?vue&type=style&index=0&id=00e9072f&prod&scoped=true&lang=scss&
84655
+ // extracted by mini-css-extract-plugin
84656
+
84657
+ ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/scanner-camera.vue?vue&type=style&index=0&id=00e9072f&prod&scoped=true&lang=scss&
84658
+
84659
+ ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/scanner-camera.vue
84660
+
84661
+
84662
+
84663
+ ;
84664
+
84665
+
84666
+ /* normalize component */
84667
+
84668
+ var src_scanner_camera_component = normalizeComponent(
84669
+ src_scanner_cameravue_type_script_lang_js_,
84670
+ scanner_cameravue_type_template_id_00e9072f_scoped_true_render,
84671
+ scanner_cameravue_type_template_id_00e9072f_scoped_true_staticRenderFns,
84672
+ false,
84673
+ null,
84674
+ "00e9072f",
84675
+ null
84676
+
84677
+ )
84678
+
84679
+ /* harmony default export */ var scanner_camera = (src_scanner_camera_component.exports);
84680
+ ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/index.js
84681
+ /**
84682
+ * @author: lvcy
84683
+ * @date: 2023-07-24
84684
+ * @description:index
84685
+ */
84686
+
84687
+ scanner_camera.install = Vue => {
84688
+ Vue.component(scanner_camera.name, scanner_camera);
84689
+ };
84690
+ /* harmony default export */ var scanner_scanner_camera = (scanner_camera);
83921
84691
  ;// 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-eloam/src/id-card-reader-eloam.vue?vue&type=template&id=5b7ce781&scoped=true&
83922
84692
  var id_card_reader_eloamvue_type_template_id_5b7ce781_scoped_true_render = function render() {
83923
84693
  var _vm = this,
@@ -84066,8 +84836,8 @@ id_card_reader_eloam.install = Vue => {
84066
84836
  Vue.component(id_card_reader_eloam.name, id_card_reader_eloam);
84067
84837
  };
84068
84838
  /* harmony default export */ var id_card_reader_id_card_reader_eloam = (id_card_reader_eloam);
84069
- ;// 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=7cd25906&scoped=true&
84070
- var id_card_reader_buttonvue_type_template_id_7cd25906_scoped_true_render = function render() {
84839
+ ;// 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=6bdb0354&scoped=true&
84840
+ var id_card_reader_buttonvue_type_template_id_6bdb0354_scoped_true_render = function render() {
84071
84841
  var _vm = this,
84072
84842
  _c = _vm._self._c;
84073
84843
  return _vm.tip ? _c('el-tooltip', {
@@ -84126,7 +84896,7 @@ var id_card_reader_buttonvue_type_template_id_7cd25906_scoped_true_render = func
84126
84896
  return [_vm._v(_vm._s(_vm.label))];
84127
84897
  })], 2);
84128
84898
  };
84129
- var id_card_reader_buttonvue_type_template_id_7cd25906_scoped_true_staticRenderFns = [];
84899
+ var id_card_reader_buttonvue_type_template_id_6bdb0354_scoped_true_staticRenderFns = [];
84130
84900
 
84131
84901
  ;// CONCATENATED MODULE: ./packages/service/external-plugins/default-plugin-socket.service.ts
84132
84902
 
@@ -85666,6 +86436,9 @@ var eloam_take_photo_dialog_component = normalizeComponent(
85666
86436
  )
85667
86437
 
85668
86438
  /* harmony default export */ var eloam_take_photo_dialog = (eloam_take_photo_dialog_component.exports);
86439
+ // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
86440
+ var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(7203);
86441
+ var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
85669
86442
  ;// 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&
85670
86443
 
85671
86444
 
@@ -85676,6 +86449,7 @@ var eloam_take_photo_dialog_component = normalizeComponent(
85676
86449
 
85677
86450
 
85678
86451
 
86452
+
85679
86453
  /* harmony default export */ var id_card_reader_buttonvue_type_script_lang_js_ = ({
85680
86454
  name: 'id-card-reader-button',
85681
86455
  props: {
@@ -85857,7 +86631,7 @@ var eloam_take_photo_dialog_component = normalizeComponent(
85857
86631
  */
85858
86632
  async signEvent() {
85859
86633
  let userSignature = '';
85860
- switch (this.signFlag) {
86634
+ switch (this.readMachineType) {
85861
86635
  case 0:
85862
86636
  userSignature = await SignReadService.read();
85863
86637
  break;
@@ -85876,7 +86650,7 @@ var eloam_take_photo_dialog_component = normalizeComponent(
85876
86650
  debugger;
85877
86651
  const modalNode = document.createElement('div');
85878
86652
  document.body.appendChild(modalNode);
85879
- const vm = new Vue({
86653
+ const vm = new (external_commonjs_vue_commonjs2_vue_root_Vue_default())({
85880
86654
  render: h => {
85881
86655
  return h(face_auth_dialog, {
85882
86656
  props: {},
@@ -85903,7 +86677,7 @@ var eloam_take_photo_dialog_component = normalizeComponent(
85903
86677
  readFacePhotoByELoam() {
85904
86678
  const modalNode = document.createElement('div');
85905
86679
  document.body.appendChild(modalNode);
85906
- const vm = new Vue({
86680
+ const vm = new (external_commonjs_vue_commonjs2_vue_root_Vue_default())({
85907
86681
  render: h => {
85908
86682
  return h(eloam_take_photo_dialog, {
85909
86683
  props: {},
@@ -85948,11 +86722,11 @@ var eloam_take_photo_dialog_component = normalizeComponent(
85948
86722
  ;
85949
86723
  var id_card_reader_button_component = normalizeComponent(
85950
86724
  src_id_card_reader_buttonvue_type_script_lang_js_,
85951
- id_card_reader_buttonvue_type_template_id_7cd25906_scoped_true_render,
85952
- id_card_reader_buttonvue_type_template_id_7cd25906_scoped_true_staticRenderFns,
86725
+ id_card_reader_buttonvue_type_template_id_6bdb0354_scoped_true_render,
86726
+ id_card_reader_buttonvue_type_template_id_6bdb0354_scoped_true_staticRenderFns,
85953
86727
  false,
85954
86728
  null,
85955
- "7cd25906",
86729
+ "6bdb0354",
85956
86730
  null
85957
86731
 
85958
86732
  )
@@ -85976,6 +86750,7 @@ id_card_reader_button.install = Vue => {
85976
86750
 
85977
86751
 
85978
86752
 
86753
+
85979
86754
  // import {
85980
86755
  // Button,
85981
86756
  // Tooltip,
@@ -85991,7 +86766,7 @@ id_card_reader_button.install = Vue => {
85991
86766
  // Dialog
85992
86767
  // ]
85993
86768
  // 组件列表
85994
- const components = [packages_zs_empty, id_card_reader_id_card_reader_demo, scanner_scanner_high_camera_jieyu, scanner_scanner_eloam, id_card_reader_id_card_reader_eloam, id_card_reader_id_card_reader_button];
86769
+ const components = [packages_zs_empty, id_card_reader_id_card_reader_demo, id_card_reader_id_card_reader_eloam, id_card_reader_id_card_reader_button, scanner_scanner_high_camera_jieyu, scanner_scanner_eloam, scanner_scanner_camera];
85995
86770
 
85996
86771
  // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,那么所有的组件都会被注册
85997
86772
  const install = Vue => {