<template>
  <el-form
    class="dialog-info"
    label-width="80px"
  >
    <el-form-item
      v-if="info.guestName"
      label="姓名">
      {{ info.guestName }}
    </el-form-item>
    <el-form-item
      v-if="info.guestPhone"
      label="手机号">
      {{ info.guestPhone }}
    </el-form-item>
    <el-form-item
      v-if="info.guestIdentify"
      label="证件号">
      {{ info.guestIdentify }}
    </el-form-item>
    <el-form-item :label="info.bind_type | bindType">
      <div
        class="portrait"
        :style="{'background-image': `url(data:image/png;base64,${info.bind_img})`}"
      ></div>
    </el-form-item>
  </el-form>
</template>
<script>
export default {
  props: {
    info: {
      type: Object,
      default: () => {}
    }
  },
  filters: {
    bindType (input) {
      switch (input) {
        case 'finger':
          return '指纹'
        case 'face':
          return '人脸'
      }
    }
  }
}
</script>
