<template>
    <div class="hidanger-list">
      <el-table
        :data="listData"
        height="600"
        style="width: 100%">
        <el-table-column
          type="index"
          min-width="80">
        </el-table-column>
        <el-table-column
          prop="imgUrl"
          label="现场照片"
          min-width="100">
          <template slot-scope="scope">
            <viewer v-if="scope.row.imgUrl.indexOf('http:') != -1">
              <img :src="scope.row.imgUrl" style="width: 50px;height: 50px;margin-top: 10px;cursor: pointer;object-fit: cover">
            </viewer>
            <viewer v-else>
              <img :src="baseUrl+scope.row.imgUrl" style="width: 50px;height: 50px;margin-top: 10px;cursor: pointer;">
            </viewer>
          </template>
        </el-table-column>
        <el-table-column
          prop="hdangerTitle"
          label="标题"
          min-width="100">
        </el-table-column>

        <el-table-column
          prop="hdangerLevelStr"
          label="等级"
          min-width="80">
        </el-table-column>
        <!--<el-table-column
          prop="hdangerLevel"
          label="等级"
          min-width="80">
          <template slot-scope="scope">
            <span v-if="scope.row.hdangerLevel == 1" >重大</span>
            <span v-if="scope.row.hdangerLevel == 2" >较大</span>
            <span v-if="scope.row.hdangerLevel == 3" >一般</span>
            <span v-if="scope.row.hdangerLevel == 4" >低  </span>
            &lt;!&ndash; <span>{{}}</span> &ndash;&gt;
          </template>

        </el-table-column>-->
        <el-table-column
          prop="groupName"
          label="所属部门"
          min-width="120">
        </el-table-column>
        <el-table-column
          prop="executor"
          label="当前责任人"
          min-width="120">
        </el-table-column>
        <el-table-column
          prop="status"
          label="状态"
          min-width="100">
          <template slot-scope="scope">
            <span v-if="scope.row.status==3">待验收</span>
            <span v-if="scope.row.status==2 || scope.row.status==5">待整改</span>
          </template>
        </el-table-column>
      </el-table>
    </div>
</template>

<script>
  import {mapState, mapGetters} from 'vuex'

  export default {
    name: "HiDangerList",
    data(){
      return {
          // baseUrl:this.$commons.baseUrl,
          baseUrl:this.$ip,
      }
    },
    props: ['listData'],
    computed:{
      ...mapState(['riskPointDetail']),
    },
    mounted() {
      // console.log('隐患····00010')
    }
  }
</script>

<style scoped>

</style>
