<template>
  <el-dialog title="检查记录详情" :visible.sync="detailOpen" width="1000px" append-to-body destroy-on-close :close-on-click-modal="false">
 
    <!-- 检查记录详情 -->
    <InspectInfo v-if="detailOpen" :detailInfo="detailInfo"/>

  
    <!-- 隐患管理 -->
    <Rectification :fCheckCode="detailInfo.fCheckCode" :readOnly="true" v-if="detailOpen"/>

    <el-divider content-position="left">上报时态</el-divider>
    <el-form label-width="140px">
      <el-row class="el-row-table"> 
          <el-col :span="12">
            <el-form-item label="上报时间">
              <span v-if="detailInfo.govUploadTime">{{ detailInfo.govUploadTime }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
      </el-row>
    </el-form>

  </el-dialog>

</template>

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

<style scoped>

</style>
