element-ui-root 3.0.5 → 3.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.common.js +445 -2259
- package/dist/index.css +1 -1
- package/dist/index.umd.js +445 -2259
- package/dist/index.umd.min.js +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -6274,359 +6274,6 @@ module.exports = _default;
|
|
|
6274
6274
|
|
|
6275
6275
|
/***/ }),
|
|
6276
6276
|
|
|
6277
|
-
/***/ "0d0c":
|
|
6278
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
6279
|
-
|
|
6280
|
-
"use strict";
|
|
6281
|
-
__webpack_require__.r(__webpack_exports__);
|
|
6282
|
-
/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
|
|
6283
|
-
/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__);
|
|
6284
|
-
/* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2234");
|
|
6285
|
-
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("d4f0");
|
|
6286
|
-
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_2__);
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
6291
|
-
name: 'Aform',
|
|
6292
|
-
components: {
|
|
6293
|
-
AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"]
|
|
6294
|
-
},
|
|
6295
|
-
props: {
|
|
6296
|
-
margin: {
|
|
6297
|
-
type: String,
|
|
6298
|
-
default: () => '0'
|
|
6299
|
-
},
|
|
6300
|
-
pure: {
|
|
6301
|
-
type: Boolean,
|
|
6302
|
-
default: () => true
|
|
6303
|
-
},
|
|
6304
|
-
inline: {
|
|
6305
|
-
type: Boolean,
|
|
6306
|
-
default: () => false
|
|
6307
|
-
},
|
|
6308
|
-
size: {
|
|
6309
|
-
type: String,
|
|
6310
|
-
default: () => 'small'
|
|
6311
|
-
},
|
|
6312
|
-
rules: {
|
|
6313
|
-
type: Object,
|
|
6314
|
-
default: () => ({})
|
|
6315
|
-
},
|
|
6316
|
-
labelWidth: {
|
|
6317
|
-
type: String,
|
|
6318
|
-
default: () => ''
|
|
6319
|
-
},
|
|
6320
|
-
labelPosition: {
|
|
6321
|
-
type: String,
|
|
6322
|
-
default: () => 'top'
|
|
6323
|
-
},
|
|
6324
|
-
config: {
|
|
6325
|
-
type: Array,
|
|
6326
|
-
default: () => []
|
|
6327
|
-
},
|
|
6328
|
-
object: {
|
|
6329
|
-
type: Object,
|
|
6330
|
-
default: () => ({})
|
|
6331
|
-
},
|
|
6332
|
-
values: {
|
|
6333
|
-
type: Object,
|
|
6334
|
-
default: () => ({})
|
|
6335
|
-
},
|
|
6336
|
-
label: {
|
|
6337
|
-
type: Boolean,
|
|
6338
|
-
default: () => true
|
|
6339
|
-
},
|
|
6340
|
-
loading: {
|
|
6341
|
-
type: Boolean,
|
|
6342
|
-
default: () => false
|
|
6343
|
-
},
|
|
6344
|
-
fileRemoveMark: {
|
|
6345
|
-
type: String,
|
|
6346
|
-
default: () => 'will-remove'
|
|
6347
|
-
},
|
|
6348
|
-
finishText: {
|
|
6349
|
-
type: String,
|
|
6350
|
-
default: () => '保存'
|
|
6351
|
-
},
|
|
6352
|
-
submitText: {
|
|
6353
|
-
type: String,
|
|
6354
|
-
default: () => '确定'
|
|
6355
|
-
},
|
|
6356
|
-
searchText: {
|
|
6357
|
-
type: String,
|
|
6358
|
-
default: () => '搜索'
|
|
6359
|
-
},
|
|
6360
|
-
cancelText: {
|
|
6361
|
-
type: String,
|
|
6362
|
-
default: () => '取消'
|
|
6363
|
-
}
|
|
6364
|
-
},
|
|
6365
|
-
data() {
|
|
6366
|
-
return {
|
|
6367
|
-
form: {},
|
|
6368
|
-
randomKey: `key-${Math.random()}`
|
|
6369
|
-
};
|
|
6370
|
-
},
|
|
6371
|
-
created() {
|
|
6372
|
-
this.create();
|
|
6373
|
-
},
|
|
6374
|
-
beforeDestroy() {
|
|
6375
|
-
this.cancel();
|
|
6376
|
-
},
|
|
6377
|
-
destroyed() {
|
|
6378
|
-
this.create = null;
|
|
6379
|
-
this.verify = null;
|
|
6380
|
-
this.finish = null;
|
|
6381
|
-
this.submit = null;
|
|
6382
|
-
this.cancel = null;
|
|
6383
|
-
this.filter = null;
|
|
6384
|
-
this.result = null;
|
|
6385
|
-
},
|
|
6386
|
-
watch: {
|
|
6387
|
-
values: {
|
|
6388
|
-
immediate: true,
|
|
6389
|
-
handler() {
|
|
6390
|
-
this.create();
|
|
6391
|
-
}
|
|
6392
|
-
}
|
|
6393
|
-
},
|
|
6394
|
-
methods: {
|
|
6395
|
-
create() {
|
|
6396
|
-
// 创建表单 格式化表单配置对象(this.config)为数据双向绑定对象
|
|
6397
|
-
this.randomKey = `key-${Math.random()}`;
|
|
6398
|
-
const {
|
|
6399
|
-
config = [],
|
|
6400
|
-
object = {},
|
|
6401
|
-
values = {}
|
|
6402
|
-
} = this;
|
|
6403
|
-
let temp = {};
|
|
6404
|
-
let data = {};
|
|
6405
|
-
if (config && config.length > 0) {
|
|
6406
|
-
for (let a in config) temp[config[a].name || config[a].field] = '';
|
|
6407
|
-
}
|
|
6408
|
-
if (object && Object.keys(object).length > 0) {
|
|
6409
|
-
for (let a in object) temp[a] = '';
|
|
6410
|
-
}
|
|
6411
|
-
if (values && Object.keys(values).length > 0) {
|
|
6412
|
-
// 设置默认值
|
|
6413
|
-
for (let a in temp) {
|
|
6414
|
-
if (a.includes('password')) data[a] = '';else data[a] = isNaN(values[a]) ? values[a] : values[a] != null ? `${values[a]}` : '';
|
|
6415
|
-
}
|
|
6416
|
-
} else {
|
|
6417
|
-
if (!this.pure) {
|
|
6418
|
-
for (let a in config) {
|
|
6419
|
-
// 设置 config 数组(单选框, 下拉框, 开关) 默认值为0
|
|
6420
|
-
if (!config[a].pure) {
|
|
6421
|
-
if (config[a]['type'] == 'radio' || config[a]['type'] == 'select' || config[a]['type'] == 'switch') {
|
|
6422
|
-
data[config[a].name || config[a].field] = config[a].default || '0';
|
|
6423
|
-
} else data[config[a].name || config[a].field] = config[a].default || '';
|
|
6424
|
-
} else data[config[a].name || config[a].field] = '';
|
|
6425
|
-
}
|
|
6426
|
-
for (let a in object) {
|
|
6427
|
-
// 设置 object 对象(单选框, 下拉框, 开关) 默认值为0
|
|
6428
|
-
if (!object[a].pure) {
|
|
6429
|
-
if (object[a]['type'] == 'radio' || object[a]['type'] == 'select' || object[a]['type'] == 'switch') {
|
|
6430
|
-
data[a] = object[a].default || '0';
|
|
6431
|
-
} else data[a] = object[a].default || '';
|
|
6432
|
-
} else data[a] = '';
|
|
6433
|
-
}
|
|
6434
|
-
} else {
|
|
6435
|
-
for (let a in temp) data[a] = '';
|
|
6436
|
-
}
|
|
6437
|
-
}
|
|
6438
|
-
this.form = data;
|
|
6439
|
-
},
|
|
6440
|
-
verify() {
|
|
6441
|
-
// 表单验证
|
|
6442
|
-
let result = false;
|
|
6443
|
-
this.$refs['form'].validate(valid => result = valid);
|
|
6444
|
-
return result;
|
|
6445
|
-
},
|
|
6446
|
-
finish(e) {
|
|
6447
|
-
e && e.preventDefault();
|
|
6448
|
-
this.$emit('finish', this.result());
|
|
6449
|
-
},
|
|
6450
|
-
submit(e) {
|
|
6451
|
-
// 提交表单
|
|
6452
|
-
e && e.preventDefault();
|
|
6453
|
-
this.$refs['form'].validate(valid => {
|
|
6454
|
-
if (valid) {
|
|
6455
|
-
let data = {};
|
|
6456
|
-
if (this.config.length > 0) {
|
|
6457
|
-
for (let a in this.config) {
|
|
6458
|
-
// 格式化数据模糊查询
|
|
6459
|
-
if (this.config[a].like) data[this.config[a].name] = '%' + this.form[this.config[a].name] + '%';
|
|
6460
|
-
if (this.form[this.config[a].name] && Object.keys(this.form[this.config[a].name]).length > 0 && this.form[this.config[a].name].old && this.form[this.config[a].name].old.split('=')[1] != '') {
|
|
6461
|
-
// 判断是否有默认图片删除
|
|
6462
|
-
const {
|
|
6463
|
-
old
|
|
6464
|
-
} = this.form[this.config[a].name];
|
|
6465
|
-
data[this.config[a].name] = this.form[this.config[a].name];
|
|
6466
|
-
data[`${this.config[a].name}-${this.fileRemoveMark}`] = old;
|
|
6467
|
-
} else data[this.config[a].name] = this.form[this.config[a].name];
|
|
6468
|
-
}
|
|
6469
|
-
}
|
|
6470
|
-
if (Object.keys(this.object).length > 0) {
|
|
6471
|
-
for (let a in this.object) {
|
|
6472
|
-
// 格式化数据模糊查询
|
|
6473
|
-
if (this.object[a].like) data[a] = '%' + this.form[a] + '%';
|
|
6474
|
-
if (this.form[a] && Object.keys(this.form[a]).length > 0 && this.form[a].old && this.form[a].old.split('=')[1] != '') {
|
|
6475
|
-
// 判断是否有默认图片删除
|
|
6476
|
-
const {
|
|
6477
|
-
old
|
|
6478
|
-
} = this.form[a];
|
|
6479
|
-
data[a] = this.form[a];
|
|
6480
|
-
data[`${a}-${this.fileRemoveMark}`] = old;
|
|
6481
|
-
} else data[a] = this.form[a];
|
|
6482
|
-
}
|
|
6483
|
-
}
|
|
6484
|
-
this.$emit('submit', this.filter(data));
|
|
6485
|
-
return this.filter(data);
|
|
6486
|
-
}
|
|
6487
|
-
});
|
|
6488
|
-
},
|
|
6489
|
-
regain() {
|
|
6490
|
-
this.$refs['form'] && this.$refs['form'].resetFields();
|
|
6491
|
-
},
|
|
6492
|
-
cancel(e) {
|
|
6493
|
-
e && e.preventDefault();
|
|
6494
|
-
this.$emit('cancel', this.form);
|
|
6495
|
-
this.$nextTick(() => {
|
|
6496
|
-
for (let a in this.form) this.form[a] = '';
|
|
6497
|
-
this.$nextTick(() => this.$refs['form'] && this.$refs['form'].resetFields());
|
|
6498
|
-
});
|
|
6499
|
-
},
|
|
6500
|
-
filter(form) {
|
|
6501
|
-
// 过滤空值属性
|
|
6502
|
-
const data = {};
|
|
6503
|
-
for (let a in form) {
|
|
6504
|
-
if (a != undefined && a != 'undefined' && form[a] != '%%' && form[a] != 'null' && form[a] != 'undefined' && form[a] != null && form[a] != undefined) {
|
|
6505
|
-
data[a] = form[a];
|
|
6506
|
-
}
|
|
6507
|
-
}
|
|
6508
|
-
return data;
|
|
6509
|
-
},
|
|
6510
|
-
result() {
|
|
6511
|
-
return this.filter(this.form);
|
|
6512
|
-
},
|
|
6513
|
-
change() {
|
|
6514
|
-
this.$emit('input', this.form);
|
|
6515
|
-
this.$emit('change', this.form);
|
|
6516
|
-
}
|
|
6517
|
-
},
|
|
6518
|
-
render() {
|
|
6519
|
-
const h = arguments[0];
|
|
6520
|
-
const {
|
|
6521
|
-
...props
|
|
6522
|
-
} = this.$attrs;
|
|
6523
|
-
const {
|
|
6524
|
-
finish = null,
|
|
6525
|
-
submit = null,
|
|
6526
|
-
cancel = null
|
|
6527
|
-
} = this.$listeners;
|
|
6528
|
-
return h("div", {
|
|
6529
|
-
"class": !this.inline ? this.search ? 'a-form' : 'a-from vertical' : 'a-form',
|
|
6530
|
-
"style": {
|
|
6531
|
-
padding: this.margin
|
|
6532
|
-
}
|
|
6533
|
-
}, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
6534
|
-
"ref": "form",
|
|
6535
|
-
"attrs": {
|
|
6536
|
-
"size": this.size,
|
|
6537
|
-
"labelWidth": this.labelWidth,
|
|
6538
|
-
"labelPosition": this.labelPosition,
|
|
6539
|
-
"inline": this.inline ? this.inline : this.search
|
|
6540
|
-
}
|
|
6541
|
-
}, {
|
|
6542
|
-
"props": {
|
|
6543
|
-
model: this.form,
|
|
6544
|
-
rules: Object.keys(this.rules).length > 0 ? this.rules : {},
|
|
6545
|
-
...props
|
|
6546
|
-
}
|
|
6547
|
-
}]), [this.config.length > 0 && this.config.map((a, b) => h("el-form-item", {
|
|
6548
|
-
"key": b,
|
|
6549
|
-
"attrs": {
|
|
6550
|
-
"prop": `${a.name}`,
|
|
6551
|
-
"label": this.label ? a.type && a.type == 'checkbox' ? '' : a.text || a.label || a.title : '',
|
|
6552
|
-
"rules": a['must'] ? a['rule'] ? a['rule'] : [{
|
|
6553
|
-
required: true,
|
|
6554
|
-
trigger: 'blur',
|
|
6555
|
-
message: `${a['text']}不能为空`
|
|
6556
|
-
}] : a['rule']
|
|
6557
|
-
},
|
|
6558
|
-
"style": {
|
|
6559
|
-
width: a.width
|
|
6560
|
-
}
|
|
6561
|
-
}, [h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
6562
|
-
"attrs": {
|
|
6563
|
-
"config": {
|
|
6564
|
-
form: this.form,
|
|
6565
|
-
size: a.size ? a.size : this.size,
|
|
6566
|
-
field: `${a.name}`,
|
|
6567
|
-
...a
|
|
6568
|
-
}
|
|
6569
|
-
},
|
|
6570
|
-
"on": {
|
|
6571
|
-
"change": () => this.change()
|
|
6572
|
-
}
|
|
6573
|
-
})])), Object.keys(this.object).length > 0 && Object.keys(this.object).map((a, b) => h("el-form-item", {
|
|
6574
|
-
"key": b,
|
|
6575
|
-
"attrs": {
|
|
6576
|
-
"prop": `${a}`,
|
|
6577
|
-
"label": this.label ? this.object[a].type && this.object[a].type == 'checkbox' ? '' : this.object[a].text || this.object[a].label || this.object[a].title : '',
|
|
6578
|
-
"rules": this.object[a]['must'] ? this.object[a]['rule'] ? this.object[a]['rule'] : [{
|
|
6579
|
-
required: true,
|
|
6580
|
-
trigger: 'blur',
|
|
6581
|
-
message: `${this.object[a]['text']}不能为空`
|
|
6582
|
-
}] : this.object[a]['rule']
|
|
6583
|
-
},
|
|
6584
|
-
"style": {
|
|
6585
|
-
width: this.object[a].width
|
|
6586
|
-
}
|
|
6587
|
-
}, [h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
6588
|
-
"attrs": {
|
|
6589
|
-
"config": {
|
|
6590
|
-
form: this.form,
|
|
6591
|
-
size: this.object[a].size ? this.object[a].size : this.size,
|
|
6592
|
-
field: `${a}`,
|
|
6593
|
-
...this.object[a]
|
|
6594
|
-
}
|
|
6595
|
-
},
|
|
6596
|
-
"on": {
|
|
6597
|
-
"change": () => this.change()
|
|
6598
|
-
}
|
|
6599
|
-
})])), this.$slots.default, (finish || submit || cancel) && h("div", {
|
|
6600
|
-
"class": "action"
|
|
6601
|
-
}, [h("el-form-item", [finish && this.finishText != '' && h("el-button", {
|
|
6602
|
-
"attrs": {
|
|
6603
|
-
"loading": this.loading,
|
|
6604
|
-
"type": "success"
|
|
6605
|
-
},
|
|
6606
|
-
"on": {
|
|
6607
|
-
"click": this.finish
|
|
6608
|
-
}
|
|
6609
|
-
}, [this.finishText]), submit && h("el-button", {
|
|
6610
|
-
"attrs": {
|
|
6611
|
-
"loading": this.loading,
|
|
6612
|
-
"type": "primary"
|
|
6613
|
-
},
|
|
6614
|
-
"on": {
|
|
6615
|
-
"click": this.submit
|
|
6616
|
-
}
|
|
6617
|
-
}, [this.submitText]), cancel && h("el-button", {
|
|
6618
|
-
"attrs": {
|
|
6619
|
-
"disabled": this.loading
|
|
6620
|
-
},
|
|
6621
|
-
"on": {
|
|
6622
|
-
"click": this.cancel
|
|
6623
|
-
}
|
|
6624
|
-
}, [this.cancelText])])])])]);
|
|
6625
|
-
}
|
|
6626
|
-
});
|
|
6627
|
-
|
|
6628
|
-
/***/ }),
|
|
6629
|
-
|
|
6630
6277
|
/***/ "0d7f":
|
|
6631
6278
|
/***/ (function(module, exports, __webpack_require__) {
|
|
6632
6279
|
|
|
@@ -13410,31 +13057,6 @@ var map = {
|
|
|
13410
13057
|
"./Aenume/index": "6cc8",
|
|
13411
13058
|
"./Aenume/index.js": "6cc8",
|
|
13412
13059
|
"./Aform": "aff6",
|
|
13413
|
-
"./Aform copy": "0d0c",
|
|
13414
|
-
"./Aform copy/": "0d0c",
|
|
13415
|
-
"./Aform copy/AfEditor": "3cef",
|
|
13416
|
-
"./Aform copy/AfEditor/": "3cef",
|
|
13417
|
-
"./Aform copy/AfEditor/index": "3cef",
|
|
13418
|
-
"./Aform copy/AfEditor/index.css": "9203",
|
|
13419
|
-
"./Aform copy/AfEditor/index.js": "3cef",
|
|
13420
|
-
"./Aform copy/AfSearch": "230c",
|
|
13421
|
-
"./Aform copy/AfSearch/": "230c",
|
|
13422
|
-
"./Aform copy/AfSearch/index": "230c",
|
|
13423
|
-
"./Aform copy/AfSearch/index.css": "6e39",
|
|
13424
|
-
"./Aform copy/AfSearch/index.js": "230c",
|
|
13425
|
-
"./Aform copy/BfSearch": "c0f0",
|
|
13426
|
-
"./Aform copy/BfSearch/": "c0f0",
|
|
13427
|
-
"./Aform copy/BfSearch/index": "c0f0",
|
|
13428
|
-
"./Aform copy/BfSearch/index.css": "9e53",
|
|
13429
|
-
"./Aform copy/BfSearch/index.js": "c0f0",
|
|
13430
|
-
"./Aform copy/CfSearch": "a237",
|
|
13431
|
-
"./Aform copy/CfSearch/": "a237",
|
|
13432
|
-
"./Aform copy/CfSearch/index": "a237",
|
|
13433
|
-
"./Aform copy/CfSearch/index.css": "af1c",
|
|
13434
|
-
"./Aform copy/CfSearch/index.js": "a237",
|
|
13435
|
-
"./Aform copy/index": "0d0c",
|
|
13436
|
-
"./Aform copy/index.css": "d4f0",
|
|
13437
|
-
"./Aform copy/index.js": "0d0c",
|
|
13438
13060
|
"./Aform/": "aff6",
|
|
13439
13061
|
"./Aform/AfEditor": "b550",
|
|
13440
13062
|
"./Aform/AfEditor/": "b550",
|
|
@@ -13625,6 +13247,11 @@ var map = {
|
|
|
13625
13247
|
"./Bmap/index": "e579",
|
|
13626
13248
|
"./Bmap/index.css": "ba59",
|
|
13627
13249
|
"./Bmap/index.js": "e579",
|
|
13250
|
+
"./Bpages": "7c09",
|
|
13251
|
+
"./Bpages/": "7c09",
|
|
13252
|
+
"./Bpages/index": "7c09",
|
|
13253
|
+
"./Bpages/index.css": "2769",
|
|
13254
|
+
"./Bpages/index.js": "7c09",
|
|
13628
13255
|
"./Bplayer": "2c3e",
|
|
13629
13256
|
"./Bplayer/": "2c3e",
|
|
13630
13257
|
"./Bplayer/index": "2c3e",
|
|
@@ -13860,6 +13487,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13860
13487
|
type: Object,
|
|
13861
13488
|
default: () => ({})
|
|
13862
13489
|
},
|
|
13490
|
+
must: {
|
|
13491
|
+
type: Boolean,
|
|
13492
|
+
default: () => false
|
|
13493
|
+
},
|
|
13863
13494
|
inline: {
|
|
13864
13495
|
type: Boolean,
|
|
13865
13496
|
default: () => false
|
|
@@ -13870,7 +13501,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13870
13501
|
},
|
|
13871
13502
|
gutter: {
|
|
13872
13503
|
type: String,
|
|
13873
|
-
default: () => '
|
|
13504
|
+
default: () => '16'
|
|
13874
13505
|
},
|
|
13875
13506
|
config: {
|
|
13876
13507
|
type: Object,
|
|
@@ -13879,6 +13510,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13879
13510
|
global: {
|
|
13880
13511
|
type: Boolean,
|
|
13881
13512
|
default: () => true
|
|
13513
|
+
},
|
|
13514
|
+
disabled: {
|
|
13515
|
+
type: Boolean,
|
|
13516
|
+
default: () => false
|
|
13882
13517
|
}
|
|
13883
13518
|
},
|
|
13884
13519
|
data() {
|
|
@@ -13927,22 +13562,27 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13927
13562
|
} = this.config[a];
|
|
13928
13563
|
let label = r.text || r.label || r.title || '';
|
|
13929
13564
|
let width = r.width ? r.width : `${100 / this.cols}%`;
|
|
13930
|
-
let
|
|
13931
|
-
|
|
13932
|
-
|
|
13565
|
+
let judge = [{
|
|
13566
|
+
required: true,
|
|
13567
|
+
message: `${label}不能为空`
|
|
13568
|
+
}];
|
|
13569
|
+
let valid = r.rule ? r.rule : r.must || this.must ? judge : [];
|
|
13570
|
+
let rules = this.disabled || r.disabled ? [] : (r.must || this.must) && r.rule ? [...judge, ...r.rule] : valid;
|
|
13933
13571
|
let props = {
|
|
13934
13572
|
name: a,
|
|
13935
13573
|
prop: a,
|
|
13936
13574
|
label,
|
|
13575
|
+
rules,
|
|
13576
|
+
disabled: r.disabled || this.disabled,
|
|
13937
13577
|
...r
|
|
13938
13578
|
};
|
|
13939
13579
|
if (this.inline) {
|
|
13940
|
-
let
|
|
13580
|
+
let style = {
|
|
13941
13581
|
padding: `0 ${this.gutter / 2}px`,
|
|
13942
|
-
|
|
13582
|
+
width
|
|
13943
13583
|
};
|
|
13944
13584
|
return h("el-form-item", {
|
|
13945
|
-
"style":
|
|
13585
|
+
"style": style,
|
|
13946
13586
|
"props": {
|
|
13947
13587
|
...props
|
|
13948
13588
|
}
|
|
@@ -13962,7 +13602,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13962
13602
|
} else {
|
|
13963
13603
|
return h("el-col", {
|
|
13964
13604
|
"key": b,
|
|
13965
|
-
"style":
|
|
13605
|
+
"style": {
|
|
13606
|
+
width
|
|
13607
|
+
}
|
|
13966
13608
|
}, [h("el-form-item", {
|
|
13967
13609
|
"props": {
|
|
13968
13610
|
...props
|
|
@@ -13976,25 +13618,31 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13976
13618
|
this.option[b] = a;
|
|
13977
13619
|
let child = a.children || a.child || a.node || null;
|
|
13978
13620
|
if (child && Object.keys(child).length > 0) {
|
|
13979
|
-
let width = a.width ? a.width : `${100 / Object.keys(child).length}%`;
|
|
13980
|
-
let style = this.cols != '' ? {
|
|
13981
|
-
width
|
|
13982
|
-
} : {};
|
|
13983
13621
|
return Object.keys(child).map((c, d) => {
|
|
13984
13622
|
let {
|
|
13985
13623
|
...r
|
|
13986
13624
|
} = child[c];
|
|
13625
|
+
let space = a.gutter ? a.gutter / 2 : this.gutter / 4;
|
|
13626
|
+
let style = {
|
|
13627
|
+
padding: `0 ${space}px`
|
|
13628
|
+
};
|
|
13629
|
+
r.type = r.type ? r.type : a.type;
|
|
13987
13630
|
if (r.span) {
|
|
13988
13631
|
return h("el-col", {
|
|
13989
13632
|
"key": d,
|
|
13633
|
+
"style": style,
|
|
13990
13634
|
"attrs": {
|
|
13991
13635
|
"span": Number(r.span)
|
|
13992
13636
|
}
|
|
13993
13637
|
}, [this.format(r, c)]);
|
|
13994
13638
|
} else {
|
|
13639
|
+
let width = r.width ? r.width : `${100 / Object.keys(child).length}%`;
|
|
13995
13640
|
return h("el-col", {
|
|
13996
13641
|
"key": d,
|
|
13997
|
-
"style":
|
|
13642
|
+
"style": {
|
|
13643
|
+
width,
|
|
13644
|
+
...style
|
|
13645
|
+
}
|
|
13998
13646
|
}, [this.format(r, c)]);
|
|
13999
13647
|
}
|
|
14000
13648
|
});
|
|
@@ -14003,6 +13651,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14003
13651
|
change: () => this.change(),
|
|
14004
13652
|
form: this.form,
|
|
14005
13653
|
field: b,
|
|
13654
|
+
clearable: !a.default,
|
|
14006
13655
|
...a
|
|
14007
13656
|
};
|
|
14008
13657
|
return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
@@ -14039,7 +13688,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14039
13688
|
}
|
|
14040
13689
|
}
|
|
14041
13690
|
});
|
|
14042
|
-
|
|
13691
|
+
let value = {};
|
|
13692
|
+
Object.keys(data).forEach(a => {
|
|
13693
|
+
if (data[a] && data[a] != '%' && data[a] != '%%') value[a] = data[a];
|
|
13694
|
+
});
|
|
13695
|
+
return value;
|
|
14043
13696
|
},
|
|
14044
13697
|
submit() {
|
|
14045
13698
|
if (this.global) {
|
|
@@ -14052,7 +13705,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14052
13705
|
page: 1
|
|
14053
13706
|
});
|
|
14054
13707
|
}
|
|
14055
|
-
this.$
|
|
13708
|
+
this.$refs.form.validate(valid => valid && this.$emit('submit', this.filter(), this.form, this.option));
|
|
14056
13709
|
},
|
|
14057
13710
|
cancel() {
|
|
14058
13711
|
this.$refs.form && this.$refs.form.resetFields && this.$refs.form.resetFields();
|
|
@@ -14080,9 +13733,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14080
13733
|
render() {
|
|
14081
13734
|
const h = arguments[0];
|
|
14082
13735
|
let {
|
|
14083
|
-
padding = '0',
|
|
14084
13736
|
margin = '0',
|
|
14085
|
-
|
|
13737
|
+
padding = '0',
|
|
14086
13738
|
size = 'small',
|
|
14087
13739
|
loading = false,
|
|
14088
13740
|
labelWidth = 'auto',
|
|
@@ -14090,7 +13742,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14090
13742
|
submitText = '搜索',
|
|
14091
13743
|
cancelText = '重置',
|
|
14092
13744
|
action = [],
|
|
14093
|
-
...
|
|
13745
|
+
...rest
|
|
14094
13746
|
} = this.$attrs;
|
|
14095
13747
|
let {
|
|
14096
13748
|
submit = null,
|
|
@@ -14099,6 +13751,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14099
13751
|
let style = this.inline ? {
|
|
14100
13752
|
margin: `0 -${this.gutter / 2}px`
|
|
14101
13753
|
} : {};
|
|
13754
|
+
let props = {
|
|
13755
|
+
size,
|
|
13756
|
+
inline: this.inline,
|
|
13757
|
+
labelWidth,
|
|
13758
|
+
labelPosition,
|
|
13759
|
+
style,
|
|
13760
|
+
...rest
|
|
13761
|
+
};
|
|
14102
13762
|
return h("div", {
|
|
14103
13763
|
"class": "a-f-search",
|
|
14104
13764
|
"style": {
|
|
@@ -14106,14 +13766,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14106
13766
|
padding
|
|
14107
13767
|
}
|
|
14108
13768
|
}, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
14109
|
-
"ref":
|
|
14110
|
-
"attrs": {
|
|
14111
|
-
"size": size,
|
|
14112
|
-
"inline": this.inline,
|
|
14113
|
-
"label-width": labelWidth,
|
|
14114
|
-
"label-position": labelPosition
|
|
14115
|
-
},
|
|
14116
|
-
"style": style
|
|
13769
|
+
"ref": "form"
|
|
14117
13770
|
}, {
|
|
14118
13771
|
"props": {
|
|
14119
13772
|
model: this.form,
|
|
@@ -14134,15 +13787,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14134
13787
|
"style": {
|
|
14135
13788
|
height: this.opened ? `${this.height}px` : '0'
|
|
14136
13789
|
}
|
|
14137
|
-
}, [Object.keys(this.config).map((a, b) => b > this.cols - 1 && this.create(a, b))])]), (submit || cancel || action.length > 0) && h("
|
|
14138
|
-
"attrs": {
|
|
14139
|
-
"name": "action",
|
|
14140
|
-
"label": "action"
|
|
14141
|
-
},
|
|
13790
|
+
}, [Object.keys(this.config).map((a, b) => b > this.cols - 1 && this.create(a, b))])]), (submit || cancel || action.length > 0) && h("div", {
|
|
14142
13791
|
"class": "action",
|
|
14143
13792
|
"style": {
|
|
14144
13793
|
paddingLeft: `${this.gutter}px`
|
|
14145
13794
|
}
|
|
13795
|
+
}, [h("el-form-item", {
|
|
13796
|
+
"attrs": {
|
|
13797
|
+
"name": "action",
|
|
13798
|
+
"label": "action"
|
|
13799
|
+
}
|
|
14146
13800
|
}, [Object.keys(this.config).length > this.cols && !this.inline && h("el-button", {
|
|
14147
13801
|
"attrs": {
|
|
14148
13802
|
"disabled": loading,
|
|
@@ -14170,12 +13824,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14170
13824
|
"on": {
|
|
14171
13825
|
"click": this.cancel
|
|
14172
13826
|
}
|
|
14173
|
-
}, [cancelText]), action.
|
|
13827
|
+
}, [cancelText]), action.map((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
14174
13828
|
"key": b,
|
|
14175
13829
|
"attrs": {
|
|
14176
13830
|
"disabled": loading
|
|
13831
|
+
},
|
|
13832
|
+
"on": {
|
|
13833
|
+
"click": e => a.click(this.filter(), this.form, this.option, e)
|
|
14177
13834
|
}
|
|
14178
|
-
}, a]), [a.label || a.title || a.text || '']))])])]);
|
|
13835
|
+
}, a]), [a.label || a.title || a.text || '']))])])])]);
|
|
14179
13836
|
}
|
|
14180
13837
|
});
|
|
14181
13838
|
|
|
@@ -16629,7 +16286,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16629
16286
|
...props
|
|
16630
16287
|
} = this.$attrs;
|
|
16631
16288
|
return h("div", {
|
|
16632
|
-
"class": "a-
|
|
16289
|
+
"class": "a-pages"
|
|
16633
16290
|
}, [h("el-pagination", {
|
|
16634
16291
|
"attrs": {
|
|
16635
16292
|
"small": this.small,
|
|
@@ -19152,7 +18809,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19152
18809
|
|
|
19153
18810
|
|
|
19154
18811
|
|
|
19155
|
-
|
|
19156
18812
|
|
|
19157
18813
|
|
|
19158
18814
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
@@ -19169,19 +18825,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19169
18825
|
},
|
|
19170
18826
|
data() {
|
|
19171
18827
|
return {
|
|
19172
|
-
|
|
18828
|
+
random: Math.random()
|
|
19173
18829
|
};
|
|
19174
18830
|
},
|
|
19175
18831
|
watch: {
|
|
19176
18832
|
config: {
|
|
19177
18833
|
immediate: true,
|
|
19178
18834
|
handler() {
|
|
19179
|
-
this.
|
|
18835
|
+
this.update();
|
|
19180
18836
|
}
|
|
19181
18837
|
}
|
|
19182
18838
|
},
|
|
19183
18839
|
created() {
|
|
19184
|
-
this.
|
|
18840
|
+
this.update();
|
|
19185
18841
|
},
|
|
19186
18842
|
destroyed() {
|
|
19187
18843
|
this.input = null;
|
|
@@ -19199,6 +18855,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19199
18855
|
} = this.config;
|
|
19200
18856
|
this.config.change && this.config.change(a, data.length > 0 ? this.filter(data, a) : null);
|
|
19201
18857
|
},
|
|
18858
|
+
update() {
|
|
18859
|
+
this.random = Math.random();
|
|
18860
|
+
},
|
|
19202
18861
|
filter(array = [], value = '') {
|
|
19203
18862
|
let data = {};
|
|
19204
18863
|
if (value != '') array.length > 0 && array.forEach(a => {
|
|
@@ -19213,35 +18872,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19213
18872
|
...r
|
|
19214
18873
|
}) {
|
|
19215
18874
|
const h = this.$createElement;
|
|
19216
|
-
const label = r.text || r.label || r.title || '';
|
|
19217
18875
|
const style = {
|
|
19218
|
-
width:
|
|
18876
|
+
width: '100%',
|
|
19219
18877
|
...r.style
|
|
19220
18878
|
};
|
|
18879
|
+
const label = r.text || r.label || r.title || '';
|
|
19221
18880
|
const values = (a = {}) => typeof a == 'string' ? a : `${a.value || a.code || a.id}`;
|
|
19222
18881
|
const labels = (a = {}) => typeof a == 'string' ? a : a.label || a.title || a.text || a.name;
|
|
19223
18882
|
if (r.render) return r.render(form, this.config);
|
|
19224
|
-
if (!r.type) return h("el-input", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
19225
|
-
"on": {
|
|
19226
|
-
"input": this.input,
|
|
19227
|
-
"change": this.change
|
|
19228
|
-
},
|
|
19229
|
-
"attrs": {
|
|
19230
|
-
"placeholder": `请输入${label}`
|
|
19231
|
-
},
|
|
19232
|
-
"style": {
|
|
19233
|
-
...r.style
|
|
19234
|
-
}
|
|
19235
|
-
}, {
|
|
19236
|
-
"props": r
|
|
19237
|
-
}, {
|
|
19238
|
-
"model": {
|
|
19239
|
-
value: form[field],
|
|
19240
|
-
callback: $$v => {
|
|
19241
|
-
this.$set(form, field, $$v);
|
|
19242
|
-
}
|
|
19243
|
-
}
|
|
19244
|
-
}]));
|
|
19245
18883
|
switch (r.type) {
|
|
19246
18884
|
case 'input':
|
|
19247
18885
|
return h("el-input", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
@@ -19264,7 +18902,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19264
18902
|
}
|
|
19265
18903
|
}
|
|
19266
18904
|
}]));
|
|
19267
|
-
case '
|
|
18905
|
+
case 'password':
|
|
19268
18906
|
return h("el-input", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
19269
18907
|
"on": {
|
|
19270
18908
|
"input": this.input,
|
|
@@ -19272,7 +18910,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19272
18910
|
},
|
|
19273
18911
|
"attrs": {
|
|
19274
18912
|
"clearable": true,
|
|
19275
|
-
"placeholder": r.placeholder || `请输入${label}
|
|
18913
|
+
"placeholder": r.placeholder || `请输入${label}`,
|
|
18914
|
+
"show-password": true
|
|
19276
18915
|
},
|
|
19277
18916
|
"style": style
|
|
19278
18917
|
}, {
|
|
@@ -19285,16 +18924,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19285
18924
|
}
|
|
19286
18925
|
}
|
|
19287
18926
|
}]));
|
|
19288
|
-
case '
|
|
19289
|
-
return h("el-input", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
18927
|
+
case 'number':
|
|
18928
|
+
return h("el-input-number", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
19290
18929
|
"on": {
|
|
19291
18930
|
"input": this.input,
|
|
19292
18931
|
"change": this.change
|
|
19293
18932
|
},
|
|
19294
18933
|
"attrs": {
|
|
19295
18934
|
"clearable": true,
|
|
19296
|
-
"
|
|
19297
|
-
"
|
|
18935
|
+
"min": 0,
|
|
18936
|
+
"max": 100000000,
|
|
18937
|
+
"controls": false,
|
|
18938
|
+
"controls-position": "right",
|
|
18939
|
+
"placeholder": r.placeholder || `请输入${label}`
|
|
19298
18940
|
},
|
|
19299
18941
|
"style": style
|
|
19300
18942
|
}, {
|
|
@@ -19588,7 +19230,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19588
19230
|
}]));
|
|
19589
19231
|
case 'image':
|
|
19590
19232
|
return h(_components_Aupload_Icon__WEBPACK_IMPORTED_MODULE_2__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
19591
|
-
"key": this.
|
|
19233
|
+
"key": this.random,
|
|
19592
19234
|
"on": {
|
|
19593
19235
|
"input": this.input,
|
|
19594
19236
|
"change": this.change
|
|
@@ -19610,7 +19252,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19610
19252
|
}]));
|
|
19611
19253
|
case 'upload':
|
|
19612
19254
|
return h(_components_Aupload_Icon__WEBPACK_IMPORTED_MODULE_2__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
19613
|
-
"key": this.
|
|
19255
|
+
"key": this.random,
|
|
19614
19256
|
"on": {
|
|
19615
19257
|
"input": this.input,
|
|
19616
19258
|
"change": this.change
|
|
@@ -19632,7 +19274,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19632
19274
|
}]));
|
|
19633
19275
|
case 'icon':
|
|
19634
19276
|
return h(_components_AiconSelect__WEBPACK_IMPORTED_MODULE_1__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
19635
|
-
"key": this.
|
|
19277
|
+
"key": this.random,
|
|
19636
19278
|
"on": {
|
|
19637
19279
|
"input": this.input,
|
|
19638
19280
|
"change": this.change
|
|
@@ -19653,7 +19295,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19653
19295
|
}]));
|
|
19654
19296
|
case 'iconSelect':
|
|
19655
19297
|
return h(_components_AiconSelect__WEBPACK_IMPORTED_MODULE_1__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
19656
|
-
"key": this.
|
|
19298
|
+
"key": this.random,
|
|
19657
19299
|
"on": {
|
|
19658
19300
|
"input": this.input,
|
|
19659
19301
|
"change": this.change
|
|
@@ -20146,384 +19788,6 @@ module.exports = _default;
|
|
|
20146
19788
|
|
|
20147
19789
|
/***/ }),
|
|
20148
19790
|
|
|
20149
|
-
/***/ "230c":
|
|
20150
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
20151
|
-
|
|
20152
|
-
"use strict";
|
|
20153
|
-
__webpack_require__.r(__webpack_exports__);
|
|
20154
|
-
/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
|
|
20155
|
-
/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__);
|
|
20156
|
-
/* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2234");
|
|
20157
|
-
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("6e39");
|
|
20158
|
-
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_2__);
|
|
20159
|
-
|
|
20160
|
-
|
|
20161
|
-
|
|
20162
|
-
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
20163
|
-
name: 'AfSearch',
|
|
20164
|
-
components: {
|
|
20165
|
-
AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"]
|
|
20166
|
-
},
|
|
20167
|
-
props: {
|
|
20168
|
-
value: {
|
|
20169
|
-
type: Object,
|
|
20170
|
-
default: () => ({})
|
|
20171
|
-
},
|
|
20172
|
-
margin: {
|
|
20173
|
-
type: String,
|
|
20174
|
-
default: () => '0'
|
|
20175
|
-
},
|
|
20176
|
-
size: {
|
|
20177
|
-
type: String,
|
|
20178
|
-
default: () => 'small'
|
|
20179
|
-
},
|
|
20180
|
-
inline: {
|
|
20181
|
-
type: Boolean,
|
|
20182
|
-
default: () => false
|
|
20183
|
-
},
|
|
20184
|
-
cols: {
|
|
20185
|
-
type: String,
|
|
20186
|
-
default: () => '6'
|
|
20187
|
-
},
|
|
20188
|
-
gutter: {
|
|
20189
|
-
type: String,
|
|
20190
|
-
default: () => '10'
|
|
20191
|
-
},
|
|
20192
|
-
labelWidth: {
|
|
20193
|
-
type: String,
|
|
20194
|
-
default: () => 'auto'
|
|
20195
|
-
},
|
|
20196
|
-
labelPosition: {
|
|
20197
|
-
type: String,
|
|
20198
|
-
default: () => 'top'
|
|
20199
|
-
},
|
|
20200
|
-
config: {
|
|
20201
|
-
type: Object,
|
|
20202
|
-
default: () => ({})
|
|
20203
|
-
},
|
|
20204
|
-
values: {
|
|
20205
|
-
type: Object,
|
|
20206
|
-
default: () => ({})
|
|
20207
|
-
},
|
|
20208
|
-
label: {
|
|
20209
|
-
type: Boolean,
|
|
20210
|
-
default: () => true
|
|
20211
|
-
},
|
|
20212
|
-
check: {
|
|
20213
|
-
type: Boolean,
|
|
20214
|
-
default: () => false
|
|
20215
|
-
},
|
|
20216
|
-
loading: {
|
|
20217
|
-
type: Boolean,
|
|
20218
|
-
default: () => false
|
|
20219
|
-
},
|
|
20220
|
-
submitText: {
|
|
20221
|
-
type: String,
|
|
20222
|
-
default: () => '搜索'
|
|
20223
|
-
},
|
|
20224
|
-
cancelText: {
|
|
20225
|
-
type: String,
|
|
20226
|
-
default: () => '重置'
|
|
20227
|
-
}
|
|
20228
|
-
},
|
|
20229
|
-
data() {
|
|
20230
|
-
return {
|
|
20231
|
-
form: this.value,
|
|
20232
|
-
height: 0,
|
|
20233
|
-
opened: false
|
|
20234
|
-
};
|
|
20235
|
-
},
|
|
20236
|
-
created() {
|
|
20237
|
-
this.create();
|
|
20238
|
-
},
|
|
20239
|
-
mounted() {
|
|
20240
|
-
this.update();
|
|
20241
|
-
},
|
|
20242
|
-
destroyed() {
|
|
20243
|
-
this.create = null;
|
|
20244
|
-
this.update = null;
|
|
20245
|
-
this.submit = null;
|
|
20246
|
-
this.cancel = null;
|
|
20247
|
-
this.filter = null;
|
|
20248
|
-
this.result = null;
|
|
20249
|
-
this.switch = null;
|
|
20250
|
-
this.format = null;
|
|
20251
|
-
this.output = null;
|
|
20252
|
-
},
|
|
20253
|
-
watch: {
|
|
20254
|
-
values() {
|
|
20255
|
-
this.create();
|
|
20256
|
-
}
|
|
20257
|
-
},
|
|
20258
|
-
methods: {
|
|
20259
|
-
create() {
|
|
20260
|
-
// 创建表单
|
|
20261
|
-
if (this.config && Object.keys(this.config).length > 0) {
|
|
20262
|
-
// 格式化表单配置对象(this.config)为数据双向绑定对象
|
|
20263
|
-
let data = {};
|
|
20264
|
-
Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
|
|
20265
|
-
let {
|
|
20266
|
-
...r
|
|
20267
|
-
} = this.config[a];
|
|
20268
|
-
if (!r.render) {
|
|
20269
|
-
let range = r.range || r.scope || r.both || r.than || null;
|
|
20270
|
-
if (range) {
|
|
20271
|
-
data[`${a}LE`] = '';
|
|
20272
|
-
data[`${a}GE`] = '';
|
|
20273
|
-
} else {
|
|
20274
|
-
data[a] = r.default ? r.default : '';
|
|
20275
|
-
}
|
|
20276
|
-
}
|
|
20277
|
-
});
|
|
20278
|
-
this.form = data;
|
|
20279
|
-
}
|
|
20280
|
-
},
|
|
20281
|
-
update() {
|
|
20282
|
-
let rows = Math.ceil(Object.keys(this.config).length / this.cols);
|
|
20283
|
-
this.height = this.$el.clientHeight * (rows - 1);
|
|
20284
|
-
},
|
|
20285
|
-
submit(e) {
|
|
20286
|
-
// 提交表单
|
|
20287
|
-
e && e.preventDefault();
|
|
20288
|
-
let pass = !this.check; // 判断是否是空表单
|
|
20289
|
-
for (let a in this.form) if (this.form[a] != '') pass = true;
|
|
20290
|
-
if (pass) {
|
|
20291
|
-
let result = this.filter();
|
|
20292
|
-
const {
|
|
20293
|
-
formParams,
|
|
20294
|
-
pageParams
|
|
20295
|
-
} = this.$store.state;
|
|
20296
|
-
this.$store.commit('setFormParams', result); // 添加查询参数
|
|
20297
|
-
this.$store.commit('setPageParams', {
|
|
20298
|
-
...pageParams,
|
|
20299
|
-
page: 1
|
|
20300
|
-
}); // 重置分页参数
|
|
20301
|
-
this.$nextTick(() => {
|
|
20302
|
-
let change = false;
|
|
20303
|
-
Object.keys(result).forEach(a => result[a] != formParams[a] && (change = true));
|
|
20304
|
-
if (change) this.$emit('submit', {
|
|
20305
|
-
...result,
|
|
20306
|
-
...pageParams,
|
|
20307
|
-
page: 1
|
|
20308
|
-
}); // 派发事件并重置当前分页
|
|
20309
|
-
return result;
|
|
20310
|
-
});
|
|
20311
|
-
}
|
|
20312
|
-
},
|
|
20313
|
-
cancel(e) {
|
|
20314
|
-
// 重置表单
|
|
20315
|
-
e && e.preventDefault();
|
|
20316
|
-
let pass = !this.check; // 判断是否是空表单
|
|
20317
|
-
for (let a in this.form) if (this.form[a] != '') pass = true;
|
|
20318
|
-
if (pass) {
|
|
20319
|
-
const {
|
|
20320
|
-
pageParams
|
|
20321
|
-
} = this.$store.state;
|
|
20322
|
-
this.$store.commit('setPageParams', {
|
|
20323
|
-
...pageParams,
|
|
20324
|
-
page: 1
|
|
20325
|
-
}); // 重置分页参数
|
|
20326
|
-
this.$store.commit('setFormParams', {}); // 重置查询参数
|
|
20327
|
-
this.$nextTick(() => {
|
|
20328
|
-
for (let a in this.form) this.form[a] = '';
|
|
20329
|
-
this.$nextTick(() => {
|
|
20330
|
-
this.$refs.form && this.$refs.form.resetFields();
|
|
20331
|
-
this.$nextTick(() => this.$emit('cancel', this.form));
|
|
20332
|
-
});
|
|
20333
|
-
});
|
|
20334
|
-
}
|
|
20335
|
-
},
|
|
20336
|
-
filter() {
|
|
20337
|
-
let data = {};
|
|
20338
|
-
Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
|
|
20339
|
-
let {
|
|
20340
|
-
like = null,
|
|
20341
|
-
...r
|
|
20342
|
-
} = this.config[a];
|
|
20343
|
-
let range = r.range || r.scope || r.both || r.than || null;
|
|
20344
|
-
if (range) {
|
|
20345
|
-
this.form[`${a}LE`] != '' && (data[`${a}LE`] = this.form[`${a}LE`]);
|
|
20346
|
-
this.form[`${a}GE`] != '' && (data[`${a}GE`] = this.form[`${a}GE`]);
|
|
20347
|
-
} else {
|
|
20348
|
-
let value = this.form[a];
|
|
20349
|
-
if (value) {
|
|
20350
|
-
if (r.split && typeof r.split == 'object' && r.split.length > 0) {
|
|
20351
|
-
r.split.forEach((c, d) => data[c] = value != '' && typeof value == 'object' && value.length > 0 ? value[d] : value);
|
|
20352
|
-
} else {
|
|
20353
|
-
if (like) {
|
|
20354
|
-
if (like == 'left' || like && like == 'l') data[a] = '%' + value;
|
|
20355
|
-
if (like == 'right' || like && like == 'r') data[a] = value + '%';else data[a] = '%' + value + '%';
|
|
20356
|
-
} else {
|
|
20357
|
-
if (value.includes(' 00:00:00')) {
|
|
20358
|
-
data[a] = '%' + value.split(' 00:00:00')[0] + '%';
|
|
20359
|
-
} else {
|
|
20360
|
-
data[a] = value;
|
|
20361
|
-
}
|
|
20362
|
-
}
|
|
20363
|
-
}
|
|
20364
|
-
}
|
|
20365
|
-
}
|
|
20366
|
-
});
|
|
20367
|
-
let form = {};
|
|
20368
|
-
Object.keys(data).length > 0 && Object.keys(data).forEach(a => {
|
|
20369
|
-
if (data[a] != '%' && data[a] != '%%' && data[a] != 'null' && data[a] != 'undefined' && data[a] != null && data[a] != undefined) {
|
|
20370
|
-
form[a] = data[a];
|
|
20371
|
-
}
|
|
20372
|
-
});
|
|
20373
|
-
return form;
|
|
20374
|
-
},
|
|
20375
|
-
result() {
|
|
20376
|
-
return this.filter(this.form);
|
|
20377
|
-
},
|
|
20378
|
-
switch() {
|
|
20379
|
-
this.opened = !this.opened;
|
|
20380
|
-
},
|
|
20381
|
-
format(a = '', field = '', placeholder = '') {
|
|
20382
|
-
const h = this.$createElement;
|
|
20383
|
-
let {
|
|
20384
|
-
...r
|
|
20385
|
-
} = this.config[a];
|
|
20386
|
-
let config = {
|
|
20387
|
-
size: r.size ? r.size : this.size,
|
|
20388
|
-
field: field != '' ? field : a,
|
|
20389
|
-
change: () => this.change(),
|
|
20390
|
-
disabled: this.loading,
|
|
20391
|
-
form: this.form,
|
|
20392
|
-
...r
|
|
20393
|
-
};
|
|
20394
|
-
return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
20395
|
-
"attrs": {
|
|
20396
|
-
"config": placeholder != '' ? {
|
|
20397
|
-
...config,
|
|
20398
|
-
placeholder
|
|
20399
|
-
} : config
|
|
20400
|
-
}
|
|
20401
|
-
});
|
|
20402
|
-
},
|
|
20403
|
-
output(a, b) {
|
|
20404
|
-
const h = this.$createElement;
|
|
20405
|
-
let {
|
|
20406
|
-
...r
|
|
20407
|
-
} = this.config[a];
|
|
20408
|
-
let range = r.range || r.scope || r.both || r.than || null;
|
|
20409
|
-
let label = this.label ? r.text || r.label || r.title : '';
|
|
20410
|
-
let style = this.cols != '' ? {
|
|
20411
|
-
width: r.width ? r.width : `${100 / this.cols}%`
|
|
20412
|
-
} : {};
|
|
20413
|
-
let prefixPlaceholder = r.placeholder && r.placeholder.length > 0 ? r.placeholder[0] : '最高';
|
|
20414
|
-
let suffixPlaceholder = r.placeholder && r.placeholder.length > 1 ? r.placeholder[1] : '最低';
|
|
20415
|
-
return h("el-col", {
|
|
20416
|
-
"key": b,
|
|
20417
|
-
"style": style
|
|
20418
|
-
}, [h("el-form-item", {
|
|
20419
|
-
"attrs": {
|
|
20420
|
-
"prop": a,
|
|
20421
|
-
"label": label
|
|
20422
|
-
}
|
|
20423
|
-
}, [range ? h("el-col", {
|
|
20424
|
-
"class": "range-cols"
|
|
20425
|
-
}, [h("el-col", {
|
|
20426
|
-
"attrs": {
|
|
20427
|
-
"span": 12
|
|
20428
|
-
}
|
|
20429
|
-
}, [this.format(a, `${a}LE`, prefixPlaceholder)]), h("el-col", {
|
|
20430
|
-
"attrs": {
|
|
20431
|
-
"span": 12
|
|
20432
|
-
}
|
|
20433
|
-
}, [this.format(a, `${a}GE`, suffixPlaceholder)])]) : this.format(a)])]);
|
|
20434
|
-
},
|
|
20435
|
-
change() {
|
|
20436
|
-
this.$emit('input', this.filter());
|
|
20437
|
-
this.$emit('change', this.filter());
|
|
20438
|
-
}
|
|
20439
|
-
},
|
|
20440
|
-
render() {
|
|
20441
|
-
const h = arguments[0];
|
|
20442
|
-
const {
|
|
20443
|
-
...props
|
|
20444
|
-
} = this.$attrs;
|
|
20445
|
-
const {
|
|
20446
|
-
submit = null,
|
|
20447
|
-
cancel = null
|
|
20448
|
-
} = this.$listeners;
|
|
20449
|
-
return h("div", {
|
|
20450
|
-
"class": "a-f-search",
|
|
20451
|
-
"style": {
|
|
20452
|
-
padding: this.margin
|
|
20453
|
-
}
|
|
20454
|
-
}, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
20455
|
-
"ref": "form",
|
|
20456
|
-
"attrs": {
|
|
20457
|
-
"size": this.size,
|
|
20458
|
-
"inline": this.inline
|
|
20459
|
-
}
|
|
20460
|
-
}, {
|
|
20461
|
-
"props": {
|
|
20462
|
-
model: this.form,
|
|
20463
|
-
...props
|
|
20464
|
-
}
|
|
20465
|
-
}, {
|
|
20466
|
-
"attrs": {
|
|
20467
|
-
"labelWidth": this.labelWidth,
|
|
20468
|
-
"labelPosition": this.labelPosition
|
|
20469
|
-
}
|
|
20470
|
-
}]), [h("div", {
|
|
20471
|
-
"class": "column"
|
|
20472
|
-
}, [h("el-row", {
|
|
20473
|
-
"attrs": {
|
|
20474
|
-
"gutter": Number(this.gutter)
|
|
20475
|
-
},
|
|
20476
|
-
"class": "main-rows"
|
|
20477
|
-
}, [Object.keys(this.config).map((a, b) => b < this.cols && this.output(a, b))]), h("el-row", {
|
|
20478
|
-
"attrs": {
|
|
20479
|
-
"gutter": Number(this.gutter)
|
|
20480
|
-
},
|
|
20481
|
-
"class": "fold-rows",
|
|
20482
|
-
"style": {
|
|
20483
|
-
height: this.opened ? `${this.height}px` : '0'
|
|
20484
|
-
}
|
|
20485
|
-
}, [Object.keys(this.config).map((a, b) => b > this.cols - 1 && this.output(a, b))])]), (Object.keys(this.config).length > this.cols || submit || cancel) && h("div", {
|
|
20486
|
-
"class": "action",
|
|
20487
|
-
"style": {
|
|
20488
|
-
paddingLeft: `${this.gutter}px`
|
|
20489
|
-
}
|
|
20490
|
-
}, [h("el-form-item", {
|
|
20491
|
-
"attrs": {
|
|
20492
|
-
"label": "action"
|
|
20493
|
-
}
|
|
20494
|
-
}, [Object.keys(this.config).length > this.cols && h("el-button", {
|
|
20495
|
-
"attrs": {
|
|
20496
|
-
"disabled": this.loading,
|
|
20497
|
-
"type": "text"
|
|
20498
|
-
},
|
|
20499
|
-
"class": "collapse-button",
|
|
20500
|
-
"on": {
|
|
20501
|
-
"click": this.switch
|
|
20502
|
-
}
|
|
20503
|
-
}, [h("i", {
|
|
20504
|
-
"class": `el-icon-arrow-${this.opened ? 'up' : 'down'}`
|
|
20505
|
-
}), this.opened ? '收起' : '展开']), submit && h("el-button", {
|
|
20506
|
-
"attrs": {
|
|
20507
|
-
"disabled": this.loading,
|
|
20508
|
-
"type": "primary"
|
|
20509
|
-
},
|
|
20510
|
-
"on": {
|
|
20511
|
-
"click": this.submit
|
|
20512
|
-
}
|
|
20513
|
-
}, [this.submitText]), cancel && h("el-button", {
|
|
20514
|
-
"attrs": {
|
|
20515
|
-
"disabled": this.loading,
|
|
20516
|
-
"type": "default"
|
|
20517
|
-
},
|
|
20518
|
-
"on": {
|
|
20519
|
-
"click": this.cancel
|
|
20520
|
-
}
|
|
20521
|
-
}, [this.cancelText])])])])]);
|
|
20522
|
-
}
|
|
20523
|
-
});
|
|
20524
|
-
|
|
20525
|
-
/***/ }),
|
|
20526
|
-
|
|
20527
19791
|
/***/ "23df":
|
|
20528
19792
|
/***/ (function(module, exports, __webpack_require__) {
|
|
20529
19793
|
|
|
@@ -21909,6 +21173,13 @@ module.exports = _default;
|
|
|
21909
21173
|
|
|
21910
21174
|
/***/ }),
|
|
21911
21175
|
|
|
21176
|
+
/***/ "2769":
|
|
21177
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
21178
|
+
|
|
21179
|
+
// extracted by mini-css-extract-plugin
|
|
21180
|
+
|
|
21181
|
+
/***/ }),
|
|
21182
|
+
|
|
21912
21183
|
/***/ "2772":
|
|
21913
21184
|
/***/ (function(module, exports) {
|
|
21914
21185
|
|
|
@@ -28032,417 +27303,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28032
27303
|
|
|
28033
27304
|
/***/ }),
|
|
28034
27305
|
|
|
28035
|
-
/***/ "3cef":
|
|
28036
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
28037
|
-
|
|
28038
|
-
"use strict";
|
|
28039
|
-
__webpack_require__.r(__webpack_exports__);
|
|
28040
|
-
/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
|
|
28041
|
-
/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__);
|
|
28042
|
-
/* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2234");
|
|
28043
|
-
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("9203");
|
|
28044
|
-
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_2__);
|
|
28045
|
-
|
|
28046
|
-
|
|
28047
|
-
|
|
28048
|
-
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
28049
|
-
name: 'AfEditor',
|
|
28050
|
-
components: {
|
|
28051
|
-
AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"]
|
|
28052
|
-
},
|
|
28053
|
-
props: {
|
|
28054
|
-
value: {
|
|
28055
|
-
type: Object,
|
|
28056
|
-
default: () => ({})
|
|
28057
|
-
},
|
|
28058
|
-
disabled: {
|
|
28059
|
-
type: Boolean,
|
|
28060
|
-
default: () => false
|
|
28061
|
-
},
|
|
28062
|
-
margin: {
|
|
28063
|
-
type: String,
|
|
28064
|
-
default: () => '0'
|
|
28065
|
-
},
|
|
28066
|
-
pure: {
|
|
28067
|
-
type: Boolean,
|
|
28068
|
-
default: () => true
|
|
28069
|
-
},
|
|
28070
|
-
must: {
|
|
28071
|
-
type: Boolean,
|
|
28072
|
-
default: () => false
|
|
28073
|
-
},
|
|
28074
|
-
inline: {
|
|
28075
|
-
type: Boolean,
|
|
28076
|
-
default: () => false
|
|
28077
|
-
},
|
|
28078
|
-
size: {
|
|
28079
|
-
type: String,
|
|
28080
|
-
default: () => 'small'
|
|
28081
|
-
},
|
|
28082
|
-
rules: {
|
|
28083
|
-
type: Object,
|
|
28084
|
-
default: () => ({})
|
|
28085
|
-
},
|
|
28086
|
-
labelWidth: {
|
|
28087
|
-
type: String,
|
|
28088
|
-
default: () => '100%'
|
|
28089
|
-
},
|
|
28090
|
-
labelPosition: {
|
|
28091
|
-
type: String,
|
|
28092
|
-
default: () => 'top'
|
|
28093
|
-
},
|
|
28094
|
-
itemWidth: {
|
|
28095
|
-
type: String,
|
|
28096
|
-
default: () => ''
|
|
28097
|
-
},
|
|
28098
|
-
cols: {
|
|
28099
|
-
type: String,
|
|
28100
|
-
default: () => '1'
|
|
28101
|
-
},
|
|
28102
|
-
gutter: {
|
|
28103
|
-
type: String,
|
|
28104
|
-
default: () => '10'
|
|
28105
|
-
},
|
|
28106
|
-
config: {
|
|
28107
|
-
type: Object,
|
|
28108
|
-
default: () => ({})
|
|
28109
|
-
},
|
|
28110
|
-
values: {
|
|
28111
|
-
type: Object,
|
|
28112
|
-
default: () => ({})
|
|
28113
|
-
},
|
|
28114
|
-
label: {
|
|
28115
|
-
type: Boolean,
|
|
28116
|
-
default: () => true
|
|
28117
|
-
},
|
|
28118
|
-
check: {
|
|
28119
|
-
type: Boolean,
|
|
28120
|
-
default: () => true
|
|
28121
|
-
},
|
|
28122
|
-
action: {
|
|
28123
|
-
type: Boolean,
|
|
28124
|
-
default: () => true
|
|
28125
|
-
},
|
|
28126
|
-
loading: {
|
|
28127
|
-
type: Boolean,
|
|
28128
|
-
default: () => false
|
|
28129
|
-
},
|
|
28130
|
-
fileRemoveMark: {
|
|
28131
|
-
type: String,
|
|
28132
|
-
default: () => 'will-remove'
|
|
28133
|
-
},
|
|
28134
|
-
finishText: {
|
|
28135
|
-
type: String,
|
|
28136
|
-
default: () => '保存'
|
|
28137
|
-
},
|
|
28138
|
-
submitText: {
|
|
28139
|
-
type: String,
|
|
28140
|
-
default: () => '确定'
|
|
28141
|
-
},
|
|
28142
|
-
rejectText: {
|
|
28143
|
-
type: String,
|
|
28144
|
-
default: () => ''
|
|
28145
|
-
},
|
|
28146
|
-
cancelText: {
|
|
28147
|
-
type: String,
|
|
28148
|
-
default: () => '取消'
|
|
28149
|
-
}
|
|
28150
|
-
},
|
|
28151
|
-
data() {
|
|
28152
|
-
return {
|
|
28153
|
-
form: this.value,
|
|
28154
|
-
randomKey: `key-${Math.random()}`
|
|
28155
|
-
};
|
|
28156
|
-
},
|
|
28157
|
-
created() {
|
|
28158
|
-
this.create();
|
|
28159
|
-
},
|
|
28160
|
-
destroyed() {
|
|
28161
|
-
this.create = null;
|
|
28162
|
-
this.verify = null;
|
|
28163
|
-
this.finish = null;
|
|
28164
|
-
this.submit = null;
|
|
28165
|
-
this.reject = null;
|
|
28166
|
-
this.cancel = null;
|
|
28167
|
-
this.filter = null;
|
|
28168
|
-
this.result = null;
|
|
28169
|
-
this.format = null;
|
|
28170
|
-
},
|
|
28171
|
-
watch: {
|
|
28172
|
-
values: {
|
|
28173
|
-
immediate: true,
|
|
28174
|
-
handler() {
|
|
28175
|
-
this.create();
|
|
28176
|
-
}
|
|
28177
|
-
}
|
|
28178
|
-
},
|
|
28179
|
-
methods: {
|
|
28180
|
-
create() {
|
|
28181
|
-
// 创建表单 格式化表单配置对象(this.config)为数据双向绑定对象
|
|
28182
|
-
this.randomKey = `key-${Math.random()}`;
|
|
28183
|
-
const {
|
|
28184
|
-
config = {},
|
|
28185
|
-
values = {}
|
|
28186
|
-
} = this;
|
|
28187
|
-
let temp = {};
|
|
28188
|
-
let data = {};
|
|
28189
|
-
if (config && Object.keys(config).length > 0) {
|
|
28190
|
-
for (let a in config) temp[a] = '';
|
|
28191
|
-
}
|
|
28192
|
-
if (values && Object.keys(values).length > 0) {
|
|
28193
|
-
// 设置默认值
|
|
28194
|
-
for (let a in temp) {
|
|
28195
|
-
if (a.includes('password')) data[a] = '';else data[a] = isNaN(values[a]) ? values[a] : values[a] != null ? `${values[a]}` : '';
|
|
28196
|
-
}
|
|
28197
|
-
} else {
|
|
28198
|
-
if (!this.pure) {
|
|
28199
|
-
for (let a in config) {
|
|
28200
|
-
// 设置 object 对象(单选框, 下拉框, 开关) 默认值为0
|
|
28201
|
-
let {
|
|
28202
|
-
pure = null,
|
|
28203
|
-
type = null,
|
|
28204
|
-
...r
|
|
28205
|
-
} = config[a];
|
|
28206
|
-
if (!pure) {
|
|
28207
|
-
if (type && (type == 'radio' || type == 'select' || type == 'switch')) {
|
|
28208
|
-
data[a] = r.default || '0';
|
|
28209
|
-
} else data[a] = r.default || '';
|
|
28210
|
-
} else data[a] = '';
|
|
28211
|
-
}
|
|
28212
|
-
} else {
|
|
28213
|
-
for (let a in temp) data[a] = '';
|
|
28214
|
-
}
|
|
28215
|
-
}
|
|
28216
|
-
this.form = data;
|
|
28217
|
-
},
|
|
28218
|
-
verify() {
|
|
28219
|
-
// 表单验证
|
|
28220
|
-
let change = false;
|
|
28221
|
-
let success = false;
|
|
28222
|
-
this.$refs['form'].validate(valid => {
|
|
28223
|
-
if (valid) {
|
|
28224
|
-
success = true;
|
|
28225
|
-
let result = this.refine(this.form);
|
|
28226
|
-
let values = this.refine(this.values);
|
|
28227
|
-
Object.keys(result).forEach(a => result[a] != values[a] && (change = true));
|
|
28228
|
-
}
|
|
28229
|
-
});
|
|
28230
|
-
return change && success;
|
|
28231
|
-
},
|
|
28232
|
-
finish(e) {
|
|
28233
|
-
e && e.preventDefault();
|
|
28234
|
-
this.$emit('finish', this.result());
|
|
28235
|
-
},
|
|
28236
|
-
submit(e) {
|
|
28237
|
-
// 提交表单
|
|
28238
|
-
e && e.preventDefault();
|
|
28239
|
-
if (!this.check) this.$emit('submit');
|
|
28240
|
-
this.$refs['form'].validate(valid => {
|
|
28241
|
-
if (valid) {
|
|
28242
|
-
let data = {};
|
|
28243
|
-
if (Object.keys(this.config).length > 0) {
|
|
28244
|
-
for (let a in this.config) {
|
|
28245
|
-
// 格式化数据模糊查询
|
|
28246
|
-
if (this.form[a] && Object.keys(this.form[a]).length > 0 && this.form[a].old && this.form[a].old.split('=')[1] != '') {
|
|
28247
|
-
// 判断是否有默认图片删除
|
|
28248
|
-
const {
|
|
28249
|
-
old
|
|
28250
|
-
} = this.form[a];
|
|
28251
|
-
data[a] = this.form[a];
|
|
28252
|
-
data[`${a}-${this.fileRemoveMark}`] = old;
|
|
28253
|
-
} else data[a] = this.form[a];
|
|
28254
|
-
}
|
|
28255
|
-
}
|
|
28256
|
-
let change = false;
|
|
28257
|
-
let result = this.refine(data);
|
|
28258
|
-
let values = this.refine(this.values);
|
|
28259
|
-
Object.keys(result).forEach(a => result[a] != values[a] && (change = true));
|
|
28260
|
-
if (change) this.$emit('submit', this.filter(result));
|
|
28261
|
-
return result;
|
|
28262
|
-
}
|
|
28263
|
-
});
|
|
28264
|
-
},
|
|
28265
|
-
refine(form = {}) {
|
|
28266
|
-
let data = {};
|
|
28267
|
-
Object.keys(form).forEach(a => {
|
|
28268
|
-
if (a != undefined && a != 'undefined' && form[a] != '%' && form[a] != '%%' && form[a] != 'null' && form[a] != 'undefined' && form[a] != null && form[a] != undefined) {
|
|
28269
|
-
data[a] = form[a];
|
|
28270
|
-
} else data[a] = '';
|
|
28271
|
-
});
|
|
28272
|
-
return data;
|
|
28273
|
-
},
|
|
28274
|
-
reject(e) {
|
|
28275
|
-
e && e.preventDefault();
|
|
28276
|
-
this.$emit('reject', this.result());
|
|
28277
|
-
},
|
|
28278
|
-
regain() {
|
|
28279
|
-
this.$refs['form'] && this.$refs['form'].resetFields();
|
|
28280
|
-
},
|
|
28281
|
-
cancel(e) {
|
|
28282
|
-
e && e.preventDefault();
|
|
28283
|
-
this.$emit('cancel', this.form);
|
|
28284
|
-
this.$nextTick(() => {
|
|
28285
|
-
for (let a in this.form) this.form[a] = '';
|
|
28286
|
-
this.$nextTick(() => this.$refs['form'] && this.$refs['form'].resetFields());
|
|
28287
|
-
});
|
|
28288
|
-
},
|
|
28289
|
-
filter(form = {}) {
|
|
28290
|
-
// 过滤空值属性
|
|
28291
|
-
const data = {};
|
|
28292
|
-
for (let a in form) {
|
|
28293
|
-
if (a != undefined && a != 'undefined' && form[a] != '%' && form[a] != '%%' && form[a] != 'null' && form[a] != 'undefined' && form[a] != null && form[a] != undefined) {
|
|
28294
|
-
data[a] = form[a];
|
|
28295
|
-
}
|
|
28296
|
-
}
|
|
28297
|
-
return data;
|
|
28298
|
-
},
|
|
28299
|
-
result() {
|
|
28300
|
-
return this.filter(this.form);
|
|
28301
|
-
},
|
|
28302
|
-
format(a, b) {
|
|
28303
|
-
const h = this.$createElement;
|
|
28304
|
-
const {
|
|
28305
|
-
...r
|
|
28306
|
-
} = this.config[a];
|
|
28307
|
-
const text = r.label || r.title || r.text;
|
|
28308
|
-
const must = {
|
|
28309
|
-
required: true,
|
|
28310
|
-
trigger: 'blur',
|
|
28311
|
-
message: `${text}不能为空`
|
|
28312
|
-
};
|
|
28313
|
-
const rule = r['rule'] ? r['rule'] : r['must'] || this.must ? [{
|
|
28314
|
-
...must
|
|
28315
|
-
}] : [];
|
|
28316
|
-
const rules = this.disabled || r.disabled ? [] : r['must'] && r['rule'] ? [{
|
|
28317
|
-
...must
|
|
28318
|
-
}, ...r['rule']] : rule;
|
|
28319
|
-
const config = {
|
|
28320
|
-
form: this.form,
|
|
28321
|
-
size: r.size ? r.size : this.size,
|
|
28322
|
-
field: a,
|
|
28323
|
-
disabled: this.disabled || this.loading,
|
|
28324
|
-
change: () => this.change(),
|
|
28325
|
-
...r
|
|
28326
|
-
};
|
|
28327
|
-
return h("el-form-item", {
|
|
28328
|
-
"key": b,
|
|
28329
|
-
"attrs": {
|
|
28330
|
-
"prop": a,
|
|
28331
|
-
"rules": rules,
|
|
28332
|
-
"label": this.label ? r.type && r.type == 'checkbox' ? '' : text : ''
|
|
28333
|
-
},
|
|
28334
|
-
"style": {
|
|
28335
|
-
width: r.width ? r.width : this.itemWidth
|
|
28336
|
-
}
|
|
28337
|
-
}, [r.hint ? h("el-row", {
|
|
28338
|
-
"attrs": {
|
|
28339
|
-
"gutter": Number(this.gutter)
|
|
28340
|
-
}
|
|
28341
|
-
}, [h("el-col", {
|
|
28342
|
-
"attrs": {
|
|
28343
|
-
"span": 12
|
|
28344
|
-
}
|
|
28345
|
-
}, [h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
28346
|
-
"attrs": {
|
|
28347
|
-
"config": config
|
|
28348
|
-
}
|
|
28349
|
-
})]), h("el-col", {
|
|
28350
|
-
"attrs": {
|
|
28351
|
-
"span": 12
|
|
28352
|
-
}
|
|
28353
|
-
}, [h("span", {
|
|
28354
|
-
"class": "hint"
|
|
28355
|
-
}, [`(${r.hint})`])])]) : h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
28356
|
-
"attrs": {
|
|
28357
|
-
"config": config
|
|
28358
|
-
}
|
|
28359
|
-
})]);
|
|
28360
|
-
},
|
|
28361
|
-
change() {
|
|
28362
|
-
this.$emit('input', this.form);
|
|
28363
|
-
this.$emit('change', this.form);
|
|
28364
|
-
}
|
|
28365
|
-
},
|
|
28366
|
-
render() {
|
|
28367
|
-
const h = arguments[0];
|
|
28368
|
-
const {
|
|
28369
|
-
...props
|
|
28370
|
-
} = this.$attrs;
|
|
28371
|
-
const {
|
|
28372
|
-
finish,
|
|
28373
|
-
submit,
|
|
28374
|
-
reject,
|
|
28375
|
-
cancel
|
|
28376
|
-
} = this.$listeners;
|
|
28377
|
-
return h("div", {
|
|
28378
|
-
"class": !this.inline ? 'a-f-editor vertical' : 'a-f-editor',
|
|
28379
|
-
"style": {
|
|
28380
|
-
padding: this.margin
|
|
28381
|
-
}
|
|
28382
|
-
}, [h("div", {
|
|
28383
|
-
"class": this.disabled ? 'disabled' : ''
|
|
28384
|
-
}, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
28385
|
-
"ref": "form",
|
|
28386
|
-
"attrs": {
|
|
28387
|
-
"size": this.size,
|
|
28388
|
-
"inline": this.inline,
|
|
28389
|
-
"labelWidth": this.labelWidth,
|
|
28390
|
-
"labelPosition": this.labelPosition
|
|
28391
|
-
}
|
|
28392
|
-
}, {
|
|
28393
|
-
"props": {
|
|
28394
|
-
model: this.form,
|
|
28395
|
-
rules: Object.keys(this.rules).length > 0 ? this.rules : {},
|
|
28396
|
-
...props
|
|
28397
|
-
}
|
|
28398
|
-
}]), [h("el-row", {
|
|
28399
|
-
"attrs": {
|
|
28400
|
-
"gutter": this.cols != '' ? this.gutter != '' ? Number(this.gutter) : 0 : 0
|
|
28401
|
-
}
|
|
28402
|
-
}, [Object.keys(this.config).map((a, b) => this.config[a].span && this.config[a].span != '' || this.cols != '' ? h("el-col", {
|
|
28403
|
-
"key": b,
|
|
28404
|
-
"attrs": {
|
|
28405
|
-
"span": Number(this.config[a].span) || 24 / Number(this.cols)
|
|
28406
|
-
}
|
|
28407
|
-
}, [this.format(a, b)]) : this.format(a, b)), this.$slots.default]), (finish || submit || reject || cancel) && h("div", {
|
|
28408
|
-
"class": "action"
|
|
28409
|
-
}, [h("el-form-item", [finish && this.finishText != '' && h("el-button", {
|
|
28410
|
-
"attrs": {
|
|
28411
|
-
"loading": this.loading,
|
|
28412
|
-
"type": "success"
|
|
28413
|
-
},
|
|
28414
|
-
"on": {
|
|
28415
|
-
"click": this.finish
|
|
28416
|
-
}
|
|
28417
|
-
}, [this.finishText]), submit && this.submitText != '' && h("el-button", {
|
|
28418
|
-
"attrs": {
|
|
28419
|
-
"loading": this.loading,
|
|
28420
|
-
"type": "primary"
|
|
28421
|
-
},
|
|
28422
|
-
"on": {
|
|
28423
|
-
"click": this.submit
|
|
28424
|
-
}
|
|
28425
|
-
}, [this.submitText]), reject && this.rejectText != '' && h("el-button", {
|
|
28426
|
-
"attrs": {
|
|
28427
|
-
"loading": this.loading,
|
|
28428
|
-
"type": "danger"
|
|
28429
|
-
},
|
|
28430
|
-
"on": {
|
|
28431
|
-
"click": this.reject
|
|
28432
|
-
}
|
|
28433
|
-
}, [this.rejectText]), cancel && this.cancelText != '' && h("el-button", {
|
|
28434
|
-
"attrs": {
|
|
28435
|
-
"disabled": this.loading
|
|
28436
|
-
},
|
|
28437
|
-
"on": {
|
|
28438
|
-
"click": this.cancel
|
|
28439
|
-
}
|
|
28440
|
-
}, [this.cancelText])])])])])]);
|
|
28441
|
-
}
|
|
28442
|
-
});
|
|
28443
|
-
|
|
28444
|
-
/***/ }),
|
|
28445
|
-
|
|
28446
27306
|
/***/ "3cf2":
|
|
28447
27307
|
/***/ (function(module, exports) {
|
|
28448
27308
|
|
|
@@ -37357,11 +36217,6 @@ var map = {
|
|
|
37357
36217
|
"./Aeditor/Ueditor/index.js": "2938",
|
|
37358
36218
|
"./Aempty/index.js": "bd5e",
|
|
37359
36219
|
"./Aenume/index.js": "6cc8",
|
|
37360
|
-
"./Aform copy/AfEditor/index.js": "3cef",
|
|
37361
|
-
"./Aform copy/AfSearch/index.js": "230c",
|
|
37362
|
-
"./Aform copy/BfSearch/index.js": "c0f0",
|
|
37363
|
-
"./Aform copy/CfSearch/index.js": "a237",
|
|
37364
|
-
"./Aform copy/index.js": "0d0c",
|
|
37365
36220
|
"./Aform/AfEditor/index.js": "b550",
|
|
37366
36221
|
"./Aform/AfSearch/index.js": "1b78",
|
|
37367
36222
|
"./Aform/BfEditor/index.js": "4248",
|
|
@@ -37395,6 +36250,7 @@ var map = {
|
|
|
37395
36250
|
"./Bcard/index.js": "4df8",
|
|
37396
36251
|
"./BformItem/index.js": "5c61",
|
|
37397
36252
|
"./Bmap/index.js": "e579",
|
|
36253
|
+
"./Bpages/index.js": "7c09",
|
|
37398
36254
|
"./Btable/index.js": "98ee",
|
|
37399
36255
|
"./CformItem/index.js": "5a83",
|
|
37400
36256
|
"./Ctable/index.js": "78ab"
|
|
@@ -48037,13 +46893,6 @@ webpackContext.id = "6dd9";
|
|
|
48037
46893
|
|
|
48038
46894
|
/***/ }),
|
|
48039
46895
|
|
|
48040
|
-
/***/ "6e39":
|
|
48041
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
48042
|
-
|
|
48043
|
-
// extracted by mini-css-extract-plugin
|
|
48044
|
-
|
|
48045
|
-
/***/ }),
|
|
48046
|
-
|
|
48047
46896
|
/***/ "6e8c":
|
|
48048
46897
|
/***/ (function(module, exports, __webpack_require__) {
|
|
48049
46898
|
|
|
@@ -53621,6 +52470,109 @@ module.exports = function (bitmap, value) {
|
|
|
53621
52470
|
};
|
|
53622
52471
|
|
|
53623
52472
|
|
|
52473
|
+
/***/ }),
|
|
52474
|
+
|
|
52475
|
+
/***/ "7c09":
|
|
52476
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
52477
|
+
|
|
52478
|
+
"use strict";
|
|
52479
|
+
__webpack_require__.r(__webpack_exports__);
|
|
52480
|
+
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2769");
|
|
52481
|
+
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
52482
|
+
|
|
52483
|
+
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
52484
|
+
name: 'Bpages',
|
|
52485
|
+
props: {
|
|
52486
|
+
small: {
|
|
52487
|
+
type: Boolean,
|
|
52488
|
+
default: () => false
|
|
52489
|
+
},
|
|
52490
|
+
page: {
|
|
52491
|
+
type: Number,
|
|
52492
|
+
default: () => 1
|
|
52493
|
+
},
|
|
52494
|
+
size: {
|
|
52495
|
+
type: Number,
|
|
52496
|
+
default: () => 10
|
|
52497
|
+
},
|
|
52498
|
+
pageSizes: {
|
|
52499
|
+
type: Array,
|
|
52500
|
+
default: () => [10, 20, 50, 100]
|
|
52501
|
+
},
|
|
52502
|
+
total: {
|
|
52503
|
+
type: Number,
|
|
52504
|
+
default: () => 0
|
|
52505
|
+
},
|
|
52506
|
+
prevText: {
|
|
52507
|
+
type: String,
|
|
52508
|
+
default: () => '上页'
|
|
52509
|
+
},
|
|
52510
|
+
nextText: {
|
|
52511
|
+
type: String,
|
|
52512
|
+
default: () => '下页'
|
|
52513
|
+
},
|
|
52514
|
+
complete: {
|
|
52515
|
+
type: Boolean,
|
|
52516
|
+
default: () => true
|
|
52517
|
+
},
|
|
52518
|
+
background: {
|
|
52519
|
+
type: Boolean,
|
|
52520
|
+
default: () => true
|
|
52521
|
+
}
|
|
52522
|
+
},
|
|
52523
|
+
data() {
|
|
52524
|
+
return {
|
|
52525
|
+
pages: {
|
|
52526
|
+
page: this.page,
|
|
52527
|
+
size: this.size
|
|
52528
|
+
}
|
|
52529
|
+
};
|
|
52530
|
+
},
|
|
52531
|
+
watch: {
|
|
52532
|
+
page(page) {
|
|
52533
|
+
this.pages.page = page;
|
|
52534
|
+
},
|
|
52535
|
+
size(size) {
|
|
52536
|
+
this.pages.size = size;
|
|
52537
|
+
}
|
|
52538
|
+
},
|
|
52539
|
+
methods: {
|
|
52540
|
+
currentChange(page) {
|
|
52541
|
+
this.pages.page = page;
|
|
52542
|
+
this.$emit('changePage', this.pages);
|
|
52543
|
+
},
|
|
52544
|
+
sizeChange(size) {
|
|
52545
|
+
this.pages.size = size;
|
|
52546
|
+
this.$emit('changeSize', this.pages);
|
|
52547
|
+
}
|
|
52548
|
+
},
|
|
52549
|
+
render() {
|
|
52550
|
+
const h = arguments[0];
|
|
52551
|
+
return h("div", {
|
|
52552
|
+
"class": "b-pages"
|
|
52553
|
+
}, [h("el-pagination", {
|
|
52554
|
+
"attrs": {
|
|
52555
|
+
"small": this.small,
|
|
52556
|
+
"current-page": this.pages.page,
|
|
52557
|
+
"page-size": this.pages.size,
|
|
52558
|
+
"page-sizes": this.pageSizes,
|
|
52559
|
+
"layout": this.complete ? 'total, sizes, prev, pager, next, jumper' : 'prev, pager, next',
|
|
52560
|
+
"total": this.total,
|
|
52561
|
+
"prev-text": this.prevText,
|
|
52562
|
+
"next-text": this.nextText,
|
|
52563
|
+
"background": this.background
|
|
52564
|
+
},
|
|
52565
|
+
"on": {
|
|
52566
|
+
"current-change": this.currentChange,
|
|
52567
|
+
"size-change": this.sizeChange
|
|
52568
|
+
},
|
|
52569
|
+
"props": {
|
|
52570
|
+
...this._props
|
|
52571
|
+
}
|
|
52572
|
+
})]);
|
|
52573
|
+
}
|
|
52574
|
+
});
|
|
52575
|
+
|
|
53624
52576
|
/***/ }),
|
|
53625
52577
|
|
|
53626
52578
|
/***/ "7c85":
|
|
@@ -61684,13 +60636,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
61684
60636
|
|
|
61685
60637
|
/***/ }),
|
|
61686
60638
|
|
|
61687
|
-
/***/ "9203":
|
|
61688
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
61689
|
-
|
|
61690
|
-
// extracted by mini-css-extract-plugin
|
|
61691
|
-
|
|
61692
|
-
/***/ }),
|
|
61693
|
-
|
|
61694
60639
|
/***/ "9211":
|
|
61695
60640
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
61696
60641
|
|
|
@@ -61803,18 +60748,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
61803
60748
|
Aform: _components_Aform__WEBPACK_IMPORTED_MODULE_0__["default"]
|
|
61804
60749
|
},
|
|
61805
60750
|
props: {
|
|
61806
|
-
visible: {
|
|
61807
|
-
type: Boolean,
|
|
61808
|
-
default: () => false
|
|
61809
|
-
},
|
|
61810
|
-
title: {
|
|
61811
|
-
type: String,
|
|
61812
|
-
default: () => '编辑'
|
|
61813
|
-
},
|
|
61814
|
-
width: {
|
|
61815
|
-
type: String,
|
|
61816
|
-
default: () => '600px'
|
|
61817
|
-
},
|
|
61818
60751
|
rule: {
|
|
61819
60752
|
type: Boolean,
|
|
61820
60753
|
default: () => true
|
|
@@ -61828,10 +60761,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
61828
60761
|
default: () => true
|
|
61829
60762
|
},
|
|
61830
60763
|
config: {
|
|
61831
|
-
type: Array,
|
|
61832
|
-
default: () => []
|
|
61833
|
-
},
|
|
61834
|
-
object: {
|
|
61835
60764
|
type: Object,
|
|
61836
60765
|
default: () => ({})
|
|
61837
60766
|
},
|
|
@@ -61851,34 +60780,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
61851
60780
|
type: String,
|
|
61852
60781
|
default: () => '取消'
|
|
61853
60782
|
},
|
|
61854
|
-
loading: {
|
|
61855
|
-
type: Boolean,
|
|
61856
|
-
default: () => false
|
|
61857
|
-
},
|
|
61858
60783
|
labelPosition: {
|
|
61859
60784
|
type: String,
|
|
61860
60785
|
default: () => 'top'
|
|
61861
60786
|
}
|
|
61862
60787
|
},
|
|
61863
|
-
methods: {
|
|
61864
|
-
finish(form) {
|
|
61865
|
-
this.$emit('finish', form);
|
|
61866
|
-
},
|
|
61867
|
-
submit(form) {
|
|
61868
|
-
this.$emit('submit', form);
|
|
61869
|
-
},
|
|
61870
|
-
cancel(form) {
|
|
61871
|
-
this.$emit('cancel', form);
|
|
61872
|
-
}
|
|
61873
|
-
},
|
|
61874
60788
|
render() {
|
|
61875
60789
|
const h = arguments[0];
|
|
61876
60790
|
const {
|
|
61877
60791
|
rule,
|
|
61878
60792
|
rules,
|
|
61879
|
-
action,
|
|
61880
60793
|
config,
|
|
61881
|
-
object,
|
|
61882
60794
|
values,
|
|
61883
60795
|
finishText,
|
|
61884
60796
|
submitText,
|
|
@@ -61886,21 +60798,30 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
61886
60798
|
labelPosition
|
|
61887
60799
|
} = this.$props;
|
|
61888
60800
|
const {
|
|
60801
|
+
title = '编辑',
|
|
60802
|
+
width = '600px',
|
|
60803
|
+
visible = false,
|
|
60804
|
+
loading = false,
|
|
61889
60805
|
...props
|
|
61890
60806
|
} = this.$attrs;
|
|
60807
|
+
const {
|
|
60808
|
+
finish,
|
|
60809
|
+
submit,
|
|
60810
|
+
cancel
|
|
60811
|
+
} = this.$listeners;
|
|
61891
60812
|
return h("div", {
|
|
61892
60813
|
"class": this.loading ? 'a-modal loading' : 'a-modal'
|
|
61893
60814
|
}, [h("el-dialog", {
|
|
61894
60815
|
"attrs": {
|
|
61895
|
-
"visible":
|
|
61896
|
-
"title":
|
|
61897
|
-
"width":
|
|
60816
|
+
"visible": visible,
|
|
60817
|
+
"title": title,
|
|
60818
|
+
"width": width,
|
|
61898
60819
|
"lock-scroll": true,
|
|
61899
60820
|
"destroy-on-close": true,
|
|
61900
60821
|
"close-on-click-modal": false
|
|
61901
60822
|
},
|
|
61902
60823
|
"on": {
|
|
61903
|
-
"close":
|
|
60824
|
+
"close": cancel
|
|
61904
60825
|
},
|
|
61905
60826
|
"props": {
|
|
61906
60827
|
...props
|
|
@@ -61909,23 +60830,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
61909
60830
|
"class": "a-modal-body"
|
|
61910
60831
|
}, [h(_components_Aform__WEBPACK_IMPORTED_MODULE_0__["default"], {
|
|
61911
60832
|
"attrs": {
|
|
60833
|
+
"cols": "1",
|
|
61912
60834
|
"size": "mini",
|
|
61913
60835
|
"rule": rule,
|
|
61914
60836
|
"rules": rules,
|
|
61915
|
-
"
|
|
61916
|
-
"object": config && config.length > 0 ? {} : object,
|
|
61917
|
-
"config": config && config.length > 0 ? config : [],
|
|
60837
|
+
"config": config,
|
|
61918
60838
|
"values": values,
|
|
60839
|
+
"loading": loading,
|
|
61919
60840
|
"finishText": finishText,
|
|
61920
60841
|
"submitText": submitText,
|
|
61921
60842
|
"cancelText": cancelText,
|
|
61922
|
-
"loading": this.loading,
|
|
61923
60843
|
"labelPosition": labelPosition
|
|
61924
60844
|
},
|
|
61925
60845
|
"on": {
|
|
61926
|
-
"finish":
|
|
61927
|
-
"submit":
|
|
61928
|
-
"cancel":
|
|
60846
|
+
"finish": finish,
|
|
60847
|
+
"submit": submit,
|
|
60848
|
+
"cancel": cancel
|
|
61929
60849
|
}
|
|
61930
60850
|
})]), this.$slots.default, h("div", {
|
|
61931
60851
|
"class": this.action ? 'a-modal-foot custom' : ''
|
|
@@ -66184,13 +65104,6 @@ module.exports = _default;
|
|
|
66184
65104
|
|
|
66185
65105
|
/***/ }),
|
|
66186
65106
|
|
|
66187
|
-
/***/ "9e53":
|
|
66188
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
66189
|
-
|
|
66190
|
-
// extracted by mini-css-extract-plugin
|
|
66191
|
-
|
|
66192
|
-
/***/ }),
|
|
66193
|
-
|
|
66194
65107
|
/***/ "9e96":
|
|
66195
65108
|
/***/ (function(module, exports, __webpack_require__) {
|
|
66196
65109
|
|
|
@@ -67979,345 +66892,6 @@ __webpack_require__("dff3");
|
|
|
67979
66892
|
|
|
67980
66893
|
/***/ }),
|
|
67981
66894
|
|
|
67982
|
-
/***/ "a237":
|
|
67983
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
67984
|
-
|
|
67985
|
-
"use strict";
|
|
67986
|
-
__webpack_require__.r(__webpack_exports__);
|
|
67987
|
-
/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
|
|
67988
|
-
/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__);
|
|
67989
|
-
/* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2234");
|
|
67990
|
-
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("af1c");
|
|
67991
|
-
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_2__);
|
|
67992
|
-
|
|
67993
|
-
|
|
67994
|
-
|
|
67995
|
-
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
67996
|
-
name: 'CfSearch',
|
|
67997
|
-
components: {
|
|
67998
|
-
AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"]
|
|
67999
|
-
},
|
|
68000
|
-
props: {
|
|
68001
|
-
value: {
|
|
68002
|
-
type: Object,
|
|
68003
|
-
default: () => ({})
|
|
68004
|
-
},
|
|
68005
|
-
margin: {
|
|
68006
|
-
type: String,
|
|
68007
|
-
default: () => '0'
|
|
68008
|
-
},
|
|
68009
|
-
size: {
|
|
68010
|
-
type: String,
|
|
68011
|
-
default: () => 'small'
|
|
68012
|
-
},
|
|
68013
|
-
inline: {
|
|
68014
|
-
type: Boolean,
|
|
68015
|
-
default: () => true
|
|
68016
|
-
},
|
|
68017
|
-
cols: {
|
|
68018
|
-
type: String,
|
|
68019
|
-
default: () => '6'
|
|
68020
|
-
},
|
|
68021
|
-
gutter: {
|
|
68022
|
-
type: String,
|
|
68023
|
-
default: () => '10'
|
|
68024
|
-
},
|
|
68025
|
-
labelWidth: {
|
|
68026
|
-
type: String,
|
|
68027
|
-
default: () => 'auto'
|
|
68028
|
-
},
|
|
68029
|
-
labelPosition: {
|
|
68030
|
-
type: String,
|
|
68031
|
-
default: () => 'top'
|
|
68032
|
-
},
|
|
68033
|
-
config: {
|
|
68034
|
-
type: Object,
|
|
68035
|
-
default: () => ({})
|
|
68036
|
-
},
|
|
68037
|
-
values: {
|
|
68038
|
-
type: Object,
|
|
68039
|
-
default: () => ({})
|
|
68040
|
-
},
|
|
68041
|
-
label: {
|
|
68042
|
-
type: Boolean,
|
|
68043
|
-
default: () => true
|
|
68044
|
-
},
|
|
68045
|
-
check: {
|
|
68046
|
-
type: Boolean,
|
|
68047
|
-
default: () => false
|
|
68048
|
-
},
|
|
68049
|
-
loading: {
|
|
68050
|
-
type: Boolean,
|
|
68051
|
-
default: () => false
|
|
68052
|
-
},
|
|
68053
|
-
submitText: {
|
|
68054
|
-
type: String,
|
|
68055
|
-
default: () => '搜索'
|
|
68056
|
-
},
|
|
68057
|
-
cancelText: {
|
|
68058
|
-
type: String,
|
|
68059
|
-
default: () => '重置'
|
|
68060
|
-
}
|
|
68061
|
-
},
|
|
68062
|
-
data() {
|
|
68063
|
-
return {
|
|
68064
|
-
form: this.value
|
|
68065
|
-
};
|
|
68066
|
-
},
|
|
68067
|
-
created() {
|
|
68068
|
-
this.create();
|
|
68069
|
-
},
|
|
68070
|
-
mounted() {},
|
|
68071
|
-
destroyed() {
|
|
68072
|
-
this.create = null;
|
|
68073
|
-
this.submit = null;
|
|
68074
|
-
this.cancel = null;
|
|
68075
|
-
this.filter = null;
|
|
68076
|
-
this.result = null;
|
|
68077
|
-
this.prompt = null;
|
|
68078
|
-
this.format = null;
|
|
68079
|
-
},
|
|
68080
|
-
watch: {
|
|
68081
|
-
values() {
|
|
68082
|
-
this.create();
|
|
68083
|
-
}
|
|
68084
|
-
},
|
|
68085
|
-
methods: {
|
|
68086
|
-
create() {
|
|
68087
|
-
// 创建表单
|
|
68088
|
-
if (this.config && Object.keys(this.config).length > 0) {
|
|
68089
|
-
// 格式化表单配置对象(this.config)为数据双向绑定对象
|
|
68090
|
-
let data = {};
|
|
68091
|
-
Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
|
|
68092
|
-
let {
|
|
68093
|
-
...r
|
|
68094
|
-
} = this.config[a];
|
|
68095
|
-
if (!r.render) {
|
|
68096
|
-
let range = r.range || r.scope || r.both || r.than || null;
|
|
68097
|
-
if (range) {
|
|
68098
|
-
data[`${a}LE`] = '';
|
|
68099
|
-
data[`${a}GE`] = '';
|
|
68100
|
-
} else {
|
|
68101
|
-
data[a] = r.default ? r.default : '';
|
|
68102
|
-
}
|
|
68103
|
-
}
|
|
68104
|
-
});
|
|
68105
|
-
this.form = data;
|
|
68106
|
-
}
|
|
68107
|
-
},
|
|
68108
|
-
submit(e) {
|
|
68109
|
-
// 提交表单
|
|
68110
|
-
e && e.preventDefault();
|
|
68111
|
-
let pass = !this.check; // 判断是否是空表单
|
|
68112
|
-
for (let a in this.form) if (this.form[a] != '') pass = true;
|
|
68113
|
-
if (pass) {
|
|
68114
|
-
let result = this.filter();
|
|
68115
|
-
const {
|
|
68116
|
-
formParams,
|
|
68117
|
-
pageParams
|
|
68118
|
-
} = this.$store.state;
|
|
68119
|
-
this.$store.commit('setFormParams', result); // 添加查询参数
|
|
68120
|
-
this.$store.commit('setPageParams', {
|
|
68121
|
-
...pageParams,
|
|
68122
|
-
page: 1
|
|
68123
|
-
}); // 重置分页参数
|
|
68124
|
-
this.$nextTick(() => {
|
|
68125
|
-
let change = false;
|
|
68126
|
-
Object.keys(result).forEach(a => result[a] != formParams[a] && (change = true));
|
|
68127
|
-
if (change) this.$emit('submit', {
|
|
68128
|
-
...result,
|
|
68129
|
-
...pageParams,
|
|
68130
|
-
page: 1
|
|
68131
|
-
}); // 派发事件并重置当前分页
|
|
68132
|
-
return result;
|
|
68133
|
-
});
|
|
68134
|
-
}
|
|
68135
|
-
},
|
|
68136
|
-
cancel(e) {
|
|
68137
|
-
// 重置表单
|
|
68138
|
-
e && e.preventDefault();
|
|
68139
|
-
let pass = !this.check; // 判断是否是空表单
|
|
68140
|
-
for (let a in this.form) if (this.form[a] != '') pass = true;
|
|
68141
|
-
if (pass) {
|
|
68142
|
-
const {
|
|
68143
|
-
pageParams
|
|
68144
|
-
} = this.$store.state;
|
|
68145
|
-
this.$store.commit('setPageParams', {
|
|
68146
|
-
...pageParams,
|
|
68147
|
-
page: 1,
|
|
68148
|
-
size: 10
|
|
68149
|
-
}); // 重置分页参数
|
|
68150
|
-
this.$store.commit('setFormParams', {}); // 重置查询参数
|
|
68151
|
-
this.$nextTick(() => {
|
|
68152
|
-
for (let a in this.form) this.form[a] = '';
|
|
68153
|
-
this.$nextTick(() => this.$emit('cancel', this.form));
|
|
68154
|
-
});
|
|
68155
|
-
}
|
|
68156
|
-
},
|
|
68157
|
-
filter() {
|
|
68158
|
-
let data = {};
|
|
68159
|
-
Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
|
|
68160
|
-
let {
|
|
68161
|
-
like = null,
|
|
68162
|
-
...r
|
|
68163
|
-
} = this.config[a];
|
|
68164
|
-
let range = r.range || r.scope || r.both || r.than || null;
|
|
68165
|
-
if (range) {
|
|
68166
|
-
this.form[`${a}LE`] != '' && (data[`${a}LE`] = this.form[`${a}LE`]);
|
|
68167
|
-
this.form[`${a}GE`] != '' && (data[`${a}GE`] = this.form[`${a}GE`]);
|
|
68168
|
-
} else {
|
|
68169
|
-
let value = this.form[a];
|
|
68170
|
-
if (value) {
|
|
68171
|
-
if (r.split && typeof r.split == 'object' && r.split.length > 0) {
|
|
68172
|
-
r.split.forEach((c, d) => data[c] = value != '' && typeof value == 'object' && value.length > 0 ? value[d] : value);
|
|
68173
|
-
} else {
|
|
68174
|
-
if (like) {
|
|
68175
|
-
if (like == 'left' || like && like == 'l') data[a] = '%' + value;
|
|
68176
|
-
if (like == 'right' || like && like == 'r') data[a] = value + '%';else data[a] = '%' + value + '%';
|
|
68177
|
-
} else {
|
|
68178
|
-
if (value.includes(' 00:00:00')) {
|
|
68179
|
-
data[a] = '%' + value.split(' 00:00:00')[0] + '%';
|
|
68180
|
-
} else {
|
|
68181
|
-
data[a] = value;
|
|
68182
|
-
}
|
|
68183
|
-
}
|
|
68184
|
-
}
|
|
68185
|
-
}
|
|
68186
|
-
}
|
|
68187
|
-
});
|
|
68188
|
-
let form = {};
|
|
68189
|
-
Object.keys(data).length > 0 && Object.keys(data).forEach(a => {
|
|
68190
|
-
if (data[a] != '%' && data[a] != '%%' && data[a] != 'null' && data[a] != 'undefined' && data[a] != null && data[a] != undefined) {
|
|
68191
|
-
form[a] = data[a];
|
|
68192
|
-
}
|
|
68193
|
-
});
|
|
68194
|
-
return form;
|
|
68195
|
-
},
|
|
68196
|
-
result() {
|
|
68197
|
-
// 返回验证后的表单数据
|
|
68198
|
-
return this.filter(this.form);
|
|
68199
|
-
},
|
|
68200
|
-
format(a = '', field = '', placeholder = '') {
|
|
68201
|
-
const h = this.$createElement;
|
|
68202
|
-
let {
|
|
68203
|
-
...r
|
|
68204
|
-
} = this.config[a];
|
|
68205
|
-
let config = {
|
|
68206
|
-
size: r.size ? r.size : this.size,
|
|
68207
|
-
field: field != '' ? field : a,
|
|
68208
|
-
change: () => this.change(),
|
|
68209
|
-
disabled: this.loading,
|
|
68210
|
-
form: this.form,
|
|
68211
|
-
...r
|
|
68212
|
-
};
|
|
68213
|
-
return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
68214
|
-
"attrs": {
|
|
68215
|
-
"config": placeholder != '' ? {
|
|
68216
|
-
...config,
|
|
68217
|
-
placeholder
|
|
68218
|
-
} : config
|
|
68219
|
-
}
|
|
68220
|
-
});
|
|
68221
|
-
},
|
|
68222
|
-
change() {
|
|
68223
|
-
this.$emit('input', this.filter());
|
|
68224
|
-
this.$emit('change', this.filter());
|
|
68225
|
-
}
|
|
68226
|
-
},
|
|
68227
|
-
render() {
|
|
68228
|
-
const h = arguments[0];
|
|
68229
|
-
const {
|
|
68230
|
-
...props
|
|
68231
|
-
} = this.$attrs;
|
|
68232
|
-
const {
|
|
68233
|
-
submit = null,
|
|
68234
|
-
cancel = null
|
|
68235
|
-
} = this.$listeners;
|
|
68236
|
-
let style = this.cols != '' ? {
|
|
68237
|
-
width: `${100 / this.cols}%`
|
|
68238
|
-
} : {};
|
|
68239
|
-
return h("div", {
|
|
68240
|
-
"class": "c-f-search",
|
|
68241
|
-
"style": {
|
|
68242
|
-
padding: this.margin
|
|
68243
|
-
}
|
|
68244
|
-
}, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
68245
|
-
"ref": "form",
|
|
68246
|
-
"attrs": {
|
|
68247
|
-
"size": this.size
|
|
68248
|
-
}
|
|
68249
|
-
}, {
|
|
68250
|
-
"props": {
|
|
68251
|
-
model: this.form,
|
|
68252
|
-
...props
|
|
68253
|
-
}
|
|
68254
|
-
}, {
|
|
68255
|
-
"attrs": {
|
|
68256
|
-
"labelWidth": this.labelWidth,
|
|
68257
|
-
"labelPosition": this.labelPosition
|
|
68258
|
-
}
|
|
68259
|
-
}]), [h("el-row", {
|
|
68260
|
-
"attrs": {
|
|
68261
|
-
"gutter": Number(this.gutter)
|
|
68262
|
-
}
|
|
68263
|
-
}, [Object.keys(this.config).map((a, b) => {
|
|
68264
|
-
let {
|
|
68265
|
-
...r
|
|
68266
|
-
} = this.config[a];
|
|
68267
|
-
let range = r.than || r.both || r.range || r.scope;
|
|
68268
|
-
let label = this.label ? r.text || r.label || r.title : '';
|
|
68269
|
-
let prefixPlaceholder = r.placeholder && r.placeholder.length > 0 ? r.placeholder[0] : '最高';
|
|
68270
|
-
let suffixPlaceholder = r.placeholder && r.placeholder.length > 1 ? r.placeholder[1] : '最低';
|
|
68271
|
-
return h("el-col", {
|
|
68272
|
-
"key": b,
|
|
68273
|
-
"class": "column",
|
|
68274
|
-
"style": style
|
|
68275
|
-
}, [h("el-form-item", {
|
|
68276
|
-
"attrs": {
|
|
68277
|
-
"prop": a,
|
|
68278
|
-
"label": label
|
|
68279
|
-
}
|
|
68280
|
-
}, [range ? h("el-col", {
|
|
68281
|
-
"class": "range-cols"
|
|
68282
|
-
}, [h("el-col", {
|
|
68283
|
-
"attrs": {
|
|
68284
|
-
"span": 12
|
|
68285
|
-
}
|
|
68286
|
-
}, [this.format(a, `${a}LE`, prefixPlaceholder)]), h("el-col", {
|
|
68287
|
-
"attrs": {
|
|
68288
|
-
"span": 12
|
|
68289
|
-
}
|
|
68290
|
-
}, [this.format(a, `${a}GE`, suffixPlaceholder)])]) : this.format(a)])]);
|
|
68291
|
-
}), this.$slots.default, (submit || cancel) && h("el-col", {
|
|
68292
|
-
"key": "action",
|
|
68293
|
-
"class": "action",
|
|
68294
|
-
"style": style
|
|
68295
|
-
}, [h("el-form-item", {
|
|
68296
|
-
"attrs": {
|
|
68297
|
-
"label": this.label ? 'action' : ''
|
|
68298
|
-
}
|
|
68299
|
-
}, [submit && h("el-button", {
|
|
68300
|
-
"attrs": {
|
|
68301
|
-
"disabled": this.loading,
|
|
68302
|
-
"type": "primary"
|
|
68303
|
-
},
|
|
68304
|
-
"on": {
|
|
68305
|
-
"click": this.submit
|
|
68306
|
-
}
|
|
68307
|
-
}, [this.submitText]), cancel && h("el-button", {
|
|
68308
|
-
"attrs": {
|
|
68309
|
-
"disabled": this.loading,
|
|
68310
|
-
"type": "default"
|
|
68311
|
-
},
|
|
68312
|
-
"on": {
|
|
68313
|
-
"click": this.cancel
|
|
68314
|
-
}
|
|
68315
|
-
}, [this.cancelText])])])])])]);
|
|
68316
|
-
}
|
|
68317
|
-
});
|
|
68318
|
-
|
|
68319
|
-
/***/ }),
|
|
68320
|
-
|
|
68321
66895
|
/***/ "a23d":
|
|
68322
66896
|
/***/ (function(module, exports, __webpack_require__) {
|
|
68323
66897
|
|
|
@@ -132553,13 +131127,6 @@ exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
|
132553
131127
|
};
|
|
132554
131128
|
|
|
132555
131129
|
|
|
132556
|
-
/***/ }),
|
|
132557
|
-
|
|
132558
|
-
/***/ "af1c":
|
|
132559
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
132560
|
-
|
|
132561
|
-
// extracted by mini-css-extract-plugin
|
|
132562
|
-
|
|
132563
131130
|
/***/ }),
|
|
132564
131131
|
|
|
132565
131132
|
/***/ "af54":
|
|
@@ -133763,6 +132330,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133763
132330
|
type: Object,
|
|
133764
132331
|
default: () => ({})
|
|
133765
132332
|
},
|
|
132333
|
+
must: {
|
|
132334
|
+
type: Boolean,
|
|
132335
|
+
default: () => false
|
|
132336
|
+
},
|
|
133766
132337
|
inline: {
|
|
133767
132338
|
type: Boolean,
|
|
133768
132339
|
default: () => false
|
|
@@ -133773,36 +132344,50 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133773
132344
|
},
|
|
133774
132345
|
gutter: {
|
|
133775
132346
|
type: String,
|
|
133776
|
-
default: () => '
|
|
132347
|
+
default: () => '16'
|
|
133777
132348
|
},
|
|
133778
132349
|
config: {
|
|
133779
132350
|
type: Object,
|
|
133780
132351
|
default: () => ({})
|
|
133781
132352
|
},
|
|
132353
|
+
values: {
|
|
132354
|
+
type: Object,
|
|
132355
|
+
default: () => ({})
|
|
132356
|
+
},
|
|
133782
132357
|
global: {
|
|
133783
132358
|
type: Boolean,
|
|
133784
132359
|
default: () => false
|
|
132360
|
+
},
|
|
132361
|
+
disabled: {
|
|
132362
|
+
type: Boolean,
|
|
132363
|
+
default: () => false
|
|
133785
132364
|
}
|
|
133786
132365
|
},
|
|
133787
132366
|
data() {
|
|
133788
132367
|
return {
|
|
133789
132368
|
form: this.value,
|
|
133790
|
-
option: {}
|
|
133791
|
-
opened: false,
|
|
133792
|
-
height: 'auto'
|
|
132369
|
+
option: {}
|
|
133793
132370
|
};
|
|
133794
132371
|
},
|
|
133795
132372
|
watch: {
|
|
133796
|
-
|
|
133797
|
-
|
|
132373
|
+
config: {
|
|
132374
|
+
immediate: true,
|
|
132375
|
+
deep: true,
|
|
132376
|
+
handler() {
|
|
132377
|
+
this.relate(this.config);
|
|
132378
|
+
}
|
|
132379
|
+
},
|
|
132380
|
+
values: {
|
|
132381
|
+
immediate: true,
|
|
132382
|
+
deep: true,
|
|
132383
|
+
handler() {
|
|
132384
|
+
this.relate(this.config);
|
|
132385
|
+
}
|
|
133798
132386
|
}
|
|
133799
132387
|
},
|
|
133800
132388
|
created() {
|
|
133801
132389
|
this.relate(this.config);
|
|
133802
132390
|
},
|
|
133803
|
-
mounted() {
|
|
133804
|
-
this.resize();
|
|
133805
|
-
},
|
|
133806
132391
|
methods: {
|
|
133807
132392
|
input() {
|
|
133808
132393
|
this.$emit('input', this.filter());
|
|
@@ -133811,6 +132396,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133811
132396
|
this.$emit('change', this.filter(), this.form, this.option);
|
|
133812
132397
|
},
|
|
133813
132398
|
relate(config = {}) {
|
|
132399
|
+
let data = {};
|
|
133814
132400
|
Object.keys(config).forEach(a => {
|
|
133815
132401
|
let {
|
|
133816
132402
|
...r
|
|
@@ -133819,9 +132405,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133819
132405
|
if (child && Object.keys(child).length > 0) {
|
|
133820
132406
|
this.relate(child);
|
|
133821
132407
|
} else {
|
|
133822
|
-
|
|
132408
|
+
if (r.type == 'password') {
|
|
132409
|
+
data[a] = '';
|
|
132410
|
+
} else {
|
|
132411
|
+
if (this.values[a] != undefined) {
|
|
132412
|
+
data[a] = `${this.values[a]}`;
|
|
132413
|
+
} else if (r.default) {
|
|
132414
|
+
data[a] = r.default;
|
|
132415
|
+
}
|
|
132416
|
+
}
|
|
133823
132417
|
}
|
|
133824
132418
|
});
|
|
132419
|
+
this.form = data;
|
|
133825
132420
|
},
|
|
133826
132421
|
create(a, b) {
|
|
133827
132422
|
const h = this.$createElement;
|
|
@@ -133830,22 +132425,27 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133830
132425
|
} = this.config[a];
|
|
133831
132426
|
let label = r.text || r.label || r.title || '';
|
|
133832
132427
|
let width = r.width ? r.width : `${100 / this.cols}%`;
|
|
133833
|
-
let
|
|
133834
|
-
|
|
133835
|
-
|
|
132428
|
+
let judge = [{
|
|
132429
|
+
required: true,
|
|
132430
|
+
message: `${label}不能为空`
|
|
132431
|
+
}];
|
|
132432
|
+
let valid = r.rule ? r.rule : r.must || this.must ? judge : [];
|
|
132433
|
+
let rules = this.disabled || r.disabled ? [] : (r.must || this.must) && r.rule ? [...judge, ...r.rule] : valid;
|
|
133836
132434
|
let props = {
|
|
133837
132435
|
name: a,
|
|
133838
132436
|
prop: a,
|
|
133839
132437
|
label,
|
|
132438
|
+
rules,
|
|
132439
|
+
disabled: r.disabled || this.disabled,
|
|
133840
132440
|
...r
|
|
133841
132441
|
};
|
|
133842
132442
|
if (this.inline) {
|
|
133843
|
-
let
|
|
132443
|
+
let style = {
|
|
133844
132444
|
padding: `0 ${this.gutter / 2}px`,
|
|
133845
|
-
|
|
132445
|
+
width
|
|
133846
132446
|
};
|
|
133847
132447
|
return h("el-form-item", {
|
|
133848
|
-
"style":
|
|
132448
|
+
"style": style,
|
|
133849
132449
|
"props": {
|
|
133850
132450
|
...props
|
|
133851
132451
|
}
|
|
@@ -133865,7 +132465,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133865
132465
|
} else {
|
|
133866
132466
|
return h("el-col", {
|
|
133867
132467
|
"key": b,
|
|
133868
|
-
"style":
|
|
132468
|
+
"style": {
|
|
132469
|
+
width
|
|
132470
|
+
}
|
|
133869
132471
|
}, [h("el-form-item", {
|
|
133870
132472
|
"props": {
|
|
133871
132473
|
...props
|
|
@@ -133879,25 +132481,31 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133879
132481
|
this.option[b] = a;
|
|
133880
132482
|
let child = a.children || a.child || a.node || null;
|
|
133881
132483
|
if (child && Object.keys(child).length > 0) {
|
|
133882
|
-
let width = a.width ? a.width : `${100 / Object.keys(child).length}%`;
|
|
133883
|
-
let style = this.cols != '' ? {
|
|
133884
|
-
width
|
|
133885
|
-
} : {};
|
|
133886
132484
|
return Object.keys(child).map((c, d) => {
|
|
133887
132485
|
let {
|
|
133888
132486
|
...r
|
|
133889
132487
|
} = child[c];
|
|
132488
|
+
let space = a.gutter ? a.gutter / 2 : this.gutter / 4;
|
|
132489
|
+
let style = {
|
|
132490
|
+
padding: `0 ${space}px`
|
|
132491
|
+
};
|
|
132492
|
+
r.type = r.type ? r.type : a.type;
|
|
133890
132493
|
if (r.span) {
|
|
133891
132494
|
return h("el-col", {
|
|
133892
132495
|
"key": d,
|
|
132496
|
+
"style": style,
|
|
133893
132497
|
"attrs": {
|
|
133894
132498
|
"span": Number(r.span)
|
|
133895
132499
|
}
|
|
133896
132500
|
}, [this.format(r, c)]);
|
|
133897
132501
|
} else {
|
|
132502
|
+
let width = r.width ? r.width : `${100 / Object.keys(child).length}%`;
|
|
133898
132503
|
return h("el-col", {
|
|
133899
132504
|
"key": d,
|
|
133900
|
-
"style":
|
|
132505
|
+
"style": {
|
|
132506
|
+
width,
|
|
132507
|
+
...style
|
|
132508
|
+
}
|
|
133901
132509
|
}, [this.format(r, c)]);
|
|
133902
132510
|
}
|
|
133903
132511
|
});
|
|
@@ -133906,6 +132514,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133906
132514
|
change: () => this.change(),
|
|
133907
132515
|
form: this.form,
|
|
133908
132516
|
field: b,
|
|
132517
|
+
clearable: !a.default,
|
|
133909
132518
|
...a
|
|
133910
132519
|
};
|
|
133911
132520
|
return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
@@ -133918,12 +132527,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133918
132527
|
});
|
|
133919
132528
|
}
|
|
133920
132529
|
},
|
|
133921
|
-
resize() {
|
|
133922
|
-
if (Object.keys(this.config).length > 0) {
|
|
133923
|
-
let rows = Math.ceil(Object.keys(this.config).length / this.cols);
|
|
133924
|
-
this.height = this.$el.clientHeight * (rows - 1);
|
|
133925
|
-
}
|
|
133926
|
-
},
|
|
133927
132530
|
filter() {
|
|
133928
132531
|
let data = {};
|
|
133929
132532
|
Object.keys(this.form).length > 0 && Object.keys(this.form).forEach(a => {
|
|
@@ -133933,13 +132536,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133933
132536
|
} = this.option[a];
|
|
133934
132537
|
if (r.split && r.split.length > 0) {
|
|
133935
132538
|
r.split.forEach((b, c) => data[b] = this.form[a][c]);
|
|
133936
|
-
} else
|
|
133937
|
-
if (r.like) {
|
|
133938
|
-
if (r.like == 'L' || r.like == 'l' || r.like == 'left') data[a] = `%${this.form[a]}`;
|
|
133939
|
-
if (r.like == 'R' || r.like == 'r' || r.like == 'right') data[a] = `${this.form[a]}%`;
|
|
133940
|
-
if (this.form[a] && this.form[a].includes(' 00:00:00')) data[a] = `%${this.form[a].replace(' 00:00:00', '')}%`;else data[a] = `%${this.form[a]}%`;
|
|
133941
|
-
} else data[a] = this.form[a];
|
|
133942
|
-
}
|
|
132539
|
+
} else data[a] = this.form[a];
|
|
133943
132540
|
}
|
|
133944
132541
|
});
|
|
133945
132542
|
return data;
|
|
@@ -133983,29 +132580,36 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133983
132580
|
render() {
|
|
133984
132581
|
const h = arguments[0];
|
|
133985
132582
|
let {
|
|
133986
|
-
padding = '0',
|
|
133987
132583
|
margin = '0',
|
|
133988
|
-
|
|
132584
|
+
padding = '0',
|
|
133989
132585
|
size = 'small',
|
|
133990
132586
|
loading = false,
|
|
133991
132587
|
labelWidth = 'auto',
|
|
133992
132588
|
labelPosition = 'top',
|
|
133993
132589
|
finishText = '保存',
|
|
133994
|
-
submitText = '
|
|
132590
|
+
submitText = '提交',
|
|
133995
132591
|
rejectText = '驳回',
|
|
133996
|
-
cancelText = '
|
|
132592
|
+
cancelText = '取消',
|
|
133997
132593
|
action = [],
|
|
133998
|
-
...
|
|
132594
|
+
...rest
|
|
133999
132595
|
} = this.$attrs;
|
|
132596
|
+
let style = this.inline ? {
|
|
132597
|
+
margin: `0 -${this.gutter / 2}px`
|
|
132598
|
+
} : {};
|
|
134000
132599
|
let {
|
|
134001
132600
|
finish = null,
|
|
134002
132601
|
submit = null,
|
|
134003
132602
|
reject = null,
|
|
134004
132603
|
cancel = null
|
|
134005
132604
|
} = this.$listeners;
|
|
134006
|
-
let
|
|
134007
|
-
|
|
134008
|
-
|
|
132605
|
+
let props = {
|
|
132606
|
+
size,
|
|
132607
|
+
inline: this.inline,
|
|
132608
|
+
labelWidth,
|
|
132609
|
+
labelPosition,
|
|
132610
|
+
style,
|
|
132611
|
+
...rest
|
|
132612
|
+
};
|
|
134009
132613
|
return h("div", {
|
|
134010
132614
|
"class": "a-form",
|
|
134011
132615
|
"style": {
|
|
@@ -134013,14 +132617,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
134013
132617
|
padding
|
|
134014
132618
|
}
|
|
134015
132619
|
}, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
134016
|
-
"ref":
|
|
134017
|
-
"attrs": {
|
|
134018
|
-
"size": size,
|
|
134019
|
-
"inline": this.inline,
|
|
134020
|
-
"label-width": labelWidth,
|
|
134021
|
-
"label-position": labelPosition
|
|
134022
|
-
},
|
|
134023
|
-
"style": style
|
|
132620
|
+
"ref": "form"
|
|
134024
132621
|
}, {
|
|
134025
132622
|
"props": {
|
|
134026
132623
|
model: this.form,
|
|
@@ -134033,27 +132630,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
134033
132630
|
"gutter": Number(this.gutter)
|
|
134034
132631
|
},
|
|
134035
132632
|
"class": "main-rows"
|
|
134036
|
-
}, [Object.keys(this.config).map((a, b) => this.create(a, b))])]), (finish || submit || reject || cancel || action.length > 0) && h("
|
|
134037
|
-
"attrs": {
|
|
134038
|
-
"name": "action",
|
|
134039
|
-
"label": "action"
|
|
134040
|
-
},
|
|
132633
|
+
}, [Object.keys(this.config).map((a, b) => this.create(a, b))])]), (finish || submit || reject || cancel || action.length > 0) && h("div", {
|
|
134041
132634
|
"class": "action",
|
|
134042
132635
|
"style": {
|
|
134043
132636
|
paddingLeft: `${this.gutter}px`
|
|
134044
132637
|
}
|
|
134045
|
-
}, [
|
|
132638
|
+
}, [h("el-form-item", {
|
|
134046
132639
|
"attrs": {
|
|
134047
|
-
"
|
|
134048
|
-
"
|
|
134049
|
-
},
|
|
134050
|
-
"class": "collapse-button",
|
|
134051
|
-
"on": {
|
|
134052
|
-
"click": () => this.opened = !this.opened
|
|
132640
|
+
"name": "action",
|
|
132641
|
+
"label": "action"
|
|
134053
132642
|
}
|
|
134054
|
-
}, [h("
|
|
134055
|
-
"class": `el-icon-arrow-${this.opened ? 'up' : 'down'}`
|
|
134056
|
-
}), this.opened ? '收起' : '展开']), finish && h("el-button", {
|
|
132643
|
+
}, [finish && h("el-button", {
|
|
134057
132644
|
"attrs": {
|
|
134058
132645
|
"disabled": loading,
|
|
134059
132646
|
"type": "success"
|
|
@@ -134085,12 +132672,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
134085
132672
|
"on": {
|
|
134086
132673
|
"click": this.cancel
|
|
134087
132674
|
}
|
|
134088
|
-
}, [cancelText]), action.
|
|
132675
|
+
}, [cancelText]), action.map((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
134089
132676
|
"key": b,
|
|
134090
132677
|
"attrs": {
|
|
134091
132678
|
"disabled": loading
|
|
132679
|
+
},
|
|
132680
|
+
"on": {
|
|
132681
|
+
"click": e => a.click(this.filter(), this.form, this.option, e)
|
|
134092
132682
|
}
|
|
134093
|
-
}, a]), [a.label || a.title || a.text || '']))])])]);
|
|
132683
|
+
}, a]), [a.label || a.title || a.text || '']))])])])]);
|
|
134094
132684
|
}
|
|
134095
132685
|
});
|
|
134096
132686
|
|
|
@@ -135838,6 +134428,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
135838
134428
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
135839
134429
|
name: 'AfEditor',
|
|
135840
134430
|
props: {
|
|
134431
|
+
value: {
|
|
134432
|
+
type: Object,
|
|
134433
|
+
default: () => ({})
|
|
134434
|
+
},
|
|
135841
134435
|
must: {
|
|
135842
134436
|
type: Boolean,
|
|
135843
134437
|
default: () => false
|
|
@@ -135852,7 +134446,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
135852
134446
|
},
|
|
135853
134447
|
gutter: {
|
|
135854
134448
|
type: String,
|
|
135855
|
-
default: () => '
|
|
134449
|
+
default: () => '16'
|
|
135856
134450
|
},
|
|
135857
134451
|
config: {
|
|
135858
134452
|
type: Object,
|
|
@@ -135865,19 +134459,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
135865
134459
|
global: {
|
|
135866
134460
|
type: Boolean,
|
|
135867
134461
|
default: () => false
|
|
134462
|
+
},
|
|
134463
|
+
disabled: {
|
|
134464
|
+
type: Boolean,
|
|
134465
|
+
default: () => false
|
|
135868
134466
|
}
|
|
135869
134467
|
},
|
|
135870
134468
|
data() {
|
|
135871
134469
|
return {
|
|
135872
|
-
form: this.
|
|
135873
|
-
option: {}
|
|
135874
|
-
opened: false,
|
|
135875
|
-
height: 'auto'
|
|
134470
|
+
form: this.value,
|
|
134471
|
+
option: {}
|
|
135876
134472
|
};
|
|
135877
134473
|
},
|
|
135878
134474
|
watch: {
|
|
135879
|
-
|
|
135880
|
-
|
|
134475
|
+
config: {
|
|
134476
|
+
immediate: true,
|
|
134477
|
+
deep: true,
|
|
134478
|
+
handler() {
|
|
134479
|
+
this.relate(this.config);
|
|
134480
|
+
}
|
|
135881
134481
|
}
|
|
135882
134482
|
},
|
|
135883
134483
|
created() {
|
|
@@ -135892,6 +134492,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
135892
134492
|
this.$emit('change', this.filter(), this.form, this.option);
|
|
135893
134493
|
},
|
|
135894
134494
|
relate(config = {}) {
|
|
134495
|
+
let data = {};
|
|
135895
134496
|
Object.keys(config).forEach(a => {
|
|
135896
134497
|
let {
|
|
135897
134498
|
...r
|
|
@@ -135900,12 +134501,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
135900
134501
|
if (child && Object.keys(child).length > 0) {
|
|
135901
134502
|
this.relate(child);
|
|
135902
134503
|
} else {
|
|
135903
|
-
|
|
134504
|
+
if (r.type == 'password') {
|
|
134505
|
+
data[a] = '';
|
|
134506
|
+
} else {
|
|
134507
|
+
if (this.values[a] != undefined) {
|
|
134508
|
+
data[a] = `${this.values[a]}`;
|
|
134509
|
+
} else if (r.default) {
|
|
134510
|
+
data[a] = r.default;
|
|
134511
|
+
}
|
|
134512
|
+
}
|
|
135904
134513
|
}
|
|
135905
134514
|
});
|
|
135906
|
-
this
|
|
135907
|
-
Object.keys(this.values).forEach(a => typeof this.values[a] == 'number' && (this.form[a] = `${this.values[a]}`));
|
|
135908
|
-
});
|
|
134515
|
+
this.form = data;
|
|
135909
134516
|
},
|
|
135910
134517
|
create(a, b) {
|
|
135911
134518
|
const h = this.$createElement;
|
|
@@ -135914,29 +134521,27 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
135914
134521
|
} = this.config[a];
|
|
135915
134522
|
let label = r.text || r.label || r.title || '';
|
|
135916
134523
|
let width = r.width ? r.width : `${100 / this.cols}%`;
|
|
135917
|
-
let
|
|
135918
|
-
width
|
|
135919
|
-
} : {};
|
|
135920
|
-
let valid = r.rule ? r.rule : r.must || this.must ? [{
|
|
134524
|
+
let judge = [{
|
|
135921
134525
|
required: true,
|
|
135922
|
-
trigger: 'blur',
|
|
135923
134526
|
message: `${label}不能为空`
|
|
135924
|
-
}]
|
|
135925
|
-
let
|
|
134527
|
+
}];
|
|
134528
|
+
let valid = r.rule ? r.rule : r.must || this.must ? judge : [];
|
|
134529
|
+
let rules = this.disabled || r.disabled ? [] : (r.must || this.must) && r.rule ? [...judge, ...r.rule] : valid;
|
|
135926
134530
|
let props = {
|
|
135927
134531
|
name: a,
|
|
135928
134532
|
prop: a,
|
|
135929
134533
|
label,
|
|
135930
134534
|
rules,
|
|
134535
|
+
disabled: r.disabled || this.disabled,
|
|
135931
134536
|
...r
|
|
135932
134537
|
};
|
|
135933
134538
|
if (this.inline) {
|
|
135934
|
-
let
|
|
134539
|
+
let style = {
|
|
135935
134540
|
padding: `0 ${this.gutter / 2}px`,
|
|
135936
|
-
|
|
134541
|
+
width
|
|
135937
134542
|
};
|
|
135938
134543
|
return h("el-form-item", {
|
|
135939
|
-
"style":
|
|
134544
|
+
"style": style,
|
|
135940
134545
|
"props": {
|
|
135941
134546
|
...props
|
|
135942
134547
|
}
|
|
@@ -135956,7 +134561,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
135956
134561
|
} else {
|
|
135957
134562
|
return h("el-col", {
|
|
135958
134563
|
"key": b,
|
|
135959
|
-
"style":
|
|
134564
|
+
"style": {
|
|
134565
|
+
width
|
|
134566
|
+
}
|
|
135960
134567
|
}, [h("el-form-item", {
|
|
135961
134568
|
"props": {
|
|
135962
134569
|
...props
|
|
@@ -135970,25 +134577,31 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
135970
134577
|
this.option[b] = a;
|
|
135971
134578
|
let child = a.children || a.child || a.node || null;
|
|
135972
134579
|
if (child && Object.keys(child).length > 0) {
|
|
135973
|
-
let width = a.width ? a.width : `${100 / Object.keys(child).length}%`;
|
|
135974
|
-
let style = this.cols != '' ? {
|
|
135975
|
-
width
|
|
135976
|
-
} : {};
|
|
135977
134580
|
return Object.keys(child).map((c, d) => {
|
|
135978
134581
|
let {
|
|
135979
134582
|
...r
|
|
135980
134583
|
} = child[c];
|
|
134584
|
+
let space = a.gutter ? a.gutter / 2 : this.gutter / 4;
|
|
134585
|
+
let style = {
|
|
134586
|
+
padding: `0 ${space}px`
|
|
134587
|
+
};
|
|
134588
|
+
r.type = r.type ? r.type : a.type;
|
|
135981
134589
|
if (r.span) {
|
|
135982
134590
|
return h("el-col", {
|
|
135983
134591
|
"key": d,
|
|
134592
|
+
"style": style,
|
|
135984
134593
|
"attrs": {
|
|
135985
134594
|
"span": Number(r.span)
|
|
135986
134595
|
}
|
|
135987
134596
|
}, [this.format(r, c)]);
|
|
135988
134597
|
} else {
|
|
134598
|
+
let width = r.width ? r.width : `${100 / Object.keys(child).length}%`;
|
|
135989
134599
|
return h("el-col", {
|
|
135990
134600
|
"key": d,
|
|
135991
|
-
"style":
|
|
134601
|
+
"style": {
|
|
134602
|
+
width,
|
|
134603
|
+
...style
|
|
134604
|
+
}
|
|
135992
134605
|
}, [this.format(r, c)]);
|
|
135993
134606
|
}
|
|
135994
134607
|
});
|
|
@@ -135997,6 +134610,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
135997
134610
|
change: () => this.change(),
|
|
135998
134611
|
form: this.form,
|
|
135999
134612
|
field: b,
|
|
134613
|
+
clearable: !a.default,
|
|
136000
134614
|
...a
|
|
136001
134615
|
};
|
|
136002
134616
|
return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
@@ -136062,35 +134676,35 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
136062
134676
|
render() {
|
|
136063
134677
|
const h = arguments[0];
|
|
136064
134678
|
let {
|
|
136065
|
-
padding = '0',
|
|
136066
134679
|
margin = '0',
|
|
134680
|
+
padding = '0',
|
|
136067
134681
|
size = 'small',
|
|
136068
134682
|
loading = false,
|
|
136069
134683
|
labelWidth = 'auto',
|
|
136070
134684
|
labelPosition = 'top',
|
|
136071
134685
|
finishText = '保存',
|
|
136072
|
-
submitText = '
|
|
134686
|
+
submitText = '提交',
|
|
136073
134687
|
rejectText = '驳回',
|
|
136074
134688
|
cancelText = '取消',
|
|
136075
134689
|
action = [],
|
|
136076
|
-
...
|
|
134690
|
+
...rest
|
|
136077
134691
|
} = this.$attrs;
|
|
134692
|
+
let style = this.inline ? {
|
|
134693
|
+
margin: `0 -${this.gutter / 2}px`
|
|
134694
|
+
} : {};
|
|
136078
134695
|
let {
|
|
136079
134696
|
finish = null,
|
|
136080
134697
|
submit = null,
|
|
136081
134698
|
reject = null,
|
|
136082
134699
|
cancel = null
|
|
136083
134700
|
} = this.$listeners;
|
|
136084
|
-
let style = this.inline ? {
|
|
136085
|
-
margin: `0 -${this.gutter / 2}px`
|
|
136086
|
-
} : {};
|
|
136087
134701
|
let props = {
|
|
136088
134702
|
size,
|
|
136089
134703
|
inline: this.inline,
|
|
136090
134704
|
labelWidth,
|
|
136091
134705
|
labelPosition,
|
|
136092
134706
|
style,
|
|
136093
|
-
...
|
|
134707
|
+
...rest
|
|
136094
134708
|
};
|
|
136095
134709
|
return h("div", {
|
|
136096
134710
|
"class": "a-f-editor",
|
|
@@ -136110,12 +134724,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
136110
134724
|
"gutter": Number(this.gutter)
|
|
136111
134725
|
},
|
|
136112
134726
|
"class": "main-rows"
|
|
136113
|
-
}, [Object.keys(this.config).map((a, b) => this.create(a, b)), this.$slots.default]), (finish || submit || reject || cancel || action.length > 0) && h("
|
|
134727
|
+
}, [Object.keys(this.config).map((a, b) => this.create(a, b)), this.$slots.default]), (finish || submit || reject || cancel || action.length > 0) && h("div", {
|
|
134728
|
+
"class": "action"
|
|
134729
|
+
}, [h("el-form-item", {
|
|
136114
134730
|
"attrs": {
|
|
136115
134731
|
"name": "action",
|
|
136116
134732
|
"label": "action"
|
|
136117
|
-
}
|
|
136118
|
-
"class": "action"
|
|
134733
|
+
}
|
|
136119
134734
|
}, [finish && h("el-button", {
|
|
136120
134735
|
"attrs": {
|
|
136121
134736
|
"disabled": loading,
|
|
@@ -136148,12 +134763,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
136148
134763
|
"on": {
|
|
136149
134764
|
"click": this.cancel
|
|
136150
134765
|
}
|
|
136151
|
-
}, [cancelText]), action.
|
|
134766
|
+
}, [cancelText]), action.map((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
136152
134767
|
"key": b,
|
|
136153
134768
|
"attrs": {
|
|
136154
134769
|
"disabled": loading
|
|
134770
|
+
},
|
|
134771
|
+
"on": {
|
|
134772
|
+
"click": e => a.click(this.filter(), this.form, this.option, e)
|
|
136155
134773
|
}
|
|
136156
|
-
}, a]), [a.label || a.title || a.text || '']))])])]);
|
|
134774
|
+
}, a]), [a.label || a.title || a.text || '']))])])])]);
|
|
136157
134775
|
}
|
|
136158
134776
|
});
|
|
136159
134777
|
|
|
@@ -138268,6 +136886,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138268
136886
|
Apopconfirm: _components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"]
|
|
138269
136887
|
},
|
|
138270
136888
|
props: {
|
|
136889
|
+
id: {
|
|
136890
|
+
type: String,
|
|
136891
|
+
default: () => `id-a-table-${Math.random()}`
|
|
136892
|
+
},
|
|
138271
136893
|
margin: {
|
|
138272
136894
|
type: String,
|
|
138273
136895
|
default: () => '0'
|
|
@@ -138316,7 +136938,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138316
136938
|
type: Object,
|
|
138317
136939
|
default: () => ({})
|
|
138318
136940
|
},
|
|
138319
|
-
|
|
136941
|
+
height: {
|
|
138320
136942
|
type: String,
|
|
138321
136943
|
default: () => '480'
|
|
138322
136944
|
},
|
|
@@ -138356,10 +136978,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138356
136978
|
type: Boolean,
|
|
138357
136979
|
default: () => false
|
|
138358
136980
|
},
|
|
138359
|
-
sumText: {
|
|
138360
|
-
type: String,
|
|
138361
|
-
default: () => '合计'
|
|
138362
|
-
},
|
|
138363
136981
|
sortable: {
|
|
138364
136982
|
type: Boolean,
|
|
138365
136983
|
default: () => false
|
|
@@ -138391,16 +137009,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138391
137009
|
default: () => false
|
|
138392
137010
|
},
|
|
138393
137011
|
action: {
|
|
138394
|
-
type:
|
|
138395
|
-
default: () =>
|
|
138396
|
-
review: null,
|
|
138397
|
-
modify: null,
|
|
138398
|
-
update: null,
|
|
138399
|
-
handle: null,
|
|
138400
|
-
remove: null,
|
|
138401
|
-
delete: null,
|
|
138402
|
-
export: null
|
|
138403
|
-
})
|
|
137012
|
+
type: Array,
|
|
137013
|
+
default: () => []
|
|
138404
137014
|
},
|
|
138405
137015
|
actionWidth: {
|
|
138406
137016
|
type: String,
|
|
@@ -138414,26 +137024,26 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138414
137024
|
type: Boolean,
|
|
138415
137025
|
default: () => true
|
|
138416
137026
|
},
|
|
137027
|
+
pages: {
|
|
137028
|
+
type: Object,
|
|
137029
|
+
default: () => ({})
|
|
137030
|
+
},
|
|
138417
137031
|
page: {
|
|
138418
137032
|
type: Boolean,
|
|
138419
137033
|
default: () => true
|
|
138420
137034
|
}
|
|
138421
137035
|
},
|
|
137036
|
+
data() {
|
|
137037
|
+
return {
|
|
137038
|
+
maxHeight: this.height
|
|
137039
|
+
};
|
|
137040
|
+
},
|
|
138422
137041
|
mounted() {
|
|
138423
137042
|
this.$refs['a-table'].bodyWrapper.addEventListener('wheel', this.scroll);
|
|
138424
137043
|
},
|
|
138425
137044
|
beforeDestroy() {
|
|
138426
137045
|
this.$refs['a-table'].bodyWrapper.removeEventListener('wheel', this.scroll);
|
|
138427
137046
|
},
|
|
138428
|
-
destroyed() {
|
|
138429
|
-
this.create = null;
|
|
138430
|
-
this.search = null;
|
|
138431
|
-
this.select = null;
|
|
138432
|
-
this.choose = null;
|
|
138433
|
-
this.change = null;
|
|
138434
|
-
this.format = null;
|
|
138435
|
-
this.scroll = null;
|
|
138436
|
-
},
|
|
138437
137047
|
methods: {
|
|
138438
137048
|
create() {
|
|
138439
137049
|
let column = [...this.column, this.suffix()];
|
|
@@ -138466,7 +137076,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138466
137076
|
}
|
|
138467
137077
|
}, [h("template", {
|
|
138468
137078
|
"slot": "header"
|
|
138469
|
-
}, [header ? () => header(r) : label && label != '' && label.length
|
|
137079
|
+
}, [header ? () => header(r) : label && label != '' && label.length > 8 ? h("el-tooltip", {
|
|
138470
137080
|
"attrs": {
|
|
138471
137081
|
"content": label,
|
|
138472
137082
|
"placement": "top"
|
|
@@ -138484,70 +137094,45 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138484
137094
|
},
|
|
138485
137095
|
suffix() {
|
|
138486
137096
|
const h = this.$createElement;
|
|
138487
|
-
|
|
137097
|
+
const {
|
|
137098
|
+
review,
|
|
137099
|
+
modify,
|
|
137100
|
+
update,
|
|
137101
|
+
handle,
|
|
137102
|
+
remove
|
|
137103
|
+
} = this.$listeners;
|
|
137104
|
+
if (review || modify || update || handle || remove || this.$listeners.delete || this.$listeners.export || this.action.length > 0) {
|
|
138488
137105
|
return {
|
|
138489
137106
|
fixed: 'right',
|
|
138490
137107
|
align: 'center',
|
|
138491
137108
|
width: this.actionWidth,
|
|
138492
137109
|
label: this.actionTitle,
|
|
137110
|
+
showOverflowTooltip: false,
|
|
138493
137111
|
formatter: item => h("div", {
|
|
138494
137112
|
"class": "action"
|
|
138495
|
-
}, [
|
|
137113
|
+
}, [review && h("i", {
|
|
138496
137114
|
"class": "el-icon-view",
|
|
138497
137115
|
"on": {
|
|
138498
|
-
"click": () =>
|
|
137116
|
+
"click": () => review(item)
|
|
138499
137117
|
}
|
|
138500
|
-
}),
|
|
137118
|
+
}), modify && h("i", {
|
|
138501
137119
|
"class": "el-icon-edit",
|
|
138502
137120
|
"on": {
|
|
138503
|
-
"click": () =>
|
|
137121
|
+
"click": () => modify(item)
|
|
138504
137122
|
}
|
|
138505
|
-
}),
|
|
137123
|
+
}), update && h("i", {
|
|
138506
137124
|
"class": "el-icon-edit",
|
|
138507
137125
|
"on": {
|
|
138508
|
-
"click": () =>
|
|
137126
|
+
"click": () => update(item)
|
|
138509
137127
|
}
|
|
138510
|
-
}),
|
|
137128
|
+
}), handle && h("i", {
|
|
138511
137129
|
"class": "el-icon-edit",
|
|
138512
137130
|
"on": {
|
|
138513
|
-
"click": () =>
|
|
138514
|
-
}
|
|
138515
|
-
}), this.action.remove && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
|
|
138516
|
-
"on": {
|
|
138517
|
-
"submit": () => this.action.remove(item)
|
|
137131
|
+
"click": () => handle(item)
|
|
138518
137132
|
}
|
|
138519
|
-
}),
|
|
137133
|
+
}), remove && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
|
|
138520
137134
|
"on": {
|
|
138521
|
-
"submit": () =>
|
|
138522
|
-
}
|
|
138523
|
-
}), this.action.export && h("i", {
|
|
138524
|
-
"class": "el-icon-download",
|
|
138525
|
-
"on": {
|
|
138526
|
-
"click": () => this.action.export(item)
|
|
138527
|
-
}
|
|
138528
|
-
}), this.$listeners.review && h("i", {
|
|
138529
|
-
"class": "el-icon-view",
|
|
138530
|
-
"on": {
|
|
138531
|
-
"click": () => this.$listeners.review(item)
|
|
138532
|
-
}
|
|
138533
|
-
}), this.$listeners.modify && h("i", {
|
|
138534
|
-
"class": "el-icon-edit",
|
|
138535
|
-
"on": {
|
|
138536
|
-
"click": () => this.$listeners.modify(item)
|
|
138537
|
-
}
|
|
138538
|
-
}), this.$listeners.update && h("i", {
|
|
138539
|
-
"class": "el-icon-edit",
|
|
138540
|
-
"on": {
|
|
138541
|
-
"click": () => this.$listeners.update(item)
|
|
138542
|
-
}
|
|
138543
|
-
}), this.$listeners.handle && h("i", {
|
|
138544
|
-
"class": "el-icon-edit",
|
|
138545
|
-
"on": {
|
|
138546
|
-
"click": () => this.$listeners.handle(item)
|
|
138547
|
-
}
|
|
138548
|
-
}), this.$listeners.remove && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
|
|
138549
|
-
"on": {
|
|
138550
|
-
"submit": () => this.$listeners.remove(item)
|
|
137135
|
+
"submit": () => remove(item)
|
|
138551
137136
|
}
|
|
138552
137137
|
}), this.$listeners.delete && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
|
|
138553
137138
|
"on": {
|
|
@@ -138558,7 +137143,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138558
137143
|
"on": {
|
|
138559
137144
|
"click": () => this.$listeners.export(item)
|
|
138560
137145
|
}
|
|
138561
|
-
})
|
|
137146
|
+
}), this.action.map((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
137147
|
+
"key": b,
|
|
137148
|
+
"on": {
|
|
137149
|
+
"click": e => a.click(item, e)
|
|
137150
|
+
}
|
|
137151
|
+
}, a]), [a.label || a.title || a.text]))])
|
|
138562
137152
|
};
|
|
138563
137153
|
}
|
|
138564
137154
|
},
|
|
@@ -138599,58 +137189,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138599
137189
|
this.$emit('change', pages);
|
|
138600
137190
|
this.search(pages);
|
|
138601
137191
|
},
|
|
138602
|
-
format({
|
|
138603
|
-
type = '',
|
|
138604
|
-
name = '',
|
|
138605
|
-
data = [],
|
|
138606
|
-
text = '',
|
|
138607
|
-
label = '',
|
|
138608
|
-
title = '',
|
|
138609
|
-
field = '',
|
|
138610
|
-
dicts = [],
|
|
138611
|
-
...props
|
|
138612
|
-
}, colIndex, item, rowIndex) {
|
|
137192
|
+
format(a, b, c, d) {
|
|
138613
137193
|
const h = this.$createElement;
|
|
138614
|
-
|
|
138615
|
-
if (field != '') return h(_components_Aenume__WEBPACK_IMPORTED_MODULE_3__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
138616
|
-
"key": colIndex + '-' + rowIndex,
|
|
138617
|
-
"attrs": {
|
|
138618
|
-
"field": field,
|
|
138619
|
-
"data": dicts.length > 0 ? dicts : data
|
|
138620
|
-
}
|
|
138621
|
-
}, props, {
|
|
138622
|
-
"model": {
|
|
138623
|
-
value: item[field],
|
|
138624
|
-
callback: $$v => {
|
|
138625
|
-
this.$set(item, field, $$v);
|
|
138626
|
-
}
|
|
138627
|
-
}
|
|
138628
|
-
}]));
|
|
138629
|
-
return h(_components_Aenume__WEBPACK_IMPORTED_MODULE_3__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
138630
|
-
"key": colIndex + '-' + rowIndex,
|
|
138631
|
-
"attrs": {
|
|
138632
|
-
"field": name,
|
|
138633
|
-
"data": dicts.length > 0 ? dicts : data
|
|
138634
|
-
}
|
|
138635
|
-
}, props, {
|
|
138636
|
-
"model": {
|
|
138637
|
-
value: item[name],
|
|
138638
|
-
callback: $$v => {
|
|
138639
|
-
this.$set(item, name, $$v);
|
|
138640
|
-
}
|
|
138641
|
-
}
|
|
138642
|
-
}]));
|
|
138643
|
-
}
|
|
137194
|
+
let field = a.field || a.index || a.name || a.prop;
|
|
138644
137195
|
return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_6__["default"], {
|
|
138645
|
-
"key":
|
|
137196
|
+
"key": b + '-' + d,
|
|
138646
137197
|
"attrs": {
|
|
138647
137198
|
"config": {
|
|
138648
|
-
|
|
138649
|
-
|
|
138650
|
-
|
|
138651
|
-
field: field != '' ? field : name != '' ? name : '',
|
|
138652
|
-
label: text != '' ? text : label != '' ? label : title != '' ? title : '无栏目名称',
|
|
138653
|
-
...props
|
|
137199
|
+
form: c,
|
|
137200
|
+
field,
|
|
137201
|
+
...a
|
|
138654
137202
|
}
|
|
138655
137203
|
}
|
|
138656
137204
|
});
|
|
@@ -138673,9 +137221,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138673
137221
|
},
|
|
138674
137222
|
render() {
|
|
138675
137223
|
const h = arguments[0];
|
|
138676
|
-
const {
|
|
138677
|
-
...props
|
|
138678
|
-
} = this.$attrs;
|
|
138679
137224
|
const {
|
|
138680
137225
|
...r
|
|
138681
137226
|
} = this.record;
|
|
@@ -138685,34 +137230,34 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138685
137230
|
pageParams = {}
|
|
138686
137231
|
} = this.$store.state;
|
|
138687
137232
|
const {
|
|
138688
|
-
|
|
138689
|
-
} = this;
|
|
138690
|
-
const condition = data.length > 0;
|
|
137233
|
+
...props
|
|
137234
|
+
} = this.$attrs;
|
|
138691
137235
|
return h("div", {
|
|
138692
137236
|
"class": this.border ? 'a-table' : 'a-table border'
|
|
138693
137237
|
}, [h("el-table", {
|
|
138694
137238
|
"ref": "a-table",
|
|
138695
137239
|
"attrs": {
|
|
137240
|
+
"id": this.id,
|
|
138696
137241
|
"data": data,
|
|
138697
137242
|
"size": this.size,
|
|
138698
137243
|
"border": this.border,
|
|
138699
137244
|
"stripe": this.stripe,
|
|
138700
137245
|
"row-key": this.rowKey,
|
|
138701
137246
|
"max-height": this.maxHeight,
|
|
138702
|
-
"element-loading-text": this.elementLoadingText,
|
|
138703
|
-
"element-loading-spinner": this.elementLoadingSpinner,
|
|
138704
|
-
"element-loading-background": this.elementLoadingBackground,
|
|
138705
137247
|
"show-header": this.showHeader,
|
|
138706
137248
|
"default-sort": this.defaultSort,
|
|
138707
137249
|
"show-summary": this.showSummary,
|
|
138708
137250
|
"tooltip-effect": this.tooltipEffect,
|
|
138709
137251
|
"default-expand-all": this.defaultExpandAll,
|
|
138710
137252
|
"tree-props": this.tree ? this.treeProps : {},
|
|
138711
|
-
"highlight-current-row": this.highlightCurrentRow
|
|
137253
|
+
"highlight-current-row": this.highlightCurrentRow,
|
|
137254
|
+
"element-loading-text": this.elementLoadingText,
|
|
137255
|
+
"element-loading-spinner": this.elementLoadingSpinner,
|
|
137256
|
+
"element-loading-background": this.elementLoadingBackground
|
|
138712
137257
|
},
|
|
138713
137258
|
"directives": [{
|
|
138714
137259
|
name: "loading",
|
|
138715
|
-
value: loading
|
|
137260
|
+
value: this.loading
|
|
138716
137261
|
}],
|
|
138717
137262
|
"on": {
|
|
138718
137263
|
"row-click": this.choose,
|
|
@@ -138721,27 +137266,27 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138721
137266
|
"props": {
|
|
138722
137267
|
...props
|
|
138723
137268
|
}
|
|
138724
|
-
}, [
|
|
137269
|
+
}, [(this.selection || this.$listeners.select) && h("el-table-column", {
|
|
138725
137270
|
"attrs": {
|
|
138726
137271
|
"fixed": "left",
|
|
138727
137272
|
"type": "selection",
|
|
138728
137273
|
"width": this.selectionWidth
|
|
138729
137274
|
}
|
|
138730
|
-
}),
|
|
137275
|
+
}), this.sort && h("el-table-column", {
|
|
138731
137276
|
"attrs": {
|
|
138732
137277
|
"fixed": "left",
|
|
138733
137278
|
"type": "index",
|
|
138734
137279
|
"width": this.sortWidth,
|
|
138735
137280
|
"label": this.sortTitle
|
|
138736
137281
|
}
|
|
138737
|
-
}),
|
|
137282
|
+
}), this.create(), this.$slots.default, h("div", {
|
|
138738
137283
|
"slot": "empty",
|
|
138739
137284
|
"class": "empty"
|
|
138740
|
-
}, [!loading && h(_components_Aempty__WEBPACK_IMPORTED_MODULE_2__["default"], {
|
|
137285
|
+
}, [!this.loading && h(_components_Aempty__WEBPACK_IMPORTED_MODULE_2__["default"], {
|
|
138741
137286
|
"attrs": {
|
|
138742
137287
|
"description": this.emptyText
|
|
138743
137288
|
}
|
|
138744
|
-
})])]), !this.tree && this.page &&
|
|
137289
|
+
})])]), !this.tree && this.page && data.length > 0 && h(_components_Apages__WEBPACK_IMPORTED_MODULE_7__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
138745
137290
|
"attrs": {
|
|
138746
137291
|
"total": Number(size),
|
|
138747
137292
|
"pages": pageParams
|
|
@@ -138749,7 +137294,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138749
137294
|
"on": {
|
|
138750
137295
|
"change": this.change
|
|
138751
137296
|
}
|
|
138752
|
-
}
|
|
137297
|
+
}, {
|
|
137298
|
+
"props": this.pages
|
|
137299
|
+
}]))]);
|
|
138753
137300
|
}
|
|
138754
137301
|
});
|
|
138755
137302
|
|
|
@@ -141201,361 +139748,6 @@ const Aecharts = a => Promise.resolve(/* AMD require */).then(function() { var _
|
|
|
141201
139748
|
|
|
141202
139749
|
/***/ }),
|
|
141203
139750
|
|
|
141204
|
-
/***/ "c0f0":
|
|
141205
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
141206
|
-
|
|
141207
|
-
"use strict";
|
|
141208
|
-
__webpack_require__.r(__webpack_exports__);
|
|
141209
|
-
/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
|
|
141210
|
-
/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__);
|
|
141211
|
-
/* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2234");
|
|
141212
|
-
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("9e53");
|
|
141213
|
-
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_2__);
|
|
141214
|
-
|
|
141215
|
-
|
|
141216
|
-
|
|
141217
|
-
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
141218
|
-
name: 'BfSearch',
|
|
141219
|
-
components: {
|
|
141220
|
-
AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"]
|
|
141221
|
-
},
|
|
141222
|
-
props: {
|
|
141223
|
-
value: {
|
|
141224
|
-
type: Object,
|
|
141225
|
-
default: () => ({})
|
|
141226
|
-
},
|
|
141227
|
-
margin: {
|
|
141228
|
-
type: String,
|
|
141229
|
-
default: () => '0'
|
|
141230
|
-
},
|
|
141231
|
-
size: {
|
|
141232
|
-
type: String,
|
|
141233
|
-
default: () => 'small'
|
|
141234
|
-
},
|
|
141235
|
-
inline: {
|
|
141236
|
-
type: Boolean,
|
|
141237
|
-
default: () => false
|
|
141238
|
-
},
|
|
141239
|
-
cols: {
|
|
141240
|
-
type: String,
|
|
141241
|
-
default: () => '6'
|
|
141242
|
-
},
|
|
141243
|
-
gutter: {
|
|
141244
|
-
type: String,
|
|
141245
|
-
default: () => '10'
|
|
141246
|
-
},
|
|
141247
|
-
labelWidth: {
|
|
141248
|
-
type: String,
|
|
141249
|
-
default: () => 'auto'
|
|
141250
|
-
},
|
|
141251
|
-
labelPosition: {
|
|
141252
|
-
type: String,
|
|
141253
|
-
default: () => 'top'
|
|
141254
|
-
},
|
|
141255
|
-
config: {
|
|
141256
|
-
type: Object,
|
|
141257
|
-
default: () => ({})
|
|
141258
|
-
},
|
|
141259
|
-
values: {
|
|
141260
|
-
type: Object,
|
|
141261
|
-
default: () => ({})
|
|
141262
|
-
},
|
|
141263
|
-
label: {
|
|
141264
|
-
type: Boolean,
|
|
141265
|
-
default: () => true
|
|
141266
|
-
},
|
|
141267
|
-
check: {
|
|
141268
|
-
type: Boolean,
|
|
141269
|
-
default: () => false
|
|
141270
|
-
},
|
|
141271
|
-
loading: {
|
|
141272
|
-
type: Boolean,
|
|
141273
|
-
default: () => false
|
|
141274
|
-
},
|
|
141275
|
-
submitText: {
|
|
141276
|
-
type: String,
|
|
141277
|
-
default: () => '搜索'
|
|
141278
|
-
},
|
|
141279
|
-
cancelText: {
|
|
141280
|
-
type: String,
|
|
141281
|
-
default: () => '重置'
|
|
141282
|
-
}
|
|
141283
|
-
},
|
|
141284
|
-
data() {
|
|
141285
|
-
return {
|
|
141286
|
-
form: this.value,
|
|
141287
|
-
height: 0,
|
|
141288
|
-
opened: false
|
|
141289
|
-
};
|
|
141290
|
-
},
|
|
141291
|
-
created() {
|
|
141292
|
-
this.create();
|
|
141293
|
-
},
|
|
141294
|
-
mounted() {
|
|
141295
|
-
this.update();
|
|
141296
|
-
},
|
|
141297
|
-
destroyed() {
|
|
141298
|
-
this.create = null;
|
|
141299
|
-
this.update = null;
|
|
141300
|
-
this.submit = null;
|
|
141301
|
-
this.cancel = null;
|
|
141302
|
-
this.filter = null;
|
|
141303
|
-
this.result = null;
|
|
141304
|
-
this.switch = null;
|
|
141305
|
-
this.format = null;
|
|
141306
|
-
this.output = null;
|
|
141307
|
-
},
|
|
141308
|
-
watch: {
|
|
141309
|
-
values() {
|
|
141310
|
-
this.create();
|
|
141311
|
-
}
|
|
141312
|
-
},
|
|
141313
|
-
methods: {
|
|
141314
|
-
create() {
|
|
141315
|
-
// 创建表单
|
|
141316
|
-
if (this.config && Object.keys(this.config).length > 0) {
|
|
141317
|
-
// 格式化表单配置对象(this.config)为数据双向绑定对象
|
|
141318
|
-
let data = {};
|
|
141319
|
-
Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
|
|
141320
|
-
let {
|
|
141321
|
-
...r
|
|
141322
|
-
} = this.config[a];
|
|
141323
|
-
if (!r.render) {
|
|
141324
|
-
let range = r.range || r.scope || r.both || r.than || null;
|
|
141325
|
-
if (range) {
|
|
141326
|
-
data[`${a}LE`] = '';
|
|
141327
|
-
data[`${a}GE`] = '';
|
|
141328
|
-
} else {
|
|
141329
|
-
data[a] = r.default ? r.default : '';
|
|
141330
|
-
}
|
|
141331
|
-
}
|
|
141332
|
-
});
|
|
141333
|
-
this.form = data;
|
|
141334
|
-
}
|
|
141335
|
-
},
|
|
141336
|
-
update() {
|
|
141337
|
-
let rows = Math.ceil(Object.keys(this.config).length / this.cols);
|
|
141338
|
-
this.height = this.$el.clientHeight * (rows - 1);
|
|
141339
|
-
},
|
|
141340
|
-
submit(e) {
|
|
141341
|
-
// 提交表单
|
|
141342
|
-
e && e.preventDefault();
|
|
141343
|
-
let pass = !this.check; // 判断是否是空表单
|
|
141344
|
-
for (let a in this.form) if (this.form[a] != '') pass = true;
|
|
141345
|
-
if (pass) {
|
|
141346
|
-
let result = this.filter();
|
|
141347
|
-
this.$nextTick(() => {
|
|
141348
|
-
this.$emit('submit', {
|
|
141349
|
-
...result,
|
|
141350
|
-
page: 1
|
|
141351
|
-
}); // 派发事件并重置当前分页
|
|
141352
|
-
return result;
|
|
141353
|
-
});
|
|
141354
|
-
}
|
|
141355
|
-
},
|
|
141356
|
-
cancel(e) {
|
|
141357
|
-
// 重置表单
|
|
141358
|
-
e && e.preventDefault();
|
|
141359
|
-
let pass = !this.check; // 判断是否是空表单
|
|
141360
|
-
for (let a in this.form) if (this.form[a] != '') pass = true;
|
|
141361
|
-
if (pass) {
|
|
141362
|
-
this.$nextTick(() => {
|
|
141363
|
-
for (let a in this.form) this.form[a] = '';
|
|
141364
|
-
this.$nextTick(() => this.$emit('cancel', this.form));
|
|
141365
|
-
});
|
|
141366
|
-
}
|
|
141367
|
-
},
|
|
141368
|
-
filter() {
|
|
141369
|
-
let data = {};
|
|
141370
|
-
Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
|
|
141371
|
-
let {
|
|
141372
|
-
like = null,
|
|
141373
|
-
...r
|
|
141374
|
-
} = this.config[a];
|
|
141375
|
-
let range = r.range || r.scope || r.both || r.than || null;
|
|
141376
|
-
if (range) {
|
|
141377
|
-
this.form[`${a}LE`] != '' && (data[`${a}LE`] = this.form[`${a}LE`]);
|
|
141378
|
-
this.form[`${a}GE`] != '' && (data[`${a}GE`] = this.form[`${a}GE`]);
|
|
141379
|
-
} else {
|
|
141380
|
-
let value = this.form[a];
|
|
141381
|
-
if (value) {
|
|
141382
|
-
if (r.split && typeof r.split == 'object' && r.split.length > 0) {
|
|
141383
|
-
r.split.forEach((c, d) => data[c] = value != '' && typeof value == 'object' && value.length > 0 ? value[d] : value);
|
|
141384
|
-
} else {
|
|
141385
|
-
if (like) {
|
|
141386
|
-
if (like == 'left' || like && like == 'l') data[a] = '%' + value;
|
|
141387
|
-
if (like == 'right' || like && like == 'r') data[a] = value + '%';else data[a] = '%' + value + '%';
|
|
141388
|
-
} else {
|
|
141389
|
-
if (value.includes(' 00:00:00')) {
|
|
141390
|
-
data[a] = '%' + value.split(' 00:00:00')[0] + '%';
|
|
141391
|
-
} else {
|
|
141392
|
-
data[a] = value;
|
|
141393
|
-
}
|
|
141394
|
-
}
|
|
141395
|
-
}
|
|
141396
|
-
}
|
|
141397
|
-
}
|
|
141398
|
-
});
|
|
141399
|
-
let form = {};
|
|
141400
|
-
Object.keys(data).length > 0 && Object.keys(data).forEach(a => {
|
|
141401
|
-
if (data[a] != '%' && data[a] != '%%' && data[a] != 'null' && data[a] != 'undefined' && data[a] != null && data[a] != undefined) {
|
|
141402
|
-
form[a] = data[a];
|
|
141403
|
-
}
|
|
141404
|
-
});
|
|
141405
|
-
return form;
|
|
141406
|
-
},
|
|
141407
|
-
result() {
|
|
141408
|
-
return this.filter(this.form);
|
|
141409
|
-
},
|
|
141410
|
-
switch() {
|
|
141411
|
-
this.opened = !this.opened;
|
|
141412
|
-
},
|
|
141413
|
-
format(a = '', field = '', placeholder = '') {
|
|
141414
|
-
const h = this.$createElement;
|
|
141415
|
-
let {
|
|
141416
|
-
...r
|
|
141417
|
-
} = this.config[a];
|
|
141418
|
-
let config = {
|
|
141419
|
-
size: r.size ? r.size : this.size,
|
|
141420
|
-
field: field != '' ? field : a,
|
|
141421
|
-
change: () => this.change(),
|
|
141422
|
-
disabled: this.loading,
|
|
141423
|
-
form: this.form,
|
|
141424
|
-
...r
|
|
141425
|
-
};
|
|
141426
|
-
return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
141427
|
-
"attrs": {
|
|
141428
|
-
"config": placeholder != '' ? {
|
|
141429
|
-
...config,
|
|
141430
|
-
placeholder
|
|
141431
|
-
} : config
|
|
141432
|
-
}
|
|
141433
|
-
});
|
|
141434
|
-
},
|
|
141435
|
-
output(a, b) {
|
|
141436
|
-
const h = this.$createElement;
|
|
141437
|
-
let {
|
|
141438
|
-
...r
|
|
141439
|
-
} = this.config[a];
|
|
141440
|
-
let range = r.range || r.scope || r.both || r.than || null;
|
|
141441
|
-
let label = this.label ? r.text || r.label || r.title : '';
|
|
141442
|
-
let style = this.cols != '' ? {
|
|
141443
|
-
width: r.width ? r.width : `${100 / this.cols}%`
|
|
141444
|
-
} : {};
|
|
141445
|
-
let prefixPlaceholder = r.placeholder && r.placeholder.length > 0 ? r.placeholder[0] : '最高';
|
|
141446
|
-
let suffixPlaceholder = r.placeholder && r.placeholder.length > 1 ? r.placeholder[1] : '最低';
|
|
141447
|
-
return h("el-col", {
|
|
141448
|
-
"key": b,
|
|
141449
|
-
"style": style
|
|
141450
|
-
}, [h("el-form-item", {
|
|
141451
|
-
"attrs": {
|
|
141452
|
-
"prop": a,
|
|
141453
|
-
"label": label
|
|
141454
|
-
}
|
|
141455
|
-
}, [range ? h("el-col", {
|
|
141456
|
-
"class": "range-cols"
|
|
141457
|
-
}, [h("el-col", {
|
|
141458
|
-
"attrs": {
|
|
141459
|
-
"span": 12
|
|
141460
|
-
}
|
|
141461
|
-
}, [this.format(a, `${a}LE`, prefixPlaceholder)]), h("el-col", {
|
|
141462
|
-
"attrs": {
|
|
141463
|
-
"span": 12
|
|
141464
|
-
}
|
|
141465
|
-
}, [this.format(a, `${a}GE`, suffixPlaceholder)])]) : this.format(a)])]);
|
|
141466
|
-
},
|
|
141467
|
-
change() {
|
|
141468
|
-
this.$emit('input', this.filter());
|
|
141469
|
-
this.$emit('change', this.filter());
|
|
141470
|
-
}
|
|
141471
|
-
},
|
|
141472
|
-
render() {
|
|
141473
|
-
const h = arguments[0];
|
|
141474
|
-
const {
|
|
141475
|
-
...props
|
|
141476
|
-
} = this.$attrs;
|
|
141477
|
-
const {
|
|
141478
|
-
submit = null,
|
|
141479
|
-
cancel = null
|
|
141480
|
-
} = this.$listeners;
|
|
141481
|
-
return h("div", {
|
|
141482
|
-
"class": "b-f-search",
|
|
141483
|
-
"style": {
|
|
141484
|
-
padding: this.margin
|
|
141485
|
-
}
|
|
141486
|
-
}, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
141487
|
-
"ref": "form",
|
|
141488
|
-
"attrs": {
|
|
141489
|
-
"size": this.size,
|
|
141490
|
-
"inline": this.inline
|
|
141491
|
-
}
|
|
141492
|
-
}, {
|
|
141493
|
-
"props": {
|
|
141494
|
-
model: this.form,
|
|
141495
|
-
...props
|
|
141496
|
-
}
|
|
141497
|
-
}, {
|
|
141498
|
-
"attrs": {
|
|
141499
|
-
"labelWidth": this.labelWidth,
|
|
141500
|
-
"labelPosition": this.labelPosition
|
|
141501
|
-
}
|
|
141502
|
-
}]), [h("div", {
|
|
141503
|
-
"class": "column"
|
|
141504
|
-
}, [h("el-row", {
|
|
141505
|
-
"attrs": {
|
|
141506
|
-
"gutter": Number(this.gutter)
|
|
141507
|
-
},
|
|
141508
|
-
"class": "main-rows"
|
|
141509
|
-
}, [Object.keys(this.config).map((a, b) => b < this.cols && this.output(a, b))]), h("el-row", {
|
|
141510
|
-
"attrs": {
|
|
141511
|
-
"gutter": Number(this.gutter)
|
|
141512
|
-
},
|
|
141513
|
-
"class": "fold-rows",
|
|
141514
|
-
"style": {
|
|
141515
|
-
height: this.opened ? `${this.height}px` : '0'
|
|
141516
|
-
}
|
|
141517
|
-
}, [Object.keys(this.config).map((a, b) => b > this.cols - 1 && this.output(a, b))])]), (Object.keys(this.config).length > this.cols || submit || cancel) && h("div", {
|
|
141518
|
-
"class": "action",
|
|
141519
|
-
"style": {
|
|
141520
|
-
paddingLeft: `${this.gutter}px`
|
|
141521
|
-
}
|
|
141522
|
-
}, [h("el-form-item", {
|
|
141523
|
-
"attrs": {
|
|
141524
|
-
"label": "action"
|
|
141525
|
-
}
|
|
141526
|
-
}, [Object.keys(this.config).length > this.cols && h("el-button", {
|
|
141527
|
-
"attrs": {
|
|
141528
|
-
"disabled": this.loading,
|
|
141529
|
-
"type": "text"
|
|
141530
|
-
},
|
|
141531
|
-
"class": "collapse-button",
|
|
141532
|
-
"on": {
|
|
141533
|
-
"click": this.switch
|
|
141534
|
-
}
|
|
141535
|
-
}, [h("i", {
|
|
141536
|
-
"class": `el-icon-arrow-${this.opened ? 'up' : 'down'}`
|
|
141537
|
-
}), this.opened ? '收起' : '展开']), submit && h("el-button", {
|
|
141538
|
-
"attrs": {
|
|
141539
|
-
"disabled": this.loading,
|
|
141540
|
-
"type": "primary"
|
|
141541
|
-
},
|
|
141542
|
-
"on": {
|
|
141543
|
-
"click": this.submit
|
|
141544
|
-
}
|
|
141545
|
-
}, [this.submitText]), cancel && h("el-button", {
|
|
141546
|
-
"attrs": {
|
|
141547
|
-
"disabled": this.loading,
|
|
141548
|
-
"type": "default"
|
|
141549
|
-
},
|
|
141550
|
-
"on": {
|
|
141551
|
-
"click": this.cancel
|
|
141552
|
-
}
|
|
141553
|
-
}, [this.cancelText])])])])]);
|
|
141554
|
-
}
|
|
141555
|
-
});
|
|
141556
|
-
|
|
141557
|
-
/***/ }),
|
|
141558
|
-
|
|
141559
139751
|
/***/ "c0f5":
|
|
141560
139752
|
/***/ (function(module, exports, __webpack_require__) {
|
|
141561
139753
|
|
|
@@ -153394,13 +151586,6 @@ module.exports = _default;
|
|
|
153394
151586
|
|
|
153395
151587
|
/***/ }),
|
|
153396
151588
|
|
|
153397
|
-
/***/ "d4f0":
|
|
153398
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
153399
|
-
|
|
153400
|
-
// extracted by mini-css-extract-plugin
|
|
153401
|
-
|
|
153402
|
-
/***/ }),
|
|
153403
|
-
|
|
153404
151589
|
/***/ "d4f3":
|
|
153405
151590
|
/***/ (function(module, exports) {
|
|
153406
151591
|
|
|
@@ -160991,7 +159176,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
160991
159176
|
},
|
|
160992
159177
|
height: {
|
|
160993
159178
|
type: String,
|
|
160994
|
-
default: () => '
|
|
159179
|
+
default: () => '68vh'
|
|
160995
159180
|
},
|
|
160996
159181
|
loading: {
|
|
160997
159182
|
type: Boolean,
|
|
@@ -169731,6 +167916,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
169731
167916
|
|
|
169732
167917
|
|
|
169733
167918
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
167919
|
+
name: 'BfSearch',
|
|
169734
167920
|
render() {
|
|
169735
167921
|
const h = arguments[0];
|
|
169736
167922
|
let {
|