sort actionlist

This commit is contained in:
yuexin 2024-04-22 21:50:10 +08:00
parent 8bed0c5940
commit a894374fb5

View File

@ -863,12 +863,30 @@ export default {
} }
this.activityData = res.data.data; this.activityData = res.data.data;
this.baseTasks = res.data.data.baseTasks; this.baseTasks = res.data.data.baseTasks;
this.sortActionList();
}) })
.catch(err => { .catch(err => {
console.info(err); console.info(err);
}); });
}, },
async sortActionList() {
let overlst = []
let lst = []
this.activeList.forEach(item => {
if(item.status > 2){
overlst.push(item)
}else{
lst.push(item)
}
})
this.activeList.length = 0
this.activeList.push(...lst)
this.activeList.push(...overlst)
},
// //
async getProgress() { async getProgress() {
let { errcode, data } = await apiProgress(); let { errcode, data } = await apiProgress();
@ -884,6 +902,8 @@ export default {
stateMap.get(this.activeList[i].id) || 0 stateMap.get(this.activeList[i].id) || 0
); );
} }
this.sortActionList();
} }
}, },