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

    <el-form label-width="110px">
      <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.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.fTaskBelong">{{ detailInfo.fTaskBelong }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="任务类型">
            <span v-if="detailInfo.fTaskType">{{ $parent.fTaskTypeFormat(detailInfo) }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="是否下发">
            <span v-if="detailInfo.fDistributeFlag">{{ $parent.fDistributeFlagFormat(detailInfo) }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="24">
          <el-form-item label="任务说明">
            <span v-if="detailInfo.fDesc">{{ detailInfo.fDesc }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="任务开始时间">
            <span v-if="detailInfo.fStartTime">{{ detailInfo.fStartTime }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>


        <el-col :span="12">
          <el-form-item label="任务截至时间">
            <span v-if="detailInfo.fEndTime">{{ detailInfo.fEndTime }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="任务状态">
            <span v-if="detailInfo.fStatus">{{ $parent.fStatusFormat(detailInfo) }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="删除标记">
            <span v-if="detailInfo.fEndTime">{{ $parent.fDeleteFlagFormat(detailInfo) }}</span>
            <span v-else>-</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/task";
  export default {
    name: "detail-info",
    data(){
        return{
          detailInfo: {},
          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>
