From 85adf58c4a495102a6d6e56499d462ac19511615 Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期六, 14 九月 2024 11:35:37 +0800 Subject: [PATCH] update --- src/views/ecg/callingscreen/bigscreen.vue | 23 +++++++++++++---------- 1 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/views/ecg/callingscreen/bigscreen.vue b/src/views/ecg/callingscreen/bigscreen.vue index 223bc03..952b854 100644 --- a/src/views/ecg/callingscreen/bigscreen.vue +++ b/src/views/ecg/callingscreen/bigscreen.vue @@ -1,5 +1,6 @@ <script setup lang="ts"> +import dayjs from 'dayjs' import {ScreenApi, statusMap, CallingVO} from "@/api/ecg/screen"; defineOptions({ name: 'bigscreen' }) @@ -47,11 +48,9 @@ if ( curWorkDay === undefined) { curSpeakSeqNum = 0; curWorkDay = new Date() - } else if (!isSameDate(listReady.value[0].bookDate, curWorkDay)) { + } else if (!isSameDate(dayjs(listReady.value[0].bookDate).toDate(), curWorkDay)) { curSpeakSeqNum = 0; - curWorkDay.setFullYear( listReady.value[0].bookDate[0] ) - curWorkDay.setMonth( listReady.value[0].bookDate[1] ) - curWorkDay.setDate( listReady.value[0].bookDate[2] ) + curWorkDay = dayjs(listReady.value[0].bookDate).toDate() } return listReady.value.find( item => item.status === 30 && item.called === 0 && item.seqNum > curSpeakSeqNum) @@ -62,6 +61,7 @@ if (queuePat !== undefined) { curSpeakPat = queuePat curSpeakSeqNum = curSpeakPat.seqNum + console.info( queuePat.patName + "---" + queuePat.roomName ) speak(queuePat.patName + queuePat.roomName); } else { curSpeakPat = undefined @@ -80,14 +80,13 @@ speechSynthesis.speak(speech) } -const isSameDate = ( date1: number[], date2 : Date) => { - if ( date1[0] === date2.getFullYear() - && date1[1] === date2.getMonth() - && date1[2] === date2.getDate() ) { +const isSameDate = ( date1: Date, date2 : Date) => { + if (date1.getFullYear() === date2.getFullYear() + && date1.getMonth() === date2.getMonth() + && date1.getDate() === date2.getDate()) return true - } else { + else return false - } } </script> @@ -111,6 +110,10 @@ {{ statusMap.get(scope.row.status) }} </template> </el-table-column> + <el-table-column + prop="roomName" + label="璇婂" + width="80"/> </el-table> </el-aside> <el-container> -- Gitblit v1.9.3