|
@@ -0,0 +1,418 @@
|
|
|
+<template>
|
|
|
+ <page-layer>
|
|
|
+ <template #header>
|
|
|
+ <el-select filterable v-model="queryParam.wardCode" @change="initPatintBedNo"
|
|
|
+ style="width: 130px;margin-right: 10px" size="small">
|
|
|
+ <el-option v-for="item in ward" :key="item.code" :label="item.name" :value="item.code">
|
|
|
+ <span style="color: #8492a6; font-size: 12px">{{ item.code }}</span>
|
|
|
+ <el-divider direction="vertical"></el-divider>
|
|
|
+ <span>{{ item.name }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ 执行时间:
|
|
|
+ <el-date-picker
|
|
|
+ v-model="queryParam.executeTime"
|
|
|
+ type="datetime"
|
|
|
+ size="small"
|
|
|
+ :clearable="false"
|
|
|
+ format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
|
|
|
+ style="width: 150px;margin-right: 10px"/>
|
|
|
+ 床位范围:
|
|
|
+ <el-select v-model="queryParam.startBedNo"
|
|
|
+ clearable
|
|
|
+ style="width: 70px">
|
|
|
+ <el-option v-for="item in patintList"
|
|
|
+ :key="item.bedNo"
|
|
|
+ :label="item.bedNo"
|
|
|
+ :value="item.bedNo">
|
|
|
+ <span>{{ item.bedNo }}</span>
|
|
|
+ <el-divider direction="vertical"></el-divider>
|
|
|
+ <span>{{ item.inpatientNo }}</span>
|
|
|
+ <el-divider direction="vertical"></el-divider>
|
|
|
+ <span>{{ item.name }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ 至
|
|
|
+ <el-select v-model="queryParam.endBedNo"
|
|
|
+ style="width: 70px;margin-right: 10px"
|
|
|
+ clearable>
|
|
|
+ <el-option v-for="item in reverPatintList"
|
|
|
+ :key="item.bedNo"
|
|
|
+ :label="item.bedNo"
|
|
|
+ :value="item.bedNo">
|
|
|
+ <span>{{ item.bedNo }}</span>
|
|
|
+ <el-divider direction="vertical"></el-divider>
|
|
|
+ <span>{{ item.inpatientNo }}</span>
|
|
|
+ <el-divider direction="vertical"></el-divider>
|
|
|
+ <span>{{ item.name }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ 频率:
|
|
|
+ <el-select v-model="queryParam.frequCodeFlag"
|
|
|
+ style="width: 70px;margin-right: 10px"
|
|
|
+ >
|
|
|
+ <el-option label="全部" value="0"></el-option>
|
|
|
+ <el-option label="临时" value="1"></el-option>
|
|
|
+ <el-option label="长期" value="2"></el-option>
|
|
|
+ </el-select>
|
|
|
+ 打印范围:
|
|
|
+ <el-select v-model="queryParam.printFlag"
|
|
|
+ style="width: 70px;margin-right: 10px"
|
|
|
+ >
|
|
|
+ <el-option label="全部" value="0"></el-option>
|
|
|
+ <el-option label="新增" value="1"></el-option>
|
|
|
+ <el-option label="已打印" value="2"></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-radio-group v-model="queryParam.pageClass" size="small" @change="pageClassChange" style="margin-right: 20px">
|
|
|
+ <el-radio @click="pageClassChange" label="0" >选择分类</el-radio>
|
|
|
+ <el-radio label="1" >全部分类</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ <el-radio-group v-model="queryParam.executeFlag" size="small" style="margin-right: 10px">
|
|
|
+ <el-radio label="0" >大执行单</el-radio>
|
|
|
+ <el-radio label="1" >小执行单</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ <el-button icon="Search" type="primary" @click="queryInfo">查询</el-button>
|
|
|
+ <el-button icon="Printer" type="success" @click="printInfo">打印</el-button>
|
|
|
+ </template>
|
|
|
+ <template #main>
|
|
|
+ <el-scrollbar class="scrollbar" :max-height="(getWindowSize.h/1.2-100)+'px'" noresize="true">
|
|
|
+ <div v-if="queryParam.executeFlag=='0'" id="printId">
|
|
|
+ <table class="pageTable">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <td colspan="9" style="width: 100%;border: none;text-align: center;font-size: 25px;font-weight:bold">
|
|
|
+ 执行项目表
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td colspan="9" style="width: 753px;border: none;">
|
|
|
+ <div style="float: left;width: 25%">
|
|
|
+ 病房:{{getWardName(queryParam.wardCode)}}
|
|
|
+ </div>
|
|
|
+ <div style="float: left;width: 50%">
|
|
|
+ 日期:{{queryParam.executeTime}}至 {{getDiffDays(queryParam.executeTime.split(" ")[0],1)+" "+queryParam.executeTime.split(" ")[1]}}
|
|
|
+ </div>
|
|
|
+ <div style="float: left;width: 25%">
|
|
|
+ 打印日期:{{getFormatDatetime(new Date(),'YYYY-MM-DD')}}
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th style="width: 10%;height: 27px">医嘱名称</th>
|
|
|
+ <th >剂量</th>
|
|
|
+ <th >总量</th>
|
|
|
+ <th >给药方式</th>
|
|
|
+ <th >频率</th>
|
|
|
+ <th >执行时间</th>
|
|
|
+ <th >执行者</th>
|
|
|
+ <th >审核者</th>
|
|
|
+ <th >医生嘱托</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr v-for="(item,index) in resData">
|
|
|
+ <td colspan="9" v-if="item.showFlag==0" style="font-weight: bold;font-size: 13px;border-bottom: 1px black solid;border-top: 1px black solid;">{{item.bedNo}} {{item.name}} {{item.inpatientNo}}</td>
|
|
|
+ <td v-if="item.showFlag==1" style="width: 20%">{{item.orderName}}</td>
|
|
|
+ <td v-if="item.showFlag==1" style="width: 8%">{{item.dose ?item.dose:''}}</td>
|
|
|
+ <td v-if="item.showFlag==1" style="width: 8%">{{item.drugQuanStr}}</td>
|
|
|
+ <td v-if="item.showFlag==1" style="width: 8%">{{item.supplyName}}</td>
|
|
|
+ <td v-if="item.showFlag==1" style="width: 8%">{{item.frequCode}}</td>
|
|
|
+ <td v-if="item.showFlag==1" style="width: 25%">{{item.occTimeStr}}</td>
|
|
|
+ <td v-if="item.showFlag==1" style="width: 8%"></td>
|
|
|
+ <td v-if="item.showFlag==1" style="width: 8%"></td>
|
|
|
+ <td v-if="item.showFlag==1" style="width: 8%">{{item.instruction}}</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ <div v-if="queryParam.executeFlag=='1'" id="smalPrintId">
|
|
|
+ <table class="pageTable">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <td colspan="6" style="width: 65%;border: none;">
|
|
|
+ <div style="font-size: 25px;text-align:center;font-weight:bold">
|
|
|
+ 执行项目表
|
|
|
+ </div>
|
|
|
+ <div style="float: right">
|
|
|
+ 打印日期:{{getFormatDatetime(new Date(),'YYYY-MM-DD')}}
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td colspan="6" style="width: 753px;border: none;">
|
|
|
+ <div style="float: left;width: 25%">
|
|
|
+ 病房:{{getWardName(queryParam.wardCode)}}
|
|
|
+ </div>
|
|
|
+ <div style="float: left;width: 75%">
|
|
|
+ 日期:{{queryParam.executeTime}}至 {{getDiffDays(queryParam.executeTime.split(" ")[0],1)+" "+queryParam.executeTime.split(" ")[1]}}
|
|
|
+ </div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th style="height: 27px;border-left: 1px solid black">医嘱名称</th>
|
|
|
+ <th >剂量</th>
|
|
|
+ <th >给药方式</th>
|
|
|
+ <th >频率</th>
|
|
|
+ <th colspan="2" style="text-align: center;border: 1px black solid">执行签名</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr v-for="(item,index) in resData">
|
|
|
+ <td colspan="4" v-if="item.showFlag==0" style="font-weight: bold;font-size: 13px;border: 1px black solid ; ">{{item.bedNo}} {{item.name}} {{item.inpatientNo}}</td>
|
|
|
+ <td v-if="item.showFlag==1" style="width: 45%;border-left: 1px black solid">{{item.orderName}}</td>
|
|
|
+ <td v-if="item.showFlag==1" style="width: 10%">{{item.dose ?item.dose:''}}</td>
|
|
|
+ <td v-if="item.showFlag==1" style="width: 15%">{{item.supplyName}}</td>
|
|
|
+ <td v-if="item.showFlag==1" style="width: 10%">{{item.frequCode}}</td>
|
|
|
+ <td v-if="item.showFlag==0" style="width: 10%;border-left: 1px black solid;border-bottom: none;border-right: 1px black solid;border-top: 1px black solid"></td>
|
|
|
+ <td v-if="item.showFlag==0" style="width: 10%;border-left: 1px black solid;border-bottom: none;border-right: 1px black solid;border-top: 1px black solid"></td>
|
|
|
+ <td v-if="item.showFlag==1" style="width: 10%;border-left: 1px black solid;border-bottom: none;border-right: 1px black solid;border-top: none"></td>
|
|
|
+ <td v-if="item.showFlag==1" style="width: 10%;border-left: 1px black solid;border-bottom: none;border-right: 1px black solid;border-top: none"></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td colspan="6" style="border: 1px solid black;height: 0px"></td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </el-scrollbar>
|
|
|
+ <el-dialog
|
|
|
+ v-model="dialogVisible"
|
|
|
+ title="选择分类"
|
|
|
+ width="50%"
|
|
|
+ >
|
|
|
+ <ItemClass ref="itemClassRef" :wardCode="queryParam.wardCode" @closeDiag="closeDiag" @selectionPageClass="selectionPageClass" ></ItemClass>
|
|
|
+ </el-dialog>
|
|
|
+ </template>
|
|
|
+ </page-layer>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="ts" name='PrintExecuteItem'>
|
|
|
+import { computed, onMounted, ref } from 'vue'
|
|
|
+import { useStore } from 'vuex'
|
|
|
+import { getFormatDatetime,getDiffDays } from "@/utils/date"
|
|
|
+import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
+import {getAllWards} from "@/api/zhu-yuan-yi-sheng/resident-doctor";
|
|
|
+import {queryYpZdGroupName,queryYzYpPageNo} from "@/api/medical-advice/medical-common";
|
|
|
+import {queryPatientInfo} from "@/api/medical-advice/medical-advice-management";
|
|
|
+import {stringNotBlank} from "@/utils/blank-utils"
|
|
|
+import {queryExecuteItem,updateExecuteItemPrintFlag} from "@/api/medical-advice/excute-item";
|
|
|
+import PageLayer from "@/layout/PageLayer";
|
|
|
+import ItemClass from "@/components/medical-advice/ItemClass";
|
|
|
+import {getLodop, initLodop} from '@/utils/c-lodop'
|
|
|
+import {getWindowSize} from "@/utils/window-size";
|
|
|
+import {userInfoStore} from "@/utils/store-public";
|
|
|
+
|
|
|
+const queryParam = ref({
|
|
|
+ wardCode:'',
|
|
|
+ startBedNo:'',
|
|
|
+ endBedNo:'',
|
|
|
+ executeTime:getFormatDatetime(new Date(), 'YYYY-MM-DD' + ' 00:00:00'),
|
|
|
+ frequCodeFlag:'0',
|
|
|
+ printFlag:'1',
|
|
|
+ executeFlag:'0',
|
|
|
+ pageClass:'1',
|
|
|
+ classCode:'',
|
|
|
+ codes:[],
|
|
|
+ itemCode:'',
|
|
|
+})
|
|
|
+
|
|
|
+//选择分类切换
|
|
|
+const pageClassChange = () =>{
|
|
|
+ if(queryParam.value.pageClass === '0'){
|
|
|
+ dialogVisible.value = true
|
|
|
+ }else {
|
|
|
+ dialogVisible.value = false
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const selectionPageClass = (val)=>{
|
|
|
+ console.log('pageClass',val)
|
|
|
+ queryParam.value.codes = val.codes
|
|
|
+ queryParam.value.classCode = val.classCode
|
|
|
+ queryParam.value.itemCode = val.itemCode
|
|
|
+}
|
|
|
+
|
|
|
+const closeDiag = ()=>{
|
|
|
+ dialogVisible.value = false
|
|
|
+}
|
|
|
+
|
|
|
+const dialogVisible = ref(false)
|
|
|
+
|
|
|
+const ward = ref([])
|
|
|
+
|
|
|
+const getWardName = (code)=>{
|
|
|
+ for (let i = 0; i < ward.value.length; i++) {
|
|
|
+ if(code === ward.value[i].code ){
|
|
|
+ return ward.value[i].name
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+onMounted(()=>{
|
|
|
+ initLodop()
|
|
|
+ getAllWards().then((res:any)=>{
|
|
|
+ if(res){
|
|
|
+ ward.value = res
|
|
|
+ queryParam.value.wardCode = res[0].code
|
|
|
+ initPatintBedNo()
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+})
|
|
|
+const patintList = ref([])
|
|
|
+const reverPatintList = computed(() => reverseArray(patintList.value))
|
|
|
+function reverseArray(arr) {
|
|
|
+ let newArr = [];
|
|
|
+ arr.forEach(element => {
|
|
|
+ // unshift() 方法可向数组的开头添加一个或更多元素,并返回新的长度。
|
|
|
+ newArr.unshift(element);
|
|
|
+ });
|
|
|
+ return newArr;
|
|
|
+}
|
|
|
+
|
|
|
+const itemClassRef =ref(null)
|
|
|
+const resData = ref([])
|
|
|
+const queryInfo = ()=>{
|
|
|
+ queryExecuteItem(queryParam.value).then((res:any)=>{
|
|
|
+ resData.value = res
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const printCss =`
|
|
|
+.pageTable tr th {
|
|
|
+ border-bottom: 1px solid black;
|
|
|
+ border-top: 1px solid black;
|
|
|
+ text-align: left;
|
|
|
+ font-size: 12px;
|
|
|
+ padding: 0 0;
|
|
|
+
|
|
|
+}
|
|
|
+ .pageTable tr td{
|
|
|
+ border-bottom:1px dashed black;
|
|
|
+ border-top:1px dashed black;
|
|
|
+ text-align: left;
|
|
|
+ font-size: 12px;
|
|
|
+ padding: 0 0;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+.pageTable tr td{
|
|
|
+ height: 27px;
|
|
|
+}
|
|
|
+
|
|
|
+#printId{
|
|
|
+ padding: 0 0;
|
|
|
+ width: 753px;
|
|
|
+}
|
|
|
+
|
|
|
+.pageTable {
|
|
|
+ border-collapse: collapse;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+`
|
|
|
+
|
|
|
+const smallPrintCss =`
|
|
|
+.pageTable tr th {
|
|
|
+ border-bottom: 1px solid black;
|
|
|
+ border-top: 1px solid black;
|
|
|
+ text-align: left;
|
|
|
+ font-size: 12px;
|
|
|
+ padding: 0 0;
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+.pageTable tr td{
|
|
|
+ border-bottom: 1px solid black;
|
|
|
+ border-top: 1px solid black;
|
|
|
+ text-align: left;
|
|
|
+ font-size: 12px;
|
|
|
+ padding: 0 0;
|
|
|
+}
|
|
|
+
|
|
|
+.pageTable tr td{
|
|
|
+ height: 27px;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+.pageTable {
|
|
|
+ border-collapse: collapse;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+`
|
|
|
+
|
|
|
+
|
|
|
+const printInfo = ()=>{
|
|
|
+ updateExecuteItemPrintFlag(resData.value).then((res:any)=>{
|
|
|
+ let LODOP = getLodop()
|
|
|
+ LODOP.PRINT_INIT('执行项目表') // 初始化打印机 名字
|
|
|
+ if(queryParam.value.executeFlag=='0'){
|
|
|
+ LODOP.SET_PRINT_PAGESIZE(1, '210mm', '297mm', '') // 设置纸张大小 A4
|
|
|
+ }else {
|
|
|
+ LODOP.SET_PRINT_PAGESIZE(1, '148mm', '210mm', '') // 设置纸张大小 A5
|
|
|
+ }
|
|
|
+ LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
|
|
|
+ if(queryParam.value.executeFlag=='0'){
|
|
|
+ LODOP.ADD_PRINT_TABLE('2mm', '5mm', '205mm', '220mm', '<style>' + printCss + '</style>' + '<body>' + document.getElementById('printId').innerHTML + '</body>') //要打印的内容
|
|
|
+ LODOP.SET_PRINT_STYLE('ItemType', 3)
|
|
|
+ LODOP.ADD_PRINT_TEXT('250mm', '100mm', '25mm', '10mm', '第#页/共&页')
|
|
|
+ }else {
|
|
|
+ LODOP.ADD_PRINT_TABLE('2mm', '5mm', '143mm', '165mm', '<style>' + smallPrintCss + '</style>' + '<body>' + document.getElementById('smalPrintId').innerHTML + '</body>') //要打印的内容
|
|
|
+ LODOP.SET_PRINT_STYLE('ItemType', 3)
|
|
|
+ LODOP.ADD_PRINT_TEXT('200mm', '70mm', '25mm', '10mm', '第#页/共&页')
|
|
|
+ }
|
|
|
+ LODOP.PREVIEW() // 关闭
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+const initPatintBedNo=()=>{
|
|
|
+ itemClassRef.value ? itemClassRef.value.setWardCode(queryParam.value.wardCode) : ''
|
|
|
+ queryPatientInfo('',queryParam.value.wardCode,'').then((res:any)=>{
|
|
|
+ patintList.value = res
|
|
|
+ })
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style scoped lang="scss">
|
|
|
+ .pageTable tr th {
|
|
|
+ border-bottom: 1px solid black;
|
|
|
+ border-top: 1px solid black;
|
|
|
+ text-align: left;
|
|
|
+ font-size: 12px;
|
|
|
+ padding: 0 0;
|
|
|
+
|
|
|
+}
|
|
|
+#printId .pageTable tr td{
|
|
|
+ border-bottom:1px dashed black;
|
|
|
+ border-top:1px dashed black;
|
|
|
+ text-align: left;
|
|
|
+ font-size: 12px;
|
|
|
+ padding: 0 0;
|
|
|
+ }
|
|
|
+
|
|
|
+#smalPrintId .pageTable tr td{
|
|
|
+ border-bottom: 1px solid black;
|
|
|
+ border-top: 1px solid black;
|
|
|
+ text-align: left;
|
|
|
+ font-size: 12px;
|
|
|
+ padding: 0 0;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+.pageTable tr td{
|
|
|
+ height: 27px;
|
|
|
+}
|
|
|
+ #smalPrintId{
|
|
|
+ padding: 0 0;
|
|
|
+ width: 470px;
|
|
|
+ }
|
|
|
+#printId{
|
|
|
+ padding: 0 0;
|
|
|
+ width: 753px;
|
|
|
+}
|
|
|
+
|
|
|
+.pageTable {
|
|
|
+ border-collapse: collapse;
|
|
|
+}
|
|
|
+</style>
|