From d4da28a879589eb181a8c31e15e9723709c08f46 Mon Sep 17 00:00:00 2001
From: lxd <1004405501@qq.com>
Date: Thu, 5 Dec 2024 15:55:26 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BF=83=E7=94=B5=E6=A8=A1=E5=9D=97=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=E5=8D=B1=E6=80=A5=E5=80=BC=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/ECG/ECGForm.vue | 6 ++--
src/views/ECG/ECGWaring/ECGReport.vue | 5 ++-
src/views/ECG/ECGWaring/ECGWarningDialog.vue | 35 ++++++++++++++++----
3 files changed, 36 insertions(+), 10 deletions(-)
diff --git a/src/views/ECG/ECGForm.vue b/src/views/ECG/ECGForm.vue
index e887d7ad..2057c491 100644
--- a/src/views/ECG/ECGForm.vue
+++ b/src/views/ECG/ECGForm.vue
@@ -64,7 +64,7 @@
危急值
- 已上报
@@ -593,6 +593,7 @@ const imagebase64 = ref('')
const isprintimage = ref(false) //是否生成打印文件base64
const ECGDialog = ref() //危急值消息弹窗
const isshowwjz = ref(false)
+const isshowysb=ref(false)
const ECGReportDialog = ref() //危急值消息弹窗
// 树配置项
const treeDefaultProps = {
@@ -621,7 +622,8 @@ const open = async (row: any) => {
isChildVisible.value = true
isshowwjz.value = true
//判断是否显示危急值上报功能 条件是当前机构等于上级机构
- // isshowwjz.value=Profilevo.value.orgId===row.highLevelOrgId?true:false
+ isshowwjz.value=Profilevo.value.orgId===row.highLevelOrgId?true:false
+ isshowysb.value=Profilevo.value.orgId===row.orgId?true:false
nextTick(() => {
/* 计算右侧诊断*/
const canvasContainer = document.getElementById('elform')
diff --git a/src/views/ECG/ECGWaring/ECGReport.vue b/src/views/ECG/ECGWaring/ECGReport.vue
index 4248b7bc..597fb049 100644
--- a/src/views/ECG/ECGWaring/ECGReport.vue
+++ b/src/views/ECG/ECGWaring/ECGReport.vue
@@ -173,10 +173,11 @@ const opendiag = async (row) => {
rowinfo.value = row
resetForm()
await getlogininfo() // 使用 ISO 格式的时间字符串
-
+
//查询当前患者的危急值相关信息
const data = await WarningApi.getexmidororgiddata(rowinfo.value.examId, rowinfo.value.orgId)
warintinfo.value = data
+
//处理时间轴相关
if (!data.readDateTime) {
await updatereadDateTime(data.id)
@@ -266,6 +267,8 @@ const resetForm = () => {
warningProcess: undefined,
readremark: undefined
}
+ //重置一下数据
+ warintinfo.value=''
}
defineExpose({ opendiag }) // 提供 open 方法,用于打开弹窗
/** 提交表单 */
diff --git a/src/views/ECG/ECGWaring/ECGWarningDialog.vue b/src/views/ECG/ECGWaring/ECGWarningDialog.vue
index d3653ea5..416b1e17 100644
--- a/src/views/ECG/ECGWaring/ECGWarningDialog.vue
+++ b/src/views/ECG/ECGWaring/ECGWarningDialog.vue
@@ -38,7 +38,7 @@
-
+
@@ -51,7 +51,7 @@
- 上报
+ 上报
(dialogVisible = false)">取消
@@ -72,7 +72,7 @@ const formLoading = ref(false) // 表单的加载中:1)修改时的数据加
const formRef = ref() // 表单 Ref
const rowinfo = ref() //外面传递的患者信息
const Profilevo = ref({} as ProfileVO) //当前登录人信息
-
+const isreportshow = ref(false) //上报按钮是否可用
/** 打开弹窗 */
const opendiag = async (type, row) => {
// const reportDate = await isdata(row.examId, row.orgId)
@@ -80,14 +80,33 @@ const opendiag = async (type, row) => {
// message.alertError('当前患者已上报')
// return
// }
+
formLoading.value = true
- dialogVisible.value = true
+
dialogTitle.value = t('action.' + type)
resetForm()
rowinfo.value = row
+ //查询当前患者的危急值相关信息
+ const data = await WarningApi.getexmidororgiddata(rowinfo.value.examId, rowinfo.value.orgId)
+ if (data) {
+ isreportshow.value = true
+ //赋值危急值内容
+ formData.value.warningContent = data.warningContent
+ //接报医生
+ formData.value.receiveDoctor = data.receiveDoctor
+ formData.value.reportDoctor = data.reportDoctor
+ formData.value.remark = data.remark
+ } else {
+ isreportshow.value = false
+ formData.value.receiveDoctor = rowinfo.value.applyhighLevelname
+ //上报医生
+ formData.value.reportDoctor = Profilevo.value.nickname
+ }
+
await getlogininfo()
- formData.value.reportDoctor = Profilevo.value.nickname
+
formLoading.value = false
+ dialogVisible.value = true
}
//判断患者是否已经 上报
async function isdata(examId: String, orgId: String) {
@@ -106,11 +125,13 @@ async function report() {
formData.value.reportOrgId = Profilevo.value.orgId
formData.value.reportorgName = orgInfo.value.orgName
const data = formData.value as unknown as WarningVO
- await WarningApi.createWarning(data)
+ const re = await WarningApi.createWarning(data)
+ if (re) {
+ message.alertSuccess('上报成功')
+ }
dialogVisible.value = false
}
-
const formData = ref({
id: undefined,
orgId: undefined,