增加图片显示界面,修改显示逻辑
This commit is contained in:
parent
c77ae94875
commit
5ed4d21812
@ -9,6 +9,8 @@
|
|||||||
:destroy-on-close="true"
|
:destroy-on-close="true"
|
||||||
@close="
|
@close="
|
||||||
() => {
|
() => {
|
||||||
|
isshowwjz = false
|
||||||
|
isshowysb = false
|
||||||
isChildVisible = false
|
isChildVisible = false
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
@ -90,6 +92,7 @@
|
|||||||
:iscorrect="correct"
|
:iscorrect="correct"
|
||||||
@update:value="handleUpdate"
|
@update:value="handleUpdate"
|
||||||
/>
|
/>
|
||||||
|
<ECGPicture v-if="isPictureVisible" :jsonurl="queryParams.ecgJsonDataFilePath" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-aside>
|
</el-aside>
|
||||||
@ -103,6 +106,7 @@
|
|||||||
style="width: 30px; height: 30px; margin-bottom: 10px"
|
style="width: 30px; height: 30px; margin-bottom: 10px"
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
|
:disabled="buttonDisabled"
|
||||||
>
|
>
|
||||||
<el-icon><Odometer /></el-icon>
|
<el-icon><Odometer /></el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -123,6 +127,7 @@
|
|||||||
style="width: 30px; height: 30px; margin-bottom: 10px"
|
style="width: 30px; height: 30px; margin-bottom: 10px"
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
|
:disabled="buttonDisabled"
|
||||||
>
|
>
|
||||||
<el-icon><Histogram /></el-icon>
|
<el-icon><Histogram /></el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
@ -142,6 +147,7 @@
|
|||||||
style="width: 30px; height: 30px; margin-bottom: 10px"
|
style="width: 30px; height: 30px; margin-bottom: 10px"
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
|
:disabled="buttonDisabled"
|
||||||
@click="measure()"
|
@click="measure()"
|
||||||
>
|
>
|
||||||
<el-icon><EditPen /></el-icon>
|
<el-icon><EditPen /></el-icon>
|
||||||
@ -152,6 +158,7 @@
|
|||||||
style="width: 30px; height: 30px; margin-bottom: 10px"
|
style="width: 30px; height: 30px; margin-bottom: 10px"
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
|
:disabled="buttonDisabled"
|
||||||
@click="FD()"
|
@click="FD()"
|
||||||
>
|
>
|
||||||
<el-icon><ZoomIn /></el-icon>
|
<el-icon><ZoomIn /></el-icon>
|
||||||
@ -162,6 +169,7 @@
|
|||||||
style="width: 30px; height: 30px; margin-bottom: 10px"
|
style="width: 30px; height: 30px; margin-bottom: 10px"
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
|
:disabled="buttonDisabled"
|
||||||
@click="iscorrect()"
|
@click="iscorrect()"
|
||||||
>
|
>
|
||||||
<el-icon><Switch /></el-icon>
|
<el-icon><Switch /></el-icon>
|
||||||
@ -172,6 +180,7 @@
|
|||||||
style="width: 30px; height: 30px; margin-bottom: 10px"
|
style="width: 30px; height: 30px; margin-bottom: 10px"
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
|
:disabled="buttonDisabled"
|
||||||
@click="Isgriddisplay()"
|
@click="Isgriddisplay()"
|
||||||
>
|
>
|
||||||
<el-icon><Grid /></el-icon>
|
<el-icon><Grid /></el-icon>
|
||||||
@ -182,6 +191,7 @@
|
|||||||
style="width: 30px; height: 30px; margin-bottom: 10px"
|
style="width: 30px; height: 30px; margin-bottom: 10px"
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
|
:disabled="buttonDisabled"
|
||||||
@click="Refresh"
|
@click="Refresh"
|
||||||
>
|
>
|
||||||
<el-icon><RefreshRight /></el-icon>
|
<el-icon><RefreshRight /></el-icon>
|
||||||
@ -192,6 +202,7 @@
|
|||||||
style="width: 30px; height: 30px; margin-bottom: 10px"
|
style="width: 30px; height: 30px; margin-bottom: 10px"
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
|
:disabled="buttonDisabled"
|
||||||
@click="opencomparediag"
|
@click="opencomparediag"
|
||||||
>
|
>
|
||||||
<el-icon><Reading /></el-icon>
|
<el-icon><Reading /></el-icon>
|
||||||
@ -667,6 +678,7 @@ const ECGCompare = ref() //心电图对比弹窗
|
|||||||
const ECGApply = ref() //申请返修弹窗
|
const ECGApply = ref() //申请返修弹窗
|
||||||
const keyid = ref() //当前数据行的主键ID
|
const keyid = ref() //当前数据行的主键ID
|
||||||
const savedisabled = ref(false) //保存按钮是否可用
|
const savedisabled = ref(false) //保存按钮是否可用
|
||||||
|
const isPictureVisible = ref(false) //是否显示图片
|
||||||
// 树配置项
|
// 树配置项
|
||||||
const treeDefaultProps = {
|
const treeDefaultProps = {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
@ -675,6 +687,14 @@ const treeDefaultProps = {
|
|||||||
// 通用树数据
|
// 通用树数据
|
||||||
const treeData = ref([])
|
const treeData = ref([])
|
||||||
|
|
||||||
|
// 添加按钮禁用状态控制
|
||||||
|
const buttonDisabled = ref(false)
|
||||||
|
|
||||||
|
// 可以添加一个方法来统一控制按钮状态
|
||||||
|
const setButtonsDisabled = (disabled: boolean) => {
|
||||||
|
buttonDisabled.value = disabled
|
||||||
|
}
|
||||||
|
|
||||||
/** 打开弹窗 */
|
/** 打开弹窗 */
|
||||||
const open = async (row: any) => {
|
const open = async (row: any) => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
@ -685,15 +705,36 @@ const open = async (row: any) => {
|
|||||||
Primarykey.value = row.id
|
Primarykey.value = row.id
|
||||||
orgid.value = row.orgId
|
orgid.value = row.orgId
|
||||||
rowinfo.value = row
|
rowinfo.value = row
|
||||||
// console.log( rowinfo.value)
|
|
||||||
const data = await EcganalysisparasApi.getexamIDdata(rowinfo.value.examId, orgid.value)
|
const data = await EcganalysisparasApi.getexamIDdata(rowinfo.value.examId, orgid.value)
|
||||||
queryParams.value = data
|
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)
|
snapshotTime.value = formattedDate(queryParams.value.snapshotTime)
|
||||||
await getlogininfo()
|
await getlogininfo()
|
||||||
await getPatientexamlist(keyid.value)
|
await getPatientexamlist(keyid.value)
|
||||||
calculateAge(row.birthday)
|
calculateAge(row.birthday)
|
||||||
Isgrid.value = 1 // 没次打开都是显示的 只有点击网格才会变化
|
Isgrid.value = 1 // 没次打开都是显示的 只有点击网格才会变化
|
||||||
isChildVisible.value = true
|
|
||||||
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
/* 计算右侧诊断*/
|
/* 计算右侧诊断*/
|
||||||
@ -828,7 +869,14 @@ const save = async () => {
|
|||||||
saveFormVO.value.age = age.value
|
saveFormVO.value.age = age.value
|
||||||
saveFormVO.value.diagtime = queryParams.value.doctorDiagTime
|
saveFormVO.value.diagtime = queryParams.value.doctorDiagTime
|
||||||
saveFormVO.value.ecgJsonDataFilePath = queryParams.value.ecgJsonDataFilePath
|
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)
|
await getPatientexamlist(keyid.value)
|
||||||
loading.close()
|
loading.close()
|
||||||
|
65
src/views/ECG/ECGPicture.vue
Normal file
65
src/views/ECG/ECGPicture.vue
Normal 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>
|
Loading…
Reference in New Issue
Block a user