diff --git a/src/views/mealSurplusInformation/mealSurplusInformation.vue b/src/views/mealSurplusInformation/mealSurplusInformation.vue index b6ed2a6..d2ceadb 100644 --- a/src/views/mealSurplusInformation/mealSurplusInformation.vue +++ b/src/views/mealSurplusInformation/mealSurplusInformation.vue @@ -18,7 +18,7 @@ kg @@ -177,7 +177,7 @@ export default { if (item.marginWeight < item.dangerWeight) { item.class = "danger"; } - item.marginWeight_kg = item.marginWeight / 1000; + item.marginWeight_kg = Math.round(item.marginWeight / 10) / 100; item.progress = (1 - item.marginWeight / item.foodWeight) * 100 + '%'; }); this.nutritionFoodList = res.data.nutritionFoodList; @@ -187,7 +187,7 @@ export default { } if (res.data.recipeFoodProducedList && res.data.recipeFoodProducedList.length) { res.data.recipeFoodProducedList.map(item => { - item.foodWeight_kg = item.foodWeight / 1000; + item.foodWeight_kg = Math.round(item.foodWeight / 10) / 100; }); this.recipeFoodProducedList = res.data.recipeFoodProducedList; }