门诊医生站-》开立诊断 页面调整

This commit is contained in:
itcast
2026-01-16 16:32:36 +08:00
parent be0514bc08
commit 8fcfb481c9
83 changed files with 3808 additions and 2205 deletions

View File

@@ -1046,7 +1046,9 @@ function handlePrint() {
purchaseinventoryList: form.purchaseinventoryList,
});
console.log(result, '345678987654');
const printElements = templateJson;
const printElements = JSON.parse(
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userStore.hospitalName)
);
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
hiprintTemplate.print2(result, {
// printer: 'EPSON LQ-80KFII',

View File

@@ -244,7 +244,9 @@ function handlePrint() {
purposeLocationName: printList[0].purposeLocationName,
purchaseinventoryList: printList,
});
const printElements = templateJson;
const printElements = JSON.parse(
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userStore.hospitalName)
);
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
hiprintTemplate.print2(result, {
// printer: 'EPSON LQ-80KFII',

View File

@@ -1436,8 +1436,11 @@ function handlePrintPreview() {
console.log("打印数据:", printData);
// 创建打印模板实例
const printElements = JSON.parse(
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userUserStore.hospitalName)
);
const hiprintTemplate = new hiprint.PrintTemplate({
template: templateJson,
template: printElements,
});
// 打开预览窗口(推荐)
@@ -1515,8 +1518,11 @@ function handleDirectPrint() {
console.log("打印数据:", printData);
// 创建打印模板实例
const printElements = JSON.parse(
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userUserStore.hospitalName)
);
const hiprintTemplate = new hiprint.PrintTemplate({
template: templateJson,
template: printElements,
});
// 直接打印到指定打印机
@@ -1591,8 +1597,11 @@ function handlePrintWithSelectPrinter() {
console.log("打印数据:", printData);
// 创建打印模板实例
const printElements = JSON.parse(
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userUserStore.hospitalName)
);
const hiprintTemplate = new hiprint.PrintTemplate({
template: templateJson,
template: printElements,
});
// 获取打印机列表并选择

View File

@@ -26,7 +26,7 @@
placeholder=""
clearable
style="width: 150px">
<el-option label="长春市朝阳区中医院" value="sameHospital" />
<el-option :label="userStore.hospitalName" value="sameHospital" />
</el-select>
</el-form-item>
@@ -120,7 +120,9 @@
<script setup name="OutpatientDepartmentMetrics">
import {getOutpatientDepartmentMetrics} from './statisticalManagent';
import {computed, reactive, ref, toRefs} from 'vue';
import useUserStore from '@/store/modules/user';
const userStore = useUserStore();
const loading = ref(true);
const total = ref(0);
const data = reactive({

View File

@@ -243,7 +243,9 @@ function handlePrint() {
busNo: printList[0].busNo,
detailsList: printList,
});
const printElements = templateJson;
const printElements = JSON.parse(
JSON.stringify(templateJson).replace(/{{HOSPITAL_NAME}}/g, userStore.hospitalName)
);
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
hiprintTemplate.print2(result, {
title: '打印标题',