Sfoglia il codice sorgente

出院统计添加科室筛选

lighter 3 anni fa
parent
commit
27575c6dac

+ 3 - 3
src/api/case-front-sheet/index.js

@@ -133,11 +133,11 @@ export function executeAdvanceSearch(data) {
   })
 }
 
-export function analyzeDismissCount(type, month) {
+export function analyzeDismissCount(data) {
   return request({
     url: '/caseFrontSheet/analyzeDismissCount',
-    method: 'get',
-    params: { type, month },
+    method: 'post',
+    data,
   })
 }
 

+ 444 - 496
src/views/hospitalization/case-front-sheet/AllCaseFrontSheet.vue

@@ -143,16 +143,19 @@
       </div>
     </el-dialog>
     <el-dialog v-model="showDismissCount" title="出院患者统计" width="70%">
-      <el-date-picker v-model="dismissCountMonth" type="month" style="width: 110px" placeholder="请选择" :clearable="false"></el-date-picker>
-      <el-select v-model="dismissCountType" style="width: 120px" @change="dismissCountdata = []">
+      <el-date-picker v-model="disCountParams.month" type="month" style="width: 110px" placeholder="请选择" :clearable="false"></el-date-picker>
+      <el-select v-model="disCountParams.type" style="width: 120px" @change="dismissCountdata = []">
         <el-option :value="1" label="按科室计数"></el-option>
         <el-option :value="2" label="按明细计数"></el-option>
         <el-option :value="3" label="死亡患者计数"></el-option>
       </el-select>
+      <el-select v-model="disCountParams.dept" style="width: 130px" placeholder="请选择科室" filterable clearable>
+        <el-option v-for="item in userWards" :key="item.code" :value="item.code" :label="item.name"></el-option>
+      </el-select>
       <el-divider direction="vertical"></el-divider>
       <el-button icon="el-icon-search" type="primary" @click="fetchDismissCount">获取统计数据</el-button>
       <el-button icon="el-icon-download" type="primary" @click="exportDismissCount">导出Excel</el-button>
-      <div v-if="dismissCountType === 1">
+      <div v-if="disCountParams.type === 1">
         <el-table :data="dismissCountdata" stripe height="360">
           <el-table-column prop="deptName" label="科室"></el-table-column>
           <el-table-column prop="dismissCount" label="出院人数"></el-table-column>
@@ -168,8 +171,8 @@
           <el-table-column prop="gender" label="性别"></el-table-column>
           <el-table-column prop="age" label="年龄"></el-table-column>
           <el-table-column prop="admissDate" label="入院时间"></el-table-column>
-          <el-table-column v-if="dismissCountType === 2" prop="disDate" label="出院时间"></el-table-column>
-          <el-table-column v-if="dismissCountType === 3" prop="disDate" label="死亡时间"></el-table-column>
+          <el-table-column v-if="disCountParams.type === 2" prop="disDate" label="出院时间"></el-table-column>
+          <el-table-column v-if="disCountParams.type === 3" prop="disDate" label="死亡时间"></el-table-column>
           <el-table-column prop="inHospDays" label="住院天数"></el-table-column>
           <el-table-column prop="totalCharge" label="住院费用"></el-table-column>
           <el-table-column prop="admissDept" label="入院科室"></el-table-column>
@@ -195,7 +198,7 @@
   </el-container>
 </template>
 
-<script>
+<script setup name="AllCaseFrontSheet">
 import { yesOrNo, haveOrNot, searchMethods, autopsies } from './common'
 import { computed, onActivated, onMounted, reactive, ref, watchEffect } from 'vue'
 import store from '@/store'
@@ -223,528 +226,473 @@ import { formatMonth } from '@/utils/date'
 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,
-    TailPage,
-  },
-  setup() {
-    const cdStyle = computed(() => {
-      return {
-        position: 'absolute',
-        top: '77px',
-        left: '590px',
-      }
-    })
-    const currentPage = ref(1)
-    const handleCurrentPageChange = (val) => {
-      currentPage.value = val
-    }
-    const userWards = ref([])
-    const windowSize = store.state.app.windowSize
-    const tableHeight = windowSize.h - 75
-    const overview = ref([])
-    const sheet = ref({
-      disdiagList: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}],
-      surgeryList: [{}, {}, {}, {}, {}],
-    })
-    const mainInfo = {
-      height: windowSize.h - 45 + 'px',
-      padding: '0 20px',
-      overflowY: 'scroll',
-    }
-    const dics = ref({})
-    const overviewParam = reactive({
-      ward: '',
-      start: '',
-      end: '',
-      fileStatus: '0',
-      lateFlag: '3',
-      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) {
-          fetchSheetInfo(res.list[0])
-        }
-      })
+
+const cdStyle = computed(() => {
+  return {
+    position: 'absolute',
+    top: '77px',
+    left: '590px',
+  }
+})
+const currentPage = ref(1)
+const handleCurrentPageChange = (val) => {
+  currentPage.value = val
+}
+const userWards = ref([])
+const windowSize = store.state.app.windowSize
+const tableHeight = windowSize.h - 75
+const overview = ref([])
+const sheet = ref({
+  disdiagList: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}],
+  surgeryList: [{}, {}, {}, {}, {}],
+})
+const mainInfo = {
+  height: windowSize.h - 45 + 'px',
+  padding: '0 20px',
+  overflowY: 'scroll',
+}
+const dics = ref({})
+const overviewParam = reactive({
+  ward: '',
+  start: '',
+  end: '',
+  fileStatus: '0',
+  lateFlag: '3',
+  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) {
+      fetchSheetInfo(res.list[0])
     }
+  })
+}
 
-    const dateRange = ref([])
+const dateRange = ref([])
 
-    const fetchSheetInfo = (row) => {
-      if (row.bah !== sheet.value.bah || row.times !== sheet.value.admissTimes) {
-        forceVerifies.value = []
-        adviceVerifies.value = []
-      }
+const fetchSheetInfo = (row) => {
+  if (row.bah !== sheet.value.bah || row.times !== sheet.value.admissTimes) {
+    forceVerifies.value = []
+    adviceVerifies.value = []
+  }
 
-      getSheetInfo(row.bah, row.times, 2).then((res) => {
-        sheet.value = res
-      })
-    }
+  getSheetInfo(row.bah, row.times, 2).then((res) => {
+    sheet.value = res
+  })
+}
 
-    const showSearch = ref(false)
-    const insertDiag = ref(false)
-    watchEffect(() => {
-      if (showSearch.value) {
-        searchResults.value = []
-        setTimeout(() => {
-          searchInput.value.focus()
-        }, 300)
-      } else {
-        insertDiag.value = false
-      }
+const showSearch = ref(false)
+const insertDiag = ref(false)
+watchEffect(() => {
+  if (showSearch.value) {
+    searchResults.value = []
+    setTimeout(() => {
+      searchInput.value.focus()
+    }, 300)
+  } else {
+    insertDiag.value = false
+  }
+})
+const searchInput = ref(null)
+const searchUrl = ref('')
+const searchTargetCode = ref('')
+const searchTargetName = ref('')
+const searchContent = ref('')
+const currentSRPage = ref(1)
+const lastPage = () => {
+  currentSRPage.value -= 1
+  fetchSearchData()
+}
+const nextPage = () => {
+  currentSRPage.value += 1
+  fetchSearchData()
+}
+const fetchSearchData = () => {
+  const param = {
+    method: searchMethod.value,
+    target: searchUrl.value,
+    content: searchContent.value,
+    responceType: sheet.value.responceType,
+    page: currentSRPage.value,
+    ybType: sheet.value.ybType,
+    treatType: sheet.value.treatType,
+  }
+  sheetSearch(param).then((res) => {
+    searchResults.value = res
+  })
+}
+const executeSearch = () => {
+  if (searchContent.value.length < 2 && searchContent.value !== '-') return
+  currentSRPage.value = 1
+  if (searchContent.value === '-') {
+    searchResults.value = [{ code: '-', name: '-' }]
+  } else {
+    fetchSearchData()
+  }
+}
+
+const showDismissCount = ref(false)
+const dismissCountdata = ref([])
+const disCountParams = reactive({
+  month: formatMonth(new Date()),
+  type: 1,
+  dept: null,
+})
+const fetchDismissCount = () => {
+  disCountParams.month = formatMonth(disCountParams.month)
+  analyzeDismissCount(disCountParams).then((res) => {
+    dismissCountdata.value = res
+  })
+}
+const exportDismissCount = () => {
+  if (dismissCountdata.value.length === 0) {
+    ElMessage({
+      message: '没有可以导出的数据!',
+      type: 'warning',
+      duration: 2000,
+      showClose: true,
     })
-    const searchInput = ref(null)
-    const searchUrl = ref('')
-    const searchTargetCode = ref('')
-    const searchTargetName = ref('')
-    const searchContent = ref('')
-    const currentSRPage = ref(1)
-    const lastPage = () => {
-      currentSRPage.value -= 1
-      fetchSearchData()
+    return
+  }
+  let name = ''
+  let title = {}
+  if (disCountParams.type === 1) {
+    title = {
+      deptName: '科室',
+      dismissCount: '出院人数',
+      signedCount: '已签收',
+      unsignCount: '未签收',
     }
-    const nextPage = () => {
-      currentSRPage.value += 1
-      fetchSearchData()
-    }
-    const fetchSearchData = () => {
-      const param = {
-        method: searchMethod.value,
-        target: searchUrl.value,
-        content: searchContent.value,
-        responceType: sheet.value.responceType,
-        page: currentSRPage.value,
-        ybType: sheet.value.ybType,
-        treatType: sheet.value.treatType,
-      }
-      sheetSearch(param).then((res) => {
-        searchResults.value = res
-      })
-    }
-    const executeSearch = () => {
-      if (searchContent.value.length < 2 && searchContent.value !== '-') return
-      currentSRPage.value = 1
-      if (searchContent.value === '-') {
-        searchResults.value = [{ code: '-', name: '-' }]
-      } else {
-        fetchSearchData()
-      }
+    name = '科室出院人数统计'
+  } else {
+    title = {
+      patNo: '住院号',
+      times: '住院次数',
+      name: '姓名',
+      gender: '性别',
+      age: '年龄',
+      admissDate: '入院时间',
+      admissDept: '入院科室',
+      zkWard: '转科科室',
+      disDate: disCountParams.type === 2 ? '出院时间' : '死亡时间',
+      inHospDays: '住院天数',
+      totalCharge: '住院费用',
+      disDept: '出院科室',
+      disDiag: '出院主诊断',
+      blfx: '病例分型',
+      kzr: '科主任',
+      zzys: '主治医师',
+      zyys: '住院医师',
+      fdcrb: '法定传染病',
     }
+    name = disCountParams.type === 2 ? '出院明细统计' : '死亡患者统计'
+  }
+  const fileName = `【${disCountParams.month}】${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
+    case 'print2':
+      beforePrint(2)
+      break
+    case 'confirmPrint':
+      confirmCopyPrint()
+      break
+    case 'unSign':
+      unArchiveBa()
+      break
+  }
+}
 
-    const showDismissCount = ref(false)
-    const dismissCountdata = ref([])
-    const dismissCountMonth = ref(formatMonth(new Date()))
-    const dismissCountType = ref(1)
-    const fetchDismissCount = () => {
-      dismissCountMonth.value = formatMonth(dismissCountMonth.value)
-      analyzeDismissCount(dismissCountType.value, dismissCountMonth.value).then((res) => {
-        dismissCountdata.value = res
-      })
-    }
-    const exportDismissCount = () => {
-      if (dismissCountdata.value.length === 0) {
-        ElMessage({
-          message: '没有可以导出的数据!',
-          type: 'warning',
-          duration: 2000,
-          showClose: true,
-        })
-        return
-      }
-      let name = ''
-      let title = {}
-      if (dismissCountType.value === 1) {
-        title = {
-          deptName: '科室',
-          dismissCount: '出院人数',
-          signedCount: '已签收',
-          unsignCount: '未签收',
-        }
-        name = '科室出院人数统计'
-      } else {
-        title = {
-          patNo: '住院号',
-          times: '住院次数',
-          name: '姓名',
-          gender: '性别',
-          age: '年龄',
-          admissDate: '入院时间',
-          admissDept: '入院科室',
-          zkWard: '转科科室',
-          disDate: dismissCountType.value === 2 ? '出院时间' : '死亡时间',
-          inHospDays: '住院天数',
-          totalCharge: '住院费用',
-          disDept: '出院科室',
-          disDiag: '出院主诊断',
-          blfx: '病例分型',
-          kzr: '科主任',
-          zzys: '主治医师',
-          zyys: '住院医师',
-          fdcrb: '法定传染病',
-        }
-        name = dismissCountType.value === 2 ? '出院明细统计' : '死亡患者统计'
-      }
-      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
-        case 'print2':
-          beforePrint(2)
-          break
-        case 'confirmPrint':
-          confirmCopyPrint()
-          break
-        case 'unSign':
-          unArchiveBa()
-          break
-      }
-    }
+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 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) => {
+  if (flag === 'advanceSearchDoctor') {
+    searchUrl.value = 'employee'
+    searchTargetCode.value = 'advanceSearch'
+    searchTargetName.value = 'doctor'
+  } else if (flag === 'advanceSearchDiag') {
+    searchUrl.value = 'normalDiag'
+    searchTargetCode.value = 'advanceSearch'
+    searchTargetName.value = 'icd'
+  } else {
+    searchUrl.value = 'surgery'
+    searchTargetCode.value = 'advanceSearch'
+    searchTargetName.value = 'surgery'
+  }
+  showSearch.value = true
+}
 
-    const searchMethod = ref('alpha')
-    const searchResults = ref([])
-    const showSearchData = (flag) => {
-      if (flag === 'advanceSearchDoctor') {
-        searchUrl.value = 'employee'
-        searchTargetCode.value = 'advanceSearch'
-        searchTargetName.value = 'doctor'
-      } else if (flag === 'advanceSearchDiag') {
-        searchUrl.value = 'normalDiag'
-        searchTargetCode.value = 'advanceSearch'
-        searchTargetName.value = 'icd'
-      } else {
-        searchUrl.value = 'surgery'
-        searchTargetCode.value = 'advanceSearch'
-        searchTargetName.value = 'surgery'
-      }
-      showSearch.value = true
-    }
+const showAdvanceSearch = ref(false)
+const advanceSearch = reactive({
+  doctorCode: '',
+  doctorName: '',
+  icdCode: '',
+  icdName: '',
+  surgeryCode: '',
+  surgeryName: '',
+  sex: null,
+})
+const doAdvanceSearch = () => {
+  advanceSearch.start = formatDate(dateRange.value[0])
+  advanceSearch.end = formatDate(dateRange.value[1])
+  if (!advanceSearch.doctorName) {
+    advanceSearch.doctorCode = ''
+  }
+  executeAdvanceSearch(advanceSearch).then((res) => {
+    overview.value = res
+    showAdvanceSearch.value = false
+  })
+}
+
+const handleSelectSearch = (item) => {
+  switch (searchTargetName.value) {
+    case 'doctor':
+      advanceSearch.doctorCode = item.code
+      advanceSearch.doctorName = item.name
+      break
+    case 'icd':
+      advanceSearch.icdCode = item.code
+      advanceSearch.icdName = item.name
+      break
+    case 'surgery':
+      advanceSearch.surgeryCode = item.code
+      advanceSearch.surgeryName = item.name
+      break
+  }
+  searchContent.value = ''
+  showSearch.value = false
+}
 
-    const showAdvanceSearch = ref(false)
-    const advanceSearch = reactive({
-      doctorCode: '',
-      doctorName: '',
-      icdCode: '',
-      icdName: '',
-      surgeryCode: '',
-      surgeryName: '',
-      sex: null,
+const nullPatient = () => {
+  if (!sheet.value.bah) {
+    ElMessage({
+      message: '请先选择患者!',
+      type: 'warning',
+      duration: 2500,
+      showClose: true,
     })
-    const doAdvanceSearch = () => {
-      advanceSearch.start = formatDate(dateRange.value[0])
-      advanceSearch.end = formatDate(dateRange.value[1])
-      if (!advanceSearch.doctorName) {
-        advanceSearch.doctorCode = ''
+    return true
+  }
+  return false
+}
+const beforePrint = (flag) => {
+  if (nullPatient()) return
+  const param = {
+    sheet: sheet.value,
+  }
+  executePrintVerify(param)
+    .then(() => {
+      execPrint(flag)
+    })
+    .catch((e) => {
+      forceVerifies.value = e.data.force
+      adviceVerifies.value = e.data.advice
+      if (e.data.force.length === 0) {
+        execPrint(flag)
       }
-      executeAdvanceSearch(advanceSearch).then((res) => {
-        overview.value = res
-        showAdvanceSearch.value = false
+    })
+}
+const execPrint = (flag) => {
+  LODOP = getLodop()
+  const prntStyle = `<style>*{font-size:10pt} table,th,td {border: 1px solid black;border-collapse: collapse;} td,th {height: 24px;padding-left: 4px;}</style>`
+  const prntContent = flag === 1 ? document.getElementById('headpage').innerHTML : document.getElementById('tailpage').innerHTML
+  let pagePrint = prntStyle + '<body>' + prntContent + '</body>'
+  LODOP.PRINT_INIT('casefrontsheet')
+  LODOP.SET_PRINT_PAGESIZE(1, '210mm', '297mm', '')
+  LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
+  LODOP.ADD_PRINT_HTM('2mm', '0.5mm', '209.5mm', '295mm', pagePrint)
+  LODOP.SET_PRINT_STYLE('ItemType', 3)
+  LODOP.PREVIEW()
+}
+
+const archiveBa = () => {
+  if (nullPatient()) {
+    return
+  }
+  const param = {
+    opType: 2,
+    sheet: sheet.value,
+  }
+  executeSaveVerify(param)
+    .then((res) => {
+      ElMessage({
+        message: '操作成功。',
+        type: 'success',
+        duration: 2500,
+        showClose: true,
       })
-    }
+    })
+    .catch((e) => {
+      forceVerifies.value = e.data
+    })
+}
 
-    const handleSelectSearch = (item) => {
-      switch (searchTargetName.value) {
-        case 'doctor':
-          advanceSearch.doctorCode = item.code
-          advanceSearch.doctorName = item.name
-          break
-        case 'icd':
-          advanceSearch.icdCode = item.code
-          advanceSearch.icdName = item.name
-          break
-        case 'surgery':
-          advanceSearch.surgeryCode = item.code
-          advanceSearch.surgeryName = item.name
-          break
-      }
-      searchContent.value = ''
-      showSearch.value = false
-    }
+const unArchiveBa = () => {
+  if (nullPatient()) {
+    return
+  }
 
-    const nullPatient = () => {
-      if (!sheet.value.bah) {
-        ElMessage({
-          message: '请先选择患者!',
-          type: 'warning',
-          duration: 2500,
-          showClose: true,
-        })
-        return true
-      }
-      return false
-    }
-    const beforePrint = (flag) => {
-      if (nullPatient()) return
+  ElMessageBox.confirm('是否确认解除签收患者【' + sheet.value.name + '】的病案首页?', '提示', {
+    type: 'warning',
+    confirmButtonText: '解除签收',
+    cancelButtonText: '取消',
+  })
+    .then(() => {
       const param = {
+        opType: 3,
         sheet: sheet.value,
       }
-      executePrintVerify(param)
-        .then(() => {
-          execPrint(flag)
-        })
-        .catch((e) => {
-          forceVerifies.value = e.data.force
-          adviceVerifies.value = e.data.advice
-          if (e.data.force.length === 0) {
-            execPrint(flag)
-          }
+      executeUnArchiveBa(param).then((res) => {
+        ElMessage({
+          message: res,
+          type: 'success',
+          duration: 2500,
+          showClose: true,
         })
-    }
-    const execPrint = (flag) => {
-      LODOP = getLodop()
-      const prntStyle = `<style>*{font-size:10pt} table,th,td {border: 1px solid black;border-collapse: collapse;} td,th {height: 24px;padding-left: 4px;}</style>`
-      const prntContent = flag === 1 ? document.getElementById('headpage').innerHTML : document.getElementById('tailpage').innerHTML
-      let pagePrint = prntStyle + '<body>' + prntContent + '</body>'
-      LODOP.PRINT_INIT('casefrontsheet')
-      LODOP.SET_PRINT_PAGESIZE(1, '210mm', '297mm', '')
-      LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
-      LODOP.ADD_PRINT_HTM('2mm', '0.5mm', '209.5mm', '295mm', pagePrint)
-      LODOP.SET_PRINT_STYLE('ItemType', 3)
-      LODOP.PREVIEW()
-    }
+      })
+    })
+    .catch(() => {})
+}
 
-    const archiveBa = () => {
-      if (nullPatient()) {
-        return
-      }
-      const param = {
-        opType: 2,
-        sheet: sheet.value,
-      }
-      executeSaveVerify(param)
-        .then((res) => {
-          ElMessage({
-            message: '操作成功。',
-            type: 'success',
-            duration: 2500,
-            showClose: true,
-          })
-        })
-        .catch((e) => {
-          forceVerifies.value = e.data
+const confirmCopyPrint = () => {
+  if (nullPatient()) {
+    return
+  }
+  if (sheet.value.fileStatus === 2) {
+    ElMessageBox.alert('此病案首页已确认过打印!', '提示', {
+      showCancelButton: false,
+      type: 'warning',
+    }).then(() => {})
+    return
+  }
+  ElMessageBox.confirm('是否确认患者【' + sheet.value.name + '】的病案首页已打印,此操作将不可逆转!', '提示', {
+    confirmButtonText: '确定',
+    cancelButtonText: '取消',
+    type: 'warning',
+  })
+    .then(() => {
+      executeConfirmPrint({ sheet: sheet.value }).then(() => {
+        ElMessage({
+          message: '操作成功',
+          type: 'success',
+          duration: 2500,
+          showClose: true,
         })
-    }
-
-    const unArchiveBa = () => {
-      if (nullPatient()) {
-        return
-      }
-
-      ElMessageBox.confirm('是否确认解除签收患者【' + sheet.value.name + '】的病案首页?', '提示', {
-        type: 'warning',
-        confirmButtonText: '解除签收',
-        cancelButtonText: '取消',
       })
-        .then(() => {
-          const param = {
-            opType: 3,
-            sheet: sheet.value,
-          }
-          executeUnArchiveBa(param).then((res) => {
-            ElMessage({
-              message: res,
-              type: 'success',
-              duration: 2500,
-              showClose: true,
-            })
-          })
-        })
-        .catch(() => {})
-    }
+    })
+    .catch(() => {})
+}
 
-    const confirmCopyPrint = () => {
-      if (nullPatient()) {
-        return
+const messageArea = {
+  width: windowSize.w - 1380 + 'px',
+  height: windowSize.h - 65 + 'px',
+  padding: '0 16px',
+  overflowY: 'scroll',
+}
+
+const forceVerifies = ref([])
+const adviceVerifies = ref([])
+const currentMessageIndex = ref(null)
+const messageColor = (id) => {
+  return currentMessageIndex.value === id
+    ? {
+        background: '#ff2b2b',
+        color: 'white',
       }
-      if (sheet.value.fileStatus === 2) {
-        ElMessageBox.alert('此病案首页已确认过打印!', '提示', {
-          showCancelButton: false,
-          type: 'warning',
-        }).then(() => {})
-        return
+    : {
+        background: '#eea7a752',
+        color: '#ff2b2b',
       }
-      ElMessageBox.confirm('是否确认患者【' + sheet.value.name + '】的病案首页已打印,此操作将不可逆转!', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning',
-      })
-        .then(() => {
-          executeConfirmPrint({ sheet: sheet.value }).then(() => {
-            ElMessage({
-              message: '操作成功',
-              type: 'success',
-              duration: 2500,
-              showClose: true,
-            })
-          })
-        })
-        .catch(() => {})
-    }
-
-    const messageArea = {
-      width: windowSize.w - 1380 + 'px',
-      height: windowSize.h - 65 + 'px',
-      padding: '0 16px',
-      overflowY: 'scroll',
-    }
-
-    const forceVerifies = ref([])
-    const adviceVerifies = ref([])
-    const currentMessageIndex = ref(null)
-    const messageColor = (id) => {
-      return currentMessageIndex.value === id
-        ? {
-            background: '#ff2b2b',
-            color: 'white',
-          }
-        : {
-            background: '#eea7a752',
-            color: '#ff2b2b',
-          }
-    }
-    const handleClickMessage = (id, index) => {
-      currentMessageIndex.value = index
-      let ele = document.getElementById(id)
-      let i = 0
-      let timer = setInterval(() => {
-        ele.style.background = i % 2 == 0 ? '#fd4343' : 'transparent'
-        i++
-        if (i > 5) {
-          clearInterval(timer)
-        }
-      }, 500)
+}
+const handleClickMessage = (id, index) => {
+  currentMessageIndex.value = index
+  let ele = document.getElementById(id)
+  let i = 0
+  let timer = setInterval(() => {
+    ele.style.background = i % 2 == 0 ? '#fd4343' : 'transparent'
+    i++
+    if (i > 5) {
+      clearInterval(timer)
     }
+  }, 500)
+}
 
-    const currentDismissCountPage = ref(1)
-    const handleCurrentDismissCountPageChange = (val) => {
-      currentDismissCountPage.value = val
-    }
+const currentDismissCountPage = ref(1)
+const handleCurrentDismissCountPageChange = (val) => {
+  currentDismissCountPage.value = val
+}
 
-    onActivated(() => {
-      initLodop()
-    })
+onActivated(() => {
+  initLodop()
+})
 
-    onMounted(() => {
-      getAllDictionary().then((res) => {
-        res.getOperations = operations
-        res.getYesOrNo = yesOrNo
-        res.getHaveOrNot = haveOrNot
-        res.getAutopsies = autopsies
-        dics.value = res
-        getAllWards().then((res1) => {
-          userWards.value = res1
-          const t = getOneMonthOffset()
-          dateRange.value[0] = t.start
-          dateRange.value[1] = t.end
-        })
-      })
+onMounted(() => {
+  getAllDictionary().then((res) => {
+    res.getOperations = operations
+    res.getYesOrNo = yesOrNo
+    res.getHaveOrNot = haveOrNot
+    res.getAutopsies = autopsies
+    dics.value = res
+    getAllWards().then((res1) => {
+      userWards.value = res1
+      const t = getOneMonthOffset()
+      dateRange.value[0] = t.start
+      dateRange.value[1] = t.end
     })
-
-    return {
-      currentPage,
-      handleCurrentPageChange,
-      forceVerifies,
-      adviceVerifies,
-      messageColor,
-      handleClickMessage,
-      messageArea,
-      cdStyle,
-      maleIcon,
-      femaleIcon,
-      userWards,
-      searchPatient,
-      tableHeight,
-      overview,
-      mainInfo,
-      sheet,
-      dics,
-      overviewParam,
-      cdPercentage,
-      searchMethods,
-      fetchSheetInfo,
-      showSearchData,
-      showSearch,
-      searchInput,
-      searchContent,
-      searchMethod,
-      searchResults,
-      currentSRPage,
-      executeSearch,
-      lastPage,
-      nextPage,
-      beforePrint,
-      handleSelectSearch,
-      dateRange,
-      shortcuts,
-      handleCommand,
-      showAdvanceSearch,
-      advanceSearch,
-      doAdvanceSearch,
-      showDismissCount,
-      dismissCountdata,
-      dismissCountMonth,
-      dismissCountType,
-      fetchDismissCount,
-      exportDismissCount,
-      archiveBa,
-      currentDismissCountPage,
-      handleCurrentDismissCountPageChange,
-    }
-  },
-}
+  })
+})
 </script>
 
 <style scoped>