作业布置:列表排序修改
This commit is contained in:
parent
58988313b7
commit
ed035f94ed
|
@ -391,6 +391,10 @@ const getTaskList = async () => {
|
||||||
let model = [];
|
let model = [];
|
||||||
let mission = [];
|
let mission = [];
|
||||||
|
|
||||||
|
if(res.rows&&res.rows.length > 0){
|
||||||
|
// 根据创建时间 倒序排列一下
|
||||||
|
res.rows.sort((a, b) => new Date(b.timestamp) - new Date(a.timestamp));
|
||||||
|
}
|
||||||
for (let item of res.rows){
|
for (let item of res.rows){
|
||||||
item.taskconfig = [];
|
item.taskconfig = [];
|
||||||
|
|
||||||
|
@ -473,6 +477,7 @@ const getTaskList = async () => {
|
||||||
}
|
}
|
||||||
list.push(item);
|
list.push(item);
|
||||||
}
|
}
|
||||||
|
// 根据 父项、子项 创建时间倒序排列一下
|
||||||
taskList.value = list;
|
taskList.value = list;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue