unify-external-plugin-platform 0.0.3-3 → 0.0.3-31
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 +2557 -565
- package/dist/external-plugin.css +1 -1
- package/dist/external-plugin.umd.js +2557 -565
- 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=7676b84c&scoped=true&
|
84322
|
+
var scanner_camera_componentvue_type_template_id_7676b84c_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_755a80de_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_7676b84c_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_755a80de_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
|
/** 合并*/
|
@@ -84164,6 +84472,8 @@ var eloam_plugin_service_ELoamMethodCode;
|
|
84164
84472
|
ELoamMethodCode["ScannerSecondaryCamera_Base64"] = "ScannerSecondaryCamera_Base64";
|
84165
84473
|
/** 读取二代身份证 */
|
84166
84474
|
ELoamMethodCode["ReadIDCard_Base64"] = "ReadIDCard_Base64";
|
84475
|
+
/** 关闭摄像头*/
|
84476
|
+
ELoamMethodCode["StopCamera"] = "stopCamera";
|
84167
84477
|
})(eloam_plugin_service_ELoamMethodCode || (eloam_plugin_service_ELoamMethodCode = {}));
|
84168
84478
|
const eloam_plugin_service_ELoamMethodDesc = {
|
84169
84479
|
[eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64]: '扫描',
|
@@ -84173,11 +84483,19 @@ const eloam_plugin_service_ELoamMethodDesc = {
|
|
84173
84483
|
class eloam_plugin_service_ELoamPassService {
|
84174
84484
|
/** 主摄像头地址 */
|
84175
84485
|
static get mainCameraUrl() {
|
84176
|
-
|
84486
|
+
if (this._isLinux) {
|
84487
|
+
return this.baseLinuxServiceUrl + '/StartPreview?dev_idx=0&res_id=0';
|
84488
|
+
} else {
|
84489
|
+
return this.baseServiceUrl + '/video=stream&camidx=0';
|
84490
|
+
}
|
84177
84491
|
}
|
84178
84492
|
/** 副摄像头地址 */
|
84179
84493
|
static get secondaryCameraUrl() {
|
84180
|
-
|
84494
|
+
if (this._isLinux) {
|
84495
|
+
return this.baseLinuxServiceUrl + '/StartPreview?dev_idx=1&res_id=0';
|
84496
|
+
} else {
|
84497
|
+
return this.baseServiceUrl + '/video=stream&camidx=1';
|
84498
|
+
}
|
84181
84499
|
}
|
84182
84500
|
static async read(method, data) {
|
84183
84501
|
let param = {},
|
@@ -84188,13 +84506,27 @@ class eloam_plugin_service_ELoamPassService {
|
|
84188
84506
|
url = `${this.baseLinuxServiceUrl}/GetAllDisplayInfo`;
|
84189
84507
|
requestType = 'get';
|
84190
84508
|
break;
|
84509
|
+
case eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxStartPreview:
|
84510
|
+
url = `${this.baseLinuxServiceUrl}/StartPreview?dev_idx=${data}&res_id=0`;
|
84511
|
+
requestType = 'get';
|
84512
|
+
break;
|
84513
|
+
case eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxGetFrame:
|
84514
|
+
url = `${this.baseLinuxServiceUrl}/getFrame`;
|
84515
|
+
requestType = 'get';
|
84516
|
+
break;
|
84191
84517
|
case eloam_plugin_service_ELoamMethodCode.ScannerCameraRotate:
|
84192
|
-
|
84193
|
-
|
84194
|
-
|
84195
|
-
|
84196
|
-
}
|
84197
|
-
|
84518
|
+
if (eloam_plugin_service_ELoamPassService._isLinux) {
|
84519
|
+
let count = data / 90;
|
84520
|
+
url = this.baseLinuxServiceUrl + `/Rotate?count=${count}`;
|
84521
|
+
requestType = 'get';
|
84522
|
+
} else {
|
84523
|
+
url = this.baseServiceUrl + '/video=rotate';
|
84524
|
+
param = {
|
84525
|
+
camidx: "0",
|
84526
|
+
rotate: data.toString()
|
84527
|
+
};
|
84528
|
+
requestType = 'post';
|
84529
|
+
}
|
84198
84530
|
break;
|
84199
84531
|
case eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64:
|
84200
84532
|
// 纠偏
|
@@ -84231,34 +84563,54 @@ class eloam_plugin_service_ELoamPassService {
|
|
84231
84563
|
}
|
84232
84564
|
break;
|
84233
84565
|
case eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64:
|
84234
|
-
|
84235
|
-
|
84236
|
-
|
84237
|
-
|
84238
|
-
|
84239
|
-
|
84240
|
-
|
84241
|
-
|
84242
|
-
|
84243
|
-
|
84244
|
-
|
84245
|
-
|
84246
|
-
|
84566
|
+
if (this._isLinux) {
|
84567
|
+
url = this.baseLinuxServiceUrl + '/getPic?filepath=/tmp';
|
84568
|
+
requestType = 'get';
|
84569
|
+
} else {
|
84570
|
+
url = this.baseServiceUrl + '/video=grabimage';
|
84571
|
+
param = {
|
84572
|
+
filepath: "base64",
|
84573
|
+
rotate: "0",
|
84574
|
+
deskew: data,
|
84575
|
+
deskewval: "20",
|
84576
|
+
camidx: "0",
|
84577
|
+
ColorMode: "0",
|
84578
|
+
quality: "0",
|
84579
|
+
bIsPrint1to1: "0"
|
84580
|
+
};
|
84581
|
+
requestType = 'post';
|
84582
|
+
}
|
84247
84583
|
break;
|
84248
84584
|
case eloam_plugin_service_ELoamMethodCode.ScannerSecondaryCamera_Base64:
|
84249
|
-
|
84250
|
-
|
84251
|
-
|
84252
|
-
|
84253
|
-
|
84254
|
-
|
84255
|
-
|
84256
|
-
|
84257
|
-
|
84258
|
-
|
84259
|
-
|
84260
|
-
|
84261
|
-
|
84585
|
+
if (this._isLinux) {
|
84586
|
+
url = this.baseLinuxServiceUrl + '/getPic?filepath=/tmp';
|
84587
|
+
requestType = 'get';
|
84588
|
+
} else {
|
84589
|
+
url = this.baseServiceUrl + '/video=grabimage';
|
84590
|
+
param = {
|
84591
|
+
filepath: "",
|
84592
|
+
rotate: "0",
|
84593
|
+
deskew: "0",
|
84594
|
+
deskewval: "0",
|
84595
|
+
camidx: "1",
|
84596
|
+
ColorMode: "0",
|
84597
|
+
quality: "0",
|
84598
|
+
bIsPrint1to1: "0"
|
84599
|
+
};
|
84600
|
+
requestType = 'post';
|
84601
|
+
}
|
84602
|
+
break;
|
84603
|
+
case eloam_plugin_service_ELoamMethodCode.StopCamera:
|
84604
|
+
if (this._isLinux) {
|
84605
|
+
url = this.baseLinuxServiceUrl + '/StopPreview?dev_idx=0';
|
84606
|
+
requestType = 'get';
|
84607
|
+
} else {
|
84608
|
+
url = this.baseServiceUrl + ' /video=close';
|
84609
|
+
param = {
|
84610
|
+
"camidx": "0"
|
84611
|
+
};
|
84612
|
+
requestType = 'post';
|
84613
|
+
}
|
84262
84614
|
break;
|
84263
84615
|
case eloam_plugin_service_ELoamMethodCode.ReadIDCard_Base64:
|
84264
84616
|
url = this.baseServiceUrl + '/card=idcard';
|
@@ -84271,44 +84623,72 @@ class eloam_plugin_service_ELoamPassService {
|
|
84271
84623
|
static async initLinuxCamera() {
|
84272
84624
|
await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxInit);
|
84273
84625
|
}
|
84626
|
+
static async startPreview(data) {
|
84627
|
+
return await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxStartPreview, data);
|
84628
|
+
}
|
84629
|
+
static async getEloamFrame() {
|
84630
|
+
return await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxGetFrame);
|
84631
|
+
}
|
84274
84632
|
/** 主摄像头拍照 */
|
84275
84633
|
static async scanByMainCamera(deskew) {
|
84276
84634
|
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64, deskew);
|
84277
84635
|
if (this._isLinux) {
|
84278
|
-
return res
|
84636
|
+
return res; // 国产
|
84279
84637
|
} else {
|
84280
|
-
return res
|
84638
|
+
return res;
|
84281
84639
|
}
|
84282
84640
|
}
|
84283
84641
|
/** 副摄像头拍照 */
|
84284
84642
|
static async scanBySecondaryCamera() {
|
84285
84643
|
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerSecondaryCamera_Base64);
|
84286
|
-
|
84644
|
+
if (this._isLinux) {
|
84645
|
+
return res.data.img; // 国产
|
84646
|
+
} else {
|
84647
|
+
return res.photoBase64;
|
84648
|
+
}
|
84287
84649
|
}
|
84288
84650
|
static async mergeImage(list, type) {
|
84289
84651
|
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraMerge_Base64, {
|
84290
84652
|
list,
|
84291
84653
|
type
|
84292
84654
|
});
|
84293
|
-
return res.base64;
|
84655
|
+
return res.base64 || res.data;
|
84294
84656
|
}
|
84295
|
-
static async scanByCamera(type, deskew) {
|
84657
|
+
static async scanByCamera(type, deskew, isMerge = false) {
|
84296
84658
|
switch (type) {
|
84297
84659
|
case "main":
|
84298
|
-
|
84660
|
+
let res = await this.scanByMainCamera(deskew);
|
84661
|
+
if (isMerge) {
|
84662
|
+
// 合并
|
84663
|
+
if (this._isLinux) {
|
84664
|
+
return res.data.path; // 国产
|
84665
|
+
} else {
|
84666
|
+
return res.photoBase64;
|
84667
|
+
}
|
84668
|
+
} else {
|
84669
|
+
// 拍照
|
84670
|
+
if (this._isLinux) {
|
84671
|
+
return res.data.img; // 国产
|
84672
|
+
} else {
|
84673
|
+
return res.photoBase64;
|
84674
|
+
}
|
84675
|
+
}
|
84299
84676
|
case 'vice':
|
84300
84677
|
return this.scanBySecondaryCamera();
|
84301
84678
|
}
|
84302
84679
|
}
|
84303
84680
|
static async turnOnTheCamera() {}
|
84681
|
+
static async stopCamera() {
|
84682
|
+
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.StopCamera);
|
84683
|
+
}
|
84304
84684
|
/** 读取身份证 */
|
84305
84685
|
static async idCardRead() {
|
84306
84686
|
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ReadIDCard_Base64);
|
84307
84687
|
var readData = res.IDCardInfo;
|
84308
84688
|
// Agency 发证机关,外国人永居证时,该值为中文名
|
84309
|
-
var name = readData.name;
|
84310
|
-
var enname = readData.enname;
|
84311
|
-
var cnname = readData.cnname;
|
84689
|
+
var name = (readData.name || '').trim();
|
84690
|
+
var enname = (readData.enname || '').trim();
|
84691
|
+
var cnname = (readData.cnname || '').trim();
|
84312
84692
|
var sex = readData.sex;
|
84313
84693
|
var birthday = readData.birthday;
|
84314
84694
|
var address = readData.address;
|
@@ -84338,8 +84718,8 @@ class eloam_plugin_service_ELoamPassService {
|
|
84338
84718
|
info: {
|
84339
84719
|
cardType: cardType,
|
84340
84720
|
nationality: nationality,
|
84341
|
-
name: name,
|
84342
|
-
chineseName: chineseName,
|
84721
|
+
name: name.trim(),
|
84722
|
+
chineseName: chineseName.trim(),
|
84343
84723
|
englishName: englishName,
|
84344
84724
|
sex: sex,
|
84345
84725
|
birthday: birthday,
|
@@ -84366,6 +84746,7 @@ _defineProperty(eloam_plugin_service_ELoamPassService, "_isLinux", String(naviga
|
|
84366
84746
|
* @description:common-message
|
84367
84747
|
*/
|
84368
84748
|
const SCANNER_CAMERA_REFRESH_PHOTO_EVENT = 'scanner-camera-refresh-photo-event';
|
84749
|
+
const SIGN_PHOTO_EVENT = 'sign-photo-event';
|
84369
84750
|
class ScannerCameraRefreshPhotoEvent extends Event {
|
84370
84751
|
constructor(url) {
|
84371
84752
|
super(SCANNER_CAMERA_REFRESH_PHOTO_EVENT);
|
@@ -84373,6 +84754,13 @@ class ScannerCameraRefreshPhotoEvent extends Event {
|
|
84373
84754
|
this.scannerResultUrl = url;
|
84374
84755
|
}
|
84375
84756
|
}
|
84757
|
+
class SignResultEvent extends Event {
|
84758
|
+
constructor(url) {
|
84759
|
+
super(SIGN_PHOTO_EVENT);
|
84760
|
+
_defineProperty(this, "signResultUrl", '');
|
84761
|
+
this.signResultUrl = url;
|
84762
|
+
}
|
84763
|
+
}
|
84376
84764
|
;// CONCATENATED MODULE: ./packages/utils/idCard-common-utils.ts
|
84377
84765
|
/**
|
84378
84766
|
* 根据身份证号码获取指定数据
|
@@ -85522,8 +85910,12 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85522
85910
|
}, {
|
85523
85911
|
label: '旋转',
|
85524
85912
|
name: 'rotate-video'
|
85913
|
+
}, {
|
85914
|
+
label: '关闭',
|
85915
|
+
name: 'close'
|
85525
85916
|
}],
|
85526
85917
|
_isLinux: String(navigator.platform).indexOf("Linux") > -1,
|
85918
|
+
eloamLinuxFrameTimer: {},
|
85527
85919
|
mergeImageList: []
|
85528
85920
|
};
|
85529
85921
|
},
|
@@ -85554,6 +85946,10 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85554
85946
|
// 国产客户端一体机
|
85555
85947
|
await WeiRongPluginService.stopCamera();
|
85556
85948
|
break;
|
85949
|
+
case 5:
|
85950
|
+
// 良田
|
85951
|
+
await eloam_plugin_service_ELoamPassService.stopCamera();
|
85952
|
+
break;
|
85557
85953
|
}
|
85558
85954
|
},
|
85559
85955
|
/**
|
@@ -85592,7 +85988,8 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85592
85988
|
let type = this.camera === 0 ? 'main' : 'vice';
|
85593
85989
|
const res = await eloam_plugin_service_ELoamPassService.scanByCamera(type, this.deskewStatus);
|
85594
85990
|
if (res) {
|
85595
|
-
|
85991
|
+
let path = res;
|
85992
|
+
this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${path}`);
|
85596
85993
|
} else {
|
85597
85994
|
this.$message.error('拍照出错,请检查设备是否连接成功');
|
85598
85995
|
}
|
@@ -85626,8 +86023,15 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85626
86023
|
break;
|
85627
86024
|
case 5:
|
85628
86025
|
// 良田高拍仪
|
85629
|
-
|
85630
|
-
|
86026
|
+
if (!(String(navigator.platform).indexOf("Linux") > -1)) {
|
86027
|
+
this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
|
86028
|
+
} else {
|
86029
|
+
await eloam_plugin_service_ELoamPassService.initLinuxCamera();
|
86030
|
+
let res = await eloam_plugin_service_ELoamPassService.startPreview('0');
|
86031
|
+
if (res.returnCode == "0" || res.returnCode == "2") {
|
86032
|
+
this.eloamLinuxFrameTimer = setInterval(this.getEloamFrame, 300);
|
86033
|
+
}
|
86034
|
+
}
|
85631
86035
|
break;
|
85632
86036
|
case 6:
|
85633
86037
|
// 国产客户端一体机
|
@@ -85635,6 +86039,15 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85635
86039
|
break;
|
85636
86040
|
}
|
85637
86041
|
},
|
86042
|
+
async getEloamFrame() {
|
86043
|
+
let res = await eloam_plugin_service_ELoamPassService.getEloamFrame();
|
86044
|
+
if (res.returnCode == "1") {
|
86045
|
+
clearInterval(this.eloamLinuxFrameTimer);
|
86046
|
+
return;
|
86047
|
+
}
|
86048
|
+
if (res.data.img == "") return;
|
86049
|
+
this.scannerVideoSrc = `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res.data.img}`;
|
86050
|
+
},
|
85638
86051
|
/**
|
85639
86052
|
* 副摄像头
|
85640
86053
|
*/
|
@@ -85654,7 +86067,13 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85654
86067
|
break;
|
85655
86068
|
case 5:
|
85656
86069
|
// 良田
|
85657
|
-
|
86070
|
+
if (!(String(navigator.platform).indexOf("Linux") > -1)) {
|
86071
|
+
this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
|
86072
|
+
} else {
|
86073
|
+
await eloam_plugin_service_ELoamPassService.initLinuxCamera();
|
86074
|
+
await eloam_plugin_service_ELoamPassService.startPreview('1');
|
86075
|
+
this.eloamLinuxFrameTimer = setInterval(this.getEloamFrame, 300);
|
86076
|
+
}
|
85658
86077
|
break;
|
85659
86078
|
case 6:
|
85660
86079
|
// 国产客户端一体机
|
@@ -85664,9 +86083,10 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85664
86083
|
},
|
85665
86084
|
async takePictureMerge(type) {
|
85666
86085
|
if (type === '1' && this.deskewStatus === '0') return this.$message.warning('请先开启纠偏');
|
85667
|
-
const res = await eloam_plugin_service_ELoamPassService.scanByCamera('main', this.deskewStatus);
|
86086
|
+
const res = await eloam_plugin_service_ELoamPassService.scanByCamera('main', this.deskewStatus, true);
|
85668
86087
|
if (res) {
|
85669
|
-
|
86088
|
+
let path = res;
|
86089
|
+
this.mergeImageList.push(path);
|
85670
86090
|
if (this.mergeImageList.length === 1) this.$message.success('第一张拍摄成功,请拍第二张');
|
85671
86091
|
if (this.mergeImageList.length === 2) {
|
85672
86092
|
let result = await eloam_plugin_service_ELoamPassService.mergeImage(this.mergeImageList, type);
|
@@ -85684,13 +86104,14 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85684
86104
|
case 'take-idCard-pictures-merge':
|
85685
86105
|
case 'open-deskew': // 纠偏裁边
|
85686
86106
|
case 'rotate-video':
|
86107
|
+
case 'close':
|
85687
86108
|
return this.machineType === 5;
|
85688
86109
|
// 良田显示合并拍照
|
85689
86110
|
default:
|
85690
86111
|
return true;
|
85691
86112
|
}
|
85692
86113
|
},
|
85693
|
-
handleAction(name) {
|
86114
|
+
async handleAction(name) {
|
85694
86115
|
switch (name) {
|
85695
86116
|
case 'start-main':
|
85696
86117
|
// 主摄像头
|
@@ -85713,7 +86134,7 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85713
86134
|
this.takePictureMerge('1');
|
85714
86135
|
break;
|
85715
86136
|
case 'rotate-video':
|
85716
|
-
if (
|
86137
|
+
if (String(navigator.platform).indexOf("Linux") > -1) {
|
85717
86138
|
this.rotateDeg += 90;
|
85718
86139
|
if (this.rotateDeg === 360) this.rotateDeg = 0;
|
85719
86140
|
} else {
|
@@ -85723,18 +86144,21 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85723
86144
|
break;
|
85724
86145
|
case 'open-deskew':
|
85725
86146
|
this.deskewStatus = this.deskewStatus === '1' ? '0' : '1';
|
85726
|
-
eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64, this.deskewStatus);
|
85727
|
-
|
86147
|
+
eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64, this.deskewStatus); // 开启纠偏裁边
|
86148
|
+
break;
|
86149
|
+
case 'close':
|
86150
|
+
await eloam_plugin_service_ELoamPassService.stopCamera();
|
86151
|
+
break;
|
85728
86152
|
}
|
85729
86153
|
}
|
85730
86154
|
}
|
85731
86155
|
});
|
85732
86156
|
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=script&lang=js&
|
85733
86157
|
/* 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=
|
86158
|
+
;// 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=7676b84c&prod&scoped=true&lang=scss&
|
85735
86159
|
// extracted by mini-css-extract-plugin
|
85736
86160
|
|
85737
|
-
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=
|
86161
|
+
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=7676b84c&prod&scoped=true&lang=scss&
|
85738
86162
|
|
85739
86163
|
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue
|
85740
86164
|
|
@@ -85747,11 +86171,11 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85747
86171
|
|
85748
86172
|
var scanner_camera_component_component = normalizeComponent(
|
85749
86173
|
component_scanner_camera_componentvue_type_script_lang_js_,
|
85750
|
-
|
85751
|
-
|
86174
|
+
scanner_camera_componentvue_type_template_id_7676b84c_scoped_true_render,
|
86175
|
+
scanner_camera_componentvue_type_template_id_7676b84c_scoped_true_staticRenderFns,
|
85752
86176
|
false,
|
85753
86177
|
null,
|
85754
|
-
"
|
86178
|
+
"7676b84c",
|
85755
86179
|
null
|
85756
86180
|
|
85757
86181
|
)
|
@@ -86046,8 +86470,8 @@ id_card_reader_eloam.install = Vue => {
|
|
86046
86470
|
Vue.component(id_card_reader_eloam.name, id_card_reader_eloam);
|
86047
86471
|
};
|
86048
86472
|
/* 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
|
86473
|
+
;// 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=617b7fd0&scoped=true&
|
86474
|
+
var id_card_reader_buttonvue_type_template_id_617b7fd0_scoped_true_render = function render() {
|
86051
86475
|
var _vm = this,
|
86052
86476
|
_c = _vm._self._c;
|
86053
86477
|
return _vm.tip ? _c('el-tooltip', {
|
@@ -86124,7 +86548,7 @@ var id_card_reader_buttonvue_type_template_id_d4b32654_scoped_true_render = func
|
|
86124
86548
|
}
|
86125
86549
|
})], 2);
|
86126
86550
|
};
|
86127
|
-
var
|
86551
|
+
var id_card_reader_buttonvue_type_template_id_617b7fd0_scoped_true_staticRenderFns = [];
|
86128
86552
|
|
86129
86553
|
;// CONCATENATED MODULE: ./packages/service/external-plugins/default-plugin-socket.service.ts
|
86130
86554
|
|
@@ -87197,7 +87621,8 @@ class MRAdbReadService {
|
|
87197
87621
|
birthday,
|
87198
87622
|
address,
|
87199
87623
|
cardId,
|
87200
|
-
nation
|
87624
|
+
nation,
|
87625
|
+
police
|
87201
87626
|
},
|
87202
87627
|
headImage
|
87203
87628
|
},
|
@@ -87209,7 +87634,8 @@ class MRAdbReadService {
|
|
87209
87634
|
birthday,
|
87210
87635
|
address,
|
87211
87636
|
cardId,
|
87212
|
-
nation
|
87637
|
+
nation,
|
87638
|
+
police
|
87213
87639
|
});
|
87214
87640
|
return IDCardData;
|
87215
87641
|
}
|
@@ -87610,6 +88036,257 @@ var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpac
|
|
87610
88036
|
* @date: 2023-10-12
|
87611
88037
|
* @description:华视电子读卡器
|
87612
88038
|
*/
|
88039
|
+
const NationalityEnum = {
|
88040
|
+
AND: "安道尔",
|
88041
|
+
AFG: "阿富汗",
|
88042
|
+
ATG: "安提瓜和巴布达",
|
88043
|
+
AIA: "安圭拉",
|
88044
|
+
ALB: "阿尔巴尼亚",
|
88045
|
+
ARM: "亚美尼亚",
|
88046
|
+
AGO: "安哥拉",
|
88047
|
+
ATA: "南极洲",
|
88048
|
+
ARG: "阿根廷",
|
88049
|
+
ASM: "美属萨摩亚",
|
88050
|
+
AUT: "奥地利",
|
88051
|
+
AUS: "澳大利亚",
|
88052
|
+
ABW: "阿鲁巴",
|
88053
|
+
ALA: "奥兰群岛",
|
88054
|
+
AZE: "阿塞拜疆",
|
88055
|
+
BIH: "波黑",
|
88056
|
+
BRB: "巴巴多斯",
|
88057
|
+
BGD: "孟加拉",
|
88058
|
+
BEL: "比利时",
|
88059
|
+
BFA: "布基纳法索",
|
88060
|
+
BGR: "保加利亚",
|
88061
|
+
BHR: "巴林",
|
88062
|
+
BDI: "布隆迪",
|
88063
|
+
BEN: "贝宁",
|
88064
|
+
BLM: "圣巴泰勒米岛",
|
88065
|
+
BMU: "百慕大",
|
88066
|
+
BRN: "文莱",
|
88067
|
+
BOL: "玻利维亚",
|
88068
|
+
BES: "荷兰加勒比区",
|
88069
|
+
BRA: "巴西",
|
88070
|
+
BHS: "巴哈马",
|
88071
|
+
BTN: "不丹",
|
88072
|
+
BVT: "布韦岛",
|
88073
|
+
BWA: "博茨瓦纳",
|
88074
|
+
BLR: "白俄罗斯",
|
88075
|
+
BLZ: "伯利兹",
|
88076
|
+
CAN: "加拿大",
|
88077
|
+
CCK: "科科斯群岛",
|
88078
|
+
CAF: "中非",
|
88079
|
+
CHE: "瑞士",
|
88080
|
+
CHL: "智利",
|
88081
|
+
CMR: "喀麦隆",
|
88082
|
+
COL: "哥伦比亚",
|
88083
|
+
CRI: "哥斯达黎加",
|
88084
|
+
CUB: "古巴",
|
88085
|
+
CPV: "佛得角",
|
88086
|
+
CXR: "圣诞岛",
|
88087
|
+
CYP: "塞浦路斯",
|
88088
|
+
CZE: "捷克",
|
88089
|
+
DEU: "德国",
|
88090
|
+
DJI: "吉布提",
|
88091
|
+
DNK: "丹麦",
|
88092
|
+
DMA: "多米尼克",
|
88093
|
+
DOM: "多米尼加",
|
88094
|
+
DZA: "阿尔及利亚",
|
88095
|
+
ECU: "厄瓜多尔",
|
88096
|
+
EST: "爱沙尼亚",
|
88097
|
+
EGY: "埃及",
|
88098
|
+
ESH: "西撒哈拉",
|
88099
|
+
ERI: "厄立特里亚",
|
88100
|
+
ESP: "西班牙",
|
88101
|
+
FIN: "芬兰",
|
88102
|
+
FJI: "斐济群岛",
|
88103
|
+
FLK: "马尔维纳斯群岛(福克兰)",
|
88104
|
+
FSM: "密克罗尼西亚联邦",
|
88105
|
+
FRO: "法罗群岛",
|
88106
|
+
FRA: "法国",
|
88107
|
+
GAB: "加蓬",
|
88108
|
+
GRD: "格林纳达",
|
88109
|
+
GEO: "格鲁吉亚",
|
88110
|
+
GUF: "法属圭亚那",
|
88111
|
+
GHA: "加纳",
|
88112
|
+
GIB: "直布罗陀",
|
88113
|
+
GRL: "格陵兰",
|
88114
|
+
GIN: "几内亚",
|
88115
|
+
GLP: "瓜德罗普",
|
88116
|
+
GNQ: "赤道几内亚",
|
88117
|
+
GRC: "希腊",
|
88118
|
+
SGS: "南乔治亚岛和南桑威奇群岛",
|
88119
|
+
GTM: "危地马拉",
|
88120
|
+
GUM: "关岛",
|
88121
|
+
GNB: "几内亚比绍",
|
88122
|
+
GUY: "圭亚那",
|
88123
|
+
HKG: "香港",
|
88124
|
+
HMD: "赫德岛和麦克唐纳群岛",
|
88125
|
+
HND: "洪都拉斯",
|
88126
|
+
HRV: "克罗地亚",
|
88127
|
+
HTI: "海地",
|
88128
|
+
HUN: "匈牙利",
|
88129
|
+
IDN: "印尼",
|
88130
|
+
IRL: "爱尔兰",
|
88131
|
+
ISR: "以色列",
|
88132
|
+
IMN: "马恩岛",
|
88133
|
+
IND: "印度",
|
88134
|
+
IOT: "英属印度洋领地",
|
88135
|
+
IRQ: "伊拉克",
|
88136
|
+
IRN: "伊朗",
|
88137
|
+
ISL: "冰岛",
|
88138
|
+
ITA: "意大利",
|
88139
|
+
JEY: "泽西岛",
|
88140
|
+
JAM: "牙买加",
|
88141
|
+
JOR: "约旦",
|
88142
|
+
JPN: "日本",
|
88143
|
+
KHM: "柬埔寨",
|
88144
|
+
KIR: "基里巴斯",
|
88145
|
+
COM: "科摩罗",
|
88146
|
+
KWT: "科威特",
|
88147
|
+
CYM: "开曼群岛",
|
88148
|
+
LBN: "黎巴嫩",
|
88149
|
+
LIE: "列支敦士登",
|
88150
|
+
LKA: "斯里兰卡",
|
88151
|
+
LBR: "利比里亚",
|
88152
|
+
LSO: "莱索托",
|
88153
|
+
LTU: "立陶宛",
|
88154
|
+
LUX: "卢森堡",
|
88155
|
+
LVA: "拉脱维亚",
|
88156
|
+
LBY: "利比亚",
|
88157
|
+
MAR: "摩洛哥",
|
88158
|
+
MCO: "摩纳哥",
|
88159
|
+
MDA: "摩尔多瓦",
|
88160
|
+
MNE: "黑山",
|
88161
|
+
MAF: "法属圣马丁",
|
88162
|
+
MDG: "马达加斯加",
|
88163
|
+
MHL: "马绍尔群岛",
|
88164
|
+
MKD: "马其顿",
|
88165
|
+
MLI: "马里",
|
88166
|
+
MMR: "缅甸",
|
88167
|
+
MAC: "澳门",
|
88168
|
+
MTQ: "马提尼克",
|
88169
|
+
MRT: "毛里塔尼亚",
|
88170
|
+
MSR: "蒙塞拉特岛",
|
88171
|
+
MLT: "马耳他",
|
88172
|
+
MDV: "马尔代夫",
|
88173
|
+
MWI: "马拉维",
|
88174
|
+
MEX: "墨西哥",
|
88175
|
+
MYS: "马来西亚",
|
88176
|
+
NAM: "纳米比亚",
|
88177
|
+
NER: "尼日尔",
|
88178
|
+
NFK: "诺福克岛",
|
88179
|
+
NGA: "尼日利亚",
|
88180
|
+
NIC: "尼加拉瓜",
|
88181
|
+
NLD: "荷兰",
|
88182
|
+
NOR: "挪威",
|
88183
|
+
NPL: "尼泊尔",
|
88184
|
+
NRU: "瑙鲁",
|
88185
|
+
OMN: "阿曼",
|
88186
|
+
PAN: "巴拿马",
|
88187
|
+
PER: "秘鲁",
|
88188
|
+
PYF: "法属波利尼西亚",
|
88189
|
+
PNG: "巴布亚新几内亚",
|
88190
|
+
PHL: "菲律宾",
|
88191
|
+
PAK: "巴基斯坦",
|
88192
|
+
POL: "波兰",
|
88193
|
+
PCN: "皮特凯恩群岛",
|
88194
|
+
PRI: "波多黎各",
|
88195
|
+
PSE: "巴勒斯坦",
|
88196
|
+
PLW: "帕劳",
|
88197
|
+
PRY: "巴拉圭",
|
88198
|
+
QAT: "卡塔尔",
|
88199
|
+
REU: "留尼汪",
|
88200
|
+
ROU: "罗马尼亚",
|
88201
|
+
SRB: "塞尔维亚",
|
88202
|
+
RUS: "俄罗斯",
|
88203
|
+
RWA: "卢旺达",
|
88204
|
+
SLB: "所罗门群岛",
|
88205
|
+
SYC: "塞舌尔",
|
88206
|
+
SDN: "苏丹",
|
88207
|
+
SWE: "瑞典",
|
88208
|
+
SGP: "新加坡",
|
88209
|
+
SVN: "斯洛文尼亚",
|
88210
|
+
SJM: "斯瓦尔巴群岛和 扬马延岛",
|
88211
|
+
SVK: "斯洛伐克",
|
88212
|
+
SLE: "塞拉利昂",
|
88213
|
+
SMR: "圣马力诺",
|
88214
|
+
SEN: "塞内加尔",
|
88215
|
+
SOM: "索马里",
|
88216
|
+
SUR: "苏里南",
|
88217
|
+
SSD: "南苏丹",
|
88218
|
+
STP: "圣多美和普林西比",
|
88219
|
+
SLV: "萨尔瓦多",
|
88220
|
+
SYR: "叙利亚",
|
88221
|
+
SWZ: "斯威士兰",
|
88222
|
+
TCA: "特克斯和凯科斯群岛",
|
88223
|
+
TCD: "乍得",
|
88224
|
+
TGO: "多哥",
|
88225
|
+
THA: "泰国",
|
88226
|
+
TKL: "托克劳",
|
88227
|
+
TLS: "东帝汶",
|
88228
|
+
TUN: "突尼斯",
|
88229
|
+
TON: "汤加",
|
88230
|
+
TUR: "土耳其",
|
88231
|
+
TUV: "图瓦卢",
|
88232
|
+
TZA: "坦桑尼亚",
|
88233
|
+
UKR: "乌克兰",
|
88234
|
+
UGA: "乌干达",
|
88235
|
+
USA: "美国",
|
88236
|
+
URY: "乌拉圭",
|
88237
|
+
VAT: "梵蒂冈",
|
88238
|
+
VEN: "委内瑞拉",
|
88239
|
+
VGB: "英属维尔京群岛",
|
88240
|
+
VIR: "美属维尔京群岛",
|
88241
|
+
VNM: "越南",
|
88242
|
+
WLF: "瓦利斯和富图纳",
|
88243
|
+
WSM: "萨摩亚",
|
88244
|
+
YEM: "也门",
|
88245
|
+
MYT: "马约特",
|
88246
|
+
ZAF: "南非",
|
88247
|
+
ZMB: "赞比亚",
|
88248
|
+
ZWE: "津巴布韦",
|
88249
|
+
CHN: "中国",
|
88250
|
+
COG: "刚果(布)",
|
88251
|
+
COD: "刚果(金)",
|
88252
|
+
MOZ: "莫桑比克",
|
88253
|
+
GGY: "根西岛",
|
88254
|
+
GMB: "冈比亚",
|
88255
|
+
MNP: "北马里亚纳群岛",
|
88256
|
+
ETH: "埃塞俄比亚",
|
88257
|
+
NCL: "新喀里多尼亚",
|
88258
|
+
VUT: "瓦努阿图",
|
88259
|
+
ATF: "法属南部领地",
|
88260
|
+
NIU: "纽埃",
|
88261
|
+
UMI: "美国本土外小岛屿",
|
88262
|
+
COK: "库克群岛",
|
88263
|
+
GBR: "英国",
|
88264
|
+
TTO: "特立尼达和多巴哥",
|
88265
|
+
VCT: "圣文森特和格林纳丁斯",
|
88266
|
+
TWN: "台湾",
|
88267
|
+
NZL: "新西兰",
|
88268
|
+
SAU: "沙特阿拉伯",
|
88269
|
+
LAO: "老挝",
|
88270
|
+
PRK: "朝鲜",
|
88271
|
+
KOR: "韩国",
|
88272
|
+
PRT: "葡萄牙",
|
88273
|
+
KGZ: "吉尔吉斯斯坦",
|
88274
|
+
KAZ: "哈萨克斯坦",
|
88275
|
+
TJK: "塔吉克斯坦",
|
88276
|
+
TKM: "土库曼斯坦",
|
88277
|
+
UZB: "乌兹别克斯坦",
|
88278
|
+
KNA: "圣基茨和尼维斯",
|
88279
|
+
SPM: "圣皮埃尔和密克隆",
|
88280
|
+
SHN: "圣赫勒拿",
|
88281
|
+
LCA: "圣卢西亚",
|
88282
|
+
MUS: "毛里求斯",
|
88283
|
+
CIV: "科特迪瓦",
|
88284
|
+
KEN: "肯尼亚",
|
88285
|
+
MNG: "蒙古国"
|
88286
|
+
};
|
88287
|
+
function convertNationality(nationality) {
|
88288
|
+
return NationalityEnum[nationality];
|
88289
|
+
}
|
87613
88290
|
class HuaShiService {
|
87614
88291
|
static startConnect() {
|
87615
88292
|
if (this.ws && this.ws.readyState === WebSocket.CONNECTING) {
|
@@ -87685,23 +88362,55 @@ class HuaShiService {
|
|
87685
88362
|
const readData = await HuaShiService.read();
|
87686
88363
|
if (readData) {
|
87687
88364
|
// 身份证|姓名|性别|民族|生日|地址|证件号|派出所|有效期起|有效期止||证件照 中间好多占位
|
87688
|
-
|
87689
|
-
|
87690
|
-
|
87691
|
-
|
87692
|
-
|
87693
|
-
|
87694
|
-
|
87695
|
-
|
87696
|
-
|
87697
|
-
|
87698
|
-
|
87699
|
-
|
87700
|
-
|
87701
|
-
|
87702
|
-
|
87703
|
-
|
87704
|
-
|
88365
|
+
// 永居证|姓名|性别|永居证证件号|国籍代码|中文姓名|有效期起|有效期止|生日|证件版本号|受理机关代码|证件类别|照片内容 中间好多占位
|
88366
|
+
// 永居证|姓名|性别|永居证证件号|国籍代码|中文姓名|有效期起|有效期止|生日|换证次数|旧证件号|证件类别|照片内容 中间好多占位
|
88367
|
+
// 港澳台|姓名|性别|生日|住址|证件号|派出所|有效期起|有效期止|通行证号码|签发次数|证件类别|照片内容 中间好多占位
|
88368
|
+
let [model, placeholder, type, name, sex, nation, birthday, address, cardId, police, validStart, validEnd] = readData.split('|');
|
88369
|
+
let base64_ID = readData.split('|')[19];
|
88370
|
+
let NationCode = readData.split('|')[18];
|
88371
|
+
if (NationCode === '1') {
|
88372
|
+
// 身份证
|
88373
|
+
const IDCardData = {
|
88374
|
+
info: {
|
88375
|
+
cardType: '1',
|
88376
|
+
name,
|
88377
|
+
chineseName: '',
|
88378
|
+
englishName: '',
|
88379
|
+
sex,
|
88380
|
+
birthday,
|
88381
|
+
address,
|
88382
|
+
cardId,
|
88383
|
+
nationality: '中国',
|
88384
|
+
nation,
|
88385
|
+
police,
|
88386
|
+
validStart,
|
88387
|
+
validEnd
|
88388
|
+
},
|
88389
|
+
headImage: base64_ID
|
88390
|
+
};
|
88391
|
+
return IDCardData;
|
88392
|
+
} else {
|
88393
|
+
let chineseName = readData.split('|')[16] || '无中文姓名';
|
88394
|
+
const IDCardData = {
|
88395
|
+
info: {
|
88396
|
+
cardType: '9',
|
88397
|
+
name: chineseName === '无中文姓名' ? name : chineseName || name,
|
88398
|
+
chineseName,
|
88399
|
+
englishName: name,
|
88400
|
+
sex,
|
88401
|
+
birthday,
|
88402
|
+
address,
|
88403
|
+
cardId,
|
88404
|
+
nationality: convertNationality(NationCode),
|
88405
|
+
nation: '',
|
88406
|
+
police: '中华人民共和国国家移民管理局',
|
88407
|
+
validStart,
|
88408
|
+
validEnd
|
88409
|
+
},
|
88410
|
+
headImage: base64_ID
|
88411
|
+
};
|
88412
|
+
return IDCardData;
|
88413
|
+
}
|
87705
88414
|
} else {
|
87706
88415
|
throw Error('未匹配可用的读卡器');
|
87707
88416
|
}
|
@@ -87710,8 +88419,8 @@ class HuaShiService {
|
|
87710
88419
|
_defineProperty(HuaShiService, "idCardWebSocketUrl", 'ws://127.0.0.1:7415');
|
87711
88420
|
_defineProperty(HuaShiService, "ws", void 0);
|
87712
88421
|
_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
|
88422
|
+
;// 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=f376ef7c&
|
88423
|
+
var default_take_photo_dialogvue_type_template_id_f376ef7c_render = function render() {
|
87715
88424
|
var _vm = this,
|
87716
88425
|
_c = _vm._self._c;
|
87717
88426
|
return _c('el-dialog', {
|
@@ -87734,6 +88443,7 @@ var default_take_photo_dialogvue_type_template_id_7de4bdd6_render = function ren
|
|
87734
88443
|
ref: "monitor",
|
87735
88444
|
staticClass: "videoContainer",
|
87736
88445
|
attrs: {
|
88446
|
+
"id": "monitor",
|
87737
88447
|
"autoplay": "",
|
87738
88448
|
"width": "250",
|
87739
88449
|
"height": "300"
|
@@ -87745,233 +88455,36 @@ var default_take_photo_dialogvue_type_template_id_7de4bdd6_render = function ren
|
|
87745
88455
|
"display": "none"
|
87746
88456
|
},
|
87747
88457
|
attrs: {
|
88458
|
+
"id": "photo",
|
87748
88459
|
"width": "1920",
|
87749
88460
|
"height": "1080"
|
87750
88461
|
}
|
87751
|
-
}), _c('
|
88462
|
+
}), _c('div', {
|
88463
|
+
staticClass: "image-content"
|
88464
|
+
}, [_c('img', {
|
87752
88465
|
staticClass: "videoContainer photo",
|
87753
88466
|
attrs: {
|
87754
88467
|
"src": _vm.viewerPhotoSrc
|
87755
88468
|
}
|
87756
|
-
})]), _c('span', {
|
88469
|
+
})])]), _c('span', {
|
87757
88470
|
staticClass: "dialog-footer",
|
87758
88471
|
attrs: {
|
87759
88472
|
"slot": "footer"
|
87760
88473
|
},
|
87761
88474
|
slot: "footer"
|
87762
88475
|
}, [_vm._l(_vm.buttonList, function (button) {
|
87763
|
-
return [_c('el-button', _vm._b({
|
88476
|
+
return [_vm._isShowButton(button.name) ? _c('el-button', _vm._b({
|
87764
88477
|
key: button.name,
|
87765
88478
|
on: {
|
87766
88479
|
"click": function ($event) {
|
87767
88480
|
return _vm.buttonClickEvent(button.name);
|
87768
88481
|
}
|
87769
88482
|
}
|
87770
|
-
}, 'el-button', button, false), [_vm._v(_vm._s(button.label) + " ")])];
|
88483
|
+
}, 'el-button', button, false), [_vm._v(_vm._s(button.label) + " ")]) : _vm._e()];
|
87771
88484
|
})], 2)]);
|
87772
88485
|
};
|
87773
|
-
var
|
87774
|
-
|
87775
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=script&lang=js&
|
87776
|
-
/* harmony default export */ var default_take_photo_dialogvue_type_script_lang_js_ = ({
|
87777
|
-
name: "default-take-photo-dialog",
|
87778
|
-
data: () => {
|
87779
|
-
return {
|
87780
|
-
visibility: true,
|
87781
|
-
viewerPhotoSrc: '',
|
87782
|
-
scannerPhotoSrc: '',
|
87783
|
-
cameraStream: '',
|
87784
|
-
buttonList: [{
|
87785
|
-
name: 'cancel',
|
87786
|
-
label: '取消',
|
87787
|
-
size: 'small'
|
87788
|
-
}, {
|
87789
|
-
name: 'take-photo',
|
87790
|
-
label: '拍照',
|
87791
|
-
type: 'primary',
|
87792
|
-
size: 'small'
|
87793
|
-
}, {
|
87794
|
-
name: 'sure',
|
87795
|
-
label: '确定',
|
87796
|
-
type: 'primary',
|
87797
|
-
size: 'small'
|
87798
|
-
}]
|
87799
|
-
};
|
87800
|
-
},
|
87801
|
-
mounted() {
|
87802
|
-
this.$nextTick(() => {
|
87803
|
-
this.initDefaultCamera();
|
87804
|
-
});
|
87805
|
-
},
|
87806
|
-
beforeDestroy() {
|
87807
|
-
this.cameraStream.getVideoTracks().forEach(track => {
|
87808
|
-
track.stop();
|
87809
|
-
});
|
87810
|
-
},
|
87811
|
-
methods: {
|
87812
|
-
async initDefaultCamera() {
|
87813
|
-
let video = this.$refs.monitor;
|
87814
|
-
let canvas = this.$refs.photo;
|
87815
|
-
console.log(video, canvas);
|
87816
|
-
let videoObj = {
|
87817
|
-
audio: false,
|
87818
|
-
video: {
|
87819
|
-
width: 1920,
|
87820
|
-
height: 1080
|
87821
|
-
}
|
87822
|
-
};
|
87823
|
-
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
|
87824
|
-
try {
|
87825
|
-
let stream = await navigator.mediaDevices.getUserMedia(videoObj);
|
87826
|
-
video.srcObject = stream;
|
87827
|
-
video.play();
|
87828
|
-
this.cameraStream = stream;
|
87829
|
-
} catch (e) {
|
87830
|
-
this.$message.error('没有可用的摄像头!');
|
87831
|
-
console.log(e);
|
87832
|
-
}
|
87833
|
-
} else {
|
87834
|
-
this.$message.error('调用摄像头失败,请在首页右上角我的设备中设置读拍照/人脸识别选项,并确保已为浏览器设置相关权限!');
|
87835
|
-
}
|
87836
|
-
},
|
87837
|
-
takePicture() {
|
87838
|
-
let video = this.$refs.monitor;
|
87839
|
-
let canvas = this.$refs.photo;
|
87840
|
-
let context = canvas.getContext('2d');
|
87841
|
-
context.drawImage(video, 0, 0, 1920, 1080);
|
87842
|
-
let img = canvas.toDataURL('image/png');
|
87843
|
-
canvas.src = img;
|
87844
|
-
this.viewerPhotoSrc = img;
|
87845
|
-
this.scannerPhotoSrc = img.replace('data:image/png;base64,', '');
|
87846
|
-
},
|
87847
|
-
async buttonClickEvent(name) {
|
87848
|
-
switch (name) {
|
87849
|
-
case 'cancel':
|
87850
|
-
this.visibility = false;
|
87851
|
-
this.$emit('close');
|
87852
|
-
break;
|
87853
|
-
case 'take-photo':
|
87854
|
-
this.takePicture();
|
87855
|
-
break;
|
87856
|
-
case 'sure':
|
87857
|
-
let data = {
|
87858
|
-
faceimg: this.scannerPhotoSrc
|
87859
|
-
};
|
87860
|
-
this.$emit('close', data);
|
87861
|
-
this.visibility = false;
|
87862
|
-
break;
|
87863
|
-
}
|
87864
|
-
}
|
87865
|
-
}
|
87866
|
-
});
|
87867
|
-
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=script&lang=js&
|
87868
|
-
/* harmony default export */ var dialog_default_take_photo_dialogvue_type_script_lang_js_ = (default_take_photo_dialogvue_type_script_lang_js_);
|
87869
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=style&index=0&id=7de4bdd6&prod&lang=scss&
|
87870
|
-
// extracted by mini-css-extract-plugin
|
87871
|
-
|
87872
|
-
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=style&index=0&id=7de4bdd6&prod&lang=scss&
|
87873
|
-
|
87874
|
-
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue
|
87875
|
-
|
87876
|
-
|
87877
|
-
|
87878
|
-
;
|
87879
|
-
|
87880
|
-
|
87881
|
-
/* normalize component */
|
87882
|
-
|
87883
|
-
var default_take_photo_dialog_component = normalizeComponent(
|
87884
|
-
dialog_default_take_photo_dialogvue_type_script_lang_js_,
|
87885
|
-
default_take_photo_dialogvue_type_template_id_7de4bdd6_render,
|
87886
|
-
default_take_photo_dialogvue_type_template_id_7de4bdd6_staticRenderFns,
|
87887
|
-
false,
|
87888
|
-
null,
|
87889
|
-
null,
|
87890
|
-
null
|
87891
|
-
|
87892
|
-
)
|
87893
|
-
|
87894
|
-
/* harmony default export */ var default_take_photo_dialog = (default_take_photo_dialog_component.exports);
|
87895
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue?vue&type=template&id=5bbb0afc&scoped=true&
|
87896
|
-
var wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_render = function render() {
|
87897
|
-
var _vm = this,
|
87898
|
-
_c = _vm._self._c;
|
87899
|
-
return _vm.visibility ? _c('el-dialog', {
|
87900
|
-
staticClass: "wei-rong-face-auth-dialog",
|
87901
|
-
attrs: {
|
87902
|
-
"title": "人脸识别",
|
87903
|
-
"top": '5vh',
|
87904
|
-
"width": "640px",
|
87905
|
-
"visible": _vm.visibility,
|
87906
|
-
"close-on-click-modal": false
|
87907
|
-
},
|
87908
|
-
on: {
|
87909
|
-
"update:visible": function ($event) {
|
87910
|
-
_vm.visibility = $event;
|
87911
|
-
}
|
87912
|
-
}
|
87913
|
-
}, [_c('div', {
|
87914
|
-
staticClass: "image-container"
|
87915
|
-
}, [_c('img', {
|
87916
|
-
staticStyle: {
|
87917
|
-
"width": "600px",
|
87918
|
-
"height": "450px"
|
87919
|
-
},
|
87920
|
-
attrs: {
|
87921
|
-
"id": "photo",
|
87922
|
-
"src": _vm.viewFaceImage
|
87923
|
-
}
|
87924
|
-
})])]) : _vm._e();
|
87925
|
-
};
|
87926
|
-
var wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_staticRenderFns = [];
|
88486
|
+
var default_take_photo_dialogvue_type_template_id_f376ef7c_staticRenderFns = [];
|
87927
88487
|
|
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
88488
|
;// CONCATENATED MODULE: ./packages/service/external-plugins/exit-and-entry-plugin.service.ts
|
87976
88489
|
|
87977
88490
|
/**
|
@@ -87988,8 +88501,10 @@ var ExitAndEntryMethodCode;
|
|
87988
88501
|
ExitAndEntryMethodCode["ManualRead"] = "ManualRead";
|
87989
88502
|
/** 获取识别结果 */
|
87990
88503
|
ExitAndEntryMethodCode["GetReadResult"] = "GetReadResult";
|
88504
|
+
/** 人脸识别 */
|
88505
|
+
ExitAndEntryMethodCode["FaceAuth"] = "IDAuth";
|
87991
88506
|
})(ExitAndEntryMethodCode || (ExitAndEntryMethodCode = {}));
|
87992
|
-
const
|
88507
|
+
const exit_and_entry_plugin_service_NationalityEnum = {
|
87993
88508
|
AND: "安道尔",
|
87994
88509
|
AFG: "阿富汗",
|
87995
88510
|
ATG: "安提瓜和巴布达",
|
@@ -88073,7 +88588,7 @@ const NationalityEnum = {
|
|
88073
88588
|
GUM: "关岛",
|
88074
88589
|
GNB: "几内亚比绍",
|
88075
88590
|
GUY: "圭亚那",
|
88076
|
-
HKG: "
|
88591
|
+
HKG: "香港",
|
88077
88592
|
HMD: "赫德岛和麦克唐纳群岛",
|
88078
88593
|
HND: "洪都拉斯",
|
88079
88594
|
HRV: "克罗地亚",
|
@@ -88117,7 +88632,7 @@ const NationalityEnum = {
|
|
88117
88632
|
MKD: "马其顿",
|
88118
88633
|
MLI: "马里",
|
88119
88634
|
MMR: "缅甸",
|
88120
|
-
MAC: "
|
88635
|
+
MAC: "澳门",
|
88121
88636
|
MTQ: "马提尼克",
|
88122
88637
|
MRT: "毛里塔尼亚",
|
88123
88638
|
MSR: "蒙塞拉特岛",
|
@@ -88216,7 +88731,7 @@ const NationalityEnum = {
|
|
88216
88731
|
GBR: "英国",
|
88217
88732
|
TTO: "特立尼达和多巴哥",
|
88218
88733
|
VCT: "圣文森特和格林纳丁斯",
|
88219
|
-
TWN: "
|
88734
|
+
TWN: "台湾",
|
88220
88735
|
NZL: "新西兰",
|
88221
88736
|
SAU: "沙特阿拉伯",
|
88222
88737
|
LAO: "老挝",
|
@@ -88242,8 +88757,11 @@ var SexEnum;
|
|
88242
88757
|
SexEnum["MALE"] = "\u7537";
|
88243
88758
|
SexEnum["FEMALE"] = "\u5973";
|
88244
88759
|
})(SexEnum || (SexEnum = {}));
|
88245
|
-
|
88246
|
-
|
88760
|
+
const headers = {
|
88761
|
+
'Content-Type': 'application/json; charset=utf-8'
|
88762
|
+
};
|
88763
|
+
function exit_and_entry_plugin_service_convertNationality(nationality) {
|
88764
|
+
return exit_and_entry_plugin_service_NationalityEnum[nationality];
|
88247
88765
|
}
|
88248
88766
|
function urlToBase64(url) {
|
88249
88767
|
return new Promise((resolve, reject) => {
|
@@ -88306,7 +88824,7 @@ async function formatNFCResult(data) {
|
|
88306
88824
|
sex: SexEnum[sex] || '未知',
|
88307
88825
|
cardId: doc_number,
|
88308
88826
|
birthday: birth_DateFormat.replace('-', '').replace('-', ''),
|
88309
|
-
nationality:
|
88827
|
+
nationality: exit_and_entry_plugin_service_convertNationality(state),
|
88310
88828
|
validEnd: expired_DateFormat.replace('-', '').replace('-', ''),
|
88311
88829
|
headImage: img.replace('data:image/png;base64,', '')
|
88312
88830
|
};
|
@@ -88390,7 +88908,7 @@ async function formatPermanentResidencePermit(data) {
|
|
88390
88908
|
sex: xbdm.replace('性', ''),
|
88391
88909
|
cardId: zjhm || yjjlzhm,
|
88392
88910
|
birthday: csrq,
|
88393
|
-
nationality:
|
88911
|
+
nationality: exit_and_entry_plugin_service_convertNationality(gjdm),
|
88394
88912
|
validStart: yxqqsrq || zjqfrq,
|
88395
88913
|
validEnd: yxqjzrq || zjzzrq,
|
88396
88914
|
police: '中华人民共和国国家移民管理局',
|
@@ -88398,20 +88916,37 @@ async function formatPermanentResidencePermit(data) {
|
|
88398
88916
|
};
|
88399
88917
|
}
|
88400
88918
|
class ExitAndEntryPluginService {
|
88401
|
-
static async read(method) {
|
88402
|
-
let url = ''
|
88919
|
+
static async read(method, data = {}) {
|
88920
|
+
let url = '',
|
88921
|
+
requestType = '',
|
88922
|
+
param;
|
88403
88923
|
switch (method) {
|
88404
88924
|
case ExitAndEntryMethodCode.GetStatus:
|
88405
88925
|
url = `${ExitAndEntryPluginService.baseServiceUrl}/PassportReader/${method}`;
|
88926
|
+
requestType = 'get';
|
88406
88927
|
break;
|
88407
88928
|
case ExitAndEntryMethodCode.ManualRead:
|
88408
88929
|
url = `${ExitAndEntryPluginService.baseServiceUrl}/PassportReader/${method}`;
|
88930
|
+
requestType = 'get';
|
88409
88931
|
break;
|
88410
88932
|
case ExitAndEntryMethodCode.GetReadResult:
|
88411
88933
|
url = `${ExitAndEntryPluginService.baseServiceUrl}/PassportReader/${method}`;
|
88934
|
+
requestType = 'get';
|
88935
|
+
break;
|
88936
|
+
case ExitAndEntryMethodCode.FaceAuth:
|
88937
|
+
url = `${ExitAndEntryPluginService.baseServiceUrl}/PassportReader/${method}`;
|
88938
|
+
requestType = 'post';
|
88939
|
+
param = {
|
88940
|
+
...data
|
88941
|
+
};
|
88412
88942
|
break;
|
88413
88943
|
}
|
88414
|
-
let res
|
88944
|
+
let res;
|
88945
|
+
if (requestType === 'get') {
|
88946
|
+
res = await custom_axios_CustomAxios[requestType](url, headers);
|
88947
|
+
} else {
|
88948
|
+
res = await custom_axios_CustomAxios[requestType](url, param, headers);
|
88949
|
+
}
|
88415
88950
|
return res;
|
88416
88951
|
}
|
88417
88952
|
static async getStatus() {
|
@@ -88503,8 +89038,306 @@ class ExitAndEntryPluginService {
|
|
88503
89038
|
};
|
88504
89039
|
return IDCardData;
|
88505
89040
|
}
|
89041
|
+
static async faceAuth(image) {
|
89042
|
+
// PassportReader/IDAuth
|
89043
|
+
console.log('faceAuth=>', image);
|
89044
|
+
let res = await ExitAndEntryPluginService.read(ExitAndEntryMethodCode.FaceAuth, {
|
89045
|
+
imgBase64: image
|
89046
|
+
});
|
89047
|
+
while (res.ret === 40001) {
|
89048
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
89049
|
+
res = await ExitAndEntryPluginService.read(ExitAndEntryMethodCode.FaceAuth, {
|
89050
|
+
imgBase64: image
|
89051
|
+
});
|
89052
|
+
}
|
89053
|
+
console.log('人脸识别结束=>', res);
|
89054
|
+
return res.data.result;
|
89055
|
+
}
|
88506
89056
|
}
|
88507
89057
|
_defineProperty(ExitAndEntryPluginService, "baseServiceUrl", 'http://127.0.0.1:7770');
|
89058
|
+
;// 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&
|
89059
|
+
|
89060
|
+
/* harmony default export */ var default_take_photo_dialogvue_type_script_lang_js_ = ({
|
89061
|
+
name: "default-take-photo-dialog",
|
89062
|
+
props: {
|
89063
|
+
readMachineType: {
|
89064
|
+
type: Number,
|
89065
|
+
default: 0
|
89066
|
+
}
|
89067
|
+
},
|
89068
|
+
data: () => {
|
89069
|
+
return {
|
89070
|
+
visibility: true,
|
89071
|
+
viewerPhotoSrc: '',
|
89072
|
+
scannerPhotoSrc: '',
|
89073
|
+
cameraStream: '',
|
89074
|
+
buttonList: [{
|
89075
|
+
name: 'cancel',
|
89076
|
+
label: '取消',
|
89077
|
+
size: 'small'
|
89078
|
+
}, {
|
89079
|
+
name: 'take-photo',
|
89080
|
+
label: '拍照',
|
89081
|
+
type: 'primary',
|
89082
|
+
size: 'small'
|
89083
|
+
}, {
|
89084
|
+
name: 'face-auth',
|
89085
|
+
label: '人脸识别',
|
89086
|
+
type: 'primary',
|
89087
|
+
size: 'small'
|
89088
|
+
}, {
|
89089
|
+
name: 'sure',
|
89090
|
+
label: '确定',
|
89091
|
+
type: 'primary',
|
89092
|
+
size: 'small'
|
89093
|
+
}]
|
89094
|
+
};
|
89095
|
+
},
|
89096
|
+
mounted() {
|
89097
|
+
this.$nextTick(() => {
|
89098
|
+
this.initDefaultCamera();
|
89099
|
+
});
|
89100
|
+
},
|
89101
|
+
beforeDestroy() {
|
89102
|
+
this.cameraStream.getVideoTracks().forEach(track => {
|
89103
|
+
track.stop();
|
89104
|
+
});
|
89105
|
+
},
|
89106
|
+
methods: {
|
89107
|
+
async initDefaultCamera() {
|
89108
|
+
let video = document.getElementById('monitor'); // this.$refs.monitor;
|
89109
|
+
let canvas = this.$refs.photo;
|
89110
|
+
console.log(video, canvas);
|
89111
|
+
let videoObj = {
|
89112
|
+
audio: false,
|
89113
|
+
video: {
|
89114
|
+
width: 1920,
|
89115
|
+
height: 1080
|
89116
|
+
}
|
89117
|
+
};
|
89118
|
+
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
|
89119
|
+
try {
|
89120
|
+
let stream = await navigator.mediaDevices.getUserMedia(videoObj);
|
89121
|
+
video.srcObject = stream;
|
89122
|
+
video.play();
|
89123
|
+
console.log(stream);
|
89124
|
+
this.cameraStream = stream;
|
89125
|
+
} catch (e) {
|
89126
|
+
this.$message.error('没有可用的摄像头!');
|
89127
|
+
console.log(e);
|
89128
|
+
}
|
89129
|
+
} else {
|
89130
|
+
this.$message.error('调用摄像头失败,请在首页右上角我的设备中设置读拍照/人脸识别选项,并确保已为浏览器设置相关权限!');
|
89131
|
+
}
|
89132
|
+
},
|
89133
|
+
takePicture() {
|
89134
|
+
let video = this.$refs.monitor;
|
89135
|
+
let canvas = this.$refs.photo;
|
89136
|
+
let context = canvas.getContext('2d');
|
89137
|
+
context.drawImage(video, 0, 0, 1920, 1080);
|
89138
|
+
let img = canvas.toDataURL('image/png');
|
89139
|
+
canvas.src = img;
|
89140
|
+
this.viewerPhotoSrc = img;
|
89141
|
+
this.scannerPhotoSrc = img.replace('data:image/png;base64,', '');
|
89142
|
+
},
|
89143
|
+
_isShowButton(name) {
|
89144
|
+
switch (name) {
|
89145
|
+
case 'sure':
|
89146
|
+
return this.readMachineType !== 11;
|
89147
|
+
case 'face-auth':
|
89148
|
+
return this.readMachineType === 11;
|
89149
|
+
default:
|
89150
|
+
return true;
|
89151
|
+
}
|
89152
|
+
},
|
89153
|
+
async buttonClickEvent(name) {
|
89154
|
+
switch (name) {
|
89155
|
+
case 'cancel':
|
89156
|
+
this.visibility = false;
|
89157
|
+
this.$emit('close');
|
89158
|
+
break;
|
89159
|
+
case 'take-photo':
|
89160
|
+
this.takePicture();
|
89161
|
+
break;
|
89162
|
+
case 'sure':
|
89163
|
+
let data = {
|
89164
|
+
faceimg: this.scannerPhotoSrc
|
89165
|
+
};
|
89166
|
+
this.$emit('close', data);
|
89167
|
+
this.visibility = false;
|
89168
|
+
break;
|
89169
|
+
case 'face-auth':
|
89170
|
+
this.faceReaderEvent();
|
89171
|
+
break;
|
89172
|
+
}
|
89173
|
+
},
|
89174
|
+
async faceReaderEvent() {
|
89175
|
+
let idcardInfo;
|
89176
|
+
switch (this.readMachineType) {
|
89177
|
+
case 11:
|
89178
|
+
// 出入境
|
89179
|
+
idcardInfo = await ExitAndEntryPluginService.getReadResult();
|
89180
|
+
if (idcardInfo.info.cardType === '3' // 护照
|
89181
|
+
|| idcardInfo.info.cardType === '12' // 港澳台通行证
|
89182
|
+
|| idcardInfo.info.cardType === '2' // 港澳台身份证
|
89183
|
+
) {
|
89184
|
+
let res = await ExitAndEntryPluginService.faceAuth(this.scannerPhotoSrc);
|
89185
|
+
let data = {
|
89186
|
+
idCard: {
|
89187
|
+
...idcardInfo
|
89188
|
+
},
|
89189
|
+
faceimg: this.scannerPhotoSrc,
|
89190
|
+
score: res ? 100 : 0
|
89191
|
+
};
|
89192
|
+
this.$emit('faceReader', data);
|
89193
|
+
} else {
|
89194
|
+
this.$message.error('当前证件不支持人脸识别');
|
89195
|
+
}
|
89196
|
+
}
|
89197
|
+
},
|
89198
|
+
compressImage(path, config) {
|
89199
|
+
return new Promise((resolve, reject) => {
|
89200
|
+
let img = new Image();
|
89201
|
+
img.src = path;
|
89202
|
+
img.onload = function () {
|
89203
|
+
let that = this;
|
89204
|
+
let w = that.width * config.quality;
|
89205
|
+
let h = that.height * config.quality;
|
89206
|
+
// let scale = w / h
|
89207
|
+
// w = config.width || config.height * scale
|
89208
|
+
// h = config.height || config.width / scale
|
89209
|
+
let quality = config.quality; // 默认图片质量为0.7
|
89210
|
+
// 生成canvas
|
89211
|
+
let canvas = document.createElement('canvas');
|
89212
|
+
let ctx = canvas.getContext('2d');
|
89213
|
+
// 创建属性节点
|
89214
|
+
let anw = document.createAttribute('width');
|
89215
|
+
anw.nodeValue = String(w);
|
89216
|
+
let anh = document.createAttribute('height');
|
89217
|
+
anh.nodeValue = String(h);
|
89218
|
+
canvas.setAttributeNode(anw);
|
89219
|
+
canvas.setAttributeNode(anh);
|
89220
|
+
ctx.drawImage(that, 0, 0, w, h);
|
89221
|
+
if (config.quality && config.quality <= 1 && config.quality > 0) {
|
89222
|
+
quality = config.quality;
|
89223
|
+
}
|
89224
|
+
let base64 = canvas.toDataURL(config.type, quality);
|
89225
|
+
// let blob = convertBase64UrlToBlob(base64)
|
89226
|
+
// 回调函数返回base64的值,也可根据自己的需求返回blob的值
|
89227
|
+
resolve(base64);
|
89228
|
+
};
|
89229
|
+
});
|
89230
|
+
}
|
89231
|
+
}
|
89232
|
+
});
|
89233
|
+
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=script&lang=js&
|
89234
|
+
/* harmony default export */ var dialog_default_take_photo_dialogvue_type_script_lang_js_ = (default_take_photo_dialogvue_type_script_lang_js_);
|
89235
|
+
;// 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=f376ef7c&prod&lang=scss&
|
89236
|
+
// extracted by mini-css-extract-plugin
|
89237
|
+
|
89238
|
+
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=style&index=0&id=f376ef7c&prod&lang=scss&
|
89239
|
+
|
89240
|
+
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue
|
89241
|
+
|
89242
|
+
|
89243
|
+
|
89244
|
+
;
|
89245
|
+
|
89246
|
+
|
89247
|
+
/* normalize component */
|
89248
|
+
|
89249
|
+
var default_take_photo_dialog_component = normalizeComponent(
|
89250
|
+
dialog_default_take_photo_dialogvue_type_script_lang_js_,
|
89251
|
+
default_take_photo_dialogvue_type_template_id_f376ef7c_render,
|
89252
|
+
default_take_photo_dialogvue_type_template_id_f376ef7c_staticRenderFns,
|
89253
|
+
false,
|
89254
|
+
null,
|
89255
|
+
null,
|
89256
|
+
null
|
89257
|
+
|
89258
|
+
)
|
89259
|
+
|
89260
|
+
/* harmony default export */ var default_take_photo_dialog = (default_take_photo_dialog_component.exports);
|
89261
|
+
;// 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&
|
89262
|
+
var wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_render = function render() {
|
89263
|
+
var _vm = this,
|
89264
|
+
_c = _vm._self._c;
|
89265
|
+
return _vm.visibility ? _c('el-dialog', {
|
89266
|
+
staticClass: "wei-rong-face-auth-dialog",
|
89267
|
+
attrs: {
|
89268
|
+
"title": "人脸识别",
|
89269
|
+
"top": '5vh',
|
89270
|
+
"width": "640px",
|
89271
|
+
"visible": _vm.visibility,
|
89272
|
+
"close-on-click-modal": false
|
89273
|
+
},
|
89274
|
+
on: {
|
89275
|
+
"update:visible": function ($event) {
|
89276
|
+
_vm.visibility = $event;
|
89277
|
+
}
|
89278
|
+
}
|
89279
|
+
}, [_c('div', {
|
89280
|
+
staticClass: "image-container"
|
89281
|
+
}, [_c('img', {
|
89282
|
+
staticStyle: {
|
89283
|
+
"width": "600px",
|
89284
|
+
"height": "450px"
|
89285
|
+
},
|
89286
|
+
attrs: {
|
89287
|
+
"id": "photo",
|
89288
|
+
"src": _vm.viewFaceImage
|
89289
|
+
}
|
89290
|
+
})])]) : _vm._e();
|
89291
|
+
};
|
89292
|
+
var wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_staticRenderFns = [];
|
89293
|
+
|
89294
|
+
;// 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&
|
89295
|
+
|
89296
|
+
|
89297
|
+
const wei_rong_face_auth_dialogvue_type_script_lang_js_BEGIN_DATA = 'data:image/jpg;base64,';
|
89298
|
+
/* harmony default export */ var wei_rong_face_auth_dialogvue_type_script_lang_js_ = ({
|
89299
|
+
name: "wei-rong-face-auth-dialog",
|
89300
|
+
data: () => {
|
89301
|
+
return {
|
89302
|
+
visibility: true,
|
89303
|
+
viewFaceImage: ''
|
89304
|
+
};
|
89305
|
+
},
|
89306
|
+
async created() {
|
89307
|
+
window.addEventListener(SCANNER_CAMERA_REFRESH_PHOTO_EVENT, message => {
|
89308
|
+
if (message.type === SCANNER_CAMERA_REFRESH_PHOTO_EVENT) {
|
89309
|
+
this.viewFaceImage = `${wei_rong_face_auth_dialogvue_type_script_lang_js_BEGIN_DATA}${message.scannerResultUrl}`;
|
89310
|
+
}
|
89311
|
+
});
|
89312
|
+
let res = await WeiRongPluginService.faceValidateWithIdCardRead();
|
89313
|
+
this.$message.success('认证成功');
|
89314
|
+
setTimeout(() => {
|
89315
|
+
this.$emit('close', res);
|
89316
|
+
}, 1500);
|
89317
|
+
}
|
89318
|
+
});
|
89319
|
+
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue?vue&type=script&lang=js&
|
89320
|
+
/* harmony default export */ var dialog_wei_rong_face_auth_dialogvue_type_script_lang_js_ = (wei_rong_face_auth_dialogvue_type_script_lang_js_);
|
89321
|
+
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue
|
89322
|
+
|
89323
|
+
|
89324
|
+
|
89325
|
+
|
89326
|
+
|
89327
|
+
/* normalize component */
|
89328
|
+
;
|
89329
|
+
var wei_rong_face_auth_dialog_component = normalizeComponent(
|
89330
|
+
dialog_wei_rong_face_auth_dialogvue_type_script_lang_js_,
|
89331
|
+
wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_render,
|
89332
|
+
wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_staticRenderFns,
|
89333
|
+
false,
|
89334
|
+
null,
|
89335
|
+
"5bbb0afc",
|
89336
|
+
null
|
89337
|
+
|
89338
|
+
)
|
89339
|
+
|
89340
|
+
/* harmony default export */ var wei_rong_face_auth_dialog = (wei_rong_face_auth_dialog_component.exports);
|
88508
89341
|
;// CONCATENATED MODULE: ./packages/service/external-plugins/pu-tian-plugin.service.ts
|
88509
89342
|
|
88510
89343
|
|
@@ -88630,6 +89463,261 @@ class PuTianPluginService {
|
|
88630
89463
|
_defineProperty(PuTianPluginService, "idCardWebSocketUrl", 'http://127.0.0.1:10012');
|
88631
89464
|
_defineProperty(PuTianPluginService, "ws", void 0);
|
88632
89465
|
_defineProperty(PuTianPluginService, "requestStore", []);
|
89466
|
+
;// CONCATENATED MODULE: ./packages/service/external-plugins/jing-lun-plugin.service.ts
|
89467
|
+
|
89468
|
+
/**
|
89469
|
+
* @author: lvcy
|
89470
|
+
* @date: 2025-04-28 14:17
|
89471
|
+
* @description:精伦读卡器
|
89472
|
+
*/
|
89473
|
+
|
89474
|
+
class JingLunPluginService {
|
89475
|
+
static async read(method) {
|
89476
|
+
let url = '';
|
89477
|
+
switch (method) {
|
89478
|
+
case 'ReadIDCard_Base64':
|
89479
|
+
url = this.idCardWebSocketUrl + '/api/readCard';
|
89480
|
+
break;
|
89481
|
+
}
|
89482
|
+
let res = await custom_axios_CustomAxios.post(url, {});
|
89483
|
+
return res;
|
89484
|
+
}
|
89485
|
+
static async idCardRead() {
|
89486
|
+
const readData = await JingLunPluginService.read('ReadIDCard_Base64');
|
89487
|
+
if (readData.resultFlag === 0) {
|
89488
|
+
let data = readData.resultContent;
|
89489
|
+
let type = '1',
|
89490
|
+
name = data.partyName,
|
89491
|
+
sex = data.gender === 1 ? '男' : '女',
|
89492
|
+
nation = data.nation,
|
89493
|
+
nationality = '中国',
|
89494
|
+
birthday = data.bornDay,
|
89495
|
+
address = data.certAddress,
|
89496
|
+
cardId = data.certNumber,
|
89497
|
+
police = data.certOrg,
|
89498
|
+
validStart = data.effDate,
|
89499
|
+
validEnd = data.expDate,
|
89500
|
+
base64_ID = data.identityPic;
|
89501
|
+
const IDCardData = {
|
89502
|
+
info: {
|
89503
|
+
cardType: type,
|
89504
|
+
nationality,
|
89505
|
+
name,
|
89506
|
+
sex,
|
89507
|
+
birthday,
|
89508
|
+
address,
|
89509
|
+
cardId,
|
89510
|
+
nation,
|
89511
|
+
police,
|
89512
|
+
validStart,
|
89513
|
+
validEnd
|
89514
|
+
},
|
89515
|
+
headImage: base64_ID
|
89516
|
+
};
|
89517
|
+
console.log(IDCardData);
|
89518
|
+
return IDCardData;
|
89519
|
+
} else {
|
89520
|
+
throw Error('未匹配可用的读卡器');
|
89521
|
+
}
|
89522
|
+
}
|
89523
|
+
}
|
89524
|
+
_defineProperty(JingLunPluginService, "idCardWebSocketUrl", 'http://127.0.0.1:18889');
|
89525
|
+
;// CONCATENATED MODULE: ./packages/service/external-plugins/han-wang-plugin.service.ts
|
89526
|
+
|
89527
|
+
|
89528
|
+
/**
|
89529
|
+
* @author: lvcy
|
89530
|
+
* @date: 2025-04-24 10:55
|
89531
|
+
* @description:汉王签字板
|
89532
|
+
*/
|
89533
|
+
|
89534
|
+
|
89535
|
+
var HanWangMethodCode;
|
89536
|
+
(function (HanWangMethodCode) {
|
89537
|
+
// 初始化
|
89538
|
+
HanWangMethodCode["Init"] = "init";
|
89539
|
+
// 打开设备(开始签名)
|
89540
|
+
HanWangMethodCode["StartSignName"] = "startSignName";
|
89541
|
+
// 关闭设备
|
89542
|
+
HanWangMethodCode["Close"] = "close";
|
89543
|
+
// 重新签名
|
89544
|
+
HanWangMethodCode["SignNameAgain"] = "signNameAgain";
|
89545
|
+
// 获取签名图片
|
89546
|
+
HanWangMethodCode["GetSign"] = "GetSign";
|
89547
|
+
})(HanWangMethodCode || (HanWangMethodCode = {}));
|
89548
|
+
class HanWangPluginService {
|
89549
|
+
static startConnect() {
|
89550
|
+
if (this.ws && this.ws.readyState === WebSocket.OPEN) {
|
89551
|
+
return this;
|
89552
|
+
}
|
89553
|
+
const ws = new WebSocket(this.linuxWebServiceUrl);
|
89554
|
+
let resolved;
|
89555
|
+
const onConnect = new Promise(resolve => {
|
89556
|
+
resolved = resolve;
|
89557
|
+
});
|
89558
|
+
ws.onopen = () => {
|
89559
|
+
resolved(true);
|
89560
|
+
};
|
89561
|
+
ws.onmessage = event => {
|
89562
|
+
this.handleMessage(event);
|
89563
|
+
};
|
89564
|
+
ws.onclose = () => this.handleClose();
|
89565
|
+
ws.onerror = e => this.handleError(e);
|
89566
|
+
this.ws = ws;
|
89567
|
+
return onConnect;
|
89568
|
+
}
|
89569
|
+
static handleMessage(msg) {
|
89570
|
+
let data = {};
|
89571
|
+
try {
|
89572
|
+
data = JSON.parse(msg.data);
|
89573
|
+
} catch (e) {
|
89574
|
+
data = {};
|
89575
|
+
}
|
89576
|
+
console.log('message=>', data);
|
89577
|
+
if (data.HWPenSign === 'HWGetSign' && data.msgID == '0') {
|
89578
|
+
const event = new SignResultEvent(data.message);
|
89579
|
+
return window.dispatchEvent(event);
|
89580
|
+
}
|
89581
|
+
this.requestStore.forEach(({
|
89582
|
+
resolve
|
89583
|
+
}) => {
|
89584
|
+
resolve(data);
|
89585
|
+
});
|
89586
|
+
this.requestStore = [];
|
89587
|
+
// this.ws.close();
|
89588
|
+
}
|
89589
|
+
|
89590
|
+
static handleError(e) {
|
89591
|
+
for (const type in this.requestStore) {
|
89592
|
+
this.requestStore.forEach(({
|
89593
|
+
reject
|
89594
|
+
}) => {
|
89595
|
+
reject('handleError');
|
89596
|
+
});
|
89597
|
+
}
|
89598
|
+
}
|
89599
|
+
static handleClose() {
|
89600
|
+
for (const type in this.requestStore) {
|
89601
|
+
this.requestStore.forEach(({
|
89602
|
+
reject
|
89603
|
+
}) => {
|
89604
|
+
reject('close');
|
89605
|
+
});
|
89606
|
+
}
|
89607
|
+
}
|
89608
|
+
static async read(method) {
|
89609
|
+
let url = '',
|
89610
|
+
data = {};
|
89611
|
+
switch (method) {
|
89612
|
+
case HanWangMethodCode.Init:
|
89613
|
+
data = {};
|
89614
|
+
url = this.windowsWebServiceUrl + '/HWPenSign/HWGetDeviceStatus';
|
89615
|
+
break;
|
89616
|
+
case HanWangMethodCode.StartSignName:
|
89617
|
+
data = {
|
89618
|
+
nLogo: "? ",
|
89619
|
+
nPenwidth: "2",
|
89620
|
+
nOrgX: "100",
|
89621
|
+
nOrgY: "200",
|
89622
|
+
width: "500",
|
89623
|
+
height: "300",
|
89624
|
+
fingerFap: "2",
|
89625
|
+
key: "4A05564228DF2C64AF2E137B71A4E7A3"
|
89626
|
+
};
|
89627
|
+
url = this.windowsWebServiceUrl + '/HWPenSign/HWInitialize';
|
89628
|
+
break;
|
89629
|
+
case HanWangMethodCode.GetSign:
|
89630
|
+
data = {
|
89631
|
+
nImageType: "3",
|
89632
|
+
nImageWidth: "500",
|
89633
|
+
nImageHeight: "300"
|
89634
|
+
};
|
89635
|
+
url = this.windowsWebServiceUrl + '/HWPenSign/HWGetSign';
|
89636
|
+
break;
|
89637
|
+
}
|
89638
|
+
let res = await custom_axios_CustomAxios.get(url);
|
89639
|
+
return res;
|
89640
|
+
}
|
89641
|
+
static async readInLinux(methodCode) {
|
89642
|
+
await this.startConnect();
|
89643
|
+
if (this.ws.readyState === 1) {
|
89644
|
+
let param = '';
|
89645
|
+
switch (methodCode) {
|
89646
|
+
case HanWangMethodCode.Init:
|
89647
|
+
param = JSON.stringify({
|
89648
|
+
HWPenSign: 'HWGetDeviceStatus'
|
89649
|
+
});
|
89650
|
+
break;
|
89651
|
+
case HanWangMethodCode.StartSignName:
|
89652
|
+
param = JSON.stringify({
|
89653
|
+
nOrgX: 400,
|
89654
|
+
nOrgY: 350,
|
89655
|
+
nWidth: 600,
|
89656
|
+
nHeight: 400,
|
89657
|
+
showDialog: 1,
|
89658
|
+
nImageWidth: 250,
|
89659
|
+
nImageHeight: 150,
|
89660
|
+
nConfirmTimeout: 30,
|
89661
|
+
fingerCap: 1
|
89662
|
+
});
|
89663
|
+
break;
|
89664
|
+
}
|
89665
|
+
this.ws.send(param);
|
89666
|
+
return new Promise((resolve, reject) => {
|
89667
|
+
if (!this.requestStore) {
|
89668
|
+
this.requestStore = [];
|
89669
|
+
}
|
89670
|
+
this.requestStore.push({
|
89671
|
+
resolve,
|
89672
|
+
reject
|
89673
|
+
});
|
89674
|
+
});
|
89675
|
+
}
|
89676
|
+
}
|
89677
|
+
static async signNameRead() {
|
89678
|
+
return new Promise(async resolve => {
|
89679
|
+
if (this._isLinux) {
|
89680
|
+
// 国产环境
|
89681
|
+
let res = await HanWangPluginService.readInLinux(HanWangMethodCode.Init);
|
89682
|
+
console.log('初始化=>', res);
|
89683
|
+
if (res.msgID == 0) {
|
89684
|
+
let signRes = await HanWangPluginService.readInLinux(HanWangMethodCode.StartSignName);
|
89685
|
+
console.log('签字=>', signRes);
|
89686
|
+
if (signRes.msgID == 0) {
|
89687
|
+
resolve('');
|
89688
|
+
}
|
89689
|
+
} else {
|
89690
|
+
throw Error('统一插件平台设备未准备完成');
|
89691
|
+
}
|
89692
|
+
} else {
|
89693
|
+
// windows
|
89694
|
+
// 链接
|
89695
|
+
let status = await HanWangPluginService.read(HanWangMethodCode.Init);
|
89696
|
+
if (status.msgID !== '0') {
|
89697
|
+
throw Error('统一插件平台设备未准备完成');
|
89698
|
+
}
|
89699
|
+
// 签字
|
89700
|
+
let res = await HanWangPluginService.read(HanWangMethodCode.StartSignName);
|
89701
|
+
if (res.msgID !== '0') {
|
89702
|
+
throw Error('统一插件平台设备未准备完成');
|
89703
|
+
}
|
89704
|
+
// 获取签字照片
|
89705
|
+
let timer = setInterval(async () => {
|
89706
|
+
let signRes = await HanWangPluginService.read(HanWangMethodCode.GetSign);
|
89707
|
+
if (signRes.msgID === '0') {
|
89708
|
+
clearInterval(timer);
|
89709
|
+
resolve(signRes.message.replace('data:image/png;base64,', ''));
|
89710
|
+
}
|
89711
|
+
}, 2000);
|
89712
|
+
}
|
89713
|
+
});
|
89714
|
+
}
|
89715
|
+
}
|
89716
|
+
_defineProperty(HanWangPluginService, "windowsWebServiceUrl", 'http://127.0.0.1:29999');
|
89717
|
+
_defineProperty(HanWangPluginService, "linuxWebServiceUrl", 'ws://127.0.0.1:29999');
|
89718
|
+
_defineProperty(HanWangPluginService, "ws", void 0);
|
89719
|
+
_defineProperty(HanWangPluginService, "requestStore", []);
|
89720
|
+
_defineProperty(HanWangPluginService, "_isLinux", String(navigator.platform).indexOf("Linux") > -1);
|
88633
89721
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/id-card-reader-button.vue?vue&type=script&lang=js&
|
88634
89722
|
|
88635
89723
|
|
@@ -88648,6 +89736,9 @@ _defineProperty(PuTianPluginService, "requestStore", []);
|
|
88648
89736
|
|
88649
89737
|
|
88650
89738
|
|
89739
|
+
|
89740
|
+
|
89741
|
+
|
88651
89742
|
/* harmony default export */ var id_card_reader_buttonvue_type_script_lang_js_ = ({
|
88652
89743
|
name: 'id-card-reader-button',
|
88653
89744
|
props: {
|
@@ -88810,52 +89901,69 @@ _defineProperty(PuTianPluginService, "requestStore", []);
|
|
88810
89901
|
let idcardInfo;
|
88811
89902
|
switch (this.readMachineType) {
|
88812
89903
|
case 0:
|
89904
|
+
// 不动产集成工具(普天/精伦)
|
88813
89905
|
idcardInfo = await IdCardReadService.idCardCommonRead();
|
88814
89906
|
this.$emit('click', idcardInfo);
|
88815
89907
|
break;
|
88816
89908
|
case 1:
|
89909
|
+
// 丽水一体机
|
88817
89910
|
return this.readLSIDCard();
|
88818
89911
|
case 2:
|
89912
|
+
// 沃斯德人证交互终端
|
88819
89913
|
idcardInfo = await EWindowPassService.idCardRead();
|
88820
89914
|
this.$emit('click', idcardInfo);
|
88821
89915
|
break;
|
88822
89916
|
case 3:
|
89917
|
+
// 中正人脸识别
|
88823
89918
|
const data = await MRAdbReadService.idCardRead();
|
88824
89919
|
if (data) idcardInfo = data.idCard;
|
88825
89920
|
this.$emit('click', idcardInfo);
|
88826
89921
|
break;
|
88827
89922
|
case 4:
|
89923
|
+
// 华大读卡器
|
88828
89924
|
idcardInfo = await HuzReadService.idCardRead();
|
88829
89925
|
this.$emit('click', idcardInfo);
|
88830
89926
|
break;
|
88831
89927
|
case 5:
|
89928
|
+
// 良田
|
88832
89929
|
idcardInfo = await ELoamPassService.idCardRead();
|
88833
89930
|
this.$emit('click', idcardInfo);
|
88834
89931
|
break;
|
88835
89932
|
case 6:
|
89933
|
+
// 捷宇信息交互终端
|
88836
89934
|
idcardInfo = await JieYueService.idCardRead();
|
88837
89935
|
this.$emit('click', idcardInfo);
|
88838
89936
|
break;
|
88839
89937
|
case 8:
|
89938
|
+
// 华视电子
|
88840
89939
|
idcardInfo = await HuaShiService.idCardRead();
|
88841
89940
|
this.$emit('click', idcardInfo);
|
88842
89941
|
break;
|
88843
89942
|
case 9:
|
89943
|
+
// 捷宇高拍仪
|
88844
89944
|
idcardInfo = await JieYueService.idCardReadByScanner();
|
88845
89945
|
this.$emit('click', idcardInfo);
|
88846
89946
|
break;
|
88847
89947
|
case 10:
|
89948
|
+
// 维融国产一体机
|
88848
89949
|
idcardInfo = await WeiRongPluginService.idCardRead();
|
88849
89950
|
this.$emit('click', idcardInfo);
|
88850
89951
|
break;
|
88851
89952
|
case 11:
|
89953
|
+
// 出入境
|
88852
89954
|
idcardInfo = await ExitAndEntryPluginService.getReadResult();
|
88853
89955
|
this.$emit('click', idcardInfo);
|
88854
89956
|
break;
|
88855
89957
|
case 12:
|
89958
|
+
// 普天
|
88856
89959
|
idcardInfo = await PuTianPluginService.idCardRead();
|
88857
89960
|
this.$emit('click', idcardInfo);
|
88858
89961
|
break;
|
89962
|
+
case 13:
|
89963
|
+
// 精伦
|
89964
|
+
idcardInfo = await JingLunPluginService.idCardRead();
|
89965
|
+
this.$emit('click', idcardInfo);
|
89966
|
+
break;
|
88859
89967
|
default:
|
88860
89968
|
this.$message.warning('请在首页右上角我的设备中设置读卡器选项!');
|
88861
89969
|
break;
|
@@ -88868,38 +89976,49 @@ _defineProperty(PuTianPluginService, "requestStore", []);
|
|
88868
89976
|
switch (this.readMachineType) {
|
88869
89977
|
case 0:
|
88870
89978
|
{
|
89979
|
+
// 默认
|
88871
89980
|
// const realPicture = await CameraReadService.read()
|
88872
89981
|
// this.$emit('click', { faceimg: realPicture })
|
88873
89982
|
this.readFacePhotoByDefault();
|
88874
89983
|
break;
|
88875
89984
|
}
|
88876
89985
|
case 1:
|
89986
|
+
// 丽水一体机
|
88877
89987
|
this.readLSIDCardAndMatchFace();
|
88878
89988
|
break;
|
88879
89989
|
case 2:
|
88880
89990
|
{
|
89991
|
+
// 沃斯德人证交互终端
|
88881
89992
|
const data = await EWindowPassService.faceValidateWithIdCardRead();
|
88882
89993
|
this.$emit('click', data);
|
88883
89994
|
break;
|
88884
89995
|
}
|
88885
89996
|
case 3:
|
88886
89997
|
{
|
89998
|
+
// 中正人脸识别
|
88887
89999
|
const data = await MRAdbReadService.idCardRead();
|
88888
90000
|
this.$emit('click', data);
|
88889
90001
|
break;
|
88890
90002
|
}
|
88891
90003
|
case 5:
|
90004
|
+
// 良田
|
88892
90005
|
this.readFacePhotoByELoam();
|
88893
90006
|
break;
|
88894
90007
|
case 6:
|
88895
90008
|
{
|
90009
|
+
// 捷宇信息交互终端
|
88896
90010
|
const data = await JieYueService.faceValidateWithIdCardRead();
|
88897
90011
|
this.$emit('click', data);
|
88898
90012
|
break;
|
88899
90013
|
}
|
88900
90014
|
case 10:
|
90015
|
+
// 国产客户端一体机
|
88901
90016
|
this.openWEIRONGFaceValidateDialog();
|
88902
90017
|
break;
|
90018
|
+
case 11:
|
90019
|
+
// 出入境设备
|
90020
|
+
this.readFacePhotoByDefault(this.readMachineType);
|
90021
|
+
break;
|
88903
90022
|
default:
|
88904
90023
|
this.$message.warning('请在首页右上角我的设备中设置读拍照/人脸识别选项!');
|
88905
90024
|
break;
|
@@ -88937,16 +90056,19 @@ _defineProperty(PuTianPluginService, "requestStore", []);
|
|
88937
90056
|
let userSignature = '';
|
88938
90057
|
switch (this.readMachineType) {
|
88939
90058
|
case 0:
|
90059
|
+
// 有为签字板
|
88940
90060
|
userSignature = await SignReadService.read();
|
88941
90061
|
break;
|
88942
90062
|
case 1:
|
90063
|
+
// 汉王签字板
|
88943
90064
|
userSignature = await SignReadService.read(PluginApiType.hwSign);
|
88944
90065
|
break;
|
88945
90066
|
case 2:
|
90067
|
+
// 沃斯德人证交互终端签字
|
88946
90068
|
userSignature = await EWindowPassService.signNameRead();
|
88947
90069
|
break;
|
88948
90070
|
case 3:
|
88949
|
-
//
|
90071
|
+
// 捷宇信息交互终端签字板
|
88950
90072
|
const data = await JieYueService.signNameRead(this.filePath);
|
88951
90073
|
const SignNameBase64 = data.SignNameBase64 ? JSON.parse(data.SignNameBase64) : {
|
88952
90074
|
SignName0: ''
|
@@ -88967,8 +90089,21 @@ _defineProperty(PuTianPluginService, "requestStore", []);
|
|
88967
90089
|
}
|
88968
90090
|
break;
|
88969
90091
|
case 5:
|
90092
|
+
// 维融国产一体机
|
88970
90093
|
userSignature = await WeiRongPluginService.signNameRead();
|
88971
90094
|
break;
|
90095
|
+
case 7:
|
90096
|
+
if (HanWangPluginService._isLinux) {
|
90097
|
+
window.addEventListener(SIGN_PHOTO_EVENT, message => {
|
90098
|
+
if (message.type === SIGN_PHOTO_EVENT) {
|
90099
|
+
userSignature = message.signResultUrl;
|
90100
|
+
}
|
90101
|
+
});
|
90102
|
+
await HanWangPluginService.signNameRead();
|
90103
|
+
} else {
|
90104
|
+
userSignature = await HanWangPluginService.signNameRead();
|
90105
|
+
}
|
90106
|
+
break;
|
88972
90107
|
default:
|
88973
90108
|
this.$message.warning('请在首页右上角我的设备中设置签字板选项!');
|
88974
90109
|
break;
|
@@ -89045,14 +90180,21 @@ _defineProperty(PuTianPluginService, "requestStore", []);
|
|
89045
90180
|
}).$mount(modalNode);
|
89046
90181
|
},
|
89047
90182
|
// 默认浏览器自带拍照
|
89048
|
-
readFacePhotoByDefault() {
|
90183
|
+
readFacePhotoByDefault(readMachineType = 0) {
|
89049
90184
|
const modalNode = document.createElement('div');
|
89050
90185
|
document.body.appendChild(modalNode);
|
89051
90186
|
const vm = new (external_commonjs_vue_commonjs2_vue_root_Vue_default())({
|
89052
90187
|
render: h => {
|
89053
90188
|
return h(default_take_photo_dialog, {
|
89054
|
-
props: {
|
90189
|
+
props: {
|
90190
|
+
readMachineType
|
90191
|
+
},
|
89055
90192
|
on: {
|
90193
|
+
faceReader: data => {
|
90194
|
+
this.$emit('click', data);
|
90195
|
+
vm.$destroy();
|
90196
|
+
vm.$el.remove();
|
90197
|
+
},
|
89056
90198
|
close: data => {
|
89057
90199
|
if (data) {
|
89058
90200
|
console.log('浏览器自带拍照=>', data);
|
@@ -89095,11 +90237,11 @@ _defineProperty(PuTianPluginService, "requestStore", []);
|
|
89095
90237
|
;
|
89096
90238
|
var id_card_reader_button_component = normalizeComponent(
|
89097
90239
|
src_id_card_reader_buttonvue_type_script_lang_js_,
|
89098
|
-
|
89099
|
-
|
90240
|
+
id_card_reader_buttonvue_type_template_id_617b7fd0_scoped_true_render,
|
90241
|
+
id_card_reader_buttonvue_type_template_id_617b7fd0_scoped_true_staticRenderFns,
|
89100
90242
|
false,
|
89101
90243
|
null,
|
89102
|
-
"
|
90244
|
+
"617b7fd0",
|
89103
90245
|
null
|
89104
90246
|
|
89105
90247
|
)
|
@@ -89114,6 +90256,855 @@ id_card_reader_button.install = Vue => {
|
|
89114
90256
|
Vue.component(id_card_reader_button.name, id_card_reader_button);
|
89115
90257
|
};
|
89116
90258
|
/* harmony default export */ var id_card_reader_id_card_reader_button = (id_card_reader_button);
|
90259
|
+
;// 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&
|
90260
|
+
var scanner_nkovue_type_template_id_304bcec5_render = function render() {
|
90261
|
+
var _vm = this,
|
90262
|
+
_c = _vm._self._c;
|
90263
|
+
return _c('el-container', {
|
90264
|
+
directives: [{
|
90265
|
+
name: "loading",
|
90266
|
+
rawName: "v-loading",
|
90267
|
+
value: _vm.pageLoading,
|
90268
|
+
expression: "pageLoading"
|
90269
|
+
}],
|
90270
|
+
staticClass: "scanner-nko",
|
90271
|
+
attrs: {
|
90272
|
+
"element-loading-text": _vm.pageLoadingText
|
90273
|
+
}
|
90274
|
+
}, [_c('el-aside', {
|
90275
|
+
staticClass: "container-aside"
|
90276
|
+
}, [_c('div', {
|
90277
|
+
staticClass: "container-title"
|
90278
|
+
}, [_vm._v("扫描配置")]), _c('div', {
|
90279
|
+
staticClass: "scan-config-form"
|
90280
|
+
}, [_c('el-form', {
|
90281
|
+
attrs: {
|
90282
|
+
"model": _vm.scanConfig,
|
90283
|
+
"label-position": "right",
|
90284
|
+
"label-width": "72px",
|
90285
|
+
"disabled": !_vm.deviceOpend
|
90286
|
+
}
|
90287
|
+
}, [_c('el-form-item', {
|
90288
|
+
attrs: {
|
90289
|
+
"label": "扫描源"
|
90290
|
+
}
|
90291
|
+
}, [_c('el-select', {
|
90292
|
+
attrs: {
|
90293
|
+
"disabled": _vm.deviceWorking,
|
90294
|
+
"placeholder": "请选择扫描源"
|
90295
|
+
},
|
90296
|
+
on: {
|
90297
|
+
"change": _vm.openDeivce
|
90298
|
+
},
|
90299
|
+
model: {
|
90300
|
+
value: _vm.scanConfig.deviceId,
|
90301
|
+
callback: function ($$v) {
|
90302
|
+
_vm.$set(_vm.scanConfig, "deviceId", $$v);
|
90303
|
+
},
|
90304
|
+
expression: "scanConfig.deviceId"
|
90305
|
+
}
|
90306
|
+
}, _vm._l(_vm.deviceList, function (item) {
|
90307
|
+
return _c('el-option', {
|
90308
|
+
key: item.deviceId,
|
90309
|
+
attrs: {
|
90310
|
+
"label": item.deviceId,
|
90311
|
+
"value": item.deviceId
|
90312
|
+
}
|
90313
|
+
});
|
90314
|
+
}), 1)], 1)], 1), _c('el-form', {
|
90315
|
+
attrs: {
|
90316
|
+
"model": _vm.scanConfig,
|
90317
|
+
"label-position": "right",
|
90318
|
+
"label-width": "72px",
|
90319
|
+
"disabled": !_vm.isDeviceReady
|
90320
|
+
}
|
90321
|
+
}, [_c('el-form-item', {
|
90322
|
+
attrs: {
|
90323
|
+
"label": "进纸模式"
|
90324
|
+
}
|
90325
|
+
}, [_c('el-select', {
|
90326
|
+
attrs: {
|
90327
|
+
"placeholder": "请选择进纸模式"
|
90328
|
+
},
|
90329
|
+
model: {
|
90330
|
+
value: _vm.scanConfig.source,
|
90331
|
+
callback: function ($$v) {
|
90332
|
+
_vm.$set(_vm.scanConfig, "source", $$v);
|
90333
|
+
},
|
90334
|
+
expression: "scanConfig.source"
|
90335
|
+
}
|
90336
|
+
}, _vm._l(_vm.sourceOptions, function (item) {
|
90337
|
+
return _c('el-option', {
|
90338
|
+
key: item,
|
90339
|
+
attrs: {
|
90340
|
+
"label": item,
|
90341
|
+
"value": item
|
90342
|
+
}
|
90343
|
+
});
|
90344
|
+
}), 1)], 1), _c('el-form-item', {
|
90345
|
+
attrs: {
|
90346
|
+
"label": "扫描颜色"
|
90347
|
+
}
|
90348
|
+
}, [_c('el-select', {
|
90349
|
+
attrs: {
|
90350
|
+
"placeholder": "请选择"
|
90351
|
+
},
|
90352
|
+
model: {
|
90353
|
+
value: _vm.scanConfig.mode,
|
90354
|
+
callback: function ($$v) {
|
90355
|
+
_vm.$set(_vm.scanConfig, "mode", $$v);
|
90356
|
+
},
|
90357
|
+
expression: "scanConfig.mode"
|
90358
|
+
}
|
90359
|
+
}, _vm._l(_vm.modeOptions, function (item) {
|
90360
|
+
return _c('el-option', {
|
90361
|
+
key: item,
|
90362
|
+
attrs: {
|
90363
|
+
"label": item,
|
90364
|
+
"value": item
|
90365
|
+
}
|
90366
|
+
});
|
90367
|
+
}), 1)], 1), _c('el-form-item', {
|
90368
|
+
attrs: {
|
90369
|
+
"label": "分辨率"
|
90370
|
+
}
|
90371
|
+
}, [_c('el-select', {
|
90372
|
+
attrs: {
|
90373
|
+
"placeholder": "请选择分辨率"
|
90374
|
+
},
|
90375
|
+
model: {
|
90376
|
+
value: _vm.scanConfig.resolution,
|
90377
|
+
callback: function ($$v) {
|
90378
|
+
_vm.$set(_vm.scanConfig, "resolution", $$v);
|
90379
|
+
},
|
90380
|
+
expression: "scanConfig.resolution"
|
90381
|
+
}
|
90382
|
+
}, _vm._l(_vm.resolutionOptions, function (item) {
|
90383
|
+
return _c('el-option', {
|
90384
|
+
key: item,
|
90385
|
+
attrs: {
|
90386
|
+
"label": item,
|
90387
|
+
"value": item
|
90388
|
+
}
|
90389
|
+
});
|
90390
|
+
}), 1)], 1), _c('el-form-item', {
|
90391
|
+
attrs: {
|
90392
|
+
"label": "纸张类型"
|
90393
|
+
}
|
90394
|
+
}, [_c('el-select', {
|
90395
|
+
attrs: {
|
90396
|
+
"placeholder": "请选择纸张类型"
|
90397
|
+
},
|
90398
|
+
model: {
|
90399
|
+
value: _vm.scanConfig.paperSize,
|
90400
|
+
callback: function ($$v) {
|
90401
|
+
_vm.$set(_vm.scanConfig, "paperSize", $$v);
|
90402
|
+
},
|
90403
|
+
expression: "scanConfig.paperSize"
|
90404
|
+
}
|
90405
|
+
}, _vm._l(_vm.paperSizeOptions, function (item) {
|
90406
|
+
return _c('el-option', {
|
90407
|
+
key: item,
|
90408
|
+
attrs: {
|
90409
|
+
"label": item,
|
90410
|
+
"value": item
|
90411
|
+
}
|
90412
|
+
});
|
90413
|
+
}), 1)], 1), _c('el-form-item', {
|
90414
|
+
attrs: {
|
90415
|
+
"label": "文件格式"
|
90416
|
+
}
|
90417
|
+
}, [_c('el-select', {
|
90418
|
+
attrs: {
|
90419
|
+
"placeholder": "请选择"
|
90420
|
+
},
|
90421
|
+
model: {
|
90422
|
+
value: _vm.scanConfig.fileFormat,
|
90423
|
+
callback: function ($$v) {
|
90424
|
+
_vm.$set(_vm.scanConfig, "fileFormat", $$v);
|
90425
|
+
},
|
90426
|
+
expression: "scanConfig.fileFormat"
|
90427
|
+
}
|
90428
|
+
}, _vm._l(_vm.fileFormatOptions, function (item) {
|
90429
|
+
return _c('el-option', {
|
90430
|
+
key: item,
|
90431
|
+
attrs: {
|
90432
|
+
"label": item,
|
90433
|
+
"value": item
|
90434
|
+
}
|
90435
|
+
});
|
90436
|
+
}), 1)], 1)], 1), _c('div', {
|
90437
|
+
staticClass: "text-right"
|
90438
|
+
}, [_c('el-button', {
|
90439
|
+
attrs: {
|
90440
|
+
"type": "primary"
|
90441
|
+
},
|
90442
|
+
on: {
|
90443
|
+
"click": _vm.initScanServiceAPI
|
90444
|
+
}
|
90445
|
+
}, [_vm._v("连接")]), _c('el-button', {
|
90446
|
+
attrs: {
|
90447
|
+
"type": "primary",
|
90448
|
+
"disabled": !_vm.isDeviceReady || _vm.deviceWorking
|
90449
|
+
},
|
90450
|
+
on: {
|
90451
|
+
"click": _vm.doScan
|
90452
|
+
}
|
90453
|
+
}, [_vm._v("扫描")])], 1)], 1)]), _c('el-container', [_c('el-main', {
|
90454
|
+
staticClass: "container-main"
|
90455
|
+
}, [_c('div', {
|
90456
|
+
staticClass: "container-title"
|
90457
|
+
}, [_vm._v("扫描结果")]), _c('el-checkbox', {
|
90458
|
+
attrs: {
|
90459
|
+
"indeterminate": _vm.isIndeterminate
|
90460
|
+
},
|
90461
|
+
on: {
|
90462
|
+
"change": _vm.handleCheckAllChange
|
90463
|
+
},
|
90464
|
+
model: {
|
90465
|
+
value: _vm.checkAll,
|
90466
|
+
callback: function ($$v) {
|
90467
|
+
_vm.checkAll = $$v;
|
90468
|
+
},
|
90469
|
+
expression: "checkAll"
|
90470
|
+
}
|
90471
|
+
}, [_vm._v("全选")]), _c('div', {
|
90472
|
+
staticClass: "image-list"
|
90473
|
+
}, _vm._l(_vm.scanFileList, function (item, index) {
|
90474
|
+
return _c('div', {
|
90475
|
+
key: item.name,
|
90476
|
+
class: {
|
90477
|
+
'image-list-item': true,
|
90478
|
+
'image-checked': item.checked
|
90479
|
+
}
|
90480
|
+
}, [_c('el-image', {
|
90481
|
+
attrs: {
|
90482
|
+
"src": item.url,
|
90483
|
+
"preview-src-list": _vm.imgUrls,
|
90484
|
+
"initial-index": _vm.initialIndex
|
90485
|
+
},
|
90486
|
+
on: {
|
90487
|
+
"click": function ($event) {
|
90488
|
+
return _vm.previewImg(index);
|
90489
|
+
}
|
90490
|
+
}
|
90491
|
+
}), _c('div', {
|
90492
|
+
staticClass: "image-actions"
|
90493
|
+
}, [_c('el-checkbox', {
|
90494
|
+
on: {
|
90495
|
+
"change": _vm.handleCheckedChange
|
90496
|
+
},
|
90497
|
+
model: {
|
90498
|
+
value: item.checked,
|
90499
|
+
callback: function ($$v) {
|
90500
|
+
_vm.$set(item, "checked", $$v);
|
90501
|
+
},
|
90502
|
+
expression: "item.checked"
|
90503
|
+
}
|
90504
|
+
}, [_vm._v(_vm._s(item.name))]), _c('el-button', {
|
90505
|
+
staticStyle: {
|
90506
|
+
"color": "red"
|
90507
|
+
},
|
90508
|
+
attrs: {
|
90509
|
+
"type": "text",
|
90510
|
+
"icon": "el-icon-delete"
|
90511
|
+
},
|
90512
|
+
on: {
|
90513
|
+
"click": function ($event) {
|
90514
|
+
return _vm.deleteFileEvent(index);
|
90515
|
+
}
|
90516
|
+
}
|
90517
|
+
}), _c('el-button', {
|
90518
|
+
attrs: {
|
90519
|
+
"type": "text",
|
90520
|
+
"icon": "el-icon-upload2"
|
90521
|
+
},
|
90522
|
+
on: {
|
90523
|
+
"click": function ($event) {
|
90524
|
+
return _vm.sendScannerResult(item);
|
90525
|
+
}
|
90526
|
+
}
|
90527
|
+
})], 1)], 1);
|
90528
|
+
}), 0)], 1), _c('el-footer', [_c('div', {
|
90529
|
+
staticClass: "text-right"
|
90530
|
+
}, [_c('el-button', {
|
90531
|
+
attrs: {
|
90532
|
+
"size": "small",
|
90533
|
+
"type": "primary",
|
90534
|
+
"disabled": _vm.scanFileList.length === 0
|
90535
|
+
},
|
90536
|
+
on: {
|
90537
|
+
"click": _vm.clearImgList
|
90538
|
+
}
|
90539
|
+
}, [_vm._v("清空")]), _c('el-button', {
|
90540
|
+
attrs: {
|
90541
|
+
"size": "small",
|
90542
|
+
"type": "primary",
|
90543
|
+
"disabled": _vm.scanFileList.length === 0
|
90544
|
+
},
|
90545
|
+
on: {
|
90546
|
+
"click": _vm.batchDelFilesEvent
|
90547
|
+
}
|
90548
|
+
}, [_vm._v("批量删除")]), _c('el-button', {
|
90549
|
+
attrs: {
|
90550
|
+
"size": "small",
|
90551
|
+
"type": "primary",
|
90552
|
+
"disabled": _vm.scanFileList.length === 0
|
90553
|
+
},
|
90554
|
+
on: {
|
90555
|
+
"click": function ($event) {
|
90556
|
+
return _vm.sendScannerResult();
|
90557
|
+
}
|
90558
|
+
}
|
90559
|
+
}, [_vm._v("上传")])], 1)])], 1)], 1);
|
90560
|
+
};
|
90561
|
+
var scanner_nkovue_type_template_id_304bcec5_staticRenderFns = [];
|
90562
|
+
|
90563
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-exception.stack.js
|
90564
|
+
var web_dom_exception_stack = __webpack_require__(2801);
|
90565
|
+
;// CONCATENATED MODULE: ./packages/service/external-plugins/nko-plugin-socket.service.ts
|
90566
|
+
|
90567
|
+
|
90568
|
+
|
90569
|
+
/**
|
90570
|
+
* 赞彩五合一设备
|
90571
|
+
*
|
90572
|
+
* */
|
90573
|
+
var NkoMethodCode;
|
90574
|
+
(function (NkoMethodCode) {
|
90575
|
+
/** 扫描 */
|
90576
|
+
NkoMethodCode["scan"] = "scan";
|
90577
|
+
})(NkoMethodCode || (NkoMethodCode = {}));
|
90578
|
+
var NkoMethodScanFunction;
|
90579
|
+
(function (NkoMethodScanFunction) {
|
90580
|
+
/** 获取扫描仪 */
|
90581
|
+
NkoMethodScanFunction["getScanDeivceList"] = "001001";
|
90582
|
+
/** 选中指定扫描仪并打开 */
|
90583
|
+
NkoMethodScanFunction["openScanDeivce"] = "001002";
|
90584
|
+
/** 获取选中扫描仪可配置项 */
|
90585
|
+
NkoMethodScanFunction["getScanOptions"] = "001003";
|
90586
|
+
/** 常用参数的便捷配置能力(进纸模式、色彩、尺寸、DPI) */
|
90587
|
+
NkoMethodScanFunction["setScanBasicOptions"] = "001007";
|
90588
|
+
/** 扫描 */
|
90589
|
+
NkoMethodScanFunction["scan"] = "001008";
|
90590
|
+
})(NkoMethodScanFunction || (NkoMethodScanFunction = {}));
|
90591
|
+
const NkoMethodDesc = {
|
90592
|
+
[NkoMethodCode.scan]: '扫描'
|
90593
|
+
};
|
90594
|
+
class NkoService {
|
90595
|
+
static startConnect(method) {
|
90596
|
+
if (this.ws && this.ws.readyState === WebSocket.OPEN) {
|
90597
|
+
return this;
|
90598
|
+
}
|
90599
|
+
let webSocketUrl = '';
|
90600
|
+
switch (method) {
|
90601
|
+
case NkoMethodCode.scan:
|
90602
|
+
webSocketUrl = this.scanWebSocketUrl;
|
90603
|
+
break;
|
90604
|
+
default:
|
90605
|
+
webSocketUrl = this.iReadCardWebSocketUrl;
|
90606
|
+
break;
|
90607
|
+
}
|
90608
|
+
const ws = new WebSocket(webSocketUrl);
|
90609
|
+
let resolved;
|
90610
|
+
const onConnect = new Promise(resolve => {
|
90611
|
+
resolved = resolve;
|
90612
|
+
});
|
90613
|
+
ws.onopen = () => {
|
90614
|
+
resolved(true);
|
90615
|
+
};
|
90616
|
+
ws.onmessage = event => {
|
90617
|
+
this.handleMessage(event);
|
90618
|
+
};
|
90619
|
+
ws.onclose = () => this.handleClose();
|
90620
|
+
ws.onerror = () => this.handleError();
|
90621
|
+
this.ws = ws;
|
90622
|
+
return onConnect;
|
90623
|
+
}
|
90624
|
+
static handleError() {
|
90625
|
+
for (const type in this.requestStore) {
|
90626
|
+
this.requestStore.forEach(({
|
90627
|
+
reject
|
90628
|
+
}) => {
|
90629
|
+
reject('handleError');
|
90630
|
+
});
|
90631
|
+
}
|
90632
|
+
throw Error('统一插件平台赞彩五合一设备功能加载失败');
|
90633
|
+
}
|
90634
|
+
static handleClose() {
|
90635
|
+
for (const type in this.requestStore) {
|
90636
|
+
this.requestStore.forEach(({
|
90637
|
+
reject
|
90638
|
+
}) => {
|
90639
|
+
reject('close');
|
90640
|
+
});
|
90641
|
+
}
|
90642
|
+
}
|
90643
|
+
static handleMessage(msg) {
|
90644
|
+
let data = '';
|
90645
|
+
try {
|
90646
|
+
data = JSON.parse(msg.data);
|
90647
|
+
} catch (e) {
|
90648
|
+
data = '';
|
90649
|
+
}
|
90650
|
+
if (data['function'] === "001008" && data['code'] === 0) {
|
90651
|
+
return;
|
90652
|
+
} else if (data['function'] === "001010") {
|
90653
|
+
return this.scanCallback(data);
|
90654
|
+
} else {
|
90655
|
+
this.requestStore.forEach(({
|
90656
|
+
resolve
|
90657
|
+
}) => {
|
90658
|
+
resolve(data);
|
90659
|
+
});
|
90660
|
+
this.requestStore = [];
|
90661
|
+
}
|
90662
|
+
// this.ws.close();
|
90663
|
+
}
|
90664
|
+
|
90665
|
+
static async read(method, functionCode, params = {}) {
|
90666
|
+
await this.startConnect(method);
|
90667
|
+
const methodDesc = NkoMethodDesc[method];
|
90668
|
+
if (this.ws.readyState === 1) {
|
90669
|
+
console.log(methodDesc + '连接成功');
|
90670
|
+
let jsonString;
|
90671
|
+
switch (method) {
|
90672
|
+
case NkoMethodCode.scan:
|
90673
|
+
jsonString = JSON.stringify({
|
90674
|
+
function: functionCode,
|
90675
|
+
traceId: '',
|
90676
|
+
params
|
90677
|
+
});
|
90678
|
+
break;
|
90679
|
+
default:
|
90680
|
+
jsonString = '';
|
90681
|
+
break;
|
90682
|
+
}
|
90683
|
+
this.ws.send(jsonString);
|
90684
|
+
return new Promise((resolve, reject) => {
|
90685
|
+
if (!this.requestStore) {
|
90686
|
+
this.requestStore = [];
|
90687
|
+
}
|
90688
|
+
this.requestStore.push({
|
90689
|
+
resolve,
|
90690
|
+
reject
|
90691
|
+
});
|
90692
|
+
});
|
90693
|
+
} else {
|
90694
|
+
throw Error('统一插件平台' + methodDesc + '未准备完成');
|
90695
|
+
}
|
90696
|
+
}
|
90697
|
+
/**
|
90698
|
+
* 获取扫描仪
|
90699
|
+
* @returns deviceId:扫描仪设备 ID
|
90700
|
+
*/
|
90701
|
+
static async getDeivceList() {
|
90702
|
+
const response = await NkoService.read(NkoMethodCode.scan, NkoMethodScanFunction.getScanDeivceList);
|
90703
|
+
if (!response) {
|
90704
|
+
throw Error('未匹配可用的扫描仪设备');
|
90705
|
+
}
|
90706
|
+
if (response.code !== 0) {
|
90707
|
+
throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
|
90708
|
+
}
|
90709
|
+
console.log('获取扫描仪==>', response);
|
90710
|
+
return response.data;
|
90711
|
+
}
|
90712
|
+
/**
|
90713
|
+
* 选中指定扫描仪并打开
|
90714
|
+
* @param scannerId 选中的扫描仪 ID
|
90715
|
+
*/
|
90716
|
+
static async openScanDeivce(scannerId) {
|
90717
|
+
const response = await NkoService.read(NkoMethodCode.scan, NkoMethodScanFunction.openScanDeivce, {
|
90718
|
+
scannerId
|
90719
|
+
});
|
90720
|
+
if (!response) {
|
90721
|
+
throw Error('未匹配可用的扫描仪设备');
|
90722
|
+
}
|
90723
|
+
if (response.code !== 0) {
|
90724
|
+
throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
|
90725
|
+
}
|
90726
|
+
console.log('选中指定扫描仪并打开==>', response);
|
90727
|
+
return response;
|
90728
|
+
}
|
90729
|
+
/**
|
90730
|
+
* 获取选中扫描仪可配置项
|
90731
|
+
* @returns 选择扫描仪的可配置项
|
90732
|
+
*/
|
90733
|
+
static async getScanOptions() {
|
90734
|
+
const response = await NkoService.read(NkoMethodCode.scan, NkoMethodScanFunction.getScanOptions);
|
90735
|
+
if (!response) {
|
90736
|
+
throw Error('未匹配可用的扫描仪设备');
|
90737
|
+
}
|
90738
|
+
if (response.code !== 0) {
|
90739
|
+
throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
|
90740
|
+
}
|
90741
|
+
console.log('获取选中扫描仪可配置项==>', response);
|
90742
|
+
return response.data;
|
90743
|
+
}
|
90744
|
+
/**
|
90745
|
+
* 常用参数的便捷配置能力(进纸模式、色彩、尺寸、DPI)
|
90746
|
+
*/
|
90747
|
+
static async setScanBasicOptions(config) {
|
90748
|
+
// {
|
90749
|
+
// "source": "Adf-front",
|
90750
|
+
// "mode": "Color",
|
90751
|
+
// "image-format": "jpeg"
|
90752
|
+
// }
|
90753
|
+
const response = await NkoService.read(NkoMethodCode.scan, NkoMethodScanFunction.setScanBasicOptions, config);
|
90754
|
+
if (!response) {
|
90755
|
+
throw Error('未匹配可用的扫描仪设备');
|
90756
|
+
}
|
90757
|
+
if (response.code !== 0) {
|
90758
|
+
throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
|
90759
|
+
}
|
90760
|
+
console.log('设置配置项==>', response);
|
90761
|
+
return response;
|
90762
|
+
}
|
90763
|
+
/**
|
90764
|
+
* 扫描
|
90765
|
+
* @param fileFormat 文件保存格式,若为空以当前驱动配置格式扫描
|
90766
|
+
* @returns
|
90767
|
+
*/
|
90768
|
+
static async scan(fileFormat, fileSavePath = 'C:\\ScanResult', fileNamePrefix = '', fileNameFormat = '') {
|
90769
|
+
this.fileList = [];
|
90770
|
+
const response = await NkoService.read(NkoMethodCode.scan, NkoMethodScanFunction.scan, {
|
90771
|
+
fileFormat: `.${fileFormat}`,
|
90772
|
+
// 保存路径,若为空则取服务配置文件路径
|
90773
|
+
fileSavePath,
|
90774
|
+
fileType: "Base64",
|
90775
|
+
// 保存的文件名前缀,若为空直接追加方式命名
|
90776
|
+
fileNamePrefix,
|
90777
|
+
// 保存文件的追加命名方式
|
90778
|
+
// 1. index - 四位数自增
|
90779
|
+
// 例:xx 文档_0001.tiff
|
90780
|
+
// 2. datetime - 扫描日期时间
|
90781
|
+
// 例: xx 文档_20231015164735.tiff
|
90782
|
+
// 3. guid - GUID
|
90783
|
+
// 例 :xx 文 档 _f47ac10b-58cc-4372-a567-0e02b3d4.tiff
|
90784
|
+
// 若为空以 index 模式命名
|
90785
|
+
fileNameFormat,
|
90786
|
+
// 是否返回文件 md5 信息,默认不返回
|
90787
|
+
fileMd5Enabled: false
|
90788
|
+
});
|
90789
|
+
if (!response) {
|
90790
|
+
throw Error('未匹配可用的扫描仪设备');
|
90791
|
+
}
|
90792
|
+
if (response.code !== 0) {
|
90793
|
+
throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
|
90794
|
+
}
|
90795
|
+
console.log('扫描==>', response);
|
90796
|
+
if (response.function === "001011") {
|
90797
|
+
return this.fileList;
|
90798
|
+
}
|
90799
|
+
return response;
|
90800
|
+
}
|
90801
|
+
/**
|
90802
|
+
* 扫描回调(单张)
|
90803
|
+
*/
|
90804
|
+
static scanCallback(response) {
|
90805
|
+
if (response.code !== 0) {
|
90806
|
+
throw Error(response.msg);
|
90807
|
+
} else {
|
90808
|
+
const fileName = response.data.fileName,
|
90809
|
+
fileFormat = fileName.substr(fileName.lastIndexOf(".") + 1);
|
90810
|
+
let dataUrl;
|
90811
|
+
//Tiff不能直接显示在html,需要处理
|
90812
|
+
if (fileFormat === "tiff" || fileFormat === "tif") {
|
90813
|
+
// dataUrl = this.getTiffDataUrl(response.data.fileResult);
|
90814
|
+
} else {
|
90815
|
+
dataUrl = `data:image/${fileFormat};base64,${response.data.fileResult}`;
|
90816
|
+
}
|
90817
|
+
return this.fileList.push({
|
90818
|
+
name: fileName,
|
90819
|
+
url: dataUrl
|
90820
|
+
});
|
90821
|
+
}
|
90822
|
+
}
|
90823
|
+
/**
|
90824
|
+
* 扫描完成回调
|
90825
|
+
*/
|
90826
|
+
static completeCallback(response) {
|
90827
|
+
if (response.code !== 0) {
|
90828
|
+
throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
|
90829
|
+
} else {
|
90830
|
+
console.log(response.data ? response.data : response.msg);
|
90831
|
+
}
|
90832
|
+
}
|
90833
|
+
//将Tiff base64转为可在html上正常显示的dataUrl base64
|
90834
|
+
/*static getTiffDataUrl(base64Str) {
|
90835
|
+
var buffer = this.base64ToUint8Array(base64Str);
|
90836
|
+
var tiff = new Tiff({ buffer: buffer });
|
90837
|
+
return tiff.toDataURL();
|
90838
|
+
}*/
|
90839
|
+
//Base64转为ArrayBuffer
|
90840
|
+
static base64ToUint8Array(base64String) {
|
90841
|
+
const padding = "=".repeat((4 - base64String.length % 4) % 4);
|
90842
|
+
const base64 = (base64String + padding).replace(/\-/g, "+").replace(/_/g, "/");
|
90843
|
+
const rawData = window.atob(base64);
|
90844
|
+
const outputArray = new Uint8Array(rawData.length);
|
90845
|
+
for (let i = 0; i < rawData.length; ++i) {
|
90846
|
+
outputArray[i] = rawData.charCodeAt(i);
|
90847
|
+
}
|
90848
|
+
return outputArray;
|
90849
|
+
}
|
90850
|
+
}
|
90851
|
+
_defineProperty(NkoService, "iReadCardWebSocketUrl", '');
|
90852
|
+
_defineProperty(NkoService, "scanWebSocketUrl", 'ws://127.0.0.1:51818');
|
90853
|
+
_defineProperty(NkoService, "ws", void 0);
|
90854
|
+
_defineProperty(NkoService, "requestStore", []);
|
90855
|
+
_defineProperty(NkoService, "fileList", []);
|
90856
|
+
;// 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&
|
90857
|
+
|
90858
|
+
|
90859
|
+
/* harmony default export */ var scanner_nkovue_type_script_lang_js_ = ({
|
90860
|
+
name: 'scanner-nko',
|
90861
|
+
components: {},
|
90862
|
+
props: {
|
90863
|
+
/**
|
90864
|
+
* 保存路径,若为空则取服务配置文件路径
|
90865
|
+
*/
|
90866
|
+
fileSavePath: {
|
90867
|
+
default: '',
|
90868
|
+
type: String
|
90869
|
+
},
|
90870
|
+
/**
|
90871
|
+
* 保存的文件名前缀,若为空直接追加方式命名
|
90872
|
+
*/
|
90873
|
+
fileNamePrefix: {
|
90874
|
+
default: '',
|
90875
|
+
type: String
|
90876
|
+
},
|
90877
|
+
/**
|
90878
|
+
* 保存文件的追加命名方式
|
90879
|
+
* 1. index - 四位数自增
|
90880
|
+
* 例:xx 文档_0001.tiff
|
90881
|
+
* 2. datetime - 扫描日期时间
|
90882
|
+
* 例: xx 文档_20231015164735.tiff
|
90883
|
+
* 3. guid - GUID
|
90884
|
+
* 例 :xx 文 档 _f47ac10b-58cc-4372-a567-0e02b3d4.tiff
|
90885
|
+
* 若为空以 index 模式命名
|
90886
|
+
*/
|
90887
|
+
fileNameFormat: {
|
90888
|
+
default: '',
|
90889
|
+
type: String
|
90890
|
+
}
|
90891
|
+
},
|
90892
|
+
data: () => {
|
90893
|
+
return {
|
90894
|
+
//页面整体遮罩
|
90895
|
+
pageLoading: false,
|
90896
|
+
pageLoadingText: '正在配置相关设置',
|
90897
|
+
//扫描设备列表
|
90898
|
+
deviceList: [],
|
90899
|
+
//设备是否已连接
|
90900
|
+
deviceOpend: false,
|
90901
|
+
//设备是否繁忙
|
90902
|
+
deviceWorking: false,
|
90903
|
+
//扫描配置
|
90904
|
+
scanConfig: {
|
90905
|
+
deviceId: null,
|
90906
|
+
source: null,
|
90907
|
+
resolution: null,
|
90908
|
+
mode: null,
|
90909
|
+
paperSize: null,
|
90910
|
+
fileFormat: null
|
90911
|
+
},
|
90912
|
+
//进纸模式
|
90913
|
+
sourceOptions: [],
|
90914
|
+
//扫描颜色
|
90915
|
+
modeOptions: [],
|
90916
|
+
//分辨率
|
90917
|
+
resolutionOptions: [],
|
90918
|
+
//纸张类型
|
90919
|
+
paperSizeOptions: [],
|
90920
|
+
//文件格式
|
90921
|
+
fileFormatOptions: [],
|
90922
|
+
//中间图片数据 {name:'',url:'',checked:false}
|
90923
|
+
scanFileList: [],
|
90924
|
+
initialIndex: 0,
|
90925
|
+
scannerResult: '',
|
90926
|
+
isIndeterminate: false,
|
90927
|
+
checkAll: false
|
90928
|
+
};
|
90929
|
+
},
|
90930
|
+
computed: {
|
90931
|
+
//扫描设备是否可用
|
90932
|
+
isDeviceReady() {
|
90933
|
+
return this.scanConfig.deviceId && this.deviceOpend;
|
90934
|
+
},
|
90935
|
+
imgUrls() {
|
90936
|
+
return this.scanFileList.map(item => item.url);
|
90937
|
+
}
|
90938
|
+
},
|
90939
|
+
created() {},
|
90940
|
+
methods: {
|
90941
|
+
handleCheckAllChange(val) {
|
90942
|
+
this.scanFileList.forEach(data => {
|
90943
|
+
data.checked = val;
|
90944
|
+
});
|
90945
|
+
this.isIndeterminate = false;
|
90946
|
+
},
|
90947
|
+
handleCheckedChange() {
|
90948
|
+
const checkedCount = this.scanFileList.filter(data => data.checked).length;
|
90949
|
+
this.isIndeterminate = checkedCount > 0 && checkedCount < this.scanFileList.length;
|
90950
|
+
this.checkAll = this.scanFileList.length > 0 && checkedCount === this.scanFileList.length;
|
90951
|
+
},
|
90952
|
+
/**
|
90953
|
+
* 初始化ScanServiceAPI连接
|
90954
|
+
*/
|
90955
|
+
async initScanServiceAPI() {
|
90956
|
+
this.pageLoadingText = '正在连接扫描服务,请稍候...';
|
90957
|
+
this.pageLoading = true;
|
90958
|
+
// 获取设备列表
|
90959
|
+
this.deviceList = await NkoService.getDeivceList();
|
90960
|
+
this.deviceOpend = true;
|
90961
|
+
this.pageLoading = false;
|
90962
|
+
},
|
90963
|
+
/**
|
90964
|
+
* 扫描服务关闭时回调
|
90965
|
+
*/
|
90966
|
+
wsCloseCallback() {
|
90967
|
+
this.$message.warning('扫描服务连接已断开');
|
90968
|
+
this.pageLoading = false;
|
90969
|
+
this.resetData();
|
90970
|
+
this.deviceList = [];
|
90971
|
+
this.scanConfig.deviceId = null;
|
90972
|
+
},
|
90973
|
+
/**
|
90974
|
+
* 重置数据
|
90975
|
+
*/
|
90976
|
+
resetData() {
|
90977
|
+
this.scanConfig.source = null;
|
90978
|
+
this.scanConfig.resolution = null;
|
90979
|
+
this.scanConfig.mode = null;
|
90980
|
+
this.scanConfig.paperSideviceOpendze = null;
|
90981
|
+
this.scanConfig.fileFormat = null;
|
90982
|
+
this.sourceOptions = [];
|
90983
|
+
this.modeOptions = [];
|
90984
|
+
this.resolutionOptions = [];
|
90985
|
+
this.paperSizeOptions = [];
|
90986
|
+
this.fileFormatOptions = [];
|
90987
|
+
this.deviceOpend = false;
|
90988
|
+
this.deviceWorking = false;
|
90989
|
+
},
|
90990
|
+
/**
|
90991
|
+
* 选择扫描设备
|
90992
|
+
*/
|
90993
|
+
openDeivce() {
|
90994
|
+
this.pageLoadingText = '正在设置扫描源,请稍后...';
|
90995
|
+
this.pageLoading = true;
|
90996
|
+
|
90997
|
+
//重置扫描配置
|
90998
|
+
this.resetData();
|
90999
|
+
// 获取扫描仪可配置项
|
91000
|
+
this.getScanOptions();
|
91001
|
+
},
|
91002
|
+
/**
|
91003
|
+
* 获取扫描仪可配置项
|
91004
|
+
*/
|
91005
|
+
async getScanOptions() {
|
91006
|
+
this.pageLoadingText = '正在获取扫描仪能力,请稍后...';
|
91007
|
+
this.pageLoading = true;
|
91008
|
+
await NkoService.openScanDeivce(this.scanConfig.deviceId);
|
91009
|
+
var options = await NkoService.getScanOptions();
|
91010
|
+
this.sourceOptions = options.source;
|
91011
|
+
this.modeOptions = options.mode;
|
91012
|
+
this.resolutionOptions = options.resolution;
|
91013
|
+
this.paperSizeOptions = options['paper-size'];
|
91014
|
+
this.fileFormatOptions = options['image-format'];
|
91015
|
+
this.scanConfig.source = this.sourceOptions[0] || null;
|
91016
|
+
this.scanConfig.mode = this.modeOptions[0] || null;
|
91017
|
+
this.scanConfig.resolution = this.resolutionOptions[0] || null;
|
91018
|
+
this.scanConfig.paperSize = this.paperSizeOptions[0] || null;
|
91019
|
+
this.scanConfig.fileFormat = this.fileFormatOptions[0] || null;
|
91020
|
+
this.deviceOpend = true;
|
91021
|
+
this.pageLoading = false;
|
91022
|
+
},
|
91023
|
+
/**
|
91024
|
+
* 点击扫描
|
91025
|
+
*/
|
91026
|
+
async doScan() {
|
91027
|
+
if (!this.isDeviceReady || this.deviceWorking) {
|
91028
|
+
return;
|
91029
|
+
}
|
91030
|
+
this.pageLoadingText = '正在提交扫描请求,请稍后...';
|
91031
|
+
this.pageLoading = true;
|
91032
|
+
await NkoService.setScanBasicOptions({
|
91033
|
+
source: this.scanConfig.source,
|
91034
|
+
mode: this.scanConfig.mode,
|
91035
|
+
'paper-size': this.scanConfig.paperSize,
|
91036
|
+
resolution: this.scanConfig.resolution
|
91037
|
+
});
|
91038
|
+
const data = await NkoService.scan(this.scanConfig.fileFormat, this.fileSavePath, this.fileNamePrefix, this.fileNameFormat);
|
91039
|
+
this.scanFileList = [...this.scanFileList, ...data];
|
91040
|
+
this.pageLoading = false;
|
91041
|
+
},
|
91042
|
+
//预览
|
91043
|
+
previewImg(index) {
|
91044
|
+
this.initialIndex = index;
|
91045
|
+
},
|
91046
|
+
clearImgList() {
|
91047
|
+
this.scanFileList = [];
|
91048
|
+
},
|
91049
|
+
deleteFileEvent(index) {
|
91050
|
+
this.scanFileList.splice(index, 1);
|
91051
|
+
},
|
91052
|
+
batchDelFilesEvent() {
|
91053
|
+
let list = [];
|
91054
|
+
this.scanFileList.forEach(data => {
|
91055
|
+
if (!data.checked) list.push(data);
|
91056
|
+
});
|
91057
|
+
this.scanFileList = list;
|
91058
|
+
},
|
91059
|
+
sendScannerResult(data = null) {
|
91060
|
+
const list = data ? [data] : this.scanFileList.filter(data => data.checked);
|
91061
|
+
if (!list || list.length === 0) return;
|
91062
|
+
this.$emit('send-scanner-result', list.map(data => ({
|
91063
|
+
name: data.name,
|
91064
|
+
url: data.url
|
91065
|
+
})));
|
91066
|
+
}
|
91067
|
+
}
|
91068
|
+
});
|
91069
|
+
;// CONCATENATED MODULE: ./packages/scanner/scanner-nko/src/scanner-nko.vue?vue&type=script&lang=js&
|
91070
|
+
/* harmony default export */ var src_scanner_nkovue_type_script_lang_js_ = (scanner_nkovue_type_script_lang_js_);
|
91071
|
+
;// 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&
|
91072
|
+
// extracted by mini-css-extract-plugin
|
91073
|
+
|
91074
|
+
;// CONCATENATED MODULE: ./packages/scanner/scanner-nko/src/scanner-nko.vue?vue&type=style&index=0&id=304bcec5&prod&lang=scss&
|
91075
|
+
|
91076
|
+
;// CONCATENATED MODULE: ./packages/scanner/scanner-nko/src/scanner-nko.vue
|
91077
|
+
|
91078
|
+
|
91079
|
+
|
91080
|
+
;
|
91081
|
+
|
91082
|
+
|
91083
|
+
/* normalize component */
|
91084
|
+
|
91085
|
+
var scanner_nko_component = normalizeComponent(
|
91086
|
+
src_scanner_nkovue_type_script_lang_js_,
|
91087
|
+
scanner_nkovue_type_template_id_304bcec5_render,
|
91088
|
+
scanner_nkovue_type_template_id_304bcec5_staticRenderFns,
|
91089
|
+
false,
|
91090
|
+
null,
|
91091
|
+
null,
|
91092
|
+
null
|
91093
|
+
|
91094
|
+
)
|
91095
|
+
|
91096
|
+
/* harmony default export */ var scanner_nko = (scanner_nko_component.exports);
|
91097
|
+
;// CONCATENATED MODULE: ./packages/scanner/scanner-nko/index.js
|
91098
|
+
/**
|
91099
|
+
* @author: shenyz
|
91100
|
+
* @date: 2025-02-24
|
91101
|
+
* @description:index 赞彩五合一设备扫描功能
|
91102
|
+
*/
|
91103
|
+
|
91104
|
+
scanner_nko.install = Vue => {
|
91105
|
+
Vue.component(scanner_nko.name, scanner_nko);
|
91106
|
+
};
|
91107
|
+
/* harmony default export */ var scanner_scanner_nko = (scanner_nko);
|
89117
91108
|
;// CONCATENATED MODULE: ./packages/index.js
|
89118
91109
|
|
89119
91110
|
|
@@ -89124,6 +91115,7 @@ id_card_reader_button.install = Vue => {
|
|
89124
91115
|
|
89125
91116
|
|
89126
91117
|
|
91118
|
+
|
89127
91119
|
// import {
|
89128
91120
|
// Button,
|
89129
91121
|
// Tooltip,
|
@@ -89139,7 +91131,7 @@ id_card_reader_button.install = Vue => {
|
|
89139
91131
|
// Dialog
|
89140
91132
|
// ]
|
89141
91133
|
// 组件列表
|
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];
|
91134
|
+
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
91135
|
|
89144
91136
|
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,那么所有的组件都会被注册
|
89145
91137
|
const install = Vue => {
|