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

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,780 @@ 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=1d5c68b5&scoped=true&
84023
+ var scanner_camera_componentvue_type_template_id_1d5c68b5_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_1d5c68b5_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
+ if (this.ws) this.ws.close();
84386
+ await JieYueService.read('takePhoto');
84387
+ }
84388
+ }
84389
+ _defineProperty(JieYueService, "scannerCameraUrl", 'ws://127.0.0.1:1818');
84390
+ _defineProperty(JieYueService, "ws", void 0);
84391
+ _defineProperty(JieYueService, "requestStore", []);
84392
+ ;// 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&
84393
+
84394
+
84395
+
84396
+ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/jpg;base64,';
84397
+ /* harmony default export */ var scanner_camera_componentvue_type_script_lang_js_ = ({
84398
+ name: "scanner-camera-component",
84399
+ props: {
84400
+ /**
84401
+ * 0-捷宇;5-良田
84402
+ */
84403
+ machineType: {
84404
+ //
84405
+ default: 0,
84406
+ type: Number
84407
+ }
84408
+ },
84409
+ data: () => {
84410
+ return {
84411
+ scannerVideoSrc: '',
84412
+ scannerResultSrc: '',
84413
+ loadSuccess: true,
84414
+ camera: 0,
84415
+ cameras: [{
84416
+ name: '文档',
84417
+ value: 0
84418
+ }, {
84419
+ name: '照片',
84420
+ value: 1
84421
+ }],
84422
+ buttonList: [{
84423
+ label: '拍照',
84424
+ name: 'take-pictures'
84425
+ }]
84426
+ };
84427
+ },
84428
+ watch: {
84429
+ 'machineType': function () {
84430
+ let handleName = this.camera === 1 ? 'start-vice' : 'start-main';
84431
+ this.handleAction(handleName);
84432
+ }
84433
+ },
84434
+ created() {
84435
+ this.handleAction('start-main');
84436
+ window.addEventListener(SCANNER_CAMERA_REFRESH_PHOTO_EVENT, message => {
84437
+ if (message.type === SCANNER_CAMERA_REFRESH_PHOTO_EVENT) {
84438
+ this.scannerVideoSrc = `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${message.scannerResultUrl}`;
84439
+ }
84440
+ });
84441
+ },
84442
+ methods: {
84443
+ /**
84444
+ * 切换扫描、拍照
84445
+ * @param val
84446
+ */
84447
+ selectChange(val) {
84448
+ let handleName = val === 1 ? 'start-vice' : 'start-main';
84449
+ this.handleAction(handleName);
84450
+ },
84451
+ /**
84452
+ * 拍照
84453
+ */
84454
+ async takePictures() {
84455
+ switch (this.machineType) {
84456
+ case 0:
84457
+ {
84458
+ // await JieYueService.scanByCamera();
84459
+ this.$emit('send-scanner-result', this.scannerVideoSrc);
84460
+ }
84461
+ break;
84462
+ case 5:
84463
+ {
84464
+ let type = this.camera === 0 ? 'main' : 'vice';
84465
+ const res = await eloam_plugin_service_ELoamPassService.scanByCamera(type);
84466
+ this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res}`);
84467
+ }
84468
+ }
84469
+ },
84470
+ /**
84471
+ * 主摄像头
84472
+ */
84473
+ async handleStartMain() {
84474
+ switch (this.machineType) {
84475
+ case 0:
84476
+ await JieYueService.turnOnTheCamera('main');
84477
+ break;
84478
+ case 5:
84479
+ // 良田
84480
+ this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
84481
+ break;
84482
+ }
84483
+ },
84484
+ /**
84485
+ * 副摄像头
84486
+ */
84487
+ async handleStartVice() {
84488
+ switch (this.machineType) {
84489
+ case 0:
84490
+ await JieYueService.turnOnTheCamera('vice');
84491
+ break;
84492
+ case 5:
84493
+ // 良田
84494
+ this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.secondaryCameraUrl;
84495
+ break;
84496
+ }
84497
+ },
84498
+ handleAction(name) {
84499
+ switch (name) {
84500
+ case 'start-main':
84501
+ // 主摄像头
84502
+ this.handleStartMain();
84503
+ break;
84504
+ case 'start-vice':
84505
+ // 副摄像头
84506
+ this.handleStartVice();
84507
+ break;
84508
+ case 'take-pictures':
84509
+ // 拍照
84510
+ this.takePictures();
84511
+ break;
84512
+ }
84513
+ }
84514
+ }
84515
+ });
84516
+ ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=script&lang=js&
84517
+ /* harmony default export */ var component_scanner_camera_componentvue_type_script_lang_js_ = (scanner_camera_componentvue_type_script_lang_js_);
84518
+ ;// 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=1d5c68b5&prod&scoped=true&lang=scss&
84519
+ // extracted by mini-css-extract-plugin
84520
+
84521
+ ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=1d5c68b5&prod&scoped=true&lang=scss&
84522
+
84523
+ ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue
84524
+
84525
+
84526
+
84527
+ ;
84528
+
84529
+
84530
+ /* normalize component */
84531
+
84532
+ var scanner_camera_component_component = normalizeComponent(
84533
+ component_scanner_camera_componentvue_type_script_lang_js_,
84534
+ scanner_camera_componentvue_type_template_id_1d5c68b5_scoped_true_render,
84535
+ scanner_camera_componentvue_type_template_id_1d5c68b5_scoped_true_staticRenderFns,
84536
+ false,
84537
+ null,
84538
+ "1d5c68b5",
84539
+ null
84540
+
84541
+ )
84542
+
84543
+ /* harmony default export */ var scanner_camera_component = (scanner_camera_component_component.exports);
84544
+ ;// 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&
84545
+
84546
+
84547
+ /* harmony default export */ var scanner_cameravue_type_script_lang_js_ = ({
84548
+ name: "scanner-camera",
84549
+ components: {
84550
+ ScannerCameraComponent: scanner_camera_component
84551
+ },
84552
+ props: {
84553
+ /**
84554
+ * 0-捷宇;5-良田
84555
+ */
84556
+ machineType: {
84557
+ //
84558
+ default: 0,
84559
+ type: Number
84560
+ },
84561
+ openMode: {
84562
+ default: '',
84563
+ type: String
84564
+ },
84565
+ label: {
84566
+ default: '',
84567
+ type: String
84568
+ },
84569
+ tip: {
84570
+ default: '',
84571
+ type: String
84572
+ },
84573
+ className: {
84574
+ default: '',
84575
+ type: String
84576
+ },
84577
+ size: {
84578
+ default: '',
84579
+ type: String
84580
+ },
84581
+ type: {
84582
+ default: '',
84583
+ type: String
84584
+ },
84585
+ plain: {
84586
+ default: false,
84587
+ type: Boolean
84588
+ },
84589
+ round: {
84590
+ default: false,
84591
+ type: Boolean
84592
+ },
84593
+ loading: {
84594
+ default: false,
84595
+ type: Boolean
84596
+ },
84597
+ icon: {
84598
+ default: '',
84599
+ type: String
84600
+ },
84601
+ disabled: {
84602
+ default: false,
84603
+ type: Boolean
84604
+ }
84605
+ },
84606
+ data: () => {
84607
+ return {
84608
+ dialogVisible: false,
84609
+ scannerResult: ''
84610
+ };
84611
+ },
84612
+ computed: {
84613
+ _className() {
84614
+ const classBase = ['z-button'];
84615
+ if (this.type === 'text') {
84616
+ classBase.push('i-font-size');
84617
+ }
84618
+ if (!this.className) {
84619
+ return classBase;
84620
+ } else if (typeof this.className === 'string') {
84621
+ classBase.push(this.className);
84622
+ } else {
84623
+ classBase.push(...this.className);
84624
+ }
84625
+ return classBase;
84626
+ }
84627
+ },
84628
+ methods: {
84629
+ openScanDialog() {
84630
+ this.dialogVisible = true;
84631
+ },
84632
+ setScannerResult(src) {
84633
+ this.scannerResult = src;
84634
+ if (this.openMode !== 'dialog') {
84635
+ this.$emit('send-scanner-result', this.scannerResult);
84636
+ }
84637
+ },
84638
+ sendScannerResult() {
84639
+ if (this.scannerResult) {
84640
+ this.$emit('send-scanner-result', this.scannerResult);
84641
+ this.dialogVisible = false;
84642
+ }
84643
+ }
84644
+ }
84645
+ });
84646
+ ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/scanner-camera.vue?vue&type=script&lang=js&
84647
+ /* harmony default export */ var src_scanner_cameravue_type_script_lang_js_ = (scanner_cameravue_type_script_lang_js_);
84648
+ ;// 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&
84649
+ // extracted by mini-css-extract-plugin
84650
+
84651
+ ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/scanner-camera.vue?vue&type=style&index=0&id=00e9072f&prod&scoped=true&lang=scss&
84652
+
84653
+ ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/scanner-camera.vue
84654
+
84655
+
84656
+
84657
+ ;
84658
+
84659
+
84660
+ /* normalize component */
84661
+
84662
+ var src_scanner_camera_component = normalizeComponent(
84663
+ src_scanner_cameravue_type_script_lang_js_,
84664
+ scanner_cameravue_type_template_id_00e9072f_scoped_true_render,
84665
+ scanner_cameravue_type_template_id_00e9072f_scoped_true_staticRenderFns,
84666
+ false,
84667
+ null,
84668
+ "00e9072f",
84669
+ null
84670
+
84671
+ )
84672
+
84673
+ /* harmony default export */ var scanner_camera = (src_scanner_camera_component.exports);
84674
+ ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/index.js
84675
+ /**
84676
+ * @author: lvcy
84677
+ * @date: 2023-07-24
84678
+ * @description:index
84679
+ */
84680
+
84681
+ scanner_camera.install = Vue => {
84682
+ Vue.component(scanner_camera.name, scanner_camera);
84683
+ };
84684
+ /* harmony default export */ var scanner_scanner_camera = (scanner_camera);
83911
84685
  ;// 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
84686
  var id_card_reader_eloamvue_type_template_id_5b7ce781_scoped_true_render = function render() {
83913
84687
  var _vm = this,
@@ -84056,8 +84830,8 @@ id_card_reader_eloam.install = Vue => {
84056
84830
  Vue.component(id_card_reader_eloam.name, id_card_reader_eloam);
84057
84831
  };
84058
84832
  /* 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() {
84833
+ ;// 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&
84834
+ var id_card_reader_buttonvue_type_template_id_6bdb0354_scoped_true_render = function render() {
84061
84835
  var _vm = this,
84062
84836
  _c = _vm._self._c;
84063
84837
  return _vm.tip ? _c('el-tooltip', {
@@ -84116,7 +84890,7 @@ var id_card_reader_buttonvue_type_template_id_7cd25906_scoped_true_render = func
84116
84890
  return [_vm._v(_vm._s(_vm.label))];
84117
84891
  })], 2);
84118
84892
  };
84119
- var id_card_reader_buttonvue_type_template_id_7cd25906_scoped_true_staticRenderFns = [];
84893
+ var id_card_reader_buttonvue_type_template_id_6bdb0354_scoped_true_staticRenderFns = [];
84120
84894
 
84121
84895
  ;// CONCATENATED MODULE: ./packages/service/external-plugins/default-plugin-socket.service.ts
84122
84896
 
@@ -85656,6 +86430,9 @@ var eloam_take_photo_dialog_component = normalizeComponent(
85656
86430
  )
85657
86431
 
85658
86432
  /* harmony default export */ var eloam_take_photo_dialog = (eloam_take_photo_dialog_component.exports);
86433
+ // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
86434
+ var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(3797);
86435
+ var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
85659
86436
  ;// 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
86437
 
85661
86438
 
@@ -85666,6 +86443,7 @@ var eloam_take_photo_dialog_component = normalizeComponent(
85666
86443
 
85667
86444
 
85668
86445
 
86446
+
85669
86447
  /* harmony default export */ var id_card_reader_buttonvue_type_script_lang_js_ = ({
85670
86448
  name: 'id-card-reader-button',
85671
86449
  props: {
@@ -85847,7 +86625,7 @@ var eloam_take_photo_dialog_component = normalizeComponent(
85847
86625
  */
85848
86626
  async signEvent() {
85849
86627
  let userSignature = '';
85850
- switch (this.signFlag) {
86628
+ switch (this.readMachineType) {
85851
86629
  case 0:
85852
86630
  userSignature = await SignReadService.read();
85853
86631
  break;
@@ -85866,7 +86644,7 @@ var eloam_take_photo_dialog_component = normalizeComponent(
85866
86644
  debugger;
85867
86645
  const modalNode = document.createElement('div');
85868
86646
  document.body.appendChild(modalNode);
85869
- const vm = new Vue({
86647
+ const vm = new (external_commonjs_vue_commonjs2_vue_root_Vue_default())({
85870
86648
  render: h => {
85871
86649
  return h(face_auth_dialog, {
85872
86650
  props: {},
@@ -85893,7 +86671,7 @@ var eloam_take_photo_dialog_component = normalizeComponent(
85893
86671
  readFacePhotoByELoam() {
85894
86672
  const modalNode = document.createElement('div');
85895
86673
  document.body.appendChild(modalNode);
85896
- const vm = new Vue({
86674
+ const vm = new (external_commonjs_vue_commonjs2_vue_root_Vue_default())({
85897
86675
  render: h => {
85898
86676
  return h(eloam_take_photo_dialog, {
85899
86677
  props: {},
@@ -85938,11 +86716,11 @@ var eloam_take_photo_dialog_component = normalizeComponent(
85938
86716
  ;
85939
86717
  var id_card_reader_button_component = normalizeComponent(
85940
86718
  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,
86719
+ id_card_reader_buttonvue_type_template_id_6bdb0354_scoped_true_render,
86720
+ id_card_reader_buttonvue_type_template_id_6bdb0354_scoped_true_staticRenderFns,
85943
86721
  false,
85944
86722
  null,
85945
- "7cd25906",
86723
+ "6bdb0354",
85946
86724
  null
85947
86725
 
85948
86726
  )
@@ -85966,6 +86744,7 @@ id_card_reader_button.install = Vue => {
85966
86744
 
85967
86745
 
85968
86746
 
86747
+
85969
86748
  // import {
85970
86749
  // Button,
85971
86750
  // Tooltip,
@@ -85981,7 +86760,7 @@ id_card_reader_button.install = Vue => {
85981
86760
  // Dialog
85982
86761
  // ]
85983
86762
  // 组件列表
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];
86763
+ 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
86764
 
85986
86765
  // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,那么所有的组件都会被注册
85987
86766
  const install = Vue => {