Files
his/openhis-ui-vue3/src/components/Auto/printBills/injectOrderSheet.vue
chenqi 6a34303825 refactor(build): 移除 setup-extend 插件并更新依赖项
- 移除 createSetupExtend 插件及其相关配置
- 更新 Vue 版本从 3.5.13 到 3.5.25
- 更新 Element Plus 版本从 2.12.0 到 2.14.1
- 添加 @vue/shared 依赖
- 移除 @vue/compiler-sfc 开发依赖
- 移除 unplugin-vue-setup-extend-plus 依赖
- 更新 @babel 相关依赖版本
- 移除 @esbuild 相关可选依赖
- 更新 chokidar 版本从 3.6.0 到 5.0.0
- 移除部分已废弃的依赖项
2026-06-02 13:38:23 +08:00

194 lines
5.4 KiB
Vue
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="recordBill">
<div
id="div1"
class="printView_header"
>
<div style="text-align: center; font-size: 20px; height: 40px">
{{ userStore.hospitalName }}输液执行单
</div>
<div>
<span>座位{{ printData.patientInfo.encounterLocationName }}</span>
<span style="margin-left: 18px">姓名{{ printData.patientInfo.name }}</span>
<span style="margin-left: 18px">性别{{ printData.patientInfo.sexName }}</span>
<span style="margin-left: 18px">年龄{{ printData.patientInfo.patientAge }}</span>
<span style="margin-left: 18px">卡号{{ printData.patientInfo.hisNo }}</span>
<span style="margin-left: 18px">科室{{ printData.patientInfo.deptName }}</span>
</div>
</div>
<div
id="div2"
class="printView_content"
>
<table
border="1"
cellSpacing="0"
cellPadding="1"
style=" border-collapse:collapse; font-size: 14px"
bordercolor="#333333"
>
<thead>
<TR style="height: 30px">
<TD rowspan="1">
<DIV
style="width: 35px"
align="center"
>
时间
</DIV>
</TD>
<TD colspan="1">
<DIV
style="width: 280px"
align="center"
>
药品名称
</DIV>
</TD>
<TD colspan="1">
<DIV
style="width: 10px"
align="center"
/>
</TD>
<TD rowspan="1">
<DIV
style="width: 55px"
align="center"
>
剂量
</DIV>
</TD>
<TD colspan="1">
<DIV
style="width: 30px"
align="center"
>
频次
</DIV>
</TD>
<TD colspan="1">
<DIV
style="width: 55px"
align="center"
>
用法
</DIV>
</TD>
<TD rowspan="1">
<DIV
style="width: 70px"
align="center"
>
执行时间
</DIV>
</TD>
<TD rowspan="1">
<DIV
style="width: 55px"
align="center"
>
执行人
</DIV>
</TD>
</TR>
</thead>
<tbody style=" border-collapse:collapse;">
<tr
v-for="item in printData.recordData"
:key="item.id"
>
<td v-html="item.moTime.substring(0,16)" />
<td v-html="item.orderName" />
<td v-html="item.flag" />
<td v-html="item.doseOnce + item.doseUnit" />
<td v-html="item.freqName" />
<td v-html="item.usageName" />
<td />
<td />
</tr>
</tbody>
</table>
</div>
</div>
</template>
<script>
// 迁移到 hiprint
import { simplePrint, PRINT_TEMPLATE } from '@/utils/printUtils.js'
import useUserStore from '@/store/modules/user'
export default {
setup() {
const userStore = useUserStore();
return { userStore };
},
data() {
return {
printData: {
patientInfo: {},
recordData: {}
}
}
},
mounted() {},
methods: {
/**
* 使用 hiprint 执行打印
*/
async printTest() {
try {
// 构建打印数据
const recordData = (this.printData.recordData || []).map(item => ({
moTime: item.moTime ? item.moTime.substring(0, 16) : '',
orderName: item.orderName || '',
flag: item.flag || '',
doseOnceUnit: (item.doseOnce || '') + (item.doseUnit || ''),
freqName: item.freqName || '',
usageName: item.usageName || ''
}))
const printData = {
hospitalName: this.userStore.hospitalName,
encounterLocationName: this.printData.patientInfo ? this.printData.patientInfo.encounterLocationName : '',
name: this.printData.patientInfo ? this.printData.patientInfo.name : '',
sexName: this.printData.patientInfo ? this.printData.patientInfo.sexName : '',
patientAge: this.printData.patientInfo ? this.printData.patientInfo.patientAge : '',
hisNo: this.printData.patientInfo ? this.printData.patientInfo.hisNo : '',
deptName: this.printData.patientInfo ? this.printData.patientInfo.deptName : '',
recordData: recordData
}
// 使用 hiprint 打印(复用医嘱执行单模板)
await simplePrint(PRINT_TEMPLATE.EXE_ORDER_SHEET, printData)
} catch (error) {
console.error('输液执行单打印失败:', error)
}
}
}
}
</script>
<style scoped lang="less">
.recordBill {
border: #8d8d8d 1px solid;
display: grid;
grid-template-rows: 90px 1fr;
height: 200px !important;
width: 680px;
:deep(.el-table .cell) {
font-size: 10px !important;
}
.printView_header {
grid-template-rows: 40px 30px 30px;
height: 200px !important;
h4{
text-align: center;
margin: 15px;
}
}
.printView_content{
}
}
</style>