|
@@ -59,15 +59,6 @@ export default class Plan extends Vue {
|
|
|
this.getPlanList(this.currentPage)
|
|
|
}
|
|
|
|
|
|
- mounted () {
|
|
|
- if (this.currentPage <= 1) {
|
|
|
- this.disabledPrevBtn = true
|
|
|
- }
|
|
|
- if (this.currentPage > this.totalPageNum) {
|
|
|
- this.disabledNextBtn = true
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
// 获取plan列表数据
|
|
|
getPlanList (page:number) {
|
|
|
getBalanceRecordList({
|
|
@@ -79,7 +70,13 @@ export default class Plan extends Vue {
|
|
|
for (let i = 0; i < res.data.records.length; i++) {
|
|
|
this.tableData.push(res.data.records[i])
|
|
|
this.totalNum = res.data.total
|
|
|
- this.totalPageNum = Math.ceil((res.data.total + res.data.total % 8) / 8)
|
|
|
+ this.totalPageNum = Math.ceil(res.data.total / 8)
|
|
|
+ if (this.currentPage <= 1) {
|
|
|
+ this.disabledPrevBtn = true
|
|
|
+ }
|
|
|
+ if (this.currentPage >= this.totalPageNum) {
|
|
|
+ this.disabledNextBtn = true
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
this.$message.error('Failed to connect.')
|