From 0a55b20bafb4190ad9a7702821ebf142cdf524dd Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期三, 14 八月 2024 17:54:09 +0800
Subject: [PATCH] update
---
src/views/ecg/room/RoomStatusSetting.vue | 23 +++++++++++
src/views/ecg/room/index.ts | 5 ++
src/assets/room/doctor-off.jpeg | 0
src/assets/room/doctor.png | 0
src/components/RoomStatus/index.ts | 3 +
src/components/RoomStatus/src/RoomStatus.vue | 68 ++++++++++++++++++++++++++++++++++
6 files changed, 99 insertions(+), 0 deletions(-)
diff --git a/src/assets/room/doctor-off.jpeg b/src/assets/room/doctor-off.jpeg
new file mode 100644
index 0000000..2945897
--- /dev/null
+++ b/src/assets/room/doctor-off.jpeg
Binary files differ
diff --git a/src/assets/room/doctor.png b/src/assets/room/doctor.png
new file mode 100644
index 0000000..76fa43f
--- /dev/null
+++ b/src/assets/room/doctor.png
Binary files differ
diff --git a/src/components/RoomStatus/index.ts b/src/components/RoomStatus/index.ts
new file mode 100644
index 0000000..e16e32d
--- /dev/null
+++ b/src/components/RoomStatus/index.ts
@@ -0,0 +1,3 @@
+import RoomStatus from './src/RoomStatus.vue'
+
+export { RoomStatus }
diff --git a/src/components/RoomStatus/src/RoomStatus.vue b/src/components/RoomStatus/src/RoomStatus.vue
new file mode 100644
index 0000000..471bf9f
--- /dev/null
+++ b/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>
diff --git a/src/views/ecg/room/RoomStatusSetting.vue b/src/views/ecg/room/RoomStatusSetting.vue
new file mode 100644
index 0000000..4baa3eb
--- /dev/null
+++ b/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>
diff --git a/src/views/ecg/room/index.ts b/src/views/ecg/room/index.ts
new file mode 100644
index 0000000..a34c41f
--- /dev/null
+++ b/src/views/ecg/room/index.ts
@@ -0,0 +1,5 @@
+export interface BedStatusVO {
+ bedNo: String; // 璇婄枟搴婂彿
+ opStatus: boolean; // 璇婄枟搴婅瘖鐤楃姸鎬�
+}
+
--
Gitblit v1.9.3