<template>
  <div class="risp-page-signature">
    <div class="wrapper">
      <span>报告医师：</span>
      <img :src="reportDoctor" alt srcset />
    </div>

    <div class="wrapper">
      <span class="title" v-if="!isSameDoctor">审核医师：</span>
      <img  v-if="!isSameDoctor" :src="risp.rispReport.reviewDoctor" alt />
    </div>

    <div class="wrapper">
      <span class="title">报告日期：</span>
      <span>{{ time}}</span>
    </div>
  </div>
</template>

<script>
import moment from "moment";
export default {
  inject: ["risp"],
  computed: {
    time() {
      let date1 = new Date(this.risp.rispReport.reviewTime);
      return this.risp.rispReport.reviewTime
        ? moment(date1).format("YYYY-MM-DD")
        : "";
    },
    isSameDoctor() {
      return this.risp.rispReport.reportDoctor == this.risp.rispReport.reviewDoctor;
    },
    reportDoctor() {
      return this.isSameDoctor ? this.risp.rispReport.reviewDoctor : this.risp.rispReport.reportDoctor;
    }
  },
};
</script>

<style lang="less" scoped>
.risp-page-signature {
  display: flex;
  flex-wrap: wrap;
  .wrapper {
    display: flex;
    align-items: center;
    width: 33.333%;
    line-height: 30px;
    span {
      font-size: 14px;
      color: #000;
      font-family: "SimSun";
    }

    img {
      height: 25px;
      vertical-align: middle;
    }
  }
}

@media print {
  .risp-page-signature {
  .wrapper span {
       font-size: 20px;
      color: #000;
      font-family: "SimSun";
  }

  .wrapper img {
    height: 40px;
  }
}
}
</style>