diff --git a/src/views/ECG/ECGForm.vue b/src/views/ECG/ECGForm.vue
index 49607f18..b90eceb1 100644
--- a/src/views/ECG/ECGForm.vue
+++ b/src/views/ECG/ECGForm.vue
@@ -64,6 +64,9 @@
申请返修
+ 审核
危急值
@@ -417,7 +420,7 @@
@click="getuporghiorgid(Primarykey, orgid)"
>申请诊断
- 保存
+ 保存
@@ -594,6 +597,9 @@ const snapshotTime = ref() //心电事件快照事件
const isChildVisible = ref(false)
const inputRef = ref() // 用于获取el-input的DOM引用
const saveFormVO = ref({} as EcganalysisparasVO)
+//基本信息
+const applyFormVO = ref({} as PatientexamlistVO)
+ const examineFormVO = ref({} as PatientexamlistVO)
const Profilevo = ref({} as ProfileVO) //当前登录人信息
const age = ref() //年龄
const Isgrid = ref(1) //是否显示网格 1显示 0不显示
@@ -617,6 +623,8 @@ const isshowysb = ref(false)
const ECGReportDialog = ref() //危急值消息弹窗
const ECGCompare = ref() //心电图对比弹窗
const ECGApply = ref() //申请返修弹窗
+const keyid = ref() //当前数据行的主键ID
+const savedisabled = ref(false) //保存按钮是否可用
// 树配置项
const treeDefaultProps = {
children: 'children',
@@ -631,6 +639,7 @@ const open = async (row: any) => {
dialogTitle.value = '心电分析'
resetForm()
id.value = row.regId
+ keyid.value = row.id
Primarykey.value = row.id
orgid.value = row.orgId
rowinfo.value = row
@@ -639,6 +648,7 @@ const open = async (row: any) => {
queryParams.value = data
snapshotTime.value = formattedDate(queryParams.value.snapshotTime)
await getlogininfo()
+ await getPatientexamlist(keyid.value)
calculateAge(row.birthday)
Isgrid.value = 1 // 没次打开都是显示的 只有点击网格才会变化
isChildVisible.value = true
@@ -665,6 +675,32 @@ const open = async (row: any) => {
if (warningdata.reportDate) {
isshowysb.value = Profilevo.value.orgId === row.orgId ? true : false
}
+ //判断保存按钮是否可用 审核后不允许在保存
+ savedisabled.value=applyFormVO.value.reportstatus === '已审核'?true:false
+}
+//审核功能
+async function process() {
+ if (applyFormVO.value.reportstatus === '已分析') {
+ // 审核确认
+ await message.delConfirm('是否进行审核操作', '审核')
+ const response = await PatientexamlistApi.examine(keyid.value)
+ if (response) {
+ message.alertSuccess('审核成功')
+ await getPatientexamlist(keyid.value)
+ emit('success')
+ savedisabled.value=true
+ }
+ } else if (applyFormVO.value.reportstatus === '已审核') {
+ message.warning('已经审核,无需再次审核')
+ } else {
+ message.warning('请先进行保存')
+ }
+}
+
+//查询当前患者数据
+async function getPatientexamlist(id) {
+ const data = await PatientexamlistApi.getPatientexamlist(id)
+ applyFormVO.value = data
}
// 返回的列表的数据
@@ -704,6 +740,7 @@ const queryParams = ref({
})
//
async function save() {
+
saveFormVO.value.id = queryParams.value.id
saveFormVO.value.hr = queryParams.value.hr
saveFormVO.value.pAxle = queryParams.value.paxle
@@ -725,15 +762,24 @@ async function save() {
// saveFormVO.value.departName=queryParams.value.departName
const ret = await EcganalysisparasApi.SaveEcganalysisparas(saveFormVO.value)
if (ret) {
- //进行生成pdf
+ //更新主表数据
+ examineFormVO.value.id = keyid.value
+ examineFormVO.value.diagDoctor = Profilevo.value.doctorname
+ examineFormVO.value.diagDoctorId = Profilevo.value.doctorID
+ examineFormVO.value.reportstatus = '已分析'
+ await PatientexamlistApi.examineupdatelist(examineFormVO.value)
+ //查询主表数据
+ await getPatientexamlist(keyid.value)
+ //进行生成pdf
const data = await EcganalysisparasApi.getexamIDdata('MZCF0191729074962197_44', orgid.value)
queryParams.value = data
message.alertSuccess('保存成功')
+ emit('success')
//ElMessage.info('开始保存pdf')
- setTimeout(() => {
- isprintimage.value = true
- }, 900)
+ // setTimeout(() => {
+ // isprintimage.value = true
+ // }, 900)
}
}
@@ -778,6 +824,8 @@ function resetForm() {
IsFD.value = false //是否开启放大
lineratio.value = 0.05 //画线的系数 振幅
suduratio.value = 1 //画线的系数 走速
+ applyFormVO.value = {} as PatientexamlistVO
+ examineFormVO.value={} as PatientexamlistVO
}
//关闭打印窗口