unify-external-plugin-platform 0.0.3-3 → 0.0.3-30
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 +2554 -562
- package/dist/external-plugin.css +1 -1
- package/dist/external-plugin.umd.js +2554 -562
- package/dist/external-plugin.umd.min.js +3 -3
- package/package.json +2 -1
@@ -2842,6 +2842,37 @@ module.exports = function (argument) {
|
|
2842
2842
|
};
|
2843
2843
|
|
2844
2844
|
|
2845
|
+
/***/ }),
|
2846
|
+
|
2847
|
+
/***/ 6077:
|
2848
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
2849
|
+
|
2850
|
+
var isCallable = __webpack_require__(614);
|
2851
|
+
|
2852
|
+
var $String = String;
|
2853
|
+
var $TypeError = TypeError;
|
2854
|
+
|
2855
|
+
module.exports = function (argument) {
|
2856
|
+
if (typeof argument == 'object' || isCallable(argument)) return argument;
|
2857
|
+
throw $TypeError("Can't set " + $String(argument) + ' as a prototype');
|
2858
|
+
};
|
2859
|
+
|
2860
|
+
|
2861
|
+
/***/ }),
|
2862
|
+
|
2863
|
+
/***/ 5787:
|
2864
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
2865
|
+
|
2866
|
+
var isPrototypeOf = __webpack_require__(7976);
|
2867
|
+
|
2868
|
+
var $TypeError = TypeError;
|
2869
|
+
|
2870
|
+
module.exports = function (it, Prototype) {
|
2871
|
+
if (isPrototypeOf(Prototype, it)) return it;
|
2872
|
+
throw $TypeError('Incorrect invocation');
|
2873
|
+
};
|
2874
|
+
|
2875
|
+
|
2845
2876
|
/***/ }),
|
2846
2877
|
|
2847
2878
|
/***/ 9670:
|
@@ -2948,6 +2979,42 @@ module.exports = function (it) {
|
|
2948
2979
|
};
|
2949
2980
|
|
2950
2981
|
|
2982
|
+
/***/ }),
|
2983
|
+
|
2984
|
+
/***/ 648:
|
2985
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
2986
|
+
|
2987
|
+
var TO_STRING_TAG_SUPPORT = __webpack_require__(1694);
|
2988
|
+
var isCallable = __webpack_require__(614);
|
2989
|
+
var classofRaw = __webpack_require__(4326);
|
2990
|
+
var wellKnownSymbol = __webpack_require__(5112);
|
2991
|
+
|
2992
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
2993
|
+
var $Object = Object;
|
2994
|
+
|
2995
|
+
// ES3 wrong here
|
2996
|
+
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
2997
|
+
|
2998
|
+
// fallback for IE11 Script Access Denied error
|
2999
|
+
var tryGet = function (it, key) {
|
3000
|
+
try {
|
3001
|
+
return it[key];
|
3002
|
+
} catch (error) { /* empty */ }
|
3003
|
+
};
|
3004
|
+
|
3005
|
+
// getting tag from ES6+ `Object.prototype.toString`
|
3006
|
+
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
3007
|
+
var O, tag, result;
|
3008
|
+
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
3009
|
+
// @@toStringTag case
|
3010
|
+
: typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
|
3011
|
+
// builtinTag case
|
3012
|
+
: CORRECT_ARGUMENTS ? classofRaw(O)
|
3013
|
+
// ES3 arguments fallback
|
3014
|
+
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
3015
|
+
};
|
3016
|
+
|
3017
|
+
|
2951
3018
|
/***/ }),
|
2952
3019
|
|
2953
3020
|
/***/ 9920:
|
@@ -3118,6 +3185,40 @@ module.exports = function (it) {
|
|
3118
3185
|
};
|
3119
3186
|
|
3120
3187
|
|
3188
|
+
/***/ }),
|
3189
|
+
|
3190
|
+
/***/ 3678:
|
3191
|
+
/***/ (function(module) {
|
3192
|
+
|
3193
|
+
module.exports = {
|
3194
|
+
IndexSizeError: { s: 'INDEX_SIZE_ERR', c: 1, m: 1 },
|
3195
|
+
DOMStringSizeError: { s: 'DOMSTRING_SIZE_ERR', c: 2, m: 0 },
|
3196
|
+
HierarchyRequestError: { s: 'HIERARCHY_REQUEST_ERR', c: 3, m: 1 },
|
3197
|
+
WrongDocumentError: { s: 'WRONG_DOCUMENT_ERR', c: 4, m: 1 },
|
3198
|
+
InvalidCharacterError: { s: 'INVALID_CHARACTER_ERR', c: 5, m: 1 },
|
3199
|
+
NoDataAllowedError: { s: 'NO_DATA_ALLOWED_ERR', c: 6, m: 0 },
|
3200
|
+
NoModificationAllowedError: { s: 'NO_MODIFICATION_ALLOWED_ERR', c: 7, m: 1 },
|
3201
|
+
NotFoundError: { s: 'NOT_FOUND_ERR', c: 8, m: 1 },
|
3202
|
+
NotSupportedError: { s: 'NOT_SUPPORTED_ERR', c: 9, m: 1 },
|
3203
|
+
InUseAttributeError: { s: 'INUSE_ATTRIBUTE_ERR', c: 10, m: 1 },
|
3204
|
+
InvalidStateError: { s: 'INVALID_STATE_ERR', c: 11, m: 1 },
|
3205
|
+
SyntaxError: { s: 'SYNTAX_ERR', c: 12, m: 1 },
|
3206
|
+
InvalidModificationError: { s: 'INVALID_MODIFICATION_ERR', c: 13, m: 1 },
|
3207
|
+
NamespaceError: { s: 'NAMESPACE_ERR', c: 14, m: 1 },
|
3208
|
+
InvalidAccessError: { s: 'INVALID_ACCESS_ERR', c: 15, m: 1 },
|
3209
|
+
ValidationError: { s: 'VALIDATION_ERR', c: 16, m: 0 },
|
3210
|
+
TypeMismatchError: { s: 'TYPE_MISMATCH_ERR', c: 17, m: 1 },
|
3211
|
+
SecurityError: { s: 'SECURITY_ERR', c: 18, m: 1 },
|
3212
|
+
NetworkError: { s: 'NETWORK_ERR', c: 19, m: 1 },
|
3213
|
+
AbortError: { s: 'ABORT_ERR', c: 20, m: 1 },
|
3214
|
+
URLMismatchError: { s: 'URL_MISMATCH_ERR', c: 21, m: 1 },
|
3215
|
+
QuotaExceededError: { s: 'QUOTA_EXCEEDED_ERR', c: 22, m: 1 },
|
3216
|
+
TimeoutError: { s: 'TIMEOUT_ERR', c: 23, m: 1 },
|
3217
|
+
InvalidNodeTypeError: { s: 'INVALID_NODE_TYPE_ERR', c: 24, m: 1 },
|
3218
|
+
DataCloneError: { s: 'DATA_CLONE_ERR', c: 25, m: 1 }
|
3219
|
+
};
|
3220
|
+
|
3221
|
+
|
3121
3222
|
/***/ }),
|
3122
3223
|
|
3123
3224
|
/***/ 8113:
|
@@ -3179,6 +3280,27 @@ module.exports = [
|
|
3179
3280
|
];
|
3180
3281
|
|
3181
3282
|
|
3283
|
+
/***/ }),
|
3284
|
+
|
3285
|
+
/***/ 1060:
|
3286
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
3287
|
+
|
3288
|
+
var uncurryThis = __webpack_require__(1702);
|
3289
|
+
|
3290
|
+
var $Error = Error;
|
3291
|
+
var replace = uncurryThis(''.replace);
|
3292
|
+
|
3293
|
+
var TEST = (function (arg) { return String($Error(arg).stack); })('zxcasd');
|
3294
|
+
var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
|
3295
|
+
var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
|
3296
|
+
|
3297
|
+
module.exports = function (stack, dropEntries) {
|
3298
|
+
if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
|
3299
|
+
while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
|
3300
|
+
} return stack;
|
3301
|
+
};
|
3302
|
+
|
3303
|
+
|
3182
3304
|
/***/ }),
|
3183
3305
|
|
3184
3306
|
/***/ 2109:
|
@@ -3445,6 +3567,31 @@ module.exports = fails(function () {
|
|
3445
3567
|
} : $Object;
|
3446
3568
|
|
3447
3569
|
|
3570
|
+
/***/ }),
|
3571
|
+
|
3572
|
+
/***/ 9587:
|
3573
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
3574
|
+
|
3575
|
+
var isCallable = __webpack_require__(614);
|
3576
|
+
var isObject = __webpack_require__(111);
|
3577
|
+
var setPrototypeOf = __webpack_require__(7674);
|
3578
|
+
|
3579
|
+
// makes subclassing work correct for wrapped built-ins
|
3580
|
+
module.exports = function ($this, dummy, Wrapper) {
|
3581
|
+
var NewTarget, NewTargetPrototype;
|
3582
|
+
if (
|
3583
|
+
// it can work only with native `setPrototypeOf`
|
3584
|
+
setPrototypeOf &&
|
3585
|
+
// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
|
3586
|
+
isCallable(NewTarget = dummy.constructor) &&
|
3587
|
+
NewTarget !== Wrapper &&
|
3588
|
+
isObject(NewTargetPrototype = NewTarget.prototype) &&
|
3589
|
+
NewTargetPrototype !== Wrapper.prototype
|
3590
|
+
) setPrototypeOf($this, NewTargetPrototype);
|
3591
|
+
return $this;
|
3592
|
+
};
|
3593
|
+
|
3594
|
+
|
3448
3595
|
/***/ }),
|
3449
3596
|
|
3450
3597
|
/***/ 2788:
|
@@ -3749,6 +3896,18 @@ module.exports = Math.trunc || function trunc(x) {
|
|
3749
3896
|
};
|
3750
3897
|
|
3751
3898
|
|
3899
|
+
/***/ }),
|
3900
|
+
|
3901
|
+
/***/ 6277:
|
3902
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
3903
|
+
|
3904
|
+
var toString = __webpack_require__(1340);
|
3905
|
+
|
3906
|
+
module.exports = function (argument, $default) {
|
3907
|
+
return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);
|
3908
|
+
};
|
3909
|
+
|
3910
|
+
|
3752
3911
|
/***/ }),
|
3753
3912
|
|
3754
3913
|
/***/ 3070:
|
@@ -3914,6 +4073,40 @@ exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
3914
4073
|
} : $propertyIsEnumerable;
|
3915
4074
|
|
3916
4075
|
|
4076
|
+
/***/ }),
|
4077
|
+
|
4078
|
+
/***/ 7674:
|
4079
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
4080
|
+
|
4081
|
+
/* eslint-disable no-proto -- safe */
|
4082
|
+
var uncurryThis = __webpack_require__(1702);
|
4083
|
+
var anObject = __webpack_require__(9670);
|
4084
|
+
var aPossiblePrototype = __webpack_require__(6077);
|
4085
|
+
|
4086
|
+
// `Object.setPrototypeOf` method
|
4087
|
+
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
4088
|
+
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
4089
|
+
// eslint-disable-next-line es/no-object-setprototypeof -- safe
|
4090
|
+
module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
4091
|
+
var CORRECT_SETTER = false;
|
4092
|
+
var test = {};
|
4093
|
+
var setter;
|
4094
|
+
try {
|
4095
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
4096
|
+
setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
4097
|
+
setter(test, []);
|
4098
|
+
CORRECT_SETTER = test instanceof Array;
|
4099
|
+
} catch (error) { /* empty */ }
|
4100
|
+
return function setPrototypeOf(O, proto) {
|
4101
|
+
anObject(O);
|
4102
|
+
aPossiblePrototype(proto);
|
4103
|
+
if (CORRECT_SETTER) setter(O, proto);
|
4104
|
+
else O.__proto__ = proto;
|
4105
|
+
return O;
|
4106
|
+
};
|
4107
|
+
}() : undefined);
|
4108
|
+
|
4109
|
+
|
3917
4110
|
/***/ }),
|
3918
4111
|
|
3919
4112
|
/***/ 2140:
|
@@ -4171,6 +4364,36 @@ module.exports = function (argument) {
|
|
4171
4364
|
};
|
4172
4365
|
|
4173
4366
|
|
4367
|
+
/***/ }),
|
4368
|
+
|
4369
|
+
/***/ 1694:
|
4370
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
4371
|
+
|
4372
|
+
var wellKnownSymbol = __webpack_require__(5112);
|
4373
|
+
|
4374
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
4375
|
+
var test = {};
|
4376
|
+
|
4377
|
+
test[TO_STRING_TAG] = 'z';
|
4378
|
+
|
4379
|
+
module.exports = String(test) === '[object z]';
|
4380
|
+
|
4381
|
+
|
4382
|
+
/***/ }),
|
4383
|
+
|
4384
|
+
/***/ 1340:
|
4385
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
4386
|
+
|
4387
|
+
var classof = __webpack_require__(648);
|
4388
|
+
|
4389
|
+
var $String = String;
|
4390
|
+
|
4391
|
+
module.exports = function (argument) {
|
4392
|
+
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
4393
|
+
return $String(argument);
|
4394
|
+
};
|
4395
|
+
|
4396
|
+
|
4174
4397
|
/***/ }),
|
4175
4398
|
|
4176
4399
|
/***/ 6330:
|
@@ -4329,274 +4552,350 @@ $({ target: 'Array', proto: true, arity: 1, forced: INCORRECT_TO_LENGTH || SILEN
|
|
4329
4552
|
|
4330
4553
|
/***/ }),
|
4331
4554
|
|
4332
|
-
/***/
|
4333
|
-
/***/ (function(
|
4334
|
-
|
4335
|
-
module.exports =
|
4336
|
-
/******/ (function(modules) { // webpackBootstrap
|
4337
|
-
/******/ // The module cache
|
4338
|
-
/******/ var installedModules = {};
|
4339
|
-
/******/
|
4340
|
-
/******/ // The require function
|
4341
|
-
/******/ function __nested_webpack_require_187__(moduleId) {
|
4342
|
-
/******/
|
4343
|
-
/******/ // Check if module is in cache
|
4344
|
-
/******/ if(installedModules[moduleId]) {
|
4345
|
-
/******/ return installedModules[moduleId].exports;
|
4346
|
-
/******/ }
|
4347
|
-
/******/ // Create a new module (and put it into the cache)
|
4348
|
-
/******/ var module = installedModules[moduleId] = {
|
4349
|
-
/******/ i: moduleId,
|
4350
|
-
/******/ l: false,
|
4351
|
-
/******/ exports: {}
|
4352
|
-
/******/ };
|
4353
|
-
/******/
|
4354
|
-
/******/ // Execute the module function
|
4355
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_187__);
|
4356
|
-
/******/
|
4357
|
-
/******/ // Flag the module as loaded
|
4358
|
-
/******/ module.l = true;
|
4359
|
-
/******/
|
4360
|
-
/******/ // Return the exports of the module
|
4361
|
-
/******/ return module.exports;
|
4362
|
-
/******/ }
|
4363
|
-
/******/
|
4364
|
-
/******/
|
4365
|
-
/******/ // expose the modules object (__webpack_modules__)
|
4366
|
-
/******/ __nested_webpack_require_187__.m = modules;
|
4367
|
-
/******/
|
4368
|
-
/******/ // expose the module cache
|
4369
|
-
/******/ __nested_webpack_require_187__.c = installedModules;
|
4370
|
-
/******/
|
4371
|
-
/******/ // define getter function for harmony exports
|
4372
|
-
/******/ __nested_webpack_require_187__.d = function(exports, name, getter) {
|
4373
|
-
/******/ if(!__nested_webpack_require_187__.o(exports, name)) {
|
4374
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
4375
|
-
/******/ }
|
4376
|
-
/******/ };
|
4377
|
-
/******/
|
4378
|
-
/******/ // define __esModule on exports
|
4379
|
-
/******/ __nested_webpack_require_187__.r = function(exports) {
|
4380
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
4381
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
4382
|
-
/******/ }
|
4383
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
4384
|
-
/******/ };
|
4385
|
-
/******/
|
4386
|
-
/******/ // create a fake namespace object
|
4387
|
-
/******/ // mode & 1: value is a module id, require it
|
4388
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
4389
|
-
/******/ // mode & 4: return value when already ns object
|
4390
|
-
/******/ // mode & 8|1: behave like require
|
4391
|
-
/******/ __nested_webpack_require_187__.t = function(value, mode) {
|
4392
|
-
/******/ if(mode & 1) value = __nested_webpack_require_187__(value);
|
4393
|
-
/******/ if(mode & 8) return value;
|
4394
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
4395
|
-
/******/ var ns = Object.create(null);
|
4396
|
-
/******/ __nested_webpack_require_187__.r(ns);
|
4397
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
4398
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __nested_webpack_require_187__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
4399
|
-
/******/ return ns;
|
4400
|
-
/******/ };
|
4401
|
-
/******/
|
4402
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
4403
|
-
/******/ __nested_webpack_require_187__.n = function(module) {
|
4404
|
-
/******/ var getter = module && module.__esModule ?
|
4405
|
-
/******/ function getDefault() { return module['default']; } :
|
4406
|
-
/******/ function getModuleExports() { return module; };
|
4407
|
-
/******/ __nested_webpack_require_187__.d(getter, 'a', getter);
|
4408
|
-
/******/ return getter;
|
4409
|
-
/******/ };
|
4410
|
-
/******/
|
4411
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
4412
|
-
/******/ __nested_webpack_require_187__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
4413
|
-
/******/
|
4414
|
-
/******/ // __webpack_public_path__
|
4415
|
-
/******/ __nested_webpack_require_187__.p = "/dist/";
|
4416
|
-
/******/
|
4417
|
-
/******/
|
4418
|
-
/******/ // Load entry module and return exports
|
4419
|
-
/******/ return __nested_webpack_require_187__(__nested_webpack_require_187__.s = 97);
|
4420
|
-
/******/ })
|
4421
|
-
/************************************************************************/
|
4422
|
-
/******/ ({
|
4423
|
-
|
4424
|
-
/***/ 0:
|
4425
|
-
/***/ (function(module, __webpack_exports__, __nested_webpack_require_3672__) {
|
4555
|
+
/***/ 2801:
|
4556
|
+
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
4426
4557
|
|
4427
4558
|
"use strict";
|
4428
|
-
/* harmony export (binding) */ __nested_webpack_require_3672__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
4429
|
-
/* globals __VUE_SSR_CONTEXT__ */
|
4430
|
-
|
4431
|
-
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
4432
|
-
// This module is a runtime utility for cleaner component module output and will
|
4433
|
-
// be included in the final webpack user bundle.
|
4434
|
-
|
4435
|
-
function normalizeComponent (
|
4436
|
-
scriptExports,
|
4437
|
-
render,
|
4438
|
-
staticRenderFns,
|
4439
|
-
functionalTemplate,
|
4440
|
-
injectStyles,
|
4441
|
-
scopeId,
|
4442
|
-
moduleIdentifier, /* server only */
|
4443
|
-
shadowMode /* vue-cli only */
|
4444
|
-
) {
|
4445
|
-
// Vue.extend constructor export interop
|
4446
|
-
var options = typeof scriptExports === 'function'
|
4447
|
-
? scriptExports.options
|
4448
|
-
: scriptExports
|
4449
|
-
|
4450
|
-
// render functions
|
4451
|
-
if (render) {
|
4452
|
-
options.render = render
|
4453
|
-
options.staticRenderFns = staticRenderFns
|
4454
|
-
options._compiled = true
|
4455
|
-
}
|
4456
|
-
|
4457
|
-
// functional template
|
4458
|
-
if (functionalTemplate) {
|
4459
|
-
options.functional = true
|
4460
|
-
}
|
4461
|
-
|
4462
|
-
// scopedId
|
4463
|
-
if (scopeId) {
|
4464
|
-
options._scopeId = 'data-v-' + scopeId
|
4465
|
-
}
|
4466
|
-
|
4467
|
-
var hook
|
4468
|
-
if (moduleIdentifier) { // server build
|
4469
|
-
hook = function (context) {
|
4470
|
-
// 2.3 injection
|
4471
|
-
context =
|
4472
|
-
context || // cached call
|
4473
|
-
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
4474
|
-
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
4475
|
-
// 2.2 with runInNewContext: true
|
4476
|
-
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
4477
|
-
context = __VUE_SSR_CONTEXT__
|
4478
|
-
}
|
4479
|
-
// inject component styles
|
4480
|
-
if (injectStyles) {
|
4481
|
-
injectStyles.call(this, context)
|
4482
|
-
}
|
4483
|
-
// register component module identifier for async chunk inferrence
|
4484
|
-
if (context && context._registeredComponents) {
|
4485
|
-
context._registeredComponents.add(moduleIdentifier)
|
4486
|
-
}
|
4487
|
-
}
|
4488
|
-
// used by ssr in case component is cached and beforeCreate
|
4489
|
-
// never gets called
|
4490
|
-
options._ssrRegister = hook
|
4491
|
-
} else if (injectStyles) {
|
4492
|
-
hook = shadowMode
|
4493
|
-
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
4494
|
-
: injectStyles
|
4495
|
-
}
|
4496
|
-
|
4497
|
-
if (hook) {
|
4498
|
-
if (options.functional) {
|
4499
|
-
// for template-only hot-reload because in that case the render fn doesn't
|
4500
|
-
// go through the normalizer
|
4501
|
-
options._injectStyles = hook
|
4502
|
-
// register for functioal component in vue file
|
4503
|
-
var originalRender = options.render
|
4504
|
-
options.render = function renderWithStyleInjection (h, context) {
|
4505
|
-
hook.call(context)
|
4506
|
-
return originalRender(h, context)
|
4507
|
-
}
|
4508
|
-
} else {
|
4509
|
-
// inject component registration as beforeCreate hook
|
4510
|
-
var existing = options.beforeCreate
|
4511
|
-
options.beforeCreate = existing
|
4512
|
-
? [].concat(existing, hook)
|
4513
|
-
: [hook]
|
4514
|
-
}
|
4515
|
-
}
|
4516
|
-
|
4517
|
-
return {
|
4518
|
-
exports: scriptExports,
|
4519
|
-
options: options
|
4520
|
-
}
|
4521
|
-
}
|
4522
4559
|
|
4560
|
+
var $ = __webpack_require__(2109);
|
4561
|
+
var global = __webpack_require__(7854);
|
4562
|
+
var getBuiltIn = __webpack_require__(5005);
|
4563
|
+
var createPropertyDescriptor = __webpack_require__(9114);
|
4564
|
+
var defineProperty = (__webpack_require__(3070).f);
|
4565
|
+
var hasOwn = __webpack_require__(2597);
|
4566
|
+
var anInstance = __webpack_require__(5787);
|
4567
|
+
var inheritIfRequired = __webpack_require__(9587);
|
4568
|
+
var normalizeStringArgument = __webpack_require__(6277);
|
4569
|
+
var DOMExceptionConstants = __webpack_require__(3678);
|
4570
|
+
var clearErrorStack = __webpack_require__(1060);
|
4571
|
+
var DESCRIPTORS = __webpack_require__(9781);
|
4572
|
+
var IS_PURE = __webpack_require__(1913);
|
4523
4573
|
|
4524
|
-
|
4574
|
+
var DOM_EXCEPTION = 'DOMException';
|
4575
|
+
var Error = getBuiltIn('Error');
|
4576
|
+
var NativeDOMException = getBuiltIn(DOM_EXCEPTION);
|
4577
|
+
|
4578
|
+
var $DOMException = function DOMException() {
|
4579
|
+
anInstance(this, DOMExceptionPrototype);
|
4580
|
+
var argumentsLength = arguments.length;
|
4581
|
+
var message = normalizeStringArgument(argumentsLength < 1 ? undefined : arguments[0]);
|
4582
|
+
var name = normalizeStringArgument(argumentsLength < 2 ? undefined : arguments[1], 'Error');
|
4583
|
+
var that = new NativeDOMException(message, name);
|
4584
|
+
var error = Error(message);
|
4585
|
+
error.name = DOM_EXCEPTION;
|
4586
|
+
defineProperty(that, 'stack', createPropertyDescriptor(1, clearErrorStack(error.stack, 1)));
|
4587
|
+
inheritIfRequired(that, this, $DOMException);
|
4588
|
+
return that;
|
4589
|
+
};
|
4525
4590
|
|
4526
|
-
|
4527
|
-
/***/ (function(module, __webpack_exports__, __nested_webpack_require_6575__) {
|
4591
|
+
var DOMExceptionPrototype = $DOMException.prototype = NativeDOMException.prototype;
|
4528
4592
|
|
4529
|
-
|
4530
|
-
|
4593
|
+
var ERROR_HAS_STACK = 'stack' in Error(DOM_EXCEPTION);
|
4594
|
+
var DOM_EXCEPTION_HAS_STACK = 'stack' in new NativeDOMException(1, 2);
|
4531
4595
|
|
4532
|
-
//
|
4533
|
-
var
|
4534
|
-
var _vm = this
|
4535
|
-
var _h = _vm.$createElement
|
4536
|
-
var _c = _vm._self._c || _h
|
4537
|
-
return _c("div", { staticClass: "el-button-group" }, [_vm._t("default")], 2)
|
4538
|
-
}
|
4539
|
-
var staticRenderFns = []
|
4540
|
-
render._withStripped = true
|
4596
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
4597
|
+
var descriptor = NativeDOMException && DESCRIPTORS && Object.getOwnPropertyDescriptor(global, DOM_EXCEPTION);
|
4541
4598
|
|
4599
|
+
// Bun ~ 0.1.1 DOMException have incorrect descriptor and we can't redefine it
|
4600
|
+
// https://github.com/Jarred-Sumner/bun/issues/399
|
4601
|
+
var BUGGY_DESCRIPTOR = !!descriptor && !(descriptor.writable && descriptor.configurable);
|
4542
4602
|
|
4543
|
-
|
4603
|
+
var FORCED_CONSTRUCTOR = ERROR_HAS_STACK && !BUGGY_DESCRIPTOR && !DOM_EXCEPTION_HAS_STACK;
|
4544
4604
|
|
4545
|
-
//
|
4546
|
-
//
|
4547
|
-
//
|
4548
|
-
|
4549
|
-
//
|
4550
|
-
//
|
4551
|
-
|
4552
|
-
/* harmony default export */ var button_groupvue_type_script_lang_js_ = ({
|
4553
|
-
name: 'ElButtonGroup'
|
4605
|
+
// `DOMException` constructor patch for `.stack` where it's required
|
4606
|
+
// https://webidl.spec.whatwg.org/#es-DOMException-specialness
|
4607
|
+
$({ global: true, constructor: true, forced: IS_PURE || FORCED_CONSTRUCTOR }, { // TODO: fix export logic
|
4608
|
+
DOMException: FORCED_CONSTRUCTOR ? $DOMException : NativeDOMException
|
4554
4609
|
});
|
4555
|
-
// CONCATENATED MODULE: ./packages/button/src/button-group.vue?vue&type=script&lang=js&
|
4556
|
-
/* harmony default export */ var src_button_groupvue_type_script_lang_js_ = (button_groupvue_type_script_lang_js_);
|
4557
|
-
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
4558
|
-
var componentNormalizer = __nested_webpack_require_6575__(0);
|
4559
|
-
|
4560
|
-
// CONCATENATED MODULE: ./packages/button/src/button-group.vue
|
4561
|
-
|
4562
|
-
|
4563
|
-
|
4564
|
-
|
4565
|
-
|
4566
|
-
/* normalize component */
|
4567
|
-
|
4568
|
-
var component = Object(componentNormalizer["a" /* default */])(
|
4569
|
-
src_button_groupvue_type_script_lang_js_,
|
4570
|
-
render,
|
4571
|
-
staticRenderFns,
|
4572
|
-
false,
|
4573
|
-
null,
|
4574
|
-
null,
|
4575
|
-
null
|
4576
|
-
|
4577
|
-
)
|
4578
|
-
|
4579
|
-
/* hot reload */
|
4580
|
-
if (false) { var api; }
|
4581
|
-
component.options.__file = "packages/button/src/button-group.vue"
|
4582
|
-
/* harmony default export */ var button_group = (component.exports);
|
4583
|
-
// CONCATENATED MODULE: ./packages/button-group/index.js
|
4584
4610
|
|
4611
|
+
var PolyfilledDOMException = getBuiltIn(DOM_EXCEPTION);
|
4612
|
+
var PolyfilledDOMExceptionPrototype = PolyfilledDOMException.prototype;
|
4585
4613
|
|
4586
|
-
|
4587
|
-
|
4588
|
-
|
4589
|
-
}
|
4590
|
-
|
4591
|
-
/* harmony default export */ var packages_button_group = __webpack_exports__["default"] = (button_group);
|
4614
|
+
if (PolyfilledDOMExceptionPrototype.constructor !== PolyfilledDOMException) {
|
4615
|
+
if (!IS_PURE) {
|
4616
|
+
defineProperty(PolyfilledDOMExceptionPrototype, 'constructor', createPropertyDescriptor(1, PolyfilledDOMException));
|
4617
|
+
}
|
4592
4618
|
|
4593
|
-
|
4619
|
+
for (var key in DOMExceptionConstants) if (hasOwn(DOMExceptionConstants, key)) {
|
4620
|
+
var constant = DOMExceptionConstants[key];
|
4621
|
+
var constantName = constant.s;
|
4622
|
+
if (!hasOwn(PolyfilledDOMException, constantName)) {
|
4623
|
+
defineProperty(PolyfilledDOMException, constantName, createPropertyDescriptor(6, constant.c));
|
4624
|
+
}
|
4625
|
+
}
|
4626
|
+
}
|
4594
4627
|
|
4595
|
-
/******/ });
|
4596
4628
|
|
4597
4629
|
/***/ }),
|
4598
4630
|
|
4599
|
-
/***/
|
4631
|
+
/***/ 7563:
|
4632
|
+
/***/ (function(module) {
|
4633
|
+
|
4634
|
+
module.exports =
|
4635
|
+
/******/ (function(modules) { // webpackBootstrap
|
4636
|
+
/******/ // The module cache
|
4637
|
+
/******/ var installedModules = {};
|
4638
|
+
/******/
|
4639
|
+
/******/ // The require function
|
4640
|
+
/******/ function __nested_webpack_require_187__(moduleId) {
|
4641
|
+
/******/
|
4642
|
+
/******/ // Check if module is in cache
|
4643
|
+
/******/ if(installedModules[moduleId]) {
|
4644
|
+
/******/ return installedModules[moduleId].exports;
|
4645
|
+
/******/ }
|
4646
|
+
/******/ // Create a new module (and put it into the cache)
|
4647
|
+
/******/ var module = installedModules[moduleId] = {
|
4648
|
+
/******/ i: moduleId,
|
4649
|
+
/******/ l: false,
|
4650
|
+
/******/ exports: {}
|
4651
|
+
/******/ };
|
4652
|
+
/******/
|
4653
|
+
/******/ // Execute the module function
|
4654
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_187__);
|
4655
|
+
/******/
|
4656
|
+
/******/ // Flag the module as loaded
|
4657
|
+
/******/ module.l = true;
|
4658
|
+
/******/
|
4659
|
+
/******/ // Return the exports of the module
|
4660
|
+
/******/ return module.exports;
|
4661
|
+
/******/ }
|
4662
|
+
/******/
|
4663
|
+
/******/
|
4664
|
+
/******/ // expose the modules object (__webpack_modules__)
|
4665
|
+
/******/ __nested_webpack_require_187__.m = modules;
|
4666
|
+
/******/
|
4667
|
+
/******/ // expose the module cache
|
4668
|
+
/******/ __nested_webpack_require_187__.c = installedModules;
|
4669
|
+
/******/
|
4670
|
+
/******/ // define getter function for harmony exports
|
4671
|
+
/******/ __nested_webpack_require_187__.d = function(exports, name, getter) {
|
4672
|
+
/******/ if(!__nested_webpack_require_187__.o(exports, name)) {
|
4673
|
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
4674
|
+
/******/ }
|
4675
|
+
/******/ };
|
4676
|
+
/******/
|
4677
|
+
/******/ // define __esModule on exports
|
4678
|
+
/******/ __nested_webpack_require_187__.r = function(exports) {
|
4679
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
4680
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
4681
|
+
/******/ }
|
4682
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
4683
|
+
/******/ };
|
4684
|
+
/******/
|
4685
|
+
/******/ // create a fake namespace object
|
4686
|
+
/******/ // mode & 1: value is a module id, require it
|
4687
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
4688
|
+
/******/ // mode & 4: return value when already ns object
|
4689
|
+
/******/ // mode & 8|1: behave like require
|
4690
|
+
/******/ __nested_webpack_require_187__.t = function(value, mode) {
|
4691
|
+
/******/ if(mode & 1) value = __nested_webpack_require_187__(value);
|
4692
|
+
/******/ if(mode & 8) return value;
|
4693
|
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
4694
|
+
/******/ var ns = Object.create(null);
|
4695
|
+
/******/ __nested_webpack_require_187__.r(ns);
|
4696
|
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
4697
|
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __nested_webpack_require_187__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
4698
|
+
/******/ return ns;
|
4699
|
+
/******/ };
|
4700
|
+
/******/
|
4701
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
4702
|
+
/******/ __nested_webpack_require_187__.n = function(module) {
|
4703
|
+
/******/ var getter = module && module.__esModule ?
|
4704
|
+
/******/ function getDefault() { return module['default']; } :
|
4705
|
+
/******/ function getModuleExports() { return module; };
|
4706
|
+
/******/ __nested_webpack_require_187__.d(getter, 'a', getter);
|
4707
|
+
/******/ return getter;
|
4708
|
+
/******/ };
|
4709
|
+
/******/
|
4710
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
4711
|
+
/******/ __nested_webpack_require_187__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
4712
|
+
/******/
|
4713
|
+
/******/ // __webpack_public_path__
|
4714
|
+
/******/ __nested_webpack_require_187__.p = "/dist/";
|
4715
|
+
/******/
|
4716
|
+
/******/
|
4717
|
+
/******/ // Load entry module and return exports
|
4718
|
+
/******/ return __nested_webpack_require_187__(__nested_webpack_require_187__.s = 97);
|
4719
|
+
/******/ })
|
4720
|
+
/************************************************************************/
|
4721
|
+
/******/ ({
|
4722
|
+
|
4723
|
+
/***/ 0:
|
4724
|
+
/***/ (function(module, __webpack_exports__, __nested_webpack_require_3672__) {
|
4725
|
+
|
4726
|
+
"use strict";
|
4727
|
+
/* harmony export (binding) */ __nested_webpack_require_3672__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
4728
|
+
/* globals __VUE_SSR_CONTEXT__ */
|
4729
|
+
|
4730
|
+
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
4731
|
+
// This module is a runtime utility for cleaner component module output and will
|
4732
|
+
// be included in the final webpack user bundle.
|
4733
|
+
|
4734
|
+
function normalizeComponent (
|
4735
|
+
scriptExports,
|
4736
|
+
render,
|
4737
|
+
staticRenderFns,
|
4738
|
+
functionalTemplate,
|
4739
|
+
injectStyles,
|
4740
|
+
scopeId,
|
4741
|
+
moduleIdentifier, /* server only */
|
4742
|
+
shadowMode /* vue-cli only */
|
4743
|
+
) {
|
4744
|
+
// Vue.extend constructor export interop
|
4745
|
+
var options = typeof scriptExports === 'function'
|
4746
|
+
? scriptExports.options
|
4747
|
+
: scriptExports
|
4748
|
+
|
4749
|
+
// render functions
|
4750
|
+
if (render) {
|
4751
|
+
options.render = render
|
4752
|
+
options.staticRenderFns = staticRenderFns
|
4753
|
+
options._compiled = true
|
4754
|
+
}
|
4755
|
+
|
4756
|
+
// functional template
|
4757
|
+
if (functionalTemplate) {
|
4758
|
+
options.functional = true
|
4759
|
+
}
|
4760
|
+
|
4761
|
+
// scopedId
|
4762
|
+
if (scopeId) {
|
4763
|
+
options._scopeId = 'data-v-' + scopeId
|
4764
|
+
}
|
4765
|
+
|
4766
|
+
var hook
|
4767
|
+
if (moduleIdentifier) { // server build
|
4768
|
+
hook = function (context) {
|
4769
|
+
// 2.3 injection
|
4770
|
+
context =
|
4771
|
+
context || // cached call
|
4772
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
4773
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
4774
|
+
// 2.2 with runInNewContext: true
|
4775
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
4776
|
+
context = __VUE_SSR_CONTEXT__
|
4777
|
+
}
|
4778
|
+
// inject component styles
|
4779
|
+
if (injectStyles) {
|
4780
|
+
injectStyles.call(this, context)
|
4781
|
+
}
|
4782
|
+
// register component module identifier for async chunk inferrence
|
4783
|
+
if (context && context._registeredComponents) {
|
4784
|
+
context._registeredComponents.add(moduleIdentifier)
|
4785
|
+
}
|
4786
|
+
}
|
4787
|
+
// used by ssr in case component is cached and beforeCreate
|
4788
|
+
// never gets called
|
4789
|
+
options._ssrRegister = hook
|
4790
|
+
} else if (injectStyles) {
|
4791
|
+
hook = shadowMode
|
4792
|
+
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
|
4793
|
+
: injectStyles
|
4794
|
+
}
|
4795
|
+
|
4796
|
+
if (hook) {
|
4797
|
+
if (options.functional) {
|
4798
|
+
// for template-only hot-reload because in that case the render fn doesn't
|
4799
|
+
// go through the normalizer
|
4800
|
+
options._injectStyles = hook
|
4801
|
+
// register for functioal component in vue file
|
4802
|
+
var originalRender = options.render
|
4803
|
+
options.render = function renderWithStyleInjection (h, context) {
|
4804
|
+
hook.call(context)
|
4805
|
+
return originalRender(h, context)
|
4806
|
+
}
|
4807
|
+
} else {
|
4808
|
+
// inject component registration as beforeCreate hook
|
4809
|
+
var existing = options.beforeCreate
|
4810
|
+
options.beforeCreate = existing
|
4811
|
+
? [].concat(existing, hook)
|
4812
|
+
: [hook]
|
4813
|
+
}
|
4814
|
+
}
|
4815
|
+
|
4816
|
+
return {
|
4817
|
+
exports: scriptExports,
|
4818
|
+
options: options
|
4819
|
+
}
|
4820
|
+
}
|
4821
|
+
|
4822
|
+
|
4823
|
+
/***/ }),
|
4824
|
+
|
4825
|
+
/***/ 97:
|
4826
|
+
/***/ (function(module, __webpack_exports__, __nested_webpack_require_6575__) {
|
4827
|
+
|
4828
|
+
"use strict";
|
4829
|
+
__nested_webpack_require_6575__.r(__webpack_exports__);
|
4830
|
+
|
4831
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button-group.vue?vue&type=template&id=3d8661d0&
|
4832
|
+
var render = function() {
|
4833
|
+
var _vm = this
|
4834
|
+
var _h = _vm.$createElement
|
4835
|
+
var _c = _vm._self._c || _h
|
4836
|
+
return _c("div", { staticClass: "el-button-group" }, [_vm._t("default")], 2)
|
4837
|
+
}
|
4838
|
+
var staticRenderFns = []
|
4839
|
+
render._withStripped = true
|
4840
|
+
|
4841
|
+
|
4842
|
+
// CONCATENATED MODULE: ./packages/button/src/button-group.vue?vue&type=template&id=3d8661d0&
|
4843
|
+
|
4844
|
+
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button-group.vue?vue&type=script&lang=js&
|
4845
|
+
//
|
4846
|
+
//
|
4847
|
+
//
|
4848
|
+
//
|
4849
|
+
//
|
4850
|
+
|
4851
|
+
/* harmony default export */ var button_groupvue_type_script_lang_js_ = ({
|
4852
|
+
name: 'ElButtonGroup'
|
4853
|
+
});
|
4854
|
+
// CONCATENATED MODULE: ./packages/button/src/button-group.vue?vue&type=script&lang=js&
|
4855
|
+
/* harmony default export */ var src_button_groupvue_type_script_lang_js_ = (button_groupvue_type_script_lang_js_);
|
4856
|
+
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
4857
|
+
var componentNormalizer = __nested_webpack_require_6575__(0);
|
4858
|
+
|
4859
|
+
// CONCATENATED MODULE: ./packages/button/src/button-group.vue
|
4860
|
+
|
4861
|
+
|
4862
|
+
|
4863
|
+
|
4864
|
+
|
4865
|
+
/* normalize component */
|
4866
|
+
|
4867
|
+
var component = Object(componentNormalizer["a" /* default */])(
|
4868
|
+
src_button_groupvue_type_script_lang_js_,
|
4869
|
+
render,
|
4870
|
+
staticRenderFns,
|
4871
|
+
false,
|
4872
|
+
null,
|
4873
|
+
null,
|
4874
|
+
null
|
4875
|
+
|
4876
|
+
)
|
4877
|
+
|
4878
|
+
/* hot reload */
|
4879
|
+
if (false) { var api; }
|
4880
|
+
component.options.__file = "packages/button/src/button-group.vue"
|
4881
|
+
/* harmony default export */ var button_group = (component.exports);
|
4882
|
+
// CONCATENATED MODULE: ./packages/button-group/index.js
|
4883
|
+
|
4884
|
+
|
4885
|
+
/* istanbul ignore next */
|
4886
|
+
button_group.install = function (Vue) {
|
4887
|
+
Vue.component(button_group.name, button_group);
|
4888
|
+
};
|
4889
|
+
|
4890
|
+
/* harmony default export */ var packages_button_group = __webpack_exports__["default"] = (button_group);
|
4891
|
+
|
4892
|
+
/***/ })
|
4893
|
+
|
4894
|
+
/******/ });
|
4895
|
+
|
4896
|
+
/***/ }),
|
4897
|
+
|
4898
|
+
/***/ 6426:
|
4600
4899
|
/***/ (function(module) {
|
4601
4900
|
|
4602
4901
|
module.exports =
|
@@ -84029,8 +84328,8 @@ var scanner_cameravue_type_template_id_00e9072f_scoped_true_render = function re
|
|
84029
84328
|
};
|
84030
84329
|
var scanner_cameravue_type_template_id_00e9072f_scoped_true_staticRenderFns = [];
|
84031
84330
|
|
84032
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=template&id=
|
84033
|
-
var
|
84331
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=template&id=08878ca4&scoped=true&
|
84332
|
+
var scanner_camera_componentvue_type_template_id_08878ca4_scoped_true_render = function render() {
|
84034
84333
|
var _vm = this,
|
84035
84334
|
_c = _vm._self._c;
|
84036
84335
|
return _c('div', {
|
@@ -84094,7 +84393,7 @@ var scanner_camera_componentvue_type_template_id_755a80de_scoped_true_render = f
|
|
84094
84393
|
}, [_vm._v(_vm._s(item.label))]) : _vm._e()];
|
84095
84394
|
}), _vm._t("action")]], 2)])]);
|
84096
84395
|
};
|
84097
|
-
var
|
84396
|
+
var scanner_camera_componentvue_type_template_id_08878ca4_scoped_true_staticRenderFns = [];
|
84098
84397
|
|
84099
84398
|
;// CONCATENATED MODULE: ./packages/utils/custom-axios.ts
|
84100
84399
|
/**
|
@@ -84103,7 +84402,7 @@ var scanner_camera_componentvue_type_template_id_755a80de_scoped_true_staticRend
|
|
84103
84402
|
* @description:custom-axios
|
84104
84403
|
*/
|
84105
84404
|
class custom_axios_CustomAxios {
|
84106
|
-
static startConnect(method, url, data = {}) {
|
84405
|
+
static startConnect(method, url, data = {}, header = {}) {
|
84107
84406
|
return new Promise((resolve, reject) => {
|
84108
84407
|
let xhr = new XMLHttpRequest();
|
84109
84408
|
method = method.toUpperCase();
|
@@ -84119,6 +84418,11 @@ class custom_axios_CustomAxios {
|
|
84119
84418
|
}
|
84120
84419
|
xhr.open(method, url, true);
|
84121
84420
|
xhr.setRequestHeader('Accept', 'application/json');
|
84421
|
+
if (header) {
|
84422
|
+
Object.keys(header).forEach(key => {
|
84423
|
+
xhr.setRequestHeader(key, header[key]);
|
84424
|
+
});
|
84425
|
+
}
|
84122
84426
|
if (method === 'GET') {
|
84123
84427
|
xhr.send();
|
84124
84428
|
} else {
|
@@ -84142,12 +84446,12 @@ class custom_axios_CustomAxios {
|
|
84142
84446
|
};
|
84143
84447
|
});
|
84144
84448
|
}
|
84145
|
-
static async get(url) {
|
84146
|
-
let res = await custom_axios_CustomAxios.startConnect('GET', url);
|
84449
|
+
static async get(url, header = {}) {
|
84450
|
+
let res = await custom_axios_CustomAxios.startConnect('GET', url, {}, header);
|
84147
84451
|
return res;
|
84148
84452
|
}
|
84149
|
-
static async post(url, data) {
|
84150
|
-
let res = await custom_axios_CustomAxios.startConnect('POST', url, data);
|
84453
|
+
static async post(url, data, header = {}) {
|
84454
|
+
let res = await custom_axios_CustomAxios.startConnect('POST', url, data, header);
|
84151
84455
|
return res;
|
84152
84456
|
}
|
84153
84457
|
}
|
@@ -84162,6 +84466,10 @@ class custom_axios_CustomAxios {
|
|
84162
84466
|
var eloam_plugin_service_ELoamMethodCode;
|
84163
84467
|
(function (ELoamMethodCode) {
|
84164
84468
|
ELoamMethodCode["ScannerCameraLinuxInit"] = "ScannerCameraLinuxInit";
|
84469
|
+
/** 打开摄像头linux*/
|
84470
|
+
ELoamMethodCode["ScannerCameraLinuxStartPreview"] = "ScannerCameraLinuxStartPreview";
|
84471
|
+
/** 获取视频帧 linux*/
|
84472
|
+
ELoamMethodCode["ScannerCameraLinuxGetFrame"] = "ScannerCameraLinuxGetFrame";
|
84165
84473
|
/** 糾偏 */
|
84166
84474
|
ELoamMethodCode["ScannerCameraDeskew_Base64"] = "ScannerCameraDeskew_Base64";
|
84167
84475
|
/** 合并*/
|
@@ -84174,6 +84482,8 @@ var eloam_plugin_service_ELoamMethodCode;
|
|
84174
84482
|
ELoamMethodCode["ScannerSecondaryCamera_Base64"] = "ScannerSecondaryCamera_Base64";
|
84175
84483
|
/** 读取二代身份证 */
|
84176
84484
|
ELoamMethodCode["ReadIDCard_Base64"] = "ReadIDCard_Base64";
|
84485
|
+
/** 关闭摄像头*/
|
84486
|
+
ELoamMethodCode["StopCamera"] = "stopCamera";
|
84177
84487
|
})(eloam_plugin_service_ELoamMethodCode || (eloam_plugin_service_ELoamMethodCode = {}));
|
84178
84488
|
const eloam_plugin_service_ELoamMethodDesc = {
|
84179
84489
|
[eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64]: '扫描',
|
@@ -84183,11 +84493,19 @@ const eloam_plugin_service_ELoamMethodDesc = {
|
|
84183
84493
|
class eloam_plugin_service_ELoamPassService {
|
84184
84494
|
/** 主摄像头地址 */
|
84185
84495
|
static get mainCameraUrl() {
|
84186
|
-
|
84496
|
+
if (this._isLinux) {
|
84497
|
+
return this.baseLinuxServiceUrl + '/StartPreview?dev_idx=0&res_id=0';
|
84498
|
+
} else {
|
84499
|
+
return this.baseServiceUrl + '/video=stream&camidx=0';
|
84500
|
+
}
|
84187
84501
|
}
|
84188
84502
|
/** 副摄像头地址 */
|
84189
84503
|
static get secondaryCameraUrl() {
|
84190
|
-
|
84504
|
+
if (this._isLinux) {
|
84505
|
+
return this.baseLinuxServiceUrl + '/StartPreview?dev_idx=1&res_id=0';
|
84506
|
+
} else {
|
84507
|
+
return this.baseServiceUrl + '/video=stream&camidx=1';
|
84508
|
+
}
|
84191
84509
|
}
|
84192
84510
|
static async read(method, data) {
|
84193
84511
|
let param = {},
|
@@ -84198,13 +84516,27 @@ class eloam_plugin_service_ELoamPassService {
|
|
84198
84516
|
url = `${this.baseLinuxServiceUrl}/GetAllDisplayInfo`;
|
84199
84517
|
requestType = 'get';
|
84200
84518
|
break;
|
84519
|
+
case eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxStartPreview:
|
84520
|
+
url = `${this.baseLinuxServiceUrl}/StartPreview?dev_idx=${data}&res_id=0`;
|
84521
|
+
requestType = 'get';
|
84522
|
+
break;
|
84523
|
+
case eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxGetFrame:
|
84524
|
+
url = `${this.baseLinuxServiceUrl}/getFrame`;
|
84525
|
+
requestType = 'get';
|
84526
|
+
break;
|
84201
84527
|
case eloam_plugin_service_ELoamMethodCode.ScannerCameraRotate:
|
84202
|
-
|
84203
|
-
|
84204
|
-
|
84205
|
-
|
84206
|
-
}
|
84207
|
-
|
84528
|
+
if (eloam_plugin_service_ELoamPassService._isLinux) {
|
84529
|
+
let count = data / 90;
|
84530
|
+
url = this.baseLinuxServiceUrl + `/Rotate?count=${count}`;
|
84531
|
+
requestType = 'get';
|
84532
|
+
} else {
|
84533
|
+
url = this.baseServiceUrl + '/video=rotate';
|
84534
|
+
param = {
|
84535
|
+
camidx: "0",
|
84536
|
+
rotate: data.toString()
|
84537
|
+
};
|
84538
|
+
requestType = 'post';
|
84539
|
+
}
|
84208
84540
|
break;
|
84209
84541
|
case eloam_plugin_service_ELoamMethodCode.ScannerCameraDeskew_Base64:
|
84210
84542
|
// 纠偏
|
@@ -84241,34 +84573,54 @@ class eloam_plugin_service_ELoamPassService {
|
|
84241
84573
|
}
|
84242
84574
|
break;
|
84243
84575
|
case eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64:
|
84244
|
-
|
84245
|
-
|
84246
|
-
|
84247
|
-
|
84248
|
-
|
84249
|
-
|
84250
|
-
|
84251
|
-
|
84252
|
-
|
84253
|
-
|
84254
|
-
|
84255
|
-
|
84256
|
-
|
84576
|
+
if (this._isLinux) {
|
84577
|
+
url = this.baseLinuxServiceUrl + '/getPic?filepath=/tmp';
|
84578
|
+
requestType = 'get';
|
84579
|
+
} else {
|
84580
|
+
url = this.baseServiceUrl + '/video=grabimage';
|
84581
|
+
param = {
|
84582
|
+
filepath: "base64",
|
84583
|
+
rotate: "0",
|
84584
|
+
deskew: data,
|
84585
|
+
deskewval: "20",
|
84586
|
+
camidx: "0",
|
84587
|
+
ColorMode: "0",
|
84588
|
+
quality: "0",
|
84589
|
+
bIsPrint1to1: "0"
|
84590
|
+
};
|
84591
|
+
requestType = 'post';
|
84592
|
+
}
|
84257
84593
|
break;
|
84258
84594
|
case eloam_plugin_service_ELoamMethodCode.ScannerSecondaryCamera_Base64:
|
84259
|
-
|
84260
|
-
|
84261
|
-
|
84262
|
-
|
84263
|
-
|
84264
|
-
|
84265
|
-
|
84266
|
-
|
84267
|
-
|
84268
|
-
|
84269
|
-
|
84270
|
-
|
84271
|
-
|
84595
|
+
if (this._isLinux) {
|
84596
|
+
url = this.baseLinuxServiceUrl + '/getPic?filepath=/tmp';
|
84597
|
+
requestType = 'get';
|
84598
|
+
} else {
|
84599
|
+
url = this.baseServiceUrl + '/video=grabimage';
|
84600
|
+
param = {
|
84601
|
+
filepath: "",
|
84602
|
+
rotate: "0",
|
84603
|
+
deskew: "0",
|
84604
|
+
deskewval: "0",
|
84605
|
+
camidx: "1",
|
84606
|
+
ColorMode: "0",
|
84607
|
+
quality: "0",
|
84608
|
+
bIsPrint1to1: "0"
|
84609
|
+
};
|
84610
|
+
requestType = 'post';
|
84611
|
+
}
|
84612
|
+
break;
|
84613
|
+
case eloam_plugin_service_ELoamMethodCode.StopCamera:
|
84614
|
+
if (this._isLinux) {
|
84615
|
+
url = this.baseLinuxServiceUrl + '/StopPreview?dev_idx=0';
|
84616
|
+
requestType = 'get';
|
84617
|
+
} else {
|
84618
|
+
url = this.baseServiceUrl + ' /video=close';
|
84619
|
+
param = {
|
84620
|
+
"camidx": "0"
|
84621
|
+
};
|
84622
|
+
requestType = 'post';
|
84623
|
+
}
|
84272
84624
|
break;
|
84273
84625
|
case eloam_plugin_service_ELoamMethodCode.ReadIDCard_Base64:
|
84274
84626
|
url = this.baseServiceUrl + '/card=idcard';
|
@@ -84281,44 +84633,72 @@ class eloam_plugin_service_ELoamPassService {
|
|
84281
84633
|
static async initLinuxCamera() {
|
84282
84634
|
await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxInit);
|
84283
84635
|
}
|
84636
|
+
static async startPreview(data) {
|
84637
|
+
return await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxStartPreview, data);
|
84638
|
+
}
|
84639
|
+
static async getEloamFrame() {
|
84640
|
+
return await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraLinuxGetFrame);
|
84641
|
+
}
|
84284
84642
|
/** 主摄像头拍照 */
|
84285
84643
|
static async scanByMainCamera(deskew) {
|
84286
84644
|
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerMainCamera_Base64, deskew);
|
84287
84645
|
if (this._isLinux) {
|
84288
|
-
return res
|
84646
|
+
return res; // 国产
|
84289
84647
|
} else {
|
84290
|
-
return res
|
84648
|
+
return res;
|
84291
84649
|
}
|
84292
84650
|
}
|
84293
84651
|
/** 副摄像头拍照 */
|
84294
84652
|
static async scanBySecondaryCamera() {
|
84295
84653
|
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerSecondaryCamera_Base64);
|
84296
|
-
|
84654
|
+
if (this._isLinux) {
|
84655
|
+
return res.data.img; // 国产
|
84656
|
+
} else {
|
84657
|
+
return res.photoBase64;
|
84658
|
+
}
|
84297
84659
|
}
|
84298
84660
|
static async mergeImage(list, type) {
|
84299
84661
|
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ScannerCameraMerge_Base64, {
|
84300
84662
|
list,
|
84301
84663
|
type
|
84302
84664
|
});
|
84303
|
-
return res.base64;
|
84665
|
+
return res.base64 || res.data;
|
84304
84666
|
}
|
84305
|
-
static async scanByCamera(type, deskew) {
|
84667
|
+
static async scanByCamera(type, deskew, isMerge = false) {
|
84306
84668
|
switch (type) {
|
84307
84669
|
case "main":
|
84308
|
-
|
84670
|
+
let res = await this.scanByMainCamera(deskew);
|
84671
|
+
if (isMerge) {
|
84672
|
+
// 合并
|
84673
|
+
if (this._isLinux) {
|
84674
|
+
return res.data.path; // 国产
|
84675
|
+
} else {
|
84676
|
+
return res.photoBase64;
|
84677
|
+
}
|
84678
|
+
} else {
|
84679
|
+
// 拍照
|
84680
|
+
if (this._isLinux) {
|
84681
|
+
return res.data.img; // 国产
|
84682
|
+
} else {
|
84683
|
+
return res.photoBase64;
|
84684
|
+
}
|
84685
|
+
}
|
84309
84686
|
case 'vice':
|
84310
84687
|
return this.scanBySecondaryCamera();
|
84311
84688
|
}
|
84312
84689
|
}
|
84313
84690
|
static async turnOnTheCamera() {}
|
84691
|
+
static async stopCamera() {
|
84692
|
+
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.StopCamera);
|
84693
|
+
}
|
84314
84694
|
/** 读取身份证 */
|
84315
84695
|
static async idCardRead() {
|
84316
84696
|
const res = await eloam_plugin_service_ELoamPassService.read(eloam_plugin_service_ELoamMethodCode.ReadIDCard_Base64);
|
84317
84697
|
var readData = res.IDCardInfo;
|
84318
84698
|
// Agency 发证机关,外国人永居证时,该值为中文名
|
84319
|
-
var name = readData.name;
|
84320
|
-
var enname = readData.enname;
|
84321
|
-
var cnname = readData.cnname;
|
84699
|
+
var name = (readData.name || '').trim();
|
84700
|
+
var enname = (readData.enname || '').trim();
|
84701
|
+
var cnname = (readData.cnname || '').trim();
|
84322
84702
|
var sex = readData.sex;
|
84323
84703
|
var birthday = readData.birthday;
|
84324
84704
|
var address = readData.address;
|
@@ -84348,8 +84728,8 @@ class eloam_plugin_service_ELoamPassService {
|
|
84348
84728
|
info: {
|
84349
84729
|
cardType: cardType,
|
84350
84730
|
nationality: nationality,
|
84351
|
-
name: name,
|
84352
|
-
chineseName: chineseName,
|
84731
|
+
name: name.trim(),
|
84732
|
+
chineseName: chineseName.trim(),
|
84353
84733
|
englishName: englishName,
|
84354
84734
|
sex: sex,
|
84355
84735
|
birthday: birthday,
|
@@ -84376,6 +84756,7 @@ _defineProperty(eloam_plugin_service_ELoamPassService, "_isLinux", String(naviga
|
|
84376
84756
|
* @description:common-message
|
84377
84757
|
*/
|
84378
84758
|
const SCANNER_CAMERA_REFRESH_PHOTO_EVENT = 'scanner-camera-refresh-photo-event';
|
84759
|
+
const SIGN_PHOTO_EVENT = 'sign-photo-event';
|
84379
84760
|
class ScannerCameraRefreshPhotoEvent extends Event {
|
84380
84761
|
constructor(url) {
|
84381
84762
|
super(SCANNER_CAMERA_REFRESH_PHOTO_EVENT);
|
@@ -84383,6 +84764,13 @@ class ScannerCameraRefreshPhotoEvent extends Event {
|
|
84383
84764
|
this.scannerResultUrl = url;
|
84384
84765
|
}
|
84385
84766
|
}
|
84767
|
+
class SignResultEvent extends Event {
|
84768
|
+
constructor(url) {
|
84769
|
+
super(SIGN_PHOTO_EVENT);
|
84770
|
+
_defineProperty(this, "signResultUrl", '');
|
84771
|
+
this.signResultUrl = url;
|
84772
|
+
}
|
84773
|
+
}
|
84386
84774
|
;// CONCATENATED MODULE: ./packages/utils/idCard-common-utils.ts
|
84387
84775
|
/**
|
84388
84776
|
* 根据身份证号码获取指定数据
|
@@ -85534,6 +85922,7 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85534
85922
|
name: 'rotate-video'
|
85535
85923
|
}],
|
85536
85924
|
_isLinux: String(navigator.platform).indexOf("Linux") > -1,
|
85925
|
+
eloamLinuxFrameTimer: {},
|
85537
85926
|
mergeImageList: []
|
85538
85927
|
};
|
85539
85928
|
},
|
@@ -85564,6 +85953,10 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85564
85953
|
// 国产客户端一体机
|
85565
85954
|
await WeiRongPluginService.stopCamera();
|
85566
85955
|
break;
|
85956
|
+
case 5:
|
85957
|
+
// 良田
|
85958
|
+
await eloam_plugin_service_ELoamPassService.stopCamera();
|
85959
|
+
break;
|
85567
85960
|
}
|
85568
85961
|
},
|
85569
85962
|
/**
|
@@ -85602,7 +85995,8 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85602
85995
|
let type = this.camera === 0 ? 'main' : 'vice';
|
85603
85996
|
const res = await eloam_plugin_service_ELoamPassService.scanByCamera(type, this.deskewStatus);
|
85604
85997
|
if (res) {
|
85605
|
-
|
85998
|
+
let path = res;
|
85999
|
+
this.$emit('send-scanner-result', `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${path}`);
|
85606
86000
|
} else {
|
85607
86001
|
this.$message.error('拍照出错,请检查设备是否连接成功');
|
85608
86002
|
}
|
@@ -85636,8 +86030,15 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85636
86030
|
break;
|
85637
86031
|
case 5:
|
85638
86032
|
// 良田高拍仪
|
85639
|
-
|
85640
|
-
|
86033
|
+
if (!(String(navigator.platform).indexOf("Linux") > -1)) {
|
86034
|
+
this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
|
86035
|
+
} else {
|
86036
|
+
await eloam_plugin_service_ELoamPassService.initLinuxCamera();
|
86037
|
+
let res = await eloam_plugin_service_ELoamPassService.startPreview('0');
|
86038
|
+
if (res.returnCode == "0" || res.returnCode == "2") {
|
86039
|
+
this.eloamLinuxFrameTimer = setInterval(this.getEloamFrame, 300);
|
86040
|
+
}
|
86041
|
+
}
|
85641
86042
|
break;
|
85642
86043
|
case 6:
|
85643
86044
|
// 国产客户端一体机
|
@@ -85645,6 +86046,15 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85645
86046
|
break;
|
85646
86047
|
}
|
85647
86048
|
},
|
86049
|
+
async getEloamFrame() {
|
86050
|
+
let res = await eloam_plugin_service_ELoamPassService.getEloamFrame();
|
86051
|
+
if (res.returnCode == "1") {
|
86052
|
+
clearInterval(this.eloamLinuxFrameTimer);
|
86053
|
+
return;
|
86054
|
+
}
|
86055
|
+
if (res.data.img == "") return;
|
86056
|
+
this.scannerVideoSrc = `${scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA}${res.data.img}`;
|
86057
|
+
},
|
85648
86058
|
/**
|
85649
86059
|
* 副摄像头
|
85650
86060
|
*/
|
@@ -85664,7 +86074,13 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85664
86074
|
break;
|
85665
86075
|
case 5:
|
85666
86076
|
// 良田
|
85667
|
-
|
86077
|
+
if (!(String(navigator.platform).indexOf("Linux") > -1)) {
|
86078
|
+
this.scannerVideoSrc = eloam_plugin_service_ELoamPassService.mainCameraUrl;
|
86079
|
+
} else {
|
86080
|
+
await eloam_plugin_service_ELoamPassService.initLinuxCamera();
|
86081
|
+
await eloam_plugin_service_ELoamPassService.startPreview('1');
|
86082
|
+
this.eloamLinuxFrameTimer = setInterval(this.getEloamFrame, 300);
|
86083
|
+
}
|
85668
86084
|
break;
|
85669
86085
|
case 6:
|
85670
86086
|
// 国产客户端一体机
|
@@ -85674,9 +86090,10 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85674
86090
|
},
|
85675
86091
|
async takePictureMerge(type) {
|
85676
86092
|
if (type === '1' && this.deskewStatus === '0') return this.$message.warning('请先开启纠偏');
|
85677
|
-
const res = await eloam_plugin_service_ELoamPassService.scanByCamera('main', this.deskewStatus);
|
86093
|
+
const res = await eloam_plugin_service_ELoamPassService.scanByCamera('main', this.deskewStatus, true);
|
85678
86094
|
if (res) {
|
85679
|
-
|
86095
|
+
let path = res;
|
86096
|
+
this.mergeImageList.push(path);
|
85680
86097
|
if (this.mergeImageList.length === 1) this.$message.success('第一张拍摄成功,请拍第二张');
|
85681
86098
|
if (this.mergeImageList.length === 2) {
|
85682
86099
|
let result = await eloam_plugin_service_ELoamPassService.mergeImage(this.mergeImageList, type);
|
@@ -85723,7 +86140,7 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85723
86140
|
this.takePictureMerge('1');
|
85724
86141
|
break;
|
85725
86142
|
case 'rotate-video':
|
85726
|
-
if (
|
86143
|
+
if (String(navigator.platform).indexOf("Linux") > -1) {
|
85727
86144
|
this.rotateDeg += 90;
|
85728
86145
|
if (this.rotateDeg === 360) this.rotateDeg = 0;
|
85729
86146
|
} else {
|
@@ -85741,10 +86158,10 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85741
86158
|
});
|
85742
86159
|
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=script&lang=js&
|
85743
86160
|
/* harmony default export */ var component_scanner_camera_componentvue_type_script_lang_js_ = (scanner_camera_componentvue_type_script_lang_js_);
|
85744
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.use[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=
|
86161
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.use[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=08878ca4&prod&scoped=true&lang=scss&
|
85745
86162
|
// extracted by mini-css-extract-plugin
|
85746
86163
|
|
85747
|
-
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=
|
86164
|
+
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue?vue&type=style&index=0&id=08878ca4&prod&scoped=true&lang=scss&
|
85748
86165
|
|
85749
86166
|
;// CONCATENATED MODULE: ./packages/scanner/scanner-camera/src/component/scanner-camera-component.vue
|
85750
86167
|
|
@@ -85757,11 +86174,11 @@ const scanner_camera_componentvue_type_script_lang_js_BEGIN_DATA = 'data:image/j
|
|
85757
86174
|
|
85758
86175
|
var scanner_camera_component_component = normalizeComponent(
|
85759
86176
|
component_scanner_camera_componentvue_type_script_lang_js_,
|
85760
|
-
|
85761
|
-
|
86177
|
+
scanner_camera_componentvue_type_template_id_08878ca4_scoped_true_render,
|
86178
|
+
scanner_camera_componentvue_type_template_id_08878ca4_scoped_true_staticRenderFns,
|
85762
86179
|
false,
|
85763
86180
|
null,
|
85764
|
-
"
|
86181
|
+
"08878ca4",
|
85765
86182
|
null
|
85766
86183
|
|
85767
86184
|
)
|
@@ -86056,8 +86473,8 @@ id_card_reader_eloam.install = Vue => {
|
|
86056
86473
|
Vue.component(id_card_reader_eloam.name, id_card_reader_eloam);
|
86057
86474
|
};
|
86058
86475
|
/* harmony default export */ var id_card_reader_id_card_reader_eloam = (id_card_reader_eloam);
|
86059
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/id-card-reader-button.vue?vue&type=template&id=
|
86060
|
-
var
|
86476
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/id-card-reader-button.vue?vue&type=template&id=617b7fd0&scoped=true&
|
86477
|
+
var id_card_reader_buttonvue_type_template_id_617b7fd0_scoped_true_render = function render() {
|
86061
86478
|
var _vm = this,
|
86062
86479
|
_c = _vm._self._c;
|
86063
86480
|
return _vm.tip ? _c('el-tooltip', {
|
@@ -86134,7 +86551,7 @@ var id_card_reader_buttonvue_type_template_id_d4b32654_scoped_true_render = func
|
|
86134
86551
|
}
|
86135
86552
|
})], 2);
|
86136
86553
|
};
|
86137
|
-
var
|
86554
|
+
var id_card_reader_buttonvue_type_template_id_617b7fd0_scoped_true_staticRenderFns = [];
|
86138
86555
|
|
86139
86556
|
;// CONCATENATED MODULE: ./packages/service/external-plugins/default-plugin-socket.service.ts
|
86140
86557
|
|
@@ -87207,7 +87624,8 @@ class MRAdbReadService {
|
|
87207
87624
|
birthday,
|
87208
87625
|
address,
|
87209
87626
|
cardId,
|
87210
|
-
nation
|
87627
|
+
nation,
|
87628
|
+
police
|
87211
87629
|
},
|
87212
87630
|
headImage
|
87213
87631
|
},
|
@@ -87219,7 +87637,8 @@ class MRAdbReadService {
|
|
87219
87637
|
birthday,
|
87220
87638
|
address,
|
87221
87639
|
cardId,
|
87222
|
-
nation
|
87640
|
+
nation,
|
87641
|
+
police
|
87223
87642
|
});
|
87224
87643
|
return IDCardData;
|
87225
87644
|
}
|
@@ -87620,6 +88039,257 @@ var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpac
|
|
87620
88039
|
* @date: 2023-10-12
|
87621
88040
|
* @description:华视电子读卡器
|
87622
88041
|
*/
|
88042
|
+
const NationalityEnum = {
|
88043
|
+
AND: "安道尔",
|
88044
|
+
AFG: "阿富汗",
|
88045
|
+
ATG: "安提瓜和巴布达",
|
88046
|
+
AIA: "安圭拉",
|
88047
|
+
ALB: "阿尔巴尼亚",
|
88048
|
+
ARM: "亚美尼亚",
|
88049
|
+
AGO: "安哥拉",
|
88050
|
+
ATA: "南极洲",
|
88051
|
+
ARG: "阿根廷",
|
88052
|
+
ASM: "美属萨摩亚",
|
88053
|
+
AUT: "奥地利",
|
88054
|
+
AUS: "澳大利亚",
|
88055
|
+
ABW: "阿鲁巴",
|
88056
|
+
ALA: "奥兰群岛",
|
88057
|
+
AZE: "阿塞拜疆",
|
88058
|
+
BIH: "波黑",
|
88059
|
+
BRB: "巴巴多斯",
|
88060
|
+
BGD: "孟加拉",
|
88061
|
+
BEL: "比利时",
|
88062
|
+
BFA: "布基纳法索",
|
88063
|
+
BGR: "保加利亚",
|
88064
|
+
BHR: "巴林",
|
88065
|
+
BDI: "布隆迪",
|
88066
|
+
BEN: "贝宁",
|
88067
|
+
BLM: "圣巴泰勒米岛",
|
88068
|
+
BMU: "百慕大",
|
88069
|
+
BRN: "文莱",
|
88070
|
+
BOL: "玻利维亚",
|
88071
|
+
BES: "荷兰加勒比区",
|
88072
|
+
BRA: "巴西",
|
88073
|
+
BHS: "巴哈马",
|
88074
|
+
BTN: "不丹",
|
88075
|
+
BVT: "布韦岛",
|
88076
|
+
BWA: "博茨瓦纳",
|
88077
|
+
BLR: "白俄罗斯",
|
88078
|
+
BLZ: "伯利兹",
|
88079
|
+
CAN: "加拿大",
|
88080
|
+
CCK: "科科斯群岛",
|
88081
|
+
CAF: "中非",
|
88082
|
+
CHE: "瑞士",
|
88083
|
+
CHL: "智利",
|
88084
|
+
CMR: "喀麦隆",
|
88085
|
+
COL: "哥伦比亚",
|
88086
|
+
CRI: "哥斯达黎加",
|
88087
|
+
CUB: "古巴",
|
88088
|
+
CPV: "佛得角",
|
88089
|
+
CXR: "圣诞岛",
|
88090
|
+
CYP: "塞浦路斯",
|
88091
|
+
CZE: "捷克",
|
88092
|
+
DEU: "德国",
|
88093
|
+
DJI: "吉布提",
|
88094
|
+
DNK: "丹麦",
|
88095
|
+
DMA: "多米尼克",
|
88096
|
+
DOM: "多米尼加",
|
88097
|
+
DZA: "阿尔及利亚",
|
88098
|
+
ECU: "厄瓜多尔",
|
88099
|
+
EST: "爱沙尼亚",
|
88100
|
+
EGY: "埃及",
|
88101
|
+
ESH: "西撒哈拉",
|
88102
|
+
ERI: "厄立特里亚",
|
88103
|
+
ESP: "西班牙",
|
88104
|
+
FIN: "芬兰",
|
88105
|
+
FJI: "斐济群岛",
|
88106
|
+
FLK: "马尔维纳斯群岛(福克兰)",
|
88107
|
+
FSM: "密克罗尼西亚联邦",
|
88108
|
+
FRO: "法罗群岛",
|
88109
|
+
FRA: "法国",
|
88110
|
+
GAB: "加蓬",
|
88111
|
+
GRD: "格林纳达",
|
88112
|
+
GEO: "格鲁吉亚",
|
88113
|
+
GUF: "法属圭亚那",
|
88114
|
+
GHA: "加纳",
|
88115
|
+
GIB: "直布罗陀",
|
88116
|
+
GRL: "格陵兰",
|
88117
|
+
GIN: "几内亚",
|
88118
|
+
GLP: "瓜德罗普",
|
88119
|
+
GNQ: "赤道几内亚",
|
88120
|
+
GRC: "希腊",
|
88121
|
+
SGS: "南乔治亚岛和南桑威奇群岛",
|
88122
|
+
GTM: "危地马拉",
|
88123
|
+
GUM: "关岛",
|
88124
|
+
GNB: "几内亚比绍",
|
88125
|
+
GUY: "圭亚那",
|
88126
|
+
HKG: "香港",
|
88127
|
+
HMD: "赫德岛和麦克唐纳群岛",
|
88128
|
+
HND: "洪都拉斯",
|
88129
|
+
HRV: "克罗地亚",
|
88130
|
+
HTI: "海地",
|
88131
|
+
HUN: "匈牙利",
|
88132
|
+
IDN: "印尼",
|
88133
|
+
IRL: "爱尔兰",
|
88134
|
+
ISR: "以色列",
|
88135
|
+
IMN: "马恩岛",
|
88136
|
+
IND: "印度",
|
88137
|
+
IOT: "英属印度洋领地",
|
88138
|
+
IRQ: "伊拉克",
|
88139
|
+
IRN: "伊朗",
|
88140
|
+
ISL: "冰岛",
|
88141
|
+
ITA: "意大利",
|
88142
|
+
JEY: "泽西岛",
|
88143
|
+
JAM: "牙买加",
|
88144
|
+
JOR: "约旦",
|
88145
|
+
JPN: "日本",
|
88146
|
+
KHM: "柬埔寨",
|
88147
|
+
KIR: "基里巴斯",
|
88148
|
+
COM: "科摩罗",
|
88149
|
+
KWT: "科威特",
|
88150
|
+
CYM: "开曼群岛",
|
88151
|
+
LBN: "黎巴嫩",
|
88152
|
+
LIE: "列支敦士登",
|
88153
|
+
LKA: "斯里兰卡",
|
88154
|
+
LBR: "利比里亚",
|
88155
|
+
LSO: "莱索托",
|
88156
|
+
LTU: "立陶宛",
|
88157
|
+
LUX: "卢森堡",
|
88158
|
+
LVA: "拉脱维亚",
|
88159
|
+
LBY: "利比亚",
|
88160
|
+
MAR: "摩洛哥",
|
88161
|
+
MCO: "摩纳哥",
|
88162
|
+
MDA: "摩尔多瓦",
|
88163
|
+
MNE: "黑山",
|
88164
|
+
MAF: "法属圣马丁",
|
88165
|
+
MDG: "马达加斯加",
|
88166
|
+
MHL: "马绍尔群岛",
|
88167
|
+
MKD: "马其顿",
|
88168
|
+
MLI: "马里",
|
88169
|
+
MMR: "缅甸",
|
88170
|
+
MAC: "澳门",
|
88171
|
+
MTQ: "马提尼克",
|
88172
|
+
MRT: "毛里塔尼亚",
|
88173
|
+
MSR: "蒙塞拉特岛",
|
88174
|
+
MLT: "马耳他",
|
88175
|
+
MDV: "马尔代夫",
|
88176
|
+
MWI: "马拉维",
|
88177
|
+
MEX: "墨西哥",
|
88178
|
+
MYS: "马来西亚",
|
88179
|
+
NAM: "纳米比亚",
|
88180
|
+
NER: "尼日尔",
|
88181
|
+
NFK: "诺福克岛",
|
88182
|
+
NGA: "尼日利亚",
|
88183
|
+
NIC: "尼加拉瓜",
|
88184
|
+
NLD: "荷兰",
|
88185
|
+
NOR: "挪威",
|
88186
|
+
NPL: "尼泊尔",
|
88187
|
+
NRU: "瑙鲁",
|
88188
|
+
OMN: "阿曼",
|
88189
|
+
PAN: "巴拿马",
|
88190
|
+
PER: "秘鲁",
|
88191
|
+
PYF: "法属波利尼西亚",
|
88192
|
+
PNG: "巴布亚新几内亚",
|
88193
|
+
PHL: "菲律宾",
|
88194
|
+
PAK: "巴基斯坦",
|
88195
|
+
POL: "波兰",
|
88196
|
+
PCN: "皮特凯恩群岛",
|
88197
|
+
PRI: "波多黎各",
|
88198
|
+
PSE: "巴勒斯坦",
|
88199
|
+
PLW: "帕劳",
|
88200
|
+
PRY: "巴拉圭",
|
88201
|
+
QAT: "卡塔尔",
|
88202
|
+
REU: "留尼汪",
|
88203
|
+
ROU: "罗马尼亚",
|
88204
|
+
SRB: "塞尔维亚",
|
88205
|
+
RUS: "俄罗斯",
|
88206
|
+
RWA: "卢旺达",
|
88207
|
+
SLB: "所罗门群岛",
|
88208
|
+
SYC: "塞舌尔",
|
88209
|
+
SDN: "苏丹",
|
88210
|
+
SWE: "瑞典",
|
88211
|
+
SGP: "新加坡",
|
88212
|
+
SVN: "斯洛文尼亚",
|
88213
|
+
SJM: "斯瓦尔巴群岛和 扬马延岛",
|
88214
|
+
SVK: "斯洛伐克",
|
88215
|
+
SLE: "塞拉利昂",
|
88216
|
+
SMR: "圣马力诺",
|
88217
|
+
SEN: "塞内加尔",
|
88218
|
+
SOM: "索马里",
|
88219
|
+
SUR: "苏里南",
|
88220
|
+
SSD: "南苏丹",
|
88221
|
+
STP: "圣多美和普林西比",
|
88222
|
+
SLV: "萨尔瓦多",
|
88223
|
+
SYR: "叙利亚",
|
88224
|
+
SWZ: "斯威士兰",
|
88225
|
+
TCA: "特克斯和凯科斯群岛",
|
88226
|
+
TCD: "乍得",
|
88227
|
+
TGO: "多哥",
|
88228
|
+
THA: "泰国",
|
88229
|
+
TKL: "托克劳",
|
88230
|
+
TLS: "东帝汶",
|
88231
|
+
TUN: "突尼斯",
|
88232
|
+
TON: "汤加",
|
88233
|
+
TUR: "土耳其",
|
88234
|
+
TUV: "图瓦卢",
|
88235
|
+
TZA: "坦桑尼亚",
|
88236
|
+
UKR: "乌克兰",
|
88237
|
+
UGA: "乌干达",
|
88238
|
+
USA: "美国",
|
88239
|
+
URY: "乌拉圭",
|
88240
|
+
VAT: "梵蒂冈",
|
88241
|
+
VEN: "委内瑞拉",
|
88242
|
+
VGB: "英属维尔京群岛",
|
88243
|
+
VIR: "美属维尔京群岛",
|
88244
|
+
VNM: "越南",
|
88245
|
+
WLF: "瓦利斯和富图纳",
|
88246
|
+
WSM: "萨摩亚",
|
88247
|
+
YEM: "也门",
|
88248
|
+
MYT: "马约特",
|
88249
|
+
ZAF: "南非",
|
88250
|
+
ZMB: "赞比亚",
|
88251
|
+
ZWE: "津巴布韦",
|
88252
|
+
CHN: "中国",
|
88253
|
+
COG: "刚果(布)",
|
88254
|
+
COD: "刚果(金)",
|
88255
|
+
MOZ: "莫桑比克",
|
88256
|
+
GGY: "根西岛",
|
88257
|
+
GMB: "冈比亚",
|
88258
|
+
MNP: "北马里亚纳群岛",
|
88259
|
+
ETH: "埃塞俄比亚",
|
88260
|
+
NCL: "新喀里多尼亚",
|
88261
|
+
VUT: "瓦努阿图",
|
88262
|
+
ATF: "法属南部领地",
|
88263
|
+
NIU: "纽埃",
|
88264
|
+
UMI: "美国本土外小岛屿",
|
88265
|
+
COK: "库克群岛",
|
88266
|
+
GBR: "英国",
|
88267
|
+
TTO: "特立尼达和多巴哥",
|
88268
|
+
VCT: "圣文森特和格林纳丁斯",
|
88269
|
+
TWN: "台湾",
|
88270
|
+
NZL: "新西兰",
|
88271
|
+
SAU: "沙特阿拉伯",
|
88272
|
+
LAO: "老挝",
|
88273
|
+
PRK: "朝鲜",
|
88274
|
+
KOR: "韩国",
|
88275
|
+
PRT: "葡萄牙",
|
88276
|
+
KGZ: "吉尔吉斯斯坦",
|
88277
|
+
KAZ: "哈萨克斯坦",
|
88278
|
+
TJK: "塔吉克斯坦",
|
88279
|
+
TKM: "土库曼斯坦",
|
88280
|
+
UZB: "乌兹别克斯坦",
|
88281
|
+
KNA: "圣基茨和尼维斯",
|
88282
|
+
SPM: "圣皮埃尔和密克隆",
|
88283
|
+
SHN: "圣赫勒拿",
|
88284
|
+
LCA: "圣卢西亚",
|
88285
|
+
MUS: "毛里求斯",
|
88286
|
+
CIV: "科特迪瓦",
|
88287
|
+
KEN: "肯尼亚",
|
88288
|
+
MNG: "蒙古国"
|
88289
|
+
};
|
88290
|
+
function convertNationality(nationality) {
|
88291
|
+
return NationalityEnum[nationality];
|
88292
|
+
}
|
87623
88293
|
class HuaShiService {
|
87624
88294
|
static startConnect() {
|
87625
88295
|
if (this.ws && this.ws.readyState === WebSocket.CONNECTING) {
|
@@ -87695,23 +88365,55 @@ class HuaShiService {
|
|
87695
88365
|
const readData = await HuaShiService.read();
|
87696
88366
|
if (readData) {
|
87697
88367
|
// 身份证|姓名|性别|民族|生日|地址|证件号|派出所|有效期起|有效期止||证件照 中间好多占位
|
87698
|
-
|
87699
|
-
|
87700
|
-
|
87701
|
-
|
87702
|
-
|
87703
|
-
|
87704
|
-
|
87705
|
-
|
87706
|
-
|
87707
|
-
|
87708
|
-
|
87709
|
-
|
87710
|
-
|
87711
|
-
|
87712
|
-
|
87713
|
-
|
87714
|
-
|
88368
|
+
// 永居证|姓名|性别|永居证证件号|国籍代码|中文姓名|有效期起|有效期止|生日|证件版本号|受理机关代码|证件类别|照片内容 中间好多占位
|
88369
|
+
// 永居证|姓名|性别|永居证证件号|国籍代码|中文姓名|有效期起|有效期止|生日|换证次数|旧证件号|证件类别|照片内容 中间好多占位
|
88370
|
+
// 港澳台|姓名|性别|生日|住址|证件号|派出所|有效期起|有效期止|通行证号码|签发次数|证件类别|照片内容 中间好多占位
|
88371
|
+
let [model, placeholder, type, name, sex, nation, birthday, address, cardId, police, validStart, validEnd] = readData.split('|');
|
88372
|
+
let base64_ID = readData.split('|')[19];
|
88373
|
+
let NationCode = readData.split('|')[18];
|
88374
|
+
if (NationCode === '1') {
|
88375
|
+
// 身份证
|
88376
|
+
const IDCardData = {
|
88377
|
+
info: {
|
88378
|
+
cardType: '1',
|
88379
|
+
name,
|
88380
|
+
chineseName: '',
|
88381
|
+
englishName: '',
|
88382
|
+
sex,
|
88383
|
+
birthday,
|
88384
|
+
address,
|
88385
|
+
cardId,
|
88386
|
+
nationality: '中国',
|
88387
|
+
nation,
|
88388
|
+
police,
|
88389
|
+
validStart,
|
88390
|
+
validEnd
|
88391
|
+
},
|
88392
|
+
headImage: base64_ID
|
88393
|
+
};
|
88394
|
+
return IDCardData;
|
88395
|
+
} else {
|
88396
|
+
let chineseName = readData.split('|')[16] || '无中文姓名';
|
88397
|
+
const IDCardData = {
|
88398
|
+
info: {
|
88399
|
+
cardType: '9',
|
88400
|
+
name: chineseName === '无中文姓名' ? name : chineseName || name,
|
88401
|
+
chineseName,
|
88402
|
+
englishName: name,
|
88403
|
+
sex,
|
88404
|
+
birthday,
|
88405
|
+
address,
|
88406
|
+
cardId,
|
88407
|
+
nationality: convertNationality(NationCode),
|
88408
|
+
nation: '',
|
88409
|
+
police: '中华人民共和国国家移民管理局',
|
88410
|
+
validStart,
|
88411
|
+
validEnd
|
88412
|
+
},
|
88413
|
+
headImage: base64_ID
|
88414
|
+
};
|
88415
|
+
return IDCardData;
|
88416
|
+
}
|
87715
88417
|
} else {
|
87716
88418
|
throw Error('未匹配可用的读卡器');
|
87717
88419
|
}
|
@@ -87720,8 +88422,8 @@ class HuaShiService {
|
|
87720
88422
|
_defineProperty(HuaShiService, "idCardWebSocketUrl", 'ws://127.0.0.1:7415');
|
87721
88423
|
_defineProperty(HuaShiService, "ws", void 0);
|
87722
88424
|
_defineProperty(HuaShiService, "requestStore", []);
|
87723
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=template&id=
|
87724
|
-
var
|
88425
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=template&id=0641aa24&
|
88426
|
+
var default_take_photo_dialogvue_type_template_id_0641aa24_render = function render() {
|
87725
88427
|
var _vm = this,
|
87726
88428
|
_c = _vm._self._c;
|
87727
88429
|
return _c('el-dialog', {
|
@@ -87744,6 +88446,7 @@ var default_take_photo_dialogvue_type_template_id_7de4bdd6_render = function ren
|
|
87744
88446
|
ref: "monitor",
|
87745
88447
|
staticClass: "videoContainer",
|
87746
88448
|
attrs: {
|
88449
|
+
"id": "monitor",
|
87747
88450
|
"autoplay": "",
|
87748
88451
|
"width": "250",
|
87749
88452
|
"height": "300"
|
@@ -87755,233 +88458,36 @@ var default_take_photo_dialogvue_type_template_id_7de4bdd6_render = function ren
|
|
87755
88458
|
"display": "none"
|
87756
88459
|
},
|
87757
88460
|
attrs: {
|
88461
|
+
"id": "photo",
|
87758
88462
|
"width": "1920",
|
87759
88463
|
"height": "1080"
|
87760
88464
|
}
|
87761
|
-
}), _c('
|
88465
|
+
}), _c('div', {
|
88466
|
+
staticClass: "image-content"
|
88467
|
+
}, [_c('img', {
|
87762
88468
|
staticClass: "videoContainer photo",
|
87763
88469
|
attrs: {
|
87764
88470
|
"src": _vm.viewerPhotoSrc
|
87765
88471
|
}
|
87766
|
-
})]), _c('span', {
|
88472
|
+
})])]), _c('span', {
|
87767
88473
|
staticClass: "dialog-footer",
|
87768
88474
|
attrs: {
|
87769
88475
|
"slot": "footer"
|
87770
88476
|
},
|
87771
88477
|
slot: "footer"
|
87772
88478
|
}, [_vm._l(_vm.buttonList, function (button) {
|
87773
|
-
return [_c('el-button', _vm._b({
|
88479
|
+
return [_vm._isShowButton(button.name) ? _c('el-button', _vm._b({
|
87774
88480
|
key: button.name,
|
87775
88481
|
on: {
|
87776
88482
|
"click": function ($event) {
|
87777
88483
|
return _vm.buttonClickEvent(button.name);
|
87778
88484
|
}
|
87779
88485
|
}
|
87780
|
-
}, 'el-button', button, false), [_vm._v(_vm._s(button.label) + " ")])];
|
88486
|
+
}, 'el-button', button, false), [_vm._v(_vm._s(button.label) + " ")]) : _vm._e()];
|
87781
88487
|
})], 2)]);
|
87782
88488
|
};
|
87783
|
-
var
|
87784
|
-
|
87785
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=script&lang=js&
|
87786
|
-
/* harmony default export */ var default_take_photo_dialogvue_type_script_lang_js_ = ({
|
87787
|
-
name: "default-take-photo-dialog",
|
87788
|
-
data: () => {
|
87789
|
-
return {
|
87790
|
-
visibility: true,
|
87791
|
-
viewerPhotoSrc: '',
|
87792
|
-
scannerPhotoSrc: '',
|
87793
|
-
cameraStream: '',
|
87794
|
-
buttonList: [{
|
87795
|
-
name: 'cancel',
|
87796
|
-
label: '取消',
|
87797
|
-
size: 'small'
|
87798
|
-
}, {
|
87799
|
-
name: 'take-photo',
|
87800
|
-
label: '拍照',
|
87801
|
-
type: 'primary',
|
87802
|
-
size: 'small'
|
87803
|
-
}, {
|
87804
|
-
name: 'sure',
|
87805
|
-
label: '确定',
|
87806
|
-
type: 'primary',
|
87807
|
-
size: 'small'
|
87808
|
-
}]
|
87809
|
-
};
|
87810
|
-
},
|
87811
|
-
mounted() {
|
87812
|
-
this.$nextTick(() => {
|
87813
|
-
this.initDefaultCamera();
|
87814
|
-
});
|
87815
|
-
},
|
87816
|
-
beforeDestroy() {
|
87817
|
-
this.cameraStream.getVideoTracks().forEach(track => {
|
87818
|
-
track.stop();
|
87819
|
-
});
|
87820
|
-
},
|
87821
|
-
methods: {
|
87822
|
-
async initDefaultCamera() {
|
87823
|
-
let video = this.$refs.monitor;
|
87824
|
-
let canvas = this.$refs.photo;
|
87825
|
-
console.log(video, canvas);
|
87826
|
-
let videoObj = {
|
87827
|
-
audio: false,
|
87828
|
-
video: {
|
87829
|
-
width: 1920,
|
87830
|
-
height: 1080
|
87831
|
-
}
|
87832
|
-
};
|
87833
|
-
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
|
87834
|
-
try {
|
87835
|
-
let stream = await navigator.mediaDevices.getUserMedia(videoObj);
|
87836
|
-
video.srcObject = stream;
|
87837
|
-
video.play();
|
87838
|
-
this.cameraStream = stream;
|
87839
|
-
} catch (e) {
|
87840
|
-
this.$message.error('没有可用的摄像头!');
|
87841
|
-
console.log(e);
|
87842
|
-
}
|
87843
|
-
} else {
|
87844
|
-
this.$message.error('调用摄像头失败,请在首页右上角我的设备中设置读拍照/人脸识别选项,并确保已为浏览器设置相关权限!');
|
87845
|
-
}
|
87846
|
-
},
|
87847
|
-
takePicture() {
|
87848
|
-
let video = this.$refs.monitor;
|
87849
|
-
let canvas = this.$refs.photo;
|
87850
|
-
let context = canvas.getContext('2d');
|
87851
|
-
context.drawImage(video, 0, 0, 1920, 1080);
|
87852
|
-
let img = canvas.toDataURL('image/png');
|
87853
|
-
canvas.src = img;
|
87854
|
-
this.viewerPhotoSrc = img;
|
87855
|
-
this.scannerPhotoSrc = img.replace('data:image/png;base64,', '');
|
87856
|
-
},
|
87857
|
-
async buttonClickEvent(name) {
|
87858
|
-
switch (name) {
|
87859
|
-
case 'cancel':
|
87860
|
-
this.visibility = false;
|
87861
|
-
this.$emit('close');
|
87862
|
-
break;
|
87863
|
-
case 'take-photo':
|
87864
|
-
this.takePicture();
|
87865
|
-
break;
|
87866
|
-
case 'sure':
|
87867
|
-
let data = {
|
87868
|
-
faceimg: this.scannerPhotoSrc
|
87869
|
-
};
|
87870
|
-
this.$emit('close', data);
|
87871
|
-
this.visibility = false;
|
87872
|
-
break;
|
87873
|
-
}
|
87874
|
-
}
|
87875
|
-
}
|
87876
|
-
});
|
87877
|
-
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=script&lang=js&
|
87878
|
-
/* harmony default export */ var dialog_default_take_photo_dialogvue_type_script_lang_js_ = (default_take_photo_dialogvue_type_script_lang_js_);
|
87879
|
-
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.use[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=style&index=0&id=7de4bdd6&prod&lang=scss&
|
87880
|
-
// extracted by mini-css-extract-plugin
|
87881
|
-
|
87882
|
-
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=style&index=0&id=7de4bdd6&prod&lang=scss&
|
87883
|
-
|
87884
|
-
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue
|
87885
|
-
|
87886
|
-
|
87887
|
-
|
87888
|
-
;
|
87889
|
-
|
87890
|
-
|
87891
|
-
/* normalize component */
|
87892
|
-
|
87893
|
-
var default_take_photo_dialog_component = normalizeComponent(
|
87894
|
-
dialog_default_take_photo_dialogvue_type_script_lang_js_,
|
87895
|
-
default_take_photo_dialogvue_type_template_id_7de4bdd6_render,
|
87896
|
-
default_take_photo_dialogvue_type_template_id_7de4bdd6_staticRenderFns,
|
87897
|
-
false,
|
87898
|
-
null,
|
87899
|
-
null,
|
87900
|
-
null
|
87901
|
-
|
87902
|
-
)
|
87903
|
-
|
87904
|
-
/* harmony default export */ var default_take_photo_dialog = (default_take_photo_dialog_component.exports);
|
87905
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue?vue&type=template&id=5bbb0afc&scoped=true&
|
87906
|
-
var wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_render = function render() {
|
87907
|
-
var _vm = this,
|
87908
|
-
_c = _vm._self._c;
|
87909
|
-
return _vm.visibility ? _c('el-dialog', {
|
87910
|
-
staticClass: "wei-rong-face-auth-dialog",
|
87911
|
-
attrs: {
|
87912
|
-
"title": "人脸识别",
|
87913
|
-
"top": '5vh',
|
87914
|
-
"width": "640px",
|
87915
|
-
"visible": _vm.visibility,
|
87916
|
-
"close-on-click-modal": false
|
87917
|
-
},
|
87918
|
-
on: {
|
87919
|
-
"update:visible": function ($event) {
|
87920
|
-
_vm.visibility = $event;
|
87921
|
-
}
|
87922
|
-
}
|
87923
|
-
}, [_c('div', {
|
87924
|
-
staticClass: "image-container"
|
87925
|
-
}, [_c('img', {
|
87926
|
-
staticStyle: {
|
87927
|
-
"width": "600px",
|
87928
|
-
"height": "450px"
|
87929
|
-
},
|
87930
|
-
attrs: {
|
87931
|
-
"id": "photo",
|
87932
|
-
"src": _vm.viewFaceImage
|
87933
|
-
}
|
87934
|
-
})])]) : _vm._e();
|
87935
|
-
};
|
87936
|
-
var wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_staticRenderFns = [];
|
88489
|
+
var default_take_photo_dialogvue_type_template_id_0641aa24_staticRenderFns = [];
|
87937
88490
|
|
87938
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue?vue&type=script&lang=js&
|
87939
|
-
|
87940
|
-
|
87941
|
-
const wei_rong_face_auth_dialogvue_type_script_lang_js_BEGIN_DATA = 'data:image/jpg;base64,';
|
87942
|
-
/* harmony default export */ var wei_rong_face_auth_dialogvue_type_script_lang_js_ = ({
|
87943
|
-
name: "wei-rong-face-auth-dialog",
|
87944
|
-
data: () => {
|
87945
|
-
return {
|
87946
|
-
visibility: true,
|
87947
|
-
viewFaceImage: ''
|
87948
|
-
};
|
87949
|
-
},
|
87950
|
-
async created() {
|
87951
|
-
window.addEventListener(SCANNER_CAMERA_REFRESH_PHOTO_EVENT, message => {
|
87952
|
-
if (message.type === SCANNER_CAMERA_REFRESH_PHOTO_EVENT) {
|
87953
|
-
this.viewFaceImage = `${wei_rong_face_auth_dialogvue_type_script_lang_js_BEGIN_DATA}${message.scannerResultUrl}`;
|
87954
|
-
}
|
87955
|
-
});
|
87956
|
-
let res = await WeiRongPluginService.faceValidateWithIdCardRead();
|
87957
|
-
this.$message.success('认证成功');
|
87958
|
-
setTimeout(() => {
|
87959
|
-
this.$emit('close', res);
|
87960
|
-
}, 1500);
|
87961
|
-
}
|
87962
|
-
});
|
87963
|
-
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue?vue&type=script&lang=js&
|
87964
|
-
/* harmony default export */ var dialog_wei_rong_face_auth_dialogvue_type_script_lang_js_ = (wei_rong_face_auth_dialogvue_type_script_lang_js_);
|
87965
|
-
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue
|
87966
|
-
|
87967
|
-
|
87968
|
-
|
87969
|
-
|
87970
|
-
|
87971
|
-
/* normalize component */
|
87972
|
-
;
|
87973
|
-
var wei_rong_face_auth_dialog_component = normalizeComponent(
|
87974
|
-
dialog_wei_rong_face_auth_dialogvue_type_script_lang_js_,
|
87975
|
-
wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_render,
|
87976
|
-
wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_staticRenderFns,
|
87977
|
-
false,
|
87978
|
-
null,
|
87979
|
-
"5bbb0afc",
|
87980
|
-
null
|
87981
|
-
|
87982
|
-
)
|
87983
|
-
|
87984
|
-
/* harmony default export */ var wei_rong_face_auth_dialog = (wei_rong_face_auth_dialog_component.exports);
|
87985
88491
|
;// CONCATENATED MODULE: ./packages/service/external-plugins/exit-and-entry-plugin.service.ts
|
87986
88492
|
|
87987
88493
|
/**
|
@@ -87998,8 +88504,10 @@ var ExitAndEntryMethodCode;
|
|
87998
88504
|
ExitAndEntryMethodCode["ManualRead"] = "ManualRead";
|
87999
88505
|
/** 获取识别结果 */
|
88000
88506
|
ExitAndEntryMethodCode["GetReadResult"] = "GetReadResult";
|
88507
|
+
/** 人脸识别 */
|
88508
|
+
ExitAndEntryMethodCode["FaceAuth"] = "IDAuth";
|
88001
88509
|
})(ExitAndEntryMethodCode || (ExitAndEntryMethodCode = {}));
|
88002
|
-
const
|
88510
|
+
const exit_and_entry_plugin_service_NationalityEnum = {
|
88003
88511
|
AND: "安道尔",
|
88004
88512
|
AFG: "阿富汗",
|
88005
88513
|
ATG: "安提瓜和巴布达",
|
@@ -88083,7 +88591,7 @@ const NationalityEnum = {
|
|
88083
88591
|
GUM: "关岛",
|
88084
88592
|
GNB: "几内亚比绍",
|
88085
88593
|
GUY: "圭亚那",
|
88086
|
-
HKG: "
|
88594
|
+
HKG: "香港",
|
88087
88595
|
HMD: "赫德岛和麦克唐纳群岛",
|
88088
88596
|
HND: "洪都拉斯",
|
88089
88597
|
HRV: "克罗地亚",
|
@@ -88127,7 +88635,7 @@ const NationalityEnum = {
|
|
88127
88635
|
MKD: "马其顿",
|
88128
88636
|
MLI: "马里",
|
88129
88637
|
MMR: "缅甸",
|
88130
|
-
MAC: "
|
88638
|
+
MAC: "澳门",
|
88131
88639
|
MTQ: "马提尼克",
|
88132
88640
|
MRT: "毛里塔尼亚",
|
88133
88641
|
MSR: "蒙塞拉特岛",
|
@@ -88226,7 +88734,7 @@ const NationalityEnum = {
|
|
88226
88734
|
GBR: "英国",
|
88227
88735
|
TTO: "特立尼达和多巴哥",
|
88228
88736
|
VCT: "圣文森特和格林纳丁斯",
|
88229
|
-
TWN: "
|
88737
|
+
TWN: "台湾",
|
88230
88738
|
NZL: "新西兰",
|
88231
88739
|
SAU: "沙特阿拉伯",
|
88232
88740
|
LAO: "老挝",
|
@@ -88252,8 +88760,11 @@ var SexEnum;
|
|
88252
88760
|
SexEnum["MALE"] = "\u7537";
|
88253
88761
|
SexEnum["FEMALE"] = "\u5973";
|
88254
88762
|
})(SexEnum || (SexEnum = {}));
|
88255
|
-
|
88256
|
-
|
88763
|
+
const headers = {
|
88764
|
+
'Content-Type': 'application/json; charset=utf-8'
|
88765
|
+
};
|
88766
|
+
function exit_and_entry_plugin_service_convertNationality(nationality) {
|
88767
|
+
return exit_and_entry_plugin_service_NationalityEnum[nationality];
|
88257
88768
|
}
|
88258
88769
|
function urlToBase64(url) {
|
88259
88770
|
return new Promise((resolve, reject) => {
|
@@ -88316,7 +88827,7 @@ async function formatNFCResult(data) {
|
|
88316
88827
|
sex: SexEnum[sex] || '未知',
|
88317
88828
|
cardId: doc_number,
|
88318
88829
|
birthday: birth_DateFormat.replace('-', '').replace('-', ''),
|
88319
|
-
nationality:
|
88830
|
+
nationality: exit_and_entry_plugin_service_convertNationality(state),
|
88320
88831
|
validEnd: expired_DateFormat.replace('-', '').replace('-', ''),
|
88321
88832
|
headImage: img.replace('data:image/png;base64,', '')
|
88322
88833
|
};
|
@@ -88400,7 +88911,7 @@ async function formatPermanentResidencePermit(data) {
|
|
88400
88911
|
sex: xbdm.replace('性', ''),
|
88401
88912
|
cardId: zjhm || yjjlzhm,
|
88402
88913
|
birthday: csrq,
|
88403
|
-
nationality:
|
88914
|
+
nationality: exit_and_entry_plugin_service_convertNationality(gjdm),
|
88404
88915
|
validStart: yxqqsrq || zjqfrq,
|
88405
88916
|
validEnd: yxqjzrq || zjzzrq,
|
88406
88917
|
police: '中华人民共和国国家移民管理局',
|
@@ -88408,20 +88919,37 @@ async function formatPermanentResidencePermit(data) {
|
|
88408
88919
|
};
|
88409
88920
|
}
|
88410
88921
|
class ExitAndEntryPluginService {
|
88411
|
-
static async read(method) {
|
88412
|
-
let url = ''
|
88922
|
+
static async read(method, data = {}) {
|
88923
|
+
let url = '',
|
88924
|
+
requestType = '',
|
88925
|
+
param;
|
88413
88926
|
switch (method) {
|
88414
88927
|
case ExitAndEntryMethodCode.GetStatus:
|
88415
88928
|
url = `${ExitAndEntryPluginService.baseServiceUrl}/PassportReader/${method}`;
|
88929
|
+
requestType = 'get';
|
88416
88930
|
break;
|
88417
88931
|
case ExitAndEntryMethodCode.ManualRead:
|
88418
88932
|
url = `${ExitAndEntryPluginService.baseServiceUrl}/PassportReader/${method}`;
|
88933
|
+
requestType = 'get';
|
88419
88934
|
break;
|
88420
88935
|
case ExitAndEntryMethodCode.GetReadResult:
|
88421
88936
|
url = `${ExitAndEntryPluginService.baseServiceUrl}/PassportReader/${method}`;
|
88937
|
+
requestType = 'get';
|
88938
|
+
break;
|
88939
|
+
case ExitAndEntryMethodCode.FaceAuth:
|
88940
|
+
url = `${ExitAndEntryPluginService.baseServiceUrl}/PassportReader/${method}`;
|
88941
|
+
requestType = 'post';
|
88942
|
+
param = {
|
88943
|
+
...data
|
88944
|
+
};
|
88422
88945
|
break;
|
88423
88946
|
}
|
88424
|
-
let res
|
88947
|
+
let res;
|
88948
|
+
if (requestType === 'get') {
|
88949
|
+
res = await custom_axios_CustomAxios[requestType](url, headers);
|
88950
|
+
} else {
|
88951
|
+
res = await custom_axios_CustomAxios[requestType](url, param, headers);
|
88952
|
+
}
|
88425
88953
|
return res;
|
88426
88954
|
}
|
88427
88955
|
static async getStatus() {
|
@@ -88513,8 +89041,313 @@ class ExitAndEntryPluginService {
|
|
88513
89041
|
};
|
88514
89042
|
return IDCardData;
|
88515
89043
|
}
|
89044
|
+
static async faceAuth(image) {
|
89045
|
+
// PassportReader/IDAuth
|
89046
|
+
console.log('faceAuth=>', image);
|
89047
|
+
let res = await ExitAndEntryPluginService.read(ExitAndEntryMethodCode.FaceAuth, {
|
89048
|
+
imgBase64: image
|
89049
|
+
});
|
89050
|
+
while (res.ret === 40001) {
|
89051
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
89052
|
+
res = await ExitAndEntryPluginService.read(ExitAndEntryMethodCode.FaceAuth, {
|
89053
|
+
imgBase64: image
|
89054
|
+
});
|
89055
|
+
}
|
89056
|
+
console.log('人脸识别结束=>', res);
|
89057
|
+
return res.data.result;
|
89058
|
+
}
|
88516
89059
|
}
|
88517
89060
|
_defineProperty(ExitAndEntryPluginService, "baseServiceUrl", 'http://127.0.0.1:7770');
|
89061
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=script&lang=js&
|
89062
|
+
|
89063
|
+
/* harmony default export */ var default_take_photo_dialogvue_type_script_lang_js_ = ({
|
89064
|
+
name: "default-take-photo-dialog",
|
89065
|
+
props: {
|
89066
|
+
readMachineType: {
|
89067
|
+
type: Number,
|
89068
|
+
default: 0
|
89069
|
+
}
|
89070
|
+
},
|
89071
|
+
data: () => {
|
89072
|
+
return {
|
89073
|
+
visibility: true,
|
89074
|
+
viewerPhotoSrc: '',
|
89075
|
+
scannerPhotoSrc: '',
|
89076
|
+
cameraStream: '',
|
89077
|
+
buttonList: [{
|
89078
|
+
name: 'cancel',
|
89079
|
+
label: '取消',
|
89080
|
+
size: 'small'
|
89081
|
+
}, {
|
89082
|
+
name: 'take-photo',
|
89083
|
+
label: '拍照',
|
89084
|
+
type: 'primary',
|
89085
|
+
size: 'small'
|
89086
|
+
}, {
|
89087
|
+
name: 'face-auth',
|
89088
|
+
label: '人脸识别',
|
89089
|
+
type: 'primary',
|
89090
|
+
size: 'small'
|
89091
|
+
}, {
|
89092
|
+
name: 'sure',
|
89093
|
+
label: '确定',
|
89094
|
+
type: 'primary',
|
89095
|
+
size: 'small'
|
89096
|
+
}]
|
89097
|
+
};
|
89098
|
+
},
|
89099
|
+
mounted() {
|
89100
|
+
this.$nextTick(() => {
|
89101
|
+
this.initDefaultCamera();
|
89102
|
+
});
|
89103
|
+
},
|
89104
|
+
beforeDestroy() {
|
89105
|
+
this.cameraStream.getVideoTracks().forEach(track => {
|
89106
|
+
track.stop();
|
89107
|
+
});
|
89108
|
+
},
|
89109
|
+
methods: {
|
89110
|
+
async initDefaultCamera() {
|
89111
|
+
let video = document.getElementById('monitor'); // this.$refs.monitor;
|
89112
|
+
let canvas = this.$refs.photo;
|
89113
|
+
console.log(video, canvas);
|
89114
|
+
let videoObj = {
|
89115
|
+
audio: false,
|
89116
|
+
video: {
|
89117
|
+
width: 1920,
|
89118
|
+
height: 1080
|
89119
|
+
}
|
89120
|
+
};
|
89121
|
+
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
|
89122
|
+
try {
|
89123
|
+
let stream = await navigator.mediaDevices.getUserMedia(videoObj);
|
89124
|
+
video.srcObject = stream;
|
89125
|
+
video.play();
|
89126
|
+
console.log(stream);
|
89127
|
+
this.cameraStream = stream;
|
89128
|
+
} catch (e) {
|
89129
|
+
this.$message.error('没有可用的摄像头!');
|
89130
|
+
console.log(e);
|
89131
|
+
}
|
89132
|
+
} else {
|
89133
|
+
this.$message.error('调用摄像头失败,请在首页右上角我的设备中设置读拍照/人脸识别选项,并确保已为浏览器设置相关权限!');
|
89134
|
+
}
|
89135
|
+
},
|
89136
|
+
takePicture() {
|
89137
|
+
let video = this.$refs.monitor;
|
89138
|
+
let canvas = this.$refs.photo;
|
89139
|
+
let context = canvas.getContext('2d');
|
89140
|
+
context.drawImage(video, 0, 0, 1920, 1080);
|
89141
|
+
let img = canvas.toDataURL('image/png');
|
89142
|
+
canvas.src = img;
|
89143
|
+
this.viewerPhotoSrc = img;
|
89144
|
+
this.scannerPhotoSrc = img.replace('data:image/png;base64,', '');
|
89145
|
+
},
|
89146
|
+
_isShowButton(name) {
|
89147
|
+
switch (name) {
|
89148
|
+
case 'sure':
|
89149
|
+
return this.readMachineType !== 11;
|
89150
|
+
case 'face-auth':
|
89151
|
+
return this.readMachineType === 11;
|
89152
|
+
default:
|
89153
|
+
return true;
|
89154
|
+
}
|
89155
|
+
},
|
89156
|
+
async buttonClickEvent(name) {
|
89157
|
+
switch (name) {
|
89158
|
+
case 'cancel':
|
89159
|
+
this.visibility = false;
|
89160
|
+
this.$emit('close');
|
89161
|
+
break;
|
89162
|
+
case 'take-photo':
|
89163
|
+
this.takePicture();
|
89164
|
+
break;
|
89165
|
+
case 'sure':
|
89166
|
+
let data = {
|
89167
|
+
faceimg: this.scannerPhotoSrc
|
89168
|
+
};
|
89169
|
+
this.$emit('close', data);
|
89170
|
+
this.visibility = false;
|
89171
|
+
break;
|
89172
|
+
case 'face-auth':
|
89173
|
+
this.faceReaderEvent();
|
89174
|
+
break;
|
89175
|
+
}
|
89176
|
+
},
|
89177
|
+
async faceReaderEvent() {
|
89178
|
+
let idcardInfo;
|
89179
|
+
switch (this.readMachineType) {
|
89180
|
+
case 11:
|
89181
|
+
// 出入境
|
89182
|
+
idcardInfo = await ExitAndEntryPluginService.getReadResult();
|
89183
|
+
if (idcardInfo.info.cardType === '3' // 护照
|
89184
|
+
|| idcardInfo.info.cardType === '12' // 港澳台通行证
|
89185
|
+
|| idcardInfo.info.cardType === '2' // 港澳台身份证
|
89186
|
+
) {
|
89187
|
+
this.compressImage('data:image/png;base64,' + this.scannerPhotoSrc, {
|
89188
|
+
quality: 0.7,
|
89189
|
+
// 压缩后图片的清晰度,取值0-1,不传默认为0.7,值越小,所绘制出的图像越模糊
|
89190
|
+
type: 'jpg'
|
89191
|
+
}).then(async result => {
|
89192
|
+
console.log('压缩结果=>', result);
|
89193
|
+
let res = await ExitAndEntryPluginService.faceAuth(result.replace('data:image/png;base64,', ''));
|
89194
|
+
let data = {
|
89195
|
+
idCard: {
|
89196
|
+
...idcardInfo
|
89197
|
+
},
|
89198
|
+
faceimg: result.replace('data:image/png;base64,', ''),
|
89199
|
+
score: res ? 100 : 0
|
89200
|
+
};
|
89201
|
+
this.$emit('faceReader', data);
|
89202
|
+
});
|
89203
|
+
} else {
|
89204
|
+
this.$message.error('当前证件不支持人脸识别');
|
89205
|
+
}
|
89206
|
+
}
|
89207
|
+
},
|
89208
|
+
compressImage(path, config) {
|
89209
|
+
return new Promise((resolve, reject) => {
|
89210
|
+
let img = new Image();
|
89211
|
+
img.src = path;
|
89212
|
+
img.onload = function () {
|
89213
|
+
let that = this;
|
89214
|
+
let w = that.width * config.quality;
|
89215
|
+
let h = that.height * config.quality;
|
89216
|
+
// let scale = w / h
|
89217
|
+
// w = config.width || config.height * scale
|
89218
|
+
// h = config.height || config.width / scale
|
89219
|
+
let quality = config.quality; // 默认图片质量为0.7
|
89220
|
+
// 生成canvas
|
89221
|
+
let canvas = document.createElement('canvas');
|
89222
|
+
let ctx = canvas.getContext('2d');
|
89223
|
+
// 创建属性节点
|
89224
|
+
let anw = document.createAttribute('width');
|
89225
|
+
anw.nodeValue = String(w);
|
89226
|
+
let anh = document.createAttribute('height');
|
89227
|
+
anh.nodeValue = String(h);
|
89228
|
+
canvas.setAttributeNode(anw);
|
89229
|
+
canvas.setAttributeNode(anh);
|
89230
|
+
ctx.drawImage(that, 0, 0, w, h);
|
89231
|
+
if (config.quality && config.quality <= 1 && config.quality > 0) {
|
89232
|
+
quality = config.quality;
|
89233
|
+
}
|
89234
|
+
let base64 = canvas.toDataURL(config.type, quality);
|
89235
|
+
// let blob = convertBase64UrlToBlob(base64)
|
89236
|
+
// 回调函数返回base64的值,也可根据自己的需求返回blob的值
|
89237
|
+
resolve(base64);
|
89238
|
+
};
|
89239
|
+
});
|
89240
|
+
}
|
89241
|
+
}
|
89242
|
+
});
|
89243
|
+
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=script&lang=js&
|
89244
|
+
/* harmony default export */ var dialog_default_take_photo_dialogvue_type_script_lang_js_ = (default_take_photo_dialogvue_type_script_lang_js_);
|
89245
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.use[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=style&index=0&id=0641aa24&prod&lang=scss&
|
89246
|
+
// extracted by mini-css-extract-plugin
|
89247
|
+
|
89248
|
+
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue?vue&type=style&index=0&id=0641aa24&prod&lang=scss&
|
89249
|
+
|
89250
|
+
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/default-take-photo-dialog.vue
|
89251
|
+
|
89252
|
+
|
89253
|
+
|
89254
|
+
;
|
89255
|
+
|
89256
|
+
|
89257
|
+
/* normalize component */
|
89258
|
+
|
89259
|
+
var default_take_photo_dialog_component = normalizeComponent(
|
89260
|
+
dialog_default_take_photo_dialogvue_type_script_lang_js_,
|
89261
|
+
default_take_photo_dialogvue_type_template_id_0641aa24_render,
|
89262
|
+
default_take_photo_dialogvue_type_template_id_0641aa24_staticRenderFns,
|
89263
|
+
false,
|
89264
|
+
null,
|
89265
|
+
null,
|
89266
|
+
null
|
89267
|
+
|
89268
|
+
)
|
89269
|
+
|
89270
|
+
/* harmony default export */ var default_take_photo_dialog = (default_take_photo_dialog_component.exports);
|
89271
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue?vue&type=template&id=5bbb0afc&scoped=true&
|
89272
|
+
var wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_render = function render() {
|
89273
|
+
var _vm = this,
|
89274
|
+
_c = _vm._self._c;
|
89275
|
+
return _vm.visibility ? _c('el-dialog', {
|
89276
|
+
staticClass: "wei-rong-face-auth-dialog",
|
89277
|
+
attrs: {
|
89278
|
+
"title": "人脸识别",
|
89279
|
+
"top": '5vh',
|
89280
|
+
"width": "640px",
|
89281
|
+
"visible": _vm.visibility,
|
89282
|
+
"close-on-click-modal": false
|
89283
|
+
},
|
89284
|
+
on: {
|
89285
|
+
"update:visible": function ($event) {
|
89286
|
+
_vm.visibility = $event;
|
89287
|
+
}
|
89288
|
+
}
|
89289
|
+
}, [_c('div', {
|
89290
|
+
staticClass: "image-container"
|
89291
|
+
}, [_c('img', {
|
89292
|
+
staticStyle: {
|
89293
|
+
"width": "600px",
|
89294
|
+
"height": "450px"
|
89295
|
+
},
|
89296
|
+
attrs: {
|
89297
|
+
"id": "photo",
|
89298
|
+
"src": _vm.viewFaceImage
|
89299
|
+
}
|
89300
|
+
})])]) : _vm._e();
|
89301
|
+
};
|
89302
|
+
var wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_staticRenderFns = [];
|
89303
|
+
|
89304
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue?vue&type=script&lang=js&
|
89305
|
+
|
89306
|
+
|
89307
|
+
const wei_rong_face_auth_dialogvue_type_script_lang_js_BEGIN_DATA = 'data:image/jpg;base64,';
|
89308
|
+
/* harmony default export */ var wei_rong_face_auth_dialogvue_type_script_lang_js_ = ({
|
89309
|
+
name: "wei-rong-face-auth-dialog",
|
89310
|
+
data: () => {
|
89311
|
+
return {
|
89312
|
+
visibility: true,
|
89313
|
+
viewFaceImage: ''
|
89314
|
+
};
|
89315
|
+
},
|
89316
|
+
async created() {
|
89317
|
+
window.addEventListener(SCANNER_CAMERA_REFRESH_PHOTO_EVENT, message => {
|
89318
|
+
if (message.type === SCANNER_CAMERA_REFRESH_PHOTO_EVENT) {
|
89319
|
+
this.viewFaceImage = `${wei_rong_face_auth_dialogvue_type_script_lang_js_BEGIN_DATA}${message.scannerResultUrl}`;
|
89320
|
+
}
|
89321
|
+
});
|
89322
|
+
let res = await WeiRongPluginService.faceValidateWithIdCardRead();
|
89323
|
+
this.$message.success('认证成功');
|
89324
|
+
setTimeout(() => {
|
89325
|
+
this.$emit('close', res);
|
89326
|
+
}, 1500);
|
89327
|
+
}
|
89328
|
+
});
|
89329
|
+
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue?vue&type=script&lang=js&
|
89330
|
+
/* harmony default export */ var dialog_wei_rong_face_auth_dialogvue_type_script_lang_js_ = (wei_rong_face_auth_dialogvue_type_script_lang_js_);
|
89331
|
+
;// CONCATENATED MODULE: ./packages/id-card-reader/id-card-reader-button/src/dialog/wei-rong-face-auth-dialog.vue
|
89332
|
+
|
89333
|
+
|
89334
|
+
|
89335
|
+
|
89336
|
+
|
89337
|
+
/* normalize component */
|
89338
|
+
;
|
89339
|
+
var wei_rong_face_auth_dialog_component = normalizeComponent(
|
89340
|
+
dialog_wei_rong_face_auth_dialogvue_type_script_lang_js_,
|
89341
|
+
wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_render,
|
89342
|
+
wei_rong_face_auth_dialogvue_type_template_id_5bbb0afc_scoped_true_staticRenderFns,
|
89343
|
+
false,
|
89344
|
+
null,
|
89345
|
+
"5bbb0afc",
|
89346
|
+
null
|
89347
|
+
|
89348
|
+
)
|
89349
|
+
|
89350
|
+
/* harmony default export */ var wei_rong_face_auth_dialog = (wei_rong_face_auth_dialog_component.exports);
|
88518
89351
|
;// CONCATENATED MODULE: ./packages/service/external-plugins/pu-tian-plugin.service.ts
|
88519
89352
|
|
88520
89353
|
|
@@ -88640,6 +89473,261 @@ class PuTianPluginService {
|
|
88640
89473
|
_defineProperty(PuTianPluginService, "idCardWebSocketUrl", 'http://127.0.0.1:10012');
|
88641
89474
|
_defineProperty(PuTianPluginService, "ws", void 0);
|
88642
89475
|
_defineProperty(PuTianPluginService, "requestStore", []);
|
89476
|
+
;// CONCATENATED MODULE: ./packages/service/external-plugins/jing-lun-plugin.service.ts
|
89477
|
+
|
89478
|
+
/**
|
89479
|
+
* @author: lvcy
|
89480
|
+
* @date: 2025-04-28 14:17
|
89481
|
+
* @description:精伦读卡器
|
89482
|
+
*/
|
89483
|
+
|
89484
|
+
class JingLunPluginService {
|
89485
|
+
static async read(method) {
|
89486
|
+
let url = '';
|
89487
|
+
switch (method) {
|
89488
|
+
case 'ReadIDCard_Base64':
|
89489
|
+
url = this.idCardWebSocketUrl + '/api/readCard';
|
89490
|
+
break;
|
89491
|
+
}
|
89492
|
+
let res = await custom_axios_CustomAxios.post(url, {});
|
89493
|
+
return res;
|
89494
|
+
}
|
89495
|
+
static async idCardRead() {
|
89496
|
+
const readData = await JingLunPluginService.read('ReadIDCard_Base64');
|
89497
|
+
if (readData.resultFlag === 0) {
|
89498
|
+
let data = readData.resultContent;
|
89499
|
+
let type = '1',
|
89500
|
+
name = data.partyName,
|
89501
|
+
sex = data.gender === 1 ? '男' : '女',
|
89502
|
+
nation = data.nation,
|
89503
|
+
nationality = '中国',
|
89504
|
+
birthday = data.bornDay,
|
89505
|
+
address = data.certAddress,
|
89506
|
+
cardId = data.certNumber,
|
89507
|
+
police = data.certOrg,
|
89508
|
+
validStart = data.effDate,
|
89509
|
+
validEnd = data.expDate,
|
89510
|
+
base64_ID = data.identityPic;
|
89511
|
+
const IDCardData = {
|
89512
|
+
info: {
|
89513
|
+
cardType: type,
|
89514
|
+
nationality,
|
89515
|
+
name,
|
89516
|
+
sex,
|
89517
|
+
birthday,
|
89518
|
+
address,
|
89519
|
+
cardId,
|
89520
|
+
nation,
|
89521
|
+
police,
|
89522
|
+
validStart,
|
89523
|
+
validEnd
|
89524
|
+
},
|
89525
|
+
headImage: base64_ID
|
89526
|
+
};
|
89527
|
+
console.log(IDCardData);
|
89528
|
+
return IDCardData;
|
89529
|
+
} else {
|
89530
|
+
throw Error('未匹配可用的读卡器');
|
89531
|
+
}
|
89532
|
+
}
|
89533
|
+
}
|
89534
|
+
_defineProperty(JingLunPluginService, "idCardWebSocketUrl", 'http://127.0.0.1:18889');
|
89535
|
+
;// CONCATENATED MODULE: ./packages/service/external-plugins/han-wang-plugin.service.ts
|
89536
|
+
|
89537
|
+
|
89538
|
+
/**
|
89539
|
+
* @author: lvcy
|
89540
|
+
* @date: 2025-04-24 10:55
|
89541
|
+
* @description:汉王签字板
|
89542
|
+
*/
|
89543
|
+
|
89544
|
+
|
89545
|
+
var HanWangMethodCode;
|
89546
|
+
(function (HanWangMethodCode) {
|
89547
|
+
// 初始化
|
89548
|
+
HanWangMethodCode["Init"] = "init";
|
89549
|
+
// 打开设备(开始签名)
|
89550
|
+
HanWangMethodCode["StartSignName"] = "startSignName";
|
89551
|
+
// 关闭设备
|
89552
|
+
HanWangMethodCode["Close"] = "close";
|
89553
|
+
// 重新签名
|
89554
|
+
HanWangMethodCode["SignNameAgain"] = "signNameAgain";
|
89555
|
+
// 获取签名图片
|
89556
|
+
HanWangMethodCode["GetSign"] = "GetSign";
|
89557
|
+
})(HanWangMethodCode || (HanWangMethodCode = {}));
|
89558
|
+
class HanWangPluginService {
|
89559
|
+
static startConnect() {
|
89560
|
+
if (this.ws && this.ws.readyState === WebSocket.OPEN) {
|
89561
|
+
return this;
|
89562
|
+
}
|
89563
|
+
const ws = new WebSocket(this.linuxWebServiceUrl);
|
89564
|
+
let resolved;
|
89565
|
+
const onConnect = new Promise(resolve => {
|
89566
|
+
resolved = resolve;
|
89567
|
+
});
|
89568
|
+
ws.onopen = () => {
|
89569
|
+
resolved(true);
|
89570
|
+
};
|
89571
|
+
ws.onmessage = event => {
|
89572
|
+
this.handleMessage(event);
|
89573
|
+
};
|
89574
|
+
ws.onclose = () => this.handleClose();
|
89575
|
+
ws.onerror = e => this.handleError(e);
|
89576
|
+
this.ws = ws;
|
89577
|
+
return onConnect;
|
89578
|
+
}
|
89579
|
+
static handleMessage(msg) {
|
89580
|
+
let data = {};
|
89581
|
+
try {
|
89582
|
+
data = JSON.parse(msg.data);
|
89583
|
+
} catch (e) {
|
89584
|
+
data = {};
|
89585
|
+
}
|
89586
|
+
console.log('message=>', data);
|
89587
|
+
if (data.HWPenSign === 'HWGetSign' && data.msgID == '0') {
|
89588
|
+
const event = new SignResultEvent(data.message);
|
89589
|
+
return window.dispatchEvent(event);
|
89590
|
+
}
|
89591
|
+
this.requestStore.forEach(({
|
89592
|
+
resolve
|
89593
|
+
}) => {
|
89594
|
+
resolve(data);
|
89595
|
+
});
|
89596
|
+
this.requestStore = [];
|
89597
|
+
// this.ws.close();
|
89598
|
+
}
|
89599
|
+
|
89600
|
+
static handleError(e) {
|
89601
|
+
for (const type in this.requestStore) {
|
89602
|
+
this.requestStore.forEach(({
|
89603
|
+
reject
|
89604
|
+
}) => {
|
89605
|
+
reject('handleError');
|
89606
|
+
});
|
89607
|
+
}
|
89608
|
+
}
|
89609
|
+
static handleClose() {
|
89610
|
+
for (const type in this.requestStore) {
|
89611
|
+
this.requestStore.forEach(({
|
89612
|
+
reject
|
89613
|
+
}) => {
|
89614
|
+
reject('close');
|
89615
|
+
});
|
89616
|
+
}
|
89617
|
+
}
|
89618
|
+
static async read(method) {
|
89619
|
+
let url = '',
|
89620
|
+
data = {};
|
89621
|
+
switch (method) {
|
89622
|
+
case HanWangMethodCode.Init:
|
89623
|
+
data = {};
|
89624
|
+
url = this.windowsWebServiceUrl + '/HWPenSign/HWGetDeviceStatus';
|
89625
|
+
break;
|
89626
|
+
case HanWangMethodCode.StartSignName:
|
89627
|
+
data = {
|
89628
|
+
nLogo: "? ",
|
89629
|
+
nPenwidth: "2",
|
89630
|
+
nOrgX: "100",
|
89631
|
+
nOrgY: "200",
|
89632
|
+
width: "500",
|
89633
|
+
height: "300",
|
89634
|
+
fingerFap: "2",
|
89635
|
+
key: "4A05564228DF2C64AF2E137B71A4E7A3"
|
89636
|
+
};
|
89637
|
+
url = this.windowsWebServiceUrl + '/HWPenSign/HWInitialize';
|
89638
|
+
break;
|
89639
|
+
case HanWangMethodCode.GetSign:
|
89640
|
+
data = {
|
89641
|
+
nImageType: "3",
|
89642
|
+
nImageWidth: "500",
|
89643
|
+
nImageHeight: "300"
|
89644
|
+
};
|
89645
|
+
url = this.windowsWebServiceUrl + '/HWPenSign/HWGetSign';
|
89646
|
+
break;
|
89647
|
+
}
|
89648
|
+
let res = await custom_axios_CustomAxios.get(url);
|
89649
|
+
return res;
|
89650
|
+
}
|
89651
|
+
static async readInLinux(methodCode) {
|
89652
|
+
await this.startConnect();
|
89653
|
+
if (this.ws.readyState === 1) {
|
89654
|
+
let param = '';
|
89655
|
+
switch (methodCode) {
|
89656
|
+
case HanWangMethodCode.Init:
|
89657
|
+
param = JSON.stringify({
|
89658
|
+
HWPenSign: 'HWGetDeviceStatus'
|
89659
|
+
});
|
89660
|
+
break;
|
89661
|
+
case HanWangMethodCode.StartSignName:
|
89662
|
+
param = JSON.stringify({
|
89663
|
+
nOrgX: 400,
|
89664
|
+
nOrgY: 350,
|
89665
|
+
nWidth: 600,
|
89666
|
+
nHeight: 400,
|
89667
|
+
showDialog: 1,
|
89668
|
+
nImageWidth: 250,
|
89669
|
+
nImageHeight: 150,
|
89670
|
+
nConfirmTimeout: 30,
|
89671
|
+
fingerCap: 1
|
89672
|
+
});
|
89673
|
+
break;
|
89674
|
+
}
|
89675
|
+
this.ws.send(param);
|
89676
|
+
return new Promise((resolve, reject) => {
|
89677
|
+
if (!this.requestStore) {
|
89678
|
+
this.requestStore = [];
|
89679
|
+
}
|
89680
|
+
this.requestStore.push({
|
89681
|
+
resolve,
|
89682
|
+
reject
|
89683
|
+
});
|
89684
|
+
});
|
89685
|
+
}
|
89686
|
+
}
|
89687
|
+
static async signNameRead() {
|
89688
|
+
return new Promise(async resolve => {
|
89689
|
+
if (this._isLinux) {
|
89690
|
+
// 国产环境
|
89691
|
+
let res = await HanWangPluginService.readInLinux(HanWangMethodCode.Init);
|
89692
|
+
console.log('初始化=>', res);
|
89693
|
+
if (res.msgID == 0) {
|
89694
|
+
let signRes = await HanWangPluginService.readInLinux(HanWangMethodCode.StartSignName);
|
89695
|
+
console.log('签字=>', signRes);
|
89696
|
+
if (signRes.msgID == 0) {
|
89697
|
+
resolve('');
|
89698
|
+
}
|
89699
|
+
} else {
|
89700
|
+
throw Error('统一插件平台设备未准备完成');
|
89701
|
+
}
|
89702
|
+
} else {
|
89703
|
+
// windows
|
89704
|
+
// 链接
|
89705
|
+
let status = await HanWangPluginService.read(HanWangMethodCode.Init);
|
89706
|
+
if (status.msgID !== '0') {
|
89707
|
+
throw Error('统一插件平台设备未准备完成');
|
89708
|
+
}
|
89709
|
+
// 签字
|
89710
|
+
let res = await HanWangPluginService.read(HanWangMethodCode.StartSignName);
|
89711
|
+
if (res.msgID !== '0') {
|
89712
|
+
throw Error('统一插件平台设备未准备完成');
|
89713
|
+
}
|
89714
|
+
// 获取签字照片
|
89715
|
+
let timer = setInterval(async () => {
|
89716
|
+
let signRes = await HanWangPluginService.read(HanWangMethodCode.GetSign);
|
89717
|
+
if (signRes.msgID === '0') {
|
89718
|
+
clearInterval(timer);
|
89719
|
+
resolve(signRes.message.replace('data:image/png;base64,', ''));
|
89720
|
+
}
|
89721
|
+
}, 2000);
|
89722
|
+
}
|
89723
|
+
});
|
89724
|
+
}
|
89725
|
+
}
|
89726
|
+
_defineProperty(HanWangPluginService, "windowsWebServiceUrl", 'http://127.0.0.1:29999');
|
89727
|
+
_defineProperty(HanWangPluginService, "linuxWebServiceUrl", 'ws://127.0.0.1:29999');
|
89728
|
+
_defineProperty(HanWangPluginService, "ws", void 0);
|
89729
|
+
_defineProperty(HanWangPluginService, "requestStore", []);
|
89730
|
+
_defineProperty(HanWangPluginService, "_isLinux", String(navigator.platform).indexOf("Linux") > -1);
|
88643
89731
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/id-card-reader-button.vue?vue&type=script&lang=js&
|
88644
89732
|
|
88645
89733
|
|
@@ -88658,6 +89746,9 @@ _defineProperty(PuTianPluginService, "requestStore", []);
|
|
88658
89746
|
|
88659
89747
|
|
88660
89748
|
|
89749
|
+
|
89750
|
+
|
89751
|
+
|
88661
89752
|
/* harmony default export */ var id_card_reader_buttonvue_type_script_lang_js_ = ({
|
88662
89753
|
name: 'id-card-reader-button',
|
88663
89754
|
props: {
|
@@ -88820,52 +89911,69 @@ _defineProperty(PuTianPluginService, "requestStore", []);
|
|
88820
89911
|
let idcardInfo;
|
88821
89912
|
switch (this.readMachineType) {
|
88822
89913
|
case 0:
|
89914
|
+
// 不动产集成工具(普天/精伦)
|
88823
89915
|
idcardInfo = await IdCardReadService.idCardCommonRead();
|
88824
89916
|
this.$emit('click', idcardInfo);
|
88825
89917
|
break;
|
88826
89918
|
case 1:
|
89919
|
+
// 丽水一体机
|
88827
89920
|
return this.readLSIDCard();
|
88828
89921
|
case 2:
|
89922
|
+
// 沃斯德人证交互终端
|
88829
89923
|
idcardInfo = await EWindowPassService.idCardRead();
|
88830
89924
|
this.$emit('click', idcardInfo);
|
88831
89925
|
break;
|
88832
89926
|
case 3:
|
89927
|
+
// 中正人脸识别
|
88833
89928
|
const data = await MRAdbReadService.idCardRead();
|
88834
89929
|
if (data) idcardInfo = data.idCard;
|
88835
89930
|
this.$emit('click', idcardInfo);
|
88836
89931
|
break;
|
88837
89932
|
case 4:
|
89933
|
+
// 华大读卡器
|
88838
89934
|
idcardInfo = await HuzReadService.idCardRead();
|
88839
89935
|
this.$emit('click', idcardInfo);
|
88840
89936
|
break;
|
88841
89937
|
case 5:
|
89938
|
+
// 良田
|
88842
89939
|
idcardInfo = await ELoamPassService.idCardRead();
|
88843
89940
|
this.$emit('click', idcardInfo);
|
88844
89941
|
break;
|
88845
89942
|
case 6:
|
89943
|
+
// 捷宇信息交互终端
|
88846
89944
|
idcardInfo = await JieYueService.idCardRead();
|
88847
89945
|
this.$emit('click', idcardInfo);
|
88848
89946
|
break;
|
88849
89947
|
case 8:
|
89948
|
+
// 华视电子
|
88850
89949
|
idcardInfo = await HuaShiService.idCardRead();
|
88851
89950
|
this.$emit('click', idcardInfo);
|
88852
89951
|
break;
|
88853
89952
|
case 9:
|
89953
|
+
// 捷宇高拍仪
|
88854
89954
|
idcardInfo = await JieYueService.idCardReadByScanner();
|
88855
89955
|
this.$emit('click', idcardInfo);
|
88856
89956
|
break;
|
88857
89957
|
case 10:
|
89958
|
+
// 维融国产一体机
|
88858
89959
|
idcardInfo = await WeiRongPluginService.idCardRead();
|
88859
89960
|
this.$emit('click', idcardInfo);
|
88860
89961
|
break;
|
88861
89962
|
case 11:
|
89963
|
+
// 出入境
|
88862
89964
|
idcardInfo = await ExitAndEntryPluginService.getReadResult();
|
88863
89965
|
this.$emit('click', idcardInfo);
|
88864
89966
|
break;
|
88865
89967
|
case 12:
|
89968
|
+
// 普天
|
88866
89969
|
idcardInfo = await PuTianPluginService.idCardRead();
|
88867
89970
|
this.$emit('click', idcardInfo);
|
88868
89971
|
break;
|
89972
|
+
case 13:
|
89973
|
+
// 精伦
|
89974
|
+
idcardInfo = await JingLunPluginService.idCardRead();
|
89975
|
+
this.$emit('click', idcardInfo);
|
89976
|
+
break;
|
88869
89977
|
default:
|
88870
89978
|
this.$message.warning('请在首页右上角我的设备中设置读卡器选项!');
|
88871
89979
|
break;
|
@@ -88878,38 +89986,49 @@ _defineProperty(PuTianPluginService, "requestStore", []);
|
|
88878
89986
|
switch (this.readMachineType) {
|
88879
89987
|
case 0:
|
88880
89988
|
{
|
89989
|
+
// 默认
|
88881
89990
|
// const realPicture = await CameraReadService.read()
|
88882
89991
|
// this.$emit('click', { faceimg: realPicture })
|
88883
89992
|
this.readFacePhotoByDefault();
|
88884
89993
|
break;
|
88885
89994
|
}
|
88886
89995
|
case 1:
|
89996
|
+
// 丽水一体机
|
88887
89997
|
this.readLSIDCardAndMatchFace();
|
88888
89998
|
break;
|
88889
89999
|
case 2:
|
88890
90000
|
{
|
90001
|
+
// 沃斯德人证交互终端
|
88891
90002
|
const data = await EWindowPassService.faceValidateWithIdCardRead();
|
88892
90003
|
this.$emit('click', data);
|
88893
90004
|
break;
|
88894
90005
|
}
|
88895
90006
|
case 3:
|
88896
90007
|
{
|
90008
|
+
// 中正人脸识别
|
88897
90009
|
const data = await MRAdbReadService.idCardRead();
|
88898
90010
|
this.$emit('click', data);
|
88899
90011
|
break;
|
88900
90012
|
}
|
88901
90013
|
case 5:
|
90014
|
+
// 良田
|
88902
90015
|
this.readFacePhotoByELoam();
|
88903
90016
|
break;
|
88904
90017
|
case 6:
|
88905
90018
|
{
|
90019
|
+
// 捷宇信息交互终端
|
88906
90020
|
const data = await JieYueService.faceValidateWithIdCardRead();
|
88907
90021
|
this.$emit('click', data);
|
88908
90022
|
break;
|
88909
90023
|
}
|
88910
90024
|
case 10:
|
90025
|
+
// 国产客户端一体机
|
88911
90026
|
this.openWEIRONGFaceValidateDialog();
|
88912
90027
|
break;
|
90028
|
+
case 11:
|
90029
|
+
// 出入境设备
|
90030
|
+
this.readFacePhotoByDefault(this.readMachineType);
|
90031
|
+
break;
|
88913
90032
|
default:
|
88914
90033
|
this.$message.warning('请在首页右上角我的设备中设置读拍照/人脸识别选项!');
|
88915
90034
|
break;
|
@@ -88947,16 +90066,19 @@ _defineProperty(PuTianPluginService, "requestStore", []);
|
|
88947
90066
|
let userSignature = '';
|
88948
90067
|
switch (this.readMachineType) {
|
88949
90068
|
case 0:
|
90069
|
+
// 有为签字板
|
88950
90070
|
userSignature = await SignReadService.read();
|
88951
90071
|
break;
|
88952
90072
|
case 1:
|
90073
|
+
// 汉王签字板
|
88953
90074
|
userSignature = await SignReadService.read(PluginApiType.hwSign);
|
88954
90075
|
break;
|
88955
90076
|
case 2:
|
90077
|
+
// 沃斯德人证交互终端签字
|
88956
90078
|
userSignature = await EWindowPassService.signNameRead();
|
88957
90079
|
break;
|
88958
90080
|
case 3:
|
88959
|
-
//
|
90081
|
+
// 捷宇信息交互终端签字板
|
88960
90082
|
const data = await JieYueService.signNameRead(this.filePath);
|
88961
90083
|
const SignNameBase64 = data.SignNameBase64 ? JSON.parse(data.SignNameBase64) : {
|
88962
90084
|
SignName0: ''
|
@@ -88977,8 +90099,21 @@ _defineProperty(PuTianPluginService, "requestStore", []);
|
|
88977
90099
|
}
|
88978
90100
|
break;
|
88979
90101
|
case 5:
|
90102
|
+
// 维融国产一体机
|
88980
90103
|
userSignature = await WeiRongPluginService.signNameRead();
|
88981
90104
|
break;
|
90105
|
+
case 7:
|
90106
|
+
if (HanWangPluginService._isLinux) {
|
90107
|
+
window.addEventListener(SIGN_PHOTO_EVENT, message => {
|
90108
|
+
if (message.type === SIGN_PHOTO_EVENT) {
|
90109
|
+
userSignature = message.signResultUrl;
|
90110
|
+
}
|
90111
|
+
});
|
90112
|
+
await HanWangPluginService.signNameRead();
|
90113
|
+
} else {
|
90114
|
+
userSignature = await HanWangPluginService.signNameRead();
|
90115
|
+
}
|
90116
|
+
break;
|
88982
90117
|
default:
|
88983
90118
|
this.$message.warning('请在首页右上角我的设备中设置签字板选项!');
|
88984
90119
|
break;
|
@@ -89055,14 +90190,21 @@ _defineProperty(PuTianPluginService, "requestStore", []);
|
|
89055
90190
|
}).$mount(modalNode);
|
89056
90191
|
},
|
89057
90192
|
// 默认浏览器自带拍照
|
89058
|
-
readFacePhotoByDefault() {
|
90193
|
+
readFacePhotoByDefault(readMachineType = 0) {
|
89059
90194
|
const modalNode = document.createElement('div');
|
89060
90195
|
document.body.appendChild(modalNode);
|
89061
90196
|
const vm = new (external_commonjs_vue_commonjs2_vue_root_Vue_default())({
|
89062
90197
|
render: h => {
|
89063
90198
|
return h(default_take_photo_dialog, {
|
89064
|
-
props: {
|
90199
|
+
props: {
|
90200
|
+
readMachineType
|
90201
|
+
},
|
89065
90202
|
on: {
|
90203
|
+
faceReader: data => {
|
90204
|
+
this.$emit('click', data);
|
90205
|
+
vm.$destroy();
|
90206
|
+
vm.$el.remove();
|
90207
|
+
},
|
89066
90208
|
close: data => {
|
89067
90209
|
if (data) {
|
89068
90210
|
console.log('浏览器自带拍照=>', data);
|
@@ -89105,11 +90247,11 @@ _defineProperty(PuTianPluginService, "requestStore", []);
|
|
89105
90247
|
;
|
89106
90248
|
var id_card_reader_button_component = normalizeComponent(
|
89107
90249
|
src_id_card_reader_buttonvue_type_script_lang_js_,
|
89108
|
-
|
89109
|
-
|
90250
|
+
id_card_reader_buttonvue_type_template_id_617b7fd0_scoped_true_render,
|
90251
|
+
id_card_reader_buttonvue_type_template_id_617b7fd0_scoped_true_staticRenderFns,
|
89110
90252
|
false,
|
89111
90253
|
null,
|
89112
|
-
"
|
90254
|
+
"617b7fd0",
|
89113
90255
|
null
|
89114
90256
|
|
89115
90257
|
)
|
@@ -89124,6 +90266,855 @@ id_card_reader_button.install = Vue => {
|
|
89124
90266
|
Vue.component(id_card_reader_button.name, id_card_reader_button);
|
89125
90267
|
};
|
89126
90268
|
/* harmony default export */ var id_card_reader_id_card_reader_button = (id_card_reader_button);
|
90269
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/scanner/scanner-nko/src/scanner-nko.vue?vue&type=template&id=304bcec5&
|
90270
|
+
var scanner_nkovue_type_template_id_304bcec5_render = function render() {
|
90271
|
+
var _vm = this,
|
90272
|
+
_c = _vm._self._c;
|
90273
|
+
return _c('el-container', {
|
90274
|
+
directives: [{
|
90275
|
+
name: "loading",
|
90276
|
+
rawName: "v-loading",
|
90277
|
+
value: _vm.pageLoading,
|
90278
|
+
expression: "pageLoading"
|
90279
|
+
}],
|
90280
|
+
staticClass: "scanner-nko",
|
90281
|
+
attrs: {
|
90282
|
+
"element-loading-text": _vm.pageLoadingText
|
90283
|
+
}
|
90284
|
+
}, [_c('el-aside', {
|
90285
|
+
staticClass: "container-aside"
|
90286
|
+
}, [_c('div', {
|
90287
|
+
staticClass: "container-title"
|
90288
|
+
}, [_vm._v("扫描配置")]), _c('div', {
|
90289
|
+
staticClass: "scan-config-form"
|
90290
|
+
}, [_c('el-form', {
|
90291
|
+
attrs: {
|
90292
|
+
"model": _vm.scanConfig,
|
90293
|
+
"label-position": "right",
|
90294
|
+
"label-width": "72px",
|
90295
|
+
"disabled": !_vm.deviceOpend
|
90296
|
+
}
|
90297
|
+
}, [_c('el-form-item', {
|
90298
|
+
attrs: {
|
90299
|
+
"label": "扫描源"
|
90300
|
+
}
|
90301
|
+
}, [_c('el-select', {
|
90302
|
+
attrs: {
|
90303
|
+
"disabled": _vm.deviceWorking,
|
90304
|
+
"placeholder": "请选择扫描源"
|
90305
|
+
},
|
90306
|
+
on: {
|
90307
|
+
"change": _vm.openDeivce
|
90308
|
+
},
|
90309
|
+
model: {
|
90310
|
+
value: _vm.scanConfig.deviceId,
|
90311
|
+
callback: function ($$v) {
|
90312
|
+
_vm.$set(_vm.scanConfig, "deviceId", $$v);
|
90313
|
+
},
|
90314
|
+
expression: "scanConfig.deviceId"
|
90315
|
+
}
|
90316
|
+
}, _vm._l(_vm.deviceList, function (item) {
|
90317
|
+
return _c('el-option', {
|
90318
|
+
key: item.deviceId,
|
90319
|
+
attrs: {
|
90320
|
+
"label": item.deviceId,
|
90321
|
+
"value": item.deviceId
|
90322
|
+
}
|
90323
|
+
});
|
90324
|
+
}), 1)], 1)], 1), _c('el-form', {
|
90325
|
+
attrs: {
|
90326
|
+
"model": _vm.scanConfig,
|
90327
|
+
"label-position": "right",
|
90328
|
+
"label-width": "72px",
|
90329
|
+
"disabled": !_vm.isDeviceReady
|
90330
|
+
}
|
90331
|
+
}, [_c('el-form-item', {
|
90332
|
+
attrs: {
|
90333
|
+
"label": "进纸模式"
|
90334
|
+
}
|
90335
|
+
}, [_c('el-select', {
|
90336
|
+
attrs: {
|
90337
|
+
"placeholder": "请选择进纸模式"
|
90338
|
+
},
|
90339
|
+
model: {
|
90340
|
+
value: _vm.scanConfig.source,
|
90341
|
+
callback: function ($$v) {
|
90342
|
+
_vm.$set(_vm.scanConfig, "source", $$v);
|
90343
|
+
},
|
90344
|
+
expression: "scanConfig.source"
|
90345
|
+
}
|
90346
|
+
}, _vm._l(_vm.sourceOptions, function (item) {
|
90347
|
+
return _c('el-option', {
|
90348
|
+
key: item,
|
90349
|
+
attrs: {
|
90350
|
+
"label": item,
|
90351
|
+
"value": item
|
90352
|
+
}
|
90353
|
+
});
|
90354
|
+
}), 1)], 1), _c('el-form-item', {
|
90355
|
+
attrs: {
|
90356
|
+
"label": "扫描颜色"
|
90357
|
+
}
|
90358
|
+
}, [_c('el-select', {
|
90359
|
+
attrs: {
|
90360
|
+
"placeholder": "请选择"
|
90361
|
+
},
|
90362
|
+
model: {
|
90363
|
+
value: _vm.scanConfig.mode,
|
90364
|
+
callback: function ($$v) {
|
90365
|
+
_vm.$set(_vm.scanConfig, "mode", $$v);
|
90366
|
+
},
|
90367
|
+
expression: "scanConfig.mode"
|
90368
|
+
}
|
90369
|
+
}, _vm._l(_vm.modeOptions, function (item) {
|
90370
|
+
return _c('el-option', {
|
90371
|
+
key: item,
|
90372
|
+
attrs: {
|
90373
|
+
"label": item,
|
90374
|
+
"value": item
|
90375
|
+
}
|
90376
|
+
});
|
90377
|
+
}), 1)], 1), _c('el-form-item', {
|
90378
|
+
attrs: {
|
90379
|
+
"label": "分辨率"
|
90380
|
+
}
|
90381
|
+
}, [_c('el-select', {
|
90382
|
+
attrs: {
|
90383
|
+
"placeholder": "请选择分辨率"
|
90384
|
+
},
|
90385
|
+
model: {
|
90386
|
+
value: _vm.scanConfig.resolution,
|
90387
|
+
callback: function ($$v) {
|
90388
|
+
_vm.$set(_vm.scanConfig, "resolution", $$v);
|
90389
|
+
},
|
90390
|
+
expression: "scanConfig.resolution"
|
90391
|
+
}
|
90392
|
+
}, _vm._l(_vm.resolutionOptions, function (item) {
|
90393
|
+
return _c('el-option', {
|
90394
|
+
key: item,
|
90395
|
+
attrs: {
|
90396
|
+
"label": item,
|
90397
|
+
"value": item
|
90398
|
+
}
|
90399
|
+
});
|
90400
|
+
}), 1)], 1), _c('el-form-item', {
|
90401
|
+
attrs: {
|
90402
|
+
"label": "纸张类型"
|
90403
|
+
}
|
90404
|
+
}, [_c('el-select', {
|
90405
|
+
attrs: {
|
90406
|
+
"placeholder": "请选择纸张类型"
|
90407
|
+
},
|
90408
|
+
model: {
|
90409
|
+
value: _vm.scanConfig.paperSize,
|
90410
|
+
callback: function ($$v) {
|
90411
|
+
_vm.$set(_vm.scanConfig, "paperSize", $$v);
|
90412
|
+
},
|
90413
|
+
expression: "scanConfig.paperSize"
|
90414
|
+
}
|
90415
|
+
}, _vm._l(_vm.paperSizeOptions, function (item) {
|
90416
|
+
return _c('el-option', {
|
90417
|
+
key: item,
|
90418
|
+
attrs: {
|
90419
|
+
"label": item,
|
90420
|
+
"value": item
|
90421
|
+
}
|
90422
|
+
});
|
90423
|
+
}), 1)], 1), _c('el-form-item', {
|
90424
|
+
attrs: {
|
90425
|
+
"label": "文件格式"
|
90426
|
+
}
|
90427
|
+
}, [_c('el-select', {
|
90428
|
+
attrs: {
|
90429
|
+
"placeholder": "请选择"
|
90430
|
+
},
|
90431
|
+
model: {
|
90432
|
+
value: _vm.scanConfig.fileFormat,
|
90433
|
+
callback: function ($$v) {
|
90434
|
+
_vm.$set(_vm.scanConfig, "fileFormat", $$v);
|
90435
|
+
},
|
90436
|
+
expression: "scanConfig.fileFormat"
|
90437
|
+
}
|
90438
|
+
}, _vm._l(_vm.fileFormatOptions, function (item) {
|
90439
|
+
return _c('el-option', {
|
90440
|
+
key: item,
|
90441
|
+
attrs: {
|
90442
|
+
"label": item,
|
90443
|
+
"value": item
|
90444
|
+
}
|
90445
|
+
});
|
90446
|
+
}), 1)], 1)], 1), _c('div', {
|
90447
|
+
staticClass: "text-right"
|
90448
|
+
}, [_c('el-button', {
|
90449
|
+
attrs: {
|
90450
|
+
"type": "primary"
|
90451
|
+
},
|
90452
|
+
on: {
|
90453
|
+
"click": _vm.initScanServiceAPI
|
90454
|
+
}
|
90455
|
+
}, [_vm._v("连接")]), _c('el-button', {
|
90456
|
+
attrs: {
|
90457
|
+
"type": "primary",
|
90458
|
+
"disabled": !_vm.isDeviceReady || _vm.deviceWorking
|
90459
|
+
},
|
90460
|
+
on: {
|
90461
|
+
"click": _vm.doScan
|
90462
|
+
}
|
90463
|
+
}, [_vm._v("扫描")])], 1)], 1)]), _c('el-container', [_c('el-main', {
|
90464
|
+
staticClass: "container-main"
|
90465
|
+
}, [_c('div', {
|
90466
|
+
staticClass: "container-title"
|
90467
|
+
}, [_vm._v("扫描结果")]), _c('el-checkbox', {
|
90468
|
+
attrs: {
|
90469
|
+
"indeterminate": _vm.isIndeterminate
|
90470
|
+
},
|
90471
|
+
on: {
|
90472
|
+
"change": _vm.handleCheckAllChange
|
90473
|
+
},
|
90474
|
+
model: {
|
90475
|
+
value: _vm.checkAll,
|
90476
|
+
callback: function ($$v) {
|
90477
|
+
_vm.checkAll = $$v;
|
90478
|
+
},
|
90479
|
+
expression: "checkAll"
|
90480
|
+
}
|
90481
|
+
}, [_vm._v("全选")]), _c('div', {
|
90482
|
+
staticClass: "image-list"
|
90483
|
+
}, _vm._l(_vm.scanFileList, function (item, index) {
|
90484
|
+
return _c('div', {
|
90485
|
+
key: item.name,
|
90486
|
+
class: {
|
90487
|
+
'image-list-item': true,
|
90488
|
+
'image-checked': item.checked
|
90489
|
+
}
|
90490
|
+
}, [_c('el-image', {
|
90491
|
+
attrs: {
|
90492
|
+
"src": item.url,
|
90493
|
+
"preview-src-list": _vm.imgUrls,
|
90494
|
+
"initial-index": _vm.initialIndex
|
90495
|
+
},
|
90496
|
+
on: {
|
90497
|
+
"click": function ($event) {
|
90498
|
+
return _vm.previewImg(index);
|
90499
|
+
}
|
90500
|
+
}
|
90501
|
+
}), _c('div', {
|
90502
|
+
staticClass: "image-actions"
|
90503
|
+
}, [_c('el-checkbox', {
|
90504
|
+
on: {
|
90505
|
+
"change": _vm.handleCheckedChange
|
90506
|
+
},
|
90507
|
+
model: {
|
90508
|
+
value: item.checked,
|
90509
|
+
callback: function ($$v) {
|
90510
|
+
_vm.$set(item, "checked", $$v);
|
90511
|
+
},
|
90512
|
+
expression: "item.checked"
|
90513
|
+
}
|
90514
|
+
}, [_vm._v(_vm._s(item.name))]), _c('el-button', {
|
90515
|
+
staticStyle: {
|
90516
|
+
"color": "red"
|
90517
|
+
},
|
90518
|
+
attrs: {
|
90519
|
+
"type": "text",
|
90520
|
+
"icon": "el-icon-delete"
|
90521
|
+
},
|
90522
|
+
on: {
|
90523
|
+
"click": function ($event) {
|
90524
|
+
return _vm.deleteFileEvent(index);
|
90525
|
+
}
|
90526
|
+
}
|
90527
|
+
}), _c('el-button', {
|
90528
|
+
attrs: {
|
90529
|
+
"type": "text",
|
90530
|
+
"icon": "el-icon-upload2"
|
90531
|
+
},
|
90532
|
+
on: {
|
90533
|
+
"click": function ($event) {
|
90534
|
+
return _vm.sendScannerResult(item);
|
90535
|
+
}
|
90536
|
+
}
|
90537
|
+
})], 1)], 1);
|
90538
|
+
}), 0)], 1), _c('el-footer', [_c('div', {
|
90539
|
+
staticClass: "text-right"
|
90540
|
+
}, [_c('el-button', {
|
90541
|
+
attrs: {
|
90542
|
+
"size": "small",
|
90543
|
+
"type": "primary",
|
90544
|
+
"disabled": _vm.scanFileList.length === 0
|
90545
|
+
},
|
90546
|
+
on: {
|
90547
|
+
"click": _vm.clearImgList
|
90548
|
+
}
|
90549
|
+
}, [_vm._v("清空")]), _c('el-button', {
|
90550
|
+
attrs: {
|
90551
|
+
"size": "small",
|
90552
|
+
"type": "primary",
|
90553
|
+
"disabled": _vm.scanFileList.length === 0
|
90554
|
+
},
|
90555
|
+
on: {
|
90556
|
+
"click": _vm.batchDelFilesEvent
|
90557
|
+
}
|
90558
|
+
}, [_vm._v("批量删除")]), _c('el-button', {
|
90559
|
+
attrs: {
|
90560
|
+
"size": "small",
|
90561
|
+
"type": "primary",
|
90562
|
+
"disabled": _vm.scanFileList.length === 0
|
90563
|
+
},
|
90564
|
+
on: {
|
90565
|
+
"click": function ($event) {
|
90566
|
+
return _vm.sendScannerResult();
|
90567
|
+
}
|
90568
|
+
}
|
90569
|
+
}, [_vm._v("上传")])], 1)])], 1)], 1);
|
90570
|
+
};
|
90571
|
+
var scanner_nkovue_type_template_id_304bcec5_staticRenderFns = [];
|
90572
|
+
|
90573
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-exception.stack.js
|
90574
|
+
var web_dom_exception_stack = __webpack_require__(2801);
|
90575
|
+
;// CONCATENATED MODULE: ./packages/service/external-plugins/nko-plugin-socket.service.ts
|
90576
|
+
|
90577
|
+
|
90578
|
+
|
90579
|
+
/**
|
90580
|
+
* 赞彩五合一设备
|
90581
|
+
*
|
90582
|
+
* */
|
90583
|
+
var NkoMethodCode;
|
90584
|
+
(function (NkoMethodCode) {
|
90585
|
+
/** 扫描 */
|
90586
|
+
NkoMethodCode["scan"] = "scan";
|
90587
|
+
})(NkoMethodCode || (NkoMethodCode = {}));
|
90588
|
+
var NkoMethodScanFunction;
|
90589
|
+
(function (NkoMethodScanFunction) {
|
90590
|
+
/** 获取扫描仪 */
|
90591
|
+
NkoMethodScanFunction["getScanDeivceList"] = "001001";
|
90592
|
+
/** 选中指定扫描仪并打开 */
|
90593
|
+
NkoMethodScanFunction["openScanDeivce"] = "001002";
|
90594
|
+
/** 获取选中扫描仪可配置项 */
|
90595
|
+
NkoMethodScanFunction["getScanOptions"] = "001003";
|
90596
|
+
/** 常用参数的便捷配置能力(进纸模式、色彩、尺寸、DPI) */
|
90597
|
+
NkoMethodScanFunction["setScanBasicOptions"] = "001007";
|
90598
|
+
/** 扫描 */
|
90599
|
+
NkoMethodScanFunction["scan"] = "001008";
|
90600
|
+
})(NkoMethodScanFunction || (NkoMethodScanFunction = {}));
|
90601
|
+
const NkoMethodDesc = {
|
90602
|
+
[NkoMethodCode.scan]: '扫描'
|
90603
|
+
};
|
90604
|
+
class NkoService {
|
90605
|
+
static startConnect(method) {
|
90606
|
+
if (this.ws && this.ws.readyState === WebSocket.OPEN) {
|
90607
|
+
return this;
|
90608
|
+
}
|
90609
|
+
let webSocketUrl = '';
|
90610
|
+
switch (method) {
|
90611
|
+
case NkoMethodCode.scan:
|
90612
|
+
webSocketUrl = this.scanWebSocketUrl;
|
90613
|
+
break;
|
90614
|
+
default:
|
90615
|
+
webSocketUrl = this.iReadCardWebSocketUrl;
|
90616
|
+
break;
|
90617
|
+
}
|
90618
|
+
const ws = new WebSocket(webSocketUrl);
|
90619
|
+
let resolved;
|
90620
|
+
const onConnect = new Promise(resolve => {
|
90621
|
+
resolved = resolve;
|
90622
|
+
});
|
90623
|
+
ws.onopen = () => {
|
90624
|
+
resolved(true);
|
90625
|
+
};
|
90626
|
+
ws.onmessage = event => {
|
90627
|
+
this.handleMessage(event);
|
90628
|
+
};
|
90629
|
+
ws.onclose = () => this.handleClose();
|
90630
|
+
ws.onerror = () => this.handleError();
|
90631
|
+
this.ws = ws;
|
90632
|
+
return onConnect;
|
90633
|
+
}
|
90634
|
+
static handleError() {
|
90635
|
+
for (const type in this.requestStore) {
|
90636
|
+
this.requestStore.forEach(({
|
90637
|
+
reject
|
90638
|
+
}) => {
|
90639
|
+
reject('handleError');
|
90640
|
+
});
|
90641
|
+
}
|
90642
|
+
throw Error('统一插件平台赞彩五合一设备功能加载失败');
|
90643
|
+
}
|
90644
|
+
static handleClose() {
|
90645
|
+
for (const type in this.requestStore) {
|
90646
|
+
this.requestStore.forEach(({
|
90647
|
+
reject
|
90648
|
+
}) => {
|
90649
|
+
reject('close');
|
90650
|
+
});
|
90651
|
+
}
|
90652
|
+
}
|
90653
|
+
static handleMessage(msg) {
|
90654
|
+
let data = '';
|
90655
|
+
try {
|
90656
|
+
data = JSON.parse(msg.data);
|
90657
|
+
} catch (e) {
|
90658
|
+
data = '';
|
90659
|
+
}
|
90660
|
+
if (data['function'] === "001008" && data['code'] === 0) {
|
90661
|
+
return;
|
90662
|
+
} else if (data['function'] === "001010") {
|
90663
|
+
return this.scanCallback(data);
|
90664
|
+
} else {
|
90665
|
+
this.requestStore.forEach(({
|
90666
|
+
resolve
|
90667
|
+
}) => {
|
90668
|
+
resolve(data);
|
90669
|
+
});
|
90670
|
+
this.requestStore = [];
|
90671
|
+
}
|
90672
|
+
// this.ws.close();
|
90673
|
+
}
|
90674
|
+
|
90675
|
+
static async read(method, functionCode, params = {}) {
|
90676
|
+
await this.startConnect(method);
|
90677
|
+
const methodDesc = NkoMethodDesc[method];
|
90678
|
+
if (this.ws.readyState === 1) {
|
90679
|
+
console.log(methodDesc + '连接成功');
|
90680
|
+
let jsonString;
|
90681
|
+
switch (method) {
|
90682
|
+
case NkoMethodCode.scan:
|
90683
|
+
jsonString = JSON.stringify({
|
90684
|
+
function: functionCode,
|
90685
|
+
traceId: '',
|
90686
|
+
params
|
90687
|
+
});
|
90688
|
+
break;
|
90689
|
+
default:
|
90690
|
+
jsonString = '';
|
90691
|
+
break;
|
90692
|
+
}
|
90693
|
+
this.ws.send(jsonString);
|
90694
|
+
return new Promise((resolve, reject) => {
|
90695
|
+
if (!this.requestStore) {
|
90696
|
+
this.requestStore = [];
|
90697
|
+
}
|
90698
|
+
this.requestStore.push({
|
90699
|
+
resolve,
|
90700
|
+
reject
|
90701
|
+
});
|
90702
|
+
});
|
90703
|
+
} else {
|
90704
|
+
throw Error('统一插件平台' + methodDesc + '未准备完成');
|
90705
|
+
}
|
90706
|
+
}
|
90707
|
+
/**
|
90708
|
+
* 获取扫描仪
|
90709
|
+
* @returns deviceId:扫描仪设备 ID
|
90710
|
+
*/
|
90711
|
+
static async getDeivceList() {
|
90712
|
+
const response = await NkoService.read(NkoMethodCode.scan, NkoMethodScanFunction.getScanDeivceList);
|
90713
|
+
if (!response) {
|
90714
|
+
throw Error('未匹配可用的扫描仪设备');
|
90715
|
+
}
|
90716
|
+
if (response.code !== 0) {
|
90717
|
+
throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
|
90718
|
+
}
|
90719
|
+
console.log('获取扫描仪==>', response);
|
90720
|
+
return response.data;
|
90721
|
+
}
|
90722
|
+
/**
|
90723
|
+
* 选中指定扫描仪并打开
|
90724
|
+
* @param scannerId 选中的扫描仪 ID
|
90725
|
+
*/
|
90726
|
+
static async openScanDeivce(scannerId) {
|
90727
|
+
const response = await NkoService.read(NkoMethodCode.scan, NkoMethodScanFunction.openScanDeivce, {
|
90728
|
+
scannerId
|
90729
|
+
});
|
90730
|
+
if (!response) {
|
90731
|
+
throw Error('未匹配可用的扫描仪设备');
|
90732
|
+
}
|
90733
|
+
if (response.code !== 0) {
|
90734
|
+
throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
|
90735
|
+
}
|
90736
|
+
console.log('选中指定扫描仪并打开==>', response);
|
90737
|
+
return response;
|
90738
|
+
}
|
90739
|
+
/**
|
90740
|
+
* 获取选中扫描仪可配置项
|
90741
|
+
* @returns 选择扫描仪的可配置项
|
90742
|
+
*/
|
90743
|
+
static async getScanOptions() {
|
90744
|
+
const response = await NkoService.read(NkoMethodCode.scan, NkoMethodScanFunction.getScanOptions);
|
90745
|
+
if (!response) {
|
90746
|
+
throw Error('未匹配可用的扫描仪设备');
|
90747
|
+
}
|
90748
|
+
if (response.code !== 0) {
|
90749
|
+
throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
|
90750
|
+
}
|
90751
|
+
console.log('获取选中扫描仪可配置项==>', response);
|
90752
|
+
return response.data;
|
90753
|
+
}
|
90754
|
+
/**
|
90755
|
+
* 常用参数的便捷配置能力(进纸模式、色彩、尺寸、DPI)
|
90756
|
+
*/
|
90757
|
+
static async setScanBasicOptions(config) {
|
90758
|
+
// {
|
90759
|
+
// "source": "Adf-front",
|
90760
|
+
// "mode": "Color",
|
90761
|
+
// "image-format": "jpeg"
|
90762
|
+
// }
|
90763
|
+
const response = await NkoService.read(NkoMethodCode.scan, NkoMethodScanFunction.setScanBasicOptions, config);
|
90764
|
+
if (!response) {
|
90765
|
+
throw Error('未匹配可用的扫描仪设备');
|
90766
|
+
}
|
90767
|
+
if (response.code !== 0) {
|
90768
|
+
throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
|
90769
|
+
}
|
90770
|
+
console.log('设置配置项==>', response);
|
90771
|
+
return response;
|
90772
|
+
}
|
90773
|
+
/**
|
90774
|
+
* 扫描
|
90775
|
+
* @param fileFormat 文件保存格式,若为空以当前驱动配置格式扫描
|
90776
|
+
* @returns
|
90777
|
+
*/
|
90778
|
+
static async scan(fileFormat, fileSavePath = 'C:\\ScanResult', fileNamePrefix = '', fileNameFormat = '') {
|
90779
|
+
this.fileList = [];
|
90780
|
+
const response = await NkoService.read(NkoMethodCode.scan, NkoMethodScanFunction.scan, {
|
90781
|
+
fileFormat: `.${fileFormat}`,
|
90782
|
+
// 保存路径,若为空则取服务配置文件路径
|
90783
|
+
fileSavePath,
|
90784
|
+
fileType: "Base64",
|
90785
|
+
// 保存的文件名前缀,若为空直接追加方式命名
|
90786
|
+
fileNamePrefix,
|
90787
|
+
// 保存文件的追加命名方式
|
90788
|
+
// 1. index - 四位数自增
|
90789
|
+
// 例:xx 文档_0001.tiff
|
90790
|
+
// 2. datetime - 扫描日期时间
|
90791
|
+
// 例: xx 文档_20231015164735.tiff
|
90792
|
+
// 3. guid - GUID
|
90793
|
+
// 例 :xx 文 档 _f47ac10b-58cc-4372-a567-0e02b3d4.tiff
|
90794
|
+
// 若为空以 index 模式命名
|
90795
|
+
fileNameFormat,
|
90796
|
+
// 是否返回文件 md5 信息,默认不返回
|
90797
|
+
fileMd5Enabled: false
|
90798
|
+
});
|
90799
|
+
if (!response) {
|
90800
|
+
throw Error('未匹配可用的扫描仪设备');
|
90801
|
+
}
|
90802
|
+
if (response.code !== 0) {
|
90803
|
+
throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
|
90804
|
+
}
|
90805
|
+
console.log('扫描==>', response);
|
90806
|
+
if (response.function === "001011") {
|
90807
|
+
return this.fileList;
|
90808
|
+
}
|
90809
|
+
return response;
|
90810
|
+
}
|
90811
|
+
/**
|
90812
|
+
* 扫描回调(单张)
|
90813
|
+
*/
|
90814
|
+
static scanCallback(response) {
|
90815
|
+
if (response.code !== 0) {
|
90816
|
+
throw Error(response.msg);
|
90817
|
+
} else {
|
90818
|
+
const fileName = response.data.fileName,
|
90819
|
+
fileFormat = fileName.substr(fileName.lastIndexOf(".") + 1);
|
90820
|
+
let dataUrl;
|
90821
|
+
//Tiff不能直接显示在html,需要处理
|
90822
|
+
if (fileFormat === "tiff" || fileFormat === "tif") {
|
90823
|
+
// dataUrl = this.getTiffDataUrl(response.data.fileResult);
|
90824
|
+
} else {
|
90825
|
+
dataUrl = `data:image/${fileFormat};base64,${response.data.fileResult}`;
|
90826
|
+
}
|
90827
|
+
return this.fileList.push({
|
90828
|
+
name: fileName,
|
90829
|
+
url: dataUrl
|
90830
|
+
});
|
90831
|
+
}
|
90832
|
+
}
|
90833
|
+
/**
|
90834
|
+
* 扫描完成回调
|
90835
|
+
*/
|
90836
|
+
static completeCallback(response) {
|
90837
|
+
if (response.code !== 0) {
|
90838
|
+
throw Error(`执行失败,返回码:${response.code},错误信息:${response.msg}`);
|
90839
|
+
} else {
|
90840
|
+
console.log(response.data ? response.data : response.msg);
|
90841
|
+
}
|
90842
|
+
}
|
90843
|
+
//将Tiff base64转为可在html上正常显示的dataUrl base64
|
90844
|
+
/*static getTiffDataUrl(base64Str) {
|
90845
|
+
var buffer = this.base64ToUint8Array(base64Str);
|
90846
|
+
var tiff = new Tiff({ buffer: buffer });
|
90847
|
+
return tiff.toDataURL();
|
90848
|
+
}*/
|
90849
|
+
//Base64转为ArrayBuffer
|
90850
|
+
static base64ToUint8Array(base64String) {
|
90851
|
+
const padding = "=".repeat((4 - base64String.length % 4) % 4);
|
90852
|
+
const base64 = (base64String + padding).replace(/\-/g, "+").replace(/_/g, "/");
|
90853
|
+
const rawData = window.atob(base64);
|
90854
|
+
const outputArray = new Uint8Array(rawData.length);
|
90855
|
+
for (let i = 0; i < rawData.length; ++i) {
|
90856
|
+
outputArray[i] = rawData.charCodeAt(i);
|
90857
|
+
}
|
90858
|
+
return outputArray;
|
90859
|
+
}
|
90860
|
+
}
|
90861
|
+
_defineProperty(NkoService, "iReadCardWebSocketUrl", '');
|
90862
|
+
_defineProperty(NkoService, "scanWebSocketUrl", 'ws://127.0.0.1:51818');
|
90863
|
+
_defineProperty(NkoService, "ws", void 0);
|
90864
|
+
_defineProperty(NkoService, "requestStore", []);
|
90865
|
+
_defineProperty(NkoService, "fileList", []);
|
90866
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/scanner/scanner-nko/src/scanner-nko.vue?vue&type=script&lang=js&
|
90867
|
+
|
90868
|
+
|
90869
|
+
/* harmony default export */ var scanner_nkovue_type_script_lang_js_ = ({
|
90870
|
+
name: 'scanner-nko',
|
90871
|
+
components: {},
|
90872
|
+
props: {
|
90873
|
+
/**
|
90874
|
+
* 保存路径,若为空则取服务配置文件路径
|
90875
|
+
*/
|
90876
|
+
fileSavePath: {
|
90877
|
+
default: '',
|
90878
|
+
type: String
|
90879
|
+
},
|
90880
|
+
/**
|
90881
|
+
* 保存的文件名前缀,若为空直接追加方式命名
|
90882
|
+
*/
|
90883
|
+
fileNamePrefix: {
|
90884
|
+
default: '',
|
90885
|
+
type: String
|
90886
|
+
},
|
90887
|
+
/**
|
90888
|
+
* 保存文件的追加命名方式
|
90889
|
+
* 1. index - 四位数自增
|
90890
|
+
* 例:xx 文档_0001.tiff
|
90891
|
+
* 2. datetime - 扫描日期时间
|
90892
|
+
* 例: xx 文档_20231015164735.tiff
|
90893
|
+
* 3. guid - GUID
|
90894
|
+
* 例 :xx 文 档 _f47ac10b-58cc-4372-a567-0e02b3d4.tiff
|
90895
|
+
* 若为空以 index 模式命名
|
90896
|
+
*/
|
90897
|
+
fileNameFormat: {
|
90898
|
+
default: '',
|
90899
|
+
type: String
|
90900
|
+
}
|
90901
|
+
},
|
90902
|
+
data: () => {
|
90903
|
+
return {
|
90904
|
+
//页面整体遮罩
|
90905
|
+
pageLoading: false,
|
90906
|
+
pageLoadingText: '正在配置相关设置',
|
90907
|
+
//扫描设备列表
|
90908
|
+
deviceList: [],
|
90909
|
+
//设备是否已连接
|
90910
|
+
deviceOpend: false,
|
90911
|
+
//设备是否繁忙
|
90912
|
+
deviceWorking: false,
|
90913
|
+
//扫描配置
|
90914
|
+
scanConfig: {
|
90915
|
+
deviceId: null,
|
90916
|
+
source: null,
|
90917
|
+
resolution: null,
|
90918
|
+
mode: null,
|
90919
|
+
paperSize: null,
|
90920
|
+
fileFormat: null
|
90921
|
+
},
|
90922
|
+
//进纸模式
|
90923
|
+
sourceOptions: [],
|
90924
|
+
//扫描颜色
|
90925
|
+
modeOptions: [],
|
90926
|
+
//分辨率
|
90927
|
+
resolutionOptions: [],
|
90928
|
+
//纸张类型
|
90929
|
+
paperSizeOptions: [],
|
90930
|
+
//文件格式
|
90931
|
+
fileFormatOptions: [],
|
90932
|
+
//中间图片数据 {name:'',url:'',checked:false}
|
90933
|
+
scanFileList: [],
|
90934
|
+
initialIndex: 0,
|
90935
|
+
scannerResult: '',
|
90936
|
+
isIndeterminate: false,
|
90937
|
+
checkAll: false
|
90938
|
+
};
|
90939
|
+
},
|
90940
|
+
computed: {
|
90941
|
+
//扫描设备是否可用
|
90942
|
+
isDeviceReady() {
|
90943
|
+
return this.scanConfig.deviceId && this.deviceOpend;
|
90944
|
+
},
|
90945
|
+
imgUrls() {
|
90946
|
+
return this.scanFileList.map(item => item.url);
|
90947
|
+
}
|
90948
|
+
},
|
90949
|
+
created() {},
|
90950
|
+
methods: {
|
90951
|
+
handleCheckAllChange(val) {
|
90952
|
+
this.scanFileList.forEach(data => {
|
90953
|
+
data.checked = val;
|
90954
|
+
});
|
90955
|
+
this.isIndeterminate = false;
|
90956
|
+
},
|
90957
|
+
handleCheckedChange() {
|
90958
|
+
const checkedCount = this.scanFileList.filter(data => data.checked).length;
|
90959
|
+
this.isIndeterminate = checkedCount > 0 && checkedCount < this.scanFileList.length;
|
90960
|
+
this.checkAll = this.scanFileList.length > 0 && checkedCount === this.scanFileList.length;
|
90961
|
+
},
|
90962
|
+
/**
|
90963
|
+
* 初始化ScanServiceAPI连接
|
90964
|
+
*/
|
90965
|
+
async initScanServiceAPI() {
|
90966
|
+
this.pageLoadingText = '正在连接扫描服务,请稍候...';
|
90967
|
+
this.pageLoading = true;
|
90968
|
+
// 获取设备列表
|
90969
|
+
this.deviceList = await NkoService.getDeivceList();
|
90970
|
+
this.deviceOpend = true;
|
90971
|
+
this.pageLoading = false;
|
90972
|
+
},
|
90973
|
+
/**
|
90974
|
+
* 扫描服务关闭时回调
|
90975
|
+
*/
|
90976
|
+
wsCloseCallback() {
|
90977
|
+
this.$message.warning('扫描服务连接已断开');
|
90978
|
+
this.pageLoading = false;
|
90979
|
+
this.resetData();
|
90980
|
+
this.deviceList = [];
|
90981
|
+
this.scanConfig.deviceId = null;
|
90982
|
+
},
|
90983
|
+
/**
|
90984
|
+
* 重置数据
|
90985
|
+
*/
|
90986
|
+
resetData() {
|
90987
|
+
this.scanConfig.source = null;
|
90988
|
+
this.scanConfig.resolution = null;
|
90989
|
+
this.scanConfig.mode = null;
|
90990
|
+
this.scanConfig.paperSideviceOpendze = null;
|
90991
|
+
this.scanConfig.fileFormat = null;
|
90992
|
+
this.sourceOptions = [];
|
90993
|
+
this.modeOptions = [];
|
90994
|
+
this.resolutionOptions = [];
|
90995
|
+
this.paperSizeOptions = [];
|
90996
|
+
this.fileFormatOptions = [];
|
90997
|
+
this.deviceOpend = false;
|
90998
|
+
this.deviceWorking = false;
|
90999
|
+
},
|
91000
|
+
/**
|
91001
|
+
* 选择扫描设备
|
91002
|
+
*/
|
91003
|
+
openDeivce() {
|
91004
|
+
this.pageLoadingText = '正在设置扫描源,请稍后...';
|
91005
|
+
this.pageLoading = true;
|
91006
|
+
|
91007
|
+
//重置扫描配置
|
91008
|
+
this.resetData();
|
91009
|
+
// 获取扫描仪可配置项
|
91010
|
+
this.getScanOptions();
|
91011
|
+
},
|
91012
|
+
/**
|
91013
|
+
* 获取扫描仪可配置项
|
91014
|
+
*/
|
91015
|
+
async getScanOptions() {
|
91016
|
+
this.pageLoadingText = '正在获取扫描仪能力,请稍后...';
|
91017
|
+
this.pageLoading = true;
|
91018
|
+
await NkoService.openScanDeivce(this.scanConfig.deviceId);
|
91019
|
+
var options = await NkoService.getScanOptions();
|
91020
|
+
this.sourceOptions = options.source;
|
91021
|
+
this.modeOptions = options.mode;
|
91022
|
+
this.resolutionOptions = options.resolution;
|
91023
|
+
this.paperSizeOptions = options['paper-size'];
|
91024
|
+
this.fileFormatOptions = options['image-format'];
|
91025
|
+
this.scanConfig.source = this.sourceOptions[0] || null;
|
91026
|
+
this.scanConfig.mode = this.modeOptions[0] || null;
|
91027
|
+
this.scanConfig.resolution = this.resolutionOptions[0] || null;
|
91028
|
+
this.scanConfig.paperSize = this.paperSizeOptions[0] || null;
|
91029
|
+
this.scanConfig.fileFormat = this.fileFormatOptions[0] || null;
|
91030
|
+
this.deviceOpend = true;
|
91031
|
+
this.pageLoading = false;
|
91032
|
+
},
|
91033
|
+
/**
|
91034
|
+
* 点击扫描
|
91035
|
+
*/
|
91036
|
+
async doScan() {
|
91037
|
+
if (!this.isDeviceReady || this.deviceWorking) {
|
91038
|
+
return;
|
91039
|
+
}
|
91040
|
+
this.pageLoadingText = '正在提交扫描请求,请稍后...';
|
91041
|
+
this.pageLoading = true;
|
91042
|
+
await NkoService.setScanBasicOptions({
|
91043
|
+
source: this.scanConfig.source,
|
91044
|
+
mode: this.scanConfig.mode,
|
91045
|
+
'paper-size': this.scanConfig.paperSize,
|
91046
|
+
resolution: this.scanConfig.resolution
|
91047
|
+
});
|
91048
|
+
const data = await NkoService.scan(this.scanConfig.fileFormat, this.fileSavePath, this.fileNamePrefix, this.fileNameFormat);
|
91049
|
+
this.scanFileList = [...this.scanFileList, ...data];
|
91050
|
+
this.pageLoading = false;
|
91051
|
+
},
|
91052
|
+
//预览
|
91053
|
+
previewImg(index) {
|
91054
|
+
this.initialIndex = index;
|
91055
|
+
},
|
91056
|
+
clearImgList() {
|
91057
|
+
this.scanFileList = [];
|
91058
|
+
},
|
91059
|
+
deleteFileEvent(index) {
|
91060
|
+
this.scanFileList.splice(index, 1);
|
91061
|
+
},
|
91062
|
+
batchDelFilesEvent() {
|
91063
|
+
let list = [];
|
91064
|
+
this.scanFileList.forEach(data => {
|
91065
|
+
if (!data.checked) list.push(data);
|
91066
|
+
});
|
91067
|
+
this.scanFileList = list;
|
91068
|
+
},
|
91069
|
+
sendScannerResult(data = null) {
|
91070
|
+
const list = data ? [data] : this.scanFileList.filter(data => data.checked);
|
91071
|
+
if (!list || list.length === 0) return;
|
91072
|
+
this.$emit('send-scanner-result', list.map(data => ({
|
91073
|
+
name: data.name,
|
91074
|
+
url: data.url
|
91075
|
+
})));
|
91076
|
+
}
|
91077
|
+
}
|
91078
|
+
});
|
91079
|
+
;// CONCATENATED MODULE: ./packages/scanner/scanner-nko/src/scanner-nko.vue?vue&type=script&lang=js&
|
91080
|
+
/* harmony default export */ var src_scanner_nkovue_type_script_lang_js_ = (scanner_nkovue_type_script_lang_js_);
|
91081
|
+
;// CONCATENATED MODULE: ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.use[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/scanner/scanner-nko/src/scanner-nko.vue?vue&type=style&index=0&id=304bcec5&prod&lang=scss&
|
91082
|
+
// extracted by mini-css-extract-plugin
|
91083
|
+
|
91084
|
+
;// CONCATENATED MODULE: ./packages/scanner/scanner-nko/src/scanner-nko.vue?vue&type=style&index=0&id=304bcec5&prod&lang=scss&
|
91085
|
+
|
91086
|
+
;// CONCATENATED MODULE: ./packages/scanner/scanner-nko/src/scanner-nko.vue
|
91087
|
+
|
91088
|
+
|
91089
|
+
|
91090
|
+
;
|
91091
|
+
|
91092
|
+
|
91093
|
+
/* normalize component */
|
91094
|
+
|
91095
|
+
var scanner_nko_component = normalizeComponent(
|
91096
|
+
src_scanner_nkovue_type_script_lang_js_,
|
91097
|
+
scanner_nkovue_type_template_id_304bcec5_render,
|
91098
|
+
scanner_nkovue_type_template_id_304bcec5_staticRenderFns,
|
91099
|
+
false,
|
91100
|
+
null,
|
91101
|
+
null,
|
91102
|
+
null
|
91103
|
+
|
91104
|
+
)
|
91105
|
+
|
91106
|
+
/* harmony default export */ var scanner_nko = (scanner_nko_component.exports);
|
91107
|
+
;// CONCATENATED MODULE: ./packages/scanner/scanner-nko/index.js
|
91108
|
+
/**
|
91109
|
+
* @author: shenyz
|
91110
|
+
* @date: 2025-02-24
|
91111
|
+
* @description:index 赞彩五合一设备扫描功能
|
91112
|
+
*/
|
91113
|
+
|
91114
|
+
scanner_nko.install = Vue => {
|
91115
|
+
Vue.component(scanner_nko.name, scanner_nko);
|
91116
|
+
};
|
91117
|
+
/* harmony default export */ var scanner_scanner_nko = (scanner_nko);
|
89127
91118
|
;// CONCATENATED MODULE: ./packages/index.js
|
89128
91119
|
|
89129
91120
|
|
@@ -89134,6 +91125,7 @@ id_card_reader_button.install = Vue => {
|
|
89134
91125
|
|
89135
91126
|
|
89136
91127
|
|
91128
|
+
|
89137
91129
|
// import {
|
89138
91130
|
// Button,
|
89139
91131
|
// Tooltip,
|
@@ -89149,7 +91141,7 @@ id_card_reader_button.install = Vue => {
|
|
89149
91141
|
// Dialog
|
89150
91142
|
// ]
|
89151
91143
|
// 组件列表
|
89152
|
-
const components = [packages_zs_empty, id_card_reader_id_card_reader_demo, id_card_reader_id_card_reader_eloam, id_card_reader_id_card_reader_button, scanner_scanner_high_camera_jieyu, scanner_scanner_eloam, scanner_scanner_camera];
|
91144
|
+
const components = [packages_zs_empty, id_card_reader_id_card_reader_demo, id_card_reader_id_card_reader_eloam, id_card_reader_id_card_reader_button, scanner_scanner_high_camera_jieyu, scanner_scanner_eloam, scanner_scanner_camera, scanner_scanner_nko];
|
89153
91145
|
|
89154
91146
|
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,那么所有的组件都会被注册
|
89155
91147
|
const install = Vue => {
|