打印导检单
This commit is contained in:
parent
345b725ab9
commit
33485009a2
@ -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 = {
|
||||
|
@ -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 = []
|
||||
|
@ -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() // 国际化
|
||||
|
@ -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
Loading…
Reference in New Issue
Block a user