From 5ed4d218121de3acb6b42ee9d55183636743762e Mon Sep 17 00:00:00 2001 From: Euni4U <958079825@qq.com> Date: Thu, 2 Jan 2025 11:51:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9B=BE=E7=89=87=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=95=8C=E9=9D=A2=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ECG/ECGForm.vue | 54 ++++++++++++++++++++++++++++-- src/views/ECG/ECGPicture.vue | 65 ++++++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+), 3 deletions(-) create mode 100644 src/views/ECG/ECGPicture.vue diff --git a/src/views/ECG/ECGForm.vue b/src/views/ECG/ECGForm.vue index 5c05f363..e9619dd9 100644 --- a/src/views/ECG/ECGForm.vue +++ b/src/views/ECG/ECGForm.vue @@ -9,6 +9,8 @@ :destroy-on-close="true" @close=" () => { + isshowwjz = false + isshowysb = false isChildVisible = false } " @@ -90,6 +92,7 @@ :iscorrect="correct" @update:value="handleUpdate" /> + @@ -103,6 +106,7 @@ style="width: 30px; height: 30px; margin-bottom: 10px" type="primary" plain + :disabled="buttonDisabled" > @@ -123,6 +127,7 @@ style="width: 30px; height: 30px; margin-bottom: 10px" type="primary" plain + :disabled="buttonDisabled" > @@ -142,6 +147,7 @@ style="width: 30px; height: 30px; margin-bottom: 10px" type="primary" plain + :disabled="buttonDisabled" @click="measure()" > @@ -152,6 +158,7 @@ style="width: 30px; height: 30px; margin-bottom: 10px" type="primary" plain + :disabled="buttonDisabled" @click="FD()" > @@ -162,6 +169,7 @@ style="width: 30px; height: 30px; margin-bottom: 10px" type="primary" plain + :disabled="buttonDisabled" @click="iscorrect()" > @@ -172,6 +180,7 @@ style="width: 30px; height: 30px; margin-bottom: 10px" type="primary" plain + :disabled="buttonDisabled" @click="Isgriddisplay()" > @@ -182,6 +191,7 @@ style="width: 30px; height: 30px; margin-bottom: 10px" type="primary" plain + :disabled="buttonDisabled" @click="Refresh" > @@ -192,6 +202,7 @@ style="width: 30px; height: 30px; margin-bottom: 10px" type="primary" plain + :disabled="buttonDisabled" @click="opencomparediag" > @@ -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() diff --git a/src/views/ECG/ECGPicture.vue b/src/views/ECG/ECGPicture.vue new file mode 100644 index 00000000..ad9dae06 --- /dev/null +++ b/src/views/ECG/ECGPicture.vue @@ -0,0 +1,65 @@ + + + + +