修复生产监控分页和设备监控筛选
This commit is contained in:
@@ -169,9 +169,9 @@
|
||||
-->
|
||||
<div ref="footer" class="page-table__footer" v-if="pagination">
|
||||
<el-pagination
|
||||
:current-page="pagination.current"
|
||||
:page-size="pagination.size || 10"
|
||||
:total="pagination.total"
|
||||
:current-page="paginationCurrent"
|
||||
:page-size="paginationSize"
|
||||
:total="paginationTotal"
|
||||
:page-sizes="[10, 25, 50, 100, 250, 500]"
|
||||
:disabled="loading"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@@ -361,6 +361,21 @@ export default {
|
||||
return this.tableSelected.length
|
||||
},
|
||||
|
||||
paginationCurrent () {
|
||||
if (!this.pagination) return 1
|
||||
return Number(this.pagination.current || this.pagination.currentPage || 1)
|
||||
},
|
||||
|
||||
paginationSize () {
|
||||
if (!this.pagination) return 10
|
||||
return Number(this.pagination.size || this.pagination.pageSize || 10)
|
||||
},
|
||||
|
||||
paginationTotal () {
|
||||
if (!this.pagination) return 0
|
||||
return Number(this.pagination.total || 0)
|
||||
},
|
||||
|
||||
/**
|
||||
* 表头样式:浅灰背景 + 黑色加粗文字
|
||||
*/
|
||||
@@ -424,16 +439,20 @@ export default {
|
||||
onSizeChange (size) {
|
||||
this.$emit('page-change', {
|
||||
current: 1,
|
||||
currentPage: 1,
|
||||
size,
|
||||
total: this.pagination.total
|
||||
pageSize: size,
|
||||
total: this.paginationTotal
|
||||
})
|
||||
},
|
||||
|
||||
onCurrentChange (current) {
|
||||
this.$emit('page-change', {
|
||||
current,
|
||||
size: this.pagination.size,
|
||||
total: this.pagination.total
|
||||
currentPage: current,
|
||||
size: this.paginationSize,
|
||||
pageSize: this.paginationSize,
|
||||
total: this.paginationTotal
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user