element-ui-root 2.9.8 → 2.9.9

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.
@@ -4282,17 +4282,6 @@ if (!isCallable(store.inspectSource)) {
4282
4282
  module.exports = store.inspectSource;
4283
4283
 
4284
4284
 
4285
- /***/ }),
4286
-
4287
- /***/ "0634":
4288
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
4289
-
4290
- "use strict";
4291
- /* harmony import */ var _node_modules_mini_css_extract_plugin_0_9_0_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_3_6_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_15_10_1_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_15_10_1_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_ed84b344_prod_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("b33c");
4292
- /* harmony import */ var _node_modules_mini_css_extract_plugin_0_9_0_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_3_6_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_15_10_1_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_15_10_1_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_ed84b344_prod_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_0_9_0_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_3_6_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_15_10_1_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_15_10_1_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_ed84b344_prod_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
4293
- /* unused harmony reexport * */
4294
-
4295
-
4296
4285
  /***/ }),
4297
4286
 
4298
4287
  /***/ "066e":
@@ -5212,6 +5201,9 @@ __webpack_require__.r(__webpack_exports__);
5212
5201
 
5213
5202
  "use strict";
5214
5203
  __webpack_require__.r(__webpack_exports__);
5204
+ /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5a1c");
5205
+ /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_0__);
5206
+
5215
5207
  /* harmony default export */ __webpack_exports__["default"] = ({
5216
5208
  name: 'AdragBox',
5217
5209
  props: {
@@ -5219,6 +5211,10 @@ __webpack_require__.r(__webpack_exports__);
5219
5211
  type: String,
5220
5212
  default: () => `id-a-drag-box-${Math.random()}`
5221
5213
  },
5214
+ prompt: {
5215
+ type: String,
5216
+ default: () => '按住进行拖放'
5217
+ },
5222
5218
  dragType: {
5223
5219
  type: String,
5224
5220
  default: () => 'text/plain'
@@ -5226,19 +5222,41 @@ __webpack_require__.r(__webpack_exports__);
5226
5222
  draggable: {
5227
5223
  type: Boolean,
5228
5224
  default: () => true
5225
+ },
5226
+ insert: {
5227
+ type: Boolean,
5228
+ default: () => false
5229
+ },
5230
+ color: {
5231
+ type: String,
5232
+ default: () => ''
5233
+ },
5234
+ padding: {
5235
+ type: String,
5236
+ default: () => '0'
5237
+ },
5238
+ height: {
5239
+ type: String,
5240
+ default: () => '100%'
5241
+ },
5242
+ background: {
5243
+ type: String,
5244
+ default: () => ''
5245
+ },
5246
+ styles: {
5247
+ type: Object,
5248
+ default: () => ({})
5249
+ },
5250
+ loading: {
5251
+ type: Boolean,
5252
+ default: () => false
5229
5253
  }
5230
5254
  },
5231
- created() {
5232
- this.create();
5233
- },
5234
5255
  methods: {
5235
- create() {
5236
- // TODO
5237
- },
5238
5256
  dragstart(a) {
5239
5257
  if (this.draggable) {
5240
5258
  a.dataTransfer.setData(this.dragType, this.id);
5241
- this.$store.commit('changeDragId', this.id);
5259
+ this.$store.commit('setDragId', this.id);
5242
5260
  this.$emit('dragstart', a);
5243
5261
  }
5244
5262
  },
@@ -5264,41 +5282,62 @@ __webpack_require__.r(__webpack_exports__);
5264
5282
  },
5265
5283
  drop(a) {
5266
5284
  a.preventDefault();
5267
- const {
5268
- dragId,
5269
- dropId
5270
- } = this.$store.state;
5271
- this.$emit('drop', {
5272
- dragId,
5273
- dropId
5274
- });
5275
- a.dataTransfer.clearData();
5276
- },
5277
- mousedown(a, b) {
5278
- // TODO
5279
- return;
5285
+ if (this.draggable) {
5286
+ const id = a.dataTransfer.getData(this.dragType);
5287
+ const draging = document.getElementById(id);
5288
+ const droping = document.getElementById(this.id);
5289
+ if (draging !== droping) {
5290
+ let dragPostion = draging.getBoundingClientRect();
5291
+ let dropPostion = droping.getBoundingClientRect();
5292
+ if (this.insert) {
5293
+ if (this.getIndex(draging) > this.getIndex(droping)) {
5294
+ this.$el.parentNode.insertBefore(draging, droping);
5295
+ } else {
5296
+ this.$el.parentNode.insertBefore(draging, droping.nextSibling);
5297
+ }
5298
+ }
5299
+ this.animate(draging, dragPostion);
5300
+ this.animate(droping, dropPostion);
5301
+ }
5302
+ this.$store.commit('setDropId', this.id);
5303
+ this.$emit('drop', a);
5304
+ }
5280
5305
  },
5281
- mouseup(a, b) {
5282
- // TODO
5283
- return;
5306
+ getIndex(element = null) {
5307
+ let index = 0;
5308
+ if (!element) return -1;
5309
+ while (element = element.previousSibling) index++;
5310
+ return index;
5284
5311
  },
5285
- mouseover(a, b) {
5286
- // TODO
5287
- return;
5312
+ animate(element, postion, delay = 300) {
5313
+ let current = element.getBoundingClientRect();
5314
+ let action = (() => {
5315
+ element.style.transition = 'none';
5316
+ element.style.transform = `translate3d(${postion.left - current.left}px, ${postion.top - current.top}px, 0)`;
5317
+ element.offsetWidth;
5318
+ element.style.transition = `all ${delay}ms`;
5319
+ element.style.transform = 'translate3d(0, 0, 0)';
5320
+ })();
5321
+ setTimeout(() => action = null, delay);
5288
5322
  }
5289
5323
  },
5290
5324
  render() {
5291
5325
  const h = arguments[0];
5326
+ const {
5327
+ ...props
5328
+ } = this.$attrs;
5292
5329
  return h("div", {
5293
5330
  "attrs": {
5294
5331
  "id": this.id,
5332
+ "title": this.prompt,
5295
5333
  "draggable": this.draggable
5296
5334
  },
5297
5335
  "class": "a-drag-box",
5336
+ "directives": [{
5337
+ name: "loading",
5338
+ value: this.loading
5339
+ }],
5298
5340
  "on": {
5299
- "mousedown": a => this.mousedown(a, this.id),
5300
- "mouseover": a => this.mouseover(a, this.id),
5301
- "mouseup": a => this.mouseup(a, this.id),
5302
5341
  "dragstart": this.dragstart,
5303
5342
  "dragenter": this.dragenter,
5304
5343
  "dragleave": this.dragleave,
@@ -5306,8 +5345,24 @@ __webpack_require__.r(__webpack_exports__);
5306
5345
  "dragend": this.dragend,
5307
5346
  "drag": this.drag,
5308
5347
  "drop": this.drop
5348
+ },
5349
+ "style": {
5350
+ color: this.color,
5351
+ minHeight: this.height,
5352
+ background: this.background,
5353
+ ...this.styles
5354
+ },
5355
+ "props": {
5356
+ ...props
5309
5357
  }
5310
- }, [this.$slots.default]);
5358
+ }, [h("div", {
5359
+ "class": "a-drag-box-body",
5360
+ "style": {
5361
+ padding: this.padding
5362
+ }
5363
+ }, [h("div", {
5364
+ "class": "custom-body"
5365
+ }, [this.$slots.default])])]);
5311
5366
  }
5312
5367
  });
5313
5368
 
@@ -12752,7 +12807,7 @@ __webpack_require__.r(__webpack_exports__);
12752
12807
  },
12753
12808
  inline: {
12754
12809
  type: Boolean,
12755
- default: () => false
12810
+ default: () => true
12756
12811
  },
12757
12812
  cols: {
12758
12813
  type: String,
@@ -12801,28 +12856,21 @@ __webpack_require__.r(__webpack_exports__);
12801
12856
  },
12802
12857
  data() {
12803
12858
  return {
12804
- form: {},
12805
- height: 0,
12806
- opened: false
12859
+ form: {}
12807
12860
  };
12808
12861
  },
12809
12862
  created() {
12810
12863
  this.create();
12811
12864
  },
12812
- mounted() {
12813
- this.update();
12814
- },
12865
+ mounted() {},
12815
12866
  destroyed() {
12816
12867
  this.create = null;
12817
- this.update = null;
12818
12868
  this.submit = null;
12819
12869
  this.cancel = null;
12820
12870
  this.filter = null;
12821
12871
  this.result = null;
12822
- this.switch = null;
12823
12872
  this.prompt = null;
12824
12873
  this.format = null;
12825
- this.output = null;
12826
12874
  },
12827
12875
  watch: {
12828
12876
  values() {
@@ -12839,10 +12887,6 @@ __webpack_require__.r(__webpack_exports__);
12839
12887
  this.form = data;
12840
12888
  }
12841
12889
  },
12842
- update() {
12843
- let rows = Math.ceil(Object.keys(this.config).length / this.cols);
12844
- this.height = this.$el.clientHeight * (rows - 1);
12845
- },
12846
12890
  submit(e) {
12847
12891
  // 提交表单
12848
12892
  e && e.preventDefault();
@@ -12852,22 +12896,34 @@ __webpack_require__.r(__webpack_exports__);
12852
12896
  if (Object.keys(this.config).length > 0) {
12853
12897
  // 格式化属性为模糊查询属性
12854
12898
  for (let a in this.config) {
12855
- if (this.config[a] != '' && this.config[a].like && this.form[a].trim() != '' && this.form[a].trim() != null && this.form[a].trim() != undefined) {
12856
- if (this.config[a].like == 'left') data[a] = '%' + this.form[a].trim();
12857
- if (this.config[a].like == 'right') data[a] = this.form[a].trim() + '%';else data[a] = '%' + this.form[a].trim() + '%';
12899
+ if (this.config[a] != '' && this.config[a].like && this.form[a] != '' && this.form[a] != null && this.form[a] != undefined) {
12900
+ if (this.config[a].like == 'left') data[a] = '%' + this.form[a];
12901
+ if (this.config[a].like == 'right') data[a] = this.form[a] + '%';else data[a] = '%' + this.form[a] + '%';
12858
12902
  } else {
12859
12903
  if (this.config[a] != '' && (this.config[a].than || this.config[a].range || this.config[a].scope)) {
12860
- data[`${a}LE`] = this.form[`${a}LE`].trim();
12861
- data[`${a}GE`] = this.form[`${a}GE`].trim();
12862
- } else if (this.form[a].trim().includes(' 00:00:00')) data[a] = '%' + this.form[a].trim().split(' 00:00:00')[0] + '%';else data[a] = this.form[a].trim();
12904
+ data[`${a}LE`] = this.form[`${a}LE`];
12905
+ data[`${a}GE`] = this.form[`${a}GE`];
12906
+ } else if (this.form[a].includes(' 00:00:00')) data[a] = '%' + this.form[a].split(' 00:00:00')[0] + '%';else data[a] = this.form[a];
12863
12907
  }
12864
12908
  }
12865
12909
  }
12866
12910
  if (pass) {
12867
12911
  let result = this.filter(data);
12912
+ const {
12913
+ formParams,
12914
+ pageParams
12915
+ } = this.$store.state;
12916
+ this.$store.commit('setFormParams', result); // 添加查询参数
12917
+ this.$store.commit('setPageParams', {
12918
+ ...pageParams,
12919
+ page: 1
12920
+ }); // 重置分页参数
12868
12921
  this.$nextTick(() => {
12869
- this.$emit('submit', {
12922
+ let change = false;
12923
+ Object.keys(result).forEach(a => result[a] != formParams[a] && (change = true));
12924
+ if (change) this.$emit('submit', {
12870
12925
  ...result,
12926
+ ...pageParams,
12871
12927
  page: 1
12872
12928
  }); // 派发事件并重置当前分页
12873
12929
  return result;
@@ -12880,6 +12936,15 @@ __webpack_require__.r(__webpack_exports__);
12880
12936
  let pass = !this.check; // 判断是否是空表单
12881
12937
  for (let a in this.form) if (this.form[a] != '') pass = true;
12882
12938
  if (pass) {
12939
+ const {
12940
+ pageParams
12941
+ } = this.$store.state;
12942
+ this.$store.commit('setPageParams', {
12943
+ ...pageParams,
12944
+ page: 1,
12945
+ size: 10
12946
+ }); // 重置分页参数
12947
+ this.$store.commit('setFormParams', {}); // 重置查询参数
12883
12948
  this.$nextTick(() => {
12884
12949
  for (let a in this.form) this.form[a] = '';
12885
12950
  this.$nextTick(() => this.$emit('cancel', this.form));
@@ -12887,18 +12952,19 @@ __webpack_require__.r(__webpack_exports__);
12887
12952
  }
12888
12953
  },
12889
12954
  filter(form = {}) {
12955
+ // 过滤空值属性
12890
12956
  const data = {};
12891
12957
  for (let a in form) {
12892
- if (form[a] != '' && form[a] != '%%' && form[a] != 'null' && form[a] != 'undefined' && form[a] != null && form[a] != undefined) data[a] = form[a];
12958
+ if (a != undefined && a != 'undefined' && form[a] != '' && form[a] != '%%' && form[a] != 'null' && form[a] != 'undefined' && form[a] != null && form[a] != undefined) {
12959
+ data[a] = form[a];
12960
+ }
12893
12961
  }
12894
12962
  return data;
12895
12963
  },
12896
12964
  result() {
12965
+ // 返回验证后的表单数据
12897
12966
  return this.filter(this.form);
12898
12967
  },
12899
- switch() {
12900
- this.opened = !this.opened;
12901
- },
12902
12968
  prompt(a = {}, index = 0, placeholder = '') {
12903
12969
  if (Object.keys(a).length > 0 && a.placeholder && a.placeholder.length && a.placeholder.length > 0) return a.placeholder[index];
12904
12970
  return placeholder;
@@ -12927,31 +12993,6 @@ __webpack_require__.r(__webpack_exports__);
12927
12993
  }
12928
12994
  });
12929
12995
  }
12930
- },
12931
- output(a, b) {
12932
- const h = this.$createElement;
12933
- let style = this.cols != '' ? {
12934
- width: `${100 / this.cols}%`
12935
- } : {};
12936
- return h("el-col", {
12937
- "key": b,
12938
- "style": style
12939
- }, [h("el-form-item", {
12940
- "attrs": {
12941
- "prop": `${a}`,
12942
- "label": this.label ? this.config[a]['text'] : ''
12943
- }
12944
- }, [this.config[a].than || this.config[a].range || this.config[a].scope ? h("el-col", {
12945
- "class": "range-cols"
12946
- }, [h("el-col", {
12947
- "attrs": {
12948
- "span": 12
12949
- }
12950
- }, [this.format(a, `${a}LE`, this.prompt(this.config[a], 0, '最高'))]), h("el-col", {
12951
- "attrs": {
12952
- "span": 12
12953
- }
12954
- }, [this.format(a, `${a}GE`, this.prompt(this.config[a], 1, '最低'))])]) : this.format(a)])]);
12955
12996
  }
12956
12997
  },
12957
12998
  render() {
@@ -12963,6 +13004,10 @@ __webpack_require__.r(__webpack_exports__);
12963
13004
  submit = null,
12964
13005
  cancel = null
12965
13006
  } = this.$listeners;
13007
+ let style = this.cols != '' ? {
13008
+ width: `${100 / this.cols}%`
13009
+ } : {};
13010
+ let label = a => this.label ? this.config[a].text || this.config[a].label || this.config[a].title : '';
12966
13011
  return h("div", {
12967
13012
  "class": "c-f-search",
12968
13013
  "style": {
@@ -12971,8 +13016,7 @@ __webpack_require__.r(__webpack_exports__);
12971
13016
  }, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
12972
13017
  "ref": "form",
12973
13018
  "attrs": {
12974
- "size": this.size,
12975
- "inline": this.inline
13019
+ "size": this.size
12976
13020
  }
12977
13021
  }, {
12978
13022
  "props": {
@@ -12984,42 +13028,38 @@ __webpack_require__.r(__webpack_exports__);
12984
13028
  "labelWidth": this.labelWidth,
12985
13029
  "labelPosition": this.labelPosition
12986
13030
  }
12987
- }]), [h("div", {
12988
- "class": "column"
12989
- }, [h("el-row", {
13031
+ }]), [h("el-row", {
12990
13032
  "attrs": {
12991
13033
  "gutter": Number(this.gutter)
12992
- },
12993
- "class": "main-row"
12994
- }, [Object.keys(this.config).map((a, b) => b < this.cols && this.output(a, b))]), h("el-row", {
13034
+ }
13035
+ }, [Object.keys(this.config).map((a, b) => h("el-col", {
13036
+ "key": b,
13037
+ "class": "column",
13038
+ "style": style
13039
+ }, [h("el-form-item", {
12995
13040
  "attrs": {
12996
- "gutter": Number(this.gutter)
12997
- },
12998
- "class": "fold-row",
12999
- "style": {
13000
- height: this.opened ? `${this.height}px` : '0'
13041
+ "prop": `${a}`,
13042
+ "label": label(a)
13001
13043
  }
13002
- }, [Object.keys(this.config).map((a, b) => b > this.cols - 1 && this.output(a, b))])]), (Object.keys(this.config).length > this.cols || submit || cancel) && h("div", {
13003
- "class": "action",
13004
- "style": {
13005
- paddingLeft: `${this.gutter}px`
13044
+ }, [this.config[a].than || this.config[a].range || this.config[a].scope ? h("el-col", {
13045
+ "class": "range-cols"
13046
+ }, [h("el-col", {
13047
+ "attrs": {
13048
+ "span": 12
13006
13049
  }
13007
- }, [h("el-form-item", {
13050
+ }, [this.format(a, `${a}LE`, this.prompt(this.config[a], 0, '最高'))]), h("el-col", {
13008
13051
  "attrs": {
13009
- "label": "action"
13052
+ "span": 12
13010
13053
  }
13011
- }, [Object.keys(this.config).length > this.cols && h("el-button", {
13054
+ }, [this.format(a, `${a}GE`, this.prompt(this.config[a], 1, '最低'))])]) : this.format(a)])])), this.$slots.default, (submit || cancel) && h("el-col", {
13055
+ "key": "action",
13056
+ "class": "action",
13057
+ "style": style
13058
+ }, [h("el-form-item", {
13012
13059
  "attrs": {
13013
- "disabled": this.loading,
13014
- "type": "text"
13015
- },
13016
- "class": "collapse-button",
13017
- "on": {
13018
- "click": this.switch
13060
+ "label": this.label ? 'action' : ''
13019
13061
  }
13020
- }, [h("i", {
13021
- "class": `el-icon-arrow-${this.opened ? 'up' : 'down'}`
13022
- }), this.opened ? '收起' : '展开']), submit && h("el-button", {
13062
+ }, [submit && h("el-button", {
13023
13063
  "attrs": {
13024
13064
  "disabled": this.loading,
13025
13065
  "type": "primary"
@@ -13035,7 +13075,7 @@ __webpack_require__.r(__webpack_exports__);
13035
13075
  "on": {
13036
13076
  "click": this.cancel
13037
13077
  }
13038
- }, [this.cancelText])])])])]);
13078
+ }, [this.cancelText])])])])])]);
13039
13079
  }
13040
13080
  });
13041
13081
 
@@ -13176,6 +13216,7 @@ var map = {
13176
13216
  "./AdragBox": "0a59",
13177
13217
  "./AdragBox/": "0a59",
13178
13218
  "./AdragBox/index": "0a59",
13219
+ "./AdragBox/index.css": "5a1c",
13179
13220
  "./AdragBox/index.js": "0a59",
13180
13221
  "./AdropBox": "b7dd",
13181
13222
  "./AdropBox/": "b7dd",
@@ -13835,14 +13876,14 @@ __webpack_require__.r(__webpack_exports__);
13835
13876
  if (Object.keys(this.config).length > 0) {
13836
13877
  // 格式化属性为模糊查询属性
13837
13878
  for (let a in this.config) {
13838
- if (this.config[a] != '' && this.config[a].like && this.form[a].trim() != '' && this.form[a].trim() != null && this.form[a].trim() != undefined) {
13839
- if (this.config[a].like == 'left') data[a] = '%' + this.form[a].trim();
13840
- if (this.config[a].like == 'right') data[a] = this.form[a].trim() + '%';else data[a] = '%' + this.form[a].trim() + '%';
13879
+ if (this.config[a] != '' && this.config[a].like && this.form[a] != '' && this.form[a] != null && this.form[a] != undefined) {
13880
+ if (this.config[a].like == 'left') data[a] = '%' + this.form[a];
13881
+ if (this.config[a].like == 'right') data[a] = this.form[a] + '%';else data[a] = '%' + this.form[a] + '%';
13841
13882
  } else {
13842
13883
  if (this.config[a] != '' && (this.config[a].than || this.config[a].range || this.config[a].scope)) {
13843
- data[`${a}LE`] = this.form[`${a}LE`].trim();
13844
- data[`${a}GE`] = this.form[`${a}GE`].trim();
13845
- } else if (this.form[a].trim().includes(' 00:00:00')) data[a] = '%' + this.form[a].trim().split(' 00:00:00')[0] + '%';else data[a] = this.form[a].trim();
13884
+ data[`${a}LE`] = this.form[`${a}LE`];
13885
+ data[`${a}GE`] = this.form[`${a}GE`];
13886
+ } else if (this.form[a].includes(' 00:00:00')) data[a] = '%' + this.form[a].split(' 00:00:00')[0] + '%';else data[a] = this.form[a];
13846
13887
  }
13847
13888
  }
13848
13889
  }
@@ -13852,8 +13893,8 @@ __webpack_require__.r(__webpack_exports__);
13852
13893
  formParams,
13853
13894
  pageParams
13854
13895
  } = this.$store.state;
13855
- this.$store.commit('changeFormParams', result); // 添加查询参数
13856
- this.$store.commit('changePageParams', {
13896
+ this.$store.commit('setFormParams', result); // 添加查询参数
13897
+ this.$store.commit('setPageParams', {
13857
13898
  ...pageParams,
13858
13899
  page: 1
13859
13900
  }); // 重置分页参数
@@ -13878,12 +13919,12 @@ __webpack_require__.r(__webpack_exports__);
13878
13919
  const {
13879
13920
  pageParams
13880
13921
  } = this.$store.state;
13881
- this.$store.commit('changePageParams', {
13922
+ this.$store.commit('setPageParams', {
13882
13923
  ...pageParams,
13883
13924
  page: 1,
13884
13925
  size: 10
13885
13926
  }); // 重置分页参数
13886
- this.$store.commit('changeFormParams', {}); // 重置查询参数
13927
+ this.$store.commit('setFormParams', {}); // 重置查询参数
13887
13928
  this.$nextTick(() => {
13888
13929
  for (let a in this.form) this.form[a] = '';
13889
13930
  this.$nextTick(() => this.$emit('cancel', this.form));
@@ -36495,6 +36536,17 @@ exports.scale = scale;
36495
36536
  exports.invert = invert;
36496
36537
  exports.clone = clone;
36497
36538
 
36539
+ /***/ }),
36540
+
36541
+ /***/ "5934":
36542
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
36543
+
36544
+ "use strict";
36545
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_0_9_0_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_3_6_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_15_10_1_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_15_10_1_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_446b4709_prod_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("e95a");
36546
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_0_9_0_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_3_6_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_15_10_1_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_15_10_1_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_446b4709_prod_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_0_9_0_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_3_6_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_15_10_1_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_15_10_1_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_446b4709_prod_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
36547
+ /* unused harmony reexport * */
36548
+
36549
+
36498
36550
  /***/ }),
36499
36551
 
36500
36552
  /***/ "5974":
@@ -36580,6 +36632,13 @@ module.exports = _default;
36580
36632
 
36581
36633
  /***/ }),
36582
36634
 
36635
+ /***/ "5a1c":
36636
+ /***/ (function(module, exports, __webpack_require__) {
36637
+
36638
+ // extracted by mini-css-extract-plugin
36639
+
36640
+ /***/ }),
36641
+
36583
36642
  /***/ "5aac":
36584
36643
  /***/ (function(module, exports) {
36585
36644
 
@@ -37101,6 +37160,13 @@ module.exports = _default;
37101
37160
 
37102
37161
  /***/ }),
37103
37162
 
37163
+ /***/ "5bf5":
37164
+ /***/ (function(module, exports, __webpack_require__) {
37165
+
37166
+ // extracted by mini-css-extract-plugin
37167
+
37168
+ /***/ }),
37169
+
37104
37170
  /***/ "5c61":
37105
37171
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
37106
37172
 
@@ -40512,8 +40578,8 @@ __webpack_require__.r(__webpack_exports__);
40512
40578
  return YYYY + '-' + MM + '-' + DD + ' ' + H + ':' + M + ':' + S;
40513
40579
  },
40514
40580
  select(items) {
40515
- this.$store.commit('changeSelectedRows', items);
40516
- this.$store.commit('changeSelectedKeys', items.map(a => a[this.rowKey]));
40581
+ this.$store.commit('setSelectedRows', items);
40582
+ this.$store.commit('setSelectedKeys', items.map(a => a[this.rowKey]));
40517
40583
  this.$emit('select', {
40518
40584
  rows: items,
40519
40585
  keys: items.map(a => a[this.rowKey])
@@ -40523,7 +40589,7 @@ __webpack_require__.r(__webpack_exports__);
40523
40589
  page: 1,
40524
40590
  size: 10
40525
40591
  }) {
40526
- this.$store.commit('changePageParams', pages);
40592
+ this.$store.commit('setPageParams', pages);
40527
40593
  this.$emit('change', pages);
40528
40594
  this.search(pages);
40529
40595
  },
@@ -47708,13 +47774,6 @@ module.exports = _default;
47708
47774
 
47709
47775
  /***/ }),
47710
47776
 
47711
- /***/ "731e":
47712
- /***/ (function(module, exports, __webpack_require__) {
47713
-
47714
- // extracted by mini-css-extract-plugin
47715
-
47716
- /***/ }),
47717
-
47718
47777
  /***/ "734e":
47719
47778
  /***/ (function(module, exports) {
47720
47779
 
@@ -50913,22 +50972,11 @@ module.exports = _default;
50913
50972
  __webpack_require__.r(__webpack_exports__);
50914
50973
  /* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
50915
50974
  /* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__);
50916
- /* harmony import */ var _components_Aactions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e94c");
50917
- /* harmony import */ var _components_Aempty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("bd5e");
50918
- /* harmony import */ var _components_Aenume__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("6cc8");
50919
- /* harmony import */ var _components_Aform_AfSearch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("1b78");
50920
- /* harmony import */ var _components_Aform_BfSearch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("fc0d");
50921
- /* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("2234");
50922
- /* harmony import */ var _components_Apages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("1d0c");
50923
- /* harmony import */ var _components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("2ee7");
50924
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("e6e6");
50925
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_9__);
50926
-
50927
-
50928
-
50929
-
50930
-
50931
-
50975
+ /* harmony import */ var _components_Aenume__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("6cc8");
50976
+ /* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("2234");
50977
+ /* harmony import */ var _components_Apages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("1d0c");
50978
+ /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("e6e6");
50979
+ /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_4__);
50932
50980
 
50933
50981
 
50934
50982
 
@@ -50937,20 +50985,11 @@ __webpack_require__.r(__webpack_exports__);
50937
50985
  /* harmony default export */ __webpack_exports__["default"] = ({
50938
50986
  name: 'Ctable',
50939
50987
  components: {
50940
- Aactions: _components_Aactions__WEBPACK_IMPORTED_MODULE_1__["default"],
50941
- Aempty: _components_Aempty__WEBPACK_IMPORTED_MODULE_2__["default"],
50942
- Aenume: _components_Aenume__WEBPACK_IMPORTED_MODULE_3__["default"],
50943
- AfSearch: _components_Aform_AfSearch__WEBPACK_IMPORTED_MODULE_4__["default"],
50944
- BfSearch: _components_Aform_BfSearch__WEBPACK_IMPORTED_MODULE_5__["default"],
50945
- AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_6__["default"],
50946
- Apages: _components_Apages__WEBPACK_IMPORTED_MODULE_7__["default"],
50947
- Apopconfirm: _components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"]
50988
+ Aenume: _components_Aenume__WEBPACK_IMPORTED_MODULE_1__["default"],
50989
+ AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_2__["default"],
50990
+ Apages: _components_Apages__WEBPACK_IMPORTED_MODULE_3__["default"]
50948
50991
  },
50949
50992
  props: {
50950
- margin: {
50951
- type: String,
50952
- default: () => '0'
50953
- },
50954
50993
  rowKey: {
50955
50994
  type: String,
50956
50995
  default: () => 'id'
@@ -50959,22 +50998,10 @@ __webpack_require__.r(__webpack_exports__);
50959
50998
  type: String,
50960
50999
  default: () => 'medium'
50961
51000
  },
50962
- selectionWidth: {
50963
- type: String,
50964
- default: () => '50'
50965
- },
50966
51001
  sort: {
50967
51002
  type: Boolean,
50968
51003
  default: () => true
50969
51004
  },
50970
- sortTitle: {
50971
- type: String,
50972
- default: () => '#'
50973
- },
50974
- sortWidth: {
50975
- type: String,
50976
- default: () => '50'
50977
- },
50978
51005
  border: {
50979
51006
  type: Boolean,
50980
51007
  default: () => false
@@ -50983,10 +51010,6 @@ __webpack_require__.r(__webpack_exports__);
50983
51010
  type: Boolean,
50984
51011
  default: () => false
50985
51012
  },
50986
- loading: {
50987
- type: Boolean,
50988
- default: () => false
50989
- },
50990
51013
  column: {
50991
51014
  type: Array,
50992
51015
  default: () => []
@@ -50995,50 +51018,18 @@ __webpack_require__.r(__webpack_exports__);
50995
51018
  type: Object,
50996
51019
  default: () => ({})
50997
51020
  },
50998
- maxHeight: {
50999
- type: String,
51000
- default: () => '480'
51001
- },
51002
- elementLoadingText: {
51003
- type: String,
51004
- default: () => ''
51005
- },
51006
- elementLoadingSpinner: {
51007
- type: String,
51008
- default: () => 'el-icon-loading'
51009
- },
51010
- elementLoadingBackground: {
51011
- type: String,
51012
- default: () => 'rgba(0, 0, 0, 0.04)'
51013
- },
51014
- emptyText: {
51015
- type: String,
51016
- default: () => ''
51017
- },
51018
- showHeader: {
51019
- type: Boolean,
51020
- default: () => true
51021
+ params: {
51022
+ type: Object,
51023
+ default: () => ({})
51021
51024
  },
51022
51025
  selection: {
51023
51026
  type: Boolean,
51024
- default: () => true
51027
+ default: () => false
51025
51028
  },
51026
51029
  showOverflowTooltip: {
51027
51030
  type: Boolean,
51028
51031
  default: () => true
51029
51032
  },
51030
- tooltipEffect: {
51031
- type: String,
51032
- default: () => 'light'
51033
- },
51034
- showSummary: {
51035
- type: Boolean,
51036
- default: () => false
51037
- },
51038
- sumText: {
51039
- type: String,
51040
- default: () => '合计'
51041
- },
51042
51033
  sortable: {
51043
51034
  type: Boolean,
51044
51035
  default: () => false
@@ -51065,22 +51056,6 @@ __webpack_require__.r(__webpack_exports__);
51065
51056
  hasChildren: 'hasChildren'
51066
51057
  })
51067
51058
  },
51068
- highlightCurrentRow: {
51069
- type: Boolean,
51070
- default: () => false
51071
- },
51072
- action: {
51073
- type: Object,
51074
- default: () => ({
51075
- review: null,
51076
- modify: null,
51077
- update: null,
51078
- handle: null,
51079
- remove: null,
51080
- delete: null,
51081
- export: null
51082
- })
51083
- },
51084
51059
  actionWidth: {
51085
51060
  type: String,
51086
51061
  default: () => '180px'
@@ -51089,157 +51064,138 @@ __webpack_require__.r(__webpack_exports__);
51089
51064
  type: String,
51090
51065
  default: () => '操作'
51091
51066
  },
51092
- page: {
51067
+ formatTime: {
51068
+ type: Boolean,
51069
+ default: () => true
51070
+ },
51071
+ preview: {
51093
51072
  type: Boolean,
51094
51073
  default: () => false
51074
+ },
51075
+ page: {
51076
+ type: Boolean,
51077
+ default: () => true
51095
51078
  }
51096
51079
  },
51097
- mounted() {
51098
- this.$refs['c-table'].bodyWrapper.addEventListener('wheel', this.scroll);
51080
+ data() {
51081
+ return {
51082
+ loading: false
51083
+ };
51099
51084
  },
51100
- beforeDestroy() {
51101
- this.$refs['c-table'].bodyWrapper.removeEventListener('wheel', this.scroll);
51085
+ created() {
51086
+ this.search();
51087
+ this.create();
51102
51088
  },
51103
- destroyed() {
51104
- this.create = null;
51105
- this.search = null;
51106
- this.select = null;
51107
- this.choose = null;
51108
- this.change = null;
51109
- this.format = null;
51110
- this.scroll = null;
51089
+ mounted() {
51090
+ this.$refs['c-table'].bodyWrapper.addEventListener('scroll', this.scroll);
51111
51091
  },
51112
51092
  methods: {
51113
- create() {
51093
+ create(column = []) {
51114
51094
  const h = this.$createElement;
51115
- let column = [...this.column, this.suffix()];
51116
- return column.map((a, b) => {
51117
- if (a && Object.keys(a).length > 0) {
51118
- let {
51119
- type = null,
51120
- render = null,
51121
- header = null,
51122
- ...r
51123
- } = a;
51124
- let field = a.field || a.index || a.name || a.prop;
51125
- let label = a.label || a.title || a.text;
51126
- let props = {
51127
- key: b,
51128
- prop: field,
51129
- scopedSlot: field,
51130
- sortable: field ? a.sortable ? a.sortable : this.sortable : false,
51131
- formatter: render ? render : type ? (e, f, g, h) => this.format(a, b, e, h) : null,
51132
- showOverflowTooltip: a.showOverflowTooltip ? a.showOverflowTooltip : this.showOverflowTooltip,
51133
- ...r
51134
- };
51135
- return h("el-table-column", {
51136
- "props": {
51137
- ...props
51138
- }
51139
- }, [h("template", {
51140
- "slot": "header"
51141
- }, [header ? () => header(r) : label && label != '' && label.length && label.length > 8 ? h("el-tooltip", {
51142
- "attrs": {
51143
- "content": label,
51144
- "placement": "top"
51145
- }
51146
- }, [h("span", {
51147
- "attrs": {
51148
- "title": label
51149
- }
51150
- }, [label])]) : h("span", {
51151
- "attrs": {
51152
- "title": label
51153
- }
51154
- }, [label])])]);
51095
+ if (this.formatTime && this.column.length > 0) {
51096
+ for (let a in this.column) {
51097
+ if (this.column[a].field && this.column[a].field.toLowerCase().includes('time')) {
51098
+ this.column[a].render = item => item[this.column[a].field] != '' && this.filter(item[this.column[a].field]);
51099
+ }
51155
51100
  }
51156
- });
51157
- },
51158
- suffix() {
51159
- const h = this.$createElement;
51160
- if (this.action.review || this.action.modify || this.action.update || this.action.handle || this.action.remove || this.action.delete || this.action.export || this.$listeners.review || this.$listeners.modify || this.$listeners.update || this.$listeners.handle || this.$listeners.remove || this.$listeners.delete || this.$listeners.export) {
51161
- return {
51162
- fixed: 'right',
51163
- align: 'center',
51164
- width: this.actionWidth,
51165
- label: this.actionTitle,
51166
- formatter: item => h("div", {
51167
- "class": "action"
51168
- }, [this.action.review && h("i", {
51169
- "class": "el-icon-view",
51170
- "on": {
51171
- "click": () => this.action.review(item)
51172
- }
51173
- }), this.action.modify && h("i", {
51174
- "class": "el-icon-edit",
51175
- "on": {
51176
- "click": () => this.action.modify(item)
51177
- }
51178
- }), this.action.update && h("i", {
51179
- "class": "el-icon-edit",
51180
- "on": {
51181
- "click": () => this.action.update(item)
51182
- }
51183
- }), this.action.handle && h("i", {
51184
- "class": "el-icon-edit",
51185
- "on": {
51186
- "click": () => this.action.handle(item)
51187
- }
51188
- }), this.action.remove && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
51189
- "on": {
51190
- "submit": () => this.action.remove(item)
51191
- }
51192
- }), this.action.delete && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
51193
- "on": {
51194
- "submit": () => this.action.delete(item)
51195
- }
51196
- }), this.action.export && h("i", {
51197
- "class": "el-icon-download",
51198
- "on": {
51199
- "click": () => this.action.export(item)
51200
- }
51201
- }), this.$listeners.review && h("i", {
51202
- "class": "el-icon-view",
51203
- "on": {
51204
- "click": () => this.$listeners.review(item)
51205
- }
51206
- }), this.$listeners.modify && h("i", {
51207
- "class": "el-icon-edit",
51208
- "on": {
51209
- "click": () => this.$listeners.modify(item)
51210
- }
51211
- }), this.$listeners.update && h("i", {
51212
- "class": "el-icon-edit",
51213
- "on": {
51214
- "click": () => this.$listeners.update(item)
51215
- }
51216
- }), this.$listeners.handle && h("i", {
51217
- "class": "el-icon-edit",
51218
- "on": {
51219
- "click": () => this.$listeners.handle(item)
51220
- }
51221
- }), this.$listeners.remove && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
51222
- "on": {
51223
- "submit": () => this.$listeners.remove(item)
51224
- }
51225
- }), this.$listeners.delete && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
51226
- "on": {
51227
- "submit": () => this.$listeners.delete(item)
51228
- }
51229
- }), this.$listeners.export && h("i", {
51230
- "class": "el-icon-download",
51231
- "on": {
51232
- "click": () => this.$listeners.export(item)
51233
- }
51234
- })])
51235
- };
51236
51101
  }
51102
+ const actionColumn = () => {
51103
+ let data = [];
51104
+ const {
51105
+ review,
51106
+ modify,
51107
+ update,
51108
+ handle,
51109
+ remove
51110
+ } = this.$listeners;
51111
+ if (review || modify || update || handle || remove || this.$listeners.delete || this.$listeners.export) {
51112
+ data = [{
51113
+ label: this.actionTitle,
51114
+ fixed: 'right',
51115
+ align: 'center',
51116
+ width: this.actionWidth,
51117
+ render: item => h("div", {
51118
+ "class": "action"
51119
+ }, [review && h("i", {
51120
+ "class": "el-icon-view",
51121
+ "on": {
51122
+ "click": () => review(item)
51123
+ }
51124
+ }), modify && h("i", {
51125
+ "class": "el-icon-edit",
51126
+ "on": {
51127
+ "click": () => modify(item)
51128
+ }
51129
+ }), update && h("i", {
51130
+ "class": "el-icon-edit",
51131
+ "on": {
51132
+ "click": () => update(item)
51133
+ }
51134
+ }), handle && h("i", {
51135
+ "class": "el-icon-edit",
51136
+ "on": {
51137
+ "click": () => handle(item)
51138
+ }
51139
+ }), remove && h("Apopconfirm", {
51140
+ "on": {
51141
+ "submit": () => remove(item)
51142
+ }
51143
+ }), this.$listeners.delete && h("Apopconfirm", {
51144
+ "on": {
51145
+ "submit": () => this.$listeners.delete(item)
51146
+ }
51147
+ }), this.$listeners.export && h("i", {
51148
+ "class": "el-icon-download",
51149
+ "on": {
51150
+ "click": () => this.$listeners.export(item)
51151
+ }
51152
+ })])
51153
+ }];
51154
+ }
51155
+ return data;
51156
+ };
51157
+ const columnConfig = [...column, ...actionColumn()];
51158
+ return columnConfig.map((a, b) => {
51159
+ if (a) return h("el-table-column", {
51160
+ "key": b,
51161
+ "attrs": {
51162
+ "prop": a.field,
51163
+ "showOverflowTooltip": this.showOverflowTooltip,
51164
+ "sortable": a.field ? a.sortable ? a.sortable : this.sortable : false,
51165
+ "formatter": a.formatter ? (e, f, g, h) => a.formatter(e, h) : a.render ? (e, f, g, h) => a.render(e, h) : a.type ? (e, f, g, h) => this.format(a, b, e, h) : null
51166
+ },
51167
+ "props": {
51168
+ ...a
51169
+ }
51170
+ });
51171
+ });
51237
51172
  },
51238
- search(params = {}) {
51173
+ search() {
51174
+ const {
51175
+ pageParams,
51176
+ formParams
51177
+ } = this.$store.state;
51178
+ const params = Object.assign({}, pageParams, formParams, this.params);
51239
51179
  this.$emit('search', params);
51240
51180
  },
51241
- select(items = []) {
51242
- this.$emit('select', items);
51181
+ filter(timeStamp) {
51182
+ if (!typeof timeStamp == Number) return '';
51183
+ let time = new Date(timeStamp);
51184
+ const YYYY = time.getFullYear();
51185
+ const MM = time.getMonth() + 1 < 10 ? '0' + (time.getMonth() + 1) : time.getMonth() + 1;
51186
+ const DD = time.getDate() < 10 ? '0' + time.getDate() : time.getDate();
51187
+ const H = time.getHours() < 10 ? '0' + time.getHours() : time.getHours();
51188
+ const M = time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes();
51189
+ const S = time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds();
51190
+ return YYYY + '-' + MM + '-' + DD + ' ' + H + ':' + M + ':' + S;
51191
+ },
51192
+ select(items) {
51193
+ this.$store.commit('setSelectedRows', items);
51194
+ this.$store.commit('setSelectedKeys', items.map(a => a[this.rowKey]));
51195
+ this.$emit('select', {
51196
+ rows: items,
51197
+ keys: items.map(a => a[this.rowKey])
51198
+ });
51243
51199
  },
51244
51200
  choose(row, column, event) {
51245
51201
  this.$emit('choose', {
@@ -51252,27 +51208,47 @@ __webpack_require__.r(__webpack_exports__);
51252
51208
  page: 1,
51253
51209
  size: 10
51254
51210
  }) {
51211
+ this.$store.commit('setPageParams', pages);
51255
51212
  this.$emit('change', pages);
51256
51213
  this.search(pages);
51257
51214
  },
51215
+ switch(name = '', symbol = '_') {
51216
+ return name.replace(/([A-Z])/g, `${symbol}$1`).toLowerCase();
51217
+ },
51258
51218
  format({
51259
- type = '',
51260
- name = '',
51261
- data = [],
51262
- text = '',
51263
- label = '',
51264
- title = '',
51265
- field = '',
51266
- dicts = [],
51219
+ label,
51220
+ field,
51221
+ type,
51222
+ disabled,
51223
+ action = '',
51224
+ path = '',
51225
+ flag = '',
51267
51226
  ...props
51268
51227
  }, colIndex, item, rowIndex) {
51269
51228
  const h = this.$createElement;
51270
- if (type == 'enume' || type == 'enumerate') {
51271
- if (field != '') return h(_components_Aenume__WEBPACK_IMPORTED_MODULE_3__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
51229
+ if (this.preview && (type != 'select' || type != 'enume' || type != 'enumerate')) return h("span", {
51230
+ "key": colIndex + '-' + rowIndex
51231
+ }, [item[field]]);
51232
+ if (type == 'select' || type == 'enume' || type == 'enumerate') {
51233
+ let dicts = [];
51234
+ if (this.optionApi != '' || action != '' || path != '') {
51235
+ let url = action != '' ? action : path != '' ? path : this.optionApi;
51236
+ let params = flag != '' ? {
51237
+ flag: this.switch(flag)
51238
+ } : {
51239
+ field: this.switch(field)
51240
+ };
51241
+ FN.get(url, params).then(({
51242
+ data
51243
+ }) => {
51244
+ if (data && data.length > 0) dicts = data;
51245
+ });
51246
+ }
51247
+ return h(_components_Aenume__WEBPACK_IMPORTED_MODULE_1__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
51272
51248
  "key": colIndex + '-' + rowIndex,
51273
51249
  "attrs": {
51274
- "field": field,
51275
- "data": dicts.length > 0 ? dicts : data
51250
+ "field": `${field}`,
51251
+ "data": dicts
51276
51252
  }
51277
51253
  }, props, {
51278
51254
  "model": {
@@ -51282,103 +51258,47 @@ __webpack_require__.r(__webpack_exports__);
51282
51258
  }
51283
51259
  }
51284
51260
  }]));
51285
- return h(_components_Aenume__WEBPACK_IMPORTED_MODULE_3__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
51286
- "key": colIndex + '-' + rowIndex,
51287
- "attrs": {
51288
- "field": name,
51289
- "data": dicts.length > 0 ? dicts : data
51290
- }
51291
- }, props, {
51292
- "model": {
51293
- value: item[name],
51294
- callback: $$v => {
51295
- this.$set(item, name, $$v);
51296
- }
51297
- }
51298
- }]));
51299
51261
  }
51300
- return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_6__["default"], {
51262
+ return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_2__["default"], {
51301
51263
  "key": colIndex + '-' + rowIndex,
51302
51264
  "attrs": {
51303
51265
  "config": {
51304
51266
  type,
51305
51267
  form: item,
51306
- dicts: dicts.length > 0 ? dicts : data,
51307
- field: field != '' ? field : name != '' ? name : '',
51308
- label: text != '' ? text : label != '' ? label : title != '' ? title : '无栏目名称',
51268
+ label,
51269
+ field: `${field}`,
51270
+ dicts,
51271
+ table: true,
51309
51272
  ...props
51310
51273
  }
51311
51274
  }
51312
51275
  });
51313
51276
  },
51314
- scroll(a) {
51315
- let container = this.$refs['c-table'].bodyWrapper;
51316
- if (container) {
51317
- if (container.scrollHeight > container.clientHeight) {
51318
- a.preventDefault();
51319
- container.scrollTop += a.deltaY;
51320
- } else {
51321
- if (container.scrollWidth > container.clientWidth) {
51322
- a.preventDefault();
51323
- container.scrollLeft += a.deltaY;
51324
- }
51325
- }
51326
- this.$emit('scroll', a);
51327
- }
51277
+ scroll({
51278
+ target
51279
+ }) {
51280
+ this.$emit('scroll', target);
51328
51281
  }
51329
51282
  },
51330
51283
  render() {
51331
51284
  const h = arguments[0];
51332
51285
  const {
51333
- formCols = '6',
51334
- searchVerify = true,
51335
- searchConfig = {},
51336
- actionConfig = [],
51337
- ...props
51338
- } = this.$attrs;
51339
- const {
51340
- ...r
51286
+ data = [],
51287
+ size = 0
51341
51288
  } = this.record;
51342
- const data = r.data ? r.data : r.list ? r.list : r.rows ? r.rows : r.record ? r.record : r.records ? r.records : [];
51343
- const size = r.size ? r.size : r.total ? r.total : r.count ? r.count : 0;
51344
51289
  const {
51345
- loading = false,
51346
- search = null
51347
- } = this;
51348
- const condition = data.length > 0;
51290
+ pageParams
51291
+ } = this.$store.state;
51292
+ const condition = data && data.length > 0;
51293
+ const {
51294
+ ...props
51295
+ } = this.$attrs;
51349
51296
  return h("div", {
51350
- "style": {
51351
- padding: this.margin
51352
- }
51353
- }, [Object.keys(searchConfig).length > 0 && (Object.keys(searchConfig).length < 5 ? h(_components_Aform_AfSearch__WEBPACK_IMPORTED_MODULE_4__["default"], {
51354
- "attrs": {
51355
- "cols": formCols,
51356
- "verify": searchVerify,
51357
- "config": searchConfig,
51358
- "loading": loading
51359
- },
51360
- "on": {
51361
- "submit": search,
51362
- "cancel": search
51363
- }
51364
- }) : h(_components_Aform_BfSearch__WEBPACK_IMPORTED_MODULE_5__["default"], {
51365
- "attrs": {
51366
- "cols": formCols,
51367
- "verify": searchVerify,
51368
- "config": searchConfig,
51369
- "loading": loading
51370
- },
51371
- "on": {
51372
- "submit": search,
51373
- "cancel": search
51374
- }
51375
- })), actionConfig.length > 0 && h(_components_Aactions__WEBPACK_IMPORTED_MODULE_1__["default"], {
51376
- "attrs": {
51377
- "config": actionConfig,
51378
- "disabled": loading
51379
- }
51380
- }), h("div", {
51381
- "class": this.border ? 'c-table' : 'c-table border'
51297
+ "class": "c-table",
51298
+ "directives": [{
51299
+ name: "loading",
51300
+ value: this.loading
51301
+ }]
51382
51302
  }, [h("el-table", {
51383
51303
  "ref": "c-table",
51384
51304
  "attrs": {
@@ -51386,23 +51306,12 @@ __webpack_require__.r(__webpack_exports__);
51386
51306
  "size": this.size,
51387
51307
  "border": this.border,
51388
51308
  "stripe": this.stripe,
51309
+ "column": this.column,
51389
51310
  "row-key": this.rowKey,
51390
- "max-height": this.maxHeight,
51391
- "element-loading-text": this.elementLoadingText,
51392
- "element-loading-spinner": this.elementLoadingSpinner,
51393
- "element-loading-background": this.elementLoadingBackground,
51394
- "show-header": this.showHeader,
51395
51311
  "default-sort": this.defaultSort,
51396
- "show-summary": this.showSummary,
51397
- "tooltip-effect": this.tooltipEffect,
51398
- "default-expand-all": this.defaultExpandAll,
51399
51312
  "tree-props": this.tree ? this.treeProps : {},
51400
- "highlight-current-row": this.highlightCurrentRow
51313
+ "default-expand-all": this.defaultExpandAll
51401
51314
  },
51402
- "directives": [{
51403
- name: "loading",
51404
- value: loading
51405
- }],
51406
51315
  "on": {
51407
51316
  "row-click": this.choose,
51408
51317
  "selection-change": this.select
@@ -51410,34 +51319,28 @@ __webpack_require__.r(__webpack_exports__);
51410
51319
  "props": {
51411
51320
  ...props
51412
51321
  }
51413
- }, [condition && (this.selection || this.$listeners.select) && h("el-table-column", {
51322
+ }, [condition && this.selection && h("el-table-column", {
51414
51323
  "attrs": {
51415
51324
  "fixed": "left",
51416
51325
  "type": "selection",
51417
- "width": this.selectionWidth
51326
+ "width": "50"
51418
51327
  }
51419
51328
  }), condition && this.sort && h("el-table-column", {
51420
51329
  "attrs": {
51421
51330
  "fixed": "left",
51422
51331
  "type": "index",
51423
- "width": this.sortWidth,
51424
- "label": this.sortTitle
51425
- }
51426
- }), condition && this.create(), condition && this.$slots.default, h("div", {
51427
- "slot": "empty",
51428
- "class": "empty"
51429
- }, [!loading && h(_components_Aempty__WEBPACK_IMPORTED_MODULE_2__["default"], {
51430
- "attrs": {
51431
- "description": this.emptyText
51332
+ "width": "50",
51333
+ "label": "#"
51432
51334
  }
51433
- })])]), !this.tree && this.page && condition && h(_components_Apages__WEBPACK_IMPORTED_MODULE_7__["default"], {
51335
+ }), condition && this.create(this.column)]), !this.tree && this.page && condition && h(_components_Apages__WEBPACK_IMPORTED_MODULE_3__["default"], {
51434
51336
  "attrs": {
51435
- "total": Number(size)
51337
+ "total": Number(size),
51338
+ "pages": pageParams
51436
51339
  },
51437
51340
  "on": {
51438
51341
  "change": this.change
51439
51342
  }
51440
- })])]);
51343
+ })]);
51441
51344
  }
51442
51345
  });
51443
51346
 
@@ -61684,11 +61587,22 @@ __webpack_require__.r(__webpack_exports__);
61684
61587
  __webpack_require__.r(__webpack_exports__);
61685
61588
  /* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
61686
61589
  /* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__);
61687
- /* harmony import */ var _components_Aenume__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("6cc8");
61688
- /* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("2234");
61689
- /* harmony import */ var _components_Apages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("1d0c");
61690
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("f4d2");
61691
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_4__);
61590
+ /* harmony import */ var _components_Aactions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e94c");
61591
+ /* harmony import */ var _components_Aempty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("bd5e");
61592
+ /* harmony import */ var _components_Aenume__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("6cc8");
61593
+ /* harmony import */ var _components_Aform_AfSearch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("1b78");
61594
+ /* harmony import */ var _components_Aform_BfSearch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("fc0d");
61595
+ /* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("2234");
61596
+ /* harmony import */ var _components_Apages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("1d0c");
61597
+ /* harmony import */ var _components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("2ee7");
61598
+ /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("f4d2");
61599
+ /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_9__);
61600
+
61601
+
61602
+
61603
+
61604
+
61605
+
61692
61606
 
61693
61607
 
61694
61608
 
@@ -61697,11 +61611,20 @@ __webpack_require__.r(__webpack_exports__);
61697
61611
  /* harmony default export */ __webpack_exports__["default"] = ({
61698
61612
  name: 'Btable',
61699
61613
  components: {
61700
- Aenume: _components_Aenume__WEBPACK_IMPORTED_MODULE_1__["default"],
61701
- AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_2__["default"],
61702
- Apages: _components_Apages__WEBPACK_IMPORTED_MODULE_3__["default"]
61614
+ Aactions: _components_Aactions__WEBPACK_IMPORTED_MODULE_1__["default"],
61615
+ Aempty: _components_Aempty__WEBPACK_IMPORTED_MODULE_2__["default"],
61616
+ Aenume: _components_Aenume__WEBPACK_IMPORTED_MODULE_3__["default"],
61617
+ AfSearch: _components_Aform_AfSearch__WEBPACK_IMPORTED_MODULE_4__["default"],
61618
+ BfSearch: _components_Aform_BfSearch__WEBPACK_IMPORTED_MODULE_5__["default"],
61619
+ AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_6__["default"],
61620
+ Apages: _components_Apages__WEBPACK_IMPORTED_MODULE_7__["default"],
61621
+ Apopconfirm: _components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"]
61703
61622
  },
61704
61623
  props: {
61624
+ margin: {
61625
+ type: String,
61626
+ default: () => '0'
61627
+ },
61705
61628
  rowKey: {
61706
61629
  type: String,
61707
61630
  default: () => 'id'
@@ -61710,10 +61633,22 @@ __webpack_require__.r(__webpack_exports__);
61710
61633
  type: String,
61711
61634
  default: () => 'medium'
61712
61635
  },
61636
+ selectionWidth: {
61637
+ type: String,
61638
+ default: () => '50'
61639
+ },
61713
61640
  sort: {
61714
61641
  type: Boolean,
61715
61642
  default: () => true
61716
61643
  },
61644
+ sortTitle: {
61645
+ type: String,
61646
+ default: () => '#'
61647
+ },
61648
+ sortWidth: {
61649
+ type: String,
61650
+ default: () => '50'
61651
+ },
61717
61652
  border: {
61718
61653
  type: Boolean,
61719
61654
  default: () => false
@@ -61722,6 +61657,10 @@ __webpack_require__.r(__webpack_exports__);
61722
61657
  type: Boolean,
61723
61658
  default: () => false
61724
61659
  },
61660
+ loading: {
61661
+ type: Boolean,
61662
+ default: () => false
61663
+ },
61725
61664
  column: {
61726
61665
  type: Array,
61727
61666
  default: () => []
@@ -61730,18 +61669,50 @@ __webpack_require__.r(__webpack_exports__);
61730
61669
  type: Object,
61731
61670
  default: () => ({})
61732
61671
  },
61733
- params: {
61734
- type: Object,
61735
- default: () => ({})
61672
+ maxHeight: {
61673
+ type: String,
61674
+ default: () => '480'
61675
+ },
61676
+ elementLoadingText: {
61677
+ type: String,
61678
+ default: () => ''
61679
+ },
61680
+ elementLoadingSpinner: {
61681
+ type: String,
61682
+ default: () => 'el-icon-loading'
61683
+ },
61684
+ elementLoadingBackground: {
61685
+ type: String,
61686
+ default: () => 'rgba(0, 0, 0, 0.04)'
61687
+ },
61688
+ emptyText: {
61689
+ type: String,
61690
+ default: () => ''
61691
+ },
61692
+ showHeader: {
61693
+ type: Boolean,
61694
+ default: () => true
61736
61695
  },
61737
61696
  selection: {
61738
61697
  type: Boolean,
61739
- default: () => false
61698
+ default: () => true
61740
61699
  },
61741
61700
  showOverflowTooltip: {
61742
61701
  type: Boolean,
61743
61702
  default: () => true
61744
61703
  },
61704
+ tooltipEffect: {
61705
+ type: String,
61706
+ default: () => 'light'
61707
+ },
61708
+ showSummary: {
61709
+ type: Boolean,
61710
+ default: () => false
61711
+ },
61712
+ sumText: {
61713
+ type: String,
61714
+ default: () => '合计'
61715
+ },
61745
61716
  sortable: {
61746
61717
  type: Boolean,
61747
61718
  default: () => false
@@ -61768,6 +61739,22 @@ __webpack_require__.r(__webpack_exports__);
61768
61739
  hasChildren: 'hasChildren'
61769
61740
  })
61770
61741
  },
61742
+ highlightCurrentRow: {
61743
+ type: Boolean,
61744
+ default: () => false
61745
+ },
61746
+ action: {
61747
+ type: Object,
61748
+ default: () => ({
61749
+ review: null,
61750
+ modify: null,
61751
+ update: null,
61752
+ handle: null,
61753
+ remove: null,
61754
+ delete: null,
61755
+ export: null
61756
+ })
61757
+ },
61771
61758
  actionWidth: {
61772
61759
  type: String,
61773
61760
  default: () => '180px'
@@ -61776,138 +61763,157 @@ __webpack_require__.r(__webpack_exports__);
61776
61763
  type: String,
61777
61764
  default: () => '操作'
61778
61765
  },
61779
- formatTime: {
61780
- type: Boolean,
61781
- default: () => true
61782
- },
61783
- preview: {
61784
- type: Boolean,
61785
- default: () => false
61786
- },
61787
61766
  page: {
61788
61767
  type: Boolean,
61789
- default: () => true
61768
+ default: () => false
61790
61769
  }
61791
61770
  },
61792
- data() {
61793
- return {
61794
- loading: false
61795
- };
61771
+ mounted() {
61772
+ this.$refs['b-table'].bodyWrapper.addEventListener('wheel', this.scroll);
61796
61773
  },
61797
- created() {
61798
- this.search();
61799
- this.create();
61774
+ beforeDestroy() {
61775
+ this.$refs['b-table'].bodyWrapper.removeEventListener('wheel', this.scroll);
61800
61776
  },
61801
- mounted() {
61802
- this.$refs['b-table'].bodyWrapper.addEventListener('scroll', this.scroll);
61777
+ destroyed() {
61778
+ this.create = null;
61779
+ this.search = null;
61780
+ this.select = null;
61781
+ this.choose = null;
61782
+ this.change = null;
61783
+ this.format = null;
61784
+ this.scroll = null;
61803
61785
  },
61804
61786
  methods: {
61805
- create(column = []) {
61787
+ create() {
61806
61788
  const h = this.$createElement;
61807
- if (this.formatTime && this.column.length > 0) {
61808
- for (let a in this.column) {
61809
- if (this.column[a].field && this.column[a].field.toLowerCase().includes('time')) {
61810
- this.column[a].render = item => item[this.column[a].field] != '' && this.filter(item[this.column[a].field]);
61811
- }
61812
- }
61813
- }
61814
- const actionColumn = () => {
61815
- let data = [];
61816
- const {
61817
- review,
61818
- modify,
61819
- update,
61820
- handle,
61821
- remove
61822
- } = this.$listeners;
61823
- if (review || modify || update || handle || remove || this.$listeners.delete || this.$listeners.export) {
61824
- data = [{
61825
- label: this.actionTitle,
61826
- fixed: 'right',
61827
- align: 'center',
61828
- width: this.actionWidth,
61829
- render: item => h("div", {
61830
- "class": "action"
61831
- }, [review && h("i", {
61832
- "class": "el-icon-view",
61833
- "on": {
61834
- "click": () => review(item)
61835
- }
61836
- }), modify && h("i", {
61837
- "class": "el-icon-edit",
61838
- "on": {
61839
- "click": () => modify(item)
61840
- }
61841
- }), update && h("i", {
61842
- "class": "el-icon-edit",
61843
- "on": {
61844
- "click": () => update(item)
61845
- }
61846
- }), handle && h("i", {
61847
- "class": "el-icon-edit",
61848
- "on": {
61849
- "click": () => handle(item)
61850
- }
61851
- }), remove && h("Apopconfirm", {
61852
- "on": {
61853
- "submit": () => remove(item)
61854
- }
61855
- }), this.$listeners.delete && h("Apopconfirm", {
61856
- "on": {
61857
- "submit": () => this.$listeners.delete(item)
61858
- }
61859
- }), this.$listeners.export && h("i", {
61860
- "class": "el-icon-download",
61861
- "on": {
61862
- "click": () => this.$listeners.export(item)
61863
- }
61864
- })])
61865
- }];
61789
+ let column = [...this.column, this.suffix()];
61790
+ return column.map((a, b) => {
61791
+ if (a && Object.keys(a).length > 0) {
61792
+ let {
61793
+ type = null,
61794
+ render = null,
61795
+ header = null,
61796
+ ...r
61797
+ } = a;
61798
+ let field = a.field || a.index || a.name || a.prop;
61799
+ let label = a.label || a.title || a.text;
61800
+ let props = {
61801
+ key: b,
61802
+ prop: field,
61803
+ scopedSlot: field,
61804
+ sortable: field ? a.sortable ? a.sortable : this.sortable : false,
61805
+ formatter: render ? render : type ? (e, f, g, h) => this.format(a, b, e, h) : null,
61806
+ showOverflowTooltip: a.showOverflowTooltip ? a.showOverflowTooltip : this.showOverflowTooltip,
61807
+ ...r
61808
+ };
61809
+ return h("el-table-column", {
61810
+ "props": {
61811
+ ...props
61812
+ }
61813
+ }, [h("template", {
61814
+ "slot": "header"
61815
+ }, [header ? () => header(r) : label && label != '' && label.length && label.length > 8 ? h("el-tooltip", {
61816
+ "attrs": {
61817
+ "content": label,
61818
+ "placement": "top"
61819
+ }
61820
+ }, [h("span", {
61821
+ "attrs": {
61822
+ "title": label
61823
+ }
61824
+ }, [label])]) : h("span", {
61825
+ "attrs": {
61826
+ "title": label
61827
+ }
61828
+ }, [label])])]);
61866
61829
  }
61867
- return data;
61868
- };
61869
- const columnConfig = [...column, ...actionColumn()];
61870
- return columnConfig.map((a, b) => {
61871
- if (a) return h("el-table-column", {
61872
- "key": b,
61873
- "attrs": {
61874
- "prop": a.field,
61875
- "showOverflowTooltip": this.showOverflowTooltip,
61876
- "sortable": a.field ? a.sortable ? a.sortable : this.sortable : false,
61877
- "formatter": a.formatter ? (e, f, g, h) => a.formatter(e, h) : a.render ? (e, f, g, h) => a.render(e, h) : a.type ? (e, f, g, h) => this.format(a, b, e, h) : null
61878
- },
61879
- "props": {
61880
- ...a
61881
- }
61882
- });
61883
61830
  });
61884
61831
  },
61885
- search() {
61886
- const {
61887
- pageParams,
61888
- formParams
61889
- } = this.$store.state;
61890
- const params = Object.assign({}, pageParams, formParams, this.params);
61891
- this.$emit('search', params);
61832
+ suffix() {
61833
+ const h = this.$createElement;
61834
+ if (this.action.review || this.action.modify || this.action.update || this.action.handle || this.action.remove || this.action.delete || this.action.export || this.$listeners.review || this.$listeners.modify || this.$listeners.update || this.$listeners.handle || this.$listeners.remove || this.$listeners.delete || this.$listeners.export) {
61835
+ return {
61836
+ fixed: 'right',
61837
+ align: 'center',
61838
+ width: this.actionWidth,
61839
+ label: this.actionTitle,
61840
+ formatter: item => h("div", {
61841
+ "class": "action"
61842
+ }, [this.action.review && h("i", {
61843
+ "class": "el-icon-view",
61844
+ "on": {
61845
+ "click": () => this.action.review(item)
61846
+ }
61847
+ }), this.action.modify && h("i", {
61848
+ "class": "el-icon-edit",
61849
+ "on": {
61850
+ "click": () => this.action.modify(item)
61851
+ }
61852
+ }), this.action.update && h("i", {
61853
+ "class": "el-icon-edit",
61854
+ "on": {
61855
+ "click": () => this.action.update(item)
61856
+ }
61857
+ }), this.action.handle && h("i", {
61858
+ "class": "el-icon-edit",
61859
+ "on": {
61860
+ "click": () => this.action.handle(item)
61861
+ }
61862
+ }), this.action.remove && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
61863
+ "on": {
61864
+ "submit": () => this.action.remove(item)
61865
+ }
61866
+ }), this.action.delete && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
61867
+ "on": {
61868
+ "submit": () => this.action.delete(item)
61869
+ }
61870
+ }), this.action.export && h("i", {
61871
+ "class": "el-icon-download",
61872
+ "on": {
61873
+ "click": () => this.action.export(item)
61874
+ }
61875
+ }), this.$listeners.review && h("i", {
61876
+ "class": "el-icon-view",
61877
+ "on": {
61878
+ "click": () => this.$listeners.review(item)
61879
+ }
61880
+ }), this.$listeners.modify && h("i", {
61881
+ "class": "el-icon-edit",
61882
+ "on": {
61883
+ "click": () => this.$listeners.modify(item)
61884
+ }
61885
+ }), this.$listeners.update && h("i", {
61886
+ "class": "el-icon-edit",
61887
+ "on": {
61888
+ "click": () => this.$listeners.update(item)
61889
+ }
61890
+ }), this.$listeners.handle && h("i", {
61891
+ "class": "el-icon-edit",
61892
+ "on": {
61893
+ "click": () => this.$listeners.handle(item)
61894
+ }
61895
+ }), this.$listeners.remove && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
61896
+ "on": {
61897
+ "submit": () => this.$listeners.remove(item)
61898
+ }
61899
+ }), this.$listeners.delete && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
61900
+ "on": {
61901
+ "submit": () => this.$listeners.delete(item)
61902
+ }
61903
+ }), this.$listeners.export && h("i", {
61904
+ "class": "el-icon-download",
61905
+ "on": {
61906
+ "click": () => this.$listeners.export(item)
61907
+ }
61908
+ })])
61909
+ };
61910
+ }
61892
61911
  },
61893
- filter(timeStamp) {
61894
- if (!typeof timeStamp == Number) return '';
61895
- let time = new Date(timeStamp);
61896
- const YYYY = time.getFullYear();
61897
- const MM = time.getMonth() + 1 < 10 ? '0' + (time.getMonth() + 1) : time.getMonth() + 1;
61898
- const DD = time.getDate() < 10 ? '0' + time.getDate() : time.getDate();
61899
- const H = time.getHours() < 10 ? '0' + time.getHours() : time.getHours();
61900
- const M = time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes();
61901
- const S = time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds();
61902
- return YYYY + '-' + MM + '-' + DD + ' ' + H + ':' + M + ':' + S;
61912
+ search(params = {}) {
61913
+ this.$emit('search', params);
61903
61914
  },
61904
- select(items) {
61905
- this.$store.commit('changeSelectedRows', items);
61906
- this.$store.commit('changeSelectedKeys', items.map(a => a[this.rowKey]));
61907
- this.$emit('select', {
61908
- rows: items,
61909
- keys: items.map(a => a[this.rowKey])
61910
- });
61915
+ select(items = []) {
61916
+ this.$emit('select', items);
61911
61917
  },
61912
61918
  choose(row, column, event) {
61913
61919
  this.$emit('choose', {
@@ -61920,47 +61926,27 @@ __webpack_require__.r(__webpack_exports__);
61920
61926
  page: 1,
61921
61927
  size: 10
61922
61928
  }) {
61923
- this.$store.commit('changePageParams', pages);
61924
61929
  this.$emit('change', pages);
61925
61930
  this.search(pages);
61926
61931
  },
61927
- switch(name = '', symbol = '_') {
61928
- return name.replace(/([A-Z])/g, `${symbol}$1`).toLowerCase();
61929
- },
61930
61932
  format({
61931
- label,
61932
- field,
61933
- type,
61934
- disabled,
61935
- action = '',
61936
- path = '',
61937
- flag = '',
61933
+ type = '',
61934
+ name = '',
61935
+ data = [],
61936
+ text = '',
61937
+ label = '',
61938
+ title = '',
61939
+ field = '',
61940
+ dicts = [],
61938
61941
  ...props
61939
61942
  }, colIndex, item, rowIndex) {
61940
61943
  const h = this.$createElement;
61941
- if (this.preview && (type != 'select' || type != 'enume' || type != 'enumerate')) return h("span", {
61942
- "key": colIndex + '-' + rowIndex
61943
- }, [item[field]]);
61944
- if (type == 'select' || type == 'enume' || type == 'enumerate') {
61945
- let dicts = [];
61946
- if (this.optionApi != '' || action != '' || path != '') {
61947
- let url = action != '' ? action : path != '' ? path : this.optionApi;
61948
- let params = flag != '' ? {
61949
- flag: this.switch(flag)
61950
- } : {
61951
- field: this.switch(field)
61952
- };
61953
- FN.get(url, params).then(({
61954
- data
61955
- }) => {
61956
- if (data && data.length > 0) dicts = data;
61957
- });
61958
- }
61959
- return h(_components_Aenume__WEBPACK_IMPORTED_MODULE_1__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
61944
+ if (type == 'enume' || type == 'enumerate') {
61945
+ if (field != '') return h(_components_Aenume__WEBPACK_IMPORTED_MODULE_3__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
61960
61946
  "key": colIndex + '-' + rowIndex,
61961
61947
  "attrs": {
61962
- "field": `${field}`,
61963
- "data": dicts
61948
+ "field": field,
61949
+ "data": dicts.length > 0 ? dicts : data
61964
61950
  }
61965
61951
  }, props, {
61966
61952
  "model": {
@@ -61970,47 +61956,68 @@ __webpack_require__.r(__webpack_exports__);
61970
61956
  }
61971
61957
  }
61972
61958
  }]));
61959
+ return h(_components_Aenume__WEBPACK_IMPORTED_MODULE_3__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
61960
+ "key": colIndex + '-' + rowIndex,
61961
+ "attrs": {
61962
+ "field": name,
61963
+ "data": dicts.length > 0 ? dicts : data
61964
+ }
61965
+ }, props, {
61966
+ "model": {
61967
+ value: item[name],
61968
+ callback: $$v => {
61969
+ this.$set(item, name, $$v);
61970
+ }
61971
+ }
61972
+ }]));
61973
61973
  }
61974
- return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_2__["default"], {
61974
+ return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_6__["default"], {
61975
61975
  "key": colIndex + '-' + rowIndex,
61976
61976
  "attrs": {
61977
61977
  "config": {
61978
61978
  type,
61979
61979
  form: item,
61980
- label,
61981
- field: `${field}`,
61982
- dicts,
61983
- table: true,
61980
+ dicts: dicts.length > 0 ? dicts : data,
61981
+ field: field != '' ? field : name != '' ? name : '',
61982
+ label: text != '' ? text : label != '' ? label : title != '' ? title : '无栏目名称',
61984
61983
  ...props
61985
61984
  }
61986
61985
  }
61987
61986
  });
61988
61987
  },
61989
- scroll({
61990
- target
61991
- }) {
61992
- this.$emit('scroll', target);
61988
+ scroll(a) {
61989
+ let container = this.$refs['b-table'].bodyWrapper;
61990
+ if (container) {
61991
+ if (container.scrollHeight > container.clientHeight) {
61992
+ a.preventDefault();
61993
+ container.scrollTop += a.deltaY;
61994
+ } else {
61995
+ if (container.scrollWidth > container.clientWidth) {
61996
+ a.preventDefault();
61997
+ container.scrollLeft += a.deltaY;
61998
+ }
61999
+ }
62000
+ this.$emit('scroll', a);
62001
+ }
61993
62002
  }
61994
62003
  },
61995
62004
  render() {
61996
62005
  const h = arguments[0];
61997
- const {
61998
- data = [],
61999
- size = 0
62000
- } = this.record;
62001
- const {
62002
- pageParams
62003
- } = this.$store.state;
62004
- const condition = data && data.length > 0;
62005
62006
  const {
62006
62007
  ...props
62007
62008
  } = this.$attrs;
62009
+ const {
62010
+ ...r
62011
+ } = this.record;
62012
+ const data = r.data ? r.data : r.list ? r.list : r.rows ? r.rows : r.record ? r.record : r.records ? r.records : [];
62013
+ const size = r.size ? r.size : r.total ? r.total : r.count ? r.count : 0;
62014
+ const condition = data.length > 0;
62008
62015
  return h("div", {
62009
- "class": "b-table",
62010
- "directives": [{
62011
- name: "loading",
62012
- value: this.loading
62013
- }]
62016
+ "style": {
62017
+ padding: this.margin
62018
+ }
62019
+ }, [h("div", {
62020
+ "class": this.border ? 'b-table' : 'b-table border'
62014
62021
  }, [h("el-table", {
62015
62022
  "ref": "b-table",
62016
62023
  "attrs": {
@@ -62018,12 +62025,23 @@ __webpack_require__.r(__webpack_exports__);
62018
62025
  "size": this.size,
62019
62026
  "border": this.border,
62020
62027
  "stripe": this.stripe,
62021
- "column": this.column,
62022
62028
  "row-key": this.rowKey,
62029
+ "max-height": this.maxHeight,
62030
+ "element-loading-text": this.elementLoadingText,
62031
+ "element-loading-spinner": this.elementLoadingSpinner,
62032
+ "element-loading-background": this.elementLoadingBackground,
62033
+ "show-header": this.showHeader,
62023
62034
  "default-sort": this.defaultSort,
62035
+ "show-summary": this.showSummary,
62036
+ "tooltip-effect": this.tooltipEffect,
62037
+ "default-expand-all": this.defaultExpandAll,
62024
62038
  "tree-props": this.tree ? this.treeProps : {},
62025
- "default-expand-all": this.defaultExpandAll
62039
+ "highlight-current-row": this.highlightCurrentRow
62026
62040
  },
62041
+ "directives": [{
62042
+ name: "loading",
62043
+ value: this.loading
62044
+ }],
62027
62045
  "on": {
62028
62046
  "row-click": this.choose,
62029
62047
  "selection-change": this.select
@@ -62031,28 +62049,34 @@ __webpack_require__.r(__webpack_exports__);
62031
62049
  "props": {
62032
62050
  ...props
62033
62051
  }
62034
- }, [condition && this.selection && h("el-table-column", {
62052
+ }, [condition && (this.selection || this.$listeners.select) && h("el-table-column", {
62035
62053
  "attrs": {
62036
62054
  "fixed": "left",
62037
62055
  "type": "selection",
62038
- "width": "50"
62056
+ "width": this.selectionWidth
62039
62057
  }
62040
62058
  }), condition && this.sort && h("el-table-column", {
62041
62059
  "attrs": {
62042
62060
  "fixed": "left",
62043
62061
  "type": "index",
62044
- "width": "50",
62045
- "label": "#"
62062
+ "width": this.sortWidth,
62063
+ "label": this.sortTitle
62046
62064
  }
62047
- }), condition && this.create(this.column)]), !this.tree && this.page && condition && h(_components_Apages__WEBPACK_IMPORTED_MODULE_3__["default"], {
62065
+ }), condition && this.create(), condition && this.$slots.default, h("div", {
62066
+ "slot": "empty",
62067
+ "class": "empty"
62068
+ }, [!this.loading && h(_components_Aempty__WEBPACK_IMPORTED_MODULE_2__["default"], {
62048
62069
  "attrs": {
62049
- "total": Number(size),
62050
- "pages": pageParams
62070
+ "description": this.emptyText
62071
+ }
62072
+ })])]), !this.tree && this.page && condition && h(_components_Apages__WEBPACK_IMPORTED_MODULE_7__["default"], {
62073
+ "attrs": {
62074
+ "total": Number(size)
62051
62075
  },
62052
62076
  "on": {
62053
62077
  "change": this.change
62054
62078
  }
62055
- })]);
62079
+ })])]);
62056
62080
  }
62057
62081
  });
62058
62082
 
@@ -63872,7 +63896,7 @@ exports.quadraticProjectPoint = quadraticProjectPoint;
63872
63896
  // ESM COMPAT FLAG
63873
63897
  __webpack_require__.r(__webpack_exports__);
63874
63898
 
63875
- // CONCATENATED MODULE: ./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7125891e-vue-loader-template"}!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--13-0!./node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!./node_modules/_babel-loader@8.3.0@babel-loader/lib!./node_modules/_vue-loader@15.10.1@vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--1-0!./node_modules/_vue-loader@15.10.1@vue-loader/lib??vue-loader-options!./src/components/Btree/index.vue?vue&type=template&id=8c6268f6&scoped=true&
63899
+ // CONCATENATED MODULE: ./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7125891e-vue-loader-template"}!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--13-0!./node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!./node_modules/_babel-loader@8.3.0@babel-loader/lib!./node_modules/_vue-loader@15.10.1@vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--1-0!./node_modules/_vue-loader@15.10.1@vue-loader/lib??vue-loader-options!./src/components/Btree/index.vue?vue&type=template&id=0981a61e&scoped=true&
63876
63900
  var render = function render() {
63877
63901
  var _vm = this,
63878
63902
  _c = _vm._self._c;
@@ -63884,9 +63908,23 @@ var render = function render() {
63884
63908
  expression: "loading"
63885
63909
  }],
63886
63910
  staticClass: "b-tree"
63887
- }, [_c('el-tree', {
63911
+ }, [_vm.filter ? _c('el-input', {
63912
+ staticClass: "filter",
63913
+ attrs: {
63914
+ "size": "small",
63915
+ "placeholder": "输入关键字进行过滤"
63916
+ },
63917
+ model: {
63918
+ value: _vm.context,
63919
+ callback: function ($$v) {
63920
+ _vm.context = $$v;
63921
+ },
63922
+ expression: "context"
63923
+ }
63924
+ }) : _vm._e(), _c('el-tree', {
63888
63925
  ref: "bTree",
63889
63926
  attrs: {
63927
+ "accordion": _vm.accordion,
63890
63928
  "show-checkbox": _vm.showCheckbox,
63891
63929
  "check-strictly": _vm.checkStrictly,
63892
63930
  "node-key": _vm.nodeKey,
@@ -63922,7 +63960,7 @@ var render = function render() {
63922
63960
  };
63923
63961
  var staticRenderFns = [];
63924
63962
 
63925
- // CONCATENATED MODULE: ./src/components/Btree/index.vue?vue&type=template&id=8c6268f6&scoped=true&
63963
+ // CONCATENATED MODULE: ./src/components/Btree/index.vue?vue&type=template&id=0981a61e&scoped=true&
63926
63964
 
63927
63965
  // CONCATENATED MODULE: ./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--13-0!./node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!./node_modules/_babel-loader@8.3.0@babel-loader/lib!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--1-0!./node_modules/_vue-loader@15.10.1@vue-loader/lib??vue-loader-options!./src/components/Btree/index.vue?vue&type=script&lang=js&
63928
63966
  /* harmony default export */ var Btreevue_type_script_lang_js_ = ({
@@ -63932,6 +63970,14 @@ var staticRenderFns = [];
63932
63970
  type: Boolean,
63933
63971
  default: () => false
63934
63972
  },
63973
+ accordion: {
63974
+ type: Boolean,
63975
+ default: () => false
63976
+ },
63977
+ filter: {
63978
+ type: Boolean,
63979
+ default: () => true
63980
+ },
63935
63981
  showCheckbox: {
63936
63982
  type: Boolean,
63937
63983
  default: () => true
@@ -63993,7 +64039,8 @@ var staticRenderFns = [];
63993
64039
  },
63994
64040
  halfCheckedKeys: [],
63995
64041
  checkedKeys: [],
63996
- selectedRow: {}
64042
+ selectedRow: {},
64043
+ context: ''
63997
64044
  };
63998
64045
  },
63999
64046
  watch: {
@@ -64002,6 +64049,9 @@ var staticRenderFns = [];
64002
64049
  },
64003
64050
  defaultCheckedKeys() {
64004
64051
  this.create();
64052
+ },
64053
+ context(value) {
64054
+ this.$refs['bTree'].filter(value);
64005
64055
  }
64006
64056
  },
64007
64057
  mounted() {
@@ -64011,6 +64061,10 @@ var staticRenderFns = [];
64011
64061
  this.update();
64012
64062
  },
64013
64063
  methods: {
64064
+ search(value, data) {
64065
+ if (!value) return true;
64066
+ return data[this.labelKey].indexOf(value) != -1;
64067
+ },
64014
64068
  create() {
64015
64069
  this.checkedKeys = this.defaultCheckedKeys.filter(a => a != 0);
64016
64070
  this.$nextTick(() => {
@@ -64056,8 +64110,8 @@ var staticRenderFns = [];
64056
64110
  });
64057
64111
  // CONCATENATED MODULE: ./src/components/Btree/index.vue?vue&type=script&lang=js&
64058
64112
  /* harmony default export */ var components_Btreevue_type_script_lang_js_ = (Btreevue_type_script_lang_js_);
64059
- // EXTERNAL MODULE: ./src/components/Btree/index.vue?vue&type=style&index=0&id=8c6268f6&prod&scoped=true&lang=css&
64060
- var Btreevue_type_style_index_0_id_8c6268f6_prod_scoped_true_lang_css_ = __webpack_require__("f8b1");
64113
+ // EXTERNAL MODULE: ./src/components/Btree/index.vue?vue&type=style&index=0&id=0981a61e&prod&scoped=true&lang=css&
64114
+ var Btreevue_type_style_index_0_id_0981a61e_prod_scoped_true_lang_css_ = __webpack_require__("a749");
64061
64115
 
64062
64116
  // EXTERNAL MODULE: ./node_modules/_vue-loader@15.10.1@vue-loader/lib/runtime/componentNormalizer.js
64063
64117
  var componentNormalizer = __webpack_require__("e607");
@@ -64077,7 +64131,7 @@ var component = Object(componentNormalizer["a" /* default */])(
64077
64131
  staticRenderFns,
64078
64132
  false,
64079
64133
  null,
64080
- "8c6268f6",
64134
+ "0981a61e",
64081
64135
  null
64082
64136
 
64083
64137
  )
@@ -127348,6 +127402,17 @@ function layout(gridModel, axisModel, opt) {
127348
127402
 
127349
127403
  exports.layout = layout;
127350
127404
 
127405
+ /***/ }),
127406
+
127407
+ /***/ "a749":
127408
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
127409
+
127410
+ "use strict";
127411
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_0_9_0_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_3_6_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_15_10_1_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_15_10_1_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_0981a61e_prod_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("5bf5");
127412
+ /* harmony import */ var _node_modules_mini_css_extract_plugin_0_9_0_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_3_6_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_15_10_1_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_15_10_1_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_0981a61e_prod_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_0_9_0_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_3_6_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_15_10_1_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_15_10_1_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_0981a61e_prod_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
127413
+ /* unused harmony reexport * */
127414
+
127415
+
127351
127416
  /***/ }),
127352
127417
 
127353
127418
  /***/ "a777":
@@ -132858,13 +132923,6 @@ exports.estimateLabelUnionRect = estimateLabelUnionRect;
132858
132923
 
132859
132924
  /***/ }),
132860
132925
 
132861
- /***/ "b33c":
132862
- /***/ (function(module, exports, __webpack_require__) {
132863
-
132864
- // extracted by mini-css-extract-plugin
132865
-
132866
- /***/ }),
132867
-
132868
132926
  /***/ "b349":
132869
132927
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
132870
132928
 
@@ -134236,7 +134294,7 @@ __webpack_require__.r(__webpack_exports__);
134236
134294
  dragstart(a) {
134237
134295
  if (this.draggable) {
134238
134296
  a.dataTransfer.setData(this.dragType, this.id);
134239
- this.$store.commit('changeDragId', this.id);
134297
+ this.$store.commit('setDragId', this.id);
134240
134298
  this.$emit('dragstart', a);
134241
134299
  }
134242
134300
  },
@@ -136261,8 +136319,8 @@ __webpack_require__.r(__webpack_exports__);
136261
136319
  this.$emit('search', formatParams);
136262
136320
  },
136263
136321
  select(items = []) {
136264
- this.$store.commit('changeSelectedRows', items);
136265
- this.$store.commit('changeSelectedKeys', items.map(a => a[this.rowKey]));
136322
+ this.$store.commit('setSelectedRows', items);
136323
+ this.$store.commit('setSelectedKeys', items.map(a => a[this.rowKey]));
136266
136324
  this.$emit('select', {
136267
136325
  rows: items,
136268
136326
  keys: items.map(a => a[this.rowKey])
@@ -136279,7 +136337,7 @@ __webpack_require__.r(__webpack_exports__);
136279
136337
  page: 1,
136280
136338
  size: 10
136281
136339
  }) {
136282
- this.$store.commit('changePageParams', pages);
136340
+ this.$store.commit('setPageParams', pages);
136283
136341
  this.$emit('change', pages);
136284
136342
  this.search(pages);
136285
136343
  },
@@ -147981,7 +148039,7 @@ module.exports = _default;
147981
148039
  // ESM COMPAT FLAG
147982
148040
  __webpack_require__.r(__webpack_exports__);
147983
148041
 
147984
- // CONCATENATED MODULE: ./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7125891e-vue-loader-template"}!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--13-0!./node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!./node_modules/_babel-loader@8.3.0@babel-loader/lib!./node_modules/_vue-loader@15.10.1@vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--1-0!./node_modules/_vue-loader@15.10.1@vue-loader/lib??vue-loader-options!./src/components/Atree/index.vue?vue&type=template&id=ed84b344&scoped=true&
148042
+ // CONCATENATED MODULE: ./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7125891e-vue-loader-template"}!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--13-0!./node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!./node_modules/_babel-loader@8.3.0@babel-loader/lib!./node_modules/_vue-loader@15.10.1@vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--1-0!./node_modules/_vue-loader@15.10.1@vue-loader/lib??vue-loader-options!./src/components/Atree/index.vue?vue&type=template&id=446b4709&scoped=true&
147985
148043
  var render = function render() {
147986
148044
  var _vm = this,
147987
148045
  _c = _vm._self._c;
@@ -147993,9 +148051,23 @@ var render = function render() {
147993
148051
  expression: "loading"
147994
148052
  }],
147995
148053
  staticClass: "a-tree"
147996
- }, [_vm.horizontal ? _c('el-tree', {
148054
+ }, [_vm.filter ? _c('el-input', {
148055
+ staticClass: "filter",
148056
+ attrs: {
148057
+ "size": "small",
148058
+ "placeholder": "输入关键字进行过滤"
148059
+ },
148060
+ model: {
148061
+ value: _vm.context,
148062
+ callback: function ($$v) {
148063
+ _vm.context = $$v;
148064
+ },
148065
+ expression: "context"
148066
+ }
148067
+ }) : _vm._e(), _vm.horizontal ? _c('el-tree', {
147997
148068
  ref: "aTree",
147998
148069
  attrs: {
148070
+ "accordion": _vm.accordion,
147999
148071
  "show-checkbox": _vm.showCheckbox,
148000
148072
  "check-strictly": _vm.checkStrictly,
148001
148073
  "iconClass": _vm.iconClass != '' ? _vm.iconClass : '',
@@ -148008,7 +148080,8 @@ var render = function render() {
148008
148080
  "check-on-click-node": _vm.checkOnClickNode,
148009
148081
  "auto-expand-parent": _vm.autoExpandParent,
148010
148082
  "default-expanded-keys": _vm.checkedKeys,
148011
- "draggable": _vm.draggable
148083
+ "draggable": _vm.draggable,
148084
+ "filter-node-method": _vm.search
148012
148085
  },
148013
148086
  on: {
148014
148087
  "node-click": _vm.nodeClick,
@@ -148019,6 +148092,7 @@ var render = function render() {
148019
148092
  }) : _c('el-tree', {
148020
148093
  ref: "aTree",
148021
148094
  attrs: {
148095
+ "accordion": _vm.accordion,
148022
148096
  "show-checkbox": _vm.showCheckbox,
148023
148097
  "check-strictly": _vm.checkStrictly,
148024
148098
  "iconClass": _vm.iconClass != '' ? _vm.iconClass : '',
@@ -148030,7 +148104,8 @@ var render = function render() {
148030
148104
  "check-on-click-node": _vm.checkOnClickNode,
148031
148105
  "auto-expand-parent": _vm.autoExpandParent,
148032
148106
  "default-expanded-keys": _vm.checkedKeys,
148033
- "draggable": _vm.draggable
148107
+ "draggable": _vm.draggable,
148108
+ "filter-node-method": _vm.search
148034
148109
  },
148035
148110
  on: {
148036
148111
  "node-click": _vm.nodeClick,
@@ -148042,7 +148117,7 @@ var render = function render() {
148042
148117
  };
148043
148118
  var staticRenderFns = [];
148044
148119
 
148045
- // CONCATENATED MODULE: ./src/components/Atree/index.vue?vue&type=template&id=ed84b344&scoped=true&
148120
+ // CONCATENATED MODULE: ./src/components/Atree/index.vue?vue&type=template&id=446b4709&scoped=true&
148046
148121
 
148047
148122
  // CONCATENATED MODULE: ./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--13-0!./node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!./node_modules/_babel-loader@8.3.0@babel-loader/lib!./node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--1-0!./node_modules/_vue-loader@15.10.1@vue-loader/lib??vue-loader-options!./src/components/Atree/index.vue?vue&type=script&lang=js&
148048
148123
  /* harmony default export */ var Atreevue_type_script_lang_js_ = ({
@@ -148052,6 +148127,14 @@ var staticRenderFns = [];
148052
148127
  type: Boolean,
148053
148128
  default: () => false
148054
148129
  },
148130
+ accordion: {
148131
+ type: Boolean,
148132
+ default: () => false
148133
+ },
148134
+ filter: {
148135
+ type: Boolean,
148136
+ default: () => true
148137
+ },
148055
148138
  showCheckbox: {
148056
148139
  type: Boolean,
148057
148140
  default: () => true
@@ -148121,7 +148204,8 @@ var staticRenderFns = [];
148121
148204
  },
148122
148205
  halfCheckedKeys: [],
148123
148206
  checkedKeys: [],
148124
- selectedRow: {}
148207
+ selectedRow: {},
148208
+ context: ''
148125
148209
  };
148126
148210
  },
148127
148211
  watch: {
@@ -148130,6 +148214,9 @@ var staticRenderFns = [];
148130
148214
  },
148131
148215
  defaultCheckedKeys() {
148132
148216
  this.create();
148217
+ },
148218
+ context(value) {
148219
+ this.$refs['aTree'].filter(value);
148133
148220
  }
148134
148221
  },
148135
148222
  mounted() {
@@ -148139,6 +148226,10 @@ var staticRenderFns = [];
148139
148226
  this.update();
148140
148227
  },
148141
148228
  methods: {
148229
+ search(value, data) {
148230
+ if (!value) return true;
148231
+ return data[this.labelKey].indexOf(value) != -1;
148232
+ },
148142
148233
  format(h, {
148143
148234
  node,
148144
148235
  data,
@@ -148199,8 +148290,8 @@ var staticRenderFns = [];
148199
148290
  });
148200
148291
  // CONCATENATED MODULE: ./src/components/Atree/index.vue?vue&type=script&lang=js&
148201
148292
  /* harmony default export */ var components_Atreevue_type_script_lang_js_ = (Atreevue_type_script_lang_js_);
148202
- // EXTERNAL MODULE: ./src/components/Atree/index.vue?vue&type=style&index=0&id=ed84b344&prod&scoped=true&lang=css&
148203
- var Atreevue_type_style_index_0_id_ed84b344_prod_scoped_true_lang_css_ = __webpack_require__("0634");
148293
+ // EXTERNAL MODULE: ./src/components/Atree/index.vue?vue&type=style&index=0&id=446b4709&prod&scoped=true&lang=css&
148294
+ var Atreevue_type_style_index_0_id_446b4709_prod_scoped_true_lang_css_ = __webpack_require__("5934");
148204
148295
 
148205
148296
  // EXTERNAL MODULE: ./node_modules/_vue-loader@15.10.1@vue-loader/lib/runtime/componentNormalizer.js
148206
148297
  var componentNormalizer = __webpack_require__("e607");
@@ -148220,7 +148311,7 @@ var component = Object(componentNormalizer["a" /* default */])(
148220
148311
  staticRenderFns,
148221
148312
  false,
148222
148313
  null,
148223
- "ed84b344",
148314
+ "446b4709",
148224
148315
  null
148225
148316
 
148226
148317
  )
@@ -159734,7 +159825,7 @@ __webpack_require__.r(__webpack_exports__);
159734
159825
  "attrs": {
159735
159826
  "type": type,
159736
159827
  "size": size,
159737
- "disabled": disabled || selectedKeys == 0
159828
+ "disabled": disabled || selectedKeys.length == 0
159738
159829
  },
159739
159830
  "on": {
159740
159831
  "click": e => this.select(a, e)
@@ -159749,7 +159840,7 @@ __webpack_require__.r(__webpack_exports__);
159749
159840
  "attrs": {
159750
159841
  "type": "danger",
159751
159842
  "size": size,
159752
- "disabled": disabled || selectedKeys == 0
159843
+ "disabled": disabled || selectedKeys.length == 0
159753
159844
  },
159754
159845
  "on": {
159755
159846
  "click": e => this.select(a, e)
@@ -159764,7 +159855,7 @@ __webpack_require__.r(__webpack_exports__);
159764
159855
  "attrs": {
159765
159856
  "type": "danger",
159766
159857
  "size": size,
159767
- "disabled": disabled || selectedKeys == 0
159858
+ "disabled": disabled || selectedKeys.length == 0
159768
159859
  },
159769
159860
  "on": {
159770
159861
  "click": e => this.select(a, e)
@@ -159842,6 +159933,13 @@ __webpack_require__.r(__webpack_exports__);
159842
159933
 
159843
159934
  /***/ }),
159844
159935
 
159936
+ /***/ "e95a":
159937
+ /***/ (function(module, exports, __webpack_require__) {
159938
+
159939
+ // extracted by mini-css-extract-plugin
159940
+
159941
+ /***/ }),
159942
+
159845
159943
  /***/ "e9e0":
159846
159944
  /***/ (function(module, exports, __webpack_require__) {
159847
159945
 
@@ -162385,7 +162483,7 @@ __webpack_require__.r(__webpack_exports__);
162385
162483
  dragstart(a) {
162386
162484
  if (this.draggable) {
162387
162485
  a.dataTransfer.setData(this.dragType, this.id);
162388
- this.$store.commit('changeDragId', this.id);
162486
+ this.$store.commit('setDragId', this.id);
162389
162487
  this.$emit('dragstart', a);
162390
162488
  }
162391
162489
  },
@@ -162428,7 +162526,7 @@ __webpack_require__.r(__webpack_exports__);
162428
162526
  this.animate(draging, dragPostion);
162429
162527
  this.animate(droping, dropPostion);
162430
162528
  }
162431
- this.$store.commit('changeDropId', this.id);
162529
+ this.$store.commit('setDropId', this.id);
162432
162530
  this.$emit('drop', a);
162433
162531
  }
162434
162532
  },
@@ -165355,17 +165453,6 @@ Clip.prototype = {
165355
165453
  var _default = Clip;
165356
165454
  module.exports = _default;
165357
165455
 
165358
- /***/ }),
165359
-
165360
- /***/ "f8b1":
165361
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
165362
-
165363
- "use strict";
165364
- /* harmony import */ var _node_modules_mini_css_extract_plugin_0_9_0_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_3_6_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_15_10_1_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_15_10_1_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_8c6268f6_prod_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("731e");
165365
- /* harmony import */ var _node_modules_mini_css_extract_plugin_0_9_0_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_3_6_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_15_10_1_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_15_10_1_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_8c6268f6_prod_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_0_9_0_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_3_6_0_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_15_10_1_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_3_0_0_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_4_1_0_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_15_10_1_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_8c6268f6_prod_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
165366
- /* unused harmony reexport * */
165367
-
165368
-
165369
165456
  /***/ }),
165370
165457
 
165371
165458
  /***/ "f8d0":
@@ -166994,7 +167081,7 @@ __webpack_require__.r(__webpack_exports__);
166994
167081
  },
166995
167082
  inline: {
166996
167083
  type: Boolean,
166997
- default: () => true
167084
+ default: () => false
166998
167085
  },
166999
167086
  cols: {
167000
167087
  type: String,
@@ -167043,21 +167130,28 @@ __webpack_require__.r(__webpack_exports__);
167043
167130
  },
167044
167131
  data() {
167045
167132
  return {
167046
- form: {}
167133
+ form: {},
167134
+ height: 0,
167135
+ opened: false
167047
167136
  };
167048
167137
  },
167049
167138
  created() {
167050
167139
  this.create();
167051
167140
  },
167052
- mounted() {},
167141
+ mounted() {
167142
+ this.update();
167143
+ },
167053
167144
  destroyed() {
167054
167145
  this.create = null;
167146
+ this.update = null;
167055
167147
  this.submit = null;
167056
167148
  this.cancel = null;
167057
167149
  this.filter = null;
167058
167150
  this.result = null;
167151
+ this.switch = null;
167059
167152
  this.prompt = null;
167060
167153
  this.format = null;
167154
+ this.output = null;
167061
167155
  },
167062
167156
  watch: {
167063
167157
  values() {
@@ -167074,43 +167168,35 @@ __webpack_require__.r(__webpack_exports__);
167074
167168
  this.form = data;
167075
167169
  }
167076
167170
  },
167171
+ update() {
167172
+ let rows = Math.ceil(Object.keys(this.config).length / this.cols);
167173
+ this.height = this.$el.clientHeight * (rows - 1);
167174
+ },
167077
167175
  submit(e) {
167078
167176
  // 提交表单
167079
167177
  e && e.preventDefault();
167080
167178
  let pass = !this.check; // 判断是否是空表单
167081
- for (let a in this.form) if (this.form[a].trim() != '') pass = true;
167179
+ for (let a in this.form) if (this.form[a] != '') pass = true;
167082
167180
  let data = {};
167083
167181
  if (Object.keys(this.config).length > 0) {
167084
167182
  // 格式化属性为模糊查询属性
167085
167183
  for (let a in this.config) {
167086
- if (this.config[a] != '' && this.config[a].like && this.form[a].trim() != '' && this.form[a].trim() != null && this.form[a].trim() != undefined) {
167087
- if (this.config[a].like == 'left') data[a] = '%' + this.form[a].trim();
167088
- if (this.config[a].like == 'right') data[a] = this.form[a].trim() + '%';else data[a] = '%' + this.form[a].trim() + '%';
167184
+ if (this.config[a] != '' && this.config[a].like && this.form[a] != '' && this.form[a] != null && this.form[a] != undefined) {
167185
+ if (this.config[a].like == 'left') data[a] = '%' + this.form[a];
167186
+ if (this.config[a].like == 'right') data[a] = this.form[a] + '%';else data[a] = '%' + this.form[a] + '%';
167089
167187
  } else {
167090
167188
  if (this.config[a] != '' && (this.config[a].than || this.config[a].range || this.config[a].scope)) {
167091
- data[`${a}LE`] = this.form[`${a}LE`].trim();
167092
- data[`${a}GE`] = this.form[`${a}GE`].trim();
167093
- } else if (this.form[a].trim().includes(' 00:00:00')) data[a] = '%' + this.form[a].trim().split(' 00:00:00')[0] + '%';else data[a] = this.form[a].trim();
167189
+ data[`${a}LE`] = this.form[`${a}LE`];
167190
+ data[`${a}GE`] = this.form[`${a}GE`];
167191
+ } else if (this.form[a].includes(' 00:00:00')) data[a] = '%' + this.form[a].split(' 00:00:00')[0] + '%';else data[a] = this.form[a];
167094
167192
  }
167095
167193
  }
167096
167194
  }
167097
167195
  if (pass) {
167098
167196
  let result = this.filter(data);
167099
- const {
167100
- formParams,
167101
- pageParams
167102
- } = this.$store.state;
167103
- this.$store.commit('changeFormParams', result); // 添加查询参数
167104
- this.$store.commit('changePageParams', {
167105
- ...pageParams,
167106
- page: 1
167107
- }); // 重置分页参数
167108
167197
  this.$nextTick(() => {
167109
- let change = false;
167110
- Object.keys(result).forEach(a => result[a] != formParams[a] && (change = true));
167111
- if (change) this.$emit('submit', {
167198
+ this.$emit('submit', {
167112
167199
  ...result,
167113
- ...pageParams,
167114
167200
  page: 1
167115
167201
  }); // 派发事件并重置当前分页
167116
167202
  return result;
@@ -167123,15 +167209,6 @@ __webpack_require__.r(__webpack_exports__);
167123
167209
  let pass = !this.check; // 判断是否是空表单
167124
167210
  for (let a in this.form) if (this.form[a] != '') pass = true;
167125
167211
  if (pass) {
167126
- const {
167127
- pageParams
167128
- } = this.$store.state;
167129
- this.$store.commit('changePageParams', {
167130
- ...pageParams,
167131
- page: 1,
167132
- size: 10
167133
- }); // 重置分页参数
167134
- this.$store.commit('changeFormParams', {}); // 重置查询参数
167135
167212
  this.$nextTick(() => {
167136
167213
  for (let a in this.form) this.form[a] = '';
167137
167214
  this.$nextTick(() => this.$emit('cancel', this.form));
@@ -167139,19 +167216,18 @@ __webpack_require__.r(__webpack_exports__);
167139
167216
  }
167140
167217
  },
167141
167218
  filter(form = {}) {
167142
- // 过滤空值属性
167143
167219
  const data = {};
167144
167220
  for (let a in form) {
167145
- if (a != undefined && a != 'undefined' && form[a] != '' && form[a] != '%%' && form[a] != 'null' && form[a] != 'undefined' && form[a] != null && form[a] != undefined) {
167146
- data[a] = form[a];
167147
- }
167221
+ if (form[a] != '' && form[a] != '%%' && form[a] != 'null' && form[a] != 'undefined' && form[a] != null && form[a] != undefined) data[a] = form[a];
167148
167222
  }
167149
167223
  return data;
167150
167224
  },
167151
167225
  result() {
167152
- // 返回验证后的表单数据
167153
167226
  return this.filter(this.form);
167154
167227
  },
167228
+ switch() {
167229
+ this.opened = !this.opened;
167230
+ },
167155
167231
  prompt(a = {}, index = 0, placeholder = '') {
167156
167232
  if (Object.keys(a).length > 0 && a.placeholder && a.placeholder.length && a.placeholder.length > 0) return a.placeholder[index];
167157
167233
  return placeholder;
@@ -167180,6 +167256,31 @@ __webpack_require__.r(__webpack_exports__);
167180
167256
  }
167181
167257
  });
167182
167258
  }
167259
+ },
167260
+ output(a, b) {
167261
+ const h = this.$createElement;
167262
+ let style = this.cols != '' ? {
167263
+ width: `${100 / this.cols}%`
167264
+ } : {};
167265
+ return h("el-col", {
167266
+ "key": b,
167267
+ "style": style
167268
+ }, [h("el-form-item", {
167269
+ "attrs": {
167270
+ "prop": `${a}`,
167271
+ "label": this.label ? this.config[a]['text'] : ''
167272
+ }
167273
+ }, [this.config[a].than || this.config[a].range || this.config[a].scope ? h("el-col", {
167274
+ "class": "range-cols"
167275
+ }, [h("el-col", {
167276
+ "attrs": {
167277
+ "span": 12
167278
+ }
167279
+ }, [this.format(a, `${a}LE`, this.prompt(this.config[a], 0, '最高'))]), h("el-col", {
167280
+ "attrs": {
167281
+ "span": 12
167282
+ }
167283
+ }, [this.format(a, `${a}GE`, this.prompt(this.config[a], 1, '最低'))])]) : this.format(a)])]);
167183
167284
  }
167184
167285
  },
167185
167286
  render() {
@@ -167191,10 +167292,6 @@ __webpack_require__.r(__webpack_exports__);
167191
167292
  submit = null,
167192
167293
  cancel = null
167193
167294
  } = this.$listeners;
167194
- let style = this.cols != '' ? {
167195
- width: `${100 / this.cols}%`
167196
- } : {};
167197
- let label = a => this.label ? this.config[a].text || this.config[a].label || this.config[a].title : '';
167198
167295
  return h("div", {
167199
167296
  "class": "b-f-search",
167200
167297
  "style": {
@@ -167203,7 +167300,8 @@ __webpack_require__.r(__webpack_exports__);
167203
167300
  }, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
167204
167301
  "ref": "form",
167205
167302
  "attrs": {
167206
- "size": this.size
167303
+ "size": this.size,
167304
+ "inline": this.inline
167207
167305
  }
167208
167306
  }, {
167209
167307
  "props": {
@@ -167215,38 +167313,42 @@ __webpack_require__.r(__webpack_exports__);
167215
167313
  "labelWidth": this.labelWidth,
167216
167314
  "labelPosition": this.labelPosition
167217
167315
  }
167218
- }]), [h("el-row", {
167316
+ }]), [h("div", {
167317
+ "class": "column"
167318
+ }, [h("el-row", {
167219
167319
  "attrs": {
167220
167320
  "gutter": Number(this.gutter)
167221
- }
167222
- }, [Object.keys(this.config).map((a, b) => h("el-col", {
167223
- "key": b,
167224
- "class": "column",
167225
- "style": style
167226
- }, [h("el-form-item", {
167321
+ },
167322
+ "class": "main-row"
167323
+ }, [Object.keys(this.config).map((a, b) => b < this.cols && this.output(a, b))]), h("el-row", {
167227
167324
  "attrs": {
167228
- "prop": `${a}`,
167229
- "label": label(a)
167325
+ "gutter": Number(this.gutter)
167326
+ },
167327
+ "class": "fold-row",
167328
+ "style": {
167329
+ height: this.opened ? `${this.height}px` : '0'
167230
167330
  }
167231
- }, [this.config[a].than || this.config[a].range || this.config[a].scope ? h("el-col", {
167232
- "class": "range-cols"
167233
- }, [h("el-col", {
167234
- "attrs": {
167235
- "span": 12
167331
+ }, [Object.keys(this.config).map((a, b) => b > this.cols - 1 && this.output(a, b))])]), (Object.keys(this.config).length > this.cols || submit || cancel) && h("div", {
167332
+ "class": "action",
167333
+ "style": {
167334
+ paddingLeft: `${this.gutter}px`
167236
167335
  }
167237
- }, [this.format(a, `${a}LE`, this.prompt(this.config[a], 0, '最高'))]), h("el-col", {
167336
+ }, [h("el-form-item", {
167238
167337
  "attrs": {
167239
- "span": 12
167338
+ "label": "action"
167240
167339
  }
167241
- }, [this.format(a, `${a}GE`, this.prompt(this.config[a], 1, '最低'))])]) : this.format(a)])])), this.$slots.default, (submit || cancel) && h("el-col", {
167242
- "key": "action",
167243
- "class": "action",
167244
- "style": style
167245
- }, [h("el-form-item", {
167340
+ }, [Object.keys(this.config).length > this.cols && h("el-button", {
167246
167341
  "attrs": {
167247
- "label": this.label ? 'action' : ''
167342
+ "disabled": this.loading,
167343
+ "type": "text"
167344
+ },
167345
+ "class": "collapse-button",
167346
+ "on": {
167347
+ "click": this.switch
167248
167348
  }
167249
- }, [submit && h("el-button", {
167349
+ }, [h("i", {
167350
+ "class": `el-icon-arrow-${this.opened ? 'up' : 'down'}`
167351
+ }), this.opened ? '收起' : '展开']), submit && h("el-button", {
167250
167352
  "attrs": {
167251
167353
  "disabled": this.loading,
167252
167354
  "type": "primary"
@@ -167262,7 +167364,7 @@ __webpack_require__.r(__webpack_exports__);
167262
167364
  "on": {
167263
167365
  "click": this.cancel
167264
167366
  }
167265
- }, [this.cancelText])])])])])]);
167367
+ }, [this.cancelText])])])])]);
167266
167368
  }
167267
167369
  });
167268
167370