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