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