eoss-ui 0.5.43 → 0.5.44

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 (134) hide show
  1. package/CHANGELOG.md +929 -0
  2. package/README.md +18 -0
  3. package/lib/button-group.js +120 -69
  4. package/lib/button.js +133 -72
  5. package/lib/checkbox-group.js +116 -67
  6. package/lib/data-table-form.js +126 -74
  7. package/lib/data-table.js +210 -104
  8. package/lib/date-picker.js +116 -67
  9. package/lib/dialog.js +132 -71
  10. package/lib/eoss-ui.common.js +704 -411
  11. package/lib/flow-group.js +144 -74
  12. package/lib/flow-list.js +120 -69
  13. package/lib/flow.js +169 -99
  14. package/lib/form.js +125 -69
  15. package/lib/handle-user.js +127 -70
  16. package/lib/handler.js +145 -92
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +116 -67
  19. package/lib/input.js +116 -67
  20. package/lib/login.js +149 -97
  21. package/lib/main.js +234 -152
  22. package/lib/nav.js +116 -67
  23. package/lib/page.js +116 -67
  24. package/lib/player.js +116 -67
  25. package/lib/qr-code.js +116 -67
  26. package/lib/radio-group.js +116 -67
  27. package/lib/retrial-auth.js +130 -71
  28. package/lib/select-ganged.js +116 -67
  29. package/lib/select.js +116 -67
  30. package/lib/selector-panel.js +131 -74
  31. package/lib/selector.js +116 -67
  32. package/lib/sizer.js +116 -67
  33. package/lib/steps.js +116 -67
  34. package/lib/switch.js +116 -67
  35. package/lib/table-form.js +123 -72
  36. package/lib/tabs.js +119 -69
  37. package/lib/theme-chalk/data-table.css +1 -1
  38. package/lib/theme-chalk/index.css +1 -1
  39. package/lib/tips.js +116 -67
  40. package/lib/tree-group.js +151 -71
  41. package/lib/tree.js +116 -67
  42. package/lib/upload.js +136 -78
  43. package/lib/utils/util.js +116 -67
  44. package/lib/wujie.js +116 -67
  45. package/lib/wxlogin.js +116 -67
  46. package/package.json +2 -2
  47. package/packages/button/src/main.vue +17 -5
  48. package/packages/button-group/src/main.vue +2 -0
  49. package/packages/data-table/src/column.vue +4 -0
  50. package/packages/data-table/src/main.vue +66 -26
  51. package/packages/data-table-form/src/tbody.vue +3 -0
  52. package/packages/dialog/src/main.vue +14 -2
  53. package/packages/flow/src/component/CustomPreset.vue +14 -7
  54. package/packages/flow/src/component/FileList.vue +4 -2
  55. package/packages/flow/src/component/Preset.vue +11 -13
  56. package/packages/flow/src/form.vue +5 -4
  57. package/packages/flow/src/main.vue +7 -7
  58. package/packages/flow/src/table.vue +8 -1
  59. package/packages/flow-group/src/main.vue +26 -5
  60. package/packages/form/src/main.vue +12 -0
  61. package/packages/form/src/table.vue +2 -0
  62. package/packages/handle-user/src/main.vue +9 -1
  63. package/packages/handler/src/main.vue +31 -27
  64. package/packages/login/src/main.vue +35 -31
  65. package/packages/main/src/async-component/index.vue +4 -2
  66. package/packages/main/src/main.vue +62 -30
  67. package/packages/main/src/userinfo.vue +29 -25
  68. package/packages/retrial-auth/src/main.vue +12 -2
  69. package/packages/selector-panel/src/selection.vue +6 -0
  70. package/packages/tabs/src/main.vue +1 -0
  71. package/packages/theme-chalk/lib/base.css +1 -0
  72. package/packages/theme-chalk/lib/button-group.css +1 -0
  73. package/packages/theme-chalk/lib/button.css +1 -0
  74. package/packages/theme-chalk/lib/card.css +1 -0
  75. package/packages/theme-chalk/lib/cascader.css +0 -0
  76. package/packages/theme-chalk/lib/checkbox-group.css +1 -0
  77. package/packages/theme-chalk/lib/clients.css +1 -0
  78. package/packages/theme-chalk/lib/data-table-form.css +1 -0
  79. package/packages/theme-chalk/lib/data-table.css +1 -0
  80. package/packages/theme-chalk/lib/date-picker.css +1 -0
  81. package/packages/theme-chalk/lib/dialog.css +1 -0
  82. package/packages/theme-chalk/lib/enterprise.css +1 -0
  83. package/packages/theme-chalk/lib/error-page.css +1 -0
  84. package/packages/theme-chalk/lib/flow-chart.css +0 -0
  85. package/packages/theme-chalk/lib/flow-group.css +1 -0
  86. package/packages/theme-chalk/lib/flow-list.css +1 -0
  87. package/packages/theme-chalk/lib/flow.css +1 -0
  88. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  89. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  90. package/packages/theme-chalk/lib/form.css +1 -0
  91. package/packages/theme-chalk/lib/handle-user.css +1 -0
  92. package/packages/theme-chalk/lib/handler.css +1 -0
  93. package/packages/theme-chalk/lib/icon.css +1 -0
  94. package/packages/theme-chalk/lib/icons.css +1 -0
  95. package/packages/theme-chalk/lib/index.css +1 -0
  96. package/packages/theme-chalk/lib/input-number.css +0 -0
  97. package/packages/theme-chalk/lib/input.css +1 -0
  98. package/packages/theme-chalk/lib/label.css +1 -0
  99. package/packages/theme-chalk/lib/layout.css +1 -0
  100. package/packages/theme-chalk/lib/login.css +1 -0
  101. package/packages/theme-chalk/lib/main.css +1 -0
  102. package/packages/theme-chalk/lib/mainComp.css +0 -0
  103. package/packages/theme-chalk/lib/menu.css +1 -0
  104. package/packages/theme-chalk/lib/nav.css +1 -0
  105. package/packages/theme-chalk/lib/notify.css +0 -0
  106. package/packages/theme-chalk/lib/page.css +1 -0
  107. package/packages/theme-chalk/lib/pagination.css +1 -0
  108. package/packages/theme-chalk/lib/player.css +1 -0
  109. package/packages/theme-chalk/lib/qr-code.css +1 -0
  110. package/packages/theme-chalk/lib/radio-group.css +1 -0
  111. package/packages/theme-chalk/lib/retrial-auth.css +1 -0
  112. package/packages/theme-chalk/lib/select-ganged.css +1 -0
  113. package/packages/theme-chalk/lib/select.css +1 -0
  114. package/packages/theme-chalk/lib/selector-panel.css +1 -0
  115. package/packages/theme-chalk/lib/selector.css +1 -0
  116. package/packages/theme-chalk/lib/sizer.css +1 -0
  117. package/packages/theme-chalk/lib/steps.css +1 -0
  118. package/packages/theme-chalk/lib/switch.css +1 -0
  119. package/packages/theme-chalk/lib/table-form.css +0 -0
  120. package/packages/theme-chalk/lib/tabs-panel.css +0 -0
  121. package/packages/theme-chalk/lib/tabs.css +1 -0
  122. package/packages/theme-chalk/lib/tips.css +1 -0
  123. package/packages/theme-chalk/lib/toolbar.css +1 -0
  124. package/packages/theme-chalk/lib/tree-group.css +1 -0
  125. package/packages/theme-chalk/lib/tree.css +1 -0
  126. package/packages/theme-chalk/lib/upload.css +1 -0
  127. package/packages/theme-chalk/lib/wujie.css +0 -0
  128. package/packages/theme-chalk/lib/wxlogin.css +1 -0
  129. package/packages/theme-chalk/src/data-table.scss +6 -0
  130. package/packages/tree-group/src/main.vue +36 -2
  131. package/packages/upload/src/main.vue +15 -6
  132. package/src/index.js +1 -1
  133. package/src/utils/util.js +132 -80
  134. package/packages/theme-chalk/gulpfile.js +0 -25
package/lib/main.js CHANGED
@@ -257,7 +257,13 @@ var ajax = function ajax(_ref) {
257
257
  if (response.status === 200) {
258
258
  if (response.data.rCode === 64 || response.data.rCode === 65 || response.data.rCode === 67 || response.data.rCode === 69) {
259
259
  removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'deviceUnique', 'menus', 'menus', 'useCaseCodes', 'mainConfig', 'jump']);
260
- if (win.top.location.href.indexOf('#/login') === -1 && win.top.location.href.indexOf('/login.html') === -1) {
260
+ var href = '';
261
+ try {
262
+ href = win.top.location.href;
263
+ } catch (error) {
264
+ href = win.location.href;
265
+ }
266
+ if (href.indexOf('#/login') === -1 && href.indexOf('/login.html') === -1) {
261
267
  var remind = sessionStorage.getItem('remind');
262
268
  if (!remind) {
263
269
  clearTimeout(loginMsg);
@@ -273,33 +279,37 @@ var ajax = function ajax(_ref) {
273
279
  closeOnClickModal: false,
274
280
  type: 'warning'
275
281
  }).then(function () {
276
- var loginPage = getStorage('login') || getStorage('loginPage');
277
- if (loginPage) {
278
- var src = void 0;
279
- if (!startWith(loginPage, ['http', '/'], true)) {
280
- var pathname = win.top.location.pathname;
281
- if (pathname !== '/') {
282
- pathname = pathname.split('/');
283
- pathname.splice(pathname.length - 1);
284
- pathname = pathname.join('/');
285
- src = pathname + '/' + loginPage.replace('./', '');
282
+ try {
283
+ var loginPage = getStorage('login') || getStorage('loginPage');
284
+ if (loginPage) {
285
+ var src = void 0;
286
+ if (!startWith(loginPage, ['http', '/'], true)) {
287
+ var pathname = win.top.location.pathname;
288
+ if (pathname !== '/') {
289
+ pathname = pathname.split('/');
290
+ pathname.splice(pathname.length - 1);
291
+ pathname = pathname.join('/');
292
+ src = pathname + '/' + loginPage.replace('./', '');
293
+ } else {
294
+ src = pathname + loginPage.replace('./', '');
295
+ }
286
296
  } else {
287
- src = pathname + loginPage.replace('./', '');
297
+ src = loginPage;
288
298
  }
299
+ win.top.location.href = src;
300
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
301
+ win.top.location.href = './login.html';
289
302
  } else {
290
- src = loginPage;
291
- }
292
- win.top.location.href = src;
293
- } else if (win.top.location.href.indexOf('main.html') > -1) {
294
- win.top.location.href = './login.html';
295
- } else {
296
- var hash = win.top.location.hash;
297
- if (hash) {
298
- var len = win.top.location.href.indexOf(hash);
299
- win.top.location.href = win.location.href.slice(0, len) + '#/login';
300
- } else {
301
- win.top.location.href = '/login.html';
303
+ var hash = win.top.location.hash;
304
+ if (hash) {
305
+ var len = win.top.location.href.indexOf(hash);
306
+ win.top.location.href = win.location.href.slice(0, len) + '#/login';
307
+ } else {
308
+ win.top.location.href = '/login.html';
309
+ }
302
310
  }
311
+ } catch (error) {
312
+ win.postMessage({ type: 1 }, '*');
303
313
  }
304
314
  }).catch(function (e) {
305
315
  sessionStorage.removeItem('remind');
@@ -737,7 +747,13 @@ var delUrlParam = function delUrlParam(_ref2) {
737
747
  var url = _ref2.url,
738
748
  key = _ref2.key;
739
749
 
740
- var src = url ? decodeURI(url) : decodeURI(win.top.location.href);
750
+ var pUrl = '';
751
+ try {
752
+ pUrl = win.top.location.href;
753
+ } catch (error) {
754
+ pUrl = win.location.href;
755
+ }
756
+ var src = url ? decodeURI(url) : decodeURI(pUrl);
741
757
  var param = getParams({ url: src });
742
758
  if (param && key.length) {
743
759
  if (Array.isArray(key)) {
@@ -1987,7 +2003,12 @@ var isLogined = function isLogined(_ref8) {
1987
2003
  }).catch(function () {});
1988
2004
  return;
1989
2005
  }
1990
- var pathname = win.top.location.pathname;
2006
+ var pathname = '';
2007
+ try {
2008
+ pathname = win.top.location.pathname;
2009
+ } catch (error) {
2010
+ pathname = win.location.pathname;
2011
+ }
1991
2012
  if (loginPage) {
1992
2013
  sessionStorage.setItem('loginPage', loginPage);
1993
2014
  if (!startWith(loginPage, ['http', '/'], true)) {
@@ -2028,22 +2049,38 @@ var isLogined = function isLogined(_ref8) {
2028
2049
  deviceUnique: results.deviceUnique
2029
2050
  }
2030
2051
  });
2031
- var url = delUrlParam({
2032
- url: win.top.location.href,
2033
- key: ['serverId', 'authType', 'code', 'sessionId']
2034
- });
2035
- win.top.location.href = url;
2036
- setTimeout(function () {
2037
- win.top.location.reload();
2038
- }, 200);
2052
+ try {
2053
+ var url = delUrlParam({
2054
+ url: win.top.location.href,
2055
+ key: ['serverId', 'authType', 'code', 'sessionId']
2056
+ });
2057
+ win.top.location.href = url;
2058
+ setTimeout(function () {
2059
+ win.top.location.reload();
2060
+ }, 200);
2061
+ } catch (error) {
2062
+ var _url2 = delUrlParam({
2063
+ url: win.location.href,
2064
+ key: ['serverId', 'authType', 'code', 'sessionId']
2065
+ });
2066
+ win.location.href = _url2;
2067
+ setTimeout(function () {
2068
+ win.location.reload();
2069
+ }, 200);
2070
+ }
2039
2071
  break;
2040
2072
  case 1:
2041
2073
  break;
2042
2074
  case 2:
2043
2075
  break;
2044
2076
  case 3:
2045
- var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.top.location.href));
2046
- win.top.location.href = href;
2077
+ try {
2078
+ var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.top.location.href));
2079
+ win.top.location.href = href;
2080
+ } catch (error) {
2081
+ var _href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.location.href));
2082
+ win.location.href = _href;
2083
+ }
2047
2084
  break;
2048
2085
  case 4:
2049
2086
  eoss_element__WEBPACK_IMPORTED_MODULE_5__["MessageBox"].alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
@@ -2051,14 +2088,18 @@ var isLogined = function isLogined(_ref8) {
2051
2088
  type: 'error',
2052
2089
  callback: function callback() {
2053
2090
  sessionStorage.setItem('extUserBindHandleId', results.extUserBindHandleId);
2054
- if (loginPage) {
2055
- win.top.location.replace(loginPage);
2056
- } else if (document.referrer) {
2057
- win.top.location.replace(document.referrer);
2058
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2059
- win.top.location.href = './login.html';
2060
- } else {
2061
- next('/login');
2091
+ try {
2092
+ if (loginPage) {
2093
+ win.top.location.replace(loginPage);
2094
+ } else if (document.referrer) {
2095
+ win.top.location.replace(document.referrer);
2096
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
2097
+ win.top.location.href = './login.html';
2098
+ } else {
2099
+ next('/login');
2100
+ }
2101
+ } catch (error) {
2102
+ win.postMessage({ type: 1 }, '*');
2062
2103
  }
2063
2104
  }
2064
2105
  });
@@ -2070,14 +2111,18 @@ var isLogined = function isLogined(_ref8) {
2070
2111
  confirmButtonText: '确定',
2071
2112
  type: 'error',
2072
2113
  callback: function callback() {
2073
- if (loginPage) {
2074
- win.top.location.replace(loginPage);
2075
- } else if (document.referrer) {
2076
- win.top.location.replace(document.referrer);
2077
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2078
- win.top.location.href = './login.html';
2079
- } else {
2080
- next('/login');
2114
+ try {
2115
+ if (loginPage) {
2116
+ win.top.location.replace(loginPage);
2117
+ } else if (document.referrer) {
2118
+ win.top.location.replace(document.referrer);
2119
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
2120
+ win.top.location.href = './login.html';
2121
+ } else {
2122
+ next('/login');
2123
+ }
2124
+ } catch (error) {
2125
+ win.postMessage({ type: 1 }, '*');
2081
2126
  }
2082
2127
  }
2083
2128
  });
@@ -2090,14 +2135,18 @@ var isLogined = function isLogined(_ref8) {
2090
2135
  next();
2091
2136
  }
2092
2137
  } else {
2093
- if (loginPage) {
2094
- win.top.location.replace(loginPage);
2095
- } else if (document.referrer) {
2096
- win.top.location.replace(document.referrer);
2097
- } else if (win.top.location.href.indexOf('main.html') > -1) {
2098
- win.top.location.href = './login.html';
2099
- } else {
2100
- next('/login');
2138
+ try {
2139
+ if (loginPage) {
2140
+ win.top.location.replace(loginPage);
2141
+ } else if (document.referrer) {
2142
+ win.top.location.replace(document.referrer);
2143
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
2144
+ win.top.location.href = './login.html';
2145
+ } else {
2146
+ next('/login');
2147
+ }
2148
+ } catch (error) {
2149
+ win.postMessage({ type: 1 }, '*');
2101
2150
  }
2102
2151
  }
2103
2152
  }
@@ -2527,30 +2576,30 @@ var setStorage = function setStorage(_ref14) {
2527
2576
  if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
2528
2577
  value = JSON.stringify(value);
2529
2578
  }
2530
- if (type === undefined || type === 'sessionStorage') {
2579
+ if (type === 'localStorage') {
2531
2580
  if (typeof key === 'string') {
2532
- sessionStorage.setItem(key, value);
2581
+ localStorage.setItem(key, value);
2533
2582
  } else if (Array.isArray(key)) {
2534
2583
  for (var i in key) {
2535
- sessionStorage.setItem(key[i], value);
2584
+ localStorage.setItem(key[i], value);
2536
2585
  }
2537
2586
  } else {
2538
2587
  for (var _i6 in key) {
2539
2588
  var val = _typeof(key[_i6]) === 'object' ? JSON.stringify(key[_i6]) : key[_i6];
2540
- sessionStorage.setItem(_i6, val);
2589
+ localStorage.setItem(_i6, val);
2541
2590
  }
2542
2591
  }
2543
2592
  } else {
2544
2593
  if (typeof key === 'string') {
2545
- localStorage.setItem(key, value);
2594
+ sessionStorage.setItem(key, value);
2546
2595
  } else if (Array.isArray(key)) {
2547
2596
  for (var _i7 in key) {
2548
- localStorage.setItem(key[_i7], value);
2597
+ sessionStorage.setItem(key[_i7], value);
2549
2598
  }
2550
2599
  } else {
2551
2600
  for (var _i8 in key) {
2552
2601
  var _val = _typeof(key[_i8]) === 'object' ? JSON.stringify(key[_i8]) : key[_i8];
2553
- localStorage.setItem(_i8, _val);
2602
+ sessionStorage.setItem(_i8, _val);
2554
2603
  }
2555
2604
  }
2556
2605
  }
@@ -3698,7 +3747,7 @@ module.exports = require("runtime-import");
3698
3747
  // ESM COMPAT FLAG
3699
3748
  __webpack_require__.r(__webpack_exports__);
3700
3749
 
3701
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=template&id=07ff4c6a&
3750
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/main.vue?vue&type=template&id=fd021d4a&
3702
3751
  var render = function () {
3703
3752
  var _vm = this
3704
3753
  var _h = _vm.$createElement
@@ -4129,10 +4178,10 @@ var staticRenderFns = []
4129
4178
  render._withStripped = true
4130
4179
 
4131
4180
 
4132
- // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=07ff4c6a&
4181
+ // CONCATENATED MODULE: ./packages/main/src/main.vue?vue&type=template&id=fd021d4a&
4133
4182
 
4134
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/userinfo.vue?vue&type=template&id=137dd243&
4135
- var userinfovue_type_template_id_137dd243_render = function () {
4183
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/userinfo.vue?vue&type=template&id=e93353b8&
4184
+ var userinfovue_type_template_id_e93353b8_render = function () {
4136
4185
  var _vm = this
4137
4186
  var _h = _vm.$createElement
4138
4187
  var _c = _vm._self._c || _h
@@ -4148,11 +4197,11 @@ var userinfovue_type_template_id_137dd243_render = function () {
4148
4197
  2
4149
4198
  )
4150
4199
  }
4151
- var userinfovue_type_template_id_137dd243_staticRenderFns = []
4152
- userinfovue_type_template_id_137dd243_render._withStripped = true
4200
+ var userinfovue_type_template_id_e93353b8_staticRenderFns = []
4201
+ userinfovue_type_template_id_e93353b8_render._withStripped = true
4153
4202
 
4154
4203
 
4155
- // CONCATENATED MODULE: ./packages/main/src/userinfo.vue?vue&type=template&id=137dd243&
4204
+ // CONCATENATED MODULE: ./packages/main/src/userinfo.vue?vue&type=template&id=e93353b8&
4156
4205
 
4157
4206
  // EXTERNAL MODULE: ./src/config/api.js
4158
4207
  var api = __webpack_require__(1);
@@ -4496,32 +4545,36 @@ var util = __webpack_require__(0);
4496
4545
  type: 'warning'
4497
4546
  }).then(function () {
4498
4547
  var loginPage = util["a" /* default */].getStorage('login') || util["a" /* default */].getStorage('loginPage');
4499
- if (loginPage) {
4500
- var src = void 0;
4501
- if (!util["a" /* default */].startWith(loginPage, ['http', '/'], true)) {
4502
- var pathname = util["a" /* default */].win.top.location.pathname;
4503
- if (pathname !== '/') {
4504
- pathname = pathname.split('/');
4505
- pathname.splice(pathname.length - 1);
4506
- pathname = pathname.join('/');
4507
- src = pathname + '/' + loginPage.replace('./', '');
4548
+ try {
4549
+ if (loginPage) {
4550
+ var src = void 0;
4551
+ if (!util["a" /* default */].startWith(loginPage, ['http', '/'], true)) {
4552
+ var pathname = util["a" /* default */].win.top.location.pathname;
4553
+ if (pathname !== '/') {
4554
+ pathname = pathname.split('/');
4555
+ pathname.splice(pathname.length - 1);
4556
+ pathname = pathname.join('/');
4557
+ src = pathname + '/' + loginPage.replace('./', '');
4558
+ } else {
4559
+ src = pathname + loginPage.replace('./', '');
4560
+ }
4508
4561
  } else {
4509
- src = pathname + loginPage.replace('./', '');
4562
+ src = loginPage;
4510
4563
  }
4564
+ util["a" /* default */].win.top.location.href = src;
4565
+ } else if (util["a" /* default */].win.top.location.href.indexOf('main.html') > -1) {
4566
+ util["a" /* default */].win.top.location.href = './login.html';
4511
4567
  } else {
4512
- src = loginPage;
4513
- }
4514
- util["a" /* default */].win.top.location.href = src;
4515
- } else if (util["a" /* default */].win.top.location.href.indexOf('main.html') > -1) {
4516
- util["a" /* default */].win.top.location.href = './login.html';
4517
- } else {
4518
- var hash = util["a" /* default */].win.top.location.hash;
4519
- if (hash) {
4520
- var len = util["a" /* default */].win.top.location.href.indexOf(hash);
4521
- util["a" /* default */].win.top.location.href = util["a" /* default */].win.location.href.slice(0, len) + '#/login';
4522
- } else {
4523
- util["a" /* default */].win.top.location.href = '/login.html';
4568
+ var hash = util["a" /* default */].win.top.location.hash;
4569
+ if (hash) {
4570
+ var len = util["a" /* default */].win.top.location.href.indexOf(hash);
4571
+ util["a" /* default */].win.top.location.href = util["a" /* default */].win.location.href.slice(0, len) + '#/login';
4572
+ } else {
4573
+ util["a" /* default */].win.top.location.href = '/login.html';
4574
+ }
4524
4575
  }
4576
+ } catch (error) {
4577
+ util["a" /* default */].win.postMessage({ type: 1 }, '*');
4525
4578
  }
4526
4579
  }).catch(function (e) {});
4527
4580
  } else {
@@ -4580,8 +4633,8 @@ var componentNormalizer = __webpack_require__(3);
4580
4633
 
4581
4634
  var component = Object(componentNormalizer["a" /* default */])(
4582
4635
  src_userinfovue_type_script_lang_js_,
4583
- userinfovue_type_template_id_137dd243_render,
4584
- userinfovue_type_template_id_137dd243_staticRenderFns,
4636
+ userinfovue_type_template_id_e93353b8_render,
4637
+ userinfovue_type_template_id_e93353b8_staticRenderFns,
4585
4638
  false,
4586
4639
  null,
4587
4640
  null,
@@ -5756,8 +5809,8 @@ var notice_component = Object(componentNormalizer["a" /* default */])(
5756
5809
  )
5757
5810
 
5758
5811
  /* harmony default export */ var notice = (notice_component.exports);
5759
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/async-component/index.vue?vue&type=template&id=51f0233c&scoped=true&
5760
- var async_componentvue_type_template_id_51f0233c_scoped_true_render = function () {
5812
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/main/src/async-component/index.vue?vue&type=template&id=8b78c8b6&scoped=true&
5813
+ var async_componentvue_type_template_id_8b78c8b6_scoped_true_render = function () {
5761
5814
  var _vm = this
5762
5815
  var _h = _vm.$createElement
5763
5816
  var _c = _vm._self._c || _h
@@ -5769,11 +5822,11 @@ var async_componentvue_type_template_id_51f0233c_scoped_true_render = function (
5769
5822
  )
5770
5823
  )
5771
5824
  }
5772
- var async_componentvue_type_template_id_51f0233c_scoped_true_staticRenderFns = []
5773
- async_componentvue_type_template_id_51f0233c_scoped_true_render._withStripped = true
5825
+ var async_componentvue_type_template_id_8b78c8b6_scoped_true_staticRenderFns = []
5826
+ async_componentvue_type_template_id_8b78c8b6_scoped_true_render._withStripped = true
5774
5827
 
5775
5828
 
5776
- // CONCATENATED MODULE: ./packages/main/src/async-component/index.vue?vue&type=template&id=51f0233c&scoped=true&
5829
+ // CONCATENATED MODULE: ./packages/main/src/async-component/index.vue?vue&type=template&id=8b78c8b6&scoped=true&
5777
5830
 
5778
5831
  // EXTERNAL MODULE: external "babel-runtime/regenerator"
5779
5832
  var regenerator_ = __webpack_require__(12);
@@ -5839,7 +5892,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
5839
5892
  _context.prev = 0;
5840
5893
 
5841
5894
  if (!(url.indexOf && (url.indexOf('http:') != -1 || url.indexOf('https:') != -1 || url.indexOf('/dev-api') != -1))) {
5842
- _context.next = 19;
5895
+ _context.next = 21;
5843
5896
  break;
5844
5897
  }
5845
5898
 
@@ -5847,7 +5900,7 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
5847
5900
  catchComponent = util["a" /* default */].win[url];
5848
5901
 
5849
5902
  if (!catchComponent) {
5850
- _context.next = 8;
5903
+ _context.next = 9;
5851
5904
  break;
5852
5905
  }
5853
5906
 
@@ -5855,56 +5908,58 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
5855
5908
  _this.comp = catchComponent;
5856
5909
  // 回传props内容
5857
5910
  _this.$emit('handleGetProps', _this.comp.props);
5858
- _context.next = 17;
5911
+ _this.$emit('handle-get-props', _this.comp.props);
5912
+ _context.next = 19;
5859
5913
  break;
5860
5914
 
5861
- case 8:
5862
- _context.next = 10;
5915
+ case 9:
5916
+ _context.next = 11;
5863
5917
  return Object(external_runtime_import_["importScript"])(url);
5864
5918
 
5865
- case 10:
5919
+ case 11:
5866
5920
  comp = _context.sent;
5867
5921
 
5868
5922
  if (comp) {
5869
- _context.next = 14;
5923
+ _context.next = 15;
5870
5924
  break;
5871
5925
  }
5872
5926
 
5873
5927
  _this.$message.error('不是合规组件,请检查组件上传环境和语法');
5874
5928
  return _context.abrupt('return');
5875
5929
 
5876
- case 14:
5930
+ case 15:
5877
5931
  _this.comp = comp;
5878
5932
  util["a" /* default */].win[url] = comp;
5879
5933
  // 回传props内容
5880
5934
  _this.$emit('handleGetProps', _this.comp.props);
5935
+ _this.$emit('handle-get-props', _this.comp.props);
5881
5936
 
5882
- case 17:
5883
- _context.next = 20;
5937
+ case 19:
5938
+ _context.next = 22;
5884
5939
  break;
5885
5940
 
5886
- case 19:
5941
+ case 21:
5887
5942
  // 如果不是url则当作文本片段处理
5888
5943
  _this.comp = url;
5889
5944
  // 回传props内容
5890
5945
  // this.$emit('handleGetProps', this.comp.props);
5891
5946
 
5892
- case 20:
5893
- _context.next = 25;
5947
+ case 22:
5948
+ _context.next = 27;
5894
5949
  break;
5895
5950
 
5896
- case 22:
5897
- _context.prev = 22;
5951
+ case 24:
5952
+ _context.prev = 24;
5898
5953
  _context.t0 = _context['catch'](0);
5899
5954
 
5900
5955
  console.error(_context.t0);
5901
5956
 
5902
- case 25:
5957
+ case 27:
5903
5958
  case 'end':
5904
5959
  return _context.stop();
5905
5960
  }
5906
5961
  }
5907
- }, _callee, _this, [[0, 22]]);
5962
+ }, _callee, _this, [[0, 24]]);
5908
5963
  }))();
5909
5964
  }
5910
5965
  }
@@ -5921,11 +5976,11 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
5921
5976
 
5922
5977
  var async_component_component = Object(componentNormalizer["a" /* default */])(
5923
5978
  src_async_componentvue_type_script_lang_js_,
5924
- async_componentvue_type_template_id_51f0233c_scoped_true_render,
5925
- async_componentvue_type_template_id_51f0233c_scoped_true_staticRenderFns,
5979
+ async_componentvue_type_template_id_8b78c8b6_scoped_true_render,
5980
+ async_componentvue_type_template_id_8b78c8b6_scoped_true_staticRenderFns,
5926
5981
  false,
5927
5982
  null,
5928
- "51f0233c",
5983
+ "8b78c8b6",
5929
5984
  null
5930
5985
 
5931
5986
  )
@@ -6194,6 +6249,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
6194
6249
 
6195
6250
  var isIE = navigator.userAgent.indexOf('MSIE') != -1;
6196
6251
  var log = util["a" /* default */].getParams('console');
6252
+ var appCode = util["a" /* default */].getParams('appCode');
6197
6253
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
6198
6254
  name: 'EsMain',
6199
6255
  inheritAttrs: false,
@@ -6231,7 +6287,12 @@ var log = util["a" /* default */].getParams('console');
6231
6287
  type: String,
6232
6288
  default: ''
6233
6289
  },
6234
- param: Object,
6290
+ param: {
6291
+ type: Object,
6292
+ default: function _default() {
6293
+ return {};
6294
+ }
6295
+ },
6235
6296
  header: {
6236
6297
  type: Boolean,
6237
6298
  default: true
@@ -6336,7 +6397,8 @@ var log = util["a" /* default */].getParams('console');
6336
6397
  loadHomePage: {
6337
6398
  type: [Boolean, String],
6338
6399
  default: true
6339
- }
6400
+ },
6401
+ appCode: String
6340
6402
  },
6341
6403
  computed: {
6342
6404
  showHeader: function showHeader() {
@@ -6446,6 +6508,9 @@ var log = util["a" /* default */].getParams('console');
6446
6508
  },
6447
6509
  isConsole: function isConsole() {
6448
6510
  return log ? true : this.console;
6511
+ },
6512
+ menuCode: function menuCode() {
6513
+ return appCode || this.appCode;
6449
6514
  }
6450
6515
  },
6451
6516
  watch: {
@@ -6827,8 +6892,12 @@ var log = util["a" /* default */].getParams('console');
6827
6892
  this.color = unescape(results[i].color).toLowerCase();
6828
6893
  }
6829
6894
  if (i === 'subsystemExtend' && results[i].webPageWatermark) {
6830
- util["a" /* default */].win.top.webPageWatermark = results[i].webPageWatermark;
6831
- util["a" /* default */].watermark(results[i].webPageWatermark);
6895
+ try {
6896
+ util["a" /* default */].win.top.webPageWatermark = results[i].webPageWatermark;
6897
+ util["a" /* default */].watermark(results[i].webPageWatermark);
6898
+ } catch (error) {
6899
+ util["a" /* default */].win.postMessage({ type: 2, content: results[i].webPageWatermark }, '*');
6900
+ }
6832
6901
  }
6833
6902
 
6834
6903
  if (i === 'subsystemExtend' && results[i].loginPage) {
@@ -6962,7 +7031,9 @@ var log = util["a" /* default */].getParams('console');
6962
7031
  getMenu: function getMenu() {
6963
7032
  var _this5 = this;
6964
7033
 
6965
- util["a" /* default */].ajax({ url: this.action, params: this.param ? this.param : {} }).then(function (res) {
7034
+ var param = this.menuCode ? { menuCode: this.menuCode } : {};
7035
+ var params = _extends({}, this.param, param);
7036
+ util["a" /* default */].ajax({ url: this.action, params: params }).then(function (res) {
6966
7037
  if (res.rCode === 0) {
6967
7038
  if (res.results && res.results.length) {
6968
7039
  _this5.menus = JSON.parse(JSON.stringify(res.results));
@@ -7839,32 +7910,36 @@ var log = util["a" /* default */].getParams('console');
7839
7910
  _this13.$confirm(msg, btn).then(function () {
7840
7911
  util["a" /* default */].removeStorage(['Authorization', 'token', 'ssId', 'userId', 'userName', 'auth', 'deviceUnique', 'menus', 'useCaseCodes', 'mainConfig', 'jump']);
7841
7912
  var loginPage = util["a" /* default */].getStorage('login') || util["a" /* default */].getStorage('loginPage');
7842
- if (loginPage) {
7843
- var src = void 0;
7844
- if (!util["a" /* default */].startWith(loginPage, ['http', '/'], true)) {
7845
- var pathname = util["a" /* default */].win.top.location.pathname;
7846
- if (pathname !== '/') {
7847
- pathname = pathname.split('/');
7848
- pathname.splice(pathname.length - 1);
7849
- pathname = pathname.join('/');
7850
- src = pathname + '/' + loginPage.replace('./', '');
7913
+ try {
7914
+ if (loginPage) {
7915
+ var src = void 0;
7916
+ if (!util["a" /* default */].startWith(loginPage, ['http', '/'], true)) {
7917
+ var pathname = util["a" /* default */].win.top.location.pathname;
7918
+ if (pathname !== '/') {
7919
+ pathname = pathname.split('/');
7920
+ pathname.splice(pathname.length - 1);
7921
+ pathname = pathname.join('/');
7922
+ src = pathname + '/' + loginPage.replace('./', '');
7923
+ } else {
7924
+ src = pathname + loginPage.replace('./', '');
7925
+ }
7851
7926
  } else {
7852
- src = pathname + loginPage.replace('./', '');
7927
+ src = loginPage;
7853
7928
  }
7929
+ util["a" /* default */].win.top.location.href = src;
7930
+ } else if (util["a" /* default */].win.top.location.href.indexOf('main.html') > -1) {
7931
+ util["a" /* default */].win.top.location.href = './login.html';
7854
7932
  } else {
7855
- src = loginPage;
7856
- }
7857
- util["a" /* default */].win.top.location.href = src;
7858
- } else if (util["a" /* default */].win.top.location.href.indexOf('main.html') > -1) {
7859
- util["a" /* default */].win.top.location.href = './login.html';
7860
- } else {
7861
- var hash = util["a" /* default */].win.top.location.hash;
7862
- if (hash) {
7863
- var len = util["a" /* default */].win.top.location.href.indexOf(hash);
7864
- util["a" /* default */].win.top.location.href = util["a" /* default */].win.location.href.slice(0, len) + '#/login';
7865
- } else {
7866
- util["a" /* default */].win.top.location.href = '/login.html';
7933
+ var hash = util["a" /* default */].win.top.location.hash;
7934
+ if (hash) {
7935
+ var len = util["a" /* default */].win.top.location.href.indexOf(hash);
7936
+ util["a" /* default */].win.top.location.href = util["a" /* default */].win.location.href.slice(0, len) + '#/login';
7937
+ } else {
7938
+ util["a" /* default */].win.top.location.href = '/login.html';
7939
+ }
7867
7940
  }
7941
+ } catch (error) {
7942
+ util["a" /* default */].win.postMessage({ type: 1 }, '*');
7868
7943
  }
7869
7944
  }).catch(function (e) {
7870
7945
  sessionStorage.removeItem('remind');
@@ -7884,8 +7959,15 @@ var log = util["a" /* default */].getParams('console');
7884
7959
  src = pathname + url.replace('./', '/');
7885
7960
  }
7886
7961
  if (name) {
7887
- var w = width ? width : util["a" /* default */].win.top.screen.availWidth - 10;
7888
- var h = height ? height : util["a" /* default */].win.top.screen.availHeight - 60;
7962
+ var w = 0;
7963
+ var h = 0;
7964
+ try {
7965
+ w = width ? width : util["a" /* default */].win.top.screen.availWidth - 10;
7966
+ h = height ? height : util["a" /* default */].win.top.screen.availHeight - 60;
7967
+ } catch (error) {
7968
+ w = width ? width : util["a" /* default */].win.screen.availWidth - 10;
7969
+ h = height ? height : util["a" /* default */].win.screen.availHeight - 60;
7970
+ }
7889
7971
  return util["a" /* default */].win.open(src, name, 'width=' + w + 'px,height=' + h + 'px,resizable=yes,status=yes,menubar=no,scrollbars=yes');
7890
7972
  } else {
7891
7973
  return util["a" /* default */].win.open(src);