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

    <el-form label-width="130px">
      <el-row class="el-row-table">
        <el-col :span="12">
          <el-form-item label="任务名称">
            <span v-if="detailInfo.fName">{{ detailInfo.fName }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="对象分类">
            <span v-if="detailInfo.fObjectType">{{ $parent.fObjectTypeFormat(detailInfo) }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="检查表实例关联Id">
            <span v-if="detailInfo.fHazardCheckTableRecordId">{{ detailInfo.fHazardCheckTableRecordId }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="抽查要求">
            <span v-if="detailInfo.fSpotCheckType">{{ $parent.fSpotCheckTypeFormat(detailInfo) }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

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

        <el-col :span="12">
          <el-form-item label="城区标识">
            <span v-if="detailInfo.fSpecialFlag">{{ $parent.fSpecialFlagFormat(detailInfo) }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="此对象应检数据">
            <span v-if="detailInfo.fLotCount">{{ detailInfo.fLotCount }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="抽查细类">
            <span v-if="detailInfo.fSubobjecttypeCheckTypeDesc">{{ detailInfo.fSubobjecttypeCheckTypeDesc }}</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>-{{detailInfo.fDeleteFlag}}</span>
          </el-form-item>
        </el-col>

        <el-col :span="24">
          <el-form-item label="描述">
            <span v-if="detailInfo.fRemark">{{ detailInfo.fRemark }}</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/scope.js";
  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>
