<template>
<div class='earlywarning-container'>
    <div class="title">火情预警信息</div>
    <div class="container">
        <div>
            <span>预警时间：{{ info.start_time }} </span>
            <span style="margin-left:50px;">预警位置：{{ info.detailed_address }}</span>
        </div>
        <div>现场图片： </div>
        <div class="image-container">
            <el-image 
                v-for="(item,index) in info.images" :key="index"
                style="width: 165px; height: 100px;margin-right:12px;"
                :src="item" 
                :preview-src-list="[item]">
            </el-image>
        </div>
    </div>
    <div class="operate">
        <el-button  type="warning" size="mini" @click="$emit('close')">关闭</el-button>
        <el-button type="primary" size="mini" @click="toPosition(info)" icon="el-icon-position">位置</el-button>
    </div>
</div>
</template>

<script>

export default {
   components: {},
   props:["info"],
   data() {
    return {
    
    };
   },
   computed: {},
   watch: {

   },
   methods: {
    toPosition(item){
        let lngLat = [item.longitude,item.latitude]
        window.globalmap.flyToPoint(lngLat,{radius:2000,"pitch":-90});
    }
   },
   created() {
   
   },
   mounted() {
   
   },
   destroyed() {
   
   },
}
</script>

<style scoped>
.earlywarning-container{
    width:100%;
    height:100%;
    background-image: url("/img/earlywarning.png");
    background-size:100% 100%;
}

.title{
    width:100%;
    height:50px;
    line-height:50px;
    text-indent:20px;
    font-size:18px;
    color:#fff;
    letter-spacing: 2px;
}

.container{
    width:100%;
    height: calc( 100% - 100px);
    padding:20px;
    color:#fff;
    line-height:40px;
    overflow:auto;
}

.operate{
    width:100%;
    height:50px;
    padding:0px 20px;
    text-align: right;
}

.image-container{
    width:100%;
}

.image-container img{
    width:140px;
    height:120px;
    margin-right:12px;
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-thumb {
  border: 0;
}

::-webkit-scrollbar {
  height: 10px;
  width: 10px;
  background: transparent;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  padding-top: 100px;
  -webkit-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25);
  background-color: rgba(0, 0, 0, 0.4);
  min-height: 28px;
  border-radius: 4px;
  background-clip: padding-box;
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-thumb {
  border: 0;
}

::-webkit-scrollbar-thumb:hover {
    -webkit-box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1),
    inset -1px -1px 0 rgba(0, 0, 0, 0.07);
  background-color: #797979;
}

::-webkit-scrollbar-thumb:active {
  -webkit-box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.35);
  background-color: rgba(0, 0, 0, 0.5);
}
</style>