<template>
  <div class="wrap">
    <van-sticky offset-top="0">
      <LHeader :text="text"></LHeader>
    </van-sticky>
  </div>
</template>

<script type="text/ecmascript-6">
  import LHeader from "@/components/header.vue";
  import * as echarts from "echarts";

  export default {
    name: 'patrolStatistics', //巡查统计
    components: {
      LHeader,
    },
    props: {
      
    },
    data() {
      return {
        text:'巡查统计',
      }
    },
    computed: {
       
    },
    watch: {
     
    },
    created(){
     
    },
    mounted() {
     
    },
    methods: {
     myEcharts(data) {
        var xData=[]
        var seriesData=[]
        data.forEach((i)=>{
            xData.push(i.date)
            seriesData.push(i.hdNumber)
        })
        var myChart = echarts.init(document.getElementById("box"));
        //配置图表
        var option = {
            xAxis: {
                type: "category",
                data: xData
            },
            yAxis: {
                type: "value"
            },
            dataZoom: [
                {
                    type: 'inside',
                    start: 0,
                    end: 20
                },
                {
                    start: 0,
                    end: 20
                }
            ],
            series: [
                {
                    data: seriesData,
                    type: "line"
                }
            ]
        };
        myChart.setOption(option);
      }
    },
}
</script>

<style scoped lang='less'>
.wrap {
  height: 100vh;
  width: 100vw;
}
</style>
