eight
2024-08-14 0a55b20bafb4190ad9a7702821ebf142cdf524dd
update
已添加6个文件
99 ■■■■■ 文件已修改
src/assets/room/doctor-off.jpeg 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/room/doctor.png 补丁 | 查看 | 原始文档 | blame | 历史
src/components/RoomStatus/index.ts 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/RoomStatus/src/RoomStatus.vue 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/room/RoomStatusSetting.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/room/index.ts 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/room/doctor-off.jpeg
src/assets/room/doctor.png
src/components/RoomStatus/index.ts
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,3 @@
import RoomStatus from './src/RoomStatus.vue'
export { RoomStatus }
src/components/RoomStatus/src/RoomStatus.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,68 @@
<script lang="ts" setup>
import {BedStatusVO} from "@/views/ecg/room/index";
import {PropType} from "vue";
defineComponent({
  name: 'RoomStatus'
})
defineProps({
  title: {
    type: String,
    required: true
  },
  doctorNum: {
    type: Number,
    required: true
  },
  modelValue: {
    type: Array as PropType<BedStatusVO[]>,
    required: true
  }
})
const onclick = (item) => {
  console.error(item);
  item.opStatus = !item.opStatus;
}
</script>
<template>
  <el-card style="width: 180px" shadow="hover" >
    <template #header>{{title}}</template>
    <div v-for="(bedItem, index) in modelValue" :key="index">
    <img v-if="bedItem.opStatus"
        src="@/assets/room/doctor.png"
        style="width: 100%"
         @click = onclick(bedItem)
    />
    <img v-if="!bedItem.opStatus"
        src="@/assets/room/doctor-off.jpeg"
        style="width: 100%"
         @click = onclick(bedItem)
    />
    </div>
  </el-card>
</template>
<style scoped lang="scss">
.card-title {
  font-size: 14px;
  font-weight: 600;
  &::before {
    position: relative;
    top: 8px;
    left: -5px;
    display: inline-block;
    width: 3px;
    height: 14px;
    //background-color: #105cfb;
    background: var(--el-color-primary);
    border-radius: 5px;
    content: '';
    transform: translateY(-50%);
  }
}
</style>
src/views/ecg/room/RoomStatusSetting.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
<template>
  <RoomStatus title="诊室206" :doctorNum="3" v-model="bedStatusVo"/>
</template>
<script setup lang="ts">
import {RoomStatus} from "@/components/RoomStatus"
import {BedStatusVO} from "@/views/ecg/room/index";
const bedStatusVo: BedStatusVO[] = [{
  bedNo: "a9",
  opStatus: true
},
  {
    bedNo: "a18",
    opStatus: false
  }
]
</script>
<style scoped lang="scss">
</style>
src/views/ecg/room/index.ts
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,5 @@
export interface BedStatusVO {
  bedNo: String; // è¯Šç–—床号
  opStatus: boolean; // è¯Šç–—床诊疗状态
}