调整前端不同卫生院机构的处理图片参数

This commit is contained in:
yy2205 2025-05-22 08:59:42 +08:00
parent 2d933810bb
commit 8376736e7e
2 changed files with 11 additions and 142 deletions

View File

@ -17,7 +17,7 @@ export const processImageApi = {
height:400,
width:900,
step:"诊断结果:",
options:{watermarkFontSize:40}
options:{watermarkFontSize:40,enablePdf:true}
},
"药王洞卫生院":{
startX:1200,
@ -25,7 +25,7 @@ export const processImageApi = {
height:350,
width:950,
step:" 诊断结果:",
options:{watermarkFontSize:40}
options:{watermarkFontSize:40,enablePdf:true}
},
"史德卫生院":{
startX:990,
@ -33,7 +33,7 @@ export const processImageApi = {
height:400,
width:800,
step:" ",
options:{watermarkFontSize:40}
options:{watermarkFontSize:40,enablePdf:true}
},
"礼泉县城关卫生院":{
startX:2700,
@ -41,7 +41,7 @@ export const processImageApi = {
height:600,
width:2400,
step:"诊断结果:",
options:{watermarkFontSize:40}
options:{watermarkFontSize:40,enablePdf:true}
},
"北屯中心卫生院":{
startX:1800,
@ -49,7 +49,7 @@ export const processImageApi = {
height:400,
width:900,
step:"诊断结果:",
options:{watermarkFontSize:40}
options:{watermarkFontSize:40,enablePdf:true}
}
},
processImg: async (params: any) => {

View File

@ -499,46 +499,8 @@
:close-on-click-modal="false"
:close-on-press-escape="false"
:destroy-on-close="true"
@close="printclose"
>
<!--打印弹窗()-->
<ECGprint :imagebase64="imagebase64" />
</el-dialog>
<div style="position: fixed; top: 0; left: 0; z-index: -100">
<div id="hiddenPdfDiv" v-if="false && isprintimage">
<!--心电图-->
<ECGhtmlprint
style="height: 1080px; width: 1920px; page-break-after: always; visibility: hidden"
:extraInfo="queryParams"
:jsonurl="queryParams.ecgJsonDataFilePath"
:-isgrid="Isgrid"
:-ismeasure="Ismeasure"
:-isfd="IsFD"
:lineratio="0.025"
:suduratio="suduratio"
:isrefresh="isrefresh"
:iscorrect="correct"
@update:value="handleUpdate"
:printimage="isprintimage"
@update:image="updateimagebase"
:age="age"
:billDoctorDepartment="rowinfo.billDoctorDepartment"
:doctorname="rowinfo.doctorname"
:regId="id"
:pname="rowinfo.pname"
:gender="rowinfo.gender"
/>
</div>
</div>
<el-dialog
v-model="isdiagshow"
:fullscreen="true"
append-to-body
:close-on-click-modal="false"
:destroy-on-close="true"
@closed="printclose"
>
<!--打印弹窗()-->
<template #title>
<div
style="
@ -567,54 +529,7 @@
<el-divider style="margin-top: 8px; margin-bottom: 1px" />
</div>
<div id="printMe_ecg">
<div class="page-item-ecg">
<ReportInfoECG
v-if="false"
style="height: 99.888%"
:extraInfo="queryParams"
:jsonurl="queryParams.ecgJsonDataFilePath"
:lineratio="0.025"
:suduratio="suduratio"
:age="age"
:billDoctorDepartment="rowinfo.billDoctorDepartment"
:doctorname="rowinfo.doctorname"
:regId="id"
:orgName="rowinfo.orgName"
:pname="rowinfo.pname"
:gender="rowinfo.gender"
/>
<el-image
v-if="false"
alt=""
fit="fill"
loading="eager"
:style="{
width: '100%',
imageRendering: 'high-quality',
minHeight: imagebase64_new ? '0' : '68vh'
}"
:src="imagebase64_new"
crossorigin="anonymous"
v-loading="!imagebase64_new"
>
<template #error>
<div style="text-align: center; font-size: 20px; margin-top: 6vh">加载中...</div>
</template>
</el-image>
<div v-loading="!imagebase64_new" element-loading-text="加载中...">
<el-image :src="imagebase64_new"/>
<!-- <iframe
v-if="true"
id="pdf_view"
name="pdf_view"
:src="imagebase64_new ? imagebase64_new + '#view=Fit&navpanes=0' : 'about:blank'"
frameborder="0"
class="pdf_view"
width="100%"
height="100%"
></iframe>-->
</div>
</div>
<el-image :src="imagebase64_new" style="width: 100%; height: 100%;" />
</div>
</el-dialog>
<div style="position: fixed; top: 0; left: 0; z-index: -1100">
@ -670,6 +585,8 @@ import ECGSB from '@/views/ECG/ECGSB.vue'
import { ElLoading } from 'element-plus'
import { log } from 'console'
import { processImageApi } from '@/api/processImage'
import jsPDF from 'jspdf'
import VuePdfEmbed from 'vue-pdf-embed'
const { toClipboard } = useClipboard()
const emit = defineEmits(['success']) // success
@ -715,6 +632,7 @@ const keyid = ref() //当前数据行的主键ID
const savedisabled = ref(false) //
const isPictureVisible = ref(false) //
const loading = ref(false) //
//
const treeDefaultProps = {
children: 'children',
@ -1026,67 +944,18 @@ function printclose() {
}
//
function print() {
//isprintimage.value = false
isdiagshow.value = false
if (applyFormVO.value && applyFormVO.value.reportstatus != '已审核') {
message.alertError('请审核后再进行打印')
} else if (!applyFormVO.value.pdfurl) {
message.alertError('未获取到相关数据')
} else {
//isprintimage.value = true
isdiagshow.value = true
nextTick(() => {
setTimeout(async () => {
if (applyFormVO.value.pdfurl) {
imagebase64_new.value = applyFormVO.value.pdfurl.trim()
} else if (false) {
let doctorEcgDiagInfo: any = null
if (queryParams.value && queryParams.value.doctorId) {
doctorEcgDiagInfo = await EcganalysisparasApi.getDoctorBydoctorID(
queryParams.value.doctorId.trim()
)
}
let mapRes = await EcganalysisparasApi.getEcgPdfImage({
type: 2,
regid: id.value,
examid: queryParams.value.examId,
name: rowinfo.value.pname,
gender: rowinfo.value.gender,
age: age.value,
ward: '',
hr: queryParams.value.hr,
pr: queryParams.value.pr,
qrs: queryParams.value.qrsAxle,
qtqtc: queryParams.value.qt + '/' + queryParams.value.qtc,
rv5sv1: queryParams.value.rv5 + '/' + queryParams.value.sv1,
rv5sv1plus: (
Number(queryParams.value.rv5 ? queryParams.value.rv5 : '') +
Number(queryParams.value.sv1 ? queryParams.value.sv1 : '')
).toString(),
pt:
queryParams.value.paxle +
'/' +
queryParams.value.taxle +
'/' +
queryParams.value.qrsAxle,
ptimelimit: queryParams.value.ptimeLimit,
diagnosisHint: '',
department: rowinfo.value.billDoctorDepartment,
doctorDiagTime: formatDate(
queryParams.value.doctorDiagTime as any,
'YYYY-MM-DD HH:mm:ss'
),
diagContent: queryParams.value.doctorDiagResult,
DepartName: queryParams.value.departName,
doctorName: queryParams.value.doctorName,
image: doctorEcgDiagInfo ? doctorEcgDiagInfo.esignatureUrl : '',
filepath: queryParams.value.ecgJsonDataFilePath,
orgid: orgid.value,
orgname: rowinfo.value.orgName
})
if (mapRes && mapRes.code == '200') {
imagebase64_new.value = mapRes.dataImage
}
const fileUrl = applyFormVO.value.pdfurl.trim()
imagebase64_new.value = fileUrl
}
}, 100)
})