<template>
    <div class="smart_fire_risk_point" @click="navToDetail(data.hazardId)">
        <div class="top">
            <h4 class="title">{{data.deviceName}}</h4>
            <div class="status status-danger" v-if="data.handleState  == 0">
                未处理
            </div>
            <div class="status" v-else-if="data.handleState  == 1">
                已处理
            </div>
            <div class="status" v-else-if="data.handleState  == 2">
                已取消
            </div>
        </div>
        <p>设备编号：{{data.deviceId}}</p>
        <p>安装位置：{{data.installAddr}}</p>
        <p>预警类型：{{data.alarmTypeName}}</p>
        <p>预警说明：{{data.alarmContent}}</p>
        <p>预警时间：{{data.createdTime}}</p>
        <p>责任人：{{data.handleAName}}</p>

    </div>
</template>

<script>
    export default {
        name: "EleFire",
        props: ['data'],
        methods: {
            navToDetail(hazardId){
                this.$router.push({
                    path: '/smart_fire_risk_point_detail',
                    query:{
                        hazardId: hazardId
                    }
                })
            }
        }
    }
</script>

<style scoped>

</style>
<style lang="scss">
    .smart_fire_risk_point {
        margin-top: 20px;
        width: calc(100% - 30px);
        /*height: 270px;*/
        margin: 15px;
        border: 1px solid #ddd;
        background: #FFF;

        .top {
            overflow: hidden;
            height: 60px;
            line-height: 60px;
            padding: 0 15px;
            border-bottom: 1px solid #ddd;

            .title {
                /*padding-top: 15px;*/
                /*margin: 30px 0;*/
                font-size: 28px;
                font-weight: 600;
                color: #000;
                float: left;
            }

            .status {
                font-size: 20px;
                float: right;
                color: rgb(12, 110, 207);
            }

            .status-danger {
                color: #D7241F;
            }
        }


        p {
            color: #000;
            font-size: 20px;
            margin: 15px 0 15px;
            padding: 0 15px;
        }

        ul, li {
            list-style-type: none;
            padding: 0;
            margin: 0;
            overflow: hidden;
        }

        li {
            width: 33.333%;
            float: left;
            text-align: center;

            p {
                padding: 0;
                margin: 0;
            }
        }


    }
</style>