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.common.js
CHANGED
|
@@ -6265,359 +6265,6 @@ module.exports = _default;
|
|
|
6265
6265
|
|
|
6266
6266
|
/***/ }),
|
|
6267
6267
|
|
|
6268
|
-
/***/ "0d0c":
|
|
6269
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
6270
|
-
|
|
6271
|
-
"use strict";
|
|
6272
|
-
__webpack_require__.r(__webpack_exports__);
|
|
6273
|
-
/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
|
|
6274
|
-
/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__);
|
|
6275
|
-
/* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2234");
|
|
6276
|
-
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("d4f0");
|
|
6277
|
-
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_2__);
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
6282
|
-
name: 'Aform',
|
|
6283
|
-
components: {
|
|
6284
|
-
AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"]
|
|
6285
|
-
},
|
|
6286
|
-
props: {
|
|
6287
|
-
margin: {
|
|
6288
|
-
type: String,
|
|
6289
|
-
default: () => '0'
|
|
6290
|
-
},
|
|
6291
|
-
pure: {
|
|
6292
|
-
type: Boolean,
|
|
6293
|
-
default: () => true
|
|
6294
|
-
},
|
|
6295
|
-
inline: {
|
|
6296
|
-
type: Boolean,
|
|
6297
|
-
default: () => false
|
|
6298
|
-
},
|
|
6299
|
-
size: {
|
|
6300
|
-
type: String,
|
|
6301
|
-
default: () => 'small'
|
|
6302
|
-
},
|
|
6303
|
-
rules: {
|
|
6304
|
-
type: Object,
|
|
6305
|
-
default: () => ({})
|
|
6306
|
-
},
|
|
6307
|
-
labelWidth: {
|
|
6308
|
-
type: String,
|
|
6309
|
-
default: () => ''
|
|
6310
|
-
},
|
|
6311
|
-
labelPosition: {
|
|
6312
|
-
type: String,
|
|
6313
|
-
default: () => 'top'
|
|
6314
|
-
},
|
|
6315
|
-
config: {
|
|
6316
|
-
type: Array,
|
|
6317
|
-
default: () => []
|
|
6318
|
-
},
|
|
6319
|
-
object: {
|
|
6320
|
-
type: Object,
|
|
6321
|
-
default: () => ({})
|
|
6322
|
-
},
|
|
6323
|
-
values: {
|
|
6324
|
-
type: Object,
|
|
6325
|
-
default: () => ({})
|
|
6326
|
-
},
|
|
6327
|
-
label: {
|
|
6328
|
-
type: Boolean,
|
|
6329
|
-
default: () => true
|
|
6330
|
-
},
|
|
6331
|
-
loading: {
|
|
6332
|
-
type: Boolean,
|
|
6333
|
-
default: () => false
|
|
6334
|
-
},
|
|
6335
|
-
fileRemoveMark: {
|
|
6336
|
-
type: String,
|
|
6337
|
-
default: () => 'will-remove'
|
|
6338
|
-
},
|
|
6339
|
-
finishText: {
|
|
6340
|
-
type: String,
|
|
6341
|
-
default: () => '保存'
|
|
6342
|
-
},
|
|
6343
|
-
submitText: {
|
|
6344
|
-
type: String,
|
|
6345
|
-
default: () => '确定'
|
|
6346
|
-
},
|
|
6347
|
-
searchText: {
|
|
6348
|
-
type: String,
|
|
6349
|
-
default: () => '搜索'
|
|
6350
|
-
},
|
|
6351
|
-
cancelText: {
|
|
6352
|
-
type: String,
|
|
6353
|
-
default: () => '取消'
|
|
6354
|
-
}
|
|
6355
|
-
},
|
|
6356
|
-
data() {
|
|
6357
|
-
return {
|
|
6358
|
-
form: {},
|
|
6359
|
-
randomKey: `key-${Math.random()}`
|
|
6360
|
-
};
|
|
6361
|
-
},
|
|
6362
|
-
created() {
|
|
6363
|
-
this.create();
|
|
6364
|
-
},
|
|
6365
|
-
beforeDestroy() {
|
|
6366
|
-
this.cancel();
|
|
6367
|
-
},
|
|
6368
|
-
destroyed() {
|
|
6369
|
-
this.create = null;
|
|
6370
|
-
this.verify = null;
|
|
6371
|
-
this.finish = null;
|
|
6372
|
-
this.submit = null;
|
|
6373
|
-
this.cancel = null;
|
|
6374
|
-
this.filter = null;
|
|
6375
|
-
this.result = null;
|
|
6376
|
-
},
|
|
6377
|
-
watch: {
|
|
6378
|
-
values: {
|
|
6379
|
-
immediate: true,
|
|
6380
|
-
handler() {
|
|
6381
|
-
this.create();
|
|
6382
|
-
}
|
|
6383
|
-
}
|
|
6384
|
-
},
|
|
6385
|
-
methods: {
|
|
6386
|
-
create() {
|
|
6387
|
-
// 创建表单 格式化表单配置对象(this.config)为数据双向绑定对象
|
|
6388
|
-
this.randomKey = `key-${Math.random()}`;
|
|
6389
|
-
const {
|
|
6390
|
-
config = [],
|
|
6391
|
-
object = {},
|
|
6392
|
-
values = {}
|
|
6393
|
-
} = this;
|
|
6394
|
-
let temp = {};
|
|
6395
|
-
let data = {};
|
|
6396
|
-
if (config && config.length > 0) {
|
|
6397
|
-
for (let a in config) temp[config[a].name || config[a].field] = '';
|
|
6398
|
-
}
|
|
6399
|
-
if (object && Object.keys(object).length > 0) {
|
|
6400
|
-
for (let a in object) temp[a] = '';
|
|
6401
|
-
}
|
|
6402
|
-
if (values && Object.keys(values).length > 0) {
|
|
6403
|
-
// 设置默认值
|
|
6404
|
-
for (let a in temp) {
|
|
6405
|
-
if (a.includes('password')) data[a] = '';else data[a] = isNaN(values[a]) ? values[a] : values[a] != null ? `${values[a]}` : '';
|
|
6406
|
-
}
|
|
6407
|
-
} else {
|
|
6408
|
-
if (!this.pure) {
|
|
6409
|
-
for (let a in config) {
|
|
6410
|
-
// 设置 config 数组(单选框, 下拉框, 开关) 默认值为0
|
|
6411
|
-
if (!config[a].pure) {
|
|
6412
|
-
if (config[a]['type'] == 'radio' || config[a]['type'] == 'select' || config[a]['type'] == 'switch') {
|
|
6413
|
-
data[config[a].name || config[a].field] = config[a].default || '0';
|
|
6414
|
-
} else data[config[a].name || config[a].field] = config[a].default || '';
|
|
6415
|
-
} else data[config[a].name || config[a].field] = '';
|
|
6416
|
-
}
|
|
6417
|
-
for (let a in object) {
|
|
6418
|
-
// 设置 object 对象(单选框, 下拉框, 开关) 默认值为0
|
|
6419
|
-
if (!object[a].pure) {
|
|
6420
|
-
if (object[a]['type'] == 'radio' || object[a]['type'] == 'select' || object[a]['type'] == 'switch') {
|
|
6421
|
-
data[a] = object[a].default || '0';
|
|
6422
|
-
} else data[a] = object[a].default || '';
|
|
6423
|
-
} else data[a] = '';
|
|
6424
|
-
}
|
|
6425
|
-
} else {
|
|
6426
|
-
for (let a in temp) data[a] = '';
|
|
6427
|
-
}
|
|
6428
|
-
}
|
|
6429
|
-
this.form = data;
|
|
6430
|
-
},
|
|
6431
|
-
verify() {
|
|
6432
|
-
// 表单验证
|
|
6433
|
-
let result = false;
|
|
6434
|
-
this.$refs['form'].validate(valid => result = valid);
|
|
6435
|
-
return result;
|
|
6436
|
-
},
|
|
6437
|
-
finish(e) {
|
|
6438
|
-
e && e.preventDefault();
|
|
6439
|
-
this.$emit('finish', this.result());
|
|
6440
|
-
},
|
|
6441
|
-
submit(e) {
|
|
6442
|
-
// 提交表单
|
|
6443
|
-
e && e.preventDefault();
|
|
6444
|
-
this.$refs['form'].validate(valid => {
|
|
6445
|
-
if (valid) {
|
|
6446
|
-
let data = {};
|
|
6447
|
-
if (this.config.length > 0) {
|
|
6448
|
-
for (let a in this.config) {
|
|
6449
|
-
// 格式化数据模糊查询
|
|
6450
|
-
if (this.config[a].like) data[this.config[a].name] = '%' + this.form[this.config[a].name] + '%';
|
|
6451
|
-
if (this.form[this.config[a].name] && Object.keys(this.form[this.config[a].name]).length > 0 && this.form[this.config[a].name].old && this.form[this.config[a].name].old.split('=')[1] != '') {
|
|
6452
|
-
// 判断是否有默认图片删除
|
|
6453
|
-
const {
|
|
6454
|
-
old
|
|
6455
|
-
} = this.form[this.config[a].name];
|
|
6456
|
-
data[this.config[a].name] = this.form[this.config[a].name];
|
|
6457
|
-
data[`${this.config[a].name}-${this.fileRemoveMark}`] = old;
|
|
6458
|
-
} else data[this.config[a].name] = this.form[this.config[a].name];
|
|
6459
|
-
}
|
|
6460
|
-
}
|
|
6461
|
-
if (Object.keys(this.object).length > 0) {
|
|
6462
|
-
for (let a in this.object) {
|
|
6463
|
-
// 格式化数据模糊查询
|
|
6464
|
-
if (this.object[a].like) data[a] = '%' + this.form[a] + '%';
|
|
6465
|
-
if (this.form[a] && Object.keys(this.form[a]).length > 0 && this.form[a].old && this.form[a].old.split('=')[1] != '') {
|
|
6466
|
-
// 判断是否有默认图片删除
|
|
6467
|
-
const {
|
|
6468
|
-
old
|
|
6469
|
-
} = this.form[a];
|
|
6470
|
-
data[a] = this.form[a];
|
|
6471
|
-
data[`${a}-${this.fileRemoveMark}`] = old;
|
|
6472
|
-
} else data[a] = this.form[a];
|
|
6473
|
-
}
|
|
6474
|
-
}
|
|
6475
|
-
this.$emit('submit', this.filter(data));
|
|
6476
|
-
return this.filter(data);
|
|
6477
|
-
}
|
|
6478
|
-
});
|
|
6479
|
-
},
|
|
6480
|
-
regain() {
|
|
6481
|
-
this.$refs['form'] && this.$refs['form'].resetFields();
|
|
6482
|
-
},
|
|
6483
|
-
cancel(e) {
|
|
6484
|
-
e && e.preventDefault();
|
|
6485
|
-
this.$emit('cancel', this.form);
|
|
6486
|
-
this.$nextTick(() => {
|
|
6487
|
-
for (let a in this.form) this.form[a] = '';
|
|
6488
|
-
this.$nextTick(() => this.$refs['form'] && this.$refs['form'].resetFields());
|
|
6489
|
-
});
|
|
6490
|
-
},
|
|
6491
|
-
filter(form) {
|
|
6492
|
-
// 过滤空值属性
|
|
6493
|
-
const data = {};
|
|
6494
|
-
for (let a in form) {
|
|
6495
|
-
if (a != undefined && a != 'undefined' && form[a] != '%%' && form[a] != 'null' && form[a] != 'undefined' && form[a] != null && form[a] != undefined) {
|
|
6496
|
-
data[a] = form[a];
|
|
6497
|
-
}
|
|
6498
|
-
}
|
|
6499
|
-
return data;
|
|
6500
|
-
},
|
|
6501
|
-
result() {
|
|
6502
|
-
return this.filter(this.form);
|
|
6503
|
-
},
|
|
6504
|
-
change() {
|
|
6505
|
-
this.$emit('input', this.form);
|
|
6506
|
-
this.$emit('change', this.form);
|
|
6507
|
-
}
|
|
6508
|
-
},
|
|
6509
|
-
render() {
|
|
6510
|
-
const h = arguments[0];
|
|
6511
|
-
const {
|
|
6512
|
-
...props
|
|
6513
|
-
} = this.$attrs;
|
|
6514
|
-
const {
|
|
6515
|
-
finish = null,
|
|
6516
|
-
submit = null,
|
|
6517
|
-
cancel = null
|
|
6518
|
-
} = this.$listeners;
|
|
6519
|
-
return h("div", {
|
|
6520
|
-
"class": !this.inline ? this.search ? 'a-form' : 'a-from vertical' : 'a-form',
|
|
6521
|
-
"style": {
|
|
6522
|
-
padding: this.margin
|
|
6523
|
-
}
|
|
6524
|
-
}, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
6525
|
-
"ref": "form",
|
|
6526
|
-
"attrs": {
|
|
6527
|
-
"size": this.size,
|
|
6528
|
-
"labelWidth": this.labelWidth,
|
|
6529
|
-
"labelPosition": this.labelPosition,
|
|
6530
|
-
"inline": this.inline ? this.inline : this.search
|
|
6531
|
-
}
|
|
6532
|
-
}, {
|
|
6533
|
-
"props": {
|
|
6534
|
-
model: this.form,
|
|
6535
|
-
rules: Object.keys(this.rules).length > 0 ? this.rules : {},
|
|
6536
|
-
...props
|
|
6537
|
-
}
|
|
6538
|
-
}]), [this.config.length > 0 && this.config.map((a, b) => h("el-form-item", {
|
|
6539
|
-
"key": b,
|
|
6540
|
-
"attrs": {
|
|
6541
|
-
"prop": `${a.name}`,
|
|
6542
|
-
"label": this.label ? a.type && a.type == 'checkbox' ? '' : a.text || a.label || a.title : '',
|
|
6543
|
-
"rules": a['must'] ? a['rule'] ? a['rule'] : [{
|
|
6544
|
-
required: true,
|
|
6545
|
-
trigger: 'blur',
|
|
6546
|
-
message: `${a['text']}不能为空`
|
|
6547
|
-
}] : a['rule']
|
|
6548
|
-
},
|
|
6549
|
-
"style": {
|
|
6550
|
-
width: a.width
|
|
6551
|
-
}
|
|
6552
|
-
}, [h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
6553
|
-
"attrs": {
|
|
6554
|
-
"config": {
|
|
6555
|
-
form: this.form,
|
|
6556
|
-
size: a.size ? a.size : this.size,
|
|
6557
|
-
field: `${a.name}`,
|
|
6558
|
-
...a
|
|
6559
|
-
}
|
|
6560
|
-
},
|
|
6561
|
-
"on": {
|
|
6562
|
-
"change": () => this.change()
|
|
6563
|
-
}
|
|
6564
|
-
})])), Object.keys(this.object).length > 0 && Object.keys(this.object).map((a, b) => h("el-form-item", {
|
|
6565
|
-
"key": b,
|
|
6566
|
-
"attrs": {
|
|
6567
|
-
"prop": `${a}`,
|
|
6568
|
-
"label": this.label ? this.object[a].type && this.object[a].type == 'checkbox' ? '' : this.object[a].text || this.object[a].label || this.object[a].title : '',
|
|
6569
|
-
"rules": this.object[a]['must'] ? this.object[a]['rule'] ? this.object[a]['rule'] : [{
|
|
6570
|
-
required: true,
|
|
6571
|
-
trigger: 'blur',
|
|
6572
|
-
message: `${this.object[a]['text']}不能为空`
|
|
6573
|
-
}] : this.object[a]['rule']
|
|
6574
|
-
},
|
|
6575
|
-
"style": {
|
|
6576
|
-
width: this.object[a].width
|
|
6577
|
-
}
|
|
6578
|
-
}, [h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
6579
|
-
"attrs": {
|
|
6580
|
-
"config": {
|
|
6581
|
-
form: this.form,
|
|
6582
|
-
size: this.object[a].size ? this.object[a].size : this.size,
|
|
6583
|
-
field: `${a}`,
|
|
6584
|
-
...this.object[a]
|
|
6585
|
-
}
|
|
6586
|
-
},
|
|
6587
|
-
"on": {
|
|
6588
|
-
"change": () => this.change()
|
|
6589
|
-
}
|
|
6590
|
-
})])), this.$slots.default, (finish || submit || cancel) && h("div", {
|
|
6591
|
-
"class": "action"
|
|
6592
|
-
}, [h("el-form-item", [finish && this.finishText != '' && h("el-button", {
|
|
6593
|
-
"attrs": {
|
|
6594
|
-
"loading": this.loading,
|
|
6595
|
-
"type": "success"
|
|
6596
|
-
},
|
|
6597
|
-
"on": {
|
|
6598
|
-
"click": this.finish
|
|
6599
|
-
}
|
|
6600
|
-
}, [this.finishText]), submit && h("el-button", {
|
|
6601
|
-
"attrs": {
|
|
6602
|
-
"loading": this.loading,
|
|
6603
|
-
"type": "primary"
|
|
6604
|
-
},
|
|
6605
|
-
"on": {
|
|
6606
|
-
"click": this.submit
|
|
6607
|
-
}
|
|
6608
|
-
}, [this.submitText]), cancel && h("el-button", {
|
|
6609
|
-
"attrs": {
|
|
6610
|
-
"disabled": this.loading
|
|
6611
|
-
},
|
|
6612
|
-
"on": {
|
|
6613
|
-
"click": this.cancel
|
|
6614
|
-
}
|
|
6615
|
-
}, [this.cancelText])])])])]);
|
|
6616
|
-
}
|
|
6617
|
-
});
|
|
6618
|
-
|
|
6619
|
-
/***/ }),
|
|
6620
|
-
|
|
6621
6268
|
/***/ "0d7f":
|
|
6622
6269
|
/***/ (function(module, exports, __webpack_require__) {
|
|
6623
6270
|
|
|
@@ -13401,31 +13048,6 @@ var map = {
|
|
|
13401
13048
|
"./Aenume/index": "6cc8",
|
|
13402
13049
|
"./Aenume/index.js": "6cc8",
|
|
13403
13050
|
"./Aform": "aff6",
|
|
13404
|
-
"./Aform copy": "0d0c",
|
|
13405
|
-
"./Aform copy/": "0d0c",
|
|
13406
|
-
"./Aform copy/AfEditor": "3cef",
|
|
13407
|
-
"./Aform copy/AfEditor/": "3cef",
|
|
13408
|
-
"./Aform copy/AfEditor/index": "3cef",
|
|
13409
|
-
"./Aform copy/AfEditor/index.css": "9203",
|
|
13410
|
-
"./Aform copy/AfEditor/index.js": "3cef",
|
|
13411
|
-
"./Aform copy/AfSearch": "230c",
|
|
13412
|
-
"./Aform copy/AfSearch/": "230c",
|
|
13413
|
-
"./Aform copy/AfSearch/index": "230c",
|
|
13414
|
-
"./Aform copy/AfSearch/index.css": "6e39",
|
|
13415
|
-
"./Aform copy/AfSearch/index.js": "230c",
|
|
13416
|
-
"./Aform copy/BfSearch": "c0f0",
|
|
13417
|
-
"./Aform copy/BfSearch/": "c0f0",
|
|
13418
|
-
"./Aform copy/BfSearch/index": "c0f0",
|
|
13419
|
-
"./Aform copy/BfSearch/index.css": "9e53",
|
|
13420
|
-
"./Aform copy/BfSearch/index.js": "c0f0",
|
|
13421
|
-
"./Aform copy/CfSearch": "a237",
|
|
13422
|
-
"./Aform copy/CfSearch/": "a237",
|
|
13423
|
-
"./Aform copy/CfSearch/index": "a237",
|
|
13424
|
-
"./Aform copy/CfSearch/index.css": "af1c",
|
|
13425
|
-
"./Aform copy/CfSearch/index.js": "a237",
|
|
13426
|
-
"./Aform copy/index": "0d0c",
|
|
13427
|
-
"./Aform copy/index.css": "d4f0",
|
|
13428
|
-
"./Aform copy/index.js": "0d0c",
|
|
13429
13051
|
"./Aform/": "aff6",
|
|
13430
13052
|
"./Aform/AfEditor": "b550",
|
|
13431
13053
|
"./Aform/AfEditor/": "b550",
|
|
@@ -13616,6 +13238,11 @@ var map = {
|
|
|
13616
13238
|
"./Bmap/index": "e579",
|
|
13617
13239
|
"./Bmap/index.css": "ba59",
|
|
13618
13240
|
"./Bmap/index.js": "e579",
|
|
13241
|
+
"./Bpages": "7c09",
|
|
13242
|
+
"./Bpages/": "7c09",
|
|
13243
|
+
"./Bpages/index": "7c09",
|
|
13244
|
+
"./Bpages/index.css": "2769",
|
|
13245
|
+
"./Bpages/index.js": "7c09",
|
|
13619
13246
|
"./Bplayer": "2c3e",
|
|
13620
13247
|
"./Bplayer/": "2c3e",
|
|
13621
13248
|
"./Bplayer/index": "2c3e",
|
|
@@ -13851,6 +13478,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13851
13478
|
type: Object,
|
|
13852
13479
|
default: () => ({})
|
|
13853
13480
|
},
|
|
13481
|
+
must: {
|
|
13482
|
+
type: Boolean,
|
|
13483
|
+
default: () => false
|
|
13484
|
+
},
|
|
13854
13485
|
inline: {
|
|
13855
13486
|
type: Boolean,
|
|
13856
13487
|
default: () => false
|
|
@@ -13861,7 +13492,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13861
13492
|
},
|
|
13862
13493
|
gutter: {
|
|
13863
13494
|
type: String,
|
|
13864
|
-
default: () => '
|
|
13495
|
+
default: () => '16'
|
|
13865
13496
|
},
|
|
13866
13497
|
config: {
|
|
13867
13498
|
type: Object,
|
|
@@ -13870,6 +13501,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13870
13501
|
global: {
|
|
13871
13502
|
type: Boolean,
|
|
13872
13503
|
default: () => true
|
|
13504
|
+
},
|
|
13505
|
+
disabled: {
|
|
13506
|
+
type: Boolean,
|
|
13507
|
+
default: () => false
|
|
13873
13508
|
}
|
|
13874
13509
|
},
|
|
13875
13510
|
data() {
|
|
@@ -13918,22 +13553,27 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13918
13553
|
} = this.config[a];
|
|
13919
13554
|
let label = r.text || r.label || r.title || '';
|
|
13920
13555
|
let width = r.width ? r.width : `${100 / this.cols}%`;
|
|
13921
|
-
let
|
|
13922
|
-
|
|
13923
|
-
|
|
13556
|
+
let judge = [{
|
|
13557
|
+
required: true,
|
|
13558
|
+
message: `${label}不能为空`
|
|
13559
|
+
}];
|
|
13560
|
+
let valid = r.rule ? r.rule : r.must || this.must ? judge : [];
|
|
13561
|
+
let rules = this.disabled || r.disabled ? [] : (r.must || this.must) && r.rule ? [...judge, ...r.rule] : valid;
|
|
13924
13562
|
let props = {
|
|
13925
13563
|
name: a,
|
|
13926
13564
|
prop: a,
|
|
13927
13565
|
label,
|
|
13566
|
+
rules,
|
|
13567
|
+
disabled: r.disabled || this.disabled,
|
|
13928
13568
|
...r
|
|
13929
13569
|
};
|
|
13930
13570
|
if (this.inline) {
|
|
13931
|
-
let
|
|
13571
|
+
let style = {
|
|
13932
13572
|
padding: `0 ${this.gutter / 2}px`,
|
|
13933
|
-
|
|
13573
|
+
width
|
|
13934
13574
|
};
|
|
13935
13575
|
return h("el-form-item", {
|
|
13936
|
-
"style":
|
|
13576
|
+
"style": style,
|
|
13937
13577
|
"props": {
|
|
13938
13578
|
...props
|
|
13939
13579
|
}
|
|
@@ -13953,7 +13593,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13953
13593
|
} else {
|
|
13954
13594
|
return h("el-col", {
|
|
13955
13595
|
"key": b,
|
|
13956
|
-
"style":
|
|
13596
|
+
"style": {
|
|
13597
|
+
width
|
|
13598
|
+
}
|
|
13957
13599
|
}, [h("el-form-item", {
|
|
13958
13600
|
"props": {
|
|
13959
13601
|
...props
|
|
@@ -13967,25 +13609,31 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13967
13609
|
this.option[b] = a;
|
|
13968
13610
|
let child = a.children || a.child || a.node || null;
|
|
13969
13611
|
if (child && Object.keys(child).length > 0) {
|
|
13970
|
-
let width = a.width ? a.width : `${100 / Object.keys(child).length}%`;
|
|
13971
|
-
let style = this.cols != '' ? {
|
|
13972
|
-
width
|
|
13973
|
-
} : {};
|
|
13974
13612
|
return Object.keys(child).map((c, d) => {
|
|
13975
13613
|
let {
|
|
13976
13614
|
...r
|
|
13977
13615
|
} = child[c];
|
|
13616
|
+
let space = a.gutter ? a.gutter / 2 : this.gutter / 4;
|
|
13617
|
+
let style = {
|
|
13618
|
+
padding: `0 ${space}px`
|
|
13619
|
+
};
|
|
13620
|
+
r.type = r.type ? r.type : a.type;
|
|
13978
13621
|
if (r.span) {
|
|
13979
13622
|
return h("el-col", {
|
|
13980
13623
|
"key": d,
|
|
13624
|
+
"style": style,
|
|
13981
13625
|
"attrs": {
|
|
13982
13626
|
"span": Number(r.span)
|
|
13983
13627
|
}
|
|
13984
13628
|
}, [this.format(r, c)]);
|
|
13985
13629
|
} else {
|
|
13630
|
+
let width = r.width ? r.width : `${100 / Object.keys(child).length}%`;
|
|
13986
13631
|
return h("el-col", {
|
|
13987
13632
|
"key": d,
|
|
13988
|
-
"style":
|
|
13633
|
+
"style": {
|
|
13634
|
+
width,
|
|
13635
|
+
...style
|
|
13636
|
+
}
|
|
13989
13637
|
}, [this.format(r, c)]);
|
|
13990
13638
|
}
|
|
13991
13639
|
});
|
|
@@ -13994,6 +13642,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13994
13642
|
change: () => this.change(),
|
|
13995
13643
|
form: this.form,
|
|
13996
13644
|
field: b,
|
|
13645
|
+
clearable: !a.default,
|
|
13997
13646
|
...a
|
|
13998
13647
|
};
|
|
13999
13648
|
return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
@@ -14030,7 +13679,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14030
13679
|
}
|
|
14031
13680
|
}
|
|
14032
13681
|
});
|
|
14033
|
-
|
|
13682
|
+
let value = {};
|
|
13683
|
+
Object.keys(data).forEach(a => {
|
|
13684
|
+
if (data[a] && data[a] != '%' && data[a] != '%%') value[a] = data[a];
|
|
13685
|
+
});
|
|
13686
|
+
return value;
|
|
14034
13687
|
},
|
|
14035
13688
|
submit() {
|
|
14036
13689
|
if (this.global) {
|
|
@@ -14043,7 +13696,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14043
13696
|
page: 1
|
|
14044
13697
|
});
|
|
14045
13698
|
}
|
|
14046
|
-
this.$
|
|
13699
|
+
this.$refs.form.validate(valid => valid && this.$emit('submit', this.filter(), this.form, this.option));
|
|
14047
13700
|
},
|
|
14048
13701
|
cancel() {
|
|
14049
13702
|
this.$refs.form && this.$refs.form.resetFields && this.$refs.form.resetFields();
|
|
@@ -14071,9 +13724,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14071
13724
|
render() {
|
|
14072
13725
|
const h = arguments[0];
|
|
14073
13726
|
let {
|
|
14074
|
-
padding = '0',
|
|
14075
13727
|
margin = '0',
|
|
14076
|
-
|
|
13728
|
+
padding = '0',
|
|
14077
13729
|
size = 'small',
|
|
14078
13730
|
loading = false,
|
|
14079
13731
|
labelWidth = 'auto',
|
|
@@ -14081,7 +13733,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14081
13733
|
submitText = '搜索',
|
|
14082
13734
|
cancelText = '重置',
|
|
14083
13735
|
action = [],
|
|
14084
|
-
...
|
|
13736
|
+
...rest
|
|
14085
13737
|
} = this.$attrs;
|
|
14086
13738
|
let {
|
|
14087
13739
|
submit = null,
|
|
@@ -14090,6 +13742,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14090
13742
|
let style = this.inline ? {
|
|
14091
13743
|
margin: `0 -${this.gutter / 2}px`
|
|
14092
13744
|
} : {};
|
|
13745
|
+
let props = {
|
|
13746
|
+
size,
|
|
13747
|
+
inline: this.inline,
|
|
13748
|
+
labelWidth,
|
|
13749
|
+
labelPosition,
|
|
13750
|
+
style,
|
|
13751
|
+
...rest
|
|
13752
|
+
};
|
|
14093
13753
|
return h("div", {
|
|
14094
13754
|
"class": "a-f-search",
|
|
14095
13755
|
"style": {
|
|
@@ -14097,14 +13757,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14097
13757
|
padding
|
|
14098
13758
|
}
|
|
14099
13759
|
}, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
14100
|
-
"ref":
|
|
14101
|
-
"attrs": {
|
|
14102
|
-
"size": size,
|
|
14103
|
-
"inline": this.inline,
|
|
14104
|
-
"label-width": labelWidth,
|
|
14105
|
-
"label-position": labelPosition
|
|
14106
|
-
},
|
|
14107
|
-
"style": style
|
|
13760
|
+
"ref": "form"
|
|
14108
13761
|
}, {
|
|
14109
13762
|
"props": {
|
|
14110
13763
|
model: this.form,
|
|
@@ -14125,15 +13778,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14125
13778
|
"style": {
|
|
14126
13779
|
height: this.opened ? `${this.height}px` : '0'
|
|
14127
13780
|
}
|
|
14128
|
-
}, [Object.keys(this.config).map((a, b) => b > this.cols - 1 && this.create(a, b))])]), (submit || cancel || action.length > 0) && h("
|
|
14129
|
-
"attrs": {
|
|
14130
|
-
"name": "action",
|
|
14131
|
-
"label": "action"
|
|
14132
|
-
},
|
|
13781
|
+
}, [Object.keys(this.config).map((a, b) => b > this.cols - 1 && this.create(a, b))])]), (submit || cancel || action.length > 0) && h("div", {
|
|
14133
13782
|
"class": "action",
|
|
14134
13783
|
"style": {
|
|
14135
13784
|
paddingLeft: `${this.gutter}px`
|
|
14136
13785
|
}
|
|
13786
|
+
}, [h("el-form-item", {
|
|
13787
|
+
"attrs": {
|
|
13788
|
+
"name": "action",
|
|
13789
|
+
"label": "action"
|
|
13790
|
+
}
|
|
14137
13791
|
}, [Object.keys(this.config).length > this.cols && !this.inline && h("el-button", {
|
|
14138
13792
|
"attrs": {
|
|
14139
13793
|
"disabled": loading,
|
|
@@ -14161,12 +13815,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14161
13815
|
"on": {
|
|
14162
13816
|
"click": this.cancel
|
|
14163
13817
|
}
|
|
14164
|
-
}, [cancelText]), action.
|
|
13818
|
+
}, [cancelText]), action.map((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
14165
13819
|
"key": b,
|
|
14166
13820
|
"attrs": {
|
|
14167
13821
|
"disabled": loading
|
|
13822
|
+
},
|
|
13823
|
+
"on": {
|
|
13824
|
+
"click": e => a.click(this.filter(), this.form, this.option, e)
|
|
14168
13825
|
}
|
|
14169
|
-
}, a]), [a.label || a.title || a.text || '']))])])]);
|
|
13826
|
+
}, a]), [a.label || a.title || a.text || '']))])])])]);
|
|
14170
13827
|
}
|
|
14171
13828
|
});
|
|
14172
13829
|
|
|
@@ -16620,7 +16277,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
16620
16277
|
...props
|
|
16621
16278
|
} = this.$attrs;
|
|
16622
16279
|
return h("div", {
|
|
16623
|
-
"class": "a-
|
|
16280
|
+
"class": "a-pages"
|
|
16624
16281
|
}, [h("el-pagination", {
|
|
16625
16282
|
"attrs": {
|
|
16626
16283
|
"small": this.small,
|
|
@@ -19143,7 +18800,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19143
18800
|
|
|
19144
18801
|
|
|
19145
18802
|
|
|
19146
|
-
|
|
19147
18803
|
|
|
19148
18804
|
|
|
19149
18805
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
@@ -19160,19 +18816,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19160
18816
|
},
|
|
19161
18817
|
data() {
|
|
19162
18818
|
return {
|
|
19163
|
-
|
|
18819
|
+
random: Math.random()
|
|
19164
18820
|
};
|
|
19165
18821
|
},
|
|
19166
18822
|
watch: {
|
|
19167
18823
|
config: {
|
|
19168
18824
|
immediate: true,
|
|
19169
18825
|
handler() {
|
|
19170
|
-
this.
|
|
18826
|
+
this.update();
|
|
19171
18827
|
}
|
|
19172
18828
|
}
|
|
19173
18829
|
},
|
|
19174
18830
|
created() {
|
|
19175
|
-
this.
|
|
18831
|
+
this.update();
|
|
19176
18832
|
},
|
|
19177
18833
|
destroyed() {
|
|
19178
18834
|
this.input = null;
|
|
@@ -19190,6 +18846,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19190
18846
|
} = this.config;
|
|
19191
18847
|
this.config.change && this.config.change(a, data.length > 0 ? this.filter(data, a) : null);
|
|
19192
18848
|
},
|
|
18849
|
+
update() {
|
|
18850
|
+
this.random = Math.random();
|
|
18851
|
+
},
|
|
19193
18852
|
filter(array = [], value = '') {
|
|
19194
18853
|
let data = {};
|
|
19195
18854
|
if (value != '') array.length > 0 && array.forEach(a => {
|
|
@@ -19204,35 +18863,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19204
18863
|
...r
|
|
19205
18864
|
}) {
|
|
19206
18865
|
const h = this.$createElement;
|
|
19207
|
-
const label = r.text || r.label || r.title || '';
|
|
19208
18866
|
const style = {
|
|
19209
|
-
width:
|
|
18867
|
+
width: '100%',
|
|
19210
18868
|
...r.style
|
|
19211
18869
|
};
|
|
18870
|
+
const label = r.text || r.label || r.title || '';
|
|
19212
18871
|
const values = (a = {}) => typeof a == 'string' ? a : `${a.value || a.code || a.id}`;
|
|
19213
18872
|
const labels = (a = {}) => typeof a == 'string' ? a : a.label || a.title || a.text || a.name;
|
|
19214
18873
|
if (r.render) return r.render(form, this.config);
|
|
19215
|
-
if (!r.type) return h("el-input", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
19216
|
-
"on": {
|
|
19217
|
-
"input": this.input,
|
|
19218
|
-
"change": this.change
|
|
19219
|
-
},
|
|
19220
|
-
"attrs": {
|
|
19221
|
-
"placeholder": `请输入${label}`
|
|
19222
|
-
},
|
|
19223
|
-
"style": {
|
|
19224
|
-
...r.style
|
|
19225
|
-
}
|
|
19226
|
-
}, {
|
|
19227
|
-
"props": r
|
|
19228
|
-
}, {
|
|
19229
|
-
"model": {
|
|
19230
|
-
value: form[field],
|
|
19231
|
-
callback: $$v => {
|
|
19232
|
-
this.$set(form, field, $$v);
|
|
19233
|
-
}
|
|
19234
|
-
}
|
|
19235
|
-
}]));
|
|
19236
18874
|
switch (r.type) {
|
|
19237
18875
|
case 'input':
|
|
19238
18876
|
return h("el-input", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
@@ -19255,7 +18893,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19255
18893
|
}
|
|
19256
18894
|
}
|
|
19257
18895
|
}]));
|
|
19258
|
-
case '
|
|
18896
|
+
case 'password':
|
|
19259
18897
|
return h("el-input", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
19260
18898
|
"on": {
|
|
19261
18899
|
"input": this.input,
|
|
@@ -19263,7 +18901,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19263
18901
|
},
|
|
19264
18902
|
"attrs": {
|
|
19265
18903
|
"clearable": true,
|
|
19266
|
-
"placeholder": r.placeholder || `请输入${label}
|
|
18904
|
+
"placeholder": r.placeholder || `请输入${label}`,
|
|
18905
|
+
"show-password": true
|
|
19267
18906
|
},
|
|
19268
18907
|
"style": style
|
|
19269
18908
|
}, {
|
|
@@ -19276,16 +18915,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19276
18915
|
}
|
|
19277
18916
|
}
|
|
19278
18917
|
}]));
|
|
19279
|
-
case '
|
|
19280
|
-
return h("el-input", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
18918
|
+
case 'number':
|
|
18919
|
+
return h("el-input-number", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
19281
18920
|
"on": {
|
|
19282
18921
|
"input": this.input,
|
|
19283
18922
|
"change": this.change
|
|
19284
18923
|
},
|
|
19285
18924
|
"attrs": {
|
|
19286
18925
|
"clearable": true,
|
|
19287
|
-
"
|
|
19288
|
-
"
|
|
18926
|
+
"min": 0,
|
|
18927
|
+
"max": 100000000,
|
|
18928
|
+
"controls": false,
|
|
18929
|
+
"controls-position": "right",
|
|
18930
|
+
"placeholder": r.placeholder || `请输入${label}`
|
|
19289
18931
|
},
|
|
19290
18932
|
"style": style
|
|
19291
18933
|
}, {
|
|
@@ -19579,7 +19221,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19579
19221
|
}]));
|
|
19580
19222
|
case 'image':
|
|
19581
19223
|
return h(_components_Aupload_Icon__WEBPACK_IMPORTED_MODULE_2__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
19582
|
-
"key": this.
|
|
19224
|
+
"key": this.random,
|
|
19583
19225
|
"on": {
|
|
19584
19226
|
"input": this.input,
|
|
19585
19227
|
"change": this.change
|
|
@@ -19601,7 +19243,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19601
19243
|
}]));
|
|
19602
19244
|
case 'upload':
|
|
19603
19245
|
return h(_components_Aupload_Icon__WEBPACK_IMPORTED_MODULE_2__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
19604
|
-
"key": this.
|
|
19246
|
+
"key": this.random,
|
|
19605
19247
|
"on": {
|
|
19606
19248
|
"input": this.input,
|
|
19607
19249
|
"change": this.change
|
|
@@ -19623,7 +19265,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19623
19265
|
}]));
|
|
19624
19266
|
case 'icon':
|
|
19625
19267
|
return h(_components_AiconSelect__WEBPACK_IMPORTED_MODULE_1__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
19626
|
-
"key": this.
|
|
19268
|
+
"key": this.random,
|
|
19627
19269
|
"on": {
|
|
19628
19270
|
"input": this.input,
|
|
19629
19271
|
"change": this.change
|
|
@@ -19644,7 +19286,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
19644
19286
|
}]));
|
|
19645
19287
|
case 'iconSelect':
|
|
19646
19288
|
return h(_components_AiconSelect__WEBPACK_IMPORTED_MODULE_1__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
19647
|
-
"key": this.
|
|
19289
|
+
"key": this.random,
|
|
19648
19290
|
"on": {
|
|
19649
19291
|
"input": this.input,
|
|
19650
19292
|
"change": this.change
|
|
@@ -20137,384 +19779,6 @@ module.exports = _default;
|
|
|
20137
19779
|
|
|
20138
19780
|
/***/ }),
|
|
20139
19781
|
|
|
20140
|
-
/***/ "230c":
|
|
20141
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
20142
|
-
|
|
20143
|
-
"use strict";
|
|
20144
|
-
__webpack_require__.r(__webpack_exports__);
|
|
20145
|
-
/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
|
|
20146
|
-
/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__);
|
|
20147
|
-
/* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2234");
|
|
20148
|
-
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("6e39");
|
|
20149
|
-
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_2__);
|
|
20150
|
-
|
|
20151
|
-
|
|
20152
|
-
|
|
20153
|
-
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
20154
|
-
name: 'AfSearch',
|
|
20155
|
-
components: {
|
|
20156
|
-
AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"]
|
|
20157
|
-
},
|
|
20158
|
-
props: {
|
|
20159
|
-
value: {
|
|
20160
|
-
type: Object,
|
|
20161
|
-
default: () => ({})
|
|
20162
|
-
},
|
|
20163
|
-
margin: {
|
|
20164
|
-
type: String,
|
|
20165
|
-
default: () => '0'
|
|
20166
|
-
},
|
|
20167
|
-
size: {
|
|
20168
|
-
type: String,
|
|
20169
|
-
default: () => 'small'
|
|
20170
|
-
},
|
|
20171
|
-
inline: {
|
|
20172
|
-
type: Boolean,
|
|
20173
|
-
default: () => false
|
|
20174
|
-
},
|
|
20175
|
-
cols: {
|
|
20176
|
-
type: String,
|
|
20177
|
-
default: () => '6'
|
|
20178
|
-
},
|
|
20179
|
-
gutter: {
|
|
20180
|
-
type: String,
|
|
20181
|
-
default: () => '10'
|
|
20182
|
-
},
|
|
20183
|
-
labelWidth: {
|
|
20184
|
-
type: String,
|
|
20185
|
-
default: () => 'auto'
|
|
20186
|
-
},
|
|
20187
|
-
labelPosition: {
|
|
20188
|
-
type: String,
|
|
20189
|
-
default: () => 'top'
|
|
20190
|
-
},
|
|
20191
|
-
config: {
|
|
20192
|
-
type: Object,
|
|
20193
|
-
default: () => ({})
|
|
20194
|
-
},
|
|
20195
|
-
values: {
|
|
20196
|
-
type: Object,
|
|
20197
|
-
default: () => ({})
|
|
20198
|
-
},
|
|
20199
|
-
label: {
|
|
20200
|
-
type: Boolean,
|
|
20201
|
-
default: () => true
|
|
20202
|
-
},
|
|
20203
|
-
check: {
|
|
20204
|
-
type: Boolean,
|
|
20205
|
-
default: () => false
|
|
20206
|
-
},
|
|
20207
|
-
loading: {
|
|
20208
|
-
type: Boolean,
|
|
20209
|
-
default: () => false
|
|
20210
|
-
},
|
|
20211
|
-
submitText: {
|
|
20212
|
-
type: String,
|
|
20213
|
-
default: () => '搜索'
|
|
20214
|
-
},
|
|
20215
|
-
cancelText: {
|
|
20216
|
-
type: String,
|
|
20217
|
-
default: () => '重置'
|
|
20218
|
-
}
|
|
20219
|
-
},
|
|
20220
|
-
data() {
|
|
20221
|
-
return {
|
|
20222
|
-
form: this.value,
|
|
20223
|
-
height: 0,
|
|
20224
|
-
opened: false
|
|
20225
|
-
};
|
|
20226
|
-
},
|
|
20227
|
-
created() {
|
|
20228
|
-
this.create();
|
|
20229
|
-
},
|
|
20230
|
-
mounted() {
|
|
20231
|
-
this.update();
|
|
20232
|
-
},
|
|
20233
|
-
destroyed() {
|
|
20234
|
-
this.create = null;
|
|
20235
|
-
this.update = null;
|
|
20236
|
-
this.submit = null;
|
|
20237
|
-
this.cancel = null;
|
|
20238
|
-
this.filter = null;
|
|
20239
|
-
this.result = null;
|
|
20240
|
-
this.switch = null;
|
|
20241
|
-
this.format = null;
|
|
20242
|
-
this.output = null;
|
|
20243
|
-
},
|
|
20244
|
-
watch: {
|
|
20245
|
-
values() {
|
|
20246
|
-
this.create();
|
|
20247
|
-
}
|
|
20248
|
-
},
|
|
20249
|
-
methods: {
|
|
20250
|
-
create() {
|
|
20251
|
-
// 创建表单
|
|
20252
|
-
if (this.config && Object.keys(this.config).length > 0) {
|
|
20253
|
-
// 格式化表单配置对象(this.config)为数据双向绑定对象
|
|
20254
|
-
let data = {};
|
|
20255
|
-
Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
|
|
20256
|
-
let {
|
|
20257
|
-
...r
|
|
20258
|
-
} = this.config[a];
|
|
20259
|
-
if (!r.render) {
|
|
20260
|
-
let range = r.range || r.scope || r.both || r.than || null;
|
|
20261
|
-
if (range) {
|
|
20262
|
-
data[`${a}LE`] = '';
|
|
20263
|
-
data[`${a}GE`] = '';
|
|
20264
|
-
} else {
|
|
20265
|
-
data[a] = r.default ? r.default : '';
|
|
20266
|
-
}
|
|
20267
|
-
}
|
|
20268
|
-
});
|
|
20269
|
-
this.form = data;
|
|
20270
|
-
}
|
|
20271
|
-
},
|
|
20272
|
-
update() {
|
|
20273
|
-
let rows = Math.ceil(Object.keys(this.config).length / this.cols);
|
|
20274
|
-
this.height = this.$el.clientHeight * (rows - 1);
|
|
20275
|
-
},
|
|
20276
|
-
submit(e) {
|
|
20277
|
-
// 提交表单
|
|
20278
|
-
e && e.preventDefault();
|
|
20279
|
-
let pass = !this.check; // 判断是否是空表单
|
|
20280
|
-
for (let a in this.form) if (this.form[a] != '') pass = true;
|
|
20281
|
-
if (pass) {
|
|
20282
|
-
let result = this.filter();
|
|
20283
|
-
const {
|
|
20284
|
-
formParams,
|
|
20285
|
-
pageParams
|
|
20286
|
-
} = this.$store.state;
|
|
20287
|
-
this.$store.commit('setFormParams', result); // 添加查询参数
|
|
20288
|
-
this.$store.commit('setPageParams', {
|
|
20289
|
-
...pageParams,
|
|
20290
|
-
page: 1
|
|
20291
|
-
}); // 重置分页参数
|
|
20292
|
-
this.$nextTick(() => {
|
|
20293
|
-
let change = false;
|
|
20294
|
-
Object.keys(result).forEach(a => result[a] != formParams[a] && (change = true));
|
|
20295
|
-
if (change) this.$emit('submit', {
|
|
20296
|
-
...result,
|
|
20297
|
-
...pageParams,
|
|
20298
|
-
page: 1
|
|
20299
|
-
}); // 派发事件并重置当前分页
|
|
20300
|
-
return result;
|
|
20301
|
-
});
|
|
20302
|
-
}
|
|
20303
|
-
},
|
|
20304
|
-
cancel(e) {
|
|
20305
|
-
// 重置表单
|
|
20306
|
-
e && e.preventDefault();
|
|
20307
|
-
let pass = !this.check; // 判断是否是空表单
|
|
20308
|
-
for (let a in this.form) if (this.form[a] != '') pass = true;
|
|
20309
|
-
if (pass) {
|
|
20310
|
-
const {
|
|
20311
|
-
pageParams
|
|
20312
|
-
} = this.$store.state;
|
|
20313
|
-
this.$store.commit('setPageParams', {
|
|
20314
|
-
...pageParams,
|
|
20315
|
-
page: 1
|
|
20316
|
-
}); // 重置分页参数
|
|
20317
|
-
this.$store.commit('setFormParams', {}); // 重置查询参数
|
|
20318
|
-
this.$nextTick(() => {
|
|
20319
|
-
for (let a in this.form) this.form[a] = '';
|
|
20320
|
-
this.$nextTick(() => {
|
|
20321
|
-
this.$refs.form && this.$refs.form.resetFields();
|
|
20322
|
-
this.$nextTick(() => this.$emit('cancel', this.form));
|
|
20323
|
-
});
|
|
20324
|
-
});
|
|
20325
|
-
}
|
|
20326
|
-
},
|
|
20327
|
-
filter() {
|
|
20328
|
-
let data = {};
|
|
20329
|
-
Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
|
|
20330
|
-
let {
|
|
20331
|
-
like = null,
|
|
20332
|
-
...r
|
|
20333
|
-
} = this.config[a];
|
|
20334
|
-
let range = r.range || r.scope || r.both || r.than || null;
|
|
20335
|
-
if (range) {
|
|
20336
|
-
this.form[`${a}LE`] != '' && (data[`${a}LE`] = this.form[`${a}LE`]);
|
|
20337
|
-
this.form[`${a}GE`] != '' && (data[`${a}GE`] = this.form[`${a}GE`]);
|
|
20338
|
-
} else {
|
|
20339
|
-
let value = this.form[a];
|
|
20340
|
-
if (value) {
|
|
20341
|
-
if (r.split && typeof r.split == 'object' && r.split.length > 0) {
|
|
20342
|
-
r.split.forEach((c, d) => data[c] = value != '' && typeof value == 'object' && value.length > 0 ? value[d] : value);
|
|
20343
|
-
} else {
|
|
20344
|
-
if (like) {
|
|
20345
|
-
if (like == 'left' || like && like == 'l') data[a] = '%' + value;
|
|
20346
|
-
if (like == 'right' || like && like == 'r') data[a] = value + '%';else data[a] = '%' + value + '%';
|
|
20347
|
-
} else {
|
|
20348
|
-
if (value.includes(' 00:00:00')) {
|
|
20349
|
-
data[a] = '%' + value.split(' 00:00:00')[0] + '%';
|
|
20350
|
-
} else {
|
|
20351
|
-
data[a] = value;
|
|
20352
|
-
}
|
|
20353
|
-
}
|
|
20354
|
-
}
|
|
20355
|
-
}
|
|
20356
|
-
}
|
|
20357
|
-
});
|
|
20358
|
-
let form = {};
|
|
20359
|
-
Object.keys(data).length > 0 && Object.keys(data).forEach(a => {
|
|
20360
|
-
if (data[a] != '%' && data[a] != '%%' && data[a] != 'null' && data[a] != 'undefined' && data[a] != null && data[a] != undefined) {
|
|
20361
|
-
form[a] = data[a];
|
|
20362
|
-
}
|
|
20363
|
-
});
|
|
20364
|
-
return form;
|
|
20365
|
-
},
|
|
20366
|
-
result() {
|
|
20367
|
-
return this.filter(this.form);
|
|
20368
|
-
},
|
|
20369
|
-
switch() {
|
|
20370
|
-
this.opened = !this.opened;
|
|
20371
|
-
},
|
|
20372
|
-
format(a = '', field = '', placeholder = '') {
|
|
20373
|
-
const h = this.$createElement;
|
|
20374
|
-
let {
|
|
20375
|
-
...r
|
|
20376
|
-
} = this.config[a];
|
|
20377
|
-
let config = {
|
|
20378
|
-
size: r.size ? r.size : this.size,
|
|
20379
|
-
field: field != '' ? field : a,
|
|
20380
|
-
change: () => this.change(),
|
|
20381
|
-
disabled: this.loading,
|
|
20382
|
-
form: this.form,
|
|
20383
|
-
...r
|
|
20384
|
-
};
|
|
20385
|
-
return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
20386
|
-
"attrs": {
|
|
20387
|
-
"config": placeholder != '' ? {
|
|
20388
|
-
...config,
|
|
20389
|
-
placeholder
|
|
20390
|
-
} : config
|
|
20391
|
-
}
|
|
20392
|
-
});
|
|
20393
|
-
},
|
|
20394
|
-
output(a, b) {
|
|
20395
|
-
const h = this.$createElement;
|
|
20396
|
-
let {
|
|
20397
|
-
...r
|
|
20398
|
-
} = this.config[a];
|
|
20399
|
-
let range = r.range || r.scope || r.both || r.than || null;
|
|
20400
|
-
let label = this.label ? r.text || r.label || r.title : '';
|
|
20401
|
-
let style = this.cols != '' ? {
|
|
20402
|
-
width: r.width ? r.width : `${100 / this.cols}%`
|
|
20403
|
-
} : {};
|
|
20404
|
-
let prefixPlaceholder = r.placeholder && r.placeholder.length > 0 ? r.placeholder[0] : '最高';
|
|
20405
|
-
let suffixPlaceholder = r.placeholder && r.placeholder.length > 1 ? r.placeholder[1] : '最低';
|
|
20406
|
-
return h("el-col", {
|
|
20407
|
-
"key": b,
|
|
20408
|
-
"style": style
|
|
20409
|
-
}, [h("el-form-item", {
|
|
20410
|
-
"attrs": {
|
|
20411
|
-
"prop": a,
|
|
20412
|
-
"label": label
|
|
20413
|
-
}
|
|
20414
|
-
}, [range ? h("el-col", {
|
|
20415
|
-
"class": "range-cols"
|
|
20416
|
-
}, [h("el-col", {
|
|
20417
|
-
"attrs": {
|
|
20418
|
-
"span": 12
|
|
20419
|
-
}
|
|
20420
|
-
}, [this.format(a, `${a}LE`, prefixPlaceholder)]), h("el-col", {
|
|
20421
|
-
"attrs": {
|
|
20422
|
-
"span": 12
|
|
20423
|
-
}
|
|
20424
|
-
}, [this.format(a, `${a}GE`, suffixPlaceholder)])]) : this.format(a)])]);
|
|
20425
|
-
},
|
|
20426
|
-
change() {
|
|
20427
|
-
this.$emit('input', this.filter());
|
|
20428
|
-
this.$emit('change', this.filter());
|
|
20429
|
-
}
|
|
20430
|
-
},
|
|
20431
|
-
render() {
|
|
20432
|
-
const h = arguments[0];
|
|
20433
|
-
const {
|
|
20434
|
-
...props
|
|
20435
|
-
} = this.$attrs;
|
|
20436
|
-
const {
|
|
20437
|
-
submit = null,
|
|
20438
|
-
cancel = null
|
|
20439
|
-
} = this.$listeners;
|
|
20440
|
-
return h("div", {
|
|
20441
|
-
"class": "a-f-search",
|
|
20442
|
-
"style": {
|
|
20443
|
-
padding: this.margin
|
|
20444
|
-
}
|
|
20445
|
-
}, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
20446
|
-
"ref": "form",
|
|
20447
|
-
"attrs": {
|
|
20448
|
-
"size": this.size,
|
|
20449
|
-
"inline": this.inline
|
|
20450
|
-
}
|
|
20451
|
-
}, {
|
|
20452
|
-
"props": {
|
|
20453
|
-
model: this.form,
|
|
20454
|
-
...props
|
|
20455
|
-
}
|
|
20456
|
-
}, {
|
|
20457
|
-
"attrs": {
|
|
20458
|
-
"labelWidth": this.labelWidth,
|
|
20459
|
-
"labelPosition": this.labelPosition
|
|
20460
|
-
}
|
|
20461
|
-
}]), [h("div", {
|
|
20462
|
-
"class": "column"
|
|
20463
|
-
}, [h("el-row", {
|
|
20464
|
-
"attrs": {
|
|
20465
|
-
"gutter": Number(this.gutter)
|
|
20466
|
-
},
|
|
20467
|
-
"class": "main-rows"
|
|
20468
|
-
}, [Object.keys(this.config).map((a, b) => b < this.cols && this.output(a, b))]), h("el-row", {
|
|
20469
|
-
"attrs": {
|
|
20470
|
-
"gutter": Number(this.gutter)
|
|
20471
|
-
},
|
|
20472
|
-
"class": "fold-rows",
|
|
20473
|
-
"style": {
|
|
20474
|
-
height: this.opened ? `${this.height}px` : '0'
|
|
20475
|
-
}
|
|
20476
|
-
}, [Object.keys(this.config).map((a, b) => b > this.cols - 1 && this.output(a, b))])]), (Object.keys(this.config).length > this.cols || submit || cancel) && h("div", {
|
|
20477
|
-
"class": "action",
|
|
20478
|
-
"style": {
|
|
20479
|
-
paddingLeft: `${this.gutter}px`
|
|
20480
|
-
}
|
|
20481
|
-
}, [h("el-form-item", {
|
|
20482
|
-
"attrs": {
|
|
20483
|
-
"label": "action"
|
|
20484
|
-
}
|
|
20485
|
-
}, [Object.keys(this.config).length > this.cols && h("el-button", {
|
|
20486
|
-
"attrs": {
|
|
20487
|
-
"disabled": this.loading,
|
|
20488
|
-
"type": "text"
|
|
20489
|
-
},
|
|
20490
|
-
"class": "collapse-button",
|
|
20491
|
-
"on": {
|
|
20492
|
-
"click": this.switch
|
|
20493
|
-
}
|
|
20494
|
-
}, [h("i", {
|
|
20495
|
-
"class": `el-icon-arrow-${this.opened ? 'up' : 'down'}`
|
|
20496
|
-
}), this.opened ? '收起' : '展开']), submit && h("el-button", {
|
|
20497
|
-
"attrs": {
|
|
20498
|
-
"disabled": this.loading,
|
|
20499
|
-
"type": "primary"
|
|
20500
|
-
},
|
|
20501
|
-
"on": {
|
|
20502
|
-
"click": this.submit
|
|
20503
|
-
}
|
|
20504
|
-
}, [this.submitText]), cancel && h("el-button", {
|
|
20505
|
-
"attrs": {
|
|
20506
|
-
"disabled": this.loading,
|
|
20507
|
-
"type": "default"
|
|
20508
|
-
},
|
|
20509
|
-
"on": {
|
|
20510
|
-
"click": this.cancel
|
|
20511
|
-
}
|
|
20512
|
-
}, [this.cancelText])])])])]);
|
|
20513
|
-
}
|
|
20514
|
-
});
|
|
20515
|
-
|
|
20516
|
-
/***/ }),
|
|
20517
|
-
|
|
20518
19782
|
/***/ "23df":
|
|
20519
19783
|
/***/ (function(module, exports, __webpack_require__) {
|
|
20520
19784
|
|
|
@@ -21900,6 +21164,13 @@ module.exports = _default;
|
|
|
21900
21164
|
|
|
21901
21165
|
/***/ }),
|
|
21902
21166
|
|
|
21167
|
+
/***/ "2769":
|
|
21168
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
21169
|
+
|
|
21170
|
+
// extracted by mini-css-extract-plugin
|
|
21171
|
+
|
|
21172
|
+
/***/ }),
|
|
21173
|
+
|
|
21903
21174
|
/***/ "2772":
|
|
21904
21175
|
/***/ (function(module, exports) {
|
|
21905
21176
|
|
|
@@ -28023,417 +27294,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28023
27294
|
|
|
28024
27295
|
/***/ }),
|
|
28025
27296
|
|
|
28026
|
-
/***/ "3cef":
|
|
28027
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
28028
|
-
|
|
28029
|
-
"use strict";
|
|
28030
|
-
__webpack_require__.r(__webpack_exports__);
|
|
28031
|
-
/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
|
|
28032
|
-
/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__);
|
|
28033
|
-
/* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2234");
|
|
28034
|
-
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("9203");
|
|
28035
|
-
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_2__);
|
|
28036
|
-
|
|
28037
|
-
|
|
28038
|
-
|
|
28039
|
-
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
28040
|
-
name: 'AfEditor',
|
|
28041
|
-
components: {
|
|
28042
|
-
AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"]
|
|
28043
|
-
},
|
|
28044
|
-
props: {
|
|
28045
|
-
value: {
|
|
28046
|
-
type: Object,
|
|
28047
|
-
default: () => ({})
|
|
28048
|
-
},
|
|
28049
|
-
disabled: {
|
|
28050
|
-
type: Boolean,
|
|
28051
|
-
default: () => false
|
|
28052
|
-
},
|
|
28053
|
-
margin: {
|
|
28054
|
-
type: String,
|
|
28055
|
-
default: () => '0'
|
|
28056
|
-
},
|
|
28057
|
-
pure: {
|
|
28058
|
-
type: Boolean,
|
|
28059
|
-
default: () => true
|
|
28060
|
-
},
|
|
28061
|
-
must: {
|
|
28062
|
-
type: Boolean,
|
|
28063
|
-
default: () => false
|
|
28064
|
-
},
|
|
28065
|
-
inline: {
|
|
28066
|
-
type: Boolean,
|
|
28067
|
-
default: () => false
|
|
28068
|
-
},
|
|
28069
|
-
size: {
|
|
28070
|
-
type: String,
|
|
28071
|
-
default: () => 'small'
|
|
28072
|
-
},
|
|
28073
|
-
rules: {
|
|
28074
|
-
type: Object,
|
|
28075
|
-
default: () => ({})
|
|
28076
|
-
},
|
|
28077
|
-
labelWidth: {
|
|
28078
|
-
type: String,
|
|
28079
|
-
default: () => '100%'
|
|
28080
|
-
},
|
|
28081
|
-
labelPosition: {
|
|
28082
|
-
type: String,
|
|
28083
|
-
default: () => 'top'
|
|
28084
|
-
},
|
|
28085
|
-
itemWidth: {
|
|
28086
|
-
type: String,
|
|
28087
|
-
default: () => ''
|
|
28088
|
-
},
|
|
28089
|
-
cols: {
|
|
28090
|
-
type: String,
|
|
28091
|
-
default: () => '1'
|
|
28092
|
-
},
|
|
28093
|
-
gutter: {
|
|
28094
|
-
type: String,
|
|
28095
|
-
default: () => '10'
|
|
28096
|
-
},
|
|
28097
|
-
config: {
|
|
28098
|
-
type: Object,
|
|
28099
|
-
default: () => ({})
|
|
28100
|
-
},
|
|
28101
|
-
values: {
|
|
28102
|
-
type: Object,
|
|
28103
|
-
default: () => ({})
|
|
28104
|
-
},
|
|
28105
|
-
label: {
|
|
28106
|
-
type: Boolean,
|
|
28107
|
-
default: () => true
|
|
28108
|
-
},
|
|
28109
|
-
check: {
|
|
28110
|
-
type: Boolean,
|
|
28111
|
-
default: () => true
|
|
28112
|
-
},
|
|
28113
|
-
action: {
|
|
28114
|
-
type: Boolean,
|
|
28115
|
-
default: () => true
|
|
28116
|
-
},
|
|
28117
|
-
loading: {
|
|
28118
|
-
type: Boolean,
|
|
28119
|
-
default: () => false
|
|
28120
|
-
},
|
|
28121
|
-
fileRemoveMark: {
|
|
28122
|
-
type: String,
|
|
28123
|
-
default: () => 'will-remove'
|
|
28124
|
-
},
|
|
28125
|
-
finishText: {
|
|
28126
|
-
type: String,
|
|
28127
|
-
default: () => '保存'
|
|
28128
|
-
},
|
|
28129
|
-
submitText: {
|
|
28130
|
-
type: String,
|
|
28131
|
-
default: () => '确定'
|
|
28132
|
-
},
|
|
28133
|
-
rejectText: {
|
|
28134
|
-
type: String,
|
|
28135
|
-
default: () => ''
|
|
28136
|
-
},
|
|
28137
|
-
cancelText: {
|
|
28138
|
-
type: String,
|
|
28139
|
-
default: () => '取消'
|
|
28140
|
-
}
|
|
28141
|
-
},
|
|
28142
|
-
data() {
|
|
28143
|
-
return {
|
|
28144
|
-
form: this.value,
|
|
28145
|
-
randomKey: `key-${Math.random()}`
|
|
28146
|
-
};
|
|
28147
|
-
},
|
|
28148
|
-
created() {
|
|
28149
|
-
this.create();
|
|
28150
|
-
},
|
|
28151
|
-
destroyed() {
|
|
28152
|
-
this.create = null;
|
|
28153
|
-
this.verify = null;
|
|
28154
|
-
this.finish = null;
|
|
28155
|
-
this.submit = null;
|
|
28156
|
-
this.reject = null;
|
|
28157
|
-
this.cancel = null;
|
|
28158
|
-
this.filter = null;
|
|
28159
|
-
this.result = null;
|
|
28160
|
-
this.format = null;
|
|
28161
|
-
},
|
|
28162
|
-
watch: {
|
|
28163
|
-
values: {
|
|
28164
|
-
immediate: true,
|
|
28165
|
-
handler() {
|
|
28166
|
-
this.create();
|
|
28167
|
-
}
|
|
28168
|
-
}
|
|
28169
|
-
},
|
|
28170
|
-
methods: {
|
|
28171
|
-
create() {
|
|
28172
|
-
// 创建表单 格式化表单配置对象(this.config)为数据双向绑定对象
|
|
28173
|
-
this.randomKey = `key-${Math.random()}`;
|
|
28174
|
-
const {
|
|
28175
|
-
config = {},
|
|
28176
|
-
values = {}
|
|
28177
|
-
} = this;
|
|
28178
|
-
let temp = {};
|
|
28179
|
-
let data = {};
|
|
28180
|
-
if (config && Object.keys(config).length > 0) {
|
|
28181
|
-
for (let a in config) temp[a] = '';
|
|
28182
|
-
}
|
|
28183
|
-
if (values && Object.keys(values).length > 0) {
|
|
28184
|
-
// 设置默认值
|
|
28185
|
-
for (let a in temp) {
|
|
28186
|
-
if (a.includes('password')) data[a] = '';else data[a] = isNaN(values[a]) ? values[a] : values[a] != null ? `${values[a]}` : '';
|
|
28187
|
-
}
|
|
28188
|
-
} else {
|
|
28189
|
-
if (!this.pure) {
|
|
28190
|
-
for (let a in config) {
|
|
28191
|
-
// 设置 object 对象(单选框, 下拉框, 开关) 默认值为0
|
|
28192
|
-
let {
|
|
28193
|
-
pure = null,
|
|
28194
|
-
type = null,
|
|
28195
|
-
...r
|
|
28196
|
-
} = config[a];
|
|
28197
|
-
if (!pure) {
|
|
28198
|
-
if (type && (type == 'radio' || type == 'select' || type == 'switch')) {
|
|
28199
|
-
data[a] = r.default || '0';
|
|
28200
|
-
} else data[a] = r.default || '';
|
|
28201
|
-
} else data[a] = '';
|
|
28202
|
-
}
|
|
28203
|
-
} else {
|
|
28204
|
-
for (let a in temp) data[a] = '';
|
|
28205
|
-
}
|
|
28206
|
-
}
|
|
28207
|
-
this.form = data;
|
|
28208
|
-
},
|
|
28209
|
-
verify() {
|
|
28210
|
-
// 表单验证
|
|
28211
|
-
let change = false;
|
|
28212
|
-
let success = false;
|
|
28213
|
-
this.$refs['form'].validate(valid => {
|
|
28214
|
-
if (valid) {
|
|
28215
|
-
success = true;
|
|
28216
|
-
let result = this.refine(this.form);
|
|
28217
|
-
let values = this.refine(this.values);
|
|
28218
|
-
Object.keys(result).forEach(a => result[a] != values[a] && (change = true));
|
|
28219
|
-
}
|
|
28220
|
-
});
|
|
28221
|
-
return change && success;
|
|
28222
|
-
},
|
|
28223
|
-
finish(e) {
|
|
28224
|
-
e && e.preventDefault();
|
|
28225
|
-
this.$emit('finish', this.result());
|
|
28226
|
-
},
|
|
28227
|
-
submit(e) {
|
|
28228
|
-
// 提交表单
|
|
28229
|
-
e && e.preventDefault();
|
|
28230
|
-
if (!this.check) this.$emit('submit');
|
|
28231
|
-
this.$refs['form'].validate(valid => {
|
|
28232
|
-
if (valid) {
|
|
28233
|
-
let data = {};
|
|
28234
|
-
if (Object.keys(this.config).length > 0) {
|
|
28235
|
-
for (let a in this.config) {
|
|
28236
|
-
// 格式化数据模糊查询
|
|
28237
|
-
if (this.form[a] && Object.keys(this.form[a]).length > 0 && this.form[a].old && this.form[a].old.split('=')[1] != '') {
|
|
28238
|
-
// 判断是否有默认图片删除
|
|
28239
|
-
const {
|
|
28240
|
-
old
|
|
28241
|
-
} = this.form[a];
|
|
28242
|
-
data[a] = this.form[a];
|
|
28243
|
-
data[`${a}-${this.fileRemoveMark}`] = old;
|
|
28244
|
-
} else data[a] = this.form[a];
|
|
28245
|
-
}
|
|
28246
|
-
}
|
|
28247
|
-
let change = false;
|
|
28248
|
-
let result = this.refine(data);
|
|
28249
|
-
let values = this.refine(this.values);
|
|
28250
|
-
Object.keys(result).forEach(a => result[a] != values[a] && (change = true));
|
|
28251
|
-
if (change) this.$emit('submit', this.filter(result));
|
|
28252
|
-
return result;
|
|
28253
|
-
}
|
|
28254
|
-
});
|
|
28255
|
-
},
|
|
28256
|
-
refine(form = {}) {
|
|
28257
|
-
let data = {};
|
|
28258
|
-
Object.keys(form).forEach(a => {
|
|
28259
|
-
if (a != undefined && a != 'undefined' && form[a] != '%' && form[a] != '%%' && form[a] != 'null' && form[a] != 'undefined' && form[a] != null && form[a] != undefined) {
|
|
28260
|
-
data[a] = form[a];
|
|
28261
|
-
} else data[a] = '';
|
|
28262
|
-
});
|
|
28263
|
-
return data;
|
|
28264
|
-
},
|
|
28265
|
-
reject(e) {
|
|
28266
|
-
e && e.preventDefault();
|
|
28267
|
-
this.$emit('reject', this.result());
|
|
28268
|
-
},
|
|
28269
|
-
regain() {
|
|
28270
|
-
this.$refs['form'] && this.$refs['form'].resetFields();
|
|
28271
|
-
},
|
|
28272
|
-
cancel(e) {
|
|
28273
|
-
e && e.preventDefault();
|
|
28274
|
-
this.$emit('cancel', this.form);
|
|
28275
|
-
this.$nextTick(() => {
|
|
28276
|
-
for (let a in this.form) this.form[a] = '';
|
|
28277
|
-
this.$nextTick(() => this.$refs['form'] && this.$refs['form'].resetFields());
|
|
28278
|
-
});
|
|
28279
|
-
},
|
|
28280
|
-
filter(form = {}) {
|
|
28281
|
-
// 过滤空值属性
|
|
28282
|
-
const data = {};
|
|
28283
|
-
for (let a in form) {
|
|
28284
|
-
if (a != undefined && a != 'undefined' && form[a] != '%' && form[a] != '%%' && form[a] != 'null' && form[a] != 'undefined' && form[a] != null && form[a] != undefined) {
|
|
28285
|
-
data[a] = form[a];
|
|
28286
|
-
}
|
|
28287
|
-
}
|
|
28288
|
-
return data;
|
|
28289
|
-
},
|
|
28290
|
-
result() {
|
|
28291
|
-
return this.filter(this.form);
|
|
28292
|
-
},
|
|
28293
|
-
format(a, b) {
|
|
28294
|
-
const h = this.$createElement;
|
|
28295
|
-
const {
|
|
28296
|
-
...r
|
|
28297
|
-
} = this.config[a];
|
|
28298
|
-
const text = r.label || r.title || r.text;
|
|
28299
|
-
const must = {
|
|
28300
|
-
required: true,
|
|
28301
|
-
trigger: 'blur',
|
|
28302
|
-
message: `${text}不能为空`
|
|
28303
|
-
};
|
|
28304
|
-
const rule = r['rule'] ? r['rule'] : r['must'] || this.must ? [{
|
|
28305
|
-
...must
|
|
28306
|
-
}] : [];
|
|
28307
|
-
const rules = this.disabled || r.disabled ? [] : r['must'] && r['rule'] ? [{
|
|
28308
|
-
...must
|
|
28309
|
-
}, ...r['rule']] : rule;
|
|
28310
|
-
const config = {
|
|
28311
|
-
form: this.form,
|
|
28312
|
-
size: r.size ? r.size : this.size,
|
|
28313
|
-
field: a,
|
|
28314
|
-
disabled: this.disabled || this.loading,
|
|
28315
|
-
change: () => this.change(),
|
|
28316
|
-
...r
|
|
28317
|
-
};
|
|
28318
|
-
return h("el-form-item", {
|
|
28319
|
-
"key": b,
|
|
28320
|
-
"attrs": {
|
|
28321
|
-
"prop": a,
|
|
28322
|
-
"rules": rules,
|
|
28323
|
-
"label": this.label ? r.type && r.type == 'checkbox' ? '' : text : ''
|
|
28324
|
-
},
|
|
28325
|
-
"style": {
|
|
28326
|
-
width: r.width ? r.width : this.itemWidth
|
|
28327
|
-
}
|
|
28328
|
-
}, [r.hint ? h("el-row", {
|
|
28329
|
-
"attrs": {
|
|
28330
|
-
"gutter": Number(this.gutter)
|
|
28331
|
-
}
|
|
28332
|
-
}, [h("el-col", {
|
|
28333
|
-
"attrs": {
|
|
28334
|
-
"span": 12
|
|
28335
|
-
}
|
|
28336
|
-
}, [h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
28337
|
-
"attrs": {
|
|
28338
|
-
"config": config
|
|
28339
|
-
}
|
|
28340
|
-
})]), h("el-col", {
|
|
28341
|
-
"attrs": {
|
|
28342
|
-
"span": 12
|
|
28343
|
-
}
|
|
28344
|
-
}, [h("span", {
|
|
28345
|
-
"class": "hint"
|
|
28346
|
-
}, [`(${r.hint})`])])]) : h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
28347
|
-
"attrs": {
|
|
28348
|
-
"config": config
|
|
28349
|
-
}
|
|
28350
|
-
})]);
|
|
28351
|
-
},
|
|
28352
|
-
change() {
|
|
28353
|
-
this.$emit('input', this.form);
|
|
28354
|
-
this.$emit('change', this.form);
|
|
28355
|
-
}
|
|
28356
|
-
},
|
|
28357
|
-
render() {
|
|
28358
|
-
const h = arguments[0];
|
|
28359
|
-
const {
|
|
28360
|
-
...props
|
|
28361
|
-
} = this.$attrs;
|
|
28362
|
-
const {
|
|
28363
|
-
finish,
|
|
28364
|
-
submit,
|
|
28365
|
-
reject,
|
|
28366
|
-
cancel
|
|
28367
|
-
} = this.$listeners;
|
|
28368
|
-
return h("div", {
|
|
28369
|
-
"class": !this.inline ? 'a-f-editor vertical' : 'a-f-editor',
|
|
28370
|
-
"style": {
|
|
28371
|
-
padding: this.margin
|
|
28372
|
-
}
|
|
28373
|
-
}, [h("div", {
|
|
28374
|
-
"class": this.disabled ? 'disabled' : ''
|
|
28375
|
-
}, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
28376
|
-
"ref": "form",
|
|
28377
|
-
"attrs": {
|
|
28378
|
-
"size": this.size,
|
|
28379
|
-
"inline": this.inline,
|
|
28380
|
-
"labelWidth": this.labelWidth,
|
|
28381
|
-
"labelPosition": this.labelPosition
|
|
28382
|
-
}
|
|
28383
|
-
}, {
|
|
28384
|
-
"props": {
|
|
28385
|
-
model: this.form,
|
|
28386
|
-
rules: Object.keys(this.rules).length > 0 ? this.rules : {},
|
|
28387
|
-
...props
|
|
28388
|
-
}
|
|
28389
|
-
}]), [h("el-row", {
|
|
28390
|
-
"attrs": {
|
|
28391
|
-
"gutter": this.cols != '' ? this.gutter != '' ? Number(this.gutter) : 0 : 0
|
|
28392
|
-
}
|
|
28393
|
-
}, [Object.keys(this.config).map((a, b) => this.config[a].span && this.config[a].span != '' || this.cols != '' ? h("el-col", {
|
|
28394
|
-
"key": b,
|
|
28395
|
-
"attrs": {
|
|
28396
|
-
"span": Number(this.config[a].span) || 24 / Number(this.cols)
|
|
28397
|
-
}
|
|
28398
|
-
}, [this.format(a, b)]) : this.format(a, b)), this.$slots.default]), (finish || submit || reject || cancel) && h("div", {
|
|
28399
|
-
"class": "action"
|
|
28400
|
-
}, [h("el-form-item", [finish && this.finishText != '' && h("el-button", {
|
|
28401
|
-
"attrs": {
|
|
28402
|
-
"loading": this.loading,
|
|
28403
|
-
"type": "success"
|
|
28404
|
-
},
|
|
28405
|
-
"on": {
|
|
28406
|
-
"click": this.finish
|
|
28407
|
-
}
|
|
28408
|
-
}, [this.finishText]), submit && this.submitText != '' && h("el-button", {
|
|
28409
|
-
"attrs": {
|
|
28410
|
-
"loading": this.loading,
|
|
28411
|
-
"type": "primary"
|
|
28412
|
-
},
|
|
28413
|
-
"on": {
|
|
28414
|
-
"click": this.submit
|
|
28415
|
-
}
|
|
28416
|
-
}, [this.submitText]), reject && this.rejectText != '' && h("el-button", {
|
|
28417
|
-
"attrs": {
|
|
28418
|
-
"loading": this.loading,
|
|
28419
|
-
"type": "danger"
|
|
28420
|
-
},
|
|
28421
|
-
"on": {
|
|
28422
|
-
"click": this.reject
|
|
28423
|
-
}
|
|
28424
|
-
}, [this.rejectText]), cancel && this.cancelText != '' && h("el-button", {
|
|
28425
|
-
"attrs": {
|
|
28426
|
-
"disabled": this.loading
|
|
28427
|
-
},
|
|
28428
|
-
"on": {
|
|
28429
|
-
"click": this.cancel
|
|
28430
|
-
}
|
|
28431
|
-
}, [this.cancelText])])])])])]);
|
|
28432
|
-
}
|
|
28433
|
-
});
|
|
28434
|
-
|
|
28435
|
-
/***/ }),
|
|
28436
|
-
|
|
28437
27297
|
/***/ "3cf2":
|
|
28438
27298
|
/***/ (function(module, exports) {
|
|
28439
27299
|
|
|
@@ -37348,11 +36208,6 @@ var map = {
|
|
|
37348
36208
|
"./Aeditor/Ueditor/index.js": "2938",
|
|
37349
36209
|
"./Aempty/index.js": "bd5e",
|
|
37350
36210
|
"./Aenume/index.js": "6cc8",
|
|
37351
|
-
"./Aform copy/AfEditor/index.js": "3cef",
|
|
37352
|
-
"./Aform copy/AfSearch/index.js": "230c",
|
|
37353
|
-
"./Aform copy/BfSearch/index.js": "c0f0",
|
|
37354
|
-
"./Aform copy/CfSearch/index.js": "a237",
|
|
37355
|
-
"./Aform copy/index.js": "0d0c",
|
|
37356
36211
|
"./Aform/AfEditor/index.js": "b550",
|
|
37357
36212
|
"./Aform/AfSearch/index.js": "1b78",
|
|
37358
36213
|
"./Aform/BfEditor/index.js": "4248",
|
|
@@ -37386,6 +36241,7 @@ var map = {
|
|
|
37386
36241
|
"./Bcard/index.js": "4df8",
|
|
37387
36242
|
"./BformItem/index.js": "5c61",
|
|
37388
36243
|
"./Bmap/index.js": "e579",
|
|
36244
|
+
"./Bpages/index.js": "7c09",
|
|
37389
36245
|
"./Btable/index.js": "98ee",
|
|
37390
36246
|
"./CformItem/index.js": "5a83",
|
|
37391
36247
|
"./Ctable/index.js": "78ab"
|
|
@@ -48028,13 +46884,6 @@ webpackContext.id = "6dd9";
|
|
|
48028
46884
|
|
|
48029
46885
|
/***/ }),
|
|
48030
46886
|
|
|
48031
|
-
/***/ "6e39":
|
|
48032
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
48033
|
-
|
|
48034
|
-
// extracted by mini-css-extract-plugin
|
|
48035
|
-
|
|
48036
|
-
/***/ }),
|
|
48037
|
-
|
|
48038
46887
|
/***/ "6e8c":
|
|
48039
46888
|
/***/ (function(module, exports, __webpack_require__) {
|
|
48040
46889
|
|
|
@@ -53612,6 +52461,109 @@ module.exports = function (bitmap, value) {
|
|
|
53612
52461
|
};
|
|
53613
52462
|
|
|
53614
52463
|
|
|
52464
|
+
/***/ }),
|
|
52465
|
+
|
|
52466
|
+
/***/ "7c09":
|
|
52467
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
52468
|
+
|
|
52469
|
+
"use strict";
|
|
52470
|
+
__webpack_require__.r(__webpack_exports__);
|
|
52471
|
+
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2769");
|
|
52472
|
+
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
52473
|
+
|
|
52474
|
+
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
52475
|
+
name: 'Bpages',
|
|
52476
|
+
props: {
|
|
52477
|
+
small: {
|
|
52478
|
+
type: Boolean,
|
|
52479
|
+
default: () => false
|
|
52480
|
+
},
|
|
52481
|
+
page: {
|
|
52482
|
+
type: Number,
|
|
52483
|
+
default: () => 1
|
|
52484
|
+
},
|
|
52485
|
+
size: {
|
|
52486
|
+
type: Number,
|
|
52487
|
+
default: () => 10
|
|
52488
|
+
},
|
|
52489
|
+
pageSizes: {
|
|
52490
|
+
type: Array,
|
|
52491
|
+
default: () => [10, 20, 50, 100]
|
|
52492
|
+
},
|
|
52493
|
+
total: {
|
|
52494
|
+
type: Number,
|
|
52495
|
+
default: () => 0
|
|
52496
|
+
},
|
|
52497
|
+
prevText: {
|
|
52498
|
+
type: String,
|
|
52499
|
+
default: () => '上页'
|
|
52500
|
+
},
|
|
52501
|
+
nextText: {
|
|
52502
|
+
type: String,
|
|
52503
|
+
default: () => '下页'
|
|
52504
|
+
},
|
|
52505
|
+
complete: {
|
|
52506
|
+
type: Boolean,
|
|
52507
|
+
default: () => true
|
|
52508
|
+
},
|
|
52509
|
+
background: {
|
|
52510
|
+
type: Boolean,
|
|
52511
|
+
default: () => true
|
|
52512
|
+
}
|
|
52513
|
+
},
|
|
52514
|
+
data() {
|
|
52515
|
+
return {
|
|
52516
|
+
pages: {
|
|
52517
|
+
page: this.page,
|
|
52518
|
+
size: this.size
|
|
52519
|
+
}
|
|
52520
|
+
};
|
|
52521
|
+
},
|
|
52522
|
+
watch: {
|
|
52523
|
+
page(page) {
|
|
52524
|
+
this.pages.page = page;
|
|
52525
|
+
},
|
|
52526
|
+
size(size) {
|
|
52527
|
+
this.pages.size = size;
|
|
52528
|
+
}
|
|
52529
|
+
},
|
|
52530
|
+
methods: {
|
|
52531
|
+
currentChange(page) {
|
|
52532
|
+
this.pages.page = page;
|
|
52533
|
+
this.$emit('changePage', this.pages);
|
|
52534
|
+
},
|
|
52535
|
+
sizeChange(size) {
|
|
52536
|
+
this.pages.size = size;
|
|
52537
|
+
this.$emit('changeSize', this.pages);
|
|
52538
|
+
}
|
|
52539
|
+
},
|
|
52540
|
+
render() {
|
|
52541
|
+
const h = arguments[0];
|
|
52542
|
+
return h("div", {
|
|
52543
|
+
"class": "b-pages"
|
|
52544
|
+
}, [h("el-pagination", {
|
|
52545
|
+
"attrs": {
|
|
52546
|
+
"small": this.small,
|
|
52547
|
+
"current-page": this.pages.page,
|
|
52548
|
+
"page-size": this.pages.size,
|
|
52549
|
+
"page-sizes": this.pageSizes,
|
|
52550
|
+
"layout": this.complete ? 'total, sizes, prev, pager, next, jumper' : 'prev, pager, next',
|
|
52551
|
+
"total": this.total,
|
|
52552
|
+
"prev-text": this.prevText,
|
|
52553
|
+
"next-text": this.nextText,
|
|
52554
|
+
"background": this.background
|
|
52555
|
+
},
|
|
52556
|
+
"on": {
|
|
52557
|
+
"current-change": this.currentChange,
|
|
52558
|
+
"size-change": this.sizeChange
|
|
52559
|
+
},
|
|
52560
|
+
"props": {
|
|
52561
|
+
...this._props
|
|
52562
|
+
}
|
|
52563
|
+
})]);
|
|
52564
|
+
}
|
|
52565
|
+
});
|
|
52566
|
+
|
|
53615
52567
|
/***/ }),
|
|
53616
52568
|
|
|
53617
52569
|
/***/ "7c85":
|
|
@@ -61675,13 +60627,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
61675
60627
|
|
|
61676
60628
|
/***/ }),
|
|
61677
60629
|
|
|
61678
|
-
/***/ "9203":
|
|
61679
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
61680
|
-
|
|
61681
|
-
// extracted by mini-css-extract-plugin
|
|
61682
|
-
|
|
61683
|
-
/***/ }),
|
|
61684
|
-
|
|
61685
60630
|
/***/ "9211":
|
|
61686
60631
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
61687
60632
|
|
|
@@ -61794,18 +60739,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
61794
60739
|
Aform: _components_Aform__WEBPACK_IMPORTED_MODULE_0__["default"]
|
|
61795
60740
|
},
|
|
61796
60741
|
props: {
|
|
61797
|
-
visible: {
|
|
61798
|
-
type: Boolean,
|
|
61799
|
-
default: () => false
|
|
61800
|
-
},
|
|
61801
|
-
title: {
|
|
61802
|
-
type: String,
|
|
61803
|
-
default: () => '编辑'
|
|
61804
|
-
},
|
|
61805
|
-
width: {
|
|
61806
|
-
type: String,
|
|
61807
|
-
default: () => '600px'
|
|
61808
|
-
},
|
|
61809
60742
|
rule: {
|
|
61810
60743
|
type: Boolean,
|
|
61811
60744
|
default: () => true
|
|
@@ -61819,10 +60752,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
61819
60752
|
default: () => true
|
|
61820
60753
|
},
|
|
61821
60754
|
config: {
|
|
61822
|
-
type: Array,
|
|
61823
|
-
default: () => []
|
|
61824
|
-
},
|
|
61825
|
-
object: {
|
|
61826
60755
|
type: Object,
|
|
61827
60756
|
default: () => ({})
|
|
61828
60757
|
},
|
|
@@ -61842,34 +60771,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
61842
60771
|
type: String,
|
|
61843
60772
|
default: () => '取消'
|
|
61844
60773
|
},
|
|
61845
|
-
loading: {
|
|
61846
|
-
type: Boolean,
|
|
61847
|
-
default: () => false
|
|
61848
|
-
},
|
|
61849
60774
|
labelPosition: {
|
|
61850
60775
|
type: String,
|
|
61851
60776
|
default: () => 'top'
|
|
61852
60777
|
}
|
|
61853
60778
|
},
|
|
61854
|
-
methods: {
|
|
61855
|
-
finish(form) {
|
|
61856
|
-
this.$emit('finish', form);
|
|
61857
|
-
},
|
|
61858
|
-
submit(form) {
|
|
61859
|
-
this.$emit('submit', form);
|
|
61860
|
-
},
|
|
61861
|
-
cancel(form) {
|
|
61862
|
-
this.$emit('cancel', form);
|
|
61863
|
-
}
|
|
61864
|
-
},
|
|
61865
60779
|
render() {
|
|
61866
60780
|
const h = arguments[0];
|
|
61867
60781
|
const {
|
|
61868
60782
|
rule,
|
|
61869
60783
|
rules,
|
|
61870
|
-
action,
|
|
61871
60784
|
config,
|
|
61872
|
-
object,
|
|
61873
60785
|
values,
|
|
61874
60786
|
finishText,
|
|
61875
60787
|
submitText,
|
|
@@ -61877,21 +60789,30 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
61877
60789
|
labelPosition
|
|
61878
60790
|
} = this.$props;
|
|
61879
60791
|
const {
|
|
60792
|
+
title = '编辑',
|
|
60793
|
+
width = '600px',
|
|
60794
|
+
visible = false,
|
|
60795
|
+
loading = false,
|
|
61880
60796
|
...props
|
|
61881
60797
|
} = this.$attrs;
|
|
60798
|
+
const {
|
|
60799
|
+
finish,
|
|
60800
|
+
submit,
|
|
60801
|
+
cancel
|
|
60802
|
+
} = this.$listeners;
|
|
61882
60803
|
return h("div", {
|
|
61883
60804
|
"class": this.loading ? 'a-modal loading' : 'a-modal'
|
|
61884
60805
|
}, [h("el-dialog", {
|
|
61885
60806
|
"attrs": {
|
|
61886
|
-
"visible":
|
|
61887
|
-
"title":
|
|
61888
|
-
"width":
|
|
60807
|
+
"visible": visible,
|
|
60808
|
+
"title": title,
|
|
60809
|
+
"width": width,
|
|
61889
60810
|
"lock-scroll": true,
|
|
61890
60811
|
"destroy-on-close": true,
|
|
61891
60812
|
"close-on-click-modal": false
|
|
61892
60813
|
},
|
|
61893
60814
|
"on": {
|
|
61894
|
-
"close":
|
|
60815
|
+
"close": cancel
|
|
61895
60816
|
},
|
|
61896
60817
|
"props": {
|
|
61897
60818
|
...props
|
|
@@ -61900,23 +60821,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
61900
60821
|
"class": "a-modal-body"
|
|
61901
60822
|
}, [h(_components_Aform__WEBPACK_IMPORTED_MODULE_0__["default"], {
|
|
61902
60823
|
"attrs": {
|
|
60824
|
+
"cols": "1",
|
|
61903
60825
|
"size": "mini",
|
|
61904
60826
|
"rule": rule,
|
|
61905
60827
|
"rules": rules,
|
|
61906
|
-
"
|
|
61907
|
-
"object": config && config.length > 0 ? {} : object,
|
|
61908
|
-
"config": config && config.length > 0 ? config : [],
|
|
60828
|
+
"config": config,
|
|
61909
60829
|
"values": values,
|
|
60830
|
+
"loading": loading,
|
|
61910
60831
|
"finishText": finishText,
|
|
61911
60832
|
"submitText": submitText,
|
|
61912
60833
|
"cancelText": cancelText,
|
|
61913
|
-
"loading": this.loading,
|
|
61914
60834
|
"labelPosition": labelPosition
|
|
61915
60835
|
},
|
|
61916
60836
|
"on": {
|
|
61917
|
-
"finish":
|
|
61918
|
-
"submit":
|
|
61919
|
-
"cancel":
|
|
60837
|
+
"finish": finish,
|
|
60838
|
+
"submit": submit,
|
|
60839
|
+
"cancel": cancel
|
|
61920
60840
|
}
|
|
61921
60841
|
})]), this.$slots.default, h("div", {
|
|
61922
60842
|
"class": this.action ? 'a-modal-foot custom' : ''
|
|
@@ -66175,13 +65095,6 @@ module.exports = _default;
|
|
|
66175
65095
|
|
|
66176
65096
|
/***/ }),
|
|
66177
65097
|
|
|
66178
|
-
/***/ "9e53":
|
|
66179
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
66180
|
-
|
|
66181
|
-
// extracted by mini-css-extract-plugin
|
|
66182
|
-
|
|
66183
|
-
/***/ }),
|
|
66184
|
-
|
|
66185
65098
|
/***/ "9e96":
|
|
66186
65099
|
/***/ (function(module, exports, __webpack_require__) {
|
|
66187
65100
|
|
|
@@ -67970,345 +66883,6 @@ __webpack_require__("dff3");
|
|
|
67970
66883
|
|
|
67971
66884
|
/***/ }),
|
|
67972
66885
|
|
|
67973
|
-
/***/ "a237":
|
|
67974
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
67975
|
-
|
|
67976
|
-
"use strict";
|
|
67977
|
-
__webpack_require__.r(__webpack_exports__);
|
|
67978
|
-
/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
|
|
67979
|
-
/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__);
|
|
67980
|
-
/* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2234");
|
|
67981
|
-
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("af1c");
|
|
67982
|
-
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_2__);
|
|
67983
|
-
|
|
67984
|
-
|
|
67985
|
-
|
|
67986
|
-
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
67987
|
-
name: 'CfSearch',
|
|
67988
|
-
components: {
|
|
67989
|
-
AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"]
|
|
67990
|
-
},
|
|
67991
|
-
props: {
|
|
67992
|
-
value: {
|
|
67993
|
-
type: Object,
|
|
67994
|
-
default: () => ({})
|
|
67995
|
-
},
|
|
67996
|
-
margin: {
|
|
67997
|
-
type: String,
|
|
67998
|
-
default: () => '0'
|
|
67999
|
-
},
|
|
68000
|
-
size: {
|
|
68001
|
-
type: String,
|
|
68002
|
-
default: () => 'small'
|
|
68003
|
-
},
|
|
68004
|
-
inline: {
|
|
68005
|
-
type: Boolean,
|
|
68006
|
-
default: () => true
|
|
68007
|
-
},
|
|
68008
|
-
cols: {
|
|
68009
|
-
type: String,
|
|
68010
|
-
default: () => '6'
|
|
68011
|
-
},
|
|
68012
|
-
gutter: {
|
|
68013
|
-
type: String,
|
|
68014
|
-
default: () => '10'
|
|
68015
|
-
},
|
|
68016
|
-
labelWidth: {
|
|
68017
|
-
type: String,
|
|
68018
|
-
default: () => 'auto'
|
|
68019
|
-
},
|
|
68020
|
-
labelPosition: {
|
|
68021
|
-
type: String,
|
|
68022
|
-
default: () => 'top'
|
|
68023
|
-
},
|
|
68024
|
-
config: {
|
|
68025
|
-
type: Object,
|
|
68026
|
-
default: () => ({})
|
|
68027
|
-
},
|
|
68028
|
-
values: {
|
|
68029
|
-
type: Object,
|
|
68030
|
-
default: () => ({})
|
|
68031
|
-
},
|
|
68032
|
-
label: {
|
|
68033
|
-
type: Boolean,
|
|
68034
|
-
default: () => true
|
|
68035
|
-
},
|
|
68036
|
-
check: {
|
|
68037
|
-
type: Boolean,
|
|
68038
|
-
default: () => false
|
|
68039
|
-
},
|
|
68040
|
-
loading: {
|
|
68041
|
-
type: Boolean,
|
|
68042
|
-
default: () => false
|
|
68043
|
-
},
|
|
68044
|
-
submitText: {
|
|
68045
|
-
type: String,
|
|
68046
|
-
default: () => '搜索'
|
|
68047
|
-
},
|
|
68048
|
-
cancelText: {
|
|
68049
|
-
type: String,
|
|
68050
|
-
default: () => '重置'
|
|
68051
|
-
}
|
|
68052
|
-
},
|
|
68053
|
-
data() {
|
|
68054
|
-
return {
|
|
68055
|
-
form: this.value
|
|
68056
|
-
};
|
|
68057
|
-
},
|
|
68058
|
-
created() {
|
|
68059
|
-
this.create();
|
|
68060
|
-
},
|
|
68061
|
-
mounted() {},
|
|
68062
|
-
destroyed() {
|
|
68063
|
-
this.create = null;
|
|
68064
|
-
this.submit = null;
|
|
68065
|
-
this.cancel = null;
|
|
68066
|
-
this.filter = null;
|
|
68067
|
-
this.result = null;
|
|
68068
|
-
this.prompt = null;
|
|
68069
|
-
this.format = null;
|
|
68070
|
-
},
|
|
68071
|
-
watch: {
|
|
68072
|
-
values() {
|
|
68073
|
-
this.create();
|
|
68074
|
-
}
|
|
68075
|
-
},
|
|
68076
|
-
methods: {
|
|
68077
|
-
create() {
|
|
68078
|
-
// 创建表单
|
|
68079
|
-
if (this.config && Object.keys(this.config).length > 0) {
|
|
68080
|
-
// 格式化表单配置对象(this.config)为数据双向绑定对象
|
|
68081
|
-
let data = {};
|
|
68082
|
-
Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
|
|
68083
|
-
let {
|
|
68084
|
-
...r
|
|
68085
|
-
} = this.config[a];
|
|
68086
|
-
if (!r.render) {
|
|
68087
|
-
let range = r.range || r.scope || r.both || r.than || null;
|
|
68088
|
-
if (range) {
|
|
68089
|
-
data[`${a}LE`] = '';
|
|
68090
|
-
data[`${a}GE`] = '';
|
|
68091
|
-
} else {
|
|
68092
|
-
data[a] = r.default ? r.default : '';
|
|
68093
|
-
}
|
|
68094
|
-
}
|
|
68095
|
-
});
|
|
68096
|
-
this.form = data;
|
|
68097
|
-
}
|
|
68098
|
-
},
|
|
68099
|
-
submit(e) {
|
|
68100
|
-
// 提交表单
|
|
68101
|
-
e && e.preventDefault();
|
|
68102
|
-
let pass = !this.check; // 判断是否是空表单
|
|
68103
|
-
for (let a in this.form) if (this.form[a] != '') pass = true;
|
|
68104
|
-
if (pass) {
|
|
68105
|
-
let result = this.filter();
|
|
68106
|
-
const {
|
|
68107
|
-
formParams,
|
|
68108
|
-
pageParams
|
|
68109
|
-
} = this.$store.state;
|
|
68110
|
-
this.$store.commit('setFormParams', result); // 添加查询参数
|
|
68111
|
-
this.$store.commit('setPageParams', {
|
|
68112
|
-
...pageParams,
|
|
68113
|
-
page: 1
|
|
68114
|
-
}); // 重置分页参数
|
|
68115
|
-
this.$nextTick(() => {
|
|
68116
|
-
let change = false;
|
|
68117
|
-
Object.keys(result).forEach(a => result[a] != formParams[a] && (change = true));
|
|
68118
|
-
if (change) this.$emit('submit', {
|
|
68119
|
-
...result,
|
|
68120
|
-
...pageParams,
|
|
68121
|
-
page: 1
|
|
68122
|
-
}); // 派发事件并重置当前分页
|
|
68123
|
-
return result;
|
|
68124
|
-
});
|
|
68125
|
-
}
|
|
68126
|
-
},
|
|
68127
|
-
cancel(e) {
|
|
68128
|
-
// 重置表单
|
|
68129
|
-
e && e.preventDefault();
|
|
68130
|
-
let pass = !this.check; // 判断是否是空表单
|
|
68131
|
-
for (let a in this.form) if (this.form[a] != '') pass = true;
|
|
68132
|
-
if (pass) {
|
|
68133
|
-
const {
|
|
68134
|
-
pageParams
|
|
68135
|
-
} = this.$store.state;
|
|
68136
|
-
this.$store.commit('setPageParams', {
|
|
68137
|
-
...pageParams,
|
|
68138
|
-
page: 1,
|
|
68139
|
-
size: 10
|
|
68140
|
-
}); // 重置分页参数
|
|
68141
|
-
this.$store.commit('setFormParams', {}); // 重置查询参数
|
|
68142
|
-
this.$nextTick(() => {
|
|
68143
|
-
for (let a in this.form) this.form[a] = '';
|
|
68144
|
-
this.$nextTick(() => this.$emit('cancel', this.form));
|
|
68145
|
-
});
|
|
68146
|
-
}
|
|
68147
|
-
},
|
|
68148
|
-
filter() {
|
|
68149
|
-
let data = {};
|
|
68150
|
-
Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
|
|
68151
|
-
let {
|
|
68152
|
-
like = null,
|
|
68153
|
-
...r
|
|
68154
|
-
} = this.config[a];
|
|
68155
|
-
let range = r.range || r.scope || r.both || r.than || null;
|
|
68156
|
-
if (range) {
|
|
68157
|
-
this.form[`${a}LE`] != '' && (data[`${a}LE`] = this.form[`${a}LE`]);
|
|
68158
|
-
this.form[`${a}GE`] != '' && (data[`${a}GE`] = this.form[`${a}GE`]);
|
|
68159
|
-
} else {
|
|
68160
|
-
let value = this.form[a];
|
|
68161
|
-
if (value) {
|
|
68162
|
-
if (r.split && typeof r.split == 'object' && r.split.length > 0) {
|
|
68163
|
-
r.split.forEach((c, d) => data[c] = value != '' && typeof value == 'object' && value.length > 0 ? value[d] : value);
|
|
68164
|
-
} else {
|
|
68165
|
-
if (like) {
|
|
68166
|
-
if (like == 'left' || like && like == 'l') data[a] = '%' + value;
|
|
68167
|
-
if (like == 'right' || like && like == 'r') data[a] = value + '%';else data[a] = '%' + value + '%';
|
|
68168
|
-
} else {
|
|
68169
|
-
if (value.includes(' 00:00:00')) {
|
|
68170
|
-
data[a] = '%' + value.split(' 00:00:00')[0] + '%';
|
|
68171
|
-
} else {
|
|
68172
|
-
data[a] = value;
|
|
68173
|
-
}
|
|
68174
|
-
}
|
|
68175
|
-
}
|
|
68176
|
-
}
|
|
68177
|
-
}
|
|
68178
|
-
});
|
|
68179
|
-
let form = {};
|
|
68180
|
-
Object.keys(data).length > 0 && Object.keys(data).forEach(a => {
|
|
68181
|
-
if (data[a] != '%' && data[a] != '%%' && data[a] != 'null' && data[a] != 'undefined' && data[a] != null && data[a] != undefined) {
|
|
68182
|
-
form[a] = data[a];
|
|
68183
|
-
}
|
|
68184
|
-
});
|
|
68185
|
-
return form;
|
|
68186
|
-
},
|
|
68187
|
-
result() {
|
|
68188
|
-
// 返回验证后的表单数据
|
|
68189
|
-
return this.filter(this.form);
|
|
68190
|
-
},
|
|
68191
|
-
format(a = '', field = '', placeholder = '') {
|
|
68192
|
-
const h = this.$createElement;
|
|
68193
|
-
let {
|
|
68194
|
-
...r
|
|
68195
|
-
} = this.config[a];
|
|
68196
|
-
let config = {
|
|
68197
|
-
size: r.size ? r.size : this.size,
|
|
68198
|
-
field: field != '' ? field : a,
|
|
68199
|
-
change: () => this.change(),
|
|
68200
|
-
disabled: this.loading,
|
|
68201
|
-
form: this.form,
|
|
68202
|
-
...r
|
|
68203
|
-
};
|
|
68204
|
-
return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
68205
|
-
"attrs": {
|
|
68206
|
-
"config": placeholder != '' ? {
|
|
68207
|
-
...config,
|
|
68208
|
-
placeholder
|
|
68209
|
-
} : config
|
|
68210
|
-
}
|
|
68211
|
-
});
|
|
68212
|
-
},
|
|
68213
|
-
change() {
|
|
68214
|
-
this.$emit('input', this.filter());
|
|
68215
|
-
this.$emit('change', this.filter());
|
|
68216
|
-
}
|
|
68217
|
-
},
|
|
68218
|
-
render() {
|
|
68219
|
-
const h = arguments[0];
|
|
68220
|
-
const {
|
|
68221
|
-
...props
|
|
68222
|
-
} = this.$attrs;
|
|
68223
|
-
const {
|
|
68224
|
-
submit = null,
|
|
68225
|
-
cancel = null
|
|
68226
|
-
} = this.$listeners;
|
|
68227
|
-
let style = this.cols != '' ? {
|
|
68228
|
-
width: `${100 / this.cols}%`
|
|
68229
|
-
} : {};
|
|
68230
|
-
return h("div", {
|
|
68231
|
-
"class": "c-f-search",
|
|
68232
|
-
"style": {
|
|
68233
|
-
padding: this.margin
|
|
68234
|
-
}
|
|
68235
|
-
}, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
68236
|
-
"ref": "form",
|
|
68237
|
-
"attrs": {
|
|
68238
|
-
"size": this.size
|
|
68239
|
-
}
|
|
68240
|
-
}, {
|
|
68241
|
-
"props": {
|
|
68242
|
-
model: this.form,
|
|
68243
|
-
...props
|
|
68244
|
-
}
|
|
68245
|
-
}, {
|
|
68246
|
-
"attrs": {
|
|
68247
|
-
"labelWidth": this.labelWidth,
|
|
68248
|
-
"labelPosition": this.labelPosition
|
|
68249
|
-
}
|
|
68250
|
-
}]), [h("el-row", {
|
|
68251
|
-
"attrs": {
|
|
68252
|
-
"gutter": Number(this.gutter)
|
|
68253
|
-
}
|
|
68254
|
-
}, [Object.keys(this.config).map((a, b) => {
|
|
68255
|
-
let {
|
|
68256
|
-
...r
|
|
68257
|
-
} = this.config[a];
|
|
68258
|
-
let range = r.than || r.both || r.range || r.scope;
|
|
68259
|
-
let label = this.label ? r.text || r.label || r.title : '';
|
|
68260
|
-
let prefixPlaceholder = r.placeholder && r.placeholder.length > 0 ? r.placeholder[0] : '最高';
|
|
68261
|
-
let suffixPlaceholder = r.placeholder && r.placeholder.length > 1 ? r.placeholder[1] : '最低';
|
|
68262
|
-
return h("el-col", {
|
|
68263
|
-
"key": b,
|
|
68264
|
-
"class": "column",
|
|
68265
|
-
"style": style
|
|
68266
|
-
}, [h("el-form-item", {
|
|
68267
|
-
"attrs": {
|
|
68268
|
-
"prop": a,
|
|
68269
|
-
"label": label
|
|
68270
|
-
}
|
|
68271
|
-
}, [range ? h("el-col", {
|
|
68272
|
-
"class": "range-cols"
|
|
68273
|
-
}, [h("el-col", {
|
|
68274
|
-
"attrs": {
|
|
68275
|
-
"span": 12
|
|
68276
|
-
}
|
|
68277
|
-
}, [this.format(a, `${a}LE`, prefixPlaceholder)]), h("el-col", {
|
|
68278
|
-
"attrs": {
|
|
68279
|
-
"span": 12
|
|
68280
|
-
}
|
|
68281
|
-
}, [this.format(a, `${a}GE`, suffixPlaceholder)])]) : this.format(a)])]);
|
|
68282
|
-
}), this.$slots.default, (submit || cancel) && h("el-col", {
|
|
68283
|
-
"key": "action",
|
|
68284
|
-
"class": "action",
|
|
68285
|
-
"style": style
|
|
68286
|
-
}, [h("el-form-item", {
|
|
68287
|
-
"attrs": {
|
|
68288
|
-
"label": this.label ? 'action' : ''
|
|
68289
|
-
}
|
|
68290
|
-
}, [submit && h("el-button", {
|
|
68291
|
-
"attrs": {
|
|
68292
|
-
"disabled": this.loading,
|
|
68293
|
-
"type": "primary"
|
|
68294
|
-
},
|
|
68295
|
-
"on": {
|
|
68296
|
-
"click": this.submit
|
|
68297
|
-
}
|
|
68298
|
-
}, [this.submitText]), cancel && h("el-button", {
|
|
68299
|
-
"attrs": {
|
|
68300
|
-
"disabled": this.loading,
|
|
68301
|
-
"type": "default"
|
|
68302
|
-
},
|
|
68303
|
-
"on": {
|
|
68304
|
-
"click": this.cancel
|
|
68305
|
-
}
|
|
68306
|
-
}, [this.cancelText])])])])])]);
|
|
68307
|
-
}
|
|
68308
|
-
});
|
|
68309
|
-
|
|
68310
|
-
/***/ }),
|
|
68311
|
-
|
|
68312
66886
|
/***/ "a23d":
|
|
68313
66887
|
/***/ (function(module, exports, __webpack_require__) {
|
|
68314
66888
|
|
|
@@ -132544,13 +131118,6 @@ exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
|
132544
131118
|
};
|
|
132545
131119
|
|
|
132546
131120
|
|
|
132547
|
-
/***/ }),
|
|
132548
|
-
|
|
132549
|
-
/***/ "af1c":
|
|
132550
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
132551
|
-
|
|
132552
|
-
// extracted by mini-css-extract-plugin
|
|
132553
|
-
|
|
132554
131121
|
/***/ }),
|
|
132555
131122
|
|
|
132556
131123
|
/***/ "af54":
|
|
@@ -133754,6 +132321,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133754
132321
|
type: Object,
|
|
133755
132322
|
default: () => ({})
|
|
133756
132323
|
},
|
|
132324
|
+
must: {
|
|
132325
|
+
type: Boolean,
|
|
132326
|
+
default: () => false
|
|
132327
|
+
},
|
|
133757
132328
|
inline: {
|
|
133758
132329
|
type: Boolean,
|
|
133759
132330
|
default: () => false
|
|
@@ -133764,36 +132335,50 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133764
132335
|
},
|
|
133765
132336
|
gutter: {
|
|
133766
132337
|
type: String,
|
|
133767
|
-
default: () => '
|
|
132338
|
+
default: () => '16'
|
|
133768
132339
|
},
|
|
133769
132340
|
config: {
|
|
133770
132341
|
type: Object,
|
|
133771
132342
|
default: () => ({})
|
|
133772
132343
|
},
|
|
132344
|
+
values: {
|
|
132345
|
+
type: Object,
|
|
132346
|
+
default: () => ({})
|
|
132347
|
+
},
|
|
133773
132348
|
global: {
|
|
133774
132349
|
type: Boolean,
|
|
133775
132350
|
default: () => false
|
|
132351
|
+
},
|
|
132352
|
+
disabled: {
|
|
132353
|
+
type: Boolean,
|
|
132354
|
+
default: () => false
|
|
133776
132355
|
}
|
|
133777
132356
|
},
|
|
133778
132357
|
data() {
|
|
133779
132358
|
return {
|
|
133780
132359
|
form: this.value,
|
|
133781
|
-
option: {}
|
|
133782
|
-
opened: false,
|
|
133783
|
-
height: 'auto'
|
|
132360
|
+
option: {}
|
|
133784
132361
|
};
|
|
133785
132362
|
},
|
|
133786
132363
|
watch: {
|
|
133787
|
-
|
|
133788
|
-
|
|
132364
|
+
config: {
|
|
132365
|
+
immediate: true,
|
|
132366
|
+
deep: true,
|
|
132367
|
+
handler() {
|
|
132368
|
+
this.relate(this.config);
|
|
132369
|
+
}
|
|
132370
|
+
},
|
|
132371
|
+
values: {
|
|
132372
|
+
immediate: true,
|
|
132373
|
+
deep: true,
|
|
132374
|
+
handler() {
|
|
132375
|
+
this.relate(this.config);
|
|
132376
|
+
}
|
|
133789
132377
|
}
|
|
133790
132378
|
},
|
|
133791
132379
|
created() {
|
|
133792
132380
|
this.relate(this.config);
|
|
133793
132381
|
},
|
|
133794
|
-
mounted() {
|
|
133795
|
-
this.resize();
|
|
133796
|
-
},
|
|
133797
132382
|
methods: {
|
|
133798
132383
|
input() {
|
|
133799
132384
|
this.$emit('input', this.filter());
|
|
@@ -133802,6 +132387,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133802
132387
|
this.$emit('change', this.filter(), this.form, this.option);
|
|
133803
132388
|
},
|
|
133804
132389
|
relate(config = {}) {
|
|
132390
|
+
let data = {};
|
|
133805
132391
|
Object.keys(config).forEach(a => {
|
|
133806
132392
|
let {
|
|
133807
132393
|
...r
|
|
@@ -133810,9 +132396,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133810
132396
|
if (child && Object.keys(child).length > 0) {
|
|
133811
132397
|
this.relate(child);
|
|
133812
132398
|
} else {
|
|
133813
|
-
|
|
132399
|
+
if (r.type == 'password') {
|
|
132400
|
+
data[a] = '';
|
|
132401
|
+
} else {
|
|
132402
|
+
if (this.values[a] != undefined) {
|
|
132403
|
+
data[a] = `${this.values[a]}`;
|
|
132404
|
+
} else if (r.default) {
|
|
132405
|
+
data[a] = r.default;
|
|
132406
|
+
}
|
|
132407
|
+
}
|
|
133814
132408
|
}
|
|
133815
132409
|
});
|
|
132410
|
+
this.form = data;
|
|
133816
132411
|
},
|
|
133817
132412
|
create(a, b) {
|
|
133818
132413
|
const h = this.$createElement;
|
|
@@ -133821,22 +132416,27 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133821
132416
|
} = this.config[a];
|
|
133822
132417
|
let label = r.text || r.label || r.title || '';
|
|
133823
132418
|
let width = r.width ? r.width : `${100 / this.cols}%`;
|
|
133824
|
-
let
|
|
133825
|
-
|
|
133826
|
-
|
|
132419
|
+
let judge = [{
|
|
132420
|
+
required: true,
|
|
132421
|
+
message: `${label}不能为空`
|
|
132422
|
+
}];
|
|
132423
|
+
let valid = r.rule ? r.rule : r.must || this.must ? judge : [];
|
|
132424
|
+
let rules = this.disabled || r.disabled ? [] : (r.must || this.must) && r.rule ? [...judge, ...r.rule] : valid;
|
|
133827
132425
|
let props = {
|
|
133828
132426
|
name: a,
|
|
133829
132427
|
prop: a,
|
|
133830
132428
|
label,
|
|
132429
|
+
rules,
|
|
132430
|
+
disabled: r.disabled || this.disabled,
|
|
133831
132431
|
...r
|
|
133832
132432
|
};
|
|
133833
132433
|
if (this.inline) {
|
|
133834
|
-
let
|
|
132434
|
+
let style = {
|
|
133835
132435
|
padding: `0 ${this.gutter / 2}px`,
|
|
133836
|
-
|
|
132436
|
+
width
|
|
133837
132437
|
};
|
|
133838
132438
|
return h("el-form-item", {
|
|
133839
|
-
"style":
|
|
132439
|
+
"style": style,
|
|
133840
132440
|
"props": {
|
|
133841
132441
|
...props
|
|
133842
132442
|
}
|
|
@@ -133856,7 +132456,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133856
132456
|
} else {
|
|
133857
132457
|
return h("el-col", {
|
|
133858
132458
|
"key": b,
|
|
133859
|
-
"style":
|
|
132459
|
+
"style": {
|
|
132460
|
+
width
|
|
132461
|
+
}
|
|
133860
132462
|
}, [h("el-form-item", {
|
|
133861
132463
|
"props": {
|
|
133862
132464
|
...props
|
|
@@ -133870,25 +132472,31 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133870
132472
|
this.option[b] = a;
|
|
133871
132473
|
let child = a.children || a.child || a.node || null;
|
|
133872
132474
|
if (child && Object.keys(child).length > 0) {
|
|
133873
|
-
let width = a.width ? a.width : `${100 / Object.keys(child).length}%`;
|
|
133874
|
-
let style = this.cols != '' ? {
|
|
133875
|
-
width
|
|
133876
|
-
} : {};
|
|
133877
132475
|
return Object.keys(child).map((c, d) => {
|
|
133878
132476
|
let {
|
|
133879
132477
|
...r
|
|
133880
132478
|
} = child[c];
|
|
132479
|
+
let space = a.gutter ? a.gutter / 2 : this.gutter / 4;
|
|
132480
|
+
let style = {
|
|
132481
|
+
padding: `0 ${space}px`
|
|
132482
|
+
};
|
|
132483
|
+
r.type = r.type ? r.type : a.type;
|
|
133881
132484
|
if (r.span) {
|
|
133882
132485
|
return h("el-col", {
|
|
133883
132486
|
"key": d,
|
|
132487
|
+
"style": style,
|
|
133884
132488
|
"attrs": {
|
|
133885
132489
|
"span": Number(r.span)
|
|
133886
132490
|
}
|
|
133887
132491
|
}, [this.format(r, c)]);
|
|
133888
132492
|
} else {
|
|
132493
|
+
let width = r.width ? r.width : `${100 / Object.keys(child).length}%`;
|
|
133889
132494
|
return h("el-col", {
|
|
133890
132495
|
"key": d,
|
|
133891
|
-
"style":
|
|
132496
|
+
"style": {
|
|
132497
|
+
width,
|
|
132498
|
+
...style
|
|
132499
|
+
}
|
|
133892
132500
|
}, [this.format(r, c)]);
|
|
133893
132501
|
}
|
|
133894
132502
|
});
|
|
@@ -133897,6 +132505,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133897
132505
|
change: () => this.change(),
|
|
133898
132506
|
form: this.form,
|
|
133899
132507
|
field: b,
|
|
132508
|
+
clearable: !a.default,
|
|
133900
132509
|
...a
|
|
133901
132510
|
};
|
|
133902
132511
|
return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
@@ -133909,12 +132518,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133909
132518
|
});
|
|
133910
132519
|
}
|
|
133911
132520
|
},
|
|
133912
|
-
resize() {
|
|
133913
|
-
if (Object.keys(this.config).length > 0) {
|
|
133914
|
-
let rows = Math.ceil(Object.keys(this.config).length / this.cols);
|
|
133915
|
-
this.height = this.$el.clientHeight * (rows - 1);
|
|
133916
|
-
}
|
|
133917
|
-
},
|
|
133918
132521
|
filter() {
|
|
133919
132522
|
let data = {};
|
|
133920
132523
|
Object.keys(this.form).length > 0 && Object.keys(this.form).forEach(a => {
|
|
@@ -133924,13 +132527,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133924
132527
|
} = this.option[a];
|
|
133925
132528
|
if (r.split && r.split.length > 0) {
|
|
133926
132529
|
r.split.forEach((b, c) => data[b] = this.form[a][c]);
|
|
133927
|
-
} else
|
|
133928
|
-
if (r.like) {
|
|
133929
|
-
if (r.like == 'L' || r.like == 'l' || r.like == 'left') data[a] = `%${this.form[a]}`;
|
|
133930
|
-
if (r.like == 'R' || r.like == 'r' || r.like == 'right') data[a] = `${this.form[a]}%`;
|
|
133931
|
-
if (this.form[a] && this.form[a].includes(' 00:00:00')) data[a] = `%${this.form[a].replace(' 00:00:00', '')}%`;else data[a] = `%${this.form[a]}%`;
|
|
133932
|
-
} else data[a] = this.form[a];
|
|
133933
|
-
}
|
|
132530
|
+
} else data[a] = this.form[a];
|
|
133934
132531
|
}
|
|
133935
132532
|
});
|
|
133936
132533
|
return data;
|
|
@@ -133974,29 +132571,36 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
133974
132571
|
render() {
|
|
133975
132572
|
const h = arguments[0];
|
|
133976
132573
|
let {
|
|
133977
|
-
padding = '0',
|
|
133978
132574
|
margin = '0',
|
|
133979
|
-
|
|
132575
|
+
padding = '0',
|
|
133980
132576
|
size = 'small',
|
|
133981
132577
|
loading = false,
|
|
133982
132578
|
labelWidth = 'auto',
|
|
133983
132579
|
labelPosition = 'top',
|
|
133984
132580
|
finishText = '保存',
|
|
133985
|
-
submitText = '
|
|
132581
|
+
submitText = '提交',
|
|
133986
132582
|
rejectText = '驳回',
|
|
133987
|
-
cancelText = '
|
|
132583
|
+
cancelText = '取消',
|
|
133988
132584
|
action = [],
|
|
133989
|
-
...
|
|
132585
|
+
...rest
|
|
133990
132586
|
} = this.$attrs;
|
|
132587
|
+
let style = this.inline ? {
|
|
132588
|
+
margin: `0 -${this.gutter / 2}px`
|
|
132589
|
+
} : {};
|
|
133991
132590
|
let {
|
|
133992
132591
|
finish = null,
|
|
133993
132592
|
submit = null,
|
|
133994
132593
|
reject = null,
|
|
133995
132594
|
cancel = null
|
|
133996
132595
|
} = this.$listeners;
|
|
133997
|
-
let
|
|
133998
|
-
|
|
133999
|
-
|
|
132596
|
+
let props = {
|
|
132597
|
+
size,
|
|
132598
|
+
inline: this.inline,
|
|
132599
|
+
labelWidth,
|
|
132600
|
+
labelPosition,
|
|
132601
|
+
style,
|
|
132602
|
+
...rest
|
|
132603
|
+
};
|
|
134000
132604
|
return h("div", {
|
|
134001
132605
|
"class": "a-form",
|
|
134002
132606
|
"style": {
|
|
@@ -134004,14 +132608,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
134004
132608
|
padding
|
|
134005
132609
|
}
|
|
134006
132610
|
}, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
134007
|
-
"ref":
|
|
134008
|
-
"attrs": {
|
|
134009
|
-
"size": size,
|
|
134010
|
-
"inline": this.inline,
|
|
134011
|
-
"label-width": labelWidth,
|
|
134012
|
-
"label-position": labelPosition
|
|
134013
|
-
},
|
|
134014
|
-
"style": style
|
|
132611
|
+
"ref": "form"
|
|
134015
132612
|
}, {
|
|
134016
132613
|
"props": {
|
|
134017
132614
|
model: this.form,
|
|
@@ -134024,27 +132621,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
134024
132621
|
"gutter": Number(this.gutter)
|
|
134025
132622
|
},
|
|
134026
132623
|
"class": "main-rows"
|
|
134027
|
-
}, [Object.keys(this.config).map((a, b) => this.create(a, b))])]), (finish || submit || reject || cancel || action.length > 0) && h("
|
|
134028
|
-
"attrs": {
|
|
134029
|
-
"name": "action",
|
|
134030
|
-
"label": "action"
|
|
134031
|
-
},
|
|
132624
|
+
}, [Object.keys(this.config).map((a, b) => this.create(a, b))])]), (finish || submit || reject || cancel || action.length > 0) && h("div", {
|
|
134032
132625
|
"class": "action",
|
|
134033
132626
|
"style": {
|
|
134034
132627
|
paddingLeft: `${this.gutter}px`
|
|
134035
132628
|
}
|
|
134036
|
-
}, [
|
|
132629
|
+
}, [h("el-form-item", {
|
|
134037
132630
|
"attrs": {
|
|
134038
|
-
"
|
|
134039
|
-
"
|
|
134040
|
-
},
|
|
134041
|
-
"class": "collapse-button",
|
|
134042
|
-
"on": {
|
|
134043
|
-
"click": () => this.opened = !this.opened
|
|
132631
|
+
"name": "action",
|
|
132632
|
+
"label": "action"
|
|
134044
132633
|
}
|
|
134045
|
-
}, [h("
|
|
134046
|
-
"class": `el-icon-arrow-${this.opened ? 'up' : 'down'}`
|
|
134047
|
-
}), this.opened ? '收起' : '展开']), finish && h("el-button", {
|
|
132634
|
+
}, [finish && h("el-button", {
|
|
134048
132635
|
"attrs": {
|
|
134049
132636
|
"disabled": loading,
|
|
134050
132637
|
"type": "success"
|
|
@@ -134076,12 +132663,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
134076
132663
|
"on": {
|
|
134077
132664
|
"click": this.cancel
|
|
134078
132665
|
}
|
|
134079
|
-
}, [cancelText]), action.
|
|
132666
|
+
}, [cancelText]), action.map((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
134080
132667
|
"key": b,
|
|
134081
132668
|
"attrs": {
|
|
134082
132669
|
"disabled": loading
|
|
132670
|
+
},
|
|
132671
|
+
"on": {
|
|
132672
|
+
"click": e => a.click(this.filter(), this.form, this.option, e)
|
|
134083
132673
|
}
|
|
134084
|
-
}, a]), [a.label || a.title || a.text || '']))])])]);
|
|
132674
|
+
}, a]), [a.label || a.title || a.text || '']))])])])]);
|
|
134085
132675
|
}
|
|
134086
132676
|
});
|
|
134087
132677
|
|
|
@@ -135829,6 +134419,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
135829
134419
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
135830
134420
|
name: 'AfEditor',
|
|
135831
134421
|
props: {
|
|
134422
|
+
value: {
|
|
134423
|
+
type: Object,
|
|
134424
|
+
default: () => ({})
|
|
134425
|
+
},
|
|
135832
134426
|
must: {
|
|
135833
134427
|
type: Boolean,
|
|
135834
134428
|
default: () => false
|
|
@@ -135843,7 +134437,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
135843
134437
|
},
|
|
135844
134438
|
gutter: {
|
|
135845
134439
|
type: String,
|
|
135846
|
-
default: () => '
|
|
134440
|
+
default: () => '16'
|
|
135847
134441
|
},
|
|
135848
134442
|
config: {
|
|
135849
134443
|
type: Object,
|
|
@@ -135856,19 +134450,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
135856
134450
|
global: {
|
|
135857
134451
|
type: Boolean,
|
|
135858
134452
|
default: () => false
|
|
134453
|
+
},
|
|
134454
|
+
disabled: {
|
|
134455
|
+
type: Boolean,
|
|
134456
|
+
default: () => false
|
|
135859
134457
|
}
|
|
135860
134458
|
},
|
|
135861
134459
|
data() {
|
|
135862
134460
|
return {
|
|
135863
|
-
form: this.
|
|
135864
|
-
option: {}
|
|
135865
|
-
opened: false,
|
|
135866
|
-
height: 'auto'
|
|
134461
|
+
form: this.value,
|
|
134462
|
+
option: {}
|
|
135867
134463
|
};
|
|
135868
134464
|
},
|
|
135869
134465
|
watch: {
|
|
135870
|
-
|
|
135871
|
-
|
|
134466
|
+
config: {
|
|
134467
|
+
immediate: true,
|
|
134468
|
+
deep: true,
|
|
134469
|
+
handler() {
|
|
134470
|
+
this.relate(this.config);
|
|
134471
|
+
}
|
|
135872
134472
|
}
|
|
135873
134473
|
},
|
|
135874
134474
|
created() {
|
|
@@ -135883,6 +134483,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
135883
134483
|
this.$emit('change', this.filter(), this.form, this.option);
|
|
135884
134484
|
},
|
|
135885
134485
|
relate(config = {}) {
|
|
134486
|
+
let data = {};
|
|
135886
134487
|
Object.keys(config).forEach(a => {
|
|
135887
134488
|
let {
|
|
135888
134489
|
...r
|
|
@@ -135891,12 +134492,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
135891
134492
|
if (child && Object.keys(child).length > 0) {
|
|
135892
134493
|
this.relate(child);
|
|
135893
134494
|
} else {
|
|
135894
|
-
|
|
134495
|
+
if (r.type == 'password') {
|
|
134496
|
+
data[a] = '';
|
|
134497
|
+
} else {
|
|
134498
|
+
if (this.values[a] != undefined) {
|
|
134499
|
+
data[a] = `${this.values[a]}`;
|
|
134500
|
+
} else if (r.default) {
|
|
134501
|
+
data[a] = r.default;
|
|
134502
|
+
}
|
|
134503
|
+
}
|
|
135895
134504
|
}
|
|
135896
134505
|
});
|
|
135897
|
-
this
|
|
135898
|
-
Object.keys(this.values).forEach(a => typeof this.values[a] == 'number' && (this.form[a] = `${this.values[a]}`));
|
|
135899
|
-
});
|
|
134506
|
+
this.form = data;
|
|
135900
134507
|
},
|
|
135901
134508
|
create(a, b) {
|
|
135902
134509
|
const h = this.$createElement;
|
|
@@ -135905,29 +134512,27 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
135905
134512
|
} = this.config[a];
|
|
135906
134513
|
let label = r.text || r.label || r.title || '';
|
|
135907
134514
|
let width = r.width ? r.width : `${100 / this.cols}%`;
|
|
135908
|
-
let
|
|
135909
|
-
width
|
|
135910
|
-
} : {};
|
|
135911
|
-
let valid = r.rule ? r.rule : r.must || this.must ? [{
|
|
134515
|
+
let judge = [{
|
|
135912
134516
|
required: true,
|
|
135913
|
-
trigger: 'blur',
|
|
135914
134517
|
message: `${label}不能为空`
|
|
135915
|
-
}]
|
|
135916
|
-
let
|
|
134518
|
+
}];
|
|
134519
|
+
let valid = r.rule ? r.rule : r.must || this.must ? judge : [];
|
|
134520
|
+
let rules = this.disabled || r.disabled ? [] : (r.must || this.must) && r.rule ? [...judge, ...r.rule] : valid;
|
|
135917
134521
|
let props = {
|
|
135918
134522
|
name: a,
|
|
135919
134523
|
prop: a,
|
|
135920
134524
|
label,
|
|
135921
134525
|
rules,
|
|
134526
|
+
disabled: r.disabled || this.disabled,
|
|
135922
134527
|
...r
|
|
135923
134528
|
};
|
|
135924
134529
|
if (this.inline) {
|
|
135925
|
-
let
|
|
134530
|
+
let style = {
|
|
135926
134531
|
padding: `0 ${this.gutter / 2}px`,
|
|
135927
|
-
|
|
134532
|
+
width
|
|
135928
134533
|
};
|
|
135929
134534
|
return h("el-form-item", {
|
|
135930
|
-
"style":
|
|
134535
|
+
"style": style,
|
|
135931
134536
|
"props": {
|
|
135932
134537
|
...props
|
|
135933
134538
|
}
|
|
@@ -135947,7 +134552,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
135947
134552
|
} else {
|
|
135948
134553
|
return h("el-col", {
|
|
135949
134554
|
"key": b,
|
|
135950
|
-
"style":
|
|
134555
|
+
"style": {
|
|
134556
|
+
width
|
|
134557
|
+
}
|
|
135951
134558
|
}, [h("el-form-item", {
|
|
135952
134559
|
"props": {
|
|
135953
134560
|
...props
|
|
@@ -135961,25 +134568,31 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
135961
134568
|
this.option[b] = a;
|
|
135962
134569
|
let child = a.children || a.child || a.node || null;
|
|
135963
134570
|
if (child && Object.keys(child).length > 0) {
|
|
135964
|
-
let width = a.width ? a.width : `${100 / Object.keys(child).length}%`;
|
|
135965
|
-
let style = this.cols != '' ? {
|
|
135966
|
-
width
|
|
135967
|
-
} : {};
|
|
135968
134571
|
return Object.keys(child).map((c, d) => {
|
|
135969
134572
|
let {
|
|
135970
134573
|
...r
|
|
135971
134574
|
} = child[c];
|
|
134575
|
+
let space = a.gutter ? a.gutter / 2 : this.gutter / 4;
|
|
134576
|
+
let style = {
|
|
134577
|
+
padding: `0 ${space}px`
|
|
134578
|
+
};
|
|
134579
|
+
r.type = r.type ? r.type : a.type;
|
|
135972
134580
|
if (r.span) {
|
|
135973
134581
|
return h("el-col", {
|
|
135974
134582
|
"key": d,
|
|
134583
|
+
"style": style,
|
|
135975
134584
|
"attrs": {
|
|
135976
134585
|
"span": Number(r.span)
|
|
135977
134586
|
}
|
|
135978
134587
|
}, [this.format(r, c)]);
|
|
135979
134588
|
} else {
|
|
134589
|
+
let width = r.width ? r.width : `${100 / Object.keys(child).length}%`;
|
|
135980
134590
|
return h("el-col", {
|
|
135981
134591
|
"key": d,
|
|
135982
|
-
"style":
|
|
134592
|
+
"style": {
|
|
134593
|
+
width,
|
|
134594
|
+
...style
|
|
134595
|
+
}
|
|
135983
134596
|
}, [this.format(r, c)]);
|
|
135984
134597
|
}
|
|
135985
134598
|
});
|
|
@@ -135988,6 +134601,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
135988
134601
|
change: () => this.change(),
|
|
135989
134602
|
form: this.form,
|
|
135990
134603
|
field: b,
|
|
134604
|
+
clearable: !a.default,
|
|
135991
134605
|
...a
|
|
135992
134606
|
};
|
|
135993
134607
|
return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
@@ -136053,35 +134667,35 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
136053
134667
|
render() {
|
|
136054
134668
|
const h = arguments[0];
|
|
136055
134669
|
let {
|
|
136056
|
-
padding = '0',
|
|
136057
134670
|
margin = '0',
|
|
134671
|
+
padding = '0',
|
|
136058
134672
|
size = 'small',
|
|
136059
134673
|
loading = false,
|
|
136060
134674
|
labelWidth = 'auto',
|
|
136061
134675
|
labelPosition = 'top',
|
|
136062
134676
|
finishText = '保存',
|
|
136063
|
-
submitText = '
|
|
134677
|
+
submitText = '提交',
|
|
136064
134678
|
rejectText = '驳回',
|
|
136065
134679
|
cancelText = '取消',
|
|
136066
134680
|
action = [],
|
|
136067
|
-
...
|
|
134681
|
+
...rest
|
|
136068
134682
|
} = this.$attrs;
|
|
134683
|
+
let style = this.inline ? {
|
|
134684
|
+
margin: `0 -${this.gutter / 2}px`
|
|
134685
|
+
} : {};
|
|
136069
134686
|
let {
|
|
136070
134687
|
finish = null,
|
|
136071
134688
|
submit = null,
|
|
136072
134689
|
reject = null,
|
|
136073
134690
|
cancel = null
|
|
136074
134691
|
} = this.$listeners;
|
|
136075
|
-
let style = this.inline ? {
|
|
136076
|
-
margin: `0 -${this.gutter / 2}px`
|
|
136077
|
-
} : {};
|
|
136078
134692
|
let props = {
|
|
136079
134693
|
size,
|
|
136080
134694
|
inline: this.inline,
|
|
136081
134695
|
labelWidth,
|
|
136082
134696
|
labelPosition,
|
|
136083
134697
|
style,
|
|
136084
|
-
...
|
|
134698
|
+
...rest
|
|
136085
134699
|
};
|
|
136086
134700
|
return h("div", {
|
|
136087
134701
|
"class": "a-f-editor",
|
|
@@ -136101,12 +134715,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
136101
134715
|
"gutter": Number(this.gutter)
|
|
136102
134716
|
},
|
|
136103
134717
|
"class": "main-rows"
|
|
136104
|
-
}, [Object.keys(this.config).map((a, b) => this.create(a, b)), this.$slots.default]), (finish || submit || reject || cancel || action.length > 0) && h("
|
|
134718
|
+
}, [Object.keys(this.config).map((a, b) => this.create(a, b)), this.$slots.default]), (finish || submit || reject || cancel || action.length > 0) && h("div", {
|
|
134719
|
+
"class": "action"
|
|
134720
|
+
}, [h("el-form-item", {
|
|
136105
134721
|
"attrs": {
|
|
136106
134722
|
"name": "action",
|
|
136107
134723
|
"label": "action"
|
|
136108
|
-
}
|
|
136109
|
-
"class": "action"
|
|
134724
|
+
}
|
|
136110
134725
|
}, [finish && h("el-button", {
|
|
136111
134726
|
"attrs": {
|
|
136112
134727
|
"disabled": loading,
|
|
@@ -136139,12 +134754,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
136139
134754
|
"on": {
|
|
136140
134755
|
"click": this.cancel
|
|
136141
134756
|
}
|
|
136142
|
-
}, [cancelText]), action.
|
|
134757
|
+
}, [cancelText]), action.map((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
136143
134758
|
"key": b,
|
|
136144
134759
|
"attrs": {
|
|
136145
134760
|
"disabled": loading
|
|
134761
|
+
},
|
|
134762
|
+
"on": {
|
|
134763
|
+
"click": e => a.click(this.filter(), this.form, this.option, e)
|
|
136146
134764
|
}
|
|
136147
|
-
}, a]), [a.label || a.title || a.text || '']))])])]);
|
|
134765
|
+
}, a]), [a.label || a.title || a.text || '']))])])])]);
|
|
136148
134766
|
}
|
|
136149
134767
|
});
|
|
136150
134768
|
|
|
@@ -138259,6 +136877,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138259
136877
|
Apopconfirm: _components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"]
|
|
138260
136878
|
},
|
|
138261
136879
|
props: {
|
|
136880
|
+
id: {
|
|
136881
|
+
type: String,
|
|
136882
|
+
default: () => `id-a-table-${Math.random()}`
|
|
136883
|
+
},
|
|
138262
136884
|
margin: {
|
|
138263
136885
|
type: String,
|
|
138264
136886
|
default: () => '0'
|
|
@@ -138307,7 +136929,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138307
136929
|
type: Object,
|
|
138308
136930
|
default: () => ({})
|
|
138309
136931
|
},
|
|
138310
|
-
|
|
136932
|
+
height: {
|
|
138311
136933
|
type: String,
|
|
138312
136934
|
default: () => '480'
|
|
138313
136935
|
},
|
|
@@ -138347,10 +136969,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138347
136969
|
type: Boolean,
|
|
138348
136970
|
default: () => false
|
|
138349
136971
|
},
|
|
138350
|
-
sumText: {
|
|
138351
|
-
type: String,
|
|
138352
|
-
default: () => '合计'
|
|
138353
|
-
},
|
|
138354
136972
|
sortable: {
|
|
138355
136973
|
type: Boolean,
|
|
138356
136974
|
default: () => false
|
|
@@ -138382,16 +137000,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138382
137000
|
default: () => false
|
|
138383
137001
|
},
|
|
138384
137002
|
action: {
|
|
138385
|
-
type:
|
|
138386
|
-
default: () =>
|
|
138387
|
-
review: null,
|
|
138388
|
-
modify: null,
|
|
138389
|
-
update: null,
|
|
138390
|
-
handle: null,
|
|
138391
|
-
remove: null,
|
|
138392
|
-
delete: null,
|
|
138393
|
-
export: null
|
|
138394
|
-
})
|
|
137003
|
+
type: Array,
|
|
137004
|
+
default: () => []
|
|
138395
137005
|
},
|
|
138396
137006
|
actionWidth: {
|
|
138397
137007
|
type: String,
|
|
@@ -138405,26 +137015,26 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138405
137015
|
type: Boolean,
|
|
138406
137016
|
default: () => true
|
|
138407
137017
|
},
|
|
137018
|
+
pages: {
|
|
137019
|
+
type: Object,
|
|
137020
|
+
default: () => ({})
|
|
137021
|
+
},
|
|
138408
137022
|
page: {
|
|
138409
137023
|
type: Boolean,
|
|
138410
137024
|
default: () => true
|
|
138411
137025
|
}
|
|
138412
137026
|
},
|
|
137027
|
+
data() {
|
|
137028
|
+
return {
|
|
137029
|
+
maxHeight: this.height
|
|
137030
|
+
};
|
|
137031
|
+
},
|
|
138413
137032
|
mounted() {
|
|
138414
137033
|
this.$refs['a-table'].bodyWrapper.addEventListener('wheel', this.scroll);
|
|
138415
137034
|
},
|
|
138416
137035
|
beforeDestroy() {
|
|
138417
137036
|
this.$refs['a-table'].bodyWrapper.removeEventListener('wheel', this.scroll);
|
|
138418
137037
|
},
|
|
138419
|
-
destroyed() {
|
|
138420
|
-
this.create = null;
|
|
138421
|
-
this.search = null;
|
|
138422
|
-
this.select = null;
|
|
138423
|
-
this.choose = null;
|
|
138424
|
-
this.change = null;
|
|
138425
|
-
this.format = null;
|
|
138426
|
-
this.scroll = null;
|
|
138427
|
-
},
|
|
138428
137038
|
methods: {
|
|
138429
137039
|
create() {
|
|
138430
137040
|
let column = [...this.column, this.suffix()];
|
|
@@ -138457,7 +137067,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138457
137067
|
}
|
|
138458
137068
|
}, [h("template", {
|
|
138459
137069
|
"slot": "header"
|
|
138460
|
-
}, [header ? () => header(r) : label && label != '' && label.length
|
|
137070
|
+
}, [header ? () => header(r) : label && label != '' && label.length > 8 ? h("el-tooltip", {
|
|
138461
137071
|
"attrs": {
|
|
138462
137072
|
"content": label,
|
|
138463
137073
|
"placement": "top"
|
|
@@ -138475,70 +137085,45 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138475
137085
|
},
|
|
138476
137086
|
suffix() {
|
|
138477
137087
|
const h = this.$createElement;
|
|
138478
|
-
|
|
137088
|
+
const {
|
|
137089
|
+
review,
|
|
137090
|
+
modify,
|
|
137091
|
+
update,
|
|
137092
|
+
handle,
|
|
137093
|
+
remove
|
|
137094
|
+
} = this.$listeners;
|
|
137095
|
+
if (review || modify || update || handle || remove || this.$listeners.delete || this.$listeners.export || this.action.length > 0) {
|
|
138479
137096
|
return {
|
|
138480
137097
|
fixed: 'right',
|
|
138481
137098
|
align: 'center',
|
|
138482
137099
|
width: this.actionWidth,
|
|
138483
137100
|
label: this.actionTitle,
|
|
137101
|
+
showOverflowTooltip: false,
|
|
138484
137102
|
formatter: item => h("div", {
|
|
138485
137103
|
"class": "action"
|
|
138486
|
-
}, [
|
|
137104
|
+
}, [review && h("i", {
|
|
138487
137105
|
"class": "el-icon-view",
|
|
138488
137106
|
"on": {
|
|
138489
|
-
"click": () =>
|
|
137107
|
+
"click": () => review(item)
|
|
138490
137108
|
}
|
|
138491
|
-
}),
|
|
137109
|
+
}), modify && h("i", {
|
|
138492
137110
|
"class": "el-icon-edit",
|
|
138493
137111
|
"on": {
|
|
138494
|
-
"click": () =>
|
|
137112
|
+
"click": () => modify(item)
|
|
138495
137113
|
}
|
|
138496
|
-
}),
|
|
137114
|
+
}), update && h("i", {
|
|
138497
137115
|
"class": "el-icon-edit",
|
|
138498
137116
|
"on": {
|
|
138499
|
-
"click": () =>
|
|
137117
|
+
"click": () => update(item)
|
|
138500
137118
|
}
|
|
138501
|
-
}),
|
|
137119
|
+
}), handle && h("i", {
|
|
138502
137120
|
"class": "el-icon-edit",
|
|
138503
137121
|
"on": {
|
|
138504
|
-
"click": () =>
|
|
138505
|
-
}
|
|
138506
|
-
}), this.action.remove && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
|
|
138507
|
-
"on": {
|
|
138508
|
-
"submit": () => this.action.remove(item)
|
|
137122
|
+
"click": () => handle(item)
|
|
138509
137123
|
}
|
|
138510
|
-
}),
|
|
137124
|
+
}), remove && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
|
|
138511
137125
|
"on": {
|
|
138512
|
-
"submit": () =>
|
|
138513
|
-
}
|
|
138514
|
-
}), this.action.export && h("i", {
|
|
138515
|
-
"class": "el-icon-download",
|
|
138516
|
-
"on": {
|
|
138517
|
-
"click": () => this.action.export(item)
|
|
138518
|
-
}
|
|
138519
|
-
}), this.$listeners.review && h("i", {
|
|
138520
|
-
"class": "el-icon-view",
|
|
138521
|
-
"on": {
|
|
138522
|
-
"click": () => this.$listeners.review(item)
|
|
138523
|
-
}
|
|
138524
|
-
}), this.$listeners.modify && h("i", {
|
|
138525
|
-
"class": "el-icon-edit",
|
|
138526
|
-
"on": {
|
|
138527
|
-
"click": () => this.$listeners.modify(item)
|
|
138528
|
-
}
|
|
138529
|
-
}), this.$listeners.update && h("i", {
|
|
138530
|
-
"class": "el-icon-edit",
|
|
138531
|
-
"on": {
|
|
138532
|
-
"click": () => this.$listeners.update(item)
|
|
138533
|
-
}
|
|
138534
|
-
}), this.$listeners.handle && h("i", {
|
|
138535
|
-
"class": "el-icon-edit",
|
|
138536
|
-
"on": {
|
|
138537
|
-
"click": () => this.$listeners.handle(item)
|
|
138538
|
-
}
|
|
138539
|
-
}), this.$listeners.remove && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
|
|
138540
|
-
"on": {
|
|
138541
|
-
"submit": () => this.$listeners.remove(item)
|
|
137126
|
+
"submit": () => remove(item)
|
|
138542
137127
|
}
|
|
138543
137128
|
}), this.$listeners.delete && h(_components_Apopconfirm__WEBPACK_IMPORTED_MODULE_8__["default"], {
|
|
138544
137129
|
"on": {
|
|
@@ -138549,7 +137134,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138549
137134
|
"on": {
|
|
138550
137135
|
"click": () => this.$listeners.export(item)
|
|
138551
137136
|
}
|
|
138552
|
-
})
|
|
137137
|
+
}), this.action.map((a, b) => h("el-button", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
137138
|
+
"key": b,
|
|
137139
|
+
"on": {
|
|
137140
|
+
"click": e => a.click(item, e)
|
|
137141
|
+
}
|
|
137142
|
+
}, a]), [a.label || a.title || a.text]))])
|
|
138553
137143
|
};
|
|
138554
137144
|
}
|
|
138555
137145
|
},
|
|
@@ -138590,58 +137180,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138590
137180
|
this.$emit('change', pages);
|
|
138591
137181
|
this.search(pages);
|
|
138592
137182
|
},
|
|
138593
|
-
format({
|
|
138594
|
-
type = '',
|
|
138595
|
-
name = '',
|
|
138596
|
-
data = [],
|
|
138597
|
-
text = '',
|
|
138598
|
-
label = '',
|
|
138599
|
-
title = '',
|
|
138600
|
-
field = '',
|
|
138601
|
-
dicts = [],
|
|
138602
|
-
...props
|
|
138603
|
-
}, colIndex, item, rowIndex) {
|
|
137183
|
+
format(a, b, c, d) {
|
|
138604
137184
|
const h = this.$createElement;
|
|
138605
|
-
|
|
138606
|
-
if (field != '') return h(_components_Aenume__WEBPACK_IMPORTED_MODULE_3__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
138607
|
-
"key": colIndex + '-' + rowIndex,
|
|
138608
|
-
"attrs": {
|
|
138609
|
-
"field": field,
|
|
138610
|
-
"data": dicts.length > 0 ? dicts : data
|
|
138611
|
-
}
|
|
138612
|
-
}, props, {
|
|
138613
|
-
"model": {
|
|
138614
|
-
value: item[field],
|
|
138615
|
-
callback: $$v => {
|
|
138616
|
-
this.$set(item, field, $$v);
|
|
138617
|
-
}
|
|
138618
|
-
}
|
|
138619
|
-
}]));
|
|
138620
|
-
return h(_components_Aenume__WEBPACK_IMPORTED_MODULE_3__["default"], _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
138621
|
-
"key": colIndex + '-' + rowIndex,
|
|
138622
|
-
"attrs": {
|
|
138623
|
-
"field": name,
|
|
138624
|
-
"data": dicts.length > 0 ? dicts : data
|
|
138625
|
-
}
|
|
138626
|
-
}, props, {
|
|
138627
|
-
"model": {
|
|
138628
|
-
value: item[name],
|
|
138629
|
-
callback: $$v => {
|
|
138630
|
-
this.$set(item, name, $$v);
|
|
138631
|
-
}
|
|
138632
|
-
}
|
|
138633
|
-
}]));
|
|
138634
|
-
}
|
|
137185
|
+
let field = a.field || a.index || a.name || a.prop;
|
|
138635
137186
|
return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_6__["default"], {
|
|
138636
|
-
"key":
|
|
137187
|
+
"key": b + '-' + d,
|
|
138637
137188
|
"attrs": {
|
|
138638
137189
|
"config": {
|
|
138639
|
-
|
|
138640
|
-
|
|
138641
|
-
|
|
138642
|
-
field: field != '' ? field : name != '' ? name : '',
|
|
138643
|
-
label: text != '' ? text : label != '' ? label : title != '' ? title : '无栏目名称',
|
|
138644
|
-
...props
|
|
137190
|
+
form: c,
|
|
137191
|
+
field,
|
|
137192
|
+
...a
|
|
138645
137193
|
}
|
|
138646
137194
|
}
|
|
138647
137195
|
});
|
|
@@ -138664,9 +137212,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138664
137212
|
},
|
|
138665
137213
|
render() {
|
|
138666
137214
|
const h = arguments[0];
|
|
138667
|
-
const {
|
|
138668
|
-
...props
|
|
138669
|
-
} = this.$attrs;
|
|
138670
137215
|
const {
|
|
138671
137216
|
...r
|
|
138672
137217
|
} = this.record;
|
|
@@ -138676,34 +137221,34 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138676
137221
|
pageParams = {}
|
|
138677
137222
|
} = this.$store.state;
|
|
138678
137223
|
const {
|
|
138679
|
-
|
|
138680
|
-
} = this;
|
|
138681
|
-
const condition = data.length > 0;
|
|
137224
|
+
...props
|
|
137225
|
+
} = this.$attrs;
|
|
138682
137226
|
return h("div", {
|
|
138683
137227
|
"class": this.border ? 'a-table' : 'a-table border'
|
|
138684
137228
|
}, [h("el-table", {
|
|
138685
137229
|
"ref": "a-table",
|
|
138686
137230
|
"attrs": {
|
|
137231
|
+
"id": this.id,
|
|
138687
137232
|
"data": data,
|
|
138688
137233
|
"size": this.size,
|
|
138689
137234
|
"border": this.border,
|
|
138690
137235
|
"stripe": this.stripe,
|
|
138691
137236
|
"row-key": this.rowKey,
|
|
138692
137237
|
"max-height": this.maxHeight,
|
|
138693
|
-
"element-loading-text": this.elementLoadingText,
|
|
138694
|
-
"element-loading-spinner": this.elementLoadingSpinner,
|
|
138695
|
-
"element-loading-background": this.elementLoadingBackground,
|
|
138696
137238
|
"show-header": this.showHeader,
|
|
138697
137239
|
"default-sort": this.defaultSort,
|
|
138698
137240
|
"show-summary": this.showSummary,
|
|
138699
137241
|
"tooltip-effect": this.tooltipEffect,
|
|
138700
137242
|
"default-expand-all": this.defaultExpandAll,
|
|
138701
137243
|
"tree-props": this.tree ? this.treeProps : {},
|
|
138702
|
-
"highlight-current-row": this.highlightCurrentRow
|
|
137244
|
+
"highlight-current-row": this.highlightCurrentRow,
|
|
137245
|
+
"element-loading-text": this.elementLoadingText,
|
|
137246
|
+
"element-loading-spinner": this.elementLoadingSpinner,
|
|
137247
|
+
"element-loading-background": this.elementLoadingBackground
|
|
138703
137248
|
},
|
|
138704
137249
|
"directives": [{
|
|
138705
137250
|
name: "loading",
|
|
138706
|
-
value: loading
|
|
137251
|
+
value: this.loading
|
|
138707
137252
|
}],
|
|
138708
137253
|
"on": {
|
|
138709
137254
|
"row-click": this.choose,
|
|
@@ -138712,27 +137257,27 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138712
137257
|
"props": {
|
|
138713
137258
|
...props
|
|
138714
137259
|
}
|
|
138715
|
-
}, [
|
|
137260
|
+
}, [(this.selection || this.$listeners.select) && h("el-table-column", {
|
|
138716
137261
|
"attrs": {
|
|
138717
137262
|
"fixed": "left",
|
|
138718
137263
|
"type": "selection",
|
|
138719
137264
|
"width": this.selectionWidth
|
|
138720
137265
|
}
|
|
138721
|
-
}),
|
|
137266
|
+
}), this.sort && h("el-table-column", {
|
|
138722
137267
|
"attrs": {
|
|
138723
137268
|
"fixed": "left",
|
|
138724
137269
|
"type": "index",
|
|
138725
137270
|
"width": this.sortWidth,
|
|
138726
137271
|
"label": this.sortTitle
|
|
138727
137272
|
}
|
|
138728
|
-
}),
|
|
137273
|
+
}), this.create(), this.$slots.default, h("div", {
|
|
138729
137274
|
"slot": "empty",
|
|
138730
137275
|
"class": "empty"
|
|
138731
|
-
}, [!loading && h(_components_Aempty__WEBPACK_IMPORTED_MODULE_2__["default"], {
|
|
137276
|
+
}, [!this.loading && h(_components_Aempty__WEBPACK_IMPORTED_MODULE_2__["default"], {
|
|
138732
137277
|
"attrs": {
|
|
138733
137278
|
"description": this.emptyText
|
|
138734
137279
|
}
|
|
138735
|
-
})])]), !this.tree && this.page &&
|
|
137280
|
+
})])]), !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()([{
|
|
138736
137281
|
"attrs": {
|
|
138737
137282
|
"total": Number(size),
|
|
138738
137283
|
"pages": pageParams
|
|
@@ -138740,7 +137285,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
138740
137285
|
"on": {
|
|
138741
137286
|
"change": this.change
|
|
138742
137287
|
}
|
|
138743
|
-
}
|
|
137288
|
+
}, {
|
|
137289
|
+
"props": this.pages
|
|
137290
|
+
}]))]);
|
|
138744
137291
|
}
|
|
138745
137292
|
});
|
|
138746
137293
|
|
|
@@ -141192,361 +139739,6 @@ const Aecharts = a => Promise.resolve(/* AMD require */).then(function() { var _
|
|
|
141192
139739
|
|
|
141193
139740
|
/***/ }),
|
|
141194
139741
|
|
|
141195
|
-
/***/ "c0f0":
|
|
141196
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
141197
|
-
|
|
141198
|
-
"use strict";
|
|
141199
|
-
__webpack_require__.r(__webpack_exports__);
|
|
141200
|
-
/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("6aaa");
|
|
141201
|
-
/* harmony import */ var _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0__);
|
|
141202
|
-
/* harmony import */ var _components_AformItem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("2234");
|
|
141203
|
-
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("9e53");
|
|
141204
|
-
/* harmony import */ var _index_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_index_css__WEBPACK_IMPORTED_MODULE_2__);
|
|
141205
|
-
|
|
141206
|
-
|
|
141207
|
-
|
|
141208
|
-
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
141209
|
-
name: 'BfSearch',
|
|
141210
|
-
components: {
|
|
141211
|
-
AformItem: _components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"]
|
|
141212
|
-
},
|
|
141213
|
-
props: {
|
|
141214
|
-
value: {
|
|
141215
|
-
type: Object,
|
|
141216
|
-
default: () => ({})
|
|
141217
|
-
},
|
|
141218
|
-
margin: {
|
|
141219
|
-
type: String,
|
|
141220
|
-
default: () => '0'
|
|
141221
|
-
},
|
|
141222
|
-
size: {
|
|
141223
|
-
type: String,
|
|
141224
|
-
default: () => 'small'
|
|
141225
|
-
},
|
|
141226
|
-
inline: {
|
|
141227
|
-
type: Boolean,
|
|
141228
|
-
default: () => false
|
|
141229
|
-
},
|
|
141230
|
-
cols: {
|
|
141231
|
-
type: String,
|
|
141232
|
-
default: () => '6'
|
|
141233
|
-
},
|
|
141234
|
-
gutter: {
|
|
141235
|
-
type: String,
|
|
141236
|
-
default: () => '10'
|
|
141237
|
-
},
|
|
141238
|
-
labelWidth: {
|
|
141239
|
-
type: String,
|
|
141240
|
-
default: () => 'auto'
|
|
141241
|
-
},
|
|
141242
|
-
labelPosition: {
|
|
141243
|
-
type: String,
|
|
141244
|
-
default: () => 'top'
|
|
141245
|
-
},
|
|
141246
|
-
config: {
|
|
141247
|
-
type: Object,
|
|
141248
|
-
default: () => ({})
|
|
141249
|
-
},
|
|
141250
|
-
values: {
|
|
141251
|
-
type: Object,
|
|
141252
|
-
default: () => ({})
|
|
141253
|
-
},
|
|
141254
|
-
label: {
|
|
141255
|
-
type: Boolean,
|
|
141256
|
-
default: () => true
|
|
141257
|
-
},
|
|
141258
|
-
check: {
|
|
141259
|
-
type: Boolean,
|
|
141260
|
-
default: () => false
|
|
141261
|
-
},
|
|
141262
|
-
loading: {
|
|
141263
|
-
type: Boolean,
|
|
141264
|
-
default: () => false
|
|
141265
|
-
},
|
|
141266
|
-
submitText: {
|
|
141267
|
-
type: String,
|
|
141268
|
-
default: () => '搜索'
|
|
141269
|
-
},
|
|
141270
|
-
cancelText: {
|
|
141271
|
-
type: String,
|
|
141272
|
-
default: () => '重置'
|
|
141273
|
-
}
|
|
141274
|
-
},
|
|
141275
|
-
data() {
|
|
141276
|
-
return {
|
|
141277
|
-
form: this.value,
|
|
141278
|
-
height: 0,
|
|
141279
|
-
opened: false
|
|
141280
|
-
};
|
|
141281
|
-
},
|
|
141282
|
-
created() {
|
|
141283
|
-
this.create();
|
|
141284
|
-
},
|
|
141285
|
-
mounted() {
|
|
141286
|
-
this.update();
|
|
141287
|
-
},
|
|
141288
|
-
destroyed() {
|
|
141289
|
-
this.create = null;
|
|
141290
|
-
this.update = null;
|
|
141291
|
-
this.submit = null;
|
|
141292
|
-
this.cancel = null;
|
|
141293
|
-
this.filter = null;
|
|
141294
|
-
this.result = null;
|
|
141295
|
-
this.switch = null;
|
|
141296
|
-
this.format = null;
|
|
141297
|
-
this.output = null;
|
|
141298
|
-
},
|
|
141299
|
-
watch: {
|
|
141300
|
-
values() {
|
|
141301
|
-
this.create();
|
|
141302
|
-
}
|
|
141303
|
-
},
|
|
141304
|
-
methods: {
|
|
141305
|
-
create() {
|
|
141306
|
-
// 创建表单
|
|
141307
|
-
if (this.config && Object.keys(this.config).length > 0) {
|
|
141308
|
-
// 格式化表单配置对象(this.config)为数据双向绑定对象
|
|
141309
|
-
let data = {};
|
|
141310
|
-
Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
|
|
141311
|
-
let {
|
|
141312
|
-
...r
|
|
141313
|
-
} = this.config[a];
|
|
141314
|
-
if (!r.render) {
|
|
141315
|
-
let range = r.range || r.scope || r.both || r.than || null;
|
|
141316
|
-
if (range) {
|
|
141317
|
-
data[`${a}LE`] = '';
|
|
141318
|
-
data[`${a}GE`] = '';
|
|
141319
|
-
} else {
|
|
141320
|
-
data[a] = r.default ? r.default : '';
|
|
141321
|
-
}
|
|
141322
|
-
}
|
|
141323
|
-
});
|
|
141324
|
-
this.form = data;
|
|
141325
|
-
}
|
|
141326
|
-
},
|
|
141327
|
-
update() {
|
|
141328
|
-
let rows = Math.ceil(Object.keys(this.config).length / this.cols);
|
|
141329
|
-
this.height = this.$el.clientHeight * (rows - 1);
|
|
141330
|
-
},
|
|
141331
|
-
submit(e) {
|
|
141332
|
-
// 提交表单
|
|
141333
|
-
e && e.preventDefault();
|
|
141334
|
-
let pass = !this.check; // 判断是否是空表单
|
|
141335
|
-
for (let a in this.form) if (this.form[a] != '') pass = true;
|
|
141336
|
-
if (pass) {
|
|
141337
|
-
let result = this.filter();
|
|
141338
|
-
this.$nextTick(() => {
|
|
141339
|
-
this.$emit('submit', {
|
|
141340
|
-
...result,
|
|
141341
|
-
page: 1
|
|
141342
|
-
}); // 派发事件并重置当前分页
|
|
141343
|
-
return result;
|
|
141344
|
-
});
|
|
141345
|
-
}
|
|
141346
|
-
},
|
|
141347
|
-
cancel(e) {
|
|
141348
|
-
// 重置表单
|
|
141349
|
-
e && e.preventDefault();
|
|
141350
|
-
let pass = !this.check; // 判断是否是空表单
|
|
141351
|
-
for (let a in this.form) if (this.form[a] != '') pass = true;
|
|
141352
|
-
if (pass) {
|
|
141353
|
-
this.$nextTick(() => {
|
|
141354
|
-
for (let a in this.form) this.form[a] = '';
|
|
141355
|
-
this.$nextTick(() => this.$emit('cancel', this.form));
|
|
141356
|
-
});
|
|
141357
|
-
}
|
|
141358
|
-
},
|
|
141359
|
-
filter() {
|
|
141360
|
-
let data = {};
|
|
141361
|
-
Object.keys(this.config).length > 0 && Object.keys(this.config).forEach(a => {
|
|
141362
|
-
let {
|
|
141363
|
-
like = null,
|
|
141364
|
-
...r
|
|
141365
|
-
} = this.config[a];
|
|
141366
|
-
let range = r.range || r.scope || r.both || r.than || null;
|
|
141367
|
-
if (range) {
|
|
141368
|
-
this.form[`${a}LE`] != '' && (data[`${a}LE`] = this.form[`${a}LE`]);
|
|
141369
|
-
this.form[`${a}GE`] != '' && (data[`${a}GE`] = this.form[`${a}GE`]);
|
|
141370
|
-
} else {
|
|
141371
|
-
let value = this.form[a];
|
|
141372
|
-
if (value) {
|
|
141373
|
-
if (r.split && typeof r.split == 'object' && r.split.length > 0) {
|
|
141374
|
-
r.split.forEach((c, d) => data[c] = value != '' && typeof value == 'object' && value.length > 0 ? value[d] : value);
|
|
141375
|
-
} else {
|
|
141376
|
-
if (like) {
|
|
141377
|
-
if (like == 'left' || like && like == 'l') data[a] = '%' + value;
|
|
141378
|
-
if (like == 'right' || like && like == 'r') data[a] = value + '%';else data[a] = '%' + value + '%';
|
|
141379
|
-
} else {
|
|
141380
|
-
if (value.includes(' 00:00:00')) {
|
|
141381
|
-
data[a] = '%' + value.split(' 00:00:00')[0] + '%';
|
|
141382
|
-
} else {
|
|
141383
|
-
data[a] = value;
|
|
141384
|
-
}
|
|
141385
|
-
}
|
|
141386
|
-
}
|
|
141387
|
-
}
|
|
141388
|
-
}
|
|
141389
|
-
});
|
|
141390
|
-
let form = {};
|
|
141391
|
-
Object.keys(data).length > 0 && Object.keys(data).forEach(a => {
|
|
141392
|
-
if (data[a] != '%' && data[a] != '%%' && data[a] != 'null' && data[a] != 'undefined' && data[a] != null && data[a] != undefined) {
|
|
141393
|
-
form[a] = data[a];
|
|
141394
|
-
}
|
|
141395
|
-
});
|
|
141396
|
-
return form;
|
|
141397
|
-
},
|
|
141398
|
-
result() {
|
|
141399
|
-
return this.filter(this.form);
|
|
141400
|
-
},
|
|
141401
|
-
switch() {
|
|
141402
|
-
this.opened = !this.opened;
|
|
141403
|
-
},
|
|
141404
|
-
format(a = '', field = '', placeholder = '') {
|
|
141405
|
-
const h = this.$createElement;
|
|
141406
|
-
let {
|
|
141407
|
-
...r
|
|
141408
|
-
} = this.config[a];
|
|
141409
|
-
let config = {
|
|
141410
|
-
size: r.size ? r.size : this.size,
|
|
141411
|
-
field: field != '' ? field : a,
|
|
141412
|
-
change: () => this.change(),
|
|
141413
|
-
disabled: this.loading,
|
|
141414
|
-
form: this.form,
|
|
141415
|
-
...r
|
|
141416
|
-
};
|
|
141417
|
-
return h(_components_AformItem__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
141418
|
-
"attrs": {
|
|
141419
|
-
"config": placeholder != '' ? {
|
|
141420
|
-
...config,
|
|
141421
|
-
placeholder
|
|
141422
|
-
} : config
|
|
141423
|
-
}
|
|
141424
|
-
});
|
|
141425
|
-
},
|
|
141426
|
-
output(a, b) {
|
|
141427
|
-
const h = this.$createElement;
|
|
141428
|
-
let {
|
|
141429
|
-
...r
|
|
141430
|
-
} = this.config[a];
|
|
141431
|
-
let range = r.range || r.scope || r.both || r.than || null;
|
|
141432
|
-
let label = this.label ? r.text || r.label || r.title : '';
|
|
141433
|
-
let style = this.cols != '' ? {
|
|
141434
|
-
width: r.width ? r.width : `${100 / this.cols}%`
|
|
141435
|
-
} : {};
|
|
141436
|
-
let prefixPlaceholder = r.placeholder && r.placeholder.length > 0 ? r.placeholder[0] : '最高';
|
|
141437
|
-
let suffixPlaceholder = r.placeholder && r.placeholder.length > 1 ? r.placeholder[1] : '最低';
|
|
141438
|
-
return h("el-col", {
|
|
141439
|
-
"key": b,
|
|
141440
|
-
"style": style
|
|
141441
|
-
}, [h("el-form-item", {
|
|
141442
|
-
"attrs": {
|
|
141443
|
-
"prop": a,
|
|
141444
|
-
"label": label
|
|
141445
|
-
}
|
|
141446
|
-
}, [range ? h("el-col", {
|
|
141447
|
-
"class": "range-cols"
|
|
141448
|
-
}, [h("el-col", {
|
|
141449
|
-
"attrs": {
|
|
141450
|
-
"span": 12
|
|
141451
|
-
}
|
|
141452
|
-
}, [this.format(a, `${a}LE`, prefixPlaceholder)]), h("el-col", {
|
|
141453
|
-
"attrs": {
|
|
141454
|
-
"span": 12
|
|
141455
|
-
}
|
|
141456
|
-
}, [this.format(a, `${a}GE`, suffixPlaceholder)])]) : this.format(a)])]);
|
|
141457
|
-
},
|
|
141458
|
-
change() {
|
|
141459
|
-
this.$emit('input', this.filter());
|
|
141460
|
-
this.$emit('change', this.filter());
|
|
141461
|
-
}
|
|
141462
|
-
},
|
|
141463
|
-
render() {
|
|
141464
|
-
const h = arguments[0];
|
|
141465
|
-
const {
|
|
141466
|
-
...props
|
|
141467
|
-
} = this.$attrs;
|
|
141468
|
-
const {
|
|
141469
|
-
submit = null,
|
|
141470
|
-
cancel = null
|
|
141471
|
-
} = this.$listeners;
|
|
141472
|
-
return h("div", {
|
|
141473
|
-
"class": "b-f-search",
|
|
141474
|
-
"style": {
|
|
141475
|
-
padding: this.margin
|
|
141476
|
-
}
|
|
141477
|
-
}, [h("el-form", _vue_babel_helper_vue_jsx_merge_props__WEBPACK_IMPORTED_MODULE_0___default()([{
|
|
141478
|
-
"ref": "form",
|
|
141479
|
-
"attrs": {
|
|
141480
|
-
"size": this.size,
|
|
141481
|
-
"inline": this.inline
|
|
141482
|
-
}
|
|
141483
|
-
}, {
|
|
141484
|
-
"props": {
|
|
141485
|
-
model: this.form,
|
|
141486
|
-
...props
|
|
141487
|
-
}
|
|
141488
|
-
}, {
|
|
141489
|
-
"attrs": {
|
|
141490
|
-
"labelWidth": this.labelWidth,
|
|
141491
|
-
"labelPosition": this.labelPosition
|
|
141492
|
-
}
|
|
141493
|
-
}]), [h("div", {
|
|
141494
|
-
"class": "column"
|
|
141495
|
-
}, [h("el-row", {
|
|
141496
|
-
"attrs": {
|
|
141497
|
-
"gutter": Number(this.gutter)
|
|
141498
|
-
},
|
|
141499
|
-
"class": "main-rows"
|
|
141500
|
-
}, [Object.keys(this.config).map((a, b) => b < this.cols && this.output(a, b))]), h("el-row", {
|
|
141501
|
-
"attrs": {
|
|
141502
|
-
"gutter": Number(this.gutter)
|
|
141503
|
-
},
|
|
141504
|
-
"class": "fold-rows",
|
|
141505
|
-
"style": {
|
|
141506
|
-
height: this.opened ? `${this.height}px` : '0'
|
|
141507
|
-
}
|
|
141508
|
-
}, [Object.keys(this.config).map((a, b) => b > this.cols - 1 && this.output(a, b))])]), (Object.keys(this.config).length > this.cols || submit || cancel) && h("div", {
|
|
141509
|
-
"class": "action",
|
|
141510
|
-
"style": {
|
|
141511
|
-
paddingLeft: `${this.gutter}px`
|
|
141512
|
-
}
|
|
141513
|
-
}, [h("el-form-item", {
|
|
141514
|
-
"attrs": {
|
|
141515
|
-
"label": "action"
|
|
141516
|
-
}
|
|
141517
|
-
}, [Object.keys(this.config).length > this.cols && h("el-button", {
|
|
141518
|
-
"attrs": {
|
|
141519
|
-
"disabled": this.loading,
|
|
141520
|
-
"type": "text"
|
|
141521
|
-
},
|
|
141522
|
-
"class": "collapse-button",
|
|
141523
|
-
"on": {
|
|
141524
|
-
"click": this.switch
|
|
141525
|
-
}
|
|
141526
|
-
}, [h("i", {
|
|
141527
|
-
"class": `el-icon-arrow-${this.opened ? 'up' : 'down'}`
|
|
141528
|
-
}), this.opened ? '收起' : '展开']), submit && h("el-button", {
|
|
141529
|
-
"attrs": {
|
|
141530
|
-
"disabled": this.loading,
|
|
141531
|
-
"type": "primary"
|
|
141532
|
-
},
|
|
141533
|
-
"on": {
|
|
141534
|
-
"click": this.submit
|
|
141535
|
-
}
|
|
141536
|
-
}, [this.submitText]), cancel && h("el-button", {
|
|
141537
|
-
"attrs": {
|
|
141538
|
-
"disabled": this.loading,
|
|
141539
|
-
"type": "default"
|
|
141540
|
-
},
|
|
141541
|
-
"on": {
|
|
141542
|
-
"click": this.cancel
|
|
141543
|
-
}
|
|
141544
|
-
}, [this.cancelText])])])])]);
|
|
141545
|
-
}
|
|
141546
|
-
});
|
|
141547
|
-
|
|
141548
|
-
/***/ }),
|
|
141549
|
-
|
|
141550
139742
|
/***/ "c0f5":
|
|
141551
139743
|
/***/ (function(module, exports, __webpack_require__) {
|
|
141552
139744
|
|
|
@@ -153385,13 +151577,6 @@ module.exports = _default;
|
|
|
153385
151577
|
|
|
153386
151578
|
/***/ }),
|
|
153387
151579
|
|
|
153388
|
-
/***/ "d4f0":
|
|
153389
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
153390
|
-
|
|
153391
|
-
// extracted by mini-css-extract-plugin
|
|
153392
|
-
|
|
153393
|
-
/***/ }),
|
|
153394
|
-
|
|
153395
151580
|
/***/ "d4f3":
|
|
153396
151581
|
/***/ (function(module, exports) {
|
|
153397
151582
|
|
|
@@ -160982,7 +159167,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
160982
159167
|
},
|
|
160983
159168
|
height: {
|
|
160984
159169
|
type: String,
|
|
160985
|
-
default: () => '
|
|
159170
|
+
default: () => '68vh'
|
|
160986
159171
|
},
|
|
160987
159172
|
loading: {
|
|
160988
159173
|
type: Boolean,
|
|
@@ -169722,6 +167907,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
169722
167907
|
|
|
169723
167908
|
|
|
169724
167909
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
|
167910
|
+
name: 'BfSearch',
|
|
169725
167911
|
render() {
|
|
169726
167912
|
const h = arguments[0];
|
|
169727
167913
|
let {
|