zhangdan 4 년 전
부모
커밋
56c0687f31
1개의 변경된 파일8개의 추가작업 그리고 8개의 파일을 삭제
  1. 8 8
      src/views/cleanManage/notCleanNetwork.vue

+ 8 - 8
src/views/cleanManage/notCleanNetwork.vue

@@ -357,14 +357,14 @@ export default {
       getCleanStationSum(params).then(res => {
         if (res.status == 200) {
           if (res.data) {
-            this.recyclableWasteTotal = (res.data.totalWeight / 1000).toFixed(2) || 0
-            this.wastePaper = (res.data.paper / 1000).toFixed(2) || 0
-            this.wasteClothes = (res.data.clothes / 1000).toFixed(2) || 0
-            this.wasteMetal = (res.data.metal / 1000).toFixed(2) || 0
-            this.wastePlastics = (res.data.plastic / 1000).toFixed(2) || 0
-            this.wasteMetalPlastic = (res.data.metPla / 1000).toFixed(2) || 0
-            this.wasteGlass = (res.data.glass / 1000).toFixed(2) || 0
-            this.recyclable = (res.data.recycling / 1000).toFixed(2) || 0
+            this.recyclableWasteTotal = res.data.totalWeight ? (res.data.totalWeight / 1000).toFixed(2) : '0.00'
+            this.wastePaper = res.data.paper ? (res.data.paper / 1000).toFixed(2) : '0.00'
+            this.wasteClothes = res.data.clothes ? (res.data.clothes / 1000).toFixed(2) : '0.00'
+            this.wasteMetal = res.data.metal ? (res.data.metal / 1000).toFixed(2) : '0.00'
+            this.wastePlastics = res.data.plastic ? (res.data.plastic / 1000).toFixed(2) : '0.00'
+            this.wasteMetalPlastic = res.data.plaMet ? (res.data.plaMet / 1000).toFixed(2) : '0.00'
+            this.wasteGlass = res.data.glass ? (res.data.glass / 1000).toFixed(2) : '0.00'
+            this.recyclable = res.data.recycling ? (res.data.recycling / 1000).toFixed(2) : '0.00'
           } else {
             this.recyclableWasteTotal = 0
             this.wasteClothes = 0