<template>

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

      <el-form label-width="180px">
        <el-row class="el-row-table">
          <el-col :span="12">
            <el-form-item label="登记证号">
              <span v-if="detailInfo.fRegCode">{{ detailInfo.fRegCode }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="钢印号(出厂编号)">
              <span v-if="detailInfo.fEquNo">{{ detailInfo.fEquNo }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="设备类型">
              <span v-if="detailInfo.fEquType">{{ detailInfo.fEquType }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="充装介质">
              <span v-if="detailInfo.fMedium">{{ detailInfo.fMedium }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="制造年月">
              <span v-if="detailInfo.fMakeDate">{{ detailInfo.fMakeDate }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="生产(制造)单位">
              <span v-if="detailInfo.fMakeInfo">{{ detailInfo.fMakeInfo }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="单位内编号">
              <span v-if="detailInfo.fSelfId">{{ detailInfo.fSelfId }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="公称工作压力(MPa)">
              <span v-if="detailInfo.fPressure">{{ detailInfo.fPressure}}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="容积(L)">
              <span v-if="detailInfo.fVolume">{{ detailInfo.fVolume}}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="使用单位">
              <span v-if="detailInfo.fBuildUser">{{ detailInfo.fBuildUser}}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="上检日期">
              <span v-if="detailInfo.fPChkDate">{{ detailInfo.fPChkDate }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="下检日期">
              <span v-if="detailInfo.fNChkDate">{{ detailInfo.fNChkDate }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="生产日期">
              <span v-if="detailInfo.fProductDate">{{ detailInfo.fProductDate }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="报废日期">
              <span v-if="detailInfo.fDiscardDate">{{ detailInfo.fDiscardDate }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="安全评定日期">
              <span v-if="detailInfo.fSafeJudgeDate">{{ detailInfo.fSafeJudgeDate }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="公称压力">
              <span v-if="detailInfo.fGPressure">{{ detailInfo.fGPressure }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="水试验压力">
              <span v-if="detailInfo.fWPressure">{{ detailInfo.fWPressure }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="标准重量">
              <span v-if="detailInfo.fSelfWeight">{{ detailInfo.fSelfWeight }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="壁厚">
              <span v-if="detailInfo.fThickness">{{ detailInfo.fThickness }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="气瓶许可证号">
              <span v-if="detailInfo.fPermitNo">{{ detailInfo.fPermitNo }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="阀类型名称">
              <span v-if="detailInfo.fValveName">{{ detailInfo.fValveName }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="钢瓶交付文件照片">
                <el-image
                :src="detailInfo.fPayImage"
                :preview-src-list="[detailInfo.fPayImage]"
                v-if="detailInfo.fPayImage != '' && detailInfo.fPayImage != null"
                :z-index=5000
                style="width: 200px;height: 200px;"
                ></el-image>
                <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="检验质量证明书照片">
              <el-image
                :src="detailInfo.fBatchImage"
                :preview-src-list="[detailInfo.fBatchImage]"
                v-if="detailInfo.fBatchImage != '' && detailInfo.fBatchImage != null"
                :z-index=5000
                style="width: 200px;height: 200px;"
                ></el-image>
                <span v-else>-</span>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="制造监督检验证书照片">
              <el-image
                :src="detailInfo.fDeviceImage"
                :preview-src-list="[detailInfo.fDeviceImage]"
                v-if="detailInfo.fDeviceImage != '' && detailInfo.fDeviceImage != null"
                :z-index=5000
                style="width: 200px;height: 200px;"
                ></el-image>
                <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="检验报告照片">
              <el-image
                :src="detailInfo.fCheckImage"
                :preview-src-list="[detailInfo.fCheckImage]"
                v-if="detailInfo.fCheckImage != '' && detailInfo.fCheckImage != null"
                :z-index=5000
                style="width: 200px;height: 200px;"
                ></el-image>
                <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="产品编号照片">
              <el-image
                :src="detailInfo.fEquNoImage"
                :preview-src-list="[detailInfo.fEquNoImage]"
                v-if="detailInfo.fEquNoImage != '' && detailInfo.fEquNoImage != null"
                :z-index=5000
                style="width: 200px;height: 200px;"
                ></el-image>
                <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="单位内编号照片">
              <el-image
                :src="detailInfo.fSelfIdImage"
                :preview-src-list="[detailInfo.fSelfIdImage]"
                v-if="detailInfo.fSelfIdImage != '' && detailInfo.fSelfIdImage != null"
                :z-index=5000
                style="width: 200px;height: 200px;"
                ></el-image>
                <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="钢瓶信息照片">
              <el-image
                :src="detailInfo.fBotImage"
                :preview-src-list="[detailInfo.fBotImage]"
                v-if="detailInfo.fBotImage != '' && detailInfo.fBotImage != null"
                :z-index=5000
                style="width: 200px;height: 200px;"
                ></el-image>
                <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="钢瓶规格名称">
              <span v-if="detailInfo.fBotSpecName">{{ detailInfo.fBotSpecName }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="钢瓶型号">
              <span v-if="detailInfo.fBottleType">{{ detailInfo.fBottleType }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="已检验次数">
              <span v-if="detailInfo.fInspectedTimes">{{ detailInfo.fInspectedTimes }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="是否专用">
              <span v-if="detailInfo.fIsSpecialized">{{detailInfo.fIsSpecialized}}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="阀厂家">
              <span v-if="detailInfo.fValveManuFacturer">{{ detailInfo.fValveManuFacturer }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="检验标牌">
              <span v-if="detailInfo.fInspectionLabel">{{ detailInfo.fInspectionLabel }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="第三方标签">
              <span v-if="detailInfo.fThirdPartyLabel">{{ detailInfo.fThirdPartyLabel }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="孔洞码">
              <span v-if="detailInfo.fHoleCode">{{ detailInfo.fHoleCode }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="存储类型">
              <span v-if="detailInfo.fBottleStorageType">{{ detailInfo.fBottleStorageType }}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="状态">
              <span v-if="detailInfo.fState">{{ detailInfo.fState}}</span>
              <span v-else>-</span>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </el-dialog>
  </template>

  <script>
  import { getFiles } from "@/api/lpgRegulation/files";
    export default {
      name: "lpg-gasbottlefiles-info",
      data(){
        return{
            detailInfo:{
                fImageList:[]
            },
            detailOpen: false
        }
      },
      computed: {
            fImageListSplitAfter() {
                return this.detailInfo.fImageList.split(',');
            },
        },
      created(){

      },
      methods:{
        getDetailInfo(id){
            getFiles(id).then(res =>{
            if(res.code == 200 && res.data){
                this.detailInfo = res.data;
                this.detailOpen = true;
            }
            })
        },
      }
    }
  </script>

  <style scoped>

  </style>
