'产说会查询详情分页'

This commit is contained in:
proudlx
2021-04-25 13:08:49 +08:00
parent 93d6f9e9e0
commit ff5c2e5c2a

View File

@@ -1,6 +1,17 @@
<template>
<div class="table">
<van-list
v-model="loading"
:immediate-check="false"
:finished="finished"
:finished-text="finishedText"
error-text="请求失败点击重新加载"
:error.sync="error"
@load="loadMore"
class="pb45"
>
<statisticalTable :theads="theads" :tableData="tableData" :isLink="false"></statisticalTable>
</van-list>
</div>
</template>
@@ -10,28 +21,74 @@ import statisticalTable from '@/components/ebiz/productionSay/statisticsTable'
export default {
name: 'statistics',
components: {
statisticalTable,
statisticalTable
},
data() {
return {
loading: false,
finished: false,
total: '', //总页数
currentPage: 1, //当前页数
error: false,
finishedText: '没有更多了',
pageSize: 10, //每页数据条数
tableData: [],
theads: ['机构', '计划场次', '预估人数', '预估保费', '实际场次', '实际人数', '预签保费'],
theads: ['机构', '计划场次', '预估人数', '预估保费', '实际场次', '实际人数', '预签保费']
}
},
created() {
if (this.$route.query.convokeOrganization) {
selectStatisticalByCon({convokeOrganization:this.$route.query.convokeOrganization}).then((res) => {
this.tableData = res.content.list
})
this.loadMore();
}
},
methods: {},
methods: {
// 加载列表
loadMore() {
console.log('加载表单')
let pageInfo = {
pageNum: this.currentPage, //当前页数
pageSize: this.pageSize, //当前页对应条数
convokeOrganization: this.$route.query.convokeOrganization
}
this.selectAllStatistical(pageInfo)
},
selectAllStatistical(data) {
this.$toast.loading({
// 持续展示 toast
duration: 0,
// 禁用背景点击
forbidClick: true,
loadingType: 'spinner',
message: '加载中……'
})
// selectStatisticalByCon(data).then((res) => {
// this.tableData = res.content.list
// })
selectStatisticalByCon(data).then((res) => {
if (res.result == 0) {
this.currentPage++
// this.saleList = this.saleList.concat(res.content.list)
this.tableData = this.tableData.concat(res.content.list)
this.loading = false
this.finished = false
if (res.content.nextPage == 0) {
this.finished = true
this.finishedText = '已经全部加载'
}
} else {
this.loading = false
this.finished = true
this.finishedText = '已经全部加载'
}
})
}
}
}
</script>
<style lang="scss" scoped>
.table {
overflow-x: auto;
// overflow-x: auto;
margin: 5px;
box-sizing: border-box;
background: #fff;