<template>
    <div>
        <el-form ref="form" :inline="true" :model="form" label-width="80px">
            <el-form-item>
                <Timeinterval ref="Timeinterval" :interval="3" />
            </el-form-item>
            <el-form-item><el-button type="primary" icon="el-icon-search" @click="query">查询</el-button></el-form-item>
        </el-form>
        <div>
            <el-table
                stripe
                :data="tableData"
                border
                style="width: 100%; margin-bottom: 10px"
                height="150"
                header-cell-class-name="table_header"
                highlight-current-row
            >
                <el-table-column prop="name" label="名称" align="center"></el-table-column>
                <el-table-column prop="gs" label="事件个数" align="center"></el-table-column>
                <el-table-column prop="krr" label="可容忍" align="center"></el-table-column>
                <el-table-column prop="bkrr" label="不可容忍" align="center"></el-table-column>
            </el-table>
            <SEMI @eventId="eventId" ref="ITIC" @dataList="dataList" :item="item" />
        </div>
    </div>
</template>
<script>
import { getPlot } from '@/api/monitoringpointStatistics/echart'
import SEMI from '@/views/Event-boot/components/echarts/SEMI'
import Timeinterval from '@/views/components/TimePicker/index4'

export default {
    components: { Timeinterval, SEMI },
    props: {},
    data() {
        return {
            loading: true,
            form: {},
            tableData: [],
            vh: undefined,
            item: ['', ''],
            pointI: [],
            pointIun: [],
            pointF: [],
            pointFun: []
        }
    },
    created() {},
    mounted() {
        this.setHeight()
        window.addEventListener('resize', this.setHeight)
        this.item = this.$refs.Timeinterval.timeValue
        this.$emit('Loading', true)
        setTimeout(() => {
            this.$emit('Loading', false)
        }, 1500)
    },
    beforeDestroy() {
        window.removeEventListener('resize', this.setHeight)
    },
    methods: {
        setHeight() {
            this.vh = window.sessionStorage.getItem('appheight') - 660 + 'px'
        },
        dataList(e) {
            this.tableData = [e]
        },
        // 查询
        query() {
            this.$emit('Loading', true)
            this.item = this.$refs.Timeinterval.timeValue
            setTimeout(() => {
                this.$refs.ITIC.query()
                setTimeout(() => {
                    this.$emit('Loading', false)
                }, 1500)
            }, 0)
        },
        eventId(e) {
            this.$emit('BoXi', e)
        }
    },

    computed: {},

    watch: {}
}
</script>
<style lang="scss" scoped>
.el-form-item--small.el-form-item {
    margin-bottom: 0;
}
// ::v-deep .table_header {
//      height: 35px !important;
// }
</style>
