| | |
| | | <script lang="ts" setup> |
| | | import { RoomApi, RoomVO } from '@/api/ecg/room' |
| | | import { RoomVO } from '@/api/ecg/room' |
| | | import {PropType} from "vue"; |
| | | import {useUserStore} from "@/store/modules/user"; |
| | | const emit = defineEmits(['haveSeat', 'leaveSeat']) |
| | | const emit = defineEmits(['event-haveseat', 'event-leaveseat']) |
| | | |
| | | defineComponent({ |
| | | name: 'RoomBedSelect' |
| | | }) |
| | | |
| | | const props = defineProps({ |
| | | //const props = defineProps({ |
| | | defineProps({ |
| | | title: { |
| | | type: String, |
| | | required: true |
| | |
| | | const userStore = useUserStore() |
| | | const curUser = userStore.getUser |
| | | |
| | | const onHaveSeatclick = (newItem) => { |
| | | emit('haveSeat', newItem) |
| | | const onHaveSeatclick = (newItem: RoomVO) => { |
| | | emit('event-haveseat', newItem) |
| | | } |
| | | const onLeaveSeatclick = (curItem) => { |
| | | emit('leaveSeat', curItem) |
| | | const onLeaveSeatclick = (curItem: RoomVO) => { |
| | | emit('event-leaveseat', curItem) |
| | | } |
| | | |
| | | /** 初始化 **/ |
| | | onMounted(() => { |
| | | console.info(props.bedList) |
| | | //console.info(props.bedList) |
| | | }) |
| | | |
| | | </script> |
| | |
| | | <div v-for="(bedItem, index) in bedList" :key="index"> |
| | | <div class="deskwarp"> |
| | | <img |
| | | v-if="curBed.roomId !== bedItem.roomId || curBed.bedNo !== bedItem.bedNo" |
| | | src="@/assets/room/desk.png" |
| | | v-if="bedItem.docId === null" |
| | | src="@/assets/room/open.jpg" |
| | | style="width: 100%" |
| | | alt="无医生" |
| | | /> |
| | | <img |
| | | v-else |
| | | src="@/assets/room/desk-doctor.jpeg" |
| | | style="width: 100%" |
| | | alt="有医生" |
| | | /> |
| | | <div>{{bedItem.bedNo}} {{bedItem.docName}}</div> |
| | | <div>{{bedItem.bedNo}} {{bedItem.docName}} {{bedItem.status === 30?"-暂停":""}}</div> |
| | | <el-button v-if="bedItem.docId === null" @click = onHaveSeatclick(bedItem)> |
| | | 入座 |
| | | </el-button> |