|
@@ -5,6 +5,12 @@
|
|
|
<van-cell title="送检医生" :value="testResult.doctorName"></van-cell>
|
|
|
<van-cell title="报告时间" :value="testResult.checkTime"></van-cell>
|
|
|
<van-cell title="报告单号" :value="testResult.patientUid"></van-cell>
|
|
|
+ <van-cell
|
|
|
+ v-if="testResult.reportUrl"
|
|
|
+ title="报告图片"
|
|
|
+ is-link
|
|
|
+ @click="seeTestImage"
|
|
|
+ ></van-cell>
|
|
|
<div style="height: 5px"></div>
|
|
|
<van-tag type="primary" plain style="margin-left: 8px">检查所见</van-tag>
|
|
|
<div class="test-result-text">
|
|
@@ -15,6 +21,17 @@
|
|
|
<div class="test-result-text">
|
|
|
<p v-html="testResult.examinationreSult"></p>
|
|
|
</div>
|
|
|
+
|
|
|
+ <van-popup
|
|
|
+ v-model:show="showTestImage"
|
|
|
+ closeable
|
|
|
+ position="bottom"
|
|
|
+ close-icon="close"
|
|
|
+ :style="{ height: '100%' }"
|
|
|
+ >
|
|
|
+ <van-image width="100%" :src="imageSrc" fit="cover"/>
|
|
|
+ </van-popup>
|
|
|
+
|
|
|
</window-size>
|
|
|
</template>
|
|
|
|
|
@@ -22,11 +39,25 @@
|
|
|
import { useRouter } from 'vue-router'
|
|
|
import { checkTestDetail } from '../../../../api/check-exam'
|
|
|
import { onMounted, ref} from 'vue'
|
|
|
+import {fetchInspectionReportImage} from "../../../../utils/request";
|
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
|
const testResult = ref({})
|
|
|
|
|
|
+const showTestImage = ref(false)
|
|
|
+const imageSrc = ref(null)
|
|
|
+function seeTestImage() {
|
|
|
+ fetchInspectionReportImage({
|
|
|
+ patientId: router.currentRoute.value.params.patientId,
|
|
|
+ reportId: testResult.value.patientUid,
|
|
|
+ reportUrl: testResult.value.reportUrl,
|
|
|
+ }).then(response => {
|
|
|
+ showTestImage.value = true
|
|
|
+ imageSrc.value = response
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
const params = router.currentRoute.value.params
|
|
|
checkTestDetail(params).then((res) => {
|
|
@@ -41,4 +72,13 @@ onMounted(() => {
|
|
|
color: black;
|
|
|
padding: 4px 20px;
|
|
|
}
|
|
|
+
|
|
|
+.test-img-wrapper {
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ bottom: 0;
|
|
|
+ right: 0;
|
|
|
+ background-color: green;
|
|
|
+}
|
|
|
</style>
|