eoss-ui 0.5.43 → 0.5.45

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 (138) hide show
  1. package/CHANGELOG.md +929 -0
  2. package/README.md +18 -0
  3. package/lib/button-group.js +136 -69
  4. package/lib/button.js +146 -72
  5. package/lib/checkbox-group.js +132 -67
  6. package/lib/data-table-form.js +142 -74
  7. package/lib/data-table.js +225 -104
  8. package/lib/date-picker.js +132 -67
  9. package/lib/dialog.js +145 -71
  10. package/lib/eoss-ui.common.js +717 -414
  11. package/lib/flow-group.js +157 -74
  12. package/lib/flow-list.js +136 -69
  13. package/lib/flow.js +185 -99
  14. package/lib/form.js +141 -69
  15. package/lib/handle-user.js +142 -70
  16. package/lib/handler.js +165 -93
  17. package/lib/index.js +1 -1
  18. package/lib/input-number.js +132 -67
  19. package/lib/input.js +132 -67
  20. package/lib/login.js +165 -97
  21. package/lib/main.js +258 -153
  22. package/lib/nav.js +132 -67
  23. package/lib/page.js +132 -67
  24. package/lib/player.js +132 -67
  25. package/lib/qr-code.js +132 -67
  26. package/lib/radio-group.js +132 -67
  27. package/lib/retrial-auth.js +144 -71
  28. package/lib/select-ganged.js +132 -67
  29. package/lib/select.js +132 -67
  30. package/lib/selector-panel.js +147 -74
  31. package/lib/selector.js +132 -67
  32. package/lib/sizer.js +132 -67
  33. package/lib/steps.js +132 -67
  34. package/lib/switch.js +132 -67
  35. package/lib/table-form.js +139 -72
  36. package/lib/tabs.js +135 -69
  37. package/lib/theme-chalk/data-table.css +1 -1
  38. package/lib/theme-chalk/index.css +1 -1
  39. package/lib/theme-chalk/toolbar.css +1 -1
  40. package/lib/tips.js +132 -67
  41. package/lib/toolbar.js +7 -1
  42. package/lib/tree-group.js +167 -71
  43. package/lib/tree.js +132 -67
  44. package/lib/upload.js +143 -78
  45. package/lib/utils/util.js +132 -67
  46. package/lib/wujie.js +132 -67
  47. package/lib/wxlogin.js +132 -67
  48. package/package.json +2 -2
  49. package/packages/button/src/main.vue +14 -5
  50. package/packages/button-group/src/main.vue +2 -0
  51. package/packages/data-table/src/column.vue +4 -0
  52. package/packages/data-table/src/main.vue +65 -26
  53. package/packages/data-table-form/src/tbody.vue +3 -0
  54. package/packages/dialog/src/main.vue +11 -2
  55. package/packages/flow/src/component/CustomPreset.vue +14 -7
  56. package/packages/flow/src/component/FileList.vue +4 -2
  57. package/packages/flow/src/component/Preset.vue +11 -13
  58. package/packages/flow/src/form.vue +5 -4
  59. package/packages/flow/src/main.vue +7 -7
  60. package/packages/flow/src/table.vue +8 -1
  61. package/packages/flow-group/src/main.vue +23 -5
  62. package/packages/form/src/main.vue +12 -0
  63. package/packages/form/src/table.vue +2 -0
  64. package/packages/handle-user/src/main.vue +8 -1
  65. package/packages/handler/src/main.vue +35 -28
  66. package/packages/login/src/main.vue +35 -31
  67. package/packages/main/src/async-component/index.vue +4 -2
  68. package/packages/main/src/main.vue +70 -31
  69. package/packages/main/src/userinfo.vue +29 -25
  70. package/packages/retrial-auth/src/main.vue +10 -2
  71. package/packages/selector-panel/src/selection.vue +6 -0
  72. package/packages/tabs/src/main.vue +1 -0
  73. package/packages/theme-chalk/lib/base.css +1 -0
  74. package/packages/theme-chalk/lib/button-group.css +1 -0
  75. package/packages/theme-chalk/lib/button.css +1 -0
  76. package/packages/theme-chalk/lib/card.css +1 -0
  77. package/packages/theme-chalk/lib/cascader.css +0 -0
  78. package/packages/theme-chalk/lib/checkbox-group.css +1 -0
  79. package/packages/theme-chalk/lib/clients.css +1 -0
  80. package/packages/theme-chalk/lib/data-table-form.css +1 -0
  81. package/packages/theme-chalk/lib/data-table.css +1 -0
  82. package/packages/theme-chalk/lib/date-picker.css +1 -0
  83. package/packages/theme-chalk/lib/dialog.css +1 -0
  84. package/packages/theme-chalk/lib/enterprise.css +1 -0
  85. package/packages/theme-chalk/lib/error-page.css +1 -0
  86. package/packages/theme-chalk/lib/flow-chart.css +0 -0
  87. package/packages/theme-chalk/lib/flow-group.css +1 -0
  88. package/packages/theme-chalk/lib/flow-list.css +1 -0
  89. package/packages/theme-chalk/lib/flow.css +1 -0
  90. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  91. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  92. package/packages/theme-chalk/lib/form.css +1 -0
  93. package/packages/theme-chalk/lib/handle-user.css +1 -0
  94. package/packages/theme-chalk/lib/handler.css +1 -0
  95. package/packages/theme-chalk/lib/icon.css +1 -0
  96. package/packages/theme-chalk/lib/icons.css +1 -0
  97. package/packages/theme-chalk/lib/index.css +1 -0
  98. package/packages/theme-chalk/lib/input-number.css +0 -0
  99. package/packages/theme-chalk/lib/input.css +1 -0
  100. package/packages/theme-chalk/lib/label.css +1 -0
  101. package/packages/theme-chalk/lib/layout.css +1 -0
  102. package/packages/theme-chalk/lib/login.css +1 -0
  103. package/packages/theme-chalk/lib/main.css +1 -0
  104. package/packages/theme-chalk/lib/mainComp.css +0 -0
  105. package/packages/theme-chalk/lib/menu.css +1 -0
  106. package/packages/theme-chalk/lib/nav.css +1 -0
  107. package/packages/theme-chalk/lib/notify.css +0 -0
  108. package/packages/theme-chalk/lib/page.css +1 -0
  109. package/packages/theme-chalk/lib/pagination.css +1 -0
  110. package/packages/theme-chalk/lib/player.css +1 -0
  111. package/packages/theme-chalk/lib/qr-code.css +1 -0
  112. package/packages/theme-chalk/lib/radio-group.css +1 -0
  113. package/packages/theme-chalk/lib/retrial-auth.css +1 -0
  114. package/packages/theme-chalk/lib/select-ganged.css +1 -0
  115. package/packages/theme-chalk/lib/select.css +1 -0
  116. package/packages/theme-chalk/lib/selector-panel.css +1 -0
  117. package/packages/theme-chalk/lib/selector.css +1 -0
  118. package/packages/theme-chalk/lib/sizer.css +1 -0
  119. package/packages/theme-chalk/lib/steps.css +1 -0
  120. package/packages/theme-chalk/lib/switch.css +1 -0
  121. package/packages/theme-chalk/lib/table-form.css +0 -0
  122. package/packages/theme-chalk/lib/tabs-panel.css +0 -0
  123. package/packages/theme-chalk/lib/tabs.css +1 -0
  124. package/packages/theme-chalk/lib/tips.css +1 -0
  125. package/packages/theme-chalk/lib/toolbar.css +1 -0
  126. package/packages/theme-chalk/lib/tree-group.css +1 -0
  127. package/packages/theme-chalk/lib/tree.css +1 -0
  128. package/packages/theme-chalk/lib/upload.css +1 -0
  129. package/packages/theme-chalk/lib/wujie.css +0 -0
  130. package/packages/theme-chalk/lib/wxlogin.css +1 -0
  131. package/packages/theme-chalk/src/data-table.scss +6 -0
  132. package/packages/theme-chalk/src/toolbar.scss +3 -0
  133. package/packages/toolbar/src/main.vue +10 -1
  134. package/packages/tree-group/src/main.vue +36 -2
  135. package/packages/upload/src/main.vue +6 -6
  136. package/src/index.js +1 -1
  137. package/src/utils/util.js +148 -80
  138. 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)) {
@@ -1233,6 +1249,21 @@ var getHour = function getHour(datetime) {
1233
1249
  return datetimeObj.getHours();
1234
1250
  };
1235
1251
 
1252
+ /**
1253
+ * getMyWinTop
1254
+ * @desc 获取同域的top窗口
1255
+ * @param {object} wind - window对象
1256
+ **/
1257
+ var getMyWinTop = function getMyWinTop(wind) {
1258
+ wind = wind ? wind : win;
1259
+ try {
1260
+ wind.parent.document;
1261
+ return getMyWinTop(wind.parent);
1262
+ } catch (error) {
1263
+ return wind;
1264
+ }
1265
+ };
1266
+
1236
1267
  /**
1237
1268
  * getWeekNumber
1238
1269
  * @desc 当年第几周
@@ -1987,7 +2018,12 @@ var isLogined = function isLogined(_ref8) {
1987
2018
  }).catch(function () {});
1988
2019
  return;
1989
2020
  }
1990
- var pathname = win.top.location.pathname;
2021
+ var pathname = '';
2022
+ try {
2023
+ pathname = win.top.location.pathname;
2024
+ } catch (error) {
2025
+ pathname = win.location.pathname;
2026
+ }
1991
2027
  if (loginPage) {
1992
2028
  sessionStorage.setItem('loginPage', loginPage);
1993
2029
  if (!startWith(loginPage, ['http', '/'], true)) {
@@ -2028,22 +2064,38 @@ var isLogined = function isLogined(_ref8) {
2028
2064
  deviceUnique: results.deviceUnique
2029
2065
  }
2030
2066
  });
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);
2067
+ try {
2068
+ var url = delUrlParam({
2069
+ url: win.top.location.href,
2070
+ key: ['serverId', 'authType', 'code', 'sessionId']
2071
+ });
2072
+ win.top.location.href = url;
2073
+ setTimeout(function () {
2074
+ win.top.location.reload();
2075
+ }, 200);
2076
+ } catch (error) {
2077
+ var _url2 = delUrlParam({
2078
+ url: win.location.href,
2079
+ key: ['serverId', 'authType', 'code', 'sessionId']
2080
+ });
2081
+ win.location.href = _url2;
2082
+ setTimeout(function () {
2083
+ win.location.reload();
2084
+ }, 200);
2085
+ }
2039
2086
  break;
2040
2087
  case 1:
2041
2088
  break;
2042
2089
  case 2:
2043
2090
  break;
2044
2091
  case 3:
2045
- var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.top.location.href));
2046
- win.top.location.href = href;
2092
+ try {
2093
+ var href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.top.location.href));
2094
+ win.top.location.href = href;
2095
+ } catch (error) {
2096
+ var _href = results.authorizeUrl.replace('{redirectUri}', encodeURIComponent(win.location.href));
2097
+ win.location.href = _href;
2098
+ }
2047
2099
  break;
2048
2100
  case 4:
2049
2101
  eoss_element__WEBPACK_IMPORTED_MODULE_5__["MessageBox"].alert(results.msg ? results.msg : '账号未绑定,账号密码登录后自动绑定!', '提示', {
@@ -2051,14 +2103,18 @@ var isLogined = function isLogined(_ref8) {
2051
2103
  type: 'error',
2052
2104
  callback: function callback() {
2053
2105
  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');
2106
+ try {
2107
+ if (loginPage) {
2108
+ win.top.location.replace(loginPage);
2109
+ } else if (document.referrer) {
2110
+ win.top.location.replace(document.referrer);
2111
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
2112
+ win.top.location.href = './login.html';
2113
+ } else {
2114
+ next('/login');
2115
+ }
2116
+ } catch (error) {
2117
+ win.postMessage({ type: 1 }, '*');
2062
2118
  }
2063
2119
  }
2064
2120
  });
@@ -2070,14 +2126,18 @@ var isLogined = function isLogined(_ref8) {
2070
2126
  confirmButtonText: '确定',
2071
2127
  type: 'error',
2072
2128
  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');
2129
+ try {
2130
+ if (loginPage) {
2131
+ win.top.location.replace(loginPage);
2132
+ } else if (document.referrer) {
2133
+ win.top.location.replace(document.referrer);
2134
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
2135
+ win.top.location.href = './login.html';
2136
+ } else {
2137
+ next('/login');
2138
+ }
2139
+ } catch (error) {
2140
+ win.postMessage({ type: 1 }, '*');
2081
2141
  }
2082
2142
  }
2083
2143
  });
@@ -2090,14 +2150,18 @@ var isLogined = function isLogined(_ref8) {
2090
2150
  next();
2091
2151
  }
2092
2152
  } 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');
2153
+ try {
2154
+ if (loginPage) {
2155
+ win.top.location.replace(loginPage);
2156
+ } else if (document.referrer) {
2157
+ win.top.location.replace(document.referrer);
2158
+ } else if (win.top.location.href.indexOf('main.html') > -1) {
2159
+ win.top.location.href = './login.html';
2160
+ } else {
2161
+ next('/login');
2162
+ }
2163
+ } catch (error) {
2164
+ win.postMessage({ type: 1 }, '*');
2101
2165
  }
2102
2166
  }
2103
2167
  }
@@ -2527,30 +2591,30 @@ var setStorage = function setStorage(_ref14) {
2527
2591
  if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
2528
2592
  value = JSON.stringify(value);
2529
2593
  }
2530
- if (type === undefined || type === 'sessionStorage') {
2594
+ if (type === 'localStorage') {
2531
2595
  if (typeof key === 'string') {
2532
- sessionStorage.setItem(key, value);
2596
+ localStorage.setItem(key, value);
2533
2597
  } else if (Array.isArray(key)) {
2534
2598
  for (var i in key) {
2535
- sessionStorage.setItem(key[i], value);
2599
+ localStorage.setItem(key[i], value);
2536
2600
  }
2537
2601
  } else {
2538
2602
  for (var _i6 in key) {
2539
2603
  var val = _typeof(key[_i6]) === 'object' ? JSON.stringify(key[_i6]) : key[_i6];
2540
- sessionStorage.setItem(_i6, val);
2604
+ localStorage.setItem(_i6, val);
2541
2605
  }
2542
2606
  }
2543
2607
  } else {
2544
2608
  if (typeof key === 'string') {
2545
- localStorage.setItem(key, value);
2609
+ sessionStorage.setItem(key, value);
2546
2610
  } else if (Array.isArray(key)) {
2547
2611
  for (var _i7 in key) {
2548
- localStorage.setItem(key[_i7], value);
2612
+ sessionStorage.setItem(key[_i7], value);
2549
2613
  }
2550
2614
  } else {
2551
2615
  for (var _i8 in key) {
2552
2616
  var _val = _typeof(key[_i8]) === 'object' ? JSON.stringify(key[_i8]) : key[_i8];
2553
- localStorage.setItem(_i8, _val);
2617
+ sessionStorage.setItem(_i8, _val);
2554
2618
  }
2555
2619
  }
2556
2620
  }
@@ -2953,6 +3017,7 @@ var watermark = function watermark(option) {
2953
3017
  getCurrentDate: getCurrentDate,
2954
3018
  getCurrentDateTime: getCurrentDateTime,
2955
3019
  getHour: getHour,
3020
+ getMyWinTop: getMyWinTop,
2956
3021
  getWeekNumber: getWeekNumber,
2957
3022
  getLength: getLength,
2958
3023
  getMainConfig: getMainConfig,
@@ -3683,8 +3748,8 @@ module.exports = require("vue");
3683
3748
  // ESM COMPAT FLAG
3684
3749
  __webpack_require__.r(__webpack_exports__);
3685
3750
 
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 () {
3751
+ // 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=76df6f7a&
3752
+ var mainvue_type_template_id_76df6f7a_render = function () {
3688
3753
  var _vm = this
3689
3754
  var _h = _vm.$createElement
3690
3755
  var _c = _vm._self._c || _h
@@ -3704,6 +3769,7 @@ var mainvue_type_template_id_85146f6a_render = function () {
3704
3769
  staticClass: "es-data-table",
3705
3770
  attrs: {
3706
3771
  "label-width": "0",
3772
+ "element-loading-background": "rgba(0, 0, 0, 0.65)",
3707
3773
  model: _vm.tag === "div" ? "" : _vm.datas,
3708
3774
  "element-loading-text": _vm.tableLoadingText,
3709
3775
  },
@@ -3727,14 +3793,18 @@ var mainvue_type_template_id_85146f6a_render = function () {
3727
3793
  },
3728
3794
  false
3729
3795
  ),
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
- }
3796
+ Object.assign(
3797
+ {},
3798
+ {
3799
+ click: _vm.handleClick,
3800
+ search: _vm.hanleSearch,
3801
+ submit: _vm.hanleSubmit,
3802
+ tabs: _vm.handleTabs,
3803
+ reset: _vm.hanleReset,
3804
+ cancel: _vm.hanleCancel,
3805
+ },
3806
+ _vm.toolbars.events || {}
3807
+ )
3738
3808
  )
3739
3809
  )
3740
3810
  : _vm._e(),
@@ -3776,6 +3846,8 @@ var mainvue_type_template_id_85146f6a_render = function () {
3776
3846
  ? _vm.tableHeight
3777
3847
  : undefined,
3778
3848
  border: _vm.border,
3849
+ infiniteScroll: _vm.getTableData,
3850
+ infiniteScrollDisabled: _vm.infiniteDisabled,
3779
3851
  }),
3780
3852
  false
3781
3853
  ),
@@ -3898,7 +3970,16 @@ var mainvue_type_template_id_85146f6a_render = function () {
3898
3970
  ],
3899
3971
  2
3900
3972
  ),
3901
- _vm.page
3973
+ _vm.infiniteScroll
3974
+ ? _c("div", { staticClass: "es-table-page es-loading-page" }, [
3975
+ _c("span", [
3976
+ _vm._v("共" + _vm._s(_vm.config.totalCount) + "条,"),
3977
+ ]),
3978
+ _c("span", [
3979
+ _vm._v("已加载" + _vm._s(_vm.datas.length) + "条"),
3980
+ ]),
3981
+ ])
3982
+ : _vm.page
3902
3983
  ? _c(
3903
3984
  "es-pagination",
3904
3985
  _vm._g(
@@ -3934,10 +4015,10 @@ var mainvue_type_template_id_85146f6a_render = function () {
3934
4015
  )
3935
4016
  }
3936
4017
  var staticRenderFns = []
3937
- mainvue_type_template_id_85146f6a_render._withStripped = true
4018
+ mainvue_type_template_id_76df6f7a_render._withStripped = true
3938
4019
 
3939
4020
 
3940
- // CONCATENATED MODULE: ./packages/data-table/src/main.vue?vue&type=template&id=85146f6a&
4021
+ // CONCATENATED MODULE: ./packages/data-table/src/main.vue?vue&type=template&id=76df6f7a&
3941
4022
 
3942
4023
  // EXTERNAL MODULE: ./src/config/api.js
3943
4024
  var api = __webpack_require__(1);
@@ -3985,8 +4066,8 @@ childrenvue_type_template_id_29bcbc72_render._withStripped = true
3985
4066
 
3986
4067
  // CONCATENATED MODULE: ./packages/data-table/src/children.vue?vue&type=template&id=29bcbc72&
3987
4068
 
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 () {
4069
+ // 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&
4070
+ var columnvue_type_template_id_00e33786_render = function () {
3990
4071
  var _vm = this
3991
4072
  var _h = _vm.$createElement
3992
4073
  var _c = _vm._self._c || _h
@@ -4704,11 +4785,11 @@ var columnvue_type_template_id_84eb4d70_render = function () {
4704
4785
  2
4705
4786
  )
4706
4787
  }
4707
- var columnvue_type_template_id_84eb4d70_staticRenderFns = []
4708
- columnvue_type_template_id_84eb4d70_render._withStripped = true
4788
+ var columnvue_type_template_id_00e33786_staticRenderFns = []
4789
+ columnvue_type_template_id_00e33786_render._withStripped = true
4709
4790
 
4710
4791
 
4711
- // CONCATENATED MODULE: ./packages/data-table/src/column.vue?vue&type=template&id=84eb4d70&
4792
+ // CONCATENATED MODULE: ./packages/data-table/src/column.vue?vue&type=template&id=00e33786&
4712
4793
 
4713
4794
  // EXTERNAL MODULE: external "babel-runtime/regenerator"
4714
4795
  var regenerator_ = __webpack_require__(12);
@@ -5483,10 +5564,12 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
5483
5564
  handleBlur: function handleBlur(data) {
5484
5565
  this.events && this.events.blur && this.events.blur(data);
5485
5566
  this.$emit('formBlur', data);
5567
+ this.$emit('form-blur', data);
5486
5568
  },
5487
5569
  handleFocus: function handleFocus(data) {
5488
5570
  this.events && this.events.focus && this.events.focus(data);
5489
5571
  this.$emit('formFocus', data);
5572
+ this.$emit('form-focus', data);
5490
5573
  },
5491
5574
  handleChange: function handleChange(data) {
5492
5575
  var _this3 = this;
@@ -5543,9 +5626,11 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, a
5543
5626
  }
5544
5627
  this.events && this.events.change && this.events.change(data);
5545
5628
  this.$emit('formChange', data);
5629
+ this.$emit('form-change', data);
5546
5630
  },
5547
5631
  handleClick: function handleClick(data) {
5548
5632
  this.$emit('handleClick', data);
5633
+ this.$emit('handle-click', data);
5549
5634
  },
5550
5635
  formatDate: function formatDate(date, fmt) {
5551
5636
  return util["a" /* default */].formatDate(date, fmt);
@@ -5567,8 +5652,8 @@ var componentNormalizer = __webpack_require__(3);
5567
5652
 
5568
5653
  var component = Object(componentNormalizer["a" /* default */])(
5569
5654
  src_columnvue_type_script_lang_js_,
5570
- columnvue_type_template_id_84eb4d70_render,
5571
- columnvue_type_template_id_84eb4d70_staticRenderFns,
5655
+ columnvue_type_template_id_00e33786_render,
5656
+ columnvue_type_template_id_00e33786_staticRenderFns,
5572
5657
  false,
5573
5658
  null,
5574
5659
  null,
@@ -6023,6 +6108,14 @@ var mainvue_type_script_lang_js_components, _watch;
6023
6108
  //
6024
6109
  //
6025
6110
  //
6111
+ //
6112
+ //
6113
+ //
6114
+ //
6115
+ //
6116
+ //
6117
+ //
6118
+ //
6026
6119
 
6027
6120
 
6028
6121
 
@@ -6247,21 +6340,16 @@ var mainvue_type_script_lang_js_components, _watch;
6247
6340
  }
6248
6341
  },
6249
6342
  rowData: [Object, Boolean],
6250
- least: {
6251
- type: Boolean,
6252
- default: false
6253
- },
6343
+ least: Boolean,
6254
6344
  //保留搜索参数
6255
- retainSearh: {
6256
- type: Boolean,
6257
- default: false
6258
- }
6345
+ retainSearh: Boolean,
6346
+ infiniteScroll: Boolean
6259
6347
  },
6260
6348
  data: function data() {
6261
6349
  return {
6262
6350
  requests: [],
6263
6351
  theadData: [],
6264
- list: null,
6352
+ list: [],
6265
6353
  tableLoading: this.loading,
6266
6354
  tableLoadingText: '加载中...',
6267
6355
  isFirsetCheck: false,
@@ -6282,7 +6370,8 @@ var mainvue_type_script_lang_js_components, _watch;
6282
6370
  options: {},
6283
6371
  icon: true,
6284
6372
  show: true,
6285
- sysCodes: []
6373
+ sysCodes: [],
6374
+ infiniteDisabled: this.infiniteScroll
6286
6375
  };
6287
6376
  },
6288
6377
 
@@ -6305,13 +6394,19 @@ var mainvue_type_script_lang_js_components, _watch;
6305
6394
  });
6306
6395
  }
6307
6396
  if (this.numbers) {
6397
+ var index = 1;
6398
+ if (this.infiniteScroll) {
6399
+ index = typeof this.index == 'boolean' ? 1 : this.index;
6400
+ } else if (this.index || this.index === 0) {
6401
+ index = this.index === true ? (this.config.pageNum - 1) * this.config.pageSize + 1 : this.index;
6402
+ }
6308
6403
  thead.push({
6309
6404
  type: 'index',
6310
6405
  label: '序号',
6311
6406
  width: '70',
6312
6407
  align: 'center',
6313
6408
  fixed: 'left',
6314
- index: this.index === true ? (this.config.pageNum - 1) * this.config.pageSize + 1 : this.index === false ? 1 : this.index
6409
+ index: index
6315
6410
  });
6316
6411
  }
6317
6412
  if (this.theadData.length) {
@@ -6329,10 +6424,10 @@ var mainvue_type_script_lang_js_components, _watch;
6329
6424
  get: function get() {
6330
6425
  var _this = this;
6331
6426
 
6332
- if (this.list) {
6427
+ if (this.list && this.list.length) {
6333
6428
  return this.list;
6334
6429
  }
6335
- if (this.page && this.data && this.data.length && this.config.totalCount < this.data.length + 1) {
6430
+ if (this.page && this.data && this.data.length && this.config.totalCount < this.data.length + 2) {
6336
6431
  this.config.totalCount = this.data.length - this.lose;
6337
6432
  return this.data.filter(function (item, index) {
6338
6433
  return index > (_this.config.pageNum - 1) * _this.config.pageSize - 1 && index < _this.config.pageNum * _this.config.pageSize;
@@ -6585,12 +6680,19 @@ var mainvue_type_script_lang_js_components, _watch;
6585
6680
  }
6586
6681
  this.data.splice(index, 0, data);
6587
6682
  this.$emit('dataChange', 'add', data);
6683
+ this.$emit('data-change', 'add', data);
6588
6684
  this.$emit('btnClick', {
6589
6685
  event: 'addRow',
6590
6686
  row: data,
6591
6687
  index: index,
6592
6688
  data: this.data
6593
6689
  });
6690
+ this.$emit('btn-click', {
6691
+ event: 'addRow',
6692
+ row: data,
6693
+ index: index,
6694
+ data: this.data
6695
+ });
6594
6696
  } else {
6595
6697
  var _index = this.data.length;
6596
6698
  if (this.page) {
@@ -6626,12 +6728,19 @@ var mainvue_type_script_lang_js_components, _watch;
6626
6728
  }
6627
6729
  this.data.splice(index, 1);
6628
6730
  this.$emit('dataChange', 'delete', data);
6731
+ this.$emit('data-change', 'delete', data);
6629
6732
  this.$emit('btnClick', {
6630
6733
  event: 'deleteRow',
6631
6734
  row: data,
6632
6735
  index: index,
6633
6736
  data: this.data
6634
6737
  });
6738
+ this.$emit('btn-click', {
6739
+ event: 'deleteRow',
6740
+ row: data,
6741
+ index: index,
6742
+ data: this.data
6743
+ });
6635
6744
  },
6636
6745
  checkSelect: function checkSelect(newVal) {
6637
6746
  var _this5 = this;
@@ -6697,7 +6806,7 @@ var mainvue_type_script_lang_js_components, _watch;
6697
6806
  if (!this.url) {
6698
6807
  return;
6699
6808
  }
6700
- if (first !== false) {
6809
+ if (first !== false && !this.infiniteScroll) {
6701
6810
  this.config.pageNum = 1;
6702
6811
  }
6703
6812
  this.tableLoadingText = '加载中...';
@@ -6721,13 +6830,21 @@ var mainvue_type_script_lang_js_components, _watch;
6721
6830
  }).then(function (res) {
6722
6831
  _this7.tableLoading = false;
6723
6832
  if (res.rCode === 0 || res.status === 'success') {
6724
- _this7.$refs.oaTable && _this7.$refs.oaTable.resetScroll && _this7.$refs.oaTable.resetScroll(0, 0);
6725
6833
  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 || [];
6834
+ if (_this7.infiniteScroll) {
6835
+ _this7.list = _this7.list.concat(results.data || results.records || results.list);
6836
+ _this7.config.pageNum += 1;
6837
+ } else {
6838
+ _this7.list = results.data || results.records || results.list || [];
6839
+ _this7.$refs.oaTable && _this7.$refs.oaTable.resetScroll && _this7.$refs.oaTable.resetScroll(0, 0);
6840
+ }
6727
6841
  _this7.config.totalCount = results.count || results.total || results.totalCount;
6728
6842
  _this7.checked && _this7.$nextTick(function () {
6729
6843
  _this7.checkSelect(_this7.checked);
6730
6844
  });
6845
+ if (_this7.infiniteScroll && _this7.config.totalCount === _this7.list.length) {
6846
+ _this7.infiniteDisabled = true;
6847
+ }
6731
6848
  } else {
6732
6849
  _this7.list = [];
6733
6850
  //this.tableHeight = false;
@@ -7027,6 +7144,7 @@ var mainvue_type_script_lang_js_components, _watch;
7027
7144
  sizeChange: function sizeChange(res) {
7028
7145
  this.config.pageSize = res;
7029
7146
  this.config.pageNum = 1;
7147
+ this.checkSelect(this.checked);
7030
7148
  this.$emit('page-size-change', res);
7031
7149
  if (this.url) {
7032
7150
  this.getTableData({ where: this.wheres, first: false });
@@ -7034,6 +7152,7 @@ var mainvue_type_script_lang_js_components, _watch;
7034
7152
  },
7035
7153
  currentChange: function currentChange(res) {
7036
7154
  this.config.pageNum = res;
7155
+ this.checkSelect(this.checked);
7037
7156
  this.$emit('page-current-change', res);
7038
7157
  if (this.url) {
7039
7158
  this.getTableData({ where: this.wheres, first: false });
@@ -7041,10 +7160,12 @@ var mainvue_type_script_lang_js_components, _watch;
7041
7160
  },
7042
7161
  preClick: function preClick(res) {
7043
7162
  this.config.pageNum = res;
7163
+ this.checkSelect(this.checked);
7044
7164
  this.$emit('prev', res);
7045
7165
  },
7046
7166
  nextClick: function nextClick(res) {
7047
7167
  this.config.pageNum = res;
7168
+ this.checkSelect(this.checked);
7048
7169
  this.$emit('next', res);
7049
7170
  },
7050
7171
  hanleSearch: function hanleSearch(data) {
@@ -7220,7 +7341,7 @@ var mainvue_type_script_lang_js_components, _watch;
7220
7341
 
7221
7342
  var main_component = Object(componentNormalizer["a" /* default */])(
7222
7343
  src_mainvue_type_script_lang_js_,
7223
- mainvue_type_template_id_85146f6a_render,
7344
+ mainvue_type_template_id_76df6f7a_render,
7224
7345
  staticRenderFns,
7225
7346
  false,
7226
7347
  null,