eoss-ui 0.6.55 → 0.6.57

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 (62) hide show
  1. package/lib/button-group.js +266 -212
  2. package/lib/button.js +403 -347
  3. package/lib/checkbox-group.js +270 -216
  4. package/lib/data-table-form.js +269 -215
  5. package/lib/data-table.js +271 -222
  6. package/lib/date-picker.js +403 -347
  7. package/lib/dialog.js +268 -219
  8. package/lib/enable-drag.js +8 -8
  9. package/lib/eoss-ui.common.js +264 -210
  10. package/lib/flow-group.js +272 -216
  11. package/lib/flow-list.js +618 -545
  12. package/lib/flow.js +268 -219
  13. package/lib/form.js +270 -221
  14. package/lib/handle-user.js +503 -429
  15. package/lib/handler.js +272 -216
  16. package/lib/icon.js +272 -216
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +403 -347
  19. package/lib/input.js +405 -349
  20. package/lib/login.js +270 -221
  21. package/lib/main.js +280 -224
  22. package/lib/menu.js +7 -4
  23. package/lib/nav.js +274 -218
  24. package/lib/page.js +272 -216
  25. package/lib/pagination.js +272 -216
  26. package/lib/player.js +494 -416
  27. package/lib/qr-code.js +272 -216
  28. package/lib/radio-group.js +276 -220
  29. package/lib/retrial-auth.js +272 -216
  30. package/lib/select-ganged.js +405 -349
  31. package/lib/select.js +407 -351
  32. package/lib/selector-panel.js +268 -214
  33. package/lib/selector.js +272 -216
  34. package/lib/sizer.js +269 -220
  35. package/lib/steps.js +274 -218
  36. package/lib/switch.js +272 -216
  37. package/lib/table-form.js +272 -216
  38. package/lib/tabs.js +272 -216
  39. package/lib/theme-chalk/index.css +1 -1
  40. package/lib/theme-chalk/main.css +1 -1
  41. package/lib/theme-chalk/simplicity.css +1 -1
  42. package/lib/tips.js +274 -218
  43. package/lib/tree-group.js +272 -216
  44. package/lib/tree.js +274 -218
  45. package/lib/upload.js +270 -216
  46. package/lib/utils/util.js +231 -182
  47. package/lib/wujie.js +272 -216
  48. package/lib/wxlogin.js +404 -348
  49. package/package.json +2 -2
  50. package/packages/.DS_Store +0 -0
  51. package/packages/main/.DS_Store +0 -0
  52. package/packages/main/src/.DS_Store +0 -0
  53. package/packages/main/src/simplicity/sub-menu.vue +1 -0
  54. package/packages/menu/.DS_Store +0 -0
  55. package/packages/menu/src/main.vue +7 -3
  56. package/packages/theme-chalk/lib/index.css +1 -1
  57. package/packages/theme-chalk/lib/main.css +1 -1
  58. package/packages/theme-chalk/lib/simplicity.css +1 -1
  59. package/packages/theme-chalk/src/simplicity.scss +10 -2
  60. package/src/.DS_Store +0 -0
  61. package/src/index.js +1 -1
  62. package/src/utils/util.js +2 -2
package/lib/flow-list.js CHANGED
@@ -85,26 +85,31 @@ module.exports =
85
85
  /******/ return __webpack_require__(__webpack_require__.s = 47);
86
86
  /******/ })
87
87
  /************************************************************************/
88
- /******/ ({
89
-
90
- /***/ 0:
88
+ /******/ ([
89
+ /* 0 */
91
90
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
91
 
93
92
  "use strict";
94
- /* harmony import */ var _config_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
95
- /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
96
- /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_1__);
97
- /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
98
- /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_2__);
99
- /* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6);
100
- /* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(json_bigint__WEBPACK_IMPORTED_MODULE_3__);
101
- /* harmony import */ var _webSocket__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
102
- /* harmony import */ var eoss_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2);
103
- /* harmony import */ var eoss_element__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(eoss_element__WEBPACK_IMPORTED_MODULE_5__);
93
+ /* harmony import */ var babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
94
+ /* harmony import */ var babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__);
95
+ /* harmony import */ var _config_api__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
96
+ /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
97
+ /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_2__);
98
+ /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
99
+ /* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_3__);
100
+ /* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
101
+ /* harmony import */ var json_bigint__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(json_bigint__WEBPACK_IMPORTED_MODULE_4__);
102
+ /* harmony import */ var _webSocket__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8);
103
+ /* harmony import */ var eoss_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2);
104
+ /* harmony import */ var eoss_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(eoss_element__WEBPACK_IMPORTED_MODULE_6__);
105
+
106
+
104
107
  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; };
105
108
 
106
109
  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; };
107
110
 
111
+ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
112
+
108
113
  function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
109
114
 
110
115
  /**
@@ -115,8 +120,8 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in ob
115
120
  **/
116
121
 
117
122
  /* eslint-disable indent */
118
- var sm2 = __webpack_require__(11).sm2;
119
- var lodash = __webpack_require__(10);
123
+ var sm2 = __webpack_require__(12).sm2;
124
+ var lodash = __webpack_require__(11);
120
125
 
121
126
 
122
127
 
@@ -137,7 +142,7 @@ var loginMsg = void 0;
137
142
  var initAuth = void 0;
138
143
  var $_http = void 0;
139
144
 
140
- var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_3___default()({ storeAsString: true });
145
+ var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_4___default()({ storeAsString: true });
141
146
 
142
147
 
143
148
  /**
@@ -208,7 +213,7 @@ var ajax = function ajax(_ref) {
208
213
  var http = $_http;
209
214
  if (!http) {
210
215
  var baseURL = host === true ? getStorage('host') : host === false ? '' : host;
211
- http = axios__WEBPACK_IMPORTED_MODULE_1___default.a.create({
216
+ http = axios__WEBPACK_IMPORTED_MODULE_2___default.a.create({
212
217
  baseURL: baseURL,
213
218
  timeout: 99000,
214
219
  transformResponse: [function (data) {
@@ -281,7 +286,7 @@ var ajax = function ajax(_ref) {
281
286
  clearTimeout(loginMsg);
282
287
  loginMsg = setTimeout(function () {
283
288
  sessionStorage.setItem('remind', 1);
284
- eoss_element__WEBPACK_IMPORTED_MODULE_5__["MessageBox"].confirm(response.data.rCode === 69 ? '该账号在其他地方已登陆!' : '登录已过期,请重新登录!', '提示', response.data.rCode === 69 ? {
289
+ eoss_element__WEBPACK_IMPORTED_MODULE_6__["MessageBox"].confirm(response.data.rCode === 69 ? '该账号在其他地方已登陆!' : '登录已过期,请重新登录!', '提示', response.data.rCode === 69 ? {
285
290
  confirmButtonText: '确定',
286
291
  closeOnClickModal: false,
287
292
  type: 'warning'
@@ -332,7 +337,7 @@ var ajax = function ajax(_ref) {
332
337
  } else if (response.data.rCode === 61) {
333
338
  clearTimeout(initAuth);
334
339
  initAuth = setTimeout(function () {
335
- Object(eoss_element__WEBPACK_IMPORTED_MODULE_5__["MessageBox"])({
340
+ Object(eoss_element__WEBPACK_IMPORTED_MODULE_6__["MessageBox"])({
336
341
  title: '请进行二次鉴权',
337
342
  closeOnClickModal: false,
338
343
  closeOnPressEscape: false,
@@ -488,7 +493,7 @@ var ajax = function ajax(_ref) {
488
493
  }
489
494
  }
490
495
  if (method === 'post' && format) {
491
- data = qs__WEBPACK_IMPORTED_MODULE_2___default.a.stringify(data);
496
+ data = qs__WEBPACK_IMPORTED_MODULE_3___default.a.stringify(data);
492
497
  if (!header['content-type'] && !header['Content-Type']) {
493
498
  header['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
494
499
  }
@@ -1616,7 +1621,7 @@ var getLightness = function getLightness($v, $i, $isLight) {
1616
1621
  * @param {function} callback - 回调函数
1617
1622
  **/
1618
1623
  var getMainConfig = function getMainConfig(callback) {
1619
- ajax({ url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* mainConfig */ "kb"] }).then(function (res) {
1624
+ ajax({ url: _config_api__WEBPACK_IMPORTED_MODULE_1__[/* mainConfig */ "kb"] }).then(function (res) {
1620
1625
  if (res && res.rCode === 0) {
1621
1626
  callback(res.results);
1622
1627
  }
@@ -2348,137 +2353,196 @@ var isFunction = function isFunction(obj) {
2348
2353
  * @param {sting} [loginPage] - 第三方登录页面地址
2349
2354
  * @param {boolean} [redirect] - 是否重定向(用于新脚手架)
2350
2355
  **/
2351
- var isLogined = function isLogined(_ref10) {
2352
- var to = _ref10.to,
2353
- from = _ref10.from,
2354
- next = _ref10.next,
2355
- _ref10$exclude = _ref10.exclude,
2356
- exclude = _ref10$exclude === undefined ? [] : _ref10$exclude,
2357
- cookie = _ref10.cookie,
2358
- loginPage = _ref10.loginPage,
2359
- redirect = _ref10.redirect;
2360
-
2361
- if (cookie === undefined) {
2362
- cookie = getParams({ name: 'cookie' });
2363
- }
2364
- var quit = getParams('quit') || getParams('logout');
2365
- if (quit) {
2366
- ajax({ method: 'post', url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* logout */ "jb"] }).then(function (res) {
2367
- if (res.rCode === 0) {
2368
- removeStorage();
2369
- }
2370
- }).catch(function () {});
2371
- return;
2372
- }
2373
- var pathname = '';
2374
- try {
2375
- pathname = win.top.location.pathname;
2376
- } catch (error) {
2377
- pathname = win.location.pathname;
2378
- }
2379
- if (loginPage) {
2380
- sessionStorage.setItem('loginPage', loginPage);
2381
- if (!startWith(loginPage, ['http', '/'], true)) {
2382
- if (pathname !== '/') {
2383
- var path = pathname.split('/');
2384
- path.splice(pathname.length - 1);
2385
- path = path.join('/');
2386
- loginPage = path + '/' + loginPage.replace('./', '');
2387
- } else {
2388
- loginPage = pathname + loginPage.replace('./', '');
2389
- }
2390
- }
2391
- }
2392
- var token = getStorage('token') || getStorage('Authorization');
2393
- // const logined = getStorage('logined');
2394
- // eslint-disable-next-line eqeqeq
2395
- if (token || cookie == true || cookie == 1) {
2396
- next && next();
2397
- } else {
2398
- if (!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType')) {
2399
- var loadingInstance = eoss_element__WEBPACK_IMPORTED_MODULE_5__["Loading"].service({ text: '页面加载中', spinner: 'el-icon-loading', background: 'rgba(0, 0, 0, 0.65)' });
2400
- ajax({
2401
- method: 'post',
2402
- url: _config_api__WEBPACK_IMPORTED_MODULE_0__[/* authCenter */ "b"],
2403
- data: to.query
2404
- }).then(function (res) {
2405
- if (res.rCode === 0) {
2406
- var results = res.results;
2407
-
2408
- switch (results.statusCode) {
2409
- case 0:
2410
- var storage = getStorage('storage');
2411
- setStorage({
2412
- type: storage,
2413
- key: {
2414
- ssId: results.ssId,
2415
- token: results.token,
2416
- Authorization: results.token,
2417
- deviceUnique: results.deviceUnique
2356
+ var isLogined = function () {
2357
+ var _ref10 = _asyncToGenerator( /*#__PURE__*/babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(_ref11) {
2358
+ var to = _ref11.to,
2359
+ from = _ref11.from,
2360
+ next = _ref11.next,
2361
+ _ref11$exclude = _ref11.exclude,
2362
+ exclude = _ref11$exclude === undefined ? [] : _ref11$exclude,
2363
+ cookie = _ref11.cookie,
2364
+ loginPage = _ref11.loginPage,
2365
+ redirect = _ref11.redirect;
2366
+ var quit, pathname, path, token, loadingInstance;
2367
+ return babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {
2368
+ while (1) {
2369
+ switch (_context.prev = _context.next) {
2370
+ case 0:
2371
+ if (cookie === undefined) {
2372
+ cookie = getParams({ name: 'cookie' });
2373
+ }
2374
+ quit = getParams('quit') || getParams('logout');
2375
+
2376
+ if (!quit) {
2377
+ _context.next = 5;
2378
+ break;
2379
+ }
2380
+
2381
+ ajax({ method: 'post', url: _config_api__WEBPACK_IMPORTED_MODULE_1__[/* logout */ "jb"] }).then(function (res) {
2382
+ if (res.rCode === 0) {
2383
+ removeStorage();
2384
+ }
2385
+ }).catch(function () {});
2386
+ return _context.abrupt('return');
2387
+
2388
+ case 5:
2389
+ pathname = '';
2390
+
2391
+ try {
2392
+ pathname = win.top.location.pathname;
2393
+ } catch (error) {
2394
+ pathname = win.location.pathname;
2395
+ }
2396
+ if (loginPage) {
2397
+ sessionStorage.setItem('loginPage', loginPage);
2398
+ if (!startWith(loginPage, ['http', '/'], true)) {
2399
+ if (pathname !== '/') {
2400
+ path = pathname.split('/');
2401
+
2402
+ path.splice(pathname.length - 1);
2403
+ path = path.join('/');
2404
+ loginPage = path + '/' + loginPage.replace('./', '');
2405
+ } else {
2406
+ loginPage = pathname + loginPage.replace('./', '');
2418
2407
  }
2419
- });
2420
- try {
2421
- var url = delUrlParam({
2422
- url: win.top.location.href,
2423
- key: ['serverId', 'authType', 'code', 'sessionId']
2424
- });
2425
- win.top.location.href = url;
2426
- setTimeout(function () {
2427
- win.top.location.reload();
2428
- }, 200);
2429
- } catch (error) {
2430
- var _url2 = delUrlParam({
2431
- url: win.location.href,
2432
- key: ['serverId', 'authType', 'code', 'sessionId']
2433
- });
2434
- win.location.href = _url2;
2435
- setTimeout(function () {
2436
- win.location.reload();
2437
- }, 200);
2438
2408
  }
2409
+ }
2410
+ token = getStorage('token') || getStorage('Authorization');
2411
+ // const logined = getStorage('logined');
2412
+ // eslint-disable-next-line eqeqeq
2413
+
2414
+ if (!(token || cookie == true || cookie == 1)) {
2415
+ _context.next = 13;
2439
2416
  break;
2440
- case 1:
2441
- break;
2442
- case 2:
2443
- break;
2444
- case 3:
2445
- try {
2446
- var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.top.location.href));
2447
- win.top.location.href = href;
2448
- } catch (error) {
2449
- var _href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.location.href));
2450
- win.location.href = _href;
2451
- }
2417
+ }
2418
+
2419
+ next && next();
2420
+ _context.next = 20;
2421
+ break;
2422
+
2423
+ case 13:
2424
+ if (!(!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType'))) {
2425
+ _context.next = 19;
2452
2426
  break;
2453
- case 4:
2454
- eoss_element__WEBPACK_IMPORTED_MODULE_5__["MessageBox"].alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
2455
- confirmButtonText: '确定',
2456
- type: 'error',
2457
- callback: function callback() {
2458
- sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
2459
- try {
2460
- if (loginPage) {
2461
- win.top.location.replace(loginPage);
2462
- } else if (document.referrer) {
2463
- win.top.location.replace(document.referrer);
2464
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2465
- win.top.location.href = './login.html';
2466
- } else {
2467
- next('/login');
2427
+ }
2428
+
2429
+ loadingInstance = eoss_element__WEBPACK_IMPORTED_MODULE_6__["Loading"].service({ text: '页面加载中', spinner: 'el-icon-loading', background: 'rgba(0, 0, 0, 0.65)' });
2430
+ _context.next = 17;
2431
+ return ajax({
2432
+ method: 'post',
2433
+ url: _config_api__WEBPACK_IMPORTED_MODULE_1__[/* authCenter */ "b"],
2434
+ data: to.query
2435
+ }).then(function (res) {
2436
+ if (res.rCode === 0) {
2437
+ var results = res.results;
2438
+
2439
+ switch (results.statusCode) {
2440
+ case 0:
2441
+ var storage = getStorage('storage');
2442
+ setStorage({
2443
+ type: storage,
2444
+ key: {
2445
+ ssId: results.ssId,
2446
+ token: results.token,
2447
+ Authorization: results.token,
2448
+ deviceUnique: results.deviceUnique
2449
+ }
2450
+ });
2451
+ try {
2452
+ var url = delUrlParam({
2453
+ url: win.top.location.href,
2454
+ key: ['serverId', 'authType', 'code', 'sessionId']
2455
+ });
2456
+ win.top.location.href = url;
2457
+ setTimeout(function () {
2458
+ win.top.location.reload();
2459
+ }, 200);
2460
+ } catch (error) {
2461
+ var _url2 = delUrlParam({
2462
+ url: win.location.href,
2463
+ key: ['serverId', 'authType', 'code', 'sessionId']
2464
+ });
2465
+ win.location.href = _url2;
2466
+ setTimeout(function () {
2467
+ win.location.reload();
2468
+ }, 200);
2468
2469
  }
2469
- } catch (error) {
2470
- win.postMessage({ type: 1 }, '*');
2471
- }
2470
+ break;
2471
+ case 1:
2472
+ break;
2473
+ case 2:
2474
+ break;
2475
+ case 3:
2476
+ try {
2477
+ var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.top.location.href));
2478
+ win.top.location.href = href;
2479
+ } catch (error) {
2480
+ var _href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.location.href));
2481
+ win.location.href = _href;
2482
+ }
2483
+ break;
2484
+ case 4:
2485
+ eoss_element__WEBPACK_IMPORTED_MODULE_6__["MessageBox"].alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
2486
+ confirmButtonText: '确定',
2487
+ type: 'error',
2488
+ callback: function callback() {
2489
+ sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
2490
+ try {
2491
+ if (loginPage) {
2492
+ win.top.location.replace(loginPage);
2493
+ } else if (document.referrer) {
2494
+ win.top.location.replace(document.referrer);
2495
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
2496
+ win.top.location.href = './login.html';
2497
+ } else {
2498
+ next('/login');
2499
+ }
2500
+ } catch (error) {
2501
+ win.postMessage({ type: 1 }, '*');
2502
+ }
2503
+ }
2504
+ });
2505
+ break;
2506
+ default:
2472
2507
  }
2473
- });
2474
- break;
2475
- default:
2476
- }
2477
- } else {
2478
- eoss_element__WEBPACK_IMPORTED_MODULE_5__["MessageBox"].alert(res.msg, '提示', {
2479
- confirmButtonText: '确定',
2480
- type: 'error',
2481
- callback: function callback() {
2508
+ } else {
2509
+ eoss_element__WEBPACK_IMPORTED_MODULE_6__["MessageBox"].alert(res.msg, '提示', {
2510
+ confirmButtonText: '确定',
2511
+ type: 'error',
2512
+ callback: function callback() {
2513
+ try {
2514
+ if (loginPage) {
2515
+ win.top.location.replace(loginPage);
2516
+ } else if (document.referrer) {
2517
+ win.top.location.replace(document.referrer);
2518
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
2519
+ win.top.location.href = './login.html';
2520
+ } else {
2521
+ next('/login');
2522
+ }
2523
+ } catch (error) {
2524
+ win.postMessage({ type: 1 }, '*');
2525
+ }
2526
+ }
2527
+ });
2528
+ }
2529
+ loadingInstance.close();
2530
+ }).catch(function (e) {
2531
+ loadingInstance.close();
2532
+ });
2533
+
2534
+ case 17:
2535
+ _context.next = 20;
2536
+ break;
2537
+
2538
+ case 19:
2539
+ if (token || to.path === '/' || to.path === '/404' || to.path === '/error' || typeof exclude === 'boolean' && exclude || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2540
+ if (redirect && (to.path === '/main' || to.path === '/login')) {
2541
+ window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
2542
+ } else {
2543
+ next();
2544
+ }
2545
+ } else {
2482
2546
  try {
2483
2547
  if (loginPage) {
2484
2548
  win.top.location.replace(loginPage);
@@ -2493,35 +2557,19 @@ var isLogined = function isLogined(_ref10) {
2493
2557
  win.postMessage({ type: 1 }, '*');
2494
2558
  }
2495
2559
  }
2496
- });
2497
- }
2498
- loadingInstance.close();
2499
- }).catch(function (e) {
2500
- loadingInstance.close();
2501
- });
2502
- } else if (token || to.path === '/' || to.path === '/404' || to.path === '/error' || typeof exclude === 'boolean' && exclude || exclude.indexOf(to.path) > -1 || exclude.indexOf(to.name) > -1 || to.path === '/login' || token && to.path === '/main') {
2503
- if (redirect && (to.path === '/main' || to.path === '/login')) {
2504
- window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
2505
- } else {
2506
- next();
2507
- }
2508
- } else {
2509
- try {
2510
- if (loginPage) {
2511
- win.top.location.replace(loginPage);
2512
- } else if (document.referrer) {
2513
- win.top.location.replace(document.referrer);
2514
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2515
- win.top.location.href = './login.html';
2516
- } else {
2517
- next('/login');
2560
+
2561
+ case 20:
2562
+ case 'end':
2563
+ return _context.stop();
2518
2564
  }
2519
- } catch (error) {
2520
- win.postMessage({ type: 1 }, '*');
2521
2565
  }
2522
- }
2523
- }
2524
- };
2566
+ }, _callee, this);
2567
+ }));
2568
+
2569
+ return function isLogined(_x5) {
2570
+ return _ref10.apply(this, arguments);
2571
+ };
2572
+ }();
2525
2573
  var isLogged = function isLogged(res) {
2526
2574
  isLogined(res);
2527
2575
  };
@@ -2571,9 +2619,9 @@ var isObjectEqual = function isObjectEqual(obj, _obj) {
2571
2619
  * @param {string/array} [url] - 地址
2572
2620
  * @param {boolean} [single] - 是否做js沙箱隔离
2573
2621
  **/
2574
- var jointUrl = function jointUrl(_ref11) {
2575
- var url = _ref11.url,
2576
- reg = _ref11.reg;
2622
+ var jointUrl = function jointUrl(_ref12) {
2623
+ var url = _ref12.url,
2624
+ reg = _ref12.reg;
2577
2625
 
2578
2626
  if (startWith(url, ['https', 'http', 'blob:'], true) || !reg || !reg.length) {
2579
2627
  return url;
@@ -2588,13 +2636,13 @@ var jointUrl = function jointUrl(_ref11) {
2588
2636
  return startWith(url, reg) ? url : reg + url;
2589
2637
  };
2590
2638
 
2591
- var loadJs = function loadJs(_ref12) {
2592
- var url = _ref12.url,
2593
- _ref12$type = _ref12.type,
2594
- type = _ref12$type === undefined ? 'text/javascript' : _ref12$type,
2595
- id = _ref12.id,
2596
- _ref12$single = _ref12.single,
2597
- single = _ref12$single === undefined ? true : _ref12$single;
2639
+ var loadJs = function loadJs(_ref13) {
2640
+ var url = _ref13.url,
2641
+ _ref13$type = _ref13.type,
2642
+ type = _ref13$type === undefined ? 'text/javascript' : _ref13$type,
2643
+ id = _ref13.id,
2644
+ _ref13$single = _ref13.single,
2645
+ single = _ref13$single === undefined ? true : _ref13$single;
2598
2646
 
2599
2647
  return new Promise(function (resolve, reject) {
2600
2648
  var script = document.getElementById(id) || document.createElement('script');
@@ -2629,7 +2677,7 @@ var loadJs = function loadJs(_ref12) {
2629
2677
  **/
2630
2678
  var loading = function loading($loading, res) {
2631
2679
  if (!$loading) {
2632
- $loading = eoss_element__WEBPACK_IMPORTED_MODULE_5__["Loading"].service;
2680
+ $loading = eoss_element__WEBPACK_IMPORTED_MODULE_6__["Loading"].service;
2633
2681
  }
2634
2682
  if (isObject(res)) {
2635
2683
  var config = extend({}, {
@@ -2729,11 +2777,11 @@ var queryParams = function queryParams(obj) {
2729
2777
  * @param {string} [url] - 消息源的 URI
2730
2778
  * @param {function} [callback] - 回调函数
2731
2779
  **/
2732
- var receiveMessage = function receiveMessage(_ref13) {
2733
- var _ref13$data = _ref13.data,
2734
- data = _ref13$data === undefined ? {} : _ref13$data,
2735
- url = _ref13.url,
2736
- callback = _ref13.callback;
2780
+ var receiveMessage = function receiveMessage(_ref14) {
2781
+ var _ref14$data = _ref14.data,
2782
+ data = _ref14$data === undefined ? {} : _ref14$data,
2783
+ url = _ref14.url,
2784
+ callback = _ref14.callback;
2737
2785
 
2738
2786
  win.addEventListener('message', function (e) {
2739
2787
  if (url !== undefined) {
@@ -2777,9 +2825,9 @@ var removeStorage = function removeStorage(key) {
2777
2825
  * @param {string、number} [data] - 数字或字符串型数字
2778
2826
  * @param {number} [precision] - 需要的小数位数
2779
2827
  **/
2780
- var replenish = function replenish(_ref14) {
2781
- var data = _ref14.data,
2782
- precision = _ref14.precision;
2828
+ var replenish = function replenish(_ref15) {
2829
+ var data = _ref15.data,
2830
+ precision = _ref15.precision;
2783
2831
 
2784
2832
  if (data && precision && precision > 0) {
2785
2833
  var power = Math.pow(10, precision);
@@ -2925,10 +2973,10 @@ var setScale = function setScale() {
2925
2973
  * @param {object} [data] - 数据---其中type必须表示操作类型
2926
2974
  * @param {string} [url] - 指定的消息发送URI地址
2927
2975
  **/
2928
- var sendMessage = function sendMessage(_ref15) {
2929
- var _ref15$data = _ref15.data,
2930
- data = _ref15$data === undefined ? {} : _ref15$data,
2931
- url = _ref15.url;
2976
+ var sendMessage = function sendMessage(_ref16) {
2977
+ var _ref16$data = _ref16.data,
2978
+ data = _ref16$data === undefined ? {} : _ref16$data,
2979
+ url = _ref16.url;
2932
2980
 
2933
2981
  var iframes = document.getElementsByTagName('iframe');
2934
2982
  for (var i = 0; i < iframes.length; i++) {
@@ -2972,10 +3020,10 @@ var setFavicon = function setFavicon(url) {
2972
3020
  * @param {String, Array, Object} [key] - 数据的名称,array类型表示多个key保存同一个value,object类型时对象的属性名称作为key属性值作为value
2973
3021
  * @param {String} [value] - 数据的值
2974
3022
  **/
2975
- var setStorage = function setStorage(_ref16) {
2976
- var type = _ref16.type,
2977
- key = _ref16.key,
2978
- value = _ref16.value;
3023
+ var setStorage = function setStorage(_ref17) {
3024
+ var type = _ref17.type,
3025
+ key = _ref17.key,
3026
+ value = _ref17.value;
2979
3027
 
2980
3028
  if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
2981
3029
  value = JSON.stringify(value);
@@ -3022,7 +3070,7 @@ var setStorage = function setStorage(_ref16) {
3022
3070
  * @param {Function} [error] - 重连间隔时间
3023
3071
  **/
3024
3072
  function socket(option, vm) {
3025
- var socket = new _webSocket__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"]();
3073
+ var socket = new _webSocket__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"]();
3026
3074
  socket.init(option, vm);
3027
3075
  return socket;
3028
3076
  }
@@ -3269,10 +3317,10 @@ var upperCase = function upperCase(text) {
3269
3317
  * @param {Object} [url] - url地址
3270
3318
  * @param {Object} [param] - 被转换的对象
3271
3319
  **/
3272
- var urlJoinParams = function urlJoinParams(_ref17) {
3273
- var url = _ref17.url,
3274
- param = _ref17.param,
3275
- timestamp = _ref17.timestamp;
3320
+ var urlJoinParams = function urlJoinParams(_ref18) {
3321
+ var url = _ref18.url,
3322
+ param = _ref18.param,
3323
+ timestamp = _ref18.timestamp;
3276
3324
 
3277
3325
  var arry = decodeURI(url).split('?');
3278
3326
  var times = new Date().getTime();
@@ -3478,8 +3526,7 @@ var watermark = function watermark(option) {
3478
3526
  });
3479
3527
 
3480
3528
  /***/ }),
3481
-
3482
- /***/ 1:
3529
+ /* 1 */
3483
3530
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3484
3531
 
3485
3532
  "use strict";
@@ -3875,68 +3922,357 @@ var sendBatch = '/notify2/sendRecord/reSendNotifyMessageBatch';
3875
3922
  var formContents = '/lowcode/admin/online/onlineForm/getOnlineFormFromCache';
3876
3923
 
3877
3924
  /***/ }),
3925
+ /* 2 */
3926
+ /***/ (function(module, exports) {
3927
+
3928
+ module.exports = require("eoss-element");
3929
+
3930
+ /***/ }),
3931
+ /* 3 */
3932
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3933
+
3934
+ "use strict";
3935
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
3936
+ /* globals __VUE_SSR_CONTEXT__ */
3937
+
3938
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
3939
+ // This module is a runtime utility for cleaner component module output and will
3940
+ // be included in the final webpack user bundle.
3941
+
3942
+ function normalizeComponent(
3943
+ scriptExports,
3944
+ render,
3945
+ staticRenderFns,
3946
+ functionalTemplate,
3947
+ injectStyles,
3948
+ scopeId,
3949
+ moduleIdentifier /* server only */,
3950
+ shadowMode /* vue-cli only */
3951
+ ) {
3952
+ // Vue.extend constructor export interop
3953
+ var options =
3954
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
3955
+
3956
+ // render functions
3957
+ if (render) {
3958
+ options.render = render
3959
+ options.staticRenderFns = staticRenderFns
3960
+ options._compiled = true
3961
+ }
3962
+
3963
+ // functional template
3964
+ if (functionalTemplate) {
3965
+ options.functional = true
3966
+ }
3967
+
3968
+ // scopedId
3969
+ if (scopeId) {
3970
+ options._scopeId = 'data-v-' + scopeId
3971
+ }
3972
+
3973
+ var hook
3974
+ if (moduleIdentifier) {
3975
+ // server build
3976
+ hook = function (context) {
3977
+ // 2.3 injection
3978
+ context =
3979
+ context || // cached call
3980
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
3981
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
3982
+ // 2.2 with runInNewContext: true
3983
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
3984
+ context = __VUE_SSR_CONTEXT__
3985
+ }
3986
+ // inject component styles
3987
+ if (injectStyles) {
3988
+ injectStyles.call(this, context)
3989
+ }
3990
+ // register component module identifier for async chunk inferrence
3991
+ if (context && context._registeredComponents) {
3992
+ context._registeredComponents.add(moduleIdentifier)
3993
+ }
3994
+ }
3995
+ // used by ssr in case component is cached and beforeCreate
3996
+ // never gets called
3997
+ options._ssrRegister = hook
3998
+ } else if (injectStyles) {
3999
+ hook = shadowMode
4000
+ ? function () {
4001
+ injectStyles.call(
4002
+ this,
4003
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
4004
+ )
4005
+ }
4006
+ : injectStyles
4007
+ }
4008
+
4009
+ if (hook) {
4010
+ if (options.functional) {
4011
+ // for template-only hot-reload because in that case the render fn doesn't
4012
+ // go through the normalizer
4013
+ options._injectStyles = hook
4014
+ // register for functional component in vue file
4015
+ var originalRender = options.render
4016
+ options.render = function renderWithStyleInjection(h, context) {
4017
+ hook.call(context)
4018
+ return originalRender(h, context)
4019
+ }
4020
+ } else {
4021
+ // inject component registration as beforeCreate hook
4022
+ var existing = options.beforeCreate
4023
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
4024
+ }
4025
+ }
4026
+
4027
+ return {
4028
+ exports: scriptExports,
4029
+ options: options
4030
+ }
4031
+ }
4032
+
3878
4033
 
3879
- /***/ 10:
4034
+ /***/ }),
4035
+ /* 4 */
3880
4036
  /***/ (function(module, exports) {
3881
4037
 
3882
- module.exports = require("lodash");
4038
+ module.exports = require("babel-runtime/regenerator");
3883
4039
 
3884
4040
  /***/ }),
4041
+ /* 5 */
4042
+ /***/ (function(module, exports) {
4043
+
4044
+ module.exports = require("qs");
3885
4045
 
3886
- /***/ 11:
4046
+ /***/ }),
4047
+ /* 6 */
3887
4048
  /***/ (function(module, exports) {
3888
4049
 
3889
- module.exports = require("sm-crypto");
4050
+ module.exports = require("axios");
3890
4051
 
3891
4052
  /***/ }),
4053
+ /* 7 */
4054
+ /***/ (function(module, exports) {
4055
+
4056
+ module.exports = require("json-bigint");
3892
4057
 
3893
- /***/ 17:
4058
+ /***/ }),
4059
+ /* 8 */
3894
4060
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3895
4061
 
3896
4062
  "use strict";
4063
+ /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
4064
+ /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sockjs_client__WEBPACK_IMPORTED_MODULE_0__);
4065
+ /* harmony import */ var stompjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
4066
+ /* harmony import */ var stompjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(stompjs__WEBPACK_IMPORTED_MODULE_1__);
4067
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3897
4068
 
3898
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/flow/src/component/FileList.vue?vue&type=template&id=1258a45c&
3899
- var render = function () {
3900
- var _vm = this
3901
- var _h = _vm.$createElement
3902
- var _c = _vm._self._c || _h
3903
- return _c(
3904
- "div",
3905
- { staticClass: "file" },
3906
- [
3907
- _c(
3908
- "es-upload",
3909
- _vm._b(
3910
- {
3911
- ref: "upload",
3912
- attrs: {
3913
- param: _vm.param,
3914
- "before-remove": _vm.delFile,
3915
- "auto-upload": true,
3916
- ownId: _vm.ownId,
3917
- code: _vm.code,
3918
- disabled: _vm.disabled,
3919
- deleted: _vm.deleted,
3920
- "on-success": _vm.successFile,
3921
- },
3922
- },
3923
- "es-upload",
3924
- _vm.attrs,
3925
- false
3926
- )
3927
- ),
3928
- ],
3929
- 1
3930
- )
3931
- }
3932
- var staticRenderFns = []
3933
- render._withStripped = true
3934
4069
 
3935
4070
 
3936
- // CONCATENATED MODULE: ./packages/flow/src/component/FileList.vue?vue&type=template&id=1258a45c&
3937
4071
 
3938
- // EXTERNAL MODULE: ./src/config/api.js
3939
- var api = __webpack_require__(1);
4072
+ var WebSocket = function () {
4073
+ // 构造函数
4074
+ function WebSocket() {
4075
+ _classCallCheck(this, WebSocket);
4076
+
4077
+ this.host = sessionStorage.getItem('wshost') || '';
4078
+ this.tryTimes = 1; // 重连次数
4079
+ this.callback = null; // 回调函数
4080
+ this.client = null; // stomp对象
4081
+ this.reconTimeout = null; // 重连延时器
4082
+ this.debug = true; // 调试
4083
+ this.interval = 20; // 重连间隔时间
4084
+ this.vm = null;
4085
+ this.nextDate = 0;
4086
+ this.connects = 1;
4087
+ this.recon = false;
4088
+ this.sendTimeout = null;
4089
+ this.socket = null;
4090
+ this.subscription = null;
4091
+ }
4092
+
4093
+ /** socket连接 */
4094
+
4095
+
4096
+ WebSocket.prototype.connect = function connect() {
4097
+ var _this = this;
4098
+
4099
+ if (!this.client) {
4100
+ // 连接SockJS
4101
+ this.socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url, { timeout: 60000 });
4102
+ this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(this.socket);
4103
+ }
4104
+
4105
+ // 日志不打印
4106
+ if (!this.debug) {
4107
+ this.client.debug = function () {};
4108
+ }
4109
+
4110
+ // 向服务器发起websocket连接
4111
+ this.client.connect({}, function () {
4112
+ _this.recon = true;
4113
+ // tryTimes定义重置
4114
+ _this.connects = 1;
4115
+ // 订阅消息
4116
+ _this.subscribe();
4117
+ }, function (error) {
4118
+ _this.unsubscribe();
4119
+ _this.client = null;
4120
+ var diffSecond = parseInt((new Date() - _this.nextDate) / 1000, 10);
4121
+ if (_this.connects > 5 && diffSecond < _this.interval) {
4122
+ _this.error && _this.error(error);
4123
+ } else {
4124
+ _this.reconTimeout = setTimeout(function () {
4125
+ _this.connect();
4126
+ _this.connects++;
4127
+ }, 5000);
4128
+ }
4129
+ });
4130
+ }; // 清除订阅
4131
+
4132
+
4133
+ WebSocket.prototype.unsubscribe = function unsubscribe() {
4134
+ if (this.subscription) {
4135
+ this.subscription.unsubscribe();
4136
+ this.subscription = null;
4137
+ }
4138
+ };
4139
+ /** 订阅服务端 */
4140
+
4141
+
4142
+ WebSocket.prototype.subscribe = function subscribe() {
4143
+ var _this2 = this;
4144
+
4145
+ // 订阅服务端提供的某个topic
4146
+ this.subscription = this.client.subscribe(this.take, function (response) {
4147
+ if (response && (_this2.callback || _this2.success)) {
4148
+ var callback = _this2.callback || _this2.success;
4149
+ callback(JSON.parse(response.body));
4150
+ }
4151
+ });
4152
+ };
4153
+
4154
+ /** 赋值、初始化socket */
4155
+
4156
+
4157
+ WebSocket.prototype.init = function init(option, vm) {
4158
+ for (var i in option) {
4159
+ this[i] = option[i];
4160
+ }
4161
+ this.vm = vm;
4162
+ // 初始化连接
4163
+ this.connect();
4164
+ };
4165
+
4166
+ /** 发送消息 */
4167
+
4168
+
4169
+ WebSocket.prototype.send = function send(data) {
4170
+ var _this3 = this;
4171
+
4172
+ if (this.recon) {
4173
+ clearTimeout(this.sendTimeout);
4174
+ this.client.send(this.take, {}, typeof data === 'string' ? data : JSON.stringify(data));
4175
+ } else {
4176
+ this.sendTimeout = setTimeout(function () {
4177
+ _this3.send(data);
4178
+ }, 1000);
4179
+ }
4180
+ };
4181
+
4182
+ /** 销毁 */
4183
+
4184
+
4185
+ WebSocket.prototype.destroy = function destroy() {
4186
+ // 断开连接,清除定时器
4187
+ this.unsubscribe();
4188
+ if (this.client) {
4189
+ this.client.disconnect();
4190
+ };
4191
+ this.reconTimeout && clearTimeout(this.reconTimeout);
4192
+ this.sendTimeout && clearTimeout(this.sendTimeout);
4193
+ };
4194
+
4195
+ return WebSocket;
4196
+ }();
4197
+
4198
+ /* harmony default export */ __webpack_exports__["a"] = (WebSocket);
4199
+
4200
+ /***/ }),
4201
+ /* 9 */
4202
+ /***/ (function(module, exports) {
4203
+
4204
+ module.exports = require("sockjs-client");
4205
+
4206
+ /***/ }),
4207
+ /* 10 */
4208
+ /***/ (function(module, exports) {
4209
+
4210
+ module.exports = require("stompjs");
4211
+
4212
+ /***/ }),
4213
+ /* 11 */
4214
+ /***/ (function(module, exports) {
4215
+
4216
+ module.exports = require("lodash");
4217
+
4218
+ /***/ }),
4219
+ /* 12 */
4220
+ /***/ (function(module, exports) {
4221
+
4222
+ module.exports = require("sm-crypto");
4223
+
4224
+ /***/ }),
4225
+ /* 13 */,
4226
+ /* 14 */,
4227
+ /* 15 */,
4228
+ /* 16 */,
4229
+ /* 17 */
4230
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
4231
+
4232
+ "use strict";
4233
+
4234
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/flow/src/component/FileList.vue?vue&type=template&id=1258a45c&
4235
+ var render = function () {
4236
+ var _vm = this
4237
+ var _h = _vm.$createElement
4238
+ var _c = _vm._self._c || _h
4239
+ return _c(
4240
+ "div",
4241
+ { staticClass: "file" },
4242
+ [
4243
+ _c(
4244
+ "es-upload",
4245
+ _vm._b(
4246
+ {
4247
+ ref: "upload",
4248
+ attrs: {
4249
+ param: _vm.param,
4250
+ "before-remove": _vm.delFile,
4251
+ "auto-upload": true,
4252
+ ownId: _vm.ownId,
4253
+ code: _vm.code,
4254
+ disabled: _vm.disabled,
4255
+ deleted: _vm.deleted,
4256
+ "on-success": _vm.successFile,
4257
+ },
4258
+ },
4259
+ "es-upload",
4260
+ _vm.attrs,
4261
+ false
4262
+ )
4263
+ ),
4264
+ ],
4265
+ 1
4266
+ )
4267
+ }
4268
+ var staticRenderFns = []
4269
+ render._withStripped = true
4270
+
4271
+
4272
+ // CONCATENATED MODULE: ./packages/flow/src/component/FileList.vue?vue&type=template&id=1258a45c&
4273
+
4274
+ // EXTERNAL MODULE: ./src/config/api.js
4275
+ var api = __webpack_require__(1);
3940
4276
 
3941
4277
  // EXTERNAL MODULE: ./src/utils/util.js
3942
4278
  var util = __webpack_require__(0);
@@ -4066,127 +4402,36 @@ var component = Object(componentNormalizer["a" /* default */])(
4066
4402
  /* harmony default export */ var FileList = __webpack_exports__["a"] = (component.exports);
4067
4403
 
4068
4404
  /***/ }),
4069
-
4070
- /***/ 2:
4071
- /***/ (function(module, exports) {
4072
-
4073
- module.exports = require("eoss-element");
4074
-
4075
- /***/ }),
4076
-
4077
- /***/ 3:
4078
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
4079
-
4080
- "use strict";
4081
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
4082
- /* globals __VUE_SSR_CONTEXT__ */
4083
-
4084
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
4085
- // This module is a runtime utility for cleaner component module output and will
4086
- // be included in the final webpack user bundle.
4087
-
4088
- function normalizeComponent(
4089
- scriptExports,
4090
- render,
4091
- staticRenderFns,
4092
- functionalTemplate,
4093
- injectStyles,
4094
- scopeId,
4095
- moduleIdentifier /* server only */,
4096
- shadowMode /* vue-cli only */
4097
- ) {
4098
- // Vue.extend constructor export interop
4099
- var options =
4100
- typeof scriptExports === 'function' ? scriptExports.options : scriptExports
4101
-
4102
- // render functions
4103
- if (render) {
4104
- options.render = render
4105
- options.staticRenderFns = staticRenderFns
4106
- options._compiled = true
4107
- }
4108
-
4109
- // functional template
4110
- if (functionalTemplate) {
4111
- options.functional = true
4112
- }
4113
-
4114
- // scopedId
4115
- if (scopeId) {
4116
- options._scopeId = 'data-v-' + scopeId
4117
- }
4118
-
4119
- var hook
4120
- if (moduleIdentifier) {
4121
- // server build
4122
- hook = function (context) {
4123
- // 2.3 injection
4124
- context =
4125
- context || // cached call
4126
- (this.$vnode && this.$vnode.ssrContext) || // stateful
4127
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
4128
- // 2.2 with runInNewContext: true
4129
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
4130
- context = __VUE_SSR_CONTEXT__
4131
- }
4132
- // inject component styles
4133
- if (injectStyles) {
4134
- injectStyles.call(this, context)
4135
- }
4136
- // register component module identifier for async chunk inferrence
4137
- if (context && context._registeredComponents) {
4138
- context._registeredComponents.add(moduleIdentifier)
4139
- }
4140
- }
4141
- // used by ssr in case component is cached and beforeCreate
4142
- // never gets called
4143
- options._ssrRegister = hook
4144
- } else if (injectStyles) {
4145
- hook = shadowMode
4146
- ? function () {
4147
- injectStyles.call(
4148
- this,
4149
- (options.functional ? this.parent : this).$root.$options.shadowRoot
4150
- )
4151
- }
4152
- : injectStyles
4153
- }
4154
-
4155
- if (hook) {
4156
- if (options.functional) {
4157
- // for template-only hot-reload because in that case the render fn doesn't
4158
- // go through the normalizer
4159
- options._injectStyles = hook
4160
- // register for functional component in vue file
4161
- var originalRender = options.render
4162
- options.render = function renderWithStyleInjection(h, context) {
4163
- hook.call(context)
4164
- return originalRender(h, context)
4165
- }
4166
- } else {
4167
- // inject component registration as beforeCreate hook
4168
- var existing = options.beforeCreate
4169
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
4170
- }
4171
- }
4172
-
4173
- return {
4174
- exports: scriptExports,
4175
- options: options
4176
- }
4177
- }
4178
-
4179
-
4180
- /***/ }),
4181
-
4182
- /***/ 4:
4183
- /***/ (function(module, exports) {
4184
-
4185
- module.exports = require("qs");
4186
-
4187
- /***/ }),
4188
-
4189
- /***/ 47:
4405
+ /* 18 */,
4406
+ /* 19 */,
4407
+ /* 20 */,
4408
+ /* 21 */,
4409
+ /* 22 */,
4410
+ /* 23 */,
4411
+ /* 24 */,
4412
+ /* 25 */,
4413
+ /* 26 */,
4414
+ /* 27 */,
4415
+ /* 28 */,
4416
+ /* 29 */,
4417
+ /* 30 */,
4418
+ /* 31 */,
4419
+ /* 32 */,
4420
+ /* 33 */,
4421
+ /* 34 */,
4422
+ /* 35 */,
4423
+ /* 36 */,
4424
+ /* 37 */,
4425
+ /* 38 */,
4426
+ /* 39 */,
4427
+ /* 40 */,
4428
+ /* 41 */,
4429
+ /* 42 */,
4430
+ /* 43 */,
4431
+ /* 44 */,
4432
+ /* 45 */,
4433
+ /* 46 */,
4434
+ /* 47 */
4190
4435
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
4191
4436
 
4192
4437
  "use strict";
@@ -5700,177 +5945,5 @@ main.install = function (Vue) {
5700
5945
 
5701
5946
  /* harmony default export */ var flow_list = __webpack_exports__["default"] = (main);
5702
5947
 
5703
- /***/ }),
5704
-
5705
- /***/ 5:
5706
- /***/ (function(module, exports) {
5707
-
5708
- module.exports = require("axios");
5709
-
5710
- /***/ }),
5711
-
5712
- /***/ 6:
5713
- /***/ (function(module, exports) {
5714
-
5715
- module.exports = require("json-bigint");
5716
-
5717
- /***/ }),
5718
-
5719
- /***/ 7:
5720
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
5721
-
5722
- "use strict";
5723
- /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
5724
- /* harmony import */ var sockjs_client__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sockjs_client__WEBPACK_IMPORTED_MODULE_0__);
5725
- /* harmony import */ var stompjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
5726
- /* harmony import */ var stompjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(stompjs__WEBPACK_IMPORTED_MODULE_1__);
5727
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5728
-
5729
-
5730
-
5731
-
5732
- var WebSocket = function () {
5733
- // 构造函数
5734
- function WebSocket() {
5735
- _classCallCheck(this, WebSocket);
5736
-
5737
- this.host = sessionStorage.getItem('wshost') || '';
5738
- this.tryTimes = 1; // 重连次数
5739
- this.callback = null; // 回调函数
5740
- this.client = null; // stomp对象
5741
- this.reconTimeout = null; // 重连延时器
5742
- this.debug = true; // 调试
5743
- this.interval = 20; // 重连间隔时间
5744
- this.vm = null;
5745
- this.nextDate = 0;
5746
- this.connects = 1;
5747
- this.recon = false;
5748
- this.sendTimeout = null;
5749
- this.socket = null;
5750
- this.subscription = null;
5751
- }
5752
-
5753
- /** socket连接 */
5754
-
5755
-
5756
- WebSocket.prototype.connect = function connect() {
5757
- var _this = this;
5758
-
5759
- if (!this.client) {
5760
- // 连接SockJS
5761
- this.socket = new sockjs_client__WEBPACK_IMPORTED_MODULE_0___default.a(this.host + this.url, { timeout: 60000 });
5762
- this.client = stompjs__WEBPACK_IMPORTED_MODULE_1___default.a.over(this.socket);
5763
- }
5764
-
5765
- // 日志不打印
5766
- if (!this.debug) {
5767
- this.client.debug = function () {};
5768
- }
5769
-
5770
- // 向服务器发起websocket连接
5771
- this.client.connect({}, function () {
5772
- _this.recon = true;
5773
- // tryTimes定义重置
5774
- _this.connects = 1;
5775
- // 订阅消息
5776
- _this.subscribe();
5777
- }, function (error) {
5778
- _this.unsubscribe();
5779
- _this.client = null;
5780
- var diffSecond = parseInt((new Date() - _this.nextDate) / 1000, 10);
5781
- if (_this.connects > 5 && diffSecond < _this.interval) {
5782
- _this.error && _this.error(error);
5783
- } else {
5784
- _this.reconTimeout = setTimeout(function () {
5785
- _this.connect();
5786
- _this.connects++;
5787
- }, 5000);
5788
- }
5789
- });
5790
- }; // 清除订阅
5791
-
5792
-
5793
- WebSocket.prototype.unsubscribe = function unsubscribe() {
5794
- if (this.subscription) {
5795
- this.subscription.unsubscribe();
5796
- this.subscription = null;
5797
- }
5798
- };
5799
- /** 订阅服务端 */
5800
-
5801
-
5802
- WebSocket.prototype.subscribe = function subscribe() {
5803
- var _this2 = this;
5804
-
5805
- // 订阅服务端提供的某个topic
5806
- this.subscription = this.client.subscribe(this.take, function (response) {
5807
- if (response && (_this2.callback || _this2.success)) {
5808
- var callback = _this2.callback || _this2.success;
5809
- callback(JSON.parse(response.body));
5810
- }
5811
- });
5812
- };
5813
-
5814
- /** 赋值、初始化socket */
5815
-
5816
-
5817
- WebSocket.prototype.init = function init(option, vm) {
5818
- for (var i in option) {
5819
- this[i] = option[i];
5820
- }
5821
- this.vm = vm;
5822
- // 初始化连接
5823
- this.connect();
5824
- };
5825
-
5826
- /** 发送消息 */
5827
-
5828
-
5829
- WebSocket.prototype.send = function send(data) {
5830
- var _this3 = this;
5831
-
5832
- if (this.recon) {
5833
- clearTimeout(this.sendTimeout);
5834
- this.client.send(this.take, {}, typeof data === 'string' ? data : JSON.stringify(data));
5835
- } else {
5836
- this.sendTimeout = setTimeout(function () {
5837
- _this3.send(data);
5838
- }, 1000);
5839
- }
5840
- };
5841
-
5842
- /** 销毁 */
5843
-
5844
-
5845
- WebSocket.prototype.destroy = function destroy() {
5846
- // 断开连接,清除定时器
5847
- this.unsubscribe();
5848
- if (this.client) {
5849
- this.client.disconnect();
5850
- };
5851
- this.reconTimeout && clearTimeout(this.reconTimeout);
5852
- this.sendTimeout && clearTimeout(this.sendTimeout);
5853
- };
5854
-
5855
- return WebSocket;
5856
- }();
5857
-
5858
- /* harmony default export */ __webpack_exports__["a"] = (WebSocket);
5859
-
5860
- /***/ }),
5861
-
5862
- /***/ 8:
5863
- /***/ (function(module, exports) {
5864
-
5865
- module.exports = require("sockjs-client");
5866
-
5867
- /***/ }),
5868
-
5869
- /***/ 9:
5870
- /***/ (function(module, exports) {
5871
-
5872
- module.exports = require("stompjs");
5873
-
5874
5948
  /***/ })
5875
-
5876
- /******/ });
5949
+ /******/ ]);