版本更新

This commit is contained in:
Zhang.WH
2025-09-03 15:54:41 +08:00
parent 0b93d16b64
commit 8f82322d10
3290 changed files with 154339 additions and 23829 deletions

View File

@@ -0,0 +1,359 @@
<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>

View File

@@ -0,0 +1,6 @@
import mycomp from './index.vue'
/* istanbul ignore next */
mycomp.install = function(Vue) {
Vue.component(mycomp.name, mycomp)
}
export default mycomp

View File

@@ -0,0 +1,66 @@
<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>

View File

@@ -0,0 +1,76 @@
<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>

View File

@@ -0,0 +1,120 @@
<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>
import { getLodop } from '../../../plugins/print/LodopFuncs'
export default {
data() {
return {
printData: {
patientInfo: {},
recordData: {},
cols: []
}
}
},
mounted() {
},
methods: {
printTest() {
const LODOP = getLodop()
LODOP.PRINT_INIT('')
LODOP.ADD_PRINT_TABLE(100, 40, 750, 900, document.getElementById('div2').innerHTML)
LODOP.SET_PRINT_STYLEA(0, 'Horient', 3)
LODOP.ADD_PRINT_HTM(20, 40, '100%', 100, document.getElementById('div1').innerHTML)
LODOP.SET_PRINT_STYLEA(0, 'ItemType', 1)
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', 1)
// LODOP.SET_PRINT_PAGESIZE(2, '', '', ''); // 设置横向打印
LODOP.ADD_PRINT_HTM(1080, 500, 300, 100, '总页数:<span><span tdata="pageNO">第##页</span>/ <span tdata="pageCount">共##页</span></span>')
LODOP.SET_PRINT_STYLEA(0, 'ItemType', 1)
LODOP.SET_PRINT_STYLEA(0, 'Horient', 1)
// LODOP.PREVIEW(); // 打印预览
LODOP.PRINT() // 直接打印
}
}
}
</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>

View File

@@ -0,0 +1,149 @@
<template>
<div class="recordBill">
<div :id="'exeSheetTitle' + printData.id" class="printView_header">
<div style="text-align: center; height: 60px">
呼和浩特市第一医院医嘱执行单
</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>
import { getLodop } from '../../../plugins/print/LodopFuncs'
export default {
props: {
printData: {
type: Object,
default() {
return {
}
}
}
},
data() {
return {
}
},
mounted() {
},
methods: {
printTest() {
const LODOP = getLodop()
LODOP.PRINT_INIT('')
LODOP.ADD_PRINT_TABLE(120, 35, 750, 900, document.getElementById('exeSheet' + this.printData.id).innerHTML)
LODOP.SET_PRINT_STYLEA(0, 'Horient', 3)
LODOP.ADD_PRINT_HTM(20, 40, '100%', 100, document.getElementById('exeSheetTitle' + this.printData.id).innerHTML)
LODOP.SET_PRINT_STYLEA(0, 'ItemType', 1)
LODOP.SET_PRINT_STYLEA(0, 'LinkedItem', 1)
// LODOP.SET_PRINT_PAGESIZE(2, '', '', ''); // 设置横向打印
LODOP.ADD_PRINT_HTM(1080, 500, 300, 100, '总页数:<span><span tdata="pageNO">第##页</span>/ <span tdata="pageCount">共##页</span></span>')
LODOP.SET_PRINT_STYLEA(0, 'ItemType', 1)
LODOP.SET_PRINT_STYLEA(0, 'Horient', 1)
LODOP.SET_SHOW_MODE('LANDSCAPE_DEFROTATED', 1)// 横向时的正向显示
LODOP.PREVIEW() // 打印预览
// LODOP.PRINT(); // 直接打印
}
}
}
</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>

View File

@@ -0,0 +1,155 @@
<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>
// import QRCode from 'qrcodejs2'
import { getLodop } from '../../../plugins/print/LodopFuncs'
export default {
name: 'VuePrintNb',
props: {
printData: {
type: Object,
default() {
return {
}
}
}
},
data() {
return {
lastId: '',
qrCode: ''
}
},
mounted() {
// console.log('mounted方法');
// this.initBarCode();
},
methods: {
// initBarCode() {
// this.$nextTick(() => {
// if (this.lastId !== this.printData.patient.hisId) {
// new QRCode(this.getId(this.printData.id), {
// text: this.printData.patient.hisId,
// width: 50,
// height: 50,
// colorDark: '#000000',
// colorLight: '#ffffff',
// correctLevel: QRCode.CorrectLevel.H
// });
// }
// this.lastId = this.printData.patient.hisId;
// });
// },
//
// getId(id) {
// return 'qrcode' + id;
// },
print(printerName) {
const LODOP = getLodop()
const printer = this.getPrinter(LODOP, printerName)
if (printer === null) {
this.openMesBox('6', '没有找到打印机【' + printerName + '】')
return
}
console.log(this.printData, 'printData')
this.qrCode = this.printData.orderDetail[0].comboNo + this.printData.orderDetail[0].executionSeq
LODOP.PRINT_INIT()
LODOP.SET_PRINTER_INDEX(printer)// 指定打印机
this.setPrint(LODOP)
LODOP.SET_PRINT_PAGESIZE(0, 1070, 800, '')
LODOP.PREVIEW() // 打印预览
// LODOP.PRINT(); // 直接打印
},
setPrint(LODOP) {
LODOP.ADD_PRINT_HTM(0, 0, '100%', '100%', document.getElementById(this.printData.id + 'div1').innerHTML)
LODOP.ADD_PRINT_HTM(82, 0, '100%', '100%', document.getElementById(this.printData.id + 'div2').innerHTML)
LODOP.ADD_PRINT_HTM(265, 10, '100%', '100%', document.getElementById(this.printData.id + 'div3').innerHTML)
LODOP.SET_PRINT_STYLEA(0, 'ItemType', 1)
// 设置二维码 qrcode 条码128B等
// LODOP.ADD_PRINT_BARCODE(Top,Left,Width,Height,BarCodeType,BarCodeValue);
LODOP.ADD_PRINT_BARCODE(0, 300, 75, 75, 'qrcode', this.qrCode)// 设置条码位置、宽高、字体、值
LODOP.SET_PRINT_STYLEA(0, 'FontSize', 18)// 设置上面这个条码下方的文字字体大小
// LODOP.SET_PRINT_STYLEA(0,"Color","#FF0000");//设置当前条码以及条码下方字体的颜色
LODOP.SET_PRINT_STYLEA(0, 'Angle', 180)// 设置旋转角度
LODOP.SET_PRINT_STYLEA(0, 'ShowBarText', 0)// 设置是否显示下方的文字
LODOP.SET_PRINT_STYLEA(0, 'AlignJustify', 2)// 设置条码下方的文字相对于条码本身居中
// LODOP.SET_PRINT_STYLEA(0,"AlignJustify",1);//设置条码下方的文字相对于条码本身居左
// LODOP.SET_PRINT_STYLEA(0,"AlignJustify",3);//设置条码下方的文字相对于条码本身居右
// LODOP.SET_PRINT_STYLEA(0,"GroundColor","#0080FF");//设置条码的背景色
},
// 获取打印机
getPrinter(LODOP, name) {
const listCount = LODOP.GET_PRINTER_COUNT() // 当前打印设备数量
for (let i = 0; i < listCount; i++) {
if (LODOP.GET_PRINTER_NAME(i) === name) {
return name
}
}
return null
}
}
}
</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>

View File

@@ -0,0 +1,113 @@
<template>
<div class="recordBill">
<div id="div1" class="printView_header">
<div style="text-align: center; font-size: 20px; height: 40px">
呼和浩特市第一医院输液执行单
</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>
import { getLodop } from '../../../plugins/print/LodopFuncs'
export default {
data() {
return {
printData: {
patientInfo: {},
recordData: {}
}
}
},
mounted() {
},
methods: {
printTest() {
const LODOP = getLodop()
LODOP.PRINT_INIT('')
LODOP.ADD_PRINT_TABLE(100, 35, 700, 900, document.getElementById('div2').innerHTML)
LODOP.ADD_PRINT_HTM(20, 40, '100%', 100, document.getElementById('div1').innerHTML)
LODOP.SET_PRINT_PAGESIZE(0, '148mm', '210mm', '') // 设置横向打印
// LODOP.SET_SHOW_MODE('LANDSCAPE_DEFROTATED', 1);// 横向时的正向显示
LODOP.PREVIEW() // 打印预览
// LODOP.PRINT(); // 直接打印
}
}
}
</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>

View File

@@ -0,0 +1,65 @@
<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>

View File

@@ -0,0 +1,69 @@
<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>

View File

@@ -0,0 +1,102 @@
<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';
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() {
window.print();
}
// 获取每周数据
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>

View File

@@ -0,0 +1,77 @@
<template>
<div class="printTicket">
<p>xx人民医院</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'
export default {
name: 'TriageTicket',
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>

View File

@@ -0,0 +1,72 @@
<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>

View File

@@ -0,0 +1,192 @@
<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>
import { getLodop } from '../../../plugins/print/LodopFuncs'
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
},
printTriage(printerName) {
console.log(this.printData, 'printData')
const LODOP = getLodop()
const printer = this.getPrinter(LODOP, printerName)
if (printer === null) {
this.openMesBox('6', '没有找到打印机【' + printerName + '】')
return
}
LODOP.PRINT_INIT()
LODOP.SET_PRINTER_INDEX(printer) // 指定打印机
this.setPrint(LODOP)
LODOP.SET_PRINT_PAGESIZE(0, '100mm', '140mm', '')
// LODOP.PREVIEW(); // 打印预览
LODOP.PRINT() // 直接打印
},
setPrint(LODOP) {
LODOP.ADD_PRINT_HTM(0, 0, '100%', '100%', document.getElementById('div1').innerHTML)
LODOP.ADD_PRINT_BARCODE(40, 100, 100, 100, 'qrcode', this.printData.hisId) // 设置条码位置、宽高、字体、值
LODOP.ADD_PRINT_HTM(200, 0, '100%', '100%', document.getElementById('div2').innerHTML)
LODOP.ADD_PRINT_HTM(230, 10, '100%', '100%', document.getElementById('div3').innerHTML)
LODOP.ADD_PRINT_HTM(295, 10, '100%', '100%', document.getElementById('div4').innerHTML)
},
// 获取打印机
getPrinter(LODOP, name) {
const listCount = LODOP.GET_PRINTER_COUNT() // 当前打印设备数量
for (let i = 0; i < listCount; i++) {
if (LODOP.GET_PRINTER_NAME(i) === name) {
return name
}
}
return null
}
}
}
</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>

View File

@@ -0,0 +1,115 @@
<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'
import { getLodop } from '../../../plugins/print/LodopFuncs'
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 = ''
},
execPrint(preview, printerName) {
const LODOP = getLodop()
const printer = this.getPrinter(LODOP, printerName)
if (printer === null) {
this.openMesBox('6', '没有找到打印机【' + printerName + '】')
return
}
LODOP.PRINT_INIT('')
LODOP.ADD_PRINT_HTM(30, 100, '100%', 100, document.getElementById('div1').innerHTML)
LODOP.ADD_PRINT_HTM(30, 20, '100%', 40, document.getElementById('qrcode').innerHTML)
LODOP.SET_PRINT_PAGESIZE(2, '25mm', '270mm', '') // 设置横向打印
if (preview) {
LODOP.PREVIEW() // 打印预览
return
}
// LODOP.PREVIEW(); // 打印预览
LODOP.PRINT() // 直接打印
},
// 获取打印机
getPrinter(LODOP, name) {
const listCount = LODOP.GET_PRINTER_COUNT() // 当前打印设备数量
for (let i = 0; i < listCount; i++) {
if (LODOP.GET_PRINTER_NAME(i) === name) {
return name
}
}
return null
}
}
}
</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>