eoss-ui 0.8.4 → 0.8.6

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 (144) hide show
  1. package/lib/button-group.js +64 -57
  2. package/lib/button.js +64 -57
  3. package/lib/calogin.js +107 -69
  4. package/lib/checkbox-group.js +64 -57
  5. package/lib/data-table-form.js +64 -57
  6. package/lib/data-table.js +64 -57
  7. package/lib/date-picker.js +64 -57
  8. package/lib/dialog.js +64 -57
  9. package/lib/eoss-ui.common.js +631 -582
  10. package/lib/flow-group.js +64 -57
  11. package/lib/flow-list.js +160 -153
  12. package/lib/flow.js +465 -444
  13. package/lib/form.js +64 -57
  14. package/lib/handle-user.js +64 -57
  15. package/lib/handler.js +64 -57
  16. package/lib/icon.js +64 -57
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +64 -57
  19. package/lib/input.js +64 -57
  20. package/lib/login.js +64 -57
  21. package/lib/main.js +86 -78
  22. package/lib/nav.js +64 -57
  23. package/lib/page.js +64 -57
  24. package/lib/pagination.js +64 -57
  25. package/lib/player.js +64 -57
  26. package/lib/qr-code.js +64 -57
  27. package/lib/radio-group.js +64 -57
  28. package/lib/retrial-auth.js +64 -57
  29. package/lib/select-ganged.js +64 -57
  30. package/lib/select.js +64 -57
  31. package/lib/selector-panel.js +64 -57
  32. package/lib/selector.js +64 -57
  33. package/lib/sizer.js +64 -57
  34. package/lib/steps.js +64 -57
  35. package/lib/switch.js +64 -57
  36. package/lib/table-form.js +64 -57
  37. package/lib/tabs.js +64 -57
  38. package/lib/theme-chalk/index.css +1 -1
  39. package/lib/theme-chalk/login.css +1 -1
  40. package/lib/tips.js +64 -57
  41. package/lib/tree-group.js +64 -57
  42. package/lib/tree.js +64 -57
  43. package/lib/upload.js +64 -57
  44. package/lib/utils/util.js +64 -57
  45. package/lib/wujie.js +64 -57
  46. package/lib/wxlogin.js +64 -57
  47. package/package.json +1 -1
  48. package/packages/.DS_Store +0 -0
  49. package/packages/button-group/src/main.vue +346 -346
  50. package/packages/calogin/.DS_Store +0 -0
  51. package/packages/calogin/src/main.vue +412 -412
  52. package/packages/calogin/src/plugin.js +3 -3
  53. package/packages/clients/src/main.vue +151 -151
  54. package/packages/date-picker/.DS_Store +0 -0
  55. package/packages/date-picker/src/.DS_Store +0 -0
  56. package/packages/dialog/.DS_Store +0 -0
  57. package/packages/flow/.DS_Store +0 -0
  58. package/packages/flow/src/.DS_Store +0 -0
  59. package/packages/flow/src/component/Circulate.vue +417 -417
  60. package/packages/flow/src/component/CommonOpinions.vue +376 -376
  61. package/packages/flow/src/component/CustomPreset.vue +324 -324
  62. package/packages/flow/src/component/FileList.vue +97 -97
  63. package/packages/flow/src/component/Preset.vue +257 -257
  64. package/packages/flow/src/component/SendMsg.vue +242 -242
  65. package/packages/flow/src/component/SortFlow.vue +110 -110
  66. package/packages/flow/src/component/taskUnionExamine.vue +761 -761
  67. package/packages/flow/src/form.vue +123 -123
  68. package/packages/flow/src/freeStartFlow.vue +2855 -2855
  69. package/packages/flow/src/processForm.vue +1711 -1680
  70. package/packages/flow/src/processReject.vue +309 -309
  71. package/packages/flow/src/reset.vue +946 -946
  72. package/packages/flow/src/startTaskRead.vue +695 -695
  73. package/packages/flow/src/supervise.vue +159 -159
  74. package/packages/flow/src/table.vue +58 -58
  75. package/packages/flow-list/.DS_Store +0 -0
  76. package/packages/flow-list/src/main.vue +2337 -2337
  77. package/packages/form/.DS_Store +0 -0
  78. package/packages/form/src/main.vue +3901 -3901
  79. package/packages/form/src/table.vue +1512 -1512
  80. package/packages/icon/.DS_Store +0 -0
  81. package/packages/icon/src/main.vue +104 -104
  82. package/packages/login/.DS_Store +0 -0
  83. package/packages/login/src/resetPassword.vue +557 -557
  84. package/packages/main/.DS_Store +0 -0
  85. package/packages/main/src/.DS_Store +0 -0
  86. package/packages/main/src/main.vue +1 -1
  87. package/packages/main/src/public/online.vue +89 -89
  88. package/packages/main/src/public/search.vue +464 -464
  89. package/packages/main/src/public/settings.vue +273 -273
  90. package/packages/main/src/simplicity/apps.vue +388 -388
  91. package/packages/main/src/simplicity/avatar.vue +82 -82
  92. package/packages/main/src/simplicity/handler.vue +158 -158
  93. package/packages/main/src/simplicity/menu-list.vue +135 -135
  94. package/packages/main/src/simplicity/message.vue +293 -293
  95. package/packages/main/src/simplicity/notice.vue +222 -222
  96. package/packages/main/src/simplicity/sub-menu.vue +276 -276
  97. package/packages/main/src/simplicity/user.vue +259 -259
  98. package/packages/main/src/simplicityTop/apps.vue +388 -388
  99. package/packages/main/src/simplicityTop/avatar.vue +82 -82
  100. package/packages/main/src/simplicityTop/handler.vue +215 -215
  101. package/packages/main/src/simplicityTop/index.vue +6 -5
  102. package/packages/main/src/simplicityTop/lists.vue +84 -84
  103. package/packages/main/src/simplicityTop/menu-list.vue +135 -135
  104. package/packages/main/src/simplicityTop/message.vue +293 -293
  105. package/packages/main/src/simplicityTop/notice.vue +222 -222
  106. package/packages/main/src/simplicityTop/router-page.vue +45 -45
  107. package/packages/main/src/simplicityTop/sub-menu.vue +274 -274
  108. package/packages/main/src/simplicityTop/user.vue +259 -259
  109. package/packages/menu/.DS_Store +0 -0
  110. package/packages/menu/src/main.vue +595 -595
  111. package/packages/nav/src/main.vue +351 -351
  112. package/packages/select/.DS_Store +0 -0
  113. package/packages/selector/.DS_Store +0 -0
  114. package/packages/selector/src/main.vue +761 -761
  115. package/packages/selector-panel/.DS_Store +0 -0
  116. package/packages/selector-panel/src/main.vue +1036 -1036
  117. package/packages/selector-panel/src/selection.vue +174 -174
  118. package/packages/switch/src/main.vue +170 -170
  119. package/packages/theme-chalk/lib/index.css +1 -1
  120. package/packages/theme-chalk/lib/login.css +1 -1
  121. package/packages/theme-chalk/src/.DS_Store +0 -0
  122. package/packages/theme-chalk/src/data-table.scss +297 -297
  123. package/packages/theme-chalk/src/flow-list.scss +55 -55
  124. package/packages/theme-chalk/src/flow.scss +373 -373
  125. package/packages/theme-chalk/src/form.scss +501 -501
  126. package/packages/theme-chalk/src/handler.scss +148 -148
  127. package/packages/theme-chalk/src/icon.scss +3452 -3452
  128. package/packages/theme-chalk/src/login.scss +1006 -1006
  129. package/packages/theme-chalk/src/main.scss +664 -664
  130. package/packages/theme-chalk/src/menu.scss +224 -224
  131. package/packages/theme-chalk/src/selector.scss +114 -114
  132. package/packages/theme-chalk/src/simplicity-top.scss +1845 -1845
  133. package/packages/theme-chalk/src/simplicity.scss +1403 -1403
  134. package/packages/theme-chalk/src/tree.scss +165 -165
  135. package/packages/theme-chalk/src/upload.scss +172 -172
  136. package/packages/tips/src/main.vue +141 -141
  137. package/packages/upload/.DS_Store +0 -0
  138. package/packages/wujie/src/main.vue +146 -146
  139. package/src/.DS_Store +0 -0
  140. package/src/config/api.js +348 -348
  141. package/src/index.js +163 -163
  142. package/src/utils/.DS_Store +0 -0
  143. package/src/utils/rules.js +18 -18
  144. package/src/utils/util.js +54 -48
package/lib/table-form.js CHANGED
@@ -826,6 +826,7 @@ var busEmit = function busEmit(that, _ref3) {
826
826
  args = _ref3.args,
827
827
  opener = _ref3.opener;
828
828
 
829
+ var winTop = getWinTop();
829
830
  if (opener) {
830
831
  var source = opener.source,
831
832
  origin = opener.origin;
@@ -834,19 +835,19 @@ var busEmit = function busEmit(that, _ref3) {
834
835
  return;
835
836
  }
836
837
  if (isIE) {
837
- if (win.top !== win.self) {
838
- win.top.postMessage({ method: method, query: args, args: args }, '*');
838
+ if (winTop !== win.self) {
839
+ winTop.postMessage({ method: method, query: args, args: args }, '*');
839
840
  return;
840
841
  }
841
842
  var bus = that ? that.bus || that.$root.Bus || that.$root.$bus : null;
842
843
  bus && (Array.isArray(args) ? bus.$emit.apply(bus, [method].concat(args)) : bus.$emit(method, args));
843
844
  } else {
844
- if (win.top !== win.self) {
845
+ if (winTop !== win.self) {
845
846
  var _bus2 = win.$wujie ? win.$wujie.bus : null;
846
847
  if (_bus2) {
847
848
  Array.isArray(args) ? _bus2.$emit.apply(_bus2, [method].concat(args)) : _bus2.$emit(method, args);
848
849
  } else {
849
- win.top.postMessage({ method: method, query: args, args: args }, '*');
850
+ winTop.postMessage({ method: method, query: args, args: args }, '*');
850
851
  }
851
852
  return;
852
853
  }
@@ -1082,9 +1083,10 @@ var delUrlParam = function delUrlParam(_ref4) {
1082
1083
  var url = _ref4.url,
1083
1084
  key = _ref4.key;
1084
1085
 
1086
+ var winTop = getWinTop();
1085
1087
  var pUrl = '';
1086
1088
  try {
1087
- pUrl = win.top.location.href;
1089
+ pUrl = winTop.location.href;
1088
1090
  } catch (error) {
1089
1091
  pUrl = win.location.href;
1090
1092
  }
@@ -2512,18 +2514,20 @@ var isLogined = function () {
2512
2514
  cookie = _ref11.cookie,
2513
2515
  loginPage = _ref11.loginPage,
2514
2516
  redirect = _ref11.redirect;
2515
- var quit, pathname, path, token, loadingInstance, referrerUrl;
2517
+ var winTop, quit, pathname, path, token, loadingInstance, referrerUrl;
2516
2518
  return regenerator_default.a.wrap(function _callee$(_context) {
2517
2519
  while (1) {
2518
2520
  switch (_context.prev = _context.next) {
2519
2521
  case 0:
2522
+ winTop = getWinTop();
2523
+
2520
2524
  if (cookie === undefined) {
2521
2525
  cookie = getParams({ name: 'cookie' });
2522
2526
  }
2523
2527
  quit = getParams('quit') || getParams('logout');
2524
2528
 
2525
2529
  if (!quit) {
2526
- _context.next = 5;
2530
+ _context.next = 6;
2527
2531
  break;
2528
2532
  }
2529
2533
 
@@ -2534,11 +2538,11 @@ var isLogined = function () {
2534
2538
  }).catch(function () {});
2535
2539
  return _context.abrupt('return');
2536
2540
 
2537
- case 5:
2541
+ case 6:
2538
2542
  pathname = '';
2539
2543
 
2540
2544
  try {
2541
- pathname = win.top.location.pathname;
2545
+ pathname = winTop.location.pathname;
2542
2546
  } catch (error) {
2543
2547
  pathname = win.location.pathname;
2544
2548
  }
@@ -2564,17 +2568,17 @@ var isLogined = function () {
2564
2568
  // eslint-disable-next-line eqeqeq
2565
2569
 
2566
2570
  if (!(token || cookie == true || cookie == 1)) {
2567
- _context.next = 13;
2571
+ _context.next = 14;
2568
2572
  break;
2569
2573
  }
2570
2574
 
2571
2575
  next && next();
2572
- _context.next = 20;
2576
+ _context.next = 21;
2573
2577
  break;
2574
2578
 
2575
- case 13:
2579
+ case 14:
2576
2580
  if (!(!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType'))) {
2577
- _context.next = 19;
2581
+ _context.next = 20;
2578
2582
  break;
2579
2583
  }
2580
2584
 
@@ -2583,7 +2587,7 @@ var isLogined = function () {
2583
2587
  spinner: 'el-icon-loading',
2584
2588
  background: 'rgba(0, 0, 0, 0.65)'
2585
2589
  });
2586
- _context.next = 17;
2590
+ _context.next = 18;
2587
2591
  return util_ajax({
2588
2592
  method: 'post',
2589
2593
  url: api["b" /* authCenter */],
@@ -2604,12 +2608,12 @@ var isLogined = function () {
2604
2608
  });
2605
2609
  try {
2606
2610
  var url = delUrlParam({
2607
- url: win.top.location.href,
2611
+ url: winTop.location.href,
2608
2612
  key: ['serverId', 'authType', 'code', 'sessionId']
2609
2613
  });
2610
- win.top.location.href = url;
2614
+ winTop.location.href = url;
2611
2615
  setTimeout(function () {
2612
- win.top.location.reload();
2616
+ winTop.location.reload();
2613
2617
  }, 200);
2614
2618
  } catch (error) {
2615
2619
  var _url2 = delUrlParam({
@@ -2628,8 +2632,8 @@ var isLogined = function () {
2628
2632
  break;
2629
2633
  case 3:
2630
2634
  try {
2631
- var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.top.location.href));
2632
- win.top.location.href = href;
2635
+ var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(winTop.location.href));
2636
+ winTop.location.href = href;
2633
2637
  } catch (error) {
2634
2638
  var _href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.location.href));
2635
2639
  win.location.href = _href;
@@ -2643,18 +2647,18 @@ var isLogined = function () {
2643
2647
  sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
2644
2648
  try {
2645
2649
  if (loginPage) {
2646
- win.top.location.replace(loginPage);
2650
+ winTop.location.replace(loginPage);
2647
2651
  } else if (document.referrer) {
2648
2652
  var referrerUrl = new URL(document.referrer);
2649
- if (referrerUrl.host !== win.top.location.host) {
2650
- win.top.location.replace(document.referrer);
2651
- } else if (win.top.location.href.indexOf('main.html') > -1 || win.top.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2652
- win.top.location.href = './login.html';
2653
+ if (referrerUrl.host !== winTop.location.host) {
2654
+ winTop.location.replace(document.referrer);
2655
+ } else if (winTop.location.href.indexOf('main.html') > -1 || winTop.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2656
+ winTop.location.href = './login.html';
2653
2657
  } else {
2654
2658
  next('/login');
2655
2659
  }
2656
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2657
- win.top.location.href = './login.html';
2660
+ } else if (winTop.location.href.indexOf('main.html') > -1) {
2661
+ winTop.location.href = './login.html';
2658
2662
  } else {
2659
2663
  next('/login');
2660
2664
  }
@@ -2673,18 +2677,18 @@ var isLogined = function () {
2673
2677
  callback: function callback() {
2674
2678
  try {
2675
2679
  if (loginPage) {
2676
- win.top.location.replace(loginPage);
2680
+ winTop.location.replace(loginPage);
2677
2681
  } else if (document.referrer) {
2678
2682
  var referrerUrl = new URL(document.referrer);
2679
- if (referrerUrl.host !== win.top.location.host) {
2680
- win.top.location.replace(document.referrer);
2681
- } else if (win.top.location.href.indexOf('main.html') > -1 || win.top.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2682
- win.top.location.href = './login.html';
2683
+ if (referrerUrl.host !== winTop.location.host) {
2684
+ winTop.location.replace(document.referrer);
2685
+ } else if (winTop.location.href.indexOf('main.html') > -1 || winTop.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2686
+ winTop.location.href = './login.html';
2683
2687
  } else {
2684
2688
  next('/login');
2685
2689
  }
2686
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2687
- win.top.location.href = './login.html';
2690
+ } else if (winTop.location.href.indexOf('main.html') > -1) {
2691
+ winTop.location.href = './login.html';
2688
2692
  } else {
2689
2693
  next('/login');
2690
2694
  }
@@ -2699,11 +2703,11 @@ var isLogined = function () {
2699
2703
  loadingInstance.close();
2700
2704
  });
2701
2705
 
2702
- case 17:
2703
- _context.next = 20;
2706
+ case 18:
2707
+ _context.next = 21;
2704
2708
  break;
2705
2709
 
2706
- case 19:
2710
+ case 20:
2707
2711
  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') {
2708
2712
  if (redirect && (to.path === '/main' || to.path === '/login')) {
2709
2713
  window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
@@ -2713,19 +2717,19 @@ var isLogined = function () {
2713
2717
  } else {
2714
2718
  try {
2715
2719
  if (loginPage) {
2716
- win.top.location.replace(loginPage);
2720
+ winTop.location.replace(loginPage);
2717
2721
  } else if (document.referrer) {
2718
2722
  referrerUrl = new URL(document.referrer);
2719
2723
 
2720
- if (referrerUrl.host !== win.top.location.host) {
2721
- win.top.location.replace(document.referrer);
2722
- } else if (win.top.location.href.indexOf('main.html') > -1 || win.top.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2723
- win.top.location.href = './login.html';
2724
+ if (referrerUrl.host !== winTop.location.host) {
2725
+ winTop.location.replace(document.referrer);
2726
+ } else if (winTop.location.href.indexOf('main.html') > -1 || winTop.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2727
+ winTop.location.href = './login.html';
2724
2728
  } else {
2725
2729
  next('/login');
2726
2730
  }
2727
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2728
- win.top.location.href = './login.html';
2731
+ } else if (winTop.location.href.indexOf('main.html') > -1) {
2732
+ winTop.location.href = './login.html';
2729
2733
  } else {
2730
2734
  next('/login');
2731
2735
  }
@@ -2734,7 +2738,7 @@ var isLogined = function () {
2734
2738
  }
2735
2739
  }
2736
2740
 
2737
- case 20:
2741
+ case 21:
2738
2742
  case 'end':
2739
2743
  return _context.stop();
2740
2744
  }
@@ -2852,12 +2856,13 @@ var loadJs = function loadJs(_ref13) {
2852
2856
  * @param {String} [text] - 显示的文本内容
2853
2857
  **/
2854
2858
  var util_loading = function loading($loading, res) {
2859
+ var winTop = getWinTop();
2855
2860
  if (!$loading) {
2856
2861
  $loading = external_eoss_element_["Loading"].service;
2857
2862
  }
2858
2863
  if (isObject(res)) {
2859
2864
  var config = extend({}, {
2860
- target: win.top.document.body,
2865
+ target: winTop.document.body,
2861
2866
  fullscreen: true,
2862
2867
  background: 'rgba(0, 0, 0, 0.65)',
2863
2868
  spinner: 'el-icon-loading',
@@ -2866,7 +2871,7 @@ var util_loading = function loading($loading, res) {
2866
2871
  return $loading(config);
2867
2872
  } else {
2868
2873
  var _loading = $loading({
2869
- target: win.top.document.body,
2874
+ target: winTop.document.body,
2870
2875
  fullscreen: true,
2871
2876
  background: 'rgba(0, 0, 0, 0.65)',
2872
2877
  spinner: 'el-icon-loading',
@@ -3008,11 +3013,12 @@ var replenish = function replenish(_ref15) {
3008
3013
  * @param {object} [data] - 数字或字符串型数字
3009
3014
  **/
3010
3015
  var util_responses = function responses(data) {
3016
+ var winTop = getWinTop();
3011
3017
  if (data.rCode === 64 || data.rCode === 65 || data.rCode === 67 || data.rCode === 69) {
3012
3018
  removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'useCaseCodes', 'mainConfig', 'jump', 'showLaunch']);
3013
3019
  var href = '';
3014
3020
  try {
3015
- href = win.top.location.href;
3021
+ href = winTop.location.href;
3016
3022
  } catch (error) {
3017
3023
  href = win.location.href;
3018
3024
  }
@@ -3037,7 +3043,7 @@ var util_responses = function responses(data) {
3037
3043
  if (loginPage) {
3038
3044
  var src = void 0;
3039
3045
  if (!startWith(loginPage, ['http', '/'], true)) {
3040
- var pathname = win.top.location.pathname;
3046
+ var pathname = winTop.location.pathname;
3041
3047
  if (pathname !== '/') {
3042
3048
  pathname = pathname.split('/');
3043
3049
  pathname.splice(pathname.length - 1);
@@ -3049,16 +3055,16 @@ var util_responses = function responses(data) {
3049
3055
  } else {
3050
3056
  src = loginPage;
3051
3057
  }
3052
- win.top.location.href = src;
3053
- } else if (win.top.location.href.indexOf('main.html') > -1) {
3054
- win.top.location.href = './login.html';
3058
+ winTop.location.href = src;
3059
+ } else if (winTop.location.href.indexOf('main.html') > -1) {
3060
+ winTop.location.href = './login.html';
3055
3061
  } else {
3056
- var hash = win.top.location.hash;
3062
+ var hash = winTop.location.hash;
3057
3063
  if (hash) {
3058
- var len = win.top.location.href.indexOf(hash);
3059
- win.top.location.href = win.location.href.slice(0, len) + '#/login';
3064
+ var len = winTop.location.href.indexOf(hash);
3065
+ winTop.location.href = win.location.href.slice(0, len) + '#/login';
3060
3066
  } else {
3061
- win.top.location.href = '/login.html';
3067
+ winTop.location.href = '/login.html';
3062
3068
  }
3063
3069
  }
3064
3070
  } catch (error) {
@@ -3876,10 +3882,11 @@ var removeCookie = function removeCookie(key) {
3876
3882
  };
3877
3883
 
3878
3884
  var winTopOpen = function winTopOpen(config) {
3885
+ var winTop = getWinTop();
3879
3886
  if (isIE) {
3880
- if (win.top !== win.self) {
3887
+ if (winTop !== win.self) {
3881
3888
  try {
3882
- win.top.windowOpen(config);
3889
+ winTop.windowOpen(config);
3883
3890
  } catch (error) {
3884
3891
  win.postMessage({ method: 'windowOpen', query: config }, '*');
3885
3892
  }
package/lib/tabs.js CHANGED
@@ -826,6 +826,7 @@ var busEmit = function busEmit(that, _ref3) {
826
826
  args = _ref3.args,
827
827
  opener = _ref3.opener;
828
828
 
829
+ var winTop = getWinTop();
829
830
  if (opener) {
830
831
  var source = opener.source,
831
832
  origin = opener.origin;
@@ -834,19 +835,19 @@ var busEmit = function busEmit(that, _ref3) {
834
835
  return;
835
836
  }
836
837
  if (isIE) {
837
- if (win.top !== win.self) {
838
- win.top.postMessage({ method: method, query: args, args: args }, '*');
838
+ if (winTop !== win.self) {
839
+ winTop.postMessage({ method: method, query: args, args: args }, '*');
839
840
  return;
840
841
  }
841
842
  var bus = that ? that.bus || that.$root.Bus || that.$root.$bus : null;
842
843
  bus && (Array.isArray(args) ? bus.$emit.apply(bus, [method].concat(args)) : bus.$emit(method, args));
843
844
  } else {
844
- if (win.top !== win.self) {
845
+ if (winTop !== win.self) {
845
846
  var _bus2 = win.$wujie ? win.$wujie.bus : null;
846
847
  if (_bus2) {
847
848
  Array.isArray(args) ? _bus2.$emit.apply(_bus2, [method].concat(args)) : _bus2.$emit(method, args);
848
849
  } else {
849
- win.top.postMessage({ method: method, query: args, args: args }, '*');
850
+ winTop.postMessage({ method: method, query: args, args: args }, '*');
850
851
  }
851
852
  return;
852
853
  }
@@ -1082,9 +1083,10 @@ var delUrlParam = function delUrlParam(_ref4) {
1082
1083
  var url = _ref4.url,
1083
1084
  key = _ref4.key;
1084
1085
 
1086
+ var winTop = getWinTop();
1085
1087
  var pUrl = '';
1086
1088
  try {
1087
- pUrl = win.top.location.href;
1089
+ pUrl = winTop.location.href;
1088
1090
  } catch (error) {
1089
1091
  pUrl = win.location.href;
1090
1092
  }
@@ -2512,18 +2514,20 @@ var isLogined = function () {
2512
2514
  cookie = _ref11.cookie,
2513
2515
  loginPage = _ref11.loginPage,
2514
2516
  redirect = _ref11.redirect;
2515
- var quit, pathname, path, token, loadingInstance, referrerUrl;
2517
+ var winTop, quit, pathname, path, token, loadingInstance, referrerUrl;
2516
2518
  return regenerator_default.a.wrap(function _callee$(_context) {
2517
2519
  while (1) {
2518
2520
  switch (_context.prev = _context.next) {
2519
2521
  case 0:
2522
+ winTop = getWinTop();
2523
+
2520
2524
  if (cookie === undefined) {
2521
2525
  cookie = getParams({ name: 'cookie' });
2522
2526
  }
2523
2527
  quit = getParams('quit') || getParams('logout');
2524
2528
 
2525
2529
  if (!quit) {
2526
- _context.next = 5;
2530
+ _context.next = 6;
2527
2531
  break;
2528
2532
  }
2529
2533
 
@@ -2534,11 +2538,11 @@ var isLogined = function () {
2534
2538
  }).catch(function () {});
2535
2539
  return _context.abrupt('return');
2536
2540
 
2537
- case 5:
2541
+ case 6:
2538
2542
  pathname = '';
2539
2543
 
2540
2544
  try {
2541
- pathname = win.top.location.pathname;
2545
+ pathname = winTop.location.pathname;
2542
2546
  } catch (error) {
2543
2547
  pathname = win.location.pathname;
2544
2548
  }
@@ -2564,17 +2568,17 @@ var isLogined = function () {
2564
2568
  // eslint-disable-next-line eqeqeq
2565
2569
 
2566
2570
  if (!(token || cookie == true || cookie == 1)) {
2567
- _context.next = 13;
2571
+ _context.next = 14;
2568
2572
  break;
2569
2573
  }
2570
2574
 
2571
2575
  next && next();
2572
- _context.next = 20;
2576
+ _context.next = 21;
2573
2577
  break;
2574
2578
 
2575
- case 13:
2579
+ case 14:
2576
2580
  if (!(!token && Object.prototype.hasOwnProperty.call(to.query, 'serverId') && Object.prototype.hasOwnProperty.call(to.query, 'authType'))) {
2577
- _context.next = 19;
2581
+ _context.next = 20;
2578
2582
  break;
2579
2583
  }
2580
2584
 
@@ -2583,7 +2587,7 @@ var isLogined = function () {
2583
2587
  spinner: 'el-icon-loading',
2584
2588
  background: 'rgba(0, 0, 0, 0.65)'
2585
2589
  });
2586
- _context.next = 17;
2590
+ _context.next = 18;
2587
2591
  return util_ajax({
2588
2592
  method: 'post',
2589
2593
  url: api["b" /* authCenter */],
@@ -2604,12 +2608,12 @@ var isLogined = function () {
2604
2608
  });
2605
2609
  try {
2606
2610
  var url = delUrlParam({
2607
- url: win.top.location.href,
2611
+ url: winTop.location.href,
2608
2612
  key: ['serverId', 'authType', 'code', 'sessionId']
2609
2613
  });
2610
- win.top.location.href = url;
2614
+ winTop.location.href = url;
2611
2615
  setTimeout(function () {
2612
- win.top.location.reload();
2616
+ winTop.location.reload();
2613
2617
  }, 200);
2614
2618
  } catch (error) {
2615
2619
  var _url2 = delUrlParam({
@@ -2628,8 +2632,8 @@ var isLogined = function () {
2628
2632
  break;
2629
2633
  case 3:
2630
2634
  try {
2631
- var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.top.location.href));
2632
- win.top.location.href = href;
2635
+ var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(winTop.location.href));
2636
+ winTop.location.href = href;
2633
2637
  } catch (error) {
2634
2638
  var _href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.location.href));
2635
2639
  win.location.href = _href;
@@ -2643,18 +2647,18 @@ var isLogined = function () {
2643
2647
  sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
2644
2648
  try {
2645
2649
  if (loginPage) {
2646
- win.top.location.replace(loginPage);
2650
+ winTop.location.replace(loginPage);
2647
2651
  } else if (document.referrer) {
2648
2652
  var referrerUrl = new URL(document.referrer);
2649
- if (referrerUrl.host !== win.top.location.host) {
2650
- win.top.location.replace(document.referrer);
2651
- } else if (win.top.location.href.indexOf('main.html') > -1 || win.top.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2652
- win.top.location.href = './login.html';
2653
+ if (referrerUrl.host !== winTop.location.host) {
2654
+ winTop.location.replace(document.referrer);
2655
+ } else if (winTop.location.href.indexOf('main.html') > -1 || winTop.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2656
+ winTop.location.href = './login.html';
2653
2657
  } else {
2654
2658
  next('/login');
2655
2659
  }
2656
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2657
- win.top.location.href = './login.html';
2660
+ } else if (winTop.location.href.indexOf('main.html') > -1) {
2661
+ winTop.location.href = './login.html';
2658
2662
  } else {
2659
2663
  next('/login');
2660
2664
  }
@@ -2673,18 +2677,18 @@ var isLogined = function () {
2673
2677
  callback: function callback() {
2674
2678
  try {
2675
2679
  if (loginPage) {
2676
- win.top.location.replace(loginPage);
2680
+ winTop.location.replace(loginPage);
2677
2681
  } else if (document.referrer) {
2678
2682
  var referrerUrl = new URL(document.referrer);
2679
- if (referrerUrl.host !== win.top.location.host) {
2680
- win.top.location.replace(document.referrer);
2681
- } else if (win.top.location.href.indexOf('main.html') > -1 || win.top.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2682
- win.top.location.href = './login.html';
2683
+ if (referrerUrl.host !== winTop.location.host) {
2684
+ winTop.location.replace(document.referrer);
2685
+ } else if (winTop.location.href.indexOf('main.html') > -1 || winTop.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2686
+ winTop.location.href = './login.html';
2683
2687
  } else {
2684
2688
  next('/login');
2685
2689
  }
2686
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2687
- win.top.location.href = './login.html';
2690
+ } else if (winTop.location.href.indexOf('main.html') > -1) {
2691
+ winTop.location.href = './login.html';
2688
2692
  } else {
2689
2693
  next('/login');
2690
2694
  }
@@ -2699,11 +2703,11 @@ var isLogined = function () {
2699
2703
  loadingInstance.close();
2700
2704
  });
2701
2705
 
2702
- case 17:
2703
- _context.next = 20;
2706
+ case 18:
2707
+ _context.next = 21;
2704
2708
  break;
2705
2709
 
2706
- case 19:
2710
+ case 20:
2707
2711
  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') {
2708
2712
  if (redirect && (to.path === '/main' || to.path === '/login')) {
2709
2713
  window.location.replace(urlJoinParams({ url: '.' + to.path + '.html', param: to.query }));
@@ -2713,19 +2717,19 @@ var isLogined = function () {
2713
2717
  } else {
2714
2718
  try {
2715
2719
  if (loginPage) {
2716
- win.top.location.replace(loginPage);
2720
+ winTop.location.replace(loginPage);
2717
2721
  } else if (document.referrer) {
2718
2722
  referrerUrl = new URL(document.referrer);
2719
2723
 
2720
- if (referrerUrl.host !== win.top.location.host) {
2721
- win.top.location.replace(document.referrer);
2722
- } else if (win.top.location.href.indexOf('main.html') > -1 || win.top.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2723
- win.top.location.href = './login.html';
2724
+ if (referrerUrl.host !== winTop.location.host) {
2725
+ winTop.location.replace(document.referrer);
2726
+ } else if (winTop.location.href.indexOf('main.html') > -1 || winTop.location.href.indexOf('index.html') > -1 || document.referrer.indexOf('main.html') > -1 || document.referrer.indexOf('index.html') > -1) {
2727
+ winTop.location.href = './login.html';
2724
2728
  } else {
2725
2729
  next('/login');
2726
2730
  }
2727
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2728
- win.top.location.href = './login.html';
2731
+ } else if (winTop.location.href.indexOf('main.html') > -1) {
2732
+ winTop.location.href = './login.html';
2729
2733
  } else {
2730
2734
  next('/login');
2731
2735
  }
@@ -2734,7 +2738,7 @@ var isLogined = function () {
2734
2738
  }
2735
2739
  }
2736
2740
 
2737
- case 20:
2741
+ case 21:
2738
2742
  case 'end':
2739
2743
  return _context.stop();
2740
2744
  }
@@ -2852,12 +2856,13 @@ var loadJs = function loadJs(_ref13) {
2852
2856
  * @param {String} [text] - 显示的文本内容
2853
2857
  **/
2854
2858
  var util_loading = function loading($loading, res) {
2859
+ var winTop = getWinTop();
2855
2860
  if (!$loading) {
2856
2861
  $loading = external_eoss_element_["Loading"].service;
2857
2862
  }
2858
2863
  if (isObject(res)) {
2859
2864
  var config = extend({}, {
2860
- target: win.top.document.body,
2865
+ target: winTop.document.body,
2861
2866
  fullscreen: true,
2862
2867
  background: 'rgba(0, 0, 0, 0.65)',
2863
2868
  spinner: 'el-icon-loading',
@@ -2866,7 +2871,7 @@ var util_loading = function loading($loading, res) {
2866
2871
  return $loading(config);
2867
2872
  } else {
2868
2873
  var _loading = $loading({
2869
- target: win.top.document.body,
2874
+ target: winTop.document.body,
2870
2875
  fullscreen: true,
2871
2876
  background: 'rgba(0, 0, 0, 0.65)',
2872
2877
  spinner: 'el-icon-loading',
@@ -3008,11 +3013,12 @@ var replenish = function replenish(_ref15) {
3008
3013
  * @param {object} [data] - 数字或字符串型数字
3009
3014
  **/
3010
3015
  var util_responses = function responses(data) {
3016
+ var winTop = getWinTop();
3011
3017
  if (data.rCode === 64 || data.rCode === 65 || data.rCode === 67 || data.rCode === 69) {
3012
3018
  removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'useCaseCodes', 'mainConfig', 'jump', 'showLaunch']);
3013
3019
  var href = '';
3014
3020
  try {
3015
- href = win.top.location.href;
3021
+ href = winTop.location.href;
3016
3022
  } catch (error) {
3017
3023
  href = win.location.href;
3018
3024
  }
@@ -3037,7 +3043,7 @@ var util_responses = function responses(data) {
3037
3043
  if (loginPage) {
3038
3044
  var src = void 0;
3039
3045
  if (!startWith(loginPage, ['http', '/'], true)) {
3040
- var pathname = win.top.location.pathname;
3046
+ var pathname = winTop.location.pathname;
3041
3047
  if (pathname !== '/') {
3042
3048
  pathname = pathname.split('/');
3043
3049
  pathname.splice(pathname.length - 1);
@@ -3049,16 +3055,16 @@ var util_responses = function responses(data) {
3049
3055
  } else {
3050
3056
  src = loginPage;
3051
3057
  }
3052
- win.top.location.href = src;
3053
- } else if (win.top.location.href.indexOf('main.html') > -1) {
3054
- win.top.location.href = './login.html';
3058
+ winTop.location.href = src;
3059
+ } else if (winTop.location.href.indexOf('main.html') > -1) {
3060
+ winTop.location.href = './login.html';
3055
3061
  } else {
3056
- var hash = win.top.location.hash;
3062
+ var hash = winTop.location.hash;
3057
3063
  if (hash) {
3058
- var len = win.top.location.href.indexOf(hash);
3059
- win.top.location.href = win.location.href.slice(0, len) + '#/login';
3064
+ var len = winTop.location.href.indexOf(hash);
3065
+ winTop.location.href = win.location.href.slice(0, len) + '#/login';
3060
3066
  } else {
3061
- win.top.location.href = '/login.html';
3067
+ winTop.location.href = '/login.html';
3062
3068
  }
3063
3069
  }
3064
3070
  } catch (error) {
@@ -3876,10 +3882,11 @@ var removeCookie = function removeCookie(key) {
3876
3882
  };
3877
3883
 
3878
3884
  var winTopOpen = function winTopOpen(config) {
3885
+ var winTop = getWinTop();
3879
3886
  if (isIE) {
3880
- if (win.top !== win.self) {
3887
+ if (winTop !== win.self) {
3881
3888
  try {
3882
- win.top.windowOpen(config);
3889
+ winTop.windowOpen(config);
3883
3890
  } catch (error) {
3884
3891
  win.postMessage({ method: 'windowOpen', query: config }, '*');
3885
3892
  }