|
|
@ -22,11 +22,16 @@ export const ListMixin = { |
|
|
|
// 查询分页列表
|
|
|
|
getList() { |
|
|
|
this.loading = true; |
|
|
|
for (let key in this.queryParams) { |
|
|
|
if(this.queryParams[key] == ''){ |
|
|
|
this.queryParams[key]=undefined |
|
|
|
} |
|
|
|
} |
|
|
|
get(this.queryTableDataUrl, { ...this.pagination, ...this.queryParams }) |
|
|
|
.then(({ code, data: { count = 0, records = [] } }) => { |
|
|
|
.then(({ code, data: { count = 0, records = [] } }) => { |
|
|
|
if (code === 200) { |
|
|
|
this.tableData = records |
|
|
|
this.pagination.total = count |
|
|
|
this.tableData = records |
|
|
|
this.pagination.total = count |
|
|
|
this.loading = false |
|
|
|
} else { |
|
|
|
this.loading = false |
|
|
@ -68,12 +73,12 @@ export const ListMixin = { |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
this.msgSuccess("删除成功"); |
|
|
|
if(this.tableData.length>=1 && this.pagination.pageNumber>1){ |
|
|
|
this.pagination.pageNumber -=1; |
|
|
|
if (this.tableData.length >= 1 && this.pagination.pageNumber > 1) { |
|
|
|
this.pagination.pageNumber -= 1; |
|
|
|
} |
|
|
|
this.getList(); |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
.catch(() => { }); |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |