فهرست منبع

Merge branch 'feature/work-test' of http://git.tjyourong.com.cn/ctop/adsp-vue into feature/work-test

朱鑫波 3 سال پیش
والد
کامیت
4c365fac5b
1فایلهای تغییر یافته به همراه10 افزوده شده و 1 حذف شده
  1. 10 1
      src/views/modules/stockWatch/modules/new-keepManage/group-keepManage.vue

+ 10 - 1
src/views/modules/stockWatch/modules/new-keepManage/group-keepManage.vue

@@ -350,7 +350,8 @@
         },
         filters: {
       formatDate: function (value) {
-        let date = new Date(value);
+        if (value) {
+            let date = new Date(value);
         let y = date.getFullYear();
         let MM = date.getMonth() + 1;
         MM = MM < 10 ? ('0' + MM) : MM;
@@ -363,6 +364,10 @@
         let s = date.getSeconds();
         s = s < 10 ? ('0' + s) : s;
         return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
+        }else{
+            return '-'
+        }
+        
       }
     },
         mounted() {
@@ -670,7 +675,11 @@
                           this.yesterdayList = res.result.yesterdayList.map((item)=>{
                            return item.totalCost
                           })
+                         
                           this.timeData = ['0:00', '2:00', '4:00', '6:00', '8:00', '10:00', '12:00','14:00','16:00','18:00','20:00','22:00'];
+                          this.timeData = res.result.yesterdayList.map((itemdate)=>{
+                            return itemdate.hour
+                        })
                           this.lengthData = ['today','yesterday'];
                          let consumptionSummary = [];
                           this.initEchart('accountIndexEchart',this.initAccountIndexEchart(this.todayList,this.yesterdayList,consumptionSummary,this.timeData,this.lengthData,this.yestadyNum))