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

    <el-form label-width="140px">

      <el-row class="el-row-table">
        <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="检查项唯一编码">
            <span v-if="detailInfo.fUniqueCode">{{ detailInfo.fUniqueCode }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

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

        <el-col :span="12">
          <el-form-item label="检查对象分类">
            <span v-if="detailInfo.fCheckClassification">{{ $parent.fTypeCodeFormat(detailInfo) }}</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.fCheckCount">{{ detailInfo.fCheckCount }}</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.fEnableState.toString()">{{ $parent.fEnableStateFormat(detailInfo) }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

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

        <el-col :span="12">
          <el-form-item label="隐患分类分级标准">
            <span v-if="detailInfo.hazardName">{{ detailInfo.hazardName }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="删除标记" prop="fDeleteFlag">
            <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.fUpdateBy">{{ detailInfo.fUpdateBy }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>
      </el-row>

    </el-form>

  </el-dialog>

</template>

<script>
  import { getInfor } from "@/api/supervision/inspect";
  export default {
    name: "detail-info",
    data(){
        return{
          detailInfo: {
            fEnableState: 0,
            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>
