eoss-mobiles 0.2.13 → 0.2.15

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.
Files changed (38) hide show
  1. package/lib/checkbox.js +260 -199
  2. package/lib/config/api.js +4 -1
  3. package/lib/date.js +3 -3
  4. package/lib/eoss-mobile.common.js +746 -249
  5. package/lib/flow.js +362 -277
  6. package/lib/index.js +1 -1
  7. package/lib/notice-bar.js +2 -2
  8. package/lib/picker.js +260 -199
  9. package/lib/pull-refresh.js +2 -2
  10. package/lib/radio.js +260 -199
  11. package/lib/retrial-auth.js +2457 -0
  12. package/lib/selector.js +294 -233
  13. package/lib/table-column.js +260 -199
  14. package/lib/table.js +227 -172
  15. package/lib/theme-chalk/index.css +1 -1
  16. package/lib/theme-chalk/retrial-auth.css +1 -0
  17. package/lib/utils/axios.js +140 -154
  18. package/lib/utils/http.js +5 -5
  19. package/lib/utils/util.js +71 -2
  20. package/package.json +1 -1
  21. package/packages/date/src/main.vue +1 -1
  22. package/packages/flow/src/components/Handle.vue +4 -1
  23. package/packages/flow/src/components/Opinion.vue +39 -3
  24. package/packages/flow/src/components/StartFlow.vue +3 -3
  25. package/packages/flow/src/main.vue +6 -0
  26. package/packages/retrial-auth/index.js +5 -0
  27. package/packages/retrial-auth/src/main.vue +257 -0
  28. package/packages/selector/src/selector-tree.vue +1 -1
  29. package/packages/selector/src/tree.vue +1 -1
  30. package/packages/theme-chalk/lib/index.css +1 -1
  31. package/packages/theme-chalk/lib/retrial-auth.css +1 -0
  32. package/packages/theme-chalk/src/index.scss +1 -0
  33. package/packages/theme-chalk/src/retrial-auth.scss +28 -0
  34. package/src/config/api.js +3 -0
  35. package/src/index.js +4 -1
  36. package/src/utils/axios.js +156 -174
  37. package/src/utils/http.js +15 -5
  38. package/src/utils/util.js +164 -84
@@ -0,0 +1,2457 @@
1
+ module.exports =
2
+ /******/ (function(modules) { // webpackBootstrap
3
+ /******/ // The module cache
4
+ /******/ var installedModules = {};
5
+ /******/
6
+ /******/ // The require function
7
+ /******/ function __webpack_require__(moduleId) {
8
+ /******/
9
+ /******/ // Check if module is in cache
10
+ /******/ if(installedModules[moduleId]) {
11
+ /******/ return installedModules[moduleId].exports;
12
+ /******/ }
13
+ /******/ // Create a new module (and put it into the cache)
14
+ /******/ var module = installedModules[moduleId] = {
15
+ /******/ i: moduleId,
16
+ /******/ l: false,
17
+ /******/ exports: {}
18
+ /******/ };
19
+ /******/
20
+ /******/ // Execute the module function
21
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
+ /******/
23
+ /******/ // Flag the module as loaded
24
+ /******/ module.l = true;
25
+ /******/
26
+ /******/ // Return the exports of the module
27
+ /******/ return module.exports;
28
+ /******/ }
29
+ /******/
30
+ /******/
31
+ /******/ // expose the modules object (__webpack_modules__)
32
+ /******/ __webpack_require__.m = modules;
33
+ /******/
34
+ /******/ // expose the module cache
35
+ /******/ __webpack_require__.c = installedModules;
36
+ /******/
37
+ /******/ // define getter function for harmony exports
38
+ /******/ __webpack_require__.d = function(exports, name, getter) {
39
+ /******/ if(!__webpack_require__.o(exports, name)) {
40
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
+ /******/ }
42
+ /******/ };
43
+ /******/
44
+ /******/ // define __esModule on exports
45
+ /******/ __webpack_require__.r = function(exports) {
46
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
+ /******/ }
49
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
+ /******/ };
51
+ /******/
52
+ /******/ // create a fake namespace object
53
+ /******/ // mode & 1: value is a module id, require it
54
+ /******/ // mode & 2: merge all properties of value into the ns
55
+ /******/ // mode & 4: return value when already ns object
56
+ /******/ // mode & 8|1: behave like require
57
+ /******/ __webpack_require__.t = function(value, mode) {
58
+ /******/ if(mode & 1) value = __webpack_require__(value);
59
+ /******/ if(mode & 8) return value;
60
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
+ /******/ var ns = Object.create(null);
62
+ /******/ __webpack_require__.r(ns);
63
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
+ /******/ return ns;
66
+ /******/ };
67
+ /******/
68
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
69
+ /******/ __webpack_require__.n = function(module) {
70
+ /******/ var getter = module && module.__esModule ?
71
+ /******/ function getDefault() { return module['default']; } :
72
+ /******/ function getModuleExports() { return module; };
73
+ /******/ __webpack_require__.d(getter, 'a', getter);
74
+ /******/ return getter;
75
+ /******/ };
76
+ /******/
77
+ /******/ // Object.prototype.hasOwnProperty.call
78
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
+ /******/
80
+ /******/ // __webpack_public_path__
81
+ /******/ __webpack_require__.p = "/dist/";
82
+ /******/
83
+ /******/
84
+ /******/ // Load entry module and return exports
85
+ /******/ return __webpack_require__(__webpack_require__.s = 50);
86
+ /******/ })
87
+ /************************************************************************/
88
+ /******/ ({
89
+
90
+ /***/ 0:
91
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
+
93
+ "use strict";
94
+ /* harmony import */ var _eoss_design_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
95
+ /* harmony import */ var _eoss_design_color__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_eoss_design_color__WEBPACK_IMPORTED_MODULE_0__);
96
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
97
+
98
+ /* eslint-disable indent */
99
+ // import { authCenter } from '../config/api';
100
+
101
+ // import CryptoJS from 'crypto-js'
102
+ var sm2 = __webpack_require__(8).sm2;
103
+ // /**
104
+ // * esEncrypt
105
+ // * @desc:sm2加密
106
+ // * @author huangbo
107
+ // * @date 2022年5月7日
108
+ // * @param {string} [data] - 被加密的字符串
109
+ // * @param {string} [key] - 公钥
110
+ // **/
111
+ // const encryptDes = (message, key) => {
112
+ // const keyHex = CryptoJS.enc.Utf8.parse(key);
113
+ // const encrypted = CryptoJS.DES.encrypt(message, keyHex, {
114
+ // mode: CryptoJS.mode.ECB,
115
+ // padding: CryptoJS.pad.Pkcs7
116
+ // });
117
+ // return encrypted.toString();
118
+ // }
119
+ // /**
120
+ // * esEncrypt
121
+ // * @desc:sm2加密
122
+ // * @author huangbo
123
+ // * @date 2022年5月7日
124
+ // * @param {string} [data] - 被加密的字符串
125
+ // * @param {string} [key] - 公钥
126
+ // **/
127
+ // const decryptDes = (ciphertext, key) => {
128
+ // const keyHex = CryptoJS.enc.Utf8.parse(key);
129
+ // // direct decrypt ciphertext
130
+ // const decrypted = CryptoJS.DES.decrypt({
131
+ // ciphertext: CryptoJS.enc.Base64.parse(ciphertext)
132
+ // }, keyHex, {
133
+ // mode: CryptoJS.mode.ECB,
134
+ // padding: CryptoJS.pad.Pkcs7
135
+ // });
136
+ // return decrypted.toString(CryptoJS.enc.Utf8);
137
+ // }
138
+ /**
139
+ * esEncrypt
140
+ * @desc:sm2加密
141
+ * @author huangbo
142
+ * @date 2022年5月7日
143
+ * @param {string} [data] - 被加密的字符串
144
+ * @param {string} [key] - 公钥
145
+ **/
146
+ var esEncrypt = function esEncrypt(data, key, mode) {
147
+ var cipherMode = mode ? mode : 1;
148
+ if (!new RegExp('^04').test(key)) {
149
+ key = '04' + key;
150
+ }
151
+ var result = sm2.doEncrypt(data, key, cipherMode);
152
+ return result;
153
+ };
154
+
155
+ /**
156
+ * esDecode
157
+ * @desc:sm2解密
158
+ * @author huangbo
159
+ * @date 2022年5月7日
160
+ * @param {string} [data] - 被解密的加密字符串
161
+ * @param {string} [key] - 私钥
162
+ **/
163
+ var esDecode = function esDecode(data, key, mode) {
164
+ var cipherMode = mode ? mode : 1;
165
+ var result = sm2.doDecrypt(data, key, cipherMode);
166
+ return result;
167
+ };
168
+ /**
169
+ * startWith
170
+ * @desc:判断是否以指定字符开头
171
+ * @author huangbo
172
+ * @date 2022年5月7日
173
+ * @param {string} [str] - 被查找的字符串
174
+ * @param {string} [reg] - 指定字符串
175
+ **/
176
+ var startWith = function startWith(str, reg) {
177
+ if (new RegExp('^' + reg).test(str)) {
178
+ return true;
179
+ }
180
+ return false;
181
+ };
182
+ /**
183
+ * jointUrl
184
+ * @desc:判断url地址是否以字符开头,没有则添加
185
+ * @author huangbo
186
+ * @date 2022年5月7日
187
+ * @param {string} [str] - 域名或者路径
188
+ * @param {string} [url] - 地址
189
+ **/
190
+ var jointUrl = function jointUrl(url, str) {
191
+ if (startWith(url, 'http') || startWith(url, 'blob:') || !str) {
192
+ return url;
193
+ }
194
+ return startWith(url, str) ? url : str + url;
195
+ };
196
+ /**
197
+ * queryParams
198
+ * @desc:对象转url拼接参数
199
+ * @author huangbo
200
+ * @date 2022年5月7日
201
+ * @param {Object} [obj] - 被转换的对象
202
+ **/
203
+ var queryParams = function queryParams(obj) {
204
+ var arry = [];
205
+ for (var i in obj) {
206
+ arry.push(i + '=' + obj[i]);
207
+ }
208
+ if (arry.length) {
209
+ return arry.join('&');
210
+ }
211
+ return false;
212
+ };
213
+ /**
214
+ * queryParams
215
+ * @desc:对象转url拼接参数
216
+ * @author huangbo
217
+ * @date 2022年5月7日
218
+ * @param {Object} [url] - url地址
219
+ * @param {Object} [obj] - 被转换的对象
220
+ **/
221
+ var urlJoinParams = function urlJoinParams(url, obj) {
222
+ var arry = decodeURI(url).split('?');
223
+ var params = {};
224
+ if (arry.length > 1) {
225
+ var search = arry[1].split('&');
226
+ search.forEach(function (item) {
227
+ var items = item.split('=');
228
+ params[items[0]] = items[1];
229
+ });
230
+ }
231
+ params = extend(true, params, obj);
232
+ var str = queryParams(params);
233
+ if (str) {
234
+ return arry[0] + '?' + str;
235
+ }
236
+ return arry[0];
237
+ };
238
+ /**
239
+ * arrUnique
240
+ * @desc:数组元素对象去重
241
+ * @author huangbo
242
+ * @date 2022年5月7日
243
+ * @param {Object} [arr] - 原始数组
244
+ * @param {String} [key] - 对象子元素的属性名
245
+ **/
246
+ var arrUnique = function arrUnique(arr, key) {
247
+ var newArr = [];
248
+ if (key === undefined) {
249
+ arr.sort();
250
+ newArr = [arr[0]];
251
+ for (var i = 1; i < arr.length; i++) {
252
+ if (arr[i] !== newArr[newArr.length - 1]) {
253
+ newArr.push(arr[i]);
254
+ }
255
+ }
256
+ } else {
257
+ var obj = {};
258
+ for (var _i = 0; _i < arr.length; _i++) {
259
+ if (!obj[arr[_i][key]]) {
260
+ newArr.push(arr[_i]);
261
+ obj[arr[_i][key]] = true;
262
+ }
263
+ }
264
+ }
265
+ return newArr;
266
+ };
267
+ /**
268
+ * isObject
269
+ * @desc:判断是否是对象
270
+ * @author huangbo
271
+ * @date 2022年5月7日
272
+ * @param {Object} [obj] - 对象
273
+ **/
274
+ var isObject = function isObject(obj) {
275
+ var proto = void 0;
276
+ var Ctor = void 0;
277
+ var hasOwn = {}.hasOwnProperty;
278
+ if (!obj || toString.call(obj) !== '[object Object]') {
279
+ return false;
280
+ }
281
+
282
+ proto = Object.getPrototypeOf(obj);
283
+ if (!proto) {
284
+ return true;
285
+ }
286
+ var fnToString = hasOwn.toString;
287
+ var ObjectFunctionString = fnToString.call(Object);
288
+ Ctor = hasOwn.call(proto, 'constructor') && proto.constructor;
289
+ return typeof Ctor === 'function' && fnToString.call(Ctor) === ObjectFunctionString;
290
+ };
291
+ /**
292
+ * isFunction
293
+ * @desc:判断是否是函数
294
+ * @author huangbo
295
+ * @date 2022年5月7日
296
+ * @param {Object} [obj] - 对象
297
+ **/
298
+ var isFunction = function isFunction(obj) {
299
+ return typeof obj === 'function' && typeof obj.nodeType !== 'number' && typeof obj.item !== 'function';
300
+ };
301
+ /**
302
+ * extend
303
+ * @desc:对象拷贝
304
+ * @author huangbo
305
+ * @date 2022年5月7日
306
+ * @param {Object} [target] - 被扩展的对象
307
+ * @param {Boolean}} [deep] - 是否深度操作
308
+ **/
309
+ var extend = function extend() {
310
+ var options = void 0;
311
+ var name = void 0;
312
+ var src = void 0;
313
+ var copy = void 0;
314
+ var copyIsArray = void 0;
315
+ var clone = void 0;
316
+ var target = arguments[0] || {};
317
+ var i = 1;
318
+ var length = arguments.length;
319
+ var deep = false;
320
+ if (typeof target === 'boolean') {
321
+ deep = target;
322
+ target = arguments[i] || {};
323
+ i++;
324
+ }
325
+ if ((typeof target === 'undefined' ? 'undefined' : _typeof(target)) !== 'object' && !isFunction(target)) {
326
+ target = {};
327
+ }
328
+ if (i === length) {
329
+ target = this;
330
+ i--;
331
+ }
332
+ for (; i < length; i++) {
333
+ if ((options = arguments[i]) != null) {
334
+ for (name in options) {
335
+ copy = options[name];
336
+ if (name === '__proto__' || target === copy) {
337
+ continue;
338
+ }
339
+ if (deep && copy && (isObject(copy) || (copyIsArray = Array.isArray(copy)))) {
340
+ src = target[name];
341
+ if (copyIsArray && !Array.isArray(src)) {
342
+ clone = [];
343
+ } else if (!copyIsArray && !isObject(src)) {
344
+ clone = {};
345
+ } else {
346
+ clone = src;
347
+ }
348
+ copyIsArray = false;
349
+ target[name] = extend(deep, clone, copy);
350
+ } else if (copy !== undefined) {
351
+ target[name] = copy;
352
+ }
353
+ }
354
+ }
355
+ }
356
+ return target;
357
+ };
358
+ /**
359
+ * getObjectType
360
+ * @desc:获取数据类型
361
+ * @author tangdaibing
362
+ * @date 2022年5月7日
363
+ **/
364
+ var getObjectType = function getObjectType(data) {
365
+ var type = Object.prototype.toString.call(data).toLowerCase();
366
+ var typeFormat = {
367
+ '[object string]': 'string',
368
+ '[object number]': 'number',
369
+ '[object null]': 'null',
370
+ '[object boolean]': 'boolean',
371
+ '[object undefined]': 'undefined',
372
+ '[object object]': 'object',
373
+ '[object array]': 'array',
374
+ '[object function]': 'function',
375
+ '[object date]': 'date'
376
+ };
377
+ return typeFormat[type];
378
+ };
379
+ /**
380
+ * getParams
381
+ * @desc:获取url地址指定参数
382
+ * @author huangbo
383
+ * @date 2022年5月7日
384
+ * @param {String} [name] - 参数名称
385
+ **/
386
+ var getParams = function getParams(name) {
387
+ var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)');
388
+ var r = window.location.search ? decodeURI(window.location.search).substr(1).match(reg) : decodeURI(window.location.hash).slice(decodeURI(window.location.hash).indexOf('?') + 1).match(reg);
389
+ if (r != null) {
390
+ return unescape(r[2]);
391
+ } else {
392
+ return null;
393
+ }
394
+ };
395
+ /**
396
+ * getScript
397
+ * @desc:获取js文件并执行
398
+ * @author huangbo
399
+ * @date 2022年5月7日
400
+ * @param {String} [url] - js文件地址
401
+ **/
402
+ var getScript = function getScript(url) {
403
+ // eslint-disable-next-line no-undef
404
+ return new Promise(function (resolve, reject) {
405
+ var xmlHttp = null;
406
+ if (window.XMLHttpRequest) {
407
+ xmlHttp = new XMLHttpRequest();
408
+ } else if (window.ActiveXObject) {
409
+ xmlHttp = new window.ActiveXObject('Microsoft.XMLHTTP');
410
+ }
411
+ if (xmlHttp == null) {
412
+ alert('浏览器不支持xmlHttp');
413
+ return;
414
+ }
415
+ xmlHttp.open('GET', url, false);
416
+ xmlHttp.onreadystatechange = function () {
417
+ if (xmlHttp.readyState === 4 && xmlHttp.status === 200) {
418
+ var res = xmlHttp.responseText;
419
+ domEval(res);
420
+ resolve(true);
421
+ } else {
422
+ reject(false);
423
+ }
424
+ };
425
+ xmlHttp.send();
426
+ }).catch(function onRejected() {});
427
+ };
428
+ /**
429
+ * domEval
430
+ * @desc:添加js内容
431
+ * @author huangbo
432
+ * @date 2022年5月7日
433
+ * @param {String} [code] - js内容
434
+ **/
435
+ function domEval(code) {
436
+ var script = document.createElement('script');
437
+ script.text = code;
438
+ document.head.appendChild(script).parentNode.removeChild(script);
439
+ }
440
+
441
+ /**
442
+ * indexOfObj
443
+ * @desc:查找数组对象下标
444
+ * @author huangbo
445
+ * @date 2022年5月7日
446
+ * @param {Array} [arry] - 被查找的数组
447
+ * @param {Object} [item] - 目标对象
448
+ * @param {String} [key] - 目标对象的属性名
449
+ **/
450
+ var indexOfObj = function indexOfObj(arry, item, key) {
451
+ for (var i = 0; i < arry.length; i++) {
452
+ if (key) {
453
+ if (typeof item === 'string' && arry[i][key] === item) {
454
+ return i;
455
+ }
456
+ if (item[key] === arry[i][key]) {
457
+ return i;
458
+ }
459
+ } else {
460
+ if (JSON.stringify(item) === JSON.stringify(arry[i])) {
461
+ return i;
462
+ }
463
+ }
464
+ }
465
+ return -1;
466
+ };
467
+
468
+ /**
469
+ * overbrim
470
+ * @desc:判断是否文字溢出
471
+ * @author huangbo
472
+ * @date 2022年5月7日
473
+ * @param {String} [el] - 文字所在的dom
474
+ **/
475
+ var overbrim = function overbrim(el) {
476
+ var w = el.offsetWidth;
477
+ var s = el.scrollWidth;
478
+ if (s > w) {
479
+ return true;
480
+ } else {
481
+ return false;
482
+ }
483
+ };
484
+
485
+ /**
486
+ * setStorage
487
+ * @desc:设置本地储存数据
488
+ * @author huangbo
489
+ * @date 2022年5月7日
490
+ * @param {String} [type] - 储存类型
491
+ * @param {String, Array, Object} [key] - 数据的名称,array类型表示多个key保存同一个value,object类型时对象的属性名称作为key属性值作为value
492
+ * @param {String} [value] - 数据的值
493
+ **/
494
+ var setStorage = function setStorage(type, key, value) {
495
+ if (type === undefined || type === 'sessionStorage') {
496
+ if (typeof key === 'string') {
497
+ sessionStorage.setItem(key, value);
498
+ } else if (Array.isArray(key)) {
499
+ for (var i in key) {
500
+ sessionStorage.setItem(key[i], value);
501
+ }
502
+ } else {
503
+ for (var _i2 in key) {
504
+ sessionStorage.setItem(_i2, key[_i2]);
505
+ }
506
+ }
507
+ } else {
508
+ if (typeof key === 'string') {
509
+ localStorage.setItem(key, value);
510
+ } else if (Array.isArray(key)) {
511
+ for (var _i3 in key) {
512
+ localStorage.setItem(key[_i3], value);
513
+ }
514
+ } else {
515
+ for (var _i4 in key) {
516
+ localStorage.setItem(_i4, key[_i4]);
517
+ }
518
+ }
519
+ }
520
+ };
521
+ /**
522
+ * removeStorage
523
+ * @desc:删除本地储存数据
524
+ * @author huangbo
525
+ * @date 2022年5月7日
526
+ * @param {String, Array} [key] - 获取的名称
527
+ **/
528
+ var removeStorage = function removeStorage(key) {
529
+ if (Array.isArray(key)) {
530
+ for (var i = 0; i < key.length; i++) {
531
+ sessionStorage.removeItem(key[i]);
532
+ localStorage.removeItem(key[i]);
533
+ }
534
+ } else if (key) {
535
+ sessionStorage.removeItem(key);
536
+ localStorage.removeItem(key);
537
+ } else {
538
+ sessionStorage.clear();
539
+ localStorage.clear();
540
+ }
541
+ };
542
+ /**
543
+ * getStorage
544
+ * @desc:获取本地储存数据
545
+ * @author huangbo
546
+ * @date 2022年5月7日
547
+ * @param {String} [key] - 获取的名称
548
+ **/
549
+ var getStorage = function getStorage(key) {
550
+ if (key) {
551
+ var res = sessionStorage.getItem(key) || localStorage.getItem(key) || window[key];
552
+ if (key === 'host' && !res) {
553
+ return window.origin;
554
+ }
555
+ return res;
556
+ }
557
+ var defaults = {};
558
+ var token = sessionStorage.getItem('token') || localStorage.getItem('token') || window.token;
559
+ var ssId = sessionStorage.getItem('ssId') || localStorage.getItem('ssId') || window.ssId;
560
+ var deviceUnique = sessionStorage.getItem('deviceUnique') || localStorage.getItem('deviceUnique') || window.deviceUnique;
561
+ if (token) {
562
+ defaults.Authorization = token;
563
+ }
564
+ if (ssId) {
565
+ defaults.ssId = ssId;
566
+ }
567
+ if (deviceUnique) {
568
+ defaults.deviceUnique = deviceUnique;
569
+ }
570
+ return defaults;
571
+ };
572
+ var getValues = function getValues(obj, flag) {
573
+ var val = {};
574
+ obj.forEach(function (items) {
575
+ if (items.contents) {
576
+ items.contents.forEach(function (item) {
577
+ if (item.name && item.type !== 'button' && item.type !== 'submit') {
578
+ if (item.type === 'table' && item.form) {
579
+ val[item.name] = item.data;
580
+ } else if (item.name && !flag && !item.hide) {
581
+ if (item.value !== undefined && item.value !== '') {
582
+ if (Array.isArray(val)) {
583
+ if (val.length) {
584
+ val[item.name] = item.value;
585
+ }
586
+ } else {
587
+ val[item.name] = item.value;
588
+ }
589
+ }
590
+ }
591
+ }
592
+ });
593
+ } else if (items.name && items.type !== 'button' && items.type !== 'submit') {
594
+ if (items.value !== undefined && items.value !== '') {
595
+ if (Array.isArray(val)) {
596
+ if (val.length) {
597
+ val[items.name] = items.value;
598
+ }
599
+ } else {
600
+ val[items.name] = items.value;
601
+ }
602
+ }
603
+ } else if (items.type === 'table' && items.form) {
604
+ val[items.type] = items.data;
605
+ }
606
+ });
607
+ return val;
608
+ };
609
+
610
+ /**
611
+ * loading 需全局引入element-ui
612
+ * @desc:loading
613
+ * @author huangbo
614
+ * @date 2022年5月7日
615
+ * @param {String} [text] - 显示的文本内容
616
+ **/
617
+ var loading = function loading($loading, res) {
618
+ if (isObject(res)) {
619
+ var config = extend({}, {
620
+ fullscreen: true,
621
+ background: 'rgba(0, 0, 0, 0.65)',
622
+ spinner: 'el-icon-loading',
623
+ text: '加载中...'
624
+ }, res);
625
+ return $loading(config);
626
+ } else {
627
+ window.loading = $loading({
628
+ fullscreen: true,
629
+ background: 'rgba(0, 0, 0, 0.65)',
630
+ spinner: 'el-icon-loading',
631
+ text: res ? res : '加载中...'
632
+ });
633
+ return window.loading;
634
+ }
635
+ };
636
+
637
+ /**
638
+ * formatDate
639
+ * @desc:格式化时间
640
+ * @author huangbo
641
+ * @date 2022年5月7日
642
+ * @param {String, Number} [date] - 时间字符串或时间戳
643
+ * @param {String} [fmt] - 格式
644
+ **/
645
+ var formatDate = function formatDate(date, fmt) {
646
+ var obj = void 0;
647
+ if (date) {
648
+ obj = new Date(date);
649
+ } else {
650
+ obj = new Date();
651
+ }
652
+ var quarter = ['一', '二', '三', '四'];
653
+ var o = {
654
+ 'b+': Math.ceil((obj.getMonth() + 1) / 6), // 半年
655
+ 'M+': obj.getMonth() + 1, // 月份
656
+ 'd+': obj.getDate(), // 日
657
+ 'H+': obj.getHours(), // 小时
658
+ 'm+': obj.getMinutes(), // 分
659
+ 's+': obj.getSeconds(), // 秒
660
+ 'q+': quarter[Math.ceil((obj.getMonth() + 1) / 3) - 1], // 季度
661
+ S: obj.getMilliseconds() // 毫秒
662
+ };
663
+ if (/(y+)/.test(fmt)) {
664
+ fmt = fmt.replace(RegExp.$1, (obj.getFullYear() + '').substr(4 - RegExp.$1.length));
665
+ }
666
+ for (var k in o) {
667
+ if (new RegExp('(' + k + ')').test(fmt)) {
668
+ fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
669
+ }
670
+ }
671
+ return fmt;
672
+ };
673
+ /**
674
+ * timeFrame
675
+ * @desc:格式化时间
676
+ * @author huangbo
677
+ * @date 2022年5月7日
678
+ * @param {String, Number} [date] - 时间字符串或时间戳
679
+ **/
680
+ var timeFrame = function timeFrame(date) {
681
+ var obj = void 0;
682
+ if (date) {
683
+ obj = new Date(date);
684
+ } else {
685
+ obj = new Date();
686
+ }
687
+ var h = obj.getHours(); // 获取小时
688
+ var period = '';
689
+ h < 12 ? period = '上午好!' : h < 18 ? period = '下午好!' : period = '晚上好!';
690
+ return period;
691
+ };
692
+ /**
693
+ * getStyle
694
+ * @desc:获取元素样式(含非行内样式)
695
+ * @author huangbo
696
+ * @date 2022年5月7日
697
+ * @param {String} [dom] - dom元素
698
+ * @param {String} [attr] - 样式属性名
699
+ **/
700
+
701
+ var getStyle = function getStyle(dom, attr) {
702
+ if (dom.style[attr]) {
703
+ return dom.style[attr];
704
+ }
705
+ if (window.getComputedStyle) {
706
+ return getComputedStyle(dom, null)[attr];
707
+ }
708
+ return dom.currentStyle[attr];
709
+ };
710
+
711
+ /**
712
+ * handlerUrl
713
+ * @desc:更新url参数中的时间戳
714
+ * @author huangbo
715
+ * @date 2022年5月7日
716
+ * @param {String} [url] - url地址
717
+ **/
718
+
719
+ var handlerUrl = function handlerUrl(url, host) {
720
+ var arry = url.split('?');
721
+ if (arry.length > 1) {
722
+ if (arry[1].indexOf('_tt') > -1) {
723
+ var search = arry[1].split('&');
724
+ for (var i in search) {
725
+ if (search[i].indexOf('_tt') > -1) {
726
+ search[i] = '_tt=' + new Date().getTime();
727
+ }
728
+ }
729
+ arry[1] = search.join('&');
730
+ } else {
731
+ arry[1] += '&_tt=' + new Date().getTime();
732
+ }
733
+ url = arry.join('?');
734
+ } else {
735
+ url += '?_tt=' + new Date().getTime();
736
+ }
737
+ url = jointUrl(url, host);
738
+ return encodeURI(url);
739
+ };
740
+
741
+ /**
742
+ * getRgb
743
+ * @desc:获取颜色值的rgb值
744
+ * @author huangbo
745
+ * @date 2022年5月7日
746
+ * @param {string} [$color] - 颜色值
747
+ **/
748
+ var getRgb = function getRgb($color) {
749
+ var rgb = [];
750
+ // 16进制颜色值的正则
751
+ var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
752
+ // 把颜色值变成小写
753
+ $color = $color.toLowerCase();
754
+ if (reg.test($color)) {
755
+ // 如果只有三位的值,需变成六位,如:#fff => #ffffff
756
+ if ($color.length === 4) {
757
+ var colorNew = '#';
758
+ for (var i = 1; i < 4; i++) {
759
+ colorNew += $color.slice(i, i + 1).concat($color.slice(i, i + 1));
760
+ }
761
+ $color = colorNew;
762
+ }
763
+ // 处理六位的颜色值,转为RGB
764
+ for (var _i5 = 1; _i5 < 7; _i5 += 2) {
765
+ rgb.push(parseInt('0x' + $color.slice(_i5, _i5 + 2), 16));
766
+ }
767
+ } else {
768
+ rgb = $color.replace(/(?:\(|\)|rgb|RGB)*/g, '').split(',');
769
+ }
770
+ return rgb;
771
+ };
772
+
773
+ /**
774
+ * rgbToHsv
775
+ * @desc:rgb转化成hsv
776
+ * @author huangbo
777
+ * @date 2022年5月7日
778
+ * @param {string} [$color] - 颜色值
779
+ **/
780
+ var rgbToHsv = function rgbToHsv($color) {
781
+ var rgb = getRgb($color);
782
+ var $red = rgb[0];
783
+ var $green = rgb[1];
784
+ var $blue = rgb[2];
785
+ var $max = Math.max($red, $green, $blue);
786
+ var $min = Math.min($red, $green, $blue);
787
+ var $diff = $max - $min;
788
+ var $h = 0;
789
+ if ($max === $min) {
790
+ $h = 0;
791
+ } else if ($max === $red) {
792
+ $h = 60 * ($green - $blue) / $diff + ($green > $blue - 1 ? 0 : 360);
793
+ } else if ($max === $green) {
794
+ $h = 60 * ($blue - $red) / $diff + 120;
795
+ } else if ($max === $blue) {
796
+ $h = 60 * ($red - $green) / $diff + 240;
797
+ }
798
+ var $s = $max === 0 ? 0 : $diff / $max;
799
+ var $v = $max / 255;
800
+ return [$h, $s, $v];
801
+ };
802
+ /**
803
+ * hsvTorgb
804
+ * @desc:hsv转化成rgb
805
+ * @author huangbo
806
+ * @date 2022年5月7日
807
+ * @param {string} [$color] - 颜色值
808
+ **/
809
+ function hsvTorgb($h, $s, $v) {
810
+ var $th = Math.floor($h / 60);
811
+ var $t1 = $h / 60 - $th;
812
+ var $t2 = $v * (1 - $s);
813
+ var $t3 = $v * (1 - $t1 * $s);
814
+ var $t4 = $v * (1 - (1 - $t1) * $s);
815
+ var $r = [$v, $t3, $t2, $t2, $t4, $v][$th % 6];
816
+ var $g = [$t4, $v, $v, $t3, $t2, $t2][$th % 6];
817
+ var $b = [$t2, $t2, $t4, $v, $v, $t3][$th % 6];
818
+ // return `rgb(${Math.round($r * 255)}, ${Math.round($g * 255)}, ${Math.round($b * 255)})`;
819
+ var red = Math.round($r * 255);
820
+ var green = Math.round($g * 255);
821
+ var blue = Math.round($b * 255);
822
+ red = red.toString(16);
823
+ green = green.toString(16);
824
+ blue = blue.toString(16);
825
+ red = red.length === 1 ? '0' + red : red;
826
+ green = green.length === 1 ? '0' + green : green;
827
+ blue = blue.length === 1 ? '0' + blue : blue;
828
+ return '#' + red + green + blue;
829
+ }
830
+ /**
831
+ * toFixed
832
+ * @desc:浮点数保留小数位
833
+ * @author huangbo
834
+ * @date 2022年5月7日
835
+ * @param {number} [$float] - 要转换的数值
836
+ * @param {number} [$digits] - 小数位数
837
+ **/
838
+ function toFixed($float, $digits) {
839
+ var $pow = Math.pow(10, $digits);
840
+ return Math.round($float * $pow) / $pow;
841
+ }
842
+
843
+ /**
844
+ * getHue
845
+ * @desc:转换色相
846
+ * @author huangbo
847
+ * @date 2022年5月7日
848
+ **/
849
+ function getHue($h, $i, $isLight) {
850
+ var $hue = void 0;
851
+ if ($h >= 60 && $h <= 240) {
852
+ $hue = $isLight ? $h - $hueStep * $i : $h + $hueStep * $i;
853
+ } else {
854
+ $hue = $isLight ? $h + $hueStep * $i : $h - $hueStep * $i;
855
+ }
856
+ $hue = ($hue + 360) % 360;
857
+ return Math.round($hue);
858
+ }
859
+
860
+ /**
861
+ * getSaturation
862
+ * @desc:转换饱和度
863
+ * @author huangbo
864
+ * @date 2022年5月7日
865
+ **/
866
+ function getSaturation($s, $i, $isLight) {
867
+ var $saturation = void 0;
868
+ if ($isLight) {
869
+ $saturation = $s - $saturationStep1 * $i;
870
+ } else if ($i === $darkColorCount) {
871
+ $saturation = $s + $saturationStep1;
872
+ } else {
873
+ $saturation = $s + $saturationStep2 * $i;
874
+ }
875
+ $saturation = $saturation < 1 ? $saturation : 1;
876
+
877
+ if ($isLight && $i === $lightColorCount && $saturation > 0.1) {
878
+ $saturation = 0.1;
879
+ }
880
+ $saturation = $saturation > 0.06 ? $saturation : 0.06;
881
+ return toFixed($saturation, 2);
882
+ }
883
+
884
+ /**
885
+ * getValue
886
+ * @desc:转换明度
887
+ * @author huangbo
888
+ * @date 2022年5月7日
889
+ **/
890
+ function getValue($v, $i, $isLight) {
891
+ var $value = $isLight ? $v + $brightnessStep1 * $i : $v - $brightnessStep2 * $i;
892
+ $value = $value < 1 ? $value : 1;
893
+ return toFixed($value, 2);
894
+ }
895
+ var $hueStep = 2;
896
+ var $saturationStep1 = 0.16;
897
+ var $saturationStep2 = 0.05;
898
+ var $brightnessStep1 = 0.05;
899
+ var $brightnessStep2 = 0.15;
900
+ var $lightColorCount = 5;
901
+ var $darkColorCount = 4;
902
+
903
+ /**
904
+ * getColor
905
+ * @desc:根据颜色和对应的色板位置,计算出对应的色板颜色
906
+ * @author huangbo
907
+ * @date 2022年5月7日
908
+ **/
909
+ function getColor($color, $n) {
910
+ var $isLight = $n < 7;
911
+ var $hsv = rgbToHsv($color);
912
+ // 这里将i转换成以主色为中心,两侧的i值逐渐增大
913
+ var $i = $isLight ? $lightColorCount + 1 - $n : $n - $lightColorCount - 1;
914
+ var color = hsvTorgb(getHue($hsv[0], $i, $isLight), getSaturation($hsv[1], $i, $isLight), getValue($hsv[2], $i, $isLight));
915
+ return color;
916
+ }
917
+ /**
918
+ * mixColor
919
+ * @desc:生成混合色
920
+ * @author huangbo
921
+ * @date 2022年5月7日
922
+ * @param {string} [$color1] - 颜色值
923
+ * @param {string} [$color2] - 颜色值
924
+ * @param {string} [$n] - 百分比 0~1
925
+ **/
926
+ var mixColor = function mixColor($color1, $color2, $n) {
927
+ var rgb1 = getRgb($color1);
928
+ var rgb2 = getRgb($color2);
929
+ var r = rgb1[0] * $n + rgb2[0] * (1 - $n);
930
+ var g = rgb1[1] * $n + rgb2[1] * (1 - $n);
931
+ var b = rgb1[2] * $n + rgb2[2] * (1 - $n);
932
+ return '#' + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
933
+ };
934
+ /**
935
+ * updateTheme
936
+ * @desc:更新主题色
937
+ * @author huangbo
938
+ * @date 2022年5月7日
939
+ * @param {string} [$color] - 颜色值
940
+ **/
941
+ var updateTheme = function updateTheme($color, send) {
942
+ $color = $color ? $color : '#409eff';
943
+ if (send === undefined) {
944
+ send = true;
945
+ }
946
+ document.documentElement.style.setProperty('--theme-primary', $color);
947
+ for (var i = 1; i < 11; i++) {
948
+ if (i === 6) {
949
+ document.documentElement.style.setProperty('--theme-primary-light-' + i, $color);
950
+ } else {
951
+ var light = getColor($color, i);
952
+ document.documentElement.style.setProperty('--theme-primary-light-' + i, light);
953
+ }
954
+ }
955
+ if (send) {
956
+ sendMessage({ data: { type: 'setTheme' } });
957
+ }
958
+ };
959
+ /**
960
+ * sendMessage
961
+ * @desc:向iframe发送信息
962
+ * @author huangbo
963
+ * @date 2022年5月7日
964
+ * @param {object} [data] - 数据---其中type必须表示操作类型
965
+ * @param {string} [url] - 指定的消息发送URI地址
966
+ **/
967
+ var sendMessage = function sendMessage(_ref) {
968
+ var _ref$data = _ref.data,
969
+ data = _ref$data === undefined ? {} : _ref$data,
970
+ url = _ref.url;
971
+
972
+ var iframes = document.getElementsByTagName('iframe');
973
+ for (var i = 0; i < iframes.length; i++) {
974
+ if (url !== undefined) {
975
+ if (iframes[i].contentWindow.location.href === url) {
976
+ iframes[i].contentWindow.postMessage(data, url);
977
+ return;
978
+ }
979
+ } else {
980
+ iframes[i].contentWindow.postMessage(data);
981
+ }
982
+ }
983
+ };
984
+
985
+ /**
986
+ * receiveMessage
987
+ * @desc:接收发送信息
988
+ * @author huangbo
989
+ * @date 2022年5月7日
990
+ * @param {object} [data] - 数据---其中type必须表示操作类型
991
+ * @param {string} [url] - 消息源的 URI
992
+ * @param {function} [callback] - 回调函数
993
+ **/
994
+ var receiveMessage = function receiveMessage(_ref2) {
995
+ var _ref2$data = _ref2.data,
996
+ data = _ref2$data === undefined ? {} : _ref2$data,
997
+ url = _ref2.url,
998
+ callback = _ref2.callback;
999
+
1000
+ window.addEventListener('message', function (e) {
1001
+ if (url !== undefined) {
1002
+ if (e.origin !== url) {
1003
+ // 验证消息来源地址
1004
+ return;
1005
+ }
1006
+ }
1007
+ callback(e.data);
1008
+ });
1009
+ };
1010
+
1011
+ /**
1012
+ * getTypeName
1013
+ * @desc:转换类型文本
1014
+ * @author huangbo
1015
+ * @date 2022年5月7日
1016
+ * @param {string} [type] - 类型
1017
+ **/
1018
+ var getTypeName = function getTypeName(type) {
1019
+ var typeName = '';
1020
+ var sysorgname = getStorage('sysorgname');
1021
+ var sysdepname = getStorage('sysdepname');
1022
+ if (type === 'enterprise') {
1023
+ if (sysorgname) {
1024
+ typeName = '[' + sysorgname + ']';
1025
+ } else {
1026
+ typeName = '[公司]';
1027
+ }
1028
+ } else if (type === 'department') {
1029
+ if (sysdepname) {
1030
+ typeName = '[' + sysdepname + ']';
1031
+ } else {
1032
+ typeName = '[部门]';
1033
+ }
1034
+ } else if (type === 'role') {
1035
+ typeName = '[角色]';
1036
+ } else if (type === 'post') {
1037
+ typeName = '[岗位]';
1038
+ } else if (type === 'otheremployee' || type === 'employee') {
1039
+ if (sysdepname) {
1040
+ typeName = '[' + sysdepname + '员工]';
1041
+ } else {
1042
+ typeName = '[部门员工]';
1043
+ }
1044
+ } else if (type === 'postemployee') {
1045
+ typeName = '[岗位员工]';
1046
+ } else if (type === 'persongroup') {
1047
+ typeName = '[人员群组成员]';
1048
+ } else if (type === 'filgroup') {
1049
+ if (sysorgname) {
1050
+ typeName = '[' + sysorgname + '群组成员]';
1051
+ } else {
1052
+ typeName = '[公司群组成员]';
1053
+ }
1054
+ } else if (type === 'depgroup') {
1055
+ if (sysdepname) {
1056
+ typeName = '[' + sysdepname + '群组成员]';
1057
+ } else {
1058
+ typeName = '[部门群组成员]';
1059
+ }
1060
+ } else if (type === 'persongroupobj') {
1061
+ typeName = '[人员群组]';
1062
+ } else if (type === 'filgroupobj') {
1063
+ if (sysorgname) {
1064
+ typeName = '[' + sysorgname + '群组]';
1065
+ } else {
1066
+ typeName = '[公司群组]';
1067
+ }
1068
+ } else if (type === 'depgroupobj') {
1069
+ if (sysdepname) {
1070
+ typeName = '[' + sysdepname + '群组]';
1071
+ } else {
1072
+ typeName = '[部门群组]';
1073
+ }
1074
+ } else if (type === 'otherperson' || type === 'topcontacts' || type === 'person') {
1075
+ typeName = '[人员]';
1076
+ } else if (type === 'codetable') {
1077
+ typeName = '[代码表]';
1078
+ } else if (type === 'organizecentreobj') {
1079
+ typeName = '[组织中心]';
1080
+ }
1081
+ return typeName;
1082
+ };
1083
+
1084
+ /**
1085
+ * replenish
1086
+ * @desc:补全小数位数
1087
+ * @author huangbo
1088
+ * @date 2022年5月7日
1089
+ * @param {string、number} [num] - 数字或字符串型数字
1090
+ * @param {number} [precision] - 需要的小数位数
1091
+ **/
1092
+ var replenish = function replenish(num, precision) {
1093
+ if (num && precision && precision > 0) {
1094
+ var power = Math.pow(10, precision);
1095
+ var res = num === 'string' ? Number(num) : num;
1096
+ res = String(Math.round(res * power) / power);
1097
+ var len = res.indexOf('.');
1098
+ if (len < 0) {
1099
+ len = res.length;
1100
+ res += '.';
1101
+ }
1102
+ while (res.length <= len + precision) {
1103
+ res += '0';
1104
+ }
1105
+ return parseFloat(res);
1106
+ }
1107
+ return num;
1108
+ };
1109
+ /**
1110
+ * identical
1111
+ * @desc:form验证两个值是否相同(确认密码)
1112
+ * @author huangbo
1113
+ * @date 2022年5月7日
1114
+ * @param {val} [string] - 当前值
1115
+ * @param {callback} [function] - 回调函数
1116
+ * @param {val} [string] - 被验证的原值
1117
+ **/
1118
+ var identical = function identical(value, callback, val) {
1119
+ if (value === '' || value === null || value === undefined) {
1120
+ if (val === '' || val === null || val === undefined) {
1121
+ callback();
1122
+ } else {
1123
+ callback(new Error('请再次输入'));
1124
+ }
1125
+ } else if (value !== val) {
1126
+ callback(new Error('两次输入不一致!'));
1127
+ } else {
1128
+ callback();
1129
+ }
1130
+ };
1131
+
1132
+ /**
1133
+ * exportXls
1134
+ * @desc:导出表格数据
1135
+ * @author huangbo
1136
+ * @date 2022年5月7日
1137
+ * @param {thead} [array] - 表单头部
1138
+ * @param {data} [array] - 导出的数据
1139
+ * @param {name} [string] - 导出文件名
1140
+ * @param {numbers} [boolean] - 序号
1141
+ **/
1142
+ var exportXls = function exportXls(_ref3) {
1143
+ var _ref3$thead = _ref3.thead,
1144
+ thead = _ref3$thead === undefined ? [] : _ref3$thead,
1145
+ _ref3$data = _ref3.data,
1146
+ data = _ref3$data === undefined ? [] : _ref3$data,
1147
+ name = _ref3.name,
1148
+ numbers = _ref3.numbers;
1149
+
1150
+ var tbody = '';
1151
+ var aligns = [];
1152
+ var fields = [];
1153
+ var alink = document.createElement('a');
1154
+ for (var i = 0; i < thead.length; i++) {
1155
+ tbody += '<tr style="text-align: center;">';
1156
+ if (numbers) {
1157
+ tbody += '<th rowspan="' + thead.length + '"></th>';
1158
+ }
1159
+ var tr = thead[i];
1160
+ for (var _x = 0; _x < tr.length; _x++) {
1161
+ var td = tr[_x];
1162
+ tbody += '<th rowspan="' + td.rowspan + '" colspan="' + td.colspan + '" align="' + td.align + '">' + td.label + '</th>';
1163
+ if (td.property) {
1164
+ fields.push(td.property);
1165
+ aligns.push(td.align);
1166
+ }
1167
+ }
1168
+ tbody += '</tr>';
1169
+ }
1170
+ for (var _i6 = 0; _i6 < data.length; _i6++) {
1171
+ tbody += '<tr>';
1172
+ for (var x in fields) {
1173
+ tbody += '<td align="' + aligns[x] + '">' + data[_i6][fields[x]] + '</td>';
1174
+ }
1175
+ tbody += '</tr>';
1176
+ }
1177
+ if (!name) {
1178
+ name = 'table_' + new Date().getTime();
1179
+ }
1180
+ var uri = 'data:application/vnd.ms-excel;base64,';
1181
+ var template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><meta charset="UTF-8"><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table style="vnd.ms-excel.numberformat:@">' + tbody + '</table></body></html>';
1182
+ alink.href = uri + window.btoa(unescape(encodeURIComponent(template)));
1183
+ alink.download = name + '.xls';
1184
+ document.body.appendChild(alink);
1185
+ alink.click();
1186
+ document.body.removeChild(alink);
1187
+ };
1188
+ /**
1189
+ * 获取色彩列表的方法
1190
+ * @function themeTools#handlerGetThemeCluster
1191
+ * @param {String} color - 主题色
1192
+ * @param {String} mode - 风格模式light | dark
1193
+ * @param {String} backgroundColor - mode = dark时的页面背景颜色
1194
+ *
1195
+ * @example
1196
+ * ```js
1197
+ * handlerGetThemeCluster('#0e91ef','dark','#000000');
1198
+ * ```
1199
+ * @return {Array} ['#e6f9ff','#0e91ef',...]
1200
+ */
1201
+ var handlerGetThemeCluster = function handlerGetThemeCluster(color) {
1202
+ var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'light';
1203
+ var backgroundColor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '#000000';
1204
+
1205
+ return Object(_eoss_design_color__WEBPACK_IMPORTED_MODULE_0__["generate"])(color, mode === 'dark' ? { theme: 'dark', backgroundColor: backgroundColor } : {});
1206
+ };
1207
+
1208
+ /**
1209
+ * H5TokenInvalid
1210
+ * @desc 原生app重新登录
1211
+ * @date 2023年3月2日
1212
+ * @author liufan
1213
+ */
1214
+ var H5TokenInvalid = function H5TokenInvalid() {
1215
+ var u = navigator.userAgent;
1216
+ var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; // android终端
1217
+ var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
1218
+ if (isAndroid) {
1219
+ window.AndroidWebView.H5TokenInvalid();
1220
+ } else if (isiOS) {
1221
+ var info = {};
1222
+ window.webkit.messageHandlers.H5TokenInvalid.postMessage(info);
1223
+ }
1224
+ };
1225
+ /**
1226
+ * JSCallNativeShowTabbar
1227
+ * @desc:原生app隐藏或显示底部tabbar
1228
+ * @date 2023年3月2日
1229
+ * @author liufan
1230
+ * @param {Boolean} res -是否展示底部导航
1231
+ */
1232
+ var JSCallNativeShowTabbar = function JSCallNativeShowTabbar(res) {
1233
+ var u = navigator.userAgent;
1234
+ var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; // android终端
1235
+ var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
1236
+ var data = {
1237
+ showState: res
1238
+ };
1239
+ if (isAndroid) {
1240
+ window.AndroidWebView.JSCallNativeShowTabbar(JSON.stringify(data));
1241
+ } else if (isiOS) {
1242
+ window.webkit.messageHandlers.JSCallNativeShowTabbar.postMessage(data);
1243
+ }
1244
+ };
1245
+ /**
1246
+ * JSCallNativeShowNaviBar
1247
+ * @desc:原生app隐藏或者显示头部导航栏
1248
+ * @date 2023年3月2日
1249
+ * @author liufan
1250
+ * @param {Boolean} res -是否展示头部导航栏
1251
+ */
1252
+ var JSCallNativeShowNaviBar = function JSCallNativeShowNaviBar(res) {
1253
+ var u = navigator.userAgent;
1254
+ var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; // android终端
1255
+ var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
1256
+ if (isAndroid) {
1257
+ var data = {
1258
+ showState: res
1259
+ };
1260
+ window.AndroidWebView.JSCallNativeShowNaviBar(JSON.stringify(data));
1261
+ } else if (isiOS) {
1262
+ window.webkit.messageHandlers.JSCallNativeShowNaviBar({
1263
+ showState: JSON.stringify(res)
1264
+ });
1265
+ }
1266
+ };
1267
+ /**
1268
+ * JSCallNativeOpenUrl
1269
+ * @desc:原生app打开外部链接
1270
+ * @date 2023年3月2日
1271
+ * @author liufan
1272
+ * @param {Object} data -链接参数
1273
+ */
1274
+ var JSCallNativeOpenUrl = function JSCallNativeOpenUrl(data) {
1275
+ var u = navigator.userAgent;
1276
+ var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; // android终端
1277
+ var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
1278
+ if (isAndroid) {
1279
+ window.AndroidWebView.JSCallNativeOpenUrl(JSON.stringify(data));
1280
+ } else if (isiOS) {
1281
+ window.webkit.messageHandlers.JSCallNativeOpenUrl.postMessage(data);
1282
+ }
1283
+ };
1284
+ /**
1285
+ * openMainBodyFile
1286
+ * @desc:原生app打开正文
1287
+ * @date 2023年3月2日
1288
+ * @author liufan
1289
+ * @param {Object} data 正文参数
1290
+ */
1291
+ var openMainBodyFile = function openMainBodyFile(data) {
1292
+ var u = navigator.userAgent;
1293
+ var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; // android终端
1294
+ var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
1295
+ if (isAndroid) {
1296
+ window.AndroidWebView.JSCallOpenMainBodyFile(JSON.stringify(data));
1297
+ } else if (isiOS) {
1298
+ window.webkit.messageHandlers.JSCallOpenMainBodyFile.postMessage(data);
1299
+ }
1300
+ };
1301
+ /**
1302
+ * openUrl
1303
+ * @desc 打开外网地址
1304
+ * @date 2023年3月2日
1305
+ * @author liufan
1306
+ * @param {String} url 调整地址
1307
+ */
1308
+ var openUrl = function openUrl(url) {
1309
+ var u = navigator.userAgent;
1310
+ var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; // android终端
1311
+ var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
1312
+ if (isAndroid) {
1313
+ window.open(url);
1314
+ } else if (isiOS) {
1315
+ window.location.href = url;
1316
+ }
1317
+ };
1318
+ /**
1319
+ * openAttachment
1320
+ * @desc:原生app通用打开附件
1321
+ * @date 2023年3月2日
1322
+ * @author liufan
1323
+ * @param {Object} data -附件信息
1324
+ */
1325
+ var openAttachment = function openAttachment(data) {
1326
+ if (window.isCh) {
1327
+ window.uexPDF.openOther(data);
1328
+ } else {
1329
+ var u = navigator.userAgent;
1330
+ var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; // android终端
1331
+ var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
1332
+ if (isAndroid) {
1333
+ window.AndroidWebView.jsOpenAccessory(JSON.stringify(data));
1334
+ } else if (isiOS) {
1335
+ window.webkit.messageHandlers.jsOpenAccessory.postMessage(data);
1336
+ }
1337
+ }
1338
+ };
1339
+ /**
1340
+ * jsGoPayrollIndexAct
1341
+ * @desc:原生app打开工资条页面
1342
+ * @date 2024年1月11日
1343
+ * @author liufan
1344
+ */
1345
+ var jsGoPayrollIndexAct = function jsGoPayrollIndexAct(id) {
1346
+ var u = navigator.userAgent;
1347
+ var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; // android终端
1348
+ var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
1349
+ if (isAndroid) {
1350
+ window.AndroidWebView.jsGoPayrollIndexAct(id);
1351
+ } else if (isiOS) {
1352
+ window.webkit.messageHandlers.jsGoPayrollIndexAct.postMessage(id);
1353
+ }
1354
+ };
1355
+
1356
+ /**
1357
+ * deepClone
1358
+ * @desc:深拷贝
1359
+ * @date 2023年3月2日
1360
+ * @author liufan
1361
+ * @param {Object、Array} target
1362
+ */
1363
+ var deepClone = function deepClone(target) {
1364
+ var result = void 0;
1365
+ // 如果当前需要深拷贝的是一个对象的话
1366
+ if ((typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object') {
1367
+ // 如果是一个数组的话
1368
+ if (Array.isArray(target)) {
1369
+ result = [];
1370
+ for (var i in target) {
1371
+ result.push(deepClone(target[i]));
1372
+ }
1373
+ } else if (target === null) {
1374
+ result = null;
1375
+ } else if (target.constructor === RegExp) {
1376
+ result = target;
1377
+ } else {
1378
+ result = {};
1379
+ for (var _i7 in target) {
1380
+ result[_i7] = deepClone(target[_i7]);
1381
+ }
1382
+ }
1383
+ } else {
1384
+ result = target;
1385
+ }
1386
+ return result;
1387
+ };
1388
+
1389
+ /**
1390
+ * 排除属性
1391
+ * @desc:exclAttribute
1392
+ * @author huangbo
1393
+ * @date 2022年5月7日
1394
+ * @param {String/Array} [attrs] - 要排除的属性
1395
+ **/
1396
+ var exclAttribute = function exclAttribute(_ref4) {
1397
+ var _ref4$attrs = _ref4.attrs,
1398
+ attrs = _ref4$attrs === undefined ? 'value' : _ref4$attrs,
1399
+ data = _ref4.data;
1400
+
1401
+ var obj = extend(true, {}, data);
1402
+ if (Array.isArray(attrs)) {
1403
+ attrs.forEach(function (item) {
1404
+ if (obj[item] !== undefined) {
1405
+ delete obj[item];
1406
+ }
1407
+ });
1408
+ } else {
1409
+ delete obj[attrs];
1410
+ }
1411
+ return obj;
1412
+ };
1413
+ /**
1414
+ * 获取UUID
1415
+ * @desc:generateUUID
1416
+ * @author liufan
1417
+ * @date 2024年1月12日
1418
+ **/
1419
+ var generateUUID = function generateUUID() {
1420
+ var d = new Date().getTime();
1421
+ var uuid = 'xxxxxxxxxxxxxxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
1422
+ var r = (d + Math.random() * 16) % 16 | 0;
1423
+ d = Math.floor(d / 16);
1424
+ return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
1425
+ });
1426
+ return uuid;
1427
+ };
1428
+ /* harmony default export */ __webpack_exports__["a"] = ({
1429
+ esEncrypt: esEncrypt,
1430
+ esDecode: esDecode,
1431
+ startWith: startWith,
1432
+ jointUrl: jointUrl,
1433
+ queryParams: queryParams,
1434
+ exclAttribute: exclAttribute,
1435
+ urlJoinParams: urlJoinParams,
1436
+ arrUnique: arrUnique,
1437
+ isObject: isObject,
1438
+ isFunction: isFunction,
1439
+ extend: extend,
1440
+ getObjectType: getObjectType,
1441
+ getParams: getParams,
1442
+ getScript: getScript,
1443
+ indexOfObj: indexOfObj,
1444
+ overbrim: overbrim,
1445
+ deepClone: deepClone,
1446
+ setStorage: setStorage,
1447
+ handlerGetThemeCluster: handlerGetThemeCluster,
1448
+ JSCallNativeShowNaviBar: JSCallNativeShowNaviBar,
1449
+ removeStorage: removeStorage,
1450
+ openAttachment: openAttachment,
1451
+ openUrl: openUrl,
1452
+ JSCallNativeOpenUrl: JSCallNativeOpenUrl,
1453
+ openMainBodyFile: openMainBodyFile,
1454
+ JSCallNativeShowTabbar: JSCallNativeShowTabbar,
1455
+ H5TokenInvalid: H5TokenInvalid,
1456
+ getStorage: getStorage,
1457
+ getValues: getValues,
1458
+ loading: loading,
1459
+ formatDate: formatDate,
1460
+ timeFrame: timeFrame,
1461
+ getStyle: getStyle,
1462
+ handlerUrl: handlerUrl,
1463
+ mixColor: mixColor,
1464
+ getRgb: getRgb,
1465
+ updateTheme: updateTheme,
1466
+ sendMessage: sendMessage,
1467
+ receiveMessage: receiveMessage,
1468
+ getTypeName: getTypeName,
1469
+ replenish: replenish,
1470
+ identical: identical,
1471
+ jsGoPayrollIndexAct: jsGoPayrollIndexAct,
1472
+ exportXls: exportXls,
1473
+ generateUUID: generateUUID
1474
+ });
1475
+
1476
+ /***/ }),
1477
+
1478
+ /***/ 1:
1479
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1480
+
1481
+ "use strict";
1482
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
1483
+ /* globals __VUE_SSR_CONTEXT__ */
1484
+
1485
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
1486
+ // This module is a runtime utility for cleaner component module output and will
1487
+ // be included in the final webpack user bundle.
1488
+
1489
+ function normalizeComponent(
1490
+ scriptExports,
1491
+ render,
1492
+ staticRenderFns,
1493
+ functionalTemplate,
1494
+ injectStyles,
1495
+ scopeId,
1496
+ moduleIdentifier /* server only */,
1497
+ shadowMode /* vue-cli only */
1498
+ ) {
1499
+ // Vue.extend constructor export interop
1500
+ var options =
1501
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
1502
+
1503
+ // render functions
1504
+ if (render) {
1505
+ options.render = render
1506
+ options.staticRenderFns = staticRenderFns
1507
+ options._compiled = true
1508
+ }
1509
+
1510
+ // functional template
1511
+ if (functionalTemplate) {
1512
+ options.functional = true
1513
+ }
1514
+
1515
+ // scopedId
1516
+ if (scopeId) {
1517
+ options._scopeId = 'data-v-' + scopeId
1518
+ }
1519
+
1520
+ var hook
1521
+ if (moduleIdentifier) {
1522
+ // server build
1523
+ hook = function (context) {
1524
+ // 2.3 injection
1525
+ context =
1526
+ context || // cached call
1527
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
1528
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
1529
+ // 2.2 with runInNewContext: true
1530
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
1531
+ context = __VUE_SSR_CONTEXT__
1532
+ }
1533
+ // inject component styles
1534
+ if (injectStyles) {
1535
+ injectStyles.call(this, context)
1536
+ }
1537
+ // register component module identifier for async chunk inferrence
1538
+ if (context && context._registeredComponents) {
1539
+ context._registeredComponents.add(moduleIdentifier)
1540
+ }
1541
+ }
1542
+ // used by ssr in case component is cached and beforeCreate
1543
+ // never gets called
1544
+ options._ssrRegister = hook
1545
+ } else if (injectStyles) {
1546
+ hook = shadowMode
1547
+ ? function () {
1548
+ injectStyles.call(
1549
+ this,
1550
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
1551
+ )
1552
+ }
1553
+ : injectStyles
1554
+ }
1555
+
1556
+ if (hook) {
1557
+ if (options.functional) {
1558
+ // for template-only hot-reload because in that case the render fn doesn't
1559
+ // go through the normalizer
1560
+ options._injectStyles = hook
1561
+ // register for functional component in vue file
1562
+ var originalRender = options.render
1563
+ options.render = function renderWithStyleInjection(h, context) {
1564
+ hook.call(context)
1565
+ return originalRender(h, context)
1566
+ }
1567
+ } else {
1568
+ // inject component registration as beforeCreate hook
1569
+ var existing = options.beforeCreate
1570
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
1571
+ }
1572
+ }
1573
+
1574
+ return {
1575
+ exports: scriptExports,
1576
+ options: options
1577
+ }
1578
+ }
1579
+
1580
+
1581
+ /***/ }),
1582
+
1583
+ /***/ 2:
1584
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1585
+
1586
+ "use strict";
1587
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return initRetrialAuth; });
1588
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getRetrialAuthCode; });
1589
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return codeRetrialAuth; });
1590
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return selectObject; });
1591
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return findSysCode; });
1592
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return commonOpion; });
1593
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getHandleInfoHtml; });
1594
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return getNodeInfoHtml; });
1595
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return taskHandleHtml; });
1596
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return taskHandleHtmlImg; });
1597
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return registerNew; });
1598
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getNodeInfo; });
1599
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return toStartFlow; });
1600
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return taskRejectHtml; });
1601
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return toTaskRejectHtml; });
1602
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return handleTaskRead; });
1603
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return taskReadHtml; });
1604
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return toStartTaskRead; });
1605
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return toStartTaskReadHtml; });
1606
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return toTaskTransferIndex; });
1607
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return findSysCodes; });
1608
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getNotificationMsg; });
1609
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return toTaskUnionExamine; });
1610
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return taskUnionExamine; });
1611
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return toTaskTakeAdvice; });
1612
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return taskTakeAdvice; });
1613
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return toTaskStartDraft; });
1614
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return taskStartDraft; });
1615
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return toTaskUnionSeal; });
1616
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return taskUnionSeal; });
1617
+ /* unused harmony export toTwoOfficesDispatch */
1618
+ /* unused harmony export twoOfficesDispatch */
1619
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return isCanStartSubFlow; });
1620
+ /* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1621
+
1622
+ var activiti = '/bpm';
1623
+ var pending = '/bpm';
1624
+ var mecp = _utils_util__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].getStorage('flowPath') || '';
1625
+ var initRetrialAuth = '/sso2/retrialAuth/initRetrialAuth'; // 初始化二级身份权限验证页面
1626
+ var getRetrialAuthCode = '/sso2/retrialAuth/getRetrialAuthCode'; // 获取二级身份验证验证码
1627
+ var codeRetrialAuth = '/sso2/retrialAuth/codeRetrialAuth'; // 二级身份验证-验证码验证
1628
+ // 获取机构/用户/角色/群组等选择器
1629
+ var selectObject = '/api/v1/mecpSys/selectObject.json';
1630
+ // // 获取代码表数据
1631
+ // export const findSysCode = '/api/v1/mecpSys/findSysCode.json';
1632
+ // 获取代码表数据
1633
+ var findSysCode = activiti + mecp + '/bpmCommon/findCodeValues';
1634
+ // 获取常用意见
1635
+ // export const commonOpion = '/api/v1/mecpIpending/commonOpion.json';
1636
+ // 获取常用意见
1637
+ var commonOpion = activiti + mecp + '/commonOpinionsManager/list';
1638
+ // 获取审核页面信息
1639
+ // export const getHandleInfoHtml = '/api/mecp/v1/mecpItask/getHandleInfoHtml.json';
1640
+ var getHandleInfoHtml = activiti + mecp + '/bpmBackend/toTaskHandleIndex.dhtml';
1641
+ // 获取节点信息(获取节点属性及办理人,审核)
1642
+ // export const getNodeInfoHtml = '/api/mecp/v1/mecpItask/getNodeInfoHtml.json';
1643
+ var getNodeInfoHtml = pending + '/task/taskHandle/getNodeInfo.dhtml';
1644
+ // 提交办理(为H5提供接口)
1645
+ // export const taskHandleHtml = '/api/mecp/v1/mecpItask/taskHandleHtml.json';
1646
+ var taskHandleHtml = pending + '/task/taskHandle/taskHandle.dhtml';
1647
+ var taskHandleHtmlImg = pending + '/task/taskHandle/taskHandleWithHandwrittenOpinion.dhtml';
1648
+
1649
+ // 发起流程
1650
+ var registerNew = '/api/v1/mecpItask/registerNew.json';
1651
+ // 获取节点信息(获取节点属性及办理人,发起)
1652
+ var getNodeInfo = '/api/mecp/v1/mecpItask/getNodeInfo.json';
1653
+ // 获取发起流程信息
1654
+ // export const toStartFlow = '/api/mecp/v1/mecpItask/toStartFlow.json';
1655
+ var toStartFlow = '/api/mecp/v1/mecpItask/toStartFlow.json';
1656
+ // export const toStartFlow = activiti + mecp + '/bpmBackend/toStartFlowIndex';
1657
+
1658
+ // 驳回(为H5提供接口)
1659
+ // export const taskRejectHtml = '/api/mecp/v1/mecpItask/taskRejectHtml.json';
1660
+ var taskRejectHtml = activiti + mecp + '/bpmBackend/taskReject';
1661
+ // 获取驳回页面信息
1662
+ // export const toTaskRejectHtml = '/api/mecp/v1/mecpItask/toTaskRejectHtml.json';
1663
+ var toTaskRejectHtml = activiti + mecp + '/bpmBackend/toTaskReject';
1664
+ // 分阅阅结(为H5提供接口)
1665
+ var handleTaskRead = '/api/mecp/v1/mecpItask/handleTaskRead.json';
1666
+ // 分阅(为H5提供接口)
1667
+ // export const taskReadHtml = '/api/mecp/v1/mecpItask/taskReadHtml.json';
1668
+ var taskReadHtml = activiti + '/task/taskHandle/taskRead.dhtml';
1669
+ // 获取分阅页面信息
1670
+ // export const toStartTaskReadHtml = '/api/mecp/v1/mecpItask/toStartTaskReadHtml.json';
1671
+ // 获取分阅信息
1672
+ var toStartTaskRead = activiti + mecp + '/bpmBackend/toStartTaskRead';
1673
+ var toStartTaskReadHtml = activiti + mecp + '/bpmBackend/toTaskReadIndex';
1674
+ // 获取转办页面数据
1675
+ var toTaskTransferIndex = activiti + mecp + '/bpmBackend/toTaskTransferIndex';
1676
+ // 获取默认通知消息
1677
+ var findSysCodes = pending + '/task/taskHandle/getDefaultNotificationType.dhtml';
1678
+ // 获取通知消息
1679
+ var getNotificationMsg = pending + '/task/taskHandle/getNotificationMsg.dhtml';
1680
+ // 联合审核
1681
+ var toTaskUnionExamine = activiti + mecp + '/bpmBackend/toTaskUnionExamine';
1682
+ // 联合审核提交
1683
+ var taskUnionExamine = activiti + '/task/taskHandle/taskUnionExamine.dhtml';
1684
+ // 征求意见
1685
+ var toTaskTakeAdvice = activiti + mecp + '/bpmBackend/toTaskTakeAdvice';
1686
+ // 征求意见提交
1687
+ var taskTakeAdvice = activiti + '/task/taskHandle/taskTakeAdvice.dhtml';
1688
+ // 稿件递送
1689
+ var toTaskStartDraft = activiti + mecp + '/bpmBackend/totaskStartDraft';
1690
+
1691
+ // 稿件递送提交接口
1692
+ // export const taskStartDraft = '/oa/task/taskHandle/taskStartDraft.dhtml';
1693
+ var taskStartDraft = '/archives/task/taskHandle/taskStartDraft.dhtml';
1694
+ // 联合用印
1695
+ var toTaskUnionSeal = activiti + mecp + '/bpmBackend/toTaskUnionSeal';
1696
+ // 联合用印提交
1697
+ var taskUnionSeal = activiti + '/task/taskHandle/taskUnionSeal.dhtml'; // 报送两办
1698
+ var toTwoOfficesDispatch = activiti + mecp + '/bpmBackend/toTwoOfficesDispatch';
1699
+ // 报送两办提交
1700
+ var twoOfficesDispatch = activiti + '/task/taskHandle/twoOfficesDispatch.dhtml';
1701
+ // 是否允许启动子流程(必经节点)
1702
+ var isCanStartSubFlow = activiti + '/task/taskHandle/isCanStartSubFlow.dhtml';
1703
+
1704
+ /***/ }),
1705
+
1706
+ /***/ 3:
1707
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1708
+
1709
+ "use strict";
1710
+
1711
+ // EXTERNAL MODULE: external "axios"
1712
+ var external_axios_ = __webpack_require__(6);
1713
+ var external_axios_default = /*#__PURE__*/__webpack_require__.n(external_axios_);
1714
+
1715
+ // EXTERNAL MODULE: external "eoss-mobile-vant"
1716
+ var external_eoss_mobile_vant_ = __webpack_require__(4);
1717
+
1718
+ // EXTERNAL MODULE: ./src/utils/util.js
1719
+ var util = __webpack_require__(0);
1720
+
1721
+ // EXTERNAL MODULE: external "qs"
1722
+ var external_qs_ = __webpack_require__(7);
1723
+ var external_qs_default = /*#__PURE__*/__webpack_require__.n(external_qs_);
1724
+
1725
+ // CONCATENATED MODULE: ./src/utils/axios.js
1726
+
1727
+
1728
+
1729
+
1730
+ var apiUrl = util["a" /* default */].getStorage('host');
1731
+
1732
+ var axios_ajax = function ajax(url) {
1733
+ var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1734
+ var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1735
+ var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
1736
+ var type = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'get';
1737
+
1738
+ var http = external_axios_default.a.create({
1739
+ baseURL: apiUrl,
1740
+ timeout: 60000,
1741
+ headers: {
1742
+ // clientKey: 'csjk'
1743
+ },
1744
+ withCredentials: false
1745
+ });
1746
+ http.interceptors.request.use(function (config) {
1747
+ if (type === 'post' && format) {
1748
+ config.data = external_qs_default.a.stringify(params);
1749
+ if (!config.headers['content-type'] && !headers['Content-Type']) {
1750
+ config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
1751
+ }
1752
+ } else {
1753
+ if (!config.headers['content-type'] && !headers['Content-Type']) {
1754
+ config.headers['content-type'] = 'application/json;charset=UTF-8';
1755
+ }
1756
+ config.data = params;
1757
+ }
1758
+
1759
+ if (util["a" /* default */].getStorage('token')) {
1760
+ config.headers.Authorization = util["a" /* default */].getStorage('token');
1761
+ }
1762
+ if (util["a" /* default */].getStorage('deviceId')) {
1763
+ config.headers.deviceId = util["a" /* default */].getStorage('deviceId');
1764
+ }
1765
+
1766
+ var a = '/config/';
1767
+
1768
+ if (config.url.search(a) !== -1 && config.url.search('appInfo') === -1) {
1769
+ config.headers.clientKey = util["a" /* default */].getStorage('clientKey') || 'csjk2';
1770
+ }
1771
+ if (config.url.search('api/financePhone/') !== -1) {
1772
+ config.baseURL = 'https://release.cdgzjg.cn/';
1773
+ }
1774
+ if (config.url.search('affairs/getHandleInfosnew.json') !== -1) {
1775
+ config.headers = {
1776
+ token: sessionStorage.getItem('token'),
1777
+ oueside_token: sessionStorage.getItem('token'),
1778
+ deviceId: '432a320f99793e39',
1779
+ Authorization: sessionStorage.getItem('token')
1780
+ };
1781
+ }
1782
+ if (config.url.search('/getmyAccount.json') !== -1) {
1783
+ delete config.params.userId;
1784
+ }
1785
+ if (config.url.search('/sso2/authCenter') !== -1) {
1786
+ delete config.headers.clientKey;
1787
+ delete config.headers.deviceId;
1788
+ }
1789
+ if (config.url.search('/appInfo') !== -1) {
1790
+ config.headers.deviceId = util["a" /* default */].getStorage('deviceId');
1791
+ delete config.headers.clientKey;
1792
+ }
1793
+ if (config.url.search('getPresetCustomInfo') !== -1 || config.url.search('registerNew') !== -1) {
1794
+ config.headers.token = util["a" /* default */].getStorage('token');
1795
+ }
1796
+ if (config.url.search('mecp/overtime') !== -1 || config.url.search('mecp/leave') !== -1 || config.url.search('contractext') !== -1 || config.url.search('getSysParam') !== -1) {
1797
+ delete config.headers.deviceId;
1798
+ }
1799
+ return config;
1800
+ }, function (error) {
1801
+ return Promise.error(error);
1802
+ });
1803
+ http.interceptors.response.use(function (response) {
1804
+ if (response.status === 200) {
1805
+ if (response.data.rCode === 64 || response.data.rCode === 27) {
1806
+ util["a" /* default */].H5TokenInvalid();
1807
+ } else {
1808
+ return Promise.resolve(response.data);
1809
+ }
1810
+ } else {
1811
+ return Promise.reject(response.data);
1812
+ }
1813
+ }, function (error) {
1814
+ if (error && error.response) {
1815
+ if (error.response.status) {
1816
+ switch (error.response.status) {
1817
+ case 400:
1818
+ error.message = '错误请求';
1819
+ break;
1820
+ case 401:
1821
+ error.message = '未授权,请重新登录';
1822
+ break;
1823
+ case 403:
1824
+ error.message = '登录过期,请重新登录';
1825
+ util["a" /* default */].removeStorage('userId');
1826
+ break;
1827
+ case 404:
1828
+ error.message = '网络请求不存在';
1829
+ break;
1830
+ case 405:
1831
+ error.message = '请求方法错误';
1832
+ break;
1833
+ case 408:
1834
+ error.message = '请求超时';
1835
+ break;
1836
+ case 500:
1837
+ error.message = '服务器端出错';
1838
+ break;
1839
+ case 501:
1840
+ error.message = '网络未实现';
1841
+ break;
1842
+ case 502:
1843
+ error.message = '网络错误';
1844
+ break;
1845
+ case 503:
1846
+ error.message = '服务不可用';
1847
+ break;
1848
+ case 504:
1849
+ error.message = '网络超时';
1850
+ break;
1851
+ case 505:
1852
+ error.message = 'http版本不支持该请求';
1853
+ break;
1854
+ default:
1855
+ error.message = '\u8FDE\u63A5\u9519\u8BEF' + error.response.status;
1856
+ }
1857
+ } else {
1858
+ error.message = '接口出现问题,无法请求';
1859
+ }
1860
+ }
1861
+ Object(external_eoss_mobile_vant_["Toast"])({
1862
+ message: error.message,
1863
+ duration: 1500,
1864
+ forbidClick: true
1865
+ });
1866
+ return Promise.reject(error);
1867
+ });
1868
+ if (type === 'get' || type === 'GET') {
1869
+ return http.get(url, params, headers, format);
1870
+ } else {
1871
+ return http.post(url, params, headers, format);
1872
+ }
1873
+ };
1874
+
1875
+ // 响应拦截器
1876
+
1877
+ var base = {
1878
+ get: function get(url) {
1879
+ var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1880
+ var headers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1881
+ var format = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
1882
+
1883
+ if (params.params && url.search('registerNew') === -1) {
1884
+ params.params.userId = params.params.userId ? params.params.userId : util["a" /* default */].getStorage('userId');
1885
+ } else if (url.search('registerNew') === -1) {
1886
+ params.userId = params.userId ? params.userId : util["a" /* default */].getStorage('userId');
1887
+ }
1888
+ if (url.search('mecpSys/login') !== -1) {
1889
+ delete params.userId;
1890
+ }
1891
+ if (url.search('mecp.invest') !== -1) {
1892
+ if (params.params) {
1893
+ params.params.userId = 'u1b9f3ce4731649e0b665af015d74c19b';
1894
+ } else {
1895
+ params.userId = 'u1b9f3ce4731649e0b665af015d74c19b';
1896
+ }
1897
+ }
1898
+ return axios_ajax(url, {
1899
+ params: params
1900
+ }, headers, format);
1901
+ },
1902
+ post: function post(url, params, headers, format) {
1903
+ if (params.params) {
1904
+ params.params.userId = params.params.userId || util["a" /* default */].getStorage('userId');
1905
+ } else {
1906
+ params.userId = params.userId || util["a" /* default */].getStorage('userId');
1907
+ }
1908
+ return axios_ajax(url, params, headers, format, 'post');
1909
+ }
1910
+ };
1911
+ /* harmony default export */ var axios = (base);
1912
+ // CONCATENATED MODULE: ./src/utils/http.js
1913
+
1914
+ var http_request = function request(options) {
1915
+ var fn = void 0;
1916
+ switch (options.type) {
1917
+ case 'post':
1918
+ fn = axios.post(options.url, options.params, options.headers, options.format);
1919
+ break;
1920
+ case 'POST':
1921
+ fn = axios.post(options.url, options.params, options.headers, options.format);
1922
+ break;
1923
+ case 'get':
1924
+ fn = axios.get(options.url, options.params, options.headers = {});
1925
+ break;
1926
+ case 'GET':
1927
+ fn = axios.get(options.url, options.params, options.headers = {});
1928
+ break;
1929
+ default:
1930
+ fn = axios.get(options.url, options.params, options.headers = {});
1931
+ }
1932
+ return fn;
1933
+ };
1934
+ /* harmony default export */ var utils_http = __webpack_exports__["a"] = (http_request);
1935
+
1936
+ // // 封装请求参数
1937
+ // import qs from 'qs';
1938
+ // import http from './axios.js';
1939
+ // import $ from './util.js';
1940
+
1941
+ // function request({
1942
+ // method = 'get',
1943
+ // url,
1944
+ // data = {},
1945
+ // params = {},
1946
+ // headers = {},
1947
+ // format = true,
1948
+ // mix = true
1949
+ // }) {
1950
+ // if (
1951
+ // method.toLowerCase() === 'post' &&
1952
+ // !Object.prototype.hasOwnProperty.call(data, 'userId') &&
1953
+ // $.getStorage('userId')
1954
+ // ) {
1955
+ // data.userId = $.getStorage('userId');
1956
+ // }
1957
+ // if (
1958
+ // (method === 'get' || method === 'GET') &&
1959
+ // !Object.prototype.hasOwnProperty.call(params, 'userId') &&
1960
+ // $.getStorage('userId')
1961
+ // ) {
1962
+ // params.userId = $.getStorage('userId');
1963
+ // }
1964
+ // if (format && (method === 'post' || method === 'POST')) {
1965
+ // data = qs.stringify(data);
1966
+ // headers['content-type'] = 'application/x-www-form-urlencoded';
1967
+ // }
1968
+ // if (!mix && (method === 'get' || method === 'GET')) {
1969
+ // data = {};
1970
+ // }
1971
+ // if (!mix && (method === 'post' || method === 'POST')) {
1972
+ // params = {};
1973
+ // }
1974
+ // return http({
1975
+ // method,
1976
+ // url,
1977
+ // data,
1978
+ // params,
1979
+ // headers
1980
+ // });
1981
+ // }
1982
+
1983
+ // export default request;
1984
+
1985
+ /***/ }),
1986
+
1987
+ /***/ 4:
1988
+ /***/ (function(module, exports) {
1989
+
1990
+ module.exports = require("eoss-mobile-vant");
1991
+
1992
+ /***/ }),
1993
+
1994
+ /***/ 5:
1995
+ /***/ (function(module, exports) {
1996
+
1997
+ module.exports = require("@eoss-design/color");
1998
+
1999
+ /***/ }),
2000
+
2001
+ /***/ 50:
2002
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2003
+
2004
+ "use strict";
2005
+ // ESM COMPAT FLAG
2006
+ __webpack_require__.r(__webpack_exports__);
2007
+
2008
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/retrial-auth/src/main.vue?vue&type=template&id=46beaef7&
2009
+ var render = function () {
2010
+ var _vm = this
2011
+ var _h = _vm.$createElement
2012
+ var _c = _vm._self._c || _h
2013
+ return _vm.show
2014
+ ? _c("div", { staticClass: "em-retrial-auth" }, [
2015
+ _c(
2016
+ "div",
2017
+ { staticClass: "em-retrial-auth-box" },
2018
+ [
2019
+ _vm._v(
2020
+ "\n 验证码将发送至" +
2021
+ _vm._s(
2022
+ _vm.active == "WEB_SMS"
2023
+ ? "手机号:" + _vm.phoneText
2024
+ : "邮箱:" + _vm.emailText
2025
+ ) +
2026
+ "\n "
2027
+ ),
2028
+ _c(
2029
+ "em-input",
2030
+ {
2031
+ staticStyle: { margin: "10px 0px" },
2032
+ attrs: {
2033
+ center: "",
2034
+ clearable: "",
2035
+ "hide-label": "",
2036
+ placeholder: "请输入验证码",
2037
+ },
2038
+ model: {
2039
+ value: _vm.formData.verificationCode,
2040
+ callback: function ($$v) {
2041
+ _vm.$set(_vm.formData, "verificationCode", $$v)
2042
+ },
2043
+ expression: "formData.verificationCode",
2044
+ },
2045
+ },
2046
+ [
2047
+ _c(
2048
+ "template",
2049
+ { slot: "button" },
2050
+ [
2051
+ _c(
2052
+ "em-button",
2053
+ {
2054
+ attrs: {
2055
+ size: "small",
2056
+ type: "primary",
2057
+ disabled: _vm.disabled,
2058
+ },
2059
+ on: {
2060
+ click: function ($event) {
2061
+ $event.stopPropagation()
2062
+ return _vm.getCode($event)
2063
+ },
2064
+ },
2065
+ },
2066
+ [_vm._v(_vm._s(_vm.btnText))]
2067
+ ),
2068
+ ],
2069
+ 1
2070
+ ),
2071
+ ],
2072
+ 2
2073
+ ),
2074
+ _c(
2075
+ "em-button",
2076
+ {
2077
+ staticStyle: { width: "100%" },
2078
+ attrs: { type: "primary" },
2079
+ on: { click: _vm.handleAuth },
2080
+ },
2081
+ [_vm._v("提交验证")]
2082
+ ),
2083
+ _vm.newType.length > 1
2084
+ ? _c(
2085
+ "div",
2086
+ { staticClass: "em-retrial-auth-icon-box" },
2087
+ _vm._l(_vm.newType, function (item) {
2088
+ return _c(
2089
+ "div",
2090
+ {
2091
+ key: item,
2092
+ staticClass: "em-retrial-auth-icon-box-item",
2093
+ class: { active: _vm.active === item },
2094
+ on: {
2095
+ click: function ($event) {
2096
+ _vm.active = item
2097
+ },
2098
+ },
2099
+ },
2100
+ [
2101
+ _c("van-icon", {
2102
+ attrs: {
2103
+ name: item === "WEB_SMS" ? "phone-o" : "envelop-o",
2104
+ color: "#fff",
2105
+ },
2106
+ }),
2107
+ ],
2108
+ 1
2109
+ )
2110
+ }),
2111
+ 0
2112
+ )
2113
+ : _vm._e(),
2114
+ ],
2115
+ 1
2116
+ ),
2117
+ ])
2118
+ : _vm._e()
2119
+ }
2120
+ var staticRenderFns = []
2121
+ render._withStripped = true
2122
+
2123
+
2124
+ // CONCATENATED MODULE: ./packages/retrial-auth/src/main.vue?vue&type=template&id=46beaef7&
2125
+
2126
+ // EXTERNAL MODULE: ./src/utils/http.js + 1 modules
2127
+ var http = __webpack_require__(3);
2128
+
2129
+ // EXTERNAL MODULE: ./src/utils/util.js
2130
+ var util = __webpack_require__(0);
2131
+
2132
+ // EXTERNAL MODULE: ./src/config/api.js
2133
+ var api = __webpack_require__(2);
2134
+
2135
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/retrial-auth/src/main.vue?vue&type=script&lang=js&
2136
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2137
+
2138
+ //
2139
+ //
2140
+ //
2141
+ //
2142
+ //
2143
+ //
2144
+ //
2145
+ //
2146
+ //
2147
+ //
2148
+ //
2149
+ //
2150
+ //
2151
+ //
2152
+ //
2153
+ //
2154
+ //
2155
+ //
2156
+ //
2157
+ //
2158
+ //
2159
+ //
2160
+ //
2161
+ //
2162
+ //
2163
+ //
2164
+ //
2165
+ //
2166
+ //
2167
+ //
2168
+ //
2169
+ //
2170
+ //
2171
+ //
2172
+ //
2173
+ //
2174
+ //
2175
+ //
2176
+ //
2177
+ //
2178
+ //
2179
+ //
2180
+ //
2181
+ //
2182
+ //
2183
+
2184
+
2185
+
2186
+
2187
+
2188
+ /* harmony default export */ var mainvue_type_script_lang_js_ = ({
2189
+ name: 'EmRetrialAuth',
2190
+ props: {
2191
+ reload: {
2192
+ type: String,
2193
+ default: ''
2194
+ },
2195
+ group: {
2196
+ type: String,
2197
+ default: ''
2198
+ },
2199
+ type: {
2200
+ type: [String, Array],
2201
+ default: function _default() {
2202
+ return [];
2203
+ }
2204
+ },
2205
+ url: {
2206
+ type: String,
2207
+ default: ''
2208
+ },
2209
+ params: {
2210
+ type: Object,
2211
+ default: function _default() {}
2212
+ },
2213
+ method: {
2214
+ type: String,
2215
+ default: 'get'
2216
+ }
2217
+ },
2218
+ data: function data() {
2219
+ return {
2220
+ active: 0,
2221
+ newReload: '',
2222
+ newData: '',
2223
+ show: false,
2224
+ newGroup: '',
2225
+ newType: '',
2226
+ emailText: '',
2227
+ retrialAuthGroupId: util["a" /* default */].generateUUID(),
2228
+ formData: {
2229
+ verificationCode: ''
2230
+ },
2231
+ phoneText: '',
2232
+ btnText: '获取验证码',
2233
+ disabled: false,
2234
+ countdown: 0,
2235
+ submit: false,
2236
+ uuid: null,
2237
+ timer: null
2238
+ };
2239
+ },
2240
+ mounted: function mounted() {
2241
+ if (this.url) {
2242
+ this.reqUrl();
2243
+ } else {
2244
+ this.newGroup = this.group;
2245
+ this.newReload = this.reload;
2246
+ this.newType = this.type.filter(function (item) {
2247
+ return item != 'SCANCODE';
2248
+ });
2249
+ if (this.newType.length > 0) {
2250
+ this.active = this.newType[0];
2251
+ }
2252
+ }
2253
+ },
2254
+
2255
+ methods: {
2256
+ handleAuth: function handleAuth() {
2257
+ var _this = this;
2258
+
2259
+ if (this.submit) {
2260
+ return false;
2261
+ }
2262
+ if (!this.formData.verificationCode) return this.$toast('请输入验证码');
2263
+ this.submit = true;
2264
+ var params = {
2265
+ retrialAuthGroupIds: this.newGroup,
2266
+ targetType: this.active === 'WEB_SMS' ? 'SMS' : 'EMAIL',
2267
+ verificationCode: this.formData.verificationCode
2268
+ };
2269
+ this.$toast.loading({
2270
+ message: '加载中...',
2271
+ forbidClick: true,
2272
+ loadingType: 'spinner',
2273
+ overlay: true,
2274
+ duration: 0
2275
+ });
2276
+ Object(http["a" /* default */])({
2277
+ url: api["a" /* codeRetrialAuth */],
2278
+ type: 'post',
2279
+ params: params
2280
+ }).then(function (res) {
2281
+ var rCode = res.rCode,
2282
+ msg = res.msg;
2283
+
2284
+ _this.$toast.clear();
2285
+ if (rCode == 0) {
2286
+ _this.$toast('认证成功');
2287
+ _this.$emit('success', _this.retrialAuthGroupId);
2288
+ } else {
2289
+ _this.$toast(msg);
2290
+ _this.$emit('error');
2291
+ _this.submit = false;
2292
+ }
2293
+ }).catch();
2294
+ },
2295
+ getCode: function getCode() {
2296
+ var _this2 = this;
2297
+
2298
+ if (this.countdown) {
2299
+ return false;
2300
+ }
2301
+ var params = { targetType: this.active === 'WEB_SMS' ? 'SMS' : 'EMAIL' };
2302
+ this.countdown = 60;
2303
+ this.timer = setInterval(function () {
2304
+ if (_this2.countdown > 0) {
2305
+ _this2.countdown--;
2306
+ _this2.disabled = true;
2307
+ _this2.btnText = '重新获取' + _this2.countdown + 's';
2308
+ } else {
2309
+ _this2.btnText = '重新获取';
2310
+ _this2.disabled = false;
2311
+ _this2.submit = false;
2312
+ clearInterval(_this2.timer);
2313
+ }
2314
+ }, 1000);
2315
+ this.$toast.loading({
2316
+ message: '加载中...',
2317
+ forbidClick: true,
2318
+ loadingType: 'spinner',
2319
+ overlay: true,
2320
+ duration: 0
2321
+ });
2322
+ Object(http["a" /* default */])({
2323
+ url: api["i" /* getRetrialAuthCode */],
2324
+ type: 'post',
2325
+ params: params
2326
+ }).then(function (res) {
2327
+ var rCode = res.rCode,
2328
+ msg = res.msg;
2329
+
2330
+ _this2.$toast.clear();
2331
+ if (rCode == 0) {
2332
+ _this2.$toast('验证码已发送至' + (_this2.active === 'WEB_SMS' ? '手机' : '邮箱') + ',请注意查收!');
2333
+ } else {
2334
+ _this2.$toast(msg);
2335
+ _this2.$emit('error');
2336
+ }
2337
+ }).catch();
2338
+ },
2339
+ init: function init() {
2340
+ var _this3 = this;
2341
+
2342
+ Object(http["a" /* default */])({
2343
+ url: api["k" /* initRetrialAuth */]
2344
+ }).then(function (res) {
2345
+ var rCode = res.rCode,
2346
+ results = res.results;
2347
+
2348
+ _this3.$toast.clear();
2349
+ if (rCode == 0) {
2350
+ _this3.uuid = results.uuid;
2351
+ // this.qrImg = results.qrImg;
2352
+ _this3.emailText = results.emailText;
2353
+ _this3.phoneText = results.phoneText;
2354
+ // if (this.active === 'SCANCODE') {
2355
+ // this.handleScanCodeRetrialAuth();
2356
+ // }
2357
+ }
2358
+ }).catch();
2359
+ },
2360
+ reqUrl: function reqUrl() {
2361
+ var _this4 = this;
2362
+
2363
+ this.$toast.loading({
2364
+ message: '加载中...',
2365
+ forbidClick: true,
2366
+ loadingType: 'spinner',
2367
+ overlay: true,
2368
+ duration: 0
2369
+ });
2370
+ Object(http["a" /* default */])({
2371
+ url: this.url,
2372
+ params: _extends({}, this.params, { retrialAuthGroupId: this.retrialAuthGroupId }),
2373
+ type: this.method
2374
+ }).then(function (res) {
2375
+ var rCode = res.rCode,
2376
+ results = res.results,
2377
+ msg = res.msg;
2378
+
2379
+ if (rCode == 61) {
2380
+ if (results) {
2381
+ _this4.newReload = results.reload || results.refresh;
2382
+ _this4.newGroup = results.retrialAuthGroupIds;
2383
+ _this4.newType = results.retrialAuthType.filter(function (item) {
2384
+ return item != 'SCANCODE';
2385
+ });
2386
+ _this4.init();
2387
+ if (_this4.newType.length > 0) {
2388
+ _this4.active = _this4.newType[0];
2389
+ }
2390
+ }
2391
+ _this4.show = true;
2392
+ } else {
2393
+ _this4.$toast(msg);
2394
+ _this4.$emit('error');
2395
+ }
2396
+ });
2397
+ }
2398
+ }
2399
+ });
2400
+ // CONCATENATED MODULE: ./packages/retrial-auth/src/main.vue?vue&type=script&lang=js&
2401
+ /* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_);
2402
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
2403
+ var componentNormalizer = __webpack_require__(1);
2404
+
2405
+ // CONCATENATED MODULE: ./packages/retrial-auth/src/main.vue
2406
+
2407
+
2408
+
2409
+
2410
+
2411
+ /* normalize component */
2412
+
2413
+ var component = Object(componentNormalizer["a" /* default */])(
2414
+ src_mainvue_type_script_lang_js_,
2415
+ render,
2416
+ staticRenderFns,
2417
+ false,
2418
+ null,
2419
+ null,
2420
+ null
2421
+
2422
+ )
2423
+
2424
+ /* harmony default export */ var main = (component.exports);
2425
+ // CONCATENATED MODULE: ./packages/retrial-auth/index.js
2426
+
2427
+
2428
+ main.install = function (Vue) {
2429
+ return Vue.component(main.name, main);
2430
+ };
2431
+
2432
+ /* harmony default export */ var retrial_auth = __webpack_exports__["default"] = (main);
2433
+
2434
+ /***/ }),
2435
+
2436
+ /***/ 6:
2437
+ /***/ (function(module, exports) {
2438
+
2439
+ module.exports = require("axios");
2440
+
2441
+ /***/ }),
2442
+
2443
+ /***/ 7:
2444
+ /***/ (function(module, exports) {
2445
+
2446
+ module.exports = require("qs");
2447
+
2448
+ /***/ }),
2449
+
2450
+ /***/ 8:
2451
+ /***/ (function(module, exports) {
2452
+
2453
+ module.exports = require("sm-crypto");
2454
+
2455
+ /***/ })
2456
+
2457
+ /******/ });