<template>
    <div class="app-container">
        <el-card>
  <bar-chart :chartData="admindata1" />
        </el-card>
        <el-row :gutter="6" style="margin-top:6px">
            <el-col :xs="24" :md="12">
        <el-card>
  <china-map :chartData="companydis" />
        </el-card>
            </el-col>
            <el-col :xs="24" :md="12">
        <el-card>
  <china-map :chartData="consumerdis" />
        </el-card>
            </el-col>
        </el-row>
        <el-card style="margin-top:6px">
  <line-chart :chartData="monidata" />
        </el-card>  
    </div>
</template>
<script>
import BarChart from '../components/BarChart'
import ChinaMap from '../components/ChinaMap'
import LineChart from '../components/LineChart'
import { getAdmindata1, getCompanydis, getConsumerdis, getMonitest } from '@/api/analyse'
export default {
    components:{BarChart, ChinaMap, LineChart},
    data(){
        return {
            admindata1:{},
            companydis:{},
            consumerdis:{},
            monidata:{}
        }
    },
    created(){
        this.getadmindata1()
        this.getcompanydis()
        this.getconsumerdis()
        this.getmonitest()
    },
    methods:{
        getadmindata1(){
            getAdmindata1().then(res=>{
                this.admindata1 = res.data
            })
        },
        getcompanydis(){
            getCompanydis().then(res=>{
                this.companydis = res.data
            })
        },
        getconsumerdis(){
            getConsumerdis().then(res=>{
                this.consumerdis = res.data
            })
        },
        getmonitest(){
            getMonitest().then(res=>{
                this.monidata = res.data
            })
        }
        
    }
}
</script>