eoss-ui 0.5.42 → 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 (78) 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 +211 -106
  8. package/lib/date-picker.js +155 -71
  9. package/lib/dialog.js +132 -71
  10. package/lib/eoss-ui.common.js +744 -417
  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 +67 -28
  51. package/packages/data-table-form/src/tbody.vue +3 -0
  52. package/packages/date-picker/src/main.vue +48 -5
  53. package/packages/dialog/src/main.vue +14 -2
  54. package/packages/flow/src/component/CustomPreset.vue +14 -7
  55. package/packages/flow/src/component/FileList.vue +4 -2
  56. package/packages/flow/src/component/Preset.vue +11 -13
  57. package/packages/flow/src/form.vue +5 -4
  58. package/packages/flow/src/main.vue +7 -7
  59. package/packages/flow/src/table.vue +8 -1
  60. package/packages/flow-group/src/main.vue +26 -5
  61. package/packages/form/src/main.vue +12 -0
  62. package/packages/form/src/table.vue +2 -0
  63. package/packages/handle-user/src/main.vue +9 -1
  64. package/packages/handler/src/main.vue +31 -27
  65. package/packages/login/src/main.vue +35 -31
  66. package/packages/main/src/async-component/index.vue +4 -2
  67. package/packages/main/src/main.vue +62 -30
  68. package/packages/main/src/userinfo.vue +29 -25
  69. package/packages/retrial-auth/src/main.vue +12 -2
  70. package/packages/selector-panel/src/selection.vue +6 -0
  71. package/packages/tabs/src/main.vue +1 -0
  72. package/packages/theme-chalk/lib/data-table.css +1 -1
  73. package/packages/theme-chalk/lib/index.css +1 -1
  74. package/packages/theme-chalk/src/data-table.scss +6 -0
  75. package/packages/tree-group/src/main.vue +36 -2
  76. package/packages/upload/src/main.vue +15 -6
  77. package/src/index.js +1 -1
  78. package/src/utils/util.js +132 -80
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=ea89055a&
3687
- var mainvue_type_template_id_ea89055a_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_ea89055a_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_ea89055a_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_ea89055a_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_ea89055a_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_ea89055a_render = function () {
3934
3999
  )
3935
4000
  }
3936
4001
  var staticRenderFns = []
3937
- mainvue_type_template_id_ea89055a_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=ea89055a&
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,
@@ -6275,7 +6347,6 @@ var mainvue_type_script_lang_js_components, _watch;
6275
6347
  pageSize: 20,
6276
6348
  totalCount: 0
6277
6349
  },
6278
- where: {},
6279
6350
  wheres: {},
6280
6351
  tableHeight: 'auto',
6281
6352
  styles: {},
@@ -6283,7 +6354,8 @@ var mainvue_type_script_lang_js_components, _watch;
6283
6354
  options: {},
6284
6355
  icon: true,
6285
6356
  show: true,
6286
- sysCodes: []
6357
+ sysCodes: [],
6358
+ infiniteDisabled: this.infiniteScroll
6287
6359
  };
6288
6360
  },
6289
6361
 
@@ -6306,13 +6378,19 @@ var mainvue_type_script_lang_js_components, _watch;
6306
6378
  });
6307
6379
  }
6308
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
+ }
6309
6387
  thead.push({
6310
6388
  type: 'index',
6311
6389
  label: '序号',
6312
6390
  width: '70',
6313
6391
  align: 'center',
6314
6392
  fixed: 'left',
6315
- index: this.index === true ? (this.config.pageNum - 1) * this.config.pageSize + 1 : this.index === false ? 1 : this.index
6393
+ index: index
6316
6394
  });
6317
6395
  }
6318
6396
  if (this.theadData.length) {
@@ -6330,10 +6408,10 @@ var mainvue_type_script_lang_js_components, _watch;
6330
6408
  get: function get() {
6331
6409
  var _this = this;
6332
6410
 
6333
- if (this.list) {
6411
+ if (this.list && this.list.length) {
6334
6412
  return this.list;
6335
6413
  }
6336
- 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) {
6337
6415
  this.config.totalCount = this.data.length - this.lose;
6338
6416
  return this.data.filter(function (item, index) {
6339
6417
  return index > (_this.config.pageNum - 1) * _this.config.pageSize - 1 && index < _this.config.pageNum * _this.config.pageSize;
@@ -6586,12 +6664,19 @@ var mainvue_type_script_lang_js_components, _watch;
6586
6664
  }
6587
6665
  this.data.splice(index, 0, data);
6588
6666
  this.$emit('dataChange', 'add', data);
6667
+ this.$emit('data-change', 'add', data);
6589
6668
  this.$emit('btnClick', {
6590
6669
  event: 'addRow',
6591
6670
  row: data,
6592
6671
  index: index,
6593
6672
  data: this.data
6594
6673
  });
6674
+ this.$emit('btn-click', {
6675
+ event: 'addRow',
6676
+ row: data,
6677
+ index: index,
6678
+ data: this.data
6679
+ });
6595
6680
  } else {
6596
6681
  var _index = this.data.length;
6597
6682
  if (this.page) {
@@ -6627,12 +6712,19 @@ var mainvue_type_script_lang_js_components, _watch;
6627
6712
  }
6628
6713
  this.data.splice(index, 1);
6629
6714
  this.$emit('dataChange', 'delete', data);
6715
+ this.$emit('data-change', 'delete', data);
6630
6716
  this.$emit('btnClick', {
6631
6717
  event: 'deleteRow',
6632
6718
  row: data,
6633
6719
  index: index,
6634
6720
  data: this.data
6635
6721
  });
6722
+ this.$emit('btn-click', {
6723
+ event: 'deleteRow',
6724
+ row: data,
6725
+ index: index,
6726
+ data: this.data
6727
+ });
6636
6728
  },
6637
6729
  checkSelect: function checkSelect(newVal) {
6638
6730
  var _this5 = this;
@@ -6689,6 +6781,7 @@ var mainvue_type_script_lang_js_components, _watch;
6689
6781
  getTableData: function getTableData(res) {
6690
6782
  var _this7 = this;
6691
6783
 
6784
+ console.log(11212);
6692
6785
  var where = void 0;
6693
6786
  var first = void 0;
6694
6787
  if (res) {
@@ -6698,7 +6791,7 @@ var mainvue_type_script_lang_js_components, _watch;
6698
6791
  if (!this.url) {
6699
6792
  return;
6700
6793
  }
6701
- if (first !== false) {
6794
+ if (first !== false && !this.infiniteScroll) {
6702
6795
  this.config.pageNum = 1;
6703
6796
  }
6704
6797
  this.tableLoadingText = '加载中...';
@@ -6710,7 +6803,7 @@ var mainvue_type_script_lang_js_components, _watch;
6710
6803
  reqData = util["a" /* default */].extend({}, reqData, where);
6711
6804
  }
6712
6805
  if (this.retainSearh) {
6713
- reqData = util["a" /* default */].extend({}, reqData, this.where);
6806
+ reqData = util["a" /* default */].extend({}, reqData, this.wheres);
6714
6807
  }
6715
6808
  this.tableLoading = true;
6716
6809
  util["a" /* default */].ajax({
@@ -6722,13 +6815,21 @@ var mainvue_type_script_lang_js_components, _watch;
6722
6815
  }).then(function (res) {
6723
6816
  _this7.tableLoading = false;
6724
6817
  if (res.rCode === 0 || res.status === 'success') {
6725
- _this7.$refs.oaTable && _this7.$refs.oaTable.resetScroll && _this7.$refs.oaTable.resetScroll(0, 0);
6726
6818
  var results = _this7.parseData !== undefined ? _this7.parseData(res.results || res.data || res) : res.results || res.data;
6727
- _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
+ }
6728
6826
  _this7.config.totalCount = results.count || results.total || results.totalCount;
6729
6827
  _this7.checked && _this7.$nextTick(function () {
6730
6828
  _this7.checkSelect(_this7.checked);
6731
6829
  });
6830
+ if (_this7.infiniteScroll && _this7.config.totalCount === _this7.list.length) {
6831
+ _this7.infiniteDisabled = true;
6832
+ }
6732
6833
  } else {
6733
6834
  _this7.list = [];
6734
6835
  //this.tableHeight = false;
@@ -7028,6 +7129,7 @@ var mainvue_type_script_lang_js_components, _watch;
7028
7129
  sizeChange: function sizeChange(res) {
7029
7130
  this.config.pageSize = res;
7030
7131
  this.config.pageNum = 1;
7132
+ this.checkSelect(this.checked);
7031
7133
  this.$emit('page-size-change', res);
7032
7134
  if (this.url) {
7033
7135
  this.getTableData({ where: this.wheres, first: false });
@@ -7035,6 +7137,7 @@ var mainvue_type_script_lang_js_components, _watch;
7035
7137
  },
7036
7138
  currentChange: function currentChange(res) {
7037
7139
  this.config.pageNum = res;
7140
+ this.checkSelect(this.checked);
7038
7141
  this.$emit('page-current-change', res);
7039
7142
  if (this.url) {
7040
7143
  this.getTableData({ where: this.wheres, first: false });
@@ -7042,10 +7145,12 @@ var mainvue_type_script_lang_js_components, _watch;
7042
7145
  },
7043
7146
  preClick: function preClick(res) {
7044
7147
  this.config.pageNum = res;
7148
+ this.checkSelect(this.checked);
7045
7149
  this.$emit('prev', res);
7046
7150
  },
7047
7151
  nextClick: function nextClick(res) {
7048
7152
  this.config.pageNum = res;
7153
+ this.checkSelect(this.checked);
7049
7154
  this.$emit('next', res);
7050
7155
  },
7051
7156
  hanleSearch: function hanleSearch(data) {
@@ -7221,7 +7326,7 @@ var mainvue_type_script_lang_js_components, _watch;
7221
7326
 
7222
7327
  var main_component = Object(componentNormalizer["a" /* default */])(
7223
7328
  src_mainvue_type_script_lang_js_,
7224
- mainvue_type_template_id_ea89055a_render,
7329
+ mainvue_type_template_id_4d70cb63_render,
7225
7330
  staticRenderFns,
7226
7331
  false,
7227
7332
  null,