心电新增对比

This commit is contained in:
lxd 2024-12-08 23:54:17 +08:00
parent 12ff4d0319
commit 657c7ae427
5 changed files with 167 additions and 0 deletions

View File

@ -34,6 +34,7 @@ export interface EcganalysisparasVO {
ecgDataFilePath: string // 心电数据文件的路径: 路径或URL
ecgJsonDataFilePath: string // 心电数据json格式的数据文件路径路径或URL
createDate: Date // 分析参数的创建时间
regId:String//患者ID
}
// 心电分析数据 API
@ -76,4 +77,8 @@ export const EcganalysisparasApi = {
return await request.get({ url: `/tblist/ecganalysisparas/getexamIDdata?examId=` + examId })
},
// 获取所有心电分析数据记录
getlist: async (regId:String) => {
return await request.get({ url: `/tblist/ecganalysisparas/list?regId=${regId}` })
},
}

View File

@ -72,6 +72,12 @@ export function formatDate(date: Date, format?: string): string {
return date ? dayjs(date).format(format ?? 'YYYY-MM-DD HH:mm:ss') : ''
}
// 创建一个计算属性来转换时间戳
export function formattedDate(timestamp) {
const date = new Date(timestamp)
const strdata = formatDate(date, 'YYYY-MM-DD HH:mm:ss')
return strdata // 转换为本地日期时间字符串
}
/**
* +
*/

View File

@ -0,0 +1,138 @@
<template>
<el-dialog v-model="dialogVisible" title="历史对比" :fullscreen="true" @close="close">
<div class="common-layout" style="height: 90vh">
<el-container style="height: 100%">
<el-header height="85px">
<span>历史数据</span>
<div>
<el-checkbox-group v-model="transfer" :min="0" :max="2" class="mycheckbox-group">
<el-checkbox
v-for="city in ecganalysisinfo"
:key="city['snapshotTime']"
:label="city['snapshotTime']"
:value="city['snapshotTime'] + '|' + city['ecgJsonDataFilePath']"
class="mycheckbox-item"
@change="checkboxchage"
>
{{ formattedDate(city['snapshotTime']) }}
</el-checkbox>
</el-checkbox-group>
</div>
<div class="mybutton">
<el-button type="primary" @click="contrast" :disabled="checkes"> 对比</el-button>
<el-button type="primary" @click="eliminate"> 清除</el-button>
</div>
</el-header>
<el-container style="height: 100%">
<el-aside width="48%">
<el-tabs type="border-card">
<el-tab-pane :label="snapshotTime">
<!--心电图-->
<ECGhtml
v-if="isChildVisible"
:jsonurl="transfer[0].split('|')[1]"
:-isgrid="1"
:-ismeasure="0"
:lineratio="0.05"
:suduratio="1"
:isrefresh="false"
:iscorrect="false"
/>
</el-tab-pane>
</el-tabs>
</el-aside>
<el-aside width="48%" style="margin-left: 30px; padding: 0px">
<el-tabs type="border-card">
<el-tab-pane :label="snapshotTime1">
<!--心电图-->
<ECGhtml
v-if="isChildVisible1"
:jsonurl="transfer[1].split('|')[1]"
:-isgrid="1"
:-ismeasure="0"
:lineratio="0.06"
:suduratio="1"
:isrefresh="false"
:iscorrect="false"
/>
</el-tab-pane>
</el-tabs>
</el-aside>
</el-container>
</el-container>
</div>
</el-dialog>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { getUserProfile, ProfileVO } from '@/api/system/user/profile'
import { WarningApi, WarningVO } from '@/api/system/warning'
import { ReportPrintStatisticsApi } from '@/api/applyregistration/reportPrintStatistics'
import { PatientexamlistApi, PatientexamlistVO } from '@/api/tblist/patientexamlist'
import { Style } from 'util'
import { EcganalysisparasApi, EcganalysisparasVO } from '@/api/tblist/ecganalysisparas'
import ECGhtml from '@/views/ECG/ECGhtml.vue'
import { formattedDate } from '@/utils/formatTime'
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const transfer = ref() //
const ecganalysisinfo = ref() //
const checkes = ref(true) //
const isChildVisible = ref(false) //
const isChildVisible1 = ref(false) //
const snapshotTime = ref()
const snapshotTime1 = ref()
const opencomparediag = async (row) => {
transfer.value = []
snapshotTime.value = ''
snapshotTime1.value = ''
ecganalysisinfo.value = await EcganalysisparasApi.getlist(row.regId)
dialogVisible.value = true
}
//
function contrast() {
snapshotTime1.value = formattedDate(parseInt(transfer.value[1].split('|')[0], 10))
snapshotTime.value = formattedDate(parseInt(transfer.value[0].split('|')[0], 10))
isChildVisible1.value = true
//
nextTick(() => {
isChildVisible.value = true
})
}
//
function eliminate() {
transfer.value = []
snapshotTime.value = ''
snapshotTime1.value = ''
isChildVisible1.value = false
isChildVisible.value = false
}
//
function checkboxchage() {
checkes.value = transfer.value.length === 2 ? false : true
}
function close() {
isChildVisible1.value = false
nextTick(() => {
isChildVisible.value = false
})
}
defineExpose({ opencomparediag }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
/** */
defineOptions({ name: 'ECGWarningDialog' })
</script>
<style lang="css" scoped>
.mybutton {
display: flex;
flex-direction: row;
justify-content: flex-start;
}
</style>

View File

@ -184,6 +184,16 @@
<el-icon><RefreshRight /></el-icon>
</el-button>
<span style="font-size: 15px; margin-bottom: 10px">刷新</span>
<el-button
style="width: 30px; height: 30px; margin-bottom: 10px"
type="primary"
plain
@click="opencomparediag"
>
<el-icon><Reading /></el-icon>
</el-button>
<span style="font-size: 15px; margin-bottom: 10px">对比</span>
</div>
</el-main>
</el-container>
@ -541,6 +551,7 @@
</div>
<ECGWarningDialog ref="ECGDialog" />
<ECGReport ref="ECGReportDialog" />
<ECGCopmareDialog ref="ECGCompare" />
</template>
<script setup lang="ts">
@ -560,6 +571,7 @@ import htmlToPdf from '@/utils/htmlPdf'
import ECGWarningDialog from '@/views/ECG/ECGWaring/ECGWarningDialog.vue'
import ECGReport from '@/views/ECG/ECGWaring/ECGReport.vue'
import { WarningApi, WarningVO } from '@/api/system/warning'
import ECGCopmareDialog from '@/views/ECG/ECGCompare.vue'
/** 提交表单 */
const emit = defineEmits(['success']) // success
@ -596,6 +608,7 @@ const ECGDialog = ref() //危急值消息弹窗
const isshowwjz = ref(false)
const isshowysb = ref(false)
const ECGReportDialog = ref() //
const ECGCompare=ref()//
//
const treeDefaultProps = {
children: 'children',
@ -779,6 +792,10 @@ function openECGDialog() {
function openreprotdiag() {
ECGReportDialog.value.opendiag(rowinfo.value)
}
//
function opencomparediag() {
ECGCompare.value.opencomparediag( rowinfo.value)
}
//
function iscorrect() {
correct.value = correct.value ? false : true

View File

@ -40,6 +40,7 @@
:step="1"
@input="handleSliderChange"
:show-tooltip="false"
style="margin-left: 30px; width: 96%;"
/>
</div>