Commit 2302cbac by 杨明

分页

1 parent ad21d4e5
...@@ -135,15 +135,14 @@ export default { ...@@ -135,15 +135,14 @@ export default {
methods: { methods: {
// 下拉加载 // 下拉加载
async infiniteLoad (cindex, index) { async infiniteLoad (cindex, index) {
// console.log(this.pageCount, this.pageNumber)
if (this.viewList[index][cindex].list.length == 0) return if (this.viewList[index][cindex].list.length == 0) return
if (this.viewList[index][cindex].list.length == this.pageCount[cindex]) return if (this.viewList[index][cindex].list.length == this.pageCount[cindex]) return
this.pageNumber[cindex]++ this.pageNumber[cindex]++
const params = { const params = {
...JSON.parse(JSON.stringify(this.params)), ...this.$common.utils.deepClone(this.params),
pageSize: 10, pageSize: 10,
pageNumber: this.pageNumber[cindex], pageNumber: this.pageNumber[cindex],
sopJourneyStage: this.stageList[cindex].value sopJourneyStage: this.stageList[cindex+1].value
} }
let { list } = await this.$apis.journey.getCustomersList(params) let { list } = await this.$apis.journey.getCustomersList(params)
list.length && list.length &&
...@@ -165,7 +164,7 @@ export default { ...@@ -165,7 +164,7 @@ export default {
}, []) }, [])
} }
const params = { const params = {
...JSON.parse(JSON.stringify(this.params)), ...this.$common.utils.deepClone(this.params),
pageSize: 10, pageSize: 10,
pageNumber: 1 pageNumber: 1
} }
...@@ -192,6 +191,7 @@ export default { ...@@ -192,6 +191,7 @@ export default {
k != 0 && this.$set(this.pageNumber, k - 1, 1) k != 0 && this.$set(this.pageNumber, k - 1, 1)
const { list: apiList, total } = await this.$apis.journey.getCustomersList(params) const { list: apiList, total } = await this.$apis.journey.getCustomersList(params)
console.log(total,'total')
list = apiList list = apiList
k != 0 && this.$set(this.pageCount, k - 1, total) k != 0 && this.$set(this.pageCount, k - 1, total)
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!