<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-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>
