@kyfe/ks-query-table 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- ;{try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a96f0634-3328-4dfe-b7f1-2bc9275e5c5f",e._sentryDebugIdIdentifier="sentry-dbid-a96f0634-3328-4dfe-b7f1-2bc9275e5c5f")}catch(e){}};
1
+ ;{try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="87fb7dd1-659b-482d-aa7e-994ba2da68fa",e._sentryDebugIdIdentifier="sentry-dbid-87fb7dd1-659b-482d-aa7e-994ba2da68fa")}catch(e){}};
2
2
  {
3
3
  let _global =
4
4
  typeof window !== 'undefined' ?
@@ -11,7 +11,7 @@
11
11
  self :
12
12
  {};
13
13
 
14
- _global.SENTRY_RELEASE={id:"@kyfe/ks-query-table@0.0.4"};}
14
+ _global.SENTRY_RELEASE={id:"@kyfe/ks-query-table@0.0.6"};}
15
15
  (function webpackUniversalModuleDefinition(root, factory) {
16
16
  if(typeof exports === 'object' && typeof module === 'object')
17
17
  module.exports = factory();
@@ -2956,6 +2956,17 @@ module.exports = function (it) {
2956
2956
  };
2957
2957
 
2958
2958
 
2959
+ /***/ }),
2960
+
2961
+ /***/ "35c3":
2962
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2963
+
2964
+ "use strict";
2965
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_style_resources_loader_lib_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_b44e15a8_prod_lang_less_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d14f");
2966
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_style_resources_loader_lib_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_b44e15a8_prod_lang_less_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_style_resources_loader_lib_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_b44e15a8_prod_lang_less_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
2967
+ /* unused harmony reexport * */
2968
+
2969
+
2959
2970
  /***/ }),
2960
2971
 
2961
2972
  /***/ "3698":
@@ -4112,13 +4123,6 @@ function hashClear() {
4112
4123
  module.exports = hashClear;
4113
4124
 
4114
4125
 
4115
- /***/ }),
4116
-
4117
- /***/ "4c8b":
4118
- /***/ (function(module, exports, __webpack_require__) {
4119
-
4120
- // extracted by mini-css-extract-plugin
4121
-
4122
4126
  /***/ }),
4123
4127
 
4124
4128
  /***/ "4cef":
@@ -4187,6 +4191,17 @@ module.exports = {
4187
4191
  };
4188
4192
 
4189
4193
 
4194
+ /***/ }),
4195
+
4196
+ /***/ "4dd7":
4197
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
4198
+
4199
+ "use strict";
4200
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_style_resources_loader_lib_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_8b3afe8a_prod_lang_less_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6941");
4201
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_style_resources_loader_lib_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_8b3afe8a_prod_lang_less_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_style_resources_loader_lib_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_8b3afe8a_prod_lang_less_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
4202
+ /* unused harmony reexport * */
4203
+
4204
+
4190
4205
  /***/ }),
4191
4206
 
4192
4207
  /***/ "4de4":
@@ -6093,6 +6108,13 @@ module.exports = !construct || fails(function () {
6093
6108
  }) ? isConstructorLegacy : isConstructorModern;
6094
6109
 
6095
6110
 
6111
+ /***/ }),
6112
+
6113
+ /***/ "6941":
6114
+ /***/ (function(module, exports, __webpack_require__) {
6115
+
6116
+ // extracted by mini-css-extract-plugin
6117
+
6096
6118
  /***/ }),
6097
6119
 
6098
6120
  /***/ "6964":
@@ -14108,17 +14130,6 @@ $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
14108
14130
  });
14109
14131
 
14110
14132
 
14111
- /***/ }),
14112
-
14113
- /***/ "b65d":
14114
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
14115
-
14116
- "use strict";
14117
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_style_resources_loader_lib_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_55eb331e_prod_lang_less_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("e605");
14118
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_style_resources_loader_lib_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_55eb331e_prod_lang_less_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_style_resources_loader_lib_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_55eb331e_prod_lang_less_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
14119
- /* unused harmony reexport * */
14120
-
14121
-
14122
14133
  /***/ }),
14123
14134
 
14124
14135
  /***/ "b680":
@@ -18142,6 +18153,13 @@ module.exports = function (namespace, method) {
18142
18153
  };
18143
18154
 
18144
18155
 
18156
+ /***/ }),
18157
+
18158
+ /***/ "d14f":
18159
+ /***/ (function(module, exports, __webpack_require__) {
18160
+
18161
+ // extracted by mini-css-extract-plugin
18162
+
18145
18163
  /***/ }),
18146
18164
 
18147
18165
  /***/ "d173":
@@ -19931,13 +19949,6 @@ module.exports = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
19931
19949
  };
19932
19950
 
19933
19951
 
19934
- /***/ }),
19935
-
19936
- /***/ "e605":
19937
- /***/ (function(module, exports, __webpack_require__) {
19938
-
19939
- // extracted by mini-css-extract-plugin
19940
-
19941
19952
  /***/ }),
19942
19953
 
19943
19954
  /***/ "e667":
@@ -20371,17 +20382,6 @@ function nativeKeysIn(object) {
20371
20382
  module.exports = nativeKeysIn;
20372
20383
 
20373
20384
 
20374
- /***/ }),
20375
-
20376
- /***/ "ec99":
20377
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
20378
-
20379
- "use strict";
20380
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_style_resources_loader_lib_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_0e133ba2_prod_lang_less_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("4c8b");
20381
- /* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_style_resources_loader_lib_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_0e133ba2_prod_lang_less_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_11_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_11_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_11_oneOf_1_2_node_modules_less_loader_dist_cjs_js_ref_11_oneOf_1_3_node_modules_style_resources_loader_lib_index_js_ref_11_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_0e133ba2_prod_lang_less_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
20382
- /* unused harmony reexport * */
20383
-
20384
-
20385
20385
  /***/ }),
20386
20386
 
20387
20387
  /***/ "edd0":
@@ -21524,8 +21524,8 @@ var upDateLocalCache = /*#__PURE__*/function () {
21524
21524
  return _ref3.apply(this, arguments);
21525
21525
  };
21526
21526
  }();
21527
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"18e6d865-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/view/home/query-table/components/pe-table/index.vue?vue&type=template&id=0e133ba2&scoped=true
21528
- var pe_tablevue_type_template_id_0e133ba2_scoped_true_render = function render() {
21527
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"18e6d865-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/view/home/query-table/components/pe-table/index.vue?vue&type=template&id=b44e15a8&scoped=true
21528
+ var pe_tablevue_type_template_id_b44e15a8_scoped_true_render = function render() {
21529
21529
  var _vm = this,
21530
21530
  _c = _vm._self._c;
21531
21531
  return _c('div', {
@@ -21595,7 +21595,7 @@ var staticRenderFns = [function () {
21595
21595
  })]);
21596
21596
  }];
21597
21597
 
21598
- // CONCATENATED MODULE: ./src/view/home/query-table/components/pe-table/index.vue?vue&type=template&id=0e133ba2&scoped=true
21598
+ // CONCATENATED MODULE: ./src/view/home/query-table/components/pe-table/index.vue?vue&type=template&id=b44e15a8&scoped=true
21599
21599
 
21600
21600
  // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.index-of.js
21601
21601
  var es_array_index_of = __webpack_require__("c975");
@@ -22617,6 +22617,16 @@ var PE_TABLE_PROPS = {
22617
22617
  cellResizable: {
22618
22618
  type: Boolean,
22619
22619
  default: true
22620
+ },
22621
+ // 用于生成序号的页码
22622
+ pageForIndex: {
22623
+ type: Number,
22624
+ default: 1
22625
+ },
22626
+ // 是否展示分页器
22627
+ showPage: {
22628
+ type: Boolean,
22629
+ default: false
22620
22630
  }
22621
22631
  };
22622
22632
  // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"18e6d865-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/view/home/query-table/components/pe-table/row.vue?vue&type=template&id=6cb715bd&scoped=true
@@ -25443,14 +25453,16 @@ function createRenderColumnOption(_ref6) {
25443
25453
  function createTableData(_ref, indexFormat) {
25444
25454
  var data = _ref.data,
25445
25455
  columns = _ref.columns,
25446
- rowKey = _ref.rowKey;
25456
+ rowKey = _ref.rowKey,
25457
+ pageForIndex = _ref.pageForIndex,
25458
+ showPage = _ref.showPage;
25447
25459
  return (data || []).reduce(function (acc, rowData, index) {
25448
25460
  var _rowData = columns.reduce(function (row, col) {
25449
25461
  row[col.key] = rowData[col.key];
25450
25462
  return row;
25451
25463
  }, {});
25452
25464
  _rowData[rowKey] = rowData[rowKey] || '_inner_id' + index;
25453
- _rowData['$index'] = indexFormat ? indexFormat(index + 1, _rowData, rowData) : index + 1;
25465
+ _rowData['$index'] = indexFormat ? indexFormat(index + 1, _rowData, rowData) : index + 1 + (showPage ? (pageForIndex - 1) * 200 : 0);
25454
25466
  acc.push(_rowData);
25455
25467
  return acc;
25456
25468
  }, []);
@@ -26272,12 +26284,13 @@ var RowConstructor = pe_tablevue_type_script_lang_js_Vue.extend(pe_table_row);
26272
26284
  this.curMaxIndexVal = this.tableData.length;
26273
26285
  this.updateColumnsIndexWidth();
26274
26286
  // 数据变化之后,y轴归零
26275
- if (this.$props.autoResetScrollTop) {
26276
- // 重置滚动位置
26277
- this.scrollToTop();
26278
- } else {
26279
- this.renderViewportRows();
26280
- }
26287
+ // todo 外部主动调用回到顶部?
26288
+ // if (this.$props.autoResetScrollTop) {
26289
+ // // 重置滚动位置
26290
+ // this.scrollToTop()
26291
+ // } else {
26292
+ this.renderViewportRows();
26293
+ // }
26281
26294
  this.$nextTick(function () {
26282
26295
  // 滚动条发生改变
26283
26296
  _this4.refreshThumb();
@@ -26323,7 +26336,9 @@ var RowConstructor = pe_tablevue_type_script_lang_js_Vue.extend(pe_table_row);
26323
26336
  var params = {
26324
26337
  data: this.$props.data,
26325
26338
  columns: this.visibleFlatColumns,
26326
- rowKey: this.$props.rowKey
26339
+ rowKey: this.$props.rowKey,
26340
+ pageForIndex: this.pageForIndex,
26341
+ showPage: this.showPage
26327
26342
  };
26328
26343
  this.tableData = createTableData(params, this.$props.indexFormat);
26329
26344
  },
@@ -26784,6 +26799,7 @@ var RowConstructor = pe_tablevue_type_script_lang_js_Vue.extend(pe_table_row);
26784
26799
  }, 1000),
26785
26800
  scrollHiddenMore: function scrollHiddenMore() {
26786
26801
  var _this0 = this;
26802
+ if (this.isLoadingMore) return;
26787
26803
  if (this.timerMore) {
26788
26804
  this.timerMore = null;
26789
26805
  clearTimeout(this.timerMore);
@@ -26822,8 +26838,8 @@ var RowConstructor = pe_tablevue_type_script_lang_js_Vue.extend(pe_table_row);
26822
26838
  });
26823
26839
  // CONCATENATED MODULE: ./src/view/home/query-table/components/pe-table/index.vue?vue&type=script&lang=js
26824
26840
  /* harmony default export */ var components_pe_tablevue_type_script_lang_js = (pe_tablevue_type_script_lang_js);
26825
- // EXTERNAL MODULE: ./src/view/home/query-table/components/pe-table/index.vue?vue&type=style&index=0&id=0e133ba2&prod&lang=less&scoped=true
26826
- var pe_tablevue_type_style_index_0_id_0e133ba2_prod_lang_less_scoped_true = __webpack_require__("ec99");
26841
+ // EXTERNAL MODULE: ./src/view/home/query-table/components/pe-table/index.vue?vue&type=style&index=0&id=b44e15a8&prod&lang=less&scoped=true
26842
+ var pe_tablevue_type_style_index_0_id_b44e15a8_prod_lang_less_scoped_true = __webpack_require__("35c3");
26827
26843
 
26828
26844
  // CONCATENATED MODULE: ./src/view/home/query-table/components/pe-table/index.vue
26829
26845
 
@@ -26836,11 +26852,11 @@ var pe_tablevue_type_style_index_0_id_0e133ba2_prod_lang_less_scoped_true = __we
26836
26852
 
26837
26853
  var pe_table_component = normalizeComponent(
26838
26854
  components_pe_tablevue_type_script_lang_js,
26839
- pe_tablevue_type_template_id_0e133ba2_scoped_true_render,
26855
+ pe_tablevue_type_template_id_b44e15a8_scoped_true_render,
26840
26856
  staticRenderFns,
26841
26857
  false,
26842
26858
  null,
26843
- "0e133ba2",
26859
+ "b44e15a8",
26844
26860
  null
26845
26861
 
26846
26862
  )
@@ -31632,6 +31648,10 @@ function _getColumns2() {
31632
31648
  break;
31633
31649
  case 5:
31634
31650
  // 容错处理:没有返回正确的个性模板,则使用线上初始配置
31651
+ // 调试代码,用与生成demo动图
31652
+ // userArr.forEach((v, i) => {
31653
+ // v.label = '列' + (i + 1)
31654
+ // })
31635
31655
  originArr = userArr;
31636
31656
  key = createdId(userData.id); // 设置缓存为当前数据
31637
31657
  _context3.n = 6;
@@ -33482,7 +33502,6 @@ var table_horizontal_component = normalizeComponent(
33482
33502
  }
33483
33503
  });
33484
33504
  _this.isCurTableEmit = true;
33485
- _this.$bus.$emit('screenChange', 1);
33486
33505
  // this.containerPopover = this.$refs.tableHorizontal.$el
33487
33506
  _this.$nextTick(function () {
33488
33507
  requestAnimationFrame(function () {
@@ -33758,7 +33777,9 @@ var addRowLength = 500;
33758
33777
  innterDelayLoading: 300,
33759
33778
  dataFinish_timeStamp: null,
33760
33779
  // 数据返回时间
33761
- idsFinish_timeStamp: null // ids最后返回时间
33780
+ idsFinish_timeStamp: null,
33781
+ // ids最后返回时间
33782
+ isLoadingMore: false // 加载更多加载中状态
33762
33783
  };
33763
33784
  },
33764
33785
  computed: {
@@ -33777,20 +33798,31 @@ var addRowLength = 500;
33777
33798
  return;
33778
33799
  }
33779
33800
  this.loadData();
33780
- // setTimeout(() => {
33781
- // this.loadData()
33782
- // }, 50);
33783
- // setTimeout(() => {
33784
- // this.loadData()
33785
- // }, 100);
33786
- // setTimeout(() => {
33787
- // this.loadData()
33788
- // }, 110);
33789
- // setTimeout(() => {
33790
- // this.loadData()
33791
- // }, 140);
33792
33801
  },
33793
33802
  methods: {
33803
+ loadMoreData: function loadMoreData() {
33804
+ var _this = this;
33805
+ return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
33806
+ return _regenerator().w(function (_context) {
33807
+ while (1) switch (_context.n) {
33808
+ case 0:
33809
+ if (!(_this.isLoadingMore || _this.isLoading || !_this.tableData || _this.tableData.leng === 0)) {
33810
+ _context.n = 1;
33811
+ break;
33812
+ }
33813
+ return _context.a(2);
33814
+ case 1:
33815
+ _this.isLoadingMore = true;
33816
+ _this.loadData({
33817
+ page: _this.currentPage + 1,
33818
+ loadMore: true
33819
+ });
33820
+ case 2:
33821
+ return _context.a(2);
33822
+ }
33823
+ }, _callee);
33824
+ }))();
33825
+ },
33794
33826
  initDefaultData: function initDefaultData() {
33795
33827
  // 不需要响应式
33796
33828
  this.loadIdsMap = {};
@@ -33835,45 +33867,49 @@ var addRowLength = 500;
33835
33867
  },
33836
33868
  // 请求数据
33837
33869
  loadData: function loadData(options) {
33838
- var _this = this;
33839
- return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
33840
- return _regenerator().w(function (_context2) {
33841
- while (1) switch (_context2.n) {
33870
+ var _this2 = this;
33871
+ return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
33872
+ return _regenerator().w(function (_context3) {
33873
+ while (1) switch (_context3.n) {
33842
33874
  case 0:
33843
- return _context2.a(2, new Promise(/*#__PURE__*/function () {
33844
- var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(resolve, reject) {
33845
- var _this$config, url, appkey, beforeHttp, afterHttp, scrollLoad, afterSetData, firstScreenDataCompleted, now, params, beforeParams, $params, _url, _appkey, _params, serach_time_stamp, res, _res, rowTotal, rows, _t, _t2, _t3, _t4, _t5, _t6;
33846
- return _regenerator().w(function (_context) {
33847
- while (1) switch (_context.n) {
33875
+ return _context3.a(2, new Promise(/*#__PURE__*/function () {
33876
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(resolve, reject) {
33877
+ var _this2$config, url, appkey, beforeHttp, afterHttp, scrollLoad, afterSetData, firstScreenDataCompleted, now, params, beforeParams, $params, _url, _appkey, _params, serach_time_stamp, res, _res, rowTotal, rows, _t, _t2, _t3, _t4, _t5, _t6;
33878
+ return _regenerator().w(function (_context2) {
33879
+ while (1) switch (_context2.n) {
33848
33880
  case 0:
33849
- _context.p = 0;
33850
- if (!_this.disabledLoading) {
33851
- _this.isLoading = true;
33881
+ _context2.p = 0;
33882
+ if (!_this2.disabledLoading && !(options && options.loadMore)) {
33883
+ // 底部加载更多时无需表格全局loading
33884
+ _this2.isLoading = true;
33852
33885
  }
33853
- _this$config = _this.config, url = _this$config.url, appkey = _this$config.appkey, beforeHttp = _this$config.beforeHttp, afterHttp = _this$config.afterHttp, scrollLoad = _this$config.scrollLoad, afterSetData = _this$config.afterSetData, firstScreenDataCompleted = _this$config.firstScreenDataCompleted;
33886
+ _this2$config = _this2.config, url = _this2$config.url, appkey = _this2$config.appkey, beforeHttp = _this2$config.beforeHttp, afterHttp = _this2$config.afterHttp, scrollLoad = _this2$config.scrollLoad, afterSetData = _this2$config.afterSetData, firstScreenDataCompleted = _this2$config.firstScreenDataCompleted;
33854
33887
  now = new Date().valueOf();
33855
- _this.lastReqTime = now;
33888
+ _this2.lastReqTime = now;
33856
33889
 
33857
33890
  // 需要无限滚动,加载全量id
33858
- scrollLoad && _this.loadTableScrollIds(now, options);
33859
- params = {}; // 请求前,外部可处理入参
33891
+ scrollLoad && _this2.loadTableScrollIds(now, options);
33892
+ params = {
33893
+ // 默认页码200
33894
+ pageSize: _this2.config.pageSize || 200
33895
+ }; // 请求前,外部可处理入参
33860
33896
  beforeParams = {
33861
33897
  url: url,
33862
33898
  appkey: appkey,
33863
33899
  params: params
33864
33900
  }; // 合并外部return的参数
33865
33901
  if (!(typeof beforeHttp === 'function')) {
33866
- _context.n = 2;
33902
+ _context2.n = 2;
33867
33903
  break;
33868
33904
  }
33869
33905
  _t2 = _objectSpread2;
33870
33906
  _t3 = _objectSpread2({}, beforeParams);
33871
- _context.n = 1;
33907
+ _context2.n = 1;
33872
33908
  return beforeHttp(beforeParams);
33873
33909
  case 1:
33874
- _t4 = _context.v;
33910
+ _t4 = _context2.v;
33875
33911
  _t = _t2(_t3, _t4);
33876
- _context.n = 3;
33912
+ _context2.n = 3;
33877
33913
  break;
33878
33914
  case 2:
33879
33915
  _t = beforeParams;
@@ -33881,45 +33917,45 @@ var addRowLength = 500;
33881
33917
  $params = _t;
33882
33918
  _url = $params.url, _appkey = $params.appkey, _params = $params.params; // 每次请求,记录时间戳
33883
33919
  serach_time_stamp = now; // 处理分页参数
33884
- _params = _this.formatPageParams(_params, options);
33920
+ _params = _this2.formatPageParams(_params, options);
33885
33921
  // 处理排序参数
33886
- _params = _this.formatSortParams(_params, options);
33887
- _context.n = 4;
33888
- return _this.$http(_url, _appkey, _params);
33922
+ _params = _this2.formatSortParams(_params, options);
33923
+ _context2.n = 4;
33924
+ return _this2.$http(_url, _appkey, _params);
33889
33925
  case 4:
33890
- res = _context.v;
33891
- if (!(!scrollLoad && serach_time_stamp < _this.lastReqTime)) {
33892
- _context.n = 5;
33926
+ res = _context2.v;
33927
+ if (!(!scrollLoad && serach_time_stamp < _this2.lastReqTime)) {
33928
+ _context2.n = 5;
33893
33929
  break;
33894
33930
  }
33895
- return _context.a(2);
33931
+ return _context2.a(2);
33896
33932
  case 5:
33897
- if (!(serach_time_stamp && _this.lastReqTime && serach_time_stamp < _this.lastReqTime)) {
33898
- _context.n = 6;
33933
+ if (!(serach_time_stamp && _this2.lastReqTime && serach_time_stamp < _this2.lastReqTime)) {
33934
+ _context2.n = 6;
33899
33935
  break;
33900
33936
  }
33901
- return _context.a(2);
33937
+ return _context2.a(2);
33902
33938
  case 6:
33903
33939
  if (!(typeof afterHttp === 'function')) {
33904
- _context.n = 8;
33940
+ _context2.n = 8;
33905
33941
  break;
33906
33942
  }
33907
- _context.n = 7;
33943
+ _context2.n = 7;
33908
33944
  return afterHttp(res);
33909
33945
  case 7:
33910
- _t5 = _context.v;
33911
- _context.n = 9;
33946
+ _t5 = _context2.v;
33947
+ _context2.n = 9;
33912
33948
  break;
33913
33949
  case 8:
33914
33950
  _t5 = res;
33915
33951
  case 9:
33916
33952
  res = _t5;
33917
- res = _this.formatRowTotal(res);
33953
+ res = _this2.formatRowTotal(res);
33918
33954
  _res = res, rowTotal = _res.rowTotal, rows = _res.rows;
33919
- _this.setTableData({
33955
+ _this2.setTableData({
33920
33956
  rowTotal: rowTotal,
33921
33957
  rows: rows
33922
- }, now);
33958
+ }, now, options);
33923
33959
 
33924
33960
  // TODO 首屏数据设置完成
33925
33961
  typeof afterSetData === 'function' && afterSetData();
@@ -33929,32 +33965,37 @@ var addRowLength = 500;
33929
33965
  });
33930
33966
  // this.tableData = res.rows
33931
33967
  // TODO 取出参配置有问题
33932
- !scrollLoad && _this.setPage({
33968
+ !scrollLoad && _this2.setPage({
33933
33969
  page: _params.page,
33934
33970
  pageTotal: res.pageTotal
33935
33971
  });
33936
- _this.isLoading = false;
33972
+ res.pageTotal = 2;
33973
+ if (options && options.loadMore && _params.page >= res.pageTotal || !!scrollLoad) {
33974
+ // 当前页码等于最大页码时 或者 无限滚动
33975
+ _this2.loadMoreFinish = true;
33976
+ }
33977
+ _this2.isLoading = false;
33937
33978
  resolve(res);
33938
- _context.n = 11;
33979
+ _context2.n = 11;
33939
33980
  break;
33940
33981
  case 10:
33941
- _context.p = 10;
33942
- _t6 = _context.v;
33943
- _this.checkNetType(_t6);
33982
+ _context2.p = 10;
33983
+ _t6 = _context2.v;
33984
+ _this2.checkNetType(_t6);
33944
33985
  // TODO 错误是否需要清空数据
33945
33986
  console.error('[query-table-search-error]', _t6);
33946
33987
  reject(_t6);
33947
33988
  case 11:
33948
- return _context.a(2);
33989
+ return _context2.a(2);
33949
33990
  }
33950
- }, _callee, null, [[0, 10]]);
33991
+ }, _callee2, null, [[0, 10]]);
33951
33992
  }));
33952
33993
  return function (_x, _x2) {
33953
33994
  return _ref3.apply(this, arguments);
33954
33995
  };
33955
33996
  }()));
33956
33997
  }
33957
- }, _callee2);
33998
+ }, _callee3);
33958
33999
  }))();
33959
34000
  },
33960
34001
  // TODO, 暂时处理单元格数据 key都不存在的情况。此方法影响性能,后续要去除
@@ -33967,19 +34008,19 @@ var addRowLength = 500;
33967
34008
  },
33968
34009
  // 获取无限滚动需要的全量id
33969
34010
  loadTableScrollIds: function loadTableScrollIds(now, options) {
33970
- var _this2 = this;
33971
- return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
33972
- var _this2$config, scrollLoad, appkey, getIdsUrl, idsBeforeHttp, idsAfterHttp, params, idsBeforeParams, $params, _url, _appkey, _params, serach_time_stamp, res, _t7, _t8, _t9, _t0, _t1, _t10;
33973
- return _regenerator().w(function (_context3) {
33974
- while (1) switch (_context3.n) {
34011
+ var _this3 = this;
34012
+ return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
34013
+ var _this3$config, scrollLoad, appkey, getIdsUrl, idsBeforeHttp, idsAfterHttp, params, idsBeforeParams, $params, _url, _appkey, _params, serach_time_stamp, res, _t7, _t8, _t9, _t0, _t1, _t10;
34014
+ return _regenerator().w(function (_context4) {
34015
+ while (1) switch (_context4.n) {
33975
34016
  case 0:
33976
- _context3.p = 0;
33977
- _this2$config = _this2.config, scrollLoad = _this2$config.scrollLoad, appkey = _this2$config.appkey;
34017
+ _context4.p = 0;
34018
+ _this3$config = _this3.config, scrollLoad = _this3$config.scrollLoad, appkey = _this3$config.appkey;
33978
34019
  if (scrollLoad) {
33979
- _context3.n = 1;
34020
+ _context4.n = 1;
33980
34021
  break;
33981
34022
  }
33982
- return _context3.a(2);
34023
+ return _context4.a(2);
33983
34024
  case 1:
33984
34025
  getIdsUrl = scrollLoad.getIdsUrl, idsBeforeHttp = scrollLoad.idsBeforeHttp, idsAfterHttp = scrollLoad.idsAfterHttp;
33985
34026
  params = {}; // 请求前,外部可处理入参
@@ -33989,17 +34030,17 @@ var addRowLength = 500;
33989
34030
  params: params
33990
34031
  }; // 合并外部return的参数
33991
34032
  if (!(typeof idsBeforeHttp === 'function')) {
33992
- _context3.n = 3;
34033
+ _context4.n = 3;
33993
34034
  break;
33994
34035
  }
33995
34036
  _t8 = _objectSpread2;
33996
34037
  _t9 = _objectSpread2({}, idsBeforeParams);
33997
- _context3.n = 2;
34038
+ _context4.n = 2;
33998
34039
  return idsBeforeHttp(idsBeforeParams);
33999
34040
  case 2:
34000
- _t0 = _context3.v;
34041
+ _t0 = _context4.v;
34001
34042
  _t7 = _t8(_t9, _t0);
34002
- _context3.n = 4;
34043
+ _context4.n = 4;
34003
34044
  break;
34004
34045
  case 3:
34005
34046
  _t7 = idsBeforeParams;
@@ -34007,65 +34048,65 @@ var addRowLength = 500;
34007
34048
  $params = _t7;
34008
34049
  _url = $params.url, _appkey = $params.appkey, _params = $params.params; // 无限滚动,首页数据需要设置唯一时间戳,用于校验是否为最后一次请求,与首页数据时间戳一致
34009
34050
  serach_time_stamp = now; // 处理排序参数
34010
- _params = _this2.formatSortParams(_params, options);
34051
+ _params = _this3.formatSortParams(_params, options);
34011
34052
  // id写死最大请求数量
34012
- _context3.n = 5;
34013
- return _this2.$http(_url, _appkey, _objectSpread2(_objectSpread2({}, _params), {}, {
34053
+ _context4.n = 5;
34054
+ return _this3.$http(_url, _appkey, _objectSpread2(_objectSpread2({}, _params), {}, {
34014
34055
  pageSize: idsPageSize
34015
34056
  }));
34016
34057
  case 5:
34017
- res = _context3.v;
34018
- if (!(serach_time_stamp && _this2.lastReqTime && serach_time_stamp < _this2.lastReqTime)) {
34019
- _context3.n = 6;
34058
+ res = _context4.v;
34059
+ if (!(serach_time_stamp && _this3.lastReqTime && serach_time_stamp < _this3.lastReqTime)) {
34060
+ _context4.n = 6;
34020
34061
  break;
34021
34062
  }
34022
- return _context3.a(2);
34063
+ return _context4.a(2);
34023
34064
  case 6:
34024
34065
  if (!(typeof idsAfterHttp === 'function')) {
34025
- _context3.n = 8;
34066
+ _context4.n = 8;
34026
34067
  break;
34027
34068
  }
34028
- _context3.n = 7;
34069
+ _context4.n = 7;
34029
34070
  return idsAfterHttp(res);
34030
34071
  case 7:
34031
- _t1 = _context3.v;
34032
- _context3.n = 9;
34072
+ _t1 = _context4.v;
34073
+ _context4.n = 9;
34033
34074
  break;
34034
34075
  case 8:
34035
34076
  _t1 = res;
34036
34077
  case 9:
34037
34078
  res = _t1;
34038
34079
  // res 需要处理成字符串数组['id1', 'id2]
34039
- _this2.tableScrollIds = res;
34040
- _this2.idsFinish_timeStamp = now;
34041
- _this2.setTableScrollIds();
34042
- _context3.n = 11;
34080
+ _this3.tableScrollIds = res;
34081
+ _this3.idsFinish_timeStamp = now;
34082
+ _this3.setTableScrollIds();
34083
+ _context4.n = 11;
34043
34084
  break;
34044
34085
  case 10:
34045
- _context3.p = 10;
34046
- _t10 = _context3.v;
34086
+ _context4.p = 10;
34087
+ _t10 = _context4.v;
34047
34088
  console.error('[query-table-search-ids]', _t10);
34048
34089
  case 11:
34049
- return _context3.a(2);
34090
+ return _context4.a(2);
34050
34091
  }
34051
- }, _callee3, null, [[0, 10]]);
34092
+ }, _callee4, null, [[0, 10]]);
34052
34093
  }))();
34053
34094
  },
34054
34095
  // 无限滚动过程中加载数据
34055
34096
  scrollLoadData: function scrollLoadData(scrollOptions) {
34056
- var _this3 = this;
34057
- return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
34058
- var _this3$config, scrollLoad, appkey, url, scrollBeforeHttp, scrollAfterHttp, params, scrollBeforeParams, $params, _url, _appkey, _params, res, _t11, _t12, _t13, _t14, _t15, _t16;
34059
- return _regenerator().w(function (_context4) {
34060
- while (1) switch (_context4.n) {
34097
+ var _this4 = this;
34098
+ return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5() {
34099
+ var _this4$config, scrollLoad, appkey, url, scrollBeforeHttp, scrollAfterHttp, params, scrollBeforeParams, $params, _url, _appkey, _params, res, _t11, _t12, _t13, _t14, _t15, _t16;
34100
+ return _regenerator().w(function (_context5) {
34101
+ while (1) switch (_context5.n) {
34061
34102
  case 0:
34062
- _context4.p = 0;
34063
- _this3$config = _this3.config, scrollLoad = _this3$config.scrollLoad, appkey = _this3$config.appkey, url = _this3$config.url;
34103
+ _context5.p = 0;
34104
+ _this4$config = _this4.config, scrollLoad = _this4$config.scrollLoad, appkey = _this4$config.appkey, url = _this4$config.url;
34064
34105
  if (scrollLoad) {
34065
- _context4.n = 1;
34106
+ _context5.n = 1;
34066
34107
  break;
34067
34108
  }
34068
- return _context4.a(2);
34109
+ return _context5.a(2);
34069
34110
  case 1:
34070
34111
  scrollBeforeHttp = scrollLoad.scrollBeforeHttp, scrollAfterHttp = scrollLoad.scrollAfterHttp;
34071
34112
  params = {}; // 请求前,外部可处理入参
@@ -34075,55 +34116,55 @@ var addRowLength = 500;
34075
34116
  params: params
34076
34117
  };
34077
34118
  if (!(typeof scrollBeforeHttp === 'function')) {
34078
- _context4.n = 3;
34119
+ _context5.n = 3;
34079
34120
  break;
34080
34121
  }
34081
34122
  _t12 = _objectSpread2;
34082
34123
  _t13 = _objectSpread2({}, scrollBeforeParams);
34083
- _context4.n = 2;
34124
+ _context5.n = 2;
34084
34125
  return scrollBeforeHttp(scrollBeforeParams, scrollOptions);
34085
34126
  case 2:
34086
- _t14 = _context4.v;
34127
+ _t14 = _context5.v;
34087
34128
  _t11 = _t12(_t13, _t14);
34088
- _context4.n = 4;
34129
+ _context5.n = 4;
34089
34130
  break;
34090
34131
  case 3:
34091
34132
  _t11 = scrollBeforeParams;
34092
34133
  case 4:
34093
34134
  $params = _t11;
34094
34135
  _url = $params.url, _appkey = $params.appkey, _params = $params.params;
34095
- _context4.n = 5;
34096
- return _this3.$http(_url, _appkey, _params);
34136
+ _context5.n = 5;
34137
+ return _this4.$http(_url, _appkey, _params);
34097
34138
  case 5:
34098
- res = _context4.v;
34139
+ res = _context5.v;
34099
34140
  if (!(typeof scrollAfterHttp === 'function')) {
34100
- _context4.n = 7;
34141
+ _context5.n = 7;
34101
34142
  break;
34102
34143
  }
34103
- _context4.n = 6;
34144
+ _context5.n = 6;
34104
34145
  return scrollAfterHttp(res);
34105
34146
  case 6:
34106
- _t15 = _context4.v;
34107
- _context4.n = 8;
34147
+ _t15 = _context5.v;
34148
+ _context5.n = 8;
34108
34149
  break;
34109
34150
  case 7:
34110
34151
  _t15 = res;
34111
34152
  case 8:
34112
34153
  res = _t15;
34113
- _this3.updateTableData(res.rows, 'api');
34114
- _context4.n = 10;
34154
+ _this4.updateTableData(res.rows, 'api');
34155
+ _context5.n = 10;
34115
34156
  break;
34116
34157
  case 9:
34117
- _context4.p = 9;
34118
- _t16 = _context4.v;
34158
+ _context5.p = 9;
34159
+ _t16 = _context5.v;
34119
34160
  console.error('[query-table-scrollLoadData]', _t16);
34120
34161
  case 10:
34121
34162
  // 清空本次请求加载中的ids
34122
- _this3.clearLoadIds(scrollOptions.code);
34163
+ _this4.clearLoadIds(scrollOptions.code);
34123
34164
  case 11:
34124
- return _context4.a(2);
34165
+ return _context5.a(2);
34125
34166
  }
34126
- }, _callee4, null, [[0, 9]]);
34167
+ }, _callee5, null, [[0, 9]]);
34127
34168
  }))();
34128
34169
  },
34129
34170
  // 清空加载中的ids
@@ -34132,18 +34173,18 @@ var addRowLength = 500;
34132
34173
  delete this.loadIdsMap[codes[index]];
34133
34174
  }
34134
34175
  },
34135
- setTableData: function setTableData(val, now) {
34136
- var _this4 = this;
34137
- return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5() {
34176
+ setTableData: function setTableData(val, now, loadOptions) {
34177
+ var _this5 = this;
34178
+ return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6() {
34138
34179
  var rowTotal, rows, scrollData, nowDateStr, tableData, item, index, _index2;
34139
- return _regenerator().w(function (_context5) {
34140
- while (1) switch (_context5.n) {
34180
+ return _regenerator().w(function (_context6) {
34181
+ while (1) switch (_context6.n) {
34141
34182
  case 0:
34142
34183
  rowTotal = val.rowTotal, rows = val.rows, scrollData = val.options;
34143
34184
  nowDateStr = +new Date();
34144
34185
  if (!scrollData) {
34145
34186
  // 第一页数据,非滚动
34146
- _this4.total = rowTotal;
34187
+ _this5.total = rowTotal;
34147
34188
  tableData = [];
34148
34189
  item = null; // 设置第一页数据,全部双向绑定
34149
34190
  for (index = 0; index < rows.length; index++) {
@@ -34155,76 +34196,85 @@ var addRowLength = 500;
34155
34196
  }
34156
34197
  // 根据总条数设置空行,用于一次展示所有数据,后续滚动过程中请求后合并空数据
34157
34198
  for (_index2 = rows.length; _index2 < rowTotal; _index2++) {
34158
- tableData.push(_objectSpread2(_objectSpread2({}, _this4.createBaseData(rows[0])), {}, {
34199
+ tableData.push(_objectSpread2(_objectSpread2({}, _this5.createBaseData(rows[0])), {}, {
34159
34200
  id: 'pe_' + Math.random().toString(),
34160
34201
  name: '-',
34161
34202
  selectedFlag: null
34162
34203
  }));
34163
34204
  }
34164
- _this4.tableData = tableData;
34165
- _this4.dataFinish_timeStamp = now;
34166
- _this4.setTableScrollIds();
34205
+ if (loadOptions && loadOptions.loadMore) {
34206
+ rows.forEach(function (v) {
34207
+ return _this5.tableData.push(v);
34208
+ });
34209
+ } else {
34210
+ _this5.tableData = tableData;
34211
+ }
34212
+ _this5.isLoadingMore = false;
34213
+ _this5.dataFinish_timeStamp = now;
34214
+ _this5.setTableScrollIds();
34167
34215
 
34168
34216
  // 第一页数据,让表格回到顶部
34169
- _this4.$refs.peTable && _this4.$refs.peTable.scrollToTop();
34170
- // 如果有数据,异步存入到map内
34171
- setTimeout(function () {
34172
- _this4.tableData.forEach(function (item) {
34173
- if (item.__updateTime) {
34174
- _this4.tableMap[item[_this4.idsKey]] = item;
34175
- }
34176
- });
34177
- }, 0);
34217
+ if (!(loadOptions && loadOptions.loadMore)) {
34218
+ _this5.$refs.peTable && _this5.$refs.peTable.scrollToTop();
34219
+ // 如果有数据,异步存入到map内
34220
+ setTimeout(function () {
34221
+ _this5.tableData.forEach(function (item) {
34222
+ if (item.__updateTime) {
34223
+ _this5.tableMap[item[_this5.idsKey]] = item;
34224
+ }
34225
+ });
34226
+ }, 0);
34227
+ }
34178
34228
  } else {
34179
34229
  // 滚动加载的数据
34180
- _this4.updateTableData(rows, 'api');
34230
+ _this5.updateTableData(rows, 'api');
34181
34231
  }
34182
34232
  case 1:
34183
- return _context5.a(2);
34233
+ return _context6.a(2);
34184
34234
  }
34185
- }, _callee5);
34235
+ }, _callee6);
34186
34236
  }))();
34187
34237
  },
34188
34238
  // 表格滑动拉取数据
34189
34239
  tableScrollPullData: debounce_default()(/*#__PURE__*/function () {
34190
- var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(e) {
34191
- var _this5 = this;
34240
+ var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(e) {
34241
+ var _this6 = this;
34192
34242
  var scrollLoad, startRow, endRow, action, rowsPerViewport, codes, checkNextViewData, preloadEndRow, i, nowDateStr, id, item, noItem, oldItem, idLoad, options;
34193
- return _regenerator().w(function (_context6) {
34194
- while (1) switch (_context6.n) {
34243
+ return _regenerator().w(function (_context7) {
34244
+ while (1) switch (_context7.n) {
34195
34245
  case 0:
34196
34246
  scrollLoad = this.config.scrollLoad;
34197
34247
  if (scrollLoad) {
34198
- _context6.n = 1;
34248
+ _context7.n = 1;
34199
34249
  break;
34200
34250
  }
34201
- return _context6.a(2);
34251
+ return _context7.a(2);
34202
34252
  case 1:
34203
34253
  startRow = e.startRow, endRow = e.endRow, action = e.action, rowsPerViewport = e.rowsPerViewport; // code还没请求回来
34204
34254
  if (this.tableScrollIds.length) {
34205
- _context6.n = 2;
34255
+ _context7.n = 2;
34206
34256
  break;
34207
34257
  }
34208
34258
  // 保存数据用于code取回来后立即执行
34209
34259
  this.beforeStartRow = startRow;
34210
34260
  this.beforeEndRow = endRow;
34211
- return _context6.a(2);
34261
+ return _context7.a(2);
34212
34262
  case 2:
34213
34263
  if (!(action === 'reload')) {
34214
- _context6.n = 3;
34264
+ _context7.n = 3;
34215
34265
  break;
34216
34266
  }
34217
34267
  // 立即请求
34218
34268
  startRow = this.beforeStartRow;
34219
34269
  endRow = this.beforeEndRow;
34220
- _context6.n = 5;
34270
+ _context7.n = 5;
34221
34271
  break;
34222
34272
  case 3:
34223
34273
  if (!(this.beforeStartRow === startRow && this.beforeEndRow === endRow)) {
34224
- _context6.n = 4;
34274
+ _context7.n = 4;
34225
34275
  break;
34226
34276
  }
34227
- return _context6.a(2);
34277
+ return _context7.a(2);
34228
34278
  case 4:
34229
34279
  this.beforeStartRow = startRow;
34230
34280
  this.beforeEndRow = endRow;
@@ -34251,8 +34301,8 @@ var addRowLength = 500;
34251
34301
  var item = null;
34252
34302
  var load = false;
34253
34303
  while (checkStartRow <= checkEndRow) {
34254
- id = _this5.tableScrollIds[checkStartRow];
34255
- item = _this5.tableMap[id];
34304
+ id = _this6.tableScrollIds[checkStartRow];
34305
+ item = _this6.tableMap[id];
34256
34306
  var noItem = id && !item;
34257
34307
  var oldItem = item && (!item.__updateTime || nowDateStr > UPDATE_INTERVAL + item.__updateTime);
34258
34308
  if (id && (noItem || oldItem)) {
@@ -34264,10 +34314,10 @@ var addRowLength = 500;
34264
34314
  return load;
34265
34315
  };
34266
34316
  if (checkNextViewData()) {
34267
- _context6.n = 6;
34317
+ _context7.n = 6;
34268
34318
  break;
34269
34319
  }
34270
- return _context6.a(2);
34320
+ return _context7.a(2);
34271
34321
  case 6:
34272
34322
  preloadEndRow = Math.min(endRow + addRowLength, this.tableScrollIds.length);
34273
34323
  if (preloadEndRow > 0) {
@@ -34291,10 +34341,10 @@ var addRowLength = 500;
34291
34341
  }
34292
34342
  }
34293
34343
  if (codes.length) {
34294
- _context6.n = 7;
34344
+ _context7.n = 7;
34295
34345
  break;
34296
34346
  }
34297
- return _context6.a(2);
34347
+ return _context7.a(2);
34298
34348
  case 7:
34299
34349
  options = {
34300
34350
  code: codes,
@@ -34303,9 +34353,9 @@ var addRowLength = 500;
34303
34353
  };
34304
34354
  this.scrollLoadData(options);
34305
34355
  case 8:
34306
- return _context6.a(2);
34356
+ return _context7.a(2);
34307
34357
  }
34308
- }, _callee6, this);
34358
+ }, _callee7, this);
34309
34359
  }));
34310
34360
  return function (_x3) {
34311
34361
  return _ref4.apply(this, arguments);
@@ -34357,29 +34407,29 @@ var addRowLength = 500;
34357
34407
  },
34358
34408
  // 更新数据
34359
34409
  updateTableData: function updateTableData(arr, type, callback) {
34360
- var _this6 = this;
34410
+ var _this7 = this;
34361
34411
  // 去除已在队列中的的重复数据,以新的为准,减少更新操作,提升性能
34362
34412
  this.willUpdateDataArr = this.filterAndMergeArrays(_toConsumableArray(this.willUpdateDataArr), arr);
34363
34413
  var nowDateStr = +new Date();
34364
34414
  var _step3 = function step() {
34365
- var _this6$$refs;
34366
- if (_this6.willUpdateDataArr.length === 0) return;
34415
+ var _this7$$refs;
34416
+ if (_this7.willUpdateDataArr.length === 0) return;
34367
34417
  // 每次只更新设置好的行数
34368
- var upList = _this6.willUpdateDataArr.splice(0, upLength);
34418
+ var upList = _this7.willUpdateDataArr.splice(0, upLength);
34369
34419
  for (var index = 0; index < upList.length; index++) {
34370
34420
  var item = upList[index];
34371
- var id = item[_this6.idsKey];
34421
+ var id = item[_this7.idsKey];
34372
34422
  // 后端返回的直接赋值,实时数据需要该行不为空
34373
- if (_this6.tableMap[id] && (type === 'api' || _this6.tableMap[id].__updateTime)) {
34374
- var oldItem = cloneDeep_default()(_this6.tableMap[id]);
34375
- Object.assign(_this6.tableMap[id], item, {
34423
+ if (_this7.tableMap[id] && (type === 'api' || _this7.tableMap[id].__updateTime)) {
34424
+ var oldItem = cloneDeep_default()(_this7.tableMap[id]);
34425
+ Object.assign(_this7.tableMap[id], item, {
34376
34426
  __updateTime: nowDateStr
34377
34427
  });
34378
- callback && callback(_this6.tableMap[id], oldItem);
34428
+ callback && callback(_this7.tableMap[id], oldItem);
34379
34429
  }
34380
34430
  }
34381
34431
  // 每次设置完数据,主动更新
34382
- (_this6$$refs = _this6.$refs) === null || _this6$$refs === void 0 || (_this6$$refs = _this6$$refs.peTable) === null || _this6$$refs === void 0 || _this6$$refs.renderViewportRows();
34432
+ (_this7$$refs = _this7.$refs) === null || _this7$$refs === void 0 || (_this7$$refs = _this7$$refs.peTable) === null || _this7$$refs === void 0 || _this7$$refs.renderViewportRows();
34383
34433
  requestAnimationFrame(_step3);
34384
34434
  };
34385
34435
  requestAnimationFrame(_step3);
@@ -34420,47 +34470,47 @@ var addRowLength = 500;
34420
34470
  },
34421
34471
  // 校验网络状态
34422
34472
  checkNetType: function checkNetType(e) {
34423
- var _this7 = this;
34424
- return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7() {
34473
+ var _this8 = this;
34474
+ return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8() {
34425
34475
  var netStatus;
34426
- return _regenerator().w(function (_context7) {
34427
- while (1) switch (_context7.n) {
34476
+ return _regenerator().w(function (_context8) {
34477
+ while (1) switch (_context8.n) {
34428
34478
  case 0:
34429
- _this7.isLoading = false;
34479
+ _this8.isLoading = false;
34430
34480
  // 后端超时
34431
34481
  if (!(e.data && [27057].includes(e.data.code))) {
34432
- _context7.n = 1;
34482
+ _context8.n = 1;
34433
34483
  break;
34434
34484
  }
34435
- _this7.tableData = [];
34436
- _this7.tableIsAbnormal = true;
34437
- return _context7.a(2);
34485
+ _this8.tableData = [];
34486
+ _this8.tableIsAbnormal = true;
34487
+ return _context8.a(2);
34438
34488
  case 1:
34439
34489
  if (!(e.message === (window.networkTimeoutMessage || '请求超时,服务器未响应'))) {
34440
- _context7.n = 2;
34490
+ _context8.n = 2;
34441
34491
  break;
34442
34492
  }
34443
- _this7.tableData = [];
34444
- _this7.tableIsAbnormal = true;
34445
- return _context7.a(2);
34493
+ _this8.tableData = [];
34494
+ _this8.tableIsAbnormal = true;
34495
+ return _context8.a(2);
34446
34496
  case 2:
34447
34497
  if (!window.ks) {
34448
- _context7.n = 4;
34498
+ _context8.n = 4;
34449
34499
  break;
34450
34500
  }
34451
- _context7.n = 3;
34501
+ _context8.n = 3;
34452
34502
  return window.ks.callFunc({
34453
34503
  method: 'getNetType',
34454
34504
  params: {}
34455
34505
  });
34456
34506
  case 3:
34457
- netStatus = _context7.v;
34458
- _this7.tableData = netStatus === 1 ? [] : _this7.tableData;
34459
- _this7.tableIsAbnormal = netStatus === 1;
34507
+ netStatus = _context8.v;
34508
+ _this8.tableData = netStatus === 1 ? [] : _this8.tableData;
34509
+ _this8.tableIsAbnormal = netStatus === 1;
34460
34510
  case 4:
34461
- return _context7.a(2);
34511
+ return _context8.a(2);
34462
34512
  }
34463
- }, _callee7);
34513
+ }, _callee8);
34464
34514
  }))();
34465
34515
  }
34466
34516
  }
@@ -34547,9 +34597,10 @@ var table_pagination_component = normalizeComponent(
34547
34597
  },
34548
34598
  methods: {
34549
34599
  setPage: function setPage(res) {
34550
- if (!this.showPage) {
34551
- return;
34552
- }
34600
+ // TODO 需要缓存页码
34601
+ // if (!this.showPage ) {
34602
+ // return
34603
+ // }
34553
34604
  this.currentPage = res.page;
34554
34605
  this.totalPages = res.pageTotal;
34555
34606
  },
@@ -34601,7 +34652,7 @@ var table = __webpack_require__("6af9");
34601
34652
  var TABLE_ID = 1;
34602
34653
  /* harmony default export */ var query_tablevue_type_script_lang_js = ({
34603
34654
  mixins: [pagination_mixin, column_mixin, column_setting, table_fixed, mixins_table_horizontal, data_mixin],
34604
- name: 'HsQueryTable',
34655
+ name: 'KsQueryTable',
34605
34656
  props: _objectSpread2(_objectSpread2({}, PE_TABLE_PROPS), {}, {
34606
34657
  searchCode: String,
34607
34658
  config: {
@@ -34667,7 +34718,8 @@ var TABLE_ID = 1;
34667
34718
  curTableId: TABLE_ID++,
34668
34719
  tableColunms: [],
34669
34720
  tableIsAbnormal: false,
34670
- isLoading: false
34721
+ isLoading: false,
34722
+ loadMoreFinish: false
34671
34723
  // showPopover: true,
34672
34724
  // containerPopover: '',
34673
34725
  // popRowIndex: 0,
@@ -34758,7 +34810,8 @@ var TABLE_ID = 1;
34758
34810
  isShowHorizontal: _this2.isShowHorizontal,
34759
34811
  isLoading: _this2.isLoading,
34760
34812
  isAbnormal: _this2.tableIsAbnormal,
34761
- isLoadFinished: $props.isLoadFinished,
34813
+ // isLoadFinished: $props.isLoadFinished, // TODO 外部转内部
34814
+ isLoadFinished: _this2.loadMoreFinish,
34762
34815
  enableLoadMore: $props.enableLoadMore,
34763
34816
  defaultSort: $props.defaultSort,
34764
34817
  delayLoading: $props.delayLoading || _this2.innterDelayLoading,
@@ -34767,7 +34820,11 @@ var TABLE_ID = 1;
34767
34820
  isUpdateOffset: _this2.isUpdateOffset,
34768
34821
  indexFormat: $props.indexFormat,
34769
34822
  noOneScreenNoShowMore: $props.noOneScreenNoShowMore,
34770
- isScrollShowTotal: $props.isScrollShowTotal
34823
+ isScrollShowTotal: $props.isScrollShowTotal,
34824
+ overflow: $props.overflow,
34825
+ pageForIndex: _this2.currentPage,
34826
+ showPage: $props.showPage,
34827
+ isLoadingMore: _this2.isLoadingMore
34771
34828
  },
34772
34829
  on: {
34773
34830
  'cell-click': _this2.cellClick,
@@ -34780,7 +34837,8 @@ var TABLE_ID = 1;
34780
34837
  scrollTouchstar: _this2.handlerTouchstar,
34781
34838
  'table-mounted': _this2.tableMounted,
34782
34839
  abnormal: _this2.abnormal,
34783
- 'cell-long': _this2.handleCellLong
34840
+ 'cell-long': _this2.handleCellLong,
34841
+ loadMore: _this2.loadMore
34784
34842
  },
34785
34843
  ref: 'peTable',
34786
34844
  scopedSlots: {
@@ -34821,12 +34879,9 @@ var TABLE_ID = 1;
34821
34879
  }, [createPeTable()])]), createPagination()])]), this.createHorizontal()]);
34822
34880
  },
34823
34881
  methods: {
34824
- // hideColumms(keys) {
34825
- // console.log(this.onlineColumns)
34826
- // let colunms = this.onlineColumns.filter(v => !keys.includes(v.key))
34827
- // console.log(colunms)
34828
- // this.tableColunms = colunms
34829
- // },
34882
+ loadMore: function loadMore() {
34883
+ this.loadMoreData();
34884
+ },
34830
34885
  // 单元格点击
34831
34886
  cellClick: function cellClick() {
34832
34887
  var _arguments = arguments,
@@ -35152,8 +35207,8 @@ var TABLE_ID = 1;
35152
35207
  });
35153
35208
  // CONCATENATED MODULE: ./src/view/home/query-table/components/query-table/index.vue?vue&type=script&lang=js
35154
35209
  /* harmony default export */ var components_query_tablevue_type_script_lang_js = (query_tablevue_type_script_lang_js);
35155
- // EXTERNAL MODULE: ./src/view/home/query-table/components/query-table/index.vue?vue&type=style&index=0&id=55eb331e&prod&lang=less&scoped=true
35156
- var query_tablevue_type_style_index_0_id_55eb331e_prod_lang_less_scoped_true = __webpack_require__("b65d");
35210
+ // EXTERNAL MODULE: ./src/view/home/query-table/components/query-table/index.vue?vue&type=style&index=0&id=8b3afe8a&prod&lang=less&scoped=true
35211
+ var query_tablevue_type_style_index_0_id_8b3afe8a_prod_lang_less_scoped_true = __webpack_require__("4dd7");
35157
35212
 
35158
35213
  // CONCATENATED MODULE: ./src/view/home/query-table/components/query-table/index.vue
35159
35214
  var query_table_render, query_table_staticRenderFns
@@ -35170,7 +35225,7 @@ var query_table_component = normalizeComponent(
35170
35225
  query_table_staticRenderFns,
35171
35226
  false,
35172
35227
  null,
35173
- "55eb331e",
35228
+ "8b3afe8a",
35174
35229
  null
35175
35230
 
35176
35231
  )