From 3b8457c9c63f0996d8dae63ac988f976da956d38 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期三, 28 八月 2024 10:58:49 +0800
Subject: [PATCH] update
---
src/views/ecg/doctor/components/TitlePanel.vue | 24 +++++++++---
src/views/ecg/room/RoomLoginSelect.vue | 21 ++++++++++
src/views/ecg/doctor/index.vue | 12 ++++++
src/api/ecg/doctor/index.ts | 4 +-
4 files changed, 52 insertions(+), 9 deletions(-)
diff --git a/src/api/ecg/doctor/index.ts b/src/api/ecg/doctor/index.ts
index b9073a4..3ee013c 100644
--- a/src/api/ecg/doctor/index.ts
+++ b/src/api/ecg/doctor/index.ts
@@ -1,8 +1,8 @@
import request from '@/config/axios'
export interface RoomBedVO {
- roomId: number // 璇婂缂栧彿
- bedNo: string // 璇婄枟搴婄紪鍙�
+ roomId: number | null // 璇婂缂栧彿
+ bedNo: string | null // 璇婄枟搴婄紪鍙�
}
export interface PatientVO {
diff --git a/src/views/ecg/doctor/components/TitlePanel.vue b/src/views/ecg/doctor/components/TitlePanel.vue
index 00def2a..3fba55b 100644
--- a/src/views/ecg/doctor/components/TitlePanel.vue
+++ b/src/views/ecg/doctor/components/TitlePanel.vue
@@ -10,8 +10,8 @@
})
const roomBedVO: RoomBedVO = {
- roomId: userStore.room.roomId,
- bedNo: userStore.room.bedNo
+ roomId: userStore.room!.roomId,
+ bedNo: userStore.room!.bedNo
}
const props = defineProps({
@@ -24,11 +24,23 @@
</script>
<template>
-宸插氨璇妠{patientStatistic.finishedNum}} 鍑嗗涓瓄{patientStatistic.readyNum}}
- 杩囧彿{{patientStatistic.passedNum}} 鎺掗槦涓瓄{patientStatistic.queuingNum}}
- 璇婂{{roomBedVO.roomId}} 宸ヤ綅{{roomBedVO.bedNo}}
+<div class="mytitle">
+ <div>
+ 璇婂{{roomBedVO.roomId}} 宸ヤ綅{{roomBedVO.bedNo}}
+ </div>
+ <div>
+ 宸插氨璇妠{patientStatistic.finishedNum==undefined ? 0 : patientStatistic.finishedNum}}
+ 鍑嗗涓瓄{patientStatistic.readyNum==undefined ? 0 : patientStatistic.readyNum}}
+ 杩囧彿{{patientStatistic.passedNum==undefined ? 0 : patientStatistic.passedNum}}
+ 鎺掗槦涓瓄{patientStatistic.queuingNum==undefined ? 0 : patientStatistic.queuingNum}}
+ </div>
+</div>
+
</template>
<style scoped lang="scss">
-
+.mytitle {
+ display: flex;
+ justify-content: space-between;
+}
</style>
diff --git a/src/views/ecg/doctor/index.vue b/src/views/ecg/doctor/index.vue
index fb472b4..a19d272 100644
--- a/src/views/ecg/doctor/index.vue
+++ b/src/views/ecg/doctor/index.vue
@@ -19,6 +19,8 @@
queuingNum: 0
})
+let state: 'normal' | 'paused' = "normal";
+
const list = ref<queueVO[]>([])
const finishNextPatient = async () => {
@@ -45,6 +47,14 @@
patientStat.value = data2
}
+const pause = async () => {
+ state = 'paused'
+}
+
+const resume = async () => {
+ state = 'normal'
+}
+
/** 鍒濆鍖� **/
onMounted(() => {
getPatientList()
@@ -68,6 +78,8 @@
<el-container style="justify-content: center;">
<el-button type="primary" @click="finishNextPatient">鍙彿</el-button>
<el-button type="primary" @click="passNextPatient">杩囧彿</el-button>
+ <el-button v-if="state==='normal'" type="primary" @click="pause">鏆傚仠</el-button>
+ <el-button v-else type="primary" @click="resume">鎭㈠</el-button>
</el-container>
</el-container>
</template>
diff --git a/src/views/ecg/room/RoomLoginSelect.vue b/src/views/ecg/room/RoomLoginSelect.vue
index 84a7c25..94b624d 100644
--- a/src/views/ecg/room/RoomLoginSelect.vue
+++ b/src/views/ecg/room/RoomLoginSelect.vue
@@ -5,6 +5,7 @@
<RoomBedSelect :title="key" :bedList="value" :curBed="curSel" @haveSeat="haveSeat" @leaveSeat="leaveSeat"/>
</div>
</div>
+ <el-button @click="confirmCurSel">纭</el-button>
</div>
</template>
@@ -143,7 +144,7 @@
roomVO.docId = curUser.id
roomVO.docName = curUser.nickname
curSel.value = roomVO
-
+
haveSeatConfirm()
}).catch(() => {
console.log('鍙栨秷');
@@ -180,6 +181,24 @@
});
}
+const confirmCurSel = () => {
+ if (curSel.value.docId === null ) {
+ ElMessage({
+ message: '璇峰厛閫夋嫨宸ヤ綔鐨勪綅缃�!',
+ type: 'info',
+ duration: 3000 // 鑷姩鍏抽棴鏃堕棿锛岄粯璁や负3000ms
+ });
+ return
+ }
+
+ if (isStringEmpty(route.redirectedFrom?.fullPath))
+ push({ path: "/"})
+ else if(route.redirectedFrom?.fullPath === "/roomselect" )
+ push({ path: "/"})
+ else
+ push({ path: route.redirectedFrom?.fullPath})
+}
+
/** 鍒濆鍖� **/
onMounted(() => {
getList()
--
Gitblit v1.9.3