当手术计费弹窗中点击"签发"耗材时,因耗材的locationId(发放库房)为空导致后端异常。 在DoctorStationAdviceAppServiceImpl.handDevice方法中,当locationId为null时,使用登录用户的科室ID作为默认值, 与NurseBillingAppService中的处理方式保持一致。
107 lines
2.8 KiB
Vue
Executable File
107 lines
2.8 KiB
Vue
Executable File
<template>
|
|
<Graphics v-if="graphicsDataDone" :value="resInfo" print @done="printPage" />
|
|
</template>
|
|
|
|
<script setup>
|
|
import Graphics from '../../../views/inpatientNurse/tprChart/index';
|
|
import data from '../../../action/nurseStation/temperatureSheet/datas';
|
|
// 迁移到 hiprint
|
|
import { previewPrint } from '@/utils/printUtils.js';
|
|
|
|
const printData = ref({});
|
|
const resInfo = ref({});
|
|
const graphicsDataDone = ref(false);
|
|
const printPromiseReslove = ref(null);
|
|
const dateClosed = ref({
|
|
stopTime: true, // 控制结束日期
|
|
stopNumber: true, // 控制住院天数
|
|
});
|
|
|
|
const route = useRoute();
|
|
|
|
function removeIframe(id) {
|
|
const child = window.parent.document.getElementById(id);
|
|
if (child) {
|
|
child.parentElement.removeChild(child);
|
|
}
|
|
}
|
|
function setTime(num) {
|
|
return new Promise((resolve) => {
|
|
setTimeout(resolve, num);
|
|
});
|
|
}
|
|
// export default {
|
|
// components: {
|
|
// Graphics,
|
|
// },
|
|
// data() {
|
|
// return {
|
|
// printData: {},
|
|
// resInfo: {},
|
|
// graphicsDataDone: false,
|
|
// // 当前页面是否完成打印的reslove函数
|
|
// printPromiseReslove: null,
|
|
// dateClosed: {
|
|
// stopTime: true, // 控制结束日期
|
|
// stopNumber: true, // 控制住院天数
|
|
// },
|
|
// };
|
|
// },
|
|
// mounted() {
|
|
// const printData = window.localStorage.getItem('printItemData');
|
|
// this.printData = JSON.parse(printData);
|
|
// this.addPrintEvent();
|
|
// this.runTask();
|
|
// },
|
|
// methods: {
|
|
function addPrintEvent() {
|
|
window.addEventListener('afterprint', () => {
|
|
if (printPromiseReslove.value) {
|
|
printPromiseReslove.value();
|
|
}
|
|
});
|
|
}
|
|
async function runTask() {
|
|
// const weeks = this.printData.weekList;
|
|
const weeks = [];
|
|
for (let index = 0; index < weeks.length; index++) {
|
|
const week = weeks[index];
|
|
await this.getData(week);
|
|
}
|
|
try {
|
|
removeIframe(this.$route.query.id);
|
|
} catch (error) {
|
|
// window.location.href = './compTemperature';
|
|
var child = window.parent.document.getElementById('my_dataviz');
|
|
child.parentElement.appendChild(child);
|
|
}
|
|
}
|
|
function printPage() {
|
|
// 使用 hiprint 预览打印
|
|
const printDom = document.querySelector('.tpr-chart-container') || document.body;
|
|
previewPrint(printDom);
|
|
}
|
|
// 获取每周数据
|
|
async function getData(curWeekInfo) {
|
|
this.resInfo = data;
|
|
if (this.graphicsDataDone) {
|
|
this.graphicsDataDone = false;
|
|
}
|
|
await setTime(10);
|
|
this.graphicsDataDone = true;
|
|
return new Promise((resolve) => {
|
|
this.printPromiseReslove = resolve;
|
|
});
|
|
}
|
|
// },
|
|
// };
|
|
</script>
|
|
|
|
<style>
|
|
@page {
|
|
margin-top: 30;
|
|
margin-bottom: 0;
|
|
background-color: #1890ff;
|
|
}
|
|
</style>
|