增加图片显示界面,修改显示逻辑

This commit is contained in:
Euni4U 2025-01-02 11:51:12 +08:00
parent c77ae94875
commit 5ed4d21812
2 changed files with 116 additions and 3 deletions

View File

@ -9,6 +9,8 @@
:destroy-on-close="true"
@close="
() => {
isshowwjz = false
isshowysb = false
isChildVisible = false
}
"
@ -90,6 +92,7 @@
:iscorrect="correct"
@update:value="handleUpdate"
/>
<ECGPicture v-if="isPictureVisible" :jsonurl="queryParams.ecgJsonDataFilePath" />
</el-tab-pane>
</el-tabs>
</el-aside>
@ -103,6 +106,7 @@
style="width: 30px; height: 30px; margin-bottom: 10px"
type="primary"
plain
:disabled="buttonDisabled"
>
<el-icon><Odometer /></el-icon>
</el-button>
@ -123,6 +127,7 @@
style="width: 30px; height: 30px; margin-bottom: 10px"
type="primary"
plain
:disabled="buttonDisabled"
>
<el-icon><Histogram /></el-icon>
</el-button>
@ -142,6 +147,7 @@
style="width: 30px; height: 30px; margin-bottom: 10px"
type="primary"
plain
:disabled="buttonDisabled"
@click="measure()"
>
<el-icon><EditPen /></el-icon>
@ -152,6 +158,7 @@
style="width: 30px; height: 30px; margin-bottom: 10px"
type="primary"
plain
:disabled="buttonDisabled"
@click="FD()"
>
<el-icon><ZoomIn /></el-icon>
@ -162,6 +169,7 @@
style="width: 30px; height: 30px; margin-bottom: 10px"
type="primary"
plain
:disabled="buttonDisabled"
@click="iscorrect()"
>
<el-icon><Switch /></el-icon>
@ -172,6 +180,7 @@
style="width: 30px; height: 30px; margin-bottom: 10px"
type="primary"
plain
:disabled="buttonDisabled"
@click="Isgriddisplay()"
>
<el-icon><Grid /></el-icon>
@ -182,6 +191,7 @@
style="width: 30px; height: 30px; margin-bottom: 10px"
type="primary"
plain
:disabled="buttonDisabled"
@click="Refresh"
>
<el-icon><RefreshRight /></el-icon>
@ -192,6 +202,7 @@
style="width: 30px; height: 30px; margin-bottom: 10px"
type="primary"
plain
:disabled="buttonDisabled"
@click="opencomparediag"
>
<el-icon><Reading /></el-icon>
@ -667,6 +678,7 @@ const ECGCompare = ref() //心电图对比弹窗
const ECGApply = ref() //
const keyid = ref() //ID
const savedisabled = ref(false) //
const isPictureVisible = ref(false) //
//
const treeDefaultProps = {
children: 'children',
@ -675,6 +687,14 @@ const treeDefaultProps = {
//
const treeData = ref([])
//
const buttonDisabled = ref(false)
//
const setButtonsDisabled = (disabled: boolean) => {
buttonDisabled.value = disabled
}
/** 打开弹窗 */
const open = async (row: any) => {
dialogVisible.value = true
@ -685,15 +705,36 @@ const open = async (row: any) => {
Primarykey.value = row.id
orgid.value = row.orgId
rowinfo.value = row
// console.log( rowinfo.value)
const data = await EcganalysisparasApi.getexamIDdata(rowinfo.value.examId, orgid.value)
queryParams.value = data
if (
queryParams.value.ecgJsonDataFilePath &&
(queryParams.value.ecgJsonDataFilePath.toUpperCase().endsWith('.BMP') ||
queryParams.value.ecgJsonDataFilePath.toUpperCase().endsWith('.JPG') ||
queryParams.value.ecgJsonDataFilePath.toUpperCase().endsWith('.PNG'))
) {
isPictureVisible.value = true
isChildVisible.value = false
setButtonsDisabled(true) //
} else if (
queryParams.value.ecgJsonDataFilePath &&
queryParams.value.ecgJsonDataFilePath.toUpperCase().endsWith('.TXT')
) {
isChildVisible.value = true
isPictureVisible.value = false
setButtonsDisabled(false) //
} else {
isChildVisible.value = false
isPictureVisible.value = false
setButtonsDisabled(true) //
ElMessage.warning('数据格式有误')
return
}
snapshotTime.value = formattedDate(queryParams.value.snapshotTime)
await getlogininfo()
await getPatientexamlist(keyid.value)
calculateAge(row.birthday)
Isgrid.value = 1 //
isChildVisible.value = true
nextTick(() => {
/* 计算右侧诊断*/
@ -828,7 +869,14 @@ const save = async () => {
saveFormVO.value.age = age.value
saveFormVO.value.diagtime = queryParams.value.doctorDiagTime
saveFormVO.value.ecgJsonDataFilePath = queryParams.value.ecgJsonDataFilePath
await EcganalysisparasApi.SaveEcgPdf(saveFormVO.value)
if (
queryParams.value.ecgJsonDataFilePath &&
!(queryParams.value.ecgJsonDataFilePath.toUpperCase().endsWith('.BMP') ||
queryParams.value.ecgJsonDataFilePath.toUpperCase().endsWith('.JPG') ||
queryParams.value.ecgJsonDataFilePath.toUpperCase().endsWith('.PNG'))
) {
await EcganalysisparasApi.SaveEcgPdf(saveFormVO.value)
}
//
await getPatientexamlist(keyid.value)
loading.close()

View File

@ -0,0 +1,65 @@
<template>
<div class="ecg-picture-container">
<img
:src="props.jsonurl"
alt="ECGPicture"
class="ecg-image"
/>
</div>
</template>
<script setup lang="ts">
// props,ECGhtml使
const props = defineProps({
jsonurl: {
type: String,
required: true
},
'-isgrid': {
type: Number,
default: 1
},
'-ismeasure': {
type: Number,
default: 0
},
'-isfd': {
type: Boolean,
default: false
},
lineratio: {
type: Number,
default: 0.05
},
suduratio: {
type: Number,
default: 1
},
isrefresh: {
type: Boolean,
default: false
},
iscorrect: {
type: Boolean,
default: false
}
})
</script>
<style scoped>
.ecg-picture-container {
width: 100%;
height: 73vh;
display: flex;
justify-content: center;
align-items: center;
}
.ecg-image {
max-width: 100%;
max-height: 100%;
object-fit: contain;
transform-origin: left top;
border: 1px solid #000;
}
</style>