Commit cd77655c by lixinming
parents e4af2680 7322d4b5
......@@ -72,8 +72,18 @@ export async function getQytlzdjs() {
let { enterpriseExitList } = data;
enterpriseExitList.sort( (a, b) => {
if ( !a.ratio ) a.ratio = Math.ceil((a.exitCount/a.autoMileage)*100/100);
if ( !b.ratio ) b.ratio = Math.ceil((b.exitCount/b.autoMileage)*100/100);
if ( !a.ratio ) {
a.ratio = Math.ceil((a.exitCount/a.autoMileage)*100/100);
if (a.exitCount == 0 || a.autoMileage == 0) {
a.ratio = 0;
}
}
if ( !b.ratio ) {
b.ratio = Math.ceil((b.exitCount/b.autoMileage)*100/100);
if (b.exitCount == 0 || b.autoMileage == 0) {
b.ratio = 0;
}
}
let aRatio = a.ratio;
let bRatio = b.ratio;
return bRatio - aRatio;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment