<template>
    <div class="module-main">
        <div class="module-box">
            <div class="header">
                数据总览
            </div>
            <dv-scroll-board :config="config" style="width:100%;height:87%;overflow: hidden;" />
        </div>
    </div>

</template>

<script>
import Vue from 'vue';
import Component from 'vue-class-component';
import api from '../../api';

@Component({
    props: {
        data: {
            type: Object,
            default: null,
        },
    },
})
export default class Echarts extends Vue {
    config = {

    }

    created() {
        this.getPatrolRealTime();
        setInterval(() => {
            this.getPatrolRealTime();
        }, 5000 * 60);
    }

    getPatrolRealTime() {
        api.getPatrolRealTime({ mode: 1 }).then((res) => {
            this.config = {
                data: res.data,
                align: 'left',
                oddRowBGC: '#1D519C',
                evenRowBGC: '#2E73D1',
                rowNum: 6,
            };
        }).catch(() => {}).finally(() => {
        });
    }
}
</script>

<style scoped lang="scss">
    .module-box .header{
        width: 100%;
        height: 13.4%;
        font-size: 18px;
        font-family: Source Han Sans CN;
        // font-weight: bold;
        // color: #0BE2DF;
        display: flex;
        align-items: center;
        padding-left: 15px;
    }

</style>
