增加病理相关界面

This commit is contained in:
lxd 2024-10-08 11:00:36 +08:00
parent 7923de94b7
commit 67ce66a747
2 changed files with 1287 additions and 0 deletions

View File

@ -0,0 +1,685 @@
<template>
<el-dialog
v-model="dialogVisible"
:title="dialogTitle"
class="my-custom-close-icon"
:fullscreen="true"
>
<el-tabs v-model="activeName" type="card">
<el-tab-pane v-if="tagLoaded" label="影像" name="first">
<iframe
v-if="dataLoaded"
frameborder="0"
scrolling="no"
:src="newSrc"
style="width: 100%; height: 87vh"
></iframe>
</el-tab-pane>
<el-tab-pane label="报告单" name="second">
<!-- 外层 Flex 容器 -->
<div style="display: flex; height: 100%">
<!-- 模版区域 -->
<div style="flex: 1; min-width: 0; overflow: auto">
<el-select
v-model="fordevicemValue"
placeholder="请选择模版类别"
clearable
@change="handleselectchange"
@clear="selectclear"
>
<el-option label="门诊" value="门诊模版" />
<el-option label="住院" value="住院模版" />
<el-option label="体检" value="体检模版" />
</el-select>
<el-tabs type="border-card" style="height: 83vh; overflow: auto">
<el-tab-pane label="通用模版">
<!-- -->
<el-tree
style="min-width: 195px"
v-loading="formLoading"
class="treeStyle"
:check-on-click-node="true"
:highlight-current="true"
:default-expand-all="false"
:data="treeData"
:props="treeDefaultProps"
node-key="id"
:show-checkbox="false"
:check-strictly="true"
@check="handleTreeNodeClick"
ref="selectTree"
:expand-on-click-node="false"
/>
</el-tab-pane>
<el-tab-pane label="私有模版">
<!-- -->
<el-tree
style="min-width: 195px"
v-loading="formLoading"
class="treeStyle"
:check-on-click-node="true"
:highlight-current="true"
:default-expand-all="false"
:data="privateData"
:props="treeDefaultProps"
node-key="id"
:show-checkbox="false"
:check-strictly="true"
@node-click="handleTreeNodeClick"
ref="priselectTree"
:expand-on-click-node="false"
/>
</el-tab-pane>
</el-tabs>
</div>
<!-- 用户信息区域 -->
<div style="flex: 3; min-width: 0">
<label style="font-size: 18px; font-weight: bold; margin-left: 50px">患者信息</label>
<el-divider />
<el-form
:model="applyFormVO"
label-width="auto"
style="max-width: 1000px; margin: auto"
:inline="true"
>
<el-row>
<el-col :span="7">
<el-form-item label="检查号" style="font-weight: bold" label-width="110px">
<el-input v-model="applyFormVO.examId" style="width: 220px" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="姓名" style="font-weight: bold" label-width="130px">
<el-input v-model="applyFormVO.pname" style="width: 220px" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="性别" style="font-weight: bold" label-width="160px">
<el-input v-model="applyFormVO.gender" style="width: 220px" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="出生日期" style="font-weight: bold" label-width="110px">
<el-date-picker
v-model="applyFormVO.birthday"
type="date"
placeholder="出生日期"
size="default"
style="width: 220px"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="检查时间" style="font-weight: bold" label-width="130px">
<el-date-picker
v-model="applyFormVO.examDate"
type="datetime"
placeholder="检查时间"
size="default"
style="width: 220px"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="送检科室" style="font-weight: bold" label-width="160px">
<el-input
v-model="applyFormVO.billDoctorDepartment"
style="width: 220px"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="申请时间" style="font-weight: bold" label-width="110px">
<el-date-picker
v-model="applyFormVO.applicationDate"
type="datetime"
placeholder="检查时间"
size="default"
style="width: 220px"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="申请单号" style="font-weight: bold" label-width="130px">
<el-input v-model="applyFormVO.regId" style="width: 220px" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="7">
<!-- <el-form-item label="检查项目名称" label-width="160px" style="font-weight: bold">
<el-input
v-model="applyFormVO.examItemName"
style="width: 220px"
:disabled="true"
/>
</el-form-item> -->
</el-col>
</el-row>
</el-form>
<label style="font-size: 18px; font-weight: bold; margin-left: 50px">检查项目</label>
<el-divider />
<el-input
v-model="applyFormVO.examItemName"
style="width: 95%; font-size: 20px; margin-left: 40px; margin-bottom: 6px"
:rows="1"
:disabled="true"
/>
<label style="font-size: 18px; font-weight: bold; margin-left: 50px">影像所见</label>
<el-divider />
<el-input
v-model="sj"
style="width: 95%; font-size: 20px; margin-left: 40px; margin-bottom: 3px"
:rows="4"
type="textarea"
placeholder="影像所见"
/>
<label style="font-size: 18px; font-weight: bold; margin-left: 50px">影像结论</label>
<el-divider />
<el-input
v-model="zdjl"
style="width: 95%; font-size: 20px; margin-left: 40px; margin-bottom: 3px"
:rows="4"
type="textarea"
placeholder="影像结论"
/>
<label style="font-size: 18px; font-weight: bold; margin-left: 50px">报告备注</label>
<el-divider />
<el-input
v-model="notes"
style="
width: 95%;
font-size: 19px;
margin-left: 40px;
margin-top: 6px;
margin-bottom: 6px;
"
placeholder=""
/>
<el-divider />
<el-radio-group
v-model="radio1"
size="small"
class="radio-group-wrapper"
@dblclick="cancelSelection"
>
<el-radio-button label="阴性" value="0" />
<el-radio-button label="阳性" value="1" />
<el-radio-button label="重大阳性" value="2" />
</el-radio-group>
<el-divider />
<div class="form-row-yx">
<el-form-item label="诊断医生" class="form-item">
<el-input v-model="applyFormVO.diagDoctor" style="width: 180px" :disabled="true" />
</el-form-item>
<el-form-item label="审核医生" class="form-item">
<el-input
v-model="applyFormVO.reviewDoctor"
style="width: 180px"
:disabled="true"
/>
</el-form-item>
<el-form-item label="报告状态" class="form-item">
<el-input
v-model="applyFormVO.reportstatus"
style="width: 180px"
:disabled="true"
/>
</el-form-item>
</div>
<div style="position: absolute; bottom: 0; right: 0">
<el-button
type="success"
plain
style="
width: 80px;
float: right;
margin-right: 15px;
margin-top: 30px;
background-color: rgba(56, 119, 246, 1);
font-size: 14;
color: rgb(255, 255, 255);
"
@click="save"
:disabled="savedisabled"
>保存</el-button
>
<!-- v-show="examinedisabled" -->
<el-button
type="primary"
plain
v-show="examinedisabled"
style="
width: 80px;
float: right;
margin-right: 15px;
margin-top: 30px;
background-color: rgba(56, 119, 246, 1);
font-size: 14;
color: rgb(255, 255, 255);
"
@click="examine"
>审核</el-button
>
</div>
</div>
</div>
</el-tab-pane>
</el-tabs>
</el-dialog>
<!-- </Dialog> -->
<!-- 弹窗-->
<el-dialog v-model="dialogTableVisible" title="选择结论添加方式" width="320" align-center>
<div>
<el-button @click="handleButtonClick('覆盖')" type="primary" style="font-size: 20px"
>覆盖</el-button
>
<el-button @click="handleButtonClick('追加')" type="success" style="font-size: 20px"
>追加</el-button
>
<el-button @click="dialogTableVisible = false" type="info" style="font-size: 20px"
>关闭</el-button
>
</div>
</el-dialog>
</template>
<script setup lang="ts">
import { ApplyformApi, ApplyformVO, UPFJApplyformVO } from '@/api/applyregistration/applyform'
import { ultrasoniccomApi, updateexamineimageVO } from '@/api/ultrasoniccom'
import axios from 'axios'
import { PatientexamlistApi, PatientexamlistVO } from '@/api/tblist/patientexamlist'
import { getUserProfile, ProfileVO } from '@/api/system/user/profile'
/** dicom */
defineOptions({ name: 'DicomPathologyViewForm' })
const Profilevo = ref<ProfileVO>({} as ProfileVO) //
const { t } = useI18n() //
const message = useMessage() //
const upFJApplyformVO = ref<UPFJApplyformVO[]>([])
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const examineFormVO = ref<PatientexamlistVO>({} as PatientexamlistVO)
const savedisabled = ref(true) //
const examinedisabled = ref(false) //
const dataLoaded = ref(false) //
const tagLoaded = ref(true) //
//使
const clickuptime = async (pid: string) => {
await ultrasoniccomApi.upreporttemplatetime(pid)
}
//
const dialogTableVisible = ref(false)
//
const btncleckname = ref()
//
const handleButtonClick = (buttonName) => {
if (buttonName == '覆盖') {
zdjl.value = strzdjl
sj.value = strsj
} else if (buttonName == '追加') {
let lszdjl: string = zdjl.value
let lssj: string = sj.value
zdjl.value = lszdjl + strzdjl
sj.value = lssj + strsj
}
dialogTableVisible.value = false
console.log('获取到父节点' + pid)
clickuptime(pid)
}
//or
const updateexamineimage = ref<updateexamineimageVO[]>([])
//
const notes = ref()
//
const save = async () => {
try {
//
await message.delConfirm('是否进行保存', '确认')
let timesta = new Date()
var localDateTime = new Date(timesta.getTime()).toISOString() // ISO
localDateTime = localDateTime.slice(0, localDateTime.length - 1)
console.log('当前时间' + localDateTime)
examineFormVO.value.id = ID.toString()
examineFormVO.value.examDescription = sj.value
examineFormVO.value.diagResults = zdjl.value
examineFormVO.value.notes = notes.value
examineFormVO.value.diagFlag = radio1.value
examineFormVO.value.diagDoctor = Profilevo.value.doctorname
examineFormVO.value.diagDoctorId = Profilevo.value.doctorID
// examineFormVO.value.reviewDoctor = Profilevo.value.username
examineFormVO.value.reportstatus = '已分析'
// examineFormVO.value.diagDate=localDateTime
// examineFormVO.value.reviewDate=dateTime
const response = await PatientexamlistApi.examineupdatelist(examineFormVO.value)
// code
if (response) {
message.alertSuccess('保存成功')
// data
console.log('接口调用成功')
console.log('data:', response.data)
// ID
getPatientexamlist(ID)
emit('success')
} else {
//
console.error('接口调用失败:', response.msg)
}
} catch (error) {
//
console.error('接口调用失败:', error)
}
}
//
const examine = async () => {
if (applyFormVO.value.reportstatus === '已分析') {
const response = await PatientexamlistApi.examine(ID.toString())
if (response) {
message.alertSuccess('审核成功')
// ID
getPatientexamlist(ID)
emit('success')
}
} else if (applyFormVO.value.reportstatus === '已审核') {
message.warning('已经审核,无需再次审核')
return
} else {
message.warning('请先进行保存')
return
}
}
//
const age = ref()
const calculateAge = (birthdate) => {
if (!birthdate) {
age.value = null
return
}
const today = new Date()
const birth = new Date(birthdate)
let yearsDiff = today.getFullYear() - birth.getFullYear()
// Check if the birthday hasn't occurred yet this year
const hasBirthdayPassed =
today.getMonth() > birth.getMonth() ||
(today.getMonth() === birth.getMonth() && today.getDate() >= birth.getDate())
if (!hasBirthdayPassed) {
yearsDiff--
}
age.value = yearsDiff
}
//
const applyFormVO = ref<PatientexamlistVO>({} as PatientexamlistVO)
//
const fordevicemValue = ref('')
//
const selectclear = async () => {
//
//
const dd = await ultrasoniccomApi.getreporttemplatelist('', '', '')
treeData.value = dd
const pridate = await ultrasoniccomApi.getreporttemplatelist('', '', '1')
privateData.value = pridate
}
const fordevicemData = ref<any[]>([])
const formRules = reactive({})
const formRef = ref() // Ref
//table
const activeName = ref('first')
//
const radio1 = ref('')
const cancelSelection = () => {
radio1.value = ''
}
//
const zdjl = ref('')
//
const sj = ref('')
//
const selectTree = ref()
//
const treeData = ref([])
//
const privateData = ref([])
//
const treeDefaultProps = {
children: 'children',
label: 'tempname'
}
//
let strzdjl: string = ''
let strsj: string = ''
let pid: string = '' //id
//
const handleTreeNodeClick = async (data) => {
strzdjl = data.diagResults
strsj = data.examDescription
pid = data.pid
console.log('父节点' + data.pid)
//
if (data.dataType === '0') {
dialogTableVisible.value = true
}
}
//
const handleselectchange = async () => {
console.log(fordevicemValue.value)
if (fordevicemValue.value) {
//
//
const dd = await ultrasoniccomApi.getreporttemplatelist('', String(fordevicemValue.value), '')
treeData.value = dd
const pridate = await ultrasoniccomApi.getreporttemplatelist(
'',
String(fordevicemValue.value),
'1'
)
privateData.value = pridate
}
}
//
let ID: number
//orgid
const orgId = ref('')
//regid
const regId = ref('')
const examid = ref('')
//
const newSrc = ref('')
/** 打开弹窗 */
const open = async (id: number, orgid: string, regid: string, examId: string, isLoaded: string) => {
resetForm()
//
if (isLoaded == '1') {
tagLoaded.value = false
activeName.value = 'second'
} else {
tagLoaded.value = true
activeName.value = 'first'
}
console.log('orgid' + orgid)
console.log('regid' + regid)
console.log('id' + id)
orgId.value = orgid
regId.value = regid
examid.value = examId
ID = id
dialogVisible.value = true
dialogTitle.value = '书写报告(影像)'
//
formLoading.value = true
try {
//
const dd = await ultrasoniccomApi.getreporttemplatelist('', String(fordevicemValue.value), '')
treeData.value = dd
console.log('返回值1' + dd)
console.log('返回值2' + treeData.value)
//
const pridate = await ultrasoniccomApi.getreporttemplatelist(
'',
String(fordevicemValue.value),
'1'
)
privateData.value = pridate
// ID
getPatientexamlist(id)
//
getlogininfo()
iframeData()
// 1iframe
setTimeout(() => {
dataLoaded.value = true // iframe
}, 200)
} finally {
formLoading.value = false
}
}
//
const iframeData = async () => {
try {
const response = await ultrasoniccomApi.getdcmlist(examid.value, orgId.value, regId.value)
if (response) {
//html
var localData = {
regid: '', // 'someNumber'
orgId: '', // 'someOrgId' ID
maxSize: 10,
do: response
}
// 'data'
localStorage.removeItem('data')
// JSON
var localStorageData = JSON.stringify(localData)
localStorage.setItem('data', localStorageData)
const Src = `/static/dicom/dicomViewPc1.html?t=${new Date().getTime()}`
newSrc.value = Src
} else {
// statussuccess
console.error('Request did not succeed:', response.data)
}
// dataLoaded.value = true // dataLoadedtrue
} catch (error) {
console.error('Error fetching data:', error)
// dataLoaded.value = true // 使dataLoadedtrue便
}
}
// ID
const getPatientexamlist = async (id: number) => {
const data = await PatientexamlistApi.getPatientexamlist(id)
applyFormVO.value = data
//
radio1.value = applyFormVO.value.diagFlag
zdjl.value = applyFormVO.value.diagResults
sj.value = applyFormVO.value.examDescription
notes.value = applyFormVO.value.notes
calculateAge(applyFormVO.value.birthday)
if (applyFormVO.value.reportstatus == '已分检' || applyFormVO.value.reportstatus == '待分析') {
savedisabled.value = false
} else {
savedisabled.value = true
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
// 使v-print
const PrintForm = () => {
// window.print()
//
emit('success')
}
//
const getlogininfo = async () => {
Profilevo.value = await getUserProfile()
console.log('审核是否可见' + Profilevo.value.isimageexamine)
if (Profilevo.value.isimageexamine === '1') {
examinedisabled.value = true
}
}
/** 重置表单 */
const resetForm = () => {
applyFormVO.value = {} as PatientexamlistVO
pid = ''
strzdjl = ''
strsj = ''
activeName.value = 'first'
updateexamineimage.value = []
selectTree.value = ''
treeData.value = []
privateData.value = []
fordevicemData.value = []
fordevicemValue.value = ''
upFJApplyformVO.value = []
formRef.value?.resetFields()
orgId.value = ''
regId.value = ''
}
</script>
<style>
/* .my-container-yx {
height: 100vh;
width: 100vw;
}
*/ /* 报告区域 左侧模版选择字体大小 */
.treeStyle {
font-size: 20px;
}
/* 分割线内部的间距 */
.el-divider--horizontal {
margin: 6px;
}
/* 阴性 阳性 */
.radio-group-wrapper {
display: flex;
justify-content: flex-end;
margin-top: 10px; /* 调整上方外边距 */
margin-right: 33px;
}
/* 诊断医生等样式 */
.form-row-yx {
display: flex;
justify-content: space-around; /* 将元素左右对齐 */
margin-top: 10px;
margin-left: 100px;
}
</style>

View File

@ -0,0 +1,602 @@
<template>
<ContentWrap style="height: 145px">
<!-- 搜索工作栏 影像工作站-->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="100px"
>
<el-row :gutter="8">
<el-col :span="4">
<el-form-item label="检查单号" prop="examId">
<el-input
v-model="queryParams.examId"
placeholder="检查单号"
clearable
@keyup.enter="handleQuery"
class="!w-160px"
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="患者姓名" prop="pName">
<el-input
v-model="queryParams.pname"
placeholder="请输入患者姓名"
clearable
@keyup.enter="handleQuery"
class="!w-160px"
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="检查项目" prop="examItemName">
<el-input
v-model="queryParams.examItemName"
placeholder="请输入检查项"
clearable
@keyup.enter="handleQuery"
class="!w-160px"
/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="报告状态" prop="reportstatus">
<el-select
v-model="queryParams.reportstatus"
placeholder="请选择报告状态"
clearable
class="!w-160px"
>
<el-option label="已分检" value="已分检" />
<el-option label="已分析" value="已分析" />
<el-option label="待分析" value="待分析" />
<el-option label="已审核" value="已审核" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-col :span="24">
<el-form-item label="检查日期" prop="examDate" size="mini">
<!-- aaaaa -->
<el-radio-group
ref="examDate_radio"
v-model="examDate_radio_value"
@change="examDate_radio_change"
>
<el-radio style="margin-right: 15px" :value="0">全部</el-radio>
<el-radio style="margin-right: 15px" :value="1">今天</el-radio>
<el-radio style="margin-right: 15px" :value="2">昨天</el-radio>
<el-radio style="margin-right: 15px" :value="3">三天内</el-radio>
<el-radio style="margin-right: 15px" :value="4">一周</el-radio>
<el-radio style="margin-right: 25px" :value="5">
<el-date-picker
ref="examDate_picker"
:disabled="examDate_radio_value === 5 ? false : true"
v-model="queryParams.examDate"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
/>
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-form>
<el-form-item>
<el-button
@click="handleQuery"
style="
margin-right: 0px;
margin-left: auto;
background-color: rgba(56, 119, 246, 1);
font-size: 14px;
color: rgba(255, 255, 255, 1);
"
><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button
>
<el-button @click="resetQuery" style=""
><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button
>
<!-- <el-button
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['tblist:patientexamlist:create']"
v-if="false"
>
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button> -->
</el-form-item>
</ContentWrap>
<ContentWrap style="height: 65px">
<el-form-item>
<el-button
style="
margin-right: 0px;
margin-left: auto;
background-color: rgb(56, 119, 246);
font-size: 14px;
color: rgb(255, 255, 255);
"
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['tblist:patientexamlist:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
<el-button
@click="dicomDataSync"
style="background-color: rgb(28, 176, 117); font-size: 14; color: rgb(255, 255, 255)"
><Icon icon="ep:refresh" class="mr-5px" /> 同步</el-button
>
<el-button
@click="dicomDataRefresh"
style="background-color: rgb(28, 176, 117); font-size: 14; color: rgb(255, 255, 255)"
><Icon icon="ep:refresh" class="mr-5px" /> 刷新</el-button
>
<el-button
@click="selectcollect"
style="background-color: rgb(28, 176, 117); font-size: 14; color: rgb(255, 255, 255)"
><Icon icon="ep:search" class="mr-5px" /> 查询收藏</el-button
>
</el-form-item>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-table
v-loading="loading"
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
@row-dblclick="handleEdit"
:header-cell-style="{ background: 'rgb(235, 241, 250)', height: '56px', color: '#333333' }"
:row-style="{ height: '56px' }"
>
<el-table-column type="index" width="50px" />
<el-table-column label="" width="100px" v-if="false">
<template #default="scope">
<el-image :src="scope.row.thumbnailImgUrl" />
</template>
</el-table-column>
<el-table-column label="主键" align="center" prop="id" v-if="false" />
<el-table-column label="检查项目名称" align="center" prop="examItemName" width="180px" />
<el-table-column label="检查单号" align="center" prop="examId" width="250px" />
<el-table-column label="患者姓名" align="center" prop="pname" width="200px" />
<el-table-column label="性别" align="center" prop="gender" />
<el-table-column label="出生日期" align="center" prop="birthday" v-if="false" />
<el-table-column
label="检查日期"
align="center"
prop="examDate"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="设备类型" align="center" prop="deviceType" />
<el-table-column label="序列/数量" align="center" prop="seDc" width="100px" />
<el-table-column label="报告状态" align="center" prop="reportstatus" width="100px">
<template #default="scope">
<!-- 使用Flexbox布局将内容垂直排列 -->
<div style="display: flex; flex-direction: column; align-items: center">
<div>
<el-tag :type="scope.row.reportstatus === '已审核' ? 'danger' : 'success'">
<span style="">{{ scope.row.reportstatus }}</span>
</el-tag>
</div>
<!-- 根据highLevelOrgId是否为空判断是否显示"已申请" -->
<div v-if="scope.row.highLevelOrgId">
<el-tag>
<span>已申请</span>
</el-tag>
</div>
</div>
</template>
</el-table-column>
<el-table-column
label="申请日期"
align="center"
prop="applicationDate"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column
label="上传时间"
align="center"
prop="uploadDate"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="机构名称" align="center" prop="orgName" width="280px" />
<el-table-column label="机构ID" align="center" prop="orgId" v-if="false" />
<el-table-column
label="上级判读机构id列表orgid1,orgid2,orgid3"
align="center"
prop="highLevelOrgId"
v-if="false"
/>
<el-table-column
label="创建时间:年月日时分秒"
align="center"
prop="createDate"
:formatter="dateFormatter"
width="180px"
v-if="false"
/>
<el-table-column label="检查所见" align="center" prop="examDescription" v-if="false" />
<el-table-column label="诊断结论" align="center" prop="diagResults" v-if="false" />
<el-table-column
label="下诊断结论的时间:年月日时分秒"
align="center"
prop="diagDate"
:formatter="dateFormatter"
width="180px"
v-if="false"
/>
<el-table-column label="诊断医生" align="center" prop="diagDoctor" v-if="false" />
<el-table-column label="审核医生" align="center" prop="reviewDoctor" v-if="false" />
<el-table-column
label="审核日期:年月日时分秒"
align="center"
prop="reviewDate"
:formatter="dateFormatter"
width="180px"
v-if="false"
/>
<el-table-column
label="框架需要:创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
v-if="false"
/>
<el-table-column label="操作" align="center" fixed="right" width="180px">
<template #default="scope">
<el-button
link
style="color: rgb(56, 119, 246)"
size="small"
type="primary"
@click.stop="getuporghiorgid(scope.row.id, scope.row.orgId, scope.row.reportstatus)"
v-hasPermi="['tblist:patientexamlist:query']"
>
申请
</el-button>
<el-button link type="danger" @click.stop="collect(scope.row.id, scope.row.isFavourite)">
<el-icon v-if="scope.row.isFavourite==='1'"><StarFilled /></el-icon>
<el-icon v-else><Star /></el-icon>
</el-button>
<el-button
link
@dblclick.stop
style="color: rgb(56, 119, 246)"
size="small"
type="primary"
@click.stop="openexe(scope.row.id,scope.row.orgId,scope.row.regId,scope.row.examId)"
>
调图
</el-button>
<el-button
link
style="color: rgb(56, 119, 246)"
size="small"
type="primary"
@click.stop=" handleEdit(scope.row,'1')"
>
报告
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</ContentWrap>
<!-- 表单弹窗影像组件 -->
<DicomViewForm ref="dicomViewRef" @success="getList" />
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { PatientexamlistApi, PatientexamlistVO } from '@/api/tblist/patientexamlist'
import PatientexamlistForm from './PatientexamlistForm.vue'
import DicomViewForm from '/src/views/dicomPathologyForm/dicomPathologyViewForm.vue'
import { ultrasoniccomApi } from '@/api/ultrasoniccom'
/** PACS检查列表 列表 */
defineOptions({ name: 'PatientexamPathology' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<PatientexamlistVO[]>([]) //
const total = ref(0) //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
examId: undefined,
pname: undefined,
gender: undefined,
birthday: undefined,
examDate: [],
deviceType: '',
seDc: undefined,
examItemName: undefined,
reportstatus: '',
applicationDate: [],
uploadDate: [],
orgName: undefined,
orgId: '',
highLevelOrgId: '',
createDate: [],
examDescription: undefined,
diagResults: undefined,
diagDate: [],
diagDoctor: undefined,
reviewDoctor: undefined,
reviewDate: [],
thumbnailImgUrl: undefined,
createTime: [],
isFavourite: ''
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 影像组件 */
const dicomViewRef = ref()
const opendicomViewFrom = (id: number, orgid: string, regid: string, examId: string,isLoaded:string) => {
dicomViewRef.value.open(id, orgid, regid, examId,isLoaded)
}
/** 表格行点击 */
const clickNumber = ref(0)
function handleEdit(row,isLoaded:string) {
console.log(111111121212)
if (!row.deviceType.includes('US')) {
//US
opendicomViewFrom(row.id, row.orgId, row.regId, row.examId,isLoaded)
/* clickNumber.value++;
if (clickNumber.value == 2) {
}
clickNumber.value = 0; */
}
}
/** aaaaa **/
const examDate_picker = ref(null)
const examDate_radio = ref(null)
const examDate_radio_value = ref(3)
const examDate_radio_change = () => {
if ([1, 2, 3, 4].includes(examDate_radio_value.value)) {
let timesta = new Date()
let timeend = new Date()
//
if (examDate_radio_value.value === 1) {
queryParams.examDate = [nowDate(timesta), nowDate(timeend)]
} else if (examDate_radio_value.value === 2) {
timesta.setDate(timesta.getDate() - 1)
queryParams.examDate = [nowDate(timesta), nowDate(timeend)]
} else if (examDate_radio_value.value === 3) {
timesta.setDate(timesta.getDate() - 3)
queryParams.examDate = [nowDate(timesta), nowDate(timeend)]
} else if (examDate_radio_value.value === 4) {
timesta.setDate(timesta.getDate() - 7)
queryParams.examDate = [nowDate(timesta), nowDate(timeend)]
}
handleQuery()
} else if (5 === examDate_radio_value.value) {
queryParams.examDate = []
} else if (0 === examDate_radio_value.value) {
queryParams.examDate = []
handleQuery()
}
}
///
function nowDate(time) {
var year = time.getFullYear() //
var month = (time.getMonth() + 1).toString().padStart(2, '0') //
var date = time.getDate().toString().padStart(2, '0') //
var hour = time.getHours().toString().padStart(2, '0') //
var minute = time.getMinutes().toString().padStart(2, '0') //
var second = time.getSeconds().toString().padStart(2, '0') //
return year + '-' + month + '-' + date + ' ' + hour + ':' + minute + ':' + second
}
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
queryParams.deviceType = 'CT'
const data = await PatientexamlistApi.getPatientexamlistPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
//
const collect = async (id: string, isFavourite: string) => {
if (isFavourite == '0') {
await PatientexamlistApi.CollectAndCancellation(id,"1")
message.success('收藏成功')
} else if (isFavourite == '1') {
await PatientexamlistApi.CollectAndCancellation(id,"0")
message.success('取消成功')
}
examDate_radio_change()
}
const dicomDataSync = async () => {
const data = await PatientexamlistApi.dicomDataSync()
if (data.code == 'success') {
if (data.syncItems == '0') {
message.info('暂无可同步数据')
} else {
queryParams.reportstatus = '待分析'
examDate_radio_value.value = 0
examDate_radio_change()
message.success('数据同步成功')
}
} else {
message.error('数据同步失败')
}
}
//
const dicomDataRefresh = async () => {
await PatientexamlistApi.dicomDataRefresh()
examDate_radio_change()
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
queryParams.deviceType = 'CT'
queryParams.isFavourite=''
getList()
}
//
const selectcollect=()=>
{
queryFormRef.value.resetFields()
queryParams.pageNo = 1
queryParams.deviceType = 'CT'
queryParams.isFavourite='1'
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
/** aaaaa **/
//
examDate_radio_value.value = 1
examDate_radio_change()
if (5 === examDate_radio_value.value) handleQuery()
//
//handleQuery();
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
/** 申请后更新上级机构字段*/
const getuporghiorgid = async (id: number, orgId: string, reportstatus: string) => {
try {
await message.confirm('是否要进行申请?', '确认提示')
const data = await PatientexamlistApi.getuporghiid(id, orgId)
if (data == '申请成功') {
message.success('申请成功')
//
await getList()
} else {
await message.info(data)
}
} catch {}
}
// exe
const openexe= (id: number, orgid: string, regid: string, examId: string)=>
{
//
try {
const url = `f1://${examId+','+orgid+','+regid}`;
console.log(url)
window.location.href = url
} catch (error) {
console.error('Error fetching data:', error)
}
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await PatientexamlistApi.deletePatientexamlist(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 申请按钮操作 */
const handleSub = async (id: number) => {
try {
//
await message.delConfirm()
//
await PatientexamlistApi.deletePatientexamlist(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await PatientexamlistApi.exportPatientexamlist(queryParams)
download.excel(data, 'PACS检查列表.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
//
/** aaaaa **/
//
examDate_radio_change()
if (5 === examDate_radio_value.value) handleQuery()
//
//getList();
})
</script>
<style>
/* 为了防止 el-form-item 的标签文本换行可以添加以下CSS样式 */
.el-form-item__label {
white-space: nowrap;
}
</style>