报告打印统计功能修改

This commit is contained in:
旺仔 2024-08-16 12:24:01 +08:00
parent 688f4fc5e2
commit 3964129d1a

View File

@ -102,7 +102,7 @@
<el-button @click="handleQuery"> <el-button @click="handleQuery">
<Icon icon="ep:search" class="mr-2px" /> 搜索 <Icon icon="ep:search" class="mr-2px" /> 搜索
</el-button> </el-button>
<el-button type="primary" plain> <el-button type="primary" plain v-if="false">
<Icon icon="ep:printer" class="mr-2px" /> 打印 <Icon icon="ep:printer" class="mr-2px" /> 打印
</el-button> </el-button>
</div> </div>
@ -116,7 +116,7 @@
:stripe="true" :stripe="true"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
:data="list_infos" :data="list_infos"
height="max(30vh,294px)" height="max(calc(100vh - 460px),280px)"
@row-click="handleRowClick" @row-click="handleRowClick"
> >
<el-table-column type="index" label="序号" align="center" width="54px" /> <el-table-column type="index" label="序号" align="center" width="54px" />
@ -318,19 +318,24 @@
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="报告单" name="reportInfo"> <el-tab-pane label="报告单" name="reportInfo">
<div class="flex-center" id="printMe" style="height: calc(100% - 15px)"> <div
class="flex-center"
id="printMe"
style="min-height: calc(100% - 15px)"
v-if="reportInfoType == 'us'"
>
<div class="ultrasound-report" id="PDF"> <div class="ultrasound-report" id="PDF">
<h2>超声检查报告单</h2> <h2>超声检查报告单</h2>
<hr /> <hr />
<div class="patient-info"> <div class="patient-info">
<p class="info-item">姓名{{ infoParams.pname }}</p>
<p class="info-item">送检科室{{ infoParams.billDoctorDepartment }}</p>
<p class="info-item">门诊号{{ infoParams.regId }}</p> <p class="info-item">门诊号{{ infoParams.regId }}</p>
<p class="info-item">姓名{{ infoParams.pname }}</p>
<p class="info-item">性别{{ infoParams.gender }}</p> <p class="info-item">性别{{ infoParams.gender }}</p>
<p class="info-item">年龄{{ age }}</p> <p class="info-item">年龄{{ age }}</p>
<p class="info-item">设备{{ infoParams.deviceName }}</p>
<p class="info-item">检查号{{ infoParams.examId }}</p> <p class="info-item">检查号{{ infoParams.examId }}</p>
<p class="info-item">检查类型{{ infoParams.examItemName }}</p> <p class="info-item">检查类型{{ infoParams.examItemName }}</p>
<p class="info-item">设备{{ infoParams.deviceName }}</p>
<p class="info-item">送检科室{{ infoParams.billDoctorDepartment }}</p>
</div> </div>
<hr /> <hr />
<h3>超声图像</h3> <h3>超声图像</h3>
@ -361,12 +366,99 @@
<p>{{ infoParams.diagResults }}</p> <p>{{ infoParams.diagResults }}</p>
</div> </div>
<div style="position: absolute; bottom: 20px; right: 20px"> <div style="position: absolute; bottom: 20px; right: 20px">
<p>医生签名{{}}</p> <p>医生签名{{ infoParams.reviewDoctor }}</p>
<!-- <p>时间xxx</p> --> </div>
</div>
<el-divider />
<div>
<el-button
type="primary"
style="width: 100px; float: right"
class="ignore-print"
v-print="'printMe'"
>打印</el-button
>
</div>
</div>
<div
class="flex-center"
id="printMe"
style="min-height: calc(100% - 15px)"
v-if="reportInfoType == 'ct'"
>
<div class="ultrasound-report2" id="PDF">
<el-row style="font-size: 14px">
<el-col :span="12">
<h2 class="ml-6px">科右前旗康立寿医院</h2>
</el-col>
<el-col :span="12">
<h2 style="text-align: right" class="mr-6px">CT检查报告单</h2>
</el-col>
</el-row>
<hr />
<el-row style="font-size: 14px">
<el-col :span="24" class="mb-8px">
<div class="ml-6px">患者编号</div>
<div class="ml-6px">{{ infoParams.regId }}</div>
</el-col>
<el-col :span="24">
<div class="ml-6px">检查编号</div>
<div class="ml-6px">{{ infoParams.examId }}</div>
</el-col>
</el-row>
<hr />
<div class="patient-info2">
<p class="info-item" v-if="false">门诊号{{ infoParams.regId }}</p>
<p class="info-item">姓名{{ infoParams.pname }}</p>
<p class="info-item">性别{{ infoParams.gender }}</p>
<p class="info-item">年龄{{ age }}</p>
<p class="info-item" v-if="false">检查号{{ infoParams.examId }}</p>
<p class="info-item" v-if="false">检查类型{{ infoParams.examItemName }}</p>
<p class="info-item">设备{{ infoParams.deviceName }}</p>
<p class="info-item">送检科室{{ infoParams.billDoctorDepartment }}</p>
</div>
<hr />
<div class="ultrasound-findings">
<h3>检查项目</h3>
<p>{{ infoParams.examItemName }}</p>
</div>
<div class="ultrasound-findings">
<h3>影像学表现</h3>
<p>{{ infoParams.examDescription }}</p>
</div>
<div class="ultrasound-recommendation">
<h3>影像学诊断</h3>
<p>{{ infoParams.diagResults }}</p>
</div>
<div style="width: 94%; position: absolute; bottom: 20px; right: 20px">
<hr />
<el-row style="font-size: 14px">
<el-col :span="6" class="pl-6px">报告医师{{ infoParams.diagDoctor }}</el-col>
<el-col :span="6"
>报告日期{{
formatDate(infoParams.diagDate as unknown as Date, 'YYYY-MM-DD')
}}</el-col
>
<el-col :span="6">审核医师{{ infoParams.reviewDoctor }}</el-col>
<el-col :span="6"
>审核日期{{
formatDate(infoParams.reviewDate as unknown as Date, 'YYYY-MM-DD')
}}</el-col
>
</el-row>
<div
style="
font-size: 11px;
text-align: center;
margin-top: 12px;
margin-bottom: -14px;
"
>
本报告只作临床参考不作证明材料
</div>
</div> </div>
</div> </div>
<el-divider /> <el-divider />
<!--功能区-->
<div> <div>
<el-button <el-button
type="primary" type="primary"
@ -376,7 +468,6 @@
>打印</el-button >打印</el-button
> >
</div> </div>
<div> </div>
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@ -387,7 +478,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' import { formatDate, dateFormatter, dateFormatter2 } from '@/utils/formatTime'
import download from '@/utils/download' import download from '@/utils/download'
import { ReportPrintStatisticsApi } from '@/api/applyregistration/reportPrintStatistics' import { ReportPrintStatisticsApi } from '@/api/applyregistration/reportPrintStatistics'
import { ultrasoniccomApi } from '@/api/ultrasoniccom' import { ultrasoniccomApi } from '@/api/ultrasoniccom'
@ -407,6 +498,7 @@ const infoFormRef = ref()
const message = useMessage() const message = useMessage()
const { t } = useI18n() const { t } = useI18n()
const activeTabName = ref('diagnosisInfo') const activeTabName = ref('diagnosisInfo')
const reportInfoType = ref('') //usct
const diagnosisInfo_readonly = ref(true) const diagnosisInfo_readonly = ref(true)
const deviceList = ref<any[]>([]) const deviceList = ref<any[]>([])
const reportimages = ref<any[]>([]) const reportimages = ref<any[]>([])
@ -427,7 +519,7 @@ const queryParams = ref({
examDate_ge: '', examDate_ge: '',
examDate_le: '', examDate_le: '',
deviceName: '', deviceName: '',
deviceType: '', // deviceType: '',
pname: '' pname: ''
}) })
const infoParams0 = ref({ const infoParams0 = ref({
@ -446,7 +538,12 @@ const infoParams = ref({
examDescription: '', examDescription: '',
diagResults: '', diagResults: '',
examItemName: '', examItemName: '',
deviceName: '' deviceName: '',
deviceType: '',
diagDoctor: '',
diagDate: '',
reviewDoctor: '',
reviewDate: ''
}) })
// //
const list_infos = ref<any[]>([]) const list_infos = ref<any[]>([])
@ -490,9 +587,15 @@ const resetDiagnosisInfo = async () => {
examDescription: '', examDescription: '',
diagResults: '', diagResults: '',
examItemName: '', examItemName: '',
deviceName: '' deviceName: '',
deviceType: '',
diagDoctor: '',
diagDate: '',
reviewDoctor: '',
reviewDate: ''
} }
age.value = '' age.value = ''
reportInfoType.value = ''
reportimages.value = [] reportimages.value = []
infoFormRef.value?.clearValidate() infoFormRef.value?.clearValidate()
} }
@ -521,7 +624,10 @@ const handleRowClick = (row) => {
if (row) { if (row) {
infoParams.value = row infoParams.value = row
calculateAge(row.birthday) calculateAge(row.birthday)
if (row.deviceType && row.deviceType.trim().toLowerCase() == 'us') {
reportInfoType.value = 'us'
loadimage(row.orgId, row.regId) loadimage(row.orgId, row.regId)
} else reportInfoType.value = 'ct'
} }
} }
@ -547,7 +653,7 @@ console.log(infoParams0)
* **/ * **/
</script> </script>
<style scoped> <style lang="scss" scoped>
.el-form-item__label { .el-form-item__label {
white-space: nowrap; white-space: nowrap;
} }
@ -568,40 +674,82 @@ console.log(infoParams0)
border: 1px solid #ececec; border: 1px solid #ececec;
} }
/* 报告样式 */ /**** 超声检查报告单 ****/
.ultrasound-report { .ultrasound-report {
font-family: Arial, sans-serif; font-family: Arial, sans-serif;
width: 90%; width: 94%;
margin: 20px auto; margin: 6px auto;
padding: 20px; padding: 20px;
border: 1px solid #ccc; border: 1px solid #ccc;
border-radius: 8px; border-radius: 8px;
position: relative; position: relative;
height: 800px; min-height: 750px;
} }
.ultrasound-report h1, .ultrasound-report h1,
.ultrasound-report h2 { .ultrasound-report h2 {
text-align: center; text-align: center;
} }
/* 报告的P标签 */
.patient-info { .patient-info {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.patient-info p,
.patient-info p {
font-size: 14px;
margin: 4px 6px;
min-width: calc(25% - 2 * 6px - 2px);
}
.ultrasound-recommendation {
margin-bottom: 90px;
}
.ultrasound-findings p, .ultrasound-findings p,
.ultrasound-recommendation p { .ultrasound-recommendation p {
margin: 5px 0; font-size: 16px;
margin: 5px 2px 5px 30px;
} }
.ultrasound-findings h3, .ultrasound-findings h3,
.ultrasound-recommendation h3 { .ultrasound-recommendation h3 {
margin-top: 20px; margin-top: 30px;
} }
.image-gallery { .image-gallery {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
margin: 20px 0; margin: 10px 0;
}
/* 不打印区域 */
@media print {
.ignore-print {
display: none;
}
}
/**** CT报告单 ****/
.ultrasound-report2 {
font-family: Arial, sans-serif;
width: 94%;
margin: 6px auto;
padding: 20px;
border: 1px solid #ccc;
border-radius: 8px;
position: relative;
min-height: 750px;
}
.patient-info2 {
display: flex;
flex-wrap: wrap;
}
.patient-info2 p {
font-size: 14px;
margin: 4px 6px;
min-width: calc(33.33% - 2 * 6px - 2px);
} }
</style> </style>