<template>
  <el-card v-if="info">
    <div slot="header" class="clearfix">
      <div class="fl">
        {{ `设备号：${info.deviceCode}` }}
      </div>
      <div class="fr">
        <el-button @click="getInfo">刷新</el-button>
      </div>
    </div>
    <el-descriptions border label-style="width:90px" :column="4" >
      <el-descriptions-item label="维修号">{{ info.id }}</el-descriptions-item>
      <el-descriptions-item label="状态"><el-tag :type="info.finishFlag?'success':'warning'">{{
          info.finishFlag ? '已完成' : '未完成'
        }}</el-tag></el-descriptions-item>
      <el-descriptions-item label="名称">{{ info.productName }}</el-descriptions-item>
      <el-descriptions-item label="规格">{{ info.ggxh }}</el-descriptions-item>
      <el-descriptions-item label="销售标识">{{ info.nameCode }}</el-descriptions-item>
      <el-descriptions-item label="注册/备案号">{{ info.zczbhhzbapzbh }}</el-descriptions-item>
      <el-descriptions-item label="生产企业">{{ info.manufactory }}</el-descriptions-item>
      <el-descriptions-item label="供应商">{{ info.supName }}</el-descriptions-item>
      <el-descriptions-item label="批次号">{{ info.batchNo }}</el-descriptions-item>
      <el-descriptions-item label="序列号">{{ info.serialNo }}</el-descriptions-item>
      <el-descriptions-item label="udi码">{{ info.udi }}</el-descriptions-item>
      <el-descriptions-item label="生产日期">{{ info.productionDate }}</el-descriptions-item>
      <el-descriptions-item label="过期时间">{{ info.expireDate }}</el-descriptions-item>
      <el-descriptions-item label="维修方式" :span="1">
        {{ info.innerFlag ? '内部维修' : '外部维修' }}
      </el-descriptions-item>
      <el-descriptions-item label="维修人姓名" :span="1">
        {{ info.repairUserName }}
      </el-descriptions-item>
      <el-descriptions-item label="维修人电话" :span="1">
        {{ info.repairUserPhone }}
      </el-descriptions-item>
      <el-descriptions-item label="问题描述" :label-style="{'height': '100px'}" :span="4">
        {{ info.description }}
      </el-descriptions-item>
      <el-descriptions-item label="维修前现场图片" :span="4" label-style="height:100px">
        <localImageUpload
          :fileType="['image/jpeg','image/png','image/gif']"
          :maxFiles= "this.maxFiles"
          :fileSizeLimit="this.fileSizeLimit"
          :type="deptDeviceCheck"
          :uploadedFileNames="info.livePath"
          :disabledUp="info.finishFlag || this.disabledUp"
          @changeComponent1Data="component1DataChange"
        ></localImageUpload>

      </el-descriptions-item>
      <el-descriptions-item label="诊断信息" :label-style="{'height': '100px'}" :span="4">
        {{ info.diagnosisInfo }}
      </el-descriptions-item>
      <el-descriptions-item label="诊断图片" span="4" label-style="height:100px">
        <localImageUpload
          :fileType="['image/jpeg','image/png','image/gif']"
          :maxFiles= "this.maxFiles"
          :fileSizeLimit="this.fileSizeLimit"
          :type="deptDeviceCheck"
          :uploadedFileNames="info.diagnosisLivePath"
          :disabledUp="info.finishFlag || this.disabledUp"
          @changeComponent1Data="component1DataChange"
        ></localImageUpload>
      </el-descriptions-item>
      <el-descriptions-item label="维修内容" :label-style="{'height': '100px'}" :span="4" >
        <el-input  type="textarea" resize="none" :autosize="{ minRows: 4, maxRows: 4 }" clearable v-model.trim="info.repairDescription" :disabled="info.finishFlag || this.disabledUp" ></el-input>
      </el-descriptions-item>
      <el-descriptions-item label="维修后现场图片" :span="4" label-style="height:100px">
        <localImageUpload
          :fileType="['image/jpeg','image/png','image/gif']"
          :maxFiles= "this.maxFiles"
          :fileSizeLimit="this.fileSizeLimit"
          :type="deptDeviceCheck"
          :uploadedFileNames="info.serviceLivePath"
          :disabledUp="info.finishFlag || this.disabledUp"
          @changeComponent1Data="component1DataChange"
        ></localImageUpload>

      </el-descriptions-item>
    </el-descriptions>
  </el-card>
</template>

<script src="./index.js">
</script>
