<template>
  <div>
    <titlesection title="PDA"></titlesection>
    <totalsection :totalNum="totalVal"></totalsection>
    <bar-chart :chart-data="lineChartData" class="flexfm"/>
  </div>
</template>

<script>
import titlesection from '../components/titlesection'
import totalsection from '../components/total'
import barChart from '../components/barChart'
import {fetchList} from '../api/api'

const lineChartData = {
  newVisitis: {
    yData: [100, 120, 161],
    xData: ['正常', '异常', '故障']
  }
}

export default {
  name: 'pdasection',
  components: {
    titlesection,
    totalsection,
    barChart
  },
  data() {
    return {
      totalVal: '213734',
      lineChartData: lineChartData.newVisitis
    }
  },
  created() {
    this.getList()
  },
  methods: {
    getList() {
      fetchList()
        .then(res => {
          console.log(res);

        });
    },
  }
}
</script>

<style scoped>

</style>
