|
|
@ -1,6 +1,6 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<section class="waitBox bg-[#F3F2FA]">
|
|
|
|
<section class="waitBox bg-[#F3F2FA]">
|
|
|
|
<nav class="h-[11.11vh] pl-[3.7vh] pr-[2.22vh] flex justify-between items-center bg-[#5D49AF] relative">
|
|
|
|
<nav class="h-[11.11vh] pl-[3.7vh] pr-[2.22vh] flex justify-between items-center bg-[#5D49AF] relative overflow-hidden">
|
|
|
|
<div class="logBox h-[5vh]">
|
|
|
|
<div class="logBox h-[5vh]">
|
|
|
|
<img class="h-full" src="@/assets/svg/Wait/logo.png" />
|
|
|
|
<img class="h-full" src="@/assets/svg/Wait/logo.png" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -18,11 +18,11 @@
|
|
|
|
<main class="h-[calc(100vh-18.51vh)] p-[24px] pb-0 relative" ref="mainRef">
|
|
|
|
<main class="h-[calc(100vh-18.51vh)] p-[24px] pb-0 relative" ref="mainRef">
|
|
|
|
<div class="absolute top-[24px] left-1/2 -translate-x-1/2 w-[calc(100%-48px)]">
|
|
|
|
<div class="absolute top-[24px] left-1/2 -translate-x-1/2 w-[calc(100%-48px)]">
|
|
|
|
<div class="bg-[#9A82FF] flex text-center" :style="carouselNav">
|
|
|
|
<div class="bg-[#9A82FF] flex text-center" :style="carouselNav">
|
|
|
|
<div class="flex-1 border-r">手术间</div>
|
|
|
|
<div class="w-[16%] border-r">手术间</div>
|
|
|
|
<div class="flex-1 border-r">患者姓名</div>
|
|
|
|
<div class="w-[20%] border-r">患者姓名</div>
|
|
|
|
<div class="flex-1 border-r">床号</div>
|
|
|
|
<div class="w-[16%] border-r">床号</div>
|
|
|
|
<div class="flex-1 border-r">科室</div>
|
|
|
|
<div class="w-[28%] border-r">科室</div>
|
|
|
|
<div class="flex-1">状态</div>
|
|
|
|
<div class="w-[20%]">状态</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div :style="carouselWrap" class="border border-[#9A82FF] border-t-0" v-loading="isLoading">
|
|
|
|
<div :style="carouselWrap" class="border border-[#9A82FF] border-t-0" v-loading="isLoading">
|
|
|
|
<template v-if="patientList['length']">
|
|
|
|
<template v-if="patientList['length']">
|
|
|
@ -32,12 +32,12 @@
|
|
|
|
<template v-for="(subItem, index) in item">
|
|
|
|
<template v-for="(subItem, index) in item">
|
|
|
|
<div :key="index" :style="carouselItemStyle">
|
|
|
|
<div :key="index" :style="carouselItemStyle">
|
|
|
|
<div class="flex text-center">
|
|
|
|
<div class="flex text-center">
|
|
|
|
<div class="flex-1 border-r text-[#333] truncate">{{ subItem['RoomName'] }}</div>
|
|
|
|
<div class="w-[16%] border-r text-[#333] truncate">{{ subItem['RoomName'] }}</div>
|
|
|
|
<div class="flex-1 border-r text-[#333] truncate">{{ subItem['PatientName'] }}</div>
|
|
|
|
<div class="w-[20%] border-r text-[#333] truncate">{{ subItem['PatientName'] }}</div>
|
|
|
|
<div class="flex-1 border-r text-[#333] truncate">{{ subItem['BedNo'] }}</div>
|
|
|
|
<div class="w-[16%] border-r text-[#333] truncate">{{ subItem['BedNo'] }}</div>
|
|
|
|
<div class="flex-1 border-r text-[#333] truncate">{{ subItem['WardName'] }}</div>
|
|
|
|
<div class="w-[28%] border-r text-[#333] truncate">{{ subItem['DeptName'] }}</div>
|
|
|
|
<div class="flex-1 text-[#333]" :style="{ color: `${textToColor(statusToTxt(subItem['ProcStatus']))}` }">
|
|
|
|
<div class="w-[20%] text-[#333]" :style="{ color: `${textWaitToColor(subItem['ProcStatusName'])}` }">
|
|
|
|
{{ statusToTxt(subItem['ProcStatus']) }}
|
|
|
|
{{ subItem['ProcStatusName'] }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -68,9 +68,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { getAnesPatientList } from '@/api/waitList';
|
|
|
|
import { getAnesPatientList } from '@/api/waitList';
|
|
|
|
import { Carousel, CarouselItem, Notification } from 'element-ui';
|
|
|
|
import { Carousel, CarouselItem } from 'element-ui';
|
|
|
|
import dayjs from 'dayjs';
|
|
|
|
import dayjs from 'dayjs';
|
|
|
|
import { statusToTxt, textToColor } from '@/utils/common';
|
|
|
|
import { statusToTxt, textWaitToColor } from '@/utils/common';
|
|
|
|
import Stomp from 'stompjs';
|
|
|
|
import Stomp from 'stompjs';
|
|
|
|
const { MQTT_SERVICE, MQTT_USERNAME, MQTT_PASSWORD } = window.globalMQ;
|
|
|
|
const { MQTT_SERVICE, MQTT_USERNAME, MQTT_PASSWORD } = window.globalMQ;
|
|
|
|
|
|
|
|
|
|
|
@ -91,31 +91,21 @@ export default {
|
|
|
|
activeIndex: 0,
|
|
|
|
activeIndex: 0,
|
|
|
|
getDataTimer: null,
|
|
|
|
getDataTimer: null,
|
|
|
|
popupMsg: '',
|
|
|
|
popupMsg: '',
|
|
|
|
|
|
|
|
synth: window.speechSynthesis,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
statusToTxt,
|
|
|
|
statusToTxt,
|
|
|
|
textToColor,
|
|
|
|
textWaitToColor,
|
|
|
|
onGetPageData() {
|
|
|
|
onGetPageData() {
|
|
|
|
let today = dayjs().format('YYYY-MM-DD');
|
|
|
|
let today = dayjs().format('YYYY-MM-DD');
|
|
|
|
getAnesPatientList({
|
|
|
|
today = '2024-06-06';
|
|
|
|
ScheduledDateTime: today,
|
|
|
|
getAnesPatientList(today)
|
|
|
|
Status: -1,
|
|
|
|
|
|
|
|
IsPacu: false,
|
|
|
|
|
|
|
|
IsEOperation: false,
|
|
|
|
|
|
|
|
IsAnesManage: true,
|
|
|
|
|
|
|
|
IsInfect: false,
|
|
|
|
|
|
|
|
IsRadiation: false,
|
|
|
|
|
|
|
|
IsPostoperativeAnalgesia: false,
|
|
|
|
|
|
|
|
IsSurgicalFreezing: false,
|
|
|
|
|
|
|
|
IsType: false,
|
|
|
|
|
|
|
|
client: null,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.then(res => {
|
|
|
|
.then(res => {
|
|
|
|
this.patientList = [];
|
|
|
|
this.patientList = [];
|
|
|
|
if (res['Data']['Data']) {
|
|
|
|
if (res['Data']['length']) {
|
|
|
|
for (let index = 0; index < res['Data']['Data']['AnesPatientLists'].length; index++) {
|
|
|
|
for (let index = 0; index < res['Data'].length; index++) {
|
|
|
|
const element = res['Data']['Data']['AnesPatientLists'][index];
|
|
|
|
const element = res['Data'][index];
|
|
|
|
const groupIndex = parseInt(index / this.showItemNum);
|
|
|
|
const groupIndex = parseInt(index / this.showItemNum);
|
|
|
|
if (this.patientList[groupIndex]) {
|
|
|
|
if (this.patientList[groupIndex]) {
|
|
|
|
this.patientList[groupIndex].push(element);
|
|
|
|
this.patientList[groupIndex].push(element);
|
|
|
@ -126,6 +116,8 @@ export default {
|
|
|
|
if (!this.carouselTimer) {
|
|
|
|
if (!this.carouselTimer) {
|
|
|
|
this.onCarouselTimer();
|
|
|
|
this.onCarouselTimer();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
clearInterval(this.carouselTimer);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.finally(() => {
|
|
|
|
.finally(() => {
|
|
|
@ -148,7 +140,7 @@ export default {
|
|
|
|
this.mainRefHeight = parseInt(this.$refs.mainRef.clientHeight - 24 - 40);
|
|
|
|
this.mainRefHeight = parseInt(this.$refs.mainRef.clientHeight - 24 - 40);
|
|
|
|
const rowHeight = this.mainRefHeight / (this.showItemNum + 1);
|
|
|
|
const rowHeight = this.mainRefHeight / (this.showItemNum + 1);
|
|
|
|
this.carouselNav = {
|
|
|
|
this.carouselNav = {
|
|
|
|
'font-size': `${(rowHeight * 0.43).toFixed(2)}px`,
|
|
|
|
'font-size': `${(rowHeight * 0.53).toFixed(2)}px`,
|
|
|
|
'line-height': `${rowHeight.toFixed(2)}px`,
|
|
|
|
'line-height': `${rowHeight.toFixed(2)}px`,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.carouselWrap = {
|
|
|
|
this.carouselWrap = {
|
|
|
@ -156,7 +148,7 @@ export default {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.carouselItemStyle = {
|
|
|
|
this.carouselItemStyle = {
|
|
|
|
'line-height': `${rowHeight.toFixed(2)}px`,
|
|
|
|
'line-height': `${rowHeight.toFixed(2)}px`,
|
|
|
|
'font-size': `${(rowHeight * 0.4).toFixed(2)}px`,
|
|
|
|
'font-size': `${(rowHeight * 0.5).toFixed(2)}px`,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onCarouselChange(index) {
|
|
|
|
onCarouselChange(index) {
|
|
|
@ -164,7 +156,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
setRabitMQ() {
|
|
|
|
setRabitMQ() {
|
|
|
|
this.client = Stomp.client(MQTT_SERVICE);
|
|
|
|
this.client = Stomp.client(MQTT_SERVICE);
|
|
|
|
this.connect();
|
|
|
|
// this.connect();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
connect: function () {
|
|
|
|
connect: function () {
|
|
|
|
const headers = {
|
|
|
|
const headers = {
|
|
|
@ -210,6 +202,9 @@ export default {
|
|
|
|
}, 35000);
|
|
|
|
}, 35000);
|
|
|
|
window.addEventListener('resize', this.onCalculate);
|
|
|
|
window.addEventListener('resize', this.onCalculate);
|
|
|
|
this.setRabitMQ();
|
|
|
|
this.setRabitMQ();
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
|
|
this.popupMsg = `请0的家属到手术室门口接病人`;
|
|
|
|
|
|
|
|
}, 1000);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
@ -219,24 +214,23 @@ export default {
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
|
popupMsg(newVal) {
|
|
|
|
popupMsg(newVal) {
|
|
|
|
if (newVal) {
|
|
|
|
if (newVal) {
|
|
|
|
const h = this.$createElement;
|
|
|
|
// const h = this.$createElement;
|
|
|
|
Notification({
|
|
|
|
// Notification({
|
|
|
|
title: '呼叫患者',
|
|
|
|
// title: '呼叫信息',
|
|
|
|
message: h('i', { style: 'color: teal;font-size:24px' }, newVal),
|
|
|
|
// message: h('i', { style: 'color: teal;font-size:24px' }, newVal),
|
|
|
|
duration: 12000,
|
|
|
|
// duration: 12000,
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
if ('speechSynthesis' in window) {
|
|
|
|
// if (this.synth) {
|
|
|
|
const utterance = new SpeechSynthesisUtterance([newVal, newVal, newVal].join(''));
|
|
|
|
// const utterance = new SpeechSynthesisUtterance([newVal, newVal, newVal].join(''));
|
|
|
|
utterance.onend = function () {
|
|
|
|
// const voices = synth.getVoices();
|
|
|
|
Notification.closeAll();
|
|
|
|
// utterance.onend = function () {
|
|
|
|
this.newVal = '';
|
|
|
|
// Notification.closeAll();
|
|
|
|
};
|
|
|
|
// this.newVal = '';
|
|
|
|
window.speechSynthesis.speak(utterance);
|
|
|
|
// };
|
|
|
|
} else {
|
|
|
|
// window.speechSynthesis.speak(utterance);
|
|
|
|
alert('您的浏览器不支持语音合成');
|
|
|
|
// } else {
|
|
|
|
}
|
|
|
|
// alert('您的浏览器不支持语音合成');
|
|
|
|
|
|
|
|
// }
|
|
|
|
console.log(newVal);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|