<template>
  <div class="box">
      <div class="news">
          <p class="title">
              {{reportList.address}}上报了一条火情线索
              <!-- <el-button size="mini" type="warning" style="" icon="el-icon-position" >查看</el-button> -->
          </p>
          <p class="desc">
              <span>&nbsp;{{reportList.describe ? reportList.describe : '  '}}</span>
              <span class="time">{{reportList.reportTime}}</span>
          </p>
          <p style="font-size:12px;text-align:right;color:#fff;cursor:pointer;">
              <span @click="getAllReportList">查看全部上报>></span>
          </p>
      </div>
  </div>
</template>

<script>
import axios from 'axios'
  export default {
    name: 'reportbox',
    props:['globalmap'],
    data(){
        return {
            reportList:{},
            listQuery:{
               areaName:"feixian",
            },
        }
    },
    created(){
        this.getList();
    },
    methods:{
        getAllReportList(){
            this.$emit("getAllReportList");
        },
        getList(){
            axios({
                method:"get",
                url:"http://123.132.248.154:9224/api/FireManagement/LoadFireClueInfoByState",
                params:this.listQuery,
                headers:{
                    'X-Token':localStorage.getItem("X-Token")
                }
            }).then(res=>{
                if(res.data.code == 200){
                    this.list = res.data.data;
                    this.reportList = this.list[0]
                    this.list.forEach((item,index)=>{
                        this.list[index].check = false;
                    })
                }
            })
        }
    }
  }
</script>

<style scoped>
  .box{
      width:100%;
      height:100%;
      background-image: url(/img/uav-bg.png);
      background-size:100% 100%;
      padding:20px 20px;
  }

  .news{
      width:100%;
      line-height:20px;
      text-align:left;
      color:#ccc;
  }

  .news .title{
      line-height:20px;
      height:40px;
      overflow: hidden;
      margin-top:10px;
      font-weight: bold;
      color:aquamarine;
  }

  .news .desc{
      font-size:12px;
  }

  .news .time{
      float:right;
  }
</style>