Commit 04d47556 by 李伟康

增加loading

1 parent fcc3edae
......@@ -25,6 +25,7 @@
<div
:key="cindex"
class="group"
v-loading="c.loading"
>
<div class="title">
<div class="text flex">
......@@ -199,18 +200,25 @@ export default {
const stageList = this.stageList,
arr = [],
{ sopJourneyStage } = params
this.dataViewLoading = false
for (let k in stageList) {
if (stageList[k].value) {
arr.push({
title: stageList[k].label,
list: null
list: [],
loading: true
})
this.viewList = splitArrayIntoChunks(arr, 4)
this.dataViewLoading = true
}
}
for (let k in stageList) {
if (stageList[k].value) {
params.sopJourneyStage = stageList[k].value
let list = []
this.viewList = splitArrayIntoChunks(arr, 4)
if (!sopJourneyStage || sopJourneyStage == stageList[k].value) {
k != 0 && this.$set(this.pageNumber, k - 1, 1)
this.dataViewLoading = false
const { list: apiList, total } = await this.$apis.journey.getCustomersList(params)
list = apiList
k != 0 && this.$set(this.pageCount, k - 1, total)
......@@ -221,12 +229,14 @@ export default {
})
this.viewList.forEach(item => {
item.forEach(e => {
if (!e.list && e.title === stageList[k].label) e.list = list || []
if (!e.list.length && e.title === stageList[k].label) {
e.list = list || []
e.loading = false
}
})
})
}
}
this.dataViewLoading = true
},
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!