Fix Bug #550: AI修复
This commit is contained in:
@@ -1,359 +0,0 @@
|
||||
<template>
|
||||
<div
|
||||
class="pf_card"
|
||||
:style="{
|
||||
outlineWidth:active?'2px':'0',
|
||||
outlineColor:active?getBedBackColor(data.triageLevel):'#9aa6b5',
|
||||
backgroundColor:data.bedOperationalStatus==='U'?'#EDFFFD':'',
|
||||
borderColor: getBedBackColor(data.triageLevel)
|
||||
}"
|
||||
@click="clickAct"
|
||||
>
|
||||
<div v-if="data.bedOperationalStatus==='U'">
|
||||
<img :src="emptyBed" class="pf_card_emptyBed_img">
|
||||
<div class="pf_card_emptyBed_text">{{ data.bedName }}</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div v-if="data.isDischarge" class="pf_card_discharge">
|
||||
<span style="margin-left: 6px">离</span>
|
||||
</div>
|
||||
<div class="pf_card_card">
|
||||
<CardSign :color="getBedBackColor(data.triageLevel)" :title="data.bedName" :tail="getDisplay(data.triageLevel)" />
|
||||
</div>
|
||||
<div class="pf_card_nameSexAndAge">
|
||||
<span class="pf_card_name">{{ data.patientName }}</span>
|
||||
<span class="pf_card_sexAndAge">{{ data.gender.display }}/{{ data.age }}</span>
|
||||
</div>
|
||||
<div class="pf_card_rescueTime">
|
||||
<span style="margin-right: 16px">入室时间</span>
|
||||
{{ moment(data.checkInWardTime).format('YYYY-MM-DD HH:mm') }}
|
||||
</div>
|
||||
<div class="pf_card_noCode">{{ data.hisId }}</div>
|
||||
<div class="pf_card_rescueTimeText">{{ rescueTimeText() }}</div>
|
||||
<div v-if="data.diag!==''" class="pf_card_diagnosis">
|
||||
<div class="card-rectangle-text">{{ data.diag }}</div>
|
||||
<span style="margin-left: 4px">(诊断)</span>
|
||||
</div>
|
||||
<div v-if="isNewSign()" class="card-rectangle">新</div>
|
||||
<div v-if="is72HourSign()" class="card-rectangle2">超72H</div>
|
||||
<hr class="pf_card_line">
|
||||
<div class="pf_card_nursingMeasuresString">{{ getStringByCode(data.nursingMeasures, nursingMeasures) }}</div>
|
||||
<div class="pf_card_specialArrangementString">{{ getStringByCode(data.specialArrangement, specialArrangementList) }}</div>
|
||||
<div v-if="false" class="pf_card_btn" @click="moreClick">更多</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
// Ⅰ-1、Ⅱ-2、Ⅲ-3、Ⅳ-4、Ⅴ-5、Ⅵ-6、Ⅶ-7、Ⅷ-8、Ⅸ-9
|
||||
import emptyBed from '@/assets/png/emptyBed.png'
|
||||
|
||||
export default {
|
||||
name: 'PfPatientCard',
|
||||
inject: ['PfPatientCards'],
|
||||
props: {
|
||||
data: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
bedConfig: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
colors: [],
|
||||
emptyBed,
|
||||
bedStations: [],
|
||||
nursingMeasures: [],
|
||||
specialArrangementList: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
active() {
|
||||
return this.PfPatientCards.activePatient.bedId === this.data.bedId
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.colors = this.config.echartsColor.color
|
||||
this.nursingMeasures = this.bedConfig.nursingMeasures
|
||||
this.specialArrangementList = this.bedConfig.specialArrangementList
|
||||
this.bedStations = this.config.bedStation.options
|
||||
},
|
||||
mounted() {
|
||||
const setIntervalId = setInterval(() => {
|
||||
this.$forceUpdate()
|
||||
}, 60000)
|
||||
this.$once('hook:beforeDestroy', () => {
|
||||
clearInterval(setIntervalId)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
clickAct() {
|
||||
if (!this.data.isBedNull) {
|
||||
this.PfPatientCards.activePatient = this.$props.data
|
||||
}
|
||||
this.$emit('click', this.$props.data)
|
||||
},
|
||||
moreClick() {
|
||||
this.$emit('moreClick', this.$props.data)
|
||||
},
|
||||
|
||||
getStringByCode(codeList, itemList) {
|
||||
const arr = itemList.filter((item) => {
|
||||
return codeList.includes(item.code)
|
||||
})
|
||||
|
||||
const rearr = arr.map((item) => {
|
||||
return item.display
|
||||
})
|
||||
return rearr.join('、')
|
||||
},
|
||||
isNewSign() {
|
||||
const ytime = this.data.checkInWardTime
|
||||
const hour = this.moment().diff(ytime, 'hours')
|
||||
return hour < 24
|
||||
},
|
||||
is72HourSign() {
|
||||
const ytime = this.data.checkInWardTime
|
||||
const hour = this.moment().diff(ytime, 'hours')
|
||||
return hour > 72
|
||||
},
|
||||
rescueTimeText() {
|
||||
const ytime = this.data.checkInWardTime
|
||||
const days = this.moment().diff(ytime, 'days')
|
||||
const hour = this.moment().diff(ytime, 'hours')
|
||||
const minutes = this.moment().diff(ytime, 'minutes')
|
||||
if (hour >= 24) {
|
||||
return days + '天' + hour % 24 + '时' + minutes % 60 + '分'
|
||||
} else
|
||||
if (hour < 24) {
|
||||
return hour + '时' + minutes % 60 + '分'
|
||||
} else
|
||||
if (minutes < 60) {
|
||||
return minutes + '分'
|
||||
}
|
||||
},
|
||||
getDisplay(triageLevel) {
|
||||
return triageLevel?.display ?? ''
|
||||
},
|
||||
getBedBackColor(triageLevel) {
|
||||
const Level = triageLevel?.display ?? '0级'
|
||||
let backColor = '#808080'
|
||||
switch (Level) {
|
||||
case '一级':
|
||||
backColor = this.colors[0]
|
||||
break
|
||||
case '二级':
|
||||
backColor = this.colors[1]
|
||||
break
|
||||
case '三级':
|
||||
backColor = this.colors[2]
|
||||
break
|
||||
case '四级':
|
||||
backColor = this.colors[3]
|
||||
break
|
||||
default:
|
||||
backColor = '#C4C4C4'
|
||||
}
|
||||
return backColor
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.pf_card {
|
||||
outline-style: solid;
|
||||
position: relative;
|
||||
border-radius: 5px;
|
||||
background-color: #FFFFFF;
|
||||
box-shadow: 1px 1px 4px #888888;
|
||||
border: 1px solid #e2dfdf;
|
||||
width: 265px;
|
||||
height: 194px;
|
||||
user-select: none;
|
||||
font-family: Microsoft YaHei;
|
||||
|
||||
&:hover {
|
||||
box-shadow: 4px 4px 16px #888888;
|
||||
}
|
||||
|
||||
.pf_card_card {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 7px;
|
||||
}
|
||||
|
||||
.pf_card_nameSexAndAge {
|
||||
position: absolute;
|
||||
top: 16px;
|
||||
left: 74px;
|
||||
width: 192px;
|
||||
line-height: 18px;
|
||||
|
||||
.pf_card_name {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.pf_card_sexAndAge {
|
||||
position: absolute;
|
||||
font-size: 12px;
|
||||
color: #9AA6B5;
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.pf_card_rescueTime {
|
||||
position: absolute;
|
||||
left: 74px;
|
||||
top: 45px;
|
||||
font-size: 13px;
|
||||
color: #4C5E75;
|
||||
}
|
||||
|
||||
.pf_card_noCode {
|
||||
position: absolute;
|
||||
left: 74px;
|
||||
top: 68px;
|
||||
font-size: 13px;
|
||||
color: #4C5E75;
|
||||
}
|
||||
|
||||
.pf_card_rescueTimeText {
|
||||
position: absolute;
|
||||
right: 8px;
|
||||
top: 68px;
|
||||
font-size: 13px;
|
||||
color: #4C5E75;
|
||||
}
|
||||
|
||||
.pf_card_diagnosis {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
left: 8px;
|
||||
top: 100px;
|
||||
font-size: 14px;
|
||||
color: #111111;
|
||||
|
||||
.card-rectangle-text {
|
||||
width: 100px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.card-rectangle {
|
||||
position: absolute;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
left: 178px;
|
||||
top: 100px;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
background-color: #FF3939;
|
||||
border-radius: 2px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
.card-rectangle2 {
|
||||
position: absolute;
|
||||
width: 54px;
|
||||
height: 20px;
|
||||
right: 8px;
|
||||
top: 100px;
|
||||
font-size: 14px;
|
||||
color: #FFFFFF;
|
||||
background-color: #FDC13F;
|
||||
border-radius: 2px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.pf_card_line {
|
||||
position: absolute;
|
||||
left: 8px;
|
||||
top: 127px;
|
||||
border: none;
|
||||
width: 250px;
|
||||
height: 1px;
|
||||
background-color: #DCDFE6;
|
||||
}
|
||||
|
||||
.pf_card_nursingMeasuresString {
|
||||
position: absolute;
|
||||
width: 240px;
|
||||
left: 8px;
|
||||
top: 140px;
|
||||
color: #0EB396;
|
||||
font-size: 12px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.pf_card_specialArrangementString{
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
left: 8px;
|
||||
top: 164px;
|
||||
color: #FF9F3B;
|
||||
font-size: 12px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.pf_card_btn{
|
||||
position: absolute;
|
||||
width: 46px;
|
||||
height: 20px;
|
||||
right: 8px;
|
||||
top: 164px;
|
||||
color: #0EB396;
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
border-radius: 4px;
|
||||
background-color:#9CF6E6;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.pf_card_discharge {
|
||||
position: absolute;
|
||||
width: 24px;
|
||||
height: 20px;
|
||||
top: 10px;
|
||||
left: 242px;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
color: white;
|
||||
border-top-left-radius: 50%;
|
||||
border-bottom-left-radius: 50%;
|
||||
background-color: #0EB396;
|
||||
}
|
||||
|
||||
.pf_card_emptyBed_img {
|
||||
position: absolute;
|
||||
left: 72px;
|
||||
top: 16px
|
||||
}
|
||||
|
||||
.pf_card_emptyBed_text {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: #0EB396;
|
||||
text-align: center;
|
||||
top: 152px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +0,0 @@
|
||||
import mycomp from './index.vue'
|
||||
/* istanbul ignore next */
|
||||
mycomp.install = function(Vue) {
|
||||
Vue.component(mycomp.name, mycomp)
|
||||
}
|
||||
export default mycomp
|
||||
@@ -1,67 +0,0 @@
|
||||
<template>
|
||||
<div class="pf-card-group">
|
||||
<PfPatientCard
|
||||
v-for="item in cardList"
|
||||
:key="item.bedId"
|
||||
:data="item"
|
||||
:bed-config="bedConfig"
|
||||
@click="clickAct"
|
||||
@moreClick="moreClickAct"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import PfPatientCard from './PfPatientCard'
|
||||
|
||||
export default {
|
||||
name: 'PfPatientCardB',
|
||||
components: { PfPatientCard },
|
||||
provide() {
|
||||
return {
|
||||
PfPatientCards: this
|
||||
}
|
||||
},
|
||||
props: {
|
||||
cardList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
},
|
||||
bedConfig: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activePatient: { noCode: '' }
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
if (this.cardList.length > 0) {
|
||||
this.$nextTick(() => {
|
||||
this.activePatient.noCode = this.cardList[0].noCode
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickAct(data) {
|
||||
this.$emit('itemClick', data)
|
||||
},
|
||||
moreClickAct(data) {
|
||||
this.$emit('itemMoreClick', data)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.pf-card-group {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, 264px);
|
||||
margin: 12px;
|
||||
grid-gap: 12px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,77 +0,0 @@
|
||||
<template>
|
||||
<div class="printCard">
|
||||
<div ref="refQr" style="float: left; margin: 30px 15px">
|
||||
<img :src="emptyBed" style="height: 120px" class="pf_card_emptyBed_img">
|
||||
</div>
|
||||
<div class="printView_content" style=" margin: 30px 0">
|
||||
<div>
|
||||
<span>床号:</span>
|
||||
<span>{{ printData.bedName }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>姓名:</span>
|
||||
<span>{{ printData.patientName }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>患者编号:</span>
|
||||
<span>{{ printData.hisId }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>分诊科室:</span>
|
||||
<span>{{ printData.dept }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>分诊等级:</span>
|
||||
<span>{{ printData.triageLevel }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import emptyBed from '@/assets/png/emptyBed.png'
|
||||
|
||||
export default {
|
||||
name: 'TriageTicket',
|
||||
props: {
|
||||
printData: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {
|
||||
bedName: '',
|
||||
patientName: '',
|
||||
dept: '',
|
||||
triageLevel: '',
|
||||
triageTime: '',
|
||||
hisId: '11111'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
emptyBed
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
updated() {
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.printCard {
|
||||
border: #8d8d8d 1px solid;
|
||||
height: 200px !important;
|
||||
width: 320px;
|
||||
display: grid;
|
||||
grid-template-columns: 150px 200px;
|
||||
}
|
||||
|
||||
.printView_content{
|
||||
display: grid;
|
||||
padding-top: 10px;
|
||||
grid-template-rows: repeat(5,25px);
|
||||
}
|
||||
</style>
|
||||
@@ -1,134 +0,0 @@
|
||||
<template>
|
||||
<div class="recordBill">
|
||||
<div id="div1" class="printView_header">
|
||||
<div style="text-align: center; height: 40px">
|
||||
护理交接班
|
||||
</div>
|
||||
<div>
|
||||
<span style="display: inline-block; width: 200px">日期:{{ printData.date.substring(0, 10) }}</span>
|
||||
<span style="display: inline-block; width: 180px">发起人:{{ printData.initiator.name }}</span>
|
||||
<span style="display: inline-block; width: 140px">接收人:{{ printData.heir.name }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span
|
||||
v-for="item in printData.cols"
|
||||
:key="item.propertyType"
|
||||
style="display: inline-block; width: 90px"
|
||||
v-text="item.display + ':' + printData[item.propertyType]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="div2" class="printView_content">
|
||||
<table border="1" cellSpacing="0" width="98%" cellPadding="1" style=" border-collapse:collapse; font-size: 14px" bordercolor="#333333">
|
||||
<thead>
|
||||
<TR>
|
||||
<TD colspan="1">
|
||||
<DIV style="width: 40px" align="center">类别</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV style="width: 50px" align="center">床号</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV style="width: 60px" align="center">姓名</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV style="width: 90px" align="center">主诉</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV style="width: 90px" align="center">既往史</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV style="width: 90px" align="center">诊断</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV style="width: 155px" align="center">交接信息</DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item in printData.shiftRecordItems" :key="item.id">
|
||||
<td v-html="item.typeDisplay" />
|
||||
<td v-html="item.bedName" />
|
||||
<td v-html="item.patientName" />
|
||||
<td v-html="item.mainSuit" />
|
||||
<td v-html="item.previousHistory" />
|
||||
<td v-html="item.diagnosis" />
|
||||
<td v-html="item.content" />
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
// 迁移到 hiprint
|
||||
import { simplePrint, PRINT_TEMPLATE } from '@/utils/printUtils.js'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
printData: {
|
||||
patientInfo: {},
|
||||
recordData: {},
|
||||
cols: []
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
/**
|
||||
* 使用 hiprint 执行打印
|
||||
*/
|
||||
async printTest() {
|
||||
try {
|
||||
// 构建打印数据
|
||||
const shiftRecordItems = (this.printData.shiftRecordItems || []).map(item => ({
|
||||
typeDisplay: item.typeDisplay || '',
|
||||
bedName: item.bedName || '',
|
||||
patientName: item.patientName || '',
|
||||
mainSuit: item.mainSuit || '',
|
||||
previousHistory: item.previousHistory || '',
|
||||
diagnosis: item.diagnosis || '',
|
||||
content: item.content || ''
|
||||
}))
|
||||
|
||||
const printData = {
|
||||
date: this.printData.date ? this.printData.date.substring(0, 10) : '',
|
||||
initiatorName: this.printData.initiator ? this.printData.initiator.name : '',
|
||||
heirName: this.printData.heir ? this.printData.heir.name : '',
|
||||
shiftRecordItems: shiftRecordItems
|
||||
}
|
||||
// 使用 hiprint 打印
|
||||
await simplePrint(PRINT_TEMPLATE.CHANGE_SHIFT_BILL, 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: 740px;
|
||||
|
||||
/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>
|
||||
@@ -1,170 +0,0 @@
|
||||
<template>
|
||||
<div class="recordBill">
|
||||
<div :id="'exeSheetTitle' + printData.id" class="printView_header">
|
||||
<div style="text-align: center; height: 60px">
|
||||
{{ userStore.hospitalName }}医嘱执行单
|
||||
</div>
|
||||
<div>
|
||||
<span style="display: inline-block; width: 100px">床号:{{ printData.patientInfo.encounterLocationName }}</span>
|
||||
<span style="display: inline-block; width: 180px">姓名:{{ printData.patientInfo.name }}</span>
|
||||
<span style="display: inline-block; width: 140px">年龄:{{ printData.patientInfo.patientAge }}</span>
|
||||
<span style="display: inline-block; width: 280px">诊断:{{ printData.patientInfo.diag }}</span>
|
||||
</div>
|
||||
<!-- <div>
|
||||
<span style="display: inline-block; width: 200px">档案号:{{printData.patientInfo.hisNo}}</span>
|
||||
<span style="display: inline-block; width: 260px">入室时间:{{printData.patientInfo.checkInTime}}</span>
|
||||
<span style="display: inline-block; width: 140px">性别:{{!printData.patientInfo.gender? '':printData.patientInfo.gender.display}}</span>
|
||||
</div>-->
|
||||
</div>
|
||||
<div :id="'exeSheet' + printData.id" class="printView_content">
|
||||
<table border="1" cellSpacing="0" width="97%" cellPadding="1" style=" border-collapse:collapse; font-size: 13px" bordercolor="#333333">
|
||||
<thead>
|
||||
<TR>
|
||||
<TD rowspan="1">
|
||||
<DIV style="width: 65px;text-align: center">医嘱日期</DIV>
|
||||
</TD>
|
||||
|
||||
<TD colspan="1">
|
||||
<DIV style="width: 120px" align="center">医嘱</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV style="width: 10px" align="center" />
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV style="width: 70px" align="center">嘱托</DIV>
|
||||
</TD>
|
||||
<TD rowspan="1">
|
||||
<DIV style="width: 60px" align="center">用量</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV style="width: 40px" align="center">用法</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV style="width: 40px" align="center">频次</DIV>
|
||||
</TD>
|
||||
<TD rowspan="1">
|
||||
<DIV style="width: 65px" align="center">开立医生</DIV>
|
||||
</TD>
|
||||
<TD rowspan="1">
|
||||
<DIV style="width: 65px" align="center">执行时间</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV style="width: 65px" align="center">执行护士</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV style="width: 55px" align="center">终止时间</DIV>
|
||||
</TD>
|
||||
<TD colspan="1">
|
||||
<DIV style="width: 55px" align="center">终止人</DIV>
|
||||
</TD>
|
||||
</TR>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item in printData.recordData" :key="item.id">
|
||||
<td v-html="item.moTime" />
|
||||
<td v-html="item.orderName" />
|
||||
<td v-html="item.flag" />
|
||||
<td v-html="item.remark" />
|
||||
<td v-html="item.doseOnce<=0?'':(item.doseOnce+ item.doseUnit)" />
|
||||
<td v-html="item.usageName" />
|
||||
<td v-html="item.frequency" />
|
||||
<td :id="item.id">
|
||||
<span v-if="(item.docSignImage === ''||item.docSignImage === null)">{{ item.moDocName }}</span>
|
||||
<img v-if="(item.docSignImage !== ''&&item.docSignImage !== null)" :src="'data:image/png;base64,'+ item.docSignImage" style="height: 100%; width: 100%;object-fit: cover;">
|
||||
</td>
|
||||
<td v-html="item.occurrence" />
|
||||
<td :id="item.id">
|
||||
<span v-if="(item.perNurserSignImage === ''||item.perNurserSignImage === null)">{{ item.performName }}</span>
|
||||
<img v-if="(item.perNurserSignImage !== ''&&item.perNurserSignImage !== null)" :src="'data:image/png;base64,'+ item.perNurserSignImage" style="height: 100%; width: 100%;object-fit: cover;">
|
||||
</td>
|
||||
<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 };
|
||||
},
|
||||
props: {
|
||||
printData: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
/**
|
||||
* 使用 hiprint 执行打印
|
||||
*/
|
||||
async printTest() {
|
||||
try {
|
||||
// 构建打印数据
|
||||
const recordData = (this.printData.recordData || []).map(item => ({
|
||||
moTime: item.moTime || '',
|
||||
orderName: item.orderName || '',
|
||||
flag: item.flag || '',
|
||||
remark: item.remark || '',
|
||||
doseOnceUnit: item.doseOnce <= 0 ? '' : (item.doseOnce + item.doseUnit),
|
||||
usageName: item.usageName || '',
|
||||
frequency: item.frequency || '',
|
||||
moDocName: item.moDocName || '',
|
||||
occurrence: item.occurrence || '',
|
||||
performName: item.performName || ''
|
||||
}))
|
||||
|
||||
const printData = {
|
||||
hospitalName: this.userStore.hospitalName,
|
||||
bedName: this.printData.patientInfo ? this.printData.patientInfo.encounterLocationName : '',
|
||||
patientName: this.printData.patientInfo ? this.printData.patientInfo.name : '',
|
||||
patientAge: this.printData.patientInfo ? this.printData.patientInfo.patientAge : '',
|
||||
diag: this.printData.patientInfo ? this.printData.patientInfo.diag : '',
|
||||
recordData: recordData
|
||||
}
|
||||
// 使用 hiprint 打印
|
||||
await simplePrint(PRINT_TEMPLATE.EXE_ORDER_SHEET, printData)
|
||||
} catch (error) {
|
||||
console.error('医嘱执行单打印失败:', error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.recordBill {
|
||||
display: grid;
|
||||
grid-template-rows: 90px 1fr;
|
||||
height: 500px !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>
|
||||
@@ -1,130 +0,0 @@
|
||||
<template>
|
||||
<div ref="print">
|
||||
<div class="printInjectCard">
|
||||
<div :id="printData.id + 'div1'">
|
||||
<div style="display:block; height: 60px; width: 280px; float:left;">
|
||||
<span style="font-weight: bolder; font-size: 16px; line-height: 36px; margin-left: 160px;">急诊输液贴</span>
|
||||
<div>
|
||||
<span style="margin-left: 8px;">{{ printData.patient.hisNo }}</span>
|
||||
<span style="margin-left: 8px;">{{ printData.patient.name }}</span>
|
||||
<span style="margin-left: 8px;">{{ printData.patient.sexName }}</span>
|
||||
<span style="margin-left: 8px;">{{ printData.patient.patientAge }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: block; width: 120px; height: 60px; float:left; ">
|
||||
<div :id="getId(printData.id)" style="float: left; margin: 5px;" />
|
||||
<span style="float: left; margin: 5px">{{ printData.priority }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div :id="printData.id + 'div2'">
|
||||
<table border="1" cellSpacing="0" width="390px" cellPadding="1" style="margin-left: 8px; border-collapse:collapse; table-layout: fixed; font-size: 14px" bordercolor="#333333">
|
||||
<thead>
|
||||
<TR>
|
||||
<Th style="width: 160px" v-html="'药品名称'" />
|
||||
<Th style="width: 75px" v-html="'用量'" />
|
||||
<Th style="width: 10px" v-html="''" />
|
||||
<Th style="width: 50px" v-html="'频次'" />
|
||||
<Th style="width: 75px" v-html="'用法'" />
|
||||
</TR>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="item in printData.orderDetail" :key="item.id">
|
||||
<td v-html="item.orderName" />
|
||||
<td v-html="item.doseOnce + item.doseUnit" />
|
||||
<td v-html="item.flag" />
|
||||
<td v-html="item.frequency" />
|
||||
<td v-html="item.usageName" />
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div :id="printData.id + 'div3'">
|
||||
<span>日期:</span>
|
||||
<span>{{ moment().format('YYYY-MM-DD HH:mm') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
// 迁移到 hiprint
|
||||
import { simplePrint, PRINT_TEMPLATE } from '@/utils/printUtils.js'
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
name: 'VuePrintNb',
|
||||
props: {
|
||||
printData: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
lastId: '',
|
||||
qrCode: ''
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
/**
|
||||
* 使用 hiprint 执行打印
|
||||
* @param {string} printerName 打印机名称
|
||||
*/
|
||||
async print(printerName) {
|
||||
console.log(this.printData, 'printData')
|
||||
try {
|
||||
// 构建打印数据
|
||||
const orderDetail = this.printData.orderDetail || []
|
||||
const qrCode = orderDetail[0] ? (orderDetail[0].comboNo + orderDetail[0].executionSeq) : ''
|
||||
|
||||
// 转换药品明细数据
|
||||
const formattedOrderDetail = orderDetail.map(item => ({
|
||||
orderName: item.orderName,
|
||||
doseOnceUnit: (item.doseOnce || '') + (item.doseUnit || ''),
|
||||
flag: item.flag || '',
|
||||
frequency: item.frequency || '',
|
||||
usageName: item.usageName || ''
|
||||
}))
|
||||
|
||||
const printData = {
|
||||
hisNo: this.printData.patient ? this.printData.patient.hisNo : '',
|
||||
name: this.printData.patient ? this.printData.patient.name : '',
|
||||
sexName: this.printData.patient ? this.printData.patient.sexName : '',
|
||||
patientAge: this.printData.patient ? this.printData.patient.patientAge : '',
|
||||
priority: this.printData.priority || '',
|
||||
qrCode: qrCode,
|
||||
orderDetail: formattedOrderDetail,
|
||||
printDate: moment().format('YYYY-MM-DD HH:mm')
|
||||
}
|
||||
// 使用 hiprint 打印
|
||||
await simplePrint(PRINT_TEMPLATE.INJECT_LABEL, printData, printerName)
|
||||
} catch (error) {
|
||||
console.error('输液标签打印失败:', error)
|
||||
if (this.openMesBox) {
|
||||
this.openMesBox('6', '打印失败: ' + (error.message || '未知错误'))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less">
|
||||
.printInjectCard{
|
||||
display: grid;
|
||||
width: 400px;
|
||||
grid-template-rows: 60px 205px 30px;
|
||||
border: solid #555 1px;
|
||||
background-color: #FFFFFF;
|
||||
|
||||
td{
|
||||
padding-left: 3px;
|
||||
}
|
||||
}
|
||||
@page{
|
||||
size: auto;
|
||||
margin: 32px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
<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>
|
||||
@@ -1,66 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<div ref="print">
|
||||
<div v-for="item in printData" :key="item.id">
|
||||
<div class="myccs2">
|
||||
<injectLabel :ref="item.id" :print-data="item" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Print from 'vue-print-nb'
|
||||
import injectLabel from './injectLabel'
|
||||
|
||||
export default {
|
||||
components: { injectLabel },
|
||||
props: {
|
||||
printData: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
}
|
||||
},
|
||||
Print,
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 打印
|
||||
fprint(preview, printer) {
|
||||
this.$nextTick(() => {
|
||||
if (preview) {
|
||||
this.$print(this.$refs.print)
|
||||
} else {
|
||||
this.printData.forEach(data => {
|
||||
this['$refs'][data.id][0].print(printer)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less">
|
||||
.myccs{
|
||||
background-color: forestgreen;
|
||||
height: 100px;
|
||||
width: 200px;
|
||||
padding: 1px;
|
||||
border: 1px solid red;
|
||||
color: #0EB396;
|
||||
}
|
||||
@page{
|
||||
size: auto;
|
||||
margin: 32px;
|
||||
}
|
||||
@media print {
|
||||
.myccs2{
|
||||
page-break-before: always;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<div ref="print">
|
||||
<div v-for="item in printData" :key="item.id">
|
||||
<div class="myccs2">
|
||||
<orderSheet v-if="!item.type" :ref="item.id" :print-data="item" />
|
||||
<exeOrderSheet v-if="item.type" :ref="item.id" :print-data="item" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Print from 'vue-print-nb'
|
||||
import orderSheet from './orderSheet'
|
||||
import exeOrderSheet from './exeOrderSheet'
|
||||
|
||||
export default {
|
||||
name: 'VuePrintNb',
|
||||
components: { orderSheet, exeOrderSheet },
|
||||
props: {
|
||||
printData: {
|
||||
type: Array,
|
||||
default() {
|
||||
return []
|
||||
}
|
||||
}
|
||||
},
|
||||
Print,
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 打印
|
||||
fprint(preview, printer) {
|
||||
console.log(this.printData, 'printData')
|
||||
this.$nextTick(() => {
|
||||
if (preview) {
|
||||
this.$print(this.$refs.print)
|
||||
} else {
|
||||
this.printData.forEach(data => {
|
||||
this['$refs'][data.id][0].printTest()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less">
|
||||
.myccs{
|
||||
background-color: forestgreen;
|
||||
height: 100px;
|
||||
width: 200px;
|
||||
padding: 1px;
|
||||
border: 1px solid red;
|
||||
color: #0EB396;
|
||||
}
|
||||
@page{
|
||||
size: auto;
|
||||
margin: 20px;
|
||||
}
|
||||
@media print {
|
||||
.myccs2{
|
||||
page-break-before: always;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
<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>
|
||||
@@ -1,75 +0,0 @@
|
||||
<template>
|
||||
<div class="printTicket">
|
||||
<p>{{ userStore.hospitalName }}</p>
|
||||
<div>
|
||||
<span>姓名:</span>
|
||||
<span>{{ printData.patientName }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>患者编号:</span>
|
||||
<span>{{ printData.hisId }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>分诊科室:</span>
|
||||
<span>{{ printData.dept }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>分诊等级:</span>
|
||||
<span>{{ printData.triageLevel }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>分诊时间:</span>
|
||||
<span>{{ printData.triageTime }}</span>
|
||||
</div>
|
||||
<img ref="refQr" style="position: absolute; top: 10px; left: 100px" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import JsBarcode from 'jsbarcode';
|
||||
import useUserStore from '@/store/modules/user';
|
||||
|
||||
export default {
|
||||
name: 'TriageTicket',
|
||||
setup() {
|
||||
const userStore = useUserStore();
|
||||
return { userStore };
|
||||
},
|
||||
props: {
|
||||
printData: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {
|
||||
patientName: '',
|
||||
dept: '',
|
||||
triageLevel: '',
|
||||
triageTime: '',
|
||||
hisId: '',
|
||||
};
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
updated() {
|
||||
JsBarcode(this.$refs.refQr, this.printData.hisId, {
|
||||
format: 'CODE128',
|
||||
lineColor: '#000',
|
||||
background: '#fff',
|
||||
displayValue: false,
|
||||
height: 30,
|
||||
margin: 2,
|
||||
});
|
||||
},
|
||||
mounted() {},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printTicket {
|
||||
display: block;
|
||||
width: 300px;
|
||||
height: 200px;
|
||||
border: 1px solid #a3a3a3;
|
||||
}
|
||||
</style>
|
||||
@@ -1,73 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<div ref="print">
|
||||
<div class="myccs2">
|
||||
<triageTicketNew ref="printTriage" :print-data="printData" />
|
||||
</div>
|
||||
<!-- <div v-for="item in printData" :key="item.id">-->
|
||||
<!-- <div class="myccs2">-->
|
||||
<!-- <triageTicketNew :ref="item.id" :print-data="printData"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Print from 'vue-print-nb'
|
||||
import triageTicketNew from './triageTicketNew'
|
||||
|
||||
export default {
|
||||
components: { triageTicketNew },
|
||||
props: {
|
||||
printData: {
|
||||
// type: Array,
|
||||
default() {
|
||||
return {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
Print,
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 打印
|
||||
fprint(preview, printer) {
|
||||
this.$nextTick(() => {
|
||||
if (preview) {
|
||||
this.$print(this.$refs.print)
|
||||
} else {
|
||||
// this.$refs.printTriage.initBarCode();
|
||||
this.$refs.printTriage.printTriage(printer)
|
||||
// this.printData.forEach(data => {
|
||||
// this['$refs'][data.id][0].print(printer);
|
||||
// });
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.myccs{
|
||||
background-color: forestgreen;
|
||||
height: 100px;
|
||||
width: 200px;
|
||||
padding: 1px;
|
||||
border: 1px solid red;
|
||||
color: #0EB396;
|
||||
}
|
||||
@page{
|
||||
size: auto;
|
||||
margin: 32px;
|
||||
}
|
||||
@media print {
|
||||
.myccs2{
|
||||
page-break-before: always;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,195 +0,0 @@
|
||||
<template>
|
||||
<div ref="print">
|
||||
<div class="printInjectCard">
|
||||
<div :id="'div1'">
|
||||
<div style="width: 300px; text-align: center">
|
||||
<span style="font-weight: bolder; font-size: 18px; line-height: 36px">{{ printData.greenText }}</span>
|
||||
<span style="font-weight: bolder; font-size: 18px; line-height: 36px">分诊单</span>
|
||||
</div>
|
||||
<div style="position: absolute; top: 135px; text-align: center; width: 300px">{{ printData.hisId }}</div>
|
||||
<div style="position: absolute; top: 155px; text-align: center; width: 300px">
|
||||
{{ printData.triageLevel }}({{ printData.dept }})
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
position: absolute;
|
||||
top: 180px;
|
||||
left: 15px;
|
||||
display: block;
|
||||
width: 300px;
|
||||
height: 10px;
|
||||
border-bottom: 1px solid #5a5a5a;
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div :id="'div2'">
|
||||
<div style="width: 320px; margin-left: 25px">
|
||||
<div style="font-size: 15px">
|
||||
<span>姓名:</span>
|
||||
<span>{{ printData.patientName }}</span>
|
||||
<span style="margin-left: 15px">性别:</span>
|
||||
<span>{{ printData.sex }}</span>
|
||||
<span style="margin-left: 15px">年龄:</span>
|
||||
<span>{{ printData.age }}</span>
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
left: 15px;
|
||||
display: block;
|
||||
width: 300px;
|
||||
height: 10px;
|
||||
border-bottom: 1px solid #5a5a5a;
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div :id="'div3'">
|
||||
<div style="margin-left: 15px; vertical-align: center; line-height: 18px">
|
||||
<div>
|
||||
<div style="display: inline-block; font-size: 15px">
|
||||
<span>Temp:</span>
|
||||
<span>{{ printData.observation ? printData.observation.temperature : '' }}℃</span>
|
||||
</div>
|
||||
<div style="display: inline-block; position: absolute; left: 180px; font-size: 15px">
|
||||
<span>P:</span>
|
||||
<span>{{ printData.observation ? printData.observation.sphygmus : '' }}次/分</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: block">
|
||||
<div style="display: inline-block; font-size: 15px">
|
||||
<span>R:</span>
|
||||
<span>{{ printData.observation ? printData.observation.breath : '' }}次/分</span>
|
||||
</div>
|
||||
<div style="display: inline-block; position: absolute; left: 180px; font-size: 15px">
|
||||
<span>BP:</span>
|
||||
<span>{{ getBloodPressure(printData.observation) }}mmHg</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: block; font-size: 15px">
|
||||
<span>SPO2:</span>
|
||||
<span>{{ printData.observation ? printData.observation.bloodOxygen : '' }}%</span>
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
position: absolute;
|
||||
top: 48px;
|
||||
left: 5px;
|
||||
display: block;
|
||||
width: 300px;
|
||||
height: 10px;
|
||||
border-bottom: 1px solid #5a5a5a;
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div :id="'div4'">
|
||||
<div style="margin-left: 15px; font-size: 15px">
|
||||
<div>
|
||||
<span>分诊时间:</span>
|
||||
<span>{{ printData.triageTime }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>联系电话:</span>
|
||||
<span>{{ printData.tel }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
position: absolute;
|
||||
top: 35px;
|
||||
left: 5px;
|
||||
display: block;
|
||||
width: 300px;
|
||||
height: 10px;
|
||||
border-bottom: 1px solid #5a5a5a;
|
||||
"
|
||||
/>
|
||||
<div style="margin-left: 15px">
|
||||
<div style="font-size: 14px; margin-top: 15px; font-weight: bolder">请仔细核对个人信息后进行挂号</div>
|
||||
<div style="margin-top: 5px; font-size: 14px">为了您家人和其他患者的健康</div>
|
||||
<div style="font-size: 14px">请您保持就诊秩序保持诊区安静</div>
|
||||
<div style="font-size: 14px">祝您早日康复</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
// 迁移到 hiprint
|
||||
import { simplePrint, PRINT_TEMPLATE } from '@/utils/printUtils.js'
|
||||
|
||||
export default {
|
||||
name: 'VuePrintNb',
|
||||
props: {
|
||||
printData: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
lastId: ''
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
|
||||
methods: {
|
||||
// 获取血压值
|
||||
getBloodPressure(pressure) {
|
||||
if (!pressure) return ''
|
||||
else if (pressure.bloodPressureShrinkOne === null) return ''
|
||||
return pressure.bloodPressureShrinkOne + '/' + pressure.bloodPressureDiastoleOne
|
||||
},
|
||||
/**
|
||||
* 使用 hiprint 执行打印
|
||||
* @param {string} printerName 打印机名称
|
||||
*/
|
||||
async printTriage(printerName) {
|
||||
console.log(this.printData, 'printData')
|
||||
try {
|
||||
// 构建打印数据
|
||||
const printData = {
|
||||
hisId: this.printData.hisId,
|
||||
triageLevel: this.printData.triageLevel,
|
||||
dept: this.printData.dept,
|
||||
patientName: this.printData.patientName,
|
||||
sex: this.printData.sex,
|
||||
age: this.printData.age,
|
||||
temperature: this.printData.observation ? this.printData.observation.temperature : '',
|
||||
sphygmus: this.printData.observation ? this.printData.observation.sphygmus : '',
|
||||
breath: this.printData.observation ? this.printData.observation.breath : '',
|
||||
bloodPressure: this.getBloodPressure(this.printData.observation),
|
||||
bloodOxygen: this.printData.observation ? this.printData.observation.bloodOxygen : '',
|
||||
triageTime: this.printData.triageTime,
|
||||
tel: this.printData.tel,
|
||||
greenText: this.printData.greenText || ''
|
||||
}
|
||||
// 使用 hiprint 打印
|
||||
await simplePrint(PRINT_TEMPLATE.TRIAGE_TICKET, printData, printerName)
|
||||
} catch (error) {
|
||||
console.error('分诊条打印失败:', error)
|
||||
if (this.openMesBox) {
|
||||
this.openMesBox('6', '打印失败: ' + (error.message || '未知错误'))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less">
|
||||
.printInjectCard {
|
||||
display: grid;
|
||||
width: 400px;
|
||||
grid-template-rows: 60px 205px 30px;
|
||||
border: solid #555 1px;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
@page {
|
||||
size: auto;
|
||||
margin: 32px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,115 +0,0 @@
|
||||
<template>
|
||||
<div class="printWrist">
|
||||
<div id="div1" class="printView_content">
|
||||
<div style="margin: 1px;font-size: 12px">
|
||||
<span>姓名: </span>
|
||||
<span>{{ printData.patientName }}</span>
|
||||
<span style="position: absolute; left: 110px">病历号:</span>
|
||||
<span style="position: absolute; left: 155px">{{ printData.hisId }}</span>
|
||||
<span style="position: absolute; left: 250px">入院时间:</span>
|
||||
<span style="position: absolute; left: 305px">{{ printData.checkInWardTime? printData.checkInWardTime.substr(0,16):'' }}</span>
|
||||
</div>
|
||||
<div style="margin: 1px;font-size: 12px">
|
||||
<span>性别: </span>
|
||||
<span>{{ printData.gender? printData.gender.display:'' }}</span>
|
||||
<span style="position: absolute; left: 110px">科室:</span>
|
||||
<span style="position: absolute; left: 140px">{{ printData.dept }}</span>
|
||||
</div>
|
||||
<div style="margin-top: 2px;font-size: 12px">
|
||||
<span>床号: </span>
|
||||
<span>{{ printData.bedName }}</span>
|
||||
<span style="position: absolute; left: 110px">分级:</span>
|
||||
<span style="position: absolute; left: 140px">{{ printData.triageLevel }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="qrcode" ref="refQr" style="padding-top: 1px" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import QRCode from 'qrcodejs2'
|
||||
// 迁移到 hiprint
|
||||
import { simplePrint, PRINT_TEMPLATE } from '@/utils/printUtils.js'
|
||||
|
||||
export default {
|
||||
name: 'WristPrint',
|
||||
data() {
|
||||
return {
|
||||
printData: {
|
||||
patientName: '',
|
||||
deptName: '',
|
||||
triageLevel: '',
|
||||
triageTime: '',
|
||||
hisId: '11111',
|
||||
lastId: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
updated() {
|
||||
this.initBarCode()
|
||||
},
|
||||
methods: {
|
||||
initBarCode() {
|
||||
this.$nextTick(() => {
|
||||
if (this.lastId !== this.printData.hisId) {
|
||||
new QRCode('qrcode', {
|
||||
text: this.printData.hisId,
|
||||
width: 40,
|
||||
height: 40,
|
||||
colorDark: '#000000',
|
||||
colorLight: '#ffffff',
|
||||
correctLevel: QRCode.CorrectLevel.H
|
||||
})
|
||||
}
|
||||
this.lastId = this.printData.hisId
|
||||
})
|
||||
},
|
||||
clear() {
|
||||
document.getElementById('qrcode').innerHTML = ''
|
||||
},
|
||||
/**
|
||||
* 使用 hiprint 执行打印
|
||||
* @param {boolean} preview 是否预览(hiprint暂不支持预览参数,保留兼容性)
|
||||
* @param {string} printerName 打印机名称
|
||||
*/
|
||||
async execPrint(preview, printerName) {
|
||||
try {
|
||||
// 构建打印数据
|
||||
const printData = {
|
||||
patientName: this.printData.patientName,
|
||||
hisId: this.printData.hisId,
|
||||
gender: this.printData.gender ? this.printData.gender.display : '',
|
||||
dept: this.printData.dept,
|
||||
bedName: this.printData.bedName,
|
||||
triageLevel: this.printData.triageLevel,
|
||||
checkInWardTime: this.printData.checkInWardTime
|
||||
}
|
||||
// 使用 hiprint 打印
|
||||
await simplePrint(PRINT_TEMPLATE.WRIST_BAND, printData, printerName)
|
||||
} catch (error) {
|
||||
console.error('腕带打印失败:', error)
|
||||
if (this.openMesBox) {
|
||||
this.openMesBox('6', '打印失败: ' + (error.message || '未知错误'))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.printWrist {
|
||||
display: grid;
|
||||
width: 460px;
|
||||
grid-template-columns: 330px 40px;
|
||||
height: 45px;
|
||||
|
||||
.printView_content{
|
||||
display: grid;
|
||||
padding-top: 1px;
|
||||
padding-left: 60px;
|
||||
grid-template-rows: repeat(3,14px);
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user