From 357c977e988b5996f7ec419ee6296e50e560d631 Mon Sep 17 00:00:00 2001 From: yy2205 <2238220225@qq.com> Date: Fri, 16 May 2025 15:09:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E6=97=B6=E5=A4=84=E7=90=86?= =?UTF-8?q?=E5=9B=BE=E7=89=87,=E8=B0=83=E7=94=A8=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/processImage/index.ts | 30 ++++++++++++++++++++++++------ src/views/ECG/ECGForm.vue | 19 ++++++++++++++----- 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/src/api/processImage/index.ts b/src/api/processImage/index.ts index f5110228..c4919224 100644 --- a/src/api/processImage/index.ts +++ b/src/api/processImage/index.ts @@ -1,4 +1,7 @@ import axios from 'axios' +const apiUrl = 'https://zzxmc.gw12320.com/processImage' +const imageAddress = 'F://陕西省咸阳市礼泉县心电图FTP/ecgimage/' +const originImageAddress = 'https://zzxmc.gw12320.com/ecgimage/' // 超声组件 API export const processImageApi = { @@ -8,18 +11,14 @@ export const processImageApi = { startY:100, height:400, width:900, - options:{watermarkFontSize:40} + options:{watermarkFontSize:40,enableAreaCover:true} },{}], processImg: async (params: any) => { try { const response = await axios({ method: 'post', - url: 'https://zzxmc.gw12320.com/processImage', + url: apiUrl, data: params, - headers: { - 'Content-Type': 'application/json', - 'Access-Control-Allow-Origin': '*' - }, withCredentials: true }) return response.data @@ -27,5 +26,24 @@ export const processImageApi = { console.error('Error fetching image:', error) throw error } + }, + urlToAddress:(url)=>{ + // https://zzxmc.gw12320.com/ecgimage/北屯中心/K021180213001N0003_20250418162136.jpg + if (!url){ + return + } + console.log(imageAddress) + const str = url.replace(originImageAddress,imageAddress) + console.log(str) + return str; + }, + addressToUrl:(address)=>{ + if (!address){ + return + } + console.log(imageAddress) + const str = address.replace(imageAddress,originImageAddress) + console.log(str) + return str; } } diff --git a/src/views/ECG/ECGForm.vue b/src/views/ECG/ECGForm.vue index 77eeb436..8c5a90e9 100644 --- a/src/views/ECG/ECGForm.vue +++ b/src/views/ECG/ECGForm.vue @@ -801,19 +801,28 @@ const open = async (row: any) => { } //审核功能 async function process() { - const processResponse = await processImageApi.processImg() + let data = Object.assign({},processImageApi.paramsList[0]) + data.imagePath = "F:\\陕西省咸阳市礼泉县心电图FTP\\ecgimage\\北屯中心卫生院\\K021180213001N0003_20250418161404.jpg" + // data.imagePath = queryParams.value.ecgJsonDataFilePath + // data.imagePath = "https://zzxmc.gw12320.com/ecgimage/%E5%8C%97%E5%B1%AF%E4%B8%AD%E5%BF%83%E5%8D%AB%E7%94%9F%E9%99%A2/K021180213001N0003_20250418162136.jpg" + data.examId = rowinfo.value.examId + data.orgId = rowinfo.value.orgId + data.watermarkText = "诊断结果:\n"+ queryParams.value.doctorDiagResult + console.log(data) + data.imagePath = processImageApi.urlToAddress(data.imagePath) + const processResponse = await processImageApi.processImg(data) console.log(processResponse) if (applyFormVO.value.reportstatus === '已分析') { // 审核确认 await message.delConfirm('是否进行审核操作', '审核') - // const response = await PatientexamlistApi.examine(keyid.value,Profilevo.value.doctorname,Profilevo.value.doctorID) + const response = await PatientexamlistApi.examine(keyid.value,Profilevo.value.doctorname,Profilevo.value.doctorID) - // if (response) { + if (response) { message.alertSuccess('审核成功') - // await getPatientexamlist(keyid.value) + await getPatientexamlist(keyid.value) emit('success') savedisabled.value = true - // } + } } else if (applyFormVO.value.reportstatus === '已审核') { message.warning('已经审核,无需再次审核') } else {