<template>
    <div class="pa10">
        <el-tabs type="border-card" v-model="activeName" @tab-click="handleClick" style="height: calc(100vh - 20px)">
            <el-tab-pane label="监测点数据查询" name="first">
                <onlineData></onlineData>
            </el-tab-pane>
            <el-tab-pane label="监测点台账信息" name="second">
                <devicemessage></devicemessage>
            </el-tab-pane>
            <el-tab-pane label="终端台账信息" name="third">
                <terminalmessage></terminalmessage>
            </el-tab-pane>
            <el-tab-pane label="数据完整性统计" name="sen">
                <integralitytable></integralitytable>
            </el-tab-pane>
        </el-tabs>
    </div>
</template>
<script>
import onlineData from '@/views/cgy-harmonic-boot/monitor/onlineData'
import terminalmessage from '@/views/cgy-harmonic-boot/runmange/terminalmessage'
import devicemessage from '@/views/cgy-harmonic-boot/runmange/devicemessage'
import integralitytable from '@/views/cgy-harmonic-boot/area/integralitytable'
import api1 from '@/api/pollution/pollution'
export default {
    components: {
        onlineData,
        devicemessage,
        terminalmessage,
        integralitytable
    },
    data() {
        return {
            activeName: 'first',
            vh: null
        }
    },
    created() {
        if (process.env.VUE_APP_MODE === 'cgyqr') {
            if (process.env.VUE_APP_KEY != 'scqr') {
                this.guanzhou()
            }
        }
    },
    mounted() {
        this.vh = window.sessionStorage.getItem('appheight') - 12 + 'px'
    },
    methods: {
        guanzhou() {
            var data = {
                token: this.$route.query.token
            }
            api1.guanzhou(data).then(res => {
                if (res.code == 'A0000') {
                    return
                } else {
                    this.$router.push('/error/massege/403')
                }
            })
        },
        handleClick(tab, event) {
            // console.log(tab, event);
            this.activeName = tab.name
        }
    }
}
</script>
<style lang="less" scoped>
.pa10 {
    padding: 10px;
}
::v-deep .el-tabs--border-card > .el-tabs__content {
    padding: 10px;
}
</style>
