|
|
@@ -44,7 +44,7 @@ export default (app, option = {}) => {
|
|
|
'refresh-change': this.refreshChange,
|
|
|
'date-change': this.dateChange,
|
|
|
'search-change': this.searchChange,
|
|
|
- 'search-reset': this.searchChange
|
|
|
+ 'search-reset': this.searchReset
|
|
|
}
|
|
|
},
|
|
|
rowKey() {
|
|
|
@@ -176,24 +176,37 @@ export default (app, option = {}) => {
|
|
|
},
|
|
|
searchChange(params, done) {
|
|
|
if (done) done();
|
|
|
- if (this.validatenull(params)) {
|
|
|
- Object.keys(this.params).forEach(ele => {
|
|
|
- if (!['createTime_dategt', 'createTime_datelt', 'yearAndMonth', 'xmId'].includes(ele)) {
|
|
|
- delete this.params[ele];
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- Object.keys(params).forEach(ele => {
|
|
|
- if (this.validatenull(params[ele])) {
|
|
|
- delete this.params[ele];
|
|
|
- delete params[ele];
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ // if (this.validatenull(params)) {
|
|
|
+ // Object.keys(this.params).forEach(ele => {
|
|
|
+ // if (!['createTime_dategt', 'createTime_datelt', 'yearAndMonth', 'xmId'].includes(ele)) {
|
|
|
+ // delete this.params[ele];
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // } else {
|
|
|
+ // Object.keys(params).forEach(ele => {
|
|
|
+ // if (this.validatenull(params[ele])) {
|
|
|
+ // delete this.params[ele];
|
|
|
+ // delete params[ele];
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }
|
|
|
this.params = Object.assign(this.params, params);
|
|
|
this.page.currentPage = 1;
|
|
|
this.getList();
|
|
|
},
|
|
|
+ searchReset() {
|
|
|
+ this.params = {
|
|
|
+ createTime_dategt: this.params.createTime_dategt,
|
|
|
+ createTime_datelt: this.params.createTime_datelt,
|
|
|
+ yearAndMonth: this.params.yearAndMonth,
|
|
|
+ xmId: this.params.xmId
|
|
|
+ };
|
|
|
+ // Object.keys(this.params).forEach(ele => {
|
|
|
+ // if (!['createTime_dategt', 'createTime_datelt', 'yearAndMonth', 'xmId'].includes(ele)) {
|
|
|
+ // delete this.params[ele];
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ },
|
|
|
dateChange(date) {
|
|
|
if (date) {
|
|
|
this.params.createTime_dategt = date[0];
|