|
|
@@ -1,16 +1,17 @@
|
|
|
<template>
|
|
|
<el-container>
|
|
|
<el-header height="36px" style="margin-top: 8px">
|
|
|
- <el-date-picker v-model="dateRange" type="daterange" range-separator="至" start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"></el-date-picker>
|
|
|
- <el-button @click="getHuiZhenDataClick" type="primary" icon="el-icon-search">检索</el-button>
|
|
|
+ <el-date-picker v-model="dateRange" :shortcuts="shortcuts" end-placeholder="结束日期" range-separator="至"
|
|
|
+ start-placeholder="开始日期" type="daterange"></el-date-picker>
|
|
|
+ <el-button icon="el-icon-search" type="primary" @click="getHuiZhenDataClick">检索</el-button>
|
|
|
<el-button icon="el-icon-upload" type="primary" @click="baoCunHuiZhenClick">保存</el-button>
|
|
|
<el-button icon="el-icon-printer" type="success" @click="daYingClick">打印</el-button>
|
|
|
<el-tag type="danger">会诊意见限制 1100 个字</el-tag>
|
|
|
</el-header>
|
|
|
<el-container>
|
|
|
<el-aside width="400px">
|
|
|
- <el-table :data="huanZeData" :height="tableHeight" @row-click="dianJiDanYuanGe" stripe highlight-current-row>
|
|
|
+ <el-table :data="huanZeData" :height="windowSize.h / 1.1 " highlight-current-row stripe
|
|
|
+ @row-click="dianJiDanYuanGe">
|
|
|
<el-table-column label="床号" prop="bedNo" width="40px"></el-table-column>
|
|
|
<el-table-column label="住院号" prop="inpatientNo"></el-table-column>
|
|
|
<el-table-column label="住院次数" prop="admissTimes"></el-table-column>
|
|
|
@@ -18,87 +19,17 @@
|
|
|
<el-table-column label="申请次数" prop="reqTimes"></el-table-column>
|
|
|
</el-table>
|
|
|
<el-pagination
|
|
|
+ :current-page="currentPage"
|
|
|
+ :page-size="pageSize"
|
|
|
:pager-count="5"
|
|
|
- small
|
|
|
:total="total"
|
|
|
layout="prev, pager, next,total"
|
|
|
- :current-page="currentPage"
|
|
|
- :page-size="pageSize"
|
|
|
+ small
|
|
|
@current-change="handleCurrentChange"
|
|
|
></el-pagination>
|
|
|
</el-aside>
|
|
|
<el-main>
|
|
|
- <div :style="mainInfo" class="main-info-parent">
|
|
|
- <div id="huiZhenXinXiDaYin">
|
|
|
- <h1 style="text-align: center; font-size: 30px">湖南泰和医院</h1>
|
|
|
- <h4 style="text-align: center; font-size: 17px; margin-top: 0px">会 诊 记 录 单</h4>
|
|
|
- <div class="divHuanZheXinXi">
|
|
|
- <div class="huanZheXinXi" style="margin-left: 20px">住院号:{{ huanZheXinXi.inpatientNo }}</div>
|
|
|
- <div class="huanZheXinXi" style="margin-left: 25px">姓名:{{ huanZheXinXi.name }}</div>
|
|
|
- <div class="huanZheXinXi">性别:{{ cptSex(huanZheXinXi.sex) }}</div>
|
|
|
- <div class="huanZheXinXi" style="width: 90px">年龄:{{ huanZheXinXi.age }}</div>
|
|
|
- <div class="huanZheXinXi" style="width: 140px">科室:{{ huanZheXinXi.deptCodeName }}</div>
|
|
|
- <div class="huanZheXinXi">床号:{{ huanZheXinXi.bedNo }}</div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="huiZhenBody">
|
|
|
- <div>
|
|
|
- <div>
|
|
|
- 请
|
|
|
- <div class="reqDept">{{ huanZheXinXi.reqDept1 }}</div>
|
|
|
- 会诊
|
|
|
- <div class="huiZhenJiBie">会诊类别:{{ hzLeiBie(huanZheXinXi.hzType) }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <!-- 病情简介 -->
|
|
|
- <div class="zhenDuanBianJu">
|
|
|
- 病情简介 <br/>
|
|
|
- <textarea v-model="huanZheXinXi.reqComment" readonly="value" class="zhenDuanTextarea"
|
|
|
- style="height: 154px"/>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 目前主要诊断 -->
|
|
|
- <div class="zhenDuanBianJu">
|
|
|
- 目前主要诊断 <br/>
|
|
|
- <textarea v-model="huanZheXinXi.hzZd" readonly="value" class="zhenDuanTextarea"
|
|
|
- style="height: 50px"></textarea>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- 会诊目的 -->
|
|
|
- <div class="zhenDuanBianJu">
|
|
|
- 会诊目的 <br/>
|
|
|
- <textarea v-model="huanZheXinXi.hzMd" readonly="value" class="zhenDuanTextarea"
|
|
|
- style="height: 50px"></textarea>
|
|
|
- </div>
|
|
|
- <div class="qingQiuHuiZhenXinXi">
|
|
|
- <div class="div1">请求会诊科室:{{ huanZheXinXi.deptCodeName }}</div>
|
|
|
- <div class="div2">会诊申请医师:{{ huanZheXinXi.reqDoctor }}</div>
|
|
|
- <div>申请时间:{{ huanZheXinXi.reqDate }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <!-- 会诊意见 -->
|
|
|
- <div class="huiZhenBody">
|
|
|
- <!-- 会诊意见 -->
|
|
|
- <div class="zhenDuanBianJu">
|
|
|
- 会诊意见 <br/>
|
|
|
- <textarea
|
|
|
- maxlength="1100"
|
|
|
- autoHeight="true"
|
|
|
- v-model="huanZheXinXi.hzComment"
|
|
|
- class="zhenDuanTextarea"
|
|
|
- style="height: 329px"
|
|
|
- onkeydown="javascript:if(event.keyCode == 13)event.returnValue = false;"
|
|
|
- >
|
|
|
- </textarea>
|
|
|
- </div>
|
|
|
- <div class="qingQiuHuiZhenXinXi">
|
|
|
- <div class="div1">会诊科室:{{ deptName }}</div>
|
|
|
- <div class="div2">医师:{{ doctorName }}</div>
|
|
|
- <div>会诊时间:{{ shiShidate }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <DaYingHuiZhen ref="daYingHuiZhenRef" @fanHuiXinXi="huiZhenFanHuiXinXi"></DaYingHuiZhen>
|
|
|
</el-main>
|
|
|
</el-container>
|
|
|
</el-container>
|
|
|
@@ -106,64 +37,37 @@
|
|
|
|
|
|
<script>
|
|
|
import {ref} from '@vue/reactivity'
|
|
|
-import {getDeptName, getHuanZheXinXi, getHuiZhenData, wanChenHuiZhen} from '@/api/case-front-sheet/jie-shou-hui-zhen'
|
|
|
+import {getHuanZheXinXi, getHuiZhenData, wanChenHuiZhen} from '@/api/case-front-sheet/jie-shou-hui-zhen'
|
|
|
import {cptSex} from '@/utils/computed'
|
|
|
import store from '@/store'
|
|
|
-import {getDateRangeFormatDate, getDate, getDatetime} from '@/utils/date'
|
|
|
-import {onActivated, onDeactivated, onMounted} from '@vue/runtime-core'
|
|
|
+import {getDateRangeFormatDate, getDatetime} from '@/utils/date'
|
|
|
+import {onMounted} from '@vue/runtime-core'
|
|
|
import {ElMessage, ElMessageBox} from 'element-plus'
|
|
|
-import '@/css/hui-zhen-ji-lv-dan.css'
|
|
|
-import {initLodop, getLodop} from '@/utils/c-lodop'
|
|
|
-import {huiZhenJiLvDanCss} from '../../../data/css-for-print'
|
|
|
+import DaYingHuiZhen from "@/components/huiZhenDaYing/DaYingHuiZhen.vue";
|
|
|
+import {computed} from "vue";
|
|
|
+import {stringIsBlank} from "@/utils/blank-utils";
|
|
|
+import {shortcuts} from '@/data/shortcuts'
|
|
|
|
|
|
export default {
|
|
|
+ components: {DaYingHuiZhen},
|
|
|
setup() {
|
|
|
////////////////////////////// 获取屏幕高度 /////////////////////////////////////////
|
|
|
|
|
|
- const windowSize = store.state.app.windowSize
|
|
|
- const tableHeight = windowSize.h - 70
|
|
|
-
|
|
|
- const deptName = ref('')
|
|
|
+ const windowSize = computed(() => {
|
|
|
+ return store.state.app.windowSize
|
|
|
+ })
|
|
|
|
|
|
const doctorName = store.state.user.info.name
|
|
|
-
|
|
|
- const shiShidate = ref('')
|
|
|
+ const daYingHuiZhenRef = ref(null)
|
|
|
|
|
|
onMounted(() => {
|
|
|
- initLodop()
|
|
|
- let MoRenRiQi = getDate(new Date())
|
|
|
- dateRange.value[0] = MoRenRiQi
|
|
|
- dateRange.value[1] = MoRenRiQi
|
|
|
+ dateRange.value[0] = shortcuts[0].value[0]
|
|
|
+ dateRange.value[1] = shortcuts[0].value[1]
|
|
|
getHuiZhenDataClick()
|
|
|
-
|
|
|
- getDeptName(store.state.user.info.deptCode).then((res) => {
|
|
|
- deptName.value = res
|
|
|
- })
|
|
|
- })
|
|
|
-
|
|
|
- /**
|
|
|
- * 实时获取 时间 先定义一个专门赋值的 函数
|
|
|
- * 在开启 计时器 1秒一次 在页面进入的时候 清除计时器 然后在打开
|
|
|
- * 在离开页面的时候也要开启
|
|
|
- */
|
|
|
- function shiJian() {
|
|
|
- shiShidate.value = getDatetime(new Date())
|
|
|
- }
|
|
|
-
|
|
|
- var interval = setInterval(shiJian, 1000)
|
|
|
-
|
|
|
- onActivated(() => {
|
|
|
- clearInterval(interval)
|
|
|
- interval = setInterval(shiJian, 1000)
|
|
|
- })
|
|
|
-
|
|
|
- onDeactivated(() => {
|
|
|
- clearInterval(interval)
|
|
|
})
|
|
|
|
|
|
////////////////////////////// 获取患者信息 需分页 /////////////////////////////////////////
|
|
|
const dateRange = ref([])
|
|
|
-
|
|
|
const huanZeData = ref([])
|
|
|
const currentPage = ref(1)
|
|
|
const pageSize = ref(10)
|
|
|
@@ -188,6 +92,7 @@ export default {
|
|
|
const dianJiDanYuanGe = (val) => {
|
|
|
getHuanZheXinXi(val.admissTimes, val.reqTimes, val.inpatientNo).then((res) => {
|
|
|
huanZheXinXi.value = res
|
|
|
+ daYingHuiZhenRef.value.huiZhenXinXiXiangQing(res)
|
|
|
})
|
|
|
}
|
|
|
|
|
|
@@ -197,17 +102,23 @@ export default {
|
|
|
*/
|
|
|
const baoCunHuiZhenClick = () => {
|
|
|
if (!huanZheXinXi.value.name) {
|
|
|
- ElMessage.error({
|
|
|
+ ElMessage({
|
|
|
message: '请先选择患者',
|
|
|
showClose: true,
|
|
|
+ type: 'error'
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ if (stringIsBlank(huanZheXinXi.value.hzComment)) {
|
|
|
+ return ElMessage({
|
|
|
+ message: '请填写会诊意见',
|
|
|
+ showClose: true,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
ElMessageBox.confirm('是否保存【' + huanZheXinXi.value.name + '】的会诊信息', '提示', {
|
|
|
type: 'warning',
|
|
|
- closeOnClickModal: false,
|
|
|
- closeOnPressEscape: false,
|
|
|
- showClose: false,
|
|
|
+ distinguishCancelAndClose: true,
|
|
|
cancelButtonText: '仅保存',
|
|
|
confirmButtonText: '完成会诊',
|
|
|
})
|
|
|
@@ -216,14 +127,22 @@ export default {
|
|
|
// 完成 会诊 发送 axios
|
|
|
wanChenHuiZhen(huanZheXinXi.value)
|
|
|
getHuiZhenDataClick()
|
|
|
- huanZheXinXi.value = []
|
|
|
+ huanZheXinXi.value = {}
|
|
|
+ daYingHuiZhenRef.value.huanZheXinXi.value = {}
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
- huanZheXinXi.value.statusFlag = 1
|
|
|
- wanChenHuiZhen(huanZheXinXi.value)
|
|
|
+ .catch((e) => {
|
|
|
+ if (e === 'cancel') {
|
|
|
+ huanZheXinXi.value.statusFlag = 1
|
|
|
+ wanChenHuiZhen(huanZheXinXi.value)
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ const huiZhenFanHuiXinXi = (val) => {
|
|
|
+ huanZheXinXi.value = val.value
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
///////////////////////////////////////////////////////// 开启打印 ///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
const daYingClick = () => {
|
|
|
@@ -234,37 +153,12 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- // 在vue 中使用 v-model 绑定的 都需要 这样不然没有数据
|
|
|
- const allTextArea = document.body.getElementsByTagName('textarea')
|
|
|
- const textInput = document.body.getElementsByTagName('input')
|
|
|
- for (var i = 0; i < textInput.length; i++) {
|
|
|
- textInput[i].setAttribute('value', textInput[i].value)
|
|
|
- }
|
|
|
- for (let i = 0; i < allTextArea.length; i++) {
|
|
|
- allTextArea[i].innerText = allTextArea[i].value
|
|
|
- }
|
|
|
- // A4: 210毫米 × 297毫米 = 793.70px * 1122.52px
|
|
|
- let LODOP = getLodop()
|
|
|
- // 导入css样式,以及 内容
|
|
|
- var strFormHtml = huiZhenJiLvDanCss + '<body>' + document.getElementById('huiZhenXinXiDaYin').innerHTML + '</body>'
|
|
|
- LODOP.PRINT_INIT('会诊记录单') // 初始化打印机 名字
|
|
|
- LODOP.SET_PRINT_PAGESIZE(1, '210mm', '297mm', '') // 设置纸张大小 A4
|
|
|
- LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
|
|
|
- LODOP.ADD_PRINT_HTM('2mm', '5mm', '100%', '100%', strFormHtml) //要打印的内容
|
|
|
- LODOP.SET_PRINT_STYLE('ItemType', 3) //设置对象风格
|
|
|
- LODOP.ADD_PRINT_TEXT('290mm', '190mm', '20mm', '2mm', '第#页/共&页') //增加纯文本项
|
|
|
- LODOP.PREVIEW() // 关闭
|
|
|
- }
|
|
|
-
|
|
|
- const mainInfo = {
|
|
|
- height: windowSize.h - 45 + 'px',
|
|
|
- padding: '0 20px',
|
|
|
- overflowY: 'scroll',
|
|
|
+ daYingHuiZhenRef.value.daYing()
|
|
|
}
|
|
|
|
|
|
return {
|
|
|
doctorName,
|
|
|
- tableHeight,
|
|
|
+ windowSize,
|
|
|
huanZeData,
|
|
|
currentPage,
|
|
|
pageSize,
|
|
|
@@ -276,12 +170,12 @@ export default {
|
|
|
dateRange,
|
|
|
getHuiZhenDataClick,
|
|
|
baoCunHuiZhenClick,
|
|
|
- mainInfo,
|
|
|
daYingClick,
|
|
|
hzLeiBie,
|
|
|
getDatetime,
|
|
|
- deptName,
|
|
|
- shiShidate,
|
|
|
+ daYingHuiZhenRef,
|
|
|
+ huiZhenFanHuiXinXi,
|
|
|
+ shortcuts
|
|
|
}
|
|
|
},
|
|
|
}
|