<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.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.fTypeCode">{{ $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.fContents">{{ detailInfo.fContents }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="结果填写类型">
            <span v-if="detailInfo.fResType">{{ $parent.fResTypeFormat(detailInfo) }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="结果填写选项">
            <span v-if="detailInfo.fResOption">{{ detailInfo.fResOption }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="顺序号">
            <span v-if="detailInfo.ord">{{ detailInfo.ord }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

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

    </el-form>

  </el-dialog>

</template>

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