Commit 899f92ef authored by Inner peace's avatar Inner peace

Merge remote-tracking branch 'origin/240806_pro_release' into 240806_pro_release

parents c29a46af 984d2638
...@@ -494,24 +494,24 @@ export default { ...@@ -494,24 +494,24 @@ export default {
var car=[]; var car=[];
let carPlan=this.formatNumber(plan.car); let carPlan=this.formatNumber(plan.car);
car.push(carPlan); car.push(this.switchZeroToNull(carPlan));
let carCompletion=this.formatNumber(complete.car); let carCompletion=this.formatNumber(complete.car);
car.push(carCompletion); car.push(this.switchZeroToNull(carCompletion));
car.push(this.formatNumber(remaining.car)); car.push(this.switchZeroToNull(this.formatNumber(remaining.car)));
this.carPlanRate=carPlan==0?100:Math.floor((100*carCompletion)/carPlan); this.carPlanRate=carPlan==0?100:Math.floor((100*carCompletion)/carPlan);
var ship=[]; var ship=[];
let shipPlan=this.formatNumber(plan.ship); let shipPlan=this.formatNumber(plan.ship);
ship.push(shipPlan); ship.push(this.switchZeroToNull(shipPlan));
let shipCompletion=this.formatNumber(complete.ship); let shipCompletion=this.formatNumber(complete.ship);
ship.push(shipCompletion); ship.push(this.switchZeroToNull(shipCompletion));
ship.push(this.formatNumber(remaining.ship)); ship.push(this.switchZeroToNull(this.formatNumber(remaining.ship)));
this.shipPlanRate=shipPlan==0?100:Math.floor((shipCompletion*100)/shipPlan); this.shipPlanRate=shipPlan==0?100:Math.floor((shipCompletion*100)/shipPlan);
var train=[]; var train=[];
let trainPlan=this.formatNumber(plan.train); let trainPlan=this.formatNumber(plan.train);
train.push(trainPlan); train.push(this.switchZeroToNull(trainPlan));
let trainCompletion=this.formatNumber(complete.train); let trainCompletion=this.formatNumber(complete.train);
train.push(trainCompletion); train.push(this.switchZeroToNull(trainCompletion));
train.push(this.formatNumber(remaining.train)); train.push(this.switchZeroToNull(this.formatNumber(remaining.train)));
this.trainPlanRate=trainPlan==0?100:Math.floor((100*trainCompletion)/trainPlan); this.trainPlanRate=trainPlan==0?100:Math.floor((100*trainCompletion)/trainPlan);
// 渲染 // 渲染
var seryCar=this.getcarShipTrainCss(); var seryCar=this.getcarShipTrainCss();
...@@ -550,6 +550,10 @@ export default { ...@@ -550,6 +550,10 @@ export default {
// 格式化保留两位小数,返回数字 // 格式化保留两位小数,返回数字
return Number(conver_num_retain(number).replaceAll(',','')); return Number(conver_num_retain(number).replaceAll(',',''));
}, },
// 为0时返回null
switchZeroToNull(number){
return number===0?null:number;
},
getcarShipTrainCss(){ getcarShipTrainCss(){
return { return {
type: 'bar', type: 'bar',
......
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