Commit 04d47556 by 李伟康

增加loading

1 parent fcc3edae
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
<div <div
:key="cindex" :key="cindex"
class="group" class="group"
v-loading="c.loading"
> >
<div class="title"> <div class="title">
<div class="text flex"> <div class="text flex">
...@@ -199,18 +200,25 @@ export default { ...@@ -199,18 +200,25 @@ export default {
const stageList = this.stageList, const stageList = this.stageList,
arr = [], arr = [],
{ sopJourneyStage } = params { sopJourneyStage } = params
this.dataViewLoading = false
for (let k in stageList) { for (let k in stageList) {
if (stageList[k].value) { if (stageList[k].value) {
arr.push({ arr.push({
title: stageList[k].label, 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 params.sopJourneyStage = stageList[k].value
let list = [] let list = []
this.viewList = splitArrayIntoChunks(arr, 4)
if (!sopJourneyStage || sopJourneyStage == stageList[k].value) { if (!sopJourneyStage || sopJourneyStage == stageList[k].value) {
k != 0 && this.$set(this.pageNumber, k - 1, 1) k != 0 && this.$set(this.pageNumber, k - 1, 1)
this.dataViewLoading = false
const { list: apiList, total } = await this.$apis.journey.getCustomersList(params) const { list: apiList, total } = await this.$apis.journey.getCustomersList(params)
list = apiList list = apiList
k != 0 && this.$set(this.pageCount, k - 1, total) k != 0 && this.$set(this.pageCount, k - 1, total)
...@@ -221,12 +229,14 @@ export default { ...@@ -221,12 +229,14 @@ export default {
}) })
this.viewList.forEach(item => { this.viewList.forEach(item => {
item.forEach(e => { 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!