| | |
| | | |
| | | // æ£æ¥ç±»å API |
| | | export const CheckTypeApi = { |
| | | |
| | | // æ¥è¯¢æ£æ¥ç±»å.ç®åå表 |
| | | getSimpleCheckTypeList: async () => { |
| | | return await request.get({ url: `/ecg/check-type/list-simple-check-type` }) |
| | | }, |
| | | |
| | | // æ¥è¯¢æ£æ¥ç±»åå页 |
| | | getCheckTypePage: async (params: any) => { |
| | | return await request.get({ url: `/ecg/check-type/page`, params }) |
| | |
| | | activeQueueNum : number |
| | | priorityQueueNum : number |
| | | openingFlag : number |
| | | checkTypeBedInfo: object |
| | | } |
| | | |
| | | // è¯å®¤åè¯çåº API |
| | |
| | | import {PropType} from "vue"; |
| | | import {useUserStore} from "@/store/modules/user"; |
| | | import {DICT_TYPE, getIntDictOptions} from "@/utils/dict"; |
| | | import {useCheckTypeStore} from "@/store/modules/checkType"; |
| | | const emit = defineEmits(['event-haveseat', 'event-leaveseat']) |
| | | |
| | | defineComponent({ |
| | |
| | | } |
| | | }) |
| | | |
| | | const checkTypeStore = useCheckTypeStore(); |
| | | const userStore = useUserStore() |
| | | const curUser = userStore.getUser |
| | | |
| | |
| | | emit('event-leaveseat', curItem) |
| | | } |
| | | |
| | | let mapCheckType: Map<number, string> = new Map(); |
| | | const getCheckTypeList = () => { |
| | | const data = getIntDictOptions(DICT_TYPE.ECG_CHECK_TYPE) |
| | | console.info( data ) |
| | | data.forEach((checkTypeItem) => { |
| | | mapCheckType.set(checkTypeItem.value, checkTypeItem.label) |
| | | }) |
| | | } |
| | | |
| | | /** åå§å **/ |
| | | onMounted(() => { |
| | | //console.info(props.bedList) |
| | | getCheckTypeList() |
| | | }) |
| | | |
| | | </script> |
| | |
| | | <div class="deskwarp"> |
| | | |
| | | <div v-for="(checkType, subIndex) in bedItem.checkTypes" :key="subIndex"> |
| | | {{mapCheckType.get(checkType)}} |
| | | {{checkTypeStore.getCheckTypeName(checkType)}} |
| | | </div> |
| | | <div> |
| | | {{bedItem.opType === 1?"é¢ç¨":""}} |
| | |
| | | import { QueueApi } from '@/api/ecg/queue' |
| | | import {PropType} from "vue"; |
| | | import {DICT_TYPE, getIntDictOptions} from "@/utils/dict"; |
| | | import {useCheckTypeStore} from "@/store/modules/checkType"; |
| | | const emit = defineEmits(['refresh']) |
| | | |
| | | defineComponent({ |
| | |
| | | } |
| | | }) |
| | | |
| | | let mapCheckType: Map<number, string> = new Map(); |
| | | const checkTypeStore = useCheckTypeStore(); |
| | | |
| | | const openBed = async (item) => { |
| | | await QueueApi.bedOpen(item) |
| | |
| | | emit('refresh') |
| | | } |
| | | |
| | | const getCheckTypeList = () => { |
| | | const data = getIntDictOptions(DICT_TYPE.ECG_CHECK_TYPE) |
| | | console.info( data ) |
| | | data.forEach((checkTypeItem) => { |
| | | mapCheckType.set(checkTypeItem.value, checkTypeItem.label) |
| | | }) |
| | | } |
| | | |
| | | /** åå§å **/ |
| | | onMounted(() => { |
| | | getCheckTypeList() |
| | | }) |
| | | |
| | | </script> |
| | |
| | | /> |
| | | {{bedItem.bedNo}} {{bedItem.docName}} {{bedItem.status === 30?"-æå":""}} |
| | | <div v-for="(checkType, subIndex) in bedItem.checkTypes" :key="subIndex"> |
| | | {{mapCheckType.get(checkType)}} |
| | | {{checkTypeStore.getCheckTypeName(checkType)}} |
| | | </div> |
| | | <div> |
| | | {{bedItem.opType === 1?"é¢ç¨":""}} |
| | | </div> |
| | | <el-divider/> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | |
| | | THEME: 'theme', |
| | | LAYOUT: 'layout', |
| | | DICT_CACHE: 'dictCache', |
| | | CHECKTYPE_CACHE: 'checkTypeCache', |
| | | // ç»å½è¡¨å |
| | | LoginForm: 'loginForm', |
| | | TenantId: 'tenantId' |
| | |
| | | import { useNProgress } from '@/hooks/web/useNProgress' |
| | | import { usePageLoading } from '@/hooks/web/usePageLoading' |
| | | import { useDictStoreWithOut } from '@/store/modules/dict' |
| | | import { useCheckTypeStoreWithOut } from '@/store/modules/checkType' |
| | | import { useUserStoreWithOut } from '@/store/modules/user' |
| | | import { usePermissionStoreWithOut } from '@/store/modules/permission' |
| | | |
| | |
| | | // è·åææåå
¸ |
| | | const dictStore = useDictStoreWithOut() |
| | | const userStore = useUserStoreWithOut() |
| | | const checkTypeStore = useCheckTypeStoreWithOut() |
| | | const permissionStore = usePermissionStoreWithOut() |
| | | if (!dictStore.getIsSetDict) { |
| | | await dictStore.setDictMap() |
| | | } |
| | | if (!checkTypeStore.getIsSetCheckType) { |
| | | await checkTypeStore.setCheckTypeMap() |
| | | } |
| | | |
| | | if (userStore.getIsSetUser ) { |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { defineStore } from 'pinia' |
| | | import { store } from '../index' |
| | | // @ts-ignore |
| | | import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
| | | const { wsCache } = useCache('sessionStorage') |
| | | import {CheckTypeApi} from "@/api/ecg/checktype"; |
| | | |
| | | export interface CheckTypeSimpleVO { |
| | | value: number |
| | | name: string |
| | | } |
| | | export interface CheckTypeState { |
| | | checkTypeMap: Map<number, string> |
| | | isSetCheckType: boolean |
| | | } |
| | | |
| | | export const useCheckTypeStore = defineStore('checktype ', { |
| | | state: (): CheckTypeState => ({ |
| | | checkTypeMap: new Map<number, string>(), |
| | | isSetCheckType: false |
| | | }), |
| | | getters: { |
| | | getCheckTypeMap(): Recordable { |
| | | const checkTypeMap = wsCache.get(CACHE_KEY.CHECKTYPE_CACHE) |
| | | if (checkTypeMap) { |
| | | this.checkTypeMap = checkTypeMap |
| | | } |
| | | return this.checkTypeMap |
| | | }, |
| | | getIsSetCheckType(): boolean { |
| | | return this.isSetCheckType |
| | | } |
| | | }, |
| | | actions: { |
| | | async setCheckTypeMap() { |
| | | const checkTypeMap = wsCache.get(CACHE_KEY.CHECKTYPE_CACHE) |
| | | if (checkTypeMap) { |
| | | this.checkTypeMap = checkTypeMap |
| | | this.isSetCheckType = true |
| | | } else { |
| | | const res = await CheckTypeApi.getSimpleCheckTypeList() |
| | | // è®¾ç½®æ°æ® |
| | | const checkTypeMap = new Map<number, string>() |
| | | res.forEach((simpleVO: CheckTypeSimpleVO) => { |
| | | // è·å¾ dictType å±çº§ |
| | | const enumValueObj = checkTypeMap[simpleVO.value] |
| | | if (!enumValueObj) { |
| | | checkTypeMap[simpleVO.value] = simpleVO.name |
| | | } |
| | | }) |
| | | this.checkTypeMap = checkTypeMap |
| | | this.isSetCheckType = true |
| | | wsCache.set(CACHE_KEY.CHECKTYPE_CACHE, checkTypeMap, { exp: 60 }) // 60 ç§ è¿æ |
| | | } |
| | | }, |
| | | getCheckTypeName(type: number) { |
| | | if (!this.isSetCheckType) { |
| | | this.setcheckTypeMap() |
| | | } |
| | | return this.checkTypeMap[type] |
| | | }, |
| | | getCheckTypeOptions() { |
| | | if (!this.isSetCheckType) { |
| | | this.setcheckTypeMap() |
| | | } |
| | | return Object.keys(this.checkTypeMap).map((key) => { |
| | | return { |
| | | value: key, |
| | | label: this.checkTypeMap[key] |
| | | } |
| | | }); |
| | | }, |
| | | async resetCheckTypeInfo() { |
| | | wsCache.delete(CACHE_KEY.CHECKTYPE_CACHE) |
| | | const res = await CheckTypeApi.getSimpleCheckTypeList() |
| | | // è®¾ç½®æ°æ® |
| | | const checkTypeMap = new Map<number, string>() |
| | | res.forEach((simpleVO: CheckTypeSimpleVO) => { |
| | | // è·å¾ dictType å±çº§ |
| | | const enumValueObj = checkTypeMap[simpleVO.value] |
| | | if (!enumValueObj) { |
| | | checkTypeMap[simpleVO.value] = simpleVO.name |
| | | } |
| | | }) |
| | | this.checkTypeMap = checkTypeMap |
| | | this.isSetCheckType = true |
| | | wsCache.set(CACHE_KEY.CHECKTYPE_CACHE, checkTypeMap, { exp: 60 }) // 60 ç§ è¿æ |
| | | } |
| | | } |
| | | }) |
| | | |
| | | export const useCheckTypeStoreWithOut = () => { |
| | | return useCheckTypeStore(store) |
| | | } |
| | |
| | | |
| | | // ========== ECG 模å ========== |
| | | ECG_BOOK_TIMESLOT = 'ecg_book_timeslot', |
| | | ECG_CHECK_TYPE = 'ecg_check_type', |
| | | ECG_BOOK_SRC = 'ecg_book_src', |
| | | ECG_QUEUE_STATUS = 'ecg_queue_status', |
| | | ECG_DEV_BRAND = 'ecg_dev_brand', |
| | |
| | | <el-form-item label="é¢çº¦æ£æ¥ç±»å" prop="bookCheckType"> |
| | | <el-select v-model="formData.bookCheckType" placeholder="è¯·éæ©é¢çº¦æ£æ¥ç±»å"> |
| | | <el-option |
| | | v-for="dict in getIntDictOptions(DICT_TYPE.ECG_CHECK_TYPE)" |
| | | v-for="dict in checkTypeStore.getCheckTypeOptions()" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | |
| | | <script setup lang="ts"> |
| | | import {DICT_TYPE, getIntDictOptions} from '@/utils/dict' |
| | | import { AppointmentApi, AppointmentVO } from '@/api/ecg/appointment' |
| | | import {useCheckTypeStore} from "@/store/modules/checkType"; |
| | | |
| | | /** é¢çº¦ç¡®è®¤ 表å */ |
| | | defineOptions({ name: 'AppointmentConfirm' }) |
| | | |
| | | const checkTypeStore = useCheckTypeStore(); |
| | | |
| | | const message = useMessage() // æ¶æ¯å¼¹çª |
| | | |
| | | const loading = ref(true) // å表çå è½½ä¸ |
| | |
| | | <el-form-item label="é¢çº¦æ£æ¥ç±»å" prop="bookCheckType"> |
| | | <el-select v-model="formData.bookCheckType" placeholder="è¯·éæ©é¢çº¦æ£æ¥ç±»å"> |
| | | <el-option |
| | | v-for="dict in getIntDictOptions(DICT_TYPE.ECG_CHECK_TYPE)" |
| | | v-for="dict in checkTypeStore.getCheckTypeOptions()" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | |
| | | <script setup lang="ts"> |
| | | import {DICT_TYPE, getIntDictOptions} from '@/utils/dict' |
| | | import { AppointmentApi, AppointmentVO } from '@/api/ecg/appointment' |
| | | import {useCheckTypeStore} from "@/store/modules/checkType"; |
| | | |
| | | /** é¢çº¦ 表å */ |
| | | defineOptions({ name: 'AppointmentForm' }) |
| | | |
| | | const checkTypeStore = useCheckTypeStore(); |
| | | |
| | | const { t } = useI18n() // å½é
å |
| | | const message = useMessage() // æ¶æ¯å¼¹çª |
| | | |
| | |
| | | class="!w-240px" |
| | | > |
| | | <el-option |
| | | v-for="dict in getIntDictOptions(DICT_TYPE.ECG_CHECK_TYPE)" |
| | | v-for="dict in checkTypeStore.getCheckTypeOptions()" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | |
| | | </el-table-column> |
| | | <el-table-column label="é¢çº¦æ£æ¥ç±»å" align="center" prop="bookCheckType"> |
| | | <template #default="scope"> |
| | | <dict-tag :type="DICT_TYPE.ECG_CHECK_TYPE" :value="scope.row.bookCheckType" /> |
| | | checkTypeStore.getCheckTypeName(scope.row.bookCheckType) |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="é¢çº¦æ¥æº" align="center" prop="bookSrc"> |
| | |
| | | import download from '@/utils/download' |
| | | import { AppointmentApi, AppointmentVO } from '@/api/ecg/appointment' |
| | | import AppointmentForm from './AppointmentForm.vue' |
| | | import {useCheckTypeStore} from "@/store/modules/checkType"; |
| | | |
| | | /** é¢çº¦ å表 */ |
| | | defineOptions({ name: 'Appointment' }) |
| | |
| | | const queryFormRef = ref() // æç´¢ç表å |
| | | const exportLoading = ref(false) // 导åºçå è½½ä¸ |
| | | |
| | | const checkTypeStore = useCheckTypeStore(); |
| | | |
| | | /** æ¥è¯¢å表 */ |
| | | const getList = async () => { |
| | | loading.value = true |
| | |
| | | import { QueueVO } from '@/api/ecg/queue' |
| | | import {DICT_TYPE} from "@/utils/dict"; |
| | | import {PatientVO, DoctorApi} from "@/api/ecg/doctor"; |
| | | import {useCheckTypeStore} from "@/store/modules/checkType"; |
| | | |
| | | defineComponent({ |
| | | name: 'QueuePanel' |
| | | }) |
| | | |
| | | const emit = defineEmits(['event_RecallFinish']) // å®ä¹ success äºä»¶ï¼ç¨äºæä½æååçåè° |
| | | |
| | | const checkTypeStore = useCheckTypeStore(); |
| | | |
| | | const message = useMessage() // æ¶æ¯å¼¹çª |
| | | |
| | |
| | | <span style="display:inline-block; width:70px;"> {{item.seqNum}} {{item.patName}}{{item.passed === 0 ? "":"*"}} </span> |
| | | <dict-tag :type="DICT_TYPE.SYSTEM_USER_SEX" :value="item.patGender" /> |
| | | <!-- {{item.roomName}} {{item.bedNo}}--> |
| | | <dict-tag :type="DICT_TYPE.ECG_CHECK_TYPE" :value="item.bookCheckType" /> |
| | | checkTypeStore.getCheckTypeName(item.bookCheckType) |
| | | <dict-tag :type="DICT_TYPE.ECG_QUEUE_STATUS" :value="item.status" /> |
| | | <el-button v-if="item.status === 5 || item.status === 7" @click="recall(item)"> å¬å </el-button> |
| | | </div> |
| | |
| | | class="!w-240px" |
| | | > |
| | | <el-option |
| | | v-for="dict in getIntDictOptions(DICT_TYPE.ECG_CHECK_TYPE)" |
| | | v-for="dict in checkTypeStore.getCheckTypeOptions()" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | |
| | | </el-table-column> |
| | | <el-table-column label="æ£æ¥ç±»å" align="center" prop="bookCheckType" > |
| | | <template #default="scope"> |
| | | <dict-tag :type="DICT_TYPE.ECG_CHECK_TYPE" :value="scope.row.bookCheckType" /> |
| | | checkTypeStore.getCheckTypeName(scope.row.bookCheckType) |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æéåºå·" align="center" prop="seqNum" /> |
| | |
| | | import queueForm from './QueueForm.vue' |
| | | import {DICT_TYPE, getIntDictOptions} from '@/utils/dict' |
| | | import {DoctorApi, PatientVO} from "@/api/ecg/doctor"; |
| | | import {useCheckTypeStore} from "@/store/modules/checkType"; |
| | | |
| | | /** æé å表 */ |
| | | defineOptions({ name: 'queue' }) |
| | |
| | | const message = useMessage() // æ¶æ¯å¼¹çª |
| | | const { t } = useI18n() // å½é
å |
| | | |
| | | const checkTypeStore = useCheckTypeStore(); |
| | | |
| | | const loading = ref(true) // å表çå è½½ä¸ |
| | | const list = ref<QueueVO[]>([]) // åè¡¨çæ°æ® |
| | | const total = ref(0) // åè¡¨çæ»é¡µæ° |
| | |
| | | |
| | | <el-form-item label="æ£æ¥ç±»å" prop="checkTypes"> |
| | | <el-checkbox-group v-model="formData.checkTypes"> |
| | | <el-checkbox v-for="checkType in checkTypeDict" :value="checkType.value" :key="checkType.value">{{checkType.label}}</el-checkbox> |
| | | <el-checkbox v-for="checkType in checkTypeStore.getCheckTypeOptions()" :value="checkType.value" :key="checkType.value">{{checkType.label}}</el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | |
| | |
| | | <script setup lang="ts"> |
| | | import { RoomApi, RoomVO } from '@/api/ecg/room' |
| | | import {DICT_TYPE, getIntDictOptions} from "@/utils/dict"; |
| | | import {CheckTypeApi} from "@/api/ecg/checktype"; |
| | | |
| | | /** è¯å®¤åè¯çåº è¡¨å */ |
| | | defineOptions({ name: 'RoomForm' }) |
| | | |
| | | const { t } = useI18n() // å½é
å |
| | | const message = useMessage() // æ¶æ¯å¼¹çª |
| | | |
| | | const checkTypeStore = useCheckTypeStore(); |
| | | |
| | | const dialogVisible = ref(false) // å¼¹çªçæ¯å¦å±ç¤º |
| | | const dialogTitle = ref('') // å¼¹çªçæ é¢ |
| | |
| | | }) |
| | | const formRef = ref() // 表å Ref |
| | | const roomListRef = ref<RoomVO[]>([]) // åè¡¨çæ°æ® |
| | | |
| | | const checkTypeDict = ref() |
| | | |
| | | /** æå¼å¼¹çª */ |
| | | const open = async (type: string, id?: number) => { |
| | |
| | | return roomListRef.value.find( e => e.roomId === id)!.roomName |
| | | } |
| | | |
| | | const getCheckTypeList = () => { |
| | | const data = getIntDictOptions(DICT_TYPE.ECG_CHECK_TYPE) |
| | | console.info( data ) |
| | | checkTypeDict.value = data |
| | | } |
| | | |
| | | /** åå§å **/ |
| | | onMounted(() => { |
| | | getSimpleRoomList() |
| | | getCheckTypeList() |
| | | }) |
| | | |
| | | </script> |
| | |
| | | <div>å¼è¯æ¶é´ï¼{{ openingPeriod }} {{ monitorInfo.openingFlag }} </div> |
| | | <div>工使¦åµï¼ {{monitorInfo.queueNum}} {{monitorInfo.activeQueueNum}} {{monitorInfo.priorityQueueNum}} </div> |
| | | <div v-for="(value, key) in monitorInfo.checkTypeBedInfo" :key="key"> |
| | | {{ mapCheckType.get(Number(key)) }} {{ value }} |
| | | {{ checkTypeStore.getCheckTypeName(Number(key)) }} {{ value }} |
| | | </div> |
| | | </el-aside> |
| | | </el-container> |
| | |
| | | import { RoomApi, RoomVO, MonitorInfo } from '@/api/ecg/room' |
| | | import { QueueApi } from '@/api/ecg/queue' |
| | | import { getConfigKey } from '@/api/infra/config' |
| | | import {DICT_TYPE, getIntDictOptions} from "@/utils/dict"; |
| | | import {useCheckTypeStore} from "@/store/modules/checkType"; |
| | | |
| | | defineOptions({ name: 'RoomSetting' }) |
| | | |
| | | const bedMap = ref() // åè¡¨çæ°æ® |
| | | let mapCheckType: Map<number, string> = new Map(); |
| | | |
| | | const openingPeriod = ref<string>('') |
| | | const monitorInfo = ref<MonitorInfo>({ |
| | |
| | | activeQueueNum: 0, |
| | | priorityQueueNum: 0, |
| | | openingFlag: 0, |
| | | checkTypeBedInfo: undefined |
| | | checkTypeBedInfo: {} |
| | | }) |
| | | |
| | | const checkTypeStore = useCheckTypeStore(); |
| | | |
| | | const getOpeningPeriod = async () => { |
| | | const data = await getConfigKey('ecg.openingtime') |
| | |
| | | getMonitorInfo() |
| | | } |
| | | |
| | | const getCheckTypeList = () => { |
| | | const data = getIntDictOptions(DICT_TYPE.ECG_CHECK_TYPE) |
| | | console.info( data ) |
| | | data.forEach((checkTypeItem) => { |
| | | mapCheckType.set(checkTypeItem.value, checkTypeItem.label) |
| | | }) |
| | | } |
| | | |
| | | /** åå§å **/ |
| | | onMounted(() => { |
| | | getList() |
| | | getCheckTypeList() |
| | | getOpeningPeriod() |
| | | getMonitorInfo() |
| | | }) |