element-ui-root 3.0.5 → 3.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -6274,359 +6274,6 @@ module.exports = _default;
6274
6274
 
6275
6275
  /***/ }),
6276
6276
 
6277
- /***/ "0d0c":
6278
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
6279
-
6280
- "use strict";
6281
- __webpack_require__.r(__webpack_exports__);
6282
- /* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
6283
- /* 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__);
6284
- /* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2234");
6285
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("d4f0");
6286
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_2__);
6287
-
6288
-
6289
-
6290
- /* harmony default export */ __webpack_exports__["default"] = ({
6291
- name: 'Aform',
6292
- components: {
6293
- AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"]
6294
- },
6295
- props: {
6296
- margin: {
6297
- type: String,
6298
- default: () => '0'
6299
- },
6300
- pure: {
6301
- type: Boolean,
6302
- default: () => true
6303
- },
6304
- inline: {
6305
- type: Boolean,
6306
- default: () => false
6307
- },
6308
- size: {
6309
- type: String,
6310
- default: () => 'small'
6311
- },
6312
- rules: {
6313
- type: Object,
6314
- default: () => ({})
6315
- },
6316
- labelWidth: {
6317
- type: String,
6318
- default: () => ''
6319
- },
6320
- labelPosition: {
6321
- type: String,
6322
- default: () => 'top'
6323
- },
6324
- config: {
6325
- type: Array,
6326
- default: () => []
6327
- },
6328
- object: {
6329
- type: Object,
6330
- default: () => ({})
6331
- },
6332
- values: {
6333
- type: Object,
6334
- default: () => ({})
6335
- },
6336
- label: {
6337
- type: Boolean,
6338
- default: () => true
6339
- },
6340
- loading: {
6341
- type: Boolean,
6342
- default: () => false
6343
- },
6344
- fileRemoveMark: {
6345
- type: String,
6346
- default: () => 'will-remove'
6347
- },
6348
- finishText: {
6349
- type: String,
6350
- default: () => '保存'
6351
- },
6352
- submitText: {
6353
- type: String,
6354
- default: () => '确定'
6355
- },
6356
- searchText: {
6357
- type: String,
6358
- default: () => '搜索'
6359
- },
6360
- cancelText: {
6361
- type: String,
6362
- default: () => '取消'
6363
- }
6364
- },
6365
- data() {
6366
- return {
6367
- form: {},
6368
- randomKey: `key-${Math.random()}`
6369
- };
6370
- },
6371
- created() {
6372
- this.create();
6373
- },
6374
- beforeDestroy() {
6375
- this.cancel();
6376
- },
6377
- destroyed() {
6378
- this.create = null;
6379
- this.verify = null;
6380
- this.finish = null;
6381
- this.submit = null;
6382
- this.cancel = null;
6383
- this.filter = null;
6384
- this.result = null;
6385
- },
6386
- watch: {
6387
- values: {
6388
- immediate: true,
6389
- handler() {
6390
- this.create();
6391
- }
6392
- }
6393
- },
6394
- methods: {
6395
- create() {
6396
- // 创建表单 格式化表单配置对象(this.config)为数据双向绑定对象
6397
- this.randomKey = `key-${Math.random()}`;
6398
- const {
6399
- config = [],
6400
- object = {},
6401
- values = {}
6402
- } = this;
6403
- let temp = {};
6404
- let data = {};
6405
- if (config && config.length > 0) {
6406
- for (let a in config) temp[config[a].name || config[a].field] = '';
6407
- }
6408
- if (object && Object.keys(object).length > 0) {
6409
- for (let a in object) temp[a] = '';
6410
- }
6411
- if (values && Object.keys(values).length > 0) {
6412
- // 设置默认值
6413
- for (let a in temp) {
6414
- if (a.includes('password')) data[a] = '';else data[a] = isNaN(values[a]) ? values[a] : values[a] != null ? `${values[a]}` : '';
6415
- }
6416
- } else {
6417
- if (!this.pure) {
6418
- for (let a in config) {
6419
- // 设置 config 数组(单选框, 下拉框, 开关) 默认值为0
6420
- if (!config[a].pure) {
6421
- if (config[a]['type'] == 'radio' || config[a]['type'] == 'select' || config[a]['type'] == 'switch') {
6422
- data[config[a].name || config[a].field] = config[a].default || '0';
6423
- } else data[config[a].name || config[a].field] = config[a].default || '';
6424
- } else data[config[a].name || config[a].field] = '';
6425
- }
6426
- for (let a in object) {
6427
- // 设置 object 对象(单选框, 下拉框, 开关) 默认值为0
6428
- if (!object[a].pure) {
6429
- if (object[a]['type'] == 'radio' || object[a]['type'] == 'select' || object[a]['type'] == 'switch') {
6430
- data[a] = object[a].default || '0';
6431
- } else data[a] = object[a].default || '';
6432
- } else data[a] = '';
6433
- }
6434
- } else {
6435
- for (let a in temp) data[a] = '';
6436
- }
6437
- }
6438
- this.form = data;
6439
- },
6440
- verify() {
6441
- // 表单验证
6442
- let result = false;
6443
- this.$refs['form'].validate(valid => result = valid);
6444
- return result;
6445
- },
6446
- finish(e) {
6447
- e && e.preventDefault();
6448
- this.$emit('finish', this.result());
6449
- },
6450
- submit(e) {
6451
- // 提交表单
6452
- e && e.preventDefault();
6453
- this.$refs['form'].validate(valid => {
6454
- if (valid) {
6455
- let data = {};
6456
- if (this.config.length > 0) {
6457
- for (let a in this.config) {
6458
- // 格式化数据模糊查询
6459
- if (this.config[a].like) data[this.config[a].name] = '%' + this.form[this.config[a].name] + '%';
6460
- if (this.form[this.config[a].name] && Object.keys(this.form[this.config[a].name]).length > 0 && this.form[this.config[a].name].old && this.form[this.config[a].name].old.split('=')[1] != '') {
6461
- // 判断是否有默认图片删除
6462
- const {
6463
- old
6464
- } = this.form[this.config[a].name];
6465
- data[this.config[a].name] = this.form[this.config[a].name];
6466
- data[`${this.config[a].name}-${this.fileRemoveMark}`] = old;
6467
- } else data[this.config[a].name] = this.form[this.config[a].name];
6468
- }
6469
- }
6470
- if (Object.keys(this.object).length > 0) {
6471
- for (let a in this.object) {
6472
- // 格式化数据模糊查询
6473
- if (this.object[a].like) data[a] = '%' + this.form[a] + '%';
6474
- if (this.form[a] && Object.keys(this.form[a]).length > 0 && this.form[a].old && this.form[a].old.split('=')[1] != '') {
6475
- // 判断是否有默认图片删除
6476
- const {
6477
- old
6478
- } = this.form[a];
6479
- data[a] = this.form[a];
6480
- data[`${a}-${this.fileRemoveMark}`] = old;
6481
- } else data[a] = this.form[a];
6482
- }
6483
- }
6484
- this.$emit('submit', this.filter(data));
6485
- return this.filter(data);
6486
- }
6487
- });
6488
- },
6489
- regain() {
6490
- this.$refs['form'] && this.$refs['form'].resetFields();
6491
- },
6492
- cancel(e) {
6493
- e && e.preventDefault();
6494
- this.$emit('cancel', this.form);
6495
- this.$nextTick(() => {
6496
- for (let a in this.form) this.form[a] = '';
6497
- this.$nextTick(() => this.$refs['form'] && this.$refs['form'].resetFields());
6498
- });
6499
- },
6500
- filter(form) {
6501
- // 过滤空值属性
6502
- const data = {};
6503
- for (let a in form) {
6504
- if (a != undefined && a != 'undefined' && form[a] != '%%' && form[a] != 'null' && form[a] != 'undefined' && form[a] != null && form[a] != undefined) {
6505
- data[a] = form[a];
6506
- }
6507
- }
6508
- return data;
6509
- },
6510
- result() {
6511
- return this.filter(this.form);
6512
- },
6513
- change() {
6514
- this.$emit('input', this.form);
6515
- this.$emit('change', this.form);
6516
- }
6517
- },
6518
- render() {
6519
- const h = arguments[0];
6520
- const {
6521
- ...props
6522
- } = this.$attrs;
6523
- const {
6524
- finish = null,
6525
- submit = null,
6526
- cancel = null
6527
- } = this.$listeners;
6528
- return h("div", {
6529
- "class": !this.inline ? this.search ? 'a-form' : 'a-from vertical' : 'a-form',
6530
- "style": {
6531
- padding: this.margin
6532
- }
6533
- }, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
6534
- "ref": "form",
6535
- "attrs": {
6536
- "size": this.size,
6537
- "labelWidth": this.labelWidth,
6538
- "labelPosition": this.labelPosition,
6539
- "inline": this.inline ? this.inline : this.search
6540
- }
6541
- }, {
6542
- "props": {
6543
- model: this.form,
6544
- rules: Object.keys(this.rules).length > 0 ? this.rules : {},
6545
- ...props
6546
- }
6547
- }]), [this.config.length > 0 && this.config.map((a, b) => h("el-form-item", {
6548
- "key": b,
6549
- "attrs": {
6550
- "prop": `${a.name}`,
6551
- "label": this.label ? a.type && a.type == 'checkbox' ? '' : a.text || a.label || a.title : '',
6552
- "rules": a['must'] ? a['rule'] ? a['rule'] : [{
6553
- required: true,
6554
- trigger: 'blur',
6555
- message: `${a['text']}不能为空`
6556
- }] : a['rule']
6557
- },
6558
- "style": {
6559
- width: a.width
6560
- }
6561
- }, [h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
6562
- "attrs": {
6563
- "config": {
6564
- form: this.form,
6565
- size: a.size ? a.size : this.size,
6566
- field: `${a.name}`,
6567
- ...a
6568
- }
6569
- },
6570
- "on": {
6571
- "change": () => this.change()
6572
- }
6573
- })])), Object.keys(this.object).length > 0 && Object.keys(this.object).map((a, b) => h("el-form-item", {
6574
- "key": b,
6575
- "attrs": {
6576
- "prop": `${a}`,
6577
- "label": this.label ? this.object[a].type && this.object[a].type == 'checkbox' ? '' : this.object[a].text || this.object[a].label || this.object[a].title : '',
6578
- "rules": this.object[a]['must'] ? this.object[a]['rule'] ? this.object[a]['rule'] : [{
6579
- required: true,
6580
- trigger: 'blur',
6581
- message: `${this.object[a]['text']}不能为空`
6582
- }] : this.object[a]['rule']
6583
- },
6584
- "style": {
6585
- width: this.object[a].width
6586
- }
6587
- }, [h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
6588
- "attrs": {
6589
- "config": {
6590
- form: this.form,
6591
- size: this.object[a].size ? this.object[a].size : this.size,
6592
- field: `${a}`,
6593
- ...this.object[a]
6594
- }
6595
- },
6596
- "on": {
6597
- "change": () => this.change()
6598
- }
6599
- })])), this.$slots.default, (finish || submit || cancel) && h("div", {
6600
- "class": "action"
6601
- }, [h("el-form-item", [finish && this.finishText != '' && h("el-button", {
6602
- "attrs": {
6603
- "loading": this.loading,
6604
- "type": "success"
6605
- },
6606
- "on": {
6607
- "click": this.finish
6608
- }
6609
- }, [this.finishText]), submit && h("el-button", {
6610
- "attrs": {
6611
- "loading": this.loading,
6612
- "type": "primary"
6613
- },
6614
- "on": {
6615
- "click": this.submit
6616
- }
6617
- }, [this.submitText]), cancel && h("el-button", {
6618
- "attrs": {
6619
- "disabled": this.loading
6620
- },
6621
- "on": {
6622
- "click": this.cancel
6623
- }
6624
- }, [this.cancelText])])])])]);
6625
- }
6626
- });
6627
-
6628
- /***/ }),
6629
-
6630
6277
  /***/ "0d7f":
6631
6278
  /***/ (function(module, exports, __webpack_require__) {
6632
6279
 
@@ -13410,31 +13057,6 @@ var map = {
13410
13057
  "./Aenume/index": "6cc8",
13411
13058
  "./Aenume/index.js": "6cc8",
13412
13059
  "./Aform": "aff6",
13413
- "./Aform copy": "0d0c",
13414
- "./Aform copy/": "0d0c",
13415
- "./Aform copy/AfEditor": "3cef",
13416
- "./Aform copy/AfEditor/": "3cef",
13417
- "./Aform copy/AfEditor/index": "3cef",
13418
- "./Aform copy/AfEditor/index.css": "9203",
13419
- "./Aform copy/AfEditor/index.js": "3cef",
13420
- "./Aform copy/AfSearch": "230c",
13421
- "./Aform copy/AfSearch/": "230c",
13422
- "./Aform copy/AfSearch/index": "230c",
13423
- "./Aform copy/AfSearch/index.css": "6e39",
13424
- "./Aform copy/AfSearch/index.js": "230c",
13425
- "./Aform copy/BfSearch": "c0f0",
13426
- "./Aform copy/BfSearch/": "c0f0",
13427
- "./Aform copy/BfSearch/index": "c0f0",
13428
- "./Aform copy/BfSearch/index.css": "9e53",
13429
- "./Aform copy/BfSearch/index.js": "c0f0",
13430
- "./Aform copy/CfSearch": "a237",
13431
- "./Aform copy/CfSearch/": "a237",
13432
- "./Aform copy/CfSearch/index": "a237",
13433
- "./Aform copy/CfSearch/index.css": "af1c",
13434
- "./Aform copy/CfSearch/index.js": "a237",
13435
- "./Aform copy/index": "0d0c",
13436
- "./Aform copy/index.css": "d4f0",
13437
- "./Aform copy/index.js": "0d0c",
13438
13060
  "./Aform/": "aff6",
13439
13061
  "./Aform/AfEditor": "b550",
13440
13062
  "./Aform/AfEditor/": "b550",
@@ -13625,6 +13247,11 @@ var map = {
13625
13247
  "./Bmap/index": "e579",
13626
13248
  "./Bmap/index.css": "ba59",
13627
13249
  "./Bmap/index.js": "e579",
13250
+ "./Bpages": "7c09",
13251
+ "./Bpages/": "7c09",
13252
+ "./Bpages/index": "7c09",
13253
+ "./Bpages/index.css": "2769",
13254
+ "./Bpages/index.js": "7c09",
13628
13255
  "./Bplayer": "2c3e",
13629
13256
  "./Bplayer/": "2c3e",
13630
13257
  "./Bplayer/index": "2c3e",
@@ -13860,6 +13487,10 @@ __webpack_require__.r(__webpack_exports__);
13860
13487
  type: Object,
13861
13488
  default: () => ({})
13862
13489
  },
13490
+ must: {
13491
+ type: Boolean,
13492
+ default: () => false
13493
+ },
13863
13494
  inline: {
13864
13495
  type: Boolean,
13865
13496
  default: () => false
@@ -13879,6 +13510,10 @@ __webpack_require__.r(__webpack_exports__);
13879
13510
  global: {
13880
13511
  type: Boolean,
13881
13512
  default: () => true
13513
+ },
13514
+ disabled: {
13515
+ type: Boolean,
13516
+ default: () => false
13882
13517
  }
13883
13518
  },
13884
13519
  data() {
@@ -13919,6 +13554,9 @@ __webpack_require__.r(__webpack_exports__);
13919
13554
  r.default && (this.form[a] = r.default || '');
13920
13555
  }
13921
13556
  });
13557
+ this.$nextTick(() => {
13558
+ Object.keys(this.value).forEach(a => typeof this.value[a] == 'number' && (this.form[a] = `${this.value[a]}`));
13559
+ });
13922
13560
  },
13923
13561
  create(a, b) {
13924
13562
  const h = this.$createElement;
@@ -13927,22 +13565,27 @@ __webpack_require__.r(__webpack_exports__);
13927
13565
  } = this.config[a];
13928
13566
  let label = r.text || r.label || r.title || '';
13929
13567
  let width = r.width ? r.width : `${100 / this.cols}%`;
13930
- let style = this.cols != '' ? {
13931
- width
13932
- } : {};
13568
+ let judge = [{
13569
+ required: true,
13570
+ message: `${label}不能为空`
13571
+ }];
13572
+ let valid = r.rule ? r.rule : r.must || this.must ? judge : [];
13573
+ let rules = this.disabled || r.disabled ? [] : (r.must || this.must) && r.rule ? [...judge, ...r.rule] : valid;
13933
13574
  let props = {
13934
13575
  name: a,
13935
13576
  prop: a,
13936
13577
  label,
13578
+ rules,
13579
+ disabled: r.disabled || this.disabled,
13937
13580
  ...r
13938
13581
  };
13939
13582
  if (this.inline) {
13940
- let styles = {
13583
+ let style = {
13941
13584
  padding: `0 ${this.gutter / 2}px`,
13942
- ...style
13585
+ width
13943
13586
  };
13944
13587
  return h("el-form-item", {
13945
- "style": styles,
13588
+ "style": style,
13946
13589
  "props": {
13947
13590
  ...props
13948
13591
  }
@@ -13962,7 +13605,9 @@ __webpack_require__.r(__webpack_exports__);
13962
13605
  } else {
13963
13606
  return h("el-col", {
13964
13607
  "key": b,
13965
- "style": style
13608
+ "style": {
13609
+ width
13610
+ }
13966
13611
  }, [h("el-form-item", {
13967
13612
  "props": {
13968
13613
  ...props
@@ -13976,10 +13621,6 @@ __webpack_require__.r(__webpack_exports__);
13976
13621
  this.option[b] = a;
13977
13622
  let child = a.children || a.child || a.node || null;
13978
13623
  if (child && Object.keys(child).length > 0) {
13979
- let width = a.width ? a.width : `${100 / Object.keys(child).length}%`;
13980
- let style = this.cols != '' ? {
13981
- width
13982
- } : {};
13983
13624
  return Object.keys(child).map((c, d) => {
13984
13625
  let {
13985
13626
  ...r
@@ -13992,9 +13633,12 @@ __webpack_require__.r(__webpack_exports__);
13992
13633
  }
13993
13634
  }, [this.format(r, c)]);
13994
13635
  } else {
13636
+ let width = r.width ? r.width : `${100 / Object.keys(child).length}%`;
13995
13637
  return h("el-col", {
13996
13638
  "key": d,
13997
- "style": style
13639
+ "style": {
13640
+ width
13641
+ }
13998
13642
  }, [this.format(r, c)]);
13999
13643
  }
14000
13644
  });
@@ -14039,7 +13683,11 @@ __webpack_require__.r(__webpack_exports__);
14039
13683
  }
14040
13684
  }
14041
13685
  });
14042
- return data;
13686
+ let value = {};
13687
+ Object.keys(data).forEach(a => {
13688
+ if (data[a] && data[a] != '%' && data[a] != '%%') value[a] = data[a];
13689
+ });
13690
+ return value;
14043
13691
  },
14044
13692
  submit() {
14045
13693
  if (this.global) {
@@ -14052,7 +13700,7 @@ __webpack_require__.r(__webpack_exports__);
14052
13700
  page: 1
14053
13701
  });
14054
13702
  }
14055
- this.$nextTick(() => this.$emit('submit', this.filter(), this.form, this.option));
13703
+ this.$refs.form.validate(valid => valid && this.$emit('submit', this.filter(), this.form, this.option));
14056
13704
  },
14057
13705
  cancel() {
14058
13706
  this.$refs.form && this.$refs.form.resetFields && this.$refs.form.resetFields();
@@ -14080,9 +13728,8 @@ __webpack_require__.r(__webpack_exports__);
14080
13728
  render() {
14081
13729
  const h = arguments[0];
14082
13730
  let {
14083
- padding = '0',
14084
13731
  margin = '0',
14085
- ref = 'form',
13732
+ padding = '0',
14086
13733
  size = 'small',
14087
13734
  loading = false,
14088
13735
  labelWidth = 'auto',
@@ -14090,7 +13737,7 @@ __webpack_require__.r(__webpack_exports__);
14090
13737
  submitText = '搜索',
14091
13738
  cancelText = '重置',
14092
13739
  action = [],
14093
- ...props
13740
+ ...rest
14094
13741
  } = this.$attrs;
14095
13742
  let {
14096
13743
  submit = null,
@@ -14099,6 +13746,14 @@ __webpack_require__.r(__webpack_exports__);
14099
13746
  let style = this.inline ? {
14100
13747
  margin: `0 -${this.gutter / 2}px`
14101
13748
  } : {};
13749
+ let props = {
13750
+ size,
13751
+ inline: this.inline,
13752
+ labelWidth,
13753
+ labelPosition,
13754
+ style,
13755
+ ...rest
13756
+ };
14102
13757
  return h("div", {
14103
13758
  "class": "a-f-search",
14104
13759
  "style": {
@@ -14106,14 +13761,7 @@ __webpack_require__.r(__webpack_exports__);
14106
13761
  padding
14107
13762
  }
14108
13763
  }, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
14109
- "ref": ref,
14110
- "attrs": {
14111
- "size": size,
14112
- "inline": this.inline,
14113
- "label-width": labelWidth,
14114
- "label-position": labelPosition
14115
- },
14116
- "style": style
13764
+ "ref": "form"
14117
13765
  }, {
14118
13766
  "props": {
14119
13767
  model: this.form,
@@ -14170,7 +13818,7 @@ __webpack_require__.r(__webpack_exports__);
14170
13818
  "on": {
14171
13819
  "click": this.cancel
14172
13820
  }
14173
- }, [cancelText]), action.forEach((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
13821
+ }, [cancelText]), action.map((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
14174
13822
  "key": b,
14175
13823
  "attrs": {
14176
13824
  "disabled": loading
@@ -16629,7 +16277,7 @@ __webpack_require__.r(__webpack_exports__);
16629
16277
  ...props
16630
16278
  } = this.$attrs;
16631
16279
  return h("div", {
16632
- "class": "a-page"
16280
+ "class": "a-pages"
16633
16281
  }, [h("el-pagination", {
16634
16282
  "attrs": {
16635
16283
  "small": this.small,
@@ -19152,7 +18800,6 @@ __webpack_require__.r(__webpack_exports__);
19152
18800
 
19153
18801
 
19154
18802
 
19155
-
19156
18803
 
19157
18804
 
19158
18805
  /* harmony default export */ __webpack_exports__["default"] = ({
@@ -19169,19 +18816,19 @@ __webpack_require__.r(__webpack_exports__);
19169
18816
  },
19170
18817
  data() {
19171
18818
  return {
19172
- rand: Math.random()
18819
+ random: Math.random()
19173
18820
  };
19174
18821
  },
19175
18822
  watch: {
19176
18823
  config: {
19177
18824
  immediate: true,
19178
18825
  handler() {
19179
- this.rand = Math.random();
18826
+ this.update();
19180
18827
  }
19181
18828
  }
19182
18829
  },
19183
18830
  created() {
19184
- this.rand = Math.random();
18831
+ this.update();
19185
18832
  },
19186
18833
  destroyed() {
19187
18834
  this.input = null;
@@ -19199,6 +18846,9 @@ __webpack_require__.r(__webpack_exports__);
19199
18846
  } = this.config;
19200
18847
  this.config.change && this.config.change(a, data.length > 0 ? this.filter(data, a) : null);
19201
18848
  },
18849
+ update() {
18850
+ this.random = Math.random();
18851
+ },
19202
18852
  filter(array = [], value = '') {
19203
18853
  let data = {};
19204
18854
  if (value != '') array.length > 0 && array.forEach(a => {
@@ -19213,35 +18863,14 @@ __webpack_require__.r(__webpack_exports__);
19213
18863
  ...r
19214
18864
  }) {
19215
18865
  const h = this.$createElement;
19216
- const label = r.text || r.label || r.title || '';
19217
18866
  const style = {
19218
- width: r.width || '100%',
18867
+ width: '100%',
19219
18868
  ...r.style
19220
18869
  };
18870
+ const label = r.text || r.label || r.title || '';
19221
18871
  const values = (a = {}) => typeof a == 'string' ? a : `${a.value || a.code || a.id}`;
19222
18872
  const labels = (a = {}) => typeof a == 'string' ? a : a.label || a.title || a.text || a.name;
19223
18873
  if (r.render) return r.render(form, this.config);
19224
- if (!r.type) return h("el-input", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
19225
- "on": {
19226
- "input": this.input,
19227
- "change": this.change
19228
- },
19229
- "attrs": {
19230
- "placeholder": `请输入${label}`
19231
- },
19232
- "style": {
19233
- ...r.style
19234
- }
19235
- }, {
19236
- "props": r
19237
- }, {
19238
- "model": {
19239
- value: form[field],
19240
- callback: $$v => {
19241
- this.$set(form, field, $$v);
19242
- }
19243
- }
19244
- }]));
19245
18874
  switch (r.type) {
19246
18875
  case 'input':
19247
18876
  return h("el-input", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
@@ -19264,7 +18893,7 @@ __webpack_require__.r(__webpack_exports__);
19264
18893
  }
19265
18894
  }
19266
18895
  }]));
19267
- case 'number':
18896
+ case 'password':
19268
18897
  return h("el-input", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
19269
18898
  "on": {
19270
18899
  "input": this.input,
@@ -19272,7 +18901,8 @@ __webpack_require__.r(__webpack_exports__);
19272
18901
  },
19273
18902
  "attrs": {
19274
18903
  "clearable": true,
19275
- "placeholder": r.placeholder || `请输入${label}`
18904
+ "placeholder": r.placeholder || `请输入${label}`,
18905
+ "show-password": true
19276
18906
  },
19277
18907
  "style": style
19278
18908
  }, {
@@ -19285,16 +18915,19 @@ __webpack_require__.r(__webpack_exports__);
19285
18915
  }
19286
18916
  }
19287
18917
  }]));
19288
- case 'password':
19289
- return h("el-input", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
18918
+ case 'number':
18919
+ return h("el-input-number", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
19290
18920
  "on": {
19291
18921
  "input": this.input,
19292
18922
  "change": this.change
19293
18923
  },
19294
18924
  "attrs": {
19295
18925
  "clearable": true,
19296
- "placeholder": r.placeholder || `请输入${label}`,
19297
- "show-password": true
18926
+ "min": 0,
18927
+ "max": 100000000,
18928
+ "controls": false,
18929
+ "controls-position": "right",
18930
+ "placeholder": r.placeholder || `请输入${label}`
19298
18931
  },
19299
18932
  "style": style
19300
18933
  }, {
@@ -19588,7 +19221,7 @@ __webpack_require__.r(__webpack_exports__);
19588
19221
  }]));
19589
19222
  case 'image':
19590
19223
  return h(_components_Aupload_Icon__WEBPACK_IMPORTED_MODULE_2__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
19591
- "key": this.rand,
19224
+ "key": this.random,
19592
19225
  "on": {
19593
19226
  "input": this.input,
19594
19227
  "change": this.change
@@ -19610,7 +19243,7 @@ __webpack_require__.r(__webpack_exports__);
19610
19243
  }]));
19611
19244
  case 'upload':
19612
19245
  return h(_components_Aupload_Icon__WEBPACK_IMPORTED_MODULE_2__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
19613
- "key": this.rand,
19246
+ "key": this.random,
19614
19247
  "on": {
19615
19248
  "input": this.input,
19616
19249
  "change": this.change
@@ -19632,7 +19265,7 @@ __webpack_require__.r(__webpack_exports__);
19632
19265
  }]));
19633
19266
  case 'icon':
19634
19267
  return h(_components_AiconSelect__WEBPACK_IMPORTED_MODULE_1__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
19635
- "key": this.rand,
19268
+ "key": this.random,
19636
19269
  "on": {
19637
19270
  "input": this.input,
19638
19271
  "change": this.change
@@ -19653,7 +19286,7 @@ __webpack_require__.r(__webpack_exports__);
19653
19286
  }]));
19654
19287
  case 'iconSelect':
19655
19288
  return h(_components_AiconSelect__WEBPACK_IMPORTED_MODULE_1__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
19656
- "key": this.rand,
19289
+ "key": this.random,
19657
19290
  "on": {
19658
19291
  "input": this.input,
19659
19292
  "change": this.change
@@ -20146,384 +19779,6 @@ module.exports = _default;
20146
19779
 
20147
19780
  /***/ }),
20148
19781
 
20149
- /***/ "230c":
20150
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
20151
-
20152
- "use strict";
20153
- __webpack_require__.r(__webpack_exports__);
20154
- /* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
20155
- /* 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__);
20156
- /* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2234");
20157
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("6e39");
20158
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_2__);
20159
-
20160
-
20161
-
20162
- /* harmony default export */ __webpack_exports__["default"] = ({
20163
- name: 'AfSearch',
20164
- components: {
20165
- AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"]
20166
- },
20167
- props: {
20168
- value: {
20169
- type: Object,
20170
- default: () => ({})
20171
- },
20172
- margin: {
20173
- type: String,
20174
- default: () => '0'
20175
- },
20176
- size: {
20177
- type: String,
20178
- default: () => 'small'
20179
- },
20180
- inline: {
20181
- type: Boolean,
20182
- default: () => false
20183
- },
20184
- cols: {
20185
- type: String,
20186
- default: () => '6'
20187
- },
20188
- gutter: {
20189
- type: String,
20190
- default: () => '10'
20191
- },
20192
- labelWidth: {
20193
- type: String,
20194
- default: () => 'auto'
20195
- },
20196
- labelPosition: {
20197
- type: String,
20198
- default: () => 'top'
20199
- },
20200
- config: {
20201
- type: Object,
20202
- default: () => ({})
20203
- },
20204
- values: {
20205
- type: Object,
20206
- default: () => ({})
20207
- },
20208
- label: {
20209
- type: Boolean,
20210
- default: () => true
20211
- },
20212
- check: {
20213
- type: Boolean,
20214
- default: () => false
20215
- },
20216
- loading: {
20217
- type: Boolean,
20218
- default: () => false
20219
- },
20220
- submitText: {
20221
- type: String,
20222
- default: () => '搜索'
20223
- },
20224
- cancelText: {
20225
- type: String,
20226
- default: () => '重置'
20227
- }
20228
- },
20229
- data() {
20230
- return {
20231
- form: this.value,
20232
- height: 0,
20233
- opened: false
20234
- };
20235
- },
20236
- created() {
20237
- this.create();
20238
- },
20239
- mounted() {
20240
- this.update();
20241
- },
20242
- destroyed() {
20243
- this.create = null;
20244
- this.update = null;
20245
- this.submit = null;
20246
- this.cancel = null;
20247
- this.filter = null;
20248
- this.result = null;
20249
- this.switch = null;
20250
- this.format = null;
20251
- this.output = null;
20252
- },
20253
- watch: {
20254
- values() {
20255
- this.create();
20256
- }
20257
- },
20258
- methods: {
20259
- create() {
20260
- // 创建表单
20261
- if (this.config && Object.keys(this.config).length > 0) {
20262
- // 格式化表单配置对象(this.config)为数据双向绑定对象
20263
- let data = {};
20264
- Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
20265
- let {
20266
- ...r
20267
- } = this.config[a];
20268
- if (!r.render) {
20269
- let range = r.range || r.scope || r.both || r.than || null;
20270
- if (range) {
20271
- data[`${a}LE`] = '';
20272
- data[`${a}GE`] = '';
20273
- } else {
20274
- data[a] = r.default ? r.default : '';
20275
- }
20276
- }
20277
- });
20278
- this.form = data;
20279
- }
20280
- },
20281
- update() {
20282
- let rows = Math.ceil(Object.keys(this.config).length / this.cols);
20283
- this.height = this.$el.clientHeight * (rows - 1);
20284
- },
20285
- submit(e) {
20286
- // 提交表单
20287
- e && e.preventDefault();
20288
- let pass = !this.check; // 判断是否是空表单
20289
- for (let a in this.form) if (this.form[a] != '') pass = true;
20290
- if (pass) {
20291
- let result = this.filter();
20292
- const {
20293
- formParams,
20294
- pageParams
20295
- } = this.$store.state;
20296
- this.$store.commit('setFormParams', result); // 添加查询参数
20297
- this.$store.commit('setPageParams', {
20298
- ...pageParams,
20299
- page: 1
20300
- }); // 重置分页参数
20301
- this.$nextTick(() => {
20302
- let change = false;
20303
- Object.keys(result).forEach(a => result[a] != formParams[a] && (change = true));
20304
- if (change) this.$emit('submit', {
20305
- ...result,
20306
- ...pageParams,
20307
- page: 1
20308
- }); // 派发事件并重置当前分页
20309
- return result;
20310
- });
20311
- }
20312
- },
20313
- cancel(e) {
20314
- // 重置表单
20315
- e && e.preventDefault();
20316
- let pass = !this.check; // 判断是否是空表单
20317
- for (let a in this.form) if (this.form[a] != '') pass = true;
20318
- if (pass) {
20319
- const {
20320
- pageParams
20321
- } = this.$store.state;
20322
- this.$store.commit('setPageParams', {
20323
- ...pageParams,
20324
- page: 1
20325
- }); // 重置分页参数
20326
- this.$store.commit('setFormParams', {}); // 重置查询参数
20327
- this.$nextTick(() => {
20328
- for (let a in this.form) this.form[a] = '';
20329
- this.$nextTick(() => {
20330
- this.$refs.form && this.$refs.form.resetFields();
20331
- this.$nextTick(() => this.$emit('cancel', this.form));
20332
- });
20333
- });
20334
- }
20335
- },
20336
- filter() {
20337
- let data = {};
20338
- Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
20339
- let {
20340
- like = null,
20341
- ...r
20342
- } = this.config[a];
20343
- let range = r.range || r.scope || r.both || r.than || null;
20344
- if (range) {
20345
- this.form[`${a}LE`] != '' && (data[`${a}LE`] = this.form[`${a}LE`]);
20346
- this.form[`${a}GE`] != '' && (data[`${a}GE`] = this.form[`${a}GE`]);
20347
- } else {
20348
- let value = this.form[a];
20349
- if (value) {
20350
- if (r.split && typeof r.split == 'object' && r.split.length > 0) {
20351
- r.split.forEach((c, d) => data[c] = value != '' && typeof value == 'object' && value.length > 0 ? value[d] : value);
20352
- } else {
20353
- if (like) {
20354
- if (like == 'left' || like && like == 'l') data[a] = '%' + value;
20355
- if (like == 'right' || like && like == 'r') data[a] = value + '%';else data[a] = '%' + value + '%';
20356
- } else {
20357
- if (value.includes(' 00:00:00')) {
20358
- data[a] = '%' + value.split(' 00:00:00')[0] + '%';
20359
- } else {
20360
- data[a] = value;
20361
- }
20362
- }
20363
- }
20364
- }
20365
- }
20366
- });
20367
- let form = {};
20368
- Object.keys(data).length > 0 && Object.keys(data).forEach(a => {
20369
- if (data[a] != '%' && data[a] != '%%' && data[a] != 'null' && data[a] != 'undefined' && data[a] != null && data[a] != undefined) {
20370
- form[a] = data[a];
20371
- }
20372
- });
20373
- return form;
20374
- },
20375
- result() {
20376
- return this.filter(this.form);
20377
- },
20378
- switch() {
20379
- this.opened = !this.opened;
20380
- },
20381
- format(a = '', field = '', placeholder = '') {
20382
- const h = this.$createElement;
20383
- let {
20384
- ...r
20385
- } = this.config[a];
20386
- let config = {
20387
- size: r.size ? r.size : this.size,
20388
- field: field != '' ? field : a,
20389
- change: () => this.change(),
20390
- disabled: this.loading,
20391
- form: this.form,
20392
- ...r
20393
- };
20394
- return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
20395
- "attrs": {
20396
- "config": placeholder != '' ? {
20397
- ...config,
20398
- placeholder
20399
- } : config
20400
- }
20401
- });
20402
- },
20403
- output(a, b) {
20404
- const h = this.$createElement;
20405
- let {
20406
- ...r
20407
- } = this.config[a];
20408
- let range = r.range || r.scope || r.both || r.than || null;
20409
- let label = this.label ? r.text || r.label || r.title : '';
20410
- let style = this.cols != '' ? {
20411
- width: r.width ? r.width : `${100 / this.cols}%`
20412
- } : {};
20413
- let prefixPlaceholder = r.placeholder && r.placeholder.length > 0 ? r.placeholder[0] : '最高';
20414
- let suffixPlaceholder = r.placeholder && r.placeholder.length > 1 ? r.placeholder[1] : '最低';
20415
- return h("el-col", {
20416
- "key": b,
20417
- "style": style
20418
- }, [h("el-form-item", {
20419
- "attrs": {
20420
- "prop": a,
20421
- "label": label
20422
- }
20423
- }, [range ? h("el-col", {
20424
- "class": "range-cols"
20425
- }, [h("el-col", {
20426
- "attrs": {
20427
- "span": 12
20428
- }
20429
- }, [this.format(a, `${a}LE`, prefixPlaceholder)]), h("el-col", {
20430
- "attrs": {
20431
- "span": 12
20432
- }
20433
- }, [this.format(a, `${a}GE`, suffixPlaceholder)])]) : this.format(a)])]);
20434
- },
20435
- change() {
20436
- this.$emit('input', this.filter());
20437
- this.$emit('change', this.filter());
20438
- }
20439
- },
20440
- render() {
20441
- const h = arguments[0];
20442
- const {
20443
- ...props
20444
- } = this.$attrs;
20445
- const {
20446
- submit = null,
20447
- cancel = null
20448
- } = this.$listeners;
20449
- return h("div", {
20450
- "class": "a-f-search",
20451
- "style": {
20452
- padding: this.margin
20453
- }
20454
- }, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
20455
- "ref": "form",
20456
- "attrs": {
20457
- "size": this.size,
20458
- "inline": this.inline
20459
- }
20460
- }, {
20461
- "props": {
20462
- model: this.form,
20463
- ...props
20464
- }
20465
- }, {
20466
- "attrs": {
20467
- "labelWidth": this.labelWidth,
20468
- "labelPosition": this.labelPosition
20469
- }
20470
- }]), [h("div", {
20471
- "class": "column"
20472
- }, [h("el-row", {
20473
- "attrs": {
20474
- "gutter": Number(this.gutter)
20475
- },
20476
- "class": "main-rows"
20477
- }, [Object.keys(this.config).map((a, b) => b < this.cols && this.output(a, b))]), h("el-row", {
20478
- "attrs": {
20479
- "gutter": Number(this.gutter)
20480
- },
20481
- "class": "fold-rows",
20482
- "style": {
20483
- height: this.opened ? `${this.height}px` : '0'
20484
- }
20485
- }, [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", {
20486
- "class": "action",
20487
- "style": {
20488
- paddingLeft: `${this.gutter}px`
20489
- }
20490
- }, [h("el-form-item", {
20491
- "attrs": {
20492
- "label": "action"
20493
- }
20494
- }, [Object.keys(this.config).length > this.cols && h("el-button", {
20495
- "attrs": {
20496
- "disabled": this.loading,
20497
- "type": "text"
20498
- },
20499
- "class": "collapse-button",
20500
- "on": {
20501
- "click": this.switch
20502
- }
20503
- }, [h("i", {
20504
- "class": `el-icon-arrow-${this.opened ? 'up' : 'down'}`
20505
- }), this.opened ? '收起' : '展开']), submit && h("el-button", {
20506
- "attrs": {
20507
- "disabled": this.loading,
20508
- "type": "primary"
20509
- },
20510
- "on": {
20511
- "click": this.submit
20512
- }
20513
- }, [this.submitText]), cancel && h("el-button", {
20514
- "attrs": {
20515
- "disabled": this.loading,
20516
- "type": "default"
20517
- },
20518
- "on": {
20519
- "click": this.cancel
20520
- }
20521
- }, [this.cancelText])])])])]);
20522
- }
20523
- });
20524
-
20525
- /***/ }),
20526
-
20527
19782
  /***/ "23df":
20528
19783
  /***/ (function(module, exports, __webpack_require__) {
20529
19784
 
@@ -21909,6 +21164,13 @@ module.exports = _default;
21909
21164
 
21910
21165
  /***/ }),
21911
21166
 
21167
+ /***/ "2769":
21168
+ /***/ (function(module, exports, __webpack_require__) {
21169
+
21170
+ // extracted by mini-css-extract-plugin
21171
+
21172
+ /***/ }),
21173
+
21912
21174
  /***/ "2772":
21913
21175
  /***/ (function(module, exports) {
21914
21176
 
@@ -28032,417 +27294,6 @@ __webpack_require__.r(__webpack_exports__);
28032
27294
 
28033
27295
  /***/ }),
28034
27296
 
28035
- /***/ "3cef":
28036
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
28037
-
28038
- "use strict";
28039
- __webpack_require__.r(__webpack_exports__);
28040
- /* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
28041
- /* 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__);
28042
- /* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2234");
28043
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("9203");
28044
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_2__);
28045
-
28046
-
28047
-
28048
- /* harmony default export */ __webpack_exports__["default"] = ({
28049
- name: 'AfEditor',
28050
- components: {
28051
- AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"]
28052
- },
28053
- props: {
28054
- value: {
28055
- type: Object,
28056
- default: () => ({})
28057
- },
28058
- disabled: {
28059
- type: Boolean,
28060
- default: () => false
28061
- },
28062
- margin: {
28063
- type: String,
28064
- default: () => '0'
28065
- },
28066
- pure: {
28067
- type: Boolean,
28068
- default: () => true
28069
- },
28070
- must: {
28071
- type: Boolean,
28072
- default: () => false
28073
- },
28074
- inline: {
28075
- type: Boolean,
28076
- default: () => false
28077
- },
28078
- size: {
28079
- type: String,
28080
- default: () => 'small'
28081
- },
28082
- rules: {
28083
- type: Object,
28084
- default: () => ({})
28085
- },
28086
- labelWidth: {
28087
- type: String,
28088
- default: () => '100%'
28089
- },
28090
- labelPosition: {
28091
- type: String,
28092
- default: () => 'top'
28093
- },
28094
- itemWidth: {
28095
- type: String,
28096
- default: () => ''
28097
- },
28098
- cols: {
28099
- type: String,
28100
- default: () => '1'
28101
- },
28102
- gutter: {
28103
- type: String,
28104
- default: () => '10'
28105
- },
28106
- config: {
28107
- type: Object,
28108
- default: () => ({})
28109
- },
28110
- values: {
28111
- type: Object,
28112
- default: () => ({})
28113
- },
28114
- label: {
28115
- type: Boolean,
28116
- default: () => true
28117
- },
28118
- check: {
28119
- type: Boolean,
28120
- default: () => true
28121
- },
28122
- action: {
28123
- type: Boolean,
28124
- default: () => true
28125
- },
28126
- loading: {
28127
- type: Boolean,
28128
- default: () => false
28129
- },
28130
- fileRemoveMark: {
28131
- type: String,
28132
- default: () => 'will-remove'
28133
- },
28134
- finishText: {
28135
- type: String,
28136
- default: () => '保存'
28137
- },
28138
- submitText: {
28139
- type: String,
28140
- default: () => '确定'
28141
- },
28142
- rejectText: {
28143
- type: String,
28144
- default: () => ''
28145
- },
28146
- cancelText: {
28147
- type: String,
28148
- default: () => '取消'
28149
- }
28150
- },
28151
- data() {
28152
- return {
28153
- form: this.value,
28154
- randomKey: `key-${Math.random()}`
28155
- };
28156
- },
28157
- created() {
28158
- this.create();
28159
- },
28160
- destroyed() {
28161
- this.create = null;
28162
- this.verify = null;
28163
- this.finish = null;
28164
- this.submit = null;
28165
- this.reject = null;
28166
- this.cancel = null;
28167
- this.filter = null;
28168
- this.result = null;
28169
- this.format = null;
28170
- },
28171
- watch: {
28172
- values: {
28173
- immediate: true,
28174
- handler() {
28175
- this.create();
28176
- }
28177
- }
28178
- },
28179
- methods: {
28180
- create() {
28181
- // 创建表单 格式化表单配置对象(this.config)为数据双向绑定对象
28182
- this.randomKey = `key-${Math.random()}`;
28183
- const {
28184
- config = {},
28185
- values = {}
28186
- } = this;
28187
- let temp = {};
28188
- let data = {};
28189
- if (config && Object.keys(config).length > 0) {
28190
- for (let a in config) temp[a] = '';
28191
- }
28192
- if (values && Object.keys(values).length > 0) {
28193
- // 设置默认值
28194
- for (let a in temp) {
28195
- if (a.includes('password')) data[a] = '';else data[a] = isNaN(values[a]) ? values[a] : values[a] != null ? `${values[a]}` : '';
28196
- }
28197
- } else {
28198
- if (!this.pure) {
28199
- for (let a in config) {
28200
- // 设置 object 对象(单选框, 下拉框, 开关) 默认值为0
28201
- let {
28202
- pure = null,
28203
- type = null,
28204
- ...r
28205
- } = config[a];
28206
- if (!pure) {
28207
- if (type && (type == 'radio' || type == 'select' || type == 'switch')) {
28208
- data[a] = r.default || '0';
28209
- } else data[a] = r.default || '';
28210
- } else data[a] = '';
28211
- }
28212
- } else {
28213
- for (let a in temp) data[a] = '';
28214
- }
28215
- }
28216
- this.form = data;
28217
- },
28218
- verify() {
28219
- // 表单验证
28220
- let change = false;
28221
- let success = false;
28222
- this.$refs['form'].validate(valid => {
28223
- if (valid) {
28224
- success = true;
28225
- let result = this.refine(this.form);
28226
- let values = this.refine(this.values);
28227
- Object.keys(result).forEach(a => result[a] != values[a] && (change = true));
28228
- }
28229
- });
28230
- return change && success;
28231
- },
28232
- finish(e) {
28233
- e && e.preventDefault();
28234
- this.$emit('finish', this.result());
28235
- },
28236
- submit(e) {
28237
- // 提交表单
28238
- e && e.preventDefault();
28239
- if (!this.check) this.$emit('submit');
28240
- this.$refs['form'].validate(valid => {
28241
- if (valid) {
28242
- let data = {};
28243
- if (Object.keys(this.config).length > 0) {
28244
- for (let a in this.config) {
28245
- // 格式化数据模糊查询
28246
- if (this.form[a] && Object.keys(this.form[a]).length > 0 && this.form[a].old && this.form[a].old.split('=')[1] != '') {
28247
- // 判断是否有默认图片删除
28248
- const {
28249
- old
28250
- } = this.form[a];
28251
- data[a] = this.form[a];
28252
- data[`${a}-${this.fileRemoveMark}`] = old;
28253
- } else data[a] = this.form[a];
28254
- }
28255
- }
28256
- let change = false;
28257
- let result = this.refine(data);
28258
- let values = this.refine(this.values);
28259
- Object.keys(result).forEach(a => result[a] != values[a] && (change = true));
28260
- if (change) this.$emit('submit', this.filter(result));
28261
- return result;
28262
- }
28263
- });
28264
- },
28265
- refine(form = {}) {
28266
- let data = {};
28267
- Object.keys(form).forEach(a => {
28268
- if (a != undefined && a != 'undefined' && form[a] != '%' && form[a] != '%%' && form[a] != 'null' && form[a] != 'undefined' && form[a] != null && form[a] != undefined) {
28269
- data[a] = form[a];
28270
- } else data[a] = '';
28271
- });
28272
- return data;
28273
- },
28274
- reject(e) {
28275
- e && e.preventDefault();
28276
- this.$emit('reject', this.result());
28277
- },
28278
- regain() {
28279
- this.$refs['form'] && this.$refs['form'].resetFields();
28280
- },
28281
- cancel(e) {
28282
- e && e.preventDefault();
28283
- this.$emit('cancel', this.form);
28284
- this.$nextTick(() => {
28285
- for (let a in this.form) this.form[a] = '';
28286
- this.$nextTick(() => this.$refs['form'] && this.$refs['form'].resetFields());
28287
- });
28288
- },
28289
- filter(form = {}) {
28290
- // 过滤空值属性
28291
- const data = {};
28292
- for (let a in form) {
28293
- if (a != undefined && a != 'undefined' && form[a] != '%' && form[a] != '%%' && form[a] != 'null' && form[a] != 'undefined' && form[a] != null && form[a] != undefined) {
28294
- data[a] = form[a];
28295
- }
28296
- }
28297
- return data;
28298
- },
28299
- result() {
28300
- return this.filter(this.form);
28301
- },
28302
- format(a, b) {
28303
- const h = this.$createElement;
28304
- const {
28305
- ...r
28306
- } = this.config[a];
28307
- const text = r.label || r.title || r.text;
28308
- const must = {
28309
- required: true,
28310
- trigger: 'blur',
28311
- message: `${text}不能为空`
28312
- };
28313
- const rule = r['rule'] ? r['rule'] : r['must'] || this.must ? [{
28314
- ...must
28315
- }] : [];
28316
- const rules = this.disabled || r.disabled ? [] : r['must'] && r['rule'] ? [{
28317
- ...must
28318
- }, ...r['rule']] : rule;
28319
- const config = {
28320
- form: this.form,
28321
- size: r.size ? r.size : this.size,
28322
- field: a,
28323
- disabled: this.disabled || this.loading,
28324
- change: () => this.change(),
28325
- ...r
28326
- };
28327
- return h("el-form-item", {
28328
- "key": b,
28329
- "attrs": {
28330
- "prop": a,
28331
- "rules": rules,
28332
- "label": this.label ? r.type && r.type == 'checkbox' ? '' : text : ''
28333
- },
28334
- "style": {
28335
- width: r.width ? r.width : this.itemWidth
28336
- }
28337
- }, [r.hint ? h("el-row", {
28338
- "attrs": {
28339
- "gutter": Number(this.gutter)
28340
- }
28341
- }, [h("el-col", {
28342
- "attrs": {
28343
- "span": 12
28344
- }
28345
- }, [h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
28346
- "attrs": {
28347
- "config": config
28348
- }
28349
- })]), h("el-col", {
28350
- "attrs": {
28351
- "span": 12
28352
- }
28353
- }, [h("span", {
28354
- "class": "hint"
28355
- }, [`(${r.hint})`])])]) : h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
28356
- "attrs": {
28357
- "config": config
28358
- }
28359
- })]);
28360
- },
28361
- change() {
28362
- this.$emit('input', this.form);
28363
- this.$emit('change', this.form);
28364
- }
28365
- },
28366
- render() {
28367
- const h = arguments[0];
28368
- const {
28369
- ...props
28370
- } = this.$attrs;
28371
- const {
28372
- finish,
28373
- submit,
28374
- reject,
28375
- cancel
28376
- } = this.$listeners;
28377
- return h("div", {
28378
- "class": !this.inline ? 'a-f-editor vertical' : 'a-f-editor',
28379
- "style": {
28380
- padding: this.margin
28381
- }
28382
- }, [h("div", {
28383
- "class": this.disabled ? 'disabled' : ''
28384
- }, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
28385
- "ref": "form",
28386
- "attrs": {
28387
- "size": this.size,
28388
- "inline": this.inline,
28389
- "labelWidth": this.labelWidth,
28390
- "labelPosition": this.labelPosition
28391
- }
28392
- }, {
28393
- "props": {
28394
- model: this.form,
28395
- rules: Object.keys(this.rules).length > 0 ? this.rules : {},
28396
- ...props
28397
- }
28398
- }]), [h("el-row", {
28399
- "attrs": {
28400
- "gutter": this.cols != '' ? this.gutter != '' ? Number(this.gutter) : 0 : 0
28401
- }
28402
- }, [Object.keys(this.config).map((a, b) => this.config[a].span && this.config[a].span != '' || this.cols != '' ? h("el-col", {
28403
- "key": b,
28404
- "attrs": {
28405
- "span": Number(this.config[a].span) || 24 / Number(this.cols)
28406
- }
28407
- }, [this.format(a, b)]) : this.format(a, b)), this.$slots.default]), (finish || submit || reject || cancel) && h("div", {
28408
- "class": "action"
28409
- }, [h("el-form-item", [finish && this.finishText != '' && h("el-button", {
28410
- "attrs": {
28411
- "loading": this.loading,
28412
- "type": "success"
28413
- },
28414
- "on": {
28415
- "click": this.finish
28416
- }
28417
- }, [this.finishText]), submit && this.submitText != '' && h("el-button", {
28418
- "attrs": {
28419
- "loading": this.loading,
28420
- "type": "primary"
28421
- },
28422
- "on": {
28423
- "click": this.submit
28424
- }
28425
- }, [this.submitText]), reject && this.rejectText != '' && h("el-button", {
28426
- "attrs": {
28427
- "loading": this.loading,
28428
- "type": "danger"
28429
- },
28430
- "on": {
28431
- "click": this.reject
28432
- }
28433
- }, [this.rejectText]), cancel && this.cancelText != '' && h("el-button", {
28434
- "attrs": {
28435
- "disabled": this.loading
28436
- },
28437
- "on": {
28438
- "click": this.cancel
28439
- }
28440
- }, [this.cancelText])])])])])]);
28441
- }
28442
- });
28443
-
28444
- /***/ }),
28445
-
28446
27297
  /***/ "3cf2":
28447
27298
  /***/ (function(module, exports) {
28448
27299
 
@@ -37357,11 +36208,6 @@ var map = {
37357
36208
  "./Aeditor/Ueditor/index.js": "2938",
37358
36209
  "./Aempty/index.js": "bd5e",
37359
36210
  "./Aenume/index.js": "6cc8",
37360
- "./Aform copy/AfEditor/index.js": "3cef",
37361
- "./Aform copy/AfSearch/index.js": "230c",
37362
- "./Aform copy/BfSearch/index.js": "c0f0",
37363
- "./Aform copy/CfSearch/index.js": "a237",
37364
- "./Aform copy/index.js": "0d0c",
37365
36211
  "./Aform/AfEditor/index.js": "b550",
37366
36212
  "./Aform/AfSearch/index.js": "1b78",
37367
36213
  "./Aform/BfEditor/index.js": "4248",
@@ -37395,6 +36241,7 @@ var map = {
37395
36241
  "./Bcard/index.js": "4df8",
37396
36242
  "./BformItem/index.js": "5c61",
37397
36243
  "./Bmap/index.js": "e579",
36244
+ "./Bpages/index.js": "7c09",
37398
36245
  "./Btable/index.js": "98ee",
37399
36246
  "./CformItem/index.js": "5a83",
37400
36247
  "./Ctable/index.js": "78ab"
@@ -48037,13 +46884,6 @@ webpackContext.id = "6dd9";
48037
46884
 
48038
46885
  /***/ }),
48039
46886
 
48040
- /***/ "6e39":
48041
- /***/ (function(module, exports, __webpack_require__) {
48042
-
48043
- // extracted by mini-css-extract-plugin
48044
-
48045
- /***/ }),
48046
-
48047
46887
  /***/ "6e8c":
48048
46888
  /***/ (function(module, exports, __webpack_require__) {
48049
46889
 
@@ -53621,6 +52461,109 @@ module.exports = function (bitmap, value) {
53621
52461
  };
53622
52462
 
53623
52463
 
52464
+ /***/ }),
52465
+
52466
+ /***/ "7c09":
52467
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
52468
+
52469
+ "use strict";
52470
+ __webpack_require__.r(__webpack_exports__);
52471
+ /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2769");
52472
+ /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_0__);
52473
+
52474
+ /* harmony default export */ __webpack_exports__["default"] = ({
52475
+ name: 'Bpages',
52476
+ props: {
52477
+ small: {
52478
+ type: Boolean,
52479
+ default: () => false
52480
+ },
52481
+ page: {
52482
+ type: Number,
52483
+ default: () => 1
52484
+ },
52485
+ size: {
52486
+ type: Number,
52487
+ default: () => 10
52488
+ },
52489
+ pageSizes: {
52490
+ type: Array,
52491
+ default: () => [10, 20, 50, 100]
52492
+ },
52493
+ total: {
52494
+ type: Number,
52495
+ default: () => 0
52496
+ },
52497
+ prevText: {
52498
+ type: String,
52499
+ default: () => '上页'
52500
+ },
52501
+ nextText: {
52502
+ type: String,
52503
+ default: () => '下页'
52504
+ },
52505
+ complete: {
52506
+ type: Boolean,
52507
+ default: () => true
52508
+ },
52509
+ background: {
52510
+ type: Boolean,
52511
+ default: () => true
52512
+ }
52513
+ },
52514
+ data() {
52515
+ return {
52516
+ pages: {
52517
+ page: this.page,
52518
+ size: this.size
52519
+ }
52520
+ };
52521
+ },
52522
+ watch: {
52523
+ page(page) {
52524
+ this.pages.page = page;
52525
+ },
52526
+ size(size) {
52527
+ this.pages.size = size;
52528
+ }
52529
+ },
52530
+ methods: {
52531
+ currentChange(page) {
52532
+ this.pages.page = page;
52533
+ this.$emit('changePage', this.pages);
52534
+ },
52535
+ sizeChange(size) {
52536
+ this.pages.size = size;
52537
+ this.$emit('changeSize', this.pages);
52538
+ }
52539
+ },
52540
+ render() {
52541
+ const h = arguments[0];
52542
+ return h("div", {
52543
+ "class": "b-pages"
52544
+ }, [h("el-pagination", {
52545
+ "attrs": {
52546
+ "small": this.small,
52547
+ "current-page": this.pages.page,
52548
+ "page-size": this.pages.size,
52549
+ "page-sizes": this.pageSizes,
52550
+ "layout": this.complete ? 'total, sizes, prev, pager, next, jumper' : 'prev, pager, next',
52551
+ "total": this.total,
52552
+ "prev-text": this.prevText,
52553
+ "next-text": this.nextText,
52554
+ "background": this.background
52555
+ },
52556
+ "on": {
52557
+ "current-change": this.currentChange,
52558
+ "size-change": this.sizeChange
52559
+ },
52560
+ "props": {
52561
+ ...this._props
52562
+ }
52563
+ })]);
52564
+ }
52565
+ });
52566
+
53624
52567
  /***/ }),
53625
52568
 
53626
52569
  /***/ "7c85":
@@ -61684,13 +60627,6 @@ __webpack_require__.r(__webpack_exports__);
61684
60627
 
61685
60628
  /***/ }),
61686
60629
 
61687
- /***/ "9203":
61688
- /***/ (function(module, exports, __webpack_require__) {
61689
-
61690
- // extracted by mini-css-extract-plugin
61691
-
61692
- /***/ }),
61693
-
61694
60630
  /***/ "9211":
61695
60631
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
61696
60632
 
@@ -66184,13 +65120,6 @@ module.exports = _default;
66184
65120
 
66185
65121
  /***/ }),
66186
65122
 
66187
- /***/ "9e53":
66188
- /***/ (function(module, exports, __webpack_require__) {
66189
-
66190
- // extracted by mini-css-extract-plugin
66191
-
66192
- /***/ }),
66193
-
66194
65123
  /***/ "9e96":
66195
65124
  /***/ (function(module, exports, __webpack_require__) {
66196
65125
 
@@ -67979,345 +66908,6 @@ __webpack_require__("dff3");
67979
66908
 
67980
66909
  /***/ }),
67981
66910
 
67982
- /***/ "a237":
67983
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
67984
-
67985
- "use strict";
67986
- __webpack_require__.r(__webpack_exports__);
67987
- /* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
67988
- /* 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__);
67989
- /* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2234");
67990
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("af1c");
67991
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_2__);
67992
-
67993
-
67994
-
67995
- /* harmony default export */ __webpack_exports__["default"] = ({
67996
- name: 'CfSearch',
67997
- components: {
67998
- AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"]
67999
- },
68000
- props: {
68001
- value: {
68002
- type: Object,
68003
- default: () => ({})
68004
- },
68005
- margin: {
68006
- type: String,
68007
- default: () => '0'
68008
- },
68009
- size: {
68010
- type: String,
68011
- default: () => 'small'
68012
- },
68013
- inline: {
68014
- type: Boolean,
68015
- default: () => true
68016
- },
68017
- cols: {
68018
- type: String,
68019
- default: () => '6'
68020
- },
68021
- gutter: {
68022
- type: String,
68023
- default: () => '10'
68024
- },
68025
- labelWidth: {
68026
- type: String,
68027
- default: () => 'auto'
68028
- },
68029
- labelPosition: {
68030
- type: String,
68031
- default: () => 'top'
68032
- },
68033
- config: {
68034
- type: Object,
68035
- default: () => ({})
68036
- },
68037
- values: {
68038
- type: Object,
68039
- default: () => ({})
68040
- },
68041
- label: {
68042
- type: Boolean,
68043
- default: () => true
68044
- },
68045
- check: {
68046
- type: Boolean,
68047
- default: () => false
68048
- },
68049
- loading: {
68050
- type: Boolean,
68051
- default: () => false
68052
- },
68053
- submitText: {
68054
- type: String,
68055
- default: () => '搜索'
68056
- },
68057
- cancelText: {
68058
- type: String,
68059
- default: () => '重置'
68060
- }
68061
- },
68062
- data() {
68063
- return {
68064
- form: this.value
68065
- };
68066
- },
68067
- created() {
68068
- this.create();
68069
- },
68070
- mounted() {},
68071
- destroyed() {
68072
- this.create = null;
68073
- this.submit = null;
68074
- this.cancel = null;
68075
- this.filter = null;
68076
- this.result = null;
68077
- this.prompt = null;
68078
- this.format = null;
68079
- },
68080
- watch: {
68081
- values() {
68082
- this.create();
68083
- }
68084
- },
68085
- methods: {
68086
- create() {
68087
- // 创建表单
68088
- if (this.config && Object.keys(this.config).length > 0) {
68089
- // 格式化表单配置对象(this.config)为数据双向绑定对象
68090
- let data = {};
68091
- Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
68092
- let {
68093
- ...r
68094
- } = this.config[a];
68095
- if (!r.render) {
68096
- let range = r.range || r.scope || r.both || r.than || null;
68097
- if (range) {
68098
- data[`${a}LE`] = '';
68099
- data[`${a}GE`] = '';
68100
- } else {
68101
- data[a] = r.default ? r.default : '';
68102
- }
68103
- }
68104
- });
68105
- this.form = data;
68106
- }
68107
- },
68108
- submit(e) {
68109
- // 提交表单
68110
- e && e.preventDefault();
68111
- let pass = !this.check; // 判断是否是空表单
68112
- for (let a in this.form) if (this.form[a] != '') pass = true;
68113
- if (pass) {
68114
- let result = this.filter();
68115
- const {
68116
- formParams,
68117
- pageParams
68118
- } = this.$store.state;
68119
- this.$store.commit('setFormParams', result); // 添加查询参数
68120
- this.$store.commit('setPageParams', {
68121
- ...pageParams,
68122
- page: 1
68123
- }); // 重置分页参数
68124
- this.$nextTick(() => {
68125
- let change = false;
68126
- Object.keys(result).forEach(a => result[a] != formParams[a] && (change = true));
68127
- if (change) this.$emit('submit', {
68128
- ...result,
68129
- ...pageParams,
68130
- page: 1
68131
- }); // 派发事件并重置当前分页
68132
- return result;
68133
- });
68134
- }
68135
- },
68136
- cancel(e) {
68137
- // 重置表单
68138
- e && e.preventDefault();
68139
- let pass = !this.check; // 判断是否是空表单
68140
- for (let a in this.form) if (this.form[a] != '') pass = true;
68141
- if (pass) {
68142
- const {
68143
- pageParams
68144
- } = this.$store.state;
68145
- this.$store.commit('setPageParams', {
68146
- ...pageParams,
68147
- page: 1,
68148
- size: 10
68149
- }); // 重置分页参数
68150
- this.$store.commit('setFormParams', {}); // 重置查询参数
68151
- this.$nextTick(() => {
68152
- for (let a in this.form) this.form[a] = '';
68153
- this.$nextTick(() => this.$emit('cancel', this.form));
68154
- });
68155
- }
68156
- },
68157
- filter() {
68158
- let data = {};
68159
- Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
68160
- let {
68161
- like = null,
68162
- ...r
68163
- } = this.config[a];
68164
- let range = r.range || r.scope || r.both || r.than || null;
68165
- if (range) {
68166
- this.form[`${a}LE`] != '' && (data[`${a}LE`] = this.form[`${a}LE`]);
68167
- this.form[`${a}GE`] != '' && (data[`${a}GE`] = this.form[`${a}GE`]);
68168
- } else {
68169
- let value = this.form[a];
68170
- if (value) {
68171
- if (r.split && typeof r.split == 'object' && r.split.length > 0) {
68172
- r.split.forEach((c, d) => data[c] = value != '' && typeof value == 'object' && value.length > 0 ? value[d] : value);
68173
- } else {
68174
- if (like) {
68175
- if (like == 'left' || like && like == 'l') data[a] = '%' + value;
68176
- if (like == 'right' || like && like == 'r') data[a] = value + '%';else data[a] = '%' + value + '%';
68177
- } else {
68178
- if (value.includes(' 00:00:00')) {
68179
- data[a] = '%' + value.split(' 00:00:00')[0] + '%';
68180
- } else {
68181
- data[a] = value;
68182
- }
68183
- }
68184
- }
68185
- }
68186
- }
68187
- });
68188
- let form = {};
68189
- Object.keys(data).length > 0 && Object.keys(data).forEach(a => {
68190
- if (data[a] != '%' && data[a] != '%%' && data[a] != 'null' && data[a] != 'undefined' && data[a] != null && data[a] != undefined) {
68191
- form[a] = data[a];
68192
- }
68193
- });
68194
- return form;
68195
- },
68196
- result() {
68197
- // 返回验证后的表单数据
68198
- return this.filter(this.form);
68199
- },
68200
- format(a = '', field = '', placeholder = '') {
68201
- const h = this.$createElement;
68202
- let {
68203
- ...r
68204
- } = this.config[a];
68205
- let config = {
68206
- size: r.size ? r.size : this.size,
68207
- field: field != '' ? field : a,
68208
- change: () => this.change(),
68209
- disabled: this.loading,
68210
- form: this.form,
68211
- ...r
68212
- };
68213
- return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
68214
- "attrs": {
68215
- "config": placeholder != '' ? {
68216
- ...config,
68217
- placeholder
68218
- } : config
68219
- }
68220
- });
68221
- },
68222
- change() {
68223
- this.$emit('input', this.filter());
68224
- this.$emit('change', this.filter());
68225
- }
68226
- },
68227
- render() {
68228
- const h = arguments[0];
68229
- const {
68230
- ...props
68231
- } = this.$attrs;
68232
- const {
68233
- submit = null,
68234
- cancel = null
68235
- } = this.$listeners;
68236
- let style = this.cols != '' ? {
68237
- width: `${100 / this.cols}%`
68238
- } : {};
68239
- return h("div", {
68240
- "class": "c-f-search",
68241
- "style": {
68242
- padding: this.margin
68243
- }
68244
- }, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
68245
- "ref": "form",
68246
- "attrs": {
68247
- "size": this.size
68248
- }
68249
- }, {
68250
- "props": {
68251
- model: this.form,
68252
- ...props
68253
- }
68254
- }, {
68255
- "attrs": {
68256
- "labelWidth": this.labelWidth,
68257
- "labelPosition": this.labelPosition
68258
- }
68259
- }]), [h("el-row", {
68260
- "attrs": {
68261
- "gutter": Number(this.gutter)
68262
- }
68263
- }, [Object.keys(this.config).map((a, b) => {
68264
- let {
68265
- ...r
68266
- } = this.config[a];
68267
- let range = r.than || r.both || r.range || r.scope;
68268
- let label = this.label ? r.text || r.label || r.title : '';
68269
- let prefixPlaceholder = r.placeholder && r.placeholder.length > 0 ? r.placeholder[0] : '最高';
68270
- let suffixPlaceholder = r.placeholder && r.placeholder.length > 1 ? r.placeholder[1] : '最低';
68271
- return h("el-col", {
68272
- "key": b,
68273
- "class": "column",
68274
- "style": style
68275
- }, [h("el-form-item", {
68276
- "attrs": {
68277
- "prop": a,
68278
- "label": label
68279
- }
68280
- }, [range ? h("el-col", {
68281
- "class": "range-cols"
68282
- }, [h("el-col", {
68283
- "attrs": {
68284
- "span": 12
68285
- }
68286
- }, [this.format(a, `${a}LE`, prefixPlaceholder)]), h("el-col", {
68287
- "attrs": {
68288
- "span": 12
68289
- }
68290
- }, [this.format(a, `${a}GE`, suffixPlaceholder)])]) : this.format(a)])]);
68291
- }), this.$slots.default, (submit || cancel) && h("el-col", {
68292
- "key": "action",
68293
- "class": "action",
68294
- "style": style
68295
- }, [h("el-form-item", {
68296
- "attrs": {
68297
- "label": this.label ? 'action' : ''
68298
- }
68299
- }, [submit && h("el-button", {
68300
- "attrs": {
68301
- "disabled": this.loading,
68302
- "type": "primary"
68303
- },
68304
- "on": {
68305
- "click": this.submit
68306
- }
68307
- }, [this.submitText]), cancel && h("el-button", {
68308
- "attrs": {
68309
- "disabled": this.loading,
68310
- "type": "default"
68311
- },
68312
- "on": {
68313
- "click": this.cancel
68314
- }
68315
- }, [this.cancelText])])])])])]);
68316
- }
68317
- });
68318
-
68319
- /***/ }),
68320
-
68321
66911
  /***/ "a23d":
68322
66912
  /***/ (function(module, exports, __webpack_require__) {
68323
66913
 
@@ -132553,13 +131143,6 @@ exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
132553
131143
  };
132554
131144
 
132555
131145
 
132556
- /***/ }),
132557
-
132558
- /***/ "af1c":
132559
- /***/ (function(module, exports, __webpack_require__) {
132560
-
132561
- // extracted by mini-css-extract-plugin
132562
-
132563
131146
  /***/ }),
132564
131147
 
132565
131148
  /***/ "af54":
@@ -133763,6 +132346,10 @@ __webpack_require__.r(__webpack_exports__);
133763
132346
  type: Object,
133764
132347
  default: () => ({})
133765
132348
  },
132349
+ must: {
132350
+ type: Boolean,
132351
+ default: () => false
132352
+ },
133766
132353
  inline: {
133767
132354
  type: Boolean,
133768
132355
  default: () => false
@@ -133782,14 +132369,16 @@ __webpack_require__.r(__webpack_exports__);
133782
132369
  global: {
133783
132370
  type: Boolean,
133784
132371
  default: () => false
132372
+ },
132373
+ disabled: {
132374
+ type: Boolean,
132375
+ default: () => false
133785
132376
  }
133786
132377
  },
133787
132378
  data() {
133788
132379
  return {
133789
132380
  form: this.value,
133790
- option: {},
133791
- opened: false,
133792
- height: 'auto'
132381
+ option: {}
133793
132382
  };
133794
132383
  },
133795
132384
  watch: {
@@ -133800,9 +132389,7 @@ __webpack_require__.r(__webpack_exports__);
133800
132389
  created() {
133801
132390
  this.relate(this.config);
133802
132391
  },
133803
- mounted() {
133804
- this.resize();
133805
- },
132392
+ mounted() {},
133806
132393
  methods: {
133807
132394
  input() {
133808
132395
  this.$emit('input', this.filter());
@@ -133822,6 +132409,9 @@ __webpack_require__.r(__webpack_exports__);
133822
132409
  r.default && (this.form[a] = r.default || '');
133823
132410
  }
133824
132411
  });
132412
+ this.$nextTick(() => {
132413
+ Object.keys(this.value).forEach(a => typeof this.value[a] == 'number' && (this.form[a] = `${this.value[a]}`));
132414
+ });
133825
132415
  },
133826
132416
  create(a, b) {
133827
132417
  const h = this.$createElement;
@@ -133830,22 +132420,27 @@ __webpack_require__.r(__webpack_exports__);
133830
132420
  } = this.config[a];
133831
132421
  let label = r.text || r.label || r.title || '';
133832
132422
  let width = r.width ? r.width : `${100 / this.cols}%`;
133833
- let style = this.cols != '' ? {
133834
- width
133835
- } : {};
132423
+ let judge = [{
132424
+ required: true,
132425
+ message: `${label}不能为空`
132426
+ }];
132427
+ let valid = r.rule ? r.rule : r.must || this.must ? judge : [];
132428
+ let rules = this.disabled || r.disabled ? [] : (r.must || this.must) && r.rule ? [...judge, ...r.rule] : valid;
133836
132429
  let props = {
133837
132430
  name: a,
133838
132431
  prop: a,
133839
132432
  label,
132433
+ rules,
132434
+ disabled: r.disabled || this.disabled,
133840
132435
  ...r
133841
132436
  };
133842
132437
  if (this.inline) {
133843
- let styles = {
132438
+ let style = {
133844
132439
  padding: `0 ${this.gutter / 2}px`,
133845
- ...style
132440
+ width
133846
132441
  };
133847
132442
  return h("el-form-item", {
133848
- "style": styles,
132443
+ "style": style,
133849
132444
  "props": {
133850
132445
  ...props
133851
132446
  }
@@ -133865,7 +132460,9 @@ __webpack_require__.r(__webpack_exports__);
133865
132460
  } else {
133866
132461
  return h("el-col", {
133867
132462
  "key": b,
133868
- "style": style
132463
+ "style": {
132464
+ width
132465
+ }
133869
132466
  }, [h("el-form-item", {
133870
132467
  "props": {
133871
132468
  ...props
@@ -133879,10 +132476,6 @@ __webpack_require__.r(__webpack_exports__);
133879
132476
  this.option[b] = a;
133880
132477
  let child = a.children || a.child || a.node || null;
133881
132478
  if (child && Object.keys(child).length > 0) {
133882
- let width = a.width ? a.width : `${100 / Object.keys(child).length}%`;
133883
- let style = this.cols != '' ? {
133884
- width
133885
- } : {};
133886
132479
  return Object.keys(child).map((c, d) => {
133887
132480
  let {
133888
132481
  ...r
@@ -133895,9 +132488,12 @@ __webpack_require__.r(__webpack_exports__);
133895
132488
  }
133896
132489
  }, [this.format(r, c)]);
133897
132490
  } else {
132491
+ let width = r.width ? r.width : `${100 / Object.keys(child).length}%`;
133898
132492
  return h("el-col", {
133899
132493
  "key": d,
133900
- "style": style
132494
+ "style": {
132495
+ width
132496
+ }
133901
132497
  }, [this.format(r, c)]);
133902
132498
  }
133903
132499
  });
@@ -133918,12 +132514,6 @@ __webpack_require__.r(__webpack_exports__);
133918
132514
  });
133919
132515
  }
133920
132516
  },
133921
- resize() {
133922
- if (Object.keys(this.config).length > 0) {
133923
- let rows = Math.ceil(Object.keys(this.config).length / this.cols);
133924
- this.height = this.$el.clientHeight * (rows - 1);
133925
- }
133926
- },
133927
132517
  filter() {
133928
132518
  let data = {};
133929
132519
  Object.keys(this.form).length > 0 && Object.keys(this.form).forEach(a => {
@@ -133933,13 +132523,7 @@ __webpack_require__.r(__webpack_exports__);
133933
132523
  } = this.option[a];
133934
132524
  if (r.split && r.split.length > 0) {
133935
132525
  r.split.forEach((b, c) => data[b] = this.form[a][c]);
133936
- } else {
133937
- if (r.like) {
133938
- if (r.like == 'L' || r.like == 'l' || r.like == 'left') data[a] = `%${this.form[a]}`;
133939
- if (r.like == 'R' || r.like == 'r' || r.like == 'right') data[a] = `${this.form[a]}%`;
133940
- if (this.form[a] && this.form[a].includes(' 00:00:00')) data[a] = `%${this.form[a].replace(' 00:00:00', '')}%`;else data[a] = `%${this.form[a]}%`;
133941
- } else data[a] = this.form[a];
133942
- }
132526
+ } else data[a] = this.form[a];
133943
132527
  }
133944
132528
  });
133945
132529
  return data;
@@ -133983,9 +132567,8 @@ __webpack_require__.r(__webpack_exports__);
133983
132567
  render() {
133984
132568
  const h = arguments[0];
133985
132569
  let {
133986
- padding = '0',
133987
132570
  margin = '0',
133988
- ref = 'form',
132571
+ padding = '0',
133989
132572
  size = 'small',
133990
132573
  loading = false,
133991
132574
  labelWidth = 'auto',
@@ -133995,17 +132578,25 @@ __webpack_require__.r(__webpack_exports__);
133995
132578
  rejectText = '驳回',
133996
132579
  cancelText = '重置',
133997
132580
  action = [],
133998
- ...props
132581
+ ...rest
133999
132582
  } = this.$attrs;
132583
+ let style = this.inline ? {
132584
+ margin: `0 -${this.gutter / 2}px`
132585
+ } : {};
134000
132586
  let {
134001
132587
  finish = null,
134002
132588
  submit = null,
134003
132589
  reject = null,
134004
132590
  cancel = null
134005
132591
  } = this.$listeners;
134006
- let style = this.inline ? {
134007
- margin: `0 -${this.gutter / 2}px`
134008
- } : {};
132592
+ let props = {
132593
+ size,
132594
+ inline: this.inline,
132595
+ labelWidth,
132596
+ labelPosition,
132597
+ style,
132598
+ ...rest
132599
+ };
134009
132600
  return h("div", {
134010
132601
  "class": "a-form",
134011
132602
  "style": {
@@ -134013,14 +132604,7 @@ __webpack_require__.r(__webpack_exports__);
134013
132604
  padding
134014
132605
  }
134015
132606
  }, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
134016
- "ref": ref,
134017
- "attrs": {
134018
- "size": size,
134019
- "inline": this.inline,
134020
- "label-width": labelWidth,
134021
- "label-position": labelPosition
134022
- },
134023
- "style": style
132607
+ "ref": "form"
134024
132608
  }, {
134025
132609
  "props": {
134026
132610
  model: this.form,
@@ -134042,18 +132626,7 @@ __webpack_require__.r(__webpack_exports__);
134042
132626
  "style": {
134043
132627
  paddingLeft: `${this.gutter}px`
134044
132628
  }
134045
- }, [Object.keys(this.config).length > this.cols && !this.inline && h("el-button", {
134046
- "attrs": {
134047
- "disabled": loading,
134048
- "type": "text"
134049
- },
134050
- "class": "collapse-button",
134051
- "on": {
134052
- "click": () => this.opened = !this.opened
134053
- }
134054
- }, [h("i", {
134055
- "class": `el-icon-arrow-${this.opened ? 'up' : 'down'}`
134056
- }), this.opened ? '收起' : '展开']), finish && h("el-button", {
132629
+ }, [finish && h("el-button", {
134057
132630
  "attrs": {
134058
132631
  "disabled": loading,
134059
132632
  "type": "success"
@@ -134085,7 +132658,7 @@ __webpack_require__.r(__webpack_exports__);
134085
132658
  "on": {
134086
132659
  "click": this.cancel
134087
132660
  }
134088
- }, [cancelText]), action.forEach((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
132661
+ }, [cancelText]), action.map((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
134089
132662
  "key": b,
134090
132663
  "attrs": {
134091
132664
  "disabled": loading
@@ -135865,6 +134438,10 @@ __webpack_require__.r(__webpack_exports__);
135865
134438
  global: {
135866
134439
  type: Boolean,
135867
134440
  default: () => false
134441
+ },
134442
+ disabled: {
134443
+ type: Boolean,
134444
+ default: () => false
135868
134445
  }
135869
134446
  },
135870
134447
  data() {
@@ -135914,29 +134491,27 @@ __webpack_require__.r(__webpack_exports__);
135914
134491
  } = this.config[a];
135915
134492
  let label = r.text || r.label || r.title || '';
135916
134493
  let width = r.width ? r.width : `${100 / this.cols}%`;
135917
- let style = this.cols != '' ? {
135918
- width
135919
- } : {};
135920
- let valid = r.rule ? r.rule : r.must || this.must ? [{
134494
+ let judge = [{
135921
134495
  required: true,
135922
- trigger: 'blur',
135923
134496
  message: `${label}不能为空`
135924
- }] : [];
135925
- let rules = this.disabled || r.disabled ? [] : r['must'] && r['rule'] ? [...valid, ...r.rule] : valid;
134497
+ }];
134498
+ let valid = r.rule ? r.rule : r.must || this.must ? judge : [];
134499
+ let rules = this.disabled || r.disabled ? [] : (r.must || this.must) && r.rule ? [...judge, ...r.rule] : valid;
135926
134500
  let props = {
135927
134501
  name: a,
135928
134502
  prop: a,
135929
134503
  label,
135930
134504
  rules,
134505
+ disabled: r.disabled || this.disabled,
135931
134506
  ...r
135932
134507
  };
135933
134508
  if (this.inline) {
135934
- let styles = {
134509
+ let style = {
135935
134510
  padding: `0 ${this.gutter / 2}px`,
135936
- ...style
134511
+ width
135937
134512
  };
135938
134513
  return h("el-form-item", {
135939
- "style": styles,
134514
+ "style": style,
135940
134515
  "props": {
135941
134516
  ...props
135942
134517
  }
@@ -135956,7 +134531,9 @@ __webpack_require__.r(__webpack_exports__);
135956
134531
  } else {
135957
134532
  return h("el-col", {
135958
134533
  "key": b,
135959
- "style": style
134534
+ "style": {
134535
+ width
134536
+ }
135960
134537
  }, [h("el-form-item", {
135961
134538
  "props": {
135962
134539
  ...props
@@ -135970,10 +134547,6 @@ __webpack_require__.r(__webpack_exports__);
135970
134547
  this.option[b] = a;
135971
134548
  let child = a.children || a.child || a.node || null;
135972
134549
  if (child && Object.keys(child).length > 0) {
135973
- let width = a.width ? a.width : `${100 / Object.keys(child).length}%`;
135974
- let style = this.cols != '' ? {
135975
- width
135976
- } : {};
135977
134550
  return Object.keys(child).map((c, d) => {
135978
134551
  let {
135979
134552
  ...r
@@ -135986,9 +134559,12 @@ __webpack_require__.r(__webpack_exports__);
135986
134559
  }
135987
134560
  }, [this.format(r, c)]);
135988
134561
  } else {
134562
+ let width = r.width ? r.width : `${100 / Object.keys(child).length}%`;
135989
134563
  return h("el-col", {
135990
134564
  "key": d,
135991
- "style": style
134565
+ "style": {
134566
+ width
134567
+ }
135992
134568
  }, [this.format(r, c)]);
135993
134569
  }
135994
134570
  });
@@ -136062,8 +134638,8 @@ __webpack_require__.r(__webpack_exports__);
136062
134638
  render() {
136063
134639
  const h = arguments[0];
136064
134640
  let {
136065
- padding = '0',
136066
134641
  margin = '0',
134642
+ padding = '0',
136067
134643
  size = 'small',
136068
134644
  loading = false,
136069
134645
  labelWidth = 'auto',
@@ -136073,24 +134649,24 @@ __webpack_require__.r(__webpack_exports__);
136073
134649
  rejectText = '驳回',
136074
134650
  cancelText = '取消',
136075
134651
  action = [],
136076
- ...r
134652
+ ...rest
136077
134653
  } = this.$attrs;
134654
+ let style = this.inline ? {
134655
+ margin: `0 -${this.gutter / 2}px`
134656
+ } : {};
136078
134657
  let {
136079
134658
  finish = null,
136080
134659
  submit = null,
136081
134660
  reject = null,
136082
134661
  cancel = null
136083
134662
  } = this.$listeners;
136084
- let style = this.inline ? {
136085
- margin: `0 -${this.gutter / 2}px`
136086
- } : {};
136087
134663
  let props = {
136088
134664
  size,
136089
134665
  inline: this.inline,
136090
134666
  labelWidth,
136091
134667
  labelPosition,
136092
134668
  style,
136093
- ...r
134669
+ ...rest
136094
134670
  };
136095
134671
  return h("div", {
136096
134672
  "class": "a-f-editor",
@@ -136148,7 +134724,7 @@ __webpack_require__.r(__webpack_exports__);
136148
134724
  "on": {
136149
134725
  "click": this.cancel
136150
134726
  }
136151
- }, [cancelText]), action.forEach((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
134727
+ }, [cancelText]), action.map((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
136152
134728
  "key": b,
136153
134729
  "attrs": {
136154
134730
  "disabled": loading
@@ -138255,6 +136831,7 @@ __webpack_require__.r(__webpack_exports__);
138255
136831
 
138256
136832
 
138257
136833
 
136834
+
138258
136835
  /* harmony default export */ __webpack_exports__["default"] = ({
138259
136836
  name: 'Atable',
138260
136837
  components: {
@@ -138356,10 +136933,6 @@ __webpack_require__.r(__webpack_exports__);
138356
136933
  type: Boolean,
138357
136934
  default: () => false
138358
136935
  },
138359
- sumText: {
138360
- type: String,
138361
- default: () => '合计'
138362
- },
138363
136936
  sortable: {
138364
136937
  type: Boolean,
138365
136938
  default: () => false
@@ -138391,16 +136964,8 @@ __webpack_require__.r(__webpack_exports__);
138391
136964
  default: () => false
138392
136965
  },
138393
136966
  action: {
138394
- type: Object,
138395
- default: () => ({
138396
- review: null,
138397
- modify: null,
138398
- update: null,
138399
- handle: null,
138400
- remove: null,
138401
- delete: null,
138402
- export: null
138403
- })
136967
+ type: Array,
136968
+ default: () => []
138404
136969
  },
138405
136970
  actionWidth: {
138406
136971
  type: String,
@@ -138425,15 +136990,6 @@ __webpack_require__.r(__webpack_exports__);
138425
136990
  beforeDestroy() {
138426
136991
  this.$refs['a-table'].bodyWrapper.removeEventListener('wheel', this.scroll);
138427
136992
  },
138428
- destroyed() {
138429
- this.create = null;
138430
- this.search = null;
138431
- this.select = null;
138432
- this.choose = null;
138433
- this.change = null;
138434
- this.format = null;
138435
- this.scroll = null;
138436
- },
138437
136993
  methods: {
138438
136994
  create() {
138439
136995
  let column = [...this.column, this.suffix()];
@@ -138484,7 +137040,14 @@ __webpack_require__.r(__webpack_exports__);
138484
137040
  },
138485
137041
  suffix() {
138486
137042
  const h = this.$createElement;
138487
- 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) {
137043
+ const {
137044
+ review,
137045
+ modify,
137046
+ update,
137047
+ handle,
137048
+ remove
137049
+ } = this.$listeners;
137050
+ if (review || modify || update || handle || remove || this.$listeners.delete || this.$listeners.export) {
138488
137051
  return {
138489
137052
  fixed: 'right',
138490
137053
  align: 'center',
@@ -138492,62 +137055,29 @@ __webpack_require__.r(__webpack_exports__);
138492
137055
  label: this.actionTitle,
138493
137056
  formatter: item => h("div", {
138494
137057
  "class": "action"
138495
- }, [this.action.review && h("i", {
138496
- "class": "el-icon-view",
138497
- "on": {
138498
- "click": () => this.action.review(item)
138499
- }
138500
- }), this.action.modify && h("i", {
138501
- "class": "el-icon-edit",
138502
- "on": {
138503
- "click": () => this.action.modify(item)
138504
- }
138505
- }), this.action.update && h("i", {
138506
- "class": "el-icon-edit",
138507
- "on": {
138508
- "click": () => this.action.update(item)
138509
- }
138510
- }), this.action.handle && h("i", {
138511
- "class": "el-icon-edit",
138512
- "on": {
138513
- "click": () => this.action.handle(item)
138514
- }
138515
- }), this.action.remove && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
138516
- "on": {
138517
- "submit": () => this.action.remove(item)
138518
- }
138519
- }), this.action.delete && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
138520
- "on": {
138521
- "submit": () => this.action.delete(item)
138522
- }
138523
- }), this.action.export && h("i", {
138524
- "class": "el-icon-download",
138525
- "on": {
138526
- "click": () => this.action.export(item)
138527
- }
138528
- }), this.$listeners.review && h("i", {
137058
+ }, [review && h("i", {
138529
137059
  "class": "el-icon-view",
138530
137060
  "on": {
138531
- "click": () => this.$listeners.review(item)
137061
+ "click": () => review(item)
138532
137062
  }
138533
- }), this.$listeners.modify && h("i", {
137063
+ }), modify && h("i", {
138534
137064
  "class": "el-icon-edit",
138535
137065
  "on": {
138536
- "click": () => this.$listeners.modify(item)
137066
+ "click": () => modify(item)
138537
137067
  }
138538
- }), this.$listeners.update && h("i", {
137068
+ }), update && h("i", {
138539
137069
  "class": "el-icon-edit",
138540
137070
  "on": {
138541
- "click": () => this.$listeners.update(item)
137071
+ "click": () => update(item)
138542
137072
  }
138543
- }), this.$listeners.handle && h("i", {
137073
+ }), handle && h("i", {
138544
137074
  "class": "el-icon-edit",
138545
137075
  "on": {
138546
- "click": () => this.$listeners.handle(item)
137076
+ "click": () => handle(item)
138547
137077
  }
138548
- }), this.$listeners.remove && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
137078
+ }), remove && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
138549
137079
  "on": {
138550
- "submit": () => this.$listeners.remove(item)
137080
+ "submit": () => remove(item)
138551
137081
  }
138552
137082
  }), this.$listeners.delete && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
138553
137083
  "on": {
@@ -138558,7 +137088,12 @@ __webpack_require__.r(__webpack_exports__);
138558
137088
  "on": {
138559
137089
  "click": () => this.$listeners.export(item)
138560
137090
  }
138561
- })])
137091
+ }), this.action.map((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
137092
+ "key": b,
137093
+ "on": {
137094
+ "click": e => a.click && a.click(item, e)
137095
+ }
137096
+ }, a]), [a.label || a.title || a.text]))])
138562
137097
  };
138563
137098
  }
138564
137099
  },
@@ -138684,10 +137219,6 @@ __webpack_require__.r(__webpack_exports__);
138684
137219
  const {
138685
137220
  pageParams = {}
138686
137221
  } = this.$store.state;
138687
- const {
138688
- loading = false
138689
- } = this;
138690
- const condition = data.length > 0;
138691
137222
  return h("div", {
138692
137223
  "class": this.border ? 'a-table' : 'a-table border'
138693
137224
  }, [h("el-table", {
@@ -138699,20 +137230,20 @@ __webpack_require__.r(__webpack_exports__);
138699
137230
  "stripe": this.stripe,
138700
137231
  "row-key": this.rowKey,
138701
137232
  "max-height": this.maxHeight,
138702
- "element-loading-text": this.elementLoadingText,
138703
- "element-loading-spinner": this.elementLoadingSpinner,
138704
- "element-loading-background": this.elementLoadingBackground,
138705
137233
  "show-header": this.showHeader,
138706
137234
  "default-sort": this.defaultSort,
138707
137235
  "show-summary": this.showSummary,
138708
137236
  "tooltip-effect": this.tooltipEffect,
138709
137237
  "default-expand-all": this.defaultExpandAll,
138710
137238
  "tree-props": this.tree ? this.treeProps : {},
138711
- "highlight-current-row": this.highlightCurrentRow
137239
+ "highlight-current-row": this.highlightCurrentRow,
137240
+ "element-loading-text": this.elementLoadingText,
137241
+ "element-loading-spinner": this.elementLoadingSpinner,
137242
+ "element-loading-background": this.elementLoadingBackground
138712
137243
  },
138713
137244
  "directives": [{
138714
137245
  name: "loading",
138715
- value: loading
137246
+ value: this.loading
138716
137247
  }],
138717
137248
  "on": {
138718
137249
  "row-click": this.choose,
@@ -138721,27 +137252,27 @@ __webpack_require__.r(__webpack_exports__);
138721
137252
  "props": {
138722
137253
  ...props
138723
137254
  }
138724
- }, [condition && (this.selection || this.$listeners.select) && h("el-table-column", {
137255
+ }, [(this.selection || this.$listeners.select) && h("el-table-column", {
138725
137256
  "attrs": {
138726
137257
  "fixed": "left",
138727
137258
  "type": "selection",
138728
137259
  "width": this.selectionWidth
138729
137260
  }
138730
- }), condition && this.sort && h("el-table-column", {
137261
+ }), this.sort && h("el-table-column", {
138731
137262
  "attrs": {
138732
137263
  "fixed": "left",
138733
137264
  "type": "index",
138734
137265
  "width": this.sortWidth,
138735
137266
  "label": this.sortTitle
138736
137267
  }
138737
- }), condition && this.create(), condition && this.$slots.default, h("div", {
137268
+ }), this.create(), this.$slots.default, h("div", {
138738
137269
  "slot": "empty",
138739
137270
  "class": "empty"
138740
- }, [!loading && h(_components_Aempty__WEBPACK_IMPORTED_MODULE_2__["default"], {
137271
+ }, [!this.loading && h(_components_Aempty__WEBPACK_IMPORTED_MODULE_2__["default"], {
138741
137272
  "attrs": {
138742
137273
  "description": this.emptyText
138743
137274
  }
138744
- })])]), !this.tree && this.page && condition && h(_components_Apages__WEBPACK_IMPORTED_MODULE_7__["default"], {
137275
+ })])]), !this.tree && this.page && data.length > 0 && h(_components_Apages__WEBPACK_IMPORTED_MODULE_7__["default"], {
138745
137276
  "attrs": {
138746
137277
  "total": Number(size),
138747
137278
  "pages": pageParams
@@ -141201,361 +139732,6 @@ const Aecharts = a => Promise.resolve(/* AMD require */).then(function() { var _
141201
139732
 
141202
139733
  /***/ }),
141203
139734
 
141204
- /***/ "c0f0":
141205
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
141206
-
141207
- "use strict";
141208
- __webpack_require__.r(__webpack_exports__);
141209
- /* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
141210
- /* 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__);
141211
- /* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2234");
141212
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("9e53");
141213
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_2__);
141214
-
141215
-
141216
-
141217
- /* harmony default export */ __webpack_exports__["default"] = ({
141218
- name: 'BfSearch',
141219
- components: {
141220
- AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"]
141221
- },
141222
- props: {
141223
- value: {
141224
- type: Object,
141225
- default: () => ({})
141226
- },
141227
- margin: {
141228
- type: String,
141229
- default: () => '0'
141230
- },
141231
- size: {
141232
- type: String,
141233
- default: () => 'small'
141234
- },
141235
- inline: {
141236
- type: Boolean,
141237
- default: () => false
141238
- },
141239
- cols: {
141240
- type: String,
141241
- default: () => '6'
141242
- },
141243
- gutter: {
141244
- type: String,
141245
- default: () => '10'
141246
- },
141247
- labelWidth: {
141248
- type: String,
141249
- default: () => 'auto'
141250
- },
141251
- labelPosition: {
141252
- type: String,
141253
- default: () => 'top'
141254
- },
141255
- config: {
141256
- type: Object,
141257
- default: () => ({})
141258
- },
141259
- values: {
141260
- type: Object,
141261
- default: () => ({})
141262
- },
141263
- label: {
141264
- type: Boolean,
141265
- default: () => true
141266
- },
141267
- check: {
141268
- type: Boolean,
141269
- default: () => false
141270
- },
141271
- loading: {
141272
- type: Boolean,
141273
- default: () => false
141274
- },
141275
- submitText: {
141276
- type: String,
141277
- default: () => '搜索'
141278
- },
141279
- cancelText: {
141280
- type: String,
141281
- default: () => '重置'
141282
- }
141283
- },
141284
- data() {
141285
- return {
141286
- form: this.value,
141287
- height: 0,
141288
- opened: false
141289
- };
141290
- },
141291
- created() {
141292
- this.create();
141293
- },
141294
- mounted() {
141295
- this.update();
141296
- },
141297
- destroyed() {
141298
- this.create = null;
141299
- this.update = null;
141300
- this.submit = null;
141301
- this.cancel = null;
141302
- this.filter = null;
141303
- this.result = null;
141304
- this.switch = null;
141305
- this.format = null;
141306
- this.output = null;
141307
- },
141308
- watch: {
141309
- values() {
141310
- this.create();
141311
- }
141312
- },
141313
- methods: {
141314
- create() {
141315
- // 创建表单
141316
- if (this.config && Object.keys(this.config).length > 0) {
141317
- // 格式化表单配置对象(this.config)为数据双向绑定对象
141318
- let data = {};
141319
- Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
141320
- let {
141321
- ...r
141322
- } = this.config[a];
141323
- if (!r.render) {
141324
- let range = r.range || r.scope || r.both || r.than || null;
141325
- if (range) {
141326
- data[`${a}LE`] = '';
141327
- data[`${a}GE`] = '';
141328
- } else {
141329
- data[a] = r.default ? r.default : '';
141330
- }
141331
- }
141332
- });
141333
- this.form = data;
141334
- }
141335
- },
141336
- update() {
141337
- let rows = Math.ceil(Object.keys(this.config).length / this.cols);
141338
- this.height = this.$el.clientHeight * (rows - 1);
141339
- },
141340
- submit(e) {
141341
- // 提交表单
141342
- e && e.preventDefault();
141343
- let pass = !this.check; // 判断是否是空表单
141344
- for (let a in this.form) if (this.form[a] != '') pass = true;
141345
- if (pass) {
141346
- let result = this.filter();
141347
- this.$nextTick(() => {
141348
- this.$emit('submit', {
141349
- ...result,
141350
- page: 1
141351
- }); // 派发事件并重置当前分页
141352
- return result;
141353
- });
141354
- }
141355
- },
141356
- cancel(e) {
141357
- // 重置表单
141358
- e && e.preventDefault();
141359
- let pass = !this.check; // 判断是否是空表单
141360
- for (let a in this.form) if (this.form[a] != '') pass = true;
141361
- if (pass) {
141362
- this.$nextTick(() => {
141363
- for (let a in this.form) this.form[a] = '';
141364
- this.$nextTick(() => this.$emit('cancel', this.form));
141365
- });
141366
- }
141367
- },
141368
- filter() {
141369
- let data = {};
141370
- Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
141371
- let {
141372
- like = null,
141373
- ...r
141374
- } = this.config[a];
141375
- let range = r.range || r.scope || r.both || r.than || null;
141376
- if (range) {
141377
- this.form[`${a}LE`] != '' && (data[`${a}LE`] = this.form[`${a}LE`]);
141378
- this.form[`${a}GE`] != '' && (data[`${a}GE`] = this.form[`${a}GE`]);
141379
- } else {
141380
- let value = this.form[a];
141381
- if (value) {
141382
- if (r.split && typeof r.split == 'object' && r.split.length > 0) {
141383
- r.split.forEach((c, d) => data[c] = value != '' && typeof value == 'object' && value.length > 0 ? value[d] : value);
141384
- } else {
141385
- if (like) {
141386
- if (like == 'left' || like && like == 'l') data[a] = '%' + value;
141387
- if (like == 'right' || like && like == 'r') data[a] = value + '%';else data[a] = '%' + value + '%';
141388
- } else {
141389
- if (value.includes(' 00:00:00')) {
141390
- data[a] = '%' + value.split(' 00:00:00')[0] + '%';
141391
- } else {
141392
- data[a] = value;
141393
- }
141394
- }
141395
- }
141396
- }
141397
- }
141398
- });
141399
- let form = {};
141400
- Object.keys(data).length > 0 && Object.keys(data).forEach(a => {
141401
- if (data[a] != '%' && data[a] != '%%' && data[a] != 'null' && data[a] != 'undefined' && data[a] != null && data[a] != undefined) {
141402
- form[a] = data[a];
141403
- }
141404
- });
141405
- return form;
141406
- },
141407
- result() {
141408
- return this.filter(this.form);
141409
- },
141410
- switch() {
141411
- this.opened = !this.opened;
141412
- },
141413
- format(a = '', field = '', placeholder = '') {
141414
- const h = this.$createElement;
141415
- let {
141416
- ...r
141417
- } = this.config[a];
141418
- let config = {
141419
- size: r.size ? r.size : this.size,
141420
- field: field != '' ? field : a,
141421
- change: () => this.change(),
141422
- disabled: this.loading,
141423
- form: this.form,
141424
- ...r
141425
- };
141426
- return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
141427
- "attrs": {
141428
- "config": placeholder != '' ? {
141429
- ...config,
141430
- placeholder
141431
- } : config
141432
- }
141433
- });
141434
- },
141435
- output(a, b) {
141436
- const h = this.$createElement;
141437
- let {
141438
- ...r
141439
- } = this.config[a];
141440
- let range = r.range || r.scope || r.both || r.than || null;
141441
- let label = this.label ? r.text || r.label || r.title : '';
141442
- let style = this.cols != '' ? {
141443
- width: r.width ? r.width : `${100 / this.cols}%`
141444
- } : {};
141445
- let prefixPlaceholder = r.placeholder && r.placeholder.length > 0 ? r.placeholder[0] : '最高';
141446
- let suffixPlaceholder = r.placeholder && r.placeholder.length > 1 ? r.placeholder[1] : '最低';
141447
- return h("el-col", {
141448
- "key": b,
141449
- "style": style
141450
- }, [h("el-form-item", {
141451
- "attrs": {
141452
- "prop": a,
141453
- "label": label
141454
- }
141455
- }, [range ? h("el-col", {
141456
- "class": "range-cols"
141457
- }, [h("el-col", {
141458
- "attrs": {
141459
- "span": 12
141460
- }
141461
- }, [this.format(a, `${a}LE`, prefixPlaceholder)]), h("el-col", {
141462
- "attrs": {
141463
- "span": 12
141464
- }
141465
- }, [this.format(a, `${a}GE`, suffixPlaceholder)])]) : this.format(a)])]);
141466
- },
141467
- change() {
141468
- this.$emit('input', this.filter());
141469
- this.$emit('change', this.filter());
141470
- }
141471
- },
141472
- render() {
141473
- const h = arguments[0];
141474
- const {
141475
- ...props
141476
- } = this.$attrs;
141477
- const {
141478
- submit = null,
141479
- cancel = null
141480
- } = this.$listeners;
141481
- return h("div", {
141482
- "class": "b-f-search",
141483
- "style": {
141484
- padding: this.margin
141485
- }
141486
- }, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
141487
- "ref": "form",
141488
- "attrs": {
141489
- "size": this.size,
141490
- "inline": this.inline
141491
- }
141492
- }, {
141493
- "props": {
141494
- model: this.form,
141495
- ...props
141496
- }
141497
- }, {
141498
- "attrs": {
141499
- "labelWidth": this.labelWidth,
141500
- "labelPosition": this.labelPosition
141501
- }
141502
- }]), [h("div", {
141503
- "class": "column"
141504
- }, [h("el-row", {
141505
- "attrs": {
141506
- "gutter": Number(this.gutter)
141507
- },
141508
- "class": "main-rows"
141509
- }, [Object.keys(this.config).map((a, b) => b < this.cols && this.output(a, b))]), h("el-row", {
141510
- "attrs": {
141511
- "gutter": Number(this.gutter)
141512
- },
141513
- "class": "fold-rows",
141514
- "style": {
141515
- height: this.opened ? `${this.height}px` : '0'
141516
- }
141517
- }, [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", {
141518
- "class": "action",
141519
- "style": {
141520
- paddingLeft: `${this.gutter}px`
141521
- }
141522
- }, [h("el-form-item", {
141523
- "attrs": {
141524
- "label": "action"
141525
- }
141526
- }, [Object.keys(this.config).length > this.cols && h("el-button", {
141527
- "attrs": {
141528
- "disabled": this.loading,
141529
- "type": "text"
141530
- },
141531
- "class": "collapse-button",
141532
- "on": {
141533
- "click": this.switch
141534
- }
141535
- }, [h("i", {
141536
- "class": `el-icon-arrow-${this.opened ? 'up' : 'down'}`
141537
- }), this.opened ? '收起' : '展开']), submit && h("el-button", {
141538
- "attrs": {
141539
- "disabled": this.loading,
141540
- "type": "primary"
141541
- },
141542
- "on": {
141543
- "click": this.submit
141544
- }
141545
- }, [this.submitText]), cancel && h("el-button", {
141546
- "attrs": {
141547
- "disabled": this.loading,
141548
- "type": "default"
141549
- },
141550
- "on": {
141551
- "click": this.cancel
141552
- }
141553
- }, [this.cancelText])])])])]);
141554
- }
141555
- });
141556
-
141557
- /***/ }),
141558
-
141559
139735
  /***/ "c0f5":
141560
139736
  /***/ (function(module, exports, __webpack_require__) {
141561
139737
 
@@ -153394,13 +151570,6 @@ module.exports = _default;
153394
151570
 
153395
151571
  /***/ }),
153396
151572
 
153397
- /***/ "d4f0":
153398
- /***/ (function(module, exports, __webpack_require__) {
153399
-
153400
- // extracted by mini-css-extract-plugin
153401
-
153402
- /***/ }),
153403
-
153404
151573
  /***/ "d4f3":
153405
151574
  /***/ (function(module, exports) {
153406
151575
 
@@ -169731,6 +167900,7 @@ __webpack_require__.r(__webpack_exports__);
169731
167900
 
169732
167901
 
169733
167902
  /* harmony default export */ __webpack_exports__["default"] = ({
167903
+ name: 'BfSearch',
169734
167904
  render() {
169735
167905
  const h = arguments[0];
169736
167906
  let {