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

    <el-form label-position="top" label-width="120px">
      <el-row class="el-row-table">
        <el-col :span="12">
          <el-form-item label="企业名称">
            <span v-if="detailInfo.enterpriseName">{{ detailInfo.enterpriseName }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="天然气城镇居民用量(万立方米)">
            <span v-if="detailInfo.fUrbanGasUsage">{{ detailInfo.fUrbanGasUsage }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="天然气农村气代煤居民用量(万立方米)">
            <span v-if="detailInfo.fRuralReplaceResidentsGasUsage">{{ detailInfo.fRuralReplaceResidentsGasUsage }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>


        <el-col :span="12">
          <el-form-item label="天然气农村非气代煤居民用量(万立方米)">
            <span v-if="detailInfo.fNoRuralReplaceResidentsGasUsage">{{ detailInfo.fNoRuralReplaceResidentsGasUsage }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="天然气工业用量(万立方米)">
            <span v-if="detailInfo.fIndustrialGasUsage">{{ detailInfo.fIndustrialGasUsage }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="天然气商业用量(万立方米)">
            <span v-if="detailInfo.fCommercialGasUsage">{{ detailInfo.fCommercialGasUsage }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="天然气公福用量(万立方米)">
            <span v-if="detailInfo.fPublicGasUsage">{{ detailInfo.fPublicGasUsage }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="天然气城市集中供热锅炉用量(万立方米)">
            <span v-if="detailInfo.fCityHeatingGasUasge">{{ detailInfo.fCityHeatingGasUasge }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="天然气汽车用户用量(万立方米)">
            <span v-if="detailInfo.fCarGasUsage">{{ detailInfo.fCarGasUsage }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="出售给其他燃气企业的天然气量(万立方米)">
            <span v-if="detailInfo.fSoldGasVolume">{{ detailInfo.fSoldGasVolume }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="天然气总气量(万立方米)">
            <span v-if="detailInfo.fGasUsage">{{ detailInfo.fGasUsage }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>


        <el-col :span="12">
          <el-form-item label="液化石油气城镇居民用量(万立方米)">
            <span v-if="detailInfo.fUrbanLpgUsage">{{ detailInfo.fUrbanLpgUsage }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="液化石油气农村居民用量(吨)">
            <span v-if="detailInfo.fRuralLpgUsage">{{ detailInfo.fRuralLpgUsage }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>


        <el-col :span="12">
          <el-form-item label="液化石油气工业用量(吨)">
            <span v-if="detailInfo.fIndustrialLpgUsage">{{ detailInfo.fIndustrialLpgUsage }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="液化石油气商业用量(吨)">
            <span v-if="detailInfo.fCommercialLpgUsage">{{ detailInfo.fCommercialLpgUsage }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>


        <el-col :span="12">
          <el-form-item label="液化石油气公福用量(吨)">
            <span v-if="detailInfo.fPublicLpgUsage">{{ detailInfo.fPublicLpgUsage }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="液化石油气汽车用户用量(吨)">
            <span v-if="detailInfo.fCarLpgUsage">{{ detailInfo.fCarLpgUsage }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>


        <el-col :span="12">
          <el-form-item label="出售或调拨给其他燃气企业液化石油气量(吨)">
            <span v-if="detailInfo.fSoldLpgVolume">{{ detailInfo.fSoldLpgVolume }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>


        <el-col :span="12">
          <el-form-item label="液化石油气总量(吨)">
            <span v-if="detailInfo.fLpgUsage">{{ detailInfo.fLpgUsage }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="企业端上报时间">
            <span v-if="detailInfo.fReportTime">{{ detailInfo.fReportTime }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12" v-if="-2 == $store.state.user.enterpriseId">
          <el-form-item label="政府端上报时间">
            <span v-if="detailInfo.fGovUploadTime">{{ detailInfo.fGovUploadTime }}</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.fUpdateTime">{{ detailInfo.fUpdateTime }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

      </el-row>

    </el-form>

  </el-dialog>

</template>

<script>
  import { getDay } from "@/api/supplybalance/day";
  export default {
    name: "detail-info",
    data(){
        return{
          detailInfo: {
            fDeleteFlag: 0
          },
          detailOpen: false
        }
    },
    methods:{
      getDetailInfo(id){
        getDay(id).then(res =>{
          if(res.code == 200 && res.data){
            this.detailInfo = res.data;
            this.detailOpen = true;
          }
        })
      }
    }
  }
</script>

<style scoped>

</style>
