Browse Source

车辆通行时间问题

wangtao 2 years ago
parent
commit
b5b31dfeae

+ 0 - 1
src/components3/tongxingguanli/lineE.vue

@@ -23,7 +23,6 @@ import * as echarts from 'echarts';
     watch: {
       resData(val,old){
         this.data = val
-        console.log(this.data)
         this.getData()
       }
     },

+ 8 - 5
src/components3/tongxingguanli/lineE2.vue

@@ -16,13 +16,16 @@ import * as echarts from 'echarts';
     props: ["resData"],
     data() {
       return {
-        data:[]
+        data:[],
+        time:null
       };
     },
 
     watch: {
       resData(val,old){
-        this.data = val
+        var myDate = new Date();
+        this.time = new Date().getHours() + 1
+        this.data = JSON.parse(JSON.stringify(val))
         this.getData()
       }
     },
@@ -47,7 +50,7 @@ import * as echarts from 'echarts';
           xAxis: {
             type: 'category',
             boundaryGap: false,
-            data: this.data[0],
+            data: this.data[0].splice(0,this.time),
             axisTick: {
               alignWithLabel: true
             },
@@ -99,7 +102,7 @@ import * as echarts from 'echarts';
               smooth: true,
               symbol:'circle',
               symbolSize:[6,6],
-              data: this.data[1]
+              data: this.data[1].splice(0,this.time)
             },
             {
               name: this.data[3][1],
@@ -108,7 +111,7 @@ import * as echarts from 'echarts';
               smooth: true,
               symbol:'circle',
               symbolSize:[6,6],
-              data: this.data[2]
+              data: this.data[2].splice(0,this.time)
             }
           ]
         };

+ 0 - 1
src/components3/zhihuibangong/pie2.vue

@@ -25,7 +25,6 @@ export default {
   },
   methods: {
     getData() {
-      console.log(this.data)
       if(getWeekDate() == "周六" || getWeekDate() == "周日"){
         this.data[0].value = 0
         this.data[1].value = 0

+ 0 - 1
src/components3/zhihuixuexi/index.vue

@@ -91,7 +91,6 @@ export default {
   },
   watch: {
     resInfo(val, old) {
-      console.log(val);
       this.data = val.data1;
       this.pieData = val.data2;
       this.pieData2 = val.data3;

+ 0 - 1
src/components3/zhihuixuexi/pie.vue

@@ -25,7 +25,6 @@ export default {
   methods: {
     getData() {
       let total = this.data[0].value + this.data[1].value + this.data[2].value + this.data[3].value + this.data[4].value
-      console.log(total)
       let myChart = echarts.init(document.getElementById("index8-1"));
       let option = {
         color: [