123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581 |
- <template>
- <div class="main-contain">
- <div class="position">
- <bread-crumb :crumbs="crumbs"></bread-crumb>
- <el-button
- size="small"
- icon="el-icon-menu"
- @click="fullscreenboard"
- type="primary"
- >全屏投影</el-button
- >
- </div>
- <div id="fullscreenbroad" v-show="dialogTableVisible">
- <el-row class="fullRow">
- <el-button
- @click="openSetting"
- icon="el-icon-setting"
- circle
- id="fullscreenbroad-setting"
- ></el-button>
- <el-button
- type="primary"
- icon="el-icon-rank"
- v-if="showSetting"
- id="fullscreenbroad-setting"
- @click="togglefullscreen"
- >切换模式</el-button
- >
- <el-button
- type="primary"
- icon="el-icon-menu"
- v-if="showSetting"
- id="fullscreenbroad-setting"
- @click="outfullscreenboard"
- >退出全屏投影</el-button
- >
- </el-row>
- <div class="page_lineUp">
- <div class="lineUpTitle">
- <div>{{ this.$store.getters.xt_user.org.org_name }}<span> 温馨提示:请注意排队叫号,依次叫号就诊上机,谢谢配合</span></div>
- <div>{{ newdate }} {{ time }}</div>
- </div>
- <div class="lineUpMain">
- <div class="lineUpMainLeft">
- <div class="lineUpMainLeftTitle">
- <p style="width:12%">排号</p>
- <p style="width:14%">姓名</p>
- <p style="width:14%">病例号</p>
- <p style="width:14%">床位号</p>
- <p style="width:14%">治疗状态</p>
- <p style="width:14%">上机时间</p>
- <p style="width:16%">预计下机时间</p>
- </div>
- <div class="lineUpList">
- <div class="lineUpListOne" v-for="(item,index) in lineUpList" :key="index">
- <p style="width:12%">{{ item.queue_no }}</p>
- <p style="width:14%">{{ item.patient_name }}</p>
- <p style="width:14%">{{ item.dialysis_no }}</p>
- <p style="width:14%">{{ item.partition_name + item.bed_name }}</p>
- <p style="width:14%">
- <span v-if="item.status == 1">待接诊</span>
- <span v-if="item.status == 2">接诊中</span>
- <span v-if="item.status == 3">待上机</span>
- <span v-if="item.status == 4">透析中</span>
- <span v-if="item.status == 5">已下机</span>
- </p>
- <p style="width:14%">{{ item.start_time ? item.start_time : '--' }}</p>
- <p style="width:16%">{{ item.end_time ? item.end_time : '--' }}</p>
- </div>
- </div>
- </div>
- <div class="callingBox">
- <div class="callingBoxLeft">
- <div class="callingTitle"><span style="margin: 0 auto;">接<br />诊<br />叫<br />号</span></div>
- <div style="flex: 1;">
- <div class="callingTop" style="margin-bottom:10px;">
- <div class="callingTopTip"><span style="margin: 0 auto;">正在<br />接诊</span></div>
- <div class="callingContent">
- <p style="margin:50px 0 14px;"><span v-for="(item,index) in receivingPatient.slice(0,3)" :key="index">{{ item.patient_name }}、</span></p>
- <p><span v-for="(item,index) in receivingPatient.slice(3,6)" :key="index">{{ item.patient_name }}、</span></p>
- </div>
- </div>
- <div class="callingTop" style="border-radius: 0 0 15px 0;">
- <div class="callingTopTip"><span style="margin: 0 auto;">等待<br />接诊</span></div>
- <div class="callingContent">
- <p style="margin:50px 0 14px;"><span v-for="(item,index) in waitDoctorList.slice(0,3)" :key="index">{{ item.patient_name }}、</span></p>
- <p><span v-for="(item,index) in waitDoctorList.slice(3,6)" :key="index">{{ item.patient_name }}、</span></p>
- </div>
- </div>
- </div>
- </div>
- <div class="callingBoxLeft">
- <div class="callingTitle newCallingTitle"><span style="margin: 0 auto;">上<br />机<br />叫<br />号</span></div>
- <div style="flex: 1;">
- <div class="callingTop" style="margin-bottom:10px;">
- <div class="callingTopTip newCallingTopTip"><span style="margin: 0 auto;">正在<br />叫号</span></div>
- <div class="callingContent newCallingContent">
- <p style="margin:50px 0 14px;"><span v-for="(item,index) in upPatientList.slice(0,3)" :key="index">{{ item.patient_name }}、</span></p>
- <p><span v-for="(item,index) in upPatientList.slice(3,6)" :key="index">{{ item.patient_name }}、</span></p>
- </div>
- </div>
- <div class="callingTop" style="border-radius: 0 0 15px 0;">
- <div class="callingTopTip newCallingTopTip"><span style="margin: 0 auto;">等待<br />叫号</span></div>
- <div class="callingContent newCallingContent">
- <p style="margin:50px 0 14px;"><span v-for="(item,index) in receivingPatient.slice(0,3)" :key="index">{{ item.patient_name }}、</span></p>
- <p><span v-for="(item,index) in receivingPatient.slice(3,6)" :key="index">{{ item.patient_name }}、</span></p>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- </div>
- </div>
- <div class="app-container">
- <div class="page_lineUp">
- <div class="lineUpTitle">
- <div>{{ this.$store.getters.xt_user.org.org_name }}<span> 温馨提示:请注意排队叫号,依次叫号就诊上机,谢谢配合</span></div>
- <div>{{ newdate }} {{ time }}</div>
- </div>
- <div class="lineUpMain">
- <div class="lineUpMainLeft">
- <div class="lineUpMainLeftTitle">
- <p style="width:12%">排号</p>
- <p style="width:14%">姓名</p>
- <p style="width:14%">病例号</p>
- <p style="width:14%">床位号</p>
- <p style="width:14%">治疗状态</p>
- <p style="width:14%">上机时间</p>
- <p style="width:16%">预计下机时间</p>
- </div>
- <div class="lineUpList">
- <div class="lineUpListOne" v-for="(item,index) in lineUpList" :key="index">
- <p style="width:12%">{{ item.queue_no }}</p>
- <p style="width:14%">{{ item.patient_name }}</p>
- <p style="width:14%">{{ item.dialysis_no }}</p>
- <p style="width:14%">{{ item.partition_name + item.bed_name }}</p>
- <p style="width:14%">
- <span v-if="item.status == 1">待接诊</span>
- <span v-if="item.status == 2">接诊中</span>
- <span v-if="item.status == 3">待上机</span>
- <span v-if="item.status == 4">透析中</span>
- <span v-if="item.status == 5">已下机</span>
- </p>
- <p style="width:14%">{{ item.start_time ? item.start_time : '--' }}</p>
- <p style="width:16%">{{ item.end_time ? item.end_time : '--' }}</p>
- </div>
- </div>
- </div>
- <div class="callingBox">
- <div class="callingBoxLeft">
- <div class="callingTitle"><span style="margin: 0 auto;">接<br />诊<br />叫<br />号</span></div>
- <div style="flex: 1;">
- <div class="callingTop" style="margin-bottom:10px;">
- <div class="callingTopTip"><span style="margin: 0 auto;">正在<br />接诊</span></div>
- <div class="callingContent">
- <p style="margin:50px 0 14px;"><span v-for="(item,index) in receivingPatient.slice(0,3)" :key="index">{{ item.patient_name }}、</span></p>
- <p><span v-for="(item,index) in receivingPatient.slice(3,6)" :key="index">{{ item.patient_name }}、</span></p>
- </div>
- </div>
- <div class="callingTop" style="border-radius: 0 0 15px 0;">
- <div class="callingTopTip"><span style="margin: 0 auto;">等待<br />接诊</span></div>
- <div class="callingContent">
- <p style="margin:50px 0 14px;"><span v-for="(item,index) in waitDoctorList.slice(0,3)" :key="index">{{ item.patient_name }}、</span></p>
- <p><span v-for="(item,index) in waitDoctorList.slice(3,6)" :key="index">{{ item.patient_name }}、</span></p>
- </div>
- </div>
- </div>
- </div>
- <div class="callingBoxLeft">
- <div class="callingTitle newCallingTitle"><span style="margin: 0 auto;">上<br />机<br />叫<br />号</span></div>
- <div style="flex: 1;">
- <div class="callingTop" style="margin-bottom:10px;">
- <div class="callingTopTip newCallingTopTip"><span style="margin: 0 auto;">正在<br />叫号</span></div>
- <div class="callingContent newCallingContent">
- <p style="margin:50px 0 14px;"><span v-for="(item,index) in upPatientList.slice(0,3)" :key="index">{{ item.patient_name }}、</span></p>
- <p><span v-for="(item,index) in upPatientList.slice(3,6)" :key="index">{{ item.patient_name }}、</span></p>
- </div>
- </div>
- <div class="callingTop" style="border-radius: 0 0 15px 0;">
- <div class="callingTopTip newCallingTopTip"><span style="margin: 0 auto;">等待<br />叫号</span></div>
- <div class="callingContent newCallingContent">
- <p style="margin:50px 0 14px;"><span v-for="(item,index) in receivingPatient.slice(0,3)" :key="index">{{ item.patient_name }}、</span></p>
- <p><span v-for="(item,index) in receivingPatient.slice(3,6)" :key="index">{{ item.patient_name }}、</span></p>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- </div>
- </div>
- </div>
- </template>
-
- <script>
- const moment = require('moment')
- import BreadCrumb from "../components/bread-crumb";
- import screenfull from "screenfull";
- export default {
- components:{
- BreadCrumb
- },
- data(){
- return{
- crumbs: [
- { path: false, name: "签到排队" },
- { path: false, name: "排队窗口" }
- ],
- dialogTableVisible:false,
- showSetting: false,
- lineUpList:[],
- count:0,
- page:1,
- timer:null,
- receivingPatient:[],
- waitDoctorList:[],
- upPatientList:[],
- patient_id:'',
- timerID:null,
- time:'',
- newdate:'',
- voiceNum:1,
- voiceTime:null,
-
- voice:true,
- a:1
- }
- },
- computed: {
- websocket() {
- return this.$store.state.user.websocket;
- },
- },
- created(){
- this.initData = {
- cmd: "queue/join",
- data: {type:2,page:1,size:6},
- };
- this.websocketSend(this.initData)
- let newobj = {
- cmd: "queue/callreturn",
- data: {patient_id:0},
- };
- this.websocketSend(newobj)
- },
- beforeMount() {
- this.websocketMess();
- },
- mounted(){
- this.timer = setInterval(() => {
- if(this.page < Math.ceil(this.count / 6)){
- console.log('执行',Math.ceil(this.count / 6),this.page)
- this.page++
- let obj = {
- cmd: "queue/queuelist",
- data: {page:this.page,size:6}
- };
- this.websocketSend(obj)
- }else{
- console.log('执行22223333')
- this.page = 1
- let obj = {
- cmd: "queue/queuelist",
- data: {page:this.page,size:6}
- };
- this.websocketSend(obj)
- }
- }, 5000);
- this.timerID = setInterval(() => {
- this.updateTime()
- }, 1000);
- },
- beforeDestroy(){
- clearInterval(this.timer); // 清除定时器
- this.timer = null
- clearInterval(this.timerID);
- this.timerID = null; // 清除定时器
- // this.timer = null;
- // let obj = {
- // cmd: "queue/join",
- // data: {type:1},
- // };
- // this.websocketSend(obj)
- console.log('hhhhhhhhhhhhhhhhhhhhhh',this.timerID)
- },
- methods:{
- websocketSend(data) {
- try {
- this.websocket.send(JSON.stringify(data))
-
- } catch (error) {
- this.showError = true;
- this.showIndex = 4;
- this.errorInfo = "网络异常,请稍后退出重试!";
- }
- },
- websocketMess() {
- this.websocket.onmessage = e => {
- let res = JSON.parse(e.data);
- // let res = re.data;
- console.log('res',res)
- if(res.channel == 'queue/join'){
- this.lineUpList = res.data.patientQueueList.data
- this.receivingPatient = res.data.receivingPatient
- this.waitDoctorList = res.data.waitDoctorList
- this.upPatientList = res.data.upPatientList
- this.count = res.data.patientQueueList.count
- this.lineUpList.map(item => {
- item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
- // item.start_time = moment(item.start_time * 1000).format('HH:mm')
- })
- }else if(res.channel == 'queue/queuelist'){
- this.lineUpList = res.data.patientQueueList.data
- this.count = res.data.patientQueueList.count
- this.lineUpList.map(item => {
- item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
- // item.start_time = moment(item.start_time * 1000).format('HH:mm')
- if(item.start_time != null){
- item.start_time = moment(item.start_time * 1000).format('HH:mm:ss')
- }
- if(item.status == 4){
- item.end_time = moment(item.end_time * 1000).format('HH:mm:ss')
- }
- })
- }else if(res.channel == 'patientCallInfo'){
- console.log(999999999999,res.data)
-
-
- console.log('执行几次',this.voiceNum)
- if(this.voice == true){
- this.patient_id = res.data.patientInfo.patient_id
- this.voice = false
- // let time1 = null
- this.voicePrompt(res.data.callVolUrl)
- this.voiceTime = setInterval(() => {
- if(this.voiceNum < 3){
- this.voiceNum++
- this.voicePrompt(res.data.callVolUrl)
- }else{
- this.voiceNum = 1;
- this.voice = true
- let obj = {
- cmd: "queue/callreturn",
- data: {patient_id:this.patient_id},
- };
- this.websocketSend(obj)
- clearInterval(this.voiceTime);
- this.voiceTime = null
- }
- },6000)
- }else {
- this.$message({
- message: '警告哦,这是一条警告消息',
- type: 'warning'
- });
- }
- }else if(res.channel == 'updateCallList'){
- this.receivingPatient = res.data.queue_list
-
- }else if(res.channel == 'updateWaitCallList'){
- this.waitDoctorList = res.data.queue_list
- }else if(res.channel == 'updateUpCallList'){
- this.upPatientList = res.data.queue_list
- }
- // else if(res.channel == "patientQueueInfo"){
- // this.queueInfo = res.data.queueInfo
- // let obj = {
- // cmd: "queue/queuelist",
- // data: {page:1,size:10}
- // };
- // this.websocketSend(obj)
-
- // }
- }
- },
- updateTime() {
- var cd = new Date();
- var week = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
- console.log(1111111)
- this.time = this.zeroPadding(cd.getHours(), 2) + ':' + this.zeroPadding(cd.getMinutes(), 2) + ':' + this.zeroPadding(cd.getSeconds(), 2) + ' (' + week[cd.getDay()] + ")";
- this.newdate = this.zeroPadding(cd.getFullYear(), 4) + '-' + this.zeroPadding(cd.getMonth() + 1, 2) + '-' + this.zeroPadding(cd.getDate(), 2);
- },
-
- zeroPadding(num, digit) {
- var zero = '';
- for (var i = 0; i < digit; i++) {
- zero += '0';
- }
- return (zero + num).slice(-digit);
- },
- fullscreenboard: function() {
- this.dialogTableVisible = true;
- // let routeData = this.$router.resolve({ path: '/fullscreenboard' })
- // window.open(routeData.href, '_blank')
- },
- outfullscreenboard: function() {
- this.dialogTableVisible = false;
- this.showSetting = false;
- },
- togglefullscreen: function() {
- if (!screenfull.enabled) {
- this.$message({
- message: "你的浏览器不支持",
- type: "warning"
- });
- return false;
- }
- screenfull.toggle();
- this.showSetting = false;
- },
- openSetting() {
- if (this.showSetting == false) {
- this.showSetting = true;
- } else {
- this.showSetting = false;
- }
- },
- }
- }
- </script>
-
- <style lang="scss" scoped>
- .page_lineUp{
- .lineUpTitle{
- height: 50px;
- background: #1A82BF;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 20px;
- color:#fff;
- font-size: 20px;
- font-weight: 600;
- }
- .lineUpMain{
- background: linear-gradient(0deg, #76ECEC, #479CD2);
- height: 1080px;
- padding:10px;
- }
- .lineUpMainLeft{
- height: 620px;
- border-radius: 15px;
-
- }
- .lineUpMainLeftTitle{
- display: flex;
- justify-content: space-between;
- align-items: center;
- color:#fff;
- font-size: 38px;
- font-weight: 600;
- height:80px;
- background: #1A82BF;
- border-radius: 15px 15px 0 0;
- >p{
- text-align: center;
- }
- }
- .lineUpList{
- font-size: 35px;
- font-weight: 600;
- >div:nth-child(odd){
- background: #F9FDFF;
- }
- >div:nth-child(even){
- background: #CCEBFF;
- }
- >div:last-child{
- border-radius: 0 0 15px 15px;
- }
- .lineUpListOne{
- height:90px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- color:#1C6895;
- >p{
- width:25%;
- text-align: center;
- }
- }
- }
- .callingBox{
- height: 430px;
- margin-top: 10px;
- display: flex;
- justify-content: space-between;
- .callingBoxLeft{
- width: 49.5%;
- height: 100%;
- display: flex;
- justify-content: space-between;
- .callingTitle{
- width: 130px;
- height: 100%;
- border-radius: 15px 0 0 15px;
- font-size: 66px;
- font-weight:600;
- text-align: center;
- color: #fff;
- background: #1A82BF;
- display: flex;
- align-items: center;
- margin-right: 5px;
- }
- .newCallingTitle{
- background: #1aa680;
- }
- }
- .callingTop{
- height: 210px;
- border-radius: 0 15px 0 0;
- background: #F9FDFF;
- display: flex;
- justify-content: space-between;
- .callingTopTip{
- width: 130px;
- height: 100%;
- color: #fff;
- font-size: 40px;
- font-weight: 600;
- background: #1A82BF;
- display: flex;
- align-items: center;
- }
- .newCallingTopTip{
- background: #1aa680;
- }
- .callingContent{
- flex: 1;
- display: flex;
- flex-direction: column;
- font-size: 50px;
- color:#1C6895;
- font-weight: 600;
- padding-left: 20px;
- >p{
- width:100%;
- text-align: left;
- line-height: 50px;
- }
- }
- .newCallingContent{
- color:#1aa680;
- }
- }
- }
- }
- #fullscreenbroad {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- overflow: auto;
- margin: 0;
- background: #fff;
- padding: 20px;
- z-index:5000;
- }
- #fullscreenbroad #fullscreenbroad-setting {
- float: right;
- }
-
- #fullscreenbroad .el-button + .el-button {
- margin-left: 0px;
- }
- #fullscreenbroad .el-button:nth-child(1) {
- margin-left: 10px;
- }
- #fullscreenbroad .el-button:nth-child(2) {
- margin-left: 10px;
- }
- .fullRow{
- margin-bottom: 10px;
- }
- </style>
|