123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- <template>
- <el-container>
- <el-aside width="260px">
- <Overview ref="overview" :showSelection="isUploadPage" />
- </el-aside>
- <el-main>
- <el-container>
- <el-header height="36px" style="margin-top: 6px">
- <el-select v-model="search.current" style="width: 70px" @change="handleSelectSearchMehtod">
- <el-option v-for="item in search.methods" :key="item.code" :value="item.code" :label="item.name"></el-option>
- </el-select>
- <span v-if="permission < 10">
- <el-input v-model="search.zyh" style="width: 100px" clearable @keyup.enter="searchPatient" placeholder="住院号"></el-input>
- <el-button type="primary" icon="el-icon-search" @click="searchPatient">检索</el-button>
- </span>
-
- <el-button type="primary" icon="el-icon-postcard" @click="checkIdCard">身份信息</el-button>
- <el-dropdown style="margin: 0 10px" trigger="click" @command="downloadReadCard">
- <el-button type="primary">下载读卡程序<i class="el-icon-arrow-down el-icon--right"></i> </el-button>
- <template #dropdown>
- <el-dropdown-menu>
- <el-dropdown-item command="thcardreader">读卡插件安装包</el-dropdown-item>
- <el-dropdown-item command="framework" divided>.Net Framework</el-dropdown-item>
- </el-dropdown-menu>
- </template>
- </el-dropdown>
- <el-button style="margin-left: 10px" type="success" icon="el-icon-document" @click="getRegInfo">登记信息 </el-button>
- <el-button style="margin-left: 10px" type="danger" icon="el-icon-magic-stick" @click="toEmpiView">360视图 </el-button>
- </el-header>
- <el-main>
- <router-view v-slot="{ Component }">
- <transition name="fade-transform" mode="out-in">
- <keep-alive>
- <component :is="Component" />
- </keep-alive>
- </transition>
- </router-view>
- <Registinfo v-if="showRegisterInfo" :params="patient" @close="showRegisterInfo = false"></Registinfo>
- <IdentifyImage v-if="showIdCardImg" :pat-no="patient.inpatientNo" :times="patient.admissTimes" @close="showIdCardImg = false"></IdentifyImage>
- </el-main>
- </el-container>
- </el-main>
- </el-container>
- </template>
- <script>
- import { computed, reactive, ref } from 'vue'
- import store from '@/store'
- import dismissIcon from '@/assets/dismiss-icon.png'
- import { getPatientInfo, getEmpiViewUrl } from '@/api/yibao/patient'
- import { nullPatient } from '@/utils/validate'
- import { getGreatestRole } from '@/utils/permission'
- import { baseinfo, setBaseinfo } from '@/data/inpatient'
- import Overview from '../../../components/medical-insurance/patient-overview/Index.vue'
- import IdentifyImage from '../../../components/inpatient/IdentifyImage.vue'
- import Registinfo from '../../../components/medical-insurance/registinfo/Index.vue'
- export default {
- components: {
- Overview,
- IdentifyImage,
- Registinfo,
- },
- setup() {
- const search = initSearchParam()
- const permission = getGreatestRole()
- const handleSelectSearchMehtod = (val) => {
- store.commit('ptnt/setSearchMethod', val)
- }
- const patient = computed(() => {
- return baseinfo()
- })
- const isUploadPage = computed(() => {
- return store.state.app.currentPageName === 'inHospFeeUpload'
- })
- const overview = ref(null)
- const searchPatient = () => {
- if (!search.zyh) {
- overview.value.fetchOverviews()
- setBaseinfo({})
- } else {
- if (permission < 10) {
- overview.value.overviews = []
- store.commit('ptnt/setBaseinfo', { totalCharge: '0.00', chargeYb: '0.00' })
- getPatientInfo(search.zyh).then((res) => {
- overview.value.currentWard = res.admissWard
- store.commit('user/wardChange', res.admissWard)
- store.commit('ptnt/setCurrentMedType', res.medType)
- setBaseinfo(res)
- overview.value.overviews.push(makeOverview(res))
- })
- }
- }
- }
- const showRegisterInfo = ref(false)
- const getRegInfo = () => {
- if (nullPatient()) return
- showRegisterInfo.value = true
- }
- const toEmpiView = () => {
- if (nullPatient()) return
- getEmpiViewUrl(patient.value.inpatientNo).then((res) => {
- window.open(res, '_blank')
- })
- }
- const showIdCardImg = ref(false)
- const checkIdCard = () => {
- if (nullPatient()) return
- showIdCardImg.value = true
- }
- return {
- patient,
- permission,
- search,
- showRegisterInfo,
- isUploadPage,
- dismissIcon,
- showIdCardImg,
- overview,
- checkIdCard,
- getRegInfo,
- toEmpiView,
- searchPatient,
- downloadReadCard,
- handleSelectSearchMehtod,
- }
- },
- }
- function initSearchParam() {
- const search = reactive({
- current: 'alpha',
- methods: [
- { code: 'alpha', name: '拼音' },
- { code: 'code', name: '编码' },
- { code: 'name', name: '名称' },
- ],
- zyh: '',
- })
- return search
- }
- function makeOverview(val) {
- return {
- bedNo: val.bedNo,
- inpatientNo: val.inpatientNo,
- admissTimes: val.admissTimes,
- name: val.name,
- sex: val.sex,
- medType: val.medType,
- dismissOrder: val.dismissOrder,
- mdtrtId: val.mdtrtId,
- injurySerialNo: val.injurySerialNo,
- status: val.mdtrtId || val.injurySerialNo ? 1 : 0,
- }
- }
- function downloadReadCard(command) {
- const filename = command === 'thcardreader' ? '读卡插件.msi' : '.NET Framework 4.6.1.exe'
- window.open(`http://172.16.32.160:8888/readcard/${filename}`, '_blank')
- }
- </script>
|