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.
@@ -6265,359 +6265,6 @@ module.exports = _default;
6265
6265
 
6266
6266
  /***/ }),
6267
6267
 
6268
- /***/ "0d0c":
6269
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
6270
-
6271
- "use strict";
6272
- __webpack_require__.r(__webpack_exports__);
6273
- /* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
6274
- /* 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__);
6275
- /* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2234");
6276
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("d4f0");
6277
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_2__);
6278
-
6279
-
6280
-
6281
- /* harmony default export */ __webpack_exports__["default"] = ({
6282
- name: 'Aform',
6283
- components: {
6284
- AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"]
6285
- },
6286
- props: {
6287
- margin: {
6288
- type: String,
6289
- default: () => '0'
6290
- },
6291
- pure: {
6292
- type: Boolean,
6293
- default: () => true
6294
- },
6295
- inline: {
6296
- type: Boolean,
6297
- default: () => false
6298
- },
6299
- size: {
6300
- type: String,
6301
- default: () => 'small'
6302
- },
6303
- rules: {
6304
- type: Object,
6305
- default: () => ({})
6306
- },
6307
- labelWidth: {
6308
- type: String,
6309
- default: () => ''
6310
- },
6311
- labelPosition: {
6312
- type: String,
6313
- default: () => 'top'
6314
- },
6315
- config: {
6316
- type: Array,
6317
- default: () => []
6318
- },
6319
- object: {
6320
- type: Object,
6321
- default: () => ({})
6322
- },
6323
- values: {
6324
- type: Object,
6325
- default: () => ({})
6326
- },
6327
- label: {
6328
- type: Boolean,
6329
- default: () => true
6330
- },
6331
- loading: {
6332
- type: Boolean,
6333
- default: () => false
6334
- },
6335
- fileRemoveMark: {
6336
- type: String,
6337
- default: () => 'will-remove'
6338
- },
6339
- finishText: {
6340
- type: String,
6341
- default: () => '保存'
6342
- },
6343
- submitText: {
6344
- type: String,
6345
- default: () => '确定'
6346
- },
6347
- searchText: {
6348
- type: String,
6349
- default: () => '搜索'
6350
- },
6351
- cancelText: {
6352
- type: String,
6353
- default: () => '取消'
6354
- }
6355
- },
6356
- data() {
6357
- return {
6358
- form: {},
6359
- randomKey: `key-${Math.random()}`
6360
- };
6361
- },
6362
- created() {
6363
- this.create();
6364
- },
6365
- beforeDestroy() {
6366
- this.cancel();
6367
- },
6368
- destroyed() {
6369
- this.create = null;
6370
- this.verify = null;
6371
- this.finish = null;
6372
- this.submit = null;
6373
- this.cancel = null;
6374
- this.filter = null;
6375
- this.result = null;
6376
- },
6377
- watch: {
6378
- values: {
6379
- immediate: true,
6380
- handler() {
6381
- this.create();
6382
- }
6383
- }
6384
- },
6385
- methods: {
6386
- create() {
6387
- // 创建表单 格式化表单配置对象(this.config)为数据双向绑定对象
6388
- this.randomKey = `key-${Math.random()}`;
6389
- const {
6390
- config = [],
6391
- object = {},
6392
- values = {}
6393
- } = this;
6394
- let temp = {};
6395
- let data = {};
6396
- if (config && config.length > 0) {
6397
- for (let a in config) temp[config[a].name || config[a].field] = '';
6398
- }
6399
- if (object && Object.keys(object).length > 0) {
6400
- for (let a in object) temp[a] = '';
6401
- }
6402
- if (values && Object.keys(values).length > 0) {
6403
- // 设置默认值
6404
- for (let a in temp) {
6405
- if (a.includes('password')) data[a] = '';else data[a] = isNaN(values[a]) ? values[a] : values[a] != null ? `${values[a]}` : '';
6406
- }
6407
- } else {
6408
- if (!this.pure) {
6409
- for (let a in config) {
6410
- // 设置 config 数组(单选框, 下拉框, 开关) 默认值为0
6411
- if (!config[a].pure) {
6412
- if (config[a]['type'] == 'radio' || config[a]['type'] == 'select' || config[a]['type'] == 'switch') {
6413
- data[config[a].name || config[a].field] = config[a].default || '0';
6414
- } else data[config[a].name || config[a].field] = config[a].default || '';
6415
- } else data[config[a].name || config[a].field] = '';
6416
- }
6417
- for (let a in object) {
6418
- // 设置 object 对象(单选框, 下拉框, 开关) 默认值为0
6419
- if (!object[a].pure) {
6420
- if (object[a]['type'] == 'radio' || object[a]['type'] == 'select' || object[a]['type'] == 'switch') {
6421
- data[a] = object[a].default || '0';
6422
- } else data[a] = object[a].default || '';
6423
- } else data[a] = '';
6424
- }
6425
- } else {
6426
- for (let a in temp) data[a] = '';
6427
- }
6428
- }
6429
- this.form = data;
6430
- },
6431
- verify() {
6432
- // 表单验证
6433
- let result = false;
6434
- this.$refs['form'].validate(valid => result = valid);
6435
- return result;
6436
- },
6437
- finish(e) {
6438
- e && e.preventDefault();
6439
- this.$emit('finish', this.result());
6440
- },
6441
- submit(e) {
6442
- // 提交表单
6443
- e && e.preventDefault();
6444
- this.$refs['form'].validate(valid => {
6445
- if (valid) {
6446
- let data = {};
6447
- if (this.config.length > 0) {
6448
- for (let a in this.config) {
6449
- // 格式化数据模糊查询
6450
- if (this.config[a].like) data[this.config[a].name] = '%' + this.form[this.config[a].name] + '%';
6451
- 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] != '') {
6452
- // 判断是否有默认图片删除
6453
- const {
6454
- old
6455
- } = this.form[this.config[a].name];
6456
- data[this.config[a].name] = this.form[this.config[a].name];
6457
- data[`${this.config[a].name}-${this.fileRemoveMark}`] = old;
6458
- } else data[this.config[a].name] = this.form[this.config[a].name];
6459
- }
6460
- }
6461
- if (Object.keys(this.object).length > 0) {
6462
- for (let a in this.object) {
6463
- // 格式化数据模糊查询
6464
- if (this.object[a].like) data[a] = '%' + this.form[a] + '%';
6465
- if (this.form[a] && Object.keys(this.form[a]).length > 0 && this.form[a].old && this.form[a].old.split('=')[1] != '') {
6466
- // 判断是否有默认图片删除
6467
- const {
6468
- old
6469
- } = this.form[a];
6470
- data[a] = this.form[a];
6471
- data[`${a}-${this.fileRemoveMark}`] = old;
6472
- } else data[a] = this.form[a];
6473
- }
6474
- }
6475
- this.$emit('submit', this.filter(data));
6476
- return this.filter(data);
6477
- }
6478
- });
6479
- },
6480
- regain() {
6481
- this.$refs['form'] && this.$refs['form'].resetFields();
6482
- },
6483
- cancel(e) {
6484
- e && e.preventDefault();
6485
- this.$emit('cancel', this.form);
6486
- this.$nextTick(() => {
6487
- for (let a in this.form) this.form[a] = '';
6488
- this.$nextTick(() => this.$refs['form'] && this.$refs['form'].resetFields());
6489
- });
6490
- },
6491
- filter(form) {
6492
- // 过滤空值属性
6493
- const data = {};
6494
- for (let a in form) {
6495
- if (a != undefined && a != 'undefined' && form[a] != '%%' && form[a] != 'null' && form[a] != 'undefined' && form[a] != null && form[a] != undefined) {
6496
- data[a] = form[a];
6497
- }
6498
- }
6499
- return data;
6500
- },
6501
- result() {
6502
- return this.filter(this.form);
6503
- },
6504
- change() {
6505
- this.$emit('input', this.form);
6506
- this.$emit('change', this.form);
6507
- }
6508
- },
6509
- render() {
6510
- const h = arguments[0];
6511
- const {
6512
- ...props
6513
- } = this.$attrs;
6514
- const {
6515
- finish = null,
6516
- submit = null,
6517
- cancel = null
6518
- } = this.$listeners;
6519
- return h("div", {
6520
- "class": !this.inline ? this.search ? 'a-form' : 'a-from vertical' : 'a-form',
6521
- "style": {
6522
- padding: this.margin
6523
- }
6524
- }, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
6525
- "ref": "form",
6526
- "attrs": {
6527
- "size": this.size,
6528
- "labelWidth": this.labelWidth,
6529
- "labelPosition": this.labelPosition,
6530
- "inline": this.inline ? this.inline : this.search
6531
- }
6532
- }, {
6533
- "props": {
6534
- model: this.form,
6535
- rules: Object.keys(this.rules).length > 0 ? this.rules : {},
6536
- ...props
6537
- }
6538
- }]), [this.config.length > 0 && this.config.map((a, b) => h("el-form-item", {
6539
- "key": b,
6540
- "attrs": {
6541
- "prop": `${a.name}`,
6542
- "label": this.label ? a.type && a.type == 'checkbox' ? '' : a.text || a.label || a.title : '',
6543
- "rules": a['must'] ? a['rule'] ? a['rule'] : [{
6544
- required: true,
6545
- trigger: 'blur',
6546
- message: `${a['text']}不能为空`
6547
- }] : a['rule']
6548
- },
6549
- "style": {
6550
- width: a.width
6551
- }
6552
- }, [h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
6553
- "attrs": {
6554
- "config": {
6555
- form: this.form,
6556
- size: a.size ? a.size : this.size,
6557
- field: `${a.name}`,
6558
- ...a
6559
- }
6560
- },
6561
- "on": {
6562
- "change": () => this.change()
6563
- }
6564
- })])), Object.keys(this.object).length > 0 && Object.keys(this.object).map((a, b) => h("el-form-item", {
6565
- "key": b,
6566
- "attrs": {
6567
- "prop": `${a}`,
6568
- "label": this.label ? this.object[a].type && this.object[a].type == 'checkbox' ? '' : this.object[a].text || this.object[a].label || this.object[a].title : '',
6569
- "rules": this.object[a]['must'] ? this.object[a]['rule'] ? this.object[a]['rule'] : [{
6570
- required: true,
6571
- trigger: 'blur',
6572
- message: `${this.object[a]['text']}不能为空`
6573
- }] : this.object[a]['rule']
6574
- },
6575
- "style": {
6576
- width: this.object[a].width
6577
- }
6578
- }, [h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
6579
- "attrs": {
6580
- "config": {
6581
- form: this.form,
6582
- size: this.object[a].size ? this.object[a].size : this.size,
6583
- field: `${a}`,
6584
- ...this.object[a]
6585
- }
6586
- },
6587
- "on": {
6588
- "change": () => this.change()
6589
- }
6590
- })])), this.$slots.default, (finish || submit || cancel) && h("div", {
6591
- "class": "action"
6592
- }, [h("el-form-item", [finish && this.finishText != '' && h("el-button", {
6593
- "attrs": {
6594
- "loading": this.loading,
6595
- "type": "success"
6596
- },
6597
- "on": {
6598
- "click": this.finish
6599
- }
6600
- }, [this.finishText]), submit && h("el-button", {
6601
- "attrs": {
6602
- "loading": this.loading,
6603
- "type": "primary"
6604
- },
6605
- "on": {
6606
- "click": this.submit
6607
- }
6608
- }, [this.submitText]), cancel && h("el-button", {
6609
- "attrs": {
6610
- "disabled": this.loading
6611
- },
6612
- "on": {
6613
- "click": this.cancel
6614
- }
6615
- }, [this.cancelText])])])])]);
6616
- }
6617
- });
6618
-
6619
- /***/ }),
6620
-
6621
6268
  /***/ "0d7f":
6622
6269
  /***/ (function(module, exports, __webpack_require__) {
6623
6270
 
@@ -13401,31 +13048,6 @@ var map = {
13401
13048
  "./Aenume/index": "6cc8",
13402
13049
  "./Aenume/index.js": "6cc8",
13403
13050
  "./Aform": "aff6",
13404
- "./Aform copy": "0d0c",
13405
- "./Aform copy/": "0d0c",
13406
- "./Aform copy/AfEditor": "3cef",
13407
- "./Aform copy/AfEditor/": "3cef",
13408
- "./Aform copy/AfEditor/index": "3cef",
13409
- "./Aform copy/AfEditor/index.css": "9203",
13410
- "./Aform copy/AfEditor/index.js": "3cef",
13411
- "./Aform copy/AfSearch": "230c",
13412
- "./Aform copy/AfSearch/": "230c",
13413
- "./Aform copy/AfSearch/index": "230c",
13414
- "./Aform copy/AfSearch/index.css": "6e39",
13415
- "./Aform copy/AfSearch/index.js": "230c",
13416
- "./Aform copy/BfSearch": "c0f0",
13417
- "./Aform copy/BfSearch/": "c0f0",
13418
- "./Aform copy/BfSearch/index": "c0f0",
13419
- "./Aform copy/BfSearch/index.css": "9e53",
13420
- "./Aform copy/BfSearch/index.js": "c0f0",
13421
- "./Aform copy/CfSearch": "a237",
13422
- "./Aform copy/CfSearch/": "a237",
13423
- "./Aform copy/CfSearch/index": "a237",
13424
- "./Aform copy/CfSearch/index.css": "af1c",
13425
- "./Aform copy/CfSearch/index.js": "a237",
13426
- "./Aform copy/index": "0d0c",
13427
- "./Aform copy/index.css": "d4f0",
13428
- "./Aform copy/index.js": "0d0c",
13429
13051
  "./Aform/": "aff6",
13430
13052
  "./Aform/AfEditor": "b550",
13431
13053
  "./Aform/AfEditor/": "b550",
@@ -13616,6 +13238,11 @@ var map = {
13616
13238
  "./Bmap/index": "e579",
13617
13239
  "./Bmap/index.css": "ba59",
13618
13240
  "./Bmap/index.js": "e579",
13241
+ "./Bpages": "7c09",
13242
+ "./Bpages/": "7c09",
13243
+ "./Bpages/index": "7c09",
13244
+ "./Bpages/index.css": "2769",
13245
+ "./Bpages/index.js": "7c09",
13619
13246
  "./Bplayer": "2c3e",
13620
13247
  "./Bplayer/": "2c3e",
13621
13248
  "./Bplayer/index": "2c3e",
@@ -13851,6 +13478,10 @@ __webpack_require__.r(__webpack_exports__);
13851
13478
  type: Object,
13852
13479
  default: () => ({})
13853
13480
  },
13481
+ must: {
13482
+ type: Boolean,
13483
+ default: () => false
13484
+ },
13854
13485
  inline: {
13855
13486
  type: Boolean,
13856
13487
  default: () => false
@@ -13870,6 +13501,10 @@ __webpack_require__.r(__webpack_exports__);
13870
13501
  global: {
13871
13502
  type: Boolean,
13872
13503
  default: () => true
13504
+ },
13505
+ disabled: {
13506
+ type: Boolean,
13507
+ default: () => false
13873
13508
  }
13874
13509
  },
13875
13510
  data() {
@@ -13910,6 +13545,9 @@ __webpack_require__.r(__webpack_exports__);
13910
13545
  r.default && (this.form[a] = r.default || '');
13911
13546
  }
13912
13547
  });
13548
+ this.$nextTick(() => {
13549
+ Object.keys(this.value).forEach(a => typeof this.value[a] == 'number' && (this.form[a] = `${this.value[a]}`));
13550
+ });
13913
13551
  },
13914
13552
  create(a, b) {
13915
13553
  const h = this.$createElement;
@@ -13918,22 +13556,27 @@ __webpack_require__.r(__webpack_exports__);
13918
13556
  } = this.config[a];
13919
13557
  let label = r.text || r.label || r.title || '';
13920
13558
  let width = r.width ? r.width : `${100 / this.cols}%`;
13921
- let style = this.cols != '' ? {
13922
- width
13923
- } : {};
13559
+ let judge = [{
13560
+ required: true,
13561
+ message: `${label}不能为空`
13562
+ }];
13563
+ let valid = r.rule ? r.rule : r.must || this.must ? judge : [];
13564
+ let rules = this.disabled || r.disabled ? [] : (r.must || this.must) && r.rule ? [...judge, ...r.rule] : valid;
13924
13565
  let props = {
13925
13566
  name: a,
13926
13567
  prop: a,
13927
13568
  label,
13569
+ rules,
13570
+ disabled: r.disabled || this.disabled,
13928
13571
  ...r
13929
13572
  };
13930
13573
  if (this.inline) {
13931
- let styles = {
13574
+ let style = {
13932
13575
  padding: `0 ${this.gutter / 2}px`,
13933
- ...style
13576
+ width
13934
13577
  };
13935
13578
  return h("el-form-item", {
13936
- "style": styles,
13579
+ "style": style,
13937
13580
  "props": {
13938
13581
  ...props
13939
13582
  }
@@ -13953,7 +13596,9 @@ __webpack_require__.r(__webpack_exports__);
13953
13596
  } else {
13954
13597
  return h("el-col", {
13955
13598
  "key": b,
13956
- "style": style
13599
+ "style": {
13600
+ width
13601
+ }
13957
13602
  }, [h("el-form-item", {
13958
13603
  "props": {
13959
13604
  ...props
@@ -13967,10 +13612,6 @@ __webpack_require__.r(__webpack_exports__);
13967
13612
  this.option[b] = a;
13968
13613
  let child = a.children || a.child || a.node || null;
13969
13614
  if (child && Object.keys(child).length > 0) {
13970
- let width = a.width ? a.width : `${100 / Object.keys(child).length}%`;
13971
- let style = this.cols != '' ? {
13972
- width
13973
- } : {};
13974
13615
  return Object.keys(child).map((c, d) => {
13975
13616
  let {
13976
13617
  ...r
@@ -13983,9 +13624,12 @@ __webpack_require__.r(__webpack_exports__);
13983
13624
  }
13984
13625
  }, [this.format(r, c)]);
13985
13626
  } else {
13627
+ let width = r.width ? r.width : `${100 / Object.keys(child).length}%`;
13986
13628
  return h("el-col", {
13987
13629
  "key": d,
13988
- "style": style
13630
+ "style": {
13631
+ width
13632
+ }
13989
13633
  }, [this.format(r, c)]);
13990
13634
  }
13991
13635
  });
@@ -14030,7 +13674,11 @@ __webpack_require__.r(__webpack_exports__);
14030
13674
  }
14031
13675
  }
14032
13676
  });
14033
- return data;
13677
+ let value = {};
13678
+ Object.keys(data).forEach(a => {
13679
+ if (data[a] && data[a] != '%' && data[a] != '%%') value[a] = data[a];
13680
+ });
13681
+ return value;
14034
13682
  },
14035
13683
  submit() {
14036
13684
  if (this.global) {
@@ -14043,7 +13691,7 @@ __webpack_require__.r(__webpack_exports__);
14043
13691
  page: 1
14044
13692
  });
14045
13693
  }
14046
- this.$nextTick(() => this.$emit('submit', this.filter(), this.form, this.option));
13694
+ this.$refs.form.validate(valid => valid && this.$emit('submit', this.filter(), this.form, this.option));
14047
13695
  },
14048
13696
  cancel() {
14049
13697
  this.$refs.form && this.$refs.form.resetFields && this.$refs.form.resetFields();
@@ -14071,9 +13719,8 @@ __webpack_require__.r(__webpack_exports__);
14071
13719
  render() {
14072
13720
  const h = arguments[0];
14073
13721
  let {
14074
- padding = '0',
14075
13722
  margin = '0',
14076
- ref = 'form',
13723
+ padding = '0',
14077
13724
  size = 'small',
14078
13725
  loading = false,
14079
13726
  labelWidth = 'auto',
@@ -14081,7 +13728,7 @@ __webpack_require__.r(__webpack_exports__);
14081
13728
  submitText = '搜索',
14082
13729
  cancelText = '重置',
14083
13730
  action = [],
14084
- ...props
13731
+ ...rest
14085
13732
  } = this.$attrs;
14086
13733
  let {
14087
13734
  submit = null,
@@ -14090,6 +13737,14 @@ __webpack_require__.r(__webpack_exports__);
14090
13737
  let style = this.inline ? {
14091
13738
  margin: `0 -${this.gutter / 2}px`
14092
13739
  } : {};
13740
+ let props = {
13741
+ size,
13742
+ inline: this.inline,
13743
+ labelWidth,
13744
+ labelPosition,
13745
+ style,
13746
+ ...rest
13747
+ };
14093
13748
  return h("div", {
14094
13749
  "class": "a-f-search",
14095
13750
  "style": {
@@ -14097,14 +13752,7 @@ __webpack_require__.r(__webpack_exports__);
14097
13752
  padding
14098
13753
  }
14099
13754
  }, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
14100
- "ref": ref,
14101
- "attrs": {
14102
- "size": size,
14103
- "inline": this.inline,
14104
- "label-width": labelWidth,
14105
- "label-position": labelPosition
14106
- },
14107
- "style": style
13755
+ "ref": "form"
14108
13756
  }, {
14109
13757
  "props": {
14110
13758
  model: this.form,
@@ -14161,7 +13809,7 @@ __webpack_require__.r(__webpack_exports__);
14161
13809
  "on": {
14162
13810
  "click": this.cancel
14163
13811
  }
14164
- }, [cancelText]), action.forEach((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
13812
+ }, [cancelText]), action.map((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
14165
13813
  "key": b,
14166
13814
  "attrs": {
14167
13815
  "disabled": loading
@@ -16620,7 +16268,7 @@ __webpack_require__.r(__webpack_exports__);
16620
16268
  ...props
16621
16269
  } = this.$attrs;
16622
16270
  return h("div", {
16623
- "class": "a-page"
16271
+ "class": "a-pages"
16624
16272
  }, [h("el-pagination", {
16625
16273
  "attrs": {
16626
16274
  "small": this.small,
@@ -19143,7 +18791,6 @@ __webpack_require__.r(__webpack_exports__);
19143
18791
 
19144
18792
 
19145
18793
 
19146
-
19147
18794
 
19148
18795
 
19149
18796
  /* harmony default export */ __webpack_exports__["default"] = ({
@@ -19160,19 +18807,19 @@ __webpack_require__.r(__webpack_exports__);
19160
18807
  },
19161
18808
  data() {
19162
18809
  return {
19163
- rand: Math.random()
18810
+ random: Math.random()
19164
18811
  };
19165
18812
  },
19166
18813
  watch: {
19167
18814
  config: {
19168
18815
  immediate: true,
19169
18816
  handler() {
19170
- this.rand = Math.random();
18817
+ this.update();
19171
18818
  }
19172
18819
  }
19173
18820
  },
19174
18821
  created() {
19175
- this.rand = Math.random();
18822
+ this.update();
19176
18823
  },
19177
18824
  destroyed() {
19178
18825
  this.input = null;
@@ -19190,6 +18837,9 @@ __webpack_require__.r(__webpack_exports__);
19190
18837
  } = this.config;
19191
18838
  this.config.change && this.config.change(a, data.length > 0 ? this.filter(data, a) : null);
19192
18839
  },
18840
+ update() {
18841
+ this.random = Math.random();
18842
+ },
19193
18843
  filter(array = [], value = '') {
19194
18844
  let data = {};
19195
18845
  if (value != '') array.length > 0 && array.forEach(a => {
@@ -19204,35 +18854,14 @@ __webpack_require__.r(__webpack_exports__);
19204
18854
  ...r
19205
18855
  }) {
19206
18856
  const h = this.$createElement;
19207
- const label = r.text || r.label || r.title || '';
19208
18857
  const style = {
19209
- width: r.width || '100%',
18858
+ width: '100%',
19210
18859
  ...r.style
19211
18860
  };
18861
+ const label = r.text || r.label || r.title || '';
19212
18862
  const values = (a = {}) => typeof a == 'string' ? a : `${a.value || a.code || a.id}`;
19213
18863
  const labels = (a = {}) => typeof a == 'string' ? a : a.label || a.title || a.text || a.name;
19214
18864
  if (r.render) return r.render(form, this.config);
19215
- if (!r.type) return h("el-input", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
19216
- "on": {
19217
- "input": this.input,
19218
- "change": this.change
19219
- },
19220
- "attrs": {
19221
- "placeholder": `请输入${label}`
19222
- },
19223
- "style": {
19224
- ...r.style
19225
- }
19226
- }, {
19227
- "props": r
19228
- }, {
19229
- "model": {
19230
- value: form[field],
19231
- callback: $$v => {
19232
- this.$set(form, field, $$v);
19233
- }
19234
- }
19235
- }]));
19236
18865
  switch (r.type) {
19237
18866
  case 'input':
19238
18867
  return h("el-input", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
@@ -19255,7 +18884,7 @@ __webpack_require__.r(__webpack_exports__);
19255
18884
  }
19256
18885
  }
19257
18886
  }]));
19258
- case 'number':
18887
+ case 'password':
19259
18888
  return h("el-input", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
19260
18889
  "on": {
19261
18890
  "input": this.input,
@@ -19263,7 +18892,8 @@ __webpack_require__.r(__webpack_exports__);
19263
18892
  },
19264
18893
  "attrs": {
19265
18894
  "clearable": true,
19266
- "placeholder": r.placeholder || `请输入${label}`
18895
+ "placeholder": r.placeholder || `请输入${label}`,
18896
+ "show-password": true
19267
18897
  },
19268
18898
  "style": style
19269
18899
  }, {
@@ -19276,16 +18906,19 @@ __webpack_require__.r(__webpack_exports__);
19276
18906
  }
19277
18907
  }
19278
18908
  }]));
19279
- case 'password':
19280
- return h("el-input", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
18909
+ case 'number':
18910
+ return h("el-input-number", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
19281
18911
  "on": {
19282
18912
  "input": this.input,
19283
18913
  "change": this.change
19284
18914
  },
19285
18915
  "attrs": {
19286
18916
  "clearable": true,
19287
- "placeholder": r.placeholder || `请输入${label}`,
19288
- "show-password": true
18917
+ "min": 0,
18918
+ "max": 100000000,
18919
+ "controls": false,
18920
+ "controls-position": "right",
18921
+ "placeholder": r.placeholder || `请输入${label}`
19289
18922
  },
19290
18923
  "style": style
19291
18924
  }, {
@@ -19579,7 +19212,7 @@ __webpack_require__.r(__webpack_exports__);
19579
19212
  }]));
19580
19213
  case 'image':
19581
19214
  return h(_components_Aupload_Icon__WEBPACK_IMPORTED_MODULE_2__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
19582
- "key": this.rand,
19215
+ "key": this.random,
19583
19216
  "on": {
19584
19217
  "input": this.input,
19585
19218
  "change": this.change
@@ -19601,7 +19234,7 @@ __webpack_require__.r(__webpack_exports__);
19601
19234
  }]));
19602
19235
  case 'upload':
19603
19236
  return h(_components_Aupload_Icon__WEBPACK_IMPORTED_MODULE_2__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
19604
- "key": this.rand,
19237
+ "key": this.random,
19605
19238
  "on": {
19606
19239
  "input": this.input,
19607
19240
  "change": this.change
@@ -19623,7 +19256,7 @@ __webpack_require__.r(__webpack_exports__);
19623
19256
  }]));
19624
19257
  case 'icon':
19625
19258
  return h(_components_AiconSelect__WEBPACK_IMPORTED_MODULE_1__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
19626
- "key": this.rand,
19259
+ "key": this.random,
19627
19260
  "on": {
19628
19261
  "input": this.input,
19629
19262
  "change": this.change
@@ -19644,7 +19277,7 @@ __webpack_require__.r(__webpack_exports__);
19644
19277
  }]));
19645
19278
  case 'iconSelect':
19646
19279
  return h(_components_AiconSelect__WEBPACK_IMPORTED_MODULE_1__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
19647
- "key": this.rand,
19280
+ "key": this.random,
19648
19281
  "on": {
19649
19282
  "input": this.input,
19650
19283
  "change": this.change
@@ -20137,384 +19770,6 @@ module.exports = _default;
20137
19770
 
20138
19771
  /***/ }),
20139
19772
 
20140
- /***/ "230c":
20141
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
20142
-
20143
- "use strict";
20144
- __webpack_require__.r(__webpack_exports__);
20145
- /* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
20146
- /* 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__);
20147
- /* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2234");
20148
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("6e39");
20149
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_2__);
20150
-
20151
-
20152
-
20153
- /* harmony default export */ __webpack_exports__["default"] = ({
20154
- name: 'AfSearch',
20155
- components: {
20156
- AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"]
20157
- },
20158
- props: {
20159
- value: {
20160
- type: Object,
20161
- default: () => ({})
20162
- },
20163
- margin: {
20164
- type: String,
20165
- default: () => '0'
20166
- },
20167
- size: {
20168
- type: String,
20169
- default: () => 'small'
20170
- },
20171
- inline: {
20172
- type: Boolean,
20173
- default: () => false
20174
- },
20175
- cols: {
20176
- type: String,
20177
- default: () => '6'
20178
- },
20179
- gutter: {
20180
- type: String,
20181
- default: () => '10'
20182
- },
20183
- labelWidth: {
20184
- type: String,
20185
- default: () => 'auto'
20186
- },
20187
- labelPosition: {
20188
- type: String,
20189
- default: () => 'top'
20190
- },
20191
- config: {
20192
- type: Object,
20193
- default: () => ({})
20194
- },
20195
- values: {
20196
- type: Object,
20197
- default: () => ({})
20198
- },
20199
- label: {
20200
- type: Boolean,
20201
- default: () => true
20202
- },
20203
- check: {
20204
- type: Boolean,
20205
- default: () => false
20206
- },
20207
- loading: {
20208
- type: Boolean,
20209
- default: () => false
20210
- },
20211
- submitText: {
20212
- type: String,
20213
- default: () => '搜索'
20214
- },
20215
- cancelText: {
20216
- type: String,
20217
- default: () => '重置'
20218
- }
20219
- },
20220
- data() {
20221
- return {
20222
- form: this.value,
20223
- height: 0,
20224
- opened: false
20225
- };
20226
- },
20227
- created() {
20228
- this.create();
20229
- },
20230
- mounted() {
20231
- this.update();
20232
- },
20233
- destroyed() {
20234
- this.create = null;
20235
- this.update = null;
20236
- this.submit = null;
20237
- this.cancel = null;
20238
- this.filter = null;
20239
- this.result = null;
20240
- this.switch = null;
20241
- this.format = null;
20242
- this.output = null;
20243
- },
20244
- watch: {
20245
- values() {
20246
- this.create();
20247
- }
20248
- },
20249
- methods: {
20250
- create() {
20251
- // 创建表单
20252
- if (this.config && Object.keys(this.config).length > 0) {
20253
- // 格式化表单配置对象(this.config)为数据双向绑定对象
20254
- let data = {};
20255
- Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
20256
- let {
20257
- ...r
20258
- } = this.config[a];
20259
- if (!r.render) {
20260
- let range = r.range || r.scope || r.both || r.than || null;
20261
- if (range) {
20262
- data[`${a}LE`] = '';
20263
- data[`${a}GE`] = '';
20264
- } else {
20265
- data[a] = r.default ? r.default : '';
20266
- }
20267
- }
20268
- });
20269
- this.form = data;
20270
- }
20271
- },
20272
- update() {
20273
- let rows = Math.ceil(Object.keys(this.config).length / this.cols);
20274
- this.height = this.$el.clientHeight * (rows - 1);
20275
- },
20276
- submit(e) {
20277
- // 提交表单
20278
- e && e.preventDefault();
20279
- let pass = !this.check; // 判断是否是空表单
20280
- for (let a in this.form) if (this.form[a] != '') pass = true;
20281
- if (pass) {
20282
- let result = this.filter();
20283
- const {
20284
- formParams,
20285
- pageParams
20286
- } = this.$store.state;
20287
- this.$store.commit('setFormParams', result); // 添加查询参数
20288
- this.$store.commit('setPageParams', {
20289
- ...pageParams,
20290
- page: 1
20291
- }); // 重置分页参数
20292
- this.$nextTick(() => {
20293
- let change = false;
20294
- Object.keys(result).forEach(a => result[a] != formParams[a] && (change = true));
20295
- if (change) this.$emit('submit', {
20296
- ...result,
20297
- ...pageParams,
20298
- page: 1
20299
- }); // 派发事件并重置当前分页
20300
- return result;
20301
- });
20302
- }
20303
- },
20304
- cancel(e) {
20305
- // 重置表单
20306
- e && e.preventDefault();
20307
- let pass = !this.check; // 判断是否是空表单
20308
- for (let a in this.form) if (this.form[a] != '') pass = true;
20309
- if (pass) {
20310
- const {
20311
- pageParams
20312
- } = this.$store.state;
20313
- this.$store.commit('setPageParams', {
20314
- ...pageParams,
20315
- page: 1
20316
- }); // 重置分页参数
20317
- this.$store.commit('setFormParams', {}); // 重置查询参数
20318
- this.$nextTick(() => {
20319
- for (let a in this.form) this.form[a] = '';
20320
- this.$nextTick(() => {
20321
- this.$refs.form && this.$refs.form.resetFields();
20322
- this.$nextTick(() => this.$emit('cancel', this.form));
20323
- });
20324
- });
20325
- }
20326
- },
20327
- filter() {
20328
- let data = {};
20329
- Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
20330
- let {
20331
- like = null,
20332
- ...r
20333
- } = this.config[a];
20334
- let range = r.range || r.scope || r.both || r.than || null;
20335
- if (range) {
20336
- this.form[`${a}LE`] != '' && (data[`${a}LE`] = this.form[`${a}LE`]);
20337
- this.form[`${a}GE`] != '' && (data[`${a}GE`] = this.form[`${a}GE`]);
20338
- } else {
20339
- let value = this.form[a];
20340
- if (value) {
20341
- if (r.split && typeof r.split == 'object' && r.split.length > 0) {
20342
- r.split.forEach((c, d) => data[c] = value != '' && typeof value == 'object' && value.length > 0 ? value[d] : value);
20343
- } else {
20344
- if (like) {
20345
- if (like == 'left' || like && like == 'l') data[a] = '%' + value;
20346
- if (like == 'right' || like && like == 'r') data[a] = value + '%';else data[a] = '%' + value + '%';
20347
- } else {
20348
- if (value.includes(' 00:00:00')) {
20349
- data[a] = '%' + value.split(' 00:00:00')[0] + '%';
20350
- } else {
20351
- data[a] = value;
20352
- }
20353
- }
20354
- }
20355
- }
20356
- }
20357
- });
20358
- let form = {};
20359
- Object.keys(data).length > 0 && Object.keys(data).forEach(a => {
20360
- if (data[a] != '%' && data[a] != '%%' && data[a] != 'null' && data[a] != 'undefined' && data[a] != null && data[a] != undefined) {
20361
- form[a] = data[a];
20362
- }
20363
- });
20364
- return form;
20365
- },
20366
- result() {
20367
- return this.filter(this.form);
20368
- },
20369
- switch() {
20370
- this.opened = !this.opened;
20371
- },
20372
- format(a = '', field = '', placeholder = '') {
20373
- const h = this.$createElement;
20374
- let {
20375
- ...r
20376
- } = this.config[a];
20377
- let config = {
20378
- size: r.size ? r.size : this.size,
20379
- field: field != '' ? field : a,
20380
- change: () => this.change(),
20381
- disabled: this.loading,
20382
- form: this.form,
20383
- ...r
20384
- };
20385
- return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
20386
- "attrs": {
20387
- "config": placeholder != '' ? {
20388
- ...config,
20389
- placeholder
20390
- } : config
20391
- }
20392
- });
20393
- },
20394
- output(a, b) {
20395
- const h = this.$createElement;
20396
- let {
20397
- ...r
20398
- } = this.config[a];
20399
- let range = r.range || r.scope || r.both || r.than || null;
20400
- let label = this.label ? r.text || r.label || r.title : '';
20401
- let style = this.cols != '' ? {
20402
- width: r.width ? r.width : `${100 / this.cols}%`
20403
- } : {};
20404
- let prefixPlaceholder = r.placeholder && r.placeholder.length > 0 ? r.placeholder[0] : '最高';
20405
- let suffixPlaceholder = r.placeholder && r.placeholder.length > 1 ? r.placeholder[1] : '最低';
20406
- return h("el-col", {
20407
- "key": b,
20408
- "style": style
20409
- }, [h("el-form-item", {
20410
- "attrs": {
20411
- "prop": a,
20412
- "label": label
20413
- }
20414
- }, [range ? h("el-col", {
20415
- "class": "range-cols"
20416
- }, [h("el-col", {
20417
- "attrs": {
20418
- "span": 12
20419
- }
20420
- }, [this.format(a, `${a}LE`, prefixPlaceholder)]), h("el-col", {
20421
- "attrs": {
20422
- "span": 12
20423
- }
20424
- }, [this.format(a, `${a}GE`, suffixPlaceholder)])]) : this.format(a)])]);
20425
- },
20426
- change() {
20427
- this.$emit('input', this.filter());
20428
- this.$emit('change', this.filter());
20429
- }
20430
- },
20431
- render() {
20432
- const h = arguments[0];
20433
- const {
20434
- ...props
20435
- } = this.$attrs;
20436
- const {
20437
- submit = null,
20438
- cancel = null
20439
- } = this.$listeners;
20440
- return h("div", {
20441
- "class": "a-f-search",
20442
- "style": {
20443
- padding: this.margin
20444
- }
20445
- }, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
20446
- "ref": "form",
20447
- "attrs": {
20448
- "size": this.size,
20449
- "inline": this.inline
20450
- }
20451
- }, {
20452
- "props": {
20453
- model: this.form,
20454
- ...props
20455
- }
20456
- }, {
20457
- "attrs": {
20458
- "labelWidth": this.labelWidth,
20459
- "labelPosition": this.labelPosition
20460
- }
20461
- }]), [h("div", {
20462
- "class": "column"
20463
- }, [h("el-row", {
20464
- "attrs": {
20465
- "gutter": Number(this.gutter)
20466
- },
20467
- "class": "main-rows"
20468
- }, [Object.keys(this.config).map((a, b) => b < this.cols && this.output(a, b))]), h("el-row", {
20469
- "attrs": {
20470
- "gutter": Number(this.gutter)
20471
- },
20472
- "class": "fold-rows",
20473
- "style": {
20474
- height: this.opened ? `${this.height}px` : '0'
20475
- }
20476
- }, [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", {
20477
- "class": "action",
20478
- "style": {
20479
- paddingLeft: `${this.gutter}px`
20480
- }
20481
- }, [h("el-form-item", {
20482
- "attrs": {
20483
- "label": "action"
20484
- }
20485
- }, [Object.keys(this.config).length > this.cols && h("el-button", {
20486
- "attrs": {
20487
- "disabled": this.loading,
20488
- "type": "text"
20489
- },
20490
- "class": "collapse-button",
20491
- "on": {
20492
- "click": this.switch
20493
- }
20494
- }, [h("i", {
20495
- "class": `el-icon-arrow-${this.opened ? 'up' : 'down'}`
20496
- }), this.opened ? '收起' : '展开']), submit && h("el-button", {
20497
- "attrs": {
20498
- "disabled": this.loading,
20499
- "type": "primary"
20500
- },
20501
- "on": {
20502
- "click": this.submit
20503
- }
20504
- }, [this.submitText]), cancel && h("el-button", {
20505
- "attrs": {
20506
- "disabled": this.loading,
20507
- "type": "default"
20508
- },
20509
- "on": {
20510
- "click": this.cancel
20511
- }
20512
- }, [this.cancelText])])])])]);
20513
- }
20514
- });
20515
-
20516
- /***/ }),
20517
-
20518
19773
  /***/ "23df":
20519
19774
  /***/ (function(module, exports, __webpack_require__) {
20520
19775
 
@@ -21900,6 +21155,13 @@ module.exports = _default;
21900
21155
 
21901
21156
  /***/ }),
21902
21157
 
21158
+ /***/ "2769":
21159
+ /***/ (function(module, exports, __webpack_require__) {
21160
+
21161
+ // extracted by mini-css-extract-plugin
21162
+
21163
+ /***/ }),
21164
+
21903
21165
  /***/ "2772":
21904
21166
  /***/ (function(module, exports) {
21905
21167
 
@@ -28023,417 +27285,6 @@ __webpack_require__.r(__webpack_exports__);
28023
27285
 
28024
27286
  /***/ }),
28025
27287
 
28026
- /***/ "3cef":
28027
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
28028
-
28029
- "use strict";
28030
- __webpack_require__.r(__webpack_exports__);
28031
- /* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
28032
- /* 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__);
28033
- /* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2234");
28034
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("9203");
28035
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_2__);
28036
-
28037
-
28038
-
28039
- /* harmony default export */ __webpack_exports__["default"] = ({
28040
- name: 'AfEditor',
28041
- components: {
28042
- AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"]
28043
- },
28044
- props: {
28045
- value: {
28046
- type: Object,
28047
- default: () => ({})
28048
- },
28049
- disabled: {
28050
- type: Boolean,
28051
- default: () => false
28052
- },
28053
- margin: {
28054
- type: String,
28055
- default: () => '0'
28056
- },
28057
- pure: {
28058
- type: Boolean,
28059
- default: () => true
28060
- },
28061
- must: {
28062
- type: Boolean,
28063
- default: () => false
28064
- },
28065
- inline: {
28066
- type: Boolean,
28067
- default: () => false
28068
- },
28069
- size: {
28070
- type: String,
28071
- default: () => 'small'
28072
- },
28073
- rules: {
28074
- type: Object,
28075
- default: () => ({})
28076
- },
28077
- labelWidth: {
28078
- type: String,
28079
- default: () => '100%'
28080
- },
28081
- labelPosition: {
28082
- type: String,
28083
- default: () => 'top'
28084
- },
28085
- itemWidth: {
28086
- type: String,
28087
- default: () => ''
28088
- },
28089
- cols: {
28090
- type: String,
28091
- default: () => '1'
28092
- },
28093
- gutter: {
28094
- type: String,
28095
- default: () => '10'
28096
- },
28097
- config: {
28098
- type: Object,
28099
- default: () => ({})
28100
- },
28101
- values: {
28102
- type: Object,
28103
- default: () => ({})
28104
- },
28105
- label: {
28106
- type: Boolean,
28107
- default: () => true
28108
- },
28109
- check: {
28110
- type: Boolean,
28111
- default: () => true
28112
- },
28113
- action: {
28114
- type: Boolean,
28115
- default: () => true
28116
- },
28117
- loading: {
28118
- type: Boolean,
28119
- default: () => false
28120
- },
28121
- fileRemoveMark: {
28122
- type: String,
28123
- default: () => 'will-remove'
28124
- },
28125
- finishText: {
28126
- type: String,
28127
- default: () => '保存'
28128
- },
28129
- submitText: {
28130
- type: String,
28131
- default: () => '确定'
28132
- },
28133
- rejectText: {
28134
- type: String,
28135
- default: () => ''
28136
- },
28137
- cancelText: {
28138
- type: String,
28139
- default: () => '取消'
28140
- }
28141
- },
28142
- data() {
28143
- return {
28144
- form: this.value,
28145
- randomKey: `key-${Math.random()}`
28146
- };
28147
- },
28148
- created() {
28149
- this.create();
28150
- },
28151
- destroyed() {
28152
- this.create = null;
28153
- this.verify = null;
28154
- this.finish = null;
28155
- this.submit = null;
28156
- this.reject = null;
28157
- this.cancel = null;
28158
- this.filter = null;
28159
- this.result = null;
28160
- this.format = null;
28161
- },
28162
- watch: {
28163
- values: {
28164
- immediate: true,
28165
- handler() {
28166
- this.create();
28167
- }
28168
- }
28169
- },
28170
- methods: {
28171
- create() {
28172
- // 创建表单 格式化表单配置对象(this.config)为数据双向绑定对象
28173
- this.randomKey = `key-${Math.random()}`;
28174
- const {
28175
- config = {},
28176
- values = {}
28177
- } = this;
28178
- let temp = {};
28179
- let data = {};
28180
- if (config && Object.keys(config).length > 0) {
28181
- for (let a in config) temp[a] = '';
28182
- }
28183
- if (values && Object.keys(values).length > 0) {
28184
- // 设置默认值
28185
- for (let a in temp) {
28186
- if (a.includes('password')) data[a] = '';else data[a] = isNaN(values[a]) ? values[a] : values[a] != null ? `${values[a]}` : '';
28187
- }
28188
- } else {
28189
- if (!this.pure) {
28190
- for (let a in config) {
28191
- // 设置 object 对象(单选框, 下拉框, 开关) 默认值为0
28192
- let {
28193
- pure = null,
28194
- type = null,
28195
- ...r
28196
- } = config[a];
28197
- if (!pure) {
28198
- if (type && (type == 'radio' || type == 'select' || type == 'switch')) {
28199
- data[a] = r.default || '0';
28200
- } else data[a] = r.default || '';
28201
- } else data[a] = '';
28202
- }
28203
- } else {
28204
- for (let a in temp) data[a] = '';
28205
- }
28206
- }
28207
- this.form = data;
28208
- },
28209
- verify() {
28210
- // 表单验证
28211
- let change = false;
28212
- let success = false;
28213
- this.$refs['form'].validate(valid => {
28214
- if (valid) {
28215
- success = true;
28216
- let result = this.refine(this.form);
28217
- let values = this.refine(this.values);
28218
- Object.keys(result).forEach(a => result[a] != values[a] && (change = true));
28219
- }
28220
- });
28221
- return change && success;
28222
- },
28223
- finish(e) {
28224
- e && e.preventDefault();
28225
- this.$emit('finish', this.result());
28226
- },
28227
- submit(e) {
28228
- // 提交表单
28229
- e && e.preventDefault();
28230
- if (!this.check) this.$emit('submit');
28231
- this.$refs['form'].validate(valid => {
28232
- if (valid) {
28233
- let data = {};
28234
- if (Object.keys(this.config).length > 0) {
28235
- for (let a in this.config) {
28236
- // 格式化数据模糊查询
28237
- if (this.form[a] && Object.keys(this.form[a]).length > 0 && this.form[a].old && this.form[a].old.split('=')[1] != '') {
28238
- // 判断是否有默认图片删除
28239
- const {
28240
- old
28241
- } = this.form[a];
28242
- data[a] = this.form[a];
28243
- data[`${a}-${this.fileRemoveMark}`] = old;
28244
- } else data[a] = this.form[a];
28245
- }
28246
- }
28247
- let change = false;
28248
- let result = this.refine(data);
28249
- let values = this.refine(this.values);
28250
- Object.keys(result).forEach(a => result[a] != values[a] && (change = true));
28251
- if (change) this.$emit('submit', this.filter(result));
28252
- return result;
28253
- }
28254
- });
28255
- },
28256
- refine(form = {}) {
28257
- let data = {};
28258
- Object.keys(form).forEach(a => {
28259
- if (a != undefined && a != 'undefined' && form[a] != '%' && form[a] != '%%' && form[a] != 'null' && form[a] != 'undefined' && form[a] != null && form[a] != undefined) {
28260
- data[a] = form[a];
28261
- } else data[a] = '';
28262
- });
28263
- return data;
28264
- },
28265
- reject(e) {
28266
- e && e.preventDefault();
28267
- this.$emit('reject', this.result());
28268
- },
28269
- regain() {
28270
- this.$refs['form'] && this.$refs['form'].resetFields();
28271
- },
28272
- cancel(e) {
28273
- e && e.preventDefault();
28274
- this.$emit('cancel', this.form);
28275
- this.$nextTick(() => {
28276
- for (let a in this.form) this.form[a] = '';
28277
- this.$nextTick(() => this.$refs['form'] && this.$refs['form'].resetFields());
28278
- });
28279
- },
28280
- filter(form = {}) {
28281
- // 过滤空值属性
28282
- const data = {};
28283
- for (let a in form) {
28284
- if (a != undefined && a != 'undefined' && form[a] != '%' && form[a] != '%%' && form[a] != 'null' && form[a] != 'undefined' && form[a] != null && form[a] != undefined) {
28285
- data[a] = form[a];
28286
- }
28287
- }
28288
- return data;
28289
- },
28290
- result() {
28291
- return this.filter(this.form);
28292
- },
28293
- format(a, b) {
28294
- const h = this.$createElement;
28295
- const {
28296
- ...r
28297
- } = this.config[a];
28298
- const text = r.label || r.title || r.text;
28299
- const must = {
28300
- required: true,
28301
- trigger: 'blur',
28302
- message: `${text}不能为空`
28303
- };
28304
- const rule = r['rule'] ? r['rule'] : r['must'] || this.must ? [{
28305
- ...must
28306
- }] : [];
28307
- const rules = this.disabled || r.disabled ? [] : r['must'] && r['rule'] ? [{
28308
- ...must
28309
- }, ...r['rule']] : rule;
28310
- const config = {
28311
- form: this.form,
28312
- size: r.size ? r.size : this.size,
28313
- field: a,
28314
- disabled: this.disabled || this.loading,
28315
- change: () => this.change(),
28316
- ...r
28317
- };
28318
- return h("el-form-item", {
28319
- "key": b,
28320
- "attrs": {
28321
- "prop": a,
28322
- "rules": rules,
28323
- "label": this.label ? r.type && r.type == 'checkbox' ? '' : text : ''
28324
- },
28325
- "style": {
28326
- width: r.width ? r.width : this.itemWidth
28327
- }
28328
- }, [r.hint ? h("el-row", {
28329
- "attrs": {
28330
- "gutter": Number(this.gutter)
28331
- }
28332
- }, [h("el-col", {
28333
- "attrs": {
28334
- "span": 12
28335
- }
28336
- }, [h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
28337
- "attrs": {
28338
- "config": config
28339
- }
28340
- })]), h("el-col", {
28341
- "attrs": {
28342
- "span": 12
28343
- }
28344
- }, [h("span", {
28345
- "class": "hint"
28346
- }, [`(${r.hint})`])])]) : h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
28347
- "attrs": {
28348
- "config": config
28349
- }
28350
- })]);
28351
- },
28352
- change() {
28353
- this.$emit('input', this.form);
28354
- this.$emit('change', this.form);
28355
- }
28356
- },
28357
- render() {
28358
- const h = arguments[0];
28359
- const {
28360
- ...props
28361
- } = this.$attrs;
28362
- const {
28363
- finish,
28364
- submit,
28365
- reject,
28366
- cancel
28367
- } = this.$listeners;
28368
- return h("div", {
28369
- "class": !this.inline ? 'a-f-editor vertical' : 'a-f-editor',
28370
- "style": {
28371
- padding: this.margin
28372
- }
28373
- }, [h("div", {
28374
- "class": this.disabled ? 'disabled' : ''
28375
- }, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
28376
- "ref": "form",
28377
- "attrs": {
28378
- "size": this.size,
28379
- "inline": this.inline,
28380
- "labelWidth": this.labelWidth,
28381
- "labelPosition": this.labelPosition
28382
- }
28383
- }, {
28384
- "props": {
28385
- model: this.form,
28386
- rules: Object.keys(this.rules).length > 0 ? this.rules : {},
28387
- ...props
28388
- }
28389
- }]), [h("el-row", {
28390
- "attrs": {
28391
- "gutter": this.cols != '' ? this.gutter != '' ? Number(this.gutter) : 0 : 0
28392
- }
28393
- }, [Object.keys(this.config).map((a, b) => this.config[a].span && this.config[a].span != '' || this.cols != '' ? h("el-col", {
28394
- "key": b,
28395
- "attrs": {
28396
- "span": Number(this.config[a].span) || 24 / Number(this.cols)
28397
- }
28398
- }, [this.format(a, b)]) : this.format(a, b)), this.$slots.default]), (finish || submit || reject || cancel) && h("div", {
28399
- "class": "action"
28400
- }, [h("el-form-item", [finish && this.finishText != '' && h("el-button", {
28401
- "attrs": {
28402
- "loading": this.loading,
28403
- "type": "success"
28404
- },
28405
- "on": {
28406
- "click": this.finish
28407
- }
28408
- }, [this.finishText]), submit && this.submitText != '' && h("el-button", {
28409
- "attrs": {
28410
- "loading": this.loading,
28411
- "type": "primary"
28412
- },
28413
- "on": {
28414
- "click": this.submit
28415
- }
28416
- }, [this.submitText]), reject && this.rejectText != '' && h("el-button", {
28417
- "attrs": {
28418
- "loading": this.loading,
28419
- "type": "danger"
28420
- },
28421
- "on": {
28422
- "click": this.reject
28423
- }
28424
- }, [this.rejectText]), cancel && this.cancelText != '' && h("el-button", {
28425
- "attrs": {
28426
- "disabled": this.loading
28427
- },
28428
- "on": {
28429
- "click": this.cancel
28430
- }
28431
- }, [this.cancelText])])])])])]);
28432
- }
28433
- });
28434
-
28435
- /***/ }),
28436
-
28437
27288
  /***/ "3cf2":
28438
27289
  /***/ (function(module, exports) {
28439
27290
 
@@ -37348,11 +36199,6 @@ var map = {
37348
36199
  "./Aeditor/Ueditor/index.js": "2938",
37349
36200
  "./Aempty/index.js": "bd5e",
37350
36201
  "./Aenume/index.js": "6cc8",
37351
- "./Aform copy/AfEditor/index.js": "3cef",
37352
- "./Aform copy/AfSearch/index.js": "230c",
37353
- "./Aform copy/BfSearch/index.js": "c0f0",
37354
- "./Aform copy/CfSearch/index.js": "a237",
37355
- "./Aform copy/index.js": "0d0c",
37356
36202
  "./Aform/AfEditor/index.js": "b550",
37357
36203
  "./Aform/AfSearch/index.js": "1b78",
37358
36204
  "./Aform/BfEditor/index.js": "4248",
@@ -37386,6 +36232,7 @@ var map = {
37386
36232
  "./Bcard/index.js": "4df8",
37387
36233
  "./BformItem/index.js": "5c61",
37388
36234
  "./Bmap/index.js": "e579",
36235
+ "./Bpages/index.js": "7c09",
37389
36236
  "./Btable/index.js": "98ee",
37390
36237
  "./CformItem/index.js": "5a83",
37391
36238
  "./Ctable/index.js": "78ab"
@@ -48028,13 +46875,6 @@ webpackContext.id = "6dd9";
48028
46875
 
48029
46876
  /***/ }),
48030
46877
 
48031
- /***/ "6e39":
48032
- /***/ (function(module, exports, __webpack_require__) {
48033
-
48034
- // extracted by mini-css-extract-plugin
48035
-
48036
- /***/ }),
48037
-
48038
46878
  /***/ "6e8c":
48039
46879
  /***/ (function(module, exports, __webpack_require__) {
48040
46880
 
@@ -53612,6 +52452,109 @@ module.exports = function (bitmap, value) {
53612
52452
  };
53613
52453
 
53614
52454
 
52455
+ /***/ }),
52456
+
52457
+ /***/ "7c09":
52458
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
52459
+
52460
+ "use strict";
52461
+ __webpack_require__.r(__webpack_exports__);
52462
+ /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2769");
52463
+ /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_0__);
52464
+
52465
+ /* harmony default export */ __webpack_exports__["default"] = ({
52466
+ name: 'Bpages',
52467
+ props: {
52468
+ small: {
52469
+ type: Boolean,
52470
+ default: () => false
52471
+ },
52472
+ page: {
52473
+ type: Number,
52474
+ default: () => 1
52475
+ },
52476
+ size: {
52477
+ type: Number,
52478
+ default: () => 10
52479
+ },
52480
+ pageSizes: {
52481
+ type: Array,
52482
+ default: () => [10, 20, 50, 100]
52483
+ },
52484
+ total: {
52485
+ type: Number,
52486
+ default: () => 0
52487
+ },
52488
+ prevText: {
52489
+ type: String,
52490
+ default: () => '上页'
52491
+ },
52492
+ nextText: {
52493
+ type: String,
52494
+ default: () => '下页'
52495
+ },
52496
+ complete: {
52497
+ type: Boolean,
52498
+ default: () => true
52499
+ },
52500
+ background: {
52501
+ type: Boolean,
52502
+ default: () => true
52503
+ }
52504
+ },
52505
+ data() {
52506
+ return {
52507
+ pages: {
52508
+ page: this.page,
52509
+ size: this.size
52510
+ }
52511
+ };
52512
+ },
52513
+ watch: {
52514
+ page(page) {
52515
+ this.pages.page = page;
52516
+ },
52517
+ size(size) {
52518
+ this.pages.size = size;
52519
+ }
52520
+ },
52521
+ methods: {
52522
+ currentChange(page) {
52523
+ this.pages.page = page;
52524
+ this.$emit('changePage', this.pages);
52525
+ },
52526
+ sizeChange(size) {
52527
+ this.pages.size = size;
52528
+ this.$emit('changeSize', this.pages);
52529
+ }
52530
+ },
52531
+ render() {
52532
+ const h = arguments[0];
52533
+ return h("div", {
52534
+ "class": "b-pages"
52535
+ }, [h("el-pagination", {
52536
+ "attrs": {
52537
+ "small": this.small,
52538
+ "current-page": this.pages.page,
52539
+ "page-size": this.pages.size,
52540
+ "page-sizes": this.pageSizes,
52541
+ "layout": this.complete ? 'total, sizes, prev, pager, next, jumper' : 'prev, pager, next',
52542
+ "total": this.total,
52543
+ "prev-text": this.prevText,
52544
+ "next-text": this.nextText,
52545
+ "background": this.background
52546
+ },
52547
+ "on": {
52548
+ "current-change": this.currentChange,
52549
+ "size-change": this.sizeChange
52550
+ },
52551
+ "props": {
52552
+ ...this._props
52553
+ }
52554
+ })]);
52555
+ }
52556
+ });
52557
+
53615
52558
  /***/ }),
53616
52559
 
53617
52560
  /***/ "7c85":
@@ -61675,13 +60618,6 @@ __webpack_require__.r(__webpack_exports__);
61675
60618
 
61676
60619
  /***/ }),
61677
60620
 
61678
- /***/ "9203":
61679
- /***/ (function(module, exports, __webpack_require__) {
61680
-
61681
- // extracted by mini-css-extract-plugin
61682
-
61683
- /***/ }),
61684
-
61685
60621
  /***/ "9211":
61686
60622
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
61687
60623
 
@@ -66175,13 +65111,6 @@ module.exports = _default;
66175
65111
 
66176
65112
  /***/ }),
66177
65113
 
66178
- /***/ "9e53":
66179
- /***/ (function(module, exports, __webpack_require__) {
66180
-
66181
- // extracted by mini-css-extract-plugin
66182
-
66183
- /***/ }),
66184
-
66185
65114
  /***/ "9e96":
66186
65115
  /***/ (function(module, exports, __webpack_require__) {
66187
65116
 
@@ -67970,345 +66899,6 @@ __webpack_require__("dff3");
67970
66899
 
67971
66900
  /***/ }),
67972
66901
 
67973
- /***/ "a237":
67974
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
67975
-
67976
- "use strict";
67977
- __webpack_require__.r(__webpack_exports__);
67978
- /* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
67979
- /* 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__);
67980
- /* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2234");
67981
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("af1c");
67982
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_2__);
67983
-
67984
-
67985
-
67986
- /* harmony default export */ __webpack_exports__["default"] = ({
67987
- name: 'CfSearch',
67988
- components: {
67989
- AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"]
67990
- },
67991
- props: {
67992
- value: {
67993
- type: Object,
67994
- default: () => ({})
67995
- },
67996
- margin: {
67997
- type: String,
67998
- default: () => '0'
67999
- },
68000
- size: {
68001
- type: String,
68002
- default: () => 'small'
68003
- },
68004
- inline: {
68005
- type: Boolean,
68006
- default: () => true
68007
- },
68008
- cols: {
68009
- type: String,
68010
- default: () => '6'
68011
- },
68012
- gutter: {
68013
- type: String,
68014
- default: () => '10'
68015
- },
68016
- labelWidth: {
68017
- type: String,
68018
- default: () => 'auto'
68019
- },
68020
- labelPosition: {
68021
- type: String,
68022
- default: () => 'top'
68023
- },
68024
- config: {
68025
- type: Object,
68026
- default: () => ({})
68027
- },
68028
- values: {
68029
- type: Object,
68030
- default: () => ({})
68031
- },
68032
- label: {
68033
- type: Boolean,
68034
- default: () => true
68035
- },
68036
- check: {
68037
- type: Boolean,
68038
- default: () => false
68039
- },
68040
- loading: {
68041
- type: Boolean,
68042
- default: () => false
68043
- },
68044
- submitText: {
68045
- type: String,
68046
- default: () => '搜索'
68047
- },
68048
- cancelText: {
68049
- type: String,
68050
- default: () => '重置'
68051
- }
68052
- },
68053
- data() {
68054
- return {
68055
- form: this.value
68056
- };
68057
- },
68058
- created() {
68059
- this.create();
68060
- },
68061
- mounted() {},
68062
- destroyed() {
68063
- this.create = null;
68064
- this.submit = null;
68065
- this.cancel = null;
68066
- this.filter = null;
68067
- this.result = null;
68068
- this.prompt = null;
68069
- this.format = null;
68070
- },
68071
- watch: {
68072
- values() {
68073
- this.create();
68074
- }
68075
- },
68076
- methods: {
68077
- create() {
68078
- // 创建表单
68079
- if (this.config && Object.keys(this.config).length > 0) {
68080
- // 格式化表单配置对象(this.config)为数据双向绑定对象
68081
- let data = {};
68082
- Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
68083
- let {
68084
- ...r
68085
- } = this.config[a];
68086
- if (!r.render) {
68087
- let range = r.range || r.scope || r.both || r.than || null;
68088
- if (range) {
68089
- data[`${a}LE`] = '';
68090
- data[`${a}GE`] = '';
68091
- } else {
68092
- data[a] = r.default ? r.default : '';
68093
- }
68094
- }
68095
- });
68096
- this.form = data;
68097
- }
68098
- },
68099
- submit(e) {
68100
- // 提交表单
68101
- e && e.preventDefault();
68102
- let pass = !this.check; // 判断是否是空表单
68103
- for (let a in this.form) if (this.form[a] != '') pass = true;
68104
- if (pass) {
68105
- let result = this.filter();
68106
- const {
68107
- formParams,
68108
- pageParams
68109
- } = this.$store.state;
68110
- this.$store.commit('setFormParams', result); // 添加查询参数
68111
- this.$store.commit('setPageParams', {
68112
- ...pageParams,
68113
- page: 1
68114
- }); // 重置分页参数
68115
- this.$nextTick(() => {
68116
- let change = false;
68117
- Object.keys(result).forEach(a => result[a] != formParams[a] && (change = true));
68118
- if (change) this.$emit('submit', {
68119
- ...result,
68120
- ...pageParams,
68121
- page: 1
68122
- }); // 派发事件并重置当前分页
68123
- return result;
68124
- });
68125
- }
68126
- },
68127
- cancel(e) {
68128
- // 重置表单
68129
- e && e.preventDefault();
68130
- let pass = !this.check; // 判断是否是空表单
68131
- for (let a in this.form) if (this.form[a] != '') pass = true;
68132
- if (pass) {
68133
- const {
68134
- pageParams
68135
- } = this.$store.state;
68136
- this.$store.commit('setPageParams', {
68137
- ...pageParams,
68138
- page: 1,
68139
- size: 10
68140
- }); // 重置分页参数
68141
- this.$store.commit('setFormParams', {}); // 重置查询参数
68142
- this.$nextTick(() => {
68143
- for (let a in this.form) this.form[a] = '';
68144
- this.$nextTick(() => this.$emit('cancel', this.form));
68145
- });
68146
- }
68147
- },
68148
- filter() {
68149
- let data = {};
68150
- Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
68151
- let {
68152
- like = null,
68153
- ...r
68154
- } = this.config[a];
68155
- let range = r.range || r.scope || r.both || r.than || null;
68156
- if (range) {
68157
- this.form[`${a}LE`] != '' && (data[`${a}LE`] = this.form[`${a}LE`]);
68158
- this.form[`${a}GE`] != '' && (data[`${a}GE`] = this.form[`${a}GE`]);
68159
- } else {
68160
- let value = this.form[a];
68161
- if (value) {
68162
- if (r.split && typeof r.split == 'object' && r.split.length > 0) {
68163
- r.split.forEach((c, d) => data[c] = value != '' && typeof value == 'object' && value.length > 0 ? value[d] : value);
68164
- } else {
68165
- if (like) {
68166
- if (like == 'left' || like && like == 'l') data[a] = '%' + value;
68167
- if (like == 'right' || like && like == 'r') data[a] = value + '%';else data[a] = '%' + value + '%';
68168
- } else {
68169
- if (value.includes(' 00:00:00')) {
68170
- data[a] = '%' + value.split(' 00:00:00')[0] + '%';
68171
- } else {
68172
- data[a] = value;
68173
- }
68174
- }
68175
- }
68176
- }
68177
- }
68178
- });
68179
- let form = {};
68180
- Object.keys(data).length > 0 && Object.keys(data).forEach(a => {
68181
- if (data[a] != '%' && data[a] != '%%' && data[a] != 'null' && data[a] != 'undefined' && data[a] != null && data[a] != undefined) {
68182
- form[a] = data[a];
68183
- }
68184
- });
68185
- return form;
68186
- },
68187
- result() {
68188
- // 返回验证后的表单数据
68189
- return this.filter(this.form);
68190
- },
68191
- format(a = '', field = '', placeholder = '') {
68192
- const h = this.$createElement;
68193
- let {
68194
- ...r
68195
- } = this.config[a];
68196
- let config = {
68197
- size: r.size ? r.size : this.size,
68198
- field: field != '' ? field : a,
68199
- change: () => this.change(),
68200
- disabled: this.loading,
68201
- form: this.form,
68202
- ...r
68203
- };
68204
- return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
68205
- "attrs": {
68206
- "config": placeholder != '' ? {
68207
- ...config,
68208
- placeholder
68209
- } : config
68210
- }
68211
- });
68212
- },
68213
- change() {
68214
- this.$emit('input', this.filter());
68215
- this.$emit('change', this.filter());
68216
- }
68217
- },
68218
- render() {
68219
- const h = arguments[0];
68220
- const {
68221
- ...props
68222
- } = this.$attrs;
68223
- const {
68224
- submit = null,
68225
- cancel = null
68226
- } = this.$listeners;
68227
- let style = this.cols != '' ? {
68228
- width: `${100 / this.cols}%`
68229
- } : {};
68230
- return h("div", {
68231
- "class": "c-f-search",
68232
- "style": {
68233
- padding: this.margin
68234
- }
68235
- }, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
68236
- "ref": "form",
68237
- "attrs": {
68238
- "size": this.size
68239
- }
68240
- }, {
68241
- "props": {
68242
- model: this.form,
68243
- ...props
68244
- }
68245
- }, {
68246
- "attrs": {
68247
- "labelWidth": this.labelWidth,
68248
- "labelPosition": this.labelPosition
68249
- }
68250
- }]), [h("el-row", {
68251
- "attrs": {
68252
- "gutter": Number(this.gutter)
68253
- }
68254
- }, [Object.keys(this.config).map((a, b) => {
68255
- let {
68256
- ...r
68257
- } = this.config[a];
68258
- let range = r.than || r.both || r.range || r.scope;
68259
- let label = this.label ? r.text || r.label || r.title : '';
68260
- let prefixPlaceholder = r.placeholder && r.placeholder.length > 0 ? r.placeholder[0] : '最高';
68261
- let suffixPlaceholder = r.placeholder && r.placeholder.length > 1 ? r.placeholder[1] : '最低';
68262
- return h("el-col", {
68263
- "key": b,
68264
- "class": "column",
68265
- "style": style
68266
- }, [h("el-form-item", {
68267
- "attrs": {
68268
- "prop": a,
68269
- "label": label
68270
- }
68271
- }, [range ? h("el-col", {
68272
- "class": "range-cols"
68273
- }, [h("el-col", {
68274
- "attrs": {
68275
- "span": 12
68276
- }
68277
- }, [this.format(a, `${a}LE`, prefixPlaceholder)]), h("el-col", {
68278
- "attrs": {
68279
- "span": 12
68280
- }
68281
- }, [this.format(a, `${a}GE`, suffixPlaceholder)])]) : this.format(a)])]);
68282
- }), this.$slots.default, (submit || cancel) && h("el-col", {
68283
- "key": "action",
68284
- "class": "action",
68285
- "style": style
68286
- }, [h("el-form-item", {
68287
- "attrs": {
68288
- "label": this.label ? 'action' : ''
68289
- }
68290
- }, [submit && h("el-button", {
68291
- "attrs": {
68292
- "disabled": this.loading,
68293
- "type": "primary"
68294
- },
68295
- "on": {
68296
- "click": this.submit
68297
- }
68298
- }, [this.submitText]), cancel && h("el-button", {
68299
- "attrs": {
68300
- "disabled": this.loading,
68301
- "type": "default"
68302
- },
68303
- "on": {
68304
- "click": this.cancel
68305
- }
68306
- }, [this.cancelText])])])])])]);
68307
- }
68308
- });
68309
-
68310
- /***/ }),
68311
-
68312
66902
  /***/ "a23d":
68313
66903
  /***/ (function(module, exports, __webpack_require__) {
68314
66904
 
@@ -132544,13 +131134,6 @@ exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
132544
131134
  };
132545
131135
 
132546
131136
 
132547
- /***/ }),
132548
-
132549
- /***/ "af1c":
132550
- /***/ (function(module, exports, __webpack_require__) {
132551
-
132552
- // extracted by mini-css-extract-plugin
132553
-
132554
131137
  /***/ }),
132555
131138
 
132556
131139
  /***/ "af54":
@@ -133754,6 +132337,10 @@ __webpack_require__.r(__webpack_exports__);
133754
132337
  type: Object,
133755
132338
  default: () => ({})
133756
132339
  },
132340
+ must: {
132341
+ type: Boolean,
132342
+ default: () => false
132343
+ },
133757
132344
  inline: {
133758
132345
  type: Boolean,
133759
132346
  default: () => false
@@ -133773,14 +132360,16 @@ __webpack_require__.r(__webpack_exports__);
133773
132360
  global: {
133774
132361
  type: Boolean,
133775
132362
  default: () => false
132363
+ },
132364
+ disabled: {
132365
+ type: Boolean,
132366
+ default: () => false
133776
132367
  }
133777
132368
  },
133778
132369
  data() {
133779
132370
  return {
133780
132371
  form: this.value,
133781
- option: {},
133782
- opened: false,
133783
- height: 'auto'
132372
+ option: {}
133784
132373
  };
133785
132374
  },
133786
132375
  watch: {
@@ -133791,9 +132380,7 @@ __webpack_require__.r(__webpack_exports__);
133791
132380
  created() {
133792
132381
  this.relate(this.config);
133793
132382
  },
133794
- mounted() {
133795
- this.resize();
133796
- },
132383
+ mounted() {},
133797
132384
  methods: {
133798
132385
  input() {
133799
132386
  this.$emit('input', this.filter());
@@ -133813,6 +132400,9 @@ __webpack_require__.r(__webpack_exports__);
133813
132400
  r.default && (this.form[a] = r.default || '');
133814
132401
  }
133815
132402
  });
132403
+ this.$nextTick(() => {
132404
+ Object.keys(this.value).forEach(a => typeof this.value[a] == 'number' && (this.form[a] = `${this.value[a]}`));
132405
+ });
133816
132406
  },
133817
132407
  create(a, b) {
133818
132408
  const h = this.$createElement;
@@ -133821,22 +132411,27 @@ __webpack_require__.r(__webpack_exports__);
133821
132411
  } = this.config[a];
133822
132412
  let label = r.text || r.label || r.title || '';
133823
132413
  let width = r.width ? r.width : `${100 / this.cols}%`;
133824
- let style = this.cols != '' ? {
133825
- width
133826
- } : {};
132414
+ let judge = [{
132415
+ required: true,
132416
+ message: `${label}不能为空`
132417
+ }];
132418
+ let valid = r.rule ? r.rule : r.must || this.must ? judge : [];
132419
+ let rules = this.disabled || r.disabled ? [] : (r.must || this.must) && r.rule ? [...judge, ...r.rule] : valid;
133827
132420
  let props = {
133828
132421
  name: a,
133829
132422
  prop: a,
133830
132423
  label,
132424
+ rules,
132425
+ disabled: r.disabled || this.disabled,
133831
132426
  ...r
133832
132427
  };
133833
132428
  if (this.inline) {
133834
- let styles = {
132429
+ let style = {
133835
132430
  padding: `0 ${this.gutter / 2}px`,
133836
- ...style
132431
+ width
133837
132432
  };
133838
132433
  return h("el-form-item", {
133839
- "style": styles,
132434
+ "style": style,
133840
132435
  "props": {
133841
132436
  ...props
133842
132437
  }
@@ -133856,7 +132451,9 @@ __webpack_require__.r(__webpack_exports__);
133856
132451
  } else {
133857
132452
  return h("el-col", {
133858
132453
  "key": b,
133859
- "style": style
132454
+ "style": {
132455
+ width
132456
+ }
133860
132457
  }, [h("el-form-item", {
133861
132458
  "props": {
133862
132459
  ...props
@@ -133870,10 +132467,6 @@ __webpack_require__.r(__webpack_exports__);
133870
132467
  this.option[b] = a;
133871
132468
  let child = a.children || a.child || a.node || null;
133872
132469
  if (child && Object.keys(child).length > 0) {
133873
- let width = a.width ? a.width : `${100 / Object.keys(child).length}%`;
133874
- let style = this.cols != '' ? {
133875
- width
133876
- } : {};
133877
132470
  return Object.keys(child).map((c, d) => {
133878
132471
  let {
133879
132472
  ...r
@@ -133886,9 +132479,12 @@ __webpack_require__.r(__webpack_exports__);
133886
132479
  }
133887
132480
  }, [this.format(r, c)]);
133888
132481
  } else {
132482
+ let width = r.width ? r.width : `${100 / Object.keys(child).length}%`;
133889
132483
  return h("el-col", {
133890
132484
  "key": d,
133891
- "style": style
132485
+ "style": {
132486
+ width
132487
+ }
133892
132488
  }, [this.format(r, c)]);
133893
132489
  }
133894
132490
  });
@@ -133909,12 +132505,6 @@ __webpack_require__.r(__webpack_exports__);
133909
132505
  });
133910
132506
  }
133911
132507
  },
133912
- resize() {
133913
- if (Object.keys(this.config).length > 0) {
133914
- let rows = Math.ceil(Object.keys(this.config).length / this.cols);
133915
- this.height = this.$el.clientHeight * (rows - 1);
133916
- }
133917
- },
133918
132508
  filter() {
133919
132509
  let data = {};
133920
132510
  Object.keys(this.form).length > 0 && Object.keys(this.form).forEach(a => {
@@ -133924,13 +132514,7 @@ __webpack_require__.r(__webpack_exports__);
133924
132514
  } = this.option[a];
133925
132515
  if (r.split && r.split.length > 0) {
133926
132516
  r.split.forEach((b, c) => data[b] = this.form[a][c]);
133927
- } else {
133928
- if (r.like) {
133929
- if (r.like == 'L' || r.like == 'l' || r.like == 'left') data[a] = `%${this.form[a]}`;
133930
- if (r.like == 'R' || r.like == 'r' || r.like == 'right') data[a] = `${this.form[a]}%`;
133931
- 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]}%`;
133932
- } else data[a] = this.form[a];
133933
- }
132517
+ } else data[a] = this.form[a];
133934
132518
  }
133935
132519
  });
133936
132520
  return data;
@@ -133974,9 +132558,8 @@ __webpack_require__.r(__webpack_exports__);
133974
132558
  render() {
133975
132559
  const h = arguments[0];
133976
132560
  let {
133977
- padding = '0',
133978
132561
  margin = '0',
133979
- ref = 'form',
132562
+ padding = '0',
133980
132563
  size = 'small',
133981
132564
  loading = false,
133982
132565
  labelWidth = 'auto',
@@ -133986,17 +132569,25 @@ __webpack_require__.r(__webpack_exports__);
133986
132569
  rejectText = '驳回',
133987
132570
  cancelText = '重置',
133988
132571
  action = [],
133989
- ...props
132572
+ ...rest
133990
132573
  } = this.$attrs;
132574
+ let style = this.inline ? {
132575
+ margin: `0 -${this.gutter / 2}px`
132576
+ } : {};
133991
132577
  let {
133992
132578
  finish = null,
133993
132579
  submit = null,
133994
132580
  reject = null,
133995
132581
  cancel = null
133996
132582
  } = this.$listeners;
133997
- let style = this.inline ? {
133998
- margin: `0 -${this.gutter / 2}px`
133999
- } : {};
132583
+ let props = {
132584
+ size,
132585
+ inline: this.inline,
132586
+ labelWidth,
132587
+ labelPosition,
132588
+ style,
132589
+ ...rest
132590
+ };
134000
132591
  return h("div", {
134001
132592
  "class": "a-form",
134002
132593
  "style": {
@@ -134004,14 +132595,7 @@ __webpack_require__.r(__webpack_exports__);
134004
132595
  padding
134005
132596
  }
134006
132597
  }, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
134007
- "ref": ref,
134008
- "attrs": {
134009
- "size": size,
134010
- "inline": this.inline,
134011
- "label-width": labelWidth,
134012
- "label-position": labelPosition
134013
- },
134014
- "style": style
132598
+ "ref": "form"
134015
132599
  }, {
134016
132600
  "props": {
134017
132601
  model: this.form,
@@ -134033,18 +132617,7 @@ __webpack_require__.r(__webpack_exports__);
134033
132617
  "style": {
134034
132618
  paddingLeft: `${this.gutter}px`
134035
132619
  }
134036
- }, [Object.keys(this.config).length > this.cols && !this.inline && h("el-button", {
134037
- "attrs": {
134038
- "disabled": loading,
134039
- "type": "text"
134040
- },
134041
- "class": "collapse-button",
134042
- "on": {
134043
- "click": () => this.opened = !this.opened
134044
- }
134045
- }, [h("i", {
134046
- "class": `el-icon-arrow-${this.opened ? 'up' : 'down'}`
134047
- }), this.opened ? '收起' : '展开']), finish && h("el-button", {
132620
+ }, [finish && h("el-button", {
134048
132621
  "attrs": {
134049
132622
  "disabled": loading,
134050
132623
  "type": "success"
@@ -134076,7 +132649,7 @@ __webpack_require__.r(__webpack_exports__);
134076
132649
  "on": {
134077
132650
  "click": this.cancel
134078
132651
  }
134079
- }, [cancelText]), action.forEach((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
132652
+ }, [cancelText]), action.map((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
134080
132653
  "key": b,
134081
132654
  "attrs": {
134082
132655
  "disabled": loading
@@ -135856,6 +134429,10 @@ __webpack_require__.r(__webpack_exports__);
135856
134429
  global: {
135857
134430
  type: Boolean,
135858
134431
  default: () => false
134432
+ },
134433
+ disabled: {
134434
+ type: Boolean,
134435
+ default: () => false
135859
134436
  }
135860
134437
  },
135861
134438
  data() {
@@ -135905,29 +134482,27 @@ __webpack_require__.r(__webpack_exports__);
135905
134482
  } = this.config[a];
135906
134483
  let label = r.text || r.label || r.title || '';
135907
134484
  let width = r.width ? r.width : `${100 / this.cols}%`;
135908
- let style = this.cols != '' ? {
135909
- width
135910
- } : {};
135911
- let valid = r.rule ? r.rule : r.must || this.must ? [{
134485
+ let judge = [{
135912
134486
  required: true,
135913
- trigger: 'blur',
135914
134487
  message: `${label}不能为空`
135915
- }] : [];
135916
- let rules = this.disabled || r.disabled ? [] : r['must'] && r['rule'] ? [...valid, ...r.rule] : valid;
134488
+ }];
134489
+ let valid = r.rule ? r.rule : r.must || this.must ? judge : [];
134490
+ let rules = this.disabled || r.disabled ? [] : (r.must || this.must) && r.rule ? [...judge, ...r.rule] : valid;
135917
134491
  let props = {
135918
134492
  name: a,
135919
134493
  prop: a,
135920
134494
  label,
135921
134495
  rules,
134496
+ disabled: r.disabled || this.disabled,
135922
134497
  ...r
135923
134498
  };
135924
134499
  if (this.inline) {
135925
- let styles = {
134500
+ let style = {
135926
134501
  padding: `0 ${this.gutter / 2}px`,
135927
- ...style
134502
+ width
135928
134503
  };
135929
134504
  return h("el-form-item", {
135930
- "style": styles,
134505
+ "style": style,
135931
134506
  "props": {
135932
134507
  ...props
135933
134508
  }
@@ -135947,7 +134522,9 @@ __webpack_require__.r(__webpack_exports__);
135947
134522
  } else {
135948
134523
  return h("el-col", {
135949
134524
  "key": b,
135950
- "style": style
134525
+ "style": {
134526
+ width
134527
+ }
135951
134528
  }, [h("el-form-item", {
135952
134529
  "props": {
135953
134530
  ...props
@@ -135961,10 +134538,6 @@ __webpack_require__.r(__webpack_exports__);
135961
134538
  this.option[b] = a;
135962
134539
  let child = a.children || a.child || a.node || null;
135963
134540
  if (child && Object.keys(child).length > 0) {
135964
- let width = a.width ? a.width : `${100 / Object.keys(child).length}%`;
135965
- let style = this.cols != '' ? {
135966
- width
135967
- } : {};
135968
134541
  return Object.keys(child).map((c, d) => {
135969
134542
  let {
135970
134543
  ...r
@@ -135977,9 +134550,12 @@ __webpack_require__.r(__webpack_exports__);
135977
134550
  }
135978
134551
  }, [this.format(r, c)]);
135979
134552
  } else {
134553
+ let width = r.width ? r.width : `${100 / Object.keys(child).length}%`;
135980
134554
  return h("el-col", {
135981
134555
  "key": d,
135982
- "style": style
134556
+ "style": {
134557
+ width
134558
+ }
135983
134559
  }, [this.format(r, c)]);
135984
134560
  }
135985
134561
  });
@@ -136053,8 +134629,8 @@ __webpack_require__.r(__webpack_exports__);
136053
134629
  render() {
136054
134630
  const h = arguments[0];
136055
134631
  let {
136056
- padding = '0',
136057
134632
  margin = '0',
134633
+ padding = '0',
136058
134634
  size = 'small',
136059
134635
  loading = false,
136060
134636
  labelWidth = 'auto',
@@ -136064,24 +134640,24 @@ __webpack_require__.r(__webpack_exports__);
136064
134640
  rejectText = '驳回',
136065
134641
  cancelText = '取消',
136066
134642
  action = [],
136067
- ...r
134643
+ ...rest
136068
134644
  } = this.$attrs;
134645
+ let style = this.inline ? {
134646
+ margin: `0 -${this.gutter / 2}px`
134647
+ } : {};
136069
134648
  let {
136070
134649
  finish = null,
136071
134650
  submit = null,
136072
134651
  reject = null,
136073
134652
  cancel = null
136074
134653
  } = this.$listeners;
136075
- let style = this.inline ? {
136076
- margin: `0 -${this.gutter / 2}px`
136077
- } : {};
136078
134654
  let props = {
136079
134655
  size,
136080
134656
  inline: this.inline,
136081
134657
  labelWidth,
136082
134658
  labelPosition,
136083
134659
  style,
136084
- ...r
134660
+ ...rest
136085
134661
  };
136086
134662
  return h("div", {
136087
134663
  "class": "a-f-editor",
@@ -136139,7 +134715,7 @@ __webpack_require__.r(__webpack_exports__);
136139
134715
  "on": {
136140
134716
  "click": this.cancel
136141
134717
  }
136142
- }, [cancelText]), action.forEach((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
134718
+ }, [cancelText]), action.map((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
136143
134719
  "key": b,
136144
134720
  "attrs": {
136145
134721
  "disabled": loading
@@ -138246,6 +136822,7 @@ __webpack_require__.r(__webpack_exports__);
138246
136822
 
138247
136823
 
138248
136824
 
136825
+
138249
136826
  /* harmony default export */ __webpack_exports__["default"] = ({
138250
136827
  name: 'Atable',
138251
136828
  components: {
@@ -138347,10 +136924,6 @@ __webpack_require__.r(__webpack_exports__);
138347
136924
  type: Boolean,
138348
136925
  default: () => false
138349
136926
  },
138350
- sumText: {
138351
- type: String,
138352
- default: () => '合计'
138353
- },
138354
136927
  sortable: {
138355
136928
  type: Boolean,
138356
136929
  default: () => false
@@ -138382,16 +136955,8 @@ __webpack_require__.r(__webpack_exports__);
138382
136955
  default: () => false
138383
136956
  },
138384
136957
  action: {
138385
- type: Object,
138386
- default: () => ({
138387
- review: null,
138388
- modify: null,
138389
- update: null,
138390
- handle: null,
138391
- remove: null,
138392
- delete: null,
138393
- export: null
138394
- })
136958
+ type: Array,
136959
+ default: () => []
138395
136960
  },
138396
136961
  actionWidth: {
138397
136962
  type: String,
@@ -138416,15 +136981,6 @@ __webpack_require__.r(__webpack_exports__);
138416
136981
  beforeDestroy() {
138417
136982
  this.$refs['a-table'].bodyWrapper.removeEventListener('wheel', this.scroll);
138418
136983
  },
138419
- destroyed() {
138420
- this.create = null;
138421
- this.search = null;
138422
- this.select = null;
138423
- this.choose = null;
138424
- this.change = null;
138425
- this.format = null;
138426
- this.scroll = null;
138427
- },
138428
136984
  methods: {
138429
136985
  create() {
138430
136986
  let column = [...this.column, this.suffix()];
@@ -138475,7 +137031,14 @@ __webpack_require__.r(__webpack_exports__);
138475
137031
  },
138476
137032
  suffix() {
138477
137033
  const h = this.$createElement;
138478
- 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) {
137034
+ const {
137035
+ review,
137036
+ modify,
137037
+ update,
137038
+ handle,
137039
+ remove
137040
+ } = this.$listeners;
137041
+ if (review || modify || update || handle || remove || this.$listeners.delete || this.$listeners.export) {
138479
137042
  return {
138480
137043
  fixed: 'right',
138481
137044
  align: 'center',
@@ -138483,62 +137046,29 @@ __webpack_require__.r(__webpack_exports__);
138483
137046
  label: this.actionTitle,
138484
137047
  formatter: item => h("div", {
138485
137048
  "class": "action"
138486
- }, [this.action.review && h("i", {
138487
- "class": "el-icon-view",
138488
- "on": {
138489
- "click": () => this.action.review(item)
138490
- }
138491
- }), this.action.modify && h("i", {
138492
- "class": "el-icon-edit",
138493
- "on": {
138494
- "click": () => this.action.modify(item)
138495
- }
138496
- }), this.action.update && h("i", {
138497
- "class": "el-icon-edit",
138498
- "on": {
138499
- "click": () => this.action.update(item)
138500
- }
138501
- }), this.action.handle && h("i", {
138502
- "class": "el-icon-edit",
138503
- "on": {
138504
- "click": () => this.action.handle(item)
138505
- }
138506
- }), this.action.remove && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
138507
- "on": {
138508
- "submit": () => this.action.remove(item)
138509
- }
138510
- }), this.action.delete && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
138511
- "on": {
138512
- "submit": () => this.action.delete(item)
138513
- }
138514
- }), this.action.export && h("i", {
138515
- "class": "el-icon-download",
138516
- "on": {
138517
- "click": () => this.action.export(item)
138518
- }
138519
- }), this.$listeners.review && h("i", {
137049
+ }, [review && h("i", {
138520
137050
  "class": "el-icon-view",
138521
137051
  "on": {
138522
- "click": () => this.$listeners.review(item)
137052
+ "click": () => review(item)
138523
137053
  }
138524
- }), this.$listeners.modify && h("i", {
137054
+ }), modify && h("i", {
138525
137055
  "class": "el-icon-edit",
138526
137056
  "on": {
138527
- "click": () => this.$listeners.modify(item)
137057
+ "click": () => modify(item)
138528
137058
  }
138529
- }), this.$listeners.update && h("i", {
137059
+ }), update && h("i", {
138530
137060
  "class": "el-icon-edit",
138531
137061
  "on": {
138532
- "click": () => this.$listeners.update(item)
137062
+ "click": () => update(item)
138533
137063
  }
138534
- }), this.$listeners.handle && h("i", {
137064
+ }), handle && h("i", {
138535
137065
  "class": "el-icon-edit",
138536
137066
  "on": {
138537
- "click": () => this.$listeners.handle(item)
137067
+ "click": () => handle(item)
138538
137068
  }
138539
- }), this.$listeners.remove && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
137069
+ }), remove && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
138540
137070
  "on": {
138541
- "submit": () => this.$listeners.remove(item)
137071
+ "submit": () => remove(item)
138542
137072
  }
138543
137073
  }), this.$listeners.delete && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
138544
137074
  "on": {
@@ -138549,7 +137079,12 @@ __webpack_require__.r(__webpack_exports__);
138549
137079
  "on": {
138550
137080
  "click": () => this.$listeners.export(item)
138551
137081
  }
138552
- })])
137082
+ }), this.action.map((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
137083
+ "key": b,
137084
+ "on": {
137085
+ "click": e => a.click && a.click(item, e)
137086
+ }
137087
+ }, a]), [a.label || a.title || a.text]))])
138553
137088
  };
138554
137089
  }
138555
137090
  },
@@ -138675,10 +137210,6 @@ __webpack_require__.r(__webpack_exports__);
138675
137210
  const {
138676
137211
  pageParams = {}
138677
137212
  } = this.$store.state;
138678
- const {
138679
- loading = false
138680
- } = this;
138681
- const condition = data.length > 0;
138682
137213
  return h("div", {
138683
137214
  "class": this.border ? 'a-table' : 'a-table border'
138684
137215
  }, [h("el-table", {
@@ -138690,20 +137221,20 @@ __webpack_require__.r(__webpack_exports__);
138690
137221
  "stripe": this.stripe,
138691
137222
  "row-key": this.rowKey,
138692
137223
  "max-height": this.maxHeight,
138693
- "element-loading-text": this.elementLoadingText,
138694
- "element-loading-spinner": this.elementLoadingSpinner,
138695
- "element-loading-background": this.elementLoadingBackground,
138696
137224
  "show-header": this.showHeader,
138697
137225
  "default-sort": this.defaultSort,
138698
137226
  "show-summary": this.showSummary,
138699
137227
  "tooltip-effect": this.tooltipEffect,
138700
137228
  "default-expand-all": this.defaultExpandAll,
138701
137229
  "tree-props": this.tree ? this.treeProps : {},
138702
- "highlight-current-row": this.highlightCurrentRow
137230
+ "highlight-current-row": this.highlightCurrentRow,
137231
+ "element-loading-text": this.elementLoadingText,
137232
+ "element-loading-spinner": this.elementLoadingSpinner,
137233
+ "element-loading-background": this.elementLoadingBackground
138703
137234
  },
138704
137235
  "directives": [{
138705
137236
  name: "loading",
138706
- value: loading
137237
+ value: this.loading
138707
137238
  }],
138708
137239
  "on": {
138709
137240
  "row-click": this.choose,
@@ -138712,27 +137243,27 @@ __webpack_require__.r(__webpack_exports__);
138712
137243
  "props": {
138713
137244
  ...props
138714
137245
  }
138715
- }, [condition && (this.selection || this.$listeners.select) && h("el-table-column", {
137246
+ }, [(this.selection || this.$listeners.select) && h("el-table-column", {
138716
137247
  "attrs": {
138717
137248
  "fixed": "left",
138718
137249
  "type": "selection",
138719
137250
  "width": this.selectionWidth
138720
137251
  }
138721
- }), condition && this.sort && h("el-table-column", {
137252
+ }), this.sort && h("el-table-column", {
138722
137253
  "attrs": {
138723
137254
  "fixed": "left",
138724
137255
  "type": "index",
138725
137256
  "width": this.sortWidth,
138726
137257
  "label": this.sortTitle
138727
137258
  }
138728
- }), condition && this.create(), condition && this.$slots.default, h("div", {
137259
+ }), this.create(), this.$slots.default, h("div", {
138729
137260
  "slot": "empty",
138730
137261
  "class": "empty"
138731
- }, [!loading && h(_components_Aempty__WEBPACK_IMPORTED_MODULE_2__["default"], {
137262
+ }, [!this.loading && h(_components_Aempty__WEBPACK_IMPORTED_MODULE_2__["default"], {
138732
137263
  "attrs": {
138733
137264
  "description": this.emptyText
138734
137265
  }
138735
- })])]), !this.tree && this.page && condition && h(_components_Apages__WEBPACK_IMPORTED_MODULE_7__["default"], {
137266
+ })])]), !this.tree && this.page && data.length > 0 && h(_components_Apages__WEBPACK_IMPORTED_MODULE_7__["default"], {
138736
137267
  "attrs": {
138737
137268
  "total": Number(size),
138738
137269
  "pages": pageParams
@@ -141192,361 +139723,6 @@ const Aecharts = a => Promise.resolve(/* AMD require */).then(function() { var _
141192
139723
 
141193
139724
  /***/ }),
141194
139725
 
141195
- /***/ "c0f0":
141196
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
141197
-
141198
- "use strict";
141199
- __webpack_require__.r(__webpack_exports__);
141200
- /* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
141201
- /* 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__);
141202
- /* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2234");
141203
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("9e53");
141204
- /* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_2__);
141205
-
141206
-
141207
-
141208
- /* harmony default export */ __webpack_exports__["default"] = ({
141209
- name: 'BfSearch',
141210
- components: {
141211
- AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"]
141212
- },
141213
- props: {
141214
- value: {
141215
- type: Object,
141216
- default: () => ({})
141217
- },
141218
- margin: {
141219
- type: String,
141220
- default: () => '0'
141221
- },
141222
- size: {
141223
- type: String,
141224
- default: () => 'small'
141225
- },
141226
- inline: {
141227
- type: Boolean,
141228
- default: () => false
141229
- },
141230
- cols: {
141231
- type: String,
141232
- default: () => '6'
141233
- },
141234
- gutter: {
141235
- type: String,
141236
- default: () => '10'
141237
- },
141238
- labelWidth: {
141239
- type: String,
141240
- default: () => 'auto'
141241
- },
141242
- labelPosition: {
141243
- type: String,
141244
- default: () => 'top'
141245
- },
141246
- config: {
141247
- type: Object,
141248
- default: () => ({})
141249
- },
141250
- values: {
141251
- type: Object,
141252
- default: () => ({})
141253
- },
141254
- label: {
141255
- type: Boolean,
141256
- default: () => true
141257
- },
141258
- check: {
141259
- type: Boolean,
141260
- default: () => false
141261
- },
141262
- loading: {
141263
- type: Boolean,
141264
- default: () => false
141265
- },
141266
- submitText: {
141267
- type: String,
141268
- default: () => '搜索'
141269
- },
141270
- cancelText: {
141271
- type: String,
141272
- default: () => '重置'
141273
- }
141274
- },
141275
- data() {
141276
- return {
141277
- form: this.value,
141278
- height: 0,
141279
- opened: false
141280
- };
141281
- },
141282
- created() {
141283
- this.create();
141284
- },
141285
- mounted() {
141286
- this.update();
141287
- },
141288
- destroyed() {
141289
- this.create = null;
141290
- this.update = null;
141291
- this.submit = null;
141292
- this.cancel = null;
141293
- this.filter = null;
141294
- this.result = null;
141295
- this.switch = null;
141296
- this.format = null;
141297
- this.output = null;
141298
- },
141299
- watch: {
141300
- values() {
141301
- this.create();
141302
- }
141303
- },
141304
- methods: {
141305
- create() {
141306
- // 创建表单
141307
- if (this.config && Object.keys(this.config).length > 0) {
141308
- // 格式化表单配置对象(this.config)为数据双向绑定对象
141309
- let data = {};
141310
- Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
141311
- let {
141312
- ...r
141313
- } = this.config[a];
141314
- if (!r.render) {
141315
- let range = r.range || r.scope || r.both || r.than || null;
141316
- if (range) {
141317
- data[`${a}LE`] = '';
141318
- data[`${a}GE`] = '';
141319
- } else {
141320
- data[a] = r.default ? r.default : '';
141321
- }
141322
- }
141323
- });
141324
- this.form = data;
141325
- }
141326
- },
141327
- update() {
141328
- let rows = Math.ceil(Object.keys(this.config).length / this.cols);
141329
- this.height = this.$el.clientHeight * (rows - 1);
141330
- },
141331
- submit(e) {
141332
- // 提交表单
141333
- e && e.preventDefault();
141334
- let pass = !this.check; // 判断是否是空表单
141335
- for (let a in this.form) if (this.form[a] != '') pass = true;
141336
- if (pass) {
141337
- let result = this.filter();
141338
- this.$nextTick(() => {
141339
- this.$emit('submit', {
141340
- ...result,
141341
- page: 1
141342
- }); // 派发事件并重置当前分页
141343
- return result;
141344
- });
141345
- }
141346
- },
141347
- cancel(e) {
141348
- // 重置表单
141349
- e && e.preventDefault();
141350
- let pass = !this.check; // 判断是否是空表单
141351
- for (let a in this.form) if (this.form[a] != '') pass = true;
141352
- if (pass) {
141353
- this.$nextTick(() => {
141354
- for (let a in this.form) this.form[a] = '';
141355
- this.$nextTick(() => this.$emit('cancel', this.form));
141356
- });
141357
- }
141358
- },
141359
- filter() {
141360
- let data = {};
141361
- Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
141362
- let {
141363
- like = null,
141364
- ...r
141365
- } = this.config[a];
141366
- let range = r.range || r.scope || r.both || r.than || null;
141367
- if (range) {
141368
- this.form[`${a}LE`] != '' && (data[`${a}LE`] = this.form[`${a}LE`]);
141369
- this.form[`${a}GE`] != '' && (data[`${a}GE`] = this.form[`${a}GE`]);
141370
- } else {
141371
- let value = this.form[a];
141372
- if (value) {
141373
- if (r.split && typeof r.split == 'object' && r.split.length > 0) {
141374
- r.split.forEach((c, d) => data[c] = value != '' && typeof value == 'object' && value.length > 0 ? value[d] : value);
141375
- } else {
141376
- if (like) {
141377
- if (like == 'left' || like && like == 'l') data[a] = '%' + value;
141378
- if (like == 'right' || like && like == 'r') data[a] = value + '%';else data[a] = '%' + value + '%';
141379
- } else {
141380
- if (value.includes(' 00:00:00')) {
141381
- data[a] = '%' + value.split(' 00:00:00')[0] + '%';
141382
- } else {
141383
- data[a] = value;
141384
- }
141385
- }
141386
- }
141387
- }
141388
- }
141389
- });
141390
- let form = {};
141391
- Object.keys(data).length > 0 && Object.keys(data).forEach(a => {
141392
- if (data[a] != '%' && data[a] != '%%' && data[a] != 'null' && data[a] != 'undefined' && data[a] != null && data[a] != undefined) {
141393
- form[a] = data[a];
141394
- }
141395
- });
141396
- return form;
141397
- },
141398
- result() {
141399
- return this.filter(this.form);
141400
- },
141401
- switch() {
141402
- this.opened = !this.opened;
141403
- },
141404
- format(a = '', field = '', placeholder = '') {
141405
- const h = this.$createElement;
141406
- let {
141407
- ...r
141408
- } = this.config[a];
141409
- let config = {
141410
- size: r.size ? r.size : this.size,
141411
- field: field != '' ? field : a,
141412
- change: () => this.change(),
141413
- disabled: this.loading,
141414
- form: this.form,
141415
- ...r
141416
- };
141417
- return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
141418
- "attrs": {
141419
- "config": placeholder != '' ? {
141420
- ...config,
141421
- placeholder
141422
- } : config
141423
- }
141424
- });
141425
- },
141426
- output(a, b) {
141427
- const h = this.$createElement;
141428
- let {
141429
- ...r
141430
- } = this.config[a];
141431
- let range = r.range || r.scope || r.both || r.than || null;
141432
- let label = this.label ? r.text || r.label || r.title : '';
141433
- let style = this.cols != '' ? {
141434
- width: r.width ? r.width : `${100 / this.cols}%`
141435
- } : {};
141436
- let prefixPlaceholder = r.placeholder && r.placeholder.length > 0 ? r.placeholder[0] : '最高';
141437
- let suffixPlaceholder = r.placeholder && r.placeholder.length > 1 ? r.placeholder[1] : '最低';
141438
- return h("el-col", {
141439
- "key": b,
141440
- "style": style
141441
- }, [h("el-form-item", {
141442
- "attrs": {
141443
- "prop": a,
141444
- "label": label
141445
- }
141446
- }, [range ? h("el-col", {
141447
- "class": "range-cols"
141448
- }, [h("el-col", {
141449
- "attrs": {
141450
- "span": 12
141451
- }
141452
- }, [this.format(a, `${a}LE`, prefixPlaceholder)]), h("el-col", {
141453
- "attrs": {
141454
- "span": 12
141455
- }
141456
- }, [this.format(a, `${a}GE`, suffixPlaceholder)])]) : this.format(a)])]);
141457
- },
141458
- change() {
141459
- this.$emit('input', this.filter());
141460
- this.$emit('change', this.filter());
141461
- }
141462
- },
141463
- render() {
141464
- const h = arguments[0];
141465
- const {
141466
- ...props
141467
- } = this.$attrs;
141468
- const {
141469
- submit = null,
141470
- cancel = null
141471
- } = this.$listeners;
141472
- return h("div", {
141473
- "class": "b-f-search",
141474
- "style": {
141475
- padding: this.margin
141476
- }
141477
- }, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
141478
- "ref": "form",
141479
- "attrs": {
141480
- "size": this.size,
141481
- "inline": this.inline
141482
- }
141483
- }, {
141484
- "props": {
141485
- model: this.form,
141486
- ...props
141487
- }
141488
- }, {
141489
- "attrs": {
141490
- "labelWidth": this.labelWidth,
141491
- "labelPosition": this.labelPosition
141492
- }
141493
- }]), [h("div", {
141494
- "class": "column"
141495
- }, [h("el-row", {
141496
- "attrs": {
141497
- "gutter": Number(this.gutter)
141498
- },
141499
- "class": "main-rows"
141500
- }, [Object.keys(this.config).map((a, b) => b < this.cols && this.output(a, b))]), h("el-row", {
141501
- "attrs": {
141502
- "gutter": Number(this.gutter)
141503
- },
141504
- "class": "fold-rows",
141505
- "style": {
141506
- height: this.opened ? `${this.height}px` : '0'
141507
- }
141508
- }, [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", {
141509
- "class": "action",
141510
- "style": {
141511
- paddingLeft: `${this.gutter}px`
141512
- }
141513
- }, [h("el-form-item", {
141514
- "attrs": {
141515
- "label": "action"
141516
- }
141517
- }, [Object.keys(this.config).length > this.cols && h("el-button", {
141518
- "attrs": {
141519
- "disabled": this.loading,
141520
- "type": "text"
141521
- },
141522
- "class": "collapse-button",
141523
- "on": {
141524
- "click": this.switch
141525
- }
141526
- }, [h("i", {
141527
- "class": `el-icon-arrow-${this.opened ? 'up' : 'down'}`
141528
- }), this.opened ? '收起' : '展开']), submit && h("el-button", {
141529
- "attrs": {
141530
- "disabled": this.loading,
141531
- "type": "primary"
141532
- },
141533
- "on": {
141534
- "click": this.submit
141535
- }
141536
- }, [this.submitText]), cancel && h("el-button", {
141537
- "attrs": {
141538
- "disabled": this.loading,
141539
- "type": "default"
141540
- },
141541
- "on": {
141542
- "click": this.cancel
141543
- }
141544
- }, [this.cancelText])])])])]);
141545
- }
141546
- });
141547
-
141548
- /***/ }),
141549
-
141550
139726
  /***/ "c0f5":
141551
139727
  /***/ (function(module, exports, __webpack_require__) {
141552
139728
 
@@ -153385,13 +151561,6 @@ module.exports = _default;
153385
151561
 
153386
151562
  /***/ }),
153387
151563
 
153388
- /***/ "d4f0":
153389
- /***/ (function(module, exports, __webpack_require__) {
153390
-
153391
- // extracted by mini-css-extract-plugin
153392
-
153393
- /***/ }),
153394
-
153395
151564
  /***/ "d4f3":
153396
151565
  /***/ (function(module, exports) {
153397
151566
 
@@ -169722,6 +167891,7 @@ __webpack_require__.r(__webpack_exports__);
169722
167891
 
169723
167892
 
169724
167893
  /* harmony default export */ __webpack_exports__["default"] = ({
167894
+ name: 'BfSearch',
169725
167895
  render() {
169726
167896
  const h = arguments[0];
169727
167897
  let {