unify-external-plugin-platform 0.0.3-2 → 0.0.3-21
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.
- package/dist/external-plugin.common.js +2214 -562
- package/dist/external-plugin.css +1 -1
- package/dist/external-plugin.umd.js +2214 -562
- package/dist/external-plugin.umd.min.js +3 -3
- package/package.json +2 -1
@@ -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
|
-
/***/
|
4323
|
-
/***/ (function(
|
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
|
-
|
4517
|
-
/***/ (function(module, __webpack_exports__, __nested_webpack_require_6575__) {
|
4581
|
+
var DOMExceptionPrototype = $DOMException.prototype = NativeDOMException.prototype;
|
4518
4582
|
|
4519
|
-
|
4520
|
-
|
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
|
-
//
|
4523
|
-
var
|
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
|
-
|
4593
|
+
var FORCED_CONSTRUCTOR = ERROR_HAS_STACK && !BUGGY_DESCRIPTOR && !DOM_EXCEPTION_HAS_STACK;
|
4534
4594
|
|
4535
|
-
//
|
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
|
-
|
4577
|
-
|
4578
|
-
|
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
|
-
/***/
|
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=
|
84023
|
-
var
|
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
|
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
|
/**
|
@@ -84093,7 +84392,7 @@ var scanner_camera_componentvue_type_template_id_0c4fd56a_scoped_true_staticRend
|
|
84093
84392
|
* @description:custom-axios
|
84094
84393
|
*/
|
84095
84394
|
class custom_axios_CustomAxios {
|
84096
|
-
static startConnect(method, url, data = {}) {
|
84395
|
+
static startConnect(method, url, data = {}, header = {}) {
|
84097
84396
|
return new Promise((resolve, reject) => {
|
84098
84397
|
let xhr = new XMLHttpRequest();
|
84099
84398
|
method = method.toUpperCase();
|
@@ -84109,6 +84408,11 @@ class custom_axios_CustomAxios {
|
|
84109
84408
|
}
|
84110
84409
|
xhr.open(method, url, true);
|
84111
84410
|
xhr.setRequestHeader('Accept', 'application/json');
|
84411
|
+
if (header) {
|
84412
|
+
Object.keys(header).forEach(key => {
|
84413
|
+
xhr.setRequestHeader(key, header[key]);
|
84414
|
+
});
|
84415
|
+
}
|
84112
84416
|
if (method === 'GET') {
|
84113
84417
|
xhr.send();
|
84114
84418
|
} else {
|
@@ -84132,12 +84436,12 @@ class custom_axios_CustomAxios {
|
|
84132
84436
|
};
|
84133
84437
|
});
|
84134
84438
|
}
|
84135
|
-
static async get(url) {
|
84136
|
-
let res = await custom_axios_CustomAxios.startConnect('GET', url);
|
84439
|
+
static async get(url, header = {}) {
|
84440
|
+
let res = await custom_axios_CustomAxios.startConnect('GET', url, {}, header);
|
84137
84441
|
return res;
|
84138
84442
|
}
|
84139
|
-
static async post(url, data) {
|
84140
|
-
let res = await custom_axios_CustomAxios.startConnect('POST', url, data);
|
84443
|
+
static async post(url, data, header = {}) {
|
84444
|
+
let res = await custom_axios_CustomAxios.startConnect('POST', url, data, header);
|
84141
84445
|
return res;
|
84142
84446
|
}
|
84143
84447
|
}
|
@@ -84152,6 +84456,10 @@ class custom_axios_CustomAxios {
|
|
84152
84456
|
var eloam_plugin_service_ELoamMethodCode;
|
84153
84457
|
(function (ELoamMethodCode) {
|
84154
84458
|
ELoamMethodCode["ScannerCameraLinuxInit"] = "ScannerCameraLinuxInit";
|
84459
|
+
/** 打开摄像头linux*/
|
84460
|
+
ELoamMethodCode["ScannerCameraLinuxStartPreview"] = "ScannerCameraLinuxStartPreview";
|
84461
|
+
/** 获取视频帧 linux*/
|
84462
|
+
ELoamMethodCode["ScannerCameraLinuxGetFrame"] = "ScannerCameraLinuxGetFrame";
|
84155
84463
|
/** 糾偏 */
|
84156
84464
|
ELoamMethodCode["ScannerCameraDeskew_Base64"] = "ScannerCameraDeskew_Base64";
|
84157
84465
|
/** 合并*/
|
@@ -84173,11 +84481,19 @@ const eloam_plugin_service_ELoamMethodDesc = {
|
|
84173
84481
|
class eloam_plugin_service_ELoamPassService {
|
84174
84482
|
/** 主摄像头地址 */
|
84175
84483
|
static get mainCameraUrl() {
|
84176
|
-
|
84484
|
+
if (this._isLinux) {
|
84485
|
+
return this.baseLinuxServiceUrl + '/StartPreview?dev_idx=0&res_id=0';
|
84486
|
+
} else {
|
84487
|
+
return this.baseServiceUrl + '/video=stream&camidx=0';
|
84488
|
+
}
|
84177
84489
|
}
|
84178
84490
|
/** 副摄像头地址 */
|
84179
84491
|
static get secondaryCameraUrl() {
|
84180
|
-
|
84492
|
+
if (this._isLinux) {
|
84493
|
+
return this.baseLinuxServiceUrl + '/StartPreview?dev_idx=1&res_id=0';
|
84494
|
+
} else {
|
84495
|
+
return this.baseServiceUrl + '/video=stream&camidx=1';
|
84496
|
+
}
|
84181
84497
|
}
|
84182
84498
|
static async read(method, data) {
|
84183
84499
|
let param = {},
|
@@ -84188,13 +84504,27 @@ class eloam_plugin_service_ELoamPassService {
|
|
84188
84504
|
url = `${this.baseLinuxServiceUrl}/GetAllDisplayInfo`;
|
84189
84505
|
requestType = 'get';
|
84190
84506
|
break;
|
84507
|
+
case eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxStartPreview:
|
84508
|
+
url = `${this.baseLinuxServiceUrl}/StartPreview?dev_idx=${data}&res_id=0`;
|
84509
|
+
requestType = 'get';
|
84510
|
+
break;
|
84511
|
+
case eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxGetFrame:
|
84512
|
+
url = `${this.baseLinuxServiceUrl}/getFrame`;
|
84513
|
+
requestType = 'get';
|
84514
|
+
break;
|
84191
84515
|
case eloam_plugin_service_ELoamMethodCode.ScannerCameraRotate:
|
84192
|
-
|
84193
|
-
|
84194
|
-
|
84195
|
-
|
84196
|
-
}
|
84197
|
-
|
84516
|
+
if (eloam_plugin_service_ELoamPassService._isLinux) {
|
84517
|
+
let count = data / 90;
|
84518
|
+
url = this.baseLinuxServiceUrl + `/Rotate?count=${count}`;
|
84519
|
+
requestType = 'get';
|
84520
|
+
} else {
|
84521
|
+
url = this.baseServiceUrl + '/video=rotate';
|
84522
|
+
param = {
|
84523
|
+
camidx: "0",
|
84524
|
+
rotate: data.toString()
|
84525
|
+
};
|
84526
|
+
requestType = 'post';
|
84527
|
+
}
|
84198
84528
|
break;
|
84199
84529
|
case eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64:
|
84200
84530
|
// 纠偏
|
@@ -84231,34 +84561,42 @@ class eloam_plugin_service_ELoamPassService {
|
|
84231
84561
|
}
|
84232
84562
|
break;
|
84233
84563
|
case eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64:
|
84234
|
-
|
84235
|
-
|
84236
|
-
|
84237
|
-
|
84238
|
-
|
84239
|
-
|
84240
|
-
|
84241
|
-
|
84242
|
-
|
84243
|
-
|
84244
|
-
|
84245
|
-
|
84246
|
-
|
84564
|
+
if (this._isLinux) {
|
84565
|
+
url = this.baseLinuxServiceUrl + '/getPic?filepath=/tmp';
|
84566
|
+
requestType = 'get';
|
84567
|
+
} else {
|
84568
|
+
url = this.baseServiceUrl + '/video=grabimage';
|
84569
|
+
param = {
|
84570
|
+
filepath: "base64",
|
84571
|
+
rotate: "0",
|
84572
|
+
deskew: data,
|
84573
|
+
deskewval: "20",
|
84574
|
+
camidx: "0",
|
84575
|
+
ColorMode: "0",
|
84576
|
+
quality: "0",
|
84577
|
+
bIsPrint1to1: "0"
|
84578
|
+
};
|
84579
|
+
requestType = 'post';
|
84580
|
+
}
|
84247
84581
|
break;
|
84248
84582
|
case eloam_plugin_service_ELoamMethodCode.ScannerSecondaryCamera_Base64:
|
84249
|
-
|
84250
|
-
|
84251
|
-
|
84252
|
-
|
84253
|
-
|
84254
|
-
|
84255
|
-
|
84256
|
-
|
84257
|
-
|
84258
|
-
|
84259
|
-
|
84260
|
-
|
84261
|
-
|
84583
|
+
if (this._isLinux) {
|
84584
|
+
url = this.baseLinuxServiceUrl + '/getPic?filepath=/tmp';
|
84585
|
+
requestType = 'get';
|
84586
|
+
} else {
|
84587
|
+
url = this.baseServiceUrl + '/video=grabimage';
|
84588
|
+
param = {
|
84589
|
+
filepath: "",
|
84590
|
+
rotate: "0",
|
84591
|
+
deskew: "0",
|
84592
|
+
deskewval: "0",
|
84593
|
+
camidx: "1",
|
84594
|
+
ColorMode: "0",
|
84595
|
+
quality: "0",
|
84596
|
+
bIsPrint1to1: "0"
|
84597
|
+
};
|
84598
|
+
requestType = 'post';
|
84599
|
+
}
|
84262
84600
|
break;
|
84263
84601
|
case eloam_plugin_service_ELoamMethodCode.ReadIDCard_Base64:
|
84264
84602
|
url = this.baseServiceUrl + '/card=idcard';
|
@@ -84271,31 +84609,56 @@ class eloam_plugin_service_ELoamPassService {
|
|
84271
84609
|
static async initLinuxCamera() {
|
84272
84610
|
await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxInit);
|
84273
84611
|
}
|
84612
|
+
static async startPreview(data) {
|
84613
|
+
return await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxStartPreview, data);
|
84614
|
+
}
|
84615
|
+
static async getEloamFrame() {
|
84616
|
+
return await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxGetFrame);
|
84617
|
+
}
|
84274
84618
|
/** 主摄像头拍照 */
|
84275
84619
|
static async scanByMainCamera(deskew) {
|
84276
84620
|
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64, deskew);
|
84277
84621
|
if (this._isLinux) {
|
84278
|
-
return res
|
84622
|
+
return res; // 国产
|
84279
84623
|
} else {
|
84280
|
-
return res
|
84624
|
+
return res;
|
84281
84625
|
}
|
84282
84626
|
}
|
84283
84627
|
/** 副摄像头拍照 */
|
84284
84628
|
static async scanBySecondaryCamera() {
|
84285
84629
|
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerSecondaryCamera_Base64);
|
84286
|
-
|
84630
|
+
if (this._isLinux) {
|
84631
|
+
return res.data.img; // 国产
|
84632
|
+
} else {
|
84633
|
+
return res.photoBase64;
|
84634
|
+
}
|
84287
84635
|
}
|
84288
84636
|
static async mergeImage(list, type) {
|
84289
84637
|
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraMerge_Base64, {
|
84290
84638
|
list,
|
84291
84639
|
type
|
84292
84640
|
});
|
84293
|
-
return res.base64;
|
84641
|
+
return res.base64 || res.data;
|
84294
84642
|
}
|
84295
|
-
static async scanByCamera(type, deskew) {
|
84643
|
+
static async scanByCamera(type, deskew, isMerge = false) {
|
84296
84644
|
switch (type) {
|
84297
84645
|
case "main":
|
84298
|
-
|
84646
|
+
let res = await this.scanByMainCamera(deskew);
|
84647
|
+
if (isMerge) {
|
84648
|
+
// 合并
|
84649
|
+
if (this._isLinux) {
|
84650
|
+
return res.data.path; // 国产
|
84651
|
+
} else {
|
84652
|
+
return res.photoBase64;
|
84653
|
+
}
|
84654
|
+
} else {
|
84655
|
+
// 拍照
|
84656
|
+
if (this._isLinux) {
|
84657
|
+
return res.data.img; // 国产
|
84658
|
+
} else {
|
84659
|
+
return res.photoBase64;
|
84660
|
+
}
|
84661
|
+
}
|
84299
84662
|
case 'vice':
|
84300
84663
|
return this.scanBySecondaryCamera();
|
84301
84664
|
}
|
@@ -84338,8 +84701,8 @@ class eloam_plugin_service_ELoamPassService {
|
|
84338
84701
|
info: {
|
84339
84702
|
cardType: cardType,
|
84340
84703
|
nationality: nationality,
|
84341
|
-
name: name,
|
84342
|
-
chineseName: chineseName,
|
84704
|
+
name: name.trim(),
|
84705
|
+
chineseName: chineseName.trim(),
|
84343
84706
|
englishName: englishName,
|
84344
84707
|
sex: sex,
|
84345
84708
|
birthday: birthday,
|
@@ -85510,20 +85873,21 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85510
85873
|
buttonList: [{
|
85511
85874
|
label: '拍照',
|
85512
85875
|
name: 'take-pictures'
|
85513
|
-
}, {
|
85514
|
-
label: '纠偏裁边',
|
85515
|
-
name: 'open-deskew'
|
85516
|
-
}, {
|
85517
|
-
label: '旋转',
|
85518
|
-
name: 'rotate-video'
|
85519
85876
|
}, {
|
85520
85877
|
label: '图片合并',
|
85521
85878
|
name: 'take-pictures-merge'
|
85522
85879
|
}, {
|
85523
85880
|
label: '证件合并',
|
85524
85881
|
name: 'take-idCard-pictures-merge'
|
85882
|
+
}, {
|
85883
|
+
label: '纠偏裁边',
|
85884
|
+
name: 'open-deskew'
|
85885
|
+
}, {
|
85886
|
+
label: '旋转',
|
85887
|
+
name: 'rotate-video'
|
85525
85888
|
}],
|
85526
85889
|
_isLinux: String(navigator.platform).indexOf("Linux") > -1,
|
85890
|
+
eloamLinuxFrameTimer: {},
|
85527
85891
|
mergeImageList: []
|
85528
85892
|
};
|
85529
85893
|
},
|
@@ -85592,7 +85956,8 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85592
85956
|
let type = this.camera === 0 ? 'main' : 'vice';
|
85593
85957
|
const res = await eloam_plugin_service_ELoamPassService.scanByCamera(type, this.deskewStatus);
|
85594
85958
|
if (res) {
|
85595
|
-
|
85959
|
+
let path = res;
|
85960
|
+
this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${path}`);
|
85596
85961
|
} else {
|
85597
85962
|
this.$message.error('拍照出错,请检查设备是否连接成功');
|
85598
85963
|
}
|
@@ -85626,8 +85991,15 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85626
85991
|
break;
|
85627
85992
|
case 5:
|
85628
85993
|
// 良田高拍仪
|
85629
|
-
|
85630
|
-
|
85994
|
+
if (!(String(navigator.platform).indexOf("Linux") > -1)) {
|
85995
|
+
this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
|
85996
|
+
} else {
|
85997
|
+
await eloam_plugin_service_ELoamPassService.initLinuxCamera();
|
85998
|
+
let res = await eloam_plugin_service_ELoamPassService.startPreview('0');
|
85999
|
+
if (res.returnCode == "0" || res.returnCode == "2") {
|
86000
|
+
this.eloamLinuxFrameTimer = setInterval(this.getEloamFrame, 300);
|
86001
|
+
}
|
86002
|
+
}
|
85631
86003
|
break;
|
85632
86004
|
case 6:
|
85633
86005
|
// 国产客户端一体机
|
@@ -85635,6 +86007,15 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85635
86007
|
break;
|
85636
86008
|
}
|
85637
86009
|
},
|
86010
|
+
async getEloamFrame() {
|
86011
|
+
let res = await eloam_plugin_service_ELoamPassService.getEloamFrame();
|
86012
|
+
if (res.returnCode == "1") {
|
86013
|
+
clearInterval(this.eloamLinuxFrameTimer);
|
86014
|
+
return;
|
86015
|
+
}
|
86016
|
+
if (res.data.img == "") return;
|
86017
|
+
this.scannerVideoSrc = `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res.data.img}`;
|
86018
|
+
},
|
85638
86019
|
/**
|
85639
86020
|
* 副摄像头
|
85640
86021
|
*/
|
@@ -85654,7 +86035,13 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85654
86035
|
break;
|
85655
86036
|
case 5:
|
85656
86037
|
// 良田
|
85657
|
-
|
86038
|
+
if (!(String(navigator.platform).indexOf("Linux") > -1)) {
|
86039
|
+
this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
|
86040
|
+
} else {
|
86041
|
+
await eloam_plugin_service_ELoamPassService.initLinuxCamera();
|
86042
|
+
await eloam_plugin_service_ELoamPassService.startPreview('1');
|
86043
|
+
this.eloamLinuxFrameTimer = setInterval(this.getEloamFrame, 300);
|
86044
|
+
}
|
85658
86045
|
break;
|
85659
86046
|
case 6:
|
85660
86047
|
// 国产客户端一体机
|
@@ -85664,9 +86051,10 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85664
86051
|
},
|
85665
86052
|
async takePictureMerge(type) {
|
85666
86053
|
if (type === '1' && this.deskewStatus === '0') return this.$message.warning('请先开启纠偏');
|
85667
|
-
const res = await eloam_plugin_service_ELoamPassService.scanByCamera('main', this.deskewStatus);
|
86054
|
+
const res = await eloam_plugin_service_ELoamPassService.scanByCamera('main', this.deskewStatus, true);
|
85668
86055
|
if (res) {
|
85669
|
-
|
86056
|
+
let path = res;
|
86057
|
+
this.mergeImageList.push(path);
|
85670
86058
|
if (this.mergeImageList.length === 1) this.$message.success('第一张拍摄成功,请拍第二张');
|
85671
86059
|
if (this.mergeImageList.length === 2) {
|
85672
86060
|
let result = await eloam_plugin_service_ELoamPassService.mergeImage(this.mergeImageList, type);
|
@@ -85713,7 +86101,7 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85713
86101
|
this.takePictureMerge('1');
|
85714
86102
|
break;
|
85715
86103
|
case 'rotate-video':
|
85716
|
-
if (
|
86104
|
+
if (String(navigator.platform).indexOf("Linux") > -1) {
|
85717
86105
|
this.rotateDeg += 90;
|
85718
86106
|
if (this.rotateDeg === 360) this.rotateDeg = 0;
|
85719
86107
|
} else {
|
@@ -85731,10 +86119,10 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85731
86119
|
});
|
85732
86120
|
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=script&lang=js&
|
85733
86121
|
/* 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=
|
86122
|
+
;// 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
86123
|
// extracted by mini-css-extract-plugin
|
85736
86124
|
|
85737
|
-
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=
|
86125
|
+
;// 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
86126
|
|
85739
86127
|
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue
|
85740
86128
|
|
@@ -85747,11 +86135,11 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85747
86135
|
|
85748
86136
|
var scanner_camera_component_component = normalizeComponent(
|
85749
86137
|
component_scanner_camera_componentvue_type_script_lang_js_,
|
85750
|
-
|
85751
|
-
|
86138
|
+
scanner_camera_componentvue_type_template_id_413c9ee6_scoped_true_render,
|
86139
|
+
scanner_camera_componentvue_type_template_id_413c9ee6_scoped_true_staticRenderFns,
|
85752
86140
|
false,
|
85753
86141
|
null,
|
85754
|
-
"
|
86142
|
+
"413c9ee6",
|
85755
86143
|
null
|
85756
86144
|
|
85757
86145
|
)
|
@@ -86046,8 +86434,8 @@ id_card_reader_eloam.install = Vue => {
|
|
86046
86434
|
Vue.component(id_card_reader_eloam.name, id_card_reader_eloam);
|
86047
86435
|
};
|
86048
86436
|
/* 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=
|
86050
|
-
var
|
86437
|
+
;// 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&
|
86438
|
+
var id_card_reader_buttonvue_type_template_id_1b7bbed8_scoped_true_render = function render() {
|
86051
86439
|
var _vm = this,
|
86052
86440
|
_c = _vm._self._c;
|
86053
86441
|
return _vm.tip ? _c('el-tooltip', {
|
@@ -86124,7 +86512,7 @@ var id_card_reader_buttonvue_type_template_id_d4b32654_scoped_true_render = func
|
|
86124
86512
|
}
|
86125
86513
|
})], 2);
|
86126
86514
|
};
|
86127
|
-
var
|
86515
|
+
var id_card_reader_buttonvue_type_template_id_1b7bbed8_scoped_true_staticRenderFns = [];
|
86128
86516
|
|
86129
86517
|
;// CONCATENATED MODULE: ./packages/service/external-plugins/default-plugin-socket.service.ts
|
86130
86518
|
|
@@ -87610,6 +87998,257 @@ var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpac
|
|
87610
87998
|
* @date: 2023-10-12
|
87611
87999
|
* @description:华视电子读卡器
|
87612
88000
|
*/
|
88001
|
+
const NationalityEnum = {
|
88002
|
+
AND: "安道尔",
|
88003
|
+
AFG: "阿富汗",
|
88004
|
+
ATG: "安提瓜和巴布达",
|
88005
|
+
AIA: "安圭拉",
|
88006
|
+
ALB: "阿尔巴尼亚",
|
88007
|
+
ARM: "亚美尼亚",
|
88008
|
+
AGO: "安哥拉",
|
88009
|
+
ATA: "南极洲",
|
88010
|
+
ARG: "阿根廷",
|
88011
|
+
ASM: "美属萨摩亚",
|
88012
|
+
AUT: "奥地利",
|
88013
|
+
AUS: "澳大利亚",
|
88014
|
+
ABW: "阿鲁巴",
|
88015
|
+
ALA: "奥兰群岛",
|
88016
|
+
AZE: "阿塞拜疆",
|
88017
|
+
BIH: "波黑",
|
88018
|
+
BRB: "巴巴多斯",
|
88019
|
+
BGD: "孟加拉",
|
88020
|
+
BEL: "比利时",
|
88021
|
+
BFA: "布基纳法索",
|
88022
|
+
BGR: "保加利亚",
|
88023
|
+
BHR: "巴林",
|
88024
|
+
BDI: "布隆迪",
|
88025
|
+
BEN: "贝宁",
|
88026
|
+
BLM: "圣巴泰勒米岛",
|
88027
|
+
BMU: "百慕大",
|
88028
|
+
BRN: "文莱",
|
88029
|
+
BOL: "玻利维亚",
|
88030
|
+
BES: "荷兰加勒比区",
|
88031
|
+
BRA: "巴西",
|
88032
|
+
BHS: "巴哈马",
|
88033
|
+
BTN: "不丹",
|
88034
|
+
BVT: "布韦岛",
|
88035
|
+
BWA: "博茨瓦纳",
|
88036
|
+
BLR: "白俄罗斯",
|
88037
|
+
BLZ: "伯利兹",
|
88038
|
+
CAN: "加拿大",
|
88039
|
+
CCK: "科科斯群岛",
|
88040
|
+
CAF: "中非",
|
88041
|
+
CHE: "瑞士",
|
88042
|
+
CHL: "智利",
|
88043
|
+
CMR: "喀麦隆",
|
88044
|
+
COL: "哥伦比亚",
|
88045
|
+
CRI: "哥斯达黎加",
|
88046
|
+
CUB: "古巴",
|
88047
|
+
CPV: "佛得角",
|
88048
|
+
CXR: "圣诞岛",
|
88049
|
+
CYP: "塞浦路斯",
|
88050
|
+
CZE: "捷克",
|
88051
|
+
DEU: "德国",
|
88052
|
+
DJI: "吉布提",
|
88053
|
+
DNK: "丹麦",
|
88054
|
+
DMA: "多米尼克",
|
88055
|
+
DOM: "多米尼加",
|
88056
|
+
DZA: "阿尔及利亚",
|
88057
|
+
ECU: "厄瓜多尔",
|
88058
|
+
EST: "爱沙尼亚",
|
88059
|
+
EGY: "埃及",
|
88060
|
+
ESH: "西撒哈拉",
|
88061
|
+
ERI: "厄立特里亚",
|
88062
|
+
ESP: "西班牙",
|
88063
|
+
FIN: "芬兰",
|
88064
|
+
FJI: "斐济群岛",
|
88065
|
+
FLK: "马尔维纳斯群岛(福克兰)",
|
88066
|
+
FSM: "密克罗尼西亚联邦",
|
88067
|
+
FRO: "法罗群岛",
|
88068
|
+
FRA: "法国",
|
88069
|
+
GAB: "加蓬",
|
88070
|
+
GRD: "格林纳达",
|
88071
|
+
GEO: "格鲁吉亚",
|
88072
|
+
GUF: "法属圭亚那",
|
88073
|
+
GHA: "加纳",
|
88074
|
+
GIB: "直布罗陀",
|
88075
|
+
GRL: "格陵兰",
|
88076
|
+
GIN: "几内亚",
|
88077
|
+
GLP: "瓜德罗普",
|
88078
|
+
GNQ: "赤道几内亚",
|
88079
|
+
GRC: "希腊",
|
88080
|
+
SGS: "南乔治亚岛和南桑威奇群岛",
|
88081
|
+
GTM: "危地马拉",
|
88082
|
+
GUM: "关岛",
|
88083
|
+
GNB: "几内亚比绍",
|
88084
|
+
GUY: "圭亚那",
|
88085
|
+
HKG: "香港",
|
88086
|
+
HMD: "赫德岛和麦克唐纳群岛",
|
88087
|
+
HND: "洪都拉斯",
|
88088
|
+
HRV: "克罗地亚",
|
88089
|
+
HTI: "海地",
|
88090
|
+
HUN: "匈牙利",
|
88091
|
+
IDN: "印尼",
|
88092
|
+
IRL: "爱尔兰",
|
88093
|
+
ISR: "以色列",
|
88094
|
+
IMN: "马恩岛",
|
88095
|
+
IND: "印度",
|
88096
|
+
IOT: "英属印度洋领地",
|
88097
|
+
IRQ: "伊拉克",
|
88098
|
+
IRN: "伊朗",
|
88099
|
+
ISL: "冰岛",
|
88100
|
+
ITA: "意大利",
|
88101
|
+
JEY: "泽西岛",
|
88102
|
+
JAM: "牙买加",
|
88103
|
+
JOR: "约旦",
|
88104
|
+
JPN: "日本",
|
88105
|
+
KHM: "柬埔寨",
|
88106
|
+
KIR: "基里巴斯",
|
88107
|
+
COM: "科摩罗",
|
88108
|
+
KWT: "科威特",
|
88109
|
+
CYM: "开曼群岛",
|
88110
|
+
LBN: "黎巴嫩",
|
88111
|
+
LIE: "列支敦士登",
|
88112
|
+
LKA: "斯里兰卡",
|
88113
|
+
LBR: "利比里亚",
|
88114
|
+
LSO: "莱索托",
|
88115
|
+
LTU: "立陶宛",
|
88116
|
+
LUX: "卢森堡",
|
88117
|
+
LVA: "拉脱维亚",
|
88118
|
+
LBY: "利比亚",
|
88119
|
+
MAR: "摩洛哥",
|
88120
|
+
MCO: "摩纳哥",
|
88121
|
+
MDA: "摩尔多瓦",
|
88122
|
+
MNE: "黑山",
|
88123
|
+
MAF: "法属圣马丁",
|
88124
|
+
MDG: "马达加斯加",
|
88125
|
+
MHL: "马绍尔群岛",
|
88126
|
+
MKD: "马其顿",
|
88127
|
+
MLI: "马里",
|
88128
|
+
MMR: "缅甸",
|
88129
|
+
MAC: "澳门",
|
88130
|
+
MTQ: "马提尼克",
|
88131
|
+
MRT: "毛里塔尼亚",
|
88132
|
+
MSR: "蒙塞拉特岛",
|
88133
|
+
MLT: "马耳他",
|
88134
|
+
MDV: "马尔代夫",
|
88135
|
+
MWI: "马拉维",
|
88136
|
+
MEX: "墨西哥",
|
88137
|
+
MYS: "马来西亚",
|
88138
|
+
NAM: "纳米比亚",
|
88139
|
+
NER: "尼日尔",
|
88140
|
+
NFK: "诺福克岛",
|
88141
|
+
NGA: "尼日利亚",
|
88142
|
+
NIC: "尼加拉瓜",
|
88143
|
+
NLD: "荷兰",
|
88144
|
+
NOR: "挪威",
|
88145
|
+
NPL: "尼泊尔",
|
88146
|
+
NRU: "瑙鲁",
|
88147
|
+
OMN: "阿曼",
|
88148
|
+
PAN: "巴拿马",
|
88149
|
+
PER: "秘鲁",
|
88150
|
+
PYF: "法属波利尼西亚",
|
88151
|
+
PNG: "巴布亚新几内亚",
|
88152
|
+
PHL: "菲律宾",
|
88153
|
+
PAK: "巴基斯坦",
|
88154
|
+
POL: "波兰",
|
88155
|
+
PCN: "皮特凯恩群岛",
|
88156
|
+
PRI: "波多黎各",
|
88157
|
+
PSE: "巴勒斯坦",
|
88158
|
+
PLW: "帕劳",
|
88159
|
+
PRY: "巴拉圭",
|
88160
|
+
QAT: "卡塔尔",
|
88161
|
+
REU: "留尼汪",
|
88162
|
+
ROU: "罗马尼亚",
|
88163
|
+
SRB: "塞尔维亚",
|
88164
|
+
RUS: "俄罗斯",
|
88165
|
+
RWA: "卢旺达",
|
88166
|
+
SLB: "所罗门群岛",
|
88167
|
+
SYC: "塞舌尔",
|
88168
|
+
SDN: "苏丹",
|
88169
|
+
SWE: "瑞典",
|
88170
|
+
SGP: "新加坡",
|
88171
|
+
SVN: "斯洛文尼亚",
|
88172
|
+
SJM: "斯瓦尔巴群岛和 扬马延岛",
|
88173
|
+
SVK: "斯洛伐克",
|
88174
|
+
SLE: "塞拉利昂",
|
88175
|
+
SMR: "圣马力诺",
|
88176
|
+
SEN: "塞内加尔",
|
88177
|
+
SOM: "索马里",
|
88178
|
+
SUR: "苏里南",
|
88179
|
+
SSD: "南苏丹",
|
88180
|
+
STP: "圣多美和普林西比",
|
88181
|
+
SLV: "萨尔瓦多",
|
88182
|
+
SYR: "叙利亚",
|
88183
|
+
SWZ: "斯威士兰",
|
88184
|
+
TCA: "特克斯和凯科斯群岛",
|
88185
|
+
TCD: "乍得",
|
88186
|
+
TGO: "多哥",
|
88187
|
+
THA: "泰国",
|
88188
|
+
TKL: "托克劳",
|
88189
|
+
TLS: "东帝汶",
|
88190
|
+
TUN: "突尼斯",
|
88191
|
+
TON: "汤加",
|
88192
|
+
TUR: "土耳其",
|
88193
|
+
TUV: "图瓦卢",
|
88194
|
+
TZA: "坦桑尼亚",
|
88195
|
+
UKR: "乌克兰",
|
88196
|
+
UGA: "乌干达",
|
88197
|
+
USA: "美国",
|
88198
|
+
URY: "乌拉圭",
|
88199
|
+
VAT: "梵蒂冈",
|
88200
|
+
VEN: "委内瑞拉",
|
88201
|
+
VGB: "英属维尔京群岛",
|
88202
|
+
VIR: "美属维尔京群岛",
|
88203
|
+
VNM: "越南",
|
88204
|
+
WLF: "瓦利斯和富图纳",
|
88205
|
+
WSM: "萨摩亚",
|
88206
|
+
YEM: "也门",
|
88207
|
+
MYT: "马约特",
|
88208
|
+
ZAF: "南非",
|
88209
|
+
ZMB: "赞比亚",
|
88210
|
+
ZWE: "津巴布韦",
|
88211
|
+
CHN: "中国",
|
88212
|
+
COG: "刚果(布)",
|
88213
|
+
COD: "刚果(金)",
|
88214
|
+
MOZ: "莫桑比克",
|
88215
|
+
GGY: "根西岛",
|
88216
|
+
GMB: "冈比亚",
|
88217
|
+
MNP: "北马里亚纳群岛",
|
88218
|
+
ETH: "埃塞俄比亚",
|
88219
|
+
NCL: "新喀里多尼亚",
|
88220
|
+
VUT: "瓦努阿图",
|
88221
|
+
ATF: "法属南部领地",
|
88222
|
+
NIU: "纽埃",
|
88223
|
+
UMI: "美国本土外小岛屿",
|
88224
|
+
COK: "库克群岛",
|
88225
|
+
GBR: "英国",
|
88226
|
+
TTO: "特立尼达和多巴哥",
|
88227
|
+
VCT: "圣文森特和格林纳丁斯",
|
88228
|
+
TWN: "台湾",
|
88229
|
+
NZL: "新西兰",
|
88230
|
+
SAU: "沙特阿拉伯",
|
88231
|
+
LAO: "老挝",
|
88232
|
+
PRK: "朝鲜",
|
88233
|
+
KOR: "韩国",
|
88234
|
+
PRT: "葡萄牙",
|
88235
|
+
KGZ: "吉尔吉斯斯坦",
|
88236
|
+
KAZ: "哈萨克斯坦",
|
88237
|
+
TJK: "塔吉克斯坦",
|
88238
|
+
TKM: "土库曼斯坦",
|
88239
|
+
UZB: "乌兹别克斯坦",
|
88240
|
+
KNA: "圣基茨和尼维斯",
|
88241
|
+
SPM: "圣皮埃尔和密克隆",
|
88242
|
+
SHN: "圣赫勒拿",
|
88243
|
+
LCA: "圣卢西亚",
|
88244
|
+
MUS: "毛里求斯",
|
88245
|
+
CIV: "科特迪瓦",
|
88246
|
+
KEN: "肯尼亚",
|
88247
|
+
MNG: "蒙古国"
|
88248
|
+
};
|
88249
|
+
function convertNationality(nationality) {
|
88250
|
+
return NationalityEnum[nationality];
|
88251
|
+
}
|
87613
88252
|
class HuaShiService {
|
87614
88253
|
static startConnect() {
|
87615
88254
|
if (this.ws && this.ws.readyState === WebSocket.CONNECTING) {
|
@@ -87685,23 +88324,55 @@ class HuaShiService {
|
|
87685
88324
|
const readData = await HuaShiService.read();
|
87686
88325
|
if (readData) {
|
87687
88326
|
// 身份证|姓名|性别|民族|生日|地址|证件号|派出所|有效期起|有效期止||证件照 中间好多占位
|
87688
|
-
|
87689
|
-
|
87690
|
-
|
87691
|
-
|
87692
|
-
|
87693
|
-
|
87694
|
-
|
87695
|
-
|
87696
|
-
|
87697
|
-
|
87698
|
-
|
87699
|
-
|
87700
|
-
|
87701
|
-
|
87702
|
-
|
87703
|
-
|
87704
|
-
|
88327
|
+
// 永居证|姓名|性别|永居证证件号|国籍代码|中文姓名|有效期起|有效期止|生日|证件版本号|受理机关代码|证件类别|照片内容 中间好多占位
|
88328
|
+
// 永居证|姓名|性别|永居证证件号|国籍代码|中文姓名|有效期起|有效期止|生日|换证次数|旧证件号|证件类别|照片内容 中间好多占位
|
88329
|
+
// 港澳台|姓名|性别|生日|住址|证件号|派出所|有效期起|有效期止|通行证号码|签发次数|证件类别|照片内容 中间好多占位
|
88330
|
+
let [model, placeholder, type, name, sex, nation, birthday, address, cardId, police, validStart, validEnd] = readData.split('|');
|
88331
|
+
let base64_ID = readData.split('|')[19];
|
88332
|
+
let NationCode = readData.split('|')[18];
|
88333
|
+
if (NationCode === '1') {
|
88334
|
+
// 身份证
|
88335
|
+
const IDCardData = {
|
88336
|
+
info: {
|
88337
|
+
cardType: '1',
|
88338
|
+
name,
|
88339
|
+
chineseName: '',
|
88340
|
+
englishName: '',
|
88341
|
+
sex,
|
88342
|
+
birthday,
|
88343
|
+
address,
|
88344
|
+
cardId,
|
88345
|
+
nationality: '中国',
|
88346
|
+
nation,
|
88347
|
+
police,
|
88348
|
+
validStart,
|
88349
|
+
validEnd
|
88350
|
+
},
|
88351
|
+
headImage: base64_ID
|
88352
|
+
};
|
88353
|
+
return IDCardData;
|
88354
|
+
} else {
|
88355
|
+
let chineseName = readData.split('|')[16] || '无中文姓名';
|
88356
|
+
const IDCardData = {
|
88357
|
+
info: {
|
88358
|
+
cardType: '9',
|
88359
|
+
name: chineseName === '无中文姓名' ? name : chineseName || name,
|
88360
|
+
chineseName,
|
88361
|
+
englishName: name,
|
88362
|
+
sex,
|
88363
|
+
birthday,
|
88364
|
+
address,
|
88365
|
+
cardId,
|
88366
|
+
nationality: convertNationality(NationCode),
|
88367
|
+
nation: '',
|
88368
|
+
police: '中华人民共和国国家移民管理局',
|
88369
|
+
validStart,
|
88370
|
+
validEnd
|
88371
|
+
},
|
88372
|
+
headImage: base64_ID
|
88373
|
+
};
|
88374
|
+
return IDCardData;
|
88375
|
+
}
|
87705
88376
|
} else {
|
87706
88377
|
throw Error('未匹配可用的读卡器');
|
87707
88378
|
}
|
@@ -87710,8 +88381,8 @@ class HuaShiService {
|
|
87710
88381
|
_defineProperty(HuaShiService, "idCardWebSocketUrl", 'ws://127.0.0.1:7415');
|
87711
88382
|
_defineProperty(HuaShiService, "ws", void 0);
|
87712
88383
|
_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=
|
87714
|
-
var
|
88384
|
+
;// 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&
|
88385
|
+
var default_take_photo_dialogvue_type_template_id_3194cb83_render = function render() {
|
87715
88386
|
var _vm = this,
|
87716
88387
|
_c = _vm._self._c;
|
87717
88388
|
return _c('el-dialog', {
|
@@ -87748,230 +88419,32 @@ var default_take_photo_dialogvue_type_template_id_7de4bdd6_render = function ren
|
|
87748
88419
|
"width": "1920",
|
87749
88420
|
"height": "1080"
|
87750
88421
|
}
|
87751
|
-
}), _c('
|
88422
|
+
}), _c('div', {
|
88423
|
+
staticClass: "image-content"
|
88424
|
+
}, [_c('img', {
|
87752
88425
|
staticClass: "videoContainer photo",
|
87753
88426
|
attrs: {
|
87754
88427
|
"src": _vm.viewerPhotoSrc
|
87755
88428
|
}
|
87756
|
-
})]), _c('span', {
|
88429
|
+
})])]), _c('span', {
|
87757
88430
|
staticClass: "dialog-footer",
|
87758
88431
|
attrs: {
|
87759
88432
|
"slot": "footer"
|
87760
88433
|
},
|
87761
88434
|
slot: "footer"
|
87762
88435
|
}, [_vm._l(_vm.buttonList, function (button) {
|
87763
|
-
return [_c('el-button', _vm._b({
|
88436
|
+
return [_vm._isShowButton(button.name) ? _c('el-button', _vm._b({
|
87764
88437
|
key: button.name,
|
87765
88438
|
on: {
|
87766
88439
|
"click": function ($event) {
|
87767
88440
|
return _vm.buttonClickEvent(button.name);
|
87768
88441
|
}
|
87769
88442
|
}
|
87770
|
-
}, 'el-button', button, false), [_vm._v(_vm._s(button.label) + " ")])];
|
88443
|
+
}, 'el-button', button, false), [_vm._v(_vm._s(button.label) + " ")]) : _vm._e()];
|
87771
88444
|
})], 2)]);
|
87772
88445
|
};
|
87773
|
-
var
|
88446
|
+
var default_take_photo_dialogvue_type_template_id_3194cb83_staticRenderFns = [];
|
87774
88447
|
|
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&
|
87929
|
-
|
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
88448
|
;// CONCATENATED MODULE: ./packages/service/external-plugins/exit-and-entry-plugin.service.ts
|
87976
88449
|
|
87977
88450
|
/**
|
@@ -87988,8 +88461,10 @@ var ExitAndEntryMethodCode;
|
|
87988
88461
|
ExitAndEntryMethodCode["ManualRead"] = "ManualRead";
|
87989
88462
|
/** 获取识别结果 */
|
87990
88463
|
ExitAndEntryMethodCode["GetReadResult"] = "GetReadResult";
|
88464
|
+
/** 人脸识别 */
|
88465
|
+
ExitAndEntryMethodCode["FaceAuth"] = "IDAuth";
|
87991
88466
|
})(ExitAndEntryMethodCode || (ExitAndEntryMethodCode = {}));
|
87992
|
-
const
|
88467
|
+
const exit_and_entry_plugin_service_NationalityEnum = {
|
87993
88468
|
AND: "安道尔",
|
87994
88469
|
AFG: "阿富汗",
|
87995
88470
|
ATG: "安提瓜和巴布达",
|
@@ -88073,7 +88548,7 @@ const NationalityEnum = {
|
|
88073
88548
|
GUM: "关岛",
|
88074
88549
|
GNB: "几内亚比绍",
|
88075
88550
|
GUY: "圭亚那",
|
88076
|
-
HKG: "
|
88551
|
+
HKG: "香港",
|
88077
88552
|
HMD: "赫德岛和麦克唐纳群岛",
|
88078
88553
|
HND: "洪都拉斯",
|
88079
88554
|
HRV: "克罗地亚",
|
@@ -88117,7 +88592,7 @@ const NationalityEnum = {
|
|
88117
88592
|
MKD: "马其顿",
|
88118
88593
|
MLI: "马里",
|
88119
88594
|
MMR: "缅甸",
|
88120
|
-
MAC: "
|
88595
|
+
MAC: "澳门",
|
88121
88596
|
MTQ: "马提尼克",
|
88122
88597
|
MRT: "毛里塔尼亚",
|
88123
88598
|
MSR: "蒙塞拉特岛",
|
@@ -88216,7 +88691,7 @@ const NationalityEnum = {
|
|
88216
88691
|
GBR: "英国",
|
88217
88692
|
TTO: "特立尼达和多巴哥",
|
88218
88693
|
VCT: "圣文森特和格林纳丁斯",
|
88219
|
-
TWN: "
|
88694
|
+
TWN: "台湾",
|
88220
88695
|
NZL: "新西兰",
|
88221
88696
|
SAU: "沙特阿拉伯",
|
88222
88697
|
LAO: "老挝",
|
@@ -88242,8 +88717,11 @@ var SexEnum;
|
|
88242
88717
|
SexEnum["MALE"] = "\u7537";
|
88243
88718
|
SexEnum["FEMALE"] = "\u5973";
|
88244
88719
|
})(SexEnum || (SexEnum = {}));
|
88245
|
-
|
88246
|
-
|
88720
|
+
const headers = {
|
88721
|
+
'Content-Type': 'application/json; charset=utf-8'
|
88722
|
+
};
|
88723
|
+
function exit_and_entry_plugin_service_convertNationality(nationality) {
|
88724
|
+
return exit_and_entry_plugin_service_NationalityEnum[nationality];
|
88247
88725
|
}
|
88248
88726
|
function urlToBase64(url) {
|
88249
88727
|
return new Promise((resolve, reject) => {
|
@@ -88306,7 +88784,7 @@ async function formatNFCResult(data) {
|
|
88306
88784
|
sex: SexEnum[sex] || '未知',
|
88307
88785
|
cardId: doc_number,
|
88308
88786
|
birthday: birth_DateFormat.replace('-', '').replace('-', ''),
|
88309
|
-
nationality:
|
88787
|
+
nationality: exit_and_entry_plugin_service_convertNationality(state),
|
88310
88788
|
validEnd: expired_DateFormat.replace('-', '').replace('-', ''),
|
88311
88789
|
headImage: img.replace('data:image/png;base64,', '')
|
88312
88790
|
};
|
@@ -88390,7 +88868,7 @@ async function formatPermanentResidencePermit(data) {
|
|
88390
88868
|
sex: xbdm.replace('性', ''),
|
88391
88869
|
cardId: zjhm || yjjlzhm,
|
88392
88870
|
birthday: csrq,
|
88393
|
-
nationality:
|
88871
|
+
nationality: exit_and_entry_plugin_service_convertNationality(gjdm),
|
88394
88872
|
validStart: yxqqsrq || zjqfrq,
|
88395
88873
|
validEnd: yxqjzrq || zjzzrq,
|
88396
88874
|
police: '中华人民共和国国家移民管理局',
|
@@ -88398,20 +88876,37 @@ async function formatPermanentResidencePermit(data) {
|
|
88398
88876
|
};
|
88399
88877
|
}
|
88400
88878
|
class ExitAndEntryPluginService {
|
88401
|
-
static async read(method) {
|
88402
|
-
let url = ''
|
88879
|
+
static async read(method, data = {}) {
|
88880
|
+
let url = '',
|
88881
|
+
requestType = '',
|
88882
|
+
param;
|
88403
88883
|
switch (method) {
|
88404
88884
|
case ExitAndEntryMethodCode.GetStatus:
|
88405
88885
|
url = `${ExitAndEntryPluginService.baseServiceUrl}/PassportReader/${method}`;
|
88886
|
+
requestType = 'get';
|
88406
88887
|
break;
|
88407
88888
|
case ExitAndEntryMethodCode.ManualRead:
|
88408
88889
|
url = `${ExitAndEntryPluginService.baseServiceUrl}/PassportReader/${method}`;
|
88890
|
+
requestType = 'get';
|
88409
88891
|
break;
|
88410
88892
|
case ExitAndEntryMethodCode.GetReadResult:
|
88411
88893
|
url = `${ExitAndEntryPluginService.baseServiceUrl}/PassportReader/${method}`;
|
88894
|
+
requestType = 'get';
|
88895
|
+
break;
|
88896
|
+
case ExitAndEntryMethodCode.FaceAuth:
|
88897
|
+
url = `${ExitAndEntryPluginService.baseServiceUrl}/PassportReader/${method}`;
|
88898
|
+
requestType = 'post';
|
88899
|
+
param = {
|
88900
|
+
...data
|
88901
|
+
};
|
88412
88902
|
break;
|
88413
88903
|
}
|
88414
|
-
let res
|
88904
|
+
let res;
|
88905
|
+
if (requestType === 'get') {
|
88906
|
+
res = await custom_axios_CustomAxios[requestType](url, headers);
|
88907
|
+
} else {
|
88908
|
+
res = await custom_axios_CustomAxios[requestType](url, param, headers);
|
88909
|
+
}
|
88415
88910
|
return res;
|
88416
88911
|
}
|
88417
88912
|
static async getStatus() {
|
@@ -88503,8 +88998,303 @@ class ExitAndEntryPluginService {
|
|
88503
88998
|
};
|
88504
88999
|
return IDCardData;
|
88505
89000
|
}
|
89001
|
+
static async faceAuth(image) {
|
89002
|
+
// PassportReader/IDAuth
|
89003
|
+
console.log('faceAuth=>', image);
|
89004
|
+
let res = await ExitAndEntryPluginService.read(ExitAndEntryMethodCode.FaceAuth, {
|
89005
|
+
imgBase64: image
|
89006
|
+
});
|
89007
|
+
while (res.ret != 0) {
|
89008
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
89009
|
+
res = await ExitAndEntryPluginService.read(ExitAndEntryMethodCode.FaceAuth, {
|
89010
|
+
imgBase64: image
|
89011
|
+
});
|
89012
|
+
}
|
89013
|
+
console.log('人脸识别结束=>', res);
|
89014
|
+
}
|
88506
89015
|
}
|
88507
89016
|
_defineProperty(ExitAndEntryPluginService, "baseServiceUrl", 'http://127.0.0.1:7770');
|
89017
|
+
;// 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&
|
89018
|
+
|
89019
|
+
/* harmony default export */ var default_take_photo_dialogvue_type_script_lang_js_ = ({
|
89020
|
+
name: "default-take-photo-dialog",
|
89021
|
+
props: {
|
89022
|
+
readMachineType: {
|
89023
|
+
type: Number,
|
89024
|
+
default: 0
|
89025
|
+
}
|
89026
|
+
},
|
89027
|
+
data: () => {
|
89028
|
+
return {
|
89029
|
+
visibility: true,
|
89030
|
+
viewerPhotoSrc: '',
|
89031
|
+
scannerPhotoSrc: '',
|
89032
|
+
cameraStream: '',
|
89033
|
+
buttonList: [{
|
89034
|
+
name: 'cancel',
|
89035
|
+
label: '取消',
|
89036
|
+
size: 'small'
|
89037
|
+
}, {
|
89038
|
+
name: 'take-photo',
|
89039
|
+
label: '拍照',
|
89040
|
+
type: 'primary',
|
89041
|
+
size: 'small'
|
89042
|
+
}, {
|
89043
|
+
name: 'face-auth',
|
89044
|
+
label: '人脸识别',
|
89045
|
+
type: 'primary',
|
89046
|
+
size: 'small'
|
89047
|
+
}, {
|
89048
|
+
name: 'sure',
|
89049
|
+
label: '确定',
|
89050
|
+
type: 'primary',
|
89051
|
+
size: 'small'
|
89052
|
+
}]
|
89053
|
+
};
|
89054
|
+
},
|
89055
|
+
mounted() {
|
89056
|
+
this.$nextTick(() => {
|
89057
|
+
this.initDefaultCamera();
|
89058
|
+
});
|
89059
|
+
},
|
89060
|
+
beforeDestroy() {
|
89061
|
+
this.cameraStream.getVideoTracks().forEach(track => {
|
89062
|
+
track.stop();
|
89063
|
+
});
|
89064
|
+
},
|
89065
|
+
methods: {
|
89066
|
+
async initDefaultCamera() {
|
89067
|
+
let video = this.$refs.monitor;
|
89068
|
+
let canvas = this.$refs.photo;
|
89069
|
+
console.log(video, canvas);
|
89070
|
+
let videoObj = {
|
89071
|
+
audio: false,
|
89072
|
+
video: {
|
89073
|
+
width: 1920,
|
89074
|
+
height: 1080
|
89075
|
+
}
|
89076
|
+
};
|
89077
|
+
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
|
89078
|
+
try {
|
89079
|
+
let stream = await navigator.mediaDevices.getUserMedia(videoObj);
|
89080
|
+
video.srcObject = stream;
|
89081
|
+
video.play();
|
89082
|
+
this.cameraStream = stream;
|
89083
|
+
} catch (e) {
|
89084
|
+
this.$message.error('没有可用的摄像头!');
|
89085
|
+
console.log(e);
|
89086
|
+
}
|
89087
|
+
} else {
|
89088
|
+
this.$message.error('调用摄像头失败,请在首页右上角我的设备中设置读拍照/人脸识别选项,并确保已为浏览器设置相关权限!');
|
89089
|
+
}
|
89090
|
+
},
|
89091
|
+
takePicture() {
|
89092
|
+
let video = this.$refs.monitor;
|
89093
|
+
let canvas = this.$refs.photo;
|
89094
|
+
let context = canvas.getContext('2d');
|
89095
|
+
context.drawImage(video, 0, 0, 1920, 1080);
|
89096
|
+
let img = canvas.toDataURL('image/png');
|
89097
|
+
canvas.src = img;
|
89098
|
+
this.viewerPhotoSrc = img;
|
89099
|
+
this.scannerPhotoSrc = img.replace('data:image/png;base64,', '');
|
89100
|
+
},
|
89101
|
+
_isShowButton(name) {
|
89102
|
+
switch (name) {
|
89103
|
+
case 'sure':
|
89104
|
+
return this.readMachineType !== 11;
|
89105
|
+
case 'face-auth':
|
89106
|
+
return this.readMachineType === 11;
|
89107
|
+
default:
|
89108
|
+
return true;
|
89109
|
+
}
|
89110
|
+
},
|
89111
|
+
async buttonClickEvent(name) {
|
89112
|
+
switch (name) {
|
89113
|
+
case 'cancel':
|
89114
|
+
this.visibility = false;
|
89115
|
+
this.$emit('close');
|
89116
|
+
break;
|
89117
|
+
case 'take-photo':
|
89118
|
+
this.takePicture();
|
89119
|
+
break;
|
89120
|
+
case 'sure':
|
89121
|
+
let data = {
|
89122
|
+
faceimg: this.scannerPhotoSrc
|
89123
|
+
};
|
89124
|
+
this.$emit('close', data);
|
89125
|
+
this.visibility = false;
|
89126
|
+
break;
|
89127
|
+
case 'face-auth':
|
89128
|
+
this.faceReaderEvent();
|
89129
|
+
break;
|
89130
|
+
}
|
89131
|
+
},
|
89132
|
+
async faceReaderEvent() {
|
89133
|
+
let idcardInfo;
|
89134
|
+
switch (this.readMachineType) {
|
89135
|
+
case 11:
|
89136
|
+
// 出入境
|
89137
|
+
idcardInfo = await ExitAndEntryPluginService.getReadResult();
|
89138
|
+
if (idcardInfo.info.cardType === '3' // 护照
|
89139
|
+
|| idcardInfo.info.cardType === '12' // 港澳台通行证
|
89140
|
+
|| idcardInfo.info.cardType === '2' // 港澳台身份证
|
89141
|
+
) {
|
89142
|
+
this.compressImage('data:image/png;base64,' + this.scannerPhotoSrc, {
|
89143
|
+
quality: 0.05,
|
89144
|
+
// 压缩后图片的清晰度,取值0-1,不传默认为0.7,值越小,所绘制出的图像越模糊
|
89145
|
+
type: 'jpg'
|
89146
|
+
}).then(async result => {
|
89147
|
+
console.log('压缩结果=>', result);
|
89148
|
+
await ExitAndEntryPluginService.faceAuth(result.replace('data:image/png;base64,', ''));
|
89149
|
+
});
|
89150
|
+
} else {
|
89151
|
+
this.$message.error('当前证件不支持人脸识别');
|
89152
|
+
}
|
89153
|
+
}
|
89154
|
+
},
|
89155
|
+
compressImage(path, config) {
|
89156
|
+
return new Promise((resolve, reject) => {
|
89157
|
+
let img = new Image();
|
89158
|
+
img.src = path;
|
89159
|
+
img.onload = function () {
|
89160
|
+
let that = this;
|
89161
|
+
let w = that.width * config.quality;
|
89162
|
+
let h = that.height * config.quality;
|
89163
|
+
// let scale = w / h
|
89164
|
+
// w = config.width || config.height * scale
|
89165
|
+
// h = config.height || config.width / scale
|
89166
|
+
let quality = config.quality; // 默认图片质量为0.7
|
89167
|
+
// 生成canvas
|
89168
|
+
let canvas = document.createElement('canvas');
|
89169
|
+
let ctx = canvas.getContext('2d');
|
89170
|
+
// 创建属性节点
|
89171
|
+
let anw = document.createAttribute('width');
|
89172
|
+
anw.nodeValue = String(w);
|
89173
|
+
let anh = document.createAttribute('height');
|
89174
|
+
anh.nodeValue = String(h);
|
89175
|
+
canvas.setAttributeNode(anw);
|
89176
|
+
canvas.setAttributeNode(anh);
|
89177
|
+
ctx.drawImage(that, 0, 0, w, h);
|
89178
|
+
if (config.quality && config.quality <= 1 && config.quality > 0) {
|
89179
|
+
quality = config.quality;
|
89180
|
+
}
|
89181
|
+
let base64 = canvas.toDataURL(config.type, quality);
|
89182
|
+
// let blob = convertBase64UrlToBlob(base64)
|
89183
|
+
// 回调函数返回base64的值,也可根据自己的需求返回blob的值
|
89184
|
+
resolve(base64);
|
89185
|
+
};
|
89186
|
+
});
|
89187
|
+
}
|
89188
|
+
}
|
89189
|
+
});
|
89190
|
+
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=script&lang=js&
|
89191
|
+
/* harmony default export */ var dialog_default_take_photo_dialogvue_type_script_lang_js_ = (default_take_photo_dialogvue_type_script_lang_js_);
|
89192
|
+
;// 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&
|
89193
|
+
// extracted by mini-css-extract-plugin
|
89194
|
+
|
89195
|
+
;// 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&
|
89196
|
+
|
89197
|
+
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue
|
89198
|
+
|
89199
|
+
|
89200
|
+
|
89201
|
+
;
|
89202
|
+
|
89203
|
+
|
89204
|
+
/* normalize component */
|
89205
|
+
|
89206
|
+
var default_take_photo_dialog_component = normalizeComponent(
|
89207
|
+
dialog_default_take_photo_dialogvue_type_script_lang_js_,
|
89208
|
+
default_take_photo_dialogvue_type_template_id_3194cb83_render,
|
89209
|
+
default_take_photo_dialogvue_type_template_id_3194cb83_staticRenderFns,
|
89210
|
+
false,
|
89211
|
+
null,
|
89212
|
+
null,
|
89213
|
+
null
|
89214
|
+
|
89215
|
+
)
|
89216
|
+
|
89217
|
+
/* harmony default export */ var default_take_photo_dialog = (default_take_photo_dialog_component.exports);
|
89218
|
+
;// 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&
|
89219
|
+
var wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_render = function render() {
|
89220
|
+
var _vm = this,
|
89221
|
+
_c = _vm._self._c;
|
89222
|
+
return _vm.visibility ? _c('el-dialog', {
|
89223
|
+
staticClass: "wei-rong-face-auth-dialog",
|
89224
|
+
attrs: {
|
89225
|
+
"title": "人脸识别",
|
89226
|
+
"top": '5vh',
|
89227
|
+
"width": "640px",
|
89228
|
+
"visible": _vm.visibility,
|
89229
|
+
"close-on-click-modal": false
|
89230
|
+
},
|
89231
|
+
on: {
|
89232
|
+
"update:visible": function ($event) {
|
89233
|
+
_vm.visibility = $event;
|
89234
|
+
}
|
89235
|
+
}
|
89236
|
+
}, [_c('div', {
|
89237
|
+
staticClass: "image-container"
|
89238
|
+
}, [_c('img', {
|
89239
|
+
staticStyle: {
|
89240
|
+
"width": "600px",
|
89241
|
+
"height": "450px"
|
89242
|
+
},
|
89243
|
+
attrs: {
|
89244
|
+
"id": "photo",
|
89245
|
+
"src": _vm.viewFaceImage
|
89246
|
+
}
|
89247
|
+
})])]) : _vm._e();
|
89248
|
+
};
|
89249
|
+
var wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_staticRenderFns = [];
|
89250
|
+
|
89251
|
+
;// 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&
|
89252
|
+
|
89253
|
+
|
89254
|
+
const wei_rong_face_auth_dialogvue_type_script_lang_js_BEGIN_DATA = 'data:image/jpg;base64,';
|
89255
|
+
/* harmony default export */ var wei_rong_face_auth_dialogvue_type_script_lang_js_ = ({
|
89256
|
+
name: "wei-rong-face-auth-dialog",
|
89257
|
+
data: () => {
|
89258
|
+
return {
|
89259
|
+
visibility: true,
|
89260
|
+
viewFaceImage: ''
|
89261
|
+
};
|
89262
|
+
},
|
89263
|
+
async created() {
|
89264
|
+
window.addEventListener(SCANNER_CAMERA_REFRESH_PHOTO_EVENT, message => {
|
89265
|
+
if (message.type === SCANNER_CAMERA_REFRESH_PHOTO_EVENT) {
|
89266
|
+
this.viewFaceImage = `${wei_rong_face_auth_dialogvue_type_script_lang_js_BEGIN_DATA}${message.scannerResultUrl}`;
|
89267
|
+
}
|
89268
|
+
});
|
89269
|
+
let res = await WeiRongPluginService.faceValidateWithIdCardRead();
|
89270
|
+
this.$message.success('认证成功');
|
89271
|
+
setTimeout(() => {
|
89272
|
+
this.$emit('close', res);
|
89273
|
+
}, 1500);
|
89274
|
+
}
|
89275
|
+
});
|
89276
|
+
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue?vue&type=script&lang=js&
|
89277
|
+
/* harmony default export */ var dialog_wei_rong_face_auth_dialogvue_type_script_lang_js_ = (wei_rong_face_auth_dialogvue_type_script_lang_js_);
|
89278
|
+
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue
|
89279
|
+
|
89280
|
+
|
89281
|
+
|
89282
|
+
|
89283
|
+
|
89284
|
+
/* normalize component */
|
89285
|
+
;
|
89286
|
+
var wei_rong_face_auth_dialog_component = normalizeComponent(
|
89287
|
+
dialog_wei_rong_face_auth_dialogvue_type_script_lang_js_,
|
89288
|
+
wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_render,
|
89289
|
+
wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_staticRenderFns,
|
89290
|
+
false,
|
89291
|
+
null,
|
89292
|
+
"5bbb0afc",
|
89293
|
+
null
|
89294
|
+
|
89295
|
+
)
|
89296
|
+
|
89297
|
+
/* harmony default export */ var wei_rong_face_auth_dialog = (wei_rong_face_auth_dialog_component.exports);
|
88508
89298
|
;// CONCATENATED MODULE: ./packages/service/external-plugins/pu-tian-plugin.service.ts
|
88509
89299
|
|
88510
89300
|
|
@@ -88874,32 +89664,42 @@ _defineProperty(PuTianPluginService, "requestStore", []);
|
|
88874
89664
|
break;
|
88875
89665
|
}
|
88876
89666
|
case 1:
|
89667
|
+
// 丽水一体机
|
88877
89668
|
this.readLSIDCardAndMatchFace();
|
88878
89669
|
break;
|
88879
89670
|
case 2:
|
88880
89671
|
{
|
89672
|
+
// 沃斯德人证交互终端
|
88881
89673
|
const data = await EWindowPassService.faceValidateWithIdCardRead();
|
88882
89674
|
this.$emit('click', data);
|
88883
89675
|
break;
|
88884
89676
|
}
|
88885
89677
|
case 3:
|
88886
89678
|
{
|
89679
|
+
// 中正人脸识别
|
88887
89680
|
const data = await MRAdbReadService.idCardRead();
|
88888
89681
|
this.$emit('click', data);
|
88889
89682
|
break;
|
88890
89683
|
}
|
88891
89684
|
case 5:
|
89685
|
+
// 良田
|
88892
89686
|
this.readFacePhotoByELoam();
|
88893
89687
|
break;
|
88894
89688
|
case 6:
|
88895
89689
|
{
|
89690
|
+
// 捷宇信息交互终端
|
88896
89691
|
const data = await JieYueService.faceValidateWithIdCardRead();
|
88897
89692
|
this.$emit('click', data);
|
88898
89693
|
break;
|
88899
89694
|
}
|
88900
89695
|
case 10:
|
89696
|
+
// 国产客户端一体机
|
88901
89697
|
this.openWEIRONGFaceValidateDialog();
|
88902
89698
|
break;
|
89699
|
+
case 11:
|
89700
|
+
// 出入境设备
|
89701
|
+
this.readFacePhotoByDefault(this.readMachineType);
|
89702
|
+
break;
|
88903
89703
|
default:
|
88904
89704
|
this.$message.warning('请在首页右上角我的设备中设置读拍照/人脸识别选项!');
|
88905
89705
|
break;
|
@@ -89045,13 +89845,15 @@ _defineProperty(PuTianPluginService, "requestStore", []);
|
|
89045
89845
|
}).$mount(modalNode);
|
89046
89846
|
},
|
89047
89847
|
// 默认浏览器自带拍照
|
89048
|
-
readFacePhotoByDefault() {
|
89848
|
+
readFacePhotoByDefault(readMachineType = 0) {
|
89049
89849
|
const modalNode = document.createElement('div');
|
89050
89850
|
document.body.appendChild(modalNode);
|
89051
89851
|
const vm = new (external_commonjs_vue_commonjs2_vue_root_Vue_default())({
|
89052
89852
|
render: h => {
|
89053
89853
|
return h(default_take_photo_dialog, {
|
89054
|
-
props: {
|
89854
|
+
props: {
|
89855
|
+
readMachineType
|
89856
|
+
},
|
89055
89857
|
on: {
|
89056
89858
|
close: data => {
|
89057
89859
|
if (data) {
|
@@ -89095,11 +89897,11 @@ _defineProperty(PuTianPluginService, "requestStore", []);
|
|
89095
89897
|
;
|
89096
89898
|
var id_card_reader_button_component = normalizeComponent(
|
89097
89899
|
src_id_card_reader_buttonvue_type_script_lang_js_,
|
89098
|
-
|
89099
|
-
|
89900
|
+
id_card_reader_buttonvue_type_template_id_1b7bbed8_scoped_true_render,
|
89901
|
+
id_card_reader_buttonvue_type_template_id_1b7bbed8_scoped_true_staticRenderFns,
|
89100
89902
|
false,
|
89101
89903
|
null,
|
89102
|
-
"
|
89904
|
+
"1b7bbed8",
|
89103
89905
|
null
|
89104
89906
|
|
89105
89907
|
)
|
@@ -89114,6 +89916,855 @@ id_card_reader_button.install = Vue => {
|
|
89114
89916
|
Vue.component(id_card_reader_button.name, id_card_reader_button);
|
89115
89917
|
};
|
89116
89918
|
/* harmony default export */ var id_card_reader_id_card_reader_button = (id_card_reader_button);
|
89919
|
+
;// 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&
|
89920
|
+
var scanner_nkovue_type_template_id_304bcec5_render = function render() {
|
89921
|
+
var _vm = this,
|
89922
|
+
_c = _vm._self._c;
|
89923
|
+
return _c('el-container', {
|
89924
|
+
directives: [{
|
89925
|
+
name: "loading",
|
89926
|
+
rawName: "v-loading",
|
89927
|
+
value: _vm.pageLoading,
|
89928
|
+
expression: "pageLoading"
|
89929
|
+
}],
|
89930
|
+
staticClass: "scanner-nko",
|
89931
|
+
attrs: {
|
89932
|
+
"element-loading-text": _vm.pageLoadingText
|
89933
|
+
}
|
89934
|
+
}, [_c('el-aside', {
|
89935
|
+
staticClass: "container-aside"
|
89936
|
+
}, [_c('div', {
|
89937
|
+
staticClass: "container-title"
|
89938
|
+
}, [_vm._v("扫描配置")]), _c('div', {
|
89939
|
+
staticClass: "scan-config-form"
|
89940
|
+
}, [_c('el-form', {
|
89941
|
+
attrs: {
|
89942
|
+
"model": _vm.scanConfig,
|
89943
|
+
"label-position": "right",
|
89944
|
+
"label-width": "72px",
|
89945
|
+
"disabled": !_vm.deviceOpend
|
89946
|
+
}
|
89947
|
+
}, [_c('el-form-item', {
|
89948
|
+
attrs: {
|
89949
|
+
"label": "扫描源"
|
89950
|
+
}
|
89951
|
+
}, [_c('el-select', {
|
89952
|
+
attrs: {
|
89953
|
+
"disabled": _vm.deviceWorking,
|
89954
|
+
"placeholder": "请选择扫描源"
|
89955
|
+
},
|
89956
|
+
on: {
|
89957
|
+
"change": _vm.openDeivce
|
89958
|
+
},
|
89959
|
+
model: {
|
89960
|
+
value: _vm.scanConfig.deviceId,
|
89961
|
+
callback: function ($$v) {
|
89962
|
+
_vm.$set(_vm.scanConfig, "deviceId", $$v);
|
89963
|
+
},
|
89964
|
+
expression: "scanConfig.deviceId"
|
89965
|
+
}
|
89966
|
+
}, _vm._l(_vm.deviceList, function (item) {
|
89967
|
+
return _c('el-option', {
|
89968
|
+
key: item.deviceId,
|
89969
|
+
attrs: {
|
89970
|
+
"label": item.deviceId,
|
89971
|
+
"value": item.deviceId
|
89972
|
+
}
|
89973
|
+
});
|
89974
|
+
}), 1)], 1)], 1), _c('el-form', {
|
89975
|
+
attrs: {
|
89976
|
+
"model": _vm.scanConfig,
|
89977
|
+
"label-position": "right",
|
89978
|
+
"label-width": "72px",
|
89979
|
+
"disabled": !_vm.isDeviceReady
|
89980
|
+
}
|
89981
|
+
}, [_c('el-form-item', {
|
89982
|
+
attrs: {
|
89983
|
+
"label": "进纸模式"
|
89984
|
+
}
|
89985
|
+
}, [_c('el-select', {
|
89986
|
+
attrs: {
|
89987
|
+
"placeholder": "请选择进纸模式"
|
89988
|
+
},
|
89989
|
+
model: {
|
89990
|
+
value: _vm.scanConfig.source,
|
89991
|
+
callback: function ($$v) {
|
89992
|
+
_vm.$set(_vm.scanConfig, "source", $$v);
|
89993
|
+
},
|
89994
|
+
expression: "scanConfig.source"
|
89995
|
+
}
|
89996
|
+
}, _vm._l(_vm.sourceOptions, function (item) {
|
89997
|
+
return _c('el-option', {
|
89998
|
+
key: item,
|
89999
|
+
attrs: {
|
90000
|
+
"label": item,
|
90001
|
+
"value": item
|
90002
|
+
}
|
90003
|
+
});
|
90004
|
+
}), 1)], 1), _c('el-form-item', {
|
90005
|
+
attrs: {
|
90006
|
+
"label": "扫描颜色"
|
90007
|
+
}
|
90008
|
+
}, [_c('el-select', {
|
90009
|
+
attrs: {
|
90010
|
+
"placeholder": "请选择"
|
90011
|
+
},
|
90012
|
+
model: {
|
90013
|
+
value: _vm.scanConfig.mode,
|
90014
|
+
callback: function ($$v) {
|
90015
|
+
_vm.$set(_vm.scanConfig, "mode", $$v);
|
90016
|
+
},
|
90017
|
+
expression: "scanConfig.mode"
|
90018
|
+
}
|
90019
|
+
}, _vm._l(_vm.modeOptions, function (item) {
|
90020
|
+
return _c('el-option', {
|
90021
|
+
key: item,
|
90022
|
+
attrs: {
|
90023
|
+
"label": item,
|
90024
|
+
"value": item
|
90025
|
+
}
|
90026
|
+
});
|
90027
|
+
}), 1)], 1), _c('el-form-item', {
|
90028
|
+
attrs: {
|
90029
|
+
"label": "分辨率"
|
90030
|
+
}
|
90031
|
+
}, [_c('el-select', {
|
90032
|
+
attrs: {
|
90033
|
+
"placeholder": "请选择分辨率"
|
90034
|
+
},
|
90035
|
+
model: {
|
90036
|
+
value: _vm.scanConfig.resolution,
|
90037
|
+
callback: function ($$v) {
|
90038
|
+
_vm.$set(_vm.scanConfig, "resolution", $$v);
|
90039
|
+
},
|
90040
|
+
expression: "scanConfig.resolution"
|
90041
|
+
}
|
90042
|
+
}, _vm._l(_vm.resolutionOptions, function (item) {
|
90043
|
+
return _c('el-option', {
|
90044
|
+
key: item,
|
90045
|
+
attrs: {
|
90046
|
+
"label": item,
|
90047
|
+
"value": item
|
90048
|
+
}
|
90049
|
+
});
|
90050
|
+
}), 1)], 1), _c('el-form-item', {
|
90051
|
+
attrs: {
|
90052
|
+
"label": "纸张类型"
|
90053
|
+
}
|
90054
|
+
}, [_c('el-select', {
|
90055
|
+
attrs: {
|
90056
|
+
"placeholder": "请选择纸张类型"
|
90057
|
+
},
|
90058
|
+
model: {
|
90059
|
+
value: _vm.scanConfig.paperSize,
|
90060
|
+
callback: function ($$v) {
|
90061
|
+
_vm.$set(_vm.scanConfig, "paperSize", $$v);
|
90062
|
+
},
|
90063
|
+
expression: "scanConfig.paperSize"
|
90064
|
+
}
|
90065
|
+
}, _vm._l(_vm.paperSizeOptions, function (item) {
|
90066
|
+
return _c('el-option', {
|
90067
|
+
key: item,
|
90068
|
+
attrs: {
|
90069
|
+
"label": item,
|
90070
|
+
"value": item
|
90071
|
+
}
|
90072
|
+
});
|
90073
|
+
}), 1)], 1), _c('el-form-item', {
|
90074
|
+
attrs: {
|
90075
|
+
"label": "文件格式"
|
90076
|
+
}
|
90077
|
+
}, [_c('el-select', {
|
90078
|
+
attrs: {
|
90079
|
+
"placeholder": "请选择"
|
90080
|
+
},
|
90081
|
+
model: {
|
90082
|
+
value: _vm.scanConfig.fileFormat,
|
90083
|
+
callback: function ($$v) {
|
90084
|
+
_vm.$set(_vm.scanConfig, "fileFormat", $$v);
|
90085
|
+
},
|
90086
|
+
expression: "scanConfig.fileFormat"
|
90087
|
+
}
|
90088
|
+
}, _vm._l(_vm.fileFormatOptions, function (item) {
|
90089
|
+
return _c('el-option', {
|
90090
|
+
key: item,
|
90091
|
+
attrs: {
|
90092
|
+
"label": item,
|
90093
|
+
"value": item
|
90094
|
+
}
|
90095
|
+
});
|
90096
|
+
}), 1)], 1)], 1), _c('div', {
|
90097
|
+
staticClass: "text-right"
|
90098
|
+
}, [_c('el-button', {
|
90099
|
+
attrs: {
|
90100
|
+
"type": "primary"
|
90101
|
+
},
|
90102
|
+
on: {
|
90103
|
+
"click": _vm.initScanServiceAPI
|
90104
|
+
}
|
90105
|
+
}, [_vm._v("连接")]), _c('el-button', {
|
90106
|
+
attrs: {
|
90107
|
+
"type": "primary",
|
90108
|
+
"disabled": !_vm.isDeviceReady || _vm.deviceWorking
|
90109
|
+
},
|
90110
|
+
on: {
|
90111
|
+
"click": _vm.doScan
|
90112
|
+
}
|
90113
|
+
}, [_vm._v("扫描")])], 1)], 1)]), _c('el-container', [_c('el-main', {
|
90114
|
+
staticClass: "container-main"
|
90115
|
+
}, [_c('div', {
|
90116
|
+
staticClass: "container-title"
|
90117
|
+
}, [_vm._v("扫描结果")]), _c('el-checkbox', {
|
90118
|
+
attrs: {
|
90119
|
+
"indeterminate": _vm.isIndeterminate
|
90120
|
+
},
|
90121
|
+
on: {
|
90122
|
+
"change": _vm.handleCheckAllChange
|
90123
|
+
},
|
90124
|
+
model: {
|
90125
|
+
value: _vm.checkAll,
|
90126
|
+
callback: function ($$v) {
|
90127
|
+
_vm.checkAll = $$v;
|
90128
|
+
},
|
90129
|
+
expression: "checkAll"
|
90130
|
+
}
|
90131
|
+
}, [_vm._v("全选")]), _c('div', {
|
90132
|
+
staticClass: "image-list"
|
90133
|
+
}, _vm._l(_vm.scanFileList, function (item, index) {
|
90134
|
+
return _c('div', {
|
90135
|
+
key: item.name,
|
90136
|
+
class: {
|
90137
|
+
'image-list-item': true,
|
90138
|
+
'image-checked': item.checked
|
90139
|
+
}
|
90140
|
+
}, [_c('el-image', {
|
90141
|
+
attrs: {
|
90142
|
+
"src": item.url,
|
90143
|
+
"preview-src-list": _vm.imgUrls,
|
90144
|
+
"initial-index": _vm.initialIndex
|
90145
|
+
},
|
90146
|
+
on: {
|
90147
|
+
"click": function ($event) {
|
90148
|
+
return _vm.previewImg(index);
|
90149
|
+
}
|
90150
|
+
}
|
90151
|
+
}), _c('div', {
|
90152
|
+
staticClass: "image-actions"
|
90153
|
+
}, [_c('el-checkbox', {
|
90154
|
+
on: {
|
90155
|
+
"change": _vm.handleCheckedChange
|
90156
|
+
},
|
90157
|
+
model: {
|
90158
|
+
value: item.checked,
|
90159
|
+
callback: function ($$v) {
|
90160
|
+
_vm.$set(item, "checked", $$v);
|
90161
|
+
},
|
90162
|
+
expression: "item.checked"
|
90163
|
+
}
|
90164
|
+
}, [_vm._v(_vm._s(item.name))]), _c('el-button', {
|
90165
|
+
staticStyle: {
|
90166
|
+
"color": "red"
|
90167
|
+
},
|
90168
|
+
attrs: {
|
90169
|
+
"type": "text",
|
90170
|
+
"icon": "el-icon-delete"
|
90171
|
+
},
|
90172
|
+
on: {
|
90173
|
+
"click": function ($event) {
|
90174
|
+
return _vm.deleteFileEvent(index);
|
90175
|
+
}
|
90176
|
+
}
|
90177
|
+
}), _c('el-button', {
|
90178
|
+
attrs: {
|
90179
|
+
"type": "text",
|
90180
|
+
"icon": "el-icon-upload2"
|
90181
|
+
},
|
90182
|
+
on: {
|
90183
|
+
"click": function ($event) {
|
90184
|
+
return _vm.sendScannerResult(item);
|
90185
|
+
}
|
90186
|
+
}
|
90187
|
+
})], 1)], 1);
|
90188
|
+
}), 0)], 1), _c('el-footer', [_c('div', {
|
90189
|
+
staticClass: "text-right"
|
90190
|
+
}, [_c('el-button', {
|
90191
|
+
attrs: {
|
90192
|
+
"size": "small",
|
90193
|
+
"type": "primary",
|
90194
|
+
"disabled": _vm.scanFileList.length === 0
|
90195
|
+
},
|
90196
|
+
on: {
|
90197
|
+
"click": _vm.clearImgList
|
90198
|
+
}
|
90199
|
+
}, [_vm._v("清空")]), _c('el-button', {
|
90200
|
+
attrs: {
|
90201
|
+
"size": "small",
|
90202
|
+
"type": "primary",
|
90203
|
+
"disabled": _vm.scanFileList.length === 0
|
90204
|
+
},
|
90205
|
+
on: {
|
90206
|
+
"click": _vm.batchDelFilesEvent
|
90207
|
+
}
|
90208
|
+
}, [_vm._v("批量删除")]), _c('el-button', {
|
90209
|
+
attrs: {
|
90210
|
+
"size": "small",
|
90211
|
+
"type": "primary",
|
90212
|
+
"disabled": _vm.scanFileList.length === 0
|
90213
|
+
},
|
90214
|
+
on: {
|
90215
|
+
"click": function ($event) {
|
90216
|
+
return _vm.sendScannerResult();
|
90217
|
+
}
|
90218
|
+
}
|
90219
|
+
}, [_vm._v("上传")])], 1)])], 1)], 1);
|
90220
|
+
};
|
90221
|
+
var scanner_nkovue_type_template_id_304bcec5_staticRenderFns = [];
|
90222
|
+
|
90223
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-exception.stack.js
|
90224
|
+
var web_dom_exception_stack = __webpack_require__(2801);
|
90225
|
+
;// CONCATENATED MODULE: ./packages/service/external-plugins/nko-plugin-socket.service.ts
|
90226
|
+
|
90227
|
+
|
90228
|
+
|
90229
|
+
/**
|
90230
|
+
* 赞彩五合一设备
|
90231
|
+
*
|
90232
|
+
* */
|
90233
|
+
var NkoMethodCode;
|
90234
|
+
(function (NkoMethodCode) {
|
90235
|
+
/** 扫描 */
|
90236
|
+
NkoMethodCode["scan"] = "scan";
|
90237
|
+
})(NkoMethodCode || (NkoMethodCode = {}));
|
90238
|
+
var NkoMethodScanFunction;
|
90239
|
+
(function (NkoMethodScanFunction) {
|
90240
|
+
/** 获取扫描仪 */
|
90241
|
+
NkoMethodScanFunction["getScanDeivceList"] = "001001";
|
90242
|
+
/** 选中指定扫描仪并打开 */
|
90243
|
+
NkoMethodScanFunction["openScanDeivce"] = "001002";
|
90244
|
+
/** 获取选中扫描仪可配置项 */
|
90245
|
+
NkoMethodScanFunction["getScanOptions"] = "001003";
|
90246
|
+
/** 常用参数的便捷配置能力(进纸模式、色彩、尺寸、DPI) */
|
90247
|
+
NkoMethodScanFunction["setScanBasicOptions"] = "001007";
|
90248
|
+
/** 扫描 */
|
90249
|
+
NkoMethodScanFunction["scan"] = "001008";
|
90250
|
+
})(NkoMethodScanFunction || (NkoMethodScanFunction = {}));
|
90251
|
+
const NkoMethodDesc = {
|
90252
|
+
[NkoMethodCode.scan]: '扫描'
|
90253
|
+
};
|
90254
|
+
class NkoService {
|
90255
|
+
static startConnect(method) {
|
90256
|
+
if (this.ws && this.ws.readyState === WebSocket.OPEN) {
|
90257
|
+
return this;
|
90258
|
+
}
|
90259
|
+
let webSocketUrl = '';
|
90260
|
+
switch (method) {
|
90261
|
+
case NkoMethodCode.scan:
|
90262
|
+
webSocketUrl = this.scanWebSocketUrl;
|
90263
|
+
break;
|
90264
|
+
default:
|
90265
|
+
webSocketUrl = this.iReadCardWebSocketUrl;
|
90266
|
+
break;
|
90267
|
+
}
|
90268
|
+
const ws = new WebSocket(webSocketUrl);
|
90269
|
+
let resolved;
|
90270
|
+
const onConnect = new Promise(resolve => {
|
90271
|
+
resolved = resolve;
|
90272
|
+
});
|
90273
|
+
ws.onopen = () => {
|
90274
|
+
resolved(true);
|
90275
|
+
};
|
90276
|
+
ws.onmessage = event => {
|
90277
|
+
this.handleMessage(event);
|
90278
|
+
};
|
90279
|
+
ws.onclose = () => this.handleClose();
|
90280
|
+
ws.onerror = () => this.handleError();
|
90281
|
+
this.ws = ws;
|
90282
|
+
return onConnect;
|
90283
|
+
}
|
90284
|
+
static handleError() {
|
90285
|
+
for (const type in this.requestStore) {
|
90286
|
+
this.requestStore.forEach(({
|
90287
|
+
reject
|
90288
|
+
}) => {
|
90289
|
+
reject('handleError');
|
90290
|
+
});
|
90291
|
+
}
|
90292
|
+
throw Error('统一插件平台赞彩五合一设备功能加载失败');
|
90293
|
+
}
|
90294
|
+
static handleClose() {
|
90295
|
+
for (const type in this.requestStore) {
|
90296
|
+
this.requestStore.forEach(({
|
90297
|
+
reject
|
90298
|
+
}) => {
|
90299
|
+
reject('close');
|
90300
|
+
});
|
90301
|
+
}
|
90302
|
+
}
|
90303
|
+
static handleMessage(msg) {
|
90304
|
+
let data = '';
|
90305
|
+
try {
|
90306
|
+
data = JSON.parse(msg.data);
|
90307
|
+
} catch (e) {
|
90308
|
+
data = '';
|
90309
|
+
}
|
90310
|
+
if (data['function'] === "001008" && data['code'] === 0) {
|
90311
|
+
return;
|
90312
|
+
} else if (data['function'] === "001010") {
|
90313
|
+
return this.scanCallback(data);
|
90314
|
+
} else {
|
90315
|
+
this.requestStore.forEach(({
|
90316
|
+
resolve
|
90317
|
+
}) => {
|
90318
|
+
resolve(data);
|
90319
|
+
});
|
90320
|
+
this.requestStore = [];
|
90321
|
+
}
|
90322
|
+
// this.ws.close();
|
90323
|
+
}
|
90324
|
+
|
90325
|
+
static async read(method, functionCode, params = {}) {
|
90326
|
+
await this.startConnect(method);
|
90327
|
+
const methodDesc = NkoMethodDesc[method];
|
90328
|
+
if (this.ws.readyState === 1) {
|
90329
|
+
console.log(methodDesc + '连接成功');
|
90330
|
+
let jsonString;
|
90331
|
+
switch (method) {
|
90332
|
+
case NkoMethodCode.scan:
|
90333
|
+
jsonString = JSON.stringify({
|
90334
|
+
function: functionCode,
|
90335
|
+
traceId: '',
|
90336
|
+
params
|
90337
|
+
});
|
90338
|
+
break;
|
90339
|
+
default:
|
90340
|
+
jsonString = '';
|
90341
|
+
break;
|
90342
|
+
}
|
90343
|
+
this.ws.send(jsonString);
|
90344
|
+
return new Promise((resolve, reject) => {
|
90345
|
+
if (!this.requestStore) {
|
90346
|
+
this.requestStore = [];
|
90347
|
+
}
|
90348
|
+
this.requestStore.push({
|
90349
|
+
resolve,
|
90350
|
+
reject
|
90351
|
+
});
|
90352
|
+
});
|
90353
|
+
} else {
|
90354
|
+
throw Error('统一插件平台' + methodDesc + '未准备完成');
|
90355
|
+
}
|
90356
|
+
}
|
90357
|
+
/**
|
90358
|
+
* 获取扫描仪
|
90359
|
+
* @returns deviceId:扫描仪设备 ID
|
90360
|
+
*/
|
90361
|
+
static async getDeivceList() {
|
90362
|
+
const response = await NkoService.read(NkoMethodCode.scan, NkoMethodScanFunction.getScanDeivceList);
|
90363
|
+
if (!response) {
|
90364
|
+
throw Error('未匹配可用的扫描仪设备');
|
90365
|
+
}
|
90366
|
+
if (response.code !== 0) {
|
90367
|
+
throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
|
90368
|
+
}
|
90369
|
+
console.log('获取扫描仪==>', response);
|
90370
|
+
return response.data;
|
90371
|
+
}
|
90372
|
+
/**
|
90373
|
+
* 选中指定扫描仪并打开
|
90374
|
+
* @param scannerId 选中的扫描仪 ID
|
90375
|
+
*/
|
90376
|
+
static async openScanDeivce(scannerId) {
|
90377
|
+
const response = await NkoService.read(NkoMethodCode.scan, NkoMethodScanFunction.openScanDeivce, {
|
90378
|
+
scannerId
|
90379
|
+
});
|
90380
|
+
if (!response) {
|
90381
|
+
throw Error('未匹配可用的扫描仪设备');
|
90382
|
+
}
|
90383
|
+
if (response.code !== 0) {
|
90384
|
+
throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
|
90385
|
+
}
|
90386
|
+
console.log('选中指定扫描仪并打开==>', response);
|
90387
|
+
return response;
|
90388
|
+
}
|
90389
|
+
/**
|
90390
|
+
* 获取选中扫描仪可配置项
|
90391
|
+
* @returns 选择扫描仪的可配置项
|
90392
|
+
*/
|
90393
|
+
static async getScanOptions() {
|
90394
|
+
const response = await NkoService.read(NkoMethodCode.scan, NkoMethodScanFunction.getScanOptions);
|
90395
|
+
if (!response) {
|
90396
|
+
throw Error('未匹配可用的扫描仪设备');
|
90397
|
+
}
|
90398
|
+
if (response.code !== 0) {
|
90399
|
+
throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
|
90400
|
+
}
|
90401
|
+
console.log('获取选中扫描仪可配置项==>', response);
|
90402
|
+
return response.data;
|
90403
|
+
}
|
90404
|
+
/**
|
90405
|
+
* 常用参数的便捷配置能力(进纸模式、色彩、尺寸、DPI)
|
90406
|
+
*/
|
90407
|
+
static async setScanBasicOptions(config) {
|
90408
|
+
// {
|
90409
|
+
// "source": "Adf-front",
|
90410
|
+
// "mode": "Color",
|
90411
|
+
// "image-format": "jpeg"
|
90412
|
+
// }
|
90413
|
+
const response = await NkoService.read(NkoMethodCode.scan, NkoMethodScanFunction.setScanBasicOptions, config);
|
90414
|
+
if (!response) {
|
90415
|
+
throw Error('未匹配可用的扫描仪设备');
|
90416
|
+
}
|
90417
|
+
if (response.code !== 0) {
|
90418
|
+
throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
|
90419
|
+
}
|
90420
|
+
console.log('设置配置项==>', response);
|
90421
|
+
return response;
|
90422
|
+
}
|
90423
|
+
/**
|
90424
|
+
* 扫描
|
90425
|
+
* @param fileFormat 文件保存格式,若为空以当前驱动配置格式扫描
|
90426
|
+
* @returns
|
90427
|
+
*/
|
90428
|
+
static async scan(fileFormat, fileSavePath = 'C:\\ScanResult', fileNamePrefix = '', fileNameFormat = '') {
|
90429
|
+
this.fileList = [];
|
90430
|
+
const response = await NkoService.read(NkoMethodCode.scan, NkoMethodScanFunction.scan, {
|
90431
|
+
fileFormat: `.${fileFormat}`,
|
90432
|
+
// 保存路径,若为空则取服务配置文件路径
|
90433
|
+
fileSavePath,
|
90434
|
+
fileType: "Base64",
|
90435
|
+
// 保存的文件名前缀,若为空直接追加方式命名
|
90436
|
+
fileNamePrefix,
|
90437
|
+
// 保存文件的追加命名方式
|
90438
|
+
// 1. index - 四位数自增
|
90439
|
+
// 例:xx 文档_0001.tiff
|
90440
|
+
// 2. datetime - 扫描日期时间
|
90441
|
+
// 例: xx 文档_20231015164735.tiff
|
90442
|
+
// 3. guid - GUID
|
90443
|
+
// 例 :xx 文 档 _f47ac10b-58cc-4372-a567-0e02b3d4.tiff
|
90444
|
+
// 若为空以 index 模式命名
|
90445
|
+
fileNameFormat,
|
90446
|
+
// 是否返回文件 md5 信息,默认不返回
|
90447
|
+
fileMd5Enabled: false
|
90448
|
+
});
|
90449
|
+
if (!response) {
|
90450
|
+
throw Error('未匹配可用的扫描仪设备');
|
90451
|
+
}
|
90452
|
+
if (response.code !== 0) {
|
90453
|
+
throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
|
90454
|
+
}
|
90455
|
+
console.log('扫描==>', response);
|
90456
|
+
if (response.function === "001011") {
|
90457
|
+
return this.fileList;
|
90458
|
+
}
|
90459
|
+
return response;
|
90460
|
+
}
|
90461
|
+
/**
|
90462
|
+
* 扫描回调(单张)
|
90463
|
+
*/
|
90464
|
+
static scanCallback(response) {
|
90465
|
+
if (response.code !== 0) {
|
90466
|
+
throw Error(response.msg);
|
90467
|
+
} else {
|
90468
|
+
const fileName = response.data.fileName,
|
90469
|
+
fileFormat = fileName.substr(fileName.lastIndexOf(".") + 1);
|
90470
|
+
let dataUrl;
|
90471
|
+
//Tiff不能直接显示在html,需要处理
|
90472
|
+
if (fileFormat === "tiff" || fileFormat === "tif") {
|
90473
|
+
// dataUrl = this.getTiffDataUrl(response.data.fileResult);
|
90474
|
+
} else {
|
90475
|
+
dataUrl = `data:image/${fileFormat};base64,${response.data.fileResult}`;
|
90476
|
+
}
|
90477
|
+
return this.fileList.push({
|
90478
|
+
name: fileName,
|
90479
|
+
url: dataUrl
|
90480
|
+
});
|
90481
|
+
}
|
90482
|
+
}
|
90483
|
+
/**
|
90484
|
+
* 扫描完成回调
|
90485
|
+
*/
|
90486
|
+
static completeCallback(response) {
|
90487
|
+
if (response.code !== 0) {
|
90488
|
+
throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
|
90489
|
+
} else {
|
90490
|
+
console.log(response.data ? response.data : response.msg);
|
90491
|
+
}
|
90492
|
+
}
|
90493
|
+
//将Tiff base64转为可在html上正常显示的dataUrl base64
|
90494
|
+
/*static getTiffDataUrl(base64Str) {
|
90495
|
+
var buffer = this.base64ToUint8Array(base64Str);
|
90496
|
+
var tiff = new Tiff({ buffer: buffer });
|
90497
|
+
return tiff.toDataURL();
|
90498
|
+
}*/
|
90499
|
+
//Base64转为ArrayBuffer
|
90500
|
+
static base64ToUint8Array(base64String) {
|
90501
|
+
const padding = "=".repeat((4 - base64String.length % 4) % 4);
|
90502
|
+
const base64 = (base64String + padding).replace(/\-/g, "+").replace(/_/g, "/");
|
90503
|
+
const rawData = window.atob(base64);
|
90504
|
+
const outputArray = new Uint8Array(rawData.length);
|
90505
|
+
for (let i = 0; i < rawData.length; ++i) {
|
90506
|
+
outputArray[i] = rawData.charCodeAt(i);
|
90507
|
+
}
|
90508
|
+
return outputArray;
|
90509
|
+
}
|
90510
|
+
}
|
90511
|
+
_defineProperty(NkoService, "iReadCardWebSocketUrl", '');
|
90512
|
+
_defineProperty(NkoService, "scanWebSocketUrl", 'ws://127.0.0.1:51818');
|
90513
|
+
_defineProperty(NkoService, "ws", void 0);
|
90514
|
+
_defineProperty(NkoService, "requestStore", []);
|
90515
|
+
_defineProperty(NkoService, "fileList", []);
|
90516
|
+
;// 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&
|
90517
|
+
|
90518
|
+
|
90519
|
+
/* harmony default export */ var scanner_nkovue_type_script_lang_js_ = ({
|
90520
|
+
name: 'scanner-nko',
|
90521
|
+
components: {},
|
90522
|
+
props: {
|
90523
|
+
/**
|
90524
|
+
* 保存路径,若为空则取服务配置文件路径
|
90525
|
+
*/
|
90526
|
+
fileSavePath: {
|
90527
|
+
default: '',
|
90528
|
+
type: String
|
90529
|
+
},
|
90530
|
+
/**
|
90531
|
+
* 保存的文件名前缀,若为空直接追加方式命名
|
90532
|
+
*/
|
90533
|
+
fileNamePrefix: {
|
90534
|
+
default: '',
|
90535
|
+
type: String
|
90536
|
+
},
|
90537
|
+
/**
|
90538
|
+
* 保存文件的追加命名方式
|
90539
|
+
* 1. index - 四位数自增
|
90540
|
+
* 例:xx 文档_0001.tiff
|
90541
|
+
* 2. datetime - 扫描日期时间
|
90542
|
+
* 例: xx 文档_20231015164735.tiff
|
90543
|
+
* 3. guid - GUID
|
90544
|
+
* 例 :xx 文 档 _f47ac10b-58cc-4372-a567-0e02b3d4.tiff
|
90545
|
+
* 若为空以 index 模式命名
|
90546
|
+
*/
|
90547
|
+
fileNameFormat: {
|
90548
|
+
default: '',
|
90549
|
+
type: String
|
90550
|
+
}
|
90551
|
+
},
|
90552
|
+
data: () => {
|
90553
|
+
return {
|
90554
|
+
//页面整体遮罩
|
90555
|
+
pageLoading: false,
|
90556
|
+
pageLoadingText: '正在配置相关设置',
|
90557
|
+
//扫描设备列表
|
90558
|
+
deviceList: [],
|
90559
|
+
//设备是否已连接
|
90560
|
+
deviceOpend: false,
|
90561
|
+
//设备是否繁忙
|
90562
|
+
deviceWorking: false,
|
90563
|
+
//扫描配置
|
90564
|
+
scanConfig: {
|
90565
|
+
deviceId: null,
|
90566
|
+
source: null,
|
90567
|
+
resolution: null,
|
90568
|
+
mode: null,
|
90569
|
+
paperSize: null,
|
90570
|
+
fileFormat: null
|
90571
|
+
},
|
90572
|
+
//进纸模式
|
90573
|
+
sourceOptions: [],
|
90574
|
+
//扫描颜色
|
90575
|
+
modeOptions: [],
|
90576
|
+
//分辨率
|
90577
|
+
resolutionOptions: [],
|
90578
|
+
//纸张类型
|
90579
|
+
paperSizeOptions: [],
|
90580
|
+
//文件格式
|
90581
|
+
fileFormatOptions: [],
|
90582
|
+
//中间图片数据 {name:'',url:'',checked:false}
|
90583
|
+
scanFileList: [],
|
90584
|
+
initialIndex: 0,
|
90585
|
+
scannerResult: '',
|
90586
|
+
isIndeterminate: false,
|
90587
|
+
checkAll: false
|
90588
|
+
};
|
90589
|
+
},
|
90590
|
+
computed: {
|
90591
|
+
//扫描设备是否可用
|
90592
|
+
isDeviceReady() {
|
90593
|
+
return this.scanConfig.deviceId && this.deviceOpend;
|
90594
|
+
},
|
90595
|
+
imgUrls() {
|
90596
|
+
return this.scanFileList.map(item => item.url);
|
90597
|
+
}
|
90598
|
+
},
|
90599
|
+
created() {},
|
90600
|
+
methods: {
|
90601
|
+
handleCheckAllChange(val) {
|
90602
|
+
this.scanFileList.forEach(data => {
|
90603
|
+
data.checked = val;
|
90604
|
+
});
|
90605
|
+
this.isIndeterminate = false;
|
90606
|
+
},
|
90607
|
+
handleCheckedChange() {
|
90608
|
+
const checkedCount = this.scanFileList.filter(data => data.checked).length;
|
90609
|
+
this.isIndeterminate = checkedCount > 0 && checkedCount < this.scanFileList.length;
|
90610
|
+
this.checkAll = this.scanFileList.length > 0 && checkedCount === this.scanFileList.length;
|
90611
|
+
},
|
90612
|
+
/**
|
90613
|
+
* 初始化ScanServiceAPI连接
|
90614
|
+
*/
|
90615
|
+
async initScanServiceAPI() {
|
90616
|
+
this.pageLoadingText = '正在连接扫描服务,请稍候...';
|
90617
|
+
this.pageLoading = true;
|
90618
|
+
// 获取设备列表
|
90619
|
+
this.deviceList = await NkoService.getDeivceList();
|
90620
|
+
this.deviceOpend = true;
|
90621
|
+
this.pageLoading = false;
|
90622
|
+
},
|
90623
|
+
/**
|
90624
|
+
* 扫描服务关闭时回调
|
90625
|
+
*/
|
90626
|
+
wsCloseCallback() {
|
90627
|
+
this.$message.warning('扫描服务连接已断开');
|
90628
|
+
this.pageLoading = false;
|
90629
|
+
this.resetData();
|
90630
|
+
this.deviceList = [];
|
90631
|
+
this.scanConfig.deviceId = null;
|
90632
|
+
},
|
90633
|
+
/**
|
90634
|
+
* 重置数据
|
90635
|
+
*/
|
90636
|
+
resetData() {
|
90637
|
+
this.scanConfig.source = null;
|
90638
|
+
this.scanConfig.resolution = null;
|
90639
|
+
this.scanConfig.mode = null;
|
90640
|
+
this.scanConfig.paperSideviceOpendze = null;
|
90641
|
+
this.scanConfig.fileFormat = null;
|
90642
|
+
this.sourceOptions = [];
|
90643
|
+
this.modeOptions = [];
|
90644
|
+
this.resolutionOptions = [];
|
90645
|
+
this.paperSizeOptions = [];
|
90646
|
+
this.fileFormatOptions = [];
|
90647
|
+
this.deviceOpend = false;
|
90648
|
+
this.deviceWorking = false;
|
90649
|
+
},
|
90650
|
+
/**
|
90651
|
+
* 选择扫描设备
|
90652
|
+
*/
|
90653
|
+
openDeivce() {
|
90654
|
+
this.pageLoadingText = '正在设置扫描源,请稍后...';
|
90655
|
+
this.pageLoading = true;
|
90656
|
+
|
90657
|
+
//重置扫描配置
|
90658
|
+
this.resetData();
|
90659
|
+
// 获取扫描仪可配置项
|
90660
|
+
this.getScanOptions();
|
90661
|
+
},
|
90662
|
+
/**
|
90663
|
+
* 获取扫描仪可配置项
|
90664
|
+
*/
|
90665
|
+
async getScanOptions() {
|
90666
|
+
this.pageLoadingText = '正在获取扫描仪能力,请稍后...';
|
90667
|
+
this.pageLoading = true;
|
90668
|
+
await NkoService.openScanDeivce(this.scanConfig.deviceId);
|
90669
|
+
var options = await NkoService.getScanOptions();
|
90670
|
+
this.sourceOptions = options.source;
|
90671
|
+
this.modeOptions = options.mode;
|
90672
|
+
this.resolutionOptions = options.resolution;
|
90673
|
+
this.paperSizeOptions = options['paper-size'];
|
90674
|
+
this.fileFormatOptions = options['image-format'];
|
90675
|
+
this.scanConfig.source = this.sourceOptions[0] || null;
|
90676
|
+
this.scanConfig.mode = this.modeOptions[0] || null;
|
90677
|
+
this.scanConfig.resolution = this.resolutionOptions[0] || null;
|
90678
|
+
this.scanConfig.paperSize = this.paperSizeOptions[0] || null;
|
90679
|
+
this.scanConfig.fileFormat = this.fileFormatOptions[0] || null;
|
90680
|
+
this.deviceOpend = true;
|
90681
|
+
this.pageLoading = false;
|
90682
|
+
},
|
90683
|
+
/**
|
90684
|
+
* 点击扫描
|
90685
|
+
*/
|
90686
|
+
async doScan() {
|
90687
|
+
if (!this.isDeviceReady || this.deviceWorking) {
|
90688
|
+
return;
|
90689
|
+
}
|
90690
|
+
this.pageLoadingText = '正在提交扫描请求,请稍后...';
|
90691
|
+
this.pageLoading = true;
|
90692
|
+
await NkoService.setScanBasicOptions({
|
90693
|
+
source: this.scanConfig.source,
|
90694
|
+
mode: this.scanConfig.mode,
|
90695
|
+
'paper-size': this.scanConfig.paperSize,
|
90696
|
+
resolution: this.scanConfig.resolution
|
90697
|
+
});
|
90698
|
+
const data = await NkoService.scan(this.scanConfig.fileFormat, this.fileSavePath, this.fileNamePrefix, this.fileNameFormat);
|
90699
|
+
this.scanFileList = [...this.scanFileList, ...data];
|
90700
|
+
this.pageLoading = false;
|
90701
|
+
},
|
90702
|
+
//预览
|
90703
|
+
previewImg(index) {
|
90704
|
+
this.initialIndex = index;
|
90705
|
+
},
|
90706
|
+
clearImgList() {
|
90707
|
+
this.scanFileList = [];
|
90708
|
+
},
|
90709
|
+
deleteFileEvent(index) {
|
90710
|
+
this.scanFileList.splice(index, 1);
|
90711
|
+
},
|
90712
|
+
batchDelFilesEvent() {
|
90713
|
+
let list = [];
|
90714
|
+
this.scanFileList.forEach(data => {
|
90715
|
+
if (!data.checked) list.push(data);
|
90716
|
+
});
|
90717
|
+
this.scanFileList = list;
|
90718
|
+
},
|
90719
|
+
sendScannerResult(data = null) {
|
90720
|
+
const list = data ? [data] : this.scanFileList.filter(data => data.checked);
|
90721
|
+
if (!list || list.length === 0) return;
|
90722
|
+
this.$emit('send-scanner-result', list.map(data => ({
|
90723
|
+
name: data.name,
|
90724
|
+
url: data.url
|
90725
|
+
})));
|
90726
|
+
}
|
90727
|
+
}
|
90728
|
+
});
|
90729
|
+
;// CONCATENATED MODULE: ./packages/scanner/scanner-nko/src/scanner-nko.vue?vue&type=script&lang=js&
|
90730
|
+
/* harmony default export */ var src_scanner_nkovue_type_script_lang_js_ = (scanner_nkovue_type_script_lang_js_);
|
90731
|
+
;// 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&
|
90732
|
+
// extracted by mini-css-extract-plugin
|
90733
|
+
|
90734
|
+
;// CONCATENATED MODULE: ./packages/scanner/scanner-nko/src/scanner-nko.vue?vue&type=style&index=0&id=304bcec5&prod&lang=scss&
|
90735
|
+
|
90736
|
+
;// CONCATENATED MODULE: ./packages/scanner/scanner-nko/src/scanner-nko.vue
|
90737
|
+
|
90738
|
+
|
90739
|
+
|
90740
|
+
;
|
90741
|
+
|
90742
|
+
|
90743
|
+
/* normalize component */
|
90744
|
+
|
90745
|
+
var scanner_nko_component = normalizeComponent(
|
90746
|
+
src_scanner_nkovue_type_script_lang_js_,
|
90747
|
+
scanner_nkovue_type_template_id_304bcec5_render,
|
90748
|
+
scanner_nkovue_type_template_id_304bcec5_staticRenderFns,
|
90749
|
+
false,
|
90750
|
+
null,
|
90751
|
+
null,
|
90752
|
+
null
|
90753
|
+
|
90754
|
+
)
|
90755
|
+
|
90756
|
+
/* harmony default export */ var scanner_nko = (scanner_nko_component.exports);
|
90757
|
+
;// CONCATENATED MODULE: ./packages/scanner/scanner-nko/index.js
|
90758
|
+
/**
|
90759
|
+
* @author: shenyz
|
90760
|
+
* @date: 2025-02-24
|
90761
|
+
* @description:index 赞彩五合一设备扫描功能
|
90762
|
+
*/
|
90763
|
+
|
90764
|
+
scanner_nko.install = Vue => {
|
90765
|
+
Vue.component(scanner_nko.name, scanner_nko);
|
90766
|
+
};
|
90767
|
+
/* harmony default export */ var scanner_scanner_nko = (scanner_nko);
|
89117
90768
|
;// CONCATENATED MODULE: ./packages/index.js
|
89118
90769
|
|
89119
90770
|
|
@@ -89124,6 +90775,7 @@ id_card_reader_button.install = Vue => {
|
|
89124
90775
|
|
89125
90776
|
|
89126
90777
|
|
90778
|
+
|
89127
90779
|
// import {
|
89128
90780
|
// Button,
|
89129
90781
|
// Tooltip,
|
@@ -89139,7 +90791,7 @@ id_card_reader_button.install = Vue => {
|
|
89139
90791
|
// Dialog
|
89140
90792
|
// ]
|
89141
90793
|
// 组件列表
|
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];
|
90794
|
+
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
90795
|
|
89144
90796
|
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,那么所有的组件都会被注册
|
89145
90797
|
const install = Vue => {
|