<template>
  <el-dialog title="详情" :visible.sync="detailOpen" width="900px" 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.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.carNumber">{{ detailInfo.carNumber }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="代码">
            <span v-if="detailInfo.vehicleCode">{{ detailInfo.vehicleCode }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>


        <el-col :span="12">
          <el-form-item label="车牌">
            <span v-if="detailInfo.carNum">{{ detailInfo.carNum }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="品牌型号">
            <span v-if="detailInfo.brandModel">{{ detailInfo.brandModel }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="车辆类型">
            <span v-if="detailInfo.vehicleType == '1'">罐车</span>
            <span v-else-if="detailInfo.vehicleType == '2'">卡车</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="车辆载重">
            <span v-if="detailInfo.vehicleLoad">{{ detailInfo.vehicleLoad }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="车辆大小">
            <span v-if="detailInfo.vehicleSize">{{ detailInfo.vehicleSize }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>


        <el-col :span="12">
          <el-form-item label="车辆限乘">
            <span v-if="detailInfo.vehicleLimt">{{ detailInfo.vehicleLimt }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="车辆检查信息">
            <span v-if="detailInfo.vehicleInspect">{{ detailInfo.vehicleInspect }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="责任人">
            <span v-if="detailInfo.personLiable">{{ detailInfo.personLiable }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="使用状态">
            <span v-if="detailInfo.onState == '0'">未使用</span>
            <span v-else-if="detailInfo.onState == '1'">使用中</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="使用人">
            <span v-if="detailInfo.vehicleUser">{{ detailInfo.vehicleUser }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="联系电话">
            <span v-if="detailInfo.phone">{{ detailInfo.phone }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="是否删除">
            <span v-if="detailInfo.onState == '0'">正常</span>
            <span v-else-if="detailInfo.onState == '1'">删除</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="备注" prop="remarks">
            <span v-if="detailInfo.remarks">{{ detailInfo.remarks }}</span>
            <span v-else>-</span>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>


  </el-dialog>

</template>

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

<style scoped>

</style>
