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/data-table.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
  }
@@ -3683,8 +3732,8 @@ module.exports = require("vue");
3683
3732
  // ESM COMPAT FLAG
3684
3733
  __webpack_require__.r(__webpack_exports__);
3685
3734
 
3686
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/main.vue?vue&type=template&id=85146f6a&
3687
- var mainvue_type_template_id_85146f6a_render = function () {
3735
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/main.vue?vue&type=template&id=4d70cb63&
3736
+ var mainvue_type_template_id_4d70cb63_render = function () {
3688
3737
  var _vm = this
3689
3738
  var _h = _vm.$createElement
3690
3739
  var _c = _vm._self._c || _h
@@ -3704,6 +3753,7 @@ var mainvue_type_template_id_85146f6a_render = function () {
3704
3753
  staticClass: "es-data-table",
3705
3754
  attrs: {
3706
3755
  "label-width": "0",
3756
+ "element-loading-background": "rgba(0, 0, 0, 0.65)",
3707
3757
  model: _vm.tag === "div" ? "" : _vm.datas,
3708
3758
  "element-loading-text": _vm.tableLoadingText,
3709
3759
  },
@@ -3727,14 +3777,18 @@ var mainvue_type_template_id_85146f6a_render = function () {
3727
3777
  },
3728
3778
  false
3729
3779
  ),
3730
- {
3731
- click: _vm.handleClick,
3732
- search: _vm.hanleSearch,
3733
- submit: _vm.hanleSubmit,
3734
- tabs: _vm.handleTabs,
3735
- reset: _vm.hanleReset,
3736
- cancel: _vm.hanleCancel,
3737
- }
3780
+ Object.assign(
3781
+ {},
3782
+ {
3783
+ click: _vm.handleClick,
3784
+ search: _vm.hanleSearch,
3785
+ submit: _vm.hanleSubmit,
3786
+ tabs: _vm.handleTabs,
3787
+ reset: _vm.hanleReset,
3788
+ cancel: _vm.hanleCancel,
3789
+ },
3790
+ _vm.toolbars.events || {}
3791
+ )
3738
3792
  )
3739
3793
  )
3740
3794
  : _vm._e(),
@@ -3776,6 +3830,8 @@ var mainvue_type_template_id_85146f6a_render = function () {
3776
3830
  ? _vm.tableHeight
3777
3831
  : undefined,
3778
3832
  border: _vm.border,
3833
+ infiniteScroll: _vm.getTableData,
3834
+ infiniteScrollDisabled: _vm.infiniteDisabled,
3779
3835
  }),
3780
3836
  false
3781
3837
  ),
@@ -3898,7 +3954,16 @@ var mainvue_type_template_id_85146f6a_render = function () {
3898
3954
  ],
3899
3955
  2
3900
3956
  ),
3901
- _vm.page
3957
+ _vm.infiniteScroll
3958
+ ? _c("div", { staticClass: "es-table-page es-loading-page" }, [
3959
+ _c("span", [
3960
+ _vm._v("共" + _vm._s(_vm.config.totalCount) + "条,"),
3961
+ ]),
3962
+ _c("span", [
3963
+ _vm._v("已加载" + _vm._s(_vm.datas.length) + "条"),
3964
+ ]),
3965
+ ])
3966
+ : _vm.page
3902
3967
  ? _c(
3903
3968
  "es-pagination",
3904
3969
  _vm._g(
@@ -3934,10 +3999,10 @@ var mainvue_type_template_id_85146f6a_render = function () {
3934
3999
  )
3935
4000
  }
3936
4001
  var staticRenderFns = []
3937
- mainvue_type_template_id_85146f6a_render._withStripped = true
4002
+ mainvue_type_template_id_4d70cb63_render._withStripped = true
3938
4003
 
3939
4004
 
3940
- // CONCATENATED MODULE: ./packages/data-table/src/main.vue?vue&type=template&id=85146f6a&
4005
+ // CONCATENATED MODULE: ./packages/data-table/src/main.vue?vue&type=template&id=4d70cb63&
3941
4006
 
3942
4007
  // EXTERNAL MODULE: ./src/config/api.js
3943
4008
  var api = __webpack_require__(1);
@@ -3985,8 +4050,8 @@ childrenvue_type_template_id_29bcbc72_render._withStripped = true
3985
4050
 
3986
4051
  // CONCATENATED MODULE: ./packages/data-table/src/children.vue?vue&type=template&id=29bcbc72&
3987
4052
 
3988
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/column.vue?vue&type=template&id=84eb4d70&
3989
- var columnvue_type_template_id_84eb4d70_render = function () {
4053
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/data-table/src/column.vue?vue&type=template&id=00e33786&
4054
+ var columnvue_type_template_id_00e33786_render = function () {
3990
4055
  var _vm = this
3991
4056
  var _h = _vm.$createElement
3992
4057
  var _c = _vm._self._c || _h
@@ -4704,11 +4769,11 @@ var columnvue_type_template_id_84eb4d70_render = function () {
4704
4769
  2
4705
4770
  )
4706
4771
  }
4707
- var columnvue_type_template_id_84eb4d70_staticRenderFns = []
4708
- columnvue_type_template_id_84eb4d70_render._withStripped = true
4772
+ var columnvue_type_template_id_00e33786_staticRenderFns = []
4773
+ columnvue_type_template_id_00e33786_render._withStripped = true
4709
4774
 
4710
4775
 
4711
- // CONCATENATED MODULE: ./packages/data-table/src/column.vue?vue&type=template&id=84eb4d70&
4776
+ // CONCATENATED MODULE: ./packages/data-table/src/column.vue?vue&type=template&id=00e33786&
4712
4777
 
4713
4778
  // EXTERNAL MODULE: external "babel-runtime/regenerator"
4714
4779
  var regenerator_ = __webpack_require__(12);
@@ -5483,10 +5548,12 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
5483
5548
  handleBlur: function handleBlur(data) {
5484
5549
  this.events && this.events.blur && this.events.blur(data);
5485
5550
  this.$emit('formBlur', data);
5551
+ this.$emit('form-blur', data);
5486
5552
  },
5487
5553
  handleFocus: function handleFocus(data) {
5488
5554
  this.events && this.events.focus && this.events.focus(data);
5489
5555
  this.$emit('formFocus', data);
5556
+ this.$emit('form-focus', data);
5490
5557
  },
5491
5558
  handleChange: function handleChange(data) {
5492
5559
  var _this3 = this;
@@ -5543,9 +5610,11 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
5543
5610
  }
5544
5611
  this.events && this.events.change && this.events.change(data);
5545
5612
  this.$emit('formChange', data);
5613
+ this.$emit('form-change', data);
5546
5614
  },
5547
5615
  handleClick: function handleClick(data) {
5548
5616
  this.$emit('handleClick', data);
5617
+ this.$emit('handle-click', data);
5549
5618
  },
5550
5619
  formatDate: function formatDate(date, fmt) {
5551
5620
  return util["a" /* default */].formatDate(date, fmt);
@@ -5567,8 +5636,8 @@ var componentNormalizer = __webpack_require__(3);
5567
5636
 
5568
5637
  var component = Object(componentNormalizer["a" /* default */])(
5569
5638
  src_columnvue_type_script_lang_js_,
5570
- columnvue_type_template_id_84eb4d70_render,
5571
- columnvue_type_template_id_84eb4d70_staticRenderFns,
5639
+ columnvue_type_template_id_00e33786_render,
5640
+ columnvue_type_template_id_00e33786_staticRenderFns,
5572
5641
  false,
5573
5642
  null,
5574
5643
  null,
@@ -6023,6 +6092,14 @@ var mainvue_type_script_lang_js_components, _watch;
6023
6092
  //
6024
6093
  //
6025
6094
  //
6095
+ //
6096
+ //
6097
+ //
6098
+ //
6099
+ //
6100
+ //
6101
+ //
6102
+ //
6026
6103
 
6027
6104
 
6028
6105
 
@@ -6247,21 +6324,16 @@ var mainvue_type_script_lang_js_components, _watch;
6247
6324
  }
6248
6325
  },
6249
6326
  rowData: [Object, Boolean],
6250
- least: {
6251
- type: Boolean,
6252
- default: false
6253
- },
6327
+ least: Boolean,
6254
6328
  //保留搜索参数
6255
- retainSearh: {
6256
- type: Boolean,
6257
- default: false
6258
- }
6329
+ retainSearh: Boolean,
6330
+ infiniteScroll: Boolean
6259
6331
  },
6260
6332
  data: function data() {
6261
6333
  return {
6262
6334
  requests: [],
6263
6335
  theadData: [],
6264
- list: null,
6336
+ list: [],
6265
6337
  tableLoading: this.loading,
6266
6338
  tableLoadingText: '加载中...',
6267
6339
  isFirsetCheck: false,
@@ -6282,7 +6354,8 @@ var mainvue_type_script_lang_js_components, _watch;
6282
6354
  options: {},
6283
6355
  icon: true,
6284
6356
  show: true,
6285
- sysCodes: []
6357
+ sysCodes: [],
6358
+ infiniteDisabled: this.infiniteScroll
6286
6359
  };
6287
6360
  },
6288
6361
 
@@ -6305,13 +6378,19 @@ var mainvue_type_script_lang_js_components, _watch;
6305
6378
  });
6306
6379
  }
6307
6380
  if (this.numbers) {
6381
+ var index = 1;
6382
+ if (this.infiniteScroll) {
6383
+ index = typeof this.index == 'boolean' ? 1 : this.index;
6384
+ } else if (this.index || this.index === 0) {
6385
+ index = this.index === true ? (this.config.pageNum - 1) * this.config.pageSize + 1 : this.index;
6386
+ }
6308
6387
  thead.push({
6309
6388
  type: 'index',
6310
6389
  label: '序号',
6311
6390
  width: '70',
6312
6391
  align: 'center',
6313
6392
  fixed: 'left',
6314
- index: this.index === true ? (this.config.pageNum - 1) * this.config.pageSize + 1 : this.index === false ? 1 : this.index
6393
+ index: index
6315
6394
  });
6316
6395
  }
6317
6396
  if (this.theadData.length) {
@@ -6329,10 +6408,10 @@ var mainvue_type_script_lang_js_components, _watch;
6329
6408
  get: function get() {
6330
6409
  var _this = this;
6331
6410
 
6332
- if (this.list) {
6411
+ if (this.list && this.list.length) {
6333
6412
  return this.list;
6334
6413
  }
6335
- if (this.page && this.data && this.data.length && this.config.totalCount < this.data.length + 1) {
6414
+ if (this.page && this.data && this.data.length && this.config.totalCount < this.data.length + 2) {
6336
6415
  this.config.totalCount = this.data.length - this.lose;
6337
6416
  return this.data.filter(function (item, index) {
6338
6417
  return index > (_this.config.pageNum - 1) * _this.config.pageSize - 1 && index < _this.config.pageNum * _this.config.pageSize;
@@ -6585,12 +6664,19 @@ var mainvue_type_script_lang_js_components, _watch;
6585
6664
  }
6586
6665
  this.data.splice(index, 0, data);
6587
6666
  this.$emit('dataChange', 'add', data);
6667
+ this.$emit('data-change', 'add', data);
6588
6668
  this.$emit('btnClick', {
6589
6669
  event: 'addRow',
6590
6670
  row: data,
6591
6671
  index: index,
6592
6672
  data: this.data
6593
6673
  });
6674
+ this.$emit('btn-click', {
6675
+ event: 'addRow',
6676
+ row: data,
6677
+ index: index,
6678
+ data: this.data
6679
+ });
6594
6680
  } else {
6595
6681
  var _index = this.data.length;
6596
6682
  if (this.page) {
@@ -6626,12 +6712,19 @@ var mainvue_type_script_lang_js_components, _watch;
6626
6712
  }
6627
6713
  this.data.splice(index, 1);
6628
6714
  this.$emit('dataChange', 'delete', data);
6715
+ this.$emit('data-change', 'delete', data);
6629
6716
  this.$emit('btnClick', {
6630
6717
  event: 'deleteRow',
6631
6718
  row: data,
6632
6719
  index: index,
6633
6720
  data: this.data
6634
6721
  });
6722
+ this.$emit('btn-click', {
6723
+ event: 'deleteRow',
6724
+ row: data,
6725
+ index: index,
6726
+ data: this.data
6727
+ });
6635
6728
  },
6636
6729
  checkSelect: function checkSelect(newVal) {
6637
6730
  var _this5 = this;
@@ -6688,6 +6781,7 @@ var mainvue_type_script_lang_js_components, _watch;
6688
6781
  getTableData: function getTableData(res) {
6689
6782
  var _this7 = this;
6690
6783
 
6784
+ console.log(11212);
6691
6785
  var where = void 0;
6692
6786
  var first = void 0;
6693
6787
  if (res) {
@@ -6697,7 +6791,7 @@ var mainvue_type_script_lang_js_components, _watch;
6697
6791
  if (!this.url) {
6698
6792
  return;
6699
6793
  }
6700
- if (first !== false) {
6794
+ if (first !== false && !this.infiniteScroll) {
6701
6795
  this.config.pageNum = 1;
6702
6796
  }
6703
6797
  this.tableLoadingText = '加载中...';
@@ -6721,13 +6815,21 @@ var mainvue_type_script_lang_js_components, _watch;
6721
6815
  }).then(function (res) {
6722
6816
  _this7.tableLoading = false;
6723
6817
  if (res.rCode === 0 || res.status === 'success') {
6724
- _this7.$refs.oaTable && _this7.$refs.oaTable.resetScroll && _this7.$refs.oaTable.resetScroll(0, 0);
6725
6818
  var results = _this7.parseData !== undefined ? _this7.parseData(res.results || res.data || res) : res.results || res.data;
6726
- _this7.list = results.data || results.records || results.list || [];
6819
+ if (_this7.infiniteScroll) {
6820
+ _this7.list = _this7.list.concat(results.data || results.records || results.list);
6821
+ _this7.config.pageNum += 1;
6822
+ } else {
6823
+ _this7.list = results.data || results.records || results.list || [];
6824
+ _this7.$refs.oaTable && _this7.$refs.oaTable.resetScroll && _this7.$refs.oaTable.resetScroll(0, 0);
6825
+ }
6727
6826
  _this7.config.totalCount = results.count || results.total || results.totalCount;
6728
6827
  _this7.checked && _this7.$nextTick(function () {
6729
6828
  _this7.checkSelect(_this7.checked);
6730
6829
  });
6830
+ if (_this7.infiniteScroll && _this7.config.totalCount === _this7.list.length) {
6831
+ _this7.infiniteDisabled = true;
6832
+ }
6731
6833
  } else {
6732
6834
  _this7.list = [];
6733
6835
  //this.tableHeight = false;
@@ -7027,6 +7129,7 @@ var mainvue_type_script_lang_js_components, _watch;
7027
7129
  sizeChange: function sizeChange(res) {
7028
7130
  this.config.pageSize = res;
7029
7131
  this.config.pageNum = 1;
7132
+ this.checkSelect(this.checked);
7030
7133
  this.$emit('page-size-change', res);
7031
7134
  if (this.url) {
7032
7135
  this.getTableData({ where: this.wheres, first: false });
@@ -7034,6 +7137,7 @@ var mainvue_type_script_lang_js_components, _watch;
7034
7137
  },
7035
7138
  currentChange: function currentChange(res) {
7036
7139
  this.config.pageNum = res;
7140
+ this.checkSelect(this.checked);
7037
7141
  this.$emit('page-current-change', res);
7038
7142
  if (this.url) {
7039
7143
  this.getTableData({ where: this.wheres, first: false });
@@ -7041,10 +7145,12 @@ var mainvue_type_script_lang_js_components, _watch;
7041
7145
  },
7042
7146
  preClick: function preClick(res) {
7043
7147
  this.config.pageNum = res;
7148
+ this.checkSelect(this.checked);
7044
7149
  this.$emit('prev', res);
7045
7150
  },
7046
7151
  nextClick: function nextClick(res) {
7047
7152
  this.config.pageNum = res;
7153
+ this.checkSelect(this.checked);
7048
7154
  this.$emit('next', res);
7049
7155
  },
7050
7156
  hanleSearch: function hanleSearch(data) {
@@ -7220,7 +7326,7 @@ var mainvue_type_script_lang_js_components, _watch;
7220
7326
 
7221
7327
  var main_component = Object(componentNormalizer["a" /* default */])(
7222
7328
  src_mainvue_type_script_lang_js_,
7223
- mainvue_type_template_id_85146f6a_render,
7329
+ mainvue_type_template_id_4d70cb63_render,
7224
7330
  staticRenderFns,
7225
7331
  false,
7226
7332
  null,