eight
2024-09-08 edc68ed8dee303123a5022be895703f774d4c3cf
update
已修改2个文件
20 ■■■■■ 文件已修改
src/api/ecg/screen/index.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/callingscreen/bigscreen.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/ecg/screen/index.ts
@@ -11,7 +11,7 @@
  patId: string // 患者编号
  patName: string // 患者姓名
  patGender: number // 患者性别
  bookDate: number[] // 预约日期
  bookDate: Date // 预约日期
  bookCheckType: number // 预约检查类型
  seqNum: number // 排队序号
  status: number // 10:排队中 20:候诊准备 30:就诊中 40:就诊完成 50:过号 60:过期
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)
@@ -80,14 +79,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>