适配已有数据的卫生院
This commit is contained in:
parent
b9dcee834c
commit
d3b3a480d0
@ -3,17 +3,55 @@ import axios from 'axios'
|
||||
const apiUrl = 'https://pacs.gw12320.com/adminecg/admin-api/tblist/ecganalysisparas/rpc-processImage'
|
||||
const imageAddress = 'F://陕西省咸阳市礼泉县心电图FTP/ecgimage/'
|
||||
const originImageAddress = 'https://zzxmc.gw12320.com/ecgimage/'
|
||||
// const apiUrl = 'https://localhost:48080/admin-api/tblist/ecganalysisparas/rpc-processImage'
|
||||
// const imageAddress = 'F://陕西省咸阳市礼泉县心电图FTP/ecgimage/'
|
||||
// const originImageAddress = 'https://zzxmc.gw12320.com/ecgimage/'
|
||||
|
||||
// 超声组件 API
|
||||
export const processImageApi = {
|
||||
// 查询模版表数据
|
||||
paramsList:[{
|
||||
startX:1800,
|
||||
startY:100,
|
||||
height:400,
|
||||
width:900,
|
||||
options:{watermarkFontSize:40,enableAreaCover:true,enableOcr:false}
|
||||
},{}],
|
||||
paramsList:{
|
||||
"礼泉县裴寨卫生院":{
|
||||
startX:1800,
|
||||
startY:100,
|
||||
height:400,
|
||||
width:900,
|
||||
step:"诊断结果:",
|
||||
options:{watermarkFontSize:40}
|
||||
},
|
||||
"药王洞卫生院":{
|
||||
startX:1200,
|
||||
startY:140,
|
||||
height:350,
|
||||
width:950,
|
||||
step:" 诊断结果:",
|
||||
options:{watermarkFontSize:40}
|
||||
},
|
||||
"史德卫生院":{
|
||||
startX:990,
|
||||
startY:2910,
|
||||
height:400,
|
||||
width:800,
|
||||
step:" ",
|
||||
options:{watermarkFontSize:40}
|
||||
},
|
||||
"礼泉县城关卫生院":{
|
||||
startX:2700,
|
||||
startY:340,
|
||||
height:600,
|
||||
width:2400,
|
||||
step:"诊断结果:",
|
||||
options:{watermarkFontSize:40}
|
||||
},
|
||||
"北屯中心卫生院":{
|
||||
startX:1800,
|
||||
startY:100,
|
||||
height:400,
|
||||
width:900,
|
||||
step:"诊断结果:",
|
||||
options:{watermarkFontSize:40}
|
||||
}
|
||||
},
|
||||
processImg: async (params: any) => {
|
||||
try {
|
||||
const response = await axios({
|
||||
@ -22,7 +60,7 @@ export const processImageApi = {
|
||||
data: params,
|
||||
withCredentials: true
|
||||
})
|
||||
return response.data
|
||||
return response
|
||||
} catch (error) {
|
||||
console.error('Error fetching image:', error)
|
||||
throw error
|
||||
|
||||
@ -814,11 +814,17 @@ async function process() {
|
||||
// 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
|
||||
let header = processImageApi.paramsList[rowinfo.value.orgName]
|
||||
data.watermarkText = header + queryParams.value.doctorDiagResult
|
||||
// console.log(data)
|
||||
data.imagePath = processImageApi.urlToAddress(data.imagePath)
|
||||
const processResponse = await processImageApi.processImg(data)
|
||||
if (!processResponse.data.updateSuccess){
|
||||
// 1. 解析外层 JSON 的 data 字符串
|
||||
const dataObj = JSON.parse(response.data);
|
||||
|
||||
// 2. 直接获取 updateSuccess 的值
|
||||
const updateSuccess = dataObj.updateSuccess;
|
||||
if (!updateSuccess){
|
||||
message.warning('诊断图片生成异常')
|
||||
}
|
||||
console.log(processResponse)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user