|
@@ -1,12 +1,35 @@
|
|
|
<template>
|
|
|
<window-size>
|
|
|
- <van-image width="100%" :src="pathologyIndex.nginxUrl" fit="cover"/>
|
|
|
+ <van-image width="100%" :src="imageSrc" fit="cover"/>
|
|
|
</window-size>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import {useStore} from "vuex";
|
|
|
+import {onMounted, ref} from "vue";
|
|
|
+import router from "../../../../router";
|
|
|
+import axios from "axios";
|
|
|
+const baseURL = import.meta.env.VITE_BASE_URL
|
|
|
|
|
|
const store = useStore()
|
|
|
const pathologyIndex = store.getters.getCurrentPathologyIndex
|
|
|
+const imageSrc = ref(null)
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ axios({
|
|
|
+ url: baseURL + '/inspections/checkPathologyDetail',
|
|
|
+ method: 'post',
|
|
|
+ data: {
|
|
|
+ patientId: router.currentRoute.value.params.patientId,
|
|
|
+ reportId: pathologyIndex.reportUrl
|
|
|
+ },
|
|
|
+ headers: {'token': localStorage.getItem('token')},
|
|
|
+ contentType: 'image/JPEG',
|
|
|
+ responseType: 'blob',
|
|
|
+ }).then(response => {
|
|
|
+ const blob = new Blob([response.data],
|
|
|
+ { type: response.headers['content-type'] });
|
|
|
+ imageSrc.value = URL.createObjectURL(blob);
|
|
|
+ })
|
|
|
+})
|
|
|
</script>
|