分页和日期

This commit is contained in:
shijingjing
2022-08-18 13:49:16 +08:00
parent 583b210687
commit 8fbdee3a22
2 changed files with 10 additions and 8 deletions

View File

@@ -120,10 +120,10 @@ export default {
this.getDetail()
this.getIntegralChange()
this.getEventSummary()
let timeSta = dayjs().format('YYYY-MM-DD')
let timeEnd = dayjs().subtract(29, 'day').format('YYYY-MM-DD')
this.startPla = timeSta
this.endPla = timeEnd
let nowTime = dayjs().format('YYYY-MM-DD')
let timeAgo = dayjs().subtract(29, 'day').format('YYYY-MM-DD')
this.startPla = timeAgo
this.endPla = nowTime
})
},

View File

@@ -18,7 +18,7 @@
</ai-download>
</template>
</ai-search-bar>
<ai-table :tableData="tableData" :total="page.total" :current.sync="current" :size.sync="page.size"
<ai-table :tableData="tableData" :total="total" :current.sync="current" :size.sync="size"
@getList="getTableData()" :col-configs="colConfigs" :dict="dict" @sort-change="changeTableSort">
@@ -90,7 +90,8 @@ export default {
},
girdIdList: [],
tableData: [],
page: {size: 10, total: 0},
size: 10,
total: 0,
current: 1,
girdList: [],
form: {
@@ -144,14 +145,15 @@ export default {
getTableData() {
this.instance.post(`/app/appintegraluser/integralManager`,null,{
params: {
...this.page,
...this.search,
current: this.current,
size: this.size,
total: this.total
}
}).then(res => {
if(res?.data) {
this.tableData = res.data.records
this.page.total = res.data.total
this.total = res.data.total
}
})
},