diff --git a/src/views/ebiz/productionSay/statisticsItem.vue b/src/views/ebiz/productionSay/statisticsItem.vue index 88a0aeb5d..600b48e71 100644 --- a/src/views/ebiz/productionSay/statisticsItem.vue +++ b/src/views/ebiz/productionSay/statisticsItem.vue @@ -1,6 +1,17 @@ @@ -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 = '已经全部加载' + } + }) + } + } }