element-ui-root 2.9.8 → 3.0.1

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));
@@ -19204,6 +19245,7 @@ __webpack_require__.r(__webpack_exports__);
19204
19245
  "attrs": {
19205
19246
  "clearable": true,
19206
19247
  "filterable": true,
19248
+ "collapse-tags": true,
19207
19249
  "placeholder": props.placeholder || `请选择${words}`
19208
19250
  },
19209
19251
  "on": {
@@ -36495,6 +36537,17 @@ exports.scale = scale;
36495
36537
  exports.invert = invert;
36496
36538
  exports.clone = clone;
36497
36539
 
36540
+ /***/ }),
36541
+
36542
+ /***/ "5934":
36543
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
36544
+
36545
+ "use strict";
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__ = __webpack_require__("e95a");
36547
+ /* 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__);
36548
+ /* unused harmony reexport * */
36549
+
36550
+
36498
36551
  /***/ }),
36499
36552
 
36500
36553
  /***/ "5974":
@@ -36580,6 +36633,13 @@ module.exports = _default;
36580
36633
 
36581
36634
  /***/ }),
36582
36635
 
36636
+ /***/ "5a1c":
36637
+ /***/ (function(module, exports, __webpack_require__) {
36638
+
36639
+ // extracted by mini-css-extract-plugin
36640
+
36641
+ /***/ }),
36642
+
36583
36643
  /***/ "5aac":
36584
36644
  /***/ (function(module, exports) {
36585
36645
 
@@ -37101,6 +37161,13 @@ module.exports = _default;
37101
37161
 
37102
37162
  /***/ }),
37103
37163
 
37164
+ /***/ "5bf5":
37165
+ /***/ (function(module, exports, __webpack_require__) {
37166
+
37167
+ // extracted by mini-css-extract-plugin
37168
+
37169
+ /***/ }),
37170
+
37104
37171
  /***/ "5c61":
37105
37172
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
37106
37173
 
@@ -40512,8 +40579,8 @@ __webpack_require__.r(__webpack_exports__);
40512
40579
  return YYYY + '-' + MM + '-' + DD + ' ' + H + ':' + M + ':' + S;
40513
40580
  },
40514
40581
  select(items) {
40515
- this.$store.commit('changeSelectedRows', items);
40516
- this.$store.commit('changeSelectedKeys', items.map(a => a[this.rowKey]));
40582
+ this.$store.commit('setSelectedRows', items);
40583
+ this.$store.commit('setSelectedKeys', items.map(a => a[this.rowKey]));
40517
40584
  this.$emit('select', {
40518
40585
  rows: items,
40519
40586
  keys: items.map(a => a[this.rowKey])
@@ -40523,7 +40590,7 @@ __webpack_require__.r(__webpack_exports__);
40523
40590
  page: 1,
40524
40591
  size: 10
40525
40592
  }) {
40526
- this.$store.commit('changePageParams', pages);
40593
+ this.$store.commit('setPageParams', pages);
40527
40594
  this.$emit('change', pages);
40528
40595
  this.search(pages);
40529
40596
  },
@@ -47708,13 +47775,6 @@ module.exports = _default;
47708
47775
 
47709
47776
  /***/ }),
47710
47777
 
47711
- /***/ "731e":
47712
- /***/ (function(module, exports, __webpack_require__) {
47713
-
47714
- // extracted by mini-css-extract-plugin
47715
-
47716
- /***/ }),
47717
-
47718
47778
  /***/ "734e":
47719
47779
  /***/ (function(module, exports) {
47720
47780
 
@@ -50913,22 +50973,11 @@ module.exports = _default;
50913
50973
  __webpack_require__.r(__webpack_exports__);
50914
50974
  /* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
50915
50975
  /* 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
-
50976
+ /* harmony import */ var _components_Aenume__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("6cc8");
50977
+ /* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("2234");
50978
+ /* harmony import */ var _components_Apages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("1d0c");
50979
+ /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("e6e6");
50980
+ /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_4__);
50932
50981
 
50933
50982
 
50934
50983
 
@@ -50937,20 +50986,11 @@ __webpack_require__.r(__webpack_exports__);
50937
50986
  /* harmony default export */ __webpack_exports__["default"] = ({
50938
50987
  name: 'Ctable',
50939
50988
  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"]
50989
+ Aenume: _components_Aenume__WEBPACK_IMPORTED_MODULE_1__["default"],
50990
+ AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_2__["default"],
50991
+ Apages: _components_Apages__WEBPACK_IMPORTED_MODULE_3__["default"]
50948
50992
  },
50949
50993
  props: {
50950
- margin: {
50951
- type: String,
50952
- default: () => '0'
50953
- },
50954
50994
  rowKey: {
50955
50995
  type: String,
50956
50996
  default: () => 'id'
@@ -50959,22 +50999,10 @@ __webpack_require__.r(__webpack_exports__);
50959
50999
  type: String,
50960
51000
  default: () => 'medium'
50961
51001
  },
50962
- selectionWidth: {
50963
- type: String,
50964
- default: () => '50'
50965
- },
50966
51002
  sort: {
50967
51003
  type: Boolean,
50968
51004
  default: () => true
50969
51005
  },
50970
- sortTitle: {
50971
- type: String,
50972
- default: () => '#'
50973
- },
50974
- sortWidth: {
50975
- type: String,
50976
- default: () => '50'
50977
- },
50978
51006
  border: {
50979
51007
  type: Boolean,
50980
51008
  default: () => false
@@ -50983,10 +51011,6 @@ __webpack_require__.r(__webpack_exports__);
50983
51011
  type: Boolean,
50984
51012
  default: () => false
50985
51013
  },
50986
- loading: {
50987
- type: Boolean,
50988
- default: () => false
50989
- },
50990
51014
  column: {
50991
51015
  type: Array,
50992
51016
  default: () => []
@@ -50995,50 +51019,18 @@ __webpack_require__.r(__webpack_exports__);
50995
51019
  type: Object,
50996
51020
  default: () => ({})
50997
51021
  },
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
51022
+ params: {
51023
+ type: Object,
51024
+ default: () => ({})
51021
51025
  },
51022
51026
  selection: {
51023
51027
  type: Boolean,
51024
- default: () => true
51028
+ default: () => false
51025
51029
  },
51026
51030
  showOverflowTooltip: {
51027
51031
  type: Boolean,
51028
51032
  default: () => true
51029
51033
  },
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
51034
  sortable: {
51043
51035
  type: Boolean,
51044
51036
  default: () => false
@@ -51065,22 +51057,6 @@ __webpack_require__.r(__webpack_exports__);
51065
51057
  hasChildren: 'hasChildren'
51066
51058
  })
51067
51059
  },
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
51060
  actionWidth: {
51085
51061
  type: String,
51086
51062
  default: () => '180px'
@@ -51089,157 +51065,138 @@ __webpack_require__.r(__webpack_exports__);
51089
51065
  type: String,
51090
51066
  default: () => '操作'
51091
51067
  },
51092
- page: {
51068
+ formatTime: {
51069
+ type: Boolean,
51070
+ default: () => true
51071
+ },
51072
+ preview: {
51093
51073
  type: Boolean,
51094
51074
  default: () => false
51075
+ },
51076
+ page: {
51077
+ type: Boolean,
51078
+ default: () => true
51095
51079
  }
51096
51080
  },
51097
- mounted() {
51098
- this.$refs['c-table'].bodyWrapper.addEventListener('wheel', this.scroll);
51081
+ data() {
51082
+ return {
51083
+ loading: false
51084
+ };
51099
51085
  },
51100
- beforeDestroy() {
51101
- this.$refs['c-table'].bodyWrapper.removeEventListener('wheel', this.scroll);
51086
+ created() {
51087
+ this.search();
51088
+ this.create();
51102
51089
  },
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;
51090
+ mounted() {
51091
+ this.$refs['c-table'].bodyWrapper.addEventListener('scroll', this.scroll);
51111
51092
  },
51112
51093
  methods: {
51113
- create() {
51094
+ create(column = []) {
51114
51095
  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])])]);
51096
+ if (this.formatTime && this.column.length > 0) {
51097
+ for (let a in this.column) {
51098
+ if (this.column[a].field && this.column[a].field.toLowerCase().includes('time')) {
51099
+ this.column[a].render = item => item[this.column[a].field] != '' && this.filter(item[this.column[a].field]);
51100
+ }
51155
51101
  }
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
51102
  }
51103
+ const actionColumn = () => {
51104
+ let data = [];
51105
+ const {
51106
+ review,
51107
+ modify,
51108
+ update,
51109
+ handle,
51110
+ remove
51111
+ } = this.$listeners;
51112
+ if (review || modify || update || handle || remove || this.$listeners.delete || this.$listeners.export) {
51113
+ data = [{
51114
+ label: this.actionTitle,
51115
+ fixed: 'right',
51116
+ align: 'center',
51117
+ width: this.actionWidth,
51118
+ render: item => h("div", {
51119
+ "class": "action"
51120
+ }, [review && h("i", {
51121
+ "class": "el-icon-view",
51122
+ "on": {
51123
+ "click": () => review(item)
51124
+ }
51125
+ }), modify && h("i", {
51126
+ "class": "el-icon-edit",
51127
+ "on": {
51128
+ "click": () => modify(item)
51129
+ }
51130
+ }), update && h("i", {
51131
+ "class": "el-icon-edit",
51132
+ "on": {
51133
+ "click": () => update(item)
51134
+ }
51135
+ }), handle && h("i", {
51136
+ "class": "el-icon-edit",
51137
+ "on": {
51138
+ "click": () => handle(item)
51139
+ }
51140
+ }), remove && h("Apopconfirm", {
51141
+ "on": {
51142
+ "submit": () => remove(item)
51143
+ }
51144
+ }), this.$listeners.delete && h("Apopconfirm", {
51145
+ "on": {
51146
+ "submit": () => this.$listeners.delete(item)
51147
+ }
51148
+ }), this.$listeners.export && h("i", {
51149
+ "class": "el-icon-download",
51150
+ "on": {
51151
+ "click": () => this.$listeners.export(item)
51152
+ }
51153
+ })])
51154
+ }];
51155
+ }
51156
+ return data;
51157
+ };
51158
+ const columnConfig = [...column, ...actionColumn()];
51159
+ return columnConfig.map((a, b) => {
51160
+ if (a) return h("el-table-column", {
51161
+ "key": b,
51162
+ "attrs": {
51163
+ "prop": a.field,
51164
+ "showOverflowTooltip": this.showOverflowTooltip,
51165
+ "sortable": a.field ? a.sortable ? a.sortable : this.sortable : false,
51166
+ "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
51167
+ },
51168
+ "props": {
51169
+ ...a
51170
+ }
51171
+ });
51172
+ });
51237
51173
  },
51238
- search(params = {}) {
51174
+ search() {
51175
+ const {
51176
+ pageParams,
51177
+ formParams
51178
+ } = this.$store.state;
51179
+ const params = Object.assign({}, pageParams, formParams, this.params);
51239
51180
  this.$emit('search', params);
51240
51181
  },
51241
- select(items = []) {
51242
- this.$emit('select', items);
51182
+ filter(timeStamp) {
51183
+ if (!typeof timeStamp == Number) return '';
51184
+ let time = new Date(timeStamp);
51185
+ const YYYY = time.getFullYear();
51186
+ const MM = time.getMonth() + 1 < 10 ? '0' + (time.getMonth() + 1) : time.getMonth() + 1;
51187
+ const DD = time.getDate() < 10 ? '0' + time.getDate() : time.getDate();
51188
+ const H = time.getHours() < 10 ? '0' + time.getHours() : time.getHours();
51189
+ const M = time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes();
51190
+ const S = time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds();
51191
+ return YYYY + '-' + MM + '-' + DD + ' ' + H + ':' + M + ':' + S;
51192
+ },
51193
+ select(items) {
51194
+ this.$store.commit('setSelectedRows', items);
51195
+ this.$store.commit('setSelectedKeys', items.map(a => a[this.rowKey]));
51196
+ this.$emit('select', {
51197
+ rows: items,
51198
+ keys: items.map(a => a[this.rowKey])
51199
+ });
51243
51200
  },
51244
51201
  choose(row, column, event) {
51245
51202
  this.$emit('choose', {
@@ -51252,27 +51209,47 @@ __webpack_require__.r(__webpack_exports__);
51252
51209
  page: 1,
51253
51210
  size: 10
51254
51211
  }) {
51212
+ this.$store.commit('setPageParams', pages);
51255
51213
  this.$emit('change', pages);
51256
51214
  this.search(pages);
51257
51215
  },
51216
+ switch(name = '', symbol = '_') {
51217
+ return name.replace(/([A-Z])/g, `${symbol}$1`).toLowerCase();
51218
+ },
51258
51219
  format({
51259
- type = '',
51260
- name = '',
51261
- data = [],
51262
- text = '',
51263
- label = '',
51264
- title = '',
51265
- field = '',
51266
- dicts = [],
51220
+ label,
51221
+ field,
51222
+ type,
51223
+ disabled,
51224
+ action = '',
51225
+ path = '',
51226
+ flag = '',
51267
51227
  ...props
51268
51228
  }, colIndex, item, rowIndex) {
51269
51229
  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()([{
51230
+ if (this.preview && (type != 'select' || type != 'enume' || type != 'enumerate')) return h("span", {
51231
+ "key": colIndex + '-' + rowIndex
51232
+ }, [item[field]]);
51233
+ if (type == 'select' || type == 'enume' || type == 'enumerate') {
51234
+ let dicts = [];
51235
+ if (this.optionApi != '' || action != '' || path != '') {
51236
+ let url = action != '' ? action : path != '' ? path : this.optionApi;
51237
+ let params = flag != '' ? {
51238
+ flag: this.switch(flag)
51239
+ } : {
51240
+ field: this.switch(field)
51241
+ };
51242
+ FN.get(url, params).then(({
51243
+ data
51244
+ }) => {
51245
+ if (data && data.length > 0) dicts = data;
51246
+ });
51247
+ }
51248
+ return h(_components_Aenume__WEBPACK_IMPORTED_MODULE_1__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
51272
51249
  "key": colIndex + '-' + rowIndex,
51273
51250
  "attrs": {
51274
- "field": field,
51275
- "data": dicts.length > 0 ? dicts : data
51251
+ "field": `${field}`,
51252
+ "data": dicts
51276
51253
  }
51277
51254
  }, props, {
51278
51255
  "model": {
@@ -51282,103 +51259,47 @@ __webpack_require__.r(__webpack_exports__);
51282
51259
  }
51283
51260
  }
51284
51261
  }]));
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
51262
  }
51300
- return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_6__["default"], {
51263
+ return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_2__["default"], {
51301
51264
  "key": colIndex + '-' + rowIndex,
51302
51265
  "attrs": {
51303
51266
  "config": {
51304
51267
  type,
51305
51268
  form: item,
51306
- dicts: dicts.length > 0 ? dicts : data,
51307
- field: field != '' ? field : name != '' ? name : '',
51308
- label: text != '' ? text : label != '' ? label : title != '' ? title : '无栏目名称',
51269
+ label,
51270
+ field: `${field}`,
51271
+ dicts,
51272
+ table: true,
51309
51273
  ...props
51310
51274
  }
51311
51275
  }
51312
51276
  });
51313
51277
  },
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
- }
51278
+ scroll({
51279
+ target
51280
+ }) {
51281
+ this.$emit('scroll', target);
51328
51282
  }
51329
51283
  },
51330
51284
  render() {
51331
51285
  const h = arguments[0];
51332
51286
  const {
51333
- formCols = '6',
51334
- searchVerify = true,
51335
- searchConfig = {},
51336
- actionConfig = [],
51337
- ...props
51338
- } = this.$attrs;
51339
- const {
51340
- ...r
51287
+ data = [],
51288
+ size = 0
51341
51289
  } = 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
51290
  const {
51345
- loading = false,
51346
- search = null
51347
- } = this;
51348
- const condition = data.length > 0;
51291
+ pageParams
51292
+ } = this.$store.state;
51293
+ const condition = data && data.length > 0;
51294
+ const {
51295
+ ...props
51296
+ } = this.$attrs;
51349
51297
  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'
51298
+ "class": "c-table",
51299
+ "directives": [{
51300
+ name: "loading",
51301
+ value: this.loading
51302
+ }]
51382
51303
  }, [h("el-table", {
51383
51304
  "ref": "c-table",
51384
51305
  "attrs": {
@@ -51386,23 +51307,12 @@ __webpack_require__.r(__webpack_exports__);
51386
51307
  "size": this.size,
51387
51308
  "border": this.border,
51388
51309
  "stripe": this.stripe,
51310
+ "column": this.column,
51389
51311
  "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
51312
  "default-sort": this.defaultSort,
51396
- "show-summary": this.showSummary,
51397
- "tooltip-effect": this.tooltipEffect,
51398
- "default-expand-all": this.defaultExpandAll,
51399
51313
  "tree-props": this.tree ? this.treeProps : {},
51400
- "highlight-current-row": this.highlightCurrentRow
51314
+ "default-expand-all": this.defaultExpandAll
51401
51315
  },
51402
- "directives": [{
51403
- name: "loading",
51404
- value: loading
51405
- }],
51406
51316
  "on": {
51407
51317
  "row-click": this.choose,
51408
51318
  "selection-change": this.select
@@ -51410,34 +51320,28 @@ __webpack_require__.r(__webpack_exports__);
51410
51320
  "props": {
51411
51321
  ...props
51412
51322
  }
51413
- }, [condition && (this.selection || this.$listeners.select) && h("el-table-column", {
51323
+ }, [condition && this.selection && h("el-table-column", {
51414
51324
  "attrs": {
51415
51325
  "fixed": "left",
51416
51326
  "type": "selection",
51417
- "width": this.selectionWidth
51327
+ "width": "50"
51418
51328
  }
51419
51329
  }), condition && this.sort && h("el-table-column", {
51420
51330
  "attrs": {
51421
51331
  "fixed": "left",
51422
51332
  "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
51333
+ "width": "50",
51334
+ "label": "#"
51432
51335
  }
51433
- })])]), !this.tree && this.page && condition && h(_components_Apages__WEBPACK_IMPORTED_MODULE_7__["default"], {
51336
+ }), condition && this.create(this.column)]), !this.tree && this.page && condition && h(_components_Apages__WEBPACK_IMPORTED_MODULE_3__["default"], {
51434
51337
  "attrs": {
51435
- "total": Number(size)
51338
+ "total": Number(size),
51339
+ "pages": pageParams
51436
51340
  },
51437
51341
  "on": {
51438
51342
  "change": this.change
51439
51343
  }
51440
- })])]);
51344
+ })]);
51441
51345
  }
51442
51346
  });
51443
51347
 
@@ -61684,11 +61588,22 @@ __webpack_require__.r(__webpack_exports__);
61684
61588
  __webpack_require__.r(__webpack_exports__);
61685
61589
  /* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
61686
61590
  /* 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__);
61591
+ /* harmony import */ var _components_Aactions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("e94c");
61592
+ /* harmony import */ var _components_Aempty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("bd5e");
61593
+ /* harmony import */ var _components_Aenume__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("6cc8");
61594
+ /* harmony import */ var _components_Aform_AfSearch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("1b78");
61595
+ /* harmony import */ var _components_Aform_BfSearch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("fc0d");
61596
+ /* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("2234");
61597
+ /* harmony import */ var _components_Apages__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("1d0c");
61598
+ /* harmony import */ var _components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("2ee7");
61599
+ /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("f4d2");
61600
+ /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_9__);
61601
+
61602
+
61603
+
61604
+
61605
+
61606
+
61692
61607
 
61693
61608
 
61694
61609
 
@@ -61697,11 +61612,20 @@ __webpack_require__.r(__webpack_exports__);
61697
61612
  /* harmony default export */ __webpack_exports__["default"] = ({
61698
61613
  name: 'Btable',
61699
61614
  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"]
61615
+ Aactions: _components_Aactions__WEBPACK_IMPORTED_MODULE_1__["default"],
61616
+ Aempty: _components_Aempty__WEBPACK_IMPORTED_MODULE_2__["default"],
61617
+ Aenume: _components_Aenume__WEBPACK_IMPORTED_MODULE_3__["default"],
61618
+ AfSearch: _components_Aform_AfSearch__WEBPACK_IMPORTED_MODULE_4__["default"],
61619
+ BfSearch: _components_Aform_BfSearch__WEBPACK_IMPORTED_MODULE_5__["default"],
61620
+ AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_6__["default"],
61621
+ Apages: _components_Apages__WEBPACK_IMPORTED_MODULE_7__["default"],
61622
+ Apopconfirm: _components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"]
61703
61623
  },
61704
61624
  props: {
61625
+ margin: {
61626
+ type: String,
61627
+ default: () => '0'
61628
+ },
61705
61629
  rowKey: {
61706
61630
  type: String,
61707
61631
  default: () => 'id'
@@ -61710,10 +61634,22 @@ __webpack_require__.r(__webpack_exports__);
61710
61634
  type: String,
61711
61635
  default: () => 'medium'
61712
61636
  },
61637
+ selectionWidth: {
61638
+ type: String,
61639
+ default: () => '50'
61640
+ },
61713
61641
  sort: {
61714
61642
  type: Boolean,
61715
61643
  default: () => true
61716
61644
  },
61645
+ sortTitle: {
61646
+ type: String,
61647
+ default: () => '#'
61648
+ },
61649
+ sortWidth: {
61650
+ type: String,
61651
+ default: () => '50'
61652
+ },
61717
61653
  border: {
61718
61654
  type: Boolean,
61719
61655
  default: () => false
@@ -61722,6 +61658,10 @@ __webpack_require__.r(__webpack_exports__);
61722
61658
  type: Boolean,
61723
61659
  default: () => false
61724
61660
  },
61661
+ loading: {
61662
+ type: Boolean,
61663
+ default: () => false
61664
+ },
61725
61665
  column: {
61726
61666
  type: Array,
61727
61667
  default: () => []
@@ -61730,18 +61670,50 @@ __webpack_require__.r(__webpack_exports__);
61730
61670
  type: Object,
61731
61671
  default: () => ({})
61732
61672
  },
61733
- params: {
61734
- type: Object,
61735
- default: () => ({})
61673
+ maxHeight: {
61674
+ type: String,
61675
+ default: () => '480'
61676
+ },
61677
+ elementLoadingText: {
61678
+ type: String,
61679
+ default: () => ''
61680
+ },
61681
+ elementLoadingSpinner: {
61682
+ type: String,
61683
+ default: () => 'el-icon-loading'
61684
+ },
61685
+ elementLoadingBackground: {
61686
+ type: String,
61687
+ default: () => 'rgba(0, 0, 0, 0.04)'
61688
+ },
61689
+ emptyText: {
61690
+ type: String,
61691
+ default: () => ''
61692
+ },
61693
+ showHeader: {
61694
+ type: Boolean,
61695
+ default: () => true
61736
61696
  },
61737
61697
  selection: {
61738
61698
  type: Boolean,
61739
- default: () => false
61699
+ default: () => true
61740
61700
  },
61741
61701
  showOverflowTooltip: {
61742
61702
  type: Boolean,
61743
61703
  default: () => true
61744
61704
  },
61705
+ tooltipEffect: {
61706
+ type: String,
61707
+ default: () => 'light'
61708
+ },
61709
+ showSummary: {
61710
+ type: Boolean,
61711
+ default: () => false
61712
+ },
61713
+ sumText: {
61714
+ type: String,
61715
+ default: () => '合计'
61716
+ },
61745
61717
  sortable: {
61746
61718
  type: Boolean,
61747
61719
  default: () => false
@@ -61768,6 +61740,22 @@ __webpack_require__.r(__webpack_exports__);
61768
61740
  hasChildren: 'hasChildren'
61769
61741
  })
61770
61742
  },
61743
+ highlightCurrentRow: {
61744
+ type: Boolean,
61745
+ default: () => false
61746
+ },
61747
+ action: {
61748
+ type: Object,
61749
+ default: () => ({
61750
+ review: null,
61751
+ modify: null,
61752
+ update: null,
61753
+ handle: null,
61754
+ remove: null,
61755
+ delete: null,
61756
+ export: null
61757
+ })
61758
+ },
61771
61759
  actionWidth: {
61772
61760
  type: String,
61773
61761
  default: () => '180px'
@@ -61776,138 +61764,168 @@ __webpack_require__.r(__webpack_exports__);
61776
61764
  type: String,
61777
61765
  default: () => '操作'
61778
61766
  },
61779
- formatTime: {
61780
- type: Boolean,
61781
- default: () => true
61782
- },
61783
- preview: {
61784
- type: Boolean,
61785
- default: () => false
61786
- },
61787
61767
  page: {
61788
61768
  type: Boolean,
61789
- default: () => true
61769
+ default: () => false
61790
61770
  }
61791
61771
  },
61792
- data() {
61793
- return {
61794
- loading: false
61795
- };
61772
+ mounted() {
61773
+ this.$refs['b-table'].bodyWrapper.addEventListener('wheel', this.scroll);
61796
61774
  },
61797
- created() {
61798
- this.search();
61799
- this.create();
61775
+ beforeDestroy() {
61776
+ this.$refs['b-table'].bodyWrapper.removeEventListener('wheel', this.scroll);
61800
61777
  },
61801
- mounted() {
61802
- this.$refs['b-table'].bodyWrapper.addEventListener('scroll', this.scroll);
61778
+ destroyed() {
61779
+ this.create = null;
61780
+ this.search = null;
61781
+ this.select = null;
61782
+ this.choose = null;
61783
+ this.change = null;
61784
+ this.format = null;
61785
+ this.scroll = null;
61803
61786
  },
61804
61787
  methods: {
61805
- create(column = []) {
61788
+ create() {
61789
+ let column = [...this.column, this.suffix()];
61790
+ return column.map((a, b) => this.output(a, b));
61791
+ },
61792
+ output(a, b) {
61806
61793
  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
- }
61794
+ if (a && Object.keys(a).length > 0) {
61795
+ let {
61796
+ type = null,
61797
+ render = null,
61798
+ header = null,
61799
+ ...r
61800
+ } = a;
61801
+ let child = a.children || a.child || a.node || a.list || [];
61802
+ let field = a.field || a.index || a.name || a.prop;
61803
+ let label = a.label || a.title || a.text;
61804
+ let props = {
61805
+ key: b,
61806
+ prop: field,
61807
+ scopedSlot: field,
61808
+ sortable: field ? a.sortable ? a.sortable : this.sortable : false,
61809
+ formatter: render ? render : type ? (e, f, g, h) => this.format(a, b, e, h) : null,
61810
+ showOverflowTooltip: a.showOverflowTooltip ? a.showOverflowTooltip : this.showOverflowTooltip,
61811
+ ...r
61812
+ };
61813
+ if (child.length > 0) {
61814
+ return h("el-table-column", {
61815
+ "key": b,
61816
+ "attrs": {
61817
+ "label": label
61818
+ }
61819
+ }, [child.map((c, d) => this.output(c, `${b}-${d}`))]);
61820
+ } else {
61821
+ return h("el-table-column", {
61822
+ "props": {
61823
+ ...props
61824
+ }
61825
+ }, [h("template", {
61826
+ "slot": "header"
61827
+ }, [header ? () => header(r) : label && label != '' && label.length && label.length > 8 ? h("el-tooltip", {
61828
+ "attrs": {
61829
+ "content": label,
61830
+ "placement": "top"
61831
+ }
61832
+ }, [h("span", {
61833
+ "attrs": {
61834
+ "title": label
61835
+ }
61836
+ }, [label])]) : h("span", {
61837
+ "attrs": {
61838
+ "title": label
61839
+ }
61840
+ }, [label])])]);
61812
61841
  }
61813
61842
  }
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
- }];
61866
- }
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
- });
61884
61843
  },
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);
61844
+ suffix() {
61845
+ const h = this.$createElement;
61846
+ 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) {
61847
+ return {
61848
+ fixed: 'right',
61849
+ align: 'center',
61850
+ width: this.actionWidth,
61851
+ label: this.actionTitle,
61852
+ formatter: item => h("div", {
61853
+ "class": "action"
61854
+ }, [this.action.review && h("i", {
61855
+ "class": "el-icon-view",
61856
+ "on": {
61857
+ "click": () => this.action.review(item)
61858
+ }
61859
+ }), this.action.modify && h("i", {
61860
+ "class": "el-icon-edit",
61861
+ "on": {
61862
+ "click": () => this.action.modify(item)
61863
+ }
61864
+ }), this.action.update && h("i", {
61865
+ "class": "el-icon-edit",
61866
+ "on": {
61867
+ "click": () => this.action.update(item)
61868
+ }
61869
+ }), this.action.handle && h("i", {
61870
+ "class": "el-icon-edit",
61871
+ "on": {
61872
+ "click": () => this.action.handle(item)
61873
+ }
61874
+ }), this.action.remove && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
61875
+ "on": {
61876
+ "submit": () => this.action.remove(item)
61877
+ }
61878
+ }), this.action.delete && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
61879
+ "on": {
61880
+ "submit": () => this.action.delete(item)
61881
+ }
61882
+ }), this.action.export && h("i", {
61883
+ "class": "el-icon-download",
61884
+ "on": {
61885
+ "click": () => this.action.export(item)
61886
+ }
61887
+ }), this.$listeners.review && h("i", {
61888
+ "class": "el-icon-view",
61889
+ "on": {
61890
+ "click": () => this.$listeners.review(item)
61891
+ }
61892
+ }), this.$listeners.modify && h("i", {
61893
+ "class": "el-icon-edit",
61894
+ "on": {
61895
+ "click": () => this.$listeners.modify(item)
61896
+ }
61897
+ }), this.$listeners.update && h("i", {
61898
+ "class": "el-icon-edit",
61899
+ "on": {
61900
+ "click": () => this.$listeners.update(item)
61901
+ }
61902
+ }), this.$listeners.handle && h("i", {
61903
+ "class": "el-icon-edit",
61904
+ "on": {
61905
+ "click": () => this.$listeners.handle(item)
61906
+ }
61907
+ }), this.$listeners.remove && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
61908
+ "on": {
61909
+ "submit": () => this.$listeners.remove(item)
61910
+ }
61911
+ }), this.$listeners.delete && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
61912
+ "on": {
61913
+ "submit": () => this.$listeners.delete(item)
61914
+ }
61915
+ }), this.$listeners.export && h("i", {
61916
+ "class": "el-icon-download",
61917
+ "on": {
61918
+ "click": () => this.$listeners.export(item)
61919
+ }
61920
+ })])
61921
+ };
61922
+ }
61892
61923
  },
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;
61924
+ search(params = {}) {
61925
+ this.$emit('search', params);
61903
61926
  },
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
- });
61927
+ select(items = []) {
61928
+ this.$emit('select', items);
61911
61929
  },
61912
61930
  choose(row, column, event) {
61913
61931
  this.$emit('choose', {
@@ -61920,47 +61938,27 @@ __webpack_require__.r(__webpack_exports__);
61920
61938
  page: 1,
61921
61939
  size: 10
61922
61940
  }) {
61923
- this.$store.commit('changePageParams', pages);
61924
61941
  this.$emit('change', pages);
61925
61942
  this.search(pages);
61926
61943
  },
61927
- switch(name = '', symbol = '_') {
61928
- return name.replace(/([A-Z])/g, `${symbol}$1`).toLowerCase();
61929
- },
61930
61944
  format({
61931
- label,
61932
- field,
61933
- type,
61934
- disabled,
61935
- action = '',
61936
- path = '',
61937
- flag = '',
61945
+ type = '',
61946
+ name = '',
61947
+ data = [],
61948
+ text = '',
61949
+ label = '',
61950
+ title = '',
61951
+ field = '',
61952
+ dicts = [],
61938
61953
  ...props
61939
61954
  }, colIndex, item, rowIndex) {
61940
61955
  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()([{
61956
+ if (type == 'enume' || type == 'enumerate') {
61957
+ if (field != '') return h(_components_Aenume__WEBPACK_IMPORTED_MODULE_3__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
61960
61958
  "key": colIndex + '-' + rowIndex,
61961
61959
  "attrs": {
61962
- "field": `${field}`,
61963
- "data": dicts
61960
+ "field": field,
61961
+ "data": dicts.length > 0 ? dicts : data
61964
61962
  }
61965
61963
  }, props, {
61966
61964
  "model": {
@@ -61970,47 +61968,68 @@ __webpack_require__.r(__webpack_exports__);
61970
61968
  }
61971
61969
  }
61972
61970
  }]));
61971
+ return h(_components_Aenume__WEBPACK_IMPORTED_MODULE_3__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
61972
+ "key": colIndex + '-' + rowIndex,
61973
+ "attrs": {
61974
+ "field": name,
61975
+ "data": dicts.length > 0 ? dicts : data
61976
+ }
61977
+ }, props, {
61978
+ "model": {
61979
+ value: item[name],
61980
+ callback: $$v => {
61981
+ this.$set(item, name, $$v);
61982
+ }
61983
+ }
61984
+ }]));
61973
61985
  }
61974
- return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_2__["default"], {
61986
+ return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_6__["default"], {
61975
61987
  "key": colIndex + '-' + rowIndex,
61976
61988
  "attrs": {
61977
61989
  "config": {
61978
61990
  type,
61979
61991
  form: item,
61980
- label,
61981
- field: `${field}`,
61982
- dicts,
61983
- table: true,
61992
+ dicts: dicts.length > 0 ? dicts : data,
61993
+ field: field != '' ? field : name != '' ? name : '',
61994
+ label: text != '' ? text : label != '' ? label : title != '' ? title : '无栏目名称',
61984
61995
  ...props
61985
61996
  }
61986
61997
  }
61987
61998
  });
61988
61999
  },
61989
- scroll({
61990
- target
61991
- }) {
61992
- this.$emit('scroll', target);
62000
+ scroll(a) {
62001
+ let container = this.$refs['b-table'].bodyWrapper;
62002
+ if (container) {
62003
+ if (container.scrollHeight > container.clientHeight) {
62004
+ a.preventDefault();
62005
+ container.scrollTop += a.deltaY;
62006
+ } else {
62007
+ if (container.scrollWidth > container.clientWidth) {
62008
+ a.preventDefault();
62009
+ container.scrollLeft += a.deltaY;
62010
+ }
62011
+ }
62012
+ this.$emit('scroll', a);
62013
+ }
61993
62014
  }
61994
62015
  },
61995
62016
  render() {
61996
62017
  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
62018
  const {
62006
62019
  ...props
62007
62020
  } = this.$attrs;
62021
+ const {
62022
+ ...r
62023
+ } = this.record;
62024
+ const data = r.data ? r.data : r.list ? r.list : r.rows ? r.rows : r.record ? r.record : r.records ? r.records : [];
62025
+ const size = r.size ? r.size : r.total ? r.total : r.count ? r.count : 0;
62026
+ const condition = data.length > 0;
62008
62027
  return h("div", {
62009
- "class": "b-table",
62010
- "directives": [{
62011
- name: "loading",
62012
- value: this.loading
62013
- }]
62028
+ "style": {
62029
+ padding: this.margin
62030
+ }
62031
+ }, [h("div", {
62032
+ "class": this.border ? 'b-table' : 'b-table border'
62014
62033
  }, [h("el-table", {
62015
62034
  "ref": "b-table",
62016
62035
  "attrs": {
@@ -62018,12 +62037,23 @@ __webpack_require__.r(__webpack_exports__);
62018
62037
  "size": this.size,
62019
62038
  "border": this.border,
62020
62039
  "stripe": this.stripe,
62021
- "column": this.column,
62022
62040
  "row-key": this.rowKey,
62041
+ "max-height": this.maxHeight,
62042
+ "element-loading-text": this.elementLoadingText,
62043
+ "element-loading-spinner": this.elementLoadingSpinner,
62044
+ "element-loading-background": this.elementLoadingBackground,
62045
+ "show-header": this.showHeader,
62023
62046
  "default-sort": this.defaultSort,
62047
+ "show-summary": this.showSummary,
62048
+ "tooltip-effect": this.tooltipEffect,
62049
+ "default-expand-all": this.defaultExpandAll,
62024
62050
  "tree-props": this.tree ? this.treeProps : {},
62025
- "default-expand-all": this.defaultExpandAll
62051
+ "highlight-current-row": this.highlightCurrentRow
62026
62052
  },
62053
+ "directives": [{
62054
+ name: "loading",
62055
+ value: this.loading
62056
+ }],
62027
62057
  "on": {
62028
62058
  "row-click": this.choose,
62029
62059
  "selection-change": this.select
@@ -62031,28 +62061,34 @@ __webpack_require__.r(__webpack_exports__);
62031
62061
  "props": {
62032
62062
  ...props
62033
62063
  }
62034
- }, [condition && this.selection && h("el-table-column", {
62064
+ }, [condition && (this.selection || this.$listeners.select) && h("el-table-column", {
62035
62065
  "attrs": {
62036
62066
  "fixed": "left",
62037
62067
  "type": "selection",
62038
- "width": "50"
62068
+ "width": this.selectionWidth
62039
62069
  }
62040
62070
  }), condition && this.sort && h("el-table-column", {
62041
62071
  "attrs": {
62042
62072
  "fixed": "left",
62043
62073
  "type": "index",
62044
- "width": "50",
62045
- "label": "#"
62074
+ "width": this.sortWidth,
62075
+ "label": this.sortTitle
62046
62076
  }
62047
- }), condition && this.create(this.column)]), !this.tree && this.page && condition && h(_components_Apages__WEBPACK_IMPORTED_MODULE_3__["default"], {
62077
+ }), condition && this.create(), condition && this.$slots.default, h("div", {
62078
+ "slot": "empty",
62079
+ "class": "empty"
62080
+ }, [!this.loading && h(_components_Aempty__WEBPACK_IMPORTED_MODULE_2__["default"], {
62048
62081
  "attrs": {
62049
- "total": Number(size),
62050
- "pages": pageParams
62082
+ "description": this.emptyText
62083
+ }
62084
+ })])]), !this.tree && this.page && condition && h(_components_Apages__WEBPACK_IMPORTED_MODULE_7__["default"], {
62085
+ "attrs": {
62086
+ "total": Number(size)
62051
62087
  },
62052
62088
  "on": {
62053
62089
  "change": this.change
62054
62090
  }
62055
- })]);
62091
+ })])]);
62056
62092
  }
62057
62093
  });
62058
62094
 
@@ -63872,7 +63908,7 @@ exports.quadraticProjectPoint = quadraticProjectPoint;
63872
63908
  // ESM COMPAT FLAG
63873
63909
  __webpack_require__.r(__webpack_exports__);
63874
63910
 
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&
63911
+ // 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
63912
  var render = function render() {
63877
63913
  var _vm = this,
63878
63914
  _c = _vm._self._c;
@@ -63884,9 +63920,23 @@ var render = function render() {
63884
63920
  expression: "loading"
63885
63921
  }],
63886
63922
  staticClass: "b-tree"
63887
- }, [_c('el-tree', {
63923
+ }, [_vm.filter ? _c('el-input', {
63924
+ staticClass: "filter",
63925
+ attrs: {
63926
+ "size": "small",
63927
+ "placeholder": "输入关键字进行过滤"
63928
+ },
63929
+ model: {
63930
+ value: _vm.context,
63931
+ callback: function ($$v) {
63932
+ _vm.context = $$v;
63933
+ },
63934
+ expression: "context"
63935
+ }
63936
+ }) : _vm._e(), _c('el-tree', {
63888
63937
  ref: "bTree",
63889
63938
  attrs: {
63939
+ "accordion": _vm.accordion,
63890
63940
  "show-checkbox": _vm.showCheckbox,
63891
63941
  "check-strictly": _vm.checkStrictly,
63892
63942
  "node-key": _vm.nodeKey,
@@ -63922,7 +63972,7 @@ var render = function render() {
63922
63972
  };
63923
63973
  var staticRenderFns = [];
63924
63974
 
63925
- // CONCATENATED MODULE: ./src/components/Btree/index.vue?vue&type=template&id=8c6268f6&scoped=true&
63975
+ // CONCATENATED MODULE: ./src/components/Btree/index.vue?vue&type=template&id=0981a61e&scoped=true&
63926
63976
 
63927
63977
  // 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
63978
  /* harmony default export */ var Btreevue_type_script_lang_js_ = ({
@@ -63932,6 +63982,14 @@ var staticRenderFns = [];
63932
63982
  type: Boolean,
63933
63983
  default: () => false
63934
63984
  },
63985
+ accordion: {
63986
+ type: Boolean,
63987
+ default: () => false
63988
+ },
63989
+ filter: {
63990
+ type: Boolean,
63991
+ default: () => true
63992
+ },
63935
63993
  showCheckbox: {
63936
63994
  type: Boolean,
63937
63995
  default: () => true
@@ -63993,7 +64051,8 @@ var staticRenderFns = [];
63993
64051
  },
63994
64052
  halfCheckedKeys: [],
63995
64053
  checkedKeys: [],
63996
- selectedRow: {}
64054
+ selectedRow: {},
64055
+ context: ''
63997
64056
  };
63998
64057
  },
63999
64058
  watch: {
@@ -64002,6 +64061,9 @@ var staticRenderFns = [];
64002
64061
  },
64003
64062
  defaultCheckedKeys() {
64004
64063
  this.create();
64064
+ },
64065
+ context(value) {
64066
+ this.$refs['bTree'].filter(value);
64005
64067
  }
64006
64068
  },
64007
64069
  mounted() {
@@ -64011,6 +64073,10 @@ var staticRenderFns = [];
64011
64073
  this.update();
64012
64074
  },
64013
64075
  methods: {
64076
+ search(value, data) {
64077
+ if (!value) return true;
64078
+ return data[this.labelKey].indexOf(value) != -1;
64079
+ },
64014
64080
  create() {
64015
64081
  this.checkedKeys = this.defaultCheckedKeys.filter(a => a != 0);
64016
64082
  this.$nextTick(() => {
@@ -64056,8 +64122,8 @@ var staticRenderFns = [];
64056
64122
  });
64057
64123
  // CONCATENATED MODULE: ./src/components/Btree/index.vue?vue&type=script&lang=js&
64058
64124
  /* 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");
64125
+ // EXTERNAL MODULE: ./src/components/Btree/index.vue?vue&type=style&index=0&id=0981a61e&prod&scoped=true&lang=css&
64126
+ var Btreevue_type_style_index_0_id_0981a61e_prod_scoped_true_lang_css_ = __webpack_require__("a749");
64061
64127
 
64062
64128
  // EXTERNAL MODULE: ./node_modules/_vue-loader@15.10.1@vue-loader/lib/runtime/componentNormalizer.js
64063
64129
  var componentNormalizer = __webpack_require__("e607");
@@ -64077,7 +64143,7 @@ var component = Object(componentNormalizer["a" /* default */])(
64077
64143
  staticRenderFns,
64078
64144
  false,
64079
64145
  null,
64080
- "8c6268f6",
64146
+ "0981a61e",
64081
64147
  null
64082
64148
 
64083
64149
  )
@@ -127348,6 +127414,17 @@ function layout(gridModel, axisModel, opt) {
127348
127414
 
127349
127415
  exports.layout = layout;
127350
127416
 
127417
+ /***/ }),
127418
+
127419
+ /***/ "a749":
127420
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
127421
+
127422
+ "use strict";
127423
+ /* 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");
127424
+ /* 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__);
127425
+ /* unused harmony reexport * */
127426
+
127427
+
127351
127428
  /***/ }),
127352
127429
 
127353
127430
  /***/ "a777":
@@ -132858,13 +132935,6 @@ exports.estimateLabelUnionRect = estimateLabelUnionRect;
132858
132935
 
132859
132936
  /***/ }),
132860
132937
 
132861
- /***/ "b33c":
132862
- /***/ (function(module, exports, __webpack_require__) {
132863
-
132864
- // extracted by mini-css-extract-plugin
132865
-
132866
- /***/ }),
132867
-
132868
132938
  /***/ "b349":
132869
132939
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
132870
132940
 
@@ -134236,7 +134306,7 @@ __webpack_require__.r(__webpack_exports__);
134236
134306
  dragstart(a) {
134237
134307
  if (this.draggable) {
134238
134308
  a.dataTransfer.setData(this.dragType, this.id);
134239
- this.$store.commit('changeDragId', this.id);
134309
+ this.$store.commit('setDragId', this.id);
134240
134310
  this.$emit('dragstart', a);
134241
134311
  }
134242
134312
  },
@@ -136128,27 +136198,38 @@ __webpack_require__.r(__webpack_exports__);
136128
136198
  },
136129
136199
  methods: {
136130
136200
  create() {
136131
- const h = this.$createElement;
136132
136201
  let column = [...this.column, this.suffix()];
136133
- return column.map((a, b) => {
136134
- if (a && Object.keys(a).length > 0) {
136135
- let {
136136
- type = null,
136137
- render = null,
136138
- header = null,
136139
- ...r
136140
- } = a;
136141
- let field = a.field || a.index || a.name || a.prop;
136142
- let label = a.label || a.title || a.text;
136143
- let props = {
136144
- key: b,
136145
- prop: field,
136146
- scopedSlot: field,
136147
- sortable: field ? a.sortable ? a.sortable : this.sortable : false,
136148
- formatter: render ? render : type ? (e, f, g, h) => this.format(a, b, e, h) : null,
136149
- showOverflowTooltip: a.showOverflowTooltip ? a.showOverflowTooltip : this.showOverflowTooltip,
136150
- ...r
136151
- };
136202
+ return column.map((a, b) => this.output(a, b));
136203
+ },
136204
+ output(a, b) {
136205
+ const h = this.$createElement;
136206
+ if (a && Object.keys(a).length > 0) {
136207
+ let {
136208
+ type = null,
136209
+ render = null,
136210
+ header = null,
136211
+ ...r
136212
+ } = a;
136213
+ let child = a.children || a.child || a.node || a.list || [];
136214
+ let field = a.field || a.index || a.name || a.prop;
136215
+ let label = a.label || a.title || a.text;
136216
+ let props = {
136217
+ key: b,
136218
+ prop: field,
136219
+ scopedSlot: field,
136220
+ sortable: field ? a.sortable ? a.sortable : this.sortable : false,
136221
+ formatter: render ? render : type ? (e, f, g, h) => this.format(a, b, e, h) : null,
136222
+ showOverflowTooltip: a.showOverflowTooltip ? a.showOverflowTooltip : this.showOverflowTooltip,
136223
+ ...r
136224
+ };
136225
+ if (child.length > 0) {
136226
+ return h("el-table-column", {
136227
+ "key": b,
136228
+ "attrs": {
136229
+ "label": label
136230
+ }
136231
+ }, [child.map((c, d) => this.output(c, `${b}-${d}`))]);
136232
+ } else {
136152
136233
  return h("el-table-column", {
136153
136234
  "props": {
136154
136235
  ...props
@@ -136170,7 +136251,7 @@ __webpack_require__.r(__webpack_exports__);
136170
136251
  }
136171
136252
  }, [label])])]);
136172
136253
  }
136173
- });
136254
+ }
136174
136255
  },
136175
136256
  suffix() {
136176
136257
  const h = this.$createElement;
@@ -136261,8 +136342,8 @@ __webpack_require__.r(__webpack_exports__);
136261
136342
  this.$emit('search', formatParams);
136262
136343
  },
136263
136344
  select(items = []) {
136264
- this.$store.commit('changeSelectedRows', items);
136265
- this.$store.commit('changeSelectedKeys', items.map(a => a[this.rowKey]));
136345
+ this.$store.commit('setSelectedRows', items);
136346
+ this.$store.commit('setSelectedKeys', items.map(a => a[this.rowKey]));
136266
136347
  this.$emit('select', {
136267
136348
  rows: items,
136268
136349
  keys: items.map(a => a[this.rowKey])
@@ -136279,7 +136360,7 @@ __webpack_require__.r(__webpack_exports__);
136279
136360
  page: 1,
136280
136361
  size: 10
136281
136362
  }) {
136282
- this.$store.commit('changePageParams', pages);
136363
+ this.$store.commit('setPageParams', pages);
136283
136364
  this.$emit('change', pages);
136284
136365
  this.search(pages);
136285
136366
  },
@@ -147981,7 +148062,7 @@ module.exports = _default;
147981
148062
  // ESM COMPAT FLAG
147982
148063
  __webpack_require__.r(__webpack_exports__);
147983
148064
 
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&
148065
+ // 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
148066
  var render = function render() {
147986
148067
  var _vm = this,
147987
148068
  _c = _vm._self._c;
@@ -147993,9 +148074,23 @@ var render = function render() {
147993
148074
  expression: "loading"
147994
148075
  }],
147995
148076
  staticClass: "a-tree"
147996
- }, [_vm.horizontal ? _c('el-tree', {
148077
+ }, [_vm.filter ? _c('el-input', {
148078
+ staticClass: "filter",
148079
+ attrs: {
148080
+ "size": "small",
148081
+ "placeholder": "输入关键字进行过滤"
148082
+ },
148083
+ model: {
148084
+ value: _vm.context,
148085
+ callback: function ($$v) {
148086
+ _vm.context = $$v;
148087
+ },
148088
+ expression: "context"
148089
+ }
148090
+ }) : _vm._e(), _vm.horizontal ? _c('el-tree', {
147997
148091
  ref: "aTree",
147998
148092
  attrs: {
148093
+ "accordion": _vm.accordion,
147999
148094
  "show-checkbox": _vm.showCheckbox,
148000
148095
  "check-strictly": _vm.checkStrictly,
148001
148096
  "iconClass": _vm.iconClass != '' ? _vm.iconClass : '',
@@ -148008,7 +148103,8 @@ var render = function render() {
148008
148103
  "check-on-click-node": _vm.checkOnClickNode,
148009
148104
  "auto-expand-parent": _vm.autoExpandParent,
148010
148105
  "default-expanded-keys": _vm.checkedKeys,
148011
- "draggable": _vm.draggable
148106
+ "draggable": _vm.draggable,
148107
+ "filter-node-method": _vm.search
148012
148108
  },
148013
148109
  on: {
148014
148110
  "node-click": _vm.nodeClick,
@@ -148019,6 +148115,7 @@ var render = function render() {
148019
148115
  }) : _c('el-tree', {
148020
148116
  ref: "aTree",
148021
148117
  attrs: {
148118
+ "accordion": _vm.accordion,
148022
148119
  "show-checkbox": _vm.showCheckbox,
148023
148120
  "check-strictly": _vm.checkStrictly,
148024
148121
  "iconClass": _vm.iconClass != '' ? _vm.iconClass : '',
@@ -148030,7 +148127,8 @@ var render = function render() {
148030
148127
  "check-on-click-node": _vm.checkOnClickNode,
148031
148128
  "auto-expand-parent": _vm.autoExpandParent,
148032
148129
  "default-expanded-keys": _vm.checkedKeys,
148033
- "draggable": _vm.draggable
148130
+ "draggable": _vm.draggable,
148131
+ "filter-node-method": _vm.search
148034
148132
  },
148035
148133
  on: {
148036
148134
  "node-click": _vm.nodeClick,
@@ -148042,7 +148140,7 @@ var render = function render() {
148042
148140
  };
148043
148141
  var staticRenderFns = [];
148044
148142
 
148045
- // CONCATENATED MODULE: ./src/components/Atree/index.vue?vue&type=template&id=ed84b344&scoped=true&
148143
+ // CONCATENATED MODULE: ./src/components/Atree/index.vue?vue&type=template&id=446b4709&scoped=true&
148046
148144
 
148047
148145
  // 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
148146
  /* harmony default export */ var Atreevue_type_script_lang_js_ = ({
@@ -148052,6 +148150,14 @@ var staticRenderFns = [];
148052
148150
  type: Boolean,
148053
148151
  default: () => false
148054
148152
  },
148153
+ accordion: {
148154
+ type: Boolean,
148155
+ default: () => false
148156
+ },
148157
+ filter: {
148158
+ type: Boolean,
148159
+ default: () => true
148160
+ },
148055
148161
  showCheckbox: {
148056
148162
  type: Boolean,
148057
148163
  default: () => true
@@ -148121,7 +148227,8 @@ var staticRenderFns = [];
148121
148227
  },
148122
148228
  halfCheckedKeys: [],
148123
148229
  checkedKeys: [],
148124
- selectedRow: {}
148230
+ selectedRow: {},
148231
+ context: ''
148125
148232
  };
148126
148233
  },
148127
148234
  watch: {
@@ -148130,6 +148237,9 @@ var staticRenderFns = [];
148130
148237
  },
148131
148238
  defaultCheckedKeys() {
148132
148239
  this.create();
148240
+ },
148241
+ context(value) {
148242
+ this.$refs['aTree'].filter(value);
148133
148243
  }
148134
148244
  },
148135
148245
  mounted() {
@@ -148139,6 +148249,10 @@ var staticRenderFns = [];
148139
148249
  this.update();
148140
148250
  },
148141
148251
  methods: {
148252
+ search(value, data) {
148253
+ if (!value) return true;
148254
+ return data[this.labelKey].indexOf(value) != -1;
148255
+ },
148142
148256
  format(h, {
148143
148257
  node,
148144
148258
  data,
@@ -148199,8 +148313,8 @@ var staticRenderFns = [];
148199
148313
  });
148200
148314
  // CONCATENATED MODULE: ./src/components/Atree/index.vue?vue&type=script&lang=js&
148201
148315
  /* 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");
148316
+ // EXTERNAL MODULE: ./src/components/Atree/index.vue?vue&type=style&index=0&id=446b4709&prod&scoped=true&lang=css&
148317
+ var Atreevue_type_style_index_0_id_446b4709_prod_scoped_true_lang_css_ = __webpack_require__("5934");
148204
148318
 
148205
148319
  // EXTERNAL MODULE: ./node_modules/_vue-loader@15.10.1@vue-loader/lib/runtime/componentNormalizer.js
148206
148320
  var componentNormalizer = __webpack_require__("e607");
@@ -148220,7 +148334,7 @@ var component = Object(componentNormalizer["a" /* default */])(
148220
148334
  staticRenderFns,
148221
148335
  false,
148222
148336
  null,
148223
- "ed84b344",
148337
+ "446b4709",
148224
148338
  null
148225
148339
 
148226
148340
  )
@@ -159734,7 +159848,7 @@ __webpack_require__.r(__webpack_exports__);
159734
159848
  "attrs": {
159735
159849
  "type": type,
159736
159850
  "size": size,
159737
- "disabled": disabled || selectedKeys == 0
159851
+ "disabled": disabled || selectedKeys.length == 0
159738
159852
  },
159739
159853
  "on": {
159740
159854
  "click": e => this.select(a, e)
@@ -159749,7 +159863,7 @@ __webpack_require__.r(__webpack_exports__);
159749
159863
  "attrs": {
159750
159864
  "type": "danger",
159751
159865
  "size": size,
159752
- "disabled": disabled || selectedKeys == 0
159866
+ "disabled": disabled || selectedKeys.length == 0
159753
159867
  },
159754
159868
  "on": {
159755
159869
  "click": e => this.select(a, e)
@@ -159764,7 +159878,7 @@ __webpack_require__.r(__webpack_exports__);
159764
159878
  "attrs": {
159765
159879
  "type": "danger",
159766
159880
  "size": size,
159767
- "disabled": disabled || selectedKeys == 0
159881
+ "disabled": disabled || selectedKeys.length == 0
159768
159882
  },
159769
159883
  "on": {
159770
159884
  "click": e => this.select(a, e)
@@ -159842,6 +159956,13 @@ __webpack_require__.r(__webpack_exports__);
159842
159956
 
159843
159957
  /***/ }),
159844
159958
 
159959
+ /***/ "e95a":
159960
+ /***/ (function(module, exports, __webpack_require__) {
159961
+
159962
+ // extracted by mini-css-extract-plugin
159963
+
159964
+ /***/ }),
159965
+
159845
159966
  /***/ "e9e0":
159846
159967
  /***/ (function(module, exports, __webpack_require__) {
159847
159968
 
@@ -162341,6 +162462,10 @@ __webpack_require__.r(__webpack_exports__);
162341
162462
  type: String,
162342
162463
  default: () => ''
162343
162464
  },
162465
+ margin: {
162466
+ type: String,
162467
+ default: () => '0'
162468
+ },
162344
162469
  padding: {
162345
162470
  type: String,
162346
162471
  default: () => '20px'
@@ -162385,7 +162510,7 @@ __webpack_require__.r(__webpack_exports__);
162385
162510
  dragstart(a) {
162386
162511
  if (this.draggable) {
162387
162512
  a.dataTransfer.setData(this.dragType, this.id);
162388
- this.$store.commit('changeDragId', this.id);
162513
+ this.$store.commit('setDragId', this.id);
162389
162514
  this.$emit('dragstart', a);
162390
162515
  }
162391
162516
  },
@@ -162428,7 +162553,7 @@ __webpack_require__.r(__webpack_exports__);
162428
162553
  this.animate(draging, dragPostion);
162429
162554
  this.animate(droping, dropPostion);
162430
162555
  }
162431
- this.$store.commit('changeDropId', this.id);
162556
+ this.$store.commit('setDropId', this.id);
162432
162557
  this.$emit('drop', a);
162433
162558
  }
162434
162559
  },
@@ -162480,6 +162605,10 @@ __webpack_require__.r(__webpack_exports__);
162480
162605
  ...props
162481
162606
  } = this.$attrs;
162482
162607
  return h("div", {
162608
+ "style": {
162609
+ padding: this.margin
162610
+ }
162611
+ }, [h("div", {
162483
162612
  "attrs": {
162484
162613
  "id": this.id
162485
162614
  },
@@ -162547,7 +162676,7 @@ __webpack_require__.r(__webpack_exports__);
162547
162676
  "size": "small",
162548
162677
  "disabled": this.loading
162549
162678
  }
162550
- }, [this.cancelText]), this.actionRender])]);
162679
+ }, [this.cancelText]), this.actionRender])])]);
162551
162680
  }
162552
162681
  });
162553
162682
 
@@ -165355,17 +165484,6 @@ Clip.prototype = {
165355
165484
  var _default = Clip;
165356
165485
  module.exports = _default;
165357
165486
 
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
165487
  /***/ }),
165370
165488
 
165371
165489
  /***/ "f8d0":
@@ -166994,7 +167112,7 @@ __webpack_require__.r(__webpack_exports__);
166994
167112
  },
166995
167113
  inline: {
166996
167114
  type: Boolean,
166997
- default: () => true
167115
+ default: () => false
166998
167116
  },
166999
167117
  cols: {
167000
167118
  type: String,
@@ -167043,21 +167161,28 @@ __webpack_require__.r(__webpack_exports__);
167043
167161
  },
167044
167162
  data() {
167045
167163
  return {
167046
- form: {}
167164
+ form: {},
167165
+ height: 0,
167166
+ opened: false
167047
167167
  };
167048
167168
  },
167049
167169
  created() {
167050
167170
  this.create();
167051
167171
  },
167052
- mounted() {},
167172
+ mounted() {
167173
+ this.update();
167174
+ },
167053
167175
  destroyed() {
167054
167176
  this.create = null;
167177
+ this.update = null;
167055
167178
  this.submit = null;
167056
167179
  this.cancel = null;
167057
167180
  this.filter = null;
167058
167181
  this.result = null;
167182
+ this.switch = null;
167059
167183
  this.prompt = null;
167060
167184
  this.format = null;
167185
+ this.output = null;
167061
167186
  },
167062
167187
  watch: {
167063
167188
  values() {
@@ -167074,43 +167199,35 @@ __webpack_require__.r(__webpack_exports__);
167074
167199
  this.form = data;
167075
167200
  }
167076
167201
  },
167202
+ update() {
167203
+ let rows = Math.ceil(Object.keys(this.config).length / this.cols);
167204
+ this.height = this.$el.clientHeight * (rows - 1);
167205
+ },
167077
167206
  submit(e) {
167078
167207
  // 提交表单
167079
167208
  e && e.preventDefault();
167080
167209
  let pass = !this.check; // 判断是否是空表单
167081
- for (let a in this.form) if (this.form[a].trim() != '') pass = true;
167210
+ for (let a in this.form) if (this.form[a] != '') pass = true;
167082
167211
  let data = {};
167083
167212
  if (Object.keys(this.config).length > 0) {
167084
167213
  // 格式化属性为模糊查询属性
167085
167214
  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() + '%';
167215
+ if (this.config[a] != '' && this.config[a].like && this.form[a] != '' && this.form[a] != null && this.form[a] != undefined) {
167216
+ if (this.config[a].like == 'left') data[a] = '%' + this.form[a];
167217
+ if (this.config[a].like == 'right') data[a] = this.form[a] + '%';else data[a] = '%' + this.form[a] + '%';
167089
167218
  } else {
167090
167219
  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();
167220
+ data[`${a}LE`] = this.form[`${a}LE`];
167221
+ data[`${a}GE`] = this.form[`${a}GE`];
167222
+ } 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
167223
  }
167095
167224
  }
167096
167225
  }
167097
167226
  if (pass) {
167098
167227
  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
167228
  this.$nextTick(() => {
167109
- let change = false;
167110
- Object.keys(result).forEach(a => result[a] != formParams[a] && (change = true));
167111
- if (change) this.$emit('submit', {
167229
+ this.$emit('submit', {
167112
167230
  ...result,
167113
- ...pageParams,
167114
167231
  page: 1
167115
167232
  }); // 派发事件并重置当前分页
167116
167233
  return result;
@@ -167123,15 +167240,6 @@ __webpack_require__.r(__webpack_exports__);
167123
167240
  let pass = !this.check; // 判断是否是空表单
167124
167241
  for (let a in this.form) if (this.form[a] != '') pass = true;
167125
167242
  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
167243
  this.$nextTick(() => {
167136
167244
  for (let a in this.form) this.form[a] = '';
167137
167245
  this.$nextTick(() => this.$emit('cancel', this.form));
@@ -167139,19 +167247,18 @@ __webpack_require__.r(__webpack_exports__);
167139
167247
  }
167140
167248
  },
167141
167249
  filter(form = {}) {
167142
- // 过滤空值属性
167143
167250
  const data = {};
167144
167251
  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
- }
167252
+ if (form[a] != '' && form[a] != '%%' && form[a] != 'null' && form[a] != 'undefined' && form[a] != null && form[a] != undefined) data[a] = form[a];
167148
167253
  }
167149
167254
  return data;
167150
167255
  },
167151
167256
  result() {
167152
- // 返回验证后的表单数据
167153
167257
  return this.filter(this.form);
167154
167258
  },
167259
+ switch() {
167260
+ this.opened = !this.opened;
167261
+ },
167155
167262
  prompt(a = {}, index = 0, placeholder = '') {
167156
167263
  if (Object.keys(a).length > 0 && a.placeholder && a.placeholder.length && a.placeholder.length > 0) return a.placeholder[index];
167157
167264
  return placeholder;
@@ -167180,6 +167287,31 @@ __webpack_require__.r(__webpack_exports__);
167180
167287
  }
167181
167288
  });
167182
167289
  }
167290
+ },
167291
+ output(a, b) {
167292
+ const h = this.$createElement;
167293
+ let style = this.cols != '' ? {
167294
+ width: `${100 / this.cols}%`
167295
+ } : {};
167296
+ return h("el-col", {
167297
+ "key": b,
167298
+ "style": style
167299
+ }, [h("el-form-item", {
167300
+ "attrs": {
167301
+ "prop": `${a}`,
167302
+ "label": this.label ? this.config[a]['text'] : ''
167303
+ }
167304
+ }, [this.config[a].than || this.config[a].range || this.config[a].scope ? h("el-col", {
167305
+ "class": "range-cols"
167306
+ }, [h("el-col", {
167307
+ "attrs": {
167308
+ "span": 12
167309
+ }
167310
+ }, [this.format(a, `${a}LE`, this.prompt(this.config[a], 0, '最高'))]), h("el-col", {
167311
+ "attrs": {
167312
+ "span": 12
167313
+ }
167314
+ }, [this.format(a, `${a}GE`, this.prompt(this.config[a], 1, '最低'))])]) : this.format(a)])]);
167183
167315
  }
167184
167316
  },
167185
167317
  render() {
@@ -167191,10 +167323,6 @@ __webpack_require__.r(__webpack_exports__);
167191
167323
  submit = null,
167192
167324
  cancel = null
167193
167325
  } = 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
167326
  return h("div", {
167199
167327
  "class": "b-f-search",
167200
167328
  "style": {
@@ -167203,7 +167331,8 @@ __webpack_require__.r(__webpack_exports__);
167203
167331
  }, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
167204
167332
  "ref": "form",
167205
167333
  "attrs": {
167206
- "size": this.size
167334
+ "size": this.size,
167335
+ "inline": this.inline
167207
167336
  }
167208
167337
  }, {
167209
167338
  "props": {
@@ -167215,38 +167344,42 @@ __webpack_require__.r(__webpack_exports__);
167215
167344
  "labelWidth": this.labelWidth,
167216
167345
  "labelPosition": this.labelPosition
167217
167346
  }
167218
- }]), [h("el-row", {
167347
+ }]), [h("div", {
167348
+ "class": "column"
167349
+ }, [h("el-row", {
167219
167350
  "attrs": {
167220
167351
  "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", {
167352
+ },
167353
+ "class": "main-row"
167354
+ }, [Object.keys(this.config).map((a, b) => b < this.cols && this.output(a, b))]), h("el-row", {
167227
167355
  "attrs": {
167228
- "prop": `${a}`,
167229
- "label": label(a)
167356
+ "gutter": Number(this.gutter)
167357
+ },
167358
+ "class": "fold-row",
167359
+ "style": {
167360
+ height: this.opened ? `${this.height}px` : '0'
167230
167361
  }
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
167362
+ }, [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", {
167363
+ "class": "action",
167364
+ "style": {
167365
+ paddingLeft: `${this.gutter}px`
167236
167366
  }
167237
- }, [this.format(a, `${a}LE`, this.prompt(this.config[a], 0, '最高'))]), h("el-col", {
167367
+ }, [h("el-form-item", {
167238
167368
  "attrs": {
167239
- "span": 12
167369
+ "label": "action"
167240
167370
  }
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", {
167371
+ }, [Object.keys(this.config).length > this.cols && h("el-button", {
167246
167372
  "attrs": {
167247
- "label": this.label ? 'action' : ''
167373
+ "disabled": this.loading,
167374
+ "type": "text"
167375
+ },
167376
+ "class": "collapse-button",
167377
+ "on": {
167378
+ "click": this.switch
167248
167379
  }
167249
- }, [submit && h("el-button", {
167380
+ }, [h("i", {
167381
+ "class": `el-icon-arrow-${this.opened ? 'up' : 'down'}`
167382
+ }), this.opened ? '收起' : '展开']), submit && h("el-button", {
167250
167383
  "attrs": {
167251
167384
  "disabled": this.loading,
167252
167385
  "type": "primary"
@@ -167262,7 +167395,7 @@ __webpack_require__.r(__webpack_exports__);
167262
167395
  "on": {
167263
167396
  "click": this.cancel
167264
167397
  }
167265
- }, [this.cancelText])])])])])]);
167398
+ }, [this.cancelText])])])])]);
167266
167399
  }
167267
167400
  });
167268
167401