<template>
  <el-dialog title="详情" :visible.sync="detailOpen" width="1200px" append-to-body destroy-on-close :close-on-click-modal="false">
    <!-- 任务详情 -->
    <TaskInfo v-if="detailOpen" :detailInfo="detailInfo"/>

    <!-- 检查范围 -->
    <Scope v-if="detailOpen" :fHazardCheckTaskId="detailInfo.fInsTaskInforId"/>

    <!-- 检查项 -->
    <Inspect v-if="detailOpen" :fCheckTaskCode="detailInfo.fUniqueCode"/>

    <!-- 调查项 -->
    <Survey v-if="detailOpen" :fCheckTaskCode="detailInfo.fUniqueCode"/>

  </el-dialog>

</template>

<script>
  import { getInfor } from "@/api/supervision/task";
  import TaskInfo from "./TaskInfo";
  import Scope from "./Scope";
  import Inspect from "./Inspect";
  import Survey from "./Survey";
  export default {
    name: "detail-info",
    components:{
      TaskInfo,
      Scope,
      Inspect,
      Survey
    },
    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>
