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

    <el-form label-width="120px">
      <el-row class="el-row-table">
        <el-col :span="12">
          <el-form-item label="隐患名称">
            <span v-if="detailInfo.fHazardName">{{ detailInfo.fHazardName }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="隐患编码">
            <span v-if="detailInfo.fHazardCode">{{ detailInfo.fHazardCode }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="隐患描述">
            <span v-if="detailInfo.fHazardDescribe">{{ detailInfo.fHazardDescribe }}</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.fHazardCategory">{{ $parent.fHazardCategoryFormat(detailInfo) }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="隐患环节/部位">
            <span v-if="detailInfo.fHazardLink">{{ detailInfo.fHazardLink }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="隐患等级">
            <span v-if="detailInfo.fHazardLevel">{{ detailInfo.fHazardLevel }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="隐患定义来源">
            <span v-if="detailInfo.fHazardDefinitionSourceCode">{{ detailInfo.fHazardDefinitionSourceCode }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="整改责任归属">
            <span v-if="detailInfo.fOwnerResponse">{{ detailInfo.fOwnerResponse }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="主管部门关联">
            <span v-if="detailInfo.fAdministrativeSysOrganizationId">{{ detailInfo.fAdministrativeSysOrganizationId }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="主管部门名称">
            <span v-if="detailInfo.fAdministrativeDepartmentName">{{ detailInfo.fAdministrativeDepartmentName }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="是否强制执法">
            <span v-if="detailInfo.fIsEnforcement">{{ $parent.fIsEnforcementFormat(detailInfo) }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="执法部门id">
            <span v-if="detailInfo.fEnforcementSysOrganizationId">{{ detailInfo.fEnforcementSysOrganizationId }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="执法部门名称">
            <span v-if="detailInfo.fEnforcementDepartmentName">{{ detailInfo.fEnforcementDepartmentName }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="整改监督部门">
            <span v-if="detailInfo.fSupervisionSysOrganizationId">{{ detailInfo.fSupervisionSysOrganizationId }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="整改部门名称">
            <span v-if="detailInfo.fSupervisionDepartmentName">{{ detailInfo.fSupervisionDepartmentName }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="整改要求">
            <span v-if="detailInfo.fRectRequire">{{ detailInfo.fRectRequire }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="整改期限">
            <span v-if="detailInfo.fRectDeadline">{{ detailInfo.fRectDeadline }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="隐患排查依据">
            <span v-if="detailInfo.fHazardCheckBasis">{{ detailInfo.fHazardCheckBasis }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="检查项ID">
            <span v-if="detailInfo.fCheckItemId">{{ detailInfo.fCheckItemId }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="检查部门">
            <span v-if="detailInfo.fCheckDept">{{ detailInfo.fCheckDept }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="检查方法">
            <span v-if="detailInfo.fCheckMethod">{{ detailInfo.fCheckMethod }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="执法参考依据">
            <span v-if="detailInfo.fEnforcementAccording">{{ detailInfo.fEnforcementAccording }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="删除标记">
            <span v-if="detailInfo.fDeleteFlag.toString()">{{ $parent.fDeleteFlagFormat(detailInfo) }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="创建时间">
            <span v-if="detailInfo.fCreateTime">{{ detailInfo.fCreateTime }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="创建人">
            <span v-if="detailInfo.fCreateBy">{{ detailInfo.fCreateBy }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

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

        <el-col :span="12">
          <el-form-item label="修改人">
            <span v-if="detailInfo.fModifyBy">{{ detailInfo.fModifyBy }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>
      </el-row>

    </el-form>

  </el-dialog>

</template>

<script>
  import { getInfor } from "@/api/supervision/hideType";
  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>
