|
@@ -34,6 +34,7 @@
|
|
|
<el-dropdown-menu>
|
|
|
<el-dropdown-item icon="el-icon-printer" command="unSign">解除签收</el-dropdown-item>
|
|
|
<el-dropdown-item icon="el-icon-printer" command="dismissCount" divided>出院患者统计</el-dropdown-item>
|
|
|
+ <el-dropdown-item icon="el-icon-printer" command="exportLateData">导出迟交病案</el-dropdown-item>
|
|
|
<el-dropdown-item icon="el-icon-printer" command="print1" divided>打印正面</el-dropdown-item>
|
|
|
<el-dropdown-item icon="el-icon-printer" command="print2">打印反面</el-dropdown-item>
|
|
|
<el-dropdown-item icon="el-icon-printer" command="confirmPrint">确认已打印</el-dropdown-item>
|
|
@@ -219,9 +220,9 @@ import { shortcuts } from '@/data/shortcuts'
|
|
|
import { formatDate, getOneMonthOffset } from '@/utils/date'
|
|
|
import { initLodop, getLodop } from '@/utils/c-lodop'
|
|
|
import { formatMonth } from '@/utils/date'
|
|
|
-import { createWorkSheet, writeExcelFile } from '@/utils/excel'
|
|
|
import HeadPage from '../../../components/inpatient/frontsheet-printpage/HeadPage.vue'
|
|
|
import TailPage from '../../../components/inpatient/frontsheet-printpage/TailPage.vue'
|
|
|
+import { Export } from '../../../utils/ExportExcel'
|
|
|
export default {
|
|
|
components: {
|
|
|
HeadPage,
|
|
@@ -262,10 +263,12 @@ export default {
|
|
|
bah: '',
|
|
|
})
|
|
|
const cdPercentage = ref('')
|
|
|
+ const isLateDataMode = ref(false)
|
|
|
const searchPatient = () => {
|
|
|
overviewParam.start = formatDate(dateRange.value[0])
|
|
|
overviewParam.end = formatDate(dateRange.value[1])
|
|
|
basOutPatients(overviewParam).then((res) => {
|
|
|
+ isLateDataMode.value = overviewParam.lateFlag === '1'
|
|
|
cdPercentage.value = res.cdPercentage
|
|
|
overview.value = res.list
|
|
|
if (res.list.length === 1) {
|
|
@@ -357,10 +360,8 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
let name = ''
|
|
|
let title = {}
|
|
|
- let fields = []
|
|
|
if (dismissCountType.value === 1) {
|
|
|
title = {
|
|
|
deptName: '科室',
|
|
@@ -368,7 +369,6 @@ export default {
|
|
|
signedCount: '已签收',
|
|
|
unsignCount: '未签收',
|
|
|
}
|
|
|
- fields = ['deptName', 'dismissCount', 'signedCount', 'unsignCount']
|
|
|
name = '科室出院人数统计'
|
|
|
} else {
|
|
|
title = {
|
|
@@ -391,40 +391,19 @@ export default {
|
|
|
zyys: '住院医师',
|
|
|
fdcrb: '法定传染病',
|
|
|
}
|
|
|
- fields = [
|
|
|
- 'patNo',
|
|
|
- 'times',
|
|
|
- 'name',
|
|
|
- 'gender',
|
|
|
- 'age',
|
|
|
- 'admissDate',
|
|
|
- 'disDate',
|
|
|
- 'inHospDays',
|
|
|
- 'admissDept',
|
|
|
- 'zkWard',
|
|
|
- 'totalCharge',
|
|
|
- 'disDept',
|
|
|
- 'disDiag',
|
|
|
- 'blfx',
|
|
|
- 'kzr',
|
|
|
- 'zzys',
|
|
|
- 'zyys',
|
|
|
- 'fdcrb',
|
|
|
- ]
|
|
|
-
|
|
|
name = dismissCountType.value === 2 ? '出院明细统计' : '死亡患者统计'
|
|
|
}
|
|
|
- const fileName = `【${dismissCountMonth.value}】${name}.xlsx`
|
|
|
- setTimeout(() => {
|
|
|
- const workSheet = createWorkSheet(dismissCountdata.value, fields, title)
|
|
|
- writeExcelFile(workSheet, fileName)
|
|
|
- }, 50)
|
|
|
+ const fileName = `【${dismissCountMonth.value}】${name}`
|
|
|
+ Export(dismissCountdata.value, title, fileName)
|
|
|
}
|
|
|
const handleCommand = (val) => {
|
|
|
switch (val) {
|
|
|
case 'dismissCount':
|
|
|
showDismissCount.value = true
|
|
|
break
|
|
|
+ case 'exportLateData':
|
|
|
+ exportLateDataExel()
|
|
|
+ break
|
|
|
case 'print1':
|
|
|
beforePrint(1)
|
|
|
break
|
|
@@ -440,6 +419,41 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ const exportLateDataExel = () => {
|
|
|
+ if (!isLateDataMode.value) {
|
|
|
+ ElMessage({
|
|
|
+ message: '请先查询迟交病案。',
|
|
|
+ type: 'warning',
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (overview.value.length === 0) {
|
|
|
+ ElMessage({
|
|
|
+ message: '没有可以导出的数据!',
|
|
|
+ type: 'warning',
|
|
|
+ duration: 2000,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const title = {
|
|
|
+ name: '姓名',
|
|
|
+ genderName: '性别',
|
|
|
+ bah: '住院号',
|
|
|
+ times: '住院次数',
|
|
|
+ bedNo: '床位',
|
|
|
+ admissDate: '入院时间',
|
|
|
+ disDate: '出院时间',
|
|
|
+ deptName: '出院科室',
|
|
|
+ doctorName: '管床医生',
|
|
|
+ lateDays: '迟交天数',
|
|
|
+ signDate: '签收日期',
|
|
|
+ }
|
|
|
+ Export(overview.value, title, '迟交病案')
|
|
|
+ }
|
|
|
+
|
|
|
const searchMethod = ref('alpha')
|
|
|
const searchResults = ref([])
|
|
|
const showSearchData = (flag) => {
|