完成超声模块相关内容

This commit is contained in:
lxd 2024-07-19 21:17:27 +08:00
parent 0ca81a9c25
commit ce4976b062
10 changed files with 2218 additions and 1397 deletions

View File

@ -86,7 +86,7 @@
"source.fixAll.eslint": "explicit"
},
"[vue]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"i18n-ally.localesPaths": ["src/locales"],
"i18n-ally.keystyle": "nested",

View File

@ -49,7 +49,9 @@
"element-plus": "2.6.1",
"fast-xml-parser": "^4.3.2",
"highlight.js": "^11.9.0",
"html2canvas": "^1.4.1",
"jsencrypt": "^3.3.2",
"jspdf": "^2.5.1",
"lodash-es": "^4.17.21",
"min-dash": "^4.1.1",
"mitt": "^3.0.1",

File diff suppressed because it is too large Load Diff

View File

@ -29,7 +29,8 @@ export interface PatientexamlistVO {
regId: string // 登记单号
diagFlag: string // 阴性阳性标记
deviceName: string // 影像设备名称
notes:string//备注
billDoctorDepartment:string// 开单科室 送检科室
}
// PACS检查列表 API
@ -68,4 +69,9 @@ export const PatientexamlistApi = {
getuporghiid: async (id: number,orgId:String) => {
return await request.get({ url: `/tblist/patientexamlist/UPDATEHigOrg?id=${id}&&orgId=${orgId}` })
},
// 超声审核修改
examineupdatelist: async (data: PatientexamlistVO) => {
return await request.put({ url: `/tblist/patientexamlist/examineupdate`, data })
},
}

View File

@ -1,10 +1,31 @@
import request from '@/config/axios'
//分检操作使用
export interface updateexamineimageVO {
id: string // 主键
isDelete: string // 删除标记
deletePerson:string//删除人
selected:string//是否选中
}
// 超声组件 API
export const ultrasoniccomApi = {
// 查询模版表数据
getreporttemplatelist: async (orgID: string,type:string,isprivate:string) => {
return await request.get({ url: `/ultrasoniccom/ultrasonic/reporttemplatetlist?orgID=${orgID}&&type=${type}&&isprivate=${isprivate}` })
},
// 查询图片表数据
getimageslist: async (orgID: string,regID:string,select:string) => {
return await request.get({ url: `/ultrasoniccom/ultrasonic/getimageslist?orgID=${orgID}&&regID=${regID}&&select=${select}` })
},
// 查询图片表数据
updateexamineimagelist: async (data:updateexamineimageVO[]) => {
return await request.put({ url: `/ultrasoniccom/ultrasonic/examineimageupdate`, data})
},
//更新模版使用时间
upreporttemplatetime: async (pid:string) => {
return await request.get({ url: `/ultrasoniccom/ultrasonic/upreporttemplatetime?pid=${pid}`})
},
}

View File

@ -16,3 +16,4 @@ export function formatToDate(date?: dayjs.ConfigType, format = DATE_FORMAT): str
}
export const dateUtil = dayjs

View File

@ -79,6 +79,15 @@ export function getNowDateTime() {
return dayjs()
}
/**
* + YYYY-MM-DD HH:mm:ss LocalDateTime
*/
export function getNowDateTimeS() {
const currentDate = new Date();
const formattedDateTime = dayjs(currentDate).format('[YYYYescape] YYYY-MM-DDTHH:mm:ssZ[Z]');
const formattedDate = dayjs(formattedDateTime).toDate();
return formattedDate;
}
/**
*
* @param dateTime

63
src/utils/htmlPdf.js Normal file
View File

@ -0,0 +1,63 @@
// 页面导出为pdf格式
import html2Canvas from 'html2canvas';
import jsPDF from 'jspdf';
const htmlToPdf = {
getPdf(title, id) {
html2Canvas(
document.querySelector(id),
{
allowTaint: false,
taintTest: false,
logging: false,
useCORS: true,
dpi: window.devicePixelRatio * 4, //将分辨率提高到特定的DPI 提高四倍
scale: 4, //按比例增加分辨率
}
).then((canvas) => {
var pdf = new jsPDF('p', 'mm', 'a4'); //A4纸纵向
var ctx = canvas.getContext('2d'),
a4w = 190,
a4h = 272, //A4大小210mm x 297mm四边各保留10mm的边距显示区域190x277
imgHeight = Math.floor((a4h * canvas.width) / a4w), //按A4显示比例换算一页图像的像素高度
renderedHeight = 0;
while (renderedHeight < canvas.height) {
var page = document.createElement('canvas');
page.width = canvas.width;
page.height = Math.min(imgHeight, canvas.height - renderedHeight); //可能内容不足一页
//用getImageData剪裁指定区域并画到前面创建的canvas对象中
page
.getContext('2d')
.putImageData(
ctx.getImageData(
0,
renderedHeight,
canvas.width,
Math.min(imgHeight, canvas.height - renderedHeight),
),
0,
0,
);
pdf.addImage(
page.toDataURL('image/jpeg', 1.0),
'JPEG',
10,
10,
a4w,
Math.min(a4h, (a4w * page.height) / page.width),
); //添加图像到页面保留10mm边距
renderedHeight += imgHeight;
if (renderedHeight < canvas.height) {
pdf.addPage(); //如果后面还有内容,添加一个空页
}
// delete page;
}
pdf.save(title + '.pdf')
});
},
};
export default htmlToPdf;

View File

@ -437,15 +437,15 @@ const exportLoading = ref(false) // 导出的加载中
/** 超声组件 */
const ultrasonic = ref();
const openultrForm = (id:number,orgid:string) => {
const openultrForm = (id:number,orgid:string,regid:string) => {
ultrasonic.value.open(id,orgid)
ultrasonic.value.open(id,orgid,regid)
}
/** 表格行点击 */
const clickNumber = ref(0);
function handleEdit(row) {
console.log(111111121212)
openultrForm(row.id,row.orgid)
openultrForm(row.id,row.orgId,row.regId)
/* clickNumber.value++;
if (clickNumber.value == 2) {

File diff suppressed because it is too large Load Diff