adjust task order
This commit is contained in:
parent
8173e5ec27
commit
741ffe245a
|
@ -86,6 +86,7 @@
|
|||
task.uploadSpeed = parseInt(task.uploadSpeed);
|
||||
task.downloadSpeed = parseInt(task.downloadSpeed);
|
||||
task.completePercent = (task.totalLength > 0 ? task.completedLength / task.totalLength * 100 : 0);
|
||||
task.remainPercent = 100 - task.completePercent;
|
||||
task.taskName = this.getTaskName(task);
|
||||
task.idle = task.downloadSpeed == 0;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
} else if (orderType.type == 'percent') {
|
||||
return orderByFilter(array, ['completePercent'], orderType.reverse);
|
||||
} else if (orderType.type == 'remain') {
|
||||
return orderByFilter(array, ['idle', 'remainTime'], orderType.reverse);
|
||||
return orderByFilter(array, ['idle', 'remainTime', 'remainPercent'], orderType.reverse);
|
||||
} else if (orderType.type == 'dspeed') {
|
||||
return orderByFilter(array, ['downloadSpeed'], orderType.reverse);
|
||||
} else {
|
||||
|
|
Reference in a new issue