unify-external-plugin-platform 0.0.3-2 → 0.0.3-20

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.
@@ -2842,6 +2842,37 @@ module.exports = function (argument) {
2842
2842
  };
2843
2843
 
2844
2844
 
2845
+ /***/ }),
2846
+
2847
+ /***/ 6077:
2848
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2849
+
2850
+ var isCallable = __webpack_require__(614);
2851
+
2852
+ var $String = String;
2853
+ var $TypeError = TypeError;
2854
+
2855
+ module.exports = function (argument) {
2856
+ if (typeof argument == 'object' || isCallable(argument)) return argument;
2857
+ throw $TypeError("Can't set " + $String(argument) + ' as a prototype');
2858
+ };
2859
+
2860
+
2861
+ /***/ }),
2862
+
2863
+ /***/ 5787:
2864
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2865
+
2866
+ var isPrototypeOf = __webpack_require__(7976);
2867
+
2868
+ var $TypeError = TypeError;
2869
+
2870
+ module.exports = function (it, Prototype) {
2871
+ if (isPrototypeOf(Prototype, it)) return it;
2872
+ throw $TypeError('Incorrect invocation');
2873
+ };
2874
+
2875
+
2845
2876
  /***/ }),
2846
2877
 
2847
2878
  /***/ 9670:
@@ -2948,6 +2979,42 @@ module.exports = function (it) {
2948
2979
  };
2949
2980
 
2950
2981
 
2982
+ /***/ }),
2983
+
2984
+ /***/ 648:
2985
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
2986
+
2987
+ var TO_STRING_TAG_SUPPORT = __webpack_require__(1694);
2988
+ var isCallable = __webpack_require__(614);
2989
+ var classofRaw = __webpack_require__(4326);
2990
+ var wellKnownSymbol = __webpack_require__(5112);
2991
+
2992
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
2993
+ var $Object = Object;
2994
+
2995
+ // ES3 wrong here
2996
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
2997
+
2998
+ // fallback for IE11 Script Access Denied error
2999
+ var tryGet = function (it, key) {
3000
+ try {
3001
+ return it[key];
3002
+ } catch (error) { /* empty */ }
3003
+ };
3004
+
3005
+ // getting tag from ES6+ `Object.prototype.toString`
3006
+ module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
3007
+ var O, tag, result;
3008
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
3009
+ // @@toStringTag case
3010
+ : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
3011
+ // builtinTag case
3012
+ : CORRECT_ARGUMENTS ? classofRaw(O)
3013
+ // ES3 arguments fallback
3014
+ : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
3015
+ };
3016
+
3017
+
2951
3018
  /***/ }),
2952
3019
 
2953
3020
  /***/ 9920:
@@ -3118,6 +3185,40 @@ module.exports = function (it) {
3118
3185
  };
3119
3186
 
3120
3187
 
3188
+ /***/ }),
3189
+
3190
+ /***/ 3678:
3191
+ /***/ (function(module) {
3192
+
3193
+ module.exports = {
3194
+ IndexSizeError: { s: 'INDEX_SIZE_ERR', c: 1, m: 1 },
3195
+ DOMStringSizeError: { s: 'DOMSTRING_SIZE_ERR', c: 2, m: 0 },
3196
+ HierarchyRequestError: { s: 'HIERARCHY_REQUEST_ERR', c: 3, m: 1 },
3197
+ WrongDocumentError: { s: 'WRONG_DOCUMENT_ERR', c: 4, m: 1 },
3198
+ InvalidCharacterError: { s: 'INVALID_CHARACTER_ERR', c: 5, m: 1 },
3199
+ NoDataAllowedError: { s: 'NO_DATA_ALLOWED_ERR', c: 6, m: 0 },
3200
+ NoModificationAllowedError: { s: 'NO_MODIFICATION_ALLOWED_ERR', c: 7, m: 1 },
3201
+ NotFoundError: { s: 'NOT_FOUND_ERR', c: 8, m: 1 },
3202
+ NotSupportedError: { s: 'NOT_SUPPORTED_ERR', c: 9, m: 1 },
3203
+ InUseAttributeError: { s: 'INUSE_ATTRIBUTE_ERR', c: 10, m: 1 },
3204
+ InvalidStateError: { s: 'INVALID_STATE_ERR', c: 11, m: 1 },
3205
+ SyntaxError: { s: 'SYNTAX_ERR', c: 12, m: 1 },
3206
+ InvalidModificationError: { s: 'INVALID_MODIFICATION_ERR', c: 13, m: 1 },
3207
+ NamespaceError: { s: 'NAMESPACE_ERR', c: 14, m: 1 },
3208
+ InvalidAccessError: { s: 'INVALID_ACCESS_ERR', c: 15, m: 1 },
3209
+ ValidationError: { s: 'VALIDATION_ERR', c: 16, m: 0 },
3210
+ TypeMismatchError: { s: 'TYPE_MISMATCH_ERR', c: 17, m: 1 },
3211
+ SecurityError: { s: 'SECURITY_ERR', c: 18, m: 1 },
3212
+ NetworkError: { s: 'NETWORK_ERR', c: 19, m: 1 },
3213
+ AbortError: { s: 'ABORT_ERR', c: 20, m: 1 },
3214
+ URLMismatchError: { s: 'URL_MISMATCH_ERR', c: 21, m: 1 },
3215
+ QuotaExceededError: { s: 'QUOTA_EXCEEDED_ERR', c: 22, m: 1 },
3216
+ TimeoutError: { s: 'TIMEOUT_ERR', c: 23, m: 1 },
3217
+ InvalidNodeTypeError: { s: 'INVALID_NODE_TYPE_ERR', c: 24, m: 1 },
3218
+ DataCloneError: { s: 'DATA_CLONE_ERR', c: 25, m: 1 }
3219
+ };
3220
+
3221
+
3121
3222
  /***/ }),
3122
3223
 
3123
3224
  /***/ 8113:
@@ -3179,6 +3280,27 @@ module.exports = [
3179
3280
  ];
3180
3281
 
3181
3282
 
3283
+ /***/ }),
3284
+
3285
+ /***/ 1060:
3286
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3287
+
3288
+ var uncurryThis = __webpack_require__(1702);
3289
+
3290
+ var $Error = Error;
3291
+ var replace = uncurryThis(''.replace);
3292
+
3293
+ var TEST = (function (arg) { return String($Error(arg).stack); })('zxcasd');
3294
+ var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
3295
+ var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
3296
+
3297
+ module.exports = function (stack, dropEntries) {
3298
+ if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
3299
+ while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
3300
+ } return stack;
3301
+ };
3302
+
3303
+
3182
3304
  /***/ }),
3183
3305
 
3184
3306
  /***/ 2109:
@@ -3445,6 +3567,31 @@ module.exports = fails(function () {
3445
3567
  } : $Object;
3446
3568
 
3447
3569
 
3570
+ /***/ }),
3571
+
3572
+ /***/ 9587:
3573
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3574
+
3575
+ var isCallable = __webpack_require__(614);
3576
+ var isObject = __webpack_require__(111);
3577
+ var setPrototypeOf = __webpack_require__(7674);
3578
+
3579
+ // makes subclassing work correct for wrapped built-ins
3580
+ module.exports = function ($this, dummy, Wrapper) {
3581
+ var NewTarget, NewTargetPrototype;
3582
+ if (
3583
+ // it can work only with native `setPrototypeOf`
3584
+ setPrototypeOf &&
3585
+ // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
3586
+ isCallable(NewTarget = dummy.constructor) &&
3587
+ NewTarget !== Wrapper &&
3588
+ isObject(NewTargetPrototype = NewTarget.prototype) &&
3589
+ NewTargetPrototype !== Wrapper.prototype
3590
+ ) setPrototypeOf($this, NewTargetPrototype);
3591
+ return $this;
3592
+ };
3593
+
3594
+
3448
3595
  /***/ }),
3449
3596
 
3450
3597
  /***/ 2788:
@@ -3749,6 +3896,18 @@ module.exports = Math.trunc || function trunc(x) {
3749
3896
  };
3750
3897
 
3751
3898
 
3899
+ /***/ }),
3900
+
3901
+ /***/ 6277:
3902
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3903
+
3904
+ var toString = __webpack_require__(1340);
3905
+
3906
+ module.exports = function (argument, $default) {
3907
+ return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);
3908
+ };
3909
+
3910
+
3752
3911
  /***/ }),
3753
3912
 
3754
3913
  /***/ 3070:
@@ -3914,6 +4073,40 @@ exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
3914
4073
  } : $propertyIsEnumerable;
3915
4074
 
3916
4075
 
4076
+ /***/ }),
4077
+
4078
+ /***/ 7674:
4079
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4080
+
4081
+ /* eslint-disable no-proto -- safe */
4082
+ var uncurryThis = __webpack_require__(1702);
4083
+ var anObject = __webpack_require__(9670);
4084
+ var aPossiblePrototype = __webpack_require__(6077);
4085
+
4086
+ // `Object.setPrototypeOf` method
4087
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
4088
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
4089
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
4090
+ module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
4091
+ var CORRECT_SETTER = false;
4092
+ var test = {};
4093
+ var setter;
4094
+ try {
4095
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
4096
+ setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
4097
+ setter(test, []);
4098
+ CORRECT_SETTER = test instanceof Array;
4099
+ } catch (error) { /* empty */ }
4100
+ return function setPrototypeOf(O, proto) {
4101
+ anObject(O);
4102
+ aPossiblePrototype(proto);
4103
+ if (CORRECT_SETTER) setter(O, proto);
4104
+ else O.__proto__ = proto;
4105
+ return O;
4106
+ };
4107
+ }() : undefined);
4108
+
4109
+
3917
4110
  /***/ }),
3918
4111
 
3919
4112
  /***/ 2140:
@@ -4171,6 +4364,36 @@ module.exports = function (argument) {
4171
4364
  };
4172
4365
 
4173
4366
 
4367
+ /***/ }),
4368
+
4369
+ /***/ 1694:
4370
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4371
+
4372
+ var wellKnownSymbol = __webpack_require__(5112);
4373
+
4374
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
4375
+ var test = {};
4376
+
4377
+ test[TO_STRING_TAG] = 'z';
4378
+
4379
+ module.exports = String(test) === '[object z]';
4380
+
4381
+
4382
+ /***/ }),
4383
+
4384
+ /***/ 1340:
4385
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
4386
+
4387
+ var classof = __webpack_require__(648);
4388
+
4389
+ var $String = String;
4390
+
4391
+ module.exports = function (argument) {
4392
+ if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
4393
+ return $String(argument);
4394
+ };
4395
+
4396
+
4174
4397
  /***/ }),
4175
4398
 
4176
4399
  /***/ 6330:
@@ -4329,274 +4552,350 @@ $({ target: 'Array', proto: true, arity: 1, forced: INCORRECT_TO_LENGTH || SILEN
4329
4552
 
4330
4553
  /***/ }),
4331
4554
 
4332
- /***/ 7563:
4333
- /***/ (function(module) {
4334
-
4335
- module.exports =
4336
- /******/ (function(modules) { // webpackBootstrap
4337
- /******/ // The module cache
4338
- /******/ var installedModules = {};
4339
- /******/
4340
- /******/ // The require function
4341
- /******/ function __nested_webpack_require_187__(moduleId) {
4342
- /******/
4343
- /******/ // Check if module is in cache
4344
- /******/ if(installedModules[moduleId]) {
4345
- /******/ return installedModules[moduleId].exports;
4346
- /******/ }
4347
- /******/ // Create a new module (and put it into the cache)
4348
- /******/ var module = installedModules[moduleId] = {
4349
- /******/ i: moduleId,
4350
- /******/ l: false,
4351
- /******/ exports: {}
4352
- /******/ };
4353
- /******/
4354
- /******/ // Execute the module function
4355
- /******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_187__);
4356
- /******/
4357
- /******/ // Flag the module as loaded
4358
- /******/ module.l = true;
4359
- /******/
4360
- /******/ // Return the exports of the module
4361
- /******/ return module.exports;
4362
- /******/ }
4363
- /******/
4364
- /******/
4365
- /******/ // expose the modules object (__webpack_modules__)
4366
- /******/ __nested_webpack_require_187__.m = modules;
4367
- /******/
4368
- /******/ // expose the module cache
4369
- /******/ __nested_webpack_require_187__.c = installedModules;
4370
- /******/
4371
- /******/ // define getter function for harmony exports
4372
- /******/ __nested_webpack_require_187__.d = function(exports, name, getter) {
4373
- /******/ if(!__nested_webpack_require_187__.o(exports, name)) {
4374
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
4375
- /******/ }
4376
- /******/ };
4377
- /******/
4378
- /******/ // define __esModule on exports
4379
- /******/ __nested_webpack_require_187__.r = function(exports) {
4380
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
4381
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4382
- /******/ }
4383
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
4384
- /******/ };
4385
- /******/
4386
- /******/ // create a fake namespace object
4387
- /******/ // mode & 1: value is a module id, require it
4388
- /******/ // mode & 2: merge all properties of value into the ns
4389
- /******/ // mode & 4: return value when already ns object
4390
- /******/ // mode & 8|1: behave like require
4391
- /******/ __nested_webpack_require_187__.t = function(value, mode) {
4392
- /******/ if(mode & 1) value = __nested_webpack_require_187__(value);
4393
- /******/ if(mode & 8) return value;
4394
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
4395
- /******/ var ns = Object.create(null);
4396
- /******/ __nested_webpack_require_187__.r(ns);
4397
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
4398
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __nested_webpack_require_187__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
4399
- /******/ return ns;
4400
- /******/ };
4401
- /******/
4402
- /******/ // getDefaultExport function for compatibility with non-harmony modules
4403
- /******/ __nested_webpack_require_187__.n = function(module) {
4404
- /******/ var getter = module && module.__esModule ?
4405
- /******/ function getDefault() { return module['default']; } :
4406
- /******/ function getModuleExports() { return module; };
4407
- /******/ __nested_webpack_require_187__.d(getter, 'a', getter);
4408
- /******/ return getter;
4409
- /******/ };
4410
- /******/
4411
- /******/ // Object.prototype.hasOwnProperty.call
4412
- /******/ __nested_webpack_require_187__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
4413
- /******/
4414
- /******/ // __webpack_public_path__
4415
- /******/ __nested_webpack_require_187__.p = "/dist/";
4416
- /******/
4417
- /******/
4418
- /******/ // Load entry module and return exports
4419
- /******/ return __nested_webpack_require_187__(__nested_webpack_require_187__.s = 97);
4420
- /******/ })
4421
- /************************************************************************/
4422
- /******/ ({
4423
-
4424
- /***/ 0:
4425
- /***/ (function(module, __webpack_exports__, __nested_webpack_require_3672__) {
4555
+ /***/ 2801:
4556
+ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
4426
4557
 
4427
4558
  "use strict";
4428
- /* harmony export (binding) */ __nested_webpack_require_3672__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
4429
- /* globals __VUE_SSR_CONTEXT__ */
4430
-
4431
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
4432
- // This module is a runtime utility for cleaner component module output and will
4433
- // be included in the final webpack user bundle.
4434
-
4435
- function normalizeComponent (
4436
- scriptExports,
4437
- render,
4438
- staticRenderFns,
4439
- functionalTemplate,
4440
- injectStyles,
4441
- scopeId,
4442
- moduleIdentifier, /* server only */
4443
- shadowMode /* vue-cli only */
4444
- ) {
4445
- // Vue.extend constructor export interop
4446
- var options = typeof scriptExports === 'function'
4447
- ? scriptExports.options
4448
- : scriptExports
4449
-
4450
- // render functions
4451
- if (render) {
4452
- options.render = render
4453
- options.staticRenderFns = staticRenderFns
4454
- options._compiled = true
4455
- }
4456
-
4457
- // functional template
4458
- if (functionalTemplate) {
4459
- options.functional = true
4460
- }
4461
-
4462
- // scopedId
4463
- if (scopeId) {
4464
- options._scopeId = 'data-v-' + scopeId
4465
- }
4466
-
4467
- var hook
4468
- if (moduleIdentifier) { // server build
4469
- hook = function (context) {
4470
- // 2.3 injection
4471
- context =
4472
- context || // cached call
4473
- (this.$vnode && this.$vnode.ssrContext) || // stateful
4474
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
4475
- // 2.2 with runInNewContext: true
4476
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
4477
- context = __VUE_SSR_CONTEXT__
4478
- }
4479
- // inject component styles
4480
- if (injectStyles) {
4481
- injectStyles.call(this, context)
4482
- }
4483
- // register component module identifier for async chunk inferrence
4484
- if (context && context._registeredComponents) {
4485
- context._registeredComponents.add(moduleIdentifier)
4486
- }
4487
- }
4488
- // used by ssr in case component is cached and beforeCreate
4489
- // never gets called
4490
- options._ssrRegister = hook
4491
- } else if (injectStyles) {
4492
- hook = shadowMode
4493
- ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
4494
- : injectStyles
4495
- }
4496
-
4497
- if (hook) {
4498
- if (options.functional) {
4499
- // for template-only hot-reload because in that case the render fn doesn't
4500
- // go through the normalizer
4501
- options._injectStyles = hook
4502
- // register for functioal component in vue file
4503
- var originalRender = options.render
4504
- options.render = function renderWithStyleInjection (h, context) {
4505
- hook.call(context)
4506
- return originalRender(h, context)
4507
- }
4508
- } else {
4509
- // inject component registration as beforeCreate hook
4510
- var existing = options.beforeCreate
4511
- options.beforeCreate = existing
4512
- ? [].concat(existing, hook)
4513
- : [hook]
4514
- }
4515
- }
4516
-
4517
- return {
4518
- exports: scriptExports,
4519
- options: options
4520
- }
4521
- }
4522
4559
 
4560
+ var $ = __webpack_require__(2109);
4561
+ var global = __webpack_require__(7854);
4562
+ var getBuiltIn = __webpack_require__(5005);
4563
+ var createPropertyDescriptor = __webpack_require__(9114);
4564
+ var defineProperty = (__webpack_require__(3070).f);
4565
+ var hasOwn = __webpack_require__(2597);
4566
+ var anInstance = __webpack_require__(5787);
4567
+ var inheritIfRequired = __webpack_require__(9587);
4568
+ var normalizeStringArgument = __webpack_require__(6277);
4569
+ var DOMExceptionConstants = __webpack_require__(3678);
4570
+ var clearErrorStack = __webpack_require__(1060);
4571
+ var DESCRIPTORS = __webpack_require__(9781);
4572
+ var IS_PURE = __webpack_require__(1913);
4523
4573
 
4524
- /***/ }),
4574
+ var DOM_EXCEPTION = 'DOMException';
4575
+ var Error = getBuiltIn('Error');
4576
+ var NativeDOMException = getBuiltIn(DOM_EXCEPTION);
4577
+
4578
+ var $DOMException = function DOMException() {
4579
+ anInstance(this, DOMExceptionPrototype);
4580
+ var argumentsLength = arguments.length;
4581
+ var message = normalizeStringArgument(argumentsLength < 1 ? undefined : arguments[0]);
4582
+ var name = normalizeStringArgument(argumentsLength < 2 ? undefined : arguments[1], 'Error');
4583
+ var that = new NativeDOMException(message, name);
4584
+ var error = Error(message);
4585
+ error.name = DOM_EXCEPTION;
4586
+ defineProperty(that, 'stack', createPropertyDescriptor(1, clearErrorStack(error.stack, 1)));
4587
+ inheritIfRequired(that, this, $DOMException);
4588
+ return that;
4589
+ };
4525
4590
 
4526
- /***/ 97:
4527
- /***/ (function(module, __webpack_exports__, __nested_webpack_require_6575__) {
4591
+ var DOMExceptionPrototype = $DOMException.prototype = NativeDOMException.prototype;
4528
4592
 
4529
- "use strict";
4530
- __nested_webpack_require_6575__.r(__webpack_exports__);
4593
+ var ERROR_HAS_STACK = 'stack' in Error(DOM_EXCEPTION);
4594
+ var DOM_EXCEPTION_HAS_STACK = 'stack' in new NativeDOMException(1, 2);
4531
4595
 
4532
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button-group.vue?vue&type=template&id=3d8661d0&
4533
- var render = function() {
4534
- var _vm = this
4535
- var _h = _vm.$createElement
4536
- var _c = _vm._self._c || _h
4537
- return _c("div", { staticClass: "el-button-group" }, [_vm._t("default")], 2)
4538
- }
4539
- var staticRenderFns = []
4540
- render._withStripped = true
4596
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
4597
+ var descriptor = NativeDOMException && DESCRIPTORS && Object.getOwnPropertyDescriptor(global, DOM_EXCEPTION);
4541
4598
 
4599
+ // Bun ~ 0.1.1 DOMException have incorrect descriptor and we can't redefine it
4600
+ // https://github.com/Jarred-Sumner/bun/issues/399
4601
+ var BUGGY_DESCRIPTOR = !!descriptor && !(descriptor.writable && descriptor.configurable);
4542
4602
 
4543
- // CONCATENATED MODULE: ./packages/button/src/button-group.vue?vue&type=template&id=3d8661d0&
4603
+ var FORCED_CONSTRUCTOR = ERROR_HAS_STACK && !BUGGY_DESCRIPTOR && !DOM_EXCEPTION_HAS_STACK;
4544
4604
 
4545
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button-group.vue?vue&type=script&lang=js&
4546
- //
4547
- //
4548
- //
4549
- //
4550
- //
4551
-
4552
- /* harmony default export */ var button_groupvue_type_script_lang_js_ = ({
4553
- name: 'ElButtonGroup'
4605
+ // `DOMException` constructor patch for `.stack` where it's required
4606
+ // https://webidl.spec.whatwg.org/#es-DOMException-specialness
4607
+ $({ global: true, constructor: true, forced: IS_PURE || FORCED_CONSTRUCTOR }, { // TODO: fix export logic
4608
+ DOMException: FORCED_CONSTRUCTOR ? $DOMException : NativeDOMException
4554
4609
  });
4555
- // CONCATENATED MODULE: ./packages/button/src/button-group.vue?vue&type=script&lang=js&
4556
- /* harmony default export */ var src_button_groupvue_type_script_lang_js_ = (button_groupvue_type_script_lang_js_);
4557
- // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
4558
- var componentNormalizer = __nested_webpack_require_6575__(0);
4559
-
4560
- // CONCATENATED MODULE: ./packages/button/src/button-group.vue
4561
-
4562
-
4563
-
4564
-
4565
-
4566
- /* normalize component */
4567
-
4568
- var component = Object(componentNormalizer["a" /* default */])(
4569
- src_button_groupvue_type_script_lang_js_,
4570
- render,
4571
- staticRenderFns,
4572
- false,
4573
- null,
4574
- null,
4575
- null
4576
-
4577
- )
4578
-
4579
- /* hot reload */
4580
- if (false) { var api; }
4581
- component.options.__file = "packages/button/src/button-group.vue"
4582
- /* harmony default export */ var button_group = (component.exports);
4583
- // CONCATENATED MODULE: ./packages/button-group/index.js
4584
4610
 
4611
+ var PolyfilledDOMException = getBuiltIn(DOM_EXCEPTION);
4612
+ var PolyfilledDOMExceptionPrototype = PolyfilledDOMException.prototype;
4585
4613
 
4586
- /* istanbul ignore next */
4587
- button_group.install = function (Vue) {
4588
- Vue.component(button_group.name, button_group);
4589
- };
4590
-
4591
- /* harmony default export */ var packages_button_group = __webpack_exports__["default"] = (button_group);
4614
+ if (PolyfilledDOMExceptionPrototype.constructor !== PolyfilledDOMException) {
4615
+ if (!IS_PURE) {
4616
+ defineProperty(PolyfilledDOMExceptionPrototype, 'constructor', createPropertyDescriptor(1, PolyfilledDOMException));
4617
+ }
4592
4618
 
4593
- /***/ })
4619
+ for (var key in DOMExceptionConstants) if (hasOwn(DOMExceptionConstants, key)) {
4620
+ var constant = DOMExceptionConstants[key];
4621
+ var constantName = constant.s;
4622
+ if (!hasOwn(PolyfilledDOMException, constantName)) {
4623
+ defineProperty(PolyfilledDOMException, constantName, createPropertyDescriptor(6, constant.c));
4624
+ }
4625
+ }
4626
+ }
4594
4627
 
4595
- /******/ });
4596
4628
 
4597
4629
  /***/ }),
4598
4630
 
4599
- /***/ 6426:
4631
+ /***/ 7563:
4632
+ /***/ (function(module) {
4633
+
4634
+ module.exports =
4635
+ /******/ (function(modules) { // webpackBootstrap
4636
+ /******/ // The module cache
4637
+ /******/ var installedModules = {};
4638
+ /******/
4639
+ /******/ // The require function
4640
+ /******/ function __nested_webpack_require_187__(moduleId) {
4641
+ /******/
4642
+ /******/ // Check if module is in cache
4643
+ /******/ if(installedModules[moduleId]) {
4644
+ /******/ return installedModules[moduleId].exports;
4645
+ /******/ }
4646
+ /******/ // Create a new module (and put it into the cache)
4647
+ /******/ var module = installedModules[moduleId] = {
4648
+ /******/ i: moduleId,
4649
+ /******/ l: false,
4650
+ /******/ exports: {}
4651
+ /******/ };
4652
+ /******/
4653
+ /******/ // Execute the module function
4654
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_187__);
4655
+ /******/
4656
+ /******/ // Flag the module as loaded
4657
+ /******/ module.l = true;
4658
+ /******/
4659
+ /******/ // Return the exports of the module
4660
+ /******/ return module.exports;
4661
+ /******/ }
4662
+ /******/
4663
+ /******/
4664
+ /******/ // expose the modules object (__webpack_modules__)
4665
+ /******/ __nested_webpack_require_187__.m = modules;
4666
+ /******/
4667
+ /******/ // expose the module cache
4668
+ /******/ __nested_webpack_require_187__.c = installedModules;
4669
+ /******/
4670
+ /******/ // define getter function for harmony exports
4671
+ /******/ __nested_webpack_require_187__.d = function(exports, name, getter) {
4672
+ /******/ if(!__nested_webpack_require_187__.o(exports, name)) {
4673
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
4674
+ /******/ }
4675
+ /******/ };
4676
+ /******/
4677
+ /******/ // define __esModule on exports
4678
+ /******/ __nested_webpack_require_187__.r = function(exports) {
4679
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
4680
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4681
+ /******/ }
4682
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
4683
+ /******/ };
4684
+ /******/
4685
+ /******/ // create a fake namespace object
4686
+ /******/ // mode & 1: value is a module id, require it
4687
+ /******/ // mode & 2: merge all properties of value into the ns
4688
+ /******/ // mode & 4: return value when already ns object
4689
+ /******/ // mode & 8|1: behave like require
4690
+ /******/ __nested_webpack_require_187__.t = function(value, mode) {
4691
+ /******/ if(mode & 1) value = __nested_webpack_require_187__(value);
4692
+ /******/ if(mode & 8) return value;
4693
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
4694
+ /******/ var ns = Object.create(null);
4695
+ /******/ __nested_webpack_require_187__.r(ns);
4696
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
4697
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __nested_webpack_require_187__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
4698
+ /******/ return ns;
4699
+ /******/ };
4700
+ /******/
4701
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
4702
+ /******/ __nested_webpack_require_187__.n = function(module) {
4703
+ /******/ var getter = module && module.__esModule ?
4704
+ /******/ function getDefault() { return module['default']; } :
4705
+ /******/ function getModuleExports() { return module; };
4706
+ /******/ __nested_webpack_require_187__.d(getter, 'a', getter);
4707
+ /******/ return getter;
4708
+ /******/ };
4709
+ /******/
4710
+ /******/ // Object.prototype.hasOwnProperty.call
4711
+ /******/ __nested_webpack_require_187__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
4712
+ /******/
4713
+ /******/ // __webpack_public_path__
4714
+ /******/ __nested_webpack_require_187__.p = "/dist/";
4715
+ /******/
4716
+ /******/
4717
+ /******/ // Load entry module and return exports
4718
+ /******/ return __nested_webpack_require_187__(__nested_webpack_require_187__.s = 97);
4719
+ /******/ })
4720
+ /************************************************************************/
4721
+ /******/ ({
4722
+
4723
+ /***/ 0:
4724
+ /***/ (function(module, __webpack_exports__, __nested_webpack_require_3672__) {
4725
+
4726
+ "use strict";
4727
+ /* harmony export (binding) */ __nested_webpack_require_3672__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
4728
+ /* globals __VUE_SSR_CONTEXT__ */
4729
+
4730
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
4731
+ // This module is a runtime utility for cleaner component module output and will
4732
+ // be included in the final webpack user bundle.
4733
+
4734
+ function normalizeComponent (
4735
+ scriptExports,
4736
+ render,
4737
+ staticRenderFns,
4738
+ functionalTemplate,
4739
+ injectStyles,
4740
+ scopeId,
4741
+ moduleIdentifier, /* server only */
4742
+ shadowMode /* vue-cli only */
4743
+ ) {
4744
+ // Vue.extend constructor export interop
4745
+ var options = typeof scriptExports === 'function'
4746
+ ? scriptExports.options
4747
+ : scriptExports
4748
+
4749
+ // render functions
4750
+ if (render) {
4751
+ options.render = render
4752
+ options.staticRenderFns = staticRenderFns
4753
+ options._compiled = true
4754
+ }
4755
+
4756
+ // functional template
4757
+ if (functionalTemplate) {
4758
+ options.functional = true
4759
+ }
4760
+
4761
+ // scopedId
4762
+ if (scopeId) {
4763
+ options._scopeId = 'data-v-' + scopeId
4764
+ }
4765
+
4766
+ var hook
4767
+ if (moduleIdentifier) { // server build
4768
+ hook = function (context) {
4769
+ // 2.3 injection
4770
+ context =
4771
+ context || // cached call
4772
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
4773
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
4774
+ // 2.2 with runInNewContext: true
4775
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
4776
+ context = __VUE_SSR_CONTEXT__
4777
+ }
4778
+ // inject component styles
4779
+ if (injectStyles) {
4780
+ injectStyles.call(this, context)
4781
+ }
4782
+ // register component module identifier for async chunk inferrence
4783
+ if (context && context._registeredComponents) {
4784
+ context._registeredComponents.add(moduleIdentifier)
4785
+ }
4786
+ }
4787
+ // used by ssr in case component is cached and beforeCreate
4788
+ // never gets called
4789
+ options._ssrRegister = hook
4790
+ } else if (injectStyles) {
4791
+ hook = shadowMode
4792
+ ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
4793
+ : injectStyles
4794
+ }
4795
+
4796
+ if (hook) {
4797
+ if (options.functional) {
4798
+ // for template-only hot-reload because in that case the render fn doesn't
4799
+ // go through the normalizer
4800
+ options._injectStyles = hook
4801
+ // register for functioal component in vue file
4802
+ var originalRender = options.render
4803
+ options.render = function renderWithStyleInjection (h, context) {
4804
+ hook.call(context)
4805
+ return originalRender(h, context)
4806
+ }
4807
+ } else {
4808
+ // inject component registration as beforeCreate hook
4809
+ var existing = options.beforeCreate
4810
+ options.beforeCreate = existing
4811
+ ? [].concat(existing, hook)
4812
+ : [hook]
4813
+ }
4814
+ }
4815
+
4816
+ return {
4817
+ exports: scriptExports,
4818
+ options: options
4819
+ }
4820
+ }
4821
+
4822
+
4823
+ /***/ }),
4824
+
4825
+ /***/ 97:
4826
+ /***/ (function(module, __webpack_exports__, __nested_webpack_require_6575__) {
4827
+
4828
+ "use strict";
4829
+ __nested_webpack_require_6575__.r(__webpack_exports__);
4830
+
4831
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button-group.vue?vue&type=template&id=3d8661d0&
4832
+ var render = function() {
4833
+ var _vm = this
4834
+ var _h = _vm.$createElement
4835
+ var _c = _vm._self._c || _h
4836
+ return _c("div", { staticClass: "el-button-group" }, [_vm._t("default")], 2)
4837
+ }
4838
+ var staticRenderFns = []
4839
+ render._withStripped = true
4840
+
4841
+
4842
+ // CONCATENATED MODULE: ./packages/button/src/button-group.vue?vue&type=template&id=3d8661d0&
4843
+
4844
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button-group.vue?vue&type=script&lang=js&
4845
+ //
4846
+ //
4847
+ //
4848
+ //
4849
+ //
4850
+
4851
+ /* harmony default export */ var button_groupvue_type_script_lang_js_ = ({
4852
+ name: 'ElButtonGroup'
4853
+ });
4854
+ // CONCATENATED MODULE: ./packages/button/src/button-group.vue?vue&type=script&lang=js&
4855
+ /* harmony default export */ var src_button_groupvue_type_script_lang_js_ = (button_groupvue_type_script_lang_js_);
4856
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
4857
+ var componentNormalizer = __nested_webpack_require_6575__(0);
4858
+
4859
+ // CONCATENATED MODULE: ./packages/button/src/button-group.vue
4860
+
4861
+
4862
+
4863
+
4864
+
4865
+ /* normalize component */
4866
+
4867
+ var component = Object(componentNormalizer["a" /* default */])(
4868
+ src_button_groupvue_type_script_lang_js_,
4869
+ render,
4870
+ staticRenderFns,
4871
+ false,
4872
+ null,
4873
+ null,
4874
+ null
4875
+
4876
+ )
4877
+
4878
+ /* hot reload */
4879
+ if (false) { var api; }
4880
+ component.options.__file = "packages/button/src/button-group.vue"
4881
+ /* harmony default export */ var button_group = (component.exports);
4882
+ // CONCATENATED MODULE: ./packages/button-group/index.js
4883
+
4884
+
4885
+ /* istanbul ignore next */
4886
+ button_group.install = function (Vue) {
4887
+ Vue.component(button_group.name, button_group);
4888
+ };
4889
+
4890
+ /* harmony default export */ var packages_button_group = __webpack_exports__["default"] = (button_group);
4891
+
4892
+ /***/ })
4893
+
4894
+ /******/ });
4895
+
4896
+ /***/ }),
4897
+
4898
+ /***/ 6426:
4600
4899
  /***/ (function(module) {
4601
4900
 
4602
4901
  module.exports =
@@ -84029,8 +84328,8 @@ var scanner_cameravue_type_template_id_00e9072f_scoped_true_render = function re
84029
84328
  };
84030
84329
  var scanner_cameravue_type_template_id_00e9072f_scoped_true_staticRenderFns = [];
84031
84330
 
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=0c4fd56a&scoped=true&
84033
- var scanner_camera_componentvue_type_template_id_0c4fd56a_scoped_true_render = function render() {
84331
+ ;// 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=413c9ee6&scoped=true&
84332
+ var scanner_camera_componentvue_type_template_id_413c9ee6_scoped_true_render = function render() {
84034
84333
  var _vm = this,
84035
84334
  _c = _vm._self._c;
84036
84335
  return _c('div', {
@@ -84094,7 +84393,7 @@ var scanner_camera_componentvue_type_template_id_0c4fd56a_scoped_true_render = f
84094
84393
  }, [_vm._v(_vm._s(item.label))]) : _vm._e()];
84095
84394
  }), _vm._t("action")]], 2)])]);
84096
84395
  };
84097
- var scanner_camera_componentvue_type_template_id_0c4fd56a_scoped_true_staticRenderFns = [];
84396
+ var scanner_camera_componentvue_type_template_id_413c9ee6_scoped_true_staticRenderFns = [];
84098
84397
 
84099
84398
  ;// CONCATENATED MODULE: ./packages/utils/custom-axios.ts
84100
84399
  /**
@@ -84119,6 +84418,7 @@ class custom_axios_CustomAxios {
84119
84418
  }
84120
84419
  xhr.open(method, url, true);
84121
84420
  xhr.setRequestHeader('Accept', 'application/json');
84421
+ xhr.setRequestHeader('Content-Type', 'application/json; charset=utf-8');
84122
84422
  if (method === 'GET') {
84123
84423
  xhr.send();
84124
84424
  } else {
@@ -84162,6 +84462,10 @@ class custom_axios_CustomAxios {
84162
84462
  var eloam_plugin_service_ELoamMethodCode;
84163
84463
  (function (ELoamMethodCode) {
84164
84464
  ELoamMethodCode["ScannerCameraLinuxInit"] = "ScannerCameraLinuxInit";
84465
+ /** 打开摄像头linux*/
84466
+ ELoamMethodCode["ScannerCameraLinuxStartPreview"] = "ScannerCameraLinuxStartPreview";
84467
+ /** 获取视频帧 linux*/
84468
+ ELoamMethodCode["ScannerCameraLinuxGetFrame"] = "ScannerCameraLinuxGetFrame";
84165
84469
  /** 糾偏 */
84166
84470
  ELoamMethodCode["ScannerCameraDeskew_Base64"] = "ScannerCameraDeskew_Base64";
84167
84471
  /** 合并*/
@@ -84183,11 +84487,19 @@ const eloam_plugin_service_ELoamMethodDesc = {
84183
84487
  class eloam_plugin_service_ELoamPassService {
84184
84488
  /** 主摄像头地址 */
84185
84489
  static get mainCameraUrl() {
84186
- return this.baseServiceUrl + '/video=stream&camidx=0';
84490
+ if (this._isLinux) {
84491
+ return this.baseLinuxServiceUrl + '/StartPreview?dev_idx=0&res_id=0';
84492
+ } else {
84493
+ return this.baseServiceUrl + '/video=stream&camidx=0';
84494
+ }
84187
84495
  }
84188
84496
  /** 副摄像头地址 */
84189
84497
  static get secondaryCameraUrl() {
84190
- return this.baseServiceUrl + '/video=stream&camidx=1';
84498
+ if (this._isLinux) {
84499
+ return this.baseLinuxServiceUrl + '/StartPreview?dev_idx=1&res_id=0';
84500
+ } else {
84501
+ return this.baseServiceUrl + '/video=stream&camidx=1';
84502
+ }
84191
84503
  }
84192
84504
  static async read(method, data) {
84193
84505
  let param = {},
@@ -84198,13 +84510,27 @@ class eloam_plugin_service_ELoamPassService {
84198
84510
  url = `${this.baseLinuxServiceUrl}/GetAllDisplayInfo`;
84199
84511
  requestType = 'get';
84200
84512
  break;
84513
+ case eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxStartPreview:
84514
+ url = `${this.baseLinuxServiceUrl}/StartPreview?dev_idx=${data}&res_id=0`;
84515
+ requestType = 'get';
84516
+ break;
84517
+ case eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxGetFrame:
84518
+ url = `${this.baseLinuxServiceUrl}/getFrame`;
84519
+ requestType = 'get';
84520
+ break;
84201
84521
  case eloam_plugin_service_ELoamMethodCode.ScannerCameraRotate:
84202
- url = this.baseServiceUrl + '/video=rotate';
84203
- param = {
84204
- camidx: "0",
84205
- rotate: data.toString()
84206
- };
84207
- requestType = 'post';
84522
+ if (eloam_plugin_service_ELoamPassService._isLinux) {
84523
+ let count = data / 90;
84524
+ url = this.baseLinuxServiceUrl + `/Rotate?count=${count}`;
84525
+ requestType = 'get';
84526
+ } else {
84527
+ url = this.baseServiceUrl + '/video=rotate';
84528
+ param = {
84529
+ camidx: "0",
84530
+ rotate: data.toString()
84531
+ };
84532
+ requestType = 'post';
84533
+ }
84208
84534
  break;
84209
84535
  case eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64:
84210
84536
  // 纠偏
@@ -84241,34 +84567,42 @@ class eloam_plugin_service_ELoamPassService {
84241
84567
  }
84242
84568
  break;
84243
84569
  case eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64:
84244
- // rotate: 旋转角度;deskew:纠偏,主摄像头1,副摄像头0 camidx:主摄像头0,副摄像头1;ColorMode:quality
84245
- url = this.baseServiceUrl + '/video=grabimage';
84246
- param = {
84247
- filepath: "base64",
84248
- rotate: "0",
84249
- deskew: data,
84250
- deskewval: "20",
84251
- camidx: "0",
84252
- ColorMode: "0",
84253
- quality: "0",
84254
- bIsPrint1to1: "0"
84255
- };
84256
- requestType = 'post';
84570
+ if (this._isLinux) {
84571
+ url = this.baseLinuxServiceUrl + '/getPic?filepath=/tmp';
84572
+ requestType = 'get';
84573
+ } else {
84574
+ url = this.baseServiceUrl + '/video=grabimage';
84575
+ param = {
84576
+ filepath: "base64",
84577
+ rotate: "0",
84578
+ deskew: data,
84579
+ deskewval: "20",
84580
+ camidx: "0",
84581
+ ColorMode: "0",
84582
+ quality: "0",
84583
+ bIsPrint1to1: "0"
84584
+ };
84585
+ requestType = 'post';
84586
+ }
84257
84587
  break;
84258
84588
  case eloam_plugin_service_ELoamMethodCode.ScannerSecondaryCamera_Base64:
84259
- // rotate: 旋转角度,;deskew:纠偏,主摄像头1,副摄像头0 camidx:主摄像头0,副摄像头1;ColorMode:quality
84260
- url = this.baseServiceUrl + '/video=grabimage';
84261
- param = {
84262
- filepath: "",
84263
- rotate: "0",
84264
- deskew: "0",
84265
- deskewval: "0",
84266
- camidx: "1",
84267
- ColorMode: "0",
84268
- quality: "0",
84269
- bIsPrint1to1: "0"
84270
- };
84271
- requestType = 'post';
84589
+ if (this._isLinux) {
84590
+ url = this.baseLinuxServiceUrl + '/getPic?filepath=/tmp';
84591
+ requestType = 'get';
84592
+ } else {
84593
+ url = this.baseServiceUrl + '/video=grabimage';
84594
+ param = {
84595
+ filepath: "",
84596
+ rotate: "0",
84597
+ deskew: "0",
84598
+ deskewval: "0",
84599
+ camidx: "1",
84600
+ ColorMode: "0",
84601
+ quality: "0",
84602
+ bIsPrint1to1: "0"
84603
+ };
84604
+ requestType = 'post';
84605
+ }
84272
84606
  break;
84273
84607
  case eloam_plugin_service_ELoamMethodCode.ReadIDCard_Base64:
84274
84608
  url = this.baseServiceUrl + '/card=idcard';
@@ -84281,31 +84615,56 @@ class eloam_plugin_service_ELoamPassService {
84281
84615
  static async initLinuxCamera() {
84282
84616
  await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxInit);
84283
84617
  }
84618
+ static async startPreview(data) {
84619
+ return await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxStartPreview, data);
84620
+ }
84621
+ static async getEloamFrame() {
84622
+ return await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxGetFrame);
84623
+ }
84284
84624
  /** 主摄像头拍照 */
84285
84625
  static async scanByMainCamera(deskew) {
84286
84626
  const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64, deskew);
84287
84627
  if (this._isLinux) {
84288
- return res.filepath; // 国产
84628
+ return res; // 国产
84289
84629
  } else {
84290
- return res.photoBase64;
84630
+ return res;
84291
84631
  }
84292
84632
  }
84293
84633
  /** 副摄像头拍照 */
84294
84634
  static async scanBySecondaryCamera() {
84295
84635
  const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerSecondaryCamera_Base64);
84296
- return res.photoBase64;
84636
+ if (this._isLinux) {
84637
+ return res.data.img; // 国产
84638
+ } else {
84639
+ return res.photoBase64;
84640
+ }
84297
84641
  }
84298
84642
  static async mergeImage(list, type) {
84299
84643
  const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraMerge_Base64, {
84300
84644
  list,
84301
84645
  type
84302
84646
  });
84303
- return res.base64;
84647
+ return res.base64 || res.data;
84304
84648
  }
84305
- static async scanByCamera(type, deskew) {
84649
+ static async scanByCamera(type, deskew, isMerge = false) {
84306
84650
  switch (type) {
84307
84651
  case "main":
84308
- return this.scanByMainCamera(deskew);
84652
+ let res = await this.scanByMainCamera(deskew);
84653
+ if (isMerge) {
84654
+ // 合并
84655
+ if (this._isLinux) {
84656
+ return res.data.path; // 国产
84657
+ } else {
84658
+ return res.photoBase64;
84659
+ }
84660
+ } else {
84661
+ // 拍照
84662
+ if (this._isLinux) {
84663
+ return res.data.img; // 国产
84664
+ } else {
84665
+ return res.photoBase64;
84666
+ }
84667
+ }
84309
84668
  case 'vice':
84310
84669
  return this.scanBySecondaryCamera();
84311
84670
  }
@@ -84348,8 +84707,8 @@ class eloam_plugin_service_ELoamPassService {
84348
84707
  info: {
84349
84708
  cardType: cardType,
84350
84709
  nationality: nationality,
84351
- name: name,
84352
- chineseName: chineseName,
84710
+ name: name.trim(),
84711
+ chineseName: chineseName.trim(),
84353
84712
  englishName: englishName,
84354
84713
  sex: sex,
84355
84714
  birthday: birthday,
@@ -85520,20 +85879,21 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85520
85879
  buttonList: [{
85521
85880
  label: '拍照',
85522
85881
  name: 'take-pictures'
85523
- }, {
85524
- label: '纠偏裁边',
85525
- name: 'open-deskew'
85526
- }, {
85527
- label: '旋转',
85528
- name: 'rotate-video'
85529
85882
  }, {
85530
85883
  label: '图片合并',
85531
85884
  name: 'take-pictures-merge'
85532
85885
  }, {
85533
85886
  label: '证件合并',
85534
85887
  name: 'take-idCard-pictures-merge'
85888
+ }, {
85889
+ label: '纠偏裁边',
85890
+ name: 'open-deskew'
85891
+ }, {
85892
+ label: '旋转',
85893
+ name: 'rotate-video'
85535
85894
  }],
85536
85895
  _isLinux: String(navigator.platform).indexOf("Linux") > -1,
85896
+ eloamLinuxFrameTimer: {},
85537
85897
  mergeImageList: []
85538
85898
  };
85539
85899
  },
@@ -85602,7 +85962,8 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85602
85962
  let type = this.camera === 0 ? 'main' : 'vice';
85603
85963
  const res = await eloam_plugin_service_ELoamPassService.scanByCamera(type, this.deskewStatus);
85604
85964
  if (res) {
85605
- this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res}`);
85965
+ let path = res;
85966
+ this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${path}`);
85606
85967
  } else {
85607
85968
  this.$message.error('拍照出错,请检查设备是否连接成功');
85608
85969
  }
@@ -85636,8 +85997,15 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85636
85997
  break;
85637
85998
  case 5:
85638
85999
  // 良田高拍仪
85639
- this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
85640
- if (this._isLinux) await eloam_plugin_service_ELoamPassService.initLinuxCamera();
86000
+ if (!(String(navigator.platform).indexOf("Linux") > -1)) {
86001
+ this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
86002
+ } else {
86003
+ await eloam_plugin_service_ELoamPassService.initLinuxCamera();
86004
+ let res = await eloam_plugin_service_ELoamPassService.startPreview('0');
86005
+ if (res.returnCode == "0" || res.returnCode == "2") {
86006
+ this.eloamLinuxFrameTimer = setInterval(this.getEloamFrame, 300);
86007
+ }
86008
+ }
85641
86009
  break;
85642
86010
  case 6:
85643
86011
  // 国产客户端一体机
@@ -85645,6 +86013,15 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85645
86013
  break;
85646
86014
  }
85647
86015
  },
86016
+ async getEloamFrame() {
86017
+ let res = await eloam_plugin_service_ELoamPassService.getEloamFrame();
86018
+ if (res.returnCode == "1") {
86019
+ clearInterval(this.eloamLinuxFrameTimer);
86020
+ return;
86021
+ }
86022
+ if (res.data.img == "") return;
86023
+ this.scannerVideoSrc = `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res.data.img}`;
86024
+ },
85648
86025
  /**
85649
86026
  * 副摄像头
85650
86027
  */
@@ -85664,7 +86041,13 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85664
86041
  break;
85665
86042
  case 5:
85666
86043
  // 良田
85667
- this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.secondaryCameraUrl;
86044
+ if (!(String(navigator.platform).indexOf("Linux") > -1)) {
86045
+ this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
86046
+ } else {
86047
+ await eloam_plugin_service_ELoamPassService.initLinuxCamera();
86048
+ await eloam_plugin_service_ELoamPassService.startPreview('1');
86049
+ this.eloamLinuxFrameTimer = setInterval(this.getEloamFrame, 300);
86050
+ }
85668
86051
  break;
85669
86052
  case 6:
85670
86053
  // 国产客户端一体机
@@ -85674,9 +86057,10 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85674
86057
  },
85675
86058
  async takePictureMerge(type) {
85676
86059
  if (type === '1' && this.deskewStatus === '0') return this.$message.warning('请先开启纠偏');
85677
- const res = await eloam_plugin_service_ELoamPassService.scanByCamera('main', this.deskewStatus);
86060
+ const res = await eloam_plugin_service_ELoamPassService.scanByCamera('main', this.deskewStatus, true);
85678
86061
  if (res) {
85679
- this.mergeImageList.push(res);
86062
+ let path = res;
86063
+ this.mergeImageList.push(path);
85680
86064
  if (this.mergeImageList.length === 1) this.$message.success('第一张拍摄成功,请拍第二张');
85681
86065
  if (this.mergeImageList.length === 2) {
85682
86066
  let result = await eloam_plugin_service_ELoamPassService.mergeImage(this.mergeImageList, type);
@@ -85723,7 +86107,7 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85723
86107
  this.takePictureMerge('1');
85724
86108
  break;
85725
86109
  case 'rotate-video':
85726
- if (this._isLinux) {
86110
+ if (String(navigator.platform).indexOf("Linux") > -1) {
85727
86111
  this.rotateDeg += 90;
85728
86112
  if (this.rotateDeg === 360) this.rotateDeg = 0;
85729
86113
  } else {
@@ -85741,10 +86125,10 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85741
86125
  });
85742
86126
  ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=script&lang=js&
85743
86127
  /* harmony default export */ var component_scanner_camera_componentvue_type_script_lang_js_ = (scanner_camera_componentvue_type_script_lang_js_);
85744
- ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.use[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=0c4fd56a&prod&scoped=true&lang=scss&
86128
+ ;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.use[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=413c9ee6&prod&scoped=true&lang=scss&
85745
86129
  // extracted by mini-css-extract-plugin
85746
86130
 
85747
- ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=0c4fd56a&prod&scoped=true&lang=scss&
86131
+ ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=413c9ee6&prod&scoped=true&lang=scss&
85748
86132
 
85749
86133
  ;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue
85750
86134
 
@@ -85757,11 +86141,11 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
85757
86141
 
85758
86142
  var scanner_camera_component_component = normalizeComponent(
85759
86143
  component_scanner_camera_componentvue_type_script_lang_js_,
85760
- scanner_camera_componentvue_type_template_id_0c4fd56a_scoped_true_render,
85761
- scanner_camera_componentvue_type_template_id_0c4fd56a_scoped_true_staticRenderFns,
86144
+ scanner_camera_componentvue_type_template_id_413c9ee6_scoped_true_render,
86145
+ scanner_camera_componentvue_type_template_id_413c9ee6_scoped_true_staticRenderFns,
85762
86146
  false,
85763
86147
  null,
85764
- "0c4fd56a",
86148
+ "413c9ee6",
85765
86149
  null
85766
86150
 
85767
86151
  )
@@ -86056,8 +86440,8 @@ id_card_reader_eloam.install = Vue => {
86056
86440
  Vue.component(id_card_reader_eloam.name, id_card_reader_eloam);
86057
86441
  };
86058
86442
  /* harmony default export */ var id_card_reader_id_card_reader_eloam = (id_card_reader_eloam);
86059
- ;// 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=d4b32654&scoped=true&
86060
- var id_card_reader_buttonvue_type_template_id_d4b32654_scoped_true_render = function render() {
86443
+ ;// 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=1b7bbed8&scoped=true&
86444
+ var id_card_reader_buttonvue_type_template_id_1b7bbed8_scoped_true_render = function render() {
86061
86445
  var _vm = this,
86062
86446
  _c = _vm._self._c;
86063
86447
  return _vm.tip ? _c('el-tooltip', {
@@ -86134,7 +86518,7 @@ var id_card_reader_buttonvue_type_template_id_d4b32654_scoped_true_render = func
86134
86518
  }
86135
86519
  })], 2);
86136
86520
  };
86137
- var id_card_reader_buttonvue_type_template_id_d4b32654_scoped_true_staticRenderFns = [];
86521
+ var id_card_reader_buttonvue_type_template_id_1b7bbed8_scoped_true_staticRenderFns = [];
86138
86522
 
86139
86523
  ;// CONCATENATED MODULE: ./packages/service/external-plugins/default-plugin-socket.service.ts
86140
86524
 
@@ -87620,6 +88004,257 @@ var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpac
87620
88004
  * @date: 2023-10-12
87621
88005
  * @description:华视电子读卡器
87622
88006
  */
88007
+ const NationalityEnum = {
88008
+ AND: "安道尔",
88009
+ AFG: "阿富汗",
88010
+ ATG: "安提瓜和巴布达",
88011
+ AIA: "安圭拉",
88012
+ ALB: "阿尔巴尼亚",
88013
+ ARM: "亚美尼亚",
88014
+ AGO: "安哥拉",
88015
+ ATA: "南极洲",
88016
+ ARG: "阿根廷",
88017
+ ASM: "美属萨摩亚",
88018
+ AUT: "奥地利",
88019
+ AUS: "澳大利亚",
88020
+ ABW: "阿鲁巴",
88021
+ ALA: "奥兰群岛",
88022
+ AZE: "阿塞拜疆",
88023
+ BIH: "波黑",
88024
+ BRB: "巴巴多斯",
88025
+ BGD: "孟加拉",
88026
+ BEL: "比利时",
88027
+ BFA: "布基纳法索",
88028
+ BGR: "保加利亚",
88029
+ BHR: "巴林",
88030
+ BDI: "布隆迪",
88031
+ BEN: "贝宁",
88032
+ BLM: "圣巴泰勒米岛",
88033
+ BMU: "百慕大",
88034
+ BRN: "文莱",
88035
+ BOL: "玻利维亚",
88036
+ BES: "荷兰加勒比区",
88037
+ BRA: "巴西",
88038
+ BHS: "巴哈马",
88039
+ BTN: "不丹",
88040
+ BVT: "布韦岛",
88041
+ BWA: "博茨瓦纳",
88042
+ BLR: "白俄罗斯",
88043
+ BLZ: "伯利兹",
88044
+ CAN: "加拿大",
88045
+ CCK: "科科斯群岛",
88046
+ CAF: "中非",
88047
+ CHE: "瑞士",
88048
+ CHL: "智利",
88049
+ CMR: "喀麦隆",
88050
+ COL: "哥伦比亚",
88051
+ CRI: "哥斯达黎加",
88052
+ CUB: "古巴",
88053
+ CPV: "佛得角",
88054
+ CXR: "圣诞岛",
88055
+ CYP: "塞浦路斯",
88056
+ CZE: "捷克",
88057
+ DEU: "德国",
88058
+ DJI: "吉布提",
88059
+ DNK: "丹麦",
88060
+ DMA: "多米尼克",
88061
+ DOM: "多米尼加",
88062
+ DZA: "阿尔及利亚",
88063
+ ECU: "厄瓜多尔",
88064
+ EST: "爱沙尼亚",
88065
+ EGY: "埃及",
88066
+ ESH: "西撒哈拉",
88067
+ ERI: "厄立特里亚",
88068
+ ESP: "西班牙",
88069
+ FIN: "芬兰",
88070
+ FJI: "斐济群岛",
88071
+ FLK: "马尔维纳斯群岛(福克兰)",
88072
+ FSM: "密克罗尼西亚联邦",
88073
+ FRO: "法罗群岛",
88074
+ FRA: "法国",
88075
+ GAB: "加蓬",
88076
+ GRD: "格林纳达",
88077
+ GEO: "格鲁吉亚",
88078
+ GUF: "法属圭亚那",
88079
+ GHA: "加纳",
88080
+ GIB: "直布罗陀",
88081
+ GRL: "格陵兰",
88082
+ GIN: "几内亚",
88083
+ GLP: "瓜德罗普",
88084
+ GNQ: "赤道几内亚",
88085
+ GRC: "希腊",
88086
+ SGS: "南乔治亚岛和南桑威奇群岛",
88087
+ GTM: "危地马拉",
88088
+ GUM: "关岛",
88089
+ GNB: "几内亚比绍",
88090
+ GUY: "圭亚那",
88091
+ HKG: "香港",
88092
+ HMD: "赫德岛和麦克唐纳群岛",
88093
+ HND: "洪都拉斯",
88094
+ HRV: "克罗地亚",
88095
+ HTI: "海地",
88096
+ HUN: "匈牙利",
88097
+ IDN: "印尼",
88098
+ IRL: "爱尔兰",
88099
+ ISR: "以色列",
88100
+ IMN: "马恩岛",
88101
+ IND: "印度",
88102
+ IOT: "英属印度洋领地",
88103
+ IRQ: "伊拉克",
88104
+ IRN: "伊朗",
88105
+ ISL: "冰岛",
88106
+ ITA: "意大利",
88107
+ JEY: "泽西岛",
88108
+ JAM: "牙买加",
88109
+ JOR: "约旦",
88110
+ JPN: "日本",
88111
+ KHM: "柬埔寨",
88112
+ KIR: "基里巴斯",
88113
+ COM: "科摩罗",
88114
+ KWT: "科威特",
88115
+ CYM: "开曼群岛",
88116
+ LBN: "黎巴嫩",
88117
+ LIE: "列支敦士登",
88118
+ LKA: "斯里兰卡",
88119
+ LBR: "利比里亚",
88120
+ LSO: "莱索托",
88121
+ LTU: "立陶宛",
88122
+ LUX: "卢森堡",
88123
+ LVA: "拉脱维亚",
88124
+ LBY: "利比亚",
88125
+ MAR: "摩洛哥",
88126
+ MCO: "摩纳哥",
88127
+ MDA: "摩尔多瓦",
88128
+ MNE: "黑山",
88129
+ MAF: "法属圣马丁",
88130
+ MDG: "马达加斯加",
88131
+ MHL: "马绍尔群岛",
88132
+ MKD: "马其顿",
88133
+ MLI: "马里",
88134
+ MMR: "缅甸",
88135
+ MAC: "澳门",
88136
+ MTQ: "马提尼克",
88137
+ MRT: "毛里塔尼亚",
88138
+ MSR: "蒙塞拉特岛",
88139
+ MLT: "马耳他",
88140
+ MDV: "马尔代夫",
88141
+ MWI: "马拉维",
88142
+ MEX: "墨西哥",
88143
+ MYS: "马来西亚",
88144
+ NAM: "纳米比亚",
88145
+ NER: "尼日尔",
88146
+ NFK: "诺福克岛",
88147
+ NGA: "尼日利亚",
88148
+ NIC: "尼加拉瓜",
88149
+ NLD: "荷兰",
88150
+ NOR: "挪威",
88151
+ NPL: "尼泊尔",
88152
+ NRU: "瑙鲁",
88153
+ OMN: "阿曼",
88154
+ PAN: "巴拿马",
88155
+ PER: "秘鲁",
88156
+ PYF: "法属波利尼西亚",
88157
+ PNG: "巴布亚新几内亚",
88158
+ PHL: "菲律宾",
88159
+ PAK: "巴基斯坦",
88160
+ POL: "波兰",
88161
+ PCN: "皮特凯恩群岛",
88162
+ PRI: "波多黎各",
88163
+ PSE: "巴勒斯坦",
88164
+ PLW: "帕劳",
88165
+ PRY: "巴拉圭",
88166
+ QAT: "卡塔尔",
88167
+ REU: "留尼汪",
88168
+ ROU: "罗马尼亚",
88169
+ SRB: "塞尔维亚",
88170
+ RUS: "俄罗斯",
88171
+ RWA: "卢旺达",
88172
+ SLB: "所罗门群岛",
88173
+ SYC: "塞舌尔",
88174
+ SDN: "苏丹",
88175
+ SWE: "瑞典",
88176
+ SGP: "新加坡",
88177
+ SVN: "斯洛文尼亚",
88178
+ SJM: "斯瓦尔巴群岛和 扬马延岛",
88179
+ SVK: "斯洛伐克",
88180
+ SLE: "塞拉利昂",
88181
+ SMR: "圣马力诺",
88182
+ SEN: "塞内加尔",
88183
+ SOM: "索马里",
88184
+ SUR: "苏里南",
88185
+ SSD: "南苏丹",
88186
+ STP: "圣多美和普林西比",
88187
+ SLV: "萨尔瓦多",
88188
+ SYR: "叙利亚",
88189
+ SWZ: "斯威士兰",
88190
+ TCA: "特克斯和凯科斯群岛",
88191
+ TCD: "乍得",
88192
+ TGO: "多哥",
88193
+ THA: "泰国",
88194
+ TKL: "托克劳",
88195
+ TLS: "东帝汶",
88196
+ TUN: "突尼斯",
88197
+ TON: "汤加",
88198
+ TUR: "土耳其",
88199
+ TUV: "图瓦卢",
88200
+ TZA: "坦桑尼亚",
88201
+ UKR: "乌克兰",
88202
+ UGA: "乌干达",
88203
+ USA: "美国",
88204
+ URY: "乌拉圭",
88205
+ VAT: "梵蒂冈",
88206
+ VEN: "委内瑞拉",
88207
+ VGB: "英属维尔京群岛",
88208
+ VIR: "美属维尔京群岛",
88209
+ VNM: "越南",
88210
+ WLF: "瓦利斯和富图纳",
88211
+ WSM: "萨摩亚",
88212
+ YEM: "也门",
88213
+ MYT: "马约特",
88214
+ ZAF: "南非",
88215
+ ZMB: "赞比亚",
88216
+ ZWE: "津巴布韦",
88217
+ CHN: "中国",
88218
+ COG: "刚果(布)",
88219
+ COD: "刚果(金)",
88220
+ MOZ: "莫桑比克",
88221
+ GGY: "根西岛",
88222
+ GMB: "冈比亚",
88223
+ MNP: "北马里亚纳群岛",
88224
+ ETH: "埃塞俄比亚",
88225
+ NCL: "新喀里多尼亚",
88226
+ VUT: "瓦努阿图",
88227
+ ATF: "法属南部领地",
88228
+ NIU: "纽埃",
88229
+ UMI: "美国本土外小岛屿",
88230
+ COK: "库克群岛",
88231
+ GBR: "英国",
88232
+ TTO: "特立尼达和多巴哥",
88233
+ VCT: "圣文森特和格林纳丁斯",
88234
+ TWN: "台湾",
88235
+ NZL: "新西兰",
88236
+ SAU: "沙特阿拉伯",
88237
+ LAO: "老挝",
88238
+ PRK: "朝鲜",
88239
+ KOR: "韩国",
88240
+ PRT: "葡萄牙",
88241
+ KGZ: "吉尔吉斯斯坦",
88242
+ KAZ: "哈萨克斯坦",
88243
+ TJK: "塔吉克斯坦",
88244
+ TKM: "土库曼斯坦",
88245
+ UZB: "乌兹别克斯坦",
88246
+ KNA: "圣基茨和尼维斯",
88247
+ SPM: "圣皮埃尔和密克隆",
88248
+ SHN: "圣赫勒拿",
88249
+ LCA: "圣卢西亚",
88250
+ MUS: "毛里求斯",
88251
+ CIV: "科特迪瓦",
88252
+ KEN: "肯尼亚",
88253
+ MNG: "蒙古国"
88254
+ };
88255
+ function convertNationality(nationality) {
88256
+ return NationalityEnum[nationality];
88257
+ }
87623
88258
  class HuaShiService {
87624
88259
  static startConnect() {
87625
88260
  if (this.ws && this.ws.readyState === WebSocket.CONNECTING) {
@@ -87695,23 +88330,55 @@ class HuaShiService {
87695
88330
  const readData = await HuaShiService.read();
87696
88331
  if (readData) {
87697
88332
  // 身份证|姓名|性别|民族|生日|地址|证件号|派出所|有效期起|有效期止||证件照 中间好多占位
87698
- let [type, name, sex, nation, birthday, address, cardId, police, validStart, validEnd] = readData.split('|');
87699
- let base64_ID = readData.split('|')[17];
87700
- const IDCardData = {
87701
- info: {
87702
- name,
87703
- sex,
87704
- birthday,
87705
- address,
87706
- cardId,
87707
- nation,
87708
- police,
87709
- validStart,
87710
- validEnd
87711
- },
87712
- headImage: base64_ID
87713
- };
87714
- return IDCardData;
88333
+ // 永居证|姓名|性别|永居证证件号|国籍代码|中文姓名|有效期起|有效期止|生日|证件版本号|受理机关代码|证件类别|照片内容 中间好多占位
88334
+ // 永居证|姓名|性别|永居证证件号|国籍代码|中文姓名|有效期起|有效期止|生日|换证次数|旧证件号|证件类别|照片内容 中间好多占位
88335
+ // 港澳台|姓名|性别|生日|住址|证件号|派出所|有效期起|有效期止|通行证号码|签发次数|证件类别|照片内容 中间好多占位
88336
+ let [model, placeholder, type, name, sex, nation, birthday, address, cardId, police, validStart, validEnd] = readData.split('|');
88337
+ let base64_ID = readData.split('|')[19];
88338
+ let NationCode = readData.split('|')[18];
88339
+ if (NationCode === '1') {
88340
+ // 身份证
88341
+ const IDCardData = {
88342
+ info: {
88343
+ cardType: '1',
88344
+ name,
88345
+ chineseName: '',
88346
+ englishName: '',
88347
+ sex,
88348
+ birthday,
88349
+ address,
88350
+ cardId,
88351
+ nationality: '中国',
88352
+ nation,
88353
+ police,
88354
+ validStart,
88355
+ validEnd
88356
+ },
88357
+ headImage: base64_ID
88358
+ };
88359
+ return IDCardData;
88360
+ } else {
88361
+ let chineseName = readData.split('|')[16] || '无中文姓名';
88362
+ const IDCardData = {
88363
+ info: {
88364
+ cardType: '9',
88365
+ name: chineseName === '无中文姓名' ? name : chineseName || name,
88366
+ chineseName,
88367
+ englishName: name,
88368
+ sex,
88369
+ birthday,
88370
+ address,
88371
+ cardId,
88372
+ nationality: convertNationality(NationCode),
88373
+ nation: '',
88374
+ police: '中华人民共和国国家移民管理局',
88375
+ validStart,
88376
+ validEnd
88377
+ },
88378
+ headImage: base64_ID
88379
+ };
88380
+ return IDCardData;
88381
+ }
87715
88382
  } else {
87716
88383
  throw Error('未匹配可用的读卡器');
87717
88384
  }
@@ -87720,8 +88387,8 @@ class HuaShiService {
87720
88387
  _defineProperty(HuaShiService, "idCardWebSocketUrl", 'ws://127.0.0.1:7415');
87721
88388
  _defineProperty(HuaShiService, "ws", void 0);
87722
88389
  _defineProperty(HuaShiService, "requestStore", []);
87723
- ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=template&id=7de4bdd6&
87724
- var default_take_photo_dialogvue_type_template_id_7de4bdd6_render = function render() {
88390
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=template&id=3194cb83&
88391
+ var default_take_photo_dialogvue_type_template_id_3194cb83_render = function render() {
87725
88392
  var _vm = this,
87726
88393
  _c = _vm._self._c;
87727
88394
  return _c('el-dialog', {
@@ -87758,230 +88425,32 @@ var default_take_photo_dialogvue_type_template_id_7de4bdd6_render = function ren
87758
88425
  "width": "1920",
87759
88426
  "height": "1080"
87760
88427
  }
87761
- }), _c('img', {
88428
+ }), _c('div', {
88429
+ staticClass: "image-content"
88430
+ }, [_c('img', {
87762
88431
  staticClass: "videoContainer photo",
87763
88432
  attrs: {
87764
88433
  "src": _vm.viewerPhotoSrc
87765
88434
  }
87766
- })]), _c('span', {
88435
+ })])]), _c('span', {
87767
88436
  staticClass: "dialog-footer",
87768
88437
  attrs: {
87769
88438
  "slot": "footer"
87770
88439
  },
87771
88440
  slot: "footer"
87772
88441
  }, [_vm._l(_vm.buttonList, function (button) {
87773
- return [_c('el-button', _vm._b({
88442
+ return [_vm._isShowButton(button.name) ? _c('el-button', _vm._b({
87774
88443
  key: button.name,
87775
88444
  on: {
87776
88445
  "click": function ($event) {
87777
88446
  return _vm.buttonClickEvent(button.name);
87778
88447
  }
87779
88448
  }
87780
- }, 'el-button', button, false), [_vm._v(_vm._s(button.label) + " ")])];
88449
+ }, 'el-button', button, false), [_vm._v(_vm._s(button.label) + " ")]) : _vm._e()];
87781
88450
  })], 2)]);
87782
88451
  };
87783
- var default_take_photo_dialogvue_type_template_id_7de4bdd6_staticRenderFns = [];
87784
-
87785
- ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=script&lang=js&
87786
- /* harmony default export */ var default_take_photo_dialogvue_type_script_lang_js_ = ({
87787
- name: "default-take-photo-dialog",
87788
- data: () => {
87789
- return {
87790
- visibility: true,
87791
- viewerPhotoSrc: '',
87792
- scannerPhotoSrc: '',
87793
- cameraStream: '',
87794
- buttonList: [{
87795
- name: 'cancel',
87796
- label: '取消',
87797
- size: 'small'
87798
- }, {
87799
- name: 'take-photo',
87800
- label: '拍照',
87801
- type: 'primary',
87802
- size: 'small'
87803
- }, {
87804
- name: 'sure',
87805
- label: '确定',
87806
- type: 'primary',
87807
- size: 'small'
87808
- }]
87809
- };
87810
- },
87811
- mounted() {
87812
- this.$nextTick(() => {
87813
- this.initDefaultCamera();
87814
- });
87815
- },
87816
- beforeDestroy() {
87817
- this.cameraStream.getVideoTracks().forEach(track => {
87818
- track.stop();
87819
- });
87820
- },
87821
- methods: {
87822
- async initDefaultCamera() {
87823
- let video = this.$refs.monitor;
87824
- let canvas = this.$refs.photo;
87825
- console.log(video, canvas);
87826
- let videoObj = {
87827
- audio: false,
87828
- video: {
87829
- width: 1920,
87830
- height: 1080
87831
- }
87832
- };
87833
- if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
87834
- try {
87835
- let stream = await navigator.mediaDevices.getUserMedia(videoObj);
87836
- video.srcObject = stream;
87837
- video.play();
87838
- this.cameraStream = stream;
87839
- } catch (e) {
87840
- this.$message.error('没有可用的摄像头!');
87841
- console.log(e);
87842
- }
87843
- } else {
87844
- this.$message.error('调用摄像头失败,请在首页右上角我的设备中设置读拍照/人脸识别选项,并确保已为浏览器设置相关权限!');
87845
- }
87846
- },
87847
- takePicture() {
87848
- let video = this.$refs.monitor;
87849
- let canvas = this.$refs.photo;
87850
- let context = canvas.getContext('2d');
87851
- context.drawImage(video, 0, 0, 1920, 1080);
87852
- let img = canvas.toDataURL('image/png');
87853
- canvas.src = img;
87854
- this.viewerPhotoSrc = img;
87855
- this.scannerPhotoSrc = img.replace('data:image/png;base64,', '');
87856
- },
87857
- async buttonClickEvent(name) {
87858
- switch (name) {
87859
- case 'cancel':
87860
- this.visibility = false;
87861
- this.$emit('close');
87862
- break;
87863
- case 'take-photo':
87864
- this.takePicture();
87865
- break;
87866
- case 'sure':
87867
- let data = {
87868
- faceimg: this.scannerPhotoSrc
87869
- };
87870
- this.$emit('close', data);
87871
- this.visibility = false;
87872
- break;
87873
- }
87874
- }
87875
- }
87876
- });
87877
- ;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=script&lang=js&
87878
- /* harmony default export */ var dialog_default_take_photo_dialogvue_type_script_lang_js_ = (default_take_photo_dialogvue_type_script_lang_js_);
87879
- ;// 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/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=style&index=0&id=7de4bdd6&prod&lang=scss&
87880
- // extracted by mini-css-extract-plugin
87881
-
87882
- ;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=style&index=0&id=7de4bdd6&prod&lang=scss&
87883
-
87884
- ;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue
87885
-
87886
-
87887
-
87888
- ;
87889
-
87890
-
87891
- /* normalize component */
87892
-
87893
- var default_take_photo_dialog_component = normalizeComponent(
87894
- dialog_default_take_photo_dialogvue_type_script_lang_js_,
87895
- default_take_photo_dialogvue_type_template_id_7de4bdd6_render,
87896
- default_take_photo_dialogvue_type_template_id_7de4bdd6_staticRenderFns,
87897
- false,
87898
- null,
87899
- null,
87900
- null
87901
-
87902
- )
87903
-
87904
- /* harmony default export */ var default_take_photo_dialog = (default_take_photo_dialog_component.exports);
87905
- ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue?vue&type=template&id=5bbb0afc&scoped=true&
87906
- var wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_render = function render() {
87907
- var _vm = this,
87908
- _c = _vm._self._c;
87909
- return _vm.visibility ? _c('el-dialog', {
87910
- staticClass: "wei-rong-face-auth-dialog",
87911
- attrs: {
87912
- "title": "人脸识别",
87913
- "top": '5vh',
87914
- "width": "640px",
87915
- "visible": _vm.visibility,
87916
- "close-on-click-modal": false
87917
- },
87918
- on: {
87919
- "update:visible": function ($event) {
87920
- _vm.visibility = $event;
87921
- }
87922
- }
87923
- }, [_c('div', {
87924
- staticClass: "image-container"
87925
- }, [_c('img', {
87926
- staticStyle: {
87927
- "width": "600px",
87928
- "height": "450px"
87929
- },
87930
- attrs: {
87931
- "id": "photo",
87932
- "src": _vm.viewFaceImage
87933
- }
87934
- })])]) : _vm._e();
87935
- };
87936
- var wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_staticRenderFns = [];
87937
-
87938
- ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue?vue&type=script&lang=js&
88452
+ var default_take_photo_dialogvue_type_template_id_3194cb83_staticRenderFns = [];
87939
88453
 
87940
-
87941
- const wei_rong_face_auth_dialogvue_type_script_lang_js_BEGIN_DATA = 'data:image/jpg;base64,';
87942
- /* harmony default export */ var wei_rong_face_auth_dialogvue_type_script_lang_js_ = ({
87943
- name: "wei-rong-face-auth-dialog",
87944
- data: () => {
87945
- return {
87946
- visibility: true,
87947
- viewFaceImage: ''
87948
- };
87949
- },
87950
- async created() {
87951
- window.addEventListener(SCANNER_CAMERA_REFRESH_PHOTO_EVENT, message => {
87952
- if (message.type === SCANNER_CAMERA_REFRESH_PHOTO_EVENT) {
87953
- this.viewFaceImage = `${wei_rong_face_auth_dialogvue_type_script_lang_js_BEGIN_DATA}${message.scannerResultUrl}`;
87954
- }
87955
- });
87956
- let res = await WeiRongPluginService.faceValidateWithIdCardRead();
87957
- this.$message.success('认证成功');
87958
- setTimeout(() => {
87959
- this.$emit('close', res);
87960
- }, 1500);
87961
- }
87962
- });
87963
- ;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue?vue&type=script&lang=js&
87964
- /* harmony default export */ var dialog_wei_rong_face_auth_dialogvue_type_script_lang_js_ = (wei_rong_face_auth_dialogvue_type_script_lang_js_);
87965
- ;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue
87966
-
87967
-
87968
-
87969
-
87970
-
87971
- /* normalize component */
87972
- ;
87973
- var wei_rong_face_auth_dialog_component = normalizeComponent(
87974
- dialog_wei_rong_face_auth_dialogvue_type_script_lang_js_,
87975
- wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_render,
87976
- wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_staticRenderFns,
87977
- false,
87978
- null,
87979
- "5bbb0afc",
87980
- null
87981
-
87982
- )
87983
-
87984
- /* harmony default export */ var wei_rong_face_auth_dialog = (wei_rong_face_auth_dialog_component.exports);
87985
88454
  ;// CONCATENATED MODULE: ./packages/service/external-plugins/exit-and-entry-plugin.service.ts
87986
88455
 
87987
88456
  /**
@@ -87998,8 +88467,10 @@ var ExitAndEntryMethodCode;
87998
88467
  ExitAndEntryMethodCode["ManualRead"] = "ManualRead";
87999
88468
  /** 获取识别结果 */
88000
88469
  ExitAndEntryMethodCode["GetReadResult"] = "GetReadResult";
88470
+ /** 人脸识别 */
88471
+ ExitAndEntryMethodCode["FaceAuth"] = "IDAuth";
88001
88472
  })(ExitAndEntryMethodCode || (ExitAndEntryMethodCode = {}));
88002
- const NationalityEnum = {
88473
+ const exit_and_entry_plugin_service_NationalityEnum = {
88003
88474
  AND: "安道尔",
88004
88475
  AFG: "阿富汗",
88005
88476
  ATG: "安提瓜和巴布达",
@@ -88083,7 +88554,7 @@ const NationalityEnum = {
88083
88554
  GUM: "关岛",
88084
88555
  GNB: "几内亚比绍",
88085
88556
  GUY: "圭亚那",
88086
- HKG: "中国",
88557
+ HKG: "香港",
88087
88558
  HMD: "赫德岛和麦克唐纳群岛",
88088
88559
  HND: "洪都拉斯",
88089
88560
  HRV: "克罗地亚",
@@ -88127,7 +88598,7 @@ const NationalityEnum = {
88127
88598
  MKD: "马其顿",
88128
88599
  MLI: "马里",
88129
88600
  MMR: "缅甸",
88130
- MAC: "中国",
88601
+ MAC: "澳门",
88131
88602
  MTQ: "马提尼克",
88132
88603
  MRT: "毛里塔尼亚",
88133
88604
  MSR: "蒙塞拉特岛",
@@ -88226,7 +88697,7 @@ const NationalityEnum = {
88226
88697
  GBR: "英国",
88227
88698
  TTO: "特立尼达和多巴哥",
88228
88699
  VCT: "圣文森特和格林纳丁斯",
88229
- TWN: "中国",
88700
+ TWN: "台湾",
88230
88701
  NZL: "新西兰",
88231
88702
  SAU: "沙特阿拉伯",
88232
88703
  LAO: "老挝",
@@ -88252,8 +88723,8 @@ var SexEnum;
88252
88723
  SexEnum["MALE"] = "\u7537";
88253
88724
  SexEnum["FEMALE"] = "\u5973";
88254
88725
  })(SexEnum || (SexEnum = {}));
88255
- function convertNationality(nationality) {
88256
- return NationalityEnum[nationality];
88726
+ function exit_and_entry_plugin_service_convertNationality(nationality) {
88727
+ return exit_and_entry_plugin_service_NationalityEnum[nationality];
88257
88728
  }
88258
88729
  function urlToBase64(url) {
88259
88730
  return new Promise((resolve, reject) => {
@@ -88316,7 +88787,7 @@ async function formatNFCResult(data) {
88316
88787
  sex: SexEnum[sex] || '未知',
88317
88788
  cardId: doc_number,
88318
88789
  birthday: birth_DateFormat.replace('-', '').replace('-', ''),
88319
- nationality: convertNationality(state),
88790
+ nationality: exit_and_entry_plugin_service_convertNationality(state),
88320
88791
  validEnd: expired_DateFormat.replace('-', '').replace('-', ''),
88321
88792
  headImage: img.replace('data:image/png;base64,', '')
88322
88793
  };
@@ -88400,7 +88871,7 @@ async function formatPermanentResidencePermit(data) {
88400
88871
  sex: xbdm.replace('性', ''),
88401
88872
  cardId: zjhm || yjjlzhm,
88402
88873
  birthday: csrq,
88403
- nationality: convertNationality(gjdm),
88874
+ nationality: exit_and_entry_plugin_service_convertNationality(gjdm),
88404
88875
  validStart: yxqqsrq || zjqfrq,
88405
88876
  validEnd: yxqjzrq || zjzzrq,
88406
88877
  police: '中华人民共和国国家移民管理局',
@@ -88408,20 +88879,32 @@ async function formatPermanentResidencePermit(data) {
88408
88879
  };
88409
88880
  }
88410
88881
  class ExitAndEntryPluginService {
88411
- static async read(method) {
88412
- let url = '';
88882
+ static async read(method, data = {}) {
88883
+ let url = '',
88884
+ requestType = '',
88885
+ param;
88413
88886
  switch (method) {
88414
88887
  case ExitAndEntryMethodCode.GetStatus:
88415
88888
  url = `${ExitAndEntryPluginService.baseServiceUrl}/PassportReader/${method}`;
88889
+ requestType = 'get';
88416
88890
  break;
88417
88891
  case ExitAndEntryMethodCode.ManualRead:
88418
88892
  url = `${ExitAndEntryPluginService.baseServiceUrl}/PassportReader/${method}`;
88893
+ requestType = 'get';
88419
88894
  break;
88420
88895
  case ExitAndEntryMethodCode.GetReadResult:
88421
88896
  url = `${ExitAndEntryPluginService.baseServiceUrl}/PassportReader/${method}`;
88897
+ requestType = 'get';
88898
+ break;
88899
+ case ExitAndEntryMethodCode.FaceAuth:
88900
+ url = `${ExitAndEntryPluginService.baseServiceUrl}/PassportReader/${method}`;
88901
+ requestType = 'post';
88902
+ param = {
88903
+ ...data
88904
+ };
88422
88905
  break;
88423
88906
  }
88424
- let res = await custom_axios_CustomAxios.get(url);
88907
+ let res = await custom_axios_CustomAxios[requestType](url, param);
88425
88908
  return res;
88426
88909
  }
88427
88910
  static async getStatus() {
@@ -88513,8 +88996,303 @@ class ExitAndEntryPluginService {
88513
88996
  };
88514
88997
  return IDCardData;
88515
88998
  }
88999
+ static async faceAuth(image) {
89000
+ // PassportReader/IDAuth
89001
+ console.log('faceAuth=>', image);
89002
+ let res = await ExitAndEntryPluginService.read(ExitAndEntryMethodCode.FaceAuth, {
89003
+ imgBase64: image
89004
+ });
89005
+ while (res.ret != 0) {
89006
+ await new Promise(resolve => setTimeout(resolve, 1000));
89007
+ res = await ExitAndEntryPluginService.read(ExitAndEntryMethodCode.FaceAuth, {
89008
+ imgBase64: image
89009
+ });
89010
+ }
89011
+ console.log('人脸识别结束=>', res);
89012
+ }
88516
89013
  }
88517
89014
  _defineProperty(ExitAndEntryPluginService, "baseServiceUrl", 'http://127.0.0.1:7770');
89015
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=script&lang=js&
89016
+
89017
+ /* harmony default export */ var default_take_photo_dialogvue_type_script_lang_js_ = ({
89018
+ name: "default-take-photo-dialog",
89019
+ props: {
89020
+ readMachineType: {
89021
+ type: Number,
89022
+ default: 0
89023
+ }
89024
+ },
89025
+ data: () => {
89026
+ return {
89027
+ visibility: true,
89028
+ viewerPhotoSrc: '',
89029
+ scannerPhotoSrc: '',
89030
+ cameraStream: '',
89031
+ buttonList: [{
89032
+ name: 'cancel',
89033
+ label: '取消',
89034
+ size: 'small'
89035
+ }, {
89036
+ name: 'take-photo',
89037
+ label: '拍照',
89038
+ type: 'primary',
89039
+ size: 'small'
89040
+ }, {
89041
+ name: 'face-auth',
89042
+ label: '人脸识别',
89043
+ type: 'primary',
89044
+ size: 'small'
89045
+ }, {
89046
+ name: 'sure',
89047
+ label: '确定',
89048
+ type: 'primary',
89049
+ size: 'small'
89050
+ }]
89051
+ };
89052
+ },
89053
+ mounted() {
89054
+ this.$nextTick(() => {
89055
+ this.initDefaultCamera();
89056
+ });
89057
+ },
89058
+ beforeDestroy() {
89059
+ this.cameraStream.getVideoTracks().forEach(track => {
89060
+ track.stop();
89061
+ });
89062
+ },
89063
+ methods: {
89064
+ async initDefaultCamera() {
89065
+ let video = this.$refs.monitor;
89066
+ let canvas = this.$refs.photo;
89067
+ console.log(video, canvas);
89068
+ let videoObj = {
89069
+ audio: false,
89070
+ video: {
89071
+ width: 1920,
89072
+ height: 1080
89073
+ }
89074
+ };
89075
+ if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
89076
+ try {
89077
+ let stream = await navigator.mediaDevices.getUserMedia(videoObj);
89078
+ video.srcObject = stream;
89079
+ video.play();
89080
+ this.cameraStream = stream;
89081
+ } catch (e) {
89082
+ this.$message.error('没有可用的摄像头!');
89083
+ console.log(e);
89084
+ }
89085
+ } else {
89086
+ this.$message.error('调用摄像头失败,请在首页右上角我的设备中设置读拍照/人脸识别选项,并确保已为浏览器设置相关权限!');
89087
+ }
89088
+ },
89089
+ takePicture() {
89090
+ let video = this.$refs.monitor;
89091
+ let canvas = this.$refs.photo;
89092
+ let context = canvas.getContext('2d');
89093
+ context.drawImage(video, 0, 0, 1920, 1080);
89094
+ let img = canvas.toDataURL('image/png');
89095
+ canvas.src = img;
89096
+ this.viewerPhotoSrc = img;
89097
+ this.scannerPhotoSrc = img.replace('data:image/png;base64,', '');
89098
+ },
89099
+ _isShowButton(name) {
89100
+ switch (name) {
89101
+ case 'sure':
89102
+ return this.readMachineType !== 11;
89103
+ case 'face-auth':
89104
+ return this.readMachineType === 11;
89105
+ default:
89106
+ return true;
89107
+ }
89108
+ },
89109
+ async buttonClickEvent(name) {
89110
+ switch (name) {
89111
+ case 'cancel':
89112
+ this.visibility = false;
89113
+ this.$emit('close');
89114
+ break;
89115
+ case 'take-photo':
89116
+ this.takePicture();
89117
+ break;
89118
+ case 'sure':
89119
+ let data = {
89120
+ faceimg: this.scannerPhotoSrc
89121
+ };
89122
+ this.$emit('close', data);
89123
+ this.visibility = false;
89124
+ break;
89125
+ case 'face-auth':
89126
+ this.faceReaderEvent();
89127
+ break;
89128
+ }
89129
+ },
89130
+ async faceReaderEvent() {
89131
+ let idcardInfo;
89132
+ switch (this.readMachineType) {
89133
+ case 11:
89134
+ // 出入境
89135
+ idcardInfo = await ExitAndEntryPluginService.getReadResult();
89136
+ if (idcardInfo.info.cardType === '3' // 护照
89137
+ || idcardInfo.info.cardType === '12' // 港澳台通行证
89138
+ || idcardInfo.info.cardType === '2' // 港澳台身份证
89139
+ ) {
89140
+ this.compressImage('data:image/png;base64,' + this.scannerPhotoSrc, {
89141
+ quality: 0.05,
89142
+ // 压缩后图片的清晰度,取值0-1,不传默认为0.7,值越小,所绘制出的图像越模糊
89143
+ type: 'jpg'
89144
+ }).then(async result => {
89145
+ console.log('压缩结果=>', result);
89146
+ await ExitAndEntryPluginService.faceAuth(result.replace('data:image/png;base64,', ''));
89147
+ });
89148
+ } else {
89149
+ this.$message.error('当前证件不支持人脸识别');
89150
+ }
89151
+ }
89152
+ },
89153
+ compressImage(path, config) {
89154
+ return new Promise((resolve, reject) => {
89155
+ let img = new Image();
89156
+ img.src = path;
89157
+ img.onload = function () {
89158
+ let that = this;
89159
+ let w = that.width * config.quality;
89160
+ let h = that.height * config.quality;
89161
+ // let scale = w / h
89162
+ // w = config.width || config.height * scale
89163
+ // h = config.height || config.width / scale
89164
+ let quality = config.quality; // 默认图片质量为0.7
89165
+ // 生成canvas
89166
+ let canvas = document.createElement('canvas');
89167
+ let ctx = canvas.getContext('2d');
89168
+ // 创建属性节点
89169
+ let anw = document.createAttribute('width');
89170
+ anw.nodeValue = String(w);
89171
+ let anh = document.createAttribute('height');
89172
+ anh.nodeValue = String(h);
89173
+ canvas.setAttributeNode(anw);
89174
+ canvas.setAttributeNode(anh);
89175
+ ctx.drawImage(that, 0, 0, w, h);
89176
+ if (config.quality && config.quality <= 1 && config.quality > 0) {
89177
+ quality = config.quality;
89178
+ }
89179
+ let base64 = canvas.toDataURL(config.type, quality);
89180
+ // let blob = convertBase64UrlToBlob(base64)
89181
+ // 回调函数返回base64的值,也可根据自己的需求返回blob的值
89182
+ resolve(base64);
89183
+ };
89184
+ });
89185
+ }
89186
+ }
89187
+ });
89188
+ ;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=script&lang=js&
89189
+ /* harmony default export */ var dialog_default_take_photo_dialogvue_type_script_lang_js_ = (default_take_photo_dialogvue_type_script_lang_js_);
89190
+ ;// 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/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=style&index=0&id=3194cb83&prod&lang=scss&
89191
+ // extracted by mini-css-extract-plugin
89192
+
89193
+ ;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=style&index=0&id=3194cb83&prod&lang=scss&
89194
+
89195
+ ;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue
89196
+
89197
+
89198
+
89199
+ ;
89200
+
89201
+
89202
+ /* normalize component */
89203
+
89204
+ var default_take_photo_dialog_component = normalizeComponent(
89205
+ dialog_default_take_photo_dialogvue_type_script_lang_js_,
89206
+ default_take_photo_dialogvue_type_template_id_3194cb83_render,
89207
+ default_take_photo_dialogvue_type_template_id_3194cb83_staticRenderFns,
89208
+ false,
89209
+ null,
89210
+ null,
89211
+ null
89212
+
89213
+ )
89214
+
89215
+ /* harmony default export */ var default_take_photo_dialog = (default_take_photo_dialog_component.exports);
89216
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue?vue&type=template&id=5bbb0afc&scoped=true&
89217
+ var wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_render = function render() {
89218
+ var _vm = this,
89219
+ _c = _vm._self._c;
89220
+ return _vm.visibility ? _c('el-dialog', {
89221
+ staticClass: "wei-rong-face-auth-dialog",
89222
+ attrs: {
89223
+ "title": "人脸识别",
89224
+ "top": '5vh',
89225
+ "width": "640px",
89226
+ "visible": _vm.visibility,
89227
+ "close-on-click-modal": false
89228
+ },
89229
+ on: {
89230
+ "update:visible": function ($event) {
89231
+ _vm.visibility = $event;
89232
+ }
89233
+ }
89234
+ }, [_c('div', {
89235
+ staticClass: "image-container"
89236
+ }, [_c('img', {
89237
+ staticStyle: {
89238
+ "width": "600px",
89239
+ "height": "450px"
89240
+ },
89241
+ attrs: {
89242
+ "id": "photo",
89243
+ "src": _vm.viewFaceImage
89244
+ }
89245
+ })])]) : _vm._e();
89246
+ };
89247
+ var wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_staticRenderFns = [];
89248
+
89249
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue?vue&type=script&lang=js&
89250
+
89251
+
89252
+ const wei_rong_face_auth_dialogvue_type_script_lang_js_BEGIN_DATA = 'data:image/jpg;base64,';
89253
+ /* harmony default export */ var wei_rong_face_auth_dialogvue_type_script_lang_js_ = ({
89254
+ name: "wei-rong-face-auth-dialog",
89255
+ data: () => {
89256
+ return {
89257
+ visibility: true,
89258
+ viewFaceImage: ''
89259
+ };
89260
+ },
89261
+ async created() {
89262
+ window.addEventListener(SCANNER_CAMERA_REFRESH_PHOTO_EVENT, message => {
89263
+ if (message.type === SCANNER_CAMERA_REFRESH_PHOTO_EVENT) {
89264
+ this.viewFaceImage = `${wei_rong_face_auth_dialogvue_type_script_lang_js_BEGIN_DATA}${message.scannerResultUrl}`;
89265
+ }
89266
+ });
89267
+ let res = await WeiRongPluginService.faceValidateWithIdCardRead();
89268
+ this.$message.success('认证成功');
89269
+ setTimeout(() => {
89270
+ this.$emit('close', res);
89271
+ }, 1500);
89272
+ }
89273
+ });
89274
+ ;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue?vue&type=script&lang=js&
89275
+ /* harmony default export */ var dialog_wei_rong_face_auth_dialogvue_type_script_lang_js_ = (wei_rong_face_auth_dialogvue_type_script_lang_js_);
89276
+ ;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue
89277
+
89278
+
89279
+
89280
+
89281
+
89282
+ /* normalize component */
89283
+ ;
89284
+ var wei_rong_face_auth_dialog_component = normalizeComponent(
89285
+ dialog_wei_rong_face_auth_dialogvue_type_script_lang_js_,
89286
+ wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_render,
89287
+ wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_staticRenderFns,
89288
+ false,
89289
+ null,
89290
+ "5bbb0afc",
89291
+ null
89292
+
89293
+ )
89294
+
89295
+ /* harmony default export */ var wei_rong_face_auth_dialog = (wei_rong_face_auth_dialog_component.exports);
88518
89296
  ;// CONCATENATED MODULE: ./packages/service/external-plugins/pu-tian-plugin.service.ts
88519
89297
 
88520
89298
 
@@ -88884,32 +89662,42 @@ _defineProperty(PuTianPluginService, "requestStore", []);
88884
89662
  break;
88885
89663
  }
88886
89664
  case 1:
89665
+ // 丽水一体机
88887
89666
  this.readLSIDCardAndMatchFace();
88888
89667
  break;
88889
89668
  case 2:
88890
89669
  {
89670
+ // 沃斯德人证交互终端
88891
89671
  const data = await EWindowPassService.faceValidateWithIdCardRead();
88892
89672
  this.$emit('click', data);
88893
89673
  break;
88894
89674
  }
88895
89675
  case 3:
88896
89676
  {
89677
+ // 中正人脸识别
88897
89678
  const data = await MRAdbReadService.idCardRead();
88898
89679
  this.$emit('click', data);
88899
89680
  break;
88900
89681
  }
88901
89682
  case 5:
89683
+ // 良田
88902
89684
  this.readFacePhotoByELoam();
88903
89685
  break;
88904
89686
  case 6:
88905
89687
  {
89688
+ // 捷宇信息交互终端
88906
89689
  const data = await JieYueService.faceValidateWithIdCardRead();
88907
89690
  this.$emit('click', data);
88908
89691
  break;
88909
89692
  }
88910
89693
  case 10:
89694
+ // 国产客户端一体机
88911
89695
  this.openWEIRONGFaceValidateDialog();
88912
89696
  break;
89697
+ case 11:
89698
+ // 出入境设备
89699
+ this.readFacePhotoByDefault(this.readMachineType);
89700
+ break;
88913
89701
  default:
88914
89702
  this.$message.warning('请在首页右上角我的设备中设置读拍照/人脸识别选项!');
88915
89703
  break;
@@ -89055,13 +89843,15 @@ _defineProperty(PuTianPluginService, "requestStore", []);
89055
89843
  }).$mount(modalNode);
89056
89844
  },
89057
89845
  // 默认浏览器自带拍照
89058
- readFacePhotoByDefault() {
89846
+ readFacePhotoByDefault(readMachineType = 0) {
89059
89847
  const modalNode = document.createElement('div');
89060
89848
  document.body.appendChild(modalNode);
89061
89849
  const vm = new (external_commonjs_vue_commonjs2_vue_root_Vue_default())({
89062
89850
  render: h => {
89063
89851
  return h(default_take_photo_dialog, {
89064
- props: {},
89852
+ props: {
89853
+ readMachineType
89854
+ },
89065
89855
  on: {
89066
89856
  close: data => {
89067
89857
  if (data) {
@@ -89105,11 +89895,11 @@ _defineProperty(PuTianPluginService, "requestStore", []);
89105
89895
  ;
89106
89896
  var id_card_reader_button_component = normalizeComponent(
89107
89897
  src_id_card_reader_buttonvue_type_script_lang_js_,
89108
- id_card_reader_buttonvue_type_template_id_d4b32654_scoped_true_render,
89109
- id_card_reader_buttonvue_type_template_id_d4b32654_scoped_true_staticRenderFns,
89898
+ id_card_reader_buttonvue_type_template_id_1b7bbed8_scoped_true_render,
89899
+ id_card_reader_buttonvue_type_template_id_1b7bbed8_scoped_true_staticRenderFns,
89110
89900
  false,
89111
89901
  null,
89112
- "d4b32654",
89902
+ "1b7bbed8",
89113
89903
  null
89114
89904
 
89115
89905
  )
@@ -89124,6 +89914,855 @@ id_card_reader_button.install = Vue => {
89124
89914
  Vue.component(id_card_reader_button.name, id_card_reader_button);
89125
89915
  };
89126
89916
  /* harmony default export */ var id_card_reader_id_card_reader_button = (id_card_reader_button);
89917
+ ;// 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-nko/src/scanner-nko.vue?vue&type=template&id=304bcec5&
89918
+ var scanner_nkovue_type_template_id_304bcec5_render = function render() {
89919
+ var _vm = this,
89920
+ _c = _vm._self._c;
89921
+ return _c('el-container', {
89922
+ directives: [{
89923
+ name: "loading",
89924
+ rawName: "v-loading",
89925
+ value: _vm.pageLoading,
89926
+ expression: "pageLoading"
89927
+ }],
89928
+ staticClass: "scanner-nko",
89929
+ attrs: {
89930
+ "element-loading-text": _vm.pageLoadingText
89931
+ }
89932
+ }, [_c('el-aside', {
89933
+ staticClass: "container-aside"
89934
+ }, [_c('div', {
89935
+ staticClass: "container-title"
89936
+ }, [_vm._v("扫描配置")]), _c('div', {
89937
+ staticClass: "scan-config-form"
89938
+ }, [_c('el-form', {
89939
+ attrs: {
89940
+ "model": _vm.scanConfig,
89941
+ "label-position": "right",
89942
+ "label-width": "72px",
89943
+ "disabled": !_vm.deviceOpend
89944
+ }
89945
+ }, [_c('el-form-item', {
89946
+ attrs: {
89947
+ "label": "扫描源"
89948
+ }
89949
+ }, [_c('el-select', {
89950
+ attrs: {
89951
+ "disabled": _vm.deviceWorking,
89952
+ "placeholder": "请选择扫描源"
89953
+ },
89954
+ on: {
89955
+ "change": _vm.openDeivce
89956
+ },
89957
+ model: {
89958
+ value: _vm.scanConfig.deviceId,
89959
+ callback: function ($$v) {
89960
+ _vm.$set(_vm.scanConfig, "deviceId", $$v);
89961
+ },
89962
+ expression: "scanConfig.deviceId"
89963
+ }
89964
+ }, _vm._l(_vm.deviceList, function (item) {
89965
+ return _c('el-option', {
89966
+ key: item.deviceId,
89967
+ attrs: {
89968
+ "label": item.deviceId,
89969
+ "value": item.deviceId
89970
+ }
89971
+ });
89972
+ }), 1)], 1)], 1), _c('el-form', {
89973
+ attrs: {
89974
+ "model": _vm.scanConfig,
89975
+ "label-position": "right",
89976
+ "label-width": "72px",
89977
+ "disabled": !_vm.isDeviceReady
89978
+ }
89979
+ }, [_c('el-form-item', {
89980
+ attrs: {
89981
+ "label": "进纸模式"
89982
+ }
89983
+ }, [_c('el-select', {
89984
+ attrs: {
89985
+ "placeholder": "请选择进纸模式"
89986
+ },
89987
+ model: {
89988
+ value: _vm.scanConfig.source,
89989
+ callback: function ($$v) {
89990
+ _vm.$set(_vm.scanConfig, "source", $$v);
89991
+ },
89992
+ expression: "scanConfig.source"
89993
+ }
89994
+ }, _vm._l(_vm.sourceOptions, function (item) {
89995
+ return _c('el-option', {
89996
+ key: item,
89997
+ attrs: {
89998
+ "label": item,
89999
+ "value": item
90000
+ }
90001
+ });
90002
+ }), 1)], 1), _c('el-form-item', {
90003
+ attrs: {
90004
+ "label": "扫描颜色"
90005
+ }
90006
+ }, [_c('el-select', {
90007
+ attrs: {
90008
+ "placeholder": "请选择"
90009
+ },
90010
+ model: {
90011
+ value: _vm.scanConfig.mode,
90012
+ callback: function ($$v) {
90013
+ _vm.$set(_vm.scanConfig, "mode", $$v);
90014
+ },
90015
+ expression: "scanConfig.mode"
90016
+ }
90017
+ }, _vm._l(_vm.modeOptions, function (item) {
90018
+ return _c('el-option', {
90019
+ key: item,
90020
+ attrs: {
90021
+ "label": item,
90022
+ "value": item
90023
+ }
90024
+ });
90025
+ }), 1)], 1), _c('el-form-item', {
90026
+ attrs: {
90027
+ "label": "分辨率"
90028
+ }
90029
+ }, [_c('el-select', {
90030
+ attrs: {
90031
+ "placeholder": "请选择分辨率"
90032
+ },
90033
+ model: {
90034
+ value: _vm.scanConfig.resolution,
90035
+ callback: function ($$v) {
90036
+ _vm.$set(_vm.scanConfig, "resolution", $$v);
90037
+ },
90038
+ expression: "scanConfig.resolution"
90039
+ }
90040
+ }, _vm._l(_vm.resolutionOptions, function (item) {
90041
+ return _c('el-option', {
90042
+ key: item,
90043
+ attrs: {
90044
+ "label": item,
90045
+ "value": item
90046
+ }
90047
+ });
90048
+ }), 1)], 1), _c('el-form-item', {
90049
+ attrs: {
90050
+ "label": "纸张类型"
90051
+ }
90052
+ }, [_c('el-select', {
90053
+ attrs: {
90054
+ "placeholder": "请选择纸张类型"
90055
+ },
90056
+ model: {
90057
+ value: _vm.scanConfig.paperSize,
90058
+ callback: function ($$v) {
90059
+ _vm.$set(_vm.scanConfig, "paperSize", $$v);
90060
+ },
90061
+ expression: "scanConfig.paperSize"
90062
+ }
90063
+ }, _vm._l(_vm.paperSizeOptions, function (item) {
90064
+ return _c('el-option', {
90065
+ key: item,
90066
+ attrs: {
90067
+ "label": item,
90068
+ "value": item
90069
+ }
90070
+ });
90071
+ }), 1)], 1), _c('el-form-item', {
90072
+ attrs: {
90073
+ "label": "文件格式"
90074
+ }
90075
+ }, [_c('el-select', {
90076
+ attrs: {
90077
+ "placeholder": "请选择"
90078
+ },
90079
+ model: {
90080
+ value: _vm.scanConfig.fileFormat,
90081
+ callback: function ($$v) {
90082
+ _vm.$set(_vm.scanConfig, "fileFormat", $$v);
90083
+ },
90084
+ expression: "scanConfig.fileFormat"
90085
+ }
90086
+ }, _vm._l(_vm.fileFormatOptions, function (item) {
90087
+ return _c('el-option', {
90088
+ key: item,
90089
+ attrs: {
90090
+ "label": item,
90091
+ "value": item
90092
+ }
90093
+ });
90094
+ }), 1)], 1)], 1), _c('div', {
90095
+ staticClass: "text-right"
90096
+ }, [_c('el-button', {
90097
+ attrs: {
90098
+ "type": "primary"
90099
+ },
90100
+ on: {
90101
+ "click": _vm.initScanServiceAPI
90102
+ }
90103
+ }, [_vm._v("连接")]), _c('el-button', {
90104
+ attrs: {
90105
+ "type": "primary",
90106
+ "disabled": !_vm.isDeviceReady || _vm.deviceWorking
90107
+ },
90108
+ on: {
90109
+ "click": _vm.doScan
90110
+ }
90111
+ }, [_vm._v("扫描")])], 1)], 1)]), _c('el-container', [_c('el-main', {
90112
+ staticClass: "container-main"
90113
+ }, [_c('div', {
90114
+ staticClass: "container-title"
90115
+ }, [_vm._v("扫描结果")]), _c('el-checkbox', {
90116
+ attrs: {
90117
+ "indeterminate": _vm.isIndeterminate
90118
+ },
90119
+ on: {
90120
+ "change": _vm.handleCheckAllChange
90121
+ },
90122
+ model: {
90123
+ value: _vm.checkAll,
90124
+ callback: function ($$v) {
90125
+ _vm.checkAll = $$v;
90126
+ },
90127
+ expression: "checkAll"
90128
+ }
90129
+ }, [_vm._v("全选")]), _c('div', {
90130
+ staticClass: "image-list"
90131
+ }, _vm._l(_vm.scanFileList, function (item, index) {
90132
+ return _c('div', {
90133
+ key: item.name,
90134
+ class: {
90135
+ 'image-list-item': true,
90136
+ 'image-checked': item.checked
90137
+ }
90138
+ }, [_c('el-image', {
90139
+ attrs: {
90140
+ "src": item.url,
90141
+ "preview-src-list": _vm.imgUrls,
90142
+ "initial-index": _vm.initialIndex
90143
+ },
90144
+ on: {
90145
+ "click": function ($event) {
90146
+ return _vm.previewImg(index);
90147
+ }
90148
+ }
90149
+ }), _c('div', {
90150
+ staticClass: "image-actions"
90151
+ }, [_c('el-checkbox', {
90152
+ on: {
90153
+ "change": _vm.handleCheckedChange
90154
+ },
90155
+ model: {
90156
+ value: item.checked,
90157
+ callback: function ($$v) {
90158
+ _vm.$set(item, "checked", $$v);
90159
+ },
90160
+ expression: "item.checked"
90161
+ }
90162
+ }, [_vm._v(_vm._s(item.name))]), _c('el-button', {
90163
+ staticStyle: {
90164
+ "color": "red"
90165
+ },
90166
+ attrs: {
90167
+ "type": "text",
90168
+ "icon": "el-icon-delete"
90169
+ },
90170
+ on: {
90171
+ "click": function ($event) {
90172
+ return _vm.deleteFileEvent(index);
90173
+ }
90174
+ }
90175
+ }), _c('el-button', {
90176
+ attrs: {
90177
+ "type": "text",
90178
+ "icon": "el-icon-upload2"
90179
+ },
90180
+ on: {
90181
+ "click": function ($event) {
90182
+ return _vm.sendScannerResult(item);
90183
+ }
90184
+ }
90185
+ })], 1)], 1);
90186
+ }), 0)], 1), _c('el-footer', [_c('div', {
90187
+ staticClass: "text-right"
90188
+ }, [_c('el-button', {
90189
+ attrs: {
90190
+ "size": "small",
90191
+ "type": "primary",
90192
+ "disabled": _vm.scanFileList.length === 0
90193
+ },
90194
+ on: {
90195
+ "click": _vm.clearImgList
90196
+ }
90197
+ }, [_vm._v("清空")]), _c('el-button', {
90198
+ attrs: {
90199
+ "size": "small",
90200
+ "type": "primary",
90201
+ "disabled": _vm.scanFileList.length === 0
90202
+ },
90203
+ on: {
90204
+ "click": _vm.batchDelFilesEvent
90205
+ }
90206
+ }, [_vm._v("批量删除")]), _c('el-button', {
90207
+ attrs: {
90208
+ "size": "small",
90209
+ "type": "primary",
90210
+ "disabled": _vm.scanFileList.length === 0
90211
+ },
90212
+ on: {
90213
+ "click": function ($event) {
90214
+ return _vm.sendScannerResult();
90215
+ }
90216
+ }
90217
+ }, [_vm._v("上传")])], 1)])], 1)], 1);
90218
+ };
90219
+ var scanner_nkovue_type_template_id_304bcec5_staticRenderFns = [];
90220
+
90221
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-exception.stack.js
90222
+ var web_dom_exception_stack = __webpack_require__(2801);
90223
+ ;// CONCATENATED MODULE: ./packages/service/external-plugins/nko-plugin-socket.service.ts
90224
+
90225
+
90226
+
90227
+ /**
90228
+ * 赞彩五合一设备
90229
+ *
90230
+ * */
90231
+ var NkoMethodCode;
90232
+ (function (NkoMethodCode) {
90233
+ /** 扫描 */
90234
+ NkoMethodCode["scan"] = "scan";
90235
+ })(NkoMethodCode || (NkoMethodCode = {}));
90236
+ var NkoMethodScanFunction;
90237
+ (function (NkoMethodScanFunction) {
90238
+ /** 获取扫描仪 */
90239
+ NkoMethodScanFunction["getScanDeivceList"] = "001001";
90240
+ /** 选中指定扫描仪并打开 */
90241
+ NkoMethodScanFunction["openScanDeivce"] = "001002";
90242
+ /** 获取选中扫描仪可配置项 */
90243
+ NkoMethodScanFunction["getScanOptions"] = "001003";
90244
+ /** 常用参数的便捷配置能力(进纸模式、色彩、尺寸、DPI) */
90245
+ NkoMethodScanFunction["setScanBasicOptions"] = "001007";
90246
+ /** 扫描 */
90247
+ NkoMethodScanFunction["scan"] = "001008";
90248
+ })(NkoMethodScanFunction || (NkoMethodScanFunction = {}));
90249
+ const NkoMethodDesc = {
90250
+ [NkoMethodCode.scan]: '扫描'
90251
+ };
90252
+ class NkoService {
90253
+ static startConnect(method) {
90254
+ if (this.ws && this.ws.readyState === WebSocket.OPEN) {
90255
+ return this;
90256
+ }
90257
+ let webSocketUrl = '';
90258
+ switch (method) {
90259
+ case NkoMethodCode.scan:
90260
+ webSocketUrl = this.scanWebSocketUrl;
90261
+ break;
90262
+ default:
90263
+ webSocketUrl = this.iReadCardWebSocketUrl;
90264
+ break;
90265
+ }
90266
+ const ws = new WebSocket(webSocketUrl);
90267
+ let resolved;
90268
+ const onConnect = new Promise(resolve => {
90269
+ resolved = resolve;
90270
+ });
90271
+ ws.onopen = () => {
90272
+ resolved(true);
90273
+ };
90274
+ ws.onmessage = event => {
90275
+ this.handleMessage(event);
90276
+ };
90277
+ ws.onclose = () => this.handleClose();
90278
+ ws.onerror = () => this.handleError();
90279
+ this.ws = ws;
90280
+ return onConnect;
90281
+ }
90282
+ static handleError() {
90283
+ for (const type in this.requestStore) {
90284
+ this.requestStore.forEach(({
90285
+ reject
90286
+ }) => {
90287
+ reject('handleError');
90288
+ });
90289
+ }
90290
+ throw Error('统一插件平台赞彩五合一设备功能加载失败');
90291
+ }
90292
+ static handleClose() {
90293
+ for (const type in this.requestStore) {
90294
+ this.requestStore.forEach(({
90295
+ reject
90296
+ }) => {
90297
+ reject('close');
90298
+ });
90299
+ }
90300
+ }
90301
+ static handleMessage(msg) {
90302
+ let data = '';
90303
+ try {
90304
+ data = JSON.parse(msg.data);
90305
+ } catch (e) {
90306
+ data = '';
90307
+ }
90308
+ if (data['function'] === "001008" && data['code'] === 0) {
90309
+ return;
90310
+ } else if (data['function'] === "001010") {
90311
+ return this.scanCallback(data);
90312
+ } else {
90313
+ this.requestStore.forEach(({
90314
+ resolve
90315
+ }) => {
90316
+ resolve(data);
90317
+ });
90318
+ this.requestStore = [];
90319
+ }
90320
+ // this.ws.close();
90321
+ }
90322
+
90323
+ static async read(method, functionCode, params = {}) {
90324
+ await this.startConnect(method);
90325
+ const methodDesc = NkoMethodDesc[method];
90326
+ if (this.ws.readyState === 1) {
90327
+ console.log(methodDesc + '连接成功');
90328
+ let jsonString;
90329
+ switch (method) {
90330
+ case NkoMethodCode.scan:
90331
+ jsonString = JSON.stringify({
90332
+ function: functionCode,
90333
+ traceId: '',
90334
+ params
90335
+ });
90336
+ break;
90337
+ default:
90338
+ jsonString = '';
90339
+ break;
90340
+ }
90341
+ this.ws.send(jsonString);
90342
+ return new Promise((resolve, reject) => {
90343
+ if (!this.requestStore) {
90344
+ this.requestStore = [];
90345
+ }
90346
+ this.requestStore.push({
90347
+ resolve,
90348
+ reject
90349
+ });
90350
+ });
90351
+ } else {
90352
+ throw Error('统一插件平台' + methodDesc + '未准备完成');
90353
+ }
90354
+ }
90355
+ /**
90356
+ * 获取扫描仪
90357
+ * @returns deviceId:扫描仪设备 ID
90358
+ */
90359
+ static async getDeivceList() {
90360
+ const response = await NkoService.read(NkoMethodCode.scan, NkoMethodScanFunction.getScanDeivceList);
90361
+ if (!response) {
90362
+ throw Error('未匹配可用的扫描仪设备');
90363
+ }
90364
+ if (response.code !== 0) {
90365
+ throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
90366
+ }
90367
+ console.log('获取扫描仪==>', response);
90368
+ return response.data;
90369
+ }
90370
+ /**
90371
+ * 选中指定扫描仪并打开
90372
+ * @param scannerId 选中的扫描仪 ID
90373
+ */
90374
+ static async openScanDeivce(scannerId) {
90375
+ const response = await NkoService.read(NkoMethodCode.scan, NkoMethodScanFunction.openScanDeivce, {
90376
+ scannerId
90377
+ });
90378
+ if (!response) {
90379
+ throw Error('未匹配可用的扫描仪设备');
90380
+ }
90381
+ if (response.code !== 0) {
90382
+ throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
90383
+ }
90384
+ console.log('选中指定扫描仪并打开==>', response);
90385
+ return response;
90386
+ }
90387
+ /**
90388
+ * 获取选中扫描仪可配置项
90389
+ * @returns 选择扫描仪的可配置项
90390
+ */
90391
+ static async getScanOptions() {
90392
+ const response = await NkoService.read(NkoMethodCode.scan, NkoMethodScanFunction.getScanOptions);
90393
+ if (!response) {
90394
+ throw Error('未匹配可用的扫描仪设备');
90395
+ }
90396
+ if (response.code !== 0) {
90397
+ throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
90398
+ }
90399
+ console.log('获取选中扫描仪可配置项==>', response);
90400
+ return response.data;
90401
+ }
90402
+ /**
90403
+ * 常用参数的便捷配置能力(进纸模式、色彩、尺寸、DPI)
90404
+ */
90405
+ static async setScanBasicOptions(config) {
90406
+ // {
90407
+ // "source": "Adf-front",
90408
+ // "mode": "Color",
90409
+ // "image-format": "jpeg"
90410
+ // }
90411
+ const response = await NkoService.read(NkoMethodCode.scan, NkoMethodScanFunction.setScanBasicOptions, config);
90412
+ if (!response) {
90413
+ throw Error('未匹配可用的扫描仪设备');
90414
+ }
90415
+ if (response.code !== 0) {
90416
+ throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
90417
+ }
90418
+ console.log('设置配置项==>', response);
90419
+ return response;
90420
+ }
90421
+ /**
90422
+ * 扫描
90423
+ * @param fileFormat 文件保存格式,若为空以当前驱动配置格式扫描
90424
+ * @returns
90425
+ */
90426
+ static async scan(fileFormat, fileSavePath = 'C:\\ScanResult', fileNamePrefix = '', fileNameFormat = '') {
90427
+ this.fileList = [];
90428
+ const response = await NkoService.read(NkoMethodCode.scan, NkoMethodScanFunction.scan, {
90429
+ fileFormat: `.${fileFormat}`,
90430
+ // 保存路径,若为空则取服务配置文件路径
90431
+ fileSavePath,
90432
+ fileType: "Base64",
90433
+ // 保存的文件名前缀,若为空直接追加方式命名
90434
+ fileNamePrefix,
90435
+ // 保存文件的追加命名方式
90436
+ // 1. index - 四位数自增
90437
+ // 例:xx 文档_0001.tiff
90438
+ // 2. datetime - 扫描日期时间
90439
+ // 例: xx 文档_20231015164735.tiff
90440
+ // 3. guid - GUID
90441
+ // 例 :xx 文 档 _f47ac10b-58cc-4372-a567-0e02b3d4.tiff
90442
+ // 若为空以 index 模式命名
90443
+ fileNameFormat,
90444
+ // 是否返回文件 md5 信息,默认不返回
90445
+ fileMd5Enabled: false
90446
+ });
90447
+ if (!response) {
90448
+ throw Error('未匹配可用的扫描仪设备');
90449
+ }
90450
+ if (response.code !== 0) {
90451
+ throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
90452
+ }
90453
+ console.log('扫描==>', response);
90454
+ if (response.function === "001011") {
90455
+ return this.fileList;
90456
+ }
90457
+ return response;
90458
+ }
90459
+ /**
90460
+ * 扫描回调(单张)
90461
+ */
90462
+ static scanCallback(response) {
90463
+ if (response.code !== 0) {
90464
+ throw Error(response.msg);
90465
+ } else {
90466
+ const fileName = response.data.fileName,
90467
+ fileFormat = fileName.substr(fileName.lastIndexOf(".") + 1);
90468
+ let dataUrl;
90469
+ //Tiff不能直接显示在html,需要处理
90470
+ if (fileFormat === "tiff" || fileFormat === "tif") {
90471
+ // dataUrl = this.getTiffDataUrl(response.data.fileResult);
90472
+ } else {
90473
+ dataUrl = `data:image/${fileFormat};base64,${response.data.fileResult}`;
90474
+ }
90475
+ return this.fileList.push({
90476
+ name: fileName,
90477
+ url: dataUrl
90478
+ });
90479
+ }
90480
+ }
90481
+ /**
90482
+ * 扫描完成回调
90483
+ */
90484
+ static completeCallback(response) {
90485
+ if (response.code !== 0) {
90486
+ throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
90487
+ } else {
90488
+ console.log(response.data ? response.data : response.msg);
90489
+ }
90490
+ }
90491
+ //将Tiff base64转为可在html上正常显示的dataUrl base64
90492
+ /*static getTiffDataUrl(base64Str) {
90493
+ var buffer = this.base64ToUint8Array(base64Str);
90494
+ var tiff = new Tiff({ buffer: buffer });
90495
+ return tiff.toDataURL();
90496
+ }*/
90497
+ //Base64转为ArrayBuffer
90498
+ static base64ToUint8Array(base64String) {
90499
+ const padding = "=".repeat((4 - base64String.length % 4) % 4);
90500
+ const base64 = (base64String + padding).replace(/\-/g, "+").replace(/_/g, "/");
90501
+ const rawData = window.atob(base64);
90502
+ const outputArray = new Uint8Array(rawData.length);
90503
+ for (let i = 0; i < rawData.length; ++i) {
90504
+ outputArray[i] = rawData.charCodeAt(i);
90505
+ }
90506
+ return outputArray;
90507
+ }
90508
+ }
90509
+ _defineProperty(NkoService, "iReadCardWebSocketUrl", '');
90510
+ _defineProperty(NkoService, "scanWebSocketUrl", 'ws://127.0.0.1:51818');
90511
+ _defineProperty(NkoService, "ws", void 0);
90512
+ _defineProperty(NkoService, "requestStore", []);
90513
+ _defineProperty(NkoService, "fileList", []);
90514
+ ;// 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-nko/src/scanner-nko.vue?vue&type=script&lang=js&
90515
+
90516
+
90517
+ /* harmony default export */ var scanner_nkovue_type_script_lang_js_ = ({
90518
+ name: 'scanner-nko',
90519
+ components: {},
90520
+ props: {
90521
+ /**
90522
+ * 保存路径,若为空则取服务配置文件路径
90523
+ */
90524
+ fileSavePath: {
90525
+ default: '',
90526
+ type: String
90527
+ },
90528
+ /**
90529
+ * 保存的文件名前缀,若为空直接追加方式命名
90530
+ */
90531
+ fileNamePrefix: {
90532
+ default: '',
90533
+ type: String
90534
+ },
90535
+ /**
90536
+ * 保存文件的追加命名方式
90537
+ * 1. index - 四位数自增
90538
+ * 例:xx 文档_0001.tiff
90539
+ * 2. datetime - 扫描日期时间
90540
+ * 例: xx 文档_20231015164735.tiff
90541
+ * 3. guid - GUID
90542
+ * 例 :xx 文 档 _f47ac10b-58cc-4372-a567-0e02b3d4.tiff
90543
+ * 若为空以 index 模式命名
90544
+ */
90545
+ fileNameFormat: {
90546
+ default: '',
90547
+ type: String
90548
+ }
90549
+ },
90550
+ data: () => {
90551
+ return {
90552
+ //页面整体遮罩
90553
+ pageLoading: false,
90554
+ pageLoadingText: '正在配置相关设置',
90555
+ //扫描设备列表
90556
+ deviceList: [],
90557
+ //设备是否已连接
90558
+ deviceOpend: false,
90559
+ //设备是否繁忙
90560
+ deviceWorking: false,
90561
+ //扫描配置
90562
+ scanConfig: {
90563
+ deviceId: null,
90564
+ source: null,
90565
+ resolution: null,
90566
+ mode: null,
90567
+ paperSize: null,
90568
+ fileFormat: null
90569
+ },
90570
+ //进纸模式
90571
+ sourceOptions: [],
90572
+ //扫描颜色
90573
+ modeOptions: [],
90574
+ //分辨率
90575
+ resolutionOptions: [],
90576
+ //纸张类型
90577
+ paperSizeOptions: [],
90578
+ //文件格式
90579
+ fileFormatOptions: [],
90580
+ //中间图片数据 {name:'',url:'',checked:false}
90581
+ scanFileList: [],
90582
+ initialIndex: 0,
90583
+ scannerResult: '',
90584
+ isIndeterminate: false,
90585
+ checkAll: false
90586
+ };
90587
+ },
90588
+ computed: {
90589
+ //扫描设备是否可用
90590
+ isDeviceReady() {
90591
+ return this.scanConfig.deviceId && this.deviceOpend;
90592
+ },
90593
+ imgUrls() {
90594
+ return this.scanFileList.map(item => item.url);
90595
+ }
90596
+ },
90597
+ created() {},
90598
+ methods: {
90599
+ handleCheckAllChange(val) {
90600
+ this.scanFileList.forEach(data => {
90601
+ data.checked = val;
90602
+ });
90603
+ this.isIndeterminate = false;
90604
+ },
90605
+ handleCheckedChange() {
90606
+ const checkedCount = this.scanFileList.filter(data => data.checked).length;
90607
+ this.isIndeterminate = checkedCount > 0 && checkedCount < this.scanFileList.length;
90608
+ this.checkAll = this.scanFileList.length > 0 && checkedCount === this.scanFileList.length;
90609
+ },
90610
+ /**
90611
+ * 初始化ScanServiceAPI连接
90612
+ */
90613
+ async initScanServiceAPI() {
90614
+ this.pageLoadingText = '正在连接扫描服务,请稍候...';
90615
+ this.pageLoading = true;
90616
+ // 获取设备列表
90617
+ this.deviceList = await NkoService.getDeivceList();
90618
+ this.deviceOpend = true;
90619
+ this.pageLoading = false;
90620
+ },
90621
+ /**
90622
+ * 扫描服务关闭时回调
90623
+ */
90624
+ wsCloseCallback() {
90625
+ this.$message.warning('扫描服务连接已断开');
90626
+ this.pageLoading = false;
90627
+ this.resetData();
90628
+ this.deviceList = [];
90629
+ this.scanConfig.deviceId = null;
90630
+ },
90631
+ /**
90632
+ * 重置数据
90633
+ */
90634
+ resetData() {
90635
+ this.scanConfig.source = null;
90636
+ this.scanConfig.resolution = null;
90637
+ this.scanConfig.mode = null;
90638
+ this.scanConfig.paperSideviceOpendze = null;
90639
+ this.scanConfig.fileFormat = null;
90640
+ this.sourceOptions = [];
90641
+ this.modeOptions = [];
90642
+ this.resolutionOptions = [];
90643
+ this.paperSizeOptions = [];
90644
+ this.fileFormatOptions = [];
90645
+ this.deviceOpend = false;
90646
+ this.deviceWorking = false;
90647
+ },
90648
+ /**
90649
+ * 选择扫描设备
90650
+ */
90651
+ openDeivce() {
90652
+ this.pageLoadingText = '正在设置扫描源,请稍后...';
90653
+ this.pageLoading = true;
90654
+
90655
+ //重置扫描配置
90656
+ this.resetData();
90657
+ // 获取扫描仪可配置项
90658
+ this.getScanOptions();
90659
+ },
90660
+ /**
90661
+ * 获取扫描仪可配置项
90662
+ */
90663
+ async getScanOptions() {
90664
+ this.pageLoadingText = '正在获取扫描仪能力,请稍后...';
90665
+ this.pageLoading = true;
90666
+ await NkoService.openScanDeivce(this.scanConfig.deviceId);
90667
+ var options = await NkoService.getScanOptions();
90668
+ this.sourceOptions = options.source;
90669
+ this.modeOptions = options.mode;
90670
+ this.resolutionOptions = options.resolution;
90671
+ this.paperSizeOptions = options['paper-size'];
90672
+ this.fileFormatOptions = options['image-format'];
90673
+ this.scanConfig.source = this.sourceOptions[0] || null;
90674
+ this.scanConfig.mode = this.modeOptions[0] || null;
90675
+ this.scanConfig.resolution = this.resolutionOptions[0] || null;
90676
+ this.scanConfig.paperSize = this.paperSizeOptions[0] || null;
90677
+ this.scanConfig.fileFormat = this.fileFormatOptions[0] || null;
90678
+ this.deviceOpend = true;
90679
+ this.pageLoading = false;
90680
+ },
90681
+ /**
90682
+ * 点击扫描
90683
+ */
90684
+ async doScan() {
90685
+ if (!this.isDeviceReady || this.deviceWorking) {
90686
+ return;
90687
+ }
90688
+ this.pageLoadingText = '正在提交扫描请求,请稍后...';
90689
+ this.pageLoading = true;
90690
+ await NkoService.setScanBasicOptions({
90691
+ source: this.scanConfig.source,
90692
+ mode: this.scanConfig.mode,
90693
+ 'paper-size': this.scanConfig.paperSize,
90694
+ resolution: this.scanConfig.resolution
90695
+ });
90696
+ const data = await NkoService.scan(this.scanConfig.fileFormat, this.fileSavePath, this.fileNamePrefix, this.fileNameFormat);
90697
+ this.scanFileList = [...this.scanFileList, ...data];
90698
+ this.pageLoading = false;
90699
+ },
90700
+ //预览
90701
+ previewImg(index) {
90702
+ this.initialIndex = index;
90703
+ },
90704
+ clearImgList() {
90705
+ this.scanFileList = [];
90706
+ },
90707
+ deleteFileEvent(index) {
90708
+ this.scanFileList.splice(index, 1);
90709
+ },
90710
+ batchDelFilesEvent() {
90711
+ let list = [];
90712
+ this.scanFileList.forEach(data => {
90713
+ if (!data.checked) list.push(data);
90714
+ });
90715
+ this.scanFileList = list;
90716
+ },
90717
+ sendScannerResult(data = null) {
90718
+ const list = data ? [data] : this.scanFileList.filter(data => data.checked);
90719
+ if (!list || list.length === 0) return;
90720
+ this.$emit('send-scanner-result', list.map(data => ({
90721
+ name: data.name,
90722
+ url: data.url
90723
+ })));
90724
+ }
90725
+ }
90726
+ });
90727
+ ;// CONCATENATED MODULE: ./packages/scanner/scanner-nko/src/scanner-nko.vue?vue&type=script&lang=js&
90728
+ /* harmony default export */ var src_scanner_nkovue_type_script_lang_js_ = (scanner_nkovue_type_script_lang_js_);
90729
+ ;// 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-nko/src/scanner-nko.vue?vue&type=style&index=0&id=304bcec5&prod&lang=scss&
90730
+ // extracted by mini-css-extract-plugin
90731
+
90732
+ ;// CONCATENATED MODULE: ./packages/scanner/scanner-nko/src/scanner-nko.vue?vue&type=style&index=0&id=304bcec5&prod&lang=scss&
90733
+
90734
+ ;// CONCATENATED MODULE: ./packages/scanner/scanner-nko/src/scanner-nko.vue
90735
+
90736
+
90737
+
90738
+ ;
90739
+
90740
+
90741
+ /* normalize component */
90742
+
90743
+ var scanner_nko_component = normalizeComponent(
90744
+ src_scanner_nkovue_type_script_lang_js_,
90745
+ scanner_nkovue_type_template_id_304bcec5_render,
90746
+ scanner_nkovue_type_template_id_304bcec5_staticRenderFns,
90747
+ false,
90748
+ null,
90749
+ null,
90750
+ null
90751
+
90752
+ )
90753
+
90754
+ /* harmony default export */ var scanner_nko = (scanner_nko_component.exports);
90755
+ ;// CONCATENATED MODULE: ./packages/scanner/scanner-nko/index.js
90756
+ /**
90757
+ * @author: shenyz
90758
+ * @date: 2025-02-24
90759
+ * @description:index 赞彩五合一设备扫描功能
90760
+ */
90761
+
90762
+ scanner_nko.install = Vue => {
90763
+ Vue.component(scanner_nko.name, scanner_nko);
90764
+ };
90765
+ /* harmony default export */ var scanner_scanner_nko = (scanner_nko);
89127
90766
  ;// CONCATENATED MODULE: ./packages/index.js
89128
90767
 
89129
90768
 
@@ -89134,6 +90773,7 @@ id_card_reader_button.install = Vue => {
89134
90773
 
89135
90774
 
89136
90775
 
90776
+
89137
90777
  // import {
89138
90778
  // Button,
89139
90779
  // Tooltip,
@@ -89149,7 +90789,7 @@ id_card_reader_button.install = Vue => {
89149
90789
  // Dialog
89150
90790
  // ]
89151
90791
  // 组件列表
89152
- 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];
90792
+ 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, scanner_scanner_nko];
89153
90793
 
89154
90794
  // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,那么所有的组件都会被注册
89155
90795
  const install = Vue => {