<template>
  <window-size>
    <van-notice-bar left-icon="warning-o" text="仅供查阅参考，最终结果以医院纸质报告为准。" />
    <van-cell title="就诊人" :value="testResult.patientName"></van-cell>
    <van-cell title="送检医生" :value="testResult.doctorName"></van-cell>
    <van-cell title="报告时间" :value="testResult.checkTime"></van-cell>
    <van-cell title="报告单号" :value="testResult.patientUid"></van-cell>
    <div style="height: 5px"></div>
    <van-tag type="primary" plain style="margin-left: 8px">检查所见</van-tag>
    <div class="test-result-text">
      <p v-html="testResult.examinationSee"></p>
    </div>
    <div style="height: 12px"></div>
    <van-tag type="primary" plain style="margin-left: 8px">检查结论</van-tag>
    <div class="test-result-text">
      <p v-html="testResult.examinationreSult"></p>
    </div>
  </window-size>
</template>

<script setup>
import { useRouter } from 'vue-router'
import { checkTestDetail } from '../../../api/check-exam'
import { onMounted, ref} from 'vue'

const router = useRouter()

const testResult = ref({})

onMounted(() => {
  const params = router.currentRoute.value.params
  checkTestDetail(params).then((res) => {
    testResult.value = res
  })
})
</script>

<style scoped>
.test-result-text {
  font-size: 14px;
  color: black;
  padding: 4px 20px;
}
</style>