打印导检单

This commit is contained in:
张佳炜 2025-03-07 09:11:28 +08:00
parent 345b725ab9
commit 33485009a2
5 changed files with 4924 additions and 350 deletions

View File

@ -52,6 +52,12 @@ export const isExistUncheck = (medicalSn: String) => {
return request.get({ url: '/checkup/result/isExistUncheck?medicalSn=' + medicalSn })
}
// 打印模板的数据
export const printInfoOfMedicalSn = (medicalSn: String) => {
return request.get({ url: '/checkup/result/printInfoOfMedicalSn?medicalSn=' + medicalSn })
}
// 用户密码重置
export const resetUserPwd = (id: number, password: string) => {
const data = {

View File

@ -785,6 +785,12 @@ import { ExammoduleApi } from '@/api/inspect/exammodule'
import { DepartmentApi, DepartmentVO } from '@/api/inspect/inspectdepartment/index'
import Viewer from 'viewerjs'
import { debounce } from 'lodash-es'
import * as SummaryApi from "@/api/summary";
import {newHiprintPrintTemplate} from "@/views/summary/utils/template-helper";
import {ref} from "vue";
import template from "@/views/summary/print/template";
import {usePaper} from "@/views/summary/hooks/use-paper";
import {useZoom} from "@/views/summary/hooks/use-zoom";
defineOptions({ name: 'PhysicalEnroll' })
/*
@ -1105,9 +1111,38 @@ const handlePersonInfoCancel = () => {
}
}
const handlePersonInfoPrintInspection = () => {
const printMedicalSn = ref();
const templateRef = ref(template);
let hiprintTemplate;
const TEMPLATE_KEY = getCurrentInstance().type.name; // key
const { paperTypes, curPaperType, paperPopVisible, paperWidth, paperHeight, showPaperPop, setPaper, setPaperOther } = usePaper(TEMPLATE_KEY);
const { scaleValue, changeScale } = useZoom(TEMPLATE_KEY);
const handlePersonInfoPrintInspection = async () => {
personInfoDelete.value = !personInfoDelete.value
personInfoEdit.value = !personInfoEdit.value
console.log('printMedicalSn',printMedicalSn.value)
//
const dataPrint = await SummaryApi.printInfoOfMedicalSn(printMedicalSn.value)
hiprintTemplate = newHiprintPrintTemplate(TEMPLATE_KEY, {
template: templateRef.value, // json(object)
settingContainer: "#PrintElementOptionSetting", //
});
// :
let options = {leftOffset: -1, topOffset: -1};
//
let ext = {
callback: () => {
console.log("浏览器打印窗口已打开");
},
styleHandler: () => {
//
return "<style>.hiprint-printElement-text{color:red !important;}</style>";
},
};
//
hiprintTemplate.print(dataPrint, options, ext);
}
/** 获取患者列表数据 **/
@ -1333,6 +1368,7 @@ const handlePatientSelect = async (row) => {
//
if (res.medicalSn) {
printMedicalSn.value = res.medicalSn
await loadPatientProjects(res.medicalSn)
} else {
comboInfoTable1.value = []

View File

@ -175,13 +175,14 @@ let hiprintTemplate;
const TEMPLATE_KEY = getCurrentInstance().type.name; // key
const { paperTypes, curPaperType, paperPopVisible, paperWidth, paperHeight, showPaperPop, setPaper, setPaperOther } = usePaper(TEMPLATE_KEY);
const { scaleValue, changeScale } = useZoom(TEMPLATE_KEY);
const goto = () =>{
const goto = async () => {
const dataPrint = await SummaryApi.printInfoOfMedicalSn("17407232640657956")
hiprintTemplate = newHiprintPrintTemplate(TEMPLATE_KEY, {
template: templateRef.value, // json(object)
settingContainer: "#PrintElementOptionSetting", //
});
// :
let options = { leftOffset: -1, topOffset: -1 };
let options = {leftOffset: -1, topOffset: -1};
//
let ext = {
callback: () => {
@ -193,7 +194,7 @@ const goto = () =>{
},
};
//
hiprintTemplate.print(printData, options, ext);
hiprintTemplate.print(dataPrint, options, ext);
}
const { t } = useI18n() //

View File

@ -1,4 +1,5 @@
export default {
barcode:"11111",
name: "黄磊",
logoTest: "https://portrait.gitee.com/uploads/avatars/user/1800/5400665_CcSimple_1591166830.png!avatar60",
password: "12346",

File diff suppressed because it is too large Load Diff