From ff5c2e5c2ad8c93f8018237e6f12ff122342d152 Mon Sep 17 00:00:00 2001 From: proudlx <965752348@qq.com> Date: Sun, 25 Apr 2021 13:08:49 +0800 Subject: [PATCH] =?UTF-8?q?'=E4=BA=A7=E8=AF=B4=E4=BC=9A=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E5=88=86=E9=A1=B5'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ebiz/productionSay/statisticsItem.vue | 71 +++++++++++++++++-- 1 file changed, 64 insertions(+), 7 deletions(-) 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 = '已经全部加载' + } + }) + } + } }