<template>
  <el-dialog title="详情" :visible.sync="detailOpen" width="1000px" append-to-body destroy-on-close :close-on-click-modal="false">

    <el-form label-width="130px">
      <el-row class="el-row-table">
        <el-col :span="12">
          <el-form-item label="检查记录编码">
            <span v-if="detailInfo.fCheckCode">{{ detailInfo.fCheckCode }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="任务编码">
            <span v-if="detailInfo.fCheckTaskCode">{{ detailInfo.fCheckTaskCode }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="县级行政区ID">
            <span v-if="detailInfo.fRegionCode">{{ detailInfo.fRegionCode }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="检查对象分类">
            <span v-if="detailInfo.fObjectType">{{ detailInfo.fObjectType }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="对象编码">
            <span v-if="detailInfo.fObjectCode">{{ detailInfo.fObjectCode }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="检查人员id">
            <span v-if="detailInfo.fCheckUserId">{{ detailInfo.fCheckUserId }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="检查人员姓名">
            <span v-if="detailInfo.fCheckManName">{{ detailInfo.fCheckManName }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item>
            <span v-if="detailInfo.fCheckManPhone">{{ detailInfo.fCheckManPhone }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="检查时间">
            <span v-if="detailInfo.fCheckTime">{{ detailInfo.fCheckTime }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="隐患数量">
            <span v-if="detailInfo.fHazardsNum">{{ detailInfo.fHazardsNum }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="是否需执法">
            <span v-if="detailInfo.fDoscNeedExecute">{{ detailInfo.fDoscNeedExecute }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="描述">
            <span v-if="detailInfo.fRemark">{{ detailInfo.fRemark }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="修改时间">
            <span v-if="detailInfo.fLastUpdateTime">{{ detailInfo.fLastUpdateTime }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="24">
          <el-form-item label="检查单等照片">
            <el-image
              :src="detailInfo.fAnnex"
              :preview-src-list="[detailInfo.fAnnex]"
              v-if="detailInfo.fAnnex != '' && detailInfo.fAnnex != null"
              :z-index=5000
              style="width: 200px;height: 200px;"
            ></el-image>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

      </el-row>

    </el-form>

  </el-dialog>

</template>

<script>
  import { getInfor } from "@/api/supervision/record";
  export default {
    name: "detail-info",
    data(){
        return{
          detailInfo: {
            fDeleteFlag: 0
          },
          detailOpen: false
        }
    },
    methods:{
      getDetailInfo(id){
        getInfor(id).then(res =>{
          if(res.code == 200 && res.data){
            this.detailInfo = res.data;
            this.detailOpen = true;
          }
        })
      }
    }
  }
</script>

<style scoped>

</style>
